Keep release discovery, worker compatibility, and CLI navigation separate while keeping the binary small.
sah reads three server-owned documents:
GET /s@hService document for the CLI entrypoint and server-advertised command affordances.POST /s@h/navigationOrdered next-command suggestions based on the local machine state the CLI reports.GET /s@h/client-releaseRelease metadata and worker-contract requirements.
The CLI no longer ships a built-in upgrade command. Release metadata is still surfaced so the CLI can:
- tell the user when a newer release is recommended
- include release-notes links when worker compatibility fails
- keep the release policy separate from the local command surface
Read-only commands such as sah me, sah contributions, and sah leaderboard are not blocked by worker-contract policy.
Safe reads share one private disk-backed HTTP cache:
- macOS:
~/Library/Application Support/sah/http-cache/ - Linux:
$XDG_CONFIG_HOME/sah/http-cache/or~/.config/sah/http-cache/
The cache honors server Cache-Control headers instead of keeping bespoke JSON TTL files. That means /s@h/client-release uses the same transport as other safe reads such as /s@h, /s@h/me, /s@h/contributions, and /s@h/leaderboard.
sah still reads release metadata from GET /s@h/client-release.
The response includes:
latest_versionrecommended_versionupgrade_commandtask_protocol_versionrequired_task_protocol_versionrequired_client_capabilities_links.upgrade_links.release_notes
The CLI advertises its worker contract only on routes that claim, read, submit, or release assignments:
POST /s@h/assignmentsGET /s@h/assignments/{id}POST /s@h/contributionsPOST /s@h/assignments/{id}/submissionDELETE /s@h/assignments/{id}
For backward compatibility, the server enforces the same contract on legacy worker routes such as GET /s@h/tasks and POST /s@h/assignments/{id}/release.
The advertised headers are:
X-SAH-Task-ProtocolX-SAH-Client-Capabilities
Today the built-in CLI capabilities cover assignment affordances such as assignment-scoped submit and release links. If the server requires a newer task protocol or new client capabilities, sah run, sah daemon install, and sah daemon start stop before starting worker traffic. If the contract changes after the worker has already started, the worker routes return a conflict and the CLI exits with an upgrade hint instead of looping forever.
During the additive server-owned prompt rollout:
sah-cli<=v0.8.xstill consumesinstructionsand renders the prompt locally.sah-cliv0.9.x can advertiseserver-agent-requestand consumeagent_requestdirectly.- The API should not require
server-agent-requestuntil the oldinstructions-based clients are no longer part of the supported rollout window.