Skip to content

fix(cli): run computer use post-setup when enabling tool (#22776) - #30316

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-02d0efaa
May 22, 2026
Merged

fix(cli): run computer use post-setup when enabling tool (#22776)#30316
teknium1 merged 2 commits into
mainfrom
hermes/hermes-02d0efaa

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvages #22776 onto current main. Closes a silent-no-op bug in the hermes tools enable flow.

The problem

Computer Use is a "no-key" provider — there are no env vars to ask the user about. So when a returning user toggled it on via hermes tools, _toolset_needs_configuration_prompt() returned False (correctly: nothing to configure), the provider-setup flow was skipped, and the post_setup hook that runs install_cua_driver() never fired. Result: cua-driver stayed uninstalled, but the toolset showed as enabled.

The fix

Three layered changes in hermes_cli/tools_config.py:

  1. _POST_SETUP_INSTALLED registry — explicit opt-in dict mapping post_setup keys to a "is the side-effect already satisfied?" predicate. Only entries here gate the configuration prompt; other post_setup hooks (kittentts, piper, agent_browser, etc.) keep their existing behaviour. Adding "cua_driver": lambda: bool(shutil.which(_cua_driver_cmd())).

  2. _toolset_needs_configuration_prompt() extension — when any visible provider has a registered post_setup install-state check that hasn't been satisfied, force the configuration flow so _configure_provider invokes _run_post_setup and the install actually runs.

  3. HERMES_CUA_DRIVER_CMD override threaded through — new _cua_driver_cmd() helper honours non-empty overrides (blank ones fall back to "cua-driver"). All call sites (install_cua_driver, _run_cua_driver_installer, _POST_SETUP_INSTALLED predicate) consult it. Tests pin the version-probe to the override so CI matches real-host behaviour.

Validation

Credit @sgtworkman (PR #22776).

Closes #22776.

Infographic

pr-22776-tools-enable-post-setup

@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-02d0efaa vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9012 on HEAD, 9012 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4763 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@teknium1
teknium1 merged commit caf0f30 into main May 22, 2026
17 of 18 checks passed
@teknium1
teknium1 deleted the hermes/hermes-02d0efaa branch May 22, 2026 08:24
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard comp/tools Tool registry, model_tools, toolsets labels May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/tools Tool registry, model_tools, toolsets P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants