Commit Graph
4 Commits
Author SHA1 Message Date
zeekayandGitHub 7114ce1322 feat(billing,admin): canonical usage-cap + promo openapi types (#35)
Curry-precise, code-faithful types for the spend-cap / promo money surface,
aligned to the HIP-0127 primitive algebra (Meter=usage, Policy=cap verdict,
Money=cents, Schedule=period window).

billing/openapi.yaml:
- /v1/billing/spend-alerts CRUD (list, create, patch, delete) +
  /v1/billing/spend-alerts/authorize (the per-request cap verdict the cloud
  metering gate consumes).
- SpendAlert (scope {project,service}, threshold cap cents, enforce, softPct,
  rateLimitRpm, derived period/resetsAt/periodSpentCents/over/warn),
  SpendAlertCreate, SpendAlertUpdate, CapVerdict, CapReason. spend_cap and
  insufficient_balance are DISTINCT reasons.
- Faithful to commerce api/billing/spend_alerts.go + spend_cap.go and the
  cloud clients/metering verdict.

admin/openapi.yaml:
- /v1/admin/promos CRUD; Promo {percentOff,start,end,plans,active},
  PromoCreate, PromoUpdate — the admin-set discount window.

git/openapi.yaml: single-quote a 400 description whose bare commas made the
merged master fail OpenAPI 3.1 structural validation (same flow-scalar bug
class avoided in the new specs).

Regenerated hanzo.yaml + CAPABILITIES.md; full master validates OpenAPI 3.1.
2026-07-18 09:32:33 -07:00
zeekayandHanzo Dev 2edd0decf2 git: SSH keys CRUD, client-less push, ZAP note, sshUrl
Extend git/openapi.yaml to match the new native-git surface in
hanzoai/cloud/clients/git (version stays 1.0.0):

- /v1/git/keys CRUD (registerGitKey/listGitKeys/deleteGitKey) — per-user SSH
  public keys backing `git clone [email protected]:<org>/<repo>.git`.
- /v1/git/repos/{name}/push (gitPush) — client-less push: build a commit from
  posted files (utf-8 or base64) and fire the push-to-deploy build.
- sshUrl added to the Repo schema (and PushResult): every repo now advertises
  both cloneUrl (HTTPS) and sshUrl (SSH, scp-style).
- ZAP transport documented in the spec description (procedures git/zap/* over
  the shared /zap WebSocket plane — one implementation, two transports, no gRPC).

New schemas: RegisterKey, Key, PushFile, PushRequest, PushResult. CHANGELOG
dated entry added; hanzo.yaml regenerated via merge.py (68 services, 1800 paths).

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-11 23:45:33 -07:00
zeekayandGitHub 4cc81ae1ea openapi: V8 · Open Edition — capabilities manifest + drop eval/operative dups (#26)
Hanzo CI/CD / cicd (push) Successful in 2m13s
CI/CD / cicd (push) Successful in 2m13s
- capabilities.yaml: THE registry — 8 domains, one capability = one name = one /v1/<name>
  = one spec. core + internal + collapsed + pending + review. merge.py's grouping source.
- info.version 1.0.0 -> 8.0.0 everywhere (routes stay /v1 — the contract is immutable;
  8.0.0 is the platform generation). Title carries 'V8 · Open Edition'.
- drop eval/ (pure dup of evals) + operative/ (computer-using-agent split: bot = the CUA,
  visor = the VM it runs on). hanzo.yaml regenerated.
2026-07-08 08:54:17 -07:00
01c59d173f Reconcile hanzo.yaml to the live cloud surface — 1698 paths, all products (#18)
* spec(ai): define /v1/images/generations + /v1/audio/{speech,transcriptions}

The ai spec's description already advertised /v1/images/* and /v1/audio/*
but never defined the operations. Add the OpenAI-compatible image generation,
text-to-speech, and speech-to-text (Whisper) operations + schemas so the spec
matches the SDK image/audio resources and what hanzo.chat consumes.

* spec(app): add hanzo.app projects & deployments surface (/v1/projects/*)

hanzo.app calls GET/POST /v1/projects, GET/PATCH/DELETE /v1/projects/{slug},
POST /v1/projects/{slug}/deploy (tar artifact or git build), and
GET /v1/projects/{slug}/deployments — none of which were in any spec.
New self-contained app service spec, top-level /v1/projects/* (path is the
contract, same rationale as top-level inference). Org is resolved server-side
from the IAM JWT owner claim, never sent by the browser.

* spec(base): add Hanzo Base records surface (/v1/collections/{collection}/records)

hanzo.app persists each site's working draft as a row in the Base site_drafts
collection (gated by VITE_BASE_URL) via GET(list+filter)/POST/PATCH on
/v1/collections/{collection}/records. Add a self-contained base service spec
covering the full record CRUD so the frontend contract is complete.

* spec(cloud): scrub literal '/api/' from product-surface comment

The only '/api/' occurrence left in any spec was a documentation comment.
Reword so 'grep -rn /api/' returns zero across the repo; meaning is unchanged
(every route is /v1/*).

* feat(openapi): regenerate unified hanzo.yaml (38 services, 1590 paths)

Regenerated via merge.py after adding app + base and the ai image/audio ops.
Verified: zero /api/ paths and zero /api/ literals across all specs; the only
non-/v1 routes are the unversioned infra probes /health, /healthz, /metrics.
README service index gains app + base rows.

* fix(merge): namespace operationIds by service in unified master

Two services can each define a unique-within-themselves operationId that
collides in the merged master (e.g. base.listRecords vs another service).
Redocly flagged 23 operation-operationId-unique errors, making the master
invalid as a single generatable document. Prefix operationIds with the
service tag — the same namespacing already applied to schemas/responses/
params — so the master is a globally-valid OpenAPI doc every client can
derive from. Per-service specs (Stainless inputs) keep their bare
operationIds. Master lint errors: 369 -> 100 (remainder is pre-existing
per-service nullable/summary debt, unrelated to this change).

* docs(sdk): document the one canonical regeneration path per SDK

hanzo.yaml is the source of truth; JS/Python/Go regenerate via the Stainless
'hanzo-ai' project (push spec -> PR), Rust is hand-written crates (not
spec-generated). Records the exact 'stl builds create' command + KMS-sourced
key for the hosted step.

* docs(openapi): document /v1/sdk enveloped secrets+sign surface (kms)

Add POST /v1/sdk/secrets — the SDK-facing native secrets plane served by
kmsd. Single RPC endpoint: the operation is the SIGNED op field, not the
URL; the ML-DSA-65 envelope IS the credential (no bearer, security: []).
Adds SdkEnvelope + SdkEnvelopeIdentity schemas. Regenerated hanzo.yaml.

* docs(sdk): record the real generation drift + the one-way

The published python/go/js SDKs derive from the LEGACY LLM-gateway spec, not
hanzo.yaml — they cover inference + gateway-admin only, none of the cloud
products. README implied otherwise; correct it. LLM.md now records: repoint
Stainless hanzo-ai -> hanzo.yaml, the 28 live /v1 prefixes with no spec, the 4
prefix-mismatch re-bases, and the stale monolith specs (cloud/nexus). Add cpp +
dart rows (openapi-generator on ARC) — one repo per language, one spec source.

* spec(agents,functions): add /v1/agents + /v1/functions surfaces from clients/*

Route-accurate to hanzoai/cloud/clients/{agents,functions}. agents covers
the agent CRUD + metered run + live session tree; functions covers
serverless CRUD + metered invoke + triggers/deployments/secrets/metrics.
Self-contained; regenerated hanzo.yaml (0 dup operationIds, 0 dangling refs).

* spec(framework,tracker,crm): add business-app surfaces from clients/*

Route-accurate to hanzoai/cloud/clients/{framework,tracker,crm}: framework
doctype/module/role + generic document CRUD, tracker projects+issues,
crm companies/contacts/opportunities.

* spec(automations,integrations,admin,plan): add orchestration + admin surfaces

Route-accurate to hanzoai/cloud/clients/{automations,integrations,admin,plan}:
automations flows/versions/runs/pieces/mcp, integrations provider-connect +
Slack, admin god-view aggregates, plans catalog/resolve/entitlements (the
plan spec expands the fixed-binding route loop, not just literal app.Get calls).

* spec(visor,zt): re-base onto live flat prefixes from clients/{visor,zt}

* spec(kb,prompts,templates): add /v1/{kb,prompts,templates} from clients/*

* spec(git,graph,do): add /v1/git + /v1/{indexers,oracles} + /v1/{vpcs,load-balancers} from clients/*

* spec(billing,security): add /v1/billing + /v1/security from clients/*

* spec(exec,websearch,tasks): add /v1/{exec,websearch,tasks} proxy surfaces; regen hanzo.yaml (58 services); changelog

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-04 15:26:21 -07:00