export declare class HarnessLockBusyError extends Error { constructor(lockPath: string); } export interface HarnessLock { release(): void; } /** * Exclusive harness lock via atomic O_EXCL lockfile creation (spec ยง7). Guards * vat-vs-vat staging/result races for the same subject set. `wait: false` * fails fast; the default `wait: true` is reserved for the CLI to poll (v1 * keeps the simple fail-fast โ€” the CLI surfaces the busy message). */ export declare function acquireHarnessLock(harnessRoot: string, opts?: { wait?: boolean; }): HarnessLock; export interface InstallSignalCleanupOptions { /** * Invoked once on the first trapped signal, BEFORE exiting โ€” the place to * release the harness lock and remove the harness dir so a Ctrl-C mid-run does * not leave `.vat-skill-test.lock` (or staged untrusted bytes) behind. */ onSignal: () => void; /** * Exit hook, injectable for tests. Defaults to `process.exit`. Called with the * conventional 128+signal code so the signal is honored, not swallowed. */ exit?: (code: number) => void; } /** * Trap SIGINT/SIGTERM while the harness lock is held. On the first such signal * the handler removes ITSELF (no listener leak, no re-entry), runs `onSignal` * (release lock + clean up), then exits with the conventional 128+signal code. * * Returns a disposer that removes the handlers โ€” the caller MUST call it on * normal completion so listeners do not accumulate across runs in a long-lived * process (and so tests stay isolated). */ export declare function installSignalCleanup(opts: InstallSignalCleanupOptions): () => void; //# sourceMappingURL=lock.d.ts.map