import type { ExecResult } from "@earendil-works/pi-coding-agent"; import type { GitOperations, GitStatus } from "./git-operations.js"; /** * Narrow seam used by the checkpoint pipeline to interact with the underlying * git state. * * The interface exposes only the operations the turn_end checkpoint path * actually needs: repository checks, conflict detection, status reads, staging, * commit execution, and cleanup. This keeps the checkpoint module deep while * making the seam real with two adapters: a production wrapper around * {@link GitOperations} and an in-memory fake for tests. */ export interface CheckpointStore { /** Check whether the current directory is inside a git working tree. */ isInsideGitRepo(): Promise; /** Check whether a merge conflict is in progress. */ hasMergeConflict(): Promise; /** Check whether the index contains any staged changes. */ hasStagedChanges(): Promise; /** Run `git status --short` and return whether there are uncommitted changes. */ checkStatus(): Promise; /** Stage all changes (`git add -A`). */ stageAll(): Promise; /** * Stage all changes except submodule-related paths (gitlink updates and * `.gitmodules`). Used when `ignoreSubmodules` is enabled. */ stageAllIgnoringSubmodules(): Promise; /** Execute `git commit -m `. */ commit(message: string): Promise; /** Get the current branch name, or `null` when HEAD is detached. */ getCurrentBranch(): Promise; /** Unstage all changes (`git reset HEAD --`). */ unstageAll(): Promise; } /** * Production adapter: satisfies {@link CheckpointStore} by delegating to * {@link GitOperations}. */ export declare class GitCheckpointStore implements CheckpointStore { private readonly git; constructor(git: GitOperations); isInsideGitRepo(): Promise; hasMergeConflict(): Promise; hasStagedChanges(): Promise; checkStatus(): Promise; stageAll(): Promise; stageAllIgnoringSubmodules(): Promise; commit(message: string): Promise; getCurrentBranch(): Promise; unstageAll(): Promise; } //# sourceMappingURL=checkpoint-store.d.ts.map