fix(memory): auto-install hindsight-all for local_embedded mode - #13101
Closed
LehaoLin wants to merge 1 commit into
Closed
fix(memory): auto-install hindsight-all for local_embedded mode#13101LehaoLin wants to merge 1 commit into
LehaoLin wants to merge 1 commit into
Conversation
When users select local_embedded mode via hermes memory setup, the setup wizard attempts to install hindsight-all but the install can silently fail (capture_output=True swallows errors). Since plugin.yaml only declares hindsight-client>=0.4.22 as a dependency, hermes startup validation passes even when hindsight-all is missing. At runtime, from hindsight import HindsightEmbedded crashes with ModuleNotFoundError. This patch adds a check in initialize() that detects local_embedded mode and auto-installs hindsight-all if the hindsight package is not importable, raising a clear RuntimeError if installation fails. This mirrors the existing auto-upgrade logic for hindsight-client in cloud mode. plugin.yaml is also updated with a comment noting the dependency.
4 tasks
Collaborator
1 similar comment
Collaborator
nicoloboschi
suggested changes
Apr 23, 2026
nicoloboschi
left a comment
Contributor
There was a problem hiding this comment.
we do it already when you do the hermes memory setup so I don't see why we need it twice
This was referenced Apr 24, 2026
12 tasks
Contributor
|
Thanks for addressing the local-embedded dependency path. Current main now prevents the PR-era repeated missing-module failure by probing the local runtime and disabling it with a warning when unavailable ( Problems
Suggested changes
Automated hermes-sweeper review. |
Collaborator
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.
What does this PR do?
Fixes a crash when users select
local_embeddedmode viahermes memory setup. The setup wizard tries to installhindsight-allbut the install can silently fail becausecapture_output=Trueswallows errors. Sinceplugin.yamlonly declareshindsight-client>=0.4.22as a dependency, hermes startup validation passes even whenhindsight-allis missing. At runtime,from hindsight import HindsightEmbeddedcrashes withModuleNotFoundError: No module named 'hindsight'.This patch adds a guard in
HindsightMemoryProvider.initialize()that:local_embeddedimport hindsight— if it fails, auto-installshindsight-allviauv pip installRuntimeErrorwith manual install instructions if installation failsThis mirrors the existing auto-upgrade logic for
hindsight-clientalready present ininitialize()for cloud mode.Related Issue
Fixes crash described in hindsight local_embedded setup flow.
Type of Change
Changes Made
plugins/memory/hindsight/__init__.py: Added auto-install guard forhindsight-allininitialize()when mode islocal_embeddedplugins/memory/hindsight/plugin.yaml: Added comment documenting thehindsight-alldependency for local_embedded modeHow to Test
local_embeddedmode but ensurehindsight-allis NOT installedhindsight-alland logs the installationRuntimeErroris raised with manual instructionshindsight-allinstalled (no regression)Checklist