@xpert-ai/contracts 3.9.2 → 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 +78 -64
- package/index.esm.js +77 -62
- package/package.json +2 -2
- package/src/ai/chat-event.model.d.ts +2 -1
- package/src/ai/chat-message.model.d.ts +20 -1
- package/src/ai/chat.model.d.ts +2 -0
- package/src/ai/index.d.ts +2 -1
- package/src/ai/knowledge-doc.model.d.ts +1 -0
- package/src/ai/knowledge-pipeline.d.ts +3 -3
- package/src/ai/knowledgebase.model.d.ts +19 -1
- package/src/ai/middleware.model.d.ts +5 -0
- package/src/ai/prompt-workflow.model.d.ts +51 -0
- package/src/ai/skill.model.d.ts +15 -5
- package/src/ai/xpert-chat.model.d.ts +2 -23
- package/src/ai/xpert-project.model.d.ts +1 -1
- package/src/ai/xpert.model.d.ts +15 -0
- package/src/ai/xpert.utils.d.ts +2 -0
- package/src/api-key.model.d.ts +10 -1
- package/src/secret-token.model.d.ts +9 -3
- package/src/storage-file.model.d.ts +1 -0
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
1628
|
-
var middlewares = normalizedPreferences.middlewares ? _object_spread$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
1742
|
+
return normalizeAssistantBindingToolPreferences(_object_spread$7({
|
|
1702
1743
|
version: 1
|
|
1703
1744
|
}, normalizedPreferences.toolsets ? {
|
|
1704
|
-
toolsets: _object_spread$
|
|
1745
|
+
toolsets: _object_spread$7({}, normalizedPreferences.toolsets)
|
|
1705
1746
|
} : {}, normalizedPreferences.middlewares ? {
|
|
1706
|
-
middlewares: _object_spread$
|
|
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$
|
|
1765
|
+
return _object_spread_props$6(_object_spread$7({
|
|
1725
1766
|
version: 1
|
|
1726
1767
|
}, normalizedPreferences.toolsets ? {
|
|
1727
|
-
toolsets: _object_spread$
|
|
1768
|
+
toolsets: _object_spread$7({}, normalizedPreferences.toolsets)
|
|
1728
1769
|
} : {}, normalizedPreferences.middlewares ? {
|
|
1729
|
-
middlewares: _object_spread$
|
|
1770
|
+
middlewares: _object_spread$7({}, normalizedPreferences.middlewares)
|
|
1730
1771
|
} : {}), {
|
|
1731
|
-
skills: _object_spread_props$6(_object_spread$
|
|
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;
|
|
@@ -2606,6 +2606,13 @@ exports.KnowledgebaseTypeEnum = void 0;
|
|
|
2606
2606
|
KnowledgebaseTypeEnum["Standard"] = "standard";
|
|
2607
2607
|
KnowledgebaseTypeEnum["External"] = "external";
|
|
2608
2608
|
})(exports.KnowledgebaseTypeEnum || (exports.KnowledgebaseTypeEnum = {}));
|
|
2609
|
+
exports.KnowledgebaseStatusEnum = void 0;
|
|
2610
|
+
(function(KnowledgebaseStatusEnum) {
|
|
2611
|
+
KnowledgebaseStatusEnum["READY"] = "ready";
|
|
2612
|
+
KnowledgebaseStatusEnum["REBUILD_REQUIRED"] = "rebuild_required";
|
|
2613
|
+
KnowledgebaseStatusEnum["REBUILDING"] = "rebuilding";
|
|
2614
|
+
KnowledgebaseStatusEnum["REBUILD_FAILED"] = "rebuild_failed";
|
|
2615
|
+
})(exports.KnowledgebaseStatusEnum || (exports.KnowledgebaseStatusEnum = {}));
|
|
2609
2616
|
exports.KnowledgeStructureEnum = void 0;
|
|
2610
2617
|
(function(KnowledgeStructureEnum) {
|
|
2611
2618
|
KnowledgeStructureEnum["General"] = "general";
|
|
@@ -3818,6 +3825,9 @@ function isMiddlewareToolEnabled(config) {
|
|
|
3818
3825
|
}
|
|
3819
3826
|
return (config === null || config === void 0 ? void 0 : config.enabled) !== false;
|
|
3820
3827
|
}
|
|
3828
|
+
function isRequiredMiddleware(entity) {
|
|
3829
|
+
return (entity === null || entity === void 0 ? void 0 : entity.required) === true;
|
|
3830
|
+
}
|
|
3821
3831
|
function genXpertMiddlewareKey() {
|
|
3822
3832
|
return letterStartSUID("Middleware_");
|
|
3823
3833
|
}
|
|
@@ -4720,6 +4730,12 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
|
|
|
4720
4730
|
OrganizationProjectBudgetTypeEnum["COST"] = "cost";
|
|
4721
4731
|
})(exports.OrganizationProjectBudgetTypeEnum || (exports.OrganizationProjectBudgetTypeEnum = {}));
|
|
4722
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
|
+
|
|
4723
4739
|
exports.Visibility = void 0;
|
|
4724
4740
|
(function(Visibility) {
|
|
4725
4741
|
Visibility["Public"] = "public";
|
|
@@ -5403,14 +5419,11 @@ var PLUGIN_LOAD_STATUS = {
|
|
|
5403
5419
|
FAILED: "failed"
|
|
5404
5420
|
};
|
|
5405
5421
|
|
|
5406
|
-
Object.defineProperty(exports, "CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED", {
|
|
5407
|
-
enumerable: true,
|
|
5408
|
-
get: function () { return chatkitTypes.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED; }
|
|
5409
|
-
});
|
|
5410
5422
|
exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
|
|
5411
5423
|
exports.API_PRINCIPAL_USER_ID_HEADER = API_PRINCIPAL_USER_ID_HEADER;
|
|
5412
5424
|
exports.Attachment_Type_Options = Attachment_Type_Options;
|
|
5413
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;
|
|
5414
5427
|
exports.CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE;
|
|
5415
5428
|
exports.CONTEXT_COMPRESSION_COMPONENT_TYPE = CONTEXT_COMPRESSION_COMPONENT_TYPE;
|
|
5416
5429
|
exports.CONTEXT_COMPRESSION_MIDDLEWARE_NAME = CONTEXT_COMPRESSION_MIDDLEWARE_NAME;
|
|
@@ -5558,6 +5571,7 @@ exports.isIteratingKey = isIteratingKey;
|
|
|
5558
5571
|
exports.isIteratorKey = isIteratorKey;
|
|
5559
5572
|
exports.isMessageGroup = isMessageGroup;
|
|
5560
5573
|
exports.isMiddlewareToolEnabled = isMiddlewareToolEnabled;
|
|
5574
|
+
exports.isRequiredMiddleware = isRequiredMiddleware;
|
|
5561
5575
|
exports.isRouterKey = isRouterKey;
|
|
5562
5576
|
exports.isSystemManagedAssistant = isSystemManagedAssistant;
|
|
5563
5577
|
exports.isTenantSharedXpertWorkspace = isTenantSharedXpertWorkspace;
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
1627
|
-
var middlewares = normalizedPreferences.middlewares ? _object_spread$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
1740
|
+
return normalizeAssistantBindingToolPreferences(_object_spread$7({
|
|
1701
1741
|
version: 1
|
|
1702
1742
|
}, normalizedPreferences.toolsets ? {
|
|
1703
|
-
toolsets: _object_spread$
|
|
1743
|
+
toolsets: _object_spread$7({}, normalizedPreferences.toolsets)
|
|
1704
1744
|
} : {}, normalizedPreferences.middlewares ? {
|
|
1705
|
-
middlewares: _object_spread$
|
|
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$
|
|
1763
|
+
return _object_spread_props$6(_object_spread$7({
|
|
1724
1764
|
version: 1
|
|
1725
1765
|
}, normalizedPreferences.toolsets ? {
|
|
1726
|
-
toolsets: _object_spread$
|
|
1766
|
+
toolsets: _object_spread$7({}, normalizedPreferences.toolsets)
|
|
1727
1767
|
} : {}, normalizedPreferences.middlewares ? {
|
|
1728
|
-
middlewares: _object_spread$
|
|
1768
|
+
middlewares: _object_spread$7({}, normalizedPreferences.middlewares)
|
|
1729
1769
|
} : {}), {
|
|
1730
|
-
skills: _object_spread_props$6(_object_spread$
|
|
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;
|
|
@@ -2605,6 +2604,13 @@ var KnowledgebaseTypeEnum;
|
|
|
2605
2604
|
KnowledgebaseTypeEnum["Standard"] = "standard";
|
|
2606
2605
|
KnowledgebaseTypeEnum["External"] = "external";
|
|
2607
2606
|
})(KnowledgebaseTypeEnum || (KnowledgebaseTypeEnum = {}));
|
|
2607
|
+
var KnowledgebaseStatusEnum;
|
|
2608
|
+
(function(KnowledgebaseStatusEnum) {
|
|
2609
|
+
KnowledgebaseStatusEnum["READY"] = "ready";
|
|
2610
|
+
KnowledgebaseStatusEnum["REBUILD_REQUIRED"] = "rebuild_required";
|
|
2611
|
+
KnowledgebaseStatusEnum["REBUILDING"] = "rebuilding";
|
|
2612
|
+
KnowledgebaseStatusEnum["REBUILD_FAILED"] = "rebuild_failed";
|
|
2613
|
+
})(KnowledgebaseStatusEnum || (KnowledgebaseStatusEnum = {}));
|
|
2608
2614
|
var KnowledgeStructureEnum;
|
|
2609
2615
|
(function(KnowledgeStructureEnum) {
|
|
2610
2616
|
KnowledgeStructureEnum["General"] = "general";
|
|
@@ -3817,6 +3823,9 @@ function isMiddlewareToolEnabled(config) {
|
|
|
3817
3823
|
}
|
|
3818
3824
|
return (config === null || config === void 0 ? void 0 : config.enabled) !== false;
|
|
3819
3825
|
}
|
|
3826
|
+
function isRequiredMiddleware(entity) {
|
|
3827
|
+
return (entity === null || entity === void 0 ? void 0 : entity.required) === true;
|
|
3828
|
+
}
|
|
3820
3829
|
function genXpertMiddlewareKey() {
|
|
3821
3830
|
return letterStartSUID("Middleware_");
|
|
3822
3831
|
}
|
|
@@ -4719,6 +4728,12 @@ var OrganizationProjectBudgetTypeEnum;
|
|
|
4719
4728
|
OrganizationProjectBudgetTypeEnum["COST"] = "cost";
|
|
4720
4729
|
})(OrganizationProjectBudgetTypeEnum || (OrganizationProjectBudgetTypeEnum = {}));
|
|
4721
4730
|
|
|
4731
|
+
var SecretTokenBindingType;
|
|
4732
|
+
(function(SecretTokenBindingType) {
|
|
4733
|
+
SecretTokenBindingType["API_KEY"] = "api_key";
|
|
4734
|
+
SecretTokenBindingType["PUBLIC_XPERT"] = "public_xpert";
|
|
4735
|
+
})(SecretTokenBindingType || (SecretTokenBindingType = {}));
|
|
4736
|
+
|
|
4722
4737
|
var Visibility;
|
|
4723
4738
|
(function(Visibility) {
|
|
4724
4739
|
Visibility["Public"] = "public";
|
|
@@ -5402,4 +5417,4 @@ var PLUGIN_LOAD_STATUS = {
|
|
|
5402
5417
|
FAILED: "failed"
|
|
5403
5418
|
};
|
|
5404
5419
|
|
|
5405
|
-
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, 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, 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
|
+
"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.
|
|
22
|
+
"@xpert-ai/chatkit-types": "^0.3.1"
|
|
23
23
|
},
|
|
24
24
|
"types": "./index.d.ts"
|
|
25
25
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
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 & {
|
|
@@ -26,13 +26,32 @@ export type TChatElementReferenceFields = {
|
|
|
26
26
|
serviceId: string;
|
|
27
27
|
tagName: string;
|
|
28
28
|
};
|
|
29
|
+
export type TChatFileElementReferenceFields = {
|
|
30
|
+
attributes: TChatElementAttribute[];
|
|
31
|
+
documentTitle?: string;
|
|
32
|
+
domPath: string;
|
|
33
|
+
filePath: string;
|
|
34
|
+
outerHtml: string;
|
|
35
|
+
role?: string;
|
|
36
|
+
selector: string;
|
|
37
|
+
sourceEndLine?: number;
|
|
38
|
+
sourceStartLine?: number;
|
|
39
|
+
tagName: string;
|
|
40
|
+
text: string;
|
|
41
|
+
};
|
|
29
42
|
export type TChatElementReferenceCandidateFields = {
|
|
30
43
|
[Property in keyof TChatElementReferenceFields]?: unknown;
|
|
31
44
|
};
|
|
45
|
+
export type TChatFileElementReferenceCandidateFields = {
|
|
46
|
+
[Property in keyof TChatFileElementReferenceFields]?: unknown;
|
|
47
|
+
};
|
|
32
48
|
export type TChatElementReference = ChatKitReferenceBase & TChatElementReferenceFields & {
|
|
33
49
|
type: 'element';
|
|
34
50
|
};
|
|
35
|
-
export type
|
|
51
|
+
export type TChatFileElementReference = ChatKitReferenceBase & TChatFileElementReferenceFields & {
|
|
52
|
+
type: 'file_element';
|
|
53
|
+
};
|
|
54
|
+
export type TChatReference = ChatKitReference | TChatElementReference | TChatFileElementReference;
|
|
36
55
|
/**
|
|
37
56
|
* Chat message entity type
|
|
38
57
|
*/
|
package/src/ai/chat.model.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { IXpertTask } from './xpert-task.model';
|
|
|
10
10
|
import { TToolCall } from '../agent';
|
|
11
11
|
import { TInterrupt } from '../agent/interrupt';
|
|
12
12
|
import { IUser } from '../user.model';
|
|
13
|
+
import type { RuntimeCapabilitiesSelection } from '@xpert-ai/chatkit-types';
|
|
13
14
|
export type TChatConversationOptions = {
|
|
14
15
|
parameters?: {
|
|
15
16
|
input?: string;
|
|
@@ -21,6 +22,7 @@ export type TChatConversationOptions = {
|
|
|
21
22
|
workspacePath?: string;
|
|
22
23
|
workspaceUrl?: string;
|
|
23
24
|
sandboxEnvironmentId?: string;
|
|
25
|
+
runtimeCapabilities?: RuntimeCapabilitiesSelection;
|
|
24
26
|
};
|
|
25
27
|
export type TChatConversationStatus = 'idle' | 'busy' | 'interrupted' | 'error';
|
|
26
28
|
export type TToolCallType = 'agent' | 'tool';
|
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';
|
|
@@ -87,15 +87,15 @@ export interface IWFNKnowledgeBase extends IWorkflowNode {
|
|
|
87
87
|
*/
|
|
88
88
|
inputs?: string[];
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* @deprecated Configure embedding model on the knowledgebase.
|
|
91
91
|
*/
|
|
92
92
|
copilotModel?: ICopilotModel;
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* @deprecated Configure rerank model on the knowledgebase.
|
|
95
95
|
*/
|
|
96
96
|
rerankModel?: ICopilotModel;
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
98
|
+
* @deprecated Configure vision model on the knowledgebase.
|
|
99
99
|
*/
|
|
100
100
|
visionModel?: ICopilotModel;
|
|
101
101
|
documents?: string[];
|
|
@@ -15,6 +15,12 @@ export declare enum KnowledgebaseTypeEnum {
|
|
|
15
15
|
Standard = "standard",
|
|
16
16
|
External = "external"
|
|
17
17
|
}
|
|
18
|
+
export declare enum KnowledgebaseStatusEnum {
|
|
19
|
+
READY = "ready",
|
|
20
|
+
REBUILD_REQUIRED = "rebuild_required",
|
|
21
|
+
REBUILDING = "rebuilding",
|
|
22
|
+
REBUILD_FAILED = "rebuild_failed"
|
|
23
|
+
}
|
|
18
24
|
export declare enum KnowledgeStructureEnum {
|
|
19
25
|
General = "general",
|
|
20
26
|
ParentChild = "parent-child",
|
|
@@ -61,6 +67,18 @@ export type TKnowledgebase = {
|
|
|
61
67
|
*/
|
|
62
68
|
copilotModel?: ICopilotModel;
|
|
63
69
|
copilotModelId?: string;
|
|
70
|
+
embeddingCollectionName?: string | null;
|
|
71
|
+
embeddingModelFingerprint?: string | null;
|
|
72
|
+
embeddingDimensions?: number | null;
|
|
73
|
+
embeddingRevision?: number | null;
|
|
74
|
+
pendingCopilotModel?: ICopilotModel | null;
|
|
75
|
+
pendingCopilotModelId?: string | null;
|
|
76
|
+
pendingEmbeddingCollectionName?: string | null;
|
|
77
|
+
pendingEmbeddingModelFingerprint?: string | null;
|
|
78
|
+
pendingEmbeddingDimensions?: number | null;
|
|
79
|
+
pendingEmbeddingRevision?: number | null;
|
|
80
|
+
rebuildTaskId?: string | null;
|
|
81
|
+
embeddingRebuildError?: string | null;
|
|
64
82
|
rerankModel?: ICopilotModel;
|
|
65
83
|
rerankModelId?: string;
|
|
66
84
|
visionModel?: ICopilotModel;
|
|
@@ -88,7 +106,7 @@ export type TKnowledgebase = {
|
|
|
88
106
|
* Recall params for kb chunks
|
|
89
107
|
*/
|
|
90
108
|
recall?: TKBRecallParams;
|
|
91
|
-
status?:
|
|
109
|
+
status?: KnowledgebaseStatusEnum;
|
|
92
110
|
/**
|
|
93
111
|
* Metadata custom field definition array
|
|
94
112
|
*/
|
|
@@ -7,6 +7,10 @@ export declare const CONTEXT_COMPRESSION_MIDDLEWARE_NAME = "ContextCompressionMi
|
|
|
7
7
|
export interface IWFNMiddleware extends IWorkflowNode {
|
|
8
8
|
type: WorkflowNodeTypeEnum.MIDDLEWARE;
|
|
9
9
|
provider: string;
|
|
10
|
+
/**
|
|
11
|
+
* Required middlewares are always loaded at runtime and hidden from user-facing runtime selectors.
|
|
12
|
+
*/
|
|
13
|
+
required?: boolean;
|
|
10
14
|
options?: Record<string, any>;
|
|
11
15
|
tools?: Record<string, TMiddlewareToolConfig | boolean>;
|
|
12
16
|
}
|
|
@@ -14,6 +18,7 @@ export type TMiddlewareToolConfig = {
|
|
|
14
18
|
enabled?: boolean;
|
|
15
19
|
};
|
|
16
20
|
export declare function isMiddlewareToolEnabled(config?: TMiddlewareToolConfig | boolean): boolean;
|
|
21
|
+
export declare function isRequiredMiddleware(entity?: Pick<IWFNMiddleware, 'required'> | null): boolean;
|
|
17
22
|
export declare function genXpertMiddlewareKey(): string;
|
|
18
23
|
export declare function normalizeMiddlewareProvider(provider?: string | null): string;
|
|
19
24
|
export declare function normalizeMiddlewareNode<T extends TXpertTeamNode>(node: T): T;
|
|
@@ -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
|
+
};
|
package/src/ai/skill.model.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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,
|
|
2
|
-
|
|
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;
|
|
@@ -82,7 +82,7 @@ export interface IXpertProjectVCS extends IBasePerXpertProjectEntityModel {
|
|
|
82
82
|
/**
|
|
83
83
|
* @deprecated Use `attachments`
|
|
84
84
|
*/
|
|
85
|
-
export interface IXpertProjectFile extends IBasePerXpertProjectEntityModel, Omit<TFile, 'createdAt'> {
|
|
85
|
+
export interface IXpertProjectFile extends IBasePerXpertProjectEntityModel, Omit<TFile, 'createdAt' | 'updatedAt'> {
|
|
86
86
|
}
|
|
87
87
|
export type TXpertProjectDSL = IXpertProject & {
|
|
88
88
|
xperts?: TXpertTeamDraft[];
|
package/src/ai/xpert.model.d.ts
CHANGED
|
@@ -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
|
/**
|
|
@@ -76,6 +77,13 @@ export type TXpertFeatures = {
|
|
|
76
77
|
title?: TXpertTitleFeature;
|
|
77
78
|
};
|
|
78
79
|
export type TXpertFeatureKey = keyof TXpertFeatures;
|
|
80
|
+
export type TXpertExportedTemplate = {
|
|
81
|
+
id: string;
|
|
82
|
+
filePath: string;
|
|
83
|
+
exportedAt: string;
|
|
84
|
+
isDraft: boolean;
|
|
85
|
+
includeMemory: boolean;
|
|
86
|
+
};
|
|
79
87
|
export type TXpert = {
|
|
80
88
|
/**
|
|
81
89
|
* Unique slug identifier, generated from name
|
|
@@ -127,6 +135,7 @@ export type TXpert = {
|
|
|
127
135
|
*/
|
|
128
136
|
memory?: TLongTermMemory;
|
|
129
137
|
features?: TXpertFeatures;
|
|
138
|
+
commandProfile?: TXpertCommandProfile;
|
|
130
139
|
/**
|
|
131
140
|
* Version of role: '1' '2' '2.1' '2.2'...
|
|
132
141
|
*/
|
|
@@ -139,6 +148,7 @@ export type TXpert = {
|
|
|
139
148
|
* Release notes
|
|
140
149
|
*/
|
|
141
150
|
releaseNotes?: string;
|
|
151
|
+
exportedTemplate?: TXpertExportedTemplate | null;
|
|
142
152
|
/**
|
|
143
153
|
* Draft on current version
|
|
144
154
|
*/
|
|
@@ -458,6 +468,11 @@ export interface TXpertTeamConnection {
|
|
|
458
468
|
* - others: Vertical Process, agent
|
|
459
469
|
*/
|
|
460
470
|
type: 'edge' | TXpertTeamNodeType;
|
|
471
|
+
/**
|
|
472
|
+
* Runtime selection behavior for selectable connections.
|
|
473
|
+
* For sub-agent connections, omitted means required.
|
|
474
|
+
*/
|
|
475
|
+
required?: boolean;
|
|
461
476
|
readonly?: boolean;
|
|
462
477
|
}
|
|
463
478
|
export type TChatOptions = {
|
package/src/ai/xpert.utils.d.ts
CHANGED
|
@@ -32,9 +32,11 @@ 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;
|
|
39
|
+
exportedTemplate?: import("./xpert.model").TXpertExportedTemplate | null;
|
|
38
40
|
graph?: import("./xpert.model").TXpertGraph;
|
|
39
41
|
api?: import("./xpert.model").TChatApi;
|
|
40
42
|
app?: import("./xpert.model").TChatApp;
|
package/src/api-key.model.d.ts
CHANGED
|
@@ -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 {
|
|
2
|
-
export
|
|
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
|
|
13
|
+
export interface ISecretTokenFindInput extends IBasePerTenantAndOrganizationEntityModel {
|
|
9
14
|
entityId?: string;
|
|
15
|
+
type?: SecretTokenBindingType;
|
|
10
16
|
token?: string;
|
|
11
17
|
}
|