Repository navigation
v7.15.3:新版 Hermes 认得出 Nyx 是记忆插件(--enable 会设好 memory.provider);安装后说明改为英文在前 - #24
Merged
Merged
Conversation
…英文在前 Hermes 主线版按语法树里的 register_memory_provider(...) 调用认记忆插件,注释里的字不算; v7.15.2 的入口文件只在注释里提到它,被当成普通插件,--enable 不设 memory.provider。 入口文件现在自己调用 ctx.register_memory_provider;after-install.md 把设 memory.provider 写成必做。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ZZeQFn5F6mEbmX8vPsf4g
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ZZeQFn5F6mEbmX8vPsf4g
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
提交 Hermes 插件目录前,我在主线版 Hermes 上用 PyPI 上的 7.15.2 做了一次真实安装。结果
hermes plugins install sixgodgit/nyx/hermes-plugin --enable之后,memory status显示Provider: (none — built-in only):Nyx 装上了,但没有启用。安装时还打出了「✓ Plugin nyx enabled.」,用户会以为它已经在工作。原因:主线版 Hermes 判断记忆插件的方式变了。它解析插件目录里
.py文件的语法树,寻找真实的register_memory_provider(...)调用(plugins/memory/__init__.py的_defines_memory_provider),注释和文档字符串里出现这个词不算。我们的入口文件只是把调用转给 nyx-memory,这个词只出现在注释里,所以被当成了普通插件:只写进plugins.enabled,没有设置memory.provider。我用 Hermes 主线版自己的这个函数验证过,钉住的 v7.15.2 提交返回 False,新提交返回 True。稳定版(v0.21.5 / 2026.9.24)仍按字面匹配这个词,所以能识别,但它安装时本来就不会设置
memory.provider。另一个问题:
after-install.md写的是「没加--enable才需要执行hermes config set memory.provider nyx」。这在两个版本上都不对,照着做的用户 Nyx 不会启用。改动
hermes-plugin/__init__.py、hermes-plugin-vector/__init__.py:入口文件自己调用ctx.register_memory_provider(NexSandglassProvider()),在此之前先调用apply_data_dir(),按当前 profile 的 nyx.json 定数据目录。nexsandglass_hermes.register完全一样。nyx-memory>=7.15.2,<8。install.py的SHIM:给老版本 Hermes 的安装路径写出的入口文件,做了同样的改动。after-install.md:memory.provider写成必做步骤(重复执行也没有影响);hermes nyx …终端命令。test_new_hermes_recognises_memory_provider:按主线版 Hermes 的语法树规则,检查两个插件目录和 install 写出的入口文件。改动之前这个测试失败,改动之后通过。验证
pytest:665 passed,2 skipped。hermes plugins install sixgodgit/nyx/hermes-plugin --ref ec7aa40… --enable --yes-deps输出「✓ nyx set as memory.provider」,config.yaml里有provider: nyx,memory status显示Provider: nyx。依赖从 PyPI 解析到 7.15.2,说明新入口文件在下限版本上也能工作。config set memory.provider nyx,memory status显示Provider: nyx,hermes nyx doctor --json返回 ok。之后
合并后 Hermes 插件目录的条目会钉在这次的合并提交上。依赖下限还是 7.15.2,所以目录的 CI 不需要等 7.15.3 发布;但请照常发布 v7.15.3,让版本号和老版本 Hermes 的安装路径保持一致。
Generated by Claude Code