Releases: ZeR020/omp-hooks
Releases · ZeR020/omp-hooks
Release list
omp-hooks v0.0.4
What's new
Parallel hook execution (Claude Code behavior)
- All matching hooks now run in parallel via
Promise.allSettled - Identical handlers deduplicated by
command+argsacross groups - Deny-wins: one
deny/exit-2 blocks regardless ofallowfrom others stopProcessingwins over deny;updatedInputmerges in config orderadditionalContextconcatenated in config order (deterministic)- PostToolUse patches: first non-undefined
content/details/isErrorwins - Single-hook calls skip
allSettledoverhead
updatedToolOutput field (PostToolUse)
extractToolResultPatchnow reads Claude Code's actualupdatedToolOutputfield as the highest-prioritycontentsource- Above legacy
updatedToolResult.contentandupdatedMCPToolOutput - This was effectively a bug fix — hooks using the documented Claude field were silently ignored before
Type cleanup
CommonHookOutputnamed type (replacesReturnType<typeof>usage)CollectedHook/HookExecResultnamed types for parallel helpers
Full Changelog: v0.0.3...v0.0.4
omp-hooks v0.0.3
omp-hooks v0.0.3
Bug fixes and compatibility improvements over v0.0.2.
What's changed
Bug fixes
- Fix: inject additionalContext for SessionEnd, PreCompact, PostCompact, and non-blocked Stop hooks — these 4 event handlers collected
additionalContextfrom hook command output but never injected it into the LLM. Now all events inject theiradditionalContextthroughinjectHiddenContext, matching PreToolUse and PostToolUse behavior. - Fix: case-insensitive exact matcher —
matcherMatches('Read', 'read')was returningfalsebecause exact-match used===instead of case-insensitive comparison. Fixed by lowercasing both sides. Matters because Claude configs use"Read"/"Bash"while OMP may emit lowercase"read"/"bash".
Features
-
Claude-compatible field aliases in
buildHookInput— omp-hooks now emits both OMP and Claude Code field names in the hook JSON payload:- Glob:
.path+.pattern(Claude Code uses.pattern) - Read/Edit/Write:
.path+.file_path(Claude Code uses.file_path) - Read (URL):
.path+.url+.prompt(some Claude scripts use.url/.prompt) - PostToolUse:
.tool_response.content[].text+.tool_response.result(string)
This eliminates the need for bridge scripts that only do field-name mapping. Plugin-specific routing (calling a specific binary or marketplace script) may still need a bridge.
- Glob:
Docs
- README rewrite — shorter, professional structure with install, quick start, supported subset tables, examples, and compatibility notes.
Verified
bun run typecheck✅bun run build✅- 64 unit/smoke tests ✅ (matcher, tool names, all events, execution, async, JSON output)
- Live session testing ✅ (19 omp-hooks injections in session JSONL, CBM/agent-skills/ponytail all firing)
omp-hooks v0.0.2
omp-hooks v0.0.2
Compatibility-focused patch release for Claude Code command hooks on OMP.
What's changed
- Normalize OMP tool names to Claude-style names for hook scripts and matchers (
bash→Bash,write→Write, etc.) while preserving lowercase matcher compatibility. - Match current Claude Code
matchersemantics: omitted/empty/star match all, plain names exact-match, pipe/comma lists match exact alternatives, and regex syntax still works for patterns likemcp__.*. - Add command exec-form support with
args; whenargsis present,commandis spawned directly without a shell. - Add
shellsupport for command hooks (bashby default,powershellsupported for shell form). - Add background command hook support with
asyncand best-effortasyncRewake. - Align default timeouts closer to Claude Code: 600s for command hooks, 30s for
UserPromptSubmit, 1.5s forSessionEnd. - Update README compatibility docs to describe the supported Claude command-hook subset and explicitly list unsupported handler types/events.
Still unsupported
- Handler types:
http,prompt,agent,mcp_tool. - Newer Claude events outside the mapped subset, including
PostToolBatch,PermissionRequest,PermissionDenied,Notification,MessageDisplay,SubagentStart,SubagentStop, andStopFailure.
Verified
bun run typecheckbun run build- Direct smoke tests for matcher behavior, tool-name normalization, hook input shape, timeout defaults, shell-form execution, exec-form
args, and asyncadditionalContextdelivery.
v0.0.1
omp-hooks v0.0.1
Claude Code-compatible command hooks for the OMP (Oh My Pi) coding agent.
Features
- 9 Claude Code hook events mapped (SessionStart, SessionEnd, PreCompact, PostCompact, PreToolUse, PostToolUse, PostToolUseFailure, UserPromptSubmit, Stop)
- Hidden context injection via
sendMessage({ display: false })— the mechanism OMP's nativetool_calllacks - Claude Code
settings.jsonhooks config format compatibility - Settings from
~/.omp/agent/settings.json(env-overridable viaOMP_HOOKS_SETTINGS) + project-local<cwd>/.omp/settings.json - Debounce buffer for parallel grep/glob injections (50ms window)
- Bridge-script compatible (
bash -c+ JSON stdin/stdout + exit-code semantics)
Install
omp install omp-hooksOr from source:
omp install git:github.com/ZeR020/omp-hooksRequirements
- OMP (Oh My Pi) coding agent
@oh-my-pi/pi-coding-agentpeer dependency