/** * 模块: 记忆整合(Memory Integrator) * * 设计原则(非侵入): * - 不复制龙虾的原生记忆,仅通过 registerMemoryCorpusSupplement 把 enhance 的 SQLite * 分类记忆喂给龙虾的记忆引擎。 * - 搜索评分在 corpus.search() 内部完成(合并原 context-pruner 逻辑), * 不再通过 before_prompt_build 绕过龙虾的原生注入路径。 * - 龙虾构建 system prompt 时会自己决定是否、如何注入 corpus 结果 —— 我们只做数据源。 * * Public API 对接(openclaw 2026.4.11): * api.registerMemoryCorpusSupplement(supplement) — 单参,龙虾内部挂 pluginId * api.registerMemoryPromptSupplement(builder) — 可选,只追加提示词段 */ import type { OpenClawPluginApi } from "openclaw/plugin-sdk"; export interface MemoryIntegratorOptions { /** 相关性阈值(0-1),低于此分数的记忆不会返回给龙虾,默认 0.5 */ threshold?: number; /** 单次 search 最多返回几条,默认 5 */ maxEntries?: number; /** 调试日志 */ debug?: boolean; } export declare function registerMemoryIntegrator(api: OpenClawPluginApi, options?: MemoryIntegratorOptions): void;