import { type ConnectorConnectionRecord } from "@cline/shared/db"; /** * Record a successful connector start so the connector can be reconnected * automatically after a hub or host restart. */ export declare function persistConnectorConnection(channel: string, instanceId: string, rawArgs: string[], cwd?: string): void; /** Stop auto-reconnecting one instance, one channel, or every connector. */ export declare function disableConnectorAutostart(channel?: string, instanceId?: string): void; export declare function getPersistedConnectorConnection(channel: string, instanceId: string): ConnectorConnectionRecord | undefined; export declare function removePersistedConnectorConnection(channel: string, instanceId: string): void; export interface ReconnectTarget { channel: string; instanceId: string; args: string[]; } export interface ReconnectAttempt { channel: string; instanceId: string; ok: boolean; error?: string; } export interface ReconnectPersistedConnectorsOptions { /** Starts one connector instance with its stored, non-interactive arguments. */ start: (target: ReconnectTarget) => Promise; /** Reports whether this exact connector instance is healthy in the host. */ isHealthy?: (target: ReconnectTarget) => boolean; log?: (message: string) => void; } /** * Reconnect every connector that has stored connection arguments, is enabled, * and is not already active in the calling host. */ export declare function reconnectPersistedConnectors(options: ReconnectPersistedConnectorsOptions): Promise;