@memberjunction/react-runtime 5.34.1 → 5.36.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.
@@ -25936,9 +25936,10 @@ var EntityFieldInfo = /*#__PURE__*/function (_BaseInfo7) {
25936
25936
  *
25937
25937
  * • **CodeGen**, when emitting the SP body (which `@params` to declare
25938
25938
  * and which columns to `INSERT`/`UPDATE`), and
25939
- * • **Runtime data providers** (`SQLServerDataProvider.generateSPParams`,
25940
- * `PostgreSQLDataProvider.getWritableFields`), when building the
25941
- * EXEC / parameter list passed to the SP.
25939
+ * • **Runtime data providers**, via the `RenderSaveCallBinding` hook
25940
+ * implemented by `SQLServerDataProvider` and `PostgreSQLDataProvider`
25941
+ * (orchestrated by `GenericDatabaseProvider.GenerateSaveSQL`), when
25942
+ * building the EXEC / parameter list passed to the SP.
25942
25943
  *
25943
25944
  * Keeping both sides on the same predicate guarantees the SP signature
25944
25945
  * and the call-site argument list always agree. Drift between them
@@ -36696,6 +36697,14 @@ var LocalCacheManager = /*#__PURE__*/function (_BaseSingleton) {
36696
36697
  // Aggregate hash (or '_' for no aggregates)
36697
36698
  userSearch || '_' // User search string (generates LIKE/FTS clauses)
36698
36699
  ];
36700
+ // Keyset (AfterKey) seek cursor MUST be part of the fingerprint. Each keyset page
36701
+ // sends a different AfterKey but otherwise-identical params; without this, sequential
36702
+ // pages collide on the same fingerprint and the dedup/linger layer hands page N+1 the
36703
+ // result of page N — freezing the cursor and looping forever. Appended only when present
36704
+ // so non-keyset fingerprints stay byte-for-byte identical (no cache invalidation).
36705
+ if (params.AfterKey) {
36706
+ parts.push("ak:".concat(params.AfterKey.ToString()));
36707
+ }
36699
36708
  // Only include connection if provided
36700
36709
  if (connection) {
36701
36710
  parts.push(connection);
@@ -45991,41 +46000,56 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
45991
46000
  return Load;
45992
46001
  }()
45993
46002
  /**********************************************************************
45994
- * This section is for handling caching of multiple instances when needed
45995
- * We use the primary singleton as the instance to store a cache of instances
45996
- * that are tied to specific providers. This is useful when we have multiple
45997
- * providers in a given app going to different connections.
46003
+ * This section is for handling caching of multiple instances when needed.
46004
+ * We cache engine instances keyed by the **connection** they target not by
46005
+ * the provider object reference. Multiple per-request providers pointing at
46006
+ * the same database share one cached engine instance.
46007
+ *
46008
+ * Keying by IMetadataProvider.InstanceConnectionString (a stable
46009
+ * credential-free identifier like `mssql://host:port/db`) means:
46010
+ * - Multi-server clients still get separate engine instances per server
46011
+ * (different connection strings → different cache entries)
46012
+ * - Per-request providers on the server hit the cache (same connection
46013
+ * string as the persistent startup provider) instead of allocating a
46014
+ * fresh engine and running a full DB load every request
46015
+ * - Transient provider objects never get pinned by the cache, so they're
46016
+ * GC-eligible at end of request as designed
45998
46017
  *********************************************************************/
45999
- // private static _providerInstances: Map<{provider: IMetadataProvider, subclassConstructor: any}, any> = new Map();
46000
- // private static get ProviderInstances(): Map<{provider: IMetadataProvider, subclassConstructor: any}, any> {
46001
- // return BaseEngine._providerInstances;
46002
- // }
46003
46018
  )
46004
46019
  }, {
46005
46020
  key: "SetProvider",
46006
46021
  value:
46007
46022
  /**
46008
- * Internal method to set the provider when an engine is loaded
46009
- * @param provider
46023
+ * Internal method to set the provider when an engine is loaded. Once this engine instance has
46024
+ * a provider bound, subsequent calls are no-ops — preventing transient per-request providers
46025
+ * from displacing the persistent provider that first bound to this connection. The cache key
46026
+ * is the connection (not the object), so the first persistent provider to load an engine for
46027
+ * a connection "owns" the engine for that connection's lifetime.
46010
46028
  */
46011
46029
  function SetProvider(provider) {
46012
- this._provider = provider;
46013
- // BaseEngine.ProviderInstances.set({provider: this.ProviderToUse, subclassConstructor: this.constructor} /*use default provider if one wasn't provided to use*/, <T><any>this);
46014
- this.CheckAddToProviderInstances(this.ProviderToUse);
46030
+ // First-wins on the persistent _provider binding so transient per-request providers
46031
+ // can't displace the persistent provider that first owned this engine.
46032
+ if (!this._provider && provider) {
46033
+ this._provider = provider;
46034
+ }
46035
+ // Always register under the incoming provider's connection key (or ProviderToUse if
46036
+ // none was passed) so future GetProviderInstance lookups for that connection can find
46037
+ // this engine. Multiple registrations for the same key are idempotent.
46038
+ this.CheckAddToProviderInstances(provider || this.ProviderToUse);
46015
46039
  }
46016
46040
  }, {
46017
46041
  key: "CheckAddToProviderInstances",
46018
46042
  value: function CheckAddToProviderInstances(provider) {
46019
- var _this4 = this;
46020
- var existingEntry = BaseEngine.ProviderInstances.find(function (entry) {
46021
- return entry.provider === provider && entry.subclassConstructor === _this4.constructor;
46022
- });
46023
- if (!existingEntry) {
46024
- BaseEngine.ProviderInstances.push({
46025
- provider: provider,
46026
- subclassConstructor: this.constructor,
46027
- instance: this
46028
- });
46043
+ if (!provider) return; // no provider available (e.g. global default not yet initialized)
46044
+ var connectionKey = provider.InstanceConnectionString;
46045
+ if (!connectionKey) return; // provider not fully configured yet skip registration
46046
+ var perConnectionMap = BaseEngine._providerInstances.get(connectionKey);
46047
+ if (!perConnectionMap) {
46048
+ perConnectionMap = new Map();
46049
+ BaseEngine._providerInstances.set(connectionKey, perConnectionMap);
46050
+ }
46051
+ if (!perConnectionMap.has(this.constructor)) {
46052
+ perConnectionMap.set(this.constructor, this);
46029
46053
  }
46030
46054
  }
46031
46055
  /**
@@ -46037,7 +46061,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46037
46061
  key: "SetupGlobalEventListener",
46038
46062
  value: (function () {
46039
46063
  var _SetupGlobalEventListener = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee6() {
46040
- var _this5 = this;
46064
+ var _this4 = this;
46041
46065
  var _t2;
46042
46066
  return baseEngine_regenerator().w(function (_context6) {
46043
46067
  while (1) switch (_context6.p = _context6.n) {
@@ -46051,7 +46075,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46051
46075
  while (1) switch (_context5.n) {
46052
46076
  case 0:
46053
46077
  _context5.n = 1;
46054
- return _this5.HandleIndividualEvent(event);
46078
+ return _this4.HandleIndividualEvent(event);
46055
46079
  case 1:
46056
46080
  return _context5.a(2);
46057
46081
  }
@@ -46129,8 +46153,8 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46129
46153
  key: "HandleIndividualBaseEntityEvent",
46130
46154
  value: (function () {
46131
46155
  var _HandleIndividualBaseEntityEvent = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee8(event) {
46132
- var _this6 = this;
46133
- var eName, matchingConfigs, allCanUseImmediate, _iterator, _step, config, _t3;
46156
+ var _this5 = this;
46157
+ var eName, matchingConfigs, allCanUseImmediate, _iterator, _step, config, _t3, _t4;
46134
46158
  return baseEngine_regenerator().w(function (_context8) {
46135
46159
  while (1) switch (_context8.p = _context8.n) {
46136
46160
  case 0:
@@ -46145,7 +46169,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46145
46169
  return _context8.a(2, _context8.v);
46146
46170
  case 2:
46147
46171
  if (!(event.type === 'delete' || event.type === 'save')) {
46148
- _context8.n = 5;
46172
+ _context8.n = 12;
46149
46173
  break;
46150
46174
  }
46151
46175
  eName = event.baseEntity.EntityInfo.Name.toLowerCase().trim();
@@ -46160,36 +46184,52 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46160
46184
  case 3:
46161
46185
  // Check if ALL matching configs can use immediate mutation
46162
46186
  allCanUseImmediate = matchingConfigs.every(function (config) {
46163
- return _this6.canUseImmediateMutation(config);
46187
+ return _this5.canUseImmediateMutation(config);
46164
46188
  });
46165
46189
  if (!allCanUseImmediate) {
46166
- _context8.n = 4;
46190
+ _context8.n = 11;
46167
46191
  break;
46168
46192
  }
46169
- // Process immediately without debounce - synchronous array mutations
46193
+ // Process immediately without debounce - mutation requires await because the
46194
+ // entity must be cloned (with its provider rebound) before being cached
46170
46195
  _iterator = baseEngine_createForOfIteratorHelper(matchingConfigs);
46171
- try {
46172
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
46173
- config = _step.value;
46174
- this.applyImmediateMutation(config, event);
46175
- }
46176
- } catch (err) {
46177
- _iterator.e(err);
46178
- } finally {
46179
- _iterator.f();
46196
+ _context8.p = 4;
46197
+ _iterator.s();
46198
+ case 5:
46199
+ if ((_step = _iterator.n()).done) {
46200
+ _context8.n = 7;
46201
+ break;
46180
46202
  }
46203
+ config = _step.value;
46204
+ _context8.n = 6;
46205
+ return this.applyImmediateMutation(config, event);
46206
+ case 6:
46207
+ _context8.n = 5;
46208
+ break;
46209
+ case 7:
46210
+ _context8.n = 9;
46211
+ break;
46212
+ case 8:
46213
+ _context8.p = 8;
46214
+ _t3 = _context8.v;
46215
+ _iterator.e(_t3);
46216
+ case 9:
46217
+ _context8.p = 9;
46218
+ _iterator.f();
46219
+ return _context8.f(9);
46220
+ case 10:
46181
46221
  return _context8.a(2, true);
46182
- case 4:
46222
+ case 11:
46183
46223
  return _context8.a(2, this.DebounceIndividualBaseEntityEvent(event));
46184
- case 5:
46224
+ case 12:
46185
46225
  return _context8.a(2, true);
46186
- case 6:
46187
- _context8.p = 6;
46188
- _t3 = _context8.v;
46189
- LogError(_t3);
46226
+ case 13:
46227
+ _context8.p = 13;
46228
+ _t4 = _context8.v;
46229
+ LogError(_t4);
46190
46230
  return _context8.a(2, false);
46191
46231
  }
46192
- }, _callee8, this, [[0, 6]]);
46232
+ }, _callee8, this, [[4, 8, 9, 10], [0, 13]]);
46193
46233
  }));
46194
46234
  function HandleIndividualBaseEntityEvent(_x9) {
46195
46235
  return _HandleIndividualBaseEntityEvent.apply(this, arguments);
@@ -46210,7 +46250,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46210
46250
  key: "HandleRemoteInvalidateEvent",
46211
46251
  value: (function () {
46212
46252
  var _HandleRemoteInvalidateEvent = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee9(event) {
46213
- var _event$entityName, entityName, matchingConfigs, payload, action, applied, removed, refreshCount, _iterator2, _step2, config, _t4, _t5;
46253
+ var _event$entityName, entityName, matchingConfigs, payload, action, applied, removed, refreshCount, _iterator2, _step2, config, _t5, _t6;
46214
46254
  return baseEngine_regenerator().w(function (_context9) {
46215
46255
  while (1) switch (_context9.p = _context9.n) {
46216
46256
  case 0:
@@ -46284,8 +46324,8 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46284
46324
  break;
46285
46325
  case 12:
46286
46326
  _context9.p = 12;
46287
- _t4 = _context9.v;
46288
- _iterator2.e(_t4);
46327
+ _t5 = _context9.v;
46328
+ _iterator2.e(_t5);
46289
46329
  case 13:
46290
46330
  _context9.p = 13;
46291
46331
  _iterator2.f();
@@ -46301,8 +46341,8 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46301
46341
  return _context9.a(2, true);
46302
46342
  case 16:
46303
46343
  _context9.p = 16;
46304
- _t5 = _context9.v;
46305
- LogError(_t5);
46344
+ _t6 = _context9.v;
46345
+ LogError(_t6);
46306
46346
  return _context9.a(2, false);
46307
46347
  }
46308
46348
  }, _callee9, this, [[7, 12, 13, 14], [0, 16]]);
@@ -46324,7 +46364,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46324
46364
  key: "applyRemoteRecordData",
46325
46365
  value: (function () {
46326
46366
  var _applyRemoteRecordData = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee0(matchingConfigs, entityName, recordDataJSON) {
46327
- var recordData, md, originalEntityName, entity, _iterator3, _step3, config, currentData, index, _t6, _t7;
46367
+ var recordData, md, originalEntityName, entity, _iterator3, _step3, config, currentData, index, _t7, _t8;
46328
46368
  return baseEngine_regenerator().w(function (_context0) {
46329
46369
  while (1) switch (_context0.p = _context0.n) {
46330
46370
  case 0:
@@ -46389,8 +46429,8 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46389
46429
  break;
46390
46430
  case 8:
46391
46431
  _context0.p = 8;
46392
- _t6 = _context0.v;
46393
- _iterator3.e(_t6);
46432
+ _t7 = _context0.v;
46433
+ _iterator3.e(_t7);
46394
46434
  case 9:
46395
46435
  _context0.p = 9;
46396
46436
  _iterator3.f();
@@ -46402,8 +46442,8 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46402
46442
  return _context0.a(2, true);
46403
46443
  case 12:
46404
46444
  _context0.p = 12;
46405
- _t7 = _context0.v;
46406
- LogError(_t7);
46445
+ _t8 = _context0.v;
46446
+ LogError(_t8);
46407
46447
  return _context0.a(2, false);
46408
46448
  }
46409
46449
  }, _callee0, this, [[2, 8, 9, 10], [0, 12]]);
@@ -46476,8 +46516,8 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46476
46516
  key: "DebounceIndividualBaseEntityEvent",
46477
46517
  value: (function () {
46478
46518
  var _DebounceIndividualBaseEntityEvent = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee10(event) {
46479
- var _this7 = this;
46480
- var entityName, _matchingConfig$Debou, matchingConfig, debounceTimeValue, subject, _t8;
46519
+ var _this6 = this;
46520
+ var entityName, _matchingConfig$Debou, matchingConfig, debounceTimeValue, subject, _t9;
46481
46521
  return baseEngine_regenerator().w(function (_context10) {
46482
46522
  while (1) switch (_context10.p = _context10.n) {
46483
46523
  case 0:
@@ -46497,7 +46537,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46497
46537
  while (1) switch (_context1.n) {
46498
46538
  case 0:
46499
46539
  _context1.n = 1;
46500
- return _this7.ProcessEntityEvent(e);
46540
+ return _this6.ProcessEntityEvent(e);
46501
46541
  case 1:
46502
46542
  return _context1.a(2);
46503
46543
  }
@@ -46513,8 +46553,8 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46513
46553
  return _context10.a(2, true);
46514
46554
  case 1:
46515
46555
  _context10.p = 1;
46516
- _t8 = _context10.v;
46517
- LogError(_t8);
46556
+ _t9 = _context10.v;
46557
+ LogError(_t9);
46518
46558
  return _context10.a(2, false);
46519
46559
  }
46520
46560
  }, _callee10, this, [[0, 1]]);
@@ -46549,7 +46589,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46549
46589
  key: "ProcessEntityEvent",
46550
46590
  value: (function () {
46551
46591
  var _ProcessEntityEvent = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee11(event) {
46552
- var entityName, refreshCount, _iterator5, _step5, _config$EntityName, config, _t9, _t0;
46592
+ var entityName, refreshCount, _iterator5, _step5, _config$EntityName, config, _t0, _t1;
46553
46593
  return baseEngine_regenerator().w(function (_context11) {
46554
46594
  while (1) switch (_context11.p = _context11.n) {
46555
46595
  case 0:
@@ -46561,12 +46601,12 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46561
46601
  _iterator5.s();
46562
46602
  case 2:
46563
46603
  if ((_step5 = _iterator5.n()).done) {
46564
- _context11.n = 9;
46604
+ _context11.n = 10;
46565
46605
  break;
46566
46606
  }
46567
46607
  config = _step5.value;
46568
46608
  if (!(config.AutoRefresh && config.Type === 'entity' && ((_config$EntityName = config.EntityName) === null || _config$EntityName === void 0 ? void 0 : _config$EntityName.trim().toLowerCase()) === entityName)) {
46569
- _context11.n = 8;
46609
+ _context11.n = 9;
46570
46610
  break;
46571
46611
  }
46572
46612
  if (!(event.type === 'save' && event.saveSubType === 'update')) {
@@ -46577,7 +46617,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46577
46617
  _context11.n = 3;
46578
46618
  break;
46579
46619
  }
46580
- return _context11.a(3, 8);
46620
+ return _context11.a(3, 9);
46581
46621
  case 3:
46582
46622
  if (!(event.type === 'save' && event.saveSubType === 'create')) {
46583
46623
  _context11.n = 4;
@@ -46587,7 +46627,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46587
46627
  _context11.n = 4;
46588
46628
  break;
46589
46629
  }
46590
- return _context11.a(3, 8);
46630
+ return _context11.a(3, 9);
46591
46631
  case 4:
46592
46632
  if (!(event.type === 'delete')) {
46593
46633
  _context11.n = 5;
@@ -46597,53 +46637,54 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46597
46637
  _context11.n = 5;
46598
46638
  break;
46599
46639
  }
46600
- return _context11.a(3, 8);
46640
+ return _context11.a(3, 9);
46601
46641
  case 5:
46602
46642
  if (!this.canUseImmediateMutation(config)) {
46603
- _context11.n = 6;
46643
+ _context11.n = 7;
46604
46644
  break;
46605
46645
  }
46606
- // LogStatus(`>>> Immediate mutation for ${config.PropertyName} due to BaseEntity ${event.type} event for: ${event.baseEntity.EntityInfo.Name}`);
46607
- this.applyImmediateMutation(config, event);
46608
- _context11.n = 8;
46609
- break;
46646
+ _context11.n = 6;
46647
+ return this.applyImmediateMutation(config, event);
46610
46648
  case 6:
46611
- _context11.n = 7;
46612
- return this.LoadSingleConfig(config, this._contextUser);
46649
+ _context11.n = 9;
46650
+ break;
46613
46651
  case 7:
46614
- refreshCount++;
46652
+ _context11.n = 8;
46653
+ return this.LoadSingleConfig(config, this._contextUser);
46615
46654
  case 8:
46616
- _context11.n = 2;
46617
- break;
46655
+ refreshCount++;
46618
46656
  case 9:
46619
- _context11.n = 11;
46657
+ _context11.n = 2;
46620
46658
  break;
46621
46659
  case 10:
46622
- _context11.p = 10;
46623
- _t9 = _context11.v;
46624
- _iterator5.e(_t9);
46660
+ _context11.n = 12;
46661
+ break;
46625
46662
  case 11:
46626
46663
  _context11.p = 11;
46627
- _iterator5.f();
46628
- return _context11.f(11);
46664
+ _t0 = _context11.v;
46665
+ _iterator5.e(_t0);
46629
46666
  case 12:
46667
+ _context11.p = 12;
46668
+ _iterator5.f();
46669
+ return _context11.f(12);
46670
+ case 13:
46630
46671
  if (!(refreshCount > 0)) {
46631
- _context11.n = 13;
46672
+ _context11.n = 14;
46632
46673
  break;
46633
46674
  }
46634
- _context11.n = 13;
46675
+ _context11.n = 14;
46635
46676
  return this.AdditionalLoading(this._contextUser);
46636
- case 13:
46637
- _context11.n = 15;
46638
- break;
46639
46677
  case 14:
46640
- _context11.p = 14;
46641
- _t0 = _context11.v;
46642
- LogError(_t0);
46678
+ _context11.n = 16;
46679
+ break;
46643
46680
  case 15:
46681
+ _context11.p = 15;
46682
+ _t1 = _context11.v;
46683
+ LogError(_t1);
46684
+ case 16:
46644
46685
  return _context11.a(2);
46645
46686
  }
46646
- }, _callee11, this, [[1, 10, 11, 12], [0, 14]]);
46687
+ }, _callee11, this, [[1, 11, 12, 13], [0, 15]]);
46647
46688
  }));
46648
46689
  function ProcessEntityEvent(_x14) {
46649
46690
  return _ProcessEntityEvent.apply(this, arguments);
@@ -46761,104 +46802,189 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46761
46802
  * Applies an immediate array mutation based on the entity event type.
46762
46803
  * This is faster than running a full view refresh for simple add/update/delete operations.
46763
46804
  *
46805
+ * On save, the cached entry is a clone owned by this engine's provider — not the saver's
46806
+ * entity instance. Storing the saver's instance would pin the saver's provider (often a
46807
+ * per-request provider) inside the engine's cache for the engine's full lifetime, which
46808
+ * leaks the provider and all its associated state.
46809
+ *
46764
46810
  * @param config - The configuration for the property being mutated
46765
46811
  * @param event - The entity event containing the affected entity and event type
46766
46812
  */
46767
46813
  }, {
46768
46814
  key: "applyImmediateMutation",
46769
- value: function applyImmediateMutation(config, event) {
46770
- var currentData = this[config.PropertyName];
46771
- if (!currentData) {
46772
- // No existing array, nothing to mutate
46773
- return;
46774
- }
46775
- var entity = event.baseEntity;
46776
- if (event.type === 'save') {
46777
- if (event.saveSubType === 'create') {
46778
- // For create, first check if the exact object is already in the array
46779
- var existsByRef = currentData.indexOf(entity) >= 0;
46780
- // if already in the array, nothing to do, but we keep going
46781
- // in the method as there is stuff below the outer if block
46782
- if (!existsByRef) {
46783
- // Check by composite primary key in case it was added with a different object reference
46784
- var indexByKey = this.findEntityIndexByPrimaryKeys(currentData, entity);
46785
- if (indexByKey >= 0) {
46786
- // Already exists by key, treat as update
46787
- currentData[indexByKey] = entity;
46788
- this._dataMap.set(config.PropertyName, {
46789
- entityName: config.EntityName,
46790
- data: currentData,
46791
- loadedSuccessfully: true
46792
- });
46793
- this.NotifyDataChange(config, currentData, 'update', entity);
46794
- } else {
46795
- // Add the new entity to the array
46796
- currentData.push(entity);
46797
- this._dataMap.set(config.PropertyName, {
46798
- entityName: config.EntityName,
46799
- data: currentData,
46800
- loadedSuccessfully: true
46801
- });
46802
- this.NotifyDataChange(config, currentData, 'add', entity);
46803
- }
46804
- }
46805
- } else {
46806
- // Update: first check if the exact object is already in the array
46807
- // if already in the array, we don't do anything but we keep going
46808
- // in the method so stuff at end can be done
46809
- var _existsByRef = currentData.indexOf(entity) >= 0;
46810
- if (!_existsByRef) {
46811
- // Find by composite primary key and replace
46812
- var index = this.findEntityIndexByPrimaryKeys(currentData, entity);
46813
- if (index >= 0) {
46814
- currentData[index] = entity;
46815
- this._dataMap.set(config.PropertyName, {
46816
- entityName: config.EntityName,
46817
- data: currentData,
46818
- loadedSuccessfully: true
46819
- });
46820
- this.NotifyDataChange(config, currentData, 'update', entity);
46821
- } else {
46822
- // Entity not found in array - this shouldn't happen normally,
46823
- // but if it does, add it (might have been created before we started listening)
46824
- currentData.push(entity);
46825
- this._dataMap.set(config.PropertyName, {
46826
- entityName: config.EntityName,
46827
- data: currentData,
46828
- loadedSuccessfully: true
46829
- });
46830
- this.NotifyDataChange(config, currentData, 'add', entity);
46831
- }
46815
+ value: (function () {
46816
+ var _applyImmediateMutation = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee12(config, event) {
46817
+ var currentData, entity, cached, existsByRef, indexByKey, _existsByRef, index, _index;
46818
+ return baseEngine_regenerator().w(function (_context12) {
46819
+ while (1) switch (_context12.n) {
46820
+ case 0:
46821
+ currentData = this[config.PropertyName];
46822
+ if (currentData) {
46823
+ _context12.n = 1;
46824
+ break;
46825
+ }
46826
+ return _context12.a(2);
46827
+ case 1:
46828
+ entity = event.baseEntity;
46829
+ if (!(event.type === 'save')) {
46830
+ _context12.n = 4;
46831
+ break;
46832
+ }
46833
+ _context12.n = 2;
46834
+ return this.cloneEntityForCache(entity, config);
46835
+ case 2:
46836
+ cached = _context12.v;
46837
+ if (cached) {
46838
+ _context12.n = 3;
46839
+ break;
46840
+ }
46841
+ LogError("BaseEngine.applyImmediateMutation: failed to clone entity for ".concat(config.EntityName, "; skipping immediate mutation"));
46842
+ return _context12.a(2);
46843
+ case 3:
46844
+ if (event.saveSubType === 'create') {
46845
+ // For create, first check if the exact object is already in the array
46846
+ existsByRef = currentData.indexOf(entity) >= 0; // if already in the array, nothing to do, but we keep going
46847
+ // in the method as there is stuff below the outer if block
46848
+ if (!existsByRef) {
46849
+ // Check by composite primary key in case it was added with a different object reference
46850
+ indexByKey = this.findEntityIndexByPrimaryKeys(currentData, entity);
46851
+ if (indexByKey >= 0) {
46852
+ // Already exists by key, treat as update
46853
+ currentData[indexByKey] = cached;
46854
+ this._dataMap.set(config.PropertyName, {
46855
+ entityName: config.EntityName,
46856
+ data: currentData,
46857
+ loadedSuccessfully: true
46858
+ });
46859
+ this.NotifyDataChange(config, currentData, 'update', cached);
46860
+ } else {
46861
+ // Add the new entity to the array
46862
+ currentData.push(cached);
46863
+ this._dataMap.set(config.PropertyName, {
46864
+ entityName: config.EntityName,
46865
+ data: currentData,
46866
+ loadedSuccessfully: true
46867
+ });
46868
+ this.NotifyDataChange(config, currentData, 'add', cached);
46869
+ }
46870
+ }
46871
+ } else {
46872
+ // Update: first check if the exact object is already in the array
46873
+ // if already in the array, we don't do anything but we keep going
46874
+ // in the method so stuff at end can be done
46875
+ _existsByRef = currentData.indexOf(entity) >= 0;
46876
+ if (!_existsByRef) {
46877
+ // Find by composite primary key and replace
46878
+ index = this.findEntityIndexByPrimaryKeys(currentData, entity);
46879
+ if (index >= 0) {
46880
+ currentData[index] = cached;
46881
+ this._dataMap.set(config.PropertyName, {
46882
+ entityName: config.EntityName,
46883
+ data: currentData,
46884
+ loadedSuccessfully: true
46885
+ });
46886
+ this.NotifyDataChange(config, currentData, 'update', cached);
46887
+ } else {
46888
+ // Entity not found in array - this shouldn't happen normally,
46889
+ // but if it does, add it (might have been created before we started listening)
46890
+ currentData.push(cached);
46891
+ this._dataMap.set(config.PropertyName, {
46892
+ entityName: config.EntityName,
46893
+ data: currentData,
46894
+ loadedSuccessfully: true
46895
+ });
46896
+ this.NotifyDataChange(config, currentData, 'add', cached);
46897
+ }
46898
+ }
46899
+ }
46900
+ _context12.n = 5;
46901
+ break;
46902
+ case 4:
46903
+ if (event.type === 'delete') {
46904
+ // For delete, first try to find by object reference
46905
+ _index = currentData.indexOf(entity);
46906
+ if (_index < 0) {
46907
+ // Not found by reference, search by composite primary key
46908
+ _index = this.findEntityIndexByPrimaryKeys(currentData, entity);
46909
+ }
46910
+ if (_index >= 0) {
46911
+ currentData.splice(_index, 1);
46912
+ this._dataMap.set(config.PropertyName, {
46913
+ entityName: config.EntityName,
46914
+ data: currentData,
46915
+ loadedSuccessfully: true
46916
+ });
46917
+ this.NotifyDataChange(config, currentData, 'delete', entity);
46918
+ }
46919
+ }
46920
+ case 5:
46921
+ // Per-property observable emission for subscribers of ObserveProperty(config.PropertyName)
46922
+ this.emitPropertyChange(config.PropertyName);
46923
+ // Sync to LocalCacheManager if CacheLocal is enabled for this config
46924
+ // This keeps IndexedDB/localStorage in sync with in-memory array
46925
+ if (config.CacheLocal) {
46926
+ this.syncLocalCacheForConfig(config, event).catch(function (e) {
46927
+ // Log status but don't fail - cache will self-correct on next fetch
46928
+ LogStatus("BaseEngine: Failed to sync local cache for ".concat(config.EntityName, ": ").concat(e));
46929
+ });
46930
+ }
46931
+ case 6:
46932
+ return _context12.a(2);
46832
46933
  }
46833
- }
46834
- } else if (event.type === 'delete') {
46835
- // For delete, first try to find by object reference
46836
- var _index = currentData.indexOf(entity);
46837
- if (_index < 0) {
46838
- // Not found by reference, search by composite primary key
46839
- _index = this.findEntityIndexByPrimaryKeys(currentData, entity);
46840
- }
46841
- if (_index >= 0) {
46842
- currentData.splice(_index, 1);
46843
- this._dataMap.set(config.PropertyName, {
46844
- entityName: config.EntityName,
46845
- data: currentData,
46846
- loadedSuccessfully: true
46847
- });
46848
- this.NotifyDataChange(config, currentData, 'delete', entity);
46849
- }
46934
+ }, _callee12, this);
46935
+ }));
46936
+ function applyImmediateMutation(_x15, _x16) {
46937
+ return _applyImmediateMutation.apply(this, arguments);
46850
46938
  }
46851
- // Per-property observable emission for subscribers of ObserveProperty(config.PropertyName)
46852
- this.emitPropertyChange(config.PropertyName);
46853
- // Sync to LocalCacheManager if CacheLocal is enabled for this config
46854
- // This keeps IndexedDB/localStorage in sync with in-memory array
46855
- if (config.CacheLocal) {
46856
- this.syncLocalCacheForConfig(config, event).catch(function (e) {
46857
- // Log status but don't fail - cache will self-correct on next fetch
46858
- LogStatus("BaseEngine: Failed to sync local cache for ".concat(config.EntityName, ": ").concat(e));
46859
- });
46939
+ return applyImmediateMutation;
46940
+ }()
46941
+ /**
46942
+ * Creates a fresh BaseEntity owned by this engine's provider and populates it from the
46943
+ * given source entity's field values. Used by applyImmediateMutation to avoid pinning
46944
+ * the source entity's provider inside this engine's cache.
46945
+ */
46946
+ )
46947
+ }, {
46948
+ key: "cloneEntityForCache",
46949
+ value: (function () {
46950
+ var _cloneEntityForCache = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee13(source, config) {
46951
+ var provider, fresh, _t10;
46952
+ return baseEngine_regenerator().w(function (_context13) {
46953
+ while (1) switch (_context13.p = _context13.n) {
46954
+ case 0:
46955
+ _context13.p = 0;
46956
+ provider = this.ProviderToUse;
46957
+ if (provider) {
46958
+ _context13.n = 1;
46959
+ break;
46960
+ }
46961
+ return _context13.a(2, null);
46962
+ case 1:
46963
+ _context13.n = 2;
46964
+ return provider.GetEntityObject(config.EntityName, this._contextUser);
46965
+ case 2:
46966
+ fresh = _context13.v;
46967
+ if (fresh) {
46968
+ _context13.n = 3;
46969
+ break;
46970
+ }
46971
+ return _context13.a(2, null);
46972
+ case 3:
46973
+ fresh.LoadFromData(source.GetAll());
46974
+ return _context13.a(2, fresh);
46975
+ case 4:
46976
+ _context13.p = 4;
46977
+ _t10 = _context13.v;
46978
+ LogError(_t10);
46979
+ return _context13.a(2, null);
46980
+ }
46981
+ }, _callee13, this, [[0, 4]]);
46982
+ }));
46983
+ function cloneEntityForCache(_x17, _x18) {
46984
+ return _cloneEntityForCache.apply(this, arguments);
46860
46985
  }
46861
- }
46986
+ return cloneEntityForCache;
46987
+ }()
46862
46988
  /**
46863
46989
  * Syncs an entity change to the LocalCacheManager for a config with CacheLocal enabled.
46864
46990
  * This ensures that IndexedDB/localStorage stays in sync with the engine's in-memory array.
@@ -46869,19 +46995,20 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46869
46995
  * @param config - The configuration for the property being synced
46870
46996
  * @param event - The entity event containing the affected entity and event type
46871
46997
  */
46998
+ )
46872
46999
  }, {
46873
47000
  key: "syncLocalCacheForConfig",
46874
47001
  value: (function () {
46875
- var _syncLocalCacheForConfig = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee12(config, event) {
47002
+ var _syncLocalCacheForConfig = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee14(config, event) {
46876
47003
  var entity, provider, connectionString, params, fingerprint, key, rawUpdatedAt, updatedAt, entityData;
46877
- return baseEngine_regenerator().w(function (_context12) {
46878
- while (1) switch (_context12.n) {
47004
+ return baseEngine_regenerator().w(function (_context14) {
47005
+ while (1) switch (_context14.n) {
46879
47006
  case 0:
46880
47007
  if (LocalCacheManager.Instance.IsInitialized) {
46881
- _context12.n = 1;
47008
+ _context14.n = 1;
46882
47009
  break;
46883
47010
  }
46884
- return _context12.a(2);
47011
+ return _context14.a(2);
46885
47012
  case 1:
46886
47013
  entity = event.baseEntity; // Get the connection string from the provider for fingerprint generation
46887
47014
  // The provider is needed because fingerprints include connection prefix
@@ -46903,11 +47030,11 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46903
47030
  if (!(!key || key.KeyValuePairs.length === 0 || key.KeyValuePairs.some(function (kv) {
46904
47031
  return kv.Value == null;
46905
47032
  }))) {
46906
- _context12.n = 2;
47033
+ _context14.n = 2;
46907
47034
  break;
46908
47035
  }
46909
47036
  LogStatus("BaseEngine.syncLocalCacheForConfig: Cannot sync - primary key is incomplete for ".concat(config.EntityName));
46910
- return _context12.a(2);
47037
+ return _context14.a(2);
46911
47038
  case 2:
46912
47039
  // Get the updated timestamp from the entity and normalize to an ISO string.
46913
47040
  // entity.Get returns Date|string|number|null depending on field hydration and the
@@ -46918,24 +47045,24 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46918
47045
  rawUpdatedAt = entity.Get('__mj_UpdatedAt');
46919
47046
  updatedAt = rawUpdatedAt ? new Date(rawUpdatedAt).toISOString() : new Date().toISOString();
46920
47047
  if (!(event.type === 'delete')) {
46921
- _context12.n = 4;
47048
+ _context14.n = 4;
46922
47049
  break;
46923
47050
  }
46924
- _context12.n = 3;
47051
+ _context14.n = 3;
46925
47052
  return LocalCacheManager.Instance.RemoveSingleEntity(fingerprint, key, updatedAt);
46926
47053
  case 3:
46927
- _context12.n = 5;
47054
+ _context14.n = 5;
46928
47055
  break;
46929
47056
  case 4:
46930
47057
  entityData = entity.GetAll();
46931
- _context12.n = 5;
47058
+ _context14.n = 5;
46932
47059
  return LocalCacheManager.Instance.UpsertSingleEntity(fingerprint, entityData, key, updatedAt);
46933
47060
  case 5:
46934
- return _context12.a(2);
47061
+ return _context14.a(2);
46935
47062
  }
46936
- }, _callee12, this);
47063
+ }, _callee14, this);
46937
47064
  }));
46938
- function syncLocalCacheForConfig(_x15, _x16) {
47065
+ function syncLocalCacheForConfig(_x19, _x20) {
46939
47066
  return _syncLocalCacheForConfig.apply(this, arguments);
46940
47067
  }
46941
47068
  return syncLocalCacheForConfig;
@@ -46993,18 +47120,18 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
46993
47120
  }, {
46994
47121
  key: "LoadConfigs",
46995
47122
  value: (function () {
46996
- var _LoadConfigs = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee13(configs, contextUser) {
46997
- var _this8 = this;
47123
+ var _LoadConfigs = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee15(configs, contextUser) {
47124
+ var _this7 = this;
46998
47125
  var bypassCache,
46999
47126
  entityConfigs,
47000
47127
  datasetConfigs,
47001
- _args13 = arguments;
47002
- return baseEngine_regenerator().w(function (_context13) {
47003
- while (1) switch (_context13.n) {
47128
+ _args15 = arguments;
47129
+ return baseEngine_regenerator().w(function (_context15) {
47130
+ while (1) switch (_context15.n) {
47004
47131
  case 0:
47005
- bypassCache = _args13.length > 2 && _args13[2] !== undefined ? _args13[2] : false;
47132
+ bypassCache = _args15.length > 2 && _args15[2] !== undefined ? _args15[2] : false;
47006
47133
  this._metadataConfigs = configs.map(function (c) {
47007
- return _this8.UpgradeObjectToConfig(c);
47134
+ return _this7.UpgradeObjectToConfig(c);
47008
47135
  });
47009
47136
  // now, break up the configs into two chunks, datasets and views of entities so we can load all the views in a single network call via RunViews()
47010
47137
  entityConfigs = this._metadataConfigs.filter(function (c) {
@@ -47013,19 +47140,19 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47013
47140
  datasetConfigs = this._metadataConfigs.filter(function (c) {
47014
47141
  return c.Type === 'dataset';
47015
47142
  });
47016
- _context13.n = 1;
47143
+ _context15.n = 1;
47017
47144
  return Promise.all([].concat(baseEngine_toConsumableArray(datasetConfigs.map(function (c) {
47018
- return _this8.LoadSingleDatasetConfig(c, contextUser, bypassCache);
47145
+ return _this7.LoadSingleDatasetConfig(c, contextUser, bypassCache);
47019
47146
  })), [this.LoadMultipleEntityConfigs(entityConfigs, contextUser, bypassCache)]));
47020
47147
  case 1:
47021
47148
  // Register cross-server cache change callbacks for entity configs
47022
47149
  this.RegisterCacheChangeCallbacks(entityConfigs);
47023
47150
  case 2:
47024
- return _context13.a(2);
47151
+ return _context15.a(2);
47025
47152
  }
47026
- }, _callee13, this);
47153
+ }, _callee15, this);
47027
47154
  }));
47028
- function LoadConfigs(_x17, _x18) {
47155
+ function LoadConfigs(_x21, _x22) {
47029
47156
  return _LoadConfigs.apply(this, arguments);
47030
47157
  }
47031
47158
  return LoadConfigs;
@@ -47040,32 +47167,32 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47040
47167
  }, {
47041
47168
  key: "LoadSingleConfig",
47042
47169
  value: (function () {
47043
- var _LoadSingleConfig = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee14(config, contextUser) {
47170
+ var _LoadSingleConfig = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee16(config, contextUser) {
47044
47171
  var bypassCache,
47045
- _args14 = arguments;
47046
- return baseEngine_regenerator().w(function (_context14) {
47047
- while (1) switch (_context14.n) {
47172
+ _args16 = arguments;
47173
+ return baseEngine_regenerator().w(function (_context16) {
47174
+ while (1) switch (_context16.n) {
47048
47175
  case 0:
47049
- bypassCache = _args14.length > 2 && _args14[2] !== undefined ? _args14[2] : false;
47176
+ bypassCache = _args16.length > 2 && _args16[2] !== undefined ? _args16[2] : false;
47050
47177
  if (!(config.Type === 'dataset')) {
47051
- _context14.n = 2;
47178
+ _context16.n = 2;
47052
47179
  break;
47053
47180
  }
47054
- _context14.n = 1;
47181
+ _context16.n = 1;
47055
47182
  return this.LoadSingleDatasetConfig(config, contextUser, bypassCache);
47056
47183
  case 1:
47057
- return _context14.a(2, _context14.v);
47184
+ return _context16.a(2, _context16.v);
47058
47185
  case 2:
47059
- _context14.n = 3;
47186
+ _context16.n = 3;
47060
47187
  return this.LoadSingleEntityConfig(config, contextUser, bypassCache);
47061
47188
  case 3:
47062
- return _context14.a(2, _context14.v);
47189
+ return _context16.a(2, _context16.v);
47063
47190
  case 4:
47064
- return _context14.a(2);
47191
+ return _context16.a(2);
47065
47192
  }
47066
- }, _callee14, this);
47193
+ }, _callee16, this);
47067
47194
  }));
47068
- function LoadSingleConfig(_x19, _x20) {
47195
+ function LoadSingleConfig(_x23, _x24) {
47069
47196
  return _LoadSingleConfig.apply(this, arguments);
47070
47197
  }
47071
47198
  return LoadSingleConfig;
@@ -47080,19 +47207,19 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47080
47207
  }, {
47081
47208
  key: "LoadSingleEntityConfig",
47082
47209
  value: (function () {
47083
- var _LoadSingleEntityConfig = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee15(config, contextUser) {
47210
+ var _LoadSingleEntityConfig = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee17(config, contextUser) {
47084
47211
  var bypassCache,
47085
47212
  p,
47086
47213
  rv,
47087
47214
  result,
47088
- _args15 = arguments;
47089
- return baseEngine_regenerator().w(function (_context15) {
47090
- while (1) switch (_context15.n) {
47215
+ _args17 = arguments;
47216
+ return baseEngine_regenerator().w(function (_context17) {
47217
+ while (1) switch (_context17.n) {
47091
47218
  case 0:
47092
- bypassCache = _args15.length > 2 && _args15[2] !== undefined ? _args15[2] : false;
47219
+ bypassCache = _args17.length > 2 && _args17[2] !== undefined ? _args17[2] : false;
47093
47220
  p = this.RunViewProviderToUse;
47094
47221
  rv = new RunView(p);
47095
- _context15.n = 1;
47222
+ _context17.n = 1;
47096
47223
  return rv.RunView({
47097
47224
  EntityName: config.EntityName,
47098
47225
  ResultType: config.ResultType || this.EngineDefaultResultType,
@@ -47107,15 +47234,15 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47107
47234
  BypassCache: bypassCache
47108
47235
  }, contextUser);
47109
47236
  case 1:
47110
- result = _context15.v;
47237
+ result = _context17.v;
47111
47238
  this.HandleSingleViewResult(config, result);
47112
47239
  this.emitPropertyChange(config.PropertyName);
47113
47240
  case 2:
47114
- return _context15.a(2);
47241
+ return _context17.a(2);
47115
47242
  }
47116
- }, _callee15, this);
47243
+ }, _callee17, this);
47117
47244
  }));
47118
- function LoadSingleEntityConfig(_x21, _x22) {
47245
+ function LoadSingleEntityConfig(_x25, _x26) {
47119
47246
  return _LoadSingleEntityConfig.apply(this, arguments);
47120
47247
  }
47121
47248
  return LoadSingleEntityConfig;
@@ -47163,8 +47290,8 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47163
47290
  }, {
47164
47291
  key: "LoadMultipleEntityConfigs",
47165
47292
  value: (function () {
47166
- var _LoadMultipleEntityConfigs = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee16(configs, contextUser) {
47167
- var _this9 = this;
47293
+ var _LoadMultipleEntityConfigs = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee18(configs, contextUser) {
47294
+ var _this8 = this;
47168
47295
  var bypassCache,
47169
47296
  p,
47170
47297
  rv,
@@ -47172,13 +47299,13 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47172
47299
  results,
47173
47300
  entityNames,
47174
47301
  i,
47175
- _args16 = arguments;
47176
- return baseEngine_regenerator().w(function (_context16) {
47177
- while (1) switch (_context16.n) {
47302
+ _args18 = arguments;
47303
+ return baseEngine_regenerator().w(function (_context18) {
47304
+ while (1) switch (_context18.n) {
47178
47305
  case 0:
47179
- bypassCache = _args16.length > 2 && _args16[2] !== undefined ? _args16[2] : false;
47306
+ bypassCache = _args18.length > 2 && _args18[2] !== undefined ? _args18[2] : false;
47180
47307
  if (!(configs && configs.length > 0)) {
47181
- _context16.n = 2;
47308
+ _context18.n = 2;
47182
47309
  break;
47183
47310
  }
47184
47311
  p = this.RunViewProviderToUse;
@@ -47186,7 +47313,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47186
47313
  viewConfigs = configs.map(function (c) {
47187
47314
  return {
47188
47315
  EntityName: c.EntityName,
47189
- ResultType: c.ResultType || _this9.EngineDefaultResultType,
47316
+ ResultType: c.ResultType || _this8.EngineDefaultResultType,
47190
47317
  ExtraFilter: c.Filter,
47191
47318
  OrderBy: c.OrderBy,
47192
47319
  IgnoreMaxRows: true,
@@ -47198,10 +47325,10 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47198
47325
  BypassCache: bypassCache
47199
47326
  };
47200
47327
  });
47201
- _context16.n = 1;
47328
+ _context18.n = 1;
47202
47329
  return rv.RunViews(viewConfigs, contextUser);
47203
47330
  case 1:
47204
- results = _context16.v;
47331
+ results = _context18.v;
47205
47332
  // Process results and record entity loads for redundancy detection
47206
47333
  entityNames = [];
47207
47334
  for (i = 0; i < configs.length; i++) {
@@ -47218,11 +47345,11 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47218
47345
  BaseEngineRegistry.Instance.RecordEntityLoads(this, entityNames);
47219
47346
  }
47220
47347
  case 2:
47221
- return _context16.a(2);
47348
+ return _context18.a(2);
47222
47349
  }
47223
- }, _callee16, this);
47350
+ }, _callee18, this);
47224
47351
  }));
47225
- function LoadMultipleEntityConfigs(_x23, _x24) {
47352
+ function LoadMultipleEntityConfigs(_x27, _x28) {
47226
47353
  return _LoadMultipleEntityConfigs.apply(this, arguments);
47227
47354
  }
47228
47355
  return LoadMultipleEntityConfigs;
@@ -47239,7 +47366,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47239
47366
  }, {
47240
47367
  key: "LoadSingleDatasetConfig",
47241
47368
  value: (function () {
47242
- var _LoadSingleDatasetConfig = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee17(config, contextUser) {
47369
+ var _LoadSingleDatasetConfig = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee19(config, contextUser) {
47243
47370
  var bypassCache,
47244
47371
  p,
47245
47372
  result,
@@ -47256,61 +47383,61 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47256
47383
  _iterator8,
47257
47384
  _step8,
47258
47385
  _item,
47259
- _args17 = arguments,
47260
- _t1,
47261
- _t10;
47262
- return baseEngine_regenerator().w(function (_context17) {
47263
- while (1) switch (_context17.p = _context17.n) {
47386
+ _args19 = arguments,
47387
+ _t11,
47388
+ _t12;
47389
+ return baseEngine_regenerator().w(function (_context19) {
47390
+ while (1) switch (_context19.p = _context19.n) {
47264
47391
  case 0:
47265
- bypassCache = _args17.length > 2 && _args17[2] !== undefined ? _args17[2] : false;
47392
+ bypassCache = _args19.length > 2 && _args19[2] !== undefined ? _args19[2] : false;
47266
47393
  p = this.ProviderToUse; // When bypassing cache, use GetDatasetByName with forceRefresh to skip all cache reads,
47267
47394
  // then CacheDataset to store the fresh results for subsequent non-forced calls.
47268
47395
  // Otherwise, use GetAndCacheDatasetByName which validates staleness before returning cached data.
47269
47396
  if (!bypassCache) {
47270
- _context17.n = 3;
47397
+ _context19.n = 3;
47271
47398
  break;
47272
47399
  }
47273
- _context17.n = 1;
47400
+ _context19.n = 1;
47274
47401
  return p.GetDatasetByName(config.DatasetName, config.DatasetItemFilters, contextUser, undefined, true);
47275
47402
  case 1:
47276
- result = _context17.v;
47277
- _context17.n = 2;
47403
+ result = _context19.v;
47404
+ _context19.n = 2;
47278
47405
  return p.CacheDataset(config.DatasetName, config.DatasetItemFilters, result);
47279
47406
  case 2:
47280
- _context17.n = 5;
47407
+ _context19.n = 5;
47281
47408
  break;
47282
47409
  case 3:
47283
- _context17.n = 4;
47410
+ _context19.n = 4;
47284
47411
  return p.GetAndCacheDatasetByName(config.DatasetName, config.DatasetItemFilters);
47285
47412
  case 4:
47286
- result = _context17.v;
47413
+ result = _context19.v;
47287
47414
  case 5:
47288
47415
  if (result) {
47289
- _context17.n = 6;
47416
+ _context19.n = 6;
47290
47417
  break;
47291
47418
  }
47292
47419
  LogError("LoadSingleDatasetConfig: GetAndCacheDatasetByName(\"".concat(config.DatasetName, "\") returned undefined/null \u2014 provider: ").concat(p === null || p === void 0 || (_p$constructor = p.constructor) === null || _p$constructor === void 0 ? void 0 : _p$constructor.name));
47293
- return _context17.a(2);
47420
+ return _context19.a(2);
47294
47421
  case 6:
47295
47422
  if (!result.Success) {
47296
- _context17.n = 24;
47423
+ _context19.n = 24;
47297
47424
  break;
47298
47425
  }
47299
47426
  if (!(config.AddToObject !== false)) {
47300
- _context17.n = 23;
47427
+ _context19.n = 23;
47301
47428
  break;
47302
47429
  }
47303
47430
  if (!(config.DatasetResultHandling === 'single_property')) {
47304
- _context17.n = 22;
47431
+ _context19.n = 22;
47305
47432
  break;
47306
47433
  }
47307
47434
  singleObject = {};
47308
47435
  _iterator6 = baseEngine_createForOfIteratorHelper(result.Results);
47309
- _context17.p = 7;
47436
+ _context19.p = 7;
47310
47437
  _iterator6.s();
47311
47438
  case 8:
47312
47439
  if ((_step6 = _iterator6.n()).done) {
47313
- _context17.n = 18;
47440
+ _context19.n = 18;
47314
47441
  break;
47315
47442
  }
47316
47443
  item = _step6.value;
@@ -47318,53 +47445,53 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47318
47445
  //adding them to the singleObject
47319
47446
  entities = [];
47320
47447
  _iterator7 = baseEngine_createForOfIteratorHelper(item.Results);
47321
- _context17.p = 9;
47448
+ _context19.p = 9;
47322
47449
  _iterator7.s();
47323
47450
  case 10:
47324
47451
  if ((_step7 = _iterator7.n()).done) {
47325
- _context17.n = 13;
47452
+ _context19.n = 13;
47326
47453
  break;
47327
47454
  }
47328
47455
  entityData = _step7.value;
47329
- _context17.n = 11;
47456
+ _context19.n = 11;
47330
47457
  return p.GetEntityObject(item.EntityName, contextUser);
47331
47458
  case 11:
47332
- entity = _context17.v;
47459
+ entity = _context19.v;
47333
47460
  entity.SetMany(entityData);
47334
47461
  entities.push(entity);
47335
47462
  case 12:
47336
- _context17.n = 10;
47463
+ _context19.n = 10;
47337
47464
  break;
47338
47465
  case 13:
47339
- _context17.n = 15;
47466
+ _context19.n = 15;
47340
47467
  break;
47341
47468
  case 14:
47342
- _context17.p = 14;
47343
- _t1 = _context17.v;
47344
- _iterator7.e(_t1);
47469
+ _context19.p = 14;
47470
+ _t11 = _context19.v;
47471
+ _iterator7.e(_t11);
47345
47472
  case 15:
47346
- _context17.p = 15;
47473
+ _context19.p = 15;
47347
47474
  _iterator7.f();
47348
- return _context17.f(15);
47475
+ return _context19.f(15);
47349
47476
  case 16:
47350
47477
  singleObject[item.Code] = entities;
47351
47478
  case 17:
47352
- _context17.n = 8;
47479
+ _context19.n = 8;
47353
47480
  break;
47354
47481
  case 18:
47355
- _context17.n = 20;
47482
+ _context19.n = 20;
47356
47483
  break;
47357
47484
  case 19:
47358
- _context17.p = 19;
47359
- _t10 = _context17.v;
47360
- _iterator6.e(_t10);
47485
+ _context19.p = 19;
47486
+ _t12 = _context19.v;
47487
+ _iterator6.e(_t12);
47361
47488
  case 20:
47362
- _context17.p = 20;
47489
+ _context19.p = 20;
47363
47490
  _iterator6.f();
47364
- return _context17.f(20);
47491
+ return _context19.f(20);
47365
47492
  case 21:
47366
47493
  this[config.PropertyName] = singleObject;
47367
- _context17.n = 23;
47494
+ _context19.n = 23;
47368
47495
  break;
47369
47496
  case 22:
47370
47497
  // explode out the items within the DS into individual properties
@@ -47389,11 +47516,11 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47389
47516
  this.SetExpirationTimer(config.PropertyName, config.Expiration);
47390
47517
  }
47391
47518
  case 24:
47392
- return _context17.a(2);
47519
+ return _context19.a(2);
47393
47520
  }
47394
- }, _callee17, this, [[9, 14, 15, 16], [7, 19, 20, 21]]);
47521
+ }, _callee19, this, [[9, 14, 15, 16], [7, 19, 20, 21]]);
47395
47522
  }));
47396
- function LoadSingleDatasetConfig(_x25, _x26) {
47523
+ function LoadSingleDatasetConfig(_x29, _x30) {
47397
47524
  return _LoadSingleDatasetConfig.apply(this, arguments);
47398
47525
  }
47399
47526
  return LoadSingleDatasetConfig;
@@ -47413,7 +47540,7 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47413
47540
  }, {
47414
47541
  key: "RegisterCacheChangeCallbacks",
47415
47542
  value: function RegisterCacheChangeCallbacks(entityConfigs) {
47416
- var _this0 = this;
47543
+ var _this9 = this;
47417
47544
  // Unsubscribe any previous callbacks (e.g., on forceRefresh reload)
47418
47545
  var _iterator9 = baseEngine_createForOfIteratorHelper(this._cacheChangeUnsubscribers),
47419
47546
  _step9;
@@ -47444,9 +47571,9 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47444
47571
  ResultType: 'entity_object'
47445
47572
  }, connectionPrefix);
47446
47573
  var unsubscribe = LocalCacheManager.Instance.RegisterChangeCallback(fingerprint, function (event) {
47447
- return _this0.OnExternalCacheChange(config, event);
47574
+ return _this9.OnExternalCacheChange(config, event);
47448
47575
  });
47449
- _this0._cacheChangeUnsubscribers.push(unsubscribe);
47576
+ _this9._cacheChangeUnsubscribers.push(unsubscribe);
47450
47577
  };
47451
47578
  for (_iterator0.s(); !(_step0 = _iterator0.n()).done;) {
47452
47579
  _loop();
@@ -47470,19 +47597,19 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47470
47597
  }, {
47471
47598
  key: "OnExternalCacheChange",
47472
47599
  value: (function () {
47473
- var _OnExternalCacheChange = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee18(config, event) {
47474
- var parsed, _parsed$totalRowCount, _t11;
47475
- return baseEngine_regenerator().w(function (_context18) {
47476
- while (1) switch (_context18.p = _context18.n) {
47600
+ var _OnExternalCacheChange = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee20(config, event) {
47601
+ var parsed, _parsed$totalRowCount, _t13;
47602
+ return baseEngine_regenerator().w(function (_context20) {
47603
+ while (1) switch (_context20.p = _context20.n) {
47477
47604
  case 0:
47478
47605
  if (!(event.Data && event.Action === 'set')) {
47479
- _context18.n = 4;
47606
+ _context20.n = 4;
47480
47607
  break;
47481
47608
  }
47482
- _context18.p = 1;
47609
+ _context20.p = 1;
47483
47610
  parsed = JSON.parse(event.Data);
47484
47611
  if (!(parsed !== null && parsed !== void 0 && parsed.results && Array.isArray(parsed.results))) {
47485
- _context18.n = 2;
47612
+ _context20.n = 2;
47486
47613
  break;
47487
47614
  }
47488
47615
  this.HandleSingleViewResult(config, {
@@ -47494,22 +47621,22 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47494
47621
  ErrorMessage: '',
47495
47622
  UserViewRunID: ''
47496
47623
  });
47497
- return _context18.a(2);
47624
+ return _context20.a(2);
47498
47625
  case 2:
47499
- _context18.n = 4;
47626
+ _context20.n = 4;
47500
47627
  break;
47501
47628
  case 3:
47502
- _context18.p = 3;
47503
- _t11 = _context18.v;
47629
+ _context20.p = 3;
47630
+ _t13 = _context20.v;
47504
47631
  case 4:
47505
- _context18.n = 5;
47632
+ _context20.n = 5;
47506
47633
  return this.LoadSingleConfig(config, this._contextUser);
47507
47634
  case 5:
47508
- return _context18.a(2);
47635
+ return _context20.a(2);
47509
47636
  }
47510
- }, _callee18, this, [[1, 3]]);
47637
+ }, _callee20, this, [[1, 3]]);
47511
47638
  }));
47512
- function OnExternalCacheChange(_x27, _x28) {
47639
+ function OnExternalCacheChange(_x31, _x32) {
47513
47640
  return _OnExternalCacheChange.apply(this, arguments);
47514
47641
  }
47515
47642
  return OnExternalCacheChange;
@@ -47523,12 +47650,12 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47523
47650
  }, {
47524
47651
  key: "SetExpirationTimer",
47525
47652
  value: function SetExpirationTimer(propertyName, expiration) {
47526
- var _this1 = this;
47653
+ var _this0 = this;
47527
47654
  if (this._expirationTimers.has(propertyName)) {
47528
47655
  clearTimeout(this._expirationTimers.get(propertyName));
47529
47656
  }
47530
47657
  var timer = setTimeout(function () {
47531
- return _this1.RefreshItem(propertyName);
47658
+ return _this0.RefreshItem(propertyName);
47532
47659
  }, expiration);
47533
47660
  this._expirationTimers.set(propertyName, timer);
47534
47661
  }
@@ -47540,21 +47667,21 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47540
47667
  }, {
47541
47668
  key: "AddDynamicConfig",
47542
47669
  value: (function () {
47543
- var _AddDynamicConfig = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee19(config, contextUser) {
47670
+ var _AddDynamicConfig = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee21(config, contextUser) {
47544
47671
  var c;
47545
- return baseEngine_regenerator().w(function (_context19) {
47546
- while (1) switch (_context19.n) {
47672
+ return baseEngine_regenerator().w(function (_context21) {
47673
+ while (1) switch (_context21.n) {
47547
47674
  case 0:
47548
47675
  c = this.UpgradeObjectToConfig(config);
47549
47676
  this._dynamicConfigs.set(c.PropertyName, c);
47550
- _context19.n = 1;
47677
+ _context21.n = 1;
47551
47678
  return this.LoadSingleConfig(c, contextUser || this._contextUser);
47552
47679
  case 1:
47553
- return _context19.a(2);
47680
+ return _context21.a(2);
47554
47681
  }
47555
- }, _callee19, this);
47682
+ }, _callee21, this);
47556
47683
  }));
47557
- function AddDynamicConfig(_x29, _x30) {
47684
+ function AddDynamicConfig(_x33, _x34) {
47558
47685
  return _AddDynamicConfig.apply(this, arguments);
47559
47686
  }
47560
47687
  return AddDynamicConfig;
@@ -47581,26 +47708,26 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47581
47708
  }, {
47582
47709
  key: "RefreshItem",
47583
47710
  value: (function () {
47584
- var _RefreshItem = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee20(propertyName) {
47711
+ var _RefreshItem = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee22(propertyName) {
47585
47712
  var config;
47586
- return baseEngine_regenerator().w(function (_context20) {
47587
- while (1) switch (_context20.n) {
47713
+ return baseEngine_regenerator().w(function (_context22) {
47714
+ while (1) switch (_context22.n) {
47588
47715
  case 0:
47589
47716
  config = this._metadataConfigs.find(function (c) {
47590
47717
  return c.PropertyName === propertyName;
47591
47718
  }) || this._dynamicConfigs.get(propertyName);
47592
47719
  if (!config) {
47593
- _context20.n = 1;
47720
+ _context22.n = 1;
47594
47721
  break;
47595
47722
  }
47596
- _context20.n = 1;
47723
+ _context22.n = 1;
47597
47724
  return this.LoadSingleConfig(config, this._contextUser);
47598
47725
  case 1:
47599
- return _context20.a(2);
47726
+ return _context22.a(2);
47600
47727
  }
47601
- }, _callee20, this);
47728
+ }, _callee22, this);
47602
47729
  }));
47603
- function RefreshItem(_x31) {
47730
+ function RefreshItem(_x35) {
47604
47731
  return _RefreshItem.apply(this, arguments);
47605
47732
  }
47606
47733
  return RefreshItem;
@@ -47612,16 +47739,16 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47612
47739
  }, {
47613
47740
  key: "RefreshAllItems",
47614
47741
  value: (function () {
47615
- var _RefreshAllItems = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee21() {
47616
- return baseEngine_regenerator().w(function (_context21) {
47617
- while (1) switch (_context21.n) {
47742
+ var _RefreshAllItems = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee23() {
47743
+ return baseEngine_regenerator().w(function (_context23) {
47744
+ while (1) switch (_context23.n) {
47618
47745
  case 0:
47619
- _context21.n = 1;
47746
+ _context23.n = 1;
47620
47747
  return this.LoadConfigs([].concat(baseEngine_toConsumableArray(this._metadataConfigs), baseEngine_toConsumableArray(Array.from(this._dynamicConfigs.values()))), this._contextUser);
47621
47748
  case 1:
47622
- return _context21.a(2);
47749
+ return _context23.a(2);
47623
47750
  }
47624
- }, _callee21, this);
47751
+ }, _callee23, this);
47625
47752
  }));
47626
47753
  function RefreshAllItems() {
47627
47754
  return _RefreshAllItems.apply(this, arguments);
@@ -47636,15 +47763,15 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47636
47763
  }, {
47637
47764
  key: "AdditionalLoading",
47638
47765
  value: (function () {
47639
- var _AdditionalLoading = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee22(contextUser) {
47640
- return baseEngine_regenerator().w(function (_context22) {
47641
- while (1) switch (_context22.n) {
47766
+ var _AdditionalLoading = baseEngine_asyncToGenerator(/*#__PURE__*/baseEngine_regenerator().m(function _callee24(contextUser) {
47767
+ return baseEngine_regenerator().w(function (_context24) {
47768
+ while (1) switch (_context24.n) {
47642
47769
  case 0:
47643
- return _context22.a(2);
47770
+ return _context24.a(2);
47644
47771
  }
47645
- }, _callee22);
47772
+ }, _callee24);
47646
47773
  }));
47647
- function AdditionalLoading(_x32) {
47774
+ function AdditionalLoading(_x36) {
47648
47775
  return _AdditionalLoading.apply(this, arguments);
47649
47776
  }
47650
47777
  return AdditionalLoading;
@@ -47728,34 +47855,44 @@ var BaseEngine = /*#__PURE__*/function (_BaseSingleton) {
47728
47855
  if (!this.Loaded) throw new Error("Data not loaded, call Config() first.");
47729
47856
  }
47730
47857
  }], [{
47731
- key: "ProviderInstances",
47732
- get: function get() {
47733
- return BaseEngine._providerInstances;
47858
+ key: "GetProviderInstance",
47859
+ value:
47860
+ /**
47861
+ * Returns the cached engine instance for this engine subclass on the connection the given
47862
+ * provider points to, creating one if none exists yet. Lookup is keyed by the provider's
47863
+ * `InstanceConnectionString` so multiple provider objects targeting the same connection
47864
+ * share a single cached engine.
47865
+ */
47866
+ function GetProviderInstance(provider, subclassConstructor) {
47867
+ var connectionKey = provider === null || provider === void 0 ? void 0 : provider.InstanceConnectionString;
47868
+ if (connectionKey) {
47869
+ var perConnectionMap = BaseEngine._providerInstances.get(connectionKey);
47870
+ if (perConnectionMap) {
47871
+ var existing = perConnectionMap.get(subclassConstructor);
47872
+ if (existing) {
47873
+ return existing;
47874
+ }
47875
+ }
47876
+ }
47877
+ var newInstance = new subclassConstructor();
47878
+ newInstance.SetProvider(provider); // SetProvider -> CheckAddToProviderInstances handles registration
47879
+ return newInstance;
47734
47880
  }
47735
47881
  /**
47736
- * This method will check for the existence of an instance of this engine class that is tied to a specific provider. If one exists, it will return it, otherwise it will create a new instance
47882
+ * Removes all cached engine instances for the given connection. Call this when a connection
47883
+ * is being torn down (e.g. multi-tenant client logging out) to release the cached engines'
47884
+ * memory eagerly. For normal server operation this is rarely needed — the cache is bounded
47885
+ * by (distinct connections × engine classes), which is small.
47737
47886
  */
47738
47887
  }, {
47739
- key: "GetProviderInstance",
47740
- value: function GetProviderInstance(provider, subclassConstructor) {
47741
- var existingEntry = BaseEngine.ProviderInstances.find(function (entry) {
47742
- return entry.provider === provider && entry.subclassConstructor === subclassConstructor;
47743
- });
47744
- if (existingEntry) {
47745
- return existingEntry.instance;
47746
- } else {
47747
- // we don't have an existing instance for this provider, so we need to create one
47748
- var newInstance = new subclassConstructor();
47749
- newInstance.SetProvider(provider);
47750
- // BaseEngine.ProviderInstances.set({provider, subclassConstructor}, newInstance);
47751
- //BaseEngine.ProviderInstances.push({ provider, subclassConstructor, instance: newInstance });
47752
- return newInstance;
47753
- }
47888
+ key: "RemoveConnectionInstances",
47889
+ value: function RemoveConnectionInstances(connectionKey) {
47890
+ BaseEngine._providerInstances.delete(connectionKey);
47754
47891
  }
47755
47892
  }]);
47756
47893
  }(dist/* BaseSingleton */.tC);
47757
47894
  _BaseEngine = BaseEngine;
47758
- _BaseEngine._providerInstances = [];
47895
+ _BaseEngine._providerInstances = new Map();
47759
47896
  ;// ../../MJCore/dist/generic/transactionGroup.js
47760
47897
  function transactionGroup_typeof(o) { "@babel/helpers - typeof"; return transactionGroup_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, transactionGroup_typeof(o); }
47761
47898
  function transactionGroup_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = transactionGroup_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
@@ -54362,7 +54499,7 @@ var UserViewEngine = /*#__PURE__*/function (_BaseEngine) {
54362
54499
 
54363
54500
  /***/ },
54364
54501
 
54365
- /***/ 346
54502
+ /***/ 793
54366
54503
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
54367
54504
 
54368
54505
  "use strict";
@@ -54373,7 +54510,7 @@ __webpack_require__.d(__webpack_exports__, {
54373
54510
  o1C: () => (/* reexport */ ViewInfo)
54374
54511
  });
54375
54512
 
54376
- // UNUSED EXPORTS: AIAgentPermissionProvider, AccessControlRuleProvider, ApplicationRolePermissionProvider, ArtifactExtractor, ArtifactMetadataEngine, ArtifactPermissionProvider, CollectionPermissionProvider, ConversationEngine, CreateShareNotification, DEFAULT_AGGREGATE_DISPLAY, DashboardEngine, DashboardPermissionProvider, EncryptionEngineBase, EntityPermissionProvider, EntityPermissionType, EntitySaveOptions, FileStorageEngineBase, GeoDataEngine, InstanceConfigEngine, KnowledgeHubMetadataEngine, LoadMJAccessControlRuleEntityExtended, LoadMJArtifactPermissionEntityExtended, LoadMJCollectionPermissionEntityExtended, LoadMJConversationDetailEntityExtended, LoadMJDashboardPermissionEntityExtended, LoadPermissionEntityExtensions, LoadPermissionProviders, MCPEngine, MJAIActionEntity, MJAIActionSchema, MJAIAgentActionEntity, MJAIAgentActionSchema, MJAIAgentArtifactTypeEntity, MJAIAgentArtifactTypeSchema, MJAIAgentCategoryEntity, MJAIAgentCategorySchema, MJAIAgentClientToolEntity, MJAIAgentClientToolSchema, MJAIAgentConfigurationEntity, MJAIAgentConfigurationSchema, MJAIAgentDataSourceEntity, MJAIAgentDataSourceSchema, MJAIAgentEntity, MJAIAgentExampleEntity, MJAIAgentExampleSchema, MJAIAgentLearningCycleEntity, MJAIAgentLearningCycleSchema, MJAIAgentModalityEntity, MJAIAgentModalitySchema, MJAIAgentModelEntity, MJAIAgentModelSchema, MJAIAgentNoteEntity, MJAIAgentNoteSchema, MJAIAgentNoteTypeEntity, MJAIAgentNoteTypeSchema, MJAIAgentPermissionEntity, MJAIAgentPermissionSchema, MJAIAgentPromptEntity, MJAIAgentPromptSchema, MJAIAgentRelationshipEntity, MJAIAgentRelationshipSchema, MJAIAgentRequestEntity, MJAIAgentRequestSchema, MJAIAgentRequestTypeEntity, MJAIAgentRequestTypeSchema, MJAIAgentRunEntity, MJAIAgentRunMediaEntity, MJAIAgentRunMediaSchema, MJAIAgentRunSchema, MJAIAgentRunStepEntity, MJAIAgentRunStepSchema, MJAIAgentSchema, MJAIAgentSearchScopeEntity, MJAIAgentSearchScopeSchema, MJAIAgentStepEntity, MJAIAgentStepPathEntity, MJAIAgentStepPathSchema, MJAIAgentStepSchema, MJAIAgentTypeEntity, MJAIAgentTypeSchema, MJAIArchitectureEntity, MJAIArchitectureSchema, MJAIClientToolDefinitionEntity, MJAIClientToolDefinitionSchema, MJAIConfigurationEntity, MJAIConfigurationParamEntity, MJAIConfigurationParamSchema, MJAIConfigurationSchema, MJAICredentialBindingEntity, MJAICredentialBindingSchema, MJAIModalityEntity, MJAIModalitySchema, MJAIModelActionEntity, MJAIModelActionSchema, MJAIModelArchitectureEntity, MJAIModelArchitectureSchema, MJAIModelCostEntity, MJAIModelCostSchema, MJAIModelEntity, MJAIModelModalityEntity, MJAIModelModalitySchema, MJAIModelPriceTypeEntity, MJAIModelPriceTypeSchema, MJAIModelPriceUnitTypeEntity, MJAIModelPriceUnitTypeSchema, MJAIModelSchema, MJAIModelTypeEntity, MJAIModelTypeSchema, MJAIModelVendorEntity, MJAIModelVendorSchema, MJAIPromptCategoryEntity, MJAIPromptCategorySchema, MJAIPromptEntity, MJAIPromptModelEntity, MJAIPromptModelSchema, MJAIPromptRunEntity, MJAIPromptRunMediaEntity, MJAIPromptRunMediaSchema, MJAIPromptRunSchema, MJAIPromptSchema, MJAIPromptTypeEntity, MJAIPromptTypeSchema, MJAIResultCacheEntity, MJAIResultCacheSchema, MJAIVendorEntity, MJAIVendorSchema, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeDefinitionSchema, MJAIVendorTypeEntity, MJAIVendorTypeSchema, MJAPIApplicationEntity, MJAPIApplicationSchema, MJAPIApplicationScopeEntity, MJAPIApplicationScopeSchema, MJAPIKeyApplicationEntity, MJAPIKeyApplicationSchema, MJAPIKeyEntity, MJAPIKeySchema, MJAPIKeyScopeEntity, MJAPIKeyScopeSchema, MJAPIKeyUsageLogEntity, MJAPIKeyUsageLogSchema, MJAPIScopeEntity, MJAPIScopeSchema, MJAccessControlRuleEntity, MJAccessControlRuleEntityExtended, MJAccessControlRuleSchema, MJActionAuthorizationEntity, MJActionAuthorizationSchema, MJActionCategoryEntity, MJActionCategorySchema, MJActionContextEntity, MJActionContextSchema, MJActionContextTypeEntity, MJActionContextTypeSchema, MJActionEntity, MJActionExecutionLogEntity, MJActionExecutionLogSchema, MJActionFilterEntity, MJActionFilterSchema, MJActionLibraryEntity, MJActionLibrarySchema, MJActionParamEntity, MJActionParamSchema, MJActionResultCodeEntity, MJActionResultCodeSchema, MJActionSchema, MJApplicationEntity, MJApplicationEntityEntity, MJApplicationEntitySchema, MJApplicationRoleEntity, MJApplicationRoleSchema, MJApplicationSchema, MJApplicationSettingEntity, MJApplicationSettingSchema, MJArchiveConfigurationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntitySchema, MJArchiveConfigurationSchema, MJArchiveRunDetailEntity, MJArchiveRunDetailSchema, MJArchiveRunEntity, MJArchiveRunSchema, MJArtifactEntity, MJArtifactPermissionEntity, MJArtifactPermissionEntityExtended, MJArtifactPermissionSchema, MJArtifactSchema, MJArtifactTypeEntity, MJArtifactTypeSchema, MJArtifactUseEntity, MJArtifactUseSchema, MJArtifactVersionAttributeEntity, MJArtifactVersionAttributeSchema, MJArtifactVersionEntity, MJArtifactVersionSchema, MJAuditLogEntity, MJAuditLogSchema, MJAuditLogTypeEntity, MJAuditLogTypeSchema, MJAuthorizationEntity, MJAuthorizationRoleEntity, MJAuthorizationRoleSchema, MJAuthorizationSchema, MJCollectionArtifactEntity, MJCollectionArtifactSchema, MJCollectionEntity, MJCollectionPermissionEntity, MJCollectionPermissionEntityExtended, MJCollectionPermissionSchema, MJCollectionSchema, MJCommunicationBaseMessageTypeEntity, MJCommunicationBaseMessageTypeSchema, MJCommunicationLogEntity, MJCommunicationLogSchema, MJCommunicationProviderEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderMessageTypeSchema, MJCommunicationProviderSchema, MJCommunicationRunEntity, MJCommunicationRunSchema, MJCompanyEntity, MJCompanyIntegrationEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationEntityMapSchema, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationFieldMapSchema, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRecordMapSchema, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunAPILogSchema, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunDetailSchema, MJCompanyIntegrationRunEntity, MJCompanyIntegrationRunSchema, MJCompanyIntegrationSchema, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationSyncWatermarkSchema, MJCompanySchema, MJComponentDependencyEntity, MJComponentDependencySchema, MJComponentEntity, MJComponentEntityExtended, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentLibraryLinkSchema, MJComponentLibrarySchema, MJComponentRegistryEntity, MJComponentRegistrySchema, MJComponentSchema, MJContentFileTypeEntity, MJContentFileTypeSchema, MJContentItemAttributeEntity, MJContentItemAttributeSchema, MJContentItemDuplicateEntity, MJContentItemDuplicateSchema, MJContentItemEntity, MJContentItemSchema, MJContentItemTagEntity, MJContentItemTagSchema, MJContentProcessRunDetailEntity, MJContentProcessRunDetailSchema, MJContentProcessRunEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunPromptRunSchema, MJContentProcessRunSchema, MJContentSourceEntity, MJContentSourceParamEntity, MJContentSourceParamSchema, MJContentSourceSchema, MJContentSourceTypeEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeParamSchema, MJContentSourceTypeSchema, MJContentTypeAttributeEntity, MJContentTypeAttributeSchema, MJContentTypeEntity, MJContentTypeSchema, MJConversationArtifactEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactPermissionSchema, MJConversationArtifactSchema, MJConversationArtifactVersionEntity, MJConversationArtifactVersionSchema, MJConversationDetailArtifactEntity, MJConversationDetailArtifactSchema, MJConversationDetailAttachmentEntity, MJConversationDetailAttachmentSchema, MJConversationDetailEntity, MJConversationDetailEntityExtended, MJConversationDetailRatingEntity, MJConversationDetailRatingSchema, MJConversationDetailSchema, MJConversationEntity, MJConversationSchema, MJCountryEntity, MJCountrySchema, MJCredentialCategoryEntity, MJCredentialCategorySchema, MJCredentialEntity, MJCredentialSchema, MJCredentialTypeEntity, MJCredentialTypeSchema, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryLinkSchema, MJDashboardCategoryPermissionEntity, MJDashboardCategoryPermissionSchema, MJDashboardCategorySchema, MJDashboardEntity, MJDashboardEntityExtended, MJDashboardPartTypeEntity, MJDashboardPartTypeSchema, MJDashboardPermissionEntity, MJDashboardPermissionEntityExtended, MJDashboardPermissionSchema, MJDashboardSchema, MJDashboardUserPreferenceEntity, MJDashboardUserPreferenceSchema, MJDashboardUserStateEntity, MJDashboardUserStateSchema, MJDataContextEntity, MJDataContextItemEntity, MJDataContextItemSchema, MJDataContextSchema, MJDatasetEntity, MJDatasetItemEntity, MJDatasetItemSchema, MJDatasetSchema, MJDuplicateRunDetailEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailMatchSchema, MJDuplicateRunDetailSchema, MJDuplicateRunEntity, MJDuplicateRunSchema, MJEmployeeCompanyIntegrationEntity, MJEmployeeCompanyIntegrationSchema, MJEmployeeEntity, MJEmployeeRoleEntity, MJEmployeeRoleSchema, MJEmployeeSchema, MJEmployeeSkillEntity, MJEmployeeSkillSchema, MJEncryptionAlgorithmEntity, MJEncryptionAlgorithmSchema, MJEncryptionKeyEntity, MJEncryptionKeySchema, MJEncryptionKeySourceEntity, MJEncryptionKeySourceSchema, MJEntityAIActionEntity, MJEntityAIActionSchema, MJEntityActionEntity, MJEntityActionFilterEntity, MJEntityActionFilterSchema, MJEntityActionInvocationEntity, MJEntityActionInvocationSchema, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationTypeSchema, MJEntityActionParamEntity, MJEntityActionParamSchema, MJEntityActionSchema, MJEntityCommunicationFieldEntity, MJEntityCommunicationFieldSchema, MJEntityCommunicationMessageTypeEntity, MJEntityCommunicationMessageTypeSchema, MJEntityDocumentEntity, MJEntityDocumentRunEntity, MJEntityDocumentRunSchema, MJEntityDocumentSchema, MJEntityDocumentSettingEntity, MJEntityDocumentSettingSchema, MJEntityDocumentTypeEntity, MJEntityDocumentTypeSchema, MJEntityEntity, MJEntityEntityExtended, MJEntityFieldEntity, MJEntityFieldEntityExtended, MJEntityFieldSchema, MJEntityFieldValueEntity, MJEntityFieldValueSchema, MJEntityOrganicKeyEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyRelatedEntitySchema, MJEntityOrganicKeySchema, MJEntityPermissionEntity, MJEntityPermissionSchema, MJEntityRecordDocumentEntity, MJEntityRecordDocumentSchema, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipDisplayComponentSchema, MJEntityRelationshipEntity, MJEntityRelationshipSchema, MJEntitySchema, MJEntitySettingEntity, MJEntitySettingSchema, MJEnvironmentEntity, MJEnvironmentEntityExtended, MJEnvironmentSchema, MJErrorLogEntity, MJErrorLogSchema, MJExplorerNavigationItemEntity, MJExplorerNavigationItemSchema, MJFileCategoryEntity, MJFileCategorySchema, MJFileEntity, MJFileEntityRecordLinkEntity, MJFileEntityRecordLinkSchema, MJFileSchema, MJFileStorageAccountEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountPermissionSchema, MJFileStorageAccountSchema, MJFileStorageProviderEntity, MJFileStorageProviderSchema, MJGeneratedCodeCategoryEntity, MJGeneratedCodeCategorySchema, MJGeneratedCodeEntity, MJGeneratedCodeSchema, MJInstanceConfigurationEntity, MJInstanceConfigurationSchema, MJIntegrationEntity, MJIntegrationObjectEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectFieldSchema, MJIntegrationObjectSchema, MJIntegrationSchema, MJIntegrationSourceTypeEntity, MJIntegrationSourceTypeSchema, MJIntegrationURLFormatEntity, MJIntegrationURLFormatSchema, MJKnowledgeHubSavedSearchEntity, MJKnowledgeHubSavedSearchSchema, MJLibraryEntity, MJLibraryItemEntity, MJLibraryItemSchema, MJLibrarySchema, MJListCategoryEntity, MJListCategorySchema, MJListDetailEntity, MJListDetailEntityExtended, MJListDetailSchema, MJListEntity, MJListInvitationEntity, MJListInvitationSchema, MJListSchema, MJListShareEntity, MJListShareSchema, MJMCPServerConnectionEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionPermissionSchema, MJMCPServerConnectionSchema, MJMCPServerConnectionToolEntity, MJMCPServerConnectionToolSchema, MJMCPServerEntity, MJMCPServerSchema, MJMCPServerToolEntity, MJMCPServerToolSchema, MJMCPToolExecutionLogEntity, MJMCPToolExecutionLogSchema, MJMCPToolFavoriteEntity, MJMCPToolFavoriteSchema, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthServerMetadataCacheSchema, MJOAuthAuthorizationStateEntity, MJOAuthAuthorizationStateSchema, MJOAuthClientRegistrationEntity, MJOAuthClientRegistrationSchema, MJOAuthTokenEntity, MJOAuthTokenSchema, MJOpenAppDependencyEntity, MJOpenAppDependencySchema, MJOpenAppEntity, MJOpenAppInstallHistoryEntity, MJOpenAppInstallHistorySchema, MJOpenAppSchema, MJOutputDeliveryTypeEntity, MJOutputDeliveryTypeSchema, MJOutputFormatTypeEntity, MJOutputFormatTypeSchema, MJOutputTriggerTypeEntity, MJOutputTriggerTypeSchema, MJPermissionDomainEntity, MJPermissionDomainSchema, MJProjectEntity, MJProjectSchema, MJPublicLinkEntity, MJPublicLinkSchema, MJQueryCategoryEntity, MJQueryCategorySchema, MJQueryDependencyEntity, MJQueryDependencySchema, MJQueryEntity, MJQueryEntityEntity, MJQueryEntitySchema, MJQueryFieldEntity, MJQueryFieldSchema, MJQueryParameterEntity, MJQueryParameterSchema, MJQueryPermissionEntity, MJQueryPermissionSchema, MJQuerySQLEntity, MJQuerySQLSchema, MJQuerySchema, MJQueueEntity, MJQueueSchema, MJQueueTaskEntity, MJQueueTaskSchema, MJQueueTypeEntity, MJQueueTypeSchema, MJRecommendationEntity, MJRecommendationItemEntity, MJRecommendationItemSchema, MJRecommendationProviderEntity, MJRecommendationProviderSchema, MJRecommendationRunEntity, MJRecommendationRunSchema, MJRecommendationSchema, MJRecordChangeEntity, MJRecordChangeReplayRunEntity, MJRecordChangeReplayRunSchema, MJRecordChangeSchema, MJRecordGeoCodeEntity, MJRecordGeoCodeSchema, MJRecordLinkEntity, MJRecordLinkSchema, MJRecordMergeDeletionLogEntity, MJRecordMergeDeletionLogSchema, MJRecordMergeLogEntity, MJRecordMergeLogSchema, MJReportCategoryEntity, MJReportCategorySchema, MJReportEntity, MJReportSchema, MJReportSnapshotEntity, MJReportSnapshotSchema, MJReportUserStateEntity, MJReportUserStateSchema, MJReportVersionEntity, MJReportVersionSchema, MJResourceLinkEntity, MJResourceLinkSchema, MJResourcePermissionEntity, MJResourcePermissionEntityExtended, MJResourcePermissionSchema, MJResourceTypeEntity, MJResourceTypeSchema, MJRoleEntity, MJRoleSchema, MJRowLevelSecurityFilterEntity, MJRowLevelSecurityFilterSchema, MJSQLDialectEntity, MJSQLDialectSchema, MJScheduledActionEntity, MJScheduledActionEntityExtended, MJScheduledActionParamEntity, MJScheduledActionParamSchema, MJScheduledActionSchema, MJScheduledJobEntity, MJScheduledJobRunEntity, MJScheduledJobRunSchema, MJScheduledJobSchema, MJScheduledJobTypeEntity, MJScheduledJobTypeSchema, MJSchemaInfoEntity, MJSchemaInfoSchema, MJSearchExecutionLogEntity, MJSearchExecutionLogSchema, MJSearchProviderEntity, MJSearchProviderSchema, MJSearchScopeEntity, MJSearchScopeEntityEntity, MJSearchScopeEntitySchema, MJSearchScopeExternalIndexEntity, MJSearchScopeExternalIndexSchema, MJSearchScopePermissionEntity, MJSearchScopePermissionSchema, MJSearchScopeProviderEntity, MJSearchScopeProviderSchema, MJSearchScopeSchema, MJSearchScopeStorageAccountEntity, MJSearchScopeStorageAccountSchema, MJSearchScopeTestQueryEntity, MJSearchScopeTestQuerySchema, MJSkillEntity, MJSkillSchema, MJStateProvinceEntity, MJStateProvinceSchema, MJTagAuditLogEntity, MJTagAuditLogSchema, MJTagCoOccurrenceEntity, MJTagCoOccurrenceSchema, MJTagEntity, MJTagSchema, MJTagScopeEntity, MJTagScopeSchema, MJTagSuggestionEntity, MJTagSuggestionSchema, MJTagSynonymEntity, MJTagSynonymSchema, MJTaggedItemEntity, MJTaggedItemSchema, MJTaskDependencyEntity, MJTaskDependencySchema, MJTaskEntity, MJTaskSchema, MJTaskTypeEntity, MJTaskTypeSchema, MJTemplateCategoryEntity, MJTemplateCategorySchema, MJTemplateContentEntity, MJTemplateContentSchema, MJTemplateContentTypeEntity, MJTemplateContentTypeSchema, MJTemplateEntity, MJTemplateEntityExtended, MJTemplateParamEntity, MJTemplateParamSchema, MJTemplateSchema, MJTestEntity, MJTestRubricEntity, MJTestRubricSchema, MJTestRunEntity, MJTestRunFeedbackEntity, MJTestRunFeedbackSchema, MJTestRunOutputEntity, MJTestRunOutputSchema, MJTestRunOutputTypeEntity, MJTestRunOutputTypeSchema, MJTestRunSchema, MJTestSchema, MJTestSuiteEntity, MJTestSuiteRunEntity, MJTestSuiteRunSchema, MJTestSuiteSchema, MJTestSuiteTestEntity, MJTestSuiteTestSchema, MJTestTypeEntity, MJTestTypeSchema, MJUserApplicationEntity, MJUserApplicationEntityEntity, MJUserApplicationEntitySchema, MJUserApplicationSchema, MJUserEntity, MJUserFavoriteEntity, MJUserFavoriteSchema, MJUserNotificationEntity, MJUserNotificationPreferenceEntity, MJUserNotificationPreferenceSchema, MJUserNotificationSchema, MJUserNotificationTypeEntity, MJUserNotificationTypeSchema, MJUserRecordLogEntity, MJUserRecordLogSchema, MJUserRoleEntity, MJUserRoleSchema, MJUserSchema, MJUserSettingEntity, MJUserSettingSchema, MJUserViewCategoryEntity, MJUserViewCategorySchema, MJUserViewEntity, MJUserViewEntityExtended, MJUserViewRunDetailEntity, MJUserViewRunDetailSchema, MJUserViewRunEntity, MJUserViewRunSchema, MJUserViewSchema, MJVectorDatabaseEntity, MJVectorDatabaseSchema, MJVectorIndexEntity, MJVectorIndexSchema, MJVersionInstallationEntity, MJVersionInstallationSchema, MJVersionLabelEntity, MJVersionLabelItemEntity, MJVersionLabelItemSchema, MJVersionLabelRestoreEntity, MJVersionLabelRestoreSchema, MJVersionLabelSchema, MJWorkflowEngineEntity, MJWorkflowEngineSchema, MJWorkflowEntity, MJWorkflowRunEntity, MJWorkflowRunSchema, MJWorkflowSchema, MJWorkspaceEntity, MJWorkspaceItemEntity, MJWorkspaceItemSchema, MJWorkspaceSchema, PERMISSION_DOMAIN_ICONS, PERMISSION_DOMAIN_ICON_FALLBACK, PermissionEngine, QueryEngine, QueryPermissionProvider, RegisterShareNotificationHandler, ResourceData, ResourcePermissionEngine, ResourcePermissionProvider, SearchEngineBase, TypeTablesCache, UserInfoEngine, UserViewEngine, ViewColumnInfo, ViewFilterInfo, ViewFilterLogicInfo, ViewGridState, ViewSortDirectionInfo, ViewSortInfo, assertCallerMayCreateShare, buildActionsSummary, checkShareManagePermission, dispatchShareNotificationAfterSave, loadModule, parseConversationDetailComplete
54513
+ // UNUSED EXPORTS: AIAgentPermissionProvider, AccessControlRuleProvider, ApplicationRolePermissionProvider, ArtifactExtractor, ArtifactMetadataEngine, ArtifactPermissionProvider, AuditLogTypeEngine, BuildUnregisteredMimeError, CollectionPermissionProvider, ConversationEngine, CreateShareNotification, DEFAULT_AGGREGATE_DISPLAY, DashboardEngine, DashboardPermissionProvider, DecideInlineStorage, EncryptionEngineBase, EntityPermissionProvider, EntityPermissionType, EntitySaveOptions, ExtractBase64FromDataUrl, FileStorageEngineBase, FindArtifactTypeConflicts, GeoDataEngine, InstanceConfigEngine, IsTextyMime, KnowledgeHubMetadataEngine, LoadMJAccessControlRuleEntityExtended, LoadMJArtifactPermissionEntityExtended, LoadMJCollectionPermissionEntityExtended, LoadMJConversationDetailEntityExtended, LoadMJDashboardPermissionEntityExtended, LoadPermissionEntityExtensions, LoadPermissionProviders, MCPEngine, MJAIActionEntity, MJAIActionSchema, MJAIAgentActionEntity, MJAIAgentActionSchema, MJAIAgentArtifactTypeEntity, MJAIAgentArtifactTypeSchema, MJAIAgentCategoryEntity, MJAIAgentCategorySchema, MJAIAgentClientToolEntity, MJAIAgentClientToolSchema, MJAIAgentConfigurationEntity, MJAIAgentConfigurationSchema, MJAIAgentDataSourceEntity, MJAIAgentDataSourceSchema, MJAIAgentEntity, MJAIAgentExampleEntity, MJAIAgentExampleSchema, MJAIAgentLearningCycleEntity, MJAIAgentLearningCycleSchema, MJAIAgentModalityEntity, MJAIAgentModalitySchema, MJAIAgentModelEntity, MJAIAgentModelSchema, MJAIAgentNoteEntity, MJAIAgentNoteSchema, MJAIAgentNoteTypeEntity, MJAIAgentNoteTypeSchema, MJAIAgentPermissionEntity, MJAIAgentPermissionSchema, MJAIAgentPromptEntity, MJAIAgentPromptSchema, MJAIAgentRelationshipEntity, MJAIAgentRelationshipSchema, MJAIAgentRequestEntity, MJAIAgentRequestSchema, MJAIAgentRequestTypeEntity, MJAIAgentRequestTypeSchema, MJAIAgentRunEntity, MJAIAgentRunMediaEntity, MJAIAgentRunMediaSchema, MJAIAgentRunSchema, MJAIAgentRunStepEntity, MJAIAgentRunStepSchema, MJAIAgentSchema, MJAIAgentSearchScopeEntity, MJAIAgentSearchScopeSchema, MJAIAgentStepEntity, MJAIAgentStepPathEntity, MJAIAgentStepPathSchema, MJAIAgentStepSchema, MJAIAgentTypeEntity, MJAIAgentTypeSchema, MJAIArchitectureEntity, MJAIArchitectureSchema, MJAIClientToolDefinitionEntity, MJAIClientToolDefinitionSchema, MJAIConfigurationEntity, MJAIConfigurationParamEntity, MJAIConfigurationParamSchema, MJAIConfigurationSchema, MJAICredentialBindingEntity, MJAICredentialBindingSchema, MJAIModalityEntity, MJAIModalitySchema, MJAIModelActionEntity, MJAIModelActionSchema, MJAIModelArchitectureEntity, MJAIModelArchitectureSchema, MJAIModelCostEntity, MJAIModelCostSchema, MJAIModelEntity, MJAIModelModalityEntity, MJAIModelModalitySchema, MJAIModelPriceTypeEntity, MJAIModelPriceTypeSchema, MJAIModelPriceUnitTypeEntity, MJAIModelPriceUnitTypeSchema, MJAIModelSchema, MJAIModelTypeEntity, MJAIModelTypeSchema, MJAIModelVendorEntity, MJAIModelVendorSchema, MJAIPromptCategoryEntity, MJAIPromptCategorySchema, MJAIPromptEntity, MJAIPromptModelEntity, MJAIPromptModelSchema, MJAIPromptRunEntity, MJAIPromptRunMediaEntity, MJAIPromptRunMediaSchema, MJAIPromptRunSchema, MJAIPromptSchema, MJAIPromptTypeEntity, MJAIPromptTypeSchema, MJAIResultCacheEntity, MJAIResultCacheSchema, MJAIVendorEntity, MJAIVendorSchema, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeDefinitionSchema, MJAIVendorTypeEntity, MJAIVendorTypeSchema, MJAPIApplicationEntity, MJAPIApplicationSchema, MJAPIApplicationScopeEntity, MJAPIApplicationScopeSchema, MJAPIKeyApplicationEntity, MJAPIKeyApplicationSchema, MJAPIKeyEntity, MJAPIKeySchema, MJAPIKeyScopeEntity, MJAPIKeyScopeSchema, MJAPIKeyUsageLogEntity, MJAPIKeyUsageLogSchema, MJAPIScopeEntity, MJAPIScopeSchema, MJAccessControlRuleEntity, MJAccessControlRuleEntityExtended, MJAccessControlRuleSchema, MJActionAuthorizationEntity, MJActionAuthorizationSchema, MJActionCategoryEntity, MJActionCategorySchema, MJActionContextEntity, MJActionContextSchema, MJActionContextTypeEntity, MJActionContextTypeSchema, MJActionEntity, MJActionExecutionLogEntity, MJActionExecutionLogSchema, MJActionFilterEntity, MJActionFilterSchema, MJActionLibraryEntity, MJActionLibrarySchema, MJActionParamEntity, MJActionParamSchema, MJActionResultCodeEntity, MJActionResultCodeSchema, MJActionSchema, MJApplicationEntity, MJApplicationEntityEntity, MJApplicationEntitySchema, MJApplicationRoleEntity, MJApplicationRoleSchema, MJApplicationSchema, MJApplicationSettingEntity, MJApplicationSettingSchema, MJArchiveConfigurationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntitySchema, MJArchiveConfigurationSchema, MJArchiveRunDetailEntity, MJArchiveRunDetailSchema, MJArchiveRunEntity, MJArchiveRunSchema, MJArtifactEntity, MJArtifactPermissionEntity, MJArtifactPermissionEntityExtended, MJArtifactPermissionSchema, MJArtifactSchema, MJArtifactTypeEntity, MJArtifactTypeSchema, MJArtifactUseEntity, MJArtifactUseSchema, MJArtifactVersionAttributeEntity, MJArtifactVersionAttributeSchema, MJArtifactVersionEntity, MJArtifactVersionSchema, MJAuditLogEntity, MJAuditLogSchema, MJAuditLogTypeEntity, MJAuditLogTypeSchema, MJAuthorizationEntity, MJAuthorizationRoleEntity, MJAuthorizationRoleSchema, MJAuthorizationSchema, MJCollectionArtifactEntity, MJCollectionArtifactSchema, MJCollectionEntity, MJCollectionPermissionEntity, MJCollectionPermissionEntityExtended, MJCollectionPermissionSchema, MJCollectionSchema, MJCommunicationBaseMessageTypeEntity, MJCommunicationBaseMessageTypeSchema, MJCommunicationLogEntity, MJCommunicationLogSchema, MJCommunicationProviderEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderMessageTypeSchema, MJCommunicationProviderSchema, MJCommunicationRunEntity, MJCommunicationRunSchema, MJCompanyEntity, MJCompanyIntegrationEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationEntityMapSchema, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationFieldMapSchema, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRecordMapSchema, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunAPILogSchema, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunDetailSchema, MJCompanyIntegrationRunEntity, MJCompanyIntegrationRunSchema, MJCompanyIntegrationSchema, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationSyncWatermarkSchema, MJCompanySchema, MJComponentDependencyEntity, MJComponentDependencySchema, MJComponentEntity, MJComponentEntityExtended, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentLibraryLinkSchema, MJComponentLibrarySchema, MJComponentRegistryEntity, MJComponentRegistrySchema, MJComponentSchema, MJContentFileTypeEntity, MJContentFileTypeSchema, MJContentItemAttributeEntity, MJContentItemAttributeSchema, MJContentItemDuplicateEntity, MJContentItemDuplicateSchema, MJContentItemEntity, MJContentItemSchema, MJContentItemTagEntity, MJContentItemTagSchema, MJContentProcessRunDetailEntity, MJContentProcessRunDetailSchema, MJContentProcessRunEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunPromptRunSchema, MJContentProcessRunSchema, MJContentSourceEntity, MJContentSourceParamEntity, MJContentSourceParamSchema, MJContentSourceSchema, MJContentSourceTypeEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeParamSchema, MJContentSourceTypeSchema, MJContentTypeAttributeEntity, MJContentTypeAttributeSchema, MJContentTypeEntity, MJContentTypeSchema, MJConversationArtifactEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactPermissionSchema, MJConversationArtifactSchema, MJConversationArtifactVersionEntity, MJConversationArtifactVersionSchema, MJConversationDetailArtifactEntity, MJConversationDetailArtifactSchema, MJConversationDetailAttachmentEntity, MJConversationDetailAttachmentSchema, MJConversationDetailEntity, MJConversationDetailEntityExtended, MJConversationDetailRatingEntity, MJConversationDetailRatingSchema, MJConversationDetailSchema, MJConversationEntity, MJConversationSchema, MJCountryEntity, MJCountrySchema, MJCredentialCategoryEntity, MJCredentialCategorySchema, MJCredentialEntity, MJCredentialSchema, MJCredentialTypeEntity, MJCredentialTypeSchema, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryLinkSchema, MJDashboardCategoryPermissionEntity, MJDashboardCategoryPermissionSchema, MJDashboardCategorySchema, MJDashboardEntity, MJDashboardEntityExtended, MJDashboardPartTypeEntity, MJDashboardPartTypeSchema, MJDashboardPermissionEntity, MJDashboardPermissionEntityExtended, MJDashboardPermissionSchema, MJDashboardSchema, MJDashboardUserPreferenceEntity, MJDashboardUserPreferenceSchema, MJDashboardUserStateEntity, MJDashboardUserStateSchema, MJDataContextEntity, MJDataContextItemEntity, MJDataContextItemSchema, MJDataContextSchema, MJDatasetEntity, MJDatasetItemEntity, MJDatasetItemSchema, MJDatasetSchema, MJDuplicateRunDetailEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailMatchSchema, MJDuplicateRunDetailSchema, MJDuplicateRunEntity, MJDuplicateRunSchema, MJEmployeeCompanyIntegrationEntity, MJEmployeeCompanyIntegrationSchema, MJEmployeeEntity, MJEmployeeRoleEntity, MJEmployeeRoleSchema, MJEmployeeSchema, MJEmployeeSkillEntity, MJEmployeeSkillSchema, MJEncryptionAlgorithmEntity, MJEncryptionAlgorithmSchema, MJEncryptionKeyEntity, MJEncryptionKeySchema, MJEncryptionKeySourceEntity, MJEncryptionKeySourceSchema, MJEntityAIActionEntity, MJEntityAIActionSchema, MJEntityActionEntity, MJEntityActionFilterEntity, MJEntityActionFilterSchema, MJEntityActionInvocationEntity, MJEntityActionInvocationSchema, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationTypeSchema, MJEntityActionParamEntity, MJEntityActionParamSchema, MJEntityActionSchema, MJEntityCommunicationFieldEntity, MJEntityCommunicationFieldSchema, MJEntityCommunicationMessageTypeEntity, MJEntityCommunicationMessageTypeSchema, MJEntityDocumentEntity, MJEntityDocumentRunEntity, MJEntityDocumentRunSchema, MJEntityDocumentSchema, MJEntityDocumentSettingEntity, MJEntityDocumentSettingSchema, MJEntityDocumentTypeEntity, MJEntityDocumentTypeSchema, MJEntityEntity, MJEntityEntityExtended, MJEntityFieldEntity, MJEntityFieldEntityExtended, MJEntityFieldSchema, MJEntityFieldValueEntity, MJEntityFieldValueSchema, MJEntityOrganicKeyEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyRelatedEntitySchema, MJEntityOrganicKeySchema, MJEntityPermissionEntity, MJEntityPermissionSchema, MJEntityRecordDocumentEntity, MJEntityRecordDocumentSchema, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipDisplayComponentSchema, MJEntityRelationshipEntity, MJEntityRelationshipSchema, MJEntitySchema, MJEntitySettingEntity, MJEntitySettingSchema, MJEnvironmentEntity, MJEnvironmentEntityExtended, MJEnvironmentSchema, MJErrorLogEntity, MJErrorLogSchema, MJExplorerNavigationItemEntity, MJExplorerNavigationItemSchema, MJFileCategoryEntity, MJFileCategorySchema, MJFileEntity, MJFileEntityRecordLinkEntity, MJFileEntityRecordLinkSchema, MJFileSchema, MJFileStorageAccountEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountPermissionSchema, MJFileStorageAccountSchema, MJFileStorageProviderEntity, MJFileStorageProviderSchema, MJGeneratedCodeCategoryEntity, MJGeneratedCodeCategorySchema, MJGeneratedCodeEntity, MJGeneratedCodeSchema, MJInstanceConfigurationEntity, MJInstanceConfigurationSchema, MJIntegrationEntity, MJIntegrationObjectEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectFieldSchema, MJIntegrationObjectSchema, MJIntegrationSchema, MJIntegrationSourceTypeEntity, MJIntegrationSourceTypeSchema, MJIntegrationURLFormatEntity, MJIntegrationURLFormatSchema, MJKnowledgeHubSavedSearchEntity, MJKnowledgeHubSavedSearchSchema, MJLibraryEntity, MJLibraryItemEntity, MJLibraryItemSchema, MJLibrarySchema, MJListCategoryEntity, MJListCategorySchema, MJListDetailEntity, MJListDetailEntityExtended, MJListDetailSchema, MJListEntity, MJListInvitationEntity, MJListInvitationSchema, MJListSchema, MJListShareEntity, MJListShareSchema, MJMCPServerConnectionEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionPermissionSchema, MJMCPServerConnectionSchema, MJMCPServerConnectionToolEntity, MJMCPServerConnectionToolSchema, MJMCPServerEntity, MJMCPServerSchema, MJMCPServerToolEntity, MJMCPServerToolSchema, MJMCPToolExecutionLogEntity, MJMCPToolExecutionLogSchema, MJMCPToolFavoriteEntity, MJMCPToolFavoriteSchema, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthServerMetadataCacheSchema, MJOAuthAuthorizationStateEntity, MJOAuthAuthorizationStateSchema, MJOAuthClientRegistrationEntity, MJOAuthClientRegistrationSchema, MJOAuthTokenEntity, MJOAuthTokenSchema, MJOpenAppDependencyEntity, MJOpenAppDependencySchema, MJOpenAppEntity, MJOpenAppInstallHistoryEntity, MJOpenAppInstallHistorySchema, MJOpenAppSchema, MJOutputDeliveryTypeEntity, MJOutputDeliveryTypeSchema, MJOutputFormatTypeEntity, MJOutputFormatTypeSchema, MJOutputTriggerTypeEntity, MJOutputTriggerTypeSchema, MJPermissionDomainEntity, MJPermissionDomainSchema, MJProjectEntity, MJProjectSchema, MJPublicLinkEntity, MJPublicLinkSchema, MJQueryCategoryEntity, MJQueryCategorySchema, MJQueryDependencyEntity, MJQueryDependencySchema, MJQueryEntity, MJQueryEntityEntity, MJQueryEntitySchema, MJQueryFieldEntity, MJQueryFieldSchema, MJQueryParameterEntity, MJQueryParameterSchema, MJQueryPermissionEntity, MJQueryPermissionSchema, MJQuerySQLEntity, MJQuerySQLSchema, MJQuerySchema, MJQueueEntity, MJQueueSchema, MJQueueTaskEntity, MJQueueTaskSchema, MJQueueTypeEntity, MJQueueTypeSchema, MJRecommendationEntity, MJRecommendationItemEntity, MJRecommendationItemSchema, MJRecommendationProviderEntity, MJRecommendationProviderSchema, MJRecommendationRunEntity, MJRecommendationRunSchema, MJRecommendationSchema, MJRecordChangeEntity, MJRecordChangeReplayRunEntity, MJRecordChangeReplayRunSchema, MJRecordChangeSchema, MJRecordGeoCodeEntity, MJRecordGeoCodeSchema, MJRecordLinkEntity, MJRecordLinkSchema, MJRecordMergeDeletionLogEntity, MJRecordMergeDeletionLogSchema, MJRecordMergeLogEntity, MJRecordMergeLogSchema, MJReportCategoryEntity, MJReportCategorySchema, MJReportEntity, MJReportSchema, MJReportSnapshotEntity, MJReportSnapshotSchema, MJReportUserStateEntity, MJReportUserStateSchema, MJReportVersionEntity, MJReportVersionSchema, MJResourceLinkEntity, MJResourceLinkSchema, MJResourcePermissionEntity, MJResourcePermissionEntityExtended, MJResourcePermissionSchema, MJResourceTypeEntity, MJResourceTypeSchema, MJRoleEntity, MJRoleSchema, MJRowLevelSecurityFilterEntity, MJRowLevelSecurityFilterSchema, MJSQLDialectEntity, MJSQLDialectSchema, MJScheduledActionEntity, MJScheduledActionEntityExtended, MJScheduledActionParamEntity, MJScheduledActionParamSchema, MJScheduledActionSchema, MJScheduledJobEntity, MJScheduledJobRunEntity, MJScheduledJobRunSchema, MJScheduledJobSchema, MJScheduledJobTypeEntity, MJScheduledJobTypeSchema, MJSchemaInfoEntity, MJSchemaInfoSchema, MJSearchExecutionLogEntity, MJSearchExecutionLogSchema, MJSearchProviderEntity, MJSearchProviderSchema, MJSearchScopeEntity, MJSearchScopeEntityEntity, MJSearchScopeEntitySchema, MJSearchScopeExternalIndexEntity, MJSearchScopeExternalIndexSchema, MJSearchScopePermissionEntity, MJSearchScopePermissionSchema, MJSearchScopeProviderEntity, MJSearchScopeProviderSchema, MJSearchScopeSchema, MJSearchScopeStorageAccountEntity, MJSearchScopeStorageAccountSchema, MJSearchScopeTestQueryEntity, MJSearchScopeTestQuerySchema, MJSkillEntity, MJSkillSchema, MJStateProvinceEntity, MJStateProvinceSchema, MJTagAuditLogEntity, MJTagAuditLogSchema, MJTagCoOccurrenceEntity, MJTagCoOccurrenceSchema, MJTagEntity, MJTagSchema, MJTagScopeEntity, MJTagScopeSchema, MJTagSuggestionEntity, MJTagSuggestionSchema, MJTagSynonymEntity, MJTagSynonymSchema, MJTaggedItemEntity, MJTaggedItemSchema, MJTaskDependencyEntity, MJTaskDependencySchema, MJTaskEntity, MJTaskSchema, MJTaskTypeEntity, MJTaskTypeSchema, MJTemplateCategoryEntity, MJTemplateCategorySchema, MJTemplateContentEntity, MJTemplateContentSchema, MJTemplateContentTypeEntity, MJTemplateContentTypeSchema, MJTemplateEntity, MJTemplateEntityExtended, MJTemplateParamEntity, MJTemplateParamSchema, MJTemplateSchema, MJTestEntity, MJTestRubricEntity, MJTestRubricSchema, MJTestRunEntity, MJTestRunFeedbackEntity, MJTestRunFeedbackSchema, MJTestRunOutputEntity, MJTestRunOutputSchema, MJTestRunOutputTypeEntity, MJTestRunOutputTypeSchema, MJTestRunSchema, MJTestSchema, MJTestSuiteEntity, MJTestSuiteRunEntity, MJTestSuiteRunSchema, MJTestSuiteSchema, MJTestSuiteTestEntity, MJTestSuiteTestSchema, MJTestTypeEntity, MJTestTypeSchema, MJUserApplicationEntity, MJUserApplicationEntityEntity, MJUserApplicationEntitySchema, MJUserApplicationSchema, MJUserEntity, MJUserFavoriteEntity, MJUserFavoriteSchema, MJUserNotificationEntity, MJUserNotificationPreferenceEntity, MJUserNotificationPreferenceSchema, MJUserNotificationSchema, MJUserNotificationTypeEntity, MJUserNotificationTypeSchema, MJUserRecordLogEntity, MJUserRecordLogSchema, MJUserRoleEntity, MJUserRoleSchema, MJUserSchema, MJUserSettingEntity, MJUserSettingSchema, MJUserViewCategoryEntity, MJUserViewCategorySchema, MJUserViewEntity, MJUserViewEntityExtended, MJUserViewRunDetailEntity, MJUserViewRunDetailSchema, MJUserViewRunEntity, MJUserViewRunSchema, MJUserViewSchema, MJVectorDatabaseEntity, MJVectorDatabaseSchema, MJVectorIndexEntity, MJVectorIndexSchema, MJVersionInstallationEntity, MJVersionInstallationSchema, MJVersionLabelEntity, MJVersionLabelItemEntity, MJVersionLabelItemSchema, MJVersionLabelRestoreEntity, MJVersionLabelRestoreSchema, MJVersionLabelSchema, MJWorkflowEngineEntity, MJWorkflowEngineSchema, MJWorkflowEntity, MJWorkflowRunEntity, MJWorkflowRunSchema, MJWorkflowSchema, MJWorkspaceEntity, MJWorkspaceItemEntity, MJWorkspaceItemSchema, MJWorkspaceSchema, PERMISSION_DOMAIN_ICONS, PERMISSION_DOMAIN_ICON_FALLBACK, PermissionEngine, QueryEngine, QueryPermissionProvider, RegisterShareNotificationHandler, ResolveArtifactTypeByMime, ResourceData, ResourcePermissionEngine, ResourcePermissionProvider, ResourceTypeEngine, SearchEngineBase, TypeTablesCache, UserInfoEngine, UserViewEngine, ViewColumnInfo, ViewFilterInfo, ViewFilterLogicInfo, ViewGridState, ViewSortDirectionInfo, ViewSortInfo, assertCallerMayCreateShare, buildActionsSummary, checkShareManagePermission, dispatchShareNotificationAfterSave, loadModule, parseConversationDetailComplete
54377
54514
 
54378
54515
  // EXTERNAL MODULE: ../../MJCore/dist/index.js + 81 modules
54379
54516
  var dist = __webpack_require__(310);
@@ -58850,7 +58987,7 @@ function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, F
58850
58987
  * zod schema definition for the entity MJ: AI Agent Run Medias
58851
58988
  */var MJAIAgentRunMediaSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),AgentRunID:z.string().describe("\n * * Field Name: AgentRunID\n * * Display Name: Agent Run\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)"),SourcePromptRunMediaID:z.string().nullable().describe("\n * * Field Name: SourcePromptRunMediaID\n * * Display Name: Source Prompt Run Media\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Prompt Run Medias (vwAIPromptRunMedias.ID)"),ModalityID:z.string().describe("\n * * Field Name: ModalityID\n * * Display Name: Modality\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Modalities (vwAIModalities.ID)"),MimeType:z.string().describe("\n * * Field Name: MimeType\n * * Display Name: Mime Type\n * * SQL Data Type: nvarchar(100)"),FileName:z.string().nullable().describe("\n * * Field Name: FileName\n * * Display Name: File Name\n * * SQL Data Type: nvarchar(255)"),FileSizeBytes:z.number().nullable().describe("\n * * Field Name: FileSizeBytes\n * * Display Name: File Size Bytes\n * * SQL Data Type: int"),Width:z.number().nullable().describe("\n * * Field Name: Width\n * * Display Name: Width\n * * SQL Data Type: int"),Height:z.number().nullable().describe("\n * * Field Name: Height\n * * Display Name: Height\n * * SQL Data Type: int"),DurationSeconds:z.number().nullable().describe("\n * * Field Name: DurationSeconds\n * * Display Name: Duration Seconds\n * * SQL Data Type: decimal(10, 2)"),InlineData:z.string().nullable().describe("\n * * Field Name: InlineData\n * * Display Name: Inline Data\n * * SQL Data Type: nvarchar(MAX)"),FileID:z.string().nullable().describe("\n * * Field Name: FileID\n * * Display Name: File ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Files (vwFiles.ID)"),ThumbnailBase64:z.string().nullable().describe("\n * * Field Name: ThumbnailBase64\n * * Display Name: Thumbnail Base64\n * * SQL Data Type: nvarchar(MAX)"),Label:z.string().nullable().describe("\n * * Field Name: Label\n * * Display Name: Label\n * * SQL Data Type: nvarchar(255)"),Metadata:z.string().nullable().describe("\n * * Field Name: Metadata\n * * Display Name: Metadata\n * * SQL Data Type: nvarchar(MAX)"),DisplayOrder:z.number().describe("\n * * Field Name: DisplayOrder\n * * Display Name: Display Order\n * * SQL Data Type: int\n * * Default Value: 0"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Agent notes describing what this media represents. Used for internal tracking and can be displayed in UI."),AgentRun:z.string().nullable().describe("\n * * Field Name: AgentRun\n * * Display Name: Agent Run\n * * SQL Data Type: nvarchar(255)"),SourcePromptRunMedia:z.string().nullable().describe("\n * * Field Name: SourcePromptRunMedia\n * * Display Name: Source Prompt Run Media\n * * SQL Data Type: nvarchar(255)"),Modality:z.string().describe("\n * * Field Name: Modality\n * * Display Name: Modality\n * * SQL Data Type: nvarchar(50)"),File:z.string().nullable().describe("\n * * Field Name: File\n * * Display Name: File\n * * SQL Data Type: nvarchar(500)")});/**
58852
58989
  * zod schema definition for the entity MJ: AI Agent Run Steps
58853
- */var MJAIAgentRunStepSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()\n * * Description: Unique identifier for this execution step"),AgentRunID:z.string().describe("\n * * Field Name: AgentRunID\n * * Display Name: Agent Run\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)\n * * Description: Reference to the parent AIAgentRun that contains this step"),StepNumber:z.number().describe("\n * * Field Name: StepNumber\n * * Display Name: Step Number\n * * SQL Data Type: int\n * * Description: Sequential number of this step within the agent run, starting from 1"),StepType:z.union([z.literal('Actions'),z.literal('Chat'),z.literal('Decision'),z.literal('ForEach'),z.literal('Prompt'),z.literal('Sub-Agent'),z.literal('Validation'),z.literal('While')]).describe("\n * * Field Name: StepType\n * * Display Name: Step Type\n * * SQL Data Type: nvarchar(50)\n * * Default Value: Prompt\n * * Value List Type: List\n * * Possible Values \n * * Actions\n * * Chat\n * * Decision\n * * ForEach\n * * Prompt\n * * Sub-Agent\n * * Validation\n * * While\n * * Description: Type of execution step: Prompt, Actions, Sub-Agent, Decision, Chat, Validation"),StepName:z.string().describe("\n * * Field Name: StepName\n * * Display Name: Step Name\n * * SQL Data Type: nvarchar(255)\n * * Description: Human-readable name of what this step accomplishes"),TargetID:z.string().nullable().describe("\n * * Field Name: TargetID\n * * Display Name: Target\n * * SQL Data Type: uniqueidentifier\n * * Description: ID of the specific target being executed (AIPrompt.ID, AIAction.ID, AIAgent.ID, etc.). NULL for steps that don't target a specific entity."),Status:z.union([z.literal('Cancelled'),z.literal('Completed'),z.literal('Failed'),z.literal('Running')]).describe("\n * * Field Name: Status\n * * Display Name: Status\n * * SQL Data Type: nvarchar(50)\n * * Default Value: Running\n * * Value List Type: List\n * * Possible Values \n * * Cancelled\n * * Completed\n * * Failed\n * * Running\n * * Description: Current execution status of this step: Running, Completed, Failed, Cancelled"),StartedAt:z.date().describe("\n * * Field Name: StartedAt\n * * Display Name: Started At\n * * SQL Data Type: datetimeoffset\n * * Default Value: sysdatetimeoffset()\n * * Description: Timestamp when this step began execution"),CompletedAt:z.date().nullable().describe("\n * * Field Name: CompletedAt\n * * Display Name: Completed At\n * * SQL Data Type: datetimeoffset\n * * Description: Timestamp when this step completed. NULL while still running."),Success:z.boolean().nullable().describe("\n * * Field Name: Success\n * * Display Name: Success\n * * SQL Data Type: bit\n * * Description: Whether this step completed successfully. NULL while running, TRUE/FALSE when completed."),ErrorMessage:z.string().nullable().describe("\n * * Field Name: ErrorMessage\n * * Display Name: Error Message\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Error message if this step failed. NULL for successful steps."),InputData:z.string().nullable().describe("\n * * Field Name: InputData\n * * Display Name: Input Data\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialization of input data passed to this step for execution"),OutputData:z.string().nullable().describe("\n * * Field Name: OutputData\n * * Display Name: Output Data\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialization of the output data produced by this step"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),TargetLogID:z.string().nullable().describe("\n * * Field Name: TargetLogID\n * * Display Name: Target Log\n * * SQL Data Type: uniqueidentifier\n * * Description: ID of the execution log/run record created for this step (ActionExecutionLog.ID for action steps, AIAgentRun.ID for subagent steps, AIPromptRun.ID for prompt steps)"),PayloadAtStart:z.string().nullable().describe("\n * * Field Name: PayloadAtStart\n * * Display Name: Payload At Start\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialization of the Payload state at the start of this step"),PayloadAtEnd:z.string().nullable().describe("\n * * Field Name: PayloadAtEnd\n * * Display Name: Payload At End\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialization of the Payload state at the end of this step"),FinalPayloadValidationResult:z.union([z.literal('Fail'),z.literal('Fail'),z.literal('Pass'),z.literal('Pass'),z.literal('Retry'),z.literal('Retry'),z.literal('Warn'),z.literal('Warn')]).nullable().describe("\n * * Field Name: FinalPayloadValidationResult\n * * Display Name: Validation Result\n * * SQL Data Type: nvarchar(25)\n * * Value List Type: List\n * * Possible Values \n * * Fail\n * * Fail\n * * Pass\n * * Pass\n * * Retry\n * * Retry\n * * Warn\n * * Warn\n * * Description: Result of the final payload validation for this step. Pass indicates successful\nvalidation, Retry means validation failed but will retry, Fail means validation failed\npermanently, Warn means validation failed but execution continues."),FinalPayloadValidationMessages:z.string().nullable().describe("\n * * Field Name: FinalPayloadValidationMessages\n * * Display Name: Validation Messages\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Validation error messages or warnings from final payload validation. Contains\ndetailed information about what validation rules failed."),ParentID:z.string().nullable().describe("\n * * Field Name: ParentID\n * * Display Name: Parent Step\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Run Steps (vwAIAgentRunSteps.ID)\n * * Description: Optional reference to parent step for tracking hierarchical relationships like code->test->fix->code cycles"),Comments:z.string().nullable().describe("\n * * Field Name: Comments\n * * Display Name: Comments\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Human-readable notes and comments about this agent run step"),AgentRun:z.string().nullable().describe("\n * * Field Name: AgentRun\n * * Display Name: Agent Run\n * * SQL Data Type: nvarchar(255)"),Parent:z.string().nullable().describe("\n * * Field Name: Parent\n * * Display Name: Parent Step\n * * SQL Data Type: nvarchar(255)"),RootParentID:z.string().nullable().describe("\n * * Field Name: RootParentID\n * * Display Name: Root Parent Step\n * * SQL Data Type: uniqueidentifier")});/**
58990
+ */var MJAIAgentRunStepSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()\n * * Description: Unique identifier for this execution step"),AgentRunID:z.string().describe("\n * * Field Name: AgentRunID\n * * Display Name: Agent Run\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)\n * * Description: Reference to the parent AIAgentRun that contains this step"),StepNumber:z.number().describe("\n * * Field Name: StepNumber\n * * Display Name: Step Number\n * * SQL Data Type: int\n * * Description: Sequential number of this step within the agent run, starting from 1"),StepType:z.union([z.literal('Actions'),z.literal('Chat'),z.literal('Decision'),z.literal('ForEach'),z.literal('Prompt'),z.literal('Sub-Agent'),z.literal('Tool'),z.literal('Validation'),z.literal('While')]).describe("\n * * Field Name: StepType\n * * Display Name: Step Type\n * * SQL Data Type: nvarchar(50)\n * * Default Value: Prompt\n * * Value List Type: List\n * * Possible Values \n * * Actions\n * * Chat\n * * Decision\n * * ForEach\n * * Prompt\n * * Sub-Agent\n * * Tool\n * * Validation\n * * While\n * * Description: Type of execution step: Prompt, Actions, Sub-Agent, Decision, Chat, Validation, ForEach, While, Tool"),StepName:z.string().describe("\n * * Field Name: StepName\n * * Display Name: Step Name\n * * SQL Data Type: nvarchar(255)\n * * Description: Human-readable name of what this step accomplishes"),TargetID:z.string().nullable().describe("\n * * Field Name: TargetID\n * * Display Name: Target\n * * SQL Data Type: uniqueidentifier\n * * Description: ID of the specific target being executed (AIPrompt.ID, AIAction.ID, AIAgent.ID, etc.). NULL for steps that don't target a specific entity."),Status:z.union([z.literal('Cancelled'),z.literal('Completed'),z.literal('Failed'),z.literal('Running')]).describe("\n * * Field Name: Status\n * * Display Name: Status\n * * SQL Data Type: nvarchar(50)\n * * Default Value: Running\n * * Value List Type: List\n * * Possible Values \n * * Cancelled\n * * Completed\n * * Failed\n * * Running\n * * Description: Current execution status of this step: Running, Completed, Failed, Cancelled"),StartedAt:z.date().describe("\n * * Field Name: StartedAt\n * * Display Name: Started At\n * * SQL Data Type: datetimeoffset\n * * Default Value: sysdatetimeoffset()\n * * Description: Timestamp when this step began execution"),CompletedAt:z.date().nullable().describe("\n * * Field Name: CompletedAt\n * * Display Name: Completed At\n * * SQL Data Type: datetimeoffset\n * * Description: Timestamp when this step completed. NULL while still running."),Success:z.boolean().nullable().describe("\n * * Field Name: Success\n * * Display Name: Success\n * * SQL Data Type: bit\n * * Description: Whether this step completed successfully. NULL while running, TRUE/FALSE when completed."),ErrorMessage:z.string().nullable().describe("\n * * Field Name: ErrorMessage\n * * Display Name: Error Message\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Error message if this step failed. NULL for successful steps."),InputData:z.string().nullable().describe("\n * * Field Name: InputData\n * * Display Name: Input Data\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialization of input data passed to this step for execution"),OutputData:z.string().nullable().describe("\n * * Field Name: OutputData\n * * Display Name: Output Data\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialization of the output data produced by this step"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),TargetLogID:z.string().nullable().describe("\n * * Field Name: TargetLogID\n * * Display Name: Target Log\n * * SQL Data Type: uniqueidentifier\n * * Description: ID of the execution log/run record created for this step (ActionExecutionLog.ID for action steps, AIAgentRun.ID for subagent steps, AIPromptRun.ID for prompt steps)"),PayloadAtStart:z.string().nullable().describe("\n * * Field Name: PayloadAtStart\n * * Display Name: Payload At Start\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialization of the Payload state at the start of this step"),PayloadAtEnd:z.string().nullable().describe("\n * * Field Name: PayloadAtEnd\n * * Display Name: Payload At End\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialization of the Payload state at the end of this step"),FinalPayloadValidationResult:z.union([z.literal('Fail'),z.literal('Fail'),z.literal('Pass'),z.literal('Pass'),z.literal('Retry'),z.literal('Retry'),z.literal('Warn'),z.literal('Warn')]).nullable().describe("\n * * Field Name: FinalPayloadValidationResult\n * * Display Name: Validation Result\n * * SQL Data Type: nvarchar(25)\n * * Value List Type: List\n * * Possible Values \n * * Fail\n * * Fail\n * * Pass\n * * Pass\n * * Retry\n * * Retry\n * * Warn\n * * Warn\n * * Description: Result of the final payload validation for this step. Pass indicates successful\nvalidation, Retry means validation failed but will retry, Fail means validation failed\npermanently, Warn means validation failed but execution continues."),FinalPayloadValidationMessages:z.string().nullable().describe("\n * * Field Name: FinalPayloadValidationMessages\n * * Display Name: Validation Messages\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Validation error messages or warnings from final payload validation. Contains\ndetailed information about what validation rules failed."),ParentID:z.string().nullable().describe("\n * * Field Name: ParentID\n * * Display Name: Parent Step\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Run Steps (vwAIAgentRunSteps.ID)\n * * Description: Optional reference to parent step for tracking hierarchical relationships like code->test->fix->code cycles"),Comments:z.string().nullable().describe("\n * * Field Name: Comments\n * * Display Name: Comments\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Human-readable notes and comments about this agent run step"),AgentRun:z.string().nullable().describe("\n * * Field Name: AgentRun\n * * Display Name: Agent Run\n * * SQL Data Type: nvarchar(255)"),Parent:z.string().nullable().describe("\n * * Field Name: Parent\n * * Display Name: Parent Step\n * * SQL Data Type: nvarchar(255)"),RootParentID:z.string().nullable().describe("\n * * Field Name: RootParentID\n * * Display Name: Root Parent Step\n * * SQL Data Type: uniqueidentifier")});/**
58854
58991
  * zod schema definition for the entity MJ: AI Agent Runs
58855
58992
  */var MJAIAgentRunSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()\n * * Description: Unique identifier for this agent run"),AgentID:z.string().describe("\n * * Field Name: AgentID\n * * Display Name: Agent\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)\n * * Description: Reference to the AIAgent that is being executed in this run"),ParentRunID:z.string().nullable().describe("\n * * Field Name: ParentRunID\n * * Display Name: Parent Run\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)\n * * Description: Reference to the parent agent run if this is a sub-agent execution. NULL for root-level agent runs. Enables hierarchical execution tracking."),Status:z.union([z.literal('AwaitingFeedback'),z.literal('Cancelled'),z.literal('Completed'),z.literal('Failed'),z.literal('Paused'),z.literal('Running')]).describe("\n * * Field Name: Status\n * * Display Name: Status\n * * SQL Data Type: nvarchar(50)\n * * Default Value: Running\n * * Value List Type: List\n * * Possible Values \n * * AwaitingFeedback\n * * Cancelled\n * * Completed\n * * Failed\n * * Paused\n * * Running\n * * Description: Current status of the agent run. Running -> Completed/Failed/Cancelled"),StartedAt:z.date().describe("\n * * Field Name: StartedAt\n * * Display Name: Started At\n * * SQL Data Type: datetimeoffset\n * * Default Value: sysdatetimeoffset()\n * * Description: Timestamp when the agent run began execution"),CompletedAt:z.date().nullable().describe("\n * * Field Name: CompletedAt\n * * Display Name: Completed At\n * * SQL Data Type: datetimeoffset\n * * Description: Timestamp when the agent run completed (successfully or with failure). NULL while running."),Success:z.boolean().nullable().describe("\n * * Field Name: Success\n * * Display Name: Success\n * * SQL Data Type: bit\n * * Description: Indicates whether the agent run completed successfully. NULL while running, TRUE/FALSE when completed."),ErrorMessage:z.string().nullable().describe("\n * * Field Name: ErrorMessage\n * * Display Name: Error Message\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Error message if the agent run failed. NULL for successful runs."),ConversationID:z.string().nullable().describe("\n * * Field Name: ConversationID\n * * Display Name: Conversation\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)\n * * Description: Identifier linking multiple agent runs that are part of the same conversation or user session"),UserID:z.string().nullable().describe("\n * * Field Name: UserID\n * * Display Name: User\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Description: User context identifier for authentication and permissions during the agent run"),Result:z.string().nullable().describe("\n * * Field Name: Result\n * * Display Name: Result\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Final result or output from the agent execution, stored as JSON or text"),AgentState:z.string().nullable().describe("\n * * Field Name: AgentState\n * * Display Name: Agent State\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialization of the complete agent state, including conversation context, variables, and execution state. Enables pause/resume functionality."),TotalTokensUsed:z.number().nullable().describe("\n * * Field Name: TotalTokensUsed\n * * Display Name: Total Tokens Used\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: Total number of tokens consumed by all LLM calls during this agent run"),TotalCost:z.number().nullable().describe("\n * * Field Name: TotalCost\n * * Display Name: Total Cost\n * * SQL Data Type: decimal(18, 6)\n * * Default Value: 0.000000\n * * Description: Total estimated cost for all AI model usage during this agent run"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),TotalPromptTokensUsed:z.number().nullable().describe("\n * * Field Name: TotalPromptTokensUsed\n * * Display Name: Total Prompt Tokens Used\n * * SQL Data Type: int\n * * Description: Total number of prompt/input tokens used across all AIPromptRun executions during this agent run. This provides a breakdown of the TotalTokensUsed field to help analyze the ratio of input vs output tokens consumed by the agent."),TotalCompletionTokensUsed:z.number().nullable().describe("\n * * Field Name: TotalCompletionTokensUsed\n * * Display Name: Total Completion Tokens Used\n * * SQL Data Type: int\n * * Description: Total number of completion/output tokens generated across all AIPromptRun executions during this agent run. This provides a breakdown of the TotalTokensUsed field to help analyze the ratio of input vs output tokens consumed by the agent."),TotalTokensUsedRollup:z.number().nullable().describe("\n * * Field Name: TotalTokensUsedRollup\n * * Display Name: Total Tokens Used (Rollup)\n * * SQL Data Type: int\n * * Description: Total tokens used including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalTokensUsed. For parent agents, this includes the sum of all descendant agent tokens. Calculated as TotalPromptTokensUsedRollup + TotalCompletionTokensUsedRollup."),TotalPromptTokensUsedRollup:z.number().nullable().describe("\n * * Field Name: TotalPromptTokensUsedRollup\n * * Display Name: Total Prompt Tokens Used (Rollup)\n * * SQL Data Type: int\n * * Description: Total prompt/input tokens including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalPromptTokensUsed. For parent agents, this includes the sum of all descendant agent prompt tokens."),TotalCompletionTokensUsedRollup:z.number().nullable().describe("\n * * Field Name: TotalCompletionTokensUsedRollup\n * * Display Name: Total Completion Tokens Used (Rollup)\n * * SQL Data Type: int\n * * Description: Total completion/output tokens including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalCompletionTokensUsed. For parent agents, this includes the sum of all descendant agent completion tokens."),TotalCostRollup:z.number().nullable().describe("\n * * Field Name: TotalCostRollup\n * * Display Name: Total Cost (Rollup)\n * * SQL Data Type: decimal(19, 8)\n * * Description: Total cost including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalCost. For parent agents, this includes the sum of all descendant agent costs. Note: This assumes all costs are in the same currency for accurate rollup."),ConversationDetailID:z.string().nullable().describe("\n * * Field Name: ConversationDetailID\n * * Display Name: Conversation Detail\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Conversation Details (vwConversationDetails.ID)\n * * Description: Optional tracking of a specific conversation detail (e.g. a specific message) that spawned this agent run"),ConversationDetailSequence:z.number().nullable().describe("\n * * Field Name: ConversationDetailSequence\n * * Display Name: Conversation Detail Sequence\n * * SQL Data Type: int\n * * Description: If a conversation detail spawned multiple agent runs, tracks the order of their spawn/execution"),CancellationReason:z.union([z.literal('System'),z.literal('Timeout'),z.literal('User Request')]).nullable().describe("\n * * Field Name: CancellationReason\n * * Display Name: Cancellation Reason\n * * SQL Data Type: nvarchar(30)\n * * Value List Type: List\n * * Possible Values \n * * System\n * * Timeout\n * * User Request\n * * Description: Reason for cancellation if the agent run was cancelled"),FinalStep:z.union([z.literal('Actions'),z.literal('Chat'),z.literal('Failed'),z.literal('ForEach'),z.literal('Retry'),z.literal('Sub-Agent'),z.literal('Success'),z.literal('While')]).nullable().describe("\n * * Field Name: FinalStep\n * * Display Name: Final Step\n * * SQL Data Type: nvarchar(30)\n * * Value List Type: List\n * * Possible Values \n * * Actions\n * * Chat\n * * Failed\n * * ForEach\n * * Retry\n * * Sub-Agent\n * * Success\n * * While\n * * Description: The final step type that concluded the agent run"),FinalPayload:z.string().nullable().describe("\n * * Field Name: FinalPayload\n * * Display Name: Final Payload\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialization of the final Payload state at the end of the agent run"),Message:z.string().nullable().describe("\n * * Field Name: Message\n * * Display Name: Message\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Final message from the agent to the end user at the end of a run"),LastRunID:z.string().nullable().describe("\n * * Field Name: LastRunID\n * * Display Name: Last Run\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)\n * * Description: Links to the previous run in a chain. Different from ParentRunID which is for sub-agent hierarchy."),StartingPayload:z.string().nullable().describe("\n * * Field Name: StartingPayload\n * * Display Name: Starting Payload\n * * SQL Data Type: nvarchar(MAX)\n * * Description: The initial payload provided at the start of this run. Can be populated from the FinalPayload of the LastRun."),TotalPromptIterations:z.number().describe("\n * * Field Name: TotalPromptIterations\n * * Display Name: Total Prompt Iterations\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: Total number of prompt iterations executed during this agent run. Incremented\neach time the agent processes a prompt step."),ConfigurationID:z.string().nullable().describe("\n * * Field Name: ConfigurationID\n * * Display Name: Configuration\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Configurations (vwAIConfigurations.ID)\n * * Description: The AI Configuration used for this agent execution. When set, this configuration was used for all prompts executed by this agent and its sub-agents."),OverrideModelID:z.string().nullable().describe("\n * * Field Name: OverrideModelID\n * * Display Name: Override Model\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)\n * * Description: Runtime model override that was used for this execution. When set, this model took precedence over all other model selection methods."),OverrideVendorID:z.string().nullable().describe("\n * * Field Name: OverrideVendorID\n * * Display Name: Override Vendor\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Vendors (vwAIVendors.ID)\n * * Description: Runtime vendor override that was used for this execution. When set along with OverrideModelID, this vendor was used to provide the model."),Data:z.string().nullable().describe("\n * * Field Name: Data\n * * Display Name: Data\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON serialized data that was passed for template rendering and prompt execution. This data was passed to the agent's prompt as well as all sub-agents."),Verbose:z.boolean().nullable().describe("\n * * Field Name: Verbose\n * * Display Name: Verbose Logging\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: Indicates whether verbose logging was enabled during this agent execution. When true, detailed decision-making and execution flow was logged."),EffortLevel:z.number().nullable().describe("\n * * Field Name: EffortLevel\n * * Display Name: Effort Level\n * * SQL Data Type: int\n * * Description: Effort level that was actually used during this agent run execution (1-100, where 1=minimal effort, 100=maximum effort). This is the resolved effort level after applying the precedence hierarchy: runtime override > agent default > prompt defaults."),RunName:z.string().nullable().describe("\n * * Field Name: RunName\n * * Display Name: Run Name\n * * SQL Data Type: nvarchar(255)\n * * Description: Optional name for the agent run to help identify and tag runs for easier reference"),Comments:z.string().nullable().describe("\n * * Field Name: Comments\n * * Display Name: Comments\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Human-readable notes and comments about this agent run"),ScheduledJobRunID:z.string().nullable().describe("\n * * Field Name: ScheduledJobRunID\n * * Display Name: Scheduled Job Run\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Scheduled Job Runs (vwScheduledJobRuns.ID)\n * * Description: Links to the scheduled job run that triggered this agent execution. NULL for manually-triggered agent runs. Enables tracking which scheduled jobs spawned which agent executions."),TestRunID:z.string().nullable().describe("\n * * Field Name: TestRunID\n * * Display Name: Test Run\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Test Runs (vwTestRuns.ID)\n * * Description: Optional Foreign Key - Links this agent run to a test run if this execution was part of a test. Allows navigation from agent execution to test context."),PrimaryScopeEntityID:z.string().nullable().describe("\n * * Field Name: PrimaryScopeEntityID\n * * Display Name: Primary Scope Entity\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)\n * * Description: Foreign key to Entity table identifying which entity type is used for primary scoping (e.g., Organizations, Tenants)"),PrimaryScopeRecordID:z.string().nullable().describe("\n * * Field Name: PrimaryScopeRecordID\n * * Display Name: Primary Scope Record\n * * SQL Data Type: nvarchar(100)\n * * Description: The record ID within the primary scope entity (e.g., the specific OrganizationID). Indexed for fast multi-tenant filtering."),SecondaryScopes:z.string().nullable().describe("\n * * Field Name: SecondaryScopes\n * * Display Name: Secondary Scopes\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON object containing additional scope dimensions beyond the primary scope. Example: {\"ContactID\":\"abc-123\",\"TeamID\":\"team-456\"}"),ExternalReferenceID:z.string().nullable().describe("\n * * Field Name: ExternalReferenceID\n * * Display Name: External Reference ID\n * * SQL Data Type: nvarchar(200)\n * * Description: Optional reference ID from an external system that initiated this agent run. Enables correlation between the caller's agent run and this execution. For example, when Skip SaaS is called via SkipProxyAgent, this stores the MJ-side Agent Run ID."),CompanyID:z.string().nullable().describe("\n * * Field Name: CompanyID\n * * Display Name: Company ID\n * * SQL Data Type: uniqueidentifier\n * * Description: Optional company scope for multi-tenant memory. When populated, Memory Manager uses this to scope extracted notes to the company. Flows from ExecuteAgentParams.companyId at agent invocation time."),Agent:z.string().nullable().describe("\n * * Field Name: Agent\n * * Display Name: Agent Name\n * * SQL Data Type: nvarchar(255)"),ParentRun:z.string().nullable().describe("\n * * Field Name: ParentRun\n * * Display Name: Parent Run Name\n * * SQL Data Type: nvarchar(255)"),Conversation:z.string().nullable().describe("\n * * Field Name: Conversation\n * * Display Name: Conversation Name\n * * SQL Data Type: nvarchar(255)"),User:z.string().nullable().describe("\n * * Field Name: User\n * * Display Name: User Name\n * * SQL Data Type: nvarchar(100)"),ConversationDetail:z.string().nullable().describe("\n * * Field Name: ConversationDetail\n * * Display Name: Conversation Detail Name\n * * SQL Data Type: nvarchar(MAX)"),LastRun:z.string().nullable().describe("\n * * Field Name: LastRun\n * * Display Name: Last Run Name\n * * SQL Data Type: nvarchar(255)"),Configuration:z.string().nullable().describe("\n * * Field Name: Configuration\n * * Display Name: Configuration Name\n * * SQL Data Type: nvarchar(100)"),OverrideModel:z.string().nullable().describe("\n * * Field Name: OverrideModel\n * * Display Name: Override Model Name\n * * SQL Data Type: nvarchar(50)"),OverrideVendor:z.string().nullable().describe("\n * * Field Name: OverrideVendor\n * * Display Name: Override Vendor Name\n * * SQL Data Type: nvarchar(50)"),ScheduledJobRun:z.string().nullable().describe("\n * * Field Name: ScheduledJobRun\n * * Display Name: Scheduled Job Run Name\n * * SQL Data Type: nvarchar(200)"),TestRun:z.string().nullable().describe("\n * * Field Name: TestRun\n * * Display Name: Test Run Name\n * * SQL Data Type: nvarchar(255)"),PrimaryScopeEntity:z.string().nullable().describe("\n * * Field Name: PrimaryScopeEntity\n * * Display Name: Primary Scope Entity Name\n * * SQL Data Type: nvarchar(255)"),RootParentRunID:z.string().nullable().describe("\n * * Field Name: RootParentRunID\n * * Display Name: Root Parent Run\n * * SQL Data Type: uniqueidentifier"),RootLastRunID:z.string().nullable().describe("\n * * Field Name: RootLastRunID\n * * Display Name: Root Last Run\n * * SQL Data Type: uniqueidentifier")});/**
58856
58993
  * zod schema definition for the entity MJ: AI Agent Search Scopes
@@ -58862,7 +58999,7 @@ function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, F
58862
58999
  * zod schema definition for the entity MJ: AI Agent Types
58863
59000
  */var MJAIAgentTypeSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()\n * * Description: Unique identifier for the agent type"),Name:z.string().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(100)\n * * Description: Unique name of the agent type (e.g., \"Base\", \"CustomerSupport\", \"DataAnalysis\"). Used for programmatic identification and factory instantiation."),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Detailed description of the agent type, its purpose, and typical use cases"),SystemPromptID:z.string().nullable().describe("\n * * Field Name: SystemPromptID\n * * Display Name: System Prompt\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)\n * * Description: Reference to the AI Prompt that contains the system-level instructions for all agents of this type. This prompt will be blended with individual agent prompts."),IsActive:z.boolean().describe("\n * * Field Name: IsActive\n * * Display Name: Active\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: Indicates whether this agent type is available for use. Inactive types cannot be assigned to new agents."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),AgentPromptPlaceholder:z.string().nullable().describe("\n * * Field Name: AgentPromptPlaceholder\n * * Display Name: Agent Prompt Placeholder\n * * SQL Data Type: nvarchar(255)\n * * Description: The placeholder name used in the system prompt template where the agent prompt result should be injected. For example, if the system prompt contains \"{{ agentPrompt }}\", this field should contain \"agentPrompt\". This enables proper hierarchical prompt execution where the agent type's system prompt acts as the parent and the agent's specific prompt acts as the child."),DriverClass:z.string().nullable().describe("\n * * Field Name: DriverClass\n * * Display Name: Driver Class\n * * SQL Data Type: nvarchar(255)\n * * Description: The class name used by the MemberJunction class factory to instantiate the specific agent type implementation. For example, \"LoopAgentType\" for a looping agent pattern. If not specified, defaults to using the agent type Name for the DriverClass lookup key."),UIFormSectionKey:z.string().nullable().describe("\n * * Field Name: UIFormSectionKey\n * * Display Name: UI Form Section Key\n * * SQL Data Type: nvarchar(500)\n * * Description: Optional Angular component key name for a subclass of BaseFormSectionComponent that provides a custom form section for this agent type. When specified, this component will be dynamically loaded and displayed as the first expandable section in the AI Agent form. This allows agent types to have specialized UI elements. The class must be registered with the MemberJunction class factory via @RegisterClass"),UIFormKey:z.string().nullable().describe("\n * * Field Name: UIFormKey\n * * Display Name: UI Form Key\n * * SQL Data Type: nvarchar(500)\n * * Description: Optional Angular component key name for a subclass of BaseFormComponent that will completely overrides the default AI Agent form for this agent type. When specified, this component will be used instead of the standard AI Agent form, allowing for completely custom form implementations. The class must be registered with the MemberJunction class factory via @RegisterClass. If both UIFormClass and UIFormSectionClass are specified, UIFormClass takes precedence."),UIFormSectionExpandedByDefault:z.boolean().describe("\n * * Field Name: UIFormSectionExpandedByDefault\n * * Display Name: UI Form Section Expanded By Default\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: Determines whether the custom form section (specified by UIFormSectionClass) should be expanded by default when the AI Agent form loads. True means the section starts expanded, False means it starts collapsed. Only applies when UIFormSectionClass is specified. Defaults to 1 (expanded)."),PromptParamsSchema:z.string().nullable().describe("\n * * Field Name: PromptParamsSchema\n * * Display Name: Prompt Params Schema\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON Schema defining the available prompt parameters for this agent type. Includes property definitions with types, defaults, and descriptions. Used by agents of this type to customize which prompt sections are included in the system prompt. The schema follows JSON Schema draft-07 format."),AssignmentStrategy:z.string().nullable().describe("\n * * Field Name: AssignmentStrategy\n * * Display Name: Assignment Strategy\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON-serialized AgentRequestAssignmentStrategy defining the default assignment strategy for all agents of this type. Overridden by per-invocation or category-level strategies in the resolution chain."),DefaultStorageAccountID:z.string().nullable().describe("\n * * Field Name: DefaultStorageAccountID\n * * Display Name: Default Storage Account\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: File Storage Accounts (vwFileStorageAccounts.ID)\n * * Description: Default file storage account for agents of this type. Lowest priority in the resolution chain (Type \u2192 Category tree \u2192 Agent \u2192 Runtime override). When set, all agents of this type use this storage account unless overridden at a more specific level. FK to FileStorageAccount."),SystemPrompt:z.string().nullable().describe("\n * * Field Name: SystemPrompt\n * * Display Name: System Prompt\n * * SQL Data Type: nvarchar(255)"),DefaultStorageAccount:z.string().nullable().describe("\n * * Field Name: DefaultStorageAccount\n * * Display Name: Default Storage Account Name\n * * SQL Data Type: nvarchar(200)")});/**
58864
59001
  * zod schema definition for the entity MJ: AI Agents
58865
- */var MJAIAgentSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()\n * * Description: The unique identifier for each AI agent. Serves as the primary key."),Name:z.string().nullable().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(255)\n * * Description: The name of the AI agent."),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: A detailed description of the AI agent."),LogoURL:z.string().nullable().describe("\n * * Field Name: LogoURL\n * * Display Name: Logo URL\n * * SQL Data Type: nvarchar(255)\n * * Description: URL to an image file or base64 data URI (e.g., data:image/png;base64,...) for the agent logo. Takes precedence over IconClass in UI display."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ParentID:z.string().nullable().describe("\n * * Field Name: ParentID\n * * Display Name: Parent Agent\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)\n * * Description: References the parent agent in the hierarchical structure. If NULL, this is a root (top-level) agent."),ExposeAsAction:z.boolean().describe("\n * * Field Name: ExposeAsAction\n * * Display Name: Expose As Action\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: When true, this agent can be exposed as an action for use by other agents. Only valid for root agents."),ExecutionOrder:z.number().describe("\n * * Field Name: ExecutionOrder\n * * Display Name: Execution Order\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: The order in which this agent should be executed among its siblings under the same parent."),ExecutionMode:z.union([z.literal('Parallel'),z.literal('Sequential')]).describe("\n * * Field Name: ExecutionMode\n * * Display Name: Execution Mode\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Sequential\n * * Value List Type: List\n * * Possible Values \n * * Parallel\n * * Sequential\n * * Description: Controls how this agent's child agents are executed. Sequential runs children in order, Parallel runs them simultaneously."),EnableContextCompression:z.boolean().describe("\n * * Field Name: EnableContextCompression\n * * Display Name: Enable Context Compression\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: When true, enables automatic compression of conversation context when the message threshold is reached."),ContextCompressionMessageThreshold:z.number().nullable().describe("\n * * Field Name: ContextCompressionMessageThreshold\n * * Display Name: Message Threshold\n * * SQL Data Type: int\n * * Description: Number of messages that triggers context compression when EnableContextCompression is true."),ContextCompressionPromptID:z.string().nullable().describe("\n * * Field Name: ContextCompressionPromptID\n * * Display Name: Compression Prompt\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)"),ContextCompressionMessageRetentionCount:z.number().nullable().describe("\n * * Field Name: ContextCompressionMessageRetentionCount\n * * Display Name: Retention Count\n * * SQL Data Type: int\n * * Description: Number of recent messages to keep uncompressed when context compression is applied."),TypeID:z.string().nullable().describe("\n * * Field Name: TypeID\n * * Display Name: Agent Type\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Types (vwAIAgentTypes.ID)\n * * Description: Reference to the AIAgentType that defines the category and system-level behavior for this agent. Cannot be null."),Status:z.union([z.literal('Active'),z.literal('Disabled'),z.literal('Pending')]).describe("\n * * Field Name: Status\n * * Display Name: Status\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Pending\n * * Value List Type: List\n * * Possible Values \n * * Active\n * * Disabled\n * * Pending\n * * Description: Current status of the AI agent. Active agents can be executed, Disabled agents are inactive, and Pending agents are awaiting configuration or approval. Allowed values: Active, Disabled, Pending."),DriverClass:z.string().nullable().describe("\n * * Field Name: DriverClass\n * * Display Name: Driver Class\n * * SQL Data Type: nvarchar(255)\n * * Description: Optional override for the class name used by the MemberJunction class factory to instantiate this specific agent. If specified, this overrides the agent type's DriverClass. Useful for specialized agent implementations."),IconClass:z.string().nullable().describe("\n * * Field Name: IconClass\n * * Display Name: Icon Class\n * * SQL Data Type: nvarchar(100)\n * * Description: Font Awesome icon class (e.g., fa-robot, fa-brain) for the agent. Used as fallback when LogoURL is not set or fails to load."),ModelSelectionMode:z.union([z.literal('Agent'),z.literal('Agent Type')]).describe("\n * * Field Name: ModelSelectionMode\n * * Display Name: Model Selection Mode\n * * SQL Data Type: nvarchar(50)\n * * Default Value: Agent Type\n * * Value List Type: List\n * * Possible Values \n * * Agent\n * * Agent Type\n * * Description: Controls whether model selection is driven by the Agent Type's system prompt or the Agent's specific prompt. Default is Agent Type for backward compatibility."),PayloadDownstreamPaths:z.string().describe("\n * * Field Name: PayloadDownstreamPaths\n * * Display Name: Downstream Paths\n * * SQL Data Type: nvarchar(MAX)\n * * Default Value: [\"*\"]\n * * Description: JSON array of paths that define which parts of the payload should be sent downstream to sub-agents. Use [\"*\"] to send entire payload, or specify paths like [\"customer.id\", \"campaign.*\", \"analysis.sentiment\"]"),PayloadUpstreamPaths:z.string().describe("\n * * Field Name: PayloadUpstreamPaths\n * * Display Name: Upstream Paths\n * * SQL Data Type: nvarchar(MAX)\n * * Default Value: [\"*\"]\n * * Description: JSON array of paths that define which parts of the payload sub-agents are allowed to write back upstream. Use [\"*\"] to allow all writes, or specify paths like [\"analysis.results\", \"recommendations.*\"]"),PayloadSelfReadPaths:z.string().nullable().describe("\n * * Field Name: PayloadSelfReadPaths\n * * Display Name: Self Read Paths\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can read. Controls downstream data \nflow when the agent executes its own prompt step."),PayloadSelfWritePaths:z.string().nullable().describe("\n * * Field Name: PayloadSelfWritePaths\n * * Display Name: Self Write Paths\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can write back. Controls upstream \ndata flow when the agent executes its own prompt step."),PayloadScope:z.string().nullable().describe("\n * * Field Name: PayloadScope\n * * Display Name: Payload Scope\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Defines the scope/path within the parent payload that this sub-agent operates on. When set, the sub-agent receives only this portion of the payload and all change requests are relative to this scope. Format: /path/to/scope (e.g. /PropA/SubProp1)"),FinalPayloadValidation:z.string().nullable().describe("\n * * Field Name: FinalPayloadValidation\n * * Display Name: Final Payload Validation\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Optional JSON schema or requirements that define the expected structure and content of the agent's final payload. Used to validate the output when the agent declares success. Similar to OutputExample in AI Prompts."),FinalPayloadValidationMode:z.union([z.literal('Fail'),z.literal('Retry'),z.literal('Warn')]).describe("\n * * Field Name: FinalPayloadValidationMode\n * * Display Name: Final Validation Mode\n * * SQL Data Type: nvarchar(25)\n * * Default Value: Retry\n * * Value List Type: List\n * * Possible Values \n * * Fail\n * * Retry\n * * Warn\n * * Description: Determines how to handle validation failures when FinalPayloadValidation is specified. Options: Retry (default) - retry the agent with validation feedback, Fail - fail the agent run immediately, Warn - log a warning but allow success."),FinalPayloadValidationMaxRetries:z.number().describe("\n * * Field Name: FinalPayloadValidationMaxRetries\n * * Display Name: Max Validation Retries\n * * SQL Data Type: int\n * * Default Value: 3\n * * Description: Maximum number of retry attempts allowed when FinalPayloadValidation fails with\nRetry mode. After reaching this limit, the validation will fail permanently."),MaxCostPerRun:z.number().nullable().describe("\n * * Field Name: MaxCostPerRun\n * * Display Name: Max Cost Per Run\n * * SQL Data Type: decimal(10, 4)\n * * Description: Maximum cost in dollars allowed for a single agent run. Run will be terminated\nif this limit is exceeded."),MaxTokensPerRun:z.number().nullable().describe("\n * * Field Name: MaxTokensPerRun\n * * Display Name: Max Tokens Per Run\n * * SQL Data Type: int\n * * Description: Maximum total tokens (input + output) allowed for a single agent run. Run will\nbe terminated if this limit is exceeded."),MaxIterationsPerRun:z.number().nullable().describe("\n * * Field Name: MaxIterationsPerRun\n * * Display Name: Max Iterations Per Run\n * * SQL Data Type: int\n * * Description: Maximum number of prompt iterations allowed for a single agent run. Run will be\nterminated if this limit is exceeded."),MaxTimePerRun:z.number().nullable().describe("\n * * Field Name: MaxTimePerRun\n * * Display Name: Max Time Per Run\n * * SQL Data Type: int\n * * Description: Maximum time in seconds allowed for a single agent run. Run will be terminated\nif this limit is exceeded."),MinExecutionsPerRun:z.number().nullable().describe("\n * * Field Name: MinExecutionsPerRun\n * * Display Name: Min Executions Per Run\n * * SQL Data Type: int\n * * Description: When acting as a sub-agent, minimum number of times this agent must be executed per parent agent run"),MaxExecutionsPerRun:z.number().nullable().describe("\n * * Field Name: MaxExecutionsPerRun\n * * Display Name: Max Executions Per Run\n * * SQL Data Type: int\n * * Description: When acting as a sub-agent, maximum number of times this agent can be executed per parent agent run"),StartingPayloadValidation:z.string().nullable().describe("\n * * Field Name: StartingPayloadValidation\n * * Display Name: Starting Payload Validation\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Optional JSON schema validation to apply to the input payload before agent execution begins. Uses the same JSONValidator format as FinalPayloadValidation."),StartingPayloadValidationMode:z.union([z.literal('Fail'),z.literal('Warn')]).describe("\n * * Field Name: StartingPayloadValidationMode\n * * Display Name: Starting Validation Mode\n * * SQL Data Type: nvarchar(25)\n * * Default Value: Fail\n * * Value List Type: List\n * * Possible Values \n * * Fail\n * * Warn\n * * Description: Determines how to handle StartingPayloadValidation failures. Fail = reject invalid input, Warn = log warning but proceed."),DefaultPromptEffortLevel:z.number().nullable().describe("\n * * Field Name: DefaultPromptEffortLevel\n * * Display Name: Default Effort Level\n * * SQL Data Type: int\n * * Description: Default effort level for all prompts executed by this agent (1-100, where 1=minimal effort, 100=maximum effort). Takes precedence over individual prompt EffortLevel settings but can be overridden by runtime parameters. Inherited by sub-agents unless explicitly overridden."),ChatHandlingOption:z.union([z.literal('Failed'),z.literal('Retry'),z.literal('Success')]).nullable().describe("\n * * Field Name: ChatHandlingOption\n * * Display Name: Chat Handling Option\n * * SQL Data Type: nvarchar(30)\n * * Value List Type: List\n * * Possible Values \n * * Failed\n * * Retry\n * * Success\n * * Description: Controls how Chat next steps are handled. When null (default), Chat propagates to caller. When set to Success, Failed, or Retry, Chat steps are remapped to that value and re-validated."),DefaultArtifactTypeID:z.string().nullable().describe("\n * * Field Name: DefaultArtifactTypeID\n * * Display Name: Default Artifact Type\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Types (vwArtifactTypes.ID)\n * * Description: Default artifact type produced by this agent. This is the primary artifact type; additional artifact types can be linked via AIAgentArtifactType junction table. Can be NULL if agent does not produce artifacts by default."),OwnerUserID:z.string().describe("\n * * Field Name: OwnerUserID\n * * Display Name: Owner\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Default Value: ECAFCCEC-6A37-EF11-86D4-000D3A4E707E\n * * Description: The user who owns and created this AI agent. Automatically set to the current user if not specified. Owner has full permissions (view, run, edit, delete) regardless of ACL entries."),InvocationMode:z.union([z.literal('Any'),z.literal('Sub-Agent'),z.literal('Top-Level')]).describe("\n * * Field Name: InvocationMode\n * * Display Name: Invocation Mode\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Any\n * * Value List Type: List\n * * Possible Values \n * * Any\n * * Sub-Agent\n * * Top-Level\n * * Description: Controls how the agent can be invoked: Any (default - can be top-level or sub-agent), Top-Level (only callable as primary agent), Sub-Agent (only callable as sub-agent). Used to filter available agents in tools like Sage."),ArtifactCreationMode:z.union([z.literal('Always'),z.literal('Never'),z.literal('System Only')]).describe("\n * * Field Name: ArtifactCreationMode\n * * Display Name: Artifact Creation Mode\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Always\n * * Value List Type: List\n * * Possible Values \n * * Always\n * * Never\n * * System Only\n * * Description: Controls how artifacts are created from this agent's payloads. \"Always\" creates visible artifacts, \"Never\" skips artifact creation, \"System Only\" creates hidden system artifacts."),FunctionalRequirements:z.string().nullable().describe("\n * * Field Name: FunctionalRequirements\n * * Display Name: Functional Requirements\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Detailed markdown formatted requirements that explain the business goals of the agent without specific technical implementation details."),TechnicalDesign:z.string().nullable().describe("\n * * Field Name: TechnicalDesign\n * * Display Name: Technical Design\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Detailed markdown that explains the structure of the agent including agent architecture, actions, sub-agents, prompts, and payload structure."),InjectNotes:z.boolean().describe("\n * * Field Name: InjectNotes\n * * Display Name: Inject Notes\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: When enabled, agent notes will be automatically injected into the agent context based on scoping rules."),MaxNotesToInject:z.number().describe("\n * * Field Name: MaxNotesToInject\n * * Display Name: Max Notes to Inject\n * * SQL Data Type: int\n * * Default Value: 5\n * * Description: Maximum number of notes to inject into agent context per request."),NoteInjectionStrategy:z.union([z.literal('All'),z.literal('Recent'),z.literal('Relevant')]).describe("\n * * Field Name: NoteInjectionStrategy\n * * Display Name: Note Injection Strategy\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Relevant\n * * Value List Type: List\n * * Possible Values \n * * All\n * * Recent\n * * Relevant\n * * Description: Strategy for selecting which notes to inject: Relevant (semantic search), Recent (most recent first), or All (up to max limit)."),InjectExamples:z.boolean().describe("\n * * Field Name: InjectExamples\n * * Display Name: Inject Examples\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: When enabled, agent examples will be automatically injected into the agent context based on scoping rules."),MaxExamplesToInject:z.number().describe("\n * * Field Name: MaxExamplesToInject\n * * Display Name: Max Examples to Inject\n * * SQL Data Type: int\n * * Default Value: 3\n * * Description: Maximum number of examples to inject into agent context per request."),ExampleInjectionStrategy:z.union([z.literal('Rated'),z.literal('Recent'),z.literal('Semantic')]).describe("\n * * Field Name: ExampleInjectionStrategy\n * * Display Name: Example Injection Strategy\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Semantic\n * * Value List Type: List\n * * Possible Values \n * * Rated\n * * Recent\n * * Semantic\n * * Description: Strategy for selecting which examples to inject: Semantic (vector similarity), Recent (most recent first), or Rated (highest success score first)."),IsRestricted:z.boolean().describe("\n * * Field Name: IsRestricted\n * * Display Name: Is Restricted\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: When true, agent is restricted to system/scheduled use only and hidden from user selection, Agent Manager, and MCP/A2A discovery."),MessageMode:z.union([z.literal('All'),z.literal('Bookend'),z.literal('Latest'),z.literal('None')]).describe("\n * * Field Name: MessageMode\n * * Display Name: Message Mode\n * * SQL Data Type: nvarchar(50)\n * * Default Value: None\n * * Value List Type: List\n * * Possible Values \n * * All\n * * Bookend\n * * Latest\n * * None\n * * Description: Specifies how conversation messages are passed from parent agent to this child sub-agent (when this agent is a child via ParentID). Valid values: 'None' (fresh start - only context and task message, default), 'All' (all parent conversation history), 'Latest' (most recent MaxMessages messages), 'Bookend' (first 2 messages + most recent MaxMessages-2 messages with indicator between). Stored on child agent because each child has only one parent relationship."),MaxMessages:z.number().nullable().describe("\n * * Field Name: MaxMessages\n * * Display Name: Max Messages\n * * SQL Data Type: int\n * * Description: Maximum number of conversation messages to include when MessageMode is 'Latest' or 'Bookend'. NULL means no limit (ignored for 'None' and 'All' modes). Must be greater than 0 if specified. For 'Latest': keeps most recent N messages. For 'Bookend': keeps first 2 + most recent (N-2) messages."),AttachmentStorageProviderID:z.string().nullable().describe("\n * * Field Name: AttachmentStorageProviderID\n * * Display Name: Storage Provider\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: File Storage Providers (vwFileStorageProviders.ID)\n * * Description: File storage provider for large attachments. Overrides the default from AIConfiguration. NULL uses system default."),AttachmentRootPath:z.string().nullable().describe("\n * * Field Name: AttachmentRootPath\n * * Display Name: Root Path\n * * SQL Data Type: nvarchar(500)\n * * Description: Base path within the storage provider for this agent's attachments. Agent run ID and sequence number are appended to create unique paths. Format: /folder/subfolder"),InlineStorageThresholdBytes:z.number().nullable().describe("\n * * Field Name: InlineStorageThresholdBytes\n * * Display Name: Inline Storage Threshold\n * * SQL Data Type: int\n * * Description: File size threshold for inline storage. Files <= this size are stored as base64 inline, larger files use MJStorage. NULL uses system default (1MB). Set to 0 to always use MJStorage."),AgentTypePromptParams:z.string().nullable().describe("\n * * Field Name: AgentTypePromptParams\n * * Display Name: Prompt Parameters\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON object containing parameter values that customize how this agent's type-level system prompt is rendered. The schema is defined by the agent type's PromptParamsSchema field. Allows per-agent control over which prompt sections are included, enabling token savings by excluding unused documentation."),ScopeConfig:z.string().nullable().describe("\n * * Field Name: ScopeConfig\n * * Display Name: Scope Configuration\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON configuration defining scope dimensions for multi-tenant deployments. Example: {\"dimensions\":[{\"name\":\"OrganizationID\",\"entityId\":\"...\",\"isPrimary\":true,\"required\":true},{\"name\":\"ContactID\",\"entityId\":\"...\",\"isPrimary\":false,\"required\":false}],\"inheritanceMode\":\"cascading\"}"),NoteRetentionDays:z.number().nullable().describe("\n * * Field Name: NoteRetentionDays\n * * Display Name: Note Retention Days\n * * SQL Data Type: int\n * * Default Value: 90\n * * Description: Number of days to retain notes before archiving due to inactivity. Default 90. NULL means use system default."),ExampleRetentionDays:z.number().nullable().describe("\n * * Field Name: ExampleRetentionDays\n * * Display Name: Example Retention Days\n * * SQL Data Type: int\n * * Default Value: 180\n * * Description: Number of days to retain examples before archiving due to inactivity. Default 180. NULL means use system default."),AutoArchiveEnabled:z.boolean().describe("\n * * Field Name: AutoArchiveEnabled\n * * Display Name: Auto Archive Enabled\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: Whether automatic archival of stale notes/examples is enabled for this agent. Default true."),RerankerConfiguration:z.string().nullable().describe("\n * * Field Name: RerankerConfiguration\n * * Display Name: Reranker Configuration\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON configuration for optional reranking of retrieved memory items. Schema: { enabled: boolean, rerankerModelId: string, retrievalMultiplier: number (default 3), minRelevanceThreshold: number (default 0.5), rerankPromptId?: string, contextFields?: string[], fallbackOnError: boolean (default true) }. When null or disabled, vector search results are used directly without reranking."),CategoryID:z.string().nullable().describe("\n * * Field Name: CategoryID\n * * Display Name: Category\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Categories (vwAIAgentCategories.ID)\n * * Description: Foreign key to AIAgentCategory. Assigns this agent to an organizational category for grouping, filtering, and inherited assignment strategy resolution."),AllowEphemeralClientTools:z.boolean().describe("\n * * Field Name: AllowEphemeralClientTools\n * * Display Name: Allow Ephemeral Tools\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: When true (default), this agent accepts runtime-registered ephemeral client tools that are not defined in metadata. Set to false for agents that require strict tool governance."),DefaultStorageAccountID:z.string().nullable().describe("\n * * Field Name: DefaultStorageAccountID\n * * Display Name: Default Storage Account\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: File Storage Accounts (vwFileStorageAccounts.ID)\n * * Description: Default file storage account for this specific agent. Overrides both Type-level and Category-level defaults. Can be further overridden at runtime via ExecuteAgentParams.override.storageAccountId. FK to FileStorageAccount."),SearchScopeAccess:z.union([z.literal('All'),z.literal('Assigned'),z.literal('None')]).describe("\n * * Field Name: SearchScopeAccess\n * * Display Name: Search Scope Access\n * * SQL Data Type: nvarchar(20)\n * * Default Value: None\n * * Value List Type: List\n * * Possible Values \n * * All\n * * Assigned\n * * None\n * * Description: Controls the agent's search capability. All = may use any scope including Global; search action does not restrict. Assigned = may use ONLY scopes explicitly linked via AIAgentSearchScope; scoped search action enforces this. None = agent has no search capability; the scoped search action rejects all requests."),Parent:z.string().nullable().describe("\n * * Field Name: Parent\n * * Display Name: Parent Name\n * * SQL Data Type: nvarchar(255)"),ContextCompressionPrompt:z.string().nullable().describe("\n * * Field Name: ContextCompressionPrompt\n * * Display Name: Compression Prompt Name\n * * SQL Data Type: nvarchar(255)"),Type:z.string().nullable().describe("\n * * Field Name: Type\n * * Display Name: Type Name\n * * SQL Data Type: nvarchar(100)"),DefaultArtifactType:z.string().nullable().describe("\n * * Field Name: DefaultArtifactType\n * * Display Name: Default Artifact Type Name\n * * SQL Data Type: nvarchar(100)"),OwnerUser:z.string().describe("\n * * Field Name: OwnerUser\n * * Display Name: Owner Name\n * * SQL Data Type: nvarchar(100)"),AttachmentStorageProvider:z.string().nullable().describe("\n * * Field Name: AttachmentStorageProvider\n * * Display Name: Storage Provider Name\n * * SQL Data Type: nvarchar(50)"),Category:z.string().nullable().describe("\n * * Field Name: Category\n * * Display Name: Category Name\n * * SQL Data Type: nvarchar(200)"),DefaultStorageAccount:z.string().nullable().describe("\n * * Field Name: DefaultStorageAccount\n * * Display Name: Default Storage Account Name\n * * SQL Data Type: nvarchar(200)"),RootParentID:z.string().nullable().describe("\n * * Field Name: RootParentID\n * * Display Name: Root Parent\n * * SQL Data Type: uniqueidentifier")});/**
59002
+ */var MJAIAgentSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()\n * * Description: The unique identifier for each AI agent. Serves as the primary key."),Name:z.string().nullable().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(255)\n * * Description: The name of the AI agent."),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: A detailed description of the AI agent."),LogoURL:z.string().nullable().describe("\n * * Field Name: LogoURL\n * * Display Name: Logo URL\n * * SQL Data Type: nvarchar(255)\n * * Description: URL to an image file or base64 data URI (e.g., data:image/png;base64,...) for the agent logo. Takes precedence over IconClass in UI display."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ParentID:z.string().nullable().describe("\n * * Field Name: ParentID\n * * Display Name: Parent Agent\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)\n * * Description: References the parent agent in the hierarchical structure. If NULL, this is a root (top-level) agent."),ExposeAsAction:z.boolean().describe("\n * * Field Name: ExposeAsAction\n * * Display Name: Expose As Action\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: When true, this agent can be exposed as an action for use by other agents. Only valid for root agents."),ExecutionOrder:z.number().describe("\n * * Field Name: ExecutionOrder\n * * Display Name: Execution Order\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: The order in which this agent should be executed among its siblings under the same parent."),ExecutionMode:z.union([z.literal('Parallel'),z.literal('Sequential')]).describe("\n * * Field Name: ExecutionMode\n * * Display Name: Execution Mode\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Sequential\n * * Value List Type: List\n * * Possible Values \n * * Parallel\n * * Sequential\n * * Description: Controls how this agent's child agents are executed. Sequential runs children in order, Parallel runs them simultaneously."),EnableContextCompression:z.boolean().describe("\n * * Field Name: EnableContextCompression\n * * Display Name: Enable Context Compression\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: When true, enables automatic compression of conversation context when the message threshold is reached."),ContextCompressionMessageThreshold:z.number().nullable().describe("\n * * Field Name: ContextCompressionMessageThreshold\n * * Display Name: Compression Message Threshold\n * * SQL Data Type: int\n * * Description: Number of messages that triggers context compression when EnableContextCompression is true."),ContextCompressionPromptID:z.string().nullable().describe("\n * * Field Name: ContextCompressionPromptID\n * * Display Name: Compression Prompt\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)"),ContextCompressionMessageRetentionCount:z.number().nullable().describe("\n * * Field Name: ContextCompressionMessageRetentionCount\n * * Display Name: Compression Retention Count\n * * SQL Data Type: int\n * * Description: Number of recent messages to keep uncompressed when context compression is applied."),TypeID:z.string().nullable().describe("\n * * Field Name: TypeID\n * * Display Name: Agent Type\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Types (vwAIAgentTypes.ID)\n * * Description: Reference to the AIAgentType that defines the category and system-level behavior for this agent. Cannot be null."),Status:z.union([z.literal('Active'),z.literal('Disabled'),z.literal('Pending')]).describe("\n * * Field Name: Status\n * * Display Name: Status\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Pending\n * * Value List Type: List\n * * Possible Values \n * * Active\n * * Disabled\n * * Pending\n * * Description: Current status of the AI agent. Active agents can be executed, Disabled agents are inactive, and Pending agents are awaiting configuration or approval. Allowed values: Active, Disabled, Pending."),DriverClass:z.string().nullable().describe("\n * * Field Name: DriverClass\n * * Display Name: Driver Class\n * * SQL Data Type: nvarchar(255)\n * * Description: Optional override for the class name used by the MemberJunction class factory to instantiate this specific agent. If specified, this overrides the agent type's DriverClass. Useful for specialized agent implementations."),IconClass:z.string().nullable().describe("\n * * Field Name: IconClass\n * * Display Name: Icon Class\n * * SQL Data Type: nvarchar(100)\n * * Description: Font Awesome icon class (e.g., fa-robot, fa-brain) for the agent. Used as fallback when LogoURL is not set or fails to load."),ModelSelectionMode:z.union([z.literal('Agent'),z.literal('Agent Type')]).describe("\n * * Field Name: ModelSelectionMode\n * * Display Name: Model Selection Mode\n * * SQL Data Type: nvarchar(50)\n * * Default Value: Agent Type\n * * Value List Type: List\n * * Possible Values \n * * Agent\n * * Agent Type\n * * Description: Controls whether model selection is driven by the Agent Type's system prompt or the Agent's specific prompt. Default is Agent Type for backward compatibility."),PayloadDownstreamPaths:z.string().describe("\n * * Field Name: PayloadDownstreamPaths\n * * Display Name: Payload Downstream Paths\n * * SQL Data Type: nvarchar(MAX)\n * * Default Value: [\"*\"]\n * * Description: JSON array of paths that define which parts of the payload should be sent downstream to sub-agents. Use [\"*\"] to send entire payload, or specify paths like [\"customer.id\", \"campaign.*\", \"analysis.sentiment\"]"),PayloadUpstreamPaths:z.string().describe("\n * * Field Name: PayloadUpstreamPaths\n * * Display Name: Payload Upstream Paths\n * * SQL Data Type: nvarchar(MAX)\n * * Default Value: [\"*\"]\n * * Description: JSON array of paths that define which parts of the payload sub-agents are allowed to write back upstream. Use [\"*\"] to allow all writes, or specify paths like [\"analysis.results\", \"recommendations.*\"]"),PayloadSelfReadPaths:z.string().nullable().describe("\n * * Field Name: PayloadSelfReadPaths\n * * Display Name: Payload Self Read Paths\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can read. Controls downstream data \nflow when the agent executes its own prompt step."),PayloadSelfWritePaths:z.string().nullable().describe("\n * * Field Name: PayloadSelfWritePaths\n * * Display Name: Payload Self Write Paths\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can write back. Controls upstream \ndata flow when the agent executes its own prompt step."),PayloadScope:z.string().nullable().describe("\n * * Field Name: PayloadScope\n * * Display Name: Payload Scope\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Defines the scope/path within the parent payload that this sub-agent operates on. When set, the sub-agent receives only this portion of the payload and all change requests are relative to this scope. Format: /path/to/scope (e.g. /PropA/SubProp1)"),FinalPayloadValidation:z.string().nullable().describe("\n * * Field Name: FinalPayloadValidation\n * * Display Name: Final Payload Validation\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Optional JSON schema or requirements that define the expected structure and content of the agent's final payload. Used to validate the output when the agent declares success. Similar to OutputExample in AI Prompts."),FinalPayloadValidationMode:z.union([z.literal('Fail'),z.literal('Retry'),z.literal('Warn')]).describe("\n * * Field Name: FinalPayloadValidationMode\n * * Display Name: Final Payload Validation Mode\n * * SQL Data Type: nvarchar(25)\n * * Default Value: Retry\n * * Value List Type: List\n * * Possible Values \n * * Fail\n * * Retry\n * * Warn\n * * Description: Determines how to handle validation failures when FinalPayloadValidation is specified. Options: Retry (default) - retry the agent with validation feedback, Fail - fail the agent run immediately, Warn - log a warning but allow success."),FinalPayloadValidationMaxRetries:z.number().describe("\n * * Field Name: FinalPayloadValidationMaxRetries\n * * Display Name: Final Payload Validation Max Retries\n * * SQL Data Type: int\n * * Default Value: 3\n * * Description: Maximum number of retry attempts allowed when FinalPayloadValidation fails with\nRetry mode. After reaching this limit, the validation will fail permanently."),MaxCostPerRun:z.number().nullable().describe("\n * * Field Name: MaxCostPerRun\n * * Display Name: Max Cost Per Run\n * * SQL Data Type: decimal(10, 4)\n * * Description: Maximum cost in dollars allowed for a single agent run. Run will be terminated\nif this limit is exceeded."),MaxTokensPerRun:z.number().nullable().describe("\n * * Field Name: MaxTokensPerRun\n * * Display Name: Max Tokens Per Run\n * * SQL Data Type: int\n * * Description: Maximum total tokens (input + output) allowed for a single agent run. Run will\nbe terminated if this limit is exceeded."),MaxIterationsPerRun:z.number().nullable().describe("\n * * Field Name: MaxIterationsPerRun\n * * Display Name: Max Iterations Per Run\n * * SQL Data Type: int\n * * Description: Maximum number of prompt iterations allowed for a single agent run. Run will be\nterminated if this limit is exceeded."),MaxTimePerRun:z.number().nullable().describe("\n * * Field Name: MaxTimePerRun\n * * Display Name: Max Time Per Run\n * * SQL Data Type: int\n * * Description: Maximum time in seconds allowed for a single agent run. Run will be terminated\nif this limit is exceeded."),MinExecutionsPerRun:z.number().nullable().describe("\n * * Field Name: MinExecutionsPerRun\n * * Display Name: Min Executions Per Run\n * * SQL Data Type: int\n * * Description: When acting as a sub-agent, minimum number of times this agent must be executed per parent agent run"),MaxExecutionsPerRun:z.number().nullable().describe("\n * * Field Name: MaxExecutionsPerRun\n * * Display Name: Max Executions Per Run\n * * SQL Data Type: int\n * * Description: When acting as a sub-agent, maximum number of times this agent can be executed per parent agent run"),StartingPayloadValidation:z.string().nullable().describe("\n * * Field Name: StartingPayloadValidation\n * * Display Name: Starting Payload Validation\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Optional JSON schema validation to apply to the input payload before agent execution begins. Uses the same JSONValidator format as FinalPayloadValidation."),StartingPayloadValidationMode:z.union([z.literal('Fail'),z.literal('Warn')]).describe("\n * * Field Name: StartingPayloadValidationMode\n * * Display Name: Starting Payload Validation Mode\n * * SQL Data Type: nvarchar(25)\n * * Default Value: Fail\n * * Value List Type: List\n * * Possible Values \n * * Fail\n * * Warn\n * * Description: Determines how to handle StartingPayloadValidation failures. Fail = reject invalid input, Warn = log warning but proceed."),DefaultPromptEffortLevel:z.number().nullable().describe("\n * * Field Name: DefaultPromptEffortLevel\n * * Display Name: Default Prompt Effort Level\n * * SQL Data Type: int\n * * Description: Default effort level for all prompts executed by this agent (1-100, where 1=minimal effort, 100=maximum effort). Takes precedence over individual prompt EffortLevel settings but can be overridden by runtime parameters. Inherited by sub-agents unless explicitly overridden."),ChatHandlingOption:z.union([z.literal('Failed'),z.literal('Retry'),z.literal('Success')]).nullable().describe("\n * * Field Name: ChatHandlingOption\n * * Display Name: Chat Handling Option\n * * SQL Data Type: nvarchar(30)\n * * Value List Type: List\n * * Possible Values \n * * Failed\n * * Retry\n * * Success\n * * Description: Controls how Chat next steps are handled. When null (default), Chat propagates to caller. When set to Success, Failed, or Retry, Chat steps are remapped to that value and re-validated."),DefaultArtifactTypeID:z.string().nullable().describe("\n * * Field Name: DefaultArtifactTypeID\n * * Display Name: Default Artifact Type\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Types (vwArtifactTypes.ID)\n * * Description: Default artifact type produced by this agent. This is the primary artifact type; additional artifact types can be linked via AIAgentArtifactType junction table. Can be NULL if agent does not produce artifacts by default."),OwnerUserID:z.string().describe("\n * * Field Name: OwnerUserID\n * * Display Name: Owner\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Default Value: ECAFCCEC-6A37-EF11-86D4-000D3A4E707E\n * * Description: The user who owns and created this AI agent. Automatically set to the current user if not specified. Owner has full permissions (view, run, edit, delete) regardless of ACL entries."),InvocationMode:z.union([z.literal('Any'),z.literal('Sub-Agent'),z.literal('Top-Level')]).describe("\n * * Field Name: InvocationMode\n * * Display Name: Invocation Mode\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Any\n * * Value List Type: List\n * * Possible Values \n * * Any\n * * Sub-Agent\n * * Top-Level\n * * Description: Controls how the agent can be invoked: Any (default - can be top-level or sub-agent), Top-Level (only callable as primary agent), Sub-Agent (only callable as sub-agent). Used to filter available agents in tools like Sage."),ArtifactCreationMode:z.union([z.literal('Always'),z.literal('Never'),z.literal('System Only')]).describe("\n * * Field Name: ArtifactCreationMode\n * * Display Name: Artifact Creation Mode\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Always\n * * Value List Type: List\n * * Possible Values \n * * Always\n * * Never\n * * System Only\n * * Description: Controls how artifacts are created from this agent's payloads. \"Always\" creates visible artifacts, \"Never\" skips artifact creation, \"System Only\" creates hidden system artifacts."),FunctionalRequirements:z.string().nullable().describe("\n * * Field Name: FunctionalRequirements\n * * Display Name: Functional Requirements\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Detailed markdown formatted requirements that explain the business goals of the agent without specific technical implementation details."),TechnicalDesign:z.string().nullable().describe("\n * * Field Name: TechnicalDesign\n * * Display Name: Technical Design\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Detailed markdown that explains the structure of the agent including agent architecture, actions, sub-agents, prompts, and payload structure."),InjectNotes:z.boolean().describe("\n * * Field Name: InjectNotes\n * * Display Name: Inject Notes\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: When enabled, agent notes will be automatically injected into the agent context based on scoping rules."),MaxNotesToInject:z.number().describe("\n * * Field Name: MaxNotesToInject\n * * Display Name: Max Notes To Inject\n * * SQL Data Type: int\n * * Default Value: 5\n * * Description: Maximum number of notes to inject into agent context per request."),NoteInjectionStrategy:z.union([z.literal('All'),z.literal('Recent'),z.literal('Relevant')]).describe("\n * * Field Name: NoteInjectionStrategy\n * * Display Name: Note Injection Strategy\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Relevant\n * * Value List Type: List\n * * Possible Values \n * * All\n * * Recent\n * * Relevant\n * * Description: Strategy for selecting which notes to inject: Relevant (semantic search), Recent (most recent first), or All (up to max limit)."),InjectExamples:z.boolean().describe("\n * * Field Name: InjectExamples\n * * Display Name: Inject Examples\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: When enabled, agent examples will be automatically injected into the agent context based on scoping rules."),MaxExamplesToInject:z.number().describe("\n * * Field Name: MaxExamplesToInject\n * * Display Name: Max Examples To Inject\n * * SQL Data Type: int\n * * Default Value: 3\n * * Description: Maximum number of examples to inject into agent context per request."),ExampleInjectionStrategy:z.union([z.literal('Rated'),z.literal('Recent'),z.literal('Semantic')]).describe("\n * * Field Name: ExampleInjectionStrategy\n * * Display Name: Example Injection Strategy\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Semantic\n * * Value List Type: List\n * * Possible Values \n * * Rated\n * * Recent\n * * Semantic\n * * Description: Strategy for selecting which examples to inject: Semantic (vector similarity), Recent (most recent first), or Rated (highest success score first)."),IsRestricted:z.boolean().describe("\n * * Field Name: IsRestricted\n * * Display Name: Is Restricted\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: When true, agent is restricted to system/scheduled use only and hidden from user selection, Agent Manager, and MCP/A2A discovery."),MessageMode:z.union([z.literal('All'),z.literal('Bookend'),z.literal('Latest'),z.literal('None')]).describe("\n * * Field Name: MessageMode\n * * Display Name: Message Mode\n * * SQL Data Type: nvarchar(50)\n * * Default Value: None\n * * Value List Type: List\n * * Possible Values \n * * All\n * * Bookend\n * * Latest\n * * None\n * * Description: Specifies how conversation messages are passed from parent agent to this child sub-agent (when this agent is a child via ParentID). Valid values: 'None' (fresh start - only context and task message, default), 'All' (all parent conversation history), 'Latest' (most recent MaxMessages messages), 'Bookend' (first 2 messages + most recent MaxMessages-2 messages with indicator between). Stored on child agent because each child has only one parent relationship."),MaxMessages:z.number().nullable().describe("\n * * Field Name: MaxMessages\n * * Display Name: Max Messages\n * * SQL Data Type: int\n * * Description: Maximum number of conversation messages to include when MessageMode is 'Latest' or 'Bookend'. NULL means no limit (ignored for 'None' and 'All' modes). Must be greater than 0 if specified. For 'Latest': keeps most recent N messages. For 'Bookend': keeps first 2 + most recent (N-2) messages."),AttachmentStorageProviderID:z.string().nullable().describe("\n * * Field Name: AttachmentStorageProviderID\n * * Display Name: Attachment Storage Provider\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: File Storage Providers (vwFileStorageProviders.ID)\n * * Description: File storage provider for large attachments. Overrides the default from AIConfiguration. NULL uses system default."),AttachmentRootPath:z.string().nullable().describe("\n * * Field Name: AttachmentRootPath\n * * Display Name: Attachment Root Path\n * * SQL Data Type: nvarchar(500)\n * * Description: Base path within the storage provider for this agent's attachments. Agent run ID and sequence number are appended to create unique paths. Format: /folder/subfolder"),InlineStorageThresholdBytes:z.number().nullable().describe("\n * * Field Name: InlineStorageThresholdBytes\n * * Display Name: Inline Storage Threshold Bytes\n * * SQL Data Type: int\n * * Description: File size threshold for inline storage. Files <= this size are stored as base64 inline, larger files use MJStorage. NULL uses system default (1MB). Set to 0 to always use MJStorage."),AgentTypePromptParams:z.string().nullable().describe("\n * * Field Name: AgentTypePromptParams\n * * Display Name: Agent Type Prompt Params\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON object containing parameter values that customize how this agent's type-level system prompt is rendered. The schema is defined by the agent type's PromptParamsSchema field. Allows per-agent control over which prompt sections are included, enabling token savings by excluding unused documentation."),ScopeConfig:z.string().nullable().describe("\n * * Field Name: ScopeConfig\n * * Display Name: Scope Configuration\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON configuration defining scope dimensions for multi-tenant deployments. Example: {\"dimensions\":[{\"name\":\"OrganizationID\",\"entityId\":\"...\",\"isPrimary\":true,\"required\":true},{\"name\":\"ContactID\",\"entityId\":\"...\",\"isPrimary\":false,\"required\":false}],\"inheritanceMode\":\"cascading\"}"),NoteRetentionDays:z.number().nullable().describe("\n * * Field Name: NoteRetentionDays\n * * Display Name: Note Retention Days\n * * SQL Data Type: int\n * * Default Value: 90\n * * Description: Number of days to retain notes before archiving due to inactivity. Default 90. NULL means use system default."),ExampleRetentionDays:z.number().nullable().describe("\n * * Field Name: ExampleRetentionDays\n * * Display Name: Example Retention Days\n * * SQL Data Type: int\n * * Default Value: 180\n * * Description: Number of days to retain examples before archiving due to inactivity. Default 180. NULL means use system default."),AutoArchiveEnabled:z.boolean().describe("\n * * Field Name: AutoArchiveEnabled\n * * Display Name: Auto Archive Enabled\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: Whether automatic archival of stale notes/examples is enabled for this agent. Default true."),RerankerConfiguration:z.string().nullable().describe("\n * * Field Name: RerankerConfiguration\n * * Display Name: Reranker Configuration\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON configuration for optional reranking of retrieved memory items. Schema: { enabled: boolean, rerankerModelId: string, retrievalMultiplier: number (default 3), minRelevanceThreshold: number (default 0.5), rerankPromptId?: string, contextFields?: string[], fallbackOnError: boolean (default true) }. When null or disabled, vector search results are used directly without reranking."),CategoryID:z.string().nullable().describe("\n * * Field Name: CategoryID\n * * Display Name: Category\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Agent Categories (vwAIAgentCategories.ID)\n * * Description: Foreign key to AIAgentCategory. Assigns this agent to an organizational category for grouping, filtering, and inherited assignment strategy resolution."),AllowEphemeralClientTools:z.boolean().describe("\n * * Field Name: AllowEphemeralClientTools\n * * Display Name: Allow Ephemeral Client Tools\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: When true (default), this agent accepts runtime-registered ephemeral client tools that are not defined in metadata. Set to false for agents that require strict tool governance."),DefaultStorageAccountID:z.string().nullable().describe("\n * * Field Name: DefaultStorageAccountID\n * * Display Name: Default Storage Account\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: File Storage Accounts (vwFileStorageAccounts.ID)\n * * Description: Default file storage account for this specific agent. Overrides both Type-level and Category-level defaults. Can be further overridden at runtime via ExecuteAgentParams.override.storageAccountId. FK to FileStorageAccount."),SearchScopeAccess:z.union([z.literal('All'),z.literal('Assigned'),z.literal('None')]).describe("\n * * Field Name: SearchScopeAccess\n * * Display Name: Search Scope Access\n * * SQL Data Type: nvarchar(20)\n * * Default Value: None\n * * Value List Type: List\n * * Possible Values \n * * All\n * * Assigned\n * * None\n * * Description: Controls the agent's search capability. All = may use any scope including Global; search action does not restrict. Assigned = may use ONLY scopes explicitly linked via AIAgentSearchScope; scoped search action enforces this. None = agent has no search capability; the scoped search action rejects all requests."),AcceptUnregisteredFiles:z.boolean().describe("\n * * Field Name: AcceptUnregisteredFiles\n * * Display Name: Accept Unregistered Files\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: Per-agent opt-in to a Generic Binary fallback for file uploads whose MIME type does not match any registered Artifact Type. When false (default), unrecognized uploads are rejected at upload time with an actionable error. When true, unrecognized uploads resolve to the Generic Binary artifact type, exposing only get_full and get_metadata tools. Scoped per agent \u2014 there is no system-wide global flag."),Parent:z.string().nullable().describe("\n * * Field Name: Parent\n * * Display Name: Parent Name\n * * SQL Data Type: nvarchar(255)"),ContextCompressionPrompt:z.string().nullable().describe("\n * * Field Name: ContextCompressionPrompt\n * * Display Name: Compression Prompt Text\n * * SQL Data Type: nvarchar(255)"),Type:z.string().nullable().describe("\n * * Field Name: Type\n * * Display Name: Type\n * * SQL Data Type: nvarchar(100)"),DefaultArtifactType:z.string().nullable().describe("\n * * Field Name: DefaultArtifactType\n * * Display Name: Default Artifact Type Name\n * * SQL Data Type: nvarchar(100)"),OwnerUser:z.string().describe("\n * * Field Name: OwnerUser\n * * Display Name: Owner Name\n * * SQL Data Type: nvarchar(100)"),AttachmentStorageProvider:z.string().nullable().describe("\n * * Field Name: AttachmentStorageProvider\n * * Display Name: Attachment Storage Provider Name\n * * SQL Data Type: nvarchar(50)"),Category:z.string().nullable().describe("\n * * Field Name: Category\n * * Display Name: Category Name\n * * SQL Data Type: nvarchar(200)"),DefaultStorageAccount:z.string().nullable().describe("\n * * Field Name: DefaultStorageAccount\n * * Display Name: Default Storage Account Name\n * * SQL Data Type: nvarchar(200)"),RootParentID:z.string().nullable().describe("\n * * Field Name: RootParentID\n * * Display Name: Root Parent\n * * SQL Data Type: uniqueidentifier")});/**
58866
59003
  * zod schema definition for the entity MJ: AI Architectures
58867
59004
  */var MJAIArchitectureSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),Name:z.string().describe("\n * * Field Name: Name\n * * Display Name: Architecture Name\n * * SQL Data Type: nvarchar(100)"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)"),Category:z.union([z.literal('Core'),z.literal('Hybrid'),z.literal('Optimization'),z.literal('Specialized')]).describe("\n * * Field Name: Category\n * * Display Name: Category\n * * SQL Data Type: nvarchar(50)\n * * Value List Type: List\n * * Possible Values \n * * Core\n * * Hybrid\n * * Optimization\n * * Specialized"),ParentArchitectureID:z.string().nullable().describe("\n * * Field Name: ParentArchitectureID\n * * Display Name: Parent Architecture ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Architectures (vwAIArchitectures.ID)\n * * Description: Hierarchical relationship to parent architecture. Used for variants like Sparse Transformer being a child of Transformer."),WikipediaURL:z.string().nullable().describe("\n * * Field Name: WikipediaURL\n * * Display Name: Wikipedia URL\n * * SQL Data Type: nvarchar(500)"),YearIntroduced:z.number().nullable().describe("\n * * Field Name: YearIntroduced\n * * Display Name: Year Introduced\n * * SQL Data Type: int"),KeyPaper:z.string().nullable().describe("\n * * Field Name: KeyPaper\n * * Display Name: Key Paper\n * * SQL Data Type: nvarchar(500)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ParentArchitecture:z.string().nullable().describe("\n * * Field Name: ParentArchitecture\n * * Display Name: Parent Architecture\n * * SQL Data Type: nvarchar(100)"),RootParentArchitectureID:z.string().nullable().describe("\n * * Field Name: RootParentArchitectureID\n * * Display Name: Root Parent Architecture ID\n * * SQL Data Type: uniqueidentifier")});/**
58868
59005
  * zod schema definition for the entity MJ: AI Client Tool Definitions
@@ -58946,13 +59083,13 @@ function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, F
58946
59083
  * zod schema definition for the entity MJ: Artifact Permissions
58947
59084
  */var MJArtifactPermissionSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ArtifactID:z.string().describe("\n * * Field Name: ArtifactID\n * * Display Name: Artifact ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifacts (vwArtifacts.ID)"),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)"),CanRead:z.boolean().describe("\n * * Field Name: CanRead\n * * Display Name: Can Read\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: Whether the user can view/read the artifact"),CanEdit:z.boolean().describe("\n * * Field Name: CanEdit\n * * Display Name: Can Edit\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: Whether the user can modify the artifact or create new versions"),CanDelete:z.boolean().describe("\n * * Field Name: CanDelete\n * * Display Name: Can Delete\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: Whether the user can delete the artifact"),CanShare:z.boolean().describe("\n * * Field Name: CanShare\n * * Display Name: Can Share\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: Whether the user can share the artifact with other users"),SharedByUserID:z.string().nullable().describe("\n * * Field Name: SharedByUserID\n * * Display Name: Shared By User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Description: Foreign key to the User who shared this artifact (if shared)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Artifact:z.string().describe("\n * * Field Name: Artifact\n * * Display Name: Artifact\n * * SQL Data Type: nvarchar(255)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User\n * * SQL Data Type: nvarchar(100)"),SharedByUser:z.string().nullable().describe("\n * * Field Name: SharedByUser\n * * Display Name: Shared By User\n * * SQL Data Type: nvarchar(100)")});/**
58948
59085
  * zod schema definition for the entity MJ: Artifact Types
58949
- */var MJArtifactTypeSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier"),Name:z.string().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(100)\n * * Description: Display name of the artifact type"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Detailed description of the artifact type"),ContentType:z.string().describe("\n * * Field Name: ContentType\n * * Display Name: Content Type\n * * SQL Data Type: nvarchar(100)\n * * Description: MIME type or content identifier for this artifact type"),IsEnabled:z.boolean().describe("\n * * Field Name: IsEnabled\n * * Display Name: Is Enabled\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: Indicates if this artifact type is currently available for use"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ParentID:z.string().nullable().describe("\n * * Field Name: ParentID\n * * Display Name: Parent ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Types (vwArtifactTypes.ID)\n * * Description: Parent artifact type ID for hierarchical artifact type organization. Child types inherit ExtractRules from parent but can override."),ExtractRules:z.string().nullable().describe("\n * * Field Name: ExtractRules\n * * Display Name: Extraction Rules\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON array of extraction rules defining how to extract attributes from artifact content. Each rule has: name (string), description (string), type (TypeScript type), standardProperty ('name'|'description'|'displayMarkdown'|'displayHtml'|null), extractor (JavaScript code string). Child types inherit parent rules and can override by name."),DriverClass:z.string().nullable().describe("\n * * Field Name: DriverClass\n * * Display Name: Driver Class\n * * SQL Data Type: nvarchar(255)\n * * Description: Driver class name for the artifact viewer plugin. References Angular component registered with @RegisterClass decorator."),Icon:z.string().nullable().describe("\n * * Field Name: Icon\n * * Display Name: Icon\n * * SQL Data Type: nvarchar(255)\n * * Description: Font Awesome icon class name for displaying this artifact type in the UI (e.g., fa-file-code, fa-chart-line)"),ContentCategory:z.union([z.literal('File'),z.literal('Text')]).describe("\n * * Field Name: ContentCategory\n * * Display Name: Content Category\n * * SQL Data Type: nvarchar(10)\n * * Default Value: Text\n * * Value List Type: List\n * * Possible Values \n * * File\n * * Text\n * * Description: Classifies whether this artifact type stores text content ('Text', the default for all existing types) or a binary file in MJStorage ('File'). Used by AgentRunner and viewer components to route file-based artifacts correctly."),ToolLibraryClass:z.string().nullable().describe("\n * * Field Name: ToolLibraryClass\n * * Display Name: Tool Library Class\n * * SQL Data Type: nvarchar(100)\n * * Description: Class name for the BaseArtifactToolLibrary subclass that provides type-specific artifact exploration tools for agents. Resolved via ClassFactory. When NULL, ArtifactToolManager uses name-based fallback resolution."),Parent:z.string().nullable().describe("\n * * Field Name: Parent\n * * Display Name: Parent\n * * SQL Data Type: nvarchar(100)"),RootParentID:z.string().nullable().describe("\n * * Field Name: RootParentID\n * * Display Name: Root Parent ID\n * * SQL Data Type: uniqueidentifier")});/**
59086
+ */var MJArtifactTypeSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier"),Name:z.string().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(100)\n * * Description: Display name of the artifact type"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Detailed description of the artifact type"),ContentType:z.string().describe("\n * * Field Name: ContentType\n * * Display Name: Content Type\n * * SQL Data Type: nvarchar(100)\n * * Description: MIME type or content identifier for this artifact type"),IsEnabled:z.boolean().describe("\n * * Field Name: IsEnabled\n * * Display Name: Is Enabled\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: Indicates if this artifact type is currently available for use"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ParentID:z.string().nullable().describe("\n * * Field Name: ParentID\n * * Display Name: Parent ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Types (vwArtifactTypes.ID)\n * * Description: Parent artifact type ID for hierarchical artifact type organization. Child types inherit ExtractRules from parent but can override."),ExtractRules:z.string().nullable().describe("\n * * Field Name: ExtractRules\n * * Display Name: Extraction Rules\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON array of extraction rules defining how to extract attributes from artifact content. Each rule has: name (string), description (string), type (TypeScript type), standardProperty ('name'|'description'|'displayMarkdown'|'displayHtml'|null), extractor (JavaScript code string). Child types inherit parent rules and can override by name."),DriverClass:z.string().nullable().describe("\n * * Field Name: DriverClass\n * * Display Name: Driver Class\n * * SQL Data Type: nvarchar(255)\n * * Description: Driver class name for the artifact viewer plugin. References Angular component registered with @RegisterClass decorator."),Icon:z.string().nullable().describe("\n * * Field Name: Icon\n * * Display Name: Icon\n * * SQL Data Type: nvarchar(255)\n * * Description: Font Awesome icon class name for displaying this artifact type in the UI (e.g., fa-file-code, fa-chart-line)"),ContentCategory:z.union([z.literal('File'),z.literal('Text')]).describe("\n * * Field Name: ContentCategory\n * * Display Name: Content Category\n * * SQL Data Type: nvarchar(10)\n * * Default Value: Text\n * * Value List Type: List\n * * Possible Values \n * * File\n * * Text\n * * Description: Classifies whether this artifact type stores text content ('Text', the default for all existing types) or a binary file in MJStorage ('File'). Used by AgentRunner and viewer components to route file-based artifacts correctly."),ToolLibraryClass:z.string().nullable().describe("\n * * Field Name: ToolLibraryClass\n * * Display Name: Tool Library Class\n * * SQL Data Type: nvarchar(100)\n * * Description: Class name for the BaseArtifactToolLibrary subclass that provides type-specific artifact exploration tools for agents. Resolved via ClassFactory. When NULL, ArtifactToolManager uses name-based fallback resolution."),Priority:z.number().describe("\n * * Field Name: Priority\n * * Display Name: Priority\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: Deterministic tiebreaker when multiple Artifact Types match the same MIME pattern. Higher values win. Within a specificity tier (exact > subtype-wildcard), the resolver sorts by Priority desc, then SystemSupplied = false beats SystemSupplied = true, then lowest ID wins."),DefaultDeliveryMode:z.union([z.literal('Inline'),z.literal('ToolsOnly')]).describe("\n * * Field Name: DefaultDeliveryMode\n * * Display Name: Default Delivery Mode\n * * SQL Data Type: nvarchar(20)\n * * Default Value: ToolsOnly\n * * Value List Type: List\n * * Possible Values \n * * Inline\n * * ToolsOnly\n * * Description: How artifacts of this type are delivered to the LLM by default. Inline: emitted as an inline content block (image_url, audio_url, small text, etc.) when the model supports the modality and the size is under the inline cap. ToolsOnly: never inlined; the agent reaches the bytes only through tool calls (get_full, library-specific tools). Per-instance override is one-way via ConversationArtifactVersion.ForceToolsOnly \u2014 an instance can opt out of inline but never opt in when the type default is ToolsOnly."),SystemSupplied:z.boolean().describe("\n * * Field Name: SystemSupplied\n * * Display Name: System Supplied\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: True for Artifact Types shipped as part of the MemberJunction default registry (JSON, PDF, Office variants, Image/Audio/Video, Generic Text, Generic Binary). False for user/org-supplied customizations. Used as a tiebreaker in MIME pattern resolution: user customizations win over shipped defaults at equal Priority."),Parent:z.string().nullable().describe("\n * * Field Name: Parent\n * * Display Name: Parent\n * * SQL Data Type: nvarchar(100)"),RootParentID:z.string().nullable().describe("\n * * Field Name: RootParentID\n * * Display Name: Root Parent ID\n * * SQL Data Type: uniqueidentifier")});/**
58950
59087
  * zod schema definition for the entity MJ: Artifact Uses
58951
- */var MJArtifactUseSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ArtifactVersionID:z.string().describe("\n * * Field Name: ArtifactVersionID\n * * Display Name: Artifact Version ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Versions (vwArtifactVersions.ID)\n * * Description: The specific version of the artifact being used."),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Description: The user performing the action."),UsageType:z.union([z.literal('Exported'),z.literal('Opened'),z.literal('Saved'),z.literal('Shared'),z.literal('Viewed')]).describe("\n * * Field Name: UsageType\n * * Display Name: Usage Type\n * * SQL Data Type: nvarchar(20)\n * * Value List Type: List\n * * Possible Values \n * * Exported\n * * Opened\n * * Saved\n * * Shared\n * * Viewed\n * * Description: Type of usage: Viewed (artifact displayed), Opened (artifact accessed), Shared (artifact shared with others), Saved (artifact bookmarked), or Exported (artifact downloaded)."),UsageContext:z.string().nullable().describe("\n * * Field Name: UsageContext\n * * Display Name: Usage Context\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Optional JSON context with additional metadata about the usage event (e.g., source page, referrer, device info)."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ArtifactVersion:z.string().nullable().describe("\n * * Field Name: ArtifactVersion\n * * Display Name: Artifact Version\n * * SQL Data Type: nvarchar(255)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User\n * * SQL Data Type: nvarchar(100)")});/**
59088
+ */var MJArtifactUseSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ArtifactVersionID:z.string().describe("\n * * Field Name: ArtifactVersionID\n * * Display Name: Artifact Version ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Versions (vwArtifactVersions.ID)\n * * Description: The specific version of the artifact being used."),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Description: The user performing the action."),UsageType:z.union([z.literal('Exported'),z.literal('Opened'),z.literal('Saved'),z.literal('Shared'),z.literal('Viewed')]).describe("\n * * Field Name: UsageType\n * * Display Name: Usage Type\n * * SQL Data Type: nvarchar(20)\n * * Value List Type: List\n * * Possible Values \n * * Exported\n * * Opened\n * * Saved\n * * Shared\n * * Viewed\n * * Description: Type of usage: Viewed (artifact displayed), Opened (artifact accessed), Shared (artifact shared with others), Saved (artifact bookmarked), or Exported (artifact downloaded)."),UsageContext:z.string().nullable().describe("\n * * Field Name: UsageContext\n * * Display Name: Usage Context\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Optional JSON context with additional metadata about the usage event (e.g., source page, referrer, device info)."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ArtifactVersion:z.number().describe("\n * * Field Name: ArtifactVersion\n * * Display Name: Artifact Version\n * * SQL Data Type: int"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User\n * * SQL Data Type: nvarchar(100)")});/**
58952
59089
  * zod schema definition for the entity MJ: Artifact Version Attributes
58953
- */var MJArtifactVersionAttributeSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ArtifactVersionID:z.string().describe("\n * * Field Name: ArtifactVersionID\n * * Display Name: Artifact Version ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Versions (vwArtifactVersions.ID)\n * * Description: The artifact version this attribute belongs to"),Name:z.string().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(255)\n * * Description: Name of the extracted attribute (matches ExtractRule.name)"),Type:z.string().describe("\n * * Field Name: Type\n * * Display Name: Type\n * * SQL Data Type: nvarchar(500)\n * * Description: TypeScript type definition of the value (e.g., 'string', 'number', 'Date', 'Array<{x: number, y: string}>')"),Value:z.string().nullable().describe("\n * * Field Name: Value\n * * Display Name: Value\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON-serialized extracted value"),StandardProperty:z.union([z.literal('description'),z.literal('displayHtml'),z.literal('displayMarkdown'),z.literal('name')]).nullable().describe("\n * * Field Name: StandardProperty\n * * Display Name: Standard Property\n * * SQL Data Type: nvarchar(50)\n * * Value List Type: List\n * * Possible Values \n * * description\n * * displayHtml\n * * displayMarkdown\n * * name\n * * Description: Maps this attribute to a standard property for UI rendering: 'name', 'description', 'displayMarkdown', 'displayHtml', or NULL for custom attributes"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ArtifactVersion:z.string().nullable().describe("\n * * Field Name: ArtifactVersion\n * * Display Name: Artifact Version\n * * SQL Data Type: nvarchar(255)")});/**
59090
+ */var MJArtifactVersionAttributeSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ArtifactVersionID:z.string().describe("\n * * Field Name: ArtifactVersionID\n * * Display Name: Artifact Version ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Versions (vwArtifactVersions.ID)\n * * Description: The artifact version this attribute belongs to"),Name:z.string().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(255)\n * * Description: Name of the extracted attribute (matches ExtractRule.name)"),Type:z.string().describe("\n * * Field Name: Type\n * * Display Name: Type\n * * SQL Data Type: nvarchar(500)\n * * Description: TypeScript type definition of the value (e.g., 'string', 'number', 'Date', 'Array<{x: number, y: string}>')"),Value:z.string().nullable().describe("\n * * Field Name: Value\n * * Display Name: Value\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON-serialized extracted value"),StandardProperty:z.union([z.literal('description'),z.literal('displayHtml'),z.literal('displayMarkdown'),z.literal('name')]).nullable().describe("\n * * Field Name: StandardProperty\n * * Display Name: Standard Property\n * * SQL Data Type: nvarchar(50)\n * * Value List Type: List\n * * Possible Values \n * * description\n * * displayHtml\n * * displayMarkdown\n * * name\n * * Description: Maps this attribute to a standard property for UI rendering: 'name', 'description', 'displayMarkdown', 'displayHtml', or NULL for custom attributes"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ArtifactVersion:z.number().describe("\n * * Field Name: ArtifactVersion\n * * Display Name: Artifact Version\n * * SQL Data Type: int")});/**
58954
59091
  * zod schema definition for the entity MJ: Artifact Versions
58955
- */var MJArtifactVersionSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ArtifactID:z.string().describe("\n * * Field Name: ArtifactID\n * * Display Name: Artifact\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifacts (vwArtifacts.ID)"),VersionNumber:z.number().describe("\n * * Field Name: VersionNumber\n * * Display Name: Version Number\n * * SQL Data Type: int\n * * Description: Sequential version number for this artifact"),Content:z.string().nullable().describe("\n * * Field Name: Content\n * * Display Name: Content\n * * SQL Data Type: nvarchar(MAX)\n * * Description: The content of the artifact at this version"),Configuration:z.string().nullable().describe("\n * * Field Name: Configuration\n * * Display Name: Configuration\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON configuration for this version"),Comments:z.string().nullable().describe("\n * * Field Name: Comments\n * * Display Name: Comments\n * * SQL Data Type: nvarchar(MAX)\n * * Description: User comments specific to this version"),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ContentHash:z.string().nullable().describe("\n * * Field Name: ContentHash\n * * Display Name: Content Hash\n * * SQL Data Type: nvarchar(500)\n * * Description: SHA-256 hash of the Content field for duplicate detection and version comparison"),Name:z.string().nullable().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(255)\n * * Description: Name of this artifact version. Can differ from Artifact.Name as it may evolve with versions."),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Description of this artifact version. Can differ from Artifact.Description as it may evolve with versions."),FileID:z.string().nullable().describe("\n * * Field Name: FileID\n * * Display Name: File\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Files (vwFiles.ID)\n * * Description: Foreign key to the MJ: Files entity. When ContentMode is 'File', this references the binary file stored in MJStorage. NULL when ContentMode is 'Text'."),ContentMode:z.union([z.literal('File'),z.literal('Text')]).describe("\n * * Field Name: ContentMode\n * * Display Name: Content Mode\n * * SQL Data Type: nvarchar(10)\n * * Default Value: Text\n * * Value List Type: List\n * * Possible Values \n * * File\n * * Text\n * * Description: Determines how artifact content is stored. 'Text' (default) means the Content column holds the data. 'File' means FileID references a binary file in MJStorage and Content is unused."),MimeType:z.string().nullable().describe("\n * * Field Name: MimeType\n * * Display Name: MIME Type\n * * SQL Data Type: nvarchar(200)\n * * Description: MIME type of the stored file (e.g. application/pdf). Denormalized from the File entity for display without joins. Only populated when ContentMode is 'File'."),FileName:z.string().nullable().describe("\n * * Field Name: FileName\n * * Display Name: File Name\n * * SQL Data Type: nvarchar(500)\n * * Description: Original filename of the stored file (e.g. report.pdf). Denormalized from the File entity for display without joins. Only populated when ContentMode is 'File'."),ContentSizeBytes:z.number().nullable().describe("\n * * Field Name: ContentSizeBytes\n * * Display Name: Content Size Bytes\n * * SQL Data Type: bigint\n * * Description: Size of the stored file in bytes. Denormalized for display without loading the file. Only populated when ContentMode is 'File'."),Artifact:z.string().describe("\n * * Field Name: Artifact\n * * Display Name: Artifact\n * * SQL Data Type: nvarchar(255)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User\n * * SQL Data Type: nvarchar(100)"),File:z.string().nullable().describe("\n * * Field Name: File\n * * Display Name: File\n * * SQL Data Type: nvarchar(500)")});/**
59092
+ */var MJArtifactVersionSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ArtifactID:z.string().describe("\n * * Field Name: ArtifactID\n * * Display Name: Artifact\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifacts (vwArtifacts.ID)"),VersionNumber:z.number().describe("\n * * Field Name: VersionNumber\n * * Display Name: Version Number\n * * SQL Data Type: int\n * * Description: Sequential version number for this artifact"),Content:z.string().nullable().describe("\n * * Field Name: Content\n * * Display Name: Content\n * * SQL Data Type: nvarchar(MAX)\n * * Description: The content of the artifact at this version"),Configuration:z.string().nullable().describe("\n * * Field Name: Configuration\n * * Display Name: Configuration\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON configuration for this version"),Comments:z.string().nullable().describe("\n * * Field Name: Comments\n * * Display Name: Comments\n * * SQL Data Type: nvarchar(MAX)\n * * Description: User comments specific to this version"),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ContentHash:z.string().nullable().describe("\n * * Field Name: ContentHash\n * * Display Name: Content Hash\n * * SQL Data Type: nvarchar(500)\n * * Description: SHA-256 hash of the Content field for duplicate detection and version comparison"),Name:z.string().nullable().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(255)\n * * Description: Name of this artifact version. Can differ from Artifact.Name as it may evolve with versions."),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Description of this artifact version. Can differ from Artifact.Description as it may evolve with versions."),FileID:z.string().nullable().describe("\n * * Field Name: FileID\n * * Display Name: File ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Files (vwFiles.ID)\n * * Description: Foreign key to the MJ: Files entity. When ContentMode is 'File', this references the binary file stored in MJStorage. NULL when ContentMode is 'Text'."),ContentMode:z.union([z.literal('File'),z.literal('Text')]).describe("\n * * Field Name: ContentMode\n * * Display Name: Content Mode\n * * SQL Data Type: nvarchar(10)\n * * Default Value: Text\n * * Value List Type: List\n * * Possible Values \n * * File\n * * Text\n * * Description: Determines how artifact content is stored. 'Text' (default) means the Content column holds the data. 'File' means FileID references a binary file in MJStorage and Content is unused."),MimeType:z.string().nullable().describe("\n * * Field Name: MimeType\n * * Display Name: MIME Type\n * * SQL Data Type: nvarchar(200)\n * * Description: MIME type of the stored file (e.g. application/pdf). Denormalized from the File entity for display without joins. Only populated when ContentMode is 'File'."),FileName:z.string().nullable().describe("\n * * Field Name: FileName\n * * Display Name: File Name\n * * SQL Data Type: nvarchar(500)\n * * Description: Original filename of the stored file (e.g. report.pdf). Denormalized from the File entity for display without joins. Only populated when ContentMode is 'File'."),ContentSizeBytes:z.number().nullable().describe("\n * * Field Name: ContentSizeBytes\n * * Display Name: Content Size (Bytes)\n * * SQL Data Type: bigint\n * * Description: Size of the stored file in bytes. Denormalized for display without loading the file. Only populated when ContentMode is 'File'."),ForceToolsOnly:z.boolean().describe("\n * * Field Name: ForceToolsOnly\n * * Display Name: Force Tools Only\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: One-way override that forces this artifact version to be delivered via tools regardless of the Artifact Type's DefaultDeliveryMode. When true, the resolver never emits an inline content block for this version. There is no inverse override \u2014 an instance cannot be widened from ToolsOnly to Inline. Default false."),Artifact:z.string().describe("\n * * Field Name: Artifact\n * * Display Name: Artifact\n * * SQL Data Type: nvarchar(255)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User\n * * SQL Data Type: nvarchar(100)"),File:z.string().nullable().describe("\n * * Field Name: File\n * * Display Name: File\n * * SQL Data Type: nvarchar(500)")});/**
58956
59093
  * zod schema definition for the entity MJ: Artifacts
58957
59094
  */var MJArtifactSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),EnvironmentID:z.string().describe("\n * * Field Name: EnvironmentID\n * * Display Name: Environment ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Environments (vwEnvironments.ID)\n * * Default Value: F51358F3-9447-4176-B313-BF8025FD8D09"),Name:z.string().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(255)\n * * Description: Display name for the artifact"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Detailed description of the artifact contents and purpose"),TypeID:z.string().describe("\n * * Field Name: TypeID\n * * Display Name: Type ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Types (vwArtifactTypes.ID)"),Comments:z.string().nullable().describe("\n * * Field Name: Comments\n * * Display Name: Comments\n * * SQL Data Type: nvarchar(MAX)\n * * Description: User comments about the artifact"),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Visibility:z.union([z.literal('Always'),z.literal('System Only')]).describe("\n * * Field Name: Visibility\n * * Display Name: Visibility\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Always\n * * Value List Type: List\n * * Possible Values \n * * Always\n * * System Only\n * * Description: Controls artifact visibility in user-facing lists. \"Always\" shows in all lists, \"System Only\" hides from normal views (for system-generated artifacts like agent routing payloads)."),Environment:z.string().describe("\n * * Field Name: Environment\n * * Display Name: Environment\n * * SQL Data Type: nvarchar(255)"),Type:z.string().describe("\n * * Field Name: Type\n * * Display Name: Type\n * * SQL Data Type: nvarchar(100)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User\n * * SQL Data Type: nvarchar(100)")});/**
58958
59095
  * zod schema definition for the entity MJ: Audit Log Types
@@ -58964,7 +59101,7 @@ function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, F
58964
59101
  * zod schema definition for the entity MJ: Authorizations
58965
59102
  */var MJAuthorizationSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ParentID:z.string().nullable().describe("\n * * Field Name: ParentID\n * * Display Name: Parent ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Authorizations (vwAuthorizations.ID)"),Name:z.string().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(100)"),IsActive:z.boolean().describe("\n * * Field Name: IsActive\n * * Display Name: Is Active\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: Indicates whether this authorization is currently active and can be granted to users or roles."),UseAuditLog:z.boolean().describe("\n * * Field Name: UseAuditLog\n * * Display Name: Use Audit Log\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: When set to 1, Audit Log records are created whenever this authorization is invoked for a user"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: __mj _Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: __mj _Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Parent:z.string().nullable().describe("\n * * Field Name: Parent\n * * Display Name: Parent\n * * SQL Data Type: nvarchar(100)"),RootParentID:z.string().nullable().describe("\n * * Field Name: RootParentID\n * * Display Name: Root Parent ID\n * * SQL Data Type: uniqueidentifier")});/**
58966
59103
  * zod schema definition for the entity MJ: Collection Artifacts
58967
- */var MJCollectionArtifactSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),CollectionID:z.string().describe("\n * * Field Name: CollectionID\n * * Display Name: Collection ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Collections (vwCollections.ID)"),Sequence:z.number().describe("\n * * Field Name: Sequence\n * * Display Name: Sequence\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: Sequence number for ordering artifacts within a collection"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ArtifactVersionID:z.string().describe("\n * * Field Name: ArtifactVersionID\n * * Display Name: Artifact Version ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Versions (vwArtifactVersions.ID)\n * * Description: Required. Specific version of the artifact saved to this collection. Collections store version-specific artifacts to enable proper version tracking and Links tab filtering."),Collection:z.string().describe("\n * * Field Name: Collection\n * * Display Name: Collection\n * * SQL Data Type: nvarchar(255)"),ArtifactVersion:z.string().nullable().describe("\n * * Field Name: ArtifactVersion\n * * Display Name: Artifact Version\n * * SQL Data Type: nvarchar(255)")});/**
59104
+ */var MJCollectionArtifactSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),CollectionID:z.string().describe("\n * * Field Name: CollectionID\n * * Display Name: Collection ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Collections (vwCollections.ID)"),Sequence:z.number().describe("\n * * Field Name: Sequence\n * * Display Name: Sequence\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: Sequence number for ordering artifacts within a collection"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ArtifactVersionID:z.string().describe("\n * * Field Name: ArtifactVersionID\n * * Display Name: Artifact Version ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Versions (vwArtifactVersions.ID)\n * * Description: Required. Specific version of the artifact saved to this collection. Collections store version-specific artifacts to enable proper version tracking and Links tab filtering."),Collection:z.string().describe("\n * * Field Name: Collection\n * * Display Name: Collection\n * * SQL Data Type: nvarchar(255)"),ArtifactVersion:z.number().describe("\n * * Field Name: ArtifactVersion\n * * Display Name: Artifact Version\n * * SQL Data Type: int")});/**
58968
59105
  * zod schema definition for the entity MJ: Collection Permissions
58969
59106
  */var MJCollectionPermissionSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),CollectionID:z.string().describe("\n * * Field Name: CollectionID\n * * Display Name: Collection ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Collections (vwCollections.ID)"),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)"),CanRead:z.boolean().describe("\n * * Field Name: CanRead\n * * Display Name: Can Read\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: Always 1 - users must have read permission to access a shared collection"),CanShare:z.boolean().describe("\n * * Field Name: CanShare\n * * Display Name: Can Share\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: Can share this collection with others (but cannot grant more permissions than they have)"),CanEdit:z.boolean().describe("\n * * Field Name: CanEdit\n * * Display Name: Can Edit\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: Can add/remove artifacts to/from this collection"),CanDelete:z.boolean().describe("\n * * Field Name: CanDelete\n * * Display Name: Can Delete\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: Can delete the collection, child collections, and artifacts"),SharedByUserID:z.string().nullable().describe("\n * * Field Name: SharedByUserID\n * * Display Name: Shared By User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Description: The user who shared this collection (NULL if shared by owner)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Collection:z.string().describe("\n * * Field Name: Collection\n * * Display Name: Collection\n * * SQL Data Type: nvarchar(255)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User\n * * SQL Data Type: nvarchar(100)"),SharedByUser:z.string().nullable().describe("\n * * Field Name: SharedByUser\n * * Display Name: Shared By User\n * * SQL Data Type: nvarchar(100)")});/**
58970
59107
  * zod schema definition for the entity MJ: Collections
@@ -59042,9 +59179,9 @@ function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, F
59042
59179
  * zod schema definition for the entity MJ: Conversation Artifacts
59043
59180
  */var MJConversationArtifactSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),Name:z.string().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(255)\n * * Description: Display name of the artifact"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Extended description of the artifact"),ConversationID:z.string().describe("\n * * Field Name: ConversationID\n * * Display Name: Conversation ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)\n * * Description: Reference to the conversation this artifact belongs to"),ArtifactTypeID:z.string().describe("\n * * Field Name: ArtifactTypeID\n * * Display Name: Artifact Type ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Types (vwArtifactTypes.ID)\n * * Description: Reference to the type of artifact"),SharingScope:z.union([z.literal('Everyone'),z.literal('None'),z.literal('Public'),z.literal('SpecificUsers')]).describe("\n * * Field Name: SharingScope\n * * Display Name: Sharing Scope\n * * SQL Data Type: nvarchar(50)\n * * Value List Type: List\n * * Possible Values \n * * Everyone\n * * None\n * * Public\n * * SpecificUsers\n * * Description: Controls who can view this artifact (None, SpecificUsers, Everyone, Public)"),Comments:z.string().nullable().describe("\n * * Field Name: Comments\n * * Display Name: Comments\n * * SQL Data Type: nvarchar(MAX)\n * * Description: User comments about the artifact"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Conversation:z.string().nullable().describe("\n * * Field Name: Conversation\n * * Display Name: Conversation\n * * SQL Data Type: nvarchar(255)"),ArtifactType:z.string().describe("\n * * Field Name: ArtifactType\n * * Display Name: Artifact Type\n * * SQL Data Type: nvarchar(100)")});/**
59044
59181
  * zod schema definition for the entity MJ: Conversation Detail Artifacts
59045
- */var MJConversationDetailArtifactSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ConversationDetailID:z.string().describe("\n * * Field Name: ConversationDetailID\n * * Display Name: Conversation Detail\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Conversation Details (vwConversationDetails.ID)\n * * Description: Foreign key to ConversationDetail - the conversation message associated with this artifact"),ArtifactVersionID:z.string().describe("\n * * Field Name: ArtifactVersionID\n * * Display Name: Artifact Version\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Versions (vwArtifactVersions.ID)\n * * Description: Foreign key to ArtifactVersion - the specific artifact version linked to this conversation message"),Direction:z.union([z.literal('Input'),z.literal('Output')]).describe("\n * * Field Name: Direction\n * * Display Name: Direction\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Output\n * * Value List Type: List\n * * Possible Values \n * * Input\n * * Output\n * * Description: Direction of artifact flow: Input (fed to agent) or Output (produced by agent)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ConversationDetail:z.string().describe("\n * * Field Name: ConversationDetail\n * * Display Name: Conversation Detail Summary\n * * SQL Data Type: nvarchar(MAX)"),ArtifactVersion:z.string().nullable().describe("\n * * Field Name: ArtifactVersion\n * * Display Name: Artifact Version Summary\n * * SQL Data Type: nvarchar(255)")});/**
59182
+ */var MJConversationDetailArtifactSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ConversationDetailID:z.string().describe("\n * * Field Name: ConversationDetailID\n * * Display Name: Conversation Detail\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Conversation Details (vwConversationDetails.ID)\n * * Description: Foreign key to ConversationDetail - the conversation message associated with this artifact"),ArtifactVersionID:z.string().describe("\n * * Field Name: ArtifactVersionID\n * * Display Name: Artifact Version\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Versions (vwArtifactVersions.ID)\n * * Description: Foreign key to ArtifactVersion - the specific artifact version linked to this conversation message"),Direction:z.union([z.literal('Input'),z.literal('Output')]).describe("\n * * Field Name: Direction\n * * Display Name: Direction\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Output\n * * Value List Type: List\n * * Possible Values \n * * Input\n * * Output\n * * Description: Direction of artifact flow: Input (fed to agent) or Output (produced by agent)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ConversationDetail:z.string().describe("\n * * Field Name: ConversationDetail\n * * Display Name: Conversation Detail Summary\n * * SQL Data Type: nvarchar(MAX)"),ArtifactVersion:z.number().describe("\n * * Field Name: ArtifactVersion\n * * Display Name: Artifact Version Summary\n * * SQL Data Type: int")});/**
59046
59183
  * zod schema definition for the entity MJ: Conversation Detail Attachments
59047
- */var MJConversationDetailAttachmentSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ConversationDetailID:z.string().describe("\n * * Field Name: ConversationDetailID\n * * Display Name: Conversation Detail\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Conversation Details (vwConversationDetails.ID)"),ModalityID:z.string().describe("\n * * Field Name: ModalityID\n * * Display Name: Modality\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Modalities (vwAIModalities.ID)\n * * Description: The modality type of this attachment (Image, Audio, Video, File, etc.). References the AIModality table."),MimeType:z.string().describe("\n * * Field Name: MimeType\n * * Display Name: MIME Type\n * * SQL Data Type: nvarchar(100)\n * * Description: MIME type of the attachment (e.g., image/png, video/mp4, audio/mp3)."),FileName:z.string().nullable().describe("\n * * Field Name: FileName\n * * Display Name: File Name\n * * SQL Data Type: nvarchar(4000)\n * * Description: Original filename of the attachment. Supports long cloud storage paths up to 4000 characters."),FileSizeBytes:z.number().describe("\n * * Field Name: FileSizeBytes\n * * Display Name: File Size (Bytes)\n * * SQL Data Type: int\n * * Description: Size of the attachment in bytes."),Width:z.number().nullable().describe("\n * * Field Name: Width\n * * Display Name: Width\n * * SQL Data Type: int\n * * Description: Width in pixels for images and videos."),Height:z.number().nullable().describe("\n * * Field Name: Height\n * * Display Name: Height\n * * SQL Data Type: int\n * * Description: Height in pixels for images and videos."),DurationSeconds:z.number().nullable().describe("\n * * Field Name: DurationSeconds\n * * Display Name: Duration (Seconds)\n * * SQL Data Type: int\n * * Description: Duration in seconds for audio and video files."),InlineData:z.string().nullable().describe("\n * * Field Name: InlineData\n * * Display Name: Inline Data\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Base64-encoded file data for small attachments stored inline. Mutually exclusive with FileID - exactly one must be populated."),FileID:z.string().nullable().describe("\n * * Field Name: FileID\n * * Display Name: File ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Files (vwFiles.ID)\n * * Description: Reference to File entity for large attachments stored in MJStorage. Mutually exclusive with InlineData - exactly one must be populated."),DisplayOrder:z.number().describe("\n * * Field Name: DisplayOrder\n * * Display Name: Display Order\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: Display order for multiple attachments in a message. Lower numbers appear first."),ThumbnailBase64:z.string().nullable().describe("\n * * Field Name: ThumbnailBase64\n * * Display Name: Thumbnail\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Base64-encoded thumbnail image for quick preview display. Max 200px on longest side."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Description of the attachment providing context about its content and purpose."),ConversationDetail:z.string().describe("\n * * Field Name: ConversationDetail\n * * Display Name: Conversation Detail\n * * SQL Data Type: nvarchar(MAX)"),Modality:z.string().describe("\n * * Field Name: Modality\n * * Display Name: Modality\n * * SQL Data Type: nvarchar(50)"),File:z.string().nullable().describe("\n * * Field Name: File\n * * Display Name: File\n * * SQL Data Type: nvarchar(500)")});/**
59184
+ */var MJConversationDetailAttachmentSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ConversationDetailID:z.string().describe("\n * * Field Name: ConversationDetailID\n * * Display Name: Conversation Detail\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Conversation Details (vwConversationDetails.ID)"),ModalityID:z.string().describe("\n * * Field Name: ModalityID\n * * Display Name: Modality\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: AI Modalities (vwAIModalities.ID)\n * * Description: The modality type of this attachment (Image, Audio, Video, File, etc.). References the AIModality table."),MimeType:z.string().describe("\n * * Field Name: MimeType\n * * Display Name: MIME Type\n * * SQL Data Type: nvarchar(100)\n * * Description: MIME type of the attachment (e.g., image/png, video/mp4, audio/mp3)."),FileName:z.string().nullable().describe("\n * * Field Name: FileName\n * * Display Name: File Name\n * * SQL Data Type: nvarchar(4000)\n * * Description: Original filename of the attachment. Supports long cloud storage paths up to 4000 characters."),FileSizeBytes:z.number().describe("\n * * Field Name: FileSizeBytes\n * * Display Name: File Size (Bytes)\n * * SQL Data Type: int\n * * Description: Size of the attachment in bytes."),Width:z.number().nullable().describe("\n * * Field Name: Width\n * * Display Name: Width\n * * SQL Data Type: int\n * * Description: Width in pixels for images and videos."),Height:z.number().nullable().describe("\n * * Field Name: Height\n * * Display Name: Height\n * * SQL Data Type: int\n * * Description: Height in pixels for images and videos."),DurationSeconds:z.number().nullable().describe("\n * * Field Name: DurationSeconds\n * * Display Name: Duration (Seconds)\n * * SQL Data Type: int\n * * Description: Duration in seconds for audio and video files."),InlineData:z.string().nullable().describe("\n * * Field Name: InlineData\n * * Display Name: Inline Data\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Base64-encoded file data for small attachments stored inline. Mutually exclusive with FileID - exactly one must be populated."),FileID:z.string().nullable().describe("\n * * Field Name: FileID\n * * Display Name: File ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Files (vwFiles.ID)\n * * Description: Reference to File entity for large attachments stored in MJStorage. Mutually exclusive with InlineData - exactly one must be populated."),DisplayOrder:z.number().describe("\n * * Field Name: DisplayOrder\n * * Display Name: Display Order\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: Display order for multiple attachments in a message. Lower numbers appear first."),ThumbnailBase64:z.string().nullable().describe("\n * * Field Name: ThumbnailBase64\n * * Display Name: Thumbnail\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Base64-encoded thumbnail image for quick preview display. Max 200px on longest side."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Description of the attachment providing context about its content and purpose."),ArtifactVersionID:z.string().nullable().describe("\n * * Field Name: ArtifactVersionID\n * * Display Name: Artifact Version ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Artifact Versions (vwArtifactVersions.ID)\n * * Description: Foreign key to the ArtifactVersion created alongside this attachment by the storage-unification path. When set, the agent resolver routes via the artifact path (manifest + tool dispatch) and skips inline embedding of the attachment to avoid double-processing. NULL for pre-v5.35 attachment rows authored before storage unification."),ConversationDetail:z.string().describe("\n * * Field Name: ConversationDetail\n * * Display Name: Conversation Detail Record\n * * SQL Data Type: nvarchar(MAX)"),Modality:z.string().describe("\n * * Field Name: Modality\n * * Display Name: Modality Record\n * * SQL Data Type: nvarchar(50)"),File:z.string().nullable().describe("\n * * Field Name: File\n * * Display Name: File Record\n * * SQL Data Type: nvarchar(500)"),ArtifactVersion:z.number().nullable().describe("\n * * Field Name: ArtifactVersion\n * * Display Name: Artifact Version Record\n * * SQL Data Type: int")});/**
59048
59185
  * zod schema definition for the entity MJ: Conversation Detail Ratings
59049
59186
  */var MJConversationDetailRatingSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),ConversationDetailID:z.string().describe("\n * * Field Name: ConversationDetailID\n * * Display Name: Conversation Detail\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Conversation Details (vwConversationDetails.ID)\n * * Description: The conversation message being rated."),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Description: The user providing the rating."),Rating:z.number().describe("\n * * Field Name: Rating\n * * Display Name: Rating\n * * SQL Data Type: int\n * * Description: Rating on a 1-10 scale where 1 is thumbs down and 10 is thumbs up."),Comments:z.string().nullable().describe("\n * * Field Name: Comments\n * * Display Name: Comments\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Optional textual feedback from the user about this message."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),ConversationDetail:z.string().describe("\n * * Field Name: ConversationDetail\n * * Display Name: Conversation Detail\n * * SQL Data Type: nvarchar(MAX)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User\n * * SQL Data Type: nvarchar(100)")});/**
59050
59187
  * zod schema definition for the entity MJ: Conversation Details
@@ -59196,7 +59333,7 @@ function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, F
59196
59333
  * zod schema definition for the entity MJ: List Shares
59197
59334
  */var MJListShareSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()\n * * Description: Unique identifier for the share record."),ListID:z.string().describe("\n * * Field Name: ListID\n * * Display Name: List\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Lists (vwLists.ID)\n * * Description: The list being shared."),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Description: The user receiving access to the list."),Role:z.union([z.literal('Editor'),z.literal('Viewer')]).describe("\n * * Field Name: Role\n * * Display Name: Role\n * * SQL Data Type: nvarchar(50)\n * * Value List Type: List\n * * Possible Values \n * * Editor\n * * Viewer\n * * Description: The permission level granted (Editor or Viewer)."),Status:z.union([z.literal('Active'),z.literal('Pending')]).describe("\n * * Field Name: Status\n * * Display Name: Status\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Active\n * * Value List Type: List\n * * Possible Values \n * * Active\n * * Pending\n * * Description: Current status of the share (Active or Pending)."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),List:z.string().describe("\n * * Field Name: List\n * * Display Name: List Name\n * * SQL Data Type: nvarchar(100)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User Name\n * * SQL Data Type: nvarchar(100)")});/**
59198
59335
  * zod schema definition for the entity MJ: Lists
59199
- */var MJListSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),Name:z.string().describe("\n * * Field Name: Name\n * * SQL Data Type: nvarchar(100)"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * SQL Data Type: nvarchar(MAX)"),EntityID:z.string().describe("\n * * Field Name: EntityID\n * * Display Name: Entity ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)"),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)"),CategoryID:z.string().nullable().describe("\n * * Field Name: CategoryID\n * * Display Name: Category ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: List Categories (vwListCategories.ID)"),ExternalSystemRecordID:z.string().nullable().describe("\n * * Field Name: ExternalSystemRecordID\n * * Display Name: External System Record ID\n * * SQL Data Type: nvarchar(100)\n * * Description: Identifier for this list in an external system, used for synchronization."),CompanyIntegrationID:z.string().nullable().describe("\n * * Field Name: CompanyIntegrationID\n * * Display Name: Company Integration ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Company Integrations (vwCompanyIntegrations.ID)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Entity:z.string().describe("\n * * Field Name: Entity\n * * Display Name: Entity\n * * SQL Data Type: nvarchar(255)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User\n * * SQL Data Type: nvarchar(100)"),Category:z.string().nullable().describe("\n * * Field Name: Category\n * * Display Name: Category\n * * SQL Data Type: nvarchar(100)"),CompanyIntegration:z.string().nullable().describe("\n * * Field Name: CompanyIntegration\n * * Display Name: Company Integration\n * * SQL Data Type: nvarchar(255)")});/**
59336
+ */var MJListSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),Name:z.string().describe("\n * * Field Name: Name\n * * Display Name: Name\n * * SQL Data Type: nvarchar(100)"),Description:z.string().nullable().describe("\n * * Field Name: Description\n * * Display Name: Description\n * * SQL Data Type: nvarchar(MAX)"),EntityID:z.string().describe("\n * * Field Name: EntityID\n * * Display Name: Entity\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)"),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)"),CategoryID:z.string().nullable().describe("\n * * Field Name: CategoryID\n * * Display Name: Category\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: List Categories (vwListCategories.ID)"),ExternalSystemRecordID:z.string().nullable().describe("\n * * Field Name: ExternalSystemRecordID\n * * Display Name: External System Record ID\n * * SQL Data Type: nvarchar(100)\n * * Description: Identifier for this list in an external system, used for synchronization."),CompanyIntegrationID:z.string().nullable().describe("\n * * Field Name: CompanyIntegrationID\n * * Display Name: Company Integration\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Company Integrations (vwCompanyIntegrations.ID)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),SourceViewID:z.string().nullable().describe("\n * * Field Name: SourceViewID\n * * Display Name: Source View\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: User Views (vwUserViews.ID)\n * * Description: Optional ID of the User View this list was materialized from. NULL for hand-built lists. When set, the list can be refreshed against this view via ListOperations.RefreshFromSource."),SourceFilterSnapshot:z.string().nullable().describe("\n * * Field Name: SourceFilterSnapshot\n * * Display Name: Source Filter Snapshot\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON snapshot of the source filter at materialization time. When UseSnapshot=1, refreshes re-apply this snapshot rather than re-reading the live source view. Null when no snapshot was captured."),LastRefreshedAt:z.date().nullable().describe("\n * * Field Name: LastRefreshedAt\n * * Display Name: Last Refreshed At\n * * SQL Data Type: datetimeoffset\n * * Description: Timestamp (UTC) of the most recent successful RefreshFromSource. Null when the list has never been refreshed."),LastRefreshedByUserID:z.string().nullable().describe("\n * * Field Name: LastRefreshedByUserID\n * * Display Name: Last Refreshed By User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Description: User who triggered the most recent successful RefreshFromSource. Null when the list has never been refreshed."),RefreshMode:z.union([z.literal('Additive'),z.literal('Sync')]).describe("\n * * Field Name: RefreshMode\n * * Display Name: Refresh Mode\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Additive\n * * Value List Type: List\n * * Possible Values \n * * Additive\n * * Sync\n * * Description: Default refresh mode for this list. Additive only adds new members; Sync reconciles in both directions (may remove members no longer in the source \u2014 requires explicit drop-confirmation)."),UseSnapshot:z.boolean().describe("\n * * Field Name: UseSnapshot\n * * Display Name: Use Snapshot\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: When 1, RefreshFromSource uses SourceFilterSnapshot as the source. When 0 (default), it re-reads the live SourceView."),Entity:z.string().describe("\n * * Field Name: Entity\n * * Display Name: Entity Name\n * * SQL Data Type: nvarchar(255)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User Name\n * * SQL Data Type: nvarchar(100)"),Category:z.string().nullable().describe("\n * * Field Name: Category\n * * Display Name: Category Name\n * * SQL Data Type: nvarchar(100)"),CompanyIntegration:z.string().nullable().describe("\n * * Field Name: CompanyIntegration\n * * Display Name: Company Integration Name\n * * SQL Data Type: nvarchar(255)"),SourceView:z.string().nullable().describe("\n * * Field Name: SourceView\n * * Display Name: Source View Name\n * * SQL Data Type: nvarchar(100)"),LastRefreshedByUser:z.string().nullable().describe("\n * * Field Name: LastRefreshedByUser\n * * Display Name: Last Refreshed By User\n * * SQL Data Type: nvarchar(100)")});/**
59200
59337
  * zod schema definition for the entity MJ: MCP Server Connection Permissions
59201
59338
  */var MJMCPServerConnectionPermissionSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),MCPServerConnectionID:z.string().describe("\n * * Field Name: MCPServerConnectionID\n * * Display Name: MCP Server Connection ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: MCP Server Connections (vwMCPServerConnections.ID)"),UserID:z.string().nullable().describe("\n * * Field Name: UserID\n * * Display Name: User\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)\n * * Description: FK to User (mutually exclusive with RoleID)"),RoleID:z.string().nullable().describe("\n * * Field Name: RoleID\n * * Display Name: Role\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Roles (vwRoles.ID)\n * * Description: FK to Role (mutually exclusive with UserID)"),CanExecute:z.boolean().describe("\n * * Field Name: CanExecute\n * * Display Name: Can Execute\n * * SQL Data Type: bit\n * * Default Value: 1\n * * Description: Can invoke tools via this connection"),CanModify:z.boolean().describe("\n * * Field Name: CanModify\n * * Display Name: Can Modify\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: Can modify connection settings"),CanViewCredentials:z.boolean().describe("\n * * Field Name: CanViewCredentials\n * * Display Name: Can View Credentials\n * * SQL Data Type: bit\n * * Default Value: 0\n * * Description: Can see credential info (but not decrypt)"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),MCPServerConnection:z.string().describe("\n * * Field Name: MCPServerConnection\n * * Display Name: MCP Server Connection\n * * SQL Data Type: nvarchar(255)"),User:z.string().nullable().describe("\n * * Field Name: User\n * * Display Name: User Name\n * * SQL Data Type: nvarchar(100)"),Role:z.string().nullable().describe("\n * * Field Name: Role\n * * Display Name: Role Name\n * * SQL Data Type: nvarchar(50)")});/**
59202
59339
  * zod schema definition for the entity MJ: MCP Server Connection Tools
@@ -59272,7 +59409,7 @@ function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, F
59272
59409
  * zod schema definition for the entity MJ: Record Changes
59273
59410
  */var MJRecordChangeSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),EntityID:z.string().describe("\n * * Field Name: EntityID\n * * Display Name: Entity ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)"),RecordID:z.string().describe("\n * * Field Name: RecordID\n * * Display Name: Record ID\n * * SQL Data Type: nvarchar(750)\n * * Description: Field RecordID for entity Record Changes."),UserID:z.string().describe("\n * * Field Name: UserID\n * * Display Name: User ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)"),Type:z.union([z.literal('Create'),z.literal('Delete'),z.literal('Snapshot'),z.literal('Update')]).describe("\n * * Field Name: Type\n * * Display Name: Change Type\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Create\n * * Value List Type: List\n * * Possible Values \n * * Create\n * * Delete\n * * Snapshot\n * * Update\n * * Description: Create, Update, or Delete"),Source:z.union([z.literal('External'),z.literal('Internal'),z.literal('Restore')]).describe("\n * * Field Name: Source\n * * Display Name: Source\n * * SQL Data Type: nvarchar(20)\n * * Default Value: Internal\n * * Value List Type: List\n * * Possible Values \n * * External\n * * Internal\n * * Restore\n * * Description: Internal or External"),ChangedAt:z.date().describe("\n * * Field Name: ChangedAt\n * * Display Name: Changed At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()\n * * Description: The date/time that the change occured."),ChangesJSON:z.string().describe("\n * * Field Name: ChangesJSON\n * * Display Name: Changes JSON\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON structure that describes what was changed in a structured format."),ChangesDescription:z.string().describe("\n * * Field Name: ChangesDescription\n * * Display Name: Changes Description\n * * SQL Data Type: nvarchar(MAX)\n * * Description: A generated, human-readable description of what was changed."),FullRecordJSON:z.string().describe("\n * * Field Name: FullRecordJSON\n * * Display Name: Full Record JSON\n * * SQL Data Type: nvarchar(MAX)\n * * Description: A complete snapshot of the record AFTER the change was applied in a JSON format that can be parsed."),Status:z.union([z.literal('Complete'),z.literal('Error'),z.literal('Pending')]).describe("\n * * Field Name: Status\n * * Display Name: Status\n * * SQL Data Type: nvarchar(50)\n * * Default Value: Complete\n * * Value List Type: List\n * * Possible Values \n * * Complete\n * * Error\n * * Pending\n * * Description: For internal record changes generated within MJ, the status is immediately Complete. For external changes that are detected, the workflow starts off as Pending, then In Progress and finally either Complete or Error"),ErrorLog:z.string().nullable().describe("\n * * Field Name: ErrorLog\n * * Display Name: Error Log\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Field ErrorLog for entity Record Changes."),ReplayRunID:z.string().nullable().describe("\n * * Field Name: ReplayRunID\n * * Display Name: Replay Run ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Record Change Replay Runs (vwRecordChangeReplayRuns.ID)"),IntegrationID:z.string().nullable().describe("\n * * Field Name: IntegrationID\n * * Display Name: Integration ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Integrations (vwIntegrations.ID)"),Comments:z.string().nullable().describe("\n * * Field Name: Comments\n * * Display Name: Comments\n * * SQL Data Type: nvarchar(MAX)"),CreatedAt:z.date().describe("\n * * Field Name: CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()\n * * Description: Field CreatedAt for entity Record Changes."),UpdatedAt:z.date().describe("\n * * Field Name: UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()\n * * Description: Field UpdatedAt for entity Record Changes."),RestoredFromID:z.string().nullable().describe("\n * * Field Name: RestoredFromID\n * * Display Name: Restored From ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Record Changes (vwRecordChanges.ID)\n * * Description: When this RecordChange was produced by a restore operation, points at the historical RecordChange whose state was restored. NULL for ordinary changes. Together with Source='Restore' this builds the version-chain lineage for auditing and timeline navigation."),RestoreReason:z.string().nullable().describe("\n * * Field Name: RestoreReason\n * * Display Name: Restore Reason\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Optional user-entered explanation captured at restore time. Persisted for audit purposes (regulated industries often require a reason for every reversal). NULL when the user did not enter one or when the change was not a restore."),Entity:z.string().describe("\n * * Field Name: Entity\n * * Display Name: Entity Name\n * * SQL Data Type: nvarchar(255)"),User:z.string().describe("\n * * Field Name: User\n * * Display Name: User\n * * SQL Data Type: nvarchar(100)"),ReplayRun:z.string().nullable().describe("\n * * Field Name: ReplayRun\n * * Display Name: Replay Run\n * * SQL Data Type: nvarchar(100)"),Integration:z.string().nullable().describe("\n * * Field Name: Integration\n * * Display Name: Integration\n * * SQL Data Type: nvarchar(100)"),RestoredFrom:z.string().nullable().describe("\n * * Field Name: RestoredFrom\n * * Display Name: Restored From\n * * SQL Data Type: nvarchar(750)"),RootRestoredFromID:z.string().nullable().describe("\n * * Field Name: RootRestoredFromID\n * * Display Name: Root Restored From ID\n * * SQL Data Type: uniqueidentifier")});/**
59274
59411
  * zod schema definition for the entity MJ: Record Geo Codes
59275
- */var MJRecordGeoCodeSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),EntityID:z.string().describe("\n * * Field Name: EntityID\n * * Display Name: Entity\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)\n * * Description: Foreign key to Entity. Identifies which entity this geocode belongs to."),RecordID:z.string().describe("\n * * Field Name: RecordID\n * * Display Name: Record\n * * SQL Data Type: nvarchar(450)\n * * Description: MJ composite primary key format string identifying the source record (e.g., \"ID|<uuid>\"). Max 450 chars for SQL Server index support."),LocationType:z.string().describe("\n * * Field Name: LocationType\n * * Display Name: Location Type\n * * SQL Data Type: nvarchar(50)\n * * Default Value: Primary\n * * Description: Discriminator for multi-location entities. Default \"Primary\" for single-address entities. Multi-address examples: \"Home\", \"Business\", \"Mailing\", \"PO Box\"."),Latitude:z.number().nullable().describe("\n * * Field Name: Latitude\n * * Display Name: Latitude\n * * SQL Data Type: decimal(10, 6)\n * * Description: Geocoded latitude coordinate. NULL when Status is \"pending\" or \"failed\"."),Longitude:z.number().nullable().describe("\n * * Field Name: Longitude\n * * Display Name: Longitude\n * * SQL Data Type: decimal(10, 6)\n * * Description: Geocoded longitude coordinate. NULL when Status is \"pending\" or \"failed\"."),Precision:z.union([z.literal('city'),z.literal('country'),z.literal('county'),z.literal('exact'),z.literal('postal_code'),z.literal('state_province')]).nullable().describe("\n * * Field Name: Precision\n * * Display Name: Precision\n * * SQL Data Type: nvarchar(20)\n * * Value List Type: List\n * * Possible Values \n * * city\n * * country\n * * county\n * * exact\n * * postal_code\n * * state_province\n * * Description: Precision level of the geocoded result: exact (street address), postal_code, city, county, state_province, or country."),CountryID:z.string().nullable().describe("\n * * Field Name: CountryID\n * * Display Name: Country\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Countries (vwCountries.ID)\n * * Description: Optional FK to Country reference table. Populated alongside lat/lng to enable choropleth grouping without reverse-geocoding at render time."),StateProvinceID:z.string().nullable().describe("\n * * Field Name: StateProvinceID\n * * Display Name: State Province\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: State Provinces (vwStateProvinces.ID)\n * * Description: Optional FK to StateProvince reference table. Populated alongside lat/lng to enable state-level choropleth grouping."),Status:z.union([z.literal('failed'),z.literal('pending'),z.literal('success')]).describe("\n * * Field Name: Status\n * * Display Name: Status\n * * SQL Data Type: nvarchar(20)\n * * Default Value: pending\n * * Value List Type: List\n * * Possible Values \n * * failed\n * * pending\n * * success\n * * Description: Current geocoding status: \"pending\" (awaiting geocode), \"success\" (geocoded), or \"failed\" (geocoding error). Used by scheduled job for retry logic."),ErrorMessage:z.string().nullable().describe("\n * * Field Name: ErrorMessage\n * * Display Name: Error Message\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Error details when Status is \"failed\". Captures API error messages, rate limit info, etc. for debugging."),RetryCount:z.number().describe("\n * * Field Name: RetryCount\n * * Display Name: Retry Count\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: Number of geocoding attempts. Used for exponential backoff in the scheduled retry job. Stops retrying at configurable maxRetries (default 3)."),SourceFieldHash:z.string().nullable().describe("\n * * Field Name: SourceFieldHash\n * * Display Name: Source Field Hash\n * * SQL Data Type: nvarchar(64)\n * * Description: SHA-256 hash of the source field values that produced this geocode. When source fields change on save, the hash won't match and re-geocoding is triggered. Format: SHA-256(concat(field1, \"|\", field2, ...))."),GeocodedAt:z.date().nullable().describe("\n * * Field Name: GeocodedAt\n * * Display Name: Geocoded At\n * * SQL Data Type: datetimeoffset\n * * Description: Timestamp of when geocoding was last attempted (success or failure)."),GeocodingSource:z.union([z.literal('google'),z.literal('ip_geolocation'),z.literal('manual'),z.literal('native'),z.literal('reference_data'),z.literal('reverse')]).nullable().describe("\n * * Field Name: GeocodingSource\n * * Display Name: Geocoding Source\n * * SQL Data Type: nvarchar(30)\n * * Value List Type: List\n * * Possible Values \n * * google\n * * ip_geolocation\n * * manual\n * * native\n * * reference_data\n * * reverse\n * * Description: How this geocode was produced: google (Google Geocoding API), reference_data (resolved via Country/StateProvince tables), manual (user-entered), ip_geolocation (IP lookup), native (copied from entity lat/lng fields), reverse (reverse geocode from coordinates)."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Entity:z.string().describe("\n * * Field Name: Entity\n * * Display Name: Entity Name\n * * SQL Data Type: nvarchar(255)"),Country:z.string().nullable().describe("\n * * Field Name: Country\n * * Display Name: Country Name\n * * SQL Data Type: nvarchar(200)"),StateProvince:z.string().nullable().describe("\n * * Field Name: StateProvince\n * * Display Name: State Province Name\n * * SQL Data Type: nvarchar(200)")});/**
59412
+ */var MJRecordGeoCodeSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),EntityID:z.string().describe("\n * * Field Name: EntityID\n * * Display Name: Entity\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)\n * * Description: Foreign key to Entity. Identifies which entity this geocode belongs to."),RecordID:z.string().describe("\n * * Field Name: RecordID\n * * Display Name: Record\n * * SQL Data Type: nvarchar(450)\n * * Description: MJ composite primary key format string identifying the source record (e.g., \"ID|<uuid>\"). Max 450 chars for SQL Server index support."),LocationType:z.string().describe("\n * * Field Name: LocationType\n * * Display Name: Location Type\n * * SQL Data Type: nvarchar(50)\n * * Default Value: Primary\n * * Description: Discriminator for multi-location entities. Default \"Primary\" for single-address entities. Multi-address examples: \"Home\", \"Business\", \"Mailing\", \"PO Box\"."),Latitude:z.number().nullable().describe("\n * * Field Name: Latitude\n * * Display Name: Latitude\n * * SQL Data Type: decimal(10, 6)\n * * Description: Geocoded latitude coordinate. NULL when Status is \"pending\" or \"failed\"."),Longitude:z.number().nullable().describe("\n * * Field Name: Longitude\n * * Display Name: Longitude\n * * SQL Data Type: decimal(10, 6)\n * * Description: Geocoded longitude coordinate. NULL when Status is \"pending\" or \"failed\"."),Precision:z.union([z.literal('city'),z.literal('country'),z.literal('county'),z.literal('exact'),z.literal('postal_code'),z.literal('state_province')]).nullable().describe("\n * * Field Name: Precision\n * * Display Name: Precision\n * * SQL Data Type: nvarchar(20)\n * * Value List Type: List\n * * Possible Values \n * * city\n * * country\n * * county\n * * exact\n * * postal_code\n * * state_province\n * * Description: Precision level of the geocoded result: exact (street address), postal_code, city, county, state_province, or country."),CountryID:z.string().nullable().describe("\n * * Field Name: CountryID\n * * Display Name: Country\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Countries (vwCountries.ID)\n * * Description: Optional FK to Country reference table. Populated alongside lat/lng to enable choropleth grouping without reverse-geocoding at render time."),StateProvinceID:z.string().nullable().describe("\n * * Field Name: StateProvinceID\n * * Display Name: State Province\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: State Provinces (vwStateProvinces.ID)\n * * Description: Optional FK to StateProvince reference table. Populated alongside lat/lng to enable state-level choropleth grouping."),Status:z.union([z.literal('failed'),z.literal('pending'),z.literal('success')]).describe("\n * * Field Name: Status\n * * Display Name: Status\n * * SQL Data Type: nvarchar(20)\n * * Default Value: pending\n * * Value List Type: List\n * * Possible Values \n * * failed\n * * pending\n * * success\n * * Description: Current geocoding status: \"pending\" (awaiting geocode), \"success\" (geocoded), or \"failed\" (geocoding error). Used by scheduled job for retry logic."),ErrorMessage:z.string().nullable().describe("\n * * Field Name: ErrorMessage\n * * Display Name: Error Message\n * * SQL Data Type: nvarchar(MAX)\n * * Description: Error details when Status is \"failed\". Captures API error messages, rate limit info, etc. for debugging."),RetryCount:z.number().describe("\n * * Field Name: RetryCount\n * * Display Name: Retry Count\n * * SQL Data Type: int\n * * Default Value: 0\n * * Description: Number of geocoding attempts. Used for exponential backoff in the scheduled retry job. Stops retrying at configurable maxRetries (default 3)."),SourceFieldHash:z.string().nullable().describe("\n * * Field Name: SourceFieldHash\n * * Display Name: Source Field Hash\n * * SQL Data Type: nvarchar(64)\n * * Description: SHA-256 hash of the source field values that produced this geocode. When source fields change on save, the hash won't match and re-geocoding is triggered. Format: SHA-256(concat(field1, \"|\", field2, ...))."),GeocodedAt:z.date().nullable().describe("\n * * Field Name: GeocodedAt\n * * Display Name: Geocoded At\n * * SQL Data Type: datetimeoffset\n * * Description: Timestamp of when geocoding was last attempted (success or failure)."),GeocodingSource:z.union([z.literal('geocodio'),z.literal('google'),z.literal('here'),z.literal('ip_geolocation'),z.literal('manual'),z.literal('native'),z.literal('reference_data'),z.literal('reverse')]).nullable().describe("\n * * Field Name: GeocodingSource\n * * Display Name: Geocoding Source\n * * SQL Data Type: nvarchar(30)\n * * Value List Type: List\n * * Possible Values \n * * geocodio\n * * google\n * * here\n * * ip_geolocation\n * * manual\n * * native\n * * reference_data\n * * reverse\n * * Description: Source that produced this geocode. One of: google, geocodio, here, reference_data, manual, ip_geolocation, native, reverse."),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),Entity:z.string().describe("\n * * Field Name: Entity\n * * Display Name: Entity Name\n * * SQL Data Type: nvarchar(255)"),Country:z.string().nullable().describe("\n * * Field Name: Country\n * * Display Name: Country Name\n * * SQL Data Type: nvarchar(200)"),StateProvince:z.string().nullable().describe("\n * * Field Name: StateProvince\n * * Display Name: State Province Name\n * * SQL Data Type: nvarchar(200)")});/**
59276
59413
  * zod schema definition for the entity MJ: Record Links
59277
59414
  */var MJRecordLinkSchema=z.object({ID:z.string().describe("\n * * Field Name: ID\n * * Display Name: ID\n * * SQL Data Type: uniqueidentifier\n * * Default Value: newsequentialid()"),SourceEntityID:z.string().describe("\n * * Field Name: SourceEntityID\n * * Display Name: Source Entity ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)"),SourceRecordID:z.string().describe("\n * * Field Name: SourceRecordID\n * * Display Name: Source Record ID\n * * SQL Data Type: nvarchar(500)\n * * Description: Primary key value(s) of the source record - scalar for simple PKs or JSON KeyValuePair array for composite PKs"),TargetEntityID:z.string().describe("\n * * Field Name: TargetEntityID\n * * Display Name: Target Entity ID\n * * SQL Data Type: uniqueidentifier\n * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)"),TargetRecordID:z.string().describe("\n * * Field Name: TargetRecordID\n * * Display Name: Target Record ID\n * * SQL Data Type: nvarchar(500)\n * * Description: Primary key value(s) of the target record - scalar for simple PKs or JSON KeyValuePair array for composite PKs"),LinkType:z.string().nullable().describe("\n * * Field Name: LinkType\n * * Display Name: Link Type\n * * SQL Data Type: nvarchar(50)\n * * Description: Application-specific relationship type describing how the records are related"),Sequence:z.number().nullable().describe("\n * * Field Name: Sequence\n * * Display Name: Sequence\n * * SQL Data Type: int\n * * Description: Display sequence for ordering linked records in UI"),Metadata:z.string().nullable().describe("\n * * Field Name: Metadata\n * * Display Name: Metadata\n * * SQL Data Type: nvarchar(MAX)\n * * Description: JSON field for storing additional link-specific metadata"),__mj_CreatedAt:z.date().describe("\n * * Field Name: __mj_CreatedAt\n * * Display Name: Created At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),__mj_UpdatedAt:z.date().describe("\n * * Field Name: __mj_UpdatedAt\n * * Display Name: Updated At\n * * SQL Data Type: datetimeoffset\n * * Default Value: getutcdate()"),SourceEntity:z.string().describe("\n * * Field Name: SourceEntity\n * * Display Name: Source Entity\n * * SQL Data Type: nvarchar(255)"),TargetEntity:z.string().describe("\n * * Field Name: TargetEntity\n * * Display Name: Target Entity\n * * SQL Data Type: nvarchar(255)")});/**
59278
59415
  * zod schema definition for the entity MJ: Record Merge Deletion Logs
@@ -62591,9 +62728,10 @@ _context31.p=1;_context31.n=2;return provider.BeginTransaction();case 2:_context
62591
62728
  * * ForEach
62592
62729
  * * Prompt
62593
62730
  * * Sub-Agent
62731
+ * * Tool
62594
62732
  * * Validation
62595
62733
  * * While
62596
- * * Description: Type of execution step: Prompt, Actions, Sub-Agent, Decision, Chat, Validation
62734
+ * * Description: Type of execution step: Prompt, Actions, Sub-Agent, Decision, Chat, Validation, ForEach, While, Tool
62597
62735
  */},{key:"StepType",get:function get(){return this.Get('StepType');},set:function set(value){this.Set('StepType',value);}/**
62598
62736
  * * Field Name: StepName
62599
62737
  * * Display Name: Step Name
@@ -63755,7 +63893,7 @@ _context40.p=1;_context40.n=2;return provider.BeginTransaction();case 2:_context
63755
63893
  * * Description: When true, enables automatic compression of conversation context when the message threshold is reached.
63756
63894
  */},{key:"EnableContextCompression",get:function get(){return this.Get('EnableContextCompression');},set:function set(value){this.Set('EnableContextCompression',value);}/**
63757
63895
  * * Field Name: ContextCompressionMessageThreshold
63758
- * * Display Name: Message Threshold
63896
+ * * Display Name: Compression Message Threshold
63759
63897
  * * SQL Data Type: int
63760
63898
  * * Description: Number of messages that triggers context compression when EnableContextCompression is true.
63761
63899
  */},{key:"ContextCompressionMessageThreshold",get:function get(){return this.Get('ContextCompressionMessageThreshold');},set:function set(value){this.Set('ContextCompressionMessageThreshold',value);}/**
@@ -63765,7 +63903,7 @@ _context40.p=1;_context40.n=2;return provider.BeginTransaction();case 2:_context
63765
63903
  * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)
63766
63904
  */},{key:"ContextCompressionPromptID",get:function get(){return this.Get('ContextCompressionPromptID');},set:function set(value){this.Set('ContextCompressionPromptID',value);}/**
63767
63905
  * * Field Name: ContextCompressionMessageRetentionCount
63768
- * * Display Name: Retention Count
63906
+ * * Display Name: Compression Retention Count
63769
63907
  * * SQL Data Type: int
63770
63908
  * * Description: Number of recent messages to keep uncompressed when context compression is applied.
63771
63909
  */},{key:"ContextCompressionMessageRetentionCount",get:function get(){return this.Get('ContextCompressionMessageRetentionCount');},set:function set(value){this.Set('ContextCompressionMessageRetentionCount',value);}/**
@@ -63807,25 +63945,25 @@ _context40.p=1;_context40.n=2;return provider.BeginTransaction();case 2:_context
63807
63945
  * * Description: Controls whether model selection is driven by the Agent Type's system prompt or the Agent's specific prompt. Default is Agent Type for backward compatibility.
63808
63946
  */},{key:"ModelSelectionMode",get:function get(){return this.Get('ModelSelectionMode');},set:function set(value){this.Set('ModelSelectionMode',value);}/**
63809
63947
  * * Field Name: PayloadDownstreamPaths
63810
- * * Display Name: Downstream Paths
63948
+ * * Display Name: Payload Downstream Paths
63811
63949
  * * SQL Data Type: nvarchar(MAX)
63812
63950
  * * Default Value: ["*"]
63813
63951
  * * Description: JSON array of paths that define which parts of the payload should be sent downstream to sub-agents. Use ["*"] to send entire payload, or specify paths like ["customer.id", "campaign.*", "analysis.sentiment"]
63814
63952
  */},{key:"PayloadDownstreamPaths",get:function get(){return this.Get('PayloadDownstreamPaths');},set:function set(value){this.Set('PayloadDownstreamPaths',value);}/**
63815
63953
  * * Field Name: PayloadUpstreamPaths
63816
- * * Display Name: Upstream Paths
63954
+ * * Display Name: Payload Upstream Paths
63817
63955
  * * SQL Data Type: nvarchar(MAX)
63818
63956
  * * Default Value: ["*"]
63819
63957
  * * Description: JSON array of paths that define which parts of the payload sub-agents are allowed to write back upstream. Use ["*"] to allow all writes, or specify paths like ["analysis.results", "recommendations.*"]
63820
63958
  */},{key:"PayloadUpstreamPaths",get:function get(){return this.Get('PayloadUpstreamPaths');},set:function set(value){this.Set('PayloadUpstreamPaths',value);}/**
63821
63959
  * * Field Name: PayloadSelfReadPaths
63822
- * * Display Name: Self Read Paths
63960
+ * * Display Name: Payload Self Read Paths
63823
63961
  * * SQL Data Type: nvarchar(MAX)
63824
63962
  * * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can read. Controls downstream data
63825
63963
  flow when the agent executes its own prompt step.
63826
63964
  */},{key:"PayloadSelfReadPaths",get:function get(){return this.Get('PayloadSelfReadPaths');},set:function set(value){this.Set('PayloadSelfReadPaths',value);}/**
63827
63965
  * * Field Name: PayloadSelfWritePaths
63828
- * * Display Name: Self Write Paths
63966
+ * * Display Name: Payload Self Write Paths
63829
63967
  * * SQL Data Type: nvarchar(MAX)
63830
63968
  * * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can write back. Controls upstream
63831
63969
  data flow when the agent executes its own prompt step.
@@ -63841,7 +63979,7 @@ data flow when the agent executes its own prompt step.
63841
63979
  * * Description: Optional JSON schema or requirements that define the expected structure and content of the agent's final payload. Used to validate the output when the agent declares success. Similar to OutputExample in AI Prompts.
63842
63980
  */},{key:"FinalPayloadValidation",get:function get(){return this.Get('FinalPayloadValidation');},set:function set(value){this.Set('FinalPayloadValidation',value);}/**
63843
63981
  * * Field Name: FinalPayloadValidationMode
63844
- * * Display Name: Final Validation Mode
63982
+ * * Display Name: Final Payload Validation Mode
63845
63983
  * * SQL Data Type: nvarchar(25)
63846
63984
  * * Default Value: Retry
63847
63985
  * * Value List Type: List
@@ -63852,7 +63990,7 @@ data flow when the agent executes its own prompt step.
63852
63990
  * * Description: Determines how to handle validation failures when FinalPayloadValidation is specified. Options: Retry (default) - retry the agent with validation feedback, Fail - fail the agent run immediately, Warn - log a warning but allow success.
63853
63991
  */},{key:"FinalPayloadValidationMode",get:function get(){return this.Get('FinalPayloadValidationMode');},set:function set(value){this.Set('FinalPayloadValidationMode',value);}/**
63854
63992
  * * Field Name: FinalPayloadValidationMaxRetries
63855
- * * Display Name: Max Validation Retries
63993
+ * * Display Name: Final Payload Validation Max Retries
63856
63994
  * * SQL Data Type: int
63857
63995
  * * Default Value: 3
63858
63996
  * * Description: Maximum number of retry attempts allowed when FinalPayloadValidation fails with
@@ -63898,7 +64036,7 @@ if this limit is exceeded.
63898
64036
  * * Description: Optional JSON schema validation to apply to the input payload before agent execution begins. Uses the same JSONValidator format as FinalPayloadValidation.
63899
64037
  */},{key:"StartingPayloadValidation",get:function get(){return this.Get('StartingPayloadValidation');},set:function set(value){this.Set('StartingPayloadValidation',value);}/**
63900
64038
  * * Field Name: StartingPayloadValidationMode
63901
- * * Display Name: Starting Validation Mode
64039
+ * * Display Name: Starting Payload Validation Mode
63902
64040
  * * SQL Data Type: nvarchar(25)
63903
64041
  * * Default Value: Fail
63904
64042
  * * Value List Type: List
@@ -63908,7 +64046,7 @@ if this limit is exceeded.
63908
64046
  * * Description: Determines how to handle StartingPayloadValidation failures. Fail = reject invalid input, Warn = log warning but proceed.
63909
64047
  */},{key:"StartingPayloadValidationMode",get:function get(){return this.Get('StartingPayloadValidationMode');},set:function set(value){this.Set('StartingPayloadValidationMode',value);}/**
63910
64048
  * * Field Name: DefaultPromptEffortLevel
63911
- * * Display Name: Default Effort Level
64049
+ * * Display Name: Default Prompt Effort Level
63912
64050
  * * SQL Data Type: int
63913
64051
  * * Description: Default effort level for all prompts executed by this agent (1-100, where 1=minimal effort, 100=maximum effort). Takes precedence over individual prompt EffortLevel settings but can be overridden by runtime parameters. Inherited by sub-agents unless explicitly overridden.
63914
64052
  */},{key:"DefaultPromptEffortLevel",get:function get(){return this.Get('DefaultPromptEffortLevel');},set:function set(value){this.Set('DefaultPromptEffortLevel',value);}/**
@@ -63974,7 +64112,7 @@ if this limit is exceeded.
63974
64112
  * * Description: When enabled, agent notes will be automatically injected into the agent context based on scoping rules.
63975
64113
  */},{key:"InjectNotes",get:function get(){return this.Get('InjectNotes');},set:function set(value){this.Set('InjectNotes',value);}/**
63976
64114
  * * Field Name: MaxNotesToInject
63977
- * * Display Name: Max Notes to Inject
64115
+ * * Display Name: Max Notes To Inject
63978
64116
  * * SQL Data Type: int
63979
64117
  * * Default Value: 5
63980
64118
  * * Description: Maximum number of notes to inject into agent context per request.
@@ -63997,7 +64135,7 @@ if this limit is exceeded.
63997
64135
  * * Description: When enabled, agent examples will be automatically injected into the agent context based on scoping rules.
63998
64136
  */},{key:"InjectExamples",get:function get(){return this.Get('InjectExamples');},set:function set(value){this.Set('InjectExamples',value);}/**
63999
64137
  * * Field Name: MaxExamplesToInject
64000
- * * Display Name: Max Examples to Inject
64138
+ * * Display Name: Max Examples To Inject
64001
64139
  * * SQL Data Type: int
64002
64140
  * * Default Value: 3
64003
64141
  * * Description: Maximum number of examples to inject into agent context per request.
@@ -64037,23 +64175,23 @@ if this limit is exceeded.
64037
64175
  * * Description: Maximum number of conversation messages to include when MessageMode is 'Latest' or 'Bookend'. NULL means no limit (ignored for 'None' and 'All' modes). Must be greater than 0 if specified. For 'Latest': keeps most recent N messages. For 'Bookend': keeps first 2 + most recent (N-2) messages.
64038
64176
  */},{key:"MaxMessages",get:function get(){return this.Get('MaxMessages');},set:function set(value){this.Set('MaxMessages',value);}/**
64039
64177
  * * Field Name: AttachmentStorageProviderID
64040
- * * Display Name: Storage Provider
64178
+ * * Display Name: Attachment Storage Provider
64041
64179
  * * SQL Data Type: uniqueidentifier
64042
64180
  * * Related Entity/Foreign Key: MJ: File Storage Providers (vwFileStorageProviders.ID)
64043
64181
  * * Description: File storage provider for large attachments. Overrides the default from AIConfiguration. NULL uses system default.
64044
64182
  */},{key:"AttachmentStorageProviderID",get:function get(){return this.Get('AttachmentStorageProviderID');},set:function set(value){this.Set('AttachmentStorageProviderID',value);}/**
64045
64183
  * * Field Name: AttachmentRootPath
64046
- * * Display Name: Root Path
64184
+ * * Display Name: Attachment Root Path
64047
64185
  * * SQL Data Type: nvarchar(500)
64048
64186
  * * Description: Base path within the storage provider for this agent's attachments. Agent run ID and sequence number are appended to create unique paths. Format: /folder/subfolder
64049
64187
  */},{key:"AttachmentRootPath",get:function get(){return this.Get('AttachmentRootPath');},set:function set(value){this.Set('AttachmentRootPath',value);}/**
64050
64188
  * * Field Name: InlineStorageThresholdBytes
64051
- * * Display Name: Inline Storage Threshold
64189
+ * * Display Name: Inline Storage Threshold Bytes
64052
64190
  * * SQL Data Type: int
64053
64191
  * * Description: File size threshold for inline storage. Files <= this size are stored as base64 inline, larger files use MJStorage. NULL uses system default (1MB). Set to 0 to always use MJStorage.
64054
64192
  */},{key:"InlineStorageThresholdBytes",get:function get(){return this.Get('InlineStorageThresholdBytes');},set:function set(value){this.Set('InlineStorageThresholdBytes',value);}/**
64055
64193
  * * Field Name: AgentTypePromptParams
64056
- * * Display Name: Prompt Parameters
64194
+ * * Display Name: Agent Type Prompt Params
64057
64195
  * * SQL Data Type: nvarchar(MAX)
64058
64196
  * * Description: JSON object containing parameter values that customize how this agent's type-level system prompt is rendered. The schema is defined by the agent type's PromptParamsSchema field. Allows per-agent control over which prompt sections are included, enabling token savings by excluding unused documentation.
64059
64197
  */},{key:"AgentTypePromptParams",get:function get(){return this.Get('AgentTypePromptParams');},set:function set(value){this.Set('AgentTypePromptParams',value);}/**
@@ -64092,7 +64230,7 @@ if this limit is exceeded.
64092
64230
  * * Description: Foreign key to AIAgentCategory. Assigns this agent to an organizational category for grouping, filtering, and inherited assignment strategy resolution.
64093
64231
  */},{key:"CategoryID",get:function get(){return this.Get('CategoryID');},set:function set(value){this.Set('CategoryID',value);}/**
64094
64232
  * * Field Name: AllowEphemeralClientTools
64095
- * * Display Name: Allow Ephemeral Tools
64233
+ * * Display Name: Allow Ephemeral Client Tools
64096
64234
  * * SQL Data Type: bit
64097
64235
  * * Default Value: 1
64098
64236
  * * Description: When true (default), this agent accepts runtime-registered ephemeral client tools that are not defined in metadata. Set to false for agents that require strict tool governance.
@@ -64114,16 +64252,22 @@ if this limit is exceeded.
64114
64252
  * * None
64115
64253
  * * Description: Controls the agent's search capability. All = may use any scope including Global; search action does not restrict. Assigned = may use ONLY scopes explicitly linked via AIAgentSearchScope; scoped search action enforces this. None = agent has no search capability; the scoped search action rejects all requests.
64116
64254
  */},{key:"SearchScopeAccess",get:function get(){return this.Get('SearchScopeAccess');},set:function set(value){this.Set('SearchScopeAccess',value);}/**
64255
+ * * Field Name: AcceptUnregisteredFiles
64256
+ * * Display Name: Accept Unregistered Files
64257
+ * * SQL Data Type: bit
64258
+ * * Default Value: 0
64259
+ * * Description: Per-agent opt-in to a Generic Binary fallback for file uploads whose MIME type does not match any registered Artifact Type. When false (default), unrecognized uploads are rejected at upload time with an actionable error. When true, unrecognized uploads resolve to the Generic Binary artifact type, exposing only get_full and get_metadata tools. Scoped per agent — there is no system-wide global flag.
64260
+ */},{key:"AcceptUnregisteredFiles",get:function get(){return this.Get('AcceptUnregisteredFiles');},set:function set(value){this.Set('AcceptUnregisteredFiles',value);}/**
64117
64261
  * * Field Name: Parent
64118
64262
  * * Display Name: Parent Name
64119
64263
  * * SQL Data Type: nvarchar(255)
64120
64264
  */},{key:"Parent",get:function get(){return this.Get('Parent');}/**
64121
64265
  * * Field Name: ContextCompressionPrompt
64122
- * * Display Name: Compression Prompt Name
64266
+ * * Display Name: Compression Prompt Text
64123
64267
  * * SQL Data Type: nvarchar(255)
64124
64268
  */},{key:"ContextCompressionPrompt",get:function get(){return this.Get('ContextCompressionPrompt');}/**
64125
64269
  * * Field Name: Type
64126
- * * Display Name: Type Name
64270
+ * * Display Name: Type
64127
64271
  * * SQL Data Type: nvarchar(100)
64128
64272
  */},{key:"Type",get:function get(){return this.Get('Type');}/**
64129
64273
  * * Field Name: DefaultArtifactType
@@ -64135,7 +64279,7 @@ if this limit is exceeded.
64135
64279
  * * SQL Data Type: nvarchar(100)
64136
64280
  */},{key:"OwnerUser",get:function get(){return this.Get('OwnerUser');}/**
64137
64281
  * * Field Name: AttachmentStorageProvider
64138
- * * Display Name: Storage Provider Name
64282
+ * * Display Name: Attachment Storage Provider Name
64139
64283
  * * SQL Data Type: nvarchar(50)
64140
64284
  */},{key:"AttachmentStorageProvider",get:function get(){return this.Get('AttachmentStorageProvider');}/**
64141
64285
  * * Field Name: Category
@@ -68885,6 +69029,28 @@ _context64.p=1;_context64.n=2;return provider.BeginTransaction();case 2:_context
68885
69029
  * * SQL Data Type: nvarchar(100)
68886
69030
  * * Description: Class name for the BaseArtifactToolLibrary subclass that provides type-specific artifact exploration tools for agents. Resolved via ClassFactory. When NULL, ArtifactToolManager uses name-based fallback resolution.
68887
69031
  */},{key:"ToolLibraryClass",get:function get(){return this.Get('ToolLibraryClass');},set:function set(value){this.Set('ToolLibraryClass',value);}/**
69032
+ * * Field Name: Priority
69033
+ * * Display Name: Priority
69034
+ * * SQL Data Type: int
69035
+ * * Default Value: 0
69036
+ * * Description: Deterministic tiebreaker when multiple Artifact Types match the same MIME pattern. Higher values win. Within a specificity tier (exact > subtype-wildcard), the resolver sorts by Priority desc, then SystemSupplied = false beats SystemSupplied = true, then lowest ID wins.
69037
+ */},{key:"Priority",get:function get(){return this.Get('Priority');},set:function set(value){this.Set('Priority',value);}/**
69038
+ * * Field Name: DefaultDeliveryMode
69039
+ * * Display Name: Default Delivery Mode
69040
+ * * SQL Data Type: nvarchar(20)
69041
+ * * Default Value: ToolsOnly
69042
+ * * Value List Type: List
69043
+ * * Possible Values
69044
+ * * Inline
69045
+ * * ToolsOnly
69046
+ * * Description: How artifacts of this type are delivered to the LLM by default. Inline: emitted as an inline content block (image_url, audio_url, small text, etc.) when the model supports the modality and the size is under the inline cap. ToolsOnly: never inlined; the agent reaches the bytes only through tool calls (get_full, library-specific tools). Per-instance override is one-way via ConversationArtifactVersion.ForceToolsOnly — an instance can opt out of inline but never opt in when the type default is ToolsOnly.
69047
+ */},{key:"DefaultDeliveryMode",get:function get(){return this.Get('DefaultDeliveryMode');},set:function set(value){this.Set('DefaultDeliveryMode',value);}/**
69048
+ * * Field Name: SystemSupplied
69049
+ * * Display Name: System Supplied
69050
+ * * SQL Data Type: bit
69051
+ * * Default Value: 0
69052
+ * * Description: True for Artifact Types shipped as part of the MemberJunction default registry (JSON, PDF, Office variants, Image/Audio/Video, Generic Text, Generic Binary). False for user/org-supplied customizations. Used as a tiebreaker in MIME pattern resolution: user customizations win over shipped defaults at equal Priority.
69053
+ */},{key:"SystemSupplied",get:function get(){return this.Get('SystemSupplied');},set:function set(value){this.Set('SystemSupplied',value);}/**
68888
69054
  * * Field Name: Parent
68889
69055
  * * Display Name: Parent
68890
69056
  * * SQL Data Type: nvarchar(100)
@@ -68959,7 +69125,7 @@ _context64.p=1;_context64.n=2;return provider.BeginTransaction();case 2:_context
68959
69125
  */},{key:"__mj_UpdatedAt",get:function get(){return this.Get('__mj_UpdatedAt');}/**
68960
69126
  * * Field Name: ArtifactVersion
68961
69127
  * * Display Name: Artifact Version
68962
- * * SQL Data Type: nvarchar(255)
69128
+ * * SQL Data Type: int
68963
69129
  */},{key:"ArtifactVersion",get:function get(){return this.Get('ArtifactVersion');}/**
68964
69130
  * * Field Name: User
68965
69131
  * * Display Name: User
@@ -69034,7 +69200,7 @@ _context64.p=1;_context64.n=2;return provider.BeginTransaction();case 2:_context
69034
69200
  */},{key:"__mj_UpdatedAt",get:function get(){return this.Get('__mj_UpdatedAt');}/**
69035
69201
  * * Field Name: ArtifactVersion
69036
69202
  * * Display Name: Artifact Version
69037
- * * SQL Data Type: nvarchar(255)
69203
+ * * SQL Data Type: int
69038
69204
  */},{key:"ArtifactVersion",get:function get(){return this.Get('ArtifactVersion');}}]);}(dist/* BaseEntity */.HCJ);MJArtifactVersionAttributeEntity=__decorate([(0,MJGlobal_dist/* RegisterClass */.Y5)(dist/* BaseEntity */.HCJ,'MJ: Artifact Version Attributes')],MJArtifactVersionAttributeEntity);/**
69039
69205
  * MJ: Artifact Versions - strongly typed entity sub-class
69040
69206
  * * Schema: __mj
@@ -69087,7 +69253,7 @@ _context64.p=1;_context64.n=2;return provider.BeginTransaction();case 2:_context
69087
69253
  * * Description: User comments specific to this version
69088
69254
  */},{key:"Comments",get:function get(){return this.Get('Comments');},set:function set(value){this.Set('Comments',value);}/**
69089
69255
  * * Field Name: UserID
69090
- * * Display Name: User
69256
+ * * Display Name: User ID
69091
69257
  * * SQL Data Type: uniqueidentifier
69092
69258
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
69093
69259
  */},{key:"UserID",get:function get(){return this.Get('UserID');},set:function set(value){this.Set('UserID',value);}/**
@@ -69117,7 +69283,7 @@ _context64.p=1;_context64.n=2;return provider.BeginTransaction();case 2:_context
69117
69283
  * * Description: Description of this artifact version. Can differ from Artifact.Description as it may evolve with versions.
69118
69284
  */},{key:"Description",get:function get(){return this.Get('Description');},set:function set(value){this.Set('Description',value);}/**
69119
69285
  * * Field Name: FileID
69120
- * * Display Name: File
69286
+ * * Display Name: File ID
69121
69287
  * * SQL Data Type: uniqueidentifier
69122
69288
  * * Related Entity/Foreign Key: MJ: Files (vwFiles.ID)
69123
69289
  * * Description: Foreign key to the MJ: Files entity. When ContentMode is 'File', this references the binary file stored in MJStorage. NULL when ContentMode is 'Text'.
@@ -69143,10 +69309,16 @@ _context64.p=1;_context64.n=2;return provider.BeginTransaction();case 2:_context
69143
69309
  * * Description: Original filename of the stored file (e.g. report.pdf). Denormalized from the File entity for display without joins. Only populated when ContentMode is 'File'.
69144
69310
  */},{key:"FileName",get:function get(){return this.Get('FileName');},set:function set(value){this.Set('FileName',value);}/**
69145
69311
  * * Field Name: ContentSizeBytes
69146
- * * Display Name: Content Size Bytes
69312
+ * * Display Name: Content Size (Bytes)
69147
69313
  * * SQL Data Type: bigint
69148
69314
  * * Description: Size of the stored file in bytes. Denormalized for display without loading the file. Only populated when ContentMode is 'File'.
69149
69315
  */},{key:"ContentSizeBytes",get:function get(){return this.Get('ContentSizeBytes');},set:function set(value){this.Set('ContentSizeBytes',value);}/**
69316
+ * * Field Name: ForceToolsOnly
69317
+ * * Display Name: Force Tools Only
69318
+ * * SQL Data Type: bit
69319
+ * * Default Value: 0
69320
+ * * Description: One-way override that forces this artifact version to be delivered via tools regardless of the Artifact Type's DefaultDeliveryMode. When true, the resolver never emits an inline content block for this version. There is no inverse override — an instance cannot be widened from ToolsOnly to Inline. Default false.
69321
+ */},{key:"ForceToolsOnly",get:function get(){return this.Get('ForceToolsOnly');},set:function set(value){this.Set('ForceToolsOnly',value);}/**
69150
69322
  * * Field Name: Artifact
69151
69323
  * * Display Name: Artifact
69152
69324
  * * SQL Data Type: nvarchar(255)
@@ -69595,7 +69767,7 @@ _context64.p=1;_context64.n=2;return provider.BeginTransaction();case 2:_context
69595
69767
  */},{key:"Collection",get:function get(){return this.Get('Collection');}/**
69596
69768
  * * Field Name: ArtifactVersion
69597
69769
  * * Display Name: Artifact Version
69598
- * * SQL Data Type: nvarchar(255)
69770
+ * * SQL Data Type: int
69599
69771
  */},{key:"ArtifactVersion",get:function get(){return this.Get('ArtifactVersion');}}]);}(dist/* BaseEntity */.HCJ);MJCollectionArtifactEntity=__decorate([(0,MJGlobal_dist/* RegisterClass */.Y5)(dist/* BaseEntity */.HCJ,'MJ: Collection Artifacts')],MJCollectionArtifactEntity);/**
69600
69772
  * MJ: Collection Permissions - strongly typed entity sub-class
69601
69773
  * * Schema: __mj
@@ -73076,7 +73248,7 @@ _context134.p=1;_context134.n=2;return provider.BeginTransaction();case 2:_conte
73076
73248
  */},{key:"ConversationDetail",get:function get(){return this.Get('ConversationDetail');}/**
73077
73249
  * * Field Name: ArtifactVersion
73078
73250
  * * Display Name: Artifact Version Summary
73079
- * * SQL Data Type: nvarchar(255)
73251
+ * * SQL Data Type: int
73080
73252
  */},{key:"ArtifactVersion",get:function get(){return this.Get('ArtifactVersion');}}]);}(dist/* BaseEntity */.HCJ);MJConversationDetailArtifactEntity=__decorate([(0,MJGlobal_dist/* RegisterClass */.Y5)(dist/* BaseEntity */.HCJ,'MJ: Conversation Detail Artifacts')],MJConversationDetailArtifactEntity);/**
73081
73253
  * MJ: Conversation Detail Attachments - strongly typed entity sub-class
73082
73254
  * * Schema: __mj
@@ -73087,6 +73259,7 @@ _context134.p=1;_context134.n=2;return provider.BeginTransaction();case 2:_conte
73087
73259
  * @extends {BaseEntity}
73088
73260
  * @class
73089
73261
  * @public
73262
+ * @deprecated This entity is deprecated and will be removed in a future version. Using it will result in console warnings.
73090
73263
  */var MJConversationDetailAttachmentEntity=/*#__PURE__*/function(_BaseEntity126){function MJConversationDetailAttachmentEntity(){_classCallCheck(this,MJConversationDetailAttachmentEntity);return _callSuper(this,MJConversationDetailAttachmentEntity,arguments);}_inherits(MJConversationDetailAttachmentEntity,_BaseEntity126);return _createClass(MJConversationDetailAttachmentEntity,[{key:"Load",value:(/**
73091
73264
  * Loads the MJ: Conversation Detail Attachments record from the database
73092
73265
  * @param ID: string - primary key value to load the MJ: Conversation Detail Attachments record.
@@ -73193,18 +73366,28 @@ if(this.InlineData==null&&this.FileID==null){result.Errors.push(new dist/* Valid
73193
73366
  * * SQL Data Type: nvarchar(MAX)
73194
73367
  * * Description: Description of the attachment providing context about its content and purpose.
73195
73368
  */},{key:"Description",get:function get(){return this.Get('Description');},set:function set(value){this.Set('Description',value);}/**
73369
+ * * Field Name: ArtifactVersionID
73370
+ * * Display Name: Artifact Version ID
73371
+ * * SQL Data Type: uniqueidentifier
73372
+ * * Related Entity/Foreign Key: MJ: Artifact Versions (vwArtifactVersions.ID)
73373
+ * * Description: Foreign key to the ArtifactVersion created alongside this attachment by the storage-unification path. When set, the agent resolver routes via the artifact path (manifest + tool dispatch) and skips inline embedding of the attachment to avoid double-processing. NULL for pre-v5.35 attachment rows authored before storage unification.
73374
+ */},{key:"ArtifactVersionID",get:function get(){return this.Get('ArtifactVersionID');},set:function set(value){this.Set('ArtifactVersionID',value);}/**
73196
73375
  * * Field Name: ConversationDetail
73197
- * * Display Name: Conversation Detail
73376
+ * * Display Name: Conversation Detail Record
73198
73377
  * * SQL Data Type: nvarchar(MAX)
73199
73378
  */},{key:"ConversationDetail",get:function get(){return this.Get('ConversationDetail');}/**
73200
73379
  * * Field Name: Modality
73201
- * * Display Name: Modality
73380
+ * * Display Name: Modality Record
73202
73381
  * * SQL Data Type: nvarchar(50)
73203
73382
  */},{key:"Modality",get:function get(){return this.Get('Modality');}/**
73204
73383
  * * Field Name: File
73205
- * * Display Name: File
73384
+ * * Display Name: File Record
73206
73385
  * * SQL Data Type: nvarchar(500)
73207
- */},{key:"File",get:function get(){return this.Get('File');}}]);}(dist/* BaseEntity */.HCJ);MJConversationDetailAttachmentEntity=__decorate([(0,MJGlobal_dist/* RegisterClass */.Y5)(dist/* BaseEntity */.HCJ,'MJ: Conversation Detail Attachments')],MJConversationDetailAttachmentEntity);/**
73386
+ */},{key:"File",get:function get(){return this.Get('File');}/**
73387
+ * * Field Name: ArtifactVersion
73388
+ * * Display Name: Artifact Version Record
73389
+ * * SQL Data Type: int
73390
+ */},{key:"ArtifactVersion",get:function get(){return this.Get('ArtifactVersion');}}]);}(dist/* BaseEntity */.HCJ);MJConversationDetailAttachmentEntity=__decorate([(0,MJGlobal_dist/* RegisterClass */.Y5)(dist/* BaseEntity */.HCJ,'MJ: Conversation Detail Attachments')],MJConversationDetailAttachmentEntity);/**
73208
73391
  * MJ: Conversation Detail Ratings - strongly typed entity sub-class
73209
73392
  * * Schema: __mj
73210
73393
  * * Base Table: ConversationDetailRating
@@ -80437,27 +80620,30 @@ var isUserValid=this.Type==="User"&&this.UserID!=null&&this.RoleID==null;var isR
80437
80620
  * @override
80438
80621
  */function(){var _Load202=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee215(ID,EntityRelationshipsToLoad){var compositeKey;return _regenerator().w(function(_context215){while(1)switch(_context215.n){case 0:compositeKey=new dist/* CompositeKey */.BT8();compositeKey.KeyValuePairs.push({FieldName:'ID',Value:ID});_context215.n=1;return _superPropGet(MJListEntity,"InnerLoad",this,3)([compositeKey,EntityRelationshipsToLoad]);case 1:return _context215.a(2,_context215.v);}},_callee215,this);}));function Load(_x418,_x419){return _Load202.apply(this,arguments);}return Load;}()/**
80439
80622
  * * Field Name: ID
80623
+ * * Display Name: ID
80440
80624
  * * SQL Data Type: uniqueidentifier
80441
80625
  * * Default Value: newsequentialid()
80442
80626
  */)},{key:"ID",get:function get(){return this.Get('ID');},set:function set(value){this.Set('ID',value);}/**
80443
80627
  * * Field Name: Name
80628
+ * * Display Name: Name
80444
80629
  * * SQL Data Type: nvarchar(100)
80445
80630
  */},{key:"Name",get:function get(){return this.Get('Name');},set:function set(value){this.Set('Name',value);}/**
80446
80631
  * * Field Name: Description
80632
+ * * Display Name: Description
80447
80633
  * * SQL Data Type: nvarchar(MAX)
80448
80634
  */},{key:"Description",get:function get(){return this.Get('Description');},set:function set(value){this.Set('Description',value);}/**
80449
80635
  * * Field Name: EntityID
80450
- * * Display Name: Entity ID
80636
+ * * Display Name: Entity
80451
80637
  * * SQL Data Type: uniqueidentifier
80452
80638
  * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
80453
80639
  */},{key:"EntityID",get:function get(){return this.Get('EntityID');},set:function set(value){this.Set('EntityID',value);}/**
80454
80640
  * * Field Name: UserID
80455
- * * Display Name: User ID
80641
+ * * Display Name: User
80456
80642
  * * SQL Data Type: uniqueidentifier
80457
80643
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
80458
80644
  */},{key:"UserID",get:function get(){return this.Get('UserID');},set:function set(value){this.Set('UserID',value);}/**
80459
80645
  * * Field Name: CategoryID
80460
- * * Display Name: Category ID
80646
+ * * Display Name: Category
80461
80647
  * * SQL Data Type: uniqueidentifier
80462
80648
  * * Related Entity/Foreign Key: MJ: List Categories (vwListCategories.ID)
80463
80649
  */},{key:"CategoryID",get:function get(){return this.Get('CategoryID');},set:function set(value){this.Set('CategoryID',value);}/**
@@ -80467,7 +80653,7 @@ var isUserValid=this.Type==="User"&&this.UserID!=null&&this.RoleID==null;var isR
80467
80653
  * * Description: Identifier for this list in an external system, used for synchronization.
80468
80654
  */},{key:"ExternalSystemRecordID",get:function get(){return this.Get('ExternalSystemRecordID');},set:function set(value){this.Set('ExternalSystemRecordID',value);}/**
80469
80655
  * * Field Name: CompanyIntegrationID
80470
- * * Display Name: Company Integration ID
80656
+ * * Display Name: Company Integration
80471
80657
  * * SQL Data Type: uniqueidentifier
80472
80658
  * * Related Entity/Foreign Key: MJ: Company Integrations (vwCompanyIntegrations.ID)
80473
80659
  */},{key:"CompanyIntegrationID",get:function get(){return this.Get('CompanyIntegrationID');},set:function set(value){this.Set('CompanyIntegrationID',value);}/**
@@ -80481,22 +80667,68 @@ var isUserValid=this.Type==="User"&&this.UserID!=null&&this.RoleID==null;var isR
80481
80667
  * * SQL Data Type: datetimeoffset
80482
80668
  * * Default Value: getutcdate()
80483
80669
  */},{key:"__mj_UpdatedAt",get:function get(){return this.Get('__mj_UpdatedAt');}/**
80670
+ * * Field Name: SourceViewID
80671
+ * * Display Name: Source View
80672
+ * * SQL Data Type: uniqueidentifier
80673
+ * * Related Entity/Foreign Key: MJ: User Views (vwUserViews.ID)
80674
+ * * Description: Optional ID of the User View this list was materialized from. NULL for hand-built lists. When set, the list can be refreshed against this view via ListOperations.RefreshFromSource.
80675
+ */},{key:"SourceViewID",get:function get(){return this.Get('SourceViewID');},set:function set(value){this.Set('SourceViewID',value);}/**
80676
+ * * Field Name: SourceFilterSnapshot
80677
+ * * Display Name: Source Filter Snapshot
80678
+ * * SQL Data Type: nvarchar(MAX)
80679
+ * * Description: JSON snapshot of the source filter at materialization time. When UseSnapshot=1, refreshes re-apply this snapshot rather than re-reading the live source view. Null when no snapshot was captured.
80680
+ */},{key:"SourceFilterSnapshot",get:function get(){return this.Get('SourceFilterSnapshot');},set:function set(value){this.Set('SourceFilterSnapshot',value);}/**
80681
+ * * Field Name: LastRefreshedAt
80682
+ * * Display Name: Last Refreshed At
80683
+ * * SQL Data Type: datetimeoffset
80684
+ * * Description: Timestamp (UTC) of the most recent successful RefreshFromSource. Null when the list has never been refreshed.
80685
+ */},{key:"LastRefreshedAt",get:function get(){return this.Get('LastRefreshedAt');},set:function set(value){this.Set('LastRefreshedAt',value);}/**
80686
+ * * Field Name: LastRefreshedByUserID
80687
+ * * Display Name: Last Refreshed By User ID
80688
+ * * SQL Data Type: uniqueidentifier
80689
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
80690
+ * * Description: User who triggered the most recent successful RefreshFromSource. Null when the list has never been refreshed.
80691
+ */},{key:"LastRefreshedByUserID",get:function get(){return this.Get('LastRefreshedByUserID');},set:function set(value){this.Set('LastRefreshedByUserID',value);}/**
80692
+ * * Field Name: RefreshMode
80693
+ * * Display Name: Refresh Mode
80694
+ * * SQL Data Type: nvarchar(20)
80695
+ * * Default Value: Additive
80696
+ * * Value List Type: List
80697
+ * * Possible Values
80698
+ * * Additive
80699
+ * * Sync
80700
+ * * Description: Default refresh mode for this list. Additive only adds new members; Sync reconciles in both directions (may remove members no longer in the source — requires explicit drop-confirmation).
80701
+ */},{key:"RefreshMode",get:function get(){return this.Get('RefreshMode');},set:function set(value){this.Set('RefreshMode',value);}/**
80702
+ * * Field Name: UseSnapshot
80703
+ * * Display Name: Use Snapshot
80704
+ * * SQL Data Type: bit
80705
+ * * Default Value: 0
80706
+ * * Description: When 1, RefreshFromSource uses SourceFilterSnapshot as the source. When 0 (default), it re-reads the live SourceView.
80707
+ */},{key:"UseSnapshot",get:function get(){return this.Get('UseSnapshot');},set:function set(value){this.Set('UseSnapshot',value);}/**
80484
80708
  * * Field Name: Entity
80485
- * * Display Name: Entity
80709
+ * * Display Name: Entity Name
80486
80710
  * * SQL Data Type: nvarchar(255)
80487
80711
  */},{key:"Entity",get:function get(){return this.Get('Entity');}/**
80488
80712
  * * Field Name: User
80489
- * * Display Name: User
80713
+ * * Display Name: User Name
80490
80714
  * * SQL Data Type: nvarchar(100)
80491
80715
  */},{key:"User",get:function get(){return this.Get('User');}/**
80492
80716
  * * Field Name: Category
80493
- * * Display Name: Category
80717
+ * * Display Name: Category Name
80494
80718
  * * SQL Data Type: nvarchar(100)
80495
80719
  */},{key:"Category",get:function get(){return this.Get('Category');}/**
80496
80720
  * * Field Name: CompanyIntegration
80497
- * * Display Name: Company Integration
80721
+ * * Display Name: Company Integration Name
80498
80722
  * * SQL Data Type: nvarchar(255)
80499
- */},{key:"CompanyIntegration",get:function get(){return this.Get('CompanyIntegration');}}]);}(dist/* BaseEntity */.HCJ);MJListEntity=__decorate([(0,MJGlobal_dist/* RegisterClass */.Y5)(dist/* BaseEntity */.HCJ,'MJ: Lists')],MJListEntity);/**
80723
+ */},{key:"CompanyIntegration",get:function get(){return this.Get('CompanyIntegration');}/**
80724
+ * * Field Name: SourceView
80725
+ * * Display Name: Source View Name
80726
+ * * SQL Data Type: nvarchar(100)
80727
+ */},{key:"SourceView",get:function get(){return this.Get('SourceView');}/**
80728
+ * * Field Name: LastRefreshedByUser
80729
+ * * Display Name: Last Refreshed By User
80730
+ * * SQL Data Type: nvarchar(100)
80731
+ */},{key:"LastRefreshedByUser",get:function get(){return this.Get('LastRefreshedByUser');}}]);}(dist/* BaseEntity */.HCJ);MJListEntity=__decorate([(0,MJGlobal_dist/* RegisterClass */.Y5)(dist/* BaseEntity */.HCJ,'MJ: Lists')],MJListEntity);/**
80500
80732
  * MJ: MCP Server Connection Permissions - strongly typed entity sub-class
80501
80733
  * * Schema: __mj
80502
80734
  * * Base Table: MCPServerConnectionPermission
@@ -83973,13 +84205,15 @@ _context237.p=1;_context237.n=2;return provider.BeginTransaction();case 2:_conte
83973
84205
  * * SQL Data Type: nvarchar(30)
83974
84206
  * * Value List Type: List
83975
84207
  * * Possible Values
84208
+ * * geocodio
83976
84209
  * * google
84210
+ * * here
83977
84211
  * * ip_geolocation
83978
84212
  * * manual
83979
84213
  * * native
83980
84214
  * * reference_data
83981
84215
  * * reverse
83982
- * * Description: How this geocode was produced: google (Google Geocoding API), reference_data (resolved via Country/StateProvince tables), manual (user-entered), ip_geolocation (IP lookup), native (copied from entity lat/lng fields), reverse (reverse geocode from coordinates).
84216
+ * * Description: Source that produced this geocode. One of: google, geocodio, here, reference_data, manual, ip_geolocation, native, reverse.
83983
84217
  */},{key:"GeocodingSource",get:function get(){return this.Get('GeocodingSource');},set:function set(value){this.Set('GeocodingSource',value);}/**
83984
84218
  * * Field Name: __mj_CreatedAt
83985
84219
  * * Display Name: Created At
@@ -93375,6 +93609,10 @@ var MJListDetailEntityExtended = /*#__PURE__*/function (_MJListDetailEntity) {
93375
93609
  }
93376
93610
  throw new Error('ContextCurrentUser cannot be null');
93377
93611
  case 4:
93612
+ if (this.IsSaved) {
93613
+ _context.n = 7;
93614
+ break;
93615
+ }
93378
93616
  _context.n = 5;
93379
93617
  return rv.RunView({
93380
93618
  EntityName: 'MJ: List Details',
@@ -94367,8 +94605,171 @@ function LoadMJConversationDetailEntityExtended() {
94367
94605
  }
94368
94606
  // EXTERNAL MODULE: ../../../node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js
94369
94607
  var BehaviorSubject = __webpack_require__(156);
94608
+ ;// ../../MJCoreEntities/dist/engines/artifact-mime-resolver.js
94609
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || artifact_mime_resolver_unsupportedIterableToArray(r) || _nonIterableSpread(); }
94610
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
94611
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
94612
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return artifact_mime_resolver_arrayLikeToArray(r); }
94613
+ function artifact_mime_resolver_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = artifact_mime_resolver_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
94614
+ function artifact_mime_resolver_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return artifact_mime_resolver_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? artifact_mime_resolver_arrayLikeToArray(r, a) : void 0; } }
94615
+ function artifact_mime_resolver_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
94616
+ /**
94617
+ * Pure resolver for matching an upload's MIME type (and optional file
94618
+ * extension) to a registered Artifact Type. Has no entity dependency — takes
94619
+ * a list of plain matcher records, returns the chosen ID (or undefined when
94620
+ * nothing matches).
94621
+ *
94622
+ * Resolution algorithm (per plans/artifact-attachment-unification.md §6):
94623
+ * 1. Filter to types whose ContentType pattern matches the upload MIME.
94624
+ * 2. Bucket by specificity: exact > subtype-wildcard (e.g. `image/*`).
94625
+ * 3. Within the highest-specificity bucket, sort by Priority desc.
94626
+ * 4. Tiebreaker if priorities are equal:
94627
+ * a. SystemSupplied = false beats SystemSupplied = true
94628
+ * b. otherwise lowest ID wins (deterministic).
94629
+ *
94630
+ * Octet-stream uploads also consider a file-extension hint when given.
94631
+ *
94632
+ * Conflict detection: callers can pass the same list to
94633
+ * `FindArtifactTypeConflicts` to surface ambiguous registrations at engine
94634
+ * boot, where two types share the same (ContentType, Priority, SystemSupplied)
94635
+ * triple — almost always a configuration mistake.
94636
+ */
94637
+ var SUBTYPE_WILDCARD_SUFFIX = '/*';
94638
+ function ResolveArtifactTypeByMime(matchers, mimeType, fileExtension) {
94639
+ var _ranked$;
94640
+ var normalizedMime = normalizeMime(mimeType);
94641
+ if (!normalizedMime) return undefined;
94642
+ var candidates = collectCandidates(matchers, normalizedMime, fileExtension);
94643
+ if (candidates.length === 0) return undefined;
94644
+ var ranked = rankCandidates(candidates);
94645
+ return (_ranked$ = ranked[0]) === null || _ranked$ === void 0 ? void 0 : _ranked$.matcher;
94646
+ }
94647
+ function FindArtifactTypeConflicts(matchers) {
94648
+ var groups = new Map();
94649
+ var _iterator = artifact_mime_resolver_createForOfIteratorHelper(matchers),
94650
+ _step;
94651
+ try {
94652
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
94653
+ var _normalizeMime, _groups$get;
94654
+ var m = _step.value;
94655
+ var key = "".concat((_normalizeMime = normalizeMime(m.contentType)) !== null && _normalizeMime !== void 0 ? _normalizeMime : '', "|").concat(m.priority, "|").concat(m.systemSupplied);
94656
+ var list = (_groups$get = groups.get(key)) !== null && _groups$get !== void 0 ? _groups$get : [];
94657
+ list.push(m);
94658
+ groups.set(key, list);
94659
+ }
94660
+ } catch (err) {
94661
+ _iterator.e(err);
94662
+ } finally {
94663
+ _iterator.f();
94664
+ }
94665
+ var conflicts = [];
94666
+ var _iterator2 = artifact_mime_resolver_createForOfIteratorHelper(groups.values()),
94667
+ _step2;
94668
+ try {
94669
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
94670
+ var _list = _step2.value;
94671
+ if (_list.length < 2) continue;
94672
+ conflicts.push({
94673
+ contentType: _list[0].contentType,
94674
+ priority: _list[0].priority,
94675
+ systemSupplied: _list[0].systemSupplied,
94676
+ matcherIds: _list.map(function (m) {
94677
+ return m.id;
94678
+ }),
94679
+ matcherNames: _list.map(function (m) {
94680
+ return m.name;
94681
+ })
94682
+ });
94683
+ }
94684
+ } catch (err) {
94685
+ _iterator2.e(err);
94686
+ } finally {
94687
+ _iterator2.f();
94688
+ }
94689
+ return conflicts;
94690
+ }
94691
+ function collectCandidates(matchers, mime, fileExtension) {
94692
+ var out = [];
94693
+ var ext = normalizeExtension(fileExtension);
94694
+ var isOctetStream = mime === 'application/octet-stream';
94695
+ var _iterator3 = artifact_mime_resolver_createForOfIteratorHelper(matchers),
94696
+ _step3;
94697
+ try {
94698
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
94699
+ var _m$fileExtensions;
94700
+ var m = _step3.value;
94701
+ var pattern = normalizeMime(m.contentType);
94702
+ if (!pattern) continue;
94703
+ if (pattern === mime) {
94704
+ out.push({
94705
+ matcher: m,
94706
+ specificity: 2
94707
+ });
94708
+ continue;
94709
+ }
94710
+ if (pattern.endsWith(SUBTYPE_WILDCARD_SUFFIX)) {
94711
+ var prefix = pattern.slice(0, -SUBTYPE_WILDCARD_SUFFIX.length);
94712
+ if (mime.startsWith(prefix + '/')) {
94713
+ out.push({
94714
+ matcher: m,
94715
+ specificity: 1
94716
+ });
94717
+ continue;
94718
+ }
94719
+ }
94720
+ // octet-stream extension hint: if the upload has no useful MIME but we
94721
+ // have an extension hint, allow types that registered the extension.
94722
+ if (isOctetStream && ext && (_m$fileExtensions = m.fileExtensions) !== null && _m$fileExtensions !== void 0 && _m$fileExtensions.includes(ext)) {
94723
+ out.push({
94724
+ matcher: m,
94725
+ specificity: 2
94726
+ });
94727
+ }
94728
+ }
94729
+ } catch (err) {
94730
+ _iterator3.e(err);
94731
+ } finally {
94732
+ _iterator3.f();
94733
+ }
94734
+ return out;
94735
+ }
94736
+ function rankCandidates(candidates) {
94737
+ // Highest specificity first, then Priority desc, then SystemSupplied false
94738
+ // wins over true, then lowest ID for determinism.
94739
+ var maxSpecificity = Math.max.apply(Math, _toConsumableArray(candidates.map(function (c) {
94740
+ return c.specificity;
94741
+ })));
94742
+ var topBucket = candidates.filter(function (c) {
94743
+ return c.specificity === maxSpecificity;
94744
+ });
94745
+ return _toConsumableArray(topBucket).sort(function (a, b) {
94746
+ if (b.matcher.priority !== a.matcher.priority) {
94747
+ return b.matcher.priority - a.matcher.priority;
94748
+ }
94749
+ if (a.matcher.systemSupplied !== b.matcher.systemSupplied) {
94750
+ return a.matcher.systemSupplied ? 1 : -1;
94751
+ }
94752
+ return a.matcher.id.localeCompare(b.matcher.id);
94753
+ });
94754
+ }
94755
+ function normalizeMime(value) {
94756
+ if (!value) return undefined;
94757
+ var trimmed = value.trim().toLowerCase();
94758
+ if (!trimmed) return undefined;
94759
+ // Strip any `; charset=...` parameters that browsers sometimes attach.
94760
+ var semi = trimmed.indexOf(';');
94761
+ return semi === -1 ? trimmed : trimmed.slice(0, semi).trim();
94762
+ }
94763
+ function normalizeExtension(value) {
94764
+ if (!value) return undefined;
94765
+ var trimmed = value.trim().toLowerCase().replace(/^\./, '');
94766
+ return trimmed || undefined;
94767
+ }
94370
94768
  ;// ../../MJCoreEntities/dist/engines/artifacts.js
94371
94769
  function artifacts_typeof(o) { "@babel/helpers - typeof"; return artifacts_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, artifacts_typeof(o); }
94770
+ function artifacts_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = artifacts_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
94771
+ function artifacts_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return artifacts_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? artifacts_arrayLikeToArray(r, a) : void 0; } }
94772
+ function artifacts_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
94372
94773
  function artifacts_regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return artifacts_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (artifacts_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, artifacts_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, artifacts_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), artifacts_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", artifacts_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), artifacts_regeneratorDefine2(u), artifacts_regeneratorDefine2(u, o, "Generator"), artifacts_regeneratorDefine2(u, n, function () { return this; }), artifacts_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (artifacts_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
94373
94774
  function artifacts_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } artifacts_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { artifacts_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, artifacts_regeneratorDefine2(e, r, n, t); }
94374
94775
  function artifacts_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
@@ -94389,6 +94790,7 @@ function artifacts_getPrototypeOf(t) { return artifacts_getPrototypeOf = Object.
94389
94790
  function artifacts_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && artifacts_setPrototypeOf(t, e); }
94390
94791
  function artifacts_setPrototypeOf(t, e) { return artifacts_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, artifacts_setPrototypeOf(t, e); }
94391
94792
 
94793
+
94392
94794
  /**
94393
94795
  * Caching of metadata for artifacts, artifact versions, and artifact types.
94394
94796
  */
@@ -94524,18 +94926,59 @@ var ArtifactMetadataEngine = /*#__PURE__*/function (_BaseEngine) {
94524
94926
  return (version === null || version === void 0 ? void 0 : version.ContentMode) === 'File';
94525
94927
  }
94526
94928
  /**
94527
- * Finds the artifact type whose ContentType (MIME type) matches the given
94528
- * mimeType string (case-insensitive). Used by AgentRunner to resolve the
94529
- * correct ArtifactType for file outputs such as PDFs and spreadsheets.
94929
+ * Resolves an upload's MIME type (and optional file extension) to the
94930
+ * highest-priority registered Artifact Type. Supports exact matches and
94931
+ * subtype wildcards (e.g. `text/*`, `image/*`), with deterministic
94932
+ * tiebreaking via Priority → SystemSupplied → ID. See
94933
+ * `artifact-mime-resolver.ts` for the full algorithm.
94530
94934
  */
94531
94935
  }, {
94532
94936
  key: "GetArtifactTypeByMimeType",
94533
- value: function GetArtifactTypeByMimeType(mimeType) {
94534
- if (!mimeType) return undefined;
94535
- var lower = mimeType.trim().toLowerCase();
94536
- return this._artifactTypes.find(function (t) {
94537
- return t.ContentType.trim().toLowerCase() === lower;
94937
+ value: function GetArtifactTypeByMimeType(mimeType, fileExtension) {
94938
+ var _this2 = this;
94939
+ var matchers = this._artifactTypes.map(function (t) {
94940
+ return _this2.toMatcher(t);
94538
94941
  });
94942
+ var found = ResolveArtifactTypeByMime(matchers, mimeType, fileExtension);
94943
+ return found ? this.FindArtifactTypeByID(found.id) : undefined;
94944
+ }
94945
+ /**
94946
+ * Logs WARN for any pair of registered Artifact Types that share an
94947
+ * identical (ContentType, Priority, SystemSupplied) triple — almost always
94948
+ * a configuration mistake, and the ID-tiebreaker would otherwise hide it.
94949
+ * Call after Config() to surface registry ambiguity at boot.
94950
+ */
94951
+ }, {
94952
+ key: "LogArtifactTypeRegistryConflicts",
94953
+ value: function LogArtifactTypeRegistryConflicts() {
94954
+ var _this3 = this;
94955
+ var matchers = this._artifactTypes.map(function (t) {
94956
+ return _this3.toMatcher(t);
94957
+ });
94958
+ var conflicts = FindArtifactTypeConflicts(matchers);
94959
+ var _iterator = artifacts_createForOfIteratorHelper(conflicts),
94960
+ _step;
94961
+ try {
94962
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
94963
+ var c = _step.value;
94964
+ (0,dist/* LogStatus */.b09)("WARN ArtifactMetadataEngine: ".concat(c.matcherNames.length, " Artifact Types share (ContentType=").concat(c.contentType, ", Priority=").concat(c.priority, ", SystemSupplied=").concat(c.systemSupplied, "): ").concat(c.matcherNames.join(', '), ". Resolution will use lowest-ID tiebreaker \u2014 set Priority explicitly to disambiguate."));
94965
+ }
94966
+ } catch (err) {
94967
+ _iterator.e(err);
94968
+ } finally {
94969
+ _iterator.f();
94970
+ }
94971
+ }
94972
+ }, {
94973
+ key: "toMatcher",
94974
+ value: function toMatcher(t) {
94975
+ return {
94976
+ id: t.ID,
94977
+ name: t.Name,
94978
+ contentType: t.ContentType,
94979
+ priority: t.Priority,
94980
+ systemSupplied: t.SystemSupplied
94981
+ };
94539
94982
  }
94540
94983
  }], [{
94541
94984
  key: "Instance",
@@ -94550,10 +94993,10 @@ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLim
94550
94993
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
94551
94994
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
94552
94995
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
94553
- function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || conversations_unsupportedIterableToArray(r) || _nonIterableSpread(); }
94554
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
94555
- function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
94556
- function _arrayWithoutHoles(r) { if (Array.isArray(r)) return conversations_arrayLikeToArray(r); }
94996
+ function conversations_toConsumableArray(r) { return conversations_arrayWithoutHoles(r) || conversations_iterableToArray(r) || conversations_unsupportedIterableToArray(r) || conversations_nonIterableSpread(); }
94997
+ function conversations_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
94998
+ function conversations_iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
94999
+ function conversations_arrayWithoutHoles(r) { if (Array.isArray(r)) return conversations_arrayLikeToArray(r); }
94557
95000
  function conversations_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = conversations_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
94558
95001
  function conversations_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return conversations_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? conversations_arrayLikeToArray(r, a) : void 0; } }
94559
95002
  function conversations_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -94940,7 +95383,7 @@ var ConversationEngine = /*#__PURE__*/function (_BaseEngine) {
94940
95383
  throw new Error(((_conversation$LatestR = conversation.LatestResult) === null || _conversation$LatestR === void 0 ? void 0 : _conversation$LatestR.Message) || 'Failed to create conversation');
94941
95384
  case 3:
94942
95385
  // Prepend to the list and emit
94943
- updated = [conversation].concat(_toConsumableArray(this._conversations$.value));
95386
+ updated = [conversation].concat(conversations_toConsumableArray(this._conversations$.value));
94944
95387
  this._conversations$.next(updated);
94945
95388
  return _context4.a(2, conversation);
94946
95389
  }
@@ -95008,7 +95451,7 @@ var ConversationEngine = /*#__PURE__*/function (_BaseEngine) {
95008
95451
  }
95009
95452
  // Delete failed — restore to list
95010
95453
  current = this._conversations$.value;
95011
- this._conversations$.next([conversation].concat(_toConsumableArray(current)));
95454
+ this._conversations$.next([conversation].concat(conversations_toConsumableArray(current)));
95012
95455
  throw new Error(((_conversation$LatestR2 = conversation.LatestResult) === null || _conversation$LatestR2 === void 0 ? void 0 : _conversation$LatestR2.Message) || 'Failed to delete conversation');
95013
95456
  case 6:
95014
95457
  _context5.p = 6;
@@ -95174,7 +95617,7 @@ var ConversationEngine = /*#__PURE__*/function (_BaseEngine) {
95174
95617
  return _context8.f(6);
95175
95618
  case 7:
95176
95619
  // Re-emit the list so subscribers see the update
95177
- this._conversations$.next(_toConsumableArray(this._conversations$.value));
95620
+ this._conversations$.next(conversations_toConsumableArray(this._conversations$.value));
95178
95621
  return _context8.a(2, true);
95179
95622
  }
95180
95623
  }, _callee8, this, [[4,, 6, 7]]);
@@ -96201,7 +96644,7 @@ var ConversationEngine = /*#__PURE__*/function (_BaseEngine) {
96201
96644
  var existing = this.GetConversation(id);
96202
96645
  if (existing) {
96203
96646
  this.mergeDataOntoRecord(existing, data);
96204
- this._conversations$.next(_toConsumableArray(this._conversations$.value));
96647
+ this._conversations$.next(conversations_toConsumableArray(this._conversations$.value));
96205
96648
  }
96206
96649
  } else if (action === 'delete') {
96207
96650
  var _existing = this.GetConversation(id);
@@ -96427,7 +96870,7 @@ var ConversationEngine = /*#__PURE__*/function (_BaseEngine) {
96427
96870
  }, {
96428
96871
  key: "sortConversations",
96429
96872
  value: function sortConversations(conversations) {
96430
- return _toConsumableArray(conversations).sort(function (a, b) {
96873
+ return conversations_toConsumableArray(conversations).sort(function (a, b) {
96431
96874
  var _a$__mj_UpdatedAt$get, _a$__mj_UpdatedAt, _b$__mj_UpdatedAt$get, _b$__mj_UpdatedAt;
96432
96875
  // Pinned conversations first
96433
96876
  if (a.IsPinned && !b.IsPinned) return -1;
@@ -97632,6 +98075,70 @@ var TypeTablesCache = /*#__PURE__*/(/* unused pure expression or super */ null &
97632
98075
  }
97633
98076
  }]);
97634
98077
  }(BaseEngine)));
98078
+ ;// ../../MJCoreEntities/dist/engines/artifact-content-storage.js
98079
+ /**
98080
+ * Pure helpers for how artifact content is stored and unwrapped across the
98081
+ * upload, gather, and resolver paths. Living in MJCoreEntities so both the
98082
+ * server-side entity hook (MJConversationDetailAttachmentEntityServer) and
98083
+ * the agent runtime (AgentRunner.gatherConversationArtifacts) share a single
98084
+ * source of truth — and so they're unit-testable without mounting either
98085
+ * the entity stack or the agent runtime.
98086
+ */
98087
+ var TEXTY_NON_TEXT_PREFIXED_MIMES = new Set(['application/json', 'application/xml', 'application/javascript', 'application/typescript', 'application/sql', 'application/csv']);
98088
+ /**
98089
+ * Returns true when bytes for this MIME should be stored as raw UTF-8 text
98090
+ * (so artifact tool libraries can JSON.parse / split-by-line directly).
98091
+ * Returns false for binary types whose tools work with the data-URL wrapper
98092
+ * or a FileID reference.
98093
+ */
98094
+ function IsTextyMime(mime) {
98095
+ var lower = mime.toLowerCase();
98096
+ if (lower.startsWith('text/')) return true;
98097
+ return TEXTY_NON_TEXT_PREFIXED_MIMES.has(lower);
98098
+ }
98099
+ /**
98100
+ * Decides how to store inline content on the paired ArtifactVersion for a
98101
+ * given MIME + base64 InlineData input. Text-y MIMEs get decoded to UTF-8
98102
+ * so artifact tool libraries can parse directly; binary MIMEs keep the
98103
+ * `data:<mime>;base64,…` wrapper so the resolver can recognize media for
98104
+ * inline routing and the gather path can re-decode to a Buffer for binary
98105
+ * tool libraries (xlsx, docx, pdf).
98106
+ */
98107
+ function DecideInlineStorage(mime, inlineData) {
98108
+ if (!inlineData) return {
98109
+ contentMode: 'Text',
98110
+ content: ''
98111
+ };
98112
+ if (IsTextyMime(mime)) {
98113
+ return {
98114
+ contentMode: 'Text',
98115
+ content: Buffer.from(inlineData, 'base64').toString('utf-8')
98116
+ };
98117
+ }
98118
+ return {
98119
+ contentMode: 'Text',
98120
+ content: "data:".concat(mime, ";base64,").concat(inlineData)
98121
+ };
98122
+ }
98123
+ /**
98124
+ * Builds the user-facing error string returned when an attachment's MIME
98125
+ * isn't registered with any ArtifactType.
98126
+ */
98127
+ function BuildUnregisteredMimeError(fileName, _mime) {
98128
+ var safeName = fileName !== null && fileName !== void 0 ? fileName : 'this file';
98129
+ return "\"".concat(safeName, "\" can't be attached \u2014 its file type isn't supported here. Try a PDF, Word, Excel, image, audio, video, JSON, CSV, XML, or plain-text file.");
98130
+ }
98131
+ /**
98132
+ * Decodes a `data:<mime>;base64,<payload>` URL into a raw Buffer when the
98133
+ * input matches that shape. Returns the input unchanged otherwise. Used by
98134
+ * the AgentRunner gather path so binary tool libraries (xlsx, docx, pdf)
98135
+ * receive a parseable Buffer instead of the wrapped data URL string.
98136
+ */
98137
+ function ExtractBase64FromDataUrl(input) {
98138
+ var match = /^data:[^;]+;base64,([^]*)$/.exec(input);
98139
+ if (!match) return input;
98140
+ return Buffer.from(match[1], 'base64');
98141
+ }
97635
98142
  ;// ../../MJCoreEntities/dist/engines/EncryptionEngineBase.js
97636
98143
  function EncryptionEngineBase_regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return EncryptionEngineBase_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (EncryptionEngineBase_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, EncryptionEngineBase_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, EncryptionEngineBase_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), EncryptionEngineBase_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", EncryptionEngineBase_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), EncryptionEngineBase_regeneratorDefine2(u), EncryptionEngineBase_regeneratorDefine2(u, o, "Generator"), EncryptionEngineBase_regeneratorDefine2(u, n, function () { return this; }), EncryptionEngineBase_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (EncryptionEngineBase_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
97637
98144
  function EncryptionEngineBase_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } EncryptionEngineBase_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { EncryptionEngineBase_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, EncryptionEngineBase_regeneratorDefine2(e, r, n, t); }
@@ -102750,6 +103257,210 @@ PermissionEngine = PermissionEngine_decorate([(0,dist/* RegisterForStartup */.im
102750
103257
  description: 'PermissionEngine — unified permission provider registry'
102751
103258
  })], PermissionEngine);
102752
103259
 
103260
+ ;// ../../MJCoreEntities/dist/engines/AuditLogTypeEngine.js
103261
+ /* unused harmony import specifier */ var AuditLogTypeEngine_BaseEngine;
103262
+ function AuditLogTypeEngine_typeof(o) { "@babel/helpers - typeof"; return AuditLogTypeEngine_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, AuditLogTypeEngine_typeof(o); }
103263
+ function AuditLogTypeEngine_regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return AuditLogTypeEngine_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (AuditLogTypeEngine_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, AuditLogTypeEngine_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, AuditLogTypeEngine_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), AuditLogTypeEngine_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", AuditLogTypeEngine_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), AuditLogTypeEngine_regeneratorDefine2(u), AuditLogTypeEngine_regeneratorDefine2(u, o, "Generator"), AuditLogTypeEngine_regeneratorDefine2(u, n, function () { return this; }), AuditLogTypeEngine_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (AuditLogTypeEngine_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
103264
+ function AuditLogTypeEngine_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } AuditLogTypeEngine_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { AuditLogTypeEngine_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, AuditLogTypeEngine_regeneratorDefine2(e, r, n, t); }
103265
+ function AuditLogTypeEngine_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
103266
+ function AuditLogTypeEngine_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { AuditLogTypeEngine_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { AuditLogTypeEngine_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
103267
+ function AuditLogTypeEngine_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
103268
+ function AuditLogTypeEngine_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, AuditLogTypeEngine_toPropertyKey(o.key), o); } }
103269
+ function AuditLogTypeEngine_createClass(e, r, t) { return r && AuditLogTypeEngine_defineProperties(e.prototype, r), t && AuditLogTypeEngine_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
103270
+ function AuditLogTypeEngine_toPropertyKey(t) { var i = AuditLogTypeEngine_toPrimitive(t, "string"); return "symbol" == AuditLogTypeEngine_typeof(i) ? i : i + ""; }
103271
+ function AuditLogTypeEngine_toPrimitive(t, r) { if ("object" != AuditLogTypeEngine_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != AuditLogTypeEngine_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
103272
+ function AuditLogTypeEngine_callSuper(t, o, e) { return o = AuditLogTypeEngine_getPrototypeOf(o), AuditLogTypeEngine_possibleConstructorReturn(t, AuditLogTypeEngine_isNativeReflectConstruct() ? Reflect.construct(o, e || [], AuditLogTypeEngine_getPrototypeOf(t).constructor) : o.apply(t, e)); }
103273
+ function AuditLogTypeEngine_possibleConstructorReturn(t, e) { if (e && ("object" == AuditLogTypeEngine_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return AuditLogTypeEngine_assertThisInitialized(t); }
103274
+ function AuditLogTypeEngine_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
103275
+ function AuditLogTypeEngine_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (AuditLogTypeEngine_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
103276
+ function AuditLogTypeEngine_superPropGet(t, o, e, r) { var p = AuditLogTypeEngine_get(AuditLogTypeEngine_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
103277
+ function AuditLogTypeEngine_get() { return AuditLogTypeEngine_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = AuditLogTypeEngine_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, AuditLogTypeEngine_get.apply(null, arguments); }
103278
+ function AuditLogTypeEngine_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = AuditLogTypeEngine_getPrototypeOf(t));); return t; }
103279
+ function AuditLogTypeEngine_getPrototypeOf(t) { return AuditLogTypeEngine_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, AuditLogTypeEngine_getPrototypeOf(t); }
103280
+ function AuditLogTypeEngine_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && AuditLogTypeEngine_setPrototypeOf(t, e); }
103281
+ function AuditLogTypeEngine_setPrototypeOf(t, e) { return AuditLogTypeEngine_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, AuditLogTypeEngine_setPrototypeOf(t, e); }
103282
+
103283
+ /**
103284
+ * Caches the rows of `MJ: Audit Log Types` so callers that emit audit-log
103285
+ * entries can resolve `AuditLogTypeID` by NAME instead of by hardcoded UUID.
103286
+ *
103287
+ * The seed data (under `metadata/audit-log-types/`) is the source of truth
103288
+ * for the IDs — code that hardcodes them goes stale silently if a row is
103289
+ * renamed or replaced. Code that calls `ByName(...)` fails loud at the
103290
+ * lookup site instead, which is much easier to track down.
103291
+ *
103292
+ * Singleton via `BaseEngine`. Idempotent `Config()` — subsequent calls
103293
+ * short-circuit once the cache is loaded.
103294
+ *
103295
+ * @example
103296
+ * await AuditLogTypeEngine.Instance.Config(false, contextUser, provider);
103297
+ * const t = AuditLogTypeEngine.Instance.ByName('List Shared');
103298
+ * if (!t) throw new Error('Audit log type "List Shared" not seeded');
103299
+ * auditLog.AuditLogTypeID = t.ID;
103300
+ */
103301
+ var AuditLogTypeEngine = /*#__PURE__*/(/* unused pure expression or super */ null && (function (_BaseEngine) {
103302
+ function AuditLogTypeEngine() {
103303
+ var _this;
103304
+ AuditLogTypeEngine_classCallCheck(this, AuditLogTypeEngine);
103305
+ _this = AuditLogTypeEngine_callSuper(this, AuditLogTypeEngine, arguments);
103306
+ _this._AuditLogTypes = [];
103307
+ return _this;
103308
+ }
103309
+ AuditLogTypeEngine_inherits(AuditLogTypeEngine, _BaseEngine);
103310
+ return AuditLogTypeEngine_createClass(AuditLogTypeEngine, [{
103311
+ key: "Config",
103312
+ value: function () {
103313
+ var _Config = AuditLogTypeEngine_asyncToGenerator(/*#__PURE__*/AuditLogTypeEngine_regenerator().m(function _callee(forceRefresh, contextUser, provider) {
103314
+ var c;
103315
+ return AuditLogTypeEngine_regenerator().w(function (_context) {
103316
+ while (1) switch (_context.n) {
103317
+ case 0:
103318
+ c = [{
103319
+ Type: 'entity',
103320
+ EntityName: 'MJ: Audit Log Types',
103321
+ PropertyName: '_AuditLogTypes',
103322
+ CacheLocal: true
103323
+ }];
103324
+ _context.n = 1;
103325
+ return this.Load(c, provider, forceRefresh, contextUser);
103326
+ case 1:
103327
+ return _context.a(2);
103328
+ }
103329
+ }, _callee, this);
103330
+ }));
103331
+ function Config(_x, _x2, _x3) {
103332
+ return _Config.apply(this, arguments);
103333
+ }
103334
+ return Config;
103335
+ }()
103336
+ }, {
103337
+ key: "AuditLogTypes",
103338
+ get: function get() {
103339
+ return this._AuditLogTypes;
103340
+ }
103341
+ /**
103342
+ * Look up a row by exact `Name`. Returns `undefined` if the engine
103343
+ * hasn't been configured yet or no row matches — callers should treat
103344
+ * the latter as "seed metadata missing" and throw, never silently
103345
+ * persist rows with an undefined `AuditLogTypeID`.
103346
+ */
103347
+ }, {
103348
+ key: "ByName",
103349
+ value: function ByName(name) {
103350
+ return this._AuditLogTypes.find(function (t) {
103351
+ return t.Name === name;
103352
+ });
103353
+ }
103354
+ }], [{
103355
+ key: "Instance",
103356
+ get: function get() {
103357
+ return AuditLogTypeEngine_superPropGet(AuditLogTypeEngine, "getInstance", this, 2)([]);
103358
+ }
103359
+ }]);
103360
+ }(AuditLogTypeEngine_BaseEngine)));
103361
+ ;// ../../MJCoreEntities/dist/engines/ResourceTypeEngine.js
103362
+ /* unused harmony import specifier */ var ResourceTypeEngine_BaseEngine;
103363
+ function ResourceTypeEngine_typeof(o) { "@babel/helpers - typeof"; return ResourceTypeEngine_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, ResourceTypeEngine_typeof(o); }
103364
+ function ResourceTypeEngine_regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return ResourceTypeEngine_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (ResourceTypeEngine_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, ResourceTypeEngine_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, ResourceTypeEngine_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), ResourceTypeEngine_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", ResourceTypeEngine_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), ResourceTypeEngine_regeneratorDefine2(u), ResourceTypeEngine_regeneratorDefine2(u, o, "Generator"), ResourceTypeEngine_regeneratorDefine2(u, n, function () { return this; }), ResourceTypeEngine_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (ResourceTypeEngine_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
103365
+ function ResourceTypeEngine_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } ResourceTypeEngine_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { ResourceTypeEngine_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, ResourceTypeEngine_regeneratorDefine2(e, r, n, t); }
103366
+ function ResourceTypeEngine_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
103367
+ function ResourceTypeEngine_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { ResourceTypeEngine_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { ResourceTypeEngine_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
103368
+ function ResourceTypeEngine_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
103369
+ function ResourceTypeEngine_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, ResourceTypeEngine_toPropertyKey(o.key), o); } }
103370
+ function ResourceTypeEngine_createClass(e, r, t) { return r && ResourceTypeEngine_defineProperties(e.prototype, r), t && ResourceTypeEngine_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
103371
+ function ResourceTypeEngine_toPropertyKey(t) { var i = ResourceTypeEngine_toPrimitive(t, "string"); return "symbol" == ResourceTypeEngine_typeof(i) ? i : i + ""; }
103372
+ function ResourceTypeEngine_toPrimitive(t, r) { if ("object" != ResourceTypeEngine_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != ResourceTypeEngine_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
103373
+ function ResourceTypeEngine_callSuper(t, o, e) { return o = ResourceTypeEngine_getPrototypeOf(o), ResourceTypeEngine_possibleConstructorReturn(t, ResourceTypeEngine_isNativeReflectConstruct() ? Reflect.construct(o, e || [], ResourceTypeEngine_getPrototypeOf(t).constructor) : o.apply(t, e)); }
103374
+ function ResourceTypeEngine_possibleConstructorReturn(t, e) { if (e && ("object" == ResourceTypeEngine_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return ResourceTypeEngine_assertThisInitialized(t); }
103375
+ function ResourceTypeEngine_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
103376
+ function ResourceTypeEngine_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (ResourceTypeEngine_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
103377
+ function ResourceTypeEngine_superPropGet(t, o, e, r) { var p = ResourceTypeEngine_get(ResourceTypeEngine_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
103378
+ function ResourceTypeEngine_get() { return ResourceTypeEngine_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = ResourceTypeEngine_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, ResourceTypeEngine_get.apply(null, arguments); }
103379
+ function ResourceTypeEngine_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = ResourceTypeEngine_getPrototypeOf(t));); return t; }
103380
+ function ResourceTypeEngine_getPrototypeOf(t) { return ResourceTypeEngine_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, ResourceTypeEngine_getPrototypeOf(t); }
103381
+ function ResourceTypeEngine_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && ResourceTypeEngine_setPrototypeOf(t, e); }
103382
+ function ResourceTypeEngine_setPrototypeOf(t, e) { return ResourceTypeEngine_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, ResourceTypeEngine_setPrototypeOf(t, e); }
103383
+
103384
+ /**
103385
+ * Caches the rows of `MJ: Resource Types` so callers that scope a
103386
+ * `MJResourcePermission` (or any resource-typed surface) to a specific kind
103387
+ * of resource can resolve `ResourceTypeID` by NAME instead of by hardcoded
103388
+ * UUID.
103389
+ *
103390
+ * The seed data (under `metadata/resource-types/`) is the source of truth
103391
+ * for the IDs — code that hardcodes them goes stale silently if a row is
103392
+ * renamed or replaced. Code that calls `ByName(...)` fails loud at the
103393
+ * lookup site, which is much easier to track down.
103394
+ *
103395
+ * Singleton via `BaseEngine`. Idempotent `Config()` — subsequent calls
103396
+ * short-circuit once the cache is loaded.
103397
+ *
103398
+ * @example
103399
+ * await ResourceTypeEngine.Instance.Config(false, contextUser, provider);
103400
+ * const rt = ResourceTypeEngine.Instance.ByName('Lists');
103401
+ * if (!rt) throw new Error('Resource type "Lists" not seeded');
103402
+ * permission.ResourceTypeID = rt.ID;
103403
+ */
103404
+ var ResourceTypeEngine = /*#__PURE__*/(/* unused pure expression or super */ null && (function (_BaseEngine) {
103405
+ function ResourceTypeEngine() {
103406
+ var _this;
103407
+ ResourceTypeEngine_classCallCheck(this, ResourceTypeEngine);
103408
+ _this = ResourceTypeEngine_callSuper(this, ResourceTypeEngine, arguments);
103409
+ _this._ResourceTypes = [];
103410
+ return _this;
103411
+ }
103412
+ ResourceTypeEngine_inherits(ResourceTypeEngine, _BaseEngine);
103413
+ return ResourceTypeEngine_createClass(ResourceTypeEngine, [{
103414
+ key: "Config",
103415
+ value: function () {
103416
+ var _Config = ResourceTypeEngine_asyncToGenerator(/*#__PURE__*/ResourceTypeEngine_regenerator().m(function _callee(forceRefresh, contextUser, provider) {
103417
+ var c;
103418
+ return ResourceTypeEngine_regenerator().w(function (_context) {
103419
+ while (1) switch (_context.n) {
103420
+ case 0:
103421
+ c = [{
103422
+ Type: 'entity',
103423
+ EntityName: 'MJ: Resource Types',
103424
+ PropertyName: '_ResourceTypes',
103425
+ CacheLocal: true
103426
+ }];
103427
+ _context.n = 1;
103428
+ return this.Load(c, provider, forceRefresh, contextUser);
103429
+ case 1:
103430
+ return _context.a(2);
103431
+ }
103432
+ }, _callee, this);
103433
+ }));
103434
+ function Config(_x, _x2, _x3) {
103435
+ return _Config.apply(this, arguments);
103436
+ }
103437
+ return Config;
103438
+ }()
103439
+ }, {
103440
+ key: "ResourceTypes",
103441
+ get: function get() {
103442
+ return this._ResourceTypes;
103443
+ }
103444
+ /**
103445
+ * Look up a row by exact `Name`. Returns `undefined` if the engine
103446
+ * hasn't been configured yet or no row matches — callers should treat
103447
+ * the latter as "seed metadata missing" and throw, never silently
103448
+ * persist rows with an undefined `ResourceTypeID`.
103449
+ */
103450
+ }, {
103451
+ key: "ByName",
103452
+ value: function ByName(name) {
103453
+ return this._ResourceTypes.find(function (rt) {
103454
+ return rt.Name === name;
103455
+ });
103456
+ }
103457
+ }], [{
103458
+ key: "Instance",
103459
+ get: function get() {
103460
+ return ResourceTypeEngine_superPropGet(ResourceTypeEngine, "getInstance", this, 2)([]);
103461
+ }
103462
+ }]);
103463
+ }(ResourceTypeEngine_BaseEngine)));
102753
103464
  ;// ../../MJCoreEntities/dist/custom/PermissionProviders/EntityPermissionProvider.js
102754
103465
  function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(EntityPermissionProvider_typeof(e) + " is not iterable"); }
102755
103466
  function EntityPermissionProvider_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = EntityPermissionProvider_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
@@ -107785,6 +108496,10 @@ function LoadPermissionEntityExtensions() {
107785
108496
 
107786
108497
 
107787
108498
 
108499
+
108500
+
108501
+
108502
+
107788
108503
 
107789
108504
 
107790
108505
 
@@ -107844,7 +108559,8 @@ var MJEventType = {
107844
108559
  LoginFailed: 'LoginFailed',
107845
108560
  LogoutFailed: 'LogoutFailed',
107846
108561
  ManualResizeRequest: 'ManualResizeRequest',
107847
- DisplaySimpleNotificationRequest: 'DisplaySimpleNotificationRequest'
108562
+ DisplaySimpleNotificationRequest: 'DisplaySimpleNotificationRequest',
108563
+ TenantChanged: 'TenantChanged'
107848
108564
  };
107849
108565
  // EXTERNAL MODULE: ../../../node_modules/uuid/dist/v4.js + 3 modules
107850
108566
  var v4 = __webpack_require__(718);
@@ -117092,8 +117808,8 @@ var ComponentRegistry = /*#__PURE__*/function () {
117092
117808
  var dist = __webpack_require__(310);
117093
117809
  // EXTERNAL MODULE: ../../MJGlobal/dist/index.js + 17 modules
117094
117810
  var MJGlobal_dist = __webpack_require__(232);
117095
- // EXTERNAL MODULE: ../../MJCoreEntities/dist/index.js + 47 modules
117096
- var MJCoreEntities_dist = __webpack_require__(346);
117811
+ // EXTERNAL MODULE: ../../MJCoreEntities/dist/index.js + 51 modules
117812
+ var MJCoreEntities_dist = __webpack_require__(793);
117097
117813
  ;// ./dist/registry/component-registry-service.js
117098
117814
  function component_registry_service_typeof(o) { "@babel/helpers - typeof"; return component_registry_service_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, component_registry_service_typeof(o); }
117099
117815
  var _ComponentRegistryService;