import type { InfoType, MemorySearchResult } from "./types.js"; export { buildSessionSummaryFromEntries } from "./build-summary.js"; export type { InfoType, MemoryMetadata, MemorySearchResult } from "./types.js"; export declare function initMemory(): Promise; /** * 将一条文本写入向量库。未配置 RAG embedding 时跳过写入并返回占位 id(长记忆空转)。 * @param text 内容 * @param metadata.infotype 经验总结(experience) 或 compaction 摘要(compaction) * @param metadata.sessionId 会话 id */ export declare function addMemory(text: string, metadata: { infotype: InfoType; sessionId: string; }): Promise; export interface SearchMemoryOptions { topK?: number; infotype?: import("./types.js").InfoType; sessionId?: string; } /** * 按语义搜索记忆,可按 infotype、sessionId 过滤。未配置 RAG embedding 时返回空数组(空转)。 */ export declare function searchMemory(query: string, topK?: number, options?: SearchMemoryOptions): Promise; /** 拉取 3 条经验,格式化为「经验内容」文本(用于拼入用户消息) */ export declare function getExperienceContextForUserMessage(): Promise; /** * 拉取 1 条 compaction 摘要,用于拼入 system prompt(新建 AgentSession 时调用,可选 sessionId) */ export declare function getCompactionContextForSystemPrompt(sessionId?: string): Promise;