rasa-pro 3.14.0.dev1__py3-none-any.whl → 3.14.0.dev20250818__py3-none-any.whl

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.

Potentially problematic release.


This version of rasa-pro might be problematic. Click here for more details.

Files changed (147) hide show
  1. rasa/api.py +0 -5
  2. rasa/cli/arguments/default_arguments.py +0 -12
  3. rasa/cli/arguments/run.py +0 -2
  4. rasa/cli/dialogue_understanding_test.py +0 -4
  5. rasa/cli/e2e_test.py +0 -4
  6. rasa/cli/inspect.py +0 -3
  7. rasa/cli/llm_fine_tuning.py +0 -5
  8. rasa/cli/run.py +0 -4
  9. rasa/cli/shell.py +0 -3
  10. rasa/constants.py +0 -6
  11. rasa/core/actions/action.py +2 -42
  12. rasa/core/agent.py +0 -16
  13. rasa/core/available_endpoints.py +0 -30
  14. rasa/core/channels/inspector/dist/assets/{arc-2e78c586.js → arc-1ddec37b.js} +1 -1
  15. rasa/core/channels/inspector/dist/assets/{blockDiagram-38ab4fdb-806b712e.js → blockDiagram-38ab4fdb-18af387c.js} +1 -1
  16. rasa/core/channels/inspector/dist/assets/{c4Diagram-3d4e48cf-0745efa9.js → c4Diagram-3d4e48cf-250127a3.js} +1 -1
  17. rasa/core/channels/inspector/dist/assets/channel-59f6d54b.js +1 -0
  18. rasa/core/channels/inspector/dist/assets/{classDiagram-70f12bd4-7bd1082b.js → classDiagram-70f12bd4-c3388b34.js} +1 -1
  19. rasa/core/channels/inspector/dist/assets/{classDiagram-v2-f2320105-d937ba49.js → classDiagram-v2-f2320105-9c893a82.js} +1 -1
  20. rasa/core/channels/inspector/dist/assets/clone-26177ddb.js +1 -0
  21. rasa/core/channels/inspector/dist/assets/{createText-2e5e7dd3-a2a564ca.js → createText-2e5e7dd3-c111213b.js} +1 -1
  22. rasa/core/channels/inspector/dist/assets/{edges-e0da2a9e-b5256940.js → edges-e0da2a9e-812a729d.js} +1 -1
  23. rasa/core/channels/inspector/dist/assets/{erDiagram-9861fffd-e6883ad2.js → erDiagram-9861fffd-fd5051bc.js} +1 -1
  24. rasa/core/channels/inspector/dist/assets/{flowDb-956e92f1-e576fc02.js → flowDb-956e92f1-3287ac02.js} +1 -1
  25. rasa/core/channels/inspector/dist/assets/{flowDiagram-66a62f08-2e298d01.js → flowDiagram-66a62f08-692fb0b2.js} +1 -1
  26. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-29c03f5a.js +1 -0
  27. rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-4a651766-dd7b150a.js → flowchart-elk-definition-4a651766-008376f1.js} +1 -1
  28. rasa/core/channels/inspector/dist/assets/{ganttDiagram-c361ad54-5b79575c.js → ganttDiagram-c361ad54-df330a69.js} +1 -1
  29. rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-72cf32ee-3016f40a.js → gitGraphDiagram-72cf32ee-e03676fb.js} +1 -1
  30. rasa/core/channels/inspector/dist/assets/{graph-3e19170f.js → graph-46fad2ba.js} +1 -1
  31. rasa/core/channels/inspector/dist/assets/{index-3862675e-eb9c86de.js → index-3862675e-a484ac55.js} +1 -1
  32. rasa/core/channels/inspector/dist/assets/index-a003633f.js +1335 -0
  33. rasa/core/channels/inspector/dist/assets/{infoDiagram-f8f76790-b4280e4d.js → infoDiagram-f8f76790-3f9e6ec2.js} +1 -1
  34. rasa/core/channels/inspector/dist/assets/{journeyDiagram-49397b02-556091f8.js → journeyDiagram-49397b02-79f72383.js} +1 -1
  35. rasa/core/channels/inspector/dist/assets/{layout-08436411.js → layout-aad098e5.js} +1 -1
  36. rasa/core/channels/inspector/dist/assets/{line-683c4f3b.js → line-219ab7ae.js} +1 -1
  37. rasa/core/channels/inspector/dist/assets/{linear-cee6d791.js → linear-2cddbe62.js} +1 -1
  38. rasa/core/channels/inspector/dist/assets/{mindmap-definition-fc14e90a-a0bf0b1a.js → mindmap-definition-fc14e90a-1d41ed99.js} +1 -1
  39. rasa/core/channels/inspector/dist/assets/{pieDiagram-8a3498a8-3730d5c4.js → pieDiagram-8a3498a8-cc496ee8.js} +1 -1
  40. rasa/core/channels/inspector/dist/assets/{quadrantDiagram-120e2f19-12a20fed.js → quadrantDiagram-120e2f19-84d32884.js} +1 -1
  41. rasa/core/channels/inspector/dist/assets/{requirementDiagram-deff3bca-b9732102.js → requirementDiagram-deff3bca-c0deb984.js} +1 -1
  42. rasa/core/channels/inspector/dist/assets/{sankeyDiagram-04a897e0-a2e72776.js → sankeyDiagram-04a897e0-b9d7fd62.js} +1 -1
  43. rasa/core/channels/inspector/dist/assets/{sequenceDiagram-704730f1-8b7a76bb.js → sequenceDiagram-704730f1-7d517565.js} +1 -1
  44. rasa/core/channels/inspector/dist/assets/{stateDiagram-587899a1-e65853ac.js → stateDiagram-587899a1-98ef9b27.js} +1 -1
  45. rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-d93cdb3a-6f58a44b.js → stateDiagram-v2-d93cdb3a-cee70748.js} +1 -1
  46. rasa/core/channels/inspector/dist/assets/{styles-6aaf32cf-df25b934.js → styles-6aaf32cf-3f9d1c96.js} +1 -1
  47. rasa/core/channels/inspector/dist/assets/{styles-9a916d00-88357141.js → styles-9a916d00-67471923.js} +1 -1
  48. rasa/core/channels/inspector/dist/assets/{styles-c10674c1-d600174d.js → styles-c10674c1-bd093fb7.js} +1 -1
  49. rasa/core/channels/inspector/dist/assets/{svgDrawCommon-08f97a94-4adc3e0b.js → svgDrawCommon-08f97a94-675794e8.js} +1 -1
  50. rasa/core/channels/inspector/dist/assets/{timeline-definition-85554ec2-42816fa1.js → timeline-definition-85554ec2-0ac67617.js} +1 -1
  51. rasa/core/channels/inspector/dist/assets/{xychartDiagram-e933f94c-621eb66a.js → xychartDiagram-e933f94c-c018dc37.js} +1 -1
  52. rasa/core/channels/inspector/dist/index.html +1 -1
  53. rasa/core/channels/inspector/src/components/DialogueStack.tsx +5 -7
  54. rasa/core/channels/inspector/src/helpers/formatters.ts +3 -24
  55. rasa/core/channels/inspector/src/theme/base/styles.ts +1 -19
  56. rasa/core/channels/inspector/src/types.ts +0 -4
  57. rasa/core/constants.py +0 -4
  58. rasa/core/policies/enterprise_search_policy.py +2 -4
  59. rasa/core/policies/flow_policy.py +2 -2
  60. rasa/core/policies/flows/flow_executor.py +35 -374
  61. rasa/core/processor.py +1 -6
  62. rasa/core/run.py +1 -8
  63. rasa/core/utils.py +1 -21
  64. rasa/dialogue_understanding/commands/__init__.py +0 -8
  65. rasa/dialogue_understanding/commands/cancel_flow_command.py +4 -97
  66. rasa/dialogue_understanding/commands/chit_chat_answer_command.py +0 -11
  67. rasa/dialogue_understanding/commands/knowledge_answer_command.py +0 -11
  68. rasa/dialogue_understanding/commands/start_flow_command.py +8 -129
  69. rasa/dialogue_understanding/commands/utils.py +2 -6
  70. rasa/dialogue_understanding/generator/command_parser.py +0 -4
  71. rasa/dialogue_understanding/generator/llm_based_command_generator.py +12 -50
  72. rasa/dialogue_understanding/generator/single_step/compact_llm_command_generator.py +6 -7
  73. rasa/dialogue_understanding/generator/single_step/search_ready_llm_command_generator.py +6 -7
  74. rasa/dialogue_understanding/generator/single_step/single_step_based_llm_command_generator.py +2 -41
  75. rasa/dialogue_understanding/patterns/continue_interrupted.py +1 -163
  76. rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml +7 -51
  77. rasa/dialogue_understanding/stack/dialogue_stack.py +2 -123
  78. rasa/dialogue_understanding/stack/frames/flow_stack_frame.py +0 -57
  79. rasa/dialogue_understanding/stack/utils.py +2 -3
  80. rasa/dialogue_understanding_test/du_test_runner.py +2 -7
  81. rasa/e2e_test/e2e_test_runner.py +0 -5
  82. rasa/server.py +0 -10
  83. rasa/shared/constants.py +0 -5
  84. rasa/shared/core/constants.py +1 -12
  85. rasa/shared/core/domain.py +5 -5
  86. rasa/shared/core/events.py +0 -319
  87. rasa/shared/core/flows/flows_list.py +2 -2
  88. rasa/shared/core/flows/flows_yaml_schema.json +186 -101
  89. rasa/shared/core/flows/steps/call.py +5 -51
  90. rasa/shared/core/flows/validation.py +7 -45
  91. rasa/shared/core/flows/yaml_flows_io.py +3 -3
  92. rasa/shared/providers/llm/_base_litellm_client.py +7 -39
  93. rasa/shared/providers/llm/litellm_router_llm_client.py +4 -8
  94. rasa/shared/providers/llm/llm_client.py +3 -7
  95. rasa/shared/providers/llm/llm_response.py +0 -49
  96. rasa/shared/providers/llm/self_hosted_llm_client.py +4 -8
  97. rasa/shared/utils/llm.py +5 -28
  98. rasa/shared/utils/schemas/events.py +0 -42
  99. rasa/studio/upload.py +7 -4
  100. rasa/tracing/instrumentation/instrumentation.py +2 -4
  101. rasa/utils/common.py +0 -53
  102. rasa/version.py +1 -1
  103. {rasa_pro-3.14.0.dev1.dist-info → rasa_pro-3.14.0.dev20250818.dist-info}/METADATA +2 -3
  104. {rasa_pro-3.14.0.dev1.dist-info → rasa_pro-3.14.0.dev20250818.dist-info}/RECORD +107 -143
  105. rasa/agents/__init__.py +0 -0
  106. rasa/agents/agent_factory.py +0 -122
  107. rasa/agents/agent_manager.py +0 -162
  108. rasa/agents/constants.py +0 -31
  109. rasa/agents/core/__init__.py +0 -0
  110. rasa/agents/core/agent_protocol.py +0 -108
  111. rasa/agents/core/types.py +0 -70
  112. rasa/agents/exceptions.py +0 -8
  113. rasa/agents/protocol/__init__.py +0 -5
  114. rasa/agents/protocol/a2a/__init__.py +0 -0
  115. rasa/agents/protocol/a2a/a2a_agent.py +0 -51
  116. rasa/agents/protocol/mcp/__init__.py +0 -0
  117. rasa/agents/protocol/mcp/mcp_base_agent.py +0 -697
  118. rasa/agents/protocol/mcp/mcp_open_agent.py +0 -275
  119. rasa/agents/protocol/mcp/mcp_task_agent.py +0 -447
  120. rasa/agents/schemas/__init__.py +0 -6
  121. rasa/agents/schemas/agent_input.py +0 -24
  122. rasa/agents/schemas/agent_output.py +0 -26
  123. rasa/agents/schemas/agent_tool_result.py +0 -51
  124. rasa/agents/schemas/agent_tool_schema.py +0 -112
  125. rasa/agents/templates/__init__.py +0 -0
  126. rasa/agents/templates/mcp_open_agent_prompt_template.jinja2 +0 -15
  127. rasa/agents/templates/mcp_task_agent_prompt_template.jinja2 +0 -13
  128. rasa/agents/utils.py +0 -72
  129. rasa/core/available_agents.py +0 -196
  130. rasa/core/channels/inspector/dist/assets/channel-c436ca7c.js +0 -1
  131. rasa/core/channels/inspector/dist/assets/clone-50dd656b.js +0 -1
  132. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-2b2aeaf8.js +0 -1
  133. rasa/core/channels/inspector/dist/assets/index-1bd9135e.js +0 -1353
  134. rasa/core/policies/flows/mcp_tool_executor.py +0 -240
  135. rasa/dialogue_understanding/commands/continue_agent_command.py +0 -91
  136. rasa/dialogue_understanding/commands/restart_agent_command.py +0 -146
  137. rasa/dialogue_understanding/generator/prompt_templates/agent_command_prompt_v2_claude_3_5_sonnet_20240620_template.jinja2 +0 -61
  138. rasa/dialogue_understanding/generator/prompt_templates/agent_command_prompt_v2_gpt_4o_2024_11_20_template.jinja2 +0 -61
  139. rasa/dialogue_understanding/generator/prompt_templates/agent_command_prompt_v3_claude_3_5_sonnet_20240620_template.jinja2 +0 -81
  140. rasa/dialogue_understanding/generator/prompt_templates/agent_command_prompt_v3_gpt_4o_2024_11_20_template.jinja2 +0 -81
  141. rasa/shared/agents/__init__.py +0 -0
  142. rasa/shared/agents/utils.py +0 -35
  143. rasa/shared/utils/mcp/__init__.py +0 -0
  144. rasa/shared/utils/mcp/server_connection.py +0 -157
  145. {rasa_pro-3.14.0.dev1.dist-info → rasa_pro-3.14.0.dev20250818.dist-info}/NOTICE +0 -0
  146. {rasa_pro-3.14.0.dev1.dist-info → rasa_pro-3.14.0.dev20250818.dist-info}/WHEEL +0 -0
  147. {rasa_pro-3.14.0.dev1.dist-info → rasa_pro-3.14.0.dev20250818.dist-info}/entry_points.txt +0 -0
@@ -1,12 +1,20 @@
1
1
  {
2
2
  "type": "object",
3
- "required": ["flows"],
3
+ "required": [
4
+ "flows"
5
+ ],
4
6
  "properties": {
5
- "version": {"type": "string"},
7
+ "version": {
8
+ "type": "string"
9
+ },
6
10
  "flows": {
7
11
  "type": "object",
8
12
  "schema_name": "dictionary of flows",
9
- "patternProperties": {"^[A-Za-z_][A-Za-z0-9_]*$": {"$ref": "#/$defs/flow"}}
13
+ "patternProperties": {
14
+ "^[A-Za-z_][A-Za-z0-9_]*$": {
15
+ "$ref": "#/$defs/flow"
16
+ }
17
+ }
10
18
  }
11
19
  },
12
20
  "$defs": {
@@ -20,22 +28,34 @@
20
28
  {
21
29
  "schema_name": "intent trigger",
22
30
  "type": "object",
23
- "required": ["intent"],
31
+ "required": [
32
+ "intent"
33
+ ],
24
34
  "additionalProperties": false,
25
35
  "properties": {
26
36
  "intent": {
27
37
  "type": "object",
28
38
  "properties": {
29
- "confidence_threshold": {"type": "number"},
30
- "name": {"type": "string"}
39
+ "confidence_threshold": {
40
+ "type": "number"
41
+ },
42
+ "name": {
43
+ "type": "string"
44
+ }
31
45
  },
32
- "required": ["name"]
46
+ "required": [
47
+ "name"
48
+ ]
33
49
  }
34
50
  }
35
51
  },
36
52
  {
37
53
  "schema_name": "simple intent trigger",
38
- "properties": {"intent": {"type": "string"}}
54
+ "properties": {
55
+ "intent": {
56
+ "type": "string"
57
+ }
58
+ }
39
59
  }
40
60
  ]
41
61
  }
@@ -46,7 +66,9 @@
46
66
  "items": {
47
67
  "type": "object",
48
68
  "properties": {
49
- "id": {"type": "string"},
69
+ "id": {
70
+ "type": "string"
71
+ },
50
72
  "next": {
51
73
  "anyOf": [
52
74
  {
@@ -57,11 +79,16 @@
57
79
  "oneOf": [
58
80
  {
59
81
  "schema_name": "if-then block",
60
- "required": ["if", "then"]
82
+ "required": [
83
+ "if",
84
+ "then"
85
+ ]
61
86
  },
62
87
  {
63
88
  "schema_name": "else block",
64
- "required": ["else"]
89
+ "required": [
90
+ "else"
91
+ ]
65
92
  }
66
93
  ],
67
94
  "properties": {
@@ -77,7 +104,12 @@
77
104
  }
78
105
  ]
79
106
  },
80
- "if": {"type": ["boolean", "string"]},
107
+ "if": {
108
+ "type": [
109
+ "boolean",
110
+ "string"
111
+ ]
112
+ },
81
113
  "then": {
82
114
  "oneOf": [
83
115
  {
@@ -93,25 +125,66 @@
93
125
  }
94
126
  }
95
127
  },
96
- {"type": "string", "schema_name": "step id"}
128
+ {
129
+ "type": "string",
130
+ "schema_name": "step id"
131
+ }
97
132
  ]
98
133
  },
99
- "action": {"type": "string"},
100
- "collect": {"type": "string"},
101
- "link": {"type": "string"},
102
- "call": {"type": "string"},
134
+ "action": {
135
+ "type": "string"
136
+ },
137
+ "collect": {
138
+ "type": "string"
139
+ },
140
+ "link": {
141
+ "type": "string"
142
+ },
143
+ "call": {
144
+ "type": "string"
145
+ },
103
146
  "set_slots": {
104
147
  "$ref": "#/$defs/set_slots",
105
148
  "schema_name": "slot set"
106
149
  }
107
150
  },
108
151
  "oneOf": [
109
- {"required": ["action"], "schema_name": "action step"},
110
- {"required": ["collect"], "schema_name": "collect step"},
111
- {"required": ["link"], "schema_name": "link step"},
112
- {"required": ["call"], "schema_name": "call step"},
113
- {"required": ["set_slots"], "schema_name": "slot set step"},
114
- {"required": ["noop"], "schema_name": ""}
152
+ {
153
+ "required": [
154
+ "action"
155
+ ],
156
+ "schema_name": "action step"
157
+ },
158
+ {
159
+ "required": [
160
+ "collect"
161
+ ],
162
+ "schema_name": "collect step"
163
+ },
164
+ {
165
+ "required": [
166
+ "link"
167
+ ],
168
+ "schema_name": "link step"
169
+ },
170
+ {
171
+ "required": [
172
+ "call"
173
+ ],
174
+ "schema_name": "call step"
175
+ },
176
+ {
177
+ "required": [
178
+ "set_slots"
179
+ ],
180
+ "schema_name": "slot set step"
181
+ },
182
+ {
183
+ "required": [
184
+ "noop"
185
+ ],
186
+ "schema_name": ""
187
+ }
115
188
  ],
116
189
  "dependentSchemas": {
117
190
  "action": {
@@ -123,23 +196,10 @@
123
196
  "metadata": {}
124
197
  }
125
198
  },
126
- "noop": {"required": ["next"]},
127
- "call": {
128
- "additionalProperties": false,
129
- "properties": {
130
- "call": {"type": "string"},
131
- "id": {},
132
- "next": {},
133
- "metadata": {},
134
- "description": {"type": "string"},
135
- "mcp_server": {"type": "string"},
136
- "mapping": {"$ref": "#/$defs/call_step/properties/mapping"},
137
- "exit_if": {"$ref": "#/$defs/call_step/properties/exit_if"}
138
- },
139
- "dependentSchemas": {
140
- "mcp_server": {"required": ["mapping"]},
141
- "mapping": {"required": ["mcp_server"]}
142
- }
199
+ "noop": {
200
+ "required": [
201
+ "next"
202
+ ]
143
203
  },
144
204
  "collect": {
145
205
  "additionalProperties": false,
@@ -148,105 +208,130 @@
148
208
  "id": {},
149
209
  "next": {},
150
210
  "metadata": {},
151
- "description": {"type": "string"},
152
- "ask_before_filling": {"type": "boolean"},
153
- "reset_after_flow_ends": {"type": "boolean"},
154
- "utter": {"type": "string"},
155
- "force_slot_filling": {"type": "boolean"},
211
+ "description": {
212
+ "type": "string"
213
+ },
214
+ "ask_before_filling": {
215
+ "type": "boolean"
216
+ },
217
+ "reset_after_flow_ends": {
218
+ "type": "boolean"
219
+ },
220
+ "utter": {
221
+ "type": "string"
222
+ },
223
+ "force_slot_filling": {
224
+ "type": "boolean"
225
+ },
156
226
  "rejections": {
157
227
  "type": "array",
158
228
  "schema_name": "list of rejections",
159
229
  "items": {
160
230
  "type": "object",
161
- "required": ["if", "utter"],
231
+ "required": [
232
+ "if",
233
+ "utter"
234
+ ],
162
235
  "properties": {
163
- "if": {"type": ["boolean", "string"]},
164
- "utter": {"type": "string"}
236
+ "if": {
237
+ "type": [
238
+ "boolean",
239
+ "string"
240
+ ]
241
+ },
242
+ "utter": {
243
+ "type": "string"
244
+ }
165
245
  }
166
246
  }
167
247
  },
168
- "silence_timeout": {"type": "number"}
248
+ "silence_timeout": {
249
+ "type": "number"
250
+ }
169
251
  }
170
252
  }
171
253
  }
172
254
  }
173
255
  },
174
256
  "flow": {
175
- "required": ["steps", "description"],
257
+ "required": [
258
+ "steps",
259
+ "description"
260
+ ],
176
261
  "type": "object",
177
262
  "additionalProperties": false,
178
263
  "schema_name": "dictionary with flow properties",
179
264
  "properties": {
180
- "name": {"type": "string"},
181
- "description": {"type": "string"},
265
+ "name": {
266
+ "type": "string"
267
+ },
268
+ "description": {
269
+ "type": "string"
270
+ },
182
271
  "translation": {
183
272
  "type": "object",
184
- "additionalProperties": false,
185
273
  "schema_name": "flow translation mapping",
186
- "properties": {"metadata": {"type": "object"}},
274
+ "properties": {
275
+ "metadata": {
276
+ "type": "object"
277
+ }
278
+ },
187
279
  "patternProperties": {
188
280
  "^(?!metadata$).+": {
189
281
  "type": "object",
190
282
  "additionalProperties": false,
191
- "required": ["name"],
192
- "properties": {"name": {"type": "string"}, "metadata": {}}
283
+ "required": [
284
+ "name"
285
+ ],
286
+ "properties": {
287
+ "name": {
288
+ "type": "string"
289
+ },
290
+ "metadata": {}
291
+ }
193
292
  }
194
- }
293
+ },
294
+ "additionalProperties": false
295
+ },
296
+ "if": {
297
+ "type": [
298
+ "string",
299
+ "boolean"
300
+ ]
301
+ },
302
+ "always_include_in_prompt": {
303
+ "type": "boolean"
195
304
  },
196
- "if": {"type": ["string", "boolean"]},
197
- "always_include_in_prompt": {"type": "boolean"},
198
- "nlu_trigger": {"$ref": "#/$defs/nlu_trigger"},
199
- "file_path": {"type": "string"},
200
- "steps": {"$ref": "#/$defs/steps"},
201
- "persisted_slots": {"$ref": "#/$defs/persisted_slots"},
202
- "run_pattern_completed": {"type": "boolean"}
305
+ "nlu_trigger": {
306
+ "$ref": "#/$defs/nlu_trigger"
307
+ },
308
+ "file_path": {
309
+ "type": "string"
310
+ },
311
+ "steps": {
312
+ "$ref": "#/$defs/steps"
313
+ },
314
+ "persisted_slots": {
315
+ "$ref": "#/$defs/persisted_slots"
316
+ },
317
+ "run_pattern_completed": {
318
+ "type": "boolean"
319
+ }
203
320
  }
204
321
  },
205
322
  "set_slots": {
206
323
  "type": "array",
207
324
  "schema_name": "list of slot sets",
208
- "items": {"type": "object"}
209
- },
210
- "call_step": {
211
- "type": "object",
212
- "additionalProperties": false,
213
- "schema_name": "dictionary with call properties",
214
- "required": ["call"],
215
- "properties": {
216
- "call": {"type": "string"},
217
- "mcp_server": {"type": "string"},
218
- "mapping": {
219
- "type": "object",
220
- "additionalProperties": false,
221
- "schema_name": "input and output mapping for a MCP tool call",
222
- "required": ["input", "output"],
223
- "properties": {
224
- "input": {
225
- "type": "array",
226
- "items": {
227
- "type": "object",
228
- "additionalProperties": false,
229
- "required": ["slot", "param"],
230
- "properties": {
231
- "slot": {"type": "string"},
232
- "param": {"type": "string"}
233
- }
234
- }
235
- },
236
- "output": {"type": "string"}
237
- }
238
- },
239
- "exit_if": {
240
- "type": "array",
241
- "schema_name": "list of slot predicates to exit agent call",
242
- "items": {"type": ["string"]}
243
- }
325
+ "items": {
326
+ "type": "object"
244
327
  }
245
328
  },
246
329
  "persisted_slots": {
247
330
  "type": "array",
248
331
  "schema_name": "list of slots",
249
- "items": {"type": "string"}
332
+ "items": {
333
+ "type": "string"
334
+ }
250
335
  }
251
336
  }
252
337
  }
@@ -1,10 +1,8 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from dataclasses import dataclass
4
- from typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Text
4
+ from typing import TYPE_CHECKING, Any, Dict, Generator, Optional, Text
5
5
 
6
- from rasa.core.available_agents import AvailableAgents
7
- from rasa.core.available_endpoints import AvailableEndpoints
8
6
  from rasa.shared.core.flows.flow_step import FlowStep
9
7
 
10
8
  if TYPE_CHECKING:
@@ -13,19 +11,11 @@ if TYPE_CHECKING:
13
11
 
14
12
  @dataclass
15
13
  class CallFlowStep(FlowStep):
16
- """Represents the configuration of a call flow/agent step."""
14
+ """Represents the configuration of an call flow step."""
17
15
 
18
16
  call: Text
19
- """The flow to be called or the ID of the agent to be called."""
17
+ """The flow to be called."""
20
18
  called_flow_reference: Optional["Flow"] = None
21
- # MCP Tool calling
22
- """The MCP server that hosts the tool to be called."""
23
- mcp_server: Optional[str] = None
24
- """The input and output mapping for the MCP tool."""
25
- mapping: Optional[Dict[str, Any]] = None
26
- # Call agent exit condition
27
- """A list of slot predicates that determine when to exit the agent loop."""
28
- exit_if: Optional[List[str]] = None
29
19
 
30
20
  @classmethod
31
21
  def from_json(cls, flow_id: Text, data: Dict[Text, Any]) -> CallFlowStep:
@@ -41,9 +31,6 @@ class CallFlowStep(FlowStep):
41
31
  base = super().from_json(flow_id, data)
42
32
  return CallFlowStep(
43
33
  call=data.get("call", ""),
44
- mcp_server=data.get("mcp_server", None),
45
- mapping=data.get("mapping", None),
46
- exit_if=data.get("exit_if", None),
47
34
  **base.__dict__,
48
35
  )
49
36
 
@@ -53,16 +40,7 @@ class CallFlowStep(FlowStep):
53
40
  Returns:
54
41
  The flow step as a dictionary.
55
42
  """
56
- step_properties: Dict[str, Any] = {
57
- "call": self.call,
58
- }
59
- if self.is_calling_mcp_tool():
60
- step_properties["mcp_server"] = self.mcp_server
61
- step_properties["mapping"] = self.mapping
62
- if self.exit_if:
63
- step_properties["exit_if"] = self.exit_if
64
-
65
- return super().as_json(step_properties=step_properties)
43
+ return super().as_json(step_properties={"call": self.call})
66
44
 
67
45
  def steps_in_tree(
68
46
  self, should_resolve_calls: bool = True
@@ -70,7 +48,7 @@ class CallFlowStep(FlowStep):
70
48
  """Returns the steps in the tree of the flow step."""
71
49
  yield self
72
50
 
73
- if should_resolve_calls and self.is_calling_flow():
51
+ if should_resolve_calls:
74
52
  if not self.called_flow_reference:
75
53
  raise ValueError("Call flow reference not set.")
76
54
 
@@ -78,27 +56,6 @@ class CallFlowStep(FlowStep):
78
56
 
79
57
  yield from self.next.steps_in_tree(should_resolve_calls)
80
58
 
81
- def is_calling_flow(self) -> bool:
82
- """Returns True if the call references a flow."""
83
- return not self.is_calling_mcp_tool() and not self.is_calling_agent()
84
-
85
- def is_calling_mcp_tool(self) -> bool:
86
- """Returns True if the call references an MCP tool of an existing MCP server."""
87
- mcp_server_list = AvailableEndpoints.get_instance().mcp_servers
88
- if mcp_server_list is None:
89
- return False
90
-
91
- mcp_server_names = [server.name for server in mcp_server_list]
92
- return (
93
- self.mcp_server is not None
94
- and self.mapping is not None
95
- and self.mcp_server in mcp_server_names
96
- )
97
-
98
- def is_calling_agent(self) -> bool:
99
- """Returns True if the call references an agent."""
100
- return self.call in AvailableAgents.get_instance().agents
101
-
102
59
  @property
103
60
  def default_id_postfix(self) -> str:
104
61
  """Returns the default id postfix of the flow step."""
@@ -109,9 +66,6 @@ class CallFlowStep(FlowStep):
109
66
  return (
110
67
  self.call == other.call
111
68
  and self.called_flow_reference == other.called_flow_reference
112
- and self.mcp_server == other.mcp_server
113
- and self.mapping == other.mapping
114
- and self.exit_if == other.exit_if
115
69
  and super().__eq__(other)
116
70
  )
117
71
  return False
@@ -261,7 +261,7 @@ class NoLinkAllowedInCalledFlowException(RasaException):
261
261
  )
262
262
 
263
263
 
264
- class UnresolvedLinkFlowException(RasaException):
264
+ class UnresolvedFlowException(RasaException):
265
265
  """Raised when a flow is called or linked from another flow but doesn't exist."""
266
266
 
267
267
  def __init__(self, flow_id: str, calling_flow_id: str, step_id: str) -> None:
@@ -273,37 +273,13 @@ class UnresolvedLinkFlowException(RasaException):
273
273
  def __str__(self) -> str:
274
274
  """Return a string representation of the exception."""
275
275
  return (
276
- f"Flow '{self.flow_id}' is linked from flow "
276
+ f"Flow '{self.flow_id}' is called or linked from flow "
277
277
  f"'{self.calling_flow_id}' in step '{self.step_id}', "
278
278
  f"but it doesn't exist. "
279
279
  f"Please make sure that a flow with id '{self.flow_id}' exists."
280
280
  )
281
281
 
282
282
 
283
- class UnresolvedCallStepException(RasaException):
284
- """Valid call step should have a reference to an existing flow or agent.
285
- Raised when it does not.
286
- """
287
-
288
- def __init__(
289
- self, call_step_argument: str, calling_flow_id: str, step_id: str
290
- ) -> None:
291
- """Initializes the exception."""
292
- self.call_step_argument = call_step_argument
293
- self.calling_flow_id = calling_flow_id
294
- self.step_id = step_id
295
-
296
- def __str__(self) -> str:
297
- """Return a string representation of the exception."""
298
- return (
299
- f"The call step '{self.step_id}' in flow '{self.calling_flow_id}' "
300
- f"is invalid: there is no flow or agent with the "
301
- f"id '{self.call_step_argument}'. "
302
- f"Please make sure that the call step argument is a valid flow id "
303
- f"or an agent id."
304
- )
305
-
306
-
307
283
  class UnresolvedFlowStepIdException(RasaException):
308
284
  """Raised when a flow step is referenced, but its id can not be resolved."""
309
285
 
@@ -586,29 +562,15 @@ def validate_link_in_call_restriction(flows: "FlowsList") -> None:
586
562
  raise NoLinkAllowedInCalledFlowException(step.id, flow.id, step.call)
587
563
 
588
564
 
589
- def validate_call_steps(flows: "FlowsList") -> None:
590
- """Validates that all called flows/agents exist and additional properties
591
- are valid.
592
- """
565
+ def validate_called_flows_exists(flows: "FlowsList") -> None:
566
+ """Validates that all called flows exist."""
593
567
  for flow in flows.underlying_flows:
594
568
  for step in flow.steps:
595
569
  if not isinstance(step, CallFlowStep):
596
570
  continue
597
571
 
598
- if (
599
- not step.is_calling_agent()
600
- and flows.flow_by_id(step.call) is None
601
- and not step.is_calling_mcp_tool()
602
- ):
603
- raise UnresolvedCallStepException(step.call, flow.id, step.id)
604
-
605
- if step.exit_if and not step.is_calling_agent():
606
- # exit_if is only allowed for call steps that call an agent
607
- raise RasaException(
608
- f"Call step '{step.id}' in flow '{flow.id}' has an 'exit_if' "
609
- f"condition, but it is not calling an agent. "
610
- f"'exit_if' is only allowed for call steps that call an agent."
611
- )
572
+ if flows.flow_by_id(step.call) is None:
573
+ raise UnresolvedFlowException(step.call, flow.id, step.id)
612
574
 
613
575
 
614
576
  def validate_linked_flows_exists(flows: "FlowsList") -> None:
@@ -632,7 +594,7 @@ def validate_linked_flows_exists(flows: "FlowsList") -> None:
632
594
  flow.is_rasa_default_flow and step.link == RASA_PATTERN_CHITCHAT
633
595
  )
634
596
  ):
635
- raise UnresolvedLinkFlowException(step.link, flow.id, step.id)
597
+ raise UnresolvedFlowException(step.link, flow.id, step.id)
636
598
 
637
599
 
638
600
  def validate_patterns_are_not_called_or_linked(flows: "FlowsList") -> None:
@@ -418,15 +418,15 @@ def process_yaml_content(yaml_content: Dict[str, Any]) -> Dict[str, Any]:
418
418
 
419
419
  # Under the "flows" key certain keys cannot have metadata
420
420
  _process_keys_recursively(
421
- yaml_content["flows"],
422
- ["nlu_trigger", "set_slots", "metadata", "mapping", "exit_if"],
421
+ yaml_content["flows"], ["nlu_trigger", "set_slots", "metadata"]
423
422
  )
424
423
 
425
424
  return yaml_content
426
425
 
427
426
 
428
427
  def get_flow_as_json(flow: Flow, should_clean_json: bool = False) -> Dict[str, Any]:
429
- """Clean the Flow JSON by removing default values and empty fields.
428
+ """
429
+ Clean the Flow JSON by removing default values and empty fields.
430
430
 
431
431
  Args:
432
432
  flow: The Flow object to clean.