Skip to content

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 ​

PropertyTypeDescriptionDefined in
connectionId?stringSend to specific connection by ID.packages/kernel/src/channel.ts:18
excludeSender?booleanBroadcast 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 senderpackages/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

Released under the MIT License.