import * as plugins from './plugins.js'; import type { ICodexCreationRuntime } from './classes.codexcreationmodels.js'; import type { IControllerCodexDiagnostic, TControllerHarnessLifecycleState } from '../dist_ts_interfaces/index.js'; export interface ICodexSupervisorOptions { directory: string; executable?: string; /** Explicit remote app-server attachment; the server remains externally owned. */ serverUrl?: string; token?: string; onNotification: (notificationArg: plugins.crossharness.ICodexAppServerNotification) => void; onServerRequest: (requestArg: plugins.crossharness.ICodexAppServerRequest) => void; onUnavailable: (errorArg: Error) => void; } /** Owns a local stdio app-server or only a connection to an explicitly supplied remote server. */ export declare class CodexSupervisor { private readonly options; readonly generation: string; private readonly abortController; private state; private client?; private child?; private processIdentity?; private childExited?; private startPromise?; private stopPromise?; private readonly observedMembers; private diagnostic?; private sharedLocal; constructor(options: ICodexSupervisorOptions); get supportsLocalAttachments(): boolean; get signal(): AbortSignal; get runtime(): ICodexCreationRuntime; getStatus(): { state: TControllerHarnessLifecycleState; healthy: boolean; pid?: number; version?: string; connectionMode: 'local' | 'shared' | 'remote'; diagnostic?: IControllerCodexDiagnostic; }; requireClient(): plugins.crossharness.CodexAppServerClient; start(): Promise; private performStart; checkHealth(): Promise; /** Capture group membership while the exact leader is known, before admitting a mutation. */ observeOwnedMembers(): Promise; stop(): Promise; private performStop; private signalOwnedGroup; private waitForOwnedGroupExit; private invalidate; static assertRuntimeTerminated(runtimeArg: ICodexCreationRuntime): Promise; }