Repository navigation
fix: honor HERMES_CONFIG/HERMES_HOME for multi-profile setups - #72
MasterCATZ wants to merge 1 commit into
Conversation
SkillClaw hardcoded ~/.hermes/config.yaml and auto-edited the wrong profile in multi-Hermes-home environments. Add env-aware resolvers for config path and skills dir, and use them in configure/inspect/restore.
|
Note: this patch was AI-generated using Hermes Agent. |
|
The path-selection fix is useful and the test suite stays at the current main baseline, but Please format the file and update the branch. Note that this PR addresses the wrong-profile target from #71, but not the separate consent/config-import concerns in that issue. |
Upper9527
left a comment
There was a problem hiding this comment.
Two correctness gaps need to be resolved before this can safely support multiple profiles:
restore_hermes_config()now selects the target from HERMES_CONFIG/HERMES_HOME, but_latest_hermes_backup_path()still selects from one global backup directory without recording the original target. Configure profile A, then B, then restore A: the default restore can copy B's configuration (including its credentials/settings) into A. Scope backups by resolved config path, or refuse an implicit restore when the backup target cannot be verified. Add a two-profile backup/restore regression._get_hermes_skills_dir()is introduced but never used. ConfigStore's Hermes default and_prepare_hermes_skills_dir()/ doctor still resolve the main profile's skills directory. Selecting HERMES_HOME therefore changes routing config while leaving skills on the wrong profile by default. Wire the same resolved home through the default-directory, setup, and diagnostic paths, preserving an explicitly configured custom skills.dir, and add tests for precedence and custom directories.
The previously noted Ruff format failure also remains in this diff. The separate consent/import concerns in #71 can remain follow-up work, but the cross-profile restore risk should not ship with path selection.
|
Superseded by merged #102. Thank you for identifying the HERMES_CONFIG/HERMES_HOME path-selection gap. The merged fix also adds explicit setup consent/import, persists the selected profile, wires skills defaults and diagnostics to it, and scopes backup/restore so a backup from another profile cannot overwrite the target. Closing this overlapping PR because its requested behavior is now covered on main. |
Problem
SkillClaw hardcodes
~/.hermes/config.yamland auto-edits it on startup. In multi-profile Hermes setups, this mutates the wrong config and breaks the intended routing.Fix
_get_hermes_config_path()and_get_hermes_skills_dir()helpers inclaw_adapter.pyHERMES_CONFIGandHERMES_HOMEbefore falling back to~/.hermes_configure_hermes,inspect_hermes_config, andrestore_hermes_configto use the new resolversVerified