Repository navigation
Conversation
Importing a Grok Bot or OpenBot into a named profile printed 'hermes cron resume <id>' without a -p selector, so the hint failed when pasted from any other profile: the resume ran against the caller's cron store and did not find the job (NousResearch#265). The hint now carries the profile's -p selector via hermes_constants.profile_cli_selector(), the same helper core uses for its copy-pasteable guidance; the default profile keeps the bare form. Existing suite extended with a named-profile end-to-end test.
|
Thanks, and the per-Bot profile approach is the option the reporter picked on #265. One blocker: The importer calls private core functions: Please create profiles through the public CLI instead: run The tests look good: 134 pass on this head, and 2 fail on main as they should. |
An export holding several Bots imported them all into one profile, where `single=len(bots) == 1` is False: no role could reach SOUL.md, so every Bot after the first became a memory entry of the same agent. That is the merge the issue reports. `hermes import-agent grok-bot` now offers one profile per Bot when the export holds more than one. Each profile is created the way `hermes profile create --clone` does it (same config.yaml/.env, no messaging channels), with SOUL.md seeded so the Bot's own role can become its identity, and only that Bot's routines are imported into its cron store. The printed `hermes cron resume` lines carry `-p <profile>`, so they work pasted from anywhere. A single-Bot import is unchanged, `--bot` keeps importing where you are, and a non-interactive run (`-y`) or a dry run creates nothing — it says what the Bots lose instead. The `hermes setup` path is untouched: its child always runs on `--profile default`, so offering profiles there is a core change. Refs NousResearch#265
…ate` The importer called `hermes_cli.profiles.create_profile`, `profile_exists`, `get_profile_dir`, `validate_profile_name` and `hermes_cli.default_soul` — private core with no compatibility promise, so a routine release could move them and break the import without warning (catalog rule 9; NousResearch#383 was closed for the same reason). Each Bot's profile is now made the way a user makes one: `hermes profile create <name> --clone` in a child process, its directory read back from the CLI's own output. A name the CLI refuses (reserved, or not a valid id) is retried once with a `-bot` suffix; a profile that already exists is merged into, never clobbered. `--no-alias` keeps the footprint to the profile itself — an import should not install a wrapper script per Bot. `--clone` copies this profile's SOUL.md, and a Bot's role only replaces a SOUL.md that still holds Hermes' default. Keeping the clone would send the role to memory instead — the merge NousResearch#265 reports — so the new profile starts without one and the Bot owns its identity. Tests: 136 passed, 1 skipped. New: profiles are created through the public CLI (the private functions are patched to fail), and a Bot's role reaches SOUL.md even when the importing profile has a custom one.
fa18cc8 to
54656a2
Compare
|
Done. Each Bot's profile is now created in a child process via hermes profile create --clone --no-alias (following setup_agent_import._import_child's sys.executable -P -m hermes_cli.main pattern). Its directory is parsed directly from stdout (Profile '' created at , or Path: from hermes profile show if it already exists).A few important detail to note:
validate_profile_name is also gone in favor of the CLI's own naming rules: rejected names retry once with a -bot suffix, and existing profiles are merged into rather than overwritten. hermes plugins validate ./agent-importers is completely clean for cli.py (only untouched pre-existing imports remain in grok_bot.py and openclaw.py). Let me know if you'd like me to put default_soul behind a seam in a separate follow-up. The tests is 137 passed, 1 skipped, including two new tests verifying that profile creation works with private functions patched to raise, and that a Bot's role still populates SOUL.md when the importing profile has its own. the branch is rebased over #290 ( |
… not the launch env The process env holds the launch profile's channels: a job imported into another profile cannot deliver through them. Platform ids now match cron's deliver tokens (qqbot; no bare qq). The config.yaml home_channel branch read PyYAML, which core no longer ships; the broad except hid the ImportError, so it never matched — it now goes through the plugin's load_config_file. The preview row (destination) carries 'delivers to <x>', and the local-output hint names the target profile's cron/output. Test moved off the hunk NousResearch#290/NousResearch#394 edit so the three PRs merge cleanly.
…import (exit 1) After the user accepted one profile per Bot, a failed 'hermes profile create' returned an empty target list and the import silently fell back to merging every Bot into the current profile: the merge they had just declined, reported as success. It now exits 1 with nothing imported.
… not the launch env The process env holds the launch profile's channels: a job imported into another profile cannot deliver through them. Platform ids now match cron's deliver tokens (qqbot; no bare qq). The config.yaml home_channel branch read PyYAML, which core no longer ships; the broad except hid the ImportError, so it never matched — it now goes through the plugin's load_config_file. The preview row (destination) carries 'delivers to <x>', and the local-output hint names the target profile's cron/output. Test moved off the hunk #290/#394 edit so the three PRs merge cleanly. (cherry picked from commit 36ca96c)
|
Thank you @ree2507! This landed on main through #446, which stacked the 34 reviewed official-plugin PRs on current main so their shared files (CHANGELOGs, versions, the README grid) conflicted only once. Your commits are kept with your authorship; this PR's tip is 2feabbb. To get it now: |
Fixes #265 (the multi-bott half)
What this changes
Previously, importing an export containing multiple Bots merged all of them into a single profile. Because
single = len(bots) == 1evaluated toFalse, none of the roles were written toSOUL.md—instead, every Bot after the first was saved as a memory entry under the same agent (e.g.,"Grok Bot Ava: You are Ava...","Grok Bot Scout: You are Scout..."), causing the merge behavior described in the issue.hermes import-agent grok-botnow offers to create a separate profile for each Bot when an export contains more than one:hermes profile create --clone. The current profile'sconfig.yamland.envare carried over so the Bot works out of the box for one-shot chats, while messaging channels are excluded to prevent two gateways from conflicting over the same bot token.SOUL.mdis seeded from scratch rather than cloned, allowing the Bot's own role to become that profile's identity (it will only replace the file if it still contains Hermes' default template).hermes cron resumecommands include-p <profile>so they can be copy-pasted and run from anywhere.Scope
--botcontinues to import directly into your active profile.-y) and--dry-runruns will not create new profiles. Instead, they warn about what gets lost by merging into one profile (one role inSOUL.md, the rest saved as memory entries) rather than silently triggering a side effect from a skipped prompt.hermes setupis untouched. Since its child process always runs on--profile default(hermes_cli/setup_agent_import.py:157), supporting multi-profile selection there requires a core change, which can be handled in a separate PR as discussed.Testing
test_several_bots_are_offered_one_profile_each: Verifies that two Bots in one export result in two separate profiles—each with its own role inSOUL.md, its own cron job, and a cloned.env—while leaving the current profile untouched and appending-pto both resume hints.test_several_bots_without_a_prompt_are_imported_into_this_profile: Verifies that-yskips profile creation, saves both roles as memory entries, and prints a notice pointing to the interactive mode.agent-importerstest suite: 134 passed, 1 skipped (up from the baseline of 132 passed, 1 skipped—the only additions being the two new tests).hermes plugins validate ./agent-importersalso passed.hermes plugins validateflags the newhermes_cli.profilesimports under its private-core advisory. Since there isn't a public plugin-facing seam for creating profiles yet—and the issue specifically asked forhermes profile create --clonesemantics—I used it directly, though I'm happy to move this behind a core helper if you'd prefer.The resume-hint half is #290