hanzo-tools-browser 0.5.5: surface CdpTool alias under cdp name

Adds CdpTool — a subclass of BrowserTool with `name = "cdp"` — so MCP
clients can reach the same browser control surface under both
`mcp__hanzo__browser` and `mcp__hanzo__cdp`. One implementation
(BrowserTool.execute is shared), two registered names. ZAP server,
CDP-bridge fallback, and Playwright transport stack are all shared.
This commit is contained in:
2026-06-10 08:12:58 -07:00
parent 0bc37b93c3
commit a8ab808c84
2 changed files with 17 additions and 2 deletions
@@ -66,12 +66,27 @@ _zap_thread: Optional[threading.Thread] = None
_zap_loop: Optional[asyncio.AbstractEventLoop] = None
_zap_started_event: Optional[threading.Event] = None
class CdpTool(BrowserTool):
"""Alias of BrowserTool surfaced under the ``cdp`` name.
Same action surface and transport stack as ``browser`` — both call into
the in-process ZAP server (canonical) and fall back to the legacy CDP
HTTP bridge or Playwright. Exposed as a separate tool so callers that
think in terms of *Chrome DevTools Protocol* can reach the same control
surface under a recognizable name. There is one implementation; this
class only changes ``name``.
"""
name = "cdp"
# Tools list for entry point discovery
TOOLS = [BrowserTool]
TOOLS = [BrowserTool, CdpTool]
__all__ = [
# Main tool
"BrowserTool",
"CdpTool",
"browser_tool",
"create_browser_tool",
# Browser pool
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "hanzo-tools-browser"
version = "0.5.4"
version = "0.5.5"
description = "Browser automation tools with ZAP-native extension routing — Python MCP hosts the ZAP server on an OS-assigned port and advertises via mDNS (HIP-0069). No node bridge, no port pool, no lockfile."
readme = "README.md"
requires-python = ">=3.12"