/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */ /** Content hash of a file's current working-tree bytes. Binary-safe (raw bytes, not text). Returns null when the path does not exist on disk (a working-tree deletion). */ export declare function hashWorkingTreeFile(cwd: string, relativePath: string): string | null; /** path -> content hash at launch (null = the dirty path did not exist on disk, e.g. an unstaged deletion). */ export type DirtyLaunchSnapshot = ReadonlyMap; /** * Snapshot every dirty path (staged + unstaged + untracked) in `cwd`'s * working tree right now, each with a content hash. Call once at engine * launch, before any phase of this run has had a chance to touch anything. * Never throws: a git failure (e.g. `cwd` is not a repo) degrades to an * empty snapshot, which makes the exclusion guard a no-op (today's * behavior) rather than blocking commits. */ export declare function snapshotDirtyTree(cwd: string): DirtyLaunchSnapshot; /** Result of partitioning a scoped commit's candidate paths against the launch snapshot. */ export interface ScopedCommitExclusion { readonly included: readonly string[]; readonly excluded: readonly string[]; } /** * Partition `candidatePaths` into paths safe to include in a scoped commit * vs. paths that must be excluded because they are untouched launch-dirty * residue. A path is excluded only when BOTH: * - it appears in `launchSnapshot` (it was already dirty before this run), AND * - its current content hash equals the hash recorded at launch (this run * never actually changed it). * Everything else is included, a path absent from the snapshot was clean * at launch (this run is what dirtied it), and a path whose hash changed * was genuinely touched by this run even though it started out dirty. */ export declare function excludeUntouchedLaunchResidue(cwd: string, candidatePaths: readonly string[], launchSnapshot: DirtyLaunchSnapshot): ScopedCommitExclusion; //# sourceMappingURL=dirty-guard.d.ts.map