Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/tokenfuse/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tokenfuse"
version = "1.1.1"
version = "1.2.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
Expand Down
51 changes: 51 additions & 0 deletions docs/releases/v1.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# TokenFuse 1.2.0

This release lets one Cloud serve gateways at several sites and tell them
apart. Until now a record pushed to `/v1/ingest` carried no gateway identity,
so two sites' spend mixed into one pile and a site that stopped pushing was
invisible (#296). The Cloud now names the site from the key the gateway
pushed with, never from anything in the request, and a site's key no longer
has to be an org admin key. The gateway binary does not change. The frozen
names in `compat/1.0.json` do not change; this release adds names, which is
why it is a minor. The umbrella crate and both client SDKs move to 1.2.0 with
no client behavior change.

## Added

- **A key can be bound to a site (#333, invariant 65).** The Cloud key spec
grows an optional fourth segment: `key:org[:role[:site]]`. Every record a
bound key pushes is attributed to that site by the Cloud itself; an unbound
key's records land under `unnamed`. A site name is lowercase letters,
digits, `.`, `_` and `-`, starting with a letter or digit, at most 63
characters; an entry with an invalid site authenticates nobody.
- **A narrower role for a site: `ingest`.** An `ingest` key may push
telemetry and read (including the four polls a gateway makes: units,
budgets, unit budgets, kills), and is refused with 403 on every other
mutation (kill, budgets, unit budgets, incident ack, findings, pairing).
The recommended form for a site's key is `secret:org:ingest:site-name`.
Until now pushing telemetry needed an `admin` key, which can also kill
runs and set budgets for the whole organization.
- **`GET /v1/gateways`**: per site, spend, calls, tool calls, number of
pushes, first push and last push. `last_push_millis` is the Cloud's own
clock, so a gateway's clock cannot make a quiet site look alive; an empty
push counts as a heartbeat. Runs carry the site they were pushed from
(`RunAgg.site`).
- **Dashboard**: a Gateways card (site, spend, last push, a "silent" label
after five minutes without a push) and a Site column on Runs.

## Upgrade

Nothing to change for a single-site deployment: an existing key keeps
working exactly as before and its gateway appears as `unnamed`. To name a
site, give its gateway a key of the form `secret:org:ingest:site-name` in
`TOKENFUSE_CLOUD_KEYS` and set that secret as the gateway's
`TOKENFUSE_CLOUD_KEY`. The Cloud's snapshot gains a `gateways` field; an older
snapshot loads with no sites and fills from the next push.

## Not in this release, said plainly

- A site that goes silent is visible on `/v1/gateways` and on the dashboard,
and raises no incident or agent-event yet.
- A stolen site key can still push as that site: the key names the site, the
gateway process is not authenticated cryptographically.
- Many sites pushing concurrently under load was not measured.
2 changes: 1 addition & 1 deletion sdk/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tokenfuse",
"version": "1.1.1",
"version": "1.2.0",
"description": "JavaScript/TypeScript client helpers for TokenFuse — runtime cost control for AI agents.",
"keywords": ["llm", "agents", "finops", "budget", "tokenfuse"],
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "tokenfuse-sdk"
version = "1.1.1"
version = "1.2.0"
description = "Python SDK for TokenFuse — runtime cost control for AI agents (import as `tokenfuse`)."
readme = "README.md"
requires-python = ">=3.9"
Expand Down