fastworkflow 2.15.3__tar.gz → 2.15.5__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.
Files changed (174) hide show
  1. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/PKG-INFO +1 -1
  2. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/__init__.py +16 -0
  3. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/command_metadata_extraction/_commands/wildcard.py +1 -0
  4. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/chat_session.py +62 -16
  5. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/command_executor.py +1 -21
  6. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/get_user_details.py +1 -0
  7. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/run/__main__.py +23 -0
  8. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/workflow_agent.py +66 -9
  9. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/pyproject.toml +1 -1
  10. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/LICENSE +0 -0
  11. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/README.md +0 -0
  12. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/.DS_Store +0 -0
  13. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_commands/.gitkeep +0 -0
  14. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/__init__.py +0 -0
  15. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/command_metadata_extraction/__init__.py +0 -0
  16. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/abort.py +0 -0
  17. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/you_misunderstood.py +0 -0
  18. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/go_up.py +0 -0
  19. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/reset_context.py +0 -0
  20. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_can_i_do.py +0 -0
  21. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_is_current_context.py +0 -0
  22. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/command_metadata_extraction/_commands/__init__.py +0 -0
  23. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/_workflows/command_metadata_extraction/command_context_model.json +0 -0
  24. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/__main__.py +0 -0
  25. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/ast_class_extractor.py +0 -0
  26. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/class_analysis_structures.py +0 -0
  27. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/cli_specification.md +0 -0
  28. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/command_dependency_resolver.py +0 -0
  29. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/command_file_generator.py +0 -0
  30. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/command_file_template.py +0 -0
  31. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/command_import_utils.py +0 -0
  32. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/command_stub_generator.py +0 -0
  33. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/context_folder_generator.py +0 -0
  34. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/context_model_generator.py +0 -0
  35. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/dependency_manager.py +0 -0
  36. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/dir_scanner.py +0 -0
  37. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/documentation_generator.py +0 -0
  38. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/genai_postprocessor.py +0 -0
  39. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/inheritance_block_regenerator.py +0 -0
  40. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/libcst_transformers.py +0 -0
  41. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/navigator_stub_generator.py +0 -0
  42. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/pydantic_model_generator.py +0 -0
  43. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/build/utterance_generator.py +0 -0
  44. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/cache_matching.py +0 -0
  45. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/cli.py +0 -0
  46. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/command_context_model.py +0 -0
  47. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/command_directory.py +0 -0
  48. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/command_interfaces.py +0 -0
  49. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/command_metadata_api.py +0 -0
  50. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/command_routing.py +0 -0
  51. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/docs/context_modules_prd.txt +0 -0
  52. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/extended_workflow_example/README.md +0 -0
  53. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/extended_workflow_example/_commands/WorkItem/get_status.py +0 -0
  54. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/extended_workflow_example/_commands/generate_report.py +0 -0
  55. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/extended_workflow_example/_commands/startup.py +0 -0
  56. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/extended_workflow_example/simple_workflow_template.json +0 -0
  57. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/extended_workflow_example/workflow_inheritance_model.json +0 -0
  58. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/fastworkflow.env +0 -0
  59. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/fastworkflow.passwords.env +0 -0
  60. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/hello_world/_commands/README.md +0 -0
  61. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/hello_world/_commands/add_two_numbers.py +0 -0
  62. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/hello_world/_commands/context_inheritance_model.json +0 -0
  63. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/hello_world/application/add_two_numbers.py +0 -0
  64. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_1/_commands/context_inheritance_model.json +0 -0
  65. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_1/_commands/send_message.py +0 -0
  66. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_1/application/send_message.py +0 -0
  67. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_2/_commands/User/send_message.py +0 -0
  68. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_2/_commands/context_inheritance_model.json +0 -0
  69. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_2/_commands/startup.py +0 -0
  70. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_2/application/user.py +0 -0
  71. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_3/_commands/PremiumUser/send_priority_message.py +0 -0
  72. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_3/_commands/User/send_message.py +0 -0
  73. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_3/_commands/context_inheritance_model.json +0 -0
  74. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_3/_commands/initialize_user.py +0 -0
  75. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_3/application/user.py +0 -0
  76. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/_ChatRoom.py +0 -0
  77. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/add_user.py +0 -0
  78. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/broadcast_message.py +0 -0
  79. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/get_current_user.py +0 -0
  80. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/list_users.py +0 -0
  81. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/set_current_user.py +0 -0
  82. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/_PremiumUser.py +0 -0
  83. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/send_priority_message.py +0 -0
  84. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/User/_User.py +0 -0
  85. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/User/send_message.py +0 -0
  86. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/context_inheritance_model.json +0 -0
  87. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/_commands/set_root_context.py +0 -0
  88. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/application/chatroom.py +0 -0
  89. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/application/user.py +0 -0
  90. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/context_hierarchy_model.json +0 -0
  91. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/messaging_app_4/startup_action.json +0 -0
  92. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/calculate.py +0 -0
  93. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/cancel_pending_order.py +0 -0
  94. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/exchange_delivered_order_items.py +0 -0
  95. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_email.py +0 -0
  96. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_name_zip.py +0 -0
  97. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/get_order_details.py +0 -0
  98. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/get_product_details.py +0 -0
  99. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/list_all_product_types.py +0 -0
  100. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_address.py +0 -0
  101. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_items.py +0 -0
  102. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_payment.py +0 -0
  103. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/modify_user_address.py +0 -0
  104. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/return_delivered_order_items.py +0 -0
  105. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/_commands/transfer_to_human_agents.py +0 -0
  106. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/context_inheritance_model.json +0 -0
  107. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/retail_data/__init__.py +0 -0
  108. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/retail_data/orders.json +0 -0
  109. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/retail_data/products.json +0 -0
  110. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/retail_data/users.json +0 -0
  111. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/calculate.py +0 -0
  112. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/cancel_pending_order.py +0 -0
  113. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/exchange_delivered_order_items.py +0 -0
  114. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_email.py +0 -0
  115. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_name_zip.py +0 -0
  116. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/get_order_details.py +0 -0
  117. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/get_product_details.py +0 -0
  118. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/get_user_details.py +0 -0
  119. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/list_all_product_types.py +0 -0
  120. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_address.py +0 -0
  121. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_items.py +0 -0
  122. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_payment.py +0 -0
  123. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/modify_user_address.py +0 -0
  124. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/return_delivered_order_items.py +0 -0
  125. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/think.py +0 -0
  126. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/tool.py +0 -0
  127. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/tools/transfer_to_human_agents.py +0 -0
  128. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/retail_workflow/workflow_description.txt +0 -0
  129. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/__init__.py +0 -0
  130. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/_WorkItem.py +0 -0
  131. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/add_child_workitem.py +0 -0
  132. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/get_status.py +0 -0
  133. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/go_to_workitem.py +0 -0
  134. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/mark_as_complete.py +0 -0
  135. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_first_child_workitem.py +0 -0
  136. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_last_child_workitem.py +0 -0
  137. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_next_workitem.py +0 -0
  138. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_previous_workitem.py +0 -0
  139. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_all_child_workitems.py +0 -0
  140. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_child_workitem.py +0 -0
  141. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/show_schema.py +0 -0
  142. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/_commands/startup.py +0 -0
  143. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/application/__init__.py +0 -0
  144. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/application/workitem.py +0 -0
  145. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/simple_workflow_template.json +0 -0
  146. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/examples/simple_workflow_template/startup_action.json +0 -0
  147. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/mcp_server.py +0 -0
  148. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/model_pipeline_training.py +0 -0
  149. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/refine/__main__.py +0 -0
  150. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/run/__init__.py +0 -0
  151. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/run_agent/__init__.py +0 -0
  152. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/run_agent/__main__.py +0 -0
  153. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/run_agent/agent_module.py +0 -0
  154. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/train/__init__.py +0 -0
  155. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/train/__main__.py +0 -0
  156. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/train/generate_synthetic.py +0 -0
  157. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/user_message_queues.py +0 -0
  158. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/__init__.py +0 -0
  159. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/command_dependency_graph.py +0 -0
  160. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/context_utils.py +0 -0
  161. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/dspy_cache_utils.py +0 -0
  162. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/dspy_logger.py +0 -0
  163. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/dspy_utils.py +0 -0
  164. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/env.py +0 -0
  165. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/fuzzy_match.py +0 -0
  166. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/generate_param_examples.py +0 -0
  167. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/logging.py +0 -0
  168. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/parameterize_func_decorator.py +0 -0
  169. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/pydantic_model_2_dspy_signature_class.py +0 -0
  170. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/python_utils.py +0 -0
  171. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/signatures.py +0 -0
  172. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/utils/startup_progress.py +0 -0
  173. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/workflow.py +0 -0
  174. {fastworkflow-2.15.3 → fastworkflow-2.15.5}/fastworkflow/workflow_inheritance_model.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastworkflow
3
- Version: 2.15.3
3
+ Version: 2.15.5
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
@@ -1,6 +1,8 @@
1
1
  import contextlib
2
+ from dataclasses import dataclass
2
3
  from enum import Enum
3
4
  import os
5
+ import time
4
6
  from typing import Any, Optional, Union
5
7
 
6
8
  from pydantic import BaseModel
@@ -47,6 +49,20 @@ class MCPToolResult(BaseModel):
47
49
  content: list[MCPContent]
48
50
  isError: bool = False
49
51
 
52
+ class CommandTraceEventDirection(str, Enum):
53
+ AGENT_TO_WORKFLOW = "agent_to_workflow"
54
+ WORKFLOW_TO_AGENT = "workflow_to_agent"
55
+
56
+ @dataclass
57
+ class CommandTraceEvent:
58
+ direction: CommandTraceEventDirection
59
+ raw_command: str | None # for AGENT_TO_WORKFLOW
60
+ command_name: str | None # for WORKFLOW_TO_AGENT
61
+ parameters: dict | str | None
62
+ response_text: str | None
63
+ success: bool | None
64
+ timestamp_ms: int
65
+
50
66
  class CommandOutput(BaseModel):
51
67
  command_responses: list[CommandResponse]
52
68
  workflow_name: str = ""
@@ -602,6 +602,7 @@ class ResponseGenerator:
602
602
  if cnp_output.error_msg:
603
603
  workflow_context = workflow.context
604
604
  workflow_context["NLU_Pipeline_Stage"] = NLUPipelineStage.INTENT_AMBIGUITY_CLARIFICATION
605
+ workflow_context["command"] = command
605
606
  workflow.context = workflow_context
606
607
  return CommandOutput(
607
608
  command_responses=[
@@ -119,6 +119,7 @@ class ChatSession:
119
119
  # Create queues for user messages and command outputs
120
120
  self._user_message_queue = Queue()
121
121
  self._command_output_queue = Queue()
122
+ self._command_trace_queue = Queue()
122
123
  self._status = SessionStatus.STOPPED
123
124
  self._chat_worker = None
124
125
 
@@ -290,6 +291,10 @@ class ChatSession:
290
291
  def command_output_queue(self) -> Queue:
291
292
  return self._command_output_queue
292
293
 
294
+ @property
295
+ def command_trace_queue(self) -> Queue:
296
+ return self._command_trace_queue
297
+
293
298
  @property
294
299
  def workflow_is_complete(self) -> bool:
295
300
  workflow = ChatSession.get_active_workflow()
@@ -424,14 +429,25 @@ class ChatSession:
424
429
  if os.path.exists("action.json"):
425
430
  os.remove("action.json")
426
431
 
427
- refined_message = f'messsage\n{self._think_and_plan(message)}'
432
+ refined_message = f'messsage\n{self._think_and_plan(message, self.conversation_history)}'
428
433
 
429
434
  lm = dspy_utils.get_lm("LLM_AGENT", "LITELLM_API_KEY_AGENT")
430
- with dspy.context(lm=lm):
431
- agent_result = self._workflow_tool_agent(
432
- user_query=refined_message,
433
- conversation_history=self.conversation_history
434
- )
435
+ from dspy.utils.exceptions import AdapterParseError
436
+ # Retry logic for AdapterParseError
437
+ max_retries = 2
438
+ for attempt in range(max_retries):
439
+ try:
440
+ with dspy.context(lm=lm, adapter=dspy.ChatAdapter()):
441
+ agent_result = self._workflow_tool_agent(
442
+ user_query=refined_message,
443
+ conversation_history=self.conversation_history
444
+ )
445
+ break # Success, exit retry loop
446
+ except AdapterParseError as _:
447
+ if attempt == max_retries - 1: # Last attempt
448
+ raise # Re-raise the exception if all retries failed
449
+ # Continue to next attempt
450
+
435
451
  # dspy.inspect_history(n=1)
436
452
 
437
453
  # Extract the final result from the agent
@@ -441,18 +457,21 @@ class ChatSession:
441
457
  else str(agent_result)
442
458
  )
443
459
 
444
- self.conversation_history.messages.append(
445
- {"user_query": message,
446
- "agent_response": result_text}
447
- )
448
-
449
460
  # Create CommandOutput with the agent's response
450
461
  command_response = fastworkflow.CommandResponse(response=result_text)
462
+
463
+ user_instructions_summary = message
451
464
  # Attach actions captured during agent execution as artifacts if available
452
465
  if os.path.exists("action.json"):
453
466
  with open("action.json", "r", encoding="utf-8") as f:
454
467
  actions = [json.loads(line) for line in f if line.strip()]
455
- command_response.artifacts["extracted_actions"] = actions
468
+ user_instructions_summary = self._extract_user_instructions(message, actions)
469
+ command_response.artifacts["user_instructions_summary"] = user_instructions_summary
470
+
471
+ self.conversation_history.messages.append(
472
+ {"user_instructions": user_instructions_summary,
473
+ "agent_response": result_text}
474
+ )
456
475
 
457
476
  command_output = fastworkflow.CommandOutput(
458
477
  command_responses=[command_response]
@@ -588,16 +607,17 @@ class ChatSession:
588
607
 
589
608
  return command_output
590
609
 
591
- def _think_and_plan(self, user_query: str) -> str:
610
+ def _think_and_plan(self, user_query: str, conversation_history: dspy.History) -> str:
592
611
  """
593
- Returns a refined plan by breaking down a user_query into simpler tasks based only on available commands and returns a todo list.
612
+ Returns a refined plan by breaking down a user_query into simpler tasks.
594
613
  """
595
614
  class TaskPlannerSignature(dspy.Signature):
596
615
  """
597
- Break down a user_query into simpler tasks based only on available commands and return a todo list.
616
+ Break down a user_query into simpler tasks based only on available commands and conversation_history.
598
617
  If user_query is simple, return a single todo that is the user_query as-is
599
618
  """
600
619
  user_query: str = dspy.InputField()
620
+ conversation_history: dspy.History = dspy.InputField()
601
621
  available_commands: list[str] = dspy.InputField()
602
622
  todo_list: list[str] = dspy.OutputField(desc="task descriptions as short sentences")
603
623
 
@@ -611,10 +631,36 @@ class ChatSession:
611
631
  planner_lm = dspy_utils.get_lm("LLM_PLANNER", "LITELLM_API_KEY_PLANNER")
612
632
  with dspy.context(lm=planner_lm):
613
633
  task_planner_func = dspy.ChainOfThought(TaskPlannerSignature)
614
- prediction = task_planner_func(user_query=user_query, available_commands=available_commands)
634
+ prediction = task_planner_func(
635
+ user_query=user_query,
636
+ conversation_history=conversation_history,
637
+ available_commands=available_commands)
615
638
 
616
639
  if not prediction.todo_list or (len(prediction.todo_list) == 1 and prediction.todo_list[0] == user_query):
617
640
  return user_query
618
641
 
619
642
  steps_list = '\n'.join([f'{i + 1}. {task}' for i, task in enumerate(prediction.todo_list)])
620
643
  return f"{user_query}\nNext steps:\n{steps_list}"
644
+
645
+
646
+ def _extract_user_instructions(self,
647
+ user_query: str, workflow_actions: list[dict[str, str]]) -> str:
648
+ """
649
+ Summarizes user instructions based on original user query and subsequent user feedback in workflow actions.
650
+ """
651
+ class UserInstructionCompilerSignature(dspy.Signature):
652
+ """
653
+ Concise summary of user instructions based on their commands to the workflow.
654
+ Include parameter values passed in commands in the summary.
655
+ """
656
+ commands_list: list[str] = dspy.InputField()
657
+ user_instructions_summary: str = dspy.OutputField(desc="A single paragraph summary")
658
+
659
+ commands_list: list[str] = [user_query]
660
+ commands_list.extend([wf_action['command'] for wf_action in workflow_actions if 'command' in wf_action])
661
+
662
+ planner_lm = dspy_utils.get_lm("LLM_PLANNER", "LITELLM_API_KEY_PLANNER")
663
+ with dspy.context(lm=planner_lm):
664
+ uic_func = dspy.ChainOfThought(UserInstructionCompilerSignature)
665
+ prediction = uic_func(commands_list=commands_list)
666
+ return prediction.user_instructions_summary
@@ -45,18 +45,7 @@ class CommandExecutor(CommandExecutorInterface):
45
45
  command = command)
46
46
  )
47
47
 
48
- import json
49
-
50
48
  if command_output.command_handled or not command_output.success:
51
- # Append executed action to action.json for external consumers
52
- record = {
53
- "command" if command_output.success else "failing command": command,
54
- "command_name": command_output.command_name,
55
- "parameters": command_output.command_parameters.model_dump() if command_output.command_parameters else None,
56
- "response": command_output.command_responses[0].response if command_output.success else ''}
57
- with open("action.json", "a", encoding="utf-8") as f:
58
- f.write(json.dumps(record, ensure_ascii=False) + "\n")
59
-
60
49
  return command_output
61
50
 
62
51
  command_name = command_output.command_responses[0].artifacts["command_name"]
@@ -93,16 +82,7 @@ class CommandExecutor(CommandExecutorInterface):
93
82
  command_output.workflow_name = workflow_name
94
83
  command_output.context = context
95
84
  command_output.command_name = command_name
96
- command_output.command_parameters = str(input_obj) if input_obj else ''
97
-
98
- # Append executed action to action.json for external consumers
99
- record = {
100
- "command": command,
101
- "command_name": command_name,
102
- "parameters": input_obj.model_dump() if input_obj else None,
103
- "response": command_output.command_responses[0].response}
104
- with open("action.json", "a", encoding="utf-8") as f:
105
- f.write(json.dumps(record, ensure_ascii=False) + "\n")
85
+ command_output.command_parameters = input_obj or None
106
86
 
107
87
  return command_output
108
88
 
@@ -50,6 +50,7 @@ class Signature:
50
50
  "What details do you have on my user account?",
51
51
  "Can you show me everything tied to my profile?",
52
52
  "I'd like to review my account and recent activity.",
53
+ "retrieve user details"
53
54
  ]
54
55
  template_utterances: List[str] = []
55
56
 
@@ -219,6 +219,29 @@ def run_main(args):
219
219
  with console.status("[bold cyan]Processing command...[/bold cyan]", spinner="dots") as status:
220
220
  counter = 0
221
221
  while wait_thread.is_alive():
222
+ # Check for agent traces if in agent mode
223
+ if args.run_as_agent:
224
+ while True:
225
+ try:
226
+ evt = fastworkflow.chat_session.command_trace_queue.get_nowait()
227
+ except queue.Empty:
228
+ break
229
+
230
+ # Choose styles based on success
231
+ info_style = "dim orange3" if (evt.success is False) else "dim yellow"
232
+ resp_style = "dim orange3" if (evt.success is False) else "dim green"
233
+
234
+ if evt.direction == fastworkflow.CommandTraceEventDirection.AGENT_TO_WORKFLOW:
235
+ console.print(Text("Agent -> Workflow: ", style=info_style), end="")
236
+ console.print(Text(str(evt.raw_command or ""), style=info_style))
237
+ else:
238
+ # command info (dim yellow or dim orange3)
239
+ info = f"{evt.command_name or ''}, {evt.parameters}: "
240
+ console.print(Text("Workflow -> Agent: ", style=info_style), end="")
241
+ console.print(Text(info, style=info_style), end="")
242
+ # response (dim green or dim orange3)
243
+ console.print(Text(str(evt.response_text or ""), style=resp_style))
244
+
222
245
  time.sleep(0.5)
223
246
  counter += 1
224
247
  if counter % 2 == 0: # Update message every second
@@ -3,6 +3,8 @@ Agent integration module for fastWorkflow.
3
3
  Provides workflow tool agent functionality for intelligent tool selection.
4
4
  """
5
5
 
6
+ import json
7
+ import time
6
8
  import dspy
7
9
 
8
10
  import fastworkflow
@@ -14,7 +16,7 @@ from fastworkflow.mcp_server import FastWorkflowMCPServer
14
16
 
15
17
  class WorkflowAgentSignature(dspy.Signature):
16
18
  """
17
- Carefully review the user request and execute the todo list using available tools for building the final answer.
19
+ Carefully review the user request and conversation_history, then execute the todo list using available tools for building the final answer.
18
20
  All the tasks in the todo list must be completed before returning the final answer.
19
21
  """
20
22
  user_query = dspy.InputField(desc="The natural language user query.")
@@ -78,18 +80,67 @@ def _execute_workflow_query(command: str, chat_session_obj: fastworkflow.ChatSes
78
80
  Commands must be formatted using plain text for command name followed by XML tags enclosing parameter values (if any) as follows: command_name <param1_name>param1_value</param1_name> <param2_name>param2_value</param2_name> ...
79
81
  Don't use this tool to respond to a clarification requests in PARAMETER EXTRACTION ERROR state
80
82
  """
83
+ # Emit trace event before execution
84
+ chat_session_obj.command_trace_queue.put(fastworkflow.CommandTraceEvent(
85
+ direction=fastworkflow.CommandTraceEventDirection.AGENT_TO_WORKFLOW,
86
+ raw_command=command,
87
+ command_name=None,
88
+ parameters=None,
89
+ response_text=None,
90
+ success=None,
91
+ timestamp_ms=int(time.time() * 1000),
92
+ ))
93
+
81
94
  # Directly invoke the command without going through queues
82
95
  # This allows the agent to synchronously call workflow tools
83
96
  from fastworkflow.command_executor import CommandExecutor
84
97
  command_output = CommandExecutor.invoke_command(chat_session_obj, command)
85
98
 
99
+ # Emit trace event after execution
100
+ # Extract command name and parameters from command_output
101
+ name = command_output.command_name
102
+ params = command_output.command_parameters
103
+
104
+ # Handle parameter serialization
105
+ params_dict = params.model_dump() if params else None
106
+
107
+ # Extract response text
108
+ resp_text = ""
109
+ if command_output.command_responses:
110
+ response_parts = [
111
+ cmd_response.response
112
+ for cmd_response in command_output.command_responses
113
+ if cmd_response.response
114
+ ]
115
+ resp_text = "\n".join(response_parts)
116
+
117
+ chat_session_obj.command_trace_queue.put(fastworkflow.CommandTraceEvent(
118
+ direction=fastworkflow.CommandTraceEventDirection.WORKFLOW_TO_AGENT,
119
+ raw_command=None,
120
+ command_name=name,
121
+ parameters=params_dict,
122
+ response_text=resp_text or "",
123
+ success=bool(command_output.success),
124
+ timestamp_ms=int(time.time() * 1000),
125
+ ))
126
+
127
+ # Append executed action to action.json for external consumers (agent mode only)
128
+ record = {
129
+ "command" if command_output.success else "failing command": command,
130
+ "command_name": name,
131
+ "parameters": params_dict,
132
+ "response": resp_text if command_output.success else ""
133
+ }
134
+ with open("action.json", "a", encoding="utf-8") as f:
135
+ f.write(json.dumps(record, ensure_ascii=False) + "\n")
136
+
86
137
  # Format output - extract text from command response
87
- if hasattr(command_output, 'command_responses') and command_output.command_responses:
138
+ if command_output.command_responses:
88
139
  response_parts = []
89
140
  response_parts.extend(
90
141
  cmd_response.response
91
142
  for cmd_response in command_output.command_responses
92
- if hasattr(cmd_response, 'response') and cmd_response.response
143
+ if cmd_response.response
93
144
  )
94
145
  return "\n".join(response_parts) if response_parts else "Command executed successfully."
95
146
 
@@ -185,12 +236,18 @@ def initialize_workflow_tool_agent(mcp_server: FastWorkflowMCPServer, max_iters:
185
236
  Commands must be formatted using plain text for command name followed by XML tags enclosing parameter values (if any) as follows: command_name <param1_name>param1_value</param1_name> <param2_name>param2_value</param2_name> ...
186
237
  Don't use this tool to respond to a clarification requests in PARAMETER EXTRACTION ERROR state
187
238
  """
188
- try:
189
- return _execute_workflow_query(command, chat_session_obj=chat_session_obj)
190
- except Exception as e:
191
- message = f"Terminate immediately! Exception processing {command}: {str(e)}"
192
- logger.critical(message)
193
- return message
239
+ # Retry logic for workflow execution
240
+ max_retries = 2
241
+ for attempt in range(max_retries):
242
+ try:
243
+ return _execute_workflow_query(command, chat_session_obj=chat_session_obj)
244
+ except Exception as e:
245
+ if attempt == max_retries - 1: # Last attempt
246
+ message = f"Terminate immediately! Exception processing {command}: {str(e)}"
247
+ logger.critical(message)
248
+ return message
249
+ # Continue to next attempt
250
+ logger.warning(f"Attempt {attempt + 1} failed for command '{command}': {str(e)}")
194
251
 
195
252
  def missing_information_guidance(how_to_find_request: str) -> str:
196
253
  """
@@ -9,7 +9,7 @@ repository = "https://github.com/radiantlogicinc/fastworkflow"
9
9
 
10
10
  [tool.poetry]
11
11
  name = "fastworkflow"
12
- version = "2.15.3"
12
+ version = "2.15.5"
13
13
  description = "A framework for rapidly building large-scale, deterministic, interactive workflows with a fault-tolerant, conversational UX"
14
14
  authors = ["Dhar Rawal <drawal@radiantlogic.com>"]
15
15
  license = "Apache-2.0"
File without changes
File without changes