@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.cjs.js CHANGED
@@ -1,6 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var ShortUniqueId = require('short-unique-id');
4
+ var chatkitTypes = require('@xpert-ai/chatkit-types');
5
+ var v3 = require('zod/v3');
4
6
 
5
7
  function resolveI18nText(value) {
6
8
  var language = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
@@ -87,30 +89,30 @@ function resolveI18nText(value) {
87
89
  return null;
88
90
  }
89
91
 
90
- function _array_like_to_array$b(arr, len) {
92
+ function _array_like_to_array$e(arr, len) {
91
93
  if (len == null || len > arr.length) len = arr.length;
92
94
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
93
95
  return arr2;
94
96
  }
95
- function _array_without_holes$5(arr) {
96
- if (Array.isArray(arr)) return _array_like_to_array$b(arr);
97
+ function _array_without_holes$7(arr) {
98
+ if (Array.isArray(arr)) return _array_like_to_array$e(arr);
97
99
  }
98
- function _iterable_to_array$7(iter) {
100
+ function _iterable_to_array$9(iter) {
99
101
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
100
102
  }
101
- function _non_iterable_spread$5() {
103
+ function _non_iterable_spread$7() {
102
104
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
103
105
  }
104
- function _to_consumable_array$5(arr) {
105
- return _array_without_holes$5(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$5();
106
+ function _to_consumable_array$7(arr) {
107
+ return _array_without_holes$7(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$7();
106
108
  }
107
- function _unsupported_iterable_to_array$b(o, minLen) {
109
+ function _unsupported_iterable_to_array$e(o, minLen) {
108
110
  if (!o) return;
109
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
111
+ if (typeof o === "string") return _array_like_to_array$e(o, minLen);
110
112
  var n = Object.prototype.toString.call(o).slice(8, -1);
111
113
  if (n === "Object" && o.constructor) n = o.constructor.name;
112
114
  if (n === "Map" || n === "Set") return Array.from(n);
113
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
115
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
114
116
  }
115
117
  var _uuidGenerator;
116
118
  var uuidGenerator = new ShortUniqueId({
@@ -120,7 +122,7 @@ var uuid = function() {
120
122
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
121
123
  args[_key] = arguments[_key];
122
124
  }
123
- return (_uuidGenerator = uuidGenerator).randomUUID.apply(_uuidGenerator, _to_consumable_array$5(args));
125
+ return (_uuidGenerator = uuidGenerator).randomUUID.apply(_uuidGenerator, _to_consumable_array$7(args));
124
126
  };
125
127
  // Parameters
126
128
  exports.ParameterTypeEnum = void 0;
@@ -137,7 +139,290 @@ function letterStartSUID(start) {
137
139
  return start + uuid();
138
140
  }
139
141
 
140
- function _instanceof$1(left, right) {
142
+ /** Portable presentation tokens. Clients render their own trusted icon components. */ var PROJECT_TASK_ICON_NAMES = [
143
+ "FileText",
144
+ "FileScan",
145
+ "FileSearch",
146
+ "ListChecks",
147
+ "ListTree",
148
+ "ShieldCheck",
149
+ "FilePenLine",
150
+ "Workflow",
151
+ "Images",
152
+ "FolderInput",
153
+ "FileOutput"
154
+ ];
155
+
156
+ /** A summary's incoming dependencies constrain its children without making them wait for the summary itself. */ function _array_like_to_array$d(arr, len) {
157
+ if (len == null || len > arr.length) len = arr.length;
158
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
159
+ return arr2;
160
+ }
161
+ function _array_without_holes$6(arr) {
162
+ if (Array.isArray(arr)) return _array_like_to_array$d(arr);
163
+ }
164
+ function _iterable_to_array$8(iter) {
165
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
166
+ }
167
+ function _non_iterable_spread$6() {
168
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
169
+ }
170
+ function _to_consumable_array$6(arr) {
171
+ return _array_without_holes$6(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$6();
172
+ }
173
+ function _unsupported_iterable_to_array$d(o, minLen) {
174
+ if (!o) return;
175
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
176
+ var n = Object.prototype.toString.call(o).slice(8, -1);
177
+ if (n === "Object" && o.constructor) n = o.constructor.name;
178
+ if (n === "Map" || n === "Set") return Array.from(n);
179
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
180
+ }
181
+ function schedulePredecessors(task, byId) {
182
+ var ids = new Set(task.predecessorIds);
183
+ var seen = new Set();
184
+ var parentId = task.parentTaskId;
185
+ while(parentId && !seen.has(parentId)){
186
+ seen.add(parentId);
187
+ var parent = byId.get(parentId);
188
+ if (!parent || parent.kind !== "summary") break;
189
+ parent.predecessorIds.forEach(function(id) {
190
+ return ids.add(id);
191
+ });
192
+ parentId = parent.parentTaskId;
193
+ }
194
+ return _to_consumable_array$6(ids);
195
+ }
196
+ /** Tree containment and finish-to-start dependencies are separate acyclic graphs. */ function validateProjectTaskGraph(tasks) {
197
+ var _loop = function(_i1, _iter1) {
198
+ var relation = _iter1[_i1];
199
+ var visited = new Set(), active = new Set();
200
+ var visit = function(id) {
201
+ if (active.has(id)) throw Error("PROJECT_TASK_".concat(relation.toUpperCase(), "_CYCLE: ").concat(id));
202
+ if (visited.has(id)) return;
203
+ var task = byId.get(id);
204
+ if (!task) throw Error("PROJECT_TASK_RELATION_NOT_FOUND: ".concat(id));
205
+ active.add(id);
206
+ var references = relation === "tree" ? task.parentTaskId ? [
207
+ task.parentTaskId
208
+ ] : [] : _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) {
209
+ return child.parentTaskId === task.id;
210
+ }).map(function(child) {
211
+ return child.id;
212
+ }) : []));
213
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
214
+ try {
215
+ for(var _iterator = references[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
216
+ var next = _step.value;
217
+ visit(next);
218
+ }
219
+ } catch (err) {
220
+ _didIteratorError = true;
221
+ _iteratorError = err;
222
+ } finally{
223
+ try {
224
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
225
+ _iterator.return();
226
+ }
227
+ } finally{
228
+ if (_didIteratorError) {
229
+ throw _iteratorError;
230
+ }
231
+ }
232
+ }
233
+ active.delete(id);
234
+ visited.add(id);
235
+ };
236
+ tasks.forEach(function(task) {
237
+ return visit(task.id);
238
+ });
239
+ };
240
+ var byId = new Map(tasks.map(function(task) {
241
+ return [
242
+ task.id,
243
+ task
244
+ ];
245
+ }));
246
+ if (byId.size !== tasks.length) throw Error("PROJECT_TASK_DUPLICATE_ID");
247
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
248
+ try {
249
+ for(var _iterator = tasks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
250
+ var task = _step.value;
251
+ if (task.estimatedDurationMs != null && (!Number.isFinite(task.estimatedDurationMs) || task.estimatedDurationMs < 0)) {
252
+ throw Error("PROJECT_TASK_DURATION_INVALID: ".concat(task.id));
253
+ }
254
+ for(var _i = 0, _iter = [
255
+ task.plannedStartAt,
256
+ task.plannedEndAt
257
+ ]; _i < _iter.length; _i++){
258
+ var date = _iter[_i];
259
+ if (date != null && !Number.isFinite(Date.parse(date))) throw Error("PROJECT_TASK_DATE_INVALID: ".concat(task.id));
260
+ }
261
+ if (task.plannedStartAt && task.plannedEndAt && Date.parse(task.plannedEndAt) < Date.parse(task.plannedStartAt)) {
262
+ throw Error("PROJECT_TASK_DATE_ORDER: ".concat(task.id));
263
+ }
264
+ }
265
+ } catch (err) {
266
+ _didIteratorError = true;
267
+ _iteratorError = err;
268
+ } finally{
269
+ try {
270
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
271
+ _iterator.return();
272
+ }
273
+ } finally{
274
+ if (_didIteratorError) {
275
+ throw _iteratorError;
276
+ }
277
+ }
278
+ }
279
+ for(var _i1 = 0, _iter1 = [
280
+ "tree",
281
+ "dependency",
282
+ "schedule"
283
+ ]; _i1 < _iter1.length; _i1++)_loop(_i1, _iter1);
284
+ }
285
+ /** Unknown estimates stay unknown. Summary rows never contribute another duration. */ function forecastProjectTasks(tasks, changedId) {
286
+ validateProjectTaskGraph(tasks);
287
+ var byId = new Map(tasks.map(function(task) {
288
+ return [
289
+ task.id,
290
+ task
291
+ ];
292
+ }));
293
+ var result = new Map();
294
+ var affected = new Set(changedId ? [
295
+ changedId
296
+ ] : []);
297
+ var visiting = new Set();
298
+ var calculate = function(task) {
299
+ var previous = result.get(task.id);
300
+ if (previous) return previous;
301
+ if (visiting.has(task.id)) throw Error("PROJECT_TASK_SCHEDULE_CYCLE: ".concat(task.id));
302
+ visiting.add(task.id);
303
+ var predecessors = schedulePredecessors(task, byId).map(function(id) {
304
+ return calculate(byId.get(id));
305
+ });
306
+ if (predecessors.some(function(item) {
307
+ return affected.has(item.taskId);
308
+ })) affected.add(task.id);
309
+ var startAt = null, endAt = null;
310
+ if (task.kind === "summary") {
311
+ var _Math, _Math1;
312
+ var children = tasks.filter(function(child) {
313
+ return child.parentTaskId === task.id;
314
+ }).map(calculate);
315
+ var starts = children.flatMap(function(child) {
316
+ return child.startAt ? [
317
+ Date.parse(child.startAt)
318
+ ] : [];
319
+ });
320
+ startAt = starts.length ? new Date((_Math = Math).min.apply(_Math, _to_consumable_array$6(starts))).toISOString() : null;
321
+ endAt = children.length && children.every(function(child) {
322
+ return child.endAt;
323
+ }) ? new Date((_Math1 = Math).max.apply(_Math1, _to_consumable_array$6(children.map(function(child) {
324
+ return Date.parse(child.endAt);
325
+ })))).toISOString() : null;
326
+ if (children.some(function(child) {
327
+ return affected.has(child.taskId);
328
+ })) affected.add(task.id);
329
+ } else if (task.actualEndAt && task.status === "done") {
330
+ startAt = task.actualStartAt;
331
+ endAt = task.actualEndAt;
332
+ } else {
333
+ var _Math2;
334
+ var _task_estimatedDurationMs;
335
+ 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;
336
+ var _task_actualStartAt;
337
+ var start = (_task_actualStartAt = task.actualStartAt) !== null && _task_actualStartAt !== void 0 ? _task_actualStartAt : task.plannedStartAt;
338
+ var predecessorEnds = predecessors.map(function(item) {
339
+ return item.endAt ? Date.parse(item.endAt) : null;
340
+ });
341
+ var earliest = task.actualStartAt ? Date.parse(task.actualStartAt) : predecessorEnds.some(function(value) {
342
+ return value === null;
343
+ }) ? null : start !== null || predecessorEnds.length ? (_Math2 = Math).max.apply(_Math2, _to_consumable_array$6(start !== null ? [
344
+ Date.parse(start)
345
+ ] : []).concat(_to_consumable_array$6(predecessorEnds.map(function(value) {
346
+ return value;
347
+ })))) : null;
348
+ startAt = earliest === null ? null : new Date(earliest).toISOString();
349
+ // A blocked task has no known release date. Show affected successors without inventing one.
350
+ endAt = earliest === null || duration === null || [
351
+ "blocked",
352
+ "paused",
353
+ "cancelled"
354
+ ].includes(task.status) || Boolean(task.actualEndAt && task.status !== "done") ? null : new Date(earliest + duration).toISOString();
355
+ }
356
+ var forecast = {
357
+ taskId: task.id,
358
+ startAt: startAt,
359
+ endAt: endAt,
360
+ affected: affected.has(task.id),
361
+ critical: false
362
+ };
363
+ result.set(task.id, forecast);
364
+ visiting.delete(task.id);
365
+ return forecast;
366
+ };
367
+ tasks.forEach(calculate);
368
+ // Critical highlighting is only meaningful when every executable task has an estimate.
369
+ var leaves = tasks.filter(function(task) {
370
+ return task.kind !== "summary";
371
+ });
372
+ if (leaves.length && leaves.every(function(task) {
373
+ return result.get(task.id).endAt !== null;
374
+ })) {
375
+ var _Math;
376
+ var finish = (_Math = Math).max.apply(_Math, _to_consumable_array$6(leaves.map(function(task) {
377
+ return Date.parse(result.get(task.id).endAt);
378
+ })));
379
+ var mark = function(id) {
380
+ var item = result.get(id);
381
+ if (item.critical) return;
382
+ if (byId.get(id).kind === "summary") {
383
+ tasks.filter(function(child) {
384
+ var _result_get;
385
+ return child.parentTaskId === id && ((_result_get = result.get(child.id)) === null || _result_get === void 0 ? void 0 : _result_get.endAt) === item.endAt;
386
+ }).forEach(function(child) {
387
+ return mark(child.id);
388
+ });
389
+ return;
390
+ }
391
+ item.critical = true;
392
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
393
+ try {
394
+ for(var _iterator = schedulePredecessors(byId.get(id), byId)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
395
+ var parent = _step.value;
396
+ var endAt = result.get(parent).endAt;
397
+ if (endAt && item.startAt && Date.parse(endAt) === Date.parse(item.startAt)) mark(parent);
398
+ }
399
+ } catch (err) {
400
+ _didIteratorError = true;
401
+ _iteratorError = err;
402
+ } finally{
403
+ try {
404
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
405
+ _iterator.return();
406
+ }
407
+ } finally{
408
+ if (_didIteratorError) {
409
+ throw _iteratorError;
410
+ }
411
+ }
412
+ }
413
+ };
414
+ leaves.filter(function(task) {
415
+ return Date.parse(result.get(task.id).endAt) === finish;
416
+ }).forEach(function(task) {
417
+ return mark(task.id);
418
+ });
419
+ }
420
+ return tasks.map(function(task) {
421
+ return result.get(task.id);
422
+ });
423
+ }
424
+
425
+ function _instanceof$2(left, right) {
141
426
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
142
427
  return !!right[Symbol.hasInstance](left);
143
428
  } else {
@@ -151,7 +436,7 @@ function nonNullable(value) {
151
436
  return value != null;
152
437
  }
153
438
  function isString(value) {
154
- return typeof value === "string" || _instanceof$1(value, String);
439
+ return typeof value === "string" || _instanceof$2(value, String);
155
440
  }
156
441
  function isBlank(value) {
157
442
  return isNil$1(value) || isString(value) && !value.trim();
@@ -1028,6 +1313,163 @@ exports.OrganizationDemoNetworkEnum = void 0;
1028
1313
  OrganizationDemoNetworkEnum["aliyun"] = "aliyun";
1029
1314
  })(exports.OrganizationDemoNetworkEnum || (exports.OrganizationDemoNetworkEnum = {}));
1030
1315
 
1316
+ function _define_property$e(obj, key, value) {
1317
+ if (key in obj) {
1318
+ Object.defineProperty(obj, key, {
1319
+ value: value,
1320
+ enumerable: true,
1321
+ configurable: true,
1322
+ writable: true
1323
+ });
1324
+ } else {
1325
+ obj[key] = value;
1326
+ }
1327
+ return obj;
1328
+ }
1329
+ function _object_spread$d(target) {
1330
+ for(var i = 1; i < arguments.length; i++){
1331
+ var source = arguments[i] != null ? arguments[i] : {};
1332
+ var ownKeys = Object.keys(source);
1333
+ if (typeof Object.getOwnPropertySymbols === "function") {
1334
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1335
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1336
+ }));
1337
+ }
1338
+ ownKeys.forEach(function(key) {
1339
+ _define_property$e(target, key, source[key]);
1340
+ });
1341
+ }
1342
+ return target;
1343
+ }
1344
+ function ownKeys$8(object, enumerableOnly) {
1345
+ var keys = Object.keys(object);
1346
+ if (Object.getOwnPropertySymbols) {
1347
+ var symbols = Object.getOwnPropertySymbols(object);
1348
+ keys.push.apply(keys, symbols);
1349
+ }
1350
+ return keys;
1351
+ }
1352
+ function _object_spread_props$8(target, source) {
1353
+ source = source != null ? source : {};
1354
+ if (Object.getOwnPropertyDescriptors) {
1355
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1356
+ } else {
1357
+ ownKeys$8(Object(source)).forEach(function(key) {
1358
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1359
+ });
1360
+ }
1361
+ return target;
1362
+ }
1363
+ function _type_of(obj) {
1364
+ "@swc/helpers - typeof";
1365
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1366
+ }
1367
+ function isObject(value) {
1368
+ return typeof value === "object" && value !== null && !Array.isArray(value);
1369
+ }
1370
+ function isStringList(value) {
1371
+ return Array.isArray(value) && value.every(function(item) {
1372
+ return typeof item === "string";
1373
+ });
1374
+ }
1375
+ function parseSelectionSet(value) {
1376
+ if (!isObject(value)) return null;
1377
+ var skills = "skills" in value ? value.skills : undefined;
1378
+ var plugins = "plugins" in value ? value.plugins : undefined;
1379
+ var subAgents = "subAgents" in value ? value.subAgents : undefined;
1380
+ var connectors = "connectors" in value ? value.connectors : undefined;
1381
+ if (skills !== undefined && (!isObject(skills) || !("ids" in skills) || !isStringList(skills.ids) || "workspaceId" in skills && skills.workspaceId !== undefined && typeof skills.workspaceId !== "string")) return null;
1382
+ if (plugins !== undefined && (!isObject(plugins) || !("nodeKeys" in plugins) || !isStringList(plugins.nodeKeys))) return null;
1383
+ if (subAgents !== undefined && (!isObject(subAgents) || !("nodeKeys" in subAgents) || !isStringList(subAgents.nodeKeys))) return null;
1384
+ if (connectors !== undefined && (!isObject(connectors) || !("bindingIds" in connectors) || !isStringList(connectors.bindingIds))) return null;
1385
+ return _object_spread$d(_object_spread_props$8(_object_spread$d({}, value), {
1386
+ skills: skills === undefined ? {
1387
+ ids: []
1388
+ } : skills,
1389
+ plugins: plugins === undefined ? {
1390
+ nodeKeys: []
1391
+ } : plugins
1392
+ }), subAgents === undefined ? {} : {
1393
+ subAgents: subAgents
1394
+ }, connectors === undefined ? {} : {
1395
+ connectors: connectors
1396
+ });
1397
+ }
1398
+ function parsePromptCapabilitySelection(value) {
1399
+ if (!isObject(value) || !("mode" in value) || value.mode !== "allowlist") return null;
1400
+ if ("inheritUnselected" in value && value.inheritUnselected !== undefined && typeof value.inheritUnselected !== "boolean") return null;
1401
+ var selection = parseSelectionSet(value);
1402
+ var recommended = "recommended" in value && value.recommended != null ? parseSelectionSet(value.recommended) : undefined;
1403
+ if (!selection || recommended === null) return null;
1404
+ return _object_spread$d(_object_spread_props$8(_object_spread$d({}, selection), {
1405
+ mode: "allowlist"
1406
+ }), "inheritUnselected" in value && typeof value.inheritUnselected === "boolean" ? {
1407
+ inheritUnselected: value.inheritUnselected
1408
+ } : {}, recommended ? {
1409
+ recommended: recommended
1410
+ } : {});
1411
+ }
1412
+ function isScopedPromptCapabilityConfig(value) {
1413
+ return isObject(value) && "type" in value && value.type === "expert_scoped_capabilities";
1414
+ }
1415
+ function parsePromptCapabilityConfig(value) {
1416
+ 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;
1417
+ var defaults = "defaults" in value && value.defaults != null ? parsePromptCapabilitySelection(value.defaults) : null;
1418
+ if ("defaults" in value && value.defaults != null && !defaults) return null;
1419
+ var experts = [];
1420
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1421
+ try {
1422
+ var _loop = function() {
1423
+ var entry = _step.value;
1424
+ if (!isObject(entry) || !("xpertId" in entry) || typeof entry.xpertId !== "string" || !entry.xpertId.trim() || !("selection" in entry) || experts.some(function(item) {
1425
+ return item.xpertId === entry.xpertId;
1426
+ })) return {
1427
+ v: null
1428
+ };
1429
+ var selection = entry.selection === null ? null : parsePromptCapabilitySelection(entry.selection);
1430
+ if (entry.selection !== null && !selection) return {
1431
+ v: null
1432
+ };
1433
+ experts.push({
1434
+ xpertId: entry.xpertId,
1435
+ selection: selection
1436
+ });
1437
+ };
1438
+ for(var _iterator = value.experts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1439
+ var _ret = _loop();
1440
+ if (_type_of(_ret) === "object") return _ret.v;
1441
+ }
1442
+ } catch (err) {
1443
+ _didIteratorError = true;
1444
+ _iteratorError = err;
1445
+ } finally{
1446
+ try {
1447
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1448
+ _iterator.return();
1449
+ }
1450
+ } finally{
1451
+ if (_didIteratorError) {
1452
+ throw _iteratorError;
1453
+ }
1454
+ }
1455
+ }
1456
+ return _object_spread_props$8(_object_spread$d({}, value), {
1457
+ type: "expert_scoped_capabilities",
1458
+ version: 1,
1459
+ defaults: defaults,
1460
+ experts: experts
1461
+ });
1462
+ }
1463
+ function resolvePromptWorkflowCapabilities(value, xpertId) {
1464
+ if (!isScopedPromptCapabilityConfig(value)) return value;
1465
+ var config = parsePromptCapabilityConfig(value);
1466
+ if (!config) return null;
1467
+ var entry = config.experts.find(function(item) {
1468
+ return item.xpertId === xpertId;
1469
+ });
1470
+ return entry ? entry.selection : config.defaults;
1471
+ }
1472
+
1031
1473
  /**
1032
1474
  * Business roles for AI copilot (commands or contexts)
1033
1475
  */ exports.AiBusinessRole = void 0;
@@ -1143,7 +1585,7 @@ exports.ChatMessageStepCategory = void 0;
1143
1585
  ChatMessageStepCategory["Knowledges"] = "knowledges";
1144
1586
  })(exports.ChatMessageStepCategory || (exports.ChatMessageStepCategory = {}));
1145
1587
 
1146
- function _define_property$c(obj, key, value) {
1588
+ function _define_property$d(obj, key, value) {
1147
1589
  if (key in obj) {
1148
1590
  Object.defineProperty(obj, key, {
1149
1591
  value: value,
@@ -1156,14 +1598,14 @@ function _define_property$c(obj, key, value) {
1156
1598
  }
1157
1599
  return obj;
1158
1600
  }
1159
- function _instanceof(left, right) {
1601
+ function _instanceof$1(left, right) {
1160
1602
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
1161
1603
  return !!right[Symbol.hasInstance](left);
1162
1604
  } else {
1163
1605
  return left instanceof right;
1164
1606
  }
1165
1607
  }
1166
- function _object_spread$b(target) {
1608
+ function _object_spread$c(target) {
1167
1609
  for(var i = 1; i < arguments.length; i++){
1168
1610
  var source = arguments[i] != null ? arguments[i] : {};
1169
1611
  var ownKeys = Object.keys(source);
@@ -1173,7 +1615,7 @@ function _object_spread$b(target) {
1173
1615
  }));
1174
1616
  }
1175
1617
  ownKeys.forEach(function(key) {
1176
- _define_property$c(target, key, source[key]);
1618
+ _define_property$d(target, key, source[key]);
1177
1619
  });
1178
1620
  }
1179
1621
  return target;
@@ -1184,12 +1626,12 @@ var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
1184
1626
  var CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED = "thread_goal_updated";
1185
1627
  var CHAT_EVENT_TYPE_THREAD_GOAL_CLEARED = "thread_goal_cleared";
1186
1628
  function createConversationTitleSummaryEvent(event) {
1187
- return _object_spread$b({
1629
+ return _object_spread$c({
1188
1630
  type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
1189
1631
  }, event);
1190
1632
  }
1191
1633
  function createFollowUpConsumedEvent(event) {
1192
- return _object_spread$b({
1634
+ return _object_spread$c({
1193
1635
  type: CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
1194
1636
  }, event);
1195
1637
  }
@@ -1212,7 +1654,7 @@ function createThreadGoalClearedEvent(event) {
1212
1654
  };
1213
1655
  }
1214
1656
  function toIsoString(value) {
1215
- if (_instanceof(value, Date)) {
1657
+ if (_instanceof$1(value, Date)) {
1216
1658
  return value.toISOString();
1217
1659
  }
1218
1660
  if (typeof value === "string") {
@@ -1224,18 +1666,18 @@ function toIsoString(value) {
1224
1666
  return new Date().toISOString();
1225
1667
  }
1226
1668
 
1227
- function _array_like_to_array$a(arr, len) {
1669
+ function _array_like_to_array$c(arr, len) {
1228
1670
  if (len == null || len > arr.length) len = arr.length;
1229
1671
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1230
1672
  return arr2;
1231
1673
  }
1232
- function _array_with_holes$7(arr) {
1674
+ function _array_with_holes$8(arr) {
1233
1675
  if (Array.isArray(arr)) return arr;
1234
1676
  }
1235
- function _array_without_holes$4(arr) {
1236
- if (Array.isArray(arr)) return _array_like_to_array$a(arr);
1677
+ function _array_without_holes$5(arr) {
1678
+ if (Array.isArray(arr)) return _array_like_to_array$c(arr);
1237
1679
  }
1238
- function _define_property$b(obj, key, value) {
1680
+ function _define_property$c(obj, key, value) {
1239
1681
  if (key in obj) {
1240
1682
  Object.defineProperty(obj, key, {
1241
1683
  value: value,
@@ -1248,10 +1690,10 @@ function _define_property$b(obj, key, value) {
1248
1690
  }
1249
1691
  return obj;
1250
1692
  }
1251
- function _iterable_to_array$6(iter) {
1693
+ function _iterable_to_array$7(iter) {
1252
1694
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1253
1695
  }
1254
- function _iterable_to_array_limit$5(arr, i) {
1696
+ function _iterable_to_array_limit$6(arr, i) {
1255
1697
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1256
1698
  if (_i == null) return;
1257
1699
  var _arr = [];
@@ -1275,13 +1717,13 @@ function _iterable_to_array_limit$5(arr, i) {
1275
1717
  }
1276
1718
  return _arr;
1277
1719
  }
1278
- function _non_iterable_rest$7() {
1720
+ function _non_iterable_rest$8() {
1279
1721
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1280
1722
  }
1281
- function _non_iterable_spread$4() {
1723
+ function _non_iterable_spread$5() {
1282
1724
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1283
1725
  }
1284
- function _object_spread$a(target) {
1726
+ function _object_spread$b(target) {
1285
1727
  for(var i = 1; i < arguments.length; i++){
1286
1728
  var source = arguments[i] != null ? arguments[i] : {};
1287
1729
  var ownKeys = Object.keys(source);
@@ -1291,7 +1733,7 @@ function _object_spread$a(target) {
1291
1733
  }));
1292
1734
  }
1293
1735
  ownKeys.forEach(function(key) {
1294
- _define_property$b(target, key, source[key]);
1736
+ _define_property$c(target, key, source[key]);
1295
1737
  });
1296
1738
  }
1297
1739
  return target;
@@ -1315,19 +1757,19 @@ function _object_spread_props$7(target, source) {
1315
1757
  }
1316
1758
  return target;
1317
1759
  }
1318
- function _sliced_to_array$5(arr, i) {
1319
- return _array_with_holes$7(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$7();
1760
+ function _sliced_to_array$6(arr, i) {
1761
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$8();
1320
1762
  }
1321
- function _to_consumable_array$4(arr) {
1322
- return _array_without_holes$4(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$4();
1763
+ function _to_consumable_array$5(arr) {
1764
+ return _array_without_holes$5(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$5();
1323
1765
  }
1324
- function _unsupported_iterable_to_array$a(o, minLen) {
1766
+ function _unsupported_iterable_to_array$c(o, minLen) {
1325
1767
  if (!o) return;
1326
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
1768
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
1327
1769
  var n = Object.prototype.toString.call(o).slice(8, -1);
1328
1770
  if (n === "Object" && o.constructor) n = o.constructor.name;
1329
1771
  if (n === "Map" || n === "Set") return Array.from(n);
1330
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
1772
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
1331
1773
  }
1332
1774
  exports.AssistantCode = void 0;
1333
1775
  (function(AssistantCode) {
@@ -1384,7 +1826,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1384
1826
  }
1385
1827
  var _value_toolsets;
1386
1828
  var toolsets = Object.entries((_value_toolsets = value.toolsets) !== null && _value_toolsets !== void 0 ? _value_toolsets : {}).reduce(function(acc, param) {
1387
- var _param = _sliced_to_array$5(param, 2), key = _param[0], item = _param[1];
1829
+ var _param = _sliced_to_array$6(param, 2), key = _param[0], item = _param[1];
1388
1830
  var nodeKey = normalizeAssistantBindingPreferenceKey(key);
1389
1831
  var toolsetName = normalizeAssistantBindingPreferenceKey(item === null || item === void 0 ? void 0 : item.toolsetName);
1390
1832
  if (!nodeKey || !toolsetName) {
@@ -1399,7 +1841,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1399
1841
  }, {});
1400
1842
  var _value_middlewares;
1401
1843
  var middlewares = Object.entries((_value_middlewares = value.middlewares) !== null && _value_middlewares !== void 0 ? _value_middlewares : {}).reduce(function(acc, param) {
1402
- var _param = _sliced_to_array$5(param, 2), key = _param[0], item = _param[1];
1844
+ var _param = _sliced_to_array$6(param, 2), key = _param[0], item = _param[1];
1403
1845
  var nodeKey = normalizeAssistantBindingPreferenceKey(key);
1404
1846
  var provider = normalizeAssistantBindingPreferenceKey(item === null || item === void 0 ? void 0 : item.provider);
1405
1847
  if (!nodeKey || !provider) {
@@ -1413,7 +1855,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1413
1855
  }, {});
1414
1856
  var _value_skills;
1415
1857
  var skills = Object.entries((_value_skills = value.skills) !== null && _value_skills !== void 0 ? _value_skills : {}).reduce(function(acc, param) {
1416
- var _param = _sliced_to_array$5(param, 2), key = _param[0], item = _param[1];
1858
+ var _param = _sliced_to_array$6(param, 2), key = _param[0], item = _param[1];
1417
1859
  var workspaceKey = normalizeAssistantBindingPreferenceKey(key);
1418
1860
  var workspaceId = normalizeAssistantBindingPreferenceKey(item === null || item === void 0 ? void 0 : item.workspaceId) || workspaceKey;
1419
1861
  if (!workspaceKey || !workspaceId) {
@@ -1428,7 +1870,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1428
1870
  if (!Object.keys(toolsets).length && !Object.keys(middlewares).length && !Object.keys(skills).length) {
1429
1871
  return null;
1430
1872
  }
1431
- return _object_spread$a({
1873
+ return _object_spread$b({
1432
1874
  version: 1
1433
1875
  }, Object.keys(toolsets).length ? {
1434
1876
  toolsets: toolsets
@@ -1503,11 +1945,11 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1503
1945
  var disabledTools = getAssistantBindingDisabledTools(normalizedPreferences, sourceType, normalizedNodeKey);
1504
1946
  var nextDisabledTools = enabled ? disabledTools.filter(function(item) {
1505
1947
  return item !== normalizedToolName;
1506
- }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$4(disabledTools).concat([
1948
+ }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$5(disabledTools).concat([
1507
1949
  normalizedToolName
1508
1950
  ]));
1509
- var toolsets = normalizedPreferences.toolsets ? _object_spread$a({}, normalizedPreferences.toolsets) : undefined;
1510
- var middlewares = normalizedPreferences.middlewares ? _object_spread$a({}, normalizedPreferences.middlewares) : undefined;
1951
+ var toolsets = normalizedPreferences.toolsets ? _object_spread$b({}, normalizedPreferences.toolsets) : undefined;
1952
+ var middlewares = normalizedPreferences.middlewares ? _object_spread$b({}, normalizedPreferences.middlewares) : undefined;
1511
1953
  if (sourceType === "toolset") {
1512
1954
  var toolsetName = "toolsetName" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.toolsetName) : "";
1513
1955
  if (!toolsetName) {
@@ -1523,14 +1965,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1523
1965
  } else {
1524
1966
  delete nextToolsets[normalizedNodeKey];
1525
1967
  }
1526
- return normalizeAssistantBindingToolPreferences(_object_spread$a({
1968
+ return normalizeAssistantBindingToolPreferences(_object_spread$b({
1527
1969
  version: 1
1528
1970
  }, Object.keys(nextToolsets).length ? {
1529
1971
  toolsets: nextToolsets
1530
1972
  } : {}, middlewares && Object.keys(middlewares).length ? {
1531
1973
  middlewares: middlewares
1532
1974
  } : {}, normalizedPreferences.skills ? {
1533
- skills: _object_spread$a({}, normalizedPreferences.skills)
1975
+ skills: _object_spread$b({}, normalizedPreferences.skills)
1534
1976
  } : {}));
1535
1977
  }
1536
1978
  var provider = "provider" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.provider) : "";
@@ -1546,14 +1988,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1546
1988
  } else {
1547
1989
  delete nextMiddlewares[normalizedNodeKey];
1548
1990
  }
1549
- return normalizeAssistantBindingToolPreferences(_object_spread$a({
1991
+ return normalizeAssistantBindingToolPreferences(_object_spread$b({
1550
1992
  version: 1
1551
1993
  }, toolsets && Object.keys(toolsets).length ? {
1552
1994
  toolsets: toolsets
1553
1995
  } : {}, Object.keys(nextMiddlewares).length ? {
1554
1996
  middlewares: nextMiddlewares
1555
1997
  } : {}, normalizedPreferences.skills ? {
1556
- skills: _object_spread$a({}, normalizedPreferences.skills)
1998
+ skills: _object_spread$b({}, normalizedPreferences.skills)
1557
1999
  } : {}));
1558
2000
  }
1559
2001
  function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillId, enabled) {
@@ -1568,10 +2010,10 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
1568
2010
  var disabledSkillIds = getAssistantBindingDisabledSkillIds(normalizedPreferences, normalizedWorkspaceId);
1569
2011
  var nextDisabledSkillIds = enabled ? disabledSkillIds.filter(function(item) {
1570
2012
  return item !== normalizedSkillId;
1571
- }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$4(disabledSkillIds).concat([
2013
+ }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$5(disabledSkillIds).concat([
1572
2014
  normalizedSkillId
1573
2015
  ]));
1574
- var skills = normalizedPreferences.skills ? _object_spread$a({}, normalizedPreferences.skills) : {};
2016
+ var skills = normalizedPreferences.skills ? _object_spread$b({}, normalizedPreferences.skills) : {};
1575
2017
  if (nextDisabledSkillIds.length) {
1576
2018
  skills[normalizedWorkspaceId] = {
1577
2019
  workspaceId: normalizedWorkspaceId,
@@ -1580,12 +2022,12 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
1580
2022
  } else {
1581
2023
  delete skills[normalizedWorkspaceId];
1582
2024
  }
1583
- return normalizeAssistantBindingToolPreferences(_object_spread$a({
2025
+ return normalizeAssistantBindingToolPreferences(_object_spread$b({
1584
2026
  version: 1
1585
2027
  }, normalizedPreferences.toolsets ? {
1586
- toolsets: _object_spread$a({}, normalizedPreferences.toolsets)
2028
+ toolsets: _object_spread$b({}, normalizedPreferences.toolsets)
1587
2029
  } : {}, normalizedPreferences.middlewares ? {
1588
- middlewares: _object_spread$a({}, normalizedPreferences.middlewares)
2030
+ middlewares: _object_spread$b({}, normalizedPreferences.middlewares)
1589
2031
  } : {}, Object.keys(skills).length ? {
1590
2032
  skills: skills
1591
2033
  } : {}));
@@ -1603,14 +2045,14 @@ function ensureAssistantBindingSkillWorkspacePreference(preferences, workspaceId
1603
2045
  var currentSkills = (_normalizedPreferences_skills = normalizedPreferences.skills) !== null && _normalizedPreferences_skills !== void 0 ? _normalizedPreferences_skills : {};
1604
2046
  var currentWorkspacePreference = currentSkills[normalizedWorkspaceId];
1605
2047
  var _currentWorkspacePreference_disabledSkillIds;
1606
- return _object_spread_props$7(_object_spread$a({
2048
+ return _object_spread_props$7(_object_spread$b({
1607
2049
  version: 1
1608
2050
  }, normalizedPreferences.toolsets ? {
1609
- toolsets: _object_spread$a({}, normalizedPreferences.toolsets)
2051
+ toolsets: _object_spread$b({}, normalizedPreferences.toolsets)
1610
2052
  } : {}, normalizedPreferences.middlewares ? {
1611
- middlewares: _object_spread$a({}, normalizedPreferences.middlewares)
2053
+ middlewares: _object_spread$b({}, normalizedPreferences.middlewares)
1612
2054
  } : {}), {
1613
- skills: _object_spread_props$7(_object_spread$a({}, currentSkills), _define_property$b({}, normalizedWorkspaceId, {
2055
+ skills: _object_spread_props$7(_object_spread$b({}, currentSkills), _define_property$c({}, normalizedWorkspaceId, {
1614
2056
  workspaceId: normalizeAssistantBindingPreferenceKey(currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.workspaceId) || normalizedWorkspaceId,
1615
2057
  disabledSkillIds: (_currentWorkspacePreference_disabledSkillIds = currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.disabledSkillIds) !== null && _currentWorkspacePreference_disabledSkillIds !== void 0 ? _currentWorkspacePreference_disabledSkillIds : []
1616
2058
  }))
@@ -1629,9 +2071,81 @@ function isSystemManagedAssistant(code) {
1629
2071
  return getAssistantManagement(code) === "system";
1630
2072
  }
1631
2073
 
2074
+ // Shared by Cloud and Desktop: activity changes must not move assistant entries.
2075
+ function _array_like_to_array$b(arr, len) {
2076
+ if (len == null || len > arr.length) len = arr.length;
2077
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2078
+ return arr2;
2079
+ }
2080
+ function _array_without_holes$4(arr) {
2081
+ if (Array.isArray(arr)) return _array_like_to_array$b(arr);
2082
+ }
2083
+ function _instanceof(left, right) {
2084
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
2085
+ return !!right[Symbol.hasInstance](left);
2086
+ } else {
2087
+ return left instanceof right;
2088
+ }
2089
+ }
2090
+ function _iterable_to_array$6(iter) {
2091
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2092
+ }
2093
+ function _non_iterable_spread$4() {
2094
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2095
+ }
2096
+ function _to_consumable_array$4(arr) {
2097
+ return _array_without_holes$4(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$4();
2098
+ }
2099
+ function _unsupported_iterable_to_array$b(o, minLen) {
2100
+ if (!o) return;
2101
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
2102
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2103
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2104
+ if (n === "Map" || n === "Set") return Array.from(n);
2105
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
2106
+ }
2107
+ function orderAssistantXperts(items) {
2108
+ var orderedIds = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
2109
+ var itemById = new Map(items.filter(function(item) {
2110
+ return typeof item.id === "string" && !!item.id.trim();
2111
+ }).map(function(item) {
2112
+ return [
2113
+ item.id,
2114
+ item
2115
+ ];
2116
+ }));
2117
+ var orderedIdSet = new Set(orderedIds);
2118
+ var unorderedItems = items.map(function(item, index) {
2119
+ return {
2120
+ item: item,
2121
+ index: index
2122
+ };
2123
+ }).filter(function(param) {
2124
+ var item = param.item;
2125
+ return !item.id || !orderedIdSet.has(item.id);
2126
+ }).sort(function(left, right) {
2127
+ var leftCreatedAt = createdAtTimestamp(left.item);
2128
+ var rightCreatedAt = createdAtTimestamp(right.item);
2129
+ return leftCreatedAt === rightCreatedAt ? left.index - right.index : rightCreatedAt > leftCreatedAt ? 1 : -1;
2130
+ }).map(function(param) {
2131
+ var item = param.item;
2132
+ return item;
2133
+ });
2134
+ return _to_consumable_array$4(unorderedItems).concat(_to_consumable_array$4(orderedIds.map(function(id) {
2135
+ return itemById.get(id);
2136
+ }).filter(function(item) {
2137
+ return !!item;
2138
+ })));
2139
+ }
2140
+ function createdAtTimestamp(item) {
2141
+ var value = item.createdAt;
2142
+ var timestamp = _instanceof(value, Date) ? value.getTime() : typeof value === "string" ? Date.parse(value) : Number.NaN;
2143
+ return Number.isNaN(timestamp) ? Number.NEGATIVE_INFINITY : timestamp;
2144
+ }
2145
+
1632
2146
  var ASSISTANT_USER_PREFERENCES_VERSION = 1;
1633
2147
 
1634
- function _define_property$a(obj, key, value) {
2148
+ function _define_property$b(obj, key, value) {
1635
2149
  if (key in obj) {
1636
2150
  Object.defineProperty(obj, key, {
1637
2151
  value: value,
@@ -1644,7 +2158,7 @@ function _define_property$a(obj, key, value) {
1644
2158
  }
1645
2159
  return obj;
1646
2160
  }
1647
- function _object_spread$9(target) {
2161
+ function _object_spread$a(target) {
1648
2162
  for(var i = 1; i < arguments.length; i++){
1649
2163
  var source = arguments[i] != null ? arguments[i] : {};
1650
2164
  var ownKeys = Object.keys(source);
@@ -1654,7 +2168,7 @@ function _object_spread$9(target) {
1654
2168
  }));
1655
2169
  }
1656
2170
  ownKeys.forEach(function(key) {
1657
- _define_property$a(target, key, source[key]);
2171
+ _define_property$b(target, key, source[key]);
1658
2172
  });
1659
2173
  }
1660
2174
  return target;
@@ -1786,7 +2300,7 @@ function resolveModelParameterOptions(modelOptions, rules) {
1786
2300
  var config = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1787
2301
  var _config_preserveUnknown;
1788
2302
  var preserveUnknown = (_config_preserveUnknown = config.preserveUnknown) !== null && _config_preserveUnknown !== void 0 ? _config_preserveUnknown : true;
1789
- var resolvedOptions = preserveUnknown ? _object_spread$9({}, modelOptions !== null && modelOptions !== void 0 ? modelOptions : {}) : {};
2303
+ var resolvedOptions = preserveUnknown ? _object_spread$a({}, modelOptions !== null && modelOptions !== void 0 ? modelOptions : {}) : {};
1790
2304
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1791
2305
  try {
1792
2306
  for(var _iterator = rules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
@@ -1841,6 +2355,10 @@ function isRunnableThreadGoalStatus(status) {
1841
2355
  return status === "active";
1842
2356
  }
1843
2357
 
2358
+ /** Why a derived conversation thread was created. */ var ChatThreadPurpose = {
2359
+ SideChat: "side-chat",
2360
+ MessageEdit: "message-edit"
2361
+ };
1844
2362
  /**
1845
2363
  * @deprecated use ChatMessageEventTypeEnum
1846
2364
  */ exports.ChatGatewayEvent = void 0;
@@ -1861,6 +2379,16 @@ function isRunnableThreadGoalStatus(status) {
1861
2379
  ChatGatewayEvent["Agent"] = "agent";
1862
2380
  })(exports.ChatGatewayEvent || (exports.ChatGatewayEvent = {}));
1863
2381
 
2382
+ /** Persistence boundary: unknown versions stay hidden until this host understands their policy. */ function chatMessagePresentation(message) {
2383
+ var envelope = message.messageEnvelope;
2384
+ if (envelope == null) return "message";
2385
+ 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;
2386
+ return "runtime";
2387
+ }
2388
+ function isRuntimeChatMessage(message) {
2389
+ return chatMessagePresentation(message) === "runtime";
2390
+ }
2391
+
1864
2392
  // Type guards
1865
2393
  /**
1866
2394
  * @deprecated use content in message
@@ -2081,6 +2609,9 @@ exports.ModelGatewayUsageChannelEnum = void 0;
2081
2609
  (function(ModelGatewayUsageChannelEnum) {
2082
2610
  ModelGatewayUsageChannelEnum["Xpert"] = "xpert";
2083
2611
  ModelGatewayUsageChannelEnum["ExternalApi"] = "external_api";
2612
+ /** Managed agent invocation usage, regardless of where the runtime executes. */ ModelGatewayUsageChannelEnum["AgentRuntime"] = "agent_runtime";
2613
+ /** User-launched CLI session usage, separate from managed invocations. */ ModelGatewayUsageChannelEnum["Cli"] = "cli";
2614
+ /** CLI child launched by an Assistant shell execution. */ ModelGatewayUsageChannelEnum["Shell"] = "shell";
2084
2615
  })(exports.ModelGatewayUsageChannelEnum || (exports.ModelGatewayUsageChannelEnum = {}));
2085
2616
  var MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING = "modelGatewayRequestsPerMinute";
2086
2617
  var DEFAULT_MODEL_GATEWAY_REQUESTS_PER_MINUTE = 60;
@@ -2304,7 +2835,7 @@ function workflowNodeIdentifier(node) {
2304
2835
  return node.title || node.key;
2305
2836
  }
2306
2837
 
2307
- function _define_property$9(obj, key, value) {
2838
+ function _define_property$a(obj, key, value) {
2308
2839
  if (key in obj) {
2309
2840
  Object.defineProperty(obj, key, {
2310
2841
  value: value,
@@ -2317,7 +2848,7 @@ function _define_property$9(obj, key, value) {
2317
2848
  }
2318
2849
  return obj;
2319
2850
  }
2320
- function _object_spread$8(target) {
2851
+ function _object_spread$9(target) {
2321
2852
  for(var i = 1; i < arguments.length; i++){
2322
2853
  var source = arguments[i] != null ? arguments[i] : {};
2323
2854
  var ownKeys = Object.keys(source);
@@ -2327,7 +2858,7 @@ function _object_spread$8(target) {
2327
2858
  }));
2328
2859
  }
2329
2860
  ownKeys.forEach(function(key) {
2330
- _define_property$9(target, key, source[key]);
2861
+ _define_property$a(target, key, source[key]);
2331
2862
  });
2332
2863
  }
2333
2864
  return target;
@@ -2378,7 +2909,7 @@ function getXpertAgentRecursionLimit(agentConfig) {
2378
2909
  return typeof (agentConfig === null || agentConfig === void 0 ? void 0 : agentConfig.recursionLimit) === "number" ? agentConfig.recursionLimit : DEFAULT_XPERT_AGENT_RECURSION_LIMIT;
2379
2910
  }
2380
2911
  function normalizeXpertAgentConfig(agentConfig) {
2381
- return _object_spread_props$6(_object_spread$8({}, agentConfig !== null && agentConfig !== void 0 ? agentConfig : {}), {
2912
+ return _object_spread_props$6(_object_spread$9({}, agentConfig !== null && agentConfig !== void 0 ? agentConfig : {}), {
2382
2913
  recursionLimit: getXpertAgentRecursionLimit(agentConfig)
2383
2914
  });
2384
2915
  }
@@ -2464,15 +2995,15 @@ var VariableOperations = [
2464
2995
  }
2465
2996
  ];
2466
2997
 
2467
- function _array_like_to_array$9(arr, len) {
2998
+ function _array_like_to_array$a(arr, len) {
2468
2999
  if (len == null || len > arr.length) len = arr.length;
2469
3000
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2470
3001
  return arr2;
2471
3002
  }
2472
- function _array_with_holes$6(arr) {
3003
+ function _array_with_holes$7(arr) {
2473
3004
  if (Array.isArray(arr)) return arr;
2474
3005
  }
2475
- function _define_property$8(obj, key, value) {
3006
+ function _define_property$9(obj, key, value) {
2476
3007
  if (key in obj) {
2477
3008
  Object.defineProperty(obj, key, {
2478
3009
  value: value,
@@ -2485,7 +3016,7 @@ function _define_property$8(obj, key, value) {
2485
3016
  }
2486
3017
  return obj;
2487
3018
  }
2488
- function _iterable_to_array_limit$4(arr, i) {
3019
+ function _iterable_to_array_limit$5(arr, i) {
2489
3020
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2490
3021
  if (_i == null) return;
2491
3022
  var _arr = [];
@@ -2509,10 +3040,10 @@ function _iterable_to_array_limit$4(arr, i) {
2509
3040
  }
2510
3041
  return _arr;
2511
3042
  }
2512
- function _non_iterable_rest$6() {
3043
+ function _non_iterable_rest$7() {
2513
3044
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2514
3045
  }
2515
- function _object_spread$7(target) {
3046
+ function _object_spread$8(target) {
2516
3047
  for(var i = 1; i < arguments.length; i++){
2517
3048
  var source = arguments[i] != null ? arguments[i] : {};
2518
3049
  var ownKeys = Object.keys(source);
@@ -2522,7 +3053,7 @@ function _object_spread$7(target) {
2522
3053
  }));
2523
3054
  }
2524
3055
  ownKeys.forEach(function(key) {
2525
- _define_property$8(target, key, source[key]);
3056
+ _define_property$9(target, key, source[key]);
2526
3057
  });
2527
3058
  }
2528
3059
  return target;
@@ -2546,16 +3077,16 @@ function _object_spread_props$5(target, source) {
2546
3077
  }
2547
3078
  return target;
2548
3079
  }
2549
- function _sliced_to_array$4(arr, i) {
2550
- return _array_with_holes$6(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$6();
3080
+ function _sliced_to_array$5(arr, i) {
3081
+ return _array_with_holes$7(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$7();
2551
3082
  }
2552
- function _unsupported_iterable_to_array$9(o, minLen) {
3083
+ function _unsupported_iterable_to_array$a(o, minLen) {
2553
3084
  if (!o) return;
2554
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
3085
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
2555
3086
  var n = Object.prototype.toString.call(o).slice(8, -1);
2556
3087
  if (n === "Object" && o.constructor) n = o.constructor.name;
2557
3088
  if (n === "Map" || n === "Set") return Array.from(n);
2558
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
3089
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
2559
3090
  }
2560
3091
  /**
2561
3092
  * @deprecated can use getCurrentTaskInput instead?
@@ -2637,10 +3168,10 @@ function configurableStoreNamespace(configurable) {
2637
3168
  * @param value
2638
3169
  * @returns
2639
3170
  */ function setStateVariable(state, varName, value) {
2640
- var _varName_split = _sliced_to_array$4(varName.split("."), 2), agentChannelName = _varName_split[0], variableName = _varName_split[1];
3171
+ var _varName_split = _sliced_to_array$5(varName.split("."), 2), agentChannelName = _varName_split[0], variableName = _varName_split[1];
2641
3172
  if (variableName) {
2642
3173
  var _state_agentChannelName;
2643
- 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));
3174
+ 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));
2644
3175
  } else {
2645
3176
  state[agentChannelName] = value;
2646
3177
  }
@@ -2731,7 +3262,7 @@ function getWorkflowTriggers(graph, from) {
2731
3262
  });
2732
3263
  }
2733
3264
 
2734
- function _define_property$7(obj, key, value) {
3265
+ function _define_property$8(obj, key, value) {
2735
3266
  if (key in obj) {
2736
3267
  Object.defineProperty(obj, key, {
2737
3268
  value: value,
@@ -2744,7 +3275,7 @@ function _define_property$7(obj, key, value) {
2744
3275
  }
2745
3276
  return obj;
2746
3277
  }
2747
- function _object_spread$6(target) {
3278
+ function _object_spread$7(target) {
2748
3279
  for(var i = 1; i < arguments.length; i++){
2749
3280
  var source = arguments[i] != null ? arguments[i] : {};
2750
3281
  var ownKeys = Object.keys(source);
@@ -2754,7 +3285,7 @@ function _object_spread$6(target) {
2754
3285
  }));
2755
3286
  }
2756
3287
  ownKeys.forEach(function(key) {
2757
- _define_property$7(target, key, source[key]);
3288
+ _define_property$8(target, key, source[key]);
2758
3289
  });
2759
3290
  }
2760
3291
  return target;
@@ -2860,11 +3391,11 @@ var KNOWLEDGEBASE_FAQ_RETRIEVAL_MODES = [
2860
3391
  return candidate === requestedMode;
2861
3392
  }) ? requestedMode : DEFAULT_KNOWLEDGEBASE_FAQ_RECALL.mode;
2862
3393
  var _recall_fusion2, _recall_fusion_mode, _recall_fusion_weights;
2863
- return _object_spread_props$4(_object_spread$6({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL, recall !== null && recall !== void 0 ? recall : {}), {
3394
+ return _object_spread_props$4(_object_spread$7({}, DEFAULT_KNOWLEDGEBASE_FAQ_RECALL, recall !== null && recall !== void 0 ? recall : {}), {
2864
3395
  mode: mode,
2865
- 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 : {}), {
3396
+ 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 : {}), {
2866
3397
  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,
2867
- 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 : {}), {
3398
+ 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 : {}), {
2868
3399
  graph: 0
2869
3400
  })
2870
3401
  })
@@ -2912,13 +3443,13 @@ var _retrieval_recall_contentScope;
2912
3443
  });
2913
3444
  }
2914
3445
 
2915
- function _array_like_to_array$8(arr, len) {
3446
+ function _array_like_to_array$9(arr, len) {
2916
3447
  if (len == null || len > arr.length) len = arr.length;
2917
3448
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2918
3449
  return arr2;
2919
3450
  }
2920
3451
  function _array_without_holes$3(arr) {
2921
- if (Array.isArray(arr)) return _array_like_to_array$8(arr);
3452
+ if (Array.isArray(arr)) return _array_like_to_array$9(arr);
2922
3453
  }
2923
3454
  function _iterable_to_array$5(iter) {
2924
3455
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -2927,15 +3458,15 @@ function _non_iterable_spread$3() {
2927
3458
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2928
3459
  }
2929
3460
  function _to_consumable_array$3(arr) {
2930
- return _array_without_holes$3(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$3();
3461
+ return _array_without_holes$3(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$3();
2931
3462
  }
2932
- function _unsupported_iterable_to_array$8(o, minLen) {
3463
+ function _unsupported_iterable_to_array$9(o, minLen) {
2933
3464
  if (!o) return;
2934
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
3465
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
2935
3466
  var n = Object.prototype.toString.call(o).slice(8, -1);
2936
3467
  if (n === "Object" && o.constructor) n = o.constructor.name;
2937
3468
  if (n === "Map" || n === "Set") return Array.from(n);
2938
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
3469
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
2939
3470
  }
2940
3471
  var BUILTIN_KNOWLEDGE_PARSER = "builtin";
2941
3472
  /** Only formats with a real builtin reader; unknown binary formats are not advertised as text. */ var BUILTIN_KNOWLEDGE_FILE_TYPES = [
@@ -3025,15 +3556,15 @@ function knowledgebaseParserSelection(config, documentType) {
3025
3556
  })));
3026
3557
  }
3027
3558
 
3028
- function _array_like_to_array$7(arr, len) {
3559
+ function _array_like_to_array$8(arr, len) {
3029
3560
  if (len == null || len > arr.length) len = arr.length;
3030
3561
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3031
3562
  return arr2;
3032
3563
  }
3033
3564
  function _array_without_holes$2(arr) {
3034
- if (Array.isArray(arr)) return _array_like_to_array$7(arr);
3565
+ if (Array.isArray(arr)) return _array_like_to_array$8(arr);
3035
3566
  }
3036
- function _define_property$6(obj, key, value) {
3567
+ function _define_property$7(obj, key, value) {
3037
3568
  if (key in obj) {
3038
3569
  Object.defineProperty(obj, key, {
3039
3570
  value: value,
@@ -3052,7 +3583,7 @@ function _iterable_to_array$4(iter) {
3052
3583
  function _non_iterable_spread$2() {
3053
3584
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3054
3585
  }
3055
- function _object_spread$5(target) {
3586
+ function _object_spread$6(target) {
3056
3587
  for(var i = 1; i < arguments.length; i++){
3057
3588
  var source = arguments[i] != null ? arguments[i] : {};
3058
3589
  var ownKeys = Object.keys(source);
@@ -3062,30 +3593,30 @@ function _object_spread$5(target) {
3062
3593
  }));
3063
3594
  }
3064
3595
  ownKeys.forEach(function(key) {
3065
- _define_property$6(target, key, source[key]);
3596
+ _define_property$7(target, key, source[key]);
3066
3597
  });
3067
3598
  }
3068
3599
  return target;
3069
3600
  }
3070
3601
  function _to_consumable_array$2(arr) {
3071
- return _array_without_holes$2(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$2();
3602
+ return _array_without_holes$2(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$2();
3072
3603
  }
3073
- function _unsupported_iterable_to_array$7(o, minLen) {
3604
+ function _unsupported_iterable_to_array$8(o, minLen) {
3074
3605
  if (!o) return;
3075
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
3606
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
3076
3607
  var n = Object.prototype.toString.call(o).slice(8, -1);
3077
3608
  if (n === "Object" && o.constructor) n = o.constructor.name;
3078
3609
  if (n === "Map" || n === "Set") return Array.from(n);
3079
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
3610
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
3080
3611
  }
3081
3612
  /** Only copy configured defaults; do not turn built-in defaults into document overrides. */ function knowledgebaseDocumentParserDefaults(config, documentType) {
3082
3613
  if (!config) return {};
3083
- return _object_spread$5({}, config.spreadsheet ? {
3084
- spreadsheet: _object_spread$5({}, config.spreadsheet)
3614
+ return _object_spread$6({}, config.spreadsheet ? {
3615
+ spreadsheet: _object_spread$6({}, config.spreadsheet)
3085
3616
  } : {}, config.tableMetadataRequirements !== undefined ? {
3086
3617
  tableMetadataRequirements: config.tableMetadataRequirements
3087
3618
  } : {}, config.questionGeneration ? {
3088
- questionGeneration: _object_spread$5({}, config.questionGeneration)
3619
+ questionGeneration: _object_spread$6({}, config.questionGeneration)
3089
3620
  } : {}, config.chunkLanguageHint !== undefined ? {
3090
3621
  chunkLanguageHint: config.chunkLanguageHint
3091
3622
  } : {}, config.maxChunkTokens !== undefined ? {
@@ -3099,7 +3630,7 @@ function _unsupported_iterable_to_array$7(o, minLen) {
3099
3630
  } : {}, config.textSplitterType ? {
3100
3631
  textSplitterType: config.textSplitterType
3101
3632
  } : {}, config.textSplitter || config.chunkSize != null || config.chunkOverlap != null ? {
3102
- textSplitter: _object_spread$5({}, config.chunkSize != null ? {
3633
+ textSplitter: _object_spread$6({}, config.chunkSize != null ? {
3103
3634
  chunkSize: config.chunkSize
3104
3635
  } : {}, config.chunkOverlap != null ? {
3105
3636
  chunkOverlap: config.chunkOverlap
@@ -3111,7 +3642,7 @@ function _unsupported_iterable_to_array$7(o, minLen) {
3111
3642
  } : {}, config.imageUnderstandingType ? {
3112
3643
  imageUnderstandingType: config.imageUnderstandingType
3113
3644
  } : {}, config.imageUnderstanding ? {
3114
- imageUnderstanding: _object_spread$5({}, config.imageUnderstanding)
3645
+ imageUnderstanding: _object_spread$6({}, config.imageUnderstanding)
3115
3646
  } : {}, knowledgebaseParserSelection(config, documentType !== null && documentType !== void 0 ? documentType : ""));
3116
3647
  }
3117
3648
  /** Arrays are the canonical ordered format; retain the plugin's legacy comma syntax. */ function decodeKnowledgeSeparators(value) {
@@ -3176,7 +3707,7 @@ function genPipelineKnowledgeBaseKey() {
3176
3707
  return letterStartSUID("KnowledgeBase_");
3177
3708
  }
3178
3709
 
3179
- function _define_property$5(obj, key, value) {
3710
+ function _define_property$6(obj, key, value) {
3180
3711
  if (key in obj) {
3181
3712
  Object.defineProperty(obj, key, {
3182
3713
  value: value,
@@ -3189,7 +3720,7 @@ function _define_property$5(obj, key, value) {
3189
3720
  }
3190
3721
  return obj;
3191
3722
  }
3192
- function _object_spread$4(target) {
3723
+ function _object_spread$5(target) {
3193
3724
  for(var i = 1; i < arguments.length; i++){
3194
3725
  var source = arguments[i] != null ? arguments[i] : {};
3195
3726
  var ownKeys = Object.keys(source);
@@ -3199,7 +3730,7 @@ function _object_spread$4(target) {
3199
3730
  }));
3200
3731
  }
3201
3732
  ownKeys.forEach(function(key) {
3202
- _define_property$5(target, key, source[key]);
3733
+ _define_property$6(target, key, source[key]);
3203
3734
  });
3204
3735
  }
3205
3736
  return target;
@@ -3219,7 +3750,7 @@ function _object_spread$4(target) {
3219
3750
  * @deprecated use DocumentSourceProviderCategoryEnum local file type instead
3220
3751
  */ DocumentTypeEnum["FILE"] = "file";
3221
3752
  })(exports.DocumentTypeEnum || (exports.DocumentTypeEnum = {}));
3222
- var KDocumentSourceType = _object_spread$4({}, exports.DocumentSourceProviderCategoryEnum, exports.DocumentTypeEnum);
3753
+ var KDocumentSourceType = _object_spread$5({}, exports.DocumentSourceProviderCategoryEnum, exports.DocumentTypeEnum);
3223
3754
  /**
3224
3755
  * Document type category, determine how to process the document.
3225
3756
  */ exports.KBDocumentCategoryEnum = void 0;
@@ -3833,6 +4364,23 @@ var PLUGIN_MARKETPLACE_CATEGORIES = [
3833
4364
  "sales",
3834
4365
  "other"
3835
4366
  ];
4367
+ /**
4368
+ * Technical subcategories used by the plugin marketplace.
4369
+ * marketplace.category describes the business-facing group; marketplace.subcategory describes the technical type.
4370
+ */ var PLUGIN_MARKETPLACE_SUBCATEGORIES = [
4371
+ "connector",
4372
+ "middleware",
4373
+ "integration",
4374
+ "database",
4375
+ "tools",
4376
+ "model",
4377
+ "vlm",
4378
+ "vector-store",
4379
+ "doc-source",
4380
+ "datasource",
4381
+ "agent",
4382
+ "set"
4383
+ ];
3836
4384
 
3837
4385
  var XpertMarketplaceBusinessCategories = PLUGIN_MARKETPLACE_CATEGORIES;
3838
4386
  var XpertMarketplaceCollaborationModes = [
@@ -4003,15 +4551,15 @@ function buildXpertMarketplaceProfileSnapshot(input, draft) {
4003
4551
  }
4004
4552
 
4005
4553
  // Helpers
4006
- function _array_like_to_array$6(arr, len) {
4554
+ function _array_like_to_array$7(arr, len) {
4007
4555
  if (len == null || len > arr.length) len = arr.length;
4008
4556
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4009
4557
  return arr2;
4010
4558
  }
4011
4559
  function _array_without_holes$1(arr) {
4012
- if (Array.isArray(arr)) return _array_like_to_array$6(arr);
4560
+ if (Array.isArray(arr)) return _array_like_to_array$7(arr);
4013
4561
  }
4014
- function _define_property$4(obj, key, value) {
4562
+ function _define_property$5(obj, key, value) {
4015
4563
  if (key in obj) {
4016
4564
  Object.defineProperty(obj, key, {
4017
4565
  value: value,
@@ -4030,7 +4578,7 @@ function _iterable_to_array$3(iter) {
4030
4578
  function _non_iterable_spread$1() {
4031
4579
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4032
4580
  }
4033
- function _object_spread$3(target) {
4581
+ function _object_spread$4(target) {
4034
4582
  for(var i = 1; i < arguments.length; i++){
4035
4583
  var source = arguments[i] != null ? arguments[i] : {};
4036
4584
  var ownKeys = Object.keys(source);
@@ -4040,7 +4588,7 @@ function _object_spread$3(target) {
4040
4588
  }));
4041
4589
  }
4042
4590
  ownKeys.forEach(function(key) {
4043
- _define_property$4(target, key, source[key]);
4591
+ _define_property$5(target, key, source[key]);
4044
4592
  });
4045
4593
  }
4046
4594
  return target;
@@ -4092,15 +4640,15 @@ function _object_without_properties_loose$1(source, excluded) {
4092
4640
  return target;
4093
4641
  }
4094
4642
  function _to_consumable_array$1(arr) {
4095
- return _array_without_holes$1(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$1();
4643
+ return _array_without_holes$1(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$1();
4096
4644
  }
4097
- function _unsupported_iterable_to_array$6(o, minLen) {
4645
+ function _unsupported_iterable_to_array$7(o, minLen) {
4098
4646
  if (!o) return;
4099
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
4647
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
4100
4648
  var n = Object.prototype.toString.call(o).slice(8, -1);
4101
4649
  if (n === "Object" && o.constructor) n = o.constructor.name;
4102
4650
  if (n === "Map" || n === "Set") return Array.from(n);
4103
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
4651
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
4104
4652
  }
4105
4653
  function omitXpertRelations(xpert) {
4106
4654
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -4139,7 +4687,7 @@ function resolveRuntimeXpert(xpert, isDraft) {
4139
4687
  var graph = resolveDraftRuntimeGraph(xpert, draft);
4140
4688
  var agent = resolveDraftPrimaryAgent(xpert, draft, graph);
4141
4689
  var _draft_team5, _draft_team_workspaceId, _draft_team_agentConfig, _draft_team_commandProfile, _draft_team_features, _draft_team_options;
4142
- return _object_spread_props$3(_object_spread$3({}, xpert, (_draft_team5 = draft.team) !== null && _draft_team5 !== void 0 ? _draft_team5 : {}), {
4690
+ return _object_spread_props$3(_object_spread$4({}, xpert, (_draft_team5 = draft.team) !== null && _draft_team5 !== void 0 ? _draft_team5 : {}), {
4143
4691
  id: xpert.id,
4144
4692
  tenantId: xpert.tenantId,
4145
4693
  organizationId: xpert.organizationId,
@@ -4423,9 +4971,9 @@ function replaceAgentInDraft(draft, sourceKey, agent, options) {
4423
4971
  if (node.type === "agent" && node.key === sourceKey) {
4424
4972
  replacedNode = true;
4425
4973
  var _node_entity;
4426
- return _object_spread_props$3(_object_spread$3({}, node), {
4974
+ return _object_spread_props$3(_object_spread$4({}, node), {
4427
4975
  key: targetKey,
4428
- entity: _object_spread_props$3(_object_spread$3({}, (_node_entity = node.entity) !== null && _node_entity !== void 0 ? _node_entity : {}, agent), {
4976
+ entity: _object_spread_props$3(_object_spread$4({}, (_node_entity = node.entity) !== null && _node_entity !== void 0 ? _node_entity : {}, agent), {
4429
4977
  key: targetKey
4430
4978
  })
4431
4979
  });
@@ -4441,17 +4989,17 @@ function replaceAgentInDraft(draft, sourceKey, agent, options) {
4441
4989
  if (from === connection.from && to === connection.to) {
4442
4990
  return connection;
4443
4991
  }
4444
- return _object_spread_props$3(_object_spread$3({}, connection), {
4992
+ return _object_spread_props$3(_object_spread$4({}, connection), {
4445
4993
  from: from,
4446
4994
  to: to,
4447
4995
  key: "".concat(from, "/").concat(to)
4448
4996
  });
4449
4997
  });
4450
- return _object_spread_props$3(_object_spread$3({}, draft), {
4451
- team: draft.team ? _object_spread_props$3(_object_spread$3({}, draft.team), {
4452
- agent: draft.team.agent ? _object_spread_props$3(_object_spread$3({}, draft.team.agent, agent), {
4998
+ return _object_spread_props$3(_object_spread$4({}, draft), {
4999
+ team: draft.team ? _object_spread_props$3(_object_spread$4({}, draft.team), {
5000
+ agent: draft.team.agent ? _object_spread_props$3(_object_spread$4({}, draft.team.agent, agent), {
4453
5001
  key: targetKey
4454
- }) : _object_spread_props$3(_object_spread$3({}, agent), {
5002
+ }) : _object_spread_props$3(_object_spread$4({}, agent), {
4455
5003
  key: targetKey
4456
5004
  })
4457
5005
  }) : draft.team,
@@ -4533,11 +5081,12 @@ exports.MCPServerType = void 0;
4533
5081
  MCPServerType["CODE"] = "code";
4534
5082
  MCPServerType["HTTP"] = "http";
4535
5083
  })(exports.MCPServerType || (exports.MCPServerType = {}));
4536
- var MCP_CONSUMER_AUTH_TYPES = [
5084
+ /** Supported authentication modes for a host-consumed MCP server. */ var MCP_CONSUMER_AUTH_TYPES = [
4537
5085
  "none",
4538
5086
  "manual_header",
4539
5087
  "api_key",
4540
- "oauth"
5088
+ "oauth",
5089
+ "connector"
4541
5090
  ];
4542
5091
  var MCP_APP_RESOURCE_MIME_TYPE = "text/html;profile=mcp-app";
4543
5092
 
@@ -4589,6 +5138,11 @@ exports.XpertProjectAutomationRunStatusEnum = void 0;
4589
5138
  XpertProjectAutomationRunStatusEnum["CANCELLED"] = "cancelled";
4590
5139
  })(exports.XpertProjectAutomationRunStatusEnum || (exports.XpertProjectAutomationRunStatusEnum = {}));
4591
5140
 
5141
+ var GENERAL_PROJECT_TYPE = {
5142
+ applicationKey: "platform",
5143
+ projectTypeKey: "general"
5144
+ };
5145
+
4592
5146
  /**
4593
5147
  * Build a hierarchical tree structure from a flat list of DocumentInterface objects,
4594
5148
  * preserving explicit chunkIndex order whenever it is available.
@@ -4596,7 +5150,7 @@ exports.XpertProjectAutomationRunStatusEnum = void 0;
4596
5150
  * @template Metadata - Type of metadata, defaults to IDocChunkMetadata
4597
5151
  * @param documents - A flat array of DocumentInterface objects
4598
5152
  * @returns the hierarchical tree (root-level DocumentInterface[])
4599
- */ function _define_property$3(obj, key, value) {
5153
+ */ function _define_property$4(obj, key, value) {
4600
5154
  if (key in obj) {
4601
5155
  Object.defineProperty(obj, key, {
4602
5156
  value: value,
@@ -4609,7 +5163,7 @@ exports.XpertProjectAutomationRunStatusEnum = void 0;
4609
5163
  }
4610
5164
  return obj;
4611
5165
  }
4612
- function _object_spread$2(target) {
5166
+ function _object_spread$3(target) {
4613
5167
  for(var i = 1; i < arguments.length; i++){
4614
5168
  var source = arguments[i] != null ? arguments[i] : {};
4615
5169
  var ownKeys = Object.keys(source);
@@ -4619,7 +5173,7 @@ function _object_spread$2(target) {
4619
5173
  }));
4620
5174
  }
4621
5175
  ownKeys.forEach(function(key) {
4622
- _define_property$3(target, key, source[key]);
5176
+ _define_property$4(target, key, source[key]);
4623
5177
  });
4624
5178
  }
4625
5179
  return target;
@@ -4652,8 +5206,8 @@ function buildChunkTree(documents) {
4652
5206
  documents.forEach(function(doc, index) {
4653
5207
  var chunkId = getChunkNodeId(doc);
4654
5208
  if (chunkId) {
4655
- map.set(chunkId, _object_spread_props$2(_object_spread$2({}, doc), {
4656
- metadata: _object_spread_props$2(_object_spread$2({}, doc.metadata), {
5209
+ map.set(chunkId, _object_spread_props$2(_object_spread$3({}, doc), {
5210
+ metadata: _object_spread_props$2(_object_spread$3({}, doc.metadata), {
4657
5211
  chunkId: chunkId,
4658
5212
  children: []
4659
5213
  })
@@ -4827,30 +5381,30 @@ exports.KnowledgeGraphIndexJobStatus = void 0;
4827
5381
  var KNOWLEDGE_GRAPH_DOCUMENT_STATUS_BATCH_SIZE = 100;
4828
5382
 
4829
5383
  // Skill types
4830
- function _array_like_to_array$5(arr, len) {
5384
+ function _array_like_to_array$6(arr, len) {
4831
5385
  if (len == null || len > arr.length) len = arr.length;
4832
5386
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4833
5387
  return arr2;
4834
5388
  }
4835
- function _array_with_holes$5(arr) {
5389
+ function _array_with_holes$6(arr) {
4836
5390
  if (Array.isArray(arr)) return arr;
4837
5391
  }
4838
5392
  function _iterable_to_array$2(iter) {
4839
5393
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
4840
5394
  }
4841
- function _non_iterable_rest$5() {
5395
+ function _non_iterable_rest$6() {
4842
5396
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4843
5397
  }
4844
5398
  function _to_array$1(arr) {
4845
- return _array_with_holes$5(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_rest$5();
5399
+ return _array_with_holes$6(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_rest$6();
4846
5400
  }
4847
- function _unsupported_iterable_to_array$5(o, minLen) {
5401
+ function _unsupported_iterable_to_array$6(o, minLen) {
4848
5402
  if (!o) return;
4849
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
5403
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
4850
5404
  var n = Object.prototype.toString.call(o).slice(8, -1);
4851
5405
  if (n === "Object" && o.constructor) n = o.constructor.name;
4852
5406
  if (n === "Map" || n === "Set") return Array.from(n);
4853
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
5407
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
4854
5408
  }
4855
5409
  var RUNTIME_SKILL_CAPABILITY_ID_PREFIX = "runtime-skill/v1";
4856
5410
  function createRuntimeSkillCapabilityId(source) {
@@ -4884,15 +5438,15 @@ function genXpertSkillKey() {
4884
5438
  return letterStartSUID("Skill_");
4885
5439
  }
4886
5440
 
4887
- function _array_like_to_array$4(arr, len) {
5441
+ function _array_like_to_array$5(arr, len) {
4888
5442
  if (len == null || len > arr.length) len = arr.length;
4889
5443
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4890
5444
  return arr2;
4891
5445
  }
4892
- function _array_with_holes$4(arr) {
5446
+ function _array_with_holes$5(arr) {
4893
5447
  if (Array.isArray(arr)) return arr;
4894
5448
  }
4895
- function _iterable_to_array_limit$3(arr, i) {
5449
+ function _iterable_to_array_limit$4(arr, i) {
4896
5450
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
4897
5451
  if (_i == null) return;
4898
5452
  var _arr = [];
@@ -4916,19 +5470,19 @@ function _iterable_to_array_limit$3(arr, i) {
4916
5470
  }
4917
5471
  return _arr;
4918
5472
  }
4919
- function _non_iterable_rest$4() {
5473
+ function _non_iterable_rest$5() {
4920
5474
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4921
5475
  }
4922
- function _sliced_to_array$3(arr, i) {
4923
- return _array_with_holes$4(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
5476
+ function _sliced_to_array$4(arr, i) {
5477
+ return _array_with_holes$5(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$5();
4924
5478
  }
4925
- function _unsupported_iterable_to_array$4(o, minLen) {
5479
+ function _unsupported_iterable_to_array$5(o, minLen) {
4926
5480
  if (!o) return;
4927
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
5481
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
4928
5482
  var n = Object.prototype.toString.call(o).slice(8, -1);
4929
5483
  if (n === "Object" && o.constructor) n = o.constructor.name;
4930
5484
  if (n === "Map" || n === "Set") return Array.from(n);
4931
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
5485
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
4932
5486
  }
4933
5487
  var IGNORED_BOOLEAN_FLAGS = new Set([
4934
5488
  "-y",
@@ -5143,7 +5697,7 @@ function parseGithubSource(source) {
5143
5697
  return parseGithubUrl(raw);
5144
5698
  }
5145
5699
  if (/^[^/\s]+\/[^/\s]+$/.test(raw)) {
5146
- var _raw_split = _sliced_to_array$3(raw.split("/"), 2), owner = _raw_split[0], repoSegment = _raw_split[1];
5700
+ var _raw_split = _sliced_to_array$4(raw.split("/"), 2), owner = _raw_split[0], repoSegment = _raw_split[1];
5147
5701
  var repo = repoSegment.replace(/\.git$/i, "");
5148
5702
  if (!repo) {
5149
5703
  throw new Error("GitHub repository source must include owner and repository name");
@@ -5195,7 +5749,15 @@ function isLocalPath(value) {
5195
5749
  return value.startsWith(".") || value.startsWith("/") || value.startsWith("~") || /^file:/i.test(value) || /^[a-z]:[\\/]/i.test(value);
5196
5750
  }
5197
5751
 
5198
- function _define_property$2(obj, key, value) {
5752
+ /** Boundary validation for persisted and API-provided scenario lists. */ function isPromptWorkflowScenarios(value) {
5753
+ return Array.isArray(value) && value.length <= 20 && value.every(function(item) {
5754
+ 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;
5755
+ }) && new Set(value.map(function(item) {
5756
+ return item.id;
5757
+ })).size === value.length;
5758
+ }
5759
+
5760
+ function _define_property$3(obj, key, value) {
5199
5761
  if (key in obj) {
5200
5762
  Object.defineProperty(obj, key, {
5201
5763
  value: value,
@@ -5208,7 +5770,7 @@ function _define_property$2(obj, key, value) {
5208
5770
  }
5209
5771
  return obj;
5210
5772
  }
5211
- function _object_spread$1(target) {
5773
+ function _object_spread$2(target) {
5212
5774
  for(var i = 1; i < arguments.length; i++){
5213
5775
  var source = arguments[i] != null ? arguments[i] : {};
5214
5776
  var ownKeys = Object.keys(source);
@@ -5218,7 +5780,7 @@ function _object_spread$1(target) {
5218
5780
  }));
5219
5781
  }
5220
5782
  ownKeys.forEach(function(key) {
5221
- _define_property$2(target, key, source[key]);
5783
+ _define_property$3(target, key, source[key]);
5222
5784
  });
5223
5785
  }
5224
5786
  return target;
@@ -5244,6 +5806,7 @@ function _object_spread_props$1(target, source) {
5244
5806
  }
5245
5807
  var LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME = "SandboxCompressionMiddleware";
5246
5808
  var CONTEXT_COMPRESSION_MIDDLEWARE_NAME = "ContextCompressionMiddleware";
5809
+ var SKILLS_MIDDLEWARE_NAME = "skillsMiddleware";
5247
5810
  function isMiddlewareToolEnabled(config) {
5248
5811
  if (typeof config === "boolean") {
5249
5812
  return config;
@@ -5272,8 +5835,8 @@ function normalizeMiddlewareNode(node) {
5272
5835
  if (provider === entity.provider) {
5273
5836
  return node;
5274
5837
  }
5275
- return _object_spread_props$1(_object_spread$1({}, node), {
5276
- entity: _object_spread_props$1(_object_spread$1({}, entity), {
5838
+ return _object_spread_props$1(_object_spread$2({}, node), {
5839
+ entity: _object_spread_props$1(_object_spread$2({}, entity), {
5277
5840
  provider: provider
5278
5841
  })
5279
5842
  });
@@ -5323,18 +5886,18 @@ function isContextCompressionComponentData(value) {
5323
5886
  "job"
5324
5887
  ];
5325
5888
 
5326
- function _array_like_to_array$3(arr, len) {
5889
+ function _array_like_to_array$4(arr, len) {
5327
5890
  if (len == null || len > arr.length) len = arr.length;
5328
5891
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5329
5892
  return arr2;
5330
5893
  }
5331
- function _array_with_holes$3(arr) {
5894
+ function _array_with_holes$4(arr) {
5332
5895
  if (Array.isArray(arr)) return arr;
5333
5896
  }
5334
5897
  function _array_without_holes(arr) {
5335
- if (Array.isArray(arr)) return _array_like_to_array$3(arr);
5898
+ if (Array.isArray(arr)) return _array_like_to_array$4(arr);
5336
5899
  }
5337
- function _define_property$1(obj, key, value) {
5900
+ function _define_property$2(obj, key, value) {
5338
5901
  if (key in obj) {
5339
5902
  Object.defineProperty(obj, key, {
5340
5903
  value: value,
@@ -5350,7 +5913,7 @@ function _define_property$1(obj, key, value) {
5350
5913
  function _iterable_to_array$1(iter) {
5351
5914
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
5352
5915
  }
5353
- function _iterable_to_array_limit$2(arr, i) {
5916
+ function _iterable_to_array_limit$3(arr, i) {
5354
5917
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
5355
5918
  if (_i == null) return;
5356
5919
  var _arr = [];
@@ -5374,13 +5937,13 @@ function _iterable_to_array_limit$2(arr, i) {
5374
5937
  }
5375
5938
  return _arr;
5376
5939
  }
5377
- function _non_iterable_rest$3() {
5940
+ function _non_iterable_rest$4() {
5378
5941
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5379
5942
  }
5380
5943
  function _non_iterable_spread() {
5381
5944
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5382
5945
  }
5383
- function _object_spread(target) {
5946
+ function _object_spread$1(target) {
5384
5947
  for(var i = 1; i < arguments.length; i++){
5385
5948
  var source = arguments[i] != null ? arguments[i] : {};
5386
5949
  var ownKeys = Object.keys(source);
@@ -5390,7 +5953,7 @@ function _object_spread(target) {
5390
5953
  }));
5391
5954
  }
5392
5955
  ownKeys.forEach(function(key) {
5393
- _define_property$1(target, key, source[key]);
5956
+ _define_property$2(target, key, source[key]);
5394
5957
  });
5395
5958
  }
5396
5959
  return target;
@@ -5441,19 +6004,19 @@ function _object_without_properties_loose(source, excluded) {
5441
6004
  }
5442
6005
  return target;
5443
6006
  }
5444
- function _sliced_to_array$2(arr, i) {
5445
- return _array_with_holes$3(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
6007
+ function _sliced_to_array$3(arr, i) {
6008
+ return _array_with_holes$4(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
5446
6009
  }
5447
6010
  function _to_consumable_array(arr) {
5448
- return _array_without_holes(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread();
6011
+ return _array_without_holes(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread();
5449
6012
  }
5450
- function _unsupported_iterable_to_array$3(o, minLen) {
6013
+ function _unsupported_iterable_to_array$4(o, minLen) {
5451
6014
  if (!o) return;
5452
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
6015
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
5453
6016
  var n = Object.prototype.toString.call(o).slice(8, -1);
5454
6017
  if (n === "Object" && o.constructor) n = o.constructor.name;
5455
6018
  if (n === "Map" || n === "Set") return Array.from(n);
5456
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
6019
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
5457
6020
  }
5458
6021
  function isNil(value) {
5459
6022
  return value === null || value === undefined;
@@ -5524,7 +6087,7 @@ function normalizeIncomingContent(content, context) {
5524
6087
  if (typeof content !== "string") {
5525
6088
  return content;
5526
6089
  }
5527
- return _object_spread({
6090
+ return _object_spread$1({
5528
6091
  type: "text",
5529
6092
  text: content
5530
6093
  }, context.streamId ? {
@@ -5570,6 +6133,7 @@ function getContentChunkSeparator(previous, nextText, joinHint) {
5570
6133
  return "";
5571
6134
  }
5572
6135
  function stringifySingle(content) {
6136
+ if (chatkitTypes.isFileActivityContent(content) || chatkitTypes.isResourceCardContent(content)) return "";
5573
6137
  if (content.type === "text") {
5574
6138
  return content.text;
5575
6139
  }
@@ -5588,7 +6152,7 @@ function filterText(content) {
5588
6152
  return "";
5589
6153
  }
5590
6154
  function mergeTextChunkForDisplay(previous, incoming) {
5591
- return _object_spread(_object_spread_props(_object_spread({}, previous), {
6155
+ return _object_spread$1(_object_spread_props(_object_spread$1({}, previous), {
5592
6156
  text: "".concat(previous.text).concat(incoming.text)
5593
6157
  }), !previous.id && incoming.id ? {
5594
6158
  id: incoming.id
@@ -5600,7 +6164,7 @@ function mergeTextChunkForDisplay(previous, incoming) {
5600
6164
  }
5601
6165
  function stripAutoDisplaySeparator(incoming, previousOriginal) {
5602
6166
  if ((previousOriginal === null || previousOriginal === void 0 ? void 0 : previousOriginal.type) === "component" && incoming.text.startsWith("\n\n")) {
5603
- return _object_spread_props(_object_spread({}, incoming), {
6167
+ return _object_spread_props(_object_spread$1({}, incoming), {
5604
6168
  text: incoming.text.slice(1)
5605
6169
  });
5606
6170
  }
@@ -5610,21 +6174,21 @@ function mergeComponentData(previous, incoming) {
5610
6174
  var _previous_data, _incoming_data;
5611
6175
  var _incoming_data1;
5612
6176
  var mergedIncomingData = Object.entries((_incoming_data1 = incoming.data) !== null && _incoming_data1 !== void 0 ? _incoming_data1 : {}).reduce(function(acc, param) {
5613
- var _param = _sliced_to_array$2(param, 2), key = _param[0], value = _param[1];
6177
+ var _param = _sliced_to_array$3(param, 2), key = _param[0], value = _param[1];
5614
6178
  if (!isNil(value)) {
5615
6179
  acc[key] = value;
5616
6180
  }
5617
6181
  return acc;
5618
6182
  }, {});
5619
6183
  var _previous_data1;
5620
- return _object_spread_props(_object_spread({}, previous, incoming), {
5621
- data: _object_spread_props(_object_spread({}, (_previous_data1 = previous.data) !== null && _previous_data1 !== void 0 ? _previous_data1 : {}, mergedIncomingData), {
6184
+ return _object_spread_props(_object_spread$1({}, previous, incoming), {
6185
+ data: _object_spread_props(_object_spread$1({}, (_previous_data1 = previous.data) !== null && _previous_data1 !== void 0 ? _previous_data1 : {}, mergedIncomingData), {
5622
6186
  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)
5623
6187
  })
5624
6188
  });
5625
6189
  }
5626
6190
  function inferMessageAppendContext(content, fallbackSource) {
5627
- return _object_spread({
6191
+ return _object_spread$1({
5628
6192
  source: fallbackSource !== null && fallbackSource !== void 0 ? fallbackSource : inferContentSource(content)
5629
6193
  }, typeof content !== "string" && (content === null || content === void 0 ? void 0 : content.id) ? {
5630
6194
  streamId: String(content.id)
@@ -5632,10 +6196,10 @@ function inferMessageAppendContext(content, fallbackSource) {
5632
6196
  }
5633
6197
  function resolveMessageAppendContext(options) {
5634
6198
  var inferredContext = inferMessageAppendContext(options.incoming, options.fallbackSource);
5635
- var appendContext = typeof options.incoming === "string" && !inferredContext.streamId && options.fallbackStreamId ? _object_spread_props(_object_spread({}, inferredContext), {
6199
+ var appendContext = typeof options.incoming === "string" && !inferredContext.streamId && options.fallbackStreamId ? _object_spread_props(_object_spread$1({}, inferredContext), {
5636
6200
  streamId: options.fallbackStreamId
5637
6201
  }) : inferredContext;
5638
- var messageContext = shouldJoinWithoutSeparator(options.previous, appendContext) ? _object_spread_props(_object_spread({}, appendContext), {
6202
+ var messageContext = shouldJoinWithoutSeparator(options.previous, appendContext) ? _object_spread_props(_object_spread$1({}, appendContext), {
5639
6203
  joinHint: "none"
5640
6204
  }) : appendContext;
5641
6205
  return {
@@ -5656,10 +6220,10 @@ function resolveMessageAppendContext(options) {
5656
6220
  var previous = initial;
5657
6221
  return {
5658
6222
  resolve: function resolve(options) {
5659
- var resolved = resolveMessageAppendContext(_object_spread_props(_object_spread({}, options), {
6223
+ var resolved = resolveMessageAppendContext(_object_spread_props(_object_spread$1({}, options), {
5660
6224
  previous: previous
5661
6225
  }));
5662
- previous = resolved.appendContext;
6226
+ if (!chatkitTypes.isFileActivityContent(options.incoming) && !chatkitTypes.isResourceCardContent(options.incoming)) previous = resolved.appendContext;
5663
6227
  return resolved;
5664
6228
  },
5665
6229
  reset: function reset() {
@@ -5680,14 +6244,24 @@ function resolveMessageAppendContext(options) {
5680
6244
  * - Applies context-aware merge rules for text/reasoning/component chunks.
5681
6245
  * - `previous` must be supplied by caller when same-stream join inference is needed.
5682
6246
  */ function appendMessageContent(aiMessage, incoming, context) {
6247
+ var card = chatkitTypes.parseResourceCardContent(incoming);
6248
+ if (card) {
6249
+ aiMessage.content = chatkitTypes.upsertResourceCardContent(ensureArrayContent(aiMessage.content), card);
6250
+ return;
6251
+ }
6252
+ var receipt = chatkitTypes.parseFileActivityContent(incoming);
6253
+ if (receipt) {
6254
+ aiMessage.content = chatkitTypes.upsertFileActivityContent(ensureArrayContent(aiMessage.content), receipt);
6255
+ return;
6256
+ }
5683
6257
  aiMessage.status = "answering";
5684
6258
  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, [
5685
6259
  "previous"
5686
6260
  ]);
5687
- var appendContext = _object_spread({}, inferMessageAppendContext(incoming), contextWithoutPrevious);
6261
+ var appendContext = _object_spread$1({}, inferMessageAppendContext(incoming), contextWithoutPrevious);
5688
6262
  var _appendContext_joinHint;
5689
6263
  var joinHint = (_appendContext_joinHint = appendContext.joinHint) !== null && _appendContext_joinHint !== void 0 ? _appendContext_joinHint : shouldJoinWithoutSeparator(previous, appendContext) ? "none" : undefined;
5690
- var messageContext = joinHint ? _object_spread_props(_object_spread({}, appendContext), {
6264
+ var messageContext = joinHint ? _object_spread_props(_object_spread$1({}, appendContext), {
5691
6265
  joinHint: joinHint
5692
6266
  }) : appendContext;
5693
6267
  var content = normalizeIncomingContent(incoming, appendContext);
@@ -5696,7 +6270,7 @@ function resolveMessageAppendContext(options) {
5696
6270
  var reasoning = (_aiMessage_reasoning = aiMessage.reasoning) !== null && _aiMessage_reasoning !== void 0 ? _aiMessage_reasoning : [];
5697
6271
  var lastReasoning = reasoning[reasoning.length - 1];
5698
6272
  if ((lastReasoning === null || lastReasoning === void 0 ? void 0 : lastReasoning.id) === content.id) {
5699
- var mergedReasoning = _object_spread_props(_object_spread({}, lastReasoning), {
6273
+ var mergedReasoning = _object_spread_props(_object_spread$1({}, lastReasoning), {
5700
6274
  text: "".concat(lastReasoning.text).concat(content.text)
5701
6275
  });
5702
6276
  aiMessage.reasoning = _to_consumable_array(reasoning.slice(0, reasoning.length - 1)).concat([
@@ -5717,7 +6291,7 @@ function resolveMessageAppendContext(options) {
5717
6291
  return isTextContent(item) && item.id === content.id;
5718
6292
  });
5719
6293
  if (index > -1) {
5720
- var mergedContent = _object_spread(_object_spread_props(_object_spread({}, chunks[index]), {
6294
+ var mergedContent = _object_spread$1(_object_spread_props(_object_spread$1({}, chunks[index]), {
5721
6295
  text: "".concat(chunks[index].text).concat(content.text)
5722
6296
  }), !chunks[index].id && content.id ? {
5723
6297
  id: content.id
@@ -5740,7 +6314,7 @@ function resolveMessageAppendContext(options) {
5740
6314
  var existingIndex = findLastTextChunkIndexById(chunks, content.id);
5741
6315
  if (existingIndex > -1) {
5742
6316
  var existing = chunks[existingIndex];
5743
- var merged = _object_spread_props(_object_spread({}, existing), {
6317
+ var merged = _object_spread_props(_object_spread$1({}, existing), {
5744
6318
  text: "".concat(existing.text).concat(content.text)
5745
6319
  });
5746
6320
  var nextChunks = _to_consumable_array(chunks);
@@ -5749,7 +6323,7 @@ function resolveMessageAppendContext(options) {
5749
6323
  return;
5750
6324
  }
5751
6325
  } else if (isTextContent(lastContent) && messageContext.joinHint === "none") {
5752
- var mergedLastContent = _object_spread_props(_object_spread({}, lastContent), {
6326
+ var mergedLastContent = _object_spread_props(_object_spread$1({}, lastContent), {
5753
6327
  text: "".concat(lastContent.text).concat(content.text)
5754
6328
  });
5755
6329
  aiMessage.content = _to_consumable_array(chunks.slice(0, chunks.length - 1)).concat([
@@ -5758,7 +6332,7 @@ function resolveMessageAppendContext(options) {
5758
6332
  return;
5759
6333
  }
5760
6334
  var separator = getContentChunkSeparator(lastContent, content.text, messageContext.joinHint);
5761
- var appended = _object_spread_props(_object_spread({}, content), {
6335
+ var appended = _object_spread_props(_object_spread$1({}, content), {
5762
6336
  text: separator + content.text
5763
6337
  });
5764
6338
  aiMessage.content = _to_consumable_array(chunks).concat([
@@ -5782,7 +6356,7 @@ function resolveMessageAppendContext(options) {
5782
6356
  aiMessage.content = nextChunks1;
5783
6357
  }
5784
6358
  function appendMessagePlainText(accumulator, incoming, context) {
5785
- var resolvedContext = _object_spread({}, inferMessageAppendContext(incoming), context !== null && context !== void 0 ? context : {});
6359
+ var resolvedContext = _object_spread$1({}, inferMessageAppendContext(incoming), context !== null && context !== void 0 ? context : {});
5786
6360
  var nextText = filterText(incoming);
5787
6361
  if (!nextText) {
5788
6362
  return accumulator !== null && accumulator !== void 0 ? accumulator : "";
@@ -5827,7 +6401,7 @@ function appendMessagePlainText(accumulator, incoming, context) {
5827
6401
  return;
5828
6402
  }
5829
6403
  textIndexById.set(item.id, merged.length);
5830
- merged.push(_object_spread({}, item));
6404
+ merged.push(_object_spread$1({}, item));
5831
6405
  return;
5832
6406
  }
5833
6407
  var lastItem = merged[merged.length - 1];
@@ -5835,7 +6409,7 @@ function appendMessagePlainText(accumulator, incoming, context) {
5835
6409
  merged[merged.length - 1] = mergeTextChunkForDisplay(lastItem, item);
5836
6410
  return;
5837
6411
  }
5838
- merged.push(_object_spread({}, item));
6412
+ merged.push(_object_spread$1({}, item));
5839
6413
  });
5840
6414
  return merged.length ? merged : null;
5841
6415
  }
@@ -5847,9 +6421,10 @@ function stringifyMessageContent(content) {
5847
6421
  var result = "";
5848
6422
  var previousContext = null;
5849
6423
  content.forEach(function(item) {
6424
+ if (chatkitTypes.isFileActivityContent(item) || chatkitTypes.isResourceCardContent(item)) return;
5850
6425
  var itemContext = inferMessageAppendContext(item);
5851
6426
  var joinHint = shouldJoinWithoutSeparator(previousContext, itemContext) ? "none" : undefined;
5852
- result = appendMessagePlainText(result, stringifySingle(item), _object_spread({}, itemContext, joinHint ? {
6427
+ result = appendMessagePlainText(result, stringifySingle(item), _object_spread$1({}, itemContext, joinHint ? {
5853
6428
  joinHint: joinHint
5854
6429
  } : {}));
5855
6430
  previousContext = itemContext;
@@ -5872,7 +6447,7 @@ function filterMessageText(content) {
5872
6447
  }
5873
6448
  var itemContext = inferMessageAppendContext(item);
5874
6449
  var joinHint = shouldJoinWithoutSeparator(previousContext, itemContext) ? "none" : undefined;
5875
- result = appendMessagePlainText(result, nextText, _object_spread({}, itemContext, joinHint ? {
6450
+ result = appendMessagePlainText(result, nextText, _object_spread$1({}, itemContext, joinHint ? {
5876
6451
  joinHint: joinHint
5877
6452
  } : {}));
5878
6453
  previousContext = itemContext;
@@ -5882,6 +6457,93 @@ function filterMessageText(content) {
5882
6457
  return filterText(content) || null;
5883
6458
  }
5884
6459
 
6460
+ var SANDBOX_FILE_OUTPUT_RULES = [
6461
+ {
6462
+ extension: ".docx",
6463
+ kind: "document",
6464
+ mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
6465
+ format: "docx"
6466
+ },
6467
+ {
6468
+ extension: ".xlsx",
6469
+ kind: "spreadsheet",
6470
+ mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
6471
+ format: "xlsx"
6472
+ },
6473
+ {
6474
+ extension: ".pptx",
6475
+ kind: "presentation",
6476
+ mimeType: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
6477
+ format: "pptx"
6478
+ },
6479
+ {
6480
+ extension: ".pdf",
6481
+ kind: "document",
6482
+ mimeType: "application/pdf",
6483
+ format: "pdf"
6484
+ },
6485
+ {
6486
+ extension: ".json",
6487
+ kind: "file",
6488
+ mimeType: "application/json",
6489
+ format: "json"
6490
+ },
6491
+ {
6492
+ extension: ".md",
6493
+ kind: "document",
6494
+ mimeType: "text/markdown",
6495
+ format: "utf8"
6496
+ },
6497
+ {
6498
+ extension: ".txt",
6499
+ kind: "file",
6500
+ mimeType: "text/plain",
6501
+ format: "utf8"
6502
+ },
6503
+ {
6504
+ extension: ".csv",
6505
+ kind: "spreadsheet",
6506
+ mimeType: "text/csv",
6507
+ format: "utf8"
6508
+ },
6509
+ {
6510
+ extension: ".tsv",
6511
+ kind: "spreadsheet",
6512
+ mimeType: "text/tab-separated-values",
6513
+ format: "utf8"
6514
+ },
6515
+ {
6516
+ extension: ".html",
6517
+ kind: "file",
6518
+ mimeType: "text/html",
6519
+ format: "utf8"
6520
+ },
6521
+ {
6522
+ extension: ".png",
6523
+ kind: "image",
6524
+ mimeType: "image/png",
6525
+ format: "png"
6526
+ },
6527
+ {
6528
+ extension: ".jpg",
6529
+ kind: "image",
6530
+ mimeType: "image/jpeg",
6531
+ format: "jpeg"
6532
+ },
6533
+ {
6534
+ extension: ".jpeg",
6535
+ kind: "image",
6536
+ mimeType: "image/jpeg",
6537
+ format: "jpeg"
6538
+ },
6539
+ {
6540
+ extension: ".svg",
6541
+ kind: "image",
6542
+ mimeType: "image/svg+xml",
6543
+ format: "utf8"
6544
+ }
6545
+ ];
6546
+
5885
6547
  function isEvidenceProposal(value) {
5886
6548
  return "strategy" in value && "candidateId" in value && !!value.strategy && !!value.candidateId;
5887
6549
  }
@@ -6065,6 +6727,7 @@ var MCP_HTTP_CORS_REQUEST_HEADERS = [
6065
6727
  "X-Request-Id"
6066
6728
  ];
6067
6729
  var MCP_HTTP_CORS_EXPOSED_HEADERS = [
6730
+ "Content-Location",
6068
6731
  "WWW-Authenticate",
6069
6732
  "MCP-Protocol-Version",
6070
6733
  "Mcp-Session-Id",
@@ -6112,6 +6775,226 @@ var KNOWLEDGE_AUTOMATIC_TAG_CANDIDATES = 50;
6112
6775
  var KNOWLEDGE_AUTOMATIC_TAG_MAXIMUM = 10;
6113
6776
  var KNOWLEDGE_AUTOMATIC_TAG_TEXT_BUDGET = 12000;
6114
6777
 
6778
+ var DEFAULT_KNOWLEDGE_KEYWORD_ANALYZER = "basic";
6779
+
6780
+ /** Exhaustive attribution shared by queries, ledger export and UI. */ function modelExecutionEntry(source) {
6781
+ switch(source.type){
6782
+ case "cli_session":
6783
+ return "cli";
6784
+ case "agent_invocation":
6785
+ return "agent_runtime";
6786
+ case "shell_execution":
6787
+ return "shell";
6788
+ }
6789
+ }
6790
+ function modelExecutionSourceId(source) {
6791
+ switch(source.type){
6792
+ case "cli_session":
6793
+ return source.cliSessionId;
6794
+ case "agent_invocation":
6795
+ return source.invocationId;
6796
+ case "shell_execution":
6797
+ return source.executionId;
6798
+ }
6799
+ }
6800
+ var MODEL_EXECUTION_POLICY_SETTING = "modelExecutionPolicy";
6801
+ /** Explicit model policy source in a Runtime binding; independent of the calling Agent identity. */ var agentRuntimeModelSourceSchema = v3.z.object({
6802
+ type: v3.z.literal("assistant"),
6803
+ xpertId: v3.z.string().uuid()
6804
+ }).strict();
6805
+
6806
+ /**
6807
+ * Running means accepted; actual work start requires an observation.
6808
+ * Only succeeded, failed and cancelled are terminal. Unknown must be reconciled without replay.
6809
+ */ var agentInvocationStatusSchema = v3.z.enum([
6810
+ "queued",
6811
+ "running",
6812
+ "waiting",
6813
+ "cancelling",
6814
+ "succeeded",
6815
+ "failed",
6816
+ "cancelled",
6817
+ "unknown"
6818
+ ]);
6819
+ var agentInvocationTerminalStatusSchema = v3.z.enum([
6820
+ "succeeded",
6821
+ "failed",
6822
+ "cancelled"
6823
+ ]);
6824
+ /** Activity and reported progress are separate from business acceptance. No invented percentage. */ var agentRuntimeProgressSchema = v3.z.object({
6825
+ source: v3.z.enum([
6826
+ "executor",
6827
+ "host"
6828
+ ]),
6829
+ observedAt: v3.z.string().datetime({
6830
+ offset: true
6831
+ }),
6832
+ startedAt: v3.z.string().datetime({
6833
+ offset: true
6834
+ }).optional(),
6835
+ phase: v3.z.string().trim().min(1).max(200).optional(),
6836
+ summary: v3.z.string().max(2000).optional(),
6837
+ steps: v3.z.object({
6838
+ completed: v3.z.number().int().nonnegative(),
6839
+ total: v3.z.number().int().positive()
6840
+ }).strict().refine(function(steps) {
6841
+ return steps.completed <= steps.total;
6842
+ }).optional()
6843
+ }).strict();
6844
+
6845
+ var AGENT_OUTPUT_MAX_PATHS = 128;
6846
+ /** Relative file selections only. A declaration does not grant filesystem access. */ var agentResultPathSchema = v3.z.string().min(1).max(1024).refine(function(path) {
6847
+ return !path.startsWith("/") && !/^[a-zA-Z]:/.test(path) && !path.includes("\\") && !/[\x00-\x1f]/.test(path) && path.split("/").every(function(part) {
6848
+ return part !== "" && part !== "." && part !== "..";
6849
+ });
6850
+ }, "Expected a relative file path");
6851
+ /** An export selection is a list of exact files, never a filesystem search. */ var deliveryPathsSchema = v3.z.array(agentResultPathSchema.refine(function(path) {
6852
+ return !/[*?\[\]{}]/.test(path);
6853
+ }, "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.");
6854
+ /** Omission means no export. Optional paths restrict the adapter's explicitly declared deliverables. */ var agentOutputDeliverySchema = v3.z.discriminatedUnion("mode", [
6855
+ v3.z.object({
6856
+ mode: v3.z.literal("none")
6857
+ }).strict(),
6858
+ v3.z.object({
6859
+ mode: v3.z.literal("files"),
6860
+ paths: deliveryPathsSchema
6861
+ }).strict(),
6862
+ v3.z.object({
6863
+ mode: v3.z.literal("archive"),
6864
+ paths: deliveryPathsSchema
6865
+ }).strict()
6866
+ ]);
6867
+
6868
+ var projectTaskSpecificationDigestSchema = v3.z.string().regex(/^sha256:[a-f0-9]{64}$/);
6869
+ /** Only requirements belong here; status, progress, assignment and generic revision do not. */ var projectTaskSpecificationSchema = v3.z.object({
6870
+ version: v3.z.literal(1),
6871
+ title: v3.z.string().trim().min(1).max(500),
6872
+ description: v3.z.string().max(32000).optional(),
6873
+ requirements: v3.z.array(v3.z.string().trim().min(1).max(4000)).min(1).max(64),
6874
+ steps: v3.z.array(v3.z.object({
6875
+ stepIndex: v3.z.number().int().positive(),
6876
+ description: v3.z.string().trim().min(1).max(4000)
6877
+ }).strict()).max(128)
6878
+ }).strict().refine(function(specification) {
6879
+ return new Set(specification.steps.map(function(step) {
6880
+ return step.stepIndex;
6881
+ })).size === specification.steps.length;
6882
+ }, "Step indices must be unique");
6883
+ /** The host verifies the digest against the specification at the persistence boundary. */ var projectTaskSpecificationSnapshotSchema = v3.z.object({
6884
+ digest: projectTaskSpecificationDigestSchema,
6885
+ specification: projectTaskSpecificationSchema
6886
+ }).strict();
6887
+ /** Versioned references, not paths or access grants. Resolve and authorize before reading. */ var projectTaskEvidenceReferenceSchema = v3.z.discriminatedUnion("type", [
6888
+ v3.z.object({
6889
+ type: v3.z.literal("artifact"),
6890
+ artifactId: v3.z.string().uuid(),
6891
+ versionId: v3.z.string().uuid()
6892
+ }).strict(),
6893
+ v3.z.object({
6894
+ type: v3.z.literal("invocation_result"),
6895
+ invocationId: v3.z.string().uuid(),
6896
+ revision: v3.z.number().int().nonnegative()
6897
+ }).strict(),
6898
+ v3.z.object({
6899
+ type: v3.z.literal("workspace_snapshot"),
6900
+ snapshotId: v3.z.string().uuid(),
6901
+ digest: projectTaskSpecificationDigestSchema
6902
+ }).strict()
6903
+ ]);
6904
+ var projectTaskExecutionPurposeSchema = v3.z.discriminatedUnion("type", [
6905
+ v3.z.object({
6906
+ type: v3.z.literal("implementation")
6907
+ }).strict(),
6908
+ v3.z.object({
6909
+ type: v3.z.literal("review"),
6910
+ implementationExecutionId: v3.z.string().uuid(),
6911
+ implementationInvocationId: v3.z.string().uuid(),
6912
+ specificationDigest: projectTaskSpecificationDigestSchema,
6913
+ evidence: v3.z.array(projectTaskEvidenceReferenceSchema).min(1).max(64)
6914
+ }).strict()
6915
+ ]);
6916
+ var projectTaskExecutionReferenceSchema = v3.z.object({
6917
+ projectId: v3.z.string().uuid(),
6918
+ projectTaskId: v3.z.string().uuid(),
6919
+ taskExecutionId: v3.z.string().uuid()
6920
+ }).strict();
6921
+ /** Host-owned attempt context. Review is a new attempt and grants no completion authority. */ var projectTaskExecutionContextSchema = projectTaskExecutionReferenceSchema.extend({
6922
+ specification: projectTaskSpecificationSnapshotSchema,
6923
+ purpose: projectTaskExecutionPurposeSchema
6924
+ }).strict().superRefine(function(value, ctx) {
6925
+ if (value.purpose.type !== "review") return;
6926
+ if (value.purpose.implementationExecutionId === value.taskExecutionId) {
6927
+ ctx.addIssue({
6928
+ code: v3.z.ZodIssueCode.custom,
6929
+ path: [
6930
+ "purpose"
6931
+ ],
6932
+ message: "Review must reference another attempt"
6933
+ });
6934
+ }
6935
+ if (value.purpose.specificationDigest !== value.specification.digest) {
6936
+ ctx.addIssue({
6937
+ code: v3.z.ZodIssueCode.custom,
6938
+ path: [
6939
+ "purpose"
6940
+ ],
6941
+ message: "Review specification must match its subject"
6942
+ });
6943
+ }
6944
+ });
6945
+ /** A receipt is neither a business completion decision nor proof that the process has started. */ var projectTaskDispatchReceiptSchema = projectTaskExecutionReferenceSchema.extend({
6946
+ invocationId: v3.z.string().uuid(),
6947
+ status: agentInvocationStatusSchema
6948
+ }).strict();
6949
+ /** Explicit delegation. Routing and actor identity come from the host. */ var projectTaskDispatchInputSchema = v3.z.object({
6950
+ requestId: v3.z.string().uuid(),
6951
+ taskId: v3.z.string().uuid(),
6952
+ expectedRevision: v3.z.number().int().positive(),
6953
+ bindingId: v3.z.string().uuid(),
6954
+ purpose: projectTaskExecutionPurposeSchema.optional(),
6955
+ delivery: agentOutputDeliverySchema.optional(),
6956
+ instructions: v3.z.string().trim().max(16000).default("")
6957
+ }).strict();
6958
+ /** Exact JSON response from an evidence-only reviewer; prose never implies a passing verdict. */ var projectTaskReviewReportSchema = v3.z.object({
6959
+ version: v3.z.literal(1),
6960
+ verdict: v3.z.enum([
6961
+ "pass",
6962
+ "changes_required",
6963
+ "indeterminate"
6964
+ ]),
6965
+ specificationDigest: projectTaskSpecificationDigestSchema,
6966
+ implementationInvocationId: v3.z.string().uuid(),
6967
+ evidence: v3.z.array(projectTaskEvidenceReferenceSchema).min(1).max(64),
6968
+ findings: v3.z.array(v3.z.string().trim().min(1).max(4000)).min(1).max(64),
6969
+ limitations: v3.z.array(v3.z.string().trim().min(1).max(4000)).max(64)
6970
+ }).strict();
6971
+ var projectTaskDecisionInputSchema = v3.z.object({
6972
+ requestId: v3.z.string().uuid(),
6973
+ taskId: v3.z.string().uuid(),
6974
+ expectedRevision: v3.z.number().int().positive(),
6975
+ implementationExecutionId: v3.z.string().uuid(),
6976
+ specificationDigest: projectTaskSpecificationDigestSchema,
6977
+ evidence: v3.z.array(projectTaskEvidenceReferenceSchema).min(1).max(64),
6978
+ reviewExecutionId: v3.z.string().uuid().optional(),
6979
+ outcome: v3.z.enum([
6980
+ "accept",
6981
+ "rework"
6982
+ ]),
6983
+ rationale: v3.z.string().trim().min(1).max(8000),
6984
+ checks: v3.z.array(v3.z.string().trim().min(1).max(4000)).min(1).max(64)
6985
+ }).strict();
6986
+ var projectTaskDecisionSchema = projectTaskDecisionInputSchema.extend({
6987
+ actorId: v3.z.string().uuid(),
6988
+ actorType: v3.z.enum([
6989
+ "user",
6990
+ "xpert",
6991
+ "project_agent"
6992
+ ]),
6993
+ executionId: v3.z.string().uuid().optional(),
6994
+ decidedAt: v3.z.string().datetime(),
6995
+ taskRevision: v3.z.number().int().positive()
6996
+ }).strict();
6997
+
6115
6998
  var STATE_VARIABLE_HUMAN = "human";
6116
6999
 
6117
7000
  exports.PermissionsEnum = void 0;
@@ -6231,6 +7114,7 @@ exports.TagCategoryEnum = void 0;
6231
7114
  var TAG_TARGETS = [
6232
7115
  exports.TagCategoryEnum.XPERT,
6233
7116
  "knowledgebase",
7117
+ "prompt_workflow",
6234
7118
  exports.TagCategoryEnum.TOOLSET,
6235
7119
  exports.TagCategoryEnum.INDICATOR,
6236
7120
  exports.TagCategoryEnum.STORY,
@@ -6595,7 +7479,7 @@ var IntegrationGitHubProvider = {
6595
7479
  }
6596
7480
  };
6597
7481
 
6598
- function _define_property(obj, key, value) {
7482
+ function _define_property$1(obj, key, value) {
6599
7483
  if (key in obj) {
6600
7484
  Object.defineProperty(obj, key, {
6601
7485
  value: value,
@@ -6610,10 +7494,11 @@ function _define_property(obj, key, value) {
6610
7494
  }
6611
7495
  var INTEGRATION_PROVIDERS = // [IntegrationEnum.LARK]: IntegrationLarkProvider,
6612
7496
  // [IntegrationEnum.WECOM]: IntegrationWeComProvider,
6613
- _define_property({}, exports.IntegrationEnum.GITHUB, IntegrationGitHubProvider);
7497
+ _define_property$1({}, exports.IntegrationEnum.GITHUB, IntegrationGitHubProvider);
6614
7498
 
6615
7499
  exports.AiModelTypeEnum = void 0;
6616
7500
  (function(AiModelTypeEnum) {
7501
+ AiModelTypeEnum["REALTIME"] = "realtime";
6617
7502
  AiModelTypeEnum["LLM"] = "llm";
6618
7503
  AiModelTypeEnum["TEXT_EMBEDDING"] = "text-embedding";
6619
7504
  AiModelTypeEnum["RERANK"] = "rerank";
@@ -6625,15 +7510,15 @@ exports.AiModelTypeEnum = void 0;
6625
7510
  AiModelTypeEnum["VIDEO"] = "video";
6626
7511
  })(exports.AiModelTypeEnum || (exports.AiModelTypeEnum = {}));
6627
7512
 
6628
- function _array_like_to_array$2(arr, len) {
7513
+ function _array_like_to_array$3(arr, len) {
6629
7514
  if (len == null || len > arr.length) len = arr.length;
6630
7515
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6631
7516
  return arr2;
6632
7517
  }
6633
- function _array_with_holes$2(arr) {
7518
+ function _array_with_holes$3(arr) {
6634
7519
  if (Array.isArray(arr)) return arr;
6635
7520
  }
6636
- function _iterable_to_array_limit$1(arr, i) {
7521
+ function _iterable_to_array_limit$2(arr, i) {
6637
7522
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
6638
7523
  if (_i == null) return;
6639
7524
  var _arr = [];
@@ -6657,19 +7542,19 @@ function _iterable_to_array_limit$1(arr, i) {
6657
7542
  }
6658
7543
  return _arr;
6659
7544
  }
6660
- function _non_iterable_rest$2() {
7545
+ function _non_iterable_rest$3() {
6661
7546
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6662
7547
  }
6663
- function _sliced_to_array$1(arr, i) {
6664
- return _array_with_holes$2(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
7548
+ function _sliced_to_array$2(arr, i) {
7549
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
6665
7550
  }
6666
- function _unsupported_iterable_to_array$2(o, minLen) {
7551
+ function _unsupported_iterable_to_array$3(o, minLen) {
6667
7552
  if (!o) return;
6668
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
7553
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
6669
7554
  var n = Object.prototype.toString.call(o).slice(8, -1);
6670
7555
  if (n === "Object" && o.constructor) n = o.constructor.name;
6671
7556
  if (n === "Map" || n === "Set") return Array.from(n);
6672
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
7557
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
6673
7558
  }
6674
7559
  /**
6675
7560
  * Channels of all upstream and downstream nodes relative to the starting point startKey.
@@ -6697,7 +7582,7 @@ function findStartNodes(graph, key) {
6697
7582
  for(var _iterator = connections[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
6698
7583
  var conn = _step.value;
6699
7584
  if (!toMap.has(conn.to)) toMap.set(conn.to, []);
6700
- var _conn_from_split = _sliced_to_array$1(conn.from.split("/"), 1), fromKey = _conn_from_split[0];
7585
+ var _conn_from_split = _sliced_to_array$2(conn.from.split("/"), 1), fromKey = _conn_from_split[0];
6701
7586
  if (conn.type === "edge") {
6702
7587
  toMap.get(conn.to).push(fromKey);
6703
7588
  }
@@ -6855,30 +7740,30 @@ function shortTitle(input) {
6855
7740
  return null;
6856
7741
  }
6857
7742
 
6858
- function _array_like_to_array$1(arr, len) {
7743
+ function _array_like_to_array$2(arr, len) {
6859
7744
  if (len == null || len > arr.length) len = arr.length;
6860
7745
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6861
7746
  return arr2;
6862
7747
  }
6863
- function _array_with_holes$1(arr) {
7748
+ function _array_with_holes$2(arr) {
6864
7749
  if (Array.isArray(arr)) return arr;
6865
7750
  }
6866
7751
  function _iterable_to_array(iter) {
6867
7752
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
6868
7753
  }
6869
- function _non_iterable_rest$1() {
7754
+ function _non_iterable_rest$2() {
6870
7755
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6871
7756
  }
6872
7757
  function _to_array(arr) {
6873
- return _array_with_holes$1(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_rest$1();
7758
+ return _array_with_holes$2(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_rest$2();
6874
7759
  }
6875
- function _unsupported_iterable_to_array$1(o, minLen) {
7760
+ function _unsupported_iterable_to_array$2(o, minLen) {
6876
7761
  if (!o) return;
6877
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
7762
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
6878
7763
  var n = Object.prototype.toString.call(o).slice(8, -1);
6879
7764
  if (n === "Object" && o.constructor) n = o.constructor.name;
6880
7765
  if (n === "Map" || n === "Set") return Array.from(n);
6881
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
7766
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
6882
7767
  }
6883
7768
  /**
6884
7769
  *
@@ -6992,15 +7877,15 @@ exports.BusinessType = void 0;
6992
7877
  BusinessType["INDICATOR"] = "INDICATOR";
6993
7878
  })(exports.BusinessType || (exports.BusinessType = {}));
6994
7879
 
6995
- function _array_like_to_array(arr, len) {
7880
+ function _array_like_to_array$1(arr, len) {
6996
7881
  if (len == null || len > arr.length) len = arr.length;
6997
7882
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6998
7883
  return arr2;
6999
7884
  }
7000
- function _array_with_holes(arr) {
7885
+ function _array_with_holes$1(arr) {
7001
7886
  if (Array.isArray(arr)) return arr;
7002
7887
  }
7003
- function _iterable_to_array_limit(arr, i) {
7888
+ function _iterable_to_array_limit$1(arr, i) {
7004
7889
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
7005
7890
  if (_i == null) return;
7006
7891
  var _arr = [];
@@ -7024,19 +7909,19 @@ function _iterable_to_array_limit(arr, i) {
7024
7909
  }
7025
7910
  return _arr;
7026
7911
  }
7027
- function _non_iterable_rest() {
7912
+ function _non_iterable_rest$1() {
7028
7913
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7029
7914
  }
7030
- function _sliced_to_array(arr, i) {
7031
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
7915
+ function _sliced_to_array$1(arr, i) {
7916
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
7032
7917
  }
7033
- function _unsupported_iterable_to_array(o, minLen) {
7918
+ function _unsupported_iterable_to_array$1(o, minLen) {
7034
7919
  if (!o) return;
7035
- if (typeof o === "string") return _array_like_to_array(o, minLen);
7920
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
7036
7921
  var n = Object.prototype.toString.call(o).slice(8, -1);
7037
7922
  if (n === "Object" && o.constructor) n = o.constructor.name;
7038
7923
  if (n === "Map" || n === "Set") return Array.from(n);
7039
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
7924
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
7040
7925
  }
7041
7926
  exports.ScheduleTaskStatus = void 0;
7042
7927
  (function(ScheduleTaskStatus) {
@@ -7059,7 +7944,7 @@ exports.TaskFrequency = void 0;
7059
7944
  * @returns
7060
7945
  */ function generateCronExpression(schedule) {
7061
7946
  if (!schedule.time) throw new Error("Time is required for scheduling");
7062
- var _schedule_time_split = _sliced_to_array(schedule.time.split(":"), 2), hourStr = _schedule_time_split[0], minuteStr = _schedule_time_split[1];
7947
+ var _schedule_time_split = _sliced_to_array$1(schedule.time.split(":"), 2), hourStr = _schedule_time_split[0], minuteStr = _schedule_time_split[1];
7063
7948
  var hour = parseInt(hourStr, 10);
7064
7949
  var minute = parseInt(minuteStr, 10);
7065
7950
  if (isNaN(hour) || isNaN(minute) || hour < 0 || hour > 23 || minute < 0 || minute > 59) {
@@ -7106,8 +7991,11 @@ var ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = "assistant.chat.send_message";
7106
7991
  var ASSISTANT_CONTEXT_SET_COMMAND = "assistant.context.set";
7107
7992
  var WORKBENCH_FILE_OPEN_COMMAND = "workbench.file.open";
7108
7993
  var WORKBENCH_NAVIGATION_OPEN_COMMAND = "workbench.navigation.open";
7994
+ var WORKBENCH_AGENT_EVOLUTION_TARGET = "agent-evolution.target";
7995
+ var WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET = "agent-evolution.change";
7109
7996
  var WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
7110
7997
  var WORKBENCH_ASSISTANT_CONVERSATION_TARGET = "assistant.conversation";
7998
+ /** Inspect an exact execution; embedded clients may open it without changing the active conversation. */ var WORKBENCH_ASSISTANT_EXECUTION_TARGET = "assistant.execution";
7111
7999
  /** Opens the current Assistant inside a Project-scoped workbench route. */ var WORKBENCH_ASSISTANT_PROJECT_TARGET = "assistant.project";
7112
8000
  var WORKBENCH_EXTENSION_VIEW_TARGET = "workbench.view";
7113
8001
  var XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = "invokeClientCommand";
@@ -7117,9 +8005,240 @@ var KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
7117
8005
 
7118
8006
  var AGENT_PROFILE_TABS_SLOT = "agent.profile.tabs";
7119
8007
 
8008
+ /** Assistant Workbench slot; openMode controls initial tab opening separately. */ var AGENT_WORKBENCH_SLOT = "agent.workbench";
8009
+ /** Legacy plugin declarations and client requests; normalized to AGENT_WORKBENCH_SLOT by the host. */ var LEGACY_AGENT_WORKBENCH_SLOTS = [
8010
+ "agent.workbench.fixed",
8011
+ "agent.workbench.main"
8012
+ ];
8013
+ /** Platform-provided navigation, available without Assistant middleware. */ var CONVERSATION_MAP_FEATURE = "platform.conversation-map";
8014
+
8015
+ /** Live-only UI request. Project scope is mandatory; history playback must not reopen Views. */ function _array_like_to_array(arr, len) {
8016
+ if (len == null || len > arr.length) len = arr.length;
8017
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
8018
+ return arr2;
8019
+ }
8020
+ function _array_with_holes(arr) {
8021
+ if (Array.isArray(arr)) return arr;
8022
+ }
8023
+ function _define_property(obj, key, value) {
8024
+ if (key in obj) {
8025
+ Object.defineProperty(obj, key, {
8026
+ value: value,
8027
+ enumerable: true,
8028
+ configurable: true,
8029
+ writable: true
8030
+ });
8031
+ } else {
8032
+ obj[key] = value;
8033
+ }
8034
+ return obj;
8035
+ }
8036
+ function _iterable_to_array_limit(arr, i) {
8037
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
8038
+ if (_i == null) return;
8039
+ var _arr = [];
8040
+ var _n = true;
8041
+ var _d = false;
8042
+ var _s, _e;
8043
+ try {
8044
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
8045
+ _arr.push(_s.value);
8046
+ if (i && _arr.length === i) break;
8047
+ }
8048
+ } catch (err) {
8049
+ _d = true;
8050
+ _e = err;
8051
+ } finally{
8052
+ try {
8053
+ if (!_n && _i["return"] != null) _i["return"]();
8054
+ } finally{
8055
+ if (_d) throw _e;
8056
+ }
8057
+ }
8058
+ return _arr;
8059
+ }
8060
+ function _non_iterable_rest() {
8061
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8062
+ }
8063
+ function _object_spread(target) {
8064
+ for(var i = 1; i < arguments.length; i++){
8065
+ var source = arguments[i] != null ? arguments[i] : {};
8066
+ var ownKeys = Object.keys(source);
8067
+ if (typeof Object.getOwnPropertySymbols === "function") {
8068
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
8069
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
8070
+ }));
8071
+ }
8072
+ ownKeys.forEach(function(key) {
8073
+ _define_property(target, key, source[key]);
8074
+ });
8075
+ }
8076
+ return target;
8077
+ }
8078
+ function _sliced_to_array(arr, i) {
8079
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
8080
+ }
8081
+ function _unsupported_iterable_to_array(o, minLen) {
8082
+ if (!o) return;
8083
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
8084
+ var n = Object.prototype.toString.call(o).slice(8, -1);
8085
+ if (n === "Object" && o.constructor) n = o.constructor.name;
8086
+ if (n === "Map" || n === "Set") return Array.from(n);
8087
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
8088
+ }
8089
+ var WORKBENCH_VIEW_OPEN_EVENT = "workbench.view.open";
8090
+ /** Parse the public lg.chat.event boundary, keeping arbitrary logs out of navigation. */ function parseWorkbenchViewOpenEvent(value) {
8091
+ 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;
8092
+ if ("conversationId" in value && typeof value.conversationId !== "string") return null;
8093
+ if ("selectionId" in value && typeof value.selectionId !== "string") return null;
8094
+ var parameters = {};
8095
+ if ("parameters" in value) {
8096
+ if (!value.parameters || typeof value.parameters !== "object" || Array.isArray(value.parameters)) return null;
8097
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
8098
+ try {
8099
+ for(var _iterator = Object.entries(value.parameters)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
8100
+ var _step_value = _sliced_to_array(_step.value, 2), key = _step_value[0], item = _step_value[1];
8101
+ if (isViewScalar(item)) parameters[key] = item;
8102
+ else if (Array.isArray(item) && item.every(isViewScalar)) parameters[key] = item;
8103
+ else return null;
8104
+ }
8105
+ } catch (err) {
8106
+ _didIteratorError = true;
8107
+ _iteratorError = err;
8108
+ } finally{
8109
+ try {
8110
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
8111
+ _iterator.return();
8112
+ }
8113
+ } finally{
8114
+ if (_didIteratorError) {
8115
+ throw _iteratorError;
8116
+ }
8117
+ }
8118
+ }
8119
+ }
8120
+ return _object_spread({
8121
+ type: WORKBENCH_VIEW_OPEN_EVENT,
8122
+ viewKey: value.viewKey,
8123
+ projectId: value.projectId
8124
+ }, "conversationId" in value ? {
8125
+ conversationId: value.conversationId
8126
+ } : {}, "selectionId" in value ? {
8127
+ selectionId: value.selectionId
8128
+ } : {}, "parameters" in value ? {
8129
+ parameters: parameters
8130
+ } : {});
8131
+ }
8132
+ function isViewScalar(value) {
8133
+ return value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value);
8134
+ }
8135
+
7120
8136
  var RUNTIME_RESTART_CONFIRMATION = "RESTART";
7121
8137
 
8138
+ var codingExecutionViewKey = "platform.coding-execution__execution";
8139
+ var executionActivityCapabilitiesSchema = v3.z.object({
8140
+ version: v3.z.literal(1),
8141
+ presentation: v3.z.literal("coding")
8142
+ }).strict();
8143
+ var text = v3.z.string().max(65536);
8144
+ var change = v3.z.object({
8145
+ path: v3.z.string().max(4096),
8146
+ change: v3.z.enum([
8147
+ "created",
8148
+ "modified",
8149
+ "deleted",
8150
+ "reported"
8151
+ ]),
8152
+ patch: text.optional()
8153
+ }).strict();
8154
+ var executionActivityItemSchema = v3.z.object({
8155
+ id: v3.z.string().min(1).max(512),
8156
+ occurredAt: v3.z.string().datetime({
8157
+ offset: true
8158
+ }).optional(),
8159
+ content: v3.z.discriminatedUnion("kind", [
8160
+ v3.z.object({
8161
+ kind: v3.z.literal("message"),
8162
+ text: text
8163
+ }).strict(),
8164
+ v3.z.object({
8165
+ kind: v3.z.literal("tool"),
8166
+ name: v3.z.string().max(256).optional(),
8167
+ status: v3.z.enum([
8168
+ "running",
8169
+ "succeeded",
8170
+ "failed",
8171
+ "unknown"
8172
+ ]),
8173
+ input: text.optional(),
8174
+ output: v3.z.string().max(2 * 1024 * 1024).optional(),
8175
+ truncated: v3.z.boolean().optional(),
8176
+ outputRef: v3.z.object({
8177
+ key: v3.z.string().regex(/^[a-f0-9]{64}$/),
8178
+ length: v3.z.number().int().positive()
8179
+ }).strict().optional(),
8180
+ detail: v3.z.discriminatedUnion("type", [
8181
+ v3.z.object({
8182
+ type: v3.z.literal("command"),
8183
+ command: text,
8184
+ cwd: v3.z.string().max(4096).optional(),
8185
+ exitCode: v3.z.number().int().optional(),
8186
+ outputMode: v3.z.literal("merged")
8187
+ }).strict(),
8188
+ v3.z.object({
8189
+ type: v3.z.literal("file_change"),
8190
+ files: v3.z.array(change).max(100)
8191
+ }).strict()
8192
+ ]).optional()
8193
+ }).strict(),
8194
+ v3.z.object({
8195
+ kind: v3.z.literal("diagnostic"),
8196
+ code: v3.z.string().max(128),
8197
+ text: text
8198
+ }).strict()
8199
+ ])
8200
+ }).strict();
8201
+ var executionActivityBatchSchema = v3.z.object({
8202
+ items: v3.z.array(executionActivityItemSchema).max(100),
8203
+ sourceCursor: v3.z.string().max(8192).optional(),
8204
+ expectedSourceCursor: v3.z.string().max(8192).optional(),
8205
+ complete: v3.z.boolean().optional(),
8206
+ gaps: v3.z.array(v3.z.enum([
8207
+ "source_truncated",
8208
+ "storage_unavailable",
8209
+ "capture_limit",
8210
+ "interrupted",
8211
+ "source_lost"
8212
+ ])).max(5).optional()
8213
+ }).strict();
8214
+
8215
+ Object.defineProperty(exports, "createResourceCardContent", {
8216
+ enumerable: true,
8217
+ get: function () { return chatkitTypes.createResourceCardContent; }
8218
+ });
8219
+ Object.defineProperty(exports, "isResourceCardContent", {
8220
+ enumerable: true,
8221
+ get: function () { return chatkitTypes.isResourceCardContent; }
8222
+ });
8223
+ Object.defineProperty(exports, "parseResourceCard", {
8224
+ enumerable: true,
8225
+ get: function () { return chatkitTypes.parseResourceCard; }
8226
+ });
8227
+ Object.defineProperty(exports, "parseResourceCardContent", {
8228
+ enumerable: true,
8229
+ get: function () { return chatkitTypes.parseResourceCardContent; }
8230
+ });
8231
+ Object.defineProperty(exports, "resourceCardId", {
8232
+ enumerable: true,
8233
+ get: function () { return chatkitTypes.resourceCardId; }
8234
+ });
8235
+ Object.defineProperty(exports, "upsertResourceCardContent", {
8236
+ enumerable: true,
8237
+ get: function () { return chatkitTypes.upsertResourceCardContent; }
8238
+ });
8239
+ exports.AGENT_OUTPUT_MAX_PATHS = AGENT_OUTPUT_MAX_PATHS;
7122
8240
  exports.AGENT_PROFILE_TABS_SLOT = AGENT_PROFILE_TABS_SLOT;
8241
+ exports.AGENT_WORKBENCH_SLOT = AGENT_WORKBENCH_SLOT;
7123
8242
  exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
7124
8243
  exports.API_PRINCIPAL_USER_ID_HEADER = API_PRINCIPAL_USER_ID_HEADER;
7125
8244
  exports.ASSISTANT_CHAT_SEND_MESSAGE_COMMAND = ASSISTANT_CHAT_SEND_MESSAGE_COMMAND;
@@ -7138,8 +8257,10 @@ exports.CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED = CHAT_EVENT_TYPE_THREAD_GOAL_UPDATE
7138
8257
  exports.CONTEXT_COMPRESSION_COMPONENT_TYPE = CONTEXT_COMPRESSION_COMPONENT_TYPE;
7139
8258
  exports.CONTEXT_COMPRESSION_MIDDLEWARE_NAME = CONTEXT_COMPRESSION_MIDDLEWARE_NAME;
7140
8259
  exports.CONTEXT_VARIABLE_CURRENTSTATE = CONTEXT_VARIABLE_CURRENTSTATE;
8260
+ exports.CONVERSATION_MAP_FEATURE = CONVERSATION_MAP_FEATURE;
7141
8261
  exports.COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING = COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING;
7142
8262
  exports.COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING = COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING;
8263
+ exports.ChatThreadPurpose = ChatThreadPurpose;
7143
8264
  exports.DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS = DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS;
7144
8265
  exports.DEFAULT_CURRENCIES = DEFAULT_CURRENCIES;
7145
8266
  exports.DEFAULT_DATE_FORMATS = DEFAULT_DATE_FORMATS;
@@ -7148,6 +8269,7 @@ exports.DEFAULT_INVITE_EXPIRY_PERIOD = DEFAULT_INVITE_EXPIRY_PERIOD;
7148
8269
  exports.DEFAULT_KNOWLEDGEBASE_FAQ_CONFIG = DEFAULT_KNOWLEDGEBASE_FAQ_CONFIG;
7149
8270
  exports.DEFAULT_KNOWLEDGEBASE_FAQ_RECALL = DEFAULT_KNOWLEDGEBASE_FAQ_RECALL;
7150
8271
  exports.DEFAULT_KNOWLEDGEBASE_WIKI_CONFIG = DEFAULT_KNOWLEDGEBASE_WIKI_CONFIG;
8272
+ exports.DEFAULT_KNOWLEDGE_KEYWORD_ANALYZER = DEFAULT_KNOWLEDGE_KEYWORD_ANALYZER;
7151
8273
  exports.DEFAULT_KNOWLEDGE_RRF_RANK_CONSTANT = DEFAULT_KNOWLEDGE_RRF_RANK_CONSTANT;
7152
8274
  exports.DEFAULT_KNOWLEDGE_RRF_WEIGHTS = DEFAULT_KNOWLEDGE_RRF_WEIGHTS;
7153
8275
  exports.DEFAULT_KNOWLEDGE_TEXT_SPLITTER = DEFAULT_KNOWLEDGE_TEXT_SPLITTER;
@@ -7166,6 +8288,7 @@ exports.DEFAULT_XPERT_WORKSPACE_DATA_SCOPE = DEFAULT_XPERT_WORKSPACE_DATA_SCOPE;
7166
8288
  exports.ENTERPRISE_H5_PLATFORMS = ENTERPRISE_H5_PLATFORMS;
7167
8289
  exports.FEEDBACK_LEARNING_STRATEGY = FEEDBACK_LEARNING_STRATEGY;
7168
8290
  exports.FILE_VARIABLES = FILE_VARIABLES;
8291
+ exports.GENERAL_PROJECT_TYPE = GENERAL_PROJECT_TYPE;
7169
8292
  exports.GRAPH_NODE_SUMMARIZE_CONVERSATION = GRAPH_NODE_SUMMARIZE_CONVERSATION;
7170
8293
  exports.GRAPH_NODE_TITLE_CONVERSATION = GRAPH_NODE_TITLE_CONVERSATION;
7171
8294
  exports.HUMAN_PROPOSAL_STRATEGY = HUMAN_PROPOSAL_STRATEGY;
@@ -7224,6 +8347,7 @@ exports.KNOWLEDGE_WIKI_SCHEMA_VERSION = KNOWLEDGE_WIKI_SCHEMA_VERSION;
7224
8347
  exports.KNOWLEDGE_WIKI_STALE_VECTOR_CLEANUP_SLO_HOURS = KNOWLEDGE_WIKI_STALE_VECTOR_CLEANUP_SLO_HOURS;
7225
8348
  exports.KnowledgeTask = KnowledgeTask;
7226
8349
  exports.KnowledgebaseChannel = KnowledgebaseChannel;
8350
+ exports.LEGACY_AGENT_WORKBENCH_SLOTS = LEGACY_AGENT_WORKBENCH_SLOTS;
7227
8351
  exports.LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME = LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME;
7228
8352
  exports.LanguagesMap = LanguagesMap;
7229
8353
  exports.MAX_COPILOT_CHECKPOINT_RETENTION_DAYS = MAX_COPILOT_CHECKPOINT_RETENTION_DAYS;
@@ -7259,6 +8383,7 @@ exports.MIN_MODEL_GATEWAY_BODY_RETENTION_DAYS = MIN_MODEL_GATEWAY_BODY_RETENTION
7259
8383
  exports.MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS = MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS;
7260
8384
  exports.MIN_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS = MIN_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS;
7261
8385
  exports.MIN_MODEL_GATEWAY_REQUESTS_PER_MINUTE = MIN_MODEL_GATEWAY_REQUESTS_PER_MINUTE;
8386
+ exports.MODEL_EXECUTION_POLICY_SETTING = MODEL_EXECUTION_POLICY_SETTING;
7262
8387
  exports.MODEL_GATEWAY_CALL_RETENTION_DAYS_SETTING = MODEL_GATEWAY_CALL_RETENTION_DAYS_SETTING;
7263
8388
  exports.MODEL_GATEWAY_CALL_RETENTION_ENABLED_SETTING = MODEL_GATEWAY_CALL_RETENTION_ENABLED_SETTING;
7264
8389
  exports.MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS_SETTING = MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS_SETTING;
@@ -7274,17 +8399,21 @@ exports.PLUGIN_LOAD_STATUS = PLUGIN_LOAD_STATUS;
7274
8399
  exports.PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY = PLUGIN_MARKETPLACE_AUTHENTICATION_POLICY;
7275
8400
  exports.PLUGIN_MARKETPLACE_CATEGORIES = PLUGIN_MARKETPLACE_CATEGORIES;
7276
8401
  exports.PLUGIN_MARKETPLACE_INSTALLATION_POLICY = PLUGIN_MARKETPLACE_INSTALLATION_POLICY;
8402
+ exports.PLUGIN_MARKETPLACE_SUBCATEGORIES = PLUGIN_MARKETPLACE_SUBCATEGORIES;
7277
8403
  exports.PLUGIN_MCP_TOOL_APPROVAL_MODE = PLUGIN_MCP_TOOL_APPROVAL_MODE;
7278
8404
  exports.PLUGIN_RESOURCE_ERROR_CODE = PLUGIN_RESOURCE_ERROR_CODE;
7279
8405
  exports.PLUGIN_RESOURCE_INSTALLATION_STATUS = PLUGIN_RESOURCE_INSTALLATION_STATUS;
7280
8406
  exports.PLUGIN_RESOURCE_RUNTIME_TYPE = PLUGIN_RESOURCE_RUNTIME_TYPE;
7281
8407
  exports.PLUGIN_SOURCE = PLUGIN_SOURCE;
8408
+ exports.PROJECT_TASK_ICON_NAMES = PROJECT_TASK_ICON_NAMES;
7282
8409
  exports.PermissionGroups = PermissionGroups;
7283
8410
  exports.RUNTIME_RESTART_CONFIRMATION = RUNTIME_RESTART_CONFIRMATION;
8411
+ exports.SANDBOX_FILE_OUTPUT_RULES = SANDBOX_FILE_OUTPUT_RULES;
7284
8412
  exports.SANDBOX_MANAGED_SERVICE_STATUSES = SANDBOX_MANAGED_SERVICE_STATUSES;
7285
8413
  exports.SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES = SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES;
7286
8414
  exports.SANDBOX_TERMINAL_NAMESPACE = SANDBOX_TERMINAL_NAMESPACE;
7287
8415
  exports.SANDBOX_WORK_FOR_TYPES = SANDBOX_WORK_FOR_TYPES;
8416
+ exports.SKILLS_MIDDLEWARE_NAME = SKILLS_MIDDLEWARE_NAME;
7288
8417
  exports.STANDARD_METADATA_FIELDS = STANDARD_METADATA_FIELDS;
7289
8418
  exports.STATE_SYS_AGENT_WORKSPACE_PATH = STATE_SYS_AGENT_WORKSPACE_PATH;
7290
8419
  exports.STATE_SYS_MEMORY_WORKSPACE_PATH = STATE_SYS_MEMORY_WORKSPACE_PATH;
@@ -7309,12 +8438,16 @@ exports.TranslationLanguageMap = TranslationLanguageMap;
7309
8438
  exports.USAGE_HOUR_FORMAT = USAGE_HOUR_FORMAT;
7310
8439
  exports.USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT = USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT;
7311
8440
  exports.VariableOperations = VariableOperations;
8441
+ exports.WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET = WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET;
8442
+ exports.WORKBENCH_AGENT_EVOLUTION_TARGET = WORKBENCH_AGENT_EVOLUTION_TARGET;
7312
8443
  exports.WORKBENCH_ASSISTANT_CONVERSATION_TARGET = WORKBENCH_ASSISTANT_CONVERSATION_TARGET;
8444
+ exports.WORKBENCH_ASSISTANT_EXECUTION_TARGET = WORKBENCH_ASSISTANT_EXECUTION_TARGET;
7313
8445
  exports.WORKBENCH_ASSISTANT_PROJECT_TARGET = WORKBENCH_ASSISTANT_PROJECT_TARGET;
7314
8446
  exports.WORKBENCH_EXTENSION_VIEW_TARGET = WORKBENCH_EXTENSION_VIEW_TARGET;
7315
8447
  exports.WORKBENCH_FILE_OPEN_COMMAND = WORKBENCH_FILE_OPEN_COMMAND;
7316
8448
  exports.WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET;
7317
8449
  exports.WORKBENCH_NAVIGATION_OPEN_COMMAND = WORKBENCH_NAVIGATION_OPEN_COMMAND;
8450
+ exports.WORKBENCH_VIEW_OPEN_EVENT = WORKBENCH_VIEW_OPEN_EVENT;
7318
8451
  exports.WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME = WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME;
7319
8452
  exports.WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER = WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER;
7320
8453
  exports.XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE;
@@ -7325,7 +8458,13 @@ exports.XPERT_VIEW_PROJECT_ID_HEADER = XPERT_VIEW_PROJECT_ID_HEADER;
7325
8458
  exports.XpertMarketplaceBusinessCategories = XpertMarketplaceBusinessCategories;
7326
8459
  exports.XpertMarketplaceCollaborationModes = XpertMarketplaceCollaborationModes;
7327
8460
  exports.XpertMarketplaceTechnicalCategories = XpertMarketplaceTechnicalCategories;
8461
+ exports.agentInvocationStatusSchema = agentInvocationStatusSchema;
8462
+ exports.agentInvocationTerminalStatusSchema = agentInvocationTerminalStatusSchema;
7328
8463
  exports.agentLabel = agentLabel;
8464
+ exports.agentOutputDeliverySchema = agentOutputDeliverySchema;
8465
+ exports.agentResultPathSchema = agentResultPathSchema;
8466
+ exports.agentRuntimeModelSourceSchema = agentRuntimeModelSourceSchema;
8467
+ exports.agentRuntimeProgressSchema = agentRuntimeProgressSchema;
7329
8468
  exports.agentUniqueName = agentUniqueName;
7330
8469
  exports.allChannels = allChannels;
7331
8470
  exports.appendMessageContent = appendMessageContent;
@@ -7334,7 +8473,9 @@ exports.buildChunkTree = buildChunkTree;
7334
8473
  exports.buildXpertMarketplaceProfileSnapshot = buildXpertMarketplaceProfileSnapshot;
7335
8474
  exports.canAllowMcpToolDirectly = canAllowMcpToolDirectly;
7336
8475
  exports.channelName = channelName;
8476
+ exports.chatMessagePresentation = chatMessagePresentation;
7337
8477
  exports.classificateDocumentCategory = classificateDocumentCategory;
8478
+ exports.codingExecutionViewKey = codingExecutionViewKey;
7338
8479
  exports.collectTreeLeaves = collectTreeLeaves;
7339
8480
  exports.configurableStoreNamespace = configurableStoreNamespace;
7340
8481
  exports.convertToUrlPath = convertToUrlPath;
@@ -7352,11 +8493,15 @@ exports.defaultMcpToolApprovalMode = defaultMcpToolApprovalMode;
7352
8493
  exports.deriveXpertMarketplaceTechnicalProfile = deriveXpertMarketplaceTechnicalProfile;
7353
8494
  exports.ensureAssistantBindingSkillWorkspacePreference = ensureAssistantBindingSkillWorkspacePreference;
7354
8495
  exports.evidenceDrivenStrategy = evidenceDrivenStrategy;
8496
+ exports.executionActivityBatchSchema = executionActivityBatchSchema;
8497
+ exports.executionActivityCapabilitiesSchema = executionActivityCapabilitiesSchema;
8498
+ exports.executionActivityItemSchema = executionActivityItemSchema;
7355
8499
  exports.figureOutXpert = figureOutXpert;
7356
8500
  exports.filterAssistantBindingDisabledSkillIds = filterAssistantBindingDisabledSkillIds;
7357
8501
  exports.filterAssistantBindingDisabledTools = filterAssistantBindingDisabledTools;
7358
8502
  exports.filterMessageText = filterMessageText;
7359
8503
  exports.findStartNodes = findStartNodes;
8504
+ exports.forecastProjectTasks = forecastProjectTasks;
7360
8505
  exports.genJSONParseKey = genJSONParseKey;
7361
8506
  exports.genJSONStringifyKey = genJSONStringifyKey;
7362
8507
  exports.genListOperatorKey = genListOperatorKey;
@@ -7428,12 +8573,15 @@ exports.isNil = isNil$1;
7428
8573
  exports.isOrganizationSharedXpertWorkspace = isOrganizationSharedXpertWorkspace;
7429
8574
  exports.isOutputTokenParameter = isOutputTokenParameter;
7430
8575
  exports.isPreparedCandidate = isPreparedCandidate;
8576
+ exports.isPromptWorkflowScenarios = isPromptWorkflowScenarios;
7431
8577
  exports.isProviderEvaluation = isProviderEvaluation;
7432
8578
  exports.isProviderRelease = isProviderRelease;
7433
8579
  exports.isReplayEvaluation = isReplayEvaluation;
7434
8580
  exports.isRequiredMiddleware = isRequiredMiddleware;
7435
8581
  exports.isRouterKey = isRouterKey;
7436
8582
  exports.isRunnableThreadGoalStatus = isRunnableThreadGoalStatus;
8583
+ exports.isRuntimeChatMessage = isRuntimeChatMessage;
8584
+ exports.isScopedPromptCapabilityConfig = isScopedPromptCapabilityConfig;
7437
8585
  exports.isStagedRelease = isStagedRelease;
7438
8586
  exports.isString = isString;
7439
8587
  exports.isSystemManagedAssistant = isSystemManagedAssistant;
@@ -7453,6 +8601,8 @@ exports.locateNodes = locateNodes;
7453
8601
  exports.mapTranslationLanguage = mapTranslationLanguage;
7454
8602
  exports.mergeMessageContentForDisplay = mergeMessageContentForDisplay;
7455
8603
  exports.messageContentText = messageContentText;
8604
+ exports.modelExecutionEntry = modelExecutionEntry;
8605
+ exports.modelExecutionSourceId = modelExecutionSourceId;
7456
8606
  exports.nonBlank = nonBlank;
7457
8607
  exports.nonNullable = nonNullable;
7458
8608
  exports.normalizeAssistantBindingToolPreferences = normalizeAssistantBindingToolPreferences;
@@ -7464,14 +8614,31 @@ exports.normalizeMiddlewareProvider = normalizeMiddlewareProvider;
7464
8614
  exports.normalizeModelParameterValue = normalizeModelParameterValue;
7465
8615
  exports.normalizeXpertAgentConfig = normalizeXpertAgentConfig;
7466
8616
  exports.omitXpertRelations = omitXpertRelations;
8617
+ exports.orderAssistantXperts = orderAssistantXperts;
7467
8618
  exports.parseGithubSkillInstallCommand = parseGithubSkillInstallCommand;
8619
+ exports.parsePromptCapabilityConfig = parsePromptCapabilityConfig;
8620
+ exports.parsePromptCapabilitySelection = parsePromptCapabilitySelection;
7468
8621
  exports.parseRuntimeSkillCapabilityId = parseRuntimeSkillCapabilityId;
8622
+ exports.parseWorkbenchViewOpenEvent = parseWorkbenchViewOpenEvent;
8623
+ exports.projectTaskDecisionInputSchema = projectTaskDecisionInputSchema;
8624
+ exports.projectTaskDecisionSchema = projectTaskDecisionSchema;
8625
+ exports.projectTaskDispatchInputSchema = projectTaskDispatchInputSchema;
8626
+ exports.projectTaskDispatchReceiptSchema = projectTaskDispatchReceiptSchema;
8627
+ exports.projectTaskEvidenceReferenceSchema = projectTaskEvidenceReferenceSchema;
8628
+ exports.projectTaskExecutionContextSchema = projectTaskExecutionContextSchema;
8629
+ exports.projectTaskExecutionPurposeSchema = projectTaskExecutionPurposeSchema;
8630
+ exports.projectTaskExecutionReferenceSchema = projectTaskExecutionReferenceSchema;
8631
+ exports.projectTaskReviewReportSchema = projectTaskReviewReportSchema;
8632
+ exports.projectTaskSpecificationDigestSchema = projectTaskSpecificationDigestSchema;
8633
+ exports.projectTaskSpecificationSchema = projectTaskSpecificationSchema;
8634
+ exports.projectTaskSpecificationSnapshotSchema = projectTaskSpecificationSnapshotSchema;
7469
8635
  exports.replaceAgentInDraft = replaceAgentInDraft;
7470
8636
  exports.resolveDraftPrimaryAgent = resolveDraftPrimaryAgent;
7471
8637
  exports.resolveDraftRuntimeGraph = resolveDraftRuntimeGraph;
7472
8638
  exports.resolveI18nText = resolveI18nText;
7473
8639
  exports.resolveMessageAppendContext = resolveMessageAppendContext;
7474
8640
  exports.resolveModelParameterOptions = resolveModelParameterOptions;
8641
+ exports.resolvePromptWorkflowCapabilities = resolvePromptWorkflowCapabilities;
7475
8642
  exports.resolveRuntimeXpert = resolveRuntimeXpert;
7476
8643
  exports.setStateVariable = setStateVariable;
7477
8644
  exports.shortTitle = shortTitle;
@@ -7480,5 +8647,6 @@ exports.transformInstallation = transformInstallation;
7480
8647
  exports.updateAssistantBindingSkillPreferences = updateAssistantBindingSkillPreferences;
7481
8648
  exports.updateAssistantBindingToolPreferences = updateAssistantBindingToolPreferences;
7482
8649
  exports.uuid = uuid;
8650
+ exports.validateProjectTaskGraph = validateProjectTaskGraph;
7483
8651
  exports.workflowNodeIdentifier = workflowNodeIdentifier;
7484
8652
  exports.xpertLabel = xpertLabel;