import "./core/compat.js"; import type { ExtensionAPI } from "@oh-my-pi/pi-coding-agent"; import type { CwdGitRunnerFactory, GitRepository, GitRunner } from "./core/types.js"; export type SessionOnlyReason = "git_unavailable" | "repository_unresolvable" | "private_repository_unavailable"; export type FileBackend = { kind: "git"; repository: GitRepository; git: GitRunner; } | { kind: "session"; reason: SessionOnlyReason; }; export type OmpUndoRedoDependencies = { /** Overrides how git runners are created, letting hosts and tests inject * behavior (e.g. slowing captures to exercise the bounded handler path). * Receives the canonical worktree and an optional fixed env (used for * private per-workspace repositories). */ gitRunnerFactory?: CwdGitRunnerFactory; /** How long the before_agent_start / agent_end / undo / redo handlers wait * for an in-flight checkpoint capture before returning without it. The * capture keeps running and the turn is finalized when it settles. */ captureDeadlineMs?: number; }; export declare const DEFAULT_CAPTURE_DEADLINE_MS = 3000; /** Per-controller private-repo state: a ready entry carries the repository and * the env runner (GIT_DIR fixed), with `ready` resolving true once init * completes; a `failure` entry records a failed init so session fallback is * reused without retrying. Keyed by canonical cwd (private) or worktree * (git mode). */ type ActivePrivateRepoEntry = { repository?: GitRepository; git?: GitRunner; ready: Promise; }; export type PrivateRepoEntry = ActivePrivateRepoEntry | { failure: true; }; export declare function resolveBackend(cwd: string, privateRepositories?: Map, gitRunnerFactory?: CwdGitRunnerFactory): Promise; /** One-shot removal of the pre-v1.5.1 store layout, whose dirs hold user file * content and are never reclaimed by anything else. Kept while the pre-1.5.1 * tail (v1.5.1 shipped 2026-08-21) can still upgrade straight to 1.6.x. * ponytail: delete this, LEGACY_BLOB_DIRS, LEGACY_BLOB_QUIET_MS, * cleanLegacyGitIndexes, their boot wiring, and test/legacy-blob-purge.test.ts * at v1.7.0. removeDirWithRetry/EVICTION_RETRY_DELAY_MS stay: eviction uses them. */ export declare function purgeLegacyBlobStore(): Promise; export default function ompUndoRedo(pi: ExtensionAPI, deps?: OmpUndoRedoDependencies): void; export {};