import type { ScheduledPath, SyncWork, WorkOutcome, WorkSlice } from "./sync-work.js"; /** Versioned, data-only protocol shared by the coordinator parent and its forked workers. */ export declare const SYNC_WORKER_PROTOCOL_VERSION = 1; export type SyncWorkerTarget = { /** Stable target identities, never credentials or a credential reference. */ readonly uids: readonly string[]; }; export type WorkerWorkSlice = { readonly id: string; readonly target: SyncWorkerTarget; readonly work: SyncWork; readonly paths: readonly ScheduledPath[]; }; export type WorkerExecuteMessage = { readonly protocol: typeof SYNC_WORKER_PROTOCOL_VERSION; readonly type: "execute"; readonly requestId: string; readonly slice: WorkerWorkSlice; }; export type WorkerCancelMessage = { readonly protocol: typeof SYNC_WORKER_PROTOCOL_VERSION; readonly type: "cancel"; readonly requestId: string; }; export type WorkerShutdownMessage = { readonly protocol: typeof SYNC_WORKER_PROTOCOL_VERSION; readonly type: "shutdown"; }; export type WorkerParentMessage = WorkerExecuteMessage | WorkerCancelMessage | WorkerShutdownMessage; export type WorkerReadyMessage = { readonly protocol: typeof SYNC_WORKER_PROTOCOL_VERSION; readonly type: "ready"; readonly pid: number; /** Per-process state marker used to prove module-global isolation. */ readonly moduleStateId: string; }; export type WorkerProgressMessage = { readonly protocol: typeof SYNC_WORKER_PROTOCOL_VERSION; readonly type: "progress"; readonly requestId: string; readonly phase: "pre-mutation" | "post-mutation" | "pre-result"; }; export type WorkerOutcomeMessage = { readonly protocol: typeof SYNC_WORKER_PROTOCOL_VERSION; readonly type: "outcome"; readonly requestId: string; readonly outcome: WorkOutcome; }; export type WorkerChildMessage = WorkerReadyMessage | WorkerProgressMessage | WorkerOutcomeMessage; /** * Turn the in-process slice into the intentionally smaller cross-process form. * AbortSignal and any caller-owned context are deliberately absent from this form. */ export declare function toWorkerExecuteMessage(slice: WorkSlice): WorkerExecuteMessage; /** Reject accidental credential-bearing context before it reaches IPC. */ export declare function assertSafeWorkerMessage(message: WorkerParentMessage | WorkerChildMessage): void; export declare function isWorkerParentMessage(value: unknown): value is WorkerParentMessage; export declare function isWorkerChildMessage(value: unknown): value is WorkerChildMessage; //# sourceMappingURL=sync-worker-port.d.ts.map