fastworkflow 2.17.5__tar.gz → 2.17.6__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.

Potentially problematic release.


This version of fastworkflow might be problematic. Click here for more details.

Files changed (183) hide show
  1. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/PKG-INFO +1 -1
  2. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/chat_session.py +15 -2
  3. fastworkflow-2.17.6/fastworkflow/utils/chat_adapter.py +99 -0
  4. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/react.py +7 -3
  5. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/pyproject.toml +1 -1
  6. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/LICENSE +0 -0
  7. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/README.md +0 -0
  8. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/.DS_Store +0 -0
  9. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/__init__.py +0 -0
  10. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_commands/.gitkeep +0 -0
  11. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/__init__.py +0 -0
  12. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/__init__.py +0 -0
  13. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/abort.py +0 -0
  14. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/you_misunderstood.py +0 -0
  15. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/go_up.py +0 -0
  16. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/reset_context.py +0 -0
  17. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_can_i_do.py +0 -0
  18. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_is_current_context.py +0 -0
  19. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/_commands/__init__.py +0 -0
  20. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/_commands/wildcard.py +0 -0
  21. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/command_context_model.json +0 -0
  22. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/intent_detection.py +0 -0
  23. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/_workflows/command_metadata_extraction/parameter_extraction.py +0 -0
  24. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/__main__.py +0 -0
  25. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/ast_class_extractor.py +0 -0
  26. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/class_analysis_structures.py +0 -0
  27. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/cli_specification.md +0 -0
  28. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/command_dependency_resolver.py +0 -0
  29. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/command_file_generator.py +0 -0
  30. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/command_file_template.py +0 -0
  31. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/command_import_utils.py +0 -0
  32. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/command_stub_generator.py +0 -0
  33. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/context_folder_generator.py +0 -0
  34. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/context_model_generator.py +0 -0
  35. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/dependency_manager.py +0 -0
  36. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/dir_scanner.py +0 -0
  37. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/documentation_generator.py +0 -0
  38. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/genai_postprocessor.py +0 -0
  39. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/inheritance_block_regenerator.py +0 -0
  40. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/libcst_transformers.py +0 -0
  41. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/navigator_stub_generator.py +0 -0
  42. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/pydantic_model_generator.py +0 -0
  43. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/build/utterance_generator.py +0 -0
  44. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/cache_matching.py +0 -0
  45. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/cli.py +0 -0
  46. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/command_context_model.py +0 -0
  47. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/command_directory.py +0 -0
  48. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/command_executor.py +0 -0
  49. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/command_interfaces.py +0 -0
  50. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/command_metadata_api.py +0 -0
  51. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/command_routing.py +0 -0
  52. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/docs/context_modules_prd.txt +0 -0
  53. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/extended_workflow_example/README.md +0 -0
  54. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/extended_workflow_example/_commands/WorkItem/get_status.py +0 -0
  55. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/extended_workflow_example/_commands/generate_report.py +0 -0
  56. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/extended_workflow_example/_commands/startup.py +0 -0
  57. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/extended_workflow_example/simple_workflow_template.json +0 -0
  58. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/extended_workflow_example/workflow_inheritance_model.json +0 -0
  59. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/fastworkflow.env +0 -0
  60. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/fastworkflow.passwords.env +0 -0
  61. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/hello_world/_commands/README.md +0 -0
  62. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/hello_world/_commands/add_two_numbers.py +0 -0
  63. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/hello_world/_commands/context_inheritance_model.json +0 -0
  64. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/hello_world/application/add_two_numbers.py +0 -0
  65. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_1/_commands/context_inheritance_model.json +0 -0
  66. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_1/_commands/send_message.py +0 -0
  67. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_1/application/send_message.py +0 -0
  68. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_2/_commands/User/send_message.py +0 -0
  69. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_2/_commands/context_inheritance_model.json +0 -0
  70. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_2/_commands/startup.py +0 -0
  71. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_2/application/user.py +0 -0
  72. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_3/_commands/PremiumUser/send_priority_message.py +0 -0
  73. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_3/_commands/User/send_message.py +0 -0
  74. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_3/_commands/context_inheritance_model.json +0 -0
  75. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_3/_commands/initialize_user.py +0 -0
  76. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_3/application/user.py +0 -0
  77. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/_ChatRoom.py +0 -0
  78. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/add_user.py +0 -0
  79. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/broadcast_message.py +0 -0
  80. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/get_current_user.py +0 -0
  81. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/list_users.py +0 -0
  82. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/set_current_user.py +0 -0
  83. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/_PremiumUser.py +0 -0
  84. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/send_priority_message.py +0 -0
  85. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/User/_User.py +0 -0
  86. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/User/send_message.py +0 -0
  87. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/context_inheritance_model.json +0 -0
  88. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/_commands/set_root_context.py +0 -0
  89. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/application/chatroom.py +0 -0
  90. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/application/user.py +0 -0
  91. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/context_hierarchy_model.json +0 -0
  92. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/messaging_app_4/startup_action.json +0 -0
  93. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/calculate.py +0 -0
  94. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/cancel_pending_order.py +0 -0
  95. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/exchange_delivered_order_items.py +0 -0
  96. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_email.py +0 -0
  97. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_name_zip.py +0 -0
  98. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/get_order_details.py +0 -0
  99. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/get_product_details.py +0 -0
  100. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/get_user_details.py +0 -0
  101. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/list_all_product_types.py +0 -0
  102. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_address.py +0 -0
  103. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_items.py +0 -0
  104. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_payment.py +0 -0
  105. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/modify_user_address.py +0 -0
  106. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/return_delivered_order_items.py +0 -0
  107. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/_commands/transfer_to_human_agents.py +0 -0
  108. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/context_inheritance_model.json +0 -0
  109. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/retail_data/__init__.py +0 -0
  110. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/retail_data/orders.json +0 -0
  111. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/retail_data/products.json +0 -0
  112. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/retail_data/users.json +0 -0
  113. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/calculate.py +0 -0
  114. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/cancel_pending_order.py +0 -0
  115. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/exchange_delivered_order_items.py +0 -0
  116. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_email.py +0 -0
  117. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_name_zip.py +0 -0
  118. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/get_order_details.py +0 -0
  119. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/get_product_details.py +0 -0
  120. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/get_user_details.py +0 -0
  121. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/list_all_product_types.py +0 -0
  122. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_address.py +0 -0
  123. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_items.py +0 -0
  124. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_payment.py +0 -0
  125. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/modify_user_address.py +0 -0
  126. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/return_delivered_order_items.py +0 -0
  127. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/think.py +0 -0
  128. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/tool.py +0 -0
  129. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/tools/transfer_to_human_agents.py +0 -0
  130. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/retail_workflow/workflow_description.txt +0 -0
  131. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/__init__.py +0 -0
  132. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/_WorkItem.py +0 -0
  133. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/add_child_workitem.py +0 -0
  134. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/get_status.py +0 -0
  135. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/go_to_workitem.py +0 -0
  136. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/mark_as_complete.py +0 -0
  137. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_first_child_workitem.py +0 -0
  138. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_last_child_workitem.py +0 -0
  139. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_next_workitem.py +0 -0
  140. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_previous_workitem.py +0 -0
  141. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_all_child_workitems.py +0 -0
  142. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_child_workitem.py +0 -0
  143. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/show_schema.py +0 -0
  144. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/_commands/startup.py +0 -0
  145. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/application/__init__.py +0 -0
  146. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/application/workitem.py +0 -0
  147. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/simple_workflow_template.json +0 -0
  148. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/examples/simple_workflow_template/startup_action.json +0 -0
  149. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/mcp_server.py +0 -0
  150. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/model_pipeline_training.py +0 -0
  151. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/refine/__main__.py +0 -0
  152. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/run/__init__.py +0 -0
  153. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/run/__main__.py +0 -0
  154. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/run_fastapi_mcp/README.md +0 -0
  155. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/run_fastapi_mcp/__init__.py +0 -0
  156. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/run_fastapi_mcp/__main__.py +0 -0
  157. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/run_fastapi_mcp/conversation_store.py +0 -0
  158. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/run_fastapi_mcp/jwt_manager.py +0 -0
  159. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/run_fastapi_mcp/mcp_specific.py +0 -0
  160. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/run_fastapi_mcp/redoc_2_standalone_html.py +0 -0
  161. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/run_fastapi_mcp/utils.py +0 -0
  162. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/train/__init__.py +0 -0
  163. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/train/__main__.py +0 -0
  164. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/train/generate_synthetic.py +0 -0
  165. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/user_message_queues.py +0 -0
  166. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/__init__.py +0 -0
  167. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/command_dependency_graph.py +0 -0
  168. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/context_utils.py +0 -0
  169. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/dspy_cache_utils.py +0 -0
  170. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/dspy_logger.py +0 -0
  171. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/dspy_utils.py +0 -0
  172. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/env.py +0 -0
  173. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/fuzzy_match.py +0 -0
  174. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/generate_param_examples.py +0 -0
  175. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/logging.py +0 -0
  176. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/parameterize_func_decorator.py +0 -0
  177. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/pydantic_model_2_dspy_signature_class.py +0 -0
  178. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/python_utils.py +0 -0
  179. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/signatures.py +0 -0
  180. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/utils/startup_progress.py +0 -0
  181. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/workflow.py +0 -0
  182. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/fastworkflow/workflow_agent.py +0 -0
  183. {fastworkflow-2.17.5 → fastworkflow-2.17.6}/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.5
3
+ Version: 2.17.6
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
@@ -467,15 +467,28 @@ class ChatSession:
467
467
  self
468
468
  )
469
469
 
470
+ # Get available commands for current context and pass to agent.
471
+ # The CommandsSystemPreludeAdapter will inject these commands into the system
472
+ # message, keeping them out of the trajectory to avoid token bloat while still
473
+ # providing context-specific command info.
474
+ from fastworkflow.workflow_agent import _what_can_i_do
475
+ available_commands = _what_can_i_do(self)
476
+
470
477
  lm = dspy_utils.get_lm("LLM_AGENT", "LITELLM_API_KEY_AGENT")
471
478
  from dspy.utils.exceptions import AdapterParseError
479
+ from fastworkflow.utils.chat_adapter import CommandsSystemPreludeAdapter
480
+
481
+ # Use CommandsSystemPreludeAdapter specifically for workflow agent calls
482
+ agent_adapter = CommandsSystemPreludeAdapter()
483
+
472
484
  # Retry logic for AdapterParseError
473
485
  max_retries = 2
474
486
  for attempt in range(max_retries):
475
487
  try:
476
- with dspy.context(lm=lm, adapter=dspy.ChatAdapter()):
488
+ with dspy.context(lm=lm, adapter=agent_adapter):
477
489
  agent_result = self._workflow_tool_agent(
478
- user_query=command_info_and_refined_message_with_todolist
490
+ user_query=command_info_and_refined_message_with_todolist,
491
+ available_commands=available_commands
479
492
  )
480
493
  break # Success, exit retry loop
481
494
  except AdapterParseError as _:
@@ -0,0 +1,99 @@
1
+ """
2
+ ChatAdapter wrapper for injecting context-specific available commands into system messages.
3
+
4
+ Design Overview:
5
+ ---------------
6
+ This module implements a ChatAdapter wrapper that dynamically injects workflow command information
7
+ into the system message at runtime, avoiding the need to rebuild ReAct agent modules per context.
8
+
9
+ Key Benefits:
10
+ - Single shared agent: No per-context module caching required
11
+ - Dynamic updates: Commands refresh per call based on current workflow context
12
+ - Token efficiency: Commands appear in system (not repeated in trajectory/history)
13
+ - Zero rebuild cost: Signature and modules remain stable across context changes
14
+
15
+ Usage:
16
+ ------
17
+ The adapter is used specifically for workflow agent calls via dspy.context():
18
+
19
+ from fastworkflow.utils.chat_adapter import CommandsSystemPreludeAdapter
20
+
21
+ agent_adapter = CommandsSystemPreludeAdapter()
22
+ available_commands = _what_can_i_do(chat_session)
23
+
24
+ with dspy.context(lm=lm, adapter=agent_adapter):
25
+ agent_result = agent(
26
+ user_query="...",
27
+ available_commands=available_commands
28
+ )
29
+
30
+ The adapter intercepts the format call and prepends commands to the system message,
31
+ keeping them out of the trajectory to prevent token bloat across iterations.
32
+ This scoped approach ensures the adapter only affects workflow agent calls, not other
33
+ DSPy operations in the system.
34
+ """
35
+ import dspy
36
+
37
+
38
+ class CommandsSystemPreludeAdapter(dspy.ChatAdapter):
39
+ """
40
+ Wraps a base DSPy ChatAdapter to inject available commands into the system message.
41
+
42
+ This adapter intercepts the render process and prepends a "Available commands" section
43
+ to the system message when `available_commands` is present in inputs. This ensures
44
+ commands are visible to the model at each step without being added to the trajectory
45
+ or conversation history.
46
+
47
+ Args:
48
+ base: The underlying ChatAdapter to wrap. Defaults to dspy.ChatAdapter() if None.
49
+ title: The header text for the commands section. Defaults to "Available commands".
50
+
51
+ Example:
52
+ >>> import dspy
53
+ >>> from fastworkflow.utils.chat_adapter import CommandsSystemPreludeAdapter
54
+ >>> dspy.settings.adapter = CommandsSystemPreludeAdapter()
55
+ """
56
+
57
+ def __init__(self, base: dspy.ChatAdapter | None = None, title: str = "Available commands"):
58
+ super().__init__()
59
+ self.base = base or dspy.ChatAdapter()
60
+ self.title = title
61
+
62
+ def format(self, signature, demos, inputs):
63
+ """
64
+ Format the inputs for the model, injecting available_commands into system message.
65
+
66
+ This method wraps the base adapter's format method and modifies the result
67
+ to include available commands in the system message if present in inputs.
68
+
69
+ Args:
70
+ signature: The DSPy signature defining the task
71
+ demos: List of demonstration examples
72
+ inputs: Dictionary of input values, may include 'available_commands'
73
+
74
+ Returns:
75
+ Formatted messages with commands injected into system message
76
+ """
77
+ # Call the base adapter's format method
78
+ formatted = self.base.format(signature, demos, inputs)
79
+
80
+ # Check if available_commands is in inputs
81
+ cmds = inputs.get("available_commands")
82
+ if not cmds:
83
+ return formatted
84
+
85
+ # Inject commands into the system message
86
+ prelude = f"{self.title}:\n{cmds}".strip()
87
+
88
+ # Formatted output is a list of messages, first may be system
89
+ # Find and modify the system message, or prepend one
90
+ if formatted and formatted[0].get("role") == "system":
91
+ # Prepend to existing system message
92
+ existing_content = formatted[0].get("content", "")
93
+ formatted[0]["content"] = f"{prelude}\n\n{existing_content}".strip()
94
+ else:
95
+ # No system message exists, prepend one
96
+ formatted.insert(0, {"role": "system", "content": prelude})
97
+
98
+ return formatted
99
+
@@ -67,13 +67,17 @@ class fastWorkflowReAct(Module):
67
67
  args={},
68
68
  )
69
69
 
70
- for idx, tool in enumerate(tools.values()):
71
- instr.append(f"({idx + 1}) {tool}")
70
+ instr.extend(f"({idx + 1}) {tool}" for idx, tool in enumerate(tools.values()))
72
71
  instr.append("When providing `next_tool_args`, the value inside the field must be in JSON format")
73
72
 
73
+ # Build the ReAct signature with trajectory and available_commands inputs.
74
+ # available_commands is injected into system message by CommandsSystemPreludeAdapter
75
+ # (see fastworkflow/utils/chat_adapter.py) and is NOT included in the trajectory
76
+ # formatting to avoid token bloat across iterations.
74
77
  react_signature = (
75
78
  dspy.Signature({**signature.input_fields}, "\n".join(instr))
76
79
  .append("trajectory", dspy.InputField(), type_=str)
80
+ .append("available_commands", dspy.InputField(), type_=str)
77
81
  .append("next_thought", dspy.OutputField(), type_=str)
78
82
  .append("next_tool_name", dspy.OutputField(), type_=Literal[tuple(tools.keys())])
79
83
  .append("next_tool_args", dspy.OutputField(), type_=dict[str, Any])
@@ -82,7 +86,7 @@ class fastWorkflowReAct(Module):
82
86
  fallback_signature = dspy.Signature(
83
87
  {**signature.input_fields, **signature.output_fields},
84
88
  signature.instructions,
85
- ).append("trajectory", dspy.InputField(), type_=str)
89
+ ).append("trajectory", dspy.InputField(), type_=str).append("available_commands", dspy.InputField(), type_=str)
86
90
 
87
91
  self.tools = tools
88
92
  self.react = dspy.Predict(react_signature)
@@ -9,7 +9,7 @@ repository = "https://github.com/radiantlogicinc/fastworkflow"
9
9
 
10
10
  [tool.poetry]
11
11
  name = "fastworkflow"
12
- version = "2.17.5"
12
+ version = "2.17.6"
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