import type { AttemptId, ModelSpec, WorkerContract, WorkerLaunchContract, WorkerLaunchContractV1, WorkerLaunchContractV2 } from "./workflow-types.js"; export interface WorkerLaunchAuthority { readonly piExecutable: string; readonly childExtensionPath: string; readonly grantedCapabilities: readonly string[]; readonly capabilityTools: Readonly>; readonly availableModels: readonly { readonly provider: string; readonly id: string; readonly thinkingLevels: readonly string[]; readonly defaultThinkingLevel?: string; }[]; readonly projectTrust: "trusted" | "untrusted" | "unresolved"; readonly requiresProjectResources: boolean; readonly inheritedEnvironment: Readonly>; } export interface WorkerLaunchAttemptIdentity { readonly attemptId: AttemptId; readonly workerAttemptGeneration: string; readonly supervisorGeneration: string; } export interface PiProcessLaunchCommand { readonly executable: string; readonly args: readonly string[]; readonly cwd: string; readonly env: Readonly>; readonly parentLivenessFd: 3; readonly protocolFd: 4; readonly launchContract: WorkerLaunchContractV2; readonly launchContractPath: string; } export interface ResolvedWorkerLaunch { readonly contract: WorkerLaunchContractV2; readonly command: PiProcessLaunchCommand; } export interface WorkerChildContext { readonly mode: "tui" | "rpc" | "json" | "print"; readonly cwd: string; readonly model: { readonly provider: string; readonly id: string; } | undefined; readonly thinkingLevel: string | undefined; readonly projectTrusted: boolean; readonly tools?: readonly string[]; readonly environmentKeys: readonly string[]; } export declare class WorkerLaunchValidationError extends Error { constructor(message: string); } export declare function parseWorkerLaunchContractV1(value: unknown): WorkerLaunchContractV1; export declare function parseWorkerLaunchContractV2(value: unknown): WorkerLaunchContractV2; export declare function parseWorkerLaunchContract(value: unknown): WorkerLaunchContract; export declare function resolveWorkerLaunch(input: { readonly contract: WorkerContract; readonly attempt: WorkerLaunchAttemptIdentity; readonly depth: number; readonly prompt: string; readonly sessionDirectory: string; readonly launchContractPath: string; readonly continuedSessionFile?: string; readonly forkedSessionFile?: string; readonly modelOverride?: ModelSpec; readonly authority: WorkerLaunchAuthority; }): ResolvedWorkerLaunch; export declare function validateWorkerChildContext(contract: WorkerLaunchContract, context: WorkerChildContext): void; export declare function isReceiverAuthorityEnvironmentKey(key: string): boolean; //# sourceMappingURL=worker-launch.d.ts.map