import type { Message } from "@kenkaiiii/gg-ai"; /** * Minimal session persistence for `ggeditor continue`. * * Each TUI run writes its rolling message buffer to ~/.gg/editor/last.json * after every turn. `ggeditor continue` reads this file and hydrates a new * Agent with the prior messages. * * No multi-session support yet — just "the most recent conversation". Pairs * with the `priorMessages` option added to gg-agent. */ export declare const SESSIONS_DIR: string; export declare const LAST_SESSION_FILE: string; export interface PersistedSession { /** Format version for future compatibility. */ v: 1; /** ISO timestamp of the last update. */ updatedAt: string; /** Provider used for this session. */ provider: string; /** Model used for this session. */ model: string; /** Working directory at start. */ cwd: string; /** Host name in use ("resolve" / "premiere" / "none"). */ host: string; /** Full message buffer EXCLUDING the system prompt. */ messages: Message[]; } export declare function saveSession(snapshot: Omit): Promise; export declare function loadLastSession(): Promise; export declare function hasLastSession(): Promise; /** * Drop the system message from a saved messages array. Saved sessions * intentionally exclude the system prompt (which gets rebuilt fresh per run * to reflect current host caps), but if a future format change includes it, * we strip it defensively. */ export declare function stripSystem(messages: Message[]): Message[]; //# sourceMappingURL=sessions.d.ts.map