import type { LabelingGroup } from "./group.js"; import { type SessionAction, type SessionSnapshot } from "./session.js"; import { type Annotator, type LabelStoreFaultPoint } from "./types.js"; export type MonotonicClock = { elapsedMs(): number; }; export type WallClock = { nowIso(): string; }; export type EntityIds = { questionId(): string; }; export type OpenLabelingSessionArgs = { /** The runs being labelled, already resolved (`resolveLabelingGroup`). */ group: LabelingGroup; checklistFile: string; annotator: Annotator; /** Start the cursor on this trace when present; an id that is not in the * group is ignored. */ focusTraceId?: string; reportWarning(message: string): void; }; /** @internal */ export type ControllerFaultPoint = LabelStoreFaultPoint | "before-checklist-id-allocation" | "after-pending-revision-save" | "after-draft-rebind" | "after-pending-annotation-save" | "after-annotation-commit-save"; /** @internal */ export type ControllerDependencies = { monotonicClock: MonotonicClock; wallClock: WallClock; ids: EntityIds; fault?(point: ControllerFaultPoint): void; }; export type LabelingSessionController = { snapshot(): SessionSnapshot; dispatch(action: SessionAction): Promise; close(): Promise; }; export declare function openLabelingSession(args: OpenLabelingSessionArgs): Promise; /** @internal Test seam. Fault injection never reaches the application API. */ export declare function createLabelingSessionOpener(dependencies: ControllerDependencies): (args: OpenLabelingSessionArgs) => Promise;