import { z } from "zod"; export declare const NO_PROMPT_TURN = "turn"; /** Where a payload that never named a session keeps its turn state; hosts mint opaque session ids, so this name is theirs alone. */ export declare const NO_SESSION_ID = "_no-session"; export declare const turnDir: (sessionId: string, promptId: string | undefined) => string; declare const fileStartSchema: z.ZodObject<{ path: z.ZodString; original: z.ZodNullable; }, z.core.$strip>; export type FileStart = z.infer; /** The content a file had when this turn first touched it. Only the first record counts. */ export declare const recordFileStart: (dir: string, absolutePath: string, original: string | null) => void; export declare const readFileStarts: (dir: string) => FileStart[]; /** Stop judges these again: a block the agent ignored must not end the turn quietly. */ export declare const recordBlockedFile: (dir: string, relativePath: string) => void; export declare const readBlockedFiles: (dir: string) => Set; declare const checkedSchema: z.ZodObject<{ path: z.ZodString; before: z.ZodNullable; after: z.ZodString; }, z.core.$strip>; /** An edit a check judged, as blob ids on either side of it. */ export type CheckedEdit = z.infer; /** All kept: Stop walks them as a chain from turn start to the file as it stands. */ export declare const recordChecked: (dir: string, record: CheckedEdit) => void; export declare const readChecked: (dir: string) => CheckedEdit[]; declare const toolCallEntrySchema: z.ZodObject<{ order: z.ZodNumber; name: z.ZodString; summary: z.ZodString; }, z.core.$strip>; /** One entry of the turn's tool-call log: which tool ran, in what order, with what shape of input. */ export type ToolCallEntry = z.infer; /** Names and argument shapes only: a long string, or any file-text field, collapses to "[N chars]", so no file body lands in the log. */ export declare const callSummary: (input: unknown) => string; /** One call joins the turn's log, numbered in call order and capped at the turn's bound. First-write-wins files, like the rest of the turn state. */ export declare const recordToolCall: (dir: string, name: string, input: unknown) => void; /** The turn's log in call order. A missing or corrupt entry degrades to no log, never a throw. */ export declare const readToolCalls: (dir: string) => ToolCallEntry[]; export declare const blockCount: (dir: string, key: string) => number; export declare const incrementBlock: (dir: string, key: string) => number; export declare const stopCheckCount: (dir: string) => number; export declare const incrementStopChecks: (dir: string) => number; export declare const unknownPayloadCount: (dir: string) => number; export declare const incrementUnknownPayloads: (dir: string) => number; /** The prompt that started the turn, for hosts that send it instead of a transcript. */ export declare const writePrompt: (dir: string, prompt: string) => void; export declare const readPrompt: (dir: string) => string | undefined; /** The git tree the working tree was at when the turn began, when a turn-start hook recorded one. */ export declare const writeBaseline: (dir: string, tree: string) => void; export declare const readBaseline: (dir: string) => string | undefined; /** * What became of the turn-start snapshot. Absent on a repository without git, * where the per-file fallback is the documented mode. `pending` means the * hook died before it could say, which for the Stop check is the same as * failed: the turn cannot be read back whole. */ export type BaselineStatus = "pending" | "ok" | "failed"; export declare const markBaseline: (dir: string, status: BaselineStatus) => void; export declare const readBaselineStatus: (dir: string) => BaselineStatus | undefined; export declare const hasTurnState: (dir: string) => boolean; export declare const clearTurn: (dir: string) => void; export declare const pruneOldTurns: (now?: number) => void; export {}; //# sourceMappingURL=session.d.ts.map