Commit Graph
923 Commits
Author SHA1 Message Date
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
zxy20250120 09a27bef01 zcode 0.1.54: a busy hold also stops requests already in flight (#801)
When five Start Plan requests in 60s get ZCode's 3008 "busy", magpie holds
zcode.z.ai off, so that the counting firewall doesn't escalate to its 405
block. While the hold is on, a Start Plan request is answered locally with a
429 carrying Retry-After, and it is not counted. A request that was already
retrying when the hold armed now stops too: askBusy checks the hold after
counting a cap and again after each wait. The coding plan and free first's
replay pass no onCap, so the hold never touches them. When the edge (405)
hold and the busy hold are both on, the edge hold's answer wins.

Run at the reviewed head 19f7e9019ca22a3bad97c974bdf796b88ec8e3e3 (Bun 1.4.2,
HOME=$(mktemp -d)):
- macOS (mote): bun test packages/zcode 217 pass 0 fail; bun scripts/check.mjs
  zcode ok; repo-root bun test 6580 pass, 20 skip, 0 fail (475 files).
- Linux (WSL2 Ubuntu 24.04): bun test packages/zcode 217 pass 0 fail; check ok.

Broken by hand (full zcode suite each):
- post-sleep hold check removed: red, 16 asks instead of 12;
- busyCap's in-hold return removed: red, hits 2 instead of 0.
- The post-cap check removed, or onCap keying dropped: still green. These are
  latency and coding-plan scoping, left for a follow-up test.

npm had 0.1.51 to 0.1.53 at review time, so 0.1.54 is free.

Not tried: a real ZCode 3008 storm, the firewall's real 405, magpie's fallback
on the hold's 429 in a real gateway run, Windows.
2026-11-07 12:00:06 +08:00
yetone 1d6aa50e90 autoclaw: the 406 dump tests make their temp folder under tmpdir, not beside it
#800's tests called mkdtempSync(tmpdir()). On macOS tmpdir() ends in a
slash, so that made a folder inside it. On Linux it is "/tmp", so the call
tried to make "/tmpXXXXXX" at the root and failed with EACCES. The publish
run for 0469390a went red on ubuntu, and autoclaw 0.2.16 never reached
dist. The three calls are now mkdtempSync(join(tmpdir(), "autoclaw-test-")).
Test-only change: the package is unchanged and stays 0.2.16, which this
push publishes.

Run: packages/autoclaw `bun test`, 67 pass 0 fail, on Linux (WSL
magpie-desktop, TMPDIR unset, so tmpdir() is /tmp) and on macOS (mote),
each in a temp HOME. Before the fix, CI's ubuntu run had 2 fails, with
EACCES on mkdtemp '/tmp0Ie8Ts'.
2026-11-07 11:02:30 +08:00
zxy20250120 0469390a89 autoclaw 0.2.16: two more identity lines rewritten, and an opt-in 406 dump of the system prompt
Three fixes from live 406s on 11-03 to 11-05.

- The Fable harness's model line "You are powered by the model glm-5.3-flash[1m]." is rewritten to "You are powered by the GLM-5.3-flash model." in the author's own case. A bare model name without GLM is left as written.
- The subagent opening "You are an agent for Claude Code, …" becomes "You are an agent for the Claude Code CLI, …". A `(?! CLI)` lookahead keeps an already-rewritten line from getting a second CLI.
- An opt-in 406 dump. It is off by default. `AUTOCLAW_406_DUMP_DIR` (any directory) or `"dump406": true` (strictly boolean; the default dir is $XDG_CONFIG_HOME, else HOME, USERPROFILE or os.homedir(), then /.config/magpie/autoclaw-406) turns it on. A 406 then writes the rewritten system and developer messages plus `model` (never user, assistant or tool content) to `autoclaw-406-<stamp>-<rand>-<provider>.json`, mode 0600 in a 0700 directory. Only the 10 newest are kept, by mtime. Rotation matches that whole name, so other files in the directory are never touched. A dump that fails never changes the 406. The README documents the switch and says a system prompt can carry the working directory, git status and an email.

Reviewed head 390024c2, merged onto main 367edb50, run on macOS (Bun 1.4.2) with a fresh mktemp -d HOME:
- bun test packages/autoclaw: 67 pass, 0 fail. Nothing was written into HOME.
- Repo bun test: 6570 pass, 20 skip, 0 fail. bun scripts/check.mjs autoclaw: ok.
- Broken by hand, each red: the rotation filter as endsWith(".json"), a truthy dump406, the file's 0600, the dir's 0700, no rotation, no name prefix (and, in the earlier round, the user/tool filter, the default-off check, name-order rotation, both loaders' sent body, the (?! CLI) lookahead, and ?? for XDG_CONFIG_HOME). Loosening the name regex to autoclaw-406-.*\.json stays green; it is covered by a probe only.
- Probes: 21 foreign files and near-miss names, each backdated an hour, all survived eleven 406s, and 10 dumps were kept. dump406 set to "false", "true", 0, 1, "1", {}, [], null or undefined stays off. The user turn is in no dump.
- Not tried: Windows modes and the USERPROFILE fallback on a real Windows GUI process, and a real AutoClaw 406.
2026-11-07 10:29:57 +08:00
Xyfer 39f59971c0 cline 0.1.13: no default DeepSeek pin; a refused providerOptions pin says how to turn it off (#819)
Since 2026-11-06 Cline answers any client-supplied `providerOptions` with
403 `client-supplied "providerOptions" model routing is not supported`
(yetone/magpie#5442). 0.1.12 pinned ClinePass's DeepSeek models with
`providerOptions` by default, so every such request failed unless the user
set `pinUpstream: false`.

Changed:
- No pin by default. `providerOptions` / `provider` is written only with
  `pinUpstream` on, and the pins themselves are the same as 0.1.12. The
  default pin's unpinned retry (`unpinWorthy`) is gone with it.
- A pin this plugin wrote that Cline refuses with that exact 403 comes back as
  a 403 that says to turn the pin off. It is not retried unpinned. A client's
  own `providerOptions` refusal is passed through as Cline sent it.
- README and comments: the 11-06 refusal, and glm-5.3-flash's top-level
  `provider.only` being accepted but ignored (finalProvider stayed
  `openai-compatible-private` in the author's live checks).
- 0.1.13.

Author's live checks (Cline API key): default Pass DeepSeek 200; pinned 403
with the hint and no retry; glm-5.3-flash 5/5 200 with the pin on or off,
finalProvider `openai-compatible-private`.

Review run at a2d43859 (on main 367edb50), on mote, HOME=$(mktemp -d),
Bun 1.4.2:
- bun test packages/cline: 92 pass, 0 fail.
- bun scripts/check.mjs cline: ok.
- bun test (repo): 6563 pass, 20 skip, 0 fail.
- Broken by hand, each red: the default pin back; the hint for any
  providerOptions 403; ROUTING_REJECTION unanchored; a retry on the refusal;
  no JSON-envelope read. Dropping ownsRouting on fetch's pin stays green: the
  own-routing test runs without pinUpstream now (follow-up).

Not tried by the review: a live Cline request (no key), magpie's gateway with
0.1.13 end to end. Follow-ups in magpie: ClinePassAsked still assumes a
default plugin pin, and the Upstream tick still sends providerOptions
(yetone/magpie#5442 stays open).
2026-11-07 09:54:22 +08:00
yetone 5bbdb82660 grok 0.2.5: a 401 that isn't Grok judging the token, on one Grok Build left good, is a 503 that passes, not "add the account again" (#818)
zane668 got 401 {"error":"Authentication required"} a few times a day on
tokens not near their end. grok models left the same token, so the
plugin said "couldn't renew the sign-in ... add the account in magpie
again", yet the same token answered 2-5 minutes later.

What tells the two apart: cli-chat-proxy answers a token it doesn't take
at once with "Invalid or expired credentials (auth_kind=..., upstream=
Unauthenticated|PermissionDenied, reason=...)" (curl'd 11-07 with made-up
tokens, signed and unsigned, on /models, /responses, /chat/completions,
/billing: each in under 1.5s). "Authentication required" after 78-114s
is not that verdict.

Now, after a 401 on a request, model list or usage read whose renewal
leaves the token as it was:
- the body is not "Invalid or expired credentials", the token is not
  past its end, and grok models didn't exit with an error (it ran, or
  was still running): a 503 with Retry-After: 60, X-Magpie-Sign-In: kept,
  code auth_refused_transient, saying what Grok said, how long it took
  to answer, and that no new sign-in is needed. magpie's gateway reads a
  503 as before (failOther: a short backoff rest, the next account
  asked), so routing is unchanged; only the advice and status change. A
  model list or usage read gives the same words, with no sign-in mark.
- otherwise as before: "couldn't renew the sign-in", sign in again.
- the wait on Grok Build's renewal after a 401 is capped at 15s; the run
  goes on and the next asker takes what it gave. The message names
  grok models' own run time when it is 1s or more.

Where the 78-114s went: the plugin's own part is grok models, capped at
30s by execFile before and at 15s now. grok models "ran" (exit 0) in the
report, so it took under 30s; the rest, at least ~50s, was Grok's answer
to the request. zane668 saw "no first token in 120s" and ECONNRESET on
other vendors in the same windows, so the wait is upstream/network and
the plugin doesn't bound it. The message now says both times, so the
next report shows the split. Not done: the report's suggestion to resend
after a few seconds; the refusal lasted minutes and each try waited
over a minute, so handing over at once is faster.

Left ambiguous: a token xAI revoked but answered with words other than
"Invalid or expired credentials" would now read as passing and keep
being retried with short rests; a revoked real token was not available
to see its words.

Run at this tree:
- packages/grok bun test on mote: 96 pass, 0 fail.
- repo bun test (HOME=$(mktemp -d)) on the Linux VM (wsl-run,
  magpie-desktop): 6571 pass, 19 skip, 0 fail. Not on mote: its suite
  lock had a 3h GUI run and four Go suites queued.
- bun scripts/check.mjs grok on mote and Linux: ok.
- Real: the plugin against the real cli-chat-proxy with a made-up token
  and a fake grok models leaving it: 401 sign_in_unrenewed, Grok's
  "Invalid or expired credentials (... upstream=PermissionDenied ...)"
  quoted, after 1s.

Broken by hand (renew.test.mjs, 15 tests): old index.mjs fails the 503,
bounded-wait, model-list and usage tests (4); passing() without the
TURNED_AWAY check fails 3 (two old tests and the new verdict test); the
CLI's failure ignored fails the exit-1 test; no 15s bound fails the
bounded-wait test (2013ms); models and usage not passing Grok's words
each fail their test.

Not tried: a real "Authentication required" 401 (it can't be called up),
a revoked real token, a real Grok Build slower than 15s.

Reported-by: zane668
2026-11-07 09:52:36 +08:00
yetone 367edb503c zcode 0.1.53: a spent bucket's 200 says 429 on the plain path too (#817)
A ZCode answer that carries a spent code (1005 "exceed quota limit",
1113) inside an HTTP 200 now reaches magpie as a 429 on every path. Before,
only a -Trial entry (forcedGift) and free first's gift did this. On a
gift-only Start Plan account, a request for the plain model (GLM-5.3) went
through `return done(kept(res))` as a 200. magpie took it for a reply that
did not stream (502), failOther, and its window branch rested the whole
account until the bucket reset. GLM-5.3-Flash, which has its own bucket,
went unused for ~22h. As a 429 it is failQuota, and magpie rests the model
whose window is full.

spentSaid reads only a non-stream JSON answer under 400. Any other answer,
a stream included, goes on as it came. A reply whose text happens to say
1005 stays a 200. The same applies to the plan answer free first replays
on (replayOnPlan, three places), and to the coding plan's own 200 with
1113.

Run at 081c67ac on mote, HOME a temp folder: bun test packages/zcode
212 pass, 0 fail; the whole repo bun test 6558 pass, 20 skip, 0 fail;
scripts/check.mjs exit 0. Broken by hand, each red: the plain path back
to done(kept(res)) (gift.test's two new tests, 200 for 429); the
replays without spentSaid (dual.test's new free-first test).

Not tried: a live spent bucket. The 200 body is the reporter's words, and
dual.test's fixture already had it.

Reported-by: zane668
2026-11-07 09:11:36 +08:00
Mañjūṣaka 006e96ef03 output-strategy 0.2.1: finish #814's review follow-ups (#815)
Follow-up to #814 (081c67ac). The core request injection is unchanged.

- Page: static text goes back to English when magpie.theme.lang changes
  from zh to en. Unsaved style picks survive a language change, and the
  title follows the language. zh / zh-CN / zh-Hans use the Simplified
  strings. zh-TW and other languages fall back to English on purpose,
  with <html lang> kept as zh-TW. With no host theme, the page loads in
  English without throwing.
- apply.js: an empty system message gets the style block with no
  leading blank lines. The unused media detector and addedBytes are
  removed.
- style.css: obsolete stats/lang/workspace rules are removed, and the
  720px media block is closed again (52 { / 52 }).
- Tests: lowercase "delete" in the cross-turn cache case;
  empty/null/object system; zh -> en restore; unsaved picks kept;
  zh-TW; a missing theme; style.css brace balance and the version.
- PROVENANCE names ANTISLOP_BOUNDARIES (OmniRoute v3.8.52), checked
  byte for byte against the tag. The page/stats.js ignore is gone.
- Version 0.2.1. dist had only 0.2.0, and npm has no version yet.

Run at 2f971ab9 (mote, Bun 1.4.2, fresh HOME):
- package bun test: 55 pass, 0 fail;
- repo bun test: 6561 pass, 20 skip, 0 fail;
- scripts/check.mjs output-strategy: ok;
- CI run 42320776930 at this head, attempt 1: test and on-npm green;
- page render, main vs head, in Chromium and WebKit at 400/700/1000px:
  identical.
Broken by hand, each turning exactly one test red: the dropped }, the
version at 0.2.0, an unguarded theme.lang, the old conditional
applyTheme, a case-sensitive delete skip, the old appendInstruction,
one-way translate, unkept checkbox state, the old zh* normalize, and
addedBytes put back.
Not tried: a live theme switch in the real magpie window, and real
Claude Code/Codex sessions.
2026-11-07 09:10:31 +08:00
Mañjūṣaka 081c67acaa output-strategy 0.2.0: composable output-style middleware (#814)
Adds @magpie-community/middleware-output-strategy 0.2.0. It is middleware only. It appends composable output-style instructions before the model call, and has a small selection page.
- Codex `instructions` stay byte-identical. The styles go into a `developer` input item at input[0].
- An existing marker means the body was already applied, and it passes unchanged, so the prompt cache holds across turns.
- It writes nothing to disk and has no hooks or telemetry.
- PROVENANCE credits OmniRoute v3.8.52.

Run at 9b47678ba (mote, Bun 1.4.2, HOME=$(mktemp -d)):
- package bun test: 49 pass, 0 fail;
- repo bun test: 6555 pass, 0 fail;
- scripts/check.mjs output-strategy: ok;
- magpie's moejs engine at origin/main 8e350155b: the Claude Code system field is identical over four turns, and the Codex input prefix is stable;
- 12 guards broken by hand, each one red.
- PR CI (test, on-npm): green.

Not tried: real accounts, Codex over websocket, Windows, Linux.
2026-11-07 08:07:11 +08:00
Muyang da8b8d71f3 privacy-gate: release 0.3.0 with branded bilingual docs (#798)
privacy-gate 0.3.0: branded bilingual docs, ShyPie icon and README.

Installs with `magpie plugin add @magpie-community/middleware-privacy-gate`
(from this repo's dist index until npm has the package). Names the
built-in "JS gateway plugins" / "JS 网关插件" (id `middleware`). Icons
are a pie, a shield and a gold chevron, with no bird. magpie.icon points
at packages/privacy-gate/assets/shypie-icon.svg. The middleware code
(privacy-gate.middleware.js) is unchanged since e0a4548a.

Reviewed at 85dbd121b833017982d0a97a2f3fab50be98caab. The last round
(67ae63c3b..85dbd121b) changed only docs/operations.md:10 (ends the
sentence) and the aria-label of the two shypie-icon SVGs ("with a gold
chevron").

Run at 85dbd121b on mote (macOS), Bun 1.4.2, HOME=$(mktemp -d):
- bun test packages/privacy-gate: 62 pass, 0 fail.
- bun scripts/check.mjs privacy-gate: ok, exit 0.
- bun scripts/check.mjs (whole repo): exit 0.
- bun test (root): 6449 pass, 20 skip, 0 fail, 472 files.
- npm pack --dry-run: 12 files, version 0.3.0.
- git merge-tree with origin/main ab0d3fe54: clean.

Not tried: installing 0.3.0 into a running magpie (dist has 0.1.0 only
until this merges). No mover or min in yetone/magpie references it.
2026-11-07 05:56:05 +08:00
yetone ab0d3fe54a kiro 0.1.27: Kiro's wait before asking again goes on as Retry-After
A 429 Kiro answered before any of the reply (USER_REQUEST_RATE_EXCEEDED,
"Too many requests, please wait before trying again.") reached magpie
with no word of when, as the plugin built its error response from
nothing. With one account magpie then asked it again after 1, 2 and 4s
and on through its patience: onemezao's one small message took six asks,
five of them 429.

The plugin now reads the wait where Kiro's own clients read it and sends
it on as Retry-After (whole seconds, rounded up): the Kiro IDE's
x-amzn-kiro-ratelimit-retry-after header and the body's
retryAfterMilliseconds (both ms; kiro.kiro-agent 1.1.499, decompiled in
hj01857655/kiro-account-manager docs/Kiro-1.4.5/re/pfd-full.txt), the
x-amz-retry-after header kiro-cli 2.35's AWS SDK honours (ms, found in
the binary's strings), and HTTP's Retry-After. magpie's gateway already
waits a Retry-After: past 8s it skips the quick retries and rests the
account that long. With none said, nothing changes.

Run (mote, HOME a temp dir): bun test packages/kiro, 127 pass;
bun scripts/check.mjs, ok.
Broken by hand: generate without the wait argument; the new test fails
(Expected "13", Received null).
Not tried: a real Kiro 429. Which of these headers Kiro sends on
generateAssistantResponse's 429 is not seen; the IDE reads them on its
CreateResponse path. Hammering a real account to get one was not done.

Reported-by: onemezao
2026-11-07 03:17:09 +08:00
yetone 1975c937d6 qoder: a streamed request Qoder queues waits up to Qoder's hour, kept alive with comments (#807)
When Qoder queued a request (10605), the plugin waited at most 4 minutes
and then answered 503. Codex retried it, so the user saw the turn stop
and start again while Qoder's own client would have waited up to an hour.
The 4 minutes were there because nothing reached the agent during the
wait.

Now a streamed request with no fallback is answered 200 at once. The
first SSE comment says the queue, and another comment follows every 10s
(QUEUE.beat) while the plugin waits up to QUEUE.held (1h) from the start.
magpie counts each upstream comment as the reply going on: it tells a
Codex client response.in_progress (the event Codex's 300s idle timeout
counts), and its 30-minute translated-silence watch restarts with each
comment. The result goes in the same stream: the answer, or the refusal
as `data: {"error":{message, code}}` (the queue's 503 after the hour, a
113's 429). Cancelling the stream aborts the status ask in flight and
stops the beat. A request that isn't streamed, or that carries
x-magpie-fallback, keeps the 4-minute wait and 503 it had. No setting was
added.

Run on mote: packages/qoder `bun test` (396 pass), `bun scripts/check.mjs
qoder` (ok), and the repo's `HOME=$(mktemp -d) bun test` as CI runs it
(6503 pass, 0 fail).
(Without the temp HOME, devin and zcode's guards refuse to run, as
designed.) queue.test.mjs runs a fake clock and timers: pauses and beats
move the clock, and no test waits on wall time.

Broken by hand, each red, then restored:
- no hold (streamed waits 4 min, as before): 4 red
- no beat timer: the 20-minute test red
- held stream's signal not linked to the status asks: the cancel test red
- held set to 4 min: the 20-minute and the hour tests red

Not tried: a real account that Qoder queues. I have none, so the
stream's shape was checked against magpie's gateway in a test on the
magpie side. A relogin during a held stream loses the "renewed" sign-in
mark, because the headers are already sent. Claude Code counts only 30
pings in a row as alive, about 35 minutes, so a longer wait still ends
there.

Reported-by: real-jacket
2026-11-07 02:20:31 +08:00
yetone 7a2599bdae loomy 0.1.4: DeepSeek-V4.1-Flash keeps its image_url parts (#811)
prefersTagFormat() sent every model id containing "deepseek" through
rewriteImagesToTags(), which turns data-URI image_url parts into
<image_base64> text. That rule came with the plugin (6a9c528a, from
agent2api's images.rs) for the DeepSeek models of the time; the test
fixture's model is "deepseek-v4-flash", listed as "DeepSeek V4 Flash 0731".
The reporter's direct calls show DeepSeek-V4.1-Flash now reads OpenAI
image_url parts (prompt 244 tokens, right answer on two accounts) and
reads the marker as plain text (prompt 10,533, all output spent on
reasoning, empty reply). deepseek-v4-flash-0731 reads neither shape, so
it keeps the marker as before; nothing here makes it worse.

Now a deepseek id with v4.1 / v4-1 in it keeps its parts as sent; every
other deepseek id is rewritten as before.

Run (on mote, via mote-run):
- bun test packages/loomy: 30 pass, 0 fail
- bun scripts/check.mjs loomy: registry.json and loomy ok
- HOME=$(mktemp -d) bun test (whole repo, as CI runs it): 6499 pass,
  1 fail. The fail is sap-aicore's "late failure does not delete a
  newer candidate" under load; it passes 3 of 3 alone, filed as #812.
  (A first run without a sandbox HOME failed devin and zcode tests that
  refuse to run under a real HOME; not a red.)
Broken by hand:
- prefersTagFormat back to "every deepseek": the two new tests (the
  reporter's DeepSeek-V4.1-Flash request through the loader, and the id
  table) go red, 28 pass / 2 fail.
- prefersTagFormat always false: the original 0731 marker test and the id
  table go red, 28 pass / 2 fail.
Not tried: a real Loomy account; the ids and token counts are the
reporter's.

Reported-by: gcq909893267
2026-11-07 02:11:17 +08:00
aqiu817 1d4edc39b7 registry: add DeepAI Code (magpie-deepaicode)
Lists magpie-deepaicode (aqiu817) in registry.json: DeepAI Code with
browser sign-in, the desktop app's saved credentials or an API key, the
device's real machine fingerprint, live models, daily Theos quota and
check-in.

The first review blocked 0.1.1 for its per-account fingerprint (it farmed
DeepAI's daily free quota), its account-pool gateway and debug logs that
printed keys. npm latest 0.2.0 (gitHead e18c6b3, tarball identical to the
repo at that commit) removes all three. A probe against the tarball gave
two keys, one asking for machineMode "account", the same machineFp and the
same X-DeepAI-Code-Machine header.

Run at 4ae03eba (on 0daaf15b), on mote with HOME in a temp folder:
bun scripts/check.mjs exit 0; bun test 6489 pass, 20 skip, 0 fail. The
plugin's own node --test at e18c6b3: 54 pass. Broken by hand: the paste
debug line logging inputs goes red; the desktop debug line and a per-key
fingerprint stay green (follow-ups asked on the PR).

Not tried: a real DeepAI account.
2026-11-07 01:14:01 +08:00
kongbai01203 e0769e8e20 zcode 0.1.52: hold a rate-limited account in the plugin until ZCode's wait is over (#503)
When ZCode rate limits a check-in (HTTP 429 on the touch feed, or code
3002 on a claim), the plugin now holds that account itself. Until the
wait is over, a check-in answers the same failed (message and until) and
sends no request. The wait follows Retry-After (seconds or a date) up to
six hours. Without one, it doubles from 30 minutes. A read that comes
through with nothing rate limited forgets it. magpie before v0.1.3165 asks
a failed again after 30 minutes whatever its until says, which is how #503
saw 180 reads in four days. The hold is keyed by the account
(s.key || s.jwt), so keyless Start-Plan sign-ins each have their own. It
lives in memory, so a restart forgets it.

Run at 017e5dfc (merge base 654d3bea), on mote with HOME in a temp
folder: bun test packages/zcode 208 pass, 0 fail; check.mjs zcode ok.
Merged with origin/main 8163be36: zcode 209 pass; the whole repo
check.mjs exit 0 and bun test 6498 pass, 20 skip, 0 fail. Broken by hand, each red: holdKey back to s.key
(the two-keyless-accounts test), the delete moved before the claims (the
claim doubling test), no forget after a read with nothing to claim (the
doubling test). CI on-npm and test green at 017e5dfc.

Not tried: a live ZCode 429 or 3002.
2026-11-07 01:13:55 +08:00
yetone 8163be365f zcode: test the system shape zcode.z.ai lets through (plugins#348)
XinOrigin's matrix on plugins#348 (11-04) says zcode.z.ai serves a Start
Plan request only when its system is an array of two or three text
blocks, ZCode's first byte for byte and its second as ZCode's begins; a
string, no system, the first block alone, the first with a block of the
caller's, or a fourth block answers 405/3012. The new test sends Claude
Code's shape (billing-header block, prompt, CLAUDE.md block, with
thinking adaptive, context_management and output_config), Codex's string
instructions, no system, and ZCode's first block alone, and checks each
goes out as the passing row: three text blocks, ZCode's first two
unchanged, the agent's text after ZCode's own sections in the third, the
top-level fields kept.

No code change: 0.1.51 already sends this shape (0.1.21 for #343, 0.1.48
for the 3.17.2 texts).

Live, on the owner's ZCode account (11-06 15:48 UTC, a GLM Coding Plan
account with no Start Plan gift), one request each to
zcode.z.ai/api/v1/zcode-plan/anthropic/v1/messages with 0.1.51's
startHeaders and dress:
- Claude Code-style system: 200 {"code":1005,"msg":"exceed quota limit"}
- the same with a 30KB agent system: 200, 1005
- Codex-style string system: 200, 1005
- Claude Code's top-level fields and a tool: 200, 1005
- control, ZCode's first block alone, not dressed: 405 code 3012
  (logid 20261106154826f91ddad38c8bfdefae1d)
So the system check runs before the quota check, and 0.1.51's dressing
gets past it. Not tried: a request on an account with a live gift (the
owner's has none), and a burst of requests.

Run on mote: bun test in packages/zcode, 201 pass, 0 fail, 12 runs in a
row; one earlier run had 5 reds in userid.test.mjs (expect(got.length)
.toBe(1)), not seen again in those 12 runs. bun scripts/check.mjs zcode
ok. Broken by hand: dress sending the agent's text as a fourth block
and more turns the new test red (Expected 3, Received 6); restored,
green.
2026-11-07 00:33:28 +08:00
Gyl1219 f3178ffc26 registry: providers-hub lists Qiniu MaaS (hub-qiniu) (#806)
Lists Qiniu MaaS (hub-qiniu) under magpie-providers-hub in registry.json:
the provider list gains hub-qiniu, and the en/zh summaries say eleven
providers and describe the Qiniu channel (80+ models, one endpoint,
https://api.qnaigc.com/v1). Reopens #772, whose branch was rebuilt; both
of #772's blocking points (model count, endpoint named two ways) are fixed
here. Qiniu serves its own models as a cloud, and lakegan handed the
channel over to the hub on #374, so this is the only Qiniu entry.

Run at 1225f2b0 (on origin/main 0daaf15b), on mote with HOME in a temp
folder: bun scripts/check.mjs exits 0; bun test 6489 pass, 20 skip,
0 fail. npm latest is still magpie-providers-hub 0.12.2 (shasum
c6a441d0, last modified 2026-11-06T00:29Z, the tarball #772's review
matched to the repo at 55b720d byte for byte and ran 229 pass / 1 skip /
0 fail, with the clock and planKeys fixes each broken by hand). Its
index.mjs exports HubQiniuPlugin, the eleven providers match the registry
list, and LICENSES/opencode-qiniu-auth-MIT.txt ships. GET
https://api.qnaigc.com/v1/models answered 89 models today, so "80+" holds.

Not tried: a real Qiniu key.
2026-11-06 23:55:25 +08:00
mdwsk88 0daaf15b6e registry: list magpie-search-mix, a web search API that mixes several (#803)
Lists magpie-search-mix (mdwsk88/magpie-search-mix, npm magpie-search-mix@0.1.0) in registry.json and the README's Web search
APIs table: a search API that asks two of Tavily, Brave, Exa, Firecrawl, You.com, DeepSeek, Doubao Search, Yuanbao Search and
SearXNG at once and gives their pages in turn, deduplicated. kind tools, community true, as @guotree/magpie-websearch.

Reviewed: every line of the npm 0.1.0 package, byte-identical to the repo at 8d535f3. No server of the author's, no
dependencies or install scripts; each key goes only to its own vendor's API or the base URL the user gives, redirects not
followed; logs off by default and never hold the query or a key. Not a relay or reseller.

Run on a macOS box with HOME=$(mktemp -d), at 97f34721 merged on main f58fa9d9:
- bun test: 6489 pass, 0 fail; bun scripts/check.mjs: 48 ok; registryProblems(registry.json): none.
- package's own bun test: 69 pass, 0 fail; red when redirects are followed, a key is left unmasked, the query is not hidden,
  one source is accepted, dedup or key rests are removed.
- real: keyless You.com gave 3 pages in 1.8 s; with a bogus Tavily key beside it, Tavily was turned away (key masked) and
  You.com's pages came back.
Not tried: the keyed vendors, and inside magpie's GUI.
2026-11-06 23:24:03 +08:00
Pursuit806 35ddd0d9bc astudio 0.2.0: browser sign-in, one pool slot per account (#781)
Browser sign-in for AStudio (fresh Chrome/Edge profile, harvest ssoSessionId +
account_id, exchange through auth/bearer-token), one pool slot per account
(accountId = uid), and a check-in that reads the daily GRANT ledger first and
sends no write when today's grant is already there. Windows built in
Beijing time; transient-only retries; profiles removed on every path.

Reviewed at 11da33c74442328eae462311914eb0ef177946a7, run on a test machine
with a temp HOME:
- bun test packages/astudio 78/78 in Asia/Shanghai, UTC and
  America/Los_Angeles; node --test 78/78.
- bun scripts/check.mjs astudio ok; repo bun test 6275 pass, 0 fail.
- Merged onto main 86778e66: astudio 78/78, check.mjs ok, repo bun test
  6489 pass, 0 fail.
- Broken by hand, each red: 5xx not transient, catalog redirect dropped,
  browser precheck dropped, check-in gated on token, profile kept on
  abort/timeout/launch failure, the "0 分钟" label.
- 0.2.0 is the next version (dist index has 0.1.4).
Not tried: a real iFLYTEK account.
2026-11-06 22:47:26 +08:00
qingnian108 86778e6646 agent-console 1.3.7: auto-detect unlabelled code blocks, html-only sanitize, Windows desktop reconnect through Magpie's Try again (#792)
Code blocks are drawn in the same pass as the Markdown, so a streaming reply no longer flickers. Two fixes from the review on 40eb3027:
- An unlabelled fence is detected by highlight.js again (`highlightAuto`, behind a 128-entry LRU). Only a fence that is still open at the end of a streaming message stays plain "text" (`isClosedFence`, which follows marked's fence rule).
- DOMPurify is back to the html profile only. The code-block icons are per-load random placeholders until after sanitize, and `codeBlockKey` is gone.

The Windows desktop reconnect is also fixed. `safeBackUrl` (gate, wrapper and web) takes loopback Magpie pages only, never `http://wails.localhost`. WebView2 can't route a 127.0.0.1 frame's request there, so it showed its gray error page. In the desktop window the wrapper, or an unwrapped daemon page, posts `{magpie:1, method:"error"}` instead, and Magpie's pluginpages.js answers with its Try again card. A stale stored wails back URL is dropped.

Reviewed at c520fa46 (merge base 1eb9473f = main) on mote (mote-run, HOME=$(mktemp -d), package copied out of the workspace):
- npm ci; `npm run check` clean; `npm run verify:build` OK for all 5 files.
- `npx vitest run` with CHROME_PATH set to Playwright's Chromium 1248: 77 files, 567 passed, 17 skipped, 0 failed. markdown-render-browser ran (it went red under the hand-breaks).
- `bun scripts/check.mjs agent-console` ok. Repo `bun test`: 6449 pass, 0 fail.
- Broken by hand, each red:
  - autoDetect forced on while streaming: markdown-render-browser red.
  - `svg: true` put back in the profile: markdown-render-browser red.
  - Auto-detection removed: codeBlock and markdown-render-browser red.
  - LRU eviction removed: codeBlock red.
  - `isClosedFence` accepting any backtick run: codeBlock red.
  - wails.localhost accepted again in gate.mjs, then in backToMagpie.ts: ac11 red (3 and 2 tests).
  - The same in wrapper.mjs: wrapper red (4 tests).
  - The stale stored back kept: wrapper red.
- Read magpie's pluginpages.js on main: `method:"error"` from the page's own frame calls `broke(key, why)`.

Not tried: a real WebView2 on Windows (the reconnect path), or a real streaming reply in the desktop app.
2026-11-06 22:01:43 +08:00
nicegui 1eb9473f5b cursor 0.2.43: read per-step ModelCallCompletedUpdate usage (#796)
Asks AgentService/Run for emit_model_call_usage (AgentRunRequest field 37) and reads InteractionUpdate 31 (ModelCallCompletedUpdate: model_call_id, then input, output, cache read, cache write and reasoning tokens). These field numbers are checked against cursor-agent 2026.11.05-86047df's bundle. A multi-step native turn's final step reports that call's exact counts. The rest of TurnEnded's totals goes to usage.magpie_deferred, or the earlier calls' #31 sum when TurnEnded has no counts. A stateless step with a #31 before it seals takes that count and doesn't poll the dashboard. Without #31, both paths are as before.

Reviewed at d2c49f3b on mote (mote-run, HOME=$(mktemp -d)):
- bun scripts/check.mjs cursor: ok.
- bun test packages/cursor: 406 pass, 0 fail. native-e2e alone 3 times: 145 pass each.
- Probes: TurnEnded with no counts and a #31 per step, and only the final step's #31. Both give own 61000/700 and deferred 105000/1400, which add up to the turn.
- Broken by hand, red each time: no field 37; native ignoring #31; #31 read unshifted; stateless ignoring #31; stateless still polling after #31.
- Not red: dropping the lastStepUsage reset in nextStep. That test gap is filed as a follow-up.

Not tried: a real Cursor account (whether api2 sends #31, and in what order).
2026-11-06 20:54:23 +08:00
Muyang 28108ddeec privacy-gate 0.1.0: ShyPie Privacy Gate, a gateway middleware that keeps binary parts and blobs local (#685)
New package @magpie-community/middleware-privacy-gate 0.1.0 (siml1169): a
gateway middleware that refuses image, file and audio parts, encoded blobs
and models outside an allowlist before a request leaves magpie, or in
binaryPolicy "guide" replaces each binary part with a short text note. A
typo in any option falls back to the stricter side; a malformed allowModels
refuses every request.

Reviewed at 2a998b73b4ae5f6ae072f12ea9ef27008692c892 (earlier rounds at
ab8c0ebe and before):
- mote, HOME=$(mktemp -d), Bun 1.4.2, merged onto origin/main 6549b633:
  bun test packages/privacy-gate 62 pass; bun scripts/check.mjs ok.
- Broken by hand: the allowModels check off (2 red), guide mode's blob scan
  removed (3 red), the mime check removed (1 red).
- magpie's own middleware engine (origin/main 3cbb7e042) with this file:
  ~90 cases across binaryPolicy typos, guide mode bounds, signatures and
  allowModels typos, all as wanted apart from the documented value cap.
Not tried: a real vendor or DSH, streaming bodies, Windows and Linux.
2026-11-06 20:22:46 +08:00
Bernardxu123 6549b6335d opendesign 0.1.9: the plan's own credit multipliers, and V4.1 Flash Eco (#794)
A model's rate is now the Design Plan's own deduction multiplier from
open-design.ai/zh/model-credits/ (rates.mjs), not amr-link's catalog cost
word, which disagreed for seven models (Claude Haiku 5.5 2x, GPT-6 Luna 4x,
DeepSeek V4 Pro 1x, ...). A model the table doesn't name keeps its catalog
word. deepseek-v4.1-flash-eco joins the seed with V4.1 Flash's limits and
levels at 0.27x.

Reviewed at 0335afb86a9afb53a576813445c0b6cb4705cfeb:
- rates.mjs checked row by row against the vendor page, fetched 2026-11-06;
  the 0.25x row is the 10-20..10-27 promo, over.
- mote, HOME=$(mktemp -d), Bun 1.4.2: bun test packages/opendesign 27 pass;
  bun scripts/check.mjs opendesign ok; npm pack has rates.mjs and the packed
  plugin imports.
- Broken by hand: rateOf ignoring the table (2 red), config hook not
  re-declaring rate (1 red), eco seed line removed (3 red).
- magpie's host builds config models without rate and never writes a hook's
  result back, so the re-declared rate overrides nothing a user set.
- npm had 0.1.8; 0.1.9 is next.
Not tried: a real Open Design account; the live ids of hy4-preview and
minimax-m3.1-flash (not in the seed).
2026-11-06 20:18:20 +08:00
yetoneandCursor Agent cfa41e5956 gcp-ai 0.2.2: retry a 401 without buffering every body (#739)
Reuse an in-memory body on a 401 instead of cloning every request up front,
and return a 401 on a stream that cannot be sent twice. Concurrent 401s share
one token refresh. Keep the token cache in a WeakMap keyed by the fetch
function, and replace Promise.withResolvers in tests so the suite runs on Node 20.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-06 19:51:18 +08:00
qingnian108 654d3bea1c agent-console 1.3.6: keep chat pinned to the bottom on tall virtualized replies (#787)
agent-console 1.3.6: the chat stays stuck to the bottom as virtualized rows measure taller than their estimate, while a reply streams, and when a hidden view becomes visible. Only an upward scroll during a user gesture leaves the bottom, and jump follows rows as they measure. An ACP default model the session skipped is no longer recorded as synced, so the next idle send tries it again.

Reviewed at baf6475e on mote (HOME=$(mktemp -d), Node 22, npm ci --workspaces=false): tsc daemon+web ok; verify:build byte for byte; vitest 73 files, 544 passed, 17 skipped, with chat-scroll-browser run in Chromium 1248 rather than skipped; bun scripts/check.mjs agent-console ok. With origin/main's Chat.tsx and manager.ts put back and app/ rebuilt, the browser test fails (gap 760 > 2) and both new manager tests fail. 1.3.6 is the next version after dist's 1.3.5. Not tried: the real magpie webviews. PR CI green.
2026-11-06 18:53:53 +08:00
nicegui 484b870266 cursor 0.2.42: a mid-batch checkpoint after a count sent first no longer seals a parallel tool batch (#788)
cursor 0.2.42: a checkpoint whose pending calls equal the calls handed out ends a step short of its count only when tool_requests_listed came after the step's last call update or exec (StepCalls.listedAfter). A count sent first can no longer let a checkpoint between parallel calls seal the batch after one call (502 "native call arrived after its batch was sealed"). An exec also removes its id from the calls Cursor completed by itself.

Reviewed at e0794fef on mote (HOME=$(mktemp -d), Bun 1.4.2): bun test packages/cursor 405 pass, 0 fail; bun scripts/check.mjs cursor ok. Broken by hand: without listedAfter in native, 2 fail; without it in stateless, 2 fail; without byCursor.delete, 1 fails. Trade-off: a count sent before the calls, with Cursor-completed calls that send no update 3, now waits for the quiet timeout instead of ending on the checkpoint. A probe shows it; it hasn't been seen on the wire; filed as #790. 0.2.42 is the next version after npm's 0.2.41. Not tried: a real Cursor account. PR CI green.
2026-11-06 18:53:48 +08:00
狗带带子 c9bbfd89ff raccoon 0.1.8: read grant bills with type=income so a busy account keeps its Credits window (#789)
raccoon 0.1.8: allBills asks the bills endpoint for type=income first, so a busy account's grants are no longer pushed out of the newest 100-row page by spends. The old unfiltered 1000/5000 read is kept as a fallback when the filter is refused.

Reviewed at 34402598 on mote (HOME=$(mktemp -d), Bun 1.4.2): bun test packages/raccoon 49 pass; bun scripts/check.mjs raccoon ok. Removing the type=income read by hand turns the new test red (balance only, no Credits window). 0.1.8 is the next version after dist's 0.1.7. Not tried: a real Raccoon account. PR CI green.

Reported-by: RedFlagRF, nglsk (#520)
2026-11-06 18:53:28 +08:00
guoqchen1001andguoqchen1001 54a55b8b67 warp 0.1.0: Warp AI credits through the Warp app's sign-in (#57)
New provider package @magpie-community/opencode-warp-auth 0.1.0: Warp (the
terminal) AI request credits through the Warp app's sign-in (macOS
Keychain, Windows DPAPI, Linux Secret Service, read-only) or a refresh
token; the account's model list, usage/bonus credits, streaming and tool
calls over Warp's HTTP/2 protobuf API with backpressure. Ships the 1.x
entry (opencode.mjs, main) and the shared 2.x adapter (opencode2.mjs,
exports["."]). Registry entry added. Released through the dist branch
until an owner does the first npm publish.

Reviewed head 62db17e93, merged onto main 6de02a0a. Run there (mote,
temporary HOME): bun test packages/warp 122 pass 0 fail; bun
scripts/check.mjs warp ok; whole repo bun test --timeout 60000 6371 pass
20 skip 0 fail; 2.x load via exports["."] with a fake context registers
both sign-in methods, the warp provider (11 models) and its sdk hook.
Broken by hand: exports -> index.mjs, _internal exported from main,
opencode2.mjs out of files, a one-byte drift in opencode2.mjs, and main
exporting no plugin each make check.mjs fail (the last also the entry
test). Earlier rounds (10-09/10-12, at 0ae2bc3, identical warp code)
broke backpressure, the refresh-token method and the Keychain hex decode
by hand and saw their tests fail.
Not tried: a real Warp account through OpenCode 2.x; Linux with a real
account.

Co-authored-by: guoqchen1001 <guoqchen1001@users.noreply.github.com>
2026-11-06 17:36:54 +08:00
yetone 925d6a253f trae 0.2.32: a conversation keeps its session_id when the plugin restarts
baoguo on magpie's Discord: every call seemed to be a new Trae
conversation, billed and cached as fresh; asked for one Trae session per
agent session. The plugin already sends one session_id per conversation
(0.2.6, #58): the session magpie names (the agent's own header, Claude
Code's x-claude-code-session-id, Codex's session_id, DSH's
x-deepseek-harness-session-id, OpenCode's session; else magpie's hash of
how the conversation opens), with the account, hashed. But the hash's
salt was new in each process, and magpie restarts its plugins on every
update of magpie or of any plugin, so every conversation going on then
went on under a session_id of its own from that point.

Now the salt is made once, in ~/.config/magpie/trae-session-salt
(MAGPIE_TRAE_SESSION_SALT names another file), written to a temp name
and hard-linked into place so processes starting together all read the
one that won. A file that can't be read or made, or holds anything else,
is left as it is and the process has a salt of its own, as before. The
id is derived, not cached, so there is nothing to bound or expire: the
same agent session gives the same id for good. Tests now write their
salt in a temp folder (nonet.mjs).

Run: HOME=$(mktemp -d) bun test packages/trae on mote, 243 pass, 0 fail;
bun scripts/check.mjs trae ok; conversation.test.mjs on Windows
(xiaomi-gpu), 10 pass. Broken by hand: a salt new in each process makes
"a conversation keeps its session_id when the plugin's process starts
again" fail; overwriting the file on a race makes "processes starting at
once on no salt yet all take the one that was made" fail.
Not tried: a real Trae account (none in this magpie), so whether Trae's
prompt cache follows session_id is not measured. dsh-connect-trae's
probe (docs, 11-03) saw cache_read 0 on three same-prefix requests since
10-26, which no session id would change. Claude Code subagents still
share their lead's session, as magpie names them.

Reported-by: baoguo
2026-11-06 17:36:42 +08:00
Akiiwa 6de02a0ab3 agentcompass 0.1.4: canonicalModel resolves a multi-prefix model id by its last segment (#751)
agentcompass 0.1.4: canonicalModel tries the id with its first prefix removed, then its lowercase, then the last path segment and its lowercase, so a multi-prefix id such as openrouter/minimax/MiniMax-M3 resolves to its alias (minimax-m3). An id no alias knows keeps its old key.

Reviewed at 2adb5439 on mote (Bun 1.4.2, Node 22.22.0, fresh HOME): agentcompass bun test and node --test 44/44; bun scripts/check.mjs (package and whole repo) exit 0; repo root bun test 6244 pass, 0 fail. The old code and three of the four new lookups, each broken by hand, turned test 9.7 red; dropping the lowercase of the prefix-stripped id, which was already on main, stayed green. PR CI green on attempt 1. Not tried: a real routed request through a live gateway.
2026-11-06 17:08:24 +08:00
qingnian108 856ad934a2 agent-console 1.3.5: Windows reconnect, per-provider model refresh, Magpie per-agent filter (#786)
agent-console 1.3.5: Windows reconnect through wails.localhost (Windows, http, no port only), model picker refresh keyed on a per-provider fingerprint of magpie's and the agent's own files, Magpie per-agent model filter, explicit picks forced past the snapshot, gateway URL anchored after the port.

Reviewed at 44661c8 on mote (fresh HOME, npm ci --ignore-scripts, Node 22): npm run check ok; vitest 535 passed, 17 skipped, 1 known flake also on main 749e9dd1 (claude-cli mid-turn CLI crash, manager.ts lastTurnStatus before idle); verify:build byte for byte; hostile wails.localhost and gateway URLs rejected on win32/darwin/linux; each of 17 new guards broken by hand turned its test red. PR CI green.
2026-11-06 16:43:09 +08:00
yetone 749e9dd12a raccoon 0.1.7: the balance comes from setting_info when points/v1/balance answers 403 (#520)
xiaohuanxiong.com's /api/web/points/v1/balance now answers 403 to a
signed-in account, the vendor's own web page included (RedFlagRF's
screenshots on #520), and usage threw on it: every account showed an
error and routing read its remaining quota as unknown. RedFlagRF found
that /api/web/office/v3/setting_info still carries data.available_points.

- usage asks balance first and reads available_points from setting_info
  when balance fails or has no number. Balance stays first because
  setting_info is the call the clients make on opening and can hand out
  the day's credits; a usage poll shouldn't do that while balance answers.
- an expired sign-in on balance is still said as expired (and renewed),
  not read again from setting_info.
- if neither carries a number, usage says the error instead of the
  "0 credits" the old `|| 0` would have given.
- entitlement_info answers 403 too (#520): an unread plan is now left
  unsaid instead of reported as Free.

Not changed: the 413 on #520. The plugin passes the vendor's 413 through
untouched, and magpie already treats a 413 as the request's (no account
rests, the next group member is asked, the agent is told
request_too_large to compact; gateway.go's overflow branch). The
vendor's words for it were never captured, so nothing more is known.

Run (mote, bun): packages/raccoon `bun test` 48 pass; `bun
scripts/check.mjs` exit 0. Red on the old index.mjs: the two 403 tests
fail. Broken by hand: dropping the expired rethrow, the `throw first`
and the unread-plan check turns the expired, neither-readable and 403
tests red.
Not tried: a real Raccoon account (we have none). Unauthenticated, all
three endpoints answer 401, so the 403 is per signed-in account.

Reported-by: nglsk
Reported-by: RedFlagRF
2026-11-06 15:43:47 +08:00
yetone 4578b11de2 trae 0.2.31: a token_usage counting 0 read and 0 written is unknown, not a 0% miss
feng2787 on magpie's Discord: Trae through magpie shows cache hits always
zero. The plugin passes on what Trae's token_usage says. Since 10-27 Trae
answers cache_read_input_tokens 0 (and cache_creation_input_tokens 0) on
every turn while it still bills the turn at its cache price: a real Trae CN
account on 10-29, deepseek-v4.1-flash, a 146k prompt, 5.84 credits cold and
0.12 warm, cache_read 0 on both (dingminhua/dsh-connect-trae,
docs/ISSUE69_DIAGNOSIS.md; the ratio matches Trae's cache-read/input price,
0.006/0.30). 0.2.26 made a token_usage with no cache field unknown, but a
named 0 still went on as a counted miss, so magpie showed 0%.

Now a token_usage whose cache read and write are both 0 goes on with
magpie_cache_unknown: true, which magpie (v0.1.2396 and later) shows as
unknown, not 0%. A nonzero read or a write alone (a first turn that
wrote the cache) goes as before. The cache itself was never missed; magpie
cannot make Trae report it again.

Run: bun test in packages/trae on mote, 240 pass. Broken by hand: without
the new line, "a cache read and write of 0 is unknown" fails (8 pass, 1
fail in cache.test.mjs).
Not tried: a real Trae account (none here); the 0/0 shape and the billing
come from the third-party measurement above. A real cold, short turn that
Trae caches nothing of also shows unknown now, not 0%.

Reported-by: feng2787
2026-11-06 15:02:08 +08:00
qingnian108 39f5427420 agent-console 1.3.4: Stop ends the turn at once on ACP, Claude and Codex (#768)
Stop now ends the turn at once, and a resend right after it is safe, on
all three paths:
- ACP (Devin, Cursor, Copilot, OpenCode, Pi, dsh): session/cancel goes as
  a notification, the local turn ends at once, and a resend waits for the
  cancel and the previous prompt to settle.
- Claude: the result FIFO (turnGen, awaitingResult, skipResultGens) lives
  on each CLI process, and a replaced CLI's leftover stdout is ignored.
  After a crash the queue stays open, so the next send resumes with
  --resume.
- Codex: a turn whose turn/start response arrives after Stop is
  interrupted by its own response id.

Run at 0cf12a96 on mote with HOME=$(mktemp -d):
- root bun test: 6171 pass, 0 fail;
- bun scripts/check.mjs agent-console: ok;
- in packages/agent-console: npm ci, npm run check (tsc) and npm run
  build are ok, daemon/dist is byte-identical to the committed one, and
  verify:build is OK;
- npx vitest run: 68 files, 507 passed, 17 skipped.

Broken by hand, then acp-interrupt, claude-cli and codex-interrupt were
run again. Each mutant was red:
- codex: wasCancelled forced false: 1 fail;
- codex: interrupt() no longer ends the local turn: 5 fail;
- acp: pendingCancelSettle not awaited: 1 fail;
- acp: the late prompt settle ends the turn without the activeTurnId
  guard: 1 fail;
- claude: a replaced CLI's stdout no longer ignored: 1 fail;
- claude: interrupt no longer marks its gen in skipResultGens: 2 fail;
- claude: a crash closes the queue instead of setting needsRestart: 2 fail.

Not tried: a real Claude or Codex CLI. The PR says Devin 3000.11.3 was
tried live.
Not blocking: a Codex turn/start response that arrives after
turn/completed sends an extra turn/interrupt and leaves one
staleCodexTurns entry.
2026-11-06 13:49:42 +08:00
sakisakisa beb6343586 aelios 0.1.1: skip DS Bot background memory reviews (#779)
aelios recall() skips a request whose last user text is a DS Bot background
memory review (isMemoryReview: the "The Bot: …" / "The group chat: …" header,
the "Its memory now (…; team: shared by every Bot):" block, "New in …, oldest
first" and the closing "Write every new or changed entry in …." line), the
same way it skips a secret. A person quoting or discussing it is still
recalled and recorded. Version 0.1.1.

Run at 19818b55 on mote (Bun 1.4.2, HOME=$(mktemp -d)):
- bun test packages/aelios: 187 pass, 0 fail
- bun scripts/check.mjs: exit 0

Broken by hand (each restored after):
- isMemoryReview returns false: 6 fail
- isMemoryReview checks the header only: 1 fail (a discussion case)
- hook no longer calls isMemoryReview: 6 fail

Not tried: the template was not checked against DS Bot's own source (not
found publicly); a template change there makes the matcher miss, which keeps
today's behaviour (the review is recalled as before).
2026-11-06 12:19:03 +08:00
yetone 89ddfb9cb3 agent-office 0.3.4: Settings pickers read their value and stay open on overscroll (#778)
Bumps agent-office to 0.3.4 so #778 (frederick-wang: the pickers'
accessible name carries the value, overscroll no longer closes a
picker, magpie's thin scrollbar; fixes #773) reaches users; dist stops
at 0.3.3. Notes it in the changelog and moves cli.test.mjs's pinned
ping version with it.

Run on mote at this tree (Bun 1.4.2, HOME=mktemp -d): repo bun test
6255 tests, 20 skip, 0 fail; bun scripts/check.mjs exit 0;
stamp-page.mjs --check exit 0.
Not tried: the page in a real magpie window.
2026-11-06 11:12:28 +08:00
Zhaoji Wang 133cd35107 agent-office: Settings pickers read their value, keep open on overscroll, and the page's scrollbars are magpie's thin thumb (#778)
The three Settings pickers' buttons are labelled by the label and their
own value (aria-labelledby="lblScene optScene"), so they read "Scene
Office" again as the <select> did. .picker-list gets
overscroll-behavior: contain, so wheeling past a list's end no longer
scrolls #settings and closes it, and a #settings scroll in the frame a
picker opens repositions the list instead of closing it. The page's
scrollbars take magpie's thin thumb (8px, --faint, --muted on hover,
the same as magpie's Mac rule for pages), with --faint read from the
host's --magpie-faint token. Fixes #773. By frederick-wang.

Run on mote at c7ecc7a6 (Bun 1.4.2, HOME=mktemp -d):
packages/agent-office bun test 183 pass, 0 fail; bun scripts/check.mjs
exit 0; packages/agent-office stamp-page.mjs --check exit 0.
A Playwright script of the reviewer's own against the standalone page
(bin/agent-office.mjs --no-open, 600x520, chromium and webkit, light
and dark), run 4 times: the three accessible names are "Language
Auto", "Scene Office", "Quality Medium"; focus+Enter on #optQuality
keeps its list open; four 600px wheels over #optSceneList keep it open;
setting #settings' scrollTop still closes the picker; the list's
scrollbar is 8px with a #b9b9c2 thumb, #56565f under data-theme=dark;
no page errors.
Broken by hand: the same script at the base 10a61c2e fails the three
names in every engine and theme, and focus+Enter closed the Quality
list in 2 of 4 runs (the #773 race); the thumb is transparent there.
Not tried: test/browser.mjs inside a real magpie host window (needs a
magpie web URL); the wheel check also passes at the base in headless
Chromium and WebKit, so it does not prove the overscroll fix.
2026-11-06 11:08:29 +08:00
Joey Shao 367e879cab mclaw 0.5.2: China Mobile Cloud's MClaw agent (ai.yun.139.com), with a browser sign-in (#746)
New package @magpie-community/opencode-mclaw-auth 0.5.2 (joey-41): China
Mobile Cloud's MClaw agent (ai.yun.139.com) as a provider. A browser
sign-in in a dedicated Chrome profile per sign-in harvests the yun.139.com
ticket and fetches the llm key and the model multipliers by itself; the
models come from the account's own lists; the usage card reads the
aitokens pool and, through the vip SSO chain (toSourceId 001005), the
records' own endTime as the reset; the ticket is renewed headless from the
account's own profile, and a ticket for another phone number is refused.
Every host is China Mobile's own. registry.json and the README table list
it.

Reviewed at 905e2a6b, 7ed7d0aa and 7304ac15 (0.5.2, edcd9549 plus a
merge of main). The last review's two must-fixes are in the code:
magpie's cancel (callback(undefined, { signal }) and authorize's signal
both call harvesting.abort(); startBrowserHarvest records an abort while
Chrome is still starting and closes it once open), and a failed,
cancelled or timed-out sign-in deletes its signin-* profile dir after
releasing the lock. Re-signing an account leaving its old dir behind is
in the package README as a known limit.

Run at 7304ac15 (origin/main 10a61c2e already in it), sandbox HOME:
- mote, Bun 1.4.2: bun test in packages/mclaw 30 pass, 0 fail;
  bun scripts/check.mjs mclaw and bun scripts/check.mjs (all) ok.
- WSL Ubuntu 24.04, Bun 1.4.2: whole-repo bun test (see the PR).
- The real startBrowserHarvest with Chrome for Testing on mote, aborted
  before Chrome was up and 4s after: both reject "登录已取消", no Chrome
  left on the profile, no signin-* dir left.
- Review test: authorize and callback given separate signals, as
  magpie's host does, only the callback's aborted: closed and released.
  With callback's listener taken out it goes red (5s timeout).
Not tried: a real MClaw sign-in (no account here). The package's own
magpie-style test hands both calls one signal, so it stays green
without callback's listener; that is the only gap seen.
npm: the name is new, so trusted publishing can't create it; magpie
serves it from the dist branch until an owner publishes its first
version.
2026-11-06 10:35:49 +08:00