A status bar (SketchyBar) polling /v1/magpie/concurrency got
{"data":{},"object":"concurrency"} with no limit set: the lanes hold only
keys and accounts with a limit, so an idle gateway and a busy one with no
limits read the same. The answer now carries, beside data:
- requests: Busy().Requests, every agent request in flight, those waiting
for a slot among them; a GET (this poll included) is never counted;
- waiting: how many of those wait for a slot, summed over the lanes;
- tools: Claude subscription turns waiting on their caller's tool results.
Each is 0 when idle. Access is unchanged: this machine, another only with a
gateway key, a held key refused (refuseHeld). docs/reference.md says so
beside the usage API.
Run: TestConcurrencyTellsTheWholeGateway (new) fails without the change
("idle: tools = <nil>, want 0 (map[data:map[] object:concurrency])") and
passes with it, -count=5; it covers no limit anywhere (the reporter's
case), and three in flight on a one-slot provider with one waiting.
gofmt -l (nothing); go vet, GOOS=linux go vet -tags nogui, GOOS=windows go
vet on internal/gateway (ok). go test -tags nogui -count=1 ./internal/gateway
in a sandbox HOME: ok in 835s with -timeout 40m (on 0ad9661b6; the default
10m ran out while three other gateway suites ran on this machine), then
the concurrency, busy, held-key and LAN tests -count=3 after rebasing on
63ad2b7c7 (ok).
Not tried: SketchyBar itself.