Thanks for shipping this — the integration is clean and well-scoped. Wanted to flag a runtime gap and offer to help close it.
Use case
We're standing up multi-runtime crew on Gas Town (gastownhall), which dispatches per-rig agents across multiple LLM runtimes per workspace. Today's lineup includes Claude Code, Codex CLI, OpenCode, Oh My Pi (OMP), and Pi (badlogic/pi-mono). The first three are supported by moshi-hooks today; the latter two aren't.
The OMP/Pi crew are exactly the kind of long-running agent work that benefits most from Live Activity push (a cross-model generalist agent that runs unattended for hours and surfaces a permission prompt or finished task). Right now those notifications go nowhere.
What OMP/Pi look like
OMP and Pi share a hook-extension architecture (TypeScript exports a function, runtime fires events), with this approximate event set today:
pi.on("session_start", async (event, ctx) => { ... }) // ≈ SessionStart
pi.on("before_agent_start", async (event, ctx) => { ... }) // ≈ UserPromptSubmit
pi.on("session_compact", async (event, ctx) => { ... }) // (no Claude equivalent; reload context)
pi.on("tool_call", async (event, ctx) => { ... }) // ≈ PreToolUse — supports `return { block: true }` to deny
pi.on("session_shutdown", async (event, ctx) => { ... }) // ≈ Stop
tool_call carries event.toolName and event.input (matching Claude's PreToolUse shape closely). The Pi/OMP host runs on Bun-style JS, so the same bunx moshi-hooks invocation works — the adapter just needs to recognize a new --source value and the Pi/OMP-specific event names.
(There's no exact tool_finished / post_tool event in the public OMP API I've found — would be worth confirming with the upstream OMP author if Live Activity wants both pre/post coverage.)
What the change might look like
- Extend the
source type union: "claude" | "codex" | "opencode" | "pi" | "omp" (or merge to a single "pi" since OMP is a Pi fork).
- Add a setup command:
moshi-hooks setup --pi (or --omp) that emits a hook-extension snippet at <workspace>/.pi/extensions/moshi-hooks.js or <workspace>/.omp/hooks/moshi-hooks.ts. Gas Town crew would then merge that snippet into their existing gastown-hook.ts (one workspace can host multiple gastown-side hook concerns).
- Map OMP/Pi event names to your existing eventType vocabulary:
tool_call → pre_tool, session_shutdown → stop, etc.
- Optionally — and this is the bigger ask — a generic stdin-based mode (
moshi-hooks emit --eventType ... --message ... reading from any source) so future runtimes can wire in via shell without touching the package.
I'd be happy to put up a PR if any of this lines up with where you want to take it. Reference for what the OMP integration looks like today: gastown OMP hook template.
Why this matters server-side
The local index.ts defaults unknown sources to "claude" (line 588), which works around the local enum. But the API likely tags events by source for the Live Activity grouping and per-source UI affordances on the iOS side. A Pi/OMP event masquerading as Claude probably mis-renders on the phone. So the full fix needs both client-side --source pi support and server-side acceptance of the new value.
(Happy to test an alpha, file follow-up issues for OMP-specific edge cases, or contribute a PR.)
Thanks for shipping this — the integration is clean and well-scoped. Wanted to flag a runtime gap and offer to help close it.
Use case
We're standing up multi-runtime crew on Gas Town (gastownhall), which dispatches per-rig agents across multiple LLM runtimes per workspace. Today's lineup includes Claude Code, Codex CLI, OpenCode, Oh My Pi (OMP), and Pi (
badlogic/pi-mono). The first three are supported bymoshi-hookstoday; the latter two aren't.The OMP/Pi crew are exactly the kind of long-running agent work that benefits most from Live Activity push (a cross-model generalist agent that runs unattended for hours and surfaces a permission prompt or finished task). Right now those notifications go nowhere.
What OMP/Pi look like
OMP and Pi share a hook-extension architecture (TypeScript exports a function, runtime fires events), with this approximate event set today:
tool_callcarriesevent.toolNameandevent.input(matching Claude's PreToolUse shape closely). The Pi/OMP host runs on Bun-style JS, so the samebunx moshi-hooksinvocation works — the adapter just needs to recognize a new--sourcevalue and the Pi/OMP-specific event names.(There's no exact
tool_finished/post_toolevent in the public OMP API I've found — would be worth confirming with the upstream OMP author if Live Activity wants both pre/post coverage.)What the change might look like
sourcetype union:"claude" | "codex" | "opencode" | "pi" | "omp"(or merge to a single"pi"since OMP is a Pi fork).moshi-hooks setup --pi(or--omp) that emits a hook-extension snippet at<workspace>/.pi/extensions/moshi-hooks.jsor<workspace>/.omp/hooks/moshi-hooks.ts. Gas Town crew would then merge that snippet into their existinggastown-hook.ts(one workspace can host multiple gastown-side hook concerns).tool_call→pre_tool,session_shutdown→stop, etc.moshi-hooks emit --eventType ... --message ...reading from any source) so future runtimes can wire in via shell without touching the package.I'd be happy to put up a PR if any of this lines up with where you want to take it. Reference for what the OMP integration looks like today: gastown OMP hook template.
Why this matters server-side
The local
index.tsdefaults unknown sources to"claude"(line 588), which works around the local enum. But the API likely tags events by source for the Live Activity grouping and per-source UI affordances on the iOS side. A Pi/OMP event masquerading as Claude probably mis-renders on the phone. So the full fix needs both client-side--source pisupport and server-side acceptance of the new value.(Happy to test an alpha, file follow-up issues for OMP-specific edge cases, or contribute a PR.)