Command types
Payloads are decoded strictly: unknown fields are refused.
Lifecycle
invalid_command, unsupported, timeout, cancelled, interrupted, agent_shutdown, handler_error, agent_lost, node_disabled, undeliverable or model_not_found, plus a message.
API
Create body:
command_type, payload, optional timeout_seconds and expires_in_seconds. Send an Idempotency-Key header to make retries safe.
Delivery guarantees
- Delivery is at least once per connection. Commands are sent oldest first as soon as they are created, and on every reconnect the Deployer re-sends each command that has not finished.
- Execution is at most once. The agent journals a command before running it. A command ID it has seen before is answered from the journal and never run again. After an agent restart, an interrupted command reports
failed: interrupted; commands are never restarted automatically. - Timeouts. The agent stops a command at
timeout_secondsand refuses one that arrives afterexpires_at. A command sent 10 times without an answer fails asundeliverable; one that stops reporting for its timeout plus a minute fails asagent_lost. - Cancellation. A command not yet sent is cancelled at once. One that may have been sent is stopped if running and cancellable, or prevented from ever running if it has not arrived.
- Shutdown. On SIGTERM the agent stops taking commands (they stay pending for after the restart) and cancels running ones.
Command logs
A running command reports up to its last 100 log lines inprogress.log, each with at, level (info, warn, error, success) and msg. Lines are written by the agent’s handlers, never raw program output. The log is kept after the command ends and is shown in the console in a terminal-style window.
Security
- Commands reach a node only over its own authenticated channel; an agent cannot read or change another node’s commands.
- The agent checks that the command is for its own node, that the type is allowlisted and that the payload validates.
- Results never carry host paths or secrets: file names only, signed URLs reduced to scheme, host and path, and the data directory shown as
<data-dir>. - Neither side logs credentials, payloads or results.