stack-up's up.sh runs the whole open stack on one machine in one command.
This is the same stack as a Kubernetes workload: the same binaries, the same
ports, the same wiring, expressed as manifests instead of background processes.
Nothing here is a rewrite. It is a translation, and the translation is where the interesting part lives: putting the stack on Kubernetes forces two facts about its architecture into the open, and both are load-bearing.
On one machine that coupling is invisible, because everything shares a filesystem:
tokenfuse-gatewayappends every metered call toevents/tokenfuse.ndjsonwardryxappends every policy decision toevents/wardryx.ndjsonidryxis started with--load tokenfuse:<events file>and builds its identity graph by READING that file- the Genaryx console's bus tails the same directory
So the event directory is a shared, writable dependency of four components. On
Kubernetes that is not a detail, it is the deployment's shape: pods on
different nodes do not share a filesystem, and the default k3s storage class
(local-path) is ReadWriteOnce, one node only.
Three honest ways out, in the order a real operator would consider them:
- One node. Pin the four event-coupled pods to a single node with a
local-pathvolume. Simple, and it works, but the cluster is then a scheduler, not a distribution. - A ReadWriteMany volume. Run an in-cluster NFS provisioner (or Longhorn) and give the event directory an RWX claim. The pods spread across nodes and the coupling stays exactly as the code expects it. This is what the manifests here do, because it is the only option that is genuinely multi-node without touching the stack's own code.
- Replace the file with a stream. The correct long-term answer: the event log becomes a real append-only service (or a broker) and the filesystem stops being an interface. That is a change to the stack, not to its deployment, so it is out of scope here and named as future work rather than pretended away.
Every stream on stack-events is written by one plane and read by many, so who can write a name on it is
a security property, not housekeeping. The claim's root on Longhorn RWX is root:root 0777, and kubelet
gives it no fsGroup (Longhorn's CSI driver applies fsGroup to ReadWriteOnce volumes only). A pod that
mounts that root can create, rename or remove any name in it, whatever its uid. stack-single closes this
with a root init service; Pod Security restricted, which this namespace enforces, allows no root, so the
bus here is a subdirectory with an owner of its own (CLAUDE.md invariant 89):
- The owner. The Job
bus-owner(manifests/11-bus.yaml) runs as uid 20000, which no plane runs as, and is the only pod that mounts the claim's root read-write. It makesstreams/(20000:10001 2750: the bus group may enter and read it, nobody but the owner may add, rename or remove a name), each stream in it (20000:<producer> 0664), wardryx's policy archive (20000:20001 0775), andconform/beside the bus for the chain verifier's memory (20000:10002 2770), then writesstreams/.layout. It runs on every apply, changes nothing that is already right, and refuses astreams/or a stream somebody else made. - The producers. Each runs under a uid and a group of its own and appends through that group: wardryx 20001, vouchryx 20002, typryx 20005, the gateway 20010, the MCP broker 20012, the control plane 20013, verdryx-slo 20020, the console 20030, the drills 20040, the chain verifier 10002, costcrew 10003 (the numbers stack-single gives them, where it has one). No producer carries another producer's group.
- Everybody else. Every pod mounts
streams/by subPath at/var/lib/stack/events, so the paths the planes and readers already use did not move, and no path a pod holds leads to the root. Readers mount it read only and are in group 10001. Each pod waits first in an init container,bus-ready, that mounts the root read only and waits for the owner's marker: kubelet makes a subPath that does not exist yet itself, asroot 0777, and a plane that started first would make the bus wide open.
Measured on 2026-11-11 on k3s v1.36.2 with Longhorn v1.7.2 (evidence/bus-per-producer-longhorn/): in the
layout before this one, a pod as costcrew appended a forged line to wardryx.ndjson and a pod as typryx
renamed the gateway's stream away and put its own in its place. In this layout each producer appends to its
own stream, and another producer's append, truncate, create, rename, remove, link and chmod are refused; a
reader cannot write even with the mount read-write; wardryx v2.6.1 and tokenfuse v1.24.0 open a stream they
do not own. NFS with AUTH_SYS carries sixteen groups of a process and the owner is in twelve, so the table
has room for four more producers. scripts/bus-writers-are-separate.sh holds the layout, and
security-tests.sh asks a live cluster the same question.
This is a breaking change for a cluster that already runs: every writing plane's uid changes, and the bus
moves into streams/. The owner copies each stream of the old layout at the claim's root into streams/
once, with the policy archive and the verifier's memory, so the hash chains continue; the old files stay
where they are, and nothing reads them after the change. The planes' own state claims keep their fsGroup,
so a file an earlier uid wrote stays writable to the new one through the group.
Lines a plane writes between the copy and its own restart land in the old file and are not copied, so stop the writers first, apply, and let the owner run before they start again:
kubectl -n agent-stack scale deploy --all --replicas=0
kubectl -n agent-stack delete job bus-owner --ignore-not-found
kubectl apply -k manifests/
kubectl -n agent-stack wait --for=condition=complete job/bus-owner --timeout=300skubectl apply -k puts every Deployment back at its declared replicas, and each plane's bus-ready waits for
the owner's marker before it starts. A cluster you would rather start clean needs only a new stack-events
claim: the owner makes every stream empty.
The Genaryx console reaches the money, policy and identity planes over HTTP,
so those are ordinary Service objects. But it reaches four more tools by
EXECUTING them:
| Tool | How the console uses it |
|---|---|
qryx |
shells out to scan a path for crypto (GENARYX_SCAN_TARGET) |
verdryx |
shells out to read and run quality evals against verdryx.db |
engram-mcp |
speaks MCP over stdio to a child process |
mockryx |
shells out to fire the hostile drills at the gateway |
A sidecar container cannot be another container's stdin. So these four are not
pods: they are binaries that must exist inside the console image. That is
why images/console.Dockerfile is a four-language build (Rust console, Go
qryx and mockryx, Python verdryx and engram) rather than four Deployments.
Two more binaries sit in that image, and they are not tools in this table:
wardryx (for replay) and tokenfuse (for backtest) are the engines of the
console's policy and budget proofs, copied out of the very images the stack
runs, by the same digests the manifests name, so the engine that replays a
decision is the engine that took it (CLAUDE.md invariant 79). On a cluster the
budget proof has no trace directory to read, because the gateway's traces are
a pod-local emptyDir that no other pod can mount.
Stated plainly because it is the opposite of the obvious guess, and getting it wrong produces a cluster where half the console's tabs are permanently empty.
| Kubernetes object | Component | Port |
|---|---|---|
| Deployment + Service | tokenfuse-cloud |
8080 |
| Deployment + Service | tokenfuse-gateway |
4100 |
| Deployment + Service | wardryx |
8090 |
| Deployment + Service | idryx |
8081 |
| Deployment + Service | genaryx-console (with qryx, verdryx, engram, mockryx inside) |
7420 |
| StatefulSet + Service | the policy store: Postgres behind wardryx, holding its approvals and its runtime policy documents |
5432 |
| PersistentVolumeClaim (RWX) | the shared event directory; the planes mount its streams/ subdirectory |
|
| Job | bus-owner, the bus's one owner: makes streams/ and every stream in it on each apply, and is the only pod that can create, rename or remove a name there (see "The events bus" above) |
|
| PersistentVolumeClaim | verdryx.db, engram.engram stores |
|
| CronJob | four of the six governance routines that stack-up's routines.sh installs by default, as CronJobs: crypto trend, quality drift, identity sweep (qryx-trend, verdryx-drift, idryx-detect), plus the record seal (trailryx-seal, at 5:27, last because it seals what the others did). The fifth, the chain verification, is the row below. FinOps export (focus-export) cannot run as a CronJob here and does not: its data lives in a per-pod emptyDir (GOTCHAS 81), so since 2026-08-28 it runs as a SIDECAR in the tokenfuse-gateway pod, hourly, printing rather than storing. The alternative was a PersistentVolumeClaim for the trace directory, which is a billed disk and so a spending decision rather than a fix; drills (mockryx-drill) is separate: opt-in, suspended below |
|
| CronJob | agent-conform, the on-box chain verifier, every 15 minutes: it verifies the prev_hash chain of every stream on the shared bus and writes a chain_broken event to agent-conform.ndjson on the bus when one is broken. In the default apply; keeps its memory in conform/ beside the bus on stack-events, so it adds no disk. See "The on-box chain verifier" below |
|
| NetworkPolicy | default-deny for the pods of agent-stack, then exactly the paths above. It covers the stack's own pods, not agents that run outside the namespace: see "What the NetworkPolicy confines, and where your agents run" below |
|
| Deployment + PVC + NetworkPolicy | heraldyx, the notifier. Not in the default apply, see "Being told, rather than watching" below. No Service and no port: it reads the event log and sends mail, so nothing calls it |
|
| Deployment + PVC + Service + NetworkPolicy x4 | 47-scopyx.yaml, the web-egress enforcement point. Not in the default apply: it opens 80 and 443 to the whole public internet on behalf of agents, which is the widest grant in the namespace and the one decision an operator most needs to have made themselves. Refuses to start without a credential, deliberately. An agent reads the web through the MCP broker, which holds scopyx's key and is the only pod scopyx-ingress admits: see "How an agent reads the web" below |
|
| Deployment | 48-scopyx-browser.yaml, the same plane with a real browser, for pages that assemble themselves. Replaces 47's Deployment rather than running beside it, so a cluster cannot round-robin an agent's fetches between a browser and a fetcher that runs no JavaScript. Costs 267 MB of pull against 3.5 MB. Chromium keeps its own sandbox, under a seccomp profile every installer puts on every node; on a cluster no installer here built, put seccomp/chromium-v1.json at /var/lib/kubelet/seccomp/taipanbox/chromium-v1.json on each node first (its header says why) |
|
| Deployment + PVC + Service + CronJob + NetworkPolicy | 49-costcrew.yaml, CostCrew, the FinOps plane: the console and its crew CronJob costcrew-crew. Not in the default apply, and metered once cadence is on: see "CostCrew, the FinOps plane" below |
8321 |
| Deployment + PVC + Service | 51-typryx.yaml, the typed-answer plane: a typed question answered with a probability, scored later against what actually happened. Not in the default apply: a whole plane somebody may simply not want. Backend is stub (free, no outbound call) unless a launcher is given --typed-mode (see "Typed answers: choose where your data goes"). Refuses to start without a credential, the same as scopyx. Its journal is on the shared stack-events bus |
|
| Deployment + Service + NetworkPolicy x4 | 52-tokenfuse-mcp-broker.yaml, tokenfuse's own MCP credential broker fronting typryx. Not in the default apply, applied by the same --with-typed flag as 51-typryx.yaml, right after it. Free, reaches nowhere but typryx itself, and scopyx where the operator runs it ("How an agent reads the web" below). Refuses to start without its own credential |
|
| Deployment + Service + NetworkPolicy x4 | 56-typryx-wardryx-proxy.yaml, typryx's wardryx-proxy: between the MCP broker and wardryx, it adds the risk class of a pending tool call to the decision request, so a hold_if_signal policy can hold the call for a person. Not in the default apply, rendered only by --typed-risk-signal (off by default, refused when the typed mode is off). No claim, no journal, no ledger: it keeps no state. See "A typed risk signal" below |
4330 |
| Deployment + Service + PVC + NetworkPolicy x4 | 54-delegation.yaml, vouchryx, the agent-token service. In the default apply, agents-only: no identity provider, its keys and its first enrolled agent minted at deploy time (lib/vouchryx-mint.sh). Reachable from the gateway, the broker, wardryx and the console, and from agent pods. See "The delegation plane" below |
|
| Patch (Deployment) | 55-copilot-cloud.yaml: a larger model for the console's copilot, Felyx (claude-sonnet-5), applied by hand; no deploy script applies it, and --anthropic-key-file leaves Felyx on its configured model (claude-haiku-4-5). A model switch only: Felyx already reaches Anthropic through this stack's own gateway (by its Service name, under agent://<trust domain>/genaryx/felyx, metered and policy-checked like any agent) with its own client key, and the gateway holds the provider key (see "The provider key" below). Not in the default apply: the deploy scripts apply it when they are given --anthropic-key-file, and every conversation is METERED on that key's account. See its own header before applying |
|
| Namespace labels + NetworkPolicy x2 | 60-harden-neighbours.yaml: Pod Security restricted plus default-deny ingress and egress for the cluster's default namespace, i.e. hardening for a namespace this stack does not own (security-tests.sh check 12 reports on the gap this closes). Not in the default apply: it changes a namespace that belongs to whoever runs the cluster, and it WILL stop anything already running in default. Read its header before applying |
The NetworkPolicies in manifests/30-network-policy.yaml and manifests/58-agent-tokens-network.yaml apply to the pods of
the agent-stack namespace and to nothing else. That namespace holds the stack's own planes and no agent workload.
Your agents are not in it. They run on your machines, in other namespaces or in other clusters, and no policy in this
repository confines them. What stands between an agent outside the namespace and the stack is the door it has to pass: the
gateway and the MCP broker require an agent token (see "Agent tokens"), which is a check on each call and not a packet filter.
What the policies do confine is the stack itself: the planes reach each other only by the paths in 30, a pod of another
namespace reaches none of them, and in the default install the gateway is the one pod allowed out to the internet, on 443.
An agent you choose to run inside this cluster can be put under a policy written for it. Place it in agent-stack and label
it taipanbox.dev/agent-token=true; 58 then leaves it DNS, vouchryx on 4310, the gateway on 4100 and the MCP broker (tokenfuse-mcp-broker) on 4200, and nothing else.
agent-tokens/confined-agent is an optional overlay that does exactly that (it is in no default apply), and
agent-tokens/confine-check.sh proves it on a live cluster:
kubectl apply -k agent-tokens/confined-agent
./agent-tokens/confine-check.sh --external 1.1.1.1:443Measured on k3d (evidence/agent-confinement-k3d/, k3d v5.9.0, k3s v1.35.5, 2026-11-04): the labelled pod opened vouchryx and
the gateway and was refused by the stack's five other services (wardryx, idryx, tokenfuse-cloud, the policy store and the
console), by a listener in a namespace with no policy, by the Kubernetes API and by an address outside the cluster, while a
pod in a namespace with no policy reached the listener and the outside address and was itself refused by every service of the
stack. The same check went red on a policy widened to all egress, on the namespace's egress isolation stripped out, on a policy
without its gateway rule and on a missing policy, and it went red on a cluster whose policy controller was off. The stack's own pods in that
run were stand-ins with the real labels and ports, generated from these manifests; no stack image ran there.
What it does not confine, said plainly:
- An agent outside
agent-stack: another namespace, another cluster, a laptop. Nothing here applies to it. - DNS: every pod of the namespace, labelled or not, may query the cluster resolver, and in the run the labelled pod resolved a name outside the cluster. A connection is refused; a lookup is not.
- The label is the pod's own claim. Whoever can create pods in
agent-stackchooses their labels (GOTCHAS 20), so the namespace's RBAC is part of the boundary. - A pod of
agent-stackthat carries no label gets default-deny and DNS only. It reaches neither vouchryx nor the gateway, so it is isolated and it is not an agent: nothing it could do here is allowed.
CostCrew reads the bills and works out what to do about them. It is off by default and is not in the default apply. --with-finops on cloud/aws/deploy-aws.sh and cloud/gcp/deploy-gcp.sh applies 49-costcrew.yaml; on Hetzner (deploy.sh) it is applied by hand with kubectl apply -f manifests/49-costcrew.yaml.
Once applied, the crew CronJob costcrew-crew runs every day at 05:57. Each run does only the work that the console's cadence has marked due (-due), and the run's ceiling is the figure set with --costcrew-ceiling. With cadence off, which is the default, a run exits 2, creates nothing and spends nothing.
When cadence is on and a run has work, the crew calls a model through the gateway, with the crew's own client key from the optional costcrew-client-key Secret, minted with the gateway's keys. The gateway holds the provider key, and the provider bills it. Without the client key the run refuses at the call and names the missing variable. An analyst hired with the OpenRouter engine is refused, because no gateway route for OpenRouter exists in this stack yet. Two caps bound each run, and the smaller one applies: COSTCREW_CEILING, which the operator sets in stack-wiring (no value ships, and the pod does not start until the key exists), and the console's own cadence.ceiling_cents, set at the console's /cadence page.
To switch it on, the deploy has minted costcrew-client-key with the gateway's keys, set the ceiling with --costcrew-ceiling USD on the deploy (or COSTCREW_CEILING in stack-wiring), turn cadence on and set its ceiling at /cadence, To switch it off, turn cadence off at /cadence. Every deliverable the crew writes is a draft marked live, which only a person's stamp publishes.
Nothing here bakes a credential into an image, and nothing here ships one.
install.sh GENERATES the admin bearers for the money and policy planes, the
policy store's database password and its approval secret, straight into Secrets
on your own cluster. This repo never sees them.
One of them is easy to miss because nothing in the stack uses it: the gateway's
POST /v1/fuse/declassify (the release valve for its agent firewall: a person
reviews a run and the taint label comes off it) is not behind the gateway's
admin key. It has a key of its own, x-fuse-declassify-key, and the gateway
treats it as optional, so with none set anything that reaches port 4100 can
clear a run. The installers therefore mint declassify_key into the
stack-keys Secret (the gateway reads it as TOKENFUSE_DECLASSIFY_KEY) and
pass it in on stdin, never as a command-line argument. Clearing a run needs it:
kubectl -n agent-stack get secret stack-keys -o jsonpath='{.data.declassify_key}' | base64 -dA cluster installed before this key existed gets it the next time an installer runs against it. Applying the manifests alone leaves its gateway pod waiting for a key that is not there, which is deliberate: an optional key would start the gateway with the endpoint open.
That is a correction, not a design note. The manifests used to hand out
TOKENFUSE_CLOUD_ALLOW_DEVKEY=1, which makes the literal string devkey an
admin bearer, and to leave WARDRYX_KEYS unset, which makes the policy plane
accept ANY bearer. On one machine that is a dev convenience. In a cluster it is
a published credential: on 2026-07-25 a pod that labelled itself
plane: console used it to delete a freeze, and the frozen agent resumed while
the console still displayed FROZEN (GOTCHAS 20).
The operator's own login is separate and stays theirs: one account per box, set
with genaryx-web set-password reading the password from stdin, stored as an
Argon2id hash on the console's volume. There is no path by which we could
issue, see or reset it.
deploy.sh THE entry point. Asks what it needs, then: install.sh, images,
manifests, verify.sh, security-tests.sh, and your way in.
install.sh the cluster itself: k3s, Calico, Longhorn, the storage classes,
the cloud controller. Hetzner-specific by design.
build.sh build images from source at :dev and import them into every
node over ssh. Nothing needs building any more, so this is the
escape hatch: a change that is not released yet, or a cluster
with no way out to ghcr.io. BUILD_PLANES=1 adds the Go planes
verify.sh prove a cluster is running this stack, not merely green
security-tests.sh attack it: every fix below re-run as a standing check, from
a forged pod label to the bytes in etcd. Two dozen of them, and
the exact count varies with what a given cloud exposes
tunnel/ the operator's way in: WireGuard, TLS, and the console behind
both. Nothing here is published; see tunnel/README.md
hub/ a second site's way IN: up.sh, add-site.sh, down.sh for
manifests/53-hub-entry.yaml, the hub's one metered public
entry. See "A second site" below
delegation/ the opt-in identity provider: up.sh, down.sh for the upstream
issuer (vouchryx itself is in the default install). See "The delegation
plane" below
identity/ up.sh: the gateway's client keys and identity map, from files,
checked by the gateway image before the cluster is written;
mint.sh: the keys a deploy mints, for a cluster applied by hand.
See "Client keys and the identity map" below
tool-hold/ agents.sh: give an agent a tool, take it back, list what is
granted. See "An agent's tool call waits for a person" below
manifests/ plain YAML + a kustomization, applied with kubectl -k (no Helm).
Only the files listed in `kustomization.yaml` are in the default
apply. Every other manifest is opt-in, applied by a flag, a script
or by hand: among them 45-heraldyx.yaml (notifications),
49-costcrew.yaml (the FinOps plane), 55-copilot-cloud.yaml (a
larger copilot model) and 60-harden-neighbours.yaml (hardening for
the cluster's other namespaces). See "What runs as what" above
images/ one Dockerfile per language family, plus the console's mixed build
GOTCHAS.md every trap this cost us, each with the fix that is already applied
PORTABILITY.md the measured Hetzner baseline, and what to compare AWS/GCP on
cloud/ the same cluster on AWS and on GCP: Terraform, the installer
differences, the teardown, and COSTS.md for what each one burns
evidence/ command output from the live cluster, not claims about it
One command. It asks what it needs BEFORE the long part, so a missing DNS record costs ten seconds rather than a quarter of an hour of building.
A node builds nothing. Every image these manifests name is published at
ghcr.io/taipanbox/<name>, pinned to an immutable version tag, pulled by the
kubelet, and carrying both linux/amd64 and linux/arm64. That became true of
all of them on 2026-09-01; until then tokenfuse and the console were still
assembled on a node, and building the console was most of a deploy.
That means every node needs to reach ghcr.io. These nodes already reach
the internet for k3s, Longhorn and Calico, so it is one more host rather than a
new requirement. A cluster that genuinely cannot: BUILD_PLANES=1 ./build.sh
builds locally at :dev, and the manifests then need their image lines
pointed at what you built.
git clone https://github.com/TAIPANBOX/stack-k8s && cd stack-k8s
./deploy.sh --servers ip1,ip2,ip3 --agents ip4,ip5 --hcloud-token <token> \
--trust-domain acme.example--trust-domain is the domain your agents carry in their ids
(agent://acme.example/...). The manifests ship a placeholder there on purpose
and verify.sh fails on it, so leave the flag out and the deploy ends red: it still
installs everything and prints your way in, then names the failed check in place of
"Done." and exits non-zero (invariant 88).
What it asks, in order:
| the operator tunnel? | Y/n. No means you will reach the console with ssh -L, which is a real way to run this |
| your console domain | must have an A record at 10.9.0.1. Checked against DNS while you are still watching |
| your gateway host | must have an A record at a public address of one of your nodes. Also checked |
| the console account | username, and a password typed blind and twice. Blank generates one |
Then it installs, and ends by issuing your first WireGuard device: a .conf
saved beside the script at mode 0600, a QR for a phone, and the address to open.
Everything the installers download from other projects (the k3s install script
at the release's tag, Calico's operator, Longhorn, Hetzner's cloud controller) is
fetched once on your machine and checked against a sha256 pinned in
lib/verified-fetch.sh before a node sees a byte of it. If you pin another
version with K3S_VERSION, CALICO_VERSION, LONGHORN_VERSION or CCM_VERSION,
give the hash of that version's file too (K3S_INSTALL_SHA256, CALICO_SHA256,
LONGHORN_SHA256, HCLOUD_CCM_SHA256): a version with no hash stops the run and
names the variable, and a mismatch names the file, the hash expected and the one
received (invariant 87).
The whole conversation can be skipped for automation:
./deploy.sh --servers ip1,ip2,ip3 --hcloud-token <token> \
--console-domain box.you.com --endpoint-host gw.you.comor --no-tunnel to leave the way in for later. There is deliberately no
--console-password: an argument is visible in ps to every user on the
machine for as long as the deploy runs.
Piped from curl it still works, and with no terminal to ask on it says so and names the flags rather than hanging or guessing:
curl -fsSL https://raw.githubusercontent.com/TAIPANBOX/stack-k8s/main/deploy.sh | bash -s -- \
--servers ip1,ip2,ip3 --hcloud-token <token> --no-tunnel./install.sh --servers ip1,ip2,ip3 --agents ip4,ip5 --token <hcloud-token>
./build.sh root@ip1 root@ip2 root@ip3 root@ip4 root@ip5
kubectl apply -k manifests/
KUBECONFIG=./kubeconfig.yaml ./tunnel/up.shEvery one of them is idempotent, and that is now true rather than merely claimed: the first time anyone ran this twice on the same machine it broke six times, each a step correct once and impossible the second time. GOTCHAS 56-62.
Nothing here needs a credential. Every repository this pulls is public and
Apache-2.0, the Genaryx console included since 2026-07-27, so the console comes
up by default rather than on production of a token. --console-token survives
for the one case it is still good for: building the console from a private fork
of your own.
Then reach the console over your own tunnel (20-console.yaml explains why
there is no public entry point by default), and check the deployment with
./verify.sh --freeze and ./security-tests.sh.
A run's budget used to come from the header the agent sends, and the next call of
an open run could widen it, so with no client keys, no identity map and no unit
caps the per-run ceiling was whatever the agent said. Since tokenfuse v1.5.0 the
gateway has a ceiling the operator sets, and 10-planes.yaml sets it:
TOKENFUSE_MAX_RUN_BUDGET_USD is 5.00 on the gateway container.
- What 5.00 means. It is the gateway's own built-in run budget, so an ordinary
run is unchanged and only a budget a caller declares above 5.00 is lowered to
it (the answer to a lowered call carries
x-fuse-budget-clamped). A caller can always ask for less. - What it does not do. It does not lower a budget the Cloud sets, and it bounds each run, not an agent's total spend: an agent that opens a new run id gets a new ceiling's worth.
- Changing it.
--run-budget-ceiling USDondeploy.sh,deploy-gcp.shanddeploy-aws.sh(orRUN_BUDGET_CEILINGin the environment): a positive figure with up to six decimals, no sign, no exponent, checked before anything is installed. It is applied after the manifests, becauseapply -kputs the declared 5.00 back over anything set before it or by hand, and it rolls the gateway to the new figure by itself. Give the flag on every run: a re-run without it returns the gateway to 5.00.
./deploy.sh --servers ... --hcloud-token ... --trust-domain acme.example \
--run-budget-ceiling 2.50TokenFuse's agent firewall refuses a run that read untrusted input and then asks for a
capability it should not have, keeps the anti-exfiltration floor on, and labels a run whose
declared tools carry an injection finding. Every gateway this launcher starts runs it in
enforce, which is what 10-planes.yaml sets. Without the variable TokenFuse falls back to
shadow, which refuses nothing and only records what it would have refused.
- What enforce refuses. A later exec, write or egress call by a run that read untrusted
input. The starter policy names web, email, file and secret sources. A request is never
refused for the text of a tool it declares: a declared tool with a high or critical finding
labels the run
suspected_injection, and the starter rule then applies to that run's later calls. A page that hides text in Unicode tag characters or bidi isolates raises the same label (since tokenfuse v1.23.0), so a run that reads one can lose tools it had before. - Changing it.
--firewall enforce|shadow|offondeploy.sh,deploy-gcp.shanddeploy-aws.sh(orFIREWALL_MODEin the environment). Any other word is refused before anything is installed. TokenFuse also refuses to start on a misspelt value (since v1.11.1), so the check here finds the mistake before the install rather than at pod start. The value is applied after the manifests, becauseapply -kputs the declaredenforceback over anything set before it or by hand, and the gateway rolls to the new mode by itself. Give the flag on every run: a re-run without it returns the gateway toenforce. - What it does not cover. The MCP broker and the
focus-exportsidecar carry no switch. The broker asks the gateway before it forwards a tool call, so the gateway's mode decides for the broker too. The broker also asks wardryx about every tool call (CLAUDE.md invariant 51).
./deploy.sh --servers ... --hcloud-token ... --trust-domain acme.example \
--firewall shadowwardryx v1.5.0 can name the models a policy's agents may use. A policy that sets
allow_models denies a model call whose model matches none of its entries, so an agent
that switches to a model its policy does not name is refused on that call. Entries are
model ids or globs (* any run of characters, ? exactly one), matched exactly. This
launcher writes no such policy, so nothing is restricted until you write one, through the
same policy API as the typed risk rule above:
ADMIN_KEY="$(kubectl -n agent-stack get secret stack-keys -o jsonpath='{.data.wardryx_admin}' | base64 -d)"
kubectl -n agent-stack port-forward svc/wardryx 8090:8090 &
curl -X PUT localhost:8090/v1/policies/support-models \
-H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
-d '{"target": "agent://acme.example/support/*",
"allow_models": ["claude-sonnet-*", "claude-haiku-5"]}'- An empty or absent list restricts nothing. Tool calls are not judged by this rule. TokenFuse
sends
unknownwhen a model call names no model, and a list refuses that unless it namesunknown. - The rule runs before the cost gate, so no approval token lifts it, and a decision under a policy that sets it is never cacheable.
- Rollback: a wardryx older than v1.5.0 refuses a policy file that uses
allow_modelsat start, which is loud. A policy stored through the API is read without that check, so an older build would drop the list without a word. Removeallow_modelsfrom stored policies before rolling back.
The gateway and the MCP broker look for email addresses, card numbers and international phone
numbers in prompts and tool arguments. In shadow, which is the default, a call goes through
unchanged. The gateway adds an x-fuse-dlp header to its answer with how many findings there were and of which kinds, never the text, and logs nothing. The broker logs a warning with the same count and marks _tokenfuse.dlp_pii on tool responses. Neither writes an event or a trace row, and the personal data still reaches the provider.
- Changing it.
--pii-mode off|shadow|mask|blockondeploy.sh,deploy-gcp.shanddeploy-aws.sh(orPII_MODEin the environment).maskreplaces each finding before the call is forwarded, andblockrefuses a call that carries one. Any other word is refused before anything is installed. TokenFuse also refuses to start on an unknown word (since v1.12.0), so the check here finds the mistake before the install rather than at pod start. The value is applied after the manifests, and the broker takes it only when the typed-answer plane is applied. Give the flag on every run: a re-run without it returns both toshadow.
./deploy.sh --servers ... --hcloud-token ... --trust-domain acme.example \
--pii-mode maskdeploy.sh asks for an address for alerts alongside the tunnel and the console
account. Answer it and the box mails you when one of your own agents crosses a
line: a budget gone, a policy denial, a run killed, an agent behaving unlike
itself. The mail comes from the box, and it carries a link into your console,
never a button that acts.
Leave it blank and nothing is installed for it. This is the workload that opens a connection to a mail server outside the cluster, so it is opt-in the same way the load balancer is, and for the same kind of reason:
kubectl apply -f manifests/45-heraldyx.yamlRead that file's header before you do. It carries the egress rule for mail, it says exactly how narrow that rule is, and it says what it leaves open.
The notifier's daily pulse and quiet hours are set in manifests/45-heraldyx.yaml, next to
HERALDYX_MIN_SEVERITY:
HERALDYX_PULSE_HOURS(default24): one mail a day saying the notifier is alive, once a recipient is set;0turns it off.HERALDYX_QUIET(default empty): quiet hours asHH:MM-HH:MM; alerts below critical are held and reported when they end, and a critical is always sent.HERALDYX_TZ(default empty): the IANA zone the quiet hours are read in, for exampleEurope/London.HERALDYX_SMTP_TLS(default unset, which isstarttls): how heraldyx 0.8.0 secures the mail connection. Unset, the server must offer STARTTLS, and a server that does not is refused, so mail is never sent in the clear to a remote host. Useimplicitfor a server on port 465, andplainonly for a loopback relay. Set it in your environment before./deploy.sh,cloud/aws/deploy-aws.shorcloud/gcp/deploy-gcp.sh: the script checks the word and writes it into theheraldyx-mailSecret, and the notifier reads it from there.
The heraldyx drill. The same file carries drills-heraldyx, a suspended CronJob that fires the whole
reaction chain behind one denied tool call: the gateway refuses it, wardryx writes its own record of the
refusal, and heraldyx, reading only that record, journals the mail it sent about it. The gateway drills
(drills) stop at wardryx's record, because heraldyx's journal (sent.ndjson) is on heraldyx's own
ReadWriteOnce volume, which only a pod on heraldyx's node can mount. This drill runs there, reads that
volume read only, and reaches the gateway's port and nothing else. Each run sends one real mail, which is
the reaction it proves, so run it when you mean it:
kubectl -n agent-stack create job --from=cronjob/drills-heraldyx drills-heraldyx-now
kubectl -n agent-stack logs -f job/drills-heraldyx-nowA pass means heraldyx journalled a dispatch for the drill's run. The journal line also says whether your mail
server accepted the message; read it there (outcome in the line's data), because mockryx v0.5.0 matches a
reaction on its source, type and run id only. Run it outside HERALDYX_QUIET hours: inside them heraldyx
holds a high alert until they end, and the drill reports a Finding. With no heraldyx pod running, the job
ends after 15 minutes rather than waiting for one. scripts/drills-can-start.sh holds the shape (CLAUDE.md invariant 90).
An agent does not call scopyx. It calls tokenfuse's MCP broker (52-tokenfuse-mcp-broker.yaml), which holds
scopyx's key, and that is what lets the broker label the run web from the fetch it saw (tokenfuse v1.21.0,
invariant 143) instead of from a tool name the agent reported. scopyx-ingress admits the broker and nothing
else, and an agent-token pod (58-agent-tokens-network.yaml) reaches the broker on 4200. scopyx is applied by
hand, as its header says; so is its key. For an agent whose token names <id> (for example
agent://acme.example/agents/operator) and a name <agent> (its last segment, operator), one key in three
places that must agree:
| Where | Entry |
|---|---|
scopyx-keys, SCOPYX_KEYS (comma-separated) |
<key>=<id> |
tokenfuse-mcp-broker-keys, TOKENFUSE_MCP_SECRETS |
scopyx_key_<agent>=<key> |
tokenfuse-mcp-broker-keys, TOKENFUSE_MCP_SECRET_SCOPES |
`scopyx_key_=agents:;tools:browse |
Append each to what the Secret already holds (the typryx entries stay), then roll scopyx and the broker. A call,
from the agent's pod (the broker is http://tokenfuse-mcp-broker:4200/mcp):
POST /mcp
Authorization: DPoP <the agent's token> (and the DPoP proof, as for any call to the broker)
X-Fuse-Mcp-Upstream: scopyx
X-Fuse-Agent-Id: <id>
x-fuse-run-id: <the run this fetch belongs to>
{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {
"name": "fetch_url",
"arguments": {"url": "https://example.com"},
"_meta": {"scopyx/key": "{{secret:scopyx_key_operator}}"}
}}
x-fuse-run-id is required for scopyx: taint belongs to a run, and the broker refuses a call to a classified
upstream that names none. Use the id of the run whose model calls go through the gateway, so the label lands on
the run that is judged. The broker replaces the handle with the key on the last hop and scopyx removes it at its
door. An answer whose label the gateway did not take is withheld. The broker hands scopyx the same run id
(tokenfuse v1.22.0) and scopyx records the fetch under it (scopyx v1.3.0), so the fetch and the label name one run.
The scope rules are in the Secret now. TOKENFUSE_MCP_SECRET_SCOPES moved from the broker's Deployment into
tokenfuse-mcp-broker-keys, next to the keys it scopes, and the broker stops at start on a vault entry with no
rule. A Secret minted by --with-typed carries the typryx rule. One made before this change has none: add it
(the command is in the header of 52-tokenfuse-mcp-broker.yaml) or the broker waits.
typryx is off by default for a smaller reason than heraldyx or scopyx: with
--with-typed alone it reaches nowhere outbound (its backend is stub, free and
deterministic) and enforces nothing, it is simply a whole plane somebody may not
want. ./deploy.sh --with-typed applies it after the kustomization on the stub;
the next section is how to give it a real backend.
Its door is a Secret, typryx-keys, and the broker's below is another,
tokenfuse-mcp-broker-keys. @decided 2026-10-14: the deploy scripts mint both
when they are absent and never overwrite one. With --with-typed or a
--typed-mode, typed/mode.sh door-secrets mints two fresh 40-character
values, the broker's vault carrying typryx's, the identity
agent://<--trust-domain>/typed-broker, and prints how to read them back, never
the values; a Secret you made first is kept, on that run and every later one. If
only typryx-keys exists, the broker's is minted from its bearer; if only the
broker's exists, the deploy stops and says why. Read them with
kubectl -n agent-stack get secret tokenfuse-mcp-broker-keys -o jsonpath='{.data.TOKENFUSE_MCP_KEYS}' | base64 -d
kubectl -n agent-stack get secret typryx-keys -o jsonpath='{.data.TYPRYX_KEYS}' | base64 -dBy hand, without the launchers, the stub is
kubectl apply -f manifests/51-typryx.yaml
kubectl -n agent-stack create secret generic typryx-keys \
--from-literal=TYPRYX_KEYS='pick-a-long-secret=agent://acme.example/support-bot'Without that Secret the pod does not start (CreateContainerConfigError), the
same stance scopyx takes on its own key. Its journal is on the shared event bus (stack-events), the same
place every other plane's history lives; the record plane's own mapper does
not seal typryx's event types today regardless (manifests/51-typryx.yaml
says why), so that is a place to read them, not a claim that they are sealed.
tokenfuse's MCP broker fronts typryx by configuration since 2026-09-26. Its
static callers, broker-caller and drills-broker, are the gateway's own keys of
the same ids (CLAUDE.md invariant 85), so by hand its Secret copies them from
gateway-client-keys:
kubectl apply -f manifests/52-tokenfuse-mcp-broker.yaml
kubectl -n agent-stack create secret generic tokenfuse-mcp-broker-keys \
--from-literal=TOKENFUSE_MCP_KEYS="$(kubectl -n agent-stack get secret gateway-client-keys -o jsonpath='{.data.client_keys}' | base64 -d | tr ',' '\n' | grep -E ':(broker-caller|drills-broker)$' | paste -sd, -)" \
--from-literal=TOKENFUSE_MCP_SECRETS="typryx_key=$(kubectl -n agent-stack get secret typryx-keys -o jsonpath='{.data.TYPRYX_KEYS}' | base64 -d | cut -d, -f1 | cut -d= -f1)" \
--from-literal=TOKENFUSE_MCP_SECRET_SCOPES='typryx_key=tools:ask|ask_freeform|list_questions'Each entry is secret:key_id, so the value has this shape:
TOKENFUSE_MCP_KEYS='pick-a-different-long-secret:broker-caller,and-another-long-secret:drills-broker'The key id after the colon is a bare name, not an agent:// id: tokenfuse
splits each secret:key_id entry on its LAST colon, so a URI there turns
agent into the end of the secret and the caller's real secret is refused
401 (scripts/client-key-ids-are-bare.sh).
The broker does not run tokenfuse's defaults here. A raw secret in tool
arguments is refused (-32002) rather than forwarded, and a tool listing the
broker's scanner flags is refused rather than passed with a log line. It asks
wardryx about every tools/call, so the policy judges tool calls as it judges
model calls: a call with no x-fuse-agent-id is refused (it cannot be judged), a
tool the policy denies is refused (-32004), and with wardryx unreachable the
call is refused (fail closed, like the gateway). A call the policy holds for a person
says why, with the policy's own reason beside the approval id, and every refusal text is
cleaned of control and hidden characters before a model reads it (since tokenfuse v1.23.0).
An agent's tools/list through the broker leaves out the tools wardryx refuses that agent
outright, a deny_tool or a tool outside an allow_tool list (tokenfuse v1.24.0), so a
model is not offered a tool it can never call.
A {{secret:NAME}} handle is not
a raw secret and resolves as before. Pinning tool definitions
(TOKENFUSE_MCP_LOCK) needs a lock file you approved and is not set. The same
settings were measured on stack-single's compose environment on 2026-10-17, not
on a cluster.
The broker drills. mockryx's three drills for the broker (/scenarios/mcp in its image: a
raw secret in tool arguments, personal data in tool arguments, and the tool hold) run as the
suspended CronJob drills-broker, applied with the broker:
kubectl -n agent-stack create job --from=cronjob/drills-broker drills-broker-now
kubectl -n agent-stack logs -f job/drills-broker-nowIt sends the drills' own key from drills-broker-key to the broker and to nothing else, and its
pod reaches the broker on 4200 and no other address. With this stack's settings the secret drill
passes, the PII drill reads skipped_not_configured (PII runs in shadow), and the tool-hold
drill passes with both its calls stopped inside the broker. That drill is the cluster's own copy,
mcp-ungranted-tool-held-on-this-cluster (the ConfigMap drills-broker-scenarios, mounted over
the image's file of that name): mockryx's own asks its second call for a result from an MCP server
that answers search_notes, and no server in this stack does. The copy's first call, as an id no
grant names, is held for a person (one pending approval on wardryx, which later runs reuse); its
second, as a drill identity, gets past the hold and is refused by the broker's vault (-32008),
because the {{secret:typryx_key}} handle it carries is scoped to typryx's own tools. Nothing is
forwarded. scripts/broker-drills-pass.sh runs the job as shipped in CI against the pinned
broker, gateway and wardryx on this repository's settings with no MCP server, and mockryx's
original set against a stand-in server, and requires every drill to pass.
manifests/52-tokenfuse-mcp-broker.yaml has the full story: why two Secrets
rather than one, what its NetworkPolicies admit, and what was measured
through it on kind (it needs typryx v0.2.0 or later; 51-typryx.yaml pins
v0.4.1; GOTCHAS 106). Reaching typryx directly,
without the broker, is unchanged, over your own tunnel or
kubectl -n agent-stack port-forward svc/typryx 4320:4320@decided 2026-09-30: a customer picks where the data of a typed answer goes,
from three modes, and the launchers ask. Nothing is chosen for you: the default
sends nothing anywhere, because Jev is a paid service and either real mode is a
data-egress decision. The flags are the same on deploy.sh,
cloud/gcp/deploy-gcp.sh and cloud/aws/deploy-aws.sh, and typed/mode.sh
holds the one copy of their checks.
| Mode | Flags | What leaves the cluster | Measured, 2026-09-30 |
|---|---|---|---|
| off (default) | none, or --typed-mode off |
Nothing. typryx is not deployed. | no typryx, a constant default answer: 25.1% accuracy |
| stub | --with-typed alone |
Nothing. Free and deterministic, it answers nobody's real question. | none, it is a stand-in |
| jev | --typed-mode jev --typed-jev-key-file PATH |
The named fields of each question go to TypeSafe's hosted API, a paid service billed to your key. Only the fields a template names are sent. | 87.1% accuracy, ECE 0.042, p50 229 ms |
| own-model | --typed-mode own-model --typed-model-url URL --typed-model-name NAME (optional: --typed-model-key-file PATH, --typed-model-cidr CIDR) |
Nothing, if the URL is a model server you run (Ollama, vLLM, any OpenAI-compatible one) inside your cluster or network. If the URL is a hosted service, what you send it. | qwen2.5:7b on an 8-vCPU CPU VM: 70.0% accuracy, ECE 0.273, p50 2130 ms |
@measured on the 434-question frozen test in typryx-evalset, run 2026-09-30,
one run per row. Read the numbers as one model on one test set: the own-model row
is a 7B model on CPU before any fine-tuning or calibration on your own data, so
it is a floor for that mode and not its ceiling, and nothing here measures what a
tuned model would score.
# Jev: the key is a file on the machine running the launcher
./deploy.sh --servers 1.2.3.4,1.2.3.5,1.2.3.6 --typed-mode jev \
--typed-jev-key-file ~/keys/jev.key
# Your own model, on your own hardware
./deploy.sh --servers 1.2.3.4,1.2.3.5,1.2.3.6 --typed-mode own-model \
--typed-model-url http://10.0.0.20:11434/v1 --typed-model-name qwen2.5:7bHow each mode behaves, because the defaults are deliberate:
- The key is a file, never a value.
--typed-jev-key-file(and the optional--typed-model-key-file) name a file. The launcher checks it exists and is not empty before it installs anything, and refuses by name if not. It becomes a Kubernetes Secret (typryx-jev-key,typryx-model-key) built on stdin, mounted into the pod as a file, andTYPRYX_JEV_KEY_FILE(orTYPRYX_OPENAI_KEY_FILE) points at it. It is never an environment value, never in a ConfigMap, never on a command line, never printed, and never in a rendered manifest. There is deliberately no flag that takes the key itself. - The URL ends in
/v1.--typed-model-urlmust, and must not carry credentials.--typed-model-nameis required with it. - typryx gets one way out, and only in these two modes. The stack is
default-deny, so each real mode adds a NetworkPolicy,
typryx-egress-model: Jev gets port 443 to the public internet with the private ranges excluded; an own model gets exactly the address and port in its URL (an IP literal becomes a/32,name.namespace.svcbecomes that namespace). A model reached by a host name on your own LAN needs--typed-model-cidrto say which network, because a NetworkPolicy cannot match a name. - Flags of another mode are refused, not ignored, so a Jev key file next to
own-modelis an error rather than a key quietly not used.--with-typedtogether with--typed-mode offis refused as a contradiction. - Switching modes is an ordinary re-run, because each mode is rendered whole
and applied, not patched.
offdoes not remove a typryx an earlier run installed, and switching back to the stub leavestypryx-egress-modeland the key Secrets behind (anapplydoes not prune; this repository does not delete keys on its own initiative). Remove them yourself if you want them gone:kubectl -n agent-stack delete networkpolicy typryx-egress-model. - The door is the same in every mode.
typryx-keysandtokenfuse-mcp-broker-keysare minted by the deploy when absent and kept when present, whatever the mode, as above.
A current OpenAI model behind --typed-model-url takes three more variables,
because it refuses the request a local server takes. The launchers have no flag
for them, so set them on both Deployments, and again after a later apply, which
puts the manifests' environment back:
kubectl -n agent-stack set env deploy/typryx deploy/typryx-wardryx-proxy \
TYPRYX_OPENAI_TOP_LOGPROBS=5 TYPRYX_OPENAI_MAX_COMPLETION_TOKENS=16 \
TYPRYX_OPENAI_REASONING_EFFORT=noneTraining on your own data. @decided 2026-09-30: we do not fine-tune or
ship models for customers. A customer can fine-tune and calibrate their own model
on their own data, and typryx gives them what they need to do it. Add
--typed-training to any launcher, next to --with-typed or a --typed-mode,
and typryx (v0.3.0 or later; 51-typryx.yaml pins v0.6.0) keeps a local training
log: one line per answered question holding the state the template let through
and the identity of the answer, never the backend's answer or its probabilities.
You post what actually happened to /v1/outcome, and typryx export --training
pairs each logged question with that human truth. The truths you post are your
own data. Answers a hosted backend returns are not suitable as training labels
for another model (TypeSafe's agreement forbids it for Jev), which is why the log
holds none.
./deploy.sh --servers 1.2.3.4,1.2.3.5,1.2.3.6 --typed-mode own-model \
--typed-model-url http://10.0.0.20:11434/v1 --typed-model-name qwen2.5:7b \
--typed-training
# later, on your own machine; stdout is the training file, stderr the counts
kubectl -n agent-stack exec deploy/typryx -- /usr/local/bin/typryx export --training \
--training-dir /var/lib/typryx/training --ledger /var/lib/typryx/ledger > train.jsonl- Off by default, and byte for byte. Without the flag no mode renders the
variable, and every render is exactly what it was before the flag existed. With
it, each mode gains one environment variable,
TYPRYX_TRAINING_DIR, and a comment; no volume, claim or policy comes with it.--typed-trainingwith no typryx to write it (no--with-typed, or--typed-mode off) is refused. - No new disk. A PersistentVolumeClaim provisions a real disk that is billed
from creation on a cloud cluster, so a flag does not add one. The log is a
directory (
/var/lib/typryx/training) ontypryx-state, the claim typryx already has for its ledger. That is also where it is useful: the export pairs the log with truths on the ledger, so a log that died with the pod beside a ledger that survives it would have nothing to pair with. It is not onstack-events, the shared bus other planes read, because it holds question text. - How long it lives, and how big it gets. As long as the
typryx-stateclaim: deleting the claim or the namespace ends it, and a pod restart does not. It shares that claim's 1Gi with the ledger, and typryx never rotates or deletes the file, so watch its size yourself. The file is plain text at rest on the claim's disk (typryx creates it0600); treat it as you treat the ledger. A bigger or separate volume is a claim of your own, which is a spending decision that is yours to make and apply, not something a launcher flag does for you. - What typryx does not do. It does not train, host or ship a model. The
fine-tune happens with your own tooling on your own hardware, and you then
serve the tuned model behind
--typed-mode own-model.
Not proven. This was checked without a cluster: every mode, with and
without --typed-training, renders to a schema-valid manifest
(kubeconform --strict) and the gate in scripts/typed-mode-is-honest.sh holds
the rules above. A pod starting with the key Secret mounted, the egress rule
reaching a real model, typryx writing training.ndjson on the typryx-state
claim (it is meant to be writable there, like the ledger beside it, by the same
fsGroup), and the kubectl exec export above, have not been run through these
launchers.
Use this when you want a person to approve a tool call because a classifier says
it is probably destructive, an external send, or a money movement. It needs
typryx deployed (--with-typed, or a --typed-mode), a wardryx of v1.4.0 or
later (v1.2.0 for the rule alone; when_absent needs v1.4.0), and a policy rule you
write. All of it is off by default.
./deploy.sh ... --with-typed --typed-risk-signal # the free stub backend
./deploy.sh ... --typed-mode jev --typed-jev-key-file ~/jev.key --typed-risk-signal- What it adds.
56-typryx-wardryx-proxy.yaml, typryx'swardryx-proxy, as its own Deployment. It forwards every request to wardryx unchanged. For aPOST /v1/decidethat carries a pending tool call (a name and whole arguments), it asks typryx which ofread_only,reversible_change,destructive,external_sendandfinancialthe call belongs to, and adds the answer to the request as asignalsentry. No answer in time, truncated arguments, or anything unusual: the request is forwarded untouched, never refused. It answers from the same backend you chose for typryx (same key, same egress rule, no wider) and keeps no state: no claim, no journal, no ledger and no training log, so the tool-call arguments it asks about are not written down. - Where it sits. Only tokenfuse's MCP broker asks wardryx through it. The LLM gateway keeps asking wardryx directly, so a slow typed answer never sits on the model path. The broker asked wardryx nothing before; with the flag it asks about every tool call, fails closed, and uses the same pep key as the gateway.
- What it costs. Each tool call that carries a name and whole arguments is one
typryx ask. In the
jevmode that is a paid call, and the tool name, arguments and target leave the cluster; the proxy has its own hourly cap (TYPRYX_MAX_CALLS_PER_HOUR, default 1000). Thestubbackend's probabilities mean nothing: do not write a rule against them. - What holds, and what does not. With this flag the policy plane also holds a brokered
tool call that arrives with no risk signal, for a person to approve (CLAUDE.md invariant
65). A signal that answers holds only
destructive,external_sendandfinancialat 0.8 or more; a signal never denies, and wardryx refuses a rule that would. Without the flag no hold exists, and the signal, where there is one, is added and ignored. The stub's probabilities are noise, so the hold acts on that noise too.
An example policy, written once, through the policy API (read the key from the cluster, reach wardryx with a port-forward, since the namespace is default-deny):
ADMIN_KEY="$(kubectl -n agent-stack get secret stack-keys -o jsonpath='{.data.wardryx_admin}' | base64 -d)"
kubectl -n agent-stack port-forward svc/wardryx 8090:8090 &
curl -X PUT localhost:8090/v1/policies/support-risk \
-H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
-d '{"target": "agent://acme.example/support/*",
"hold_if_signal": {"name": "action.risk_class",
"values": ["destructive", "external_send", "financial"],
"min_probability": 0.8,
"when_absent": "hold"}}'A call the rule holds waits for a person to approve it in the console; the approval is bound to the exact call they read (wardryx v1.2.0), so the same arguments re-spaced are another call.
A missing signal. Without when_absent, a tool call that reaches wardryx with no
action.risk_class signal is allowed as if it were harmless. That is what a call padded
past the 12 KiB argument cap gets (sent with arguments_truncated and no arguments), and
what a typryx that is out of budget, timed out or down leaves behind. With
"when_absent": "hold" such a call waits for a person instead. A model call, which has
no tool call yet, is never held for a missing signal. The cost is that every tool call
typryx does not answer waits for a person, a typryx outage included. wardryx v1.4.0 measured
13,312 and 65,536 byte calls with no signal allowed before this option existed. Keep
single-use on, which is the default: leave WARDRYX_APPROVAL_SINGLE_USE unset. A padded
call carries no arguments, so one approval fits every padded call to the same tool and
target, and single-use lets exactly one of them through.
Not proven. Checked without a cluster: every mode renders with the flag to
schema-valid manifests (kubeconform --strict), the gate in
scripts/typed-mode-is-honest.sh holds the rules above, and the proxy was run as
a container against a stand-in wardryx. A pod behind these NetworkPolicies, wardryx
holding a real call on a real signal, the broker's decision reaching the proxy in
a cluster, and the latency the proxy adds with a hosted backend, have not been run
through these launchers. The proxy's ask deadline (3000 ms) and the broker's wait
(7000 ms, longer than the most the proxy will accept, 5000 ms) are chosen from
the Jev median (about 230 ms) and an own model's measured median on CPU (2,130 ms
for qwen2.5:7b on 8 vCPU), not measured on a cluster. The proxy binds the pod address with
TYPRYX_ALLOW_OPEN_BIND=1, because the broker cannot send an X-Typryx-Key; its
door is the one NetworkPolicy that admits the broker alone.
On by default. Every six hours a sidecar of the gateway's pod (verdryx-slo) measures each agent's error budget over the last 28 days of traffic. When a budget is spent, wardryx puts that agent's calls to a person, and the console shows them like any other hold. A granted approval lets that one call through.
What spends a budget. A run that something had to stop, and a run that cost more than three times the fleet's median. So an agent you attack on purpose spends its budget, and so does one that does far heavier work than the rest of the fleet. A rehearsal identity is an agent too. To narrow it, change the target of slo-burn-hold in the wardryx-policy ConfigMap, and to measure and hold nobody, delete the rule. A hold itself spends nothing: an agent on hold can earn its budget back while it keeps working.
How it ends. The sidecar writes a line while a budget is spent, and wardryx lets the agent go once the newest line is older than 48 hours (WARDRYX_SIGNAL_EVENTS_MAX_AGE). A bad spell stops counting once the window has passed it. The traces are the pod's emptyDir, so a gateway restart starts the measurement again.
What you can see. wardryx's /readyz carries "signal_events": "ok", "unreadable" or "broken". Every decision records the signal, whether or not it held anything, and heraldyx alerts on each slo_burn line. A sidecar that cannot measure stops, and the pod shows it, because a routine that cannot measure must not look like a fleet with nothing to report.
What guards the file. It is verdryx.ndjson on stack-events, the bus owner's file in group 20020, which only the sidecar carries (uid and group 20020), so no other plane can write or truncate it, and nobody but the owner can rename or replace it. A file wardryx cannot believe holds nobody, on purpose: this signal can only add a hold, and every other control stands without it.
On by default on a new cluster. When an agent calls a tool through the MCP broker and nothing grants it that tool, wardryx holds the call for a person: the agent gets a refusal (-32004, requires approval) and the console shows the hold. Model calls pass as they did, and so do scopyx's questions about where a fetch may go. A rule that only restricts an agent, a deny_tool or a max_steps, does not end the hold: a restriction is not a permission.
Give an agent a tool, in one command:
./tool-hold/agents.sh agent-allow agent://acme.example/agents/billing lookup_invoice,send_reminder --why 'the monthly reminders'
./tool-hold/agents.sh agent-allow agent://acme.example/agents/billing all --why 'a rehearsal' # every tool, with a warning
./tool-hold/agents.sh agent-deny agent://acme.example/agents/billing send_reminder --why 'reminders stopped'
./tool-hold/agents.sh agent-listThese are stack-single's ./install.sh agent-allow, agent-deny and agent-list, for a cluster. The request runs in the console's pod through kubectl exec, so the admin key stays where the Secret stack-keys put it and is on no command line. agent-allow writes through PUT /v1/policies, so it is in force at once with no restart, it is on the record as policy_updated, and it survives a restart. The agent must name a trust domain, agent://<domain>/..., and a * may follow the domain. --why is required and goes in the policy's name beside the date. agent-deny takes the tool back, and the next call waits for a person again. agent-list shows whether the hold is on, what wardryx loaded (its own start line, read with kubectl logs deploy/wardryx: from 2.6.1 wardryx says it there and not on the bus), every grant and where it lives, and, with the hold off, what the hold would stop. On a node, KUBECTL="k3s kubectl" names the kubectl to use.
A grant asks for an agent token, so a holder of a static key cannot borrow a granted name: the broker reports the static key, and the call is refused. An agent that really calls with a static key takes --static-key, and then its id is the caller's word. A grant also lists none, the source scopyx sends when it asks about the same agent's fetch.
What a new cluster comes with. One block in the ConfigMap wardryx-tool-hold, which wardryx's policy directory projects beside wardryx-policy. It is a ConfigMap of its own because every launcher run applies wardryx-policy from this tree. The block is stack-single's, rule for rule:
| Rule | What it is for |
|---|---|
tool-hold |
The floor: target: "*", when_no_grant: hold. It lives in the file, and PUT refuses it, so a key cannot take it away |
grant-drills |
Every tool for agent://mockryx.local/*, the fire drills. Their own deny rules still apply |
grant-install-check |
ask for agent://local.invalid/install-check, under the broker's static key. Nothing here calls as that identity today, and the two stacks keep one block |
grant-operator-web |
fetch_url and browse for agent://<trust domain>/agents/operator. Written when a scopyx runs and the trust domain is set; a cluster that adds scopyx after the install gets it on its next launcher run, or with agent-allow |
Felyx and CostCrew get nothing: both make model calls only. verify.sh and security-tests.sh call nothing through the broker, and their probes of wardryx carry no tool call, so the floor does not judge them.
A launcher writes this block, after it has asked the question below. kubectl apply -k manifests/ by hand leaves the hold off: the projection is optional, and a floor nobody was asked about is what this design refuses.
An existing cluster stops the upgrade and applies nothing. Before the first apply, a launcher runs wardryx replay -policy <what this run would serve> -format json over the cluster's own recorded decisions, as a Job of the wardryx image these manifests pin, with the events claim mounted read only. The candidate is this tree's starter policy, the block, and what is in the store. If a call of an agent outside the seeds would be held, the run stops: it prints the agent, the tool, how many calls and when last, and the commands to run. The Job and its ConfigMap are gone before it stops. The same goes for a history that could not be asked. A cluster that already carries the block is not asked again.
A wardryx older than 2.6.0 cannot store a grant, so the cluster moves first, with the hold off:
TOOL_HOLD=0 ./deploy.sh <your flags> # this release, no hold
./tool-hold/agents.sh agent-allow <agent> <tools> --why 'what it is for'
./tool-hold/agents.sh agent-list # asks again: what would still wait
TOOL_HOLD=1 ./deploy.sh <your flags> # turns it on, and shows anything still on the list| Switch | Default | What it does |
|---|---|---|
TOOL_HOLD or --tool-hold, on deploy.sh, deploy-gcp.sh and deploy-aws.sh |
on | 0 takes the block and its grants out and leaves the ConfigMap empty, which is how the next run knows: a run that says nothing keeps it off. 1 turns the hold on over whatever the question found |
Going back. TOOL_HOLD=0 first, and only then an older tree or image. A wardryx older than 2.6.0 refuses when_no_grant and grant_tool at load, and with the doors failing closed that refuses every call. By hand: kubectl -n agent-stack delete configmap wardryx-tool-hold, then kubectl -n agent-stack rollout restart deployment/wardryx. Grants written through agent-allow can stay in the store: 2.5.1 reads past the key.
What a person can do about one call. The console lists each hold with the tool and its target, not the arguments. An approval there mints a token for that one call, shown once, and the agent has to present it (x-fuse-approval-token), so a hold mostly ends by a grant. wardryx keeps one row per agent, run and call, and at most 20 waiting per agent (WARDRYX_PENDING_PER_AGENT), so an agent repeating a call does not flood the queue.
What it does not see. A tool an agent reaches around the broker. On a cluster with no typed plane and no scopyx there is no broker, so no tool call reaches wardryx at all. An id with no agent:// scheme is held and cannot be granted, so a person answers its calls one at a time.
Every stream on the shared bus is a hash chain, and nothing on a box checked one
until agent-stack-go v1.1.0's agent-conform watch-dir. A CronJob in the default
apply (agent-conform, in 40-routines-and-secrets.yaml) runs it every 15
minutes over the bus. A break becomes a chain_broken event (high) in
agent-conform.ndjson on the bus, where heraldyx and the console already read; a
chain with no prev_hash at all is reported once as chain_unchained (low),
since the field is optional. heraldyx v0.7.0, the version pinned here, has its own
sentence for chain_broken: it names the break and says that nothing was repaired,
quarantined or stopped.
- A new break fails the Job, once, on purpose: a second signal beside the
event, and
verify.shcounts the failed pod as not Running until it ages out (three are kept). The next run exits 0, because the finding is remembered. - Where it remembers. In
conform/agent-conform.state.json, a directory of its own beside the bus onstack-events(it replaces that file by rename, whichstreams/allows nobody but the owner). AnemptyDirwould forget between runs (each run is a new pod) and announce a persistent break every 15 minutes, and a claim of its own is a billed disk, which is your decision, so it adds none. It runs as uid and group 10002 in the bus group, and can append to its own stream and to no other plane's. - What it cannot see.
prev_hashis unkeyed: a writer compromised in its own uid can forge its own stream with a valid chain, and truncation from the end is invisible. Only signing closes those. - File names. heraldyx v0.7.0 and idryx v1.2.1 refuse an event whose
sourceis not allowed for the file it was read from (<source>.ndjsoncarries<source>;tokenfuse-cloud.ndjsonandtokenfuse-mcp.ndjsoncarrytokenfuse). Every stream this launcher names already matches, andscripts/bus-names-match-the-source-rule.shkeeps it so.
Use this when a customer runs more than one site and wants ONE hub (this
cluster's tokenfuse Cloud, wardryx and policy store) with a gateway at each
site, reached with no VPN (@decided 2026-09-26). manifests/53-hub-entry.yaml
is the hub's one public entry: Caddy in front, terminating TLS with a free
Let's Encrypt certificate, exposing exactly the eight routes a remote gateway
calls and 404 to everything else, the console included. It needs
tokenfuse-cloud v1.2.0 or newer, which names a site from its own Cloud key.
One of the eight, GET /v1/run-spend, lets a site's gateway pick up its
runs' spend after a restart; the Cloud answers it only about that site's own
runs, and it needs a tokenfuse Cloud and gateway new enough to carry it (an
older pair keeps working, and a restarted site gateway then counts its runs
from zero, as before).
./hub/up.sh # applies the entry, waits for its address and
# both certificates, prints the two URLs
./hub/add-site.sh acme-warehouse # mints that site's two keys, writes
# site-acme-warehouse.envThen, on the site itself, set the four variables hub/add-site.sh wrote
(TOKENFUSE_CLOUD_URL, TOKENFUSE_CLOUD_KEY, TOKENFUSE_WARDRYX_URL,
TOKENFUSE_WARDRYX_KEY) on that site's own gateway, the same way any other
setting reaches it.
Metered. The entry is a type: LoadBalancer Service, same shape as
50-loadbalancer.yaml: a real forwarding rule billed hourly from the moment
it exists, created by Kubernetes rather than
Terraform, so hub/down.sh deletes it first, before anything else, the same
order cloud/gcp/teardown.sh and cloud/aws/teardown.sh already use for the
console's own balancer.
What stays inside. Every other Service in this namespace, the console
included, is unreachable through this entry: it proxies to exactly
tokenfuse-cloud and wardryx, on the eight paths named above, held narrow by
scripts/hub-entry-is-narrow.sh (CLAUDE.md invariant 23) rather than by
being merely unadvertised. A site's key is checked by the plane it reaches
the same way every other credential in this stack already is; TLS here is
transport, not authentication.
@measured 2026-09-26 on GCP (N2/G2): 17 of 17 outcomes in a local test with
no cloud, 12 of 12 from the public internet against a live entry.
@measured 2026-09-27 on GCP, this manifest and these scripts as committed:
hub/up.sh 66 s to both certificates, hub/add-site.sh minting a site that
then called through the hub and appeared by name on /v1/gateways, a second
add-site.sh for the same name refused, 16 of 16 from the public internet,
hub/down.sh leaving no forwarding rule or target pool behind. NOT proven
here: a second real customer site (the lab's second site was a k3d cluster
sharing a home network with the operator's own machine), a hub outage longer
than a minute, and a stolen site key, which the edge does not itself bind to
an address. Both runs above were before /v1/run-spend, the eighth route, was added to the
manifest, so neither measured it through the entry.
vouchryx is in the default install and runs agents-only. It issues the agent tokens that the gateway,
the MCP broker and wardryx verify (see "Agent tokens" below), and it needs no identity provider to do
that. The deploy mints its signing key and its revoke key into the vouchryx-keys Secret, and it enrols
the operator's own agent, once, through lib/vouchryx-mint.sh. Both are kept on every later run.
Trusting an upstream identity provider is a separate, opt-in step, and it names its inputs in advance:
./delegation/up.sh --issuer https://idp.example.com \
--audience http://vouchryx:4310 \
--jwks-file /path/to/idp-jwks.jsonAll three flags are required and are checked before anything is applied. The script writes the trusted
issuer into the ConfigMap vouchryx-trusted-issuers and rolls vouchryx to read it. It also patches the
console's revoke command. ./delegation/down.sh withdraws the trusted issuer and the console's wiring. It
keeps vouchryx, and the agents keep their tokens.
The revocation store lives on its own volume (vouchryx-state), so a revocation survives a pod restart.
A revocation is one call to vouchryx's /v1/revoke, with the bearer in the revoke_key of the
vouchryx-keys Secret. The Secret is read there, and never printed by these scripts.
Reachable from the gateway, the MCP broker, wardryx, the console and the agent pods only. The
NetworkPolicies in manifests/54-delegation.yaml and manifests/58-agent-tokens-network.yaml admit port
4310 from those and nothing else.
When a call reaches the model provider and the answer never comes back, the gateway cannot know whether the provider billed it. It keeps that money reserved, on purpose, until a person closes it with evidence: the usage the provider reported, or its confirmation that nothing was billed. The console asks for a passkey, then mints a short-lived token the gateway checks. Both sides use one secret, and it is off unless you turn it on:
./closure/up.sh # mints closure-keys once, patches the gateway and the console
./closure/down.sh # reverses both patches, keeps the Secret
./closure/down.sh --delete-secrets # also removes the SecretA re-run of up.sh reuses the secret. It needs tokenfuse v1.9.0 or later and
console v1.1.34 or later. The images pinned here are tokenfuse v1.25.0 and console v1.8.8,
both later than those minimums; an older image
ignores the setting.
The gateway holds your model provider's key, and nothing else in the cluster does. Give it once, on the deploy:
./deploy.sh ... --anthropic-key-file /path/to/the/keydeploy-gcp.sh and deploy-aws.sh take the same flag (--copilot-key-file, its
older name, still works). The file is read on your machine, sent to the cluster on
stdin, and made into the Secret gateway-upstream-key, which only the gateway's pod
mounts, as a file it reads when it starts. The key is never printed and never a
value in a manifest. The console and the agents hold only their client keys, so a
caller that sends its own provider key is refused 401 provider_credential_refused
once the gateway holds one. Your agents then send their gateway key, not the
provider's: see "Client keys and the identity map" below.
On a cluster you applied by hand, with kubectl apply -k and no deploy script, make
the Secret yourself, from the file, so no value reaches a command line:
kubectl -n agent-stack create secret generic gateway-upstream-key --from-file=anthropic_key=/path/to/the/key
kubectl -n agent-stack rollout restart deploy/tokenfuse-gatewayA re-run keeps the Secret it finds and says so; the file you pass again is not
read. To replace the key: delete gateway-upstream-key, deploy with the new file,
and restart the gateway (kubectl -n agent-stack rollout restart deploy/tokenfuse-gateway),
because it reads the file once. A deploy with no file and no Secret stops before
the rollouts, so a gateway that cannot start is not left to time out.
No named exception remains. The scheduled CostCrew run (the CronJob costcrew-crew in
49-costcrew.yaml, which is opt-in) presents its own client key, costcrew-client-key, and holds no
provider key. CLAUDE.md invariant 53 holds the rule and the gate that checks it.
An agent holds its own short-lived token, bound to a proof key, and the doors check it. The gateway and
the MCP broker require it in the default install (TOKENFUSE_AGENT_TOKENS=require), and a static client
key is admitted only from a named list. wardryx checks the token and its proof itself and answers 403
when the agent it is asked about is not the token's subject (CLAUDE.md invariants 54, 62 and 63).
Enrol more agents, or add an agent pod, with the registry tool. It writes the registry and rolls vouchryx, and it switches nothing:
./agent-tokens/up.sh --registry agents.txt --check-only # what it would check
./agent-tokens/up.sh --registry agents.txt # write the registryThe file replaces the whole registry, so it must hold every agent, the operator's own included
(agent://<td>/agents/operator|agents|stack|sha256:<digest>, the digest of the key in agent-enrol-key,
which the deploy wrote to this machine with mode 0600).
An agent pod gets its token the way agent-tokens/example-agent.yaml shows: a projected service-account
token for http://vouchryx:4310, no Kubernetes API token, and a label, taipanbox.dev/agent-token=true,
which opens the two egress rules it needs (vouchryx and the gateway). It asks vouchryx for
resource=https://vouchryx.agent-stack.invalid (RFC 8707). A request that names no resource, or another
one, is refused, and vouchryx does not fall back to its own issuer.
A stop is one call: POST /v1/revoke on vouchryx with ban:true. The gateway and the broker poll the
revocation list every 12 s and refuse a list older than 60 s, so a stopped agent is refused at every door
within one poll while vouchryx answers.
Static keys still admitted, by name. The gateway's list is felyx,agents,drills,costcrew,broker,drills-broker,broker-caller, each with
its reason in manifests/10-planes.yaml; the broker's is broker-caller,drills-broker, each a gateway key of the same id. agents is the operator's own key as it stood before this release, so
an upgrade keeps it working; move each client to an agent token and take it off the list. The operator's
additions go in the ConfigMap gateway-static-keys (key operator_key_ids, a comma list that begins with a
comma), and the gateway reads them at start:
kubectl -n agent-stack patch configmap gateway-static-keys --type merge -p '{"data":{"operator_key_ids":",claude-code"}}'
kubectl -n agent-stack rollout restart deployment/tokenfuse-gatewayThe gateway answers no caller without a client key, and a key may speak only as
the agent ids the identity map binds it to. Without them it admitted anything
the network let in and took the agent id a caller wrote, so one agent could
speak as another and take its policy and its budget. Its reference to the keys'
Secret is not optional, so a gateway with no keys waits rather than starting
open, and the map runs strict (TOKENFUSE_IDENTITY_STRICT: enforce).
Given no files, every deploy mints seven keys after it applies the manifests
(lib/identity-mint.sh), and binds each in a map:
| Key id | Unit | May speak as | Its secret |
|---|---|---|---|
felyx |
console |
agent://<trust domain>/genaryx/felyx, exactly |
the Secret felyx-client-key, which the console sends for Felyx |
agents |
agents |
agent://<trust domain>/agents/* |
agent-key beside the deploy script, 0600, on the machine you deployed from |
costcrew |
costcrew |
agent://<trust domain>/costcrew/*, the crew's analysts (CostCrew v0.8.0) |
the Secret costcrew-client-key, which the scheduled crew reads as its client key |
drills |
drills |
agent://mockryx.local/*, the drill's own namespace |
the Secret drills-client-key, mounted into the suspended drill job, which sends it to the gateway |
broker |
broker |
agent://<trust domain>/* |
the Secret broker-taint-key, which the MCP broker presents to the gateway's tool-call check when it relays an agent token |
drills-broker |
drills |
agent://mockryx.local/* |
the Secret drills-broker-key, mounted into the suspended drills-broker job; the MCP broker admits the same secret under the same id |
broker-caller |
broker |
agent://<trust domain>/typed-broker, exactly |
the typed door's caller key: the broker's tokenfuse-mcp-broker-keys holds the same secret under the same id |
The last two are the MCP broker's two static callers. The broker asks the gateway's tool-call check about every tool call with the caller's own key, so a key the broker admits has to be a gateway key of the same id, or every call with it is refused there (CLAUDE.md invariant 85).
The trust domain is the one --trust-domain sets. The deploy prints the key
file's path and the ids, never the key. Your agents then send, on every call,
x-fuse-key: <the secret in agent-key>, an x-fuse-agent-id under
agent://<trust domain>/agents/, and x-fuse-run-id. No key, or one the gateway
does not hold, is refused 401; the key speaking as an id outside agents/,
Felyx's included, is refused 403 identity_mismatch. The units carry no budget:
a monthly cap is yours to set in a map of your own. A re-run keeps every minted
key and the file; a moved trust domain rebinds the map alone. On another machine,
read the key back from the cluster:
kubectl -n agent-stack get secret gateway-client-keys -o jsonpath='{.data.client_keys}' | base64 --decode # the entry ending :agentsA cluster applied by hand (install.sh, then kubectl apply -k manifests/) gets
the same keys from KUBECONFIG=./kubeconfig.yaml ./identity/mint.sh; until then
its gateway waits for them. A cluster deployed before this release gets them on
its next deploy, and its agents are refused 401 until they send one.
One key for all your agents is the floor. To give each agent its own key and unit, bring two files, which you, or an onboarding agent, prepare outside the cluster. On a cluster whose keys a deploy minted, give both together: the minted map binds the minted keys only, and once you have, the deploy leaves your keys alone:
- a keys file, one
secret:key_idper line, the line the console's Onboard tab prints. The key id is a bare name such astreasury-bots; the secret is 24 to 256 characters ofA-Z a-z 0-9 . _ ~ + / = @ : -. Blank lines and#comments are ignored. - an identity map, TokenFuse's JSON (
units[],keys[],prefixes[], TokenFuse docs/20): which agent ids each key may speak as, and which unit pays.
./identity/up.sh --client-keys-file keys.txt --identity-map-file identity.json
./identity/up.sh --identity-map-file identity.json # a new map, the keys kept
./identity/up.sh # check what the cluster holds again
./identity/up.sh --check-only --client-keys-file keys.txt --identity-map-file identity.jsonNothing in the cluster changes until the files pass two checks. First their
grammar. Then the gateway image the cluster runs reads them in a throwaway
container with no network, on the machine you run this from, so Docker is needed
there. Anything the gateway would refuse to start on is refused, and so are three
things it only warns about: a map that configures nothing, a map that binds a key
id no secret carries, and a key the map does not bind (under the gateway's default
strict mode every call with it is refused 403). A refusal never prints a secret.
--check-only runs both checks and touches no cluster.
Then the keys go into the Secret gateway-client-keys and the map into the
ConfigMap gateway-identity-map, mounted read only into the gateway at
/etc/tokenfuse/identity. The gateway reads both only at start, and a change to a
Secret or a ConfigMap restarts nothing, so up.sh rolls the gateway when what it
reads has changed, and only then. verify.sh reports a gateway running on
anything other than what the two objects hold. Neither object is in the
manifests, so a later deploy keeps both.
Every agent sends x-fuse-key: <its secret>, and an x-fuse-agent-id its key
may speak as, on every call. Felyx sends the key in felyx-client-key; with your
own files, give it a line in the keys file, a binding to its id, and the same
secret in that Secret. The drills send the key in drills-client-key, and the broker
drills the key in drills-broker-key: give each a line and a binding in the same way.
Your keys file also needs <secret>:drills-broker and <secret>:broker-caller, the
broker's two static callers, because the gateway's list names both and a gateway whose
list names a key it does not hold refuses to start; a deploy on your keys without them
stops before it applies anything and says so. broker-caller's secret is the one your
typed door already holds, when it has one. docs/releases/v1.9.0.md, Upgrade item 1,
has the commands.
The map can be turned off: delete its ConfigMap and run up.sh with no file,
which rolls the gateway without it. The keys cannot: the gateway requires them,
and up.sh refuses a run that would leave none.
kubectl -n agent-stack delete configmap gateway-identity-map
./identity/up.shKeyryx (ghcr.io/taipanbox/keyryx:v0.1.5) is the key custody service and the
independent witness of the record. Off by default: kubectl apply -k manifests/
never applies it. keyryx/up.sh turns it on, keyryx/down.sh turns it off and
keeps every key and claim. v0.1.4 changes only delegated keys (at the bound of four
live keys a new key retires its owner's oldest, keyryx#27). The policy here holds
no delegated key, so custody on a cluster behaves as it did on v0.1.3.
KUBECONFIG=./kubeconfig.yaml ./keyryx/up.shWhat it runs, in the agent-stack namespace: keyryx-custody (port 4340, uid
20101, the signing keys) and keyryx-witness (port 4341, uid 20100, reads the
event streams read only and keeps its own log). Each role has its own service
account, state claim and root key Secret (keyryx-root, keyryx-witness-root),
and the root key reaches the process only through a memory volume copied by an
init container. wardryx is moved to v2.2.0 and signs its approval tokens through
custody; its bearer key is keyryx-wardryx-client. Only pods labelled
keyryx-consumer: "true" may reach custody.
The witness's findings reach the console and the notifier. The witness writes
alerts/keyryx.ndjson on its own state claim, keyryx-witness-state, and mounts the
event streams read only, so it never writes the bus it witnesses. No new volume is
added. The console (GENARYX_EVENTS_EXTRA) and heraldyx (HERALDYX_EVENTS) mount only
alerts/ of that claim (subPath), read only on the mount and on the claim, so they
never see the witness key beside it, and each runs on the witness's node, because the
claim is ReadWriteOnce, as the record seal does. The wiring is two patches under
keyryx/ that the Keyryx install applies and --without-keyryx reverses; the default
manifests do not change. Each reader reads the file only as a regular file, never
through a link (heraldyx 0.9.0, pinned here, and the console from genaryx#134).
heraldyx renders the seven witness_* types and mails the high ones. The console is pinned at
genaryx-console:v1.14.0, and from v1.7.0 the image reads GENARYX_EVENTS_EXTRA and turns a
high finding into an incident (TAIPANBOX/genaryx#134).
Not wired yet: vouchryx and tokenfuse (their Keyryx releases are not published yet, so their pins stay where they are) and trailryx (its next release is later).
NOT PROVEN here: that the launchers' own CNI enforces the policies (kind's
kindnet did, in evidence/keyryx-kind/run.out, step 6); wardryx was not run
against Keyryx on a cluster; the witness answered 404 on its head route in the
kind run (no signed head yet after about three minutes, not investigated); the projected
service-account token path is not used, because wardryx v2.2.0 reads its
credential once at start and a projected token expires within an hour.
Proven on a live five-node cluster, 2026-07-25. Five Hetzner CPX42 in
fsn1, k3s v1.36.2 with embedded etcd on three of them, Calico v3.29.1,
Longhorn v1.7.2. Every plane answered, the RWX event log bound and was shared
across nodes, the money plane survived a pod restart, the cloud controller
provisioned a real load balancer that served the console, and an agent frozen
from the browser was denied by the policy plane's PDP and stayed denied after
that plane's pod was restarted. verify.sh --freeze: 10 passed, 0 failed.
Then attacked, the same night: a pod that labelled itself plane: console
deleted a freeze with the literal bearer devkey and the agent resumed, while
the console still displayed FROZEN. Secrets were readable in plaintext straight
out of etcd. The kubelet API was open to the whole internet on every node. The
gateway never asked the policy plane anything, and with no upstream configured
it answered calls itself from a stub and metered the invented tokens as spend.
All of that is closed in these files now, and security-tests.sh re-runs each
attack as a standing check: 23 passed, 0 failed, 1 noted (the note is the
neighbouring namespace, which no manifest here can harden - see GOTCHAS 23).
Six clusters across three clouds, 25 to 27 July 2026. The same manifests,
the same k3s, the same Calico and Longhorn, the same verify.sh and
security-tests.sh, so the three runs are compared on identical proofs rather
than on impressions. All of it destroyed afterwards and both cloud accounts
verified empty by direct API query. Written up in PORTABILITY.md, priced in
cloud/COSTS.md, command output in cloud/{aws,gcp}/evidence/.
| Hetzner | AWS | GCP | |
|---|---|---|---|
verify.sh --freeze |
10 passed, 0 failed | 10 passed, 0 failed | 10 passed, 0 failed |
security-tests.sh |
23 passed, 1 noted | 22 passed, 0 failed, 2 noted | 24 passed, 0 failed, 2 noted |
Four things the runs settled, each of which changed something we had written down:
- Exactly one line of Kubernetes configuration differs between the three
clouds. Calico runs
VXLANCrossSubneton Hetzner and AWS; a GCE VPC has no layer 2 at all, every packet is routed by destination, a pod address matches no route, and no instance flag changes that, so on GCP the encapsulation becomes unconditional. On AWS the equivalent fix was one Terraform line (source_dest_check = false) and the Kubernetes side stayed byte for byte identical to Hetzner. - The throughput collapse past 64 concurrent callers, recorded here on 25
July as a design limit, was wrong. On both dedicated-core clouds there is
no cliff out to 256 concurrent, on two chip generations: only latency rises.
It was a property of a shared-vCPU instance.
PORTABILITY.mdcarries the retraction next to the claim it replaces. - On identical silicon the two hyperscalers are the same machine. 2,449
decisions/s on AWS
c6aagainst 2,479 on GCPc2d, a difference of 1.2%, with p50 apart by a hundredth of a millisecond. The first comparison put AWS 62% ahead, and that was a chip generation wearing a cloud costume. - Secrets encryption at rest is now verified rather than asserted. Four
clusters went past this check because it wanted
etcdctland no cloud image has it. Checked properly on one small node per cloud: a Secret with a unique marker, absent from 130 MB of raw datastore on disk, with a control step confirming the search reaches the datastore at all (the secret's NAME is found 22 times, because names are not encrypted, only values). AWS and GCP returned identical results. That is a property of k3s installed with the right flag, not of either cloud.
The command output behind every sentence above is in evidence/ and
cloud/*/evidence/. Every trap the runs cost us is written up in
GOTCHAS.md, now 132 items (48 platform, 61 ours, 16 the stack's own
contract, 7 upstream; scripts/gotchas-classified.sh prints the current split). Almost all are already fixed here, which is the whole
point: the next person to run this should not meet any of them. A small
number (69, 81) are recorded rather than solved, and say so plainly rather
than letting the ledger look cleaner than the deployment is. The split matters
more than the total: a ledger where everything is somebody else's fault is
marketing, so the count of our own mistakes is what makes the other three
columns worth believing.
Both rows of numbers above are what those runs reported on those days, and
verify.sh has grown since. A live run on 2026-08-02 found a whole section of
it printing a heading with nothing under it while the summary still said
everything passed: two of its five governance calls had been answering 401 for
as long as the section existed, because it asked the policy plane with the
money plane's admin key. That is GOTCHAS 73, and it is fixed, along with the
shape that hid it: a check now produces a verdict or fails the run. So read
"10 passed" as the suite of 25 to 27 July, not as today's.
Apache License 2.0. See LICENSE.
The node addresses in HANDOFF.md and evidence/ are placeholders: those
documents are a field report from the cluster this was proven on, and that
cluster is ephemeral. Substitute your own.