/** * cogitator rewind [entry] - rewind a thread's conversation, memory and files */ import { Command } from 'commander'; import type { Agent, Cogitator, RewindReport } from '@cogitator-ai/core'; /** Where a scaffolded project registers its runtime and agents. */ export declare const DEFAULT_REGISTRY = "src/cogitator.ts"; export interface RewindFlags { registry?: string; agent?: string; files?: boolean; memory?: boolean; dryRun?: boolean; yes?: boolean; force?: boolean; json?: boolean; } /** What the command works on: the project's runtime and its agents by key */ export interface RewindProject { cogitator: Pick & { readonly durableByDefault?: boolean; }; agents: Map; } /** How the command talks to the person running it */ export interface RewindIo { print(line: string): void; /** Asks a yes or no question, undefined when nobody can answer (not a terminal) */ confirm(question: string): Promise; } /** * Loads `.env` and the registry of the project in `projectDir`: the runtime it exports as * `cogitator` and its agents, exported as `agents` by key */ export declare function loadRewindProject(projectDir: string, registry?: string): Promise; /** The lines that tell what a rewind did or would do */ export declare function describeRewind(report: RewindReport): string[]; /** * Lists the active branch of `threadId` with the entries a rewind can go to, or rewinds it to * `entryId`: a dry run first, printed, then the rewind once confirmed (`--yes`, or a yes at the * prompt). Returns the exit code */ export declare function runRewind(project: RewindProject, threadId: string, entryId: string | undefined, flags: RewindFlags, io: RewindIo): Promise; export declare const rewindCommand: Command; //# sourceMappingURL=rewind.d.ts.map