gsxdsm
fe5a595984
FN-7622: unify desktop and CLI provider seeding to fix truncated provider list
The Electron desktop app's in-process dashboard server skipped the CLI's provider seeding sequence, so /api/providers and /api/models returned a truncated catalog (missing built-in API-key providers and user customProviders[]) compared to the identical config on the web build.
- Move provider-auth.ts and custom-provider-registry.ts from @fusion/cli into @fusion/engine as the single shared implementation
- Add engine/src/provider-registration.ts exposing seedDashboardProviders(), mirroring the CLI's exact startup order (built-in Zai provider registration -> wrapAuthStorageWithApiKeyProviders -> model merge/refresh -> registerCustomProviders -> settings:updated resubscription)
- Update desktop/src/local-runtime.ts and local-server.ts to call the shared seedDashboardProviders() helper instead of constructing a raw authStorage/modelRegistry
- Convert packages/cli/src/commands/provider-auth.ts and custom-provider-registry.ts into re-export shims preserving unchanged observable behavior
- Add engine/src/__tests__/provider-registration.test.ts and expand desktop local-runtime/local-server tests to cover the shared seeding path
- Add changeset for @runfusion/fusion (patch)
Files changed:
.changeset/fn-7622-desktop-provider-parity.md | 7 +
.../cli/src/commands/custom-provider-registry.ts | 122 +----
packages/cli/src/commands/provider-auth.ts | 517 +--------------------
.../desktop/src/__tests__/local-runtime.test.ts | 93 ++++
.../desktop/src/__tests__/local-server.test.ts | 62 ++-
packages/desktop/src/local-runtime.ts | 33 +-
packages/desktop/src/local-server.ts | 21 +-
.../src/__tests__/provider-registration.test.ts | 192 ++++++++
packages/engine/src/custom-provider-registry.ts | 117 +++++
packages/engine/src/index.ts | 18 +
packages/engine/src/provider-auth.ts | 513 ++++++++++++++++++++
packages/engine/src/provider-registration.ts | 105 +++++
12 files changed, 1172 insertions(+), 628 deletions(-)
Fusion-Task-Id: FN-7622
Fusion-Task-Lineage: fb6fbbf3-745e-4623-b7af-11471e13f138
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-07 22:04:51 -07:00
..
2026-07-07 22:04:51 -07:00
2026-07-05 19:57:09 -07:00
2026-07-05 19:57:09 -07:00
2026-06-08 15:19:27 -07:00
2026-07-02 11:38:31 -07:00