feat(daemon): auto-spawn a Pi agent on startup (Operator Image OOTB) #137
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "autospawn-pi-on-boot"
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?
Workstream B of the next ISO rebuild plan: the live "Operator Image" should boot with at least one Pi instance live on the Colibri board, no operator action required.
On startup, after the control-plane socket is up, the daemon spawns one DeepSeek-backed Pi when configured. Host-spawn (no jail) — the live image is single-agent, so jails (and their overhead) stay for deployed multi-tenant hosts. The Pi inherits
DEEPSEEK_API_KEYfrom the daemon env (sourced fromprovider.envby the rc.d service).Behavior
COLIBRI_AUTOSPAWN_PI(YES/1/true/on); no-op otherwise.DEEPSEEK_API_KEY; logs + skips if absent (operator adds it via Join Hive → the daemon restart then spawns it).service colibri_daemon restartdoesn't stack duplicates.COLIBRI_PI_BINARYdefaultpi,COLIBRI_AUTOSPAWN_PI_ARGSdefault--mode json) so the exact Pi invocation can be finalized on the FreeBSD image without a rebuild.Design note: reuses
cmd_spawn_agent, so glasspane attach, stdout JSONL streaming, and board registration are identical to an operator-issued spawn — no duplicated spawn logic.Verified: unit tests for the pure helpers (
basename,env_truthy); fullcolibri-daemonsuite green (83 + integration);clippyclean.For Hermes on osa: the one thing that needs real-host confirmation is the default
COLIBRI_AUTOSPAWN_PI_ARGS— i.e. the exact Pi CLI invocation that starts a persistent JSON-mode instance (vs a one-shot). The Rust side is correct and tunable via env; if--mode jsonalone exits immediately, set the right args in the ISOrc.conf(no recompile). The ISO-siderc.confdefaults (COLIBRI_AUTOSPAWN_PI=YESetc.) land in Workstream A/C.🤖 Generated with Claude Code