Skip to content

omp-hooks v0.0.3

Choose a tag to compare

@ZeR020 ZeR020 released this 07 Jul 18:42

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 additionalContext from hook command output but never injected it into the LLM. Now all events inject their additionalContext through injectHiddenContext, matching PreToolUse and PostToolUse behavior.
  • Fix: case-insensitive exact matchermatcherMatches('Read', 'read') was returning false because 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.

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)