import type { ProcessRunner } from "../providers/process.js"; export interface WorkerProviderLaunch { readonly dispatchId: string; /** Physical tmux ownership token. V2 always supplies a random 64-hex nonce. */ readonly physicalNonce?: string; readonly command: "claude" | "codex"; readonly args: readonly string[]; readonly cwd: string; readonly env: NodeJS.ProcessEnv; readonly nativeAction: "claude" | "goal"; } export interface WorkerPaneObservation { readonly pane_id: string; readonly process_id: number; readonly dead: boolean; readonly placeholder?: boolean; } export interface WorkerPaneAdapter { ensure(launch: WorkerProviderLaunch): Readonly<{ status: "created" | "adopted"; observation: WorkerPaneObservation; }>; readonly activateExact?: (launch: WorkerProviderLaunch, options?: { readonly allowProviderReplay?: boolean; }) => WorkerPaneObservation; activate(dispatchId: string, nativeAction: WorkerProviderLaunch["nativeAction"]): WorkerPaneObservation; observe(dispatchId: string): WorkerPaneObservation | undefined; park(dispatchId: string, nativeAction: WorkerProviderLaunch["nativeAction"]): WorkerPaneObservation; resume(dispatchId: string, nativeAction: WorkerProviderLaunch["nativeAction"]): WorkerPaneObservation; readonly stopPlaceholder?: (physicalId: string, expectedPaneId?: string) => void; stop(dispatchId: string): void; } export declare function createWorkerPaneAdapter(options?: { readonly env?: NodeJS.ProcessEnv; readonly runner?: ProcessRunner; readonly signal?: (pid: number, signal: NodeJS.Signals) => void; readonly wait?: (milliseconds: number) => void; readonly readProcessArgv?: (pid: number) => readonly string[]; }): WorkerPaneAdapter; export declare function workerWindowName(dispatchId: string): string; /** * OMS-owned tmux pane user-option names for exact worker launch binding. * Phase 6 production launch adapter stamps these after ensureExact (which * receives task_id). Stop observes them read-only. Stable shared contract only — * no sequential set-option helper (correction-7A §1). */ export declare const OMS_PANE_USER_OPTION: Readonly<{ readonly provider_session: "@oms_provider_session"; readonly launch_operation: "@oms_launch_operation"; readonly launch_identity: "@oms_launch_identity"; readonly task_id: "@oms_task_id"; readonly physical_nonce: "@oms_physical_nonce"; readonly activation_operation: "@oms_activation_operation"; }>; /** list-panes -F fields: pane_id, pid, dead, session, window, six user-options. */ export declare const OMS_PANE_LAUNCH_LIST_FORMAT: string; export interface WorkerPaneLaunchMetadata { readonly provider_session: string; readonly launch_operation_id: string; readonly launch_identity_digest: string; readonly task_id: string; readonly physical_nonce: string; readonly activation_operation_id: string | null; } export declare function workerPlaceholderArgv(physicalNonce: string): readonly string[]; export declare function isExactWorkerPlaceholderArgv(argv: readonly string[], physicalNonce: string): boolean; export declare function readWorkerPaneProcessArgv(pid: number): readonly string[];