Command reference
oko serve
Runs the one Oko process on a host: it owns the PTY broker in its foreground. Autonomy, the Slack responder, catalogue synchronisation and task handover are Oko routines Stado schedules (oko routines create --action autonomy|suggestions|index|control), not loops inside it.
Invocation#
oko serve [--socket PATH]Inputs and options#
- --socket selects the PTY broker socket; the default is the host's own. The unit com.wisent.compute.service.oko-autonomy runs this command itself, with no launcher in front of it.
- --autonomy-interval, --state-dir, --suggestions-interval, --suggestions-channel, --control-hours, --control-interval, --control-max, --index-interval, --index-max-parses, --db and --root are retired: each is named on stderr as doing nothing, with the routine that replaced it, and ignored.
Output and state effect#
- When the running build is the one Stado delivered to ~/.stado/bin, it first links ~/.local/bin/oko to it, so oko <command> reaches that build from a login shell; a link that names another build, or one that cannot be read, is named on stderr and linked again.
- Started as the declared unit, it retires the launch agents whose work it absorbed (ai.wisent.oko.transcript-index, ai.wisent.oko.tasks-control, com.wisent.compute.service.oko-goal-lifecycle, ai.wisent.oko.suggestions) and asks the legacy standalone broker to leave once idle; a person running oko serve by hand never unloads the host's services.
- Every oko serve runs the model policy pass on serve.json's policyPass cron; only the declared unit also sends the operator's hourly update (`oko asks update`), and any other logs `serve: this service is not the declared unit, so the operator's hourly update is left to the unit` once at its start.
- Binds the broker socket owner-only and prints “broker listening on <socket>”; no component is a child process.
Refusals and safe exits#
- A legacy retirement launchd refuses ends the process with “legacy service retirement failed: <cause>”, and a legacy broker whose launchctl record names a pid that is not a process id with “launchctl print gui/<uid>/<label> names pid <text>, which is not a process id: <error>”. A legacy broker that still holds terminals ends it with “the legacy PTY broker still owns the terminal socket”; launchd starts oko serve again once it is idle. A socket that cannot be bound ends it naming the operation, the socket and the error.