feat(cli): relay Stop, PostToolUse and PreToolUse to Antigravity (agy), not only SessionStart
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 44/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
- 領域
- cli
研究方向
Start with cli/src/contexts/tools/domain/profiles/antigravity/antigravity-hooks.ts and its MAPPED_EVENTS, then read tool-paths.md and the prior hook work in #890, #511, and #978. Verify how the profile maps event names, matchers, and hook outputs against the observed agy contracts, including PostInvocation context injection. Done means the acceptance criteria pass, including a guarded Stop continuation and an allow response for empty PreToolUse output.
由索引模型根據 Issue 內容生成。
描述
Problem
On next, the Antigravity profile relays only SessionStart (cli/src/contexts/tools/domain/profiles/antigravity/antigravity-hooks.ts, MAPPED_EVENTS), with the reason "Claude and agy name their tools differently". tool-paths.md lists PreToolUse, PostToolUse and Stop as supported by the host. A hook on any of those three does nothing on agy.
Measured on 2026-11-11 with agy -p (1.5.x, the binary auto-updated from 1.5.1 to 1.5.5 during the test), project file .agents/hooks.json, disposable folder:
SessionStart,PreToolUse,PostToolUse,Stopall fire.agyalso hasPreInvocationandPostInvocation. It has noUserPromptSubmit,SubagentStoporSessionEnd.- Tool names differ:
write_file(argsPath,Content) andrun_command(argsCommandLine), notWriteandBash. - Output contract differs from the framework's scripts: a
Stophook continues the agent with{"decision":"continue","reason":...}. An empty output from aPreToolUsehook is a denial, so a script that prints nothing blocks every tool call.{"decision":"allow"}is required. PostToolUsecould not inject context (documented as{}only).PostInvocationinjected it with{"injectSteps":[{"systemMessage":{"systemMessage":"..."}}]}.- In
-p, tools are refused unless permissions are skipped, which matters for CI. - Not tested:
--settings, subagent hooks. One run per test, small model.
Scope
- Relay
StopandPostToolUse(andPreToolUseonce its output contract is handled) toagy, with matchers translated (Bashtorun_command,WriteandEdittowrite_file). - Translate the hook output (
blocktocontinue, an emptyPreToolUseoutput toallow), or document that scripts must handle it. - Decide how
PostToolUsecontext injection works onagy(PostInvocation).
Acceptance criteria
- A
Stopscript that blocks once continues the turn onagy, with a guard that stops the loop. - A
PostToolUsescript runs afterwrite_fileandrun_command. - A
PreToolUsescript that prints nothing does not deny every tool call. - Events the profile does not relay produce a warning at build time (today: the
unmapped eventmessage already exists for the profile).
Prior art in this repo
antigravity-hooks.ts(MAPPED_EVENTS = {"SessionStart"}), #890 (hooks are read fromhooks.json, notsettings.json), #511 (Antigravity as a flat host), #978 (verified tool compatibility).
Out of scope
Telling agy to relay UserPromptSubmit or SessionEnd (they do not exist). The Antigravity IDE.
- 主要語言
- TypeScript
- 星號
- 481
- 分支
- 45
- 平均合併
- 1 天 13 小時
- 30 天內合併 PR
- 91
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ai-driven-dev/framework 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 86/100
ai-driven-dev/framework#1311 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 79/100
ai-driven-dev/framework#1244 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
ai-driven-dev/framework#1197 ·
維護者通常 1 天內回覆
-
refactor(aidd-context): apply the new skill template to learn可能已有人在做 @blafourcade 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
ai-driven-dev/framework#1186 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 83/100
ai-driven-dev/framework#1163 · 1 則留言 ·
維護者通常 1 天內回覆
查看 ai-driven-dev/framework 的全部 Issue
相似的 Issue
-
type: bug
難度 2/5 1-3 小時 新手友好度 78/100
nrwl/nx#37955 · 1 個 reaction ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
db-ux-design-system/core-web#8856 ·
維護者通常 1 天內回覆
-
'!' breaking change is lost when the commit also has an empty BREAKING CHANGE footer可能已有人在做 @wittdennis 今天認領。 未關閉priority: p3 type: bug
難度 2/5 1-3 小時 新手友好度 74/100
googleapis/release-please#2971 ·
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 87/100
維護者通常 1 天內回覆
-
🛠️ dette technique
難度 2/5 1-3 小時 新手友好度 61/100
betagouv/mon-entreprise#4752 · 1 則留言 ·
維護者通常 5 天內回覆