Skip to content

v4.1.3 - memory context and namespace hardening

Choose a tag to compare

@cong91 cong91 released this 12 Mar 03:06
· 151 commits to master since this release

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 / userId vào memory tools qua hook before_tool_call
  • Sửa normalize namespace để alias explicit đi đúng canonical namespace trước khi fallback
  • namespace explicit 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_store khô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.ts
  • tests/test-memory-tools-agent-context.ts
  • tests/test-tool-context-injector.ts
  • tests/test-runtime-before-tool-call-context-probe.ts

4) Runtime helper scripts

  • scripts/asm-44-runtime-patch.sh
  • scripts/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 ASM
  • ASM-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.