export interface RepositoryIdentity { repositoryId: string; canonicalRemote?: string; gitCommonDirId: string; rootTreeId: string; } export interface ContentDigest { algorithm: 'sha256'; digest: string; bytes: number; } export interface UntrackedFileIdentity { path: string; kind: 'file' | 'symlink'; mode: number; bytes: number; digest: string; } export interface UntrackedManifest { digest: string; entries: readonly UntrackedFileIdentity[]; } export interface SubmoduleState { path: string; initialized: boolean; expectedCommit: string; commit?: string; trackedPatch: ContentDigest; untrackedManifest: UntrackedManifest; submodules: readonly SubmoduleState[]; } interface SourceStateBase { version: 1; /** Git-visible state excludes ignored build inputs and installed toolchains. */ scope: 'git-visible'; repository: RepositoryIdentity; baseCommit: string; treeId: string; sourceStateId: string; } export interface CleanSourceState extends SourceStateBase { kind: 'clean'; clean: true; } export interface DirtySourceState extends SourceStateBase { kind: 'dirty'; clean: false; trackedPatch: ContentDigest; untrackedManifest: UntrackedManifest; submodules: readonly SubmoduleState[]; } export type ExactSourceState = CleanSourceState | DirtySourceState; /** Recursive, locale-independent canonical JSON for JSON-safe contract values. */ export declare function canonicalJson(value: unknown): string; /** * Capture a stable, content-addressed Git source state. * * The collector performs two complete reads and refuses a moving worktree. * Ignored files are intentionally excluded because Git does not treat them as * repository source. Untracked symlinks bind their link target text without * following the target outside the worktree. */ export declare function captureRepositorySourceState(repoPath: string | URL): ExactSourceState; export declare function sourceStateMatches(left: ExactSourceState, right: ExactSourceState): boolean; /** Release receipts default to the stronger committed-state requirement. */ export declare function isReleaseEligibleSourceState(state: ExactSourceState): state is CleanSourceState; export {}; //# sourceMappingURL=repository-state.d.ts.map