@xpert-ai/contracts 3.26.2 → 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.
Files changed (40) hide show
  1. package/index.cjs.js +760 -290
  2. package/index.esm.js +726 -291
  3. package/package.json +2 -2
  4. package/src/agent-plugin.d.ts +2 -0
  5. package/src/ai/chat-recovery.model.d.ts +33 -0
  6. package/src/ai/chat.model.d.ts +16 -1
  7. package/src/ai/computer-codex-isolation.model.d.ts +12 -0
  8. package/src/ai/execution-control-evidence.schema.d.ts +294 -0
  9. package/src/ai/execution-control.model.d.ts +26 -0
  10. package/src/ai/index.d.ts +6 -0
  11. package/src/ai/mcp-execution-control.schema.d.ts +107 -0
  12. package/src/ai/mcp-operation.model.d.ts +60 -0
  13. package/src/ai/mcp-task.schema.d.ts +85 -0
  14. package/src/ai/model-execution-parameters.model.d.ts +46 -0
  15. package/src/ai/model-execution.model.d.ts +3 -0
  16. package/src/ai/project-pipeline/operation.schema.d.ts +1987 -2
  17. package/src/ai/project-task-runtime.model.d.ts +44 -44
  18. package/src/ai/run-display-snapshot.model.d.ts +24 -0
  19. package/src/ai/sandbox-execution-control.schema.d.ts +100 -0
  20. package/src/ai/thread-activity.model.d.ts +1 -0
  21. package/src/ai/thread-control-projection.model.d.ts +9 -0
  22. package/src/ai/thread-control-view.schema.d.ts +97 -0
  23. package/src/ai/xpert-agent-execution.model.d.ts +2 -0
  24. package/src/ai/xpert-project-type.model.d.ts +2 -0
  25. package/src/ai/xpert-template.model.d.ts +2 -0
  26. package/src/ai/xpert-workspace.model.d.ts +1 -0
  27. package/src/ai/xpert.model.d.ts +4 -0
  28. package/src/api-key.model.d.ts +3 -1
  29. package/src/artifact.model.d.ts +3 -0
  30. package/src/content-document.model.d.ts +142 -0
  31. package/src/content-reference.model.d.ts +19 -0
  32. package/src/content-resource.model.d.ts +112 -0
  33. package/src/desktop-shell.model.d.ts +8 -0
  34. package/src/execution-control-admission.schema.d.ts +119 -0
  35. package/src/index.d.ts +12 -1
  36. package/src/plugin-application.d.ts +34 -7
  37. package/src/runtime-control.d.ts +9 -0
  38. package/src/secret-token.model.d.ts +33 -0
  39. package/src/task-control.model.d.ts +45 -0
  40. package/src/view-extension/model.d.ts +14 -0
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";
@@ -90,30 +124,30 @@ function resolveI18nText(value) {
90
124
  return null;
91
125
  }
92
126
 
93
- function _array_like_to_array$t(arr, len) {
127
+ function _array_like_to_array$u(arr, len) {
94
128
  if (len == null || len > arr.length) len = arr.length;
95
129
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
96
130
  return arr2;
97
131
  }
98
- function _array_without_holes$j(arr) {
99
- if (Array.isArray(arr)) return _array_like_to_array$t(arr);
132
+ function _array_without_holes$k(arr) {
133
+ if (Array.isArray(arr)) return _array_like_to_array$u(arr);
100
134
  }
101
- function _iterable_to_array$l(iter) {
135
+ function _iterable_to_array$m(iter) {
102
136
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
103
137
  }
104
- function _non_iterable_spread$j() {
138
+ function _non_iterable_spread$k() {
105
139
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
106
140
  }
107
- function _to_consumable_array$j(arr) {
108
- return _array_without_holes$j(arr) || _iterable_to_array$l(arr) || _unsupported_iterable_to_array$t(arr) || _non_iterable_spread$j();
141
+ function _to_consumable_array$k(arr) {
142
+ return _array_without_holes$k(arr) || _iterable_to_array$m(arr) || _unsupported_iterable_to_array$u(arr) || _non_iterable_spread$k();
109
143
  }
110
- function _unsupported_iterable_to_array$t(o, minLen) {
144
+ function _unsupported_iterable_to_array$u(o, minLen) {
111
145
  if (!o) return;
112
- if (typeof o === "string") return _array_like_to_array$t(o, minLen);
146
+ if (typeof o === "string") return _array_like_to_array$u(o, minLen);
113
147
  var n = Object.prototype.toString.call(o).slice(8, -1);
114
148
  if (n === "Object" && o.constructor) n = o.constructor.name;
115
149
  if (n === "Map" || n === "Set") return Array.from(n);
116
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$t(o, minLen);
150
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$u(o, minLen);
117
151
  }
118
152
  var _uuidGenerator;
119
153
  var uuidGenerator = new ShortUniqueId({
@@ -123,7 +157,7 @@ var uuid = function() {
123
157
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
124
158
  args[_key] = arguments[_key];
125
159
  }
126
- return (_uuidGenerator = uuidGenerator).randomUUID.apply(_uuidGenerator, _to_consumable_array$j(args));
160
+ return (_uuidGenerator = uuidGenerator).randomUUID.apply(_uuidGenerator, _to_consumable_array$k(args));
127
161
  };
128
162
  // Parameters
129
163
  exports.ParameterTypeEnum = void 0;
@@ -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",
@@ -154,30 +227,30 @@ function letterStartSUID(start) {
154
227
  "FileOutput"
155
228
  ];
156
229
 
157
- /** A summary's incoming dependencies constrain its children without making them wait for the summary itself. */ function _array_like_to_array$s(arr, len) {
230
+ /** A summary's incoming dependencies constrain its children without making them wait for the summary itself. */ function _array_like_to_array$t(arr, len) {
158
231
  if (len == null || len > arr.length) len = arr.length;
159
232
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
160
233
  return arr2;
161
234
  }
162
- function _array_without_holes$i(arr) {
163
- if (Array.isArray(arr)) return _array_like_to_array$s(arr);
235
+ function _array_without_holes$j(arr) {
236
+ if (Array.isArray(arr)) return _array_like_to_array$t(arr);
164
237
  }
165
- function _iterable_to_array$k(iter) {
238
+ function _iterable_to_array$l(iter) {
166
239
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
167
240
  }
168
- function _non_iterable_spread$i() {
241
+ function _non_iterable_spread$j() {
169
242
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
170
243
  }
171
- function _to_consumable_array$i(arr) {
172
- return _array_without_holes$i(arr) || _iterable_to_array$k(arr) || _unsupported_iterable_to_array$s(arr) || _non_iterable_spread$i();
244
+ function _to_consumable_array$j(arr) {
245
+ return _array_without_holes$j(arr) || _iterable_to_array$l(arr) || _unsupported_iterable_to_array$t(arr) || _non_iterable_spread$j();
173
246
  }
174
- function _unsupported_iterable_to_array$s(o, minLen) {
247
+ function _unsupported_iterable_to_array$t(o, minLen) {
175
248
  if (!o) return;
176
- if (typeof o === "string") return _array_like_to_array$s(o, minLen);
249
+ if (typeof o === "string") return _array_like_to_array$t(o, minLen);
177
250
  var n = Object.prototype.toString.call(o).slice(8, -1);
178
251
  if (n === "Object" && o.constructor) n = o.constructor.name;
179
252
  if (n === "Map" || n === "Set") return Array.from(n);
180
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$s(o, minLen);
253
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$t(o, minLen);
181
254
  }
182
255
  function schedulePredecessors(task, byId) {
183
256
  var ids = new Set(task.predecessorIds);
@@ -192,7 +265,7 @@ function schedulePredecessors(task, byId) {
192
265
  });
193
266
  parentId = parent.parentTaskId;
194
267
  }
195
- return _to_consumable_array$i(ids);
268
+ return _to_consumable_array$j(ids);
196
269
  }
197
270
  /** Tree containment and finish-to-start dependencies are separate acyclic graphs. */ function validateProjectTaskGraph(tasks) {
198
271
  var _loop = function(_i1, _iter1) {
@@ -206,7 +279,7 @@ function schedulePredecessors(task, byId) {
206
279
  active.add(id);
207
280
  var references = relation === "tree" ? task.parentTaskId ? [
208
281
  task.parentTaskId
209
- ] : [] : _to_consumable_array$i(relation === "schedule" ? schedulePredecessors(task, byId) : task.predecessorIds).concat(_to_consumable_array$i(relation === "schedule" && task.kind === "summary" ? tasks.filter(function(child) {
282
+ ] : [] : _to_consumable_array$j(relation === "schedule" ? schedulePredecessors(task, byId) : task.predecessorIds).concat(_to_consumable_array$j(relation === "schedule" && task.kind === "summary" ? tasks.filter(function(child) {
210
283
  return child.parentTaskId === task.id;
211
284
  }).map(function(child) {
212
285
  return child.id;
@@ -318,10 +391,10 @@ function schedulePredecessors(task, byId) {
318
391
  Date.parse(child.startAt)
319
392
  ] : [];
320
393
  });
321
- startAt = starts.length ? new Date((_Math = Math).min.apply(_Math, _to_consumable_array$i(starts))).toISOString() : null;
394
+ startAt = starts.length ? new Date((_Math = Math).min.apply(_Math, _to_consumable_array$j(starts))).toISOString() : null;
322
395
  endAt = children.length && children.every(function(child) {
323
396
  return child.endAt;
324
- }) ? new Date((_Math1 = Math).max.apply(_Math1, _to_consumable_array$i(children.map(function(child) {
397
+ }) ? new Date((_Math1 = Math).max.apply(_Math1, _to_consumable_array$j(children.map(function(child) {
325
398
  return Date.parse(child.endAt);
326
399
  })))).toISOString() : null;
327
400
  if (children.some(function(child) {
@@ -341,9 +414,9 @@ function schedulePredecessors(task, byId) {
341
414
  });
342
415
  var earliest = task.actualStartAt ? Date.parse(task.actualStartAt) : predecessorEnds.some(function(value) {
343
416
  return value === null;
344
- }) ? null : start !== null || predecessorEnds.length ? (_Math2 = Math).max.apply(_Math2, _to_consumable_array$i(start !== null ? [
417
+ }) ? null : start !== null || predecessorEnds.length ? (_Math2 = Math).max.apply(_Math2, _to_consumable_array$j(start !== null ? [
345
418
  Date.parse(start)
346
- ] : []).concat(_to_consumable_array$i(predecessorEnds.map(function(value) {
419
+ ] : []).concat(_to_consumable_array$j(predecessorEnds.map(function(value) {
347
420
  return value;
348
421
  })))) : null;
349
422
  startAt = earliest === null ? null : new Date(earliest).toISOString();
@@ -374,7 +447,7 @@ function schedulePredecessors(task, byId) {
374
447
  return result.get(task.id).endAt !== null;
375
448
  })) {
376
449
  var _Math;
377
- var finish = (_Math = Math).max.apply(_Math, _to_consumable_array$i(leaves.map(function(task) {
450
+ var finish = (_Math = Math).max.apply(_Math, _to_consumable_array$j(leaves.map(function(task) {
378
451
  return Date.parse(result.get(task.id).endAt);
379
452
  })));
380
453
  var mark = function(id) {
@@ -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
  }
@@ -1667,7 +1740,7 @@ function toIsoString(value) {
1667
1740
  return new Date().toISOString();
1668
1741
  }
1669
1742
 
1670
- function _array_like_to_array$r(arr, len) {
1743
+ function _array_like_to_array$s(arr, len) {
1671
1744
  if (len == null || len > arr.length) len = arr.length;
1672
1745
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1673
1746
  return arr2;
@@ -1675,10 +1748,10 @@ function _array_like_to_array$r(arr, len) {
1675
1748
  function _array_with_holes$g(arr) {
1676
1749
  if (Array.isArray(arr)) return arr;
1677
1750
  }
1678
- function _array_without_holes$h(arr) {
1679
- if (Array.isArray(arr)) return _array_like_to_array$r(arr);
1751
+ function _array_without_holes$i(arr) {
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,
@@ -1691,7 +1764,7 @@ function _define_property$n(obj, key, value) {
1691
1764
  }
1692
1765
  return obj;
1693
1766
  }
1694
- function _iterable_to_array$j(iter) {
1767
+ function _iterable_to_array$k(iter) {
1695
1768
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1696
1769
  }
1697
1770
  function _iterable_to_array_limit$e(arr, i) {
@@ -1721,10 +1794,10 @@ function _iterable_to_array_limit$e(arr, i) {
1721
1794
  function _non_iterable_rest$g() {
1722
1795
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1723
1796
  }
1724
- function _non_iterable_spread$h() {
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,30 +1820,30 @@ 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
  }
1759
1832
  return target;
1760
1833
  }
1761
1834
  function _sliced_to_array$e(arr, i) {
1762
- return _array_with_holes$g(arr) || _iterable_to_array_limit$e(arr, i) || _unsupported_iterable_to_array$r(arr, i) || _non_iterable_rest$g();
1835
+ return _array_with_holes$g(arr) || _iterable_to_array_limit$e(arr, i) || _unsupported_iterable_to_array$s(arr, i) || _non_iterable_rest$g();
1763
1836
  }
1764
- function _to_consumable_array$h(arr) {
1765
- return _array_without_holes$h(arr) || _iterable_to_array$j(arr) || _unsupported_iterable_to_array$r(arr) || _non_iterable_spread$h();
1837
+ function _to_consumable_array$i(arr) {
1838
+ return _array_without_holes$i(arr) || _iterable_to_array$k(arr) || _unsupported_iterable_to_array$s(arr) || _non_iterable_spread$i();
1766
1839
  }
1767
- function _unsupported_iterable_to_array$r(o, minLen) {
1840
+ function _unsupported_iterable_to_array$s(o, minLen) {
1768
1841
  if (!o) return;
1769
- if (typeof o === "string") return _array_like_to_array$r(o, minLen);
1842
+ if (typeof o === "string") return _array_like_to_array$s(o, minLen);
1770
1843
  var n = Object.prototype.toString.call(o).slice(8, -1);
1771
1844
  if (n === "Object" && o.constructor) n = o.constructor.name;
1772
1845
  if (n === "Map" || n === "Set") return Array.from(n);
1773
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$r(o, minLen);
1846
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$s(o, minLen);
1774
1847
  }
1775
1848
  exports.AssistantCode = void 0;
1776
1849
  (function(AssistantCode) {
@@ -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
@@ -1946,11 +2019,11 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1946
2019
  var disabledTools = getAssistantBindingDisabledTools(normalizedPreferences, sourceType, normalizedNodeKey);
1947
2020
  var nextDisabledTools = enabled ? disabledTools.filter(function(item) {
1948
2021
  return item !== normalizedToolName;
1949
- }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$h(disabledTools).concat([
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) {
@@ -2011,10 +2084,10 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
2011
2084
  var disabledSkillIds = getAssistantBindingDisabledSkillIds(normalizedPreferences, normalizedWorkspaceId);
2012
2085
  var nextDisabledSkillIds = enabled ? disabledSkillIds.filter(function(item) {
2013
2086
  return item !== normalizedSkillId;
2014
- }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$h(disabledSkillIds).concat([
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
  }))
@@ -2073,13 +2146,13 @@ function isSystemManagedAssistant(code) {
2073
2146
  }
2074
2147
 
2075
2148
  // Shared by Cloud and Desktop: activity changes must not move assistant entries.
2076
- function _array_like_to_array$q(arr, len) {
2149
+ function _array_like_to_array$r(arr, len) {
2077
2150
  if (len == null || len > arr.length) len = arr.length;
2078
2151
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2079
2152
  return arr2;
2080
2153
  }
2081
- function _array_without_holes$g(arr) {
2082
- if (Array.isArray(arr)) return _array_like_to_array$q(arr);
2154
+ function _array_without_holes$h(arr) {
2155
+ if (Array.isArray(arr)) return _array_like_to_array$r(arr);
2083
2156
  }
2084
2157
  function _instanceof(left, right) {
2085
2158
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
@@ -2088,22 +2161,22 @@ function _instanceof(left, right) {
2088
2161
  return left instanceof right;
2089
2162
  }
2090
2163
  }
2091
- function _iterable_to_array$i(iter) {
2164
+ function _iterable_to_array$j(iter) {
2092
2165
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2093
2166
  }
2094
- function _non_iterable_spread$g() {
2167
+ function _non_iterable_spread$h() {
2095
2168
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2096
2169
  }
2097
- function _to_consumable_array$g(arr) {
2098
- return _array_without_holes$g(arr) || _iterable_to_array$i(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$g();
2170
+ function _to_consumable_array$h(arr) {
2171
+ return _array_without_holes$h(arr) || _iterable_to_array$j(arr) || _unsupported_iterable_to_array$r(arr) || _non_iterable_spread$h();
2099
2172
  }
2100
- function _unsupported_iterable_to_array$q(o, minLen) {
2173
+ function _unsupported_iterable_to_array$r(o, minLen) {
2101
2174
  if (!o) return;
2102
- if (typeof o === "string") return _array_like_to_array$q(o, minLen);
2175
+ if (typeof o === "string") return _array_like_to_array$r(o, minLen);
2103
2176
  var n = Object.prototype.toString.call(o).slice(8, -1);
2104
2177
  if (n === "Object" && o.constructor) n = o.constructor.name;
2105
2178
  if (n === "Map" || n === "Set") return Array.from(n);
2106
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$q(o, minLen);
2179
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$r(o, minLen);
2107
2180
  }
2108
2181
  function orderAssistantXperts(items) {
2109
2182
  var orderedIds = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
@@ -2132,7 +2205,7 @@ function orderAssistantXperts(items) {
2132
2205
  var item = param.item;
2133
2206
  return item;
2134
2207
  });
2135
- return _to_consumable_array$g(unorderedItems).concat(_to_consumable_array$g(orderedIds.map(function(id) {
2208
+ return _to_consumable_array$h(unorderedItems).concat(_to_consumable_array$h(orderedIds.map(function(id) {
2136
2209
  return itemById.get(id);
2137
2210
  }).filter(function(item) {
2138
2211
  return !!item;
@@ -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){
@@ -2357,15 +2430,15 @@ exports.AiModelTypeEnum = void 0;
2357
2430
  AiModelTypeEnum["VIDEO"] = "video";
2358
2431
  })(exports.AiModelTypeEnum || (exports.AiModelTypeEnum = {}));
2359
2432
 
2360
- function _array_like_to_array$p(arr, len) {
2433
+ function _array_like_to_array$q(arr, len) {
2361
2434
  if (len == null || len > arr.length) len = arr.length;
2362
2435
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2363
2436
  return arr2;
2364
2437
  }
2365
- function _array_without_holes$f(arr) {
2366
- if (Array.isArray(arr)) return _array_like_to_array$p(arr);
2438
+ function _array_without_holes$g(arr) {
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,
@@ -2378,13 +2451,13 @@ function _define_property$l(obj, key, value) {
2378
2451
  }
2379
2452
  return obj;
2380
2453
  }
2381
- function _iterable_to_array$h(iter) {
2454
+ function _iterable_to_array$i(iter) {
2382
2455
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2383
2456
  }
2384
- function _non_iterable_spread$f() {
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,27 +2480,27 @@ 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
  }
2419
2492
  return target;
2420
2493
  }
2421
- function _to_consumable_array$f(arr) {
2422
- return _array_without_holes$f(arr) || _iterable_to_array$h(arr) || _unsupported_iterable_to_array$p(arr) || _non_iterable_spread$f();
2494
+ function _to_consumable_array$g(arr) {
2495
+ return _array_without_holes$g(arr) || _iterable_to_array$i(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$g();
2423
2496
  }
2424
- function _unsupported_iterable_to_array$p(o, minLen) {
2497
+ function _unsupported_iterable_to_array$q(o, minLen) {
2425
2498
  if (!o) return;
2426
- if (typeof o === "string") return _array_like_to_array$p(o, minLen);
2499
+ if (typeof o === "string") return _array_like_to_array$q(o, minLen);
2427
2500
  var n = Object.prototype.toString.call(o).slice(8, -1);
2428
2501
  if (n === "Object" && o.constructor) n = o.constructor.name;
2429
2502
  if (n === "Map" || n === "Set") return Array.from(n);
2430
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$p(o, minLen);
2503
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$q(o, minLen);
2431
2504
  }
2432
2505
  var discoverableModelTypes = [
2433
2506
  exports.AiModelTypeEnum.LLM,
@@ -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
  }
@@ -2520,7 +2593,7 @@ function defaultModelConfiguration(modelType) {
2520
2593
  configuration.maxOutputTokens = Math.min(configuration.maxOutputTokens, configuration.contextSize);
2521
2594
  configuration.defaultMaxTokens = Math.min(configuration.defaultMaxTokens, configuration.maxOutputTokens);
2522
2595
  var _model_features;
2523
- configuration.features = _to_consumable_array$f((_model_features = model === null || model === void 0 ? void 0 : model.features) !== null && _model_features !== void 0 ? _model_features : []);
2596
+ configuration.features = _to_consumable_array$g((_model_features = model === null || model === void 0 ? void 0 : model.features) !== null && _model_features !== void 0 ? _model_features : []);
2524
2597
  }
2525
2598
  if (configuration.modelType === exports.AiModelTypeEnum.TEXT_EMBEDDING) {
2526
2599
  var _model_model_properties1, _model_parameter_rules_find, _model_parameter_rules1;
@@ -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
  }
@@ -3247,7 +3320,7 @@ var VariableOperations = [
3247
3320
  }
3248
3321
  ];
3249
3322
 
3250
- function _array_like_to_array$o(arr, len) {
3323
+ function _array_like_to_array$p(arr, len) {
3251
3324
  if (len == null || len > arr.length) len = arr.length;
3252
3325
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3253
3326
  return arr2;
@@ -3255,7 +3328,7 @@ function _array_like_to_array$o(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,27 +3391,27 @@ 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
  }
3330
3403
  return target;
3331
3404
  }
3332
3405
  function _sliced_to_array$d(arr, i) {
3333
- return _array_with_holes$f(arr) || _iterable_to_array_limit$d(arr, i) || _unsupported_iterable_to_array$o(arr, i) || _non_iterable_rest$f();
3406
+ return _array_with_holes$f(arr) || _iterable_to_array_limit$d(arr, i) || _unsupported_iterable_to_array$p(arr, i) || _non_iterable_rest$f();
3334
3407
  }
3335
- function _unsupported_iterable_to_array$o(o, minLen) {
3408
+ function _unsupported_iterable_to_array$p(o, minLen) {
3336
3409
  if (!o) return;
3337
- if (typeof o === "string") return _array_like_to_array$o(o, minLen);
3410
+ if (typeof o === "string") return _array_like_to_array$p(o, minLen);
3338
3411
  var n = Object.prototype.toString.call(o).slice(8, -1);
3339
3412
  if (n === "Object" && o.constructor) n = o.constructor.name;
3340
3413
  if (n === "Map" || n === "Set") return Array.from(n);
3341
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$o(o, minLen);
3414
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$p(o, minLen);
3342
3415
  }
3343
3416
  /**
3344
3417
  * @deprecated can use getCurrentTaskInput instead?
@@ -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
  })
@@ -3695,30 +3768,30 @@ var _retrieval_recall_contentScope;
3695
3768
  });
3696
3769
  }
3697
3770
 
3698
- function _array_like_to_array$n(arr, len) {
3771
+ function _array_like_to_array$o(arr, len) {
3699
3772
  if (len == null || len > arr.length) len = arr.length;
3700
3773
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3701
3774
  return arr2;
3702
3775
  }
3703
- function _array_without_holes$e(arr) {
3704
- if (Array.isArray(arr)) return _array_like_to_array$n(arr);
3776
+ function _array_without_holes$f(arr) {
3777
+ if (Array.isArray(arr)) return _array_like_to_array$o(arr);
3705
3778
  }
3706
- function _iterable_to_array$g(iter) {
3779
+ function _iterable_to_array$h(iter) {
3707
3780
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3708
3781
  }
3709
- function _non_iterable_spread$e() {
3782
+ function _non_iterable_spread$f() {
3710
3783
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3711
3784
  }
3712
- function _to_consumable_array$e(arr) {
3713
- return _array_without_holes$e(arr) || _iterable_to_array$g(arr) || _unsupported_iterable_to_array$n(arr) || _non_iterable_spread$e();
3785
+ function _to_consumable_array$f(arr) {
3786
+ return _array_without_holes$f(arr) || _iterable_to_array$h(arr) || _unsupported_iterable_to_array$o(arr) || _non_iterable_spread$f();
3714
3787
  }
3715
- function _unsupported_iterable_to_array$n(o, minLen) {
3788
+ function _unsupported_iterable_to_array$o(o, minLen) {
3716
3789
  if (!o) return;
3717
- if (typeof o === "string") return _array_like_to_array$n(o, minLen);
3790
+ if (typeof o === "string") return _array_like_to_array$o(o, minLen);
3718
3791
  var n = Object.prototype.toString.call(o).slice(8, -1);
3719
3792
  if (n === "Object" && o.constructor) n = o.constructor.name;
3720
3793
  if (n === "Map" || n === "Set") return Array.from(n);
3721
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$n(o, minLen);
3794
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$o(o, minLen);
3722
3795
  }
3723
3796
  var BUILTIN_KNOWLEDGE_PARSER = "builtin";
3724
3797
  /** Only formats with a real builtin reader; unknown binary formats are not advertised as text. */ var BUILTIN_KNOWLEDGE_FILE_TYPES = [
@@ -3793,11 +3866,11 @@ function knowledgebaseParserSelection(config, documentType) {
3793
3866
  /** Existing uploader/importer defaults plus capabilities advertised by installed document parsers.
3794
3867
  * Explicit caller restrictions remain authoritative; this does not grant builtin parsing support.
3795
3868
  */ function knowledgeUploadFileTypes(defaults, providers, accepts) {
3796
- var candidates = (accepts === null || accepts === void 0 ? void 0 : accepts.length) ? accepts : _to_consumable_array$e(defaults).concat(_to_consumable_array$e(providers.flatMap(function(provider) {
3869
+ var candidates = (accepts === null || accepts === void 0 ? void 0 : accepts.length) ? accepts : _to_consumable_array$f(defaults).concat(_to_consumable_array$f(providers.flatMap(function(provider) {
3797
3870
  var _provider_supportedFileTypes;
3798
3871
  return (_provider_supportedFileTypes = provider.supportedFileTypes) !== null && _provider_supportedFileTypes !== void 0 ? _provider_supportedFileTypes : [];
3799
3872
  })));
3800
- return _to_consumable_array$e(new Set(candidates.filter(function(type) {
3873
+ return _to_consumable_array$f(new Set(candidates.filter(function(type) {
3801
3874
  return /^\.?[a-z0-9]+$|^(application|text|image|audio|video)\/[a-z0-9.+-]+(?:;.*)?$/i.test(type.trim());
3802
3875
  }).map(function(type) {
3803
3876
  return knowledgeDocumentFileType({
@@ -3808,15 +3881,15 @@ function knowledgebaseParserSelection(config, documentType) {
3808
3881
  })));
3809
3882
  }
3810
3883
 
3811
- function _array_like_to_array$m(arr, len) {
3884
+ function _array_like_to_array$n(arr, len) {
3812
3885
  if (len == null || len > arr.length) len = arr.length;
3813
3886
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3814
3887
  return arr2;
3815
3888
  }
3816
- function _array_without_holes$d(arr) {
3817
- if (Array.isArray(arr)) return _array_like_to_array$m(arr);
3889
+ function _array_without_holes$e(arr) {
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,
@@ -3829,13 +3902,13 @@ function _define_property$h(obj, key, value) {
3829
3902
  }
3830
3903
  return obj;
3831
3904
  }
3832
- function _iterable_to_array$f(iter) {
3905
+ function _iterable_to_array$g(iter) {
3833
3906
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3834
3907
  }
3835
- function _non_iterable_spread$d() {
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,30 +3918,30 @@ 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;
3852
3925
  }
3853
- function _to_consumable_array$d(arr) {
3854
- return _array_without_holes$d(arr) || _iterable_to_array$f(arr) || _unsupported_iterable_to_array$m(arr) || _non_iterable_spread$d();
3926
+ function _to_consumable_array$e(arr) {
3927
+ return _array_without_holes$e(arr) || _iterable_to_array$g(arr) || _unsupported_iterable_to_array$n(arr) || _non_iterable_spread$e();
3855
3928
  }
3856
- function _unsupported_iterable_to_array$m(o, minLen) {
3929
+ function _unsupported_iterable_to_array$n(o, minLen) {
3857
3930
  if (!o) return;
3858
- if (typeof o === "string") return _array_like_to_array$m(o, minLen);
3931
+ if (typeof o === "string") return _array_like_to_array$n(o, minLen);
3859
3932
  var n = Object.prototype.toString.call(o).slice(8, -1);
3860
3933
  if (n === "Object" && o.constructor) n = o.constructor.name;
3861
3934
  if (n === "Map" || n === "Set") return Array.from(n);
3862
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$m(o, minLen);
3935
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_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,19 +3955,19 @@ function _unsupported_iterable_to_array$m(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
3889
3962
  } : {}, config.textSplitter)
3890
3963
  } : {}, config.separators ? {
3891
- separators: _to_consumable_array$d(config.separators)
3964
+ separators: _to_consumable_array$e(config.separators)
3892
3965
  } : {}, config.imageUnderstandingEnabled !== undefined ? {
3893
3966
  imageUnderstandingEnabled: config.imageUnderstandingEnabled
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;
@@ -4526,7 +4599,32 @@ function genXpertDBSqlKey() {
4526
4599
  return letterStartSUID("DBSql_");
4527
4600
  }
4528
4601
 
4529
- /** Stable placement scopes declared by plugin application contributions. */ var PLUGIN_APPLICATION_SCOPE = {
4602
+ /** Stable placement scopes declared by plugin application contributions. */ function _array_like_to_array$m(arr, len) {
4603
+ if (len == null || len > arr.length) len = arr.length;
4604
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4605
+ return arr2;
4606
+ }
4607
+ function _array_without_holes$d(arr) {
4608
+ if (Array.isArray(arr)) return _array_like_to_array$m(arr);
4609
+ }
4610
+ function _iterable_to_array$f(iter) {
4611
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
4612
+ }
4613
+ function _non_iterable_spread$d() {
4614
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4615
+ }
4616
+ function _to_consumable_array$d(arr) {
4617
+ return _array_without_holes$d(arr) || _iterable_to_array$f(arr) || _unsupported_iterable_to_array$m(arr) || _non_iterable_spread$d();
4618
+ }
4619
+ function _unsupported_iterable_to_array$m(o, minLen) {
4620
+ if (!o) return;
4621
+ if (typeof o === "string") return _array_like_to_array$m(o, minLen);
4622
+ var n = Object.prototype.toString.call(o).slice(8, -1);
4623
+ if (n === "Object" && o.constructor) n = o.constructor.name;
4624
+ if (n === "Map" || n === "Set") return Array.from(n);
4625
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$m(o, minLen);
4626
+ }
4627
+ var PLUGIN_APPLICATION_SCOPE = {
4530
4628
  TENANT: "tenant",
4531
4629
  ORGANIZATION: "organization",
4532
4630
  PERSONAL: "personal"
@@ -4542,6 +4640,16 @@ function genXpertDBSqlKey() {
4542
4640
  FAILED: "failed",
4543
4641
  DEGRADED: "degraded"
4544
4642
  };
4643
+ /** Validate portable metadata without inferring a scope from names or presentation text. */ function getPluginApplicationScopes(value) {
4644
+ var values = Array.isArray(value) ? value : [
4645
+ value
4646
+ ];
4647
+ if (!values.length || !values.every(isPluginApplicationScope)) return [];
4648
+ return _to_consumable_array$d(new Set(values));
4649
+ }
4650
+ function isPluginApplicationScope(value) {
4651
+ return value === "organization" || value === "personal" || value === "tenant";
4652
+ }
4545
4653
 
4546
4654
  var PLUGIN_LEVEL = {
4547
4655
  SYSTEM: "system",
@@ -4815,7 +4923,7 @@ function _array_like_to_array$l(arr, len) {
4815
4923
  function _array_without_holes$c(arr) {
4816
4924
  if (Array.isArray(arr)) return _array_like_to_array$l(arr);
4817
4925
  }
4818
- function _define_property$f(obj, key, value) {
4926
+ function _define_property$g(obj, key, value) {
4819
4927
  if (key in obj) {
4820
4928
  Object.defineProperty(obj, key, {
4821
4929
  value: value,
@@ -4834,7 +4942,7 @@ function _iterable_to_array$e(iter) {
4834
4942
  function _non_iterable_spread$c() {
4835
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.");
4836
4944
  }
4837
- function _object_spread$f(target) {
4945
+ function _object_spread$g(target) {
4838
4946
  for(var i = 1; i < arguments.length; i++){
4839
4947
  var source = arguments[i] != null ? arguments[i] : {};
4840
4948
  var ownKeys = Object.keys(source);
@@ -4844,12 +4952,12 @@ function _object_spread$f(target) {
4844
4952
  }));
4845
4953
  }
4846
4954
  ownKeys.forEach(function(key) {
4847
- _define_property$f(target, key, source[key]);
4955
+ _define_property$g(target, key, source[key]);
4848
4956
  });
4849
4957
  }
4850
4958
  return target;
4851
4959
  }
4852
- function ownKeys$c(object, enumerableOnly) {
4960
+ function ownKeys$d(object, enumerableOnly) {
4853
4961
  var keys = Object.keys(object);
4854
4962
  if (Object.getOwnPropertySymbols) {
4855
4963
  var symbols = Object.getOwnPropertySymbols(object);
@@ -4857,12 +4965,12 @@ function ownKeys$c(object, enumerableOnly) {
4857
4965
  }
4858
4966
  return keys;
4859
4967
  }
4860
- function _object_spread_props$c(target, source) {
4968
+ function _object_spread_props$d(target, source) {
4861
4969
  source = source != null ? source : {};
4862
4970
  if (Object.getOwnPropertyDescriptors) {
4863
4971
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
4864
4972
  } else {
4865
- ownKeys$c(Object(source)).forEach(function(key) {
4973
+ ownKeys$d(Object(source)).forEach(function(key) {
4866
4974
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
4867
4975
  });
4868
4976
  }
@@ -4943,7 +5051,7 @@ function resolveRuntimeXpert(xpert, isDraft) {
4943
5051
  var graph = resolveDraftRuntimeGraph(xpert, draft);
4944
5052
  var agent = resolveDraftPrimaryAgent(xpert, draft, graph);
4945
5053
  var _draft_team5, _draft_team_workspaceId, _draft_team_agentConfig, _draft_team_commandProfile, _draft_team_features, _draft_team_options;
4946
- 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 : {}), {
4947
5055
  id: xpert.id,
4948
5056
  tenantId: xpert.tenantId,
4949
5057
  organizationId: xpert.organizationId,
@@ -5227,9 +5335,9 @@ function replaceAgentInDraft(draft, sourceKey, agent, options) {
5227
5335
  if (node.type === "agent" && node.key === sourceKey) {
5228
5336
  replacedNode = true;
5229
5337
  var _node_entity;
5230
- return _object_spread_props$c(_object_spread$f({}, node), {
5338
+ return _object_spread_props$d(_object_spread$g({}, node), {
5231
5339
  key: targetKey,
5232
- 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), {
5233
5341
  key: targetKey
5234
5342
  })
5235
5343
  });
@@ -5245,17 +5353,17 @@ function replaceAgentInDraft(draft, sourceKey, agent, options) {
5245
5353
  if (from === connection.from && to === connection.to) {
5246
5354
  return connection;
5247
5355
  }
5248
- return _object_spread_props$c(_object_spread$f({}, connection), {
5356
+ return _object_spread_props$d(_object_spread$g({}, connection), {
5249
5357
  from: from,
5250
5358
  to: to,
5251
5359
  key: "".concat(from, "/").concat(to)
5252
5360
  });
5253
5361
  });
5254
- return _object_spread_props$c(_object_spread$f({}, draft), {
5255
- team: draft.team ? _object_spread_props$c(_object_spread$f({}, draft.team), {
5256
- 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), {
5257
5365
  key: targetKey
5258
- }) : _object_spread_props$c(_object_spread$f({}, agent), {
5366
+ }) : _object_spread_props$d(_object_spread$g({}, agent), {
5259
5367
  key: targetKey
5260
5368
  })
5261
5369
  }) : draft.team,
@@ -5398,6 +5506,10 @@ var GENERAL_PROJECT_TYPE = {
5398
5506
  applicationKey: "platform",
5399
5507
  projectTypeKey: "general"
5400
5508
  };
5509
+ /** File-backed collaborative writing workspace using the ordinary Project lifecycle. */ var SPACE_PROJECT_TYPE = {
5510
+ applicationKey: "platform",
5511
+ projectTypeKey: "space"
5512
+ };
5401
5513
 
5402
5514
  /**
5403
5515
  * Build a hierarchical tree structure from a flat list of DocumentInterface objects,
@@ -5406,7 +5518,7 @@ var GENERAL_PROJECT_TYPE = {
5406
5518
  * @template Metadata - Type of metadata, defaults to IDocChunkMetadata
5407
5519
  * @param documents - A flat array of DocumentInterface objects
5408
5520
  * @returns the hierarchical tree (root-level DocumentInterface[])
5409
- */ function _define_property$e(obj, key, value) {
5521
+ */ function _define_property$f(obj, key, value) {
5410
5522
  if (key in obj) {
5411
5523
  Object.defineProperty(obj, key, {
5412
5524
  value: value,
@@ -5419,7 +5531,7 @@ var GENERAL_PROJECT_TYPE = {
5419
5531
  }
5420
5532
  return obj;
5421
5533
  }
5422
- function _object_spread$e(target) {
5534
+ function _object_spread$f(target) {
5423
5535
  for(var i = 1; i < arguments.length; i++){
5424
5536
  var source = arguments[i] != null ? arguments[i] : {};
5425
5537
  var ownKeys = Object.keys(source);
@@ -5429,12 +5541,12 @@ function _object_spread$e(target) {
5429
5541
  }));
5430
5542
  }
5431
5543
  ownKeys.forEach(function(key) {
5432
- _define_property$e(target, key, source[key]);
5544
+ _define_property$f(target, key, source[key]);
5433
5545
  });
5434
5546
  }
5435
5547
  return target;
5436
5548
  }
5437
- function ownKeys$b(object, enumerableOnly) {
5549
+ function ownKeys$c(object, enumerableOnly) {
5438
5550
  var keys = Object.keys(object);
5439
5551
  if (Object.getOwnPropertySymbols) {
5440
5552
  var symbols = Object.getOwnPropertySymbols(object);
@@ -5442,12 +5554,12 @@ function ownKeys$b(object, enumerableOnly) {
5442
5554
  }
5443
5555
  return keys;
5444
5556
  }
5445
- function _object_spread_props$b(target, source) {
5557
+ function _object_spread_props$c(target, source) {
5446
5558
  source = source != null ? source : {};
5447
5559
  if (Object.getOwnPropertyDescriptors) {
5448
5560
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
5449
5561
  } else {
5450
- ownKeys$b(Object(source)).forEach(function(key) {
5562
+ ownKeys$c(Object(source)).forEach(function(key) {
5451
5563
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
5452
5564
  });
5453
5565
  }
@@ -5462,8 +5574,8 @@ function buildChunkTree(documents) {
5462
5574
  documents.forEach(function(doc, index) {
5463
5575
  var chunkId = getChunkNodeId(doc);
5464
5576
  if (chunkId) {
5465
- map.set(chunkId, _object_spread_props$b(_object_spread$e({}, doc), {
5466
- 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), {
5467
5579
  chunkId: chunkId,
5468
5580
  children: []
5469
5581
  })
@@ -6013,7 +6125,7 @@ function isLocalPath(value) {
6013
6125
  })).size === value.length;
6014
6126
  }
6015
6127
 
6016
- function _define_property$d(obj, key, value) {
6128
+ function _define_property$e(obj, key, value) {
6017
6129
  if (key in obj) {
6018
6130
  Object.defineProperty(obj, key, {
6019
6131
  value: value,
@@ -6026,7 +6138,7 @@ function _define_property$d(obj, key, value) {
6026
6138
  }
6027
6139
  return obj;
6028
6140
  }
6029
- function _object_spread$d(target) {
6141
+ function _object_spread$e(target) {
6030
6142
  for(var i = 1; i < arguments.length; i++){
6031
6143
  var source = arguments[i] != null ? arguments[i] : {};
6032
6144
  var ownKeys = Object.keys(source);
@@ -6036,12 +6148,12 @@ function _object_spread$d(target) {
6036
6148
  }));
6037
6149
  }
6038
6150
  ownKeys.forEach(function(key) {
6039
- _define_property$d(target, key, source[key]);
6151
+ _define_property$e(target, key, source[key]);
6040
6152
  });
6041
6153
  }
6042
6154
  return target;
6043
6155
  }
6044
- function ownKeys$a(object, enumerableOnly) {
6156
+ function ownKeys$b(object, enumerableOnly) {
6045
6157
  var keys = Object.keys(object);
6046
6158
  if (Object.getOwnPropertySymbols) {
6047
6159
  var symbols = Object.getOwnPropertySymbols(object);
@@ -6049,12 +6161,12 @@ function ownKeys$a(object, enumerableOnly) {
6049
6161
  }
6050
6162
  return keys;
6051
6163
  }
6052
- function _object_spread_props$a(target, source) {
6164
+ function _object_spread_props$b(target, source) {
6053
6165
  source = source != null ? source : {};
6054
6166
  if (Object.getOwnPropertyDescriptors) {
6055
6167
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
6056
6168
  } else {
6057
- ownKeys$a(Object(source)).forEach(function(key) {
6169
+ ownKeys$b(Object(source)).forEach(function(key) {
6058
6170
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
6059
6171
  });
6060
6172
  }
@@ -6094,8 +6206,8 @@ function normalizeMiddlewareNode(node) {
6094
6206
  if (provider === entity.provider) {
6095
6207
  return node;
6096
6208
  }
6097
- return _object_spread_props$a(_object_spread$d({}, node), {
6098
- 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), {
6099
6211
  provider: provider
6100
6212
  })
6101
6213
  });
@@ -6156,7 +6268,7 @@ function _array_with_holes$c(arr) {
6156
6268
  function _array_without_holes$b(arr) {
6157
6269
  if (Array.isArray(arr)) return _array_like_to_array$i(arr);
6158
6270
  }
6159
- function _define_property$c(obj, key, value) {
6271
+ function _define_property$d(obj, key, value) {
6160
6272
  if (key in obj) {
6161
6273
  Object.defineProperty(obj, key, {
6162
6274
  value: value,
@@ -6202,7 +6314,7 @@ function _non_iterable_rest$c() {
6202
6314
  function _non_iterable_spread$b() {
6203
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.");
6204
6316
  }
6205
- function _object_spread$c(target) {
6317
+ function _object_spread$d(target) {
6206
6318
  for(var i = 1; i < arguments.length; i++){
6207
6319
  var source = arguments[i] != null ? arguments[i] : {};
6208
6320
  var ownKeys = Object.keys(source);
@@ -6212,12 +6324,12 @@ function _object_spread$c(target) {
6212
6324
  }));
6213
6325
  }
6214
6326
  ownKeys.forEach(function(key) {
6215
- _define_property$c(target, key, source[key]);
6327
+ _define_property$d(target, key, source[key]);
6216
6328
  });
6217
6329
  }
6218
6330
  return target;
6219
6331
  }
6220
- function ownKeys$9(object, enumerableOnly) {
6332
+ function ownKeys$a(object, enumerableOnly) {
6221
6333
  var keys = Object.keys(object);
6222
6334
  if (Object.getOwnPropertySymbols) {
6223
6335
  var symbols = Object.getOwnPropertySymbols(object);
@@ -6225,12 +6337,12 @@ function ownKeys$9(object, enumerableOnly) {
6225
6337
  }
6226
6338
  return keys;
6227
6339
  }
6228
- function _object_spread_props$9(target, source) {
6340
+ function _object_spread_props$a(target, source) {
6229
6341
  source = source != null ? source : {};
6230
6342
  if (Object.getOwnPropertyDescriptors) {
6231
6343
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
6232
6344
  } else {
6233
- ownKeys$9(Object(source)).forEach(function(key) {
6345
+ ownKeys$a(Object(source)).forEach(function(key) {
6234
6346
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
6235
6347
  });
6236
6348
  }
@@ -6346,7 +6458,7 @@ function normalizeIncomingContent(content, context) {
6346
6458
  if (typeof content !== "string") {
6347
6459
  return content;
6348
6460
  }
6349
- return _object_spread$c({
6461
+ return _object_spread$d({
6350
6462
  type: "text",
6351
6463
  text: content
6352
6464
  }, context.streamId ? {
@@ -6411,7 +6523,7 @@ function filterText(content) {
6411
6523
  return "";
6412
6524
  }
6413
6525
  function mergeTextChunkForDisplay(previous, incoming) {
6414
- 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), {
6415
6527
  text: "".concat(previous.text).concat(incoming.text)
6416
6528
  }), !previous.id && incoming.id ? {
6417
6529
  id: incoming.id
@@ -6423,7 +6535,7 @@ function mergeTextChunkForDisplay(previous, incoming) {
6423
6535
  }
6424
6536
  function stripAutoDisplaySeparator(incoming, previousOriginal) {
6425
6537
  if ((previousOriginal === null || previousOriginal === void 0 ? void 0 : previousOriginal.type) === "component" && incoming.text.startsWith("\n\n")) {
6426
- return _object_spread_props$9(_object_spread$c({}, incoming), {
6538
+ return _object_spread_props$a(_object_spread$d({}, incoming), {
6427
6539
  text: incoming.text.slice(1)
6428
6540
  });
6429
6541
  }
@@ -6440,14 +6552,14 @@ function mergeComponentData(previous, incoming) {
6440
6552
  return acc;
6441
6553
  }, {});
6442
6554
  var _previous_data1;
6443
- return _object_spread_props$9(_object_spread$c({}, previous, incoming), {
6444
- 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), {
6445
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)
6446
6558
  })
6447
6559
  });
6448
6560
  }
6449
6561
  function inferMessageAppendContext(content, fallbackSource) {
6450
- return _object_spread$c({
6562
+ return _object_spread$d({
6451
6563
  source: fallbackSource !== null && fallbackSource !== void 0 ? fallbackSource : inferContentSource(content)
6452
6564
  }, typeof content !== "string" && (content === null || content === void 0 ? void 0 : content.id) ? {
6453
6565
  streamId: String(content.id)
@@ -6455,10 +6567,10 @@ function inferMessageAppendContext(content, fallbackSource) {
6455
6567
  }
6456
6568
  function resolveMessageAppendContext(options) {
6457
6569
  var inferredContext = inferMessageAppendContext(options.incoming, options.fallbackSource);
6458
- 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), {
6459
6571
  streamId: options.fallbackStreamId
6460
6572
  }) : inferredContext;
6461
- 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), {
6462
6574
  joinHint: "none"
6463
6575
  }) : appendContext;
6464
6576
  return {
@@ -6479,7 +6591,7 @@ function resolveMessageAppendContext(options) {
6479
6591
  var previous = initial;
6480
6592
  return {
6481
6593
  resolve: function resolve(options) {
6482
- var resolved = resolveMessageAppendContext(_object_spread_props$9(_object_spread$c({}, options), {
6594
+ var resolved = resolveMessageAppendContext(_object_spread_props$a(_object_spread$d({}, options), {
6483
6595
  previous: previous
6484
6596
  }));
6485
6597
  if (!chatkitTypes.isFileActivityContent(options.incoming) && !chatkitTypes.isResourceCardContent(options.incoming)) previous = resolved.appendContext;
@@ -6517,10 +6629,10 @@ function resolveMessageAppendContext(options) {
6517
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, [
6518
6630
  "previous"
6519
6631
  ]);
6520
- var appendContext = _object_spread$c({}, inferMessageAppendContext(incoming), contextWithoutPrevious);
6632
+ var appendContext = _object_spread$d({}, inferMessageAppendContext(incoming), contextWithoutPrevious);
6521
6633
  var _appendContext_joinHint;
6522
6634
  var joinHint = (_appendContext_joinHint = appendContext.joinHint) !== null && _appendContext_joinHint !== void 0 ? _appendContext_joinHint : shouldJoinWithoutSeparator(previous, appendContext) ? "none" : undefined;
6523
- var messageContext = joinHint ? _object_spread_props$9(_object_spread$c({}, appendContext), {
6635
+ var messageContext = joinHint ? _object_spread_props$a(_object_spread$d({}, appendContext), {
6524
6636
  joinHint: joinHint
6525
6637
  }) : appendContext;
6526
6638
  var content = normalizeIncomingContent(incoming, appendContext);
@@ -6529,7 +6641,7 @@ function resolveMessageAppendContext(options) {
6529
6641
  var reasoning = (_aiMessage_reasoning = aiMessage.reasoning) !== null && _aiMessage_reasoning !== void 0 ? _aiMessage_reasoning : [];
6530
6642
  var lastReasoning = reasoning[reasoning.length - 1];
6531
6643
  if ((lastReasoning === null || lastReasoning === void 0 ? void 0 : lastReasoning.id) === content.id) {
6532
- var mergedReasoning = _object_spread_props$9(_object_spread$c({}, lastReasoning), {
6644
+ var mergedReasoning = _object_spread_props$a(_object_spread$d({}, lastReasoning), {
6533
6645
  text: "".concat(lastReasoning.text).concat(content.text)
6534
6646
  });
6535
6647
  aiMessage.reasoning = _to_consumable_array$b(reasoning.slice(0, reasoning.length - 1)).concat([
@@ -6550,7 +6662,7 @@ function resolveMessageAppendContext(options) {
6550
6662
  return isTextContent(item) && item.id === content.id;
6551
6663
  });
6552
6664
  if (index > -1) {
6553
- 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]), {
6554
6666
  text: "".concat(chunks[index].text).concat(content.text)
6555
6667
  }), !chunks[index].id && content.id ? {
6556
6668
  id: content.id
@@ -6573,7 +6685,7 @@ function resolveMessageAppendContext(options) {
6573
6685
  var existingIndex = findLastTextChunkIndexById(chunks, content.id);
6574
6686
  if (existingIndex > -1) {
6575
6687
  var existing = chunks[existingIndex];
6576
- var merged = _object_spread_props$9(_object_spread$c({}, existing), {
6688
+ var merged = _object_spread_props$a(_object_spread$d({}, existing), {
6577
6689
  text: "".concat(existing.text).concat(content.text)
6578
6690
  });
6579
6691
  var nextChunks = _to_consumable_array$b(chunks);
@@ -6582,7 +6694,7 @@ function resolveMessageAppendContext(options) {
6582
6694
  return;
6583
6695
  }
6584
6696
  } else if (isTextContent(lastContent) && messageContext.joinHint === "none") {
6585
- var mergedLastContent = _object_spread_props$9(_object_spread$c({}, lastContent), {
6697
+ var mergedLastContent = _object_spread_props$a(_object_spread$d({}, lastContent), {
6586
6698
  text: "".concat(lastContent.text).concat(content.text)
6587
6699
  });
6588
6700
  aiMessage.content = _to_consumable_array$b(chunks.slice(0, chunks.length - 1)).concat([
@@ -6591,7 +6703,7 @@ function resolveMessageAppendContext(options) {
6591
6703
  return;
6592
6704
  }
6593
6705
  var separator = getContentChunkSeparator(lastContent, content.text, messageContext.joinHint);
6594
- var appended = _object_spread_props$9(_object_spread$c({}, content), {
6706
+ var appended = _object_spread_props$a(_object_spread$d({}, content), {
6595
6707
  text: separator + content.text
6596
6708
  });
6597
6709
  aiMessage.content = _to_consumable_array$b(chunks).concat([
@@ -6615,7 +6727,7 @@ function resolveMessageAppendContext(options) {
6615
6727
  aiMessage.content = nextChunks1;
6616
6728
  }
6617
6729
  function appendMessagePlainText(accumulator, incoming, context) {
6618
- 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 : {});
6619
6731
  var nextText = filterText(incoming);
6620
6732
  if (!nextText) {
6621
6733
  return accumulator !== null && accumulator !== void 0 ? accumulator : "";
@@ -6660,7 +6772,7 @@ function appendMessagePlainText(accumulator, incoming, context) {
6660
6772
  return;
6661
6773
  }
6662
6774
  textIndexById.set(item.id, merged.length);
6663
- merged.push(_object_spread$c({}, item));
6775
+ merged.push(_object_spread$d({}, item));
6664
6776
  return;
6665
6777
  }
6666
6778
  var lastItem = merged[merged.length - 1];
@@ -6668,7 +6780,7 @@ function appendMessagePlainText(accumulator, incoming, context) {
6668
6780
  merged[merged.length - 1] = mergeTextChunkForDisplay(lastItem, item);
6669
6781
  return;
6670
6782
  }
6671
- merged.push(_object_spread$c({}, item));
6783
+ merged.push(_object_spread$d({}, item));
6672
6784
  });
6673
6785
  return merged.length ? merged : null;
6674
6786
  }
@@ -6683,7 +6795,7 @@ function stringifyMessageContent(content) {
6683
6795
  if (chatkitTypes.isFileActivityContent(item) || chatkitTypes.isResourceCardContent(item)) return;
6684
6796
  var itemContext = inferMessageAppendContext(item);
6685
6797
  var joinHint = shouldJoinWithoutSeparator(previousContext, itemContext) ? "none" : undefined;
6686
- result = appendMessagePlainText(result, stringifySingle(item), _object_spread$c({}, itemContext, joinHint ? {
6798
+ result = appendMessagePlainText(result, stringifySingle(item), _object_spread$d({}, itemContext, joinHint ? {
6687
6799
  joinHint: joinHint
6688
6800
  } : {}));
6689
6801
  previousContext = itemContext;
@@ -6706,7 +6818,7 @@ function filterMessageText(content) {
6706
6818
  }
6707
6819
  var itemContext = inferMessageAppendContext(item);
6708
6820
  var joinHint = shouldJoinWithoutSeparator(previousContext, itemContext) ? "none" : undefined;
6709
- result = appendMessagePlainText(result, nextText, _object_spread$c({}, itemContext, joinHint ? {
6821
+ result = appendMessagePlainText(result, nextText, _object_spread$d({}, itemContext, joinHint ? {
6710
6822
  joinHint: joinHint
6711
6823
  } : {}));
6712
6824
  previousContext = itemContext;
@@ -7063,6 +7175,34 @@ var MODEL_EXECUTION_POLICY_SETTING = "modelExecutionPolicy";
7063
7175
  xpertId: v3.z.string().uuid()
7064
7176
  }).strict();
7065
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
+
7066
7206
  /**
7067
7207
  * Running means accepted; actual work start requires an observation.
7068
7208
  * Only succeeded, failed and cancelled are terminal. Unknown must be reconciled without replay.
@@ -7374,7 +7514,7 @@ var projectPipelineEdgeSchema = v3.z.object({
7374
7514
  outcome: projectPipelineKeySchema.optional()
7375
7515
  }).strict();
7376
7516
 
7377
- function _define_property$b(obj, key, value) {
7517
+ function _define_property$c(obj, key, value) {
7378
7518
  if (key in obj) {
7379
7519
  Object.defineProperty(obj, key, {
7380
7520
  value: value,
@@ -7387,7 +7527,7 @@ function _define_property$b(obj, key, value) {
7387
7527
  }
7388
7528
  return obj;
7389
7529
  }
7390
- function _object_spread$b(target) {
7530
+ function _object_spread$c(target) {
7391
7531
  for(var i = 1; i < arguments.length; i++){
7392
7532
  var source = arguments[i] != null ? arguments[i] : {};
7393
7533
  var ownKeys = Object.keys(source);
@@ -7397,12 +7537,12 @@ function _object_spread$b(target) {
7397
7537
  }));
7398
7538
  }
7399
7539
  ownKeys.forEach(function(key) {
7400
- _define_property$b(target, key, source[key]);
7540
+ _define_property$c(target, key, source[key]);
7401
7541
  });
7402
7542
  }
7403
7543
  return target;
7404
7544
  }
7405
- function ownKeys$8(object, enumerableOnly) {
7545
+ function ownKeys$9(object, enumerableOnly) {
7406
7546
  var keys = Object.keys(object);
7407
7547
  if (Object.getOwnPropertySymbols) {
7408
7548
  var symbols = Object.getOwnPropertySymbols(object);
@@ -7410,18 +7550,18 @@ function ownKeys$8(object, enumerableOnly) {
7410
7550
  }
7411
7551
  return keys;
7412
7552
  }
7413
- function _object_spread_props$8(target, source) {
7553
+ function _object_spread_props$9(target, source) {
7414
7554
  source = source != null ? source : {};
7415
7555
  if (Object.getOwnPropertyDescriptors) {
7416
7556
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
7417
7557
  } else {
7418
- ownKeys$8(Object(source)).forEach(function(key) {
7558
+ ownKeys$9(Object(source)).forEach(function(key) {
7419
7559
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
7420
7560
  });
7421
7561
  }
7422
7562
  return target;
7423
7563
  }
7424
- var base = {
7564
+ var base$1 = {
7425
7565
  key: projectPipelineKeySchema,
7426
7566
  label: v3.z.string().min(1).max(240).optional(),
7427
7567
  stageKey: projectPipelineKeySchema,
@@ -7430,7 +7570,7 @@ var base = {
7430
7570
  };
7431
7571
  var outcomes = v3.z.array(projectPipelineKeySchema).min(2).max(32);
7432
7572
  /** Only explicit primitives can control flow; configuration cannot embed executable expressions. */ var projectPipelineNodeSchema = v3.z.discriminatedUnion("kind", [
7433
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7573
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7434
7574
  kind: v3.z.literal("work"),
7435
7575
  laneKey: projectPipelineKeySchema,
7436
7576
  operationRef: projectPipelineRefSchema,
@@ -7439,23 +7579,23 @@ var outcomes = v3.z.array(projectPipelineKeySchema).min(2).max(32);
7439
7579
  resourceResolverRef: projectPipelineRefSchema.optional(),
7440
7580
  outputSchemaRef: projectPipelineRefSchema.optional()
7441
7581
  })).strict(),
7442
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7582
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7443
7583
  kind: v3.z.literal("fork")
7444
7584
  })).strict(),
7445
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7585
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7446
7586
  kind: v3.z.literal("join"),
7447
7587
  join: v3.z.object({
7448
7588
  mode: v3.z.literal("all_selected"),
7449
7589
  accept: v3.z.literal("completed")
7450
7590
  }).strict()
7451
7591
  })).strict(),
7452
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7592
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7453
7593
  kind: v3.z.literal("router"),
7454
7594
  policyRef: projectPipelineRefSchema,
7455
7595
  outcomes: outcomes,
7456
7596
  unmatched: v3.z.literal("block")
7457
7597
  })).strict(),
7458
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7598
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7459
7599
  kind: v3.z.literal("human_gate"),
7460
7600
  laneKey: projectPipelineKeySchema,
7461
7601
  policyRef: projectPipelineRefSchema,
@@ -7463,12 +7603,12 @@ var outcomes = v3.z.array(projectPipelineKeySchema).min(2).max(32);
7463
7603
  outcomes: outcomes,
7464
7604
  outcomeLabels: v3.z.record(projectPipelineKeySchema, v3.z.string().min(1).max(120)).optional()
7465
7605
  })).strict(),
7466
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7606
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7467
7607
  kind: v3.z.literal("external_wait"),
7468
7608
  laneKey: projectPipelineKeySchema,
7469
7609
  subscriptionRef: projectPipelineRefSchema
7470
7610
  })).strict(),
7471
- v3.z.object(_object_spread_props$8(_object_spread$b({}, base), {
7611
+ v3.z.object(_object_spread_props$9(_object_spread$c({}, base$1), {
7472
7612
  kind: v3.z.literal("terminal"),
7473
7613
  outcome: projectPipelineKeySchema,
7474
7614
  disposition: v3.z.enum([
@@ -8117,7 +8257,7 @@ function isProjectPipelineApplicable(definition, project) {
8117
8257
 
8118
8258
  // Invariants: definitions describe versioned topology and explicit execution authority.
8119
8259
  // Business meaning stays behind provider references; labels and icons never drive execution.
8120
- function _define_property$a(obj, key, value) {
8260
+ function _define_property$b(obj, key, value) {
8121
8261
  if (key in obj) {
8122
8262
  Object.defineProperty(obj, key, {
8123
8263
  value: value,
@@ -8130,7 +8270,7 @@ function _define_property$a(obj, key, value) {
8130
8270
  }
8131
8271
  return obj;
8132
8272
  }
8133
- function _object_spread$a(target) {
8273
+ function _object_spread$b(target) {
8134
8274
  for(var i = 1; i < arguments.length; i++){
8135
8275
  var source = arguments[i] != null ? arguments[i] : {};
8136
8276
  var ownKeys = Object.keys(source);
@@ -8140,12 +8280,12 @@ function _object_spread$a(target) {
8140
8280
  }));
8141
8281
  }
8142
8282
  ownKeys.forEach(function(key) {
8143
- _define_property$a(target, key, source[key]);
8283
+ _define_property$b(target, key, source[key]);
8144
8284
  });
8145
8285
  }
8146
8286
  return target;
8147
8287
  }
8148
- function ownKeys$7(object, enumerableOnly) {
8288
+ function ownKeys$8(object, enumerableOnly) {
8149
8289
  var keys = Object.keys(object);
8150
8290
  if (Object.getOwnPropertySymbols) {
8151
8291
  var symbols = Object.getOwnPropertySymbols(object);
@@ -8153,12 +8293,12 @@ function ownKeys$7(object, enumerableOnly) {
8153
8293
  }
8154
8294
  return keys;
8155
8295
  }
8156
- function _object_spread_props$7(target, source) {
8296
+ function _object_spread_props$8(target, source) {
8157
8297
  source = source != null ? source : {};
8158
8298
  if (Object.getOwnPropertyDescriptors) {
8159
8299
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8160
8300
  } else {
8161
- ownKeys$7(Object(source)).forEach(function(key) {
8301
+ ownKeys$8(Object(source)).forEach(function(key) {
8162
8302
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8163
8303
  });
8164
8304
  }
@@ -8190,7 +8330,7 @@ var common = {
8190
8330
  };
8191
8331
  // A provider owns topology and advancement. A managed definition owns a bounded DAG per round.
8192
8332
  var projectPipelineDefinitionShapeSchema = v3.z.discriminatedUnion("executionAuthority", [
8193
- v3.z.object(_object_spread_props$7(_object_spread$a({}, common), {
8333
+ v3.z.object(_object_spread_props$8(_object_spread$b({}, common), {
8194
8334
  executionAuthority: v3.z.literal("provider"),
8195
8335
  providerRef: projectPipelineRefSchema,
8196
8336
  topology: v3.z.object({
@@ -8199,7 +8339,7 @@ var projectPipelineDefinitionShapeSchema = v3.z.discriminatedUnion("executionAut
8199
8339
  }).strict(),
8200
8340
  actionRefs: v3.z.array(projectPipelineRefSchema).max(100).optional()
8201
8341
  })).strict(),
8202
- v3.z.object(_object_spread_props$7(_object_spread$a({}, common), {
8342
+ v3.z.object(_object_spread_props$8(_object_spread$b({}, common), {
8203
8343
  executionAuthority: v3.z.literal("platform"),
8204
8344
  topology: v3.z.object({
8205
8345
  source: v3.z.literal("definition")
@@ -8518,7 +8658,7 @@ var projectPipelineBindingSchema = v3.z.object({
8518
8658
  }
8519
8659
  });
8520
8660
 
8521
- function _define_property$9(obj, key, value) {
8661
+ function _define_property$a(obj, key, value) {
8522
8662
  if (key in obj) {
8523
8663
  Object.defineProperty(obj, key, {
8524
8664
  value: value,
@@ -8531,7 +8671,7 @@ function _define_property$9(obj, key, value) {
8531
8671
  }
8532
8672
  return obj;
8533
8673
  }
8534
- function _object_spread$9(target) {
8674
+ function _object_spread$a(target) {
8535
8675
  for(var i = 1; i < arguments.length; i++){
8536
8676
  var source = arguments[i] != null ? arguments[i] : {};
8537
8677
  var ownKeys = Object.keys(source);
@@ -8541,12 +8681,12 @@ function _object_spread$9(target) {
8541
8681
  }));
8542
8682
  }
8543
8683
  ownKeys.forEach(function(key) {
8544
- _define_property$9(target, key, source[key]);
8684
+ _define_property$a(target, key, source[key]);
8545
8685
  });
8546
8686
  }
8547
8687
  return target;
8548
8688
  }
8549
- function ownKeys$6(object, enumerableOnly) {
8689
+ function ownKeys$7(object, enumerableOnly) {
8550
8690
  var keys = Object.keys(object);
8551
8691
  if (Object.getOwnPropertySymbols) {
8552
8692
  var symbols = Object.getOwnPropertySymbols(object);
@@ -8554,12 +8694,12 @@ function ownKeys$6(object, enumerableOnly) {
8554
8694
  }
8555
8695
  return keys;
8556
8696
  }
8557
- function _object_spread_props$6(target, source) {
8697
+ function _object_spread_props$7(target, source) {
8558
8698
  source = source != null ? source : {};
8559
8699
  if (Object.getOwnPropertyDescriptors) {
8560
8700
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8561
8701
  } else {
8562
- ownKeys$6(Object(source)).forEach(function(key) {
8702
+ ownKeys$7(Object(source)).forEach(function(key) {
8563
8703
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8564
8704
  });
8565
8705
  }
@@ -8575,13 +8715,13 @@ var definitionRef = v3.z.object({
8575
8715
  templateRef: projectPipelineRefSchema,
8576
8716
  digest: v3.z.string().regex(/^[a-f0-9]{64}$/)
8577
8717
  }).strict();
8578
- 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), {
8579
8719
  definition: definitionRef,
8580
8720
  revision: v3.z.number().int().positive(),
8581
8721
  configuration: projectPipelineBindingSchema
8582
8722
  })).strict();
8583
8723
  var projectPipelineInstanceSchema = v3.z.discriminatedUnion("executionAuthority", [
8584
- v3.z.object(_object_spread_props$6(_object_spread$9({}, scopedIdentity), {
8724
+ v3.z.object(_object_spread_props$7(_object_spread$a({}, scopedIdentity), {
8585
8725
  executionAuthority: v3.z.literal("provider"),
8586
8726
  providerRef: projectPipelineRefSchema,
8587
8727
  sourceKey: v3.z.string().min(1).max(500),
@@ -8592,7 +8732,7 @@ var projectPipelineInstanceSchema = v3.z.discriminatedUnion("executionAuthority"
8592
8732
  }).strict(),
8593
8733
  revision: v3.z.number().int().nonnegative()
8594
8734
  })).strict(),
8595
- v3.z.object(_object_spread_props$6(_object_spread$9({}, scopedIdentity), {
8735
+ v3.z.object(_object_spread_props$7(_object_spread$a({}, scopedIdentity), {
8596
8736
  executionAuthority: v3.z.literal("platform"),
8597
8737
  bindingId: v3.z.string().uuid(),
8598
8738
  sourceKey: v3.z.string().min(1).max(500),
@@ -8604,7 +8744,7 @@ var projectPipelineInstanceSchema = v3.z.discriminatedUnion("executionAuthority"
8604
8744
  revision: v3.z.number().int().nonnegative()
8605
8745
  })).strict()
8606
8746
  ]);
8607
- 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), {
8608
8748
  instanceId: v3.z.string().uuid(),
8609
8749
  triggerKey: v3.z.string().min(1).max(500),
8610
8750
  definition: definitionRef,
@@ -8676,7 +8816,7 @@ var projectPipelineWorkContextSchema = v3.z.object({
8676
8816
  inputDigest: v3.z.string().regex(/^[a-f0-9]{64}$/),
8677
8817
  generation: v3.z.number().int().positive()
8678
8818
  }).strict();
8679
- 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), {
8680
8820
  runId: v3.z.string().uuid(),
8681
8821
  sequence: v3.z.number().int().positive(),
8682
8822
  generation: v3.z.number().int().positive(),
@@ -8692,7 +8832,7 @@ var projectPipelineRoundSchema = v3.z.object(_object_spread_props$6(_object_spre
8692
8832
  subjectVersionSet: v3.z.array(projectPipelineSubjectVersionSchema).min(1).max(100),
8693
8833
  supersedes: v3.z.string().uuid().nullable()
8694
8834
  })).strict();
8695
- 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), {
8696
8836
  roundId: v3.z.string().uuid(),
8697
8837
  nodeKey: projectPipelineKeySchema,
8698
8838
  /** Stable source identity; never a list index. */ expansionKey: v3.z.string().min(1).max(500),
@@ -8704,7 +8844,7 @@ var projectPipelineNodeInstanceSchema = v3.z.object(_object_spread_props$6(_obje
8704
8844
  revision: v3.z.number().int().nonnegative()
8705
8845
  })).strict();
8706
8846
 
8707
- function _define_property$8(obj, key, value) {
8847
+ function _define_property$9(obj, key, value) {
8708
8848
  if (key in obj) {
8709
8849
  Object.defineProperty(obj, key, {
8710
8850
  value: value,
@@ -8717,7 +8857,7 @@ function _define_property$8(obj, key, value) {
8717
8857
  }
8718
8858
  return obj;
8719
8859
  }
8720
- function _object_spread$8(target) {
8860
+ function _object_spread$9(target) {
8721
8861
  for(var i = 1; i < arguments.length; i++){
8722
8862
  var source = arguments[i] != null ? arguments[i] : {};
8723
8863
  var ownKeys = Object.keys(source);
@@ -8727,12 +8867,12 @@ function _object_spread$8(target) {
8727
8867
  }));
8728
8868
  }
8729
8869
  ownKeys.forEach(function(key) {
8730
- _define_property$8(target, key, source[key]);
8870
+ _define_property$9(target, key, source[key]);
8731
8871
  });
8732
8872
  }
8733
8873
  return target;
8734
8874
  }
8735
- function ownKeys$5(object, enumerableOnly) {
8875
+ function ownKeys$6(object, enumerableOnly) {
8736
8876
  var keys = Object.keys(object);
8737
8877
  if (Object.getOwnPropertySymbols) {
8738
8878
  var symbols = Object.getOwnPropertySymbols(object);
@@ -8740,12 +8880,12 @@ function ownKeys$5(object, enumerableOnly) {
8740
8880
  }
8741
8881
  return keys;
8742
8882
  }
8743
- function _object_spread_props$5(target, source) {
8883
+ function _object_spread_props$6(target, source) {
8744
8884
  source = source != null ? source : {};
8745
8885
  if (Object.getOwnPropertyDescriptors) {
8746
8886
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8747
8887
  } else {
8748
- ownKeys$5(Object(source)).forEach(function(key) {
8888
+ ownKeys$6(Object(source)).forEach(function(key) {
8749
8889
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8750
8890
  });
8751
8891
  }
@@ -8762,17 +8902,17 @@ var projectPipelinePortDescriptorSchema = v3.z.object({
8762
8902
  ])
8763
8903
  }).strict();
8764
8904
  /** Declarations allow configuration checks. They never prove a runtime executor is currently available. */ var projectPipelineExtensionDescriptorSchema = v3.z.discriminatedUnion("kind", [
8765
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8905
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8766
8906
  kind: v3.z.literal("schema")
8767
8907
  })).strict(),
8768
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8908
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8769
8909
  kind: v3.z.literal("resource")
8770
8910
  })).strict(),
8771
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8911
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8772
8912
  kind: v3.z.literal("subject"),
8773
8913
  outputSchemaRef: projectPipelineRefSchema
8774
8914
  })).strict(),
8775
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8915
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8776
8916
  kind: v3.z.literal("operation"),
8777
8917
  effects: v3.z.enum([
8778
8918
  "read_only",
@@ -8791,32 +8931,32 @@ var projectPipelinePortDescriptorSchema = v3.z.object({
8791
8931
  inputs: v3.z.record(projectPipelineKeySchema, projectPipelinePortDescriptorSchema),
8792
8932
  outputs: v3.z.record(projectPipelineKeySchema, projectPipelineRefSchema)
8793
8933
  })).strict(),
8794
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8934
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8795
8935
  kind: v3.z.literal("completion")
8796
8936
  })).strict(),
8797
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8937
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8798
8938
  kind: v3.z.literal("policy"),
8799
8939
  outcomes: v3.z.array(projectPipelineKeySchema).min(1).max(32)
8800
8940
  })).strict(),
8801
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8941
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8802
8942
  kind: v3.z.literal("projection")
8803
8943
  })).strict(),
8804
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8944
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8805
8945
  kind: v3.z.literal("presentation")
8806
8946
  })).strict(),
8807
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8947
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8808
8948
  kind: v3.z.literal("action")
8809
8949
  })).strict(),
8810
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8950
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8811
8951
  kind: v3.z.literal("metric")
8812
8952
  })).strict(),
8813
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8953
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8814
8954
  kind: v3.z.literal("dimension")
8815
8955
  })).strict(),
8816
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8956
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8817
8957
  kind: v3.z.literal("trigger")
8818
8958
  })).strict(),
8819
- v3.z.object(_object_spread_props$5(_object_spread$8({}, reference), {
8959
+ v3.z.object(_object_spread_props$6(_object_spread$9({}, reference), {
8820
8960
  kind: v3.z.literal("subscription"),
8821
8961
  outputs: v3.z.record(projectPipelineKeySchema, projectPipelineRefSchema)
8822
8962
  })).strict()
@@ -9583,6 +9723,162 @@ var tombstone = v3.z.object({
9583
9723
  ]);
9584
9724
  });
9585
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
+
9586
9882
  function _define_property$7(obj, key, value) {
9587
9883
  if (key in obj) {
9588
9884
  Object.defineProperty(obj, key, {
@@ -9683,6 +9979,7 @@ var projectPipelineRuntimeExecutionSchema = v3.z.object({
9683
9979
  status: agentInvocationStatusSchema
9684
9980
  }).strict();
9685
9981
  var receipt = {
9982
+ control: executionControlEvidenceSchema.optional(),
9686
9983
  receiptKey: v3.z.string().min(1).max(500),
9687
9984
  execution: v3.z.discriminatedUnion("kind", [
9688
9985
  projectPipelineAssistantExecutionSchema,
@@ -9707,6 +10004,7 @@ var projectPipelineOperationReceiptSchema = v3.z.discriminatedUnion("status", [
9707
10004
  status: v3.z.literal("cancelled")
9708
10005
  })).strict(),
9709
10006
  v3.z.object({
10007
+ control: receipt.control,
9710
10008
  receiptKey: receipt.receiptKey.optional(),
9711
10009
  execution: receipt.execution,
9712
10010
  status: v3.z.literal("unknown")
@@ -12854,6 +13152,20 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
12854
13152
  OrganizationProjectBudgetTypeEnum["COST"] = "cost";
12855
13153
  })(exports.OrganizationProjectBudgetTypeEnum || (exports.OrganizationProjectBudgetTypeEnum = {}));
12856
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
+ ]);
12857
13169
  /**
12858
13170
  * Selects how an opaque client secret is authorized and how entityId is
12859
13171
  * interpreted. createdById alone does not distinguish
@@ -13765,8 +14077,131 @@ var executionActivityBatchSchema = v3.z.object({
13765
14077
  browseUrl: "https://github.com/xpert-ai/xpert-plugins/tree/main/agent-plugins"
13766
14078
  };
13767
14079
 
14080
+ /**
14081
+ * Resolve an authorized resource to its registered editor, without opening UI.
14082
+ * Send the returned navigation through workbench.navigation.open in the same
14083
+ * Remote View bridge so the Workbench that contains the caller owns the tab.
14084
+ */ var CONTENT_EDITOR_RESOLVE_COMMAND = "workbench.content.resolve";
14085
+ /** Authorize a document and return its stable URL without changing navigation or clipboard. */ var CONTENT_EDITOR_LINK_COMMAND = "workbench.content.link";
14086
+ /** Explicit document-reference discriminator in share URLs; consumers must reauthorize the ID. */ var CONTENT_DOCUMENT_LINK_RESOURCE_PARAM = "contentResource";
14087
+ var ASSISTANT_CONTENT_REVIEW_COMMAND = "assistant.content.review";
14088
+ var CONTENT_EDITOR_STATUS_COMMAND = "workbench.content.status";
14089
+
13768
14090
  /** Host-owned opening avoids inheriting a remote component's iframe sandbox. */ var ARTIFACT_PRESENTATION_OPEN_COMMAND = "artifact.presentation.open";
13769
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
+
13770
14205
  Object.defineProperty(exports, "createResourceCardContent", {
13771
14206
  enumerable: true,
13772
14207
  get: function () { return chatkitTypes.createResourceCardContent; }
@@ -13800,6 +14235,7 @@ exports.ARTIFACT_PRESENTATION_OPEN_COMMAND = ARTIFACT_PRESENTATION_OPEN_COMMAND;
13800
14235
  exports.ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = ASSISTANT_CHAT_SEND_MESSAGE_COMMAND;
13801
14236
  exports.ASSISTANT_CITATION_OPEN_EVENT = ASSISTANT_CITATION_OPEN_EVENT;
13802
14237
  exports.ASSISTANT_COMPOSER_APPEND_REFERENCES_COMMAND = ASSISTANT_COMPOSER_APPEND_REFERENCES_COMMAND;
14238
+ exports.ASSISTANT_CONTENT_REVIEW_COMMAND = ASSISTANT_CONTENT_REVIEW_COMMAND;
13803
14239
  exports.ASSISTANT_CONTEXT_SET_COMMAND = ASSISTANT_CONTEXT_SET_COMMAND;
13804
14240
  exports.ASSISTANT_USER_PREFERENCES_VERSION = ASSISTANT_USER_PREFERENCES_VERSION;
13805
14241
  exports.Attachment_Type_Options = Attachment_Type_Options;
@@ -13810,6 +14246,11 @@ exports.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;
13810
14246
  exports.CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE;
13811
14247
  exports.CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED = CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED;
13812
14248
  exports.CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED = CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED;
14249
+ exports.CONTENT_CATALOG_PROVIDER = CONTENT_CATALOG_PROVIDER;
14250
+ exports.CONTENT_DOCUMENT_LINK_RESOURCE_PARAM = CONTENT_DOCUMENT_LINK_RESOURCE_PARAM;
14251
+ exports.CONTENT_EDITOR_LINK_COMMAND = CONTENT_EDITOR_LINK_COMMAND;
14252
+ exports.CONTENT_EDITOR_RESOLVE_COMMAND = CONTENT_EDITOR_RESOLVE_COMMAND;
14253
+ exports.CONTENT_EDITOR_STATUS_COMMAND = CONTENT_EDITOR_STATUS_COMMAND;
13813
14254
  exports.CONTEXT_COMPRESSION_COMPONENT_TYPE = CONTEXT_COMPRESSION_COMPONENT_TYPE;
13814
14255
  exports.CONTEXT_COMPRESSION_MIDDLEWARE_NAME = CONTEXT_COMPRESSION_MIDDLEWARE_NAME;
13815
14256
  exports.CONTEXT_VARIABLE_CURRENTSTATE = CONTEXT_VARIABLE_CURRENTSTATE;
@@ -13920,6 +14361,8 @@ exports.MCP_CAPABILITY_TYPES = MCP_CAPABILITY_TYPES;
13920
14361
  exports.MCP_CAPABILITY_VISIBILITIES = MCP_CAPABILITY_VISIBILITIES;
13921
14362
  exports.MCP_CONFIGURATION_SECRET_MASK = MCP_CONFIGURATION_SECRET_MASK;
13922
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;
13923
14366
  exports.MCP_HTTP_CORS_EXPOSED_HEADERS = MCP_HTTP_CORS_EXPOSED_HEADERS;
13924
14367
  exports.MCP_HTTP_CORS_REQUEST_HEADERS = MCP_HTTP_CORS_REQUEST_HEADERS;
13925
14368
  exports.MCP_INVOCATION_STATUSES = MCP_INVOCATION_STATUSES;
@@ -13974,6 +14417,7 @@ exports.SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES = SANDBOX_MANAGED_SERVICE_TRANSP
13974
14417
  exports.SANDBOX_TERMINAL_NAMESPACE = SANDBOX_TERMINAL_NAMESPACE;
13975
14418
  exports.SANDBOX_WORK_FOR_TYPES = SANDBOX_WORK_FOR_TYPES;
13976
14419
  exports.SKILLS_MIDDLEWARE_NAME = SKILLS_MIDDLEWARE_NAME;
14420
+ exports.SPACE_PROJECT_TYPE = SPACE_PROJECT_TYPE;
13977
14421
  exports.STANDARD_METADATA_FIELDS = STANDARD_METADATA_FIELDS;
13978
14422
  exports.STATE_SYS_AGENT_WORKSPACE_PATH = STATE_SYS_AGENT_WORKSPACE_PATH;
13979
14423
  exports.STATE_SYS_MEMORY_WORKSPACE_PATH = STATE_SYS_MEMORY_WORKSPACE_PATH;
@@ -14046,12 +14490,14 @@ exports.chatMessagePresentation = chatMessagePresentation;
14046
14490
  exports.checkProjectPipelineConfiguration = checkProjectPipelineConfiguration;
14047
14491
  exports.checkProjectPipelineHostCompatibility = checkProjectPipelineHostCompatibility;
14048
14492
  exports.classificateDocumentCategory = classificateDocumentCategory;
14493
+ exports.clientSecretGrantSourceSchema = clientSecretGrantSourceSchema;
14049
14494
  exports.codingExecutionViewKey = codingExecutionViewKey;
14050
14495
  exports.collectTreeLeaves = collectTreeLeaves;
14051
14496
  exports.configurableStoreNamespace = configurableStoreNamespace;
14052
14497
  exports.configurationFromModel = configurationFromModel;
14053
14498
  exports.configureProjectPipelineFromForm = configureProjectPipelineFromForm;
14054
14499
  exports.configuredModelSource = configuredModelSource;
14500
+ exports.controlledHandlerSchema = controlledHandlerSchema;
14055
14501
  exports.convertToUrlPath = convertToUrlPath;
14056
14502
  exports.createAgentConnections = createAgentConnections;
14057
14503
  exports.createConversationTitleSummaryEvent = createConversationTitleSummaryEvent;
@@ -14072,6 +14518,11 @@ exports.evidenceDrivenStrategy = evidenceDrivenStrategy;
14072
14518
  exports.executionActivityBatchSchema = executionActivityBatchSchema;
14073
14519
  exports.executionActivityCapabilitiesSchema = executionActivityCapabilitiesSchema;
14074
14520
  exports.executionActivityItemSchema = executionActivityItemSchema;
14521
+ exports.executionControlCapabilitiesSchema = executionControlCapabilitiesSchema;
14522
+ exports.executionControlEvidenceSchema = executionControlEvidenceSchema;
14523
+ exports.executionControlProtocols = executionControlProtocols;
14524
+ exports.executionRuntimeTargetSchema = executionRuntimeTargetSchema;
14525
+ exports.executionRuntimeTargetsEqual = executionRuntimeTargetsEqual;
14075
14526
  exports.figureOutXpert = figureOutXpert;
14076
14527
  exports.filterAssistantBindingDisabledSkillIds = filterAssistantBindingDisabledSkillIds;
14077
14528
  exports.filterAssistantBindingDisabledTools = filterAssistantBindingDisabledTools;
@@ -14105,6 +14556,7 @@ exports.getAssistantBindingDisabledTools = getAssistantBindingDisabledTools;
14105
14556
  exports.getAssistantManagement = getAssistantManagement;
14106
14557
  exports.getCurrentGraph = getCurrentGraph;
14107
14558
  exports.getEnabledTools = getEnabledTools;
14559
+ exports.getPluginApplicationScopes = getPluginApplicationScopes;
14108
14560
  exports.getStoreNamespace = getStoreNamespace;
14109
14561
  exports.getSwarmPartners = getSwarmPartners;
14110
14562
  exports.getTagTargets = getTagTargets;
@@ -14150,6 +14602,7 @@ exports.isNativeKnowledgeTableDocument = isNativeKnowledgeTableDocument;
14150
14602
  exports.isNil = isNil$1;
14151
14603
  exports.isOrganizationSharedXpertWorkspace = isOrganizationSharedXpertWorkspace;
14152
14604
  exports.isOutputTokenParameter = isOutputTokenParameter;
14605
+ exports.isPluginApplicationScope = isPluginApplicationScope;
14153
14606
  exports.isPreparedCandidate = isPreparedCandidate;
14154
14607
  exports.isProjectPipelineApplicable = isProjectPipelineApplicable;
14155
14608
  exports.isPromptWorkflowScenarios = isPromptWorkflowScenarios;
@@ -14179,10 +14632,19 @@ exports.legacyModelFeatures = legacyModelFeatures;
14179
14632
  exports.letterStartSUID = letterStartSUID;
14180
14633
  exports.locateNodes = locateNodes;
14181
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;
14182
14643
  exports.mergeMessageContentForDisplay = mergeMessageContentForDisplay;
14183
14644
  exports.messageContentText = messageContentText;
14184
14645
  exports.modelConfigurationSchema = modelConfigurationSchema;
14185
14646
  exports.modelExecutionEntry = modelExecutionEntry;
14647
+ exports.modelExecutionParametersSchema = modelExecutionParametersSchema;
14186
14648
  exports.modelExecutionSourceId = modelExecutionSourceId;
14187
14649
  exports.modelImportSchema = modelImportSchema;
14188
14650
  exports.nonBlank = nonBlank;
@@ -14325,6 +14787,11 @@ exports.resolveMessageAppendContext = resolveMessageAppendContext;
14325
14787
  exports.resolveModelParameterOptions = resolveModelParameterOptions;
14326
14788
  exports.resolvePromptWorkflowCapabilities = resolvePromptWorkflowCapabilities;
14327
14789
  exports.resolveRuntimeXpert = resolveRuntimeXpert;
14790
+ exports.sandboxEvidence = sandboxEvidence;
14791
+ exports.sandboxJobRetryReferenceSchema = sandboxJobRetryReferenceSchema;
14792
+ exports.sandboxRuntimeEvidenceSchema = sandboxRuntimeEvidenceSchema;
14793
+ exports.sandboxRuntimeTargetSchema = sandboxRuntimeTargetSchema;
14794
+ exports.sandboxTargetsEqual = sandboxTargetsEqual;
14328
14795
  exports.selectedPipelineAttemptFacts = selectedPipelineAttemptFacts;
14329
14796
  exports.setStateVariable = setStateVariable;
14330
14797
  exports.shortTitle = shortTitle;
@@ -14342,7 +14809,10 @@ exports.templateSetupUpdateSchema = templateSetupUpdateSchema;
14342
14809
  exports.templateUpgradeActionSchema = templateUpgradeActionSchema;
14343
14810
  exports.templateUpgradeInputSchema = templateUpgradeInputSchema;
14344
14811
  exports.templateUpgradeSectionSchema = templateUpgradeSectionSchema;
14812
+ exports.threadControlActionsSchema = threadControlActionsSchema;
14813
+ exports.threadControlViewSchema = threadControlViewSchema;
14345
14814
  exports.transformInstallation = transformInstallation;
14815
+ exports.unknownExecutionControl = unknownExecutionControl;
14346
14816
  exports.updateAssistantBindingSkillPreferences = updateAssistantBindingSkillPreferences;
14347
14817
  exports.updateAssistantBindingToolPreferences = updateAssistantBindingToolPreferences;
14348
14818
  exports.usesConfiguredModelCatalog = usesConfiguredModelCatalog;