import type { PluginConfig } from "./types.js"; export interface BackfillCliOptions { openclawRoot: string; includeArchive: boolean; selectedAgents?: Set; limit?: number; bankStrategy: "mirror-config" | "agent" | "fixed"; fixedBank?: string; } export interface SessionMessage { role: "user" | "assistant" | "system" | "tool"; content: string | Array<{ type?: string; text?: string; }>; } export interface ParsedSessionFile { filePath: string; agentId: string; sessionId: string; sessionKey?: string; startedAt?: string; messages: SessionMessage[]; } export interface BackfillPlanEntry { filePath: string; agentId: string; sessionId: string; startedAt?: string; bankId: string; documentId: string; transcript: string; messageCount: number; } export interface BackfillCheckpointEntry { status: "enqueued" | "completed" | "failed"; bankId: string; filePath: string; sessionId: string; updatedAt: string; error?: string; } export interface BackfillCheckpoint { version: 1; entries: Record; } export declare function defaultOpenClawRoot(): string; export declare function defaultCheckpointPath(openclawRoot: string): string; export declare function loadPluginConfigFromOpenClawRoot(openclawRoot: string): PluginConfig; export declare function parseSessionFile(filePath: string, agentId: string): ParsedSessionFile; export declare function discoverSessionFiles(openclawRoot: string, includeArchive: boolean): Array<{ agentId: string; filePath: string; }>; export declare function stableDocumentId(session: ParsedSessionFile, bankId: string): string; export declare function buildBackfillPlan(pluginConfig: PluginConfig, opts: BackfillCliOptions): { entries: BackfillPlanEntry[]; discoveredSessions: number; skippedEmpty: number; }; export declare function loadCheckpoint(checkpointPath: string): BackfillCheckpoint; export declare function saveCheckpoint(checkpointPath: string, checkpoint: BackfillCheckpoint): void; export declare function checkpointKey(entry: Pick): string;