agentcrew-ai 0.8.12__tar.gz → 0.9.0__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.
- agentcrew_ai-0.9.0/AgentCrew/__init__.py +1 -0
- agentcrew_ai-0.9.0/AgentCrew/app.py +405 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/main.py +55 -3
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/main_docker.py +1 -30
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/local_agent.py +26 -1
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/command_processor.py +33 -8
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/handler.py +5 -1
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/__init__.py +8 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/__init__.py +67 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/base.py +93 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/cpp_parser.py +127 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/csharp_parser.py +162 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/generic_parser.py +63 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/go_parser.py +154 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/java_parser.py +103 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/javascript_parser.py +268 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/kotlin_parser.py +84 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/php_parser.py +107 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/python_parser.py +60 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/ruby_parser.py +46 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/parsers/rust_parser.py +72 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/code_analysis/service.py +826 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/command_execution/constants.py +2 -2
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/completers.py +1 -1
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/confirmation_handler.py +4 -4
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/console_ui.py +17 -3
- agentcrew_ai-0.9.0/AgentCrew/modules/console/conversation_browser/__init__.py +9 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/console/conversation_browser/browser.py +84 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/console/conversation_browser/browser_input_handler.py +279 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/console/conversation_browser/browser_ui.py +643 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/conversation_handler.py +34 -1
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/diff_display.py +22 -51
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/display_handlers.py +142 -26
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/tool_display.py +4 -6
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/service.py +8 -8
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/tool.py +65 -67
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/command_handler.py +137 -29
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/tool_handlers.py +0 -2
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/themes/README.md +30 -14
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/__init__.py +4 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/atom_light.yaml +1287 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/catppuccin.yaml +1276 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/dracula.yaml +1262 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/nord.yaml +1267 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/saigontech.yaml +1268 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/style_provider.py +234 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/theme_loader.py +379 -0
- agentcrew_ai-0.9.0/AgentCrew/modules/gui/themes/unicorn.yaml +1276 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/global_settings.py +3 -4
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/diff_widget.py +30 -61
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/constants.py +18 -9
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/context_persistent.py +1 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/tool.py +1 -1
- agentcrew_ai-0.9.0/AgentCrew/setup.py +470 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/MANIFEST.in +1 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/PKG-INFO +1 -1
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/PKG-INFO +1 -1
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/SOURCES.txt +25 -6
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/pyproject.toml +1 -1
- agentcrew_ai-0.8.12/AgentCrew/__init__.py +0 -1
- agentcrew_ai-0.8.12/AgentCrew/app.py +0 -1004
- agentcrew_ai-0.8.12/AgentCrew/modules/code_analysis/service.py +0 -1492
- agentcrew_ai-0.8.12/AgentCrew/modules/gui/themes/__init__.py +0 -3
- agentcrew_ai-0.8.12/AgentCrew/modules/gui/themes/atom_light.py +0 -1365
- agentcrew_ai-0.8.12/AgentCrew/modules/gui/themes/catppuccin.py +0 -1404
- agentcrew_ai-0.8.12/AgentCrew/modules/gui/themes/dracula.py +0 -1372
- agentcrew_ai-0.8.12/AgentCrew/modules/gui/themes/nord.py +0 -1365
- agentcrew_ai-0.8.12/AgentCrew/modules/gui/themes/saigontech.py +0 -1359
- agentcrew_ai-0.8.12/AgentCrew/modules/gui/themes/style_provider.py +0 -422
- agentcrew_ai-0.8.12/AgentCrew/modules/gui/themes/unicorn.py +0 -1372
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/assets/agentcrew_logo.png +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/adapters.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/agent_cards.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/client/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/client/card_resolver.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/client/client.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/server/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/server/auth_middleware.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/server/task_manager.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/common/server/utils.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/errors.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/registry.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/server.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/a2a/task_manager.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/base.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/example.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/manager.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/remote_agent.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/tools/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/tools/ask.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/tools/delegate.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/agents/tools/transfer.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/anthropic/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/anthropic/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/chrome_manager.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/element_extractor.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/click_element.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/draw_element_boxes.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/extract_clickable_elements.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/extract_elements_by_text.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/extract_input_elements.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/extract_scrollable_elements.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/filter_hidden_elements.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/focus_and_clear_element.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/remove_element_boxes.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/scroll_to_element.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js/trigger_input_events.js +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/js_loader.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/browser_automation/tool.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/consolidation.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/file_handler.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/history.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/base.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/conversation.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/tool_manager.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message_handler.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/clipboard/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/clipboard/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/clipboard/tool.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/file_search_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/grep_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/code_analysis/tool.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/command_execution/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/command_execution/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/command_execution/tool.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/command_execution/types.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/config/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/config/config_management.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/command_handlers.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/constants.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/input_handler.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/ui_effects.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/console/utils.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/custom_llm/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/custom_llm/copilot_response_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/custom_llm/deepinfra_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/custom_llm/github_copilot_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/custom_llm/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/safety_validator.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/search_replace_engine.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/file_editing/tree_sitter_checker.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/google/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/google/native_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/google/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/groq/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/groq/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/chat_components.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/completers.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/conversation_components.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/input_components.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/keyboard_handler.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/menu_components.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/message_handlers.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/components/ui_state_manager.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/qt_ui.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/utils/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/utils/macos_clipboard.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/utils/strings.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/utils/wins_clipboard.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/config_window.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/agent_config.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/custom_llm_provider.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/mcp_config.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/configs/save_worker.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/history_sidebar.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/json_editor.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/loading_overlay.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/markdown_editor.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/message_bubble.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/paste_aware_textedit.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/system_message.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/token_usage.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/widgets/tool_widget.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/gui/worker.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/image_generation/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/image_generation/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/image_generation/tool.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/base.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/model_registry.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/service_manager.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/llm/types.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/auth.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/config.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/manager.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/mcpclient/tool.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/base_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/chroma_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/github_copilot_ef.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/google_genai_ef.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/memory/voyageai_ef.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/openai/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/openai/response_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/openai/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/prompts/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/prompts/constants.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/tools/README.md +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/tools/registration.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/tools/registry.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/audio_handler.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/base.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/deepinfra_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/elevenlabs_service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/voice/text_cleaner.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/web_search/__init__.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/web_search/service.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/web_search/tool.py +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/CONTRIBUTING.md +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/LICENSE +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/README.md +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/dependency_links.txt +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/entry_points.txt +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/requires.txt +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/agentcrew_ai.egg-info/top_level.txt +0 -0
- {agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.0"
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import json
|
|
4
|
+
import asyncio
|
|
5
|
+
import functools
|
|
6
|
+
import nest_asyncio
|
|
7
|
+
from typing import Optional, Dict, Any, List
|
|
8
|
+
|
|
9
|
+
import click
|
|
10
|
+
|
|
11
|
+
from AgentCrew.setup import ApplicationSetup, PROVIDER_LIST
|
|
12
|
+
from AgentCrew.modules.config import ConfigManagement
|
|
13
|
+
from AgentCrew.modules.llm.service_manager import ServiceManager
|
|
14
|
+
from AgentCrew.modules.agents.local_agent import LocalAgent
|
|
15
|
+
|
|
16
|
+
nest_asyncio.apply()
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def common_options(func):
|
|
20
|
+
@click.option(
|
|
21
|
+
"--provider",
|
|
22
|
+
type=click.Choice(PROVIDER_LIST),
|
|
23
|
+
default=None,
|
|
24
|
+
help="LLM provider to use (claude, groq, openai, google, github_copilot, or deepinfra)",
|
|
25
|
+
)
|
|
26
|
+
@click.option(
|
|
27
|
+
"--agent-config",
|
|
28
|
+
default=None,
|
|
29
|
+
help="Path/URL to the agent configuration file.",
|
|
30
|
+
)
|
|
31
|
+
@click.option(
|
|
32
|
+
"--mcp-config", default=None, help="Path to the mcp servers configuration file."
|
|
33
|
+
)
|
|
34
|
+
@click.option(
|
|
35
|
+
"--memory-llm",
|
|
36
|
+
type=click.Choice(
|
|
37
|
+
["claude", "groq", "openai", "google", "deepinfra", "github_copilot"]
|
|
38
|
+
),
|
|
39
|
+
default=None,
|
|
40
|
+
help="LLM Model use for analyzing and processing memory",
|
|
41
|
+
)
|
|
42
|
+
@click.option(
|
|
43
|
+
"--memory-path", default=None, help="Path to the memory database location"
|
|
44
|
+
)
|
|
45
|
+
@functools.wraps(func)
|
|
46
|
+
def wrapper(*args, **kwargs):
|
|
47
|
+
return func(*args, **kwargs)
|
|
48
|
+
|
|
49
|
+
return wrapper
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class AgentCrewApplication:
|
|
53
|
+
def __init__(self):
|
|
54
|
+
self.config_manager = ConfigManagement()
|
|
55
|
+
self.setup = ApplicationSetup(self.config_manager)
|
|
56
|
+
self.setup.load_api_keys_from_config()
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def services(self) -> Optional[Dict[str, Any]]:
|
|
60
|
+
return self.setup.services
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def agent_manager(self):
|
|
64
|
+
return self.setup.agent_manager
|
|
65
|
+
|
|
66
|
+
def run_console(
|
|
67
|
+
self,
|
|
68
|
+
provider: Optional[str] = None,
|
|
69
|
+
agent_config: Optional[str] = None,
|
|
70
|
+
mcp_config: Optional[str] = None,
|
|
71
|
+
memory_llm: Optional[str] = None,
|
|
72
|
+
with_voice: bool = False,
|
|
73
|
+
) -> None:
|
|
74
|
+
from AgentCrew.modules.console import ConsoleUI
|
|
75
|
+
from AgentCrew.modules.chat import MessageHandler
|
|
76
|
+
from AgentCrew.modules.mcpclient import MCPSessionManager
|
|
77
|
+
|
|
78
|
+
try:
|
|
79
|
+
if provider is None:
|
|
80
|
+
provider = self.setup.detect_provider()
|
|
81
|
+
if provider is None:
|
|
82
|
+
raise ValueError(
|
|
83
|
+
"No LLM API key found. Please set either ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, or DEEPINFRA_API_KEY"
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
services = self.setup.setup_services(provider, memory_llm)
|
|
87
|
+
|
|
88
|
+
if mcp_config:
|
|
89
|
+
os.environ["MCP_CONFIG_PATH"] = mcp_config
|
|
90
|
+
|
|
91
|
+
self.setup.setup_agents(services, agent_config)
|
|
92
|
+
self.setup.restore_last_agent()
|
|
93
|
+
|
|
94
|
+
message_handler = MessageHandler(
|
|
95
|
+
services["memory"], services["context_persistent"], with_voice
|
|
96
|
+
)
|
|
97
|
+
global_config = self.config_manager.read_global_config_data()
|
|
98
|
+
|
|
99
|
+
ui = ConsoleUI(
|
|
100
|
+
message_handler,
|
|
101
|
+
global_config.get("global_settings", {}).get("swap_enter", False),
|
|
102
|
+
)
|
|
103
|
+
ui.start()
|
|
104
|
+
except Exception as e:
|
|
105
|
+
import traceback
|
|
106
|
+
|
|
107
|
+
print(traceback.format_exc())
|
|
108
|
+
click.echo(f"❌ Error: {str(e)}", err=True)
|
|
109
|
+
finally:
|
|
110
|
+
MCPSessionManager.get_instance().cleanup()
|
|
111
|
+
|
|
112
|
+
def run_gui(
|
|
113
|
+
self,
|
|
114
|
+
provider: Optional[str] = None,
|
|
115
|
+
agent_config: Optional[str] = None,
|
|
116
|
+
mcp_config: Optional[str] = None,
|
|
117
|
+
memory_llm: Optional[str] = None,
|
|
118
|
+
with_voice: bool = False,
|
|
119
|
+
) -> None:
|
|
120
|
+
from PySide6.QtCore import QCoreApplication
|
|
121
|
+
from PySide6.QtCore import Qt
|
|
122
|
+
from PySide6.QtWidgets import QApplication
|
|
123
|
+
from AgentCrew.modules.gui import ChatWindow
|
|
124
|
+
from AgentCrew.modules.chat import MessageHandler
|
|
125
|
+
from AgentCrew.modules.mcpclient import MCPSessionManager
|
|
126
|
+
|
|
127
|
+
try:
|
|
128
|
+
if provider is None:
|
|
129
|
+
provider = self.setup.detect_provider()
|
|
130
|
+
if provider is None:
|
|
131
|
+
from AgentCrew.modules.gui.widgets.config_window import ConfigWindow
|
|
132
|
+
|
|
133
|
+
app = QApplication(sys.argv)
|
|
134
|
+
config_window = ConfigWindow()
|
|
135
|
+
config_window.tab_widget.setCurrentIndex(3)
|
|
136
|
+
config_window.show()
|
|
137
|
+
sys.exit(app.exec())
|
|
138
|
+
|
|
139
|
+
services = self.setup.setup_services(provider, memory_llm)
|
|
140
|
+
|
|
141
|
+
if mcp_config:
|
|
142
|
+
os.environ["MCP_CONFIG_PATH"] = mcp_config
|
|
143
|
+
|
|
144
|
+
self.setup.setup_agents(services, agent_config)
|
|
145
|
+
self.setup.restore_last_agent()
|
|
146
|
+
|
|
147
|
+
message_handler = MessageHandler(
|
|
148
|
+
services["memory"], services["context_persistent"], with_voice
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_UseOpenGLES)
|
|
152
|
+
app = QApplication(sys.argv)
|
|
153
|
+
chat_window = ChatWindow(message_handler)
|
|
154
|
+
chat_window.show()
|
|
155
|
+
sys.exit(app.exec())
|
|
156
|
+
except Exception as e:
|
|
157
|
+
import traceback
|
|
158
|
+
|
|
159
|
+
print(traceback.format_exc())
|
|
160
|
+
click.echo(f"❌ Error: {str(e)}", err=True)
|
|
161
|
+
finally:
|
|
162
|
+
MCPSessionManager.get_instance().cleanup()
|
|
163
|
+
|
|
164
|
+
def run_server(
|
|
165
|
+
self,
|
|
166
|
+
host: str = "0.0.0.0",
|
|
167
|
+
port: int = 41241,
|
|
168
|
+
base_url: Optional[str] = None,
|
|
169
|
+
provider: Optional[str] = None,
|
|
170
|
+
model_id: Optional[str] = None,
|
|
171
|
+
agent_config: Optional[str] = None,
|
|
172
|
+
api_key: Optional[str] = None,
|
|
173
|
+
mcp_config: Optional[str] = None,
|
|
174
|
+
memory_llm: Optional[str] = None,
|
|
175
|
+
) -> None:
|
|
176
|
+
from AgentCrew.modules.a2a.server import A2AServer
|
|
177
|
+
from AgentCrew.modules.mcpclient import MCPSessionManager
|
|
178
|
+
|
|
179
|
+
try:
|
|
180
|
+
if not base_url:
|
|
181
|
+
base_url = f"http://{host}:{port}"
|
|
182
|
+
|
|
183
|
+
if provider is None:
|
|
184
|
+
provider = self.setup.detect_provider()
|
|
185
|
+
if provider is None:
|
|
186
|
+
raise ValueError(
|
|
187
|
+
"No LLM API key found. Please set either ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, or DEEPINFRA_API_KEY"
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
services = self.setup.setup_services(
|
|
191
|
+
provider, memory_llm, need_memory=False
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
if mcp_config:
|
|
195
|
+
os.environ["MCP_CONFIG_PATH"] = mcp_config
|
|
196
|
+
|
|
197
|
+
os.environ["AGENTCREW_DISABLE_GUI"] = "true"
|
|
198
|
+
|
|
199
|
+
self.setup.setup_agents(services, agent_config, provider, model_id)
|
|
200
|
+
|
|
201
|
+
if self.agent_manager is None:
|
|
202
|
+
raise ValueError("Agent manager is not initialized")
|
|
203
|
+
|
|
204
|
+
self.agent_manager.enforce_transfer = False
|
|
205
|
+
|
|
206
|
+
server = A2AServer(
|
|
207
|
+
agent_manager=self.agent_manager,
|
|
208
|
+
host=host,
|
|
209
|
+
port=port,
|
|
210
|
+
base_url=base_url,
|
|
211
|
+
api_key=api_key,
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
click.echo(f"Starting A2A server on {host}:{port}")
|
|
215
|
+
click.echo(
|
|
216
|
+
f"Available agents: {', '.join(self.agent_manager.agents.keys())}"
|
|
217
|
+
)
|
|
218
|
+
server.start()
|
|
219
|
+
except Exception as e:
|
|
220
|
+
import traceback
|
|
221
|
+
|
|
222
|
+
print(traceback.format_exc())
|
|
223
|
+
click.echo(f"❌ Error: {str(e)}", err=True)
|
|
224
|
+
finally:
|
|
225
|
+
MCPSessionManager.get_instance().cleanup()
|
|
226
|
+
|
|
227
|
+
def _parse_output_schema(self, schema_input: str) -> tuple[str, dict]:
|
|
228
|
+
try:
|
|
229
|
+
from AgentCrew.modules.prompts.constants import SCHEMA_ENFORCEMENT_PROMPT
|
|
230
|
+
|
|
231
|
+
if os.path.exists(schema_input):
|
|
232
|
+
with open(schema_input, "r", encoding="utf-8") as f:
|
|
233
|
+
schema_dict = json.load(f)
|
|
234
|
+
else:
|
|
235
|
+
schema_dict = json.loads(schema_input)
|
|
236
|
+
|
|
237
|
+
schema_json = json.dumps(schema_dict, indent=2)
|
|
238
|
+
|
|
239
|
+
enforcement_prompt = SCHEMA_ENFORCEMENT_PROMPT.replace(
|
|
240
|
+
"{schema_json}", schema_json
|
|
241
|
+
)
|
|
242
|
+
return enforcement_prompt, schema_dict
|
|
243
|
+
|
|
244
|
+
except json.JSONDecodeError as e:
|
|
245
|
+
raise ValueError(f"Invalid JSON schema: {e}")
|
|
246
|
+
except Exception as e:
|
|
247
|
+
raise ValueError(f"Failed to load output schema: {e}")
|
|
248
|
+
|
|
249
|
+
def _validate_response_against_schema(
|
|
250
|
+
self, response: str, schema_dict: Dict[str, Any]
|
|
251
|
+
) -> tuple[bool, Optional[str]]:
|
|
252
|
+
from jsonschema import validate, ValidationError
|
|
253
|
+
|
|
254
|
+
try:
|
|
255
|
+
response_json = json.loads(response)
|
|
256
|
+
except json.JSONDecodeError as e:
|
|
257
|
+
return (
|
|
258
|
+
False,
|
|
259
|
+
f"Response is not valid JSON: {e}\n\nResponse received:\n{response[:500]}",
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
try:
|
|
263
|
+
validate(instance=response_json, schema=schema_dict)
|
|
264
|
+
return True, None
|
|
265
|
+
except ValidationError as e:
|
|
266
|
+
error_details = (
|
|
267
|
+
"JSON Schema Validation Error:\n"
|
|
268
|
+
f" - Path: {' -> '.join(str(p) for p in e.path) if e.path else 'root'}\n"
|
|
269
|
+
f" - Error: {e.message}\n"
|
|
270
|
+
f" - Failed value: {json.dumps(e.instance, indent=2)}\n"
|
|
271
|
+
)
|
|
272
|
+
if e.schema_path:
|
|
273
|
+
error_details += (
|
|
274
|
+
f" - Schema path: {' -> '.join(str(p) for p in e.schema_path)}\n"
|
|
275
|
+
)
|
|
276
|
+
return False, error_details
|
|
277
|
+
|
|
278
|
+
def run_job(
|
|
279
|
+
self,
|
|
280
|
+
agent: str,
|
|
281
|
+
task: str,
|
|
282
|
+
files: Optional[List[str]] = None,
|
|
283
|
+
provider: Optional[str] = None,
|
|
284
|
+
model_id: Optional[str] = None,
|
|
285
|
+
agent_config: Optional[str] = None,
|
|
286
|
+
mcp_config: Optional[str] = None,
|
|
287
|
+
memory_llm: Optional[str] = None,
|
|
288
|
+
output_schema: Optional[str] = None,
|
|
289
|
+
) -> str:
|
|
290
|
+
from AgentCrew.modules.chat import MessageHandler
|
|
291
|
+
from AgentCrew.modules.mcpclient import MCPSessionManager
|
|
292
|
+
from AgentCrew.modules.llm.model_registry import ModelRegistry
|
|
293
|
+
|
|
294
|
+
try:
|
|
295
|
+
if provider is None:
|
|
296
|
+
provider = self.setup.detect_provider()
|
|
297
|
+
if provider is None:
|
|
298
|
+
raise ValueError(
|
|
299
|
+
"No LLM API key found. Please set either ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, or DEEPINFRA_API_KEY"
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
services = self.setup.setup_services(
|
|
303
|
+
provider, memory_llm, need_memory=False
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
if mcp_config:
|
|
307
|
+
os.environ["MCP_CONFIG_PATH"] = mcp_config
|
|
308
|
+
|
|
309
|
+
os.environ["AGENTCREW_DISABLE_GUI"] = "true"
|
|
310
|
+
|
|
311
|
+
self.setup.setup_agents(services, agent_config)
|
|
312
|
+
|
|
313
|
+
llm_manager = ServiceManager.get_instance()
|
|
314
|
+
|
|
315
|
+
llm_service = llm_manager.get_service(provider)
|
|
316
|
+
if model_id:
|
|
317
|
+
llm_service.model = model_id
|
|
318
|
+
|
|
319
|
+
if self.agent_manager is None:
|
|
320
|
+
raise ValueError("Agent manager is not initialized")
|
|
321
|
+
|
|
322
|
+
self.agent_manager.update_llm_service(llm_service)
|
|
323
|
+
|
|
324
|
+
for local_agent in self.agent_manager.agents:
|
|
325
|
+
if isinstance(local_agent, LocalAgent):
|
|
326
|
+
local_agent.is_remoting_mode = True
|
|
327
|
+
|
|
328
|
+
self.agent_manager.enforce_transfer = False
|
|
329
|
+
self.agent_manager.one_turn_process = True
|
|
330
|
+
|
|
331
|
+
current_agent = self.agent_manager.get_local_agent(agent)
|
|
332
|
+
|
|
333
|
+
if current_agent:
|
|
334
|
+
schema_dict = None
|
|
335
|
+
if output_schema:
|
|
336
|
+
schema_prompt, schema_dict = self._parse_output_schema(
|
|
337
|
+
output_schema
|
|
338
|
+
)
|
|
339
|
+
if "structured_output" in ModelRegistry.get_model_capabilities(
|
|
340
|
+
f"{provider}/{model_id}"
|
|
341
|
+
):
|
|
342
|
+
current_agent.llm.structured_output = schema_dict
|
|
343
|
+
else:
|
|
344
|
+
current_agent.set_custom_system_prompt(schema_prompt)
|
|
345
|
+
|
|
346
|
+
self.agent_manager.select_agent(current_agent.name)
|
|
347
|
+
|
|
348
|
+
message_handler = MessageHandler(
|
|
349
|
+
services["memory"], services["context_persistent"]
|
|
350
|
+
)
|
|
351
|
+
message_handler.is_non_interactive = True
|
|
352
|
+
message_handler.agent = current_agent
|
|
353
|
+
|
|
354
|
+
if files:
|
|
355
|
+
for file_path in files:
|
|
356
|
+
asyncio.run(
|
|
357
|
+
message_handler.process_user_input(f"/file {file_path}")
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
max_attempts = 4
|
|
361
|
+
attempt = 0
|
|
362
|
+
response = None
|
|
363
|
+
|
|
364
|
+
asyncio.run(message_handler.process_user_input(task))
|
|
365
|
+
|
|
366
|
+
while attempt < max_attempts:
|
|
367
|
+
attempt += 1
|
|
368
|
+
response, _, _ = asyncio.run(
|
|
369
|
+
message_handler.get_assistant_response()
|
|
370
|
+
)
|
|
371
|
+
if not output_schema or not schema_dict:
|
|
372
|
+
break
|
|
373
|
+
|
|
374
|
+
if response is None:
|
|
375
|
+
asyncio.run(
|
|
376
|
+
message_handler.process_user_input(
|
|
377
|
+
"No response was generated. Please try again."
|
|
378
|
+
)
|
|
379
|
+
)
|
|
380
|
+
continue
|
|
381
|
+
|
|
382
|
+
success, retry_message = self._validate_response_against_schema(
|
|
383
|
+
response, schema_dict
|
|
384
|
+
)
|
|
385
|
+
if success:
|
|
386
|
+
break
|
|
387
|
+
else:
|
|
388
|
+
if retry_message:
|
|
389
|
+
asyncio.run(
|
|
390
|
+
message_handler.process_user_input(retry_message)
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
MCPSessionManager.get_instance().cleanup()
|
|
394
|
+
return response.strip() if response else ""
|
|
395
|
+
else:
|
|
396
|
+
raise ValueError(f"Agent '{agent}' not found")
|
|
397
|
+
|
|
398
|
+
except Exception:
|
|
399
|
+
import traceback
|
|
400
|
+
|
|
401
|
+
print(traceback.format_exc())
|
|
402
|
+
raise
|
|
403
|
+
|
|
404
|
+
def login(self) -> bool:
|
|
405
|
+
return self.setup.login()
|
|
@@ -86,7 +86,7 @@ def check_and_update():
|
|
|
86
86
|
current_version = get_current_version()
|
|
87
87
|
|
|
88
88
|
click.echo(f"Current version: {current_version}\nChecking for updates...")
|
|
89
|
-
latest_version =
|
|
89
|
+
latest_version, release_notes = get_latest_release_info()
|
|
90
90
|
|
|
91
91
|
if not current_version or not latest_version:
|
|
92
92
|
click.echo("⚠️ Could not determine version information", err=True)
|
|
@@ -98,8 +98,20 @@ def check_and_update():
|
|
|
98
98
|
system = platform.system().lower()
|
|
99
99
|
|
|
100
100
|
if system == "linux" or system == "darwin":
|
|
101
|
+
click.echo("\n" + "=" * 60)
|
|
102
|
+
click.echo("🔄 New version available!")
|
|
103
|
+
click.echo("=" * 60)
|
|
104
|
+
|
|
105
|
+
if release_notes:
|
|
106
|
+
click.echo("\n📝 Release Notes:")
|
|
107
|
+
click.echo("-" * 40)
|
|
108
|
+
click.echo(release_notes)
|
|
109
|
+
click.echo("-" * 40 + "\n")
|
|
110
|
+
else:
|
|
111
|
+
click.echo("\n⚠️ Could not fetch release notes.")
|
|
112
|
+
|
|
101
113
|
if click.confirm(
|
|
102
|
-
"
|
|
114
|
+
"\nDo you want to update now?",
|
|
103
115
|
default=False,
|
|
104
116
|
):
|
|
105
117
|
click.echo("🔄 Starting update...")
|
|
@@ -109,7 +121,18 @@ def check_and_update():
|
|
|
109
121
|
click.echo("⏭️ Skipping update. Starting application...")
|
|
110
122
|
else:
|
|
111
123
|
command = "uv tool install --python=3.12 --reinstall agentcrew-ai[cpu]@latest --index https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match"
|
|
112
|
-
|
|
124
|
+
|
|
125
|
+
click.echo("\n" + "=" * 60)
|
|
126
|
+
click.echo("🔄 New version available!")
|
|
127
|
+
click.echo("=" * 60)
|
|
128
|
+
|
|
129
|
+
if release_notes:
|
|
130
|
+
click.echo("\n📝 Release Notes:")
|
|
131
|
+
click.echo("-" * 40)
|
|
132
|
+
click.echo(release_notes)
|
|
133
|
+
click.echo("-" * 40 + "\n")
|
|
134
|
+
|
|
135
|
+
click.echo(f"Run the following command to update:\n\n{command}")
|
|
113
136
|
else:
|
|
114
137
|
click.echo("✅ You are running the latest version")
|
|
115
138
|
|
|
@@ -157,6 +180,35 @@ def get_latest_github_version():
|
|
|
157
180
|
return None
|
|
158
181
|
|
|
159
182
|
|
|
183
|
+
def get_latest_release_info():
|
|
184
|
+
"""Get the latest release information including version and release notes from GitHub
|
|
185
|
+
|
|
186
|
+
Returns:
|
|
187
|
+
tuple: (version, release_notes) where both can be None if not found.
|
|
188
|
+
"""
|
|
189
|
+
try:
|
|
190
|
+
api_url = (
|
|
191
|
+
"https://api.github.com/repos/saigontechnology/AgentCrew/releases/latest"
|
|
192
|
+
)
|
|
193
|
+
response = requests.get(api_url, timeout=10)
|
|
194
|
+
|
|
195
|
+
if response.status_code == 200:
|
|
196
|
+
release_data = response.json()
|
|
197
|
+
tag_name = release_data.get("tag_name", "").lstrip("v")
|
|
198
|
+
name = release_data.get("name", "")
|
|
199
|
+
body = release_data.get("body", "")
|
|
200
|
+
|
|
201
|
+
release_notes = None
|
|
202
|
+
if body:
|
|
203
|
+
release_notes = f"## {name or tag_name}\n\n{body}"
|
|
204
|
+
|
|
205
|
+
return tag_name, release_notes
|
|
206
|
+
|
|
207
|
+
return None, None
|
|
208
|
+
except Exception:
|
|
209
|
+
return None, None
|
|
210
|
+
|
|
211
|
+
|
|
160
212
|
def version_is_older(current: str, latest: str) -> bool:
|
|
161
213
|
"""
|
|
162
214
|
Compare two semantic version strings to check if current is older than latest.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import click
|
|
2
2
|
import os
|
|
3
3
|
import sys
|
|
4
|
+
from AgentCrew.app import common_options
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
def _custom_unraisable_hook(unraisable):
|
|
@@ -48,36 +49,6 @@ def cli():
|
|
|
48
49
|
)
|
|
49
50
|
|
|
50
51
|
|
|
51
|
-
def common_options(func):
|
|
52
|
-
import functools
|
|
53
|
-
|
|
54
|
-
@click.option(
|
|
55
|
-
"--provider",
|
|
56
|
-
type=click.Choice(PROVIDER_LIST),
|
|
57
|
-
default=None,
|
|
58
|
-
help="LLM provider to use (claude, groq, openai, google, github_copilot, or deepinfra)",
|
|
59
|
-
)
|
|
60
|
-
@click.option(
|
|
61
|
-
"--agent-config", default=None, help="Path/URL to the agent configuration file."
|
|
62
|
-
)
|
|
63
|
-
@click.option(
|
|
64
|
-
"--mcp-config", default=None, help="Path to the mcp servers configuration file."
|
|
65
|
-
)
|
|
66
|
-
@click.option(
|
|
67
|
-
"--memory-llm",
|
|
68
|
-
type=click.Choice(
|
|
69
|
-
["claude", "groq", "openai", "google", "deepinfra", "github_copilot"]
|
|
70
|
-
),
|
|
71
|
-
default=None,
|
|
72
|
-
help="LLM Model use for analyzing and processing memory",
|
|
73
|
-
)
|
|
74
|
-
@functools.wraps(func)
|
|
75
|
-
def wrapper(*args, **kwargs):
|
|
76
|
-
return func(*args, **kwargs)
|
|
77
|
-
|
|
78
|
-
return wrapper
|
|
79
|
-
|
|
80
|
-
|
|
81
52
|
def cli_prod():
|
|
82
53
|
if sys.argv[1] == "--version":
|
|
83
54
|
click.echo(f"AgentCrew version: {get_current_version()}")
|
|
@@ -604,6 +604,21 @@ Whenever condition on `when` clause in a **Behavior** matches, tailor your respo
|
|
|
604
604
|
)
|
|
605
605
|
return adaptive_messages
|
|
606
606
|
|
|
607
|
+
def _get_directory_structure(self) -> str:
|
|
608
|
+
try:
|
|
609
|
+
cwd = os.getcwd()
|
|
610
|
+
entries = []
|
|
611
|
+
for entry in sorted(os.listdir(cwd)):
|
|
612
|
+
full_path = os.path.join(cwd, entry)
|
|
613
|
+
if os.path.isdir(full_path):
|
|
614
|
+
entries.append(f"{entry}/")
|
|
615
|
+
else:
|
|
616
|
+
entries.append(entry)
|
|
617
|
+
return "\n".join(entries) if entries else ""
|
|
618
|
+
except Exception as e:
|
|
619
|
+
logger.warning(f"Failed to get directory structure: {e}")
|
|
620
|
+
return ""
|
|
621
|
+
|
|
607
622
|
def _enhance_agent_context_messages(self, final_messages: List[Dict[str, Any]]):
|
|
608
623
|
last_user_index = next(
|
|
609
624
|
(
|
|
@@ -651,6 +666,16 @@ Whenever condition on `when` clause in a **Behavior** matches, tailor your respo
|
|
|
651
666
|
- Skip agent evaluation if user request is when...,[action]... related to adaptive behaviors call `adapt` tool instead.""",
|
|
652
667
|
},
|
|
653
668
|
)
|
|
669
|
+
if last_user_index == 0:
|
|
670
|
+
dir_structure = self._get_directory_structure()
|
|
671
|
+
if dir_structure:
|
|
672
|
+
adaptive_messages["content"].append(
|
|
673
|
+
{
|
|
674
|
+
"type": "text",
|
|
675
|
+
"text": f"cwd `{os.getcwd()}` structure:\n{dir_structure}",
|
|
676
|
+
}
|
|
677
|
+
)
|
|
678
|
+
|
|
654
679
|
if len(adaptive_messages["content"]) > 0:
|
|
655
680
|
final_messages.insert(last_user_index, adaptive_messages)
|
|
656
681
|
|
|
@@ -738,7 +763,7 @@ Whenever condition on `when` clause in a **Behavior** matches, tailor your respo
|
|
|
738
763
|
continue
|
|
739
764
|
|
|
740
765
|
if is_shrinkable and i < shrink_threshold:
|
|
741
|
-
msg["content"] = "[
|
|
766
|
+
msg["content"] = "[PRUNED]"
|
|
742
767
|
continue
|
|
743
768
|
|
|
744
769
|
# Check if content starts with [UNIQUE]
|
{agentcrew_ai-0.8.12 → agentcrew_ai-0.9.0}/AgentCrew/modules/chat/message/command_processor.py
RENAMED
|
@@ -43,14 +43,8 @@ class CommandProcessor:
|
|
|
43
43
|
return CommandResult(handled=True, clear_flag=True)
|
|
44
44
|
elif user_input.lower().startswith("/copy"):
|
|
45
45
|
return await self._handle_copy_command(user_input)
|
|
46
|
-
elif user_input.lower()
|
|
47
|
-
self.
|
|
48
|
-
"debug_requested", self.message_handler.agent.clean_history
|
|
49
|
-
)
|
|
50
|
-
self.message_handler._notify(
|
|
51
|
-
"debug_requested", self.message_handler.streamline_messages
|
|
52
|
-
)
|
|
53
|
-
return CommandResult(handled=True, clear_flag=True)
|
|
46
|
+
elif user_input.lower().startswith("/debug"):
|
|
47
|
+
return self._handle_debug_command(user_input)
|
|
54
48
|
elif user_input.lower().startswith("/think "):
|
|
55
49
|
try:
|
|
56
50
|
budget = user_input[7:].strip()
|
|
@@ -759,6 +753,37 @@ class CommandProcessor:
|
|
|
759
753
|
self.message_handler._notify("voice_recording_completed", None)
|
|
760
754
|
return CommandResult(handled=True, clear_flag=True)
|
|
761
755
|
|
|
756
|
+
def _handle_debug_command(self, user_input: str) -> CommandResult:
|
|
757
|
+
"""Handle /debug command with optional filtering.
|
|
758
|
+
|
|
759
|
+
Usage:
|
|
760
|
+
/debug - Show both agent and chat messages
|
|
761
|
+
/debug agent - Show only agent messages
|
|
762
|
+
/debug chat - Show only chat/streamline messages
|
|
763
|
+
"""
|
|
764
|
+
parts = user_input.lower().split()
|
|
765
|
+
filter_type = parts[1] if len(parts) > 1 else None
|
|
766
|
+
|
|
767
|
+
if filter_type and filter_type not in ("agent", "chat"):
|
|
768
|
+
self.message_handler._notify(
|
|
769
|
+
"error", f"Invalid filter '{filter_type}'. Use 'agent' or 'chat'."
|
|
770
|
+
)
|
|
771
|
+
return CommandResult(handled=True, clear_flag=True)
|
|
772
|
+
|
|
773
|
+
if filter_type is None or filter_type == "agent":
|
|
774
|
+
self.message_handler._notify(
|
|
775
|
+
"debug_requested",
|
|
776
|
+
{"type": "agent", "messages": self.message_handler.agent.clean_history},
|
|
777
|
+
)
|
|
778
|
+
|
|
779
|
+
if filter_type is None or filter_type == "chat":
|
|
780
|
+
self.message_handler._notify(
|
|
781
|
+
"debug_requested",
|
|
782
|
+
{"type": "chat", "messages": self.message_handler.streamline_messages},
|
|
783
|
+
)
|
|
784
|
+
|
|
785
|
+
return CommandResult(handled=True, clear_flag=True)
|
|
786
|
+
|
|
762
787
|
def _handle_toggle_transfer_command(self, user_input: str) -> CommandResult:
|
|
763
788
|
"""Handle /toggle_transfer command to toggle the enforce_transfer property of agent_manager."""
|
|
764
789
|
try:
|
|
@@ -470,9 +470,13 @@ class MessageHandler(Observable):
|
|
|
470
470
|
if isinstance(e, BadRequestError):
|
|
471
471
|
if e.code == "model_max_prompt_tokens_exceeded":
|
|
472
472
|
from AgentCrew.modules.agents import LocalAgent
|
|
473
|
+
from AgentCrew.modules.llm.model_registry import ModelRegistry
|
|
473
474
|
|
|
474
475
|
if isinstance(self.agent, LocalAgent):
|
|
475
|
-
|
|
476
|
+
max_token = ModelRegistry.get_model_limit(
|
|
477
|
+
self.agent.get_model()
|
|
478
|
+
)
|
|
479
|
+
self.agent.input_tokens_usage = max_token
|
|
476
480
|
return await self.get_assistant_response()
|
|
477
481
|
if self.current_user_input:
|
|
478
482
|
self.conversation_manager.store_conversation_turn(
|
|
@@ -6,7 +6,15 @@ capabilities with platform-specific optimizations.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
from .service import CodeAnalysisService
|
|
9
|
+
from .parsers import (
|
|
10
|
+
BaseLanguageParser,
|
|
11
|
+
get_parser_for_language,
|
|
12
|
+
LANGUAGE_PARSER_MAP,
|
|
13
|
+
)
|
|
9
14
|
|
|
10
15
|
__all__ = [
|
|
11
16
|
"CodeAnalysisService",
|
|
17
|
+
"BaseLanguageParser",
|
|
18
|
+
"get_parser_for_language",
|
|
19
|
+
"LANGUAGE_PARSER_MAP",
|
|
12
20
|
]
|