mirror of
https://github.com/hanzoai/skills.git
synced 2026-11-19 00:47:36 +00:00
hanzoskills.com/llms.txt now opens with the install line, the API reference index and the company index, so an agent that lands on any one of the three can find the rest. robots.txt claimed 537 documents while llms.txt counts 920. The number is gone from robots.txt; llms.txt derives it. public/ is regenerated from scripts/site.py, which it had fallen behind: the copy-prompt menu and agent bar were in the generator and not in the committed pages. tests/site.mjs passes against the result. Co-authored-by: Hanzo Dev <[email protected]>
408 lines
44 KiB
HTML
408 lines
44 KiB
HTML
<!doctype html>
|
||
<html lang="en"><head>
|
||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||
<title>hip-0121</title>
|
||
<meta name="color-scheme" content="dark">
|
||
<style>
|
||
/* Committed to one visual world: a dark instrument panel. No light variant —
|
||
the dot field and the hairline rules only read on black, and a naive
|
||
inversion would wash both out. Every colour is painted explicitly so the page
|
||
never borrows a host background. */
|
||
@font-face{font-family:'Zen';src:url('/fonts/Zen-Variable.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
|
||
@font-face{font-family:'Zen';src:url('/fonts/Zen-Italic-Variable.woff2') format('woff2');font-weight:100 900;font-style:italic;font-display:swap}
|
||
@font-face{font-family:'Zen Mono';src:url('/fonts/ZenMono-Variable.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
|
||
@font-face{font-family:'Zen Mono';src:url('/fonts/ZenMono-Italic-Variable.woff2') format('woff2');font-weight:100 900;font-style:italic;font-display:swap}
|
||
@font-face{font-family:'Zen Pixel Square';src:url('/fonts/ZenPixel-Square.woff2') format('woff2');font-style:normal;font-display:swap}
|
||
|
||
:root{
|
||
--ink:#f4f4f2; --soft:#9c9c98; --faint:#6a6a66; --ground:#000; --panel:#0a0a0a;
|
||
--line:#232323; --line-hi:#3a3a3a; --accent:#f4f4f2;
|
||
--font-zen-sans:'Zen',-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
|
||
--font-zen-mono:'Zen Mono',ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,monospace;
|
||
--font-zen-pixel-square:'Zen Pixel Square',monospace;
|
||
--mono:var(--font-zen-mono);
|
||
--sans:var(--font-zen-sans);
|
||
/* Controls are pills and surfaces are soft, as on hanzo.ai. */
|
||
--r:999px; --r-soft:14px;
|
||
}
|
||
*{box-sizing:border-box}
|
||
html{-webkit-text-size-adjust:100%}
|
||
body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--sans);
|
||
font-size:16px;line-height:1.65;-webkit-font-smoothing:antialiased}
|
||
.wrap{max-width:60rem;margin:0 auto;padding:0 1.75rem}
|
||
|
||
/* The dot field. A halftone made of one repeating radial-gradient, faded out
|
||
along the diagonal by a mask so it reads as a wave rather than wallpaper. */
|
||
/* No overflow clip here: the dot field is inset to the box already, and a clip
|
||
would cut off the copy-prompt menu. */
|
||
.hero{position:relative;border-bottom:1px solid var(--line)}
|
||
.hero::before{content:"";position:absolute;inset:0;
|
||
background-image:radial-gradient(var(--line-hi) 1px, transparent 1px);
|
||
background-size:7px 7px;
|
||
-webkit-mask-image:linear-gradient(115deg,#000 0%,rgba(0,0,0,.55) 38%,transparent 72%);
|
||
mask-image:linear-gradient(115deg,#000 0%,rgba(0,0,0,.55) 38%,transparent 72%);
|
||
pointer-events:none}
|
||
.hero .wrap{position:relative;padding-top:5.5rem;padding-bottom:4rem}
|
||
|
||
nav{border-bottom:1px solid var(--line)}
|
||
nav .in{max-width:60rem;margin:0 auto;padding:1.1rem 1.75rem;display:flex;
|
||
justify-content:space-between;align-items:center;gap:1rem}
|
||
.brand{font-family:var(--mono);font-size:.85rem;letter-spacing:.14em;
|
||
text-transform:uppercase;color:var(--ink);text-decoration:none;
|
||
display:inline-flex;align-items:center;gap:.6rem}
|
||
.brand i{font-style:normal;color:var(--faint)}
|
||
.mark{width:1.15em;height:1.15em;display:block;flex:0 0 auto}
|
||
nav a.up{font-family:var(--mono);font-size:.72rem;letter-spacing:.14em;
|
||
text-transform:uppercase;color:var(--soft);text-decoration:none}
|
||
nav a.up:hover{color:var(--ink)}
|
||
|
||
h1{font-family:var(--mono);font-size:clamp(2rem,5.4vw,3.4rem);line-height:1.12;
|
||
letter-spacing:-.02em;margin:0 0 1.1rem;font-weight:500;text-wrap:balance}
|
||
h1 em{font-style:normal;color:var(--faint)}
|
||
.lede{color:var(--soft);font-size:1.05rem;max-width:52ch;margin:0 0 2.25rem}
|
||
|
||
.btns{display:flex;flex-wrap:wrap;gap:.7rem;margin:0 0 .5rem;align-items:center}
|
||
.btn{display:inline-flex;align-items:center;gap:.5rem;font-family:var(--mono);
|
||
font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;
|
||
padding:.8rem 1.4rem;border:1px solid var(--line-hi);border-radius:var(--r);
|
||
color:var(--ink);text-decoration:none;background:transparent;cursor:pointer;
|
||
line-height:1.2;font-weight:400}
|
||
.btn:hover{background:#141414;text-decoration:none;border-color:var(--soft)}
|
||
.btn.solid{background:var(--ink);color:#000;border-color:var(--ink)}
|
||
.btn.solid:hover{background:#d8d8d4}
|
||
.btn .chev{width:.7em;height:.7em;flex:0 0 auto;transition:transform .15s ease}
|
||
.btn[aria-expanded="true"] .chev{transform:rotate(180deg)}
|
||
|
||
/* Copy-prompt selector. Each row copies the prompt for its own target. */
|
||
.copy{position:relative;display:inline-flex}
|
||
.menu{position:absolute;top:calc(100% + .5rem);left:0;z-index:20;min-width:21rem;
|
||
background:var(--panel);border:1px solid var(--line-hi);border-radius:var(--r-soft);
|
||
padding:.4rem;display:flex;flex-direction:column;
|
||
box-shadow:0 12px 32px rgba(0,0,0,.75)}
|
||
.menu[hidden]{display:none}
|
||
.mi{display:flex;align-items:center;gap:.7rem;width:100%;text-align:left;
|
||
padding:.62rem .8rem;border:0;border-radius:calc(var(--r-soft) - .35rem);
|
||
background:transparent;color:var(--ink);font-family:var(--mono);font-size:.76rem;
|
||
letter-spacing:.04em;text-decoration:none;cursor:pointer;line-height:1.3;
|
||
white-space:nowrap}
|
||
.mi:hover,.mi:focus-visible{background:#181818;outline:none}
|
||
.mi .mark{width:1.05rem;height:1.05rem;color:var(--soft)}
|
||
.mi:hover .mark{color:var(--ink)}
|
||
.mi u{margin-left:auto;color:var(--faint);text-decoration:none;font-size:.68rem;
|
||
letter-spacing:.1em;text-transform:uppercase}
|
||
|
||
/* Works-with bar: one scrolling row, name and mark per agent. */
|
||
.strip{border-bottom:1px solid var(--line);background:var(--panel)}
|
||
.strip .in{max-width:60rem;margin:0 auto;padding:.9rem 1.75rem;display:flex;
|
||
align-items:center;gap:1.25rem;font-family:var(--mono);font-size:.72rem;
|
||
letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
|
||
.strip b{color:var(--soft);font-weight:400;flex:0 0 auto;
|
||
border-right:1px solid var(--line);padding-right:1.25rem;align-self:stretch;
|
||
display:flex;align-items:center}
|
||
.bar{display:flex;align-items:center;gap:.5rem;flex:1 1 auto;min-width:0;
|
||
overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;
|
||
-webkit-overflow-scrolling:touch;
|
||
-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 3rem),transparent);
|
||
mask-image:linear-gradient(90deg,#000 calc(100% - 3rem),transparent)}
|
||
.bar::-webkit-scrollbar{display:none}
|
||
.agent{display:inline-flex;align-items:center;gap:.45rem;flex:0 0 auto;
|
||
padding:.4rem .85rem;border:1px solid var(--line);border-radius:var(--r);
|
||
color:var(--soft);white-space:nowrap;scroll-snap-align:start;
|
||
text-decoration:none;background:var(--ground)}
|
||
.agent:hover{color:var(--ink);border-color:var(--line-hi);text-decoration:none}
|
||
.agent .mark{width:.95rem;height:.95rem}
|
||
|
||
h2{font-family:var(--mono);font-size:1.1rem;letter-spacing:-.01em;margin:2.75rem 0 .75rem;font-weight:500}
|
||
h3{font-size:1rem;margin:2rem 0 .5rem;font-weight:600}
|
||
h4,h5,h6{font-size:.94rem;margin:1.5rem 0 .5rem;font-weight:600}
|
||
p{margin:0 0 1rem;max-width:70ch}
|
||
ul,ol{margin:0 0 1rem;padding-left:1.35rem;max-width:70ch}
|
||
li{margin:.22rem 0}
|
||
a{color:var(--ink);text-decoration:underline;text-underline-offset:3px;
|
||
text-decoration-color:var(--line-hi)}
|
||
a:hover{text-decoration-color:var(--ink)}
|
||
a:focus-visible{outline:1px solid var(--ink);outline-offset:3px}
|
||
code{font-family:var(--mono);font-size:.85em;background:var(--panel);
|
||
border:1px solid var(--line);border-radius:5px;padding:.1em .36em}
|
||
pre{background:var(--panel);border:1px solid var(--line);padding:1rem 1.1rem;
|
||
border-radius:var(--r-soft);overflow-x:auto;margin:0 0 1.25rem}
|
||
pre code{background:none;border:0;padding:0;font-size:.82rem;line-height:1.7}
|
||
blockquote{margin:0 0 1rem;padding-left:1rem;border-left:1px solid var(--line-hi);color:var(--soft)}
|
||
hr{border:0;border-top:1px solid var(--line);margin:2.5rem 0}
|
||
table{border-collapse:collapse;width:100%;margin:0 0 1.25rem;font-size:.92rem;
|
||
display:block;overflow-x:auto}
|
||
th,td{border:1px solid var(--line);padding:.5rem .7rem;text-align:left}
|
||
|
||
.curl{display:block;background:var(--panel);border:1px solid var(--line);
|
||
border-radius:var(--r-soft);padding:.95rem 1.1rem;font-family:var(--mono);
|
||
font-size:.8rem;color:var(--soft);overflow-x:auto;margin:0 0 2.5rem;
|
||
white-space:pre;line-height:1.9}
|
||
.curl b{color:var(--ink);font-weight:400}
|
||
.curl i{font-style:normal;color:var(--faint)}
|
||
|
||
/* index */
|
||
#q{width:100%;padding:.85rem 1.2rem;font-family:var(--mono);font-size:.85rem;color:var(--ink);
|
||
background:var(--panel);border:1px solid var(--line);border-radius:var(--r);margin:0 0 .6rem}
|
||
#q::placeholder{color:var(--faint);text-transform:uppercase;letter-spacing:.1em;font-size:.72rem}
|
||
#q:focus{outline:none;border-color:var(--soft)}
|
||
#count{color:var(--faint);font-family:var(--mono);font-size:.72rem;letter-spacing:.1em;
|
||
text-transform:uppercase;margin:0 0 2rem}
|
||
.cat{margin:2.5rem 0 .5rem;font-family:var(--mono);font-size:.7rem;letter-spacing:.16em;
|
||
text-transform:uppercase;color:var(--faint);border-bottom:1px solid var(--line);
|
||
padding-bottom:.45rem}
|
||
.row{display:block;padding:.6rem .9rem;margin:0 -.9rem;border-bottom:1px solid var(--line);
|
||
border-radius:var(--r-soft);text-decoration:none}
|
||
.row:hover{background:#0a0a0a}
|
||
.nm{font-family:var(--mono);font-size:.84rem;color:var(--ink);display:block}
|
||
.ds{color:var(--soft);font-size:.9rem;display:block;margin-top:.12rem}
|
||
footer{margin-top:4rem;padding:2rem 0 4rem;border-top:1px solid var(--line);
|
||
color:var(--faint);font-size:.85rem}
|
||
footer a{color:var(--soft)}
|
||
.fmap{display:grid;gap:1.75rem;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));
|
||
margin:0 0 2rem;font-size:.85rem}
|
||
.fmap b{display:block;font-family:var(--mono);font-size:.68rem;letter-spacing:.16em;
|
||
text-transform:uppercase;color:var(--faint);font-weight:400;margin:0 0 .6rem;
|
||
border-bottom:1px solid var(--line);padding-bottom:.4rem}
|
||
.fmap a{display:inline-block;color:var(--ink);text-decoration:none;margin:.3rem .35rem 0 0}
|
||
.fmap a:hover{text-decoration:underline}
|
||
.fmap div{color:var(--faint);line-height:1.5}
|
||
.fend{border-top:1px solid var(--line);padding-top:1.25rem;font-size:.82rem}
|
||
|
||
@media (max-width:640px){
|
||
.hero .wrap{padding-top:3.25rem;padding-bottom:2.75rem}
|
||
.btns{gap:.5rem}
|
||
.btn{padding:.75rem 1.15rem;font-size:.68rem}
|
||
.copy,.copy .btn{width:100%;justify-content:center}
|
||
.menu{left:0;right:0;min-width:0}
|
||
.strip .in{flex-direction:column;align-items:flex-start;gap:.6rem;padding:.9rem 1.75rem}
|
||
.strip b{border-right:0;padding-right:0}
|
||
.bar{width:100%}
|
||
}
|
||
</style>
|
||
<link rel="alternate" type="text/markdown" href="/hip-0121.md">
|
||
|
||
<link rel="icon" href="/favicon.svg">
|
||
<link rel="canonical" href="https://hanzoskills.com/hip-0121">
|
||
</head>
|
||
<!-- Reading this with a machine? Every page here is also plain markdown.
|
||
This one: https://hanzoskills.com/hip-0121.md
|
||
Index: https://hanzoskills.com/llms.txt
|
||
Corpus: https://hanzoskills.com/all.md
|
||
Append .md to any path for the markdown twin. -->
|
||
<body>
|
||
<nav><div class="in">
|
||
<a class="brand" href="/"><svg class="mark" viewBox="0 0 67 67" fill="currentColor" aria-hidden="true"><path d="M22.21 67V44.6369H0V67H22.21Z"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z"/><path d="M22.21 0H0V22.3184H22.21V0Z"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z"/></svg> HANZO<i>SKILLS</i></a>
|
||
<a class="up" href="/">All skills</a>
|
||
</div></nav>
|
||
|
||
<div class="wrap">
|
||
<h1>hip-0121</h1><p class="lede">HIP-121: BYO Compute Fleet & Metered Billing. Status Final. Hanzo architectural specification.</p><h1>HIP-0121: BYO Compute Fleet & Metered Billing</h1>
|
||
<h2>Abstract</h2>
|
||
<p>This proposal defines the <strong>unified compute fleet</strong>: one per-org registry of attached compute — managed Hanzo clusters, bring-your-own (BYO) Kubernetes clusters, BYO GPU / bare-metal boxes, and bring-your-own-cloud (BYOC) accounts — exposed through a single <code>/v1/clusters</code> surface, and a <strong>three-tier metered billing model</strong> that charges each source by <em>how it connects</em>:</p>
|
||
<ol><li><strong>1% of cloud spend</strong> for compute the org runs on another cloud (BYOC:</li></ol>
|
||
<p> AWS / Azure / GCP / DigitalOcean / Nebius), pulled from that cloud's own cost API.</p>
|
||
<ol><li><strong>$1/month per GPU or device</strong> flat for BYO hardware not on any cloud (bare</li></ol>
|
||
<p> metal, a workstation, a desktop-linked box).</p>
|
||
<ol><li><strong>Free / native</strong> if the box is a mainnet validator of <code>hanzo.network</code>.</li></ol>
|
||
<p>Anyone brings compute → sees it in their fleet → schedules work on it → is billed fairly, on one invoice, through the canonical <code>commerce/metering</code> path — no manual step. Tenant isolation is the <strong>org boundary</strong>, enforced end to end: every credential and kubeconfig is sealed per-org in KMS (the MPC nodes see only ciphertext), and every fleet call is scoped by the gateway-validated <code>X-Org-Id</code> / <code>X-Project-Id</code>, never a client field.</p>
|
||
<p>The fleet is the <code>hanzoai/cloud</code> <code>clients/fleet</code> registry consumed by <code>clients/visor</code> (the <code>/v1/clusters</code> surface) and <code>clients/ml</code> (workload federation), per HIP-0106. <strong>Visor</strong> (HIP-0123) is the machine/cluster control plane. This HIP is the fleet + billing contract that sits on top of both.</p>
|
||
<h2>Specification</h2>
|
||
<h3>The fleet: one surface, one primitive, N sources</h3>
|
||
<p>A <strong>fleet</strong> is one org's set of compute <strong>sources</strong>. Each source has a <code>kind</code>, is owned by exactly one org (narrowed by project), and is served through the ONE <code>/v1/clusters</code> surface. There is never a second cluster surface.</p>
|
||
<p>| Source kind | How it attaches | Where it lives | |---|---|---| | <strong>Managed cluster</strong> | Hanzo provisions k8s (Kubernetes today; AWS/Azure/GCP via Visor provider backends) | Visor — merged into <code>GET /v1/clusters</code> | | <strong>BYO k8s cluster</strong> | Org pastes a kubeconfig → <code>POST /v1/clusters</code> | <code>fleet.Registry</code> (KMS-sealed) | | <strong>BYO GPU / bare metal</strong> | Box becomes a cluster via k3s + device plugins, OR a single box via <code>hanzo gpu connect</code> / desktop-link | <code>fleet.Registry</code> (cluster) / <code>FleetWorker</code> (box) | | <strong>Cloud account (BYOC)</strong> | Org connects THEIR AWS/Azure/GCP/DO/Nebius credentials; Visor provisions + manages <strong>in their account</strong> | Visor <code>Provider</code> (per-owner, sealed) |</p>
|
||
<p>The first three are compute <em>targets</em> the fleet can schedule onto; the fourth is a <em>provider</em> the fleet provisions against. All four are billed by the one model in "Three-tier billing" below.</p>
|
||
<h4><code>/v1/clusters</code> API</h4>
|
||
<p>Org-scoped; the org is the gateway-validated owner (<code>tenant(c)</code>), never a client field. Reference: <code>cloud/clients/visor/byo.go</code>.</p>
|
||
<p>| Method | Path | Purpose | |---|---|---| | <code>GET</code> | <code>/v1/clusters</code> | The org+project fleet: managed clusters (from Visor) <strong>merged</strong> with BYO clusters (from the registry), one list | | <code>POST</code> | <code>/v1/clusters</code> | Attach. A <code>kubeconfig</code> body ⇒ BYO attach (validate → seal → index). A provider+spec body ⇒ managed provisioning (Visor) — the sibling variant | | <code>DELETE</code> | <code>/v1/clusters/:id</code> | Detach a BYO cluster (index + sealed kubeconfig + cached client) |</p>
|
||
<p><code>POST /v1/clusters</code> body:</p>
|
||
<pre><code class="lang-json">{ "name": "spark-k8s", "kubeconfig": "<yaml>", "provider": "k3s", "default": true }</code></pre>
|
||
<p>Attach is a fail-closed pipeline:</p>
|
||
<ol><li><code>tenant(c)</code> → org, or <code>403</code> (X-Org-Id required).</li><li>Validate <code>name</code> (lowercased) and <code>kubeconfig</code> non-empty.</li><li>If the registry is not KMS-backed → <code>503</code> (never store a kubeconfig in</li></ol>
|
||
<p> plaintext).</p>
|
||
<ol><li><strong>Nominal management-fee gate</strong> (<code>s.bill.Gate</code>) — the customer brings the</li></ol>
|
||
<p> compute; Hanzo meters the management plane. Fee = <code>ResourceFeeCents("CLOUD_COMPUTE_FEE_CENTS", "byo-cluster")</code>. Fail-closed on an unfunded org.</p>
|
||
<ol><li><code>s.fleet.Register(ctx, org, project, name, kubeconfig, provider, default)</code> —</li></ol>
|
||
<p> reach the cluster, seal the kubeconfig, index the metadata.</p>
|
||
<ol><li><code>s.bill.Meter(...)</code> — record the nominal fee against the paying org, then</li></ol>
|
||
<p> <code>201</code> with the cluster view.</p>
|
||
<h4>The fleet Registry — KMS-sealed, per-org, one federation seam</h4>
|
||
<p>Reference: <code>cloud/clients/fleet/fleet.go</code>. The registry is the single source of truth consumed by <strong>both</strong> the <code>/v1/clusters</code> surface and ML serving. Its whole state is in the org's KMS; a nil KMS makes it a graceful, fail-closed no-op (<code>Enabled()</code> is false; <code>Register</code> errors, <code>List</code>/<code>DynForOrg</code> return empty).</p>
|
||
<pre><code class="lang-go">func (r *Registry) Register(ctx, org, project, name, kubeconfig, provider string, isDefault bool) (Cluster, error)
|
||
func (r *Registry) List(org, project string) ([]Cluster, error)
|
||
func (r *Registry) Deregister(org, project, name string) (bool, error)
|
||
func (r *Registry) DynForOrg(org, project string) dynamic.Interface // the ONE federation seam</code></pre>
|
||
<ul><li><strong>Validate by reaching.</strong> <code>Register</code> builds a dynamic client from the</li></ul>
|
||
<p> kubeconfig, lists nodes, and reads <code>nvidia.com/gpu</code> + <code>amd.com/gpu</code> from each node's <code>status.allocatable</code>. An unreachable cluster or unusable kubeconfig is rejected before anything is stored. The metadata (<code>Cluster{Nodes, NvidiaGPU, AmdGPU, ...}</code>) is derived, never client-asserted.</p>
|
||
<ul><li><strong>Seal, never surface.</strong> The kubeconfig bytes go to KMS under a per-org key;</li></ul>
|
||
<p> only non-secret metadata is indexed. The kubeconfig is never returned by any read path.</p>
|
||
<ul><li><strong>Idempotent</strong> on <code>name</code> within the <code>(org, project)</code> shard (<code>upsert</code>).</li><li><strong>Federate.</strong> <code>DynForOrg</code> returns the org+project's default cluster's client</li></ul>
|
||
<p> (KMS-loaded, cached) or <code>nil</code> — in which case the caller falls back to the home in-cluster client. This is how <code>clients/ml</code> places a workload on the org's chosen cluster with zero branching.</p>
|
||
<p>KMS key layout (the one place the project segment is added or omitted):</p>
|
||
<pre><code>scopeRef(org, project) = org # default project (legacy, byte-identical)
|
||
= org + "/" + project # non-default project shard
|
||
index ref: <scopeRef>/fleet/clusters
|
||
config ref: <scopeRef>/fleet/clusters/<name>/kubeconfig # the sealed kubeconfig</code></pre>
|
||
<p>The KMS client is <code>mpcseal</code> — an MPC/threshold store; the nodes hold only ciphertext. It is opened once from <code>CLOUD_KMS_NODES</code> + <code>CLOUD_KMS_PASSPHRASE</code> (the one bootstrap env shared with the rest of cloud); absent ⇒ disabled, never plaintext.</p>
|
||
<h4>Tenant + project scoping via the edge JWT</h4>
|
||
<p>The org boundary is enforced once, at the principal's owner, per HIP-0134 / HIP-0112:</p>
|
||
<ul><li>The gateway <strong>strips</strong> any inbound <code>X-Org-Id</code> / <code>X-Project-Id</code>, then <strong>mints</strong></li></ul>
|
||
<p> them from the validated JWT: the <code>owner</code> claim → <code>X-Org-Id</code>; the token's project scope → <code>X-Project-Id</code> (default <code>"default"</code>, minted only for a non-default project). These are ANDed authorization inputs, never identity authority on their own.</p>
|
||
<ul><li>Downstream, every service reads them via <code>principal.Project(c)</code> /</li></ul>
|
||
<p> <code>principal.IsDefaultProject</code> and the org via <code>tenant(c)</code>. <code>X-Org-Id</code> and <code>X-Project-Id</code> propagate over the ZAP interconnect to visor / cloud / ml.</p>
|
||
<ul><li><strong>Billing keys on the org</strong>; the project is an isolation + attribution</li></ul>
|
||
<p> dimension (a distinct fleet shard, a distinct metering Actor), never a billing destination. So <code>[email protected]</code> bills only the <code>hanzo</code> org, and one project's fleet is a distinct shard within it.</p>
|
||
<h3>Three-tier billing</h3>
|
||
<p>Connected compute is metered by HOW it connects — all through the ONE <code>commerce/metering</code> path, so a customer sees one invoice however their compute is attached. The tier is a property of the source, resolved at connect. Rates are config-surfaced (the pricing service is the source of truth); the values below are the canonical defaults.</p>
|
||
<h4>Tier A — BYOC (on another cloud): 1% of cloud spend</h4>
|
||
<p>The org runs compute on its own AWS / Azure / GCP / DO / Nebius account. Hanzo reads that account's real spend and meters <strong>1%</strong>.</p>
|
||
<ul><li><strong>Cost pull</strong> (<code>service/cloud_cost.go</code>, one <code>CloudCostReader</code> seam, one reader</li></ul>
|
||
<p> per cloud):</p>
|
||
<p> | Cloud | Cost source | Read | |---|---|---| | AWS | Cost Explorer | <code>ce:GetCostAndUsage</code>, <code>UnblendedCost</code>, month-to-date (us-east-1) | | DigitalOcean | Customer balance | <code>GET /v2/customers/my/balance</code> → <code>month_to_date_usage</code> | | Azure | Cost Management | scope-level cost query | | GCP | BigQuery billing export | <code>SELECT SUM(cost) FROM <export> WHERE invoice.month = 'YYYYMM'</code> |</p>
|
||
<ul><li><strong>Idempotent 1%.</strong> Every cloud reports <strong>month-to-date</strong> cents.</li></ul>
|
||
<p> <code>AdvanceCostCursor(owner, provider, month, currentMTDCents)</code> advances a per-<code>(owner, provider, month)</code> watermark and returns the <em>newly-billable increment</em>; the collector meters <strong>1% of the increment</strong>, so across a month it totals 1% of that month's spend, exactly once. Month rollover is implicit in the cursor PK. The daily unit is serialized cluster-wide by <code>ClaimBillingUnit("byoc:<owner>:<provider>:<YYYYMMDD>")</code>.</p>
|
||
<ul><li><strong>Honesty contract.</strong> A reader with insufficient credentials returns</li></ul>
|
||
<p> <code>ErrCostUnavailable</code>; the collector <strong>skips</strong> that account — no fee — rather than inventing a figure. No spend → no fee. Requires cost-read scope on the stored creds (documented per cloud).</p>
|
||
<h4>Tier B — BYO hardware (not on a cloud): $1/month per device</h4>
|
||
<p>A bare-metal, GPU, or desktop-linked box that costs the customer nothing per hour. <code>ConnectFleetWorker</code> (via <code>hanzo gpu connect</code> / desktop link) arms a <code>FleetWorker{Kind: "byo-hardware", DeviceCount, GpuModel}</code> keyed by <code>(Owner, Name)</code> with <code>Project</code> as the attribution dimension. The monthly meter reads <code>GetConnectedFleetWorkers</code> (cross-tenant, org recovered per row) and debits <strong>100 cents × <code>DeviceCount</code></strong> per connected box, once per month, under <code>ClaimBillingUnit("device:<owner>:<worker>:<YYYYMM>")</code>. <code>DisconnectFleetWorker</code> stops the fee (the row is retained so the closing month still bills its last device count).</p>
|
||
<h4>Tier C — hanzo.network validator: free / native</h4>
|
||
<p>If the connected box's validator address is in the <code>hanzo.network</code> mainnet validator set, it is natively available to the cloud at <strong>no fee</strong> — it already earns validator economics and secures the chain. <code>chain.ValidatorExemption(ctx, address)</code> is the gate, and it never fabricates an on-chain fact:</p>
|
||
<p>| State | Result | Billing | |---|---|---| | Wired + address in set | <code>(true, "exempt")</code> | free | | Wired + address not in set | <code>(false, "billed")</code> | billed as a device (Tier B) | | Lookup unwired (<code>HANZO_VALIDATOR_INDEXER_URL</code> empty) | <code>(false, "pending-chain-wiring")</code> | billed, flagged | | Wired + lookup errored | <code>(false, "lookup-error", err)</code> | billed (fail-safe), flagged |</p>
|
||
<p>The exemption is granted <strong>only</strong> on a positive, verified membership read (indexer → read; the chain is authoritative and read-only). It activates automatically the moment the operator wires the indexer; nothing is ever exempted on an unverified claim.</p>
|
||
<h4>Metering → invoice flow</h4>
|
||
<pre><code>attach / connect ──► tier resolved (property of the source)
|
||
│
|
||
├─ BYO cluster attach ─► nominal mgmt-fee Gate + Meter (WIRED, live)
|
||
├─ resell machine up ─► hourly debit, MeterLease-guarded (WIRED, live)
|
||
├─ BYOC account ─► daily: 1% × cost increment (primitives shipped; loop = roadmap)
|
||
└─ BYO device ─► monthly: $1 × DeviceCount − validators (primitives shipped; loop = roadmap)
|
||
│
|
||
▼
|
||
commerce/metering (one client per org: NewMeteringClient → metering.Record)
|
||
│ RequestID = the billing-unit key; OTel mirror via telemetry.CountMetered
|
||
▼
|
||
commerce ── per-org ledger ──► ONE invoice</code></pre>
|
||
<p><strong>Exactly-once is enforced outside the RequestID.</strong> Commerce does not dedup the withdraw on <code>requestId</code>, and visor runs <code>replicas: 2</code> with no leader election, so every billable unit is guarded by an insert-once-wins lease:</p>
|
||
<ul><li><code>MeterLease</code> (<code>ClaimMeterHour</code>, PK = <code>YYYYMMDDHH</code>) — the hourly resell-compute</li></ul>
|
||
<p> sweep. Lives on the shared linearizable engine (never per-org SQLite — two pods with separate files would each "win" and double-debit).</p>
|
||
<ul><li><code>BillingLease</code> (<code>ClaimBillingUnit</code>, PK = the unit string) — the daily BYOC and</li></ul>
|
||
<p> monthly device units. A DB error yields "not claimed" ⇒ <strong>fail safe = do not bill</strong> (a missed unit is reconciled later; a double debit is not).</p>
|
||
<p><code>PriceToCents</code> is the one price→cents rule (Ceil, with a 1e-9 epsilon so <code>0.07 × 100</code> does not round to 8¢; a $0 price is free).</p>
|
||
<h3>Two surfaces over one dataset</h3>
|
||
<p>| Surface | Audience | Scope | Backing | |---|---|---|---| | <strong>console.hanzo.ai</strong> | Any org (self-service) | Its OWN fleet, usage, schedules, billing | <code>/v1/clusters</code> + <code>/vm/v1/machines</code>, org-scoped | | <strong>admin.hanzo.ai</strong> | SuperAdmin (<code>owner == "admin"</code>) | ALL orgs' fleets + usage + revenue, one board | <code>/v1/admin/*</code> cross-tenant aggregates |</p>
|
||
<p>Per the SuperAdmin standard: the unified all-org overview is gated on membership of the reserved <code>admin</code> org (<code>owner == "admin"</code>), the only cross-tenant scope. A brand-org admin (e.g. <code>[email protected]</code>, an org admin of <code>hanzo</code>) sees only the <code>hanzo</code> fleet on console — never the cross-tenant board.</p>
|
||
<h3>Deployment modes — one binary, three shapes</h3>
|
||
<p>The single cloud binary (HIP-0106) + white-label-by-hostname make one codebase serve three product modes with no forks:</p>
|
||
<ol><li><strong>SaaS (multi-tenant, Hanzo-hosted)</strong> — the default; console per-org, admin</li></ol>
|
||
<p> unified, per-org billing.</p>
|
||
<ol><li><strong>BYO-compute (hybrid)</strong> — Hanzo's hosted control plane, the customer's</li></ol>
|
||
<p> compute (the fleet). Billed the nominal management fee + the three-tier model.</p>
|
||
<ol><li><strong>Self-hosted / white-label (enterprise)</strong> — the entire cloud binary in the</li></ol>
|
||
<p> enterprise's own cloud + K8s, white-labeled to their brand, via the GCP/AWS/Azure Marketplace or the operator/Helm. Billed by <strong>license + entitlement metering</strong>, not per-org SaaS billing.</p>
|
||
<p>Everything in this HIP stays mode-agnostic: never hardcode <code>hanzo.ai</code>, always resolve brand + endpoints from config, never assume Hanzo's KMS/commerce is reachable.</p>
|
||
<h2>Rationale</h2>
|
||
<p><strong>Why one <code>/v1/clusters</code> for every org.</strong> The fleet is inherently cross-tenant (every org's compute in one control plane). One surface with one registry is the only way ML serving, the console, and the admin board see the <em>same</em> list. A parallel <code>/v1/ml/clusters</code> was built and deliberately deleted: the moment there are two lists they drift, and <code>dynForOrg</code> cannot know which cluster the org actually chose. One registry, two consumers (<code>clients/visor</code>, <code>clients/ml</code>), never a second surface. This is the "one and only one way" rule applied to compute.</p>
|
||
<p><strong>Why 1% / $1 / free.</strong> Each rate matches what the compute actually costs the customer, so the fee is never hostile:</p>
|
||
<ul><li><em>1% of cloud spend</em> — the customer already pays the cloud in full; Hanzo adds a</li></ul>
|
||
<p> thin, usage-aligned management fee that scales to zero when they are idle. It is pulled from the cloud's own cost API, so it is auditable against the customer's own bill.</p>
|
||
<ul><li><em>$1/mo per device</em> — bare metal has no per-hour cloud cost to take a percentage</li></ul>
|
||
<p> of, so a flat, trivially-predictable per-device fee is the honest unit. It arms on connect and stops on disconnect.</p>
|
||
<ul><li><em>free for validators</em> — the box already earns validator economics and secures</li></ul>
|
||
<p> the chain; contributing spare cycles to the cloud is part of that contract. Charging it would be double-dipping.</p>
|
||
<p>One <code>commerce/metering</code> path renders all three as ledger lines, so a customer with a validator, two GPU boxes, and an AWS account sees one invoice — not three billing systems.</p>
|
||
<p><strong>Why KMS-sealed, per-org isolation.</strong> A kubeconfig or a cloud credential is a full grant of authority over the customer's infrastructure. The blast radius of a leak is the customer's entire cluster or account. Sealing every secret in the <em>org's own</em> KMS project (the MPC nodes see only ciphertext), keying it under a per-org(+project) ref, and taking the org from the gateway-validated JWT — never a client field — makes cross-tenant read structurally impossible: there is no code path where org A's request resolves to org B's key. A disabled KMS fails the whole feature closed rather than degrading to plaintext.</p>
|
||
<p><strong>Why watermark + lease instead of trusting request IDs.</strong> Commerce does not dedup withdrawals on <code>requestId</code>, and visor runs multiple replicas. Idempotency therefore cannot live in the client key; it must be a cluster-wide, insert-once-wins claim, with a DB error resolving to <em>do not bill</em>. Money safety biases every failure toward under-billing (reconcilable) over double-billing (a refund and a trust hit).</p>
|
||
<h2>Reference Implementation</h2>
|
||
<p>Everything below is real code in <code>hanzoai/cloud</code> and <code>hanzoai/visor</code>. The fleet surface and registry are <strong>shipped and live</strong> (<code>cloud</code> ≥ v1.786.90); the three-tier billing <strong>primitives are shipped, build, and pass tests</strong>; the daily and monthly billing <strong>orchestrator loops are the remaining roadmap</strong> — called out explicitly below. No stubs are claimed as shipped.</p>
|
||
<h3>Shipped and live</h3>
|
||
<ul><li><strong><code>cloud/clients/fleet/fleet.go</code></strong> — the per-org KMS-sealed <code>Registry</code></li></ul>
|
||
<p> (<code>Register</code> / <code>List</code> / <code>Deregister</code> / <code>DynForOrg</code>, <code>scopeRef</code> project sharding, kubeconfig sealed via <code>mpcseal</code>, GPU inventory via node list). Builds clean.</p>
|
||
<ul><li><strong><code>cloud/clients/visor/byo.go</code></strong> — <code>attachCluster</code> (<code>POST /v1/clusters</code>),</li></ul>
|
||
<p> <code>detachCluster</code> (<code>DELETE /v1/clusters/:id</code>), <code>byoClusters</code> (the <code>GET</code> merge), with the nominal <code>CLOUD_COMPUTE_FEE_CENTS</code> Gate/Meter. Builds clean.</p>
|
||
<ul><li><strong><code>cloud/resource_billing.go</code></strong> — <code>ResourceMeter.Gate</code> / <code>Meter</code> /</li></ul>
|
||
<p> <code>MeterUsage</code>, <code>ResourceFeeCents</code> (the wired nominal-fee path).</p>
|
||
<ul><li><strong>Live reference fleet</strong> (k3s, built and proven this cycle):</li><li><strong>spark</strong> — NVIDIA GB10 (Grace-Blackwell), arm64, k3s control-plane,</li></ul>
|
||
<p> <code>nvidia.com/gpu: 1</code>. Requires the <strong>nvidia device-plugin ≥ v0.18.0</strong> (earlier versions PANIC on the GB10's unified memory: <code>nvmlDeviceGetMemoryInfo "Not Supported"</code>; v0.18 logs and ignores it).</p>
|
||
<ul><li><strong>evo</strong> — AMD Ryzen AI MAX+ 395 / Radeon 8060S / gfx1151, x86_64, k3s agent,</li></ul>
|
||
<p> <code>amd.com/gpu: 1</code>, <code>rocm/k8s-device-plugin</code>.</p>
|
||
<ul><li><strong>dbc</strong> — CPU-only bare-metal arm64 worker.</li><li><strong>KServe v0.19.0</strong> via helm OCI (<code>kserve-crd</code> + <code>kserve-resources</code>),</li></ul>
|
||
<p> <code>RawDeployment</code> mode (no Knative/Istio; warm serving).</p>
|
||
<ul><li><strong>Project-awareness</strong> — the gateway mints <code>X-Project-Id</code>; <code>principal.Project</code> /</li></ul>
|
||
<p> <code>principal.IsDefaultProject</code>; every keyed surface (fleet ref, <code>ml-<org></code> → <code>ml-<org>-<project></code> namespaces, metering Actor) carries org+project. Live.</p>
|
||
<ul><li><strong>Visor multi-tenancy + BYOC</strong> — Owner-keyed rows, IAM Bearer JWT bound by</li></ul>
|
||
<p> issuer, <code>hanzo-org:<org></code> DO tags; per-owner cloud <code>Provider</code> connectors for DO / AWS / Azure / GCP / Hetzner / Lightsail (+ Nebius added this cycle); the hourly resell-compute meter (<code>MeterRunningMachines</code> + <code>MeterLease</code>) driven by the ticker.</p>
|
||
<h3>Shipped billing primitives (build + tests pass)</h3>
|
||
<p>Verified: <code>go test ./object/... ./service/...</code> → <code>ok</code> (visor); <code>go build</code> clean for <code>cloud/clients/{fleet,visor}</code> and <code>visor/chain</code>.</p>
|
||
<ul><li><strong><code>service/cloud_cost.go</code></strong> + <code>service/cost_{aws,do,azure,gcp}.go</code> — the</li></ul>
|
||
<p> <code>CloudCostReader</code> seam and one real cost reader per cloud (Tier A input).</p>
|
||
<ul><li><strong><code>object/cost_cursor.go</code></strong> — <code>CostCursor</code> + <code>AdvanceCostCursor</code> (the</li></ul>
|
||
<p> bill-the-increment watermark that makes 1% idempotent across a month).</p>
|
||
<ul><li><strong><code>object/fleet_worker.go</code></strong> — <code>FleetWorker</code> model + <code>ConnectFleetWorker</code> /</li></ul>
|
||
<p> <code>DisconnectFleetWorker</code> / <code>GetConnectedFleetWorkers</code> (the Tier B / C registry).</p>
|
||
<ul><li><strong><code>object/billing_lease.go</code></strong> — <code>BillingLease</code> + <code>ClaimBillingUnit</code> (daily</li></ul>
|
||
<p> <code>byoc:…</code> and monthly <code>device:…</code> exactly-once).</p>
|
||
<ul><li><strong><code>object/meter_lease.go</code></strong> — <code>MeterLease</code> + <code>ClaimMeterHour</code> (hourly sweep</li></ul>
|
||
<p> exactly-once).</p>
|
||
<ul><li><strong><code>service/metering.go</code></strong> — the one commerce path (<code>NewMeteringClient</code>,</li></ul>
|
||
<p> <code>PriceToCents</code>, <code>MeterRunningMachines</code>).</p>
|
||
<ul><li><strong><code>chain/validator.go</code></strong> — <code>ValidatorExemption</code> (Tier C, fail-safe honesty</li></ul>
|
||
<p> contract).</p>
|
||
<h3>Roadmap (not yet wired — do not represent as shipped)</h3>
|
||
<ul><li><strong>The daily BYOC 1% collector loop</strong> and <strong>the monthly $1/device meter loop.</strong></li></ul>
|
||
<p> Every primitive exists and tests pass, but no production ticker yet calls <code>AdvanceCostCursor</code> / <code>GetConnectedFleetWorkers</code> to emit the debits. The orchestrator is: enumerate active providers/workers → read cost / count devices → apply the rate → <code>metering.Record</code> under a <code>BillingLease</code>. The nominal per-attach management fee <strong>is</strong> wired; the usage-aligned tiers are not.</p>
|
||
<ul><li><strong>The <code>hanzo gpu connect</code> / desktop-link controller route</strong> that calls</li></ul>
|
||
<p> <code>ConnectFleetWorker</code> — the model and lifecycle exist; the HTTP handler does not.</p>
|
||
<ul><li><strong>The validator indexer</strong> (<code>HANZO_VALIDATOR_INDEXER_URL</code>) — unwired by default,</li></ul>
|
||
<p> so Tier C reports <code>pending-chain-wiring</code> until the operator provisions it.</p>
|
||
<ul><li><strong>ML <code>dynForOrg</code> federation wired into the serving handlers</strong></li></ul>
|
||
<p> (<code>create/list/get/del/predict</code>) — staged; returns the home client for non-BYO orgs, so it is a safe drop-in.</p>
|
||
<ul><li><strong>admin.hanzo.ai unified fleet + revenue board</strong> — the cross-tenant aggregate</li></ul>
|
||
<p> pattern exists; the combined fleet+revenue overview is a gap to close.</p>
|
||
<ul><li><strong>Visor → cloud native persistence port</strong> (Base per-org SQLite + HA per</li></ul>
|
||
<p> HIP-0302 / HIP-0107) — staged consolidation wave; visor Base mode is safe under <code>replicas: 1</code> today (the <code>MeterLease</code> leader election needs a shared linearizable store).</p>
|
||
<h2>Security Considerations</h2>
|
||
<h3>Tenant isolation on the org boundary</h3>
|
||
<p>The org is the isolation primitive, taken from the gateway-validated JWT <code>owner</code> claim and propagated as <code>X-Org-Id</code>, never from a client field. Every fleet method (<code>Register</code> / <code>List</code> / <code>Deregister</code> / <code>DynForOrg</code>) and every <code>/v1/clusters</code> handler takes <code>(org, project)</code> as resolved by <code>tenant(c)</code> / <code>principal.Project</code>. There is no code path where one org's request resolves another org's clusters: <code>lux</code> sees only <code>lux</code>'s fleet, <code>zoo</code> only <code>zoo</code>'s, a customer only their own, and within an org each project is a distinct shard.</p>
|
||
<h3>KMS-sealed credentials, no cross-tenant kubeconfig leak</h3>
|
||
<ul><li>Kubeconfigs and BYOC cloud credentials are sealed in the org's own KMS project</li></ul>
|
||
<p> under a per-org(+project) ref; the <code>mpcseal</code> nodes hold only ciphertext.</p>
|
||
<ul><li>The kubeconfig is <strong>write-only</strong> from the API's perspective — no read path</li></ul>
|
||
<p> (list, get, view) ever returns it; only derived non-secret metadata (node count, GPU counts, endpoint) is surfaced.</p>
|
||
<ul><li>A missing/unreachable KMS <strong>fails the feature closed</strong> (<code>Enabled()</code> false;</li></ul>
|
||
<p> <code>Register</code> errors; attach returns <code>503</code>). Plaintext persistence is structurally impossible — there is no non-KMS store for the secret.</p>
|
||
<ul><li>Register <strong>validates by reaching the cluster</strong> before sealing, so a malformed</li></ul>
|
||
<p> or hostile kubeconfig is rejected up front; the derived inventory cannot be spoofed by the client.</p>
|
||
<h3>Billing integrity</h3>
|
||
<ul><li><strong>No fabricated charges.</strong> Cost readers return <code>ErrCostUnavailable</code> and are</li></ul>
|
||
<p> skipped when creds lack scope; the validator exemption is granted only on a positive, verified on-chain read. No spend and no verified fact is ever invented.</p>
|
||
<ul><li><strong>Exactly-once, fail-safe.</strong> Every debit is guarded by an insert-once-wins</li></ul>
|
||
<p> lease (<code>MeterLease</code> / <code>BillingLease</code>); a DB error resolves to <em>not billing</em>. Under-billing is reconcilable; double-billing is not.</p>
|
||
<ul><li><strong>Spoof-proof attribution.</strong> The billed org is recovered from the resource's</li></ul>
|
||
<p> own server-side tag / owner column (e.g. the <code>hanzo-org:<org></code> DO tag injected at launch), never from a client parameter. Billing keys on the org; the project refines attribution without changing the debit destination.</p>
|
||
<ul><li><strong>Auth binding.</strong> Callers present an IAM Bearer JWT bound to the brand by</li></ul>
|
||
<p> issuer (HIP-0111); a sibling brand's token is rejected, while every org within the brand is accepted — multi-tenant, not multi-trust.</p>
|
||
<h3>Cross-tenant control-plane exposure</h3>
|
||
<p>The unified all-org fleet, usage, and revenue overview is gated on membership of the reserved <code>admin</code> org (<code>owner == "admin"</code>) — the only cross-tenant scope, per the SuperAdmin standard. Per-org admins are confined to their own org's console. Trusting a per-org <code>isAdmin</code> for the platform board would be a privilege- escalation bug; the predicate is <code>owner == "admin"</code>, checked the same way everywhere.</p>
|
||
<h2>References</h2>
|
||
<ol><li><a href="./hip-0026-identity-access-management-standard.md">HIP-0026: Identity & Access Management Standard</a> — the org boundary, JWT <code>owner</code> claim</li><li><a href="./hip-0027-secrets-management-standard.md">HIP-0027: Secrets Management Standard</a> — KMS; per-org sealed credentials</li><li><a href="./hip-0123-visor-fleet-autoscaling.md">HIP-0123: Visor — Fleet & Fabric Autoscaling Across Any Provider</a> — the machine/cluster control plane</li><li><a href="./hip-0106-hanzo-plugin-contract.md">HIP-0106: The Hanzo Plugin Contract</a> — <code>clients/fleet</code>, <code>clients/visor</code>, <code>clients/ml</code> in one binary</li><li><a href="./hip-0107-streaming-replication-over-vfs.md">HIP-0107: Streaming Replication over VFS</a> — the HA substrate for the visor→cloud persistence port</li><li><a href="./hip-0134-one-process-one-socket-one-identity.md">HIP-0134: One Process, One Socket, One Identity</a> — IAM establishes the org; plugins scope on it</li><li><a href="./hip-0111-iam-authentication-standard.md">HIP-0111: IAM Authentication Standard</a> — the Bearer JWT contract</li><li>HIP-0112: Cloud Infrastructure Topology Standard — ingress → gateway → services, tenant scoping</li><li><a href="./hip-0302-encrypted-sqlite-replication-standard.md">HIP-0302: Encrypted SQLite Replication Standard</a> — per-org data isolation for visor's Base store</li><li><code>cloud/clients/fleet/fleet.go</code>, <code>cloud/clients/visor/byo.go</code>, <code>cloud/resource_billing.go</code> — reference implementation</li><li><code>visor/service/{cloud_cost,cost_aws,cost_do,cost_azure,cost_gcp,metering}.go</code>, <code>visor/object/{cost_cursor,fleet_worker,billing_lease,meter_lease}.go</code>, <code>visor/chain/validator.go</code> — billing primitives</li><li><code>hanzoai/commerce/metering</code> — the canonical metering client and per-org ledger</li></ol>
|
||
<h2>Copyright</h2>
|
||
<p>Copyright and related rights waived via <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a>.</p>
|
||
<footer>
|
||
<div class="fmap">
|
||
<div><b>Build</b>
|
||
<a href="https://hanzo.app">hanzo.app</a> app builder
|
||
<a href="https://hanzo.codes">hanzo.codes</a> code with an agent
|
||
<a href="https://hanzoskills.com">hanzoskills.com</a> what an agent reads</div>
|
||
<div><b>Run</b>
|
||
<a href="https://console.hanzo.ai">console.hanzo.ai</a> cloud console
|
||
<a href="https://api.hanzo.ai">api.hanzo.ai</a> the API</div>
|
||
<div><b>Account</b>
|
||
<a href="https://hanzo.id">hanzo.id</a> sign in
|
||
<a href="https://pay.hanzo.ai">pay.hanzo.ai</a> top up
|
||
<a href="https://billing.hanzo.ai">billing.hanzo.ai</a> invoices and usage</div>
|
||
<div><b>Company</b>
|
||
<a href="https://hanzo.ai">hanzo.ai</a> canonical
|
||
<a href="https://hanzo.ventures">hanzo.ventures</a> ventures</div>
|
||
</div>
|
||
<div class="fend"><a href="/hip-0121.md">This page as plain text</a> · <a href="/llms.txt">Index for agents</a></div>
|
||
</footer>
|
||
</div></body></html> |