Files
oh-my-pi/packages
Anthony "Asterisk" Ambuehl 29625f08c2 feat(mcp): add mcp_notification extension event + multi-listener API
Convert MCPManager's dangling single-slot setOnNotification callback into
a multi-listener API and expose server-initiated MCP notifications as an
extension event so extensions can bridge push-capable MCP servers (e.g.
peer messaging, ticket nudges) into session behavior.

API changes:
- Removed: MCPManager.setOnNotification(handler) — single-slot, zero callers
- Added:   MCPManager.addNotificationListener(listener): () => void
           Multi-listener with per-listener error isolation, returns unsub.
- Added:   'mcp_notification' extension event
           Payload: { server: string; method: string; params: unknown }

Wired in sdk.ts: one listener bridges to extensionRunner.emitMcpNotification,
captured under postmortem for teardown.

Tests: 3 new (multi-listener fanout, error isolation, unsubscribe),
fixture pattern matches neighboring mcp tests. bun check passes (biome +
tsgo).

Docs: extensions.md (new MCP notifications subsection with bridging
example), mcp-runtime-lifecycle.md (Server-initiated notifications
section), CHANGELOG.
2026-07-24 13:36:03 -07:00
..
2026-07-24 16:53:52 +02:00
2026-07-24 16:53:52 +02:00
2026-07-24 16:53:52 +02:00
2026-07-24 02:49:18 +02:00
2026-07-24 16:53:52 +02:00
2026-07-24 16:53:52 +02:00
2026-07-24 16:53:52 +02:00
2026-07-24 16:53:52 +02:00
2026-07-24 16:53:52 +02:00
2026-07-24 16:53:52 +02:00
2026-07-24 16:53:52 +02:00
2026-07-24 16:53:52 +02:00