agentcrew-ai 0.8.11__tar.gz → 0.8.13__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.8.13/AgentCrew/__init__.py +1 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/app.py +2 -1
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/main.py +69 -3
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/main_docker.py +14 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/local_agent.py +45 -20
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js_loader.py +226 -82
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/service.py +33 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/tool.py +67 -47
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/tool_manager.py +2 -2
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/code_analysis/__init__.py +8 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/grep_service.py +692 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/__init__.py +67 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/base.py +93 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/cpp_parser.py +127 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/csharp_parser.py +162 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/generic_parser.py +63 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/go_parser.py +154 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/java_parser.py +103 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/javascript_parser.py +268 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/kotlin_parser.py +84 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/php_parser.py +107 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/python_parser.py +60 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/ruby_parser.py +46 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/rust_parser.py +72 -0
- agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/service.py +826 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/code_analysis/tool.py +200 -9
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/command_execution/constants.py +2 -2
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/confirmation_handler.py +4 -4
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/console_ui.py +20 -1
- agentcrew_ai-0.8.13/AgentCrew/modules/console/conversation_browser.py +557 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/diff_display.py +22 -51
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/display_handlers.py +22 -22
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/tool_display.py +6 -8
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/service.py +8 -8
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/tool.py +65 -67
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/tool_handlers.py +0 -2
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/atom_light.py +2 -2
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/catppuccin.py +2 -2
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/dracula.py +2 -2
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/nord.py +2 -2
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/saigontech.py +2 -2
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/unicorn.py +2 -2
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/diff_widget.py +30 -61
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/constants.py +5 -5
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/chroma_service.py +7 -2
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/context_persistent.py +1 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/tool.py +56 -27
- {agentcrew_ai-0.8.11/agentcrew_ai.egg-info → agentcrew_ai-0.8.13}/PKG-INFO +1 -1
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13/agentcrew_ai.egg-info}/PKG-INFO +1 -1
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/agentcrew_ai.egg-info/SOURCES.txt +15 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/pyproject.toml +1 -1
- agentcrew_ai-0.8.11/AgentCrew/__init__.py +0 -1
- agentcrew_ai-0.8.11/AgentCrew/modules/code_analysis/service.py +0 -1349
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/assets/agentcrew_logo.png +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/adapters.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/agent_cards.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/client/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/client/card_resolver.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/client/client.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/server/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/server/auth_middleware.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/server/task_manager.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/server/utils.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/errors.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/registry.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/server.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/task_manager.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/base.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/example.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/manager.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/remote_agent.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/tools/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/tools/ask.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/tools/delegate.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/tools/transfer.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/anthropic/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/anthropic/service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/chrome_manager.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/element_extractor.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/click_element.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/draw_element_boxes.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/extract_clickable_elements.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/extract_elements_by_text.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/extract_input_elements.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/extract_scrollable_elements.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/filter_hidden_elements.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/focus_and_clear_element.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/remove_element_boxes.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/scroll_to_element.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/trigger_input_events.js +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/consolidation.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/file_handler.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/history.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/base.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/command_processor.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/conversation.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/handler.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message_handler.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/clipboard/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/clipboard/service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/clipboard/tool.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/code_analysis/file_search_service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/command_execution/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/command_execution/service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/command_execution/tool.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/command_execution/types.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/config/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/config/config_management.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/command_handlers.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/completers.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/constants.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/conversation_handler.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/input_handler.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/ui_effects.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/utils.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/custom_llm/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/custom_llm/copilot_response_service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/custom_llm/deepinfra_service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/custom_llm/github_copilot_service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/custom_llm/service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/safety_validator.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/search_replace_engine.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/tree_sitter_checker.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/google/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/google/native_service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/google/service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/groq/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/groq/service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/chat_components.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/command_handler.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/completers.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/conversation_components.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/input_components.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/keyboard_handler.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/menu_components.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/message_handlers.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/ui_state_manager.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/qt_ui.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/README.md +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/style_provider.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/utils/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/utils/macos_clipboard.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/utils/strings.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/utils/wins_clipboard.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/config_window.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/agent_config.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/custom_llm_provider.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/global_settings.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/mcp_config.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/save_worker.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/history_sidebar.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/json_editor.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/loading_overlay.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/markdown_editor.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/message_bubble.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/paste_aware_textedit.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/system_message.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/token_usage.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/tool_widget.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/worker.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/image_generation/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/image_generation/service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/image_generation/tool.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/base.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/model_registry.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/service_manager.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/types.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/auth.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/config.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/manager.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/tool.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/base_service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/github_copilot_ef.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/google_genai_ef.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/voyageai_ef.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/openai/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/openai/response_service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/openai/service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/prompts/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/prompts/constants.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/tools/README.md +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/tools/registration.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/tools/registry.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/audio_handler.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/base.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/deepinfra_service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/elevenlabs_service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/text_cleaner.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/web_search/__init__.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/web_search/service.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/web_search/tool.py +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/CONTRIBUTING.md +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/LICENSE +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/MANIFEST.in +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/README.md +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/agentcrew_ai.egg-info/dependency_links.txt +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/agentcrew_ai.egg-info/entry_points.txt +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/agentcrew_ai.egg-info/requires.txt +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/agentcrew_ai.egg-info/top_level.txt +0 -0
- {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.8.13"
|
|
@@ -265,7 +265,8 @@ class AgentCrewApplication:
|
|
|
265
265
|
search_service = None
|
|
266
266
|
|
|
267
267
|
try:
|
|
268
|
-
|
|
268
|
+
code_analysis_llm = llm_manager.initialize_standalone_service(provider)
|
|
269
|
+
code_analysis_service = CodeAnalysisService(llm_service=code_analysis_llm)
|
|
269
270
|
except Exception as e:
|
|
270
271
|
click.echo(f"⚠️ Code analysis tool not available: {str(e)}")
|
|
271
272
|
code_analysis_service = None
|
|
@@ -7,6 +7,20 @@ import platform
|
|
|
7
7
|
from AgentCrew.app import common_options
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
def _custom_unraisable_hook(unraisable):
|
|
11
|
+
"""Suppress httpcore async cleanup exceptions when streams are cancelled."""
|
|
12
|
+
exc_type = unraisable.exc_type
|
|
13
|
+
exc_value = unraisable.exc_value
|
|
14
|
+
if exc_type and exc_type.__name__ == "AsyncLibraryNotFoundError":
|
|
15
|
+
return
|
|
16
|
+
if exc_value and "httpcore" in str(type(exc_value).__module__):
|
|
17
|
+
return
|
|
18
|
+
sys.__unraisablehook__(unraisable)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
sys.unraisablehook = _custom_unraisable_hook
|
|
22
|
+
|
|
23
|
+
|
|
10
24
|
PROVIDER_LIST = [
|
|
11
25
|
"claude",
|
|
12
26
|
"groq",
|
|
@@ -72,7 +86,7 @@ def check_and_update():
|
|
|
72
86
|
current_version = get_current_version()
|
|
73
87
|
|
|
74
88
|
click.echo(f"Current version: {current_version}\nChecking for updates...")
|
|
75
|
-
latest_version =
|
|
89
|
+
latest_version, release_notes = get_latest_release_info()
|
|
76
90
|
|
|
77
91
|
if not current_version or not latest_version:
|
|
78
92
|
click.echo("⚠️ Could not determine version information", err=True)
|
|
@@ -84,8 +98,20 @@ def check_and_update():
|
|
|
84
98
|
system = platform.system().lower()
|
|
85
99
|
|
|
86
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
|
+
|
|
87
113
|
if click.confirm(
|
|
88
|
-
"
|
|
114
|
+
"\nDo you want to update now?",
|
|
89
115
|
default=False,
|
|
90
116
|
):
|
|
91
117
|
click.echo("🔄 Starting update...")
|
|
@@ -95,7 +121,18 @@ def check_and_update():
|
|
|
95
121
|
click.echo("⏭️ Skipping update. Starting application...")
|
|
96
122
|
else:
|
|
97
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"
|
|
98
|
-
|
|
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}")
|
|
99
136
|
else:
|
|
100
137
|
click.echo("✅ You are running the latest version")
|
|
101
138
|
|
|
@@ -143,6 +180,35 @@ def get_latest_github_version():
|
|
|
143
180
|
return None
|
|
144
181
|
|
|
145
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
|
+
|
|
146
212
|
def version_is_older(current: str, latest: str) -> bool:
|
|
147
213
|
"""
|
|
148
214
|
Compare two semantic version strings to check if current is older than latest.
|
|
@@ -3,6 +3,20 @@ import os
|
|
|
3
3
|
import sys
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
def _custom_unraisable_hook(unraisable):
|
|
7
|
+
"""Suppress httpcore async cleanup exceptions when streams are cancelled."""
|
|
8
|
+
exc_type = unraisable.exc_type
|
|
9
|
+
exc_value = unraisable.exc_value
|
|
10
|
+
if exc_type and exc_type.__name__ == "AsyncLibraryNotFoundError":
|
|
11
|
+
return
|
|
12
|
+
if exc_value and "httpcore" in str(type(exc_value).__module__):
|
|
13
|
+
return
|
|
14
|
+
sys.__unraisablehook__(unraisable)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
sys.unraisablehook = _custom_unraisable_hook
|
|
18
|
+
|
|
19
|
+
|
|
6
20
|
PROVIDER_LIST = [
|
|
7
21
|
"claude",
|
|
8
22
|
"groq",
|
|
@@ -586,16 +586,16 @@ You must analyze then execute it with your available tools and give answer witho
|
|
|
586
586
|
)
|
|
587
587
|
adaptive_text.extend(
|
|
588
588
|
[
|
|
589
|
-
"<Global_Behavior id='default'>When encountering tasks that you have no data in the context and you don't know the anwser, say I don't know and ask user for helping you find the solution.</Global_Behavior>",
|
|
590
589
|
"<Global_Behavior id='transfer'>When working on my request, consider whether if any other agents is more suitable, if yes, transfer to that agent.</Global_Behavior>",
|
|
590
|
+
"<Global_Behavior id='default'>When encountering tasks that you have no data in the context and you don't know the anwser, say I don't know and ask user for helping you find the solution.</Global_Behavior>",
|
|
591
591
|
]
|
|
592
592
|
)
|
|
593
593
|
if len(adaptive_text) > 0:
|
|
594
594
|
adaptive_messages["content"].append(
|
|
595
595
|
{
|
|
596
596
|
"type": "text",
|
|
597
|
-
"text": f"""
|
|
598
|
-
Whenever condition `when` in
|
|
597
|
+
"text": f"""Read through all behaviors in the <Adaptive_Behaviors> tags before generating responses.
|
|
598
|
+
Whenever condition on `when` clause in a **Behavior** matches, tailor your responses with that **Behavior** immediately, override default instruction.
|
|
599
599
|
<Project_Behavior> has higher priority than <Global_Behavior>.
|
|
600
600
|
<Adaptive_Behaviors>
|
|
601
601
|
{" \n".join(adaptive_text)}
|
|
@@ -604,6 +604,21 @@ Whenever condition `when` in <Global_Behavior> or <Project_Behavior> matches, ta
|
|
|
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
|
(
|
|
@@ -624,22 +639,6 @@ Whenever condition `when` in <Global_Behavior> or <Project_Behavior> matches, ta
|
|
|
624
639
|
.find("<Transfer_Tool>")
|
|
625
640
|
!= 0
|
|
626
641
|
):
|
|
627
|
-
# if (
|
|
628
|
-
# self.services.get("agent_manager")
|
|
629
|
-
# and self.services["agent_manager"].enforce_transfer
|
|
630
|
-
# ):
|
|
631
|
-
# adaptive_messages["content"].insert(
|
|
632
|
-
# 0,
|
|
633
|
-
# {
|
|
634
|
-
# "type": "text",
|
|
635
|
-
# "text": """Before processing my request:
|
|
636
|
-
# - Break my request into sub-tasks when applicable.
|
|
637
|
-
# - For each sub-task, evaluate other agents capabilities.
|
|
638
|
-
# - Transfer sub-task to other agent if they are more suitable.
|
|
639
|
-
# - Keep the evaluating quick and concise using xml format within <agent_evaluation> tags.
|
|
640
|
-
# - Skip agent evaluation if user request is when...,[action]... related to adaptive behaviors call `adapt` tool instead.""",
|
|
641
|
-
# },
|
|
642
|
-
# )
|
|
643
642
|
if not self.is_remoting_mode and self.services.get("memory"):
|
|
644
643
|
memory_headers = self.services["memory"].list_memory_headers(
|
|
645
644
|
agent_name=self.name
|
|
@@ -648,9 +647,35 @@ Whenever condition `when` in <Global_Behavior> or <Project_Behavior> matches, ta
|
|
|
648
647
|
adaptive_messages["content"].append(
|
|
649
648
|
{
|
|
650
649
|
"type": "text",
|
|
651
|
-
"text": f"
|
|
650
|
+
"text": f"Belows are our last 20 discussion headlines:\n - {'\n - '.join(memory_headers)}",
|
|
652
651
|
}
|
|
653
652
|
)
|
|
653
|
+
if (
|
|
654
|
+
self.services.get("agent_manager")
|
|
655
|
+
and self.services["agent_manager"].enforce_transfer
|
|
656
|
+
):
|
|
657
|
+
adaptive_messages["content"].insert(
|
|
658
|
+
0,
|
|
659
|
+
{
|
|
660
|
+
"type": "text",
|
|
661
|
+
"text": """Before processing my request:
|
|
662
|
+
- Break my request into actionable sub-tasks when applicable.
|
|
663
|
+
- For each sub-task, evaluate your tools and plan tool strategy for acquiring the context you need for the main task.
|
|
664
|
+
- Action subsequent steps base on your plan.
|
|
665
|
+
- Keep the evaluating quick and concise using xml format within <agent_evaluation> tags.
|
|
666
|
+
- Skip agent evaluation if user request is when...,[action]... related to adaptive behaviors call `adapt` tool instead.""",
|
|
667
|
+
},
|
|
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 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
|
|
{agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js_loader.py
RENAMED
|
@@ -254,17 +254,114 @@ class JavaScriptExecutor:
|
|
|
254
254
|
logger.error(f"Error during typing simulation: {e}")
|
|
255
255
|
return {"success": False, "error": f"Typing simulation failed: {str(e)}"}
|
|
256
256
|
|
|
257
|
+
@staticmethod
|
|
258
|
+
def _get_key_definition(key: str) -> Optional[Dict[str, Any]]:
|
|
259
|
+
"""
|
|
260
|
+
Get key definition for a given key.
|
|
261
|
+
Handles both predefined special keys and dynamic alphanumeric keys.
|
|
262
|
+
"""
|
|
263
|
+
key_name = key.lower().strip()
|
|
264
|
+
|
|
265
|
+
if key_name in key_definitions:
|
|
266
|
+
return key_definitions[key_name]
|
|
267
|
+
|
|
268
|
+
if len(key) == 1:
|
|
269
|
+
char = key
|
|
270
|
+
char_lower = char.lower()
|
|
271
|
+
char_upper = char.upper()
|
|
272
|
+
|
|
273
|
+
if char_lower.isalpha():
|
|
274
|
+
key_code = ord(char_upper)
|
|
275
|
+
return {
|
|
276
|
+
"keyCode": key_code,
|
|
277
|
+
"key": char_lower,
|
|
278
|
+
"code": f"Key{char_upper}",
|
|
279
|
+
"text": char_lower,
|
|
280
|
+
}
|
|
281
|
+
elif char.isdigit():
|
|
282
|
+
key_code = ord(char)
|
|
283
|
+
return {
|
|
284
|
+
"keyCode": key_code,
|
|
285
|
+
"key": char,
|
|
286
|
+
"code": f"Digit{char}",
|
|
287
|
+
"text": char,
|
|
288
|
+
}
|
|
289
|
+
else:
|
|
290
|
+
symbol_map = {
|
|
291
|
+
"`": {"keyCode": 192, "code": "Backquote", "key": "`", "text": "`"},
|
|
292
|
+
"-": {"keyCode": 189, "code": "Minus", "key": "-", "text": "-"},
|
|
293
|
+
"=": {"keyCode": 187, "code": "Equal", "key": "=", "text": "="},
|
|
294
|
+
"[": {
|
|
295
|
+
"keyCode": 219,
|
|
296
|
+
"code": "BracketLeft",
|
|
297
|
+
"key": "[",
|
|
298
|
+
"text": "[",
|
|
299
|
+
},
|
|
300
|
+
"]": {
|
|
301
|
+
"keyCode": 221,
|
|
302
|
+
"code": "BracketRight",
|
|
303
|
+
"key": "]",
|
|
304
|
+
"text": "]",
|
|
305
|
+
},
|
|
306
|
+
"\\": {
|
|
307
|
+
"keyCode": 220,
|
|
308
|
+
"code": "Backslash",
|
|
309
|
+
"key": "\\",
|
|
310
|
+
"text": "\\",
|
|
311
|
+
},
|
|
312
|
+
";": {"keyCode": 186, "code": "Semicolon", "key": ";", "text": ";"},
|
|
313
|
+
"'": {"keyCode": 222, "code": "Quote", "key": "'", "text": "'"},
|
|
314
|
+
",": {"keyCode": 188, "code": "Comma", "key": ",", "text": ","},
|
|
315
|
+
".": {"keyCode": 190, "code": "Period", "key": ".", "text": "."},
|
|
316
|
+
"/": {"keyCode": 191, "code": "Slash", "key": "/", "text": "/"},
|
|
317
|
+
"~": {"keyCode": 192, "code": "Backquote", "key": "~", "text": "~"},
|
|
318
|
+
"!": {"keyCode": 49, "code": "Digit1", "key": "!", "text": "!"},
|
|
319
|
+
"@": {"keyCode": 50, "code": "Digit2", "key": "@", "text": "@"},
|
|
320
|
+
"#": {"keyCode": 51, "code": "Digit3", "key": "#", "text": "#"},
|
|
321
|
+
"$": {"keyCode": 52, "code": "Digit4", "key": "$", "text": "$"},
|
|
322
|
+
"%": {"keyCode": 53, "code": "Digit5", "key": "%", "text": "%"},
|
|
323
|
+
"^": {"keyCode": 54, "code": "Digit6", "key": "^", "text": "^"},
|
|
324
|
+
"&": {"keyCode": 55, "code": "Digit7", "key": "&", "text": "&"},
|
|
325
|
+
"*": {"keyCode": 56, "code": "Digit8", "key": "*", "text": "*"},
|
|
326
|
+
"(": {"keyCode": 57, "code": "Digit9", "key": "(", "text": "("},
|
|
327
|
+
")": {"keyCode": 48, "code": "Digit0", "key": ")", "text": ")"},
|
|
328
|
+
"_": {"keyCode": 189, "code": "Minus", "key": "_", "text": "_"},
|
|
329
|
+
"+": {"keyCode": 187, "code": "Equal", "key": "+", "text": "+"},
|
|
330
|
+
"{": {
|
|
331
|
+
"keyCode": 219,
|
|
332
|
+
"code": "BracketLeft",
|
|
333
|
+
"key": "{",
|
|
334
|
+
"text": "{",
|
|
335
|
+
},
|
|
336
|
+
"}": {
|
|
337
|
+
"keyCode": 221,
|
|
338
|
+
"code": "BracketRight",
|
|
339
|
+
"key": "}",
|
|
340
|
+
"text": "}",
|
|
341
|
+
},
|
|
342
|
+
"|": {"keyCode": 220, "code": "Backslash", "key": "|", "text": "|"},
|
|
343
|
+
":": {"keyCode": 186, "code": "Semicolon", "key": ":", "text": ":"},
|
|
344
|
+
'"': {"keyCode": 222, "code": "Quote", "key": '"', "text": '"'},
|
|
345
|
+
"<": {"keyCode": 188, "code": "Comma", "key": "<", "text": "<"},
|
|
346
|
+
">": {"keyCode": 190, "code": "Period", "key": ">", "text": ">"},
|
|
347
|
+
"?": {"keyCode": 191, "code": "Slash", "key": "?", "text": "?"},
|
|
348
|
+
}
|
|
349
|
+
if char in symbol_map:
|
|
350
|
+
return symbol_map[char]
|
|
351
|
+
|
|
352
|
+
return None
|
|
353
|
+
|
|
257
354
|
@staticmethod
|
|
258
355
|
def dispatch_key_event(
|
|
259
356
|
chrome_interface: Any, key: str, modifiers: Optional[list] = None
|
|
260
357
|
) -> Dict[str, Any]:
|
|
261
358
|
"""
|
|
262
|
-
Dispatch key events using CDP.
|
|
359
|
+
Dispatch key events using CDP with full key definition support.
|
|
263
360
|
|
|
264
361
|
Args:
|
|
265
362
|
chrome_interface: Chrome DevTools Protocol interface
|
|
266
|
-
key: Key to dispatch (e.g., 'Enter', 'Up', '
|
|
267
|
-
modifiers: Optional list of modifiers ('ctrl', 'alt', 'shift')
|
|
363
|
+
key: Key to dispatch (e.g., 'a', 'Enter', 'Up', 'F1', any single character)
|
|
364
|
+
modifiers: Optional list of modifiers ('ctrl', 'alt', 'shift', 'meta')
|
|
268
365
|
|
|
269
366
|
Returns:
|
|
270
367
|
Result dictionary with success status
|
|
@@ -273,60 +370,94 @@ class JavaScriptExecutor:
|
|
|
273
370
|
modifiers = []
|
|
274
371
|
|
|
275
372
|
try:
|
|
276
|
-
|
|
277
|
-
key_code = key_codes.get(key_name)
|
|
373
|
+
key_def = JavaScriptExecutor._get_key_definition(key)
|
|
278
374
|
|
|
279
|
-
if
|
|
375
|
+
if key_def is None:
|
|
280
376
|
return {
|
|
281
377
|
"success": False,
|
|
282
|
-
"error": f"Unknown key '{key}'. Supported keys
|
|
378
|
+
"error": f"Unknown key '{key}'. Supported: a-z, 0-9, symbols, and special keys (enter, escape, tab, f1-f12, up, down, left, right, etc.)",
|
|
283
379
|
"key": key,
|
|
284
380
|
"modifiers": modifiers,
|
|
285
381
|
}
|
|
286
382
|
|
|
383
|
+
key_code = key_def["keyCode"]
|
|
384
|
+
key_value = key_def["key"]
|
|
385
|
+
code_value = key_def["code"]
|
|
386
|
+
location = key_def.get("location", 0)
|
|
387
|
+
text_value = key_def.get("text", "")
|
|
388
|
+
|
|
287
389
|
modifier_flags = 0
|
|
390
|
+
modifier_keys_to_press = []
|
|
288
391
|
if modifiers:
|
|
289
392
|
modifier_names = [m.strip().lower() for m in modifiers]
|
|
290
393
|
for mod in modifier_names:
|
|
291
394
|
if mod in ["alt"]:
|
|
292
395
|
modifier_flags |= 1
|
|
396
|
+
modifier_keys_to_press.append("alt")
|
|
293
397
|
elif mod in ["ctrl", "control"]:
|
|
294
398
|
modifier_flags |= 2
|
|
399
|
+
modifier_keys_to_press.append("ctrl")
|
|
295
400
|
elif mod in ["meta", "cmd", "command"]:
|
|
296
401
|
modifier_flags |= 4
|
|
402
|
+
modifier_keys_to_press.append("meta")
|
|
297
403
|
elif mod in ["shift"]:
|
|
298
404
|
modifier_flags |= 8
|
|
405
|
+
modifier_keys_to_press.append("shift")
|
|
406
|
+
|
|
407
|
+
for mod_key in modifier_keys_to_press:
|
|
408
|
+
mod_def = key_definitions.get(mod_key)
|
|
409
|
+
if mod_def:
|
|
410
|
+
chrome_interface.Input.dispatchKeyEvent(
|
|
411
|
+
type="keyDown",
|
|
412
|
+
key=mod_def["key"],
|
|
413
|
+
code=mod_def["code"],
|
|
414
|
+
windowsVirtualKeyCode=mod_def["keyCode"],
|
|
415
|
+
location=mod_def.get("location", 0),
|
|
416
|
+
modifiers=modifier_flags,
|
|
417
|
+
)
|
|
299
418
|
|
|
300
419
|
chrome_interface.Input.dispatchKeyEvent(
|
|
301
|
-
type="
|
|
420
|
+
type="keyDown",
|
|
421
|
+
key=key_value,
|
|
422
|
+
code=code_value,
|
|
302
423
|
windowsVirtualKeyCode=key_code,
|
|
424
|
+
location=location,
|
|
303
425
|
modifiers=modifier_flags,
|
|
304
426
|
)
|
|
305
427
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
if char_text:
|
|
318
|
-
chrome_interface.Input.dispatchKeyEvent(
|
|
319
|
-
type="char",
|
|
320
|
-
windowsVirtualKeyCode=key_code,
|
|
321
|
-
text=char_text,
|
|
322
|
-
unmodifiedText=char_text,
|
|
323
|
-
modifiers=modifier_flags,
|
|
324
|
-
)
|
|
428
|
+
if text_value:
|
|
429
|
+
chrome_interface.Input.dispatchKeyEvent(
|
|
430
|
+
type="char",
|
|
431
|
+
key=key_value,
|
|
432
|
+
code=code_value,
|
|
433
|
+
windowsVirtualKeyCode=key_code,
|
|
434
|
+
text=text_value,
|
|
435
|
+
unmodifiedText=text_value,
|
|
436
|
+
location=location,
|
|
437
|
+
modifiers=modifier_flags,
|
|
438
|
+
)
|
|
325
439
|
|
|
326
440
|
chrome_interface.Input.dispatchKeyEvent(
|
|
327
|
-
type="keyUp",
|
|
441
|
+
type="keyUp",
|
|
442
|
+
key=key_value,
|
|
443
|
+
code=code_value,
|
|
444
|
+
windowsVirtualKeyCode=key_code,
|
|
445
|
+
location=location,
|
|
446
|
+
modifiers=modifier_flags,
|
|
328
447
|
)
|
|
329
448
|
|
|
449
|
+
for mod_key in reversed(modifier_keys_to_press):
|
|
450
|
+
mod_def = key_definitions.get(mod_key)
|
|
451
|
+
if mod_def:
|
|
452
|
+
chrome_interface.Input.dispatchKeyEvent(
|
|
453
|
+
type="keyUp",
|
|
454
|
+
key=mod_def["key"],
|
|
455
|
+
code=mod_def["code"],
|
|
456
|
+
windowsVirtualKeyCode=mod_def["keyCode"],
|
|
457
|
+
location=mod_def.get("location", 0),
|
|
458
|
+
modifiers=0,
|
|
459
|
+
)
|
|
460
|
+
|
|
330
461
|
time.sleep(0.1)
|
|
331
462
|
|
|
332
463
|
return {
|
|
@@ -334,6 +465,8 @@ class JavaScriptExecutor:
|
|
|
334
465
|
"message": f"Successfully dispatched key '{key}' with modifiers '{modifiers}'",
|
|
335
466
|
"key": key,
|
|
336
467
|
"key_code": key_code,
|
|
468
|
+
"key_value": key_value,
|
|
469
|
+
"code_value": code_value,
|
|
337
470
|
"modifiers": modifiers,
|
|
338
471
|
"modifier_flags": modifier_flags,
|
|
339
472
|
}
|
|
@@ -501,58 +634,69 @@ class JavaScriptLoader:
|
|
|
501
634
|
|
|
502
635
|
js_loader = JavaScriptLoader()
|
|
503
636
|
|
|
504
|
-
|
|
505
|
-
"up": 38,
|
|
506
|
-
"down": 40,
|
|
507
|
-
"left": 37,
|
|
508
|
-
"right": 39,
|
|
509
|
-
"home": 36,
|
|
510
|
-
"end": 35,
|
|
511
|
-
"pageup": 33,
|
|
512
|
-
"pagedown": 34,
|
|
513
|
-
"enter": 13,
|
|
514
|
-
"escape": 27,
|
|
515
|
-
"tab": 9,
|
|
516
|
-
"backspace": 8,
|
|
517
|
-
"delete": 46,
|
|
518
|
-
"space": 32,
|
|
519
|
-
"
|
|
520
|
-
"
|
|
521
|
-
"
|
|
522
|
-
"
|
|
523
|
-
"
|
|
524
|
-
"
|
|
525
|
-
"
|
|
526
|
-
"
|
|
527
|
-
"
|
|
528
|
-
"
|
|
529
|
-
"
|
|
530
|
-
"
|
|
531
|
-
"
|
|
532
|
-
"
|
|
533
|
-
"
|
|
534
|
-
"
|
|
535
|
-
"
|
|
536
|
-
"
|
|
537
|
-
"
|
|
538
|
-
"
|
|
539
|
-
"
|
|
540
|
-
"
|
|
541
|
-
"
|
|
542
|
-
"
|
|
543
|
-
"
|
|
544
|
-
"
|
|
545
|
-
"
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
"
|
|
551
|
-
"
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
"
|
|
557
|
-
"
|
|
637
|
+
key_definitions = {
|
|
638
|
+
"up": {"keyCode": 38, "key": "ArrowUp", "code": "ArrowUp"},
|
|
639
|
+
"down": {"keyCode": 40, "key": "ArrowDown", "code": "ArrowDown"},
|
|
640
|
+
"left": {"keyCode": 37, "key": "ArrowLeft", "code": "ArrowLeft"},
|
|
641
|
+
"right": {"keyCode": 39, "key": "ArrowRight", "code": "ArrowRight"},
|
|
642
|
+
"home": {"keyCode": 36, "key": "Home", "code": "Home"},
|
|
643
|
+
"end": {"keyCode": 35, "key": "End", "code": "End"},
|
|
644
|
+
"pageup": {"keyCode": 33, "key": "PageUp", "code": "PageUp"},
|
|
645
|
+
"pagedown": {"keyCode": 34, "key": "PageDown", "code": "PageDown"},
|
|
646
|
+
"enter": {"keyCode": 13, "key": "Enter", "code": "Enter", "text": "\r"},
|
|
647
|
+
"escape": {"keyCode": 27, "key": "Escape", "code": "Escape"},
|
|
648
|
+
"tab": {"keyCode": 9, "key": "Tab", "code": "Tab", "text": "\t"},
|
|
649
|
+
"backspace": {"keyCode": 8, "key": "Backspace", "code": "Backspace"},
|
|
650
|
+
"delete": {"keyCode": 46, "key": "Delete", "code": "Delete"},
|
|
651
|
+
"space": {"keyCode": 32, "key": " ", "code": "Space", "text": " "},
|
|
652
|
+
"insert": {"keyCode": 45, "key": "Insert", "code": "Insert"},
|
|
653
|
+
"f1": {"keyCode": 112, "key": "F1", "code": "F1"},
|
|
654
|
+
"f2": {"keyCode": 113, "key": "F2", "code": "F2"},
|
|
655
|
+
"f3": {"keyCode": 114, "key": "F3", "code": "F3"},
|
|
656
|
+
"f4": {"keyCode": 115, "key": "F4", "code": "F4"},
|
|
657
|
+
"f5": {"keyCode": 116, "key": "F5", "code": "F5"},
|
|
658
|
+
"f6": {"keyCode": 117, "key": "F6", "code": "F6"},
|
|
659
|
+
"f7": {"keyCode": 118, "key": "F7", "code": "F7"},
|
|
660
|
+
"f8": {"keyCode": 119, "key": "F8", "code": "F8"},
|
|
661
|
+
"f9": {"keyCode": 120, "key": "F9", "code": "F9"},
|
|
662
|
+
"f10": {"keyCode": 121, "key": "F10", "code": "F10"},
|
|
663
|
+
"f11": {"keyCode": 122, "key": "F11", "code": "F11"},
|
|
664
|
+
"f12": {"keyCode": 123, "key": "F12", "code": "F12"},
|
|
665
|
+
"numpad0": {"keyCode": 96, "key": "0", "code": "Numpad0", "location": 3},
|
|
666
|
+
"numpad1": {"keyCode": 97, "key": "1", "code": "Numpad1", "location": 3},
|
|
667
|
+
"numpad2": {"keyCode": 98, "key": "2", "code": "Numpad2", "location": 3},
|
|
668
|
+
"numpad3": {"keyCode": 99, "key": "3", "code": "Numpad3", "location": 3},
|
|
669
|
+
"numpad4": {"keyCode": 100, "key": "4", "code": "Numpad4", "location": 3},
|
|
670
|
+
"numpad5": {"keyCode": 101, "key": "5", "code": "Numpad5", "location": 3},
|
|
671
|
+
"numpad6": {"keyCode": 102, "key": "6", "code": "Numpad6", "location": 3},
|
|
672
|
+
"numpad7": {"keyCode": 103, "key": "7", "code": "Numpad7", "location": 3},
|
|
673
|
+
"numpad8": {"keyCode": 104, "key": "8", "code": "Numpad8", "location": 3},
|
|
674
|
+
"numpad9": {"keyCode": 105, "key": "9", "code": "Numpad9", "location": 3},
|
|
675
|
+
"volumeup": {"keyCode": 175, "key": "AudioVolumeUp", "code": "AudioVolumeUp"},
|
|
676
|
+
"volume_up": {"keyCode": 175, "key": "AudioVolumeUp", "code": "AudioVolumeUp"},
|
|
677
|
+
"volumedown": {"keyCode": 174, "key": "AudioVolumeDown", "code": "AudioVolumeDown"},
|
|
678
|
+
"volume_down": {
|
|
679
|
+
"keyCode": 174,
|
|
680
|
+
"key": "AudioVolumeDown",
|
|
681
|
+
"code": "AudioVolumeDown",
|
|
682
|
+
},
|
|
683
|
+
"volumemute": {"keyCode": 173, "key": "AudioVolumeMute", "code": "AudioVolumeMute"},
|
|
684
|
+
"volume_mute": {
|
|
685
|
+
"keyCode": 173,
|
|
686
|
+
"key": "AudioVolumeMute",
|
|
687
|
+
"code": "AudioVolumeMute",
|
|
688
|
+
},
|
|
689
|
+
"capslock": {"keyCode": 20, "key": "CapsLock", "code": "CapsLock"},
|
|
690
|
+
"numlock": {"keyCode": 144, "key": "NumLock", "code": "NumLock"},
|
|
691
|
+
"scrolllock": {"keyCode": 145, "key": "ScrollLock", "code": "ScrollLock"},
|
|
692
|
+
"shift": {"keyCode": 16, "key": "Shift", "code": "ShiftLeft", "location": 1},
|
|
693
|
+
"ctrl": {"keyCode": 17, "key": "Control", "code": "ControlLeft", "location": 1},
|
|
694
|
+
"control": {"keyCode": 17, "key": "Control", "code": "ControlLeft", "location": 1},
|
|
695
|
+
"alt": {"keyCode": 18, "key": "Alt", "code": "AltLeft", "location": 1},
|
|
696
|
+
"meta": {"keyCode": 91, "key": "Meta", "code": "MetaLeft", "location": 1},
|
|
697
|
+
"cmd": {"keyCode": 91, "key": "Meta", "code": "MetaLeft", "location": 1},
|
|
698
|
+
"command": {"keyCode": 91, "key": "Meta", "code": "MetaLeft", "location": 1},
|
|
699
|
+
"windows": {"keyCode": 91, "key": "Meta", "code": "MetaLeft", "location": 1},
|
|
558
700
|
}
|
|
701
|
+
|
|
702
|
+
key_codes = {k: v["keyCode"] for k, v in key_definitions.items()}
|