feat(spawner): JailConfig + jail_wrap for jailed agent spawn #35
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/spawner-jail-confinement"
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?
Implements the spawner half of docs/COLIBRI-JAILED-AGENT-SPAWN-DESIGN.md so
Colibri can confine a spawned agent (e.g. pi) in a FreeBSD jail. zot untouched.
jail attach/create needs. Resolved from COLIBRI_JAIL_PRIV_MODE (default mdo —
the live-USB posture); deployed hosts set helper. Only consulted when a spawn
requests a jail.
nameenters a persistent jail (jexec,precedence);
pathmakes an ephemeraljail -c command=that self-cleans onexit. Neither set = no-op. (Refines the design's
ephemeralflag into theclearer name-vs-path choice.)
jexec runs without -l so injected COLIBRI_*/provider env is inherited; stdio
flows through mdo/jexec/jail so glasspane ingestion is unchanged.
jail: Option<JailConfig>(#[serde(default)]); spawn()resolves PrivMode/helper once and routes the command through jail_wrap.
follow-up.
Not wired through the SpawnAgent socket command yet (it builds AgentSpawnConfig
with jail=None) — that protocol field is the next small step.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Implements the spawner half of docs/COLIBRI-JAILED-AGENT-SPAWN-DESIGN.md so Colibri can confine a spawned agent (e.g. pi) in a FreeBSD jail. zot untouched. - PrivMode {Mdo, Helper, None}: how the (unprivileged) daemon gets the root that jail attach/create needs. Resolved from COLIBRI_JAIL_PRIV_MODE (default mdo — the live-USB posture); deployed hosts set helper. Only consulted when a spawn requests a jail. - JailConfig {name, path, ip4, user}: `name` enters a persistent jail (jexec, precedence); `path` makes an ephemeral `jail -c command=` that self-cleans on exit. Neither set = no-op. (Refines the design's `ephemeral` flag into the clearer name-vs-path choice.) - jail_wrap(): pure (binary,args)->(program,argv) wrapper. No-op without a jail. jexec runs without -l so injected COLIBRI_*/provider env is inherited; stdio flows through mdo/jexec/jail so glasspane ingestion is unchanged. - AgentSpawnConfig gains `jail: Option<JailConfig>` (#[serde(default)]); spawn() resolves PrivMode/helper once and routes the command through jail_wrap. - kill(): documented jail teardown semantics + the in-jail process-group reaping follow-up. - 7 jail_wrap unit tests. Full daemon lib suite (58) green; clippy -D warnings clean. Not wired through the SpawnAgent socket command yet (it builds AgentSpawnConfig with jail=None) — that protocol field is the next small step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>