import type { FileInfo, ResolveFileOptions } from "../../base.js"; import { VeryfrontOperationsBase } from "./base-operations.js"; export declare class StatOperations extends VeryfrontOperationsBase { private fileIndex; private directoryIndex; private buildingIndex; private indexBuiltAt; private indexBuildLockResolver; private indexBuildLockPromise; private pathMapping; private readonly apiSearchCircuitBreaker; stat(path: string): Promise; private statWithoutSpan; private ensureIndexBuilt; private buildIndex; clearIndex(): void; /** * Restart the authority window for the index already in memory, after the * API has confirmed the listing it was built from is still current. * * `INDEX_AUTHORITY_LIMIT_MS` bounds a poke that never arrived, so crossing * it has to cost one re-check -- not one per probe. A refresh that comes * back unchanged is exactly that re-check: it just compared this snapshot * against the API and found nothing new, which is stronger evidence than * the build that opened the window. Without renewing here the index stays * expired, and every distinct module probe pays its own refresh forever -- * the fan-out this gate removes, returning after five minutes. * * This cannot become "never re-check again": only a completed refresh calls * it, so each renewal costs one verified listing fetch and the next window * expires on the same timer. An edit is still seen the moment its poke * lands, because `clearIndex` drops the index outright. */ renewIndexAuthority(): void; /** * Whether the built index is the complete file listing for the snapshot * being rendered, and may therefore answer "this path does not exist" * without asking the API. * * The index is built from `loadAllProjectFiles`, the same listing that * serves every positive answer this render gives. A path missing from it is * missing from the snapshot, so re-asking the API for that exact path can * only re-derive the answer the index already holds -- which is what turned * one preview render into dozens of file-listing requests. * * This authority covers exact-path lookups only. `resolveFile`'s pattern * search still runs on a miss: it is the documented safety net for a listing * that came back incomplete, and it searches spellings the index was never * asked about. * * The authority lasts exactly as long as the index: every invalidation path * (`clearMemoryCaches`, snapshot replacement, token or branch change, * `dispose`) calls `clearIndex`, so an edit can never be answered from a * pre-edit listing. */ isIndexAuthoritative(): boolean; getOriginalApiPath(normalizedPath: string): string; private getAllFilesRaw; private buildResolveSearchPatterns; private normalizeMatchedPaths; private tryResolveViaApiSearch; private hasCachedFileList; private resolveFromIndex; exists(path: string): Promise; resolveFile(basePath: string, options?: ResolveFileOptions): Promise; } //# sourceMappingURL=stat-operations.d.ts.map