import { type ChildProcess } from 'node:child_process'; import type { NativeContentSnapshotManifest, NativeProjectPaths, NativeSnapshotPolicy } from './native-types.js'; export declare const DEFAULT_NATIVE_SNAPSHOT_LIMITS: { readonly maxFiles: 10000; readonly maxFileBytes: number; readonly maxTotalBytes: number; readonly maxManifestBytes: number; }; interface SnapshotOptions { now?: Date; origin?: NativeContentSnapshotManifest['origin']; limits?: Partial; policy?: Pick | NativeSnapshotPolicy; denylist?: readonly string[]; gitSelectionLimits?: Partial; gitSelectionHooks?: NativeGitSelectionHooks; physicalSelectionLimits?: Partial; physicalSelectionHooks?: NativePhysicalSelectionHooks; /** * Shared execution budget. Git subprocesses are terminated at expiry. Physical-tree traversal * checks it before and after each filesystem operation; Node cannot cancel an in-flight fs call. */ deadlineMs?: number; gitProcess?: NativeGitProcessAdapter; /** * When set, the snapshot reuses baseline entry hashes for Git-tracked files whose blob object id * is unchanged since baseline, instead of re-reading and re-hashing them. Only changed, added, * and working-tree-modified files are captured from disk. The resulting manifest is byte-for-byte * equivalent to a full snapshot (same entries ⇒ same projection hash). Ignored for non-Git * projects and when baseline entries lack the recorded gitObjectId. */ incrementalBaseline?: NativeContentSnapshotManifest; } interface NativeGitProcessAdapter { command: string; argsPrefix?: readonly string[]; terminateTree?: (child: ChildProcess) => void | Promise; } interface NativeGitSelectionLimits { maxRecords: number; maxBytes: number; maxRecordBytes: number; } interface NativePhysicalSelectionLimits { maxNodes: number; maxBytes: number; maxPathBytes: number; } interface NativePhysicalSelectionHooks { afterInitialSelection?: () => void | Promise; afterNode?: (relative: string) => void | Promise; } interface NativeGitSelectionHooks { afterStageBefore?: () => void | Promise; afterCombined?: () => void | Promise; afterInitialSelection?: () => void | Promise; afterFirstEntryCaptured?: (relative: string) => void | Promise; afterContentRevalidation?: () => void | Promise; outputChunkBytes?: number; } export interface NativeContentSnapshotHealth { complete: boolean; omittedCount: number; recordedOmissionCount: number; overflowCount: number; samplePaths: string[]; sampleTruncated: boolean; } export declare function inspectNativeContentSnapshotHealth(value: NativeContentSnapshotManifest, options?: { maxRecordedPaths?: number; }): NativeContentSnapshotHealth; type SnapshotPatternMatcher = (relative: string, hasBudget?: () => boolean) => boolean; export declare function compileNativeSnapshotPattern(pattern: string): SnapshotPatternMatcher; export declare function parseNativeContentSnapshotManifest(value: unknown): NativeContentSnapshotManifest; /** * Projects a legacy physical-tree snapshot onto the same Git-owned universe used by new * snapshots. This keeps existing v1 baselines usable after ignored directories and nested * repositories stop participating in Native evidence. */ export declare function filterNativeContentSnapshotToProjectScope(paths: NativeProjectPaths, value: NativeContentSnapshotManifest, options?: Pick): Promise; export declare function nativeBaselineManifestFile(paths: NativeProjectPaths, name: string): string; export declare function createNativeContentSnapshot(paths: NativeProjectPaths, options?: SnapshotOptions): Promise; export declare function createNativeCurrentContentSnapshot(paths: NativeProjectPaths, baseline: NativeContentSnapshotManifest, options?: Pick): Promise; export declare function writeNativeBaselineManifest(paths: NativeProjectPaths, name: string, manifest: NativeContentSnapshotManifest): Promise; export declare function readNativeBaselineManifest(paths: NativeProjectPaths, name: string): Promise; export {}; //# sourceMappingURL=native-snapshot.d.ts.map