Skip to content

Commit 21c2c09

Browse files
author
龚震宇
committed
chore: release v0.2.7 with checkpoint optimizations and new user checkpoint tool
This release introduces significant improvements, including windowed incremental scans to enhance processing efficiency, improved resume cursor accuracy to prevent false stops, and consistent checkpoint updates to streamline data handling. Additionally, a new tool, `get_user_checkpoint`, has been added to inspect checkpoint states for users and apps, expanding the plugin's functionality. Documentation has been updated to reflect these changes and provide clearer guidance on the new features.
1 parent a67ca53 commit 21c2c09

44 files changed

Lines changed: 987 additions & 927 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
计划(check_extraction_status 使用独立池并显式关闭)
2+
3+
- 通过 build_local_mem0_config_without_pool 构建独立配置
4+
- 使用 SyncMem0Client 创建 Memory
5+
- 工具结束时显式 close() 释放资源
6+
- 更新单元测试的 mock 与断言
7+
8+
涉及文件:
9+
- tools/check_extraction_status.py
10+
- tests/unit/tools/test_check_extraction_status.py
11+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
计划(check_extraction_status 使用独立池并显式关闭)
2+
3+
- 使用 build_local_mem0_config_without_pool 构建独立配置
4+
- 改为 SyncMem0Client 创建 Memory
5+
- 在工具执行完成时调用 close() 释放资源
6+
- 更新单元测试 mock 与断言
7+
8+
涉及文件:
9+
- tools/check_extraction_status.py
10+
- tests/unit/tools/test_check_extraction_status.py
11+
计划(check_extraction_status 使用独立池并显式关闭)
12+
13+
- 改为 build_local_mem0_config_without_pool 构建配置
14+
- 使用 SyncMem0Client 获取 Memory 实例
15+
- 在工具结束时显式 close() 释放资源
16+
- 更新单元测试的 mock/断言
17+
18+
涉及文件:
19+
- tools/check_extraction_status.py
20+
- tests/unit/tools/test_check_extraction_status.py
21+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
计划(checkpoint/version 调整)
2+
3+
- 移除 checkpoint/task_status metadata 中的 *_key,改为 version=v1
4+
- checkpoint metadata 去掉 user_id,仅保留内部标记与 version
5+
- task_status metadata 同步去掉 task_key,保留 version
6+
- 更新 filters 与相关测试断言
7+
- 保持 agent_id 作为 app_id 的作用域参数
8+
9+
涉及文件:
10+
- utils/checkpoint.py
11+
- utils/task_status.py
12+
- tests/unit/utils/test_checkpoint.py
13+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
计划(修复 get_user_checkpoint 连接池关闭报错)
2+
3+
- 使用 build_local_mem0_config_without_pool 避免复用已关闭连接池
4+
- 更新 get_user_checkpoint 工具调用路径
5+
- 调整对应单元测试的 patch 入口
6+
7+
涉及文件:
8+
- tools/get_user_checkpoint.py
9+
- tests/unit/tools/test_get_user_checkpoint.py
10+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
计划(get_user_checkpoint 使用 SyncMem0Client 并显式 close)
2+
3+
- 用 build_local_mem0_config_without_pool 构建独立配置
4+
- 改为 SyncMem0Client(config_override=...) 创建 Memory
5+
- 在工具执行完成时调用 close() 释放资源
6+
- 更新单元测试 mock/pattern
7+
8+
涉及文件:
9+
- tools/get_user_checkpoint.py
10+
- tests/unit/tools/test_get_user_checkpoint.py
11+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
计划(app_id 不再用 "*" 填充)
2+
3+
- checkpoint 读写不再把缺省 app_id 变成 "*"
4+
- get_user_checkpoint 工具返回与日志中保留空 app_id
5+
- 更新单元测试断言(agent_id 为空、返回字段为 None)
6+
7+
涉及文件:
8+
- utils/checkpoint.py
9+
- tools/get_user_checkpoint.py
10+
- tests/unit/utils/test_checkpoint.py
11+
- tests/unit/tools/test_get_user_checkpoint.py
12+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
计划(update_memory 参数校验与 checkpoint 说明修正)
2+
3+
- 在 update_memory 工具中校验 memory_id 为 UUID
4+
- 更新 update_memory.yaml 文案提示 UUID 要求
5+
- 新增单元测试覆盖非法 memory_id
6+
- 修正 checkpoint 头部注释与当前 app_id/agent_id 逻辑一致
7+
8+
涉及文件:
9+
- tools/update_memory.py
10+
- tools/update_memory.yaml
11+
- tests/unit/tools/test_update_memory.py
12+
- utils/checkpoint.py
13+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
计划(查看工具资源管理对齐长期记忆工具)
2+
3+
- 查看工具禁用 keepalive,避免额外后台线程
4+
- 保持独立池与显式 close,确保不影响其它工具
5+
- 更新单测,断言 enable_keepalive=False
6+
7+
涉及文件:
8+
- tools/get_user_checkpoint.py
9+
- tools/check_extraction_status.py
10+
- tests/unit/tools/test_get_user_checkpoint.py
11+
- tests/unit/tools/test_check_extraction_status.py
12+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Plan: Checkpoint release summary + version/docs update
2+
3+
- Review git diff to extract checkpoint-focused changes and related tests.
4+
- Summarize changes since last commit with emphasis on checkpoint behavior.
5+
- Bump version (manifest + pyproject) by one patch.
6+
- Update root markdown docs (README, CHANGELOG, PR_TEMPLATE, CONFIG, PRIVACY) with new version/date notes.
7+
- Re-scan docs for consistency and adjust "What's New" and version history.
8+
9+
Files to touch:
10+
- manifest.yaml
11+
- pyproject.toml
12+
- README.md
13+
- CHANGELOG.md
14+
- PR_TEMPLATE.md
15+
- CONFIG.md
16+
- PRIVACY.md
17+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
目标
2+
- 校验会话/消息排序的当前处理逻辑,并确保早停时不重复处理已处理消息
3+
4+
计划
5+
- 确认会话列表使用 updated_at 倒序,消息列表最终按时间正序处理
6+
- 增加统一的“最后消息”解析逻辑,支持 int/str 时间戳
7+
- 即使 mem0 消息为空或跳过抽取,也更新会话级 checkpoint
8+
- 维持 last_run_at 只在非早停时更新
9+
- 补充单元测试验证 int created_at 能写入 processed_range_end
10+
11+
涉及文件
12+
- tools/extract_long_term_memory.py
13+
- tests/unit/tools/test_extraction_async.py
14+

0 commit comments

Comments
 (0)