Skip to content

feat(admin): de-duplicate per-plugin settings out of the .env admin page#265

Merged
Weegy merged 3 commits into
mainfrom
worktree-env-admin-cleanup
Jun 8, 2026
Merged

feat(admin): de-duplicate per-plugin settings out of the .env admin page#265
Weegy merged 3 commits into
mainfrom
worktree-env-admin-cleanup

Conversation

@Weegy
Copy link
Copy Markdown
Contributor

@Weegy Weegy commented Jun 8, 2026

What

The admin /settings page was backed by a hand-maintained catalog (settingsCatalog.ts, 31 entries) that just mirrored each plugin's own manifest.yaml → setup.fields and wrote through the exact same installedRegistry.updateConfig / vault plumbing 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

  • Move the 4 routing knobs into the orchestrator manifest (orchestrator_model_routing + the 3 model_routing_*_model fields) in harness-orchestrator/manifest.yaml setup.fields → now editable in the per-plugin settings editor like every other orchestrator setting.
  • Slim settingsCatalog.ts from 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.
  • Add a bilingual (next-intl, en/de) "plugin settings directory" to /admin/settings that links each plugin to its own editor at /store/<id>.
  • Tests: rewrite adminSettingsRoute.test.ts for the slim catalog (Anthropic fan-out, set/unset, sk-ant- validation, unknown/not-installed paths); add orchestratorManifestRoutingFields.test.ts as 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

  • middleware: lint clean, tsc --noEmit clean, affected tests 11/11 pass (incl. the new main buildForAgentRouting test)
  • web-ui: eslint clean, tsc --noEmit clean, i18n:check OK (1096 keys, en/de parity)

Weegy added 3 commits June 8, 2026 07:28
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.
@Weegy Weegy merged commit 19d3835 into main Jun 8, 2026
7 checks passed
@Weegy Weegy deleted the worktree-env-admin-cleanup branch June 8, 2026 08:56
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