🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
feat: Add pyautogui toolkit (#2029)
Bonian Hud8449646263c
diff --git a/camel/toolkits/__init__.py b/camel/toolkits/__init__.pyindex a5ac62ac4..3ea41ac0a 100644--- a/camel/toolkits/__init__.py+++ b/camel/toolkits/__init__.py@@ -64,6 +64,7 @@ from .terminal_toolkit import TerminalToolkitfrom .pubmed_toolkit import PubMedToolkitfrom .data_commons_toolkit import DataCommonsToolkitfrom .thinking_toolkit import ThinkingToolkit+from .pyautogui_toolkit import PyAutoGUIToolkitfrom .openai_agent_toolkit import OpenAIAgentToolkitfrom .searxng_toolkit import SearxNGToolkit@@ -118,6 +119,7 @@ __all__ = ['PubMedToolkit','DataCommonsToolkit','ThinkingToolkit',+ 'PyAutoGUIToolkit','OpenAIAgentToolkit','SearxNGToolkit',]diff --git a/camel/toolkits/pyautogui_toolkit.py b/camel/toolkits/pyautogui_toolkit.pynew file mode 100644index 000000000..62eda92ca--- /dev/null+++ b/camel/toolkits/pyautogui_toolkit.py@@ -0,0 +1,579 @@+# camel/toolkits/pyautogui_toolkit.py+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========++from typing import List, Optional, Tuple+from camel.utils import dependencies_required++from camel.logger import get_logger+import subprocess+import os+import time+from camel.toolkits import BaseToolkit, FunctionTool++# Set up logging+logger = get_logger(__name__)+++class PyAutoGUIToolkit(BaseToolkit):+ r"""A toolkit for automating GUI interactions using PyAutoGUI."""++ @dependencies_required('pyautogui')+ def __init__(self):+ super().__init__()+ # Import pyautogui here to make it an optional dependency+ import pyautogui+ # Configure PyAutoGUI for safety+ self.pyautogui = pyautogui++ self.pyautogui.FAILSAFE = True # Move mouse to upper-left to abort++ # Get screen size for safety boundaries+ self.screen_width, self.screen_height = self.pyautogui.size()+ # Define safe boundaries (10% margin from edges)+ self.safe_margin = 0.1+ self.safe_min_x = int(self.screen_width * self.safe_margin)+ self.safe_max_x = int(self.screen_width * (1 - self.safe_margin))+ self.safe_min_y = int(self.screen_height * self.safe_margin)+ self.safe_max_y = int(self.screen_height * (1 - self.safe_margin))+ self.screen_center = (self.screen_width // 2, self.screen_height // 2)++ def _get_safe_coordinates(self, x: int, y: int) -> Tuple[int, int]:+ r"""Ensure coordinates are within safe boundaries to prevent triggering+ failsafe.++ Args:+ x (int): Original x-coordinate+ y (int): Original y-coordinate++ Returns:+ Tuple[int, int]: Safe coordinates+ """+ # Clamp coordinates to safe boundaries+ safe_x = max(self.safe_min_x, min(x, self.safe_max_x))+ safe_y = max(self.safe_min_y, min(y, self.safe_max_y))++ if safe_x != x or safe_y != y:+ logger.info(+ f"Safety: Adjusted coordinates from ({x}, {y}) to "+ f"({safe_x}, {safe_y})"+ )++ return safe_x, safe_y++ def mouse_move(self, x: int, y: int, duration: float = 0.5) -> str:+ r"""Move mouse pointer to specified coordinates.++ Args:+ x (int): X-coordinate to move to.+ y (int): Y-coordinate to move to.+ duration (float): How long the movement should take in seconds.+ (default: :obj:`0.5`)++ Returns:+ str: Success or error message.+ """+ try:+ # Apply safety boundaries+ safe_x, safe_y = self._get_safe_coordinates(x, y)+ self.pyautogui.moveTo(safe_x, safe_y, duration=duration)+ return f"Mouse moved to position ({safe_x}, {safe_y})"+ except Exception as e:+ logger.error(f"Error moving mouse: {e}")+ return f"Error: {e}"++ def mouse_click(+ self,+ button: str = 'left',+ clicks: int = 1,+ x: Optional[int] = None,+ y: Optional[int] = None+ ) -> str:+ r"""Click the mouse at current position.++ Args:+ button (str): Button to click ('left', 'middle', 'right').+ (default: :obj:`'left'`)+ clicks (int): Number of clicks.+ (default: :obj:`1`)+ x (Optional[int]): X-coordinate to click at. If None, uses current+ position. (default: :obj:`None`)+ y (Optional[int]): Y-coordinate to click at. If None, uses current+ position. (default: :obj:`None`)++ Returns:+ str: Success or error message.+ """+ try:+ # Apply safety boundaries if coordinates are specified+ if x is not None and y is not None:+ safe_x, safe_y = self._get_safe_coordinates(x, y)+ self.pyautogui.click(+ x=safe_x, y=safe_y, button=button, clicks=clicks+ )+ else:+ self.pyautogui.click(button=button, clicks=clicks)+ return (+ f"Clicked {button} button {clicks} time(s) at position "+ f"{safe_x}, {safe_y}"+ )+ except Exception as e:+ logger.error(f"Error clicking mouse: {e}")+ return f"Error: {e}"++ def double_click(+ self, x: Optional[int] = None, y: Optional[int] = None+ ) -> str:+ r"""Double-click the left mouse button.++ Args:+ x (Optional[int]): X-coordinate to double-click at. If None, uses+ current position. (default: :obj:`None`)+ y (Optional[int]): Y-coordinate to double-click at. If None, uses+ current position. (default: :obj:`None`)++ Returns:+ str: Success or error message.+ """+ try:+ # Apply safety boundaries if coordinates are specified+ if x is not None and y is not None:+ safe_x, safe_y = self._get_safe_coordinates(x, y)+ # Method name from PyAutoGUI API (not a typo)+ self.pyautogui.doubleClick(x=safe_x, y=safe_y)+ return f"Double-clicked at position {safe_x}, {safe_y}"+ else:+ # Method name from PyAutoGUI API (not a typo)+ self.pyautogui.doubleClick()+ return "Double-clicked at current position"+ except Exception as e:+ logger.error(f"Error double-clicking: {e}")+ return f"Error: {e}"++ def right_click(+ self, x: Optional[int] = None, y: Optional[int] = None+ ) -> str:+ r"""Right-click the mouse.++ Args:+ x (Optional[int]): X-coordinate to right-click at. If None, uses+ current position. (default: :obj:`None`)+ y (Optional[int]): Y-coordinate to right-click at. If None, uses+ current position. (default: :obj:`None`)++ Returns:+ str: Success or error message.+ """+ try:+ # Apply safety boundaries if coordinates are specified+ if x is not None and y is not None:+ safe_x, safe_y = self._get_safe_coordinates(x, y)+ self.pyautogui.rightClick(x=safe_x, y=safe_y)+ return f"Right-clicked at position {safe_x}, {safe_y}"+ else:+ self.pyautogui.rightClick()+ return "Right-clicked at current position"+ except Exception as e:+ logger.error(f"Error right-clicking: {e}")+ return f"Error: {e}"++ def middle_click(+ self, x: Optional[int] = None, y: Optional[int] = None+ ) -> str:+ r"""Middle-click the mouse.++ Args:+ x (Optional[int]): X-coordinate to middle-click at. If None, uses+ current position. (default: :obj:`None`)+ y (Optional[int]): Y-coordinate to middle-click at. If None, uses+ current position. (default: :obj:`None`)++ Returns:+ str: Success or error message.+ """+ try:+ # Apply safety boundaries if coordinates are specified+ if x is not None and y is not None:+ safe_x, safe_y = self._get_safe_coordinates(x, y)+ self.pyautogui.middleClick(x=safe_x, y=safe_y)+ return f"Middle-clicked at position {safe_x}, {safe_y}"+ else:+ self.pyautogui.middleClick()+ return "Middle-clicked at current position"+ except Exception as e:+ logger.error(f"Error middle-clicking: {e}")+ return f"Error: {e}"++ def get_mouse_position(self) -> str:+ r"""Get current mouse position.++ Returns:+ str: Current mouse X and Y coordinates.+ """+ try:+ x, y = self.pyautogui.position()+ return f"Mouse position: ({x}, {y})"+ except Exception as e:+ logger.error(f"Error getting mouse position: {e}")+ return f"Error: {e}"++ def get_screen_size(self) -> str:+ r"""Get screen size.++ Returns:+ str: Screen width and height.+ """+ try:+ width, height = self.pyautogui.size()+ return f"Screen size: {width}x{height}"+ except Exception as e:+ logger.error(f"Error getting screen size: {e}")+ return f"Error: {e}"++ def take_screenshot(+ self, left: int = 0, top: int = 0,+ width: Optional[int] = None, height: Optional[int] = None+ ) -> str:+ r"""Take a screenshot.++ Args:+ left (int): Left coordinate of the screenshot region.+ (default: :obj:`0`)+ top (int): Top coordinate of the screenshot region.+ (default: :obj:`0`)+ width (Optional[int]): Width of the screenshot region. If None,+ uses full screen width. (default: :obj:`None`)+ height (Optional[int]): Height of the screenshot region. If None,+ uses full screen height. (default: :obj:`None`)++ Returns:+ str: Path to the saved screenshot.+ """+ try:+ # Apply safety boundaries to all coordinates+ safe_left, safe_top = self._get_safe_coordinates(left, top)++ # If width or height is not specified, use the available space+ if width is None:+ width = self.screen_width - safe_left+ if height is None:+ height = self.screen_height - safe_top++ # Ensure the region doesn't exceed screen boundaries+ if safe_left + width > self.screen_width:+ width = self.screen_width - safe_left+ if safe_top + height > self.screen_height:+ height = self.screen_height - safe_top++ # Create directory for screenshots if it doesn't exist+ screenshots_dir = os.path.expanduser("~/camel_screenshots")+ os.makedirs(screenshots_dir, exist_ok=True)++ # Take screenshot+ screenshot = self.pyautogui.screenshot(+ region=(safe_left, safe_top, width, height)+ )++ # Save screenshot to file+ timestamp = int(time.time())+ screenshot_path = os.path.join(+ screenshots_dir, f"screenshot_{timestamp}.png"+ )+ screenshot.save(screenshot_path)++ return f"Screenshot saved to {screenshot_path}"+ except Exception as e:+ logger.error(f"Error taking screenshot: {e}")+ return f"Error: {e}"++ def mouse_drag(+ self,+ start_x: int,+ start_y: int,+ end_x: int,+ end_y: int,+ duration: float = 0.5,+ button: str = 'left'+ ) -> str:+ r"""Drag mouse from start position to end position.++ Args:+ start_x (int): Starting x-coordinate.+ start_y (int): Starting y-coordinate.+ end_x (int): Ending x-coordinate.+ end_y (int): Ending y-coordinate.+ duration (float): How long the drag should take in seconds.+ (default: :obj:`0.5`)+ button (str): Mouse button to use ('left', 'middle', 'right').+ (default: :obj:`'left'`)++ Returns:+ str: Success or error message.+ """+ try:+ # Apply safety boundaries to both start and end positions+ safe_start_x, safe_start_y = self._get_safe_coordinates(+ start_x, start_y+ )+ safe_end_x, safe_end_y = self._get_safe_coordinates(end_x, end_y)++ # Break operation into smaller steps for safety+ # First move to start position+ self.pyautogui.moveTo(+ safe_start_x, safe_start_y, duration=duration/3+ )+ # Then perform drag+ self.pyautogui.dragTo(+ safe_end_x, safe_end_y, duration=duration/3, button=button+ )+ # Finally, move to a safe position (screen center) afterwards+ self.pyautogui.moveTo(+ self.screen_center[0], self.screen_center[1],+ duration=duration/3+ )++ return (+ f"Dragged from ({safe_start_x}, {safe_start_y}) "+ f"to ({safe_end_x}, {safe_end_y})"+ )+ except Exception as e:+ logger.error(f"Error dragging mouse: {e}")+ # Try to move to safe position even after error+ try:+ self.pyautogui.moveTo(+ self.screen_center[0], self.screen_center[1], duration=0.2+ )+ except Exception:+ pass+ return f"Error: {e}"++ def scroll(+ self, scroll_amount: int,+ x: Optional[int] = None, y: Optional[int] = None+ ) -> str:+ r"""Scroll the mouse wheel.++ Args:+ scroll_amount (int): Amount to scroll. Positive values scroll up,+ negative values scroll down.+ x (Optional[int]): X-coordinate to scroll at. If None, uses current+ position. (default: :obj:`None`)+ y (Optional[int]): Y-coordinate to scroll at. If None, uses current+ position. (default: :obj:`None`)++ Returns:+ str: Success or error message.+ """+ try:+ # Get current mouse position if coordinates are not specified+ if x is None or y is None:+ current_x, current_y = self.pyautogui.position()+ x = x if x is not None else current_x+ y = y if y is not None else current_y++ # Always apply safety boundaries+ safe_x, safe_y = self._get_safe_coordinates(x, y)+ self.pyautogui.scroll(scroll_amount, x=safe_x, y=safe_y)++ # Move mouse back to screen center for added safety+ self.pyautogui.moveTo(self.screen_center[0], self.screen_center[1])+ logger.info(+ f"Safety: Moving mouse back to screen center "+ f"({self.screen_center[0]}, {self.screen_center[1]})"+ )++ return (+ f"Scrolled {scroll_amount} clicks at position "+ f"{safe_x}, {safe_y}"+ )+ except Exception as e:+ logger.error(f"Error scrolling: {e}")+ return f"Error: {e}"++ def keyboard_type(self, text: str, interval: float = 0.0) -> str:+ r"""Type text on the keyboard.++ Args:+ text (str): Text to type.+ interval (float): Seconds to wait between keypresses.+ (default: :obj:`0.0`)++ Returns:+ str: Success or error message.+ """+ try:+ # Validate text input+ if not isinstance(text, str):+ return (+ f"Error: Input must be a string, got {type(text).__name__}"+ )++ if not text:+ return "Error: Empty text input"++ if len(text) > 1000: # Set a reasonable maximum length limit+ logger.warning(+ f"Warning: Very long text ({len(text)} characters) may "+ f"cause performance issues"+ )++ # First, move mouse to a safe position to prevent potential issues+ self.pyautogui.moveTo(+ self.screen_center[0], self.screen_center[1], duration=0.1+ )++ self.pyautogui.write(text, interval=interval)+ return f"Typed text: {text[:20]}{'...' if len(text) > 20 else ''}"+ except Exception as e:+ logger.error(f"Error typing text: {e}")+ return f"Error: {e}"++ def press_key(self, key: str) -> str:+ r"""Press a key on the keyboard.++ Args:+ key (str): Key to press.++ Returns:+ str: Success or error message.+ """+ try:+ # Input validation+ if not isinstance(key, str):+ return f"Error: Key must be a string, got {type(key).__name__}"++ if not key:+ return "Error: Empty key input"++ # Length validation (most valid key names are short)+ if len(key) > 20:+ return (+ f"Error: Key name '{key}' is too long (max 20 characters)"+ )++ # Special character validation+ # (key names usually don't contain special characters)+ import re+ if re.search(r'[^\w+\-_]', key) and len(key) > 1:+ logger.warning(+ f"Warning: Key '{key}' contains unusual characters"+ )++ # First, move mouse to a safe position to prevent potential issues+ self.pyautogui.moveTo(+ self.screen_center[0], self.screen_center[1], duration=0.1+ )++ self.pyautogui.press(key)+ return f"Pressed key: {key}"+ except Exception as e:+ logger.error(f"Error pressing key: {e}")+ return f"Error: Invalid key '{key}' or error pressing it. {e}"++ def hotkey(self, *keys) -> str:+ r"""Press keys in succession and release in reverse order.++ Args:+ *keys: Keys to press.++ Returns:+ str: Success or error message.+ """+ try:+ # First, move mouse to a safe position to prevent potential issues+ self.pyautogui.moveTo(+ self.screen_center[0], self.screen_center[1], duration=0.1+ )++ self.pyautogui.hotkey(*keys)+ return f"Pressed hotkey: {'+'.join(keys)}"+ except Exception as e:+ logger.error(f"Error pressing hotkey: {e}")+ return f"Error: {e}"++ def open_terminal(+ self, wait_time: int = 2, force_english_input: bool = False+ ) -> str:+ r"""Open a terminal window.++ Args:+ wait_time (int): Seconds to wait for terminal to open.+ (default: :obj:`2`)+ force_english_input (bool): Force English input method.+ (default: :obj:`False`)++ Returns:+ str: Success or error message.+ """+ try:+ # Move to safe position first+ self.pyautogui.moveTo(+ self.screen_center[0], self.screen_center[1], duration=0.1+ )++ import platform+ import subprocess+ os_name = platform.system()++ if os_name == 'Darwin': # macOS+ if force_english_input:+ subprocess.Popen([+ 'open', '-a', 'Terminal',+ '--args', 'LANG=en_US.UTF-8'+ ])+ else:+ subprocess.Popen(['open', '-a', 'Terminal'])+ elif os_name == 'Windows':+ subprocess.Popen('cmd.exe')+ elif os_name == 'Linux':+ # Try several common terminal emulators+ terminals = ['gnome-terminal', 'konsole', 'xterm']+ for term in terminals:+ try:+ subprocess.Popen(term)+ break+ except FileNotFoundError:+ continue+ else:+ return f"Unsupported operating system: {os_name}"++ time.sleep(wait_time) # Wait for terminal to open+ return (+ f"Terminal opened on {os_name} with "+ f"{'English' if force_english_input else 'default'} "+ f"input method"+ )+ except Exception as e:+ logger.error(f"Error opening terminal: {e}")+ return f"Error: {e}"++ def get_tools(self) -> List[FunctionTool]:+ r"""Returns a list of FunctionTool objects for PyAutoGUI operations.++ Returns:+ List[FunctionTool]: List of PyAutoGUI functions.+ """+ return [+ FunctionTool(self.mouse_move),+ FunctionTool(self.mouse_click),+ FunctionTool(self.keyboard_type),+ FunctionTool(self.take_screenshot),+ FunctionTool(self.get_screen_size),+ FunctionTool(self.get_mouse_position),+ FunctionTool(self.press_key),+ FunctionTool(self.hotkey),+ FunctionTool(self.mouse_drag),+ FunctionTool(self.scroll),+ FunctionTool(self.open_terminal),+ ]\ No newline at end of filediff --git a/examples/toolkits/pyautogui_toolkit.py b/examples/toolkits/pyautogui_toolkit.pynew file mode 100644index 000000000..1ec1c858f--- /dev/null+++ b/examples/toolkits/pyautogui_toolkit.py@@ -0,0 +1,151 @@+# examples/toolkits/pyautogui_toolkit.py+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========++"""Example of using the PyAutoGUI toolkit with CAMEL agents for GUI+automation."""++import dotenv+import time++from camel.agents import ChatAgent+from camel.configs import ChatGPTConfig+from camel.logger import get_logger+from camel.models import ModelFactory+from camel.toolkits import PyAutoGUIToolkit+from camel.types import ModelPlatformType, ModelType++# Load environment variables from .env file (including OPENAI_API_KEY)+dotenv.load_dotenv()++# Set up logging+logger = get_logger(__name__)++def setup_pyautogui_agent(model_type=ModelType.GPT_4O_MINI, temperature=0.1):+ r"""Create and setup a CAMEL agent with PyAutoGUI tools.++ Args:+ model_type: The model type to use (default: GPT-4O-MINI)+ temperature: Model temperature parameter (default: 0.1)++ Returns:+ ChatAgent: A configured agent with PyAutoGUI tools+ """+ # Create a model with specified parameters+ model_config = ChatGPTConfig(temperature=temperature)+ model = ModelFactory.create(+ model_type=model_type,+ model_platform=ModelPlatformType.OPENAI,+ model_config_dict=model_config.as_dict(),+ )++ # Create PyAutoGUI toolkit and get available tools+ toolkit = PyAutoGUIToolkit()+ tools = toolkit.get_tools()++ # System message for the agent+ system_message = (+ "You are an AutoGUI assistant that can control the computer using "+ "the PyAutoGUI toolkit. "+ "You can move the mouse, click, type text, take screenshots, and more. "+ "Always respect safety boundaries when interacting with the GUI. "+ "When asked to perform operations, use the provided tools and "+ "describe what you're doing. "+ "Monitor for potential errors and handle them appropriately."+ )++ # Create and configure the agent+ agent = ChatAgent(+ system_message=system_message,+ model=model,+ tools=tools,+ )++ return agent++def run_automated_demo():+ r"""Run an automated demonstration of all PyAutoGUI toolkit features.++ This demonstration will:+ 1. Get screen size and mouse position+ 2. Move mouse to different positions+ 3. Click at a position+ 4. Type some text+ 5. Take a screenshot+ """+ # Print introduction+ print("\n==== AUTOMATED PYAUTOGUI TOOLKIT DEMONSTRATION ====\n")+ print(+ "This demonstration will showcase all PyAutoGUI toolkit "+ "features automatically"+ )+ print("No user input is required. Please do not interrupt the process.\n")++ # Create a chat agent with PyAutoGUI tools+ agent = setup_pyautogui_agent()++ # Define a series of tasks to showcase all toolkit features+ tasks = [+ # Task 1: Get screen information and take a screenshot+ "Perform these steps in sequence without asking for confirmation:\n"+ "1. Get the current screen size and mouse position\n"+ "2. Move the mouse to the center of the screen \n"+ "3. Click at that position\n"+ "4. Take a screenshot to document the result\n",++ # Task 2: Keyboard entry and key pressing+ "Perform these steps in sequence without asking for confirmation:\n"+ "1. Open a terminal window\n"+ "2. Type 'echo \"Hello from CAMEL PyAutoGUI\"'\n"+ "3. Press the Enter key\n"+ "4. Press the key combination Ctrl+C to exit the process if needed\n",++ # Task 3: Complex mouse operations+ "Perform these steps in sequence without asking for confirmation:\n"+ "1. Move the mouse to the top left quadrant of the screen "+ "(25% of screen width and height)\n"+ "2. Drag the mouse to the bottom right quadrant "+ "(75% of screen width and height)\n"+ "3. Scroll the mouse wheel down a few clicks\n"+ "4. Take a screenshot to document the result\n",+ ]++ # Run each task in sequence+ for i, task in enumerate(tasks):+ print("\n" + "=" * 60)+ print(f"EXECUTING TASK {i+1} OF {len(tasks)}")+ print("=" * 60 + "\n")+ print(f"Instruction: {task}")+ print("")++ # Execute the task+ response = agent.step(task)++ # Print the agent's response+ print(f"\nAgent response: {response.msg.content}")++ # Pause before the next task+ if i < len(tasks) - 1:+ print("\nWaiting a moment before the next task...")+ time.sleep(3)+ print("")++def main():+ r"""Main function to run the PyAutoGUI toolkit example."""+ print("Starting PyAutoGUI toolkit automated demonstration...\n")+ run_automated_demo()+ print("\nPyAutoGUI toolkit demonstration completed.")++if __name__ == "__main__":+ main()\ No newline at end of filediff --git a/pyproject.toml b/pyproject.tomlindex a18345ed2..9c261dc2c 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -125,6 +125,7 @@ media_tools = ["ffmpeg-python>=0.2.0,<0.3","scenedetect>=0.6.5.2",]+communication_tools = ["slack-sdk>=3.27.2,<4","slack-bolt>=1.20.1,<2",@@ -346,6 +347,7 @@ all = ["math-verify>=0.7.0,<0.8","exa-py>=1.10.0,<2","crawl4ai>=0.3.745",+ "pyautogui>=0.9.54,<0.10",][project.urls]@@ -541,4 +543,4 @@ skip = '.git*,*.pdf,*.svg,*.lock,*.css,examples/toolkits/semantic_scholar_toolkicheck-hidden = true# Ignore long lines as usually some kind of base64 encodings e.g. in ipynbignore-regex = '^\s*"image/\S+": ".*|^.{300,}|\b(NotIn|Unsupport)\b'-ignore-words-list = 'ans,datas,rouge'+ignore-words-list = 'ans,datas,rouge,doubleClick'diff --git a/test/toolkits/test_pyautogui_toolkit.py b/test/toolkits/test_pyautogui_toolkit.pynew file mode 100644index 000000000..2232feb4d--- /dev/null+++ b/test/toolkits/test_pyautogui_toolkit.py@@ -0,0 +1,362 @@+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========++import pytest+from unittest.mock import MagicMock, patch+import warnings+# Import pyautogui for patch+from camel.toolkits import PyAutoGUIToolkit+from camel.toolkits.base import FunctionTool+[email protected](autouse=True)+def ignore_all_warnings():+ with warnings.catch_warnings():+ warnings.simplefilter("ignore")+ yield++def test_init():+ """Test initialization of PyAutoGUIToolkit."""+ pyautogui_mock = MagicMock()+ pyautogui_mock.size.return_value = (1920, 1080)+ pyautogui_mock.FAILSAFE = True++ with patch.dict('sys.modules', {'pyautogui': pyautogui_mock}):+ toolkit = PyAutoGUIToolkit()++ # Verify __init__ used the mock correctly+ pyautogui_mock.size.assert_called_once()+ assert toolkit.screen_width == 1920+ assert toolkit.screen_height == 1080+ assert toolkit.screen_center == (960, 540)+ assert toolkit.safe_margin == 0.1++@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+def test_mouse_move(mock_pyautogui):+ """Test mouse_move method by patching the global pyautogui namespace"""+ # Configure mock object+ mock_pyautogui.size.return_value = (1920, 1080)++ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Call the method to be tested+ result = toolkit.mouse_move(500, 500, duration=0.5)++ # Verify the mock works as expected+ mock_pyautogui.moveTo.assert_called_once_with(500, 500, duration=0.5)+ assert "Mouse moved to position (500, 500)" in result++@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+def test_mouse_click(mock_pyautogui):+ """Test mouse_click method by patching the global pyautogui namespace"""+ # Configure mock object+ mock_pyautogui.size.return_value = (1920, 1080)+ mock_pyautogui.position.return_value = (100, 100) # Used for click test+ # without coordinates++ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Test click with coordinates+ result = toolkit.mouse_click(button='left', clicks=2, x=500, y=500)++ # Verify the call is correct+ mock_pyautogui.click.assert_called_once_with(+ x=500, y=500, button='left', clicks=2+ )+ assert "Clicked left button 2 time(s)" in result++ # Reset mock object and test click without coordinates+ mock_pyautogui.click.reset_mock()+ result = toolkit.mouse_click()++ # Verify the call is correct, using default values+ mock_pyautogui.click.assert_called_once_with(button='left', clicks=1)+ assert "Clicked left button 1 time(s)" in result+++@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+def test_keyboard_type(mock_pyautogui):+ """Test keyboard_type method by patching the pyautogui namespace"""+ # Configure mock object+ mock_pyautogui.size.return_value = (1920, 1080)++ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Test keyboard input+ result = toolkit.keyboard_type("Hello, World!")++ # Verify the call is correct (need to include interval=0.0 default parameter)+ mock_pyautogui.write.assert_called_once_with(+ "Hello, World!", interval=0.0+ )+ assert "Typed text: Hello, World!" in result++ # Test keyboard input with interval+ mock_pyautogui.write.reset_mock()+ result = toolkit.keyboard_type("Hello, World!", interval=0.1)++ # Verify the call is correct+ mock_pyautogui.write.assert_called_once_with("Hello, World!", interval=0.1)+ assert "Typed text: Hello, World!" in result++def test_get_tools():+ """Test that get_tools returns all expected toolkit methods"""+ with patch("pyautogui.size", return_value=(1920, 1080)):+ # Create toolkit instance+ toolkit = PyAutoGUIToolkit()++ # Get tools+ tools = toolkit.get_tools()++ # Verify tools are returned+ assert tools+ assert all(isinstance(tool, FunctionTool) for tool in tools)++ # Get actual tool names+ tool_names = [+ tool.func.__name__ for tool in tools if hasattr(tool, 'func')+ ]++ # The actual methods registered in get_tools() based on code review+ expected_methods = [+ 'mouse_move',+ 'mouse_drag',+ 'mouse_click',+ 'keyboard_type',+ 'take_screenshot', # Note: this is 'take_screenshot',+ # not 'screenshot'+ 'get_screen_size',+ 'get_mouse_position',+ 'double_click',+ 'right_click',+ 'middle_click',+ 'scroll',+ 'press_key',+ 'hotkey'+ ]++ # Verify all expected methods are in the tools+ for method in expected_methods:+ assert method in tool_names, (+ f"Expected method '{method}' not found in tools"+ )++ # Verify tool count matches expected+ assert len(tool_names) == len(expected_methods), (+ f"Expected {len(expected_methods)} tools, "+ f"but got {len(tool_names)}"+ )++@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+@patch("camel.toolkits.pyautogui_toolkit.os")+@patch("camel.toolkits.pyautogui_toolkit.time")+def test_take_screenshot(mock_time, mock_os, mock_pyautogui):+ """Test take_screenshot method by patching the global pyautogui+ namespace"""+ # Configure mocks+ mock_pyautogui.size.return_value = (1920, 1080)+ mock_time.time.return_value = 12345+ mock_os.path.expanduser.return_value = "/mock/home/camel_screenshots"+ mock_os.path.join.return_value = (+ "/mock/home/camel_screenshots/screenshot_12345.png"+ )++ # Create a mock PIL Image+ mock_image = MagicMock()+ mock_pyautogui.screenshot.return_value = mock_image++ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Test with default parameters (full screen)+ result = toolkit.take_screenshot()++ # Verify the directory was created+ mock_os.makedirs.assert_called_once_with(+ "/mock/home/camel_screenshots", exist_ok=True+ )++ # Verify screenshot was called once with a region parameter+ mock_pyautogui.screenshot.assert_called_once()++ # Verify the image was saved+ mock_image.save.assert_called_once_with(+ "/mock/home/camel_screenshots/screenshot_12345.png"+ )++ # Verify the success message+ assert (+ "Screenshot saved to /mock/home/camel_screenshots/screenshot_12345.png"+ in result+ )++ # Reset mocks for second test+ mock_pyautogui.screenshot.reset_mock()+ mock_image.save.reset_mock()++ # Test with custom region+ result = toolkit.take_screenshot(left=100, top=100, width=500, height=500)++ # Verify screenshot was called once+ mock_pyautogui.screenshot.assert_called_once()+ # Verify region parameter was included in the call+ assert 'region' in mock_pyautogui.screenshot.call_args[1]+ # Get the actual region that was passed+ region = mock_pyautogui.screenshot.call_args[1]['region']+ # Verify that the region coordinates are of the correct type+ assert isinstance(region, tuple)+ assert len(region) == 4+ assert all(isinstance(val, int) for val in region)++ # Verify the image was saved+ mock_image.save.assert_called_once_with(+ "/mock/home/camel_screenshots/screenshot_12345.png"+ )++@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+def test_get_screen_size(mock_pyautogui):+ """Test get_screen_size method by patching the global pyautogui+ namespace"""+ # Configure mock+ mock_pyautogui.size.return_value = (1920, 1080)++ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Test get_screen_size+ result = toolkit.get_screen_size()++ # Verify the function returns the correct values+ assert result == "Screen size: 1920x1080"+ mock_pyautogui.size.assert_called_once()+++@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+def test_get_mouse_position(mock_pyautogui):+ """Test get_mouse_position method by patching the global pyautogui+ namespace"""+ # Configure mock+ mock_pyautogui.position.return_value = (500, 300)++ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Test get_mouse_position+ result = toolkit.get_mouse_position()++ # Verify the function returns the correct values+ assert result == "Mouse position: (500, 300)"+ mock_pyautogui.position.assert_called_once()+++@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+def test_press_key(mock_pyautogui):+ """Test press_key method by patching the global pyautogui namespace"""+ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Test press_key+ result = toolkit.press_key("enter")++ # Verify the call is correct+ mock_pyautogui.press.assert_called_once_with("enter")+ assert "Pressed key: enter" in result+++@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+def test_hotkey(mock_pyautogui):+ """Test hotkey method by patching the global pyautogui namespace"""+ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Test hotkey with multiple keys+ result = toolkit.hotkey("ctrl", "c")++ # Verify the call is correct+ mock_pyautogui.hotkey.assert_called_once_with("ctrl", "c")+ assert "Pressed hotkey: ctrl+c" in result+++@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+def test_mouse_drag(mock_pyautogui):+ """Test mouse_drag method by patching the global pyautogui namespace"""+ # Configure mock+ mock_pyautogui.size.return_value = (1920, 1080)++ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Test mouse_drag+ result = toolkit.mouse_drag(200, 200, 400, 400, duration=0.5)++ # Verify the call is correct - duration is divided by 3 in the+ # implementation+ mock_pyautogui.dragTo.assert_called_once_with(+ 400, 400, duration=0.5/3, button='left'+ )+ assert "Dragged from" in result+++@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+def test_scroll(mock_pyautogui):+ """Test scroll method by patching the global pyautogui namespace"""+ # Configure mock for position() call+ mock_pyautogui.position.return_value = (500, 500)++ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Test scroll+ result = toolkit.scroll(5)++ # Verify the call is correct (should include x and y parameters)+ # The toolkit applies safety boundaries, so we can't know the exact values+ assert mock_pyautogui.scroll.call_count == 1+ call_args = mock_pyautogui.scroll.call_args[0]+ call_kwargs = mock_pyautogui.scroll.call_args[1]++ # Check first positional argument is 5+ assert call_args[0] == 5+ # Check x and y parameters are present+ assert 'x' in call_kwargs+ assert 'y' in call_kwargs++ assert "Scrolled 5 click" in result+++@patch("camel.toolkits.pyautogui_toolkit.subprocess")+@patch("camel.toolkits.pyautogui_toolkit.pyautogui", create=True)+def test_open_terminal(mock_pyautogui, mock_subprocess):+ """Test open_terminal method by patching the global pyautogui namespace"""+ # Configure mock+ mock_pyautogui.size.return_value = (1920, 1080)++ # Initialize toolkit+ toolkit = PyAutoGUIToolkit()++ # Test open_terminal+ result = toolkit.open_terminal(wait_time=0) # Use 0 to speed up test++ # Verify the correct command was called based on platform+ import platform+ if platform.system() == "Darwin": # macOS+ mock_subprocess.Popen.assert_called_once_with(+ ["open", "-a", "Terminal"]+ )+ elif platform.system() == "Windows":+ mock_subprocess.Popen.assert_called_once_with("cmd.exe")++ assert "Terminal opened" in result\ No newline at end of filediff --git a/uv.lock b/uv.lockindex 540f786cf..0af9fd697 100644--- a/uv.lock+++ b/uv.lock@@ -607,6 +607,7 @@ all = [{ name = "prance" },{ name = "praw" },{ name = "pre-commit" },+ { name = "pyautogui" },{ name = "pydub" },{ name = "pygithub" },{ name = "pymilvus" },@@ -726,6 +727,9 @@ document-tools = [{ name = "unstructured" },{ name = "xls2xlsx" },]+gui-tools = [+ { name = "pyautogui" },+]huggingface = [{ name = "accelerate" },{ name = "datasets" },@@ -1031,7 +1035,9 @@ requires-dist = [{ name = "pre-commit", marker = "extra == 'all'", specifier = ">=3,<4" },{ name = "pre-commit", marker = "extra == 'dev'", specifier = ">=3,<4" },{ name = "psutil", specifier = ">=5.9.8,<6" },- { name = "pydantic", specifier = ">=2.10.6" },+ { name = "pyautogui", marker = "extra == 'all'", specifier = ">=0.9.54,<0.10" },+ { name = "pyautogui", marker = "extra == 'gui-tools'", specifier = ">=0.9.54,<0.10" },+ { name = "pydantic", specifier = ">=1.9,<2.10" },{ name = "pydub", marker = "extra == 'all'", specifier = ">=0.25.1,<0.26" },{ name = "pydub", marker = "extra == 'media-tools'", specifier = ">=0.25.1,<0.26" },{ name = "pydub", marker = "extra == 'owl'", specifier = ">=0.25.1,<0.26" },@@ -1151,7 +1157,8 @@ requires-dist = [{ name = "yt-dlp", marker = "extra == 'media-tools'", specifier = ">=2024.11.4,<2025" },{ name = "yt-dlp", marker = "extra == 'owl'", specifier = ">=2024.11.4,<2025" },]-provides-extras = ["test", "dev", "docs", "rag", "web-tools", "document-tools", "media-tools", "communication-tools", "data-tools", "research-tools", "dev-tools", "model-platforms", "huggingface", "storage", "owl", "all"]++provides-extras = ["test", "dev", "docs", "rag", "web-tools", "document-tools", "media-tools", "gui-tools", "communication-tools", "data-tools", "research-tools", "dev-tools", "model-platforms", "huggingface", "storage", "all"][[package]]name = "certifi"@@ -3602,6 +3609,17 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/23/62/0fe302c6d1be1c777cab0616e6302478251dfbf9055ad426f5d0def75c89/more_itertools-10.6.0-py3-none-any.whl", hash = "sha256:6eb054cb4b6db1473f6e15fcc676a08e4732548acd47c708f0e179c2c7c01e89", size = 63038 },]+[[package]]+name = "mouseinfo"+version = "0.1.3"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pyperclip" },+ { name = "python3-xlib", marker = "sys_platform == 'linux'" },+ { name = "rubicon-objc", marker = "sys_platform == 'darwin'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/28/fa/b2ba8229b9381e8f6381c1dcae6f4159a7f72349e414ed19cfbbd1817173/MouseInfo-0.1.3.tar.gz", hash = "sha256:2c62fb8885062b8e520a3cce0a297c657adcc08c60952eb05bc8256ef6f7f6e7", size = 10850 }+[[package]]name = "mpmath"version = "1.3.0"@@ -4926,6 +4944,22 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/47/8d/d529b5d697919ba8c11ad626e835d4039be708a35b0d22de83a269a6682c/pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a", size = 181259 },]+[[package]]+name = "pyautogui"+version = "0.9.54"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "mouseinfo" },+ { name = "pygetwindow" },+ { name = "pymsgbox" },+ { name = "pyobjc-core", marker = "sys_platform == 'darwin'" },+ { name = "pyobjc-framework-quartz", marker = "sys_platform == 'darwin'" },+ { name = "pyscreeze" },+ { name = "python3-xlib", marker = "sys_platform == 'linux'" },+ { name = "pytweening" },+]+sdist = { url = "https://files.pythonhosted.org/packages/65/ff/cdae0a8c2118a0de74b6cf4cbcdcaf8fd25857e6c3f205ce4b1794b27814/PyAutoGUI-0.9.54.tar.gz", hash = "sha256:dd1d29e8fd118941cb193f74df57e5c6ff8e9253b99c7b04f39cfc69f3ae04b2", size = 61236 }+[[package]]name = "pycountry"version = "24.6.1"@@ -5105,6 +5139,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/25/68/7e150cba9eeffdeb3c5cecdb6896d70c8edd46ce41c0491e12fb2b2256ff/pyee-12.1.1-py3-none-any.whl", hash = "sha256:18a19c650556bb6b32b406d7f017c8f513aceed1ef7ca618fb65de7bd2d347ef", size = 15527 },]+[[package]]+name = "pygetwindow"+version = "0.0.9"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pyrect" },+]+sdist = { url = "https://files.pythonhosted.org/packages/e1/70/c7a4f46dbf06048c6d57d9489b8e0f9c4c3d36b7479f03c5ca97eaa2541d/PyGetWindow-0.0.9.tar.gz", hash = "sha256:17894355e7d2b305cd832d717708384017c1698a90ce24f6f7fbf0242dd0a688", size = 9699 }+[[package]]name = "pygithub"version = "2.6.1"@@ -5163,6 +5206,12 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/06/4f/169ffe72bc628bf89be7770f2ef60f90fd73588c6ceb25d47f1bb00ade02/pymilvus-2.5.6-py3-none-any.whl", hash = "sha256:19796f328278974f04632a1531e602070614f6ab0865cc97e27755f622e50a6d", size = 223410 },]+[[package]]+name = "pymsgbox"+version = "1.0.9"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/7d/ff/4c6f31a4f08979f12a663f2aeb6c8b765d3bd592e66eaaac445f547bb875/PyMsgBox-1.0.9.tar.gz", hash = "sha256:2194227de8bff7a3d6da541848705a155dcbb2a06ee120d9f280a1d7f51263ff", size = 18829 }+[[package]]name = "pymupdf"version = "1.25.5"@@ -5208,6 +5257,44 @@ wheels = [][[package]]+name = "pyobjc-core"+version = "11.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/5c/94/a111239b98260869780a5767e5d74bfd3a8c13a40457f479c28dcd91f89d/pyobjc_core-11.0.tar.gz", hash = "sha256:63bced211cb8a8fb5c8ff46473603da30e51112861bd02c438fbbbc8578d9a70", size = 994931 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/bc/21/ccc992b38670176a615fb67686d709e03be989511da687f6f49ddc4ff6c8/pyobjc_core-11.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:10866b3a734d47caf48e456eea0d4815c2c9b21856157db5917b61dee06893a1", size = 732162 },+ { url = "https://files.pythonhosted.org/packages/52/05/fa97309c3b1bc1ec90d701db89902e0bd5e1024023aa2c5387b889458b1b/pyobjc_core-11.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:50675c0bb8696fe960a28466f9baf6943df2928a1fd85625d678fa2f428bd0bd", size = 727295 },+ { url = "https://files.pythonhosted.org/packages/56/ce/bf3ff9a9347721a398c3dfb83e29b43fb166b7ef590f3f7b7ddcd283df39/pyobjc_core-11.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a03061d4955c62ddd7754224a80cdadfdf17b6b5f60df1d9169a3b1b02923f0b", size = 739750 },+]++[[package]]+name = "pyobjc-framework-cocoa"+version = "11.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pyobjc-core", marker = "sys_platform == 'darwin'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/c5/32/53809096ad5fc3e7a2c5ddea642590a5f2cb5b81d0ad6ea67fdb2263d9f9/pyobjc_framework_cocoa-11.0.tar.gz", hash = "sha256:00346a8cb81ad7b017b32ff7bf596000f9faa905807b1bd234644ebd47f692c5", size = 6173848 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/37/16/905a32c5241848ddd91d94bae346342750f28f49fadb3746e9e796f929f3/pyobjc_framework_Cocoa-11.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fbc65f260d617d5463c7fb9dbaaffc23c9a4fabfe3b1a50b039b61870b8daefd", size = 385509 },+ { url = "https://files.pythonhosted.org/packages/23/97/81fd41ad90e9c241172110aa635a6239d56f50d75923aaedbbe351828580/pyobjc_framework_Cocoa-11.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3ea7be6e6dd801b297440de02d312ba3fa7fd3c322db747ae1cb237e975f5d33", size = 385534 },+ { url = "https://files.pythonhosted.org/packages/5b/8d/0e2558447c26b3ba64f7c9776a5a6c9d2ae8abf9d34308b174ae0934402e/pyobjc_framework_Cocoa-11.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:280a577b83c68175a28b2b7138d1d2d3111f2b2b66c30e86f81a19c2b02eae71", size = 385811 },+]++[[package]]+name = "pyobjc-framework-quartz"+version = "11.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pyobjc-core", marker = "sys_platform == 'darwin'" },+ { name = "pyobjc-framework-cocoa", marker = "sys_platform == 'darwin'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/a5/ad/f00f3f53387c23bbf4e0bb1410e11978cbf87c82fa6baff0ee86f74c5fb6/pyobjc_framework_quartz-11.0.tar.gz", hash = "sha256:3205bf7795fb9ae34747f701486b3db6dfac71924894d1f372977c4d70c3c619", size = 3952463 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/bd/b3/75fccb0406aac00eecbd14f278a9b6e6fc0e4483220d57eb3aff68666fb1/pyobjc_framework_Quartz-11.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:da3ab13c9f92361959b41b0ad4cdd41ae872f90a6d8c58a9ed699bc08ab1c45c", size = 212343 },+ { url = "https://files.pythonhosted.org/packages/a3/6a/68957c8c5e8f0128d4d419728bac397d48fa7ad7a66e82b70e64d129ffca/pyobjc_framework_Quartz-11.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d251696bfd8e8ef72fbc90eb29fec95cb9d1cc409008a183d5cc3246130ae8c2", size = 212349 },+ { url = "https://files.pythonhosted.org/packages/60/5d/df827b78dcb5140652ad08af8038c9ddd7e01e6bdf84462bfee644e6e661/pyobjc_framework_Quartz-11.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:cb4a9f2d9d580ea15e25e6b270f47681afb5689cafc9e25712445ce715bcd18e", size = 212061 },+=======name = "pyopenssl"version = "25.0.0"source = { registry = "https://pypi.org/simple" }@@ -5264,6 +5351,27 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/8e/5e/c86a5643653825d3c913719e788e41386bee415c2b87b4f955432f2de6b2/pypdf2-3.0.1-py3-none-any.whl", hash = "sha256:d16e4205cfee272fbdc0568b68d82be796540b1537508cef59388f839c191928", size = 232572 },]+[[package]]+name = "pyperclip"+version = "1.9.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz", hash = "sha256:b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310", size = 20961 }++[[package]]+name = "pyrect"+version = "0.2.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/cb/04/2ba023d5f771b645f7be0c281cdacdcd939fe13d1deb331fc5ed1a6b3a98/PyRect-0.2.0.tar.gz", hash = "sha256:f65155f6df9b929b67caffbd57c0947c5ae5449d3b580d178074bffb47a09b78", size = 17219 }++[[package]]+name = "pyscreeze"+version = "1.0.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pillow", marker = "python_full_version < '3.12'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/ee/f0/cb456ac4f1a73723d5b866933b7986f02bacea27516629c00f8e7da94c2d/pyscreeze-1.0.1.tar.gz", hash = "sha256:cf1662710f1b46aa5ff229ee23f367da9e20af4a78e6e365bee973cad0ead4be", size = 27826 }+[[package]]name = "pysocks"version = "1.7.1"@@ -5415,6 +5523,18 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/8b/71/a531e6648455fd8a936530c67c619a33726f55331bacdac74aa6742d0baf/pytidb_experimental-0.0.1.dev4-py3-none-any.whl", hash = "sha256:5ba3f5bb533927b0f82421df4c6f379dafd4f2afe8cfaf15ec0f00833794f1d0", size = 17824 },]+[[package]]+name = "python3-xlib"+version = "0.15"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/ef/c6/2c5999de3bb1533521f1101e8fe56fd9c266732f4d48011c7c69b29d12ae/python3-xlib-0.15.tar.gz", hash = "sha256:dc4245f3ae4aa5949c1d112ee4723901ade37a96721ba9645f2bfa56e5b383f8", size = 132828 }++[[package]]+name = "pytweening"+version = "1.2.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/79/0c/c16bc93ac2755bac0066a8ecbd2a2931a1735a6fffd99a2b9681c7e83e90/pytweening-1.2.0.tar.gz", hash = "sha256:243318b7736698066c5f362ec5c2b6434ecf4297c3c8e7caa8abfe6af4cac71b", size = 171241 }+[[package]]name = "pytz"version = "2024.2"@@ -5961,6 +6081,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/d7/8f/c3654f6f1ddb75daf3922c3d8fc6005b1ab56671ad56ffb874d908bfa668/ruamel.yaml.clib-0.2.12-cp312-cp312-win_amd64.whl", hash = "sha256:0467c5965282c62203273b838ae77c0d29d7638c8a4e3a1c8bdd3602c10904e4", size = 115523 },]+[[package]]+name = "rubicon-objc"+version = "0.5.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/d3/13/586c9baa985eae0f718029506b40ca41295d51a546567414b2bcf8ccacef/rubicon_objc-0.5.0.tar.gz", hash = "sha256:18f075649780d95df53d483642068c767d7d2cfbbf075ddef124a44b40b6d92e", size = 173652 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/6d/30/5b2407b8762ed882e5732e19c485b9ea2f07d35462615a3212638bab66c2/rubicon_objc-0.5.0-py3-none-any.whl", hash = "sha256:a9c2a605120d6e5be327d3f42a71b60963125987e116f51846757b5e110854fa", size = 62711 },+]+[[package]]name = "ruff"version = "0.7.4"@@ -7654,4 +7783,4 @@ source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz", hash = "sha256:2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4", size = 24545 }wheels = [{ url = "https://files.pythonhosted.org/packages/b7/1a/7e4798e9339adc931158c9d69ecc34f5e6791489d469f5e50ec15e35f458/zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931", size = 9630 },-]+]\ No newline at end of file