Docs: token AI status is shown from Cross Events 2.2.0 (was planned for 2.3.0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 11:38:33 +02:00
co-authored by Claude Opus 5.5
parent 44e65bb563
commit 9aa06ae894
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ versions follow [Semantic Versioning](https://semver.org/).
the `status` in every AI reply) also carries `usedInputTokens` / `usedOutputTokens` (this month, the `status` in every AI reply) also carries `usedInputTokens` / `usedOutputTokens` (this month,
all the church's installs) and `capInputTokens` / `capOutputTokens`, an estimate of the allowance all the church's installs) and `capInputTokens` / `capOutputTokens`, an estimate of the allowance
(half the cap priced as input and half as output, at the current model price, exchange rate and (half the cap priced as input and half as output, at the current model price, exchange rate and
markup). Cross Events 2.3.0 shows only these and the percentage; rand stays on the Hub. The cents markup). Cross Events 2.2.0 shows only these and the percentage; rand stays on the Hub. The cents
fields are unchanged, so older installs keep working (protocol §3b). fields are unchanged, so older installs keep working (protocol §3b).
### Changed ### Changed
+1 -1
View File
@@ -117,7 +117,7 @@ function allowanceTokens(capCents, price) {
* - enabled false → hidden (cap R0, licence not active, or the Hub's AI not set up); * - enabled false → hidden (cap R0, licence not active, or the Hub's AI not set up);
* - capReached → shown but disabled until `renewsOn` or until the cap is raised. * - capReached → shown but disabled until `renewsOn` or until the cap is raised.
* `used` is this month's use from usedThisMonth. The cents stay for installs older than Events * `used` is this month's use from usedThisMonth. The cents stay for installs older than Events
* 2.3.0; newer ones show only tokens and the percentage. * 2.2.0; newer ones show only tokens and the percentage.
*/ */
function statusOf({ licence, price, used, now = new Date() }) { function statusOf({ licence, price, used, now = new Date() }) {
const chargedMillicents = used?.chargedMillicents || 0; const chargedMillicents = used?.chargedMillicents || 0;
+2 -2
View File
@@ -214,14 +214,14 @@ X-Hub-Install / X-Hub-Timestamp / X-Hub-Signature (as in §3)
active (suspended, revoked, or past its grace days), or the Hub's AI isn't set up. active (suspended, revoked, or past its grace days), or the Hub's AI isn't set up.
- **`capReached: true`** — show the buttons **disabled** ("This month's AI allowance is used up — it - **`capReached: true`** — show the buttons **disabled** ("This month's AI allowance is used up — it
renews on 1 December"). Reached means there isn't room left for even a small call. renews on 1 December"). Reached means there isn't room left for even a small call.
- **Churches see tokens, never rand** (Hub 2.0.1, Cross Events 2.3.0). `usedInputTokens` / - **Churches see tokens, never rand** (Hub 2.0.1, Cross Events 2.2.0). `usedInputTokens` /
`usedOutputTokens` are this month's tokens over all the church's installs (input counts cached `usedOutputTokens` are this month's tokens over all the church's installs (input counts cached
prompt tokens). `capInputTokens` / `capOutputTokens` are an **estimate** of the allowance: what half prompt tokens). `capInputTokens` / `capOutputTokens` are an **estimate** of the allowance: what half
the cap buys as input and half as output, at the current model price, exchange rate and markup, the cap buys as input and half as output, at the current model price, exchange rate and markup,
rounded down to a thousand. `usedPercent` is exact (it's worked out in rand). Installs show the rounded down to a thousand. `usedPercent` is exact (it's worked out in rand). Installs show the
tokens and the percentage, and don't pass the cents on. tokens and the percentage, and don't pass the cents on.
- `capCents` / `usedCents` are cents (rand) as **charged** to the church, with fractions (a call costs - `capCents` / `usedCents` are cents (rand) as **charged** to the church, with fractions (a call costs
a fraction of a cent), for the Hub and for installs before Cross Events 2.3.0. The month is South a fraction of a cent), for the Hub and for installs before Cross Events 2.2.0. The month is South
African time; `renewsOn` is the 1st of the next month. African time; `renewsOn` is the 1st of the next month.
### A helper call ### A helper call