@xpert-ai/contracts 3.18.6 → 3.20.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 (69) hide show
  1. package/index.cjs.js +1390 -222
  2. package/index.esm.js +1317 -223
  3. package/package.json +6 -3
  4. package/src/agent/ai-model.d.ts +1 -0
  5. package/src/agent/token.d.ts +4 -0
  6. package/src/agent-plugin.d.ts +192 -0
  7. package/src/ai/agent-output-delivery.model.d.ts +31 -0
  8. package/src/ai/agent-runtime.model.d.ts +53 -0
  9. package/src/ai/ai-model.model.d.ts +3 -0
  10. package/src/ai/assistant-binding.model.d.ts +3 -0
  11. package/src/ai/assistant-configuration.model.d.ts +76 -0
  12. package/src/ai/assistant-order.d.ts +5 -0
  13. package/src/ai/assistant-trigger.model.d.ts +56 -0
  14. package/src/ai/bosi.model.d.ts +73 -0
  15. package/src/ai/chat-activity.model.d.ts +14 -0
  16. package/src/ai/chat-message-envelope.model.d.ts +55 -0
  17. package/src/ai/chat-message.model.d.ts +14 -1
  18. package/src/ai/chat-task-summary.model.d.ts +4 -3
  19. package/src/ai/chat.model.d.ts +110 -13
  20. package/src/ai/clawxpert-conversation-scope.model.d.ts +2 -0
  21. package/src/ai/evolution/baseline.d.ts +40 -0
  22. package/src/ai/evolution/change.d.ts +53 -0
  23. package/src/ai/evolution/index.d.ts +1 -0
  24. package/src/ai/evolution/persistence.d.ts +2 -0
  25. package/src/ai/evolution/provider.d.ts +1 -1
  26. package/src/ai/execution-activity.model.d.ts +547 -0
  27. package/src/ai/index.d.ts +17 -0
  28. package/src/ai/knowledge-keyword-analyzer.model.d.ts +18 -0
  29. package/src/ai/knowledgebase.model.d.ts +5 -0
  30. package/src/ai/mcp-capability.model.d.ts +5 -1
  31. package/src/ai/mcp-publication.model.d.ts +1 -1
  32. package/src/ai/membership.model.d.ts +5 -0
  33. package/src/ai/middleware.model.d.ts +1 -0
  34. package/src/ai/mobile.model.d.ts +5 -0
  35. package/src/ai/model-execution.model.d.ts +265 -0
  36. package/src/ai/model-gateway.model.d.ts +15 -3
  37. package/src/ai/model-usage.model.d.ts +19 -0
  38. package/src/ai/project-selection.model.d.ts +9 -0
  39. package/src/ai/project-task-graph.model.d.ts +70 -0
  40. package/src/ai/project-task-runtime.model.d.ts +1106 -0
  41. package/src/ai/project-task-schedule.d.ts +24 -0
  42. package/src/ai/project-task-type.model.d.ts +13 -0
  43. package/src/ai/prompt-workflow-capabilities.model.d.ts +15 -0
  44. package/src/ai/prompt-workflow.model.d.ts +17 -0
  45. package/src/ai/realtime-voice.model.d.ts +90 -0
  46. package/src/ai/realtime-voice.transport.d.ts +54 -0
  47. package/src/ai/resource-card.d.ts +2 -0
  48. package/src/ai/sandbox-file-output.model.d.ts +9 -0
  49. package/src/ai/thread-activity.model.d.ts +14 -0
  50. package/src/ai/xpert-agent-execution.model.d.ts +37 -0
  51. package/src/ai/xpert-chat.model.d.ts +2 -0
  52. package/src/ai/xpert-marketplace.model.d.ts +5 -0
  53. package/src/ai/xpert-project-type.model.d.ts +56 -0
  54. package/src/ai/xpert-project.model.d.ts +46 -1
  55. package/src/ai/xpert-template.model.d.ts +48 -0
  56. package/src/ai/xpert-tool-mcp.model.d.ts +21 -1
  57. package/src/ai/xpert-workflow.model.d.ts +15 -1
  58. package/src/ai/xpert.model.d.ts +20 -1
  59. package/src/desktop-shell.model.d.ts +159 -0
  60. package/src/i18n.model.d.ts +1 -0
  61. package/src/index.d.ts +7 -0
  62. package/src/integration.model.d.ts +19 -0
  63. package/src/plugin.d.ts +26 -7
  64. package/src/tag-entity.model.d.ts +1 -1
  65. package/src/types.d.ts +4 -0
  66. package/src/view-extension/index.d.ts +2 -0
  67. package/src/view-extension/model.d.ts +41 -1
  68. package/src/view-extension/workbench-open.d.ts +10 -0
  69. package/src/view-extension/workbench.d.ts +6 -0
package/index.esm.js CHANGED
@@ -1,4 +1,7 @@
1
1
  import ShortUniqueId from 'short-unique-id';
2
+ import { parseResourceCardContent, upsertResourceCardContent, parseFileActivityContent, upsertFileActivityContent, isFileActivityContent, isResourceCardContent } from '@xpert-ai/chatkit-types';
3
+ export { createResourceCardContent, isResourceCardContent, parseResourceCard, parseResourceCardContent, resourceCardId, upsertResourceCardContent } from '@xpert-ai/chatkit-types';
4
+ import { z } from 'zod/v3';
2
5
 
3
6
  function resolveI18nText(value) {
4
7
  var language = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
@@ -85,30 +88,30 @@ function resolveI18nText(value) {
85
88
  return null;
86
89
  }
87
90
 
88
- function _array_like_to_array$b(arr, len) {
91
+ function _array_like_to_array$e(arr, len) {
89
92
  if (len == null || len > arr.length) len = arr.length;
90
93
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
91
94
  return arr2;
92
95
  }
93
- function _array_without_holes$5(arr) {
94
- if (Array.isArray(arr)) return _array_like_to_array$b(arr);
96
+ function _array_without_holes$7(arr) {
97
+ if (Array.isArray(arr)) return _array_like_to_array$e(arr);
95
98
  }
96
- function _iterable_to_array$7(iter) {
99
+ function _iterable_to_array$9(iter) {
97
100
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
98
101
  }
99
- function _non_iterable_spread$5() {
102
+ function _non_iterable_spread$7() {
100
103
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
101
104
  }
102
- function _to_consumable_array$5(arr) {
103
- return _array_without_holes$5(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$5();
105
+ function _to_consumable_array$7(arr) {
106
+ return _array_without_holes$7(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$7();
104
107
  }
105
- function _unsupported_iterable_to_array$b(o, minLen) {
108
+ function _unsupported_iterable_to_array$e(o, minLen) {
106
109
  if (!o) return;
107
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
110
+ if (typeof o === "string") return _array_like_to_array$e(o, minLen);
108
111
  var n = Object.prototype.toString.call(o).slice(8, -1);
109
112
  if (n === "Object" && o.constructor) n = o.constructor.name;
110
113
  if (n === "Map" || n === "Set") return Array.from(n);
111
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
114
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
112
115
  }
113
116
  var _uuidGenerator;
114
117
  var uuidGenerator = new ShortUniqueId({
@@ -118,7 +121,7 @@ var uuid = function() {
118
121
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
119
122
  args[_key] = arguments[_key];
120
123
  }
121
- return (_uuidGenerator = uuidGenerator).randomUUID.apply(_uuidGenerator, _to_consumable_array$5(args));
124
+ return (_uuidGenerator = uuidGenerator).randomUUID.apply(_uuidGenerator, _to_consumable_array$7(args));
122
125
  };
123
126
  // Parameters
124
127
  var ParameterTypeEnum;
@@ -135,7 +138,290 @@ function letterStartSUID(start) {
135
138
  return start + uuid();
136
139
  }
137
140
 
138
- function _instanceof$1(left, right) {
141
+ /** Portable presentation tokens. Clients render their own trusted icon components. */ var PROJECT_TASK_ICON_NAMES = [
142
+ "FileText",
143
+ "FileScan",
144
+ "FileSearch",
145
+ "ListChecks",
146
+ "ListTree",
147
+ "ShieldCheck",
148
+ "FilePenLine",
149
+ "Workflow",
150
+ "Images",
151
+ "FolderInput",
152
+ "FileOutput"
153
+ ];
154
+
155
+ /** A summary's incoming dependencies constrain its children without making them wait for the summary itself. */ function _array_like_to_array$d(arr, len) {
156
+ if (len == null || len > arr.length) len = arr.length;
157
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
158
+ return arr2;
159
+ }
160
+ function _array_without_holes$6(arr) {
161
+ if (Array.isArray(arr)) return _array_like_to_array$d(arr);
162
+ }
163
+ function _iterable_to_array$8(iter) {
164
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
165
+ }
166
+ function _non_iterable_spread$6() {
167
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
168
+ }
169
+ function _to_consumable_array$6(arr) {
170
+ return _array_without_holes$6(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$6();
171
+ }
172
+ function _unsupported_iterable_to_array$d(o, minLen) {
173
+ if (!o) return;
174
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
175
+ var n = Object.prototype.toString.call(o).slice(8, -1);
176
+ if (n === "Object" && o.constructor) n = o.constructor.name;
177
+ if (n === "Map" || n === "Set") return Array.from(n);
178
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
179
+ }
180
+ function schedulePredecessors(task, byId) {
181
+ var ids = new Set(task.predecessorIds);
182
+ var seen = new Set();
183
+ var parentId = task.parentTaskId;
184
+ while(parentId && !seen.has(parentId)){
185
+ seen.add(parentId);
186
+ var parent = byId.get(parentId);
187
+ if (!parent || parent.kind !== "summary") break;
188
+ parent.predecessorIds.forEach(function(id) {
189
+ return ids.add(id);
190
+ });
191
+ parentId = parent.parentTaskId;
192
+ }
193
+ return _to_consumable_array$6(ids);
194
+ }
195
+ /** Tree containment and finish-to-start dependencies are separate acyclic graphs. */ function validateProjectTaskGraph(tasks) {
196
+ var _loop = function(_i1, _iter1) {
197
+ var relation = _iter1[_i1];
198
+ var visited = new Set(), active = new Set();
199
+ var visit = function(id) {
200
+ if (active.has(id)) throw Error("PROJECT_TASK_".concat(relation.toUpperCase(), "_CYCLE: ").concat(id));
201
+ if (visited.has(id)) return;
202
+ var task = byId.get(id);
203
+ if (!task) throw Error("PROJECT_TASK_RELATION_NOT_FOUND: ".concat(id));
204
+ active.add(id);
205
+ var references = relation === "tree" ? task.parentTaskId ? [
206
+ task.parentTaskId
207
+ ] : [] : _to_consumable_array$6(relation === "schedule" ? schedulePredecessors(task, byId) : task.predecessorIds).concat(_to_consumable_array$6(relation === "schedule" && task.kind === "summary" ? tasks.filter(function(child) {
208
+ return child.parentTaskId === task.id;
209
+ }).map(function(child) {
210
+ return child.id;
211
+ }) : []));
212
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
213
+ try {
214
+ for(var _iterator = references[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
215
+ var next = _step.value;
216
+ visit(next);
217
+ }
218
+ } catch (err) {
219
+ _didIteratorError = true;
220
+ _iteratorError = err;
221
+ } finally{
222
+ try {
223
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
224
+ _iterator.return();
225
+ }
226
+ } finally{
227
+ if (_didIteratorError) {
228
+ throw _iteratorError;
229
+ }
230
+ }
231
+ }
232
+ active.delete(id);
233
+ visited.add(id);
234
+ };
235
+ tasks.forEach(function(task) {
236
+ return visit(task.id);
237
+ });
238
+ };
239
+ var byId = new Map(tasks.map(function(task) {
240
+ return [
241
+ task.id,
242
+ task
243
+ ];
244
+ }));
245
+ if (byId.size !== tasks.length) throw Error("PROJECT_TASK_DUPLICATE_ID");
246
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
247
+ try {
248
+ for(var _iterator = tasks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
249
+ var task = _step.value;
250
+ if (task.estimatedDurationMs != null && (!Number.isFinite(task.estimatedDurationMs) || task.estimatedDurationMs < 0)) {
251
+ throw Error("PROJECT_TASK_DURATION_INVALID: ".concat(task.id));
252
+ }
253
+ for(var _i = 0, _iter = [
254
+ task.plannedStartAt,
255
+ task.plannedEndAt
256
+ ]; _i < _iter.length; _i++){
257
+ var date = _iter[_i];
258
+ if (date != null && !Number.isFinite(Date.parse(date))) throw Error("PROJECT_TASK_DATE_INVALID: ".concat(task.id));
259
+ }
260
+ if (task.plannedStartAt && task.plannedEndAt && Date.parse(task.plannedEndAt) < Date.parse(task.plannedStartAt)) {
261
+ throw Error("PROJECT_TASK_DATE_ORDER: ".concat(task.id));
262
+ }
263
+ }
264
+ } catch (err) {
265
+ _didIteratorError = true;
266
+ _iteratorError = err;
267
+ } finally{
268
+ try {
269
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
270
+ _iterator.return();
271
+ }
272
+ } finally{
273
+ if (_didIteratorError) {
274
+ throw _iteratorError;
275
+ }
276
+ }
277
+ }
278
+ for(var _i1 = 0, _iter1 = [
279
+ "tree",
280
+ "dependency",
281
+ "schedule"
282
+ ]; _i1 < _iter1.length; _i1++)_loop(_i1, _iter1);
283
+ }
284
+ /** Unknown estimates stay unknown. Summary rows never contribute another duration. */ function forecastProjectTasks(tasks, changedId) {
285
+ validateProjectTaskGraph(tasks);
286
+ var byId = new Map(tasks.map(function(task) {
287
+ return [
288
+ task.id,
289
+ task
290
+ ];
291
+ }));
292
+ var result = new Map();
293
+ var affected = new Set(changedId ? [
294
+ changedId
295
+ ] : []);
296
+ var visiting = new Set();
297
+ var calculate = function(task) {
298
+ var previous = result.get(task.id);
299
+ if (previous) return previous;
300
+ if (visiting.has(task.id)) throw Error("PROJECT_TASK_SCHEDULE_CYCLE: ".concat(task.id));
301
+ visiting.add(task.id);
302
+ var predecessors = schedulePredecessors(task, byId).map(function(id) {
303
+ return calculate(byId.get(id));
304
+ });
305
+ if (predecessors.some(function(item) {
306
+ return affected.has(item.taskId);
307
+ })) affected.add(task.id);
308
+ var startAt = null, endAt = null;
309
+ if (task.kind === "summary") {
310
+ var _Math, _Math1;
311
+ var children = tasks.filter(function(child) {
312
+ return child.parentTaskId === task.id;
313
+ }).map(calculate);
314
+ var starts = children.flatMap(function(child) {
315
+ return child.startAt ? [
316
+ Date.parse(child.startAt)
317
+ ] : [];
318
+ });
319
+ startAt = starts.length ? new Date((_Math = Math).min.apply(_Math, _to_consumable_array$6(starts))).toISOString() : null;
320
+ endAt = children.length && children.every(function(child) {
321
+ return child.endAt;
322
+ }) ? new Date((_Math1 = Math).max.apply(_Math1, _to_consumable_array$6(children.map(function(child) {
323
+ return Date.parse(child.endAt);
324
+ })))).toISOString() : null;
325
+ if (children.some(function(child) {
326
+ return affected.has(child.taskId);
327
+ })) affected.add(task.id);
328
+ } else if (task.actualEndAt && task.status === "done") {
329
+ startAt = task.actualStartAt;
330
+ endAt = task.actualEndAt;
331
+ } else {
332
+ var _Math2;
333
+ var _task_estimatedDurationMs;
334
+ var duration = (_task_estimatedDurationMs = task.estimatedDurationMs) !== null && _task_estimatedDurationMs !== void 0 ? _task_estimatedDurationMs : task.plannedStartAt && task.plannedEndAt ? Date.parse(task.plannedEndAt) - Date.parse(task.plannedStartAt) : task.kind === "milestone" ? 0 : null;
335
+ var _task_actualStartAt;
336
+ var start = (_task_actualStartAt = task.actualStartAt) !== null && _task_actualStartAt !== void 0 ? _task_actualStartAt : task.plannedStartAt;
337
+ var predecessorEnds = predecessors.map(function(item) {
338
+ return item.endAt ? Date.parse(item.endAt) : null;
339
+ });
340
+ var earliest = task.actualStartAt ? Date.parse(task.actualStartAt) : predecessorEnds.some(function(value) {
341
+ return value === null;
342
+ }) ? null : start !== null || predecessorEnds.length ? (_Math2 = Math).max.apply(_Math2, _to_consumable_array$6(start !== null ? [
343
+ Date.parse(start)
344
+ ] : []).concat(_to_consumable_array$6(predecessorEnds.map(function(value) {
345
+ return value;
346
+ })))) : null;
347
+ startAt = earliest === null ? null : new Date(earliest).toISOString();
348
+ // A blocked task has no known release date. Show affected successors without inventing one.
349
+ endAt = earliest === null || duration === null || [
350
+ "blocked",
351
+ "paused",
352
+ "cancelled"
353
+ ].includes(task.status) || Boolean(task.actualEndAt && task.status !== "done") ? null : new Date(earliest + duration).toISOString();
354
+ }
355
+ var forecast = {
356
+ taskId: task.id,
357
+ startAt: startAt,
358
+ endAt: endAt,
359
+ affected: affected.has(task.id),
360
+ critical: false
361
+ };
362
+ result.set(task.id, forecast);
363
+ visiting.delete(task.id);
364
+ return forecast;
365
+ };
366
+ tasks.forEach(calculate);
367
+ // Critical highlighting is only meaningful when every executable task has an estimate.
368
+ var leaves = tasks.filter(function(task) {
369
+ return task.kind !== "summary";
370
+ });
371
+ if (leaves.length && leaves.every(function(task) {
372
+ return result.get(task.id).endAt !== null;
373
+ })) {
374
+ var _Math;
375
+ var finish = (_Math = Math).max.apply(_Math, _to_consumable_array$6(leaves.map(function(task) {
376
+ return Date.parse(result.get(task.id).endAt);
377
+ })));
378
+ var mark = function(id) {
379
+ var item = result.get(id);
380
+ if (item.critical) return;
381
+ if (byId.get(id).kind === "summary") {
382
+ tasks.filter(function(child) {
383
+ var _result_get;
384
+ return child.parentTaskId === id && ((_result_get = result.get(child.id)) === null || _result_get === void 0 ? void 0 : _result_get.endAt) === item.endAt;
385
+ }).forEach(function(child) {
386
+ return mark(child.id);
387
+ });
388
+ return;
389
+ }
390
+ item.critical = true;
391
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
392
+ try {
393
+ for(var _iterator = schedulePredecessors(byId.get(id), byId)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
394
+ var parent = _step.value;
395
+ var endAt = result.get(parent).endAt;
396
+ if (endAt && item.startAt && Date.parse(endAt) === Date.parse(item.startAt)) mark(parent);
397
+ }
398
+ } catch (err) {
399
+ _didIteratorError = true;
400
+ _iteratorError = err;
401
+ } finally{
402
+ try {
403
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
404
+ _iterator.return();
405
+ }
406
+ } finally{
407
+ if (_didIteratorError) {
408
+ throw _iteratorError;
409
+ }
410
+ }
411
+ }
412
+ };
413
+ leaves.filter(function(task) {
414
+ return Date.parse(result.get(task.id).endAt) === finish;
415
+ }).forEach(function(task) {
416
+ return mark(task.id);
417
+ });
418
+ }
419
+ return tasks.map(function(task) {
420
+ return result.get(task.id);
421
+ });
422
+ }
423
+
424
+ function _instanceof$2(left, right) {
139
425
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
140
426
  return !!right[Symbol.hasInstance](left);
141
427
  } else {
@@ -149,7 +435,7 @@ function nonNullable(value) {
149
435
  return value != null;
150
436
  }
151
437
  function isString(value) {
152
- return typeof value === "string" || _instanceof$1(value, String);
438
+ return typeof value === "string" || _instanceof$2(value, String);
153
439
  }
154
440
  function isBlank(value) {
155
441
  return isNil$1(value) || isString(value) && !value.trim();
@@ -1026,6 +1312,163 @@ var OrganizationDemoNetworkEnum;
1026
1312
  OrganizationDemoNetworkEnum["aliyun"] = "aliyun";
1027
1313
  })(OrganizationDemoNetworkEnum || (OrganizationDemoNetworkEnum = {}));
1028
1314
 
1315
+ function _define_property$e(obj, key, value) {
1316
+ if (key in obj) {
1317
+ Object.defineProperty(obj, key, {
1318
+ value: value,
1319
+ enumerable: true,
1320
+ configurable: true,
1321
+ writable: true
1322
+ });
1323
+ } else {
1324
+ obj[key] = value;
1325
+ }
1326
+ return obj;
1327
+ }
1328
+ function _object_spread$d(target) {
1329
+ for(var i = 1; i < arguments.length; i++){
1330
+ var source = arguments[i] != null ? arguments[i] : {};
1331
+ var ownKeys = Object.keys(source);
1332
+ if (typeof Object.getOwnPropertySymbols === "function") {
1333
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1334
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1335
+ }));
1336
+ }
1337
+ ownKeys.forEach(function(key) {
1338
+ _define_property$e(target, key, source[key]);
1339
+ });
1340
+ }
1341
+ return target;
1342
+ }
1343
+ function ownKeys$8(object, enumerableOnly) {
1344
+ var keys = Object.keys(object);
1345
+ if (Object.getOwnPropertySymbols) {
1346
+ var symbols = Object.getOwnPropertySymbols(object);
1347
+ keys.push.apply(keys, symbols);
1348
+ }
1349
+ return keys;
1350
+ }
1351
+ function _object_spread_props$8(target, source) {
1352
+ source = source != null ? source : {};
1353
+ if (Object.getOwnPropertyDescriptors) {
1354
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1355
+ } else {
1356
+ ownKeys$8(Object(source)).forEach(function(key) {
1357
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1358
+ });
1359
+ }
1360
+ return target;
1361
+ }
1362
+ function _type_of(obj) {
1363
+ "@swc/helpers - typeof";
1364
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1365
+ }
1366
+ function isObject(value) {
1367
+ return typeof value === "object" && value !== null && !Array.isArray(value);
1368
+ }
1369
+ function isStringList(value) {
1370
+ return Array.isArray(value) && value.every(function(item) {
1371
+ return typeof item === "string";
1372
+ });
1373
+ }
1374
+ function parseSelectionSet(value) {
1375
+ if (!isObject(value)) return null;
1376
+ var skills = "skills" in value ? value.skills : undefined;
1377
+ var plugins = "plugins" in value ? value.plugins : undefined;
1378
+ var subAgents = "subAgents" in value ? value.subAgents : undefined;
1379
+ var connectors = "connectors" in value ? value.connectors : undefined;
1380
+ if (skills !== undefined && (!isObject(skills) || !("ids" in skills) || !isStringList(skills.ids) || "workspaceId" in skills && skills.workspaceId !== undefined && typeof skills.workspaceId !== "string")) return null;
1381
+ if (plugins !== undefined && (!isObject(plugins) || !("nodeKeys" in plugins) || !isStringList(plugins.nodeKeys))) return null;
1382
+ if (subAgents !== undefined && (!isObject(subAgents) || !("nodeKeys" in subAgents) || !isStringList(subAgents.nodeKeys))) return null;
1383
+ if (connectors !== undefined && (!isObject(connectors) || !("bindingIds" in connectors) || !isStringList(connectors.bindingIds))) return null;
1384
+ return _object_spread$d(_object_spread_props$8(_object_spread$d({}, value), {
1385
+ skills: skills === undefined ? {
1386
+ ids: []
1387
+ } : skills,
1388
+ plugins: plugins === undefined ? {
1389
+ nodeKeys: []
1390
+ } : plugins
1391
+ }), subAgents === undefined ? {} : {
1392
+ subAgents: subAgents
1393
+ }, connectors === undefined ? {} : {
1394
+ connectors: connectors
1395
+ });
1396
+ }
1397
+ function parsePromptCapabilitySelection(value) {
1398
+ if (!isObject(value) || !("mode" in value) || value.mode !== "allowlist") return null;
1399
+ if ("inheritUnselected" in value && value.inheritUnselected !== undefined && typeof value.inheritUnselected !== "boolean") return null;
1400
+ var selection = parseSelectionSet(value);
1401
+ var recommended = "recommended" in value && value.recommended != null ? parseSelectionSet(value.recommended) : undefined;
1402
+ if (!selection || recommended === null) return null;
1403
+ return _object_spread$d(_object_spread_props$8(_object_spread$d({}, selection), {
1404
+ mode: "allowlist"
1405
+ }), "inheritUnselected" in value && typeof value.inheritUnselected === "boolean" ? {
1406
+ inheritUnselected: value.inheritUnselected
1407
+ } : {}, recommended ? {
1408
+ recommended: recommended
1409
+ } : {});
1410
+ }
1411
+ function isScopedPromptCapabilityConfig(value) {
1412
+ return isObject(value) && "type" in value && value.type === "expert_scoped_capabilities";
1413
+ }
1414
+ function parsePromptCapabilityConfig(value) {
1415
+ if (!isObject(value) || !("type" in value) || value.type !== "expert_scoped_capabilities" || !("version" in value) || value.version !== 1 || !("experts" in value) || !Array.isArray(value.experts)) return null;
1416
+ var defaults = "defaults" in value && value.defaults != null ? parsePromptCapabilitySelection(value.defaults) : null;
1417
+ if ("defaults" in value && value.defaults != null && !defaults) return null;
1418
+ var experts = [];
1419
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1420
+ try {
1421
+ var _loop = function() {
1422
+ var entry = _step.value;
1423
+ if (!isObject(entry) || !("xpertId" in entry) || typeof entry.xpertId !== "string" || !entry.xpertId.trim() || !("selection" in entry) || experts.some(function(item) {
1424
+ return item.xpertId === entry.xpertId;
1425
+ })) return {
1426
+ v: null
1427
+ };
1428
+ var selection = entry.selection === null ? null : parsePromptCapabilitySelection(entry.selection);
1429
+ if (entry.selection !== null && !selection) return {
1430
+ v: null
1431
+ };
1432
+ experts.push({
1433
+ xpertId: entry.xpertId,
1434
+ selection: selection
1435
+ });
1436
+ };
1437
+ for(var _iterator = value.experts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1438
+ var _ret = _loop();
1439
+ if (_type_of(_ret) === "object") return _ret.v;
1440
+ }
1441
+ } catch (err) {
1442
+ _didIteratorError = true;
1443
+ _iteratorError = err;
1444
+ } finally{
1445
+ try {
1446
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1447
+ _iterator.return();
1448
+ }
1449
+ } finally{
1450
+ if (_didIteratorError) {
1451
+ throw _iteratorError;
1452
+ }
1453
+ }
1454
+ }
1455
+ return _object_spread_props$8(_object_spread$d({}, value), {
1456
+ type: "expert_scoped_capabilities",
1457
+ version: 1,
1458
+ defaults: defaults,
1459
+ experts: experts
1460
+ });
1461
+ }
1462
+ function resolvePromptWorkflowCapabilities(value, xpertId) {
1463
+ if (!isScopedPromptCapabilityConfig(value)) return value;
1464
+ var config = parsePromptCapabilityConfig(value);
1465
+ if (!config) return null;
1466
+ var entry = config.experts.find(function(item) {
1467
+ return item.xpertId === xpertId;
1468
+ });
1469
+ return entry ? entry.selection : config.defaults;
1470
+ }
1471
+
1029
1472
  /**
1030
1473
  * Business roles for AI copilot (commands or contexts)
1031
1474
  */ var AiBusinessRole;
@@ -1141,7 +1584,7 @@ var ChatMessageStepCategory;
1141
1584
  ChatMessageStepCategory["Knowledges"] = "knowledges";
1142
1585
  })(ChatMessageStepCategory || (ChatMessageStepCategory = {}));
1143
1586
 
1144
- function _define_property$c(obj, key, value) {
1587
+ function _define_property$d(obj, key, value) {
1145
1588
  if (key in obj) {
1146
1589
  Object.defineProperty(obj, key, {
1147
1590
  value: value,
@@ -1154,14 +1597,14 @@ function _define_property$c(obj, key, value) {
1154
1597
  }
1155
1598
  return obj;
1156
1599
  }
1157
- function _instanceof(left, right) {
1600
+ function _instanceof$1(left, right) {
1158
1601
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
1159
1602
  return !!right[Symbol.hasInstance](left);
1160
1603
  } else {
1161
1604
  return left instanceof right;
1162
1605
  }
1163
1606
  }
1164
- function _object_spread$b(target) {
1607
+ function _object_spread$c(target) {
1165
1608
  for(var i = 1; i < arguments.length; i++){
1166
1609
  var source = arguments[i] != null ? arguments[i] : {};
1167
1610
  var ownKeys = Object.keys(source);
@@ -1171,7 +1614,7 @@ function _object_spread$b(target) {
1171
1614
  }));
1172
1615
  }
1173
1616
  ownKeys.forEach(function(key) {
1174
- _define_property$c(target, key, source[key]);
1617
+ _define_property$d(target, key, source[key]);
1175
1618
  });
1176
1619
  }
1177
1620
  return target;
@@ -1182,12 +1625,12 @@ var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
1182
1625
  var CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED = "thread_goal_updated";
1183
1626
  var CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED = "thread_goal_cleared";
1184
1627
  function createConversationTitleSummaryEvent(event) {
1185
- return _object_spread$b({
1628
+ return _object_spread$c({
1186
1629
  type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
1187
1630
  }, event);
1188
1631
  }
1189
1632
  function createFollowUpConsumedEvent(event) {
1190
- return _object_spread$b({
1633
+ return _object_spread$c({
1191
1634
  type: CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
1192
1635
  }, event);
1193
1636
  }
@@ -1210,7 +1653,7 @@ function createThreadGoalClearedEvent(event) {
1210
1653
  };
1211
1654
  }
1212
1655
  function toIsoString(value) {
1213
- if (_instanceof(value, Date)) {
1656
+ if (_instanceof$1(value, Date)) {
1214
1657
  return value.toISOString();
1215
1658
  }
1216
1659
  if (typeof value === "string") {
@@ -1222,18 +1665,18 @@ function toIsoString(value) {
1222
1665
  return new Date().toISOString();
1223
1666
  }
1224
1667
 
1225
- function _array_like_to_array$a(arr, len) {
1668
+ function _array_like_to_array$c(arr, len) {
1226
1669
  if (len == null || len > arr.length) len = arr.length;
1227
1670
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1228
1671
  return arr2;
1229
1672
  }
1230
- function _array_with_holes$7(arr) {
1673
+ function _array_with_holes$8(arr) {
1231
1674
  if (Array.isArray(arr)) return arr;
1232
1675
  }
1233
- function _array_without_holes$4(arr) {
1234
- if (Array.isArray(arr)) return _array_like_to_array$a(arr);
1676
+ function _array_without_holes$5(arr) {
1677
+ if (Array.isArray(arr)) return _array_like_to_array$c(arr);
1235
1678
  }
1236
- function _define_property$b(obj, key, value) {
1679
+ function _define_property$c(obj, key, value) {
1237
1680
  if (key in obj) {
1238
1681
  Object.defineProperty(obj, key, {
1239
1682
  value: value,
@@ -1246,10 +1689,10 @@ function _define_property$b(obj, key, value) {
1246
1689
  }
1247
1690
  return obj;
1248
1691
  }
1249
- function _iterable_to_array$6(iter) {
1692
+ function _iterable_to_array$7(iter) {
1250
1693
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1251
1694
  }
1252
- function _iterable_to_array_limit$5(arr, i) {
1695
+ function _iterable_to_array_limit$6(arr, i) {
1253
1696
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1254
1697
  if (_i == null) return;
1255
1698
  var _arr = [];
@@ -1273,13 +1716,13 @@ function _iterable_to_array_limit$5(arr, i) {
1273
1716
  }
1274
1717
  return _arr;
1275
1718
  }
1276
- function _non_iterable_rest$7() {
1719
+ function _non_iterable_rest$8() {
1277
1720
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1278
1721
  }
1279
- function _non_iterable_spread$4() {
1722
+ function _non_iterable_spread$5() {
1280
1723
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1281
1724
  }
1282
- function _object_spread$a(target) {
1725
+ function _object_spread$b(target) {
1283
1726
  for(var i = 1; i < arguments.length; i++){
1284
1727
  var source = arguments[i] != null ? arguments[i] : {};
1285
1728
  var ownKeys = Object.keys(source);
@@ -1289,7 +1732,7 @@ function _object_spread$a(target) {
1289
1732
  }));
1290
1733
  }
1291
1734
  ownKeys.forEach(function(key) {
1292
- _define_property$b(target, key, source[key]);
1735
+ _define_property$c(target, key, source[key]);
1293
1736
  });
1294
1737
  }
1295
1738
  return target;
@@ -1313,19 +1756,19 @@ function _object_spread_props$7(target, source) {
1313
1756
  }
1314
1757
  return target;
1315
1758
  }
1316
- function _sliced_to_array$5(arr, i) {
1317
- return _array_with_holes$7(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$7();
1759
+ function _sliced_to_array$6(arr, i) {
1760
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$8();
1318
1761
  }
1319
- function _to_consumable_array$4(arr) {
1320
- return _array_without_holes$4(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$4();
1762
+ function _to_consumable_array$5(arr) {
1763
+ return _array_without_holes$5(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$5();
1321
1764
  }
1322
- function _unsupported_iterable_to_array$a(o, minLen) {
1765
+ function _unsupported_iterable_to_array$c(o, minLen) {
1323
1766
  if (!o) return;
1324
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
1767
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
1325
1768
  var n = Object.prototype.toString.call(o).slice(8, -1);
1326
1769
  if (n === "Object" && o.constructor) n = o.constructor.name;
1327
1770
  if (n === "Map" || n === "Set") return Array.from(n);
1328
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
1771
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
1329
1772
  }
1330
1773
  var AssistantCode;
1331
1774
  (function(AssistantCode) {
@@ -1382,7 +1825,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1382
1825
  }
1383
1826
  var _value_toolsets;
1384
1827
  var toolsets = Object.entries((_value_toolsets = value.toolsets) !== null && _value_toolsets !== void 0 ? _value_toolsets : {}).reduce(function(acc, param) {
1385
- var _param = _sliced_to_array$5(param, 2), key = _param[0], item = _param[1];
1828
+ var _param = _sliced_to_array$6(param, 2), key = _param[0], item = _param[1];
1386
1829
  var nodeKey = normalizeAssistantBindingPreferenceKey(key);
1387
1830
  var toolsetName = normalizeAssistantBindingPreferenceKey(item === null || item === void 0 ? void 0 : item.toolsetName);
1388
1831
  if (!nodeKey || !toolsetName) {
@@ -1397,7 +1840,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1397
1840
  }, {});
1398
1841
  var _value_middlewares;
1399
1842
  var middlewares = Object.entries((_value_middlewares = value.middlewares) !== null && _value_middlewares !== void 0 ? _value_middlewares : {}).reduce(function(acc, param) {
1400
- var _param = _sliced_to_array$5(param, 2), key = _param[0], item = _param[1];
1843
+ var _param = _sliced_to_array$6(param, 2), key = _param[0], item = _param[1];
1401
1844
  var nodeKey = normalizeAssistantBindingPreferenceKey(key);
1402
1845
  var provider = normalizeAssistantBindingPreferenceKey(item === null || item === void 0 ? void 0 : item.provider);
1403
1846
  if (!nodeKey || !provider) {
@@ -1411,7 +1854,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1411
1854
  }, {});
1412
1855
  var _value_skills;
1413
1856
  var skills = Object.entries((_value_skills = value.skills) !== null && _value_skills !== void 0 ? _value_skills : {}).reduce(function(acc, param) {
1414
- var _param = _sliced_to_array$5(param, 2), key = _param[0], item = _param[1];
1857
+ var _param = _sliced_to_array$6(param, 2), key = _param[0], item = _param[1];
1415
1858
  var workspaceKey = normalizeAssistantBindingPreferenceKey(key);
1416
1859
  var workspaceId = normalizeAssistantBindingPreferenceKey(item === null || item === void 0 ? void 0 : item.workspaceId) || workspaceKey;
1417
1860
  if (!workspaceKey || !workspaceId) {
@@ -1426,7 +1869,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1426
1869
  if (!Object.keys(toolsets).length && !Object.keys(middlewares).length && !Object.keys(skills).length) {
1427
1870
  return null;
1428
1871
  }
1429
- return _object_spread$a({
1872
+ return _object_spread$b({
1430
1873
  version: 1
1431
1874
  }, Object.keys(toolsets).length ? {
1432
1875
  toolsets: toolsets
@@ -1501,11 +1944,11 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1501
1944
  var disabledTools = getAssistantBindingDisabledTools(normalizedPreferences, sourceType, normalizedNodeKey);
1502
1945
  var nextDisabledTools = enabled ? disabledTools.filter(function(item) {
1503
1946
  return item !== normalizedToolName;
1504
- }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$4(disabledTools).concat([
1947
+ }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$5(disabledTools).concat([
1505
1948
  normalizedToolName
1506
1949
  ]));
1507
- var toolsets = normalizedPreferences.toolsets ? _object_spread$a({}, normalizedPreferences.toolsets) : undefined;
1508
- var middlewares = normalizedPreferences.middlewares ? _object_spread$a({}, normalizedPreferences.middlewares) : undefined;
1950
+ var toolsets = normalizedPreferences.toolsets ? _object_spread$b({}, normalizedPreferences.toolsets) : undefined;
1951
+ var middlewares = normalizedPreferences.middlewares ? _object_spread$b({}, normalizedPreferences.middlewares) : undefined;
1509
1952
  if (sourceType === "toolset") {
1510
1953
  var toolsetName = "toolsetName" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.toolsetName) : "";
1511
1954
  if (!toolsetName) {
@@ -1521,14 +1964,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1521
1964
  } else {
1522
1965
  delete nextToolsets[normalizedNodeKey];
1523
1966
  }
1524
- return normalizeAssistantBindingToolPreferences(_object_spread$a({
1967
+ return normalizeAssistantBindingToolPreferences(_object_spread$b({
1525
1968
  version: 1
1526
1969
  }, Object.keys(nextToolsets).length ? {
1527
1970
  toolsets: nextToolsets
1528
1971
  } : {}, middlewares && Object.keys(middlewares).length ? {
1529
1972
  middlewares: middlewares
1530
1973
  } : {}, normalizedPreferences.skills ? {
1531
- skills: _object_spread$a({}, normalizedPreferences.skills)
1974
+ skills: _object_spread$b({}, normalizedPreferences.skills)
1532
1975
  } : {}));
1533
1976
  }
1534
1977
  var provider = "provider" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.provider) : "";
@@ -1544,14 +1987,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1544
1987
  } else {
1545
1988
  delete nextMiddlewares[normalizedNodeKey];
1546
1989
  }
1547
- return normalizeAssistantBindingToolPreferences(_object_spread$a({
1990
+ return normalizeAssistantBindingToolPreferences(_object_spread$b({
1548
1991
  version: 1
1549
1992
  }, toolsets && Object.keys(toolsets).length ? {
1550
1993
  toolsets: toolsets
1551
1994
  } : {}, Object.keys(nextMiddlewares).length ? {
1552
1995
  middlewares: nextMiddlewares
1553
1996
  } : {}, normalizedPreferences.skills ? {
1554
- skills: _object_spread$a({}, normalizedPreferences.skills)
1997
+ skills: _object_spread$b({}, normalizedPreferences.skills)
1555
1998
  } : {}));
1556
1999
  }
1557
2000
  function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillId, enabled) {
@@ -1566,10 +2009,10 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
1566
2009
  var disabledSkillIds = getAssistantBindingDisabledSkillIds(normalizedPreferences, normalizedWorkspaceId);
1567
2010
  var nextDisabledSkillIds = enabled ? disabledSkillIds.filter(function(item) {
1568
2011
  return item !== normalizedSkillId;
1569
- }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$4(disabledSkillIds).concat([
2012
+ }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$5(disabledSkillIds).concat([
1570
2013
  normalizedSkillId
1571
2014
  ]));
1572
- var skills = normalizedPreferences.skills ? _object_spread$a({}, normalizedPreferences.skills) : {};
2015
+ var skills = normalizedPreferences.skills ? _object_spread$b({}, normalizedPreferences.skills) : {};
1573
2016
  if (nextDisabledSkillIds.length) {
1574
2017
  skills[normalizedWorkspaceId] = {
1575
2018
  workspaceId: normalizedWorkspaceId,
@@ -1578,12 +2021,12 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
1578
2021
  } else {
1579
2022
  delete skills[normalizedWorkspaceId];
1580
2023
  }
1581
- return normalizeAssistantBindingToolPreferences(_object_spread$a({
2024
+ return normalizeAssistantBindingToolPreferences(_object_spread$b({
1582
2025
  version: 1
1583
2026
  }, normalizedPreferences.toolsets ? {
1584
- toolsets: _object_spread$a({}, normalizedPreferences.toolsets)
2027
+ toolsets: _object_spread$b({}, normalizedPreferences.toolsets)
1585
2028
  } : {}, normalizedPreferences.middlewares ? {
1586
- middlewares: _object_spread$a({}, normalizedPreferences.middlewares)
2029
+ middlewares: _object_spread$b({}, normalizedPreferences.middlewares)
1587
2030
  } : {}, Object.keys(skills).length ? {
1588
2031
  skills: skills
1589
2032
  } : {}));
@@ -1601,14 +2044,14 @@ function ensureAssistantBindingSkillWorkspacePreference(preferences, workspaceId
1601
2044
  var currentSkills = (_normalizedPreferences_skills = normalizedPreferences.skills) !== null && _normalizedPreferences_skills !== void 0 ? _normalizedPreferences_skills : {};
1602
2045
  var currentWorkspacePreference = currentSkills[normalizedWorkspaceId];
1603
2046
  var _currentWorkspacePreference_disabledSkillIds;
1604
- return _object_spread_props$7(_object_spread$a({
2047
+ return _object_spread_props$7(_object_spread$b({
1605
2048
  version: 1
1606
2049
  }, normalizedPreferences.toolsets ? {
1607
- toolsets: _object_spread$a({}, normalizedPreferences.toolsets)
2050
+ toolsets: _object_spread$b({}, normalizedPreferences.toolsets)
1608
2051
  } : {}, normalizedPreferences.middlewares ? {
1609
- middlewares: _object_spread$a({}, normalizedPreferences.middlewares)
2052
+ middlewares: _object_spread$b({}, normalizedPreferences.middlewares)
1610
2053
  } : {}), {
1611
- skills: _object_spread_props$7(_object_spread$a({}, currentSkills), _define_property$b({}, normalizedWorkspaceId, {
2054
+ skills: _object_spread_props$7(_object_spread$b({}, currentSkills), _define_property$c({}, normalizedWorkspaceId, {
1612
2055
  workspaceId: normalizeAssistantBindingPreferenceKey(currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.workspaceId) || normalizedWorkspaceId,
1613
2056
  disabledSkillIds: (_currentWorkspacePreference_disabledSkillIds = currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.disabledSkillIds) !== null && _currentWorkspacePreference_disabledSkillIds !== void 0 ? _currentWorkspacePreference_disabledSkillIds : []
1614
2057
  }))
@@ -1627,9 +2070,81 @@ function isSystemManagedAssistant(code) {
1627
2070
  return getAssistantManagement(code) === "system";
1628
2071
  }
1629
2072
 
2073
+ // Shared by Cloud and Desktop: activity changes must not move assistant entries.
2074
+ function _array_like_to_array$b(arr, len) {
2075
+ if (len == null || len > arr.length) len = arr.length;
2076
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2077
+ return arr2;
2078
+ }
2079
+ function _array_without_holes$4(arr) {
2080
+ if (Array.isArray(arr)) return _array_like_to_array$b(arr);
2081
+ }
2082
+ function _instanceof(left, right) {
2083
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
2084
+ return !!right[Symbol.hasInstance](left);
2085
+ } else {
2086
+ return left instanceof right;
2087
+ }
2088
+ }
2089
+ function _iterable_to_array$6(iter) {
2090
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2091
+ }
2092
+ function _non_iterable_spread$4() {
2093
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2094
+ }
2095
+ function _to_consumable_array$4(arr) {
2096
+ return _array_without_holes$4(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$4();
2097
+ }
2098
+ function _unsupported_iterable_to_array$b(o, minLen) {
2099
+ if (!o) return;
2100
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
2101
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2102
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2103
+ if (n === "Map" || n === "Set") return Array.from(n);
2104
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
2105
+ }
2106
+ function orderAssistantXperts(items) {
2107
+ var orderedIds = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
2108
+ var itemById = new Map(items.filter(function(item) {
2109
+ return typeof item.id === "string" && !!item.id.trim();
2110
+ }).map(function(item) {
2111
+ return [
2112
+ item.id,
2113
+ item
2114
+ ];
2115
+ }));
2116
+ var orderedIdSet = new Set(orderedIds);
2117
+ var unorderedItems = items.map(function(item, index) {
2118
+ return {
2119
+ item: item,
2120
+ index: index
2121
+ };
2122
+ }).filter(function(param) {
2123
+ var item = param.item;
2124
+ return !item.id || !orderedIdSet.has(item.id);
2125
+ }).sort(function(left, right) {
2126
+ var leftCreatedAt = createdAtTimestamp(left.item);
2127
+ var rightCreatedAt = createdAtTimestamp(right.item);
2128
+ return leftCreatedAt === rightCreatedAt ? left.index - right.index : rightCreatedAt > leftCreatedAt ? 1 : -1;
2129
+ }).map(function(param) {
2130
+ var item = param.item;
2131
+ return item;
2132
+ });
2133
+ return _to_consumable_array$4(unorderedItems).concat(_to_consumable_array$4(orderedIds.map(function(id) {
2134
+ return itemById.get(id);
2135
+ }).filter(function(item) {
2136
+ return !!item;
2137
+ })));
2138
+ }
2139
+ function createdAtTimestamp(item) {
2140
+ var value = item.createdAt;
2141
+ var timestamp = _instanceof(value, Date) ? value.getTime() : typeof value === "string" ? Date.parse(value) : Number.NaN;
2142
+ return Number.isNaN(timestamp) ? Number.NEGATIVE_INFINITY : timestamp;
2143
+ }
2144
+
1630
2145
  var ASSISTANT_USER_PREFERENCES_VERSION = 1;
1631
2146
 
1632
- function _define_property$a(obj, key, value) {
2147
+ function _define_property$b(obj, key, value) {
1633
2148
  if (key in obj) {
1634
2149
  Object.defineProperty(obj, key, {
1635
2150
  value: value,
@@ -1642,7 +2157,7 @@ function _define_property$a(obj, key, value) {
1642
2157
  }
1643
2158
  return obj;
1644
2159
  }
1645
- function _object_spread$9(target) {
2160
+ function _object_spread$a(target) {
1646
2161
  for(var i = 1; i < arguments.length; i++){
1647
2162
  var source = arguments[i] != null ? arguments[i] : {};
1648
2163
  var ownKeys = Object.keys(source);
@@ -1652,7 +2167,7 @@ function _object_spread$9(target) {
1652
2167
  }));
1653
2168
  }
1654
2169
  ownKeys.forEach(function(key) {
1655
- _define_property$a(target, key, source[key]);
2170
+ _define_property$b(target, key, source[key]);
1656
2171
  });
1657
2172
  }
1658
2173
  return target;
@@ -1784,7 +2299,7 @@ function resolveModelParameterOptions(modelOptions, rules) {
1784
2299
  var config = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1785
2300
  var _config_preserveUnknown;
1786
2301
  var preserveUnknown = (_config_preserveUnknown = config.preserveUnknown) !== null && _config_preserveUnknown !== void 0 ? _config_preserveUnknown : true;
1787
- var resolvedOptions = preserveUnknown ? _object_spread$9({}, modelOptions !== null && modelOptions !== void 0 ? modelOptions : {}) : {};
2302
+ var resolvedOptions = preserveUnknown ? _object_spread$a({}, modelOptions !== null && modelOptions !== void 0 ? modelOptions : {}) : {};
1788
2303
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1789
2304
  try {
1790
2305
  for(var _iterator = rules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
@@ -1839,6 +2354,10 @@ function isRunnableThreadGoalStatus(status) {
1839
2354
  return status === "active";
1840
2355
  }
1841
2356
 
2357
+ /** Why a derived conversation thread was created. */ var ChatThreadPurpose = {
2358
+ SideChat: "side-chat",
2359
+ MessageEdit: "message-edit"
2360
+ };
1842
2361
  /**
1843
2362
  * @deprecated use ChatMessageEventTypeEnum
1844
2363
  */ var ChatGatewayEvent;
@@ -1859,6 +2378,16 @@ function isRunnableThreadGoalStatus(status) {
1859
2378
  ChatGatewayEvent["Agent"] = "agent";
1860
2379
  })(ChatGatewayEvent || (ChatGatewayEvent = {}));
1861
2380
 
2381
+ /** Persistence boundary: unknown versions stay hidden until this host understands their policy. */ function chatMessagePresentation(message) {
2382
+ var envelope = message.messageEnvelope;
2383
+ if (envelope == null) return "message";
2384
+ if (typeof envelope === "object" && !Array.isArray(envelope) && "version" in envelope && envelope.version === 1 && "presentation" in envelope && (envelope.presentation === "message" || envelope.presentation === "event")) return envelope.presentation;
2385
+ return "runtime";
2386
+ }
2387
+ function isRuntimeChatMessage(message) {
2388
+ return chatMessagePresentation(message) === "runtime";
2389
+ }
2390
+
1862
2391
  // Type guards
1863
2392
  /**
1864
2393
  * @deprecated use content in message
@@ -2079,6 +2608,9 @@ var ModelGatewayUsageChannelEnum;
2079
2608
  (function(ModelGatewayUsageChannelEnum) {
2080
2609
  ModelGatewayUsageChannelEnum["Xpert"] = "xpert";
2081
2610
  ModelGatewayUsageChannelEnum["ExternalApi"] = "external_api";
2611
+ /** Managed agent invocation usage, regardless of where the runtime executes. */ ModelGatewayUsageChannelEnum["AgentRuntime"] = "agent_runtime";
2612
+ /** User-launched CLI session usage, separate from managed invocations. */ ModelGatewayUsageChannelEnum["Cli"] = "cli";
2613
+ /** CLI child launched by an Assistant shell execution. */ ModelGatewayUsageChannelEnum["Shell"] = "shell";
2082
2614
  })(ModelGatewayUsageChannelEnum || (ModelGatewayUsageChannelEnum = {}));
2083
2615
  var MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING = "modelGatewayRequestsPerMinute";
2084
2616
  var DEFAULT_MODEL_GATEWAY_REQUESTS_PER_MINUTE = 60;
@@ -2302,7 +2834,7 @@ function workflowNodeIdentifier(node) {
2302
2834
  return node.title || node.key;
2303
2835
  }
2304
2836
 
2305
- function _define_property$9(obj, key, value) {
2837
+ function _define_property$a(obj, key, value) {
2306
2838
  if (key in obj) {
2307
2839
  Object.defineProperty(obj, key, {
2308
2840
  value: value,
@@ -2315,7 +2847,7 @@ function _define_property$9(obj, key, value) {
2315
2847
  }
2316
2848
  return obj;
2317
2849
  }
2318
- function _object_spread$8(target) {
2850
+ function _object_spread$9(target) {
2319
2851
  for(var i = 1; i < arguments.length; i++){
2320
2852
  var source = arguments[i] != null ? arguments[i] : {};
2321
2853
  var ownKeys = Object.keys(source);
@@ -2325,7 +2857,7 @@ function _object_spread$8(target) {
2325
2857
  }));
2326
2858
  }
2327
2859
  ownKeys.forEach(function(key) {
2328
- _define_property$9(target, key, source[key]);
2860
+ _define_property$a(target, key, source[key]);
2329
2861
  });
2330
2862
  }
2331
2863
  return target;
@@ -2376,7 +2908,7 @@ function getXpertAgentRecursionLimit(agentConfig) {
2376
2908
  return typeof (agentConfig === null || agentConfig === void 0 ? void 0 : agentConfig.recursionLimit) === "number" ? agentConfig.recursionLimit : DEFAULT_XPERT_AGENT_RECURSION_LIMIT;
2377
2909
  }
2378
2910
  function normalizeXpertAgentConfig(agentConfig) {
2379
- return _object_spread_props$6(_object_spread$8({}, agentConfig !== null && agentConfig !== void 0 ? agentConfig : {}), {
2911
+ return _object_spread_props$6(_object_spread$9({}, agentConfig !== null && agentConfig !== void 0 ? agentConfig : {}), {
2380
2912
  recursionLimit: getXpertAgentRecursionLimit(agentConfig)
2381
2913
  });
2382
2914
  }
@@ -2462,15 +2994,15 @@ var VariableOperations = [
2462
2994
  }
2463
2995
  ];
2464
2996
 
2465
- function _array_like_to_array$9(arr, len) {
2997
+ function _array_like_to_array$a(arr, len) {
2466
2998
  if (len == null || len > arr.length) len = arr.length;
2467
2999
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2468
3000
  return arr2;
2469
3001
  }
2470
- function _array_with_holes$6(arr) {
3002
+ function _array_with_holes$7(arr) {
2471
3003
  if (Array.isArray(arr)) return arr;
2472
3004
  }
2473
- function _define_property$8(obj, key, value) {
3005
+ function _define_property$9(obj, key, value) {
2474
3006
  if (key in obj) {
2475
3007
  Object.defineProperty(obj, key, {
2476
3008
  value: value,
@@ -2483,7 +3015,7 @@ function _define_property$8(obj, key, value) {
2483
3015
  }
2484
3016
  return obj;
2485
3017
  }
2486
- function _iterable_to_array_limit$4(arr, i) {
3018
+ function _iterable_to_array_limit$5(arr, i) {
2487
3019
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2488
3020
  if (_i == null) return;
2489
3021
  var _arr = [];
@@ -2507,10 +3039,10 @@ function _iterable_to_array_limit$4(arr, i) {
2507
3039
  }
2508
3040
  return _arr;
2509
3041
  }
2510
- function _non_iterable_rest$6() {
3042
+ function _non_iterable_rest$7() {
2511
3043
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2512
3044
  }
2513
- function _object_spread$7(target) {
3045
+ function _object_spread$8(target) {
2514
3046
  for(var i = 1; i < arguments.length; i++){
2515
3047
  var source = arguments[i] != null ? arguments[i] : {};
2516
3048
  var ownKeys = Object.keys(source);
@@ -2520,7 +3052,7 @@ function _object_spread$7(target) {
2520
3052
  }));
2521
3053
  }
2522
3054
  ownKeys.forEach(function(key) {
2523
- _define_property$8(target, key, source[key]);
3055
+ _define_property$9(target, key, source[key]);
2524
3056
  });
2525
3057
  }
2526
3058
  return target;
@@ -2544,16 +3076,16 @@ function _object_spread_props$5(target, source) {
2544
3076
  }
2545
3077
  return target;
2546
3078
  }
2547
- function _sliced_to_array$4(arr, i) {
2548
- return _array_with_holes$6(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$6();
3079
+ function _sliced_to_array$5(arr, i) {
3080
+ return _array_with_holes$7(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$7();
2549
3081
  }
2550
- function _unsupported_iterable_to_array$9(o, minLen) {
3082
+ function _unsupported_iterable_to_array$a(o, minLen) {
2551
3083
  if (!o) return;
2552
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
3084
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
2553
3085
  var n = Object.prototype.toString.call(o).slice(8, -1);
2554
3086
  if (n === "Object" && o.constructor) n = o.constructor.name;
2555
3087
  if (n === "Map" || n === "Set") return Array.from(n);
2556
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
3088
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
2557
3089
  }
2558
3090
  /**
2559
3091
  * @deprecated can use getCurrentTaskInput instead?
@@ -2635,10 +3167,10 @@ function configurableStoreNamespace(configurable) {
2635
3167
  * @param value
2636
3168
  * @returns
2637
3169
  */ function setStateVariable(state, varName, value) {
2638
- var _varName_split = _sliced_to_array$4(varName.split("."), 2), agentChannelName = _varName_split[0], variableName = _varName_split[1];
3170
+ var _varName_split = _sliced_to_array$5(varName.split("."), 2), agentChannelName = _varName_split[0], variableName = _varName_split[1];
2639
3171
  if (variableName) {
2640
3172
  var _state_agentChannelName;
2641
- state[agentChannelName] = _object_spread_props$5(_object_spread$7({}, (_state_agentChannelName = state[agentChannelName]) !== null && _state_agentChannelName !== void 0 ? _state_agentChannelName : {}), _define_property$8({}, variableName, value));
3173
+ state[agentChannelName] = _object_spread_props$5(_object_spread$8({}, (_state_agentChannelName = state[agentChannelName]) !== null && _state_agentChannelName !== void 0 ? _state_agentChannelName : {}), _define_property$9({}, variableName, value));
2642
3174
  } else {
2643
3175
  state[agentChannelName] = value;
2644
3176
  }
@@ -2729,7 +3261,7 @@ function getWorkflowTriggers(graph, from) {
2729
3261
  });
2730
3262
  }
2731
3263
 
2732
- function _define_property$7(obj, key, value) {
3264
+ function _define_property$8(obj, key, value) {
2733
3265
  if (key in obj) {
2734
3266
  Object.defineProperty(obj, key, {
2735
3267
  value: value,
@@ -2742,7 +3274,7 @@ function _define_property$7(obj, key, value) {
2742
3274
  }
2743
3275
  return obj;
2744
3276
  }
2745
- function _object_spread$6(target) {
3277
+ function _object_spread$7(target) {
2746
3278
  for(var i = 1; i < arguments.length; i++){
2747
3279
  var source = arguments[i] != null ? arguments[i] : {};
2748
3280
  var ownKeys = Object.keys(source);
@@ -2752,7 +3284,7 @@ function _object_spread$6(target) {
2752
3284
  }));
2753
3285
  }
2754
3286
  ownKeys.forEach(function(key) {
2755
- _define_property$7(target, key, source[key]);
3287
+ _define_property$8(target, key, source[key]);
2756
3288
  });
2757
3289
  }
2758
3290
  return target;
@@ -2858,11 +3390,11 @@ var KNOWLEDGEBASE_FAQ_RETRIEVAL_MODES = [
2858
3390
  return candidate === requestedMode;
2859
3391
  }) ? requestedMode : DEFAULT_KNOWLEDGEBASE_FAQ_RECALL.mode;
2860
3392
  var _recall_fusion2, _recall_fusion_mode, _recall_fusion_weights;
2861
- return _object_spread_props$4(_object_spread$6({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL, recall !== null && recall !== void 0 ? recall : {}), {
3393
+ return _object_spread_props$4(_object_spread$7({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL, recall !== null && recall !== void 0 ? recall : {}), {
2862
3394
  mode: mode,
2863
- fusion: _object_spread_props$4(_object_spread$6({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL.fusion, (_recall_fusion2 = recall === null || recall === void 0 ? void 0 : recall.fusion) !== null && _recall_fusion2 !== void 0 ? _recall_fusion2 : {}), {
3395
+ fusion: _object_spread_props$4(_object_spread$7({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL.fusion, (_recall_fusion2 = recall === null || recall === void 0 ? void 0 : recall.fusion) !== null && _recall_fusion2 !== void 0 ? _recall_fusion2 : {}), {
2864
3396
  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,
2865
- weights: _object_spread_props$4(_object_spread$6({}, 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 : {}), {
3397
+ weights: _object_spread_props$4(_object_spread$7({}, 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 : {}), {
2866
3398
  graph: 0
2867
3399
  })
2868
3400
  })
@@ -2910,13 +3442,13 @@ var _retrieval_recall_contentScope;
2910
3442
  });
2911
3443
  }
2912
3444
 
2913
- function _array_like_to_array$8(arr, len) {
3445
+ function _array_like_to_array$9(arr, len) {
2914
3446
  if (len == null || len > arr.length) len = arr.length;
2915
3447
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2916
3448
  return arr2;
2917
3449
  }
2918
3450
  function _array_without_holes$3(arr) {
2919
- if (Array.isArray(arr)) return _array_like_to_array$8(arr);
3451
+ if (Array.isArray(arr)) return _array_like_to_array$9(arr);
2920
3452
  }
2921
3453
  function _iterable_to_array$5(iter) {
2922
3454
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -2925,15 +3457,15 @@ function _non_iterable_spread$3() {
2925
3457
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2926
3458
  }
2927
3459
  function _to_consumable_array$3(arr) {
2928
- return _array_without_holes$3(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$3();
3460
+ return _array_without_holes$3(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$3();
2929
3461
  }
2930
- function _unsupported_iterable_to_array$8(o, minLen) {
3462
+ function _unsupported_iterable_to_array$9(o, minLen) {
2931
3463
  if (!o) return;
2932
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
3464
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
2933
3465
  var n = Object.prototype.toString.call(o).slice(8, -1);
2934
3466
  if (n === "Object" && o.constructor) n = o.constructor.name;
2935
3467
  if (n === "Map" || n === "Set") return Array.from(n);
2936
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
3468
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
2937
3469
  }
2938
3470
  var BUILTIN_KNOWLEDGE_PARSER = "builtin";
2939
3471
  /** Only formats with a real builtin reader; unknown binary formats are not advertised as text. */ var BUILTIN_KNOWLEDGE_FILE_TYPES = [
@@ -3023,15 +3555,15 @@ function knowledgebaseParserSelection(config, documentType) {
3023
3555
  })));
3024
3556
  }
3025
3557
 
3026
- function _array_like_to_array$7(arr, len) {
3558
+ function _array_like_to_array$8(arr, len) {
3027
3559
  if (len == null || len > arr.length) len = arr.length;
3028
3560
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3029
3561
  return arr2;
3030
3562
  }
3031
3563
  function _array_without_holes$2(arr) {
3032
- if (Array.isArray(arr)) return _array_like_to_array$7(arr);
3564
+ if (Array.isArray(arr)) return _array_like_to_array$8(arr);
3033
3565
  }
3034
- function _define_property$6(obj, key, value) {
3566
+ function _define_property$7(obj, key, value) {
3035
3567
  if (key in obj) {
3036
3568
  Object.defineProperty(obj, key, {
3037
3569
  value: value,
@@ -3050,7 +3582,7 @@ function _iterable_to_array$4(iter) {
3050
3582
  function _non_iterable_spread$2() {
3051
3583
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3052
3584
  }
3053
- function _object_spread$5(target) {
3585
+ function _object_spread$6(target) {
3054
3586
  for(var i = 1; i < arguments.length; i++){
3055
3587
  var source = arguments[i] != null ? arguments[i] : {};
3056
3588
  var ownKeys = Object.keys(source);
@@ -3060,30 +3592,30 @@ function _object_spread$5(target) {
3060
3592
  }));
3061
3593
  }
3062
3594
  ownKeys.forEach(function(key) {
3063
- _define_property$6(target, key, source[key]);
3595
+ _define_property$7(target, key, source[key]);
3064
3596
  });
3065
3597
  }
3066
3598
  return target;
3067
3599
  }
3068
3600
  function _to_consumable_array$2(arr) {
3069
- return _array_without_holes$2(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$2();
3601
+ return _array_without_holes$2(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$2();
3070
3602
  }
3071
- function _unsupported_iterable_to_array$7(o, minLen) {
3603
+ function _unsupported_iterable_to_array$8(o, minLen) {
3072
3604
  if (!o) return;
3073
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
3605
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
3074
3606
  var n = Object.prototype.toString.call(o).slice(8, -1);
3075
3607
  if (n === "Object" && o.constructor) n = o.constructor.name;
3076
3608
  if (n === "Map" || n === "Set") return Array.from(n);
3077
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
3609
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
3078
3610
  }
3079
3611
  /** Only copy configured defaults; do not turn built-in defaults into document overrides. */ function knowledgebaseDocumentParserDefaults(config, documentType) {
3080
3612
  if (!config) return {};
3081
- return _object_spread$5({}, config.spreadsheet ? {
3082
- spreadsheet: _object_spread$5({}, config.spreadsheet)
3613
+ return _object_spread$6({}, config.spreadsheet ? {
3614
+ spreadsheet: _object_spread$6({}, config.spreadsheet)
3083
3615
  } : {}, config.tableMetadataRequirements !== undefined ? {
3084
3616
  tableMetadataRequirements: config.tableMetadataRequirements
3085
3617
  } : {}, config.questionGeneration ? {
3086
- questionGeneration: _object_spread$5({}, config.questionGeneration)
3618
+ questionGeneration: _object_spread$6({}, config.questionGeneration)
3087
3619
  } : {}, config.chunkLanguageHint !== undefined ? {
3088
3620
  chunkLanguageHint: config.chunkLanguageHint
3089
3621
  } : {}, config.maxChunkTokens !== undefined ? {
@@ -3097,7 +3629,7 @@ function _unsupported_iterable_to_array$7(o, minLen) {
3097
3629
  } : {}, config.textSplitterType ? {
3098
3630
  textSplitterType: config.textSplitterType
3099
3631
  } : {}, config.textSplitter || config.chunkSize != null || config.chunkOverlap != null ? {
3100
- textSplitter: _object_spread$5({}, config.chunkSize != null ? {
3632
+ textSplitter: _object_spread$6({}, config.chunkSize != null ? {
3101
3633
  chunkSize: config.chunkSize
3102
3634
  } : {}, config.chunkOverlap != null ? {
3103
3635
  chunkOverlap: config.chunkOverlap
@@ -3109,7 +3641,7 @@ function _unsupported_iterable_to_array$7(o, minLen) {
3109
3641
  } : {}, config.imageUnderstandingType ? {
3110
3642
  imageUnderstandingType: config.imageUnderstandingType
3111
3643
  } : {}, config.imageUnderstanding ? {
3112
- imageUnderstanding: _object_spread$5({}, config.imageUnderstanding)
3644
+ imageUnderstanding: _object_spread$6({}, config.imageUnderstanding)
3113
3645
  } : {}, knowledgebaseParserSelection(config, documentType !== null && documentType !== void 0 ? documentType : ""));
3114
3646
  }
3115
3647
  /** Arrays are the canonical ordered format; retain the plugin's legacy comma syntax. */ function decodeKnowledgeSeparators(value) {
@@ -3174,7 +3706,7 @@ function genPipelineKnowledgeBaseKey() {
3174
3706
  return letterStartSUID("KnowledgeBase_");
3175
3707
  }
3176
3708
 
3177
- function _define_property$5(obj, key, value) {
3709
+ function _define_property$6(obj, key, value) {
3178
3710
  if (key in obj) {
3179
3711
  Object.defineProperty(obj, key, {
3180
3712
  value: value,
@@ -3187,7 +3719,7 @@ function _define_property$5(obj, key, value) {
3187
3719
  }
3188
3720
  return obj;
3189
3721
  }
3190
- function _object_spread$4(target) {
3722
+ function _object_spread$5(target) {
3191
3723
  for(var i = 1; i < arguments.length; i++){
3192
3724
  var source = arguments[i] != null ? arguments[i] : {};
3193
3725
  var ownKeys = Object.keys(source);
@@ -3197,7 +3729,7 @@ function _object_spread$4(target) {
3197
3729
  }));
3198
3730
  }
3199
3731
  ownKeys.forEach(function(key) {
3200
- _define_property$5(target, key, source[key]);
3732
+ _define_property$6(target, key, source[key]);
3201
3733
  });
3202
3734
  }
3203
3735
  return target;
@@ -3217,7 +3749,7 @@ function _object_spread$4(target) {
3217
3749
  * @deprecated use DocumentSourceProviderCategoryEnum local file type instead
3218
3750
  */ DocumentTypeEnum["FILE"] = "file";
3219
3751
  })(DocumentTypeEnum || (DocumentTypeEnum = {}));
3220
- var KDocumentSourceType = _object_spread$4({}, DocumentSourceProviderCategoryEnum, DocumentTypeEnum);
3752
+ var KDocumentSourceType = _object_spread$5({}, DocumentSourceProviderCategoryEnum, DocumentTypeEnum);
3221
3753
  /**
3222
3754
  * Document type category, determine how to process the document.
3223
3755
  */ var KBDocumentCategoryEnum;
@@ -3831,6 +4363,23 @@ var PLUGIN_MARKETPLACE_CATEGORIES = [
3831
4363
  "sales",
3832
4364
  "other"
3833
4365
  ];
4366
+ /**
4367
+ * Technical subcategories used by the plugin marketplace.
4368
+ * marketplace.category describes the business-facing group; marketplace.subcategory describes the technical type.
4369
+ */ var PLUGIN_MARKETPLACE_SUBCATEGORIES = [
4370
+ "connector",
4371
+ "middleware",
4372
+ "integration",
4373
+ "database",
4374
+ "tools",
4375
+ "model",
4376
+ "vlm",
4377
+ "vector-store",
4378
+ "doc-source",
4379
+ "datasource",
4380
+ "agent",
4381
+ "set"
4382
+ ];
3834
4383
 
3835
4384
  var XpertMarketplaceBusinessCategories = PLUGIN_MARKETPLACE_CATEGORIES;
3836
4385
  var XpertMarketplaceCollaborationModes = [
@@ -4001,15 +4550,15 @@ function buildXpertMarketplaceProfileSnapshot(input, draft) {
4001
4550
  }
4002
4551
 
4003
4552
  // Helpers
4004
- function _array_like_to_array$6(arr, len) {
4553
+ function _array_like_to_array$7(arr, len) {
4005
4554
  if (len == null || len > arr.length) len = arr.length;
4006
4555
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4007
4556
  return arr2;
4008
4557
  }
4009
4558
  function _array_without_holes$1(arr) {
4010
- if (Array.isArray(arr)) return _array_like_to_array$6(arr);
4559
+ if (Array.isArray(arr)) return _array_like_to_array$7(arr);
4011
4560
  }
4012
- function _define_property$4(obj, key, value) {
4561
+ function _define_property$5(obj, key, value) {
4013
4562
  if (key in obj) {
4014
4563
  Object.defineProperty(obj, key, {
4015
4564
  value: value,
@@ -4028,7 +4577,7 @@ function _iterable_to_array$3(iter) {
4028
4577
  function _non_iterable_spread$1() {
4029
4578
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4030
4579
  }
4031
- function _object_spread$3(target) {
4580
+ function _object_spread$4(target) {
4032
4581
  for(var i = 1; i < arguments.length; i++){
4033
4582
  var source = arguments[i] != null ? arguments[i] : {};
4034
4583
  var ownKeys = Object.keys(source);
@@ -4038,7 +4587,7 @@ function _object_spread$3(target) {
4038
4587
  }));
4039
4588
  }
4040
4589
  ownKeys.forEach(function(key) {
4041
- _define_property$4(target, key, source[key]);
4590
+ _define_property$5(target, key, source[key]);
4042
4591
  });
4043
4592
  }
4044
4593
  return target;
@@ -4090,15 +4639,15 @@ function _object_without_properties_loose$1(source, excluded) {
4090
4639
  return target;
4091
4640
  }
4092
4641
  function _to_consumable_array$1(arr) {
4093
- return _array_without_holes$1(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$1();
4642
+ return _array_without_holes$1(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$1();
4094
4643
  }
4095
- function _unsupported_iterable_to_array$6(o, minLen) {
4644
+ function _unsupported_iterable_to_array$7(o, minLen) {
4096
4645
  if (!o) return;
4097
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
4646
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
4098
4647
  var n = Object.prototype.toString.call(o).slice(8, -1);
4099
4648
  if (n === "Object" && o.constructor) n = o.constructor.name;
4100
4649
  if (n === "Map" || n === "Set") return Array.from(n);
4101
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
4650
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
4102
4651
  }
4103
4652
  function omitXpertRelations(xpert) {
4104
4653
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -4137,7 +4686,7 @@ function resolveRuntimeXpert(xpert, isDraft) {
4137
4686
  var graph = resolveDraftRuntimeGraph(xpert, draft);
4138
4687
  var agent = resolveDraftPrimaryAgent(xpert, draft, graph);
4139
4688
  var _draft_team5, _draft_team_workspaceId, _draft_team_agentConfig, _draft_team_commandProfile, _draft_team_features, _draft_team_options;
4140
- return _object_spread_props$3(_object_spread$3({}, xpert, (_draft_team5 = draft.team) !== null && _draft_team5 !== void 0 ? _draft_team5 : {}), {
4689
+ return _object_spread_props$3(_object_spread$4({}, xpert, (_draft_team5 = draft.team) !== null && _draft_team5 !== void 0 ? _draft_team5 : {}), {
4141
4690
  id: xpert.id,
4142
4691
  tenantId: xpert.tenantId,
4143
4692
  organizationId: xpert.organizationId,
@@ -4421,9 +4970,9 @@ function replaceAgentInDraft(draft, sourceKey, agent, options) {
4421
4970
  if (node.type === "agent" && node.key === sourceKey) {
4422
4971
  replacedNode = true;
4423
4972
  var _node_entity;
4424
- return _object_spread_props$3(_object_spread$3({}, node), {
4973
+ return _object_spread_props$3(_object_spread$4({}, node), {
4425
4974
  key: targetKey,
4426
- entity: _object_spread_props$3(_object_spread$3({}, (_node_entity = node.entity) !== null && _node_entity !== void 0 ? _node_entity : {}, agent), {
4975
+ entity: _object_spread_props$3(_object_spread$4({}, (_node_entity = node.entity) !== null && _node_entity !== void 0 ? _node_entity : {}, agent), {
4427
4976
  key: targetKey
4428
4977
  })
4429
4978
  });
@@ -4439,17 +4988,17 @@ function replaceAgentInDraft(draft, sourceKey, agent, options) {
4439
4988
  if (from === connection.from && to === connection.to) {
4440
4989
  return connection;
4441
4990
  }
4442
- return _object_spread_props$3(_object_spread$3({}, connection), {
4991
+ return _object_spread_props$3(_object_spread$4({}, connection), {
4443
4992
  from: from,
4444
4993
  to: to,
4445
4994
  key: "".concat(from, "/").concat(to)
4446
4995
  });
4447
4996
  });
4448
- return _object_spread_props$3(_object_spread$3({}, draft), {
4449
- team: draft.team ? _object_spread_props$3(_object_spread$3({}, draft.team), {
4450
- agent: draft.team.agent ? _object_spread_props$3(_object_spread$3({}, draft.team.agent, agent), {
4997
+ return _object_spread_props$3(_object_spread$4({}, draft), {
4998
+ team: draft.team ? _object_spread_props$3(_object_spread$4({}, draft.team), {
4999
+ agent: draft.team.agent ? _object_spread_props$3(_object_spread$4({}, draft.team.agent, agent), {
4451
5000
  key: targetKey
4452
- }) : _object_spread_props$3(_object_spread$3({}, agent), {
5001
+ }) : _object_spread_props$3(_object_spread$4({}, agent), {
4453
5002
  key: targetKey
4454
5003
  })
4455
5004
  }) : draft.team,
@@ -4531,11 +5080,12 @@ var MCPServerType;
4531
5080
  MCPServerType["CODE"] = "code";
4532
5081
  MCPServerType["HTTP"] = "http";
4533
5082
  })(MCPServerType || (MCPServerType = {}));
4534
- var MCP_CONSUMER_AUTH_TYPES = [
5083
+ /** Supported authentication modes for a host-consumed MCP server. */ var MCP_CONSUMER_AUTH_TYPES = [
4535
5084
  "none",
4536
5085
  "manual_header",
4537
5086
  "api_key",
4538
- "oauth"
5087
+ "oauth",
5088
+ "connector"
4539
5089
  ];
4540
5090
  var MCP_APP_RESOURCE_MIME_TYPE = "text/html;profile=mcp-app";
4541
5091
 
@@ -4587,6 +5137,11 @@ var XpertProjectAutomationRunStatusEnum;
4587
5137
  XpertProjectAutomationRunStatusEnum["CANCELLED"] = "cancelled";
4588
5138
  })(XpertProjectAutomationRunStatusEnum || (XpertProjectAutomationRunStatusEnum = {}));
4589
5139
 
5140
+ var GENERAL_PROJECT_TYPE = {
5141
+ applicationKey: "platform",
5142
+ projectTypeKey: "general"
5143
+ };
5144
+
4590
5145
  /**
4591
5146
  * Build a hierarchical tree structure from a flat list of DocumentInterface objects,
4592
5147
  * preserving explicit chunkIndex order whenever it is available.
@@ -4594,7 +5149,7 @@ var XpertProjectAutomationRunStatusEnum;
4594
5149
  * @template Metadata - Type of metadata, defaults to IDocChunkMetadata
4595
5150
  * @param documents - A flat array of DocumentInterface objects
4596
5151
  * @returns the hierarchical tree (root-level DocumentInterface[])
4597
- */ function _define_property$3(obj, key, value) {
5152
+ */ function _define_property$4(obj, key, value) {
4598
5153
  if (key in obj) {
4599
5154
  Object.defineProperty(obj, key, {
4600
5155
  value: value,
@@ -4607,7 +5162,7 @@ var XpertProjectAutomationRunStatusEnum;
4607
5162
  }
4608
5163
  return obj;
4609
5164
  }
4610
- function _object_spread$2(target) {
5165
+ function _object_spread$3(target) {
4611
5166
  for(var i = 1; i < arguments.length; i++){
4612
5167
  var source = arguments[i] != null ? arguments[i] : {};
4613
5168
  var ownKeys = Object.keys(source);
@@ -4617,7 +5172,7 @@ function _object_spread$2(target) {
4617
5172
  }));
4618
5173
  }
4619
5174
  ownKeys.forEach(function(key) {
4620
- _define_property$3(target, key, source[key]);
5175
+ _define_property$4(target, key, source[key]);
4621
5176
  });
4622
5177
  }
4623
5178
  return target;
@@ -4650,8 +5205,8 @@ function buildChunkTree(documents) {
4650
5205
  documents.forEach(function(doc, index) {
4651
5206
  var chunkId = getChunkNodeId(doc);
4652
5207
  if (chunkId) {
4653
- map.set(chunkId, _object_spread_props$2(_object_spread$2({}, doc), {
4654
- metadata: _object_spread_props$2(_object_spread$2({}, doc.metadata), {
5208
+ map.set(chunkId, _object_spread_props$2(_object_spread$3({}, doc), {
5209
+ metadata: _object_spread_props$2(_object_spread$3({}, doc.metadata), {
4655
5210
  chunkId: chunkId,
4656
5211
  children: []
4657
5212
  })
@@ -4825,30 +5380,30 @@ var KnowledgeGraphIndexJobStatus;
4825
5380
  var KNOWLEDGE_GRAPH_DOCUMENT_STATUS_BATCH_SIZE = 100;
4826
5381
 
4827
5382
  // Skill types
4828
- function _array_like_to_array$5(arr, len) {
5383
+ function _array_like_to_array$6(arr, len) {
4829
5384
  if (len == null || len > arr.length) len = arr.length;
4830
5385
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4831
5386
  return arr2;
4832
5387
  }
4833
- function _array_with_holes$5(arr) {
5388
+ function _array_with_holes$6(arr) {
4834
5389
  if (Array.isArray(arr)) return arr;
4835
5390
  }
4836
5391
  function _iterable_to_array$2(iter) {
4837
5392
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
4838
5393
  }
4839
- function _non_iterable_rest$5() {
5394
+ function _non_iterable_rest$6() {
4840
5395
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4841
5396
  }
4842
5397
  function _to_array$1(arr) {
4843
- return _array_with_holes$5(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_rest$5();
5398
+ return _array_with_holes$6(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_rest$6();
4844
5399
  }
4845
- function _unsupported_iterable_to_array$5(o, minLen) {
5400
+ function _unsupported_iterable_to_array$6(o, minLen) {
4846
5401
  if (!o) return;
4847
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
5402
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
4848
5403
  var n = Object.prototype.toString.call(o).slice(8, -1);
4849
5404
  if (n === "Object" && o.constructor) n = o.constructor.name;
4850
5405
  if (n === "Map" || n === "Set") return Array.from(n);
4851
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
5406
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
4852
5407
  }
4853
5408
  var RUNTIME_SKILL_CAPABILITY_ID_PREFIX = "runtime-skill/v1";
4854
5409
  function createRuntimeSkillCapabilityId(source) {
@@ -4882,15 +5437,15 @@ function genXpertSkillKey() {
4882
5437
  return letterStartSUID("Skill_");
4883
5438
  }
4884
5439
 
4885
- function _array_like_to_array$4(arr, len) {
5440
+ function _array_like_to_array$5(arr, len) {
4886
5441
  if (len == null || len > arr.length) len = arr.length;
4887
5442
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4888
5443
  return arr2;
4889
5444
  }
4890
- function _array_with_holes$4(arr) {
5445
+ function _array_with_holes$5(arr) {
4891
5446
  if (Array.isArray(arr)) return arr;
4892
5447
  }
4893
- function _iterable_to_array_limit$3(arr, i) {
5448
+ function _iterable_to_array_limit$4(arr, i) {
4894
5449
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
4895
5450
  if (_i == null) return;
4896
5451
  var _arr = [];
@@ -4914,19 +5469,19 @@ function _iterable_to_array_limit$3(arr, i) {
4914
5469
  }
4915
5470
  return _arr;
4916
5471
  }
4917
- function _non_iterable_rest$4() {
5472
+ function _non_iterable_rest$5() {
4918
5473
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4919
5474
  }
4920
- function _sliced_to_array$3(arr, i) {
4921
- return _array_with_holes$4(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
5475
+ function _sliced_to_array$4(arr, i) {
5476
+ return _array_with_holes$5(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$5();
4922
5477
  }
4923
- function _unsupported_iterable_to_array$4(o, minLen) {
5478
+ function _unsupported_iterable_to_array$5(o, minLen) {
4924
5479
  if (!o) return;
4925
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
5480
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
4926
5481
  var n = Object.prototype.toString.call(o).slice(8, -1);
4927
5482
  if (n === "Object" && o.constructor) n = o.constructor.name;
4928
5483
  if (n === "Map" || n === "Set") return Array.from(n);
4929
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
5484
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
4930
5485
  }
4931
5486
  var IGNORED_BOOLEAN_FLAGS = new Set([
4932
5487
  "-y",
@@ -5141,7 +5696,7 @@ function parseGithubSource(source) {
5141
5696
  return parseGithubUrl(raw);
5142
5697
  }
5143
5698
  if (/^[^/\s]+\/[^/\s]+$/.test(raw)) {
5144
- var _raw_split = _sliced_to_array$3(raw.split("/"), 2), owner = _raw_split[0], repoSegment = _raw_split[1];
5699
+ var _raw_split = _sliced_to_array$4(raw.split("/"), 2), owner = _raw_split[0], repoSegment = _raw_split[1];
5145
5700
  var repo = repoSegment.replace(/\.git$/i, "");
5146
5701
  if (!repo) {
5147
5702
  throw new Error("GitHub repository source must include owner and repository name");
@@ -5193,7 +5748,15 @@ function isLocalPath(value) {
5193
5748
  return value.startsWith(".") || value.startsWith("/") || value.startsWith("~") || /^file:/i.test(value) || /^[a-z]:[\\/]/i.test(value);
5194
5749
  }
5195
5750
 
5196
- function _define_property$2(obj, key, value) {
5751
+ /** Boundary validation for persisted and API-provided scenario lists. */ function isPromptWorkflowScenarios(value) {
5752
+ return Array.isArray(value) && value.length <= 20 && value.every(function(item) {
5753
+ return !!item && typeof item === "object" && "id" in item && typeof item.id === "string" && !!item.id.trim() && item.id.length <= 100 && "label" in item && typeof item.label === "string" && !!item.label.trim() && item.label.length <= 120 && "args" in item && typeof item.args === "string" && !!item.args.trim() && item.args.length <= 20000;
5754
+ }) && new Set(value.map(function(item) {
5755
+ return item.id;
5756
+ })).size === value.length;
5757
+ }
5758
+
5759
+ function _define_property$3(obj, key, value) {
5197
5760
  if (key in obj) {
5198
5761
  Object.defineProperty(obj, key, {
5199
5762
  value: value,
@@ -5206,7 +5769,7 @@ function _define_property$2(obj, key, value) {
5206
5769
  }
5207
5770
  return obj;
5208
5771
  }
5209
- function _object_spread$1(target) {
5772
+ function _object_spread$2(target) {
5210
5773
  for(var i = 1; i < arguments.length; i++){
5211
5774
  var source = arguments[i] != null ? arguments[i] : {};
5212
5775
  var ownKeys = Object.keys(source);
@@ -5216,7 +5779,7 @@ function _object_spread$1(target) {
5216
5779
  }));
5217
5780
  }
5218
5781
  ownKeys.forEach(function(key) {
5219
- _define_property$2(target, key, source[key]);
5782
+ _define_property$3(target, key, source[key]);
5220
5783
  });
5221
5784
  }
5222
5785
  return target;
@@ -5242,6 +5805,7 @@ function _object_spread_props$1(target, source) {
5242
5805
  }
5243
5806
  var LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME = "SandboxCompressionMiddleware";
5244
5807
  var CONTEXT_COMPRESSION_MIDDLEWARE_NAME = "ContextCompressionMiddleware";
5808
+ var SKILLS_MIDDLEWARE_NAME = "skillsMiddleware";
5245
5809
  function isMiddlewareToolEnabled(config) {
5246
5810
  if (typeof config === "boolean") {
5247
5811
  return config;
@@ -5270,8 +5834,8 @@ function normalizeMiddlewareNode(node) {
5270
5834
  if (provider === entity.provider) {
5271
5835
  return node;
5272
5836
  }
5273
- return _object_spread_props$1(_object_spread$1({}, node), {
5274
- entity: _object_spread_props$1(_object_spread$1({}, entity), {
5837
+ return _object_spread_props$1(_object_spread$2({}, node), {
5838
+ entity: _object_spread_props$1(_object_spread$2({}, entity), {
5275
5839
  provider: provider
5276
5840
  })
5277
5841
  });
@@ -5321,18 +5885,18 @@ function isContextCompressionComponentData(value) {
5321
5885
  "job"
5322
5886
  ];
5323
5887
 
5324
- function _array_like_to_array$3(arr, len) {
5888
+ function _array_like_to_array$4(arr, len) {
5325
5889
  if (len == null || len > arr.length) len = arr.length;
5326
5890
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5327
5891
  return arr2;
5328
5892
  }
5329
- function _array_with_holes$3(arr) {
5893
+ function _array_with_holes$4(arr) {
5330
5894
  if (Array.isArray(arr)) return arr;
5331
5895
  }
5332
5896
  function _array_without_holes(arr) {
5333
- if (Array.isArray(arr)) return _array_like_to_array$3(arr);
5897
+ if (Array.isArray(arr)) return _array_like_to_array$4(arr);
5334
5898
  }
5335
- function _define_property$1(obj, key, value) {
5899
+ function _define_property$2(obj, key, value) {
5336
5900
  if (key in obj) {
5337
5901
  Object.defineProperty(obj, key, {
5338
5902
  value: value,
@@ -5348,7 +5912,7 @@ function _define_property$1(obj, key, value) {
5348
5912
  function _iterable_to_array$1(iter) {
5349
5913
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
5350
5914
  }
5351
- function _iterable_to_array_limit$2(arr, i) {
5915
+ function _iterable_to_array_limit$3(arr, i) {
5352
5916
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
5353
5917
  if (_i == null) return;
5354
5918
  var _arr = [];
@@ -5372,13 +5936,13 @@ function _iterable_to_array_limit$2(arr, i) {
5372
5936
  }
5373
5937
  return _arr;
5374
5938
  }
5375
- function _non_iterable_rest$3() {
5939
+ function _non_iterable_rest$4() {
5376
5940
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5377
5941
  }
5378
5942
  function _non_iterable_spread() {
5379
5943
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5380
5944
  }
5381
- function _object_spread(target) {
5945
+ function _object_spread$1(target) {
5382
5946
  for(var i = 1; i < arguments.length; i++){
5383
5947
  var source = arguments[i] != null ? arguments[i] : {};
5384
5948
  var ownKeys = Object.keys(source);
@@ -5388,7 +5952,7 @@ function _object_spread(target) {
5388
5952
  }));
5389
5953
  }
5390
5954
  ownKeys.forEach(function(key) {
5391
- _define_property$1(target, key, source[key]);
5955
+ _define_property$2(target, key, source[key]);
5392
5956
  });
5393
5957
  }
5394
5958
  return target;
@@ -5439,19 +6003,19 @@ function _object_without_properties_loose(source, excluded) {
5439
6003
  }
5440
6004
  return target;
5441
6005
  }
5442
- function _sliced_to_array$2(arr, i) {
5443
- return _array_with_holes$3(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
6006
+ function _sliced_to_array$3(arr, i) {
6007
+ return _array_with_holes$4(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
5444
6008
  }
5445
6009
  function _to_consumable_array(arr) {
5446
- return _array_without_holes(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread();
6010
+ return _array_without_holes(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread();
5447
6011
  }
5448
- function _unsupported_iterable_to_array$3(o, minLen) {
6012
+ function _unsupported_iterable_to_array$4(o, minLen) {
5449
6013
  if (!o) return;
5450
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
6014
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
5451
6015
  var n = Object.prototype.toString.call(o).slice(8, -1);
5452
6016
  if (n === "Object" && o.constructor) n = o.constructor.name;
5453
6017
  if (n === "Map" || n === "Set") return Array.from(n);
5454
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
6018
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
5455
6019
  }
5456
6020
  function isNil(value) {
5457
6021
  return value === null || value === undefined;
@@ -5522,7 +6086,7 @@ function normalizeIncomingContent(content, context) {
5522
6086
  if (typeof content !== "string") {
5523
6087
  return content;
5524
6088
  }
5525
- return _object_spread({
6089
+ return _object_spread$1({
5526
6090
  type: "text",
5527
6091
  text: content
5528
6092
  }, context.streamId ? {
@@ -5568,6 +6132,7 @@ function getContentChunkSeparator(previous, nextText, joinHint) {
5568
6132
  return "";
5569
6133
  }
5570
6134
  function stringifySingle(content) {
6135
+ if (isFileActivityContent(content) || isResourceCardContent(content)) return "";
5571
6136
  if (content.type === "text") {
5572
6137
  return content.text;
5573
6138
  }
@@ -5586,7 +6151,7 @@ function filterText(content) {
5586
6151
  return "";
5587
6152
  }
5588
6153
  function mergeTextChunkForDisplay(previous, incoming) {
5589
- return _object_spread(_object_spread_props(_object_spread({}, previous), {
6154
+ return _object_spread$1(_object_spread_props(_object_spread$1({}, previous), {
5590
6155
  text: "".concat(previous.text).concat(incoming.text)
5591
6156
  }), !previous.id && incoming.id ? {
5592
6157
  id: incoming.id
@@ -5598,7 +6163,7 @@ function mergeTextChunkForDisplay(previous, incoming) {
5598
6163
  }
5599
6164
  function stripAutoDisplaySeparator(incoming, previousOriginal) {
5600
6165
  if ((previousOriginal === null || previousOriginal === void 0 ? void 0 : previousOriginal.type) === "component" && incoming.text.startsWith("\n\n")) {
5601
- return _object_spread_props(_object_spread({}, incoming), {
6166
+ return _object_spread_props(_object_spread$1({}, incoming), {
5602
6167
  text: incoming.text.slice(1)
5603
6168
  });
5604
6169
  }
@@ -5608,21 +6173,21 @@ function mergeComponentData(previous, incoming) {
5608
6173
  var _previous_data, _incoming_data;
5609
6174
  var _incoming_data1;
5610
6175
  var mergedIncomingData = Object.entries((_incoming_data1 = incoming.data) !== null && _incoming_data1 !== void 0 ? _incoming_data1 : {}).reduce(function(acc, param) {
5611
- var _param = _sliced_to_array$2(param, 2), key = _param[0], value = _param[1];
6176
+ var _param = _sliced_to_array$3(param, 2), key = _param[0], value = _param[1];
5612
6177
  if (!isNil(value)) {
5613
6178
  acc[key] = value;
5614
6179
  }
5615
6180
  return acc;
5616
6181
  }, {});
5617
6182
  var _previous_data1;
5618
- return _object_spread_props(_object_spread({}, previous, incoming), {
5619
- data: _object_spread_props(_object_spread({}, (_previous_data1 = previous.data) !== null && _previous_data1 !== void 0 ? _previous_data1 : {}, mergedIncomingData), {
6183
+ return _object_spread_props(_object_spread$1({}, previous, incoming), {
6184
+ data: _object_spread_props(_object_spread$1({}, (_previous_data1 = previous.data) !== null && _previous_data1 !== void 0 ? _previous_data1 : {}, mergedIncomingData), {
5620
6185
  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)
5621
6186
  })
5622
6187
  });
5623
6188
  }
5624
6189
  function inferMessageAppendContext(content, fallbackSource) {
5625
- return _object_spread({
6190
+ return _object_spread$1({
5626
6191
  source: fallbackSource !== null && fallbackSource !== void 0 ? fallbackSource : inferContentSource(content)
5627
6192
  }, typeof content !== "string" && (content === null || content === void 0 ? void 0 : content.id) ? {
5628
6193
  streamId: String(content.id)
@@ -5630,10 +6195,10 @@ function inferMessageAppendContext(content, fallbackSource) {
5630
6195
  }
5631
6196
  function resolveMessageAppendContext(options) {
5632
6197
  var inferredContext = inferMessageAppendContext(options.incoming, options.fallbackSource);
5633
- var appendContext = typeof options.incoming === "string" && !inferredContext.streamId && options.fallbackStreamId ? _object_spread_props(_object_spread({}, inferredContext), {
6198
+ var appendContext = typeof options.incoming === "string" && !inferredContext.streamId && options.fallbackStreamId ? _object_spread_props(_object_spread$1({}, inferredContext), {
5634
6199
  streamId: options.fallbackStreamId
5635
6200
  }) : inferredContext;
5636
- var messageContext = shouldJoinWithoutSeparator(options.previous, appendContext) ? _object_spread_props(_object_spread({}, appendContext), {
6201
+ var messageContext = shouldJoinWithoutSeparator(options.previous, appendContext) ? _object_spread_props(_object_spread$1({}, appendContext), {
5637
6202
  joinHint: "none"
5638
6203
  }) : appendContext;
5639
6204
  return {
@@ -5654,10 +6219,10 @@ function resolveMessageAppendContext(options) {
5654
6219
  var previous = initial;
5655
6220
  return {
5656
6221
  resolve: function resolve(options) {
5657
- var resolved = resolveMessageAppendContext(_object_spread_props(_object_spread({}, options), {
6222
+ var resolved = resolveMessageAppendContext(_object_spread_props(_object_spread$1({}, options), {
5658
6223
  previous: previous
5659
6224
  }));
5660
- previous = resolved.appendContext;
6225
+ if (!isFileActivityContent(options.incoming) && !isResourceCardContent(options.incoming)) previous = resolved.appendContext;
5661
6226
  return resolved;
5662
6227
  },
5663
6228
  reset: function reset() {
@@ -5678,14 +6243,24 @@ function resolveMessageAppendContext(options) {
5678
6243
  * - Applies context-aware merge rules for text/reasoning/component chunks.
5679
6244
  * - `previous` must be supplied by caller when same-stream join inference is needed.
5680
6245
  */ function appendMessageContent(aiMessage, incoming, context) {
6246
+ var card = parseResourceCardContent(incoming);
6247
+ if (card) {
6248
+ aiMessage.content = upsertResourceCardContent(ensureArrayContent(aiMessage.content), card);
6249
+ return;
6250
+ }
6251
+ var receipt = parseFileActivityContent(incoming);
6252
+ if (receipt) {
6253
+ aiMessage.content = upsertFileActivityContent(ensureArrayContent(aiMessage.content), receipt);
6254
+ return;
6255
+ }
5681
6256
  aiMessage.status = "answering";
5682
6257
  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, [
5683
6258
  "previous"
5684
6259
  ]);
5685
- var appendContext = _object_spread({}, inferMessageAppendContext(incoming), contextWithoutPrevious);
6260
+ var appendContext = _object_spread$1({}, inferMessageAppendContext(incoming), contextWithoutPrevious);
5686
6261
  var _appendContext_joinHint;
5687
6262
  var joinHint = (_appendContext_joinHint = appendContext.joinHint) !== null && _appendContext_joinHint !== void 0 ? _appendContext_joinHint : shouldJoinWithoutSeparator(previous, appendContext) ? "none" : undefined;
5688
- var messageContext = joinHint ? _object_spread_props(_object_spread({}, appendContext), {
6263
+ var messageContext = joinHint ? _object_spread_props(_object_spread$1({}, appendContext), {
5689
6264
  joinHint: joinHint
5690
6265
  }) : appendContext;
5691
6266
  var content = normalizeIncomingContent(incoming, appendContext);
@@ -5694,7 +6269,7 @@ function resolveMessageAppendContext(options) {
5694
6269
  var reasoning = (_aiMessage_reasoning = aiMessage.reasoning) !== null && _aiMessage_reasoning !== void 0 ? _aiMessage_reasoning : [];
5695
6270
  var lastReasoning = reasoning[reasoning.length - 1];
5696
6271
  if ((lastReasoning === null || lastReasoning === void 0 ? void 0 : lastReasoning.id) === content.id) {
5697
- var mergedReasoning = _object_spread_props(_object_spread({}, lastReasoning), {
6272
+ var mergedReasoning = _object_spread_props(_object_spread$1({}, lastReasoning), {
5698
6273
  text: "".concat(lastReasoning.text).concat(content.text)
5699
6274
  });
5700
6275
  aiMessage.reasoning = _to_consumable_array(reasoning.slice(0, reasoning.length - 1)).concat([
@@ -5715,7 +6290,7 @@ function resolveMessageAppendContext(options) {
5715
6290
  return isTextContent(item) && item.id === content.id;
5716
6291
  });
5717
6292
  if (index > -1) {
5718
- var mergedContent = _object_spread(_object_spread_props(_object_spread({}, chunks[index]), {
6293
+ var mergedContent = _object_spread$1(_object_spread_props(_object_spread$1({}, chunks[index]), {
5719
6294
  text: "".concat(chunks[index].text).concat(content.text)
5720
6295
  }), !chunks[index].id && content.id ? {
5721
6296
  id: content.id
@@ -5738,7 +6313,7 @@ function resolveMessageAppendContext(options) {
5738
6313
  var existingIndex = findLastTextChunkIndexById(chunks, content.id);
5739
6314
  if (existingIndex > -1) {
5740
6315
  var existing = chunks[existingIndex];
5741
- var merged = _object_spread_props(_object_spread({}, existing), {
6316
+ var merged = _object_spread_props(_object_spread$1({}, existing), {
5742
6317
  text: "".concat(existing.text).concat(content.text)
5743
6318
  });
5744
6319
  var nextChunks = _to_consumable_array(chunks);
@@ -5747,7 +6322,7 @@ function resolveMessageAppendContext(options) {
5747
6322
  return;
5748
6323
  }
5749
6324
  } else if (isTextContent(lastContent) && messageContext.joinHint === "none") {
5750
- var mergedLastContent = _object_spread_props(_object_spread({}, lastContent), {
6325
+ var mergedLastContent = _object_spread_props(_object_spread$1({}, lastContent), {
5751
6326
  text: "".concat(lastContent.text).concat(content.text)
5752
6327
  });
5753
6328
  aiMessage.content = _to_consumable_array(chunks.slice(0, chunks.length - 1)).concat([
@@ -5756,7 +6331,7 @@ function resolveMessageAppendContext(options) {
5756
6331
  return;
5757
6332
  }
5758
6333
  var separator = getContentChunkSeparator(lastContent, content.text, messageContext.joinHint);
5759
- var appended = _object_spread_props(_object_spread({}, content), {
6334
+ var appended = _object_spread_props(_object_spread$1({}, content), {
5760
6335
  text: separator + content.text
5761
6336
  });
5762
6337
  aiMessage.content = _to_consumable_array(chunks).concat([
@@ -5780,7 +6355,7 @@ function resolveMessageAppendContext(options) {
5780
6355
  aiMessage.content = nextChunks1;
5781
6356
  }
5782
6357
  function appendMessagePlainText(accumulator, incoming, context) {
5783
- var resolvedContext = _object_spread({}, inferMessageAppendContext(incoming), context !== null && context !== void 0 ? context : {});
6358
+ var resolvedContext = _object_spread$1({}, inferMessageAppendContext(incoming), context !== null && context !== void 0 ? context : {});
5784
6359
  var nextText = filterText(incoming);
5785
6360
  if (!nextText) {
5786
6361
  return accumulator !== null && accumulator !== void 0 ? accumulator : "";
@@ -5825,7 +6400,7 @@ function appendMessagePlainText(accumulator, incoming, context) {
5825
6400
  return;
5826
6401
  }
5827
6402
  textIndexById.set(item.id, merged.length);
5828
- merged.push(_object_spread({}, item));
6403
+ merged.push(_object_spread$1({}, item));
5829
6404
  return;
5830
6405
  }
5831
6406
  var lastItem = merged[merged.length - 1];
@@ -5833,7 +6408,7 @@ function appendMessagePlainText(accumulator, incoming, context) {
5833
6408
  merged[merged.length - 1] = mergeTextChunkForDisplay(lastItem, item);
5834
6409
  return;
5835
6410
  }
5836
- merged.push(_object_spread({}, item));
6411
+ merged.push(_object_spread$1({}, item));
5837
6412
  });
5838
6413
  return merged.length ? merged : null;
5839
6414
  }
@@ -5845,9 +6420,10 @@ function stringifyMessageContent(content) {
5845
6420
  var result = "";
5846
6421
  var previousContext = null;
5847
6422
  content.forEach(function(item) {
6423
+ if (isFileActivityContent(item) || isResourceCardContent(item)) return;
5848
6424
  var itemContext = inferMessageAppendContext(item);
5849
6425
  var joinHint = shouldJoinWithoutSeparator(previousContext, itemContext) ? "none" : undefined;
5850
- result = appendMessagePlainText(result, stringifySingle(item), _object_spread({}, itemContext, joinHint ? {
6426
+ result = appendMessagePlainText(result, stringifySingle(item), _object_spread$1({}, itemContext, joinHint ? {
5851
6427
  joinHint: joinHint
5852
6428
  } : {}));
5853
6429
  previousContext = itemContext;
@@ -5870,7 +6446,7 @@ function filterMessageText(content) {
5870
6446
  }
5871
6447
  var itemContext = inferMessageAppendContext(item);
5872
6448
  var joinHint = shouldJoinWithoutSeparator(previousContext, itemContext) ? "none" : undefined;
5873
- result = appendMessagePlainText(result, nextText, _object_spread({}, itemContext, joinHint ? {
6449
+ result = appendMessagePlainText(result, nextText, _object_spread$1({}, itemContext, joinHint ? {
5874
6450
  joinHint: joinHint
5875
6451
  } : {}));
5876
6452
  previousContext = itemContext;
@@ -5880,6 +6456,93 @@ function filterMessageText(content) {
5880
6456
  return filterText(content) || null;
5881
6457
  }
5882
6458
 
6459
+ var SANDBOX_FILE_OUTPUT_RULES = [
6460
+ {
6461
+ extension: ".docx",
6462
+ kind: "document",
6463
+ mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
6464
+ format: "docx"
6465
+ },
6466
+ {
6467
+ extension: ".xlsx",
6468
+ kind: "spreadsheet",
6469
+ mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
6470
+ format: "xlsx"
6471
+ },
6472
+ {
6473
+ extension: ".pptx",
6474
+ kind: "presentation",
6475
+ mimeType: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
6476
+ format: "pptx"
6477
+ },
6478
+ {
6479
+ extension: ".pdf",
6480
+ kind: "document",
6481
+ mimeType: "application/pdf",
6482
+ format: "pdf"
6483
+ },
6484
+ {
6485
+ extension: ".json",
6486
+ kind: "file",
6487
+ mimeType: "application/json",
6488
+ format: "json"
6489
+ },
6490
+ {
6491
+ extension: ".md",
6492
+ kind: "document",
6493
+ mimeType: "text/markdown",
6494
+ format: "utf8"
6495
+ },
6496
+ {
6497
+ extension: ".txt",
6498
+ kind: "file",
6499
+ mimeType: "text/plain",
6500
+ format: "utf8"
6501
+ },
6502
+ {
6503
+ extension: ".csv",
6504
+ kind: "spreadsheet",
6505
+ mimeType: "text/csv",
6506
+ format: "utf8"
6507
+ },
6508
+ {
6509
+ extension: ".tsv",
6510
+ kind: "spreadsheet",
6511
+ mimeType: "text/tab-separated-values",
6512
+ format: "utf8"
6513
+ },
6514
+ {
6515
+ extension: ".html",
6516
+ kind: "file",
6517
+ mimeType: "text/html",
6518
+ format: "utf8"
6519
+ },
6520
+ {
6521
+ extension: ".png",
6522
+ kind: "image",
6523
+ mimeType: "image/png",
6524
+ format: "png"
6525
+ },
6526
+ {
6527
+ extension: ".jpg",
6528
+ kind: "image",
6529
+ mimeType: "image/jpeg",
6530
+ format: "jpeg"
6531
+ },
6532
+ {
6533
+ extension: ".jpeg",
6534
+ kind: "image",
6535
+ mimeType: "image/jpeg",
6536
+ format: "jpeg"
6537
+ },
6538
+ {
6539
+ extension: ".svg",
6540
+ kind: "image",
6541
+ mimeType: "image/svg+xml",
6542
+ format: "utf8"
6543
+ }
6544
+ ];
6545
+
5883
6546
  function isEvidenceProposal(value) {
5884
6547
  return "strategy" in value && "candidateId" in value && !!value.strategy && !!value.candidateId;
5885
6548
  }
@@ -6063,6 +6726,7 @@ var MCP_HTTP_CORS_REQUEST_HEADERS = [
6063
6726
  "X-Request-Id"
6064
6727
  ];
6065
6728
  var MCP_HTTP_CORS_EXPOSED_HEADERS = [
6729
+ "Content-Location",
6066
6730
  "WWW-Authenticate",
6067
6731
  "MCP-Protocol-Version",
6068
6732
  "Mcp-Session-Id",
@@ -6110,6 +6774,226 @@ var KNOWLEDGE_AUTOMATIC_TAG_CANDIDATES = 50;
6110
6774
  var KNOWLEDGE_AUTOMATIC_TAG_MAXIMUM = 10;
6111
6775
  var KNOWLEDGE_AUTOMATIC_TAG_TEXT_BUDGET = 12000;
6112
6776
 
6777
+ var DEFAULT_KNOWLEDGE_KEYWORD_ANALYZER = "basic";
6778
+
6779
+ /** Exhaustive attribution shared by queries, ledger export and UI. */ function modelExecutionEntry(source) {
6780
+ switch(source.type){
6781
+ case "cli_session":
6782
+ return "cli";
6783
+ case "agent_invocation":
6784
+ return "agent_runtime";
6785
+ case "shell_execution":
6786
+ return "shell";
6787
+ }
6788
+ }
6789
+ function modelExecutionSourceId(source) {
6790
+ switch(source.type){
6791
+ case "cli_session":
6792
+ return source.cliSessionId;
6793
+ case "agent_invocation":
6794
+ return source.invocationId;
6795
+ case "shell_execution":
6796
+ return source.executionId;
6797
+ }
6798
+ }
6799
+ var MODEL_EXECUTION_POLICY_SETTING = "modelExecutionPolicy";
6800
+ /** Explicit model policy source in a Runtime binding; independent of the calling Agent identity. */ var agentRuntimeModelSourceSchema = z.object({
6801
+ type: z.literal("assistant"),
6802
+ xpertId: z.string().uuid()
6803
+ }).strict();
6804
+
6805
+ /**
6806
+ * Running means accepted; actual work start requires an observation.
6807
+ * Only succeeded, failed and cancelled are terminal. Unknown must be reconciled without replay.
6808
+ */ var agentInvocationStatusSchema = z.enum([
6809
+ "queued",
6810
+ "running",
6811
+ "waiting",
6812
+ "cancelling",
6813
+ "succeeded",
6814
+ "failed",
6815
+ "cancelled",
6816
+ "unknown"
6817
+ ]);
6818
+ var agentInvocationTerminalStatusSchema = z.enum([
6819
+ "succeeded",
6820
+ "failed",
6821
+ "cancelled"
6822
+ ]);
6823
+ /** Activity and reported progress are separate from business acceptance. No invented percentage. */ var agentRuntimeProgressSchema = z.object({
6824
+ source: z.enum([
6825
+ "executor",
6826
+ "host"
6827
+ ]),
6828
+ observedAt: z.string().datetime({
6829
+ offset: true
6830
+ }),
6831
+ startedAt: z.string().datetime({
6832
+ offset: true
6833
+ }).optional(),
6834
+ phase: z.string().trim().min(1).max(200).optional(),
6835
+ summary: z.string().max(2000).optional(),
6836
+ steps: z.object({
6837
+ completed: z.number().int().nonnegative(),
6838
+ total: z.number().int().positive()
6839
+ }).strict().refine(function(steps) {
6840
+ return steps.completed <= steps.total;
6841
+ }).optional()
6842
+ }).strict();
6843
+
6844
+ var AGENT_OUTPUT_MAX_PATHS = 128;
6845
+ /** Relative file selections only. A declaration does not grant filesystem access. */ var agentResultPathSchema = z.string().min(1).max(1024).refine(function(path) {
6846
+ return !path.startsWith("/") && !/^[a-zA-Z]:/.test(path) && !path.includes("\\") && !/[\x00-\x1f]/.test(path) && path.split("/").every(function(part) {
6847
+ return part !== "" && part !== "." && part !== "..";
6848
+ });
6849
+ }, "Expected a relative file path");
6850
+ /** An export selection is a list of exact files, never a filesystem search. */ var deliveryPathsSchema = z.array(agentResultPathSchema.refine(function(path) {
6851
+ return !/[*?\[\]{}]/.test(path);
6852
+ }, "Delivery paths must be exact relative file paths, without wildcards. Omit paths to use the executor's declared deliverables.")).min(1).max(AGENT_OUTPUT_MAX_PATHS).optional().describe("Exact file paths relative to the task working directory. No wildcards/globs or directories. If filenames are determined during execution, omit paths and require the executor to declare each deliverable as a file result item.");
6853
+ /** Omission means no export. Optional paths restrict the adapter's explicitly declared deliverables. */ var agentOutputDeliverySchema = z.discriminatedUnion("mode", [
6854
+ z.object({
6855
+ mode: z.literal("none")
6856
+ }).strict(),
6857
+ z.object({
6858
+ mode: z.literal("files"),
6859
+ paths: deliveryPathsSchema
6860
+ }).strict(),
6861
+ z.object({
6862
+ mode: z.literal("archive"),
6863
+ paths: deliveryPathsSchema
6864
+ }).strict()
6865
+ ]);
6866
+
6867
+ var projectTaskSpecificationDigestSchema = z.string().regex(/^sha256:[a-f0-9]{64}$/);
6868
+ /** Only requirements belong here; status, progress, assignment and generic revision do not. */ var projectTaskSpecificationSchema = z.object({
6869
+ version: z.literal(1),
6870
+ title: z.string().trim().min(1).max(500),
6871
+ description: z.string().max(32000).optional(),
6872
+ requirements: z.array(z.string().trim().min(1).max(4000)).min(1).max(64),
6873
+ steps: z.array(z.object({
6874
+ stepIndex: z.number().int().positive(),
6875
+ description: z.string().trim().min(1).max(4000)
6876
+ }).strict()).max(128)
6877
+ }).strict().refine(function(specification) {
6878
+ return new Set(specification.steps.map(function(step) {
6879
+ return step.stepIndex;
6880
+ })).size === specification.steps.length;
6881
+ }, "Step indices must be unique");
6882
+ /** The host verifies the digest against the specification at the persistence boundary. */ var projectTaskSpecificationSnapshotSchema = z.object({
6883
+ digest: projectTaskSpecificationDigestSchema,
6884
+ specification: projectTaskSpecificationSchema
6885
+ }).strict();
6886
+ /** Versioned references, not paths or access grants. Resolve and authorize before reading. */ var projectTaskEvidenceReferenceSchema = z.discriminatedUnion("type", [
6887
+ z.object({
6888
+ type: z.literal("artifact"),
6889
+ artifactId: z.string().uuid(),
6890
+ versionId: z.string().uuid()
6891
+ }).strict(),
6892
+ z.object({
6893
+ type: z.literal("invocation_result"),
6894
+ invocationId: z.string().uuid(),
6895
+ revision: z.number().int().nonnegative()
6896
+ }).strict(),
6897
+ z.object({
6898
+ type: z.literal("workspace_snapshot"),
6899
+ snapshotId: z.string().uuid(),
6900
+ digest: projectTaskSpecificationDigestSchema
6901
+ }).strict()
6902
+ ]);
6903
+ var projectTaskExecutionPurposeSchema = z.discriminatedUnion("type", [
6904
+ z.object({
6905
+ type: z.literal("implementation")
6906
+ }).strict(),
6907
+ z.object({
6908
+ type: z.literal("review"),
6909
+ implementationExecutionId: z.string().uuid(),
6910
+ implementationInvocationId: z.string().uuid(),
6911
+ specificationDigest: projectTaskSpecificationDigestSchema,
6912
+ evidence: z.array(projectTaskEvidenceReferenceSchema).min(1).max(64)
6913
+ }).strict()
6914
+ ]);
6915
+ var projectTaskExecutionReferenceSchema = z.object({
6916
+ projectId: z.string().uuid(),
6917
+ projectTaskId: z.string().uuid(),
6918
+ taskExecutionId: z.string().uuid()
6919
+ }).strict();
6920
+ /** Host-owned attempt context. Review is a new attempt and grants no completion authority. */ var projectTaskExecutionContextSchema = projectTaskExecutionReferenceSchema.extend({
6921
+ specification: projectTaskSpecificationSnapshotSchema,
6922
+ purpose: projectTaskExecutionPurposeSchema
6923
+ }).strict().superRefine(function(value, ctx) {
6924
+ if (value.purpose.type !== "review") return;
6925
+ if (value.purpose.implementationExecutionId === value.taskExecutionId) {
6926
+ ctx.addIssue({
6927
+ code: z.ZodIssueCode.custom,
6928
+ path: [
6929
+ "purpose"
6930
+ ],
6931
+ message: "Review must reference another attempt"
6932
+ });
6933
+ }
6934
+ if (value.purpose.specificationDigest !== value.specification.digest) {
6935
+ ctx.addIssue({
6936
+ code: z.ZodIssueCode.custom,
6937
+ path: [
6938
+ "purpose"
6939
+ ],
6940
+ message: "Review specification must match its subject"
6941
+ });
6942
+ }
6943
+ });
6944
+ /** A receipt is neither a business completion decision nor proof that the process has started. */ var projectTaskDispatchReceiptSchema = projectTaskExecutionReferenceSchema.extend({
6945
+ invocationId: z.string().uuid(),
6946
+ status: agentInvocationStatusSchema
6947
+ }).strict();
6948
+ /** Explicit delegation. Routing and actor identity come from the host. */ var projectTaskDispatchInputSchema = z.object({
6949
+ requestId: z.string().uuid(),
6950
+ taskId: z.string().uuid(),
6951
+ expectedRevision: z.number().int().positive(),
6952
+ bindingId: z.string().uuid(),
6953
+ purpose: projectTaskExecutionPurposeSchema.optional(),
6954
+ delivery: agentOutputDeliverySchema.optional(),
6955
+ instructions: z.string().trim().max(16000).default("")
6956
+ }).strict();
6957
+ /** Exact JSON response from an evidence-only reviewer; prose never implies a passing verdict. */ var projectTaskReviewReportSchema = z.object({
6958
+ version: z.literal(1),
6959
+ verdict: z.enum([
6960
+ "pass",
6961
+ "changes_required",
6962
+ "indeterminate"
6963
+ ]),
6964
+ specificationDigest: projectTaskSpecificationDigestSchema,
6965
+ implementationInvocationId: z.string().uuid(),
6966
+ evidence: z.array(projectTaskEvidenceReferenceSchema).min(1).max(64),
6967
+ findings: z.array(z.string().trim().min(1).max(4000)).min(1).max(64),
6968
+ limitations: z.array(z.string().trim().min(1).max(4000)).max(64)
6969
+ }).strict();
6970
+ var projectTaskDecisionInputSchema = z.object({
6971
+ requestId: z.string().uuid(),
6972
+ taskId: z.string().uuid(),
6973
+ expectedRevision: z.number().int().positive(),
6974
+ implementationExecutionId: z.string().uuid(),
6975
+ specificationDigest: projectTaskSpecificationDigestSchema,
6976
+ evidence: z.array(projectTaskEvidenceReferenceSchema).min(1).max(64),
6977
+ reviewExecutionId: z.string().uuid().optional(),
6978
+ outcome: z.enum([
6979
+ "accept",
6980
+ "rework"
6981
+ ]),
6982
+ rationale: z.string().trim().min(1).max(8000),
6983
+ checks: z.array(z.string().trim().min(1).max(4000)).min(1).max(64)
6984
+ }).strict();
6985
+ var projectTaskDecisionSchema = projectTaskDecisionInputSchema.extend({
6986
+ actorId: z.string().uuid(),
6987
+ actorType: z.enum([
6988
+ "user",
6989
+ "xpert",
6990
+ "project_agent"
6991
+ ]),
6992
+ executionId: z.string().uuid().optional(),
6993
+ decidedAt: z.string().datetime(),
6994
+ taskRevision: z.number().int().positive()
6995
+ }).strict();
6996
+
6113
6997
  var STATE_VARIABLE_HUMAN = "human";
6114
6998
 
6115
6999
  var PermissionsEnum;
@@ -6229,6 +7113,7 @@ var TagCategoryEnum;
6229
7113
  var TAG_TARGETS = [
6230
7114
  TagCategoryEnum.XPERT,
6231
7115
  "knowledgebase",
7116
+ "prompt_workflow",
6232
7117
  TagCategoryEnum.TOOLSET,
6233
7118
  TagCategoryEnum.INDICATOR,
6234
7119
  TagCategoryEnum.STORY,
@@ -6593,7 +7478,7 @@ var IntegrationGitHubProvider = {
6593
7478
  }
6594
7479
  };
6595
7480
 
6596
- function _define_property(obj, key, value) {
7481
+ function _define_property$1(obj, key, value) {
6597
7482
  if (key in obj) {
6598
7483
  Object.defineProperty(obj, key, {
6599
7484
  value: value,
@@ -6608,10 +7493,11 @@ function _define_property(obj, key, value) {
6608
7493
  }
6609
7494
  var INTEGRATION_PROVIDERS = // [IntegrationEnum.LARK]: IntegrationLarkProvider,
6610
7495
  // [IntegrationEnum.WECOM]: IntegrationWeComProvider,
6611
- _define_property({}, IntegrationEnum.GITHUB, IntegrationGitHubProvider);
7496
+ _define_property$1({}, IntegrationEnum.GITHUB, IntegrationGitHubProvider);
6612
7497
 
6613
7498
  var AiModelTypeEnum;
6614
7499
  (function(AiModelTypeEnum) {
7500
+ AiModelTypeEnum["REALTIME"] = "realtime";
6615
7501
  AiModelTypeEnum["LLM"] = "llm";
6616
7502
  AiModelTypeEnum["TEXT_EMBEDDING"] = "text-embedding";
6617
7503
  AiModelTypeEnum["RERANK"] = "rerank";
@@ -6623,15 +7509,15 @@ var AiModelTypeEnum;
6623
7509
  AiModelTypeEnum["VIDEO"] = "video";
6624
7510
  })(AiModelTypeEnum || (AiModelTypeEnum = {}));
6625
7511
 
6626
- function _array_like_to_array$2(arr, len) {
7512
+ function _array_like_to_array$3(arr, len) {
6627
7513
  if (len == null || len > arr.length) len = arr.length;
6628
7514
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6629
7515
  return arr2;
6630
7516
  }
6631
- function _array_with_holes$2(arr) {
7517
+ function _array_with_holes$3(arr) {
6632
7518
  if (Array.isArray(arr)) return arr;
6633
7519
  }
6634
- function _iterable_to_array_limit$1(arr, i) {
7520
+ function _iterable_to_array_limit$2(arr, i) {
6635
7521
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
6636
7522
  if (_i == null) return;
6637
7523
  var _arr = [];
@@ -6655,19 +7541,19 @@ function _iterable_to_array_limit$1(arr, i) {
6655
7541
  }
6656
7542
  return _arr;
6657
7543
  }
6658
- function _non_iterable_rest$2() {
7544
+ function _non_iterable_rest$3() {
6659
7545
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6660
7546
  }
6661
- function _sliced_to_array$1(arr, i) {
6662
- return _array_with_holes$2(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
7547
+ function _sliced_to_array$2(arr, i) {
7548
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
6663
7549
  }
6664
- function _unsupported_iterable_to_array$2(o, minLen) {
7550
+ function _unsupported_iterable_to_array$3(o, minLen) {
6665
7551
  if (!o) return;
6666
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
7552
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
6667
7553
  var n = Object.prototype.toString.call(o).slice(8, -1);
6668
7554
  if (n === "Object" && o.constructor) n = o.constructor.name;
6669
7555
  if (n === "Map" || n === "Set") return Array.from(n);
6670
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
7556
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
6671
7557
  }
6672
7558
  /**
6673
7559
  * Channels of all upstream and downstream nodes relative to the starting point startKey.
@@ -6695,7 +7581,7 @@ function findStartNodes(graph, key) {
6695
7581
  for(var _iterator = connections[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
6696
7582
  var conn = _step.value;
6697
7583
  if (!toMap.has(conn.to)) toMap.set(conn.to, []);
6698
- var _conn_from_split = _sliced_to_array$1(conn.from.split("/"), 1), fromKey = _conn_from_split[0];
7584
+ var _conn_from_split = _sliced_to_array$2(conn.from.split("/"), 1), fromKey = _conn_from_split[0];
6699
7585
  if (conn.type === "edge") {
6700
7586
  toMap.get(conn.to).push(fromKey);
6701
7587
  }
@@ -6853,30 +7739,30 @@ function shortTitle(input) {
6853
7739
  return null;
6854
7740
  }
6855
7741
 
6856
- function _array_like_to_array$1(arr, len) {
7742
+ function _array_like_to_array$2(arr, len) {
6857
7743
  if (len == null || len > arr.length) len = arr.length;
6858
7744
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6859
7745
  return arr2;
6860
7746
  }
6861
- function _array_with_holes$1(arr) {
7747
+ function _array_with_holes$2(arr) {
6862
7748
  if (Array.isArray(arr)) return arr;
6863
7749
  }
6864
7750
  function _iterable_to_array(iter) {
6865
7751
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
6866
7752
  }
6867
- function _non_iterable_rest$1() {
7753
+ function _non_iterable_rest$2() {
6868
7754
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6869
7755
  }
6870
7756
  function _to_array(arr) {
6871
- return _array_with_holes$1(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_rest$1();
7757
+ return _array_with_holes$2(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_rest$2();
6872
7758
  }
6873
- function _unsupported_iterable_to_array$1(o, minLen) {
7759
+ function _unsupported_iterable_to_array$2(o, minLen) {
6874
7760
  if (!o) return;
6875
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
7761
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
6876
7762
  var n = Object.prototype.toString.call(o).slice(8, -1);
6877
7763
  if (n === "Object" && o.constructor) n = o.constructor.name;
6878
7764
  if (n === "Map" || n === "Set") return Array.from(n);
6879
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
7765
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
6880
7766
  }
6881
7767
  /**
6882
7768
  *
@@ -6990,15 +7876,15 @@ var BusinessType;
6990
7876
  BusinessType["INDICATOR"] = "INDICATOR";
6991
7877
  })(BusinessType || (BusinessType = {}));
6992
7878
 
6993
- function _array_like_to_array(arr, len) {
7879
+ function _array_like_to_array$1(arr, len) {
6994
7880
  if (len == null || len > arr.length) len = arr.length;
6995
7881
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6996
7882
  return arr2;
6997
7883
  }
6998
- function _array_with_holes(arr) {
7884
+ function _array_with_holes$1(arr) {
6999
7885
  if (Array.isArray(arr)) return arr;
7000
7886
  }
7001
- function _iterable_to_array_limit(arr, i) {
7887
+ function _iterable_to_array_limit$1(arr, i) {
7002
7888
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
7003
7889
  if (_i == null) return;
7004
7890
  var _arr = [];
@@ -7022,19 +7908,19 @@ function _iterable_to_array_limit(arr, i) {
7022
7908
  }
7023
7909
  return _arr;
7024
7910
  }
7025
- function _non_iterable_rest() {
7911
+ function _non_iterable_rest$1() {
7026
7912
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7027
7913
  }
7028
- function _sliced_to_array(arr, i) {
7029
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
7914
+ function _sliced_to_array$1(arr, i) {
7915
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
7030
7916
  }
7031
- function _unsupported_iterable_to_array(o, minLen) {
7917
+ function _unsupported_iterable_to_array$1(o, minLen) {
7032
7918
  if (!o) return;
7033
- if (typeof o === "string") return _array_like_to_array(o, minLen);
7919
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
7034
7920
  var n = Object.prototype.toString.call(o).slice(8, -1);
7035
7921
  if (n === "Object" && o.constructor) n = o.constructor.name;
7036
7922
  if (n === "Map" || n === "Set") return Array.from(n);
7037
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
7923
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
7038
7924
  }
7039
7925
  var ScheduleTaskStatus;
7040
7926
  (function(ScheduleTaskStatus) {
@@ -7057,7 +7943,7 @@ var TaskFrequency;
7057
7943
  * @returns
7058
7944
  */ function generateCronExpression(schedule) {
7059
7945
  if (!schedule.time) throw new Error("Time is required for scheduling");
7060
- var _schedule_time_split = _sliced_to_array(schedule.time.split(":"), 2), hourStr = _schedule_time_split[0], minuteStr = _schedule_time_split[1];
7946
+ var _schedule_time_split = _sliced_to_array$1(schedule.time.split(":"), 2), hourStr = _schedule_time_split[0], minuteStr = _schedule_time_split[1];
7061
7947
  var hour = parseInt(hourStr, 10);
7062
7948
  var minute = parseInt(minuteStr, 10);
7063
7949
  if (isNaN(hour) || isNaN(minute) || hour < 0 || hour > 23 || minute < 0 || minute > 59) {
@@ -7104,8 +7990,11 @@ var ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = "assistant.chat.send_message";
7104
7990
  var ASSISTANT_CONTEXT_SET_COMMAND = "assistant.context.set";
7105
7991
  var WORKBENCH_FILE_OPEN_COMMAND = "workbench.file.open";
7106
7992
  var WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
7993
+ var WORKBENCH_AGENT_EVOLUTION_TARGET = "agent-evolution.target";
7994
+ var WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET = "agent-evolution.change";
7107
7995
  var WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
7108
7996
  var WORKBENCH_ASSISTANT_CONVERSATION_TARGET = "assistant.conversation";
7997
+ /** Inspect an exact execution; embedded clients may open it without changing the active conversation. */ var WORKBENCH_ASSISTANT_EXECUTION_TARGET = "assistant.execution";
7109
7998
  /** Opens the current Assistant inside a Project-scoped workbench route. */ var WORKBENCH_ASSISTANT_PROJECT_TARGET = "assistant.project";
7110
7999
  var WORKBENCH_EXTENSION_VIEW_TARGET = "workbench.view";
7111
8000
  var XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCommand";
@@ -7115,6 +8004,211 @@ var KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
7115
8004
 
7116
8005
  var AGENT_PROFILE_TABS_SLOT = "agent.profile.tabs";
7117
8006
 
8007
+ /** Assistant Workbench slot; openMode controls initial tab opening separately. */ var AGENT_WORKBENCH_SLOT = "agent.workbench";
8008
+ /** Legacy plugin declarations and client requests; normalized to AGENT_WORKBENCH_SLOT by the host. */ var LEGACY_AGENT_WORKBENCH_SLOTS = [
8009
+ "agent.workbench.fixed",
8010
+ "agent.workbench.main"
8011
+ ];
8012
+ /** Platform-provided navigation, available without Assistant middleware. */ var CONVERSATION_MAP_FEATURE = "platform.conversation-map";
8013
+
8014
+ /** Live-only UI request. Project scope is mandatory; history playback must not reopen Views. */ function _array_like_to_array(arr, len) {
8015
+ if (len == null || len > arr.length) len = arr.length;
8016
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
8017
+ return arr2;
8018
+ }
8019
+ function _array_with_holes(arr) {
8020
+ if (Array.isArray(arr)) return arr;
8021
+ }
8022
+ function _define_property(obj, key, value) {
8023
+ if (key in obj) {
8024
+ Object.defineProperty(obj, key, {
8025
+ value: value,
8026
+ enumerable: true,
8027
+ configurable: true,
8028
+ writable: true
8029
+ });
8030
+ } else {
8031
+ obj[key] = value;
8032
+ }
8033
+ return obj;
8034
+ }
8035
+ function _iterable_to_array_limit(arr, i) {
8036
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
8037
+ if (_i == null) return;
8038
+ var _arr = [];
8039
+ var _n = true;
8040
+ var _d = false;
8041
+ var _s, _e;
8042
+ try {
8043
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
8044
+ _arr.push(_s.value);
8045
+ if (i && _arr.length === i) break;
8046
+ }
8047
+ } catch (err) {
8048
+ _d = true;
8049
+ _e = err;
8050
+ } finally{
8051
+ try {
8052
+ if (!_n && _i["return"] != null) _i["return"]();
8053
+ } finally{
8054
+ if (_d) throw _e;
8055
+ }
8056
+ }
8057
+ return _arr;
8058
+ }
8059
+ function _non_iterable_rest() {
8060
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8061
+ }
8062
+ function _object_spread(target) {
8063
+ for(var i = 1; i < arguments.length; i++){
8064
+ var source = arguments[i] != null ? arguments[i] : {};
8065
+ var ownKeys = Object.keys(source);
8066
+ if (typeof Object.getOwnPropertySymbols === "function") {
8067
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
8068
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
8069
+ }));
8070
+ }
8071
+ ownKeys.forEach(function(key) {
8072
+ _define_property(target, key, source[key]);
8073
+ });
8074
+ }
8075
+ return target;
8076
+ }
8077
+ function _sliced_to_array(arr, i) {
8078
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
8079
+ }
8080
+ function _unsupported_iterable_to_array(o, minLen) {
8081
+ if (!o) return;
8082
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
8083
+ var n = Object.prototype.toString.call(o).slice(8, -1);
8084
+ if (n === "Object" && o.constructor) n = o.constructor.name;
8085
+ if (n === "Map" || n === "Set") return Array.from(n);
8086
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
8087
+ }
8088
+ var WORKBENCH_VIEW_OPEN_EVENT = "workbench.view.open";
8089
+ /** Parse the public lg.chat.event boundary, keeping arbitrary logs out of navigation. */ function parseWorkbenchViewOpenEvent(value) {
8090
+ if (!value || typeof value !== "object" || Array.isArray(value) || !("type" in value) || value.type !== WORKBENCH_VIEW_OPEN_EVENT || !("viewKey" in value) || typeof value.viewKey !== "string" || !value.viewKey.trim() || !("projectId" in value) || typeof value.projectId !== "string" || !value.projectId.trim()) return null;
8091
+ if ("conversationId" in value && typeof value.conversationId !== "string") return null;
8092
+ if ("selectionId" in value && typeof value.selectionId !== "string") return null;
8093
+ var parameters = {};
8094
+ if ("parameters" in value) {
8095
+ if (!value.parameters || typeof value.parameters !== "object" || Array.isArray(value.parameters)) return null;
8096
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
8097
+ try {
8098
+ for(var _iterator = Object.entries(value.parameters)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
8099
+ var _step_value = _sliced_to_array(_step.value, 2), key = _step_value[0], item = _step_value[1];
8100
+ if (isViewScalar(item)) parameters[key] = item;
8101
+ else if (Array.isArray(item) && item.every(isViewScalar)) parameters[key] = item;
8102
+ else return null;
8103
+ }
8104
+ } catch (err) {
8105
+ _didIteratorError = true;
8106
+ _iteratorError = err;
8107
+ } finally{
8108
+ try {
8109
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
8110
+ _iterator.return();
8111
+ }
8112
+ } finally{
8113
+ if (_didIteratorError) {
8114
+ throw _iteratorError;
8115
+ }
8116
+ }
8117
+ }
8118
+ }
8119
+ return _object_spread({
8120
+ type: WORKBENCH_VIEW_OPEN_EVENT,
8121
+ viewKey: value.viewKey,
8122
+ projectId: value.projectId
8123
+ }, "conversationId" in value ? {
8124
+ conversationId: value.conversationId
8125
+ } : {}, "selectionId" in value ? {
8126
+ selectionId: value.selectionId
8127
+ } : {}, "parameters" in value ? {
8128
+ parameters: parameters
8129
+ } : {});
8130
+ }
8131
+ function isViewScalar(value) {
8132
+ return value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value);
8133
+ }
8134
+
7118
8135
  var RUNTIME_RESTART_CONFIRMATION = "RESTART";
7119
8136
 
7120
- export { AGENT_PROFILE_TABS_SLOT, AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CITATION_OPEN_EVENT, ASSISTANT_COMPOSER_APPEND_REFERENCES_COMMAND, ASSISTANT_CONTEXT_SET_COMMAND, ASSISTANT_USER_PREFERENCES_VERSION, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BUILTIN_KNOWLEDGE_FILE_TYPES, BUILTIN_KNOWLEDGE_PARSER, BonusTypeEnum, BusinessType, CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY, CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED, CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE, CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED, CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED, CONTEXT_COMPRESSION_COMPONENT_TYPE, CONTEXT_COMPRESSION_MIDDLEWARE_NAME, CONTEXT_VARIABLE_CURRENTSTATE, COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING, COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ClientFocusEnum, ConfigurateMethod, ContactOrganizationInviteStatus, ContactType, CredentialFormTypeEnum, CredentialsType, CrudActionEnum, CurrenciesEnum, CurrencyPosition, DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS, DEFAULT_CURRENCIES, DEFAULT_DATE_FORMATS, DEFAULT_INTEGRATION_PAID_FILTERS, DEFAULT_INVITE_EXPIRY_PERIOD, DEFAULT_KNOWLEDGEBASE_FAQ_CONFIG, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL, DEFAULT_KNOWLEDGEBASE_WIKI_CONFIG, DEFAULT_KNOWLEDGE_RRF_RANK_CONSTANT, DEFAULT_KNOWLEDGE_RRF_WEIGHTS, DEFAULT_KNOWLEDGE_TEXT_SPLITTER, DEFAULT_MEMBERSHIP_CNY_PER_POINT, DEFAULT_MODEL_GATEWAY_BODY_RETENTION_DAYS, DEFAULT_MODEL_GATEWAY_CALL_RETENTION_DAYS, DEFAULT_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, DEFAULT_MODEL_GATEWAY_REQUESTS_PER_MINUTE, DEFAULT_PROFIT_BASED_BONUS, DEFAULT_REVENUE_BASED_BONUS, DEFAULT_SYSTEM_ROLES, DEFAULT_TENANT, DEFAULT_TIME_FORMATS, DEFAULT_TYPE, DEFAULT_XPERT_AGENT_RECURSION_LIMIT, DEFAULT_XPERT_WORKSPACE_DATA_SCOPE, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, ENTERPRISE_H5_PLATFORMS, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FEEDBACK_LEARNING_STRATEGY, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FetchFrom, FileStorageProviderEnum, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HUMAN_PROPOSAL_STRATEGY, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGEBASE_FAQ_RETRIEVAL_MODES, KNOWLEDGEBASE_OPEN_CITATION_EFFECT, KNOWLEDGE_AUTOMATIC_TAG_CANDIDATES, KNOWLEDGE_AUTOMATIC_TAG_MAXIMUM, KNOWLEDGE_AUTOMATIC_TAG_TEXT_BUDGET, KNOWLEDGE_CHUNKING_ALGORITHM_VERSION, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_DOCUMENT_AGENT_WRITER_TYPE, KNOWLEDGE_FAQ_ANSWER_BLOCK_MAX_COUNT, KNOWLEDGE_FAQ_ANSWER_TOTAL_MAX_LENGTH, KNOWLEDGE_FAQ_MAX_LOGICAL_VECTOR_COUNT, KNOWLEDGE_FAQ_NEGATIVE_QUESTION_MAX_COUNT, KNOWLEDGE_FAQ_NEGATIVE_QUESTION_MAX_LENGTH, KNOWLEDGE_FAQ_SIMILAR_QUESTION_MAX_COUNT, KNOWLEDGE_FAQ_SIMILAR_QUESTION_MAX_LENGTH, KNOWLEDGE_FAQ_STANDARD_QUESTION_MAX_LENGTH, KNOWLEDGE_FILTER_MAX_CONDITIONS, KNOWLEDGE_FILTER_MAX_DEPTH, KNOWLEDGE_FILTER_MAX_SET_VALUES, KNOWLEDGE_FILTER_MAX_STRING_LENGTH, KNOWLEDGE_FILTER_VERSION, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_GRAPH_DOCUMENT_STATUS_BATCH_SIZE, KNOWLEDGE_PROCESSING_MODE_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KNOWLEDGE_SYSTEM_FILTER_FIELDS, KNOWLEDGE_WIKI_DEFAULT_PAGE_SIZE, KNOWLEDGE_WIKI_DELETION_RECEIPT_RETENTION_DAYS, KNOWLEDGE_WIKI_DOCUMENT_STATUS_BATCH_SIZE, KNOWLEDGE_WIKI_FAILED_CONTENT_RETENTION_DAYS, KNOWLEDGE_WIKI_MAX_ALIASES, KNOWLEDGE_WIKI_MAX_CANONICAL_NAME_LENGTH, KNOWLEDGE_WIKI_MAX_CUSTOM_INSTRUCTION_LENGTH, KNOWLEDGE_WIKI_MAX_FACTS, KNOWLEDGE_WIKI_MAX_FACT_LENGTH, KNOWLEDGE_WIKI_MAX_PAGE_SIZE, KNOWLEDGE_WIKI_MAX_SEARCH_LENGTH, KNOWLEDGE_WIKI_MAX_SOURCE_CHUNKS_PER_FACT, KNOWLEDGE_WIKI_MAX_SUGGESTED_LINKS, KNOWLEDGE_WIKI_MAX_SUMMARY_LENGTH, KNOWLEDGE_WIKI_OPERATION_RETENTION_DAYS, KNOWLEDGE_WIKI_SCHEMA_VERSION, KNOWLEDGE_WIKI_STALE_VECTOR_CLEANUP_SLO_HOURS, KnowledgeGraphIndexJobStatus, KnowledgeGraphStatus, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME, LanguagesEnum, LanguagesMap, ListsInputTypeEnum, LongTermMemoryTypeEnum, MAX_COPILOT_CHECKPOINT_RETENTION_DAYS, MAX_MODEL_GATEWAY_BODY_RETENTION_DAYS, MAX_MODEL_GATEWAY_CALL_RETENTION_DAYS, MAX_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, MAX_MODEL_GATEWAY_REQUESTS_PER_MINUTE, MCPServerType, MCP_API_KEY_SUBJECT_TYPES, MCP_APP_RESOURCE_MIME_TYPE, MCP_AUTH_METHODS, MCP_CAPABILITY_APPROVAL_MODES, MCP_CAPABILITY_DESCRIPTOR_VERSION, MCP_CAPABILITY_TYPES, MCP_CAPABILITY_VISIBILITIES, MCP_CONSUMER_AUTH_TYPES, MCP_HTTP_CORS_EXPOSED_HEADERS, MCP_HTTP_CORS_REQUEST_HEADERS, MCP_INVOCATION_STATUSES, MCP_PROTOCOL_VERSION, MCP_PUBLICATION_REVIEW_STATUSES, MCP_PUBLICATION_STATUSES, MCP_REQUIRED_CONTEXTS, MCP_TASK_EXTENSION_ID, MCP_TASK_STATUSES, MCP_TOOL_IDEMPOTENCY, MCP_TOOL_RISKS, MCP_TOOL_SIDE_EFFECTS, MEMBERSHIP_CNY_PER_POINT_SETTING, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MIN_COPILOT_CHECKPOINT_RETENTION_DAYS, MIN_MODEL_GATEWAY_BODY_RETENTION_DAYS, MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS, MIN_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, MIN_MODEL_GATEWAY_REQUESTS_PER_MINUTE, MODEL_GATEWAY_CALL_RETENTION_DAYS_SETTING, MODEL_GATEWAY_CALL_RETENTION_ENABLED_SETTING, MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS_SETTING, MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING, MembershipAdminUserStatusEnum, MembershipBulkActionEnum, MembershipLedgerSourceEnum, MembershipPeriodEnum, MembershipPeriodStatusEnum, MembershipPlanStatusEnum, MembershipRenewalModeEnum, MembershipSourceEnum, MembershipStatusEnum, MinimumProjectSizeEnum, ModelAccessActorTypeEnum, ModelAccessChannelEnum, ModelAccessClosedReasonCodeEnum, ModelAccessEventTypeEnum, ModelAccessOwnershipScopeEnum, ModelAccessRequestStatusEnum, ModelAccessSourceEnum, ModelAccessUnavailableReasonEnum, ModelFeature, ModelGatewayApiKeyLifetimeEnum, ModelGatewayApiKeyStatusEnum, ModelGatewayCallStatusEnum, ModelGatewayUsageChannelEnum, ModelGatewayUsageSourceEnum, ModelPropertyKey, OllamaEmbeddingsProviders, OpenAIEmbeddingsProviders, OrderTypeEnum, OrganizationContactBudgetTypeEnum, OrganizationDemoNetworkEnum, OrganizationPermissionsEnum, OrganizationProjectBudgetTypeEnum, OrganizationSelectInput, PLUGIN_APPLICATION_INSTALLATION_STATUS, PLUGIN_APPLICATION_SCOPE, PLUGIN_COMPONENT_TYPE, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY, PLUGIN_MARKETPLACE_CATEGORIES, PLUGIN_MARKETPLACE_INSTALLATION_POLICY, PLUGIN_MCP_TOOL_APPROVAL_MODE, PLUGIN_RESOURCE_ERROR_CODE, PLUGIN_RESOURCE_INSTALLATION_STATUS, PLUGIN_RESOURCE_RUNTIME_TYPE, PLUGIN_SOURCE, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProviderEnum, ProviderType, RUNTIME_RESTART_CONFIRMATION, RegionsEnum, RequestMethodEnum, RequestScopeLevel, RolesEnum, SANDBOX_MANAGED_SERVICE_STATUSES, SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES, SANDBOX_TERMINAL_NAMESPACE, SANDBOX_WORK_FOR_TYPES, SMTPSecureEnum, STANDARD_METADATA_FIELDS, STATE_SYS_AGENT_WORKSPACE_PATH, STATE_SYS_MEMORY_WORKSPACE_PATH, STATE_SYS_SESSION_WORKSPACE_PATH, STATE_SYS_SHARED_WORKSPACE_PATH, STATE_SYS_THREAD_ID, STATE_SYS_VOLUME, STATE_SYS_WORKSPACE_PATH, STATE_SYS_WORKSPACE_ROOT, STATE_SYS_WORKSPACE_URL, STATE_VARIABLE_FILES, STATE_VARIABLE_HUMAN, STATE_VARIABLE_INPUT, STATE_VARIABLE_SYS, STATE_VARIABLE_TITLE_CHANNEL, SandboxManagedServiceErrorCode, SandboxTerminalClientEvent, SandboxTerminalClosedReason, SandboxTerminalErrorCode, SandboxTerminalServerEvent, ScheduleTaskStatus, SecretTokenBindingType, TAG_TARGETS, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, THREAD_GOAL_STATUS_VALUES, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT, UserGroupManagedByEnum, UserGroupManagedEntityTypeEnum, UserModelGrantStatusEnum, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, WORKBENCH_ASSISTANT_CONVERSATION_TARGET, WORKBENCH_ASSISTANT_PROJECT_TARGET, WORKBENCH_EXTENSION_VIEW_TARGET, WORKBENCH_FILE_OPEN_COMMAND, WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET, WORKBENCH_NAVIGATION_OPEN_COMMAND, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE, XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY, XPERT_TASK_SCHEDULE_PROPERTY_PREFIX, XPERT_VIEW_CONVERSATION_ID_HEADER, XPERT_VIEW_PROJECT_ID_HEADER, XpertAccessRequestStatusEnum, XpertAgentExecutionStatusEnum, XpertMarketplaceBusinessCategories, XpertMarketplaceCollaborationModes, XpertMarketplaceTechnicalCategories, XpertParameterTypeEnum, XpertProjectAssetSourceEnum, XpertProjectAutomationRunStatusEnum, XpertProjectAutomationTriggerEnum, XpertProjectPlanViewEnum, XpertProjectTaskPriorityEnum, XpertProjectTaskStatusEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, XpertWorkbenchInitialLayoutEnum, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, buildXpertMarketplaceProfileSnapshot, canAllowMcpToolDirectly, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createRuntimeSkillCapabilityId, createThreadGoalClearedEvent, createThreadGoalUpdatedEvent, createXpertGraph, createXpertNodes, decodeKnowledgeSeparators, defaultMcpToolApprovalMode, deriveXpertMarketplaceTechnicalProfile, ensureAssistantBindingSkillWorkspacePreference, evidenceDrivenStrategy, figureOutXpert, filterAssistantBindingDisabledSkillIds, filterAssistantBindingDisabledTools, filterMessageText, findStartNodes, genJSONParseKey, genJSONStringifyKey, genListOperatorKey, genPipelineChunkerKey, genPipelineKnowledgeBaseKey, genPipelineProcessorKey, genPipelineSourceKey, genPipelineUnderstandingKey, genVariableAggregatorKey, genXpertDBDeleteKey, genXpertDBInsertKey, genXpertDBQueryKey, genXpertDBSqlKey, genXpertDBUpdateKey, genXpertIteratorKey, genXpertMiddlewareKey, genXpertSkillKey, genXpertStartKey, genXpertTriggerKey, generateCronExpression, getAgentMiddlewareNodes, getAgentVarGroup, getAssistantBindingDisabledSkillIds, getAssistantBindingDisabledTools, getAssistantManagement, getCurrentGraph, getEnabledTools, getStoreNamespace, getSwarmPartners, getTagTargets, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, getXpertWorkspaceVisibility, hasEnabledKnowledgeRetrievalSource, inferMessageAppendContext, isAgentKey, isAgentWorkflowNode, isAgentWorkflowNodeType, isAssistantBindingSkillEnabled, isAssistantBindingToolEnabled, isAssistantBindingToolPreferencesEmpty, isAudioType, isBlank, isContextCompressionComponentData, isDocumentKnowledgebaseType, isDocumentSheet, isEnableTool, isEnterpriseH5Platform, isEvidenceProposal, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isKnowledgeDocumentVisible, isKnowledgeTableMetadata, isKnowledgeWikiChunkMetadata, isKnowledgeWikiPageContributionPayload, isKnowledgeWikiPageSourcePayload, isLearningProposal, isMessageGroup, isMiddlewareToolEnabled, isNativeKnowledgeTableDocument, isNil$1 as isNil, isOrganizationSharedXpertWorkspace, isOutputTokenParameter, isPreparedCandidate, isProviderEvaluation, isProviderRelease, isReplayEvaluation, isRequiredMiddleware, isRouterKey, isRunnableThreadGoalStatus, isStagedRelease, isString, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserAddableAgentMiddleware, isUserManagedAssistant, isUserOrganizationEntryGuideKey, isVideoType, isXpertNodeType, knowledgeDocumentFileType, knowledgeUploadFileTypes, knowledgebaseDocumentParserDefaults, knowledgebaseParserSelection, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, nonBlank, nonNullable, normalizeAssistantBindingToolPreferences, normalizeKnowledgebaseFAQRecall, normalizeKnowledgebaseWikiConfig, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeModelParameterValue, normalizeXpertAgentConfig, omitXpertRelations, parseGithubSkillInstallCommand, parseRuntimeSkillCapabilityId, replaceAgentInDraft, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveI18nText, resolveMessageAppendContext, resolveModelParameterOptions, resolveRuntimeXpert, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, updateAssistantBindingSkillPreferences, updateAssistantBindingToolPreferences, uuid, workflowNodeIdentifier, xpertLabel };
8137
+ var codingExecutionViewKey = "platform.coding-execution__execution";
8138
+ var executionActivityCapabilitiesSchema = z.object({
8139
+ version: z.literal(1),
8140
+ presentation: z.literal("coding")
8141
+ }).strict();
8142
+ var text = z.string().max(65536);
8143
+ var change = z.object({
8144
+ path: z.string().max(4096),
8145
+ change: z.enum([
8146
+ "created",
8147
+ "modified",
8148
+ "deleted",
8149
+ "reported"
8150
+ ]),
8151
+ patch: text.optional()
8152
+ }).strict();
8153
+ var executionActivityItemSchema = z.object({
8154
+ id: z.string().min(1).max(512),
8155
+ occurredAt: z.string().datetime({
8156
+ offset: true
8157
+ }).optional(),
8158
+ content: z.discriminatedUnion("kind", [
8159
+ z.object({
8160
+ kind: z.literal("message"),
8161
+ text: text
8162
+ }).strict(),
8163
+ z.object({
8164
+ kind: z.literal("tool"),
8165
+ name: z.string().max(256).optional(),
8166
+ status: z.enum([
8167
+ "running",
8168
+ "succeeded",
8169
+ "failed",
8170
+ "unknown"
8171
+ ]),
8172
+ input: text.optional(),
8173
+ output: z.string().max(2 * 1024 * 1024).optional(),
8174
+ truncated: z.boolean().optional(),
8175
+ outputRef: z.object({
8176
+ key: z.string().regex(/^[a-f0-9]{64}$/),
8177
+ length: z.number().int().positive()
8178
+ }).strict().optional(),
8179
+ detail: z.discriminatedUnion("type", [
8180
+ z.object({
8181
+ type: z.literal("command"),
8182
+ command: text,
8183
+ cwd: z.string().max(4096).optional(),
8184
+ exitCode: z.number().int().optional(),
8185
+ outputMode: z.literal("merged")
8186
+ }).strict(),
8187
+ z.object({
8188
+ type: z.literal("file_change"),
8189
+ files: z.array(change).max(100)
8190
+ }).strict()
8191
+ ]).optional()
8192
+ }).strict(),
8193
+ z.object({
8194
+ kind: z.literal("diagnostic"),
8195
+ code: z.string().max(128),
8196
+ text: text
8197
+ }).strict()
8198
+ ])
8199
+ }).strict();
8200
+ var executionActivityBatchSchema = z.object({
8201
+ items: z.array(executionActivityItemSchema).max(100),
8202
+ sourceCursor: z.string().max(8192).optional(),
8203
+ expectedSourceCursor: z.string().max(8192).optional(),
8204
+ complete: z.boolean().optional(),
8205
+ gaps: z.array(z.enum([
8206
+ "source_truncated",
8207
+ "storage_unavailable",
8208
+ "capture_limit",
8209
+ "interrupted",
8210
+ "source_lost"
8211
+ ])).max(5).optional()
8212
+ }).strict();
8213
+
8214
+ export { AGENT_OUTPUT_MAX_PATHS, AGENT_PROFILE_TABS_SLOT, AGENT_WORKBENCH_SLOT, AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, ASSISTANT_CHAT_SEND_MESSAGE_COMMAND, ASSISTANT_CITATION_OPEN_EVENT, ASSISTANT_COMPOSER_APPEND_REFERENCES_COMMAND, ASSISTANT_CONTEXT_SET_COMMAND, ASSISTANT_USER_PREFERENCES_VERSION, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BUILTIN_KNOWLEDGE_FILE_TYPES, BUILTIN_KNOWLEDGE_PARSER, BonusTypeEnum, BusinessType, CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY, CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED, CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE, CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED, CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED, CONTEXT_COMPRESSION_COMPONENT_TYPE, CONTEXT_COMPRESSION_MIDDLEWARE_NAME, CONTEXT_VARIABLE_CURRENTSTATE, CONVERSATION_MAP_FEATURE, COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING, COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ChatThreadPurpose, ClientFocusEnum, ConfigurateMethod, ContactOrganizationInviteStatus, ContactType, CredentialFormTypeEnum, CredentialsType, CrudActionEnum, CurrenciesEnum, CurrencyPosition, DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS, DEFAULT_CURRENCIES, DEFAULT_DATE_FORMATS, DEFAULT_INTEGRATION_PAID_FILTERS, DEFAULT_INVITE_EXPIRY_PERIOD, DEFAULT_KNOWLEDGEBASE_FAQ_CONFIG, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL, DEFAULT_KNOWLEDGEBASE_WIKI_CONFIG, DEFAULT_KNOWLEDGE_KEYWORD_ANALYZER, DEFAULT_KNOWLEDGE_RRF_RANK_CONSTANT, DEFAULT_KNOWLEDGE_RRF_WEIGHTS, DEFAULT_KNOWLEDGE_TEXT_SPLITTER, DEFAULT_MEMBERSHIP_CNY_PER_POINT, DEFAULT_MODEL_GATEWAY_BODY_RETENTION_DAYS, DEFAULT_MODEL_GATEWAY_CALL_RETENTION_DAYS, DEFAULT_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, DEFAULT_MODEL_GATEWAY_REQUESTS_PER_MINUTE, DEFAULT_PROFIT_BASED_BONUS, DEFAULT_REVENUE_BASED_BONUS, DEFAULT_SYSTEM_ROLES, DEFAULT_TENANT, DEFAULT_TIME_FORMATS, DEFAULT_TYPE, DEFAULT_XPERT_AGENT_RECURSION_LIMIT, DEFAULT_XPERT_WORKSPACE_DATA_SCOPE, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, ENTERPRISE_H5_PLATFORMS, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FEEDBACK_LEARNING_STRATEGY, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FetchFrom, FileStorageProviderEnum, GENERAL_PROJECT_TYPE, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HUMAN_PROPOSAL_STRATEGY, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGEBASE_FAQ_RETRIEVAL_MODES, KNOWLEDGEBASE_OPEN_CITATION_EFFECT, KNOWLEDGE_AUTOMATIC_TAG_CANDIDATES, KNOWLEDGE_AUTOMATIC_TAG_MAXIMUM, KNOWLEDGE_AUTOMATIC_TAG_TEXT_BUDGET, KNOWLEDGE_CHUNKING_ALGORITHM_VERSION, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_DOCUMENT_AGENT_WRITER_TYPE, KNOWLEDGE_FAQ_ANSWER_BLOCK_MAX_COUNT, KNOWLEDGE_FAQ_ANSWER_TOTAL_MAX_LENGTH, KNOWLEDGE_FAQ_MAX_LOGICAL_VECTOR_COUNT, KNOWLEDGE_FAQ_NEGATIVE_QUESTION_MAX_COUNT, KNOWLEDGE_FAQ_NEGATIVE_QUESTION_MAX_LENGTH, KNOWLEDGE_FAQ_SIMILAR_QUESTION_MAX_COUNT, KNOWLEDGE_FAQ_SIMILAR_QUESTION_MAX_LENGTH, KNOWLEDGE_FAQ_STANDARD_QUESTION_MAX_LENGTH, KNOWLEDGE_FILTER_MAX_CONDITIONS, KNOWLEDGE_FILTER_MAX_DEPTH, KNOWLEDGE_FILTER_MAX_SET_VALUES, KNOWLEDGE_FILTER_MAX_STRING_LENGTH, KNOWLEDGE_FILTER_VERSION, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_GRAPH_DOCUMENT_STATUS_BATCH_SIZE, KNOWLEDGE_PROCESSING_MODE_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KNOWLEDGE_SYSTEM_FILTER_FIELDS, KNOWLEDGE_WIKI_DEFAULT_PAGE_SIZE, KNOWLEDGE_WIKI_DELETION_RECEIPT_RETENTION_DAYS, KNOWLEDGE_WIKI_DOCUMENT_STATUS_BATCH_SIZE, KNOWLEDGE_WIKI_FAILED_CONTENT_RETENTION_DAYS, KNOWLEDGE_WIKI_MAX_ALIASES, KNOWLEDGE_WIKI_MAX_CANONICAL_NAME_LENGTH, KNOWLEDGE_WIKI_MAX_CUSTOM_INSTRUCTION_LENGTH, KNOWLEDGE_WIKI_MAX_FACTS, KNOWLEDGE_WIKI_MAX_FACT_LENGTH, KNOWLEDGE_WIKI_MAX_PAGE_SIZE, KNOWLEDGE_WIKI_MAX_SEARCH_LENGTH, KNOWLEDGE_WIKI_MAX_SOURCE_CHUNKS_PER_FACT, KNOWLEDGE_WIKI_MAX_SUGGESTED_LINKS, KNOWLEDGE_WIKI_MAX_SUMMARY_LENGTH, KNOWLEDGE_WIKI_OPERATION_RETENTION_DAYS, KNOWLEDGE_WIKI_SCHEMA_VERSION, KNOWLEDGE_WIKI_STALE_VECTOR_CLEANUP_SLO_HOURS, KnowledgeGraphIndexJobStatus, KnowledgeGraphStatus, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, LEGACY_AGENT_WORKBENCH_SLOTS, LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME, LanguagesEnum, LanguagesMap, ListsInputTypeEnum, LongTermMemoryTypeEnum, MAX_COPILOT_CHECKPOINT_RETENTION_DAYS, MAX_MODEL_GATEWAY_BODY_RETENTION_DAYS, MAX_MODEL_GATEWAY_CALL_RETENTION_DAYS, MAX_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, MAX_MODEL_GATEWAY_REQUESTS_PER_MINUTE, MCPServerType, MCP_API_KEY_SUBJECT_TYPES, MCP_APP_RESOURCE_MIME_TYPE, MCP_AUTH_METHODS, MCP_CAPABILITY_APPROVAL_MODES, MCP_CAPABILITY_DESCRIPTOR_VERSION, MCP_CAPABILITY_TYPES, MCP_CAPABILITY_VISIBILITIES, MCP_CONSUMER_AUTH_TYPES, MCP_HTTP_CORS_EXPOSED_HEADERS, MCP_HTTP_CORS_REQUEST_HEADERS, MCP_INVOCATION_STATUSES, MCP_PROTOCOL_VERSION, MCP_PUBLICATION_REVIEW_STATUSES, MCP_PUBLICATION_STATUSES, MCP_REQUIRED_CONTEXTS, MCP_TASK_EXTENSION_ID, MCP_TASK_STATUSES, MCP_TOOL_IDEMPOTENCY, MCP_TOOL_RISKS, MCP_TOOL_SIDE_EFFECTS, MEMBERSHIP_CNY_PER_POINT_SETTING, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MIN_COPILOT_CHECKPOINT_RETENTION_DAYS, MIN_MODEL_GATEWAY_BODY_RETENTION_DAYS, MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS, MIN_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS, MIN_MODEL_GATEWAY_REQUESTS_PER_MINUTE, MODEL_EXECUTION_POLICY_SETTING, MODEL_GATEWAY_CALL_RETENTION_DAYS_SETTING, MODEL_GATEWAY_CALL_RETENTION_ENABLED_SETTING, MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS_SETTING, MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING, MembershipAdminUserStatusEnum, MembershipBulkActionEnum, MembershipLedgerSourceEnum, MembershipPeriodEnum, MembershipPeriodStatusEnum, MembershipPlanStatusEnum, MembershipRenewalModeEnum, MembershipSourceEnum, MembershipStatusEnum, MinimumProjectSizeEnum, ModelAccessActorTypeEnum, ModelAccessChannelEnum, ModelAccessClosedReasonCodeEnum, ModelAccessEventTypeEnum, ModelAccessOwnershipScopeEnum, ModelAccessRequestStatusEnum, ModelAccessSourceEnum, ModelAccessUnavailableReasonEnum, ModelFeature, ModelGatewayApiKeyLifetimeEnum, ModelGatewayApiKeyStatusEnum, ModelGatewayCallStatusEnum, ModelGatewayUsageChannelEnum, ModelGatewayUsageSourceEnum, ModelPropertyKey, OllamaEmbeddingsProviders, OpenAIEmbeddingsProviders, OrderTypeEnum, OrganizationContactBudgetTypeEnum, OrganizationDemoNetworkEnum, OrganizationPermissionsEnum, OrganizationProjectBudgetTypeEnum, OrganizationSelectInput, PLUGIN_APPLICATION_INSTALLATION_STATUS, PLUGIN_APPLICATION_SCOPE, PLUGIN_COMPONENT_TYPE, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY, PLUGIN_MARKETPLACE_CATEGORIES, PLUGIN_MARKETPLACE_INSTALLATION_POLICY, PLUGIN_MARKETPLACE_SUBCATEGORIES, PLUGIN_MCP_TOOL_APPROVAL_MODE, PLUGIN_RESOURCE_ERROR_CODE, PLUGIN_RESOURCE_INSTALLATION_STATUS, PLUGIN_RESOURCE_RUNTIME_TYPE, PLUGIN_SOURCE, PROJECT_TASK_ICON_NAMES, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProviderEnum, ProviderType, RUNTIME_RESTART_CONFIRMATION, RegionsEnum, RequestMethodEnum, RequestScopeLevel, RolesEnum, SANDBOX_FILE_OUTPUT_RULES, SANDBOX_MANAGED_SERVICE_STATUSES, SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES, SANDBOX_TERMINAL_NAMESPACE, SANDBOX_WORK_FOR_TYPES, SKILLS_MIDDLEWARE_NAME, SMTPSecureEnum, STANDARD_METADATA_FIELDS, STATE_SYS_AGENT_WORKSPACE_PATH, STATE_SYS_MEMORY_WORKSPACE_PATH, STATE_SYS_SESSION_WORKSPACE_PATH, STATE_SYS_SHARED_WORKSPACE_PATH, STATE_SYS_THREAD_ID, STATE_SYS_VOLUME, STATE_SYS_WORKSPACE_PATH, STATE_SYS_WORKSPACE_ROOT, STATE_SYS_WORKSPACE_URL, STATE_VARIABLE_FILES, STATE_VARIABLE_HUMAN, STATE_VARIABLE_INPUT, STATE_VARIABLE_SYS, STATE_VARIABLE_TITLE_CHANNEL, SandboxManagedServiceErrorCode, SandboxTerminalClientEvent, SandboxTerminalClosedReason, SandboxTerminalErrorCode, SandboxTerminalServerEvent, ScheduleTaskStatus, SecretTokenBindingType, TAG_TARGETS, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, THREAD_GOAL_STATUS_VALUES, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT, UserGroupManagedByEnum, UserGroupManagedEntityTypeEnum, UserModelGrantStatusEnum, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET, WORKBENCH_AGENT_EVOLUTION_TARGET, WORKBENCH_ASSISTANT_CONVERSATION_TARGET, WORKBENCH_ASSISTANT_EXECUTION_TARGET, WORKBENCH_ASSISTANT_PROJECT_TARGET, WORKBENCH_EXTENSION_VIEW_TARGET, WORKBENCH_FILE_OPEN_COMMAND, WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET, WORKBENCH_NAVIGATION_OPEN_COMMAND, WORKBENCH_VIEW_OPEN_EVENT, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE, XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY, XPERT_TASK_SCHEDULE_PROPERTY_PREFIX, XPERT_VIEW_CONVERSATION_ID_HEADER, XPERT_VIEW_PROJECT_ID_HEADER, XpertAccessRequestStatusEnum, XpertAgentExecutionStatusEnum, XpertMarketplaceBusinessCategories, XpertMarketplaceCollaborationModes, XpertMarketplaceTechnicalCategories, XpertParameterTypeEnum, XpertProjectAssetSourceEnum, XpertProjectAutomationRunStatusEnum, XpertProjectAutomationTriggerEnum, XpertProjectPlanViewEnum, XpertProjectTaskPriorityEnum, XpertProjectTaskStatusEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, XpertWorkbenchInitialLayoutEnum, agentInvocationStatusSchema, agentInvocationTerminalStatusSchema, agentLabel, agentOutputDeliverySchema, agentResultPathSchema, agentRuntimeModelSourceSchema, agentRuntimeProgressSchema, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, buildXpertMarketplaceProfileSnapshot, canAllowMcpToolDirectly, channelName, chatMessagePresentation, classificateDocumentCategory, codingExecutionViewKey, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createRuntimeSkillCapabilityId, createThreadGoalClearedEvent, createThreadGoalUpdatedEvent, createXpertGraph, createXpertNodes, decodeKnowledgeSeparators, defaultMcpToolApprovalMode, deriveXpertMarketplaceTechnicalProfile, ensureAssistantBindingSkillWorkspacePreference, evidenceDrivenStrategy, executionActivityBatchSchema, executionActivityCapabilitiesSchema, executionActivityItemSchema, figureOutXpert, filterAssistantBindingDisabledSkillIds, filterAssistantBindingDisabledTools, filterMessageText, findStartNodes, forecastProjectTasks, genJSONParseKey, genJSONStringifyKey, genListOperatorKey, genPipelineChunkerKey, genPipelineKnowledgeBaseKey, genPipelineProcessorKey, genPipelineSourceKey, genPipelineUnderstandingKey, genVariableAggregatorKey, genXpertDBDeleteKey, genXpertDBInsertKey, genXpertDBQueryKey, genXpertDBSqlKey, genXpertDBUpdateKey, genXpertIteratorKey, genXpertMiddlewareKey, genXpertSkillKey, genXpertStartKey, genXpertTriggerKey, generateCronExpression, getAgentMiddlewareNodes, getAgentVarGroup, getAssistantBindingDisabledSkillIds, getAssistantBindingDisabledTools, getAssistantManagement, getCurrentGraph, getEnabledTools, getStoreNamespace, getSwarmPartners, getTagTargets, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, getXpertWorkspaceVisibility, hasEnabledKnowledgeRetrievalSource, inferMessageAppendContext, isAgentKey, isAgentWorkflowNode, isAgentWorkflowNodeType, isAssistantBindingSkillEnabled, isAssistantBindingToolEnabled, isAssistantBindingToolPreferencesEmpty, isAudioType, isBlank, isContextCompressionComponentData, isDocumentKnowledgebaseType, isDocumentSheet, isEnableTool, isEnterpriseH5Platform, isEvidenceProposal, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isKnowledgeDocumentVisible, isKnowledgeTableMetadata, isKnowledgeWikiChunkMetadata, isKnowledgeWikiPageContributionPayload, isKnowledgeWikiPageSourcePayload, isLearningProposal, isMessageGroup, isMiddlewareToolEnabled, isNativeKnowledgeTableDocument, isNil$1 as isNil, isOrganizationSharedXpertWorkspace, isOutputTokenParameter, isPreparedCandidate, isPromptWorkflowScenarios, isProviderEvaluation, isProviderRelease, isReplayEvaluation, isRequiredMiddleware, isRouterKey, isRunnableThreadGoalStatus, isRuntimeChatMessage, isScopedPromptCapabilityConfig, isStagedRelease, isString, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserAddableAgentMiddleware, isUserManagedAssistant, isUserOrganizationEntryGuideKey, isVideoType, isXpertNodeType, knowledgeDocumentFileType, knowledgeUploadFileTypes, knowledgebaseDocumentParserDefaults, knowledgebaseParserSelection, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, modelExecutionEntry, modelExecutionSourceId, nonBlank, nonNullable, normalizeAssistantBindingToolPreferences, normalizeKnowledgebaseFAQRecall, normalizeKnowledgebaseWikiConfig, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeModelParameterValue, normalizeXpertAgentConfig, omitXpertRelations, orderAssistantXperts, parseGithubSkillInstallCommand, parsePromptCapabilityConfig, parsePromptCapabilitySelection, parseRuntimeSkillCapabilityId, parseWorkbenchViewOpenEvent, projectTaskDecisionInputSchema, projectTaskDecisionSchema, projectTaskDispatchInputSchema, projectTaskDispatchReceiptSchema, projectTaskEvidenceReferenceSchema, projectTaskExecutionContextSchema, projectTaskExecutionPurposeSchema, projectTaskExecutionReferenceSchema, projectTaskReviewReportSchema, projectTaskSpecificationDigestSchema, projectTaskSpecificationSchema, projectTaskSpecificationSnapshotSchema, replaceAgentInDraft, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveI18nText, resolveMessageAppendContext, resolveModelParameterOptions, resolvePromptWorkflowCapabilities, resolveRuntimeXpert, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, updateAssistantBindingSkillPreferences, updateAssistantBindingToolPreferences, uuid, validateProjectTaskGraph, workflowNodeIdentifier, xpertLabel };