@xpert-ai/contracts 3.9.3 → 3.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  var ShortUniqueId = require('short-unique-id');
4
- var chatkitTypes = require('@xpert-ai/chatkit-types');
5
4
 
6
5
  function _array_like_to_array$7(arr, len) {
7
6
  if (len == null || len > arr.length) len = arr.length;
@@ -1341,6 +1340,48 @@ exports.QueryStatusEnum = void 0;
1341
1340
  QueryStatusEnum["FAILED"] = "failed";
1342
1341
  })(exports.QueryStatusEnum || (exports.QueryStatusEnum = {}));
1343
1342
 
1343
+ function _define_property$9(obj, key, value) {
1344
+ if (key in obj) {
1345
+ Object.defineProperty(obj, key, {
1346
+ value: value,
1347
+ enumerable: true,
1348
+ configurable: true,
1349
+ writable: true
1350
+ });
1351
+ } else {
1352
+ obj[key] = value;
1353
+ }
1354
+ return obj;
1355
+ }
1356
+ function _object_spread$8(target) {
1357
+ for(var i = 1; i < arguments.length; i++){
1358
+ var source = arguments[i] != null ? arguments[i] : {};
1359
+ var ownKeys = Object.keys(source);
1360
+ if (typeof Object.getOwnPropertySymbols === "function") {
1361
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1362
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1363
+ }));
1364
+ }
1365
+ ownKeys.forEach(function(key) {
1366
+ _define_property$9(target, key, source[key]);
1367
+ });
1368
+ }
1369
+ return target;
1370
+ }
1371
+ var CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = "follow_up_consumed";
1372
+ var CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = "thread_context_usage";
1373
+ var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
1374
+ function createConversationTitleSummaryEvent(event) {
1375
+ return _object_spread$8({
1376
+ type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
1377
+ }, event);
1378
+ }
1379
+ function createFollowUpConsumedEvent(event) {
1380
+ return _object_spread$8({
1381
+ type: CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
1382
+ }, event);
1383
+ }
1384
+
1344
1385
  function _array_like_to_array$6(arr, len) {
1345
1386
  if (len == null || len > arr.length) len = arr.length;
1346
1387
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -1352,7 +1393,7 @@ function _array_with_holes$5(arr) {
1352
1393
  function _array_without_holes$2(arr) {
1353
1394
  if (Array.isArray(arr)) return _array_like_to_array$6(arr);
1354
1395
  }
1355
- function _define_property$9(obj, key, value) {
1396
+ function _define_property$8(obj, key, value) {
1356
1397
  if (key in obj) {
1357
1398
  Object.defineProperty(obj, key, {
1358
1399
  value: value,
@@ -1398,7 +1439,7 @@ function _non_iterable_rest$5() {
1398
1439
  function _non_iterable_spread$2() {
1399
1440
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1400
1441
  }
1401
- function _object_spread$8(target) {
1442
+ function _object_spread$7(target) {
1402
1443
  for(var i = 1; i < arguments.length; i++){
1403
1444
  var source = arguments[i] != null ? arguments[i] : {};
1404
1445
  var ownKeys = Object.keys(source);
@@ -1408,7 +1449,7 @@ function _object_spread$8(target) {
1408
1449
  }));
1409
1450
  }
1410
1451
  ownKeys.forEach(function(key) {
1411
- _define_property$9(target, key, source[key]);
1452
+ _define_property$8(target, key, source[key]);
1412
1453
  });
1413
1454
  }
1414
1455
  return target;
@@ -1546,7 +1587,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1546
1587
  if (!Object.keys(toolsets).length && !Object.keys(middlewares).length && !Object.keys(skills).length) {
1547
1588
  return null;
1548
1589
  }
1549
- return _object_spread$8({
1590
+ return _object_spread$7({
1550
1591
  version: 1
1551
1592
  }, Object.keys(toolsets).length ? {
1552
1593
  toolsets: toolsets
@@ -1624,8 +1665,8 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1624
1665
  }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$2(disabledTools).concat([
1625
1666
  normalizedToolName
1626
1667
  ]));
1627
- var toolsets = normalizedPreferences.toolsets ? _object_spread$8({}, normalizedPreferences.toolsets) : undefined;
1628
- var middlewares = normalizedPreferences.middlewares ? _object_spread$8({}, normalizedPreferences.middlewares) : undefined;
1668
+ var toolsets = normalizedPreferences.toolsets ? _object_spread$7({}, normalizedPreferences.toolsets) : undefined;
1669
+ var middlewares = normalizedPreferences.middlewares ? _object_spread$7({}, normalizedPreferences.middlewares) : undefined;
1629
1670
  if (sourceType === "toolset") {
1630
1671
  var toolsetName = "toolsetName" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.toolsetName) : "";
1631
1672
  if (!toolsetName) {
@@ -1641,14 +1682,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1641
1682
  } else {
1642
1683
  delete nextToolsets[normalizedNodeKey];
1643
1684
  }
1644
- return normalizeAssistantBindingToolPreferences(_object_spread$8({
1685
+ return normalizeAssistantBindingToolPreferences(_object_spread$7({
1645
1686
  version: 1
1646
1687
  }, Object.keys(nextToolsets).length ? {
1647
1688
  toolsets: nextToolsets
1648
1689
  } : {}, middlewares && Object.keys(middlewares).length ? {
1649
1690
  middlewares: middlewares
1650
1691
  } : {}, normalizedPreferences.skills ? {
1651
- skills: _object_spread$8({}, normalizedPreferences.skills)
1692
+ skills: _object_spread$7({}, normalizedPreferences.skills)
1652
1693
  } : {}));
1653
1694
  }
1654
1695
  var provider = "provider" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.provider) : "";
@@ -1664,14 +1705,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1664
1705
  } else {
1665
1706
  delete nextMiddlewares[normalizedNodeKey];
1666
1707
  }
1667
- return normalizeAssistantBindingToolPreferences(_object_spread$8({
1708
+ return normalizeAssistantBindingToolPreferences(_object_spread$7({
1668
1709
  version: 1
1669
1710
  }, toolsets && Object.keys(toolsets).length ? {
1670
1711
  toolsets: toolsets
1671
1712
  } : {}, Object.keys(nextMiddlewares).length ? {
1672
1713
  middlewares: nextMiddlewares
1673
1714
  } : {}, normalizedPreferences.skills ? {
1674
- skills: _object_spread$8({}, normalizedPreferences.skills)
1715
+ skills: _object_spread$7({}, normalizedPreferences.skills)
1675
1716
  } : {}));
1676
1717
  }
1677
1718
  function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillId, enabled) {
@@ -1689,7 +1730,7 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
1689
1730
  }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$2(disabledSkillIds).concat([
1690
1731
  normalizedSkillId
1691
1732
  ]));
1692
- var skills = normalizedPreferences.skills ? _object_spread$8({}, normalizedPreferences.skills) : {};
1733
+ var skills = normalizedPreferences.skills ? _object_spread$7({}, normalizedPreferences.skills) : {};
1693
1734
  if (nextDisabledSkillIds.length) {
1694
1735
  skills[normalizedWorkspaceId] = {
1695
1736
  workspaceId: normalizedWorkspaceId,
@@ -1698,12 +1739,12 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
1698
1739
  } else {
1699
1740
  delete skills[normalizedWorkspaceId];
1700
1741
  }
1701
- return normalizeAssistantBindingToolPreferences(_object_spread$8({
1742
+ return normalizeAssistantBindingToolPreferences(_object_spread$7({
1702
1743
  version: 1
1703
1744
  }, normalizedPreferences.toolsets ? {
1704
- toolsets: _object_spread$8({}, normalizedPreferences.toolsets)
1745
+ toolsets: _object_spread$7({}, normalizedPreferences.toolsets)
1705
1746
  } : {}, normalizedPreferences.middlewares ? {
1706
- middlewares: _object_spread$8({}, normalizedPreferences.middlewares)
1747
+ middlewares: _object_spread$7({}, normalizedPreferences.middlewares)
1707
1748
  } : {}, Object.keys(skills).length ? {
1708
1749
  skills: skills
1709
1750
  } : {}));
@@ -1721,14 +1762,14 @@ function ensureAssistantBindingSkillWorkspacePreference(preferences, workspaceId
1721
1762
  var currentSkills = (_normalizedPreferences_skills = normalizedPreferences.skills) !== null && _normalizedPreferences_skills !== void 0 ? _normalizedPreferences_skills : {};
1722
1763
  var currentWorkspacePreference = currentSkills[normalizedWorkspaceId];
1723
1764
  var _currentWorkspacePreference_disabledSkillIds;
1724
- return _object_spread_props$6(_object_spread$8({
1765
+ return _object_spread_props$6(_object_spread$7({
1725
1766
  version: 1
1726
1767
  }, normalizedPreferences.toolsets ? {
1727
- toolsets: _object_spread$8({}, normalizedPreferences.toolsets)
1768
+ toolsets: _object_spread$7({}, normalizedPreferences.toolsets)
1728
1769
  } : {}, normalizedPreferences.middlewares ? {
1729
- middlewares: _object_spread$8({}, normalizedPreferences.middlewares)
1770
+ middlewares: _object_spread$7({}, normalizedPreferences.middlewares)
1730
1771
  } : {}), {
1731
- skills: _object_spread_props$6(_object_spread$8({}, currentSkills), _define_property$9({}, normalizedWorkspaceId, {
1772
+ skills: _object_spread_props$6(_object_spread$7({}, currentSkills), _define_property$8({}, normalizedWorkspaceId, {
1732
1773
  workspaceId: normalizeAssistantBindingPreferenceKey(currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.workspaceId) || normalizedWorkspaceId,
1733
1774
  disabledSkillIds: (_currentWorkspacePreference_disabledSkillIds = currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.disabledSkillIds) !== null && _currentWorkspacePreference_disabledSkillIds !== void 0 ? _currentWorkspacePreference_disabledSkillIds : []
1734
1775
  }))
@@ -1891,47 +1932,6 @@ var OllamaEmbeddingsProviders = [
1891
1932
  exports.AiProvider.Ollama
1892
1933
  ];
1893
1934
 
1894
- function _define_property$8(obj, key, value) {
1895
- if (key in obj) {
1896
- Object.defineProperty(obj, key, {
1897
- value: value,
1898
- enumerable: true,
1899
- configurable: true,
1900
- writable: true
1901
- });
1902
- } else {
1903
- obj[key] = value;
1904
- }
1905
- return obj;
1906
- }
1907
- function _object_spread$7(target) {
1908
- for(var i = 1; i < arguments.length; i++){
1909
- var source = arguments[i] != null ? arguments[i] : {};
1910
- var ownKeys = Object.keys(source);
1911
- if (typeof Object.getOwnPropertySymbols === "function") {
1912
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1913
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1914
- }));
1915
- }
1916
- ownKeys.forEach(function(key) {
1917
- _define_property$8(target, key, source[key]);
1918
- });
1919
- }
1920
- return target;
1921
- }
1922
- var CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = "thread_context_usage";
1923
- var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
1924
- function createConversationTitleSummaryEvent(event) {
1925
- return _object_spread$7({
1926
- type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
1927
- }, event);
1928
- }
1929
- function createFollowUpConsumedEvent(event) {
1930
- return _object_spread$7({
1931
- type: chatkitTypes.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
1932
- }, event);
1933
- }
1934
-
1935
1935
  /**
1936
1936
  * @deprecated use ChatMessageEventTypeEnum
1937
1937
  */ exports.ChatGatewayEvent = void 0;
@@ -4730,6 +4730,12 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
4730
4730
  OrganizationProjectBudgetTypeEnum["COST"] = "cost";
4731
4731
  })(exports.OrganizationProjectBudgetTypeEnum || (exports.OrganizationProjectBudgetTypeEnum = {}));
4732
4732
 
4733
+ exports.SecretTokenBindingType = void 0;
4734
+ (function(SecretTokenBindingType) {
4735
+ SecretTokenBindingType["API_KEY"] = "api_key";
4736
+ SecretTokenBindingType["PUBLIC_XPERT"] = "public_xpert";
4737
+ })(exports.SecretTokenBindingType || (exports.SecretTokenBindingType = {}));
4738
+
4733
4739
  exports.Visibility = void 0;
4734
4740
  (function(Visibility) {
4735
4741
  Visibility["Public"] = "public";
@@ -5413,14 +5419,11 @@ var PLUGIN_LOAD_STATUS = {
5413
5419
  FAILED: "failed"
5414
5420
  };
5415
5421
 
5416
- Object.defineProperty(exports, "CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED", {
5417
- enumerable: true,
5418
- get: function () { return chatkitTypes.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED; }
5419
- });
5420
5422
  exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
5421
5423
  exports.API_PRINCIPAL_USER_ID_HEADER = API_PRINCIPAL_USER_ID_HEADER;
5422
5424
  exports.Attachment_Type_Options = Attachment_Type_Options;
5423
5425
  exports.CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY;
5426
+ exports.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;
5424
5427
  exports.CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE;
5425
5428
  exports.CONTEXT_COMPRESSION_COMPONENT_TYPE = CONTEXT_COMPRESSION_COMPONENT_TYPE;
5426
5429
  exports.CONTEXT_COMPRESSION_MIDDLEWARE_NAME = CONTEXT_COMPRESSION_MIDDLEWARE_NAME;
package/index.esm.js CHANGED
@@ -1,6 +1,4 @@
1
1
  import ShortUniqueId from 'short-unique-id';
2
- import { CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED } from '@xpert-ai/chatkit-types';
3
- export { CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED } from '@xpert-ai/chatkit-types';
4
2
 
5
3
  function _array_like_to_array$7(arr, len) {
6
4
  if (len == null || len > arr.length) len = arr.length;
@@ -1340,6 +1338,48 @@ var QueryStatusEnum;
1340
1338
  QueryStatusEnum["FAILED"] = "failed";
1341
1339
  })(QueryStatusEnum || (QueryStatusEnum = {}));
1342
1340
 
1341
+ function _define_property$9(obj, key, value) {
1342
+ if (key in obj) {
1343
+ Object.defineProperty(obj, key, {
1344
+ value: value,
1345
+ enumerable: true,
1346
+ configurable: true,
1347
+ writable: true
1348
+ });
1349
+ } else {
1350
+ obj[key] = value;
1351
+ }
1352
+ return obj;
1353
+ }
1354
+ function _object_spread$8(target) {
1355
+ for(var i = 1; i < arguments.length; i++){
1356
+ var source = arguments[i] != null ? arguments[i] : {};
1357
+ var ownKeys = Object.keys(source);
1358
+ if (typeof Object.getOwnPropertySymbols === "function") {
1359
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1360
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1361
+ }));
1362
+ }
1363
+ ownKeys.forEach(function(key) {
1364
+ _define_property$9(target, key, source[key]);
1365
+ });
1366
+ }
1367
+ return target;
1368
+ }
1369
+ var CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = "follow_up_consumed";
1370
+ var CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = "thread_context_usage";
1371
+ var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
1372
+ function createConversationTitleSummaryEvent(event) {
1373
+ return _object_spread$8({
1374
+ type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
1375
+ }, event);
1376
+ }
1377
+ function createFollowUpConsumedEvent(event) {
1378
+ return _object_spread$8({
1379
+ type: CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
1380
+ }, event);
1381
+ }
1382
+
1343
1383
  function _array_like_to_array$6(arr, len) {
1344
1384
  if (len == null || len > arr.length) len = arr.length;
1345
1385
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -1351,7 +1391,7 @@ function _array_with_holes$5(arr) {
1351
1391
  function _array_without_holes$2(arr) {
1352
1392
  if (Array.isArray(arr)) return _array_like_to_array$6(arr);
1353
1393
  }
1354
- function _define_property$9(obj, key, value) {
1394
+ function _define_property$8(obj, key, value) {
1355
1395
  if (key in obj) {
1356
1396
  Object.defineProperty(obj, key, {
1357
1397
  value: value,
@@ -1397,7 +1437,7 @@ function _non_iterable_rest$5() {
1397
1437
  function _non_iterable_spread$2() {
1398
1438
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1399
1439
  }
1400
- function _object_spread$8(target) {
1440
+ function _object_spread$7(target) {
1401
1441
  for(var i = 1; i < arguments.length; i++){
1402
1442
  var source = arguments[i] != null ? arguments[i] : {};
1403
1443
  var ownKeys = Object.keys(source);
@@ -1407,7 +1447,7 @@ function _object_spread$8(target) {
1407
1447
  }));
1408
1448
  }
1409
1449
  ownKeys.forEach(function(key) {
1410
- _define_property$9(target, key, source[key]);
1450
+ _define_property$8(target, key, source[key]);
1411
1451
  });
1412
1452
  }
1413
1453
  return target;
@@ -1545,7 +1585,7 @@ function normalizeAssistantBindingToolPreferences(value) {
1545
1585
  if (!Object.keys(toolsets).length && !Object.keys(middlewares).length && !Object.keys(skills).length) {
1546
1586
  return null;
1547
1587
  }
1548
- return _object_spread$8({
1588
+ return _object_spread$7({
1549
1589
  version: 1
1550
1590
  }, Object.keys(toolsets).length ? {
1551
1591
  toolsets: toolsets
@@ -1623,8 +1663,8 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1623
1663
  }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$2(disabledTools).concat([
1624
1664
  normalizedToolName
1625
1665
  ]));
1626
- var toolsets = normalizedPreferences.toolsets ? _object_spread$8({}, normalizedPreferences.toolsets) : undefined;
1627
- var middlewares = normalizedPreferences.middlewares ? _object_spread$8({}, normalizedPreferences.middlewares) : undefined;
1666
+ var toolsets = normalizedPreferences.toolsets ? _object_spread$7({}, normalizedPreferences.toolsets) : undefined;
1667
+ var middlewares = normalizedPreferences.middlewares ? _object_spread$7({}, normalizedPreferences.middlewares) : undefined;
1628
1668
  if (sourceType === "toolset") {
1629
1669
  var toolsetName = "toolsetName" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.toolsetName) : "";
1630
1670
  if (!toolsetName) {
@@ -1640,14 +1680,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1640
1680
  } else {
1641
1681
  delete nextToolsets[normalizedNodeKey];
1642
1682
  }
1643
- return normalizeAssistantBindingToolPreferences(_object_spread$8({
1683
+ return normalizeAssistantBindingToolPreferences(_object_spread$7({
1644
1684
  version: 1
1645
1685
  }, Object.keys(nextToolsets).length ? {
1646
1686
  toolsets: nextToolsets
1647
1687
  } : {}, middlewares && Object.keys(middlewares).length ? {
1648
1688
  middlewares: middlewares
1649
1689
  } : {}, normalizedPreferences.skills ? {
1650
- skills: _object_spread$8({}, normalizedPreferences.skills)
1690
+ skills: _object_spread$7({}, normalizedPreferences.skills)
1651
1691
  } : {}));
1652
1692
  }
1653
1693
  var provider = "provider" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.provider) : "";
@@ -1663,14 +1703,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
1663
1703
  } else {
1664
1704
  delete nextMiddlewares[normalizedNodeKey];
1665
1705
  }
1666
- return normalizeAssistantBindingToolPreferences(_object_spread$8({
1706
+ return normalizeAssistantBindingToolPreferences(_object_spread$7({
1667
1707
  version: 1
1668
1708
  }, toolsets && Object.keys(toolsets).length ? {
1669
1709
  toolsets: toolsets
1670
1710
  } : {}, Object.keys(nextMiddlewares).length ? {
1671
1711
  middlewares: nextMiddlewares
1672
1712
  } : {}, normalizedPreferences.skills ? {
1673
- skills: _object_spread$8({}, normalizedPreferences.skills)
1713
+ skills: _object_spread$7({}, normalizedPreferences.skills)
1674
1714
  } : {}));
1675
1715
  }
1676
1716
  function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillId, enabled) {
@@ -1688,7 +1728,7 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
1688
1728
  }) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$2(disabledSkillIds).concat([
1689
1729
  normalizedSkillId
1690
1730
  ]));
1691
- var skills = normalizedPreferences.skills ? _object_spread$8({}, normalizedPreferences.skills) : {};
1731
+ var skills = normalizedPreferences.skills ? _object_spread$7({}, normalizedPreferences.skills) : {};
1692
1732
  if (nextDisabledSkillIds.length) {
1693
1733
  skills[normalizedWorkspaceId] = {
1694
1734
  workspaceId: normalizedWorkspaceId,
@@ -1697,12 +1737,12 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
1697
1737
  } else {
1698
1738
  delete skills[normalizedWorkspaceId];
1699
1739
  }
1700
- return normalizeAssistantBindingToolPreferences(_object_spread$8({
1740
+ return normalizeAssistantBindingToolPreferences(_object_spread$7({
1701
1741
  version: 1
1702
1742
  }, normalizedPreferences.toolsets ? {
1703
- toolsets: _object_spread$8({}, normalizedPreferences.toolsets)
1743
+ toolsets: _object_spread$7({}, normalizedPreferences.toolsets)
1704
1744
  } : {}, normalizedPreferences.middlewares ? {
1705
- middlewares: _object_spread$8({}, normalizedPreferences.middlewares)
1745
+ middlewares: _object_spread$7({}, normalizedPreferences.middlewares)
1706
1746
  } : {}, Object.keys(skills).length ? {
1707
1747
  skills: skills
1708
1748
  } : {}));
@@ -1720,14 +1760,14 @@ function ensureAssistantBindingSkillWorkspacePreference(preferences, workspaceId
1720
1760
  var currentSkills = (_normalizedPreferences_skills = normalizedPreferences.skills) !== null && _normalizedPreferences_skills !== void 0 ? _normalizedPreferences_skills : {};
1721
1761
  var currentWorkspacePreference = currentSkills[normalizedWorkspaceId];
1722
1762
  var _currentWorkspacePreference_disabledSkillIds;
1723
- return _object_spread_props$6(_object_spread$8({
1763
+ return _object_spread_props$6(_object_spread$7({
1724
1764
  version: 1
1725
1765
  }, normalizedPreferences.toolsets ? {
1726
- toolsets: _object_spread$8({}, normalizedPreferences.toolsets)
1766
+ toolsets: _object_spread$7({}, normalizedPreferences.toolsets)
1727
1767
  } : {}, normalizedPreferences.middlewares ? {
1728
- middlewares: _object_spread$8({}, normalizedPreferences.middlewares)
1768
+ middlewares: _object_spread$7({}, normalizedPreferences.middlewares)
1729
1769
  } : {}), {
1730
- skills: _object_spread_props$6(_object_spread$8({}, currentSkills), _define_property$9({}, normalizedWorkspaceId, {
1770
+ skills: _object_spread_props$6(_object_spread$7({}, currentSkills), _define_property$8({}, normalizedWorkspaceId, {
1731
1771
  workspaceId: normalizeAssistantBindingPreferenceKey(currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.workspaceId) || normalizedWorkspaceId,
1732
1772
  disabledSkillIds: (_currentWorkspacePreference_disabledSkillIds = currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.disabledSkillIds) !== null && _currentWorkspacePreference_disabledSkillIds !== void 0 ? _currentWorkspacePreference_disabledSkillIds : []
1733
1773
  }))
@@ -1890,47 +1930,6 @@ var OllamaEmbeddingsProviders = [
1890
1930
  AiProvider.Ollama
1891
1931
  ];
1892
1932
 
1893
- function _define_property$8(obj, key, value) {
1894
- if (key in obj) {
1895
- Object.defineProperty(obj, key, {
1896
- value: value,
1897
- enumerable: true,
1898
- configurable: true,
1899
- writable: true
1900
- });
1901
- } else {
1902
- obj[key] = value;
1903
- }
1904
- return obj;
1905
- }
1906
- function _object_spread$7(target) {
1907
- for(var i = 1; i < arguments.length; i++){
1908
- var source = arguments[i] != null ? arguments[i] : {};
1909
- var ownKeys = Object.keys(source);
1910
- if (typeof Object.getOwnPropertySymbols === "function") {
1911
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1912
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1913
- }));
1914
- }
1915
- ownKeys.forEach(function(key) {
1916
- _define_property$8(target, key, source[key]);
1917
- });
1918
- }
1919
- return target;
1920
- }
1921
- var CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = "thread_context_usage";
1922
- var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
1923
- function createConversationTitleSummaryEvent(event) {
1924
- return _object_spread$7({
1925
- type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
1926
- }, event);
1927
- }
1928
- function createFollowUpConsumedEvent(event) {
1929
- return _object_spread$7({
1930
- type: CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
1931
- }, event);
1932
- }
1933
-
1934
1933
  /**
1935
1934
  * @deprecated use ChatMessageEventTypeEnum
1936
1935
  */ var ChatGatewayEvent;
@@ -4729,6 +4728,12 @@ var OrganizationProjectBudgetTypeEnum;
4729
4728
  OrganizationProjectBudgetTypeEnum["COST"] = "cost";
4730
4729
  })(OrganizationProjectBudgetTypeEnum || (OrganizationProjectBudgetTypeEnum = {}));
4731
4730
 
4731
+ var SecretTokenBindingType;
4732
+ (function(SecretTokenBindingType) {
4733
+ SecretTokenBindingType["API_KEY"] = "api_key";
4734
+ SecretTokenBindingType["PUBLIC_XPERT"] = "public_xpert";
4735
+ })(SecretTokenBindingType || (SecretTokenBindingType = {}));
4736
+
4732
4737
  var Visibility;
4733
4738
  (function(Visibility) {
4734
4739
  Visibility["Public"] = "public";
@@ -5412,4 +5417,4 @@ var PLUGIN_LOAD_STATUS = {
5412
5417
  FAILED: "failed"
5413
5418
  };
5414
5419
 
5415
- export { AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, AccessEnum, AgentEventType, AgentType, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, AnalyticsFeatures, AnalyticsPermissionsEnum, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, ApprovalPolicyTypesEnum, ApprovalPolicyTypesStringEnum, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BIInterruptMessageType, BonusTypeEnum, BusinessAreaRole, BusinessType, CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY, CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE, CONTEXT_COMPRESSION_COMPONENT_TYPE, CONTEXT_COMPRESSION_MIDDLEWARE_NAME, CONTEXT_VARIABLE_CURRENTSTATE, ChatDashboardMessageType, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ClientFocusEnum, ConfigurateMethod, ContactOrganizationInviteStatus, ContactType, CredentialFormTypeEnum, CredentialsType, CrudActionEnum, CurrenciesEnum, CurrencyPosition, DEFAULT_CURRENCIES, DEFAULT_DATE_FORMATS, DEFAULT_INTEGRATION_PAID_FILTERS, DEFAULT_INVITE_EXPIRY_PERIOD, DEFAULT_PROFIT_BASED_BONUS, DEFAULT_REVENUE_BASED_BONUS, DEFAULT_SYSTEM_ROLES, DEFAULT_TENANT, DEFAULT_TIME_FORMATS, DEFAULT_TYPE, DEFAULT_XPERT_AGENT_RECURSION_LIMIT, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FeedTypeEnum, FetchFrom, FileStorageProviderEnum, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IndicatorDraftFields, IndicatorOptionFields, IndicatorStatusEnum, IndicatorTagEnum, IndicatorType, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME, LanguagesEnum, LanguagesMap, ListsInputTypeEnum, LocalAgentType, LongTermMemoryTypeEnum, MCPServerType, schema as MDX, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MinimumProjectSizeEnum, ModelEntityType, ModelFeature, ModelPropertyKey, ModelTypeEnum, OllamaEmbeddingsProviders, OpenAIEmbeddingsProviders, OrderTypeEnum, OrganizationContactBudgetTypeEnum, OrganizationDemoNetworkEnum, OrganizationPermissionsEnum, OrganizationProjectBudgetTypeEnum, OrganizationSelectInput, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_SOURCE, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionApprovalStatus, PermissionApprovalStatusTypesEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProjectStatusEnum, ProviderEnum, ProviderType, QueryStatusEnum, RegionsEnum, RequestMethodEnum, RequestScopeLevel, RoleTypeEnum, RolesEnum, SANDBOX_MANAGED_SERVICE_STATUSES, SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES, SANDBOX_TERMINAL_NAMESPACE, SANDBOX_WORK_FOR_TYPES, SMTPSecureEnum, STANDARD_METADATA_FIELDS, STATE_SYS_THREAD_ID, STATE_SYS_VOLUME, STATE_SYS_WORKSPACE_PATH, STATE_SYS_WORKSPACE_URL, STATE_VARIABLE_FILES, STATE_VARIABLE_HUMAN, STATE_VARIABLE_INPUT, STATE_VARIABLE_SYS, STATE_VARIABLE_TITLE_CHANNEL, SandboxManagedServiceErrorCode, SandboxTerminalClientEvent, SandboxTerminalClosedReason, SandboxTerminalErrorCode, SandboxTerminalServerEvent, ScheduleTaskStatus, SemanticModelStatusEnum, StoryStatusEnum, StoryTemplateType, SubscriptionType, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, TENANT_AGENT_LOCAL_URL, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, TimeGranularity, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, VisitEntityEnum, VisitTypeEnum, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XpertAgentExecutionStatusEnum, XpertParameterTypeEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createXpertGraph, createXpertNodes, embeddingCubeCollectionName, ensureAssistantBindingSkillWorkspacePreference, extractSemanticModelDraft, figureOutXpert, filterAssistantBindingDisabledSkillIds, filterAssistantBindingDisabledTools, filterMessageText, findStartNodes, genJSONParseKey, genJSONStringifyKey, genListOperatorKey, genPipelineChunkerKey, genPipelineKnowledgeBaseKey, genPipelineProcessorKey, genPipelineSourceKey, genPipelineUnderstandingKey, genVariableAggregatorKey, genXpertDBDeleteKey, genXpertDBInsertKey, genXpertDBQueryKey, genXpertDBSqlKey, genXpertDBUpdateKey, genXpertIteratorKey, genXpertMiddlewareKey, genXpertSkillKey, genXpertStartKey, genXpertTriggerKey, generateCronExpression, getAgentMiddlewareNodes, getAgentVarGroup, getAssistantBindingDisabledSkillIds, getAssistantBindingDisabledTools, getAssistantManagement, getCurrentGraph, getEnabledTools, getStoreNamespace, getSwarmPartners, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, getXpertWorkspaceVisibility, inferMessageAppendContext, isAgentKey, isAssistantBindingSkillEnabled, isAssistantBindingToolEnabled, isAssistantBindingToolPreferencesEmpty, isAudioType, isContextCompressionComponentData, isDocumentSheet, isEnableTool, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isMessageGroup, isMiddlewareToolEnabled, isRequiredMiddleware, isRouterKey, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserManagedAssistant, isVideoType, isXpertNodeType, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, normalizeAssistantBindingToolPreferences, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeXpertAgentConfig, omitXpertRelations, replaceAgentInDraft, resolveMessageAppendContext, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, updateAssistantBindingSkillPreferences, updateAssistantBindingToolPreferences, uuid, workflowNodeIdentifier, xpertLabel };
5420
+ export { AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, AccessEnum, AgentEventType, AgentType, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, AnalyticsFeatures, AnalyticsPermissionsEnum, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, ApprovalPolicyTypesEnum, ApprovalPolicyTypesStringEnum, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BIInterruptMessageType, BonusTypeEnum, BusinessAreaRole, BusinessType, CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY, CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED, CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE, CONTEXT_COMPRESSION_COMPONENT_TYPE, CONTEXT_COMPRESSION_MIDDLEWARE_NAME, CONTEXT_VARIABLE_CURRENTSTATE, ChatDashboardMessageType, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ClientFocusEnum, ConfigurateMethod, ContactOrganizationInviteStatus, ContactType, CredentialFormTypeEnum, CredentialsType, CrudActionEnum, CurrenciesEnum, CurrencyPosition, DEFAULT_CURRENCIES, DEFAULT_DATE_FORMATS, DEFAULT_INTEGRATION_PAID_FILTERS, DEFAULT_INVITE_EXPIRY_PERIOD, DEFAULT_PROFIT_BASED_BONUS, DEFAULT_REVENUE_BASED_BONUS, DEFAULT_SYSTEM_ROLES, DEFAULT_TENANT, DEFAULT_TIME_FORMATS, DEFAULT_TYPE, DEFAULT_XPERT_AGENT_RECURSION_LIMIT, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FeedTypeEnum, FetchFrom, FileStorageProviderEnum, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IndicatorDraftFields, IndicatorOptionFields, IndicatorStatusEnum, IndicatorTagEnum, IndicatorType, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseStatusEnum, KnowledgebaseTypeEnum, LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME, LanguagesEnum, LanguagesMap, ListsInputTypeEnum, LocalAgentType, LongTermMemoryTypeEnum, MCPServerType, schema as MDX, MEMORY_PROFILE_PROMPT, MEMORY_QA_PROMPT, MinimumProjectSizeEnum, ModelEntityType, ModelFeature, ModelPropertyKey, ModelTypeEnum, OllamaEmbeddingsProviders, OpenAIEmbeddingsProviders, OrderTypeEnum, OrganizationContactBudgetTypeEnum, OrganizationDemoNetworkEnum, OrganizationPermissionsEnum, OrganizationProjectBudgetTypeEnum, OrganizationSelectInput, PLUGIN_CONFIGURATION_STATUS, PLUGIN_LEVEL, PLUGIN_LOAD_STATUS, PLUGIN_SOURCE, ParameterType, ParameterTypeEnum, PayPeriodEnum, PermissionApprovalStatus, PermissionApprovalStatusTypesEnum, PermissionGroups, PermissionsEnum, PriceType, ProjectBillingEnum, ProjectOwnerEnum, ProjectStatusEnum, ProviderEnum, ProviderType, QueryStatusEnum, RegionsEnum, RequestMethodEnum, RequestScopeLevel, RoleTypeEnum, RolesEnum, SANDBOX_MANAGED_SERVICE_STATUSES, SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES, SANDBOX_TERMINAL_NAMESPACE, SANDBOX_WORK_FOR_TYPES, SMTPSecureEnum, STANDARD_METADATA_FIELDS, STATE_SYS_THREAD_ID, STATE_SYS_VOLUME, STATE_SYS_WORKSPACE_PATH, STATE_SYS_WORKSPACE_URL, STATE_VARIABLE_FILES, STATE_VARIABLE_HUMAN, STATE_VARIABLE_INPUT, STATE_VARIABLE_SYS, STATE_VARIABLE_TITLE_CHANNEL, SandboxManagedServiceErrorCode, SandboxTerminalClientEvent, SandboxTerminalClosedReason, SandboxTerminalErrorCode, SandboxTerminalServerEvent, ScheduleTaskStatus, SecretTokenBindingType, SemanticModelStatusEnum, StoryStatusEnum, StoryTemplateType, SubscriptionType, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, TENANT_AGENT_LOCAL_URL, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, TimeGranularity, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, VisitEntityEnum, VisitTypeEnum, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XpertAgentExecutionStatusEnum, XpertParameterTypeEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createXpertGraph, createXpertNodes, embeddingCubeCollectionName, ensureAssistantBindingSkillWorkspacePreference, extractSemanticModelDraft, figureOutXpert, filterAssistantBindingDisabledSkillIds, filterAssistantBindingDisabledTools, filterMessageText, findStartNodes, genJSONParseKey, genJSONStringifyKey, genListOperatorKey, genPipelineChunkerKey, genPipelineKnowledgeBaseKey, genPipelineProcessorKey, genPipelineSourceKey, genPipelineUnderstandingKey, genVariableAggregatorKey, genXpertDBDeleteKey, genXpertDBInsertKey, genXpertDBQueryKey, genXpertDBSqlKey, genXpertDBUpdateKey, genXpertIteratorKey, genXpertMiddlewareKey, genXpertSkillKey, genXpertStartKey, genXpertTriggerKey, generateCronExpression, getAgentMiddlewareNodes, getAgentVarGroup, getAssistantBindingDisabledSkillIds, getAssistantBindingDisabledTools, getAssistantManagement, getCurrentGraph, getEnabledTools, getStoreNamespace, getSwarmPartners, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, getXpertWorkspaceVisibility, inferMessageAppendContext, isAgentKey, isAssistantBindingSkillEnabled, isAssistantBindingToolEnabled, isAssistantBindingToolPreferencesEmpty, isAudioType, isContextCompressionComponentData, isDocumentSheet, isEnableTool, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isMessageGroup, isMiddlewareToolEnabled, isRequiredMiddleware, isRouterKey, isSystemManagedAssistant, isTenantSharedXpertWorkspace, isToolEnabled, isUserManagedAssistant, isVideoType, isXpertNodeType, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, normalizeAssistantBindingToolPreferences, normalizeMiddlewareNode, normalizeMiddlewareNodes, normalizeMiddlewareProvider, normalizeXpertAgentConfig, omitXpertRelations, replaceAgentInDraft, resolveMessageAppendContext, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, updateAssistantBindingSkillPreferences, updateAssistantBindingToolPreferences, uuid, workflowNodeIdentifier, xpertLabel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/contracts",
3
- "version": "3.9.3",
3
+ "version": "3.9.4",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "module": "./index.esm.js",
20
20
  "main": "./index.cjs.js",
21
21
  "dependencies": {
22
- "@xpert-ai/chatkit-types": "^0.2.3"
22
+ "@xpert-ai/chatkit-types": "^0.3.1"
23
23
  },
24
24
  "types": "./index.d.ts"
25
25
  }
@@ -1,4 +1,5 @@
1
- import { type TFollowUpConsumedEvent, type TChatEventMessage } from '@xpert-ai/chatkit-types';
1
+ import type { TFollowUpConsumedEvent, TChatEventMessage } from '@xpert-ai/chatkit-types';
2
+ export declare const CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED: "follow_up_consumed";
2
3
  export declare const CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE: "thread_context_usage";
3
4
  export declare const CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY: "conversation_title_summary";
4
5
  export type TConversationTitleSummaryEvent = TChatEventMessage & {
package/src/ai/index.d.ts CHANGED
@@ -34,8 +34,8 @@ export declare enum ChatMessageStepCategory {
34
34
  Knowledges = "knowledges"
35
35
  }
36
36
  export type * from '@xpert-ai/chatkit-types';
37
- export { CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED } from '@xpert-ai/chatkit-types';
38
37
  export type { TChatRequest } from './xpert-chat.model';
38
+ export { CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED } from './chat-event.model';
39
39
  export * from './assistant-binding.model';
40
40
  export * from './ai-model.model';
41
41
  export * from './ai.model';
@@ -82,6 +82,7 @@ export * from './knowledge-pipeline';
82
82
  export * from './knowledge-retrieval-log.model';
83
83
  export * from './knowledge-doc-chunk.model';
84
84
  export * from './skill.model';
85
+ export * from './prompt-workflow.model';
85
86
  export * from './middleware.model';
86
87
  export * from './context-compression.model';
87
88
  export * from './sandbox';
@@ -0,0 +1,51 @@
1
+ import { IconDefinition } from '../types';
2
+ import { IBasePerWorkspaceEntityModel } from './xpert-workspace.model';
3
+ import { SkillSlashCommandAvailability } from './skill.model';
4
+ export type PromptWorkflowVisibility = 'private' | 'team' | 'tenant';
5
+ export type PromptWorkflowSourceType = 'xpert' | 'workspace_prompt_workflow' | 'skill';
6
+ export type PromptWorkflowCommandPriority = 'normal' | 'preferred';
7
+ export type TPromptWorkflow = {
8
+ name: string;
9
+ label?: string;
10
+ description?: string;
11
+ icon?: string | IconDefinition | Record<string, unknown>;
12
+ category?: string;
13
+ aliases?: string[];
14
+ argsHint?: string;
15
+ template: string;
16
+ tags?: string[];
17
+ visibility?: PromptWorkflowVisibility;
18
+ runtimeCapabilities?: unknown;
19
+ archivedAt?: Date | string | null;
20
+ };
21
+ export interface IPromptWorkflow extends IBasePerWorkspaceEntityModel, TPromptWorkflow {
22
+ }
23
+ export type TPromptWorkflowCommandSnapshot = TPromptWorkflow & {
24
+ workflowId?: string;
25
+ workspaceId?: string;
26
+ };
27
+ export type TXpertCommandProfileEntry = {
28
+ id?: string;
29
+ source: PromptWorkflowSourceType;
30
+ enabled?: boolean;
31
+ order?: number;
32
+ priority?: PromptWorkflowCommandPriority;
33
+ workflowId?: string;
34
+ skillCommandName?: string;
35
+ snapshot?: TPromptWorkflowCommandSnapshot;
36
+ name?: string;
37
+ label?: string;
38
+ description?: string;
39
+ icon?: string | IconDefinition | Record<string, unknown>;
40
+ category?: string;
41
+ aliases?: string[];
42
+ argsHint?: string;
43
+ template?: string;
44
+ runtimeCapabilities?: unknown;
45
+ availability?: SkillSlashCommandAvailability;
46
+ };
47
+ export type TXpertCommandProfile = {
48
+ version: 1;
49
+ enabled?: boolean;
50
+ commands?: TXpertCommandProfileEntry[];
51
+ };
@@ -1,8 +1,9 @@
1
- import { IBasePerTenantAndOrganizationEntityModel } from "../base-entity.model";
2
- import { I18nObject, IconDefinition } from "../types";
3
- import { JsonSchemaObjectType } from "./types";
4
- import { IWorkflowNode, WorkflowNodeTypeEnum } from "./xpert-workflow.model";
5
- import { IBasePerWorkspaceEntityModel } from "./xpert-workspace.model";
1
+ import type { ChatKitPromptWorkflow, ChatKitSlashCommand, ChatKitSlashCommandAction, ChatKitSlashCommandAvailability, ChatKitSlashCommandCapability, ChatKitSlashCommandKind } from '@xpert-ai/chatkit-types';
2
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
3
+ import { I18nObject, IconDefinition } from '../types';
4
+ import { JsonSchemaObjectType } from './types';
5
+ import { IWorkflowNode, WorkflowNodeTypeEnum } from './xpert-workflow.model';
6
+ import { IBasePerWorkspaceEntityModel } from './xpert-workspace.model';
6
7
  export type SkillId = string;
7
8
  export declare const WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER = "workspace-public";
8
9
  export declare const WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME = "Workspace Shared Skills";
@@ -21,6 +22,14 @@ export interface ISkillRepositoryIndexPublisher {
21
22
  image?: string;
22
23
  kind?: string;
23
24
  }
25
+ export type SkillSlashCommandCapability = ChatKitSlashCommandCapability;
26
+ export type SkillSlashCommandAction = ChatKitSlashCommandAction;
27
+ export type SkillSlashCommandAvailability = ChatKitSlashCommandAvailability;
28
+ export type SkillSlashCommandKind = ChatKitSlashCommandKind;
29
+ export type SkillPromptWorkflow = ChatKitPromptWorkflow;
30
+ export type SkillSlashCommand = Omit<ChatKitSlashCommand, 'icon'> & {
31
+ icon?: ChatKitSlashCommand['icon'] | IconDefinition;
32
+ };
24
33
  export interface IShareSkillPackageInput {
25
34
  displayName: string;
26
35
  description: string;
@@ -50,6 +59,7 @@ export interface SkillMetadata {
50
59
  permissions?: string[];
51
60
  tools?: string[];
52
61
  };
62
+ commands?: SkillSlashCommand[];
53
63
  mcp?: {
54
64
  servers?: string[];
55
65
  };
@@ -1,18 +1,5 @@
1
- import type { TChatRequestHuman, TInterruptCommand } from '@xpert-ai/chatkit-types';
2
- import { STATE_VARIABLE_HUMAN } from '@xpert-ai/chatkit-types';
3
- export type TXpertFollowUpMode = 'queue' | 'steer';
4
- export type TXpertChatState = {
5
- [STATE_VARIABLE_HUMAN]?: TChatRequestHuman;
6
- } & Record<string, any>;
7
- export type TXpertChatResumeDecision = {
8
- type: 'confirm' | 'reject';
9
- payload?: unknown;
10
- };
11
- export type TXpertChatInterruptPatch = Pick<TInterruptCommand, 'agentKey' | 'toolCalls' | 'update'>;
12
- export type TXpertChatTarget = {
13
- aiMessageId?: string;
14
- executionId?: string;
15
- };
1
+ import type { FollowUpBehavior, TChatRequestHuman, TXpertChatInterruptPatch, TXpertChatResumeDecision, TXpertChatResumeRequest, TXpertChatState, TXpertChatTarget } from '@xpert-ai/chatkit-types';
2
+ export type TXpertFollowUpMode = FollowUpBehavior;
16
3
  export type TXpertChatSource = {
17
4
  aiMessageId?: string;
18
5
  executionId?: string;
@@ -29,14 +16,6 @@ export type TXpertChatSendRequest = {
29
16
  };
30
17
  state?: TXpertChatState;
31
18
  };
32
- export type TXpertChatResumeRequest = {
33
- action: 'resume';
34
- conversationId: string;
35
- target: TXpertChatTarget;
36
- decision: TXpertChatResumeDecision;
37
- patch?: TXpertChatInterruptPatch;
38
- state?: TXpertChatState;
39
- };
40
19
  export type TXpertChatRetryRequest = {
41
20
  action: 'retry';
42
21
  conversationId: string;
@@ -14,6 +14,7 @@ import { IIntegration } from '../integration.model';
14
14
  import { TChatFrom } from './chat.model';
15
15
  import { IWorkflowNode, TVariableAssigner, TWFCase, VariableOperationEnum } from './xpert-workflow.model';
16
16
  import { IEnvironment } from './environment.model';
17
+ import { TXpertCommandProfile } from './prompt-workflow.model';
17
18
  export type ToolCall = LToolCall;
18
19
  export declare enum XpertTypeEnum {
19
20
  /**
@@ -134,6 +135,7 @@ export type TXpert = {
134
135
  */
135
136
  memory?: TLongTermMemory;
136
137
  features?: TXpertFeatures;
138
+ commandProfile?: TXpertCommandProfile;
137
139
  /**
138
140
  * Version of role: '1' '2' '2.1' '2.2'...
139
141
  */
@@ -32,6 +32,7 @@ export declare function omitXpertRelations(xpert: Partial<IXpert>): {
32
32
  summarize?: import("./xpert.model").TSummarize;
33
33
  memory?: import("./xpert.model").TLongTermMemory;
34
34
  features?: import("./xpert.model").TXpertFeatures;
35
+ commandProfile?: import("./prompt-workflow.model").TXpertCommandProfile;
35
36
  version?: string;
36
37
  latest?: boolean;
37
38
  releaseNotes?: string;
@@ -1,4 +1,5 @@
1
1
  import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
+ import { SecretTokenBindingType } from './secret-token.model';
2
3
  import { IUser } from './user.model';
3
4
  /**
4
5
  * Represents an API key used for authentication and authorization.
@@ -48,8 +49,16 @@ export declare enum ApiKeyBindingType {
48
49
  }
49
50
  export type ApiPrincipalType = 'api_key' | 'client_secret';
50
51
  export interface IApiPrincipal extends IUser {
51
- apiKey: IApiKey;
52
52
  principalType: ApiPrincipalType;
53
+ apiKey?: IApiKey;
54
+ /**
55
+ * Binding target kind for short-lived client_secret principals.
56
+ * Examples:
57
+ * - api_key => secret_token.entityId is the backing ApiKey id
58
+ * - public_xpert => secret_token.entityId is the public xpert id
59
+ */
60
+ clientSecretBindingType?: SecretTokenBindingType | null;
61
+ clientSecretId?: string | null;
53
62
  /**
54
63
  * Resource owner / key creator. Used for audit and ownership metadata.
55
64
  */
@@ -1,11 +1,17 @@
1
- import { IBaseEntityModel } from './base-entity.model';
2
- export interface ISecretToken extends IBaseEntityModel {
1
+ import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
+ export declare enum SecretTokenBindingType {
3
+ API_KEY = "api_key",
4
+ PUBLIC_XPERT = "public_xpert"
5
+ }
6
+ export interface ISecretToken extends IBasePerTenantAndOrganizationEntityModel {
3
7
  entityId?: string;
8
+ type?: SecretTokenBindingType;
4
9
  token: string;
5
10
  validUntil?: Date;
6
11
  expired?: boolean;
7
12
  }
8
- export interface ISecretTokenFindInput extends IBaseEntityModel {
13
+ export interface ISecretTokenFindInput extends IBasePerTenantAndOrganizationEntityModel {
9
14
  entityId?: string;
15
+ type?: SecretTokenBindingType;
10
16
  token?: string;
11
17
  }