mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
Make uvloop fully opt-in (performance extra only, not a hard dep). Add Windows native support: shell resolution (pwsh/cmd), signal handling (SIGKILL guard), platform-appropriate paths, chmod guards. Changes: - hanzo-mcp: move uvloop from hard dep to [performance] extra - hanzo-tools-shell: resolve pwsh/powershell/cmd on Windows, use correct invocation flags (cmd /c, pwsh -Command) - hanzo-tools-shell: guard signal.SIGKILL (doesn't exist on Windows) - hanzo-tools-computer: replace HOME=/tmp fallback with Path.home() - hanzo-mcp cli: platform-appropriate socket path default - hanzoai auth: skip os.chmod on Windows - hanzo install: skip os.chmod on Windows - Add .github/workflows/test-windows.yml (native + WSL2 matrix) Versions bumped: hanzo-mcp 0.12.7, hanzo-async 0.1.2, hanzo-tools-shell 0.6.2, hanzo-tools-computer 0.5.4
hanzo-tools-computer
Computer control tools for Hanzo AI - pyautogui-based Mac automation.
Installation
pip install hanzo-tools-computer
Usage
from hanzo_tools.computer import ComputerTool, register_tools
# Register with MCP server
register_tools(mcp_server, permission_manager)
Actions
Mouse
click- Click at (x, y)double_click- Double click at (x, y)right_click- Right click at (x, y)move- Move mouse to (x, y)drag- Drag to (x, y)scroll- Scroll by amount
Keyboard
type- Type text stringpress- Press single keyhotkey- Press key combination
Screen
screenshot- Capture screenlocate- Find image on screeninfo- Get screen/mouse info
Examples
# Click at coordinates
computer(action="click", x=100, y=200)
# Type text
computer(action="type", text="Hello world")
# Keyboard shortcut (Cmd+C on Mac)
computer(action="hotkey", keys=["command", "c"])
# Take screenshot
computer(action="screenshot")
# Get screen info
computer(action="info")
Safety
- FAILSAFE enabled: Move mouse to corner to abort
- macOS only (checks platform)
- All actions run in executor threads (non-blocking)
License
MIT