@xpert-ai/contracts 3.27.0 → 3.28.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
@@ -1,9 +1,43 @@
1
1
  'use strict';
2
2
 
3
- var ShortUniqueId = require('short-unique-id');
4
3
  var zod = require('zod');
5
- var chatkitTypes = require('@xpert-ai/chatkit-types');
4
+ var ShortUniqueId = require('short-unique-id');
6
5
  var v3 = require('zod/v3');
6
+ var chatkitTypes = require('@xpert-ai/chatkit-types');
7
+
8
+ /** Internal boot capabilities. Online/readiness and execution settlement remain separate facts. */ var executionControlProtocols = {
9
+ taskControl: 2,
10
+ managedQueue: 3,
11
+ threadControlView: 1,
12
+ mcpControl: 1,
13
+ sandboxControl: 1,
14
+ invocationEvidence: 2
15
+ };
16
+ var controlledHandlerSchema = zod.z.object({
17
+ pluginName: zod.z.string().min(1),
18
+ queueName: zod.z.string().min(1),
19
+ jobName: zod.z.string().min(1),
20
+ scopeKey: zod.z.string().nullable(),
21
+ controlContract: zod.z.string().min(1).max(160)
22
+ }).strict();
23
+ var executionControlCapabilitiesSchema = zod.z.object({
24
+ version: zod.z.literal(1),
25
+ validUntil: zod.z.number().finite(),
26
+ protocols: zod.z.object({
27
+ taskControl: zod.z.literal(2).optional(),
28
+ managedQueue: zod.z.literal(3).optional(),
29
+ threadControlView: zod.z.literal(1).optional(),
30
+ mcpControl: zod.z.literal(1).optional(),
31
+ sandboxControl: zod.z.literal(1).optional(),
32
+ invocationEvidence: zod.z.literal(2).optional()
33
+ }).strict(),
34
+ queuePrefix: zod.z.string().min(1).max(160),
35
+ queuePools: zod.z.array(zod.z.enum([
36
+ "default",
37
+ "sandbox-browser"
38
+ ])),
39
+ handlers: zod.z.array(controlledHandlerSchema)
40
+ }).strict();
7
41
 
8
42
  function resolveI18nText(value) {
9
43
  var language = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
@@ -140,6 +174,45 @@ function letterStartSUID(start) {
140
174
  return start + uuid();
141
175
  }
142
176
 
177
+ /** A control request can address only the original environment and execution generation. */ var sandboxRuntimeTargetSchema = v3.z.object({
178
+ version: v3.z.literal(1),
179
+ kind: v3.z.enum([
180
+ "host",
181
+ "engine"
182
+ ]),
183
+ provider: v3.z.string().min(1),
184
+ runtimeProfile: v3.z.string().min(1),
185
+ generation: v3.z.string().uuid(),
186
+ environmentId: v3.z.string().min(1),
187
+ runtimeRef: v3.z.string().min(1)
188
+ }).strict();
189
+ /** An accepted stop, closed stream, or expired lease is never an exit receipt. */ var sandboxRuntimeEvidenceSchema = v3.z.object({
190
+ version: v3.z.literal(1),
191
+ target: sandboxRuntimeTargetSchema,
192
+ state: v3.z.enum([
193
+ "running",
194
+ "exited",
195
+ "not_started",
196
+ "unknown"
197
+ ]),
198
+ observedAt: v3.z.string().datetime()
199
+ }).strict();
200
+ function sandboxTargetsEqual(a, b) {
201
+ return a.version === b.version && a.kind === b.kind && a.provider === b.provider && a.runtimeProfile === b.runtimeProfile && a.generation === b.generation && a.environmentId === b.environmentId && a.runtimeRef === b.runtimeRef;
202
+ }
203
+ function sandboxEvidence(target, state) {
204
+ return {
205
+ version: 1,
206
+ target: target,
207
+ state: state,
208
+ observedAt: new Date().toISOString()
209
+ };
210
+ }
211
+ /** Explicit new business retry; it may proceed only after this original generation settled. */ var sandboxJobRetryReferenceSchema = v3.z.object({
212
+ jobId: v3.z.string().uuid(),
213
+ generation: v3.z.string().uuid()
214
+ }).strict();
215
+
143
216
  /** Portable presentation tokens. Clients render their own trusted icon components. */ var PROJECT_TASK_ICON_NAMES = [
144
217
  "FileText",
145
218
  "FileScan",
@@ -1314,7 +1387,7 @@ exports.OrganizationDemoNetworkEnum = void 0;
1314
1387
  OrganizationDemoNetworkEnum["aliyun"] = "aliyun";
1315
1388
  })(exports.OrganizationDemoNetworkEnum || (exports.OrganizationDemoNetworkEnum = {}));
1316
1389
 
1317
- function _define_property$p(obj, key, value) {
1390
+ function _define_property$q(obj, key, value) {
1318
1391
  if (key in obj) {
1319
1392
  Object.defineProperty(obj, key, {
1320
1393
  value: value,
@@ -1327,7 +1400,7 @@ function _define_property$p(obj, key, value) {
1327
1400
  }
1328
1401
  return obj;
1329
1402
  }
1330
- function _object_spread$p(target) {
1403
+ function _object_spread$q(target) {
1331
1404
  for(var i = 1; i < arguments.length; i++){
1332
1405
  var source = arguments[i] != null ? arguments[i] : {};
1333
1406
  var ownKeys = Object.keys(source);
@@ -1337,12 +1410,12 @@ function _object_spread$p(target) {
1337
1410
  }));
1338
1411
  }
1339
1412
  ownKeys.forEach(function(key) {
1340
- _define_property$p(target, key, source[key]);
1413
+ _define_property$q(target, key, source[key]);
1341
1414
  });
1342
1415
  }
1343
1416
  return target;
1344
1417
  }
1345
- function ownKeys$i(object, enumerableOnly) {
1418
+ function ownKeys$j(object, enumerableOnly) {
1346
1419
  var keys = Object.keys(object);
1347
1420
  if (Object.getOwnPropertySymbols) {
1348
1421
  var symbols = Object.getOwnPropertySymbols(object);
@@ -1350,12 +1423,12 @@ function ownKeys$i(object, enumerableOnly) {
1350
1423
  }
1351
1424
  return keys;
1352
1425
  }
1353
- function _object_spread_props$i(target, source) {
1426
+ function _object_spread_props$j(target, source) {
1354
1427
  source = source != null ? source : {};
1355
1428
  if (Object.getOwnPropertyDescriptors) {
1356
1429
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1357
1430
  } else {
1358
- ownKeys$i(Object(source)).forEach(function(key) {
1431
+ ownKeys$j(Object(source)).forEach(function(key) {
1359
1432
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1360
1433
  });
1361
1434
  }
@@ -1383,7 +1456,7 @@ function parseSelectionSet(value) {
1383
1456
  if (plugins !== undefined && (!isObject(plugins) || !("nodeKeys" in plugins) || !isStringList(plugins.nodeKeys))) return null;
1384
1457
  if (subAgents !== undefined && (!isObject(subAgents) || !("nodeKeys" in subAgents) || !isStringList(subAgents.nodeKeys))) return null;
1385
1458
  if (connectors !== undefined && (!isObject(connectors) || !("bindingIds" in connectors) || !isStringList(connectors.bindingIds))) return null;
1386
- return _object_spread$p(_object_spread_props$i(_object_spread$p({}, value), {
1459
+ return _object_spread$q(_object_spread_props$j(_object_spread$q({}, value), {
1387
1460
  skills: skills === undefined ? {
1388
1461
  ids: []
1389
1462
  } : skills,
@@ -1402,7 +1475,7 @@ function parsePromptCapabilitySelection(value) {
1402
1475
  var selection = parseSelectionSet(value);
1403
1476
  var recommended = "recommended" in value && value.recommended != null ? parseSelectionSet(value.recommended) : undefined;
1404
1477
  if (!selection || recommended === null) return null;
1405
- return _object_spread$p(_object_spread_props$i(_object_spread$p({}, selection), {
1478
+ return _object_spread$q(_object_spread_props$j(_object_spread$q({}, selection), {
1406
1479
  mode: "allowlist"
1407
1480
  }), "inheritUnselected" in value && typeof value.inheritUnselected === "boolean" ? {
1408
1481
  inheritUnselected: value.inheritUnselected
@@ -1454,7 +1527,7 @@ function parsePromptCapabilityConfig(value) {
1454
1527
  }
1455
1528
  }
1456
1529
  }
1457
- return _object_spread_props$i(_object_spread$p({}, value), {
1530
+ return _object_spread_props$j(_object_spread$q({}, value), {
1458
1531
  type: "expert_scoped_capabilities",
1459
1532
  version: 1,
1460
1533
  defaults: defaults,
@@ -1586,7 +1659,7 @@ exports.ChatMessageStepCategory = void 0;
1586
1659
  ChatMessageStepCategory["Knowledges"] = "knowledges";
1587
1660
  })(exports.ChatMessageStepCategory || (exports.ChatMessageStepCategory = {}));
1588
1661
 
1589
- function _define_property$o(obj, key, value) {
1662
+ function _define_property$p(obj, key, value) {
1590
1663
  if (key in obj) {
1591
1664
  Object.defineProperty(obj, key, {
1592
1665
  value: value,
@@ -1606,7 +1679,7 @@ function _instanceof$1(left, right) {
1606
1679
  return left instanceof right;
1607
1680
  }
1608
1681
  }
1609
- function _object_spread$o(target) {
1682
+ function _object_spread$p(target) {
1610
1683
  for(var i = 1; i < arguments.length; i++){
1611
1684
  var source = arguments[i] != null ? arguments[i] : {};
1612
1685
  var ownKeys = Object.keys(source);
@@ -1616,7 +1689,7 @@ function _object_spread$o(target) {
1616
1689
  }));
1617
1690
  }
1618
1691
  ownKeys.forEach(function(key) {
1619
- _define_property$o(target, key, source[key]);
1692
+ _define_property$p(target, key, source[key]);
1620
1693
  });
1621
1694
  }
1622
1695
  return target;
@@ -1627,12 +1700,12 @@ var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
1627
1700
  var CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED = "thread_goal_updated";
1628
1701
  var CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED = "thread_goal_cleared";
1629
1702
  function createConversationTitleSummaryEvent(event) {
1630
- return _object_spread$o({
1703
+ return _object_spread$p({
1631
1704
  type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
1632
1705
  }, event);
1633
1706
  }
1634
1707
  function createFollowUpConsumedEvent(event) {
1635
- return _object_spread$o({
1708
+ return _object_spread$p({
1636
1709
  type: CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
1637
1710
  }, event);
1638
1711
  }
@@ -1678,7 +1751,7 @@ function _array_with_holes$g(arr) {
1678
1751
  function _array_without_holes$i(arr) {
1679
1752
  if (Array.isArray(arr)) return _array_like_to_array$s(arr);
1680
1753
  }
1681
- function _define_property$n(obj, key, value) {
1754
+ function _define_property$o(obj, key, value) {
1682
1755
  if (key in obj) {
1683
1756
  Object.defineProperty(obj, key, {
1684
1757
  value: value,
@@ -1724,7 +1797,7 @@ function _non_iterable_rest$g() {
1724
1797
  function _non_iterable_spread$i() {
1725
1798
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1726
1799
  }
1727
- function _object_spread$n(target) {
1800
+ function _object_spread$o(target) {
1728
1801
  for(var i = 1; i < arguments.length; i++){
1729
1802
  var source = arguments[i] != null ? arguments[i] : {};
1730
1803
  var ownKeys = Object.keys(source);
@@ -1734,12 +1807,12 @@ function _object_spread$n(target) {
1734
1807
  }));
1735
1808
  }
1736
1809
  ownKeys.forEach(function(key) {
1737
- _define_property$n(target, key, source[key]);
1810
+ _define_property$o(target, key, source[key]);
1738
1811
  });
1739
1812
  }
1740
1813
  return target;
1741
1814
  }
1742
- function ownKeys$h(object, enumerableOnly) {
1815
+ function ownKeys$i(object, enumerableOnly) {
1743
1816
  var keys = Object.keys(object);
1744
1817
  if (Object.getOwnPropertySymbols) {
1745
1818
  var symbols = Object.getOwnPropertySymbols(object);
@@ -1747,12 +1820,12 @@ function ownKeys$h(object, enumerableOnly) {
1747
1820
  }
1748
1821
  return keys;
1749
1822
  }
1750
- function _object_spread_props$h(target, source) {
1823
+ function _object_spread_props$i(target, source) {
1751
1824
  source = source != null ? source : {};
1752
1825
  if (Object.getOwnPropertyDescriptors) {
1753
1826
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1754
1827
  } else {
1755
- ownKeys$h(Object(source)).forEach(function(key) {
1828
+ ownKeys$i(Object(source)).forEach(function(key) {
1756
1829
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1757
1830
  });
1758
1831
  }
@@ -1871,7 +1944,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1871
1944
  if (!Object.keys(toolsets).length && !Object.keys(middlewares).length && !Object.keys(skills).length) {
1872
1945
  return null;
1873
1946
  }
1874
- return _object_spread$n({
1947
+ return _object_spread$o({
1875
1948
  version: 1
1876
1949
  }, Object.keys(toolsets).length ? {
1877
1950
  toolsets: toolsets
@@ -1949,8 +2022,8 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1949
2022
  }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$i(disabledTools).concat([
1950
2023
  normalizedToolName
1951
2024
  ]));
1952
- var toolsets = normalizedPreferences.toolsets ? _object_spread$n({}, normalizedPreferences.toolsets) : undefined;
1953
- var middlewares = normalizedPreferences.middlewares ? _object_spread$n({}, normalizedPreferences.middlewares) : undefined;
2025
+ var toolsets = normalizedPreferences.toolsets ? _object_spread$o({}, normalizedPreferences.toolsets) : undefined;
2026
+ var middlewares = normalizedPreferences.middlewares ? _object_spread$o({}, normalizedPreferences.middlewares) : undefined;
1954
2027
  if (sourceType === "toolset") {
1955
2028
  var toolsetName = "toolsetName" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.toolsetName) : "";
1956
2029
  if (!toolsetName) {
@@ -1966,14 +2039,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1966
2039
  } else {
1967
2040
  delete nextToolsets[normalizedNodeKey];
1968
2041
  }
1969
- return normalizeAssistantBindingToolPreferences(_object_spread$n({
2042
+ return normalizeAssistantBindingToolPreferences(_object_spread$o({
1970
2043
  version: 1
1971
2044
  }, Object.keys(nextToolsets).length ? {
1972
2045
  toolsets: nextToolsets
1973
2046
  } : {}, middlewares && Object.keys(middlewares).length ? {
1974
2047
  middlewares: middlewares
1975
2048
  } : {}, normalizedPreferences.skills ? {
1976
- skills: _object_spread$n({}, normalizedPreferences.skills)
2049
+ skills: _object_spread$o({}, normalizedPreferences.skills)
1977
2050
  } : {}));
1978
2051
  }
1979
2052
  var provider = "provider" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.provider) : "";
@@ -1989,14 +2062,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1989
2062
  } else {
1990
2063
  delete nextMiddlewares[normalizedNodeKey];
1991
2064
  }
1992
- return normalizeAssistantBindingToolPreferences(_object_spread$n({
2065
+ return normalizeAssistantBindingToolPreferences(_object_spread$o({
1993
2066
  version: 1
1994
2067
  }, toolsets && Object.keys(toolsets).length ? {
1995
2068
  toolsets: toolsets
1996
2069
  } : {}, Object.keys(nextMiddlewares).length ? {
1997
2070
  middlewares: nextMiddlewares
1998
2071
  } : {}, normalizedPreferences.skills ? {
1999
- skills: _object_spread$n({}, normalizedPreferences.skills)
2072
+ skills: _object_spread$o({}, normalizedPreferences.skills)
2000
2073
  } : {}));
2001
2074
  }
2002
2075
  function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillId, enabled) {
@@ -2014,7 +2087,7 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
2014
2087
  }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$i(disabledSkillIds).concat([
2015
2088
  normalizedSkillId
2016
2089
  ]));
2017
- var skills = normalizedPreferences.skills ? _object_spread$n({}, normalizedPreferences.skills) : {};
2090
+ var skills = normalizedPreferences.skills ? _object_spread$o({}, normalizedPreferences.skills) : {};
2018
2091
  if (nextDisabledSkillIds.length) {
2019
2092
  skills[normalizedWorkspaceId] = {
2020
2093
  workspaceId: normalizedWorkspaceId,
@@ -2023,12 +2096,12 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
2023
2096
  } else {
2024
2097
  delete skills[normalizedWorkspaceId];
2025
2098
  }
2026
- return normalizeAssistantBindingToolPreferences(_object_spread$n({
2099
+ return normalizeAssistantBindingToolPreferences(_object_spread$o({
2027
2100
  version: 1
2028
2101
  }, normalizedPreferences.toolsets ? {
2029
- toolsets: _object_spread$n({}, normalizedPreferences.toolsets)
2102
+ toolsets: _object_spread$o({}, normalizedPreferences.toolsets)
2030
2103
  } : {}, normalizedPreferences.middlewares ? {
2031
- middlewares: _object_spread$n({}, normalizedPreferences.middlewares)
2104
+ middlewares: _object_spread$o({}, normalizedPreferences.middlewares)
2032
2105
  } : {}, Object.keys(skills).length ? {
2033
2106
  skills: skills
2034
2107
  } : {}));
@@ -2046,14 +2119,14 @@ function ensureAssistantBindingSkillWorkspacePreference(preferences, workspaceId
2046
2119
  var currentSkills = (_normalizedPreferences_skills = normalizedPreferences.skills) !== null && _normalizedPreferences_skills !== void 0 ? _normalizedPreferences_skills : {};
2047
2120
  var currentWorkspacePreference = currentSkills[normalizedWorkspaceId];
2048
2121
  var _currentWorkspacePreference_disabledSkillIds;
2049
- return _object_spread_props$h(_object_spread$n({
2122
+ return _object_spread_props$i(_object_spread$o({
2050
2123
  version: 1
2051
2124
  }, normalizedPreferences.toolsets ? {
2052
- toolsets: _object_spread$n({}, normalizedPreferences.toolsets)
2125
+ toolsets: _object_spread$o({}, normalizedPreferences.toolsets)
2053
2126
  } : {}, normalizedPreferences.middlewares ? {
2054
- middlewares: _object_spread$n({}, normalizedPreferences.middlewares)
2127
+ middlewares: _object_spread$o({}, normalizedPreferences.middlewares)
2055
2128
  } : {}), {
2056
- skills: _object_spread_props$h(_object_spread$n({}, currentSkills), _define_property$n({}, normalizedWorkspaceId, {
2129
+ skills: _object_spread_props$i(_object_spread$o({}, currentSkills), _define_property$o({}, normalizedWorkspaceId, {
2057
2130
  workspaceId: normalizeAssistantBindingPreferenceKey(currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.workspaceId) || normalizedWorkspaceId,
2058
2131
  disabledSkillIds: (_currentWorkspacePreference_disabledSkillIds = currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.disabledSkillIds) !== null && _currentWorkspacePreference_disabledSkillIds !== void 0 ? _currentWorkspacePreference_disabledSkillIds : []
2059
2132
  }))
@@ -2146,7 +2219,7 @@ function createdAtTimestamp(item) {
2146
2219
 
2147
2220
  var ASSISTANT_USER_PREFERENCES_VERSION = 1;
2148
2221
 
2149
- function _define_property$m(obj, key, value) {
2222
+ function _define_property$n(obj, key, value) {
2150
2223
  if (key in obj) {
2151
2224
  Object.defineProperty(obj, key, {
2152
2225
  value: value,
@@ -2159,7 +2232,7 @@ function _define_property$m(obj, key, value) {
2159
2232
  }
2160
2233
  return obj;
2161
2234
  }
2162
- function _object_spread$m(target) {
2235
+ function _object_spread$n(target) {
2163
2236
  for(var i = 1; i < arguments.length; i++){
2164
2237
  var source = arguments[i] != null ? arguments[i] : {};
2165
2238
  var ownKeys = Object.keys(source);
@@ -2169,7 +2242,7 @@ function _object_spread$m(target) {
2169
2242
  }));
2170
2243
  }
2171
2244
  ownKeys.forEach(function(key) {
2172
- _define_property$m(target, key, source[key]);
2245
+ _define_property$n(target, key, source[key]);
2173
2246
  });
2174
2247
  }
2175
2248
  return target;
@@ -2301,7 +2374,7 @@ function resolveModelParameterOptions(modelOptions, rules) {
2301
2374
  var config = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2302
2375
  var _config_preserveUnknown;
2303
2376
  var preserveUnknown = (_config_preserveUnknown = config.preserveUnknown) !== null && _config_preserveUnknown !== void 0 ? _config_preserveUnknown : true;
2304
- var resolvedOptions = preserveUnknown ? _object_spread$m({}, modelOptions !== null && modelOptions !== void 0 ? modelOptions : {}) : {};
2377
+ var resolvedOptions = preserveUnknown ? _object_spread$n({}, modelOptions !== null && modelOptions !== void 0 ? modelOptions : {}) : {};
2305
2378
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2306
2379
  try {
2307
2380
  for(var _iterator = rules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
@@ -2365,7 +2438,7 @@ function _array_like_to_array$q(arr, len) {
2365
2438
  function _array_without_holes$g(arr) {
2366
2439
  if (Array.isArray(arr)) return _array_like_to_array$q(arr);
2367
2440
  }
2368
- function _define_property$l(obj, key, value) {
2441
+ function _define_property$m(obj, key, value) {
2369
2442
  if (key in obj) {
2370
2443
  Object.defineProperty(obj, key, {
2371
2444
  value: value,
@@ -2384,7 +2457,7 @@ function _iterable_to_array$i(iter) {
2384
2457
  function _non_iterable_spread$g() {
2385
2458
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2386
2459
  }
2387
- function _object_spread$l(target) {
2460
+ function _object_spread$m(target) {
2388
2461
  for(var i = 1; i < arguments.length; i++){
2389
2462
  var source = arguments[i] != null ? arguments[i] : {};
2390
2463
  var ownKeys = Object.keys(source);
@@ -2394,12 +2467,12 @@ function _object_spread$l(target) {
2394
2467
  }));
2395
2468
  }
2396
2469
  ownKeys.forEach(function(key) {
2397
- _define_property$l(target, key, source[key]);
2470
+ _define_property$m(target, key, source[key]);
2398
2471
  });
2399
2472
  }
2400
2473
  return target;
2401
2474
  }
2402
- function ownKeys$g(object, enumerableOnly) {
2475
+ function ownKeys$h(object, enumerableOnly) {
2403
2476
  var keys = Object.keys(object);
2404
2477
  if (Object.getOwnPropertySymbols) {
2405
2478
  var symbols = Object.getOwnPropertySymbols(object);
@@ -2407,12 +2480,12 @@ function ownKeys$g(object, enumerableOnly) {
2407
2480
  }
2408
2481
  return keys;
2409
2482
  }
2410
- function _object_spread_props$g(target, source) {
2483
+ function _object_spread_props$h(target, source) {
2411
2484
  source = source != null ? source : {};
2412
2485
  if (Object.getOwnPropertyDescriptors) {
2413
2486
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2414
2487
  } else {
2415
- ownKeys$g(Object(source)).forEach(function(key) {
2488
+ ownKeys$h(Object(source)).forEach(function(key) {
2416
2489
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2417
2490
  });
2418
2491
  }
@@ -2440,20 +2513,20 @@ var common$1 = {
2440
2513
  maxConcurrency: positiveInteger.max(1000)
2441
2514
  };
2442
2515
  /** Saved model configuration is explicit; name heuristics are only discovery suggestions. */ var modelConfigurationSchema = zod.z.discriminatedUnion("modelType", [
2443
- zod.z.object(_object_spread_props$g(_object_spread$l({
2516
+ zod.z.object(_object_spread_props$h(_object_spread$m({
2444
2517
  modelType: zod.z.literal(exports.AiModelTypeEnum.LLM)
2445
2518
  }, common$1), {
2446
2519
  maxOutputTokens: positiveInteger,
2447
2520
  defaultMaxTokens: positiveInteger,
2448
2521
  features: zod.z.array(zod.z.nativeEnum(exports.ModelFeature)).max(20)
2449
2522
  })).strict(),
2450
- zod.z.object(_object_spread_props$g(_object_spread$l({
2523
+ zod.z.object(_object_spread_props$h(_object_spread$m({
2451
2524
  modelType: zod.z.literal(exports.AiModelTypeEnum.TEXT_EMBEDDING)
2452
2525
  }, common$1), {
2453
2526
  dimensions: positiveInteger.optional(),
2454
2527
  batchSize: positiveInteger.max(2048)
2455
2528
  })).strict(),
2456
- zod.z.object(_object_spread$l({
2529
+ zod.z.object(_object_spread$m({
2457
2530
  modelType: zod.z.literal(exports.AiModelTypeEnum.RERANK)
2458
2531
  }, common$1)).strict()
2459
2532
  ]).superRefine(function(value, ctx) {
@@ -2485,7 +2558,7 @@ function defaultModelConfiguration(modelType) {
2485
2558
  };
2486
2559
  switch(modelType){
2487
2560
  case exports.AiModelTypeEnum.LLM:
2488
- return _object_spread_props$g(_object_spread$l({
2561
+ return _object_spread_props$h(_object_spread$m({
2489
2562
  modelType: modelType
2490
2563
  }, common), {
2491
2564
  maxOutputTokens: 2048,
@@ -2493,13 +2566,13 @@ function defaultModelConfiguration(modelType) {
2493
2566
  features: []
2494
2567
  });
2495
2568
  case exports.AiModelTypeEnum.TEXT_EMBEDDING:
2496
- return _object_spread_props$g(_object_spread$l({
2569
+ return _object_spread_props$h(_object_spread$m({
2497
2570
  modelType: modelType
2498
2571
  }, common), {
2499
2572
  batchSize: 16
2500
2573
  });
2501
2574
  case exports.AiModelTypeEnum.RERANK:
2502
- return _object_spread$l({
2575
+ return _object_spread$m({
2503
2576
  modelType: modelType
2504
2577
  }, common);
2505
2578
  }
@@ -3087,7 +3160,7 @@ function workflowNodeIdentifier(node) {
3087
3160
  return node.title || node.key;
3088
3161
  }
3089
3162
 
3090
- function _define_property$k(obj, key, value) {
3163
+ function _define_property$l(obj, key, value) {
3091
3164
  if (key in obj) {
3092
3165
  Object.defineProperty(obj, key, {
3093
3166
  value: value,
@@ -3100,7 +3173,7 @@ function _define_property$k(obj, key, value) {
3100
3173
  }
3101
3174
  return obj;
3102
3175
  }
3103
- function _object_spread$k(target) {
3176
+ function _object_spread$l(target) {
3104
3177
  for(var i = 1; i < arguments.length; i++){
3105
3178
  var source = arguments[i] != null ? arguments[i] : {};
3106
3179
  var ownKeys = Object.keys(source);
@@ -3110,12 +3183,12 @@ function _object_spread$k(target) {
3110
3183
  }));
3111
3184
  }
3112
3185
  ownKeys.forEach(function(key) {
3113
- _define_property$k(target, key, source[key]);
3186
+ _define_property$l(target, key, source[key]);
3114
3187
  });
3115
3188
  }
3116
3189
  return target;
3117
3190
  }
3118
- function ownKeys$f(object, enumerableOnly) {
3191
+ function ownKeys$g(object, enumerableOnly) {
3119
3192
  var keys = Object.keys(object);
3120
3193
  if (Object.getOwnPropertySymbols) {
3121
3194
  var symbols = Object.getOwnPropertySymbols(object);
@@ -3123,12 +3196,12 @@ function ownKeys$f(object, enumerableOnly) {
3123
3196
  }
3124
3197
  return keys;
3125
3198
  }
3126
- function _object_spread_props$f(target, source) {
3199
+ function _object_spread_props$g(target, source) {
3127
3200
  source = source != null ? source : {};
3128
3201
  if (Object.getOwnPropertyDescriptors) {
3129
3202
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
3130
3203
  } else {
3131
- ownKeys$f(Object(source)).forEach(function(key) {
3204
+ ownKeys$g(Object(source)).forEach(function(key) {
3132
3205
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
3133
3206
  });
3134
3207
  }
@@ -3161,7 +3234,7 @@ function getXpertAgentRecursionLimit(agentConfig) {
3161
3234
  return typeof (agentConfig === null || agentConfig === void 0 ? void 0 : agentConfig.recursionLimit) === "number" ? agentConfig.recursionLimit : DEFAULT_XPERT_AGENT_RECURSION_LIMIT;
3162
3235
  }
3163
3236
  function normalizeXpertAgentConfig(agentConfig) {
3164
- return _object_spread_props$f(_object_spread$k({}, agentConfig !== null && agentConfig !== void 0 ? agentConfig : {}), {
3237
+ return _object_spread_props$g(_object_spread$l({}, agentConfig !== null && agentConfig !== void 0 ? agentConfig : {}), {
3165
3238
  recursionLimit: getXpertAgentRecursionLimit(agentConfig)
3166
3239
  });
3167
3240
  }
@@ -3255,7 +3328,7 @@ function _array_like_to_array$p(arr, len) {
3255
3328
  function _array_with_holes$f(arr) {
3256
3329
  if (Array.isArray(arr)) return arr;
3257
3330
  }
3258
- function _define_property$j(obj, key, value) {
3331
+ function _define_property$k(obj, key, value) {
3259
3332
  if (key in obj) {
3260
3333
  Object.defineProperty(obj, key, {
3261
3334
  value: value,
@@ -3295,7 +3368,7 @@ function _iterable_to_array_limit$d(arr, i) {
3295
3368
  function _non_iterable_rest$f() {
3296
3369
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3297
3370
  }
3298
- function _object_spread$j(target) {
3371
+ function _object_spread$k(target) {
3299
3372
  for(var i = 1; i < arguments.length; i++){
3300
3373
  var source = arguments[i] != null ? arguments[i] : {};
3301
3374
  var ownKeys = Object.keys(source);
@@ -3305,12 +3378,12 @@ function _object_spread$j(target) {
3305
3378
  }));
3306
3379
  }
3307
3380
  ownKeys.forEach(function(key) {
3308
- _define_property$j(target, key, source[key]);
3381
+ _define_property$k(target, key, source[key]);
3309
3382
  });
3310
3383
  }
3311
3384
  return target;
3312
3385
  }
3313
- function ownKeys$e(object, enumerableOnly) {
3386
+ function ownKeys$f(object, enumerableOnly) {
3314
3387
  var keys = Object.keys(object);
3315
3388
  if (Object.getOwnPropertySymbols) {
3316
3389
  var symbols = Object.getOwnPropertySymbols(object);
@@ -3318,12 +3391,12 @@ function ownKeys$e(object, enumerableOnly) {
3318
3391
  }
3319
3392
  return keys;
3320
3393
  }
3321
- function _object_spread_props$e(target, source) {
3394
+ function _object_spread_props$f(target, source) {
3322
3395
  source = source != null ? source : {};
3323
3396
  if (Object.getOwnPropertyDescriptors) {
3324
3397
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
3325
3398
  } else {
3326
- ownKeys$e(Object(source)).forEach(function(key) {
3399
+ ownKeys$f(Object(source)).forEach(function(key) {
3327
3400
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
3328
3401
  });
3329
3402
  }
@@ -3423,7 +3496,7 @@ function configurableStoreNamespace(configurable) {
3423
3496
  var _varName_split = _sliced_to_array$d(varName.split("."), 2), agentChannelName = _varName_split[0], variableName = _varName_split[1];
3424
3497
  if (variableName) {
3425
3498
  var _state_agentChannelName;
3426
- state[agentChannelName] = _object_spread_props$e(_object_spread$j({}, (_state_agentChannelName = state[agentChannelName]) !== null && _state_agentChannelName !== void 0 ? _state_agentChannelName : {}), _define_property$j({}, variableName, value));
3499
+ state[agentChannelName] = _object_spread_props$f(_object_spread$k({}, (_state_agentChannelName = state[agentChannelName]) !== null && _state_agentChannelName !== void 0 ? _state_agentChannelName : {}), _define_property$k({}, variableName, value));
3427
3500
  } else {
3428
3501
  state[agentChannelName] = value;
3429
3502
  }
@@ -3514,7 +3587,7 @@ function getWorkflowTriggers(graph, from) {
3514
3587
  });
3515
3588
  }
3516
3589
 
3517
- function _define_property$i(obj, key, value) {
3590
+ function _define_property$j(obj, key, value) {
3518
3591
  if (key in obj) {
3519
3592
  Object.defineProperty(obj, key, {
3520
3593
  value: value,
@@ -3527,7 +3600,7 @@ function _define_property$i(obj, key, value) {
3527
3600
  }
3528
3601
  return obj;
3529
3602
  }
3530
- function _object_spread$i(target) {
3603
+ function _object_spread$j(target) {
3531
3604
  for(var i = 1; i < arguments.length; i++){
3532
3605
  var source = arguments[i] != null ? arguments[i] : {};
3533
3606
  var ownKeys = Object.keys(source);
@@ -3537,12 +3610,12 @@ function _object_spread$i(target) {
3537
3610
  }));
3538
3611
  }
3539
3612
  ownKeys.forEach(function(key) {
3540
- _define_property$i(target, key, source[key]);
3613
+ _define_property$j(target, key, source[key]);
3541
3614
  });
3542
3615
  }
3543
3616
  return target;
3544
3617
  }
3545
- function ownKeys$d(object, enumerableOnly) {
3618
+ function ownKeys$e(object, enumerableOnly) {
3546
3619
  var keys = Object.keys(object);
3547
3620
  if (Object.getOwnPropertySymbols) {
3548
3621
  var symbols = Object.getOwnPropertySymbols(object);
@@ -3550,12 +3623,12 @@ function ownKeys$d(object, enumerableOnly) {
3550
3623
  }
3551
3624
  return keys;
3552
3625
  }
3553
- function _object_spread_props$d(target, source) {
3626
+ function _object_spread_props$e(target, source) {
3554
3627
  source = source != null ? source : {};
3555
3628
  if (Object.getOwnPropertyDescriptors) {
3556
3629
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
3557
3630
  } else {
3558
- ownKeys$d(Object(source)).forEach(function(key) {
3631
+ ownKeys$e(Object(source)).forEach(function(key) {
3559
3632
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
3560
3633
  });
3561
3634
  }
@@ -3643,11 +3716,11 @@ var KNOWLEDGEBASE_FAQ_RETRIEVAL_MODES = [
3643
3716
  return candidate === requestedMode;
3644
3717
  }) ? requestedMode : DEFAULT_KNOWLEDGEBASE_FAQ_RECALL.mode;
3645
3718
  var _recall_fusion2, _recall_fusion_mode, _recall_fusion_weights;
3646
- return _object_spread_props$d(_object_spread$i({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL, recall !== null && recall !== void 0 ? recall : {}), {
3719
+ return _object_spread_props$e(_object_spread$j({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL, recall !== null && recall !== void 0 ? recall : {}), {
3647
3720
  mode: mode,
3648
- fusion: _object_spread_props$d(_object_spread$i({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL.fusion, (_recall_fusion2 = recall === null || recall === void 0 ? void 0 : recall.fusion) !== null && _recall_fusion2 !== void 0 ? _recall_fusion2 : {}), {
3721
+ fusion: _object_spread_props$e(_object_spread$j({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL.fusion, (_recall_fusion2 = recall === null || recall === void 0 ? void 0 : recall.fusion) !== null && _recall_fusion2 !== void 0 ? _recall_fusion2 : {}), {
3649
3722
  mode: mode === "hybrid" ? "weighted_rrf" : (_recall_fusion_mode = recall === null || recall === void 0 ? void 0 : (_recall_fusion = recall.fusion) === null || _recall_fusion === void 0 ? void 0 : _recall_fusion.mode) !== null && _recall_fusion_mode !== void 0 ? _recall_fusion_mode : DEFAULT_KNOWLEDGEBASE_FAQ_RECALL.fusion.mode,
3650
- weights: _object_spread_props$d(_object_spread$i({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL.fusion.weights, (_recall_fusion_weights = recall === null || recall === void 0 ? void 0 : (_recall_fusion1 = recall.fusion) === null || _recall_fusion1 === void 0 ? void 0 : _recall_fusion1.weights) !== null && _recall_fusion_weights !== void 0 ? _recall_fusion_weights : {}), {
3723
+ weights: _object_spread_props$e(_object_spread$j({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL.fusion.weights, (_recall_fusion_weights = recall === null || recall === void 0 ? void 0 : (_recall_fusion1 = recall.fusion) === null || _recall_fusion1 === void 0 ? void 0 : _recall_fusion1.weights) !== null && _recall_fusion_weights !== void 0 ? _recall_fusion_weights : {}), {
3651
3724
  graph: 0
3652
3725
  })
3653
3726
  })
@@ -3816,7 +3889,7 @@ function _array_like_to_array$n(arr, len) {
3816
3889
  function _array_without_holes$e(arr) {
3817
3890
  if (Array.isArray(arr)) return _array_like_to_array$n(arr);
3818
3891
  }
3819
- function _define_property$h(obj, key, value) {
3892
+ function _define_property$i(obj, key, value) {
3820
3893
  if (key in obj) {
3821
3894
  Object.defineProperty(obj, key, {
3822
3895
  value: value,
@@ -3835,7 +3908,7 @@ function _iterable_to_array$g(iter) {
3835
3908
  function _non_iterable_spread$e() {
3836
3909
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3837
3910
  }
3838
- function _object_spread$h(target) {
3911
+ function _object_spread$i(target) {
3839
3912
  for(var i = 1; i < arguments.length; i++){
3840
3913
  var source = arguments[i] != null ? arguments[i] : {};
3841
3914
  var ownKeys = Object.keys(source);
@@ -3845,7 +3918,7 @@ function _object_spread$h(target) {
3845
3918
  }));
3846
3919
  }
3847
3920
  ownKeys.forEach(function(key) {
3848
- _define_property$h(target, key, source[key]);
3921
+ _define_property$i(target, key, source[key]);
3849
3922
  });
3850
3923
  }
3851
3924
  return target;
@@ -3863,12 +3936,12 @@ function _unsupported_iterable_to_array$n(o, minLen) {
3863
3936
  }
3864
3937
  /** Only copy configured defaults; do not turn built-in defaults into document overrides. */ function knowledgebaseDocumentParserDefaults(config, documentType) {
3865
3938
  if (!config) return {};
3866
- return _object_spread$h({}, config.spreadsheet ? {
3867
- spreadsheet: _object_spread$h({}, config.spreadsheet)
3939
+ return _object_spread$i({}, config.spreadsheet ? {
3940
+ spreadsheet: _object_spread$i({}, config.spreadsheet)
3868
3941
  } : {}, config.tableMetadataRequirements !== undefined ? {
3869
3942
  tableMetadataRequirements: config.tableMetadataRequirements
3870
3943
  } : {}, config.questionGeneration ? {
3871
- questionGeneration: _object_spread$h({}, config.questionGeneration)
3944
+ questionGeneration: _object_spread$i({}, config.questionGeneration)
3872
3945
  } : {}, config.chunkLanguageHint !== undefined ? {
3873
3946
  chunkLanguageHint: config.chunkLanguageHint
3874
3947
  } : {}, config.maxChunkTokens !== undefined ? {
@@ -3882,7 +3955,7 @@ function _unsupported_iterable_to_array$n(o, minLen) {
3882
3955
  } : {}, config.textSplitterType ? {
3883
3956
  textSplitterType: config.textSplitterType
3884
3957
  } : {}, config.textSplitter || config.chunkSize != null || config.chunkOverlap != null ? {
3885
- textSplitter: _object_spread$h({}, config.chunkSize != null ? {
3958
+ textSplitter: _object_spread$i({}, config.chunkSize != null ? {
3886
3959
  chunkSize: config.chunkSize
3887
3960
  } : {}, config.chunkOverlap != null ? {
3888
3961
  chunkOverlap: config.chunkOverlap
@@ -3894,7 +3967,7 @@ function _unsupported_iterable_to_array$n(o, minLen) {
3894
3967
  } : {}, config.imageUnderstandingType ? {
3895
3968
  imageUnderstandingType: config.imageUnderstandingType
3896
3969
  } : {}, config.imageUnderstanding ? {
3897
- imageUnderstanding: _object_spread$h({}, config.imageUnderstanding)
3970
+ imageUnderstanding: _object_spread$i({}, config.imageUnderstanding)
3898
3971
  } : {}, knowledgebaseParserSelection(config, documentType !== null && documentType !== void 0 ? documentType : ""));
3899
3972
  }
3900
3973
  /** Arrays are the canonical ordered format; retain the plugin's legacy comma syntax. */ function decodeKnowledgeSeparators(value) {
@@ -3959,7 +4032,7 @@ function genPipelineKnowledgeBaseKey() {
3959
4032
  return letterStartSUID("KnowledgeBase_");
3960
4033
  }
3961
4034
 
3962
- function _define_property$g(obj, key, value) {
4035
+ function _define_property$h(obj, key, value) {
3963
4036
  if (key in obj) {
3964
4037
  Object.defineProperty(obj, key, {
3965
4038
  value: value,
@@ -3972,7 +4045,7 @@ function _define_property$g(obj, key, value) {
3972
4045
  }
3973
4046
  return obj;
3974
4047
  }
3975
- function _object_spread$g(target) {
4048
+ function _object_spread$h(target) {
3976
4049
  for(var i = 1; i < arguments.length; i++){
3977
4050
  var source = arguments[i] != null ? arguments[i] : {};
3978
4051
  var ownKeys = Object.keys(source);
@@ -3982,7 +4055,7 @@ function _object_spread$g(target) {
3982
4055
  }));
3983
4056
  }
3984
4057
  ownKeys.forEach(function(key) {
3985
- _define_property$g(target, key, source[key]);
4058
+ _define_property$h(target, key, source[key]);
3986
4059
  });
3987
4060
  }
3988
4061
  return target;
@@ -4002,7 +4075,7 @@ function _object_spread$g(target) {
4002
4075
  * @deprecated use DocumentSourceProviderCategoryEnum local file type instead
4003
4076
  */ DocumentTypeEnum["FILE"] = "file";
4004
4077
  })(exports.DocumentTypeEnum || (exports.DocumentTypeEnum = {}));
4005
- var KDocumentSourceType = _object_spread$g({}, exports.DocumentSourceProviderCategoryEnum, exports.DocumentTypeEnum);
4078
+ var KDocumentSourceType = _object_spread$h({}, exports.DocumentSourceProviderCategoryEnum, exports.DocumentTypeEnum);
4006
4079
  /**
4007
4080
  * Document type category, determine how to process the document.
4008
4081
  */ exports.KBDocumentCategoryEnum = void 0;
@@ -4850,7 +4923,7 @@ function _array_like_to_array$l(arr, len) {
4850
4923
  function _array_without_holes$c(arr) {
4851
4924
  if (Array.isArray(arr)) return _array_like_to_array$l(arr);
4852
4925
  }
4853
- function _define_property$f(obj, key, value) {
4926
+ function _define_property$g(obj, key, value) {
4854
4927
  if (key in obj) {
4855
4928
  Object.defineProperty(obj, key, {
4856
4929
  value: value,
@@ -4869,7 +4942,7 @@ function _iterable_to_array$e(iter) {
4869
4942
  function _non_iterable_spread$c() {
4870
4943
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4871
4944
  }
4872
- function _object_spread$f(target) {
4945
+ function _object_spread$g(target) {
4873
4946
  for(var i = 1; i < arguments.length; i++){
4874
4947
  var source = arguments[i] != null ? arguments[i] : {};
4875
4948
  var ownKeys = Object.keys(source);
@@ -4879,12 +4952,12 @@ function _object_spread$f(target) {
4879
4952
  }));
4880
4953
  }
4881
4954
  ownKeys.forEach(function(key) {
4882
- _define_property$f(target, key, source[key]);
4955
+ _define_property$g(target, key, source[key]);
4883
4956
  });
4884
4957
  }
4885
4958
  return target;
4886
4959
  }
4887
- function ownKeys$c(object, enumerableOnly) {
4960
+ function ownKeys$d(object, enumerableOnly) {
4888
4961
  var keys = Object.keys(object);
4889
4962
  if (Object.getOwnPropertySymbols) {
4890
4963
  var symbols = Object.getOwnPropertySymbols(object);
@@ -4892,12 +4965,12 @@ function ownKeys$c(object, enumerableOnly) {
4892
4965
  }
4893
4966
  return keys;
4894
4967
  }
4895
- function _object_spread_props$c(target, source) {
4968
+ function _object_spread_props$d(target, source) {
4896
4969
  source = source != null ? source : {};
4897
4970
  if (Object.getOwnPropertyDescriptors) {
4898
4971
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
4899
4972
  } else {
4900
- ownKeys$c(Object(source)).forEach(function(key) {
4973
+ ownKeys$d(Object(source)).forEach(function(key) {
4901
4974
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
4902
4975
  });
4903
4976
  }
@@ -4978,7 +5051,7 @@ function resolveRuntimeXpert(xpert, isDraft) {
4978
5051
  var graph = resolveDraftRuntimeGraph(xpert, draft);
4979
5052
  var agent = resolveDraftPrimaryAgent(xpert, draft, graph);
4980
5053
  var _draft_team5, _draft_team_workspaceId, _draft_team_agentConfig, _draft_team_commandProfile, _draft_team_features, _draft_team_options;
4981
- return _object_spread_props$c(_object_spread$f({}, xpert, (_draft_team5 = draft.team) !== null && _draft_team5 !== void 0 ? _draft_team5 : {}), {
5054
+ return _object_spread_props$d(_object_spread$g({}, xpert, (_draft_team5 = draft.team) !== null && _draft_team5 !== void 0 ? _draft_team5 : {}), {
4982
5055
  id: xpert.id,
4983
5056
  tenantId: xpert.tenantId,
4984
5057
  organizationId: xpert.organizationId,
@@ -5262,9 +5335,9 @@ function replaceAgentInDraft(draft, sourceKey, agent, options) {
5262
5335
  if (node.type === "agent" && node.key === sourceKey) {
5263
5336
  replacedNode = true;
5264
5337
  var _node_entity;
5265
- return _object_spread_props$c(_object_spread$f({}, node), {
5338
+ return _object_spread_props$d(_object_spread$g({}, node), {
5266
5339
  key: targetKey,
5267
- entity: _object_spread_props$c(_object_spread$f({}, (_node_entity = node.entity) !== null && _node_entity !== void 0 ? _node_entity : {}, agent), {
5340
+ entity: _object_spread_props$d(_object_spread$g({}, (_node_entity = node.entity) !== null && _node_entity !== void 0 ? _node_entity : {}, agent), {
5268
5341
  key: targetKey
5269
5342
  })
5270
5343
  });
@@ -5280,17 +5353,17 @@ function replaceAgentInDraft(draft, sourceKey, agent, options) {
5280
5353
  if (from === connection.from && to === connection.to) {
5281
5354
  return connection;
5282
5355
  }
5283
- return _object_spread_props$c(_object_spread$f({}, connection), {
5356
+ return _object_spread_props$d(_object_spread$g({}, connection), {
5284
5357
  from: from,
5285
5358
  to: to,
5286
5359
  key: "".concat(from, "/").concat(to)
5287
5360
  });
5288
5361
  });
5289
- return _object_spread_props$c(_object_spread$f({}, draft), {
5290
- team: draft.team ? _object_spread_props$c(_object_spread$f({}, draft.team), {
5291
- agent: draft.team.agent ? _object_spread_props$c(_object_spread$f({}, draft.team.agent, agent), {
5362
+ return _object_spread_props$d(_object_spread$g({}, draft), {
5363
+ team: draft.team ? _object_spread_props$d(_object_spread$g({}, draft.team), {
5364
+ agent: draft.team.agent ? _object_spread_props$d(_object_spread$g({}, draft.team.agent, agent), {
5292
5365
  key: targetKey
5293
- }) : _object_spread_props$c(_object_spread$f({}, agent), {
5366
+ }) : _object_spread_props$d(_object_spread$g({}, agent), {
5294
5367
  key: targetKey
5295
5368
  })
5296
5369
  }) : draft.team,
@@ -5445,7 +5518,7 @@ var GENERAL_PROJECT_TYPE = {
5445
5518
  * @template Metadata - Type of metadata, defaults to IDocChunkMetadata
5446
5519
  * @param documents - A flat array of DocumentInterface objects
5447
5520
  * @returns the hierarchical tree (root-level DocumentInterface[])
5448
- */ function _define_property$e(obj, key, value) {
5521
+ */ function _define_property$f(obj, key, value) {
5449
5522
  if (key in obj) {
5450
5523
  Object.defineProperty(obj, key, {
5451
5524
  value: value,
@@ -5458,7 +5531,7 @@ var GENERAL_PROJECT_TYPE = {
5458
5531
  }
5459
5532
  return obj;
5460
5533
  }
5461
- function _object_spread$e(target) {
5534
+ function _object_spread$f(target) {
5462
5535
  for(var i = 1; i < arguments.length; i++){
5463
5536
  var source = arguments[i] != null ? arguments[i] : {};
5464
5537
  var ownKeys = Object.keys(source);
@@ -5468,12 +5541,12 @@ function _object_spread$e(target) {
5468
5541
  }));
5469
5542
  }
5470
5543
  ownKeys.forEach(function(key) {
5471
- _define_property$e(target, key, source[key]);
5544
+ _define_property$f(target, key, source[key]);
5472
5545
  });
5473
5546
  }
5474
5547
  return target;
5475
5548
  }
5476
- function ownKeys$b(object, enumerableOnly) {
5549
+ function ownKeys$c(object, enumerableOnly) {
5477
5550
  var keys = Object.keys(object);
5478
5551
  if (Object.getOwnPropertySymbols) {
5479
5552
  var symbols = Object.getOwnPropertySymbols(object);
@@ -5481,12 +5554,12 @@ function ownKeys$b(object, enumerableOnly) {
5481
5554
  }
5482
5555
  return keys;
5483
5556
  }
5484
- function _object_spread_props$b(target, source) {
5557
+ function _object_spread_props$c(target, source) {
5485
5558
  source = source != null ? source : {};
5486
5559
  if (Object.getOwnPropertyDescriptors) {
5487
5560
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
5488
5561
  } else {
5489
- ownKeys$b(Object(source)).forEach(function(key) {
5562
+ ownKeys$c(Object(source)).forEach(function(key) {
5490
5563
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
5491
5564
  });
5492
5565
  }
@@ -5501,8 +5574,8 @@ function buildChunkTree(documents) {
5501
5574
  documents.forEach(function(doc, index) {
5502
5575
  var chunkId = getChunkNodeId(doc);
5503
5576
  if (chunkId) {
5504
- map.set(chunkId, _object_spread_props$b(_object_spread$e({}, doc), {
5505
- metadata: _object_spread_props$b(_object_spread$e({}, doc.metadata), {
5577
+ map.set(chunkId, _object_spread_props$c(_object_spread$f({}, doc), {
5578
+ metadata: _object_spread_props$c(_object_spread$f({}, doc.metadata), {
5506
5579
  chunkId: chunkId,
5507
5580
  children: []
5508
5581
  })
@@ -6052,7 +6125,7 @@ function isLocalPath(value) {
6052
6125
  })).size === value.length;
6053
6126
  }
6054
6127
 
6055
- function _define_property$d(obj, key, value) {
6128
+ function _define_property$e(obj, key, value) {
6056
6129
  if (key in obj) {
6057
6130
  Object.defineProperty(obj, key, {
6058
6131
  value: value,
@@ -6065,7 +6138,7 @@ function _define_property$d(obj, key, value) {
6065
6138
  }
6066
6139
  return obj;
6067
6140
  }
6068
- function _object_spread$d(target) {
6141
+ function _object_spread$e(target) {
6069
6142
  for(var i = 1; i < arguments.length; i++){
6070
6143
  var source = arguments[i] != null ? arguments[i] : {};
6071
6144
  var ownKeys = Object.keys(source);
@@ -6075,12 +6148,12 @@ function _object_spread$d(target) {
6075
6148
  }));
6076
6149
  }
6077
6150
  ownKeys.forEach(function(key) {
6078
- _define_property$d(target, key, source[key]);
6151
+ _define_property$e(target, key, source[key]);
6079
6152
  });
6080
6153
  }
6081
6154
  return target;
6082
6155
  }
6083
- function ownKeys$a(object, enumerableOnly) {
6156
+ function ownKeys$b(object, enumerableOnly) {
6084
6157
  var keys = Object.keys(object);
6085
6158
  if (Object.getOwnPropertySymbols) {
6086
6159
  var symbols = Object.getOwnPropertySymbols(object);
@@ -6088,12 +6161,12 @@ function ownKeys$a(object, enumerableOnly) {
6088
6161
  }
6089
6162
  return keys;
6090
6163
  }
6091
- function _object_spread_props$a(target, source) {
6164
+ function _object_spread_props$b(target, source) {
6092
6165
  source = source != null ? source : {};
6093
6166
  if (Object.getOwnPropertyDescriptors) {
6094
6167
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
6095
6168
  } else {
6096
- ownKeys$a(Object(source)).forEach(function(key) {
6169
+ ownKeys$b(Object(source)).forEach(function(key) {
6097
6170
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
6098
6171
  });
6099
6172
  }
@@ -6133,8 +6206,8 @@ function normalizeMiddlewareNode(node) {
6133
6206
  if (provider === entity.provider) {
6134
6207
  return node;
6135
6208
  }
6136
- return _object_spread_props$a(_object_spread$d({}, node), {
6137
- entity: _object_spread_props$a(_object_spread$d({}, entity), {
6209
+ return _object_spread_props$b(_object_spread$e({}, node), {
6210
+ entity: _object_spread_props$b(_object_spread$e({}, entity), {
6138
6211
  provider: provider
6139
6212
  })
6140
6213
  });
@@ -6195,7 +6268,7 @@ function _array_with_holes$c(arr) {
6195
6268
  function _array_without_holes$b(arr) {
6196
6269
  if (Array.isArray(arr)) return _array_like_to_array$i(arr);
6197
6270
  }
6198
- function _define_property$c(obj, key, value) {
6271
+ function _define_property$d(obj, key, value) {
6199
6272
  if (key in obj) {
6200
6273
  Object.defineProperty(obj, key, {
6201
6274
  value: value,
@@ -6241,7 +6314,7 @@ function _non_iterable_rest$c() {
6241
6314
  function _non_iterable_spread$b() {
6242
6315
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6243
6316
  }
6244
- function _object_spread$c(target) {
6317
+ function _object_spread$d(target) {
6245
6318
  for(var i = 1; i < arguments.length; i++){
6246
6319
  var source = arguments[i] != null ? arguments[i] : {};
6247
6320
  var ownKeys = Object.keys(source);
@@ -6251,12 +6324,12 @@ function _object_spread$c(target) {
6251
6324
  }));
6252
6325
  }
6253
6326
  ownKeys.forEach(function(key) {
6254
- _define_property$c(target, key, source[key]);
6327
+ _define_property$d(target, key, source[key]);
6255
6328
  });
6256
6329
  }
6257
6330
  return target;
6258
6331
  }
6259
- function ownKeys$9(object, enumerableOnly) {
6332
+ function ownKeys$a(object, enumerableOnly) {
6260
6333
  var keys = Object.keys(object);
6261
6334
  if (Object.getOwnPropertySymbols) {
6262
6335
  var symbols = Object.getOwnPropertySymbols(object);
@@ -6264,12 +6337,12 @@ function ownKeys$9(object, enumerableOnly) {
6264
6337
  }
6265
6338
  return keys;
6266
6339
  }
6267
- function _object_spread_props$9(target, source) {
6340
+ function _object_spread_props$a(target, source) {
6268
6341
  source = source != null ? source : {};
6269
6342
  if (Object.getOwnPropertyDescriptors) {
6270
6343
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
6271
6344
  } else {
6272
- ownKeys$9(Object(source)).forEach(function(key) {
6345
+ ownKeys$a(Object(source)).forEach(function(key) {
6273
6346
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
6274
6347
  });
6275
6348
  }
@@ -6385,7 +6458,7 @@ function normalizeIncomingContent(content, context) {
6385
6458
  if (typeof content !== "string") {
6386
6459
  return content;
6387
6460
  }
6388
- return _object_spread$c({
6461
+ return _object_spread$d({
6389
6462
  type: "text",
6390
6463
  text: content
6391
6464
  }, context.streamId ? {
@@ -6450,7 +6523,7 @@ function filterText(content) {
6450
6523
  return "";
6451
6524
  }
6452
6525
  function mergeTextChunkForDisplay(previous, incoming) {
6453
- return _object_spread$c(_object_spread_props$9(_object_spread$c({}, previous), {
6526
+ return _object_spread$d(_object_spread_props$a(_object_spread$d({}, previous), {
6454
6527
  text: "".concat(previous.text).concat(incoming.text)
6455
6528
  }), !previous.id && incoming.id ? {
6456
6529
  id: incoming.id
@@ -6462,7 +6535,7 @@ function mergeTextChunkForDisplay(previous, incoming) {
6462
6535
  }
6463
6536
  function stripAutoDisplaySeparator(incoming, previousOriginal) {
6464
6537
  if ((previousOriginal === null || previousOriginal === void 0 ? void 0 : previousOriginal.type) === "component" && incoming.text.startsWith("\n\n")) {
6465
- return _object_spread_props$9(_object_spread$c({}, incoming), {
6538
+ return _object_spread_props$a(_object_spread$d({}, incoming), {
6466
6539
  text: incoming.text.slice(1)
6467
6540
  });
6468
6541
  }
@@ -6479,14 +6552,14 @@ function mergeComponentData(previous, incoming) {
6479
6552
  return acc;
6480
6553
  }, {});
6481
6554
  var _previous_data1;
6482
- return _object_spread_props$9(_object_spread$c({}, previous, incoming), {
6483
- data: _object_spread_props$9(_object_spread$c({}, (_previous_data1 = previous.data) !== null && _previous_data1 !== void 0 ? _previous_data1 : {}, mergedIncomingData), {
6555
+ return _object_spread_props$a(_object_spread$d({}, previous, incoming), {
6556
+ data: _object_spread_props$a(_object_spread$d({}, (_previous_data1 = previous.data) !== null && _previous_data1 !== void 0 ? _previous_data1 : {}, mergedIncomingData), {
6484
6557
  created_date: ((_previous_data = previous.data) === null || _previous_data === void 0 ? void 0 : _previous_data.created_date) || ((_incoming_data = incoming.data) === null || _incoming_data === void 0 ? void 0 : _incoming_data.created_date)
6485
6558
  })
6486
6559
  });
6487
6560
  }
6488
6561
  function inferMessageAppendContext(content, fallbackSource) {
6489
- return _object_spread$c({
6562
+ return _object_spread$d({
6490
6563
  source: fallbackSource !== null && fallbackSource !== void 0 ? fallbackSource : inferContentSource(content)
6491
6564
  }, typeof content !== "string" && (content === null || content === void 0 ? void 0 : content.id) ? {
6492
6565
  streamId: String(content.id)
@@ -6494,10 +6567,10 @@ function inferMessageAppendContext(content, fallbackSource) {
6494
6567
  }
6495
6568
  function resolveMessageAppendContext(options) {
6496
6569
  var inferredContext = inferMessageAppendContext(options.incoming, options.fallbackSource);
6497
- var appendContext = typeof options.incoming === "string" && !inferredContext.streamId && options.fallbackStreamId ? _object_spread_props$9(_object_spread$c({}, inferredContext), {
6570
+ var appendContext = typeof options.incoming === "string" && !inferredContext.streamId && options.fallbackStreamId ? _object_spread_props$a(_object_spread$d({}, inferredContext), {
6498
6571
  streamId: options.fallbackStreamId
6499
6572
  }) : inferredContext;
6500
- var messageContext = shouldJoinWithoutSeparator(options.previous, appendContext) ? _object_spread_props$9(_object_spread$c({}, appendContext), {
6573
+ var messageContext = shouldJoinWithoutSeparator(options.previous, appendContext) ? _object_spread_props$a(_object_spread$d({}, appendContext), {
6501
6574
  joinHint: "none"
6502
6575
  }) : appendContext;
6503
6576
  return {
@@ -6518,7 +6591,7 @@ function resolveMessageAppendContext(options) {
6518
6591
  var previous = initial;
6519
6592
  return {
6520
6593
  resolve: function resolve(options) {
6521
- var resolved = resolveMessageAppendContext(_object_spread_props$9(_object_spread$c({}, options), {
6594
+ var resolved = resolveMessageAppendContext(_object_spread_props$a(_object_spread$d({}, options), {
6522
6595
  previous: previous
6523
6596
  }));
6524
6597
  if (!chatkitTypes.isFileActivityContent(options.incoming) && !chatkitTypes.isResourceCardContent(options.incoming)) previous = resolved.appendContext;
@@ -6556,10 +6629,10 @@ function resolveMessageAppendContext(options) {
6556
6629
  var _ref = context !== null && context !== void 0 ? context : {}, _ref_previous = _ref.previous, previous = _ref_previous === void 0 ? null : _ref_previous, contextWithoutPrevious = _object_without_properties(_ref, [
6557
6630
  "previous"
6558
6631
  ]);
6559
- var appendContext = _object_spread$c({}, inferMessageAppendContext(incoming), contextWithoutPrevious);
6632
+ var appendContext = _object_spread$d({}, inferMessageAppendContext(incoming), contextWithoutPrevious);
6560
6633
  var _appendContext_joinHint;
6561
6634
  var joinHint = (_appendContext_joinHint = appendContext.joinHint) !== null && _appendContext_joinHint !== void 0 ? _appendContext_joinHint : shouldJoinWithoutSeparator(previous, appendContext) ? "none" : undefined;
6562
- var messageContext = joinHint ? _object_spread_props$9(_object_spread$c({}, appendContext), {
6635
+ var messageContext = joinHint ? _object_spread_props$a(_object_spread$d({}, appendContext), {
6563
6636
  joinHint: joinHint
6564
6637
  }) : appendContext;
6565
6638
  var content = normalizeIncomingContent(incoming, appendContext);
@@ -6568,7 +6641,7 @@ function resolveMessageAppendContext(options) {
6568
6641
  var reasoning = (_aiMessage_reasoning = aiMessage.reasoning) !== null && _aiMessage_reasoning !== void 0 ? _aiMessage_reasoning : [];
6569
6642
  var lastReasoning = reasoning[reasoning.length - 1];
6570
6643
  if ((lastReasoning === null || lastReasoning === void 0 ? void 0 : lastReasoning.id) === content.id) {
6571
- var mergedReasoning = _object_spread_props$9(_object_spread$c({}, lastReasoning), {
6644
+ var mergedReasoning = _object_spread_props$a(_object_spread$d({}, lastReasoning), {
6572
6645
  text: "".concat(lastReasoning.text).concat(content.text)
6573
6646
  });
6574
6647
  aiMessage.reasoning = _to_consumable_array$b(reasoning.slice(0, reasoning.length - 1)).concat([
@@ -6589,7 +6662,7 @@ function resolveMessageAppendContext(options) {
6589
6662
  return isTextContent(item) && item.id === content.id;
6590
6663
  });
6591
6664
  if (index > -1) {
6592
- var mergedContent = _object_spread$c(_object_spread_props$9(_object_spread$c({}, chunks[index]), {
6665
+ var mergedContent = _object_spread$d(_object_spread_props$a(_object_spread$d({}, chunks[index]), {
6593
6666
  text: "".concat(chunks[index].text).concat(content.text)
6594
6667
  }), !chunks[index].id && content.id ? {
6595
6668
  id: content.id
@@ -6612,7 +6685,7 @@ function resolveMessageAppendContext(options) {
6612
6685
  var existingIndex = findLastTextChunkIndexById(chunks, content.id);
6613
6686
  if (existingIndex > -1) {
6614
6687
  var existing = chunks[existingIndex];
6615
- var merged = _object_spread_props$9(_object_spread$c({}, existing), {
6688
+ var merged = _object_spread_props$a(_object_spread$d({}, existing), {
6616
6689
  text: "".concat(existing.text).concat(content.text)
6617
6690
  });
6618
6691
  var nextChunks = _to_consumable_array$b(chunks);
@@ -6621,7 +6694,7 @@ function resolveMessageAppendContext(options) {
6621
6694
  return;
6622
6695
  }
6623
6696
  } else if (isTextContent(lastContent) && messageContext.joinHint === "none") {
6624
- var mergedLastContent = _object_spread_props$9(_object_spread$c({}, lastContent), {
6697
+ var mergedLastContent = _object_spread_props$a(_object_spread$d({}, lastContent), {
6625
6698
  text: "".concat(lastContent.text).concat(content.text)
6626
6699
  });
6627
6700
  aiMessage.content = _to_consumable_array$b(chunks.slice(0, chunks.length - 1)).concat([
@@ -6630,7 +6703,7 @@ function resolveMessageAppendContext(options) {
6630
6703
  return;
6631
6704
  }
6632
6705
  var separator = getContentChunkSeparator(lastContent, content.text, messageContext.joinHint);
6633
- var appended = _object_spread_props$9(_object_spread$c({}, content), {
6706
+ var appended = _object_spread_props$a(_object_spread$d({}, content), {
6634
6707
  text: separator + content.text
6635
6708
  });
6636
6709
  aiMessage.content = _to_consumable_array$b(chunks).concat([
@@ -6654,7 +6727,7 @@ function resolveMessageAppendContext(options) {
6654
6727
  aiMessage.content = nextChunks1;
6655
6728
  }
6656
6729
  function appendMessagePlainText(accumulator, incoming, context) {
6657
- var resolvedContext = _object_spread$c({}, inferMessageAppendContext(incoming), context !== null && context !== void 0 ? context : {});
6730
+ var resolvedContext = _object_spread$d({}, inferMessageAppendContext(incoming), context !== null && context !== void 0 ? context : {});
6658
6731
  var nextText = filterText(incoming);
6659
6732
  if (!nextText) {
6660
6733
  return accumulator !== null && accumulator !== void 0 ? accumulator : "";
@@ -6699,7 +6772,7 @@ function appendMessagePlainText(accumulator, incoming, context) {
6699
6772
  return;
6700
6773
  }
6701
6774
  textIndexById.set(item.id, merged.length);
6702
- merged.push(_object_spread$c({}, item));
6775
+ merged.push(_object_spread$d({}, item));
6703
6776
  return;
6704
6777
  }
6705
6778
  var lastItem = merged[merged.length - 1];
@@ -6707,7 +6780,7 @@ function appendMessagePlainText(accumulator, incoming, context) {
6707
6780
  merged[merged.length - 1] = mergeTextChunkForDisplay(lastItem, item);
6708
6781
  return;
6709
6782
  }
6710
- merged.push(_object_spread$c({}, item));
6783
+ merged.push(_object_spread$d({}, item));
6711
6784
  });
6712
6785
  return merged.length ? merged : null;
6713
6786
  }
@@ -6722,7 +6795,7 @@ function stringifyMessageContent(content) {
6722
6795
  if (chatkitTypes.isFileActivityContent(item) || chatkitTypes.isResourceCardContent(item)) return;
6723
6796
  var itemContext = inferMessageAppendContext(item);
6724
6797
  var joinHint = shouldJoinWithoutSeparator(previousContext, itemContext) ? "none" : undefined;
6725
- result = appendMessagePlainText(result, stringifySingle(item), _object_spread$c({}, itemContext, joinHint ? {
6798
+ result = appendMessagePlainText(result, stringifySingle(item), _object_spread$d({}, itemContext, joinHint ? {
6726
6799
  joinHint: joinHint
6727
6800
  } : {}));
6728
6801
  previousContext = itemContext;
@@ -6745,7 +6818,7 @@ function filterMessageText(content) {
6745
6818
  }
6746
6819
  var itemContext = inferMessageAppendContext(item);
6747
6820
  var joinHint = shouldJoinWithoutSeparator(previousContext, itemContext) ? "none" : undefined;
6748
- result = appendMessagePlainText(result, nextText, _object_spread$c({}, itemContext, joinHint ? {
6821
+ result = appendMessagePlainText(result, nextText, _object_spread$d({}, itemContext, joinHint ? {
6749
6822
  joinHint: joinHint
6750
6823
  } : {}));
6751
6824
  previousContext = itemContext;
@@ -7102,6 +7175,34 @@ var MODEL_EXECUTION_POLICY_SETTING = "modelExecutionPolicy";
7102
7175
  xpertId: v3.z.string().uuid()
7103
7176
  }).strict();
7104
7177
 
7178
+ /** Credential-free tuning snapshot. Output aliases are canonicalized to max_tokens at issuance. */ var modelExecutionParametersSchema = v3.z.object({
7179
+ temperature: v3.z.number().finite().optional(),
7180
+ top_p: v3.z.number().finite().optional(),
7181
+ top_k: v3.z.number().int().nonnegative().optional(),
7182
+ presence_penalty: v3.z.number().finite().optional(),
7183
+ frequency_penalty: v3.z.number().finite().optional(),
7184
+ repetition_penalty: v3.z.number().finite().optional(),
7185
+ seed: v3.z.number().int().nonnegative().optional(),
7186
+ max_tokens: v3.z.number().int().positive().max(Number.MAX_SAFE_INTEGER).optional(),
7187
+ enable_thinking: v3.z.boolean().optional(),
7188
+ thinking_budget: v3.z.number().int().nonnegative().optional(),
7189
+ reasoning_effort: v3.z.enum([
7190
+ "none",
7191
+ "minimal",
7192
+ "low",
7193
+ "medium",
7194
+ "high",
7195
+ "xhigh",
7196
+ "max"
7197
+ ]).optional(),
7198
+ thinking: v3.z.enum([
7199
+ "enabled",
7200
+ "disabled",
7201
+ "adaptive"
7202
+ ]).optional(),
7203
+ budget_tokens: v3.z.number().int().nonnegative().optional()
7204
+ }).strict();
7205
+
7105
7206
  /**
7106
7207
  * Running means accepted; actual work start requires an observation.
7107
7208
  * Only succeeded, failed and cancelled are terminal. Unknown must be reconciled without replay.
@@ -7413,7 +7514,7 @@ var projectPipelineEdgeSchema = v3.z.object({
7413
7514
  outcome: projectPipelineKeySchema.optional()
7414
7515
  }).strict();
7415
7516
 
7416
- function _define_property$b(obj, key, value) {
7517
+ function _define_property$c(obj, key, value) {
7417
7518
  if (key in obj) {
7418
7519
  Object.defineProperty(obj, key, {
7419
7520
  value: value,
@@ -7426,7 +7527,7 @@ function _define_property$b(obj, key, value) {
7426
7527
  }
7427
7528
  return obj;
7428
7529
  }
7429
- function _object_spread$b(target) {
7530
+ function _object_spread$c(target) {
7430
7531
  for(var i = 1; i < arguments.length; i++){
7431
7532
  var source = arguments[i] != null ? arguments[i] : {};
7432
7533
  var ownKeys = Object.keys(source);
@@ -7436,12 +7537,12 @@ function _object_spread$b(target) {
7436
7537
  }));
7437
7538
  }
7438
7539
  ownKeys.forEach(function(key) {
7439
- _define_property$b(target, key, source[key]);
7540
+ _define_property$c(target, key, source[key]);
7440
7541
  });
7441
7542
  }
7442
7543
  return target;
7443
7544
  }
7444
- function ownKeys$8(object, enumerableOnly) {
7545
+ function ownKeys$9(object, enumerableOnly) {
7445
7546
  var keys = Object.keys(object);
7446
7547
  if (Object.getOwnPropertySymbols) {
7447
7548
  var symbols = Object.getOwnPropertySymbols(object);
@@ -7449,18 +7550,18 @@ function ownKeys$8(object, enumerableOnly) {
7449
7550
  }
7450
7551
  return keys;
7451
7552
  }
7452
- function _object_spread_props$8(target, source) {
7553
+ function _object_spread_props$9(target, source) {
7453
7554
  source = source != null ? source : {};
7454
7555
  if (Object.getOwnPropertyDescriptors) {
7455
7556
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
7456
7557
  } else {
7457
- ownKeys$8(Object(source)).forEach(function(key) {
7558
+ ownKeys$9(Object(source)).forEach(function(key) {
7458
7559
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
7459
7560
  });
7460
7561
  }
7461
7562
  return target;
7462
7563
  }
7463
- var base = {
7564
+ var base$1 = {
7464
7565
  key: projectPipelineKeySchema,
7465
7566
  label: v3.z.string().min(1).max(240).optional(),
7466
7567
  stageKey: projectPipelineKeySchema,
@@ -7469,7 +7570,7 @@ var base = {
7469
7570
  };
7470
7571
  var outcomes = v3.z.array(projectPipelineKeySchema).min(2).max(32);
7471
7572
  /** Only explicit primitives can control flow; configuration cannot embed executable expressions. */ var projectPipelineNodeSchema = v3.z.discriminatedUnion("kind", [
7472
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7573
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7473
7574
  kind: v3.z.literal("work"),
7474
7575
  laneKey: projectPipelineKeySchema,
7475
7576
  operationRef: projectPipelineRefSchema,
@@ -7478,23 +7579,23 @@ var outcomes = v3.z.array(projectPipelineKeySchema).min(2).max(32);
7478
7579
  resourceResolverRef: projectPipelineRefSchema.optional(),
7479
7580
  outputSchemaRef: projectPipelineRefSchema.optional()
7480
7581
  })).strict(),
7481
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7582
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7482
7583
  kind: v3.z.literal("fork")
7483
7584
  })).strict(),
7484
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7585
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7485
7586
  kind: v3.z.literal("join"),
7486
7587
  join: v3.z.object({
7487
7588
  mode: v3.z.literal("all_selected"),
7488
7589
  accept: v3.z.literal("completed")
7489
7590
  }).strict()
7490
7591
  })).strict(),
7491
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7592
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7492
7593
  kind: v3.z.literal("router"),
7493
7594
  policyRef: projectPipelineRefSchema,
7494
7595
  outcomes: outcomes,
7495
7596
  unmatched: v3.z.literal("block")
7496
7597
  })).strict(),
7497
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7598
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7498
7599
  kind: v3.z.literal("human_gate"),
7499
7600
  laneKey: projectPipelineKeySchema,
7500
7601
  policyRef: projectPipelineRefSchema,
@@ -7502,12 +7603,12 @@ var outcomes = v3.z.array(projectPipelineKeySchema).min(2).max(32);
7502
7603
  outcomes: outcomes,
7503
7604
  outcomeLabels: v3.z.record(projectPipelineKeySchema, v3.z.string().min(1).max(120)).optional()
7504
7605
  })).strict(),
7505
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7606
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7506
7607
  kind: v3.z.literal("external_wait"),
7507
7608
  laneKey: projectPipelineKeySchema,
7508
7609
  subscriptionRef: projectPipelineRefSchema
7509
7610
  })).strict(),
7510
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7611
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7511
7612
  kind: v3.z.literal("terminal"),
7512
7613
  outcome: projectPipelineKeySchema,
7513
7614
  disposition: v3.z.enum([
@@ -8156,7 +8257,7 @@ function isProjectPipelineApplicable(definition, project) {
8156
8257
 
8157
8258
  // Invariants: definitions describe versioned topology and explicit execution authority.
8158
8259
  // Business meaning stays behind provider references; labels and icons never drive execution.
8159
- function _define_property$a(obj, key, value) {
8260
+ function _define_property$b(obj, key, value) {
8160
8261
  if (key in obj) {
8161
8262
  Object.defineProperty(obj, key, {
8162
8263
  value: value,
@@ -8169,7 +8270,7 @@ function _define_property$a(obj, key, value) {
8169
8270
  }
8170
8271
  return obj;
8171
8272
  }
8172
- function _object_spread$a(target) {
8273
+ function _object_spread$b(target) {
8173
8274
  for(var i = 1; i < arguments.length; i++){
8174
8275
  var source = arguments[i] != null ? arguments[i] : {};
8175
8276
  var ownKeys = Object.keys(source);
@@ -8179,12 +8280,12 @@ function _object_spread$a(target) {
8179
8280
  }));
8180
8281
  }
8181
8282
  ownKeys.forEach(function(key) {
8182
- _define_property$a(target, key, source[key]);
8283
+ _define_property$b(target, key, source[key]);
8183
8284
  });
8184
8285
  }
8185
8286
  return target;
8186
8287
  }
8187
- function ownKeys$7(object, enumerableOnly) {
8288
+ function ownKeys$8(object, enumerableOnly) {
8188
8289
  var keys = Object.keys(object);
8189
8290
  if (Object.getOwnPropertySymbols) {
8190
8291
  var symbols = Object.getOwnPropertySymbols(object);
@@ -8192,12 +8293,12 @@ function ownKeys$7(object, enumerableOnly) {
8192
8293
  }
8193
8294
  return keys;
8194
8295
  }
8195
- function _object_spread_props$7(target, source) {
8296
+ function _object_spread_props$8(target, source) {
8196
8297
  source = source != null ? source : {};
8197
8298
  if (Object.getOwnPropertyDescriptors) {
8198
8299
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8199
8300
  } else {
8200
- ownKeys$7(Object(source)).forEach(function(key) {
8301
+ ownKeys$8(Object(source)).forEach(function(key) {
8201
8302
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8202
8303
  });
8203
8304
  }
@@ -8229,7 +8330,7 @@ var common = {
8229
8330
  };
8230
8331
  // A provider owns topology and advancement. A managed definition owns a bounded DAG per round.
8231
8332
  var projectPipelineDefinitionShapeSchema = v3.z.discriminatedUnion("executionAuthority", [
8232
- v3.z.object(_object_spread_props$7(_object_spread$a({}, common), {
8333
+ v3.z.object(_object_spread_props$8(_object_spread$b({}, common), {
8233
8334
  executionAuthority: v3.z.literal("provider"),
8234
8335
  providerRef: projectPipelineRefSchema,
8235
8336
  topology: v3.z.object({
@@ -8238,7 +8339,7 @@ var projectPipelineDefinitionShapeSchema = v3.z.discriminatedUnion("executionAut
8238
8339
  }).strict(),
8239
8340
  actionRefs: v3.z.array(projectPipelineRefSchema).max(100).optional()
8240
8341
  })).strict(),
8241
- v3.z.object(_object_spread_props$7(_object_spread$a({}, common), {
8342
+ v3.z.object(_object_spread_props$8(_object_spread$b({}, common), {
8242
8343
  executionAuthority: v3.z.literal("platform"),
8243
8344
  topology: v3.z.object({
8244
8345
  source: v3.z.literal("definition")
@@ -8557,7 +8658,7 @@ var projectPipelineBindingSchema = v3.z.object({
8557
8658
  }
8558
8659
  });
8559
8660
 
8560
- function _define_property$9(obj, key, value) {
8661
+ function _define_property$a(obj, key, value) {
8561
8662
  if (key in obj) {
8562
8663
  Object.defineProperty(obj, key, {
8563
8664
  value: value,
@@ -8570,7 +8671,7 @@ function _define_property$9(obj, key, value) {
8570
8671
  }
8571
8672
  return obj;
8572
8673
  }
8573
- function _object_spread$9(target) {
8674
+ function _object_spread$a(target) {
8574
8675
  for(var i = 1; i < arguments.length; i++){
8575
8676
  var source = arguments[i] != null ? arguments[i] : {};
8576
8677
  var ownKeys = Object.keys(source);
@@ -8580,12 +8681,12 @@ function _object_spread$9(target) {
8580
8681
  }));
8581
8682
  }
8582
8683
  ownKeys.forEach(function(key) {
8583
- _define_property$9(target, key, source[key]);
8684
+ _define_property$a(target, key, source[key]);
8584
8685
  });
8585
8686
  }
8586
8687
  return target;
8587
8688
  }
8588
- function ownKeys$6(object, enumerableOnly) {
8689
+ function ownKeys$7(object, enumerableOnly) {
8589
8690
  var keys = Object.keys(object);
8590
8691
  if (Object.getOwnPropertySymbols) {
8591
8692
  var symbols = Object.getOwnPropertySymbols(object);
@@ -8593,12 +8694,12 @@ function ownKeys$6(object, enumerableOnly) {
8593
8694
  }
8594
8695
  return keys;
8595
8696
  }
8596
- function _object_spread_props$6(target, source) {
8697
+ function _object_spread_props$7(target, source) {
8597
8698
  source = source != null ? source : {};
8598
8699
  if (Object.getOwnPropertyDescriptors) {
8599
8700
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8600
8701
  } else {
8601
- ownKeys$6(Object(source)).forEach(function(key) {
8702
+ ownKeys$7(Object(source)).forEach(function(key) {
8602
8703
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8603
8704
  });
8604
8705
  }
@@ -8614,13 +8715,13 @@ var definitionRef = v3.z.object({
8614
8715
  templateRef: projectPipelineRefSchema,
8615
8716
  digest: v3.z.string().regex(/^[a-f0-9]{64}$/)
8616
8717
  }).strict();
8617
- var projectPipelineProjectBindingSchema = v3.z.object(_object_spread_props$6(_object_spread$9({}, scopedIdentity), {
8718
+ var projectPipelineProjectBindingSchema = v3.z.object(_object_spread_props$7(_object_spread$a({}, scopedIdentity), {
8618
8719
  definition: definitionRef,
8619
8720
  revision: v3.z.number().int().positive(),
8620
8721
  configuration: projectPipelineBindingSchema
8621
8722
  })).strict();
8622
8723
  var projectPipelineInstanceSchema = v3.z.discriminatedUnion("executionAuthority", [
8623
- v3.z.object(_object_spread_props$6(_object_spread$9({}, scopedIdentity), {
8724
+ v3.z.object(_object_spread_props$7(_object_spread$a({}, scopedIdentity), {
8624
8725
  executionAuthority: v3.z.literal("provider"),
8625
8726
  providerRef: projectPipelineRefSchema,
8626
8727
  sourceKey: v3.z.string().min(1).max(500),
@@ -8631,7 +8732,7 @@ var projectPipelineInstanceSchema = v3.z.discriminatedUnion("executionAuthority"
8631
8732
  }).strict(),
8632
8733
  revision: v3.z.number().int().nonnegative()
8633
8734
  })).strict(),
8634
- v3.z.object(_object_spread_props$6(_object_spread$9({}, scopedIdentity), {
8735
+ v3.z.object(_object_spread_props$7(_object_spread$a({}, scopedIdentity), {
8635
8736
  executionAuthority: v3.z.literal("platform"),
8636
8737
  bindingId: v3.z.string().uuid(),
8637
8738
  sourceKey: v3.z.string().min(1).max(500),
@@ -8643,7 +8744,7 @@ var projectPipelineInstanceSchema = v3.z.discriminatedUnion("executionAuthority"
8643
8744
  revision: v3.z.number().int().nonnegative()
8644
8745
  })).strict()
8645
8746
  ]);
8646
- var projectPipelineRunSchema = v3.z.object(_object_spread_props$6(_object_spread$9({}, scopedIdentity), {
8747
+ var projectPipelineRunSchema = v3.z.object(_object_spread_props$7(_object_spread$a({}, scopedIdentity), {
8647
8748
  instanceId: v3.z.string().uuid(),
8648
8749
  triggerKey: v3.z.string().min(1).max(500),
8649
8750
  definition: definitionRef,
@@ -8715,7 +8816,7 @@ var projectPipelineWorkContextSchema = v3.z.object({
8715
8816
  inputDigest: v3.z.string().regex(/^[a-f0-9]{64}$/),
8716
8817
  generation: v3.z.number().int().positive()
8717
8818
  }).strict();
8718
- var projectPipelineRoundSchema = v3.z.object(_object_spread_props$6(_object_spread$9({}, scopedIdentity), {
8819
+ var projectPipelineRoundSchema = v3.z.object(_object_spread_props$7(_object_spread$a({}, scopedIdentity), {
8719
8820
  runId: v3.z.string().uuid(),
8720
8821
  sequence: v3.z.number().int().positive(),
8721
8822
  generation: v3.z.number().int().positive(),
@@ -8731,7 +8832,7 @@ var projectPipelineRoundSchema = v3.z.object(_object_spread_props$6(_object_spre
8731
8832
  subjectVersionSet: v3.z.array(projectPipelineSubjectVersionSchema).min(1).max(100),
8732
8833
  supersedes: v3.z.string().uuid().nullable()
8733
8834
  })).strict();
8734
- var projectPipelineNodeInstanceSchema = v3.z.object(_object_spread_props$6(_object_spread$9({}, scopedIdentity), {
8835
+ var projectPipelineNodeInstanceSchema = v3.z.object(_object_spread_props$7(_object_spread$a({}, scopedIdentity), {
8735
8836
  roundId: v3.z.string().uuid(),
8736
8837
  nodeKey: projectPipelineKeySchema,
8737
8838
  /** Stable source identity; never a list index. */ expansionKey: v3.z.string().min(1).max(500),
@@ -8743,7 +8844,7 @@ var projectPipelineNodeInstanceSchema = v3.z.object(_object_spread_props$6(_obje
8743
8844
  revision: v3.z.number().int().nonnegative()
8744
8845
  })).strict();
8745
8846
 
8746
- function _define_property$8(obj, key, value) {
8847
+ function _define_property$9(obj, key, value) {
8747
8848
  if (key in obj) {
8748
8849
  Object.defineProperty(obj, key, {
8749
8850
  value: value,
@@ -8756,7 +8857,7 @@ function _define_property$8(obj, key, value) {
8756
8857
  }
8757
8858
  return obj;
8758
8859
  }
8759
- function _object_spread$8(target) {
8860
+ function _object_spread$9(target) {
8760
8861
  for(var i = 1; i < arguments.length; i++){
8761
8862
  var source = arguments[i] != null ? arguments[i] : {};
8762
8863
  var ownKeys = Object.keys(source);
@@ -8766,12 +8867,12 @@ function _object_spread$8(target) {
8766
8867
  }));
8767
8868
  }
8768
8869
  ownKeys.forEach(function(key) {
8769
- _define_property$8(target, key, source[key]);
8870
+ _define_property$9(target, key, source[key]);
8770
8871
  });
8771
8872
  }
8772
8873
  return target;
8773
8874
  }
8774
- function ownKeys$5(object, enumerableOnly) {
8875
+ function ownKeys$6(object, enumerableOnly) {
8775
8876
  var keys = Object.keys(object);
8776
8877
  if (Object.getOwnPropertySymbols) {
8777
8878
  var symbols = Object.getOwnPropertySymbols(object);
@@ -8779,12 +8880,12 @@ function ownKeys$5(object, enumerableOnly) {
8779
8880
  }
8780
8881
  return keys;
8781
8882
  }
8782
- function _object_spread_props$5(target, source) {
8883
+ function _object_spread_props$6(target, source) {
8783
8884
  source = source != null ? source : {};
8784
8885
  if (Object.getOwnPropertyDescriptors) {
8785
8886
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8786
8887
  } else {
8787
- ownKeys$5(Object(source)).forEach(function(key) {
8888
+ ownKeys$6(Object(source)).forEach(function(key) {
8788
8889
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8789
8890
  });
8790
8891
  }
@@ -8801,17 +8902,17 @@ var projectPipelinePortDescriptorSchema = v3.z.object({
8801
8902
  ])
8802
8903
  }).strict();
8803
8904
  /** Declarations allow configuration checks. They never prove a runtime executor is currently available. */ var projectPipelineExtensionDescriptorSchema = v3.z.discriminatedUnion("kind", [
8804
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8905
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8805
8906
  kind: v3.z.literal("schema")
8806
8907
  })).strict(),
8807
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8908
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8808
8909
  kind: v3.z.literal("resource")
8809
8910
  })).strict(),
8810
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8911
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8811
8912
  kind: v3.z.literal("subject"),
8812
8913
  outputSchemaRef: projectPipelineRefSchema
8813
8914
  })).strict(),
8814
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8915
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8815
8916
  kind: v3.z.literal("operation"),
8816
8917
  effects: v3.z.enum([
8817
8918
  "read_only",
@@ -8830,32 +8931,32 @@ var projectPipelinePortDescriptorSchema = v3.z.object({
8830
8931
  inputs: v3.z.record(projectPipelineKeySchema, projectPipelinePortDescriptorSchema),
8831
8932
  outputs: v3.z.record(projectPipelineKeySchema, projectPipelineRefSchema)
8832
8933
  })).strict(),
8833
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8934
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8834
8935
  kind: v3.z.literal("completion")
8835
8936
  })).strict(),
8836
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8937
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8837
8938
  kind: v3.z.literal("policy"),
8838
8939
  outcomes: v3.z.array(projectPipelineKeySchema).min(1).max(32)
8839
8940
  })).strict(),
8840
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8941
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8841
8942
  kind: v3.z.literal("projection")
8842
8943
  })).strict(),
8843
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8944
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8844
8945
  kind: v3.z.literal("presentation")
8845
8946
  })).strict(),
8846
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8947
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8847
8948
  kind: v3.z.literal("action")
8848
8949
  })).strict(),
8849
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8950
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8850
8951
  kind: v3.z.literal("metric")
8851
8952
  })).strict(),
8852
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8953
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8853
8954
  kind: v3.z.literal("dimension")
8854
8955
  })).strict(),
8855
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8956
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8856
8957
  kind: v3.z.literal("trigger")
8857
8958
  })).strict(),
8858
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8959
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8859
8960
  kind: v3.z.literal("subscription"),
8860
8961
  outputs: v3.z.record(projectPipelineKeySchema, projectPipelineRefSchema)
8861
8962
  })).strict()
@@ -9622,6 +9723,162 @@ var tombstone = v3.z.object({
9622
9723
  ]);
9623
9724
  });
9624
9725
 
9726
+ function _define_property$8(obj, key, value) {
9727
+ if (key in obj) {
9728
+ Object.defineProperty(obj, key, {
9729
+ value: value,
9730
+ enumerable: true,
9731
+ configurable: true,
9732
+ writable: true
9733
+ });
9734
+ } else {
9735
+ obj[key] = value;
9736
+ }
9737
+ return obj;
9738
+ }
9739
+ function _object_spread$8(target) {
9740
+ for(var i = 1; i < arguments.length; i++){
9741
+ var source = arguments[i] != null ? arguments[i] : {};
9742
+ var ownKeys = Object.keys(source);
9743
+ if (typeof Object.getOwnPropertySymbols === "function") {
9744
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
9745
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
9746
+ }));
9747
+ }
9748
+ ownKeys.forEach(function(key) {
9749
+ _define_property$8(target, key, source[key]);
9750
+ });
9751
+ }
9752
+ return target;
9753
+ }
9754
+ function ownKeys$5(object, enumerableOnly) {
9755
+ var keys = Object.keys(object);
9756
+ if (Object.getOwnPropertySymbols) {
9757
+ var symbols = Object.getOwnPropertySymbols(object);
9758
+ keys.push.apply(keys, symbols);
9759
+ }
9760
+ return keys;
9761
+ }
9762
+ function _object_spread_props$5(target, source) {
9763
+ source = source != null ? source : {};
9764
+ if (Object.getOwnPropertyDescriptors) {
9765
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
9766
+ } else {
9767
+ ownKeys$5(Object(source)).forEach(function(key) {
9768
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
9769
+ });
9770
+ }
9771
+ return target;
9772
+ }
9773
+ var subject = v3.z.discriminatedUnion("kind", [
9774
+ v3.z.object({
9775
+ kind: v3.z.literal("execution"),
9776
+ id: v3.z.string().min(1)
9777
+ }).strict(),
9778
+ v3.z.object({
9779
+ kind: v3.z.literal("invocation"),
9780
+ id: v3.z.string().min(1)
9781
+ }).strict()
9782
+ ]);
9783
+ var base = {
9784
+ version: v3.z.literal(1),
9785
+ observedAt: v3.z.string().datetime()
9786
+ };
9787
+ /** Host-assigned attempt identity. A new host boot or execution never inherits an old target. */ var executionRuntimeTargetSchema = v3.z.discriminatedUnion("kind", [
9788
+ v3.z.object({
9789
+ version: v3.z.literal(1),
9790
+ kind: v3.z.literal("host"),
9791
+ generation: v3.z.string().uuid(),
9792
+ hostId: v3.z.string().uuid()
9793
+ }).strict(),
9794
+ v3.z.object({
9795
+ version: v3.z.literal(1),
9796
+ kind: v3.z.literal("provider"),
9797
+ generation: v3.z.string().uuid()
9798
+ }).strict()
9799
+ ]);
9800
+ function executionRuntimeTargetsEqual(left, right) {
9801
+ if (!left || !right) return left === right;
9802
+ return left.version === right.version && left.kind === right.kind && left.generation === right.generation && (left.kind !== "host" || right.kind === "host" && left.hostId === right.hostId);
9803
+ }
9804
+ /** Control acknowledgements never constitute completion evidence. Missing evidence stays unknown. */ var executionControlEvidenceSchema = v3.z.discriminatedUnion("source", [
9805
+ v3.z.object(_object_spread_props$5(_object_spread$8({}, base), {
9806
+ source: v3.z.literal("unavailable"),
9807
+ subject: subject,
9808
+ state: v3.z.literal("unknown"),
9809
+ reason: v3.z.enum([
9810
+ "unregistered",
9811
+ "unconfirmed",
9812
+ "unsupported"
9813
+ ])
9814
+ })).strict(),
9815
+ v3.z.object(_object_spread_props$5(_object_spread$8({}, base), {
9816
+ source: v3.z.literal("platform"),
9817
+ subject: subject,
9818
+ scope: v3.z.literal("owned_subtree"),
9819
+ state: v3.z.enum([
9820
+ "running",
9821
+ "pausing",
9822
+ "paused",
9823
+ "terminating",
9824
+ "settled"
9825
+ ]),
9826
+ desired: v3.z.enum([
9827
+ "running",
9828
+ "paused",
9829
+ "terminated"
9830
+ ]),
9831
+ taskId: v3.z.string().uuid(),
9832
+ rootId: v3.z.string().uuid(),
9833
+ revision: v3.z.number().int().positive(),
9834
+ executionId: v3.z.string().uuid(),
9835
+ threadId: v3.z.string().min(1)
9836
+ })).strict(),
9837
+ v3.z.object(_object_spread_props$5(_object_spread$8({}, base), {
9838
+ source: v3.z.literal("provider"),
9839
+ subject: v3.z.object({
9840
+ kind: v3.z.literal("invocation"),
9841
+ id: v3.z.string().min(1)
9842
+ }).strict(),
9843
+ scope: v3.z.literal("operation"),
9844
+ state: v3.z.literal("settled"),
9845
+ outcome: v3.z.enum([
9846
+ "succeeded",
9847
+ "failed",
9848
+ "cancelled"
9849
+ ]),
9850
+ sessionId: v3.z.string().min(1),
9851
+ runId: v3.z.string().min(1),
9852
+ receiptKey: v3.z.string().min(1).max(500),
9853
+ target: executionRuntimeTargetSchema.optional()
9854
+ })).strict(),
9855
+ v3.z.object(_object_spread_props$5(_object_spread$8({}, base), {
9856
+ source: v3.z.literal("host_admission"),
9857
+ subject: v3.z.object({
9858
+ kind: v3.z.literal("invocation"),
9859
+ id: v3.z.string().min(1)
9860
+ }).strict(),
9861
+ scope: v3.z.literal("operation"),
9862
+ state: v3.z.literal("settled"),
9863
+ outcome: v3.z.enum([
9864
+ "failed",
9865
+ "cancelled"
9866
+ ]),
9867
+ reason: v3.z.literal("not_started")
9868
+ })).strict()
9869
+ ]);
9870
+ function unknownExecutionControl(subject) {
9871
+ var reason = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "unconfirmed";
9872
+ return {
9873
+ version: 1,
9874
+ source: "unavailable",
9875
+ subject: subject,
9876
+ state: "unknown",
9877
+ reason: reason,
9878
+ observedAt: new Date().toISOString()
9879
+ };
9880
+ }
9881
+
9625
9882
  function _define_property$7(obj, key, value) {
9626
9883
  if (key in obj) {
9627
9884
  Object.defineProperty(obj, key, {
@@ -9722,6 +9979,7 @@ var projectPipelineRuntimeExecutionSchema = v3.z.object({
9722
9979
  status: agentInvocationStatusSchema
9723
9980
  }).strict();
9724
9981
  var receipt = {
9982
+ control: executionControlEvidenceSchema.optional(),
9725
9983
  receiptKey: v3.z.string().min(1).max(500),
9726
9984
  execution: v3.z.discriminatedUnion("kind", [
9727
9985
  projectPipelineAssistantExecutionSchema,
@@ -9746,6 +10004,7 @@ var projectPipelineOperationReceiptSchema = v3.z.discriminatedUnion("status", [
9746
10004
  status: v3.z.literal("cancelled")
9747
10005
  })).strict(),
9748
10006
  v3.z.object({
10007
+ control: receipt.control,
9749
10008
  receiptKey: receipt.receiptKey.optional(),
9750
10009
  execution: receipt.execution,
9751
10010
  status: v3.z.literal("unknown")
@@ -12893,6 +13152,20 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
12893
13152
  OrganizationProjectBudgetTypeEnum["COST"] = "cost";
12894
13153
  })(exports.OrganizationProjectBudgetTypeEnum || (exports.OrganizationProjectBudgetTypeEnum = {}));
12895
13154
 
13155
+ /** Immutable authorization source; live access is rechecked on every delegated request. */ var clientSecretGrantSourceSchema = zod.z.discriminatedUnion("kind", [
13156
+ zod.z.object({
13157
+ kind: zod.z.literal("assistant")
13158
+ }).strict(),
13159
+ zod.z.object({
13160
+ kind: zod.z.literal("project"),
13161
+ projectId: zod.z.string().min(1)
13162
+ }).strict(),
13163
+ zod.z.object({
13164
+ kind: zod.z.literal("conversation"),
13165
+ conversationId: zod.z.string().min(1),
13166
+ requesterXpertId: zod.z.string().min(1)
13167
+ }).strict()
13168
+ ]);
12896
13169
  /**
12897
13170
  * Selects how an opaque client secret is authorized and how entityId is
12898
13171
  * interpreted. createdById alone does not distinguish
@@ -13816,6 +14089,119 @@ var CONTENT_EDITOR_STATUS_COMMAND = "workbench.content.status";
13816
14089
 
13817
14090
  /** Host-owned opening avoids inheriting a remote component's iframe sandbox. */ var ARTIFACT_PRESENTATION_OPEN_COMMAND = "artifact.presentation.open";
13818
14091
 
14092
+ var CONTENT_CATALOG_PROVIDER = "platform.content.catalog";
14093
+
14094
+ /** Negotiated Xpert extension. MCP cancellation acknowledgements are not exit evidence. */ var MCP_EXECUTION_CONTROL_EXTENSION_ID = "ai.xpert/execution-control";
14095
+ var MCP_EXECUTION_CONTROL_METHOD = "xpert/tasks/control";
14096
+ /** Additive tools/list metadata for 2026, which removed top-level Tool.execution. */ var mcpExecutionToolDeclarationSchema = v3.z.object({
14097
+ version: v3.z.literal(1),
14098
+ taskSupport: v3.z.enum([
14099
+ "required",
14100
+ "optional",
14101
+ "forbidden"
14102
+ ])
14103
+ });
14104
+ var mcpOperationIdentitySchema = v3.z.object({
14105
+ version: v3.z.literal(1),
14106
+ operationId: v3.z.string().uuid(),
14107
+ generation: v3.z.string().uuid(),
14108
+ inputHash: v3.z.string().regex(/^[a-f0-9]{64}$/),
14109
+ toolName: v3.z.string().min(1).max(191)
14110
+ }).strict();
14111
+ var mcpExecutionControlRequestSchema = mcpOperationIdentitySchema.extend({
14112
+ serverId: v3.z.string().uuid(),
14113
+ action: v3.z.enum([
14114
+ "inspect",
14115
+ "terminate"
14116
+ ])
14117
+ }).strict();
14118
+ var mcpExecutionReceiptSchema = v3.z.object({
14119
+ version: v3.z.literal(1),
14120
+ serverId: v3.z.string().uuid(),
14121
+ operationId: v3.z.string().uuid(),
14122
+ generation: v3.z.string().uuid(),
14123
+ taskId: v3.z.string().uuid().nullable(),
14124
+ state: v3.z.enum([
14125
+ "pending",
14126
+ "settled",
14127
+ "unknown"
14128
+ ]),
14129
+ intent: v3.z.enum([
14130
+ "running",
14131
+ "paused",
14132
+ "terminated"
14133
+ ]),
14134
+ revision: v3.z.number().int().nonnegative(),
14135
+ handlerExited: v3.z.boolean(),
14136
+ descendantsSettled: v3.z.boolean()
14137
+ }).strict();
14138
+ var mcpExecutionCapabilitySchema = v3.z.object({
14139
+ version: v3.z.literal(1),
14140
+ serverId: v3.z.string().uuid()
14141
+ }).strict();
14142
+
14143
+ /** Public presentation only. Every command revalidates permission and execution admission. */ var threadControlActionsSchema = v3.z.object({
14144
+ canPause: v3.z.boolean(),
14145
+ canResume: v3.z.boolean(),
14146
+ canTerminate: v3.z.boolean(),
14147
+ canSend: v3.z.boolean(),
14148
+ canQueue: v3.z.boolean(),
14149
+ canRetry: v3.z.boolean(),
14150
+ canRespond: v3.z.boolean()
14151
+ }).strict();
14152
+ var threadControlViewSchema = v3.z.object({
14153
+ version: v3.z.literal(1),
14154
+ threadId: v3.z.string().min(1),
14155
+ runId: v3.z.string().min(1).nullable(),
14156
+ revision: v3.z.string().regex(/^[1-9][0-9]*$/),
14157
+ state: v3.z.enum([
14158
+ "idle",
14159
+ "running",
14160
+ "pausing",
14161
+ "paused",
14162
+ "stopping",
14163
+ "settling",
14164
+ "input_required",
14165
+ "confirming",
14166
+ "completed",
14167
+ "stopped",
14168
+ "failed"
14169
+ ]),
14170
+ actions: threadControlActionsSchema,
14171
+ pauseId: v3.z.string().optional()
14172
+ }).strict();
14173
+
14174
+ var taskStatusSchema = zod.z.enum(MCP_TASK_STATUSES);
14175
+ var mcpTaskStartResultSchema = zod.z.object({
14176
+ resultType: zod.z.literal("task"),
14177
+ taskId: zod.z.string().min(1),
14178
+ status: taskStatusSchema,
14179
+ statusMessage: zod.z.string().optional(),
14180
+ createdAt: zod.z.string(),
14181
+ lastUpdatedAt: zod.z.string(),
14182
+ ttlMs: zod.z.number().nonnegative().nullable(),
14183
+ pollIntervalMs: zod.z.number().positive().optional(),
14184
+ progress: zod.z.number().min(0).max(1).nullable().optional(),
14185
+ content: zod.z.array(zod.z.unknown()).optional()
14186
+ }).passthrough();
14187
+ var mcpTaskResultSchema = zod.z.object({
14188
+ resultType: zod.z.literal("complete"),
14189
+ taskId: zod.z.string().min(1),
14190
+ status: taskStatusSchema,
14191
+ statusMessage: zod.z.string().optional(),
14192
+ createdAt: zod.z.string(),
14193
+ lastUpdatedAt: zod.z.string(),
14194
+ ttlMs: zod.z.number().nonnegative().nullable(),
14195
+ pollIntervalMs: zod.z.number().positive().optional(),
14196
+ progress: zod.z.number().min(0).max(1).nullable().optional(),
14197
+ inputRequests: zod.z.unknown().optional(),
14198
+ result: zod.z.unknown().optional(),
14199
+ error: zod.z.unknown().optional()
14200
+ }).passthrough();
14201
+ var mcpTaskAcknowledgementSchema = zod.z.object({
14202
+ resultType: zod.z.literal("complete")
14203
+ }).passthrough();
14204
+
13819
14205
  Object.defineProperty(exports, "createResourceCardContent", {
13820
14206
  enumerable: true,
13821
14207
  get: function () { return chatkitTypes.createResourceCardContent; }
@@ -13860,6 +14246,7 @@ exports.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;
13860
14246
  exports.CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE;
13861
14247
  exports.CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED = CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED;
13862
14248
  exports.CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED = CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED;
14249
+ exports.CONTENT_CATALOG_PROVIDER = CONTENT_CATALOG_PROVIDER;
13863
14250
  exports.CONTENT_DOCUMENT_LINK_RESOURCE_PARAM = CONTENT_DOCUMENT_LINK_RESOURCE_PARAM;
13864
14251
  exports.CONTENT_EDITOR_LINK_COMMAND = CONTENT_EDITOR_LINK_COMMAND;
13865
14252
  exports.CONTENT_EDITOR_RESOLVE_COMMAND = CONTENT_EDITOR_RESOLVE_COMMAND;
@@ -13974,6 +14361,8 @@ exports.MCP_CAPABILITY_TYPES = MCP_CAPABILITY_TYPES;
13974
14361
  exports.MCP_CAPABILITY_VISIBILITIES = MCP_CAPABILITY_VISIBILITIES;
13975
14362
  exports.MCP_CONFIGURATION_SECRET_MASK = MCP_CONFIGURATION_SECRET_MASK;
13976
14363
  exports.MCP_CONSUMER_AUTH_TYPES = MCP_CONSUMER_AUTH_TYPES;
14364
+ exports.MCP_EXECUTION_CONTROL_EXTENSION_ID = MCP_EXECUTION_CONTROL_EXTENSION_ID;
14365
+ exports.MCP_EXECUTION_CONTROL_METHOD = MCP_EXECUTION_CONTROL_METHOD;
13977
14366
  exports.MCP_HTTP_CORS_EXPOSED_HEADERS = MCP_HTTP_CORS_EXPOSED_HEADERS;
13978
14367
  exports.MCP_HTTP_CORS_REQUEST_HEADERS = MCP_HTTP_CORS_REQUEST_HEADERS;
13979
14368
  exports.MCP_INVOCATION_STATUSES = MCP_INVOCATION_STATUSES;
@@ -14101,12 +14490,14 @@ exports.chatMessagePresentation = chatMessagePresentation;
14101
14490
  exports.checkProjectPipelineConfiguration = checkProjectPipelineConfiguration;
14102
14491
  exports.checkProjectPipelineHostCompatibility = checkProjectPipelineHostCompatibility;
14103
14492
  exports.classificateDocumentCategory = classificateDocumentCategory;
14493
+ exports.clientSecretGrantSourceSchema = clientSecretGrantSourceSchema;
14104
14494
  exports.codingExecutionViewKey = codingExecutionViewKey;
14105
14495
  exports.collectTreeLeaves = collectTreeLeaves;
14106
14496
  exports.configurableStoreNamespace = configurableStoreNamespace;
14107
14497
  exports.configurationFromModel = configurationFromModel;
14108
14498
  exports.configureProjectPipelineFromForm = configureProjectPipelineFromForm;
14109
14499
  exports.configuredModelSource = configuredModelSource;
14500
+ exports.controlledHandlerSchema = controlledHandlerSchema;
14110
14501
  exports.convertToUrlPath = convertToUrlPath;
14111
14502
  exports.createAgentConnections = createAgentConnections;
14112
14503
  exports.createConversationTitleSummaryEvent = createConversationTitleSummaryEvent;
@@ -14127,6 +14518,11 @@ exports.evidenceDrivenStrategy = evidenceDrivenStrategy;
14127
14518
  exports.executionActivityBatchSchema = executionActivityBatchSchema;
14128
14519
  exports.executionActivityCapabilitiesSchema = executionActivityCapabilitiesSchema;
14129
14520
  exports.executionActivityItemSchema = executionActivityItemSchema;
14521
+ exports.executionControlCapabilitiesSchema = executionControlCapabilitiesSchema;
14522
+ exports.executionControlEvidenceSchema = executionControlEvidenceSchema;
14523
+ exports.executionControlProtocols = executionControlProtocols;
14524
+ exports.executionRuntimeTargetSchema = executionRuntimeTargetSchema;
14525
+ exports.executionRuntimeTargetsEqual = executionRuntimeTargetsEqual;
14130
14526
  exports.figureOutXpert = figureOutXpert;
14131
14527
  exports.filterAssistantBindingDisabledSkillIds = filterAssistantBindingDisabledSkillIds;
14132
14528
  exports.filterAssistantBindingDisabledTools = filterAssistantBindingDisabledTools;
@@ -14236,10 +14632,19 @@ exports.legacyModelFeatures = legacyModelFeatures;
14236
14632
  exports.letterStartSUID = letterStartSUID;
14237
14633
  exports.locateNodes = locateNodes;
14238
14634
  exports.mapTranslationLanguage = mapTranslationLanguage;
14635
+ exports.mcpExecutionCapabilitySchema = mcpExecutionCapabilitySchema;
14636
+ exports.mcpExecutionControlRequestSchema = mcpExecutionControlRequestSchema;
14637
+ exports.mcpExecutionReceiptSchema = mcpExecutionReceiptSchema;
14638
+ exports.mcpExecutionToolDeclarationSchema = mcpExecutionToolDeclarationSchema;
14639
+ exports.mcpOperationIdentitySchema = mcpOperationIdentitySchema;
14640
+ exports.mcpTaskAcknowledgementSchema = mcpTaskAcknowledgementSchema;
14641
+ exports.mcpTaskResultSchema = mcpTaskResultSchema;
14642
+ exports.mcpTaskStartResultSchema = mcpTaskStartResultSchema;
14239
14643
  exports.mergeMessageContentForDisplay = mergeMessageContentForDisplay;
14240
14644
  exports.messageContentText = messageContentText;
14241
14645
  exports.modelConfigurationSchema = modelConfigurationSchema;
14242
14646
  exports.modelExecutionEntry = modelExecutionEntry;
14647
+ exports.modelExecutionParametersSchema = modelExecutionParametersSchema;
14243
14648
  exports.modelExecutionSourceId = modelExecutionSourceId;
14244
14649
  exports.modelImportSchema = modelImportSchema;
14245
14650
  exports.nonBlank = nonBlank;
@@ -14382,6 +14787,11 @@ exports.resolveMessageAppendContext = resolveMessageAppendContext;
14382
14787
  exports.resolveModelParameterOptions = resolveModelParameterOptions;
14383
14788
  exports.resolvePromptWorkflowCapabilities = resolvePromptWorkflowCapabilities;
14384
14789
  exports.resolveRuntimeXpert = resolveRuntimeXpert;
14790
+ exports.sandboxEvidence = sandboxEvidence;
14791
+ exports.sandboxJobRetryReferenceSchema = sandboxJobRetryReferenceSchema;
14792
+ exports.sandboxRuntimeEvidenceSchema = sandboxRuntimeEvidenceSchema;
14793
+ exports.sandboxRuntimeTargetSchema = sandboxRuntimeTargetSchema;
14794
+ exports.sandboxTargetsEqual = sandboxTargetsEqual;
14385
14795
  exports.selectedPipelineAttemptFacts = selectedPipelineAttemptFacts;
14386
14796
  exports.setStateVariable = setStateVariable;
14387
14797
  exports.shortTitle = shortTitle;
@@ -14399,7 +14809,10 @@ exports.templateSetupUpdateSchema = templateSetupUpdateSchema;
14399
14809
  exports.templateUpgradeActionSchema = templateUpgradeActionSchema;
14400
14810
  exports.templateUpgradeInputSchema = templateUpgradeInputSchema;
14401
14811
  exports.templateUpgradeSectionSchema = templateUpgradeSectionSchema;
14812
+ exports.threadControlActionsSchema = threadControlActionsSchema;
14813
+ exports.threadControlViewSchema = threadControlViewSchema;
14402
14814
  exports.transformInstallation = transformInstallation;
14815
+ exports.unknownExecutionControl = unknownExecutionControl;
14403
14816
  exports.updateAssistantBindingSkillPreferences = updateAssistantBindingSkillPreferences;
14404
14817
  exports.updateAssistantBindingToolPreferences = updateAssistantBindingToolPreferences;
14405
14818
  exports.usesConfiguredModelCatalog = usesConfiguredModelCatalog;