import type { GitCheckpoint, GitRunner, GitRunnerFactory, NavigationPort, NavigationResult, NavigationState, TurnCheckpoint } from "./types.js"; import { type CheckpointApplyResult } from "./checkpoints.js"; type ApplyCheckpoint = (checkpoint: GitCheckpoint, sourceHash: string, targetHash: string) => Promise; export declare class SessionNavigation { private readonly port; private checkpoints; private currentIndex; private navigateTree; private expectedTreeNavigation; private readonly gitForRepository; private navigationTail; private readonly stateChanged; private readonly applyGit; constructor(port: Omit & { navigateTree?: NavigationPort["navigateTree"]; }, git: GitRunner, gitFactory?: GitRunnerFactory, stateChanged?: (state: NavigationState) => Promise, applyGit?: ApplyCheckpoint); /** Teardown-only: runs outside the navigation chain. Callers guarantee no * concurrent undo/redo/turn finalization touches this instance yet * (initializeNavigation owns the object until it publishes it). */ restoreState(state: NavigationState): void; snapshot(): NavigationState; private persistState; setNavigateTree(navigateTree: NavigationPort["navigateTree"]): void; private serializeNavigation; private navigateTo; handleSessionTreeNavigation(oldLeafId: string | null, newLeafId: string | null): Promise; invalidateRedo(): Promise; private performInvalidateRedo; private convertEarlierFileCheckpoints; private releaseFileCheckpoints; recordTurnEnd(checkpoint: TurnCheckpoint): Promise; private performRecordTurnEnd; /** Teardown-only: runs outside the navigation chain (suspend/resume path). */ suspend(): Promise; private navigateSession; private sessionOnlyResult; private applyFileCheckpoint; undo(): Promise; private performUndo; redo(): Promise; private performRedo; } export {};