import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core"; import * as z from "zod/v4"; import type { ToolSession } from "."; import type { OutputMeta } from "./output-meta"; export interface CheckpointState { /** Number of in-memory messages at checkpoint (AFTER checkpoint tool result is appended) */ checkpointMessageCount: number; /** Session entry ID at checkpoint (for session tree branching) */ checkpointEntryId: string | null; /** Timestamp */ startedAt: string; } declare const checkpointSchema: z.ZodObject<{ goal: z.ZodString; }, z.core.$strip>; type CheckpointParams = z.infer; declare const rewindSchema: z.ZodObject<{ report: z.ZodString; }, z.core.$strip>; type RewindParams = z.infer; export interface CheckpointToolDetails { goal: string; startedAt: string; meta?: OutputMeta; } export interface RewindToolDetails { report: string; rewound: boolean; meta?: OutputMeta; } export declare class CheckpointTool implements AgentTool { private readonly session; readonly name = "checkpoint"; readonly label = "Checkpoint"; readonly summary = "Create a git-based checkpoint to save and restore session state"; readonly description: string; readonly parameters: z.ZodObject<{ goal: z.ZodString; }, z.core.$strip>; readonly strict = true; readonly loadMode = "discoverable"; readonly intent: (args: Partial) => string; constructor(session: ToolSession); static createIf(session: ToolSession): CheckpointTool | null; execute(_toolCallId: string, params: CheckpointParams, _signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback, _context?: AgentToolContext): Promise>; } export declare class RewindTool implements AgentTool { private readonly session; readonly name = "rewind"; readonly label = "Rewind"; readonly summary = "Rewind to a previously created checkpoint"; readonly description: string; readonly parameters: z.ZodObject<{ report: z.ZodString; }, z.core.$strip>; readonly strict = true; readonly loadMode = "discoverable"; readonly intent: () => string; constructor(session: ToolSession); static createIf(session: ToolSession): RewindTool | null; execute(_toolCallId: string, params: RewindParams, _signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback, _context?: AgentToolContext): Promise>; } export {};