@axiom-lattice/gateway 8.0.2 → 8.1.0

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 (28) hide show
  1. package/dist/embed/{embed-page-AgentDetailSideApp-23TCREK6.js → embed-page-AgentDetailSideApp-RY4FAEAM.js} +1 -1
  2. package/dist/embed/{embed-page-AgentGovernanceWorkbench-N3F65F3W.js → embed-page-AgentGovernanceWorkbench-UFDULZ5A.js} +1 -1
  3. package/dist/embed/{embed-page-LangfuseDashboard-WBE7GJPU.js → embed-page-LangfuseDashboard-GNNJGAA2.js} +1 -1
  4. package/dist/embed/{embed-page-MessageGraph-T3EFAXTX.js → embed-page-MessageGraph-S7GCLNLR.js} +1 -1
  5. package/dist/embed/{embed-page-ReactChart-FJFQU4IV.js → embed-page-ReactChart-LWZPH244.js} +1 -1
  6. package/dist/embed/{embed-page-SkillFlow-2BUXCLAL.js → embed-page-SkillFlow-OVIGJFUH.js} +1 -1
  7. package/dist/embed/{embed-page-TasksSideApp-VFKEYFGR.js → embed-page-TasksSideApp-AOS4MZAI.js} +1 -1
  8. package/dist/embed/{embed-page-ThreadMaintenancePanel-EPBJ4J3L.js → embed-page-ThreadMaintenancePanel-PXL2TJBO.js} +1 -1
  9. package/dist/embed/{embed-page-TopologyRuntimeView-OWESU7IK.js → embed-page-TopologyRuntimeView-GRM34Z2Z.js} +1 -1
  10. package/dist/embed/{embed-page-WorkflowAutomationView-5J2RQTZ7.js → embed-page-WorkflowAutomationView-JV26AHRB.js} +1 -1
  11. package/dist/embed/{embed-page-chunk-WKQHSEZ4.js → embed-page-chunk-3UK7XM33.js} +1 -1
  12. package/dist/embed/{embed-page-chunk-6QLLZJVH.js → embed-page-chunk-5XP4FJW7.js} +1 -1
  13. package/dist/embed/{embed-page-chunk-R7TLHZR3.js → embed-page-chunk-6ZHR5GWS.js} +1 -1
  14. package/dist/embed/{embed-page-chunk-2ZBEWYJQ.js → embed-page-chunk-ABGWNVMG.js} +1 -1
  15. package/dist/embed/{embed-page-chunk-JMTQCORF.js → embed-page-chunk-NNQHJZ5Q.js} +1 -1
  16. package/dist/embed/{embed-page-chunk-CQLDPGEG.js → embed-page-chunk-ONXC5S22.js} +1 -1
  17. package/dist/embed/{embed-page-chunk-BFVNPGSW.js → embed-page-chunk-OQUMCCF5.js} +1 -1
  18. package/dist/embed/{embed-page-chunk-CKUSXUKW.js → embed-page-chunk-SQSVDSG6.js} +176 -176
  19. package/dist/embed/{embed-page-chunk-L7TDL27M.js → embed-page-chunk-YCTDKWKW.js} +1 -1
  20. package/dist/embed/{embed-page-chunk-EU32IF7M.js → embed-page-chunk-YM76GTXK.js} +1 -1
  21. package/dist/embed/{embed-page-en-TSCGSJAI.js → embed-page-en-ISNUZBPO.js} +1 -1
  22. package/dist/embed/{embed-page-zh-Q22DIOB3.js → embed-page-zh-MDJTBW2K.js} +1 -1
  23. package/dist/embed/embed-page.js +1 -1
  24. package/dist/index.js +31 -9
  25. package/dist/index.js.map +1 -1
  26. package/dist/index.mjs +31 -9
  27. package/dist/index.mjs.map +1 -1
  28. package/package.json +7 -7
package/dist/index.mjs CHANGED
@@ -22296,6 +22296,9 @@ var ModelProviderService = class {
22296
22296
  resolveDiscoveryTimeoutMs()
22297
22297
  );
22298
22298
  const previous = await this.deps.providerStore.listModels(tenantId, id3);
22299
+ const previousById = new Map(
22300
+ previous.map((model) => [model.modelId, model])
22301
+ );
22299
22302
  const previousIds = new Set(previous.map((model) => model.modelId));
22300
22303
  let discovered;
22301
22304
  try {
@@ -22324,6 +22327,9 @@ var ModelProviderService = class {
22324
22327
  id3,
22325
22328
  discovered.map((model) => ({
22326
22329
  ...model,
22330
+ // A tenant may have renamed a model. Discovery must not overwrite that
22331
+ // override with the upstream name; brand-new rows take the upstream one.
22332
+ displayName: previousById.get(model.id)?.displayName ?? model.displayName,
22327
22333
  // Same rule as `setModels`: a row this provider just brought in starts
22328
22334
  // with the default config, a row already stored keeps the tenant's.
22329
22335
  extra: previousIds.has(model.id) ? void 0 : { ...DEFAULT_MODEL_EXTRA }
@@ -22505,30 +22511,36 @@ var ModelProviderService = class {
22505
22511
  async setModels(userId, tenantId, id3, selection) {
22506
22512
  await this.assertAdmin(userId, tenantId);
22507
22513
  const provider = await this.requireProvider(tenantId, id3);
22508
- if (selection.filter((entry) => entry.isDefault === true).length > 1) {
22514
+ const previous = await this.deps.providerStore.listModels(tenantId, id3);
22515
+ const previousById = new Map(
22516
+ previous.map((model) => [model.modelId, model])
22517
+ );
22518
+ const normalized = selection.map((entry) => {
22519
+ const stored = previousById.get(entry.modelId);
22520
+ const kindChanged = stored !== void 0 && entry.kind !== void 0 && entry.kind !== (stored.kind ?? "chat");
22521
+ return kindChanged ? { ...entry, isDefault: false } : entry;
22522
+ });
22523
+ if (normalized.filter((entry) => entry.isDefault === true).length > 1) {
22509
22524
  throw new ModelProviderServiceError(
22510
22525
  "INVALID_INPUT",
22511
22526
  400,
22512
22527
  "Only one model can be the tenant's default"
22513
22528
  );
22514
22529
  }
22515
- const previous = await this.deps.providerStore.listModels(tenantId, id3);
22516
- const previousById = new Map(
22517
- previous.map((model) => [model.modelId, model])
22518
- );
22519
22530
  await this.deps.providerStore.replaceProviderModels(
22520
22531
  tenantId,
22521
22532
  id3,
22522
- selection.map((entry) => ({
22533
+ normalized.map((entry) => ({
22523
22534
  id: entry.modelId,
22524
22535
  enabled: entry.enabled,
22525
22536
  // A model the upstream stopped offering stays in the set, flagged
22526
22537
  // rather than dropped: deleting it would silently break anything
22527
22538
  // referencing its key.
22528
22539
  stale: entry.stale ?? false,
22529
- // The selection carries only ids and states, so a model already in the
22530
- // snapshot keeps the metadata discovery gave it.
22531
- displayName: previousById.get(entry.modelId)?.displayName,
22540
+ // The selection carries only edited rows' names, so a model already in
22541
+ // the snapshot keeps its name when the field is omitted. An empty
22542
+ // string clears the tenant override.
22543
+ displayName: entry.displayName !== void 0 ? entry.displayName.trim() || void 0 : previousById.get(entry.modelId)?.displayName,
22532
22544
  ownedBy: previousById.get(entry.modelId)?.ownedBy,
22533
22545
  // An omitted `extra` means "keep what is stored" — the picker sends no
22534
22546
  // config, and a sync must not wipe one set by hand. The store resolves
@@ -22604,6 +22616,10 @@ var ModelProviderService = class {
22604
22616
  providerId2,
22605
22617
  providerModels.map((model) => ({
22606
22618
  id: model.modelId,
22619
+ // This is a whole-set write: any field left out is cleared, so the
22620
+ // metadata that only discovery knows must travel with it.
22621
+ displayName: model.displayName,
22622
+ ownedBy: model.ownedBy,
22607
22623
  enabled: model.enabled,
22608
22624
  stale: model.stale,
22609
22625
  extra: model.extra,
@@ -22636,6 +22652,9 @@ var ModelProviderService = class {
22636
22652
  provider.id,
22637
22653
  rows.map((row) => ({
22638
22654
  id: row.modelId,
22655
+ // Whole-set write: keep the metadata this method is not changing.
22656
+ displayName: row.displayName,
22657
+ ownedBy: row.ownedBy,
22639
22658
  enabled: row.enabled,
22640
22659
  stale: row.stale,
22641
22660
  kind: row.kind,
@@ -22894,6 +22913,9 @@ var setModelsSchema = z9.object({
22894
22913
  models: z9.array(
22895
22914
  z9.object({
22896
22915
  modelId: z9.string().trim().min(1).max(512),
22916
+ // Omitted means "leave the stored name alone"; an empty string
22917
+ // clears a tenant override. Same rule as `extra`.
22918
+ displayName: z9.string().trim().max(255).optional(),
22897
22919
  enabled: z9.boolean(),
22898
22920
  stale: z9.boolean().optional(),
22899
22921
  // Omitted means "leave the stored config alone" — the picker sends