2c4e76dbba06f306ee6ecbcf5cc21b97901cec91
794
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2c4e76dbba |
agent-console 1.3.1: 全部自动同意 (Auto-approve all), split out of #727 (#747)
Auto-approve all (全部自动同意) ships in agent-console 1.3.1, split out of #727 (qingnian108).
The mode is off by default. In it, Codex runs with its sandbox off and Claude Code skips its checks. Cursor, OpenCode and dsh requests are answered allow-once by the console, never allow_always or acceptForSession. Each auto answer is saved with `auto: true` before the Agent goes on, and a banner shows while the mode is on. Plan confirmations and questions still ask. A 1.2 默认 of 全部放行 is not silently upgraded to real auto-approve. Pi keeps the `default` mode id ("Pi never asks"), so switching Agents before the first message never carries auto-approve into an Agent the user didn't pick.
Reviewed at 7e55c87ca merged onto main
|
||
|
|
20b893893f |
agentcompass 0.1.1: the decision provider registers again (#742)
With `enableDecisionProvider: true` the plugin now gives a keyless `auth` hook for provider `agentcompass` beside its config entry. magpie's host lists, signs in and serves only a provider an auth hook names, and posts System One to `<loader baseURL>/systemone` through the loader's fetch. 0.1.0 had the config entry only, so with the option on there was no Classifier option, `magpie plugin login agentcompass` failed, and `/v1/systemone` returned 404 (akiiwa-games/magpie-agentcompass-router#1). The loader's fetch answers `/systemone` only and gives 404 for every other path. With the option off nothing is registered. Mode A is unchanged. The README gives the model names for each install source and the order: option, restart, login. Version 0.1.1. The capability-curve sync from the first push was taken out to go in its own PR. The README's CR bytes went with it. What was run at b3cbc52dd (WSL magpie-desktop, Bun 1.4.2, Node 22): - `bun test` in packages/agentcompass: 34 pass. `node --test test/router.test.mjs`: 34/34. - `bun scripts/check.mjs`: every package and registry.json pass. - Broken by hand: 0.1.0's src/index.js with this head's tests fails 4 and 4d ("magpie plugin list must show the agentcompass provider"). - The diff since review 496773a47: allocator.js, catalog.js and profiler-core.js are byte-equal to origin/main; index.js and package.json are byte-equal to the reviewed 496773a47; `grep -c $'\r' README.md` gives 0. - A real magpie (origin/main 1826c4bd9, `go build -tags gtk3`) in a sandbox HOME/XDG on port 3511, using plugin add <dir>, options, login, list, serve, then POST /v1/systemone: - 0.1.0 with the option on: "no plugin signs in to agentcompass", then 404 "magpie has no Jev provider". - 0.1.1 with the option off: no provider and a 404. - 0.1.1 with the option on: "signed in to AgentCompass", then "agentcompass (AgentCompass, 1 models) signed in", then a 200 with work_kind debug_review. - PR CI: test and on-npm pass. Not tried: the market (npm) install, since the package is not on npm yet. A Routing Group in the GUI. |
||
|
|
a90b7aa41d |
workbuddy 0.2.21: the sign-in page opens at the desktop's version, so 企业微信 shows (shenyebuwu)
shenyebuwu (Discord #general) signs in to WorkBuddy with 企业微信 (WeCom), and the plugin's sign-in page offered no WeCom entry. The plugin opened www.workbuddy.cn/login with version=2.0.0. WorkBuddy desktop opens the same /v2/plugin/auth/state page with version set to its own app version (openAuthUrl: version = CLIENT_INFO_PLUGIN_VERSION, which the desktop sets to the app's version; read from WorkBuddy.app's app.asar). The login page's signin-callback chunk shows WeCom to platform workbuddy only at version >= "5.8.0" (Le/tn, Jt="5.8.0"), so 2.0.0 hid it. The page now opens with site.app (5.9.3, the version the requests already carry), for both builds, as the desktop does. Run (mote, bun 1.4.2, HOME=$(mktemp -d)): packages/workbuddy bun test, 321 pass 0 fail; bun scripts/check.mjs workbuddy ok. Broken by hand: version put back to "2.0.0", wecom.test.mjs 3 of 3 red. Real page (Playwright Chromium on mote, a fresh state from copilot.tencent.com): version=2.0.0 lists 微信 手机号 SSO QQ 邮箱; version=5.9.3 lists 企业微信 too. Not tried: a real WeCom sign-in to the end (no WeCom account, no credentials entered); the WorkBuddy AI page with WeCom (its gate is the China platform's only). |
||
|
|
c96d04bb6b |
zcode 0.1.51: a gift-only account lists only the models its balance names (young02036)
young02036 on Discord: two ZCode accounts in magpie, one with no GLM Coding Plan whose Start Plan holds glm-5.3-flash, one subscribed whose gift shows as GLM-5.3-Flash-Trial. Picking per account the models each can use worked; left to the plugin's lists, requests failed while the ZCode app on the same accounts worked. A gift-only account listed every model the Start Plan's provider config names (GLM-5.3-Flash, GLM-5.2, GLM-5-Turbo), whatever its balance held, so magpie's routing took it to serve models it has no bucket for. ZCode 3.17.2 offers such an account the balance's models alone (resolveStartPlanBalanceAvailability / resolveZaiStartPlanBalanceModelIds). The models hook now keeps, for a gift-only account, the config models its balance names (plus the gift names the config lacks and the -Trial entries, as before). A balance naming no model, or one that can't be read, leaves the config's list as it was. Coding plan accounts are unchanged. Run (mote, bun 1.4.2, isolated HOME): bun test packages/zcode, 200 pass; bun scripts/check.mjs zcode ok. The new gift.test.mjs case was red on the old code (GLM-5-Turbo and GLM-5.2 listed) and green after. Not tried: a real ZCode account (none available); whether the reported 3012 came from such a request is not proven. |
||
|
|
5703c9f18a |
agent-console 1.3: reviewed features from #727 and timeline polish (#733)
This carries #727's reviewed part forward, without auto-approve (that comes as its own PR). Permission behaviour is the same as 1.2. - Windows Git Bash detection, never the WSL System32 bash. It can be overridden in Settings and is passed per spawn only. - GBK / system code page decoding of raw process output. - Folded tool steps that don't wrap at ~600px. - Select-to-quote, and copy/edit under the user bubble. - Instant send with the echo replacing the bubble in place, and retry when a send fails. - `/app` heals itself after sleep/wake. `frame-ancestors` is limited to loopback and Magpie's window. - Grayscale timeline polish: one-line tool rows, a task-list pill, a reply footer and code blocks. - Test fixes: - The `initializing` push is awaited. - `afterEach` waits for the thread store's writes. - `runtimeInfo().starting` is exposed, and the steer test waits on it. - "idle recycling" waits for closed. Run on mote (macOS) at 65ab7c94: - `npm ci`, `npm run check` and `build` are ok; `verify:build` gives 5/5 OK. - Full `vitest run` x5: 4 green (427 passed). One red, "send while running → queued", is a race that is on main too. - Cause: `setStatus(idle)` runs before `queue.shift()`. - A 300ms pause injected there makes it red 3/3 on main and on this head. - Filed on #585 with the cause and the repro. - Focused send-latency + manager runs: 12/12. `e2e:v1`: 25/25, with no pageerror or console error. - Broken by hand: - With the old steer wait and the mock send held 400ms, the test is red 3/3; the new wait passes 3/3. - With `recycleIdle` made a no-op, "idle recycling" goes red. - Playwright render: - Chromium and WebKit × zh/en × light/dark × 1280/420. - No gradients, no coloured left borders, no `<select>`, no page errors. - At 420 the page scrolls sideways (scrollWidth 480), the same as main. Not tried: Windows (Git Bash detection, GBK decoding) and a real agent, rather than the mock. |
||
|
|
74cdf0de97 |
pig 0.1.1: the Agents row picks the model PiG starts on (str_)
str_ on Discord: PiG's row only listed models, where Pi's picks the one it
starts on. PiG keeps that in ~/.pig/agent/settings.json as
defaultProvider and defaultModel (PiG's settings reference and
startup_model.go). The descriptor now says `startup: {config:
settings.json, model: "defaultModel", keys: {defaultProvider: "magpie"}}`,
which magpie v0.1.3008 (1fd02d33c) reads: the row gets a model picker,
both keys are kept aside and put back on disconnect. An older magpie
ignores startup and keeps 0.1.0's connect-only row. The READMEs say so,
and that an enabledModels scope leaving the model out starts PiG on the
scope's first model.
Run (mote): bun test pig.test.mjs (11 pass; the new startup test checks
connect writes the provider defaultProvider names), bun scripts/check.mjs
ok. Real PiG 0.5.3 (darwin-arm64 release, SHA256SUMS checked) in a
sandbox HOME with this connect's models.json and the startup keys,
against a fake OpenAI server: `pig -p` sent model deepseek/flash; with
enabledModels ["magpie/deepseek/pro"] it sent deepseek/pro.
Not tried: PiG on Windows or Linux, a real magpie gateway in front of it.
|
||
|
|
13371a3e52 |
trae 0.2.30: a Trae CN check-in goes on a 15-digit device id (#709)
sept13-yu's bisect on #709 (2026-11-05): with the plugin's own headers and body ({"req_source":1}), the same token and account, seconds apart, only x-device-id changed, the account's own 16-digit id got 9074 and a 15-digit one (a random, never-registered one too) was taken. Three accounts, two machines on two ISPs, magpie's headers and wild-work's alike: 16 refused every time, 15 taken every time. Every account signed in since 0.2.16 has a 16-digit id and ugDevice sent it as it was, so every client-less account's first claim got 9074. 0.2.29's second claim uses trae-mate's 15-digit uid-derived id, which is likely why it lands. ugDevice (only used for the ug pages, status and claim, of a trae-cn account no local client is signed in as) now keeps an id that is already 15 digits and otherwise makes a 15-digit one from the account's own device id and uid: the same derivation it used for pre-0.2.16 19-digit ids, now modulo 9e14 with a 1e14 floor, so the first digit is never 0 (shapeDevice can start with 0, which as a number is 14 digits). Stable per account, changes only with a new sign-in, never another account's. Left alone, and why: - newDevice stays 16 digits. That id is registered at sign-in, sent on every chat request and bound into the renewed JWT; nothing measured says chat or renewal want 15, and the bisect showed registration doesn't matter for the claim. - An account whose local Trae CN client is signed in as it keeps the client's own device (the bisect didn't touch that path). - Trae Global: no check-in, 19 digits as before. - 0.2.29's one extra claim in clientShapeHeaders after a 9074 stays as the fallback: the bisect never sent that request with a 16-digit id, so "nothing but the id matters in it" isn't measured. It costs one claim on a 9074 day only. Run (mote, bun): packages/trae bun test, 240 pass 0 fail; bun scripts/check.mjs, 44 packages ok. Broken by hand: the old index.mjs under the new tests on mote, 11 red, among them the new "signed in since 0.2.16 (16 digits) checks in on a 15-digit id" test and the request-header tests. Golden ids (166487253502651, 245914665436526) worked out by a separate Python port of the derivation, which also reproduces the old 2866487253502651. Not tried: a real Trae CN account check-in (no account here); whether the chat or renewal care about the id length. |
||
|
|
73362966e7 |
agent-office: 0.3.2, with a guard that the hook keeps only local requests
Bumps agent-office to 0.3.2 so #740 (SVG chevrons) and #741 (the remote switch and its empty-office line) reach users, and notes both in the changelog with the asset stamps they fixed (stale since 0.3.0). Adds a guard to "the host part writes what it reads": with no remote option set, a gateway-key request leaves ctx.state.office null, adds no session and counts as dropped. Before this nothing failed when the hook's track() defaulted remote on. Run on mote: HOME=<scratch> bun test packages/agent-office, 183 pass; bun scripts/check.mjs agent-office ok; stamp-page.mjs --check ok. Broken by hand: office.hooks.mjs remote default `!== false` turns the new guard red (1 fail), restored green. Not tried: the page in a real magpie window, a real remote agent. |
||
|
|
5150142eb2 |
agent-office: a Settings switch for agents from other computers and gateway keys (#741)
agent-office: a Settings switch, "Include agents from other computers and gateway keys", sets options.remote, so the gateway hook keeps requests that are not local. It is off by default (package default remote:false, the page reads opts.remote === true, the hook opts?.remote === true). While it is off the hook counts the non-local requests it drops (capped at 9999) into the snapshot, and an empty office says they were ignored and where the switch is, in all nine languages. Adapted by frederick-wang from QingJ01/magpie-agent-office#5. Merged onto #740 with the page stamps taken again (a7a5bce6). Run at the reviewed head a7a5bce6, on mote: - HOME=<scratch> bun test packages/agent-office: 183 pass, 0 fail, 34 more times (20 of them four at a time, load ~30). The first run of this head had 2 fails whose names were lost to tail; not seen again in the 34. - stamp-page.mjs --check: 0 (every ?v= checked against sha256); bun scripts/check.mjs agent-office: 0. - Broken by hand: dropping the dropped++ turns 2 tests red. Turning remote on by default in the hook's track() turned nothing red; a guard test follows in the version bump. - Playwright 1.62.0, Chromium and WebKit, light and dark, stub bridge, live.js with dropped:2 and no sessions: the empty state gives the hint; ticking the switch hides it, options.set receives remote:true after the 2.5s save, and a reload with those options shows the box ticked and no hint. Not tried: a real remote agent or gateway key through a real magpie. |
||
|
|
845fcfea4e |
agent-office: draw the Settings and picker chevrons as SVG (#740)
agent-office: the Settings button's chevron is an inline SVG that turns
over while the menu is open, and the Language, Scene and Quality pickers
draw the same chevron (appearance: none) in light and dark. .btn is
inline-flex so the chevron sits on the label's centre line, and an empty
Today token count no longer leaves a gap. Adapted by frederick-wang from
QingJ01/magpie-agent-office#4. Also re-stamps the page's asset
fingerprints, which were stale on main for model.js, scene.js,
scene3d.js and app.js since 0.3.0.
Run at the reviewed head 625619bb, on mote:
- HOME=<scratch> bun test packages/agent-office: 182 pass, 0 fail
(main
|
||
|
|
6a0d9e5b7a |
sensenova 0.2.0: browser sign-in, plan-filtered models and credit-pool isolation (#730)
sensenova 0.2.0 (yunwang2442-creator): a browser sign-in that captures the console's
OAuth redirect in a one-off Chromium and reuses or creates a `magpie-<host>-<account>-*`
Token Plan API key; the password sign-in kept as a headless fallback; models filtered
to the account's plan; the Flash-Lite pool kept apart from the general pool. Credentials
are sealed with DPAPI on Windows and stored as plaintext elsewhere, as 0.1.3 stored them.
When DPAPI fails, the value is stored as plaintext and the reason is logged.
Reviewed at d57f4a8b (every line of the diff vs main, every new or changed test).
Run at d57f4a8b:
- mote (macOS, Bun 1.4.2, sandbox HOME): `bun test packages/sensenova`: 57 pass, 0 fail;
`bun test` (whole repo): 5863 pass, 0 fail; `bun scripts/check.mjs`: ok.
- xiaomi-gpu (Windows 11, Bun 1.4.2) via win-run: `bun test packages/sensenova`: 57 pass, 0 fail.
DPAPI is refused on that box, so this run took the real plaintext fallback.
- A 0.1.3-shaped record ({type:oauth, access, refresh, expires, accountId, uid, apiKey},
all plaintext, no tokenHost) against a local fake with separate password and browser
token paths: the refresh went to the password token endpoint only; then the loader
served sk-legacy, usage read the pools and models listed the plan's model.
- Refresh failures: 400 invalid_grant gives dead + signIn expired, so the host stops.
500, 503 HTML and an unreachable server give dead:false, so the host retries after
RENEW_RETRY (30s). A dpapi: value that can't be unsealed gives signIn expired.
Broken by hand (each change in its own copy; each one turned the named test red):
- seal throws off Windows: 5 red, the 0.1.3 upgrade test among them
- seal throws when DPAPI refuses on Windows: 2 red
- seal throws when DPAPI can't load: 1 red
- pruning scoped to every magpie- key: "never touches another saved account's key"
- no activeSuffix protection: "the key in use is never pruned"
- the pre-prune at the 20-key limit put back: "a full account ... is a key_limit error"
- reuse from any magpie- key: "reuse picks this account's newest working key"
- refresh never dead: "a refresh token the platform has revoked says the sign-in is gone"
- create_key off when unset (the old optionOn): "create_key defaults on outside magpie"
- dedicated pool's grant left out: "several granted pools add up"
Not covered by a test: sending a 0.1.3 record (no tokenHost) to the browser token
endpoint keeps every test green, because the fake serves both token endpoints at
/oauth2/token. The code sends it to the password endpoint, as the run above shows.
HOST_TAG (os.hostname) has no test; checked by reading.
Not tried: a real sign-in (no SenseNova account here, no credentials entered). The
author reports real browser, password, refresh and 0.1.3-upgrade runs on Windows 10
and WSL2 Ubuntu (Node 24) on the PR.
|
||
|
|
5112465ca1 |
gcp-ai 0.2.1: Gemini's history rules before Vertex, no 400 "Requests ending with a model turn" (#734)
The loader's fetch now hardens a generateContent/streamGenerateContent
body the way magpie's gateway builds Gemini contents (codeassist.go):
- contents ending with the model's turn get a user turn after it
("Continue.", or the summary ask when the system prompt is an agent's
compaction prompt);
- contents opening with the model's turn get Gemini CLI's
"[Continuing from previous AI thoughts...]" user turn before it;
- a user turn holding a functionResponse beside the user's text is split,
the responses (and their images) first, the text in a turn of its own.
A body that needs none of it goes byte for byte; countTokens and the
model list are not read. lib/history.mjs, test/history.test.mjs.
Note: magpie's gateway already builds a plugin's @ai-sdk/google request
through buildCodeAssistSent, so those rules reach this plugin from magpie
too (yetone/magpie test TestPluginGeminiNeverAskedEndingWithModel, red
with the gateway's guard removed). This covers a body that reaches the
plugin without them: OpenCode's own @ai-sdk/google, or a magpie path that
skips the build. The reporter's exact request body is not in the issue,
so the tests use #734's conversation shape (Codex compaction after the
model's reply) and #1533's (tool output + compaction prompt in one turn).
Run on mote (mote-run): node --test test/history.test.mjs 5/5; the
package's npm run check + node --test test/*.test.mjs 105 tests, 91 pass,
0 fail (14 skipped, Windows-only); bun scripts/check.mjs exit 0.
Broken by hand: the fetch without hardenRequest fails the end-to-end
test (Vertex fake answers 400 "ending with a model turn").
Not tried: a real Vertex account (none in a sandbox here).
|
||
|
|
8fcc592e8b |
zcode: say what the feed's seq is, ZCode's count of its requests, not a page (#676)
#676 (XinOrigin) suggests scanning marketing/touch at seq 0..8 each round. ZCode 3.17.2's client (zai-org/ZCode@a9fe401) sends seq as a per-process counter from 0, one GET per refresh (marketingTouchService.ts, bootRequestSeq), and its doc says the number is only for the server's logs and does not change what is delivered (docs/marketing-touch-client.md, "启动请求序号 seq"). The plugin already sends it that way. Nine GETs a round per account would be the tighter polling #503 asks us not to do, so the comment says why it is one ask. Comment only: no version bump, nothing run. |
||
|
|
00642d4c6b |
kimi-work 0.1.17: Work's fast output speed, as K3.1 Pro Fast and a Fast switch (#728)
Kimi Work's "High" output speed is a speedOption of a model in the signed-in Work menu. A model whose option has `speedValue: "fast"` and `available: true` gets a `-fast` row ("K3.1 Pro Fast") and magpie's Fast switch (`service_tier: priority`). A request on either goes out with `X-Kimi-Model-Speed: fast`, the header Kimi's own desktop client sends. The menu is now read with the membership sign-in magpie renews, and the unsigned menu never offers fast. A `-fast` suffix comes off only ids the plugin listed itself.
Header checked against the vendor's client. Kimi 3.2.24 macOS was downloaded from kimi.com's own download link, a Developer ID build from Beijing Moonshot Technology (2J9472RW75); dmg sha256 e40df5954aacdfe69f5e56f9d679ef86a7d25f9134769ffe1b7ea382c77ca8fd. In its app.asar:
- `out/renderer/assets/common-DLYgMFK1.js` builds request headers with `x&&(a[uy]=x),t&&(a[fy]=t)`, where `uy="X-Kimi-Context-Length"` and `fy=c(2634)`.
- Decoded with a decoder of our own (the string table is read as data and rotated to the bundle's checksum; no vendor function was run): `c(2634)="X-Kimi-Model-Speed"`.
- The value comes from `DM`: the chosen speedOption's `speedValue` (`c(1967)`), from options the account can select (`"select"`).
- `kimi-agent-Dw2t9ioO.js` passes it as `modelSpeedHeaderValue` into `llmRequestHeaders`, and the daimon bundle carries `llmRequestHeaders` into the turn.
- No wire capture: not taken by the author or by the review.
Run at 69adea99 on a macOS box:
- `bun test packages/kimi-work`: 103 pass, 0 fail.
- `bun scripts/check.mjs kimi-work`: ok.
Broken by hand, each red:
- header value "fast" changed to "high": 1 fail;
- `available===true` dropped: 4 fail;
- header name changed: 1 fail.
The six breaks from the earlier round, at 45dd499 (code unchanged since, comments only), were each red too.
Not tried: a real request from this review's side (no Kimi Work account here), a lower-tier account's menu, and what a fast request costs.
|
||
|
|
3920b745d9 |
zed 0.1.18: name each request's thread and prompt, as Zed's editor does (#731)
Zed's editor sends CompletionBody with thread_id (the agent thread's id, a UUID made once per thread) and prompt_id (a new UUID per message the user sends, kept through the tool calls answering it): zed crates/cloud_llm_client/src/cloud_llm_client.rs CompletionBody, crates/language_models_cloud (the Google path sends both), crates/agent/src/thread.rs advance_prompt_id. The plugin, and the retired built-in before it, sent neither, so to Zed's cloud every request was a thread of its own. Yezike-yyy's Gemini 4 Argon conversation read cache_read 0 on 11 requests of 180k-230k input tokens, where Zed's docs say Argon bills implicit cache hits. - a chat.headers hook names a Zed request's session in x-magpie-zed-session; the loader's fetch now keeps a Request's headers, and complete() reads the header and sends it no further. - thread_id is a UUID hashed (per-process salt) from the account and the session, else the first user message; prompt_id from the thread and the count of user messages with text (tool results don't count), on all four APIs (Messages, Responses, chat completions, Gemini). - usage mapping was checked and is right: magpie reads Gemini's cachedContentTokenCount through the plugin's passthrough. Run (mote, bun 1.4.2): packages/zed `bun test` 78 pass 0 fail; `bun run check` at the repo root, exit 0. Broken by hand: the new thread-id.test.mjs against the old index.mjs, 7 of 7 red; the loader dropping a Request's headers, its test red; tool-result turns counted as prompts, the Gemini test red. Not tried: no Zed account, so no real request; whether Zed's cloud uses thread_id or prompt_id for Gemini's implicit cache is not known (its server is closed source). The reporter is asked to retest. |
||
|
|
4c7f1c15e7 |
gcp-ai 0.2.0: cache access tokens per account, probe the endpoint in the background (Yaka88, #725)
gcp-ai caches an authorized_user ADC's access token per account until 60 s before it expires (refreshed at Google's OAuth token endpoint, one in-flight refresh shared; gcloud mode still asks gcloud every time), retries a model call once with a fresh token on a 401, and probes the endpoint in the background: only a 401 that stands after one refresh holds later requests, for 60 s. README: the install name, token caching, and a source line. Version 0.2.0. Reviewed three rounds (e78a89a4, e1f83cad, 3959a795). Run at 3959a795 on mote (macOS, Node 22.22.0, Bun 1.4.2, sandbox HOME): - packages/gcp-ai `node --test test/*.test.mjs`: 100 tests, 86 pass, 0 fail, 14 skipped (no Chrome there; Windows/Linux only). `bun test packages/gcp-ai`: 86 pass, 14 skip, 0 fail. `bun scripts/check.mjs gcp-ai`: ok. - Broken by hand at this head: dropping the probe's invalidate and second read turns 6 tests red (the stale-token test among them); dropping only the invalidate turns the stale-token test red. Earlier rounds broke the 401 retry, the cache invalidation, the expires_in rule, the account in the token key, the 401-only probe verdict and the in-flight sharing; each went red. - The direct refresh (refresh token to https://oauth2.googleapis.com/token only) was cleared by the maintainer on the PR. Not tried: a real Google account (none on the test machines). #713 rebases onto this. |
||
|
|
81df338116 |
zcode 0.1.50: a claim's code 1004 is ineligible, read again in half an hour (kongbai01203, #729)
A claim ZCode answers with code 1004 (HTTP 400, a plan the account is not offered at that moment) is read as ineligible, naming the plan, and asked again half an hour out as an inactive is, instead of failed. Captcha (3007) is unchanged: still "claim it in the ZCode app", never solved. Version 0.1.50 (maintainer bump on the PR branch). Run at 6837f27e on mote (macOS, Bun 1.4.2, sandbox HOME): - packages/zcode `bun test`: 199 pass, 0 fail. `bun scripts/check.mjs zcode`: ok. - Broken by hand: dropping the 1004 branch in claimOne turns 3 checkin tests red; dropping the recheck `until` on an ineligible turns 2 red. - magpie's host accepts "ineligible" with an until and asks again at it (host.js checkinOutcomes, plugin_checkin.go ValidUntil). Not tried: a real 1004. The owner's one ZCode account answered 3007 (captcha) for zcode-v3-start-plan-1029 and zcode-v3-start-plan-gb-1104 under both 3.16.3's and 3.17.2's header, so the fixture's message text is the author's, from their six accounts on 11-04. Co-authored-by: kongbai01203 <kongbai01203@users.noreply.github.com> |
||
|
|
0bd00f0c72 |
window-warmup 0.1.2: effort-variant caches keep their public models, and Report a problem carries anonymized diagnostics (YangHonghang, #726)
window-warmup 0.1.2 (@magpie-community/page-window-warmup).
- Candidates are now the model cache, /v1/models and the chosen list together
(deduplicated by full id), so a cache that stores effort variants
(antigravity's gemini-3.8-flash-high/-low/-tiered) no longer leaves an
account with no models; layer 3 still keeps only public ids.
- A "Report a problem" link at the foot of the page: GET /api/diagnostics
(read-only, no model request, works for fatal and read-only instances)
builds an anonymized report (accounts and keys as acct-N / key-N, task and
card names left out, free text scrubbed of emails, key-shaped strings,
Bearer tokens, URL secrets and home user names, saveError included), and a
two-step copy puts an issue link and the report on the clipboard inside
magpie's sandboxed frame.
Reviewed at head bf66c2b7302c66395833bb3e93054a55901d77c1, with main
|
||
|
|
0daf0c7421 |
sap-aicore 0.3.0: a new provider for SAP AI Core's GPT Responses and Claude Messages deployments (caikn, #651)
A new provider package, @magpie-community/opencode-sap-aicore-auth 0.3.0
(packages/sap-aicore). It signs in from a local SAP AI Core client-secret
credential file, discovers the account's running GPT (Responses) and Claude
(Messages, Bedrock) deployments per resource group, and sends requests only to
https://*.authentication.*.hana.ondemand.com (token) and
https://api.ai.*.hana.ondemand.com (inference). Image input is gated per model
on the catalog's inputTypes. Also: the root README row, a registry.json entry,
.DS_Store in .gitignore, and scripts/check.mjs accepts an empty static model
list for a package whose provider.models hook is a function with the same id
(npm and the loader are still required).
Reviewed at head b44b3e1b68889c2a12bcaa37ad5d546a398bdde0, with main
|
||
|
|
16769b21dc |
joycode 0.2.7: an empty or unterminated Responses stream is an error, not a silent success (liangmouse, #720)
JoyCode's Responses SSE is checked one event at a time, never buffered whole:
- a JoyCode FAILED_RESPONSE envelope (code non-zero) becomes a Responses
"error" event that keeps its code, message and cause; anything after it
is dropped;
- a response.completed with no output seen and none in its output list
becomes error empty_response (an unreadable completed frame too);
- EOF with no completed, incomplete, failed or error event becomes error
incomplete_response;
- text, refusals, tool and *_call items, reasoning with a summary or
encrypted content, and explicit incomplete/failed pass byte for byte,
CRLF included. A completed with no [DONE] after it passes as it came.
magpie's gateway reads a Responses "error" event as a failed turn and owns
the retries; the plugin sends no request of its own. Tests that called
t.mock.method(fetch) several times in one test leaked the mock under Bun
(copilot's tests got "Body already used"); each fixture is its own test now.
Run at the reviewed head 7b74d0c (main
|
||
|
|
d677c436d3 |
trae 0.2.29: a 9074 with no client here is claimed once more as client-less tools send it (#709, #722)
With no Trae CN client on the machine, Trae CN answers the plugin's check-in claim 9074 every day (#722: jiabaoyu, never once taken; #709: two accounts on a headless box). The same accounts check in through tools that also have no client: providers-hub daily (#722), wild-work (#709). #709 first put this down to account-level rate limiting cleared by wild-work's 8s retry, but its reporter's own log then showed every wild-work claim taken first time (~100ms, no 9074 since 09-19), so the retry never ran and waiting is not the difference. What the working tools share and the plugin doesn't: body {}, x-user-region: CN, a 15-digit id, no Electron UA / 0.1.69, none of the IDE's device headers. providers-hub sends luckymiaow/trae-mate's request (MIT): those headers and an id made from the uid alone, never registered at a sign-in. Now an account no client here is signed in as gets one more claim, at once, after a 9074, in trae-mate's request as it is (clientShapeHeaders; its device, market user and session ids from the uid). Once: a second 9074 is the day's answer; no other code is claimed again; an account that rode its own client's device is not; an account with no uid is not. The first claim is unchanged, so an account it already works for sends nothing new. Which single field Trae CN wants is still #709's bisect. Run (mote, bun): packages/trae bun test, 239 pass 0 fail; bun scripts/check.mjs, every package ok. Broken by hand: the old index.mjs under the new tests, 5 red (the claimed-once-more, two-claims-never-three, and three message/device tests); the guard widened to any non-zero code, "only a 9074 is claimed again" and the 9095 test red. The golden ids for uid u-1 were worked out with a separate Python port of trae-mate's device_map.rs. Not tried: a real Trae CN account (no account used); whether the whole request or one field of it is what Trae CN takes. |
||
|
|
ebdd4fd247 |
history-trim 0.1.1: declare compressToolResults and preserveSystemPrompt, two regression cases (manjughosa, #681)
Declares history-trim's existing compressToolResults (true) and
preserveSystemPrompt (false) options in the package manifest, matching what
history-trim.middleware.js does when they are absent, and adds two
regression cases: a long surrogate-only tool result in the turn being sent
stays whole, and a repeated message is dropped even when its keys are in a
different order. No middleware runtime change. Version 0.1.0 -> 0.1.1 so
the new manifest is packed onto dist.
Run at the reviewed head 06c179d (and merged onto main
|
||
|
|
d9a6c45c64 |
minimax: the China-site test reads 401 as a word, not inside the fake's port
region.test.mjs checked the account card's error with
not.toMatch(/refused|401/). The error names the fake's address,
127.0.0.1:<random port>, so any port with 401 in it (40199 on CI, the
publish run for
|
||
|
|
aaacefdea8 |
gcp-ai 0.1.6: release #723
Ships
|
||
|
|
a4fbe854be |
gcp-ai: a sign-in without an email stops with a clear error, and a 0.1.1 staging dir is not an account (NGshiyu, #723)
Follow-up to #606's post-merge notes ( |
||
|
|
f9b7a1ab24 |
astudio 0.1.4: check-in sends the desktop's clientType and studioVersion, and reads a pending daily reward popup as done (jinyue806, #721)
The account requests to agent.xfyun.cn/xingchen-studio now carry the desktop client's identity headers, clientType and studioVersion. Without clientType the server refuses client-popups/pending with 11001001. The values are AStudio's own: the 3.5.5 desktop bundle (AStudio-3.5.5-arm64.dmg, sha512 matching the vendor's client/releases/latest, apps/desktop/dist-electron/main.js and apps/server/dist/index.mjs, packages/shared/src/astronStudioHttp.ts) sends "21" on win32, "22" on darwin, and studioVersion = its package version (3.5.5). auth.checkin, after a balance read that shows no rise, reads client-popups/pending (GET only, as the desktop's listPendingAstronClientPopups does; it never calls client-popups/complete, so the desktop's own notice is left alone). A DAILY_REWARD_DIALOG there is the server's record of a grant not yet shown: the check-in reports done, with payload.points as credit only when it is a positive number. No popup still reports inactive (#658). A refused popup read reports failed. astudio 0.1.3 -> 0.1.4 (jinyue806). Run at 6d2919dce on mote (mote-run): packages/astudio node --test, 38/38 pass; bun scripts/check.mjs astudio: registry.json and astudio ok. Broken by hand: without the clientType header, the identity test fails; with the popup branch disabled, the two popup done tests fail (3 red). The new tests use fake fetches only. Not tried: a real AStudio account (the author's live run is in the PR). Linux sends clientType 21 where the desktop sends none (it ships for mac and Windows only). studioVersion is fixed at 3.5.5; the desktop sends its own version. Whether a DAILY_REWARD_DIALOG left pending past its day (desktop closed before showing it) would read as done the next day was not checked; the desktop completes it as soon as it shows. |
||
|
|
d4eeba4493 |
fovea 0.2.2: a new middleware, old history to head and tail on a cache-stable boundary (webkubor, #640)
A new gateway middleware, @magpie-community/middleware-fovea 0.2.2 (webkubor, #640): old tool output and text in a long history are cut to head and tail, with the boundary only on multiples of `cut_step` (24) so the cut prefix stays byte-identical between turns and the prompt cache holds. The leading user items before the first answer (Codex's AGENTS.md, environment_context and the task; Claude Code's first message) stay whole. `saccade` ("off" by default) drops the old context on a new topic, judged against that same task. Old images become a text note that keeps their `cache_control`. Ships an evidence page (Plugins > Fovea evidence) that computes a paste-in A/B in the frame, with no network.
What was run, at the reviewed head b9883cf206814fdc01950a00d413a36856de4e11, on mote (macOS, Bun 1.4.2, sandbox HOME):
- `bun test packages/fovea`: 33 pass, 0 fail. The two new Codex saccade cases fail with 0357f1c's middleware (and pass at the head).
- `bun scripts/check.mjs fovea` and `bun scripts/check.mjs`: pass. `page/measure.js` is byte-identical to a fresh `bun build.mjs`.
- `npm pack --dry-run`: 18 files, 131.8 kB unpacked; no brand/, no live-benchmark.mjs.
- The head merged onto origin/main
|
||
|
|
3e24e22837 |
window-warmup 0.1.1: models hidden by a routing group are sent, not called missing (#712)
A model a routing group keeps out of /v1/models (Group.Unlists, which magpie still serves) was taken for gone: the page's model list was disabled and tasks failed with "模型 X 已不在 Magpie 的模型列表里" without sending. window-warmup now also reads each provider's chosen models (providers.json "models") and counts a model as present when it is in /v1/models or chosen: in the catalog (fetchCatalog/accountsOf), the auto-model pick and a fixed model's send check. A model known only from chosen has no effort metadata, so it goes without reasoning_effort. A model in neither is still refused. Two gateway-unreachable tests now check the error is passed through rather than its exact wording, which varies with Bun's socket timing. Review: window-warmup lives in this repo since #661 (packages/window-warmup) and is published to the dist branch, not npm. 0.1.1 is free (main and dist have 0.1.0). Not mover-backed. No new host, credential, dependency or workflow change; providers.json was already read and only its "models" list is added (no key text). magpie's Group.Unlists doc confirms "a request naming one is still served". dist/plugin.js matches a rebuild of src (dist.test.ts, run on Bun 1.4.2). Run at 8f10bc07 on mote (Bun 1.4.2, HOME a temp dir as CI): bun test packages/window-warmup 246 pass 1 skip (browser smoke) 0 fail; bun scripts/check.mjs exit 0. PR CI green. Broken by hand: layer 3 without chosen, candidates without chosen, the fixed model check without chosen, the auto pick needing /v1/models, and entryOf dropping "models" each turn their new test red. fetchCatalog not passing chosen is caught only by the dist byte check, not by a behaviour test. Not tried: a real magpie with an unlisting group (the author ran it on a Docker magpie with zcode GLM-5.3). A switched-off provider's chosen models also count as present now, so its old tasks send and get the gateway's error instead of the local one. |
||
|
|
0ef2261681 |
minimax 0.2.2: the plan's windows and name from the console's own replies, within magpie's 20s (#705)
The usage card reads a plan's windows from the console's own token_plan/remains_percent (used and total per window, so a 150% week shows as "126 / 150 %"), with coding_plan/remains as the fallback (its share multiplied by weekly_boost_permille when that is over 1000). A general window at status 3 shows Unlimited; video windows show the console's counts. The plan is named by the console's current_subscribe_title, else by its tier: Plus, Max and Ultra as "Token Plan <tier>", the rest "M Plan <tier>". Time: magpie gives usage 20s. remains_percent and the title are asked together, each with a 5s timeout, and the fallback has 10s, so planQuota takes at most 15s, as 0.2.1 could. This answers the earlier review (30,030 ms with both console endpoints stalled). Review: both new paths are on the same host (site.platform) with the same bearer token and X-Group-Id coding_plan/remains already got; no new dependency or workflow change. 0.2.2 is free (main 0.2.1, npm 0.2.1, dist up to 0.2.1). Not mover-backed. Run at f383c5ea on mote (Bun 1.4.2): bun test packages/minimax 128 pass 0 fail; bun scripts/check.mjs exit 0. PR CI green. Broken by hand (usage.test.mjs): console timeout at 15s, or no timeout on remains_percent, turns the stall test red (15,001 ms); asking the title after the windows turns it red (10,006 ms); ignoring the console's used figure turns the two console-reply tests red. Not tried: MiniMax's real endpoints (no account here); the author ran one China-site account with a 150% week. |
||
|
|
fec25163ab |
joycode 0.2.6: verified 900k context for GPT-6.1 Sol and GLM-5.3 (#711)
GPT-6.1 Sol and GLM-5.3 join the measured-cap list from #707: when the
account's catalogue offers a larger extJson.contextWindowByPlatform["JoyCode
Desktop"] (1,000,000 for both), limit.context becomes the smaller of that and
900,000, floored to 100k. Only those exact ids: GLM-5.3-jcloud, GLM-5.3-agent
and GPT-6.1 Sol-preview stay at the catalogue's maxTotalTokens. Output limits,
missing or malformed metadata and the static fallback are unchanged. The caps
come from the author's real probes on 2026-11-04 (Sol ok at 900,064 input and
refused with context_length_exceeded near 1,000k; GLM-5.3 ok at 900,074 and
refused with code 1261 near 1,000k), so 900k is a verified tier, not a maximum.
Review: no new host, credential, dependency or workflow change; the diff is
the two map entries, tests, README/CHANGELOG and the version. 0.2.6 is free
(main 0.2.5, dist has up to 0.2.5; joycode is published to dist, not npm).
Head 69227598 is on current main (
|
||
|
|
2955532344 |
joycode 0.2.5: verified Astra and DeepSeek context windows from the account catalogue (#707)
GPT-6 Astra and DeepSeek-V4.1-Flash take a larger limit.context when the account's own catalogue offers one in extJson.contextWindowByPlatform["JoyCode Desktop"]: the smaller of that and a measured cap (900,000 / 1,000,000), floored to 100k, never below the catalogue's maxTotalTokens. Output limits, other models, malformed or missing metadata and the static fallback are unchanged. The caps come from the author's real probes (Astra ok at 921,497 input, context_length_exceeded near 922k; DeepSeek ok at 1,000,073, its error names 1,048,576). Claude-Opus-5-hq stays at 200k (its 900k probe was refused). Review: no new host, credential, dependency or workflow change; version 0.2.5 is free (main 0.2.4, dist has up to 0.2.4). Run at bdfb41d8 on mote: packages/joycode bun test 76 pass 0 fail; bun scripts/check.mjs ok. Broken by hand: context back to the catalogue's maxTotalTokens turns the two new context tests red (2 fail). Not tried: no JoyCode account here, so the catalogue's contextWindowByPlatform field and the probes were not re-run by the reviewer. |
||
|
|
aa44cc3edb |
zed 0.1.17: an Anthropic thinking.display Zed has no variant for is left out (#708)
gogoing1024 (#708): claude-sonnet-5-5 from Claude Code at max effort was answered 400 "Zed: failed to parse Anthropic request: unknown variant `updates`, expected `omitted` or `summarized`". Claude Code asks its newest models for thinking.display "updates"; Zed's cloud parses display into an enum with only omitted and summarized. providerRequest now sends "highlights" as summarized (the thinking still shown) and leaves any other value beyond omitted/summarized out, the same rule magpie's gateway applies to relays (withDisplay in internal/gateway/anthropic_shapes.go). Adaptive and budgeted thinking alike; summarized and omitted go as written. Run at this head (mote, via mote-run): - bun test in packages/zed: 71 pass, 0 fail (11 files) - bun scripts/check.mjs: exit 0 Broken by hand: thinking-display.test.mjs against the old index.mjs, 3 of 5 red (updates, highlights, budgeted updates). Not tried: a real Zed account; the fix is from the reporter's 400 text and the request shape Claude Code writes. |
||
|
|
1a342edfae |
devin 0.1.36: another model's reasoning goes back as its thinking (#703)
kamikakushi (#703): swe-2 is conditioned on the assistant turns before it having thinking (ChatMessagePrompt field 11). The plugin sent field 11 only beside a signature (#665), and no builder handed it a non-Claude model's reasoning, so swe-2 stopped emitting delta_thinking on a tool loop's later turns (the reporter's A/B against swe-2-high: no field 11, 0 bytes of thinking; field 11 without 12, thinking on 5 of 5 runs). Each claim checked against index.mjs at 0.1.35: build() read only content and tool_calls, v2Chat() dropped reasoning parts, encodeMsg() gated 11 on the signature. - encodeMsg: field 11 whenever the thinking has text; 12 and 18 only with a signature, as before. - build (chat completions): reasoning_content (or reasoning, as some clients name it) goes on the assistant prompt as unsigned thinking, to a model that isn't Claude. joinSplitCalls keeps both halves'. - v2Chat (OpenCode 2): reasoning parts become reasoning_content, which build then handles. - buildMessages (/v1/messages, the sibling the issue doesn't name): a non-Claude model's thinking block goes back as its text alone, never with its signature. - Claude: unchanged. A chat completion still sends Claude no thinking (no field for a signature there), and Messages sends only signed thinking with its signature and type, as #665 did: Anthropic refuses a thinking block without a valid signature, so unsigned text never goes to Claude on any path. Not done: the issue's optional made-up thought for a history turn whose client sent no reasoning (Pi's openai-completions default). Nothing is written into the model's history that it didn't say. Run (mote, bun 1.4.2, HOME a temp dir): packages/devin 208 pass, 0 fail; repo root bun test 5411 pass, 0 fail, 19 skip; bun scripts/check.mjs ok. Broke it by hand: - index.mjs from origin/main: 7 red (the 6 new non-Claude tests and the updated "another model's goes without a signature"); the Claude tests pass both ways. - only encodeMsg's old gate put back: the same 7 red. - build's Claude gate removed: "Claude gets no unsigned thinking from a chat completion", "a chat completion's request is the same as before" and the v2 Claude check red. Not tried: a real Devin account; frames are built from the proto's field numbers, and swe-2's behaviour rests on the reporter's A/B. |
||
|
|
73c56ec3c7 |
catpaw 0.2.0: tools over the flattened prompt, parsed back into tool_calls, one forced retry (#697)
catpaw 0.2.0 (gcdong, #697): the conversation protocol takes one flattened
text prompt, so a request with tools was refused with 400. Tools now ride as
an injected instruction and the reply is parsed back into OpenAI tool_calls:
only a reply that is wholly the call JSON (bare object or one fenced block)
counts, unknown names and calls missing a required arg are dropped, a
drifted name case is matched back. A forced tool_choice (required / named)
gets one retry with the failed reply in the prompt; streaming holds the
whole reply in that case, otherwise only a JSON-shaped head is held and
prose streams live. Tool results ride as text. Images are still refused.
The keep-alive interval is cleared wherever the stream closes.
Run at the reviewed head f72226f2, on mote:
- bun test packages/catpaw: 53 pass.
- Squashed onto origin/main
|
||
|
|
54633128a1 |
zen-free 0.1.26: a tool named run_code goes as exec_program (#704)
alonewolfsy-web (#704): DeepSeek Harness desktop 0.2.1-rc.5 gets 429 FreeUsageLimitError on every main request through Zen's free tier. DSH's main request offers one tool, run_code, and the reporter's one-variable bisection against the inference endpoint shows Zen refuses any declared name containing "run_code", in any case, the underscore needed (run_code_v2, host_run_code, RUN_CODE, Run_Code refused; exec_program, code_run, runCode, run-code served; description and schema not read). The existing word rule (REFUSED_WORD, /terminal/i -> console, #624) becomes a list, REFUSED_WORDS, and run_code -> exec_program is its second entry. The served word takes the found word's case (EXEC_PROGRAM, Exec_Program, exec_program), so terminal's renames are unchanged. Everything else is the existing path: renameRefused renames the tool, the agent's past calls and tool_choice; nameGuard brings a call of exec_program back as run_code, streamed or not, in chat, responses and messages; an agent's own exec_program keeps its name and DSH's goes as exec_program_2 (the existing collision loop). README says so. Run (mote, bun 1.4.2): packages/zen-free bun test 222 pass, 0 fail; bun scripts/check.mjs rc=0. Broke it by hand: provider.mjs from origin/main under the new tests -> the 6 new #704 tests fail (3 protocols x client stream on/off), each with the call coming back as exec_program, not run_code. Real use: one sandbox-HOME run on mote with the public key against the real Zen endpoint (big-pickle, beam-free, flint-40b-free). Every request was 429 FreeUsageLimitError, the controls too (tools named Bash and code_run), so that network's allowance was spent and the run tells nothing about run_code either way. Not verified live; the reporter's bisection is what the rule rests on. |
||
|
|
abefa04ff9 |
orcaterm: refresh-token test holds one expiry for its tokens (#675)
refresh-token.test.mjs (
|
||
|
|
f6fdf8fee1 |
joycode 0.2.4: plan expiry, and one retry when gray access is denied (#701)
joycode 0.2.4 (kasisama): - usage: the plan's expiry from the IDE's expireText (end of that day, China time) as `until`, with each pool's runsOutAt/runsOut; the package row decides, otherwise the earliest pool. - a gray-access denial is retried once with the identity read again. - gateway failures are read from a clone of the reply (64KB at most); a JSON reply over 8MB answers 502 response_too_large. - an empty catalogue keeps the built-in models, which are text-only. The first head (f16034b2) turned the repo suite red: usage.test.mjs called t.mock.method(globalThis, 'fetch') several times in one test, Bun 1.4 restored the wrong function, and the next file (joycode/login.test) and ~450 tests after it kept hitting the mock. b1f06b75 installs the mock once per test; nothing outside usage.test.mjs changed. Run at the reviewed head b1f06b7501bddb4f035eee069bf44d89f02e5349 (mote): - whole repo `bun test`: 5374 pass, 19 skip, 0 fail (401 files). - at f16034b2: the same run had its first red in joycode/login.test.mjs right after usage.test.mjs, an AssertionError from usage.test.mjs's mock (the leak above). - CI run 41772835368 on b1f06b75: success. Not tried: a real JoyCode account (none here); the gray-denial retry and expiry phrases are checked against the tests' fixtures only. |
||
|
|
075cd237e2 |
reasonix-desktop 0.1.0: Reasonix 1.x in Discover → Agents (#700)
Adds Reasonix 1.x (Desktop and CLI) to Plugins → Discover → Agents as `@magpie-community/agent-reasonix-desktop`, agent id `reasonix-desktop`, separate from magpie's built-in `reasonix` adapter (Studio 2.x and native 1.39). A JSON agent descriptor plus a Bun-host companion (the kimi-desktop pattern) adds one `magpie-agent` provider to Reasonix's global config.toml and keeps only the assigned gateway key in its .env, with a journal, a lock and byte-exact restore on disconnect. Review commit on the branch: the registry entry's icon was `reasonix`, a mask name with no icons/reasonix.svg, so Discover would show the generic mark; it is `reasonix-color` now. Run at the reviewed head 6cb328f090d8b66e6cf590a69aa4e7b18144c684 (mote): - packages/reasonix-desktop `bun test`: 12 pass, 0 fail. - acceptance.mjs with a real Reasonix 1.38.10 (npm) and a magpie built from origin/main 4ca55c6b6, sandbox HOME: magpie installs and discovers the plugin and bridges the selected model; unchanged Reasonix sends its selected model and assigned key to the local API; disconnect restores the original selection and credentials. - resident-acceptance.mjs (a running `magpie serve` follows the switch): passed. - vendor.mjs rebuilt from its pinned sources: byte-identical. - CI run 41773750085 on 6cb328f0: success. Not tried: Reasonix Desktop's GUI app itself (the CLI reads the same config files), Windows and Linux. |
||
|
|
db307844e7 |
orcaterm 0.1.6: keep the WeChat sign-in's refresh token and renew from it (#675)
orinsid's desktop-client logs (#675, 11-04) show OrcaTerm 1.6.8 renewing from a long-lived oauth_refresh_token_v2 on a 110-minute schedule, while the plugin dropped the exchange's refresh token (`refresh: r.accessToken`) and renewed from the two-hour access token, which OrcaTerm answers SESSION_EXPIRED for 30 minutes into an idle sign-in. OrcaTerm's own bundle (orcaterm.cloud.tencent.com/terminal, orcaterm_components/orcaterm_app, fetched 11-04) settles the protocol: - the WeChat exchange sends {code, state, client: "desktop"} from the desktop client, and reads data.refreshToken from the reply; - the client keeps a refresh token only when it matches /^<uuid>\.\d{1,6}\.[A-Za-z0-9_-]{43}$/ and its uuid is the access token's jti (persistLoginRefreshToken); - OAuthRefreshToken sends {refreshToken} when it has one, else {accessToken}. The plugin now does the same: the exchange sends client "desktop", a matching refresh token is the sign-in's `refresh`, renewal sends it (an access token past its expiry no longer stops a renewal that has one), and a reply's RefreshToken replaces it, else it is kept. A sign-in from before 0.1.6 has the access token in `refresh` and renews as before until the next scan. Run (mote): packages/orcaterm `bun test`, 121 pass / 0 fail, including the new refresh-token.test.mjs (6 tests). Broken by hand: dropped client "desktop", sent {accessToken} always and saved `refresh: r.accessToken` again: 4 of the 6 new tests went red (the two that stay green check a mismatched token isn't kept and the pre-0.1.6 path). Not tried: a real WeChat sign-in. No OrcaTerm account here, so whether the reply to client "desktop" carries refreshToken for this flow, and whether renewal rotates it, is from the vendor's bundle, not a capture. If the reply has none, the sign-in falls back to the 0.1.5 behaviour. |
||
|
|
ef673b2b59 |
trae 0.2.28: a model's rate comes from display_contact_config (#690)
A Trae model's rate (and the rate before a discount) now comes from its list entry's display_contact_config: consumption_rate when enabled, the member discount's consumption_rate when that discount is enabled, and an off-peak activity's after/before price by its time_windows in its own time zone, computed when the list is read. A field that throws (an unknown time_zone) costs that model its rate only; the rest of the live list stays. Fixtures are the reporter's literal display_contact_config strings from batch_get_detail_param. Run at the reviewed head f47880ff on mote: - bun test packages/trae: 234 pass, 0 fail. - Broken by hand: making traeRateOf's outer catch rethrow turns "a broken time zone costs that model its rate only, not the list" red (1 fail). - Real samples probed under TZ=UTC and TZ=America/Los_Angeles: deepseek 0.06/was 0.12 at 08:59, 12:30, 18:00 weekdays and all weekend (Asia/Shanghai), 0.12 at 09:00 and 14:00; glm-5.3 0.58/was 0.78; a Bogus/Zone entry gives 0.12; missing, bad JSON, null and arrays give nothing. Not tried: a real Trae account through magpie. The rate is computed when the host reads the list, so it can lag a window edge until the next read. |
||
|
|
270b228a96 |
agent-console 1.2.0: Preview tab, chat links, file chips, font size/width settings, live magpie theme (#582)
agent-console 1.2.0 by qingnian108 (#582): Preview tab, chat links, file chips, font size/width settings, live magpie theme. Reviewed and run at c459773107caa20f7063d12b2133c230f91c066c (mote, macOS, Node 22, sandbox HOME): - npm ci --workspaces=false; npm run check ok; npm test: 48 files, 339 passed, 17 skipped; npm run verify:build 5/5 OK; bun scripts/check.mjs agent-console ok. - Only test/v1/ws.test.ts changed since the last reviewed head 66d1070 (the new "preview.open returns host from previewHost()" test, through registerMethods). - Broke by hand: methods.ts `return { ...r, host: previewHost() }` -> `return r;` turns that test red (1 of 5); restored, green. Changing previewHost's body alone stays green, as the test compares to previewHost(); fix582.test.ts covers its values. - Earlier reviews' findings (per-listener key host, nonce/canary, gateway port + identity check, mentions path, Darwin major from the daemon) were checked in the earlier rounds. The proxy listens on 127.0.0.1 only and answers only the keyed Host. - Not run: preview-attack.mjs browser half at this head, Windows box. |
||
|
|
5f78bb0089 |
codearts 0.3.5: OfficeAce models carry their cost coefficient as rate (#689)
OfficeAce models carry the billable list's cost_coefficient as `rate` (only when it is a finite number; the static signed-out table has none and stays without). package.json 0.3.4 -> 0.3.5. Reviewed head 171e93c6. Read every changed line. The rates table is the existing /v1/model-token-rates read (fixture has the vendor's trailing-newline model_name); a missing or non-numeric coefficient was never in the table, so such a model gets no rate rather than 0. No conflict with #677 (names untouched; -0930 and -1017 stay separate ids with separate rates). Run on mote: bun test packages/codearts 169 pass / 0 fail; bun scripts/check.mjs codearts and registry ok. Broke it by hand (dropped the rate spread in officeAceLiveModels): the models-are-the-billable-list test went red, 168 pass / 1 fail. Not tried: a real OfficeAce account. Note: a coefficient of "" or false would read as 0 in the existing table parse (not changed here). |
||
|
|
0ca5ef59aa |
sensenova 0.1.3: the grants' expiry back beside the figure
sensenova 0.1.3: the grants' expiry goes back beside the figure ("175,089.31 积分 · 11-04 到期", full date once the year differs, UTC). `until`/`renew` are no longer sent, so the card head's plan-term slot is the plan's alone again (#695 had put the credits' expiry there). The PR's zen-free 0.1.24 -> 0.1.25 bump is already on main, so it merges to nothing.
Run at reviewed head 952dd27: `bun test packages/sensenova` (46 pass) and `bun scripts/check.mjs sensenova` / `zen-free` on mote via mote-run; CI test + on-npm green. Broke it by hand (dropped the date from the balance string): the 3 grant tests went red. Not tried: against a real SenseNova account.
|
||
|
|
f7e87877e0 |
qoder 0.2.61: publishes 1a99e2c's business.model_key (#692, #638)
0.2.60 went to npm from |
||
|
|
1a99e2c48b |
qoder 0.2.60: the business record names the model (plugins#692, #638)
Qoder and Qoder CN booked every call as Auto whatever model_config named (chansee97, #692; square-235 on #638 after 0.2.54's model_config change did not help). The reference PR shuishuipingan/qoder2api-hub#119 says the official CLI's business block carries model_key. Checked in the client itself: @qoder-ai/qodercli 1.1.82 (npm pack, read only) builds the record in qoder-worker-runtime (v3 -> snn, then {..., model_key: <chosen model>}) and keeps it for the prompt. Qoder.app 0.4.3 and QwenWorkCN.app 1.0.46 on this Mac build theirs without it, so QwenWork's site says businessModelKey: false and is unchanged. qoderBody now adds business.model_key = the call's model key for qoder and qoder-cn. Run (mote): bun test packages/qoder, 388 pass. With the old index.mjs put back, the 6 new tests fail (business.model_key missing). bun scripts/check.mjs qoder. Not tried: a real Qoder or Qoder CN account, so the billing change is not confirmed; the attribution claim rests on the client's code and the PR's capture. |
||
|
|
c1a625d0d5 |
qoder 0.2.60: a 429 with no quota in it shows Qoder's status, code and own reply (QwenWork flash through dsh: "All models failed")
sherlock (Discord): the same QwenWork account works in ZCode, and dsh's auto-review failed with "QwenWork: usage limit reached: All models failed". "All models failed" is Qoder's own message: nothing in the plugin or magpie builds it. The plugin only put "usage limit reached:" before it, which hid the status, code and reply it came with. The failure now ends with "(Qoder replied HTTP 429, code N: <reply>)" for a 429 or quota-worded reply with no quota code; quota codes keep their short words. The cause of the 429 itself is NOT found. dsh's reviewer sends a system prompt, one user message, temperature 0, no tools and no max_tokens (read from dsh-experimental-auto-review); the plugin sends no temperature and 32000 max_tokens for it. Nothing in qoderBody differs in a way known to fail. This release makes the next report carry Qoder's reply. Run on mote (bun): packages/qoder bun test 385 pass, 0 fail (raw-429.test.mjs new); bun scripts/check.mjs qoder ok. Broken by hand (old failure()): 2 of the 3 new tests fail. Not tried: a real QwenWork account. |
||
|
|
1865969e1f |
zen-free 0.1.25: ZCode 3.17.2 workflow tool pairs go under other names (#693)
Version bump for #694 (merged). 0.1.24 was never visible on npm (latest 0.1.23). Run: PR tests on mote at the reviewed head, see #694 merge body. |
||
|
|
c108621718 |
sensenova 0.1.2: grant balance as a figure, expiry on until (#695)
Reviewed every line at d87f250899fc69bd1dd5d44eecfb3101d265eac2.
Grant balance becomes "12,733.76 积分" (en-US separators, max 2 decimals, same as app.js countFormat), the expiry goes to until (RFC3339) with renew "off", which planTerm renders as "Expires {date}" localized (i18n has it in zh/ja). Several pools add; earliest expiry wins. No grant (0 or absent) returns windows only, no balance/until. quotaOfPlugin parses Until/Renew as RFC3339 and the plan head shows when plan or until is set.
Run on mote at that head: bun test packages/sensenova: 45 pass, 0 fail (3 usage tests cover single, summed, no-expiry; the existing no-grant test covers none).
Not tried: a real SenseNova account with several granted pools; whether grant_balance is per pool (summed) or account-wide repeated per pool is taken from the PR (testdata has only "0" grants). Package is served from the dist branch (not on npm yet), version is already 0.1.2.
|
||
|
|
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). |
||
|
|
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. |