Commit Graph
960 Commits
Author SHA1 Message Date
Changtian Li bc5b8332ec kimi-desktop 0.1.6: per-role reasoning effort and context input budget (#813)
kimi-desktop 0.1.6: separate reasoning effort and an optional context input budget for the primary and secondary roles.

The change (f07e7f4a..1d14a185, since the round-6 approval):
- The settings page and API save `<role>ReasoningEffort` and `<role>ContextTokens` for each role. Only efforts and context limits the catalog publishes are offered; an unknown limit allows no custom budget.
- Inference drops Kimi's top-level `thinking`, `reasoning` and `reasoning_effort`, and sends the chosen effort, or none for the provider default. Kimi's native menu aliases no longer choose the model.
- A custom budget counts a copy of the request through magpie's `/v1/messages/count_tokens`. Over the budget gives 400 `context_length_exceeded`; a failed count gives fixed 503 `context_count_unavailable`. No generation is sent in either case. Without a budget, nothing extra is sent.
- Role-scoped worker profiles (`v2:[model, role]`) tell primary from secondary even on the same model. Older roleless profiles keep their binding and use defaults.
- 1d14a185 removes blank lines only.

Run at 1d14a1859f63fd4bb512d492d1de419ad3e6c79a on mote (macOS, Bun 1.4.2, HOME/TMPDIR/XDG in the run's own folder):
- `bun test` in packages/kimi-desktop: 626 pass, 0 fail, 29 files.
- `bun scripts/check.mjs kimi-desktop`: exit 0.
- 14 hand breaks, each red in the package suite:
  - drop `applyReasoningOptions`;
  - strip thinking fields only when an effort is set;
  - drop the budget check, or make it `>=`;
  - `useFresh` false, or without its model check;
  - a legacy roleless profile treated as primary;
  - a profile name without its role;
  - no `registerRoles`;
  - no `optionsMatch` in save;
  - no `refreshLiveModelOptions`;
  - count with `redirect: 'follow'`, or with no reply size limit;
  - a 131072 fallback for an unknown catalog context.
- CI at the head: test and on-npm pass. The PR merges onto main f379bf90+ with no conflicts.

Not blocking, left for a follow-up:
- Each inference now reads connection.json (adapter.mjs:547) with no fallback to the live connection. An unreadable file turns every request into 502, even without a budget.
- The comment above `applyReasoningOptions` ("Preserve the legacy connection untouched…") no longer matches the always-strip policy.
2026-11-09 10:07:07 +08:00
yetone e68748a78e opendesign 0.1.11: cap glm-5.3-flash and gemini-3.8-flash output at what amr-link takes (#827)
amr-link's /v1/models publishes context_budget 232000 for glm-5.3-flash
and 264000 for gemini-3.8-flash. Its API refuses anything over 131072 and
65536 with a 400, "Open Design: The request could not be completed.",
which names no field. Gitleonan measured this on 2026-11-09 with two
accounts (one of them took 232000 for GLM). A client that sends no limit,
such as Codex, gets the published number from magpie
(forwardTranslated's askedOutput), so every turn on those models failed.

modelOf now caps limit.output for those two models (CAP). It applies to
the seed and to every live catalog entry. A copy an earlier version kept
in the provider's config is capped too: config hands kept models back as
they were. models.mjs is left alone because refresh-models.mjs writes the
vendor's number back into it, and the live catalog's number overrides the
seed's anyway. A catalog number under the cap is used as it is.

This does not fix the red test dot through a Remote magpie. That comes
from the stream glm-5.3-flash sends when it reaches max_tokens: it ends
after content_block_stop with no message_delta or message_stop. magpie's
test asks for 16 tokens, and the model always thinks first, so it always
reaches the limit. On the issue I point to the magpie code for that path.

Run (on mote): bun test packages/opendesign gives 30 pass, 0 fail.
Broken by hand: with origin/main's index.mjs, the new test fails, and
with the config cap removed (the modelOf cap kept), it fails on the kept
gemini copy's 264000.
Not tried: a real amr-link request. There's no Open Design account here,
so the caps are the reporter's measurements, not ours.

Reported-by: Gitleonan
2026-11-09 09:56:29 +08:00
yetone e2d15ba653 qoder 0.2.64: a model off for credits used up is a 429 quota (#880); qodercli 1.21.2's single-file runtime on Windows (#879)
#880: on an international personal_professional_trial account whose 800
credits were used up, Qoder's listing had dfmodel off, and ask() answered
its own 400 `unknown or disabled model "dfmodel"`, which magpie reads as
the request's fault: a routing group neither failed over nor rested the
account (yetone/magpie#5726).

- models() records the keys the live listing names and has off (l.off).
- ask(): a known model the listing has off, on an account whose usage
  (/sash/api/v2/me/usage, device token rotated once as usage reads it; a
  PAT account's on its job token) says the pools spent in turn have no
  credits left, is answered 429 "usage limit reached: the account's
  credits are used up (800 / 800 credits), and Qoder lists "dfmodel" off
  for it until they refresh", before any job-token renewal. magpie's
  failure() reads that as failQuota (429 + usage limit, no brokeWords).
- Kept as before: a model off while credits are left, or when the usage
  can't be read (unknown, not quota), goes to the #484 renewal and the
  400; an id Qoder never served is the 400 at once with no usage read.
- usage() reads the envelope through the same usageEnv helper.

#879: qodercli 1.21.2 on Windows caches the helper as
.qoder\.bin\runtime-info-win32-x64-<hash>.exe beside sgsdk.dll, and
campaignRuntime took only the 1.1.66 folder umid-win32-<arch>-<hash>\.
Both are now taken, the newest by mtime; another arch's file and a
non-.exe (a .tmp) are passed over.

Run (mote, load ~900): packages/qoder bun test 424 pass 0 fail; bun
scripts/check.mjs qoder ok.
Broken by hand: the new tests against the old index.mjs: 5 red
(#879's single file found the umid folder instead; #880's 429 was 400;
spentOf missing).
Fixtures: #879 uses the reporter's file names
(runtime-info-win32-x64-faa59bbe39db0bd1.exe, sgsdk.dll). #880's issue
gives the plan, 800 credits used 100% and dfmodel off, but not the
listing's or usage's bytes; their shape is the other qoder tests'.
Not tried: a real out-of-credit Qoder account; Windows itself (the
runtime test forces platform win32 on mote); where Qoder desktop 1.21.2
keeps its helper now that resources\umid is gone (the reporter's second
point; QODER_RUNTIME_INFO still covers it); the repo-wide bun test (mote
at load ~900; only packages/qoder changed).

Reported-by: zane668 (#880)
Reported-by: ArmedHelicopter (#879)
2026-11-09 09:52:58 +08:00
yetone 40c9725666 autoclaw 0.2.19: rewrite Grok CLI's identity line for the CN gateway (#875)
Grok CLI through AutoClaw 国内 got four 406s in a row on 11-08. Its system
prompt opens "You are Grok released by xAI. You are an interactive CLI
tool ...", and FLAGGED had no rule for it, so the line went out as written.

Grok CLI writes that line in two shapes. Its own system_prompt.txt files
(grok 1.0.67, in ~/.grok/sessions on this Mac) show "You are Grok released
by xAI." for a model it doesn't know, and "You are Grok 4.7 released by
xAI." for one it does, in the interactive and autonomous variants alike.
The reporter's suggested regex matched only the first. The new rule takes
both: "You are the Grok[ 4.7] assistant released by xAI". It touches only
the "released by xAI" sentence, so "You are Grok-Mini." or "You are Grok,
a helpful assistant." are not changed. REFUSED_HINT now names Grok CLI.

Run (on mote): bun test packages/autoclaw gives 104 pass, 0 fail. The
new tests use the reporter's line byte for byte, plus the versioned and
autonomous lines from Grok CLI's own files.
Broken by hand: with origin/main's index.mjs and the new tests, 3 fail:
the Grok rewrite test, the all-lines table and the CN loader test.
Not tried: a real AutoClaw 国内 request. There's no account here, so
nobody has checked that the rewritten line passes the gateway. The same
pattern has passed for ZCode and Codex.

Reported-by: hj01857655
2026-11-09 09:51:34 +08:00
yetone f379bf907c doubao-work 0.1.2: say at once that an open Doubao must be quit
The owner's sign-in spun with no end. Doubao runs one copy at a time: with
the user's own Doubao open, the plugin's copy (its own profile, debugging
port) quits within a second of starting, so the port never opens.
waitSignedIn took every error but app_missing as "not signed in yet" and
started it again for five minutes, saying nothing.

- App.start looks for a running copy of the binary on another profile
  before it starts one, and fails with app_busy. The user's copy can't be
  driven instead: Chromium allows debugging only off the default profile.
- waitSignedIn ends on any app_* error (busy, missing, start timeout) and
  on abort; only a window still loading is waited for.
- Sign-in and requests say: quit Doubao (⌘Q) and try again. A request
  gets 503.

Run: bun test packages/doubao-work on mote (+ check.mjs), Linux (WSL) and
Windows: 28 pass, 0 fail. With waitSignedIn's old catch put back, the new
waitSignedIn test is red (60s timeout instead of app_busy). Live on this
Mac, with a Doubao running from another profile: waitSignedIn threw
app_busy in 92ms, nothing spawned, no profile made. That a second copy
quits was tried first: Doubao with a fresh profile and port exited in ~1s,
port never up.
Not tried: the owner's Mac (10.0.0.175) itself.
2026-11-09 06:53:05 +08:00
yetone e918aa6c4b doubao-work 0.1.1: plain model names, text-only input
magpie shows a model as "<name> · <provider>", so "豆包工作 · 自动" read
"豆包工作 · 自动 · 豆包工作" in pi. The names are now Doubao's menu names.

The models gave no modalities, so magpie asked models.dev about "auto",
another vendor's model, and told pi it takes images and a thinking level
map. Each model now says text in, text out.

Run: bun test packages/doubao-work on mote (with check.mjs), Linux (WSL)
and Windows: 25 pass, 0 fail. The new assertions fail on 0.1.0's names.
2026-11-09 06:42:10 +08:00
yetone 29ceed20c9 doubao-work: test the sign-in and the app start on every OS
c1ed1b51's publish run went red on ubuntu: the sign-in test read the real
binary(), which is "" off macOS, so the callback said "macOS only". Its
App test spawned /bin/sh, which Windows doesn't have. Both passed on mote
(macOS) only.

createPlugin takes appBinary (default binary()), and the sign-in test gives
each case: a Mac path signs in, "" says macOS only. A new test holds
binary() per platform and DOUBAO_WORK_APP. The App test uses a file it
makes.

Run: bun test packages/doubao-work, 25 pass on mote (temp HOME, as CI),
wsl-run (Ubuntu 24.04) and win-run (Windows 11). bun scripts/check.mjs ok.
2026-11-09 06:12:13 +08:00
yetone c1ed1b511e doubao-work 0.1.0: 豆包工作 as a provider, by driving the Doubao desktop app
Doubao Work runs its agent loop in ByteDance's cloud and has no API. This
plugin uses the desktop app the way a person does and gives the reply back
as an OpenAI chat completion:

- cdp.mjs (knows nothing about Doubao): starts a Chromium-based app from a
  profile of its own with DevTools on a port it picked and saved, reuses it
  while it runs, never kills anything; Page evaluates and presses keys.
- doubao.mjs: per request a new 工作任务, switched to 云电脑 (Doubao's agent
  never touches this computer), the model picked (Pro needs a paid plan:
  403), the whole request written into tiptap one paragraph a line, Enter,
  and the reply read from the message's content_blocks_v2 (markdown, and
  thinking as reasoning_content) until is_finish. One request at a time.
- prompt.mjs / openai.mjs: system prompt, tools and turns flattened into one
  message; tools asked for as <tool_call>{json}</tool_call> and given back
  as tool_calls; SSE that holds text from the first call (or a tail that
  may start one), and that throws a failure before the reply begins so it
  goes back as an HTTP error.
- Sign-in waits for the account in the separate Doubao window.

Run:
- bun test packages/doubao-work on mote: 24 pass.
- Full suite on mote the way CI runs it (HOME=$(mktemp -d) bun test):
  6936 pass, 20 skip, 0 fail. bun scripts/check.mjs: doubao-work ok.
- Broken by hand: sleep without its aborted check; "an abort between two
  polls stops the ask too" goes red (runs to the 180s idle timeout), green
  with it. Found by the first run: an abort landing between polls was lost.
- Live, the loader against a signed-in Doubao 147 on macOS: auto plain
  answer 200 in 3.9s; doubao-2.1-lite streamed Bash tool call (first byte
  3.6s, total 4.8s); tool result follow-up answered "412 lines"; Pro gave
  403 doubao_upgrade; a 300-word story streamed as 20 content deltas with
  its ```python fence kept; a client abort ended the stream and the next
  request answered 200.

Not tried: through magpie's plugin host and a real agent (Claude Code
sized requests); Windows and Linux (unsupported, sign-in says so). A
stopped request stops being read but Doubao finishes its task (README).
2026-11-09 06:05:35 +08:00
caikn b228cc6a68 sap-aicore 0.3.2: accept session metadata, forward context_management with its beta (caikn, #851)
sap-aicore 0.3.1 refused two top-level Messages fields that real agents send:

- `metadata` (omp sends `metadata.user_id` on every request): now accepted and
  dropped in `bedrockBody`, the one builder both /invoke and
  /invoke-with-response-stream use, so it never reaches Bedrock.
- `context_management` (omp and Claude Code with thinking on send
  `{"edits":[{"type":"clear_thinking_20251015","keep":"all"}]}`), with
  `anthropic_beta`: both are accepted as opaque native fields and forwarded
  unchanged. When `context_management` comes without `anthropic_beta`, the body
  gets `anthropic_beta:["context-management-2025-06-27"]`, which SAP/Bedrock
  needs (without it SAP answers 400 "Extra inputs are not permitted"). An
  explicit `anthropic_beta` (including [] or null) is sent as given. SAP judges
  unknown edits and betas; its 400 surfaces once, redacted, with no retry. The
  author verified the literal directive against live SAP deployments (Opus 4.8,
  Opus 4.6, Sonnet 4.6, whole replies and streaming). Closes #864.

The test for #812 ("late failure does not delete a newer candidate") now waits
for the first token fetch to start instead of a 10ms sleep, and checks r1
failed, r2 succeeded and two fetches ran. Closes #812.

Version 0.3.1 -> 0.3.2 (the dist branch has 0.3.1; the package is not on npm).

Run at 76e1bfef2 (base 966cf717; origin/main 46fef953 has no sap-aicore change
since), on mote, HOME and TMPDIR under ~/runs, Bun 1.4.2:
- bun test packages/sap-aicore: 343 pass, 0 fail
- bun scripts/check.mjs sap-aicore: registry.json and sap-aicore ok
- bun test (repo root): 6895 tests, 6875 pass, 0 fail, 20 skip (HOME under TMPDIR; not through mote's suite lock, whose queue was hours long)
Broken by hand (messages.test.js + messages-stream.test.js, 46 tests):
- default beta line removed: 4 red (both agent-thinking tests, both defaulting tests)
- beta always set, overriding an explicit one: 4 red (override and novel-beta tests)
- context_management/anthropic_beta out of ALLOWED: 7 red
- main's messages.js: 9 red (adds both metadata tests)
The #812 test is unchanged since 19cabed44, where a 30ms delay injected in
authorize turned the old test red and the new one green.

Co-authored-by: Kanyin Cai <kanyin.cai@sap.com>
2026-11-08 21:48:44 +08:00
yetone 46fef953c8 catpaw 0.2.1: the credits' refresh time is the window's reset, so Smart routing ranks the account (#867)
The 可用积分 window was always aside with no reset, so Smart routing never
ranked catpaw accounts by it. The credit/balance response the plugin
already reads carries userPlan.nextRefreshTime, a ms epoch string
("1796054400000"), when the plan's credits refresh. It is now the
window's resetsAt; magpie's Allowance.Renewal ranks by it, soonest first.

Why resetsAt and not runsOutAt (the issue's suggestion): 重置 is the
window's renewal; runsOutAt is for credits lost apart from a reset, and
with runsOut set the GUI would say "N credits expire", which nobody has
checked. Routing ranks both the same (Renewal takes the sooner).

used stays 0 and there is no limit: the vendor gives only the balance,
and a difference of balances would be made up. The GUI's rendering of
the window is unchanged (aside is not sent to it); it now shows the
reset line. A credit of 0 is not read as used 100: catpaw has free
models that may still answer.

No reason for aside was recorded (eeb344f1, PR #174); it read as "no
reset known". nextRefreshTime missing, empty, not 13+ digits (a
seconds value, a date string, a fraction, negative) or an object keeps
the window aside, as before: a failed read is unknown. A past refresh
time is kept as read; magpie treats a passed reset as not known.

Run at this tree on mote (mote-run):
- packages/catpaw bun test: 64 pass, 0 fail (13 new)
- bun scripts/check.mjs catpaw: exit 0
- repo-root bun test under a mktemp HOME: 6904 pass, 0 fail, 501 files
  (without an isolated HOME, 21 fail: zcode/devin tests that refuse a
  real HOME by design)

Broken by hand, then restored:
- window always aside again: 2 fail (reporter's string shape, numeric)
- any non-empty value accepted: 3 fail (seconds, negative, fraction)

Not tried: a real catpaw account (none here); the reporter's balance
shape is taken from the issue. Not tried in a running magpie's Routing
page.

Reported-by: orinsid
2026-11-08 20:56:34 +08:00
yetone 9b41df1507 kiro 0.1.33: an account in Kiro IDE's CreateResponse experiment is asked at /v1/responses, as the IDE asks it (#842, #848)
ThirdTimes (#842, #848): on one Builder ID account the plugin (0.1.32)
was answered 429 USER_REQUEST_RATE_EXCEEDED on generateAssistantResponse,
and Kiro IDE 1.4.121, 11s later, was answered. The IDE's log says
"api=CreateResponse armSource=experiment callPath=main". The version
strings the plugin sends already match the IDE (1.4.121, the update
feed's latest, 2026-11-06). The difference is the call. Kiro puts accounts
in a create_response_api experiment, and an account in its arm is asked
at POST runtime.<region>.kiro.dev/v1/responses. The IDE's own
generateAssistantResponse title call on that account was 429 too.

All of this is read from the IDE's extension.js (kiro.kiro-agent, in the
1.4.121 linux tarball, which was not run):
- The experiment is read as ExperimentConfigService reads it:
  GET /featureConfiguration?origin=AI_EDITOR&version=1.4.121 with
  x-amzn-kiro-profile-arn. The key is
  sha256hex("kiro-feature-config-key-salt-3e9b1d7a" + "create_response_api"),
  and the arm's value is "create_response". The result is kept 15 minutes
  per sign-in. A failed read is asked again after 60s and keeps the last
  good config, and the read has a 5s timeout. With no config the account
  stays on generateAssistantResponse, as the IDE's default does, so an
  account outside the arm is sent what 0.1.32 sent.
- CreateResponse is sent with the IDE's headers: the plain IDE user agent
  (no aws-sdk prefix, no amz-sdk-*), x-amzn-kiro-origin AI_EDITOR,
  x-amzn-codewhisperer-optout, x-amzn-kiro-profile, TokenType and
  x-amzn-kiro-attempt "n;max=3". The body is {model, input, tools, stream,
  origin, profileArn, metadata kiro:agent_mode/kiro:conversation_id,
  reasoning}, made from the request built for generateAssistantResponse
  (history, tool calls and results, images as data: URLs). The system text
  stays at the head of the first message, as with the IDE's
  system_field_injection off.
- The SSE reply is read into the same events the old frames gave: text,
  reasoning and its signature, refusals, function calls (pieces or
  whole), stop reason, context %, and credits. An error before any answer
  becomes the status generateAssistantResponse's would have, mapped through
  the IDE's reason table (rate_limit_exceeded is USER_REQUEST_RATE_EXCEEDED,
  context_length_exceeded is CONTENT_LENGTH_EXCEEDS_THRESHOLD, and so on).
  The 0.1.32 429 retry applies to both paths.

Not done: the auxiliary path (create_response_api_auxiliary; the plugin
has no auxiliary calls), the x-amzn-kiro-fallback header, documents as
input_file, and reasoning items in history.

Run on mote at base 966cf717: packages/kiro bun test 168 pass 0 fail
(HOME a temp dir). bun scripts/check.mjs kiro ok. Root bun test 6892 pass,
20 skip, 0 fail. Rebased onto e7af7856 (inkstone only) before pushing.
Broken by hand: with the arm's value changed, 8 of the 11 new tests go
red. image-size and refresh tests now leave the featureConfiguration GET
out of what they count as a chat send.

Not tried: a real Kiro account. No account in the CreateResponse arm was
available, so the /v1/responses body and SSE are as the IDE's source
writes and reads them, not as captured from Kiro.
2026-11-08 20:31:34 +08:00
Binyu Wang e7af7856e5 inkstone 0.1.4: strict fake /keys, refused-key cleanup test, injectable probe backoff (#841)
The fake GET /api/tokenplan/v1/keys in keys.test.mjs's serveKeys() now
behaves like the live platform: no `uaa-token` cookie gives -10002, and
any query parameter gives -15100. A new test covers the third listKeys
call site, the 401 cleanup in ensureKey: the probe refuses the new key,
and the test checks that the refused key is deleted by name (#839).

probeWithRetry takes its delays as an optional third argument, and
ensureKey passes `probeDelays` through to the probe of a key it just
created. The default delays are unchanged, so nothing outside tests
behaves differently. The new test passes [0] and doesn't wait through
the ~15s backoff. Because lib/ changed, inkstone goes to 0.1.4.

Run at the reviewed head c4ab4717, merged onto main 7e01fa81, on mote
(Bun 1.4.2) with a temp HOME:
- packages/inkstone `bun test`: 102 pass / 0 fail
- `bun scripts/check.mjs inkstone`: ok
- repo-root `bun test` and the full `bun scripts/check.mjs`: CI run
  42476974057 at this head, green. The mote run waited 23 minutes
  behind 10 queued suites on the machine's suite lock and was dequeued
  without running.
Broken by hand, each red:
- query back at keyCount's listKeys: 3 fail (blank-prompt create,
  ten-key limit, the new cleanup test)
- query back at pruneKeys' listKeys: 2 fail (both pruning tests)
- query back at the 401 cleanup listKeys: 1 fail (the new test;
  main's tests stayed green there)
- listKeys on the bearer instead of the cookie: 7 fail
- probeDelays not passed through: 1 fail (the new test runs past
  bun's 5s limit at 15.0s)

#847 (also inkstone 0.1.4) merges cleanly on top, but it has to move to
0.1.5.
2026-11-08 20:16:18 +08:00
yetone 7e01fa8118 workbuddy 0.2.26: the declared list gives each model the config's reply limit
The list declared before an account's own config is read (a key whose CLI
reads no config, a config WorkBuddy doesn't answer) said output 0 for
every model, and magpie filled in models.dev's: 384000 for
deepseek-v4.1-flash, where WorkBuddy's /v3/config says maxOutputTokens
128000. Agents were told a 384000-token reply.

The declared tuples take a fifth field, the output, for every model a
real config in testdata names: deepseek-v4.1-flash and deepseek-v4-pro
128000 and glm-5.3-flash 131072 on workbuddy; default-model 24000,
fast-model 32000, primary-model 72000, hy3 64000, gemini-3.5-flash 65536,
glm-5.2 48000 and kimi-k3 32000 on workbuddy-ai. The rest stay 0 (left to
models.dev, as before). The live list already carried the config's value.

Run: HOME=$(mktemp -d) bun test packages/workbuddy/ on mote, 335 pass;
bun scripts/check.mjs ok. Broken by hand: with index.mjs back at 0.2.25,
the new test fails (hy3 64000 expected, 0 received; deepseek-v4.1-flash
0 for 128000). Not tried: a real WorkBuddy sign-in or key; the outputs of
models no saved config names (hy4-preview-f, glm-5.3, kimi-k3-1, ...).

Reported-by: sayagoodbyeplz (Discord)
2026-11-08 17:41:13 +08:00
zxy20250120 93dacd738f zcode 0.1.57: the busy hold's answer arms no quota rest (#859)
A busy hold (0.1.54) armed while a Start Plan request was in flight
answers that request with the hold's own 429 from askBusy. It carries no
3008, so busy() does not claim it and spentUp counts it as a spent gift.
On a -Trial pick that rested the model in `blocked` for a minute, and
the next -Trial asks were answered locally "over its quota ... exhausted"
with quota left. Under free first it rested the model the same way
before the replay on the plan.

busyHeldAnswer now sets `x-magpie-busy-hold: 1`, and the -Trial and
free-first gift paths read it before spentUp: the hold's answer passes on
as the rate limit it is and arms no rest. Free first still replays a
held answer on the plan, through the plain >= 400 branch. The gate's
queue answer and the hold's early returns never reach those paths.

Run at the reviewed head e5858d7b merged with origin/main 03ab6d66, on
mote (Bun 1.4.2, HOME and TMPDIR inside the run folder):
- bun test packages/zcode: 236 pass, 0 fail.
- bun scripts/check.mjs zcode: ok.
- The new test with main's index.mjs: red at
  blocked.get(...glm-5.3-flash) toBeUndefined (received a timestamp).
- Broken by hand: the free-first guard removed alone leaves all 236
  green, so only the -Trial guard has a test.

npm had 0.1.56 before the merge; this is 0.1.57.
2026-11-08 15:26:54 +08:00
KaranocaVe 5db645541a fingerprint 0.2.3: History expands saved runs in place, an About tab, and a launcher fallback address (#858)
KaranocaVe (#858): History expands a saved run in place (results, cancel and
export for that run, by id) instead of replacing the current run; a new About
tab links the project and lm-detector (anchors standalone, copy buttons in
magpie's frame); the desktop launcher shows the local service address after
4s if navigation stalls; integration.md documents Windows' excluded port
ranges. Version 0.2.3.

Reviewed at d272d0c14fed1c1b654f970f358fabea4b2fe210, run on mote (macOS) in
a copy of the PR tree with a temp HOME in the run folder:
- packages/fingerprint: bun install --frozen-lockfile, typecheck ok, bun test
  37 pass 0 fail, bun run build. diff -r of the PR's dist against the rebuild:
  identical (dist/ui, plugin.js, cli.js).
- bun scripts/check.mjs fingerprint: registry.json ok, fingerprint ok.
- Bundle: the only new URL strings are the two About links
  (github.com/KaranocaVe/magpie-fingerprint, github.com/Ikaleio/lm-detector);
  no new fetch/eval/Function/WebSocket/sendBeacon; CSS has only the existing
  data: SVG.
- Playwright 1.62.0, Chromium and WebKit, en and zh-CN, 1100px and 380px,
  standalone and inside a parent frame, with the API stubbed from the demo
  server's /api/bootstrap (a running, a completed and a failed run): History
  expands a row (aria-expanded true), cancel from an expanded running row sends
  one cancel and the row shows Cancelled, About shows 2 anchors standalone and
  2 copy buttons framed (copy shows Copied in both engines), ArrowRight/Left
  wrap across the three tabs, no horizontal overflow, no request off the stub
  origin. 48 screenshots checked.
- The one page error, standalone only ("Cannot destructure property 'context'"
  from the vendored bridge's hello), is the same on main 03ab6d66f (same load
  harness on main's dist).

Not tried: the launcher fallback in a real Windows magpie window (covered by
the new boot test only). src/service-identity.ts VERSION still says 0.2.2
(health/bootstrap report it; nothing compares it), filed separately.
2026-11-08 14:29:18 +08:00
yetoneandyulong-ge 03ab6d66f4 agy-cli 0.1.2: list what agy acp offers before the first request (#854)
Until a request had opened an ACP session, agy-cli listed Gemini only
(offeredFilter), so a user who hadn't sent a Gemini request yet saw no
Opus (chriskan666 on Discord). provider.models() now asks agy's ACP
server itself, as yulong-ge's antigravity-official-acp (#854) does:
a short `agy acp` with the plugin's own clientInfo, initialize and
session/new (no prompt), reading the session's model option and
models.availableModels into the same offered set a request's session
fills. The session is closed when agy says it can be, and the process
and its temp folder are removed.

- Only provider.models() probes; a request opens its own session.
- It runs once `agy models` has answered (agy is signed in), at most
  once a minute while the offer is unknown, and not at all once known.
- models() waits for it as briefly as for the listing (500ms) and
  never longer; a failed or timed-out probe (30s) keeps Gemini only.
- An agy older than 1.4.12 gets no session.

#854's own code reads session/new's availableModels, not `agy models`
(its body says `agy models`); agy-cli already parsed `agy models`, so
nothing of that parser changed.

Run at origin/main ae518836 plus this diff (this commit's tree) on mote (macOS), HOME=$(mktemp -d), under suite.lock:

- `bun test packages/agy-cli`: 6 of 7 suites pass; test/usage.mjs was red
  once ("version/report hangs time out", 1239ms), a timing test this
  change doesn't touch: filed as #856. It then passed 5 of 5 alone.
  catalog 17 pass, smoke ALL OK (314 checks).
- `bun scripts/check.mjs agy-cli`: registry.json and agy-cli ok.
- repo-root `bun test`: 6878 pass, 0 fail (6898 tests, 500 files).

Broken by hand: models() with the probe off. catalog.mjs went 2 red
(the probe lists Opus with no request; a failed probe is tried again
after a minute) and smoke.mjs 1 BAD ("listing models learns what agy's
ACP server offers, before any request").

Not tried: a real signed-in agy. This Mac's agy 1.5.3 (CLI 1.4.12) is
signed out: `agy models` says "Please sign in to view available
models", and its `agy acp` answers initialize and refuses session/new
with -32000 "Authentication required" (the fake's sign-in error is that
reply). mote has no agy. That the ACP session offers Claude and GPT-OSS
to a non-editor client rests on #854's author's run (agy 1.5.3 acp,
13 models incl. Claude and GPT-OSS).

Co-authored-by: yulong-ge <41790869+yulong-ge@users.noreply.github.com>
2026-11-08 13:17:47 +08:00
lxyer ae51883634 grok 0.2.6: a stream cut before its first byte is asked again (#852)
A Responses stream from Grok that dies before its first byte (the
connection reset, nothing sent yet) is asked again, up to three times,
before the answer is returned. A retry's own answer is noted, so a 429
or 401 on a retry comes back as itself, not folded into a 200.

Once a byte has arrived, response.created and reasoning included, the
stream is passed on at once, one upstream chunk per pull, and cancelling
it cancels the upstream read. A later cut is not asked again and nothing
is written in its place: the stream ends, and magpie 0.1.3298 or newer
(yetone/magpie 29bfd5dc8) closes it as a whole response.failed with
created_at and sequence_number. The frames 0.2.6's first version wrote
had no sequence_number, and Grok Build failed the turn on them. An
upstream response.failed, error or response.incomplete is passed on
unchanged, and an end with no bytes is not asked again.

Run on mote (macOS 27), at 463afb79, each in a temp HOME:
- packages/grok `bun test`: 107 pass, 0 fail.
- `bun scripts/check.mjs grok`: ok.
- Repo-root `bun test` with HOME=$(mktemp -d): 6878 pass, 20 skip,
  0 fail. A first run with HOME under /tmp had 21 reds in devin, zcode
  and sap-aicore. Those tests refuse a HOME outside $TMPDIR, and
  plugins main ecab8396 had the same reds under that HOME.
- Broken by hand, cut-retry.test.mjs goes red:
  - STREAM_TRIES=1: 3 fail;
  - the retry's note() removed: the 429 test fails;
  - cancel() not passed upstream: the cancel test fails;
  - "aborted" counted as a cut: the abort test fails;
  - a later cut erroring the stream instead of ending it: 2 fail.
  Asking again after a zero-byte clean end is the one break no test
  catches.
- Real chain: Grok Build 1.0.67 and 1.0.77 (x.ai's own build, the
  reporter's version), then magpie eef99e4bb (`magpie serve`, sandbox
  HOME), then this plugin (BASE pointed at a fake), then a fake Grok
  upstream:
  - ok: "pong".
  - Cut before the first byte, then ok: "pong", with the retry inside
    the plugin.
  - Cut, then 429: magpie logs a 429 from Grok, and Grok Build retries
    on "rate limited".
  - Always cut before a byte: an empty 200, which magpie reports as a
    retryable 502. Grok Build retries it as server_error.
  - Cut after response.created, and cut after text: magpie's
    response.failed ("the reply ended before it was complete"). Grok
    Build reads it and retries it as server_error. No "missing field"
    in either version.
  - Upstream response.failed: one call, and Grok Build shows the
    vendor's own message.

Not tried: a live Grok stream cut by the real vendor.
2026-11-08 12:42:31 +08:00
yetone ecab839688 agy-cli 0.1.1: sign in to Google from magpie, through agy's own agy acp --login
treeman_26897 (Discord #feedback, 11-08): Sign in on agy-cli opened no
browser, and asked for a field to paste the callback into.

Cause: the plugin had no sign-in of its own. Its one method only checked
whether `agy models` worked, and if not it said to run `agy` in a
terminal. magpie still showed "Finish signing in ... in your browser",
but nothing ever opened a page.

Now the method is oauth:
- Already signed in to agy (`agy models` lists models): done at once. No
  page opens and no agy login starts.
- Otherwise the plugin starts `agy acp --login` (agy 1.5 and later). That
  prints Google's link and reads the code from stdin. magpie opens the
  link on the user's machine and shows its code field (method "code").
  - The field takes the code antigravity.google/oauth-callback shows, or
    that page's whole address.
  - No loopback is involved, so it works with Remote magpie and in Docker.
- agy trades the code and keeps the token in its keyring. The plugin never
  sees the token.
- The account is saved only once `agy models` lists models afterwards. A
  wrong, empty or expired code fails, and nothing is saved. Google's
  invalid_grant is worded as "turned the code away".
- The link waits 15 minutes, then agy is stopped. A new sign-in stops the
  previous agy.
- agy 1.4.x has no --login. It gets "update with `agy update`, or run
  `agy` in a terminal".
- The login runs with auto-update off, like the plugin's other agy
  processes.

Import from a file is not added. agy keeps its credentials in the system
keyring, not in a file under ~/.gemini/antigravity-cli.

The empty account the report also describes was not reproduced on
current magpie. A failed sign-in saved nothing, in the GUI and the CLI.
This version also needs models listed before it saves anything.

Run:
- On mote (macOS, Bun 1.4.2) at this tree, `bun test` in packages/agy-cli:
  7 pass / 0 fail.
- `bun scripts/check.mjs` and `bun scripts/check.mjs agy-cli`: exit 0.
- New smoke checks, with the old index.mjs put back: red, at "signed in
  to agy already, the sign-in saves agy" (the old method has no callback).
- Real agy 1.5.3 on mote, sandbox HOME, current magpie `web`, through
  Playwright:
  - Providers > agy-cli opened Google's sign-in page, and the code field
    showed.
  - A bogus code gave "Sign-in didn't finish: Google turned the code
    away...". /api/providers had no agy row.
- `magpie plugin login agy-cli`:
  - With a bogus code, the same error.
  - With real agy 1.4.12, the update message.
- Real agy 1.5.3 on Windows 11 (win-run) and on Linux (WSL2 Ubuntu 24.04,
  wsl-run): authorize gave Google's link in about 2s, and a bogus code
  failed with the invalid_grant wording. No agy was left running.

Not tried:
- A real Google sign-in through to models. Only bogus codes were used, and
  no real account was touched.
- magpie inside a Docker container.

Reported-by: treeman_26897
2026-11-08 11:48:40 +08:00
yetone d7adec8f74 gcp-ai: the fake gcloud in the ADC consent test exits only after its ADC write lands
The "ADC setup reads gcloud's complete consent URL ..." test's
writesThenFails fake started the ADC write on one 5ms timer (void, not
awaited) and exited on another 40ms timer. beginAdcLogin stats the ADC
file on a non-zero exit to tell "saved, then the quota probe failed"
from a failed consent, so when the write took more than ~35ms on a busy
machine the exit was read before the file existed and the test saw
"gcloud could not set up ADC". Real gcloud has written the file before
it exits, so the plugin is right and the race was the test's: the fake
now emits exit only once its write has resolved.

Run on mote (Bun 1.4.2, TMPDIR and HOME inside the run dir):
- reproduced: the write's timer moved 5ms -> 60ms on the old test: red
  ("gcloud could not set up ADC") every run.
- fixed, with a 100ms sleep injected into fixture.setAdc: green.
- broken by hand (the fake's exit no longer awaits the write), same
  100ms injection: red. Injection removed afterwards.
- bun test packages/gcp-ai: 95 pass, 14 skip, 0 fail.
- bun scripts/check.mjs gcp-ai: ok.
- repo-root bun test: 6867 pass, 0 fail (499 files).

Only a test changed, so no version bump.

Fixes #835
2026-11-08 05:39:42 +08:00
yetone 966cf71764 kiro: a 429 throttle is waited out and tried again, as the Kiro IDE does (0.1.32)
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 Builder ID account and model (claude-haiku-5.5) took two
messages in a row (plugins#842, plugins#848).

The IDE gets the same throttles; it rides them out. Its chat client
(kiro.kiro-agent 1.1.787, dist/extension.js) classifies a
ThrottlingException with reason USER_REQUEST_RATE_EXCEEDED or
CREDIT_CONSUMPTION_RATE_EXCEEDED (ClientThrottleError) or any other
throttle (ServiceThrottleError) as retryErrorType THROTTLING, and its
QClientRetryStrategy tries 3 times: Kiro's retryAfterMilliseconds when
said, else 1s doubling (20% jitter, 20s max), counting each try in
amz-sdk-request and x-amzn-kiro-attempt. It shows "Retrying in N
seconds" over 2s. The plugin sent the first 429 back at once, and
since 0.1.30 with Retry-After 30s, so magpie didn't retry either.

Now paced() sends a chat call the same way: a 429 throttle (those three
reasons, or a reasonless "too many requests"/throttling) is waited out
and sent again, up to 3 tries, one invocation id, attempt=N; max=3. A
wait Kiro says is over 20s isn't held: the 429 goes back with it as
before. Usage limits (MONTHLY/DAILY/..., USAGE_LIMIT), model capacity
and other statuses aren't retried. A cancelled request ends during the
pause and isn't sent again. The last try's 429 keeps 0.1.30's words and
Retry-After.

The 47.3K input tokens of a "hi" are Kiro's own contextUsagePercentage
times the model's window: the agent's system prompt and tools, not
something the plugin adds.

Run (mote, HOME and TMPDIR inside the run dir):
- packages/kiro: bun test, 157 pass 0 fail.
- repo root: bun test; bun scripts/check.mjs kiro.
  Root: 6867 pass, 0 fail, 6887 tests across 499 files; check ok.

Broken by hand: paced() returning the first answer (n >= 1) turns 5
tests red (the four new throttle tests in errors.test.mjs and
region.test.mjs's rate-limit case).

Not tried: a real throttled Kiro account. No Builder ID account that
Kiro throttles was at hand, so the retry is checked against the IDE's
code and mocked answers only, not against Kiro.

Reported-by: onemezao (Discord)
2026-11-08 04:52:34 +08:00
Mañjūṣaka 04f1db9ea8 output-strategy: credit manjughosa as the author (#849)
Credits manjughosa as the author of output-strategy: an "author" field in its package.json, and "by manjughosa" / "由 manjughosa 维护。" at the end of its registry summary.

No version bump: nothing under lib/ changes, and nothing published changes in a way users notice.

Reviewed at 957d2981: the diff is these 4 lines. Both files parse as JSON and have no CR bytes. CI (test, on-npm) is green at this head.
2026-11-08 04:17:10 +08:00
lingandLingwcy 31080df37d agents: add the Eta agent plugin (#845)
Adds the Eta agent plugin (@magpie-community/agent-eta 0.1.0): eta.agent.js descriptor, registry entry and README row.

Run at 43320fbb on mote in a temp HOME: bun test ./packages/eta 5 pass; bun scripts/check.mjs eta ok; npm pack --dry-run 5 files; repo-root bun test 6623 pass / 21 fail, the same 21 as main 7d84184c. Broken by hand: allowing https gateways and removing the registry entry each turn one test red.

Co-authored-by: Lingwcy <Lingwcy@users.noreply.github.com>
2026-11-08 02:57:52 +08:00
Binyu Wang 7d84184c32 tabbit 0.1.2: send a fresh unique-uuid on every call, so web.tabbit.ai's sign-in gate lets chat turns through (#837)
web.tabbit.ai answers a chat turn's runs call with 429, code 492 ("Welcome
to Tabbit Browser...") unless the request carries a unique-uuid header.
Tabbit Browser sends a fresh uuid on every API call (a net-export capture
showed four different values across runs, two joins and usage), and the
gate accepts any well-formed one. headersFor now adds
crypto.randomUUID() as unique-uuid to every request, on both sites.
Version 0.1.2; the README's international-site note describes the gate
instead of saying turns are refused (#834).

Test: tests/unique-uuid.test.mjs posts two runs on each site through a
mocked fetch and asserts a v4 uuid that differs per call. No network.

Run at 1bffccd6 merged onto main d34785ae (mote, Bun 1.4.2 / Node 22,
temp HOME): packages/tabbit node --test 72 pass / 0 fail, bun test 72 / 0;
bun scripts/check.mjs tabbit and whole repo ok; repo-root bun test 6827 pass / 0 fail (6847 run, 314s).
Broken by hand: main's api.mjs under the head's tests turns both new tests
red (0 pass / 2 fail). CI run 42380909152 green.
0.1.2 is not on dist (0.1.0, 0.1.1) or npm.
Not tried: any real call to web.tabbit.ai or web.tabbit.com.
2026-11-07 22:36:48 +08:00
yetone 49d4042e5b workbuddy 0.2.25: Hide DeepSeek Harness's name leaves the user's words and paths alone (liby233)
liby233 on Discord: in DeepSeek Harness on DeepSeek-V4.1-Flash ·
WorkBuddy, a user asked the model to repeat
"/root/DSH/Work/OC-182.92.66.95/" word for word and got
"/root/the agent harness/Work/OC-182.92.66.95/" back; another model was
fine. hide_dsh (0.2.23, on by default) ran /\bDSH\b(?!_)/ and the bare
"DeepSeek Harness" rule over every user and assistant text, so a path's
DSH segment went to WorkBuddy rewritten. The switch's own description
already promised "Paths ... stay as they are".

- The bare name is taken out only where dsh wrote it: system/developer
  messages, Messages' system, tools' descriptions (DSH_PROSE).
- User and assistant text get dsh's own lines alone (DSH_LINES: the
  opener, the checkout and Web GUI lines, "DSH itself"), so the runtime
  context dsh sends as a user message still loses the name.
- Even in the system prompt, a name in a path, file name or identifier
  (/root/DSH/, C:\DSH\, ~/DSH, DSH.md, DSH-2, @DSH, file:DSH,
  "/srv/DeepSeek Harness/bin") is left: IN_PATH_BEFORE/AFTER guards.
- Siblings: FLAGGED and OPENERS rewrite whole known lines (a comma), not
  a bare word; no other plugin has a DSH scrub (git grep).
- README updated.

Run on mote at this tree (mote-run): HOME=$(mktemp -d) bun test
packages/workbuddy: 334 pass, 0 fail; bun scripts/check.mjs: all ok.
New tests use the reporter's literal path.
Broken by hand, each red: user/assistant text through DSH_PROSE again
(5 fail, the reporter's case among them); IN_PATH_BEFORE as \b (the path
test fails).
Not tried: a real dsh request on a real WorkBuddy account. Whether
the narrower hide still matters for a ban is unknown, as before.

Reported-by: liby233
2026-11-07 22:25:10 +08:00
我是一条没有名字的区 087c36123d inkstone 0.1.3: image-caps preflight, a zero-prompt browser sign-in, key calls on the session cookie (#832)
inkstone 0.1.3 (#832, yunwang2442-creator):

- Image requests are prechecked before they leave: 8 images, 10MB each, 40MB in all.
  - A request over a cap gets a local 400 shape refusal, so magpie asks the next account and rests none.
  - The plan's invalid_media / media_fetch_failed / unsupported_media_type errors become the same kind of refusal.
- The body rewrite strips the reasoning fields and sets image detail to auto.
- A zero-prompt browser sign-in comes first, and a second browser method reuses a pasted key.
  - Neither browser method is offered when no Chromium-family browser is found (#825).
- The /keys calls ride the session cookie, without the pagination query. Key creation retries the console's -15100 "refresh page and retry".
- The #826 metadata token read is kept, and its test is back.
- The fake browser is built once per user and source hash (#824), and the title wait reads only on Windows.
- maxConcurrency is 4.
- The doubled comment line is dropped from every opencode2.mjs copy, agy-cli's included.

Reviewed at 88e66bde, on mote (macOS, Bun 1.4.2) with a temp HOME:
- full bun test: 6853 pass / 0 fail; both checks exit 0
- bun scripts/check.mjs and bun scripts/check.mjs inkstone: exit 0
- 21 hand breaks: 20 red, 1 not caught (the /keys pagination test calls protocol.listKeys directly; follow-up filed)

Not tried: a real InkStone account or sign-in, Windows and Linux runs.
2026-11-07 22:24:56 +08:00
Muyang d34785ae88 privacy-gate 0.3.1: guide prompts name a coarse media class, never the raw media_type (#838)
privacy-gate 0.3.1 (siml1169, #838): guide mode names a fixed coarse media
class (image, pdf, office, audio, video, unknown) instead of copying the
part's media_type into the prompt, so no clipped or fake MIME prefix can
reach the vendor. Parameters are stripped first, a candidate over 256
characters is ignored before it is normalised, and the part's kind is the
fallback. Bytes are still withheld. Fixes #795.

Reviewed at 2b74b6e69ecaf0d20bd9f5fd4580f673da266736 (base = main b8100001;
mote, Bun 1.4.2, temp HOME):
- packages/privacy-gate `bun test`: 67 pass, 0 fail
- `bun scripts/check.mjs privacy-gate` and `bun scripts/check.mjs`: ok
- repo root `bun test`: 6822 pass, 20 skip, 0 fail
- broken by hand: main's middleware 10 red; no 256 guard, no parameter
  strip, no office mapping, no kind fallback each 1 red (its own case);
  echoing the raw candidate 9 red
- CI run 42377224277 green
Not tried: a real guide-mode request through magpie.
2026-11-07 22:06:22 +08:00
我是一条没有名字的区 1df427773b autoclaw 0.2.18: the README reads like a manual, and the sign-in's non-2xx guard gets its tests (#836)
autoclaw 0.2.18 (yunwang2442-creator, #836): the README is rewritten around
what a user does, with an English README.en.md shipped in `files`, and
dailySignin's non-2xx guard gets three tests. No change to index.mjs.

Reviewed at 699e545112c77938c4274368ef505017ed902e2e, merged onto main
b8100001 (mote, Bun 1.4.2, temp HOME):
- packages/autoclaw `bun test`: 103 pass, 0 fail
- `bun scripts/check.mjs autoclaw` and `bun scripts/check.mjs`: ok
- repo root `bun test`: 6820 pass, 20 skip, 0 fail (496 files)
- broken by hand (at 2ac00cee, same test file): removing
  `if (!res.ok) return null` turns exactly the three new tests red
- README facts checked against index.mjs (CHAT_PATH, X-Authorization,
  refreshShared's 60 s share and rotatedMemo, recordBalance's any-rise cycle)
- CI run 42378290789 green
Not tried: a real AutoClaw sign-in; the README in magpie's Plugins page.
2026-11-07 22:06:16 +08:00
yetone b81000019f kiro 0.1.31: reasoning sent with its signature in one event keeps it; chat as the Kiro IDE
Called as the Kiro IDE (previous commit), Kiro's auto ends a reply with
one reasoningContentEvent holding both text ("...") and a signature
(".KTR~~…"). events() read the text and dropped the signature, so the
reply had a thinking block with an empty one. Both are now kept: the
signature goes on the block the text began, streamed (signature_delta)
or not. The IDE's own reader (extension.js) keeps them together too.

Version 0.1.31 carries this and the IDE identity.

Run on mote: bun test in packages/kiro (152 pass), bun scripts/check.mjs
kiro, in a temp HOME.
Broken by hand: reasoning-signature.test.mjs (the payloads of a real
reply) against the old else-if, 2 of 2 red.
Real use (same sandbox as before): auto answered 200 with the thinking
block's signature kept, a second turn carrying that block back answered
200, and the streamed reply sent the signature_delta.
Not tried: a thinking model with a budget under the new identity.

Reported-by: onemezao
2026-11-07 20:43:30 +08:00
yetone 1d3b537c0d kiro: chat calls go as the Kiro IDE 1.4.121 sends them, not as kiro-cli
onemezao on Discord (Builder ID, Kiro Pro for students, claude-haiku-5.5,
pi): every request was answered 429 USER_REQUEST_RATE_EXCEEDED, and
kiro-cli on the same account is too, while the Kiro IDE goes on working
there. Kiro is limiting the CLI's identity on that account, not the IDE's,
and the plugin called as kiro-cli: aws-sdk-rust's user agent with
AmazonQ-For-CLI and a random suffix on every request, origin KIRO_CLI,
and a new conversationId per request.

A generateAssistantResponse call now carries what the IDE's own
extension.js (Kiro 1.4.121, agent KAS 0.66.89, Electron 44 / Node
24.22.1, downloaded from prod.download.desktop.kiro.dev) sends through
its KiroRuntime client:

- User-Agent: the AWS SDK for JavaScript's, "aws-sdk-js/1.0.0 ua/2.1
  os/<platform>#<release> lang/js md/nodejs#24.22.1 api/kiroruntime#1.0.0
  m/N", then the IDE's "KiroIDE-1.4.121-<machine id>-KAS/0.66.89
  acp-client/kiro-ide"; x-amz-user-agent is "aws-sdk-js/1.0.0" and that
  last part. The machine id is one 64-hex per install (the hash the
  plugin already names itself with to Kiro's auth service), never a
  random one per request. m/N is the SDK's feature for the endpoint the
  IDE names; its retry strategy has no mode, so no E.
- x-amzn-kiro-client-attribution: kiro-ide; x-amzn-kiro-attempt:
  1;max=3 and amz-sdk-request attempt=1; max=3 (the IDE's budget at a
  conversation's start); TokenType SSO_OIDC for a Builder ID or Identity
  Center token, as the IDE says it.
- Each message's origin is AI_EDITOR. agentMode leaves the body: the
  IDE's client binds it to x-amzn-kiro-agent-mode, which stays.
- conversationId is one per session: a UUID made from magpie's
  X-Magpie-Conversation (or X-Magpie-Session, or OpenCode's session
  header), the same on every turn; a call that names no session gets a
  new one, as before. The session's own name never goes to Kiro.

This holds for every account and every call, not only after a 429: the
IDE's identity is the one that works where the CLI's is limited, waiting
for a refusal first would spend one, and one identity per account is
simpler than two. Prompts are unchanged. The usage, model-list and
API-key control calls keep kiro-cli's origin (unchanged here).

Run on mote: bun test in packages/kiro (150 pass) and bun scripts/check.mjs
kiro, and the repo's bun test (6815 pass, 20 skip, 0 fail) with
bun scripts/check.mjs, each in a temp HOME.
Broken by hand: ide-identity.test.mjs against the old index.mjs, 4 of 4
red; with a random suffix put back on the user agent and the Headers
lookup taken out, 2 red.
Real use (the owner's existing kiro-cli sign-in, a Google account,
copied into a sandbox HOME, no sign-in or refresh): auto and
claude-sonnet-4.5 answered 200 twice each under the new identity, one
conversationId across both turns. It showed auto, called as the IDE,
ending a reply with a reasoning event that carries its signature; the
next commit keeps that signature.
Not tried: a Builder ID account or the reporter's account (the owner's
is Google; claude-haiku-5.5 is not on it, INVALID_MODEL_ID), whether
this ends the reporter's 429, and the IDE's A/B user agent
(AB_USER_AGENT_REFACTORING), whose control form is used here.

Reported-by: onemezao
2026-11-07 20:43:30 +08:00
gitxmandgitxm 0f0c4ec68f agy-cli: Antigravity on the local agy CLI over ACP (#785)
New package `@magpie-community/opencode-agy-cli-auth` (provider `agy-cli`, `packages/agy-cli`). It serves Antigravity models through the user's installed `agy` CLI over ACP (`agy acp`) and uses agy's own Google sign-in. The plugin reads and writes no Google tokens.

The bridge is gitxm's. On top of it, after review:

- **ACP identity.** The client names itself (`opencode-agy-cli-auth` and its package version) instead of `zed`.
- **Catalog.**
  - Only what agy offers this client is listed: Gemini until a session says more, then the session's model option and `availableModels`.
  - Requests are still routed by everything `agy models` lists.
- **Prompt.** agy keeps its own system prompt by default. The minimal agent is opt-in with `AGY_BRIDGE_MINIMAL_AGENT=1`, and the README says what turning it on sends upstream.
- **Version check.** agy older than 1.4.12 is refused at the handshake. 1.4.12 is the oldest version the `nc` MCP bridge was checked on, and the README documents the bridge.
- **Auto-update.**
  - `AGY_CLI_DISABLE_AUTO_UPDATE` defaults to `true` only for the plugin's own agy processes.
  - A value the user set is passed on as written.
- **Docs.** The READMEs and the registry summary say how this differs from antigravity-acp (#87).
- **Tests.** The author's tests came over under `test/` with a fake agy (an ACP stdio server). Each suite runs in its own `bun test`, and a `mock.module` preload stands in for `node:child_process`.
- **Cleanup.** A duplicate, unreachable image branch in validateBody is gone.

Run at ae5eafb0 on mote (macOS) with HOME=$(mktemp -d):

- `bun test packages/agy-cli`: 7 pass. Per suite:
  - platform 14, compat 9, usage 20;
  - catalog 15, usage-settlement 18, repeat-batch 14;
  - smoke ALL OK (301 checks).
- `bun scripts/check.mjs`: all ok.
- Repo-wide `bun test`: 6792 pass, 0 fail (6812 tests, 492 files).

Broken by hand, and each went red:

- clientInfo set back to zed;
- the version check turned off;
- routing limited to the listed models;
- auto-update forced to true;
- the minimal agent on by default.

Not tried: a real agy, since mote has none, or a real Antigravity account.

Co-authored-by: gitxm <21175063+gitxm@users.noreply.github.com>
2026-11-07 20:14:45 +08:00
yetone 50bb3f5ad2 tabbit 0.1.1: international accounts are served by web.tabbit.ai (#833)
Tabbit runs two sites with one API: web.tabbit.com (China) and
web.tabbit.ai (international). Each site refuses the other's tokens.
The plugin only knew .com, so every international account was refused
with 401 "invalid bearer". The reporter saw this as a lost sign-in.

The site is now picked by the account, with nothing to set:
- A desktop sign-in reads the token from whichever host's cookie has
  it, web.tabbit.com or web.tabbit.ai. The host's own hash prefix
  unseals it, and the site is recorded in the account's metadata.site.
- A pasted token, or an account from before this change, starts on
  .com. If .com refuses it, the same request is sent once to .ai.
  - If .ai accepts it, the token is remembered as .ai's for the process.
  - If both sites refuse it, it stays on .com and is reported as an
    expired sign-in, as before.
  - If .ai can't be reached, nothing is settled.
  - A 429 or 5xx settles nothing either.
- The catalog answers any token, so it settles nothing. The model list
  asks usage first to learn the site, so an international account gets
  .ai's catalog.
- Origin and Referer follow the site.

Not fixed here: .ai answers a chat run with 429 code 492 ("Welcome to
Tabbit Browser"), its browser sign-in gate. Sign-in, the model list,
usage and check-in work on .ai. Turns get the 429 passed through as it
is, not marked as a lost sign-in. The README says so.

Run on mote (Bun 1.4.2, Node 22, HOME=$(mktemp -d)):
- packages/tabbit: bun test 70 pass, 0 fail; node --test 70 pass, 0 fail.
- bun scripts/check.mjs tabbit: ok.
- Repo-wide bun test: 6797 pass, 20 skip, 0 fail (6817 tests, 492 files).

The new tests use the reporter's literal bodies from #833 (the 401
"invalid bearer" and the 492 gate JSON) against a stubbed fetch, so
nothing reaches the network.
- Against the old src (the new tests kept), 8 of the 9 site tests
  fail on their assertions, and so do both new cookie tests ("not
  signed in to web.tabbit.com"). The one that passes is the .com
  regression test, as it should.

Broken by hand, each change red in exactly the test meant for it:
- (a) no learning when both sites refuse: "a token both sites refuse".
- (b) an unreachable site settles .com: "web.tabbit.ai out of reach".
- (c) no usage probe before the catalog: "an international token's
  model list".
- (d) learning on any non-refused answer: "a 5xx or the catalog
  settles no site".

Not tried:
- a real web.tabbit.ai or web.tabbit.com account;
- a real Tabbit Browser cookie store holding a web.tabbit.ai row (its
  host_key is assumed to be web.tabbit.ai);
- getting past the 492 gate on .ai.
No magpie-side change is needed: magpie has no tabbit mover or min.

Reported-by: Beyfish
2026-11-07 19:57:13 +08:00
Purfeather 5ed1ac6d3d minimax-design 0.1.0: MiniMax Design as an agent, Windows only (Purfeather, #799)
Adds MiniMax Design (packages/minimax-design, @magpie-community/agent-minimax-design 0.1.0) as a magpie agent.

Its one switch writes a single custom-model entry, `config.customModels.user-custom-magpie`, into Design's `%APPDATA%\@hilo\desktop\hub-config.json`. The entry points at magpie's local /v1 with the gateway key and magpie's model list. Reasoning levels are filtered to the ones Design knows (low to max). Disconnecting removes the whole entry and leaves the user's other custom models alone. The agent is Windows only: its paths lean on $APPDATA and $LOCALAPPDATA, so it is never detected on macOS or Linux, and the agent's notice says so.

Also in this change:
- a README Agents row;
- a registry entry;
- COMPATIBILITY.md.

Verified by the author with real use: Windows 11, MiniMax Design 3.0.17, magpie 0.1.3238. Connect writes the entry, Design's model menu shows Magpie, and requests reach the gateway, attributed to minimax-design. Disconnect removes only the entry, and its preview lists it (magpie 0d70f335e, v0.1.3200).

Run at the reviewed head 8e09f13c on a separate macOS machine, with a throwaway HOME (Bun 1.4.2):
- bun test packages/minimax-design: 7 pass, 0 fail.
- bun scripts/check.mjs minimax-design: ok.
- Repo-wide bun test: 6791 pass, 20 skip, 1 fail. The one failure is gcp-ai's ADC consent test (plugin.test.mjs:422), red only under a concurrent full suite. It is green 6 of 6 alone, and the package isn't touched here.

Not tried: a real Design install on the reviewer's side, and macOS/Linux (unsupported).
2026-11-07 19:57:01 +08:00
yetone a313a00306 zcode 0.1.56: the Start Plan goes three at a time and re-asks a cap twice, as ZCode's client does
Users of other agent apps on the ZCode plugin saw "rate limited 5 times
in a minute" (star21321321124 on Discord). That is the plugin's own
3-minute busy hold (0.1.54, #801), which trips after ZCode refuses five
requests in a minute as over its in-flight cap (429 3008/3009). The
plugin drove those refusals itself:

- It sent every request magpie passed it. magpie's lane is 3 per
  account, but nothing in the plugin held the Start Plan to that.
- It re-asked a capped request up to six times over about 10s
  (BUSY_WAITS 250..4000, from #395). That kept slots taken and drew
  more caps.
- It counted every capped request toward the hold, including ones the
  next re-ask got past.

ZCode 3.17.2, read from its bundle: wqo = {3008, 3009, 3010} and
kqo = [1e3, 2e3]. So a busy cap is re-asked at most twice, after 1s and
2s, Start Plan only. There is no hold, and one main turn runs per
session.

What changes:
- BUSY_WAITS is [1000, 2000], with no jitter, and 3010 counts as busy.
  This applies to every plan, since the coding plan goes through the
  same askBusy.
- startGate: on the Start Plan, an account has at most 3 requests in
  flight (#395 measured about 3: 3 of 12 and 4 of 12 served). The
  account is keyed by uid, then accountId, then key. Further requests
  wait in a FIFO queue in the plugin and are not sent. A slot is freed
  when the upstream body ends, the agent cancels, or its signal aborts
  (the body is pumped eagerly so an unread reply cannot hold a slot).
  After 2 minutes of waiting, the plugin answers 429 rate_limit_error
  with Retry-After 5: "ZCode's free Start Plan serves this account 3
  requests at a time; this one waited 120s behind the others and was
  not sent. Run fewer agents or subagents on ZCode at once, or try
  again". The coding plan stays ungated. Its cap follows the tier (the
  #395 review), and magpie's lane covers it.
- Free first skips the gift while its account's gate is full, so the
  plain model goes to the coding plan rather than queueing.
- The hold counts a request only when ZCode refuses it again at the 1s
  re-ask. N=5, the 60s window and the 3-minute hold are unchanged, as
  is the rule that an in-flight or queued request stops once the hold
  is armed. Its message now says what happened and what to do: "ZCode
  turned away 5 requests in the last minute as too many requests at
  once, each again when asked a second later. So that ZCode's firewall
  does not block this network, magpie sends no free Start Plan
  requests for the next Ns. Wait, run fewer agents or subagents on
  ZCode at once, or use a GLM Coding Plan model". The words avoid
  "plan"+"limit" after "exceeded", which magpie's usedUpWords would
  read as spent.

History checked: #395 (0.1.32) added the long waits and had an
in-plugin gate removed in review, because it held Max coding-plan
accounts to 3 and was keyed on the jwt. This gate is Start Plan only
(one tier) and keyed per account. #801 (0.1.54) added the hold from
the logs of 11-05 23:06 and 11-06 06:23: about 16 to 18 req/min, 7 to
10 in flight, and the first 405 after 205 to 517s. The hold still
trips on sustained refusals: the replay below has the account
saturated elsewhere, and the hold arms within the replayed minute with
nothing sent after it.

Run on mote, HOME=$(mktemp -d), at the rebased head, Bun 1.4.2:
- bun test packages/zcode: 235 pass, 0 fail.
- New inflight.test.mjs: 13 pass. It covers re-ask count and timing
  (3 asks, gaps of about 1s and 2s), 3010, at most 3 in flight of 12
  sent at once, per-account slots, a slot held across re-asks, the
  queue wait running out (nothing sent, plain 429), abort while queued,
  a cancelled stream freeing its slot, the coding plan ungated, a cap
  the 1s re-ask got past not counting, and the hold message. It also
  replays #801's two days at 20x speed against a fake that refuses past
  3 in flight: 0 refusals, peak 3, no hold, all served. A second replay
  with the account saturated elsewhere arms the hold within a minute.
- bun scripts/check.mjs zcode: ok (registry.json, zcode). Repo bun test: 6780 pass, 0 fail, 20 skip, 491 files.
Broken by hand: inflight.test.mjs against 0.1.55's index.mjs gives 11
of 13 red. 0.1.55 made 7 asks, had 12 in flight, drew 24 refusals in
the replay, and armed the hold on caps a re-ask got past. Two pass on
both, as expected: the coding plan stays ungated, and the saturated
replay still holds.
Not tried: real ZCode Start Plan accounts, live; the replay is
synthetic from the #801 figures, as the raw logs are not in the repo.
Not copied from ZCode's client: its "no re-ask on a session's first
turn" rule, since the plugin cannot tell a first turn reliably.

Reported-by: star21321321124
2026-11-07 17:54:55 +08:00
caiknandcaikn 589fb12334 sap-aicore 0.3.1: image content in tool results (#830)
sap-aicore can now take images in tool results: a `tool_result` on Messages, and a `function_call_output` array on Responses. Images still need an image-capable model, and pass the same URL and detail checks as user attachments. Text-only models still refuse them locally, but magpie's gateway already describes or drops tool images before the plugin sees them. Bumped to 0.3.1.

Run at b44bb706 on mote (HOME=$(mktemp -d)):
- the package's tests: 335 pass, 0 fail
- bun scripts/check.mjs sap-aicore: ok
- the whole repo's bun test: 5882 pass, 0 fail

Each of the five guards, broken by hand, turned a test red. Bedrock's docs and Azure's v1 spec both accept these shapes. CI is green at 92e19bf9 (the bump only).
Not tried: a live SAP AI Core request.

Co-authored-by: caikn <caikn@users.noreply.github.com>
2026-11-07 17:54:37 +08:00
yetone 32bf0e68f9 opendesign 0.1.10: a model keeps the seed's input kinds and limits the live catalog leaves out (#829)
modelsOf() built each signed-in model from amr-link's catalog entry alone
(facts(m)). When the entry for deepseek-v4.1-flash-eco didn't list image,
the seed's input: ["image"] was lost, magpie listed it text-only and
described the image with another vision model (claude-haiku-5.5), while
amr-link takes the image itself (the reporter's direct POST). Limits and
the cost/capability words had the same loss: an entry without them fell to
200K/32K and no word, not the seed's.

withSeed() now fills what the entry leaves out from models.mjs. Input is
the seed's kinds and the catalog's together, also when the catalog lists
text only: the seed's kinds are what the catalog itself listed at the last
refresh, and a kind wrongly dropped is silent (the image is swapped for a
description on another account's allowance), while a kind wrongly kept is
the vendor's visible error. A model or kind the seed doesn't declare is the
catalog's alone. refresh-models.mjs does the same merge and prints each
kind it kept, so removing one is an edit to models.mjs.

Siblings: astudio, cline and sensenova read input_modalities too. cline
leaves an absent list unsaid, sensenova already unions its curated list
with the live one, astudio has no seed kinds to lose. No change there.

Run on mote:
- bun test packages/opendesign: 29 pass.
- Broken by hand: the old index.mjs and refresh-models.mjs fail both new
  tests (image false; no "kept image" line, eco written without input);
  only the context fallback reverted fails the modelsOf test.
- bun scripts/check.mjs opendesign: ok.
- HOME=$(mktemp -d) bun test (whole repo): 6766 pass, 20 skip, 1 fail:
  reasonix-desktop "normal host exit flushes a disconnect and leaves an
  active connection configured" (1162ms), untouched here; it passes 3 of 3
  run alone. Its output was lost to a tail; not filed.

Not tried: a signed-in opendesign account (we have none), so whether the
live entry lists ["text"] or omits the modalities is not seen; the fix
covers both. refresh-models.mjs against the real catalog.

Reported-by: exposir
2026-11-07 17:46:50 +08:00
yetone 3b41dda9fd cowork 0.1.1: seed magpie's reasoning levels as extras.thinkingEfforts
seed.mjs now writes extras.thinkingEfforts {default, options} on an entry
when magpie's /v1/models lists levels for the model
(supported_reasoning_levels objects first, else the flat reasoning_levels),
deduped. That is the shape Cowork's model menu reads to draw its
Reasoning row. magpie names no default, so default is medium, else high,
else the highest level that isn't none (a default_reasoning_level that
is one of the options wins). Entries seed recorded before get their
levels refreshed on the next run, other extras keys kept, and dropped
when the catalog drops the levels; --check counts that as drift
("~N reasoning levels to update"). Entries not in the record are not
touched.

Cowork 2.1.6-stable doesn't read it. From its core (codely-binary,
unpacked): a custom model's extras are rebuilt each time, and the
settings.json extras field isn't among the fields read (id, displayName,
model, providerId, roles, baseUrl, authType, apiKeyMasked, wireApi,
supportsMultimodal, extra_body, timeout, maxRetries). Reasoning comes
only from extra_body.reasoning_effort, as one fixed option. seed doesn't
write that: it would pin an effort on every request and still give one
option. The README says so and gives the Extra Body workaround. The
canary channel serves 1.1.7-canary.2, which has no thinkingEfforts code;
2.1.7-canary.4 couldn't be downloaded (404).

Run on mote at bf0a37f6 plus this change:
- packages/cowork: node --test, 56/56 pass (6 new tests, one a real
  seed run: --check exit 1 "+1 to add, ~1 reasoning levels to update",
  write, --check exit 0).
- node scripts/mutate.mjs: all mutations caught, 9 of them new (no
  extras spread, no objects source, no flat source, no dedupe, no
  medium/high preference, named default ignored, no refresh, no
  refreshed count, other extras keys dropped).
- bun scripts/check.mjs cowork: ok.
- bun test with HOME=$(mktemp -d): 6763 pass, 20 skip, 0 fail.
origin/main moved since then only outside packages/cowork and scripts.

Not tried: a real Cowork run with the seeded file, 2.1.7-canary.4, and
Windows (Cowork isn't installed on the Windows box).

No magpie mover or min references cowork.

Refs #828

Reported-by: LiShengYang-yiyi
2026-11-07 17:04:53 +08:00
yetone 44df5f0505 kiro 0.1.30: an account's request rate (USER_REQUEST_RATE_EXCEEDED) says whose limit it is, and isn't re-asked at 1/2/4s
onemezao on Discord: through pi, every request of a one-account Kiro
setup (claude-haiku-5.5, 965KB sent) failed after 42s with Kiro's "Too
many requests, please wait before trying again.
(USER_REQUEST_RATE_EXCEEDED)", while the Kiro IDE answered on the same
account. Kiro's words say neither whose limit it is nor what to do, and
with no wait given magpie sent the whole request to the same account
again at 1, 2 and 4s, each try one more against that account's rate.

- failure() and the stream's exception() turn that reason into a 429
  that says Kiro is limiting this account's requests, to wait a minute,
  and that a limit persisting while the Kiro app works is on the account
  for Kiro support, with the request ID (x-amzn-requestid, as the IDE
  reads it) when Kiro gave one.
- When Kiro gives no wait for that reason, Retry-After is 30s, past
  magpie's same-account retries (8s), so the 1/2/4s re-asks stop. A
  wait Kiro does give still wins; other reasons keep magpie's pauses.

Cause, from a real account (the owner's existing kiro-cli sign-in, no
sign-in or refresh, sandbox HOME): a 975KB request is not refused as a
rate: claude-haiku-4.5 answers 400 CONTENT_LENGTH_EXCEEDS_THRESHOLD and
auto (1M) answers 200 in 8.9s; 467KB on haiku 200 in 5.2s; "?" 200. So
the reporter's 429 is Kiro's per-account request-rate state, not the
body or the model. Kiro's own tracker has the same reason on the IDE
for hours (kirodotdev/Kiro#10937, #8549), answered by support.

Run on mote: bun test packages/kiro (146 pass), bun scripts/check.mjs
kiro, and the repo's bun test (6759 pass, 0 fail), each in a temp HOME.
Broken by hand: the new tests against the old index.mjs, 3 red (the
Retry-After cases, the plain message with request ID, the stream case).
Not tried: a real USER_REQUEST_RATE_EXCEEDED (couldn't be drawn without
hammering an account), claude-haiku-5.5 (not on the owner's account),
and whether the Kiro IDE's other request path (CreateResponse) is
rate-counted apart from generateAssistantResponse.

Reported-by: onemezao
2026-11-07 16:58:27 +08:00
yetone bf0a37f6ea inkstone 0.1.2: read the console token magpie saves under metadata
The "API key + console token" method is an api method. magpie's host
save() (internal/plugin/host.js, yetone/magpie 191f3c0af) stores such an
answer as {type: "api", key, metadata: {...inputs, ...result.metadata}}
and drops top-level extras, so the token sat at metadata.uaaToken. The
plugin only read auth.uaaToken / uaa_token / consoleToken, and the card
said to sign in again.

- uaaTokenOf reads the three names at the top level, then under
  metadata. usernameOf reads metadata's username/accountId/email too.
- A renewed token is written back where the entry kept it (putToken):
  an api entry keeps it under metadata, an oauth entry at the top level,
  and nothing else in the entry changes. The host's client.auth.set
  stores the body as given, with no shape it needs, so there is no
  reason to lift the token out of metadata. The 401 retry uses the
  same writer on a copy.
- The manual method's success result now carries metadata with the
  parsed token. result.metadata overrides inputs in save(), so the
  pasted cookie string (with its other session cookies) is no longer
  what gets stored under metadata.uaaToken.

Tests use the exact object save() writes: the card reads for each of the
three names under metadata (usage.test.mjs), a renewal through the fake
browser writes back exactly {type:"api", key, metadata:{apiKey,
uaaToken:<renewed>}} (fake-browser.test.mjs), and the manual result's
metadata.uaaToken is the parsed token (api.test.mjs).

Run on mote, HOME=$(mktemp -d):
- 0.1.1 index.mjs with the new tests: all 3 new tests red.
- packages/inkstone bun test: 73 pass, 0 fail.
- bun scripts/check.mjs inkstone: registry.json and inkstone ok.
- root bun test: 6757 pass, 20 skip, 0 fail.
Broken by hand, each red: putToken always writing the top level (the
renewal test's write-back has a top-level uaaToken); metadata read for
uaaToken only (the uaa_token/consoleToken cases fail).
Not tried: a real InkStone account signed in with the manual method
through magpie; the 401-retry path with a metadata entry has no test of
its own.

Fixes #826
Reported-by: HuHong-Tao
2026-11-07 16:23:37 +08:00
yetone 02aae692bc inkstone 0.1.1: the fake-browser test deletes its 59 MB build, and the wait test fails when the title is read off Windows
Two of #824's three points, in the same 0.1.1 as #825.

1. fake-browser.test.mjs compiled a ~59 MB fake Chromium into a new
   $TMPDIR folder every run and never removed it. afterAll now removes
   that folder with the profile.
2. "off Windows the login wait ends on process exit, never on a title"
   passed with the Windows-only title check turned on for every OS:
   the title read starts after 5 s and windowTitleOf returns "" off
   Windows anyway. waitForConsoleWindow takes titleOf and settleMs
   (defaults: windowTitleOf, 5000, the same as before), and a new test
   gives it a title that shows the console at once: on darwin and linux
   the wait times out with the title never read; on win32 the same
   title ends it with "console", so the check is not empty.

Not done: point 3, the comment line that appears twice in the shared
opencode2 adapter, is in every package's copy, not inkstone's alone.
#824 stays open for it.

Run on mote (macOS) through mote-run, HOME=$(mktemp -d), at this tree:
- packages/inkstone: bun test: 71 pass, 0 fail.
- bun scripts/check.mjs inkstone: ✓ registry.json, ✓ inkstone.
- repo root bun test: 6755 pass, 20 skip, 0 fail across 489 files.
  (A first root run with TMPDIR also moved had 20 devin reds from
  devin's own HOME-under-tmpdir guard; that was the run's setup, and the
  rerun with HOME only is the record.)
- inkstone-fake-browser-* folders in mote's $TMPDIR: 6 before the root
  run, 6 after.

Broken by hand, each on mote:
- canReadTitle = true on every OS: the new test is red (Expected
  "timeout", Received "console"); the old test still passes.
- fakeDir left out of afterAll's cleanup: fake-browser.test.mjs passes
  and the folder count goes 6 to 7.

Not tried: the cleanup on Windows (rmSync with retries, in a try).

Refs #824
2026-11-07 16:05:41 +08:00
yetone 3ae528f031 inkstone 0.1.1: with no Chromium browser the browser sign-in fails at authorize and names the other sign-ins
On a machine with no Edge, Chrome or Chromium (a Mac with Safari only),
the browser sign-in's authorize() returned opened: true and "A browser
window opens…", and the failure showed only later, in the callback:
browserCandidates() returns [] without throwing, and only a bad explicit
path threw.

requireBrowser() in lib/browser.mjs is now the one check, used by
authorize(), openSession() and signInWithBrowser(). An empty list fails
at authorize, before anything says a window opened. The message names
the other two methods, "API key only" and "API key + console token" (the
console token can be copied from any browser, so the ink-credit card is
still reachable), and MAGPIE_INKSTONE_BROWSER. On macOS it also says
Safari can't be used, since the sign-in runs in its own browser profile.
signInWithBrowser checks the browser before it makes a one-off profile,
so a missing browser leaves no folder behind. The Linux no-display
refusal names the same two methods. The README says which browsers the
browser sign-in needs.

The plugin takes a browserCandidates option, a test hook in place of
the real lookup; the existing sign-in-methods test now uses it too, so
it no longer depends on whether the test machine has Chrome.

Tests: api.test.mjs "with no Chromium browser the browser sign-in fails
at authorize and names the other sign-ins (#825)" and browser.test.mjs
"requireBrowser gives the first browser, and with none says what to use
instead (#825)".

Run on mote (macOS) through mote-run, HOME=$(mktemp -d), at this tree:
- packages/inkstone: bun test: 70 pass, 0 fail.
- bun scripts/check.mjs inkstone: ✓ registry.json, ✓ inkstone.
- repo root bun test: 6754 pass, 20 skip, 0 fail across 489 files.

Broken by hand, each on mote:
- authorize back to the old no-throw lookup: the authorize test is red
  (Expected "failed", Received undefined).
- the fallback names taken out of the message: both new tests red
  (Expected to contain "\"API key only\"").
- the macOS Safari line taken out: both new tests red (Expected to
  contain "Safari can't be used").

Not tried: a real sign-in on a Safari-only Mac or on Windows/Linux
without a browser; the empty-list path is reached through the test hook.

Fixes #825
Reported-by: HuHong-Tao
2026-11-07 15:56:13 +08:00
caozhenyuan 4200fed099 kiro 0.1.29: what Kiro's meteringEvents say a request cost goes on as usage.credit (#823)
Kiro gives no token counts, only what each request cost in credits: a
meteringEvent ({"unit": "credit", "usage": 0.091}) near the end of its
reply. The plugin read past it, so magpie's Usage page reckoned Kiro's
cost from estimated tokens with no cache (yetone/magpie#4328, #3761).

The credits of a request's meteringEvents are now summed (a hosted web
search's turns are one request) and said as usage.credit in the last
message_delta, streamed, or in the message's usage, as WorkBuddy's
usage.credit is said on the Chat path. A reply with none says no credit;
one Kiro says cost 0 says 0. An event in another unit, or with a usage
that isn't a number of at least 0, is left out. magpie reads the field on
/v1/messages once the host half of yetone/magpie#4328 is in; until then
it is passed over.

Run at 57a4d35e on mote (Bun 1.4.2, HOME a temp dir): bun test
packages/kiro 144 pass, 0 fail; bun scripts/check.mjs kiro ok; bun test
(whole repo) 6679 pass, 0 fail. Merged onto main e7004d93: kiro 144 pass,
check ok. CI pr run 42349117220 green, attempt 1. npm had 0.1.28.
Broken by hand, each red: meteringEvent ignored (4 tests), last event
kept instead of summed, any unit taken, a negative taken, a string usage
taken, a search's turns not summed, a search keeping only its last turn,
a stated 0 dropped.
Not tried: magpie's ledger with the host half (not merged); a real Kiro
reply with more than one meteringEvent.
2026-11-07 15:27:27 +08:00
我是一条没有名字的区 e7004d9354 inkstone 0.1.0: Intern InkStone (书生·端砚) Token Plan, browser sign-in, credit card and ink-* key chat (#775)
New package @magpie-community/opencode-inkstone-auth 0.1.0 for Intern
InkStone (书生·端砚, Shanghai AI Lab) Token Plan, provider id
`intern-inkstone`. Community package by yunwang2442-creator.

What it does:
- Browser sign-in (Edge/Chrome, its own profile under
  $XDG_CONFIG_HOME or ~/.config/magpie/inkstone-browser, or
  %LOCALAPPDATA%\magpie\inkstone-browser). The login window has no
  debugging port. A headless CDP read takes the uaa-token cookie, and the
  same read renews it silently later.
- Usage card: ink-credit balance, 5-hour and 7-day windows, credit packs.
- Chat: a pasted ink-* API key, or one the sign-in creates, named
  ink-<host4>-<acct4>-<rand4> (18 of the console's 20 characters). An
  idempotency clash (-15109) retries with a fresh name, up to three times.
  Pruning is on by default. It only touches this machine's and account's
  prefix, keeps the newest two and the key this sign-in created, and never
  deletes manual keys or keys of unknown age.
- Closing on Unix: SIGTERM, then SIGKILL only after a 15s grace. Leftover
  browsers are matched by --user-data-dir=<escaped profile>, and Windows
  uses .Contains().
- The login wait comes from an injected waitForLogin in tests. No env
  hook is left in production code.
- Hosts: discovery.intern-ai.org.cn, discovery-api.intern-ai.org.cn,
  127.0.0.1 (CDP).

Outside the package: scripts/opencode2.mjs lets a prompt with
`required: false` stay optional (`p.required !== false`). Every package's
copy is synced byte for byte, so all 39 copies in the merged tree are blob
afe074cb. No other package sets `required: false` on a prompt, so this
changes nothing for them. Also a root README row and a registry entry.

Review at 36412a15, on mote, HOME=$(mktemp -d), Bun 1.4.2:
- bun test packages/inkstone: 68 pass, 0 fail in Asia/Shanghai, UTC,
  America/Los_Angeles and Pacific/Kiritimati.
- bun scripts/check.mjs inkstone and bun scripts/check.mjs: ok.
- bun test (repo), on 36412a15 merged with origin/main e7cb9dc5:
  6743 pass, 20 skip, 0 fail. main has since moved by cline 0.1.14 and
  zcode 0.1.55 only, and none of the adapter copies changed.
- Broken by hand, each red: no protectName protection; prune_keys default
  off; no post-sign-in prune; no SIGTERM on close; the -15109 retry keeping
  its name.

Not tried: a real InkStone account sign-in on macOS, Linux or Windows (no
account here); a live chat request; magpie end to end with the plugin.
2026-11-07 15:07:06 +08:00
yetone fa310fa9c3 cline 0.1.14: the own-routing test runs with the pin on; the pin is turned on by plugin option, not magpie's tick
Follow-up to #819 (0.1.13).

Changed:
- index.test.mjs: "the user's own provider or providerOptions on a
  ClinePass DeepSeek request is left as they set it" and "a client's own
  providerOptions refused by Cline is passed through" now run with
  `{ pinUpstream: true }`. Without the pin on they passed whether or not
  fetch kept the client's own routing field.
- README and the 403 hint: the pin is turned on and off by the plugin's
  pinUpstream option (`magpie plugin options
  @magpie-community/opencode-cline-auth '{"pinUpstream": false}'`, or the
  OpenCode plugin/provider.cline options). magpie's Upstream tick is
  magpie's own setting; it never set this option, and magpie no longer
  writes providerOptions for it (yetone/magpie#5442).
- 0.1.14. A client-sent providerOptions is handled as in 0.1.13.

Run on mote, HOME=$(mktemp -d), Bun 1.4.2, at this tree on 39f59971:
- bun test packages/cline: 92 pass, 0 fail.
- bun test (repo): 6569 pass, 20 skip, 0 fail.
- bun scripts/check.mjs cline: ok (registry.json, cline).
- Broken by hand: fetch's `ownsRouting(chat) ? null :` removed, both
  own-routing tests red (2), green with it back.

Not tried: a live Cline request (no Cline key here).
2026-11-07 14:58:19 +08:00
yetone ea9904d54c zcode 0.1.55: no claim while ZCode asks its security check; the desktop's X-Title and a per-turn x-query-id
young02036 (Discord, 11-07): on an account with a GLM Coding Plan, the
GLM-5.3-Flash-Trial gift answers 405 code 3012 ("blocked due to unusual
activity") while the paid models work, and the plugin's daily check-in
gets a captcha every day while the app shows none.

Diffed against the official ZCode 3.17.2 (zip sha512 matched its
manifest; glm/zcode.cjs and app.asar's host and renderer code):

- The claim. The app's claimManualPlan posts the claim with
  X-Aliyun-Captcha-Verify-Param/Region, and its renderer always runs the
  traceless captcha first. client/configs says captcha.enabled true
  (testdata/client-configs-1107.json, the real reply cut down). The plugin
  can't make that proof, so each day's claim was one more refused claim.
  Now claimDaily reads client/configs (cached ten minutes, a failed read
  not kept) before posting: while captcha.enabled is not false nothing is
  posted and each plan answers captcha, "claim it in the ZCode app"; a
  config that doesn't read is failed, nothing posted. The captcha is not
  got past.
- X-Title. The desktop's model requests say "Z Code@electron"
  (sourceTitle from zcode-protocol-entrypoint); the plugin said
  "Z Code@cli".
- x-query-id. ZCode sends one per user query (query_<uuid>, prefix
  stripped). The Start Plan path now sends a UUID made from the session
  and the count of user text messages: the same through a turn's tool
  results, new with the next user message.

The 3012 itself: on the owner's account (no gift, so code 1005 "exceed
quota limit" means risk control let it through) every shape answered
200 code 1005: adaptive thinking with effort max and max_tokens 64000, a
1.6 MB body, max_tokens 200000, thinking enabled with budget 1024, and
X-Title electron. So the request's shape is not what trips 3012; the
reporter's account looks blocked by risk control as a whole, which only
ZCode support lifts. That the daily captcha-less claims fed it is a
guess.

Run (mote): HOME=$(mktemp -d) bun test in packages/zcode, 222 pass 0
fail; bun scripts/check.mjs zcode ok.
Broken by hand, each red, then restored (cmp ok): the claim gate removed
(2 fail), a config read failure taken as no captcha (1), x-query-id not
set (2), user turns counted wrong (1), the title back to cli (3).
Not tried: a real claim or a real 3012 account (the reporter's); the new
headers against an account that has a gift; Windows and Linux.

Reported-by: young02036
2026-11-07 14:57:59 +08:00
caozhenyuan e7cb9dc54c kiro 0.1.28: an Identity Center account's two credit regions, each with its overage cap (#820)
An IAM Identity Center organization can enable Kiro in both of its regions, us-east-1 and eu-central-1. Each region has its own profile, its own month of credits and its own overage cap. The plugin used only the first profile it found, so when that region was used up the account left rotation while the other region still had credits.

- Overage: with overageStatus ENABLED, the month counts against overageCap (the month's whole limit).
- Identity Center sign-ins list their profiles in both regions and keep them with the account (`profiles`, by region). A region with no profile is asked for again at most every PROBE_MS (10 minutes).
- A request goes to the first enabled region with credits left. On MONTHLY_REQUEST_COUNT / USAGE_LIMIT that region rests until its reset (an hour when none is known), and the request is sent once to the other region. A rate limit is passed on with Kiro's wait as Retry-After. When every region is used up, the reply is a 429 that names them, carries the last wait and names any region not enabled.
- auth.usage reads both regions. Each region gets a window, shown only, and their sum is the window magpie weighs the account by.
- Builder ID, Google, GitHub and API key sign-ins keep one region.

Run at head ce4004b99257fb66bac92a564a322b693748a7ec, merged onto main 978bb42b (mote, macOS, Bun 1.4.2, Node 22.22.0, HOME=$(mktemp -d)):
- bun test packages/kiro: 140 pass, 0 fail (main: 127 pass).
- bun scripts/check.mjs kiro and bun scripts/check.mjs: ok.
- Repo-wide bun test: 6675 pass, 0 fail (main: 6662 pass).
- Reviewer's Retry-After probe, social and Identity Center 429s: green, as on main.
- Broken by hand, each red in 1-2s: usedUpSaid always or never true, no spend on a used-up reply, overage off, pick ignoring spent regions, usage never spending, two regions for every sign-in, no PROBE_MS gate, no tried guard (red, no longer a hang), the wait dropped from the loop, the wait dropped from the all-used-up 429.
- Survives: a region not enabled that is never probed again after the first probe. No test covers the re-probe after PROBE_MS.

Not tried: a real Identity Center account running out in one region. The author ran real accounts enabled in one region each.
2026-11-07 14:15:17 +08:00
yetone 978bb42bce qoder 0.2.63: max_tokens never goes above the model's ceiling (#822)
Qoder CN's QoDuck (lmodel) refuses a max_tokens above 131072 with a 400
"Error in upstream response: Range of max_tokens should be [1, 131072]".
qoderBody sent the client's budget unchanged (a DeepSeek-sized 384K from
DeepSeek Harness / pi), and failure() read every "Error in upstream
response" as the vendor's transient 502, so magpie retried on each
account and rested them all with backoff; lmodel never answered.

- qoderBody holds max_tokens to the model's ceiling and never raises a
  smaller one: what a refusal named for that model key, else the listing
  entry's max_output_tokens, else OUTPUT_CAPS (lmodel 131072). The
  context_length window is counted with the held value.
- failure() reads "Range of max_tokens should be [lo, hi]" before the
  upstream-failed 502 as the request's 400 (signIn ""), with Qoder's
  words and the ceiling.
- ask and askLingma send such a refusal again once at that ceiling and
  remember it for the model, so a model with no known ceiling (any other
  Qoder, Qoder CN or Lingma model) answers too. Refused again, the 400
  goes back as Qoder said it.
Siblings: one body builder (qoderBody) serves every site (qoder, qoder-cn,
QwenWork, enterprise, VPC, dedicated, Lingma) and both stream=true/false;
the plugin has no Responses path. The HTTP reply and the stream's
envelope both go through failure().

Run (mote): packages/qoder bun test 417 pass; bun scripts/check.mjs qoder
ok; repo HOME=$(mktemp -d) bun test 6662 pass 0 fail. Fixtures use the
issue's literal error text.
Broken by hand: without the clamp 19 of the new tests red; without the
range read 11 red; without the resend 10 red.
Not tried: a real qoder-cn account on lmodel (none here); whether Qoder
also validates context_length (the issue could not capture the body);
the learned ceiling is kept per model key in the process, not per site.

Reported-by: Gruu6y
2026-11-07 13:40:48 +08:00
mdwsk88 107ab442b8 registry: magpie-search-mix is listed under its package name; zh summary says 混合搜索 (#809)
Lists the community Search Mix plugin under its npm package name,
magpie-search-mix, in registry.json and the README table, so the Plugins
page names it as a community plugin (#724). The zh summary now opens with
混合搜索. The en summary is unchanged.

npm (--prefer-online): magpie-search-mix latest is 0.1.2 (2026-11-07),
magpie.name "magpie-search-mix". 0.1.1 -> 0.1.2 renames the display and
search API name and adds a README section; no new code, endpoints or
dependencies.

Run at merged head 16fe7e9c (origin/main 090b46ba + 331c51cb) on mote,
Bun 1.4.2, HOME=$(mktemp -d): `bun scripts/check.mjs` exit 0, all ok;
`bun test scripts/` 22 pass, 0 fail.
2026-11-07 13:15:16 +08:00
Alexhang1314520 090b46ba4f agent-nowledge-mem 0.1.0: pick Nowledge Mem's Default, AI Now and Background models in magpie (#821)
Adds packages/nowledge-mem-agent (@magpie-community/agent-nowledge-mem
0.1.0), a kind: agent registry entry and a row in the README's Agents table.
Picking a magpie model for the "Nowledge Mem / AI Now" agent points
Nowledge's Default, AI Now and Background purposes at one native
`magpie:nowledge-agent` provider instance; disconnecting restores what the
user had. Distinct from packages/nowledge-mem (gateway recall/capture).

The descriptor (nowledge-mem.agent.js) records the selection; a
dependency-free Bun main syncs it through Nowledge's /remote-llm/* routes
with a journal, manual-edit detection, a restore phase, a pid lock and 0600
atomic writes. Remote backends need HTTPS with a key, redirects are
refused, and unchanged remote polls back off to 30s.

Reviewed head d3b6e3937b371dea24839fe602818c4e6aa4d03d, merged onto
origin/main 049295f5 (clean). Run on mote (macOS) and WSL2 Ubuntu 24.04,
Bun 1.4.2, HOME=$(mktemp -d) each run:
- bun test packages/nowledge-mem-agent: 28 pass, 0 fail (both machines)
- bun scripts/check.mjs nowledge-mem-agent: ok (it skips agent hooks)
- bun scripts/check.mjs: exit 0
- repo-root bun test: 6608 pass, 20 skip, 0 fail (479 files)

Broken by hand, one at a time, each red on the named test:
redirect: 'error'; the quiet-period return; the remote backoff skip;
!referenced before provider removal; defaultRestored before turning
Remote off; the native provider_type check; the per-purpose shape check;
the sandbox's XDG containment; the sandbox's agent-home deletes; the
sandbox's HOME check (its two halves together; each alone is covered by
the other).

Not tried by the reviewer: a real Nowledge Mem app or nmem (the author
reports a contract run on Nowledge 0.10.115), the opt-in smoke and
contract scripts, the runtime inside magpie's plugin host, Windows.
2026-11-07 12:45:50 +08:00
我是一条没有名字的区 b475f33187 autoclaw 0.2.17: name the campaign points on the card, and stop the check-in from signing out healthy accounts (#774)
The usage card gets a campaign-points row (剩 / 已领 / 过期(近期)) read
from ledgers_std?wallet_scope=campaign, re-filtered client-side, counted
per wallet instance and never carrying `balance`; cached per account for
10 minutes, a failed read not cached, capped at 100 settled entries.

Check-in fixes after 0.2.15: dailySignin never throws, so a 401 no longer
escapes auth.refresh and signs out a healthy account; the CAS write-back
never resurrects a logged-out record; a quota 403 at task-list keeps the
sign-in; a second 401 right after renewal is a retryable failure; every
rotation is remembered and an expired memo is refreshed over the wire;
refresh survives a network error on the first host; maybeSignin dedupes
by the Beijing day; the config dir falls back to USERPROFILE/homedir on
Windows. The day-boundary test restores Bun's clock with setSystemTime()
(no argument), and a guard test fails if the clock is left frozen.

Version 0.2.17 (0.2.16 is #800's; 0.2.17 is in neither npm nor dist).

Reviewed head 749603160c184901a918a8f48a79b719431181ae, merged onto
origin/main 049295f5 (clean). Bun 1.4.2, HOME=$(mktemp -d) each run:
- mote (macOS): bun test packages/autoclaw 100 pass, 0 fail; check.mjs
  autoclaw ok; check.mjs exit 0; repo-root bun test 6613 pass, 20 skip,
  0 fail (475 files)
- WSL2 Ubuntu 24.04: bun test packages/autoclaw 100 pass, 3 runs of 3

Broken by hand, one at a time, each red: setSystemTime(new Date()) as the
reset, and no reset (the clock guard); the UTC day (2 tests); evicting an
in-flight entry; no cap; the old CAS; no memo record on success (2); the
quota-403 classification; the post-renewal degrade (2); the USERPROFILE
fallback; the memo expiry. Green, so untested: dailySignin's
`if (!res.ok) return null`.

Not tried by the reviewer: a real AutoClaw account (the author reports a
read-only check on two Windows accounts), Windows.
2026-11-07 12:45:44 +08:00
yetone 049295f500 autoclaw: the rot-away test sets the first dump's write time apart
On WSL2 (magpie-desktop, Ubuntu 24.04) the test "a 406 dumps the system
prompt, opt-in; the oldest dumps rot away by write time" was red 2 of 3
at 09a27bef: the first dump and the ten refusals were written within one
mtime tick, so rotation by write time could drop a refusal instead of
the first dump. The test now gives the first dump a write time older
than every refusal (and newer than the pre-placed file). The plugin's
rotation is unchanged; it still sorts by write time.

Run: wsl-run bun test index.test.mjs 3x: old 1 of 3 green, new 3 of 3
green (62 pass); mote bun test 62 pass.
2026-11-07 12:02:54 +08:00