Documentation Index
Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
ChannelRegistry extends RegistryAbstract and manages all channel instances in a scope. It advertises experimental: { 'claude/channel': {} } in server capabilities when channels are registered.
Methods
getChannels
Get all channel entries.getChannelInstances
Get all concrete channel instances.findByName
Find a channel by its declared name.hasAny
Check if any channels are registered.size
Get the number of registered channels.getCapabilities
Get MCP server capabilities contributed by channels.{ experimental: { 'claude/channel': {} } } when channels exist, empty object otherwise.
subscribe
Subscribe to channel registry changes.ChannelChangeEvent
Accessing the Registry
The channel registry is available on the scope after initialization:Session-Scoped Subscriptions
Channel notifications are session-scoped. Sessions must be subscribed to a channel to receive its notifications. This prevents data from leaking between connected agents. Subscription methods are onNotificationService (accessed via scope.notifications):
subscribeChannel
true if this is a new subscription.
unsubscribeChannel
subscribeAllChannels
claude/channel capability.
isChannelSubscribed
getSubscribersForChannel
getChannelSubscriptions
Auto-subscription: When a session initializes with
experimental: { 'claude/channel': {} } capability, it is automatically subscribed to all available channels. Channel subscriptions are cleaned up automatically when a session disconnects.Session-Targeted Delivery
Events from session-scoped sources (agent completion, job completion) carry the originatingsessionId and are delivered ONLY to that session:
targetSessionId and go to all subscribed sessions.
Replay Buffer
Channels withreplay: { enabled: true } buffer events for later delivery:
replayBufferedEvents
replayed: "true" in their meta.
clearReplayBuffer
Session-targeted events are NOT buffered (they’re ephemeral to the session). Only global events are stored in the replay buffer.
ChannelNotificationService
The companion service for sending notifications (session-scoped):ChannelEventBus
The in-process event bus forapp-event sources:
Related
- @Channel Decorator — decorator configuration
- ChannelContext — context class
- Channels Guide — full documentation