import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { type AgentClient, type RelayCast, type WsClient } from '@relaycast/sdk'; /** * Tracks the set of `relay://` resource URIs the MCP client has subscribed to, * so realtime events can be filtered down to only the resources that matter. */ export declare class SubscriptionManager { private readonly subscriptions; subscribe(uri: string): void; unsubscribe(uri: string): void; getMatchingSubscriptions(uris: string[]): string[]; getAll(): string[]; clear(): void; } /** * Map a realtime workspace event to the `relay://` resource URIs whose contents * it invalidates, so subscribers can be notified to re-fetch. */ export declare function eventToResourceUris(event: unknown): string[]; /** * Bridges the realtime WebSocket event stream to MCP resource notifications: * for each workspace event, notifies any subscribed `relay://` resource URIs * that the event invalidates. */ export declare class RealtimeResourceBridge { private readonly wsClient; private readonly subscriptions; private readonly notifyCallback; private unsubscribeFn; constructor(wsClient: WsClient, subscriptions: SubscriptionManager, notifyCallback: (uri: string) => void); start(): void; stop(): void; } /** * Register the read-only `relay://` resources (inbox, agents, channels, channel * messages, message threads, and DM conversations) on the MCP server. */ export declare function registerResourceDefinitions(server: McpServer, getAgentClient: (asIdentity?: string) => AgentClient, getRelay: () => RelayCast): void; //# sourceMappingURL=resources.d.ts.map