import { Cache, CacheStore } from './Cache.ts'; import type { FileSystem } from './FileSystem.ts'; import { IndexedStringKeyMap } from './directory-snapshot-path-index.ts'; import { type Snapshot } from './Snapshot.ts'; import type { DirectorySnapshot } from './directory-snapshot.ts'; type PersistedStaleReason = 'token_changed' | 'dep_changed' | 'shape_mismatch' | 'policy_nonpersistable'; type DirectorySnapshotHitSource = 'memory' | 'persisted'; type PersistedInvalidationPriority = 'immediate' | 'background'; type CacheMetricCounter = 'memory_hit' | 'memory_miss' | 'persisted_hit' | 'persisted_miss' | 'rebuild_count' | 'invalidation_evictions_path' | 'invalidation_evictions_dep_index' | 'invalidation_fallback_runs' | 'invalidation_fallback_due_to_missing_dependency_metadata' | 'invalidation_fallback_due_to_dependency_index_unavailable' | 'invalidation_fallback_targeted_missing_dependency_nodes'; export declare class Session { #private; static for(fileSystem: FileSystem, snapshot?: Snapshot, cache?: Cache): Session; static reset(fileSystem: FileSystem, snapshotId?: string): void; readonly snapshot: Snapshot; readonly inflight: Map>; readonly cache: CacheStore; readonly directorySnapshots: IndexedStringKeyMap>; readonly directorySnapshotBuilds: IndexedStringKeyMap; shouldIncludeSelf: boolean; skipPersist?: boolean; }>>; private constructor(); get usesPersistentCache(): boolean; getFunctionId(value: unknown, prefix?: string): string; createValueSignature(value: unknown, prefix?: string): string; createDirectorySnapshotKey(options: { directoryPath: string; mask: number; filterSignature: string; sortSignature: string; basePathname?: string | null; rootPath?: string; }): string; markInvalidatedDirectorySnapshotKey(snapshotKey: string): void; isDirectorySnapshotKeyInvalidated(snapshotKey: string): boolean; clearDirectorySnapshotKeyInvalidation(snapshotKey: string): void; hasInvalidatedDirectorySnapshotKeys(): boolean; recordCacheMetric(counter: CacheMetricCounter, increment?: number): void; recordPersistedStaleReason(reason: PersistedStaleReason): void; recordDirectorySnapshotLookup(snapshotKey: string): void; recordDirectorySnapshotHit(snapshotKey: string, source: DirectorySnapshotHitSource): void; recordDirectorySnapshotMiss(snapshotKey: string, source: DirectorySnapshotHitSource): void; recordDirectorySnapshotRebuild(snapshotKey: string, reason: string): void; getWorkspaceChangeToken(rootPath: string): Promise; getWorkspaceChangedPathsSinceToken(rootPath: string, previousToken: string): Promise | null>; getRecentlyInvalidatedPaths(): ReadonlySet | undefined; waitForPendingInvalidations(): Promise; invalidatePath(path: string, options?: { priority?: PersistedInvalidationPriority; }): void; invalidatePaths(paths: Iterable, options?: { priority?: PersistedInvalidationPriority; }): void; reset(): Promise; } export {};