You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
workspace: name listing and spend in the broker protocol's declaration report #3508
The broker protocol (ws-097) defines the declaration report a box's steward posts to POST /api/box/declaration as { capabilities } and nothing else. Studio's steward has been sending two more fields since arugula-salad/studio#369 and #384, and studio's lobby reads, checks and keeps them: listing, the box block's listing as chant workspace status --json prints it less the cover ({ published, title, line }), which the lobby lists the box under; and spend, what the box's run records say it spent in the current month ({ month, usd, runs, unpriced, byPrincipal: [{ principal, usd, runs, unpriced }] }), which the lobby reports as the account's spend. Today they ride as unknown fields, so another broker has no contract for them and the conformance suite never sends them.
lex00 decided (2026-10-04, as part of studio#394's follow-up) to name both in chant's report schema. Both are optional within version 1. listing is the box block's listing (ws-077), with the bounds box listing set already enforces: a title of at most 60 characters and a line of at most 140, no control characters, published defaulting to true. spend is the month's spend from the run records (ws-076): USD per principal plus the count of runs with no USD cost, which are unpriced and never counted as zero, with the month's totals beside it. A broker that does not use them ignores them; one that keeps them may echo them on its 200 answer and refuses a malformed one with a 400, as the lobby does.
The change: the declarationReport and declarationKept bodies in broker-protocol.schema.json gain the two fields; parseDeclarationReport checks and returns them the way the lobby does; a helper computes spend from chant workspace runs --json; the broker protocol reference documents them; and the conformance suite gains a case that a report carrying both is still answered 200. The signed spend statements studio#394 also asks for are a separate change.
Activity