Skip to content

feat: configure Web Search Plus from Hermes Desktop plugin settings - #139

Merged
robbyczgw-cla merged 6 commits into
mainfrom
feat/desktop-settings
Sep 23, 2026
Merged

robbyczgw-cla merged 6 commits into
mainfrom
feat/desktop-settings

Conversation

@robbyczgw-cla

Copy link
Copy Markdown
Owner

Summary

This makes Web Search Plus configurable from the Hermes Desktop plugin settings form. The form itself shipped in Hermes Desktop with NousResearch/hermes-agent#118917.

  • Schema: plugin.yaml config_schema lists the flat settings: country, language, max results, auto-routing, and SearXNG URL. It also lists every provider API key from optional_env: Serper, Brave, Tavily, You.com, Linkup, SerpBase, Exa, Querit, Firecrawl, Parallel, Keenable, Monid, and TinyFish. SerpBase, Querit, Monid, and TinyFish are labeled explicit-only. DONSETCH_BIN and the duplicate SearXNG env var are left out.
  • Overlay: load_config reads plugins.entries.web-search-plus.settings from Hermes config.yaml and overlays only the five flat scalars onto config.json, one way. Secrets are never overlaid. They stay in .env under their existing names and never land in config.yaml or config.json. Nested settings such as priority, auto_allow, and budgets stay in config.json.
  • No PyYAML required: when PyYAML is missing, a stdlib fallback reads the settings block. It handles config.yaml files with lists and one-line flow maps. Scalars match PyYAML: null and ~ read as None, YAML 1.1 booleans (yes, no, on, off) read as booleans, integers read as integers, and quoted values stay strings. A trailing comma no longer drops the whole map.

Tests

  • tests/test_desktop_settings.py has 10 tests: overlay, secrets never overlaid, config.yaml with lists, flow maps, and a parity matrix that runs PyYAML and the stdlib fallback over the same block and flow inputs.
  • Full local CI: ruff, gen_provider_docs --check, gen_contract_v3_schemas --check, schema_boundary_v3.mjs, compileall, and pytest with 1160 passed, 6 subtests.

Not verified yet

A headless render of the Desktop form showed the earlier 10-field schema. The expanded form with all 13 keys has not been rendered yet. I will check it before release.

Desktop writes flat plugins.entries.web-search-plus.settings.
Only the declared scalars overlay config.json. Secrets stay in
.env via the existing env names. Nested routing stays put.
The stdlib fallback walks only plugins.entries.web-search-plus.settings,
the same indent walk as the setup helper. Lists elsewhere no longer drop
the overlay on installs without PyYAML. Tests pin the scalar allowlist
with undeclared profile and provider_priority keys.
config_schema now includes every optional_env secret except
DONSETCH_BIN and SEARXNG_INSTANCE_URL. Secrets still never
overlay config.json. SerpBase, Querit, Monid, and TinyFish
are marked explicit-only.
The stdlib fallback reads settings: {key: scalar}, ignores nested
flow, and treats null, ~, and yes/no/on/off like PyYAML. Both
loaders are pinned to the same overlay.
The tool handler always passed count=5 when the agent omitted it, so
defaults.max_results (config.json or the Desktop Max results field)
only reached the CLI. An explicit count still wins; the configured
value is clamped to the tool range 1-20.
@robbyczgw-cla
robbyczgw-cla merged commit 86e756c into main Sep 23, 2026
3 checks passed
@robbyczgw-cla robbyczgw-cla mentioned this pull request Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant