feat: add runner-facing API methods (heartbeat, claim, progress, complete, fail, log) #11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The WORKERS.md spec defines 7 runner-facing endpoints that allow
silorunnerprocesses to interact with the job queue. None are implemented in the client.Missing Methods
POST /api/runner/heartbeatrunner_heartbeat()POST /api/runner/claimrunner_claim_job()PUT /api/runner/jobs/{jobID}/progressrunner_report_progress(job_id, progress, message)POST /api/runner/jobs/{jobID}/completerunner_complete_job(job_id, result)POST /api/runner/jobs/{jobID}/failrunner_fail_job(job_id, error_message)POST /api/runner/jobs/{jobID}/logrunner_append_log(job_id, level, message, metadata)PUT /api/runner/jobs/{jobID}/dagrunner_sync_dag(job_id, nodes, edges)Design Consideration
Runner endpoints use a different auth mechanism --
Authorization: Bearer silo_runner_<token>validated by a dedicatedRequireRunnerAuthmiddleware. The client may need a way to configure runner token auth separately from user token auth, or a separateSiloRunnerClientsubclass/mode.Options:
runner_tokenparameter toSiloSettingsand a_runner_auth_headers()methodSiloRunnerClientthat extendsSiloClientwith runner-specific methodsSiloClientbut allow passing a runner token at construction timeReferences