kiro 0.1.29 is on registry.npmjs.org (npm view --prefer-online with a
fresh cache, checked again just before this commit: 0.1.29, the latest,
shasum 4fbdc3fd2195ffa6bb6adcb6b409f02955cd9fbb). It is 4200fed09 in
magpie-community/plugins (plugins#823, caozhenyuan): Kiro gives no token
counts, only a meteringEvent ({"unit": "credit", "usage": 0.091}) near
the end of its reply. The plugin now sums a request's meteringEvents (a
hosted web search's turns are one request) and says them as usage.credit
in the last message_delta, or the message's usage. keepMovedCurrent
brings every moved Kiro user to 0.1.29.
What users see: nothing yet on the Usage page. The gateway reads
usage.credit on /v1/messages only once the host half of #4328 (ggbdpq's
patch on that issue) lands; until then the field is passed over, as the
plugin's body says. The rest of the reply is unchanged.
Run on mote at c39d36644 + this change (the pushed head's tree):
gofmt -l internal/provider empty; go vet ./..., GOOS=linux go vet -tags
nogui ./... and GOOS=windows go vet ./... ok; go test -count=1
./internal/provider/... ok (211s), which holds the mover guard tests
(TestMovedBuiltinsSayTheirPlugin, TestKiroMoverHasTheTooLongFix and the
migrate_* tests). No other package reads movers. The plugin's own run
(bun test packages/kiro 144 pass, the whole repo 6679 pass) and what was
broken by hand are in 4200fed09's body.
Not tried: a real Kiro account through magpie on 0.1.29; the ledger with
#4328's host half. The full suite runs after the push (agent rules'
release flow).