@xpert-ai/contracts 3.9.0-beta.2 → 3.9.0-beta.3
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 +80 -7
- package/index.esm.js +75 -8
- package/package.json +1 -1
- package/src/agent/graph.d.ts +15 -1
- package/src/ai/assistant-binding.model.d.ts +2 -1
- package/src/ai/chat-event.model.d.ts +10 -0
- package/src/ai/chat-message.model.d.ts +4 -0
- package/src/ai/types.d.ts +45 -20
- package/src/ai/xpert-chat.model.d.ts +29 -2
- package/src/ai/xpert.model.d.ts +13 -1
package/index.cjs.js
CHANGED
|
@@ -1516,7 +1516,7 @@ var OllamaEmbeddingsProviders = [
|
|
|
1516
1516
|
exports.AiProvider.Ollama
|
|
1517
1517
|
];
|
|
1518
1518
|
|
|
1519
|
-
function _define_property$
|
|
1519
|
+
function _define_property$7(obj, key, value) {
|
|
1520
1520
|
if (key in obj) {
|
|
1521
1521
|
Object.defineProperty(obj, key, {
|
|
1522
1522
|
value: value,
|
|
@@ -1529,7 +1529,7 @@ function _define_property$6(obj, key, value) {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
return obj;
|
|
1531
1531
|
}
|
|
1532
|
-
function _object_spread$
|
|
1532
|
+
function _object_spread$6(target) {
|
|
1533
1533
|
for(var i = 1; i < arguments.length; i++){
|
|
1534
1534
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
1535
1535
|
var ownKeys = Object.keys(source);
|
|
@@ -1539,18 +1539,24 @@ function _object_spread$5(target) {
|
|
|
1539
1539
|
}));
|
|
1540
1540
|
}
|
|
1541
1541
|
ownKeys.forEach(function(key) {
|
|
1542
|
-
_define_property$
|
|
1542
|
+
_define_property$7(target, key, source[key]);
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
1545
|
return target;
|
|
1546
1546
|
}
|
|
1547
1547
|
var CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = "thread_context_usage";
|
|
1548
1548
|
var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
|
|
1549
|
+
var CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = "follow_up_consumed";
|
|
1549
1550
|
function createConversationTitleSummaryEvent(event) {
|
|
1550
|
-
return _object_spread$
|
|
1551
|
+
return _object_spread$6({
|
|
1551
1552
|
type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
|
|
1552
1553
|
}, event);
|
|
1553
1554
|
}
|
|
1555
|
+
function createFollowUpConsumedEvent(event) {
|
|
1556
|
+
return _object_spread$6({
|
|
1557
|
+
type: CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
|
|
1558
|
+
}, event);
|
|
1559
|
+
}
|
|
1554
1560
|
|
|
1555
1561
|
/**
|
|
1556
1562
|
* @deprecated use ChatMessageEventTypeEnum
|
|
@@ -1808,6 +1814,53 @@ function workflowNodeIdentifier(node) {
|
|
|
1808
1814
|
return node.title || node.key;
|
|
1809
1815
|
}
|
|
1810
1816
|
|
|
1817
|
+
function _define_property$6(obj, key, value) {
|
|
1818
|
+
if (key in obj) {
|
|
1819
|
+
Object.defineProperty(obj, key, {
|
|
1820
|
+
value: value,
|
|
1821
|
+
enumerable: true,
|
|
1822
|
+
configurable: true,
|
|
1823
|
+
writable: true
|
|
1824
|
+
});
|
|
1825
|
+
} else {
|
|
1826
|
+
obj[key] = value;
|
|
1827
|
+
}
|
|
1828
|
+
return obj;
|
|
1829
|
+
}
|
|
1830
|
+
function _object_spread$5(target) {
|
|
1831
|
+
for(var i = 1; i < arguments.length; i++){
|
|
1832
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
1833
|
+
var ownKeys = Object.keys(source);
|
|
1834
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1835
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1836
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1837
|
+
}));
|
|
1838
|
+
}
|
|
1839
|
+
ownKeys.forEach(function(key) {
|
|
1840
|
+
_define_property$6(target, key, source[key]);
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
return target;
|
|
1844
|
+
}
|
|
1845
|
+
function ownKeys$4(object, enumerableOnly) {
|
|
1846
|
+
var keys = Object.keys(object);
|
|
1847
|
+
if (Object.getOwnPropertySymbols) {
|
|
1848
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
1849
|
+
keys.push.apply(keys, symbols);
|
|
1850
|
+
}
|
|
1851
|
+
return keys;
|
|
1852
|
+
}
|
|
1853
|
+
function _object_spread_props$4(target, source) {
|
|
1854
|
+
source = source != null ? source : {};
|
|
1855
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
1856
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1857
|
+
} else {
|
|
1858
|
+
ownKeys$4(Object(source)).forEach(function(key) {
|
|
1859
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1860
|
+
});
|
|
1861
|
+
}
|
|
1862
|
+
return target;
|
|
1863
|
+
}
|
|
1811
1864
|
exports.XpertTypeEnum = void 0;
|
|
1812
1865
|
(function(XpertTypeEnum) {
|
|
1813
1866
|
/**
|
|
@@ -1820,6 +1873,17 @@ exports.XpertTypeEnum = void 0;
|
|
|
1820
1873
|
* Knowledge Workflow
|
|
1821
1874
|
*/ XpertTypeEnum["Knowledge"] = "knowledge";
|
|
1822
1875
|
})(exports.XpertTypeEnum || (exports.XpertTypeEnum = {}));
|
|
1876
|
+
/**
|
|
1877
|
+
* Config for Agent execution (Langgraph.js)
|
|
1878
|
+
*/ var DEFAULT_XPERT_AGENT_RECURSION_LIMIT = 1000;
|
|
1879
|
+
function getXpertAgentRecursionLimit(agentConfig) {
|
|
1880
|
+
return typeof (agentConfig === null || agentConfig === void 0 ? void 0 : agentConfig.recursionLimit) === "number" ? agentConfig.recursionLimit : DEFAULT_XPERT_AGENT_RECURSION_LIMIT;
|
|
1881
|
+
}
|
|
1882
|
+
function normalizeXpertAgentConfig(agentConfig) {
|
|
1883
|
+
return _object_spread_props$4(_object_spread$5({}, agentConfig !== null && agentConfig !== void 0 ? agentConfig : {}), {
|
|
1884
|
+
recursionLimit: getXpertAgentRecursionLimit(agentConfig)
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1823
1887
|
exports.LongTermMemoryTypeEnum = void 0;
|
|
1824
1888
|
(function(LongTermMemoryTypeEnum) {
|
|
1825
1889
|
LongTermMemoryTypeEnum["PROFILE"] = "profile";
|
|
@@ -2003,6 +2067,9 @@ var STATE_SYS_VOLUME = "volume";
|
|
|
2003
2067
|
/**
|
|
2004
2068
|
* URL for workspace files in sandbox environment
|
|
2005
2069
|
*/ var STATE_SYS_WORKSPACE_URL = "workspace_url";
|
|
2070
|
+
/**
|
|
2071
|
+
* Current runtime thread id
|
|
2072
|
+
*/ var STATE_SYS_THREAD_ID = "thread_id";
|
|
2006
2073
|
var STATE_VARIABLE_TITLE_CHANNEL = channelName("title");
|
|
2007
2074
|
// Helpers
|
|
2008
2075
|
function channelName(name) {
|
|
@@ -2020,9 +2087,9 @@ function messageContentText(content) {
|
|
|
2020
2087
|
return (configurable === null || configurable === void 0 ? void 0 : configurable.projectId) ? {
|
|
2021
2088
|
type: "project",
|
|
2022
2089
|
id: ""
|
|
2023
|
-
} : (configurable === null || configurable === void 0 ? void 0 : configurable.thread_id) ? {
|
|
2024
|
-
type: "
|
|
2025
|
-
id:
|
|
2090
|
+
} : (configurable === null || configurable === void 0 ? void 0 : configurable.userId) || (configurable === null || configurable === void 0 ? void 0 : configurable.thread_id) ? {
|
|
2091
|
+
type: "user",
|
|
2092
|
+
id: ""
|
|
2026
2093
|
} : {};
|
|
2027
2094
|
}
|
|
2028
2095
|
function getToolCallFromConfig(config) {
|
|
@@ -4795,6 +4862,7 @@ exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
|
|
|
4795
4862
|
exports.API_PRINCIPAL_USER_ID_HEADER = API_PRINCIPAL_USER_ID_HEADER;
|
|
4796
4863
|
exports.Attachment_Type_Options = Attachment_Type_Options;
|
|
4797
4864
|
exports.CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY;
|
|
4865
|
+
exports.CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;
|
|
4798
4866
|
exports.CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE;
|
|
4799
4867
|
exports.CONTEXT_VARIABLE_CURRENTSTATE = CONTEXT_VARIABLE_CURRENTSTATE;
|
|
4800
4868
|
exports.DEFAULT_CURRENCIES = DEFAULT_CURRENCIES;
|
|
@@ -4806,6 +4874,7 @@ exports.DEFAULT_REVENUE_BASED_BONUS = DEFAULT_REVENUE_BASED_BONUS;
|
|
|
4806
4874
|
exports.DEFAULT_SYSTEM_ROLES = DEFAULT_SYSTEM_ROLES;
|
|
4807
4875
|
exports.DEFAULT_TENANT = DEFAULT_TENANT;
|
|
4808
4876
|
exports.DEFAULT_TIME_FORMATS = DEFAULT_TIME_FORMATS;
|
|
4877
|
+
exports.DEFAULT_XPERT_AGENT_RECURSION_LIMIT = DEFAULT_XPERT_AGENT_RECURSION_LIMIT;
|
|
4809
4878
|
exports.FILE_VARIABLES = FILE_VARIABLES;
|
|
4810
4879
|
exports.GRAPH_NODE_SUMMARIZE_CONVERSATION = GRAPH_NODE_SUMMARIZE_CONVERSATION;
|
|
4811
4880
|
exports.GRAPH_NODE_TITLE_CONVERSATION = GRAPH_NODE_TITLE_CONVERSATION;
|
|
@@ -4840,6 +4909,7 @@ exports.PermissionApprovalStatus = PermissionApprovalStatus;
|
|
|
4840
4909
|
exports.PermissionGroups = PermissionGroups;
|
|
4841
4910
|
exports.SANDBOX_WORK_FOR_TYPES = SANDBOX_WORK_FOR_TYPES;
|
|
4842
4911
|
exports.STANDARD_METADATA_FIELDS = STANDARD_METADATA_FIELDS;
|
|
4912
|
+
exports.STATE_SYS_THREAD_ID = STATE_SYS_THREAD_ID;
|
|
4843
4913
|
exports.STATE_SYS_VOLUME = STATE_SYS_VOLUME;
|
|
4844
4914
|
exports.STATE_SYS_WORKSPACE_PATH = STATE_SYS_WORKSPACE_PATH;
|
|
4845
4915
|
exports.STATE_SYS_WORKSPACE_URL = STATE_SYS_WORKSPACE_URL;
|
|
@@ -4870,6 +4940,7 @@ exports.configurableStoreNamespace = configurableStoreNamespace;
|
|
|
4870
4940
|
exports.convertToUrlPath = convertToUrlPath;
|
|
4871
4941
|
exports.createAgentConnections = createAgentConnections;
|
|
4872
4942
|
exports.createConversationTitleSummaryEvent = createConversationTitleSummaryEvent;
|
|
4943
|
+
exports.createFollowUpConsumedEvent = createFollowUpConsumedEvent;
|
|
4873
4944
|
exports.createMessageAppendContextTracker = createMessageAppendContextTracker;
|
|
4874
4945
|
exports.createXpertGraph = createXpertGraph;
|
|
4875
4946
|
exports.createXpertNodes = createXpertNodes;
|
|
@@ -4911,6 +4982,7 @@ exports.getToolLabel = getToolLabel;
|
|
|
4911
4982
|
exports.getVariableSchema = getVariableSchema;
|
|
4912
4983
|
exports.getWorkflowTriggers = getWorkflowTriggers;
|
|
4913
4984
|
exports.getWorkspaceFromRunnable = getWorkspaceFromRunnable;
|
|
4985
|
+
exports.getXpertAgentRecursionLimit = getXpertAgentRecursionLimit;
|
|
4914
4986
|
exports.inferMessageAppendContext = inferMessageAppendContext;
|
|
4915
4987
|
exports.isAgentKey = isAgentKey;
|
|
4916
4988
|
exports.isAudioType = isAudioType;
|
|
@@ -4933,6 +5005,7 @@ exports.locateNodes = locateNodes;
|
|
|
4933
5005
|
exports.mapTranslationLanguage = mapTranslationLanguage;
|
|
4934
5006
|
exports.mergeMessageContentForDisplay = mergeMessageContentForDisplay;
|
|
4935
5007
|
exports.messageContentText = messageContentText;
|
|
5008
|
+
exports.normalizeXpertAgentConfig = normalizeXpertAgentConfig;
|
|
4936
5009
|
exports.omitXpertRelations = omitXpertRelations;
|
|
4937
5010
|
exports.replaceAgentInDraft = replaceAgentInDraft;
|
|
4938
5011
|
exports.resolveMessageAppendContext = resolveMessageAppendContext;
|
package/index.esm.js
CHANGED
|
@@ -1514,7 +1514,7 @@ var OllamaEmbeddingsProviders = [
|
|
|
1514
1514
|
AiProvider.Ollama
|
|
1515
1515
|
];
|
|
1516
1516
|
|
|
1517
|
-
function _define_property$
|
|
1517
|
+
function _define_property$7(obj, key, value) {
|
|
1518
1518
|
if (key in obj) {
|
|
1519
1519
|
Object.defineProperty(obj, key, {
|
|
1520
1520
|
value: value,
|
|
@@ -1527,7 +1527,7 @@ function _define_property$6(obj, key, value) {
|
|
|
1527
1527
|
}
|
|
1528
1528
|
return obj;
|
|
1529
1529
|
}
|
|
1530
|
-
function _object_spread$
|
|
1530
|
+
function _object_spread$6(target) {
|
|
1531
1531
|
for(var i = 1; i < arguments.length; i++){
|
|
1532
1532
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
1533
1533
|
var ownKeys = Object.keys(source);
|
|
@@ -1537,18 +1537,24 @@ function _object_spread$5(target) {
|
|
|
1537
1537
|
}));
|
|
1538
1538
|
}
|
|
1539
1539
|
ownKeys.forEach(function(key) {
|
|
1540
|
-
_define_property$
|
|
1540
|
+
_define_property$7(target, key, source[key]);
|
|
1541
1541
|
});
|
|
1542
1542
|
}
|
|
1543
1543
|
return target;
|
|
1544
1544
|
}
|
|
1545
1545
|
var CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE = "thread_context_usage";
|
|
1546
1546
|
var CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY = "conversation_title_summary";
|
|
1547
|
+
var CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = "follow_up_consumed";
|
|
1547
1548
|
function createConversationTitleSummaryEvent(event) {
|
|
1548
|
-
return _object_spread$
|
|
1549
|
+
return _object_spread$6({
|
|
1549
1550
|
type: CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY
|
|
1550
1551
|
}, event);
|
|
1551
1552
|
}
|
|
1553
|
+
function createFollowUpConsumedEvent(event) {
|
|
1554
|
+
return _object_spread$6({
|
|
1555
|
+
type: CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED
|
|
1556
|
+
}, event);
|
|
1557
|
+
}
|
|
1552
1558
|
|
|
1553
1559
|
/**
|
|
1554
1560
|
* @deprecated use ChatMessageEventTypeEnum
|
|
@@ -1806,6 +1812,53 @@ function workflowNodeIdentifier(node) {
|
|
|
1806
1812
|
return node.title || node.key;
|
|
1807
1813
|
}
|
|
1808
1814
|
|
|
1815
|
+
function _define_property$6(obj, key, value) {
|
|
1816
|
+
if (key in obj) {
|
|
1817
|
+
Object.defineProperty(obj, key, {
|
|
1818
|
+
value: value,
|
|
1819
|
+
enumerable: true,
|
|
1820
|
+
configurable: true,
|
|
1821
|
+
writable: true
|
|
1822
|
+
});
|
|
1823
|
+
} else {
|
|
1824
|
+
obj[key] = value;
|
|
1825
|
+
}
|
|
1826
|
+
return obj;
|
|
1827
|
+
}
|
|
1828
|
+
function _object_spread$5(target) {
|
|
1829
|
+
for(var i = 1; i < arguments.length; i++){
|
|
1830
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
1831
|
+
var ownKeys = Object.keys(source);
|
|
1832
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1833
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1834
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1835
|
+
}));
|
|
1836
|
+
}
|
|
1837
|
+
ownKeys.forEach(function(key) {
|
|
1838
|
+
_define_property$6(target, key, source[key]);
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
1841
|
+
return target;
|
|
1842
|
+
}
|
|
1843
|
+
function ownKeys$4(object, enumerableOnly) {
|
|
1844
|
+
var keys = Object.keys(object);
|
|
1845
|
+
if (Object.getOwnPropertySymbols) {
|
|
1846
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
1847
|
+
keys.push.apply(keys, symbols);
|
|
1848
|
+
}
|
|
1849
|
+
return keys;
|
|
1850
|
+
}
|
|
1851
|
+
function _object_spread_props$4(target, source) {
|
|
1852
|
+
source = source != null ? source : {};
|
|
1853
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
1854
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1855
|
+
} else {
|
|
1856
|
+
ownKeys$4(Object(source)).forEach(function(key) {
|
|
1857
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
return target;
|
|
1861
|
+
}
|
|
1809
1862
|
var XpertTypeEnum;
|
|
1810
1863
|
(function(XpertTypeEnum) {
|
|
1811
1864
|
/**
|
|
@@ -1818,6 +1871,17 @@ var XpertTypeEnum;
|
|
|
1818
1871
|
* Knowledge Workflow
|
|
1819
1872
|
*/ XpertTypeEnum["Knowledge"] = "knowledge";
|
|
1820
1873
|
})(XpertTypeEnum || (XpertTypeEnum = {}));
|
|
1874
|
+
/**
|
|
1875
|
+
* Config for Agent execution (Langgraph.js)
|
|
1876
|
+
*/ var DEFAULT_XPERT_AGENT_RECURSION_LIMIT = 1000;
|
|
1877
|
+
function getXpertAgentRecursionLimit(agentConfig) {
|
|
1878
|
+
return typeof (agentConfig === null || agentConfig === void 0 ? void 0 : agentConfig.recursionLimit) === "number" ? agentConfig.recursionLimit : DEFAULT_XPERT_AGENT_RECURSION_LIMIT;
|
|
1879
|
+
}
|
|
1880
|
+
function normalizeXpertAgentConfig(agentConfig) {
|
|
1881
|
+
return _object_spread_props$4(_object_spread$5({}, agentConfig !== null && agentConfig !== void 0 ? agentConfig : {}), {
|
|
1882
|
+
recursionLimit: getXpertAgentRecursionLimit(agentConfig)
|
|
1883
|
+
});
|
|
1884
|
+
}
|
|
1821
1885
|
var LongTermMemoryTypeEnum;
|
|
1822
1886
|
(function(LongTermMemoryTypeEnum) {
|
|
1823
1887
|
LongTermMemoryTypeEnum["PROFILE"] = "profile";
|
|
@@ -2001,6 +2065,9 @@ var STATE_SYS_VOLUME = "volume";
|
|
|
2001
2065
|
/**
|
|
2002
2066
|
* URL for workspace files in sandbox environment
|
|
2003
2067
|
*/ var STATE_SYS_WORKSPACE_URL = "workspace_url";
|
|
2068
|
+
/**
|
|
2069
|
+
* Current runtime thread id
|
|
2070
|
+
*/ var STATE_SYS_THREAD_ID = "thread_id";
|
|
2004
2071
|
var STATE_VARIABLE_TITLE_CHANNEL = channelName("title");
|
|
2005
2072
|
// Helpers
|
|
2006
2073
|
function channelName(name) {
|
|
@@ -2018,9 +2085,9 @@ function messageContentText(content) {
|
|
|
2018
2085
|
return (configurable === null || configurable === void 0 ? void 0 : configurable.projectId) ? {
|
|
2019
2086
|
type: "project",
|
|
2020
2087
|
id: ""
|
|
2021
|
-
} : (configurable === null || configurable === void 0 ? void 0 : configurable.thread_id) ? {
|
|
2022
|
-
type: "
|
|
2023
|
-
id:
|
|
2088
|
+
} : (configurable === null || configurable === void 0 ? void 0 : configurable.userId) || (configurable === null || configurable === void 0 ? void 0 : configurable.thread_id) ? {
|
|
2089
|
+
type: "user",
|
|
2090
|
+
id: ""
|
|
2024
2091
|
} : {};
|
|
2025
2092
|
}
|
|
2026
2093
|
function getToolCallFromConfig(config) {
|
|
@@ -4789,4 +4856,4 @@ var PLUGIN_LOAD_STATUS = {
|
|
|
4789
4856
|
FAILED: "failed"
|
|
4790
4857
|
};
|
|
4791
4858
|
|
|
4792
|
-
export { AIPermissionsEnum, AI_MODEL_TYPE_VARIABLE, API_PRINCIPAL_USER_ID_HEADER, AccessEnum, AgentEventType, AgentType, AiBusinessRole, AiFeatureEnum, AiModelTypeEnum, AiProtocol, AiProvider, AiProviderRole, AlignmentOptions, AnalyticsFeatures, AnalyticsPermissionsEnum, ApiAuthType, ApiKeyBindingType, ApiProviderSchemaType, ApprovalPolicyTypesEnum, ApprovalPolicyTypesStringEnum, AssistantBindingScope, AssistantBindingSourceScope, AssistantCode, Attachment_Type_Options, AuthenticationEnum, BIInterruptMessageType, BonusTypeEnum, BusinessAreaRole, BusinessType, CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY, CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE, CONTEXT_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, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FeedTypeEnum, FetchFrom, FileStorageProviderEnum, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IndicatorDraftFields, IndicatorOptionFields, IndicatorStatusEnum, IndicatorTagEnum, IndicatorType, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseTypeEnum, 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_WORK_FOR_TYPES, SMTPSecureEnum, STANDARD_METADATA_FIELDS, 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, ScheduleTaskStatus, SemanticModelStatusEnum, StoryStatusEnum, StoryTemplateType, SubscriptionType, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, TENANT_AGENT_LOCAL_URL, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, TimeGranularity, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, VisitEntityEnum, VisitTypeEnum, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XpertAgentExecutionStatusEnum, XpertParameterTypeEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createMessageAppendContextTracker, createXpertGraph, createXpertNodes, embeddingCubeCollectionName, extractSemanticModelDraft, figureOutXpert, filterMessageText, findStartNodes, genJSONParseKey, genJSONStringifyKey, genListOperatorKey, genPipelineChunkerKey, genPipelineKnowledgeBaseKey, genPipelineProcessorKey, genPipelineSourceKey, genPipelineUnderstandingKey, genVariableAggregatorKey, genXpertDBDeleteKey, genXpertDBInsertKey, genXpertDBQueryKey, genXpertDBSqlKey, genXpertDBUpdateKey, genXpertIteratorKey, genXpertMiddlewareKey, genXpertSkillKey, genXpertStartKey, genXpertTriggerKey, generateCronExpression, getAgentMiddlewareNodes, getAgentVarGroup, getAssistantManagement, getCurrentGraph, getEnabledTools, getStoreNamespace, getSwarmPartners, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, inferMessageAppendContext, isAgentKey, isAudioType, isDocumentSheet, isEnableTool, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isMessageGroup, isMiddlewareToolEnabled, isRouterKey, isSystemManagedAssistant, isToolEnabled, isUserManagedAssistant, isVideoType, isXpertNodeType, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, omitXpertRelations, replaceAgentInDraft, resolveMessageAppendContext, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, uuid, workflowNodeIdentifier, xpertLabel };
|
|
4859
|
+
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_VARIABLE_CURRENTSTATE, ChatDashboardMessageType, ChatGatewayEvent, ChatMessageEventTypeEnum, ChatMessageFeedbackRatingEnum, ChatMessageStepCategory, ChatMessageTypeEnum, ClientFocusEnum, ConfigurateMethod, ContactOrganizationInviteStatus, ContactType, CredentialFormTypeEnum, CredentialsType, CrudActionEnum, CurrenciesEnum, CurrencyPosition, DEFAULT_CURRENCIES, DEFAULT_DATE_FORMATS, DEFAULT_INTEGRATION_PAID_FILTERS, DEFAULT_INVITE_EXPIRY_PERIOD, DEFAULT_PROFIT_BASED_BONUS, DEFAULT_REVENUE_BASED_BONUS, DEFAULT_SYSTEM_ROLES, DEFAULT_TENANT, DEFAULT_TIME_FORMATS, DEFAULT_TYPE, DEFAULT_XPERT_AGENT_RECURSION_LIMIT, DataSourceProtocolEnum, DataSourceSyntaxEnum, DataSourceTypeEnum, DefaultValueDateTypeEnum, DocumentSourceProviderCategoryEnum, DocumentTypeEnum, EmailTemplateEnum, EmailTemplateNameEnum, EmbeddingStatusEnum, FILE_VARIABLES, FeatureEnum, FeatureStatusEnum, FeedTypeEnum, FetchFrom, FileStorageProviderEnum, GRAPH_NODE_SUMMARIZE_CONVERSATION, GRAPH_NODE_TITLE_CONVERSATION, HttpStatus, IFeatureToggleTypeEnum, INTEGRATION_PROVIDERS, ImportHistoryStatusEnum, ImportTypeEnum, IndicatorDraftFields, IndicatorOptionFields, IndicatorStatusEnum, IndicatorTagEnum, IndicatorType, IntegrationEnum, IntegrationFeatureEnum, IntegrationFilterEnum, IntegrationGitHubProvider, IntegrationLarkProvider, InterruptMessageType, InvitationExpirationEnum, InvitationTypeEnum, InviteStatusEnum, IteratingIndexParameterName, IteratingItemParameterName, IteratorIndexParameterName, IteratorItemParameterName, KBDocumentCategoryEnum, KBDocumentStatusEnum, KDocumentSourceType, KDocumentWebTypeEnum, KDocumentWebTypeOptions, KNOWLEDGE_DOCUMENTS_NAME, KNOWLEDGE_FOLDER_ID_NAME, KNOWLEDGE_SOURCES_NAME, KNOWLEDGE_STAGE_NAME, KnowledgeProviderEnum, KnowledgeStructureEnum, KnowledgeTask, KnowledgebaseChannel, KnowledgebasePermission, KnowledgebaseTypeEnum, 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_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, ScheduleTaskStatus, SemanticModelStatusEnum, StoryStatusEnum, StoryTemplateType, SubscriptionType, TASK_DESCRIPTION_PREFIX, TASK_DESCRIPTION_SUFFIX, TENANT_AGENT_LOCAL_URL, TOOL_NAME_REGEX, TagCategoryEnum, TaskFrequency, TaskListTypeEnum, TimeGranularity, ToolParameterForm, ToolParameterType, ToolTagEnum, TranslationLanguageMap, USAGE_HOUR_FORMAT, UserType, VariableOperationEnum, VariableOperations, VectorTypeEnum, Visibility, VisitEntityEnum, VisitTypeEnum, WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME, WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER, WeekDaysEnum, WorkflowComparisonOperator, WorkflowLogicalOperator, WorkflowNodeTypeEnum, XpertAgentExecutionStatusEnum, XpertParameterTypeEnum, XpertTableStatus, XpertToolsetCategoryEnum, XpertTypeEnum, agentLabel, agentUniqueName, allChannels, appendMessageContent, appendMessagePlainText, buildChunkTree, channelName, classificateDocumentCategory, collectTreeLeaves, configurableStoreNamespace, convertToUrlPath, createAgentConnections, createConversationTitleSummaryEvent, createFollowUpConsumedEvent, createMessageAppendContextTracker, createXpertGraph, createXpertNodes, embeddingCubeCollectionName, extractSemanticModelDraft, figureOutXpert, filterMessageText, findStartNodes, genJSONParseKey, genJSONStringifyKey, genListOperatorKey, genPipelineChunkerKey, genPipelineKnowledgeBaseKey, genPipelineProcessorKey, genPipelineSourceKey, genPipelineUnderstandingKey, genVariableAggregatorKey, genXpertDBDeleteKey, genXpertDBInsertKey, genXpertDBQueryKey, genXpertDBSqlKey, genXpertDBUpdateKey, genXpertIteratorKey, genXpertMiddlewareKey, genXpertSkillKey, genXpertStartKey, genXpertTriggerKey, generateCronExpression, getAgentMiddlewareNodes, getAgentVarGroup, getAssistantManagement, getCurrentGraph, getEnabledTools, getStoreNamespace, getSwarmPartners, getToolCallFromConfig, getToolCallIdFromConfig, getToolLabel, getVariableSchema, getWorkflowTriggers, getWorkspaceFromRunnable, getXpertAgentRecursionLimit, inferMessageAppendContext, isAgentKey, isAudioType, isDocumentSheet, isEnableTool, isImageType, isInterruptMessage, isIteratingKey, isIteratorKey, isMessageGroup, isMiddlewareToolEnabled, isRouterKey, isSystemManagedAssistant, isToolEnabled, isUserManagedAssistant, isVideoType, isXpertNodeType, letterStartSUID, locateNodes, mapTranslationLanguage, mergeMessageContentForDisplay, messageContentText, normalizeXpertAgentConfig, omitXpertRelations, replaceAgentInDraft, resolveMessageAppendContext, setStateVariable, shortTitle, stringifyMessageContent, transformInstallation, uuid, workflowNodeIdentifier, xpertLabel };
|
package/package.json
CHANGED
package/src/agent/graph.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ 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
|
+
/**
|
|
28
|
+
* Current runtime thread id
|
|
29
|
+
*/
|
|
30
|
+
export declare const STATE_SYS_THREAD_ID = "thread_id";
|
|
27
31
|
export declare const STATE_VARIABLE_TITLE_CHANNEL: string;
|
|
28
32
|
export type TMessageChannel = {
|
|
29
33
|
system: string;
|
|
@@ -93,6 +97,16 @@ export type TAgentRunnableConfigurable = {
|
|
|
93
97
|
* Execution id of agent workflow node
|
|
94
98
|
*/
|
|
95
99
|
executionId: string;
|
|
100
|
+
/**
|
|
101
|
+
* Root execution id of the current agent run.
|
|
102
|
+
* Nested subgraphs keep writing steer follow-ups back into this execution.
|
|
103
|
+
*/
|
|
104
|
+
rootExecutionId?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Root agent key of the current agent run.
|
|
107
|
+
* Nested subgraphs use this as the primary transcript/log channel.
|
|
108
|
+
*/
|
|
109
|
+
rootAgentKey?: string;
|
|
96
110
|
/**
|
|
97
111
|
* Sandbox backend context
|
|
98
112
|
*/
|
|
@@ -117,7 +131,7 @@ export declare function messageContentText(content: string | TMessageContentComp
|
|
|
117
131
|
* @returns
|
|
118
132
|
*/
|
|
119
133
|
export declare function getWorkspaceFromRunnable(configurable: TAgentRunnableConfigurable): {
|
|
120
|
-
type?: 'project' | '
|
|
134
|
+
type?: 'project' | 'user';
|
|
121
135
|
id?: string;
|
|
122
136
|
};
|
|
123
137
|
export declare function getToolCallFromConfig(config: any): TToolCall;
|
|
@@ -31,9 +31,10 @@ export interface IAssistantBindingSkillPreference {
|
|
|
31
31
|
disabledSkillIds: string[];
|
|
32
32
|
}
|
|
33
33
|
export interface IAssistantBindingConversationPreferences {
|
|
34
|
-
version:
|
|
34
|
+
version: 2;
|
|
35
35
|
defaultThreadId?: string | null;
|
|
36
36
|
lastThreadId?: string | null;
|
|
37
|
+
defaultFollowUpBehavior?: 'queue' | 'steer';
|
|
37
38
|
}
|
|
38
39
|
export interface IAssistantBindingToolPreferences {
|
|
39
40
|
version: 1;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import type { TChatEventMessage } from '@xpert-ai/chatkit-types';
|
|
2
2
|
export declare const CHAT_EVENT_TYPE_THREAD_CONTEXT_USAGE: "thread_context_usage";
|
|
3
3
|
export declare const CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY: "conversation_title_summary";
|
|
4
|
+
export declare const CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED: "follow_up_consumed";
|
|
4
5
|
export type TConversationTitleSummaryEvent = TChatEventMessage & {
|
|
5
6
|
id?: string;
|
|
6
7
|
type: typeof CHAT_EVENT_TYPE_CONVERSATION_TITLE_SUMMARY;
|
|
7
8
|
};
|
|
9
|
+
export type TFollowUpConsumedEvent = TChatEventMessage & {
|
|
10
|
+
type: typeof CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;
|
|
11
|
+
mode: 'steer';
|
|
12
|
+
messageIds: string[];
|
|
13
|
+
clientMessageIds?: string[];
|
|
14
|
+
executionId?: string | null;
|
|
15
|
+
visibleAt?: string | null;
|
|
16
|
+
};
|
|
8
17
|
export declare function createConversationTitleSummaryEvent(event: Omit<TConversationTitleSummaryEvent, 'type'>): TConversationTitleSummaryEvent;
|
|
18
|
+
export declare function createFollowUpConsumedEvent(event: Omit<TFollowUpConsumedEvent, 'type'>): TFollowUpConsumedEvent;
|
|
@@ -42,6 +42,10 @@ export interface IChatMessage extends IBasePerTenantAndOrganizationEntityModel,
|
|
|
42
42
|
conversationId?: string | null;
|
|
43
43
|
executionId?: string;
|
|
44
44
|
execution?: IXpertAgentExecution;
|
|
45
|
+
followUpMode?: 'queue' | 'steer';
|
|
46
|
+
followUpStatus?: 'pending' | 'consumed' | 'canceled';
|
|
47
|
+
targetExecutionId?: string | null;
|
|
48
|
+
visibleAt?: Date | string | null;
|
|
45
49
|
}
|
|
46
50
|
/**
|
|
47
51
|
* @deprecated
|
package/src/ai/types.d.ts
CHANGED
|
@@ -38,6 +38,50 @@ export declare enum EmbeddingStatusEnum {
|
|
|
38
38
|
REQUIRED = "required"
|
|
39
39
|
}
|
|
40
40
|
export declare const Attachment_Type_Options: TSelectOption<string, TXpertAttachmentType>[];
|
|
41
|
+
export type JsonSchemaUIExtensions = {
|
|
42
|
+
/**
|
|
43
|
+
* UI component variant, or custom component name
|
|
44
|
+
*/
|
|
45
|
+
component?: 'textarea' | 'select' | 'radio' | 'checkbox' | 'switch' | 'password' | string;
|
|
46
|
+
/**
|
|
47
|
+
* UI component display span (for grid layouts)
|
|
48
|
+
*/
|
|
49
|
+
span?: number;
|
|
50
|
+
/**
|
|
51
|
+
* UI component column count (for grid layouts)
|
|
52
|
+
*/
|
|
53
|
+
cols?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Additional inputs for the Custom UI component
|
|
56
|
+
*/
|
|
57
|
+
inputs?: Record<string, unknown>;
|
|
58
|
+
/**
|
|
59
|
+
* Whether this component supports selecting LangGraph state variables
|
|
60
|
+
*/
|
|
61
|
+
variable?: boolean;
|
|
62
|
+
enumLabels?: Record<string, I18nObject | string>;
|
|
63
|
+
styles?: Record<string, string>;
|
|
64
|
+
/**
|
|
65
|
+
* Help url for this field
|
|
66
|
+
*/
|
|
67
|
+
help?: I18nObject;
|
|
68
|
+
/**
|
|
69
|
+
* Field dependencies
|
|
70
|
+
*/
|
|
71
|
+
depends?: (string | {
|
|
72
|
+
name: string;
|
|
73
|
+
alias?: string;
|
|
74
|
+
})[];
|
|
75
|
+
/**
|
|
76
|
+
* Whether multiple values can be selected (for select component)
|
|
77
|
+
*/
|
|
78
|
+
multiple?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Options values url for remote select component
|
|
81
|
+
*/
|
|
82
|
+
selectUrl?: string;
|
|
83
|
+
revealable?: boolean;
|
|
84
|
+
};
|
|
41
85
|
type JsonSchema7Meta = {
|
|
42
86
|
title?: I18nObject;
|
|
43
87
|
default?: any;
|
|
@@ -46,26 +90,7 @@ type JsonSchema7Meta = {
|
|
|
46
90
|
/**
|
|
47
91
|
* UI schema extensions
|
|
48
92
|
*/
|
|
49
|
-
'x-ui'?:
|
|
50
|
-
/**
|
|
51
|
-
* UI component variant, or custom component name
|
|
52
|
-
*/
|
|
53
|
-
component?: 'textarea' | 'select' | 'radio' | 'checkbox' | 'switch' | 'password' | string;
|
|
54
|
-
/**
|
|
55
|
-
* UI component display span (for grid layouts)
|
|
56
|
-
*/
|
|
57
|
-
span?: number;
|
|
58
|
-
/**
|
|
59
|
-
* Additional inputs for the Custom UI component
|
|
60
|
-
*/
|
|
61
|
-
inputs?: Record<string, unknown>;
|
|
62
|
-
/**
|
|
63
|
-
* Whether this component supports selecting LangGraph state variables
|
|
64
|
-
*/
|
|
65
|
-
variable?: boolean;
|
|
66
|
-
enumLabels?: Record<string, I18nObject | string>;
|
|
67
|
-
styles?: Record<string, string>;
|
|
68
|
-
};
|
|
93
|
+
'x-ui'?: JsonSchemaUIExtensions;
|
|
69
94
|
};
|
|
70
95
|
export type JsonSchemaObjectType = {
|
|
71
96
|
type: "object";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TChatRequestHuman, TInterruptCommand } from '@xpert-ai/chatkit-types';
|
|
2
2
|
import { STATE_VARIABLE_HUMAN } from '@xpert-ai/chatkit-types';
|
|
3
|
+
export type TXpertFollowUpMode = 'queue' | 'steer';
|
|
3
4
|
export type TXpertChatState = {
|
|
4
5
|
[STATE_VARIABLE_HUMAN]?: TChatRequestHuman;
|
|
5
6
|
} & Record<string, any>;
|
|
@@ -43,7 +44,18 @@ export type TXpertChatRetryRequest = {
|
|
|
43
44
|
environmentId?: string;
|
|
44
45
|
checkpointId?: string;
|
|
45
46
|
};
|
|
46
|
-
export type
|
|
47
|
+
export type TXpertChatFollowUpRequest = {
|
|
48
|
+
action: 'follow_up';
|
|
49
|
+
conversationId: string;
|
|
50
|
+
mode: TXpertFollowUpMode;
|
|
51
|
+
message: {
|
|
52
|
+
clientMessageId?: string;
|
|
53
|
+
input: TChatRequestHuman;
|
|
54
|
+
};
|
|
55
|
+
target?: TXpertChatTarget;
|
|
56
|
+
state?: TXpertChatState;
|
|
57
|
+
};
|
|
58
|
+
export type TChatRequest = TXpertChatSendRequest | TXpertChatResumeRequest | TXpertChatRetryRequest | TXpertChatFollowUpRequest;
|
|
47
59
|
export type TXpertAgentChatRunRequest = {
|
|
48
60
|
action: 'run';
|
|
49
61
|
state: TXpertChatState;
|
|
@@ -63,4 +75,19 @@ export type TXpertAgentChatResumeRequest = {
|
|
|
63
75
|
environmentId?: string;
|
|
64
76
|
state?: TXpertChatState;
|
|
65
77
|
};
|
|
66
|
-
export type
|
|
78
|
+
export type TXpertAgentChatFollowUpRequest = {
|
|
79
|
+
action: 'follow_up';
|
|
80
|
+
agentKey: string;
|
|
81
|
+
xpertId: string;
|
|
82
|
+
mode: TXpertFollowUpMode;
|
|
83
|
+
message: {
|
|
84
|
+
clientMessageId?: string;
|
|
85
|
+
input: TChatRequestHuman;
|
|
86
|
+
};
|
|
87
|
+
target?: {
|
|
88
|
+
executionId?: string;
|
|
89
|
+
};
|
|
90
|
+
environmentId?: string;
|
|
91
|
+
state?: TXpertChatState;
|
|
92
|
+
};
|
|
93
|
+
export type TXpertAgentChatRequest = TXpertAgentChatRunRequest | TXpertAgentChatResumeRequest | TXpertAgentChatFollowUpRequest;
|
package/src/ai/xpert.model.d.ts
CHANGED
|
@@ -209,9 +209,10 @@ export type TXpertOptions = {
|
|
|
209
209
|
/**
|
|
210
210
|
* Config for Agent execution (Langgraph.js)
|
|
211
211
|
*/
|
|
212
|
+
export declare const DEFAULT_XPERT_AGENT_RECURSION_LIMIT = 1000;
|
|
212
213
|
export type TXpertAgentConfig = {
|
|
213
214
|
/**
|
|
214
|
-
* Maximum number of times a call can recurse. If not provided, defaults to
|
|
215
|
+
* Maximum number of times a call can recurse. If not provided, defaults to 1000.
|
|
215
216
|
*/
|
|
216
217
|
recursionLimit?: number;
|
|
217
218
|
/** Maximum number of parallel calls to make. */
|
|
@@ -277,6 +278,17 @@ export type TXpertAgentConfig = {
|
|
|
277
278
|
parameters?: Record<string, any>;
|
|
278
279
|
}>;
|
|
279
280
|
};
|
|
281
|
+
export declare function getXpertAgentRecursionLimit(agentConfig?: {
|
|
282
|
+
recursionLimit?: number | null;
|
|
283
|
+
} | null): number;
|
|
284
|
+
export declare function normalizeXpertAgentConfig(): {
|
|
285
|
+
recursionLimit: number;
|
|
286
|
+
};
|
|
287
|
+
export declare function normalizeXpertAgentConfig<T extends {
|
|
288
|
+
recursionLimit?: number | null;
|
|
289
|
+
}>(agentConfig: T): Omit<T, 'recursionLimit'> & {
|
|
290
|
+
recursionLimit: number;
|
|
291
|
+
};
|
|
280
292
|
export type TStateVariableType = XpertParameterTypeEnum | 'object' | 'array[string]' | 'array[number]' | 'array[object]';
|
|
281
293
|
/**
|
|
282
294
|
*/
|