omp packages

@ryan_nookpi/pi-extension-claude-hooks-bridge0.3.1

Bridge Claude Code hooks (.claude/settings.json) into pi extension lifecycle events.

ryan_nookpi Published 3 months ago MIT ~297 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

claude-hooks-bridge

Bridge Claude Code hooks (.claude/settings.json) into pi extension lifecycle events.

What it does

  • Reads .claude/settings.json hooks configuration from the project root
  • Executes hooks at matching lifecycle events:
    • SessionStart → session_start
    • UserPromptSubmit → before_agent_start
    • PreToolUse → tool_call (can block / ask for confirmation)
    • PostToolUse → tool_result
    • Stop → agent_end (can queue follow-up messages)
  • Supports matcher patterns (regex or pipe-separated tool names)
  • Maps pi tool names to Claude Code equivalents (bash → Bash, etc.)
  • Handles hook JSON output with permissionDecision / exit code 2 for blocking
  • Provides transcript files for Stop hooks

Requirements

  • bash is required — hooks are executed via bash -lc. Works on macOS and Linux. Not natively supported on Windows.

Install

pi install npm:@ryan_nookpi/pi-extension-claude-hooks-bridge