import { spawn } from "node:child_process"; import { type ConnectorCliLaunchSpec } from "@cline/shared"; export interface CleanupConnectorInstanceOptions { launchSpec?: ConnectorCliLaunchSpec | undefined; spawnProcess?: typeof spawn; timeoutMs?: number; } /** * Reap one dead connector instance through the CLI. * * What has to be cleaned up — the process state file, thread→session bindings, * and the hub sessions the connector owned — is all connector-specific knowledge * that lives in the CLI's adapters. Rather than duplicate those conventions in * the hub, the supervisor shells back into the CLI's own stop path, which * already does exactly this for a process that is no longer running. * * `--cleanup-instance` deliberately preserves the autostart record: the instance * died, it was not retired, so the supervisor still intends to restart it. */ export declare function cleanupConnectorInstanceViaCli(channel: string, instanceId: string, options?: CleanupConnectorInstanceOptions): Promise;