Skip to content

fix(hermes): install memory provider in user plugin dir#170

Open
siolyn wants to merge 1 commit into
TencentCloud:mainfrom
siolyn:fix/hermes-user-plugin-link
Open

fix(hermes): install memory provider in user plugin dir#170
siolyn wants to merge 1 commit into
TencentCloud:mainfrom
siolyn:fix/hermes-user-plugin-link

Conversation

@siolyn

@siolyn siolyn commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Fixes #167.

The Hermes installer previously linked memory_tencentdb only into the mutable Hermes checkout tree:

$HERMES_AGENT_DIR/plugins/memory/memory_tencentdb

If the Hermes checkout is replaced during an update, that symlink can disappear while memory.provider: memory_tencentdb remains configured, causing TencentDB memory to silently detach.

This PR keeps the checkout link for compatibility and also installs a durable user-scope memory provider link:

$HERMES_HOME/plugins/memory_tencentdb

Hermes memory provider discovery scans $HERMES_HOME/plugins/<provider_name>/, so this is the path that survives checkout replacement.

Changes

  • Add user-scope Hermes memory provider symlink.
  • Keep existing checkout-tree symlink for compatibility.
  • Validate source provider files before creating any links.
  • Refuse to overwrite non-symlink targets.
  • Print readlink results in the install summary and warn if a link points to an unexpected target.

Verification

  • bash -n scripts/install_hermes_memory_tencentdb.sh
  • git diff --check
  • Smoke-tested install through Step 2.5 with temporary HERMES_HOME / HERMES_AGENT_DIR
  • Verified both plugin paths are symlinks pointing at the source provider and both expose plugin.yaml

Note: the local smoke-test run reached the symlink step successfully, then stopped at the pre-existing /etc/profile.d sudo write because this macOS test environment requires an interactive sudo password.

Signed-off-by: siolyn <siolynn@outlook.com>
@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Thanks for updating this pull request. The newly added warning for links pointing to abnormal targets greatly improves troubleshooting efficiency. We will review it and get back to you soon.

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.

Hermes install only links memory_tencentdb into checkout tree; plugin can disappear after update and silently detach memory

2 participants