29625f08c2
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.