Commit Graph
934 Commits
Author SHA1 Message Date
我是一条没有名字的区 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
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