Files
agentic-dev/packages/core-realtime/AGENTS.md

1.0 KiB

@repo/core-realtime

Vendor-isolated realtime abstractions over Socket.IO. Feature packages depend only on the interfaces; only this package imports socket.io.

See docs/superpowers/specs/2026-05-08-realtime-design.md for the full design. ADR-016 (docs/decisions/adr-016-realtime-layer.md) lands in Phase 10 — pending.

Public exports

  • IRealtimeBroadcaster — server → client broadcasts
  • IRealtimeServer — lifecycle, used at app boot only
  • IRealtimeAuthenticator — connect-time identity attachment (cookie / header → user)
  • IRealtimeHandlerRegistry + RealtimeHandlerRegistry — inbound handler registration
  • defineRealtimeChannel, RealtimeChannelDescriptor, ChannelScope
  • InMemoryRealtimeBroadcaster (test/dev), SocketIORealtimeBroadcaster, SocketIORealtimeServer (production)
  • CORE_REALTIME_SYMBOLS

Boundary

Tagged core. The only place in the repo where import "socket.io" is allowed is src/socket-io-*.ts here, plus apps/*/server.ts. Enforced by the ESLint rule core-eslint/no-direct-socket-io.