Commit Graph
367 Commits
Author SHA1 Message Date
zeekay 7a5eba2dad feat(hanzo-tasks): Python SDK for durable task execution
New hanzo-tasks package wrapping temporalio SDK with Hanzo conventions:
- Client: connect, submit, get_result, cancel, signal, query
- Worker: register workflows/activities, poll and execute
- Pre-built workflows: AgentTaskWorkflow, PipelineWorkflow, FanOutWorkflow
- Pluggable agent executor via set_agent_executor()
- 28 tests passing
2026-03-19 10:29:31 -07:00
zeekay 867bda8090 rebrand: fix insights host URL and remove redundant env var fallback 2026-03-13 18:03:09 -07:00
zeekay 20778ab5c8 rebrand: PostHog→Insights in MCP analytics 2026-03-13 16:52:56 -07:00
zeekay df275b96f8 refactor(hanzo-mcp): clean up ZAP server bridge 2026-03-13 16:52:56 -07:00
zeekay 905cc907d8 test(zap,paas): add protocol and tool test suites
ZAP: 58 tests covering types, wire format encoding, server dispatch,
and full client-server integration over TCP (handshake, tool calls,
batch, ping, multiple clients, large payloads).

PaaS: 21 tests covering action routing, parameter validation, JWT
decode, auth fallbacks, deployment listing, and error propagation.
2026-03-13 16:52:56 -07:00
zeekay 46933ea6f5 fix(curl): accept json parameter in MCP tool registration
Field(alias="json") doesn't translate to Python kwargs — FastMCP
passes the schema name directly. Rename json_body to json in the
registered function signature.
2026-03-13 16:52:55 -07:00
zeekay 580ff05460 feat(hanzo-zap): add ZAP SDK package to monorepo (0.6.1)
Zero-copy Agent Protocol SDK — client, server, types.
Patch bump from PyPI 0.6.0 to bring into monorepo workspace.
2026-03-12 18:30:18 -07:00
zeekay c287c1eaf8 fix(zap): replace websockets with native ZAP TCP transport
- Rewrite zap_server.py to use asyncio TCP (not websockets library)
- ZAP server now speaks native binary protocol over raw TCP
- Wire format: [magic:4][type:1][length:4 BE][JSON payload]
- Remove websockets from ide optional dependency
- Fix type annotations: any -> Any, dict -> dict[str, Any]
- Add proper frame reading with asyncio.StreamReader.readexactly()
- Support MAX_MESSAGE_SIZE (16MB) limit per ZAP spec
2026-03-12 16:23:41 -07:00
zeekay 985bb9fedc chore(hanzo-mcp): bump version to 0.15.0
HIP-0300 bidirectional action sync release:
- Full action parity across Python/TS/Rust implementations
- 13 unified tools with complete action coverage
2026-03-12 15:39:28 -07:00
zeekay 6548975fd9 fix: ruff format MCP files + update required tool count to 21 2026-03-12 01:40:46 -07:00
zeekay 997b7b91fb fix: resolve mypy errors and update shell tool count in tests
- Fix type shadowing in forgiving_edit.py (needle_lines int/list conflict)
- Add return type annotations to prompts functions
- Fix change_type indexing for None case in utils.py
- Fix commit.message bytes/str handling in utils.py
- Add proper dict typing for tree entries in utils.py
- Update shell tool count from 8 to 9 in test assertions
2026-03-12 01:30:57 -07:00
zeekay e602907141 fix: resolve all ruff lint errors (F401, F841, E741, I001)
Remove unused imports, fix unsorted import blocks, rename ambiguous
variable, and remove unused local variable assignment.
2026-03-12 01:12:30 -07:00
zeekay 644620c743 fix(hanzo-mcp): update fallback version to 0.14.0, add watchdog to dev deps
- server.py: fallback version 0.12.5 → 0.14.0 (matches pyproject.toml)
- pyproject.toml: add watchdog>=3.0.0 to dev extras (required by dev_server.py)
2026-03-11 16:57:20 -07:00
zeekay d6c5630b2f feat(hanzo-mcp): 100% MCP/ZAP protocol parity with method pass-through v0.14.0
- Add handle_method parameter to ZapServer for full MCP protocol parity
- Server routes resources/list, resources/read, prompts/list, prompts/get through ZAP
- All MCP methods work identically over ZAP binary WebSocket transport
- Matches Node @hanzo/mcp v2.4.0 ZAP parity implementation
2026-03-11 15:33:00 -07:00
zeekay ff57f6ffe2 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 ff0043473e 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 1725d71492 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 7e25c192c6 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 3685b81f91 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 c9e279855f 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 5d03527549 bump: hanzo-tools-browser 0.4.4 2026-03-10 09:50:00 -07:00
zeekay 45674599f3 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 22a66029c0 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 7ffee0d761 chore: bump hanzo-tools-shell 0.6.3, hanzo 0.4.2 (Windows compat) 2026-03-09 21:11:39 -07:00
zeekay 949b6c8bdf 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 1a7ec1bad0 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 8176a2b4bd 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 1132e4beae 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 c7496dee8a 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 259d437061 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 231b2288a5 fix(ci): sort imports in 4 test files (ruff I001) 2026-03-06 14:45:17 -08:00
zeekay 66762c2941 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 2b883711ad chore: gitignore build/ artifacts, remove tracked build files 2026-03-06 12:24:01 -08:00
zeekay 30fb202cf0 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 279afc5ad0 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 a10852c523 feat(browser): add wait_for_selector, query_selector_all to extension actions 2026-03-06 03:49:20 -08:00
zeekay 9ad7dba847 feat(browser): add navigation/fetch/history to extension actions 2026-03-06 03:43:55 -08:00
zeekay 833dbd715e 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 4ebf26df3e 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 c69a39146a 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 237c801a7b 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 d2c6d50557 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 69b8948dd6 feat(mcp): consolidate memory surface and restore local tool compatibility 2026-03-04 15:21:57 -08:00
zeekay e35be26f75 fix(test-hanzo-tools): align tool expectations and modernize websockets import 2026-03-04 12:52:05 -08:00
zeekay 32aea4054b fix(ci): resolve root lint failures across workspace packages 2026-03-04 12:15:14 -08:00
zeekay 9491fc94bb fix(ci): apply black formatting and bump hanzo-mcp to 0.12.3 2026-03-04 11:57:07 -08:00
zeekay 6c8d3c69b9 fix(ci): clean lint/format and bump hanzo-mcp to 0.12.2 2026-03-04 11:53:51 -08:00
zeekay 79701d26c4 chore(release): bump hanzo-mcp to 0.12.1 2026-03-04 11:30:57 -08:00
zeekay 0279142e4a fix: finalize latest MCP/CLI/SDK updates 2026-03-04 11:27:19 -08:00
zeekay 483d645dd9 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