/** OpenClaw 转录消息(从 JSONL 文件读取) */ export interface TranscriptMessage { role: string; content?: string; text?: string; timestamp?: number; mediaUrls?: string[]; images?: string[]; } /** OpenClaw SessionEntry 子集 */ export interface OCSessionEntry { sessionId: string; updatedAt: number; sessionFile?: string; chatType?: string; label?: string; displayName?: string; channel?: string; } /** SDK 兼容的聊天消息 */ export interface HistoryChatMessage { role: "user" | "bot"; text: string; session: string; timestamp: number; mediaUrls?: string[]; images?: string[]; } /** 导出格式(与 SDK ChatHistoryExport 兼容) */ export interface ChatHistoryExport { version: 1; exportedAt: number; sessions: Record; } export interface SessionUtils { readSessionMessages: (sessionId: string, storePath: string | undefined, sessionFile?: string) => unknown[]; readSessionPreviewItemsFromTranscript: (sessionId: string, storePath: string | undefined, sessionFile: string | undefined, agentId: string | undefined, maxItems: number, maxChars: number) => { role: string; text: string; }[]; loadSessionEntry: (sessionKey: string) => { cfg: Record; storePath: string; store: Record; entry: OCSessionEntry | undefined; canonicalKey: string; }; loadCombinedSessionStoreForGateway: (cfg: Record) => { storePath: string; store: Record; }; listSessionsFromStore: (params: { cfg: Record; storePath: string; store: Record; opts: Record; }) => { sessions: { key: string; updatedAt: number | null; kind: string; label?: string; displayName?: string; channel?: string; chatType?: string; }[]; count: number; }; } export declare function getSessionUtils(): Promise; export declare function deleteSessionsFromOpenclawStore(params: { utils: SessionUtils; cfg: Record; sessionIds: string[]; }): Promise<{ deletedCount: number; notFound: string[]; errors: string[]; indexPatched: boolean; }>; export declare function mapTranscriptMessage(msg: unknown, session: string): HistoryChatMessage | null; //# sourceMappingURL=openclaw-sessions.d.ts.map