import type { EntryShape } from "../../types.js"; /** * Internal representation of an entry's data, used by batch primitives * (diff/merge/cherry-pick/revert/detach) to apply pre-fetched rows back into * `fs_entries` without re-reading or re-hashing content. Mirrors the public * `EntryShape` from `types.ts`, but holds a raw `Uint8Array` blob hash for * direct binding to PostgreSQL. `mtime` is the source row's mtime; the write * path stamps `now()` regardless and ignores this field. */ export interface InternalEntryShape { type: "file" | "directory" | "symlink"; blobHash: Uint8Array | null; symlinkTarget: string | null; mode: number; sizeBytes: number; mtime: Date; } /** * Semantic equality for entry shapes. Compares `type`, `blob_hash`, * `symlink_target`, and `mode`. Ignores `mtime`, `size_bytes`, `created_at`. * `size_bytes` is derived from blob/symlink content; comparing it would be * redundant with `blob_hash` and `symlink_target`. */ export declare function entryShapeEqual(a: InternalEntryShape | null, b: InternalEntryShape | null): boolean; /** * Convert an `InternalEntryShape` (with raw `Uint8Array` blob hash) into the * public `EntryShape` (with hex-encoded blob hash). Used for `merge()` / * `cherryPick()` / `revert()` conflict reports. */ export declare function toPublicEntryShape(s: InternalEntryShape | null): EntryShape | null; export declare function mapDiffSide(type: string | null, hash: Uint8Array | null, symlinkTarget: string | null, mode: number | null, size: number | string | null, mtime: Date | null): EntryShape | null; export declare function classifyDiffChange(before: EntryShape | null, after: EntryShape | null): "added" | "removed" | "modified" | "type-changed"; /** * Resolve a `fs_blobs` row into text content for a diff entry. Returns * `null` for non-files (directories, symlinks, absent side); falls back to * UTF-8 decoding of `binary_data` when the row has no `content` column — * the storage layer chooses one or the other based on whether the blob * was originally text. */ export declare function decodeBlobContent(side: EntryShape | null, content: string | null, binary: Uint8Array | null): string | null; //# sourceMappingURL=entry-shapes.d.ts.map