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.
Files changed (219) hide show
  1. agentcrew_ai-0.8.13/AgentCrew/__init__.py +1 -0
  2. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/app.py +2 -1
  3. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/main.py +69 -3
  4. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/main_docker.py +14 -0
  5. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/local_agent.py +45 -20
  6. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js_loader.py +226 -82
  7. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/service.py +33 -0
  8. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/tool.py +67 -47
  9. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/tool_manager.py +2 -2
  10. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/code_analysis/__init__.py +8 -0
  11. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/grep_service.py +692 -0
  12. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/__init__.py +67 -0
  13. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/base.py +93 -0
  14. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/cpp_parser.py +127 -0
  15. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/csharp_parser.py +162 -0
  16. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/generic_parser.py +63 -0
  17. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/go_parser.py +154 -0
  18. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/java_parser.py +103 -0
  19. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/javascript_parser.py +268 -0
  20. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/kotlin_parser.py +84 -0
  21. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/php_parser.py +107 -0
  22. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/python_parser.py +60 -0
  23. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/ruby_parser.py +46 -0
  24. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/parsers/rust_parser.py +72 -0
  25. agentcrew_ai-0.8.13/AgentCrew/modules/code_analysis/service.py +826 -0
  26. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/code_analysis/tool.py +200 -9
  27. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/command_execution/constants.py +2 -2
  28. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/confirmation_handler.py +4 -4
  29. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/console_ui.py +20 -1
  30. agentcrew_ai-0.8.13/AgentCrew/modules/console/conversation_browser.py +557 -0
  31. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/diff_display.py +22 -51
  32. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/display_handlers.py +22 -22
  33. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/tool_display.py +6 -8
  34. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/service.py +8 -8
  35. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/tool.py +65 -67
  36. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/tool_handlers.py +0 -2
  37. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/atom_light.py +2 -2
  38. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/catppuccin.py +2 -2
  39. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/dracula.py +2 -2
  40. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/nord.py +2 -2
  41. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/saigontech.py +2 -2
  42. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/unicorn.py +2 -2
  43. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/diff_widget.py +30 -61
  44. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/constants.py +5 -5
  45. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/chroma_service.py +7 -2
  46. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/context_persistent.py +1 -0
  47. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/tool.py +56 -27
  48. {agentcrew_ai-0.8.11/agentcrew_ai.egg-info → agentcrew_ai-0.8.13}/PKG-INFO +1 -1
  49. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13/agentcrew_ai.egg-info}/PKG-INFO +1 -1
  50. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/agentcrew_ai.egg-info/SOURCES.txt +15 -0
  51. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/pyproject.toml +1 -1
  52. agentcrew_ai-0.8.11/AgentCrew/__init__.py +0 -1
  53. agentcrew_ai-0.8.11/AgentCrew/modules/code_analysis/service.py +0 -1349
  54. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/assets/agentcrew_logo.png +0 -0
  55. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/__init__.py +0 -0
  56. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/__init__.py +0 -0
  57. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/adapters.py +0 -0
  58. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/agent_cards.py +0 -0
  59. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/__init__.py +0 -0
  60. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/client/__init__.py +0 -0
  61. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/client/card_resolver.py +0 -0
  62. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/client/client.py +0 -0
  63. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/server/__init__.py +0 -0
  64. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/server/auth_middleware.py +0 -0
  65. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/server/task_manager.py +0 -0
  66. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/common/server/utils.py +0 -0
  67. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/errors.py +0 -0
  68. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/registry.py +0 -0
  69. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/server.py +0 -0
  70. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/a2a/task_manager.py +0 -0
  71. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/__init__.py +0 -0
  72. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/base.py +0 -0
  73. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/example.py +0 -0
  74. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/manager.py +0 -0
  75. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/remote_agent.py +0 -0
  76. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/tools/__init__.py +0 -0
  77. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/tools/ask.py +0 -0
  78. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/tools/delegate.py +0 -0
  79. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/agents/tools/transfer.py +0 -0
  80. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/anthropic/__init__.py +0 -0
  81. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/anthropic/service.py +0 -0
  82. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/__init__.py +0 -0
  83. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/chrome_manager.py +0 -0
  84. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/element_extractor.py +0 -0
  85. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/click_element.js +0 -0
  86. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/draw_element_boxes.js +0 -0
  87. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/extract_clickable_elements.js +0 -0
  88. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/extract_elements_by_text.js +0 -0
  89. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/extract_input_elements.js +0 -0
  90. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/extract_scrollable_elements.js +0 -0
  91. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/filter_hidden_elements.js +0 -0
  92. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/focus_and_clear_element.js +0 -0
  93. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/remove_element_boxes.js +0 -0
  94. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/scroll_to_element.js +0 -0
  95. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/browser_automation/js/trigger_input_events.js +0 -0
  96. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/__init__.py +0 -0
  97. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/consolidation.py +0 -0
  98. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/file_handler.py +0 -0
  99. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/history.py +0 -0
  100. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/__init__.py +0 -0
  101. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/base.py +0 -0
  102. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/command_processor.py +0 -0
  103. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/conversation.py +0 -0
  104. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message/handler.py +0 -0
  105. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/chat/message_handler.py +0 -0
  106. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/clipboard/__init__.py +0 -0
  107. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/clipboard/service.py +0 -0
  108. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/clipboard/tool.py +0 -0
  109. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/code_analysis/file_search_service.py +0 -0
  110. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/command_execution/__init__.py +0 -0
  111. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/command_execution/service.py +0 -0
  112. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/command_execution/tool.py +0 -0
  113. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/command_execution/types.py +0 -0
  114. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/config/__init__.py +0 -0
  115. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/config/config_management.py +0 -0
  116. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/__init__.py +0 -0
  117. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/command_handlers.py +0 -0
  118. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/completers.py +0 -0
  119. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/constants.py +0 -0
  120. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/conversation_handler.py +0 -0
  121. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/input_handler.py +0 -0
  122. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/ui_effects.py +0 -0
  123. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/console/utils.py +0 -0
  124. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/custom_llm/__init__.py +0 -0
  125. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/custom_llm/copilot_response_service.py +0 -0
  126. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/custom_llm/deepinfra_service.py +0 -0
  127. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/custom_llm/github_copilot_service.py +0 -0
  128. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/custom_llm/service.py +0 -0
  129. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/__init__.py +0 -0
  130. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/safety_validator.py +0 -0
  131. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/search_replace_engine.py +0 -0
  132. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/file_editing/tree_sitter_checker.py +0 -0
  133. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/google/__init__.py +0 -0
  134. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/google/native_service.py +0 -0
  135. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/google/service.py +0 -0
  136. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/groq/__init__.py +0 -0
  137. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/groq/service.py +0 -0
  138. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/__init__.py +0 -0
  139. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/__init__.py +0 -0
  140. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/chat_components.py +0 -0
  141. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/command_handler.py +0 -0
  142. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/completers.py +0 -0
  143. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/conversation_components.py +0 -0
  144. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/input_components.py +0 -0
  145. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/keyboard_handler.py +0 -0
  146. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/menu_components.py +0 -0
  147. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/message_handlers.py +0 -0
  148. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/components/ui_state_manager.py +0 -0
  149. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/qt_ui.py +0 -0
  150. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/README.md +0 -0
  151. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/__init__.py +0 -0
  152. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/themes/style_provider.py +0 -0
  153. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/utils/__init__.py +0 -0
  154. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/utils/macos_clipboard.py +0 -0
  155. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/utils/strings.py +0 -0
  156. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/utils/wins_clipboard.py +0 -0
  157. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/__init__.py +0 -0
  158. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/config_window.py +0 -0
  159. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/__init__.py +0 -0
  160. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/agent_config.py +0 -0
  161. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/custom_llm_provider.py +0 -0
  162. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/global_settings.py +0 -0
  163. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/mcp_config.py +0 -0
  164. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/configs/save_worker.py +0 -0
  165. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/history_sidebar.py +0 -0
  166. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/json_editor.py +0 -0
  167. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/loading_overlay.py +0 -0
  168. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/markdown_editor.py +0 -0
  169. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/message_bubble.py +0 -0
  170. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/paste_aware_textedit.py +0 -0
  171. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/system_message.py +0 -0
  172. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/token_usage.py +0 -0
  173. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/widgets/tool_widget.py +0 -0
  174. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/gui/worker.py +0 -0
  175. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/image_generation/__init__.py +0 -0
  176. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/image_generation/service.py +0 -0
  177. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/image_generation/tool.py +0 -0
  178. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/__init__.py +0 -0
  179. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/base.py +0 -0
  180. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/model_registry.py +0 -0
  181. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/service_manager.py +0 -0
  182. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/llm/types.py +0 -0
  183. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/__init__.py +0 -0
  184. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/auth.py +0 -0
  185. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/config.py +0 -0
  186. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/manager.py +0 -0
  187. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/service.py +0 -0
  188. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/mcpclient/tool.py +0 -0
  189. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/__init__.py +0 -0
  190. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/base_service.py +0 -0
  191. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/github_copilot_ef.py +0 -0
  192. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/google_genai_ef.py +0 -0
  193. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/memory/voyageai_ef.py +0 -0
  194. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/openai/__init__.py +0 -0
  195. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/openai/response_service.py +0 -0
  196. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/openai/service.py +0 -0
  197. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/prompts/__init__.py +0 -0
  198. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/prompts/constants.py +0 -0
  199. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/tools/README.md +0 -0
  200. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/tools/registration.py +0 -0
  201. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/tools/registry.py +0 -0
  202. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/__init__.py +0 -0
  203. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/audio_handler.py +0 -0
  204. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/base.py +0 -0
  205. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/deepinfra_service.py +0 -0
  206. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/elevenlabs_service.py +0 -0
  207. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/voice/text_cleaner.py +0 -0
  208. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/web_search/__init__.py +0 -0
  209. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/web_search/service.py +0 -0
  210. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/AgentCrew/modules/web_search/tool.py +0 -0
  211. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/CONTRIBUTING.md +0 -0
  212. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/LICENSE +0 -0
  213. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/MANIFEST.in +0 -0
  214. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/README.md +0 -0
  215. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/agentcrew_ai.egg-info/dependency_links.txt +0 -0
  216. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/agentcrew_ai.egg-info/entry_points.txt +0 -0
  217. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/agentcrew_ai.egg-info/requires.txt +0 -0
  218. {agentcrew_ai-0.8.11 → agentcrew_ai-0.8.13}/agentcrew_ai.egg-info/top_level.txt +0 -0
  219. {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
- 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",
@@ -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 = get_latest_github_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
- "🔄 New version available! Do you want to update now?",
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
- click.echo(f"🔄 New version available!\nRun {command} to update.")
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"""Go through all behaviors in the <Adaptive_Behaviors> tags before generating responses.
598
- Whenever condition `when` in <Global_Behavior> or <Project_Behavior> matches, tailor your responses with behaviors immediately—they override default instruction.
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"Check the conversation histories if it related to my request:\n - {'\n - '.join(memory_headers)}",
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
 
@@ -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()}