Commit Graph
1227 Commits
Author SHA1 Message Date
yetone fc941f6e1c agy-cli: Codex's GPT-5 lines go reworded in a user's turn too (0.1.53)
pocoxliu on X (tweet 2121731813270077946) gets 429s from agy-cli under
Codex and Claude Code and put it down to unslimmed system and MCP prompts.
It is content, not size (#1151: a neutral system prompt of the same 66,622
characters went through). Since 11-14 Antigravity also turns away Codex's
two GPT-5 lines ("You are Codex, (a coding) agent based on GPT-5") in a
user's turn; magpie's cloak and the antigravity plugin (fb7bbebd) reword
them there, and fb7bbebd noted agy-cli as not tried. agy-cli reworded only
system text, so AGENTS.md text, a <system-reminder> and replayed history
in a user's turn went to agy as written.

- cloak.mjs: USER_TURNED_AWAY (the two Codex lines) and cloakUser().
- index.mjs: every text part of the prompt goes through cloakUser before
  agy gets it. Parked sessions carry userCloak: 1; one parked before this
  version (whose agy copy may hold the line as written) is not resumed.
- READMEs (zh, en) say so.

Run: HOME=$(mktemp -d) bun test packages/agy-cli on mica: 22 pass, 0 fail
(cloak.test 6, agy-cli.test 16 incl. conversation-key 36 cases);
bun scripts/check.mjs agy-cli: ok.
Broken by hand (on mote): the userTurnParts call and the userCloak check
removed, the two new conversation-key tests fail (34 pass, 2 fail);
restored, all pass.
Not tried: a real request. The one probe on the owner's account got
"This service has been disabled in this account for violation of Terms of
Service" as a 200 (#1163), so no 429 could be reproduced or cleared on a
real agy. The reporter's exact agent and prompt are not known.
2026-11-15 07:20:36 +08:00
yetone 57d1cc6a9f agy-cli: start agy without the machine's own skills when it can (#1166)
On Windows with agy 1.5.9, a session loaded 120 local skills from
~/.gemini/skills, ~/.gemini/config/skills and ~/.agents/skills although
the bridge agent says inheritCustomizations: false. Skills and the
client's MCP tools share agy's 20,000-token customization budget, so
agy dropped the six largest client tools (task, shell, …) and three
skills.

agy 1.5.9's acp takes --include-default-customizations (default true).
The bridge now passes --include-default-customizations=false when
`agy acp --help` lists the flag. An agy without it exits on an unknown
flag, so it is never passed blind. The answer is kept per binary (path,
mtime, size); a probe that errors or times out is asked again. The bare
`agy acp` model probe is unchanged. 0.1.52.

Run:
- bun test packages/agy-cli on mote (temp HOME): 21 pass, 0 fail;
  bun scripts/check.mjs agy-cli ok.
- the same on Windows (win-run, xiaomi-gpu): 21 pass, 0 fail.
- test/smoke.mjs alone with bun on mote: ALL OK (348 checks).
- real agy 1.5.9 on macOS: `agy acp --help` prints the flag on stderr
  (exit 0); a session started with the flag set to false runs.
Broken by hand: without the args.push in Proc.start, repeat-batch's
"#1166 … asked once" test and smoke's #1166 check go red.
Not tried: the reporter's Windows machine with its 120 skills. On this
Mac the default run sent no user skills to the model either, so it is
not shown here that the flag keeps them out; the reporter is asked to
confirm.
2026-11-15 06:43:07 +08:00
yetone 4a64252bd7 agy-cli 0.1.51: one opening sent to several models at once gets an agy each
swang20201 on X: Test models on an agy-cli account gave a check for the
first model and a cross for the other three. magpie's Test sends the same
"hi" opening to up to four models at once. agy-cli keys its agy process by
user, system and first message, not the model, so all four shared one key.
The first started a turn; the others found it unfinished and got 503
"agy bridge: this conversation still has an unfinished response". Not the
account's limits, and not the model ids.

Two changes:
- A fresh opening that finds the key's process busy with a turn for
  another model gets a process of its own (key + request id). The same
  model sent twice while the first runs is still refused as a resend, so
  smoke's "simultaneous startup allows only one live response" holds.
- acquireProc starts the turn (begin) inside the same locks, so a request
  waiting on them sees the earlier turn and is never handed a process
  about to be busy. The turn records its model.

Run:
- New test in test/repeat-batch.mjs, magpie's exact probe body to four
  models at once: red on origin/main 9126c46f (1 x 200, 3 x 503), green
  after.
- Broken by hand: with begin moved back outside the lock the new test is
  red again.
- packages/agy-cli bun test under a temp HOME on mote: 21/21, smoke
  included.
- Whole repo, HOME=$(mktemp -d) bun test and bun scripts/check.mjs on
  mica at this tree: 8849 pass, 0 fail (8869 tests, 617 files), check.mjs ok.
- Real agy 1.5.9 (agy acp), four models at once through the plugin:
  old code 1 x 200 + 3 x 503; this code 4 x 200 at 3.7, 6.0, 9.1 and
  11.2s, inside magpie's 20s test wait.

Not tried: the reporter's models (Gemini 4 Argon/Hydrogen, Claude 5.5).
The account used offers Gemini 3.8 Flash, Claude 4.6 and GPT-OSS only, so
the model id mapping wasn't checked against a list holding those ids.
2026-11-15 04:31:05 +08:00
yetone 9126c46f97 agy-cli: no stub descriptions; a low level's room goes to tools and contracts (#1140)
tungloong's real run of agy-cli 0.1.49 with 131 tools: the schemas alone
took ~37 KB, the level stopped at 10, and 373 of 382 property texts went
as 9-10 byte stubs ("The fil…") that spent ~10 KB on their keys, while
the tools' own descriptions got 25 bytes and show_view's contract 110.
With more tools the level stopped at 1-6 and never reached the bare
branch, which would have zeroed the contracts too.

A cut description now goes whole or, cut, with at least MIN_TEXT (24)
bytes; anything shorter is dropped. When the highest level leaves an
ordinary property under that, ordinary properties keep only texts short
enough to go whole, and a second search gives the room to the tools'
own descriptions and the contracts' (the old bare(top) branch is gone).

Run (mote): packages/agy-cli bun test 21 pass (each test file in its
own bun process); bun scripts/check.mjs agy-cli ok. On a 131-tool
fixture shaped like the report (~285 B of schema per tool), 0.1.49
gave field "field…", tool "tool_0 does the t…"; now no field stubs, tool
"tool_0 does the thing it says.…" and a longer contract. Broken by
hand: the new tests on 0.1.49's tool-budget.mjs go red (field_0:
"field…" at 131 tools, stubs at 180).
Not tried: real agy with the reporter's 131 tools.
2026-11-15 03:26:52 +08:00
yetone d859c3fb13 antigravity: a 429 with the model's quota left doesn't point at AI credits (#1148)
With Use AI credits off, an account holding credits got the credits note
on every 429: "turn on the Use AI credits switch ... when the plan's
quota is used up". The reporter's Gemini quota wasn't used up, and the
note read as if it were. The plugin now reads fetchAvailableModels again
on such a 429: when the model still has quota left, the note says so and
that credits would not change it; when none is left, or the read fails
or doesn't list the model, the credits note stays as before.

Run (mote): packages/antigravity bun test, 102 pass; bun
scripts/check.mjs antigravity ok. Broken by hand: always the credits
note, and the quota-left test goes red (1 fail).
Not tried: a real account's 429 with quota left (the reporter's case).
2026-11-15 02:47:43 +08:00
Chanyeong Limandasp345 a82a2e3558 kiro: preserve scoped reasoning across tool continuations (#1156)
Kiro keeps reasoning signatures across tool continuations, sealed as
kiro:<scope>:<payload> where scope hashes the account, region and model, so
a signature is replayed only to the account and model that made it. A 400
from Kiro is returned as is (no strip-and-retry). Effort levels come from a
per-account model list read at request time, shared by concurrent requests
and kept 10 minutes; a failed read is swallowed and the request still goes
out. kiro 0.1.39.

Reviewed at d60a5d001bd7f7b62574798885714d446eb48e9c (mica, temp HOME):
bun test in packages/kiro 203 pass; bun scripts/check.mjs kiro ok. The two
probes from the last review (a failed model list made the request a 502;
an unlisted model was re-listed on every request) failed at 6af97c7 and
pass at this head.
Not tried: a real Kiro account.

Co-authored-by: asp345 <10955734+asp345@users.noreply.github.com>
2026-11-15 01:25:15 +08:00
Muyangandsiml1169 f917240e24 registry: ShyPie Privacy Gate's icon (#1159)
Gives the ShyPie Privacy Gate entry in registry.json an icon: the SVG already in this repo at packages/privacy-gate/assets/shypie-icon.svg, by its raw.githubusercontent URL (the same host other entries use).

Reviewed at 24ae3c57c5751d1d7451a74a7cbb1becca936ebc: the file exists on main, holds no script, href or event handler; bun scripts/check.mjs privacy-gate passes (mica).

Co-authored-by: siml1169 <5939069+siml1169@users.noreply.github.com>
2026-11-15 01:23:42 +08:00
yetone 122d945ea7 sensenova: a key-only account lists what its key serves (#1158)
A key-only sign-in keeps no console token, so planIds() could never read
the plan, the listing threw "plan read failed" and fell back to the static
bootstrap list, which has no glm-5.3. models() now skips the plan read for
auth.type "api" and lists the key's own /models (still through
catalogModels, so the 403 stray and image-output models stay out). OAuth
and password accounts still intersect the catalogue with the plan.

glm-5.3 is not added to the bootstrap list: testdata.test.mjs holds that
list to the recorded free plan, which doesn't cover glm-5.3.

Run (mica, temp HOME): bun test in packages/sensenova, 59 pass;
bun scripts/check.mjs sensenova ok.
Broken by hand: with the old `await coveredOrThrow()` the new test fails
(plan read attempted, glm-5.3 missing).
Not tried: a real SenseNova key-only account.
2026-11-15 01:22:56 +08:00
yetone 1cc5a033f8 autoclaw 0.2.24: campaign credits that lapse show on the balance window (#1157)
AutoClaw's weekly campaign credits are swept at their wallet's end, but
the routing saw only the 6400 total with no date, so smart never spent
them first. gcq909893267 found the date: every ledger entry carries a
top-level wallet_expires_at (epoch seconds); the wallets endpoint has
none.

campaignBreakdown keeps each instance's wallet_expires_at and gives the
soonest end of an instance with credits left and not yet past, and what
the instances ending then have left. usage() puts that on the 积分余额
window as runsOutAt / runsOut, capped at the total. The reporter
suggested a separate 活动积分 window with its own balance; magpie counts
every balance window as a pool, so that would have counted 5000 twice.

What magpie does with it: routing takes runsOutAt as the window's reset
when it is sooner (routing.go:618), so the account counts as renewing
tonight. Allowance.Lapsing needs a limit (Of) and skips a balance-only
window, so the lapse share sort doesn't apply here.

Tests use the reporter's literal credit and expire entries: 5000 lapse
at 2026-11-15 23:59:59 +08, a spent earlier instance doesn't count, two
ending in one second add up, past the end or without the field nothing
is reported, and the usage window carries it with one balance window.

Run: on mote, packages/autoclaw bun test 119 pass, check.mjs autoclaw
ok. With index.mjs at 0.2.23 both new tests fail.
Not tried: a live AutoClaw account.
2026-11-15 00:45:01 +08:00
yetone d6efb4f7bc trae: the credits a pack loses at its end show as runsOut (#718)
A finite pack's credits are gone at its end_time whether or not another
pack follows, so the Credits window now carries runsOutAt (the soonest
live pack's end, as 0.2.37 reads it) and runsOut (what the packs ending
at that instant have left). magpie's routing already takes runsOutAt
before resetsAt and sorts by what lapses; WorkBuddy's plugin does the
same.

Test built from gcq909893267's account B packs on #718: the 11-18
sign-in reward with 4.1456 used gives 95.85 lapsing then, two rewards
ending at one second add up, and past both the monthly 500 lapses.

Run: on mote, packages/trae bun test 268 pass, check.mjs trae ok. With
index.mjs back at 0.2.37 four tests fail (the new one and the three
whose windows now carry runsOut).
Not tried: a live Trae account (the reporter's numbers are the fixture).
2026-11-15 00:41:54 +08:00
yetone 188c644f16 trae 0.2.37: the credits' date is the soonest end of a pack that still counts
credits() took the soonest end_time of every entitlement pack, spent or
already ended. A TraeCode CN account with a daily pack and a monthly pack
read "lapses today" every day, even once the daily pack was used up, so
routing kept it ahead of accounts that really lose credits today (#718;
#1157 measured an account whose date changed 15 times since 10-23). Only
a pack with credits left (or unlimited) whose end is still ahead names
the date now; none left, no date.

The enterprise and usage fixtures' end_times move into the future: with
the rule, 2026-09-21 already read as ended, and 2026-11-18 would three
days from now.

Run (mote): packages/trae `bun test` 267 pass; `bun scripts/check.mjs
trae` ok. Broken by hand: the old credits() fails the new test.
Not changed: a pack per window or runsOutAt (#718 items 1-3) need which
packs lapse and which renew, which the pack list doesn't say; Trae Global
still reads its first pack's end. #718 stays open for those. Not tried
with a real account.
2026-11-15 00:08:38 +08:00
yetone 09e5970996 loomy: the total names no reset while only permanent credits are left (#1153)
With the daily credits spent and permanent ones left, the 积分合计 window
still said it reset at Beijing midnight. magpie's smart routing ranks the
soonest reset first, so such an account went ahead of trae-cn's, Qoder's
and WorkBuddy's day and month windows, whose credits are lost at their
reset, while midnight loses nothing of Loomy's. The total now names a
reset (and its span: magpie reads a span with no reset as renewing a span
from now) only while daily credits are left, or when nothing is left at
all, so a used-up account still says when it is back. The daily wallet
beside it, set aside for routing, keeps showing midnight.

loomy 0.1.9.

Run on mica (Bun 1.4.2), sandbox HOME: bun test in packages/loomy 33
pass; scripts/check.mjs loomy clean. Broken by hand: with main's
index.mjs the usage test fails (resetsAt 1794672000000, expected none).
Checked in magpie origin/main: Smart puts a window with no known reset
after those with one (internal/routes/strategies.go), and a window
set aside never enters the allowance (provider/routing.go).
Not tried: a real Loomy account in routing.
2026-11-14 22:53:12 +08:00
Muyangandsiml1169 9f02ad545f privacy-gate: middleware settings page (#1145)
The ShyPie plugin page gets a Middleware settings tab, so privacy-gate's
ctx.options can be set from the page instead of the CLI only. Options are
grouped as Protection, Advanced inspection and Diagnostics; the Agents view
is unchanged and both share one Save.

- Lists are validated (shape, count); a malformed allowModels blocks the
  save instead of turning into an allow-everything list.
- Numbers are floored and clamped to the middleware's own numOpt ranges,
  so a save that only flips an agent keeps the limit that actually runs
  (maxDepth 500 stays 200, not the page default 40).
- An unknown binaryPolicy is reported and blocks the save.
- A save re-reads the options and reports a conflict when another surface
  changed a managed field; options outside the form are kept.
- logEveryRows has one cap, 100000, in resolvedOptions and onUsage.
- privacy-gate 0.4.1.

Run at 9bb381bf on WSL (Ubuntu 24.04, Bun 1.4.2): bun test in
packages/privacy-gate 77 pass, 0 fail; scripts/check.mjs privacy-gate
clean. Broken by hand: page.test.mjs with 7c119f16's settings.js fails
(maxDepth Expected 200, Received 40). The diff adds no network call.
Not tried: the page in a running magpie.

Co-authored-by: siml1169 <siml1169@users.noreply.github.com>
2026-11-14 22:28:47 +08:00
yetone 1c3c58be56 agy-cli 0.1.49: a session opened before a line was reworded is not resumed (#1151)
A parked session was keyed on the client's instructions as written. agy
keeps the instructions a session was opened with, so a Codex conversation
parked under 0.1.47 (whose "You are a coding agent running in the Codex
CLI" line went to agy as written, and was turned away) was resumed after
0.1.48 began rewording that line, and every turn on it went on getting
429 for up to the 6h resume window. jx407 found this on #1151.

The parked hash is now taken over the instructions as agy is sent them
(outgoing: the turned-away lines reworded), with the same clock and billing
stripping as before. When the rewording changes, the parked session is not
taken and a new one is opened; when it doesn't, it resumes as before.

Run (WSL magpie-desktop, from the repo root, HOME a temp dir):
- packages/agy-cli `bun test`: 21 pass, 0 fail.
- node --test test/conversation-key.mjs: 34 pass, including the new
  "#1151: a parked session is keyed on the instructions as agy was sent
  them".
Broken by hand: with park/takeParked hashing instructionsIdentity again,
the new test fails (33 pass, 1 fail).
Not tried: a real agy session parked under 0.1.47 and resumed under this
version.
2026-11-14 22:15:14 +08:00
yetone a617ecfd42 antigravity 0.1.16, agy-cli 0.1.48, cloak 0.1.9: cloak the system prompts Google refuses since 11-14 evening; agy-cli fails a refused turn at once
Since about 18:43 on 11-14 Google's Antigravity backend answers 429
RESOURCE_EXHAUSTED to requests whose system instruction holds certain
agents' identity lines, though the account has quota and the same
request with another prompt passes. Tried on a real account
(gemini-3-flash), each line alone in the system instruction:

- refused now: "You are Hermes Agent", Hermes' earlier persona
  "…an intelligent AI assistant created by Nous Research" (also as
  "You're …"), "You are OpenCode" / "You are opencode", Codex CLI's
  "You are a coding agent running in the Codex CLI", and pi's "You are
  a coding assistant running inside pi".
- pass as written: Codex GPT-6's prompt, Claude Code, Gemini CLI, Qwen
  Code, Cline, Kilo, goose, Amp, Droid, Kimi, Aider, Cursor.

The cloak in antigravity and agy-cli (and the antigravity-cloak
middleware) now rewords each refused line the smallest way that passes:
"You are" -> "You're" for Hermes, OpenCode and Codex CLI, "created by"
-> "built by" for Hermes' earlier persona, "running inside pi" ->
"running within pi". The hint shown with a refusal names the agent
(new pi, OpenCode and Codex CLI hints; Hermes' hint covers both
personas).

agy-cli (@Lmohn39, pi 1.5.0 via agy 1.5.9, hydrogen): when agy prints
its retry banner for a refused 429, agy-cli waited while agy retried
the same refused prompt without end, so pi hung. The turn now fails at
once with the 429 and the existing "this is not a quota" explanation,
the agy process is stopped and dropped from the pool. A 503 banner
still waits as before.

Run:
- root `bun test` with HOME=$(mktemp -d) on mica (mote was over its 18
  cores): 8820 pass, 20 skip, 0 fail, exit 0.
- real account through the patched loader, gemini-3-flash 5/5 each:
  pi 1.5.0's full default prompt (built from its dist/core/system-prompt.js),
  Hermes current and earlier personas, both OpenCode first lines, Codex
  CLI's prompt, Codex GPT-6's prompt. claude-sonnet-4-6: pi 5/5.

Broken by hand:
- the old agy-cli index.mjs makes the new Lmohn39 test red ("still
  waiting after 5s").
- dropping the pi line from TURNED_AWAY turns 6 cloak tests red.

Not tried: a real agy 1.5.9 turn on hydrogen showing the banner (the
banner's wording is the one agy-cli already matched); pi itself end to
end through agy-cli.
2026-11-14 21:40:22 +08:00
yetone b880da16aa antigravity 0.1.15: requests carry Antigravity 2.32.1's own fingerprint
Antigravity 2.32.1 (manifest, 2026-11-13) was run in a sandbox HOME behind
a recording proxy, and every Code Assist request it sent was diffed against
the plugin's. Stale in 0.1.14, now as the app sends them:

- User-Agent: `antigravity/hub/<v> <os>/<arch>` is now the language
  server's `antigravity/hub/<v> (aidev_client; os_type=<os>; arch=<arch>;
  cl=<changelist>)`. The changelist comes from a table (2.32.1 is
  1021296516); a newer manifest version uses the newest known one.
- Envelope keys go in the app's order (project, requestId, request, model,
  userAgent, requestType). requestId is
  `agent/<cascade>/<ms>/<trajectory>/<step>` instead of `agent-<12 hex>`.
- request.labels is added as the app sends it: cascade and trajectory ids
  (stable per conversation, from its session), the step, the model's enum
  from fetchAvailableModels, and used_claude / used_non_gemini_model.
- onboardUser sends `{tierId, metadata: {ideType}}` with the plain UA. The
  google-api-nodejs-client UA suffix, X-Goog-Api-Client, snake_case keys,
  ide_version and ide_name are gone; the app sends none of them.
- No `Accept: text/event-stream`; the app sends no Accept.
- The sign-in asks the aicode scope too, as the app does.
- DEFAULT_VERSION is 2.32.1.

Already matching: loadCodeAssist's body and endpoint order, the
fetchAvailableModels body, the client id and the sessionId form.

Run:
- Root `bun test` with HOME=$(mktemp -d) on mote at a60667b5 plus this
  change: 8818 pass, 20 skip, 0 fail. origin/main has since gained
  3db6dcfa (agy-cli only, no file shared with this change).
- Real account, sandbox HOME, through the plugin's loader fetch:
  loadCodeAssist 200, fetchAvailableModels 200, streamGenerateContent 200
  for gemini-3-flash, claude-sonnet-4-6 and gemini-3.8-flash with the new
  UA, key order, requestId and labels.
- The updated tests fail on 0.1.14's code by construction: they assert
  the new UA form, the key order, the requestId form, labels, and the
  onboardUser body and headers, all of which 0.1.14 sent differently.

Not tried: the changelist of releases after 2.32.1 (needs their binary);
last_step_index and the request_id suffix past the first turn are
approximations (contents count, model turn count), since only a first
turn was captured; onboardUser against the real service (the account
already has a project).
2026-11-14 21:02:16 +08:00
yetone 3db6dcfa85 agy-cli 0.1.47: agy 1.5.9's bare 429 ending fails the turn (#1151)
agy 1.5.9 ends a turn whose every retry got 429 with the upstream status
itself, "⚠ RESOURCE_EXHAUSTED (code 429): Resource has been exhausted
(e.g. check quota).", instead of "⚠ Agent execution terminated due to
error.". That line was not one of AGENT_ERROR_MARKERS, so the bridge sent
it to the client as the model's answer and ended the turn as a success
(jx407's Codex turns showed the error text as the reply).

It is now a marker like the others: held while it could still be one,
dropped when it ends the prompt, and the turn fails through #agentError
-> #formatAgentError as rate_limit_error ("Antigravity quota or rate limit
reached: RESOURCE_EXHAUSTED (code 429): ..."), or as the system-prompt
case when the cloak says the prompt turns away. Text after it, the model
quoting the line, keeps it as text, as for the other markers.

This fixes how the 429 is reported, not why Antigravity answered 429 to
the reporter's Codex requests; that is still open on #1151.

Run (WSL magpie-desktop, Node 22, Bun 1.4.2, HOME=$(mktemp -d)):
- packages/agy-cli `bun test`: 21 pass, 0 fail (agy-cli.test.mjs runs
  repeat-batch.mjs and the rest).
- node --test --test-name-pattern="1151|1136" test/repeat-batch.mjs:
  4/4 ok. With the new marker line deleted from index.mjs: the endings
  test goes red (1 fail), the quoting test stays green.
- bun scripts/check.mjs agy-cli, scripts/bumped.mjs origin/main: ok.
Not tried: a real agy 1.5.9 turn that ends in 429.
2026-11-14 20:56:03 +08:00
yetone a60667b570 codearts 0.3.21: the credit names iJetLi, who wrote the CodeArts channel (#1147)
The README (English and Chinese) and index.mjs credited the CodeArts
channel to Ebony-Vinyl/dsh-our-free-model alone. That repo's own
vendor/channel-pack/NOTICE.md (v2.5.7) says the channel is a copy of
gitee.com/iJetLi/deepseek-harness-codearts at 345f0a07. The credit now
names iJetLi first and OFM as the one that carried it. No code change.

Run: bun scripts/check.mjs codearts and bun test in packages/codearts on
mica (213 pass, 0 fail); bun scripts/bumped.mjs origin/main.
2026-11-14 19:28:46 +08:00
yetone 87a8cf03c6 zcode 0.1.66: a gift-only account's model the gift doesn't name is not sent to be billed, and a failed plan read keeps it on the gift (bg5eau on X)
bg5eau on X (11-14): through magpie ZCode's gift quota stopped going
down while the account's pay-as-you-go balance was charged. Two routes
in the plugin let a key with no GLM Coding Plan spend money while its
free Start Plan quota sat unspent:

- A gift-only account sends every request to the Start Plan, whatever
  the model. ZCode's app offers such an account only the models its
  balance names (resolveStartPlanBalanceAvailability in 3.18.2); an
  agent left on another model (GLM-5.2 while the gift serves only
  GLM-5.3-Flash) spent none of the gift. Such a request is now answered
  400 with the models the balance names and is not sent. The balance is
  the one the model list already reads (aloneSeen, ten minutes); only a
  model it doesn't name has it read again, so a gift claimed since is
  sent, and a request whose model it names reads nothing. A balance not
  read yet, one that fails, or one naming none leaves the request as it
  was (unknown is not a refusal).
- plansOf's catch path: a plan-list read that failed sent every key
  account down the dual route, to api.z.ai / open.bigmodel.cn's
  /api/anthropic with its key, which bills a key with no plan
  pay-as-you-go. An account whose last read found no plan now stays on
  the Start Plan for the minute. A key with no earlier read still takes
  the dual route, as before.

Not known: which of the two was bg5eau's (no request log from them).
No 503 is made by the plugin (skykiahhub's 503 on X is the vendor's or
one of magpie's own, each of which says why).

Run (mote, load ~130-180, mica's disk was full; HOME=$(mktemp -d)):
bun test packages/zcode 271 pass 0 fail; bun scripts/check.mjs zcode ok.
Broken by hand: the guard off, "a gift-only account's model its balance
doesn't name is not sent" fails; the catch-path change off, "a
gift-only account stays on the Start Plan when its plan list stops
reading" fails (it sent GLM-5.2 to api.z.ai).

Not tried: a real gift-only account (the owner's has a coding plan and
no gift), a real pay-as-you-go charge, Windows and Linux.
2026-11-14 18:37:07 +08:00
yetone 6646797e15 agy-cli 0.1.46: a catalog over agy's tool budget keeps every tool (#1140)
Since #989 every client tool is listed always-loaded, so all of them go
into agy's customization budget: 20,000 tokens counted as
ceil(UTF-8 bytes / 3). Past it, agy drops whole tools, the largest first,
and with tools: [] the model has no other way to reach them. tungloong's
131-tool catalog (~25,000 tokens) lost bash and 12 Paper tools.

Proc.listTools() now hands agy the catalog through fitTools
(tool-budget.mjs), aiming at 18,000 tokens to leave agy room for its name
prefix and serialization:
- within the budget, the catalog goes as it is (the same array);
- else $schema, title and examples come out where they are keywords (a
  property named "title" is the client's and stays);
- else every description is capped at the highest level L that fits,
  found by binary search: a property's at L bytes, a tool's own at 2.5L,
  a contract property's (an object with no properties, or tool-schema's
  Variants/Accepts anyOf text) at 11L. A cut drops a trailing Examples
  block first, ends on a sentence or a whole code point, and adds "…";
- at L = 0 the properties' descriptions go and the room left goes to the
  tools' own.
Names, property names, types, enum, const, required, items, anyOf and
bounds are never touched, and this.tools / toolsSignature stay as the
client sent them. The trimmed list is kept per catalog.

Run (WSL magpie-desktop, temp HOME; mote was at load 178 and mica's disk
is full): bun test 21 pass; node --test conversation-key, step-usage,
usage-settlement, repeat-batch, compat, tool-schema, catalog,
tool-budget, steer-in-session, windows-nc: 198 pass, 0 fail;
bun scripts/check.mjs agy-cli ok; npm pack --dry-run ships
tool-budget.mjs. With main's index.mjs the new bridge test fails (31,690
tokens reach agy). Not tried with a real agy: the budget and its
counting are the reporter's reading of agy 1.5.8, not checked here.
2026-11-14 18:34:29 +08:00
yetone 2596d259a2 antigravity 0.1.14: Code Assist's bare INVALID_ARGUMENT line is asked again, and one that stays says it is not a region block (Lawson0112 on X)
Lawson0112 (magpie 0.1.4152, Windows, Codex) saw every request to
gemini-4-hydrogen end "400 · failed" after 20-38s and asked whether it
was a region block. A region refusal is a fast 400 FAILED_PRECONDITION
"User location is not supported..."; a 400 after 20s+ is Gemini 4's late
INVALID_ARGUMENT, which Code Assist writes after the thinking events as
a bare line with no "data:" (zRain's capture, magpie's sse_bare.go):

  {"error":{"code":400,"message":"Request contains an invalid argument.","status":"INVALID_ARGUMENT"}}

holdThoughts read only "data:" lines, so it never saw that line: the
quiet retry 0.1.6 added never ran for the real reply, and the error went
to the client on the first ask. Its tests used an invented "data:" error
chunk. Now a bare JSON value (one line or pretty-printed over several)
is read too, and the stream is asked again as for a data event.

A Gemini 4 INVALID_ARGUMENT that still comes after the model ran (a
slow 400, or in the stream) is told as "<model> turned down a call it
built while thinking, asked N times (Google: ...). Not a region or
account refusal: Google names those". The words keep clear of what
magpie's gateway reads as another fault ("model ... invalid" reads as a
model not served). A fast 400 and other models keep Google's words.

Run: packages/antigravity bun test in WSL (magpie-desktop), 97 pass;
bun scripts/check.mjs exit 0. mote was at load ~150 and mica's disk
full, so the runs went to the Linux box.
Broken by hand: the old index.mjs with the new tests, 3 of the 4 new
tests red (the bare-line retry, the pretty-printed line, the wording);
"a fast 400 keeps Google's words" passes on both, as it should.
Real account (kumw95ya25, sandbox HOME): the real Codex 0.165 request
through magpie's buildGemini answers 200 on gemini-3.8-flash at high
with the new code.
Not tried: Gemini 4 itself. The account here has Gemini 4 only as
gemini-4-*-disabled (404), as does every other sign-in found, so
whether Hydrogen passes Codex's request on a second ask is not known.
A late 400 after the 10s hold has released the thinking still reaches
the client as before.
2026-11-14 18:24:55 +08:00
yetone 6e0cecb2a0 agy-cli 0.1.45: a tool result's image goes to agy as a prompt image, not an offloaded file (distinceeeee on X)
Report: on agy-cli 0.1.43 with agy 1.5.8, when OpenCode's read tool
returns a screenshot, agy writes the image to
.system_generated/steps/N/media_0.jpg. The model never sees the image and
keeps re-reading files.

Cause: the bridge answered agy's MCP tools/call with the image as MCP
image content. agy offloads MCP images to a file, and its model only gets
"Image read successfully [Resource offloaded to file://…]". There are no
image tokens, so it loops trying to get the image back.

Fix: when agy supports prompt images and a tool result carries an image,
the result takes the steer-in-session path. The MCP call is answered with
its text plus a line saying the image follows. The image goes in the next
session/prompt as an ACP image block, in the same session, so it reaches
the model as an image. withoutAnswered keeps an answered result's images
in the prompt and drops the rest. If steering fails, the existing replay
fallback already sends tool_result images as prompt images. An agy
without image support keeps the old MCP path.

Run:
- Real agy 1.5.8 (macOS), sandbox HOME and sandbox keychain,
  gemini-3.8-flash-high, through a harness that drives the plugin's fetch
  with an OpenCode-style read tool:
  - origin/main: shot.jpg and term.png each looped through 8 reads
    without an answer.
  - This change: 1 read each. shot.jpg was answered correctly
    ("PLUM-7342 ORBIT", red circle, blue square, green triangle).
    term.png was answered correctly twice (all five terminal lines,
    including "TOKEN: ZEBRA-5519", and the yellow rectangle).
- WSL magpie-desktop (Ubuntu 24.04), bun 1.4.2, temp HOME:
  - packages/agy-cli `bun test`: 21 pass, 0 fail.
  - `node test/smoke.mjs`: ALL OK (347 checks).
  - `bun scripts/check.mjs agy-cli`: ok.
- Broken by hand: smoke.mjs with origin/main's index.mjs fails exactly
  the two image checks this change adds or rewrites (2 FAILURES of 347).

Not tried:
- Gemini 4 Carbon: not offered to the test account.
- Real agy on Linux, and a real OpenCode front end.
- stream:true against real agy (the harness is non-streaming; smoke
  covers SSE).
2026-11-14 18:20:54 +08:00
yetone 1dbbc1fb48 zcode 0.1.65: a -Trial pick with no gift names the weekend plan ZCode holds unclaimed (heduian, bg5eau on X)
heduian and bg5eau on X (11-14, a Saturday): magpie no longer uses
ZCode's weekend gift. GLM-5.3-Flash-Trial is not in the list, a
manually added one answers "ZCode has no active limited quota", and
free first spends the weekday gift but not the weekend's.

Diffed against the official ZCode 3.18.2 (zai-org/ZCode fec975905,
11-13) and 3.17.2 (a9fe401ee):

- The weekend plan (ZCODE WEEKEND BUILD, testdata/touch-1030-wk.json)
  is a gift ZCode holds until it is claimed from the app's banner. The
  claim (MarketingTouchProvider -> prepareRequestVerificationClaim ->
  claimManualPlan) carries the app's Aliyun captcha proof in 3.18.2 as
  in 3.17.2, and client/configs still says captcha.enabled true. The
  plugin has posted no claim since 0.1.55 (11-07), and claims without
  the proof were refused 3007 since 10-06. Until the plan is claimed
  in the ZCode app it has no balance bucket, so the plugin lists no
  -Trial entry for it and free first has nothing to spend. That is the
  report. The captcha is not got past.
- The Start Plan request: 3.18.2's headers (buildCliZCodeSourceHeaders,
  zcode-source-headers.ts) are the plugin's startHeaders but for the
  version (3.17.2) in User-Agent and X-ZCode-App-Version;
  @ai-sdk/anthropic is 3.0.81 in both. Start's credential in 3.18 is
  the shared ZCode JWT, as the plugin sends. No header picks a plan or
  bucket: the server chooses which bucket a model spends.
- The balance read (zaiStartPlanBilling.ts) is unchanged in 3.18, and
  on the owner's account the balance, the feed and client/configs
  answer the same for app_version 3.17.2 and 3.18.2. APP_VERSION stays.

So the change is the refusal: a -Trial pick that finds no gift now
reads the claim feed (toClaim; kept ten minutes per session, a failed
read names none and is not kept) and, when ZCode holds a plan there,
says "ZCode holds ZCODE WEEKEND BUILD for this account unclaimed:
claim it in the ZCode app (its claim needs the app's security check),
and GLM-5.3-Flash-Trial spends it". Nothing is claimed and no model is
asked. The card's "Gift plans to claim in the ZCode app" line was
already there. README says what happens until the claim.

Run (mote, sandbox HOME): bun test in packages/zcode, 265 pass 0
fail; bun scripts/check.mjs zcode ok. Real account (owner's, sandbox
HOME): unclaimed() read the live feed, [] (no weekend delivery on that
account today).
Broken by hand, each red, then restored: the refusal without the feed
(2 fail), the ten-minute keep removed (1 fail).
Not tried: a real account holding a weekend plan (the owner's has no
delivery or balance plan today), and a claim in the ZCode app followed
by a request; Windows and Linux.
2026-11-14 18:17:21 +08:00
yetone da17052c0c loomy 0.1.8: the vendor's vision, reasoning and tool calls reach the host (#1141)
The models hook gave each listed model in OpenCode's config shape
(modalities, reasoning, tool_call), and replaced the entry it was given
with it. The host (magpie's and OpenCode's) reads a listed model by its
runtime shape: capabilities.input.image, capabilities.reasoning,
capabilities.toolcall. So a model models.dev doesn't know, like
deepseek-v4-flash-1017, went as one of no known vision, and its
reasoning and tool calls were dropped too.

listedModel now merges over the existing entry, keeps the config's
fields, and sets capabilities from what the vendor says; what it
doesn't say keeps what was known of the model.

Run (mica, temp HOME): packages/loomy bun test 33 pass; bun
scripts/check.mjs loomy ok. With main's index.mjs the new test fails
(32 pass, 1 fail). Not tried against a real Loomy account.
2026-11-14 17:48:20 +08:00
yetone 8e19b6a0e7 zcode 0.1.64: a Start Plan request refused beside the account's others waits its turn, not 429 (JJLIN070414 on X)
JJLIN070414 on X: with two or more sessions on ZCode's Start Plan
through magpie, 429s keep showing; the same work in DeepSeek Harness
runs on. Cause: ZCode answers 3008 when an account has more Start Plan
requests in flight than it serves (some accounts one at a time,
plugins#438). Since 0.1.58 such a cap with others of the account in
flight narrows the gate to one for five minutes, but the request that
was refused still went back to magpie as busyAnswer's 429 after its
1s and 2s re-asks. With one account magpie has no one else to ask, so
the agent got the 429 (Claude Code shows it and retries; dsh retries
silently), again each time the narrowing ran out.

ZCode's own client (zcode-src docs/dynamic-workflow/concurrency.md,
start-plan-provider-business-errors.md) cuts its per-key cap on 3008
and queues capped subagent requests with unbounded retries; only a
main turn's first admission shows the busy banner.

Now askBusy stops at the narrowing (onCap says true) and marks its
answer `requeue`; the Start Plan path gives the slot back, waits at
the head of the queue (startSlot front) until one of the account's
other requests ends, and sends again. The waits share one
startGate.wait, then the queue's own 429; REQUEUE_MAX (4) bounds the
turns. A cap refused alone still counts toward the firewall hold and
goes back as before; free first's gift still replays on the plan.

Run (mica, Bun 1.4.2, HOME and TMPDIR in the run folder; mote's load
was over its cores): packages/zcode bun test 262 pass, 0 fail, 18
files; bun scripts/check.mjs and check.mjs zcode exit 0.

Broken by hand: REQUEUE_MAX = 0 (the old behaviour): the reporter's
two-session test, the #438 test (now all pairs 200) and the wait-bound
test fail; the other 15 in inflight.test pass.

Not tried: a real ZCode Start Plan account with two sessions (a run of
caps can get the home IP a 405 from ZCode's firewall for 1-2 hours);
the queue-front order has no test of its own.

Reported-by: JJLIN070414 (X)
2026-11-14 17:21:51 +08:00
yetone dac9726736 agy-cli 0.1.44: a turn keeps only its current request body, and tool-result images are hashed in the history key (#1137)
A Codex tool loop with view_image screenshots grew the plugin host to
0.5-1.5 GiB after GC, so magpie recycled it every ~10 minutes and the
mid-turn conversation restarted without its tool outputs (tungloong's
report).

- Turn.registerResponse drops the previous step's body and
  contentSnapshot. Only the current step's are read again (a late
  prompt's estimate); the usage reducer reads settled/usage only.
- historyKey keys a tool_result image by mimeType + sha256, as it
  already keys a user's image, instead of copying its base64 into the
  key on every comparison.

Old data: a conversation parked before the update with an image inside
a tool result has a history hash taken over the raw bytes, so it starts
a new agy session once instead of resuming. Others are unchanged.

Run (mote, sandbox HOME): node --test conversation-key, step-usage,
usage-settlement, repeat-batch, compat: 128 pass. bun test: 21 pass.
scripts/check.mjs ok. Broken by hand: with origin/main's index.mjs both
new tests in conversation-key.mjs fail (2 of 33).
Not tried: a real Codex Desktop screenshot loop; heap size not measured.
2026-11-14 17:11:03 +08:00
yetone 0a2cf4734c loomy 0.1.7: deepseek-v4-flash-1017 keeps its image_url parts; only the old DeepSeek line gets the base64 marker (#1139)
prefersTagFormat exempted only ids spelling v4.1 / v4-1, so
deepseek-v4-flash-1017, which reads OpenAI image_url parts, had its
images turned into <image_base64> text and never saw them (7,368 prompt
tokens against 232, per the reporter's side-by-side). The marker is now
for deepseek-v4-flash and deepseek-v4-flash-0731 only, the ids it was
made for; any other DeepSeek id keeps OpenAI's shape, since Loomy
renames them freely and the newer ones take image_url.

Run (mica, sandbox HOME): bun test packages/loomy 32 pass;
scripts/check.mjs loomy ok. Broken by hand: main's index.mjs fails
"which models get the base64 marker" on the 1017 ids.
Not tried: a real Loomy request (the reporter's table is the evidence).
2026-11-14 17:03:23 +08:00
Lucentio-HuangandLucentio-Huang 3f37b858db zcode 0.1.63: the app's China sign-in keeps its identity, and the active provider's profile names the account (#1135)
ZCode's app sign-in reads oauth:active_provider and includes zai_cn, so
a China-channel account keeps its name and user id, follows renewal for
the same user, and stays on its own session when the app switches to
another user with the same display name. Unreadable active_provider
falls back to the old order with zai_cn added.

Reviewed at 5d6e923e3. Run (mica, sandbox HOME): bun test packages/zcode
260 pass; scripts/check.mjs zcode ok. Broken by hand: main's index.mjs
with this PR's tests fails 3 of own.test.mjs (China identity, active
zai_cn, active bigmodel).

Co-authored-by: Lucentio-Huang <Lucentio-Huang@users.noreply.github.com>
2026-11-14 17:02:35 +08:00
yetone 191d94bf6e devin 0.1.41: a Gemini reply goes back with its thought signature, as the CLI sends it
Reported on X (@liuzhengdong99, magpie 0.1.4146): in DSH, Devin's Gemini 4
Hydrogen often fails with "an empty reply ... (502)" or hangs; SWE-2 works.

Diffing the plugin's GetChatMessage against the official devin CLI's
(captured through a proxy, same account, gemini-4-hydrogen-medium, a tool
turn): Devin streams Hydrogen's thought signature (field 10, type
"gemini" in 21) and no visible thinking. The CLI sends it back on the
assistant prompt that carries the call: signature (12), signature_type
"gemini" (18) and the model that wrote it (22). The plugin dropped Gemini
signatures, on the chat wire and the Messages wire, so every later turn
went back to Gemini without them. Google documents thought signatures as
required for Gemini 3-class function calling.

Neither a chat completion nor a Messages tool_use carries a signature, so
the plugin keeps each Gemini reply's signature in memory by its call ids
(or by its words, for a reply with no call), up to 4096, and puts it back
on the matching assistant prompt with field 22. Other models are
unchanged; an unknown call, or one after a restart, goes back unsigned as
before.

Run:
- gemini-thought.test.mjs (7 tests, fixture = a real Hydrogen tool reply
  captured from the CLI, testdata/gemini-tool-reply.bin, no credentials):
  7/7 on mica. Broken by hand: against origin/main's index.mjs the 5
  signature tests fail (Received: undefined); the 2 "goes back unsigned"
  tests pass on both.
- Whole plugins suite on mica, HOME=$(mktemp -d) bun test, as CI:
  8796 pass, 0 fail (8816 tests, 615 files); bun scripts/check.mjs ok.
  packages/devin alone: 220/220.
- Real account (sandbox HOME, plugin through a chat-completions shim):
  a 4-step tool loop on the new code signed every assistant prompt
  (1/1 .. 4/4), all 200, right answer. dsh headless (sandbox HOME) on
  Hydrogen through the shim: a JSON-parser coding task on old and new
  code, both finished with tests passing, every request 200.

Not reproduced: on the old code, 127 Hydrogen requests through dsh
(up to 170 messages, a 434KB request) all answered 200, with no empty
reply. So this restores what the official client sends; it is not proven
to be the reporter's cause. The "hang" is likely Hydrogen's hidden
thinking: the plugin waits for the first real content and Hydrogen
streams no thinking text. No retry was added.
2026-11-14 17:01:05 +08:00
yetone 5613a1259a agy-cli 0.1.43: agy 1.5.8's attempt lines are dropped, and its network and credit endings fail the turn (#1136)
agy 1.5.8 writes each failed attempt of a model call into the reply
("\n⚠ API error (attempt N): request failed: … EOF"), then tries again in
the same turn, and when it gives up it ends with "⚠ There was a network
issue connecting to the server, please try again." or "⚠ Your AI credits
balance is too low to continue." instead of "Agent execution terminated
due to error.". The bridge passed all three through as the model's text,
and the endings as a 200 end_turn, so the gateway neither retried nor
switched accounts.

- dropRetryBanner drops an attempt line where it starts a line, with its
  leading and one trailing newline, the way #1124 drops "Model produced
  invalid output."; a line not ended yet is held (openBanner) until its
  newline, a tool call or the end of the turn. A mid-line quote is kept.
- The error markers are a list; the network and credit endings fail the
  turn like the old marker. The credit ending is a rate_limit_error.
- The error's detail falls back to the last attempt line's text, then the
  ending's own words, when agy's log has no executor error.
  lastAgentError also reads "Run: attempt N failed (…), retrying in",
  "CallWithRetry: …" and "inference connection failed…: …" lines.

Fixtures are the reporter's exact strings from their Codex rollout.

Run (mica): node --test test/repeat-batch.mjs 33 pass; agy-cli bun test
21 pass; scripts/check.mjs agy-cli ok. Broken by hand: with main's
index.mjs the attempt-banner and ending tests fail (2 of 3; the third is
the mid-line quote guard, green on both).
Not tried: a real agy 1.5.8 with a dropped connection; the log-line
patterns are from the issue's log excerpt, not a test.
2026-11-14 16:32:54 +08:00
wuuliandwuuli 62c3241954 cursor 0.2.47: wait for announced MCP execs before sealing a batch (#1133)
A Cursor step can send its tool count, then a checkpoint naming only the
first MCP call, then the second call's exec. The count made the #550
fallback seal the batch at that checkpoint, so the second tool was lost
(native: "native call arrived after its batch was sealed"; stateless: one
tool). StepCalls now tracks MCP calls announced by a partial or started
update until their exec or Cursor's own completion arrives, and neither
path seals on a checkpoint while one is pending. Cleared at nextStep.

Reviewed at d3a50d48. Run (macOS, mica): bun test packages/cursor 425
pass 0 fail; bun scripts/check.mjs cursor ok. Broken by hand: without
both pendingMcp checks the four new tests fail; with them they pass.
PR checks bumped, test, on-npm green. Not tried: a real Cursor account
(the author ran a live Pi -> magpie -> Cursor probe, 6 tool calls ok).

Co-authored-by: wuuli <wuuli@users.noreply.github.com>
2026-11-14 16:04:32 +08:00
yetone 2e4403d1fb ci: a package's shipped files don't change under a version that is out (#1131)
A version is packed once (dist keeps its first tarball, npm won't take it
twice, and magpie updates by version), so a change shipped without a bump
reaches no one. #1095 did that to astudio 0.2.2.

scripts/bumped.mjs <base> diffs packages/ against base and names each
package whose packed files (npm pack --dry-run) changed with its version
the same. README.md is left out: magpie reads it from dist's index.json,
rewritten every run. bumped.yml runs it on each pull request (base sha)
and each push to main (event.before).

Run: bun test scripts/bumped.test.mjs, 3 pass (mica). Broken by hand:
with astudio set back to 0.2.2, `bun scripts/bumped.mjs a2af9d2d~1`
fails naming packages/astudio@0.2.2: index.mjs; at 0.2.3 it passes.
Not tried: the workflow itself, until this push runs it.
2026-11-14 15:15:29 +08:00
yetone 288310b6ac astudio 0.2.3: ship #1095's DeepSeek-V4.1-Flash fill-in (#1131)
#1095 (a2af9d2d) changed index.mjs, opencode2.mjs and README.md but kept
version 0.2.2, which the dist branch had packed on 11-11 from 02fe223d.
dist packs a version once, so every install of 0.2.2 got the 11-11 code
with 7 models, and magpie's update saw 0.2.2 == 0.2.2 and fetched nothing.
The reporter's jsDelivr per-file cache theory doesn't apply: magpie
installs the dist tarball, checked against its sha512.

0.2.3 is a new version, so dist packs today's code and magpie offers it
as an update.

Run (mica): bun test packages/astudio, 85 pass; bun scripts/check.mjs
astudio ok. Packed every package at fb7bbebd and compared it with dist's
tarball of the same version: astudio is the only one whose code differs
in a way a user meets. 29 others differ only in opencode2.mjs (0135b7b0's
warming() refresh, a no-op for plugins without warming(); only agy-cli
has it, and it was bumped), and two in README.md alone.
2026-11-14 15:15:29 +08:00
yetone fb7bbebdc2 antigravity 0.1.13, antigravity-cloak 0.1.8: Codex's GPT-5 line goes reworded in a user's turn too
Since 11-14 Antigravity also answers a bare 429 "Resource has been
exhausted (e.g. check quota)" to Codex's GPT-5 lines ("You are Codex, an
agent / a coding agent based on GPT-5") in a user's turn: a pasted
AGENTS.md, or a developer message magpie tells after a reply as a
<system-reminder> in the user's turn. Both the plugin and the cloak only
reworded the system prompt, so such a conversation 429s on every turn
whatever quota is left (daoche_wuzui on X, magpie 0.1.4131 with Cloak
0.1.7).

On the owner's real Antigravity account, gemini-3.8-flash, 11-14:
- each line in the first user turn: Codex's two lines 429 3/3 each; the
  billing line, the Agent SDK line, Hermes' persona and omp's RFC line
  200 3/3 each, so only Codex's two are reworded there.
- Codex's line in the model's turn and in a functionResponse: 200 2/2.
- "built on GPT-5" in the user's turn: 200.

antigravity: shape() rewords USER_TURNED_AWAY (Codex's two lines) in
every non-model part's text; cloak() takes an optional list of lines.
antigravity-cloak: onProvider rewords those two lines in user messages
(anthropic messages, chat messages, responses input, gemini contents);
tool results, the model's turns and the user's own saidAs/extraWords are
left as they were in messages. The old case that kept a user's Codex line
as written now expects it reworded.

Run, at this tree, on mica:
- root `bun test` with a temp HOME: 8781 pass, 0 fail (8801 tests, 613 files)
- packages/antigravity `bun test`: 93 pass; packages/antigravity-cloak:
  25 pass.
Broken by hand: with the user-turn cloak taken out, shape.test's new
test fails, and 5 of the cloak's cases fail.
Real account through a sandbox magpie (gateway 3476, plugin host
restarted on these files): an Anthropic /v1/messages request whose user
turn carries Codex's line, 429 3/3 on 0.1.12 + cloak 0.1.7, 200 3/3 on
these. The plugin alone on the same account: 429 3/3 -> 200 3/3 for both
lines. Claude Code's 23-tool capture and a Codex capture still 200 2/2.
Not tried: agy-cli (it doesn't cloak), other models than
gemini-3.8-flash for the user-turn case.
2026-11-14 14:24:14 +08:00
yetone 09c05dfa9f trae: an enterprise sign-in naming the console chats on the consumer gateway (#1127)
shadow1606's real Trae CN enterprise (SaaS) seat named
console.enterprise.trae.cn as its model host. There, every
/api/agent/v3/llm_utils_chat answered {"code":4245}, for every function
and model: TRAE SOLO chats through create_agent_task/workflow with
encrypted bodies instead. The list the console gives names the tenant's
configs, which the consumer gateway then refuses (4001). The consumer
gateway takes the same login, and the reporter verified full completions
by pointing `api` at it. That is now what apiOf does for the console host
itself. The account's usage stays on the console (`host`, seat pool in
yuan), as before. Chats there count against the login's consumer
Credits, not the seat pool; that is said on the issue.

Not changed: any other trae.cn tenant host a sign-in names (ent-acme in
the tests) is still taken as the model host, as no real account shows
otherwise. Trae Global's console.enterprise.trae.ai is not measured. Its
issue was filed with this commit.

Run (WSL, bun 1.4.2, HOME=$(mktemp -d)): packages/trae bun test 266
pass 0 fail; scripts/check.mjs trae ok. Broken by hand: without the
console line, the new enterprise test fails (19 pass 1 fail).
Not tried: a real enterprise account (no seat here); the reporter's run
is the end-to-end evidence.
2026-11-14 14:11:24 +08:00
yetone e0f2a4c2e9 agy-cli 0.1.42: agy's "Model produced invalid output." retry banner is dropped (#1124)
When the model's first call returns neither text nor tool calls, agy writes
"\n⚠ Model produced invalid output." into the reply and calls the model
again in the same turn. The bridge passed that banner on as the reply's
text, so Claude Code's prompt_suggestion took it as the suggestion.

Turn.pushText now drops the banner, with its leading newline and one
trailing newline, wherever it starts a line. A banner that ends a chunk is
held, so a newline in the next chunk goes with it, and it is dropped for
good when the text is flushed. The turn goes on: unlike agy's error
marker, it does not fail the prompt. The model quoting it mid-line keeps it.

Run on WSL (Bun, temp HOME):
- packages/agy-cli: bun test, 21 pass / 0 fail (repeat-batch 30 pass).
- bun scripts/check.mjs agy-cli: ok.
- Broken by hand: on the old index.mjs the new #1124 banner test is red.

Not tried: a real agy 1.5.8 empty-output retry; the banner bytes come from
the reporter's gateway log, and both with and without a trailing newline
are covered.
2026-11-14 13:30:22 +08:00
Muyang 80547ec2ab privacy-gate: per-agent controls and a graphical settings page (#1111)
privacy-gate's settings page and panel gain per-agent switches and an
"other agents" list. disabledAgents entries the UI can't show as one id
(globs such as `claude-*`) are kept verbatim on save and lock the rows
they match. A save reads the options again and refuses when the agent
fields changed since load, and merges into the current object so
unrelated options are kept.

Run at 30956ba616b3 (the reviewed head), on WSL with a temp HOME:
- packages/privacy-gate: bun test, 76 pass / 0 fail.
- bun scripts/check.mjs privacy-gate: ok.
- Broken by hand: with mergeDisabled dropping patterns, "a glob policy
  survives an options save and unrelated options are kept" goes red.

Thanks @siml1169.
2026-11-14 13:26:28 +08:00
yetone 9bca17b5d2 codearts 0.3.20: a body too large to sign is a 413, not an expired sign-in (#1121)
APIG signs a request body of 12 MB at most. A larger one (apple-small's
long chat with 21 images, ~20 MB) came back after ~30s as 401 APIG.0301
"calc ak sk signature fail:body too large". The plugin read every such 401
as a stale credential: it renewed, then answered 401 with
X-Magpie-Sign-In: expired, so magpie showed the account signed out and
signing in again changed nothing.

Now that answer, on chats and other requests, is a 413 saying the size and
what to do (new chat, or drop the large images), with no sign-in mark and
no renewal. A body over 12 MiB is refused the same way before it is signed
or sent, so it doesn't wait the gateway's ~30s first.

Not changed: images are not dropped or rewritten; that would change what
the user sent. OfficeAce sends Basic auth, no AK/SK body signature, so it
is left as is.

Run: wsl-run bun test in packages/codearts, 213 pass. Broken by hand:
isBodyTooLarge always false -> the 413 test red; no pre-send size check ->
the 12 MB test red. scripts/check.mjs codearts ok.
Not tried: a real mainland account with a 20 MB chat; the gateway's answer
is the reporter's log, used byte for byte in the test.
2026-11-14 11:49:01 +08:00
cyanask 001a1f9fbf company-guard 0.4.3: reversible company-name masking middleware (#903)
New middleware package @magpie-community/middleware-company-guard 0.4.3 (ported by @cyanask from cyanask/magpie-company-guard): masks company names in requests with stable per-session aliases, restores them in replies (Responses, Chat Completions, Anthropic Messages, Gemini; streaming and tool arguments), keeps local receipts, and lets a Codex session be approved explicitly. macOS only ("os": ["darwin"]). The receipt page listens on 127.0.0.1:3469 only; nothing goes to an outside host.

Review fixes since 07587b9: default port 3478 (atomcode's) -> 3469, unused in the repo; the three local keys are generated on first run into <config>/magpie/company-guard/keys.json (0600, O_NOFOLLOW, owner-checked) and written into this plugin's own plugins.json entry, so install works with no setup; 27 tests.

Run at 7a147166 on mica: node --test 27 pass, bun test 27 pass; esbuild 0.25.12 rebuild of dist/company-guard.middleware.js is byte-identical (sha256 b2faf535...); merged with origin/main, scripts/check.mjs ok, bun test scripts 24 pass. Broken by hand: onEvent returning the event unrestored -> the four split-chunk tests red; initializeOptions without publishKeys -> five install tests red.
Not tried: a real magpie install end to end. The package is not on npm yet, so it is served from the dist branch until its first npm publish.
2026-11-14 11:18:13 +08:00
yetone c490e2a85e codearts 0.3.19: the mainland station gets no stop at all (#1120)
The mainland gateway (snap-access cn-north-4) now answers every non-empty
stop with InferHub.001001005.400, a string too: Glueo measured "x", "###",
"\n\n", "Observation:", "</block>" and ["x"] on five models, all refused,
and the same body without stop answered. 0.3.15's string-only rule
(magpie#6342) no longer holds. Claude Code's auto-mode classifier always
sends stop_sequences ["</block>"], so every classifier call on a mainland
account was refused.

normalizeStop now leaves stop out on the mainland; the international
station still takes a list (#998), unchanged.

Run: wsl-run bun test in packages/codearts, 211 pass. Broken by hand:
main's index.mjs under the new test, 1 fail. scripts/check.mjs codearts ok.
Not tried: a real mainland account here; the measurement is the reporter's.
2026-11-14 11:13:50 +08:00
yetone 5bb4194140 antigravity 0.1.12, agy-cli 0.1.41, antigravity-cloak 0.1.7: turned-away lines go reworded (#1118)
Since 11-14 Google's check reads past invisible characters: a system
prompt with Claude Code's billing line and Agent SDK line, broken up with
two U+200B in every word as the cloak sent them, was turned away 5 of 5
with the bare 429 "Resource has been exhausted". Claude Desktop's Code
tab through magpie to Antigravity failed every turn (hc295971796 and
daoche_wuzui on X, 11-14).

Each line Google turns away now goes reworded instead, as plain words:
- the x-anthropic-billing-header line is left out (to its line's end);
  a system part or message holding only it is dropped;
- "built on Anthropic's Claude Agent SDK" -> "built on the Claude Agent
  SDK by Anthropic";
- Codex's "based on GPT-5" -> "built on GPT-5";
- Hermes' "created by Nous Research" -> "built by Nous Research";
- omp's RFC "keywords" -> "key words" (as before).
A copy an older magpie or cloak broke up (U+200B, U+2060, soft hyphen,
in or between words) is matched and reworded as the line. The Code tab's
main line ("You are Claude Code, Anthropic's official CLI for Claude,
running within the Claude Agent SDK.") passes as written and is kept.
antigravity-cloak gains a saidAs {phrase: replacement} option; extraWords
still breaks words up and the README says it no longer gets past
Google.

Run:
- real Antigravity account, sandbox HOME, gemini-3.8-flash, 10
  sequential requests each through packages/antigravity at this head:
  Code tab main prompt as Claude Desktop sends it (billing + main line +
  rest) 10/10 200; Agent SDK subagent line 10/10; an old two-U+200B
  copy 10/10; Codex GPT-5 10/10; Hermes' earlier persona 10/10; omp's
  RFC line 10/10. Each rewording alone was first tried 5/5 against the
  zero-width break, which went 0/5.
- wsl-run, HOME=$(mktemp -d) bun test (whole repo) before the last test
  fixes: 8735 pass, 19 skip, 3 fail, all three in these packages' own
  tests still expecting zero-width; after fixing them,
  bun test packages/antigravity packages/agy-cli packages/antigravity-cloak:
  133 pass, 0 fail.
Broken by hand: the three packages' source files from origin/main with
these tests: 19 fail (shape, cloak parity, smoke, every cases.json case).
Not tried: agy-cli against the real agy binary (smoke runs a fake agy);
models other than gemini-3.8-flash.
2026-11-14 11:04:28 +08:00
yetone 07ba4eb88d trae 0.2.35: a bare {"tool_calls":[…]} reply is its calls (#1114)
The sibling of qoder's #1113: a model can write OpenAI's own wire shape
as text, {"tool_calls":[{"name","arguments"}]} on a line of its own,
and trae passed it through as the answer. TextTools now reads a whole,
readable object as its calls ({"name","arguments"} entries and OpenAI's
{"type":"function","function":{…}} both), drops the line's indent with
it, and ends the turn with the cut-short failure when the stream ends
inside one, as a <tool_call> block does. While streaming, a last line
that may still grow into {"tool_calls":[{ is held until it settles.

The shape in prose, in a code fence, {"tool_calls":[]}, an entry with
no name and other JSON lines stay text.

Siblings: doubao-work 0.1.12 (4ea39f01) and orcaterm 0.1.8 (2db9b0ad).
zen-free reads no calls out of text (its upstream sends tool_calls
itself), so it has nothing to change.

Run (WSL magpie-desktop, HOME=$(mktemp -d)):
- packages/trae bun test: 265 pass, 0 fail. jsoncall.test.mjs uses
  #1113's bytes, whole and in 1-, 5- and 4096-character pieces.
- On the old code jsoncall.test.mjs is 2 of 3 red; with jsonHoldAt
  returning -1 by hand, the streamed cases go red again.
- bun scripts/check.mjs trae: ok.
Not tried: a real Trae account producing this reply.
2026-11-14 10:05:13 +08:00
yetone 2db9b0ad7f orcaterm 0.1.8: a bare {"tool_calls":[…]} reply is refused, not sent as the answer (#1114)
#1113's model wrote OpenAI's own wire shape as text, on a line of its
own: {"tool_calls":[{"id":…,"function":{…}}]}. OrcaTerm sends no tools
upstream, so such a reply is a call with nothing to call: it is now cut
where the call starts and the turn ends with the text_tool_call error,
the same as a <tool_call> block. Streamed, a last line that may still
grow into {"tool_calls":[{ (its indent too) is held until it settles.

Prose that mentions the shape, a fenced or backticked copy,
{"tool_calls":[]} and other JSON lines stay the answer.

Sibling: doubao-work 0.1.12 (4ea39f01) lifts the same shape as calls,
since doubao-work does carry tools.

Run (WSL magpie-desktop, HOME=$(mktemp -d)):
- packages/orcaterm bun test: 164 pass, 0 fail; jsoncall.test.mjs
  covers 1-, 5- and 4096-character frames with #1113's bytes.
- Broken by hand: without the new regex alternative, all 4
  jsoncall tests fail; restored, all pass.
- bun scripts/check.mjs orcaterm: ok.
Not tried: a real OrcaTerm account producing this reply.
2026-11-14 10:02:43 +08:00
yetone 4ea39f0155 doubao-work 0.1.12: a bare {"tool_calls":[…]} reply is its calls (#1114)
The sibling of qoder's #1113 (0.2.68). A reply that writes its calls as
one JSON object in OpenAI's own wire shape went out as the answer with
"stop". A whole {"tool_calls":[…]} object on a line of its own, outside
code, is now those calls (finish tool_calls), with arguments as an object
or as a JSON string. While the reply streams, such a line, or a tail that
could become one, is held and never shown as text. JSON in prose or in a
fence, an empty list, a nameless entry and unreadable arguments stay text,
as an unreadable <tool_call> block does in this package.

Run: bun test in packages/doubao-work on WSL (magpie-desktop),
HOME=$(mktemp -d): 62 pass, 0 fail (jsoncall.test.mjs new, with #1113's
bytes). bun scripts/check.mjs doubao-work ok.
Broken by hand: without the lift and the hold, both jsoncall tests that
are about them go red (2 fail).
Not tried: a real Doubao reply in this shape; none has been reported.
2026-11-14 09:58:53 +08:00
yetone 6753271861 doubao-work: the README says listing models and usage read only an open window (#1117) 2026-11-14 09:31:18 +08:00
yetone 37ef8ffa96 doubao-work 0.1.11: listing models and reading usage never start Doubao (#1117)
On Windows magpie's model list and usage read each brought 豆包工作 up
with no request sent, and a single-instance app handed the second launch
to the copy already on the plugin's profile, so start waited on a fresh
port nothing listened on and the window kept coming back.

- quota() and ensureList() attach only to a window already open
  (App.running); a closed one is the app_closed error for usage, and the
  list is read on the next request. Only a request starts the app.
- App.start finds its own copy (now on Windows too, via WMI command
  lines) and waits on that copy's --remote-debugging-port instead of
  spawning another. A copy on another profile stops start on macOS only:
  Windows keeps one copy per profile.
- The port file is written only once its port shows the app's pages.
- A models.json from an older version keeps its models (less 快速 and
  专家) as a never-read list, instead of falling back to three models.

Run: bun test in packages/doubao-work on WSL (magpie-desktop),
HOME=$(mktemp -d): 59 pass, 0 fail. bun scripts/check.mjs doubao-work ok.
Broken by hand: with quota/ensureList launching again, "models() and
usage never start Doubao" goes red; without the own-copy attach, "App
waits for its own copy on that copy's port" goes red (2 fail).
Not tried: the real app on Windows (no 豆包工作 there); the WMI query
is tested against a recorded shape only.
2026-11-14 09:18:29 +08:00
yetone 7da596030e day-card 0.3.5: the day menu lists every day after a past day or span, not today above it (shangyuan0818 on X)
The reporter (Windows) picked an earlier date range; the day menu then
listed today first and the range's last day second, as if no day between
had calls. usage:day's days stop at the date read (usageapi.SpanOf:
h.Date <= date), and the menu put today on top of them. A day or span in
the past now reads today's days for the menu (one more usage:day read,
date "", on opening it) and V.menuDays merges both, newest first, today
on top, the newest 120 and back as far as the day shown. If that read
fails the menu lists only the days it has, with no today above a gap.
Chosen over leaving today out: the menu is how you get back to a later
day, and today was always on it.

Run on mica (mote's load was over 18) at 76cfb7fe + this change:
- HOME=$(mktemp -d) bun test (whole repo): 8717 pass, 0 fail.
- bun scripts/check.mjs: exit 0.
- day-menu.gui.mjs (new, real page, stub bridge answering as SpanOf):
  all ok in Chromium and WebKit, day, week and month.
Broken by hand: with the old menu logic moved into V.menuDays unchanged,
the new unit test is red (today then 11-01, 11-06..08 missing); with
origin/main's app.js and view.js, day-menu.gui.mjs FAILs "chromium day to
11-01" with 2026-11-09 2026-11-01 2026-10-20, the reporter's case.
Rebased onto 4170d0e8 (antigravity/agy-cli only, no day-card change).
Not tried: the live magpie window on Windows.
2026-11-14 09:14:12 +08:00
yetone 4170d0e816 antigravity 0.1.11, agy-cli 0.1.40, antigravity-cloak 0.1.6: omp's RFC 2119 line goes as "key words", in any white space
eric_li8983 (X, 11-14): oh-my-pi on Windows with an Antigravity account got
"Antigravity answered 429 to this system prompt" for omp's first line,
"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL."

Two causes, both seen on a real account on 11-14:

- Google's check reads the line in any case with any white space between
  its words: wrapped with LF or CRLF, indented, a tab, two spaces or a
  no-break space were all turned away, while the cloak matched only the
  literal line, so those copies went out whole. Each turned-away line is
  now matched with any run of white space (JavaScript's \s) between its
  words, the same in antigravity, agy-cli's cloak.mjs and the
  antigravity-cloak middleware; Codex's and Hermes' lines too.
- A zero-width-broken copy of omp's line was itself turned away now and
  then (10 sequential requests each: two U+200B a word 3 bare 429s, one
  after every character 3, U+2060 2, soft hyphen 1). omp's line now goes
  as "RFC 2119 key words: …", RFC 2119's own term, with its white space
  as it was. The hint says so.

Real account (sandbox HOME, copy of the live Antigravity account,
gemini-3.8-flash, sequential): the reworded plugin answered omp 18.20.0's
literal prompt 10/10, the full template 10/10, and the line wrapped after
"REQUIRED," 10/10. The zero-width version before it: lit 3, tmpl 1, w1 5
bare 429s in 12 each.

Run at 24c75a16's tree (rebased on 76cfb7fe): the whole bun test (temp
HOME) on WSL magpie-desktop, 8720 pass, 0 fail, 19 skip. Broken by hand: the new tests against the old index.mjs,
cloak.mjs and middleware: 6 fail.

Not tried: omp itself end to end on Windows. Also seen in the same probe:
Claude Code's, Codex's and Hermes' broken-up lines were each refused 1-2
times in 10; filed as #1118.
2026-11-14 09:03:51 +08:00
yetone 76cfb7fe86 qoder 0.2.68: a bare {"tool_calls":[...]} reply is its calls (#1113)
A model on Qoder CN (auto/minimax-m3.1-flash) answered with OpenAI's own
wire shape written as text, {"tool_calls":[{"name","arguments"}]}. The
Splitter only knew <tool_call> and the bare XML tags, so the block went
out as the answer with finish "stop" and the calls were lost.

The Splitter now reads such an object as those calls and finishes
tool_calls. It counts only when the object starts its own line, its first
key is "tool_calls", and it is outside code (quoted()). Each entry needs a
name and arguments that are an object or a JSON string ({name, arguments}
or {function:{...}}). It is held until its braces close. A block cut short
at the end of the stream, or with an entry that can't be read, ends the
turn as an error (502 when not streamed), as #132's <tool_call> block
does. An empty array, other JSON, and JSON in prose or code stay text.
Unlike the XML path, this isn't gated on declared tools: the reporter's
request declared none, and the <tool_call> path isn't gated either.

jsoncall.test.mjs uses the issue's bytes: bare, prose then bare, whole
and in 3- and 1-char pieces, streamed and not, the <tool_call> control,
string arguments, four error shapes, and seven text-stays-text cases.

Run (WSL magpie-desktop, bun, HOME=$(mktemp -d)): packages/qoder
`bun test`: 440 pass, 0 fail. jsoncall+textcall+xmlcall at the pushed
tree: 26 pass. `bun scripts/check.mjs qoder`: ok.
Broken by hand (detection turned off): jsoncall goes 7 fail, 2 pass
(the control and text-stays-text).
Siblings filed: #1114 (doubao-work, orcaterm, trae, zen-free).
Not tried: a live Qoder CN account.
2026-11-14 08:35:54 +08:00
00 26ea8faf77 codearts 0.3.18: claim every daily check-in campaign, not only the first (#1110)
The delivery list holds more than one USER_LOGIN campaign: the ordinary daily check-in (34, 100), a contest's daily check-in (40, 1000, 2026-11-11 to 12-05) and the contest's one-time sign-up gift (42). dailyCampaign took the first, 42; once it was CONFIRMED the check-in answered done and claimed neither daily one. Now every USER_LOGIN campaign whose title is a daily one (签到/每日) is claimed and confirmed in turn, credit is their sum, grants and unconfirmed claims are kept per campaignId, and a campaign the account hasn't joined (not claimable, or refused with 需要先通过触发接口激活/未报名) is ineligible rather than a failed day.

By @amqsy (#1110).

Reviewed at ab9447b8:
- WSL, HOME=$(mktemp -d): bun test in packages/codearts 211 pass; bun scripts/check.mjs codearts ok.
- Broken by hand: dailyCampaigns back to the first USER_LOGIN item turns three of the new tests red.
- The old single-claim _unconfirmed shape is still read.
- Not tried: a real CodeArts account (the author's run on 2026-11-14 00:00 Beijing claimed +1100 on two accounts).
2026-11-14 02:21:30 +08:00