Repository navigation
feat(hooks): add Qoder, CodeBuddy, Qwen Code, Droid and Antigravity hook integrations - #518
Open
WilliamWang1721 wants to merge 3 commits into
Open
WilliamWang1721 wants to merge 3 commits into
WilliamWang1721 wants to merge 3 commits into
Conversation
These agents document Claude Code's hook contract, so each signs its own source and shares Claude's parsing branch. Installation edits their user settings.json through one pure edit that installs, removes and inspects, claiming only a complete helper invocation, and reuses the command builder and ownership check shared with Grok and Cursor. PreToolUse is not subscribed, Droid gets only the events it documents, and the settings page gains icons for Qoder, Qwen Code and CodeBuddy.
Install one named group into ~/.gemini/config/hooks.json with SessionStart, PreInvocation and Stop. The payload carries no event name, so each command passes it as --event like Grok, Copilot and Cursor. A stop is classified only from its error and the observed termination reasons; the helper answers with an empty JSON object because Antigravity reads hook stdout as a decision.
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.
Result / 用户结果
Qoder, CodeBuddy, Qwen Code, Droid and Antigravity CLI can be enabled in Settings → Agents like the other optional hook integrations. When enabled, their turn start and turn end drive the pane state and notifications (Qoder, CodeBuddy, Qwen Code and Droid also report permission waits; Antigravity documents no such event). The settings page shows icons for Qoder, Qwen Code, CodeBuddy and Antigravity; Droid keeps its glyph. Off by default.
Design / 设计边界
Stop,Notificationwithnotification_type,UserPromptSubmit, session events, user-levelsettings.json). Each signs its ownsourceand shares Claude's parsing branch inai_hook/protocol.rs; session ids still come only fromsession_id, and camelCase payloads are rejected as another runner's. Installation (local/claude_style.rs) followscursor.rs: one pure edit installs, removes and inspects, and claims only a complete helper invocation. The command builder and ownership check live inextended.rsand are reused by Grok and Cursor.local/antigravity.rs) writes onepebrelgroup into~/.gemini/config/hooks.jsonwithSessionStart,PreInvocationandStop. Its payload has no event name, so each command passes--event, the contract Grok, Copilot and Cursor already use. A stop is classified only fromerrorand the observedterminationReasonvalues; anything else returns the pane to idle rather than announcing completion. The helper prints{}for this source because Antigravity reads hook stdout as a decision. A same-named group that is not entirely ours is never rewritten.PreToolUseis not subscribed anywhere; Droid gets only the events its reference documents; Antigravity's tool events are not subscribed because 1.2.7 was observed ignoring them.argsexec form on Windows (only Claude documents it), adding*_PROJECT_DIRto the foreign-runner gate (could silently drop real Claude notifications), readingfullyIdleas background work. Rationale inarchitecture/notes/nebula_app/ai_hook/2026-10-07-claude-style-agents.mdand2026-10-07-antigravity-hooks.md.ai_hooks_{qoder,codebuddy,qwen,droid,antigravity}, default off. Local installation only (as with Kimi, Grok, Cursor); no resume or fork commands.Evidence / 验证依据
Full native testsat head431b04fe(the four Claude-style agents): lint and all five native jobs passed (https://github.com/WilliamWang1721/pebrel/actions/runs/37603589151). The Antigravity commits are newer; at the time of writing a run for the latest head is pending. Upstream checks on this PR show the current state.nebula-hookaccepts the new sources and drains stdin.matcherfires Droid's tool events, how each Windows shell runs the encoded command, and whether Antigravity accepts{}on every event rest on documentation and third-party captures (cited in the notes; the Antigravity reference does not enumerateterminationReason). CodeBuddy asks the user to review externally edited hooks in/hooks; Qwen'sdisableAllHooksand Antigravity's groupenabledflag make installed hooks inert; the page reports file state only.Required Review / 必须确认
CONTRIBUTING.md,docs/architecture.md, anddocs/project-constraints.md.Architecture contractspasses; budgets were not changed.AI assistance: implemented with Claude Sonnet 5.5 (
claude-sonnet-5-5); reasoning effort not confirmed.