export declare class CiSpecRefError extends Error { readonly exitCode: number; constructor(message: string, exitCode?: 1 | 2); } /** Relative path only — resolved against the directory styleproof-ci runs in, like * every other `--spec` in the toolchain (a workflow may run the CLI from a * subdirectory, e.g. `working-directory: hud`). Rejects absolute paths and paths * that escape upward. */ export declare function normalizeRepoRelativeSpec(spec: string, cwd: string): string; /** Resolve a possibly-symbolic `--spec-ref` to a commit SHA in the CONSUMER * checkout. Inside the detached base worktree `HEAD` IS `--base` (so * `--spec-ref HEAD` silently overlays the base's own spec — a no-op defeating * the flag) and `FETCH_HEAD`/`MERGE_HEAD` are per-worktree pseudo-refs that * don't exist there at all. Resolving to a SHA before entering the worktree * makes the ref mean what it meant where the user typed it; the SHA itself * resolves everywhere since worktrees share one object store. */ export declare function resolveSpecRefToSha(specRef: string, cwd: string): string; export declare function assertResolvableSpecRef(specRef: string, cwd: string): void; export declare function assertSpecAtRef(spec: string, specRef: string, cwd: string): void; export type SpecRefOverlay = { spec: string; paths: string[]; dirtyAllow: string[]; restore: () => void; }; /** An explicit spec ref owns the capture harness, even when product commits do not track it. */ export declare function shouldApplySpecRefOverlay(_specExistsAtCheckout: boolean, specRef: string): boolean; /** * Overlay `spec` and its colocated test harness with blobs from `specRef`, while * leaving application code and package metadata pinned to the base checkout. * Tracked base files are marked assume-unchanged; head-only harness files are * covered by `dirtyAllow`. The returned restore handle must run before leaving * the base checkout. */ export declare function applySpecRefOverlay(options: { spec: string; specRef: string; cwd: string; }): SpecRefOverlay;