Files
zeekay 214621b6ca Serve the hub at api.hanzo.ai/v1/skills
Every route mounts under /v1/skills, the address api.hanzo.ai routes to
this API; auth, personas, users, tokens, upload, integrations, search and
whoami are sub-resources and RESERVED keeps them from being slugs. The
web, the OG renderers, the CLI's default registry, /.well-known/bothub.json
and openapi.json name api.hanzo.ai. Sign-in calls back to
api.hanzo.ai/v1/skills/auth/callback and hands the token over in the
fragment.

The store starts again. docker-entrypoint.sh read Base's port from
BASE_PORT, which Kubernetes sets to tcp://<ip>:<port> in a namespace
holding a Service named base; Base now listens on 127.0.0.1:8090, fixed.
The collections migration is rewritten for the Base the Dockerfile pins
(1.5.91): flat field options, declared created/updated, and the users
collection every Base already has, extended rather than created twice.

Reads are anonymous against public rules, since Base takes IAM
credentials only and no longer serves password sign-in; writes answer
503 saying so. The catalogue migration, generated by scripts/catalog.mjs,
publishes the 83 skills in hanzoai/bot@8be8f1dc7b. /health reports the
store, so the probes restart a pod whose Base is gone.

cache.ts decides caching once: an anonymous 2xx GET is public for a
minute (five at the edge) with a weak ETag and 304s; a credential, a
write or an error is private, no-store. Filter values go through lit().
Embeddings go through api.hanzo.ai and are skipped without a key.

k8s/ was a second declaration of the deployment; universe is the one.
2026-09-30 01:10:48 -07:00

1.6 KiB

summary, read_when
summary read_when
Deploy: one image (Base + API + web), pinned by digest in hanzoai/universe.
Shipping to production
Debugging /v1 routing

Deploy

One image, ghcr.io/hanzoai/bot-hub, runs three processes (docker-entrypoint.sh):

  • Hanzo Base on 127.0.0.1:8090 (data; reachable only inside the pod)
  • the API (Hono, api/) on :3001 — every route under /v1/skills, plus /health
  • the web app (TanStack Start + Nitro) on :3000

api.hanzo.ai/v1/skills reaches :3001 (hanzoai/universe infra/aws/routes/services.yaml, router skills). hub, market and skills.hanzo.bot serve the web from :3000, and their /v1/… answers 308 to api.hanzo.ai/v1/skills/…. Nothing is served under /api.

Sign-in is Hanzo IAM: the API redirects to https://hanzo.id/v1/iam/oauth/authorize as hanzo-bothub, and IAM calls back to https://api.hanzo.ai/v1/skills/auth/callback, declared in universe charts/app/values/hanzo/iam-provision.yaml.

Release

  1. Build at the build door (POST https://api.hanzo.ai/v1/build), never on a workstation.
  2. Pin the tag and digest in universe charts/app/values/hanzo/bot-hub.yaml; CD rolls it.

Registry discovery

The CLI discovers the API base from /.well-known/bothub.json. Without it, set:

export BOTHUB_REGISTRY=https://api.hanzo.ai

Post-deploy checks

curl -i https://api.hanzo.ai/v1/skills            # 200, public, ETag
curl -i https://api.hanzo.ai/v1/skills/auth/me    # 401, private, no-store
curl -i https://hub.hanzo.bot/v1/skills           # 308 -> https://api.hanzo.ai/v1/skills