rasa-pro 3.22.0.dev2__py3-none-any.whl → 3.22.0.dev3__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.
- rasa/agents/protocol/a2a/a2a_agent.py +75 -0
- rasa/agents/validation.py +27 -0
- rasa/builder/config.py +6 -5
- rasa/builder/copilot/constants.py +3 -0
- rasa/builder/copilot/file_operations.py +24 -1
- rasa/builder/copilot/mcp_server/INSTRUCTIONS.md +1 -1
- rasa/builder/copilot/mcp_server/prompts/prompt_loader.py +6 -0
- rasa/builder/copilot/mcp_server/server.py +18 -2
- rasa/builder/copilot/mcp_server/tools/artifact_writer.py +343 -29
- rasa/builder/copilot/mcp_server/tools/conversation_repair.py +3 -3
- rasa/builder/copilot/mcp_server/tools/eval_config.py +3 -1
- rasa/builder/copilot/mcp_server/tools/evaluate_agent.py +420 -181
- rasa/builder/copilot/mcp_server/tools/event_ledger.py +165 -3
- rasa/builder/copilot/mcp_server/tools/llm_judge.py +302 -28
- rasa/builder/copilot/mcp_server/tools/llm_judge_models.py +214 -10
- rasa/builder/copilot/mcp_server/tools/text_simulation.py +8 -1
- rasa/builder/copilot/message_classifier/message_classifier.py +2 -1
- rasa/builder/copilot/modes/AGENTS.md +34 -0
- rasa/builder/copilot/modes/plan/AGENTS.md +35 -0
- rasa/builder/copilot/modes/plan/__init__.py +0 -0
- rasa/builder/copilot/modes/plan/actions.py +275 -0
- rasa/builder/copilot/modes/plan/build_job.py +368 -0
- rasa/builder/copilot/modes/plan/build_steps.py +157 -0
- rasa/builder/copilot/modes/plan/capability.py +460 -0
- rasa/builder/copilot/modes/plan/models.py +67 -0
- rasa/builder/copilot/modes/plan/planning_jobs.py +276 -0
- rasa/builder/{agent_plan → copilot/modes/plan}/store.py +134 -42
- rasa/builder/copilot/modes/registry.py +43 -0
- rasa/builder/copilot/preflight.py +1 -0
- rasa/builder/copilot/prompts/evaluation_acknowledgement_judge_prompt.jinja2 +39 -0
- rasa/builder/copilot/prompts/evaluation_criteria_judge_prompt.jinja2 +9 -3
- rasa/builder/copilot/pydantic_ai/actions.py +16 -5
- rasa/builder/copilot/pydantic_ai/ag_ui_events.py +28 -3
- rasa/builder/copilot/pydantic_ai/agent.py +72 -83
- rasa/builder/copilot/pydantic_ai/api.py +15 -21
- rasa/builder/copilot/pydantic_ai/custom_events.py +172 -0
- rasa/builder/copilot/pydantic_ai/document_search.py +13 -14
- rasa/builder/copilot/pydantic_ai/event_mapper.py +5 -5
- rasa/builder/copilot/pydantic_ai/hooks.py +66 -22
- rasa/builder/copilot/pydantic_ai/model_registry.py +9 -3
- rasa/builder/copilot/pydantic_ai/persisted_messages.py +25 -10
- rasa/builder/copilot/pydantic_ai/prompt_loader.py +46 -20
- rasa/builder/copilot/pydantic_ai/run_context.py +26 -8
- rasa/builder/copilot/pydantic_ai/run_modes.py +53 -0
- rasa/builder/copilot/pydantic_ai/secret_references.py +138 -0
- rasa/builder/copilot/pydantic_ai/training_error_analysis.py +14 -7
- rasa/builder/copilot/pydantic_ai/types.py +27 -1
- rasa/builder/copilot/skills/mantle/building-from-conversations/SKILL.md +5 -3
- rasa/builder/copilot/skills/mantle/building-skills/SKILL.md +15 -6
- rasa/builder/copilot/skills/mantle/building-skills/references/control-levers.md +26 -2
- rasa/builder/copilot/skills/mantle/building-skills/references/responses.md +38 -5
- rasa/builder/copilot/skills/mantle/configuring-agent/SKILL.md +12 -8
- rasa/builder/copilot/skills/mantle/configuring-agent/references/agent-yml.md +1 -1
- rasa/builder/copilot/skills/mantle/configuring-agent/references/integrations-yml.md +5 -1
- rasa/builder/copilot/skills/mantle/docs-lookup/SKILL.md +3 -3
- rasa/builder/copilot/skills/mantle/migrating-from-calm/SKILL.md +5 -5
- rasa/builder/copilot/skills/mantle/simulating-evaluating/SKILL.md +11 -4
- rasa/builder/copilot/skills/mantle/testing-debugging/SKILL.md +4 -2
- rasa/builder/copilot/skills/mantle/testing-debugging/references/validation-failures.md +6 -5
- rasa/builder/copilot/subagents/AGENTS.md +33 -0
- rasa/builder/copilot/subagents/__init__.py +0 -0
- rasa/builder/copilot/subagents/agent_build_plan.py +155 -0
- rasa/builder/copilot/subagents/base.py +104 -0
- rasa/builder/copilot/subagents/builder/__init__.py +0 -0
- rasa/builder/copilot/subagents/builder/agent.py +237 -0
- rasa/builder/copilot/subagents/model_choice.py +64 -0
- rasa/builder/copilot/subagents/planner/__init__.py +0 -0
- rasa/builder/copilot/subagents/planner/agent.py +286 -0
- rasa/builder/copilot/subagents/registry.py +9 -0
- rasa/builder/copilot/thread_history.py +46 -3
- rasa/builder/document_retrieval/README.md +7 -7
- rasa/builder/document_retrieval/local/data/docs_vectors.parquet +0 -0
- rasa/builder/document_retrieval/local/data/mantle_docs_vectors.parquet +0 -0
- rasa/builder/eval_batches.py +130 -13
- rasa/builder/file_edits.py +24 -3
- rasa/builder/git_service.py +80 -0
- rasa/builder/job_runner.py +53 -1
- rasa/builder/jobs.py +12 -321
- rasa/builder/main.py +12 -1
- rasa/builder/models.py +29 -1
- rasa/builder/project_generator/project_generator.py +61 -7
- rasa/builder/secret_scan.py +175 -0
- rasa/builder/service.py +132 -472
- rasa/builder/telemetry/langfuse_integration/plan_to_bot_langfuse_telemetry.py +1 -1
- rasa/builder/telemetry/langfuse_integration/planner_langfuse_telemetry.py +1 -1
- rasa/builder/workspace.py +9 -1
- rasa/cli/export.py +15 -0
- rasa/cli/tools/skills_data/mantle/mantle-building-from-conversations/SKILL.md +5 -3
- rasa/cli/tools/skills_data/mantle/mantle-building-skills/SKILL.md +58 -14
- rasa/cli/tools/skills_data/mantle/mantle-configuring-agent/SKILL.md +28 -13
- rasa/cli/tools/skills_data/mantle/mantle-docs/SKILL.md +2 -2
- rasa/cli/tools/skills_data/mantle/mantle-migrating-from-calm/SKILL.md +5 -4
- rasa/cli/tools/skills_data/mantle/mantle-simulating-evaluating/SKILL.md +21 -10
- rasa/cli/tools/skills_data/mantle/mantle-testing-debugging/SKILL.md +4 -2
- rasa/core/a2a_server/auth.py +47 -7
- rasa/core/a2a_server/config.py +23 -2
- rasa/core/a2a_server/context_owner.py +239 -0
- rasa/core/a2a_server/push_notification_transport.py +59 -14
- rasa/core/a2a_server/rasa_a2a_agent_executor.py +81 -2
- rasa/core/a2a_server/rasa_a2a_request_handler.py +148 -9
- rasa/core/a2a_server/sanic_app.py +47 -1
- rasa/core/a2a_server/startup.py +1 -0
- rasa/core/agent.py +40 -1
- rasa/core/async_task_execution/async_task_result_processor.py +40 -8
- rasa/core/available_agents.py +10 -0
- rasa/core/brokers/broker.py +38 -1
- rasa/core/brokers/http.py +1107 -0
- rasa/core/channels/channel.py +16 -1
- rasa/core/channels/inspector/dist/assets/{abnfDiagram-VCTEODGH-d1958068.js → abnfDiagram-VCTEODGH-9bb4b1b7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{arc-ee38fad9.js → arc-c3810888.js} +1 -1
- rasa/core/channels/inspector/dist/assets/architecture-7GRP2DOG-c3261b6f.js +1 -0
- rasa/core/channels/inspector/dist/assets/{architectureDiagram-5GKGNRK7-75f25ece.js → architectureDiagram-5GKGNRK7-871eab48.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{blockDiagram-I7D4REHJ-be4dfc82.js → blockDiagram-I7D4REHJ-db15b3c9.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{c4Diagram-7LVT6UL2-6c68c7b2.js → c4Diagram-7LVT6UL2-d576670d.js} +1 -1
- rasa/core/channels/inspector/dist/assets/channel-6a478806.js +1 -0
- rasa/core/channels/inspector/dist/assets/{chunk-2Q5K7J3B-38bae51c.js → chunk-2Q5K7J3B-03b49407.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{chunk-5VM5RSS4-39afa73b.js → chunk-5VM5RSS4-21ebf9e7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{chunk-F27PBJKO-d8864d02.js → chunk-F27PBJKO-8c71eab7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{chunk-IMKFNOWR-cc51ad81.js → chunk-IMKFNOWR-31c44837.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{chunk-JWPE2WC7-1fd37a6b.js → chunk-JWPE2WC7-84ef11d7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{chunk-POPQ4Y6H-9584d215.js → chunk-POPQ4Y6H-6567ef4e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{chunk-SHT3W25Y-28e9c55d.js → chunk-SHT3W25Y-6c21498e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{chunk-SVP7TREG-06ff7a0d.js → chunk-SVP7TREG-73f752ea.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{chunk-TICWLB2K-66344835.js → chunk-TICWLB2K-00498b4c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{chunk-XXDRQBXY-86512f44.js → chunk-XXDRQBXY-344b78e6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/classDiagram-ZZMXUADV-aa376894.js +1 -0
- rasa/core/channels/inspector/dist/assets/classDiagram-v2-VYDZK3BY-aa376894.js +1 -0
- rasa/core/channels/inspector/dist/assets/{cose-bilkent-JH36ORCC-978e3c9c.js → cose-bilkent-JH36ORCC-e6dd637c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/cynefin-OW5HDTMX-1d4764f4.js +1 -0
- rasa/core/channels/inspector/dist/assets/{cynefinDiagram-5FMLGOSQ-b78bce1a.js → cynefinDiagram-5FMLGOSQ-8c24409a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{dagre-GXQ25YYZ-88aab4bf.js → dagre-GXQ25YYZ-e453a665.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{diagram-S7CK7UJ4-2c4a9d7e.js → diagram-S7CK7UJ4-6a283b1b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{diagram-UQ7AKVKN-b23ba5d2.js → diagram-UQ7AKVKN-554ef82f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{diagram-VSXAHHWV-ab96361e.js → diagram-VSXAHHWV-3be73563.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{diagram-VX7I27RA-431fb32b.js → diagram-VX7I27RA-a2331b4f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{diagram-Z3DM3KII-12eeed50.js → diagram-Z3DM3KII-8f19966a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ebnfDiagram-PWID7BFC-c979cb26.js → ebnfDiagram-PWID7BFC-776e52fe.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{erDiagram-RLTQ6QDP-f5eeb32b.js → erDiagram-RLTQ6QDP-41e1a7a7.js} +1 -1
- rasa/core/channels/inspector/dist/assets/eventmodeling-NTZA5JFV-4198fc99.js +1 -0
- rasa/core/channels/inspector/dist/assets/flowDiagram-HODETNUW-39aa8123.js +1 -0
- rasa/core/channels/inspector/dist/assets/{ganttDiagram-EL5Y4UJY-d216bac9.js → ganttDiagram-EL5Y4UJY-53724fff.js} +1 -1
- rasa/core/channels/inspector/dist/assets/gitGraph-4MIJSDKK-3c8a2697.js +1 -0
- rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-WWUBYQGX-5420d961.js → gitGraphDiagram-WWUBYQGX-1b7a87aa.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-4caf5ccd.js → index-274d8869.js} +246 -243
- rasa/core/channels/inspector/dist/assets/info-A6RAGUB7-b357205e.js +1 -0
- rasa/core/channels/inspector/dist/assets/{infoDiagram-27XIBGKW-180b31e5.js → infoDiagram-27XIBGKW-3b7adc8a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ishikawaDiagram-5VMMS53U-865ede18.js → ishikawaDiagram-5VMMS53U-6ceb54a2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{journeyDiagram-3NMN7TZE-ab5c16a4.js → journeyDiagram-3NMN7TZE-b5ab0205.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{kanban-definition-UXKFOSKX-60e32eae.js → kanban-definition-UXKFOSKX-6ff5197e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{layout-b6bb98e6.js → layout-06fc0ce8.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{linear-c18a0949.js → linear-5063258f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{mermaid-parser.core-20cacf28.js → mermaid-parser.core-cef7e732.js} +2 -2
- rasa/core/channels/inspector/dist/assets/{mindmap-definition-YA3MSWOX-5c31341b.js → mindmap-definition-YA3MSWOX-78933baa.js} +1 -1
- rasa/core/channels/inspector/dist/assets/packet-AYTQ26CC-a0566fcd.js +1 -0
- rasa/core/channels/inspector/dist/assets/{pegDiagram-XKGWAZYB-7d2d591e.js → pegDiagram-XKGWAZYB-b288834e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/pie-WAS4IAKB-2c914674.js +1 -0
- rasa/core/channels/inspector/dist/assets/{pieDiagram-E7YTZNPT-2393742f.js → pieDiagram-E7YTZNPT-2c04e795.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{quadrantDiagram-AXDQQJYC-c0848807.js → quadrantDiagram-AXDQQJYC-2ee4a399.js} +1 -1
- rasa/core/channels/inspector/dist/assets/radar-RG4KPBEZ-250e6275.js +1 -0
- rasa/core/channels/inspector/dist/assets/railroad-74A4TZTK-2e6a515c.js +1 -0
- rasa/core/channels/inspector/dist/assets/railroad-abnf-HS5TGJTU-d87728ed.js +1 -0
- rasa/core/channels/inspector/dist/assets/railroad-ebnf-LZEXJU2U-80278ef8.js +1 -0
- rasa/core/channels/inspector/dist/assets/railroad-peg-WCYAUIDC-0976b887.js +1 -0
- rasa/core/channels/inspector/dist/assets/{railroadDiagram-O6MQD6OU-87d8dac1.js → railroadDiagram-O6MQD6OU-9bfe3600.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{requirementDiagram-BXWQKSXE-46904496.js → requirementDiagram-BXWQKSXE-115ef51e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sankeyDiagram-P5KCCOFB-f80f4f58.js → sankeyDiagram-P5KCCOFB-23c7a678.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sequenceDiagram-WJ2MYXX4-3c569c45.js → sequenceDiagram-WJ2MYXX4-08014e4a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sizeCapture-INFHLROL-41b679ae.js → sizeCapture-INFHLROL-d66ec26a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-D77RDMKH-ca621eb9.js → stateDiagram-D77RDMKH-0542b581.js} +1 -1
- rasa/core/channels/inspector/dist/assets/stateDiagram-v2-MP3YSRHH-868b26bc.js +1 -0
- rasa/core/channels/inspector/dist/assets/{swimlanes-42K2YHIH-5e5f8a34.js → swimlanes-42K2YHIH-7324252c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/swimlanesDiagram-VR7AAH4N-56dce0e5.js +8 -0
- rasa/core/channels/inspector/dist/assets/{timeline-definition-24CTP7MA-510e1094.js → timeline-definition-24CTP7MA-fda150ab.js} +1 -1
- rasa/core/channels/inspector/dist/assets/treeView-Q6P3EWNA-865c6aae.js +1 -0
- rasa/core/channels/inspector/dist/assets/treemap-WGGIJYW6-25956d6c.js +1 -0
- rasa/core/channels/inspector/dist/assets/{vennDiagram-4TSXK5OY-67d589b8.js → vennDiagram-4TSXK5OY-f6996200.js} +1 -1
- rasa/core/channels/inspector/dist/assets/wardley-WFR3VGLG-99c5646c.js +1 -0
- rasa/core/channels/inspector/dist/assets/{wardleyDiagram-VM6X3IG4-c3766aa8.js → wardleyDiagram-VM6X3IG4-1076f51b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{xychartDiagram-S5SC5T6Z-c34778f7.js → xychartDiagram-S5SC5T6Z-08b5eb79.js} +1 -1
- rasa/core/channels/inspector/dist/index.html +1 -1
- rasa/core/channels/inspector/package.json +3 -3
- rasa/core/channels/inspector/yarn.lock +12 -12
- rasa/core/channels/inspector-nextgen/.yarnrc.yml +0 -6
- rasa/core/channels/inspector-nextgen/README.md +0 -8
- rasa/core/channels/inspector-nextgen/dist/assets/index--9qSkQVO.js +153 -0
- rasa/core/channels/inspector-nextgen/dist/index.html +1 -1
- rasa/core/channels/inspector-nextgen/e2e/actions/ui/voice-controls.actions.ts +1 -1
- rasa/core/channels/inspector-nextgen/e2e/package.json +1 -1
- rasa/core/channels/inspector-nextgen/package.json +9 -19
- rasa/core/channels/inspector-nextgen/src/Icon/Icon.test.tsx +31 -0
- rasa/core/channels/inspector-nextgen/src/Icon/Icon.tsx +19 -10
- rasa/core/channels/inspector-nextgen/src/Icon/index.ts +130 -2
- rasa/core/channels/inspector-nextgen/src/Modal.tsx +2 -2
- rasa/core/channels/inspector-nextgen/src/PopoverMenuItem.tsx +9 -4
- rasa/core/channels/inspector-nextgen/src/RasaCodeBlock.tsx +3 -3
- rasa/core/channels/inspector-nextgen/src/Toaster/Toaster.test.tsx +8 -14
- rasa/core/channels/inspector-nextgen/src/Toaster/Toaster.tsx +6 -7
- rasa/core/channels/inspector-nextgen/src/canvas/BottomControls.tsx +4 -4
- rasa/core/channels/inspector-nextgen/src/canvas/nodes/Icon.test.tsx +7 -9
- rasa/core/channels/inspector-nextgen/src/canvas/nodes/Icon.tsx +17 -29
- rasa/core/channels/inspector-nextgen/src/components/EventInfo/blocks/CommonEventInfo.tsx +2 -2
- rasa/core/channels/inspector-nextgen/src/components/EventInfo/blocks/DetailView.tsx +2 -2
- rasa/core/channels/inspector-nextgen/src/components/InspectorViewPopover.tsx +6 -6
- rasa/core/channels/inspector-nextgen/src/theme/index.ts +2 -0
- rasa/core/channels/inspector-nextgen/src/theme/recipes/messageInput.ts +39 -0
- rasa/core/channels/inspector-nextgen/src/try-assistant/ChatHeader.tsx +9 -19
- rasa/core/channels/inspector-nextgen/src/try-assistant/ChatSection.tsx +1 -1
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationEventActionButton.tsx +2 -3
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/ActionEvent.tsx +3 -4
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/AgentEvent.test.tsx +2 -1
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/AgentEvent.tsx +1 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/BargeInEvent.tsx +1 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/BotTurnEndedEvent.test.tsx +2 -1
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/BotTurnEndedEvent.tsx +1 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/FlowEvent.test.tsx +2 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/FlowEvent.tsx +2 -5
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/LlmCallEvent.tsx +2 -3
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/MemoryWriteEvent.tsx +1 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/OrderedBlockEvent.tsx +1 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/SkillEvent.tsx +1 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/SlotEvent.tsx +1 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/ToolRunLogRow.test.tsx +2 -1
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/ToolRunLogRow.tsx +2 -3
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/TtsFinishedEvent.test.tsx +2 -1
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/TtsFinishedEvent.tsx +1 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/UserInputSuppressedEvent.tsx +1 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/UserSilenceTimeoutEvent.tsx +1 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Event/index.test.tsx +2 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Message/BotMessage.test.tsx +2 -1
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Message/BotMessage.tsx +4 -4
- rasa/core/channels/inspector-nextgen/src/try-assistant/ConversationLog/Message/PayloadResponse.tsx +3 -4
- rasa/core/channels/inspector-nextgen/src/try-assistant/LangfuseSessionButton.tsx +3 -3
- rasa/core/channels/inspector-nextgen/src/try-assistant/MessageInput.test.tsx +23 -0
- rasa/core/channels/inspector-nextgen/src/try-assistant/MessageInput.tsx +22 -17
- rasa/core/channels/inspector-nextgen/src/try-assistant/SkillMemoryDetails.tsx +7 -8
- rasa/core/channels/inspector-nextgen/src/try-assistant/SkillSection/ReferenceTag.tsx +12 -14
- rasa/core/channels/inspector-nextgen/src/try-assistant/SkillSection/SkillBlockCard.tsx +2 -2
- rasa/core/channels/inspector-nextgen/src/try-assistant/VoiceButton.tsx +3 -3
- rasa/core/channels/inspector-nextgen/src/types/conversation.ts +2 -2
- rasa/core/channels/inspector-nextgen/src/types/toast.ts +2 -2
- rasa/core/channels/inspector-nextgen/src/utils/conversation.ts +2 -2
- rasa/core/channels/inspector-nextgen/yarn.lock +300 -264
- rasa/core/channels/inspector.py +26 -17
- rasa/core/channels/voice_stream/asr/asr_engine.py +28 -1
- rasa/core/channels/voice_stream/asr/azure/engine.py +8 -3
- rasa/core/channels/voice_stream/asr/deepgram/base.py +7 -3
- rasa/core/channels/voice_stream/asr/deepgram/config.py +1 -1
- rasa/core/channels/voice_stream/asr/elevenlabs.py +10 -3
- rasa/core/channels/voice_stream/asr/speechmatics.py +8 -3
- rasa/core/channels/voice_stream/audiocodes.py +1 -5
- rasa/core/channels/voice_stream/browser_audio.py +1 -7
- rasa/core/channels/voice_stream/call_state.py +8 -25
- rasa/core/channels/voice_stream/chirp.py +0 -4
- rasa/core/channels/voice_stream/genesys.py +1 -5
- rasa/core/channels/voice_stream/jambonz.py +1 -7
- rasa/core/channels/voice_stream/json_audio.py +0 -4
- rasa/core/channels/voice_stream/signalwire.py +0 -5
- rasa/core/channels/voice_stream/speech_api_key.py +113 -0
- rasa/core/channels/voice_stream/tts/azure.py +33 -7
- rasa/core/channels/voice_stream/tts/cartesia.py +7 -3
- rasa/core/channels/voice_stream/tts/deepgram.py +9 -3
- rasa/core/channels/voice_stream/tts/deepgram_flux.py +10 -3
- rasa/core/channels/voice_stream/tts/elevenlabs.py +9 -3
- rasa/core/channels/voice_stream/tts/rime.py +10 -5
- rasa/core/channels/voice_stream/tts/tts_engine.py +72 -1
- rasa/core/channels/voice_stream/twilio_media_streams.py +0 -11
- rasa/core/channels/voice_stream/util.py +4 -3
- rasa/core/channels/voice_stream/voice_channel.py +277 -190
- rasa/core/channels/voice_stream/vonage.py +1 -5
- rasa/core/channels/voice_stream/websockets.py +1 -7
- rasa/core/config/channel_loading.py +74 -6
- rasa/core/constants.py +3 -0
- rasa/core/processor.py +12 -0
- rasa/core/tracker_stores/auth_retry_tracker_store.py +5 -0
- rasa/core/tracker_stores/tracker_store.py +18 -4
- rasa/core/voice/call_config.py +24 -0
- rasa/core/voice/event_composition/composer/composer.py +27 -2
- rasa/core/voice/event_composition/handlers/barge_in/barge_in_handler.py +270 -43
- rasa/core/voice/event_composition/handlers/playback_tracking_handler.py +112 -29
- rasa/core/voice/event_composition/handlers/transcript_merge_handler.py +24 -5
- rasa/core/voice/interruptions.py +172 -0
- rasa/dialogue_understanding/stack/frames/mantle_stack_frames.py +2 -2
- rasa/mantle/builtin_skills/__init__.py +72 -0
- rasa/mantle/{default_skills/default_completed → builtin_skills/builtin_completed}/skill.md +3 -3
- rasa/mantle/{default_skills/default_continue_interrupted → builtin_skills/builtin_continue_interrupted}/responses.yml +1 -1
- rasa/mantle/{default_skills/default_continue_interrupted → builtin_skills/builtin_continue_interrupted}/skill.md +1 -1
- rasa/mantle/builtin_skills/builtin_customer_satisfaction/memory.yml +6 -0
- rasa/mantle/builtin_skills/builtin_customer_satisfaction/responses.yml +15 -0
- rasa/mantle/{default_skills/default_customer_satisfaction → builtin_skills/builtin_customer_satisfaction}/skill.md +2 -2
- rasa/mantle/{default_skills/default_session_start → builtin_skills/builtin_session_start}/skill.md +1 -1
- rasa/mantle/{default_skills/default_silence_timeout → builtin_skills/builtin_silence_timeout}/skill.md +1 -1
- rasa/mantle/{default_skills/default_silence_timeout_hangup → builtin_skills/builtin_silence_timeout_hangup}/skill.md +1 -1
- rasa/mantle/{default_skills/default_unsupported_request_handler → builtin_skills/builtin_unsupported_request_handler}/skill.md +2 -2
- rasa/mantle/{default_skills → builtin_skills}/default_responses.yml +2 -0
- rasa/mantle/config/agent_spec.py +134 -43
- rasa/mantle/config/authoring_documents.py +10 -3
- rasa/mantle/config/channels.py +324 -10
- rasa/mantle/config/integrations_file.py +41 -1
- rasa/mantle/config/runtime_endpoints.py +40 -3
- rasa/mantle/config/speech_model_group.py +210 -0
- rasa/mantle/config/validation.py +275 -49
- rasa/mantle/content/responses.py +79 -3
- rasa/mantle/content/static_buttons.py +52 -2
- rasa/mantle/content/validation.py +122 -13
- rasa/mantle/hooks/outgoing_text.py +1 -0
- rasa/mantle/llm/client.py +207 -9
- rasa/mantle/llm/tool_schemas.py +7 -3
- rasa/mantle/model_archive/bootstrap.py +28 -43
- rasa/mantle/model_archive/references_index.py +13 -0
- rasa/mantle/model_archive/skills_index.py +2 -2
- rasa/mantle/model_archive/training_telemetry.py +2 -2
- rasa/mantle/orchestration/hooks/outgoing_text.py +24 -4
- rasa/mantle/orchestration/memory_utils.py +79 -6
- rasa/mantle/orchestration/orchestrator.py +425 -159
- rasa/mantle/orchestration/responses.py +8 -3
- rasa/mantle/orchestration/set_memory_button.py +67 -2
- rasa/mantle/orchestration/skill_completion/completion_judge.py +13 -6
- rasa/mantle/orchestration/skill_completion/gate.py +7 -5
- rasa/mantle/orchestration/skill_executor.py +188 -116
- rasa/mantle/orchestration/skill_utils.py +34 -34
- rasa/mantle/orchestration/tool_confirmation.py +254 -0
- rasa/mantle/orchestration/tool_execution/batch_identity.py +212 -0
- rasa/mantle/orchestration/tool_execution/constraints.py +22 -13
- rasa/mantle/orchestration/tool_execution/payload.py +32 -0
- rasa/mantle/orchestration/turn_context.py +75 -7
- rasa/mantle/orchestration/verbatim_triggers.py +3 -1
- rasa/mantle/processor.py +25 -8
- rasa/mantle/prompts/constructor.py +3 -2
- rasa/mantle/prompts/messages.py +2 -2
- rasa/mantle/prompts/state.py +8 -8
- rasa/mantle/prompts/templates/channel_rules.jinja2 +2 -0
- rasa/mantle/skills/catalog.py +14 -14
- rasa/mantle/skills/markdown_skill_compiler.py +12 -3
- rasa/mantle/skills/skill_retrieval.py +17 -6
- rasa/mantle/skills/validation.py +96 -26
- rasa/mantle/state/turn.py +16 -9
- rasa/mantle/tools/loader.py +3 -3
- rasa/mantle/tools/mcp_import_spec.py +194 -47
- rasa/mantle/tools/mcp_runtime.py +131 -14
- rasa/mantle/tools/validation.py +49 -9
- rasa/mantle/validation.py +31 -2
- rasa/model_manager/model_api.py +18 -0
- rasa/server.py +13 -0
- rasa/shared/core/constants.py +4 -0
- rasa/shared/providers/embedding/_base_litellm_embedding_client.py +27 -0
- rasa/shared/providers/llm/_base_litellm_client.py +70 -38
- rasa/shared/providers/llm/azure_openai_llm_client.py +15 -10
- rasa/shared/providers/llm/litellm_router_llm_client.py +36 -6
- rasa/shared/providers/llm/llm_response.py +28 -4
- rasa/shared/providers/llm/self_hosted_llm_client.py +16 -2
- rasa/shared/providers/model_group_validation.py +79 -32
- rasa/shared/utils/common.py +23 -0
- rasa/shared/utils/llm.py +4 -1
- rasa/shared/utils/tiktoken_utils.py +6 -0
- rasa/tracing/engine_token_usage.py +319 -36
- rasa/tracing/langfuse_telemetry.py +22 -1
- rasa/tracing/voice/shared/semconv.py +9 -0
- rasa/tracing/voice_usage.py +266 -0
- rasa/utils/secret_masking.py +90 -23
- rasa/utils/url_tools.py +25 -0
- rasa/version.py +1 -1
- {rasa_pro-3.22.0.dev2.dist-info → rasa_pro-3.22.0.dev3.dist-info}/METADATA +9 -8
- {rasa_pro-3.22.0.dev2.dist-info → rasa_pro-3.22.0.dev3.dist-info}/RECORD +376 -347
- rasa/builder/agent_plan/builder.py +0 -155
- rasa/builder/agent_plan/models.py +0 -140
- rasa/builder/agent_plan/planner.py +0 -252
- rasa/builder/agent_plan/web_fetch.py +0 -227
- rasa/builder/copilot/pydantic_ai/widgets.py +0 -165
- rasa/core/channels/inspector/dist/assets/architecture-7GRP2DOG-90e64109.js +0 -1
- rasa/core/channels/inspector/dist/assets/channel-d7154948.js +0 -1
- rasa/core/channels/inspector/dist/assets/classDiagram-ZZMXUADV-34c156a0.js +0 -1
- rasa/core/channels/inspector/dist/assets/classDiagram-v2-VYDZK3BY-34c156a0.js +0 -1
- rasa/core/channels/inspector/dist/assets/cynefin-OW5HDTMX-220c7db2.js +0 -1
- rasa/core/channels/inspector/dist/assets/eventmodeling-NTZA5JFV-acd83c46.js +0 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-HODETNUW-24709173.js +0 -1
- rasa/core/channels/inspector/dist/assets/gitGraph-4MIJSDKK-7cacfd5c.js +0 -1
- rasa/core/channels/inspector/dist/assets/info-A6RAGUB7-bb61fd96.js +0 -1
- rasa/core/channels/inspector/dist/assets/packet-AYTQ26CC-796f482e.js +0 -1
- rasa/core/channels/inspector/dist/assets/pie-WAS4IAKB-28cdead8.js +0 -1
- rasa/core/channels/inspector/dist/assets/radar-RG4KPBEZ-acf328bd.js +0 -1
- rasa/core/channels/inspector/dist/assets/railroad-74A4TZTK-c0a5b202.js +0 -1
- rasa/core/channels/inspector/dist/assets/railroad-abnf-HS5TGJTU-ad9c4617.js +0 -1
- rasa/core/channels/inspector/dist/assets/railroad-ebnf-LZEXJU2U-23e5893b.js +0 -1
- rasa/core/channels/inspector/dist/assets/railroad-peg-WCYAUIDC-c0d968b1.js +0 -1
- rasa/core/channels/inspector/dist/assets/stateDiagram-v2-MP3YSRHH-63c65b13.js +0 -1
- rasa/core/channels/inspector/dist/assets/swimlanesDiagram-VR7AAH4N-ce2e5a49.js +0 -8
- rasa/core/channels/inspector/dist/assets/treeView-Q6P3EWNA-6d745140.js +0 -1
- rasa/core/channels/inspector/dist/assets/treemap-WGGIJYW6-6c85a610.js +0 -1
- rasa/core/channels/inspector/dist/assets/wardley-WFR3VGLG-e9b2fc4e.js +0 -1
- rasa/core/channels/inspector-nextgen/.env.example +0 -1
- rasa/core/channels/inspector-nextgen/dist/assets/index-DuPsMenp.js +0 -1234
- rasa/core/channels/inspector-nextgen/src/Icon/icons.ts +0 -68
- rasa/mantle/default_skills/__init__.py +0 -72
- rasa/mantle/default_skills/default_customer_satisfaction/memory.yml +0 -5
- rasa/mantle/default_skills/default_customer_satisfaction/responses.yml +0 -12
- /rasa/builder/{agent_plan → copilot/modes}/__init__.py +0 -0
- /rasa/core/channels/inspector-nextgen/e2e/agents/mantle/skills/{default_session_start → builtin_session_start}/responses.yml +0 -0
- /rasa/core/channels/inspector-nextgen/e2e/agents/mantle/skills/{default_session_start → builtin_session_start}/skill.md +0 -0
- /rasa/mantle/{default_skills/default_completed → builtin_skills/builtin_completed}/memory.yml +0 -0
- /rasa/mantle/{default_skills/default_completed → builtin_skills/builtin_completed}/responses.yml +0 -0
- /rasa/mantle/{default_skills/default_continue_interrupted → builtin_skills/builtin_continue_interrupted}/memory.yml +0 -0
- /rasa/mantle/{default_skills/default_silence_timeout → builtin_skills/builtin_silence_timeout}/responses.yml +0 -0
- /rasa/mantle/{default_skills/default_silence_timeout_hangup → builtin_skills/builtin_silence_timeout_hangup}/responses.yml +0 -0
- /rasa/mantle/{default_skills/default_unsupported_request_handler → builtin_skills/builtin_unsupported_request_handler}/memory.yml +0 -0
- /rasa/mantle/{default_skills/default_unsupported_request_handler → builtin_skills/builtin_unsupported_request_handler}/responses.yml +0 -0
- {rasa_pro-3.22.0.dev2.dist-info → rasa_pro-3.22.0.dev3.dist-info}/WHEEL +0 -0
- {rasa_pro-3.22.0.dev2.dist-info → rasa_pro-3.22.0.dev3.dist-info}/entry_points.txt +0 -0
- {rasa_pro-3.22.0.dev2.dist-info → rasa_pro-3.22.0.dev3.dist-info}/licenses/NOTICE +0 -0
|
@@ -96,6 +96,7 @@ from rasa.shared.exceptions import (
|
|
|
96
96
|
RasaException,
|
|
97
97
|
)
|
|
98
98
|
from rasa.tracing.langfuse_telemetry import update_current_span_metadata
|
|
99
|
+
from rasa.utils.url_tools import hostname_is_allowlisted
|
|
99
100
|
|
|
100
101
|
structlogger = structlog.get_logger()
|
|
101
102
|
|
|
@@ -162,6 +163,30 @@ def _jsonrpc_interface_url(card: AgentCard) -> str:
|
|
|
162
163
|
return fallback
|
|
163
164
|
|
|
164
165
|
|
|
166
|
+
def _interface_trust_failure(
|
|
167
|
+
interface_url: str,
|
|
168
|
+
*,
|
|
169
|
+
card_url: str,
|
|
170
|
+
allowed_hosts: Optional[List[str]],
|
|
171
|
+
) -> Optional[str]:
|
|
172
|
+
"""Why ``interface_url`` must not receive this client's credentials.
|
|
173
|
+
|
|
174
|
+
``None`` means the interface is trusted: its host is the card host or an
|
|
175
|
+
allowlist entry, and an ``https`` card is not pointing at ``http``.
|
|
176
|
+
"""
|
|
177
|
+
card = urlparse(card_url)
|
|
178
|
+
card_host = (card.hostname or "").lower().rstrip(".")
|
|
179
|
+
parsed = urlparse(interface_url)
|
|
180
|
+
host = (parsed.hostname or "").lower().rstrip(".")
|
|
181
|
+
if not host:
|
|
182
|
+
return "missing host"
|
|
183
|
+
if card.scheme == "https" and parsed.scheme == "http":
|
|
184
|
+
return f"{host} (http)"
|
|
185
|
+
if host == card_host or hostname_is_allowlisted(host, allowed_hosts or []):
|
|
186
|
+
return None
|
|
187
|
+
return host
|
|
188
|
+
|
|
189
|
+
|
|
165
190
|
def _apply_stream_chunk(
|
|
166
191
|
chunk: StreamResponse, current: Optional[Task]
|
|
167
192
|
) -> tuple[Optional[Task], Optional[Message]]:
|
|
@@ -467,6 +492,7 @@ class A2AAgent(AgentProtocol):
|
|
|
467
492
|
auth_config: Optional[Dict[str, Any]] = None,
|
|
468
493
|
push_notification_url: Optional[str] = None,
|
|
469
494
|
pre_call_hook: Optional[str] = None,
|
|
495
|
+
allowed_interface_hosts: Optional[List[str]] = None,
|
|
470
496
|
) -> None:
|
|
471
497
|
self._name = name
|
|
472
498
|
self._description = description
|
|
@@ -478,6 +504,7 @@ class A2AAgent(AgentProtocol):
|
|
|
478
504
|
self._polling_initial_delay = polling_initial_delay
|
|
479
505
|
self._push_notification_url = push_notification_url
|
|
480
506
|
self._pre_call_hook = pre_call_hook
|
|
507
|
+
self._allowed_interface_hosts = allowed_interface_hosts
|
|
481
508
|
|
|
482
509
|
self._push_notification_url = (
|
|
483
510
|
self._push_notification_url.removesuffix("/")
|
|
@@ -537,6 +564,9 @@ class A2AAgent(AgentProtocol):
|
|
|
537
564
|
pre_call_hook=config.configuration.pre_call_hook
|
|
538
565
|
if config.configuration
|
|
539
566
|
else None,
|
|
567
|
+
allowed_interface_hosts=config.configuration.allowed_interface_hosts
|
|
568
|
+
if config.configuration
|
|
569
|
+
else None,
|
|
540
570
|
)
|
|
541
571
|
|
|
542
572
|
@property
|
|
@@ -570,6 +600,7 @@ class A2AAgent(AgentProtocol):
|
|
|
570
600
|
agent_card=message_to_dict(self.agent_card),
|
|
571
601
|
json_formatting=["agent_card"],
|
|
572
602
|
)
|
|
603
|
+
self.agent_card = self._card_with_trusted_interfaces(self.agent_card)
|
|
573
604
|
|
|
574
605
|
self._client = await self._init_client()
|
|
575
606
|
structlogger.debug(
|
|
@@ -601,6 +632,50 @@ class A2AAgent(AgentProtocol):
|
|
|
601
632
|
"""We don't need to explicitly disconnect the A2A client."""
|
|
602
633
|
return
|
|
603
634
|
|
|
635
|
+
def _card_with_trusted_interfaces(self, card: AgentCard) -> AgentCard:
|
|
636
|
+
"""Drop interfaces this client must not send credentials to.
|
|
637
|
+
|
|
638
|
+
File-loaded cards and clients without static or hook-provided
|
|
639
|
+
credentials are unchanged. A URL-loaded card keeps an interface whose
|
|
640
|
+
host is the card host or an ``allowed_interface_hosts`` entry. An
|
|
641
|
+
``https`` card never keeps an ``http`` interface.
|
|
642
|
+
"""
|
|
643
|
+
from rasa.nlu.utils import is_url
|
|
644
|
+
|
|
645
|
+
has_credentials = (
|
|
646
|
+
self._load_auth_strategy() is not None or self._pre_call_hook is not None
|
|
647
|
+
)
|
|
648
|
+
if not has_credentials or not is_url(self._agent_card_path):
|
|
649
|
+
return card
|
|
650
|
+
|
|
651
|
+
trusted = AgentCard()
|
|
652
|
+
trusted.CopyFrom(card)
|
|
653
|
+
trusted.ClearField("supported_interfaces")
|
|
654
|
+
rejected: List[str] = []
|
|
655
|
+
for interface in card.supported_interfaces:
|
|
656
|
+
reason = _interface_trust_failure(
|
|
657
|
+
interface.url,
|
|
658
|
+
card_url=self._agent_card_path,
|
|
659
|
+
allowed_hosts=self._allowed_interface_hosts,
|
|
660
|
+
)
|
|
661
|
+
if reason is None:
|
|
662
|
+
trusted.supported_interfaces.add().CopyFrom(interface)
|
|
663
|
+
else:
|
|
664
|
+
rejected.append(reason)
|
|
665
|
+
if not trusted.supported_interfaces:
|
|
666
|
+
raise AgentInitializationException(
|
|
667
|
+
f"Agent '{self._name}' card has no trusted interface. "
|
|
668
|
+
f"Rejected: {', '.join(rejected)}. Add the gateway host to "
|
|
669
|
+
"configuration.allowed_interface_hosts."
|
|
670
|
+
)
|
|
671
|
+
if rejected:
|
|
672
|
+
structlogger.warning(
|
|
673
|
+
"a2a_agent.interface_host_rejected",
|
|
674
|
+
agent_name=self._name,
|
|
675
|
+
rejected_hosts=rejected,
|
|
676
|
+
)
|
|
677
|
+
return trusted
|
|
678
|
+
|
|
604
679
|
# ============================================================================
|
|
605
680
|
# Core Protocol Methods
|
|
606
681
|
# ============================================================================
|
rasa/agents/validation.py
CHANGED
|
@@ -54,11 +54,36 @@ ALLOWED_KEYS = {
|
|
|
54
54
|
"polling_initial_delay",
|
|
55
55
|
"pre_call_hook",
|
|
56
56
|
"push_notification_url",
|
|
57
|
+
"allowed_interface_hosts",
|
|
57
58
|
},
|
|
58
59
|
"connections": {"mcp_servers"},
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
|
|
63
|
+
def _allowed_interface_host_is_invalid(host: str) -> bool:
|
|
64
|
+
"""Whether an allowlist entry is not a bare hostname."""
|
|
65
|
+
stripped = host.strip()
|
|
66
|
+
return not stripped or any(char in stripped for char in ("/", "@", ":", " "))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _validate_allowed_interface_hosts(agent_config: AgentConfig) -> None:
|
|
70
|
+
"""Reject URL-shaped entries in ``allowed_interface_hosts``."""
|
|
71
|
+
configuration = agent_config.configuration
|
|
72
|
+
hosts = configuration.allowed_interface_hosts if configuration else None
|
|
73
|
+
if not hosts:
|
|
74
|
+
return
|
|
75
|
+
for host in hosts:
|
|
76
|
+
if _allowed_interface_host_is_invalid(host):
|
|
77
|
+
raise ValidationError(
|
|
78
|
+
code="agent.validation.a2a.invalid_allowed_interface_host",
|
|
79
|
+
event_info=(
|
|
80
|
+
f"Agent '{agent_config.agent.name}' has invalid "
|
|
81
|
+
f"'allowed_interface_hosts' entry '{host}'. "
|
|
82
|
+
"Use a hostname, not a URL."
|
|
83
|
+
),
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
|
|
62
87
|
def validate_agent_names_unique(agents: List[AgentConfig]) -> None:
|
|
63
88
|
"""Validate that agent names are unique across all loaded agents.
|
|
64
89
|
|
|
@@ -169,6 +194,8 @@ def _validate_a2a_config(agent_config: AgentConfig) -> None:
|
|
|
169
194
|
f"exist: {agent_card}",
|
|
170
195
|
)
|
|
171
196
|
|
|
197
|
+
_validate_allowed_interface_hosts(agent_config)
|
|
198
|
+
|
|
172
199
|
# Validate right use of secrets in auth configuration
|
|
173
200
|
if agent_config.configuration.auth:
|
|
174
201
|
validate_secrets_in_params(
|
rasa/builder/config.py
CHANGED
|
@@ -87,9 +87,10 @@ HELLO_RASA_PROJECT_ID = os.getenv("HELLO_RASA_PROJECT_ID")
|
|
|
87
87
|
EVAL_RESULTS_FOLDER = "eval/results/"
|
|
88
88
|
BUILDER_KEPT_FOLDERS = (".rasa/", EVAL_RESULTS_FOLDER)
|
|
89
89
|
# Entries the builder needs in the project's .gitignore: the kept folders, which
|
|
90
|
-
# must not be committed, plus the models and
|
|
91
|
-
# with the license, and restoring one must not commit it.
|
|
92
|
-
|
|
90
|
+
# must not be committed, plus the models and env files. Older backups carry a
|
|
91
|
+
# `.env` with the license, and restoring one must not commit it; `.env.local` and
|
|
92
|
+
# the like hold secrets too.
|
|
93
|
+
BUILDER_GITIGNORE_ENTRIES = (*BUILDER_KEPT_FOLDERS, "models/", ".env", ".env.*")
|
|
93
94
|
|
|
94
95
|
# Copilot History Storage Configuration
|
|
95
96
|
# Relative path from project root to copilot database
|
|
@@ -210,10 +211,10 @@ def get_default_credentials() -> Dict[str, Any]:
|
|
|
210
211
|
enabled: true
|
|
211
212
|
min_words: 3
|
|
212
213
|
asr:
|
|
213
|
-
|
|
214
|
+
provider: "deepgram"
|
|
214
215
|
endpoint: "hello-llm-proxy.rasa-e2e.workers.dev/deepgram"
|
|
215
216
|
tts:
|
|
216
|
-
|
|
217
|
+
provider: "deepgram"
|
|
217
218
|
endpoint: "wss://hello-llm-proxy.rasa-e2e.workers.dev/deepgram/v1/speak"
|
|
218
219
|
"""
|
|
219
220
|
return read_yaml(default_credentials_yaml)
|
|
@@ -80,6 +80,9 @@ RASA_PROJECT_FOLDER_ENV_VAR = "RASA_PROJECT_FOLDER"
|
|
|
80
80
|
SIMULATED_USER_SYSTEM_PROMPT_FILE = "simulated_user_system_prompt.jinja2"
|
|
81
81
|
EVALUATION_CRITERIA_JUDGE_PROMPT_FILE = "evaluation_criteria_judge_prompt.jinja2"
|
|
82
82
|
EVALUATION_METRICS_JUDGE_PROMPT_FILE = "evaluation_metrics_judge_prompt.jinja2"
|
|
83
|
+
EVALUATION_ACKNOWLEDGEMENT_JUDGE_PROMPT_FILE = (
|
|
84
|
+
"evaluation_acknowledgement_judge_prompt.jinja2"
|
|
85
|
+
)
|
|
83
86
|
|
|
84
87
|
# Documentation-search tool name. Registered natively on Copilot v2 agents
|
|
85
88
|
# (pydantic_ai/document_search.py) and backed by local retrieval.
|
|
@@ -28,6 +28,7 @@ from rasa.builder.project_generator import (
|
|
|
28
28
|
is_restricted_path,
|
|
29
29
|
unsafe_write_to_bot_files,
|
|
30
30
|
)
|
|
31
|
+
from rasa.builder.secret_scan import SecretFinding, scan_file
|
|
31
32
|
from rasa.utils.io import InvalidPathException
|
|
32
33
|
|
|
33
34
|
structlogger = structlog.get_logger()
|
|
@@ -239,10 +240,15 @@ async def write_file(
|
|
|
239
240
|
content: The content to write to the file
|
|
240
241
|
|
|
241
242
|
Returns:
|
|
242
|
-
WriteFileResponse indicating success or failure
|
|
243
|
+
WriteFileResponse indicating success or failure. Content that holds a
|
|
244
|
+
secret is not written; the message says where the secret is and how
|
|
245
|
+
to refer to it instead.
|
|
243
246
|
|
|
244
247
|
"""
|
|
245
248
|
try:
|
|
249
|
+
findings = scan_file(file_path, content)
|
|
250
|
+
if findings:
|
|
251
|
+
return _secret_refused_response(file_path, findings)
|
|
246
252
|
project_path = Path(project_folder)
|
|
247
253
|
unsafe_write_to_bot_files(
|
|
248
254
|
project_path, {file_path: content}, fail_on_restricted_path=True
|
|
@@ -267,6 +273,23 @@ async def write_file(
|
|
|
267
273
|
)
|
|
268
274
|
|
|
269
275
|
|
|
276
|
+
def _secret_refused_response(
|
|
277
|
+
file_path: str, findings: List[SecretFinding]
|
|
278
|
+
) -> WriteFileResponse:
|
|
279
|
+
structlogger.info(
|
|
280
|
+
"copilot.file_operations.write_file.secret_refused",
|
|
281
|
+
file_path=file_path,
|
|
282
|
+
finding_count=len(findings),
|
|
283
|
+
)
|
|
284
|
+
reasons = " ".join(finding.message() for finding in findings)
|
|
285
|
+
return WriteFileResponse(
|
|
286
|
+
success=False,
|
|
287
|
+
file_path=file_path,
|
|
288
|
+
message=f"Not written, because a secret must never be stored in a "
|
|
289
|
+
f"file. {reasons}",
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
|
|
270
293
|
async def update_files(
|
|
271
294
|
project_folder: str, files: Dict[str, str]
|
|
272
295
|
) -> UpdateFilesResponse:
|
|
@@ -71,4 +71,4 @@ Simulate goal-driven conversations and score outcomes against assertions and cri
|
|
|
71
71
|
- `validate_scenario` - Validate scenario YAML syntax, assertions, and slot references before running
|
|
72
72
|
- `evaluate_agent` - Run LLM-simulated multi-turn evaluation over one or more scenarios; writes results to `eval/results/<experiment_timestamp>/`
|
|
73
73
|
|
|
74
|
-
Requires a running Rasa server (`rasa run --inspect`), `eval/conftest.yml`, and scenario files in `eval/scenarios/`. Always call `validate_scenario` before `evaluate_agent`, and pass all of a session's scenarios to it in one call — `scenario_paths` is a list, runs go concurrently, and they share one summary. Each `scenario_results` entry gives `runs_passed`/`runs_total` for the verdict, plus `runs_errored` for runs that failed for harness reasons — a timeout, a cancellation, or an error captured during the run — rather than on their merits. Evaluation starts each conversation with `/session_start` (welcome first when configured), then `initial_slots`, then simulated turns over REST (`?stream=true`; a classic JSON-array body on that request is parsed in place). Results are `eval/results/<timestamp>/<scenario>/run_N.txt` plus `run_N.json
|
|
74
|
+
Requires a running Rasa server (`rasa run --inspect`), `eval/conftest.yml`, and scenario files in `eval/scenarios/`. Always call `validate_scenario` before `evaluate_agent`, and pass all of a session's scenarios to it in one call — `scenario_paths` is a list, runs go concurrently, and they share one summary. Each `scenario_results` entry gives `runs_passed`/`runs_total` for the verdict, plus `runs_errored` for runs that failed for harness reasons — a timeout, a cancellation, or an error captured during the run — rather than on their merits. Evaluation starts each conversation with `/session_start` (welcome first when configured), then `initial_slots`, then simulated turns over REST (`?stream=true`; a classic JSON-array body on that request is parsed in place). Results are `eval/results/<timestamp>/<scenario>/run_N.txt` plus `run_N.json`; a `run_N.started.json` marker exists while a run is in progress and is removed once `run_N.json` is written. Pass optional `run_name`, a short human-readable name for the batch; blank is omitted and names longer than 120 characters are truncated. It is stored with the batch's scenarios in `eval/results/<timestamp>/start.json`, written before any run starts. When a batch is split across several calls sharing one `experiment_timestamp`, pass the same `run_name` and `run_count` on each: `start.json` keeps the first call's `run_count`. Set `show_tracker_events=true` to add important tracker events, grouped by user turn, to each `run_N.txt` report when diagnosing where a conversation went off track. This option is off by default and does not change pass/fail. To author scenarios interactively, use the **simulate conversation** skill (`rasa-simulating-conversations`) — it can generate scenario YAML from goals, criteria, and assertions, then validate before you run `evaluate_agent`.
|
|
@@ -11,6 +11,7 @@ from rasa.builder.copilot.constants import (
|
|
|
11
11
|
COPILOT_PROMPTS_DIR,
|
|
12
12
|
COPILOT_PROMPTS_FILE,
|
|
13
13
|
COPILOT_TRAINING_ERROR_HANDLER_PROMPT_FILE,
|
|
14
|
+
EVALUATION_ACKNOWLEDGEMENT_JUDGE_PROMPT_FILE,
|
|
14
15
|
EVALUATION_CRITERIA_JUDGE_PROMPT_FILE,
|
|
15
16
|
EVALUATION_METRICS_JUDGE_PROMPT_FILE,
|
|
16
17
|
SIMULATED_USER_SYSTEM_PROMPT_FILE,
|
|
@@ -122,3 +123,8 @@ def get_evaluation_criteria_judge_prompt_template() -> str:
|
|
|
122
123
|
def get_evaluation_metrics_judge_prompt_template() -> str:
|
|
123
124
|
"""Get the bundled evaluation metrics judge prompt template."""
|
|
124
125
|
return _load_prompt_source(EVALUATION_METRICS_JUDGE_PROMPT_FILE)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def get_evaluation_acknowledgement_judge_prompt_template() -> str:
|
|
129
|
+
"""Get the bundled evaluation acknowledgement judge prompt template."""
|
|
130
|
+
return _load_prompt_source(EVALUATION_ACKNOWLEDGEMENT_JUDGE_PROMPT_FILE)
|
|
@@ -20,7 +20,7 @@ from contextlib import (
|
|
|
20
20
|
asynccontextmanager,
|
|
21
21
|
suppress,
|
|
22
22
|
)
|
|
23
|
-
from datetime import datetime
|
|
23
|
+
from datetime import datetime, timezone
|
|
24
24
|
from pathlib import Path
|
|
25
25
|
from typing import TYPE_CHECKING, Annotated, Any, AsyncIterator, Dict, List, Optional
|
|
26
26
|
|
|
@@ -1341,7 +1341,9 @@ async def evaluate_agent(
|
|
|
1341
1341
|
# The caller may not know the time (the Copilot has no clock), so a name
|
|
1342
1342
|
# it would have to make up is generated here instead.
|
|
1343
1343
|
if experiment_timestamp is None:
|
|
1344
|
-
experiment_timestamp = datetime.now().strftime(
|
|
1344
|
+
experiment_timestamp = datetime.now(timezone.utc).strftime(
|
|
1345
|
+
EXPERIMENT_TIMESTAMP_FORMAT
|
|
1346
|
+
)
|
|
1345
1347
|
# The batch endpoints only list folders named this way, so a batch written
|
|
1346
1348
|
# under any other name would never reach Studio.
|
|
1347
1349
|
if not EVAL_BATCH_ID_PATTERN.fullmatch(experiment_timestamp):
|
|
@@ -1408,6 +1410,19 @@ async def evaluate_agent(
|
|
|
1408
1410
|
error=str(exc),
|
|
1409
1411
|
)
|
|
1410
1412
|
|
|
1413
|
+
acknowledgement_judge_prompt: Optional[str] = None
|
|
1414
|
+
if conftest.evaluation.acknowledgement_judge_prompt:
|
|
1415
|
+
try:
|
|
1416
|
+
acknowledgement_judge_prompt = load_prompt_template(
|
|
1417
|
+
project_path, conftest.evaluation.acknowledgement_judge_prompt
|
|
1418
|
+
)
|
|
1419
|
+
except EvalConfigError as exc:
|
|
1420
|
+
return EvaluateAgentResponse(
|
|
1421
|
+
success=False,
|
|
1422
|
+
message="Could not load acknowledgement judge prompt template.",
|
|
1423
|
+
error=str(exc),
|
|
1424
|
+
)
|
|
1425
|
+
|
|
1411
1426
|
# Every path is validated and loaded up front: a typo in the last path
|
|
1412
1427
|
# should fail before any run starts, not after the batch has already
|
|
1413
1428
|
# spent LLM calls on the earlier ones.
|
|
@@ -1477,6 +1492,7 @@ async def evaluate_agent(
|
|
|
1477
1492
|
simulated_user_prompt=simulated_user_prompt,
|
|
1478
1493
|
criteria_judge_prompt=criteria_judge_prompt,
|
|
1479
1494
|
metrics_judge_prompt=metrics_judge_prompt,
|
|
1495
|
+
acknowledgement_judge_prompt=acknowledgement_judge_prompt,
|
|
1480
1496
|
show_tracker_events=show_tracker_events,
|
|
1481
1497
|
simulation_max_concurrent_llm_calls=(
|
|
1482
1498
|
conftest.simulation.max_concurrent_llm_calls
|