import { type ProcessRunner } from "../providers/process.js"; import { type WorkerPaneAdapter } from "./panes.js"; export interface WorkerDeliveryStatus { readonly dispatch_id: string; readonly worker_activity: "idle" | "working" | "blocked" | "done"; readonly worker_health: "healthy" | "parked" | "stalled" | "stopped"; readonly session_state: "running" | "parked" | "stalled" | "stopped" | null; readonly pane_id: string | null; readonly pane_live: boolean; } export interface WorkerDeliveryService { deliver(eventId: string): Readonly<{ status: "processed" | "replayed"; outcome: Record; }>; park(dispatchId: string, reason: string, parkedUntil: string): WorkerDeliveryStatus; resume(dispatchId: string): WorkerDeliveryStatus; stop(dispatchId: string, reason: string): WorkerDeliveryStatus; observe(dispatchId: string): WorkerDeliveryStatus; } export declare function createWorkerDeliveryService(options: { readonly packageRoot: string; readonly configRoot?: string; readonly workspaceRoot: string; readonly stateRoot: string; readonly executablePath: string; readonly env?: NodeJS.ProcessEnv; readonly runner?: ProcessRunner; readonly panes?: WorkerPaneAdapter; readonly clock?: () => string; }): WorkerDeliveryService;