Register droid-* handlers in unified hook system#6
Open
tanuj-corridor wants to merge 2 commits into
Open
Conversation
Droid (Factory) hooks for stop, beforeExecution, afterFileEdit, and promptSubmit were not firing because the unified handler system only registered claude-* and cursor-* subcommands — not droid-*. When Factory triggered a hook (e.g. `corridor-hooks droid-after-file-edit`), RunCommand() found no match and exited with "Unknown command", causing the hook to silently fail. This adds: - PlatformDroid and PlatformCascade constants - droid-stop handler (mirrors claude-stop) - droid-pre-tool-use handler (mirrors claude-pre-tool-use) - droid-after-file-edit handler (mirrors claude-after-file-edit) - droid-user-prompt-submit handler (mirrors claude-user-prompt-submit) All droid handlers reuse claude.* input/output types since Droid's hook API matches Claude Code's.
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.
Summary
stop,beforeExecution,afterFileEdit, andpromptSubmitwere silently failing because the unified handler system only registeredclaude-*andcursor-*subcommands — notdroid-*PlatformDroidandPlatformCascadeplatform constantsdroid-stop,droid-pre-tool-use,droid-after-file-edit, anddroid-user-prompt-submithandlers mirroring theirclaude-*counterparts (Droid uses the same hook API as Claude Code)ShouldSkip()to treat Droid the same as Claude for stop-loop preventionTest plan
cd hookshot && go build ./...— library compilescd hookshot && go test ./...— all tests passcd vscode-extension/src/utils/hooks-src && go build ./...— consumer compilescd vscode-extension && npm run test:go— all Go hook tests pass~/.corridor/tmp/corridor-hooks.logforafterFileEditentries