AIDK API Reference / aidk-kernel / ChannelTarget
Interface: ChannelTarget ​
Defined in: packages/kernel/src/channel.ts:14
Target specification for event routing. Used by transports to determine which connections receive the event.
Inspired by Socket.io patterns:
- emit: send to target (may include sender)
- broadcast: send to target excluding sender
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
connectionId? | string | Send to specific connection by ID. | packages/kernel/src/channel.ts:18 |
excludeSender? | boolean | Broadcast mode: exclude the source connection from delivery. Requires metadata.sourceConnectionId to be set. Mimics Socket.io's socket.broadcast.emit() pattern: - false (default): emit to all targets including sender - true: broadcast to all targets except sender | packages/kernel/src/channel.ts:35 |
rooms? | string[] | Send to all connections in these rooms. Rooms are arbitrary strings - application decides naming convention. Examples: 'user:123', 'tenant:abc', 'thread:xyz' | packages/kernel/src/channel.ts:25 |