bf2dbd28f06cb5e8944d13d0aed61cb8a21b282b
795
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bf2dbd28f0 |
zen-free: ZCode 3.17.2 workflow tool pairs go under other names (#694)
Reviewed every line at 4619beb34bdfc3a2d16ee067a12e10f064501e6c. Adds two REFUSED_TOGETHER pairs (CreateWorkflow+GetWorkflowRun, AmendWorkflow+FillWorkflowHole) for ZCode 3.17.2. The rename and the way back reuse the existing renameRefused / nameGuard paths unchanged, so tools, past calls and tool_choice are renamed and replies (streamed or not) come back under ZCode's names in chat, responses and messages. Run on mote at that head (node --test packages/zen-free/*.test.mjs, node 22): 212 of 216 pass. The 4 reds (3 "sends OpenCode's own headers" tests and keyless.test.mjs) fail the same on origin/main in a worktree (208 of 212; node 22 adds accept-language/sec-fetch-mode headers), so they are not from this PR. Broke it by hand: provider.mjs from origin/main with the PR's tests -> the 3 new per-protocol round-trip tests fail (index.test 55-57); the lone-name test passes both ways, as it should. Not tried: a real ZCode request against Zen (the reporter's bisection is taken from the PR). Version bump follows on main (0.1.25). |
||
|
|
3ec42d48d1 | README: the search hook, a template for a web search API from a plugin | ||
|
|
f1421352d2 |
chat: the epub reader test retries a slow browser start instead of one 15s race (#684)
Cause: the test raced one cold browser launch against a fixed 15s timer. A passing CI run takes 1.3-1.5s (runs 41710048801, 41709930999, 41689486507); run 41718344236 took 16.6s, so a cold runner start, not the reader, failed the test and blocked every package's publish. Now each try gets its own profile and 10s (7x a normal run); a try that posts nothing is killed and replaced, up to 3 tries, with the test timeout at 60s. A browser that exits by itself still fails at once. The test only; no package file changes, so no version bump (chat's "files" omit tests). Run on mote (bun 1.4.2, Playwright's Chromium 1234): - Injected a wrapper browser that sleeps 25s on its first launch: the old test fails "browser timed out" at 15.06s, the new one passes in 11.7s. - Normal launch: new test passes in 2.0s. - Whole suite: 5349 pass, 19 skip, 0 fail (the browser test skips without a browser in PATH; it was run separately as above). bun scripts/check.mjs ok. Not tried: GitHub's runner itself; CI's run is the check. |
||
|
|
3b249dedac |
registry: providers-hub lists Loomy (WeChat QR sign-in) at 0.10.0 (#687)
Reviewed head 8408dab, a fast-forward of origin/main. - npm: latest is 0.10.0; 0.9.3 and 0.10.0 are not deprecated. - 0.10.0 vs 0.9.2: Loomy files, README, package.json, plus src/icons.mjs (13 data:image/png URIs, no code) and a one-line icon spread in aggregate.mjs, both from 0.9.3. loomy.mjs and loomy.test.mjs are byte-identical to the reviewed 0.8.0. index.mjs is unchanged. No install scripts; page/snapshot.js is the empty template. - On mote, with no network: importing 0.10.0's index.mjs lists 8 function exports (HubAStudio, HubAccio, HubLobsterAI, HubMagicrew, HubMagicrewIntl, HubAutoclaw, HubAutoclawCn, HubLoomy), matching the registry entry's 8 providers. - On mote through a logging proxy (loopback not proxied), npm test on 0.10.0: 176 tests, 175 pass, 0 fail, 1 skipped; the proxy log is empty and there were no dns or tls connections out. - Hosts in loomy.mjs are the ones the previous review listed; nothing new. No fs or child_process. - PR body and registry summaries (en, zh): the paste-session claim is gone; hosts, login method, files (none) and ACCESS_KEY_SECRET source are stated. - PR head merged on origin/main: bun scripts/check.mjs on mote exits 0. - Not tried: a real WeChat QR sign-in or real iFlytek requests. |
||
|
|
f9f4bd2663 |
registry: providers-hub adds AutoClaw (international and China) (#652)
Lists magpie-providers-hub's AutoClaw (international and China) channels in the registry.
Reviewed at a34421247e27c812f0bbae0da1de78b15afbd2ca, merged onto origin/main
|
||
|
|
1820255222 |
codearts 0.3.4: kimi-k3.1-pro takes medium (#683)
Adds medium to kimi-k3.1-pro's reasoning levels, which #680 left out; version 0.3.3 -> 0.3.4. Reviewed at 52ca4946b7d61f5c10c0394d0813a0fe4f58ceca: a one-line table change plus the version bump. Run at that head on mote: bun test packages/codearts, 169 pass, 0 fail. Not tried: a live CodeArts request at medium; the 405-character reasoning figure is the author's measurement. |
||
|
|
fae4bc2e13 |
codearts: tell the host the reasoning levels, and honour the caller's (#680)
Tells the host a CodeArts model's reasoning levels (model row `variants`, per model, measured 2026-11-04 by Gyl1219) and honours the level a caller names: passed on as is with no injected `thinking: enabled`, a level the model does not take is dropped, none/off/disabled send `thinking: {type: "disabled"}`. Version 0.3.2 -> 0.3.3, README updated.
Run at the reviewed head 95acc1e3 on mote (Mac mini): `bun scripts/check.mjs codearts` exit 0; `bun test packages/codearts` 169 pass / 0 fail. Broken by hand, each one turned a test red: the drop-unknown-level branch made unconditional, the `spoken === ""` condition removed from `injected`, the `thinking: disabled` assignment removed, `variants` left off the model row, a caller's own variants overwritten. Tests use the injected fetch, none reach the network.
Not tried: a real CodeArts account (I took the author's 2026-11-04 measurements on trust). Open question left on the PR: kimi-k3.1-pro is declared without `medium` though the author's table shows it answered.
|
||
|
|
016a869062 |
orcaterm 0.1.5: a refused renewal doesn't sign out a token that still has life (#675)
orinsid's idle run (0.1.4, magpie v0.1.2861): the token was issued with a
2h life, the host's first background renewal at +30min got SESSION_EXPIRED
from OAuthRefreshToken, and auth.refresh threw signIn "expired" on any
message matching /expired/, so the account was marked signed out with 90
minutes of token left. That token drives the chat by itself until its own
exp, and magpie's contract is that a failed renewal not marked "expired"
is kept and tried again.
Now a renewal refused as expired fails without `signIn` while the token's
exp (JWT claim or the stored expires) is more than a minute away; once the
token has expired too, it still marks the account.
Not changed, and not known: why upstream answers SESSION_EXPIRED 30
minutes into a 2h token. The renewal sends only {accessToken} with no
cookie, while OrcaTerm's product calls send ot_session (and the server
sets an ot_sid session cookie); an idle server-side session timeout is
the likely cause. Neither can be checked without a real account, so this
only stops the false sign-out; the session may still lapse while idle.
Run: bun test in packages/orcaterm (115 pass); the new "still has life"
test is red on 0.1.4's index.mjs and green here. Not tried: a real
OrcaTerm account, a real idle run.
Reported-by: orinsid
|
||
|
|
d951674164 |
agentcompass 0.1.0: intent, capability and quota routing as a gateway middleware (#670)
New package @magpie-community/gateway-agentcompass 0.1.0 (akiiwa-games, #670): a gateway middleware that profiles a request and routes `agentcompass` / `agentcompass/*` to a model and effort within the user's own candidateModels. Only `model` and the effort field change; nothing is added to the prompt; no network unless the user sets allowExternalScorer: true plus a URL.
Reviewed at head 3bdea54 (rebased on
|
||
|
|
36a017ac9e |
zcode 0.1.49: a free-first refusal no longer answers the -Trial entry a local "quota exhausted" 429; free first gets a switch in magpie's provider editor
Can4ry_ on X (11-04): testing GLM-5.3-Flash-Trial in magpie answered "429 · ZCode's limited quota for glm-5.3-flash is exhausted or temporarily unavailable" while ZCode's own app was served, glm-5.3-flash kept using the Coding Plan after the Start Plan opened at 23:00, and there was no freeFirst setting under the ZCode provider. Cause: free first's plain GLM-5.3-Flash request goes to the gift first. When zcode.z.ai turned it away with 405/3012 (risk control, or 0.1.46/0.1.47's 3.14.3 prompt texts), restModel rested glm-5.3-flash in `blocked`, the same map a -Trial entry's quota check reads. So for the next minute the Trial entry answered a local 429 that called the quota exhausted, without asking ZCode, and every plain request in that minute went to the plan. The suffix it added, "ZCode answered 429", was wrong too, and it pushed the spent words off the end of the message, so magpie's zcodeSpentWords didn't match and the gateway rested the whole account. Change: - A free-first refusal that is not a quota answer rests the model in a new `sidelined` map, read by free first only. A quota answer still rests it in `blocked`, which the -Trial entry obeys too. - The local 429 keeps "ZCode's limited quota for X is exhausted or temporarily unavailable" last; why it rests now goes in front. - auth.options declares a "Free quota first" switch (free_first, on by default, zh/zh-TW/ja/de words), read through input.magpie.options. Off keeps the plain models on the plan. A JSON freeFirst: false still turns it off; an absent key (an older magpie, OpenCode) leaves the JSON's word. - README says where the switch is and what a refusal rests now. Run: bun test packages/zcode on mote under a temp HOME, 197 pass, 0 fail. bun scripts/check.mjs on mote, exit 0. Broken by hand: the new dual tests against HEAD's index.mjs (the old code), 4 fail. "a free-first refusal leaves the -Trial entry asking ZCode" fails with 429 for 200, the reported case. The others are the spent words test (no match), the switch test, and the block-page test, whose second plain request went to the gift again. Not tried: a real account. The owner's account has no live Start Plan to be refused or spent. Not tried: magpie's editor showing the switch. That comes from host.js optionsOf and app.js pluginOptionsField, unchanged. |
||
|
|
97e9c23804 |
zcode 0.1.48: publish #682's 3.17.2 prompt texts (jinpy666) with 0.1.47's wire model spelling
|
||
|
|
75cd0de91c |
catpaw 0.1.4: live models carry the client's multiplier and free badge
Reported by star21321321124 (Discord, 0.1.3): LongCat-2.5 showed no
multiplier and no free mark, while the table's LongCat-2.0 is named
"(限时免费)", so users may think it costs credits.
The desktop client (2026.1016.0032, renderer index chunk) draws each
model-types row as: name = description || extendedInfo.shortName ||
modelTypeName; badges = extendedInfo.marketingCopy split on commas;
multiplier = extendedInfo.rateMultiplier + "x". The plugin now reads those:
a live model is named with its badges ("LongCat-2.5 (限时免费)"), carries
magpie's existing `rate` (multiplier) and `free` (marketingCopy says 免费,
or a rate of 0), and a table model gets the list's rate/free unless the
user's config already set one. Ids are unchanged; a missing or unparsable
multiplier shows nothing, not 0.
Run: bun test packages/catpaw on mote (37 pass), bun run check ok. Broke
rateMultiplier parsing by hand: 3 tests red. Not tried: a real CatPaw
account; the fixture's extendedInfo values (string "0"/"1.5", marketingCopy
"限时免费") follow the client code, not a captured reply.
|
||
|
|
7e3713233f |
zcode 0.1.47: the Start Plan's prompt texts are ZCode 3.17.2's
zcode.z.ai turns every dressed Start Plan (gift) request away again
with 405 "request has been blocked due to unusual activity", code 3012,
since the evening of 11-03: every account with a live gift, while the
ZCode app's own gift requests go through on the same machine and the
same accounts (five gift-holding accounts probed, all 405 through the
plugin, the four without a gift taking the plugin's own 400). The plan
path (api.z.ai, open.bigmodel.cn) is unaffected — only the dressed
requests to zcode.z.ai are refused, so it is the dressing, not the
accounts and not the address.
0.1.46 raised APP_VERSION to 3.17.2 (
|
||
|
|
6a75bbd43c |
zcode 0.1.47: a gift model goes out under ZCode's registry spelling, and a rested model says why
A -Trial request took the model name from the bucket's capabilities,
lowercased ("glm-5.3-flash"), and sent that. ZCode 3.17.2 sends its registry
id ("GLM-5.3-Flash"): normalizeOfficialGlmModelId's spelling, which its own
docs say is not rewritten on requests. The plugin now sends the registry
spelling for the models ZCode knows (wireModel), for trial entries and the
free-first plain model alike; unknown names go as the bucket wrote them.
A 429 from the gift also rests that model for a minute, and the local
refusal in that minute read the same as a spent bucket. It now says ZCode
answered 429 to the last request and the model is not asked again for a
minute.
Not changed: X-Device-Mid. 3.17.2's docs say it goes on config GETs, not on
the model transport, and start.test.mjs holds that.
Run at this head: bun test packages/zcode on mote, 193 pass. Undoing
wireModel turns 7 tests red. Not tried: a real account (none here); the
cause of the reports (429 and 405 on glm-5.3-flash-trial, 11-03) is not
proven, the model spelling is the one request difference found in the
3.17.2 source.
|
||
|
|
5d679712f0 |
catpaw 0.1.3: models the vendor adds appear without a release (LongCat 2.5)
star21321321124 (Discord, magpie v0.1.2862, catpaw 0.1.0/0.1.1): the vendor
added LongCat 2.5 and the plugin did not list it. The plugin's model list
was a hard-coded copy of an old proxy's table (9 models, each with its
modelType number). The desktop client keeps no such table: its main process
POSTs /api/agent/maas/model-types with {tenant: "CatDesk", scene:
"CATX_APP", env: "EXTERNAL"} on the gateway, caches the list 5 minutes, and
sends a model's modelTypeId as the round/turn body's modelType (read from
the 2026.1016.0032 client's dist-electron/main and catpawEnv chunks; items
carry modelTypeId, modelTypeName, provider, supportImage).
- index.mjs: provider.models reads that list with the account's own token
(desktop file or the stored web/paste token, as usage does) and adds what
the table lacks; a listed model whose type the table has keeps the
table's id and name, any other gets its modelTypeName lower-cased
(LongCat-2.5 -> longcat-2.5). Negative ids / USER_CUSTOM (the user's own
models) are left out. A chat on a table model costs no request; a chat on
any other id looks it up in the list and sends that modelType; an id in
neither is still a 400 naming what is known. A failed read leaves the
table. The headers are the plugin's gatewayHeaders, unchanged.
- fake.mjs: the list endpoint. 7 new tests: the request body, the extra
model offered, custom model left out, modelType sent on a chat, no
request for a table model, one read per 5 minutes, a failed read.
- README, version 0.1.3.
Run on mote at this tree: bun test packages/catpaw 35 pass 0 fail; bun
scripts/check.mjs exit 0; HOME=$(mktemp -d) bun test (root) 5303 pass, 19
skip, 0 fail.
Broken by hand, then restored: the lookup of an unlisted id returning null:
3 fail; provider.models ignoring the list: 2 fail.
Not tried: a real CatPaw account (none here), so the real response is
untested; the shape comes from the client's code. The id of LongCat 2.5
is whatever the vendor's modelTypeName is; if it differs from "LongCat-2.5"
the id will differ from longcat-2.5. Not the lists of the Windows client.
|
||
|
|
7ea611975a |
tabbit: Tabbit (web.tabbit.com) as a provider, with live catalog, check-in and cycle usage (#673)
Adds @magpie-community/opencode-tabbit-auth 0.1.0 (packages/tabbit) and its
registry.json entry. Tabbit (web.tabbit.com) becomes a provider:
- A live model catalog.
- Turns run as room -> run -> SSE join. Each turn has its own stream
timeout (TABBIT_STREAM_TIMEOUT_MS, default 300 s), and the 30 s request
timeout no longer covers join.
- A run is stopped through /proxy/v0/chat/stop/ when the client aborts or
the stream times out.
- A cut turn ends as an error event (streaming) or a 502, never as a
"stop" finish, and its room is not reused.
- Rooms are keyed by account and session, with a 30 min TTL and a cap of 256.
- 400/401/403/404/429 pass through with retry-after.
- The daily desktop_pet check-in is free.
- Cycle usage.
- macOS desktop sign-in reads the Tabbit Browser cookie store from a temp
copy that is removed in a finally. Windows and Linux paste the token.
Run at 5be6e90 on mote (macOS):
- bun test: 58 pass. node --test tests/*.test.mjs: 58 pass.
bun scripts/check.mjs: ok.
- Broken by hand, and each change turned its test red:
- no rmSync of the cookie copy;
- 429 not passed through;
- room keyed by session only;
- stop sent on an already-aborted signal;
- no abort listener on the request;
- streaming truncation ignored;
- the old truncation rule;
- totalTimeout back on join;
- no wake of a quiet reader;
- onTimeout not called;
- no room pruning.
- Probes against a local SSE server:
- A 35 s turn gives 200 under Bun (streaming and non-streaming) and under
Node.
- A silent stream with TABBIT_STREAM_TIMEOUT_MS=3000 ends at 3 s under
Bun and Node (an error event, or a 502 non-streaming), and the server
sees the stop at 3 s.
- tabbit-* temp dirs in TMPDIR: the same count before and after the bun and
node runs.
Not tried: a real Tabbit account.
|
||
|
|
8fc12a38b3 |
zcode 0.1.46: sign in as ZCode 3.17.2 and take a Start Plan that starts later
Three changes, each matching the client's source at zai-org/ZCode@a9fe401 (v3.17.2): - Every call goes out as 3.17.2: the sign-in, the Start Plan balance, the config, the requests, and (as in #678) the feed and the claim. ZCode gates by the version. #678 found the feed answers empty to 3.16.3, and the balance "judges capability by the real app_version" (zaiStartPlanBilling.ts). MARKETING_VERSION folds into APP_VERSION. - A sign-in whose only Start Plan starts later is taken, not refused with "has ended or was never started". ZCode's resolveStartPlanBalanceAvailability counts such a plan ("pending") as the account's. startPlan takes it only when the sign-in asks (coming); requests and the card are unchanged, and the card already names its start. - X-Client-Language on the feed is zh-CN or en-US only, as marketingTouchService's localeSchema sends it. Before, it was the computer's locale as it was (zh-Hans-CN, en-GB, ...). Run at this tree on mote: - bun test packages/zcode: 191 pass, 0 fail. - bun scripts/check.mjs: clean. Broken by hand: - APP_VERSION back to 3.16.3: 7 red, among them the two new sign-in tests through their balance app_version check. - The sign-in without coming: those 2 red. - The old locale: the language test red. Not tried: a live sign-in, balance or feed. No ZCode account was in a sandbox. Whether the balance answered sliyrainbow's account with no plan under 3.16.3 or with one that starts later is not known; this fix covers both. Reported by jinpy666 (#676) and sliyrainbow (Discord). |
||
|
|
017a7ee3b2 |
zcode 0.1.45: the daily claim reads the feed as the current client does (#678)
The marketing feed (touch) and the claim now go out under ZCode 3.17.2's version header. jinpy666 found that under the pinned 3.16.3 the feed answers empty, while under 3.17.2 the day's banner shows, and checked it against the live API. The check-in no longer reads /billing/preview, which the v3.17 client doesn't poll (docs/marketing-touch-client.md in zai-org/ZCode@a9fe401). Reviewed at f805d97 and run there on mote: - bun test packages/zcode: 187 pass, 0 fail. - bun scripts/check.mjs: clean. - Broken by hand: with MARKETING_VERSION set back to 3.16.3, 4 tests go red (the touch and claim version pins, and the card's feed read). Not tried here: a live feed or claim. No ZCode account was in a sandbox, so the live run is jinpy666's (10 accounts: 7 captcha, 3 inactive). Reported by jinpy666 (#676), who wrote the fix. |
||
|
|
0b8cc01937 |
codearts 0.3.2: a dated model keeps the name CodeArts gives it (#677)
errorcode7 (#677): /v1/model/builtin lists deepseek-v4.1-flash and deepseek-v4.1-flash-1017 side by side, two models with their own description and off-peak rate (0.09x vs 0.12x). The ids were already kept apart, but normalizeModelId cut "-1017" off the display name, so both rows read "DeepSeek-V4.1-Flash". parseModelInfo now takes the vendor's model_name as written (trimmed), and falls back to prettify(id), not the date-stripped id. A model only the agent lists gets the same. normalizeModelId stays for the CONTEXT_WINDOWS lookup and the vision check only. This is the codearts plugin alone: magpie does not fold 4-digit suffixes (catalog/samemodel.go only takes YYYYMMDD or YYMMDD), so no other vendor changes. Run on mote (Bun 1.4.2), at this head: - packages/codearts: bun test, 166 pass / 0 fail - bun scripts/check.mjs: ok Red on the old code: the new tests against origin/main's index.mjs, 163 pass / 3 fail (the two #677 tests and the updated dated-id test). Not tried: a real CodeArts account's model list. |
||
|
|
1dfdec29dc |
orcaterm 0.1.4: renew the WeChat token 90 minutes before it expires (#675)
orinsid measured that OrcaTerm drops the OAuth session together with an expired 2h access token: OAuthRefreshToken then answers SESSION_EXPIRED for good. The plugin declared no auth.refreshLead, so magpie's host renewed only when the account was used in the token's last 5 minutes, and an account idle past that had to scan again. auth.refreshLead is now 90 minutes (what orinsid's local patch ran for 40+ hours with no expiry): any request or usage read in the last 90 minutes renews it. Not changed: magpie's host renews only when something uses the account (host.js fresh(): loader, models, usage, checkin). An account nothing touches for the whole two hours still expires; that is the host's to fix. Run at this head, on mote: packages/orcaterm bun test, 113 pass 0 fail (11 files, renew.test.mjs new); bun scripts/check.mjs exit 0. Broken by hand: refreshLead commented out, renew.test.mjs goes 2 fail 1 pass (the hourly-use case and the lead-as-said case). Not tried: a real WeChat sign-in left idle across an expiry. |
||
|
|
1ed2f5544e |
minimax 0.2.1: a tool with no account named takes magpie's default account
0.2.0's tools took the first site key in plugin-auth.json's file order. magpie's host (accountsOf) takes the bare site id first, else the first site#... key by name. Once a removed sign-in is made again, the bare key sits last in the file, so a tool spent a different account from the one magpie uses by default. The tools now pick the same way the host does. Run on mote (sandbox HOME) at this tree: bun test in packages/minimax, 123 pass, 0 fail; bun scripts/check.mjs, minimax ok. Broken by hand: with file order back, the default-selection test goes red (1 fail). Not tried: a real MiniMax account. |
||
|
|
4f3eddc256 |
cursor 0.2.40: a new user turn whose old native calls are all answered gets a retained Run (#672)
A new user turn whose earlier native calls (call_cursor_…) all have tool results now gets a retained Run of its own, with those calls imported as history the way the stateless path imports them. Any call still pending, a request ending in tool results with no live owner, or a tool attachment last still falls back as before; the owner-busy check is unchanged. Nothing is submitted to an old exec: a user message last has no trailing handles. By ooboqoo (#672). Run at the reviewed head 5b4dcf1 on mote: - packages/cursor `bun test`: 394 pass, 0 fail - `bun scripts/check.mjs`: ok Broken by hand: with origin/main's native-session.mjs and the PR's tests, "terminal old handles do not wedge a new user turn" and the new admission test both fail (2 fail, 168 pass in those two files). Not tried: a real Cursor account (the author reports ~270 requests over a day, all 200 or client-cancelled 499); Cursor dashboard usage or caching. |
||
|
|
1d2edbbf2e |
aelios: link the Aelios-project organization after the transfer (#674)
Points the Aelios links at github.com/Aelios-project/Aelios, where the repository was transferred. github.com/wusaki0723/Aelios now redirects there, and the PR's author is wusaki0723. The README row, the package README and the hook's opening comment are updated, and the prerequisite commit link moves from the sakisakisa-design fork to the canonical repository. Commit a57269c and PR #102 both exist there. Only links change: no code, version or configuration. Run at the reviewed head 45f0fa3, on mote with a sandbox HOME: bun test in packages/aelios, 178 pass, 0 fail. gh api confirmed the transfer redirect, a57269c in Aelios-project/Aelios, and PR #102 (merged) there. No version bump. The README on npm updates with the next release. |
||
|
|
95f37f46fa |
minimax 0.2.0: MiniMax web search and Matrix media tools (#671)
Adds MiniMax Code's account tools to the minimax plugin, as a Magpie-only `exports["./server"]` entry (magpie.mjs): - `web_search`, MiniMax's own search, at /mavis/api/v1/mcp/web_search; - the Matrix connector tools: image, video, speech, music, media understanding, image search and enhancement, and asset URLs, plus `list_tools`, `tool_schema` and `call_tool` limited to connector__matrix__*. The schemas are bundled in matrix-tools.json, and each call is routed through the account's live catalog. - Tool requests reuse the chat sign-in's refresh logic per stored account key, and go through siteFetch: a cross-host redirect (Akamai's 307 to the other site) is an OtherSite hint and spends no refresh (#666). - With no `account` named, a tool uses the site's first stored account. An explicitly named account never falls back to another one. - No `web_fetch`: magpie's search MCP already serves one that refuses private addresses. - Tool descriptions don't name magpie (tested). - Version 0.2.0. The OpenCode entries still export only the two chat plugins. Run at the reviewed head e776afc, on mote (macOS, sandbox HOME): - `bun test` in packages/minimax: 123 pass, 0 fail, 12 files. - `bun scripts/check.mjs`: ok (minimax ✓). - Broken by hand: with `send` back on plain fetch, "tool redirects to another host stop before a 401 or token rotation" goes red (1 fail), and green again when restored. - The first review's probe (307 to another host, 401 there) spent 3 refreshes over 3 calls at 2467992. The new test covers the same case: 0 refreshes and 0 requests reaching the other host. - Checked against magpie's plugin host (internal/plugin/host.js): ./server is tried first, `directory` is magpie's config dir, and auth.set with a `minimax-code#…` id writes that key. Not tried: a real MiniMax account (search, generation, billing), and a real mainland-China network against the Global site. |
||
|
|
add66fc954 |
gcp-ai: the usage-options test asks no gcloud before the options are read (#667)
48a5f21's "the usage hook takes the billing, currency and profile maps" test signed in with an accountId, so each of its usage calls first asked gcloud for a token. On the publish run's ubuntu runner that took past bun's 5s per-test limit, the test job went red, and gcp-ai 0.1.5 was not published. The test now has no account, so nothing is asked before the options are read and refused; it checks the same errors. Run at this head on mote: `HOME=$(mktemp -d) bun test` (as publish.yml runs it): 5195 pass, 0 fail, the test in 1.14ms. node --test packages/gcp-ai/test/*.test.mjs: 84 tests, 81 pass, 3 skipped, 0 fail. bun scripts/check.mjs: ok. Not tried: the ubuntu runner itself; the first publish run on it will show it. |
||
|
|
48a5f21835 |
gcp-ai 0.1.5: credits read per Chrome profile, per project's billing account and in yen, and a translated Console says so (kidchen94, #667)
kidchen94 reported four ways the credits refresh failed on one machine: Chrome's last-used profile decided whose session a read used, a page Chrome translated could not be parsed, a JPY billing account timed out on the wait for a "$" row, and an ambiguous billing account could only be fixed with the machine-wide VERTEX_BILLING_ACCOUNT. - Chrome profile: profileDirectories (Google account -> profile directory), profileDirectory and VERTEX_CHROME_PROFILE_DIRECTORY pass --profile-directory to every Chrome the plugin opens: reads, the kept browser and the sign-in window. The name is checked (no path separators, no "."/"..", no leading "-"), and a kept browser is never handed to a read pinned to another directory. - Billing account: billingAccounts maps a project to its billing account, ahead of the row's billingAccount and the environment. The discovery error names the project, the accounts the Console showed and the option to set. - Currency: billingCurrencies names a billing account's currency (USD, JPY). Yen is read with no minor unit and shown as "¥8500 JPY". A ¥ is never taken for yen on its own, since the Console writes yuan the same way: a ¥ table read as USD names the setting at once. Amounts need strict comma grouping. The row wait is any cell with a digit, not "$". - Translation: a page Chrome marked translated (translated-ltr/rtl on <html>) and a table with non-English column names each give an error that says so and how to turn translation off, not a timeout or "session may be expired". - Cache: the profile directory and the currency map join the cache key only when set, so existing caches are kept. - fetch_credits.mjs takes --profile-directory and --currency. Run at this head on mote (macOS, Node 22, Chrome for Testing 1234): node --test test/*.test.mjs: 84 tests, 81 pass, 3 skipped (the Linux/Windows-only ones, as on origin/main's 76), 0 fail. bun scripts/check.mjs: ok. Broken by hand: the new tests against origin/main's lib/ and index.mjs. The JPY and translated browser tests fail with the reporter's symptom (21s and 41s, "Credits table was not found or is empty; the session may be expired"), the billing test with "set VERTEX_BILLING_ACCOUNT explicitly", the profile test with "Chrome used Default, not Profile 1", and plugin.test.mjs fails to load (billingCurrenciesOf is new). Not tried: a real Console (a JPY billing account, a page Chrome translated, a real multi-profile Chrome); the fixtures are tables served from the test. Not run on Windows or Linux. Chrome's own translate preference is not written; translation is detected, not prevented. Currencies other than USD and JPY are refused, not converted. |
||
|
|
067f4503ce | minimax 0.1.9: MiniMax's redirect to its other site is named, and a site without the membership API shows its credits (#666) | ||
|
|
d119f4f789 |
minimax: a site without the membership API shows its credits and no plan (#666)
hetingyi's side note on #666: on agent.minimax.io both /matrix/api/v1/user/get_user_extra_info and /matrix/api/v1/commerce/get_membership_info answer 404 "404 page not found", even through a proxy. membership() fell back from the first to the second and threw the second's "membership: HTTP 404", so the international account's whole usage card was that error, its credits ledger never shown. Both answering 404 is now "no membership API here": no plan is said (not Free, which nothing read), and the card goes on with the credits ledger as before. Any other failure of either call is still the card's error, and a refused sign-in still throws. Run at this commit on mote: bun test packages/minimax 88 pass, 0 fail. The new usage test (the reporter's 404 body) is red against origin/main's index.mjs. Not tried: a real global account; whether such an account's M Plan lives elsewhere on the international site is unknown. |
||
|
|
0e072cdf09 |
minimax: a redirect to MiniMax's other site says so, not that the sign-in was refused (#666)
hetingyi (#666): from a mainland-China network, Akamai answers every agent.minimax.io request with 307 Location: https://agent.minimaxi.com/... (X-From: ak). fetch followed it, the China site turned the international token away, and MiniMax Code (Global) read as "account: the sign-in was refused (HTTP 401)" on the credits card and the check-in. The chat path was worse: its 401 forced a refresh (a refresh token spent) and sent the chat again, to the same redirect, on every request. - siteFetch: every request to a site's hosts (account API, check-in, credit ledger, M Plan, models, chats, OAuth device code, poll and refresh) goes with redirect "manual". A redirect on the same host is followed as fetch would (up to five; 301/302/303 turn a POST into a GET; a 307/308 resends only a string body). One to another host is an OtherSite error: "<what>: agent.minimax.io sent the request on to agent.minimaxi.com (HTTP 307), which doesn't take MiniMax Code (Global)'s sign-in. MiniMax does that for a network in mainland China; set a proxy outside mainland China for MiniMax Code (Global)." - It is never an AccountRefused: the card's sign-in stays "kept", the check-in's 401 retry isn't taken, and a chat answers 502 api_error with the message (X-Magpie-Sign-In kept), with no refresh and no second send. - The China site gets the same handling with a neutral hint, since nothing says which networks it sends elsewhere. - README: the international site needs a network outside mainland China. Run at this commit on mote: bun test packages/minimax 87 pass, 0 fail. region.test.mjs (the reporter's 307s: status, Location, X-From, an _abck cookie) against origin/main's index.mjs: the card, check-in, chat, models and refresh tests red; the same-host redirect test passes on both. Not tried: a real mainland-China egress or a real global account; the fixtures are the reporter's table. A proxy injected by magpie's plugin host passes init through (host.js spreads it), so redirect "manual" reaches Bun's fetch, checked by reading host.js only. |
||
|
|
023631774e |
cursor 0.2.39: release the catalog's Claude listing (jiaohanying, #634)
|
||
|
|
b8ec827579 |
cursor: the Claude Cursor hides from an account is listed once per context size (jiaohanying, #634)
By jiaohanying (#634). An account Cursor blocks Claude for has no Claude in the picker (AvailableModels), only in the usable list, so those models were listed as usableOnly fallback entries: a 200K window assumed, no sizes. AvailableModels with scope 3 (the full catalog) is now asked alongside the other two (8s; a failure leaves the list as before). The live Anthropic models the picker lacks (not isHidden, not Auto, not chat-only or Tab-only, with a variant the account has an id for) are listed as the picker's models are: once per context size (claude-opus-5-5@300k, @1m), thinking a parameter, the efforts the account is served, 1m in Max Mode. A catalog variant without a legacySlug gets the one of the model's ids that says its effort, thinking and fast; none or several, it is not offered. Only the parameters the model defines are sent: the catalog's Opus 4.7 to 5.5 variants carry cyber=false, which the picker's don't and cursor-agent never sends. A saved sized id (claude-opus-4-8-thinking@1m) now runs at its size. With no effort asked a catalog model goes at Cursor's default variant (Opus 5 and 4.8: high), as the picker's do. The version is bumped in the next commit: main's |
||
|
|
a064cf15e1 |
devin 0.1.35: Claude's thinking keeps its signature and goes back with it (#665)
Vigilans (#665): GetChatMessage's reply carries the thinking's signature
in delta_signature (10) and its type in delta_signature_type (21), and
ChatMessagePrompt takes the thinking back in thinking (11), signature
(12) and signature_type (18). The plugin read only delta_thinking (9),
so /v1/messages answered thinking blocks with signature "", and the
next request left the assistant's thinking out. Field numbers checked
against devin2api's all-protos.proto (GetChatMessageResponse,
ExaChatPb_ChatMessagePrompt) at e8547b6d.
- events() yields {signature} for field 10 and {signatureType} for 21.
- Messages, whole: the signature goes on the last thinking block. Stream:
a signature_delta in the open thinking block, before its stop, as
Anthropic streams it. Only when the request's model is Claude; another
model's thinking stays unsigned, as before.
- The type is kept by signature (the last 512) since a Messages block has
no field for it; one not kept goes back as "anthropic", what Devin says
for Claude.
- buildMessages, to a Claude model: a signed thinking block goes back
on the assistant prompt after it (its text, or the calls' prompt);
a second one before any prompt gets an empty prompt of its own, and
one after the text with calls following goes on the calls' prompt.
Unsigned thinking, thinking to a model that isn't Claude, and a turn
that only thought send nothing, as before.
- The chat completion and Messages streams read past events they send
nothing for: a pull that enqueues nothing isn't pulled again in Bun,
and the Messages stream hung on one (seen in the new tests before the
loop).
Not changed: chat completions (and OpenCode 2's language model, which
goes through them) have no field for a signature, so they carry the
thinking text only, as before. thinking_redacted (reply 11, prompt 13)
isn't read or sent.
Run at this head on mote:
- bun test packages/devin (HOME a temp dir): 199 pass, 0 fail.
- repo root bun test: 5175 pass, 0 fail (15 skip); bun scripts/check.mjs ok.
- thinking-signature.test.mjs on origin/main
|
||
|
|
311d62867c |
workbuddy 0.2.20: extra credits only the detail lists have say when they lapse on the window routing reads (Kayphoon)
Kayphoon on Discord asked that routing spend the WorkBuddy CN account whose extra-credit packs expire first, before they lapse. magpie's smart routing already does that (Allowance.Renewal, Lapse and Pace read a window's runsOutAt/runsOut), and the plugin already put the soonest lapse of the summary's packages on the window that stops the account. But extra credits that only the detail lists have (listedExtra, the China free-account shape from jiabubu's report, 0.2.17) said their lapse only on their own "Extra credits" window, which is set aside, and routing reads no window set aside. So for those accounts routing knew no expiry at all. Now the soonest of them to lapse is also put on the Credits window, when it is sooner than what that window already says (summed when the same). Per-pack expiry isn't sent: routing only orders accounts by the soonest lapse and how much lapses then, so a list would change no choice. Run at this head (mote, HOME under TMPDIR): bun test packages/workbuddy, 318 pass 0 fail; bun scripts/check.mjs ok. Broken by hand: the same usage.test.mjs with the old index.mjs fails the jiabubu-shape test at the new assertion (Credits has no runsOutAt). Not tried: a real WorkBuddy CN account with expiring packs; the fixture is CN_FREE's shapes, not Kayphoon's bytes. |
||
|
|
1984cf65dd |
qoder 0.2.59: usage carries each pool's count and the plan's refresh, as Qoder's own panel shows them (jzing.draw)
jzing.draw on Discord (#feedback, 2026-11-03): Qoder's 我的用量 said 套餐内 Credits 1,817 / 2,000 (剩余 183, refreshing 2026-11-22) and 资源包 2,400 / 3,400 (剩余 1,000). magpie's Routing row said a bare "剩余 15%", which matched neither pool, so it read as the two not added up. They were added up already (Total credits since 0.2.44, #454), but every window sent only a share and a display string. The Routing row shows a count only for a window with limit > 0, so it had no way to say which figure it was. Now: - every pool window and Total credits carry amount, limit and unit, so magpie says "1,183 / 5,400 credits · 22% left" on the Routing row and the Usage card, which is Qoder's 183 + 1,000. - the plan's Credits window carries resetsAt = expiresAt, Qoder's "将于 … 刷新" date (renewsOn in Qoder 0.4.3's buildUsageItemGroups). Routing still counts the pools together and sets each pool aside; that didn't change. Run (mote, bun 1.4.2): bun test packages/qoder: 382 pass, 0 fail. Broken by hand: with amount/limit/unit and resetsAt dropped from the pool windows, the new test ("the plan and the resource pack read as Qoder's own panel does…") fails. Not tried: no real Qoder account. The fixture is built from the reporter's screenshot numbers. The reporter's "15%" (85% used) isn't reproduced from those numbers: the two pools together leave 22%. It may be a reading taken later than the screenshot, or a dedicated resource package Qoder's panel didn't show (the plugin counts those). Without their reading this can't be told apart. |
||
|
|
4586f8623b |
gcp-ai 0.1.4: a sign-in waiting on a lock its holder just let go takes it, instead of failing with ENOENT (#650)
take() opened the lock with "wx", got EEXIST, then stat'ed it in abandoned(). When the holder released between the two, stat threw ENOENT and the second concurrent sign-in failed with it (TestConcurrentSignIns on CI). abandoned() now returns null for a lock that is gone, and take() opens again without removing anything, since the path may already be a new holder's. Run on mote (bun 1.4.2, node 22), HOME=$(mktemp -d): - packages/gcp-ai node --test: 66 pass, 0 fail; under bun test 66 pass, 10 skip. - Broken by hand (ENOENT catch removed): the new lock test goes red. - The concurrent sign-ins test 30 times: 30 green. - Full bun test 5164 pass, 15 skip, 0 fail; scripts/check.mjs ok. Not tried: the original race itself is timing-bound and was not reproduced on demand; the unit test covers the gone-lock path directly. |
||
|
|
d0e3d76b1f |
README: window-warmup's row says it reads magpie's providers.json and model cache
The row said "none (its service calls magpie's gateway)", but src/magpie-files.ts reads providers.json (keys as sha256 fingerprints, key names, accountModels) and the models cache. README only, no version bump. |
||
|
|
1ab8238ade |
window-warmup 0.1.0: a page that sends a short message after a quota window resets, daily or every few hours (#661)
Adds packages/window-warmup (@magpie-community/page-window-warmup 0.1.0), by YangHonghang: a page plugin whose host part runs a service on 127.0.0.1:3492 and, on a schedule (after a quota window resets, daily at a set time, or every N hours), sends "hi" with max_tokens 16 through magpie's gateway to a provider/account/model the user picks. The registry entry moves from the author's own npm package magpie-window-warmup to this one. The package README opens with the zh/en warning that sends spend real quota and that some vendors (Claude subscriptions especially) may treat scheduled requests as unusual use. Reviewed at 07a0b217adb2a111f839c984cbc955c5bb45b68d: - Outside packages/window-warmup only README.md and registry.json change; no workflow and no other package. - The service binds 127.0.0.1, checks Host (DNS rebinding) and Origin (null or itself), needs a per-process 32-byte token on /api/*, and serves the index with a nonce CSP. - It reaches only MAGPIE_ADDR (default 127.0.0.1:3425). providers.json is read for sha256 key fingerprints only; no spawn, eval or outside hosts. - A window task sends at most once per resetsAt (or once per hour when idle); daily/every tasks catch up only the latest missed point, once. Run on mote (bun 1.4.2): - HOME=$(mktemp -d) bun test at the repo root: 5142 pass, 15 skip, 0 fail. - scripts/check.mjs ok. - packages/window-warmup bun test: 242 pass (dist.test rebuilds dist byte for byte). - browser.test.ts with Playwright 1.62.0: chromium and webkit pass. Bun ignores NODE_PATH, so it needs node_modules/playwright linked and PLAYWRIGHT_BROWSERS_PATH set under a temp HOME; without them it skips. Not tried: a real send through a live magpie gateway, and tsc --noEmit (no typescript on mote). |
||
|
|
81c7db0869 |
agnes-code: the README's link to the agnes package is relative to its own folder
packages/agnes-code/README.md linked [agnes](packages/agnes), which from that folder points at packages/agnes-code/packages/agnes. Now ../agnes. README only; no version bump. |
||
|
|
a48f39692a |
astudio 0.1.3, agnes-code 0.1.2: the desktop sign-in links the official site and waits instead of showing a key box (#658)
The desktop sign-in of astudio and agnes-code is now an oauth method, so magpie shows no empty key box. When the desktop session is on disk it finishes at once; when it isn't, it links the official site and polls every 2s for up to 5 minutes, ending on cancel (the host's signal). Missing, unreadable (with the reason, read errors other than ENOENT kept), expired and banned are told apart; banned and non-Windows agnes-code throw so the host shows the reason. agnes-code decrypts the DPAPI master key once per sign-in (re-decrypted if the session frame no longer opens with it) and kills a PowerShell stuck past 15s. agnes-code's README and registry summary say how it differs from the `agnes` entry. By jinyue806. Reviewed at 3a6bb97 (base 17e5ef7; main since then only changed packages/workbuddy). Run at 3a6bb97: - mote, bun 1.4.2, HOME=$(mktemp -d) bun test: 4921 pass, 0 fail (374 files); bun scripts/check.mjs ok; node --test on both packages 62 pass. - xiaomi-gpu (Windows 11, node 22): node --test on both packages 62 pass. - Raw bytes of astudio/index.test.mjs: 0 single-backslash "D:\a", 22 "D:\\astudio". - magpie's plugin host (host.js from magpie origin/main e41ef6288, run by bun on mote, sandbox HOME): astudio authorize with nothing on disk gave the official URL and method auto; writing a session file 3s into the callback finished it in 4.0s and saved key + metadata to auth.json; with the file present the url was empty; banned came back as the error message; an aborted callback was dropped; agnes-code on macOS came back with "仅支持 Windows" and no poll. - Broken by hand: dropping the master-key cache's set reds "decrypted once per sign-in"; dropping the banned throw reds "refuses banned accounts". Not tried: a real DPAPI decrypt (Protect over ssh is "Access is denied", no interactive logon there), real AStudio or Agnes Code desktops. Left for a follow-up the author offered: a DPAPI failure itself is not remembered, so each 2s poll can spawn PowerShell again (bounded by the 5-minute wait). |
||
|
|
33bb5fb2ef |
workbuddy 0.2.19: the China build's windows are named after their model and say they are estimates (#663)
By kunghim (#663). Squashed at the reviewed head 42b01b3 (the PR's f2a1233, origin/main merged in, and the review's 0.2.19 bump: #657 had already published 0.2.18). workbuddy 0.2.17 -> 0.2.19: - The China build's token window is no longer called "Free model tokens": there deepseek-v4.1-flash is charged x0.11 credits (testdata/config-561.json, copilot.tencent.com's /v3/config; WorkBuddy AI's is x0.00). Its card is named "deepseek-v4.1-flash tokens (est.)", its text reads "151.5M / ~200M", and its unit is empty (the name says tokens). - The China windows are a table, CN_ESTIMATED_WINDOWS, one entry per measured model ({provider, model, aliases, cap, name, short, unit}). freeWindowOf, ofAccount and freeWindowRows take the model from the entry; the parse-cache key carries the model too. - WorkBuddy AI's card is unchanged (Free model tokens, 1e8, "tokens"). - Both stay set aside (shown, not routed on); a refusal still pins the card full. Routing in magpie reads the card's models/aside/refused, not its name. - README: the China windows section; the review fixed one line that said the numbers carry "tokens (est.)" (only the name does). Run at 42b01b3 on mote (macOS, bun 1.4.2), HOME=$(mktemp -d): - bun test (whole repo): 4900 pass, 14 skip, 0 fail (4914 tests, 374 files). - bun scripts/check.mjs: exit 0, 41 packages + registry ok. - packages/workbuddy bun test: 318 pass, 0 fail (node --test n/a: the package's tests use bun:test). - magpie's real host.js (origin/main) under bun, sandbox HOME, the package loaded from this tree, a usage.jsonl with one row per build and a preloaded fake for WorkBuddy's meter (network otherwise blocked): init provides workbuddy and workbuddy-ai; usage for workbuddy gives "deepseek-v4.1-flash tokens (est.)" 151,500,000 / 2e8, unit "", display "151.5M / ~200M", aside, models [deepseek-v4.1-flash, -sg]; workbuddy-ai gives "Free model tokens" 30,000,000 / 1e8, unit "tokens", "30.0M / 100M". Broken by hand: the card's name back to "Free model tokens": "the China build counts its own rows against 200M" and the ledger usage test go red. Not tried: a real China-build account; another CN model's window (none is measured). With several CN windows the one-entry parse cache would re-read the ledger per window each poll (one entry today). |
||
|
|
17e5ef7457 |
all: load on OpenCode 2.x through a default {id, setup} (#657)
nbczw8750 (#657): trae 0.2.26 on OpenCode 2.2.5 fails with "Plugin must export a default definition with an id and an effect or setup function. (cause: SchemaError(Missing key at ["default"]))". 2.x imports a package's exports["."] (a plugin dir and an npm install alike) and has no V1 path at all, so every package here that serves models failed the same way, not only trae. Every one of the 32 model packages now has: - opencode2.mjs, exports["."]: a copy of scripts/opencode2.mjs, an adapter that runs the package's V1 plugins inside 2.x's promise API. Config providers become 2.x providers (package pinned so the aisdk sdk hook runs), V1 auth methods become integration methods (oauth auto/code with forms; api without authorize as a key method), V1 credentials are kept in metadata.v1, the loader's baseURL, apiKey, headers and fetch are applied through the sdk hook, an auth.set renewal is stored per credential, and credential.switched /updated reload the account's own model list. - opencode.mjs, main: re-exports the V1 plugin functions only. OpenCode 1.x and magpie's host.js take main. On 1.x, trae 0.2.26's main exported a non-plugin (_internal) and 1.19.5 refused it ("Plugin export is not a function"); the new main fixes that too. - both files in "files"; patch version bumped. devin already had 2.x and is unchanged. scripts/check.mjs fails a model package whose 2.x entry has no default {id, setup}, whose opencode2.mjs differs from the canonical one, whose entry is missing from files, or whose main exports a non-plugin. Run at this head (mote): - HOME=$(mktemp -d) bun test, as CI runs it: 4900 pass, 0 fail (4914 tests, 374 files). A first run set globalThis.fetch for the whole process from opencode2.test and failed 528 tests in other packages; the block is now set and put back around that file's tests. - bun scripts/check.mjs: every package passes. With the network blocked cloudflare-workers-ai fails on its fetched catalog, the same on origin/main. - Real OpenCode 2.2.5 (npm opencode-ai), sandbox HOME, packed trae 0.2.27: loads with no error; /api/integration lists trae-cn "Trae CN" and trae-global "Trae Global" with their browser sign-ins; `auth login` starts the trae.cn authorization and waits (cancelled there); with a fake credential POSTed to /api/credential, `opencode models` lists trae-cn's six models. - Real 2.2.5 with a fake V1 key plugin through the same adapter against a local fake server: `auth login` with a key, `models`, `opencode run` reached /real/v1/chat/completions with the loader's "Bearer loader-sk-fake" and header, and printed the fake's reply; with @ai-sdk/anthropic it reached /real/v1/messages with x-api-key from the loader. This run found the key method missing after 2.x's second integration transform (a once-only flag outside the transform); fixed, and opencode2.test checks a rebuild. - Real OpenCode 1.19.5, sandbox HOME, trae 0.2.27: `opencode models` lists trae-cn and trae-global models; 0.2.26 failed there. Broken by hand (scratch copy, bun test scripts/ and check.mjs): - trae's exports back to "./index.mjs": the trae 2.x test fails (default.id undefined), check fails trae with "OpenCode 2.x: ./index.mjs has no default {id, setup} (plugins#657)". - zed's opencode2.mjs changed: the copies test fails, check fails zed "differs from scripts/opencode2.mjs". - the key flag back outside the transform: the 1.x plugin test fails on the rebuilt sign-ins (key missing). Not tried: a real sign-in with a real account on 2.x; Windows (the reporter's OS); chat.headers, chat.params, usage and tool hooks, which the adapter doesn't carry to 2.x; the tools/pages packages (calc, goanyapi, layerfs, search1api, aelios, agent-console, chat, fingerprint, nowledge-mem, kimi-desktop), which still load only on 1.x. |
||
|
|
da94c2768a |
workbuddy 0.2.17: extra credits only the detail lists have are their own window
jiabubu on Discord (magpie 0.1.2774, workbuddy 0.2.16, a China-site free account): magpie's card read "Free plan · 0 / 500" and nothing else, with no Extra credits row. 0.2.16 splits the credits only by the resource summary (CreditGroups, else its Packages). WorkBuddy's own usage panel (5.5.6, buildCreditGroups) groups the packages of the paid and free detail lists, so extra credits only those lists carry were nowhere in magpie. The usage hook now adds, when the summary has the plan's credits alone, an "Extra credits" window from the detail lists' packages that: - are an extra kind as the client's resolveCreditGroup has it (bonus 028/037, top-ups 009/038/036, rewards 007/029/030; on WorkBuddy AI also 008 and 006; the China build puts gift 006 in no group); - the summary doesn't list (never counted twice); - haven't ended, and have a total (a slice package counts the day's slice). It is set aside, and says the soonest-lapsing credits (runsOutAt/runsOut). The plan's window still stops the account. Lists that can't be read, or a summary that already splits, keep the card as it was. Run at this head on mote: `HOME=$(mktemp -d) bun test` 4892 pass, 14 skip, 0 fail; `bun scripts/check.mjs` ok. Broken by hand: not adding the window turns the new test red (1 fail). Not tried: a real account with extra credits; the China meter answered 401 for the account I could read. The fixtures are CN_FREE's shapes with a total, not jiabubu's own bytes (not seen). |
||
|
|
e08e420581 |
check: accept quota-only providers without model transport (#654)
scripts/check.mjs accepts a provider that declares auth.usage, an empty
model map and no npm or api (a quota-only provider). Its loader is still
required, and a provider with models, npm or api is still checked as
before. Tests in scripts/check.test.mjs cover the accepted case, the three
incomplete configurations and a missing loader. (sunny0826, split out of
#653 as asked there.)
Run at the reviewed head bc57c1362e, rebased on main
|
||
|
|
d40a074828 |
qoder 0.2.57: QwenWork's gateway calls name the client, and a biz account refreshes for its team (tnt1223)
tnt1223 (Discord) signed in to QwenWork. Test models and the model list
both failed: "QwenWork models: HTTP 403: {"code":"403","message":"User
identity could not be verified"}". No QwenWork account was at hand, so
the case wasn't reproduced. These are the differences from QwenWorkCN.app
1.2.1 (its out/main/main.js) that the code shows:
- openApiJsonRequest puts User-Agent qoderwork/1.2.1, a fresh
X-Request-Id and getQwenWorkClientHeaders (X-QwenWork-Version,
-Release-Version 1.2.1-26092107, -Build 26092107, -Platform, -Arch,
-Channel stable) on every gateway call. These cover the device poll,
the account-context, wallets and the device token's refresh. The
plugin sent none of them. It now sends them on the QwenWork sites
(site.clientHeaders), in openapi() and in usage's read.
- refreshDeviceToken asks for {target:"biz", team_id} when the account
is a biz one (getIdentityFromUser: is_biz with an org and a team, read
through normalizeAccountContext), and for "c" otherwise. It adds
client_id and redirect_uri when the client signs in with that pair.
The plugin always asked for "c", which turned a biz account's token
personal on its first refresh. The sign-in now records identity and
teamId (accountIdentity), and deviceRefreshBody asks as the client
does. An enterprise-domain account sends no redirect_uri, since its
sign-in has none (siteOf).
- The 403 on the model list now adds that the sign-in's identity wasn't
recognised, and to sign in again. Other 403s read as before.
Qoder and Qoder CN are unchanged. A test checks that a Qoder call
carries no X-QwenWork-* or User-Agent, and that the refresh body is the
token alone.
Run on mote (bun 1.4.2):
- packages/qoder bun test: 381 pass, 0 fail.
- bun scripts/check.mjs: all packages ok.
Broken by hand in a copy, with the client headers dropped, the refresh
always "c", the identity not recorded, the enterprise redirect_uri kept
and the hint removed: 4 of the new tests failed.
Not tried:
- A real QwenWork account, personal or biz, so it isn't known that
these were the cause of the 403.
- The chat's Cosy-* signing. The official app signs it through its CLI's
wasm (sign-request), and that wasm also has Cosy-Organization-Id,
Cosy-Organization-Tags and Cosy-Data-Policy, which the plugin doesn't
send. Which account fields fill them wasn't read out of the wasm.
|
||
|
|
a16adb3025 |
qoder 0.2.56: Qoder CN signs in to a Lingma 1.0 dedicated domain with Qoder CN IDE's account (Milktea)
Milktea (Discord) said the plugin still can't sign in to their Qoder CN
IDE enterprise dedicated domain (企业专属域). Their domain answers 404 at
/algo/api/v1/version, so Qoder IDE 1.38.0 counts it as Lingma 1.0
(dedicated_lingma; the IDE then logs "use extension 127 login" and leaves
the sign-in to its language server). 0.2.53 refused such a domain.
Milktea measured these on that host (their gist):
- /device/selectAccounts and /api/v1/jobToken/exchange answer 404.
- A console PAT or the console's cookies get 105 "Login timeout" at /algo.
- /algo/api/v3/user/* answers "Request discarded".
What works is the session the IDE's worker keeps:
- <cosyHome>/cache/id holds the machine id (or <cosyHome>/id).
- <cosyHome>/cache/user is base64(AES-128-CBC(JSON)), with key = IV =
the id's first 16 chars. The JSON has uid, organization_id, email,
security_oauth_token (pt-), refresh_token and expire_time.
What changed:
- The dedicated method's 404 branch now reads that cache (lingmaSignIn).
The account it saves has lingma: true, the domain, the IDE's token and
its machine id, and is named <email> (<domain>). With no cache, or a
lapsed one, the sign-in says so and lists the folders it looked in.
- cosyHome comes from the CN IDE's main.js: <userDataPath>/SharedClientCache.
That is ~/Library/Application Support/QoderCN on macOS, %APPDATA%\QoderCN
on Windows and $XDG_CONFIG_HOME (~/.config)/QoderCN on Linux. The gist's
Linux-only folders, ~/.lingma and QODERCN_COSY_HOME are read too.
- Every call goes to the domain itself (lingmaSite). The chat is signed
as the gist captured the worker signing it: Cosy-ClientType 0, version
2.5.18, no Cosy-Scene or Cosy-Business-*, the assistant scene, and
model_config format dashscope.
- The models are the IDE's own keys: qmodel_latest, dashscope_qmodel and
q36fmodel, all modelSelector.item.* names in the CN IDE's workbench. The
domain's own list names keys its chat refuses. A "Model not exist" said
in the stream falls through to the next key.
- Renewal reads the cache again; the worker renews its own token ("CN 1.0
refresh" in its strings). This happens near the token's end, in
auth.refresh, and once after a 105. With nothing newer, the account
gets a 401 marked expired that says to open Qoder CN IDE.
- Usage reads nothing, and the check-in is inactive.
- events: a frame with no choices that holds an error, or a code and a
message, is now the turn's failure. Before, it was read past, which gave
an empty answer. This is the only change outside the Lingma path.
- README: a section on Lingma 1.0 domains.
Run (mote, bun 1.4.2): packages/qoder `bun test`, 375 pass, 0 fail. The new
lingma.test.mjs has 11 tests, with fixtures in the gist's literal shapes.
fetch is stubbed and HOME is a sandbox. On 0.2.55 all 11 are red. `bun
scripts/check.mjs` passes. dedicated.test.mjs lost its "Lingma is refused"
test, which lingma.test.mjs now covers.
Broken by hand: with Cosy-Scene and Cosy-Business-* kept, and with the
events error frame off, 2 of the 11 went red (the chat's headers, and the
fall-through on an error said in an OK frame).
Not tried:
- Any real Lingma dedicated domain or real Qoder CN IDE cache. Milktea's
gist was run against one; this code wasn't.
- The cache's AES key, the SSE wrapper, the version 2.5.18 and the
missing headers come from the gist's capture, not from the IDE's code.
- Whether the cached account belongs to the domain entered isn't checked
(the cache doesn't name a domain).
- The Remote-SSH layout (<machineId>/SharedClientCache).
|
||
|
|
52fff4d7d7 |
workbuddy 0.2.16: Extra credits are every kind but the plan's base, as WorkBuddy's own panel and CreditGroups say (Jiabubu)
Jiabubu (Discord, magpie 0.1.2738, Windows): a WorkBuddy account's quota
line under Routing → Accounts and keys showed the plan's Credits only;
extra credits (gifted, promo, bought) were neither shown nor counted
apart. magpie shows every window the plugin sends, so the gap was here.
Read from the vendor, not guessed:
- WorkBuddy AI 5.9.4.42593613 (its update feed today, read, never run):
the usage panel's buildCreditGroups/resolveCreditGroup put packages in
four kinds. planBase: proMon, proMonPlus, proYear, youth, advanced,
flagship, buddyOneVip (043), freeMonIntl, the Pro trials, and freeMon
on the China build. planBonus: bonus28, bonusIntl. addon: 009, 038,
036. benefit: activity, bonus29/30, and gift and freeMon on WorkBuddy
AI.
- The real summary (/billing/meter/get-user-resource-summary, the
owner's WorkBuddy AI free account, 2026-11-03) now carries CreditGroups
with the same four Kinds: plan_base "Plan Base Credits", plan_bonus,
addon "Top-up Credits", benefit "Platform Reward Credits".
0.2.11 called the plan's bonus (bonus28, 037) the plan's, from the
client's onlyRefreshCodes, so a Pro account's 1000 bonus credits were
summed into "Credits" and no "Extra credits" window was sent (the real
Pro summary in the tests, LIVE_SUMMARY, read "89.2 / 2000" in one
window). Now:
- with CreditGroups, "Credits" is plan_base and "Extra credits" the sum
of every other kind (an unknown Kind too);
- without them, the codes split as the client's panel does: PLAN_CODES
is its planBase list (028 and 037 out, buddyOneVip 043 in); 043 is
asked for in the paid list too, as the client's list has it;
- the prepaid balance window, the aside rule and runsOutOf are as they
were.
Run on mote at this tree: HOME=$(mktemp -d) bun test (whole repo):
4872 pass, 14 skip, 0 fail; bun scripts/check.mjs ok; packages/workbuddy
316 pass. usageOf on the real WorkBuddy AI summary: one window,
"0.19 / 100", as the account has only plan_base.
Broken by hand: origin/main's index.mjs: 3 usage tests fail (the new
one, the akic404 split, the unreadable-list card). CreditGroups ignored
(code split only): the new test fails ("150 / 1800").
Not tried: Jiabubu's own summary, and any real account with extra
credits: the owner's WorkBuddy AI account has plan_base only, and the
China account's token was refused (401) by the meter, so whether
copilot.tencent.com sends CreditGroups is not seen; without them the
code split applies. Two windows rather than four: the bonus, top-ups and
rewards are one "Extra credits" window.
|
||
|
|
85a6fd5485 |
chat 0.1.11: attachments reach the model, saves serialized, tool history by round (#645)
By ninondev (#645). Squashed at the reviewed head 764fbfc. Changes in packages/chat, 0.1.10 -> 0.1.11: - Attachments reach the model: - A .md, .markdown or .txt file, or any text/* file, is sent as UTF-8 text in a 【文档:name】 block. Bad bytes are an error, not mojibake. - An image's data URL gets its real MIME type, even when the browser said application/octet-stream or gave no type. - Send waits for every upload still in progress, not only the books. - A failed upload is dropped with a toast. It no longer goes in as a local copy that skipped the size caps. - Conversation saves: - Writes are serialized per conversation id. Once a delete has gone through, any write still queued is skipped. - A new conversation gets its id on the client up front. A save that finishes after the user has switched conversations no longer takes over the open one. - Opening one conversation and then another quickly no longer shows the first. - Tool history: - The server sends a "round" event each turn of the tool loop, and the history is replayed round by round. - Tool-call ids are unique across rounds (call_<round>_<i>). - Each tool result is capped at 60000 chars, the same in the stream and in the history. - A stop is checked before each tool call and after the MCP read. - A connection-error card is not replayed to the model. - epub-reader.test.mjs launches Chromium with --use-mock-keychain. Run at 764fbfc on mote (macOS), each with HOME=$(mktemp -d): - `bun test` (whole repo): 4857 pass, 14 skip, 0 fail, across 370 files. - `bun test packages/chat`: 68 pass, 1 skip, 0 fail. - `bun scripts/check.mjs`: exits 0. - The epub browser test with EPUB_TEST_BROWSER set to Playwright's Chromium: 2 of 2 pass. - A review-only end-to-end run (not committed) in Playwright Chromium and WebKit 1.62, at a 1100px width, with the real chat server and a fake gateway: - It attaches scene.md (no MIME type) and photo.png (application/octet-stream), types a question and sends. - It checks that the gateway got the markdown text, an image/png data URL and the typed text. - It reloads, reopens the conversation from the sidebar and asks a follow-up. The history still has the markdown and the image, and there is exactly one saved conversation. - All checks pass in both engines. With origin/main's packages/chat the same run fails 8 checks: the markdown and the image never reach the gateway. Broken by hand: - Without the per-round tool-call id dedupe, "tool history preserves round order ... repeated IDs" goes red. - With only the first throwIfAborted removed, the stop tests stay green, because the second check covers it. Read for harm: no new hosts, no credential or keychain access, no dependencies. Not tried: a real model or real MCP servers behind magpie's gateway. |
||
|
|
036fb6ed43 |
zcode 0.1.43: a block page holds zcode.z.ai off three minutes, for every account (#649, frank6com)
frank6com's 405 ("the provider's network firewall blocked requests from
this IP") is Aliyun's edge firewall in front of zcode.z.ai answering
POST /api/v1/zcode-plan/anthropic/v1/messages (the Start Plan) with its
405 HTML page. It is the address, not the method nor the account: ZCode's
own app got the same 405. Two Start Plan accounts and three sessions with
subagents (up to 6 requests at once from one IP), and every request after
the block went on knocking on the firewall, from both accounts, since the
gateway falls back but rests nothing for an edge block.
Now a block page sets a process-wide hold (edge.until, EDGE_HOLD three
minutes): while it lasts, a Start Plan request and a picked -Trial entry
are answered here with the same 405, permission_error and
provider.BlockedHint word for word, plus until when, so magpie's
EdgeBlocked and retryable still send the request to the group's next
provider. Free first leaves the gift and keeps a dual account on its
coding plan (api.z.ai, another host). A 3012 or a bare 405 is the
account's and holds nothing. The first request after the hold asks again.
Run, at this head, on mote:
- packages/zcode: bun test, 189 pass, 0 fail.
- bun scripts/check.mjs zcode: ok.
- Broken by hand: without the line that sets the hold, both new tests
are red (65 pass, 2 fail in start + dual); without !edgeHeld() in free
first, the dual test is red (66 pass, 1 fail).
Not tried: a real zcode.z.ai request. Reproducing needs the address
blocked, and asking until it is would block the owner's network. The page
the tests use is the one plugins#425 recorded.
|
||
|
|
58adeadfac |
qoder 0.2.55: a request whose max_tokens is 1024 or less does not think at the default (#643)
The same default as WorkBuddy's #643 (itspig): qoderBody's effortFor thought at the model's default effort when no effort was asked, so a title asked at a small max_tokens could spend it on reasoning. A request that names no effort and a max_tokens (or max_completion_tokens) of 1024 or less is now asked as "none": thinking off, or the lowest level for a model that always thinks. An asked effort, and a larger or unnamed budget, are unchanged. Run, at this head, on mote: - packages/qoder: bun test, 365 pass, 0 fail; small-budget.test.mjs new. - bun scripts/check.mjs qoder: ok. - Broken by hand (the SMALL_BUDGET line in effortFor removed): small-budget.test.mjs is red, 1 pass, 1 fail. Not tried: a real Qoder account. Qoder answers 401 to the owner's account (plugins#181), and no Qoder report showed a small budget spent on thinking; the change follows WorkBuddy's measured case. Other siblings checked: trae, devin, commandcode, loomy and kiro send only an effort the client asked or leave the server's default; none add one. |
||
|
|
d51bd50cf6 |
workbuddy 0.2.15: no default effort for a chat whose max_tokens is 1024 or less (#643, itspig)
itspig's change (the commit before) skips the default reasoning_effort at max_tokens 256 or less. This raises the bound to 1024, as SMALL_BUDGET, and reads max_completion_tokens too. Anthropic's API takes no thinking under a 1024-token budget, so a /v1/messages request magpie translates with max_tokens 1024 or less can't have asked for thinking, and the gateway sends it with no effort, the same as OpenCode's default variant. 256 left 512 and 1024 asks thinking at the default. Run, at this head, on mote: - packages/workbuddy: bun test, 315 pass, 0 fail. - bun scripts/check.mjs workbuddy: ok. - Broken by hand (the SMALL_BUDGET line removed): the new test is red, 8 pass, 1 fail. Real, on the owner's workbuddy-ai account (www.workbuddy.ai, sandbox HOME, no token renewal), deepseek-v4.1-flash-sg, default effort high: - main, max_tokens 64, no effort: finish "length", 64 reasoning tokens, empty content (#643's pattern). This head: "stop", 0 reasoning, the title answered. - main, max_tokens 1024: 76 reasoning tokens. This head: 0, answered. - This head, max_tokens 2048: 65 reasoning tokens (the default still goes). - An explicit "high" at 64 still ends "length"; "low" answers. An effort the client names goes as it came. Not tried: the China site (copilot.tencent.com), deepseek-v4-pro (11102 on the AI site), kimi-k3.1-pro (11158, not for free users). |