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-05-23 02:29:38 -07:00
2026-07-01 10:23:39 -07:00
2026-05-31 13:50:23 -07:00
2026-05-20 15:54:44 -07:00
2026-05-29 20:05:14 -07:00
2026-07-05 11:31:46 -07:00
2026-06-29 04:12:13 -07:00
2026-05-21 12:04:58 -07:00
2026-05-19 17:19:02 -07:00
2026-06-26 16:14:44 -07:00
2026-07-05 17:50:13 -07:00
2026-07-06 19:03:07 -07:00
2026-06-13 04:54:59 -07:00
2026-05-01 05:04:05 -07:00
2026-06-04 22:53:02 -07:00
2026-07-05 11:31:48 -07:00
2026-06-22 01:37:59 -07:00
2026-07-01 09:45:30 -07:00
2026-06-03 17:14:42 -07:00
2026-07-06 19:03:07 -07:00
2026-05-13 23:41:35 -07:00
2026-07-04 10:42:21 -07:00
2026-05-13 23:41:35 -07:00
2026-07-04 21:28:15 -07:00
2026-06-26 00:57:32 -07:00
2026-05-05 06:32:33 -07:00
2026-06-26 00:57:32 -07:00
2026-07-06 19:03:07 -07:00
2026-06-30 12:56:03 -07:00
2026-07-03 22:04:45 -07:00
2026-07-05 18:47:40 -07:00
2026-06-21 16:23:42 -07:00
2026-06-07 20:43:44 -07:00
2026-07-01 09:06:01 -07:00
2026-05-21 12:49:50 -07:00
2026-05-18 12:31:21 -07:00
2026-06-22 03:04:21 -07:00
2026-05-20 08:23:40 -07:00
2026-05-23 00:03:12 -07:00
2026-06-09 15:21:39 -07:00
2026-06-15 12:34:44 -07:00
2026-06-26 16:14:44 -07:00
2026-06-15 02:30:41 -07:00
2026-06-04 16:16:50 -07:00
2026-06-27 21:39:40 -07:00
2026-05-03 11:06:27 -07:00
2026-07-04 21:28:16 -07:00
2026-07-07 22:04:51 -07:00
2026-06-01 08:23:02 -07:00
2026-05-19 03:21:18 -07:00
2026-04-28 14:25:55 -07:00
2026-06-27 12:20:42 -07:00
2026-06-07 23:03:38 -07:00
2026-05-19 22:50:39 -07:00
2026-05-14 19:26:58 -07:00
2026-05-13 12:30:45 -07:00
2026-05-19 19:28:05 -07:00
2026-05-29 10:23:59 -07:00
2026-06-26 00:57:32 -07:00
2026-07-06 19:03:07 -07:00
2026-05-14 00:58:44 -07:00
2026-05-03 23:08:05 -07:00
2026-07-02 11:38:34 -07:00
2026-05-30 22:53:24 -07:00
2026-05-29 07:11:00 -07:00
2026-06-03 15:32:29 -07:00
2026-06-25 08:35:44 -07:00
2026-06-03 17:57:00 -07:00
2026-05-14 04:32:42 -07:00
2026-05-14 04:32:43 -07:00
2026-06-23 08:21:10 -07:00
2026-05-26 21:57:31 -07:00
2026-05-16 17:31:09 -07:00
2026-07-07 22:04:51 -07:00
2026-07-02 13:07:16 -07:00
2026-07-01 09:41:20 -07:00
2026-06-05 20:05:29 -07:00
2026-06-26 11:56:12 -07:00
2026-06-26 00:57:32 -07:00
2026-06-26 00:57:32 -07:00
2026-06-27 14:09:47 -07:00
2026-06-26 00:57:32 -07:00
2026-07-02 11:38:32 -07:00
2026-06-22 19:48:50 -07:00
2026-06-25 20:12:20 -07:00
2026-06-25 20:12:20 -07:00
2026-07-07 10:09:28 -07:00
2026-05-13 20:20:26 -07:00
2026-05-28 15:04:41 -07:00
2026-05-26 21:57:31 -07:00
2026-05-12 18:26:58 -07:00
2026-06-11 20:27:29 -07:00
2026-05-23 09:59:50 -07:00
2026-05-12 09:06:54 -07:00
2026-05-28 13:02:30 -07:00
2026-05-21 16:30:31 -07:00
2026-05-12 17:04:33 -07:00
2026-07-07 07:37:41 -07:00
2026-05-16 23:45:17 -07:00
2026-06-03 17:14:42 -07:00
2026-07-06 13:11:21 -07:00
2026-05-30 09:43:02 -07:00
2026-06-13 16:16:52 -07:00
2026-06-19 23:50:37 +00:00
2026-05-07 23:21:05 -07:00
2026-05-10 19:13:05 -07:00
2026-05-16 17:31:09 -07:00
2026-06-29 08:49:59 -07:00
2026-07-04 14:11:25 -07:00
2026-05-10 19:13:05 -07:00
2026-07-06 19:03:06 -07:00
2026-07-06 19:03:07 -07:00
2026-07-04 21:28:16 -07:00
2026-07-05 11:31:48 -07:00
2026-07-05 11:31:48 -07:00
2026-06-04 12:44:43 -07:00
2026-06-07 21:19:10 -07:00
2026-06-04 07:34:02 -07:00
2026-06-07 21:19:10 -07:00
2026-05-19 19:28:05 -07:00
2026-04-23 14:11:04 -07:00
2026-04-23 14:11:04 -07:00
2026-06-29 16:42:11 -07:00
2026-06-05 20:05:29 -07:00
2026-06-26 16:14:44 -07:00
2026-06-05 20:20:25 -07:00
2026-06-21 03:32:53 -07:00
2026-07-06 19:03:06 -07:00
2026-05-29 20:05:14 -07:00
2026-06-29 01:05:44 -07:00
2026-06-11 21:00:23 -07:00
2026-07-07 22:04:51 -07:00
2026-07-07 22:04:51 -07:00
2026-06-04 22:53:02 -07:00
2026-07-04 23:13:19 -07:00
2026-05-13 21:52:40 -07:00
2026-06-12 15:57:12 -07:00
2026-05-04 13:17:57 -07:00
2026-05-26 23:41:28 -07:00
2026-05-14 22:16:44 -07:00
2026-06-07 23:03:38 -07:00
2026-07-01 16:38:27 -07:00
2026-07-01 22:31:27 -07:00
2026-05-17 02:08:01 -07:00
2026-05-21 00:17:33 -07:00
2026-06-27 09:28:29 -07:00
2026-07-04 21:28:15 -07:00
2026-06-25 16:22:40 -07:00
2026-06-25 23:25:23 -07:00
2026-06-26 00:57:32 -07:00
2026-07-04 15:12:55 -07:00
2026-05-19 14:22:11 -07:00
2026-07-05 20:41:20 +02:00
2026-05-03 01:15:56 -05:00
2026-06-19 16:47:34 -07:00
2026-04-27 08:33:03 -07:00
2026-06-29 19:17:37 -07:00
2026-05-23 14:26:57 -07:00
2026-05-30 21:53:00 -07:00
2026-05-14 05:55:16 -07:00
2026-06-04 14:01:55 -07:00
2026-06-29 03:15:30 -07:00
2026-07-01 18:27:32 -07:00
2026-05-31 23:24:53 -07:00
2026-06-18 00:39:01 -07:00
2026-06-23 10:30:50 -07:00
2026-05-12 17:24:44 -07:00
2026-07-05 11:31:48 -07:00
2026-05-14 08:24:01 -07:00
2026-05-28 21:23:48 -07:00
2026-05-28 21:23:48 -07:00
2026-07-01 07:33:56 -07:00
2026-06-12 06:49:29 -07:00
2026-05-18 00:53:23 -07:00
2026-07-05 11:31:47 -07:00
2026-07-05 11:31:46 -07:00
2026-06-09 03:53:34 -07:00
2026-04-23 23:02:35 -07:00
2026-05-19 19:28:05 -07:00
2026-06-25 14:43:41 -07:00
2026-05-08 18:59:08 -07:00
2026-07-02 07:32:47 -07:00
2026-06-29 10:32:51 -07:00
2026-07-01 00:51:01 -07:00
2026-06-04 07:34:02 -07:00
2026-07-01 16:43:08 -07:00
2026-06-29 18:05:44 -07:00
2026-06-25 22:33:08 -07:00
2026-07-01 11:28:03 -07:00
2026-06-11 08:43:27 -07:00
2026-07-05 11:31:48 -07:00
2026-07-01 00:51:01 -07:00
2026-05-31 08:32:01 -07:00
2026-07-01 00:51:01 -07:00
2026-07-01 00:51:01 -07:00
2026-07-01 00:51:01 -07:00
2026-06-30 00:09:36 -07:00
2026-06-29 10:32:51 -07:00
2026-06-11 08:43:28 -07:00
2026-06-09 20:44:45 -07:00
2026-07-07 10:25:11 -07:00
2026-06-21 23:02:46 -07:00
2026-07-07 08:42:47 -07:00
2026-06-26 13:13:46 -07:00
2026-06-25 08:34:44 -07:00
2026-06-21 09:00:40 -07:00
2026-05-18 01:50:22 -07:00
2026-06-26 13:13:46 -07:00
2026-06-04 13:04:15 -07:00
2026-06-12 12:49:34 -07:00
2026-06-22 19:11:08 -07:00
2026-05-18 11:01:32 -07:00
2026-05-23 15:13:17 -07:00
2026-05-16 20:54:33 -07:00
2026-05-18 15:51:01 -07:00
2026-05-15 22:18:09 -07:00
2026-07-03 23:16:58 -07:00