Files
docker-agent/pkg/hooks
David Gageot f07e37335c feat: stage docker-agent kit in sandbox with skills and prompt files
Add support for staging a docker-agent kit (skills and prompt files) in the
sandbox before launch. The kit is built by the host, redacted with portcullis,
and mounted read-only at /agent-kit inside the sandbox. This allows skills and
prompt files to travel with the agent even though the sandbox /Users/dgageot differs
from the host's.

- New pkg/promptfiles: centralizes prompt-file lookup logic (used by both the
  add_prompt_files hook and the kit builder).

- New pkg/sandbox/kit: builds the kit by collecting skills (via skills.Load)
  and per-agent prompt files, storing them in <cache>/sandbox-kits/<hash>/ with
  redaction applied to all text files via portcullis.Redact. Skips files
  already covered by the live workspace mount.

- pkg/skills/local.go: when DOCKER_AGENT_KIT_DIR is set, skill discovery is
  rooted only at the kit's skills directory; host paths are skipped since they
  don't exist inside the sandbox.

- pkg/hooks/builtins/add_prompt_files.go: delegates to promptfiles and prefers
  the kit over $HOME inside the sandbox.

- pkg/sandbox.Backend.Ensure: changed to accept extras []string instead of a
  single extra path, enabling multiple mounts for the kit and config dir.

- cmd/root: builds the kit before sandbox.Ensure, mounts it at /agent-kit,
  forwards DOCKER_AGENT_KIT_DIR env var to the sandbox, and cleans up on exit.
  Added --no-kit and (hidden) --kit-keep flags.

- Tests: added coverage for kit build (redaction, workspace scoping, rebuild
  semantics, helpers) and kit-aware skill/prompt-file resolution. Moved
  existing add_prompt_files tests to pkg/promptfiles.
2026-05-21 13:48:21 +02:00
..
2026-04-29 12:41:57 +00:00
2026-04-29 12:41:57 +00:00