import type { ServerCapabilities } from '@frontmcp/protocol'; import { type ChannelEntry, type ChannelRecord, type ChannelType, type EntryOwnerRef } from '../common'; import type ProviderRegistry from '../provider/provider.registry'; import { RegistryAbstract, type RegistryBuildMapResult } from '../regsitry'; import { type ChannelChangeEvent } from './channel.events'; import { ChannelInstance } from './channel.instance'; /** * Interface for type-safe registry lookups. */ export interface ChannelRegistryInterface { getChannels(): ChannelEntry[]; hasAny(): boolean; } export default class ChannelRegistry extends RegistryAbstract implements ChannelRegistryInterface { /** Who owns this registry */ owner: EntryOwnerRef; /** Channels owned by this registry */ private localRows; /** Version counter for change tracking */ private version; /** Event emitter for change notifications */ private emitter; /** Logger */ private logger; constructor(providers: ProviderRegistry, list: ChannelType[], owner: EntryOwnerRef); protected buildMap(list: ChannelType[]): RegistryBuildMapResult; protected buildGraph(): void; protected initialize(): Promise; /** * Get all channel entries. */ getChannels(): ChannelEntry[]; /** * Get all channel instances. */ getChannelInstances(): ChannelInstance[]; /** * Find a channel by name. */ findByName(name: string): ChannelInstance | undefined; /** * Check if any channels are registered. */ hasAny(): boolean; /** * Get the number of registered channels. */ get size(): number; /** * Get MCP server capabilities contributed by channels. * Returns `experimental: { 'claude/channel': {} }` when channels exist. */ getCapabilities(): Partial; /** * Subscribe to channel registry changes. */ subscribe(opts: { immediate?: boolean; }, cb: (e: ChannelChangeEvent) => void): () => void; /** * Emit a change event. */ bump(kind: ChannelChangeEvent['kind']): void; } //# sourceMappingURL=channel.registry.d.ts.map