import { type IOpenCodeConnectionConfig, type IOpenCodeHealth, type IOpenCodeLogEntry, type IOpenCodeSupervisorOptions, type IOpenCodeSupervisorStatus } from './interfaces.opencode.js'; export declare const verifyOpenCodeListenerOwnership: (processId: number, port: number) => boolean; export declare class OpenCodeSupervisor { readonly directory: string; readonly port: number; readonly baseUrl: string; private readonly executablePath; private readonly password; private readonly startupTimeoutMs; private readonly healthRequestTimeoutMs; private readonly healthPollIntervalMs; private readonly stopTimeoutMs; private readonly finalStopTimeoutMs; private readonly logEntryLimit; private readonly logLineByteLimit; private readonly spawnFactory; private readonly fetchImplementation; private readonly listenerOwnershipVerifier; private readonly processGroupController?; private readonly onChildExitObserved?; private readonly mintCallerCredential?; private readonly onChildExit?; private state; private healthy; private version?; private startedAt?; private child?; private childLifecycle?; private ownedProcessGroupId?; private orphanedProcessGroupId?; private orphanReapTask?; private childExitCleanupPending; private startPromise?; private stopPromise?; private readonly logs; private readonly stdoutAccumulator; private readonly stderrAccumulator; constructor(options: IOpenCodeSupervisorOptions); getStatus(): IOpenCodeSupervisorStatus; getConnectionConfig(): IOpenCodeConnectionConfig; getLogSnapshot(): IOpenCodeLogEntry[]; start(signal?: AbortSignal): Promise; checkHealth(): Promise; stop(): Promise; private resolveExecutablePath; private performStart; /** * best-effort reaping of group members that survived their leader's exit. * Runs at exit time because that is when the pgid is still provably ours: * living members keep it reserved, and an already-empty group answers ESRCH. */ private reapOrphanedGroup; private notifyChildExitCleanup; private drainOrphanedProcessGroup; private observeChild; private fetchHealth; private performStop; private lifecycleError; private consumeLogChunk; private flushLogAccumulator; private addLogEntry; }