openfox 2.0.0-beta.1 → 2.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/agent-defaults/code-reviewer.agent.md +2 -1
  2. package/dist/{chat-handler-IVIWOR3D.js → chat-handler-6COBLIDR.js} +14 -27
  3. package/dist/{chunk-CEZNMLOO.js → chunk-7TTEGAO6.js} +12 -13
  4. package/dist/{chunk-4U4CSRBE.js → chunk-BE2S4NJX.js} +6 -6
  5. package/dist/{chunk-FQLK5GL5.js → chunk-BVHFMAVN.js} +1 -1
  6. package/dist/{chunk-UFY4I643.js → chunk-C75I2KZM.js} +135 -147
  7. package/dist/{chunk-QFSSKIQ3.js → chunk-CDDMHSZF.js} +4 -4
  8. package/dist/{chunk-RF2JGDSS.js → chunk-DMH6JVPF.js} +13 -10
  9. package/dist/{chunk-NNEHZT3V.js → chunk-EZUR7OEP.js} +11 -3
  10. package/dist/{chunk-ZLUBZ4K4.js → chunk-G4SACK4E.js} +221 -104
  11. package/dist/{chunk-ALH4KM2Y.js → chunk-LR5R7EEE.js} +2962 -3249
  12. package/dist/{chunk-XKR3HCAL.js → chunk-NPHYEUYE.js} +128 -34
  13. package/dist/{chunk-PSJIT5LZ.js → chunk-RFNEDBVO.js} +4 -4
  14. package/dist/chunk-RI6GAMNP.js +13 -0
  15. package/dist/{chunk-HHAJ3QF6.js → chunk-UKTPL5ZG.js} +16 -28
  16. package/dist/{chunk-HGAMIPFO.js → chunk-VIIRNJDT.js} +39 -178
  17. package/dist/{chunk-NONI4CRP.js → chunk-XJEOP6XU.js} +5 -32
  18. package/dist/cli/dev.js +1 -1
  19. package/dist/cli/index.js +1 -1
  20. package/dist/compactor-TDNRM3A7.js +9 -0
  21. package/dist/{config-YU7NYZYG.js → config-TDVA7MQN.js} +9 -8
  22. package/dist/{events-OHJWCI3S.js → events-PQ3KTI5H.js} +8 -7
  23. package/dist/{folding-U6UHQAS5.js → folding-CXORTBAU.js} +2 -2
  24. package/dist/{orchestrator-7ZXM4J22.js → orchestrator-ZNGTMZ7W.js} +18 -22
  25. package/dist/package.json +1 -1
  26. package/dist/{processor-TKBJLQ2N.js → processor-WMAU4C2N.js} +8 -9
  27. package/dist/{protocol-BQ12Aw5J.d.ts → protocol-CDOV1pyc.d.ts} +13 -38
  28. package/dist/{protocol-K62EPEGS.js → protocol-CN24IKQN.js} +3 -5
  29. package/dist/{provider-HTJEB3ON.js → provider-BGH4MBLH.js} +25 -10
  30. package/dist/{serve-5KA6SSSP.js → serve-7VMTNIXT.js} +25 -26
  31. package/dist/server/index.d.ts +1 -6
  32. package/dist/server/index.js +15 -16
  33. package/dist/{settings-VRAOAPLA.js → settings-6XX56F3F.js} +2 -2
  34. package/dist/shared/index.d.ts +2 -2
  35. package/dist/shared/index.js +1 -1
  36. package/dist/{tools-Z7X4HXZN.js → tools-CQGEU3JK.js} +11 -13
  37. package/dist/web/assets/index-BF6jgTAb.js +299 -0
  38. package/dist/web/assets/{index-BY8EbT5Z.css → index-CSOB8dwI.css} +1 -1
  39. package/dist/web/index.html +2 -2
  40. package/dist/web/sw.js +1 -1
  41. package/dist/workflow-defaults/default.workflow.json +9 -4
  42. package/package.json +1 -1
  43. package/dist/auto-compaction-UIWTO3H5.js +0 -27
  44. package/dist/chunk-CGZHLM3K.js +0 -70
  45. package/dist/chunk-SZKEGZIB.js +0 -140
  46. package/dist/runtime-config-NPSPMRDA.js +0 -9
  47. package/dist/vision-fallback-3MIZZ6NQ.js +0 -22
  48. package/dist/web/assets/index-CqOJgw7l.js +0 -299
@@ -2,11 +2,14 @@ import {
2
2
  clearModelCache,
3
3
  createLLMClient,
4
4
  detectModel
5
- } from "./chunk-HHAJ3QF6.js";
5
+ } from "./chunk-UKTPL5ZG.js";
6
6
  import {
7
+ buildModelsUrl,
7
8
  detectBackend,
8
- getModelProfile
9
- } from "./chunk-HGAMIPFO.js";
9
+ ensureVersionPrefix,
10
+ getModelProfile,
11
+ stripVersionPrefix
12
+ } from "./chunk-VIIRNJDT.js";
10
13
  import {
11
14
  logger
12
15
  } from "./chunk-K44MW7JJ.js";
@@ -67,7 +70,7 @@ function mergeModelsWithUserOverrides(backendModels, userModels) {
67
70
  return updatedModels;
68
71
  }
69
72
  async function fetchAvailableModelsFromBackend(baseUrl, apiKey) {
70
- const url = baseUrl.includes("/v1") ? `${baseUrl}/models` : `${baseUrl}/v1/models`;
73
+ const url = buildModelsUrl(baseUrl);
71
74
  const models = await fetchModelsFromBackend(url, apiKey);
72
75
  return models.map((m) => m.id);
73
76
  }
@@ -78,7 +81,7 @@ async function fetchModelsWithContext(baseUrl, apiKey, backend) {
78
81
  return fetchOllamaModelsWithContext(baseUrl, apiKey);
79
82
  }
80
83
  const isOpenCodeGo = baseUrl.includes("opencode.ai/zen/go");
81
- const url = isOpenCodeGo ? baseUrl.replace("/zen/go", "/zen").replace(/\/v1$/, "") + "/v1/models" : baseUrl.includes("/v1") ? `${baseUrl}/models` : `${baseUrl}/v1/models`;
84
+ const url = isOpenCodeGo ? buildModelsUrl(baseUrl.replace("/zen/go", "/zen")) : buildModelsUrl(baseUrl);
82
85
  logger.info("Fetching models via /v1/models", { url });
83
86
  const models = await fetchModelsFromBackend(url, apiKey);
84
87
  if (models.length === 0) return [];
@@ -177,7 +180,7 @@ function createProviderManager(config) {
177
180
  ...config,
178
181
  llm: {
179
182
  ...config.llm,
180
- baseUrl: provider.url.includes("/v1") ? provider.url : `${provider.url}/v1`,
183
+ baseUrl: ensureVersionPrefix(provider.url),
181
184
  model,
182
185
  backend: provider.backend,
183
186
  ...provider.apiKey && { apiKey: provider.apiKey }
@@ -235,7 +238,7 @@ function createProviderManager(config) {
235
238
  const providerConfig = createConfigForProvider(provider, targetModel);
236
239
  const newClient = createLLMClient(providerConfig);
237
240
  try {
238
- const url = provider.url.includes("/v1") ? provider.url.replace("/v1", "") : provider.url;
241
+ const url = stripVersionPrefix(provider.url);
239
242
  clearModelCache(url);
240
243
  const backend = provider.backend;
241
244
  logger.info("activateProvider fetching models", { providerId, providerName: provider.name, url, backend });
@@ -355,7 +358,7 @@ function createProviderManager(config) {
355
358
  if (provider.models && provider.models.length > 0) {
356
359
  return provider.models;
357
360
  }
358
- const url = provider.url.includes("/v1") ? provider.url.replace("/v1", "") : provider.url;
361
+ const url = stripVersionPrefix(provider.url);
359
362
  const backend = provider.backend;
360
363
  return fetchModelsWithContext(url, provider.apiKey, backend);
361
364
  },
@@ -466,7 +469,7 @@ function createProviderManager(config) {
466
469
  if (!provider) {
467
470
  return { success: false, error: "Provider not found" };
468
471
  }
469
- const url = provider.url.includes("/v1") ? provider.url.replace("/v1", "") : provider.url;
472
+ const url = stripVersionPrefix(provider.url);
470
473
  const backend = provider.backend;
471
474
  logger.info("refreshProviderModels fetching models", { providerId, providerName: provider.name, url, backend });
472
475
  const modelsWithContext = await fetchModelsWithContext(url, provider.apiKey, backend);
@@ -511,4 +514,4 @@ export {
511
514
  parseDefaultModelSelection,
512
515
  createProviderManager
513
516
  };
514
- //# sourceMappingURL=chunk-RF2JGDSS.js.map
517
+ //# sourceMappingURL=chunk-DMH6JVPF.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  detectModel
3
- } from "./chunk-HHAJ3QF6.js";
3
+ } from "./chunk-UKTPL5ZG.js";
4
4
  import {
5
5
  detectBackend
6
- } from "./chunk-HGAMIPFO.js";
6
+ } from "./chunk-VIIRNJDT.js";
7
7
  import {
8
8
  getGlobalConfigPath
9
9
  } from "./chunk-CQGTEGKL.js";
@@ -71,6 +71,7 @@ var providerSchema = z.object({
71
71
  models: z.array(modelConfigSchema).default([]),
72
72
  isActive: z.boolean(),
73
73
  createdAt: z.string(),
74
+ isLocal: z.boolean().optional(),
74
75
  // Deprecated: model field kept for migration, will be removed after migration
75
76
  model: z.string().optional(),
76
77
  // Deprecated: maxContext kept for migration
@@ -323,6 +324,12 @@ function addProvider(config, provider) {
323
324
  }
324
325
  };
325
326
  }
327
+ function updateProvider(config, providerId, updates) {
328
+ return {
329
+ ...config,
330
+ providers: config.providers.map((p) => p.id === providerId ? { ...p, ...updates } : p)
331
+ };
332
+ }
326
333
  function removeProvider(config, providerId) {
327
334
  const currentProviders = config.providers ?? [];
328
335
  const filtered = currentProviders.filter((p) => p.id !== providerId);
@@ -431,8 +438,9 @@ export {
431
438
  getDefaultModel,
432
439
  setDefaultModelSelection,
433
440
  addProvider,
441
+ updateProvider,
434
442
  removeProvider,
435
443
  activateProvider,
436
444
  mergeConfigs
437
445
  };
438
- //# sourceMappingURL=chunk-NNEHZT3V.js.map
446
+ //# sourceMappingURL=chunk-EZUR7OEP.js.map