Repository navigation
v4.1.3 - memory context and namespace hardening
Agent Smart Memo v4.1.3
Bản release này tổng hợp nhóm sửa lỗi lớn về memory context và namespace semantics để ổn định hành vi memory tools trong runtime thật, đồng thời làm sạch contract cho nhiều team / nhiều agent systems dùng chung về sau.
Điểm chính
- Inject đúng
agentId/sessionKey/userIdvào memory tools qua hookbefore_tool_call - Sửa normalize namespace để alias explicit đi đúng canonical namespace trước khi fallback
namespaceexplicit không hợp lệ giờ fail rõ ràng, không fallback im lặng nữa- Bổ sung regression tests cho assistant / scrum / fullstack và probe runtime inject context
- Thêm helper scripts cho ASM-44 patch / rollback runtime compatibility
Thay đổi nổi bật
1) Memory tool context injection
- Thêm
src/hooks/tool-context-injector.ts - Wiring hook vào
src/index.ts - Đảm bảo
memory_search/memory_storekhông còn vô tình rơi về context sai khi runtime có identity thật
2) Namespace hardening
- Alias agent explicit được normalize đúng trước khi dùng fallback agent
- Namespace explicit lạ / không hợp lệ sẽ trả lỗi rõ ràng
- Giữ backward compatibility cho case không truyền namespace
3) Regression test coverage
Đã thêm / cập nhật các test:
tests/test-memory-tools-namespace-roundtrip.tstests/test-memory-tools-agent-context.tstests/test-tool-context-injector.tstests/test-runtime-before-tool-call-context-probe.ts
4) Runtime helper scripts
scripts/asm-44-runtime-patch.shscripts/asm-rollback.sh
Verify đã chạy
npm run build✅tests/test-memory-tools-namespace-roundtrip.ts✅tests/test-memory-tools-agent-context.ts✅tests/test-tool-context-injector.ts✅tests/test-runtime-before-tool-call-context-probe.ts✅
Jira liên quan
ASM-43— Story tổng thể cho overview/refactor kiến trúc ASMASM-53..ASM-57— các sub-task audit / contract / adapter / migration strategy
Ghi chú
Đây là release ổn định hóa behavior hiện tại của plugin. Hướng refactor kiến trúc lớn hơn (core / services / adapters để OpenClaw, Paperclip và future systems cùng dùng chung memory platform) đã được đưa vào Jira để triển khai theo phase riêng.