feat(honcho): scope host and peer resolution to active Hermes profile#3999
Closed
erosika wants to merge 10 commits into
Closed
feat(honcho): scope host and peer resolution to active Hermes profile#3999erosika wants to merge 10 commits into
erosika wants to merge 10 commits into
Conversation
fa51697 to
500de9e
Compare
Derives the Honcho host key from the active Hermes profile so that each profile gets its own Honcho host block, workspace, and AI peer identity. Profile "coder" resolves to host "hermes.coder", reads from hosts["hermes.coder"] in honcho.json, and defaults workspace + aiPeer to the derived host name. Resolution order: HERMES_HONCHO_HOST env var > active profile name > "hermes" (default). Complements NousResearch#3681 (profiles) with the Honcho identity layer that was part of NousResearch#2845 (named instances), adapted to the merged profiles system.
- hermes honcho status: shows active profile name + host key - hermes honcho status --all: compact table of all profiles with mode, recall, write frequency per host block - hermes honcho peers: cross-profile peer identity table (user peer, AI peer, linked hosts) - All write commands (peer, mode, tokens) print [host_key] label when operating on a non-default profile
When a profile is created and Honcho is already configured on the default host, automatically creates a host block for the new profile with inherited settings (memory mode, recall mode, write frequency, peer name, etc.) and auto-derived workspace/aiPeer. Zero-friction path: hermes profile create coder -> Honcho config cloned as hermes.coder with all settings inherited.
- Eagerly create AI and user peers in Honcho when a profile is created (not deferred to first message). Uses idempotent peer() SDK call. - hermes honcho enable: turn on Honcho for active profile, clone settings from default if first time, create peer immediately - hermes honcho disable: turn off Honcho for active profile - _ensure_peer_exists() helper for idempotent peer creation
Profiles inherit the default workspace instead of deriving a separate one. All profiles see the same user context, sessions, and project history. Each profile is a different AI peer in a shared space. Workspace can still be overridden per-profile via config if isolation is needed.
- hermes honcho --target-profile <name> <command>: target another profile's Honcho config without switching profiles. Works with all subcommands (status, peer, mode, tokens, enable, disable, etc.) - hermes honcho status now shows user peer card and AI peer representation when connected (fetched live from Honcho API)
- hermes honcho sync: scan all profiles, create missing host blocks - hermes update: automatically syncs Honcho config to all profiles after skill sync (existing users get profile mapping on next update) - sync_honcho_profiles_quiet() for silent use from update path
- Remove duplicate cmd_sync definition (kept version with error output) - Fix from_env workspace to stay shared (hermes) not profile-derived - Add docstring clarifying get_or_create is idempotent in status - Remove unused import importlib in test - Fix test assertion for shared workspace in from_env path - Add 3 tests for sync_honcho_profiles_quiet
500de9e to
2ef45b3
Compare
Contributor
|
Merged via PR #4616. All 10 of your commits were cherry-picked onto current main with your authorship preserved in git log. One minor cleanup added on top (removed a redundant local import). Thanks for the thorough profile-scoping work! |
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.
Summary
Adds Honcho identity scoping, cross-profile observability, and zero-friction migration for the multi-profile system (#3681). Each profile becomes an independent Honcho peer with its own workspace, config, and accumulated memory.
Host resolution
hermes.coder, reads fromhosts["hermes.coder"]in honcho.jsonHERMES_HONCHO_HOSTenv var > active profile name >"hermes"(default)from_env()/from_global_config()auto-resolve host, workspace, and aiPeerZero-friction migration
hermes profile create coderauto-clones Honcho config from default profile: memory mode, recall mode, write frequency, peer name, etc. are inherited; workspace + aiPeer auto-derive from profile namehermes honcho setupneeded for new profiles when Honcho is already configuredEnable/disable per profile
hermes honcho enable-- turn on Honcho for the active profile, clone settings from default if first time, create peer immediatelyhermes honcho disable-- turn off Honcho for the active profileObservability
hermes honcho statusshows active profile name + host keyhermes honcho status --all-- compact table across all profiles:hermes honcho peers-- cross-profile peer identity table:peer,mode,tokens) print[host_key]label when operating on a non-default profilePer-profile config granularity
Each profile's host block is independently configurable:
hermes honcho enable/disablehermes honcho peerhermes honcho modehermes honcho tokensAPI key and base URL stay at root (shared across profiles).
Changes
honcho_integration/client.py-- addresolve_active_host(), thread resolved host through confighoncho_integration/cli.py--clone_honcho_for_profile(),_ensure_peer_exists(),cmd_enable/disable,cmd_peers,cmd_status --all, host labels on writeshermes_cli/main.py-- argparse for new commands, auto-clone hook in profile creationtests/honcho_integration/test_client.py-- 10 new tests for host resolution and profile-scoped configtests/honcho_integration/test_cli.py-- 5 new tests for auto-clone behaviorComplements #3681 (profiles). Supersedes the Honcho portion of #2845.
Test plan
pytest tests/honcho_integration/ tests/test_honcho_client_config.py-- 134 passedpytest tests/hermes_cli/test_profiles.py-- 71 passedhermes profile create coderauto-clones Honcho configcoder honcho statusshows profile contexthermes honcho status --allshows table across profileshermes honcho enablecreates peer in Honchohermes honcho disableflips enabled flagPart of the Honcho PR map. Builds on #4037. Supersedes Honcho portion of #2845. Complements #3681 (profiles).