Skip to content

TokenFuse v0.2.0 — HA cluster, hosted Cloud, MCP credential-broker

Choose a tag to compare

@TAIPANBOX TAIPANBOX released this 02 Jul 21:24
· 469 commits to main since this release
e35d693

TokenFuse — runtime control for AI agents. Since v0.1.0 this release adds high-availability, a hosted Cloud with a real dashboard, and an MCP credential-broker — all shipped as container images that run anywhere.

Run it

# gateway (drop-in proxy)
docker run -p 4100:4100 -e TOKENFUSE_MODE=enforce ghcr.io/taipanbox/tokenfuse

# the whole Cloud stack (dashboard :3000 + control plane :8080 + gateway :4100)
cd cloud && docker compose up

New since v0.1.0

🧬 High-availability raft cluster (crates/cluster, feature cluster / tokenfuse:cluster)

  • Budget ledger replicated via openraft — Reserve/Settle are log entries, so the affordability check is linearized across gateways (no cross-node double-spend) and budgets survive a node crash.
  • Hierarchical sub-agent budgets + per-run steps in the replicated state machine.
  • Durable redb storage — budgets survive a process restart (verified live: destroy + recreate a container on the same volume, state intact).
  • Membership changes — add/remove nodes on a running cluster (init-single / add-learner / change-membership).
  • Security — shared-token auth (TOKENFUSE_CLUSTER_TOKEN) on every endpoint except /healthz, and native TLS/HTTPS (rustls; TOKENFUSE_CLUSTER_TLS_CERT/_KEY, optional self-signed CA).
  • In-process + HTTP transports; gateway integration via an async LedgerBackend behind the cluster feature.

☁️ Hosted Cloud (cloud/)

  • Control plane (Go, single static binary): ingests gateway telemetry, per-org aggregates, embedded dashboard. Image tokenfuse-control-plane.
  • Next.js dashboard (cloud/dashboard): cards, spend-by-run chart, runs table, auto-refresh. Image tokenfuse-dashboard.
  • Fleet-wide kill-switch — kill a run from the dashboard, every gateway of the org hard-stops it (402 killed).
  • Central budgets — set/tighten a run's cap centrally; gateways enforce it, overriding the client header.
  • Gateway CloudSink ships telemetry; kill + budget pollers pull control back down.

🔑 MCP credential-broker (tokenfuse mcp-broker)

  • Agents hold only handles ({{secret:NAME}}); the broker injects the real secret at the boundary before the MCP server — secrets never touch the prompt, trace, or agent memory. Live tool-poisoning scan (off|warn|block).

🚀 Portability & ops

  • TOKENFUSE_MODE = shadow|warn|enforce — the shipped image can actually enforce (402), not just observe.
  • Four public GHCR images: tokenfuse, tokenfuse:cluster, tokenfuse-control-plane, tokenfuse-dashboard.
  • Portable benchmark harness (bench/) + a GitHub Actions bench workflow. Networked overhead: ~1 ms p50 / ~2 ms p99.

Verified

CI green across fmt/clippy/test (Rust), Go, Next.js build, eBPF radar, and the raft-HA suite. Multiple features validated live on a Linux VPS via the published images (enforce → 402, durable HA across restart, the full Cloud stack with the dashboard).

🤖 Generated with Claude Code