Commit Graph
498 Commits
Author SHA1 Message Date
zeekay 3aba26db16 fix(zap): dual-protocol decode, fix tool extraction, persist auth token
- Decode supports both MCP ZAP and hanzo/dev wire formats
- Fix _start_zap_server to use _tool_manager._tools (not .items())
- Persist auth token to ~/.hanzo/mcp_token instead of random per-run
2026-03-11 13:26:46 -07:00
zeekay 1ff7bfc10f feat(zap): add ZAP WebSocket server for browser extension discovery
Binary protocol server matching Node MCP implementation. Auto-starts
in background thread on run(). Supports multi-browser connections on
ports 9999-9995.
2026-03-11 13:12:52 -07:00
zeekay 53282938f4 docs: add LLM.md project guide 2026-03-11 10:14:51 -07:00
zeekay 69dd83710b feat(tools): bidirectional HIP-0300 action sync across Python/TS/Rust
Sync all tool actions across all three language implementations:
- code: +8 actions (search_symbol, outline, metrics, exports, types, hierarchy, rename, grep_replace)
- fetch: +2 actions (request, open)
- think: restructured to 12 action-based handlers
- tasks: +12 actions (stats, search, batch, archive, move, prioritize, assign, subtasks, notes, export, import, delete)
- plan: +13 actions (create, show, list, next, archive, add_step, remove_step, estimate, visualize, clone, cancel, notes, progress)
- mode: +3 actions (switch alias, list_presets, select_preset)
- memory: +10 actions (search, stats, clear, export, import, merge, tag, untag, namespaces, history)
- fs: +1 action (mv)
- git: +21 actions (blame, show, stash, tag, remote, merge, rebase, cherry_pick, reset, clean, init, clone, fetch, pull, push, config, worktree, reflog, shortlog, rev_parse, describe, bisect)
2026-03-10 21:57:50 -07:00
zeekay 7090d1c2ae feat(tools): fix BaseTool dispatch + achieve 100% HIP-0300 conformance
- Fix BaseTool.register() to bypass FastMCP's broken **kwargs introspection
  by creating Tool objects manually with Pydantic extra="allow" models
- Add PARAM_ALIASES support for cross-implementation parity (path→uri)
- Fix ExecTool to use ShellExecutor.run_shell() (correct 5-tuple API)
- Fix CodeTool tree-sitter import for tree-sitter-language-pack 0.25+
- Fix MemoryTool fallback to markdown backend when knowledge service unavailable
- Add ExecTool to shell TOOLS list
- Remove redundant register() overrides from code/fetch/plan/vcs/fs tools
- Add code, network, mode test categories to conformance suite (23 cases)
- Add parallel benchmark (benchmark_parallel.py)

Results: Python 23/23 (100%), 350/350 parallel calls async-safe
2026-03-10 19:41:02 -07:00
zeekay efc1459649 feat: add HIP-0300 cross-language MCP conformance test suite
Python script that speaks raw MCP JSON-RPC over stdio to test behavioral
equivalence across TypeScript and Python MCP servers. Maps unified (fs,
exec, git) and legacy (read_file, run_command) tool names transparently.

Results: TS 12/12 (100%), Python 11/12 (92%) — parity on fs, shell, vcs.
2026-03-10 17:17:30 -07:00
zeekay c27035430d feat(mcp): register code, git, fetch tools for HIP-0300 parity with TS MCP
Wire up the three missing HIP-0300 unified tools:
- code (AST, symbols, definition, references, transform)
- git (status, diff, commit, branch, log)
- fetch (search, fetch, download, crawl)

These packages existed but weren't in hanzo-mcp dependencies.
Also updates their dep from hanzo-tools-core to hanzo-tools.

Bumps hanzo-mcp to 0.13.0.
2026-03-10 16:50:08 -07:00
zeekay 52c4add894 fix(browser): unwrap CDP Runtime.evaluate results for consistency
The CDP bridge server now unwraps Runtime.evaluate results from the
nested CDP format {result: {type, value}} to just the value, matching
Playwright's evaluate return format.

Also bumps hanzo-tools-browser to 0.4.5 and hanzo-mcp to 0.12.9.
2026-03-10 10:38:31 -07:00
zeekay 3365393641 bump: hanzo-tools-browser 0.4.4 2026-03-10 09:50:00 -07:00
zeekay d02dda001b fix(browser): add missing action-to-method mappings in CDP bridge
url, title, reload, go_back, go_forward, tab_info were not mapped
to their hanzo.* / Page.* CDP equivalents, causing "Unknown method"
errors when routed through the extension.
2026-03-10 09:45:15 -07:00
zeekay ef77e9d31f feat: auto-install uvloop on Linux/macOS with platform gate
Move uvloop from opt-in [performance] extra to a platform-gated hard
dependency (sys_platform != 'win32'). On Linux/macOS it installs
automatically; on Windows pip/uv skips it entirely. Runtime fallback
in hanzo_async already handles ImportError gracefully.

- hanzo-async 0.1.2 → 0.1.3: uvloop now a default dep
- hanzo-mcp 0.12.7 → 0.12.8: uvloop in main deps, removed from [performance]
2026-03-09 21:11:54 -07:00
zeekay 191b74b779 chore: bump hanzo-tools-shell 0.6.3, hanzo 0.4.2 (Windows compat) 2026-03-09 21:11:39 -07:00
zeekay 1f801dcb93 fix: Windows/WSL compatibility for shell tools and CLI helpers
- exec_tool: add Windows shell detection (pwsh/cmd), use taskkill for process kill
- shell_detect: skip Unix paths on Windows, add pwsh/cmd fallback chain
- dev.py: replace all `which` subprocess calls with shutil.which()
- test_hanzo_dev: use shutil.which() instead of subprocess which
2026-03-09 21:10:37 -07:00
zeekay 173243a482 fix(ci): fix Windows test workflow - hanzoai installs from root, not pkg/
hanzoai is the root workspace package (pyproject.toml at repo root),
not pkg/hanzoai. Also use wslpath for reliable workspace path in WSL.
2026-03-09 20:57:53 -07:00
zeekay 6ae84e9f65 fix: Windows + WSL compatibility across python-sdk
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
2026-03-09 20:50:55 -07:00
zeekay 85e186ee28 chore: add README.md for hanzo-tools-code and hanzo-tools-test
Required for PyPI package builds (hatchling validates readme existence).
2026-03-09 17:49:54 -07:00
zeekay cffe020f57 fix(ci): add hanzo-tools-ui to pyright exclude list
New package was missing from the pyright exclude, causing
"Cannot instantiate abstract class" error in CI lint.
2026-03-07 00:10:49 -08:00
zeekay 91d6283cea fix(ci): install libatomic1 for pyright on ARC runner
The hanzo-build ARC runner image is missing libatomic.so.1 which
pyright-python's bundled Node.js requires. Install it before linting.
2026-03-07 00:07:40 -08:00
zeekay bbeaaa3dd2 fix: resolve all I001 import sorting errors across monorepo
Auto-fix 75 import sorting violations detected by ruff check
across hanzo-mcp, hanzo-network, hanzo-tools-*, and other packages.
Verified clean with both ruff 0.14.6 and 0.14.14 (CI version).
2026-03-07 00:01:43 -08:00
zeekay b15250328b fix(ci): relax config tool count, install hanzo-tools shim in test matrix
Config tools use try/except for graceful degradation so the count
varies by environment. Accept >= 1 instead of exactly 2.
2026-03-06 23:49:53 -08:00
zeekay aff98ecc38 fix(ci): install hanzo-tools shim before hanzo-tools-core in test workflow
hanzo-tools-core depends on hanzo_tools.core.unified which is provided
by the hanzo-tools base package. Install it first. Also add config and
computer packages to test matrix.
2026-03-06 23:46:48 -08:00
zeekay 277515e0e7 fix: ruff lint errors across hanzo-tools-* packages (I001, F401, F541)
Fix 21 auto-fixable errors: import sorting (I001), unused import (F401),
and empty f-strings (F541) in 13 files across tool packages.
2026-03-06 23:44:10 -08:00
zeekay dd5ae39e55 fix(ci): install local hanzo-tools-agent in release-check venv
The release-check creates a fresh venv that pulls from PyPI where
hanzo-tools-agent 0.3.1 still has IChingTool. Override with local.
2026-03-06 15:01:10 -08:00
zeekay 86410899d0 fix(ci): drop --no-deps from local tool installs to resolve psutil
The --no-deps flag skipped transitive deps like psutil needed by
hanzo-tools-shell. Let uv resolve deps naturally.
2026-03-06 14:58:31 -08:00
zeekay cc7af1282b fix(ci): remove PYTEST_DISABLE_PLUGIN_AUTOLOAD, override addopts in CI
The pyproject.toml addopts includes -p asyncio which conflicts with
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1. Override addopts in CI commands
to get clean test output with full error messages.
2026-03-06 14:53:07 -08:00
zeekay c0f2f47959 fix(ci): install local tool packages in CI to match monorepo renames
CI was pulling hanzo-tools-agent 0.3.1 from PyPI which still has
IChingTool. Override with local editable installs so ZenTool/etc
are available during tests.
2026-03-06 14:49:55 -08:00
zeekay 248267bc8d fix(ci): sort imports in 4 test files (ruff I001) 2026-03-06 14:45:17 -08:00
zeekay 4c8b36fab9 ci: switch all workflows to hanzo-build ARC runners, fix stale iching refs
- Replace ubuntu-latest with hanzo-build across all 11 workflow files
- Fix IChingTool → ZenTool references in test-hanzo-mcp and test-hanzo-tools
2026-03-06 14:42:06 -08:00
zeekay d63f961a42 fix(ci): align test expectations with tool renames, fix ruff lint/format
- test_all_tools: todo→tasks, iching→zen tool name expectations
- ruff: fix import sorting in test files
- ruff: format server.py and batch_tool.py
2026-03-06 14:10:57 -08:00
zeekay d5f5c3e400 chore: gitignore build/ artifacts, remove tracked build files 2026-03-06 12:24:01 -08:00
zeekay 5c93279b64 fix(screen): write captures to file instead of returning inline base64
Screenshots and session frames are now saved to ~/.hanzo/screen/ and
the tool returns the file path. Prevents blowing up context with ~52K
chars of base64 per capture.
2026-03-06 04:18:32 -08:00
zeekay 2627398822 fix(mcp): inject hanzo-mcp version into MCP server metadata
Sets _mcp_server.version from importlib.metadata so clients see the
correct hanzo-mcp package version instead of the default.
2026-03-06 03:56:01 -08:00
zeekay 074acc447d feat(browser): add wait_for_selector, query_selector_all to extension actions 2026-03-06 03:49:20 -08:00
zeekay 6528f39f13 feat(browser): add navigation/fetch/history to extension actions 2026-03-06 03:43:55 -08:00
zeekay 3ac1f9f890 fix(browser): fix extension result passthrough, add DOM actions
- Fix result normalization: non-dict values no longer crash with **spread
- Add 20+ DOM actions to extension_actions set (get/set HTML/text,
  attributes, styles, classes, mutations, localStorage, cookies, etc.)
- Bump hanzo-tools-browser 0.4.3, hanzo-mcp 0.12.6
2026-03-06 03:33:33 -08:00
zeekay d5818d2dc9 feat(mcp): unify tool surfaces, rename iching→zen, fix test infrastructure
- Consolidate memory tools into single unified surface
- Rename IChingTool → ZenTool across agent tools
- Rename tool files: proc_tool→exec_tool, net_tool→fetch_tool,
  vcs_tool→git_tool, todo_tool→tasks_tool
- Add hanzo_tool.py for unified Hanzo API surface
- Add workspace_tool.py for config management
- Add hanzo-tools-ui package with GitHub API integration
- Add unified.py core tool dispatcher
- Update IAM client to RFC-compliant OAuth endpoints
- Fix pytest-asyncio plugin conflict: pin <1.0.0, fix addopts
  double-registration, and align test APIs to current signatures
- Fix integration tests: PermissionManager API, ReviewProtocol
  focus values, AgentTool parameter names, mock llm module for CI
2026-03-06 03:13:54 -08:00
zeekay aff3ec6e8a bump: hanzo-tools-browser 0.4.2, hanzo-mcp 0.12.4
- browser: auto-start CDP bridge on BrowserTool init (extension-first routing)
- mcp: pin hanzo-tools-browser>=0.4.2
2026-03-06 00:55:37 -08:00
zeekay 167ed4ed80 fix(browser): auto-start CDP bridge on BrowserTool init
The CDP bridge server (ws://localhost:9223 + http://localhost:9224)
was never starting because the entrypoint loader instantiates
BrowserTool directly, bypassing the package-level register_tools()
which called start_cdp_bridge().

Now BrowserTool.__init__() auto-starts the bridge when backend is
not "playwright", ensuring the browser extension can connect and
be used as the preferred backend over headless Playwright.
2026-03-06 00:32:42 -08:00
zeekay 08cd64afac feat(browser): configurable backend + fix CDP bridge for websockets >= 13
- Add BROWSER_BACKEND env var: firefox | chrome | extension | playwright | auto
- Config persists to ~/.hanzo/extension/config.json
- Fix CDP bridge WebSocket handler signature for websockets >= 13 (new API)
- Add browser-based client resolution in CDP bridge
- Add /config GET/POST endpoints for extension preference sync
- Backend-aware routing: explicit backends don't fall back to Playwright
2026-03-04 19:35:00 -08:00
zeekay 257b919265 feat(mcp): consolidate memory surface and restore local tool compatibility 2026-03-04 15:21:57 -08:00
zeekay 3d697783dd fix(test-hanzo-tools): align tool expectations and modernize websockets import 2026-03-04 12:52:05 -08:00
zeekay 98a1ef1f7c fix(ci): resolve root lint failures across workspace packages 2026-03-04 12:15:14 -08:00
zeekay 668c9ca6da fix(ci): apply black formatting and bump hanzo-mcp to 0.12.3 2026-03-04 11:57:07 -08:00
zeekay 5ed24f2dfb fix(ci): clean lint/format and bump hanzo-mcp to 0.12.2 2026-03-04 11:53:51 -08:00
zeekay cf25f89ae3 chore(release): bump hanzo-mcp to 0.12.1 2026-03-04 11:30:57 -08:00
zeekay 453485d061 fix: finalize latest MCP/CLI/SDK updates 2026-03-04 11:27:19 -08:00
zeekay 79bc725482 feat(dns): add multi-provider DNS CLI
- hanzo dns zones/list/add/rm/update commands
- Multi-provider architecture: Cloudflare + CoreDNS
- Parallel queries across all configured providers
- Provider abstraction for easy extension (Route53, GoDaddy, etc.)
- Thread-safe parallel execution with ThreadPoolExecutor
- Legacy credential format backward compatible
2026-03-03 23:04:29 -08:00
zooqueen f0fab6fe4c fix(ci): apply black formatting to base.py and enhanced_repl.py
Reformat multiline string arguments in write_text() calls and
collapse a ternary expression to satisfy black<26.1 style check
in the Test Hanzo Python SDK CI workflow.
2026-03-03 07:58:23 -08:00
zooqueen 5a5641c6df Add Pages resource and Gateway resource with DNS alignment
New Pages resource for CF Pages project/deployment/domain management.
New Gateway resource for rate limit and routing rule CRUD. DNS resource
gains update_record and verify_domain methods for platform alignment.
2026-03-03 07:45:05 -08:00
zeekay d3d3961399 feat: rename PostHog analytics -> Insights in hanzo-mcp
- Add insights_analytics.py with InsightsAnalytics class
- Env var reads INSIGHTS_API_KEY first, falls back to POSTHOG_API_KEY
- Analytics = InsightsAnalytics alias preserves backward compat
- Delete posthog_analytics.py
- Update __init__.py imports
2026-03-02 14:09:16 -08:00