Skip to content

[codex] harden Claude one-command setup#73

Draft
oleg-bk wants to merge 7 commits into
mainfrom
codex/p10d14-claude-live-fixes
Draft

[codex] harden Claude one-command setup#73
oleg-bk wants to merge 7 commits into
mainfrom
codex/p10d14-claude-live-fixes

Conversation

@oleg-bk

@oleg-bk oleg-bk commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds and hardens the public Claude Code project-local connector path for agentveil-mcp-proxy.

The public value is intentionally narrow: Claude asks before changing files in a configured project. Native Claude Code mutations are blocked before they run, Claude can retry through the AgentVeil-managed MCP write path, risky writes require approval, and bounded evidence is recorded locally.

What changed

  • Adds setup claude-code --choose-folder --yes for macOS project-folder selection.
  • Keeps setup claude-code --yes for terminal users already inside a project.
  • Uses the selected project as the controlled write root by default.
  • Writes project MCP config using the invoked agentveil-mcp-proxy executable, avoiding stale global installs.
  • Hardens managed Approval Center status checks to use the live approval page rather than a mismatched API probe or PID-only check.
  • Prevents browser spam from opening the bare Approval Center dashboard during setup-managed Claude flows.
  • Updates public Claude connector docs with scoped limits and user-facing wording.

Validation

  • Focused CLI tests: 9 passed
  • Persistent approval center tests: 4 passed
  • git diff --check: clean
  • Package build succeeded into /private/tmp/agentveil-mcp-proxy-dist-cd66f94
  • Live Claude Code path verified locally before PR:
    • native Write blocked;
    • Claude retried through AgentVeil MCP write_file;
    • approval URL appeared;
    • approve + retry wrote config.py;
    • setup status reported protected;
    • evidence showed approved/executed.

Scope / No-overclaim

This PR is a public minimal connector path only. It does not claim host-wide control, all-terminal coverage, claude --bare coverage, manual edit coverage, hosted custody, team policy packs, or private guided remediation.

Product Guard gates

  • Local implementation gate: PASS
  • User-path gate: PASS for the tested Claude Code file-write path
  • Product-value gate: PARTIAL/PASS for minimal public connector value
  • Release-readiness gate: HOLD until CI and version/release decision

oleg-bk added 7 commits June 24, 2026 19:48
Add a bounded Claude Code PreToolUse adapter over the existing policy and evidence vocabulary. The adapter denies unknown shell composition and records digest-only workspace metadata while leaving installer and approval UX for later slices.

Implemented with assistance from Codex.
Add project-local Claude Code hook install, status, and uninstall commands over the S1 hook adapter. The setup path preserves unrelated settings, reports advisory/protected status without stale evidence overclaim, and keeps native deny output actionable with a generic redirect instruction.

Implemented with assistance from Codex.
Allow Claude PreToolUse calls to the AgentVeil MCP server through to the proxy approval boundary instead of double-blocking the controlled route. Native mutations and non-AgentVeil MCP servers remain governed by the hook.

Implemented with assistance from Codex.
Document the G4 payload-drift diagnosis with tests: changed content keeps the same resource but changes payload hash, exact retries stay stable for identical payloads, and similar grants remain payload-agnostic. This rejects a broad similar-scope fix for filesystem writes without changing approval behavior.

Implemented with assistance from Codex.
Add public-safe Claude Code connector scope documentation with current lower-level setup, target one-command UX, bounded evidence language, and explicit project-local limitations.

Implemented with assistance from Codex.
Add setup claude-code orchestration over proxy init, Claude MCP route setup, project hook install, and managed local Approval Center lifecycle.

The setup status path reports hook, MCP route, proxy route, and Approval Center state without counting config success as live user-path proof. Remove stops only AgentVeil-managed entries and the managed center.

Implemented with assistance from Codex.
Add macOS folder selection for Claude setup, keep controlled writes rooted in the selected project by default, and ensure setup-managed approval centers are health-checked through the live approval page without browser spam.

Prefer the invoked agentveil-mcp-proxy executable when writing project MCP config so live tests do not accidentally route through an older global install.

Implemented with assistance from Codex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant