Repository navigation
feat(install-gate): Gemini CLI + Cursor adapters (5 agents now enforced) - #153
Merged
Merged
Conversation
Extends the install-gate to the two more agents with a verified exit-2 blocking hook (research, #146): - Handler: also reads top-level `command` (Cursor's beforeShellExecution puts the shell string there, not under tool_input); Gemini uses tool_input.command like Claude/Codex/Amazon Q. exit 2 = deny across all five. - installInstallGateGemini: BeforeTool hook in .gemini/settings.json (same nested shape as Claude; tool_input.command + exit 2). - installInstallGateCursor: beforeShellExecution hook in .cursor/hooks.json (top-level command + exit 2 / {permission:"deny"}). - installAllInstallGates + `kit agent-config --install-gate` now wire all five present agents: Claude Code, Codex, Amazon Q, Gemini CLI, Cursor. Verified vs primary docs: geminicli.com/docs/hooks (BeforeTool, exit 2, tool_input.command) and cursor.com/docs/hooks (beforeShellExecution, top-level command, exit 2 = deny). Tests: Gemini + Cursor wiring (create/idempotent/skip). Full suite green. Not yet wired (different integration shape — tracked in #146): Cline (JSON {cancel:true}, not exit 2), OpenCode (JS plugin that throws), Continue (unverified). The agent-agnostic git-hook layer still covers all of them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
|
✅ Docker image built successfully
|
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Track #1 (extend agent coverage) — adds the two more agents with a verified exit-2 blocking hook, taking the install-gate from 3 → 5 enforced agents.
Research outcome (the 5 remaining agents)
BeforeTooltool_input.commandbeforeShellExecution{permission:"deny"}, top-levelcommandPreToolUse{cancel:true}(not exit 2)tool.execute.beforeChanges
commandin addition totool_input.command(Cursor puts the shell string at top level). Gemini usestool_input.commandlike the others.exit 2= deny across all five.installInstallGateGemini→BeforeToolhook in.gemini/settings.json.installInstallGateCursor→beforeShellExecutionhook in.cursor/hooks.json.installAllInstallGates/kit agent-config --install-gatenow wire all five present agents.Verified vs primary docs (geminicli.com/docs/hooks, cursor.com/docs/hooks). Tests: Gemini + Cursor wiring (create/idempotent/skip). Full suite 1837/0, format/lint clean.
Cline/OpenCode/Continue use a different block mechanism (JSON-cancel / JS-throw / unverified) and are tracked in #146; the agent-agnostic git-hook layer covers them regardless.
🤖 Generated with Claude Code
https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
Generated by Claude Code