histoire
Version:
A fast story book powered by Vite
18 lines • 1.09 kB
TypeScript
import type { JobState } from '@histoire/shared';
import type { JobRunnerOptions } from './types.js';
/** Creates a server-owned project lane; browser disconnection never cancels it. */
export declare function createJobRunner(options: JobRunnerOptions): {
/** Claims the project, freshly verifies the reviewed plan, then starts background work. */
start(planId: string, hash: string): Promise<JobState>;
/** Reads latest state, completing disk receipts against a loaded successor. */
current(): Promise<JobState | null>;
/** Resumes exactly one user-confirmed config write owned by this generation. */
continue(jobId: string): Promise<void>;
/** Cancels only cancellable work and returns after process tree and restoration settle. */
cancel(jobId: string): Promise<void>;
/** Joins finite execution through handoff; successor load confirmation is separate. */
wait(): Promise<void>;
/** Attaches progress without acquiring execution ownership. */
subscribe(listener: (job: JobState) => void): () => void;
};
//# sourceMappingURL=runner.d.ts.map