mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
hanzo-tools-browser: the zapd router envelope (frame.rs mirror) is no longer reimplemented — zapd_consumer now uses zap.frame + zap.ZapClient (dep zap-proto>=1.2.0). The end-to-end browser command codec stays local and untagged to match the extension's decodeCmd (frame.encode_cmd is tagged and would corrupt it); a new test proves the byte layout. hanzo-zap: wire.py now delegates the zero-copy codec (Message/Builder/ ObjectBuilder/object readers) to canonical zap.wire instead of a 3rd hand-rolled copy; the hanzo cloud-service schema + handshake + frame I/O remain as a thin layer. dep zap-proto>=1.2.0. 114 tests pass.
hanzo-tools-browser
Browser automation tools for Hanzo MCP using Playwright.
Installation
pip install hanzo-tools-browser
Tools
browser - Complete Playwright API
70+ browser actions for full automation.
Navigation:
browser(action="navigate", url="https://example.com")
browser(action="go_back")
browser(action="reload")
Input:
browser(action="click", selector="button.submit")
browser(action="fill", selector="input[name=email]", text="[email protected]")
browser(action="type", selector="textarea", text="Hello")
Touch/Mobile:
browser(action="tap", selector=".button")
browser(action="swipe", selector=".carousel", direction="left")
browser(action="emulate", device="mobile") # or tablet, laptop
Assertions:
browser(action="expect_visible", selector=".modal")
browser(action="expect_text", selector="h1", expected="Welcome")
browser(action="expect_url", expected="*/dashboard*")
Content:
browser(action="get_text", selector=".content")
browser(action="screenshot", full_page=True)
browser(action="pdf")
Parallel Agents:
# Each agent gets isolated session
browser(action="new_context") # Separate cookies/storage
Device Presets:
mobile- iPhone-like (390x844, touch)tablet- iPad-like (1024x1366, touch)laptop- MacBook-like (1440x900)iphone_14,pixel_7,ipad_pro, etc.
License
MIT