Repository navigation
Conversation
… root Hermes keeps every profile in its own state.db: the default profile at `~/.hermes/state.db`, all others at `~/.hermes/profiles/<name>/state.db`. The Hermes source candidate defaults to `~/.hermes`, which the adapter walks recursively, so authorizing the source imports every profile into one pool. There was no supported way to import a single profile without also importing the others (the only escape was setting HERMES_HOME for the whole runtime). Add `hermes` to the source picker allowlist so a profile directory can be selected like any other picker source; the resulting grant is a `user_selected` root and the adapter only walks that profile. Document both options (picker and HERMES_HOME) in the Hermes harness doc. Tests: extended the metadata-only preview test to cover hermes, plus a new test that selects `~/.hermes/profiles/<name>` and asserts the resolved candidate is the selected root. 33/33 in test_source_candidates.py, 50/50 in the candidate/connection/registry suites.
The recall host layout for Hermes is hardcoded to `~\u002f.hermes`, so the one-click install writes the native provider, the MCP block and the recall skill into the default profile — even when the user pointed the source at another profile through HERMES_HOME. Imports then read one profile while the recall injection lands in another, and the UI keeps reporting "connection pending" for the profile that actually has the data. Resolve the directory from HERMES_HOME when set (same treatment DSH_HOME already gets), falling back to `~\u002f.hermes`. Test: recall-hosts.test.ts asserts presencePath and layout.configPath move with HERMES_HOME.
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.
Problem
Hermes is multi-profile, but the
hermessource has exactly one root and it is not pickable.~/.hermes/state.db~/.hermes/profiles/<name>/state.dbThe source candidate for
hermesis~/.hermes(registry.py,_configured_root(default_home=".hermes")), and the adapter walks that root recursively forstate.db/sessions/**/*.jsonl. So authorizing the source imports every profile into one memory pool — there is no supported way to import one profile without the others.The only escape today is setting
HERMES_HOMEfor the whole runtime, which is an environment override, requires--confirm-overrides, and replaces the picker entirely. For a user who runs two profiles (e.g. one per person sharing a Mac), that is an all-or-nothing switch with no UI path.Fix
Add
hermestoPICKER_SOURCE_IDSso a profile directory can be selected through the existing picker flow (user_selectedroot), exactly like WorkBuddy/Cursor/Claude Code/Codex. No new code path:SourceCandidateStore._root()already validates a selected directory, andconnections.pyalready resolvesUSER_SELECTEDcandidates with a revision check.Result: the grant is scoped to
~/.hermes/profiles/<name>, the adapter only sees that profile'sstate.db, and the default profile stays out of the pool.Tests
test_preview_is_metadata_only_and_cancel_changes_nothing— parametrized withhermes(metadata-only preview still holds).test_hermes_profile_directory_can_be_selected— selects~/.hermes/profiles/<name>, asserts the resolved candidate isUSER_SELECTEDat that path, revision 1.(The repo-wide audit script
audit_core_test_design.pyfails on this machine because systempython3is 3.9 andtest_memory_qa_permissions.pyusestypealias syntax — unrelated to this change.)Docs
memhub/docs/harness-support/hermes.mdgains a 多 Profile 隔离 section describing both options (picker vsHERMES_HOME) and noting they are mutually exclusive once the env override is set.Second commit: the host install follows
HERMES_HOMEtooImporting the right profile is only half the story. The recall host layout for Hermes is hardcoded to
~/.hermesinpackages/runtime-control/src/recall-hosts.ts, so the one-click install (native provider + MCP block + recall skill) always lands in the default profile. A user who moved the source withHERMES_HOMEthen gets:state.dbof the selected root), andThat is both a wrong-profile write and a UI lie: the Applications page reports "connection pending" for the profile that actually holds the data, and clicking "Connect" installs into the other profile.
Fix: resolve the Hermes host directory from
HERMES_HOMEwhen it is set, falling back to~/.hermes— the same treatmentDSH_HOMEalready gets a few lines above.Test:
recall-hosts.test.tsassertspresencePathandlayout.configPathmove withHERMES_HOME.Notes
~/.hermesroot.