feat(admin): de-duplicate per-plugin settings out of the .env admin page#265
Merged
Conversation
The admin /settings page was a hand-maintained catalog (31 entries) that mirrored each plugin's own setup.fields and wrote through the exact same config-store/vault plumbing as the per-plugin runtime editor — pure duplication. The only keys it uniquely owned were 4 orchestrator model-routing knobs missing from the orchestrator manifest. - add the 4 routing knobs (orchestrator_model_routing + 3 model_routing_* models) to harness-orchestrator manifest setup.fields, so they're editable in the per-plugin settings editor like every other orchestrator setting - slim settingsCatalog.ts to the single genuinely cross-plugin entry (ANTHROPIC_API_KEY, which fans out to 3 vault scopes); every other setting now lives with its plugin - add a bilingual (next-intl en/de) plugin-settings directory to /admin/settings linking each plugin to its own editor at /store/<id> - rewrite the adminSettings route test for the slim catalog; add a manifest guard test asserting the 4 routing fields stay present with correct types No change to bootstrap .env->config seeding or the write plumbing, so runtime values are unaffected — removed entries remain editable per-plugin.
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.
What
The admin
/settingspage was backed by a hand-maintained catalog (settingsCatalog.ts, 31 entries) that just mirrored each plugin's ownmanifest.yaml → setup.fieldsand wrote through the exact sameinstalledRegistry.updateConfig/vaultplumbing as the per-plugin runtime editor. ~27 of 31 entries were pure duplicates of settings already editable per-plugin.The only keys the admin page uniquely owned were 4 orchestrator model-routing knobs that were missing from the orchestrator manifest.
Changes
orchestrator_model_routing+ the 3model_routing_*_modelfields) inharness-orchestrator/manifest.yamlsetup.fields→ now editable in the per-plugin settings editor like every other orchestrator setting.settingsCatalog.tsfrom 31 → 1 entry:ANTHROPIC_API_KEY, the one genuinely cross-plugin value (its secret fans out to 3 vault scopes — orchestrator, verifier, orchestrator-extras — so setting it once centrally is a real convenience the per-plugin editor can't match). Every other setting now lives with its plugin./admin/settingsthat links each plugin to its own editor at/store/<id>.adminSettingsRoute.test.tsfor the slim catalog (Anthropic fan-out, set/unset, sk-ant- validation, unknown/not-installed paths); addorchestratorManifestRoutingFields.test.tsas a regression guard that the 4 routing fields stay in the manifest with correct types.Why it's safe
bootstrap.ts.env→config seeding and the write plumbing are untouched. The catalog only ever drove the admin overview UI, so removing entries cannot change any runtime value — those settings remain fully editable through each plugin's own editor.Verification
tsc --noEmitclean, affected tests 11/11 pass (incl. the new mainbuildForAgentRoutingtest)tsc --noEmitclean,i18n:checkOK (1096 keys, en/de parity)