/** Code-unit lexical order — the shared comparator for every id sort here. */ export declare function compareCodeUnits(left: string, right: string): number; export declare function isRecord(value: unknown): value is Record; /** Exact key set, order-insensitive: a persisted envelope admits no extra keys. */ export declare function hasExactKeys(value: Record, expected: readonly string[]): boolean; export declare function isSha256(value: unknown): value is string; /** Full sha1/sha256 commit id — the only form a baseline may take. */ export declare function isCommit(value: unknown): value is string; export declare function requireNonEmptyString(value: unknown, label: string): string; export declare function stringArray(value: unknown): readonly string[] | null; /** Element-wise equality of two string arrays (order-significant). */ export declare function sameStrings(left: readonly string[], right: readonly string[]): boolean; /** The dedupe key for an accepted binding: work item × prompt digest. */ export declare function bindingIdentity(entry: { readonly work_item_id: string; readonly prompt_sha256: string; }): string; /** * The run-scoped paths one host-handoff boundary lives at. * * Both twins resolved these with the same three calls (`assertSubmissionRunId`, * containment on the artifacts dir, containment on `runs/`), differing * only in whether the run directory carried a sub-segment. The sub-segment is a * parameter here, not a fork: remediate's run dir sits under `runs//implement` * because its runs dir also holds triage/closing lanes; audit's sits directly * under `runs/`. */ export interface HostHandoffPaths { /** Absolute repository root everything is contained beneath. */ readonly root: string; /** Absolute artifacts dir (`.audit-tools//`). */ readonly artifactsDir: string; /** Absolute run directory the workload and results live under. */ readonly runDir: string; /** Absolute directory submissions land in. */ readonly resultDir: string; /** Absolute path of the persisted workload document. */ readonly workloadPath: string; } /** * Resolve the run-scoped boundary paths. Throws when the run id leaves the * shared grammar or either declared root escapes containment — before any * caller has a path to write to. */ export declare function resolveHostHandoffPaths(params: { readonly root: string; readonly artifactsDir: string; readonly runId: string; /** * Segments between the RUN DIRECTORY and its lane sub-directory — i.e. AFTER * the run id: `runs//`. Empty for audit's flat * `runs//`; `["implement"]` for remediate's lane-scoped one. Order is * load-bearing: validators join submissions to their run by the FIRST path * segment under `runs/`, so the run id must stay that segment. */ readonly runDirSegments?: readonly string[]; /** Names this draw in the run-id refusal (`Invalid