/** * Where a prerequisite resolves on disk: its declared path, the numbered * filename prefix `request init` writes, and the historical session-root tiers. * * THE ONE RESOLVER. The transition (`checkPrerequisites`) and the commit gate * (`checkExpiredBackCompatCommitGate`) both ask this module, so a numbered * prefix or a legacy root that one honours cannot be misread by the other. * It lives here, rather than in `artifact-prerequisites.ts`, because that file * is over the file-size cap and a change may only shrink it. */ import type { ArtifactPrerequisite } from './artifact-prerequisites.js'; export declare function resolvePrerequisitePath(prerequisite: ArtifactPrerequisite, requestId: string): string; /** The two session-root tiers the resolver probes: the canonical session home * and the pre-F3 legacy one. ONE constructor, so the transition and the commit * gate cannot disagree about where a session's evidence lives. */ export type SessionRoots = { canonical: string | null; legacy: string | null; }; export declare function sessionRootsFor(projectRoot: string, sessionId: string | undefined): SessionRoots; /** * Resolve a prerequisite to an on-disk path, with a 2-tier fallback * dirs are no longer created): * 1. `/` (post-F3 canonical session * home, when `canonicalSessionRoot` is provided). * 2. `/` (pre-F3 legacy session home, * when `legacySessionRoot` is provided). * Tolerates the numbered filename prefix that `request init` writes * (e.g. `001-.md`) at every tier. Returns the matched absolute * path, or null when nothing matches. * * Back-compat: once neither primary session-root tier resolved, the * resolver walks `prerequisite.legacyRelativePaths` in declared order * and tries each at BOTH session roots before declaring the prereq * missing. This covers both artifacts that moved location * (`rd/security-review.md` → `audit/security.md`) and ones that later * gained a rid in the filename (`audit/security.md` → */ export declare function resolvePrerequisiteAbsolutePathWithFallback(canonicalSessionRoot: string | null, legacySessionRoot: string | null, prerequisite: ArtifactPrerequisite, requestId: string): Promise;