open-swarm 0.1.1744936234__tar.gz → 0.1.1744936297__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 (314) hide show
  1. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/PKG-INFO +1 -1
  2. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/pyproject.toml +2 -2
  3. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/consumers.py +19 -0
  4. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/agent_utils.py +1 -1
  5. open_swarm-0.1.1744936297/src/swarm/extensions/blueprint/blueprint_base.py +333 -0
  6. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/blueprint_discovery.py +13 -11
  7. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/cli_handler.py +33 -55
  8. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/output_utils.py +78 -0
  9. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/spinner.py +30 -21
  10. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/cli_args.py +6 -0
  11. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/config/config_loader.py +4 -1
  12. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/llm/chat_completion.py +31 -1
  13. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/settings.py +6 -7
  14. open_swarm-0.1.1744936234/src/swarm/extensions/blueprint/blueprint_base.py +0 -111
  15. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/.gitignore +0 -0
  16. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/LICENSE +0 -0
  17. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/README.md +0 -0
  18. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/__init__.py +0 -0
  19. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/agent/__init__.py +0 -0
  20. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/apps.py +0 -0
  21. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/auth.py +0 -0
  22. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/README.md +0 -0
  23. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/chatbot/blueprint_chatbot.py +0 -0
  24. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/chatbot/templates/chatbot/chatbot.html +0 -0
  25. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/digitalbutlers/blueprint_digitalbutlers.py +0 -0
  26. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/divine_code/__init__.py +0 -0
  27. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/divine_code/apps.py +0 -0
  28. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/divine_code/blueprint_divine_code.py +0 -0
  29. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/django_chat/apps.py +0 -0
  30. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/django_chat/blueprint_django_chat.py +0 -0
  31. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/django_chat/templates/django_chat/django_chat_webpage.html +0 -0
  32. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/django_chat/urls.py +0 -0
  33. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/django_chat/views.py +0 -0
  34. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/echocraft/blueprint_echocraft.py +0 -0
  35. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/family_ties/apps.py +0 -0
  36. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/family_ties/blueprint_family_ties.py +0 -0
  37. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/family_ties/models.py +0 -0
  38. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/family_ties/serializers.py +0 -0
  39. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/family_ties/settings.py +0 -0
  40. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/family_ties/urls.py +0 -0
  41. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/family_ties/views.py +0 -0
  42. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/flock/__init__.py +0 -0
  43. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/gaggle/blueprint_gaggle.py +0 -0
  44. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/mcp_demo/blueprint_mcp_demo.py +0 -0
  45. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/messenger/templates/messenger/messenger.html +0 -0
  46. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/mission_improbable/blueprint_mission_improbable.py +0 -0
  47. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/monkai_magic/blueprint_monkai_magic.py +0 -0
  48. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/nebula_shellz/blueprint_nebula_shellz.py +0 -0
  49. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/omniplex/blueprint_omniplex.py +0 -0
  50. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/rue_code/__init__.py +0 -0
  51. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/rue_code/blueprint_rue_code.py +0 -0
  52. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/suggestion/blueprint_suggestion.py +0 -0
  53. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/unapologetic_press/blueprint_unapologetic_press.py +0 -0
  54. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/whiskeytango_foxtrot/__init__.py +0 -0
  55. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/whiskeytango_foxtrot/apps.py +0 -0
  56. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/blueprints/whiskeytango_foxtrot/blueprint_whiskeytango_foxtrot.py +0 -0
  57. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/__init__.py +0 -0
  58. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/__init__.py +0 -0
  59. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/blueprint_utils.py +0 -0
  60. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/common_utils.py +0 -0
  61. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/config_loader.py +0 -0
  62. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/django_utils.py +0 -0
  63. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/interactive_mode.py +0 -0
  64. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/modes/rest_mode.py +0 -0
  65. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/blueprint/runnable_blueprint.py +0 -0
  66. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/__init__.py +0 -0
  67. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/blueprint_runner.py +0 -0
  68. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/commands/__init__.py +0 -0
  69. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/commands/blueprint_management.py +0 -0
  70. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/commands/config_management.py +0 -0
  71. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/commands/edit_config.py +0 -0
  72. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/commands/list_blueprints.py +0 -0
  73. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/commands/validate_env.py +0 -0
  74. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/commands/validate_envvars.py +0 -0
  75. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/interactive_shell.py +0 -0
  76. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/main.py +0 -0
  77. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/selection.py +0 -0
  78. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/utils/discover_commands.py +0 -0
  79. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/utils/env_setup.py +0 -0
  80. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/cli/utils.py +0 -0
  81. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/config/__init__.py +0 -0
  82. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/config/config_manager.py +0 -0
  83. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/config/server_config.py +0 -0
  84. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/config/setup_wizard.py +0 -0
  85. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/config/utils/__init__.py +0 -0
  86. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/config/utils/logger.py +0 -0
  87. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/launchers/__init__.py +0 -0
  88. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/launchers/build_launchers.py +0 -0
  89. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/launchers/build_swarm_wrapper.py +0 -0
  90. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/launchers/swarm_api.py +0 -0
  91. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/launchers/swarm_cli.py +0 -0
  92. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/extensions/launchers/swarm_wrapper.py +0 -0
  93. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/management/__init__.py +0 -0
  94. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/management/commands/__init__.py +0 -0
  95. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/management/commands/runserver.py +0 -0
  96. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/messages.py +0 -0
  97. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/middleware.py +0 -0
  98. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/migrations/0010_initial_chat_models.py +0 -0
  99. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/migrations/__init__.py +0 -0
  100. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/models.py +0 -0
  101. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/permissions.py +0 -0
  102. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/repl/__init__.py +0 -0
  103. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/repl/repl.py +0 -0
  104. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/serializers.py +0 -0
  105. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/fonts/fontawesome-webfont.ttf +0 -0
  106. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/fonts/fontawesome-webfont.woff +0 -0
  107. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/fonts/fontawesome-webfont.woff2 +0 -0
  108. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/markedjs/marked.min.js +0 -0
  109. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/adjustments-horizontal.svg +0 -0
  110. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/alert-triangle.svg +0 -0
  111. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/archive.svg +0 -0
  112. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/artboard.svg +0 -0
  113. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/automatic-gearbox.svg +0 -0
  114. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/box-multiple.svg +0 -0
  115. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/carambola.svg +0 -0
  116. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/copy.svg +0 -0
  117. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/download.svg +0 -0
  118. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/edit.svg +0 -0
  119. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/filled/carambola.svg +0 -0
  120. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/filled/paint.svg +0 -0
  121. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/headset.svg +0 -0
  122. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/layout-sidebar-left-collapse.svg +0 -0
  123. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/layout-sidebar-left-expand.svg +0 -0
  124. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/layout-sidebar-right-collapse.svg +0 -0
  125. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/layout-sidebar-right-expand.svg +0 -0
  126. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/message-chatbot.svg +0 -0
  127. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/message-star.svg +0 -0
  128. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/message-x.svg +0 -0
  129. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/message.svg +0 -0
  130. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/paperclip.svg +0 -0
  131. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/playlist-add.svg +0 -0
  132. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/robot.svg +0 -0
  133. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/search.svg +0 -0
  134. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/settings.svg +0 -0
  135. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/thumb-down.svg +0 -0
  136. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/contrib/tabler-icons/thumb-up.svg +0 -0
  137. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/css/dropdown.css +0 -0
  138. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/htmx/htmx.min.js +0 -0
  139. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/js/dropdown.js +0 -0
  140. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/base.css +0 -0
  141. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/chat-history.css +0 -0
  142. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/chat.css +0 -0
  143. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/chatbot.css +0 -0
  144. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/chatgpt.css +0 -0
  145. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/colors/corporate.css +0 -0
  146. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/colors/pastel.css +0 -0
  147. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/colors/tropical.css +0 -0
  148. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/general.css +0 -0
  149. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/layout.css +0 -0
  150. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/layouts/messenger-layout.css +0 -0
  151. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/layouts/minimalist-layout.css +0 -0
  152. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/layouts/mobile-layout.css +0 -0
  153. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/messages.css +0 -0
  154. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/messenger.css +0 -0
  155. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/settings.css +0 -0
  156. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/simple.css +0 -0
  157. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/slack.css +0 -0
  158. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/style.css +0 -0
  159. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/theme.css +0 -0
  160. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/css/toast.css +0 -0
  161. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/auth.js +0 -0
  162. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/blueprint.js +0 -0
  163. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/blueprintUtils.js +0 -0
  164. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/chatLogic.js +0 -0
  165. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/debug.js +0 -0
  166. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/events.js +0 -0
  167. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/main.js +0 -0
  168. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/messages.js +0 -0
  169. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/messengerLogic.js +0 -0
  170. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/modules/apiService.js +0 -0
  171. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/modules/blueprintManager.js +0 -0
  172. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/modules/chatHistory.js +0 -0
  173. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/modules/debugLogger.js +0 -0
  174. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/modules/eventHandlers.js +0 -0
  175. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/modules/messageProcessor.js +0 -0
  176. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/modules/state.js +0 -0
  177. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/modules/userInteractions.js +0 -0
  178. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/modules/validation.js +0 -0
  179. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/rendering.js +0 -0
  180. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/settings.js +0 -0
  181. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/sidebar.js +0 -0
  182. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/simpleLogic.js +0 -0
  183. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/slackLogic.js +0 -0
  184. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/splash.js +0 -0
  185. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/theme.js +0 -0
  186. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/toast.js +0 -0
  187. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/ui.js +0 -0
  188. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/js/validation.js +0 -0
  189. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/animated_spinner.svg +0 -0
  190. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/arrow_down.svg +0 -0
  191. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/arrow_left.svg +0 -0
  192. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/arrow_right.svg +0 -0
  193. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/arrow_up.svg +0 -0
  194. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/attach.svg +0 -0
  195. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/avatar.svg +0 -0
  196. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/canvas.svg +0 -0
  197. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/chat_history.svg +0 -0
  198. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/close.svg +0 -0
  199. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/copy.svg +0 -0
  200. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/dark_mode.svg +0 -0
  201. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/edit.svg +0 -0
  202. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/layout.svg +0 -0
  203. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/logo.svg +0 -0
  204. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/logout.svg +0 -0
  205. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/mobile.svg +0 -0
  206. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/new_chat.svg +0 -0
  207. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/not_visible.svg +0 -0
  208. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/plus.svg +0 -0
  209. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/run_code.svg +0 -0
  210. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/save.svg +0 -0
  211. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/search.svg +0 -0
  212. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/settings.svg +0 -0
  213. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/speaker.svg +0 -0
  214. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/stop.svg +0 -0
  215. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/thumbs_down.svg +0 -0
  216. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/thumbs_up.svg +0 -0
  217. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/toggle_off.svg +0 -0
  218. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/toggle_on.svg +0 -0
  219. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/trash.svg +0 -0
  220. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/undo.svg +0 -0
  221. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/visible.svg +0 -0
  222. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/static/rest_mode/svg/voice.svg +0 -0
  223. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/account/login.html +0 -0
  224. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/account/signup.html +0 -0
  225. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/base.html +0 -0
  226. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/chat.html +0 -0
  227. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/index.html +0 -0
  228. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/rest_mode/components/chat_sidebar.html +0 -0
  229. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/rest_mode/components/header.html +0 -0
  230. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/rest_mode/components/main_chat_pane.html +0 -0
  231. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/rest_mode/components/settings_dialog.html +0 -0
  232. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/rest_mode/components/splash_screen.html +0 -0
  233. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/rest_mode/components/top_bar.html +0 -0
  234. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/rest_mode/message_ui.html +0 -0
  235. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/rest_mode/slackbot.html +0 -0
  236. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/simple_blueprint_page.html +0 -0
  237. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/websocket_partials/final_system_message.html +0 -0
  238. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/websocket_partials/system_message.html +0 -0
  239. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/templates/websocket_partials/user_message.html +0 -0
  240. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/tool_executor.py +0 -0
  241. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/urls.py +0 -0
  242. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/util.py +0 -0
  243. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/utils/color_utils.py +0 -0
  244. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/utils/context_utils.py +0 -0
  245. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/utils/general_utils.py +0 -0
  246. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/utils/log_utils.py +0 -0
  247. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/utils/logger.py +0 -0
  248. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/utils/logger_setup.py +0 -0
  249. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/utils/message_sequence.py +0 -0
  250. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/utils/message_utils.py +0 -0
  251. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/utils/redact.py +0 -0
  252. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/views/__init__.py +0 -0
  253. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/views/api_views.py +0 -0
  254. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/views/chat_views.py +0 -0
  255. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/views/core_views.py +0 -0
  256. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/views/message_views.py +0 -0
  257. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/views/model_views.py +0 -0
  258. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/views/utils.py +0 -0
  259. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/views/web_views.py +0 -0
  260. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/src/swarm/wsgi.py +0 -0
  261. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/__init__.py +0 -0
  262. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/api/conftest.py +0 -0
  263. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/api/test_chat_completions_auth_async.py +0 -0
  264. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/api/test_chat_completions_failing_async.py +0 -0
  265. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/api/test_chat_completions_validation_async.py +0 -0
  266. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_chatbot.py +0 -0
  267. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_digitalbutlers.py +0 -0
  268. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_dilbot_universe.py +0 -0
  269. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_divine_code.py +0 -0
  270. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_echocraft.py +0 -0
  271. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_family_ties.py +0 -0
  272. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_gaggle.py +0 -0
  273. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_gotchaman.py +0 -0
  274. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_mcp_demo.py +0 -0
  275. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_mission_improbable.py +0 -0
  276. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_monkai_magic.py +0 -0
  277. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_nebula_shellz.py +0 -0
  278. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_omniplex.py +0 -0
  279. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_suggestion.py +0 -0
  280. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_unapologetic_press.py +0 -0
  281. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/blueprints/test_whiskeytangofoxtrot.py +0 -0
  282. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/cli/test_launchers.py +0 -0
  283. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/cli/test_list_blueprints.py +0 -0
  284. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/conftest.py +0 -0
  285. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/extensions/launchers/test_swarm_api_launcher.py +0 -0
  286. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/swarm_config.json +0 -0
  287. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_chucks_angels.sh +0 -0
  288. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_digitalbutlers.sh +0 -0
  289. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_dilbot_universe.sh +0 -0
  290. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_divine_code.sh +0 -0
  291. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_django_chat.sh +0 -0
  292. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_echocraft.sh +0 -0
  293. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_family_ties.sh +0 -0
  294. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_flock.sh +0 -0
  295. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_gaggle.sh +0 -0
  296. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_gotchaman.sh +0 -0
  297. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_monkai-magic.sh +0 -0
  298. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_nebula_shellz.sh +0 -0
  299. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_omniplex.sh +0 -0
  300. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_rue-code.sh +0 -0
  301. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_suggestion.sh +0 -0
  302. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_unapologetic_press.sh +0 -0
  303. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_university.sh +0 -0
  304. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/system/test_whiskeytango_foxtrot.sh +0 -0
  305. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/test_blueprint_loading.py +0 -0
  306. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/test_cli_mode_selection.py +0 -0
  307. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/test_core_filter_duplicate_system_messages.py +0 -0
  308. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/test_core_filter_messages.py +0 -0
  309. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/test_core_truncate_message_history.py +0 -0
  310. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/test_core_update_null_content.py +0 -0
  311. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/test_dummy.py +0 -0
  312. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/test_truncate_message_history.py +0 -0
  313. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/unit/blueprints/rue_code/test_rue_code_tools.py +0 -0
  314. {open_swarm-0.1.1744936234 → open_swarm-0.1.1744936297}/tests/unit/test_blueprint_base_config.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: open-swarm
3
- Version: 0.1.1744936234
3
+ Version: 0.1.1744936297
4
4
  Summary: Open Swarm: Orchestrating AI Agent Swarms with Django
5
5
  Project-URL: Homepage, https://github.com/yourusername/open-swarm
6
6
  Project-URL: Documentation, https://github.com/yourusername/open-swarm/blob/main/README.md
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "open-swarm"
7
- version = "0.1.1744936234"
7
+ version = "0.1.1744936297"
8
8
  description = "Open Swarm: Orchestrating AI Agent Swarms with Django"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -70,6 +70,7 @@ Changelog = "https://github.com/yourusername/open-swarm/blob/main/CHANGELOG.md"
70
70
  [project.scripts]
71
71
  swarm-api = "swarm.extensions.launchers.swarm_api:main"
72
72
  swarm-cli = "swarm.extensions.launchers.swarm_cli:app"
73
+ codey = "swarm.blueprints.codey.blueprint_codey:main"
73
74
 
74
75
  [project.optional-dependencies]
75
76
  dev = [
@@ -161,4 +162,3 @@ omit = ["*/migrations/*", "*/tests/*", "src/swarm/settings.py", "src/swarm/wsgi.
161
162
  [tool.coverage.report]
162
163
  show_missing = true
163
164
  fail_under = 70
164
-
@@ -62,6 +62,25 @@ class DjangoChatConsumer(AsyncWebsocketConsumer):
62
62
  await self.send(text_data=system_message_html)
63
63
 
64
64
  client = AsyncOpenAI(api_key=os.getenv("OPENAI_API_KEY"))
65
+
66
+ # --- PATCH: Enforce LiteLLM-only endpoint and suppress OpenAI tracing/telemetry ---
67
+ import os, logging
68
+ if os.environ.get("LITELLM_BASE_URL") or os.environ.get("OPENAI_BASE_URL"):
69
+ logging.getLogger("openai.agents").setLevel(logging.CRITICAL)
70
+ try:
71
+ import openai.agents.tracing
72
+ openai.agents.tracing.TracingClient = lambda *a, **kw: None
73
+ except Exception:
74
+ pass
75
+ def _enforce_litellm_only(client):
76
+ base_url = getattr(client, 'base_url', None)
77
+ if base_url and 'openai.com' in base_url:
78
+ return
79
+ if base_url and 'openai.com' not in base_url:
80
+ import traceback
81
+ raise RuntimeError(f"Attempted fallback to OpenAI API when custom base_url is set! base_url={base_url}\n{traceback.format_stack()}")
82
+ _enforce_litellm_only(client)
83
+
65
84
  stream = await client.chat.completions.create(
66
85
  model=os.getenv("OPENAI_MODEL"),
67
86
  messages=self.messages,
@@ -6,7 +6,7 @@ This module has been updated to remove dependency on swarm.types;
6
6
  instead, it now imports Agent from the openai-agents SDK.
7
7
  """
8
8
 
9
- from agents.agent import Agent # Updated import
9
+ from blueprint_agents.agent import Agent # Updated import
10
10
 
11
11
  def get_agent_name(agent: Agent) -> str:
12
12
  """
@@ -0,0 +1,333 @@
1
+ # --- REMOVE noisy debug/framework prints unless SWARM_DEBUG=1 ---
2
+ import os
3
+
4
+ def _should_debug():
5
+ return os.environ.get("SWARM_DEBUG") == "1"
6
+
7
+ def _debug_print(*args, **kwargs):
8
+ if _should_debug():
9
+ print(*args, **kwargs)
10
+
11
+ def _framework_print(*args, **kwargs):
12
+ if _should_debug():
13
+ print(*args, **kwargs)
14
+
15
+ # --- Content for src/swarm/extensions/blueprint/blueprint_base.py ---
16
+ import logging
17
+ import json
18
+ from abc import ABC, abstractmethod
19
+ from typing import Dict, Any, Optional, List, AsyncGenerator
20
+ from pathlib import Path
21
+ from django.apps import apps # Import Django apps registry
22
+
23
+ # Keep the function import
24
+ from swarm.extensions.config.config_loader import get_profile_from_config, _substitute_env_vars
25
+
26
+ from openai import AsyncOpenAI
27
+ from agents import set_default_openai_client
28
+ from .slash_commands import slash_registry, SlashCommandRegistry
29
+ from blueprint_agents import * # Import all from blueprint_agents
30
+
31
+ logger = logging.getLogger(__name__)
32
+ from rich.console import Console
33
+ import traceback
34
+
35
+ # --- PATCH: Suppress OpenAI tracing/telemetry errors if using LiteLLM/custom endpoint ---
36
+ import logging
37
+ import os
38
+ if os.environ.get("LITELLM_BASE_URL") or os.environ.get("OPENAI_BASE_URL"):
39
+ # Silence openai.agents tracing/telemetry errors
40
+ logging.getLogger("openai.agents").setLevel(logging.CRITICAL)
41
+ try:
42
+ import openai.agents.tracing
43
+ openai.agents.tracing.TracingClient = lambda *a, **kw: None
44
+ except Exception:
45
+ pass
46
+
47
+ # --- Spinner/Status Message Enhancements ---
48
+ # To be used by all blueprints for consistent UX
49
+ import itertools
50
+ import sys
51
+ import threading
52
+ import time
53
+
54
+ class Spinner:
55
+ def __init__(self, message_sequence=None, interval=0.3, slow_threshold=10):
56
+ self.message_sequence = message_sequence or ['Generating.', 'Generating..', 'Generating...', 'Running...']
57
+ self.interval = interval
58
+ self.slow_threshold = slow_threshold # seconds before 'Taking longer than expected'
59
+ self._stop_event = threading.Event()
60
+ self._thread = None
61
+ self._start_time = None
62
+
63
+ def start(self):
64
+ self._stop_event.clear()
65
+ self._start_time = time.time()
66
+ self._thread = threading.Thread(target=self._spin)
67
+ self._thread.start()
68
+
69
+ def _spin(self):
70
+ for msg in itertools.cycle(self.message_sequence):
71
+ if self._stop_event.is_set():
72
+ break
73
+ elapsed = time.time() - self._start_time
74
+ if elapsed > self.slow_threshold:
75
+ sys.stdout.write('\rGenerating... Taking longer than expected ')
76
+ else:
77
+ sys.stdout.write(f'\r{msg} ')
78
+ sys.stdout.flush()
79
+ time.sleep(self.interval)
80
+ sys.stdout.write('\r')
81
+ sys.stdout.flush()
82
+
83
+ def stop(self, final_message=''):
84
+ self._stop_event.set()
85
+ if self._thread:
86
+ self._thread.join()
87
+ if final_message:
88
+ sys.stdout.write(f'\r{final_message}\n')
89
+ sys.stdout.flush()
90
+
91
+ # Usage Example (to be called in blueprints):
92
+ # spinner = Spinner()
93
+ # spinner.start()
94
+ # ... do work ...
95
+ # spinner.stop('Done!')
96
+
97
+ def configure_openai_client_from_env():
98
+ """
99
+ Framework-level function: Always instantiate and set the default OpenAI client.
100
+ Prints out the config being used for debug.
101
+ """
102
+ import os
103
+ from agents import set_default_openai_client
104
+ from openai import AsyncOpenAI
105
+ base_url = os.environ.get("LITELLM_BASE_URL") or os.environ.get("OPENAI_BASE_URL")
106
+ api_key = os.environ.get("LITELLM_API_KEY") or os.environ.get("OPENAI_API_KEY")
107
+ _debug_print(f"[DEBUG] Using OpenAI client config: base_url={base_url}, api_key={'set' if api_key else 'NOT SET'}")
108
+ if base_url and api_key:
109
+ client = AsyncOpenAI(base_url=base_url, api_key=api_key)
110
+ set_default_openai_client(client)
111
+ _framework_print(f"[FRAMEWORK] Set default OpenAI client: base_url={base_url}, api_key={'set' if api_key else 'NOT SET'}")
112
+ else:
113
+ _framework_print("[FRAMEWORK] WARNING: base_url or api_key missing, OpenAI client not set!")
114
+
115
+ configure_openai_client_from_env()
116
+
117
+ class BlueprintBase(ABC):
118
+ """
119
+ Abstract base class for all Swarm blueprints.
120
+
121
+ Defines the core interface for blueprint initialization and execution.
122
+ """
123
+ enable_terminal_commands: bool = False # By default, terminal command execution is disabled
124
+
125
+ @classmethod
126
+ def main(cls):
127
+ """
128
+ Standard CLI entry point for all blueprints.
129
+ Subclasses can override metadata/config_path if needed.
130
+ """
131
+ from swarm.extensions.blueprint.cli_handler import run_blueprint_cli
132
+ from pathlib import Path
133
+ swarm_version = getattr(cls, "SWARM_VERSION", "1.0.0")
134
+ config_path = getattr(cls, "DEFAULT_CONFIG_PATH", Path(__file__).parent / "swarm_config.json")
135
+ run_blueprint_cli(cls, swarm_version=swarm_version, default_config_path=config_path)
136
+
137
+ def display_splash_screen(self, animated: bool = False):
138
+ """Default splash screen. Subclasses can override for custom CLI/API branding."""
139
+ console = Console()
140
+ console.print(f"[bold cyan]Welcome to {self.__class__.__name__}![/]", style="bold")
141
+
142
+ def __init__(self, blueprint_id: str, config_path: Optional[Path] = None, enable_terminal_commands: Optional[bool] = None):
143
+ try:
144
+ if not blueprint_id:
145
+ raise ValueError("blueprint_id cannot be empty or None")
146
+ self.blueprint_id = blueprint_id
147
+ self.config_path = config_path # Note: config_path is currently unused if we rely on AppConfig
148
+ self._config: Optional[Dict[str, Any]] = None
149
+ self._llm_profile_name: Optional[str] = None
150
+ self._llm_profile_data: Optional[Dict[str, Any]] = None
151
+ self._markdown_output: bool = True # Default
152
+ # Allow per-instance override
153
+ if enable_terminal_commands is not None:
154
+ self.enable_terminal_commands = enable_terminal_commands
155
+ # Else: use class attribute (default False or set by subclass)
156
+
157
+ logger.info(f"Initializing blueprint '{self.blueprint_id}' (Type: {self.__class__.__name__})")
158
+
159
+ # --- Ensure custom OpenAI client for custom LLM providers ---
160
+ import os
161
+
162
+ # Remove monkey patching and envvar hacks. Always pass config values directly.
163
+ # (Retain only explicit AsyncOpenAI client instantiation in blueprints)
164
+ # (No changes needed here for direct client pattern)
165
+
166
+ self._load_and_process_config()
167
+ except AttributeError as e:
168
+ logger.debug(f"[BlueprintBase.__init__] AttributeError: {e}")
169
+ traceback.print_exc()
170
+ raise
171
+
172
+ def _load_and_process_config(self):
173
+ """Loads the main Swarm config and extracts relevant settings. Falls back to empty config if Django unavailable or not found."""
174
+ import os
175
+ import json
176
+ from pathlib import Path
177
+ def redact(val):
178
+ if not isinstance(val, str) or len(val) <= 4:
179
+ return "****"
180
+ return val[:2] + "*" * (len(val)-4) + val[-2:]
181
+ def redact_dict(d):
182
+ if isinstance(d, dict):
183
+ return {k: (redact_dict(v) if not (isinstance(v, str) and ("key" in k.lower() or "token" in k.lower() or "secret" in k.lower())) else redact(v)) for k, v in d.items()}
184
+ elif isinstance(d, list):
185
+ return [redact_dict(item) for item in d]
186
+ return d
187
+ try:
188
+ try:
189
+ # --- Get config from the AppConfig instance (Django) ---
190
+ app_config_instance = apps.get_app_config('swarm')
191
+ if not hasattr(app_config_instance, 'config') or not app_config_instance.config:
192
+ raise ValueError("AppConfig for 'swarm' does not have a valid 'config' attribute.")
193
+ config = app_config_instance.config
194
+ logger.debug("Loaded config from Django AppConfig.")
195
+ except Exception as e:
196
+ if _should_debug():
197
+ logger.warning(f"Falling back to CLI/home config due to error: {e}")
198
+ config = None
199
+ # 1. CLI argument (not handled here, handled in cli_handler)
200
+ # 2. Current working directory
201
+ cwd_config = Path.cwd() / "swarm_config.json"
202
+ if cwd_config.exists():
203
+ with open(cwd_config, 'r') as f:
204
+ config = json.load(f)
205
+ # 3. XDG_CONFIG_HOME or ~/.config/swarm/swarm_config.json
206
+ elif os.environ.get("XDG_CONFIG_HOME"):
207
+ xdg_config = Path(os.environ["XDG_CONFIG_HOME"]) / "swarm" / "swarm_config.json"
208
+ if xdg_config.exists():
209
+ with open(xdg_config, 'r') as f:
210
+ config = json.load(f)
211
+ elif (Path.home() / ".config/swarm/swarm_config.json").exists():
212
+ with open(Path.home() / ".config/swarm/swarm_config.json", 'r') as f:
213
+ config = json.load(f)
214
+ # 4. Legacy fallback: ~/.swarm/swarm_config.json
215
+ elif (Path.home() / ".swarm/swarm_config.json").exists():
216
+ with open(Path.home() / ".swarm/swarm_config.json", 'r') as f:
217
+ config = json.load(f)
218
+ # 5. Fallback: OPENAI_API_KEY envvar
219
+ elif os.environ.get("OPENAI_API_KEY"):
220
+ config = {
221
+ "llm": {"default": {"provider": "openai", "model": "gpt-3.5-turbo", "api_key": os.environ["OPENAI_API_KEY"]}},
222
+ "settings": {"default_llm_profile": "default", "default_markdown_output": True},
223
+ "blueprints": {},
224
+ "llm_profile": "default",
225
+ "mcpServers": {}
226
+ }
227
+ logger.info("No config file found, using default config with OPENAI_API_KEY for CLI mode.")
228
+ else:
229
+ config = {}
230
+ logger.warning("No config file found and OPENAI_API_KEY is not set. Using empty config. CLI blueprints may fail if LLM config is required.")
231
+ if config is not None:
232
+ config = _substitute_env_vars(config)
233
+ self._config = config or {}
234
+
235
+ # --- After config is loaded, set OpenAI client from config if possible ---
236
+ try:
237
+ llm_profiles = self._config.get("llm", {})
238
+ default_profile = llm_profiles.get("default", {})
239
+ base_url = default_profile.get("base_url")
240
+ api_key = default_profile.get("api_key")
241
+ # Expand env vars if present
242
+ import os
243
+ if base_url and base_url.startswith("${"):
244
+ var = base_url[2:-1]
245
+ base_url = os.environ.get(var, base_url)
246
+ if api_key and api_key.startswith("${"):
247
+ var = api_key[2:-1]
248
+ api_key = os.environ.get(var, api_key)
249
+ if base_url and api_key:
250
+ from openai import AsyncOpenAI
251
+ from agents import set_default_openai_client
252
+ _debug_print(f"[DEBUG] (config) Setting OpenAI client: base_url={base_url}, api_key={'set' if api_key else 'NOT SET'}")
253
+ client = AsyncOpenAI(base_url=base_url, api_key=api_key)
254
+ set_default_openai_client(client)
255
+ except Exception as e:
256
+ _debug_print(f"[DEBUG] Failed to set OpenAI client from config: {e}")
257
+
258
+ # --- Debug: Print and log redacted config ---
259
+ redacted_config = redact_dict(self._config)
260
+ logger.debug(f"Loaded config (redacted): {json.dumps(redacted_config, indent=2)}")
261
+
262
+ # --- Process LLM profile name and data ---
263
+ settings_section = self._config.get("settings", {})
264
+ llm_section = self._config.get("llm", {})
265
+ default_profile = settings_section.get("default_llm_profile") or "default"
266
+ self._llm_profile_name = self._config.get("llm_profile") or default_profile
267
+ if "profiles" in llm_section:
268
+ self._llm_profile_data = llm_section["profiles"].get(self._llm_profile_name, {})
269
+ else:
270
+ self._llm_profile_data = llm_section.get(self._llm_profile_name, {})
271
+
272
+ blueprint_specific_settings = self._config.get("blueprints", {}).get(self.blueprint_id, {})
273
+ global_markdown_setting = settings_section.get("default_markdown_output", True)
274
+ self._markdown_output = blueprint_specific_settings.get("markdown_output", global_markdown_setting)
275
+ logger.debug(f"Markdown output for '{self.blueprint_id}': {self._markdown_output}")
276
+
277
+ except ValueError as e:
278
+ logger.error(f"Configuration error for blueprint '{self.blueprint_id}': {e}", exc_info=True)
279
+ raise
280
+ except Exception as e:
281
+ logger.error(f"Unexpected error loading config for blueprint '{self.blueprint_id}': {e}", exc_info=True)
282
+ raise
283
+
284
+ @property
285
+ def config(self) -> Dict[str, Any]:
286
+ """Returns the loaded and processed Swarm configuration."""
287
+ if self._config is None:
288
+ raise RuntimeError("Configuration accessed before initialization or after failure.")
289
+ return self._config
290
+
291
+ @property
292
+ def llm_profile(self) -> Dict[str, Any]:
293
+ """Returns the loaded and processed LLM profile data for this blueprint."""
294
+ if self._llm_profile_data is None:
295
+ raise RuntimeError("LLM profile accessed before initialization or after failure.")
296
+ return self._llm_profile_data
297
+
298
+ @property
299
+ def llm_profile_name(self) -> str:
300
+ """Returns the name of the LLM profile being used."""
301
+ if self._llm_profile_name is None:
302
+ raise RuntimeError("LLM profile name accessed before initialization or after failure.")
303
+ return self._llm_profile_name
304
+
305
+ @property
306
+ def slash_commands(self) -> SlashCommandRegistry:
307
+ """Access the global slash command registry. Blueprints can register new commands here."""
308
+ return slash_registry
309
+
310
+ def get_llm_profile(self, profile_name: str) -> dict:
311
+ """Returns the LLM profile dict for the given profile name from config, or empty dict if not found.
312
+ Supports both llm.profiles and direct llm keys for backward compatibility."""
313
+ llm_section = self.config.get("llm", {})
314
+ if "profiles" in llm_section:
315
+ return llm_section["profiles"].get(profile_name, {})
316
+ return llm_section.get(profile_name, {})
317
+
318
+ @property
319
+ def should_output_markdown(self) -> bool:
320
+ """Returns whether the blueprint should format output as Markdown."""
321
+ return self._markdown_output
322
+
323
+ @abstractmethod
324
+ async def run(self, messages: List[Dict[str, Any]], **kwargs: Any) -> AsyncGenerator[Dict[str, Any], None]:
325
+ """
326
+ The main execution method for the blueprint.
327
+ """
328
+ import os
329
+ import pprint
330
+ logger.debug("ENVIRONMENT DUMP BEFORE MODEL CALL:")
331
+ pprint.pprint(dict(os.environ))
332
+ raise NotImplementedError("Subclasses must implement the 'run' method.")
333
+ yield {}
@@ -54,35 +54,38 @@ def discover_blueprints(blueprint_dir: str) -> Dict[str, Type[BlueprintBase]]:
54
54
  return blueprints
55
55
 
56
56
  # Iterate over items inside the base blueprint directory
57
- for item_name in os.listdir(base_dir):
58
- item_path = base_dir / item_name
59
-
60
- if not item_path.is_dir():
57
+ for subdir in base_dir.iterdir():
58
+ if not subdir.is_dir():
61
59
  continue # Skip files directly under blueprints/
62
60
 
63
61
  # Use directory name as blueprint name (e.g., 'echocraft')
64
- blueprint_name = item_name
65
- logger.debug(f"Processing potential blueprint '{blueprint_name}' in directory: {item_name}")
62
+ blueprint_name = subdir.name
63
+ logger.debug(f"Processing potential blueprint '{blueprint_name}' in directory: {subdir.name}")
66
64
 
67
65
  # Look for the specific .py file, e.g., blueprint_echocraft.py
68
66
  py_file_name = f"blueprint_{blueprint_name}.py"
69
- py_file_path = item_path / py_file_name
67
+ py_file_path = subdir / py_file_name
70
68
 
71
69
  if not py_file_path.is_file():
72
70
  # Also check for just {blueprint_name}.py if that's a convention
73
71
  alt_py_file_name = f"{blueprint_name}.py"
74
- alt_py_file_path = item_path / alt_py_file_name
72
+ alt_py_file_path = subdir / alt_py_file_name
75
73
  if alt_py_file_path.is_file():
76
74
  py_file_path = alt_py_file_path # Use the alternative path
77
75
  py_file_name = alt_py_file_name
78
76
  logger.debug(f"Found alternative blueprint file: {py_file_name}")
79
77
  else:
80
- logger.warning(f"Skipping directory '{item_name}': Neither '{py_file_name}' nor '{alt_py_file_name}' found.")
78
+ logger.warning(f"Skipping directory '{subdir.name}': Neither '{py_file_name}' nor '{alt_py_file_name}' found.")
81
79
  continue
82
80
 
83
81
 
84
82
  # Construct module import path, e.g., blueprints.echocraft.blueprint_echocraft
85
- module_import_path = f"{base_dir.name}.{item_name}.{py_file_path.stem}"
83
+ if py_file_path.name.startswith('blueprint_gatcha'):
84
+ module_import_path = f"swarm.blueprints.gatcha.{py_file_path.stem}"
85
+ elif py_file_path.name.startswith('blueprint_'):
86
+ module_import_path = f"swarm.blueprints.{subdir.name}.{py_file_path.stem}"
87
+ else:
88
+ continue
86
89
 
87
90
  try:
88
91
  # Ensure parent directory is in path
@@ -123,4 +126,3 @@ def discover_blueprints(blueprint_dir: str) -> Dict[str, Type[BlueprintBase]]:
123
126
 
124
127
  logger.info(f"Blueprint discovery complete. Found: {list(blueprints.keys())}")
125
128
  return blueprints
126
-
@@ -2,8 +2,10 @@ import argparse
2
2
  import asyncio
3
3
  import json
4
4
  import logging
5
+ import os
5
6
  import signal
6
7
  import sys
8
+ from dotenv import load_dotenv
7
9
  from pathlib import Path
8
10
  from typing import Any, Dict, Optional, Type
9
11
 
@@ -14,6 +16,19 @@ if TYPE_CHECKING:
14
16
 
15
17
  logger = logging.getLogger("swarm.cli")
16
18
 
19
+ # --- DEBUG PRINTS REMOVED BY CASCADE ---
20
+ # print(f"[DEBUG] CLI handler startup: sys.argv={sys.argv}")
21
+ # print(f"[DEBUG] CLI handler startup: LITELLM_MODEL={os.environ.get('LITELLM_MODEL')}, DEFAULT_LLM={os.environ.get('DEFAULT_LLM')}")
22
+
23
+ # --- FORCE LOAD .env EARLY for CLI/LLM ---
24
+ project_root = Path(__file__).parent.parent.parent.parent # /home/chatgpt/open-swarm
25
+ dotenv_path = project_root / ".env"
26
+ load_dotenv(dotenv_path=dotenv_path, override=True)
27
+ # print(f"[DEBUG] Loaded .env from: {dotenv_path}")
28
+ # print(f"[DEBUG] LITELLM_MODEL={os.environ.get('LITELLM_MODEL')}")
29
+ # print(f"[DEBUG] LITELLM_BASE_URL={os.environ.get('LITELLM_BASE_URL')}")
30
+ # print(f"[DEBUG] LITELLM_API_KEY={'set' if os.environ.get('LITELLM_API_KEY') else 'NOT SET'}")
31
+
17
32
  async def _run_blueprint_async_with_shutdown(blueprint: 'BlueprintBase', instruction: str):
18
33
  """Runs the blueprint's async method and handles graceful shutdown."""
19
34
  loop = asyncio.get_running_loop()
@@ -40,55 +55,20 @@ async def _run_blueprint_async_with_shutdown(blueprint: 'BlueprintBase', instruc
40
55
  logger.error(f"Unexpected error setting fallback signal handler for {sig.name}: {e}", exc_info=True)
41
56
 
42
57
 
43
- # Wrap the main execution in a task to allow cancellation
44
- main_task = loop.create_task(blueprint._run_non_interactive(instruction), name=f"BlueprintRun_{blueprint.__class__.__name__}")
45
-
46
- # Wait for either the main task or the stop event
47
- done, pending = await asyncio.wait(
48
- [main_task, loop.create_task(stop_event.wait(), name="ShutdownWatcher")],
49
- return_when=asyncio.FIRST_COMPLETED
50
- )
58
+ # Instead of wrapping in a task and awaiting, use async for to support async generators
59
+ try:
60
+ async for chunk in blueprint._run_non_interactive(instruction):
61
+ # Print the full JSON chunk
62
+ print(json.dumps(chunk, ensure_ascii=False))
63
+ # If chunk contains 'messages', print each assistant message's content for CLI/test UX
64
+ if isinstance(chunk, dict) and 'messages' in chunk:
65
+ for msg in chunk['messages']:
66
+ if msg.get('role') == 'assistant' and 'content' in msg:
67
+ print(msg['content'])
68
+ except Exception as e:
69
+ logger.critical(f"Blueprint execution failed with unhandled exception: {e}", exc_info=True)
70
+ sys.exit(1)
51
71
 
52
- # Cleanup signal handlers after wait returns
53
- for sig in (signal.SIGINT, signal.SIGTERM):
54
- try:
55
- loop.remove_signal_handler(sig)
56
- except NotImplementedError:
57
- try:
58
- signal.signal(sig, signal.SIG_DFL) # Restore default handler
59
- except Exception:
60
- pass # Ignore errors during cleanup
61
-
62
- # Check if the stop event was triggered
63
- if stop_event.is_set():
64
- logger.warning("Graceful shutdown initiated. Cancelling main task...")
65
- if not main_task.done():
66
- main_task.cancel()
67
- try:
68
- # Wait briefly for cancellation to propagate and cleanup within the task
69
- await asyncio.wait_for(main_task, timeout=10.0) # Increased timeout slightly
70
- except asyncio.CancelledError:
71
- logger.info("Main task successfully cancelled.")
72
- except asyncio.TimeoutError:
73
- logger.error("Main task did not cancel within timeout. Potential resource leak.")
74
- except Exception as e:
75
- logger.error(f"Error during task cancellation waiting: {e}", exc_info=True)
76
- else:
77
- logger.info("Main task already completed before cancellation request.")
78
- # The _run_non_interactive's AsyncExitStack should handle MCP cleanup
79
- else:
80
- # If the main task finished first, check for exceptions
81
- if main_task in done:
82
- try:
83
- main_task.result() # Raise exception if one occurred in the task
84
- logger.debug("Main task completed successfully.")
85
- except asyncio.CancelledError:
86
- logger.info("Main task was cancelled externally (unexpected).")
87
- except Exception as e:
88
- # Error should have been logged within _run_non_interactive
89
- # We exit here because the main operation failed
90
- logger.critical(f"Blueprint execution failed with unhandled exception: {e}", exc_info=True)
91
- sys.exit(1) # Exit with error status if task failed
92
72
 
93
73
 
94
74
  def run_blueprint_cli(
@@ -149,14 +129,13 @@ def run_blueprint_cli(
149
129
  # --- Instantiate and Run Blueprint ---
150
130
  blueprint_instance: Optional['BlueprintBase'] = None
151
131
  try:
132
+ # Always provide a blueprint_id (use class name if not supplied by CLI args)
133
+ blueprint_id = getattr(args, 'blueprint_id', None) or getattr(blueprint_cls, 'DEFAULT_BLUEPRINT_ID', None) or blueprint_cls.__name__
152
134
  # Instantiate the blueprint, passing necessary config/flags
153
135
  blueprint_instance = blueprint_cls(
154
- config_path_override=args.config_path,
155
- profile_override=args.profile,
156
- config_overrides=cli_config_overrides,
157
- debug=args.debug,
158
- quiet=args.quiet,
159
- force_markdown=args.markdown,
136
+ blueprint_id,
137
+ config_path=args.config_path,
138
+
160
139
  # Pass necessary context if needed by __init__
161
140
  # default_config_path=default_config_path,
162
141
  # swarm_version=swarm_version
@@ -182,4 +161,3 @@ def run_blueprint_cli(
182
161
  finally:
183
162
  logger.debug("Blueprint CLI execution finished.")
184
163
  # Any final cleanup outside the async loop (rarely needed here)
185
-