From 37c3dcf551a2d06b28f11eda196bd73bbacf3f41 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Sun, 8 Mar 2026 23:39:00 -0700 Subject: [PATCH] fix: setup wizard overwrites platform_toolsets saved by tools_command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wizard and tools_command each loaded their own config dict. When tools_command saved platform_toolsets (with MoA/HA disabled), the wizard's final save_config() overwrote it with its own dict that lacked platform_toolsets entirely — resetting everything to defaults. Fix: pass the wizard's config dict into tools_command so they share the same object. Now platform_toolsets survives the wizard's final save. --- hermes_cli/setup.py | 2 +- hermes_cli/tools_config.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hermes_cli/setup.py b/hermes_cli/setup.py index 7993a7df7..df7a28763 100644 --- a/hermes_cli/setup.py +++ b/hermes_cli/setup.py @@ -1671,7 +1671,7 @@ def setup_tools(config: dict, first_install: bool = False): (no platform menu, prompts for all unconfigured API keys). """ from hermes_cli.tools_config import tools_command - tools_command(first_install=first_install) + tools_command(first_install=first_install, config=config) # ============================================================================= diff --git a/hermes_cli/tools_config.py b/hermes_cli/tools_config.py index b68932330..19288bf59 100644 --- a/hermes_cli/tools_config.py +++ b/hermes_cli/tools_config.py @@ -858,15 +858,19 @@ def _reconfigure_simple_requirements(ts_key: str): # ─── Main Entry Point ───────────────────────────────────────────────────────── -def tools_command(args=None, first_install: bool = False): +def tools_command(args=None, first_install: bool = False, config: dict = None): """Entry point for `hermes tools` and `hermes setup tools`. Args: first_install: When True (set by the setup wizard on fresh installs), skip the platform menu, go straight to the CLI checklist, and prompt for API keys on all enabled tools that need them. + config: Optional config dict to use. When called from the setup + wizard, the wizard passes its own dict so that platform_toolsets + are written into it and survive the wizard's final save_config(). """ - config = load_config() + if config is None: + config = load_config() enabled_platforms = _get_enabled_platforms() print()