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; /** How long a `tool_call` waits for the turn's before-snapshot. Must stay * under the host's 30 s `tool_call` cap, which blocks the tool on timeout. */ toolCallDeadlineMs?: number; /** How long `agent_end` waits for the turn's finalize (after-snapshot and * history write) before returning. Must stay under the host's 30 s handler * cap; the finalize keeps running and undo/redo still wait on it. */ finalizeDeadlineMs?: number; }; export declare const DEFAULT_CAPTURE_DEADLINE_MS = 3000; export declare const DEFAULT_TOOL_CALL_DEADLINE_MS = 25000; export declare const DEFAULT_FINALIZE_DEADLINE_MS = 25000; /** Per-controller snapshot-store state: a ready entry carries the repository * and the store-bound runner, with `ready` resolving true once init * completes; a `failure` entry records a failed Private-Git 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 {};