/** * 会话管理系统 * 支持跨会话状态恢复 */ import { Task, Phase, WorkspaceWorkflowContext } from '../types/index.js'; export interface Session { id: string; name: string; createdAt: string; lastActive: string; status: 'active' | 'paused' | 'completed'; currentPhaseId?: string; currentTaskId?: string; contextSummary?: string; nextAction?: string; workflowContext?: WorkspaceWorkflowContext; stats: { tasksCompleted: number; totalTasks: number; }; } interface SessionSnapshot { session: Session; tasksSnapshot: Task[]; phasesSnapshot: Phase[]; resumeGuidance: string; } /** * 保存会话快照 */ export declare function saveSession(sessionId: string, tasks: Task[], phases: Phase[], options?: { name?: string; currentPhaseId?: string; currentTaskId?: string; context?: string; nextAction?: string; workflowContext?: WorkspaceWorkflowContext; basePath?: string; }): Promise; /** * 加载会话 */ export declare function loadSession(sessionId: string, basePath?: string): Promise; /** * 列出所有会话 */ export declare function listSessions(basePath?: string): Promise; /** * 获取最新的活动会话 */ export declare function getLatestSession(basePath?: string): Promise; /** * 暂停会话 */ export declare function pauseSession(sessionId: string, basePath?: string): Promise; /** * 完成会话 */ export declare function completeSession(sessionId: string, basePath?: string): Promise; export declare function applySessionWorkflowContext(sessionId: string, workflowContext: WorkspaceWorkflowContext, basePath?: string): Promise; export {}; //# sourceMappingURL=session.d.ts.map