Cross-platform Rust control plane core
Find a file
Sam & Claude 0e9b16456b
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
CI / port (pull_request) Has been cancelled
CI / agent-jail-pkgs (pull_request) Has been cancelled
feat(daemon): zot-rpc spawn driver + binary-aware autospawn args (colibri#143)
The spawner spawned every agent with stdin(Stdio::null()) and read stdout
only, so it could only host self-driving emitters (pi --mode json). zot's
only structured persistent mode is `zot rpc`, which is a request/response
peer that blocks on stdin — so it could never autospawn. Worse, 0.12.0
defaulted COLIBRI_AUTOSPAWN_BINARY=zot while args defaulted to --mode json,
which is not a zot flag, so the OOTB image would spawn a broken/no agent.

Add a stdin RPC driver:
- AgentSpawnConfig.rpc_stdin: when set, the spawner pipes stdin and keeps the
  writer; otherwise stdin stays null (unchanged path for pi).
- cmd_spawn_agent auto-detects rpc mode from argv (`rpc`/`--rpc`).
- AgentHandle gains a cloneable RpcSender (Arc-backed) so prompts can be sent
  without holding the agent-registry lock across the async write.
  build_rpc_prompt emits zot's wire format: {"id","type":"prompt","message"}.
- Autospawn picks default argv per harness: zot -> `rpc`, pi -> `--mode json`
  (corrects the invalid --mode-json-for-zot default), and optionally sends a
  one-time bootstrap prompt when COLIBRI_AUTOSPAWN_RPC_PROMPT is set (default
  boot spends no tokens). Log strings de-pi-fied (autospawn-pi -> autospawn).

Tests: build_rpc_prompt framing + escaping, rpc_stdin default, sender presence
by mode. Full workspace: 250 tests, 0 failures. Live zot rpc smoke pending
(wire format matches docs/ZOT-RPC-TRANSCRIPT.md real-key capture).

Stacks on the 0.12.0 compile/lock fix (PR #156).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 17:45:18 +02:00
.forgejo/workflows chore(jails): CI guard for agent-jail package drift vs clawdie-iso 2026-06-20 22:39:34 +02:00
crates feat(daemon): zot-rpc spawn driver + binary-aware autospawn args (colibri#143) 2026-06-23 17:45:18 +02:00
docs fix(glasspane): skip duplicate zot tool_call events (Sam & Pi) 2026-06-22 06:01:48 +02:00
manifests Add USB live runtime inventory golden test 2026-06-04 12:46:34 +00:00
packaging feat: strut constraint + construction layers for dome MCP 2026-06-23 14:05:46 +02:00
scripts feat(backup): domedog-side pull script for Forgejo+Vault (off-box independence) 2026-06-20 10:52:26 +02:00
src Auto-load .env for the DeepSeek probe; gitignore .env (Sam & Claude) 2026-05-26 14:27:41 +02:00
tests feat(rc): rename test agent and load provider env (Sam & Codex) 2026-06-15 07:35:44 +02:00
.env.example Auto-load .env for the DeepSeek probe; gitignore .env (Sam & Claude) 2026-05-26 14:27:41 +02:00
.gitignore Auto-load .env for the DeepSeek probe; gitignore .env (Sam & Claude) 2026-05-26 14:27:41 +02:00
.prettierignore chore: adopt markdown formatting gate + one-shot prettier sweep (Sam & Claude) 2026-06-04 20:13:47 +02:00
.prettierrc chore: adopt markdown formatting gate + one-shot prettier sweep (Sam & Claude) 2026-06-04 20:13:47 +02:00
AGENTS.md docs: proof runbook → clean CLI + sweep #126 markdown corruption 2026-06-21 14:46:19 +02:00
Cargo.lock fix: colibri 0.12.0 build — stale pi_binary refs + Cargo.lock sync 2026-06-23 17:29:29 +02:00
Cargo.toml 0.12.0: hw-probe autospawn + model fixes + mother schema 2026-06-23 10:50:05 +02:00
LICENSE release: colibri 0.11.0 + relicense AGPL-3.0 -> MIT 2026-06-20 22:05:47 +02:00
README.md docs: define Clawdie bare-metal service identity (USB dev → ZFS RAID1 deploy) 2026-06-21 14:16:28 +02:00
rust-toolchain.toml Scaffold Colibri Phase 1: colibri-probe DeepSeek cache smoke (Sam & Claude) 2026-05-26 10:08:23 +02:00

Colibri

The Clawdie control plane core — a small, cross-platform (FreeBSD + Linux) Rust daemon. Developed from an operator USB environment; deploys as the Clawdie service on bare FreeBSD hardware (ZFS RAID1, PostgreSQL + pgvector, bhyve VMs, Bastille jails). Unifies coordination (task board, agent registry, skills catalog) with cache-first cost discipline (byte-stable prompt prefixes, cache-hit metering).

Status: workspace gates are fmt/clippy/test/release green. Round 2 audit is closed. Current priorities: ISO boot/runtime validation, Pi spawn end-to-end, and cost-mode enforcement (see docs/PRIORITY-HANDOFF-ISO-SPAWN-COST.md). Always query live state: see the crate table below and run the gate commands for current counts.

FreeBSD build lane handoff: docs/FREEBSD-BUILD-LANE-HANDOFF.md. ISO acceptance runbook: docs/ISO-ACCEPTANCE-RUNBOOK.md. Clawdie Studio/Zed proposal: docs/CLAWDIE-STUDIO-PROPOSAL.md. External MCP host prototype: docs/COLIBRI-EXTERNAL-MCP-PROTOTYPE.md. Optional Headroom compression sidecar: docs/HEADROOM-SIDECAR.md.

Workspace

Crate Role
colibri (root) Workspace root + probe binaries (colibri-probe, runtime-inventory)
colibri-mcp MCP bridge for editor integration (Zed, Claude Code) via stdio JSON-RPC
colibri-contracts JSON schema contracts (golden tests)
colibri-deepseek DeepSeek cache-hit probe, prefix metering
colibri-runtime Host status ingestion, runtime inventory
colibri-glasspane Agent 5-state machine (zot/pi JSONL events → state)
colibri-daemon Always-on Unix socket server, session lifecycle
colibri-client Typed Unix-socket client + operator CLI
colibri-glasspane-tui ratatui live dashboard (FreeBSD-native)
colibri-store Embedded SQLite coordination (task board, agents, skills)
colibri-skills Skills catalog crate
clawdie Host installer/deployer: ZFS layout + clawdie service (FreeBSD/Linux)

Build

cargo build --release

Test

cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings

Architecture

colibri-daemon (always-on Unix socket server)
  ├── glasspane      — agent state machine (zot/pi JSONL → idle/working/blocked/done)
  ├── store          — SQLite coordination (tasks, agents, skills)
  ├── socket         — newline-JSON socket API
  ├── session        — append-only JSONL sessions, 3-region prompt assembly
  └── spawner        — agent subprocess management (retry/backoff, FreeBSD jail confinement)

colibri-client       — CLI tools (colibri, colibri-test-agent)
colibri-glasspane-tui— ratatui dashboard

Probe binaries

# DeepSeek cache probe (needs DEEPSEEK_API_KEY)
cargo run --release --bin colibri-probe

# Runtime inventory manifest
cargo run --release --bin colibri-runtime-inventory

FreeBSD

Target x86_64-unknown-freebsd (Rust Tier-2). TLS uses rustls for clean static linking (no openssl-sys dependency). Default DB path: /var/db/colibri/colibri.sqlite.