import type { BookSession } from "./session.js"; /** * 从 messages 数组里取第一条 user 消息,裁剪成 ≤20 字的单行字符串。 * 用于把用户首条提问作为会话标题。 */ export declare function extractFirstUserMessageTitle(messages: unknown): string | null; export declare class SessionAlreadyMigratedError extends Error { constructor(sessionId: string, currentBookId: string); } export declare function loadBookSession(projectRoot: string, sessionId: string): Promise; export declare function persistBookSession(projectRoot: string, session: BookSession): Promise; export interface BookSessionSummary { readonly sessionId: string; readonly bookId: string | null; readonly title: string | null; readonly messageCount: number; readonly createdAt: number; readonly updatedAt: number; } export declare function listBookSessions(projectRoot: string, bookId: string | null): Promise>; export declare function renameBookSession(projectRoot: string, sessionId: string, title: string): Promise; export declare function deleteBookSession(projectRoot: string, sessionId: string): Promise; export declare function migrateBookSession(projectRoot: string, sessionId: string, newBookId: string): Promise; export declare function createAndPersistBookSession(projectRoot: string, bookId: string | null, sessionId?: string): Promise; //# sourceMappingURL=book-session-store.d.ts.map