feat(cli): relay Stop, PostToolUse and PreToolUse to Antigravity (agy), not only SessionStart
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 44/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- cli
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 481
- Forks
- 45
- Merge médio
- 1d 13h
- PRs com merge (30d)
- 91
Preparar o ambiente
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ai-driven-dev/framework
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
ai-driven-dev/framework#1311 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
ai-driven-dev/framework#1244 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
ai-driven-dev/framework#1197 ·
Mantenedores costumam responder em até 1 dia
-
refactor(aidd-context): apply the new skill template to learnTalvez já em andamento @blafourcade assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
ai-driven-dev/framework#1186 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
ai-driven-dev/framework#1163 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de ai-driven-dev/framework
Issues semelhantes
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 87/100
Mantenedores costumam responder em até 1 dia
-
🛠️ dette technique
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 61/100
betagouv/mon-entreprise#4752 · 1 comentário ·
Mantenedores costumam responder em até 5 dias
-
type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
franciscoBSalgueiro/en-croissant#1111 ·
Mantenedores costumam responder em até 2 dias
-
area/providers type/feature version/v2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
anomalyco/opencode#64845 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia