import type { AgentDescriptor } from "@/types"; import { CommandRegistry } from "./commandRegistry.js"; import type { Connector, ConnectorMessage, MessageContext } from "./connectors/types.js"; export type ConnectorActionResult = { ok: true; status: "loaded" | "already-loaded" | "unloaded" | "not-loaded"; } | { ok: false; status: "error"; message: string; }; export type ConnectorRegistryOptions = { commandRegistry?: CommandRegistry; onMessage: (message: ConnectorMessage, context: MessageContext, descriptor: AgentDescriptor) => void | Promise; onCommand?: (command: string, context: MessageContext, descriptor: AgentDescriptor) => void | Promise; onFatal?: (source: string, reason: string, error?: unknown) => void; }; export declare class ConnectorRegistry { private connectors; private commandRegistry; private onMessage; private onCommand?; private onFatal?; private logger; constructor(options: ConnectorRegistryOptions); list(): string[]; listStatus(): Array<{ id: string; loadedAt: Date; }>; has(id: string): boolean; get(id: string): Connector | null; register(id: string, connector: Connector): ConnectorActionResult; unregister(id: string, reason?: string): Promise; unregisterAll(reason?: string): Promise; reportFatal(id: string, reason: string, error?: unknown): void; private attach; private attachCommand; private commandListBuild; private updateCommandsForAllConnectors; private updateCommandsForConnector; } //# sourceMappingURL=connectorRegistry.d.ts.map