Commit Graph
37 Commits
Author SHA1 Message Date
yetone 4da0aa0272 provider: Kiro's mover min is 0.1.35, its sign-in words in magpie's languages
Kiro plugin 0.1.35 (plugins 588b3611) gives each sign-in way, its first
question, the question's choices and their hints in zh, zh-TW, ja and de,
which magpie shows since the commit before last, and the API key field a
ksk_… placeholder (mahiro233 on Discord). keepMovedCurrent brings every
moved Kiro user to it.

npm view @magpie-community/opencode-kiro-auth version --prefer-online
--registry https://registry.npmjs.org: 0.1.35 (shasum 98618eda), at
landing. The publish run 42600418987 is red for the known
middleware-system-prompt and middleware-think-tags trust errors only; kiro
itself published. A one-line min change; the Go checks of the two commits
before ran at that tree on mote (internal/provider ok).
2026-11-09 18:36:07 +08:00
yetone 40cfae5d3b provider: Kiro's mover needs opencode-kiro-auth 0.1.34, which gives each model Kiro's credit multiplier as its rate
01huadalang on Discord asked for Kiro's credit multiplier. 0.1.34
(plugins 1aab125b) reads each model's rateMultiplier (rateUnit
"Credit") from ListAvailableModels and carries it as the model's rate,
which magpie's plugin host reads as Model.Rate. Usage is not multiplied
again: a meteringEvent's credits already include the rate. Raising min
makes keepMovedCurrent update every moved user's plugin.

Run: npm view --prefer-online --registry https://registry.npmjs.org
@magpie-community/opencode-kiro-auth version = 0.1.34, checked again at
landing. At base c7ebb6f8d on mote (lockf ~/suite.lock mote-run):
gofmt -l on migrate_kiro.go printed nothing; go vet ./...,
GOOS=linux go vet -tags nogui ./... and GOOS=windows go vet ./... ok;
go test ./internal/provider/ -timeout 45m ok (138.7s); go test ./...
-timeout 45m: 88 packages ok, one red, internal/gui
TestGatewayModeStatsNameTheGatewaySessions (keys [] leave out the
gateway's session). That is #5690, which is red in the first hour of a
local day, and mote's clock was 00:57. It has a patch from skygunner and
this change doesn't touch it. A rerun of internal/gui after 01:00 was
still going when this was pushed.

The pushed head is rebased onto origin/main 4314f4b77, whose seven new
commits don't touch migrate_kiro.go. They were not run with this change
before the push; CI runs them. The plugin's own record is in its commit
(packages/kiro 170 pass). Not tried: a moved account's plugin update on
a real install.
2026-11-09 17:22:08 +08:00
yetone 2c31815c59 provider: Kiro's mover needs opencode-kiro-auth 0.1.33, which asks an account in the IDE's CreateResponse experiment at /v1/responses
ThirdTimes (plugins#842, plugins#848): on one Builder ID account the
plugin's generateAssistantResponse got 429 USER_REQUEST_RATE_EXCEEDED,
and Kiro IDE 1.4.121 was answered 11s later on CreateResponse ("api=
CreateResponse armSource=experiment"). 0.1.33 (plugins 9b41df15) reads
Kiro's feature configuration as the IDE does. An account in the
create_response_api arm is asked at /v1/responses with the IDE's body and
headers, and any other account is unchanged. Raising min makes
keepMovedCurrent update every moved user's plugin.

Run: npm view --prefer-online --registry https://registry.npmjs.org
@magpie-community/opencode-kiro-auth version = 0.1.33 at landing.
mote-run go test -run 'Kiro|Mover|Moved' ./internal/provider/ ok. gofmt -l
clean. The plugin's own record is in its commit (package 168 pass, plugins
root 6892 pass 0 fail). Not tried: a real Kiro account in the arm.
2026-11-08 20:38:55 +08:00
yetone 778b8e0753 provider: Kiro's mover needs opencode-kiro-auth 0.1.32, which waits out a 429 throttle as the Kiro IDE does
onemezao on Discord: a "hi" answered, and the next message straight
after was Kiro's 429 USER_REQUEST_RATE_EXCEEDED, while the Kiro IDE on
the same account took two in a row (plugins#842, plugins#848). The IDE
gets the same throttles but tries again, 3 tries after 1s and 2s or
Kiro's retryAfterMilliseconds; the plugin sent the first 429 straight
back with Retry-After 30s. 0.1.32 (plugins 966cf717) retries the way
the IDE does. Raising min makes keepMovedCurrent update every moved
user's plugin.

Run: npm view --prefer-online --registry https://registry.npmjs.org
@magpie-community/opencode-kiro-auth version = 0.1.32 at landing;
mote-run go test -run 'Kiro|Mover|Moved' ./internal/provider/ ok;
gofmt -l clean. The plugin's own record is in its commit (package 157
pass, plugins root 6867 pass 0 fail).

Broken by hand: in the plugin (5 tests red with the retry off); nothing
here beyond the version string.

Not tried: a real throttled Kiro account; none was at hand.

Reported-by: onemezao (Discord)
2026-11-08 04:59:59 +08:00
yetone 6596e8a86d provider: Kiro's mover min is 0.1.31, whose chat calls go as the Kiro IDE sends them
onemezao (Discord): a Builder ID account on Kiro Pro for students got 429
USER_REQUEST_RATE_EXCEEDED through the plugin and from kiro-cli, while the
Kiro IDE kept working on the same account. Plugin 0.1.31 (plugins 1d3b537c,
b8100001) sends chat calls the way Kiro IDE 1.4.121 does, with the values
read from the IDE's own extension.js:
- the AWS SDK JS user agent, carrying one machine id per install
  (no random suffix);
- origin AI_EDITOR;
- x-amzn-kiro-client-attribution kiro-ide, and its attempt header;
- tokentype SSO_OIDC for Builder ID / Identity Center;
- one conversationId per magpie session.
It applies always, not only after a 429: that is the identity that works
where the CLI's is limited, and waiting for a 429 spends a refused request.
Control, usage and model-list calls are unchanged. Reasoning that Kiro
sends with its signature in one event now keeps the signature. This commit
raises keepMovedCurrent's min so every moved user gets 0.1.31.

npm view --prefer-online --registry https://registry.npmjs.org showed 0.1.31
before this change. The plugins publish run is red only for think-tags'
known E404 (plugins#180); its log shows kiro 0.1.31 published.

Run (mote): go test ./internal/provider/ ok; gofmt -l clean. Plugin side:
packages/kiro 152 pass, scripts/check.mjs kiro ok, repo bun test 6815 pass
0 fail.

Broken by hand (plugin side):
- the new identity tests on the old index.mjs: 4 of 4 red;
- a random UA suffix, or no Headers lookup of the session: 2 red;
- the signature tests on the old else-if: 2 of 2 red.

Real use: the owner's kiro-cli Google sign-in, copied into a sandbox HOME.
- auto and claude-sonnet-4.5 each answered 200 for two turns on one
  conversationId;
- auto's signature was kept, and the turn carrying it back answered 200.

Not tried:
- a Builder ID account, or the reporter's;
- claude-haiku-5.5 (INVALID_MODEL_ID on the owner's account);
- whether this ends the reporter's 429.

Reported-by: onemezao
2026-11-07 20:51:58 +08:00
yetone 4461957b9e provider: Kiro's mover min is 0.1.30, which says an account's request rate plainly and stops the 1/2/4s re-asks
onemezao on Discord (one Kiro account, pi, claude-haiku-5.5): every
request failed after 42s with "Kiro: Too many requests, please wait
before trying again. (USER_REQUEST_RATE_EXCEEDED)" while the Kiro IDE
answered on the same account. Kiro gave no wait, so the gateway asked
the one account again after 1, 2 and 4s with the whole 965KB request.

Kiro plugin 0.1.30 (plugins 44df5f05) says that 429 is Kiro limiting
this account's requests, to wait a minute, and that one persisting
while the Kiro app works is for Kiro support, with the request ID; with
no wait from Kiro it gives Retry-After 30s, past longestPause (8s), so
the same-account retries stop. keepMovedCurrent brings moved users up.

Run on mote: go test ./internal/provider/ (ok). npm view --prefer-online
shows 0.1.30. The plugin's own record is in its commit (package tests,
check.mjs, the repo's bun test, the new tests red on the old code).
Not tried: a real USER_REQUEST_RATE_EXCEEDED through magpie, which
can't be drawn without hammering an account.

Reported-by: onemezao
2026-11-07 17:09:09 +08:00
yetone e0930b1dee kiro: the mover installs 0.1.29, which says what Kiro's meteringEvents say a request cost as usage.credit
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).
2026-11-07 15:40:31 +08:00
yetone 05f6fd423b kiro: the mover installs 0.1.28, which uses both of an Identity Center account's credit regions
kiro 0.1.28 is on registry.npmjs.org (npm view --prefer-online with a
fresh cache: 0.1.28, shasum c643deaeb9366d5b43b841db0bdf89523479bba1;
publish.yml run 42346180094's npm step printed "+
@magpie-community/opencode-kiro-auth@0.1.28", the run red only for
think-tags, plugins#180). It is e7cb9dc5 in magpie-community/plugins
(plugins#820): an IAM Identity Center organization can enable Kiro in
us-east-1 and eu-central-1, each with its own profile, month of credits
and overage cap. The plugin used the first profile only, so the account
left rotation when that region ran out while the other still had
credits. Now a used-up region rests and the request goes once to the
other, overage counts against overageCap, and the Usage card shows each
region. keepMovedCurrent brings every moved Kiro user to 0.1.28.

Run on mote at d052fec0e + this change: gofmt -l internal/provider
empty; go vet ./internal/provider for darwin, linux and windows ok;
go test -count=1 ./internal/provider ok (127s).
The plugin's own run (bun test packages/kiro, 140 pass), what was broken
by hand and the reviewer's probes are in e7cb9dc5's body.

Not tried: a real Identity Center account running out in one region,
through magpie or otherwise; the author ran real accounts enabled in one
region each.
2026-11-07 14:22:16 +08:00
yetone 4163054514 kiro: the mover installs 0.1.27, which hands magpie Kiro's wait on a 429
kiro 0.1.27 is on registry.npmjs.org (npm view --prefer-online with a
fresh cache: 0.1.27, shasum a94ba139ceaa9032849e75ece80edb7ab01e064e).
It is ab0d3fe5 in magpie-community/plugins: a 429 such as
USER_REQUEST_RATE_EXCEEDED now carries the wait Kiro gave
(x-amzn-kiro-ratelimit-retry-after, x-amz-retry-after, the body's
retryAfterMilliseconds or Retry-After) as Retry-After. Without it the
gateway asked the one account again after 1, 2 and 4s and on through
its patience: onemezao's one small message took six asks, five of them
429. With a Retry-After the gateway waits that long, and past 8s it
skips the quick retries and rests the account. keepMovedCurrent brings
every moved Kiro user to 0.1.27.

Run on mote at d55881730 + this change: gofmt -l internal/provider
empty; go vet ./internal/provider for darwin, linux and windows ok;
go test -count=1 ./internal/provider ok (121s).
The plugin's own run (bun test packages/kiro, 127 pass) and its test
broken by hand are in ab0d3fe5's body.

Not tried: a real Kiro 429 through magpie. Which header Kiro sends on
generateAssistantResponse's 429 has not been seen; with none, nothing
changes from 0.1.26.

Reported-by: onemezao
2026-11-07 03:27:20 +08:00
yetone 79f83798fd kiro: the mover installs 0.1.25, which shows bonus credits on the Usage card (plugins#602)
kiro 0.1.25 is on registry.npmjs.org (npm view --registry
https://registry.npmjs.org: 0.1.25, shasum
00882472feb467e0ecb59da3c364bda423c5f12f). It is plugins#602
(GiantGKL), squash-merged as 6053811 in magpie-community/plugins:
bonus credits (a first upgrade's 500 trial credits, a promotion's)
show as aside windows of their own, with when they lapse, and a month
used up while a bonus has credits left is shown only too, since Kiro
spends the plan's credits first. keepMovedCurrent brings every moved
Kiro user to it.

Run on mote:
- at 276c806db + this change: gofmt -l, go vet ./..., GOOS=linux go
  vet -tags nogui ./..., GOOS=windows go vet ./..., go build ok;
  go test -tags nogui -timeout 45m ./...: 85 packages ok, and 3 reds,
  all on main already and filed: TestKeysAreWhatTheSaveWrites and
  TestSettingsCLISetsWhatTheWindowSaves (#4793, since da275848b's
  trayNoNumber), TestEveryRouteHasACommandOrIsNamed (#4794, since
  8826a15ea's /api/quit).
- rebased on 8569f39f6 (internal/provider changed: Zed's min), at
  this head: gofmt ok, go vet of internal/provider for darwin, linux
  and windows ok, go test -count=1 ./internal/provider ok (104s,
  TestKiroMoverHasTheTooLongFix holds with 0.1.25), internal/cli and
  internal/settingsapi the same three reds.

Not tried: a real Kiro account moved to 0.1.25 through magpie; the
plugin's own suite and its tests broken by hand are on plugins#602.
2026-11-01 23:11:28 +08:00
yetone 0c31638045 kiro: the mover installs 0.1.24, which says a too-long conversation as one
ergou0954_54426 on Discord routes by intent across Kiro's Claude and GPT
models and DeepSeek, and sometimes a turn failed with Kiro saying the
context was exceeded. Kiro says a conversation is past the model's window
in three ways, and the plugin up to 0.1.23 turned only the HTTP 400 into
the "input is too long for the model's context" that the gateway reads as
an overflow (tooLong). The same ValidationException as an exception in
Kiro's event stream came out as a 502, so the gateway took it for a
passing vendor fault: it rested the account, asked Kiro again (15 asks
for a lone provider in a probe), and never told the agent
context_length_exceeded, so the agent never compacted. A reply Kiro
stopped with MODEL_CONTEXT_WINDOW_EXCEEDED came out as finished.
plugins e8050e8 (kiro 0.1.24, on npm) answers both as the 400 that says
too long. Routing was already right: roomy skips a member whose known
window the request is past, and withRoom moves an overflow to a member
with room.

The min goes to 0.1.24 so keepMovedCurrent updates every moved user.
TestKiroMoverHasTheTooLongFix holds it there.
TestKiroPluginOverflowGoesToAMemberWithRoom pins what the gateway does with
0.1.24's two wordings: in a group the other member answers, the try is
failOverflow with no rest, and alone the agent gets context_length_exceeded
after a single ask.

Run on mote: go vet ./internal/provider ./internal/gateway; go test
-timeout 45m -count=1 ./internal/provider (ok 150s) ./internal/gateway
(ok 712s). gofmt -l clean. Broken by hand: at origin/main's min 0.1.23,
TestKiroMoverHasTheTooLongFix fails. A probe with 0.1.23's 502 body
showed Fail other, a rest, and a vendor 502 for the lone provider.
Not run: the full ./... suite (another session's full suite held mote),
and a real Kiro account pushed past its window.
2026-11-01 11:30:12 +08:00
yetone 3c04e76920 provider: Kiro's plugin min is 0.1.23 (plugins#538)
0.1.23 asks Kiro for thinking only when the request's thinking is
enabled or adaptive. An effort with no thinking, or thinking disabled
(Claude Code's title requests, a turn with thinking off), was sent a
budget or adaptive fields for every level above low.

Run: go test ./internal/provider on mote: ok. npm view
@magpie-community/opencode-kiro-auth version --prefer-online: 0.1.23.
Not tried: a live Kiro account.
2026-10-31 10:38:27 +08:00
yetone 505d9f6a21 provider: Kiro's mover min is 0.1.22 (plugins#538)
opencode-kiro-auth 0.1.22 sends xhigh and max as Kiro's own effort
levels on a model whose catalog lists them with adaptive thinking
(additionalModelRequestFields, as Kiro IDE sends them), and puts a
trailing system message (Claude Code's environment context) in a turn
before the question instead of into it. npm view --prefer-online gives
0.1.22.

Run (on mote): gofmt -l internal/provider clean; go vet ./internal/provider
for darwin, linux and windows; go test ./internal/provider -count=1: ok.
Not run: the full suite. Two other sessions' full suites were running on
mote, and this change is the min string alone.
2026-10-31 01:21:41 +08:00
yetone c941e0877c provider: Kiro's mover min is 0.1.21 (plugins#507)
0.1.21's browser sign-in asks first for AWS Builder ID, IAM Identity
Center (Start URL and region) or Kiro's page. The AWS ways open AWS
directly, so a magpie on a server or in Docker finishes with one pasted
callback address; before, choosing Builder ID or Identity Center on
Kiro's page sent the browser to an unreachable localhost page first and
needed two pastes. A sign-in left behind now frees its port when the
next one starts. Moved users only get it through keepMovedCurrent, so
the min goes up.

npm view --prefer-online @magpie-community/opencode-kiro-auth@0.1.21
version: 0.1.21 (latest) at the time of this commit.

Run on mote at this tree (base 807048470): gofmt -l
internal/provider (clean), go vet ./internal/provider: ok, go test
-count=1 -run 'Mover|Moved|Kiro|Migrat|Retir|Plugin' ./internal/provider:
ok (21.5s).
Not run: the full suite. Two other sessions' full suites were running on
mote (load 140 to 196) and this is a one-line min change. The plugin's
own run is in the merge of plugins#507 (bun test packages/kiro 110 pass,
9 review probes pass, check.mjs ok).
2026-10-30 12:51:40 +08:00
yetone 35cf8e083d provider: Kiro's mover min is 0.1.20 (plugins#492)
0.1.20 sends a tool whose input_schema has no root type as an object, and
runs a client's web_search server tool as Kiro's own search (at most 10 a
request). keepMovedCurrent brings every moved user's plugin up to it.

npm view @magpie-community/opencode-kiro-auth version --prefer-online:
0.1.20 at the time of this commit.

Run on mote at this tree: gofmt -l internal/provider (clean), go vet
./internal/provider, go test -count=1 -run
'Mover|Moved|Kiro|Migrat|Retir|Plugin' ./internal/provider: ok.
Not run: the full suite (a one-line min change). The plugin's own run is
in the merge of plugins#492 (bun test 3563 pass, check.mjs ok).
2026-10-30 00:50:19 +08:00
yetone b17a495dfa provider: Command Code 0.1.19, Devin 0.1.26 and Kiro 0.1.19 mark a refused sign-in signed out (blue12345655)
blue12345655 (Discord #help): a Command Code account signed in through
the plugin was signed out, and magpie showed no 重新登录 (v0.1.1844, still
v0.1.2021). The plugin said signIn "kept" on every usage read and
X-Magpie-Sign-In "kept" on every answer, so magpie never marked the
account lapsed: its card said "Unauthorized", the gateway kept routing
to it, and neither its row nor the list offered Sign in again. Devin's
and Kiro's usage reads did the same with words that said to sign in
again.

plugins 9410e2a: Command Code confirms a 401/403 with /alpha/whoami and
says "expired" on the usage read and on the request's answer; Devin's
usage 401 and Kiro's refused refresh say "expired"; a clean read says
"renewed". This raises the three movers' min so every moved user gets
them (keepMovedCurrent). npm view --prefer-online at landing:
opencode-commandcode-auth 0.1.19, opencode-devin-auth 0.1.26,
opencode-kiro-auth 0.1.19.

Run:
- The real npm plugins against the real api.commandcode.ai with a key
  it never issued (bun, WSL, sandbox HOME): 0.1.18 usage
  {"error":"Unauthorized","signIn":"kept"} and request 401 "kept";
  0.1.19 usage {"error":"Command Code's sign-in has expired; sign in
  again","signIn":"expired"} and request 401 "expired", body unchanged.
- Plugins: bun test commandcode 82/0, devin 142/0, kiro 67/0; bun
  scripts/check.mjs ok.
- go test -timeout 45m ./internal/provider/... ./internal/gui/... on
  mote (macOS 27), rebased on origin/main 96a703a59: provider ok; gui
  red only in TestMainWindowCorners/macOS_26_SDK, the AppKit title-bar
  test that is red on macOS 27 already (#3949), not reached by this.
- gofmt -l: clean.

Broken by hand: commandcode signed-out.test.mjs against 0.1.18's
index.mjs, 4 of 9 red; kiro and devin usage tests against their old
index.mjs, red.

Not tried: a real revoked Command Code, Devin or Kiro account, and a
full magpie sandbox with the plugin host (magpie's handling of
"expired", notePluginLapseSince and the row's Sign in again, is the
existing path that plugin-signed-out-account.test.cjs covers).
2026-10-29 17:59:51 +08:00
yetone e4ca47b0f2 provider: Kiro's mover needs 0.1.18, so an image over Kiro's 5 MiB Base64 limit doesn't stick the conversation (plugins#428)
kiro 0.1.18 (plugins ceda580): Kiro counts its 5,242,880-byte image limit
on the Base64 string, so imwaco's 4,171,428-byte view_image PNG (5,561,904
as Base64) failed with IMAGE_SIZE_EXCEEDED on that turn and every later
one. The plugin now shrinks such an image on the request it sends
(Bun.Image: long edge to 2000 px, then WebP/JPEG smaller each try), leaves
smaller images byte for byte, and puts a one-line note in place of one it
can't bring under, so the turn still goes.

npm view --prefer-online --registry=https://registry.npmjs.org/:
@magpie-community/opencode-kiro-auth 0.1.18 (latest).
Run: go test ./internal/provider -run
'Kiro|Mover|Moved|Min|Retir|HandOver|Adopt|KeepMoved' ok; go vet
./internal/provider (darwin, linux, windows) ok; gofmt -l clean. The whole
./internal/provider package crashes in TestUnreadLoginsWriteErrorsKeepCredentials
("close of synctest channel from outside bubble", #3632, open, on main),
and an earlier run hit "no space left on device" (the disk had 290 MB).
Plugin side: HOME=$(mktemp -d) bun test packages/kiro 67 pass, also under
OpenCode 2.0.25's Bun 1.4.2.
Broken by hand (plugin): without the fitting 7 of its 10 new tests fail.
Not tried: a real Kiro account; a real move in a sandbox HOME (only the
min string changed).
2026-10-27 17:53:07 +08:00
yetone 82edec9cad provider: Kiro's mover needs 0.1.17, ZCode's 0.1.31 (plugins#408, #410)
kiro 0.1.17: the Free trial and Credits windows carry their credits used
and the limit, so the card's Left shows what is left (plugins#408).
zcode 0.1.31: ZCode 3.16's sign-in that keeps only a
project-key-location record reads that key, so its GLM Coding Plan is
found, not only the gift (plugins#410); also the bare-UUID x-session-id
(plugins#388).

npm view --prefer-online: opencode-kiro-auth 0.1.17,
opencode-zcode-auth 0.1.31.
Run: go test -tags nogui -count=1 ./internal/provider (with the #3632
test skipped) ok; gofmt.
2026-10-26 16:13:57 +08:00
yetone 1f8f80e4af provider: Kiro's mover min is 0.1.16 (cache unknown, not 0)
opencode-kiro-auth 0.1.16 (plugins 9f6c4e8) says magpie_cache_unknown
when Kiro gives no token counts. Before, it reported cache_read 0, which
the Routing page showed as 0% (zeewell on X). keepMovedCurrent brings
every moved Kiro user up to it.

`npm view @magpie-community/opencode-kiro-auth version --prefer-online`
gives 0.1.16 at landing. Its publish run is red only on the known
think-tags E404 (plugins#180); the run's log has
"+ @magpie-community/opencode-kiro-auth@0.1.16".

Run at this head (origin/main 628e18987 + the routing commit): gofmt and go vet (darwin, linux, windows) clean;
go test -timeout 45m ./internal/provider ./internal/gateway: ok, ok.
2026-10-24 18:16:17 +08:00
yetone 802fb6e61a provider: Kiro's mover min is 0.1.15, so a Kiro API key is used as kiro-cli uses it (Hollowhere on Discord)
Hollowhere (magpie 0.1.1319, kiro-cli 2.33.1) signed in to Kiro with an
API key: /v1/models listed kiro/auto alone, and every request failed with
"Kiro didn't take the API key: 400 Bad Request", while kiro-cli served the
same key. The Kiro plugin asked GetProfile in us-east-1 only and stopped
at its 400. Plugin 0.1.15 (magpie-community/plugins 2039678) asks it in
us-east-1 then eu-central-1 as kiro-cli does, goes on in us-east-1 when
none answers, lists the key's models with the control plane's
ListAvailableModels, reads its credits with GetUsageLimits, and names no
profile in its calls, as traced from kiro-cli 2.32.0 with a made-up key
against a local recorder. keepMovedCurrent brings every moved user's
plugin up to it.

npm view @magpie-community/opencode-kiro-auth version --prefer-online:
0.1.15 at the time of this change.

Run at 240f3eb4c (origin/main) plus this change: gofmt -l
internal/provider (clean); go vet ./... (darwin), GOOS=linux go vet
-tags nogui ./..., GOOS=windows go vet ./... (all clean);
go test -timeout 45m ./internal/provider/... ok (145.7s).

Not tried: no real Kiro API key was tried, here or in the plugin; no
real move of a Kiro account onto 0.1.15.
2026-10-22 20:09:44 +08:00
yetone 053fc2f2b6 provider: Kiro's mover min is 0.1.14, each account named "email (Google)", "email (GitHub)" (plugins#309)
kiro 0.1.14 (magpie-community/plugins 7fdc07f) names a sign-in by its
email and the way it was signed in to, so two Kiro accounts of one email
no longer read "email (slot)". An account kept by its bare email is
renamed on its first request, usage read or renewal. npm has 0.1.14
(npm view --prefer-online, at landing).

Run at 8a99473ed + this change:
- gofmt -l internal/provider: nothing.
- go vet ./internal/provider/...: ok.
- go test -timeout 45m ./internal/provider/...: ok (193s).
Not run: the full suite.
2026-10-22 15:35:39 +08:00
yetone c4551dfcac provider: moved Kiro accounts take plugin 0.1.13, which keeps one email's Google and GitHub sign-ins apart (plugins#309)
molvqingtai on Discord: a Kiro account signed in with Google and another
signed in with GitHub under the same email are two Kiro accounts, but the
second sign-in replaced the first. The plugin named both by the email, and
the plugin host's settle replaces an account whose name matches unless both
carry a uid that differs. Kiro 0.1.13 (plugins d767d1c) saves the login
provider as uid, and gives accounts saved before it theirs on their first
request, usage read or renewal. Raising the min updates every moved user's
plugin.

npm view @magpie-community/opencode-kiro-auth version --prefer-online
--registry https://registry.npmjs.org: 0.1.13.

Run at this head (on origin/main):
- gofmt -l internal/provider: nothing; go vet ./internal/provider ok for
  darwin, linux -tags nogui and windows.
- go test -timeout 30m ./internal/provider: ok (89s).

Not run: the full suite. The disk has 1.3Gi free, under what a full run
needs; this changes one string in the mover's table, which the provider
package's mover tests read.
Not tried: real Kiro accounts (none here).
2026-10-22 14:08:39 +08:00
yetone 53009f81a4 provider: every mover's min is the plugin that closes its gap with the built-in
Moved users are kept on these versions by keepMovedCurrent, each on npm
(npm view --prefer-online):
- devin 0.1.20: JSON output when asked; tool result images on the tool message
- commandcode 0.1.13: Credits reset at the subscription's end (#2454)
- cursor 0.2.18: a failed tool result read as isError; keychain backoff
- zed 0.1.8: "No plan" for a free account
- zcode 0.1.19: personal and team resets; Start Plan hint
- kiro 0.1.12: JSON output (output_config.format)

Run at 63be47717 with this batch: go test -tags nogui ./... -count=1 -timeout 90m, 66 packages ok, no FAIL (load ~250). gofmt -l clean; GOOS=linux and GOOS=windows go vet of provider, gateway and plugin pass. (devin's min rose after the run: go test ./internal/provider -run 'Mover|Moved' ok.)
2026-10-16 19:38:06 +08:00
yetone bd4cb7a260 provider: moved Kiro, WorkBuddy and Factory users get plugins 0.1.11, 0.1.21 and 0.1.27 (magpie-community/plugins#120, #121, #119)
The movers' min, so keepMovedCurrent updates every moved user's plugin:
- kiro 0.1.11: a thinking model offers xhigh as its own level (50k
  budget), so Claude Code's xhigh isn't routed as max (plugins#120).
- workbuddy 0.1.21: a model free only at night (Hy4 preview, 23:00-08:00)
  is never said free, and a whole-day discount shows the price before it,
  from WorkBuddy's modelPromotions (plugins#121).
- factory 0.1.27: droid's Fast Mode models (Opus 5.5/5/4.8, GPT-5.5/5.4/
  5.3-Codex), and fast asked of a base model sent to its Fast Mode model
  (plugins#119).

All three are on npm (npm view: 0.1.11, 0.1.21, 0.1.27).

Run: gofmt -l, go vet ./internal/provider for darwin, GOOS=linux -tags
nogui and GOOS=windows, go test ./internal/provider (ok, 449s under load
~280). Not tried: a moved user's update in a running magpie.
2026-10-14 18:18:57 +08:00
yetone 6e9930e374 provider: the Kiro mover asks for opencode-kiro-auth 0.1.10, which passes the caller's prompt-cache marks to Kiro (magpie-community/plugins#110)
kiro 0.1.10 (plugins 386a2ba) turns each cache_control in the Anthropic
body magpie hands the plugin (system, messages, tools) into Kiro's
cachePoint, at most 4 with the last kept; up to 0.1.9 it dropped them, so
a moved Kiro never asked Kiro to cache. This raises the mover's min, so
keepMovedCurrent updates every moved user.

Run: npm view @magpie-community/opencode-kiro-auth version on
registry.npmjs.org shows 0.1.10 (the publish run is red only for
zed-auth and zen-free-auth, refused by npm's trusted publishing); the
plugin's bun test (1191 pass) and scripts/check.mjs kiro, with its
cache-points.test.mjs failing 3 of 4 with the fix broken by hand; gofmt
-l; go vet darwin, linux -tags nogui, windows on internal/provider; go
test -count=1 ./internal/provider (ok).
Not tried: a real Kiro account.
2026-10-14 13:20:36 +08:00
yetone 285e17b061 provider: a moved Kiro shows the model a tool's images, Codex's view_image among them (#1861)
simonsmh (v0.1.1215) saw Codex's view_image and screenshot results come
back empty on a Kiro subscription. magpie hands Kiro's plugin an Anthropic
body whose tool_result holds the image as a base64 image block, but the
plugin (@magpie-community/opencode-kiro-auth up to 0.1.8) read only a
tool_result's text, so the image was dropped and the model was told
"(no output)". #369 had fixed this in the built-in for Claude Code; the
plugin never got it.

Kiro plugin 0.1.9 (magpie-community/plugins 66facac) sends a tool's images
with the userInputMessage that answers the call, latest images only, as
the built-in does. This raises the mover's min to 0.1.9, so
keepMovedCurrent updates every moved user.

tool_images_1861_test.go builds the request from what codex-rs 0.162
sends (FunctionCallOutputContentItem, view_image's input_image data: URL
with detail "high") and checks the handoff to the plugin (the image in
the tool_result, bytes intact) and the built-in Kiro body. Both pass on
the old code too: the bug was in the plugin, whose tool-images.test.mjs
fails 3 of 4 on 0.1.8. gateway-routing.md says how a tool's images reach
the model on each translation.

Run: gofmt -l; go vet darwin, linux -tags nogui, windows on
internal/gateway and internal/provider; go test -tags nogui
./internal/gateway ./internal/provider (sandbox HOME, ok); the plugin's
bun test (1152 pass) and scripts/check.mjs; npm view on
registry.npmjs.org shows 0.1.9.
Not tried: a real Kiro account, or real Codex against it.
2026-10-13 04:00:56 +08:00
yetone f575da41cc provider: the Kiro mover asks for opencode-kiro-auth 0.1.8, which sends a tool named past 64 characters under a short name (#1393)
Kiro answers a tool name longer than 64 characters "Invalid tool use
format." (REQUEST_BODY_INVALID). Claude Code names a plugin's MCP tools
mcp__plugin_<plugin>_<server>__<tool> (the reporter's Cloudflare docs
tools are 70 and 71), so every turn of a moved Kiro account that offered
one failed: the plugin passed the name through. The built-in has cut such
names since e3b6397a (#369, TestBuildKiroToolImagesAndLongNames), so
users who haven't moved were not affected and the built-in is unchanged.

magpie-community/plugins e1efc3d (kiro 0.1.8) gives the plugin the
built-in's rule: a name outside [a-zA-Z0-9_-]{1,64} is sent as its head
plus a hash of the whole name, the same in every turn, and Kiro's calls
come back under the caller's name, streamed and not. Raising min makes
keepMovedCurrent update every moved user's plugin.

Run: HOME=<temp> go test -tags nogui ./internal/provider (ok) and
-run Kiro ./internal/gateway (ok); go vet (darwin, linux, windows) and
gofmt -l on ./internal/provider. Plugin side: tool-names.test.mjs fails
3 of 3 without its change and passes; bun test across the repo 1003
pass. npm view shows 0.1.8. Not tried against Kiro itself: no Kiro
sign-in on this machine.
2026-10-09 19:31:37 +08:00
yetone cdc3140ace provider: moved Kiro takes plugin 0.1.7, which asks a Builder ID sign-in with Builder ID's service profile as the built-in does (magpie-community/plugins#16, YuanZhe-99: a Kiro Student account was refused the move, the plugin serving no claude-opus-5.5 or claude-sonnet-5.5, which the built-in listed) — the plugin had no counterpart of 40102f74 (#422): a Builder ID sign-in names no profile, Kiro answers List-Available-Profiles with a 403 for it, so the plugin listed Auto alone and its usage and chat failed. kiro 0.1.7 (plugins e9d684f) takes the service profile for kiro-cli's, the IDE's and its own Builder ID sign-ins and on that 403; the mover's min now names it, so keepMovedCurrent updates every moved user. Only once 0.1.7 is on npm. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-04 12:06:30 +08:00
yetone 3e024957a5 provider: moved Factory, Grok, Kiro, MiMo, Qoder and WorkBuddy take the plugin versions that renew their sign-ins ahead of time through auth.refresh (owner: 把社区插件都迁移到 auth.refresh) — factory 0.1.11, grok 0.1.6, kiro 0.1.6, mimo 0.1.6, qoder 0.2.3, workbuddy 0.1.7 (plugins c64f555..319eee2, published): each gives auth.refresh with a refreshLead above its own check before a request, under the same one-refresh-at-a-time as that check, so magpie renews an account once before its requests, models and usage ask, and a refresh token is never spent twice. Kiro and WorkBuddy throw every failure plainly, as their built-ins never marked an account; the others mark a refusal signIn "expired" as their request paths already did. keepMovedCurrent updates moved users to them. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build pass; go test -tags nogui -count=1 ./... under a temp HOME passes but TestProvidersAnswerWhileListsComeIn, TestUserPath and TestClaudeSignedOut, timing tests that failed under load 11 and pass alone. 2026-10-03 12:13:18 +08:00
TryWorld 037a79b964 fix(provider): preserve unreadable configuration on edits (#415)
Propagate providers.json read and decode errors through catalog writes. Only a missing file allows first-use creation; failed reads preserve the original file.
2026-10-01 18:33:45 +08:00
yetone 30236bf035 migrate: moving Kiro back with an API key no longer hangs magpie, a move's lock left by a killed magpie frees itself, and plugins changed in a terminal reach the running app (要保证插件订阅 provider 跟内置的订阅 provider所有逻辑都要一模一样) — Kiro's back put the plugin's API key onto the Kiro provider while holding logins.json's lock; saving the provider syncs the agents, which read the accounts and waited on that same lock, so the move back never returned and every request after it hung. The key is now put back once the lock is let go (a mover's settle). A move killed while hung left migrations.json.lock, refusing every move for 15 minutes as "another magpie is moving"; the lock now holds its magpie's pid and one whose magpie is gone is taken. And magpie plugin add, remove or move in a terminal left a running app with the plugins it had loaded (a moved Kiro gone until restart, "magpie knows no model kiro/auto"): a plugins.json changed by another magpie now restarts the host and takes the providers that magpie was told meanwhile. Found walking Qoder, Kiro and Cursor through sandbox moves. TestKiroMover (hangs), TestMoveLockOfDeadMagpie and TestPluginsChangedElsewhere fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. 2026-10-01 06:53:29 +08:00
yetone 475a55a702 migrate: built-ins move onto plugins that fail and mark the sign-in as they did — each mover now asks the plugin version that answers with its built-in's status and words and says through X-Magpie-Sign-In when the account's sign-in expired, stayed or renewed, in requests and usage reads alike: Command Code, Cursor, Devin, Kiro, MiMo, WorkBuddy and Zed 0.1.5, Factory and ZCode 0.1.4, Grok and Qoder 0.1.3, each published and installed from npm before this. go vet, go build -tags nogui (GOOS=linux), GOOS=windows go build, go test -tags nogui ./internal/provider ./internal/gateway ./internal/plugin pass. 2026-10-01 06:04:01 +08:00
yetone b2bcbdc91a plugins: a moved Cursor, Devin, Command Code, Kiro or Zed fails as its built-in did — their plugins' 0.1.4 answer each error with the built-in's status and words (Zed's and Kiro's failures before the answer as a 429/401/403/402/502 rather than a 200 stream, Command Code's and Cursor's bare errors in Go's status text, Devin's without a doubled prefix), so the gateway fails over, rests and marks lapsed as it did for the built-in. A move now needs 0.1.4 of them, and a magpie serving the gateway updates one moved before. Each version was installed from npm in a sandbox. 2026-10-01 04:28:04 +08:00
yetone a170b909c9 plugins: a moved built-in's plugin comes up to date with magpie, as the built-in did — the fixes that bring each plugin in line with its built-in (plans, windows, lapsed sign-ins, refusals, bodies in bytes) are in @magpie-community's new releases, but a plugin was updated only by a click in Plugins, so an account moved before kept the old one. The magpie serving the gateway now updates, a little after it starts and every hour, the plugin of each built-in moved onto one to the version its move needs, and a move needs those versions: mimo 0.1.4, workbuddy 0.1.4, grok and qoder 0.1.2, the rest 0.1.3. One turned off, run from a folder or moved back is left alone. TestKeepMovedCurrent fails without the change. 2026-10-01 03:34:22 +08:00
yetone 566ae09db1 plugins: a moved provider's accounts keep what the built-in's had (你确保插件版的订阅 provider 和内置的一模一样了吗) — each account of a plugin provider has its own plan's models, not the first account's; a move carries each account's plan and a lapsed mark; a usage read that finds the sign-in gone marks the account and a clean one clears it, a network failure shows the last reading; a plugin that fails to load keeps its providers rather than taking them away; Kiro's API key is named and an OAuth account beside it stays off as in the built-in; Command Code Plan keeps its name. TestUnloadedPluginKeepsProviders, TestPluginUsageLapse, TestPluginAccountModels, TestMovedProviderName, TestKiroMover and the move test fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./internal/provider ./internal/plugin ./internal/gateway pass. 2026-10-01 03:27:47 +08:00
yetone 94ba560257 plugins: a move installs the plugin as it now matches its built-in (插件版…保持一模一样) — each mover asks for the version published with the parity fixes (WorkBuddy 0.1.3; Command Code, Cursor, Devin, Factory, Kiro, MiMo, Zed, ZCode 0.1.2), updating an older one first, so a failed sign-in says why, a CLI's own account follows its key, refusals read as the built-in's. ZCode's own sign-in on its session alone (the Start Plan) no longer stops the move: zcode-auth 0.1.2 reads ZCode's credentials anew for each request, the session ZCode renews included, so the account goes marked as ZCode's and with no expiry of its own. TestCursorPluginContext and TestMoveDevin no longer lean on the machine: the first seeds its catalog (it failed wherever models.dev's cache wasn't there), the second waits for the fake CLI however loaded the machine. TestZCodeMover fails without the change. Each package installed from npm in an empty HOME comes at the version asked. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass but for TestUserPath and TestClaudeSignedOut, 5s timeouts under the whole run's load that pass alone. 2026-10-01 02:12:43 +08:00
yetone 3bec6c0e40 providers: a built-in subscription moves onto its community plugin and back, its accounts with it (the user: 慢慢下掉内置的那些 Subscription Provider…不要让用户一升级完之后,突然发现他的所有服务都不可用了) — eleven built-ins (Zed, Qoder, Factory, MiMo, Devin, Grok, Command Code Plan, Cursor, Kiro, WorkBuddy, ZCode) each get a mover to their @magpie-community package. A move installs the plugin (updated when older than the mover needs), hands it every account in the plugin's shape, checks the plugin lists models for them, and only then lets the plugin serve the same provider id, so agents' model ids don't change; any failure rolls back and the built-in keeps serving. The built-in's accounts are kept as a backup, and "Run built-in again" (magpie plugin move-back <id>) takes the plugin's current sign-ins back, never copying a rotating token: they are taken out of the plugin in one step, and an account the built-in renewed meanwhile keeps its newer token. An account only the plugin can hold (Cursor's browser sign-in) stays with it. The provider editor shows "Runs on" with the button, a failed move's reason, and the CLI has magpie plugin move / move-back. Automatic moves (Retiring) are wired in but the list stays empty until the packages are on npm. Checked with real accounts in a sandbox HOME: Command Code Plan and Devin moved, answered a chat through the gateway on the plugin, moved back and answered again on the built-in. TestMove*, TestPutBackKeepsNewer, the movers' round-trip tests and plugin-move.test.cjs (Chromium, WebKit, en/zh) are new. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; click-scroll, old-webkit pass. 2026-09-30 21:21:58 +08:00