Skip to content

feat(install): vouch install-mcp claude-code --global#532

Merged
plind-junior merged 1 commit into
testfrom
feat/global-install
Jul 20, 2026
Merged

feat(install): vouch install-mcp claude-code --global#532
plind-junior merged 1 commit into
testfrom
feat/global-install

Conversation

@plind-junior

Copy link
Copy Markdown
Member

phase 2 of global vouch — the headline feature: install once, every project gets capture + recall, while the data stays strictly per project.

vouch install-mcp claude-code --global writes the user-level wiring under ~/.claude/ (hooks, /vouch-* commands, a machine-wide-worded CLAUDE.md fence) and registers vouch as a user-scope MCP server (top-level mcpServers in ~/.claude.json). declared by a manifest global: block, so cursor/codex/openclaw follow as pure manifest work. a global install never bootstraps a KB: each session resolves the nearest project .vouch/; a folder without one never captures anywhere — its session opens with a one-line "run vouch init" note from the session-start banner, and vouch serve now starts without a KB on the stdio transport (per-tool-call errors instead of a machine-wide failed server in every non-vouch folder).

coexistence with per-project installs, guarded three ways: the global settings template is byte-for-byte the project one (claude code collapses duplicate hook commands; a sync test freezes the pairing); capture dedups on the event's tool_use_id (exact, window-free — survives drifted wiring); and every hook command (capture observe/answer/finalize/finalize-all/banner, context-hook, recall, ingest-codex) resolves the KB from the hook payload's cwdVOUCH_PROJECT_DIR keeps precedence, and a payload naming a nonexistent cwd refuses capture rather than falling back to the process cwd and landing in the wrong KB.

installer hardening from review: manifest dst containment is now lexical, so a dotfiles-managed symlinked ~/.claude (or CLAUDE.md) is written through instead of aborting; a global target of . is rejected; a regular file squatting ~/.claude is a clean error; a malformed existing settings.json reports as failed (vouch is not wired) instead of "already present".

review: a 24-agent adversarial pass confirmed 18 findings — the biggest being the vouch serve fail-fast that would have shown a permanently failed MCP server in every KB-less folder machine-wide — all fixed and pinned by tests (13 new across install/capture/hooks). full gate green locally: 1550 passed, mypy clean, ruff clean. live-probed in a fake home: global install idempotent; a hook fired from / with only the payload cwd routes into the right project's KB; the same tool_use_id delivered twice records once; a KB-less folder captures nowhere and its banner prints the vouch init hint; vouch serve starts cleanly with no KB.

🤖 Generated with Claude Code

phase 2 of global vouch: install once, every project gets capture and
recall — while the data stays strictly per project.

--global writes the user-level wiring under ~/.claude/ (hooks,
/vouch-* commands, a machine-wide-worded CLAUDE.md fence) and
registers vouch as a user-scope mcp server (top-level mcpServers in
~/.claude.json). declared by a manifest global: block, so other
hosts opt in as pure manifest work. no kb is ever bootstrapped by a
global install: each session resolves the nearest project .vouch/,
and a folder without one never captures anywhere — its session
opens with a one-line "run vouch init" note from the session-start
banner, and vouch serve now starts without a kb on the stdio
transport (per-tool-call errors instead of a machine-wide failed
server in every non-vouch folder).

coexistence with per-project installs is guarded three ways: the
global settings template is byte-for-byte the project one (claude
code collapses duplicate hook commands; a sync test freezes the
pairing), capture dedups on the event's tool_use_id (exact,
window-free), and every hook command (capture observe / answer /
finalize / finalize-all / banner, context-hook, recall,
ingest-codex) resolves the kb from the hook payload's cwd —
VOUCH_PROJECT_DIR keeps precedence, and a payload naming a
nonexistent cwd refuses capture rather than falling back to the
process cwd and landing in the wrong kb.

installer hardening from review: manifest dst containment is now
lexical, so a dotfiles-managed symlinked ~/.claude (or CLAUDE.md)
is written through instead of aborting; a global target of "." is
rejected; a regular file squatting ~/.claude is a clean error; a
malformed existing settings.json reports as failed (vouch is not
wired) instead of "already present".
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/global-install

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the ci: passing ci is green label Jul 20, 2026
@plind-junior
plind-junior merged commit 298696e into test Jul 20, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: passing ci is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant