/** * LocalSessionStore:Agent 的 Session 查询与管理视图。 * * 职责说明(中文) * - 统一管理 Session 创建判断、删除、列表、归档与清理。 * - 缓存稳定的 LocalSessionDataStore,避免同一 Session 重复创建 Message Store。 * - 当前阶段沿用既有本地目录布局;调用方和 Session 不感知该约定。 */ import type { AgentArchiveSessionResult, AgentArchiveSessionsInput, AgentArchiveSessionsResult, AgentCleanArchiveResult, AgentListSessionsInput, AgentSessionSummaryPage } from "../../types/agent/SessionTypes.js"; import type { SessionStore } from "../../types/store/SessionStore.js"; import type { SessionDataStore } from "../../types/store/SessionDataStore.js"; import type { LocalSessionStoreOptions } from "../../types/store/LocalStore.js"; /** 默认本地 Agent Store。 */ export declare class LocalSessionStore implements SessionStore { /** 当前 Agent 内部数据文件能力。 */ private readonly files; /** 当前 Agent 的稳定标识。 */ private readonly agent_id; /** 当前 Workspace 的稳定标识。 */ private readonly workspace_id?; /** 当前 Agent 内部数据根路径。 */ private readonly storage_root_path; /** 已创建的 Session Store 缓存。 */ private readonly sessions; constructor(options: LocalSessionStoreOptions); /** 返回指定 Session 的稳定持久化视图。 */ session(session_id: string, workspace_id?: string | undefined): SessionDataStore; /** 判断活动 Session 是否存在。 */ has_session(session_id: string): Promise; /** 永久删除活动 Session。 */ remove_session(session_id: string): Promise; /** 清空活动 Session Message 数据。 */ clear_session_messages(session_id: string): Promise; /** 返回活动 Session 摘要页。 */ list_sessions(input: AgentListSessionsInput | undefined, executing_session_ids: ReadonlySet): Promise; /** 将活动 Session 迁入归档区。 */ archive_session(session_id: string): Promise; /** 返回归档 Session 摘要页。 */ list_archived_sessions(input?: AgentArchiveSessionsInput): Promise; /** 永久删除全部归档 Session。 */ clean_archive(): Promise; /** 本地 JSONL Store 当前没有常驻句柄。 */ dispose(): Promise; /** 返回活动 Session 物理目录,仅供本地实现内部使用。 */ private session_path; /** 校验目标 Session 确实属于当前 Agent 与 Workspace。 */ private assert_session_owner; /** 判断 Session metadata 是否匹配当前查询视图。 */ private is_session_owner; } //# sourceMappingURL=LocalSessionStore.d.ts.map