import { type ReadRunDirectoryOptions, type RunDirectorySnapshot } from "../../runDirectory/runDir.js"; import type { Fields } from "./types.js"; /** * What a labeling session is over: a group (one directory of run directories) * and the runs in it that can be labeled, each pinned to its directory and * its one trace. Resolving this value is the whole discovery rule for * `agency label `; downstream code never correlates paths with * snapshots again, and cannot see two runs claiming one trace id. */ export type LabelingRun = { dir: string; traceId: string; snapshot: RunDirectorySnapshot; /** What the screen shows for this run. */ fields: Fields; }; export type LabelingGroup = { /** Where the checklist lineage and session drafts live: the runs' parent. */ dir: string; runs: LabelingRun[]; }; /** * Walk the paths like every other command over runs (`findRunDirectories`), * drop aliases of one physical directory, require one common parent, read * each run, skip the ones that wrote no trace, and refuse two physical * directories that carry the same trace id (the session is keyed by trace * id, so their answers would collide and a sign-off could land in the wrong * directory). One run directory on its own is a group of one: its parent is * the group. */ export declare function resolveLabelingGroup(paths: string[], options: ReadRunDirectoryOptions): LabelingGroup; /** The field the screen shows when a trace recorded no output. Its text is * marked so nobody mistakes a mid-conversation message for the result. */ export declare const LAST_MESSAGE_FIELD = "last_message";