feat(hermes): add Hermes memory provider setup and diagnostics of powercontext cli - #1287
feat(hermes): add Hermes memory provider setup and diagnostics of powercontext cli#1287Alanxtl wants to merge 2 commits into
Conversation
|
the ci fails due to timeout, maybe it is github's problem |
| } | ||
|
|
||
| plugin = hermes_home() / "plugins" / HERMES_PLUGIN_NAME | ||
| installed = _is_hermes_plugin(plugin) |
There was a problem hiding this comment.
This can report a broken install as healthy. I reproduced it with a provider missing client.py: powercontext doctor hermes returned exit 0 and ok: true, while hermes plugins doctor --ci failed to import the provider. Could we validate the installed directory through the real Hermes plugin doctor, and verify the supported Hermes version, before reporting success?
|
|
||
| def _materialize_remote_checkout(source: str, ref: str) -> Path: | ||
| target = checkout_target(ref) | ||
| if _usable_checkout(target): |
There was a problem hiding this comment.
This cache is keyed only by ref, so any usable checkout wins regardless of source, and mutable refs such as the default master are never refreshed. After one setup, a later run against an updated master—or a different repository with the same ref—silently installs the cached provider. Please include the normalized source/resolved commit in the cache identity or refresh mutable refs before returning.
| target = home / "plugins" / HERMES_PLUGIN_NAME | ||
| try: | ||
| target.parent.mkdir(parents=True, exist_ok=True) | ||
| shutil.copytree(plugin_dir, target, dirs_exist_ok=True) |
There was a problem hiding this comment.
dirs_exist_ok=True overlays the new release but never removes files that disappeared from it. I reproduced this by installing a provider with an extra module, then a new source without it; the removed module remained under $HERMES_HOME/plugins/powercontext and could still be discovered. Please stage the new directory and replace the old one atomically, or remove the old target before copying.
Which issue or RFC does this PR close?
Rationale for this change
add support for Hermes CLI:
including
install plugin of powercontext hermes
cp to $HERMES_HOME/plugins/powercontext
check Hermes CLI installed or not
check PowerContext Hermes pligin exists or not
suppport --json
Are there any user-facing changes?
yes, powercontext cli support for hermes
AI usage statement
coworked with codex