Commit graph

21 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
27d9db44a0
feat(03-01): add SANDBOX.md generation and CLAUDE.md import check 2026-04-09 21:18:10 +02:00
b035f82cc7
feat(02-02): add confirmation prompt with TTY detection 2026-04-09 17:21:37 +02:00
1c986d22b8
feat(02-02): add env audit display with masking and grouped sections 2026-04-09 17:20:58 +02:00
7001303436
feat(02-01): add --check mode for prerequisite verification 2026-04-09 17:13:18 +02:00
1eddd9336d
feat(02-01): add --dry-run mode that prints full bwrap command and exits 2026-04-09 17:13:17 +02:00
72ba48d004
feat(02-01): refactor flag parsing to while/shift with CLAUDE_ARGS accumulator 2026-04-09 17:13:17 +02:00
613d015cc1
fix: SHELL path, PATH isolation, --shell flag, nix-claude-code input
- Resolve SHELL to nix store bash path (was /bin/bash which doesn't exist in sandbox)
- Inject clean SANDBOX_PATH via makeBinPath (was leaking entire host PATH)
- Add --shell flag to drop into sandboxed bash for manual verification
- Use nix-claude-code flake for claude-code binary instead of host PATH discovery

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 14:59:43 +02:00
9296453be3
fix(01-02): resolve claude and env paths through symlinks
readlink -f ensures CLAUDE_BIN and env point to real nix store
paths accessible inside the bwrap sandbox.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 11:14:50 +02:00
51dba047f3
feat(01-01): add claudebox.sh with bwrap sandbox, env allowlist, and secret hiding 2026-04-09 11:11:44 +02:00