Commit graph

96 commits

Author SHA1 Message Date
61f9ea78b0 docs(quick-260505-le7): Add harness config file support to claudebox 2026-05-05 15:34:33 +00:00
fbbb35577e feat(260505-le7): add config file globals, CLI flags, load_config_file, HARNESS_BIN resolution 2026-05-05 15:31:11 +00:00
9651ce759d docs(quick-260504-bw4): Add SSH support to claudebox 2026-05-04 08:41:52 +00:00
b2aeb2fd12 docs(260504-bw4): document SSH support in README 2026-05-04 08:39:57 +00:00
e9154fd691 feat(260504-bw4): make SANDBOX.md conditional on SSH activation 2026-05-04 08:39:30 +00:00
41ebf10458 feat(260504-bw4): add --with-ssh and --ssh-key flags to claudebox 2026-05-04 08:38:45 +00:00
29996a2d40
fix: resolve SSL cert symlinks before entering sandbox
On NixOS /etc/ssl/certs/ca-certificates.crt points through /etc/static
which is not mounted. Resolve to the actual /nix/store path first.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 18:25:07 +02:00
aff389b9d4
feat: env files and fix NixOS SSL cert passthrough
- ~/.claudebox/env and <project>/.claudebox.env loaded at launch
- NIX_SSL_CERT_FILE passed from host instead of hardcoded path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 18:11:56 +02:00
c97006e18e feat: per-project instance isolation (phase 05)
- Rewrite mount architecture: direct ~/.claude bind replaces old ~/.claudebox symlink
- Per-project ~/.claude/projects/ isolation via SHA-256[:16] of canonical git root
- Worktree-aware canonical root resolution (git rev-parse --git-common-dir)
- --gc flag to remove stale instance dirs
- /bin/sh symlink fix for git hooks
- Auth credentials moved to ~/.claudebox/.credentials.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 10:07:14 +00:00
648f89459f docs: update README for phase 05 architecture
- Remove ANTHROPIC_API_KEY from requirements (OAuth auth works without it)
- Add --gc flag to flags table
- Rewrite "How it works" to reflect direct ~/.claude bind + per-project overlay architecture
- Drop stale symlink/CLAUDE.md references

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 10:06:52 +00:00
dc3674c2fc docs(phase-05): add security threat verification 2026-04-16 10:05:38 +00:00
4af459c4a8 test(05): complete UAT - 8 passed, 0 issues 2026-04-16 10:04:27 +00:00
7d9c30d52f docs(05-02): complete GC flag plan — --gc flag, gc_instances, integration test 2026-04-13 10:03:25 +00:00
ce2bd0fcd7 test(05-02): add GC integration test covering stale removal, valid preservation, empty-dir safety
- Test 1: stale instance dir (project root gone) is removed
- Test 2: valid instance dir (project root exists) is preserved
- Test 3: empty projects/ dir produces GC complete: 0 instance(s) removed.
- Inline gc_instances definition for isolated testing (sed not in PATH)
- Canary check verifies gc_instances exists in claudebox.sh
2026-04-13 10:02:31 +00:00
3f1959344f feat(05-02): add --gc flag and gc_instances function
- Add GC_MODE=false variable and --gc) case to flag parsing
- Define gc_instances() before --check block (callable before ANSI init)
- Add GC dispatch block after --check, before ANSI formatting (early exit)
- gc_instances iterates ~/.claudebox/projects/*/project-root, removes dirs
  whose recorded root path no longer exists on disk
- Prints each removal and summary count to stderr (D-11, D-12, INST-04)
2026-04-13 10:01:24 +00:00
4751161e0f chore: merge executor worktree (phase 05-01)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 09:58:14 +00:00
071ccc92ac docs(05-01): create execution summary 2026-04-13 09:57:38 +00:00
4baf576810 fix: add /bin/sh symlink to sandbox so hooks can exec sh
Claude Code hooks invoke /bin/sh which doesn't exist in the bwrap
sandbox. Symlink bash to /bin/sh alongside the existing /usr/bin/env
symlink so all hook-based tooling (GSD statusline, project hooks)
works correctly inside claudebox.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 09:55:40 +00:00
6eb3b464f5 feat(05-01): register INST-01 through INST-04 requirements
- Add Instance Isolation section after Authentication Passthrough
- INST-01: per-project isolated conversation history (no cross-contamination)
- INST-02: git worktrees share instance state via --git-common-dir
- INST-03: concurrent sessions safe (Claude Code manages own concurrency, D-13)
- INST-04: --gc removes stale instance dirs for missing project roots
- Add traceability rows mapping INST-01..04 to Phase 5
- Update coverage count from 2 to 6 v2 requirements
2026-04-13 09:01:22 +00:00
c5e8cca867 feat(05-01): rewrite mount architecture with per-project instance isolation
- Replace --bind ~/.claudebox + --symlink with direct --bind ~/.claude ~/.claude
- Add compute_canonical_root() function using git rev-parse --git-common-dir
- Add per-project INSTANCE_DIR via sha256sum[:16] of canonical git root
- Overlay projects/ with per-project hash dir for isolated conversation history
- Overlay history.jsonl and SANDBOX.md as file-level bind mounts
- Update credential mount target from ~/.claudebox to ~/.claude
- Add CLAUDE_JSON_FILE (~/.claude.json) detection and conditional bind mount
- Remove stale CLAUDE.md injection logic (D-06: user's real CLAUDE.md used)
- Update dry-run block and print_audit to reflect new mount layout
- Update SANDBOX.md heredoc to remove ~/.claudebox reference
2026-04-13 09:00:53 +00:00
8e5063a29d fix(05): revise plans based on checker feedback 2026-04-13 08:52:28 +00:00
dd064aa858 docs(05): create phase plan — mount rewrite + per-project isolation + GC 2026-04-13 08:47:04 +00:00
a040aaa58a docs(05): research phase domain — per-project instance isolation 2026-04-13 08:41:04 +00:00
597cb0588b docs(state): record phase 5 context session 2026-04-10 16:23:27 +00:00
af9f1848eb docs(05): capture phase context (assumptions mode) 2026-04-10 16:23:13 +00:00
ee70f08909 fix(planning): restore v2.0 state after executor regression in 6465da8
Commit 6465da8 (phase 04-01 executor) was made from a stale worktree
predating v1.0 completion (ee686a3), accidentally reverting:
  - ROADMAP.md from v2.0 (phases 4-7) back to pre-v1.0 structure
  - STATE.md from milestone v2.0/active back to v1.0/executing
  - Deleted .planning/milestones/ (v1.0 archive files)

This commit restores the correct state:
  - ROADMAP.md: v2.0 structure with v1.0 archived + phase 04 marked complete
  - STATE.md: milestone v2.0, phase 04 complete (1/4 phases, 25%)
  - milestones/: v1.0-ROADMAP.md + v1.0-REQUIREMENTS.md restored
  - MILESTONES.md + RETROSPECTIVE.md: restored from v1.0 completion
  - phases/01-03/: staged deletions of v1.0 phase artifacts (cleaned up)
  - v1.0-MILESTONE-AUDIT.md: audit report documenting the corruption

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 12:44:41 +00:00
d106d1be5c fix: replace tilde with \$HOME in printf label (SC2088)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 12:26:35 +00:00
f40959c74f docs(phase-04): complete phase execution — credential passthrough + audit redesign 2026-04-10 09:33:55 +00:00
aa3c57a417 docs(04): add phase verification — all must-haves passed 2026-04-10 09:33:46 +00:00
de4549c3f2 fix(04): revert credentials to read-write mount per plan D-02; add AUTH-01/AUTH-02 to requirements 2026-04-10 09:32:14 +00:00
390812625d docs(04): add code review fix report 2026-04-10 09:28:11 +00:00
0922b752a5 fix(04): WR-02 add stride-3 guard and safe arithmetic in dry-run ENV_ARGS loop 2026-04-10 09:27:39 +00:00
adb9dd117d fix(04): CR-01 CR-02 WR-01 fix credential path and use read-only bind mount 2026-04-10 09:27:18 +00:00
112f604856 docs(04): add code review report 2026-04-10 09:25:49 +00:00
20fbd3f7d3 docs(04-01): complete credential mount and audit redesign plan
- Add 04-01-SUMMARY.md with task details, decisions, deviations, threat flags
2026-04-10 09:22:02 +00:00
def8e67126 feat(04-01): rewrite print_audit to unified env list with Mounts and Network sections
- Replace three-section audit with single unified list using [~]/[>]/[+] prefixes
- [~] green = sandbox-generated, [>] yellow = host allowlisted, [+] cyan = extra
- Prefixes are readable without color (accessibility requirement)
- PATH retains multiline indented display
- Add Mounts section: CWD, ~/.claude, and conditional credentials bind
- Add Network section: 'full (host network)' as Phase 6 placeholder
- All output to stderr, mask_value called for all env var values
2026-04-10 09:21:15 +00:00
6465da8583 feat(04-01): add credential file mount for OAuth passthrough
- Add CREDS_FILE/CREDS_MOUNT detection after mkdir ~/.claudebox
- Conditional --bind in exec bwrap via BWRAP_ARGS array
- Mirror conditional bind in --dry-run display block
- Read-write mount (not ro-bind) for OAuth token refresh
- Silent skip when credentials file absent (no error/warning)
- Refactor exec bwrap to BWRAP_ARGS array for conditional mount support
2026-04-10 09:20:18 +00:00
40e40e3f30 docs(04): create phase 4 plan — credential mount and audit redesign
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 09:11:05 +00:00
41bd51ed42 docs(04): capture phase context and discussion log 2026-04-10 09:06:17 +00:00
4852696b95 docs: create milestone v2.0 roadmap (4 phases) 2026-04-10 08:56:58 +00:00
7d4bf28c07 docs: define milestone v2.0 requirements 2026-04-10 08:52:20 +00:00
b2ece43a03 docs: complete v2.0 project research 2026-04-10 08:45:25 +00:00
3dfcb40e31 docs: start milestone v2.0 Network Isolation & Profiles 2026-04-10 08:30:13 +00:00
ee686a36eb chore: complete v1.0 MVP milestone
Archive milestone artifacts, evolve PROJECT.md, reorganize ROADMAP.md,
write retrospective. Requirements archived to milestones/v1.0-REQUIREMENTS.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 08:05:53 +00:00
778216ead9
docs(quick-260410-d4u): on non-nixos hosts, bwrap fails because /etc/static does not exist
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 09:46:51 +02:00
97c10f8fd4
fix(260410-d4u): conditionally mount /etc/static only on NixOS
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 09:29:11 +02:00
1ccaf20eb4
docs: fix remote URL and add flake usage to README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 22:04:41 +02:00
7430e9d64c
docs: add README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 22:03:20 +02:00
e4d47b997b
docs: plant seed — mount real ~/.claude instead of separate ~/.claudebox 2026-04-09 21:52:27 +02:00
e43d33602d
fix: symlink ~/.claude to ~/.claudebox instead of renaming mount
Both paths now resolve inside the sandbox, so hook paths
and settings referencing ~/.claude work without fixups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 21:44:54 +02:00