Commit Graph
168 Commits
Author SHA1 Message Date
如是 ea0d006a63 scripts/try.sh: the sandbox gets a USERPROFILE on Windows, where that is the home (#44)
try.sh runs magpie with env -i and a HOME pointing into the sandbox, so
the real magpie, its agents and its sign-ins are never touched. On
Windows that is no sandbox: magpie's home comes from USERPROFILE
(appdir.homeVar) and HOME is not read, so env -i leaves USERPROFILE
unset and magpie found no home at all — it stopped before doing anything
with "USERPROFILE is not set: magpie needs the home folder to find its
own files and the agents'", and scripts/try.sh was unusable on Windows.
The sandbox is given USERPROFILE="$sb" beside HOME, which is a no-op
elsewhere. A portable magpie.exe ignores both and can't be sandboxed
this way, which predates this.
2026-10-08 13:47:19 +08:00
SadWood ce9755092b fix(factory): quote repeated summaries and changed-file context (#42)
* fix(factory): 无损适配摘要引用和文件变更通知

* fix(factory): 保留 hook 后元数据适配并补齐编码边界
2026-10-08 12:46:47 +08:00
如是 f06dacd1ec zcode 0.1.13: the claim line's name is a sentence magpie translates; its count and plan name are the display (#43)
The claim line was a window named after the plan and displaying
"1 to claim · claim it in the ZCode app". magpie shows a window's
display as it came — quotaCount (internal/gui/assets/app.js) returns
w.display when the window has no limit — and translates only the name
(t(w.name), on the card, the tips and the chart), so the line stayed
English on a Chinese interface (yetone/magpie#1001). The plugin cannot
know the interface's language (host.js and provider.Provider hand it no
locale) and magpie's translation is keyed by the string, so the
sentence has to be the name.

The window is now named "Gift plans to claim in the ZCode app" and its
display is "1 · ZCode Trust Build": the count and the plan's own name,
which are data and stay as they came, and one name for any number, so
no plural forms are needed. aside, the placement after every real
window, and the failure handling (nothing to claim, a failed preview or
an error card add no line) are unchanged. magpie adds the zh/ja/de
entries for that name alongside this.

usage.test.mjs: the fixtures carry the new name and display, and the
names list of "a coding account's line goes after its coding and gift
windows". Four of them fail on 0.1.12; bun test packages/zcode (73
pass) and bun scripts/check.mjs zcode pass.
2026-10-08 11:52:36 +08:00
yetone e2c01edc83 trae 0.2.5: a tool call written into the text that can't be read ends the turn as an error, never as the answer (#38) (#46)
#38 (deepseek-v4.1-flash on trae-cn): 64 of 3112 turns came back with
the model's text-form <tool_call> block as the answer, no call made, as
a 200 with a normal finish, so the gateway had nothing to fail over on.
ARNO (trae-cn, Discord) sent two more: a write whose JSON is whole but
has no </tool_call> (the stream ended), and a closed write block.

ARNO's two replies, as sent (content redacted to xxxx), are read as calls
by 0.2.4 too, whole or one character at a time, with the tool declared
as write or Write; prose before the block and arguments as an object
don't matter. What breaks the closed one is in its content: a written-out
analysis with a quote left unescaped ("官方"), a backslash JSON doesn't
know (\| \_ C:\Users) or a JSON sample of its own makes JSON.parse fail,
and 0.2.4 then printed the block as text. Those are the fixtures here.

TextTools now:
- reads a block as models get its JSON wrong: every quote escaped
  ({\"name\":…}, #38's most common shape), unknown backslash escapes
  doubled, and quotes inside a string escaped unless they end it (a key's
  before its colon, a value's before closing braces and the end or a
  comma and the next key);
- takes an opener with attributes, <tool_call name="bash"> with
  <parameter name="k">v</parameter>, and DeepSeek's {"name":"x"}> head
  with parameters (magpie's paramCall, #917), its values typed by the
  tool's schema;
- when a block is closed but can't be read, or is cut short at the end
  (JSON not whole, a parameter not closed), returns an error instead of
  the text: parts() yields it, so a stream ends with the error event and
  [DONE] and no finish, and a body is a 502;
- leaves a <tool_call> in backticks or a code fence, or named in prose
  with no JSON after it, as text.

Not done: #38's fourth point (text on done/response_done events): there
is no raw event showing Trae puts text there, and reading it blind could
send a whole reply twice.

textcall.test.mjs builds from ARNO's literal bytes and #38's repro cases.
Against 0.2.4's index.mjs 4 of its 6 tests fail (the two that pass are
ARNO's literal replies, which 0.2.4 already reads). HOME=$(mktemp -d)
bun test: 870 pass, 0 fail; bun scripts/check.mjs passes. Not tried with
a real Trae CN account.
2026-10-08 11:23:03 +08:00
yetone ecca97cadd qoder 0.2.8: Qoder CN enterprise VPC sign-in (yetone/magpie#312) (#41)
A new method, Sign in with Qoder CN Enterprise (VPC), asks for the
instance (its name or <instance>.vpc.qoder.com.cn) and serves the account
from the instance's own hosts: <i>.vpc.qoder.com.cn for the sign-in page,
<i>-openapi.vpc.qoder.com.cn for poll, tokens, user info and usage, and
<i>-gateway.vpc.qoder.com.cn for models and chat, the paths unchanged, as
@qodercn-ai/qoderclicn 1.1.64 rewrites the public origins once a VPC
instance is set. The instance is kept on the account; an account with
none is served as before, and one with an instance that names none is
asked to sign in again rather than sent to the public hosts.

Not tried with a real VPC account. vpc.test.mjs builds its fixtures from
AwadYoo's redacted shapes on #312; 12 of its 13 tests fail on 0.2.7 (the
one that passes is the public sign-in staying as it was). bun test
packages/qoder: 67 pass; HOME=$(mktemp -d) bun test: 864 pass; bun
scripts/check.mjs: all pass.
2026-10-08 10:30:17 +08:00
SadWood 3a9533aacb fix(factory): adapt Claude Code compaction and runtime metadata (#37)
* fix(factory): adapt Claude Code compaction and runtime metadata

* fix(factory): adapt standalone skill updates with trailing token context

* fix(factory): adapt runtime context after subagent startup hooks

* fix(factory): adapt skill paragraphs after runtime notifications

* fix(factory): encode compaction quotes in tool results for 0.1.19

* fix(factory): cover provenance summaries and restored Read content
2026-10-08 09:49:30 +08:00
yetone c9b811d288 devin 0.1.9: a tool whose parameters have anyOf, oneOf or allOf at the root goes to Devin as a plain object (yetone/magpie#1196, iron-water) — Devin's Claude models answered every request offering one with 502 "There is an issue with this request, please try a different model" (in=0/out=0), so Codex desktop, whose codex_app automation_update has a root oneOf, hung on devin/claude-opus-5-5 while swe-2 and gpt-6-1-sol were fine. build() now folds the schema as magpie's built-in folds it for Anthropic (provider.ObjectRoot, #646): allOf's branches are all merged, properties and required alike; of anyOf's and oneOf's object branches the properties are merged, a field each requires stays required, the other branches go; local $refs into $defs/definitions are followed. A schema with no root combinator is sent as it came, and the caller's own is not changed. schema.test.mjs builds from the issue's literal parameters: its three build tests fail with the fold taken out of build() (the oneOf/anyOf/allOf arrives at Devin). HOME=$(mktemp -d) bun test packages/devin (37 pass, 0 fail) and bun scripts/check.mjs devin pass. Not tried against a real Devin account. 2026-10-08 05:19:57 +08:00
yetone 96c5b0f992 skills: magpie-quota, an official skill that lets an agent check what is left of every subscription, plan and key balance magpie has (magpie quota --json, or GET /v1/magpie/quotas) and wait for allowance (magpie quota wait); it never spends a Codex reset (ttmouse on X: suggested an official skill to go with magpie quota) 2026-10-08 03:46:47 +08:00
midasandyetone ac3b697e5b workbuddy 0.1.10: explain credits exhausted (code 14018) errors with hint and extract nested error message (#25)
* workbuddy 0.1.10: explain credits exhausted (code 14018) errors with hint and extract nested error message

When calling WorkBuddy / WorkBuddy AI models (including 0-rate / free models), accounts with no active packages or depleted credits receive 429 code 14018 ('Credits exhausted...').

- Extract nested error message from v?.error?.data?.msg and v?.data?.msg
- Match code 14018 on parsed fields (error.data.code, code, error.code) or 'code':14018 to avoid false positives on requestId/timestamps
- Append EXHAUSTED_HINT explaining that WorkBuddy requires an active credit package even for 0-rate free models
- Return standard OpenAI-shaped { error: { message, type: 'insufficient_quota', code: 14018 } }
- Add tests in refused.test.mjs covering code 14018, error.data.msg extraction, and untouched pass-through of unrelated errors with 14018 in requestId

* workbuddy 0.1.10: match code 14018 whole, so a code that only begins with it (140185) passes through instead of resting the account as out of credit

---------

Co-authored-by: yetone <yetoneful@gmail.com>
2026-10-07 18:47:32 +08:00
wizzy-yangandwizzy-yang c2b0462227 zcode 0.1.12: a counted window says its count as used or as left, as the share beside it is (#659) — the Coding Plan limits and the Start Plan / Trust Build buckets told only the vendor's own text, "28746939 / 100000000", so magpie's card froze that used-first count beside a "71.3% left" figure. Each counted window now carries the count as amount of limit, as WorkBuddy's credits do. usage.test.mjs: "a counted window carries what is used of the whole" fails on 0.1.11; bun test packages/zcode (73 pass) and bun scripts/check.mjs zcode pass. (#35)
Co-authored-by: wizzy-yang <wizzy-yang@users.noreply.github.com>
2026-10-07 18:46:04 +08:00
wizzy-yangandwizzy-yang f791646a91 cline 0.1.5: a balance with no whole is the card's balance, not a meter — an account Cline serves only {balance} got a Credits window with used 0, so the card read a full bar and "100% left" whatever the balance ($0.48 in the report). The balance now goes to the card's balance field, as magpie's built-in Cline says it; a whole still makes a window, carrying amount of limit (#659). "a balance with no whole is the card's balance, not a meter" fails on 0.1.4; bun test packages/cline (67 pass) and bun scripts/check.mjs cline pass. (#36)
Co-authored-by: wizzy-yang <wizzy-yang@users.noreply.github.com>
2026-10-07 18:45:30 +08:00
yetone d17b7ed844 registry: zen-free uses magpie's bundled opencode icon, since the GUI can't show an icon by URL 2026-10-07 17:12:54 +08:00
xiaofei f5dc146c2c Add OpenCode Zen Free provider plugin (#31)
* Add OpenCode Zen Free provider and market listing

* Guard Zen tool calls and address provider review

* Preserve upstream SSE error frames in Zen tool guard

* Restore Zen Free package name and simplify README title
2026-10-07 08:24:54 +08:00
yetone b35eee46de grok 0.1.9: the same code as 0.1.8, published because magpie asks for 0.1.9 (yetone/magpie#1065) — magpie daeb108b, Command Code's mover change, raised Grok's mover min to 0.1.9 as well, a version never published, so from magpie v0.1.1078 every "Move to plugin" for Grok failed with "@magpie-community/opencode-grok-auth 0.1.8 is installed; moving needs 0.1.9 or newer" and keepMovedCurrent couldn't update moved users. Publishing 0.1.9 lets released magpie builds move again. bun test (24 pass) and check.mjs grok pass. 2026-10-07 08:22:41 +08:00
yetone 288c6bc9c9 cursor 0.1.10: far from Cursor a conversation's tool steps add up to what Cursor counted, cache included (yetone/magpie#1053, #33). The tool-step usage-event wait of 0.1.9 (first ask at 1.5 s, every 0.5 s, up to 6 s) never met an event on the reporter's network (Windows, mainland China: a GetFilteredUsageEvents round trip of ~4.2 s, the event 4–5 s after the Run closes), so tool steps were counted as their whole prompt estimated with no cache (fable 13/13 steps, 0% cached; opus 27%) where Cursor counted 95–99%, and every tool step waited the full 6 s. A tool step's Run is now owed by its conversation (only when a conversation_id names the session): the step counts every event of the conversation's owed Runs that shows within the same wait, its own or earlier ones, and says 0 used when none has; the conversation's next Runs collect the rest in the background from 5 s after the owed Run closed, and a step that ends the turn waits for whatever is still owed (in-flight collections, then a poll for the rest). Events are claimed once, by count, so the conversation's prompt, cache read, cache write and output add up to Cursor's dashboard, some of it a step late. After 3 steps in a row left something owed an account's tool steps stop waiting (asked again every 10th). A Run that fails after collecting gives it back; an account that can't read its events (4xx) and a Run with no session id are estimated as before. latency.test.mjs runs whole conversations through the plugin against a fake Cursor with the reporter's latency scaled 1/20 and the reporter's literal events (in 2 / cacheRead 63457 / cacheWrite 3081, in 2 / 66538 / 14756, in 4 / 67872 / 2392): on 0.1.9 the 3-step conversation sums to 137936 prompt / 131329 cached instead of 218104 / 197867, and skipped steps still wait the full window (292 ms > 150); both pass now, 20 of 20 runs, and stepusage + latency pass with --rerun-each 20. HOME=$(mktemp -d) bun test: 682 pass, 0 fail; check.mjs cursor passes. Not tried with a real Cursor account on a high-latency network. 2026-10-07 03:17:08 +08:00
yetone 3884236b21 devin tests: the two "without the CLI" images tests take the devin CLI out of reach themselves — they relied on no devin being on PATH, so on a machine with the CLI installed (~/.local/bin on PATH) provider.models took the CLI's path, returned full runtime models and both failed; CI has no CLI and stayed green. They now point PATH at an empty temp dir (removed after) and say so if /usr/local/bin or /opt/homebrew/bin holds the CLI. Test-only, no version bump; HOME=$(mktemp -d) bun test (676 pass, 0 fail) and check.mjs devin pass. 2026-10-07 01:36:01 +08:00
yetone bf01ffc4d9 mimo 0.1.8: a Token Plan bought at the open platform shows on the card (yetone: 我明明已经订阅了啊为啥说我是 free 账号啊). The card read only the MiMo app's /user/xiaomi/subscription/self, which is empty for an account whose plan is the platform's Token Plan, so it said Free. The same passToken signs on at platform.xiaomimimo.com (401 loginUrl, sid api-platform, through /sts), whose /api/v1/tokenPlan/detail and /usage give the plan, its end (UTC), renewal and credits: the card's plan is the Token Plan when the app has none, and its credits are an aside window (they are spent by the tp- key, not this account's requests). A platform that can't be read leaves the card as it was. Tested against the reporter's real account (Token Plan Lite, 6.81M / 4.1B credits, the second read keeping the platform session); the new tests use its literal replies and 3 of them fail on 0.1.7. 2026-10-07 00:49:43 +08:00
yetone c5c9d33e48 README: the auth hook's checkin(getAuth, provider) — a plugin can press its vendor's daily check-in itself, which magpie runs once a day per account and shows on the Usage card (Lemon on Discord); outcomes, captcha never solved, failed alone retried; links magpie's contract (yetone/magpie 87487c5e) 2026-10-06 18:45:32 +08:00
如是 bcec59ec31 zcode 0.1.11: a gift plan ZCode holds but hasn't granted is named on the card ("1 to claim · claim it in the ZCode app") (#30)
ZCode hands out one-off trust-build / gift plans that are not on the
account until the ZCode app claims them; the plugin only ever consumed
gifts already granted, so an account signed in through magpie alone sat
on the entitlement and it lapsed unclaimed (yetone/magpie#1001). The
claim itself cannot be made here: POST /billing/claim is answered 400
code 3007 "captcha verify failed" without the Aliyun captcha
attestation, and the SDK that makes it (AliyunCaptcha.js) throws unless
window and document exist, so only the app's renderer can claim one.
The author asked for the read-only half instead: ask the app's own list
(GET /api/v1/zcode-plan/billing/preview, the call the app's settings
dialog makes) while the usage card is read, and name what it lists.

The line is a window set aside, so the card shows it and routing, usage
caps and the menu bar pass it over (allowanceOf skips Aside windows;
sameAccount skips them too, so a GLM key's plan still matches the
account by its real windows). It goes last, after the coding plan's and
the gift's own buckets. A preview that fails or lists nothing adds no
line at all, a card that is an error keeps its error and asks nothing,
and an expired sign-in is no request either: the read never changes a
card or a route.

Both fixtures are real responses: an account's preview while the day's
ZCode Trust Build was unclaimed, and one after it had claimed it
(plans: []). usage.test.mjs is new (6 cases; all 72 of the package pass,
bun scripts/check.mjs zcode passes). The preview's shape is also
verified against a real account: the request goes out on the JWT with
the device id, app_version and platform the app sends.
2026-10-06 17:42:31 +08:00
yetone 8d6ae18076 commandcode 0.1.9: a Go key the Provider API refuses ("Your Go plan doesn't include API access. Upgrade to Provider or higher …", yetone/magpie#969) is taken as Go's — kept so for its models and endpoint (in memory and saved with the key, as usage saves the plan it reads) and its chat completion is sent again to /alpha/generate. Before, a Go key whose plan wasn't known yet (billing/subscriptions slow past the wait or failing, nothing saved with the key yet, e.g. just added by API key) went to the Provider API and the refusal reached the agent. Other refusals go on as they came. go-refused.test.mjs is new (4 of its 5 fail on 0.1.8); bun test (all packages) and check.mjs commandcode pass. Not tried with a real Command Code Go account (none here). 2026-10-06 12:37:44 +08:00
yetone 72382fb8a1 qoder 0.2.7: the account's fetch sends Qoder's campaigns pages (the daily credits claim) as the account — GET <openapi>/sash/api/v1/me/campaigns and POST …/{id}/claim, on the device token as usage is read (a refused one rotated once), for qoder (openapi.qoder.sh) and qoder-cn (openapi.qoder.com.cn); any other page there is still refused. For magpie's Qoder check-in (Discord, ARNO, after wallechfox/qoder-checkin). checkin.test.mjs is new (4 of its 5 fail on 0.2.6); bun test (54 pass) and check.mjs qoder pass. Not tried against Qoder itself (no Qoder account here). 2026-10-06 11:25:37 +08:00
yetone 4d6dcca173 factory 0.1.18: pi's opening sentence reaches Factory as its first half (yetone/magpie#952, mxzs123) — pi 1.0.4 got 403 "Factory: Forbidden" on DeepSeek (chat completions) and Claude (Messages) for "hi"; the reporter's replays through magpie found the refused part: "You are an expert coding assistant operating inside pi, a coding agent harness." whole (either half passes, and pi's full request with it cut to "You are an expert coding assistant." is answered on both routes). That sentence, at the start of a line of a system or developer prompt (chat completions' messages, Responses' instructions and input, Messages' system blocks and system messages), is cut so; the rest of pi's prompt, its tools and a user quoting the sentence go on as they are. pi.test.mjs is new (pi's two captured shapes; 3 of its 4 fail on 0.1.17, the 4th checks what is left alone); bun test (85 pass) and check.mjs factory pass. Not tried against Factory itself (no Factory account here). 2026-10-06 08:08:15 +08:00
yetone 697803308a workbuddy 0.1.9: Codex and Claude Code chats pass WorkBuddy's channel check (magpie #182)
WorkBuddy answers "Illegal API invocation from an unapproved channel" to a
few exact phrases anywhere in a chat, case-insensitively: Claude Code's
billing header and identity line, its gitStatus "Main branch (you will
usually use this for PRs)", and Codex 0.159.2's first paragraph as a whole.
The plugin rewrites each to words that say the same and pass (each tried
against both builds), drops the billing header, and leaves every other
message as it was. Tested with real accounts through Cindy's bundled Codex
0.159.2 and Claude Code 2.1.280: workbuddy/glm-5.3-flash and
workbuddy-ai/deepseek-v4.1-flash answer from both; before, Codex got the
refusal. unflag.test.mjs fails 3 of 4 without the change.
2026-10-06 03:09:56 +08:00
yetone 17f46b7a15 publish: a package npm refuses doesn't stop the ones after it — model-map 0.1.1 (no Trusted Publisher yet) answered 404 and trae 0.2.4, after it in the list, was never published 2026-10-06 02:27:34 +08:00
如是 be58adc8d3 trae 0.2.4: a model outside the fallback list is served with capabilities, so magpie reads it as one that reasons (#28)
magpie's host builds a provider's models from the plugin's config first
(internal/plugin/host.js: the config's flat fields are spread into
capabilities), then lets the provider.models hook replace the list. The
hook handed back each model without capabilities, and magpie reads
capabilities.reasoning alone for a model a plugin lists, so every model
the site's fallback table doesn't have was listed as one that doesn't
reason. On Trae CN that was every model but the table's six; on Trae
Global every model but its five. A routing group with one of them in it
lost reasoning for the whole group (magpie's groups take a member that
thinks), and the agent turned thinking off for it.

modelOf now gives each model it builds capabilities: the fallback table's
own where it has an entry, else MODEL's flat fields (reasoning,
temperature, tool_call, the input modalities) with an empty variants, as
Trae's request takes no effort or thinking level. The Max twin takes them
through the same path.

packages/trae/models.test.mjs (5 tests) fails without the change:
capabilities.reasoning is undefined for deepseek-v4-flash-0731-max, for
the whole list, and for the Max twin; the fallback table's own entry and
Trae Global's models pass either way. bun test packages/trae: 79 pass.
bun scripts/check.mjs: every package ok. The whole suite has the same 40
failures before and after (Windows-only, other packages).
2026-10-06 02:25:35 +08:00
yetone c78a7a32d4 trae 0.2.3: Trae CN renews the JWT bound to the account's device, so the daily check-in claim isn't answered 9074 (yetone/magpie#808, #821)
mintonight found the cause on #808: a JWT renewed at /cloudide/api/v3/trae/oauth/ExchangeToken carries no device, and Trae CN answers its check-in claim 9074 every time, while the client's own token is let through. Trae CN now renews as its clients do: POST /trae/api/v3/oauth/ExchangeToken with DeviceInfo (the device id, machine id and a per-account ECDSA P-256 public key, PEM) and DeviceProof (the key's ECDSA-SHA256 signature, base64, of POST, the path, ClientID, RefreshToken, Timestamp and Nonce, one to a line), as TRAE SOLO CN (en1oxy7wnw8j9n, SOLO_PC) first, then Trae CN's IDE (ono9krqynydwx5, IDE_PC). That renewal keeps the refresh token. The key pair is made at sign-in, or at the first renewal of an account signed in before, and kept with the sign-in through auth.refresh's fields; a sign-in's token is bound at once. When Trae turns the bound renewal away, the plugin renews at /cloudide/ as before. Since the refresh token can stay the same, a renewal made here is told from the sign-in by its token rather than by the refresh token. Trae Global is unchanged. device.test.mjs is new: 5 of its 6 tests fail on 0.2.2 (the Trae Global one passes on both). No Trae account to test with; mintonight is asked to verify on #808.
2026-10-06 01:08:15 +08:00
TryWorldandTryWorld2026 ebc4a207d3 word-guard 0.1.1: a Gemini reply is masked too, streamed or whole (#27)
onEvent masked an Anthropic delta, a Responses delta and a Chat chunk, but had
no branch for Gemini's own shape (candidates[].content.parts[].text) — while
onResponse right below it did. So with replies: true, a word the user asked to
keep out of replies was masked in every API but a streamed Gemini one, where it
went to the client untouched.

A case covers it in both directions: a streamed Gemini reply in its own place
(and a part that isn't text left alone), and a whole one. It fails on 0.1.0 —
"acme Inc" reaches the client — and passes here.

The reply is what the option promises, so a filter that silently skips one of
the four APIs magpie serves is a hole rather than a missing feature.

Co-authored-by: TryWorld2026 <tryworld@users.noreply.github.com>
2026-10-06 00:23:15 +08:00
TryWorldandTryWorld2026 8c87a843b5 model-map 0.1.1: a Gemini request's model is mapped, and its reply names it back (#26)
onRequest returned early for ctx.protocol === "gemini", on the grounds that a
Gemini request names its model in the URL and not in the body. magpie puts it
in the body before the middleware runs (gateway.go, serveAgent is called with
withFields(body, {"model": model, "stream": stream})), and reads it from there
to route, so the mapping applied to every API but Gemini: a Gemini client
asking for a mapped name got "magpie knows no model" as a 404.

onEvent and onResponse also never looked at modelVersion, where a Gemini reply
names its model (internal/gateway/member.go lists exactly that path), so the
name a Gemini client read back was the upstream's even when the mapping did
apply.

cases.json's "Gemini's body has no model to map" asserted the old assumption
with a body carrying no model — a body the gateway never sends. It is replaced
by one that carries the model the gateway fills, covering the request, the
stream and a whole reply; a second case keeps the no-model body passing as it
is. The new case fails on 0.1.0 and passes here.

Co-authored-by: TryWorld2026 <tryworld@users.noreply.github.com>
2026-10-05 23:45:07 +08:00
yetone 719ba0c621 grok 0.1.8: a grok login that prints no link says why, and the endpoint a failed one names isn't taken for the page to open (𝕏 on Discord) — the sign-in said only "grok login gave no link to open", dropping what the CLI said; it now ends with the CLI's last line, or asks whether auth.x.ai is reachable when it said nothing. grok 1.0.46, unable to reach x.ai, prints "Error: error sending request for url (https://auth.x.ai/oauth2/device/code): …", whose URL was handed on as the link; a line saying error gives none. A spawn that fails settles the link at once instead of after 30s. login.test.mjs is new (fails on 0.1.7); bun test and check.mjs pass. Checked with grok 1.0.46 itself through magpie's plugin host, given a proxy that refuses: the error now names it. 2026-10-05 22:10:57 +08:00
yetone 82330dfa3f trae 0.2.2: a tool call Trae sends again whole, its punctuation not the partial one's, replaces the partial arguments instead of being appended to them (#24, Zhangwier)
Trae's llm_utils_chat streams a call's arguments as snapshots, and may send
the whole call again written apart from the partial one (U+2212 for -,
U+2032 for '), which neither extends it nor follows a whole one, so
NativeCalls joined the two and the call's arguments came out twice. A
whole JSON object under the same first key as the partial arguments, which
the two joined don't make whole, now replaces them. A piece that is a
JSON value of its own (12, "ls", {}) still joins the call: it doesn't
open with the call's first key. The new test of the resent snapshot fails
without the change; the one of pieces that are values of their own
passes either way. bun test (trae: 68) and bun scripts/check.mjs pass.
2026-10-05 22:01:28 +08:00
yetone 3acb0fc377 trae 0.2.1: the daily check-in is sent as Trae CN's IDE sends it, with a client's User-Agent, not Bun's (yetone/magpie#808, whqtian on Discord)
Trae CN's check-in answered magpie with 9074 「当前参与用户太多,请稍后再试」
every time: whqtian's three accounts never got in (the fourth only when
checked in by hand in Trae), Moody-Sin's never did. magpie retried every
30 minutes and got 9074 again. The plugin sent the check-in with Bun's own
User-Agent (Bun/1.x), the chat's headers (x-uid, x-ide-token, versions…)
and {}. Trae CN's IDE 3.3.104 (main.js, read from the official linux
build) sends /trae/api/v2/ug/checkin_credits/status and /claim with only
its Cloud-IDE-JWT and its device (fb: x-device-id, x-device-brand,
x-device-type, x-os-version, x-app-version) through its own client, body
{req_source: 1}; qilimixingkong/trae-checkin found that a check-in without
a real client's User-Agent is taken for a script and answered 9074. A
growth page (/trae/api/v2/ug/…) now goes with those headers, a TRAE SOLO
CN Electron User-Agent and {req_source: 1} for an empty body; Trae's
other pages still go with the chat's headers. 0.1.7 tried the IDE's
headers and body without a User-Agent and was put back in 0.1.9; the
User-Agent is what neither had. No device id is changed to get round a
9074 or a 9095. No Trae CN account was at hand, so it isn't tried
against a real one: api.trae.cn answers the new request without a token
with its usual 1001. checkin.test.mjs checks the body, the IDE's headers,
the User-Agent and none of the chat's (fails on 0.2.0), a body given as
is, and Trae's other pages unchanged; bun test (66) and
bun scripts/check.mjs trae pass.
2026-10-05 21:15:36 +08:00
yetone 8df77e69aa grok 0.1.7: a 429 shows a spent Rate limit window on the card until it lifts (H20 on Discord)
Grok's billing (/v1/billing?format=credits) says nothing of a plan's rate
limit: a free account read 0% used, 100 left, while its requests came back
429. The plugin now keeps an account's last 429 (by its CLI home) and
usage shows a "Rate limit" window at 100%, aside, before the period's,
until the reset the 429 named (Retry-After in seconds or as a date, or a
*ratelimit*reset* header), or, with none named, until a request goes
through or 5 minutes have passed. magpie's gateway already rests the
account; this is what the card says.
2026-10-05 20:51:52 +08:00
yetone d9236e976f middleware: param-override, model-map, system-prompt, word-guard and think-tags — gateway middleware that magpie runs on every agent's requests and replies, mostly New API's channel settings with the same JSON (the owner) — magpie can now run a plugin as gateway middleware (onRequest, onEvent, onResponse, in-process on moejs), and these are the first ones: param-override is New API's param_override (both forms, operations with gjson paths and conditions, return_error); model-map is model_mapping (chains, /regex/ keys with $1) and puts the asked-for name back into replies; system-prompt adds a prompt in each API's own place, keeping an agent's own unless override (New API's semantics), by agent or model; word-guard is the sensitive-word filter (reject or mask the user's text, optionally replies); think-tags strips a leading <think>…</think> from replies across stream chunks, or puts Chat reasoning_content into the text (thinking_to_content). Each is one file with no imports, named @magpie-community/middleware-<name>, with magpie.options as the example the app's editor starts from; registry.json lists them with "kind": "middleware" and no providers; check.mjs skips middleware-only packages. scripts/middleware.mjs calls the hooks as the gateway does (events split, [DONE] passed by) and runs each package's cases.json. Tested with a real DeepSeek account and real Claude Code through magpie's gateway: a mapped model named back in message_start, max_tokens capped, a system prompt appended for claude only, a word turned away as a 400 in Anthropic's shape, return_error as a 403 in Chat's, <think> stripped from Chat and Responses streams and an Anthropic whole reply, reasoning_content moved into the text. bun test (61 for these five) and bun scripts/check.mjs pass; packages/devin's two image tests fail on this machine only, as on main. Their first npm version has to be published by hand (trusted publishing can't create a package); until then magpie shows them as Coming soon. 2026-10-05 20:49:42 +08:00
yetone 5d2621db88 factory 0.1.17: DeepSeek V4.1 Flash, Kimi K3 and GLM-5.2 offer none, so a request turning reasoning off stops their thinking (yetone/magpie#899, tedestar) — they offered only low/high/max (GLM-5.2 high/max), so magpie asked for low and they thought anyway. droid 0.231.0 lists off for them and sends reasoning_effort "none"; Fireworks (via OpenRouter, pinned) answered none with 0 reasoning tokens on DeepSeek V4.1 Flash (2 completion tokens, 19 at default) and Kimi K3 (8, 71 at default), and turns none away on GLM-5.3 and GLM-5.3-Flash ("Reasoning is mandatory"), whose least stays low. effort.test.mjs is new (the levels fail on 0.1.16); bun test and check.mjs pass. 2026-10-05 19:54:33 +08:00
yetone 6b13dc05e4 zcode 0.1.10: a gift-only account's spent bucket doesn't hold up a model another of its plans still has (ganlerk on Discord) — an account with both ZCode Trust Build (GLM-5.3-Flash 14.5% used) and the Start Plan (GLM-5.3-Flash all used) showed the Start Plan's spent bucket as counting GLM-5.3-Flash, so magpie read the model, and the account, as 100% used and sent Flash requests elsewhere. The server picks the bucket (ZCode sends no plan with a request), so a gift-only account's usage now counts each model on its live bucket, the least used, and sets spent siblings aside, as an account with a coding plan already did. bun scripts/check.mjs zcode and the zcode tests pass; the new gift test fails on 0.1.9. 2026-10-05 19:50:37 +08:00
如是andyetone 42783f0033 trae: one package, two realms — Trae Global folds into packages/trae (#23)
* trae: one package, two realms — Trae Global folds into packages/trae

The review asked for this and it is the right shape: the two deployments
share one implementation. 86 of the 89 top-level names were already the
same code; what differed was a table's worth of values (hosts, client,
versions, usage page, fallback models, error codes) and two realm-only
branches. A separate copy meant every request, stream and tool-call fix
had to be made twice, and it had already drifted (the 0.1.15 Max fix
came back as a bug there).

packages/trae now holds a SITES table with two entries — trae-cn and
trae-global — and makePlugin(site) builds a provider from one. Exported
as TraeCNAuthPlugin and TraeGlobalAuthPlugin. The CN values are moved
verbatim, not re-derived: same hosts, client id, app id, IDE/client
versions, plugin version, brand, functions, fallback models, credits
page, and its own check-in pages. The international entry carries what
only it has: the second (US) deployment and the region that selects it,
the dollar billing's entitlements page, its own model names, and its
extra lapse/quota codes (20101, 4011).

The CN plugin needs the stream fix too (the review's point), so the
AbortController the loader now builds per request, openai()'s abort, and
sse()'s finally are in this one implementation for both realms — as is
the wrong-function retry releasing the read it leaves behind.

fake.mjs takes a realm id, defaulting to CN so every test written before
the fold is unchanged. The global tests move to global.test.mjs, plus
new ones for what only the international realm does: the US/SG routing
of a request and of a saved sign-in, its own error codes and error name,
the dollar usage page, and its fallback model list. chatModel gains the
picker's invisible-entry filter (paygo/auto twins, search agents) and
the config hook names the realm's own provider.

The acceptance test: packages/trae/*.test.mjs' 48 CN tests are untouched
and green — that is the proof the refactor changed no CN behaviour, with
its constants verified line by line against HEAD. bun test: 63 pass
(48 CN + 15 global); bun scripts/check.mjs trae: ok.

registry.json: one entry, providers [trae-cn, trae-global]. README: both
realms, each realm's endpoints, usage page and codes; the verification
range stated honestly (CN never run live; Global on one Free SG account,
no Pro and no US account).

* trae: Trae CN's model lists stay whole; only Global hides is_invisible_to_user

The fold filtered is_invisible_to_user for both realms, which took 40 of
Trae CN's 76 models out of its list. CN is served as before; Global (a
site flag, hidesInvisible) keeps the filter. Also: the unsupported-request
error names the realm, and two duplicated/merged comments are tidied.

---------

Co-authored-by: yetone <yetoneful@gmail.com>
2026-10-05 17:18:12 +08:00
yetone 838f6470dc cline 0.1.4: usage shows ClinePass's 5-hour, weekly and monthly limits (zRain on Discord) — ClinePass counts usage against a rolling 5 hours, the calendar week and the calendar month, but the plugin's usage showed only the credit balance. It now also reads /api/v1/users/me/plan/usage-limits, what app.cline.bot's subscription page reads ({limits: [{type: five_hour|weekly|monthly, percentUsed, resetsAt}]}), with the same bearer, as 5 hours / Weekly / Month windows with their spans and resets. An account the limits can't be read for (no ClinePass) keeps its balance and its sign-in. bun test and check.mjs pass. 2026-10-05 16:17:38 +08:00
yetone 99cac44cf8 registry: hold Trae Global back until its first version is on npm — @magpie-community/opencode-trae-global-auth is new, trusted publishing can't create it (publish run 37282007405), so magpie's Plugins page listed a plugin whose install failed. Listed again once its first version is published by hand. 2026-10-05 16:12:20 +08:00
如是 228628689f Add Trae Global (trae.ai) plugin - trae-global provider (#22)
* Add Trae Global (trae.ai) plugin — trae-global provider

Trae international (trae.ai, ByteDance's AI IDE international build) as a
provider plugin: sign in with Trae's own browser flow, free tier included,
models served through the international llm_utils_chat gateway.

Same plugin contract and request/response machinery as the Trae CN
plugin (packages/trae), a separate deployment: different domains, OAuth
client, model catalog, plus a US region (coreva) routed by the account's
AIRegion. The usage card reads the dollar billing's entitlements
(basic+bonus allowance) from the pay host, with the Free plan's /month
allowance riding it.

bun test: 41 pass; bun scripts/check.mjs trae-global: ok

* trae-global: a stream the agent walks away from closes Trae's connection

The bug: an answer whose tool call the agent acts on is cancelled mid-read,
and the read to Trae was left hanging. A generator's return cannot break a
read that is already waiting on reader.read(), so the SSE reader kept its
half of the connection open, and the host the next ask reused was one Trae
had dropped — a stream that runs, then dies, exactly around tool calls.

The fix: the answer's fetch is what gets stopped. The loader builds one
AbortController per request, follows the caller's abort signal into it, and
openai() aborts it when the stream is cancelled. sse() also lets its reader
go in a finally, for the paths that end the generator rather than the fetch.

stream.test.mjs: the agent reads, then cancels with nothing more coming, so
only aborting Trae's fetch can release the read — red before, green after.
bun test (42 pass); bun scripts/check.mjs trae-global: ok

* trae-global: the review's three blockers — planLocked, the 0.1.15 Max, usage's error code

planLocked is gone. It read display_contact_config's identity_list and
assumed every account is Free (identity 0), so a paying account lost
exactly the models it pays for — gpt-5.5, the gpt-5.6 family, gpt-6,
glm-5.2 — and could never pick them. The plugin is never told the
account's own identity (not at sign-in, not in the entitlement answer),
so nothing is filtered on identity now: the list is the account's own,
the IDE greys out what the plan locks, and a locked model answers Trae's
own 1005 when asked. The picker's invisible entries (paygo/auto twins,
search agents) stay out, as before.

maxModel takes the 0.1.15 fix: a model's Max is found across every list
that names it, not just the one entry the model is listed through —
chat_v3 can name the __max model while the SOLO list names only __dev,
and the window can be another entry's again. Without it the same
"no -max model" bug the CN plugin fixed in 0.1.15 comes back here.
maxes holds each model's Max for the models hook, as CN's does.

usage: a 200 carrying an error code (e.code !== "0") now says Trae's own
message instead of "no entitlement pack in the answer", as CN's does.

README: the verification range is stated honestly — one Free account,
SG realm, no Pro and no US account tried; paid-account behaviour is
implemented from the interface's shape, not confirmed on a live one.
registry.json marks Trae Global experimental, as Trae CN is.

usage.test.mjs: the locked-model test now asserts the paying account's
list, and a new one asks a paid account's gpt-5.5 through the gateway.
stream.test.mjs: a Max split across lists is listed and asked where its
__max model is named. Each red before its fix, green after.
bun test (46 pass); bun scripts/check.mjs trae-global: ok
2026-10-05 16:10:35 +08:00
erlinerd dbd14ccb98 zcode 0.1.9: the gift's models are trial entries the user picks, not an automatic gift-first route (#21)
Why: 0.1.8 sent every request for a gift-served model to the gift first, so a user who meant to spend the coding plan had no say, and the card hid the gift's models behind notModels. The gift is an allowance outside the plan; spending it should be a choice.

What: every model a live gift bucket serves is listed again as <model>-Trial, in the catalog's spelling (GLM-5.3-Flash-Trial), and a request for that entry goes to the gift dressed as ZCode's own; a plain model always spends the coding plan. A trial entry whose bucket is spent or blocked answers 429 without touching the coding plan, as do the gift's quota errors (1113, 1005 inside a 200); any other gift answer goes on as it came. The usage card names the gift window by its trial model, drops the plan prefix, and puts MCP - Month last.

Tests: dual.test.mjs rewritten for the new routing (a plain model to the coding plan whatever the gift holds, a trial entry to the gift), usage.test.mjs and gift.test.mjs follow the naming; bun test (65 pass in the package, 516 in the repo) and bun scripts/check.mjs zcode pass.
2026-10-05 14:24:17 +08:00
yetone a26f884820 devin 0.1.8: which models take images is what Devin tells its CLI's model picker (面条 on magpie's Discord: swe-2 takes images) — devin models list says nothing of images and models.dev doesn't know Devin's own ids, so swe-2, swe-1.7 and the like were listed as text-only and agents dropped their images. Once signed in, with the CLI or without it, the plugin asks GetCliModelConfigs (the read-only call the CLI's picker makes, as magpie's built-in does in devin_images.go) and puts each model's supports_images on it: a variant its own, a family and its fast run what all its variants say. It is cached as the list is (5 minutes, 1 after a failure). The config hook's list says what Devin said on 2026-10-05 (GLM-5.2/5.3, Inkling, Nemotron, DeepSeek V4 Flash and V4 Pro take none, every other one does); a model Devin says nothing of keeps models.dev's word. With the owner's real Devin account: swe-2-high/medium/max, swe-1-7, swe-1-7-medium and swe-1-7-lightning(-medium) described an inline PNG's colours through the plugin's fetch, and provider.models listed swe-2 with image input, with the CLI and without it. images.test.mjs (5 tests) fails on 0.1.7; bun test (31 pass) and bun scripts/check.mjs devin pass. 2026-10-05 13:18:46 +08:00
yetone 436a861e2d trae 0.1.15: a model's Max is found across the lists that name it (ARNO on magpie's Discord: no deepseek-v4.1-flash-max) — 0.1.14 looked for it only in the entry the model is asked through, which needs both a __max model and a bigger context_window_tokens.max. Trae CN lists deepseek-v4.1-flash in several functions (yetone/magpie#681) whose entries needn't agree: chat_v3 names the __max model, while the SOLO entry it is asked through names only __dev (and that is where the windows are), so no Max was listed. The __max model is now the first any of its entries names (the one asked through first), the windows the first any gives, and the Max is asked through the function that names the __max model. A __max model with no bigger window anywhere is still no Max. 1 new test fails on 0.1.14; bun test (48 pass) and bun scripts/check.mjs trae pass. Not tried with a real Trae CN account (none here). 2026-10-05 13:10:38 +08:00
yetone 98ce4a8dc0 cline 0.1.3: a pinUpstream option sends DeepSeek's models through DeepSeek's own API only, as magpie's built-in ClinePass tick does (ARNO on magpie's Discord) — with it on (the plugin's own options, or OpenCode's provider.cline.options.pinUpstream), a chat request for a DeepSeek model (cline-pass/deepseek-…, not cline-free/) carries "providerOptions":{"gateway":{"only":["deepseek"]}}, written in before the body's last } so the cached prefix is the client's byte for byte. Other models, and a request with providerOptions of its own, go as sent; off by default. README says how to turn it on in magpie and OpenCode. 5 new tests fail on 0.1.2; bun test (63 pass) and bun scripts/check.mjs cline pass. 2026-10-05 12:42:21 +08:00
yetone 4c4e91689e trae 0.1.14: GLM's own <arg_key>/<arg_value> calls are calls, answer text under unnamed events isn't lost, reasoning written into the text isn't the answer, a failed reply doesn't say stop, and a model's Max context is a model of its own (歧路亡羊 on magpie's Discord) — GLM wrote <tool_call>read<arg_key>path</arg_key><arg_value>a</arg_value></tool_call>, its own template, which wasn't read: the call went to the agent as text. It is now a call (a string argument as written, other types read as JSON, split over events or not), as is a native call whose name holds the whole call (as JSON or in that template). A call to a requested tool named but for case or punctuation (Read) goes on as the request's (read); any other name goes on as written, so the agent can tell the model it doesn't exist. Text under an event named delta, message, content… or none was skipped; it is the answer's now. A {"reasoning_content":"…"} object in the text is reasoning, and reasoning Trae sends again is sent once. done's finish_reason length/max_tokens is length; a reply that fails (an error event, or Trae's stream breaking off) ends with the error and [DONE], not a stop and its usage, and the stream is closed whatever happens (an agent going away stops the read). A config with a __max model and a bigger context_window_tokens.max (deepseek-v4.1-flash: 1M, 64K–128K out) is listed again as <id>-max, "… (Max)", with that window and output; it asks the config's __max model with max_tokens set and user_message_context.model_info.prompt_max_tokens = window − max_tokens. Reasoning effort: Trae's request takes no level, so no variants are listed (as before) and the README says a picked level does nothing. 9 new tests fail on 0.1.13; bun test (46 pass) and bun scripts/check.mjs trae pass. Not tried with a real Trae CN account (none here). 2026-10-05 11:41:17 +08:00
yetone 9d429b8663 trae 0.1.13: a <tool_call> with only DeepSeek's closing tags after it says nothing, and one wrapping DeepSeek's own invoke is the call (magpie#823 again, Dazzle-sys: Trae CN's DeepSeek V4.1 Flash in Pi showed <tool_call> </|DSML|parameter> </|DSML|invoke> </ as its reply) — the reply (17 tokens out) was our opener with no JSON in it, then DeepSeek's closes, cut short. A <tool_call> was read only for a JSON object, so with none it was held to the end and handed on as text, which the agent showed and the model read back. A <tool_call> whose content starts with a tag (or is empty at the end) now has its opener dropped and what follows read as it is: an invoke in it is a call, stray tags are dropped, and a tag cut short at the end (</) after them too. A block holding plain text stays as it was. The new test fails on 0.1.12; bun test (36 pass) and bun scripts/check.mjs trae under a temp HOME pass. Not tried with a real Trae CN account (none here). 2026-10-05 05:05:53 +08:00
yetone c172d93901 trae 0.1.12: a reply limit Trae doesn't give is none, not a made-up 32K, and a request asking more than Trae's is held to it (ARNO on magpie's Discord: Trae CN's deepseek-v4.1-flash said maxTokens 32000) — a model whose list names no __dev max_tokens (deepseek-v4.1-flash in chat_v3, kimi-k2.6, the fallback list's) was given MODEL's 32_000, which agents were told as its reply limit. It is now 0, which magpie reads as unknown and fills from models.dev (DeepSeek V4.1 Flash's 384K); one Trae gives (glm-5.2__dev's 32000, deepseek-v4.1-flash__dev's 64000 in solo_agent) is kept, and a request asking more than it is sent with Trae's. The new test fails on 0.1.11; bun test (35 pass) and bun scripts/check.mjs trae under a temp HOME pass. Not tried with a real Trae CN account (none here). 2026-10-05 04:29:12 +08:00
yetone 20cd6f1bb2 trae 0.1.11: a tool call DeepSeek closes with its own tags, or writes as its own invoke, is a call, and its tags don't reach the agent (magpie#823, Dazzle-sys: Trae CN's DeepSeek V4.1 Flash in a group, in Pi, ended the session) — DeepSeek V4.1 Flash wrote <tool_call>{"name":"bash",…}</|DSML|parameter></|DSML|invoke, closing our block with its own tags rather than </tool_call>, or its own <|DSML|invoke name="…"> with <|DSML|parameter>s: neither was read, so the call went to the agent as text. A <tool_call> block is now taken once its JSON object is whole, whatever closes it; DSML invokes (full-width or plain bars, in function_calls or not, several in a row) are calls, a string="true" parameter its text and any other its JSON; the tags and blanks left around a call are dropped, a stray tag too. The new test fails on 0.1.10; bun test (34 pass) and bun scripts/check.mjs trae under a temp HOME pass. Not tried with a real Trae CN account (none here). 2026-10-05 03:23:58 +08:00
yetone 32aaeda5a6 trae 0.1.10: a tool call written as a tagged block with a file's content raw, or with its arguments beside the name, goes on whole, and an argument piece that names no call joins the one being written (magpie#799, mintonight: pi's write went out as {} and was refused, the turn ended mid-sentence; earlier <tool_call> blocks showed up as text) — a model writing a file through <tool_call>{"name":"write","arguments":{"content":"…"}}</tool_call> puts real newlines and tabs in the JSON string, which JSON.parse refuses: the block went to the agent as text, and a call parsed with nothing under arguments went as {}. Blocks are now read leniently (raw control characters inside strings taken as escaped), a block that gives its arguments beside the name has them taken, and a string of arguments is normalised. Native calls: a piece with neither id nor name (or an index its call's first event didn't give) joins the call still being written instead of being dropped, and arguments still not JSON at the end are read the same lenient way. Three tests fail on 0.1.9; bun test (33 pass) and bun scripts/check.mjs trae under a temp HOME pass. Not tried with a real Trae CN account (none here). 2026-10-05 02:11:07 +08:00
yetone 64c9e6c34c trae 0.1.9: the daily check-in goes as it did on 0.1.6, with the chat's headers and {} (yetone/magpie#808, Hu9956 on magpie 0.1.880: TraeCN自动签到失效,中午还行来着,更新后就不行了) — 0.1.7 (published 13:12 Beijing on 10-04) sent api.trae.cn's /trae/api/v2/ug/ pages with only the JWT and the device's headers (ugHeaders: no x-uid, x-app-id, x-ide-token, x-machine-id, yet x-app-version still SOLO's 0.1.69) and {req_source:1} (ugBody); Hu9956's check-in, which went through at noon on 0.1.6, has failed since. Both are taken out: the check-in is sent as every other Trae page is (ideHeaders, the body magpie gives), and the test that checks it goes as the account with {} and x-uid is back (it fails on 0.1.8). bun test (30 pass) and bun scripts/check.mjs trae under a temp HOME pass. Not tried with a real Trae CN account (none here); the reporter's account is the check. 2026-10-05 00:34:11 +08:00
yetone b14b4d80c5 trae 0.1.8: a tool call Trae streams over several events goes on whole, not as its first event (magpie#799, mintonight: Trae CN models fail many tool calls — bash got echo "T, read got C:/Users/j, edit got {}) — Trae sends a native tool call in several output events under one id or index, each carrying the arguments so far or only the new piece; the plugin sent the first event of each id on and dropped the rest as repeats, so a call whose arguments came in more than one piece reached the agent cut short. NativeCalls now puts each call together across events (arguments that start with what came before replace it, a piece is appended, a repeat is ignored, a piece without a name joins its call by index) and sends the calls once the answer is whole. A test streaming one call cumulatively and one in pieces fails on 0.1.7; bun test (32 pass) and bun scripts/check.mjs trae pass. 2026-10-05 00:02:33 +08:00