/** At most this many dirty paths are stat-ed when the walk asks whether a lane still writes. */ export declare const MAX_ACTIVITY_STAT_PATHS = 500; /** Do two readings hold the same dirty paths with the same status? */ export declare function sameTree(a: TreeSnapshot, b: TreeSnapshot): boolean; /** * The newest modification time among a reading's dirty paths, or null when none can be read. This * catches a lane that keeps editing a file whose STATUS does not change (`M` stays `M`). A deleted * path cannot be read and is skipped; `sameTree` catches a deletion. */ export declare function newestChangeMs(cwd: string, snapshot: TreeSnapshot, stat?: (path: string) => { mtimeMs: number; }): number | null; /** One `git status` reading: the cwd's path inside the repository, and each dirty path's status. */ export interface TreeSnapshot { /** `git rev-parse --show-prefix`: "" at the repository root, else `sub/dir/`. */ prefix: string; /** Repository-relative path → the two-letter porcelain status. */ entries: Map; } /** Null when `cwd` is not inside a git work tree, or git failed. */ export type TreeSnapshotReader = (cwd: string) => Promise; /** At most this many delta lines are rendered; the rest are counted. */ export declare const MAX_TREE_DELTA_LINES = 50; /** * Parse `git status --porcelain=v1 -z` output. A rename or copy entry carries its ORIGINAL path in * the next NUL-separated field, which is consumed here and not reported as a path of its own. */ export declare function parsePorcelainZ(text: string): Map; /** * The real reader. ⚠ Under vitest it reads nothing — returns null — unless a test injects its own * reader: a suite run inside a real checkout would otherwise append that checkout's live status to * every dispatch answer it asserts on. The `winenv.ts` guard, applied to a read. */ export declare const defaultTreeSnapshot: TreeSnapshotReader; /** * Render the difference between two readings as the block `jobAnswer` appends. `scope` (paths or * globs relative to `cwd`) marks every path outside it `OUT OF SCOPE`; a path outside `cwd` itself is * always outside a declared scope. Without a scope nothing is marked. */ export declare function renderTreeDelta(cwd: string, before: TreeSnapshot, after: TreeSnapshot | null, scope: readonly string[] | undefined): string;