35 Commits
Author SHA1 Message Date
zeekay 99809579e6 chore(release): @hanzo/mcp 2.4.16
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
publish / publish (push) Failing after 1m16s
Hanzo CI/CD / test-amd64 (push) Successful in 2m6s
Hanzo CI/CD / cicd (push) Successful in 1m37s
CI/CD / cicd (push) Successful in 3m48s
2026-10-04 16:15:00 -07:00
zooqueenandHanzo Dev 58ddbc51e5 Add the llm tool to the TypeScript surface: Enso, the catalog, feedback
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
publish / publish (push) Failing after 59s
Hanzo CI/CD / test-amd64 (push) Successful in 1m47s
Hanzo CI/CD / cicd (push) Successful in 1m37s
CI/CD / cicd (push) Successful in 3m29s
HIP-0300 names llm among the optional tools and Python and Rust carry it,
but the TypeScript server had none, so an agent on @hanzo/mcp could ask
Kai a typed question and could not reach a model.

llm routes by action over api.hanzo.ai:
- query: POST /v1/chat/completions, model enso-auto unless named; "auto"
  lets Enso pick. max_cost and max_latency_ms ride as X-Max-Cost and
  X-Max-Latency-Ms. It returns the model that served (X-Routed-Model, else
  the body's model) and the completion id feedback takes.
- models: GET /v1/models, each model's family, class and per-million
  price as the catalog states it; family narrows to enso or kai.
- feedback: POST /v1/ai/feedback with request_id, signal and a 1-3
  rating; an envelope that says error is an error.

Co-authored-by: Hanzo Dev <[email protected]>
2026-10-04 11:23:44 -07:00
zeekay 0e11347985 Add npx, uvx and jq to the TypeScript surface
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
publish / publish (push) Failing after 51s
Hanzo CI/CD / test-amd64 (push) Successful in 2m25s
Hanzo CI/CD / cicd (push) Successful in 3m55s
CI/CD / cicd (push) Successful in 6m24s
exec gains run(): an argv with no shell, waited on up to a deadline, then
left running in exec's process table. npx and uvx use it with Python's argv
and a two-minute deadline; jq passes its filter as one argv word.

@hanzo/mcp 2.4.14
2026-09-30 15:17:34 -07:00
zeekay 46b081c99e Give the TypeScript fs tool Python's contract
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
Hanzo CI/CD / cicd (push) Successful in 1m52s
CI/CD / cicd (push) Successful in 3m40s
Hanzo CI/CD / test-amd64 (push) Successful in 1m45s
publish / publish (push) Failing after 2m50s
read returns numbered lines and the full sha256 hash, write only creates,
apply_patch takes old_text and new_text under base_hash, list walks with
depth, pattern and cursor, patch takes the Rust grammar, and search_text
takes a pattern and glob. rg now runs without a shell, so a pattern is never
a shell word.

@hanzo/mcp 2.4.13
2026-09-30 15:06:58 -07:00
zeekay c58488a2a3 Add browser and cdp to the TypeScript surface, over the ZAP router
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
publish / publish (push) Failing after 58s
Hanzo CI/CD / test-amd64 (push) Successful in 2m5s
Hanzo CI/CD / cicd (push) Successful in 1m53s
CI/CD / cicd (push) Successful in 4m32s
src/zap.ts is a consumer seat on the unix socket of whichever process the
lock elected: zapd has no JS or wasm build, so this runtime joins as
mcp/hanzo-<pid> and never stands for router. browser and cdp carry Python's
action names, parameters and extension methods; headless Playwright covers
the core, navigation and tabs when no browser is registered. The test runs
PyPI zapd as the router in another process, with a fake extension.

@hanzo/mcp 2.4.12
2026-09-30 14:52:19 -07:00
zeekay 30fafe2616 kai_decide, kai_choice, kai_score and kai_noul ask Kai typed questions on /v1/decisions, in @hanzo/mcp 2.4.11 2026-09-28 14:31:22 -07:00
zeekayandHanzo Dev 6355e41558 @hanzo/mcp 2.4.10
Co-authored-by: Hanzo Dev <[email protected]>
2026-09-11 13:44:31 -07:00
zeekay 5bde2a515d Pin react, next and typescript to the estate versions
The ranges already admitted them; naming the version is what stops one
repo drifting to a different resolution than its neighbours.
2026-09-03 04:26:25 -07:00
zeekay c724ae360a Let the tests run again
Every suite had stopped executing. ts-jest peers on `typescript >=4.3 <7`
and this repo builds against 7, so all twenty files died inside ConfigSet
with "Cannot read properties of undefined (reading 'fileExists')" — twenty
failures, zero tests, and nothing to read them by because the push gate
deliberately runs typecheck and build rather than jest.

swc transforms instead: it strips types rather than asking the compiler
to, so it has no TypeScript version to disagree with, and `tsc --noEmit`
already answers the question ts-jest was answering twice.

Running as real ESM then exposed what the CommonJS fallback had hidden.
jest.mock does not hoist there, so a static import binds the real module
and the suite fails on `mockReturnValue is not a function` — an absent
mock reported as a broken one. The search, autogui and ui suites now
register through unstable_mockModule and import after it. One of them had
never mocked fs at all: it cast fs.promises to a mocked type and called
mockImplementation on the real module.

384 tests, twenty suites, all passing.
2026-09-01 09:42:54 -07:00
zeekay 914af987d1 Let cloud write the catalog, and drop the second generator 2026-08-31 23:42:26 -07:00
zeekay bb0ba82020 Generate the cloud surface instead of writing it
The seven resources this offered had drifted from the fleet it names: paas is
platform, storage is s3, auth folded into iam, and iam alone carries 97
operations against the handful the hand-written tool reached. It also dialled
four hosts for one API.

The names come from cloud's typed operations now, so this client cannot come to
disagree with the API about what exists. The withholding rule is asked of cloud
rather than restated here — a client deriving its set from the raw catalog offers
what the fleet refuses.

The default surface is unchanged at 22 tools; the fleet sits behind hanzo, whose
resource enum is derived rather than listed.
2026-08-30 15:57:28 -07:00
zooqueen c4a13bbf81 serve MCP over stdio and http, and bind no other port
The tool surface reaches a browser through zapd's native host, so the server
side of the localhost WebSocket transport has no counterpart. Removing it
takes `ws` out of the dependencies with it.

2.4.7.
2026-08-19 20:58:55 -07:00
zooqueen 5ff9e09bed serve the tools over streamable http
`serve --transport http` answered "not yet implemented" and exited. It now
serves the streamable http transport through the SDK's StreamableHTTPServer
Transport: a fresh server and transport per request, stateless — no session
header, each POST answered on its own.

The request handlers are registered once, in registerHandlers, and both the
stdio and http paths call it. The tool surface a client sees is the same on
either transport.
2026-08-14 20:19:23 -07:00
zooqueenandHanzo Dev 6182d0d800 feat(tools): tracker_* — the shared board, so an agent can report its own work
An agent could already keep a todo list (`tasks`), but only on its own disk.
Nothing here reached the board a human looks at, so "what is this agent doing"
had no answer outside the agent. These four tools are the cloud /v1/tracker
surface — the ONE work-item primitive — as MCP tools.

They are deliberately NOT called tasks_*. Three planes are easy to braid and
cloud apps/tracker/contract.go is law about it: a tracker Issue is a work item,
hanzoai/tasks is durable async execution, and the local `tasks` tool is a
private file at ~/.hanzo/todos.json. Naming these tasks_* would have collided
with that third one and pointed callers at the plane nobody can see.

Linking a run needed no new field. An agent's run is a SESSION — "mission" is
not modeled anywhere in the fleet — and the tracker contract already defines
extRef as "a link INTO another plane", so `session` writes the anchor
`session:<id>` and hanzo.app renders that session's live status on the row.
tracker_create defaults source to agent, because the board's ?source=agent
filter is only true if agents say so.

Cloud's own refusal reaches the caller verbatim — "unknown status filter" is
worth more to an agent than a generic failure — and the org is never sent: it
is minted server-side from the bearer, and a tool that sends one is a tool
asking to be trusted about tenancy.

NOTE: the jest suite cannot RUN on main right now — TypeScript 7.0.2 is
installed and ts-jest 29.4.6 cannot read its compiler API, so all 18 suites
fail to load. That break predates this commit and is orthogonal to it (verified
on a clean origin/main checkout). These tools were verified twice: 20 jest tests
green under the TS 5 toolchain, and 11 runtime checks through the shipped
esbuild bundle under main's current dependency state.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-04 21:57:27 -07:00
zeekayandHanzo Dev 4eac54ccec build: typescript ^7.0.2 (native compiler)
TypeScript 7 is the native Go compiler; the npm package is a shim that
resolves a platform-specific native binary.

Safe here because the build does not emit through tsc — esbuild bundles
both entrypoints, so tsc is typecheck-only and the published artifact is
byte-for-byte unaffected by the compiler change. Repos that emit with
tsc are deliberately NOT being bumped in this pass.

Verified: tsc --noEmit reports 0 errors (instant), pnpm build exits 0 and
produces dist/index.js + dist/cli.js as before.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-27 15:16:19 -07:00
zeekayandHanzo Dev b33bcad727 build: move mcp to pnpm and delete the second lockfile
This repo committed BOTH package-lock.json and pnpm-lock.yaml — two descriptions of
one dependency tree, neither reconciled against the other. CI then ran
`npm ci || npm install`, which is the shape that lets that persist: when the lockfile
stops matching package.json, the fallback silently resolves a different tree and the
run still goes green. A lockfile nobody fails on is not a lockfile.

Now there is one. pnpm-lock.yaml is tracked, package-lock.json is deleted and
ignored along with every other manager's, corepack takes the pnpm version from
`packageManager`, and Docker and CI both install with --frozen-lockfile so a drifted
tree stops the build instead of being papered over.

The `pnpm.onlyBuiltDependencies` field in package.json was dead — pnpm 11 reads
settings from pnpm-workspace.yaml and prints a warning that it ignored it. Its five
entries moved there verbatim, documented, so the build-script denial is actually in
effect rather than merely written down.

esbuild goes ^0.27.4 -> ^0.28.1, the version console already builds with. 0.27.4's
install script overwrites its own bin/esbuild with a raw ELF, and pnpm's shim reads
a missing shebang as "run this with node", so `pnpm build` died on
`SyntaxError: Invalid or unexpected token` at the first byte. Same minor series, and
it is what makes the build work under pnpm at all.

Verified: frozen-lockfile install clean, `pnpm build` emits a 617KB bundle, 354
tests passing.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-27 08:24:23 -07:00
zeekay 9fa8e5f446 2.4.4: self-hosted runners only + real tool-roundtrip integration test
CI:
- Drop GitHub-hosted ubuntu/macOS/Windows runners per org policy
  (NO GITHUB BUILDERS). All jobs now run on [self-hosted, amd-medium]
  or [self-hosted, arm-medium] — native amd64 + arm64 in parallel,
  no QEMU.
- 6 jobs: build/test × {amd64, arm64}, integration × {amd64, arm64},
  e2e-against-published × {amd64, arm64}, security audit.

Integration test (scripts/smoke-mcp.mjs, also 'npm run smoke'):
- Replaced the initialize-only probe with a 6-step real-tool roundtrip
  on one stdio session: initialize → tools/list → tools/call fs.read
  on a real on-disk probe → tools/call fs.list → resources/list →
  resources/read. Validates serverInfo, tool catalog membership, and
  payload bodies. Local run: 6/6 pass in <1s.

This is the actual contract Claude Desktop / Code / Cursor use. If
this passes on amd64 + arm64 native, the package works.
2026-05-13 13:23:09 -07:00
zeekay 638d77aa60 2.4.3: cross-platform CI matrix + MCP smoke test + HANZO_MCP_DEBUG + docs
Catches the class of bug that shipped in 2.4.1 (silent stdio hang because
'serve' was being routed to the wrong binary).

- .github/workflows/ci.yml: matrix on ubuntu / macOS / Windows × Node 20/22.
  Adds a 'smoke' job that runs scripts/smoke-mcp.mjs (spawn cli.js, send
  initialize, require serverInfo.name === hanzo-mcp within 20 s) on every
  supported OS, and an 'e2e-npx' job that does the same against the
  *published* npm package via the exact npx invocation Claude Desktop /
  Claude Code generate. This is what was missing — local builds were fine,
  but the published-bin routing was broken.

- scripts/smoke-mcp.mjs: cross-platform MCP-protocol smoke test, also
  exposed as 'npm run smoke'.

- src/cli.ts: always-on startup banner now includes node version + platform
  so support logs are useful by default. HANZO_MCP_DEBUG=1 adds cwd,
  resolved CLI path, argv, and PATH prefix — surfaces 'wrong binary
  shadowing hanzo-mcp' bugs immediately.

- README.md: Troubleshooting section with stdio-handshake test command,
  HANZO_MCP_DEBUG setup, log paths for macOS / Windows, and the rationale
  for the '--package=' arg form.
2026-05-13 12:56:19 -07:00
zeekay 46af5708c1 fix(cli): correct npx invocation so Claude Desktop config actually works
Two coordinated fixes for the Claude Desktop integration:

1. package.json: add 'mcp' bin alias pointing to dist/cli.js
   so 'npx @hanzo/mcp ...' auto-resolves the binary by name
   match (npx strips scope: '@hanzo/mcp' → 'mcp').

2. cli.ts: install-* generators now emit args:
     ['-y', '--package=@hanzo/mcp', 'hanzo-mcp', 'serve']
   instead of:
     ['-y', '@hanzo/mcp', 'serve']

   The broken form treats 'serve' as a separate package and runs
   the unrelated 'serve' (static-file server) instead of hanzo-mcp,
   which is why some users saw the MCP server 'hang' silently.

Affects all 8 install targets: Claude Desktop, Claude Code, Codex,
Cursor, Windsurf, VS Code, JetBrains, --all.

Bump 2.4.1 → 2.4.2.
2026-05-13 11:46:30 -07:00
zeekay 8746f6a269 chore: update all dependencies to latest, switch to pnpm
Major version bumps:
- @modelcontextprotocol/sdk ^1.0.0 -> ^1.27.1
- commander ^11.1.0 -> ^14.0.3
- glob ^10.3.10 -> ^13.0.6
- minimatch ^9.0.3 -> ^10.2.4
- zod ^3.22.4 -> ^4.3.6
- esbuild ^0.19.11 -> ^0.27.4
- jest ^29.7.0 -> ^30.3.0
- typescript ^5.3.3 -> ^5.9.3
- @lancedb/lancedb ^0.13.0 -> ^0.27.1
- playwright ^1.47.0 -> ^1.58.2
- jsautogui ^1.0.0 -> ^2.1.3

Also externalize jsautogui, playwright, playwright-core in esbuild
to fix native module bundling errors.
2026-03-21 10:52:30 -07:00
zeekay 382154cbb0 fix: correct @hanzo/mcp version to 2.4.1 (patch bump from 2.4.0) 2026-03-12 18:26:03 -07:00
zeekay aa5074ac70 chore: bump @hanzo/mcp to 2.5.0, hanzo-mcp crate to 2.5.0
HIP-0300 bidirectional action sync release:
- Full action parity across Python/TS/Rust implementations
- 13 unified tools with complete action coverage
- Rust crate metadata: repository, homepage, keywords, categories
2026-03-12 15:39:30 -07:00
zeekay 656b60472e feat(zap): 100% MCP/ZAP protocol parity with method pass-through v2.4.0
- Add McpMethodHandler type and handleMethod option to ZAP server
- Refactor MCP handlers into reusable functions shared between MCP + ZAP
- CLI now starts ZAP server alongside stdio with full method dispatch
- All MCP methods (tools/*, resources/*, prompts/*) work identically over ZAP
- Fix TS strict mode error in code.ts summarize action
- 337/337 tests pass
2026-03-11 15:32:57 -07:00
zeekay 3b2c0cab5e feat(zap): add ZAP WebSocket server for browser extension discovery
Binary protocol server (9-byte header + JSON) on ports 9999-9995.
Extensions connect and discover tools via handshake, call tools via
RPC. Supports N simultaneous browser connections.
2026-03-11 13:12:50 -07:00
zeekay ac2000708d feat: HIP-0300 unified tool architecture (TS + Rust)
Implement 13 canonical tools organized by axis:
- Core (7): fs, exec, code, git, fetch, workspace, ui
- Optional (6): think, memory, hanzo, plan, tasks, mode

Key changes:
- Add src/tools/unified/ with action-routed tool implementations
- Add Rust native tools: exec, git, fetch, code, hanzo, tasks, workspace, computer
- Refactor tool index to default to unified surface (legacy available via enableLegacy)
- Simplify tests to match new architecture (337 tests, 15 suites pass)
- Update LLM.md with HIP-0300 architecture documentation
- Remove legacy shell_tool.rs and ui_tool/ (replaced by exec_tool.rs and computer_tool/)
- Stop tracking rust/target/.rustc_info.json
2026-03-11 11:37:15 -07:00
zeekay cc592ebdd0 feat: Unified UI tool with Hanzo-first multi-framework support v2.2.0
BREAKING CHANGE: Consolidated all UI tools into single 'ui' tool with methods

Major Changes:
- Single unified 'ui' tool replaces 13+ separate UI tools
- Hanzo UI as default framework (not shadcn)
- Method-based architecture for all UI operations

Supported Methods:
- list_components - List available components
- get_component - Get component source code
- get_demo - Get component demo/examples
- get_metadata - Get component dependencies
- list_blocks - List UI blocks
- get_block - Get block implementation
- search - Search components
- get_structure - Browse repository structure
- install - Install components
- set_framework - Switch frameworks
- get_framework - Get current framework
- create_composition - Create compositions

Framework Support (Hanzo-first):
- hanzo - Hanzo UI (React) [DEFAULT]
- hanzo-native - Hanzo UI React Native
- hanzo-vue - Hanzo UI Vue
- hanzo-svelte - Hanzo UI Svelte
- shadcn/react - shadcn/ui
- svelte - Svelte (shadcn)
- vue - Vue (shadcn)
- react-native - React Native Reusables

Benefits:
- 93% reduction in MCP tool surface area
- Cleaner AI assistant experience
- Better discoverability
- Easier maintenance
- Hanzo registry priority
2025-09-18 23:01:01 -05:00
zeekay 075661c92e feat: Full shadcn-ui-mcp-server parity with multi-framework support v2.1.0
Major Features:
- Complete GitHub API integration for fetching UI components
- Support for 5 frameworks: Hanzo (default), React, Svelte, Vue, React Native
- 13 new MCP tools for comprehensive UI component management
- Full parity with shadcn-ui-mcp-server functionality

New Tools:
- ui_get_component - Fetch component source code
- ui_get_component_demo - Get component usage examples
- ui_get_component_metadata - Extract dependencies and registry info
- ui_list_components - List all available components
- ui_get_block - Fetch UI blocks (complex compositions)
- ui_list_blocks - List blocks with categories
- ui_get_directory_structure - Browse repository structure
- ui_set_framework - Switch between frameworks
- ui_get_framework - Get current framework
- ui_set_github_token - Configure GitHub authentication
- ui_get_rate_limit - Check API rate limit status

Framework Support:
- Hanzo UI (hanzoai/ui) - Default framework
- React/shadcn (shadcn-ui/ui)
- Svelte (huntabyte/shadcn-svelte)
- Vue (unovue/shadcn-vue)
- React Native (founded-labs/react-native-reusables)

Technical Improvements:
- GitHub API client with rate limiting and caching
- Circuit breaker pattern for resilience
- 15-minute cache TTL for API responses
- Automatic authentication detection
- Support for blocks with multiple files
- Tree view directory browsing
2025-09-18 19:33:00 -05:00
zeekay 02e8a0d428 feat: Add multi-target install command
- New 'install' command with flags for different applications
- Supports --claude-desktop, --claude-code, --cursor, --vscode
- Add --all flag to install for all supported applications
- Backward compatibility with deprecated install-desktop command
- Improved server.js to default to serve command
- Version bump to 2.0.2
2025-09-15 12:44:33 -05:00
zeekay 22c08a5946 Improve CLI and organize tests
- Fix CLI to properly handle --version flag and serve command
- Made serve command the default command
- Added server.js as entry point wrapper
- Version bumped to 2.0.1 for npm release
- Organized test files into test/ directory
2025-09-15 08:44:21 -05:00
zeekay c9850818a9 docs: add MCP demo guide and test scripts
- Add comprehensive MCP_DEMO.md with setup instructions
- Add test scripts for E2E and protocol testing
- Update build configuration for better module compatibility
- Configure Claude Desktop with multiple MCP server options
2025-09-15 07:06:29 -05:00
zeekay 6b353a3f2f fix: add lint script to package.json for CI 2025-09-14 18:30:07 -05:00
zeekay 7e0448f10e feat: implement unified MCP search with OpenAI spec compliance and CI
## Core Implementation
- Unified search engine with strategy pattern for extensible search types
- Full OpenAI MCP specification compliance for search and fetch tools
- Multi-modal search strategies: Symbol, AST, Vector, Text, and File search
- Automatic strategy selection based on query characteristics

## Security & Remote Access
- Secure ngrok tunnel integration with automatic detection
- Multi-method authentication (Bearer token, API keys, JWT)
- Post-quantum TLS configuration support
- Rate limiting and CORS protection
- Access logging and monitoring
- Only exposes files when ngrok credentials are present

## Testing & CI
- 102 tests with 85% coverage on critical paths
- GitHub Actions CI workflow for automated testing
- Node.js 18.x and 20.x compatibility testing
- Coverage reporting to Codecov
- Security audit checks

## Documentation
- Comprehensive documentation in LLM.md
- Security guide in docs/SECURITY.md
- .npmrc excluded from repository for security

This implementation provides a production-ready search system for AI tools like ChatGPT and Claude Desktop.
2025-09-14 18:11:10 -05:00
zeekay 2354a08287 feat: implement comprehensive MCP tools from Python version
- Added 20+ core tools ported from Python MCP:
  - File operations: read, write, edit, multi_edit, create, delete, move, directory_tree
  - Search tools: grep, find_files, unified search
  - Shell tools: bash, run_command, background processes, process management
  - Edit tools: single and multi-edit with validation

- Added system prompt generation with project context
- Improved CLI with list-tools and install-desktop commands
- Created proper TypeScript types and interfaces
- Ready for integration with @hanzo/dev CLI
2025-07-24 03:30:22 -05:00
zeekay b5792025a5 feat: add CLI binary, update dependencies, and complete MCP implementation 2025-07-24 03:02:07 -05:00
zeekay 3d51b58ed6 Initial commit: TypeScript MCP server extracted from extension monorepo 2025-07-24 03:00:57 -05:00