/** Engine-neutral process primitives for short-lived workflow workers. */ import type { WorkerToDaemon } from '../../types.js'; export interface WorkerHandle { send(msg: unknown): void; on(event: 'message', cb: (msg: WorkerToDaemon) => void): void; on(event: 'exit', cb: (code: number | null) => void): void; /** ChildProcess `close` is the outer-process resource fence. Unlike `exit`, * it is also emitted after a spawn `error` once stdio/IPC are closed. */ on(event: 'close', cb: (code: number | null) => void): void; on(event: 'error', cb: (err: Error) => void): void; kill(signal?: NodeJS.Signals): void; readonly pid?: number; readonly stdout?: NodeJS.ReadableStream | null; readonly stderr?: NodeJS.ReadableStream | null; } export interface WorkerProcessFactory { spawn(opts: WorkerSpawnOptions): WorkerHandle; } export type WorkerSpawnOptions = { workerPath: string; cwd: string; env: NodeJS.ProcessEnv; }; /** Default factory: real `node:child_process.fork` against `worker.js`. */ export declare const forkWorkerJsFactory: WorkerProcessFactory; export declare function expandWorkflowWorkingDir(workingDir: string | undefined): string | undefined; /** Deterministically map any string id to a UUID-v4-shaped hex token. */ export declare function syntheticSessionUuid(rawId: string): string; //# sourceMappingURL=worker-process.d.ts.map