@xpert-ai/contracts 3.21.2 → 3.22.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.
package/index.cjs.js CHANGED
@@ -90,13 +90,13 @@ function resolveI18nText(value) {
90
90
  return null;
91
91
  }
92
92
 
93
- function _array_like_to_array$f(arr, len) {
93
+ function _array_like_to_array$g(arr, len) {
94
94
  if (len == null || len > arr.length) len = arr.length;
95
95
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
96
96
  return arr2;
97
97
  }
98
98
  function _array_without_holes$8(arr) {
99
- if (Array.isArray(arr)) return _array_like_to_array$f(arr);
99
+ if (Array.isArray(arr)) return _array_like_to_array$g(arr);
100
100
  }
101
101
  function _iterable_to_array$a(iter) {
102
102
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -105,15 +105,15 @@ function _non_iterable_spread$8() {
105
105
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
106
106
  }
107
107
  function _to_consumable_array$8(arr) {
108
- return _array_without_holes$8(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$8();
108
+ return _array_without_holes$8(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$8();
109
109
  }
110
- function _unsupported_iterable_to_array$f(o, minLen) {
110
+ function _unsupported_iterable_to_array$g(o, minLen) {
111
111
  if (!o) return;
112
- if (typeof o === "string") return _array_like_to_array$f(o, minLen);
112
+ if (typeof o === "string") return _array_like_to_array$g(o, minLen);
113
113
  var n = Object.prototype.toString.call(o).slice(8, -1);
114
114
  if (n === "Object" && o.constructor) n = o.constructor.name;
115
115
  if (n === "Map" || n === "Set") return Array.from(n);
116
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
116
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
117
117
  }
118
118
  var _uuidGenerator;
119
119
  var uuidGenerator = new ShortUniqueId({
@@ -154,13 +154,13 @@ function letterStartSUID(start) {
154
154
  "FileOutput"
155
155
  ];
156
156
 
157
- /** A summary's incoming dependencies constrain its children without making them wait for the summary itself. */ function _array_like_to_array$e(arr, len) {
157
+ /** A summary's incoming dependencies constrain its children without making them wait for the summary itself. */ function _array_like_to_array$f(arr, len) {
158
158
  if (len == null || len > arr.length) len = arr.length;
159
159
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
160
160
  return arr2;
161
161
  }
162
162
  function _array_without_holes$7(arr) {
163
- if (Array.isArray(arr)) return _array_like_to_array$e(arr);
163
+ if (Array.isArray(arr)) return _array_like_to_array$f(arr);
164
164
  }
165
165
  function _iterable_to_array$9(iter) {
166
166
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -169,15 +169,15 @@ function _non_iterable_spread$7() {
169
169
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
170
170
  }
171
171
  function _to_consumable_array$7(arr) {
172
- return _array_without_holes$7(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$7();
172
+ return _array_without_holes$7(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$7();
173
173
  }
174
- function _unsupported_iterable_to_array$e(o, minLen) {
174
+ function _unsupported_iterable_to_array$f(o, minLen) {
175
175
  if (!o) return;
176
- if (typeof o === "string") return _array_like_to_array$e(o, minLen);
176
+ if (typeof o === "string") return _array_like_to_array$f(o, minLen);
177
177
  var n = Object.prototype.toString.call(o).slice(8, -1);
178
178
  if (n === "Object" && o.constructor) n = o.constructor.name;
179
179
  if (n === "Map" || n === "Set") return Array.from(n);
180
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
180
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
181
181
  }
182
182
  function schedulePredecessors(task, byId) {
183
183
  var ids = new Set(task.predecessorIds);
@@ -1667,16 +1667,16 @@ function toIsoString(value) {
1667
1667
  return new Date().toISOString();
1668
1668
  }
1669
1669
 
1670
- function _array_like_to_array$d(arr, len) {
1670
+ function _array_like_to_array$e(arr, len) {
1671
1671
  if (len == null || len > arr.length) len = arr.length;
1672
1672
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1673
1673
  return arr2;
1674
1674
  }
1675
- function _array_with_holes$8(arr) {
1675
+ function _array_with_holes$9(arr) {
1676
1676
  if (Array.isArray(arr)) return arr;
1677
1677
  }
1678
1678
  function _array_without_holes$6(arr) {
1679
- if (Array.isArray(arr)) return _array_like_to_array$d(arr);
1679
+ if (Array.isArray(arr)) return _array_like_to_array$e(arr);
1680
1680
  }
1681
1681
  function _define_property$d(obj, key, value) {
1682
1682
  if (key in obj) {
@@ -1694,7 +1694,7 @@ function _define_property$d(obj, key, value) {
1694
1694
  function _iterable_to_array$8(iter) {
1695
1695
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1696
1696
  }
1697
- function _iterable_to_array_limit$6(arr, i) {
1697
+ function _iterable_to_array_limit$7(arr, i) {
1698
1698
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1699
1699
  if (_i == null) return;
1700
1700
  var _arr = [];
@@ -1718,7 +1718,7 @@ function _iterable_to_array_limit$6(arr, i) {
1718
1718
  }
1719
1719
  return _arr;
1720
1720
  }
1721
- function _non_iterable_rest$8() {
1721
+ function _non_iterable_rest$9() {
1722
1722
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1723
1723
  }
1724
1724
  function _non_iterable_spread$6() {
@@ -1758,19 +1758,19 @@ function _object_spread_props$8(target, source) {
1758
1758
  }
1759
1759
  return target;
1760
1760
  }
1761
- function _sliced_to_array$6(arr, i) {
1762
- return _array_with_holes$8(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$8();
1761
+ function _sliced_to_array$7(arr, i) {
1762
+ return _array_with_holes$9(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$e(arr, i) || _non_iterable_rest$9();
1763
1763
  }
1764
1764
  function _to_consumable_array$6(arr) {
1765
- return _array_without_holes$6(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$6();
1765
+ return _array_without_holes$6(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$6();
1766
1766
  }
1767
- function _unsupported_iterable_to_array$d(o, minLen) {
1767
+ function _unsupported_iterable_to_array$e(o, minLen) {
1768
1768
  if (!o) return;
1769
- if (typeof o === "string") return _array_like_to_array$d(o, minLen);
1769
+ if (typeof o === "string") return _array_like_to_array$e(o, minLen);
1770
1770
  var n = Object.prototype.toString.call(o).slice(8, -1);
1771
1771
  if (n === "Object" && o.constructor) n = o.constructor.name;
1772
1772
  if (n === "Map" || n === "Set") return Array.from(n);
1773
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
1773
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
1774
1774
  }
1775
1775
  exports.AssistantCode = void 0;
1776
1776
  (function(AssistantCode) {
@@ -1827,7 +1827,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1827
1827
  }
1828
1828
  var _value_toolsets;
1829
1829
  var toolsets = Object.entries((_value_toolsets = value.toolsets) !== null && _value_toolsets !== void 0 ? _value_toolsets : {}).reduce(function(acc, param) {
1830
- var _param = _sliced_to_array$6(param, 2), key = _param[0], item = _param[1];
1830
+ var _param = _sliced_to_array$7(param, 2), key = _param[0], item = _param[1];
1831
1831
  var nodeKey = normalizeAssistantBindingPreferenceKey(key);
1832
1832
  var toolsetName = normalizeAssistantBindingPreferenceKey(item === null || item === void 0 ? void 0 : item.toolsetName);
1833
1833
  if (!nodeKey || !toolsetName) {
@@ -1842,7 +1842,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1842
1842
  }, {});
1843
1843
  var _value_middlewares;
1844
1844
  var middlewares = Object.entries((_value_middlewares = value.middlewares) !== null && _value_middlewares !== void 0 ? _value_middlewares : {}).reduce(function(acc, param) {
1845
- var _param = _sliced_to_array$6(param, 2), key = _param[0], item = _param[1];
1845
+ var _param = _sliced_to_array$7(param, 2), key = _param[0], item = _param[1];
1846
1846
  var nodeKey = normalizeAssistantBindingPreferenceKey(key);
1847
1847
  var provider = normalizeAssistantBindingPreferenceKey(item === null || item === void 0 ? void 0 : item.provider);
1848
1848
  if (!nodeKey || !provider) {
@@ -1856,7 +1856,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1856
1856
  }, {});
1857
1857
  var _value_skills;
1858
1858
  var skills = Object.entries((_value_skills = value.skills) !== null && _value_skills !== void 0 ? _value_skills : {}).reduce(function(acc, param) {
1859
- var _param = _sliced_to_array$6(param, 2), key = _param[0], item = _param[1];
1859
+ var _param = _sliced_to_array$7(param, 2), key = _param[0], item = _param[1];
1860
1860
  var workspaceKey = normalizeAssistantBindingPreferenceKey(key);
1861
1861
  var workspaceId = normalizeAssistantBindingPreferenceKey(item === null || item === void 0 ? void 0 : item.workspaceId) || workspaceKey;
1862
1862
  if (!workspaceKey || !workspaceId) {
@@ -2073,13 +2073,13 @@ function isSystemManagedAssistant(code) {
2073
2073
  }
2074
2074
 
2075
2075
  // Shared by Cloud and Desktop: activity changes must not move assistant entries.
2076
- function _array_like_to_array$c(arr, len) {
2076
+ function _array_like_to_array$d(arr, len) {
2077
2077
  if (len == null || len > arr.length) len = arr.length;
2078
2078
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2079
2079
  return arr2;
2080
2080
  }
2081
2081
  function _array_without_holes$5(arr) {
2082
- if (Array.isArray(arr)) return _array_like_to_array$c(arr);
2082
+ if (Array.isArray(arr)) return _array_like_to_array$d(arr);
2083
2083
  }
2084
2084
  function _instanceof(left, right) {
2085
2085
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
@@ -2095,15 +2095,15 @@ function _non_iterable_spread$5() {
2095
2095
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2096
2096
  }
2097
2097
  function _to_consumable_array$5(arr) {
2098
- return _array_without_holes$5(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$5();
2098
+ return _array_without_holes$5(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$5();
2099
2099
  }
2100
- function _unsupported_iterable_to_array$c(o, minLen) {
2100
+ function _unsupported_iterable_to_array$d(o, minLen) {
2101
2101
  if (!o) return;
2102
- if (typeof o === "string") return _array_like_to_array$c(o, minLen);
2102
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
2103
2103
  var n = Object.prototype.toString.call(o).slice(8, -1);
2104
2104
  if (n === "Object" && o.constructor) n = o.constructor.name;
2105
2105
  if (n === "Map" || n === "Set") return Array.from(n);
2106
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
2106
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
2107
2107
  }
2108
2108
  function orderAssistantXperts(items) {
2109
2109
  var orderedIds = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
@@ -2357,13 +2357,13 @@ exports.AiModelTypeEnum = void 0;
2357
2357
  AiModelTypeEnum["VIDEO"] = "video";
2358
2358
  })(exports.AiModelTypeEnum || (exports.AiModelTypeEnum = {}));
2359
2359
 
2360
- function _array_like_to_array$b(arr, len) {
2360
+ function _array_like_to_array$c(arr, len) {
2361
2361
  if (len == null || len > arr.length) len = arr.length;
2362
2362
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2363
2363
  return arr2;
2364
2364
  }
2365
2365
  function _array_without_holes$4(arr) {
2366
- if (Array.isArray(arr)) return _array_like_to_array$b(arr);
2366
+ if (Array.isArray(arr)) return _array_like_to_array$c(arr);
2367
2367
  }
2368
2368
  function _define_property$b(obj, key, value) {
2369
2369
  if (key in obj) {
@@ -2419,15 +2419,15 @@ function _object_spread_props$7(target, source) {
2419
2419
  return target;
2420
2420
  }
2421
2421
  function _to_consumable_array$4(arr) {
2422
- return _array_without_holes$4(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$4();
2422
+ return _array_without_holes$4(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$4();
2423
2423
  }
2424
- function _unsupported_iterable_to_array$b(o, minLen) {
2424
+ function _unsupported_iterable_to_array$c(o, minLen) {
2425
2425
  if (!o) return;
2426
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
2426
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
2427
2427
  var n = Object.prototype.toString.call(o).slice(8, -1);
2428
2428
  if (n === "Object" && o.constructor) n = o.constructor.name;
2429
2429
  if (n === "Map" || n === "Set") return Array.from(n);
2430
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
2430
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
2431
2431
  }
2432
2432
  var discoverableModelTypes = [
2433
2433
  exports.AiModelTypeEnum.LLM,
@@ -3227,12 +3227,12 @@ var VariableOperations = [
3227
3227
  }
3228
3228
  ];
3229
3229
 
3230
- function _array_like_to_array$a(arr, len) {
3230
+ function _array_like_to_array$b(arr, len) {
3231
3231
  if (len == null || len > arr.length) len = arr.length;
3232
3232
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3233
3233
  return arr2;
3234
3234
  }
3235
- function _array_with_holes$7(arr) {
3235
+ function _array_with_holes$8(arr) {
3236
3236
  if (Array.isArray(arr)) return arr;
3237
3237
  }
3238
3238
  function _define_property$9(obj, key, value) {
@@ -3248,7 +3248,7 @@ function _define_property$9(obj, key, value) {
3248
3248
  }
3249
3249
  return obj;
3250
3250
  }
3251
- function _iterable_to_array_limit$5(arr, i) {
3251
+ function _iterable_to_array_limit$6(arr, i) {
3252
3252
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3253
3253
  if (_i == null) return;
3254
3254
  var _arr = [];
@@ -3272,7 +3272,7 @@ function _iterable_to_array_limit$5(arr, i) {
3272
3272
  }
3273
3273
  return _arr;
3274
3274
  }
3275
- function _non_iterable_rest$7() {
3275
+ function _non_iterable_rest$8() {
3276
3276
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3277
3277
  }
3278
3278
  function _object_spread$8(target) {
@@ -3309,16 +3309,16 @@ function _object_spread_props$5(target, source) {
3309
3309
  }
3310
3310
  return target;
3311
3311
  }
3312
- function _sliced_to_array$5(arr, i) {
3313
- return _array_with_holes$7(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$7();
3312
+ function _sliced_to_array$6(arr, i) {
3313
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$8();
3314
3314
  }
3315
- function _unsupported_iterable_to_array$a(o, minLen) {
3315
+ function _unsupported_iterable_to_array$b(o, minLen) {
3316
3316
  if (!o) return;
3317
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
3317
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
3318
3318
  var n = Object.prototype.toString.call(o).slice(8, -1);
3319
3319
  if (n === "Object" && o.constructor) n = o.constructor.name;
3320
3320
  if (n === "Map" || n === "Set") return Array.from(n);
3321
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
3321
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
3322
3322
  }
3323
3323
  /**
3324
3324
  * @deprecated can use getCurrentTaskInput instead?
@@ -3400,7 +3400,7 @@ function configurableStoreNamespace(configurable) {
3400
3400
  * @param value
3401
3401
  * @returns
3402
3402
  */ function setStateVariable(state, varName, value) {
3403
- var _varName_split = _sliced_to_array$5(varName.split("."), 2), agentChannelName = _varName_split[0], variableName = _varName_split[1];
3403
+ var _varName_split = _sliced_to_array$6(varName.split("."), 2), agentChannelName = _varName_split[0], variableName = _varName_split[1];
3404
3404
  if (variableName) {
3405
3405
  var _state_agentChannelName;
3406
3406
  state[agentChannelName] = _object_spread_props$5(_object_spread$8({}, (_state_agentChannelName = state[agentChannelName]) !== null && _state_agentChannelName !== void 0 ? _state_agentChannelName : {}), _define_property$9({}, variableName, value));
@@ -3675,13 +3675,13 @@ var _retrieval_recall_contentScope;
3675
3675
  });
3676
3676
  }
3677
3677
 
3678
- function _array_like_to_array$9(arr, len) {
3678
+ function _array_like_to_array$a(arr, len) {
3679
3679
  if (len == null || len > arr.length) len = arr.length;
3680
3680
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3681
3681
  return arr2;
3682
3682
  }
3683
3683
  function _array_without_holes$3(arr) {
3684
- if (Array.isArray(arr)) return _array_like_to_array$9(arr);
3684
+ if (Array.isArray(arr)) return _array_like_to_array$a(arr);
3685
3685
  }
3686
3686
  function _iterable_to_array$5(iter) {
3687
3687
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -3690,15 +3690,15 @@ function _non_iterable_spread$3() {
3690
3690
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3691
3691
  }
3692
3692
  function _to_consumable_array$3(arr) {
3693
- return _array_without_holes$3(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$3();
3693
+ return _array_without_holes$3(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$3();
3694
3694
  }
3695
- function _unsupported_iterable_to_array$9(o, minLen) {
3695
+ function _unsupported_iterable_to_array$a(o, minLen) {
3696
3696
  if (!o) return;
3697
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
3697
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
3698
3698
  var n = Object.prototype.toString.call(o).slice(8, -1);
3699
3699
  if (n === "Object" && o.constructor) n = o.constructor.name;
3700
3700
  if (n === "Map" || n === "Set") return Array.from(n);
3701
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
3701
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
3702
3702
  }
3703
3703
  var BUILTIN_KNOWLEDGE_PARSER = "builtin";
3704
3704
  /** Only formats with a real builtin reader; unknown binary formats are not advertised as text. */ var BUILTIN_KNOWLEDGE_FILE_TYPES = [
@@ -3788,13 +3788,13 @@ function knowledgebaseParserSelection(config, documentType) {
3788
3788
  })));
3789
3789
  }
3790
3790
 
3791
- function _array_like_to_array$8(arr, len) {
3791
+ function _array_like_to_array$9(arr, len) {
3792
3792
  if (len == null || len > arr.length) len = arr.length;
3793
3793
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3794
3794
  return arr2;
3795
3795
  }
3796
3796
  function _array_without_holes$2(arr) {
3797
- if (Array.isArray(arr)) return _array_like_to_array$8(arr);
3797
+ if (Array.isArray(arr)) return _array_like_to_array$9(arr);
3798
3798
  }
3799
3799
  function _define_property$7(obj, key, value) {
3800
3800
  if (key in obj) {
@@ -3831,15 +3831,15 @@ function _object_spread$6(target) {
3831
3831
  return target;
3832
3832
  }
3833
3833
  function _to_consumable_array$2(arr) {
3834
- return _array_without_holes$2(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$2();
3834
+ return _array_without_holes$2(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$2();
3835
3835
  }
3836
- function _unsupported_iterable_to_array$8(o, minLen) {
3836
+ function _unsupported_iterable_to_array$9(o, minLen) {
3837
3837
  if (!o) return;
3838
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
3838
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
3839
3839
  var n = Object.prototype.toString.call(o).slice(8, -1);
3840
3840
  if (n === "Object" && o.constructor) n = o.constructor.name;
3841
3841
  if (n === "Map" || n === "Set") return Array.from(n);
3842
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
3842
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
3843
3843
  }
3844
3844
  /** Only copy configured defaults; do not turn built-in defaults into document overrides. */ function knowledgebaseDocumentParserDefaults(config, documentType) {
3845
3845
  if (!config) return {};
@@ -4787,13 +4787,13 @@ function buildXpertMarketplaceProfileSnapshot(input, draft) {
4787
4787
  }
4788
4788
 
4789
4789
  // Helpers
4790
- function _array_like_to_array$7(arr, len) {
4790
+ function _array_like_to_array$8(arr, len) {
4791
4791
  if (len == null || len > arr.length) len = arr.length;
4792
4792
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4793
4793
  return arr2;
4794
4794
  }
4795
4795
  function _array_without_holes$1(arr) {
4796
- if (Array.isArray(arr)) return _array_like_to_array$7(arr);
4796
+ if (Array.isArray(arr)) return _array_like_to_array$8(arr);
4797
4797
  }
4798
4798
  function _define_property$5(obj, key, value) {
4799
4799
  if (key in obj) {
@@ -4876,15 +4876,15 @@ function _object_without_properties_loose$1(source, excluded) {
4876
4876
  return target;
4877
4877
  }
4878
4878
  function _to_consumable_array$1(arr) {
4879
- return _array_without_holes$1(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$1();
4879
+ return _array_without_holes$1(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$1();
4880
4880
  }
4881
- function _unsupported_iterable_to_array$7(o, minLen) {
4881
+ function _unsupported_iterable_to_array$8(o, minLen) {
4882
4882
  if (!o) return;
4883
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
4883
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
4884
4884
  var n = Object.prototype.toString.call(o).slice(8, -1);
4885
4885
  if (n === "Object" && o.constructor) n = o.constructor.name;
4886
4886
  if (n === "Map" || n === "Set") return Array.from(n);
4887
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
4887
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
4888
4888
  }
4889
4889
  function omitXpertRelations(xpert) {
4890
4890
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -5617,30 +5617,30 @@ exports.KnowledgeGraphIndexJobStatus = void 0;
5617
5617
  var KNOWLEDGE_GRAPH_DOCUMENT_STATUS_BATCH_SIZE = 100;
5618
5618
 
5619
5619
  // Skill types
5620
- function _array_like_to_array$6(arr, len) {
5620
+ function _array_like_to_array$7(arr, len) {
5621
5621
  if (len == null || len > arr.length) len = arr.length;
5622
5622
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5623
5623
  return arr2;
5624
5624
  }
5625
- function _array_with_holes$6(arr) {
5625
+ function _array_with_holes$7(arr) {
5626
5626
  if (Array.isArray(arr)) return arr;
5627
5627
  }
5628
5628
  function _iterable_to_array$2(iter) {
5629
5629
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
5630
5630
  }
5631
- function _non_iterable_rest$6() {
5631
+ function _non_iterable_rest$7() {
5632
5632
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5633
5633
  }
5634
5634
  function _to_array$1(arr) {
5635
- return _array_with_holes$6(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_rest$6();
5635
+ return _array_with_holes$7(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_rest$7();
5636
5636
  }
5637
- function _unsupported_iterable_to_array$6(o, minLen) {
5637
+ function _unsupported_iterable_to_array$7(o, minLen) {
5638
5638
  if (!o) return;
5639
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
5639
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
5640
5640
  var n = Object.prototype.toString.call(o).slice(8, -1);
5641
5641
  if (n === "Object" && o.constructor) n = o.constructor.name;
5642
5642
  if (n === "Map" || n === "Set") return Array.from(n);
5643
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
5643
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
5644
5644
  }
5645
5645
  var RUNTIME_SKILL_CAPABILITY_ID_PREFIX = "runtime-skill/v1";
5646
5646
  function createRuntimeSkillCapabilityId(source) {
@@ -5674,15 +5674,15 @@ function genXpertSkillKey() {
5674
5674
  return letterStartSUID("Skill_");
5675
5675
  }
5676
5676
 
5677
- function _array_like_to_array$5(arr, len) {
5677
+ function _array_like_to_array$6(arr, len) {
5678
5678
  if (len == null || len > arr.length) len = arr.length;
5679
5679
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5680
5680
  return arr2;
5681
5681
  }
5682
- function _array_with_holes$5(arr) {
5682
+ function _array_with_holes$6(arr) {
5683
5683
  if (Array.isArray(arr)) return arr;
5684
5684
  }
5685
- function _iterable_to_array_limit$4(arr, i) {
5685
+ function _iterable_to_array_limit$5(arr, i) {
5686
5686
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
5687
5687
  if (_i == null) return;
5688
5688
  var _arr = [];
@@ -5706,19 +5706,19 @@ function _iterable_to_array_limit$4(arr, i) {
5706
5706
  }
5707
5707
  return _arr;
5708
5708
  }
5709
- function _non_iterable_rest$5() {
5709
+ function _non_iterable_rest$6() {
5710
5710
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5711
5711
  }
5712
- function _sliced_to_array$4(arr, i) {
5713
- return _array_with_holes$5(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$5();
5712
+ function _sliced_to_array$5(arr, i) {
5713
+ return _array_with_holes$6(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$6();
5714
5714
  }
5715
- function _unsupported_iterable_to_array$5(o, minLen) {
5715
+ function _unsupported_iterable_to_array$6(o, minLen) {
5716
5716
  if (!o) return;
5717
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
5717
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
5718
5718
  var n = Object.prototype.toString.call(o).slice(8, -1);
5719
5719
  if (n === "Object" && o.constructor) n = o.constructor.name;
5720
5720
  if (n === "Map" || n === "Set") return Array.from(n);
5721
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
5721
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
5722
5722
  }
5723
5723
  var IGNORED_BOOLEAN_FLAGS = new Set([
5724
5724
  "-y",
@@ -5933,7 +5933,7 @@ function parseGithubSource(source) {
5933
5933
  return parseGithubUrl(raw);
5934
5934
  }
5935
5935
  if (/^[^/\s]+\/[^/\s]+$/.test(raw)) {
5936
- var _raw_split = _sliced_to_array$4(raw.split("/"), 2), owner = _raw_split[0], repoSegment = _raw_split[1];
5936
+ var _raw_split = _sliced_to_array$5(raw.split("/"), 2), owner = _raw_split[0], repoSegment = _raw_split[1];
5937
5937
  var repo = repoSegment.replace(/\.git$/i, "");
5938
5938
  if (!repo) {
5939
5939
  throw new Error("GitHub repository source must include owner and repository name");
@@ -6122,16 +6122,16 @@ function isContextCompressionComponentData(value) {
6122
6122
  "job"
6123
6123
  ];
6124
6124
 
6125
- function _array_like_to_array$4(arr, len) {
6125
+ function _array_like_to_array$5(arr, len) {
6126
6126
  if (len == null || len > arr.length) len = arr.length;
6127
6127
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6128
6128
  return arr2;
6129
6129
  }
6130
- function _array_with_holes$4(arr) {
6130
+ function _array_with_holes$5(arr) {
6131
6131
  if (Array.isArray(arr)) return arr;
6132
6132
  }
6133
6133
  function _array_without_holes(arr) {
6134
- if (Array.isArray(arr)) return _array_like_to_array$4(arr);
6134
+ if (Array.isArray(arr)) return _array_like_to_array$5(arr);
6135
6135
  }
6136
6136
  function _define_property$2(obj, key, value) {
6137
6137
  if (key in obj) {
@@ -6149,7 +6149,7 @@ function _define_property$2(obj, key, value) {
6149
6149
  function _iterable_to_array$1(iter) {
6150
6150
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
6151
6151
  }
6152
- function _iterable_to_array_limit$3(arr, i) {
6152
+ function _iterable_to_array_limit$4(arr, i) {
6153
6153
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
6154
6154
  if (_i == null) return;
6155
6155
  var _arr = [];
@@ -6173,7 +6173,7 @@ function _iterable_to_array_limit$3(arr, i) {
6173
6173
  }
6174
6174
  return _arr;
6175
6175
  }
6176
- function _non_iterable_rest$4() {
6176
+ function _non_iterable_rest$5() {
6177
6177
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6178
6178
  }
6179
6179
  function _non_iterable_spread() {
@@ -6240,19 +6240,19 @@ function _object_without_properties_loose(source, excluded) {
6240
6240
  }
6241
6241
  return target;
6242
6242
  }
6243
- function _sliced_to_array$3(arr, i) {
6244
- return _array_with_holes$4(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
6243
+ function _sliced_to_array$4(arr, i) {
6244
+ return _array_with_holes$5(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$5();
6245
6245
  }
6246
6246
  function _to_consumable_array(arr) {
6247
- return _array_without_holes(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread();
6247
+ return _array_without_holes(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread();
6248
6248
  }
6249
- function _unsupported_iterable_to_array$4(o, minLen) {
6249
+ function _unsupported_iterable_to_array$5(o, minLen) {
6250
6250
  if (!o) return;
6251
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
6251
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
6252
6252
  var n = Object.prototype.toString.call(o).slice(8, -1);
6253
6253
  if (n === "Object" && o.constructor) n = o.constructor.name;
6254
6254
  if (n === "Map" || n === "Set") return Array.from(n);
6255
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
6255
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
6256
6256
  }
6257
6257
  function isNil(value) {
6258
6258
  return value === null || value === undefined;
@@ -6410,7 +6410,7 @@ function mergeComponentData(previous, incoming) {
6410
6410
  var _previous_data, _incoming_data;
6411
6411
  var _incoming_data1;
6412
6412
  var mergedIncomingData = Object.entries((_incoming_data1 = incoming.data) !== null && _incoming_data1 !== void 0 ? _incoming_data1 : {}).reduce(function(acc, param) {
6413
- var _param = _sliced_to_array$3(param, 2), key = _param[0], value = _param[1];
6413
+ var _param = _sliced_to_array$4(param, 2), key = _param[0], value = _param[1];
6414
6414
  if (!isNil(value)) {
6415
6415
  acc[key] = value;
6416
6416
  }
@@ -7257,6 +7257,367 @@ var projectTaskDecisionSchema = projectTaskDecisionInputSchema.extend({
7257
7257
  taskRevision: v3.z.number().int().positive()
7258
7258
  }).strict();
7259
7259
 
7260
+ var templateDependencyLocksSchema = zod.z.array(zod.z.object({
7261
+ pluginName: zod.z.string().trim().min(1).max(300),
7262
+ version: zod.z.string().trim().min(1).max(300),
7263
+ source: zod.z.object({
7264
+ kind: zod.z.literal("agent-plugin"),
7265
+ name: zod.z.string().min(1).max(300),
7266
+ digest: zod.z.string().regex(/^[a-f0-9]{64}$/),
7267
+ bindingId: zod.z.string().uuid(),
7268
+ bindingVersion: zod.z.string().min(1).max(300)
7269
+ }).strict().optional(),
7270
+ providers: zod.z.array(zod.z.object({
7271
+ kind: zod.z.enum([
7272
+ "middleware",
7273
+ "sandbox",
7274
+ "toolset"
7275
+ ]),
7276
+ key: zod.z.string().min(1).max(300)
7277
+ }).strict()).max(300).optional(),
7278
+ components: zod.z.array(zod.z.object({
7279
+ type: zod.z.enum([
7280
+ "skill",
7281
+ "mcp_server",
7282
+ "toolset",
7283
+ "app",
7284
+ "hook",
7285
+ "asset"
7286
+ ]),
7287
+ key: zod.z.string().min(1).max(128),
7288
+ hash: zod.z.string().min(1).max(300)
7289
+ }).strict()).max(300)
7290
+ }).strict()).max(200);
7291
+
7292
+ function _array_like_to_array$4(arr, len) {
7293
+ if (len == null || len > arr.length) len = arr.length;
7294
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7295
+ return arr2;
7296
+ }
7297
+ function _array_with_holes$4(arr) {
7298
+ if (Array.isArray(arr)) return arr;
7299
+ }
7300
+ function _iterable_to_array_limit$3(arr, i) {
7301
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
7302
+ if (_i == null) return;
7303
+ var _arr = [];
7304
+ var _n = true;
7305
+ var _d = false;
7306
+ var _s, _e;
7307
+ try {
7308
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
7309
+ _arr.push(_s.value);
7310
+ if (i && _arr.length === i) break;
7311
+ }
7312
+ } catch (err) {
7313
+ _d = true;
7314
+ _e = err;
7315
+ } finally{
7316
+ try {
7317
+ if (!_n && _i["return"] != null) _i["return"]();
7318
+ } finally{
7319
+ if (_d) throw _e;
7320
+ }
7321
+ }
7322
+ return _arr;
7323
+ }
7324
+ function _non_iterable_rest$4() {
7325
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7326
+ }
7327
+ function _sliced_to_array$3(arr, i) {
7328
+ return _array_with_holes$4(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
7329
+ }
7330
+ function _unsupported_iterable_to_array$4(o, minLen) {
7331
+ if (!o) return;
7332
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
7333
+ var n = Object.prototype.toString.call(o).slice(8, -1);
7334
+ if (n === "Object" && o.constructor) n = o.constructor.name;
7335
+ if (n === "Map" || n === "Set") return Array.from(n);
7336
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
7337
+ }
7338
+ var text$1 = zod.z.string().trim().min(1).max(300);
7339
+ var key$1 = zod.z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,127}$/);
7340
+ var required = zod.z.boolean().default(true);
7341
+ /** Portable paths only. Volume remains responsible for canonical containment and symlink checks. */ var templateFilePathSchema = zod.z.string().min(1).max(512).refine(function(value) {
7342
+ return(// Control characters are intentionally rejected in untrusted template paths.
7343
+ // eslint-disable-next-line no-control-regex
7344
+ !/[\\:\x00-\x1f]/.test(value) && value.split("/").every(function(part) {
7345
+ return !!part && part !== "." && part !== ".." && part.toLowerCase() !== ".apps" && !part.toLowerCase().startsWith(".workspace-write-");
7346
+ }));
7347
+ });
7348
+ var fileEntrySchema = zod.z.discriminatedUnion("kind", [
7349
+ zod.z.object({
7350
+ kind: zod.z.literal("directory"),
7351
+ path: templateFilePathSchema
7352
+ }).strict(),
7353
+ zod.z.object({
7354
+ kind: zod.z.literal("file"),
7355
+ path: templateFilePathSchema,
7356
+ content: zod.z.string().max(262144),
7357
+ contentVersion: text$1,
7358
+ policy: zod.z.literal("create-only")
7359
+ }).strict(),
7360
+ zod.z.object({
7361
+ kind: zod.z.literal("ledger"),
7362
+ path: templateFilePathSchema.refine(function(path) {
7363
+ return path.endsWith(".json");
7364
+ }),
7365
+ structureVersion: text$1,
7366
+ columns: zod.z.array(zod.z.object({
7367
+ key: key$1,
7368
+ label: text$1,
7369
+ type: zod.z.enum([
7370
+ "string",
7371
+ "number",
7372
+ "boolean",
7373
+ "date"
7374
+ ])
7375
+ }).strict()).min(1).max(64),
7376
+ policy: zod.z.literal("create-only")
7377
+ }).strict()
7378
+ ]);
7379
+ var templateFilesSchema = zod.z.object({
7380
+ scope: zod.z.enum([
7381
+ "shared",
7382
+ "user"
7383
+ ]),
7384
+ entries: zod.z.array(fileEntrySchema).min(1).max(100)
7385
+ }).strict().superRefine(function(param, ctx) {
7386
+ var entries = param.entries;
7387
+ var paths = new Set();
7388
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
7389
+ try {
7390
+ var _loop = function() {
7391
+ var _step_value = _sliced_to_array$3(_step.value, 2), index = _step_value[0], entry = _step_value[1];
7392
+ var path = entry.path.toLowerCase();
7393
+ if (paths.has(path)) ctx.addIssue({
7394
+ code: "custom",
7395
+ path: [
7396
+ "entries",
7397
+ index,
7398
+ "path"
7399
+ ],
7400
+ message: "Duplicate path"
7401
+ });
7402
+ paths.add(path);
7403
+ if (entries.some(function(other) {
7404
+ return other.kind !== "directory" && path.startsWith("".concat(other.path.toLowerCase(), "/"));
7405
+ })) ctx.addIssue({
7406
+ code: "custom",
7407
+ path: [
7408
+ "entries",
7409
+ index,
7410
+ "path"
7411
+ ],
7412
+ message: "File cannot be a parent"
7413
+ });
7414
+ if (entry.kind === "ledger" && new Set(entry.columns.map(function(column) {
7415
+ return column.key;
7416
+ })).size !== entry.columns.length) ctx.addIssue({
7417
+ code: "custom",
7418
+ path: [
7419
+ "entries",
7420
+ index,
7421
+ "columns"
7422
+ ],
7423
+ message: "Duplicate column"
7424
+ });
7425
+ };
7426
+ for(var _iterator = entries.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
7427
+ } catch (err) {
7428
+ _didIteratorError = true;
7429
+ _iteratorError = err;
7430
+ } finally{
7431
+ try {
7432
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
7433
+ _iterator.return();
7434
+ }
7435
+ } finally{
7436
+ if (_didIteratorError) {
7437
+ throw _iteratorError;
7438
+ }
7439
+ }
7440
+ }
7441
+ if (entries.reduce(function(size, entry) {
7442
+ return size + (entry.kind === "file" ? entry.content.length : 0);
7443
+ }, 0) > 1048576) ctx.addIssue({
7444
+ code: "custom",
7445
+ message: "Initial content exceeds limit"
7446
+ });
7447
+ });
7448
+ /** Versioned, credential-free declarations. Missing manifest preserves the legacy template contract. */ var templateManifestV1Schema = zod.z.object({
7449
+ schemaVersion: zod.z.literal(1),
7450
+ version: text$1,
7451
+ memory: zod.z.object({
7452
+ seed: zod.z.boolean(),
7453
+ preferences: zod.z.array(key$1).max(50).default([])
7454
+ }).strict().optional(),
7455
+ skills: zod.z.array(zod.z.object({
7456
+ pluginName: text$1.optional(),
7457
+ componentKey: key$1
7458
+ }).strict()).max(100).optional(),
7459
+ files: templateFilesSchema.optional(),
7460
+ onboarding: zod.z.object({
7461
+ skill: key$1,
7462
+ required: required,
7463
+ preferences: zod.z.array(key$1).max(50).refine(function(items) {
7464
+ return new Set(items).size === items.length;
7465
+ }),
7466
+ completionCriteria: text$1
7467
+ }).strict().optional(),
7468
+ connectors: zod.z.array(zod.z.object({
7469
+ key: key$1,
7470
+ provider: text$1,
7471
+ required: required,
7472
+ purpose: text$1,
7473
+ permissions: zod.z.array(text$1).max(50)
7474
+ }).strict()).max(50).refine(function(items) {
7475
+ return new Set(items.map(function(item) {
7476
+ return item.key;
7477
+ })).size === items.length;
7478
+ }).refine(function(items) {
7479
+ return new Set(items.map(function(item) {
7480
+ return item.provider;
7481
+ })).size === items.length;
7482
+ }).optional(),
7483
+ routines: zod.z.array(zod.z.object({
7484
+ key: key$1,
7485
+ required: zod.z.boolean().default(false),
7486
+ trigger: zod.z.enum([
7487
+ "schedule",
7488
+ "event"
7489
+ ]),
7490
+ expression: text$1,
7491
+ timezone: zod.z.enum([
7492
+ "user",
7493
+ "organization"
7494
+ ]),
7495
+ skill: key$1,
7496
+ output: text$1,
7497
+ enabled: zod.z.literal(false).default(false)
7498
+ }).strict()).max(50).refine(function(items) {
7499
+ return new Set(items.map(function(item) {
7500
+ return item.key;
7501
+ })).size === items.length;
7502
+ }).optional(),
7503
+ execution: zod.z.object({
7504
+ modelFeatures: zod.z.array(zod.z.nativeEnum(exports.ModelFeature)).max(20).optional(),
7505
+ sandbox: zod.z.enum([
7506
+ "server",
7507
+ "cloud-computer"
7508
+ ]).optional(),
7509
+ localCapabilities: zod.z.array(key$1).max(20).optional(),
7510
+ offline: zod.z.enum([
7511
+ "requires-online",
7512
+ "local-only"
7513
+ ]).optional()
7514
+ }).strict().optional()
7515
+ }).strict();
7516
+ /** V2 keeps only initialization and requirements that the DSL cannot express. */ var assistantTemplateManifestSchema = templateManifestV1Schema.omit({
7517
+ memory: true,
7518
+ skills: true,
7519
+ execution: true
7520
+ }).extend({
7521
+ schemaVersion: zod.z.literal(2),
7522
+ execution: templateManifestV1Schema.shape.execution.unwrap().omit({
7523
+ sandbox: true
7524
+ }).optional()
7525
+ }).strict();
7526
+ var templateManifestSchema = zod.z.discriminatedUnion("schemaVersion", [
7527
+ templateManifestV1Schema,
7528
+ assistantTemplateManifestSchema
7529
+ ]);
7530
+
7531
+ var key = zod.z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,127}$/);
7532
+ var templatePreferenceValuesSchema = zod.z.record(key, zod.z.string().trim().max(2000)).refine(function(values) {
7533
+ return Object.keys(values).length <= 50;
7534
+ });
7535
+ var assistantTemplateSetupStateSchema = zod.z.object({
7536
+ revision: zod.z.number().int().nonnegative(),
7537
+ preferences: templatePreferenceValuesSchema,
7538
+ completedAt: zod.z.string().datetime().optional(),
7539
+ firstResult: zod.z.string().trim().min(1).max(4000).optional(),
7540
+ connectors: zod.z.record(key, zod.z.discriminatedUnion("choice", [
7541
+ zod.z.object({
7542
+ choice: zod.z.literal("binding"),
7543
+ bindingId: zod.z.string().uuid()
7544
+ }).strict(),
7545
+ zod.z.object({
7546
+ choice: zod.z.literal("skip")
7547
+ }).strict()
7548
+ ]))
7549
+ }).strict();
7550
+ var templateSetupUpdateSchema = zod.z.object({
7551
+ revision: zod.z.number().int().nonnegative(),
7552
+ preferences: templatePreferenceValuesSchema.optional(),
7553
+ firstResult: zod.z.string().trim().min(1).max(4000).optional(),
7554
+ connector: zod.z.object({
7555
+ key: key,
7556
+ selection: zod.z.discriminatedUnion("choice", [
7557
+ zod.z.object({
7558
+ choice: zod.z.literal("binding"),
7559
+ bindingId: zod.z.string().uuid()
7560
+ }).strict(),
7561
+ zod.z.object({
7562
+ choice: zod.z.literal("skip")
7563
+ }).strict()
7564
+ ])
7565
+ }).strict().optional()
7566
+ }).strict();
7567
+ /** Assistant execution policy, independent of template delivery metadata. Exact tool names only. */ var assistantOperationPolicySchema = zod.z.object({
7568
+ default: zod.z.enum([
7569
+ "allow",
7570
+ "approve",
7571
+ "deny"
7572
+ ]),
7573
+ rules: zod.z.array(zod.z.object({
7574
+ tool: key,
7575
+ decision: zod.z.enum([
7576
+ "allow",
7577
+ "approve",
7578
+ "deny"
7579
+ ]),
7580
+ reason: zod.z.string().trim().min(1).max(500)
7581
+ }).strict()).max(300)
7582
+ }).strict().refine(function(policy) {
7583
+ return new Set(policy.rules.map(function(rule) {
7584
+ return rule.tool;
7585
+ })).size === policy.rules.length;
7586
+ });
7587
+
7588
+ var templateActivityReadSchema = zod.z.object({
7589
+ keys: zod.z.array(zod.z.string().regex(/^[a-f0-9-]{36}:(pending|running|awaiting_approval|paused|succeeded|failed)$/)).max(50)
7590
+ }).strict();
7591
+
7592
+ var templatePublicationInputSchema = zod.z.object({
7593
+ revision: zod.z.string().regex(/^[a-f0-9]{64}$/),
7594
+ contentHash: zod.z.string().regex(/^[a-f0-9]{64}$/),
7595
+ visibility: zod.z.enum([
7596
+ "team",
7597
+ "public"
7598
+ ]),
7599
+ version: zod.z.string().trim().regex(/^\d+\.\d+\.\d+$/),
7600
+ releaseNotes: zod.z.string().trim().max(4000).default("")
7601
+ }).strict();
7602
+ var templateUpgradeSectionSchema = zod.z.enum([
7603
+ "presentation",
7604
+ "instructions",
7605
+ "runtime",
7606
+ "definition"
7607
+ ]);
7608
+ var templateUpgradeInputSchema = zod.z.object({
7609
+ targetTemplateId: zod.z.string().trim().min(1).max(500).optional(),
7610
+ revision: zod.z.string().regex(/^[a-f0-9]{64}$/),
7611
+ sourceHash: zod.z.string().regex(/^[a-f0-9]{64}$/),
7612
+ choices: zod.z.record(templateUpgradeSectionSchema, zod.z.enum([
7613
+ "keep",
7614
+ "replace"
7615
+ ]))
7616
+ }).strict();
7617
+ var templateUpgradeActionSchema = zod.z.object({
7618
+ operationId: zod.z.string().uuid()
7619
+ }).strict();
7620
+
7260
7621
  var STATE_VARIABLE_HUMAN = "human";
7261
7622
 
7262
7623
  exports.PermissionsEnum = void 0;
@@ -7360,6 +7721,93 @@ var PermissionGroups = {
7360
7721
  ]
7361
7722
  };
7362
7723
 
7724
+ var modulePermissions = [
7725
+ {
7726
+ module: "ai",
7727
+ permissions: [
7728
+ exports.AIPermissionsEnum.KNOWLEDGEBASE_EDIT,
7729
+ exports.AIPermissionsEnum.COPILOT_VIEW,
7730
+ exports.AIPermissionsEnum.COPILOT_EDIT,
7731
+ exports.AIPermissionsEnum.MODEL_USAGE_MONITOR,
7732
+ exports.AIPermissionsEnum.MODEL_ACCESS_REQUEST_VIEW,
7733
+ exports.AIPermissionsEnum.MODEL_ACCESS_REQUEST_EDIT,
7734
+ exports.AIPermissionsEnum.MODEL_GATEWAY_USE,
7735
+ exports.AIPermissionsEnum.MODEL_GATEWAY_MANAGE,
7736
+ exports.AIPermissionsEnum.XPERT_EDIT,
7737
+ exports.AIPermissionsEnum.CHAT_VIEW,
7738
+ exports.AIPermissionsEnum.EVOLUTION_VIEW,
7739
+ exports.AIPermissionsEnum.EVOLUTION_MANAGE
7740
+ ]
7741
+ },
7742
+ {
7743
+ module: "projects",
7744
+ permissions: [
7745
+ exports.AIPermissionsEnum.XPERT_PROJECT_VIEW,
7746
+ exports.AIPermissionsEnum.XPERT_PROJECT_CREATE,
7747
+ exports.AIPermissionsEnum.XPERT_PROJECT_EDIT,
7748
+ exports.AIPermissionsEnum.XPERT_PROJECT_MANAGE
7749
+ ]
7750
+ },
7751
+ {
7752
+ module: "members",
7753
+ permissions: [
7754
+ exports.PermissionsEnum.ADMIN_DASHBOARD_VIEW,
7755
+ exports.PermissionsEnum.ORG_INVITE_VIEW,
7756
+ exports.PermissionsEnum.ORG_INVITE_EDIT,
7757
+ exports.PermissionsEnum.ORG_DEMO_EDIT,
7758
+ exports.PermissionsEnum.ORG_USERS_VIEW,
7759
+ exports.PermissionsEnum.ORG_USERS_EDIT,
7760
+ exports.PermissionsEnum.ALL_ORG_VIEW,
7761
+ exports.PermissionsEnum.ALL_ORG_EDIT,
7762
+ exports.PermissionsEnum.CHANGE_SELECTED_ORGANIZATION,
7763
+ exports.PermissionsEnum.CHANGE_ROLES_PERMISSIONS,
7764
+ exports.PermissionsEnum.SUPER_ADMIN_EDIT,
7765
+ exports.PermissionsEnum.ACCESS_DELETE_ACCOUNT,
7766
+ exports.PermissionsEnum.ACCESS_DELETE_ALL_DATA,
7767
+ exports.PermissionsEnum.REFERRAL_VIEW
7768
+ ]
7769
+ },
7770
+ {
7771
+ module: "billing",
7772
+ permissions: [
7773
+ exports.AIPermissionsEnum.MEMBERSHIP_EDIT,
7774
+ exports.AIPermissionsEnum.MEMBERSHIP_USE,
7775
+ exports.AIPermissionsEnum.BILLING_PRODUCT_EDIT,
7776
+ exports.AIPermissionsEnum.BILLING_REFUND,
7777
+ exports.AIPermissionsEnum.PAYMENT_PROVIDER_EDIT
7778
+ ]
7779
+ },
7780
+ {
7781
+ module: "data",
7782
+ permissions: [
7783
+ exports.PermissionsEnum.VIEW_ALL_EMAILS,
7784
+ exports.PermissionsEnum.VIEW_ALL_EMAIL_TEMPLATES,
7785
+ exports.PermissionsEnum.INTEGRATION_EDIT,
7786
+ exports.PermissionsEnum.INTEGRATION_VIEW,
7787
+ exports.PermissionsEnum.DATA_SOURCE_VIEW,
7788
+ exports.PermissionsEnum.DATA_SOURCE_EDIT,
7789
+ exports.PermissionsEnum.BUSINESS_AREA_VIEW,
7790
+ exports.PermissionsEnum.BUSINESS_AREA_MANAGE,
7791
+ exports.PermissionsEnum.BUSINESS_AREA_ASSIGN
7792
+ ]
7793
+ },
7794
+ {
7795
+ module: "personal",
7796
+ permissions: [
7797
+ exports.PermissionsEnum.PROFILE_EDIT
7798
+ ]
7799
+ }
7800
+ ];
7801
+ var ROLE_PERMISSION_MODULES = new Map(modulePermissions.flatMap(function(param) {
7802
+ var module = param.module, permissions = param.permissions;
7803
+ return permissions.map(function(permission) {
7804
+ return [
7805
+ permission,
7806
+ module
7807
+ ];
7808
+ });
7809
+ }));
7810
+
7363
7811
  function getTagTargets(tag) {
7364
7812
  var _tag_targets;
7365
7813
  return ((_tag_targets = tag.targets) === null || _tag_targets === void 0 ? void 0 : _tag_targets.length) ? tag.targets : tag.category ? [
@@ -8111,9 +8559,10 @@ function isInterruptMessage(obj) {
8111
8559
  * business user represented by the current request context.
8112
8560
  */ var API_PRINCIPAL_USER_ID_HEADER = "x-principal-user-id";
8113
8561
  /**
8114
- * Stable binding kinds used to resolve long-lived technical principals.
8562
+ * Stable binding kinds used to resolve personal or resource credentials.
8115
8563
  */ exports.ApiKeyBindingType = void 0;
8116
8564
  (function(ApiKeyBindingType) {
8565
+ /** A fixed human owner, without an Assistant or workspace audience. */ ApiKeyBindingType["USER"] = "user";
8117
8566
  ApiKeyBindingType["ASSISTANT"] = "assistant";
8118
8567
  ApiKeyBindingType["WORKSPACE"] = "workspace";
8119
8568
  ApiKeyBindingType["INTEGRATION"] = "integration";
@@ -8123,6 +8572,13 @@ function isInterruptMessage(obj) {
8123
8572
  */ ApiKeyBindingType["KNOWLEDGEBASE"] = "knowledgebase";
8124
8573
  })(exports.ApiKeyBindingType || (exports.ApiKeyBindingType = {}));
8125
8574
 
8575
+ /** A personal credential uses existing API-key endpoints as its human owner, subject to their current permissions. */ var PERSONAL_API_KEY_LIFETIMES = [
8576
+ "30",
8577
+ "90",
8578
+ "365",
8579
+ "never"
8580
+ ];
8581
+
8126
8582
  exports.BusinessType = void 0;
8127
8583
  (function(BusinessType) {
8128
8584
  BusinessType["SEMANTIC_MODEL"] = "SEMANTIC_MODEL";
@@ -8652,6 +9108,7 @@ exports.MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS_SETTING = MODEL_GATEWAY_MAX_CONCUR
8652
9108
  exports.MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING = MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING;
8653
9109
  exports.OllamaEmbeddingsProviders = OllamaEmbeddingsProviders;
8654
9110
  exports.OpenAIEmbeddingsProviders = OpenAIEmbeddingsProviders;
9111
+ exports.PERSONAL_API_KEY_LIFETIMES = PERSONAL_API_KEY_LIFETIMES;
8655
9112
  exports.PLUGIN_APPLICATION_INSTALLATION_STATUS = PLUGIN_APPLICATION_INSTALLATION_STATUS;
8656
9113
  exports.PLUGIN_APPLICATION_SCOPE = PLUGIN_APPLICATION_SCOPE;
8657
9114
  exports.PLUGIN_COMPONENT_TYPE = PLUGIN_COMPONENT_TYPE;
@@ -8669,6 +9126,7 @@ exports.PLUGIN_RESOURCE_RUNTIME_TYPE = PLUGIN_RESOURCE_RUNTIME_TYPE;
8669
9126
  exports.PLUGIN_SOURCE = PLUGIN_SOURCE;
8670
9127
  exports.PROJECT_TASK_ICON_NAMES = PROJECT_TASK_ICON_NAMES;
8671
9128
  exports.PermissionGroups = PermissionGroups;
9129
+ exports.ROLE_PERMISSION_MODULES = ROLE_PERMISSION_MODULES;
8672
9130
  exports.RUNTIME_RESTART_CONFIRMATION = RUNTIME_RESTART_CONFIRMATION;
8673
9131
  exports.RUNTIME_STREAM_INTERRUPTED_EVENT = RUNTIME_STREAM_INTERRUPTED_EVENT;
8674
9132
  exports.SANDBOX_FILE_OUTPUT_RULES = SANDBOX_FILE_OUTPUT_RULES;
@@ -8732,8 +9190,11 @@ exports.agentUniqueName = agentUniqueName;
8732
9190
  exports.allChannels = allChannels;
8733
9191
  exports.appendMessageContent = appendMessageContent;
8734
9192
  exports.appendMessagePlainText = appendMessagePlainText;
9193
+ exports.assistantOperationPolicySchema = assistantOperationPolicySchema;
8735
9194
  exports.assistantTaskGroupContext = assistantTaskGroupContext;
8736
9195
  exports.assistantTaskGroupContextSchema = assistantTaskGroupContextSchema;
9196
+ exports.assistantTemplateManifestSchema = assistantTemplateManifestSchema;
9197
+ exports.assistantTemplateSetupStateSchema = assistantTemplateSetupStateSchema;
8737
9198
  exports.buildChunkTree = buildChunkTree;
8738
9199
  exports.buildXpertMarketplaceProfileSnapshot = buildXpertMarketplaceProfileSnapshot;
8739
9200
  exports.canAllowMcpToolDirectly = canAllowMcpToolDirectly;
@@ -8918,6 +9379,18 @@ exports.resolveRuntimeXpert = resolveRuntimeXpert;
8918
9379
  exports.setStateVariable = setStateVariable;
8919
9380
  exports.shortTitle = shortTitle;
8920
9381
  exports.stringifyMessageContent = stringifyMessageContent;
9382
+ exports.templateActivityReadSchema = templateActivityReadSchema;
9383
+ exports.templateDependencyLocksSchema = templateDependencyLocksSchema;
9384
+ exports.templateFilePathSchema = templateFilePathSchema;
9385
+ exports.templateFilesSchema = templateFilesSchema;
9386
+ exports.templateManifestSchema = templateManifestSchema;
9387
+ exports.templateManifestV1Schema = templateManifestV1Schema;
9388
+ exports.templatePreferenceValuesSchema = templatePreferenceValuesSchema;
9389
+ exports.templatePublicationInputSchema = templatePublicationInputSchema;
9390
+ exports.templateSetupUpdateSchema = templateSetupUpdateSchema;
9391
+ exports.templateUpgradeActionSchema = templateUpgradeActionSchema;
9392
+ exports.templateUpgradeInputSchema = templateUpgradeInputSchema;
9393
+ exports.templateUpgradeSectionSchema = templateUpgradeSectionSchema;
8921
9394
  exports.transformInstallation = transformInstallation;
8922
9395
  exports.updateAssistantBindingSkillPreferences = updateAssistantBindingSkillPreferences;
8923
9396
  exports.updateAssistantBindingToolPreferences = updateAssistantBindingToolPreferences;