agentcrew-ai 0.8.10__tar.gz → 0.8.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. agentcrew_ai-0.8.12/AgentCrew/__init__.py +1 -0
  2. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/app.py +2 -1
  3. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/main.py +14 -0
  4. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/main_docker.py +14 -0
  5. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/agents/local_agent.py +40 -33
  6. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js_loader.py +226 -82
  7. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/service.py +33 -0
  8. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/tool.py +67 -47
  9. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/consolidation.py +3 -2
  10. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/message/tool_manager.py +2 -2
  11. agentcrew_ai-0.8.12/AgentCrew/modules/code_analysis/__init__.py +12 -0
  12. agentcrew_ai-0.8.12/AgentCrew/modules/code_analysis/file_search_service.py +585 -0
  13. agentcrew_ai-0.8.12/AgentCrew/modules/code_analysis/grep_service.py +692 -0
  14. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/code_analysis/service.py +167 -24
  15. agentcrew_ai-0.8.12/AgentCrew/modules/code_analysis/tool.py +608 -0
  16. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/command_execution/tool.py +5 -2
  17. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/console_ui.py +1 -0
  18. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/tool_display.py +2 -2
  19. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/ui_effects.py +3 -3
  20. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/custom_llm/service.py +4 -4
  21. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/file_editing/tree_sitter_checker.py +3 -3
  22. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/themes/atom_light.py +2 -2
  23. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/themes/catppuccin.py +2 -2
  24. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/themes/dracula.py +2 -2
  25. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/themes/nord.py +2 -2
  26. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/themes/saigontech.py +2 -2
  27. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/themes/unicorn.py +2 -2
  28. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/llm/constants.py +34 -2
  29. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/mcpclient/service.py +110 -14
  30. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/memory/chroma_service.py +7 -2
  31. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/memory/tool.py +55 -26
  32. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/openai/service.py +4 -4
  33. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/voice/deepinfra_service.py +1 -1
  34. {agentcrew_ai-0.8.10/agentcrew_ai.egg-info → agentcrew_ai-0.8.12}/PKG-INFO +3 -4
  35. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12/agentcrew_ai.egg-info}/PKG-INFO +3 -4
  36. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/agentcrew_ai.egg-info/SOURCES.txt +2 -0
  37. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/agentcrew_ai.egg-info/requires.txt +2 -3
  38. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/pyproject.toml +18 -30
  39. agentcrew_ai-0.8.10/AgentCrew/__init__.py +0 -1
  40. agentcrew_ai-0.8.10/AgentCrew/modules/code_analysis/__init__.py +0 -5
  41. agentcrew_ai-0.8.10/AgentCrew/modules/code_analysis/tool.py +0 -194
  42. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/assets/agentcrew_logo.png +0 -0
  43. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/__init__.py +0 -0
  44. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/__init__.py +0 -0
  45. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/adapters.py +0 -0
  46. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/agent_cards.py +0 -0
  47. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/common/__init__.py +0 -0
  48. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/common/client/__init__.py +0 -0
  49. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/common/client/card_resolver.py +0 -0
  50. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/common/client/client.py +0 -0
  51. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/common/server/__init__.py +0 -0
  52. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/common/server/auth_middleware.py +0 -0
  53. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/common/server/task_manager.py +0 -0
  54. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/common/server/utils.py +0 -0
  55. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/errors.py +0 -0
  56. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/registry.py +0 -0
  57. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/server.py +0 -0
  58. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/a2a/task_manager.py +0 -0
  59. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/agents/__init__.py +0 -0
  60. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/agents/base.py +0 -0
  61. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/agents/example.py +0 -0
  62. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/agents/manager.py +0 -0
  63. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/agents/remote_agent.py +0 -0
  64. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/agents/tools/__init__.py +0 -0
  65. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/agents/tools/ask.py +0 -0
  66. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/agents/tools/delegate.py +0 -0
  67. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/agents/tools/transfer.py +0 -0
  68. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/anthropic/__init__.py +0 -0
  69. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/anthropic/service.py +0 -0
  70. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/__init__.py +0 -0
  71. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/chrome_manager.py +0 -0
  72. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/element_extractor.py +0 -0
  73. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/click_element.js +0 -0
  74. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/draw_element_boxes.js +0 -0
  75. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/extract_clickable_elements.js +0 -0
  76. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/extract_elements_by_text.js +0 -0
  77. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/extract_input_elements.js +0 -0
  78. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/extract_scrollable_elements.js +0 -0
  79. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/filter_hidden_elements.js +0 -0
  80. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/focus_and_clear_element.js +0 -0
  81. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/remove_element_boxes.js +0 -0
  82. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/scroll_to_element.js +0 -0
  83. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/browser_automation/js/trigger_input_events.js +0 -0
  84. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/__init__.py +0 -0
  85. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/file_handler.py +0 -0
  86. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/history.py +0 -0
  87. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/message/__init__.py +0 -0
  88. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/message/base.py +0 -0
  89. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/message/command_processor.py +0 -0
  90. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/message/conversation.py +0 -0
  91. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/message/handler.py +0 -0
  92. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/chat/message_handler.py +0 -0
  93. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/clipboard/__init__.py +0 -0
  94. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/clipboard/service.py +0 -0
  95. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/clipboard/tool.py +0 -0
  96. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/command_execution/__init__.py +0 -0
  97. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/command_execution/constants.py +0 -0
  98. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/command_execution/service.py +0 -0
  99. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/command_execution/types.py +0 -0
  100. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/config/__init__.py +0 -0
  101. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/config/config_management.py +0 -0
  102. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/__init__.py +0 -0
  103. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/command_handlers.py +0 -0
  104. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/completers.py +0 -0
  105. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/confirmation_handler.py +0 -0
  106. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/constants.py +0 -0
  107. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/conversation_handler.py +0 -0
  108. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/diff_display.py +0 -0
  109. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/display_handlers.py +0 -0
  110. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/input_handler.py +0 -0
  111. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/console/utils.py +0 -0
  112. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/custom_llm/__init__.py +0 -0
  113. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/custom_llm/copilot_response_service.py +0 -0
  114. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/custom_llm/deepinfra_service.py +0 -0
  115. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/custom_llm/github_copilot_service.py +0 -0
  116. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/file_editing/__init__.py +0 -0
  117. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/file_editing/safety_validator.py +0 -0
  118. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/file_editing/search_replace_engine.py +0 -0
  119. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/file_editing/service.py +0 -0
  120. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/file_editing/tool.py +0 -0
  121. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/google/__init__.py +0 -0
  122. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/google/native_service.py +0 -0
  123. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/google/service.py +0 -0
  124. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/groq/__init__.py +0 -0
  125. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/groq/service.py +0 -0
  126. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/__init__.py +0 -0
  127. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/__init__.py +0 -0
  128. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/chat_components.py +0 -0
  129. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/command_handler.py +0 -0
  130. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/completers.py +0 -0
  131. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/conversation_components.py +0 -0
  132. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/input_components.py +0 -0
  133. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/keyboard_handler.py +0 -0
  134. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/menu_components.py +0 -0
  135. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/message_handlers.py +0 -0
  136. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/tool_handlers.py +0 -0
  137. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/components/ui_state_manager.py +0 -0
  138. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/qt_ui.py +0 -0
  139. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/themes/README.md +0 -0
  140. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/themes/__init__.py +0 -0
  141. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/themes/style_provider.py +0 -0
  142. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/utils/__init__.py +0 -0
  143. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/utils/macos_clipboard.py +0 -0
  144. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/utils/strings.py +0 -0
  145. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/utils/wins_clipboard.py +0 -0
  146. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/__init__.py +0 -0
  147. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/config_window.py +0 -0
  148. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/configs/__init__.py +0 -0
  149. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/configs/agent_config.py +0 -0
  150. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/configs/custom_llm_provider.py +0 -0
  151. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/configs/global_settings.py +0 -0
  152. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/configs/mcp_config.py +0 -0
  153. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/configs/save_worker.py +0 -0
  154. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/diff_widget.py +0 -0
  155. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/history_sidebar.py +0 -0
  156. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/json_editor.py +0 -0
  157. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/loading_overlay.py +0 -0
  158. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/markdown_editor.py +0 -0
  159. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/message_bubble.py +0 -0
  160. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/paste_aware_textedit.py +0 -0
  161. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/system_message.py +0 -0
  162. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/token_usage.py +0 -0
  163. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/widgets/tool_widget.py +0 -0
  164. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/gui/worker.py +0 -0
  165. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/image_generation/__init__.py +0 -0
  166. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/image_generation/service.py +0 -0
  167. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/image_generation/tool.py +0 -0
  168. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/llm/__init__.py +0 -0
  169. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/llm/base.py +0 -0
  170. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/llm/model_registry.py +0 -0
  171. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/llm/service_manager.py +0 -0
  172. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/llm/types.py +0 -0
  173. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/mcpclient/__init__.py +0 -0
  174. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/mcpclient/auth.py +0 -0
  175. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/mcpclient/config.py +0 -0
  176. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/mcpclient/manager.py +0 -0
  177. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/mcpclient/tool.py +0 -0
  178. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/memory/__init__.py +0 -0
  179. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/memory/base_service.py +0 -0
  180. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/memory/context_persistent.py +0 -0
  181. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/memory/github_copilot_ef.py +0 -0
  182. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/memory/google_genai_ef.py +0 -0
  183. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/memory/voyageai_ef.py +0 -0
  184. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/openai/__init__.py +0 -0
  185. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/openai/response_service.py +0 -0
  186. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/prompts/__init__.py +0 -0
  187. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/prompts/constants.py +0 -0
  188. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/tools/README.md +0 -0
  189. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/tools/registration.py +0 -0
  190. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/tools/registry.py +0 -0
  191. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/voice/__init__.py +0 -0
  192. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/voice/audio_handler.py +0 -0
  193. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/voice/base.py +0 -0
  194. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/voice/elevenlabs_service.py +0 -0
  195. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/voice/text_cleaner.py +0 -0
  196. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/web_search/__init__.py +0 -0
  197. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/web_search/service.py +0 -0
  198. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/AgentCrew/modules/web_search/tool.py +0 -0
  199. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/CONTRIBUTING.md +0 -0
  200. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/LICENSE +0 -0
  201. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/MANIFEST.in +0 -0
  202. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/README.md +0 -0
  203. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/agentcrew_ai.egg-info/dependency_links.txt +0 -0
  204. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/agentcrew_ai.egg-info/entry_points.txt +0 -0
  205. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/agentcrew_ai.egg-info/top_level.txt +0 -0
  206. {agentcrew_ai-0.8.10 → agentcrew_ai-0.8.12}/setup.cfg +0 -0
@@ -0,0 +1 @@
1
+ __version__ = "0.8.12"
@@ -265,7 +265,8 @@ class AgentCrewApplication:
265
265
  search_service = None
266
266
 
267
267
  try:
268
- code_analysis_service = CodeAnalysisService()
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",
@@ -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",
@@ -584,13 +584,19 @@ You must analyze then execute it with your available tools and give answer witho
584
584
  for key, value in local_adaptive_behaviors.items()
585
585
  ]
586
586
  )
587
+ adaptive_text.extend(
588
+ [
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
+ ]
592
+ )
587
593
  if len(adaptive_text) > 0:
588
594
  adaptive_messages["content"].append(
589
595
  {
590
596
  "type": "text",
591
- "text": f"""<MANDATORY>APPLY list of <Adaptive_Behaviors> before responding.
592
- Check if `when` condition in <Global_Behavior> or <Project_Behavior> matches, update your responses with behaviors immediately—they override default instruction.
593
- <Project_Behavior> has higher priority than <Global_Behavior>.</MANDATORY>
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
+ <Project_Behavior> has higher priority than <Global_Behavior>.
594
600
  <Adaptive_Behaviors>
595
601
  {" \n".join(adaptive_text)}
596
602
  </Adaptive_Behaviors>""",
@@ -618,6 +624,17 @@ Check if `when` condition in <Global_Behavior> or <Project_Behavior> matches, up
618
624
  .find("<Transfer_Tool>")
619
625
  != 0
620
626
  ):
627
+ if not self.is_remoting_mode and self.services.get("memory"):
628
+ memory_headers = self.services["memory"].list_memory_headers(
629
+ agent_name=self.name
630
+ )
631
+ if memory_headers:
632
+ adaptive_messages["content"].append(
633
+ {
634
+ "type": "text",
635
+ "text": f"Belows are our last 20 discussion headlines:\n - {'\n - '.join(memory_headers)}",
636
+ }
637
+ )
621
638
  if (
622
639
  self.services.get("agent_manager")
623
640
  and self.services["agent_manager"].enforce_transfer
@@ -627,24 +644,13 @@ Check if `when` condition in <Global_Behavior> or <Project_Behavior> matches, up
627
644
  {
628
645
  "type": "text",
629
646
  "text": """Before processing my request:
630
- - Break my request into sub-tasks when applicable.
631
- - For each sub-task, evaluate other agents capabilities.
632
- - Transfer sub-task to other agent if they are more suitable.
633
- - Keep the evaluating quick and concise using xml format within <agent_evaluation> tags.
634
- - Skip agent evaluation if user request is when...,[action]... related to adaptive behaviors call `adapt` tool instead.""",
647
+ - Break my request into actionable sub-tasks when applicable.
648
+ - For each sub-task, evaluate your tools and plan tool strategy for acquiring the context you need for the main task.
649
+ - Action subsequent steps base on your plan.
650
+ - Keep the evaluating quick and concise using xml format within <agent_evaluation> tags.
651
+ - Skip agent evaluation if user request is when...,[action]... related to adaptive behaviors call `adapt` tool instead.""",
635
652
  },
636
653
  )
637
- if not self.is_remoting_mode and self.services.get("memory"):
638
- memory_headers = self.services["memory"].list_memory_headers(
639
- agent_name=self.name
640
- )
641
- if memory_headers:
642
- adaptive_messages["content"].append(
643
- {
644
- "type": "text",
645
- "text": f"Here are conversations that we have discussed from oldest to latest:\n - {'\n - '.join(memory_headers)}",
646
- }
647
- )
648
654
  if len(adaptive_messages["content"]) > 0:
649
655
  final_messages.insert(last_user_index, adaptive_messages)
650
656
 
@@ -665,7 +671,7 @@ Check if `when` condition in <Global_Behavior> or <Project_Behavior> matches, up
665
671
  "content": [
666
672
  {
667
673
  "type": "text",
668
- "text": f"""<Transfer_Reminder>Make sure to transfer after the task is completed: {agent_manager.defered_transfer}</Transfer_Reminder>""",
674
+ "text": f"""<Transfer_Reminder>Make sure to transfer the task result after the task is completed to {agent_manager.defered_transfer}</Transfer_Reminder>""",
669
675
  }
670
676
  ],
671
677
  },
@@ -713,19 +719,20 @@ Check if `when` condition in <Global_Behavior> or <Project_Behavior> matches, up
713
719
  elif msg.get("role") == "tool":
714
720
  tool_name = msg.get("tool_name", "")
715
721
 
716
- # Remove denied tools after agent correct it
717
- if msg.get("is_rejected", False):
718
- has_last_user_message = next(
719
- (True for _ in final_messages[i:] if msg.get("role") == "user"),
720
- False,
721
- )
722
- if has_last_user_message:
723
- tool_id = msg.get("tool_call_id", "")
724
- last_assistant_msg = final_messages[i - 1]
725
- for tool_call in last_assistant_msg.get("tool_calls", []):
726
- if tool_call.get("id", "") == tool_id:
727
- tool_call["arguments"] = {}
728
- break
722
+ # TODO: this will be failed if agent call tool in parallel
723
+ # # Remove denied tools after agent correct it
724
+ # if msg.get("is_rejected", False):
725
+ # has_last_user_message = next(
726
+ # (True for _ in final_messages[i:] if msg.get("role") == "user"),
727
+ # False,
728
+ # )
729
+ # if has_last_user_message:
730
+ # tool_id = msg.get("tool_call_id", "")
731
+ # last_assistant_msg = final_messages[i - 1]
732
+ # for tool_call in last_assistant_msg.get("tool_calls", []):
733
+ # if tool_call.get("id", "") == tool_id:
734
+ # tool_call["arguments"] = {}
735
+ # break
729
736
 
730
737
  if tool_name in shrink_excluded:
731
738
  continue
@@ -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', 'Down')
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
- key_name = key.lower().strip()
277
- key_code = key_codes.get(key_name)
373
+ key_def = JavaScriptExecutor._get_key_definition(key)
278
374
 
279
- if key_code is None:
375
+ if key_def is None:
280
376
  return {
281
377
  "success": False,
282
- "error": f"Unknown key '{key}'. Supported keys: {', '.join(sorted(key_codes.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="rawKeyDown",
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
- printable_keys = {"space", "spacebar", "enter", "return", "tab"}
307
- if key_name in printable_keys:
308
- if key_name in ["space", "spacebar"]:
309
- char_text = " "
310
- elif key_name in ["enter", "return"]:
311
- char_text = "\r"
312
- elif key_name == "tab":
313
- char_text = "\t"
314
- else:
315
- char_text = ""
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", windowsVirtualKeyCode=key_code, modifiers=modifier_flags
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
- key_codes = {
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
- "f1": 112,
520
- "f2": 113,
521
- "f3": 114,
522
- "f4": 115,
523
- "f5": 116,
524
- "f6": 117,
525
- "f7": 118,
526
- "f8": 119,
527
- "f9": 120,
528
- "f10": 121,
529
- "f11": 122,
530
- "f12": 123,
531
- "numpad0": 96,
532
- "numpad1": 97,
533
- "numpad2": 98,
534
- "numpad3": 99,
535
- "numpad4": 100,
536
- "numpad5": 101,
537
- "numpad6": 102,
538
- "numpad7": 103,
539
- "numpad8": 104,
540
- "numpad9": 105,
541
- "volumeup": 175,
542
- "volume_up": 175,
543
- "volumedown": 174,
544
- "volume_down": 174,
545
- "volumemute": 173,
546
- "volume_mute": 173,
547
- "capslock": 20,
548
- "numlock": 144,
549
- "scrolllock": 145,
550
- "shift": 16,
551
- "ctrl": 17,
552
- "control": 17,
553
- "alt": 18,
554
- "meta": 91,
555
- "cmd": 91,
556
- "command": 91,
557
- "windows": 91,
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()}
@@ -137,6 +137,39 @@ class BrowserAutomationService:
137
137
  "profile": profile,
138
138
  }
139
139
 
140
+ def refresh(self) -> Dict[str, Any]:
141
+ """
142
+ Refresh the current page.
143
+
144
+ Returns:
145
+ Dict containing refresh result
146
+ """
147
+ try:
148
+ self._ensure_chrome_running()
149
+ if self.chrome_interface is None:
150
+ raise RuntimeError("Chrome interface is not initialized")
151
+
152
+ self.chrome_interface.Page.reload()
153
+
154
+ import time
155
+
156
+ time.sleep(0.5)
157
+
158
+ current_url = JavaScriptExecutor.get_current_url(self.chrome_interface)
159
+
160
+ return {
161
+ "success": True,
162
+ "message": "Successfully refreshed the page",
163
+ "current_url": current_url,
164
+ }
165
+
166
+ except Exception as e:
167
+ logger.error(f"Refresh error: {e}")
168
+ return {
169
+ "success": False,
170
+ "error": f"Refresh error: {str(e)}",
171
+ }
172
+
140
173
  def click_element(self, element_uuid: str) -> Dict[str, Any]:
141
174
  """
142
175
  Click an element using UUID via Chrome DevTools Protocol.