Summary
When APM deploys hooks for a package, it should log which hook event names were found and note if they may not be recognized by the target platform. Currently APM silently deploys all events regardless of target.
Background
The hooks specification has no unified standard — three implementations exist with divergent event names and schemas:
| Platform |
Event naming |
Example events |
Spec reference |
| GitHub Copilot Agent (cloud/CLI) |
camelCase |
sessionStart, preToolUse, postToolUse, userPromptSubmitted |
docs.github.com |
| VS Code (Copilot Chat extension) |
PascalCase |
SessionStart, PreToolUse, PostToolUse, UserPromptSubmit |
code.visualstudio.com |
| Claude Code |
PascalCase |
SessionStart, PreToolUse, PostToolUse, UserPromptSubmit, PermissionRequest, FileChanged |
code.claude.com |
Additionally, each platform supports different events — Claude Code has 25+ events, while GH Agent has 8.
Proposed Behavior
When deploying hooks to a target (e.g., copilot, claude, cursor, codex):
- Log the event names found in the hook JSON (e.g.,
"Deployed 3 hook events: preToolUse, postToolUse, sessionStart")
- Optionally note if events use a naming convention that may not match the target (e.g.,
"Note: camelCase events detected — these are GitHub Copilot Agent format; VS Code expects PascalCase")
Scope
- Informational only — do NOT block deployment
- Emit via existing
logger.info or diagnostics mechanism
- Consider a future
--strict mode that warns on unrecognized events per target
Related
Summary
When APM deploys hooks for a package, it should log which hook event names were found and note if they may not be recognized by the target platform. Currently APM silently deploys all events regardless of target.
Background
The hooks specification has no unified standard — three implementations exist with divergent event names and schemas:
sessionStart,preToolUse,postToolUse,userPromptSubmittedSessionStart,PreToolUse,PostToolUse,UserPromptSubmitSessionStart,PreToolUse,PostToolUse,UserPromptSubmit,PermissionRequest,FileChangedAdditionally, each platform supports different events — Claude Code has 25+ events, while GH Agent has 8.
Proposed Behavior
When deploying hooks to a target (e.g.,
copilot,claude,cursor,codex):"Deployed 3 hook events: preToolUse, postToolUse, sessionStart")"Note: camelCase events detected — these are GitHub Copilot Agent format; VS Code expects PascalCase")Scope
logger.infoor diagnostics mechanism--strictmode that warns on unrecognized events per targetRelated
windowskey)command,bash,powershell,windows,linux,osx) are already handled as a superset; this issue addresses the event name dimension