import type { ClassifierInput } from './types/classifierInput'; import type { JourneyName, JourneyRef, JourneyResult } from './types/contract'; export type StepRunner = (attempt: number) => Promise; export type HandleOptions = { flow: JourneyName; maxAttempts: number; /** * Resolved at settlement, not at construction: a new applicant has no * `entityId` until search/submit has run, so snapshotting it when the handle * is built reports `null` for every first-time journey. */ ref: () => JourneyRef; onTerminal?: (result: JourneyResult) => Promise | void; onCleanup?: () => void; /** * Empty the container as part of settlement instead of waiting for the host * to call `destroy()`. Set when there is no terminal screen to leave on * screen (`withResult: false`), so `await start()` resolves with a container * the host can immediately reuse. * * Never set alongside a terminal screen: you cannot auto-empty a container * whose current job is showing one. */ cleanupOnSettle?: boolean; }; export type JourneyHandle = { start: () => Promise; stop: () => void; destroy: () => void; }; export declare const mkJourneyHandle: (deps: { runStep: StepRunner; options: HandleOptions; }) => JourneyHandle; //# sourceMappingURL=journeyHandle.d.ts.map