import type { ToolRegistry } from "../tools/registry"; import type { ConfirmFn } from "../permissions/permission-manager"; import type { AgentResult } from "../agents/main-agent"; import { Session, type RunOptions } from "./session"; import type { SessionMeta } from "./session-data"; export interface SessionManagerOptions { toolRegistry: ToolRegistry; confirmFn: ConfirmFn; storeDir?: string; maxSteps?: number; } export interface SessionListItem extends SessionMeta { active: boolean; } export declare class SessionManager { private toolRegistry; private confirmFn; private maxSteps?; private store; private sessions; private activeSessionId; constructor(opts: SessionManagerOptions); getStoreDir(): string; /** 新建会话并切为活动;立即持久化。 */ create(title?: string): Promise; current(): Session | undefined; get(id: string): Session | undefined; getActiveId(): string | undefined; /** 列出磁盘会话(合并 active 标记)。 */ list(): Promise; /** 切换活动会话:内存有则切,无则从磁盘 resume。 */ switch(id: string): Promise; /** 从磁盘加载会话到内存并切为活动。 */ resume(id: string): Promise; /** 删除会话(内存 + 磁盘);删的是当前会话则清空 activeId。 */ delete(id: string): Promise; /** 执行任务:无活动会话则自动新建;run 后持久化。可选流式事件与 Plan 门控透传给 Session。 */ run(task: string, options?: RunOptions): Promise; /** 持久化当前活动会话。 */ persistActive(): Promise; /** 持久化指定内存会话(rename 等修改非活动会话时用);不在内存则 no-op。 */ persist(id: string): Promise; /** 直接列出磁盘会话元信息(不含 active 标记)。 */ listFromDisk(): Promise; } //# sourceMappingURL=session-manager.d.ts.map