FN-7630: harden Hermes Runtime as additive-only to provider/model/auth catalogs

Confirms and locks in that the Hermes Runtime plugin cannot suppress independently-configured custom providers, models, or auth options, closing out GitHub #1931's remaining audit items.

- Add FNXC documentation comments to register-model-routes.ts and the Hermes Runtime plugin explaining why the plugin structurally cannot mutate AuthStorage/ModelRegistry (no reference in PluginContext) and why configuredProviders only ever grows.
- Add regression coverage proving a connected Hermes runtime never narrows the model picker (/api/models), custom-provider CRUD routes, or auth-status surfaces.
- Add changeset documenting the fix and remaining follow-up items (FN-7625, FN-7636).

Files changed:
 .changeset/fn-7630-hermes-runtime-additive.md      |   7 +
 .../register-auth-routes-hermes-additive.test.ts   | 108 ++++++++++
 .../register-model-routes-hermes-additive.test.ts  | 152 +++++++++++++
 .../custom-provider-routes-hermes-additive.test.ts | 236 +++++++++++++++++++++
 .../dashboard/src/routes/register-model-routes.ts  |  12 ++
 plugins/fusion-plugin-hermes-runtime/src/index.ts  |  12 ++
 6 files changed, 527 insertions(+)

Fusion-Task-Id: FN-7630
Fusion-Task-Lineage: 651cb242-cabf-487b-bf19-21c51b2e91d3
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
gsxdsm
2026-07-07 08:28:12 -07:00
parent fe5a595984
commit 6bf0090a47
6 changed files with 527 additions and 0 deletions

View File

@@ -38,6 +38,18 @@ const hermesRuntimeFactory: PluginRuntimeFactory = async (ctx) => {
// ── Plugin Definition ─────────────────────────────────────────────────────────
/*
FNXC:ModelCatalog 2026-07-07-08:00:
FN-7630 (GitHub #1931): connecting/activating this plugin must be strictly
additive to Fusion's global provider/model/auth catalogs — it must never
suppress, deactivate, or hide independently-configured custom providers,
models, or auth options. `onLoad`/`onUnload` below intentionally receive no
reference to AuthStorage/ModelRegistry/global settings (see PluginContext in
@fusion/plugin-sdk) so this plugin is structurally incapable of mutating
those stores; it only resolves its own CLI settings, installs its own skill,
and logs/emits its own lifecycle events. Do not widen PluginContext access
from this plugin without re-auditing this invariant.
*/
const plugin: FusionPlugin = definePlugin({
manifest: {
id: "fusion-plugin-hermes-runtime",