import { ToolContext } from '../types.js'; export interface SelectedRoots { /** Shared workflow root — the directory that contains `.spec-workflow`. */ workflowRoot: string; /** The checkout whose code is read, diffed and compiled. */ workspacePath: string; } /** * Maximum number of override values kept in the derivation and warn-once * ledgers. * * Both are keyed by a string an agent supplies on every call, so neither may * grow without bound: a client that sends a fresh `projectPath` each time would * otherwise leak an entry per call for the lifetime of the process. Eviction is * FIFO — a `Map` iterates in insertion order, so the first key is the oldest — * which costs at most a repeated git derivation for an override that has aged * out, never a wrong answer. */ export declare const ROOT_SELECTION_CACHE_LIMIT = 32; /** Test-only: clears this module's derivation cache and warn-once ledger. */ export declare function _resetRootSelection(): void; /** Test-only: current number of memoized override derivations. */ export declare function _rootSelectionCacheSize(): number; /** Test-only: current number of keys in the warn-once ledger. */ export declare function _rootSelectionWarnLedgerSize(): number; /** * Picks the workflow root and the workspace path for one tool invocation. * * A non-empty string `args.projectPath` is an override; anything else (absent, * empty, or not a string) falls back to the context, which is the only source * that can be trusted to hold two coherent roots. */ export declare function selectRoots(args: { projectPath?: unknown; } | undefined, context: ToolContext): SelectedRoots; //# sourceMappingURL=root-selection.d.ts.map