Skip to content

v0.3.3

Choose a tag to compare

@Maxwell-Code07 Maxwell-Code07 released this 12 May 18:21
· 53 commits to main since this release

[0.3.3] - 2026-05-08

🚀 新功能

  • 短期记忆压缩(Context Offload):新增 Offload 模块,支持长对话场景下的上下文压缩与记忆卸载
  • 架构重构:Core + 多框架适配:重构为 TdaiCore 宿主无关核心层 + 适配器模式,解耦 OpenClaw 框架依赖;新增 HostAdapter / LLMRunner 抽象接口
  • Hermes Gateway 适配:新增 Hermes Gateway 适配器(memory_tencentdb Hermes Plugin),支持通过 Hermes 框架独立运行;Gateway 零配置自动发现
  • Offload 自动 patch:Offload 启动时自动应用 after_tool_call patch,patch 失败时自动禁用 offload
  • L0 捕获过滤:排除 offload 注入的 MMD 上下文块,避免将压缩中间产物误存为记忆
  • Recall 注入优化(Cache 友好):L1 召回从 appendSystemContext 移到 prependContext,避免每轮系统提示词变化导致 prompt cache bust
  • 分场景 Embedding 超时:新增 embedding.recallTimeoutMs / embedding.captureTimeoutMs,recall 超时自动降级为纯关键词搜索
  • Gateway 自愈:Hermes 插件新增 watchdog + lazy probe 机制,Gateway 异常时自动恢复
  • 运维管理工具:新增 memory-tencentdb-ctl 命令行管理工具,支持 standalone 与 hermes 两种运行模式
  • 兼容 OpenClaw v2026.4.23+ hook 权限策略:新增 ensurePluginHookPolicy() 自动检测并补全 allowConversationAccess 配置
  • Docker 支持:新增 Hermes + Memory 一体化 Docker 镜像,一行命令启动带记忆能力的 Hermes Agent

✨ 改进

  • 数据目录与安装目录统一整合至 ~/.memory-tencentdb/
  • 引入 $HERMES_HOME 环境变量,移除硬编码 ~/.hermes 路径
  • CleanContextRunner 通过 systemPromptOverride 替换默认系统提示词,每次 L1/L2/L3 调用节省 ~4500 input tokens
  • L2 / L3 prompt 拆分为 systemPrompt + userPrompt,角色划分更清晰
  • Pipeline 默认参数调整:l1IdleTimeoutSeconds 60→600s,l2MinIntervalSeconds 300→900s,l2MaxIntervalSeconds 1800→3600s
  • 运维脚本保留在 tarball 中但不再注册为 bin 命令,减少全局命令污染
  • init/destroy 生命周期日志降级为 debug 级别
  • 新增 tsdown 构建配置生成 dist/index.mjs,满足新版 OpenClaw 安装校验
  • 声明 activation.onStartup 确保 gateway 启动时加载插件
  • 声明 contracts.tools 注册工具名,满足 tool registration contract 要求

🐛 修复

  • 修复 ensureSchedulerStarted 并发调用下的竞态问题
  • 修复 /session/end 错误销毁全局 scheduler(改为按 session_key 作用域)
  • 修复关闭 store 时未等待后台 fire-and-forget 任务完成的问题
  • 修复 disable_offload 未正确删除 slots.contextEngine 配置的问题
  • 修复 slot 占用检测逻辑:仅在 ok=false 时拒绝,API 异常不再误判为冲突
  • 修复 aggressive/emergency 压缩在用户消息位于队首时卡死的问题
  • 修复消息被大量 offload 后压缩停滞的问题
  • 修复 pullProfilesToLocal 并发竞争导致 ENOTEMPTY 错误
  • 修复 originalUserMessageCount 数据链路断裂导致 L0 recorder 无法定位被污染的 user message
  • 修复 RecallResult 类型定义缺少 prependContext 字段
  • 修复 set -e 环境下 ((VAR++)) 在 VAR=0 时导致脚本退出的问题
  • 修复 Hermes 退出时未终止 Gateway 子进程的问题
  • 加固 hook-policy 版本决策逻辑,非标准版本一律跳过,避免误写配置

♻️ 重构

  • 统一 patch 检测逻辑:始终委托给 patch 脚本并通过退出码判定结果
  • TdaiCore 提供统一 API:handleBeforeRecall() / handleTurnCommitted() / searchMemories()
  • 数据目录所有权从插件移至 Gateway 层管理