Skip to content

fix(gateway): isolate Hermes memory by user#231

Open
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/gateway-user-scope
Open

fix(gateway): isolate Hermes memory by user#231
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/gateway-user-scope

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Scope Gateway TdaiCore instances and data directories by user_id for Hermes requests
  • Keep empty/default/default_user on the legacy baseDir for backward compatibility
  • Propagate user_id through Hermes search/seed client APIs and memory tool calls
  • Add Gateway regression tests for persona and L0 capture isolation

Verification

  • npm test -- --run
  • npm run build:plugin
  • python3 -m compileall -q hermes-plugin/memory/memory_tencentdb
  • npx vitest run src/gateway --run

Note: npm run test:cc-plugin -- --run is not available in this package.json (Missing script: test:cc-plugin).

Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Thanks for the contribution! The PR is well-structured and the code quality is solid 👍

Regarding user-based memory isolation — multi-user management will be handled internally as part of our upcoming roadmap with a unified solution. That said, your implementation is well-thought-out, and we'll take some of the ideas and patterns from it as a reference for our internal work.

Appreciate your understanding and continued contributions! 🎉

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.

2 participants