- Resolve OQ1: WS server accepts raw WebSocket instances via
addConnection/removeConnection (framework-agnostic, not coupled to
Hono/Express/Bun/Deno)
- Resolve OQ2: Backpressure handled by disconnecting slow consumers at
configurable threshold (default 1MB), with onBackpressure callback
for observability
- Resolve OQ3: Topic-based fan-out with subscription tracking instead
of broadcast-all; spokes send __subscribe/__unsubscribe control
events; direct messaging via 'direct:' topic pattern
Add ADR-003 for subscription control protocol decision. Update all
fan-out adapters (WS server, Iroh hub) and spoke adapters (WS client,
Iroh spoke) with subscription tracking/forwarding. Fix routing key
ambiguity (full topic string, not event type alone). Add error
handling, composition, and reserved type sections. Clarify Worker as
symmetric-only.
- Create docs/architecture/event-targets/ with individual specs:
in-process, redis, websocket-client, websocket-server,
worker, iroh-spoke, iroh-hub
- Update event-targets.md to serve as index with topology model
(symmetric vs fan-out) and adapter status table
- Update architecture.md index to reference new directory
New sub-path export @alkdev/pubsub/call providing:
- CallEventSchema (TypeBox schemas) for call.requested/responded/part/completed/aborted/error
- PendingRequestMap with call() (request/response) and subscribe() (streaming via Repeater)
- CallError class and CallErrorCode constants
- Scoped topic subscriptions (call.responded:{requestId}) to avoid O(n) fanout
- subscribe() yields call.part events until call.completed or call.error,
with automatic call.aborted on consumer break
Also adds @alkdev/typebox as runtime dependency and architecture doc.