Skip to content

feat: 新增 ReMeLight 记忆后端适配器#29

Merged
robscc merged 1 commit intomainfrom
worktree-gleaming-stirring-blanket
Mar 20, 2026
Merged

feat: 新增 ReMeLight 记忆后端适配器#29
robscc merged 1 commit intomainfrom
worktree-gleaming-stirring-blanket

Conversation

@robscc
Copy link
Owner

@robscc robscc commented Mar 20, 2026

  • reme_light_adapter.py: ReMeLightMemory(BaseMemory) 本地文件模式适配器
    • 延迟初始化(asyncio.Lock 防并发)+ session tag 向量过滤
    • 混合向量+BM25 检索(memory_search),失败回退关键词搜索
    • 暴露原生能力:compact_history / summarize_session / pre_reasoning
  • config.py: 新增 reme_light 到 memory_backend Literal + 9 个配置字段
  • factory.py: 注册 reme_light 后端,LLM key 三级回退
  • 单元测试:45 个(辅助函数 + add/get_recent/search/cross_session/clear/count/close/原生能力)
  • E2E 测试:MemoryWriter.maybe_flush 触发验证(插 28 条假消息 + 1 条真实 LLM chat → count=30 → flush)

变更描述

变更类型

  • Bug Fix
  • New Feature
  • Refactoring
  • Documentation
  • CI/CD

测试

  • 已添加/更新相关单元测试
  • 本地 make test 通过
  • 本地 make lint 通过

相关 Issue

Closes #

- reme_light_adapter.py: ReMeLightMemory(BaseMemory) 本地文件模式适配器
  - 延迟初始化(asyncio.Lock 防并发)+ session tag 向量过滤
  - 混合向量+BM25 检索(memory_search),失败回退关键词搜索
  - 暴露原生能力:compact_history / summarize_session / pre_reasoning
- config.py: 新增 reme_light 到 memory_backend Literal + 9 个配置字段
- factory.py: 注册 reme_light 后端,LLM key 三级回退
- 单元测试:45 个(辅助函数 + add/get_recent/search/cross_session/clear/count/close/原生能力)
- E2E 测试:MemoryWriter.maybe_flush 触发验证(插 28 条假消息 + 1 条真实 LLM chat → count=30 → flush)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@robscc robscc merged commit 36ca4e5 into main Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant