chore(core-realtime): scaffold package
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
19
packages/core-realtime/AGENTS.md
Normal file
19
packages/core-realtime/AGENTS.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# @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 and `docs/decisions/adr-016-realtime-layer.md` for the rationale (added during implementation).
|
||||
|
||||
## 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`.
|
||||
Reference in New Issue
Block a user