@cognigy/rest-api-client 4.97.0 → 4.99.0

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.
Files changed (105) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/RestAPIClient.js +7 -0
  3. package/build/apigroups/AIOpsCenterAPIGroup_2_0.js +22 -0
  4. package/build/apigroups/ResourcesAPIGroup_2_0.js +8 -8
  5. package/build/apigroups/index.js +3 -1
  6. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/knowledgeAssistTemplate.js +0 -44
  7. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage0.js +0 -45
  8. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage1.js +0 -43
  9. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stageError.js +0 -45
  10. package/build/shared/charts/descriptors/analytics/completeGoal.js +2 -2
  11. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +6 -2
  12. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/mistralProviderConnection.js +11 -0
  13. package/build/shared/charts/descriptors/index.js +2 -0
  14. package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +10 -1
  15. package/build/shared/charts/descriptors/logic/think.js +2 -4
  16. package/build/shared/charts/descriptors/message/say.js +6 -3
  17. package/build/shared/charts/descriptors/service/GPTPrompt.js +14 -4
  18. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +226 -66
  19. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJobCallMCPTool.js +180 -0
  20. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJobMCPTool.js +196 -0
  21. package/build/shared/charts/descriptors/service/aiAgent/aiAgentToolAnswer.js +5 -1
  22. package/build/shared/charts/descriptors/service/index.js +5 -1
  23. package/build/shared/charts/descriptors/voice/mappers/hangup.mapper.js +9 -8
  24. package/build/shared/charts/descriptors/voice/nodes/hangup.js +1 -1
  25. package/build/shared/charts/descriptors/voicegateway/nodes/hangup.js +1 -1
  26. package/build/shared/charts/descriptors/voicegateway2/nodes/hangup.js +24 -2
  27. package/build/shared/constants.js +8 -1
  28. package/build/shared/interfaces/IProfileSchema.js +1 -1
  29. package/build/shared/interfaces/amqpInterface.js +3 -0
  30. package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +10 -1
  31. package/build/shared/interfaces/messageAPI/endpoints.js +6 -1
  32. package/build/shared/interfaces/messageAPI/handover.js +6 -1
  33. package/build/shared/interfaces/resources/IAiAgent.js +3 -1
  34. package/build/shared/interfaces/resources/ILargeLanguageModel.js +10 -1
  35. package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
  36. package/build/shared/interfaces/restAPI/opsCenter/alerts/IIndexOpsCenterAlertsRest_2_0.js +3 -0
  37. package/build/shared/interfaces/restAPI/opsCenter/alerts/IOpsCenterAlert.js +3 -0
  38. package/build/shared/interfaces/restAPI/opsCenter/component/IOpsCenterComponents.js +34 -0
  39. package/build/shared/interfaces/restAPI/opsCenter/errors/IDeleteOpsCenterErrorRest_2_0.js +3 -0
  40. package/build/shared/interfaces/restAPI/opsCenter/errors/IGetOpsCenterErrorRest_2_0.js +3 -0
  41. package/build/shared/interfaces/restAPI/opsCenter/errors/IIndexOpsCenterErrorsRest_2_0.js +3 -0
  42. package/build/shared/interfaces/restAPI/opsCenter/errors/IOpsCenterError.js +3 -0
  43. package/build/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetrics.js +3 -0
  44. package/build/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsConfigRest_2_0.js +3 -0
  45. package/build/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsRangeRest_2_0.js +3 -0
  46. package/build/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsRest_2_0.js +3 -0
  47. package/build/shared/interfaces/restAPI/opsCenter/metrics/IOpsCenterMetricsConfig.js +6 -0
  48. package/build/shared/interfaces/restAPI/opsCenter/observationConfig/IGetOpsCenterObservationConfigRest_2_0.js +3 -0
  49. package/build/shared/interfaces/restAPI/opsCenter/observationConfig/IOpsCenterObservationConfig.js +4 -0
  50. package/build/shared/interfaces/restAPI/opsCenter/observationConfig/IPatchOpsCenterObservationConfigRest_2_0.js +3 -0
  51. package/build/shared/interfaces/restAPI/opsCenter/observationConfig/ISetupOpsCenterObservationConfigRest_2_0.js +3 -0
  52. package/build/shared/interfaces/security/IIdentityProvider.js +1 -0
  53. package/dist/esm/RestAPIClient.js +7 -0
  54. package/dist/esm/apigroups/AIOpsCenterAPIGroup_2_0.js +18 -0
  55. package/dist/esm/apigroups/ResourcesAPIGroup_2_0.js +8 -8
  56. package/dist/esm/apigroups/index.js +1 -0
  57. package/dist/esm/shared/charts/descriptors/agentAssist/htmlTemplates/knowledgeAssistTemplate.js +0 -44
  58. package/dist/esm/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage0.js +0 -45
  59. package/dist/esm/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage1.js +0 -43
  60. package/dist/esm/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stageError.js +0 -45
  61. package/dist/esm/shared/charts/descriptors/analytics/completeGoal.js +2 -2
  62. package/dist/esm/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +4 -1
  63. package/dist/esm/shared/charts/descriptors/connectionNodes/generativeAIProviders/mistralProviderConnection.js +8 -0
  64. package/dist/esm/shared/charts/descriptors/index.js +3 -1
  65. package/dist/esm/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +12 -3
  66. package/dist/esm/shared/charts/descriptors/logic/think.js +2 -4
  67. package/dist/esm/shared/charts/descriptors/message/say.js +6 -3
  68. package/dist/esm/shared/charts/descriptors/service/GPTPrompt.js +18 -8
  69. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +226 -66
  70. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJobCallMCPTool.js +178 -0
  71. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJobMCPTool.js +193 -0
  72. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentToolAnswer.js +5 -1
  73. package/dist/esm/shared/charts/descriptors/service/index.js +2 -0
  74. package/dist/esm/shared/charts/descriptors/voice/mappers/hangup.mapper.js +9 -8
  75. package/dist/esm/shared/charts/descriptors/voice/nodes/hangup.js +1 -1
  76. package/dist/esm/shared/charts/descriptors/voicegateway/nodes/hangup.js +1 -1
  77. package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/hangup.js +24 -2
  78. package/dist/esm/shared/constants.js +7 -0
  79. package/dist/esm/shared/interfaces/IProfileSchema.js +1 -1
  80. package/dist/esm/shared/interfaces/amqpInterface.js +3 -0
  81. package/dist/esm/shared/interfaces/generativeAI/IGenerativeAIModels.js +10 -1
  82. package/dist/esm/shared/interfaces/messageAPI/endpoints.js +6 -1
  83. package/dist/esm/shared/interfaces/messageAPI/handover.js +6 -1
  84. package/dist/esm/shared/interfaces/resources/IAiAgent.js +3 -1
  85. package/dist/esm/shared/interfaces/resources/ILargeLanguageModel.js +9 -0
  86. package/dist/esm/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
  87. package/dist/esm/shared/interfaces/restAPI/opsCenter/alerts/IIndexOpsCenterAlertsRest_2_0.js +2 -0
  88. package/dist/esm/shared/interfaces/restAPI/opsCenter/alerts/IOpsCenterAlert.js +2 -0
  89. package/dist/esm/shared/interfaces/restAPI/opsCenter/component/IOpsCenterComponents.js +31 -0
  90. package/dist/esm/shared/interfaces/restAPI/opsCenter/errors/IDeleteOpsCenterErrorRest_2_0.js +2 -0
  91. package/dist/esm/shared/interfaces/restAPI/opsCenter/errors/IGetOpsCenterErrorRest_2_0.js +2 -0
  92. package/dist/esm/shared/interfaces/restAPI/opsCenter/errors/IIndexOpsCenterErrorsRest_2_0.js +2 -0
  93. package/dist/esm/shared/interfaces/restAPI/opsCenter/errors/IOpsCenterError.js +2 -0
  94. package/dist/esm/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetrics.js +2 -0
  95. package/dist/esm/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsConfigRest_2_0.js +2 -0
  96. package/dist/esm/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsRangeRest_2_0.js +2 -0
  97. package/dist/esm/shared/interfaces/restAPI/opsCenter/metrics/IGetOpsCenterMetricsRest_2_0.js +2 -0
  98. package/dist/esm/shared/interfaces/restAPI/opsCenter/metrics/IOpsCenterMetricsConfig.js +5 -0
  99. package/dist/esm/shared/interfaces/restAPI/opsCenter/observationConfig/IGetOpsCenterObservationConfigRest_2_0.js +2 -0
  100. package/dist/esm/shared/interfaces/restAPI/opsCenter/observationConfig/IOpsCenterObservationConfig.js +3 -0
  101. package/dist/esm/shared/interfaces/restAPI/opsCenter/observationConfig/IPatchOpsCenterObservationConfigRest_2_0.js +2 -0
  102. package/dist/esm/shared/interfaces/restAPI/opsCenter/observationConfig/ISetupOpsCenterObservationConfigRest_2_0.js +2 -0
  103. package/dist/esm/shared/interfaces/security/IIdentityProvider.js +1 -0
  104. package/package.json +2 -2
  105. package/types/index.d.ts +336 -7
@@ -0,0 +1,178 @@
1
+ import { __awaiter } from "tslib";
2
+ /* Custom modules */
3
+ import { createNodeDescriptor } from "../../../createNodeDescriptor";
4
+ import { TranscriptEntryType, TranscriptRole, } from "../../../../interfaces/transcripts/transcripts";
5
+ export const AI_AGENT_JOB_CALL_MCP_TOOL = createNodeDescriptor({
6
+ type: "aiAgentJobCallMCPTool",
7
+ defaultLabel: "Call MCP Tool",
8
+ summary: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__SUMMARY",
9
+ parentType: "",
10
+ tokens: [
11
+ {
12
+ type: "input",
13
+ label: "MCP Tool Result",
14
+ script: "input.aiAgent.toolResult",
15
+ },
16
+ ],
17
+ fields: [
18
+ {
19
+ key: "storeLocation",
20
+ type: "select",
21
+ label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__STORE_LOCATION__LABEL",
22
+ defaultValue: "input",
23
+ params: {
24
+ options: [
25
+ {
26
+ label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__STORE_LOCATION__OPTIONS__INPUT__LABEL",
27
+ value: "input",
28
+ },
29
+ {
30
+ label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__STORE_LOCATION__OPTIONS__CONTEXT__LABEL",
31
+ value: "context",
32
+ },
33
+ ],
34
+ },
35
+ },
36
+ {
37
+ key: "inputKey",
38
+ type: "cognigyText",
39
+ label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__INPUT_KEY__LABEL",
40
+ defaultValue: "aiAgent.toolResult",
41
+ condition: {
42
+ key: "storeLocation",
43
+ value: "input",
44
+ },
45
+ },
46
+ {
47
+ key: "contextKey",
48
+ type: "cognigyText",
49
+ label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__CONTEXT_KEY__LABEL",
50
+ defaultValue: "aiAgent.toolResult",
51
+ condition: {
52
+ key: "storeLocation",
53
+ value: "context",
54
+ },
55
+ },
56
+ {
57
+ key: "resolveImmediately",
58
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__FIELDS__RESOLVE_IMMEDIATELY__LABEL",
59
+ type: "toggle",
60
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__FIELDS__RESOLVE_IMMEDIATELY__DESCRIPTION",
61
+ defaultValue: false,
62
+ },
63
+ {
64
+ key: "debugToolResult",
65
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__FIELDS__DEBUG_TOOL_RESULT__LABEL",
66
+ type: "toggle",
67
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__FIELDS__DEBUG_TOOL_RESULT__DESCRIPTION",
68
+ defaultValue: false,
69
+ },
70
+ ],
71
+ sections: [
72
+ {
73
+ key: "storage",
74
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_CALL_MCP_TOOL__SECTIONS__STORAGE__LABEL",
75
+ defaultCollapsed: false,
76
+ fields: ["storeLocation", "inputKey", "contextKey"],
77
+ },
78
+ {
79
+ key: "debugging",
80
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_JOB__SECTIONS__DEBUG_SETTINGS__LABEL",
81
+ defaultCollapsed: true,
82
+ fields: ["debugToolResult"],
83
+ },
84
+ ],
85
+ form: [
86
+ { type: "field", key: "resolveImmediately" },
87
+ { type: "section", key: "storage" },
88
+ { type: "section", key: "debugging" },
89
+ ],
90
+ appearance: {
91
+ color: "#252525",
92
+ },
93
+ tags: ["ai", "aiAgent"],
94
+ function: ({ cognigy, config }) => __awaiter(void 0, void 0, void 0, function* () {
95
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
96
+ const { api } = cognigy;
97
+ const { storeLocation, contextKey, inputKey, resolveImmediately, debugToolResult } = config;
98
+ const sessionState = yield api.loadSessionState();
99
+ const toolCall = (_a = sessionState.lastToolCall) === null || _a === void 0 ? void 0 : _a.toolCall;
100
+ const aiAgentJobNode = (_b = sessionState.lastToolCall) === null || _b === void 0 ? void 0 : _b.aiAgentJobNode;
101
+ const mcpServerUrl = (_c = sessionState.lastToolCall) === null || _c === void 0 ? void 0 : _c.mcpServerUrl;
102
+ const timeout = (_d = sessionState.lastToolCall) === null || _d === void 0 ? void 0 : _d.timeout;
103
+ if (!(toolCall === null || toolCall === void 0 ? void 0 : toolCall.id)) {
104
+ (_e = api.logDebugError) === null || _e === void 0 ? void 0 : _e.call(api, "UI__DEBUG_MODE__AI_AGENT_ANSWER__ERROR__MESSAGE");
105
+ }
106
+ if (toolCall && aiAgentJobNode && mcpServerUrl && timeout) {
107
+ let toolResult = null;
108
+ let fullResult = null;
109
+ try {
110
+ toolResult = yield api.executeMcpTool({
111
+ mcpServerUrl,
112
+ toolName: toolCall.function.name,
113
+ toolArgs: toolCall.function.arguments,
114
+ timeout,
115
+ });
116
+ fullResult = JSON.stringify(toolResult, null, 2);
117
+ if (debugToolResult) {
118
+ (_f = api.logDebugMessage) === null || _f === void 0 ? void 0 : _f.call(api, `Tool <b>${(_g = toolCall === null || toolCall === void 0 ? void 0 : toolCall.function) === null || _g === void 0 ? void 0 : _g.name}</b> called successfully.<br><br><b>Result:</b><br>${fullResult}`);
119
+ }
120
+ }
121
+ catch (error) {
122
+ const errorDetails = error instanceof Error
123
+ ? {
124
+ name: error.name,
125
+ message: error.message,
126
+ }
127
+ : error;
128
+ (_h = api.logDebugError) === null || _h === void 0 ? void 0 : _h.call(api, `Failed to execute MCP Tool ${(_j = toolCall === null || toolCall === void 0 ? void 0 : toolCall.function) === null || _j === void 0 ? void 0 : _j.name}:<br>${JSON.stringify(errorDetails, null, 2)}`);
129
+ }
130
+ // Add result to Cognigy Input/Context for further usage
131
+ if (storeLocation === "context") {
132
+ (_k = api.addToContext) === null || _k === void 0 ? void 0 : _k.call(api, contextKey, toolResult, "simple");
133
+ }
134
+ else if (storeLocation === "input") {
135
+ api.addToInput(inputKey, toolResult);
136
+ }
137
+ const { flow, node } = aiAgentJobNode;
138
+ if (resolveImmediately && fullResult && flow && node) {
139
+ // Add Tool Call Message to Transcript
140
+ const toolCallTranscriptStep = {
141
+ role: TranscriptRole.ASSISTANT,
142
+ type: TranscriptEntryType.TOOL_CALL,
143
+ source: "system",
144
+ payload: {
145
+ name: toolCall.function.name,
146
+ id: toolCall.id,
147
+ input: toolCall.function.arguments,
148
+ },
149
+ };
150
+ yield api.addTranscriptStep(toolCallTranscriptStep);
151
+ // Add Tool Answer Message to Transcript
152
+ const toolAnswer = {
153
+ role: TranscriptRole.TOOL,
154
+ type: TranscriptEntryType.TOOL_ANSWER,
155
+ source: "system",
156
+ payload: {
157
+ toolCallId: toolCall.id,
158
+ content: fullResult,
159
+ },
160
+ };
161
+ yield api.addTranscriptStep(toolAnswer);
162
+ api.resetNextNodes();
163
+ // remove the call from the session state, because the call has been answered
164
+ api.updateSessionStateValues({
165
+ lastToolCall: undefined,
166
+ });
167
+ yield api.executeFlow({
168
+ flowNode: {
169
+ flow,
170
+ node,
171
+ },
172
+ absorbContext: true,
173
+ });
174
+ }
175
+ }
176
+ }),
177
+ });
178
+ //# sourceMappingURL=aiAgentJobCallMCPTool.js.map
@@ -0,0 +1,193 @@
1
+ /* Custom modules */
2
+ import { createNodeDescriptor } from "../../../createNodeDescriptor";
3
+ export const AI_AGENT_JOB_MCP_TOOL = createNodeDescriptor({
4
+ type: "aiAgentJobMCPTool",
5
+ defaultLabel: "MCP Tool",
6
+ summary: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__SUMMARY",
7
+ parentType: "aiAgentJob",
8
+ constraints: {
9
+ editable: true,
10
+ deletable: true,
11
+ collapsable: true,
12
+ creatable: true,
13
+ movable: true,
14
+ placement: {
15
+ predecessor: {
16
+ whitelist: [],
17
+ },
18
+ },
19
+ childFlowCreatable: false,
20
+ },
21
+ preview: {
22
+ type: "text",
23
+ key: "name",
24
+ },
25
+ fields: [
26
+ {
27
+ type: "description",
28
+ key: "cachingWarning",
29
+ label: " ",
30
+ params: {
31
+ text: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__CACHING_WARNING__TEXT",
32
+ },
33
+ condition: {
34
+ key: "cacheTools",
35
+ value: false,
36
+ }
37
+ },
38
+ {
39
+ key: "name",
40
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__NAME__LABEL",
41
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__NAME__DESCRIPTION",
42
+ type: "cognigyText",
43
+ params: {
44
+ required: true,
45
+ rows: 1,
46
+ multiline: false,
47
+ maxLength: 64,
48
+ },
49
+ },
50
+ {
51
+ type: "description",
52
+ key: "mcpWarning",
53
+ label: " ",
54
+ params: {
55
+ text: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__MCP_WARNING__TEXT",
56
+ },
57
+ },
58
+ {
59
+ key: "mcpServerUrl",
60
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__MCP_SERVER_SSE_URL__LABEL",
61
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__MCP_SERVER_SSE_URL__DESCRIPTION",
62
+ type: "cognigyText",
63
+ params: {
64
+ required: true,
65
+ rows: 5,
66
+ multiline: true,
67
+ },
68
+ },
69
+ {
70
+ key: "timeout",
71
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TIMEOUT__LABEL",
72
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TIMEOUT__DESCRIPTION",
73
+ type: "slider",
74
+ defaultValue: 12,
75
+ params: {
76
+ min: 1,
77
+ max: 30,
78
+ step: 1,
79
+ },
80
+ },
81
+ {
82
+ key: "debugMessageFetchedTools",
83
+ type: "toggle",
84
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_TOOLS__LABEL",
85
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_TOOLS__DESCRIPTION",
86
+ defaultValue: true,
87
+ },
88
+ {
89
+ key: "debugMessageParameters",
90
+ type: "toggle",
91
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_PARAMETERS__LABEL",
92
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_PARAMETERS__DESCRIPTION",
93
+ defaultValue: false,
94
+ condition: {
95
+ key: "debugMessageFetchedTools",
96
+ value: true,
97
+ },
98
+ },
99
+ {
100
+ key: "debugMessage",
101
+ type: "toggle",
102
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_MESSAGE__LABEL",
103
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__DEBUG_MESSAGE__DESCRIPTION",
104
+ defaultValue: true,
105
+ },
106
+ {
107
+ key: "cacheTools",
108
+ type: "toggle",
109
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__CACHE_TOOLS__LABEL",
110
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__CACHE_TOOLS__DESCRIPTION",
111
+ defaultValue: true,
112
+ },
113
+ {
114
+ key: "condition",
115
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_TOOL__FIELDS__CONDITION__LABEL",
116
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_TOOL__FIELDS__CONDITION__DESCRIPTION",
117
+ type: "cognigyText",
118
+ defaultValue: "",
119
+ },
120
+ {
121
+ key: "toolFilter",
122
+ type: "select",
123
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TOOL_FILTER__LABEL",
124
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TOOL_FILTER__DESCRIPTION",
125
+ defaultValue: "none",
126
+ params: {
127
+ options: [
128
+ {
129
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TOOL_FILTER__OPTIONS__NONE__LABEL",
130
+ value: "none",
131
+ },
132
+ {
133
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TOOL_FILTER__OPTIONS__WHITELIST__LABEL",
134
+ value: "whitelist",
135
+ },
136
+ {
137
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__TOOL_FILTER__OPTIONS__BLACKLIST__LABEL",
138
+ value: "blacklist",
139
+ },
140
+ ],
141
+ },
142
+ },
143
+ {
144
+ key: "whitelist",
145
+ type: "cognigyTextArray",
146
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__WHITELIST__LABEL",
147
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__WHITELIST__DESCRIPTION",
148
+ condition: {
149
+ key: "toolFilter",
150
+ value: "whitelist",
151
+ },
152
+ },
153
+ {
154
+ key: "blacklist",
155
+ type: "cognigyTextArray",
156
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__BLACKLIST__LABEL",
157
+ description: "UI__NODE_EDITOR__SERVICE__AI_AGENT_MCP_TOOL__FIELDS__BLACKLIST__DESCRIPTION",
158
+ condition: {
159
+ key: "toolFilter",
160
+ value: "blacklist",
161
+ },
162
+ },
163
+ ],
164
+ sections: [
165
+ {
166
+ key: "debugging",
167
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_JOB__SECTIONS__DEBUG_SETTINGS__LABEL",
168
+ defaultCollapsed: true,
169
+ fields: ["debugMessageFetchedTools", "debugMessageParameters", "debugMessage"],
170
+ },
171
+ {
172
+ key: "advanced",
173
+ label: "UI__NODE_EDITOR__SERVICE__AI_AGENT_JOB__SECTIONS__ADVANCED__LABEL",
174
+ defaultCollapsed: true,
175
+ fields: ["cacheTools", "condition", "toolFilter", "whitelist", "blacklist"],
176
+ },
177
+ ],
178
+ form: [
179
+ { type: "field", key: "cachingWarning" },
180
+ { type: "field", key: "name" },
181
+ { type: "field", key: "mcpWarning" },
182
+ { type: "field", key: "mcpServerUrl" },
183
+ { type: "field", key: "timeout" },
184
+ { type: "section", key: "debugging" },
185
+ { type: "section", key: "advanced" },
186
+ ],
187
+ appearance: {
188
+ color: "white",
189
+ textColor: "#252525",
190
+ variant: "mini",
191
+ },
192
+ });
193
+ //# sourceMappingURL=aiAgentJobMCPTool.js.map
@@ -56,7 +56,7 @@ export const AI_AGENT_TOOL_ANSWER = createNodeDescriptor({
56
56
  },
57
57
  tags: ["ai", "aiAgent"],
58
58
  function: ({ cognigy, config, nodeId: thisNodeId }) => __awaiter(void 0, void 0, void 0, function* () {
59
- var _a, _b, _c, _d, _e;
59
+ var _a, _b, _c, _d, _e, _f;
60
60
  const { api, context } = cognigy;
61
61
  const { answer, debugToolAnswer, } = config;
62
62
  const sessionState = yield api.loadSessionState();
@@ -88,6 +88,7 @@ export const AI_AGENT_TOOL_ANSWER = createNodeDescriptor({
88
88
  source: "system",
89
89
  payload: {
90
90
  toolCallId: toolCall.id,
91
+ name: toolCall.function.name,
91
92
  content: answer,
92
93
  }
93
94
  };
@@ -108,6 +109,9 @@ export const AI_AGENT_TOOL_ANSWER = createNodeDescriptor({
108
109
  absorbContext: true,
109
110
  });
110
111
  }
112
+ else if (!answer) {
113
+ (_f = api.logDebugError) === null || _f === void 0 ? void 0 : _f.call(api, "UI__DEBUG_MODE__AI_AGENT_ANSWER__MISSING_ANSWER");
114
+ }
111
115
  }
112
116
  else {
113
117
  throw new Error("Infinite Loop Detected");
@@ -19,7 +19,9 @@ export { LLM_ENTITY_EXTRACT } from "./LLMEntityExtract";
19
19
  export { AI_AGENT_JOB } from "./aiAgent/aiAgentJob";
20
20
  export { AI_AGENT_JOB_DEFAULT } from "./aiAgent/aiAgentJobDefault";
21
21
  export { AI_AGENT_JOB_TOOL } from "./aiAgent/aiAgentJobTool";
22
+ export { AI_AGENT_JOB_MCP_TOOL } from "./aiAgent/aiAgentJobMCPTool";
22
23
  export { AI_AGENT_TOOL_ANSWER } from "./aiAgent/aiAgentToolAnswer";
23
24
  export { AI_AGENT_HANDOVER } from "./aiAgent/aiAgentHandover";
25
+ export { AI_AGENT_JOB_CALL_MCP_TOOL } from "./aiAgent/aiAgentJobCallMCPTool";
24
26
  export { LIVE_AGENT_CONNECTION, RINGCENTRAL_ENGAGE_CONNECTION, CHATWOOT_CONNECTION, EIGHT_BY_EIGHT_CONNECTION, GENESYS_CLOUD_CONNECTION, GENESYS_CLOUD_CONNECTION_OM } from "./handoverConnections";
25
27
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  export const hangUp = {
2
- handleInput(endpointType, hangUpReason) {
2
+ handleInput(endpointType, hangUpReason, hangupImmediately) {
3
3
  switch (endpointType) {
4
4
  case "bandwidth":
5
5
  return this.handleBandwidthInput(hangUpReason);
@@ -7,23 +7,24 @@ export const hangUp = {
7
7
  return this.handleAudioCodesInput(hangUpReason);
8
8
  case "voiceGateway2":
9
9
  default:
10
- return this.handleVGInput(hangUpReason);
10
+ return this.handleVGInput(hangupImmediately, hangUpReason);
11
11
  }
12
12
  },
13
- handleVGInput(hangUpReason) {
13
+ handleVGInput(hangupImmediately, hangUpReason) {
14
14
  const payload = {
15
15
  _voiceGateway2: {
16
16
  json: {
17
- hangup: {}
17
+ hangup: {
18
+ headers: {},
19
+ hangupImmediately
20
+ }
18
21
  }
19
22
  }
20
23
  };
21
24
  if (hangUpReason) {
22
- payload._voiceGateway2.json.hangup = {
23
- headers: {
25
+ payload._voiceGateway2.json.hangup = Object.assign(Object.assign({}, payload._voiceGateway2.json.hangup), { headers: {
24
26
  "X-Reason": hangUpReason
25
- }
26
- };
27
+ } });
27
28
  }
28
29
  return payload;
29
30
  },
@@ -32,7 +32,7 @@ export const HANG_UP = createNodeDescriptor({
32
32
  const { hangupReason } = config;
33
33
  const { endpointType } = input;
34
34
  try {
35
- const payload = hangUp.handleInput(endpointType, hangupReason);
35
+ const payload = hangUp.handleInput(endpointType, hangupReason, false);
36
36
  yield api.say(null, {
37
37
  _cognigy: payload
38
38
  });
@@ -35,7 +35,7 @@ export const hangupNode = createNodeDescriptor({
35
35
  const { hangupReason } = config;
36
36
  try {
37
37
  const { isFeatureAccmEnabled } = api.getEndpointSettings();
38
- const payload = isFeatureAccmEnabled ? buildPayloadAccm("hangup", config, nodeId) : hangUp.handleInput("audioCodes", hangupReason);
38
+ const payload = isFeatureAccmEnabled ? buildPayloadAccm("hangup", config, nodeId) : hangUp.handleInput("audioCodes", hangupReason, false);
39
39
  yield api.say(null, {
40
40
  _cognigy: payload
41
41
  });
@@ -25,13 +25,35 @@ export const hangupNode = createNodeDescriptor({
25
25
  params: {
26
26
  required: true
27
27
  }
28
+ },
29
+ {
30
+ key: "hangupImmediately",
31
+ label: "UI__NODE_EDITOR__VOICEGATEWAY2__HANGUP__FIELDS__HANGUP_IMMEDIATELY__LABEL",
32
+ description: "UI__NODE_EDITOR__VOICEGATEWAY2__HANGUP__FIELDS__HANGUP_IMMEDIATELY__DESCRIPTION",
33
+ type: "toggle",
34
+ defaultValue: false,
35
+ params: {
36
+ required: true
37
+ }
28
38
  }
29
39
  ],
40
+ sections: [
41
+ {
42
+ key: "advanced",
43
+ label: "UI__NODE_EDITOR__VOICEGATEWAY2__SECTIONS__ADVANCED__LABEL",
44
+ defaultCollapsed: true,
45
+ fields: ["hangupImmediately"]
46
+ },
47
+ ],
48
+ form: [
49
+ { "type": "field", "key": "hangupReason" },
50
+ { "type": "section", "key": "advanced" },
51
+ ],
30
52
  function: ({ cognigy, config }) => __awaiter(void 0, void 0, void 0, function* () {
31
53
  const { api } = cognigy;
32
- const { hangupReason } = config;
54
+ const { hangupReason, hangupImmediately } = config;
33
55
  try {
34
- const payload = hangUp.handleInput("voiceGateway2", hangupReason);
56
+ const payload = hangUp.handleInput("voiceGateway2", hangupReason, hangupImmediately);
35
57
  yield api.say(null, {
36
58
  _cognigy: payload
37
59
  });
@@ -56,6 +56,13 @@ export const PLATFORM_PROVIDED_LLM_USE_CASES = [
56
56
  "flowGeneration",
57
57
  "lexiconGeneration",
58
58
  "generateNodeOutput",
59
+ "designTimeGeneration",
60
+ ];
61
+ export const DEPRECATED_GENAI_USE_CASES = [
62
+ "intentSentenceGeneration",
63
+ "flowGeneration",
64
+ "lexiconGeneration",
65
+ "generateNodeOutput",
59
66
  ];
60
67
  export const PLATFORM_PROVIDED_LLM_ID = "aaaaaaaa-aaaa-aaaa-aaaa-000000000000";
61
68
  export const PLATFORM_PROVIDED_LLM_CONNECTION_ID = "aaaaaaaa-aaaa-aaaa-aaaa-000000000001";
@@ -40,7 +40,7 @@ export const defaultProfile = {
40
40
  privacy_policy: {
41
41
  accepted: false
42
42
  },
43
- goals: [],
43
+ tasks: [],
44
44
  memories: [],
45
45
  };
46
46
  //# sourceMappingURL=IProfileSchema.js.map
@@ -82,6 +82,9 @@ export const executeRpcInternalParamsSchema = {
82
82
  priority: {
83
83
  type: "number",
84
84
  },
85
+ withMessageSize: {
86
+ type: "boolean",
87
+ },
85
88
  },
86
89
  };
87
90
  //# sourceMappingURL=amqpInterface.js.map
@@ -27,11 +27,17 @@ export const generativeAIModels = [
27
27
  "gemini-1.0-pro",
28
28
  "gemini-1.5-pro",
29
29
  "gemini-1.5-flash",
30
+ "gemini-2.0-flash",
31
+ "gemini-2.0-flash-lite",
30
32
  "amazon.nova-lite-v1:0",
31
33
  "amazon.nova-pro-v1:0",
32
34
  "amazon.nova-micro-v1:0",
33
35
  "anthropic.claude-3-5-sonnet-20240620-v1:0",
34
36
  "claude-3-7-sonnet-20250219",
37
+ "mistral-large-2411",
38
+ "mistral-small-2503",
39
+ "pixtral-large-2411",
40
+ "pixtral-12b-2409",
35
41
  ...embeddingModels,
36
42
  ];
37
43
  export const generativeAIProviders = [
@@ -42,7 +48,8 @@ export const generativeAIProviders = [
42
48
  "anthropic",
43
49
  "googleVertexAI",
44
50
  "googleGemini",
45
- "awsBedrock", // Bedrock models https://aws.amazon.com/bedrock/
51
+ "awsBedrock",
52
+ "mistral", // Mistral models https://docs.mistral.ai/getting-started/models/models_overview/
46
53
  ];
47
54
  export const generativeAIProvidersLabels = {
48
55
  "azureOpenAI": "Azure OpenAI",
@@ -53,6 +60,7 @@ export const generativeAIProvidersLabels = {
53
60
  "googleVertexAI": "Google Vertex AI",
54
61
  "googleGemini": "Google Gemini",
55
62
  "awsBedrock": "AWS Bedrock",
63
+ "mistral": "Mistral",
56
64
  };
57
65
  /**
58
66
  * WARNING: If you update the generativeAI useCases, please update the generativeAI
@@ -68,6 +76,7 @@ export const generativeAIUseCases = [
68
76
  "gptPromptNode",
69
77
  "aiEnhancedOutputs",
70
78
  "sentimentAnalysis",
79
+ "designTimeGeneration",
71
80
  "intentSentenceGeneration",
72
81
  "flowGeneration",
73
82
  "generateNodeOutput",
@@ -425,7 +425,12 @@ export const anyEndpointSettingsSchema = {
425
425
  timeout: { type: "integer" },
426
426
  updateContactProfileWithFacebookProfile: { type: "boolean" },
427
427
  voice: { type: "string" },
428
- webhookUrl: { type: "string", format: "uri" },
428
+ webhookUrl: {
429
+ oneOf: [
430
+ { type: "string", format: "uri" },
431
+ { type: "string", enum: [""] }
432
+ ]
433
+ },
429
434
  enableConnectionStatusIndicator: { type: "boolean" },
430
435
  enableUnreadMessageTitleIndicator: { type: "boolean" },
431
436
  showEngagementMessagesInChat: { type: "boolean" },
@@ -263,7 +263,12 @@ export const pollEventSchema = {
263
263
  disableSensitiveLogging: { type: "boolean" },
264
264
  pollingTimeoutAt: { type: "number" },
265
265
  sequence: { type: "number" },
266
- lastEventId: { type: "string" }
266
+ lastEventId: { type: "string" },
267
+ projectId: { type: "string" },
268
+ URLToken: { type: "string" },
269
+ userId: { type: "string" },
270
+ channel: { type: "string" },
271
+ retryCount: { type: "number" }
267
272
  },
268
273
  };
269
274
  export const handleHandoverRpcEventSchema = {
@@ -25,7 +25,9 @@ export const aiAgentDataSchema = {
25
25
  ttsVoice: { type: "string" },
26
26
  ttsLanguage: { type: "string" },
27
27
  ttsVendor: { type: "string" },
28
- ttsModel: { type: "string" }
28
+ ttsModel: { type: "string" },
29
+ ttsLabel: { type: "string" },
30
+ ttsDisableCache: { type: "boolean" }
29
31
  }
30
32
  },
31
33
  enableVoiceConfigs: { type: "boolean" },
@@ -11,6 +11,14 @@ export const anthropicMetaSchema = {
11
11
  customModel: { type: ["string", "null"] }
12
12
  }
13
13
  };
14
+ export const mistralMetaSchema = {
15
+ title: "mistralMetaSchema",
16
+ type: "object",
17
+ additionalProperties: false,
18
+ properties: {
19
+ customModel: { type: ["string", "null"] }
20
+ }
21
+ };
14
22
  export const awsBedrockMetaSchema = {
15
23
  title: "awsBedrockMetaSchema",
16
24
  type: "object",
@@ -129,6 +137,7 @@ export const largeLanguageModelDataSchema = {
129
137
  googleGemini: googleGeminiMetaSchema,
130
138
  alephAlpha: alephAlphaMetaSchema,
131
139
  anthropic: anthropicMetaSchema,
140
+ mistral: mistralMetaSchema,
132
141
  awsBedrock: awsBedrockMetaSchema,
133
142
  fallbacks: llmFallbackSchema,
134
143
  resourceLevel: { type: "string", enum: ["organisation", "project"] },
@@ -27,6 +27,10 @@ export const generativeAISettingsDataSchema = {
27
27
  type: "object",
28
28
  additionalProperties: false,
29
29
  properties: {
30
+ designTimeGeneration: {
31
+ type: "object",
32
+ properties: Object.assign({}, generativeAIUseCaseDataSchema.properties)
33
+ },
30
34
  intentSentenceGeneration: {
31
35
  type: "object",
32
36
  properties: Object.assign({}, generativeAIUseCaseDataSchema.properties)
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IIndexOpsCenterAlertsRest_2_0.js.map