/** Clear the resolution cache — TEST USE ONLY. */
export declare function clearDataDirCache(): void;
/**
 * Resolve the data dir for `projectId`, walking ancestors of cwd and of the
 * registered projectPath when the cwd-relative dir lacks the anchor file.
 *
 * Result is cached per session: the first successful (or unsuccessful)
 * resolution sticks, so repeated reads do not pay the I/O cost.
 *
 * Returns null when no `knowledge.json` is found anywhere — callers should
 * treat that as "project not initialized in any reachable location".
 *
 * @param projectId Project hash identifier.
 * @param cwd       Optional working directory override (defaults to
 *                  `process.cwd()`). Exposed for tests, where Vitest workers
 *                  cannot mutate the real process cwd.
 */
export declare function resolveProjectDataDir(projectId: string, cwd?: string): Promise<string | null>;
/**
 * Discover an existing data file for `projectId`. Returns the absolute path
 * when the resolved data dir contains `<relative>`, or null otherwise.
 *
 * Anchored on `knowledge.json` — if no project owns the dir, no file is
 * returned even if a same-named file happens to live in another repo's
 * `data/projects/<id>/` tree.
 *
 * @param projectId Project hash identifier.
 * @param relative  Path under `data/projects/<id>/`, e.g. "specs.json".
 */
export declare function discoverProjectDataFile(projectId: string, relative: string, cwd?: string): Promise<string | null>;
//# sourceMappingURL=data-dir-discovery.d.ts.map