feat: configure Web Search Plus from Hermes Desktop plugin settings - #139
Merged
Merged
Conversation
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.
# Conflicts: # CHANGELOG.md
Merged
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
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.
plugin.yamlconfig_schemalists the flat settings: country, language, max results, auto-routing, and SearXNG URL. It also lists every provider API key fromoptional_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_BINand the duplicate SearXNG env var are left out.load_configreadsplugins.entries.web-search-plus.settingsfrom Hermesconfig.yamland overlays only the five flat scalars ontoconfig.json, one way. Secrets are never overlaid. They stay in.envunder their existing names and never land inconfig.yamlorconfig.json. Nested settings such as priority,auto_allow, and budgets stay inconfig.json.config.yamlfiles with lists and one-line flow maps. Scalars match PyYAML:nulland~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.pyhas 10 tests: overlay, secrets never overlaid,config.yamlwith lists, flow maps, and a parity matrix that runs PyYAML and the stdlib fallback over the same block and flow inputs.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.