fastworkflow 2.17.9__tar.gz → 2.17.10__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 (184) hide show
  1. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/PKG-INFO +1 -1
  2. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/chat_session.py +88 -30
  3. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/run_fastapi_mcp/README.md +58 -40
  4. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/run_fastapi_mcp/__main__.py +197 -114
  5. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/run_fastapi_mcp/conversation_store.py +4 -4
  6. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/run_fastapi_mcp/jwt_manager.py +24 -14
  7. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/run_fastapi_mcp/utils.py +116 -52
  8. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/pyproject.toml +1 -1
  9. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/LICENSE +0 -0
  10. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/README.md +0 -0
  11. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/.DS_Store +0 -0
  12. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/__init__.py +0 -0
  13. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_commands/.gitkeep +0 -0
  14. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/__init__.py +0 -0
  15. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/__init__.py +0 -0
  16. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/abort.py +0 -0
  17. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/you_misunderstood.py +0 -0
  18. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/go_up.py +0 -0
  19. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/reset_context.py +0 -0
  20. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_can_i_do.py +0 -0
  21. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_is_current_context.py +0 -0
  22. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/_commands/__init__.py +0 -0
  23. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/_commands/wildcard.py +0 -0
  24. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/command_context_model.json +0 -0
  25. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/intent_detection.py +0 -0
  26. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/_workflows/command_metadata_extraction/parameter_extraction.py +0 -0
  27. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/__main__.py +0 -0
  28. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/ast_class_extractor.py +0 -0
  29. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/class_analysis_structures.py +0 -0
  30. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/cli_specification.md +0 -0
  31. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/command_dependency_resolver.py +0 -0
  32. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/command_file_generator.py +0 -0
  33. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/command_file_template.py +0 -0
  34. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/command_import_utils.py +0 -0
  35. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/command_stub_generator.py +0 -0
  36. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/context_folder_generator.py +0 -0
  37. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/context_model_generator.py +0 -0
  38. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/dependency_manager.py +0 -0
  39. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/dir_scanner.py +0 -0
  40. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/documentation_generator.py +0 -0
  41. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/genai_postprocessor.py +0 -0
  42. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/inheritance_block_regenerator.py +0 -0
  43. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/libcst_transformers.py +0 -0
  44. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/navigator_stub_generator.py +0 -0
  45. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/pydantic_model_generator.py +0 -0
  46. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/build/utterance_generator.py +0 -0
  47. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/cache_matching.py +0 -0
  48. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/cli.py +0 -0
  49. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/command_context_model.py +0 -0
  50. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/command_directory.py +0 -0
  51. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/command_executor.py +0 -0
  52. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/command_interfaces.py +0 -0
  53. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/command_metadata_api.py +0 -0
  54. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/command_routing.py +0 -0
  55. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/docs/context_modules_prd.txt +0 -0
  56. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/extended_workflow_example/README.md +0 -0
  57. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/extended_workflow_example/_commands/WorkItem/get_status.py +0 -0
  58. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/extended_workflow_example/_commands/generate_report.py +0 -0
  59. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/extended_workflow_example/_commands/startup.py +0 -0
  60. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/extended_workflow_example/simple_workflow_template.json +0 -0
  61. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/extended_workflow_example/workflow_inheritance_model.json +0 -0
  62. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/fastworkflow.env +0 -0
  63. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/fastworkflow.passwords.env +0 -0
  64. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/hello_world/_commands/README.md +0 -0
  65. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/hello_world/_commands/add_two_numbers.py +0 -0
  66. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/hello_world/_commands/context_inheritance_model.json +0 -0
  67. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/hello_world/application/add_two_numbers.py +0 -0
  68. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_1/_commands/context_inheritance_model.json +0 -0
  69. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_1/_commands/send_message.py +0 -0
  70. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_1/application/send_message.py +0 -0
  71. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_2/_commands/User/send_message.py +0 -0
  72. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_2/_commands/context_inheritance_model.json +0 -0
  73. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_2/_commands/startup.py +0 -0
  74. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_2/application/user.py +0 -0
  75. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_3/_commands/PremiumUser/send_priority_message.py +0 -0
  76. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_3/_commands/User/send_message.py +0 -0
  77. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_3/_commands/context_inheritance_model.json +0 -0
  78. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_3/_commands/initialize_user.py +0 -0
  79. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_3/application/user.py +0 -0
  80. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/_ChatRoom.py +0 -0
  81. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/add_user.py +0 -0
  82. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/broadcast_message.py +0 -0
  83. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/get_current_user.py +0 -0
  84. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/list_users.py +0 -0
  85. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/set_current_user.py +0 -0
  86. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/_PremiumUser.py +0 -0
  87. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/send_priority_message.py +0 -0
  88. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/User/_User.py +0 -0
  89. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/User/send_message.py +0 -0
  90. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/context_inheritance_model.json +0 -0
  91. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/_commands/set_root_context.py +0 -0
  92. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/application/chatroom.py +0 -0
  93. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/application/user.py +0 -0
  94. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/context_hierarchy_model.json +0 -0
  95. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/messaging_app_4/startup_action.json +0 -0
  96. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/calculate.py +0 -0
  97. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/cancel_pending_order.py +0 -0
  98. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/exchange_delivered_order_items.py +0 -0
  99. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_email.py +0 -0
  100. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_name_zip.py +0 -0
  101. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/get_order_details.py +0 -0
  102. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/get_product_details.py +0 -0
  103. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/get_user_details.py +0 -0
  104. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/list_all_product_types.py +0 -0
  105. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_address.py +0 -0
  106. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_items.py +0 -0
  107. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_payment.py +0 -0
  108. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/modify_user_address.py +0 -0
  109. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/return_delivered_order_items.py +0 -0
  110. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/_commands/transfer_to_human_agents.py +0 -0
  111. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/context_inheritance_model.json +0 -0
  112. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/retail_data/__init__.py +0 -0
  113. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/retail_data/orders.json +0 -0
  114. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/retail_data/products.json +0 -0
  115. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/retail_data/users.json +0 -0
  116. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/calculate.py +0 -0
  117. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/cancel_pending_order.py +0 -0
  118. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/exchange_delivered_order_items.py +0 -0
  119. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_email.py +0 -0
  120. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_name_zip.py +0 -0
  121. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/get_order_details.py +0 -0
  122. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/get_product_details.py +0 -0
  123. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/get_user_details.py +0 -0
  124. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/list_all_product_types.py +0 -0
  125. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_address.py +0 -0
  126. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_items.py +0 -0
  127. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_payment.py +0 -0
  128. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/modify_user_address.py +0 -0
  129. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/return_delivered_order_items.py +0 -0
  130. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/think.py +0 -0
  131. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/tool.py +0 -0
  132. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/tools/transfer_to_human_agents.py +0 -0
  133. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/retail_workflow/workflow_description.txt +0 -0
  134. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/__init__.py +0 -0
  135. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/_WorkItem.py +0 -0
  136. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/add_child_workitem.py +0 -0
  137. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/get_status.py +0 -0
  138. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/go_to_workitem.py +0 -0
  139. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/mark_as_complete.py +0 -0
  140. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_first_child_workitem.py +0 -0
  141. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_last_child_workitem.py +0 -0
  142. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_next_workitem.py +0 -0
  143. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_previous_workitem.py +0 -0
  144. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_all_child_workitems.py +0 -0
  145. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_child_workitem.py +0 -0
  146. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/show_schema.py +0 -0
  147. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/_commands/startup.py +0 -0
  148. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/application/__init__.py +0 -0
  149. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/application/workitem.py +0 -0
  150. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/simple_workflow_template.json +0 -0
  151. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/examples/simple_workflow_template/startup_action.json +0 -0
  152. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/intent_clarification_agent.py +0 -0
  153. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/mcp_server.py +0 -0
  154. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/model_pipeline_training.py +0 -0
  155. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/refine/__main__.py +0 -0
  156. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/run/__init__.py +0 -0
  157. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/run/__main__.py +0 -0
  158. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/run_fastapi_mcp/__init__.py +0 -0
  159. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/run_fastapi_mcp/mcp_specific.py +0 -0
  160. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/run_fastapi_mcp/redoc_2_standalone_html.py +0 -0
  161. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/train/__init__.py +0 -0
  162. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/train/__main__.py +0 -0
  163. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/train/generate_synthetic.py +0 -0
  164. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/user_message_queues.py +0 -0
  165. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/__init__.py +0 -0
  166. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/chat_adapter.py +0 -0
  167. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/command_dependency_graph.py +0 -0
  168. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/context_utils.py +0 -0
  169. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/dspy_cache_utils.py +0 -0
  170. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/dspy_logger.py +0 -0
  171. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/dspy_utils.py +0 -0
  172. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/env.py +0 -0
  173. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/fuzzy_match.py +0 -0
  174. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/generate_param_examples.py +0 -0
  175. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/logging.py +0 -0
  176. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/parameterize_func_decorator.py +0 -0
  177. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/pydantic_model_2_dspy_signature_class.py +0 -0
  178. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/python_utils.py +0 -0
  179. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/react.py +0 -0
  180. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/signatures.py +0 -0
  181. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/utils/startup_progress.py +0 -0
  182. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/workflow.py +0 -0
  183. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/workflow_agent.py +0 -0
  184. {fastworkflow-2.17.9 → fastworkflow-2.17.10}/fastworkflow/workflow_inheritance_model.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastworkflow
3
- Version: 2.17.9
3
+ Version: 2.17.10
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
@@ -8,6 +8,7 @@ import contextlib
8
8
  import uuid
9
9
  from pathlib import Path
10
10
  import os
11
+ import time
11
12
  from datetime import datetime
12
13
 
13
14
  import dspy
@@ -371,21 +372,23 @@ class ChatSession:
371
372
  try:
372
373
  message = self.user_message_queue.get()
373
374
 
374
- if ((
375
- "NLU_Pipeline_Stage" not in self._cme_workflow.context or
376
- self._cme_workflow.context["NLU_Pipeline_Stage"] == fastworkflow.NLUPipelineStage.INTENT_DETECTION) and
377
- message.startswith('/')
378
- ):
379
- self._cme_workflow.context["is_assistant_mode_command"] = True
380
-
381
- # Route based on mode and message type
382
- if self._run_as_agent and "is_assistant_mode_command" not in self._cme_workflow.context:
383
- # In agent mode, use workflow tool agent for processing
384
- last_output = self._process_agent_message(message)
385
- # elif self._is_mcp_tool_call(message):
386
- # last_output = self._process_mcp_tool_call(message)
375
+ # Handle Action objects directly
376
+ if isinstance(message, fastworkflow.Action):
377
+ last_output = self._process_action(message)
387
378
  else:
388
- last_output = self._process_message(message)
379
+ if ((
380
+ "NLU_Pipeline_Stage" not in self._cme_workflow.context or
381
+ self._cme_workflow.context["NLU_Pipeline_Stage"] == fastworkflow.NLUPipelineStage.INTENT_DETECTION) and
382
+ message.startswith('/')
383
+ ):
384
+ self._cme_workflow.context["is_assistant_mode_command"] = True
385
+
386
+ # Route based on mode and message type
387
+ if self._run_as_agent and "is_assistant_mode_command" not in self._cme_workflow.context:
388
+ # In agent mode, use workflow tool agent for processing
389
+ last_output = self._process_agent_message(message)
390
+ else:
391
+ last_output = self._process_message(message)
389
392
 
390
393
  except Empty:
391
394
  continue
@@ -554,13 +557,22 @@ class ChatSession:
554
557
 
555
558
  def _process_message(self, message: str) -> fastworkflow.CommandOutput:
556
559
  """Process a single message"""
557
- # Use our specialized profiling method
558
- # command_output = self.profile_invoke_command(message)
559
-
560
+ # Pre-execution trace
561
+ if self.command_trace_queue:
562
+ self.command_trace_queue.put(fastworkflow.CommandTraceEvent(
563
+ direction=fastworkflow.CommandTraceEventDirection.AGENT_TO_WORKFLOW,
564
+ raw_command=message,
565
+ command_name=None,
566
+ parameters=None,
567
+ response_text=None,
568
+ success=None,
569
+ timestamp_ms=int(time.time() * 1000),
570
+ ))
571
+
572
+ # Execute command
560
573
  command_output = self._CommandExecutor.invoke_command(self, message)
561
574
 
562
- # Record assistant mode trace to action.jsonl (similar to agent mode in workflow_agent.py)
563
- # This ensures assistant commands are captured even when interspersed with agent commands
575
+ # Extract response text and parameters for traces
564
576
  response_text = ""
565
577
  if command_output.command_responses:
566
578
  response_text = command_output.command_responses[0].response or ""
@@ -568,14 +580,30 @@ class ChatSession:
568
580
  # Convert parameters to dict if it's a Pydantic model or other complex object
569
581
  params = command_output.command_parameters or {}
570
582
  if hasattr(params, 'model_dump'):
571
- params = params.model_dump()
583
+ params_dict = params.model_dump()
572
584
  elif hasattr(params, 'dict'):
573
- params = params.dict()
585
+ params_dict = params.dict()
586
+ else:
587
+ params_dict = params
588
+
589
+ # Post-execution trace
590
+ if self.command_trace_queue:
591
+ self.command_trace_queue.put(fastworkflow.CommandTraceEvent(
592
+ direction=fastworkflow.CommandTraceEventDirection.WORKFLOW_TO_AGENT,
593
+ raw_command=None,
594
+ command_name=command_output.command_name or "",
595
+ parameters=params_dict,
596
+ response_text=response_text,
597
+ success=bool(command_output.success),
598
+ timestamp_ms=int(time.time() * 1000),
599
+ ))
574
600
 
601
+ # Record assistant mode trace to action.jsonl (similar to agent mode in workflow_agent.py)
602
+ # This ensures assistant commands are captured even when interspersed with agent commands
575
603
  record = {
576
604
  "command": message,
577
605
  "command_name": command_output.command_name or "",
578
- "parameters": params,
606
+ "parameters": params_dict,
579
607
  "response": response_text
580
608
  }
581
609
 
@@ -600,24 +628,54 @@ class ChatSession:
600
628
  def _process_action(self, action: fastworkflow.Action) -> fastworkflow.CommandOutput:
601
629
  """Process a startup action"""
602
630
  workflow = self.get_active_workflow()
631
+
632
+ # Serialize action parameters for trace
633
+ params = action.parameters or {}
634
+ if hasattr(params, 'model_dump'):
635
+ params_dict = params.model_dump()
636
+ elif hasattr(params, 'dict'):
637
+ params_dict = params.dict()
638
+ else:
639
+ params_dict = params
640
+
641
+ # Pre-execution trace: serialize action as raw_command
642
+ raw_command = f"{action.command_name} {json.dumps(params_dict)}"
643
+ if self.command_trace_queue:
644
+ self.command_trace_queue.put(fastworkflow.CommandTraceEvent(
645
+ direction=fastworkflow.CommandTraceEventDirection.AGENT_TO_WORKFLOW,
646
+ raw_command=raw_command,
647
+ command_name=None,
648
+ parameters=None,
649
+ response_text=None,
650
+ success=None,
651
+ timestamp_ms=int(time.time() * 1000),
652
+ ))
653
+
654
+ # Execute the action
603
655
  command_output = self._CommandExecutor.perform_action(workflow, action)
604
656
 
605
- # Record action trace to action.jsonl
657
+ # Extract response text for post-execution trace
606
658
  response_text = ""
607
659
  if command_output.command_responses:
608
660
  response_text = command_output.command_responses[0].response or ""
609
661
 
610
- # Convert parameters to dict if it's a Pydantic model or other complex object
611
- params = action.parameters or {}
612
- if hasattr(params, 'model_dump'):
613
- params = params.model_dump()
614
- elif hasattr(params, 'dict'):
615
- params = params.dict()
662
+ # Post-execution trace
663
+ if self.command_trace_queue:
664
+ self.command_trace_queue.put(fastworkflow.CommandTraceEvent(
665
+ direction=fastworkflow.CommandTraceEventDirection.WORKFLOW_TO_AGENT,
666
+ raw_command=None,
667
+ command_name=command_output.command_name,
668
+ parameters=params_dict,
669
+ response_text=response_text,
670
+ success=bool(command_output.success),
671
+ timestamp_ms=int(time.time() * 1000),
672
+ ))
616
673
 
674
+ # Record action trace to action.jsonl
617
675
  record = {
618
676
  "command": "process_action",
619
677
  "command_name": action.command_name,
620
- "parameters": params,
678
+ "parameters": params_dict,
621
679
  "response": response_text
622
680
  }
623
681
 
@@ -5,7 +5,7 @@ HTTP + MCP interface for FastWorkflow workflows with synchronous and streaming e
5
5
  ## Overview
6
6
 
7
7
  This service exposes FastWorkflow workflows as REST endpoints and as MCP tools, enabling clients to:
8
- - Initialize workflow sessions per user
8
+ - Initialize workflow sessions per channel
9
9
  - Submit natural language queries (agent mode)
10
10
  - Execute deterministic commands (assistant mode)
11
11
  - Perform explicit actions
@@ -14,8 +14,8 @@ This service exposes FastWorkflow workflows as REST endpoints and as MCP tools,
14
14
 
15
15
  ## Architecture
16
16
 
17
- - **Session Management**: In-memory `UserSessionManager` with per-user `ChatSession` instances
18
- - **Persistence**: Rdict-backed conversation storage (one DB file per user)
17
+ - **Session Management**: In-memory `ChannelSessionManager` with per-channel `ChatSession` instances
18
+ - **Persistence**: Rdict-backed conversation storage (one DB file per channel)
19
19
  - **Execution**: Synchronous turn-based processing with queue-based communication
20
20
  - **Tracing**: Traces are collected by default and included in synchronous responses or emitted incrementally during streaming
21
21
  - **Streaming (REST)**: `/invoke_agent_stream` supports Streamable HTTP via NDJSON by default and SSE when requested in REST initialize
@@ -50,27 +50,25 @@ Configure in your environment (loaded at process startup via CLI args or env loa
50
50
  | `--expect_encrypted_jwt` | Enable full JWT signature verification (pass flag to require signed tokens) | No | False (no verification by default) |
51
51
 
52
52
  Notes:
53
- - Conversation DBs are stored under `SPEEDDICT_FOLDERNAME/user_conversations` (directory is auto-created).
53
+ - Conversation DBs are stored under `SPEEDDICT_FOLDERNAME/channel_conversations` (directory is auto-created).
54
54
  - `/conversations` now accepts a `limit` query parameter (default `20`).
55
55
  - Shutdown waits up to 30 seconds for active turns (hard-coded).
56
56
 
57
- ## JWT Verification Modes
57
+ ## Auth Modes
58
58
 
59
- ### Default Behavior: No Signature Verification
60
- By default, the service does NOT verify JWT signatures, accepting unsigned tokens for trusted internal networks where JWT is used purely for data transport:
59
+ ### Trusted Mode (default): No Signature Verification
60
+ When `--expect_encrypted_jwt` is NOT set (trusted environments), the service still creates and returns JWT tokens from `/initialize`, but signature verification is disabled. Clients must include `Authorization: Bearer <access_token>` on subsequent requests.
61
61
 
62
62
  ```bash
63
63
  uvicorn services.run_fastapi.main:app --workflow_path /path/to/workflow
64
64
  ```
65
65
 
66
- **Use cases** (no verification):
67
- - Controlled internal networks with network-level security
68
- - Systems where JWT carries non-sensitive routing information
69
- - Trusted environments where data transport is the primary concern
66
+ Notes (trusted mode):
67
+ - `/initialize` returns access/refresh tokens and, if a startup command/action is provided, also returns the startup `CommandOutput`.
68
+ - Subsequent endpoints require `Authorization: Bearer <access_token>`.
69
+ - Traces include `user_id` when available (from JWT `uid` claim).
70
70
 
71
- The service logs a warning on startup when running in this mode.
72
-
73
- ### Secure Mode: Enable Signature Verification
71
+ ### Secure Mode: Signed JWTs with Verification
74
72
  For production deployments requiring full RSA signature verification:
75
73
 
76
74
  ```bash
@@ -78,13 +76,14 @@ uvicorn services.run_fastapi.main:app --workflow_path /path/to/workflow --expect
78
76
  ```
79
77
 
80
78
  **Secure mode** (with `--expect_encrypted_jwt` flag):
81
- - JWT tokens are cryptographically verified using RSA signatures
82
- - Tokens without valid signatures are rejected
79
+ - `/initialize` issues access/refresh tokens. Subsequent endpoints require `Authorization: Bearer <token>`.
80
+ - JWT claims include `sub` (channel_id) and `uid` (user_id when provided).
81
+ - Tokens are verified (signature, expiry, audience/issuer). Invalid or expired tokens are rejected.
83
82
  - Recommended for production deployments in untrusted environments
84
83
 
85
84
  ### Token Access in Workflow Context
86
85
 
87
- JWT tokens are automatically passed to workflows via the `workflow_context` parameter as `http_bearer_token`. This allows workflows to access the bearer token for making authenticated API calls or forwarding authentication.
86
+ In secure mode, JWT tokens are passed to workflows via `workflow_context['http_bearer_token']` to support authenticated upstream calls. In trusted mode, tokens are not created/returned and `http_bearer_token` is absent.
88
87
 
89
88
  **Important notes:**
90
89
  - The token is **only available to authenticated endpoints** (those using `get_session_and_ensure_runtime` dependency)
@@ -100,7 +99,7 @@ JWT tokens are automatically passed to workflows via the `workflow_context` para
100
99
 
101
100
  ```python
102
101
  # In workflow code
103
- workflow_context = self._context # Gets the workflow_context
102
+ workflow_context = self._context
104
103
  bearer_token = workflow_context.get('http_bearer_token')
105
104
 
106
105
  # Use token for API calls
@@ -111,39 +110,49 @@ response = requests.get("https://api.example.com/data", headers=headers)
111
110
  ## API Endpoints (REST)
112
111
 
113
112
  ### `POST /initialize`
114
- Initialize a session for a user. Workflow configuration is loaded at server startup from CLI args/env.
113
+ Initialize a session for a channel. Workflow configuration is loaded at server startup from CLI args/env.
115
114
 
116
115
  **Request:**
117
116
  ```json
118
117
  {
119
- "user_id": "user-123",
120
- "stream_format": "ndjson" // optional: "ndjson" | "sse" (default "ndjson")
118
+ "channel_id": "channel-123",
119
+ "user_id": "user-9",
120
+ "stream_format": "ndjson",
121
+ "startup_command": "load_workflow ...",
122
+ "startup_action": {
123
+ "command_name": "find_orders",
124
+ "parameters": {"channel_id": 42}
125
+ }
121
126
  }
122
127
  ```
123
128
 
124
- **Important Notes:**
129
+ **Rules:**
130
+ - `channel_id` is required.
131
+ - Exactly one of `startup_command` or `startup_action` may be provided (or neither).
132
+ - If startup is provided, `user_id` is required and recorded in the initial trace.
125
133
  - `stream_format` controls REST streaming format for `/invoke_agent_stream` (NDJSON default, SSE optional).
126
- - Workflow configuration is loaded at server startup from CLI args/env, not from the request.
127
134
 
128
135
  **Response:**
129
136
  ```json
130
137
  {
131
- "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
132
- "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
138
+ "access_token": "eyJhbGci...",
139
+ "refresh_token": "eyJhbGci...",
133
140
  "token_type": "bearer",
134
- "expires_in": 3600
141
+ "expires_in": 3600,
142
+ "startup_output": { /* CommandOutput, present only if startup was executed */ }
135
143
  }
136
-
137
144
  ```
138
145
 
139
146
  ### `POST /invoke_agent`
140
147
  Submit a natural language query for agentic processing.
141
148
 
149
+ **Headers:**
150
+ - `Authorization: Bearer <access_token>` (JWT contains `sub` for channel_id and optional `uid` for user_id)
151
+
142
152
  **Request:**
143
153
  ```json
144
154
  {
145
- "user_id": "user-123",
146
- "user_query": "find orders for user 42",
155
+ "user_query": "find orders for channel 42",
147
156
  "timeout_seconds": 60
148
157
  }
149
158
  ```
@@ -153,7 +162,7 @@ Submit a natural language query for agentic processing.
153
162
  {
154
163
  "command_responses": [
155
164
  {
156
- "response": "Found 3 orders for user 42",
165
+ "response": "Found 3 orders for channel 42",
157
166
  "success": true,
158
167
  "artifacts": {},
159
168
  "next_actions": [],
@@ -163,7 +172,7 @@ Submit a natural language query for agentic processing.
163
172
  "workflow_name": "default_workflow",
164
173
  "context": "Order management context",
165
174
  "command_name": "find_orders",
166
- "command_parameters": "user_id=42",
175
+ "command_parameters": "channel_id=42",
167
176
  "traces": [...]
168
177
  }
169
178
  ```
@@ -176,12 +185,15 @@ Same request/response format as `/invoke_agent`.
176
185
  ### `POST /perform_action`
177
186
  Execute a specific workflow action directly (bypasses parameter extraction).
178
187
 
188
+ **Headers:**
189
+ - `Authorization: Bearer <access_token>` (JWT contains `sub` for channel_id and optional `uid` for user_id)
190
+
179
191
  **Request:**
180
192
  ```json
181
193
  {
182
194
  "action": {
183
195
  "command_name": "find_orders",
184
- "parameters": {"user_id": 42}
196
+ "parameters": {"channel_id": 42}
185
197
  },
186
198
  "timeout_seconds": 60
187
199
  }
@@ -195,6 +207,8 @@ Stream trace events and final `CommandOutput` via Streamable HTTP:
195
207
  - NDJSON (default; `Content-Type: application/x-ndjson`)
196
208
  - SSE (when REST `stream_format` is set to `sse`; `Content-Type: text/event-stream`)
197
209
 
210
+ **Headers:** Same as `/invoke_agent`.
211
+
198
212
  ## Conversation Management (REST)
199
213
 
200
214
  ### `POST /new_conversation`
@@ -212,8 +226,8 @@ Persist current conversation and start a new one.
212
226
  }
213
227
  ```
214
228
 
215
- ### `GET /conversations?user_id={user_id}&limit=20`
216
- List conversations for a user (most recent first). `limit` is optional; defaults to `20`.
229
+ ### `GET /conversations?channel_id={channel_id}&limit=20`
230
+ List conversations for a channel (most recent first). `limit` is optional; defaults to `20`.
217
231
 
218
232
  **Response:**
219
233
  ```json
@@ -277,7 +291,7 @@ Export all conversations to JSONL.
277
291
  import requests
278
292
 
279
293
  resp = requests.post("http://localhost:8000/initialize", json={
280
- "user_id": "alice",
294
+ "channel_id": "alice",
281
295
  "stream_format": "ndjson"
282
296
  })
283
297
  print(resp.json()) # {"access_token": "...", "refresh_token": "...", "token_type": "bearer", "expires_in": 3600}
@@ -287,7 +301,7 @@ print(resp.json()) # {"access_token": "...", "refresh_token": "...", "token_typ
287
301
  ```python
288
302
  # First get a token from /initialize
289
303
  init_resp = requests.post("http://localhost:8000/initialize", json={
290
- "user_id": "alice",
304
+ "channel_id": "alice",
291
305
  "stream_format": "ndjson"
292
306
  })
293
307
  token_data = init_resp.json()
@@ -297,7 +311,7 @@ access_token = token_data["access_token"]
297
311
  resp = requests.post("http://localhost:8000/invoke_agent",
298
312
  headers={"Authorization": f"Bearer {access_token}"},
299
313
  json={
300
- "user_query": "list all users",
314
+ "channel_query": "list all channels",
301
315
  "timeout_seconds": 30
302
316
  }
303
317
  )
@@ -308,7 +322,8 @@ print(result.get("traces"))
308
322
 
309
323
  ### MCP Quickstart
310
324
  - Mount is available at `/mcp` (auto-exposed by fastapi_mcp).
311
- - MCP clients use pre-configured long-lived access tokens (generated via `/admin/generate_mcp_token`).
325
+ - In secure mode, MCP clients use pre-configured long-lived access tokens (generated via `/admin/generate_mcp_token`).
326
+ - In trusted mode, clients must send `Authorization: Bearer <token>`; the JWT `sub` claim carries the `channel_id`.
312
327
  - No need for initialize or refresh_token tools in MCP context.
313
328
 
314
329
  MCP invoke agent (streaming):
@@ -319,14 +334,14 @@ curl -N -X POST http://localhost:8000/mcp/invoke_agent \
319
334
  -H 'Content-Type: application/json' \
320
335
  -H 'Accept: application/x-ndjson' \
321
336
  -H 'Authorization: Bearer <your-mcp-token>' \
322
- -d '{"user_query":"find orders for user 42","timeout_seconds":60}'
337
+ -d '{"channel_query":"find orders for channel 42","timeout_seconds":60}'
323
338
 
324
339
  # SSE (if stream_format was set to "sse" during MCP setup)
325
340
  curl -N -X POST http://localhost:8000/mcp/invoke_agent \
326
341
  -H 'Content-Type: application/json' \
327
342
  -H 'Accept: text/event-stream' \
328
343
  -H 'Authorization: Bearer <your-mcp-token>' \
329
- -d '{"user_query":"find orders for user 42","timeout_seconds":60}'
344
+ -d '{"channel_query":"find orders for channel 42","timeout_seconds":60}'
330
345
  ```
331
346
 
332
347
  ### MCP Prompts
@@ -345,6 +360,9 @@ See [`tests/`](../../tests/) for unit and integration tests.
345
360
  - Timeout behavior (504 on no output)
346
361
  - Conversation persistence and listing
347
362
  - Feedback attachment
363
+ - Initialize with startup command/action returns `startup_output` and records conversation
364
+ - Both trusted mode return tokens; secure mode tokens are encrypted
365
+ - Traces include `user_id` and `raw_command`
348
366
 
349
367
  ## Future Enhancements
350
368