fastworkflow 2.13.5__tar.gz → 2.14.1__tar.gz
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.
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/PKG-INFO +12 -3
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/README.md +11 -2
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/you_misunderstood.py +1 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/go_up.py +1 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/reset_context.py +1 -1
- fastworkflow-2.14.1/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_can_i_do.py +158 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/_workflows/command_metadata_extraction/_commands/wildcard.py +7 -3
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/genai_postprocessor.py +143 -149
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/chat_session.py +42 -11
- fastworkflow-2.14.1/fastworkflow/command_metadata_api.py +794 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/command_routing.py +4 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/fastworkflow.env +1 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/fastworkflow.passwords.env +1 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/hello_world/_commands/add_two_numbers.py +1 -0
- fastworkflow-2.14.1/fastworkflow/examples/retail_workflow/_commands/calculate.py +67 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/cancel_pending_order.py +4 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/exchange_delivered_order_items.py +13 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_email.py +6 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_name_zip.py +6 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/get_order_details.py +22 -10
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/get_product_details.py +12 -4
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/get_user_details.py +21 -5
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/list_all_product_types.py +4 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_address.py +3 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_items.py +12 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_payment.py +7 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/modify_user_address.py +3 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/return_delivered_order_items.py +10 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/_commands/transfer_to_human_agents.py +1 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/calculate.py +1 -1
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/mcp_server.py +52 -44
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/run/__main__.py +9 -5
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/run_agent/__main__.py +8 -8
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/run_agent/agent_module.py +6 -16
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/command_dependency_graph.py +130 -143
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/dspy_utils.py +11 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/signatures.py +7 -0
- fastworkflow-2.14.1/fastworkflow/workflow_agent.py +186 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/pyproject.toml +1 -1
- fastworkflow-2.13.5/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_can_i_do.py +0 -226
- fastworkflow-2.13.5/fastworkflow/agent_integration.py +0 -239
- fastworkflow-2.13.5/fastworkflow/examples/retail_workflow/_commands/parameter_dependency_graph.json +0 -36
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/LICENSE +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/.DS_Store +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/_workflows/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/_workflows/command_metadata_extraction/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/abort.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_is_current_context.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/_workflows/command_metadata_extraction/_commands/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/_workflows/command_metadata_extraction/command_context_model.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/__main__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/ast_class_extractor.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/class_analysis_structures.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/cli_specification.md +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/command_dependency_resolver.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/command_file_generator.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/command_file_template.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/command_import_utils.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/command_stub_generator.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/context_folder_generator.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/context_model_generator.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/dependency_manager.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/dir_scanner.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/documentation_generator.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/inheritance_block_regenerator.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/libcst_transformers.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/navigator_stub_generator.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/pydantic_model_generator.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/build/utterance_generator.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/cache_matching.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/cli.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/command_context_model.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/command_directory.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/command_executor.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/command_interfaces.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/docs/context_modules_prd.txt +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/extended_workflow_example/README.md +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/extended_workflow_example/_commands/WorkItem/get_status.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/extended_workflow_example/_commands/generate_report.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/extended_workflow_example/_commands/startup.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/extended_workflow_example/simple_workflow_template.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/extended_workflow_example/workflow_inheritance_model.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/hello_world/_commands/README.md +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/hello_world/_commands/context_inheritance_model.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/hello_world/application/add_two_numbers.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_1/_commands/context_inheritance_model.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_1/_commands/send_message.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_1/application/send_message.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_2/_commands/User/send_message.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_2/_commands/context_inheritance_model.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_2/_commands/startup.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_2/application/user.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_3/_commands/PremiumUser/send_priority_message.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_3/_commands/User/send_message.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_3/_commands/context_inheritance_model.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_3/_commands/initialize_user.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_3/application/user.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/_ChatRoom.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/add_user.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/broadcast_message.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/get_current_user.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/list_users.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/set_current_user.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/_PremiumUser.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/send_priority_message.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/User/_User.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/User/send_message.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/context_inheritance_model.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/_commands/set_root_context.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/application/chatroom.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/application/user.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/context_hierarchy_model.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/messaging_app_4/startup_action.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/command_dependency_graph.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/context_inheritance_model.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/retail_data/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/retail_data/orders.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/retail_data/products.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/retail_data/users.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/cancel_pending_order.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/exchange_delivered_order_items.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_email.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_name_zip.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/get_order_details.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/get_product_details.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/get_user_details.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/list_all_product_types.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_address.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_items.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_payment.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/modify_user_address.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/return_delivered_order_items.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/think.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/tool.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/tools/transfer_to_human_agents.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/retail_workflow/workflow_description.txt +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/_WorkItem.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/add_child_workitem.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/get_status.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/go_to_workitem.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/mark_as_complete.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_first_child_workitem.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_last_child_workitem.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_next_workitem.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_previous_workitem.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_all_child_workitems.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_child_workitem.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/show_schema.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/_commands/startup.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/application/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/application/workitem.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/simple_workflow_template.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/examples/simple_workflow_template/startup_action.json +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/model_pipeline_training.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/refine/__main__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/run/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/run_agent/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/train/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/train/__main__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/train/generate_synthetic.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/user_message_queues.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/__init__.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/context_utils.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/dspy_cache_utils.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/dspy_logger.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/env.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/fuzzy_match.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/generate_param_examples.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/logging.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/parameterize_func_decorator.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/pydantic_model_2_dspy_signature_class.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/python_utils.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/utils/startup_progress.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/workflow.py +0 -0
- {fastworkflow-2.13.5 → fastworkflow-2.14.1}/fastworkflow/workflow_inheritance_model.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fastworkflow
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.14.1
|
|
4
4
|
Summary: A framework for rapidly building large-scale, deterministic, interactive workflows with a fault-tolerant, conversational UX
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Keywords: fastworkflow,ai,workflow,llm,openai
|
|
@@ -198,6 +198,7 @@ You'll need to add at least:
|
|
|
198
198
|
LITELLM_API_KEY_SYNDATA_GEN=your-mistral-api-key
|
|
199
199
|
LITELLM_API_KEY_PARAM_EXTRACTION=your-mistral-api-key
|
|
200
200
|
LITELLM_API_KEY_RESPONSE_GEN=your-mistral-api-key
|
|
201
|
+
LITELLM_API_KEY_PLANNER=your-mistral-api-key
|
|
201
202
|
LITELLM_API_KEY_AGENT=your-mistral-api-key
|
|
202
203
|
```
|
|
203
204
|
|
|
@@ -260,6 +261,12 @@ fastworkflow train <workflow_dir> <env_file> <passwords_file>
|
|
|
260
261
|
fastworkflow run <workflow_dir> <env_file> <passwords_file>
|
|
261
262
|
```
|
|
262
263
|
|
|
264
|
+
To run a workflow in agentic mode, add the `--run_as_agent` flag:
|
|
265
|
+
|
|
266
|
+
```sh
|
|
267
|
+
fastworkflow run <workflow_dir> <env_file> <passwords_file> --run_as_agent
|
|
268
|
+
```
|
|
269
|
+
|
|
263
270
|
Each command has additional options that can be viewed with the `--help` flag:
|
|
264
271
|
|
|
265
272
|
```sh
|
|
@@ -581,7 +588,8 @@ This single command will generate the `greet.py` command, `get_properties` and `
|
|
|
581
588
|
| `LLM_SYNDATA_GEN` | LiteLLM model string for synthetic utterance generation | `train` | `mistral/mistral-small-latest` |
|
|
582
589
|
| `LLM_PARAM_EXTRACTION` | LiteLLM model string for parameter extraction | `train`, `run` | `mistral/mistral-small-latest` |
|
|
583
590
|
| `LLM_RESPONSE_GEN` | LiteLLM model string for response generation | `run` | `mistral/mistral-small-latest` |
|
|
584
|
-
| `
|
|
591
|
+
| `LLM_PLANNER` | LiteLLM model string for the agent's task planner | `run` (agent mode) | `mistral/mistral-small-latest` |
|
|
592
|
+
| `LLM_AGENT` | LiteLLM model string for the DSPy agent | `run` (agent mode) | `mistral/mistral-small-latest` |
|
|
585
593
|
| `NOT_FOUND` | Placeholder value for missing parameters during extraction | Always | `"NOT_FOUND"` |
|
|
586
594
|
| `MISSING_INFORMATION_ERRMSG` | Error message prefix for missing parameters | Always | `"Missing required..."` |
|
|
587
595
|
| `INVALID_INFORMATION_ERRMSG` | Error message prefix for invalid parameters | Always | `"Invalid information..."` |
|
|
@@ -593,7 +601,8 @@ This single command will generate the `greet.py` command, `get_properties` and `
|
|
|
593
601
|
| `LITELLM_API_KEY_SYNDATA_GEN`| API key for the `LLM_SYNDATA_GEN` model | `train` | *required* |
|
|
594
602
|
| `LITELLM_API_KEY_PARAM_EXTRACTION`| API key for the `LLM_PARAM_EXTRACTION` model | `train`, `run` | *required* |
|
|
595
603
|
| `LITELLM_API_KEY_RESPONSE_GEN`| API key for the `LLM_RESPONSE_GEN` model | `run` | *required* |
|
|
596
|
-
| `
|
|
604
|
+
| `LITELLM_API_KEY_PLANNER`| API key for the `LLM_PLANNER` model | `run` (agent mode) | *required* |
|
|
605
|
+
| `LITELLM_API_KEY_AGENT`| API key for the `LLM_AGENT` model | `run` (agent mode) | *required* |
|
|
597
606
|
|
|
598
607
|
> [!tip]
|
|
599
608
|
> The example workflows are configured to use Mistral's models by default. You can get a free API key from [Mistral AI](https://mistral.ai) that works with the `mistral-small-latest` model.
|
|
@@ -165,6 +165,7 @@ You'll need to add at least:
|
|
|
165
165
|
LITELLM_API_KEY_SYNDATA_GEN=your-mistral-api-key
|
|
166
166
|
LITELLM_API_KEY_PARAM_EXTRACTION=your-mistral-api-key
|
|
167
167
|
LITELLM_API_KEY_RESPONSE_GEN=your-mistral-api-key
|
|
168
|
+
LITELLM_API_KEY_PLANNER=your-mistral-api-key
|
|
168
169
|
LITELLM_API_KEY_AGENT=your-mistral-api-key
|
|
169
170
|
```
|
|
170
171
|
|
|
@@ -227,6 +228,12 @@ fastworkflow train <workflow_dir> <env_file> <passwords_file>
|
|
|
227
228
|
fastworkflow run <workflow_dir> <env_file> <passwords_file>
|
|
228
229
|
```
|
|
229
230
|
|
|
231
|
+
To run a workflow in agentic mode, add the `--run_as_agent` flag:
|
|
232
|
+
|
|
233
|
+
```sh
|
|
234
|
+
fastworkflow run <workflow_dir> <env_file> <passwords_file> --run_as_agent
|
|
235
|
+
```
|
|
236
|
+
|
|
230
237
|
Each command has additional options that can be viewed with the `--help` flag:
|
|
231
238
|
|
|
232
239
|
```sh
|
|
@@ -548,7 +555,8 @@ This single command will generate the `greet.py` command, `get_properties` and `
|
|
|
548
555
|
| `LLM_SYNDATA_GEN` | LiteLLM model string for synthetic utterance generation | `train` | `mistral/mistral-small-latest` |
|
|
549
556
|
| `LLM_PARAM_EXTRACTION` | LiteLLM model string for parameter extraction | `train`, `run` | `mistral/mistral-small-latest` |
|
|
550
557
|
| `LLM_RESPONSE_GEN` | LiteLLM model string for response generation | `run` | `mistral/mistral-small-latest` |
|
|
551
|
-
| `
|
|
558
|
+
| `LLM_PLANNER` | LiteLLM model string for the agent's task planner | `run` (agent mode) | `mistral/mistral-small-latest` |
|
|
559
|
+
| `LLM_AGENT` | LiteLLM model string for the DSPy agent | `run` (agent mode) | `mistral/mistral-small-latest` |
|
|
552
560
|
| `NOT_FOUND` | Placeholder value for missing parameters during extraction | Always | `"NOT_FOUND"` |
|
|
553
561
|
| `MISSING_INFORMATION_ERRMSG` | Error message prefix for missing parameters | Always | `"Missing required..."` |
|
|
554
562
|
| `INVALID_INFORMATION_ERRMSG` | Error message prefix for invalid parameters | Always | `"Invalid information..."` |
|
|
@@ -560,7 +568,8 @@ This single command will generate the `greet.py` command, `get_properties` and `
|
|
|
560
568
|
| `LITELLM_API_KEY_SYNDATA_GEN`| API key for the `LLM_SYNDATA_GEN` model | `train` | *required* |
|
|
561
569
|
| `LITELLM_API_KEY_PARAM_EXTRACTION`| API key for the `LLM_PARAM_EXTRACTION` model | `train`, `run` | *required* |
|
|
562
570
|
| `LITELLM_API_KEY_RESPONSE_GEN`| API key for the `LLM_RESPONSE_GEN` model | `run` | *required* |
|
|
563
|
-
| `
|
|
571
|
+
| `LITELLM_API_KEY_PLANNER`| API key for the `LLM_PLANNER` model | `run` (agent mode) | *required* |
|
|
572
|
+
| `LITELLM_API_KEY_AGENT`| API key for the `LLM_AGENT` model | `run` (agent mode) | *required* |
|
|
564
573
|
|
|
565
574
|
> [!tip]
|
|
566
575
|
> The example workflows are configured to use Mistral's models by default. You can get a free API key from [Mistral AI](https://mistral.ai) that works with the `mistral-small-latest` model.
|
|
@@ -41,7 +41,7 @@ class ResponseGenerator:
|
|
|
41
41
|
fully_qualified_command_names = (
|
|
42
42
|
set(cme_command_names) |
|
|
43
43
|
set(subject_crd.get_command_names(app_workflow.current_command_context_name))
|
|
44
|
-
)
|
|
44
|
+
)
|
|
45
45
|
|
|
46
46
|
valid_command_names = [
|
|
47
47
|
fully_qualified_command_name.split('/')[-1]
|
|
@@ -6,7 +6,7 @@ from fastworkflow.train.generate_synthetic import generate_diverse_utterances
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class Signature: # noqa: D101
|
|
9
|
-
"""Change context to the parent of the current context."""
|
|
9
|
+
"""Change context to the parent of the current context. This could change the commands that are available."""
|
|
10
10
|
|
|
11
11
|
plain_utterances = [
|
|
12
12
|
"go up",
|
|
@@ -5,7 +5,7 @@ from fastworkflow.train.generate_synthetic import generate_diverse_utterances
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class Signature: # noqa: D101
|
|
8
|
-
"""Reset the current context to the global context (*)."""
|
|
8
|
+
"""Reset the current context to the global context (*). This could change the commands that are available."""
|
|
9
9
|
plain_utterances = [
|
|
10
10
|
"reset context",
|
|
11
11
|
"clear context",
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import contextlib
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Dict, Any
|
|
6
|
+
from pydantic import BaseModel
|
|
7
|
+
import json
|
|
8
|
+
|
|
9
|
+
import fastworkflow
|
|
10
|
+
from fastworkflow.train.generate_synthetic import generate_diverse_utterances
|
|
11
|
+
from fastworkflow.command_metadata_api import CommandMetadataAPI
|
|
12
|
+
|
|
13
|
+
class Signature:
|
|
14
|
+
"""List all the commands available in the current context along with their metadata"""
|
|
15
|
+
class Output(BaseModel):
|
|
16
|
+
valid_command_names: list[str]
|
|
17
|
+
|
|
18
|
+
# Constants from plain_utterances.json
|
|
19
|
+
plain_utterances = [
|
|
20
|
+
"show me all the utterances",
|
|
21
|
+
"what can you do?",
|
|
22
|
+
"what are my options?",
|
|
23
|
+
"what are my choices?",
|
|
24
|
+
"what are my capabilities?",
|
|
25
|
+
"what can i do?",
|
|
26
|
+
"what can i do here?",
|
|
27
|
+
"what can i use?",
|
|
28
|
+
"what are my tools?",
|
|
29
|
+
"now what?",
|
|
30
|
+
"list commands",
|
|
31
|
+
"list utterances"
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
@staticmethod
|
|
35
|
+
def generate_utterances(workflow: fastworkflow.Workflow, command_name: str) -> list[str]:
|
|
36
|
+
return [
|
|
37
|
+
command_name.split('/')[-1].lower().replace('_', ' ')
|
|
38
|
+
] + generate_diverse_utterances(Signature.plain_utterances, command_name)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class ResponseGenerator:
|
|
42
|
+
# def _get_enhanced_command_info(self, workflow: fastworkflow.Workflow) -> Dict[str, Any]:
|
|
43
|
+
# """
|
|
44
|
+
# Get enhanced command information for agent mode.
|
|
45
|
+
# Returns structured JSON with context info, command details, etc.
|
|
46
|
+
# """
|
|
47
|
+
# app_workflow = workflow.context["app_workflow"]
|
|
48
|
+
|
|
49
|
+
# # Get the current context information
|
|
50
|
+
# context_info = {
|
|
51
|
+
# "name": app_workflow.current_command_context_name,
|
|
52
|
+
# "display_name": app_workflow.current_command_context_displayname,
|
|
53
|
+
# "description": "",
|
|
54
|
+
# "inheritance": [],
|
|
55
|
+
# "containment": []
|
|
56
|
+
# }
|
|
57
|
+
|
|
58
|
+
# # Try to load context hierarchy information if available
|
|
59
|
+
# with contextlib.suppress(Exception):
|
|
60
|
+
# inheritance_path = Path(app_workflow.folderpath) / "context_inheritance_model.json"
|
|
61
|
+
# if inheritance_path.exists():
|
|
62
|
+
# with open(inheritance_path) as f:
|
|
63
|
+
# inheritance_data = json.load(f)
|
|
64
|
+
# context_info["inheritance"] = inheritance_data.get(context_info["name"], [])
|
|
65
|
+
|
|
66
|
+
# containment_path = Path(app_workflow.folderpath) / "context_containment_model.json"
|
|
67
|
+
# if containment_path.exists():
|
|
68
|
+
# with open(containment_path) as f:
|
|
69
|
+
# containment_data = json.load(f)
|
|
70
|
+
# context_info["containment"] = containment_data.get(context_info["name"], [])
|
|
71
|
+
|
|
72
|
+
# from fastworkflow.command_metadata_api import CommandMetadataAPI
|
|
73
|
+
|
|
74
|
+
# meta = CommandMetadataAPI.get_enhanced_command_info(
|
|
75
|
+
# subject_workflow_path=app_workflow.folderpath,
|
|
76
|
+
# cme_workflow_path=workflow.folderpath,
|
|
77
|
+
# active_context_name=app_workflow.current_command_context_name,
|
|
78
|
+
# )
|
|
79
|
+
|
|
80
|
+
# return {
|
|
81
|
+
# "context": context_info,
|
|
82
|
+
# "commands": meta.get("commands", [])
|
|
83
|
+
# }
|
|
84
|
+
|
|
85
|
+
# def _process_command(
|
|
86
|
+
# self, workflow: fastworkflow.Workflow
|
|
87
|
+
# ) -> Signature.Output:
|
|
88
|
+
# """
|
|
89
|
+
# Provides helpful information about this type of work-item.
|
|
90
|
+
# If the workitem_path is not provided, it provides information about the current work-item.
|
|
91
|
+
|
|
92
|
+
# :param input: The input parameters for the function.
|
|
93
|
+
# """
|
|
94
|
+
# app_workflow = workflow.context["app_workflow"]
|
|
95
|
+
# subject_crd = fastworkflow.RoutingRegistry.get_definition(
|
|
96
|
+
# app_workflow.folderpath)
|
|
97
|
+
|
|
98
|
+
# crd = fastworkflow.RoutingRegistry.get_definition(
|
|
99
|
+
# workflow.folderpath)
|
|
100
|
+
# cme_command_names = crd.get_command_names('IntentDetection')
|
|
101
|
+
|
|
102
|
+
# # ------------------------------------------------------------------
|
|
103
|
+
# # Build the union of command names that *should* be visible, then
|
|
104
|
+
# # filter out any command that (a) is the special wildcard helper or
|
|
105
|
+
# # (b) has no user-facing utterances in *any* command directory.
|
|
106
|
+
# # ------------------------------------------------------------------
|
|
107
|
+
|
|
108
|
+
# candidate_commands: set[str] = (
|
|
109
|
+
# set(cme_command_names)
|
|
110
|
+
# | set(subject_crd.get_command_names(app_workflow.current_command_context_name))
|
|
111
|
+
# )
|
|
112
|
+
|
|
113
|
+
# def _has_utterances(fq_cmd: str) -> bool:
|
|
114
|
+
# """Return True if *fq_cmd* has at least one utterance definition in
|
|
115
|
+
# either the subject workflow or the CME workflow."""
|
|
116
|
+
# return (
|
|
117
|
+
# subject_crd.command_directory.get_utterance_metadata(fq_cmd) is not None
|
|
118
|
+
# or crd.command_directory.get_utterance_metadata(fq_cmd) is not None
|
|
119
|
+
# )
|
|
120
|
+
|
|
121
|
+
# visible_commands = [
|
|
122
|
+
# fq_cmd for fq_cmd in candidate_commands
|
|
123
|
+
# if fq_cmd != "wildcard" and _has_utterances(fq_cmd)
|
|
124
|
+
# ]
|
|
125
|
+
|
|
126
|
+
# valid_command_names = [
|
|
127
|
+
# cmd.split("/")[-1] for cmd in sorted(visible_commands)
|
|
128
|
+
# ]
|
|
129
|
+
|
|
130
|
+
# return Signature.Output(valid_command_names=valid_command_names)
|
|
131
|
+
|
|
132
|
+
def __call__(
|
|
133
|
+
self,
|
|
134
|
+
workflow: fastworkflow.Workflow,
|
|
135
|
+
command: str,
|
|
136
|
+
) -> fastworkflow.CommandOutput:
|
|
137
|
+
# Check if we're in agent mode by looking for chat session run_as_agent flag
|
|
138
|
+
is_agent_mode = False
|
|
139
|
+
with contextlib.suppress(Exception):
|
|
140
|
+
if fastworkflow.chat_session:
|
|
141
|
+
is_agent_mode = fastworkflow.chat_session.run_as_agent
|
|
142
|
+
|
|
143
|
+
app_workflow = workflow.context["app_workflow"]
|
|
144
|
+
response = CommandMetadataAPI.get_command_display_text(
|
|
145
|
+
subject_workflow_path=app_workflow.folderpath,
|
|
146
|
+
cme_workflow_path=workflow.folderpath,
|
|
147
|
+
active_context_name=app_workflow.current_command_context_name,
|
|
148
|
+
for_agents=is_agent_mode,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
return fastworkflow.CommandOutput(
|
|
152
|
+
workflow_id=workflow.id,
|
|
153
|
+
command_responses=[
|
|
154
|
+
fastworkflow.CommandResponse(
|
|
155
|
+
response=response,
|
|
156
|
+
)
|
|
157
|
+
]
|
|
158
|
+
)
|
|
@@ -80,7 +80,7 @@ class CommandNamePrediction:
|
|
|
80
80
|
valid_command_names = (
|
|
81
81
|
set(cme_command_names) |
|
|
82
82
|
set(app_crd.get_command_names(command_context_name))
|
|
83
|
-
)
|
|
83
|
+
)
|
|
84
84
|
|
|
85
85
|
command_name_dict = {
|
|
86
86
|
fully_qualified_command_name.split('/')[-1]: fully_qualified_command_name
|
|
@@ -338,7 +338,11 @@ class ParameterExtraction:
|
|
|
338
338
|
|
|
339
339
|
stored_params = self._get_stored_parameters(self.cme_workflow)
|
|
340
340
|
|
|
341
|
-
|
|
341
|
+
self.command = self.command.replace(self.command_name, "").strip()
|
|
342
|
+
|
|
343
|
+
input_for_param_extraction = InputForParamExtraction.create(
|
|
344
|
+
self.app_workflow, self.command_name,
|
|
345
|
+
self.command)
|
|
342
346
|
|
|
343
347
|
if stored_params:
|
|
344
348
|
_, _, _, stored_missing_fields = self._extract_missing_fields(input_for_param_extraction, self.app_workflow, self.command_name, stored_params)
|
|
@@ -372,7 +376,7 @@ class ParameterExtraction:
|
|
|
372
376
|
if params_str := self._format_parameters_for_display(merged_params):
|
|
373
377
|
error_msg = f"Extracted parameters so far:\n{params_str}\n\n{error_msg}"
|
|
374
378
|
|
|
375
|
-
error_msg += "\nEnter 'abort'
|
|
379
|
+
error_msg += "\nEnter 'abort' to get out of this error state and/or execute a different command."
|
|
376
380
|
error_msg += "\nEnter 'you misunderstood' if the wrong command was executed."
|
|
377
381
|
return self.Output(
|
|
378
382
|
parameters_are_valid=False,
|