@xpert-ai/contracts 3.9.4 → 3.9.8
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 +306 -124
- package/index.esm.js +298 -125
- package/package.json +2 -2
- package/src/agent/graph.d.ts +9 -4
- package/src/agent/variables.d.ts +3 -3
- package/src/ai/ai-provider.model.d.ts +10 -10
- package/src/ai/ai.model.d.ts +88 -0
- package/src/ai/chat.model.d.ts +5 -0
- package/src/ai/context-compression.model.d.ts +7 -3
- package/src/ai/feature.model.d.ts +2 -1
- package/src/ai/index.d.ts +2 -34
- package/src/ai/knowledge-graph.model.d.ts +224 -0
- package/src/ai/knowledge-pipeline.d.ts +4 -0
- package/src/ai/knowledgebase.model.d.ts +10 -0
- package/src/ai/middleware.model.d.ts +6 -4
- package/src/ai/xpert.model.d.ts +8 -3
- package/src/ai/xpert.utils.d.ts +5 -2
- package/src/analytics/features.d.ts +3 -0
- package/src/analytics/role-permissions.d.ts +3 -0
- package/src/i18n.model.d.ts +6 -0
- package/src/index.d.ts +2 -0
- package/src/types.d.ts +5 -7
package/index.esm.js
CHANGED
|
@@ -1,5 +1,90 @@
|
|
|
1
1
|
import ShortUniqueId from 'short-unique-id';
|
|
2
2
|
|
|
3
|
+
function resolveI18nText(value) {
|
|
4
|
+
var language = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
|
|
5
|
+
if (typeof value === "string") {
|
|
6
|
+
var trimmed = value.trim();
|
|
7
|
+
return trimmed || null;
|
|
8
|
+
}
|
|
9
|
+
if (!value || typeof value !== "object") {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
var localized = value;
|
|
13
|
+
var normalizedLanguage = language.trim();
|
|
14
|
+
var underscoredLanguage = normalizedLanguage.replace(/-/g, "_");
|
|
15
|
+
var languagePrefix = normalizedLanguage.split(/[-_]/)[0];
|
|
16
|
+
var preferredKeys = normalizedLanguage.toLowerCase().startsWith("zh") ? [
|
|
17
|
+
normalizedLanguage,
|
|
18
|
+
underscoredLanguage,
|
|
19
|
+
"zh_Hans",
|
|
20
|
+
"zh-Hans",
|
|
21
|
+
"zh_CN",
|
|
22
|
+
"zh-CN",
|
|
23
|
+
"zh",
|
|
24
|
+
"en_US",
|
|
25
|
+
"en-US",
|
|
26
|
+
"en"
|
|
27
|
+
] : [
|
|
28
|
+
normalizedLanguage,
|
|
29
|
+
underscoredLanguage,
|
|
30
|
+
"en_US",
|
|
31
|
+
"en-US",
|
|
32
|
+
"en",
|
|
33
|
+
languagePrefix,
|
|
34
|
+
"zh_Hans",
|
|
35
|
+
"zh-Hans",
|
|
36
|
+
"zh_CN",
|
|
37
|
+
"zh-CN",
|
|
38
|
+
"zh"
|
|
39
|
+
];
|
|
40
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
41
|
+
try {
|
|
42
|
+
for(var _iterator = preferredKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
43
|
+
var key = _step.value;
|
|
44
|
+
var candidate = localized[key];
|
|
45
|
+
if (typeof candidate === "string" && candidate.trim()) {
|
|
46
|
+
return candidate.trim();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} catch (err) {
|
|
50
|
+
_didIteratorError = true;
|
|
51
|
+
_iteratorError = err;
|
|
52
|
+
} finally{
|
|
53
|
+
try {
|
|
54
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
55
|
+
_iterator.return();
|
|
56
|
+
}
|
|
57
|
+
} finally{
|
|
58
|
+
if (_didIteratorError) {
|
|
59
|
+
throw _iteratorError;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
64
|
+
try {
|
|
65
|
+
for(var _iterator1 = Object.values(localized)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
66
|
+
var candidate1 = _step1.value;
|
|
67
|
+
if (typeof candidate1 === "string" && candidate1.trim()) {
|
|
68
|
+
return candidate1.trim();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
} catch (err) {
|
|
72
|
+
_didIteratorError1 = true;
|
|
73
|
+
_iteratorError1 = err;
|
|
74
|
+
} finally{
|
|
75
|
+
try {
|
|
76
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
77
|
+
_iterator1.return();
|
|
78
|
+
}
|
|
79
|
+
} finally{
|
|
80
|
+
if (_didIteratorError1) {
|
|
81
|
+
throw _iteratorError1;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
|
|
3
88
|
function _array_like_to_array$7(arr, len) {
|
|
4
89
|
if (len == null || len > arr.length) len = arr.length;
|
|
5
90
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -1026,7 +1111,9 @@ var AnalyticsFeatures;
|
|
|
1026
1111
|
AnalyticsFeatures["FEATURE_INDICATOR"] = "FEATURE_INDICATOR";
|
|
1027
1112
|
AnalyticsFeatures["FEATURE_INDICATOR_MARKET"] = "FEATURE_INDICATOR_MARKET";
|
|
1028
1113
|
AnalyticsFeatures["FEATURE_INDICATOR_REGISTER"] = "FEATURE_INDICATOR_REGISTER";
|
|
1029
|
-
|
|
1114
|
+
/**
|
|
1115
|
+
* @deprecated Indicator App is no longer exposed in the system menu.
|
|
1116
|
+
*/ AnalyticsFeatures["FEATURE_INDICATOR_APP"] = "FEATURE_INDICATOR_APP";
|
|
1030
1117
|
AnalyticsFeatures["FEATURE_STORY"] = "FEATURE_STORY";
|
|
1031
1118
|
AnalyticsFeatures["FEATURE_STORY_CREATION"] = "FEATURE_STORY_CREATION";
|
|
1032
1119
|
AnalyticsFeatures["FEATURE_STORY_VIEWER"] = "FEATURE_STORY_VIEWER";
|
|
@@ -1141,7 +1228,9 @@ var AnalyticsPermissionsEnum;
|
|
|
1141
1228
|
AnalyticsPermissionsEnum["BUSINESS_AREA_EDIT"] = "BUSINESS_AREA_EDIT";
|
|
1142
1229
|
// Indicator
|
|
1143
1230
|
AnalyticsPermissionsEnum["INDICATOR_VIEW"] = "INDICATOR_VIEW";
|
|
1144
|
-
|
|
1231
|
+
/**
|
|
1232
|
+
* @deprecated Indicator App is no longer exposed in the system menu.
|
|
1233
|
+
*/ AnalyticsPermissionsEnum["INDICATOR_MARTKET_VIEW"] = "INDICATOR_MARTKET_VIEW";
|
|
1145
1234
|
AnalyticsPermissionsEnum["INDICATOR_EDIT"] = "INDICATOR_EDIT";
|
|
1146
1235
|
// Data Factory
|
|
1147
1236
|
AnalyticsPermissionsEnum["DATA_FACTORY_VIEW"] = "DATA_FACTORY_VIEW";
|
|
@@ -1338,6 +1427,121 @@ var QueryStatusEnum;
|
|
|
1338
1427
|
QueryStatusEnum["FAILED"] = "failed";
|
|
1339
1428
|
})(QueryStatusEnum || (QueryStatusEnum = {}));
|
|
1340
1429
|
|
|
1430
|
+
/**
|
|
1431
|
+
* Business roles for AI copilot (commands or contexts)
|
|
1432
|
+
*/ var AiBusinessRole;
|
|
1433
|
+
(function(AiBusinessRole) {
|
|
1434
|
+
AiBusinessRole["FinanceBP"] = "finance_bp";
|
|
1435
|
+
AiBusinessRole["SupplyChainExpert"] = "supply_chain_expert";
|
|
1436
|
+
})(AiBusinessRole || (AiBusinessRole = {}));
|
|
1437
|
+
/**
|
|
1438
|
+
* Providers for LLMs
|
|
1439
|
+
*
|
|
1440
|
+
* - https://js.langchain.com/docs/integrations/chat/
|
|
1441
|
+
*/ var AiProvider;
|
|
1442
|
+
(function(AiProvider) {
|
|
1443
|
+
/**
|
|
1444
|
+
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1445
|
+
*/ AiProvider["OpenAI"] = "openai";
|
|
1446
|
+
/**
|
|
1447
|
+
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1448
|
+
*/ AiProvider["Azure"] = "azure";
|
|
1449
|
+
// DashScope = 'dashscope',
|
|
1450
|
+
/**
|
|
1451
|
+
* - https://ollama.com/
|
|
1452
|
+
* - https://js.langchain.com/docs/integrations/chat/ollama/
|
|
1453
|
+
*/ AiProvider["Ollama"] = "ollama";
|
|
1454
|
+
/**
|
|
1455
|
+
* - https://www.deepseek.com/zh
|
|
1456
|
+
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1457
|
+
*/ AiProvider["DeepSeek"] = "deepseek";
|
|
1458
|
+
/**
|
|
1459
|
+
* - https://docs.anthropic.com/en/home
|
|
1460
|
+
* - https://js.langchain.com/docs/integrations/chat/anthropic/
|
|
1461
|
+
*/ AiProvider["Anthropic"] = "anthropic";
|
|
1462
|
+
/**
|
|
1463
|
+
* - https://www.aliyun.com/product/bailian
|
|
1464
|
+
* - https://js.langchain.com/docs/integrations/chat/alibaba_tongyi/
|
|
1465
|
+
*/ AiProvider["AlibabaTongyi"] = "alibaba_tongyi";
|
|
1466
|
+
/**
|
|
1467
|
+
* - https://open.bigmodel.cn/
|
|
1468
|
+
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1469
|
+
*/ AiProvider["Zhipu"] = "zhipu";
|
|
1470
|
+
/**
|
|
1471
|
+
* - https://qianfan.cloud.baidu.com/
|
|
1472
|
+
* - https://js.langchain.com/docs/integrations/chat/baidu_qianfan/
|
|
1473
|
+
*/ AiProvider["BaiduQianfan"] = "baidu_qianfan";
|
|
1474
|
+
/**
|
|
1475
|
+
* - https://www.together.ai/
|
|
1476
|
+
* - https://js.langchain.com/docs/integrations/chat/togetherai/
|
|
1477
|
+
*/ AiProvider["Together"] = "together";
|
|
1478
|
+
/**
|
|
1479
|
+
* - https://platform.moonshot.cn/console
|
|
1480
|
+
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1481
|
+
*/ AiProvider["Moonshot"] = "moonshot";
|
|
1482
|
+
/**
|
|
1483
|
+
* - https://groq.com/
|
|
1484
|
+
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1485
|
+
*/ AiProvider["Groq"] = "groq";
|
|
1486
|
+
/**
|
|
1487
|
+
* - https://mistral.ai/
|
|
1488
|
+
*
|
|
1489
|
+
*/ AiProvider["Mistral"] = "mistral";
|
|
1490
|
+
/**
|
|
1491
|
+
* - https://cohere.com/
|
|
1492
|
+
*/ AiProvider["Cohere"] = "cohere";
|
|
1493
|
+
})(AiProvider || (AiProvider = {}));
|
|
1494
|
+
var AiProtocol;
|
|
1495
|
+
(function(AiProtocol) {
|
|
1496
|
+
AiProtocol["OpenAI"] = "openai";
|
|
1497
|
+
AiProtocol["Others"] = "others";
|
|
1498
|
+
})(AiProtocol || (AiProtocol = {}));
|
|
1499
|
+
var OpenAIEmbeddingsProviders = [
|
|
1500
|
+
AiProvider.OpenAI,
|
|
1501
|
+
AiProvider.Azure,
|
|
1502
|
+
AiProvider.DeepSeek
|
|
1503
|
+
];
|
|
1504
|
+
var OllamaEmbeddingsProviders = [
|
|
1505
|
+
AiProvider.Ollama
|
|
1506
|
+
];
|
|
1507
|
+
var ChatMessageTypeEnum;
|
|
1508
|
+
(function(ChatMessageTypeEnum) {
|
|
1509
|
+
ChatMessageTypeEnum["MESSAGE"] = "message";
|
|
1510
|
+
ChatMessageTypeEnum["EVENT"] = "event";
|
|
1511
|
+
})(ChatMessageTypeEnum || (ChatMessageTypeEnum = {}));
|
|
1512
|
+
var ChatMessageEventTypeEnum;
|
|
1513
|
+
(function(ChatMessageEventTypeEnum) {
|
|
1514
|
+
ChatMessageEventTypeEnum["ON_CONVERSATION_START"] = "on_conversation_start";
|
|
1515
|
+
ChatMessageEventTypeEnum["ON_CONVERSATION_END"] = "on_conversation_end";
|
|
1516
|
+
ChatMessageEventTypeEnum["ON_MESSAGE_START"] = "on_message_start";
|
|
1517
|
+
ChatMessageEventTypeEnum["ON_MESSAGE_END"] = "on_message_end";
|
|
1518
|
+
ChatMessageEventTypeEnum["ON_TOOL_START"] = "on_tool_start";
|
|
1519
|
+
ChatMessageEventTypeEnum["ON_TOOL_END"] = "on_tool_end";
|
|
1520
|
+
ChatMessageEventTypeEnum["ON_TOOL_ERROR"] = "on_tool_error";
|
|
1521
|
+
ChatMessageEventTypeEnum["ON_TOOL_MESSAGE"] = "on_tool_message";
|
|
1522
|
+
ChatMessageEventTypeEnum["ON_AGENT_START"] = "on_agent_start";
|
|
1523
|
+
ChatMessageEventTypeEnum["ON_AGENT_END"] = "on_agent_end";
|
|
1524
|
+
ChatMessageEventTypeEnum["ON_RETRIEVER_START"] = "on_retriever_start";
|
|
1525
|
+
ChatMessageEventTypeEnum["ON_RETRIEVER_END"] = "on_retriever_end";
|
|
1526
|
+
ChatMessageEventTypeEnum["ON_RETRIEVER_ERROR"] = "on_retriever_error";
|
|
1527
|
+
ChatMessageEventTypeEnum["ON_INTERRUPT"] = "on_interrupt";
|
|
1528
|
+
ChatMessageEventTypeEnum["ON_ERROR"] = "on_error";
|
|
1529
|
+
ChatMessageEventTypeEnum["ON_CHAT_EVENT"] = "on_chat_event";
|
|
1530
|
+
ChatMessageEventTypeEnum["ON_CLIENT_EFFECT"] = "on_client_effect";
|
|
1531
|
+
})(ChatMessageEventTypeEnum || (ChatMessageEventTypeEnum = {}));
|
|
1532
|
+
var ChatMessageStepCategory;
|
|
1533
|
+
(function(ChatMessageStepCategory) {
|
|
1534
|
+
ChatMessageStepCategory["List"] = "list";
|
|
1535
|
+
ChatMessageStepCategory["WebSearch"] = "web_search";
|
|
1536
|
+
ChatMessageStepCategory["Files"] = "files";
|
|
1537
|
+
ChatMessageStepCategory["File"] = "file";
|
|
1538
|
+
ChatMessageStepCategory["Program"] = "program";
|
|
1539
|
+
ChatMessageStepCategory["Iframe"] = "iframe";
|
|
1540
|
+
ChatMessageStepCategory["Memory"] = "memory";
|
|
1541
|
+
ChatMessageStepCategory["Tasks"] = "tasks";
|
|
1542
|
+
ChatMessageStepCategory["Knowledges"] = "knowledges";
|
|
1543
|
+
})(ChatMessageStepCategory || (ChatMessageStepCategory = {}));
|
|
1544
|
+
|
|
1341
1545
|
function _define_property$9(obj, key, value) {
|
|
1342
1546
|
if (key in obj) {
|
|
1343
1547
|
Object.defineProperty(obj, key, {
|
|
@@ -1852,84 +2056,6 @@ var PriceType;
|
|
|
1852
2056
|
PriceType["OUTPUT"] = "output";
|
|
1853
2057
|
})(PriceType || (PriceType = {}));
|
|
1854
2058
|
|
|
1855
|
-
/**
|
|
1856
|
-
* Business roles for AI copilot (commands or contexts)
|
|
1857
|
-
*/ var AiBusinessRole;
|
|
1858
|
-
(function(AiBusinessRole) {
|
|
1859
|
-
AiBusinessRole["FinanceBP"] = "finance_bp";
|
|
1860
|
-
AiBusinessRole["SupplyChainExpert"] = "supply_chain_expert";
|
|
1861
|
-
})(AiBusinessRole || (AiBusinessRole = {}));
|
|
1862
|
-
/**
|
|
1863
|
-
* Providers for LLMs
|
|
1864
|
-
*
|
|
1865
|
-
* - https://js.langchain.com/docs/integrations/chat/
|
|
1866
|
-
*/ var AiProvider;
|
|
1867
|
-
(function(AiProvider) {
|
|
1868
|
-
/**
|
|
1869
|
-
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1870
|
-
*/ AiProvider["OpenAI"] = "openai";
|
|
1871
|
-
/**
|
|
1872
|
-
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1873
|
-
*/ AiProvider["Azure"] = "azure";
|
|
1874
|
-
// DashScope = 'dashscope',
|
|
1875
|
-
/**
|
|
1876
|
-
* - https://ollama.com/
|
|
1877
|
-
* - https://js.langchain.com/docs/integrations/chat/ollama/
|
|
1878
|
-
*/ AiProvider["Ollama"] = "ollama";
|
|
1879
|
-
/**
|
|
1880
|
-
* - https://www.deepseek.com/zh
|
|
1881
|
-
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1882
|
-
*/ AiProvider["DeepSeek"] = "deepseek";
|
|
1883
|
-
/**
|
|
1884
|
-
* - https://docs.anthropic.com/en/home
|
|
1885
|
-
* - https://js.langchain.com/docs/integrations/chat/anthropic/
|
|
1886
|
-
*/ AiProvider["Anthropic"] = "anthropic";
|
|
1887
|
-
/**
|
|
1888
|
-
* - https://www.aliyun.com/product/bailian
|
|
1889
|
-
* - https://js.langchain.com/docs/integrations/chat/alibaba_tongyi/
|
|
1890
|
-
*/ AiProvider["AlibabaTongyi"] = "alibaba_tongyi";
|
|
1891
|
-
/**
|
|
1892
|
-
* - https://open.bigmodel.cn/
|
|
1893
|
-
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1894
|
-
*/ AiProvider["Zhipu"] = "zhipu";
|
|
1895
|
-
/**
|
|
1896
|
-
* - https://qianfan.cloud.baidu.com/
|
|
1897
|
-
* - https://js.langchain.com/docs/integrations/chat/baidu_qianfan/
|
|
1898
|
-
*/ AiProvider["BaiduQianfan"] = "baidu_qianfan";
|
|
1899
|
-
/**
|
|
1900
|
-
* - https://www.together.ai/
|
|
1901
|
-
* - https://js.langchain.com/docs/integrations/chat/togetherai/
|
|
1902
|
-
*/ AiProvider["Together"] = "together";
|
|
1903
|
-
/**
|
|
1904
|
-
* - https://platform.moonshot.cn/console
|
|
1905
|
-
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1906
|
-
*/ AiProvider["Moonshot"] = "moonshot";
|
|
1907
|
-
/**
|
|
1908
|
-
* - https://groq.com/
|
|
1909
|
-
* - https://js.langchain.com/docs/integrations/chat/openai/
|
|
1910
|
-
*/ AiProvider["Groq"] = "groq";
|
|
1911
|
-
/**
|
|
1912
|
-
* - https://mistral.ai/
|
|
1913
|
-
*
|
|
1914
|
-
*/ AiProvider["Mistral"] = "mistral";
|
|
1915
|
-
/**
|
|
1916
|
-
* - https://cohere.com/
|
|
1917
|
-
*/ AiProvider["Cohere"] = "cohere";
|
|
1918
|
-
})(AiProvider || (AiProvider = {}));
|
|
1919
|
-
var AiProtocol;
|
|
1920
|
-
(function(AiProtocol) {
|
|
1921
|
-
AiProtocol["OpenAI"] = "openai";
|
|
1922
|
-
AiProtocol["Others"] = "others";
|
|
1923
|
-
})(AiProtocol || (AiProtocol = {}));
|
|
1924
|
-
var OpenAIEmbeddingsProviders = [
|
|
1925
|
-
AiProvider.OpenAI,
|
|
1926
|
-
AiProvider.Azure,
|
|
1927
|
-
AiProvider.DeepSeek
|
|
1928
|
-
];
|
|
1929
|
-
var OllamaEmbeddingsProviders = [
|
|
1930
|
-
AiProvider.Ollama
|
|
1931
|
-
];
|
|
1932
|
-
|
|
1933
2059
|
/**
|
|
1934
2060
|
* @deprecated use ChatMessageEventTypeEnum
|
|
1935
2061
|
*/ var ChatGatewayEvent;
|
|
@@ -1988,6 +2114,7 @@ var AiFeatureEnum;
|
|
|
1988
2114
|
AiFeatureEnum["FEATURE_XPERT_CLAWXPERT"] = "FEATURE_XPERT_CLAWXPERT";
|
|
1989
2115
|
AiFeatureEnum["FEATURE_XPERT_CODEXPERT"] = "FEATURE_XPERT_CODEXPERT";
|
|
1990
2116
|
AiFeatureEnum["FEATURE_XPERT_DEEP_RESEARCH"] = "FEATURE_XPERT_DEEP_RESEARCH";
|
|
2117
|
+
AiFeatureEnum["FEATURE_XPERT_DATA_ONTOLOGY"] = "FEATURE_XPERT_DATA_ONTOLOGY";
|
|
1991
2118
|
})(AiFeatureEnum || (AiFeatureEnum = {}));
|
|
1992
2119
|
|
|
1993
2120
|
var VectorTypeEnum;
|
|
@@ -2439,6 +2566,11 @@ var STATE_SYS_VOLUME = "volume";
|
|
|
2439
2566
|
/**
|
|
2440
2567
|
* URL for workspace files in sandbox environment
|
|
2441
2568
|
*/ var STATE_SYS_WORKSPACE_URL = "workspace_url";
|
|
2569
|
+
var STATE_SYS_WORKSPACE_ROOT = "workspace_root";
|
|
2570
|
+
var STATE_SYS_SHARED_WORKSPACE_PATH = "shared_workspace_path";
|
|
2571
|
+
var STATE_SYS_AGENT_WORKSPACE_PATH = "agent_workspace_path";
|
|
2572
|
+
var STATE_SYS_SESSION_WORKSPACE_PATH = "session_workspace_path";
|
|
2573
|
+
var STATE_SYS_MEMORY_WORKSPACE_PATH = "memory_workspace_path";
|
|
2442
2574
|
/**
|
|
2443
2575
|
* Current runtime thread id
|
|
2444
2576
|
*/ var STATE_SYS_THREAD_ID = "thread_id";
|
|
@@ -3220,6 +3352,49 @@ function omitXpertRelations(xpert) {
|
|
|
3220
3352
|
var _ref;
|
|
3221
3353
|
return (_ref = isDraft ? (_xpert_draft = xpert.draft) === null || _xpert_draft === void 0 ? void 0 : _xpert_draft.team : xpert) !== null && _ref !== void 0 ? _ref : xpert;
|
|
3222
3354
|
}
|
|
3355
|
+
function resolveRuntimeXpert(xpert, isDraft) {
|
|
3356
|
+
var _draft_team, _draft_team1, _draft_team2, _draft_team3, _draft_team4;
|
|
3357
|
+
if (!isDraft || !xpert.draft) {
|
|
3358
|
+
return xpert;
|
|
3359
|
+
}
|
|
3360
|
+
var draft = xpert.draft;
|
|
3361
|
+
var graph = resolveDraftRuntimeGraph(xpert, draft);
|
|
3362
|
+
var agent = resolveDraftPrimaryAgent(xpert, draft, graph);
|
|
3363
|
+
var _draft_team5, _draft_team_workspaceId, _draft_team_agentConfig, _draft_team_commandProfile, _draft_team_features, _draft_team_options;
|
|
3364
|
+
return _object_spread_props$3(_object_spread$3({}, xpert, (_draft_team5 = draft.team) !== null && _draft_team5 !== void 0 ? _draft_team5 : {}), {
|
|
3365
|
+
id: xpert.id,
|
|
3366
|
+
tenantId: xpert.tenantId,
|
|
3367
|
+
organizationId: xpert.organizationId,
|
|
3368
|
+
workspaceId: (_draft_team_workspaceId = (_draft_team = draft.team) === null || _draft_team === void 0 ? void 0 : _draft_team.workspaceId) !== null && _draft_team_workspaceId !== void 0 ? _draft_team_workspaceId : xpert.workspaceId,
|
|
3369
|
+
draft: xpert.draft,
|
|
3370
|
+
graph: graph,
|
|
3371
|
+
agent: agent,
|
|
3372
|
+
agentConfig: (_draft_team_agentConfig = (_draft_team1 = draft.team) === null || _draft_team1 === void 0 ? void 0 : _draft_team1.agentConfig) !== null && _draft_team_agentConfig !== void 0 ? _draft_team_agentConfig : xpert.agentConfig,
|
|
3373
|
+
commandProfile: (_draft_team_commandProfile = (_draft_team2 = draft.team) === null || _draft_team2 === void 0 ? void 0 : _draft_team2.commandProfile) !== null && _draft_team_commandProfile !== void 0 ? _draft_team_commandProfile : xpert.commandProfile,
|
|
3374
|
+
features: (_draft_team_features = (_draft_team3 = draft.team) === null || _draft_team3 === void 0 ? void 0 : _draft_team3.features) !== null && _draft_team_features !== void 0 ? _draft_team_features : xpert.features,
|
|
3375
|
+
options: (_draft_team_options = (_draft_team4 = draft.team) === null || _draft_team4 === void 0 ? void 0 : _draft_team4.options) !== null && _draft_team_options !== void 0 ? _draft_team_options : xpert.options
|
|
3376
|
+
});
|
|
3377
|
+
}
|
|
3378
|
+
function resolveDraftRuntimeGraph(xpert, draft) {
|
|
3379
|
+
var _xpert_graph, _xpert_graph1;
|
|
3380
|
+
var _draft_nodes, _ref, _draft_connections, _ref1;
|
|
3381
|
+
return {
|
|
3382
|
+
nodes: (_ref = (_draft_nodes = draft.nodes) !== null && _draft_nodes !== void 0 ? _draft_nodes : (_xpert_graph = xpert.graph) === null || _xpert_graph === void 0 ? void 0 : _xpert_graph.nodes) !== null && _ref !== void 0 ? _ref : [],
|
|
3383
|
+
connections: (_ref1 = (_draft_connections = draft.connections) !== null && _draft_connections !== void 0 ? _draft_connections : (_xpert_graph1 = xpert.graph) === null || _xpert_graph1 === void 0 ? void 0 : _xpert_graph1.connections) !== null && _ref1 !== void 0 ? _ref1 : []
|
|
3384
|
+
};
|
|
3385
|
+
}
|
|
3386
|
+
function resolveDraftPrimaryAgent(xpert, draft, graph) {
|
|
3387
|
+
var _draft_team, _xpert_agent;
|
|
3388
|
+
var draftAgent = (_draft_team = draft.team) === null || _draft_team === void 0 ? void 0 : _draft_team.agent;
|
|
3389
|
+
var _draftAgent_key;
|
|
3390
|
+
var targetKey = (_draftAgent_key = draftAgent === null || draftAgent === void 0 ? void 0 : draftAgent.key) !== null && _draftAgent_key !== void 0 ? _draftAgent_key : (_xpert_agent = xpert.agent) === null || _xpert_agent === void 0 ? void 0 : _xpert_agent.key;
|
|
3391
|
+
var agentNode = targetKey ? graph.nodes.find(function(node) {
|
|
3392
|
+
var _node_entity;
|
|
3393
|
+
return node.type === "agent" && (node.key === targetKey || ((_node_entity = node.entity) === null || _node_entity === void 0 ? void 0 : _node_entity.key) === targetKey);
|
|
3394
|
+
}) : null;
|
|
3395
|
+
var _agentNode_entity, _ref;
|
|
3396
|
+
return (_ref = (_agentNode_entity = agentNode === null || agentNode === void 0 ? void 0 : agentNode.entity) !== null && _agentNode_entity !== void 0 ? _agentNode_entity : draftAgent) !== null && _ref !== void 0 ? _ref : xpert.agent;
|
|
3397
|
+
}
|
|
3223
3398
|
function xpertLabel(agent) {
|
|
3224
3399
|
return agent.title || agent.name;
|
|
3225
3400
|
}
|
|
@@ -3761,6 +3936,23 @@ function getChunkNodeId(document) {
|
|
|
3761
3936
|
return leaves;
|
|
3762
3937
|
}
|
|
3763
3938
|
|
|
3939
|
+
var KnowledgeGraphStatus;
|
|
3940
|
+
(function(KnowledgeGraphStatus) {
|
|
3941
|
+
KnowledgeGraphStatus["DISABLED"] = "disabled";
|
|
3942
|
+
KnowledgeGraphStatus["INDEXING"] = "indexing";
|
|
3943
|
+
KnowledgeGraphStatus["READY"] = "ready";
|
|
3944
|
+
KnowledgeGraphStatus["FAILED"] = "failed";
|
|
3945
|
+
KnowledgeGraphStatus["REBUILD_REQUIRED"] = "rebuild_required";
|
|
3946
|
+
})(KnowledgeGraphStatus || (KnowledgeGraphStatus = {}));
|
|
3947
|
+
var KnowledgeGraphIndexJobStatus;
|
|
3948
|
+
(function(KnowledgeGraphIndexJobStatus) {
|
|
3949
|
+
KnowledgeGraphIndexJobStatus["QUEUED"] = "queued";
|
|
3950
|
+
KnowledgeGraphIndexJobStatus["RUNNING"] = "running";
|
|
3951
|
+
KnowledgeGraphIndexJobStatus["SUCCESS"] = "success";
|
|
3952
|
+
KnowledgeGraphIndexJobStatus["FAILED"] = "failed";
|
|
3953
|
+
KnowledgeGraphIndexJobStatus["CANCELLED"] = "cancelled";
|
|
3954
|
+
})(KnowledgeGraphIndexJobStatus || (KnowledgeGraphIndexJobStatus = {}));
|
|
3955
|
+
|
|
3764
3956
|
// Skill types
|
|
3765
3957
|
var WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER = "workspace-public";
|
|
3766
3958
|
var WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME = "Workspace Shared Skills";
|
|
@@ -4452,43 +4644,6 @@ function filterMessageText(content) {
|
|
|
4452
4644
|
}
|
|
4453
4645
|
|
|
4454
4646
|
var STATE_VARIABLE_HUMAN = "human";
|
|
4455
|
-
var ChatMessageTypeEnum;
|
|
4456
|
-
(function(ChatMessageTypeEnum) {
|
|
4457
|
-
ChatMessageTypeEnum["MESSAGE"] = "message";
|
|
4458
|
-
ChatMessageTypeEnum["EVENT"] = "event";
|
|
4459
|
-
})(ChatMessageTypeEnum || (ChatMessageTypeEnum = {}));
|
|
4460
|
-
var ChatMessageEventTypeEnum;
|
|
4461
|
-
(function(ChatMessageEventTypeEnum) {
|
|
4462
|
-
ChatMessageEventTypeEnum["ON_CONVERSATION_START"] = "on_conversation_start";
|
|
4463
|
-
ChatMessageEventTypeEnum["ON_CONVERSATION_END"] = "on_conversation_end";
|
|
4464
|
-
ChatMessageEventTypeEnum["ON_MESSAGE_START"] = "on_message_start";
|
|
4465
|
-
ChatMessageEventTypeEnum["ON_MESSAGE_END"] = "on_message_end";
|
|
4466
|
-
ChatMessageEventTypeEnum["ON_TOOL_START"] = "on_tool_start";
|
|
4467
|
-
ChatMessageEventTypeEnum["ON_TOOL_END"] = "on_tool_end";
|
|
4468
|
-
ChatMessageEventTypeEnum["ON_TOOL_ERROR"] = "on_tool_error";
|
|
4469
|
-
ChatMessageEventTypeEnum["ON_TOOL_MESSAGE"] = "on_tool_message";
|
|
4470
|
-
ChatMessageEventTypeEnum["ON_AGENT_START"] = "on_agent_start";
|
|
4471
|
-
ChatMessageEventTypeEnum["ON_AGENT_END"] = "on_agent_end";
|
|
4472
|
-
ChatMessageEventTypeEnum["ON_RETRIEVER_START"] = "on_retriever_start";
|
|
4473
|
-
ChatMessageEventTypeEnum["ON_RETRIEVER_END"] = "on_retriever_end";
|
|
4474
|
-
ChatMessageEventTypeEnum["ON_RETRIEVER_ERROR"] = "on_retriever_error";
|
|
4475
|
-
ChatMessageEventTypeEnum["ON_INTERRUPT"] = "on_interrupt";
|
|
4476
|
-
ChatMessageEventTypeEnum["ON_ERROR"] = "on_error";
|
|
4477
|
-
ChatMessageEventTypeEnum["ON_CHAT_EVENT"] = "on_chat_event";
|
|
4478
|
-
ChatMessageEventTypeEnum["ON_CLIENT_EFFECT"] = "on_client_effect";
|
|
4479
|
-
})(ChatMessageEventTypeEnum || (ChatMessageEventTypeEnum = {}));
|
|
4480
|
-
var ChatMessageStepCategory;
|
|
4481
|
-
(function(ChatMessageStepCategory) {
|
|
4482
|
-
ChatMessageStepCategory["List"] = "list";
|
|
4483
|
-
ChatMessageStepCategory["WebSearch"] = "web_search";
|
|
4484
|
-
ChatMessageStepCategory["Files"] = "files";
|
|
4485
|
-
ChatMessageStepCategory["File"] = "file";
|
|
4486
|
-
ChatMessageStepCategory["Program"] = "program";
|
|
4487
|
-
ChatMessageStepCategory["Iframe"] = "iframe";
|
|
4488
|
-
ChatMessageStepCategory["Memory"] = "memory";
|
|
4489
|
-
ChatMessageStepCategory["Tasks"] = "tasks";
|
|
4490
|
-
ChatMessageStepCategory["Knowledges"] = "knowledges";
|
|
4491
|
-
})(ChatMessageStepCategory || (ChatMessageStepCategory = {}));
|
|
4492
4647
|
|
|
4493
4648
|
var PermissionsEnum;
|
|
4494
4649
|
(function(PermissionsEnum) {
|
|
@@ -5209,14 +5364,32 @@ function _unsupported_iterable_to_array$1(o, minLen) {
|
|
|
5209
5364
|
* @param variable
|
|
5210
5365
|
* @returns
|
|
5211
5366
|
*/ function getVariableSchema(variables, variable) {
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5367
|
+
if (!(variables === null || variables === void 0 ? void 0 : variables.length) || !variable) {
|
|
5368
|
+
return {
|
|
5369
|
+
group: undefined,
|
|
5370
|
+
variable: undefined
|
|
5371
|
+
};
|
|
5372
|
+
}
|
|
5373
|
+
var _variable_split = _to_array(variable.split(".")), groupName = _variable_split[0], rest = _variable_split.slice(1);
|
|
5374
|
+
if (rest.length) {
|
|
5375
|
+
var grouped = findVariableInGroup(variables, groupName, rest.join("."));
|
|
5376
|
+
if (grouped.variable) {
|
|
5377
|
+
return grouped;
|
|
5378
|
+
}
|
|
5379
|
+
}
|
|
5380
|
+
var ungrouped = findVariableInGroup(variables, "", variable);
|
|
5381
|
+
if (ungrouped.variable) {
|
|
5382
|
+
return ungrouped;
|
|
5383
|
+
}
|
|
5384
|
+
return rest.length ? findVariableInGroup(variables, groupName, rest.join(".")) : ungrouped;
|
|
5385
|
+
}
|
|
5386
|
+
function findVariableInGroup(variables, groupName, variableName) {
|
|
5387
|
+
var group = variables.find(function(item) {
|
|
5388
|
+
var _item_group, _item_group1;
|
|
5389
|
+
return groupName ? ((_item_group = item.group) === null || _item_group === void 0 ? void 0 : _item_group.name) === groupName : !((_item_group1 = item.group) === null || _item_group1 === void 0 ? void 0 : _item_group1.name);
|
|
5217
5390
|
});
|
|
5218
|
-
var selectVariable = group === null || group === void 0 ? void 0 : group.variables.find(function(
|
|
5219
|
-
return
|
|
5391
|
+
var selectVariable = group === null || group === void 0 ? void 0 : group.variables.find(function(item) {
|
|
5392
|
+
return item.name === variableName;
|
|
5220
5393
|
});
|
|
5221
5394
|
return {
|
|
5222
5395
|
group: group,
|
|
@@ -5417,4 +5590,4 @@ var PLUGIN_LOAD_STATUS = {
|
|
|
5417
5590
|
FAILED: "failed"
|
|
5418
5591
|
};
|
|
5419
5592
|
|
|
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 };
|
|
5593
|
+
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, KnowledgeGraphIndexJobStatus, KnowledgeGraphStatus, 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_AGENT_WORKSPACE_PATH, STATE_SYS_MEMORY_WORKSPACE_PATH, STATE_SYS_SESSION_WORKSPACE_PATH, STATE_SYS_SHARED_WORKSPACE_PATH, STATE_SYS_THREAD_ID, STATE_SYS_VOLUME, STATE_SYS_WORKSPACE_PATH, STATE_SYS_WORKSPACE_ROOT, STATE_SYS_WORKSPACE_URL, STATE_VARIABLE_FILES, STATE_VARIABLE_HUMAN, STATE_VARIABLE_INPUT, STATE_VARIABLE_SYS, STATE_VARIABLE_TITLE_CHANNEL, SandboxManagedServiceErrorCode, SandboxTerminalClientEvent, SandboxTerminalClosedReason, SandboxTerminalErrorCode, SandboxTerminalServerEvent, ScheduleTaskStatus, SecretTokenBindingType, 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, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveI18nText, resolveMessageAppendContext, resolveRuntimeXpert, 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.8",
|
|
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": "
|
|
22
|
+
"@xpert-ai/chatkit-types": "~0.3.8"
|
|
23
23
|
},
|
|
24
24
|
"types": "./index.d.ts"
|
|
25
25
|
}
|
package/src/agent/graph.d.ts
CHANGED
|
@@ -24,6 +24,11 @@ export declare const STATE_SYS_WORKSPACE_PATH = "workspace_path";
|
|
|
24
24
|
* URL for workspace files in sandbox environment
|
|
25
25
|
*/
|
|
26
26
|
export declare const STATE_SYS_WORKSPACE_URL = "workspace_url";
|
|
27
|
+
export declare const STATE_SYS_WORKSPACE_ROOT = "workspace_root";
|
|
28
|
+
export declare const STATE_SYS_SHARED_WORKSPACE_PATH = "shared_workspace_path";
|
|
29
|
+
export declare const STATE_SYS_AGENT_WORKSPACE_PATH = "agent_workspace_path";
|
|
30
|
+
export declare const STATE_SYS_SESSION_WORKSPACE_PATH = "session_workspace_path";
|
|
31
|
+
export declare const STATE_SYS_MEMORY_WORKSPACE_PATH = "memory_workspace_path";
|
|
27
32
|
/**
|
|
28
33
|
* Current runtime thread id
|
|
29
34
|
*/
|
|
@@ -182,15 +187,15 @@ export declare function getWorkflowTriggers(graph: TXpertGraph, from: string): (
|
|
|
182
187
|
connections?: import("../ai/xpert.model").TXpertTeamConnection[];
|
|
183
188
|
expanded?: boolean;
|
|
184
189
|
}) | (import("../ai/xpert.model").TXpertTeamNodeBase & {
|
|
185
|
-
type: "
|
|
190
|
+
type: "knowledge";
|
|
186
191
|
} & {
|
|
187
|
-
entity: import("
|
|
192
|
+
entity: import("..").IKnowledgebase;
|
|
188
193
|
}) | (import("../ai/xpert.model").TXpertTeamNodeBase & {
|
|
189
194
|
type: "agent";
|
|
190
195
|
} & {
|
|
191
196
|
entity: IXpertAgent;
|
|
192
197
|
}) | (import("../ai/xpert.model").TXpertTeamNodeBase & {
|
|
193
|
-
type: "
|
|
198
|
+
type: "workflow";
|
|
194
199
|
} & {
|
|
195
|
-
entity: import("
|
|
200
|
+
entity: import("../ai/xpert-workflow.model").IWorkflowNode;
|
|
196
201
|
}))[];
|
package/src/agent/variables.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TWorkflowVarGroup } from
|
|
2
|
-
import { TXpertParameter } from
|
|
1
|
+
import { TWorkflowVarGroup } from '../ai/xpert-workflow.model';
|
|
2
|
+
import { TXpertParameter } from '../ai/xpert.model';
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
* Returns the variable schema for a given variable name.
|
|
@@ -9,7 +9,7 @@ import { TXpertParameter } from "../ai/xpert.model";
|
|
|
9
9
|
* @param variable
|
|
10
10
|
* @returns
|
|
11
11
|
*/
|
|
12
|
-
export declare function getVariableSchema(variables: TWorkflowVarGroup[], variable: string): {
|
|
12
|
+
export declare function getVariableSchema(variables: TWorkflowVarGroup[] | null | undefined, variable: string | null | undefined): {
|
|
13
13
|
group: TWorkflowVarGroup;
|
|
14
14
|
variable: import("../ai/xpert.model").TStateVariable;
|
|
15
15
|
};
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
2
2
|
export interface IAiProvider extends IBasePerTenantAndOrganizationEntityModel {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Provider identifier, such as 'openai'
|
|
5
5
|
*/
|
|
6
6
|
name: string;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Provider display name
|
|
9
9
|
*/
|
|
10
10
|
label: string;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Provider description
|
|
13
13
|
*/
|
|
14
14
|
description: string;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Provider small icon
|
|
17
17
|
*/
|
|
18
18
|
iconSmall: string;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Provider large icon
|
|
21
21
|
*/
|
|
22
22
|
iconLarge: string;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Background color
|
|
25
25
|
*/
|
|
26
26
|
background: string;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Help information title
|
|
29
29
|
*/
|
|
30
30
|
helpTitle: string;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Help information URL
|
|
33
33
|
*/
|
|
34
34
|
helpUrl: string;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Supported model types
|
|
37
37
|
*/
|
|
38
38
|
supportedModelTypes: string[];
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Configuration methods
|
|
41
41
|
*/
|
|
42
42
|
configurateMethods: string[];
|
|
43
43
|
}
|