Files
bot/NOTICE
zeekay f105ffff17 fix: make the published package installable and the CLI actually run
The public repo could not be installed or run, and the two defects share a
cause: a rename left constants pointing at names that do not exist.

Install: @hanzo/iam was pinned to github:hanzo-js/iam#main, a private repo, so
pnpm install failed with ERR_PNPM_FETCH_404 for anyone without access to it —
including CI, which passes no token, so the image install could not have
resolved it either. The package is published, so depend on it from npm. That
leaves no dependency needing credentials, so the Dockerfile's GIT_TOKEN plumbing
goes too; it wrote the token into .npmrc and took it on a build arg, which
docker history keeps.

The SDK names its server-side types Config/AuthResult/JwtClaims, so alias them
to the Iam* names the gateway wrapper exposes. Config is what validateToken and
IamClient accept; IAMConfig is the browser entrypoint's config and does not
belong here.

CLI: package.json declares hanzo-bot.mjs as its bin, but ENTRY_WRAPPER_PAIRS
listed bot.mjs twice and hanzo-bot.mjs never, so isMainModule() saw no pair,
entry.ts skipped its body, and every invocation exited 0 with no output — a
gateway that starts, registers nothing and stops. Derive the pairs from the
bin wrappers and the entry files hanzo-bot.mjs imports, as a cross product, so
a row cannot be duplicated or dropped.

Version: resolveBinaryVersion() skips any package.json whose name is not
CORE_PACKAGE_NAME, which read "bot" while the package ships as @hanzo/bot, so
the package.json path resolved nothing and the version came from build-info.json
alone — absent from a bundle-only build, which then reported 0.0.0.

Both new tests fail when their defect is reintroduced: they assert against the
bins package.json declares and against the real package.json, rather than
restating the value under test.

Also from hanzobot/core: cloud-node detection behind one helper, node-host
reusing startPlaygroundRegistration instead of a second hand-rolled copy, the
playground node API on /v1, and the install smoke tests naming the package
@hanzo/bot rather than the bin name.
2026-07-15 23:25:40 -07:00

45 lines
2.3 KiB
Plaintext

bot
Copyright (c) 2026 Hanzo AI Inc.
This product includes software from OpenClaw, formerly Warelay / Clawdbot / Moltbot (https://github.com/openclaw/openclaw), licensed under MIT:
Copyright (c) 2026 OpenClaw Foundation
--- Fork provenance ---
Forked from https://github.com/openclaw/openclaw — OpenClaw, the personal AI
assistant published by the OpenClaw Foundation (upstream sites openclaw.ai and
docs.openclaw.ai). Hanzo Bot tracks the TypeScript reference implementation of
that project. This repository's root commit is the OpenClaw initial import
(matching the upstream repository's own initial commit), and earlier upstream
names — Moltbot, Clawdbot, Warelay — are recorded in CHANGELOG.md.
--- DEVIATIONS ---
Changes made by Hanzo AI, Inc. on top of the OpenClaw MIT baseline:
- Rebranded product-facing surfaces to "Hanzo Bot": CLI binaries `hanzo-bot` and
`bot`, npm package `@hanzo/bot`, README, and documentation pointing to hanzo.ai
and docs.hanzo.ai. Legacy `CLAWDBOT_*` and `BOT_*` environment variables are
retained for compatibility.
- Added Hanzo IAM (OIDC) authentication for the Gateway (src/gateway/auth-iam.ts,
src/commands/auth-choice.apply.hanzo-iam.ts), driven by the canonical
IAM_CLIENT_ID, IAM_CLIENT_SECRET, IAM_TOKEN_ENDPOINT and IAM_AUTHORIZE_ENDPOINT
environment variables.
- Added an org-scoped bot-management API on the Gateway, authenticated at the
pod boundary: GET /v1/bots (list the caller org's runs) and
POST /v1/bots/:runId/stop (src/gateway/bots-http.ts).
- Added per-tenant LLM billing through IAM (src/gateway/billing/, including
iam-billing-client.ts and the billing gate).
- Added Playground control-plane registration (src/gateway/playground-registration.ts):
the gateway and cloud-provisioned node hosts register, heartbeat and deregister
against /v1/nodes. Cloud provisioning is signalled by HANZO_PLAYGROUND_CLOUD_NODE
(src/infra/cloud-node.ts).
- Added a cloud image, Dockerfile.cloud, layering the bot Gateway on
ghcr.io/hanzoai/operative for cloud agents, plus render.yaml, hanzo.toml and
bot.podman.env deployment configuration.
- Routed CI to Hanzo self-hosted ARC runners (hanzo-build-linux-amd64,
hanzo-deploy-linux-amd64) instead of GitHub-hosted runners.
- Added a social CLI surface (src/cli/social-cli.ts) and a cloud connect flow
(src/commands/cloud-connect.ts).