Commit graph

229 commits

Author SHA1 Message Date
7d239053ed fix(rc): make colibri_daemon script live-copy safe (Sam & Codex)
Make the FreeBSD rc.d source safe to copy directly onto the live USB: avoid rc.subr's *_program command override, avoid double privilege drop via daemon(8) -u, and keep pid/socket chmod fixes in the source script.\n\nChecks: sh -n packaging/freebsd/colibri_daemon.in; git diff --check.
2026-06-14 22:08:54 +02:00
4e1437ae9d feat: wire cost mode enforcement + poll_tasks spawn path (#71)
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 17:25:51 +02:00
Sam & Claude
9d443a498c feat: wire cost mode enforcement + poll_tasks spawn path (Sam & Hermes)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
Priority 3 — Cost mode enforcement:
- Removed session_max_bytes/max_uncompacted_turns from DaemonConfig; cost
  mode string is now the single source of truth for all thresholds
- maybe_compact_or_rollover() derives thresholds from CostMode, not static
  config fields
- compact_oldest_turns() takes a keep parameter (derived from cost mode)
- compact_tool_result() wired into build_prompt_messages() — tool results
  are truncated when cost mode says to compact
- trim_to_budget() called in build_prompt_assembly()
- auto_escalate() wired into session_rotation() — escalates cost mode
  when compaction is insufficient
- set-cost-mode socket command now updates runtime cost_mode (RwLock on
  DaemonState) instead of just acknowledging

Priority 2 — Pi spawn path end-to-end:
- poll_tasks() now queries claimed tasks, spawns the configured agent
  binary (COLIBRI_AGENT_BINARY), creates a session, wires stdout to
  glasspane, and transitions the task to Started
- stream_agent_stdout_to_glasspane made pub for cross-module access
- poll_tasks called from scheduler_tick_fn after the scheduler runs
- New integration test: poll_tasks_spawns_agent_for_claimed_task validates
  the full path: create task → claim → poll_tasks spawns → glasspane
  observes Idle → Working → Blocked → Done lifecycle

Gates: fmt/clippy/test all green (207 tests, 0 failures).
2026-06-14 17:25:11 +02:00
7e7915c829 docs(agents): list active handoffs for the FreeBSD agent (#70)
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 15:52:56 +02:00
2e23e4c409 docs(handoff): pin exact zot build command + artifact path (#69)
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 15:45:57 +02:00
8a137ee8cd docs: FreeBSD build-lane handoff for Codex (ISO Gate 1 runtime proof) (#68)
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 15:29:09 +02:00
0dfb57acac docs: add Hermes rc.d service to ISO Priority 1 FreeBSD validation (#67)
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 15:24:21 +02:00
9593348df7 Test staged-env shell-quoting helpers; rescope ISO priority 1 to boot validation (#66)
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 15:07:47 +02:00
a8b2a89e7c docs: purge all Herdr references, consolidate into AGENTS.md + README (#64)
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 14:05:17 +02:00
Sam & Claude
7abe8c4d4c docs: purge all Herdr references, consolidate into AGENTS.md + README (Sam & Hermes)
Some checks failed
CI / markdown (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
Deleted 8 stale docs (~1,700 lines) and merged their essential intent into
AGENTS.md and README.md:

Merged into AGENTS.md:
- Architecture Roles section (zot=agent, Colibri=control plane, pi=backend)
- ISO Takeover Gates table (Gates 1-5 with status)

Merged into README.md:
- glasspane row names zot/pi (not just Pi)
- architecture diagram names zot/pi JSONL
- removed Herdr dependency reference

Deleted (content merged or obsolete):
- docs/HERDR-VS-COLIBRI-GRAPH.md (migration artifact)
- docs/ADR-agent-harness-consolidation.md (merged into AGENTS.md)
- docs/COLIBRI-GLASSPANE-DESIGN.md (merged into README, rest in code)
- docs/COLIBRI-DAEMON-GLASSPANE-INTEGRATION.md (code is source of truth)
- docs/MULTIAGENT-WORKFLOW-IMPROVEMENTS.md (already in AGENTS.md)
- docs/T1.4-PROMPT-DISCIPLINE-PLAN.md (gaps tracked in priority handoff #3)
- docs/ISO-INTEGRATION-PLAN.md (gates merged into AGENTS.md)
- .hermes/plans/2026-05-27-colibri-cutover.md (old plan, superseded)

Also cleaned Herdr references from Rust doc comments in
colibri-glasspane/src/lib.rs and colibri-client/src/lib.rs.

Result: 18 docs → 11 docs, 66 Herdr references → 0.
Gates: fmt/clippy/test all green.
2026-06-14 14:04:49 +02:00
3d5a26776a Merge pull request 'docs: tidy formatting, add docs index, and refresh README status line' (#63) from docs/polish-formatting-index-status into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
Reviewed-on: #63
2026-06-14 13:36:45 +02:00
Sam & Claude
7853e5a2be docs: tidy formatting, add docs index, and refresh README status line
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
2026-06-14 13:35:37 +02:00
a330406bab docs: priority handoff — ISO staging, Pi spawn, cost mode enforcement (#62)
Some checks are pending
CI / markdown (push) Waiting to run
CI / rust (push) Waiting to run
2026-06-14 12:57:29 +02:00
Sam & Claude
a6f1a8b4f5 docs: priority handoff — ISO staging, Pi spawn, cost mode enforcement (Sam & Hermes)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
2026-06-14 12:57:02 +02:00
b6d0b82452 Merge pull request 'docs: stop hand-maintaining the workspace crate count' (#61) from docs/drop-hardcoded-crate-count into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 12:45:00 +02:00
Sam & Claude
f8a0aff88d docs: stop hand-maintaining the workspace crate count
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
The count drifted repeatedly (8/10/11/12, plus README-vs-AGENTS mismatches)
because it was hardcoded in three places. Drop the number from README (status +
heading) and AGENTS; the crate table + Cargo.toml members are the source of
truth, so adding/removing a crate only touches the table.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 12:44:53 +02:00
d490cedb55 docs: fix crate count (12 incl root) + add jail mention to spawner (Sam & Hermes) (#60)
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 12:37:25 +02:00
Sam & Claude
ba041e61a5 docs: fix crate count (12 incl root) + add jail mention to spawner (Sam & Hermes)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
2026-06-14 12:37:02 +02:00
cce15a3b7a Merge pull request 'fix(import): treat each SKILL.md as one skill' (#59) from fix/import-skill-md into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 02:08:20 +02:00
Sam & Claude
a56c33c30d fix(import): treat each SKILL.md as one skill (not every .md)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
The layered-soul skills importer globbed skills/**/*.md, pulling references/ and
templates/ in as separate skills. Import each skills/**/SKILL.md instead
(frontmatter name/description, category 'soul'); supporting files are not skills.
Verified against the populated layered-soul: 9 skills imported, idempotent,
curated memory deferred. Doc updated to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 02:08:12 +02:00
b3f3e3913f Merge pull request 'docs: jail root_path + staged env payloads' (#58) from docs/land-staged-env-docs into main
Some checks are pending
CI / markdown (push) Waiting to run
CI / rust (push) Waiting to run
2026-06-14 01:38:37 +02:00
Sam & Claude
5fe0848707 docs: document jail root_path + staged env payloads
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
Match the docs to the shipped staged-env code: add the JailConfig root_path
field, a 'Staged env payloads' section (prepare_spawn_command writes env.sh/
launch.sh under /var/run/colibri-stage/<id>/), resolve the mdo-env-passthrough
open item, and add root_path to the external-MCP example.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 01:38:30 +02:00
83abd586c3 Merge pull request 'feat(daemon): headroom compression sidecar (hardened)' (#57) from fix/headroom-sidecar-quality into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 01:35:53 +02:00
34929a6a53 fix(headroom): harden sidecar protocol and timeout (Sam & Codex)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
Keep the Python sidecar connection open for multiple newline-delimited requests, add daemon-side request timeout/fallback tests, and document the opt-in Headroom sidecar contract.\n\nChecks: ./scripts/check-format.sh; cargo fmt --check; python3 -m py_compile scripts/headroom-sidecar.py; git diff --check; cargo test -p colibri-daemon cost -- --nocapture; cargo test -p colibri-daemon session:: -- --nocapture; cargo test -p colibri-daemon --all-targets; cargo check -p colibri-daemon; manual sidecar two-request smoke using a headroom-capable Python env.
2026-06-14 01:30:45 +02:00
c406a44d94 Merge pull request 'fix(spawner): unbreak clippy gate (too_many_arguments)' (#56) from fix/clippy-too-many-args into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 01:30:39 +02:00
Sam & Claude
0b364ac36d fix(spawner): allow too_many_arguments on prepare_spawn_command
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
Unbreaks the workspace clippy gate: prepare_spawn_command has 8 args (8/7), so
clippy::too_many_arguments fails under -D warnings on main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 01:30:31 +02:00
edc1a5cdbf feat(daemon): headroom-ai compression sidecar for tool results
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
- scripts/headroom-sidecar.py: Unix socket server (from headroom import compress)
- cost.rs: HeadroomSidecar struct with connect/compress methods
- session.rs: build_prompt_messages() now accepts optional sidecar
- daemon.rs: spawns sidecar on startup if COLIBRI_HEADROOM_ENABLED=true
- config.rs: headroom_enabled + headroom_socket_path config fields
- socket.rs: cmd_status reports headroom status, cmd_get_session uses sidecar
- All test fixtures updated with new DaemonConfig fields

40-50% token savings on tool outputs with zero accuracy loss.
Disabled by default (COLIBRI_HEADROOM_ENABLED=false).
Works identically on Linux and FreeBSD.
2026-06-14 01:15:52 +02:00
5d7536101f Merge pull request 'docs: tidy clawdie handoff (hardening applied)' (#54) from docs/handoff-tidy into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 00:50:05 +02:00
Sam & Claude
cee02cc052 docs: tidy clawdie handoff — reflect hardening applied (PR #53)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
The findings were merged; reword from 'filed in branch for review' to 'applied
(PR #53)'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 00:49:52 +02:00
7fcac32155 Merge pull request 'fix/clawdie-installer-freebsd-hardening' (#53) from fix/clawdie-installer-freebsd-hardening into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
Reviewed-on: #53
2026-06-14 00:46:11 +02:00
df73740e59 docs: record FreeBSD clawdie installer findings (Sam & Codex)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
Add real FreeBSD 15 read-only validation output and the hardening findings so Linux-side reviewers can evaluate the installer follow-up without needing host access.\n\nChecks: ./scripts/check-format.sh; git diff --check
2026-06-14 00:45:02 +02:00
4abc2c5294 fix(clawdie): harden FreeBSD installer plan (Sam & Codex)
Use the clawdie service user in the generated FreeBSD rc.d script, chown state directories after the user is created, and reject unknown existing ZFS pools before rendering/applying a plan. Update the FreeBSD validation handoff to cover these checks.\n\nFreeBSD checks: cargo fmt --check; ./scripts/check-format.sh; git diff --check; cargo test -p clawdie -- --nocapture; cargo clippy -p clawdie --all-targets -- -D warnings; cargo build -p clawdie --release; target/release/clawdie discover; target/release/clawdie plan; target/release/clawdie apply --pool zroot (dry-run); target/release/clawdie plan --pool does-not-exist (expected error).
2026-06-14 00:42:43 +02:00
2cdefc00a0 Merge pull request 'docs: FreeBSD validation handoff for the clawdie installer' (#52) from docs/clawdie-installer-handoff into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 00:35:09 +02:00
Sam & Claude
f7942c61d1 docs: FreeBSD validation handoff for the clawdie installer
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
Codex validates the disk-touching + service-install paths (zfs/zpool create,
pw/rc.d service) that can't be exercised off-host. Includes read-only checks,
destructive provisioning steps for a scratch pool, teardown, and acceptance
criteria.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 00:35:01 +02:00
341a594ead Merge pull request 'feat(clawdie): ZFS-aware storage strategy + optional pool creation' (#51) from feat/clawdie-zfs-strategy into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-14 00:32:30 +02:00
Sam & Claude
325951be5c feat(clawdie): ZFS-aware storage strategy + optional pool creation
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
clawdie chooses storage per host:
- FreeBSD: ZFS required (datasets under the pool)
- Linux with ZFS + a pool: datasets under the pool
- Linux without ZFS: plain-dir fallback, reporting ZFS benefits + spare disks
- --create-pool /dev/DEV runs `zpool create` (needs --pool NAME)

Pool creation is destructive and guarded: refused unless the disk is detected
empty (no partitions/filesystem/mount, not the root disk) or --force is given,
and only with --yes. `discover` lists block devices with candidacy. New
disk-candidacy parser + storage resolver are unit-tested (13 tests).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 00:32:21 +02:00
4f03f24a34 Merge pull request 'docs: note clawdie installer as deployed-system prototype, not live USB (Sam & Claude)' (#50) from docs/clawdie-installer-iso-note into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-13 23:41:58 +02:00
Sam & Claude
b41846643b docs: note clawdie installer as deployed-system prototype, not live USB (Sam & Claude)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
The clawdie crate (PR #46) is a ZFS layout + service installer for
disk-installed systems. The live USB uses colibri-daemon directly.
2026-06-13 23:41:36 +02:00
70b6ddf846 Merge pull request 'fix(spawner): stage jailed env payloads (Sam & Codex)' (#49) from fix/jail-staged-env-main into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
Reviewed-on: #49
2026-06-13 23:32:50 +02:00
56c405904d fix(spawner): stage jailed env payloads (Sam & Codex)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
Replace inherited env delivery for jailed agent and external MCP spawns with staged launcher/env files under the jail-visible root. Add JailConfig.root_path for named jails that need staged payload delivery.

Tests: pass — cargo fmt --all; cargo test -p colibri-daemon jail_tests -- --nocapture; cargo test -p colibri-mcp -- --nocapture
2026-06-13 23:28:19 +02:00
d83455ff98 Merge pull request 'fix: refresh workspace lockfile and AGENTS formatting (Sam & Codex)' (#47) from fix/format-agents-main into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-13 23:27:08 +02:00
9bd605fc56 fix: refresh workspace lockfile and AGENTS formatting (Sam & Codex)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
Adds the restored clawdie installer crate to Cargo.lock and formats AGENTS.md so the repository markdown gate passes after the latest main merges.\n\nChecks: ./scripts/check-format.sh; cargo fmt --check; git diff --check; cargo test -p clawdie --all-targets; cargo test -p colibri-mcp --all-targets; cargo metadata --locked --no-deps --format-version 1
2026-06-13 23:24:26 +02:00
03ff924aa2 Merge pull request 'feat(clawdie): host installer/deployer crate (FreeBSD + Linux)' (#46) from feat/clawdie-installer into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-13 22:56:39 +02:00
ebff77b326 docs: list clawdie in the workspace crate tables
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 22:56:31 +02:00
Sam & Claude
c902f75813 feat(clawdie): host installer/deployer crate (FreeBSD + Linux)
New crates/clawdie binary. Discovers a host's ZFS layout and provisions the
clawdie service, cross-platform via a Platform backend (FreeBSD rc.d + native
ZFS; Linux systemd + ZFS-on-Linux).

- discover: read-only OS + pool/dataset inspection
- plan: render the ZFS layout + service-install steps (dry-run)
- apply: executes the plan, and only with --yes (dry-run otherwise)

apply writes to disk only with --yes. Discovery + plan logic is unit-tested (7);
the disk-touching path must be validated on real hosts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 22:55:23 +02:00
900874c847 Merge pull request 'docs: sync AGENTS.md + stale doc references to current codebase (Sam & Claude)' (#45) from docs/sync-agents-and-stale-refs into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-13 22:29:01 +02:00
Sam & Claude
7eec5a2533 docs: sync AGENTS.md + stale doc references to current codebase (Sam & Claude)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
AGENTS.md:
- Crate table: add colibri-store, colibri-skills, colibri-mcp (was 8, now 11)
- Remove stale 'Next planned crate' section (skills + mcp both scaffolded)
- Add Jail Confinement + Skills/External MCP sections
- Fix doc/ -> docs/ paths
- Replace stale Herdr remote smoke ref with external MCP doc

ISO-INTEGRATION-PLAN.md:
- Jail status: MISSING -> READY (shipped PRs #35/#37/#39)
- Pi jail workers: 'design only' -> 'shipped'

CLAWDIE-STUDIO-PROPOSAL.md:
- colibri-harness -> colibri-glasspane-tui (correct crate name)
- colibri-mcp: remove 'NEW' marker (exists + has external host)
- colibri-skills: remove 'future' marker

T1.4-PROMPT-DISCIPLINE-PLAN.md:
- colibri-skills: 'parked on feature branch' -> 'scaffolded workspace member'

MULTIAGENT-WORKFLOW-IMPROVEMENTS.md:
- Fix doc/ -> docs/ paths
2026-06-13 22:28:30 +02:00
23aef71fc9 Merge pull request 'feat: import Layered Soul skills into Colibri' (#44) from feat/layered-soul-import into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-13 22:14:26 +02:00
Sam & Claude
252c282298 feat: import Layered Soul skills into Colibri (+ integration doc)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
Wires clawdie/layered-soul (the portable identity/context source) into Colibri.
scripts/import-layered-soul.sh reads its reviewed skills/**/*.md into the existing
`skills` catalog (mirrors import-clawdie-skills.sh; idempotent, frontmatter
name/description, category from the skill's parent dir).

Honest scope: only skills are wired. The adapter's "Layered Memory Fabric"
(system_brain / system_ops + a richer system_skills) is design-only
(COLIBRI-SKILLS-PLAN.md), so curated memory is reported-but-not-imported and the
gap is documented in docs/INTEGRATION-LAYERED-SOUL.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 22:14:14 +02:00
6a72befbb4 Merge pull request 'docs: rewrite ADR + jail-spawn design to match shipped code' (#43) from docs/decisions-match-code into main
Some checks are pending
CI / rust (push) Waiting to run
CI / markdown (push) Waiting to run
2026-06-13 21:56:25 +02:00