import { z } from "zod"; /** Where a session's checklist stands. `unpublished` is legal only while the * session is still carrying its own version-1 pending revision — an active * session can never be bound to nothing. */ export declare const ChecklistBindingSchema: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"published">; version: z.ZodNumber; hash: z.ZodString; }, z.core.$strict>]>; export type ChecklistBinding = z.infer; export declare const SessionBindingSchema: z.ZodObject<{ traceIds: z.ZodArray; checklistId: z.ZodString; checklist: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"published">; version: z.ZodNumber; hash: z.ZodString; }, z.core.$strict>]>; annotator: z.ZodObject<{ kind: z.ZodEnum<{ human: "human"; grader: "grader"; judge: "judge"; harness: "harness"; }>; id: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; export type SessionBinding = z.infer; export declare const PendingRevisionSchema: z.ZodObject<{ revision: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; checklistId: z.ZodString; name: z.ZodString; version: z.ZodNumber; parentVersion: z.ZodNullable; createdAt: z.ZodString; hash: z.ZodString; questions: z.ZodArray>; }, z.core.$strict>; expectedParentVersion: z.ZodNullable; expectedParentHash: z.ZodNullable; }, z.core.$strict>; export declare const DraftSchema: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; sessionId: z.ZodString; binding: z.ZodObject<{ traceIds: z.ZodArray; checklistId: z.ZodString; checklist: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"published">; version: z.ZodNumber; hash: z.ZodString; }, z.core.$strict>]>; annotator: z.ZodObject<{ kind: z.ZodEnum<{ human: "human"; grader: "grader"; judge: "judge"; harness: "harness"; }>; id: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; currentIndex: z.ZodNumber; answersByTraceId: z.ZodRecord>; notesByTraceId: z.ZodRecord; reviewedByTraceId: z.ZodRecord>; stagedQuestions: z.ZodNullable>>; pendingRevision: z.ZodNullable; checklistId: z.ZodString; name: z.ZodString; version: z.ZodNumber; parentVersion: z.ZodNullable; createdAt: z.ZodString; hash: z.ZodString; questions: z.ZodArray>; }, z.core.$strict>; expectedParentVersion: z.ZodNullable; expectedParentHash: z.ZodNullable; }, z.core.$strict>>; pendingAnnotation: z.ZodNullable; checklist: z.ZodString; version: z.ZodNumber; hash: z.ZodString; answers: z.ZodRecord; note: z.ZodString; activeMs: z.ZodOptional; v: z.ZodLiteral<1>; id: z.ZodString; traceId: z.ZodString; createdAt: z.ZodString; annotator: z.ZodObject<{ kind: z.ZodEnum<{ human: "human"; grader: "grader"; judge: "judge"; harness: "harness"; }>; id: z.ZodString; }, z.core.$strict>; sessionId: z.ZodOptional; }, z.core.$strict>>; activeMsByTraceId: z.ZodRecord; }, z.core.$strict>; export type Draft = z.infer; /** A draft lives beside the checklist it is bound to, so a run directory shows * which checklists have labeling in flight: `checklists//drafts/.json`. */ export declare function draftPath(dir: string, checklistId: string, sessionId: string): string; export declare function saveDraftFile(dir: string, draft: Draft): void; export declare function loadDraftFile(dir: string, checklistId: string, sessionId: string): Draft | undefined; export type DraftBindingCheck = { traceIds: string[]; checklistId: string; annotator: { kind: string; id: string; }; }; /** * A draft may only be resumed against exactly the session it was made for. * * Trace ORDER is part of that: answers are stored by trace id, but the * cursor is an index, so resuming against a reordered source would put a * person in front of a different trace than the one their position implies. */ export declare function assertDraftMatches(draft: Draft, expected: DraftBindingCheck): void; /** The bootstrap rule, stated once. An unpublished binding is only ever legal * while the session still holds its own version-1 pending revision. */ export declare function assertBindingIsCoherent(draft: Draft): void;