Commit Graph
561 Commits
Author SHA1 Message Date
edx 68794bacfc trae 0.2.24: a Kimi model's tool schemas get the types Moonshot requires (code 4027) (#462)
Trae passed a request's tools to the model as they were. Moonshot (Kimi) refuses the whole request when a schema node has no type: Trae answers code 4027, "tools.function.parameters is not a valid moonshot flavored json schema … type is not defined". Claude Code's enum-only properties trigger it. For a model whose config, model_name or request model matches /kimi|moonshot/i, nativeTools now deep-clones each tool's parameters and rewrites them with kimi-work's moonshotSchema (ported). An enum or const with no type gets the type its values have, and a $ref beside a type and a type beside an anyOf are written the way Kimi takes them. Other models' tools, and schemas Kimi already accepts, go byte for byte. README note, new moonshot.test.mjs, and 0.2.23 -> 0.2.24.

By edifierx666 (#462).

Reviewed at 4c8dc7401f74fb44615bcb70ee0178337a017951. The only change since is 31c88fe84 (maintainer): the README's Kimi bullet moved after the native-tools bullet's continuation paragraph. The text is unchanged.

Run at 31c88fe84 (macOS, via mote-run, sandbox HOME): bun test packages/trae, 221 pass, 0 fail; bun scripts/check.mjs trae passes. Run at 4c8dc7401 as well: the same 221/0, plus check.
Broken by hand at 4c8dc7401, running moonshot.test.mjs:
- moonshotModel always false: 4 of 6 red.
- Always true: the non-Kimi test red.
- structuredClone dropped: red.
Edge cases run through chatBody, 18 schemas: null, mixed, object and empty enums; nullable; anyOf/oneOf; nested objects; arrays without items; untyped and self $refs; boolean schemas; properties named enum or const. glm-5's parameters are byte-identical in every case. For Kimi, enums and consts only gain a type.
Not tried: a live Trae CN or Trae Global request (the author ran Trae CN live, per the PR).
2026-10-28 22:30:12 +08:00
yetone f4d48ac3ee workbuddy 0.1.43: a chat names the model's default effort as WorkBuddy's client does, and goes gzipped
troilus1011 on X: WorkBuddy's DeepSeek in OpenCode through magpie thought
at low and high, never at the default. OpenCode's default variant names
no reasoning_effort, and WorkBuddy doesn't think without one: measured on
www.workbuddy.ai with 0.1.42, deepseek-v4.1-flash gave 0 reasoning
tokens with no effort (2 of 2), 0 at none, 16/37 at low, 34/56 at high.
WorkBuddy's own client (CLI 2.165.0 in WorkBuddy 5.9.3,
configureThinkingSettings) sends the session's effort, else the
reasoningEffort setting, else the model's reasoning.defaultEffort from
/v3/config, which is "high" for this model on both builds. A chat that
names no effort now gets the model's own defaultEffort when its listed
levels hold it, read from the same cached /v3/config list (one read per
minute; a failed read leaves the chat as it came and is not retried on
every chat). An effort the client names, none included, is untouched and
the list isn't read for it. Models with no reasoning config get nothing.

runmiNeverstop on X: 2.89 GB up to copilot.tencent.com through magpie.
WorkBuddy's client gzips a model request's body (GzipRequestProcessor,
on with productFeatures.RequestBodyGzip, true in both builds'
product.json and not turned off by the remote config); the plugin sent
it as plain JSON. Agent chat JSON (the whole history each turn, tool
schemas) compresses several-fold, so the upload was several times what
the official client sends for the same turns. A chat-completions body
now goes gzipped with Content-Encoding: gzip on both builds;
unanswered() weighs the gzipped size against the front door's 2 MiB.
Claude's Messages route goes as it came (not tried gzipped live).

Run (on mote, HOME=$(mktemp -d) bun test in packages/workbuddy): 197
pass, 0 fail. bun scripts/check.mjs: exit 0. Fakes that parse the sent
body gunzip it (testdata/unz.mjs); reset.test.mjs's 2 MiB bodies are
random base64 so they stay over 2 MiB on the wire.
Live (www.workbuddy.ai, a real account in a sandbox HOME): with 0.1.43
the default sent reasoning_effort high gzipped and thought (34 and 51
reasoning tokens), none stayed 0, low and high as before, all 200. A
gzipped chat answered 200 the same as a plain one.
Broken by hand: origin/main's index.mjs with the new
default-effort.test.mjs: 5 of 8 red (default effort, failed-read reuse,
both gzip tests, defaultEffortOf); the 3 that pass guard what must not
change (named efforts, models without a default, Messages).
Not tried: a live chat on the China build (copilot.tencent.com answered
401 to every token available here, its /v3/config read fine); Messages
gzipped; the reporters' own OpenCode sessions end to end.
2026-10-28 22:23:20 +08:00
yetone 08e3ba8990 kimi-work 0.1.14: a spent allowance's 403 goes out as a 429 (#465)
Kimi answers an account whose allowance is used up with a 403 ("You've
reached your usage limit for this billing cycle", resource_exhausted
"insufficient balance"). The plugin passed it through, magpie read a
403 as a key fault, never rested the account, and kept routing to it
while another account with quota sat idle (kongbai01203: 6+ requests in
20 minutes to the spent one after the other answered 200).

A 403 whose body says resource_exhausted, usage limit, billing cycle,
insufficient balance or quota now goes to magpie as a 429 with Kimi's
body and headers (content-encoding/length dropped, the text is
decoded), the pattern Devin's, Qoder's, Kiro's and Cline's plugins use
for a spent quota. magpie's quotaStatus counts 429 as spent and moves
on. Any other 403 stays a 403 with its body.

Run (on mote, HOME=$(mktemp -d) bun test in packages/kimi-work): 69
pass, 0 fail. bun scripts/check.mjs: exit 0.
Broken by hand: status:spent?429:403 changed to status:403; the three
new spent-allowance tests went red (66 pass, 3 fail), green again with
the fix back.
Not tried: a real spent Kimi Work account. The issue gives Kimi's words
but not the JSON around them, so the fixtures try them in an
OpenAI-style error, a Connect body and a nested Connect error. Not
checked end to end that magpie then rests the account until the cycle
resets (Kimi sends no reset time; magpie's own rest length applies).
2026-10-28 21:02:21 +08:00
yetone 1f015f1b1e qoder 0.2.46: b7bbc9d's record (it went out under a stale 0.2.43 subject)
b7bbc9d is "qoder 0.2.46: credits used up leave the free models counted
out, so magpie still routes them"; its message was a stale file from an
earlier commit (a noclobber write that failed). No code changes here.

coeo91 on Discord: a Qoder account whose credits are spent still serves
its free models, but magpie treated it as spent for every model. Qoder's
own docs say so: "When Credits run out, you can continue using free basic
models, subject to daily and monthly limits" (docs.qoder.com/Credits; the
zh page: "Credits 用尽后,仍可使用免费基础模型"). The usage hook's credit
windows counted every model, so a plan used up, or a free account's
"0 credits left" (0.2.45), read 100% for Qwen3.8-Flash and DeepSeek-Flash
too, and magpie's routing put the account last or skipped it for them.

Each credit window from the usage hook (Qoder and Qoder CN, device and PAT
paths) now names the account's free models in notModels, as WorkBuddy's
does since 0.1.23 (plugins#138). magpie's plugin_usage.go reads notModels
into the window's model scope, so Allowance.For/Full/Pooled skip it for
those models. Free is the listing's own (freeOf: 0x, not a promotion's 0
for a while); the listing is the cached one the models hook read, asked
once when none is cached. A listing that can't be read, or that lists no
free model, leaves every model counted, as before. QwenWork (its own usage
path) is unchanged: nothing from it says its free models outlast the
credits.

Run: HOME=$(mktemp -d) bun test in packages/qoder on mote (309 pass);
bun scripts/check.mjs qoder (ok).
Broken by hand: spareFree returning at once, spare-free.test.mjs 6 of 10
red (the four left are the as-before cases).
Not tried: a real account with its credits used up (the owner's has
add-on credits left); the fixtures are Qoder's envelope and listing shapes
from the existing tests.
2026-10-28 19:17:18 +08:00
yetone b7bbc9dc06 qoder 0.2.43: the check-in says when to ask again, as the 10:00 (UTC+8) campaign opens
sdytman on Discord: Qoder's daily credits start at 10:00, can the plugin's
check-in follow it? Qoder's /me/campaigns lists each day's CLAIM_BENEFIT
campaign with startAt 10:00 and endAt 09:59 the next day, both UTC+8
("Daily reset: 10:00 (UTC+8)"), read with a real account at 09:27 CST on
10-28. Qoder.app 0.4.3 polls that list every 5 minutes and treats
startAt <= now < endAt as active; there is no next-time field. A check-in
before 10:00 met yesterday's campaign, and magpie settled for the Beijing
day, so today's campaign waited until tomorrow, or was lost.

checkin now returns until: the next campaign's opening (the later of
endAt and startAt + 1 day, or the next startAt in the gap) plus a minute,
on done, claimed and "not offered yet". All in epoch time, so the
machine's zone doesn't matter; qoder and qoder-cn share the code. magpie
asks again at until once it reads it (yetone/magpie, next release).

Run (mote): checkin-window, native-checkin and checkin tests under
TZ=UTC, Etc/GMT+8 and Asia/Shanghai, 66 pass each; HOME=$(mktemp -d)
bun test, 2938 pass 0 fail 8 skip; bun scripts/check.mjs. A real qoder
account at 09:35 CST: claimed 100, until 2026-10-28T02:01:00Z.
Broken by hand: nextOpens returning endAt only, 11 of 13 checkin-window
tests red; askAgain returning {}, 12 of 13 red.
Not tried: a real Qoder CN account (none here); the server's list in the
09:59-10:00 gap.
2026-10-28 19:16:54 +08:00
yetone f2b0dacdb7 workbuddy 0.1.42: a chat is parsed once on its way, and goes as it came when nothing changed (#461)
jihuayu measured a 45 MiB chat going through 0.1.41's fetch: each step
(withSystem, fitted, normalizeToolChoice, attend, the model, systemKey)
parsed the whole body again, 6 parses a request, and normalizeToolChoice
wrote it out whole even for an unchanged "auto". Bun's RSS reached 618-751
MiB for 4 serial requests where passing the body through took 270.

prepared parses a request once. Each step makes its own change to that one
object, in the same order (systemOn, fitTools, toolChoiceOn; unsignedOn
for Messages). attend, the model and the system key read the same object,
and a refused system prompt moves on it (systemAsUserOn). The body is
written out once, only when a step changed it. The parsed chat is let go
before the request is sent. A body a step throws on goes through the steps
one by one, as before. The string-level helpers stay as wrappers.

What was run, on this tree:
- mote, the reporter's benchmark (no network, fetch stubbed, 4 x 45.3 MiB,
  peak RSS sampled every 5ms): 0.1.41 7 parses/request, 1087.5 MiB parsed,
  peak RSS 1096 / 979 MiB. This change: 2 parses/request (the request and
  the stub's SSE reply), 181.3 MiB parsed, peak 682 / 680 MiB. The bodies
  sent have the same SHA-256 in both.
- HOME=$(mktemp -d) bun test packages/workbuddy on mote: 189 pass, 0 fail.
  bun scripts/check.mjs workbuddy: ok.
- oneparse.test.mjs (new): 17 chat shapes, invalid JSON and bytes come out
  the same as the steps one by one made them, with the same tool names; an
  unchanged chat goes byte for byte; the loader parses a 2 MiB chat once.
  Broken by hand: every request sent through the step-by-step fallback,
  the loader test FAILs (5 parses, want 1). An unchanged "auto" counted as
  a change, the byte-for-byte test FAILs.
- Real account (WorkBuddy AI, free-only on, sandbox HOME, this Mac):
  deepseek-v4.1-flash, a 373-byte chat and a 205,595-byte chat with a
  developer message, max_completion_tokens and a dotted tool name, through
  0.1.41 and this change: 200 "OK" on all four; no sign-in refreshed.

npm has 0.1.41, so 0.1.42 is free.

Reported-by: jihuayu
2026-10-28 18:46:03 +08:00
yetone 8f81a8aeb8 cursor 0.2.29: a native Run over HTTP/1.1 sends its history's blobs 16 at a time
ysm119 on Discord: Cursor models 30 s+ to first token, 1-4 min a turn.
0.2.28 (d9c858c) let BidiAppends go 16 at once, but only on runOnce, the
stateless fallback. Every real request goes through runNative, which
still opened HTTP/1.1 with atOnce=1, and nativeTransport.flush waits for
each write's callback, i.e. each append's answer. Cursor asks for every
history message as a KV getBlob, so a Run that fell back to HTTP/1.1
(a proxy or network that blocks h2) paid one ~265 ms round trip per
message before the model started.

Now runNative opens with H1.atOnce and kvReply: KV replies (field 3,
kv_client_message) overlap up to 16 at a time; any other message (a tool
result, the close) waits for every append before it, goes alone, and is
written once Cursor answered it, so it is never uncertain.

Measured with the real Cursor account in a sandbox HOME (bun 1.4.2,
this Mac; FORCE_H1 points h2 at a dead port so the Run falls back):
- HTTP/2, old and new alike: short prompt 5.0 s cold / 1.8 s warm;
  30-step agent request (121 messages, 40 tools, 233 KB) 6.5 / 2.9 s;
  100 steps (590 KB) 6.2-7.3 / 4.0-4.2 s.
- HTTP/1.1, 0.2.28: 30 steps 37-39 s to first token (~135 appends
  one after another); 100 steps 117-130 s.
- HTTP/1.1, 0.2.29: 30 steps 4.4-9.1 s; 100 steps 9.0-13.2 s (8 runs on
  grok-4.7@256k, 3 on composer-2.5), each answer correct about step 17
  and the first message, so the blobs arrive whole. A 6-turn tool loop
  over HTTP/1.1: turn 0 6.3 s, later turns 2.6-3.0 s.
- One early 0.2.29 run (100 steps) ended in a 187-byte error whose
  status wasn't captured; 11 runs after it, with the body printed,
  all passed. Its cause is unknown.

Run: bun test packages/cursor on mote, 316 pass 0 fail;
bun scripts/check.mjs cursor ok.
Broken by hand: runNative passing 1 again turns the two stall tests red;
the alone barrier disabled turns 4 red (the new openH1 test,
result-before-close, both uncertain-append tests).

Not tried: Opus (the account has no weekly quota for it, 429); the
reporter's own network or proxy, so whether he is on HTTP/1.1 is not
known; Cursor's own client as a baseline; a full sandbox magpie with
0.2.29 installed.
2026-10-28 15:59:22 +08:00
wky114 c00f40eb01 raccoon 0.1.4: read the desktop auth.json in the client profile on macOS and Windows (#459, wky114)
Current Raccoon desktop builds keep the session in a client profile, not in
~/.box-agent, so desktop sign-in answered "not detected" while the app was
signed in (wky114). Raccoon desktop 1.1.3's app.asar (clientProfile.ts)
puts it at <profile>/agent/config/auth.json, the profile being
~/Library/Application Support/office-raccoon on macOS and
%USERPROFILE%\.office-raccoon on Windows. The plugin now reads the Windows
profile, the appData profile, then ~/.box-agent, first file found wins; the
RACCOON_BOX_AGENT_CONFIG_DIR / BOX_AGENT_CONFIG_DIR overrides still come
first. Labels and the not-found error no longer name one path.

Review fixup (cb46111): the PR had only ~/.office-raccoon, which is the
Windows layout, and its test was red at f55d949 (Bun reads homedir() once,
so setting HOME did nothing). desktopAuthCandidates takes home/platform/env
and the tests pass them per OS. Version 0.1.4.

Run at cb46111: bun test in packages/raccoon on mote (38 pass) and on
Windows (38 pass); whole repo bun test on mote (2999 pass, 8 skip);
bun scripts/check.mjs ok. Broken by hand: without the appData profile
both desktop tests are red. Not tried: a real signed-in Raccoon desktop.

Co-authored-by: wky114 <38514103+wky114@users.noreply.github.com>
2026-10-28 15:27:33 +08:00
yetone 944610f8c8 cursor: each test file mints sign-in tokens of its own
The publish run for d9c858c (cursor 0.2.28) went red in
conversation.test.mjs: its first Run went to 127.0.0.1:42583, a closed
agent server of listwait.test.mjs, got ECONNRESET and fell back to
HTTP/1.1, which its fake API doesn't answer. listwait's tokens were
{exp: now+7200+n} with a counter from 0, byte for byte the tokens
conversation.test.mjs mints, so within one second the plugin's agent
endpoint and model list kept for listwait's token were found by
conversation's. conversation, maxmode and usage had the same latent
collision with each other. Each of those files, and context's tokens,
now carry a sub of their own (as http1, latency and the native tests
already did).

Run: on Linux (wsl-run), listwait then conversation was red 6 of 6
before and 0 of 6 after; listwait, conversation, maxmode and usage in
one run 0 of 4 red; bun test packages/cursor 314 pass. On mote, the
whole repo's bun test (2997 pass, 0 fail) and bun scripts/check.mjs (ok).
Broken by hand: the failing order was found by replaying CI's file order
and logging open()'s HTTP/2 failure (ECONNRESET to listwait's port).
Not tried: CI's exact random order beyond the replay.
2026-10-28 14:49:59 +08:00
yetone d9c858c3c0 cursor 0.2.28: a Run over HTTP/1.1 sends its BidiAppends 16 at a time, as cursor-agent does
Over HTTP/1.1 (where HTTP/2 can't open a Run) each client message goes up
as a BidiAppend. openH1 sent them strictly one at a time, so a new Run's
history (one blob a message, which Cursor asks for all at once) cost a
round trip to api2.cursor.sh per message before the model could start:
hundreds of round trips for a long conversation. cursor-agent 2026.10.01
(startAppendingInputs) keeps up to 16 appends in flight, numbered by
seqno (`m.length>=16&&await Promise.race(m)`).

openH1 now keeps up to atOnce (H1.atOnce, 16) appends on their way, in
seqno order; past that a write waits for one to finish. A native
session's Run passes 1: it counts a write as done only when Cursor
answered that append, so a tool result is never uncertain (the native
HTTP/1 tests hold that, maxInFlight 1). Seen from ysm119's report
(33-36 s to first token on claude-opus-5-5); whether he is on HTTP/1.1 is
not known.

Run: bun test packages/cursor (314 pass, 0 fail) and
bun scripts/check.mjs cursor (ok), on mote.
Broken by hand: with openH1 back to one at a time, the new http1 test is
red (most in flight 1, expected > 1). With runNative not passing 1, five
native-http1 tests are red (maxInFlight 3, uncertain-append and writeWait
cases), so the serial contract is held there; open.test.mjs's serial
openH1 tests now ask for atOnce 1 by name.
Not tried: a real Cursor account over HTTP/1.1; the serial cost was not
measured against Cursor itself, only counted against a fake.
2026-10-28 14:38:50 +08:00
yetone fc1457162c cursor 0.2.27: a chat request no longer waits for a model list Cursor can't give
ysm119 on Discord: claude-opus-5-5 through the plugin takes 33-36 s to its
first token on every request. A chat request picks its variant from the
account's model list (AvailableModels, up to 30 s) before it opens its
Run. A list Cursor couldn't give was never kept, so every request asked
for it again and waited for the ask to fail before its Run; a list past
its 10 minutes was waited for again too, and requests at once each asked.

listFor now gives the chat path the list without waiting when it needn't:
a list past its keep is used while a new one is asked for in the
background, requests at once share one ask (listing), and after a failed
ask requests go without the list for 5 minutes (LIST_RETRY), as the first
one did. Only a token with no list and no recent failure waits.
provider.models still fails when Cursor can't list, so magpie keeps its
list.

Measured against a fake Cursor (bun 1.4.2, on mote): with AvailableModels
failing after 3 s, every request's setup was 3003 ms before, re-asked each
time; the plugin's own setup is ~20 ms cold, ~4 ms warm, and stream
chunks reach the client 0-7 ms after the server writes them.

Run: bun test packages/cursor (314 pass, 0 fail) and
bun scripts/check.mjs cursor (ok), on mote.
Broken by hand: on the old index.mjs all three listwait.test.mjs tests
are red; with only answerOf back on usable(), the failed-list and stale-
list tests are red.
Not tried: a real Cursor account (its token is in the Keychain); whether
ysm119's AvailableModels fails or is slow is not confirmed.
2026-10-28 14:38:01 +08:00
yetone 2c30818458 devin 0.1.25: an anyOf beside a type, below a tool's root, goes to Gemini models as a merged branch or a oneOf (#458)
songyq26's Kimi Code Read tool (line_offset: anyOf of two integers) and
any Optional field made every devin/gemini-4-argon request 400 "There is
an issue with this request". The cause is a type beside the anyOf:
magpie's gateway (geminiToolTypes) writes the type the branches agree on
beside an untyped anyOf for a Gemini-named model, and Devin's Gemini
models refuse {type: T, anyOf: [...]} anywhere below the root. An untyped
anyOf, a root anyOf and a oneOf beside a type are taken, which is why the
reporter's matrix showed oneOf as OK.

geminiSchema now changes only an anyOf beside a type, at depth > 0: null
branches become nullable, one branch left of the same type (or none) is
merged into the schema, two or more go as a oneOf (into allOf if a oneOf
is already there). The recursion already reaches properties, items,
additionalProperties and anyOf/oneOf/allOf members, so each gets it.

Run:
- HOME=$(mktemp -d) bun test in packages/devin (on mote): 119 pass, 0 fail.
  bun scripts/check.mjs devin passes.
- Broken by hand: with index.mjs at origin/main, 9 new tests fail
  (8 fixtures incl. kimiRead from the reporter's literal line_offset, and
  the unit test); the 30 others pass.
- Real account, plugin fetch to gemini-4-argon: on 0.1.24, typed anyOf in
  properties / items / of objects and Kimi's line_offset with the
  gateway's type 400; untyped anyOf, root anyOf and typed oneOf 200. With
  this change all 17 probe shapes 200. A first try that turned every
  nested anyOf into a oneOf made {nullable, oneOf} with no type, which
  Devin refused, so untyped anyOf is left as it came.
Not tried: Claude / swe-2 models live (their path is unchanged);
other plugins (grok, qoder, workbuddy, kimi-work) have their own
cleaners for other vendors' rules and don't share geminiSchema.
2026-10-28 13:21:49 +08:00
yetone c2eb8de4f7 codearts 0.2.4: every model is text only, and an image it refuses is a 400
star21321321124 (Discord, magpie 0.1.1818, codearts 0.2.3): DeepSeek V4.1
Flash through a Codex-like agent failed often with "CodeArts: The request
model is not multimodal (InferHub.001001020.406) (502: you can retry your
request)", while CodeArts' own client served it.

Cause: the plugin listed its models with capabilities.input { text: true }
and no image key, and the config hook gave no modalities. magpie's host
reads image as said only when it is a boolean (imageSaid), so every
CodeArts model was "unknown" to magpie: an agent's screenshot or a tool
result's image went upstream as sent, instead of being described by the
Vision model or left out (textOnlyBody). CodeArts then answered
InferHub.001001020.406 inside a 200, which embeddedErrorStatus counted 502,
and magpie told the agent to retry, so it asked again with the same image.

- The config hook declares attachment false and modalities text in, text
  out; provider.models says input.image false (and audio, video, pdf) for
  every listed model. A kind the user's own config says stands. The -vl
  models were already left out of the list.
- InferHub.001001020.406 / "not multimodal" is a 400: inside a 200 (stream
  and folded JSON), and with any HTTP status. foldAnswer's own error now
  goes through embeddedErrorStatus too, instead of a flat 502.

Run (on mote): packages/codearts HOME=$(mktemp -d) bun test, 117 pass;
the whole repo's bun test, 2985 tests 0 fail; bun scripts/check.mjs ok.
Broken by hand: the new tests against origin/main's index.mjs go red, 3
of 3 (the 400 on every path, the text-only declaration, the status map).
Not tried: a real CodeArts account with an image (none here); the exact
body CodeArts sends is taken from the reporter's message (error_code /
error_msg shape as its other embedded errors).
2026-10-28 13:08:49 +08:00
xiaomu 0f0e966402 river 0.1.0: River with your API key, per-account models, efforts and live prices (#390)
packages/river (@magpie-community/opencode-river-auth 0.1.0, provider `river`):
River's OpenAI-compatible inference API with the user's API key. Models come
from GET /v1/models, limits, image input and reasoning efforts come from
docs.river.ai, and live prices come from River's public pricing endpoint
(BOOT_PRICES as the fallback). Unknown ids are text-only. A 401 or 403 marks
the sign-in expired. The usage card says "Pay as you go". It adds River's
rows to registry.json and the README.

River runs open-weight models on its own GPU fleet (river.ai). It is not a
relay of other vendors' APIs.

Run at the reviewed head 751e502, merged onto main c0a0fd1, on mote (Bun 1.4.2):
- HOME=$(mktemp -d) bun test: 2975 pass, 8 skip, 0 fail across 250 files.
- bun test packages/river: 25 pass. bun scripts/check.mjs: ok.
- A probe with a fake fetch built from River's documented shapes and today's
  real /api/public/pricing body (ids GLM-5.3, Kimi-K3, DeepSeek-V4.1-Flash):
  - The rows have the documented limits. GLM-5.3 is text-only, the others take images.
  - Each variant carries { reasoningEffort } with the documented levels.
  - The costs come from the live prices.
  - 401 throws signIn "expired" from models and from usage.
  - A 503 or a network failure keeps the previous list.
  - An empty list replaces the bootstrap rows.
  - A provider the user configured is kept.
  - RiverPlugin is the only exported function.
- Today's docs.river.ai/guides/inference-models and inference-controls
  match LIMITS, IMAGES and VARIANTS.
- An earlier review round (at 233919f) broke the code by hand and saw the
  river tests go red.

Not tried: a live River key (I don't have one; the author ran one).
Known gap: GLM-5.3 (pricing id "GLM-5.3") has no LIMITS or VARIANTS row, so
it lists with unknown limits and no efforts. It is text-only, so this is
safe.
2026-10-28 12:55:32 +08:00
yetone c0a0fd1955 qoder 0.2.45: a free account with no credits shows none left, not nothing
Ariel on Discord: an international free Qoder account signed in fine but
showed no credits. A free account (userType personal_standard, Qoder's
"Experience" plan) has a plan pool of 0 and, until it gets add-on credits,
nothing else. parseUsage drops every pool whose total is 0, so such an
account came out with no window at all and magpie had nothing to show.
Qoder's own client (Qoder.app's buildUsageItemGroups) shows every pool
present, 0/0 included, and counts the account out of credits when what the
pools have left adds up to 0. Now, when no pool gives a window and the plan,
add-on or shared pool reads a total of 0, the account has one "Credits"
window, "0 credits left", used up. A pool that can't be read (a string
total) or no pools at all still say nothing. An account with credits in any
pool is shown as before (the owner's free account: plan 0, add-on 7 / 600,
one Add-on window, unchanged). Same parser for qoder-cn.

Run: HOME=$(mktemp -d) bun test in packages/qoder on mote (299 pass) and
bun scripts/check.mjs qoder (ok).
Broken by hand: the new test against origin/main's index.mjs, red (it reads
no windows).
Read-only real read of the owner's intl account's /sash/api/v2/me/usage
for the envelope's shape (personal_standard, usageType credits, plan 0/0).
Not tried: Ariel's own account; the fixture is the owner's free envelope
with the add-on pool at 0 or absent, since the owner's has add-on credits.
2026-10-28 12:34:33 +08:00
yetone 1fb8d68c99 registry: add Bub (agent-bub)
The plugins page lists Bub, merged in #81. Run on mote: bun scripts/check.mjs all ok, whole bun test (temp HOME) 2949 pass, 0 fail.
2026-10-28 12:32:23 +08:00
GabiandGabyran 51f179057b agent-bub 0.1.0: Bub as a magpie agent plugin (#81)
Adds packages/bub: Bub (bub.build) as a magpie agent plugin. It writes
~/.bub/config.yml with the model as magpie:<provider>/<model> and a
providers.magpie entry (type openai, magpie's /v1, Bub's own key), and
puts the file back when one of Bub's own models is picked or it is turned
off. Needs Bub 0.5.1 or later (bubbuild/bub#343). Plus its row in the
README's Agents table, which is now in alphabetical order.

Reviewed at 4b879fb (2026-10-11), with a real Bub 0.5.1 run against a
sandbox magpie. Since then only merges of main; the PR's own diff from the
merge base is the five files above, packages/bub unchanged since 4b879fb.
It waited only for a first npm publish, which the repo no longer requires
(README: a new plugin merges once its review is done; served from dist).

Run on mote at the merged tree (origin/main 202ec68 + head 13058fe92),
Bun 1.4.2: bun test packages/bub 7 pass; bun scripts/check.mjs all ok;
whole bun test with a temp HOME and TMPDIR 2949 pass, 8 skip, 0 fail.

Co-authored-by: Gabyran <Gabyran@users.noreply.github.com>
2026-10-28 12:31:02 +08:00
yetone 202ec68ffd qoder 0.2.44: a spent plan beside add-on credits left is no account used up (#454)
chansee97's Qoder CN trial had its plan's 300 credits spent and 245 of
1,100 add-on credits used, and Routing read the account as 0% left: each
pool was a window of its own, and routing counts the tightest. Qoder spends
the pools one after another before an account stops (docs.qoder.com/Credits:
soonest to expire first, the plan's before add-on on the same day; teams:
then the organisation's shared add-on credits), and its own envelope's
totalUsagePercentage counts them as one. So when more than one of the plan,
add-on and shared pools holds credits in the same unit, "Total credits" is
what they hold together (545 / 1400 here, 61% left) and the one routing
counts, and each pool is shown beside it set aside, as CodeArts' buckets
are under its total. One pool alone is shown as before. Dedicated packages
are left as they were (no word from Qoder on their order).

Run: bun test in packages/qoder (298 pass) and scripts/check.mjs, on mote.
Broken by hand: the new tests against origin/main's index.mjs, red (#454's
reads 0% left; the rotated-token test's windows differ).
Read-only real read of the owner's Qoder account's /sash/api/v2/me/usage:
plan total 0, add-on 7 / 600, which stays one window, unchanged.
Not tried: a real account with both a plan and add-on credits (the owner's
has no plan credits); the fields are the ones that read returns.
2026-10-28 10:29:31 +08:00
MYCF711andMYCF711 e460dae2f0 workbuddy 0.1.41: a package with no cycle total reads as a wallet balance (#450)
A WorkBuddy package with no CycleTotalCapacity is a prepaid wallet: it is sent as a balance window ("Prepaid credits", magpie#3950), beside the share of packages that have a total. A literal "0" total stays on the old path, so a lapsed package adds nothing; an account with no packages keeps its unknown allowance (no TotalCredits fallback).

Reviewed at 5bdfa9048d66095d35af5e7955d0945db02dc3b5 over four rounds. Run on mote at that head: HOME=$(mktemp -d) bun test packages/workbuddy, 185 pass / 0 fail; bun scripts/check.mjs workbuddy ok. npm had 0.1.40, so 0.1.41 is free.

Co-authored-by: MYCF711 <MYCF711@users.noreply.github.com>
2026-10-28 10:26:47 +08:00
yetone fd40b20c3b qoder 0.2.43: the check-in says when to ask again, as the 10:00 (UTC+8) campaign opens
sdytman on Discord: Qoder's daily credits start at 10:00, can the plugin's
check-in follow it? Qoder's /me/campaigns lists each day's CLAIM_BENEFIT
campaign with startAt 10:00 and endAt 09:59 the next day, both UTC+8
("Daily reset: 10:00 (UTC+8)"), read with a real account at 09:27 CST on
10-28. Qoder.app 0.4.3 polls that list every 5 minutes and treats
startAt <= now < endAt as active; there is no next-time field. A check-in
before 10:00 met yesterday's campaign, and magpie settled for the Beijing
day, so today's campaign waited until tomorrow, or was lost.

checkin now returns until: the next campaign's opening (the later of
endAt and startAt + 1 day, or the next startAt in the gap) plus a minute,
on done, claimed and "not offered yet". All in epoch time, so the
machine's zone doesn't matter; qoder and qoder-cn share the code. magpie
asks again at until once it reads it (yetone/magpie, next release).

Run (mote): checkin-window, native-checkin and checkin tests under
TZ=UTC, Etc/GMT+8 and Asia/Shanghai, 66 pass each; HOME=$(mktemp -d)
bun test, 2938 pass 0 fail 8 skip; bun scripts/check.mjs. A real qoder
account at 09:35 CST: claimed 100, until 2026-10-28T02:01:00Z.
Broken by hand: nextOpens returning endAt only, 11 of 13 checkin-window
tests red; askAgain returning {}, 12 of 13 red.
Not tried: a real Qoder CN account (none here); the server's list in the
09:59-10:00 gap.
2026-10-28 09:37:56 +08:00
yetone ae48bf07f3 qoder 0.2.42: an earlier turn's thinking goes back in reasoning_content, as Qoder's client sends it
The plugin dropped an assistant turn's reasoning from its first version on,
with no stated reason (uk.jent on Discord). Qoder.app's own client
(qoder-agent-sdk's assistant converter) sends reasoning_content on every
earlier assistant turn that had thinking, and Qoder's upstream accepts it.
Now reasoning_content, reasoning or reasoning_details go back on a reply or
a tool-call turn. A blank one (magpie's gateway sends " ") is none, and a
turn with only thinking is still left out, as Qoder's client leaves it.

Run: bun test in packages/qoder (282 pass) and bun scripts/check.mjs, on
mote. Real account (intl, free plan), the plugin's loader with no renewal:
DeepSeek-V4-Pro in a tool loop, its thinking before get_time naming a
codeword, then asked for it: "TANGERINE-5519" with this change, and "no
codeword was picked" on 0.2.41. Every probe was 200; none was refused for
reasoning_content.

Broken by hand: reasoning.test.mjs against 0.2.41's index.mjs, 3 of 6 red
(reply, tool call, reasoning/reasoning_details).

Not tried: across a user turn the models don't recall it on either version
(DeepSeek, GLM-5.3 and Cantus answered "none"; their templates drop thinking
before the last user message, as their own APIs do), so the gain is in tool
loops. Cantus/Sonus get no reasoning_content_signature (magpie has none to
give), and they ignored the thinking without refusing. Qoder CN not tried.
2026-10-28 04:17:48 +08:00
Mañjūṣaka 8022ca23cf history-trim 0.1.0: a middleware that trims repeated and oversized history (#423)
A new middleware package, @magpie-community/middleware-history-trim 0.1.0,
ported from OmniRoute's lite engine (MIT). It makes a request's history
smaller in four steps:

- folds runs of blank lines;
- drops a system prompt whose whole text repeats an earlier one;
- drops a message equal in every field to the one before it (tool results
  excepted);
- cuts a history tool result over maxToolLength at a word boundary.

None of the steps touch the turn being sent (after the last assistant), and
a request with no assistant goes on unchanged. The README states the
prompt-cache cost.

Reviewed at 8af038a60201728f00ee350f56eb35228049baa3, merged locally with
main b2fe48e:
- bun test packages/history-trim: 21 pass.
- On the Mac mini, sandbox HOME under TMPDIR: bun scripts/check.mjs ok; full
  bun test 2919 pass, 8 skip, 0 fail.
- Broken by hand, each turning cases.json red:
  - the current-turn guard in dropRepeatedSystemPrompts;
  - the current-turn guard in dropRepeatedMessages;
  - a 200-char system key;
  - a content-only compare;
  - folding the current turn;
  - the surrogate guard;
  - turnStart returning length with no assistant;
  - the cut's turn guard.
- Probes against the earlier review findings, each now as expected:
  - two system prompts under a shared header both kept;
  - tool_calls assistants that differ both kept;
  - alice and bob kept apart;
  - a patch with trailing spaces left whole;
  - emoji and astral CJK cuts well-formed;
  - the current turn's Anthropic tool_result left whole.
- npm and the dist index have no history-trim package yet, so 0.1.0 is free.

Not run: GitHub CI. The fork's pr workflow is waiting for approval
(action_required); the Mac mini run above stands in for it. No real
upstream request was sent through the middleware.
2026-10-28 03:34:45 +08:00
yetone b2fe48ea2e workbuddy 0.1.40: chats carry the current desktop client's headers
WorkBuddy accounts are being restricted, and a report says WorkBuddy now
checks request-header fingerprints. Diffed the plugin's chat request
against each build's current desktop app, read (never run) from the
update feeds on 2026-10-28:
- China: WorkBuddy 5.9.3.42398134 (copilot.tencent.com/v2/update),
  bundled @genie/agent-cli 2.165.0.
- WorkBuddy AI: 5.8.4.41366630 (www.workbuddy.ai/v2/update), CLI 2.161.0.
The chat is the CLI's OpenAI client (openai 6.25.0) through
axiosToFetchAdapter, with UserAgentHttpInterceptor and the desktop's
CLIENT_INFO_* env (sidecar-manager getCachedBaseEnv).

What differed, and now matches:
- User-Agent: was WorkBuddy/5.5.6; the client sends
  "WorkBuddy/<app> <applicationName>/<app> CLI/<cli>":
  WorkBuddy/5.9.3 WorkBuddy/5.9.3 CLI/2.165.0 (China),
  WorkBuddy/5.8.4 workbuddy-ai/5.8.4 CLI/2.161.0 (AI). The /v3/config
  models call (was CLI/2.0.0 WorkBuddy/5.5.6) takes the same one, as the
  CLI's CloudProductProvider sends it through the same interceptor.
- X-IDE-Version: was 5.5.6; now the app's version.
- X-Agent-Type: main was sent on WorkBuddy AI only; the adapter sets it on
  every model call on both builds.
- X-Agent-Runtime: local-agent, new in 5.9 (the desktop's local transport
  puts agentRuntime local-agent in the prompt meta); China build only,
  5.8.4 has no such header.
- Accept: application/json and the OpenAI SDK's X-Stainless-* (Lang js,
  Package-Version 6.25.0, OS/Arch of this machine, Runtime node,
  Runtime-Version v22.21.1 = Electron 37.10.3's Node, Retry-Count 0,
  Timeout 1200); the adapter strips them only in its skip-auth mode.
- The desktop's own calls (billing, plugin API) send WorkBuddy/<app>;
  they now send the current app version instead of 5.5.6.

Not matched: X-Device-Token (TuringShield native SDK, sent since at
least 5.6.2), traceparent (only while server-side tracing is enabled),
and transport-level differences (Bun's fetch vs axios on Node: header
order, Accept-Encoding).

Run: HOME=$(mktemp -d) bun test packages/workbuddy: 184 pass, 0 fail.
With the old index.mjs the 4 changed tests fail (UA, IDE version,
config UA, the new per-build header test).
Not tried: a real account's chat or /v3/config with the new
User-Agent (unauthenticated /v3/config answers the same for old and new).
No text added names magpie or WorkBuddy's limits.
2026-10-28 03:20:46 +08:00
MYCF711 47cda88fbe registry: add OfficeAce (officeace-auth) (#399)
Adds the OfficeAce entry (officeace-auth, provider officeace, community: true)
to registry.json. Reviewed at 5c61f65965d15f6abf09e2f8bcc91b7d07df670e.

The 10-27 review blocked it on src/self-register.mjs in officeace-auth 0.1.8,
which rewrote magpie's ~/.cache/magpie/plugin-market.json on every load.
officeace-auth 0.1.9 (npm, 2026-10-27T16:24Z) removes it.

What was run:
- npm pack officeace-auth@0.1.9 and @0.1.8, diffed the trees: 0.1.9 drops
  src/self-register.mjs and its call, the `directory` argument and
  REGISTRY_ENTRY; adds CHANGELOG.md and publish-npm.mjs (an author-side
  publish helper, imported by nothing, no install scripts, no dependencies).
- grep over index.mjs and src/: no fs writes, child_process, eval or
  HOME/cache paths. Hosts: auth.huaweicloud.com, sts.cn-north-4.myhuaweicloud.com,
  agentarts.cn-southwest-2.myhuaweicloud.com,
  officeace.cn-southwest-2.huaweicloud-agentarts.com, api.modelarts-maas.com.
- Load probe in a sandbox HOME with a seeded plugin-market.json in
  ~/.cache/magpie and ~/Library/Caches/magpie, fetch stubbed to fail: 0.1.9
  leaves every file's mtime unchanged and makes no request at load; the same
  probe on 0.1.8 changes the cache file (the probe sees the write).
- Merged with origin/main c20fa33: bun scripts/check.mjs exit 0; full
  bun test (HOME under TMPDIR) 2902 pass, 3 skip, 0 fail.

magpie does not auto-update a package outside @magpie-community
(plugin.Official), so an install takes the npm latest at that time.
Not tried: a real Huawei Cloud sign-in.
2026-10-28 00:59:44 +08:00
yetone c20fa331a0 trae 0.2.23: a model whose entry names max (or medium) offers it and sends it (#434)
huajii (#434): Trae's app offers DeepSeek V4.1 Flash at max, the plugin
does not.

Cause: LEVELS knew only light/high/extra_high, so levelsOf dropped any
other option an entry's reasoning_effort_config names, and effortOf never
sent it. Trae's client names five levels (its bundle's
reasoning_effort.{low,medium,high,extra_high,max}, handed out per model by
remote config, per dsh-connect-trae #60's read of the client bundle). An
entry naming max beside the three lost it.

Fix: LEVELS spells medium and max as themselves. They are offered only
for a model whose entry names them, and a model that names none still
sends nothing for them.

Run:
- packages/trae: bun test 215 pass, 0 fail. The two new tests in
  reasoning.test.mjs (levels/variants/chatBody with max and medium; max
  reaching llm_utils_chat through the loader's fetch) were red on the old
  LEVELS line (2 fail, max undefined), green with it.
- HOME=$(mktemp -d) bun test at the repo root: 2902 pass, 3 skip, 0 fail;
  bun scripts/check.mjs: ok.

Not tried: a real Trae account. The wire name "max" in options comes from
the client's i18n keys, not a captured list; on 10-25 a live CN list named
only light/high/extra_high (dsh-connect-trae #60, plugins #300). If Trae's
"max" in the app is the Max mode instead, the plugin's
deepseek-v4.1-flash-max model is that and is unchanged here.
2026-10-28 00:46:08 +08:00
skygunner 214530edad cloudflare-workers-ai: read actual Neurons and keep the quota card toggles
Workers AI usage now reads the day's actual Neurons from Cloudflare's GraphQL analytics, keeps the Used/Left toggle on the quota card, and stops the included free allowance from benching a Paid or unknown plan (`aside`). A 429 with code 3036 gets a Retry-After that runs to the next UTC midnight. Version 0.0.4; dist has 0.0.3, and npm has never had the package.

What was run, at reviewed head 38ddeb132ee6c00698952303fbc4949a84287779:
- `bun test packages/cloudflare-workers-ai` with a sandbox HOME/TMPDIR: 23/23 pass.
- `bun scripts/check.mjs`: ok.
- Merged with origin/main, the whole repo `bun test` with a sandbox HOME: 2900 pass, 3 skip, 0 fail across 245 files.
- Broke code and timing by hand:
  - Removing the `!info.errors?.length` guard turns only the new partial-reply assertion red.
  - A preload that moves Date.now() 700ms forward on every call fails the old (bdc302a) Retry-After test ("26820 vs ~26819"). The new bracketed test passes 3 of 3 under that preload.
- The earlier review at bdc302a covered the rest of the change. That includes nine mutations, each of which turns a test red.

Not tried:
- A real Paid account's billing and inference, as the author says too.
- A fetch call that straddles exactly 00:00:00 UTC. The Retry-After bracket would fail there, but only inside a window a few milliseconds long.
2026-10-28 00:34:58 +08:00
yetone 26502bf93e autoclaw 0.2.9: a history the chat gateway can't read goes put right, not as a bare 500 (#437)
tmuer (plugins#437, Windows 11, autoclaw-cn, zaicoding_glm-5.3, plugin
0.2.8) had one dsh request in 48,799 fail after 65s with AutoClaw's 500
{"message":"parse response failed"}, in 0 / out 0. Sent straight to the
CN gateway with the plugin's headers, each of six body fragments got
that same 500, while a bad model name got 400 "非法模型".

Of the six, those an agent's history can hold are now put right before
the body goes, on both channels (tidyBody):
- a message's null or missing content goes as "";
- an earlier turn's reasoning_content is left off (AutoClaw's own client
  sends none back);
- a tool call's arguments that aren't a string go as their JSON, "{}"
  for none (the call is kept, so its tool result still pairs);
- tools that aren't a non-empty list are left off with tool_choice.
Not changed: an empty messages list (the plugin always puts the system
prompt first, so none reaches the gateway) and a tool schema's
parameters.type (no agent sends "nonsense"; the reporter found every
real schema shape answered 200). $schema and strict stay, as the
reporter's own tests had them answered. max_tokens is still left off:
the gateway turns it away.

Retry on a 500 is magpie's: a plugin's 500 is retryable there
(gateway/fallback.go retryable, status >= 500) and the next member of
the group is asked when there is one. The plugin doesn't retry it.

Run: packages/autoclaw `bun test` (39 pass); `bun scripts/check.mjs`
all green.
Broken by hand: index.mjs at HEAD with the new test: red.
Not tried: the real AutoClaw gateway (no AutoClaw account here); which
of the shapes the reporter's one 65s failure had is not in its record.
2026-10-28 00:04:17 +08:00
yetone 1a560ba618 qoder 0.2.41: a chat carries the headers Qoder's client puts on a chat, not the machine id three times (#443)
unifilitence (plugins#443, Windows 11 x64, qoder.com) captured a chat
going out with the account's machine UUID as Cosy-ClientIp,
Cosy-MachineId and Cosy-MachineToken alike, Cosy-MachineType 5 and
Cosy-MachineOS x86_64_win32, and asked for each to be what Qoder's own
client sends.

Checked against Qoder.app 0.4.3: its worker runtime
(qoder-agent-sdk/dist/_worker) and the auth wasm it embeds, run here
with its own inputs:

- Cosy-MachineOS is `${x64->x86_64, arm64->aarch64, else arch}_${platform}`,
  so x86_64_win32 is Qoder's own value. Only ia32 differed: the plugin
  sent x86_win32, Qoder sends ia32_win32. Fixed.
- Its non-chat calls (prepareRequest) do send ClientIp, MachineId and
  MachineToken all as the machine id, MachineType 5. The listing, usage
  and queue status keep that set.
- A chat (prepareInferRequest, then its header pass) differs: no
  Cosy-ClientIp; MachineToken and MachineType are the native device
  identity's (umid runtime-info) or absent when there is none; and a
  Cosy-MachineHostname, os.hostname() made safe as its zei does
  (punycode, else "-" runs plus a sha256 mark, 96 chars at most). A chat
  now goes so. The identity is one the check-in already read in this
  process (renewed behind the chat after an hour); a chat never runs the
  helper itself, so with no check-in yet it goes without, as Qoder does
  when it has no identity.
- The signed payload's requestId is a dashed UUID in Qoder's signer; the
  plugin sent it undashed. ideVersion "" is Qoder's own.

Left as it was: Accept-Encoding identity on a chat (Qoder sets none;
its fetch's default differs from Bun's anyway).

Run: packages/qoder `bun test` (276 pass, new headers.test.mjs and one
check-in test); `bun scripts/check.mjs` all green. Real qoder.com
account from bun in a sandbox HOME (token not renewed, no auth.set):
qfmodel answered "pong" with the new chat headers, dfmodel queued
(10605, as before), the model list 200.
Broken by hand: index.mjs at HEAD with the new tests: 6 of 7 in
headers.test.mjs and the check-in chat test red.
Not tried: Windows (the hostname and OS values are unit-tested for
it); a chat carrying a real device identity against the live service.
2026-10-28 00:01:31 +08:00
yetone eb54fad5b3 kimi-work 0.1.13: a gone share folder is named, and several Kimi users are served (#444, #440)
#444 (kongbai01203): when the folder daimon-storage.json points to was
moved or deleted, 0.1.12 threw its "sign in again" error with
signIn "expired", so magpie showed "登录已失效" and marked the account,
and signing in again in a running Kimi didn't help. Kimi 3.2.21 makes
<shareDir>/daimon only when it provisions at start, and never falls back
to the default folder while a pointer stands (read from its main
process), so the plugin doesn't fall back either. A missing share folder
is now its own error, kimi_work_share_missing, with signIn "kept": it
names the folder and says to put it back (no new sign-in) or to quit and
reopen Kimi, then sign in to Work. The sign-in callback shows the same
text. A share folder that exists but has no config.json is still the
old missing-sign-in error. The plugin's fetch already fails before any
network call; the ~30s 502 the reporter saw is outside the plugin and
was not looked into here.

#440 (kongbai01203): magpie already keeps a second Kimi user beside the
first (settle tells them apart by uid), but the plugin served only the
user Kimi is signed in to, so the first account failed once Kimi
switched. Kimi 3.2.21 keeps one minted Work key per user in
<daimon>/kimi-code-key.json ({"v":2,"keys":[{userId,apiKey,keyId?}]},
the current user first), keeps an entry when it switches users, reuses
it when it switches back, and drops one only on a 401 (DaimonProvision's
#readKeyStore/#upsertKeyStoreEntry/#resolvePersistedKimiCodeApiKey). An
account Kimi has switched away from now uses its key from that file,
read as Kimi reads it (v 2 only, first entry per user). Its allowance
can't be read (Kimi keeps only the current user's web sign-in), so its
usage card says to switch to it, signIn "kept". No key, or a key the
gateway refuses, is kimi_work_account_not_here, marked signed out. Each
account is named "Kimi Work · <first 6 of its hashed uid>" instead of
the shared "Kimi Work (local)". Not done: rotating between accounts or
falling back on quota, which is magpie's routing, not the plugin's.

Run: bun test in packages/kimi-work (65 pass) and the whole repo with
HOME and TMPDIR in a sandbox under magpie-wt (2879 pass, 3 skip, 3 fail:
cursor upstream-words, commandcode no-magpie and layerfs no-magpie,
which fail because the sandbox path itself contains "magpie"; none of
those packages is touched). bun scripts/check.mjs ok.
Broken by hand: index.mjs at origin/main fails the new share-folder,
reporter's D:\KimiData\daimon-share and two-users tests. In the new
code, dropping the share check reds the two #444 tests; ignoring the
key store reds both #440 tests; taking the last entry per user reds the
key-store test; reading usage for an away account reds the two-users
test.
Not tried: a real Kimi with two users (no Kimi install or Kimi account
on this machine); that a minted key still works server-side after Kimi
switches users is read from Kimi's code (it reuses it after a probe),
not seen. Not tried on Windows.
2026-10-27 23:57:54 +08:00
yetone 2ef8b8b5ef zcode 0.1.33: a ZCode 3.16 sign-in lists its coding plan's models, GLM-5.3 among them (#439)
provider.models read the "as ZCode" sign-in without located(). ZCode
3.16 keeps only where the coding plan key is (project-key-location:v1,
#410), so the state had no key, plansOf took it for a Start Plan
sign-in, and the list was account:zai-start-plan's: GLM-5.3 left out
and delisted, while requests and usage (which call located) worked.
models() now reads the key first, as the request path does. A key that
can't be read throws, so magpie keeps the list it had instead of being
told the Start Plan's.

Reported, with the cause and this fix, by dinghao-8.

Run (TMPDIR/HOME sandboxed, Bun 1.4.2):
- bun test in packages/zcode: 135 pass, 0 fail; bun scripts/check.mjs
  exit 0.
- Broken by hand: the new own.test.mjs case against main's index.mjs
  fails with exactly the reporter's list, [GLM-5.3-Flash, GLM-5.2,
  GLM-5-Turbo].
- npm had 0.1.32; this is 0.1.33.

Not tried: a real ZCode 3.16 account (reading ZCode's credentials needs
the Keychain secret); the reporter ran the same one-line patch end to
end against BigModel.
2026-10-27 23:41:59 +08:00
yetone 7f99447ed2 workbuddy 0.1.39: an earlier turn's reasoning_content goes as reasoning, as WorkBuddy's own client sends it
uk.jent on Discord: Grok Build's chat.completions history lost its
thinking on WorkBuddy. Grok Build 1.0.67 sends an earlier assistant
turn's thinking as reasoning_content; magpie and this plugin pass it
on byte for byte, and WorkBuddy drops it. WorkBuddy's own client
(CodeBuddy's agents converter, applyPendingReasoning) sets `reasoning`
on the assistant message and skips its reasoning_content backfill for
WorkBuddy's own hosts. The chat path now does the same: reasoning_content,
or reasoning_details' text, becomes `reasoning` (one the client set is
kept) and the original fields are left out. Nothing is folded into
content as <think>, since WorkBuddy's client doesn't send it that way.
The Messages route (Claude on the China build) is unchanged.

Run: packages/workbuddy `bun test` with a temp HOME (183 pass);
`bun scripts/check.mjs` all green. Live on www.workbuddy.ai (a real
WorkBuddy AI account, access token only, refresh left out), a codeword
in the earlier turn's thinking, asked for after the tool result:
before, reasoning_content reached no model (0 of ~15 across kimi-k2.6,
kimi-k3, glm-5.3, deepseek-v4.1-flash, minimax-m3) while `reasoning`
did on kimi-k2.6 and minimax-m3; through 0.1.39 a reasoning_content
history reached kimi-k2.6 2 of 8 and minimax-m3 4 of 9, with the
no-thinking control 0 every time. glm-5.3, kimi-k3 and
deepseek-v4.1-flash never quoted it in either spelling.
Broken by hand: index.mjs from origin/main: reasoning.test.mjs 4 of 4
red; with the asReasoning call commented out, its two end-to-end
tests red.
Not tried: the China build (copilot.tencent.com; its desktop sign-in
answered 401), and Grok Build end to end through WorkBuddy (its
request was captured against a fake server). The "thinking loop" the
report names wasn't reproduced; the plugin doesn't touch the reply
stream.
2026-10-27 23:36:41 +08:00
yetone bace91473b codearts 0.2.3: a queued request leaves the queue at once when magpie has another candidate
As Qoder's 0.2.40 (axuhere on X: a free model held in a queue while
another provider could answer). When magpie says another account,
provider or routing group member follows this request
(x-magpie-fallback: 1), a 429 with queue-status: queued isn't polled
for up to 5 minutes: the trace leaves the queue (DELETE, as giving up
does) and the plugin answers 503 with the queue's retry-after,
"CodeArts queued the request; try again in 20s", so magpie asks the
next. The header is read and dropped before anything is signed or sent.
Without it, the wait is as before.

Run: packages/codearts `bun test` (115 pass) and `node --test
index.test.mjs` (115 pass); `bun scripts/check.mjs` all green.
Broken by hand: index.mjs as before: the new test red (it waits in
the queue instead).
Not tried: a real CodeArts account queued live; the 429 headers are
the shape the existing queue tests use.
2026-10-27 18:53:25 +08:00
yetone bc25bc5077 qoder 0.2.40: a queued request gives way at once when magpie has another candidate
axuhere on X sat at "模型请求正在排队 · 预计等待超过 10 分钟" on a free
model while another provider could have answered. Through magpie, a
Qoder free model queued with 10605 was waited out for up to 4 minutes
even when the request had another account, provider or routing group
member after it.

magpie now sends x-magpie-fallback: 1 on a plugin request that isn't
the last candidate (the host keeps it from the vendor). Told so, a
queued request isn't waited out: the 503 with Qoder's Retry-After comes
at once, and magpie asks the next. The message now also says how many
are ahead when Qoder says it ("Qoder queued the request for dfmodel
(this plan's queue: p3, 3 ahead); try again in 30s"). Without the
header, the wait is as before.

Run: packages/qoder `bun test` (268 pass, 22 files); `bun
scripts/check.mjs` all green.
Broken by hand: index.mjs as before with the new tests: the fallback
test and the budget test's message red (2 of 12 in queue.test.mjs).
Not tried: a real Qoder account queued live; the 10605 shape is
testdata/queued-10605.json's, captured before.
2026-10-27 18:53:25 +08:00
yetone b1bc778edf codearts 0.2.2: tool names over 64 characters go cut and unique, and come back as the agent's own (#432)
CodeArts turned away ZCode's android emulator MCP tool,
mcp__plugin_android-emulator_android-emulator__android_discover_project
(71 characters), with "Function name [...] length over limit, maximum
is 64 (InferHub.001001017.413)", so every ZCode chat with that MCP on
failed.

A name over 64 now goes as magpie's FlatName cuts one: its first 55
characters, "_" and 8 hex of its SHA-256 (64 in all). It is cut in
every place the body names a tool: tools, functions, tool_choice,
function_call, the history's tool_calls and a tool message's name, so
the history keeps matching its tool on every turn. A cut that equals
another tool's own name, or another cut, is cut again with a salt. The
answer gets the agent's names back: in a folded (non-streaming) reply
and in the stream, where a name the gateway sends whole, repeated in a
later delta, or in pieces (the part past 55 held until the name is
whole) is put back. Events that name no cut tool pass byte for byte,
and a body whose names all fit is not touched at all.

Run: packages/codearts `bun test` (114 pass) and `node --test
index.test.mjs` (114 pass); `bun scripts/check.mjs` all green. New tests
use the reporter's literal tool name, two names alike for 55
characters, a short tool named exactly like a long one's cut, a stream
round trip through the loader's fetch (whole name, name in three pieces
across the 55th character, a name that fits), a gateway repeating the
name, and a folded reply.
Broken by hand: restoreToolNamesInStream returning the stream as it
came (stream and repeat tests red); no salt on a collision (collision
test red); no shortening in prepareChatBody (4 tests red).
Not tried: a real CodeArts account (its refresh token is single-use, so
no live sign-in was copied into a sandbox); whether CodeArts ever sends
a tool name in pieces (handled, not seen).
2026-10-27 17:38:33 +08:00
yetone ceda580080 kiro 0.1.18: an image over Kiro's 5 MiB Base64 limit is shrunk on the request, or replaced by a note (#428)
imwaco (#428): in Codex -> magpie -> Kiro, view_image returned a PNG of
4,171,428 bytes, 5,561,904 as Base64, and Kiro answered
  messages.130.content.2.image.source.base64: image exceeds 5 MB maximum:
  5561904 bytes > 5242880 bytes (IMAGE_SIZE_EXCEEDED)
on that turn and on every later one, text-only ones too, as the image
stays in history. The limit is on the Base64 string: 5561904 is that
image's Base64 length, not its file size, so the largest file that fits is
3,932,160 bytes. kiro-cli's own gate is 10 MB of raw file
(MAX_IMAGE_SIZE, aws/amazon-q-developer-cli chat/consts.rs), the gap
kirodotdev/Kiro#11497 describes.

buildKiro's conversation is now built as an object (kiroRequest) and,
after the latest-image selection, kiroBody fits every image left in it,
user images and tool images in history alike, on the plugin's own copy:
- an image at or under 5,242,880 Base64 characters is sent byte for byte;
- one over it is decoded with Bun.Image (Bun 1.4's built-in libspng /
  libjpeg-turbo / libwebp, no new dependency; magpie's host and OpenCode
  2.0.25 both run Bun 1.4.2) and tried, in order: its own kind with the
  long edge at most 2000 px, then WebP (keeps alpha) or JPEG for a JPEG,
  q80, then 0.7x smaller at q75 down to 256 px, until it fits;
- bounds: 50M pixels (a header claiming more is refused before decoding),
  64 MB of Base64 looked at, 30 s per image; one image is worked once per
  sha256 (in-flight shared, 4 kept);
- one that can't be read, has too many pixels, can't be brought under, or
  a host without Bun.Image: the image is left out and a one-line note
  takes its place in that message's text, so the turn still goes.
History, entry count, tool pairing and image order are unchanged.

Run:
- HOME=$(mktemp -d) bun test packages/kiro: 67 pass (image-size.test.mjs
  new, 10 tests); the same under OpenCode 2.0.25's Bun (BUN_BE_BUN=1
  opencode test packages/kiro): 67 pass. bun scripts/check.mjs kiro: ok.
- Fixtures are built in the test: a 1389x1000 noise PNG padded to exactly
  4,171,428 bytes (5,561,904 Base64), PNGs at 3,932,159 / 3,932,160 /
  3,932,161 bytes (Base64 5,242,880 with "=", 5,242,880, 5,242,884), a
  20000x20000 header bomb and 4 MB of junk.
- Full HOME=$(mktemp -d) bun test at 18268848: 2851 pass, 1 fail:
  layerfs "item 3: an import over the file limit" timed out at its 30 s
  bar (46 s) writing 20,001 files at load ~40; it fails alone too at this
  load, and the kiro change doesn't reach layerfs.
Broken by hand: kiroBody without fitImages: 7 of 10 fail; no cache: the
once-per-image test fails; `<` for `<=` at the limit: the boundary test
fails.
Not tried: a real Kiro account (none in a sandbox; no live sign-in read);
an animated GIF over the limit (Bun decodes its first frame only).
2026-10-27 17:27:57 +08:00
yetone 18268848d3 workbuddy 0.1.38: a "Free models only" switch that never spends credits (#430)
kongbai01203 asked for a hard stop on WorkBuddy credits: use only the free
models, and never let a paid one through by mistake.

Each site (workbuddy, workbuddy-ai) now declares a magpie plugin option,
free_only, "Free models only", off by default. With it on:
- models() lists only the models priced free now (priceOf: a model free only
  at night, or one with no price, is paid). A list that can't be read, or an
  API key WorkBuddy lists no prices for, is a failure, not the built-in list.
- fetch reads the model from the body and, unless /v3/config lists it as
  free, answers 404 model_not_found itself and sends nothing. The message
  has no quota words, so magpie's gateway rests that model only and falls
  through, not the account. A price list that can't be read answers 503 and
  sends nothing. The list is kept a minute per account for requests.
Off, nothing changes: the config isn't read on a request.

Run:
- HOME=$(mktemp -d) bun test packages/workbuddy: 179 pass (freeonly.test.mjs
  new, both sites); bun scripts/check.mjs: ok.
- Real accounts, sandbox magpie (HOME under the scratchpad, magpie
  wb-free-only branch, this package added by path): with the switch on for
  workbuddy-ai the list went 26 -> 2 (hy3, deepseek-v4.1-flash) within 2s,
  workbuddy (own switch) stayed at 19; gpt-5.4 got the 404 with nothing
  sent, hy3 and deepseek-v4.1-flash answered. Off: 26 again, gpt-6-luna and
  gpt-5.4 answered (no rest left on gpt-5.4).
Broken by hand: without the fetch check 4 tests fail; with onlyFree
returning every model 2 fail.
Not tried: the GUI switch itself (set through /api/settings/plugin-option);
the workbuddy (China) site's switch with a real request; Responses or
Anthropic bodies against the real API (the model is read the same way).
2026-10-27 17:26:51 +08:00
yetone a379c54b17 qoder 0.2.39: a queued call's stream is closed, and its resend is a new request in the same set (#427)
Peterpig (#427, qoder.com, personal_standard, magpie 0.1.1709, plugin
0.2.38): both free models, qfmodel and dfmodel, fail every test with
"context deadline exceeded". Reproduced with the owner's real qoder.com
account and the plugin driven straight from bun (sandbox HOME, its live
token unrenewed): the free models are queued intermittently with
10605 {"isQueued":true,"queueType":"p3","subCode":"RESOURCE_LIMIT",
"serviceAvailable":false,"retryAfterSeconds":30,"waitTime":30}. A
status ask 30s later says isQueued false, the resend is sometimes queued
again, and the answer comes 38s to 71s after the request. magpie's test
waits 20s, so a queued free model is "context deadline exceeded" there
whatever the plugin does; that is Qoder's queue, not the network.

Two things the plugin did differently from Qoder's client
(qoder-agent-sdk worker in Qoder.app 0.4.3, the [ModelQueue] path):

- Qoder keeps a 10605 stream open after its one event. The plugin read
  that event and left the stream open through the wait and the resend
  (seen held to the 170s abort on the real account). The refused call's
  fetch now has its own AbortController, aborted once the call is read
  as refused.
- The client gives every resend a new request_id and chat_record_id
  (o4i) under the same request_set_id, and asks the queue with the
  latest request_id. The plugin sent the same request_id again. It now
  does as the client does. Not shown to matter: with the old code a
  resend was answered once and queued again in other runs, as with the
  new code, so the queue looks load-driven either way.

Run at this tree (base c25201d):
- bun test in packages/qoder: 267 pass, 0 fail.
- queue.test.mjs against the old index.mjs: the two changed/new tests
  fail (resend's request_id, refused stream not aborted); 9 others pass.
- HOME=$(mktemp -d) bun test at the repo root: 2841 pass, 3 skip,
  1 fail: layerfs "item 3: an import over the file limit is refused"
  timed out (73s against its 30s bar, also alone, load 15-45 on this
  box); this change touches no layerfs file. Not filed.
- bun scripts/check.mjs: ok.
- Real qoder.com account, qfmodel, stream: new code queued twice, then
  answered at 71s, both refused streams aborted at once. Old code:
  queued, answered on the first resend at 38s, its refused stream held
  open until the 170s abort; in two other old runs the resend was
  queued again until the 60s abort.

Not tried: #389's Windows Clash Verge system proxy (ECONNRESET); this
does not touch it. Qoder CN, QwenWork: same code path, not run live.
2026-10-27 17:25:28 +08:00
yetone df4dfcd8f7 cursor 0.2.26: a picker model whose usable id is its other family goes as that id
ysm119 on Discord, after 0.2.25: claude-haiku-5-5-thinking still failed
its Test with no answer. A Team account's picker can have Claude Haiku 5.5
with thinking as its default, while cursor-agent models lists Haiku only
as claude-haiku-5-5 (no thinking). modelsOf looked up the usable ids of
the default's family alone, found none, and every Haiku id went out as a
picker variant (claude-haiku-5-5-thinking-high, -low, ...) the account
doesn't have. modelsOf now falls back to the same model's family with
thinking or without it, so each variant id goes as the id the account
lists.

Run: bun test packages/cursor (311 pass, 0 fail) and
bun scripts/check.mjs cursor (ok), in a sandbox HOME.
Broken by hand: with the fam lookup back to the default's family only,
the new context.test.mjs test is red (17 pass, 1 fail).
Not tried: a real Team account whose list has Haiku without thinking;
the owner's Cursor account doesn't show this shape. The fixture is
built from the report's ids, not captured bytes.
2026-10-27 17:06:02 +08:00
yetone cb776e2ebb cursor 0.2.25: a tiered family is named without its tier; a thinking id runs on the model without it
Reported by ysm119 (magpie Discord, 10-27, after 0.2.24): on the Team
account the Cursor list showed "Claude Opus 5 1M Medium Thinking",
"Claude Opus 4.7 1M Medium Thinking", "Claude Sonnet 4.6 1M Thinking",
"Claude Haiku 5.5" and so on, read as one fixed tier each ("没法设置模型
档位"), and the picked claude-haiku-5-5-thinking failed its test.

Cause:
- usableTitle (0.2.24) dropped effort words only at the end of Cursor's
  name, so a name with "Thinking" or "(NO ZDR)" after the tier kept
  "1M Medium". The entry already had the family's efforts as variants
  (magpie's reasoning levels); only its name said Medium.
- claude-haiku-5-5-thinking is an id 0.1.x listed and is still in the
  reporter's picks. When the account's list has no Haiku 5.5 with
  thinking, named() found no family and the id went to Cursor as it was:
  "AI Model Not Found".

Now:
- A usable-only family's name drops its default id's effort phrase, Fast
  and 1M wherever Cursor puts them, and keeps words of the model's name
  (GPT-5.1 Codex Max stays Max).
- An id with no family of its own runs on the same model with thinking
  toggled (usable-only family or picker variants), at the id's effort,
  before it would be sent as named.

Run:
- bun test packages/cursor: 310 pass, 0 fail; bun scripts/check.mjs
  cursor ok.
- Three new tests in context.test.mjs, built on the reporter's literal
  names; all three fail on 0.2.24's index.mjs (names kept "1M Medium",
  claude-haiku-5-5-thinking sent as is, a picker thinking-only Haiku
  asked as claude-haiku-5-5-low).

Not tried: the reporter's real Team list (their ids weren't sent; the
tests use Cursor's id pattern, claude-opus-5-thinking-high, for their
names), any real Cursor request, magpie end to end. A family whose ids
carry a suffix after the effort (the "(NO ZDR)" Fable, id unknown) may
still list one entry per tier.
2026-10-27 16:29:39 +08:00
Kurt Lee 67407cf00f copilot 0.1.0: GitHub Copilot with premium request and credit quota (#411)
New package @magpie-community/opencode-copilot-auth 0.1.0 (provider id
github-copilot), from kurtleee. It adapts opencode-copilot-auth 0.0.12 (MIT):
GitHub.com and GHE.com device sign-in, Copilot token renewal, request
signing with initiator and vision headers. Client versions match magpie's
native Copilot (vscode/1.140.0, copilot-chat/0.68.0). Host headers are
read as a Headers object, which is how magpie's host.js passes them. When the
sign-in isn't OAuth, the request goes on to plain fetch.

It adds magpie's auth.usage hook. The hook reads GET
api.<host>/copilot_internal/user with the GitHub OAuth token
(redirect: "error", 15s timeout) and turns the reply into windows the way
magpie's built-in Copilot reader does. It reads only the chat, completions
and premium_interactions snapshots. Credits are fractional, and string
counters are accepted. An exhausted unlimited pool counts as 100% used.
Managed seats block when spent, and personal seats with overage are aside.
credits_used is never divided by the entitlement. An unlimited pool's
credits_used goes in the display, aside and with no limit. Data that can't
be read is unknown, and only HTTP 401 expires the sign-in.

Run at head c7fb3abd, merged onto main 6a2ade35 (Bun 1.4.2, sandbox HOME
and TMPDIR, HTTP(S)_PROXY pointed at a closed port):
- packages/copilot bun test: 40 pass, 0 fail. Full repo bun test: 2838
  pass, 3 skip, 0 fail. bun scripts/check.mjs: all ok.
- A probe sent fetch to a local Bun server, using magpie's real Copilot
  quota bytes (internal/provider/copilot_usage_test.go). Max token billing:
  "0.1 / 20,000 credits used". Enterprise pool spent: 100%, blocking. Pro in
  overage: 300/300, aside. 401: signIn expired. A GHE sign-in reads
  api.<host>. The loader with a host-style Headers object renewed through
  v2/token with Bearer <oauth>. The chat request went out with content-type,
  accept and the extra header kept. Incoming authorization and x-api-key
  were replaced. Vision and X-Initiator were set, and the renewed token was
  saved under github-copilot.
- PR CI (approved at c7fb3abd): test and on-npm pass.

Not tried: a real GitHub or Enterprise account. Not changed: the device
flow treats slow_down as a failure. This comes from upstream.
2026-10-27 16:04:15 +08:00
wang2 6a2ade35ef search1api 0.1.1: Magpie attribution, reused OAuth client, send_feedback through Search1API (#424)
search1api 0.1.1 (fatwang2):
- Sign-ins carry utm_source=magpie and API requests send User-Agent search1api-magpie/0.1.1.
- The registered public OAuth client and its loopback port are saved in search1api-oauth-client.json (mode 600) and reused. A busy port, another issuer, or a sign-in that doesn't finish leads to a new registration.
- A send_feedback tool posts to Search1API's own POST /feedback with the caller's credential, on the same request path as the other tools, including the OAuth refresh on 401. Its description lists what is sent (message, intent, category, request_id, model) and says Search1API stores it on agentback.app, linked to the signed-in account. The plugin contacts no other host. A report that can't be sent returns a note and doesn't fail the task.

Run at the reviewed head d48c8c8 (sandbox HOME/TMPDIR, Bun 1.4.2):
- bun test packages/search1api/tests: 23 pass, 0 fail
- bun scripts/check.mjs search1api: ok
- PR CI (test, on-npm): pass
- grep of the package: the only host is api.search1api.com (plus 127.0.0.1 for the callback). No hard-coded keys. agentback.app appears only in the description, the README and a test.
- Drove the built plugin against my own loopback fake API:
  - OAuth access revoked (401): POST /feedback with the old bearer, then /token refresh_token, then POST /feedback with the new bearer. Got "Feedback recorded (fb_1)" and auth.set with the new token.
  - Bad API key: a 401 gives "not recorded ... (401)" with no refresh, and the error body is not echoed.
  - Body is exactly {message, intent, category, request_id, agent:{name:"Magpie", model}}, with UA search1api-magpie/0.1.1.
  - Unknown args and a non-string model are refused before any request.
- An unauthenticated probe of the real api.search1api.com: POST /feedback gives 401, and an unknown path gives 404. So the endpoint exists.
- The OAuth client reuse (unchanged since 95f236f) was run by hand in the previous review.

Not tried: a real Search1API account (none available).
2026-10-27 15:44:05 +08:00
yetone a9779ef864 kimi-work 0.1.12, kimi-desktop 0.1.4: Kimi's sign-in is read where daimon-storage.json points (#425)
Kimi 3.2.21 on Windows, installed on another drive than %APPDATA%'s,
keeps daimon-share at <install drive>\KimiData\daimon-share and writes
%APPDATA%\kimi-desktop\daimon-storage.json ({"version":1,"shareDir":...})
to point there. It writes the same pointer on any system when the user
moves its storage. Both packages read only
%APPDATA%\kimi-desktop\daimon-share, so the sign-in was "not found".

Read from Kimi's own code: Kimi-Setup-3.2.21.exe's app.asar,
out/main/index.js (string table decoded): the shareDir getter is
readPointer(userData) ?? join(userData, "daimon-share"); the pointer
reader takes an absolute shareDir and otherwise the default; the
"install-drive seed" writes the pointer on win32 when installRoot's drive
differs from userData's; driveDataDirName is "KimiData".

Both packages now follow the pointer the same way (unreadable, non-JSON
or non-absolute -> default, as Kimi does). kimi-work's sign-in failure
names the file it looked for, and a failed Work check (network, HTTP)
no longer says no sign-in was found.

Run at this tree (base fc2866f):
- Windows 11 box: installed Kimi 3.2.21 silently to D:\Kimi425, launched
  it once (no sign-in): it wrote daimon-storage.json with shareDir
  D:\KimiData\daimon-share and no daimon-share under %APPDATA%. Under
  bun 1.4.2 there the new desktopFile() is
  D:\KimiData\daimon-share\daimon\config.json; 0.1.11's path does not
  exist. Kimi uninstalled and its folders removed afterwards.
- New tests force win32, darwin and linux paths (tests/desktop-path.test.mjs,
  kimi-desktop/kimi-dir.test.mjs). Broken by hand (pointer ignored):
  3 of 6 kimi-work tests red.
- TMPDIR/HOME sandbox `bun test`: 2791 pass, 3 skip, 0 fail;
  `bun scripts/check.mjs`: ok.

Not tried: a signed-in Kimi on the other drive (no credentials were
entered), so a real Work request from D:\KimiData is untested. The
kimi-desktop adapter reads the folder once when it starts; storage moved
while it runs is seen on the next start.
2026-10-27 15:14:11 +08:00
yetone fc2866fc9e cursor 0.2.24: a family only cursor-agent lists runs as its usable ids
Reported by ysm119 (magpie Discord): on a Cursor Team account,
`magpie claude cursor/claude-opus-5-5@1m` waited and then failed with
"AI Model Not Found", and `cursor/claude-opus-5-5` the same, while
`cursor-agent models` lists claude-opus-5-5-low, -medium, -high, -xhigh,
-max (and -fast of each), and `cursor/claude-opus-5-5-low` works.

Cause: when the account's AvailableModels picker lacks a model (or a
picker model has no variant the account can use), the plugin sent the
family id or the literal `@<size>` id upstream, which Cursor doesn't know.

Now:
- A family GetUsableModels lists and the picker doesn't is listed once
  under its family id with its efforts, and a request goes as the usable
  id the effort and fast pick (claude-opus-5-5 + low -> claude-opus-5-5-low).
- A picker model whose chosen variant isn't usable goes as its family's
  nearest usable id.
- An `@<size>` id the list no longer has runs at the model's nearest
  size, in Max Mode past the model's window.
An account whose picker covers every usable id lists and sends as before.

Run:
- bun test packages/cursor: 307 pass, 0 fail; bun scripts/check.mjs cursor ok.
- Four new tests in context.test.mjs built on the reporter's literal ids
  (claude-opus-5-5-low ... -max-fast, "Claude Opus 5.5 1M Low").
- Broken by hand: the three tests for the new behaviour fail on 0.2.23's
  index.mjs; the "covered picker lists as before" test passes on both.
- Real account (owner's, read-only token): with claude-opus-5-5 dropped
  from the real AvailableModels reply, 0.2.23 sends "claude-opus-5-5@1m"
  and "claude-opus-5-5" and gets Cursor's 502 "AI Model Not Found: Model
  name is not valid", the reporter's error. 0.2.24 sends a usable id and
  Cursor takes the model (429 weekly limit on this account for Opus 5.5).
  Dropping grok-4.7 the same way: grok-4.7@500k, grok-4.7 and grok-4.7-low
  answer 200 on 0.2.24; grok-4.7@500k is 502 Not Found on 0.2.23. With
  the real, unmodified picker: grok-4.7@256k and composer-2.5 answer 200.

Not tried: a Team account (the reporter's), an Opus 5.5 reply that
succeeds (this account's weekly quota is spent), magpie end to end.
2026-10-27 14:37:11 +08:00
yetone 9c886c12f9 zcode: a cap that outlasts the waits still rests the account, the README says
#395's README said busyAnswer lets magpie "move that request along
instead of resting the account". It doesn't: on magpie origin/main
e7173958e, failure(429, body) reads both ZCode's bare
{"code":3008,"msg":"user concurrency limit exceeded"} and busyAnswer's
rewording of it as "rate", so the account rests and the request falls
to the next group member, as before #395. The retry and the declared
maxConcurrency are what keep the cap from reaching magpie; the README
now says so. README only, no version change.

Run: the probe above (a throwaway test in magpie's internal/gateway,
removed); bun scripts/check.mjs zcode ok.
2026-10-27 11:21:35 +08:00
ANDY-JK 8b21033daa zcode 0.1.32: a plan's cap refusal is asked again, with no gate of the plugin's own (#395)
ZCode answers 429 with code 3008 "user concurrency limit exceeded" or
3009 "model concurrency limit exceeded" when one account has more in
flight than its plan serves. Such a refusal is now asked again, the same
bytes, after 250ms, 500, 900, 1600, 2800 and 4000 (jittered); one that
outlasts the waits goes on as a 429 with ZCode's words and what they
mean (busyAnswer). spentUp no longer counts 3008/3009 as a spent gift.
maxConcurrency: 3 is declared on the auth hook and as
magpie.maxConcurrency, as a default magpie's per-account queue applies
and a user can raise; the plugin keeps no gate of its own.

By ANDY-JK. Reviewed at 8dc0b8dade49001b3a0e89b5e26fd674e8657694, applied
onto main bf8faa2 (no zcode change on main since the branch's base):
- TMPDIR/HOME sandboxed, Bun 1.4.2: bun test in packages/zcode, 134 pass,
  0 fail; bun scripts/check.mjs exit 0.
- PR CI (pull_request run 40323330525, merge ref): test and on-npm green.
- Broken by hand: busy() out of spentUp fails "the cap's own codes are
  not a gift spent"; cap forced false fails the retry and outlasts-the-
  waits tests; busyAnswer replaced by the plain body fails the latter;
  concurrency.test.mjs against main's index.mjs fails at import.
- magpie origin/main e7173958e: host.js concurrencyOf reads both
  declared sites. failure() reads the cap refusal as "rate" both before
  and after busyAnswer, so a cap that outlasts the waits still rests the
  account a minute as before; the README's "instead of resting the
  account" is corrected in a follow-up.
- npm had 0.1.31; this is 0.1.32.

Not tried: a real ZCode account (the author measured one Z.ai gift-plan
account through magpie's gateway, numbers on the PR).
2026-10-27 11:20:36 +08:00
zhigangYIandzhigangYI bf8faa2f17 kilo 0.1.0: Kilo Code on magpie's Agents page (#90)
New package @magpie-community/agent-kilo 0.1.0 (gangoogle, #90): Kilo Code on magpie's Agents page. connect writes one key, provider.magpie, into ~/.config/kilo/kilo.jsonc: @ai-sdk/openai-compatible at the gateway's /v1, every model magpie offers Kilo with tool_call, the model's own reasoning levels as variants (weakest first, {} when it has none), image input only for a model magpie says takes images, and limit only when the window is known. Library: AGENTS.md, kilo.jsonc mcp (opencode format), skills under ~/.config/kilo. The branch had main merged in (README agent table and registry.json conflicts, both sides kept).

What was run, at 601d2de56c38fe3cc430919d73502dfd96b3b8d8 (b67360c merged with main 10ebbb3):
- HOME=$(mktemp -d) bun test: 2770 pass, 0 fail (packages/kilo 10 pass). bun scripts/check.mjs: clean. PR workflow (test, check, on-npm) green on run 40432034838.
- magpie built from main 65ee8c65c, sandbox HOME, gateway on 3481, one custom provider fakeup whose upstream is a local fake logging every request: fake-chat (context 128000, output 16000, levels stored max,high), fake-vision (64000, vision on), fake-plain (nothing known).
- magpie plugin add packages/kilo, magpie kilo magpie/fakeup/fake-chat on a kilo.jsonc with a comment, $schema, theme, model and a provider of its own: all kept. fake-plain has no limit; fake-chat's variants are high, max.
- @kilocode/cli 7.8.18: kilo models magpie --verbose lists fake-chat with variants [high, max], the other two {}. kilo run --variant=max with a read tool call: the request reached the upstream at /v1/chat/completions with reasoning_effort max and 23 tools, the read went round trip (the file's text came back in the tool message) and the final reply printed. On fake-plain no reasoning_effort was sent. magpie usage counts the calls under agent Kilo Code (ua).
- magpie kilo default after on, a model switch and a turn: kilo.jsonc byte for byte as before (taken after Kilo's own one-time permission migration, which Kilo writes into the file on its first run).

Not tried: a real vision model (every model got image input here because magpie on main describes images for models that don't take them), the VS Code extension at 7.8.18 (the 7.8.8 extension was checked in review), the Library paths with a real Kilo. Found on the way, not this package's: turning an agent plugin off or removing it leaves the agent on magpie with no way back from magpie, for every agent plugin (yetone/magpie#3810).

Co-authored-by: zhigangYI <19320303+gangoogle@users.noreply.github.com>
2026-10-27 09:27:33 +08:00
yetone 10ebbb3fc3 magpie-setup: subagents get their own model through magpie's settings
Myi3i4 on X asked whether the setup skill covers this: asking Codex to put a
subagent on a model works only sometimes. magpie already pins every Codex
subagent to one model or group whatever the lead names (subagent_model), and
Claude Code's subagents too; the skill now says so.

Run: each command in the new block ran against magpie built from magpie
origin/main 4ad… in a sandbox HOME (ollama provider with two models typed in):
codex subagent_model <model>, group/<id>, default, subagent_effort low and
claude subagent <model> each printed ✓ and wrote the setting.
Not tried: a real Codex subagent request through the gateway.
2026-10-27 04:43:48 +08:00
yetone 4bde462e21 workbuddy 0.1.37: sign in with an API key (#407)
Both builds offer "<build> API key" beside the browser and desktop
sign-ins, for a key made on the build's keys page
(www.workbuddy.cn/profile/keys, www.workbuddy.ai/profile/keys).

A key is sent as WorkBuddy's own CLI sends CODEBUDDY_API_KEY
(@tencent-ai/codebuddy-code 2.177.0, read as data): its API-key
session has the key as the access token, uid "anonymous_" + the key's
last 8 characters, personal, no domain, no enterprise; model requests
carry X-API-Key: <key> and Authorization: Bearer <key>
(getCustomHeaders). So a key's chat has those, X-User-Id
anonymous_<last8>, no X-Domain, and the client headers the other
sign-ins send, to the same host: copilot.tencent.com/v2 for workbuddy
(the CLI's endpoint for CODEBUDDY_INTERNET_ENVIRONMENT=internal; it
treats www.workbuddy.cn and copilot.tencent.com as front doors of one
API) and www.workbuddy.ai/v2 for workbuddy-ai.

The loader's apiKey "" and x-api-key delete stay: they keep the SDK's
own (empty) key headers off; sign() now sets X-API-Key itself for a
key account and never for an OAuth one.

- Models: /v3/config is asked with a key only for ck_/pt_ keys, as the
  CLI's shouldLoadRemoteConfig does; any other key keeps the built-in
  list.
- Usage: a key's card says the credits are unknown and asks nothing
  (the CLI reads no credits with a key; no endpoint guessed).
- A 401 on a key is never renewed or resent: it says the key was
  refused and where to check it, marked expired only on
  invalid_token. The >2 MiB reset probe doesn't ask the billing API
  with a key.

Run at this tree (base ac11dcb):
- apikey.test.mjs: 12 pass; against the old index.mjs 10 fail, the 2
  OAuth-unchanged tests pass.
- packages/workbuddy: HOME=<tmp> bun test, 167 pass 0 fail.
- repo: HOME=$(mktemp -d) bun test, 2760 pass 3 skip 0 fail;
  bun scripts/check.mjs exit 0.

Not tried: a real WorkBuddy API key.
2026-10-27 04:41:57 +08:00
yetone ac11dcbb92 antigravity-cloak 0.1.2: Hermes Agent's earlier persona is broken too
Antigravity answers "Hermes Agent, an intelligent AI assistant created by
Nous Research" (Hermes' earlier default SOUL.md, which a SOUL.md the user
edited keeps) with the same fake 429 "Resource has been exhausted" (zgoodz
on X, 10-27: "antigravity在Hermes里一样429"). Hermes' current default
persona goes through. The line joins the words broken with a zero-width
space, after its H: "Y​ou are Hermes Agent, an intelligent ..." still
fails on a real account, while "H​ermes Agent, an intelligent ..."
goes through.

magpie v0.1.1641 breaks the same lines on an Antigravity account by
itself (`magpie provider set antigravity prompt=as-written` turns it off);
the README says so, and that this middleware then adds only extraWords.

Run:
- bun test packages/antigravity-cloak: 15 pass, 0 fail (new case: Hermes'
  old persona in a chat system message, broken after its H; the current
  "You are Hermes Agent, built by Nous Research." stays). With the word
  taken out: 14 pass, 1 fail.
- bun test scripts/check.test.mjs: 3 pass.
- Real Antigravity account through a sandbox magpie: the line whole is
  refused; broken after its H, 200; real Hermes Agent with the old persona
  answered through magpie's own break (magpie-side, same rule).
Not tried: this plugin installed in a running magpie on a real account.
2026-10-27 04:17:17 +08:00
yetone a52d1b370b antigravity-cloak 0.1.1: Codex's GPT-5 prompt is broken too
Antigravity answers "You are Codex, an agent based on GPT-5" and "You are
Codex, a coding agent based on GPT-5" in the system instruction with the
same fake 429 "Resource has been exhausted" it gives Claude Code's prompt.
A Codex thread begun on a GPT model keeps that prompt after /model,
resume -m or a fork onto an Antigravity model, so such a thread never got
an answer (Jodiezzzzzz on X, 10-27; magpie now tells it as a 400 with a
hint). The two lines join the words broken with a zero-width space.

Run:
- bun test packages/antigravity-cloak: 14 pass, 0 fail (two new cases:
  a switched thread's developer message, the coding-agent wording in
  lower case; magpie's own "You are Codex, based on GPT-5." stays).
- bun test scripts/check.test.mjs: 3 pass.
- On a real Antigravity account through a sandbox magpie: both lines
  whole get 429 (magpie's 400); "Y​ou are Codex, an agent based on
  GPT-5" and "Y​ou are Codex, a coding agent based on GPT-5" get 200.
- npm had 0.1.0; this is 0.1.1.
Not tried: the plugin installed in a running magpie on a real account.
2026-10-27 00:41:44 +08:00