@xpert-ai/contracts 3.9.5 → 3.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -2,6 +2,91 @@
2
2
 
3
3
  var ShortUniqueId = require('short-unique-id');
4
4
 
5
+ function resolveI18nText(value) {
6
+ var language = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
7
+ if (typeof value === "string") {
8
+ var trimmed = value.trim();
9
+ return trimmed || null;
10
+ }
11
+ if (!value || typeof value !== "object") {
12
+ return null;
13
+ }
14
+ var localized = value;
15
+ var normalizedLanguage = language.trim();
16
+ var underscoredLanguage = normalizedLanguage.replace(/-/g, "_");
17
+ var languagePrefix = normalizedLanguage.split(/[-_]/)[0];
18
+ var preferredKeys = normalizedLanguage.toLowerCase().startsWith("zh") ? [
19
+ normalizedLanguage,
20
+ underscoredLanguage,
21
+ "zh_Hans",
22
+ "zh-Hans",
23
+ "zh_CN",
24
+ "zh-CN",
25
+ "zh",
26
+ "en_US",
27
+ "en-US",
28
+ "en"
29
+ ] : [
30
+ normalizedLanguage,
31
+ underscoredLanguage,
32
+ "en_US",
33
+ "en-US",
34
+ "en",
35
+ languagePrefix,
36
+ "zh_Hans",
37
+ "zh-Hans",
38
+ "zh_CN",
39
+ "zh-CN",
40
+ "zh"
41
+ ];
42
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
43
+ try {
44
+ for(var _iterator = preferredKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
45
+ var key = _step.value;
46
+ var candidate = localized[key];
47
+ if (typeof candidate === "string" && candidate.trim()) {
48
+ return candidate.trim();
49
+ }
50
+ }
51
+ } catch (err) {
52
+ _didIteratorError = true;
53
+ _iteratorError = err;
54
+ } finally{
55
+ try {
56
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
57
+ _iterator.return();
58
+ }
59
+ } finally{
60
+ if (_didIteratorError) {
61
+ throw _iteratorError;
62
+ }
63
+ }
64
+ }
65
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
66
+ try {
67
+ for(var _iterator1 = Object.values(localized)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
68
+ var candidate1 = _step1.value;
69
+ if (typeof candidate1 === "string" && candidate1.trim()) {
70
+ return candidate1.trim();
71
+ }
72
+ }
73
+ } catch (err) {
74
+ _didIteratorError1 = true;
75
+ _iteratorError1 = err;
76
+ } finally{
77
+ try {
78
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
79
+ _iterator1.return();
80
+ }
81
+ } finally{
82
+ if (_didIteratorError1) {
83
+ throw _iteratorError1;
84
+ }
85
+ }
86
+ }
87
+ return null;
88
+ }
89
+
5
90
  function _array_like_to_array$7(arr, len) {
6
91
  if (len == null || len > arr.length) len = arr.length;
7
92
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -1028,7 +1113,9 @@ exports.AnalyticsFeatures = void 0;
1028
1113
  AnalyticsFeatures["FEATURE_INDICATOR"] = "FEATURE_INDICATOR";
1029
1114
  AnalyticsFeatures["FEATURE_INDICATOR_MARKET"] = "FEATURE_INDICATOR_MARKET";
1030
1115
  AnalyticsFeatures["FEATURE_INDICATOR_REGISTER"] = "FEATURE_INDICATOR_REGISTER";
1031
- AnalyticsFeatures["FEATURE_INDICATOR_APP"] = "FEATURE_INDICATOR_APP";
1116
+ /**
1117
+ * @deprecated Indicator App is no longer exposed in the system menu.
1118
+ */ AnalyticsFeatures["FEATURE_INDICATOR_APP"] = "FEATURE_INDICATOR_APP";
1032
1119
  AnalyticsFeatures["FEATURE_STORY"] = "FEATURE_STORY";
1033
1120
  AnalyticsFeatures["FEATURE_STORY_CREATION"] = "FEATURE_STORY_CREATION";
1034
1121
  AnalyticsFeatures["FEATURE_STORY_VIEWER"] = "FEATURE_STORY_VIEWER";
@@ -1143,7 +1230,9 @@ exports.AnalyticsPermissionsEnum = void 0;
1143
1230
  AnalyticsPermissionsEnum["BUSINESS_AREA_EDIT"] = "BUSINESS_AREA_EDIT";
1144
1231
  // Indicator
1145
1232
  AnalyticsPermissionsEnum["INDICATOR_VIEW"] = "INDICATOR_VIEW";
1146
- AnalyticsPermissionsEnum["INDICATOR_MARTKET_VIEW"] = "INDICATOR_MARTKET_VIEW";
1233
+ /**
1234
+ * @deprecated Indicator App is no longer exposed in the system menu.
1235
+ */ AnalyticsPermissionsEnum["INDICATOR_MARTKET_VIEW"] = "INDICATOR_MARTKET_VIEW";
1147
1236
  AnalyticsPermissionsEnum["INDICATOR_EDIT"] = "INDICATOR_EDIT";
1148
1237
  // Data Factory
1149
1238
  AnalyticsPermissionsEnum["DATA_FACTORY_VIEW"] = "DATA_FACTORY_VIEW";
@@ -1340,6 +1429,121 @@ exports.QueryStatusEnum = void 0;
1340
1429
  QueryStatusEnum["FAILED"] = "failed";
1341
1430
  })(exports.QueryStatusEnum || (exports.QueryStatusEnum = {}));
1342
1431
 
1432
+ /**
1433
+ * Business roles for AI copilot (commands or contexts)
1434
+ */ exports.AiBusinessRole = void 0;
1435
+ (function(AiBusinessRole) {
1436
+ AiBusinessRole["FinanceBP"] = "finance_bp";
1437
+ AiBusinessRole["SupplyChainExpert"] = "supply_chain_expert";
1438
+ })(exports.AiBusinessRole || (exports.AiBusinessRole = {}));
1439
+ /**
1440
+ * Providers for LLMs
1441
+ *
1442
+ * - https://js.langchain.com/docs/integrations/chat/
1443
+ */ exports.AiProvider = void 0;
1444
+ (function(AiProvider) {
1445
+ /**
1446
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1447
+ */ AiProvider["OpenAI"] = "openai";
1448
+ /**
1449
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1450
+ */ AiProvider["Azure"] = "azure";
1451
+ // DashScope = 'dashscope',
1452
+ /**
1453
+ * - https://ollama.com/
1454
+ * - https://js.langchain.com/docs/integrations/chat/ollama/
1455
+ */ AiProvider["Ollama"] = "ollama";
1456
+ /**
1457
+ * - https://www.deepseek.com/zh
1458
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1459
+ */ AiProvider["DeepSeek"] = "deepseek";
1460
+ /**
1461
+ * - https://docs.anthropic.com/en/home
1462
+ * - https://js.langchain.com/docs/integrations/chat/anthropic/
1463
+ */ AiProvider["Anthropic"] = "anthropic";
1464
+ /**
1465
+ * - https://www.aliyun.com/product/bailian
1466
+ * - https://js.langchain.com/docs/integrations/chat/alibaba_tongyi/
1467
+ */ AiProvider["AlibabaTongyi"] = "alibaba_tongyi";
1468
+ /**
1469
+ * - https://open.bigmodel.cn/
1470
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1471
+ */ AiProvider["Zhipu"] = "zhipu";
1472
+ /**
1473
+ * - https://qianfan.cloud.baidu.com/
1474
+ * - https://js.langchain.com/docs/integrations/chat/baidu_qianfan/
1475
+ */ AiProvider["BaiduQianfan"] = "baidu_qianfan";
1476
+ /**
1477
+ * - https://www.together.ai/
1478
+ * - https://js.langchain.com/docs/integrations/chat/togetherai/
1479
+ */ AiProvider["Together"] = "together";
1480
+ /**
1481
+ * - https://platform.moonshot.cn/console
1482
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1483
+ */ AiProvider["Moonshot"] = "moonshot";
1484
+ /**
1485
+ * - https://groq.com/
1486
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1487
+ */ AiProvider["Groq"] = "groq";
1488
+ /**
1489
+ * - https://mistral.ai/
1490
+ *
1491
+ */ AiProvider["Mistral"] = "mistral";
1492
+ /**
1493
+ * - https://cohere.com/
1494
+ */ AiProvider["Cohere"] = "cohere";
1495
+ })(exports.AiProvider || (exports.AiProvider = {}));
1496
+ exports.AiProtocol = void 0;
1497
+ (function(AiProtocol) {
1498
+ AiProtocol["OpenAI"] = "openai";
1499
+ AiProtocol["Others"] = "others";
1500
+ })(exports.AiProtocol || (exports.AiProtocol = {}));
1501
+ var OpenAIEmbeddingsProviders = [
1502
+ exports.AiProvider.OpenAI,
1503
+ exports.AiProvider.Azure,
1504
+ exports.AiProvider.DeepSeek
1505
+ ];
1506
+ var OllamaEmbeddingsProviders = [
1507
+ exports.AiProvider.Ollama
1508
+ ];
1509
+ exports.ChatMessageTypeEnum = void 0;
1510
+ (function(ChatMessageTypeEnum) {
1511
+ ChatMessageTypeEnum["MESSAGE"] = "message";
1512
+ ChatMessageTypeEnum["EVENT"] = "event";
1513
+ })(exports.ChatMessageTypeEnum || (exports.ChatMessageTypeEnum = {}));
1514
+ exports.ChatMessageEventTypeEnum = void 0;
1515
+ (function(ChatMessageEventTypeEnum) {
1516
+ ChatMessageEventTypeEnum["ON_CONVERSATION_START"] = "on_conversation_start";
1517
+ ChatMessageEventTypeEnum["ON_CONVERSATION_END"] = "on_conversation_end";
1518
+ ChatMessageEventTypeEnum["ON_MESSAGE_START"] = "on_message_start";
1519
+ ChatMessageEventTypeEnum["ON_MESSAGE_END"] = "on_message_end";
1520
+ ChatMessageEventTypeEnum["ON_TOOL_START"] = "on_tool_start";
1521
+ ChatMessageEventTypeEnum["ON_TOOL_END"] = "on_tool_end";
1522
+ ChatMessageEventTypeEnum["ON_TOOL_ERROR"] = "on_tool_error";
1523
+ ChatMessageEventTypeEnum["ON_TOOL_MESSAGE"] = "on_tool_message";
1524
+ ChatMessageEventTypeEnum["ON_AGENT_START"] = "on_agent_start";
1525
+ ChatMessageEventTypeEnum["ON_AGENT_END"] = "on_agent_end";
1526
+ ChatMessageEventTypeEnum["ON_RETRIEVER_START"] = "on_retriever_start";
1527
+ ChatMessageEventTypeEnum["ON_RETRIEVER_END"] = "on_retriever_end";
1528
+ ChatMessageEventTypeEnum["ON_RETRIEVER_ERROR"] = "on_retriever_error";
1529
+ ChatMessageEventTypeEnum["ON_INTERRUPT"] = "on_interrupt";
1530
+ ChatMessageEventTypeEnum["ON_ERROR"] = "on_error";
1531
+ ChatMessageEventTypeEnum["ON_CHAT_EVENT"] = "on_chat_event";
1532
+ ChatMessageEventTypeEnum["ON_CLIENT_EFFECT"] = "on_client_effect";
1533
+ })(exports.ChatMessageEventTypeEnum || (exports.ChatMessageEventTypeEnum = {}));
1534
+ exports.ChatMessageStepCategory = void 0;
1535
+ (function(ChatMessageStepCategory) {
1536
+ ChatMessageStepCategory["List"] = "list";
1537
+ ChatMessageStepCategory["WebSearch"] = "web_search";
1538
+ ChatMessageStepCategory["Files"] = "files";
1539
+ ChatMessageStepCategory["File"] = "file";
1540
+ ChatMessageStepCategory["Program"] = "program";
1541
+ ChatMessageStepCategory["Iframe"] = "iframe";
1542
+ ChatMessageStepCategory["Memory"] = "memory";
1543
+ ChatMessageStepCategory["Tasks"] = "tasks";
1544
+ ChatMessageStepCategory["Knowledges"] = "knowledges";
1545
+ })(exports.ChatMessageStepCategory || (exports.ChatMessageStepCategory = {}));
1546
+
1343
1547
  function _define_property$9(obj, key, value) {
1344
1548
  if (key in obj) {
1345
1549
  Object.defineProperty(obj, key, {
@@ -1854,84 +2058,6 @@ exports.PriceType = void 0;
1854
2058
  PriceType["OUTPUT"] = "output";
1855
2059
  })(exports.PriceType || (exports.PriceType = {}));
1856
2060
 
1857
- /**
1858
- * Business roles for AI copilot (commands or contexts)
1859
- */ exports.AiBusinessRole = void 0;
1860
- (function(AiBusinessRole) {
1861
- AiBusinessRole["FinanceBP"] = "finance_bp";
1862
- AiBusinessRole["SupplyChainExpert"] = "supply_chain_expert";
1863
- })(exports.AiBusinessRole || (exports.AiBusinessRole = {}));
1864
- /**
1865
- * Providers for LLMs
1866
- *
1867
- * - https://js.langchain.com/docs/integrations/chat/
1868
- */ exports.AiProvider = void 0;
1869
- (function(AiProvider) {
1870
- /**
1871
- * - https://js.langchain.com/docs/integrations/chat/openai/
1872
- */ AiProvider["OpenAI"] = "openai";
1873
- /**
1874
- * - https://js.langchain.com/docs/integrations/chat/openai/
1875
- */ AiProvider["Azure"] = "azure";
1876
- // DashScope = 'dashscope',
1877
- /**
1878
- * - https://ollama.com/
1879
- * - https://js.langchain.com/docs/integrations/chat/ollama/
1880
- */ AiProvider["Ollama"] = "ollama";
1881
- /**
1882
- * - https://www.deepseek.com/zh
1883
- * - https://js.langchain.com/docs/integrations/chat/openai/
1884
- */ AiProvider["DeepSeek"] = "deepseek";
1885
- /**
1886
- * - https://docs.anthropic.com/en/home
1887
- * - https://js.langchain.com/docs/integrations/chat/anthropic/
1888
- */ AiProvider["Anthropic"] = "anthropic";
1889
- /**
1890
- * - https://www.aliyun.com/product/bailian
1891
- * - https://js.langchain.com/docs/integrations/chat/alibaba_tongyi/
1892
- */ AiProvider["AlibabaTongyi"] = "alibaba_tongyi";
1893
- /**
1894
- * - https://open.bigmodel.cn/
1895
- * - https://js.langchain.com/docs/integrations/chat/openai/
1896
- */ AiProvider["Zhipu"] = "zhipu";
1897
- /**
1898
- * - https://qianfan.cloud.baidu.com/
1899
- * - https://js.langchain.com/docs/integrations/chat/baidu_qianfan/
1900
- */ AiProvider["BaiduQianfan"] = "baidu_qianfan";
1901
- /**
1902
- * - https://www.together.ai/
1903
- * - https://js.langchain.com/docs/integrations/chat/togetherai/
1904
- */ AiProvider["Together"] = "together";
1905
- /**
1906
- * - https://platform.moonshot.cn/console
1907
- * - https://js.langchain.com/docs/integrations/chat/openai/
1908
- */ AiProvider["Moonshot"] = "moonshot";
1909
- /**
1910
- * - https://groq.com/
1911
- * - https://js.langchain.com/docs/integrations/chat/openai/
1912
- */ AiProvider["Groq"] = "groq";
1913
- /**
1914
- * - https://mistral.ai/
1915
- *
1916
- */ AiProvider["Mistral"] = "mistral";
1917
- /**
1918
- * - https://cohere.com/
1919
- */ AiProvider["Cohere"] = "cohere";
1920
- })(exports.AiProvider || (exports.AiProvider = {}));
1921
- exports.AiProtocol = void 0;
1922
- (function(AiProtocol) {
1923
- AiProtocol["OpenAI"] = "openai";
1924
- AiProtocol["Others"] = "others";
1925
- })(exports.AiProtocol || (exports.AiProtocol = {}));
1926
- var OpenAIEmbeddingsProviders = [
1927
- exports.AiProvider.OpenAI,
1928
- exports.AiProvider.Azure,
1929
- exports.AiProvider.DeepSeek
1930
- ];
1931
- var OllamaEmbeddingsProviders = [
1932
- exports.AiProvider.Ollama
1933
- ];
1934
-
1935
2061
  /**
1936
2062
  * @deprecated use ChatMessageEventTypeEnum
1937
2063
  */ exports.ChatGatewayEvent = void 0;
@@ -1990,6 +2116,7 @@ exports.AiFeatureEnum = void 0;
1990
2116
  AiFeatureEnum["FEATURE_XPERT_CLAWXPERT"] = "FEATURE_XPERT_CLAWXPERT";
1991
2117
  AiFeatureEnum["FEATURE_XPERT_CODEXPERT"] = "FEATURE_XPERT_CODEXPERT";
1992
2118
  AiFeatureEnum["FEATURE_XPERT_DEEP_RESEARCH"] = "FEATURE_XPERT_DEEP_RESEARCH";
2119
+ AiFeatureEnum["FEATURE_XPERT_DATA_ONTOLOGY"] = "FEATURE_XPERT_DATA_ONTOLOGY";
1993
2120
  })(exports.AiFeatureEnum || (exports.AiFeatureEnum = {}));
1994
2121
 
1995
2122
  exports.VectorTypeEnum = void 0;
@@ -2441,6 +2568,11 @@ var STATE_SYS_VOLUME = "volume";
2441
2568
  /**
2442
2569
  * URL for workspace files in sandbox environment
2443
2570
  */ var STATE_SYS_WORKSPACE_URL = "workspace_url";
2571
+ var STATE_SYS_WORKSPACE_ROOT = "workspace_root";
2572
+ var STATE_SYS_SHARED_WORKSPACE_PATH = "shared_workspace_path";
2573
+ var STATE_SYS_AGENT_WORKSPACE_PATH = "agent_workspace_path";
2574
+ var STATE_SYS_SESSION_WORKSPACE_PATH = "session_workspace_path";
2575
+ var STATE_SYS_MEMORY_WORKSPACE_PATH = "memory_workspace_path";
2444
2576
  /**
2445
2577
  * Current runtime thread id
2446
2578
  */ var STATE_SYS_THREAD_ID = "thread_id";
@@ -4514,43 +4646,6 @@ function filterMessageText(content) {
4514
4646
  }
4515
4647
 
4516
4648
  var STATE_VARIABLE_HUMAN = "human";
4517
- exports.ChatMessageTypeEnum = void 0;
4518
- (function(ChatMessageTypeEnum) {
4519
- ChatMessageTypeEnum["MESSAGE"] = "message";
4520
- ChatMessageTypeEnum["EVENT"] = "event";
4521
- })(exports.ChatMessageTypeEnum || (exports.ChatMessageTypeEnum = {}));
4522
- exports.ChatMessageEventTypeEnum = void 0;
4523
- (function(ChatMessageEventTypeEnum) {
4524
- ChatMessageEventTypeEnum["ON_CONVERSATION_START"] = "on_conversation_start";
4525
- ChatMessageEventTypeEnum["ON_CONVERSATION_END"] = "on_conversation_end";
4526
- ChatMessageEventTypeEnum["ON_MESSAGE_START"] = "on_message_start";
4527
- ChatMessageEventTypeEnum["ON_MESSAGE_END"] = "on_message_end";
4528
- ChatMessageEventTypeEnum["ON_TOOL_START"] = "on_tool_start";
4529
- ChatMessageEventTypeEnum["ON_TOOL_END"] = "on_tool_end";
4530
- ChatMessageEventTypeEnum["ON_TOOL_ERROR"] = "on_tool_error";
4531
- ChatMessageEventTypeEnum["ON_TOOL_MESSAGE"] = "on_tool_message";
4532
- ChatMessageEventTypeEnum["ON_AGENT_START"] = "on_agent_start";
4533
- ChatMessageEventTypeEnum["ON_AGENT_END"] = "on_agent_end";
4534
- ChatMessageEventTypeEnum["ON_RETRIEVER_START"] = "on_retriever_start";
4535
- ChatMessageEventTypeEnum["ON_RETRIEVER_END"] = "on_retriever_end";
4536
- ChatMessageEventTypeEnum["ON_RETRIEVER_ERROR"] = "on_retriever_error";
4537
- ChatMessageEventTypeEnum["ON_INTERRUPT"] = "on_interrupt";
4538
- ChatMessageEventTypeEnum["ON_ERROR"] = "on_error";
4539
- ChatMessageEventTypeEnum["ON_CHAT_EVENT"] = "on_chat_event";
4540
- ChatMessageEventTypeEnum["ON_CLIENT_EFFECT"] = "on_client_effect";
4541
- })(exports.ChatMessageEventTypeEnum || (exports.ChatMessageEventTypeEnum = {}));
4542
- exports.ChatMessageStepCategory = void 0;
4543
- (function(ChatMessageStepCategory) {
4544
- ChatMessageStepCategory["List"] = "list";
4545
- ChatMessageStepCategory["WebSearch"] = "web_search";
4546
- ChatMessageStepCategory["Files"] = "files";
4547
- ChatMessageStepCategory["File"] = "file";
4548
- ChatMessageStepCategory["Program"] = "program";
4549
- ChatMessageStepCategory["Iframe"] = "iframe";
4550
- ChatMessageStepCategory["Memory"] = "memory";
4551
- ChatMessageStepCategory["Tasks"] = "tasks";
4552
- ChatMessageStepCategory["Knowledges"] = "knowledges";
4553
- })(exports.ChatMessageStepCategory || (exports.ChatMessageStepCategory = {}));
4554
4649
 
4555
4650
  exports.PermissionsEnum = void 0;
4556
4651
  (function(PermissionsEnum) {
@@ -5554,9 +5649,14 @@ exports.SANDBOX_MANAGED_SERVICE_TRANSPORT_MODES = SANDBOX_MANAGED_SERVICE_TRANSP
5554
5649
  exports.SANDBOX_TERMINAL_NAMESPACE = SANDBOX_TERMINAL_NAMESPACE;
5555
5650
  exports.SANDBOX_WORK_FOR_TYPES = SANDBOX_WORK_FOR_TYPES;
5556
5651
  exports.STANDARD_METADATA_FIELDS = STANDARD_METADATA_FIELDS;
5652
+ exports.STATE_SYS_AGENT_WORKSPACE_PATH = STATE_SYS_AGENT_WORKSPACE_PATH;
5653
+ exports.STATE_SYS_MEMORY_WORKSPACE_PATH = STATE_SYS_MEMORY_WORKSPACE_PATH;
5654
+ exports.STATE_SYS_SESSION_WORKSPACE_PATH = STATE_SYS_SESSION_WORKSPACE_PATH;
5655
+ exports.STATE_SYS_SHARED_WORKSPACE_PATH = STATE_SYS_SHARED_WORKSPACE_PATH;
5557
5656
  exports.STATE_SYS_THREAD_ID = STATE_SYS_THREAD_ID;
5558
5657
  exports.STATE_SYS_VOLUME = STATE_SYS_VOLUME;
5559
5658
  exports.STATE_SYS_WORKSPACE_PATH = STATE_SYS_WORKSPACE_PATH;
5659
+ exports.STATE_SYS_WORKSPACE_ROOT = STATE_SYS_WORKSPACE_ROOT;
5560
5660
  exports.STATE_SYS_WORKSPACE_URL = STATE_SYS_WORKSPACE_URL;
5561
5661
  exports.STATE_VARIABLE_FILES = STATE_VARIABLE_FILES;
5562
5662
  exports.STATE_VARIABLE_HUMAN = STATE_VARIABLE_HUMAN;
@@ -5671,6 +5771,7 @@ exports.omitXpertRelations = omitXpertRelations;
5671
5771
  exports.replaceAgentInDraft = replaceAgentInDraft;
5672
5772
  exports.resolveDraftPrimaryAgent = resolveDraftPrimaryAgent;
5673
5773
  exports.resolveDraftRuntimeGraph = resolveDraftRuntimeGraph;
5774
+ exports.resolveI18nText = resolveI18nText;
5674
5775
  exports.resolveMessageAppendContext = resolveMessageAppendContext;
5675
5776
  exports.resolveRuntimeXpert = resolveRuntimeXpert;
5676
5777
  exports.setStateVariable = setStateVariable;
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
- AnalyticsFeatures["FEATURE_INDICATOR_APP"] = "FEATURE_INDICATOR_APP";
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
- AnalyticsPermissionsEnum["INDICATOR_MARTKET_VIEW"] = "INDICATOR_MARTKET_VIEW";
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";
@@ -4512,43 +4644,6 @@ function filterMessageText(content) {
4512
4644
  }
4513
4645
 
4514
4646
  var STATE_VARIABLE_HUMAN = "human";
4515
- var ChatMessageTypeEnum;
4516
- (function(ChatMessageTypeEnum) {
4517
- ChatMessageTypeEnum["MESSAGE"] = "message";
4518
- ChatMessageTypeEnum["EVENT"] = "event";
4519
- })(ChatMessageTypeEnum || (ChatMessageTypeEnum = {}));
4520
- var ChatMessageEventTypeEnum;
4521
- (function(ChatMessageEventTypeEnum) {
4522
- ChatMessageEventTypeEnum["ON_CONVERSATION_START"] = "on_conversation_start";
4523
- ChatMessageEventTypeEnum["ON_CONVERSATION_END"] = "on_conversation_end";
4524
- ChatMessageEventTypeEnum["ON_MESSAGE_START"] = "on_message_start";
4525
- ChatMessageEventTypeEnum["ON_MESSAGE_END"] = "on_message_end";
4526
- ChatMessageEventTypeEnum["ON_TOOL_START"] = "on_tool_start";
4527
- ChatMessageEventTypeEnum["ON_TOOL_END"] = "on_tool_end";
4528
- ChatMessageEventTypeEnum["ON_TOOL_ERROR"] = "on_tool_error";
4529
- ChatMessageEventTypeEnum["ON_TOOL_MESSAGE"] = "on_tool_message";
4530
- ChatMessageEventTypeEnum["ON_AGENT_START"] = "on_agent_start";
4531
- ChatMessageEventTypeEnum["ON_AGENT_END"] = "on_agent_end";
4532
- ChatMessageEventTypeEnum["ON_RETRIEVER_START"] = "on_retriever_start";
4533
- ChatMessageEventTypeEnum["ON_RETRIEVER_END"] = "on_retriever_end";
4534
- ChatMessageEventTypeEnum["ON_RETRIEVER_ERROR"] = "on_retriever_error";
4535
- ChatMessageEventTypeEnum["ON_INTERRUPT"] = "on_interrupt";
4536
- ChatMessageEventTypeEnum["ON_ERROR"] = "on_error";
4537
- ChatMessageEventTypeEnum["ON_CHAT_EVENT"] = "on_chat_event";
4538
- ChatMessageEventTypeEnum["ON_CLIENT_EFFECT"] = "on_client_effect";
4539
- })(ChatMessageEventTypeEnum || (ChatMessageEventTypeEnum = {}));
4540
- var ChatMessageStepCategory;
4541
- (function(ChatMessageStepCategory) {
4542
- ChatMessageStepCategory["List"] = "list";
4543
- ChatMessageStepCategory["WebSearch"] = "web_search";
4544
- ChatMessageStepCategory["Files"] = "files";
4545
- ChatMessageStepCategory["File"] = "file";
4546
- ChatMessageStepCategory["Program"] = "program";
4547
- ChatMessageStepCategory["Iframe"] = "iframe";
4548
- ChatMessageStepCategory["Memory"] = "memory";
4549
- ChatMessageStepCategory["Tasks"] = "tasks";
4550
- ChatMessageStepCategory["Knowledges"] = "knowledges";
4551
- })(ChatMessageStepCategory || (ChatMessageStepCategory = {}));
4552
4647
 
4553
4648
  var PermissionsEnum;
4554
4649
  (function(PermissionsEnum) {
@@ -5495,4 +5590,4 @@ var PLUGIN_LOAD_STATUS = {
5495
5590
  FAILED: "failed"
5496
5591
  };
5497
5592
 
5498
- 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_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, resolveDraftPrimaryAgent, resolveDraftRuntimeGraph, resolveMessageAppendContext, resolveRuntimeXpert, 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.5",
3
+ "version": "3.9.9",
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.3.6"
22
+ "@xpert-ai/chatkit-types": "~0.3.9"
23
23
  },
24
24
  "types": "./index.d.ts"
25
25
  }
@@ -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: "workflow";
190
+ type: "knowledge";
186
191
  } & {
187
- entity: import("../ai/xpert-workflow.model").IWorkflowNode;
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: "knowledge";
198
+ type: "workflow";
194
199
  } & {
195
- entity: import("..").IKnowledgebase;
200
+ entity: import("../ai/xpert-workflow.model").IWorkflowNode;
196
201
  }))[];
@@ -1,43 +1,43 @@
1
1
  import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
2
  export interface IAiProvider extends IBasePerTenantAndOrganizationEntityModel {
3
3
  /**
4
- * 供应商标识,如 'openai'
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
- * 帮助信息URL
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
  }
@@ -1,3 +1,7 @@
1
+ import type { TFollowUpConsumedEvent, TMessageContentComplex, TThreadContextUsageEvent } from '@xpert-ai/chatkit-types';
2
+ import type { IChatConversation } from './chat.model';
3
+ import type { IChatMessage } from './chat-message.model';
4
+ import type { IXpertAgentExecution } from './xpert-agent-execution.model';
1
5
  /**
2
6
  * Business roles for AI copilot (commands or contexts)
3
7
  */
@@ -80,3 +84,87 @@ export declare enum AiProtocol {
80
84
  }
81
85
  export declare const OpenAIEmbeddingsProviders: AiProvider[];
82
86
  export declare const OllamaEmbeddingsProviders: AiProvider[];
87
+ export declare enum ChatMessageTypeEnum {
88
+ MESSAGE = "message",
89
+ EVENT = "event"
90
+ }
91
+ export declare enum ChatMessageEventTypeEnum {
92
+ ON_CONVERSATION_START = "on_conversation_start",
93
+ ON_CONVERSATION_END = "on_conversation_end",
94
+ ON_MESSAGE_START = "on_message_start",
95
+ ON_MESSAGE_END = "on_message_end",
96
+ ON_TOOL_START = "on_tool_start",
97
+ ON_TOOL_END = "on_tool_end",
98
+ ON_TOOL_ERROR = "on_tool_error",
99
+ ON_TOOL_MESSAGE = "on_tool_message",
100
+ ON_AGENT_START = "on_agent_start",
101
+ ON_AGENT_END = "on_agent_end",
102
+ ON_RETRIEVER_START = "on_retriever_start",
103
+ ON_RETRIEVER_END = "on_retriever_end",
104
+ ON_RETRIEVER_ERROR = "on_retriever_error",
105
+ ON_INTERRUPT = "on_interrupt",
106
+ ON_ERROR = "on_error",
107
+ ON_CHAT_EVENT = "on_chat_event",
108
+ ON_CLIENT_EFFECT = "on_client_effect"
109
+ }
110
+ export declare enum ChatMessageStepCategory {
111
+ List = "list",
112
+ WebSearch = "web_search",
113
+ Files = "files",
114
+ File = "file",
115
+ Program = "program",
116
+ Iframe = "iframe",
117
+ Memory = "memory",
118
+ Tasks = "tasks",
119
+ Knowledges = "knowledges"
120
+ }
121
+ export type TChatStreamMessagePayload = {
122
+ type: ChatMessageTypeEnum.MESSAGE;
123
+ data: string | TMessageContentComplex;
124
+ };
125
+ export type TChatStreamConversationPayload = {
126
+ type: ChatMessageTypeEnum.EVENT;
127
+ event: ChatMessageEventTypeEnum.ON_CONVERSATION_START | ChatMessageEventTypeEnum.ON_CONVERSATION_END;
128
+ data: Partial<IChatConversation>;
129
+ };
130
+ export type TChatStreamMessageEndData = Pick<IChatMessage, 'id' | 'conversationId' | 'executionId' | 'role' | 'status' | 'error'>;
131
+ export type TChatStreamMessageStartPayload = {
132
+ type: ChatMessageTypeEnum.EVENT;
133
+ event: ChatMessageEventTypeEnum.ON_MESSAGE_START;
134
+ data: Partial<IChatMessage>;
135
+ };
136
+ export type TChatStreamMessageEndPayload = {
137
+ type: ChatMessageTypeEnum.EVENT;
138
+ event: ChatMessageEventTypeEnum.ON_MESSAGE_END;
139
+ data: Partial<TChatStreamMessageEndData>;
140
+ };
141
+ export type TChatStreamMessageLifecyclePayload = TChatStreamMessageStartPayload | TChatStreamMessageEndPayload;
142
+ export type TChatStreamAgentEndData = Pick<IXpertAgentExecution, 'id' | 'agentKey' | 'status' | 'error' | 'elapsedTime' | 'tokens' | 'totalTokens' | 'embedTokens' | 'inputTokens' | 'outputTokens' | 'totalPrice' | 'currency' | 'metadata' | 'responseLatency' | 'parentId' | 'xpertId'>;
143
+ export type TChatStreamAgentEndPayload = {
144
+ type: ChatMessageTypeEnum.EVENT;
145
+ event: ChatMessageEventTypeEnum.ON_AGENT_END;
146
+ data: Partial<TChatStreamAgentEndData>;
147
+ };
148
+ export type TChatStreamErrorPayload = {
149
+ type: ChatMessageTypeEnum.EVENT;
150
+ event: ChatMessageEventTypeEnum.ON_ERROR;
151
+ data: string | {
152
+ error?: string;
153
+ };
154
+ };
155
+ export type TChatStreamChatEventData = NonNullable<IChatMessage['events']>[number] | TFollowUpConsumedEvent | TThreadContextUsageEvent;
156
+ export type TChatStreamChatEventPayload = {
157
+ type: ChatMessageTypeEnum.EVENT;
158
+ event: ChatMessageEventTypeEnum.ON_CHAT_EVENT;
159
+ data: TChatStreamChatEventData;
160
+ };
161
+ export type TChatStreamUnhandledEventPayload = {
162
+ type: ChatMessageTypeEnum.EVENT;
163
+ event: Exclude<ChatMessageEventTypeEnum, ChatMessageEventTypeEnum.ON_CONVERSATION_START | ChatMessageEventTypeEnum.ON_CONVERSATION_END | ChatMessageEventTypeEnum.ON_MESSAGE_START | ChatMessageEventTypeEnum.ON_MESSAGE_END | ChatMessageEventTypeEnum.ON_AGENT_END | ChatMessageEventTypeEnum.ON_ERROR | ChatMessageEventTypeEnum.ON_CHAT_EVENT>;
164
+ data?: Partial<IChatConversation> | Partial<IChatMessage> | Partial<IXpertAgentExecution> | TChatStreamChatEventData | string;
165
+ };
166
+ export type TChatStreamEventPayload = TChatStreamMessagePayload | TChatStreamConversationPayload | TChatStreamMessageLifecyclePayload | TChatStreamAgentEndPayload | TChatStreamErrorPayload | TChatStreamChatEventPayload | TChatStreamUnhandledEventPayload;
167
+ export type TChatStreamCompletePayload = {
168
+ type: 'complete';
169
+ };
170
+ export type TChatStreamPayload = TChatStreamEventPayload | TChatStreamCompletePayload;
@@ -21,6 +21,11 @@ export type TChatConversationOptions = {
21
21
  features?: Array<'timeline' | 'sandbox' | 'files'>;
22
22
  workspacePath?: string;
23
23
  workspaceUrl?: string;
24
+ workspaceRoot?: string;
25
+ sharedWorkspacePath?: string;
26
+ agentWorkspacePath?: string;
27
+ sessionWorkspacePath?: string;
28
+ memoryWorkspacePath?: string;
24
29
  sandboxEnvironmentId?: string;
25
30
  runtimeCapabilities?: RuntimeCapabilitiesSelection;
26
31
  };
@@ -1,12 +1,16 @@
1
+ import type { I18nText } from '../i18n.model';
1
2
  export declare const CONTEXT_COMPRESSION_COMPONENT_TYPE = "context-compression";
2
3
  export type TContextCompressionComponentStatus = 'running' | 'success' | 'fail';
4
+ export type TContextCompressionComponentReason = 'no_messages' | 'no_unprotected_history' | 'no_token_gain';
3
5
  export type TContextCompressionComponentData = {
4
6
  category: 'Tool';
5
7
  type: typeof CONTEXT_COMPRESSION_COMPONENT_TYPE;
6
8
  status: TContextCompressionComponentStatus;
7
- title?: string;
8
- message?: string;
9
- error?: string;
9
+ reason?: TContextCompressionComponentReason;
10
+ title?: I18nText;
11
+ message?: I18nText;
12
+ summary?: string;
13
+ error?: I18nText;
10
14
  created_date?: string | Date | null;
11
15
  end_date?: string | Date | null;
12
16
  };
@@ -6,5 +6,6 @@ export declare enum AiFeatureEnum {
6
6
  FEATURE_XPERT_CHATBI = "FEATURE_XPERT_CHATBI",
7
7
  FEATURE_XPERT_CLAWXPERT = "FEATURE_XPERT_CLAWXPERT",
8
8
  FEATURE_XPERT_CODEXPERT = "FEATURE_XPERT_CODEXPERT",
9
- FEATURE_XPERT_DEEP_RESEARCH = "FEATURE_XPERT_DEEP_RESEARCH"
9
+ FEATURE_XPERT_DEEP_RESEARCH = "FEATURE_XPERT_DEEP_RESEARCH",
10
+ FEATURE_XPERT_DATA_ONTOLOGY = "FEATURE_XPERT_DATA_ONTOLOGY"
10
11
  }
package/src/ai/index.d.ts CHANGED
@@ -1,38 +1,5 @@
1
1
  export declare const STATE_VARIABLE_HUMAN = "human";
2
- export declare enum ChatMessageTypeEnum {
3
- MESSAGE = "message",
4
- EVENT = "event"
5
- }
6
- export declare enum ChatMessageEventTypeEnum {
7
- ON_CONVERSATION_START = "on_conversation_start",
8
- ON_CONVERSATION_END = "on_conversation_end",
9
- ON_MESSAGE_START = "on_message_start",
10
- ON_MESSAGE_END = "on_message_end",
11
- ON_TOOL_START = "on_tool_start",
12
- ON_TOOL_END = "on_tool_end",
13
- ON_TOOL_ERROR = "on_tool_error",
14
- ON_TOOL_MESSAGE = "on_tool_message",
15
- ON_AGENT_START = "on_agent_start",
16
- ON_AGENT_END = "on_agent_end",
17
- ON_RETRIEVER_START = "on_retriever_start",
18
- ON_RETRIEVER_END = "on_retriever_end",
19
- ON_RETRIEVER_ERROR = "on_retriever_error",
20
- ON_INTERRUPT = "on_interrupt",
21
- ON_ERROR = "on_error",
22
- ON_CHAT_EVENT = "on_chat_event",
23
- ON_CLIENT_EFFECT = "on_client_effect"
24
- }
25
- export declare enum ChatMessageStepCategory {
26
- List = "list",
27
- WebSearch = "web_search",
28
- Files = "files",
29
- File = "file",
30
- Program = "program",
31
- Iframe = "iframe",
32
- Memory = "memory",
33
- Tasks = "tasks",
34
- Knowledges = "knowledges"
35
- }
2
+ export { ChatMessageEventTypeEnum, ChatMessageStepCategory, ChatMessageTypeEnum } from './ai.model';
36
3
  export type * from '@xpert-ai/chatkit-types';
37
4
  export type { TChatRequest } from './xpert-chat.model';
38
5
  export { CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED } from './chat-event.model';
@@ -84,6 +84,32 @@ export type TXpertExportedTemplate = {
84
84
  isDraft: boolean;
85
85
  includeMemory: boolean;
86
86
  };
87
+ export type XpertFrequentQuestionsRequest = {
88
+ locale?: string | null;
89
+ windowDays?: number | null;
90
+ conversationLimit?: number | null;
91
+ questionCount?: number | null;
92
+ forceRefresh?: boolean | null;
93
+ };
94
+ export type XpertFrequentQuestionsSample = {
95
+ windowDays: number;
96
+ conversationLimit: number;
97
+ questionCount: number;
98
+ conversationCount: number;
99
+ messageCount: number;
100
+ since: string;
101
+ until: string;
102
+ };
103
+ export type XpertFrequentQuestionsResponse = {
104
+ xpertId: string;
105
+ organizationId: string | null;
106
+ locale: string;
107
+ questions: string[];
108
+ generatedAt: string;
109
+ expiresAt: string;
110
+ cached: boolean;
111
+ sample: XpertFrequentQuestionsSample;
112
+ };
87
113
  export type TXpert = {
88
114
  /**
89
115
  * Unique slug identifier, generated from name
@@ -3,6 +3,9 @@ export declare enum AnalyticsFeatures {
3
3
  FEATURE_INDICATOR = "FEATURE_INDICATOR",
4
4
  FEATURE_INDICATOR_MARKET = "FEATURE_INDICATOR_MARKET",
5
5
  FEATURE_INDICATOR_REGISTER = "FEATURE_INDICATOR_REGISTER",
6
+ /**
7
+ * @deprecated Indicator App is no longer exposed in the system menu.
8
+ */
6
9
  FEATURE_INDICATOR_APP = "FEATURE_INDICATOR_APP",
7
10
  FEATURE_STORY = "FEATURE_STORY",
8
11
  FEATURE_STORY_CREATION = "FEATURE_STORY_CREATION",
@@ -16,6 +16,9 @@ export declare enum AnalyticsPermissionsEnum {
16
16
  BUSINESS_AREA_VIEW = "BUSINESS_AREA_VIEW",
17
17
  BUSINESS_AREA_EDIT = "BUSINESS_AREA_EDIT",
18
18
  INDICATOR_VIEW = "INDICATOR_VIEW",
19
+ /**
20
+ * @deprecated Indicator App is no longer exposed in the system menu.
21
+ */
19
22
  INDICATOR_MARTKET_VIEW = "INDICATOR_MARTKET_VIEW",
20
23
  INDICATOR_EDIT = "INDICATOR_EDIT",
21
24
  DATA_FACTORY_VIEW = "DATA_FACTORY_VIEW",
@@ -0,0 +1,6 @@
1
+ export interface I18nObject {
2
+ en_US: string;
3
+ zh_Hans?: string;
4
+ }
5
+ export type I18nText = string | I18nObject;
6
+ export declare function resolveI18nText(value: unknown, language?: string): string | null;
package/src/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from './types';
2
+ export type { I18nObject, I18nText } from './i18n.model';
3
+ export { resolveI18nText } from './i18n.model';
2
4
  export * from './contact.model';
3
5
  export * from './core.model';
4
6
  export * from './country.model';
package/src/types.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import ShortUniqueId from 'short-unique-id';
2
- import type * as z3 from "zod/v3";
3
- import type * as z4 from "zod/v4/core";
2
+ import type * as z3 from 'zod/v3';
3
+ import type * as z4 from 'zod/v4/core';
4
+ import type { I18nObject } from './i18n.model';
5
+ export type { I18nObject, I18nText } from './i18n.model';
6
+ export { resolveI18nText } from './i18n.model';
4
7
  declare const uuidGenerator: ShortUniqueId;
5
8
  export declare const uuid: (...args: Parameters<(typeof uuidGenerator)["randomUUID"]>) => string;
6
9
  /**
@@ -11,10 +14,6 @@ export declare const uuid: (...args: Parameters<(typeof uuidGenerator)["randomUU
11
14
  * @docsSubcategory Identifiers
12
15
  */
13
16
  export type ID = string;
14
- export interface I18nObject {
15
- en_US: string;
16
- zh_Hans?: string;
17
- }
18
17
  export type TAvatar = {
19
18
  emoji?: {
20
19
  id: string;
@@ -245,4 +244,3 @@ export interface IconDefinition {
245
244
  export type ZodObjectV3 = z3.ZodObject<any, any, any, any>;
246
245
  export type ZodObjectV4 = z4.$ZodObject;
247
246
  export type InteropZodObject = ZodObjectV3 | ZodObjectV4;
248
- export {};