Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ jobs:
- uses: actions/checkout@v4

# The unified `hanzo` front door (hanzo-js/hanzo) ships beside @hanzo/cli:
# it depends on it, so the two go out together. A plain `git clone` on the
# runner prompts for credentials even for a public repo; checkout does not.
- uses: actions/checkout@v4
with:
repository: hanzo-js/hanzo
path: .hanzo-pkg
# it depends on it, so the two go out together. Fetched as a public
# tarball: this run's token is scoped to hanzoai/cli and answers 404 for
# another org's repo (checkout), and a bare `git clone` on the runner
# prompts for credentials. codeload needs neither.
- name: The hanzo package source
run: |
set -euo pipefail
mkdir -p .hanzo-pkg
curl -fsSL https://codeload.github.com/hanzo-js/hanzo/tar.gz/refs/heads/main \
| tar -xz -C .hanzo-pkg --strip-components=1
node -p 'const p=require("./.hanzo-pkg/package.json"); p.name+"@"+p.version'

- uses: actions/setup-node@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions npm/bin/hanzo.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ if (rawName === "hanzo-dev" || rawName === "dev") {

// The binary this launcher execs must be HERE (it is run by absolute path);
// companions only need to be findable on PATH, which starts here.
// `@hanzo/mcp` taught `… mcp serve`; the native server serves stdio bare, so a
// leading `serve` is the same request and must not die as an unknown command.
if (targetTool === "mcp" && argv[0] === "serve") argv = argv.slice(1);

const missing = required.filter((t) => (t === targetTool ? !hasLocal(t) : !hasTool(t)));
if (missing.length > 0 && existsSync(installScript) && env.HANZO_NO_LAZY_INSTALL !== "1") {
spawnSync(process.execPath, [installScript, ...missing], {
Expand Down
2 changes: 1 addition & 1 deletion npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hanzo/cli",
"version": "8.5.909",
"version": "8.5.910",
"description": "Hanzo CLI — unified CLI, coding agent (dev), MCP server, local inference engine, and node",
"license": "MIT",
"repository": {
Expand Down
Loading