mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
Major improvements to mode and tool management: 1. Essential System Tools - Critical tools (llm, consensus, config, mode, tool, version, stats) are now ALWAYS enabled regardless of active mode. Previously, mode system disabled all tools then only enabled mode-specific ones, causing critical tools to be unavailable. 2. Unified 'tool' Command - Consolidates tool_install, tool_enable, tool_disable, tool_list into single 'tool' command with actions: - list: List all tools by category - enable/disable: Toggle tool state - install/uninstall: Package management - upgrade/reload: Update tools - self_update: Update hanzo-mcp 3. Fixed Permission Manager - Made permission_manager optional in: - FileSystemTool base class - ComputerTool - ConfigTool - ReadTool, WriteTool, EditTool Now creates default PermissionManager if not provided. 4. Fixed Mode System - Builtin modes (hanzo, minimal, fullstack, devops, security) are now always registered alongside hanzo-persona profiles. Previously they were skipped when hanzo-persona was available. 5. Updated ESSENTIAL_TOOLS constant with modern tool names and added llm, consensus, config, mode to ensure they're in all default modes. Version bump: 0.10.19 -> 0.10.20
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