import { HostProcessRegistry } from "./processes.js"; export type WorkflowHostOptions = { cwd: string; runnerId?: string; /** Explicit store path; defaults to the project-scoped controller store. */ storeFile?: string; /** Explicit run-bundle root; defaults to the shared runs directory. */ runsDir?: string; registry?: HostProcessRegistry; piArgs?: string[]; /** Extra environment for headless children (for example a test provider). */ env?: Record; /** Poll interval for the claim loop; tests use a faster cadence. */ claimPollMs?: number; onLog?: (message: string) => void; }; /** * The always-on runner: claims parked workflow runs and reconciles durable * controllers without a Pi session. Conversation nodes execute in headless * `pi --mode rpc` children. Everything the host does is recoverable: claims * expire, bundles fence stale writers, and child processes are reaped by * the next host. */ export declare class WorkflowHost { private readonly options; private readonly runnerId; private readonly registry; private readonly store; private readonly childRunStore; private manager; private pollTimer; private readonly activeRuns; private readonly schedulerExecutors; /** Runs whose resume refused (edited source); skipped until a host restart. */ private readonly skippedRuns; private stopping; private readonly stateDir; constructor(options: WorkflowHostOptions); private log; /** Take the advisory lock, reap orphans, and start claiming. */ start(): Promise; /** Drain: stop claiming, park in-flight runs, stop controllers, kill children. */ stop(): Promise; private readonly parkedEngines; private claimOnce; private runClaimed; private failUnresumable; private recordEvent; }