@xpert-ai/contracts 3.9.3 → 3.9.5
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 +155 -71
- package/index.esm.js +152 -69
- package/package.json +2 -2
- package/src/agent/variables.d.ts +3 -3
- package/src/ai/chat-event.model.d.ts +2 -1
- package/src/ai/index.d.ts +3 -1
- 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/prompt-workflow.model.d.ts +51 -0
- package/src/ai/skill.model.d.ts +15 -5
- package/src/ai/xpert-chat.model.d.ts +2 -23
- package/src/ai/xpert.model.d.ts +10 -3
- package/src/ai/xpert.utils.d.ts +6 -2
- package/src/api-key.model.d.ts +10 -1
- package/src/secret-token.model.d.ts +9 -3
package/index.cjs.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var ShortUniqueId = require('short-unique-id');
|
|
4
|
-
var chatkitTypes = require('@xpert-ai/chatkit-types');
|
|
5
4
|
|
|
6
5
|
function _array_like_to_array$7(arr, len) {
|
|
7
6
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -1341,6 +1340,48 @@ exports.QueryStatusEnum = void 0;
|
|
|
1341
1340
|
QueryStatusEnum["FAILED"] = "failed";
|
|
1342
1341
|
})(exports.QueryStatusEnum || (exports.QueryStatusEnum = {}));
|
|
1343
1342
|
|
|
1343
|
+
function _define_property$9(obj, key, value) {
|
|
1344
|
+
if (key in obj) {
|
|
1345
|
+
Object.defineProperty(obj, key, {
|
|
1346
|
+
value: value,
|
|
1347
|
+
enumerable: true,
|
|
1348
|
+
configurable: true,
|
|
1349
|
+
writable: true
|
|
1350
|
+
});
|
|
1351
|
+
} else {
|
|
1352
|
+
obj[key] = value;
|
|
1353
|
+
}
|
|
1354
|
+
return obj;
|
|
1355
|
+
}
|
|
1356
|
+
function _object_spread$8(target) {
|
|
1357
|
+
for(var i = 1; i < arguments.length; i++){
|
|
1358
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
1359
|
+
var ownKeys = Object.keys(source);
|
|
1360
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1361
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1362
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1363
|
+
}));
|
|
1364
|
+
}
|
|
1365
|
+
ownKeys.forEach(function(key) {
|
|
1366
|
+
_define_property$9(target, key, source[key]);
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
return target;
|
|
1370
|
+
}
|
|
1371
|
+
var CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = "follow_up_consumed";
|
|
1372
|
+
var CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = "thread_context_usage";
|
|
1373
|
+
var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
|
|
1374
|
+
function createConversationTitleSummaryEvent(event) {
|
|
1375
|
+
return _object_spread$8({
|
|
1376
|
+
type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
|
|
1377
|
+
}, event);
|
|
1378
|
+
}
|
|
1379
|
+
function createFollowUpConsumedEvent(event) {
|
|
1380
|
+
return _object_spread$8({
|
|
1381
|
+
type: CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
|
|
1382
|
+
}, event);
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1344
1385
|
function _array_like_to_array$6(arr, len) {
|
|
1345
1386
|
if (len == null || len > arr.length) len = arr.length;
|
|
1346
1387
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -1352,7 +1393,7 @@ function _array_with_holes$5(arr) {
|
|
|
1352
1393
|
function _array_without_holes$2(arr) {
|
|
1353
1394
|
if (Array.isArray(arr)) return _array_like_to_array$6(arr);
|
|
1354
1395
|
}
|
|
1355
|
-
function _define_property$
|
|
1396
|
+
function _define_property$8(obj, key, value) {
|
|
1356
1397
|
if (key in obj) {
|
|
1357
1398
|
Object.defineProperty(obj, key, {
|
|
1358
1399
|
value: value,
|
|
@@ -1398,7 +1439,7 @@ function _non_iterable_rest$5() {
|
|
|
1398
1439
|
function _non_iterable_spread$2() {
|
|
1399
1440
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1400
1441
|
}
|
|
1401
|
-
function _object_spread$
|
|
1442
|
+
function _object_spread$7(target) {
|
|
1402
1443
|
for(var i = 1; i < arguments.length; i++){
|
|
1403
1444
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
1404
1445
|
var ownKeys = Object.keys(source);
|
|
@@ -1408,7 +1449,7 @@ function _object_spread$8(target) {
|
|
|
1408
1449
|
}));
|
|
1409
1450
|
}
|
|
1410
1451
|
ownKeys.forEach(function(key) {
|
|
1411
|
-
_define_property$
|
|
1452
|
+
_define_property$8(target, key, source[key]);
|
|
1412
1453
|
});
|
|
1413
1454
|
}
|
|
1414
1455
|
return target;
|
|
@@ -1546,7 +1587,7 @@ function normalizeAssistantBindingToolPreferences(value) {
|
|
|
1546
1587
|
if (!Object.keys(toolsets).length && !Object.keys(middlewares).length && !Object.keys(skills).length) {
|
|
1547
1588
|
return null;
|
|
1548
1589
|
}
|
|
1549
|
-
return _object_spread$
|
|
1590
|
+
return _object_spread$7({
|
|
1550
1591
|
version: 1
|
|
1551
1592
|
}, Object.keys(toolsets).length ? {
|
|
1552
1593
|
toolsets: toolsets
|
|
@@ -1624,8 +1665,8 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
|
|
|
1624
1665
|
}) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$2(disabledTools).concat([
|
|
1625
1666
|
normalizedToolName
|
|
1626
1667
|
]));
|
|
1627
|
-
var toolsets = normalizedPreferences.toolsets ? _object_spread$
|
|
1628
|
-
var middlewares = normalizedPreferences.middlewares ? _object_spread$
|
|
1668
|
+
var toolsets = normalizedPreferences.toolsets ? _object_spread$7({}, normalizedPreferences.toolsets) : undefined;
|
|
1669
|
+
var middlewares = normalizedPreferences.middlewares ? _object_spread$7({}, normalizedPreferences.middlewares) : undefined;
|
|
1629
1670
|
if (sourceType === "toolset") {
|
|
1630
1671
|
var toolsetName = "toolsetName" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.toolsetName) : "";
|
|
1631
1672
|
if (!toolsetName) {
|
|
@@ -1641,14 +1682,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
|
|
|
1641
1682
|
} else {
|
|
1642
1683
|
delete nextToolsets[normalizedNodeKey];
|
|
1643
1684
|
}
|
|
1644
|
-
return normalizeAssistantBindingToolPreferences(_object_spread$
|
|
1685
|
+
return normalizeAssistantBindingToolPreferences(_object_spread$7({
|
|
1645
1686
|
version: 1
|
|
1646
1687
|
}, Object.keys(nextToolsets).length ? {
|
|
1647
1688
|
toolsets: nextToolsets
|
|
1648
1689
|
} : {}, middlewares && Object.keys(middlewares).length ? {
|
|
1649
1690
|
middlewares: middlewares
|
|
1650
1691
|
} : {}, normalizedPreferences.skills ? {
|
|
1651
|
-
skills: _object_spread$
|
|
1692
|
+
skills: _object_spread$7({}, normalizedPreferences.skills)
|
|
1652
1693
|
} : {}));
|
|
1653
1694
|
}
|
|
1654
1695
|
var provider = "provider" in metadata ? normalizeAssistantBindingPreferenceKey(metadata.provider) : "";
|
|
@@ -1664,14 +1705,14 @@ function updateAssistantBindingToolPreferences(preferences, sourceType, nodeKey,
|
|
|
1664
1705
|
} else {
|
|
1665
1706
|
delete nextMiddlewares[normalizedNodeKey];
|
|
1666
1707
|
}
|
|
1667
|
-
return normalizeAssistantBindingToolPreferences(_object_spread$
|
|
1708
|
+
return normalizeAssistantBindingToolPreferences(_object_spread$7({
|
|
1668
1709
|
version: 1
|
|
1669
1710
|
}, toolsets && Object.keys(toolsets).length ? {
|
|
1670
1711
|
toolsets: toolsets
|
|
1671
1712
|
} : {}, Object.keys(nextMiddlewares).length ? {
|
|
1672
1713
|
middlewares: nextMiddlewares
|
|
1673
1714
|
} : {}, normalizedPreferences.skills ? {
|
|
1674
|
-
skills: _object_spread$
|
|
1715
|
+
skills: _object_spread$7({}, normalizedPreferences.skills)
|
|
1675
1716
|
} : {}));
|
|
1676
1717
|
}
|
|
1677
1718
|
function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillId, enabled) {
|
|
@@ -1689,7 +1730,7 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
|
|
|
1689
1730
|
}) : normalizeAssistantBindingPreferenceIds(_to_consumable_array$2(disabledSkillIds).concat([
|
|
1690
1731
|
normalizedSkillId
|
|
1691
1732
|
]));
|
|
1692
|
-
var skills = normalizedPreferences.skills ? _object_spread$
|
|
1733
|
+
var skills = normalizedPreferences.skills ? _object_spread$7({}, normalizedPreferences.skills) : {};
|
|
1693
1734
|
if (nextDisabledSkillIds.length) {
|
|
1694
1735
|
skills[normalizedWorkspaceId] = {
|
|
1695
1736
|
workspaceId: normalizedWorkspaceId,
|
|
@@ -1698,12 +1739,12 @@ function updateAssistantBindingSkillPreferences(preferences, workspaceId, skillI
|
|
|
1698
1739
|
} else {
|
|
1699
1740
|
delete skills[normalizedWorkspaceId];
|
|
1700
1741
|
}
|
|
1701
|
-
return normalizeAssistantBindingToolPreferences(_object_spread$
|
|
1742
|
+
return normalizeAssistantBindingToolPreferences(_object_spread$7({
|
|
1702
1743
|
version: 1
|
|
1703
1744
|
}, normalizedPreferences.toolsets ? {
|
|
1704
|
-
toolsets: _object_spread$
|
|
1745
|
+
toolsets: _object_spread$7({}, normalizedPreferences.toolsets)
|
|
1705
1746
|
} : {}, normalizedPreferences.middlewares ? {
|
|
1706
|
-
middlewares: _object_spread$
|
|
1747
|
+
middlewares: _object_spread$7({}, normalizedPreferences.middlewares)
|
|
1707
1748
|
} : {}, Object.keys(skills).length ? {
|
|
1708
1749
|
skills: skills
|
|
1709
1750
|
} : {}));
|
|
@@ -1721,14 +1762,14 @@ function ensureAssistantBindingSkillWorkspacePreference(preferences, workspaceId
|
|
|
1721
1762
|
var currentSkills = (_normalizedPreferences_skills = normalizedPreferences.skills) !== null && _normalizedPreferences_skills !== void 0 ? _normalizedPreferences_skills : {};
|
|
1722
1763
|
var currentWorkspacePreference = currentSkills[normalizedWorkspaceId];
|
|
1723
1764
|
var _currentWorkspacePreference_disabledSkillIds;
|
|
1724
|
-
return _object_spread_props$6(_object_spread$
|
|
1765
|
+
return _object_spread_props$6(_object_spread$7({
|
|
1725
1766
|
version: 1
|
|
1726
1767
|
}, normalizedPreferences.toolsets ? {
|
|
1727
|
-
toolsets: _object_spread$
|
|
1768
|
+
toolsets: _object_spread$7({}, normalizedPreferences.toolsets)
|
|
1728
1769
|
} : {}, normalizedPreferences.middlewares ? {
|
|
1729
|
-
middlewares: _object_spread$
|
|
1770
|
+
middlewares: _object_spread$7({}, normalizedPreferences.middlewares)
|
|
1730
1771
|
} : {}), {
|
|
1731
|
-
skills: _object_spread_props$6(_object_spread$
|
|
1772
|
+
skills: _object_spread_props$6(_object_spread$7({}, currentSkills), _define_property$8({}, normalizedWorkspaceId, {
|
|
1732
1773
|
workspaceId: normalizeAssistantBindingPreferenceKey(currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.workspaceId) || normalizedWorkspaceId,
|
|
1733
1774
|
disabledSkillIds: (_currentWorkspacePreference_disabledSkillIds = currentWorkspacePreference === null || currentWorkspacePreference === void 0 ? void 0 : currentWorkspacePreference.disabledSkillIds) !== null && _currentWorkspacePreference_disabledSkillIds !== void 0 ? _currentWorkspacePreference_disabledSkillIds : []
|
|
1734
1775
|
}))
|
|
@@ -1891,47 +1932,6 @@ var OllamaEmbeddingsProviders = [
|
|
|
1891
1932
|
exports.AiProvider.Ollama
|
|
1892
1933
|
];
|
|
1893
1934
|
|
|
1894
|
-
function _define_property$8(obj, key, value) {
|
|
1895
|
-
if (key in obj) {
|
|
1896
|
-
Object.defineProperty(obj, key, {
|
|
1897
|
-
value: value,
|
|
1898
|
-
enumerable: true,
|
|
1899
|
-
configurable: true,
|
|
1900
|
-
writable: true
|
|
1901
|
-
});
|
|
1902
|
-
} else {
|
|
1903
|
-
obj[key] = value;
|
|
1904
|
-
}
|
|
1905
|
-
return obj;
|
|
1906
|
-
}
|
|
1907
|
-
function _object_spread$7(target) {
|
|
1908
|
-
for(var i = 1; i < arguments.length; i++){
|
|
1909
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
1910
|
-
var ownKeys = Object.keys(source);
|
|
1911
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1912
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1913
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1914
|
-
}));
|
|
1915
|
-
}
|
|
1916
|
-
ownKeys.forEach(function(key) {
|
|
1917
|
-
_define_property$8(target, key, source[key]);
|
|
1918
|
-
});
|
|
1919
|
-
}
|
|
1920
|
-
return target;
|
|
1921
|
-
}
|
|
1922
|
-
var CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = "thread_context_usage";
|
|
1923
|
-
var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
|
|
1924
|
-
function createConversationTitleSummaryEvent(event) {
|
|
1925
|
-
return _object_spread$7({
|
|
1926
|
-
type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
|
|
1927
|
-
}, event);
|
|
1928
|
-
}
|
|
1929
|
-
function createFollowUpConsumedEvent(event) {
|
|
1930
|
-
return _object_spread$7({
|
|
1931
|
-
type: chatkitTypes.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
|
|
1932
|
-
}, event);
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
1935
|
/**
|
|
1936
1936
|
* @deprecated use ChatMessageEventTypeEnum
|
|
1937
1937
|
*/ exports.ChatGatewayEvent = void 0;
|
|
@@ -3222,6 +3222,49 @@ function omitXpertRelations(xpert) {
|
|
|
3222
3222
|
var _ref;
|
|
3223
3223
|
return (_ref = isDraft ? (_xpert_draft = xpert.draft) === null || _xpert_draft === void 0 ? void 0 : _xpert_draft.team : xpert) !== null && _ref !== void 0 ? _ref : xpert;
|
|
3224
3224
|
}
|
|
3225
|
+
function resolveRuntimeXpert(xpert, isDraft) {
|
|
3226
|
+
var _draft_team, _draft_team1, _draft_team2, _draft_team3, _draft_team4;
|
|
3227
|
+
if (!isDraft || !xpert.draft) {
|
|
3228
|
+
return xpert;
|
|
3229
|
+
}
|
|
3230
|
+
var draft = xpert.draft;
|
|
3231
|
+
var graph = resolveDraftRuntimeGraph(xpert, draft);
|
|
3232
|
+
var agent = resolveDraftPrimaryAgent(xpert, draft, graph);
|
|
3233
|
+
var _draft_team5, _draft_team_workspaceId, _draft_team_agentConfig, _draft_team_commandProfile, _draft_team_features, _draft_team_options;
|
|
3234
|
+
return _object_spread_props$3(_object_spread$3({}, xpert, (_draft_team5 = draft.team) !== null && _draft_team5 !== void 0 ? _draft_team5 : {}), {
|
|
3235
|
+
id: xpert.id,
|
|
3236
|
+
tenantId: xpert.tenantId,
|
|
3237
|
+
organizationId: xpert.organizationId,
|
|
3238
|
+
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,
|
|
3239
|
+
draft: xpert.draft,
|
|
3240
|
+
graph: graph,
|
|
3241
|
+
agent: agent,
|
|
3242
|
+
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,
|
|
3243
|
+
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,
|
|
3244
|
+
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,
|
|
3245
|
+
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
|
|
3246
|
+
});
|
|
3247
|
+
}
|
|
3248
|
+
function resolveDraftRuntimeGraph(xpert, draft) {
|
|
3249
|
+
var _xpert_graph, _xpert_graph1;
|
|
3250
|
+
var _draft_nodes, _ref, _draft_connections, _ref1;
|
|
3251
|
+
return {
|
|
3252
|
+
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 : [],
|
|
3253
|
+
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 : []
|
|
3254
|
+
};
|
|
3255
|
+
}
|
|
3256
|
+
function resolveDraftPrimaryAgent(xpert, draft, graph) {
|
|
3257
|
+
var _draft_team, _xpert_agent;
|
|
3258
|
+
var draftAgent = (_draft_team = draft.team) === null || _draft_team === void 0 ? void 0 : _draft_team.agent;
|
|
3259
|
+
var _draftAgent_key;
|
|
3260
|
+
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;
|
|
3261
|
+
var agentNode = targetKey ? graph.nodes.find(function(node) {
|
|
3262
|
+
var _node_entity;
|
|
3263
|
+
return node.type === "agent" && (node.key === targetKey || ((_node_entity = node.entity) === null || _node_entity === void 0 ? void 0 : _node_entity.key) === targetKey);
|
|
3264
|
+
}) : null;
|
|
3265
|
+
var _agentNode_entity, _ref;
|
|
3266
|
+
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;
|
|
3267
|
+
}
|
|
3225
3268
|
function xpertLabel(agent) {
|
|
3226
3269
|
return agent.title || agent.name;
|
|
3227
3270
|
}
|
|
@@ -3763,6 +3806,23 @@ function getChunkNodeId(document) {
|
|
|
3763
3806
|
return leaves;
|
|
3764
3807
|
}
|
|
3765
3808
|
|
|
3809
|
+
exports.KnowledgeGraphStatus = void 0;
|
|
3810
|
+
(function(KnowledgeGraphStatus) {
|
|
3811
|
+
KnowledgeGraphStatus["DISABLED"] = "disabled";
|
|
3812
|
+
KnowledgeGraphStatus["INDEXING"] = "indexing";
|
|
3813
|
+
KnowledgeGraphStatus["READY"] = "ready";
|
|
3814
|
+
KnowledgeGraphStatus["FAILED"] = "failed";
|
|
3815
|
+
KnowledgeGraphStatus["REBUILD_REQUIRED"] = "rebuild_required";
|
|
3816
|
+
})(exports.KnowledgeGraphStatus || (exports.KnowledgeGraphStatus = {}));
|
|
3817
|
+
exports.KnowledgeGraphIndexJobStatus = void 0;
|
|
3818
|
+
(function(KnowledgeGraphIndexJobStatus) {
|
|
3819
|
+
KnowledgeGraphIndexJobStatus["QUEUED"] = "queued";
|
|
3820
|
+
KnowledgeGraphIndexJobStatus["RUNNING"] = "running";
|
|
3821
|
+
KnowledgeGraphIndexJobStatus["SUCCESS"] = "success";
|
|
3822
|
+
KnowledgeGraphIndexJobStatus["FAILED"] = "failed";
|
|
3823
|
+
KnowledgeGraphIndexJobStatus["CANCELLED"] = "cancelled";
|
|
3824
|
+
})(exports.KnowledgeGraphIndexJobStatus || (exports.KnowledgeGraphIndexJobStatus = {}));
|
|
3825
|
+
|
|
3766
3826
|
// Skill types
|
|
3767
3827
|
var WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER = "workspace-public";
|
|
3768
3828
|
var WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME = "Workspace Shared Skills";
|
|
@@ -4730,6 +4790,12 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
|
|
|
4730
4790
|
OrganizationProjectBudgetTypeEnum["COST"] = "cost";
|
|
4731
4791
|
})(exports.OrganizationProjectBudgetTypeEnum || (exports.OrganizationProjectBudgetTypeEnum = {}));
|
|
4732
4792
|
|
|
4793
|
+
exports.SecretTokenBindingType = void 0;
|
|
4794
|
+
(function(SecretTokenBindingType) {
|
|
4795
|
+
SecretTokenBindingType["API_KEY"] = "api_key";
|
|
4796
|
+
SecretTokenBindingType["PUBLIC_XPERT"] = "public_xpert";
|
|
4797
|
+
})(exports.SecretTokenBindingType || (exports.SecretTokenBindingType = {}));
|
|
4798
|
+
|
|
4733
4799
|
exports.Visibility = void 0;
|
|
4734
4800
|
(function(Visibility) {
|
|
4735
4801
|
Visibility["Public"] = "public";
|
|
@@ -5205,14 +5271,32 @@ function _unsupported_iterable_to_array$1(o, minLen) {
|
|
|
5205
5271
|
* @param variable
|
|
5206
5272
|
* @returns
|
|
5207
5273
|
*/ function getVariableSchema(variables, variable) {
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5274
|
+
if (!(variables === null || variables === void 0 ? void 0 : variables.length) || !variable) {
|
|
5275
|
+
return {
|
|
5276
|
+
group: undefined,
|
|
5277
|
+
variable: undefined
|
|
5278
|
+
};
|
|
5279
|
+
}
|
|
5280
|
+
var _variable_split = _to_array(variable.split(".")), groupName = _variable_split[0], rest = _variable_split.slice(1);
|
|
5281
|
+
if (rest.length) {
|
|
5282
|
+
var grouped = findVariableInGroup(variables, groupName, rest.join("."));
|
|
5283
|
+
if (grouped.variable) {
|
|
5284
|
+
return grouped;
|
|
5285
|
+
}
|
|
5286
|
+
}
|
|
5287
|
+
var ungrouped = findVariableInGroup(variables, "", variable);
|
|
5288
|
+
if (ungrouped.variable) {
|
|
5289
|
+
return ungrouped;
|
|
5290
|
+
}
|
|
5291
|
+
return rest.length ? findVariableInGroup(variables, groupName, rest.join(".")) : ungrouped;
|
|
5292
|
+
}
|
|
5293
|
+
function findVariableInGroup(variables, groupName, variableName) {
|
|
5294
|
+
var group = variables.find(function(item) {
|
|
5295
|
+
var _item_group, _item_group1;
|
|
5296
|
+
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);
|
|
5213
5297
|
});
|
|
5214
|
-
var selectVariable = group === null || group === void 0 ? void 0 : group.variables.find(function(
|
|
5215
|
-
return
|
|
5298
|
+
var selectVariable = group === null || group === void 0 ? void 0 : group.variables.find(function(item) {
|
|
5299
|
+
return item.name === variableName;
|
|
5216
5300
|
});
|
|
5217
5301
|
return {
|
|
5218
5302
|
group: group,
|
|
@@ -5413,14 +5497,11 @@ var PLUGIN_LOAD_STATUS = {
|
|
|
5413
5497
|
FAILED: "failed"
|
|
5414
5498
|
};
|
|
5415
5499
|
|
|
5416
|
-
Object.defineProperty(exports, "CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED", {
|
|
5417
|
-
enumerable: true,
|
|
5418
|
-
get: function () { return chatkitTypes.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED; }
|
|
5419
|
-
});
|
|
5420
5500
|
exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
|
|
5421
5501
|
exports.API_PRINCIPAL_USER_ID_HEADER = API_PRINCIPAL_USER_ID_HEADER;
|
|
5422
5502
|
exports.Attachment_Type_Options = Attachment_Type_Options;
|
|
5423
5503
|
exports.CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY;
|
|
5504
|
+
exports.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;
|
|
5424
5505
|
exports.CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE;
|
|
5425
5506
|
exports.CONTEXT_COMPRESSION_COMPONENT_TYPE = CONTEXT_COMPRESSION_COMPONENT_TYPE;
|
|
5426
5507
|
exports.CONTEXT_COMPRESSION_MIDDLEWARE_NAME = CONTEXT_COMPRESSION_MIDDLEWARE_NAME;
|
|
@@ -5588,7 +5669,10 @@ exports.normalizeMiddlewareProvider = normalizeMiddlewareProvider;
|
|
|
5588
5669
|
exports.normalizeXpertAgentConfig = normalizeXpertAgentConfig;
|
|
5589
5670
|
exports.omitXpertRelations = omitXpertRelations;
|
|
5590
5671
|
exports.replaceAgentInDraft = replaceAgentInDraft;
|
|
5672
|
+
exports.resolveDraftPrimaryAgent = resolveDraftPrimaryAgent;
|
|
5673
|
+
exports.resolveDraftRuntimeGraph = resolveDraftRuntimeGraph;
|
|
5591
5674
|
exports.resolveMessageAppendContext = resolveMessageAppendContext;
|
|
5675
|
+
exports.resolveRuntimeXpert = resolveRuntimeXpert;
|
|
5592
5676
|
exports.setStateVariable = setStateVariable;
|
|
5593
5677
|
exports.shortTitle = shortTitle;
|
|
5594
5678
|
exports.stringifyMessageContent = stringifyMessageContent;
|