import { type ChatMessage, type ToolCall, type ToolResult } from "../types.js"; import { type ImageBudget } from "../attachments/image-content.js"; import type { TranscriptItem } from "../app/ports/transcript-item.js"; import type { PreviousTurnSignal } from "../agent/continue-orient.js"; import { HistoryRecord, PersistedContextUsage, compareHistoryFreshness, dedupeHistoryById, sortHistoryByUpdatedDesc } from "./history/recovery.js"; import { SessionModelSelection } from "./history/sqlite-backend.js"; import { getSession } from "./history/session-queries.js"; export { clearAllHistory, deleteSession, purgeSession } from "./history/lifecycle.js"; export { listSessionSummaries, listSessions } from "./history/session-queries.js"; export { getSession }; export { partitionByRetention } from "./history/jsonl-backend.js"; export type { SessionModelSelection } from "./history/sqlite-backend.js"; export { recoverOrphanedHistory } from "./history/recovery.js"; export { compareHistoryFreshness, dedupeHistoryById, sortHistoryByUpdatedDesc }; export type { HistoryRecord, PersistedContextUsage } from "./history/recovery.js"; export type { HistorySummary } from "./history-index.js"; export interface ToolCallRecord { id: string; sessionId: string; createdAt: string; name: string; args: Record; ok: boolean; exitCode?: number | undefined; output: string; } export declare function materializeHistoryImages(messages: readonly ChatMessage[], budget?: ImageBudget): ChatMessage[]; export declare function saveSession(messages: ChatMessage[], name?: string | undefined, transcript?: TranscriptItem[] | undefined, contextUsage?: PersistedContextUsage | undefined, revision?: number | undefined, writerGeneration?: string | undefined, previousTurn?: PreviousTurnSignal | null | undefined, sessionModel?: SessionModelSelection | undefined): Promise; export declare function upsertSession(id: string, messages: ChatMessage[], name?: string | undefined, transcript?: TranscriptItem[] | undefined, contextUsage?: PersistedContextUsage | undefined, revision?: number | undefined, writerGeneration?: string | undefined, previousTurn?: PreviousTurnSignal | null | undefined, sessionModel?: SessionModelSelection | undefined): Promise; export declare function saveToolCall(sessionId: string, call: ToolCall, result: ToolResult): Promise; export declare function getHistoryPath(): string; export declare function getJsonlHistoryPath(): string; export declare function getHistoryArchivePath(): string; export declare function getHistoryBackupDir(): string;