Commit Graph
618 Commits
Author SHA1 Message Date
yetone acb85ed880 autoclaw 0.2.13: Hermes Agent's identity lines are rewritten, not a 406
01huadalang (Discord #feedback, 10-30) runs Hermes Agent 0.22.1 through
magpie on AutoClaw 国内 (autoclaw-cn), and every chat came back
"406 Not Acceptable" with REFUSED_HINT: FLAGGED had no entry for Hermes.

Hermes opens every chat with its SOUL.md. Its seeded text (DEFAULT_SOUL_MD
in hermes_cli/default_soul.py, the same as DEFAULT_AGENT_IDENTITY in
agent/prompt_builder.py, read at tags v0.22.1 and v0.22.5) starts "You are
Hermes Agent, built by Nous Research.", and HERMES_AGENT_HELP_GUIDANCE adds
"You run on Hermes Agent (by Nous Research)". The run the gateway matches
wasn't probed (no AutoClaw account here), so both are broken, the way
"DeepSeek Harness" is:
- "You are Hermes" / "You are Hermes Agent" -> "You are the agent Hermes"
- "Hermes Agent" elsewhere -> "Hermes-Agent"
"Nous Research" is left as written: nothing shows the gateway matches it.

The class: agents magpie connects whose opening line names them as
"You are <name>", read from their own source, get an entry too, though
none has been seen refused: Gemini CLI (packages/core/src/prompts/
snippets.ts @2245ebd), the Python kimi-cli ("You are Kimi Code CLI",
agents/default/system.md @9ab1286) and goose ("You are goose",
prompts/tiny_model_system.md @361003e; its main "an AI agent called
goose" is left alone). Not covered, source closed or not read: Grok
Build, the new Kimi Code, Droid, Qoder, Copilot and the other agents in
magpie's internal/agent. REFUSED_HINT names Hermes Agent only, the one
seen refused.

As before: system and developer messages only, fixed strings so a cached
prefix stays put, both channels.

Run (mote, HOME in the run's folder): bun test packages/autoclaw: 48 pass,
0 fail; bun scripts/check.mjs autoclaw: ok.
Broken by hand: HEAD's index.mjs with the new tests: both new tests red;
the "Hermes Agent" entry alone removed: both red.
Not tried: a real AutoClaw request (no AutoClaw account here), so the
rewritten line is not yet confirmed a 200 on the gateway.
2026-10-30 02:38:29 +08:00
Magiczerowxy db0a9cdafd page-chat 0.1.3: smoother streaming, rename, width sync, English effort names (#498)
page-chat 0.1.3 (Magiczerowxy): streaming renders the settled blocks once and only the tail per frame; conversations can be renamed (PATCH /api/conversations/:id, title only, token-guarded); a Sync switch keeps the conversation and composer widths equal (composerWidth floor 35); effort names in English with xhigh; a draft row for a new conversation; a status line under each reply. An empty configDir now reads the library from the real config folder.

Reviewed at 7c0f68df74bef05ece6f037d574f0c50688c2bb8 (third round; the two earlier reviews' points were checked at this head).

Run on mote (macOS, Bun 1.4.2, Node 22, Playwright 1.62.0), sandbox HOME:
- packages/chat: bun test, 20 pass / 0 fail.
- Whole repo at the PR head: bun test 3284 pass / 8 skip / 0 fail; bun scripts/check.mjs ok.
- Whole repo at the PR head merged with origin/main fdc5002: bun test 3655 pass / 8 skip / 0 fail; bun scripts/check.mjs ok.
- Playwright probe, Chromium and WebKit, against lib/server.mjs with a fake gateway: a reply whose whole SSE arrives in one write, and one paced 30ms apart, both show "Hello there. / Second para." after the stream ends.

Broken by hand:
- finish()'s fallback put back to the old `.md-stable` check: the one-write reply shows "" in both engines (paced still fine).
- server.mjs `const dir = dirArg;` again: "an empty configDir reads the library from the real config folder" goes red (19 pass / 1 fail).

Earlier rounds (4d36cae, both engines): renaming the open conversation survives the next message; a token change reloads the page once; README edited on the original; LF line endings.

Not tried: inside the real magpie window (the probe loads the page from the package's own server).
2026-10-30 01:43:05 +08:00
Changtian Li 280d522830 kimi-work 0.1.15: renew membership tokens and keep existing accounts (#218)
Explicit sign-in now imports Kimi desktop's membership access/refresh pair
when the desktop has one, and magpie renews it through the host's
auth.refresh (conditional commit under the auth-store lock). Accounts saved
through 0.1.14 (reference-only, no pair) keep reading the desktop's web
token for usage, with no reconnect, no import and no refresh spent. The
usage card is one monthly meter, with Code's share as text. Request-body
reads follow the caller's abort signal.

Kept from main (0.1.11 to 0.1.14): callback errors split into no session /
Work 401 / HTTP-timeout-network (#425), per-uid account ids
`Kimi Work · <uid6>` (#440), share-folder-missing as kept (#444),
spent-quota 403 -> 429 (#465).

Reviewed head 96f7f52501082e4747ef649d836d955a8ece3f4c, merged onto
origin/main fdc5002 locally (clean), run on mote (macOS, Bun 1.4.2) with
HOME=$(mktemp -d):
- bun test packages/kimi-work: 99 pass, 0 fail
- bun test (whole repo): 3681 pass, 8 skip, 0 fail
- bun scripts/check.mjs: all packages pass

Broken by hand, each red in packages/kimi-work:
- legacy (no pair) usage throws expired: 7 fail
- callback 401 folded into the generic error: 3 fail
- callback network error folded into "no session": 3 fail
- accountId back to 'Kimi Work (local)': 2 fail
- AuthService 401 marked signIn expired: 2 fail
- refresh hook returning a pair for a legacy account: 2 fail

Version 0.1.15: main has 0.1.14; npm has no kimi-work package (served
from dist, highest 0.1.14), so 0.1.15 is free.

Not tried: a live Kimi sign-in or renewal at this head. The author's
live coexistence evidence is one cycle on 2026-10-24 at f67d742
(COMPATIBILITY.md). The rewritten COMPATIBILITY.md replaces main's 0.1.4
macOS record; that record stays in git history at fdc5002.
2026-10-30 01:34:05 +08:00
狂気のMad Scientist鳳凰院胸針 fdc5002319 orcaterm 0.1.0: Tencent Cloud OrcaTerm's assistant as a provider, with WeChat QR sign-in (#460)
New package @magpie-community/opencode-orcaterm-auth 0.1.0: Tencent Cloud
OrcaTerm's own AI assistant (its monthly question allowance) as provider
`orcaterm`, with WeChat QR sign-in (the same sign-in OrcaTerm's clients
use) or a pasted console cookie. Credentials go only to Tencent's hosts
(orcaterm.com, *.cloud.tencent.com) and WeChat's widget (open.weixin.qq.com,
res.wx.qq.com). The nine models OrcaTerm's picker offers are listed;
others resolve only as aliases. Per-account pacing at 10 chats/min,
maxConcurrency 1; a JSON or SSE refusal inside a 200 becomes 429/401/502.
registry.json gains its entry.

Author: hg1048596-pixel (#460, replaces #422)

The last review's three points are fixed at this head: the index.mjs
header, toUpstreamBody and plugin-entry comments describe the code; the
README's License links the package's own LICENSE; /cb accepts a bridge
error without a code and shows it, and a later scan still finishes.

Run at a75a2ae0fb554b3cb6ae879d5571b5dd7b2300a7 on mote (macOS, Bun 1.4.2),
HOME=$(mktemp -d) as CI:
- bun test packages/orcaterm: 88 pass, 0 fail
- bun test (whole repo): 3624 pass, 8 skip, 0 fail
- bun scripts/check.mjs: every package ok, orcaterm included
- npm pack: 5 files (index.mjs, wechat.mjs, README.md, LICENSE,
  package.json); the extracted index.mjs imports with bun and its plugin
  returns provider orcaterm; node scripts/dist.mjs packs
  opencode-orcaterm-auth@0.1.0
- The earlier review's fake-upstream script against the packed package:
  27 of 27 (JSON 429 with and without rate-limit words, SSE quota, rate
  and sign-in errors, envelopes in stream and JSON mode, per-account
  pacing, bearer headers, nine listed models, credentials only to
  lightai.cloud.tencent.com)
- The /cb script against the packed wechat.mjs: foreign, missing and
  rebinding origins 403, wrong state refused, right origin and state
  finish the sign-in
Broken by hand: requiring a string code again turns "callback preserves
bridge errors without a code" red (87 pass, 1 fail).
Not tried: a real OrcaTerm account, so neither the QR sign-in nor the real
upstream.
2026-10-30 00:44:34 +08:00
SemonCat ecc4df3076 kiro 0.1.20: accept object tool schemas and run native web search (#492)
Kiro answers 400 REQUEST_BODY_INVALID to a tool schema whose root has
properties and no type, or is {}: the root is now sent as type "object"
(copied; nothing under it changed, another explicit root type left alone).

Anthropic's hosted web search (web_search_20250305) is searched with Kiro's
own web_search, sent as kiro-cli 2.35 sends it: InvokeMCP at the runtime's
root (AWS JSON 1.0, x-amz-target AmazonCodeWhispererStreamingService.InvokeMCP),
a JSON-RPC tools/call with {query} only, the profile ARN in the body and in
x-amzn-kiro-profile-arn. The model is offered kiro-cli's own web_search spec
(with __tool_use_purpose, which is stripped before the caller sees it and
never searched). At most 10 searches per request (max_uses honoured), a
turn cap of uses+2 (pause_turn), 30s timeout and a 1 MiB cap per search.
The config hook says searches: true, which the user's own setting overrides.
Other web_search versions are a 400 that names provider.kiro.searches: false.
kiro 0.1.19 -> 0.1.20.

Author: SemonCat (#492)

Run at 993f9bae5628cd3d525a838bdc0319cc58968c03 on mote (macOS, Bun 1.4.2),
HOME=$(mktemp -d) as CI:
- bun test packages/kiro: 94 pass, 0 fail
- bun test (whole repo): 3563 pass, 8 skip, 0 fail
- bun scripts/check.mjs: every package ok, kiro included
- npm pack --dry-run in packages/kiro: 0.1.20, 3 files; node scripts/dist.mjs
  into a scratch folder packs opencode-kiro-auth@0.1.20
Broken by hand, each red in packages/kiro: schema root sent raw (5 fail),
profileArn left out of the search body (1), the 10-search cap removed (1),
__tool_use_purpose kept in the caller's input (1).
Checked against kiro-cli 2.35.0's binary: the web_search description, the
query's description and maxLength, the __tool_use_purpose text and the
InvokeMCP target/content type are its strings; the fixture's result fields
(title, url, snippet, publishedDate, domain, id, maxVerbatimWordLimit,
publicDomain) are the output its tool spec documents.
The search goes to the same runtime.<region>.kiro.dev host as inference.
Not tried here: a live search (the author's record has one OAuth account,
Haiku 5.5, us-east-1); an API-key search live.
2026-10-30 00:42:03 +08:00
yetone 3b3209e0dd zcode 0.1.34: a gift plan that starts later is named with its start, and gift buckets beside a Coding Plan carry their plan's name
windy (Discord): "添加zcode供应商的时候,好像无法区分Coding Plan 和Start Plan的额度?
例如今天23点要生效的Start Plan就没显示".

- A plan on /billing/balance whose starts_at is still to come serves
  nothing yet: startPlan no longer routes to it (an "active" plan with a
  future start would have been), and its buckets don't count. The card
  names it in an aside line "ZCode gift plan not started yet", display
  "<plan> · <start in local time>", soonest first.
- A coding account with a ZCode session reads the gift on every card
  read, not only while a gift is live, so a coming plan shows beside the
  Coding Plan. The route cache is read again when the coming plan starts.
- A gift-only account whose only plan starts later gets a card with that
  line instead of "ended or never started".
- Beside a Coding Plan, every gift bucket is prefixed with its plan's
  name ("Start Plan · GLM-5.1-Trial"), one plan or several.

Not known: which status ZCode gives a plan that hasn't started. The
fixtures use starts_at as the real balance/preview replies carry it
(Unix seconds) and try both "active" and an unknown status word; any
status but "expired" with a future starts_at is taken as coming. No
real account with a pending plan was read.

Run on mote: HOME=$(mktemp -d) bun test in packages/zcode, 142 pass
0 fail; pending.test.mjs under TZ=UTC, Pacific/Kiritimati and
America/Los_Angeles, 7 pass each; bun scripts/check.mjs, every package
ok. Broken by hand: with the old index.mjs, 6 of pending.test.mjs's 7
tests fail (the 7th, a plan whose start has come, passes on both).
2026-10-29 22:31:07 +08:00
Fantasy 01f6c09100 goanyapi: GoAnyAPI tools plugin, dynamic MCP catalog (#472)
Adds the GoAnyAPI tools plugin: its live MCP catalog (35 tools plus catalog and call_dynamic) behind OAuth or an API key.

Reviewed at 02f69af53. Maintainer fixes in 19808db: offline loading, a cached failed read, isError propagation, one User-Agent.
Run at this head: bun scripts/check.mjs ok; packages/goanyapi bun test 8 pass.
The author ran a real sign-in through magpie on macOS: an OAuth sign-in, a tool call from Codex, a refresh after expiry, and an error path.
2026-10-29 21:59:03 +08:00
Euraxluo 3f73907aac workbuddy 0.2.0: WorkBuddy (China) daily check-in through the billing meter (#177)
WorkBuddy (China) claims its daily check-in credits through the billing meter's /v2 activity status and daily-checkin. Outcomes are done, ineligible, inactive, claimed and failed, all of which magpie's host accepts. A request that gets no answer is thrown, for magpie's 1-minute backoff. The AI build has no hook.

The review merged main (0.1.48) in, resolving the conflicts in meter, the hook list, _internal and README. It also made an API-key account ineligible without sending a request, and set the version to 0.2.0.

Run at d66f51c on mote, with a temp HOME:
- bun test packages/workbuddy: 253 pass, 0 fail
- the whole repo: 3521 pass, 0 fail (3529 tests)
- bun scripts/check.mjs workbuddy: ok

Broken by hand, each red:
- dropping the API-key line: its new test
- the hook on the AI build: "WorkBuddy AI's plugin has no check-in"
- an unreadable 200 not thrown: the usage test and the check-in test

Not covered: main's own invalidToken flag on a refused meter reply has no test that fails without it. That gap is on main and was kept as it is.
2026-10-29 21:46:35 +08:00
kupakupa 676198bbb9 kimi-desktop 0.1.5: Retry-After is kept, and an owner record is never left half-written (#225)
Kimi Work's 429/503 through the desktop adapter now keep the upstream
Retry-After (seconds and HTTP-date); no other upstream header is copied.
The adapter's owner record is written whole to a temp file and published with
an exclusive hard link, so a crash mid-write can no longer leave an empty
adapter-owner.json that blocks every later host. A malformed record reports
adapter_lock_invalid (and an access failure adapter_lock_unavailable) in
status.json and the log, instead of failing silently; the README says how to
recover.

Review merge: main (kimi-desktop 0.1.4) merged in, package.json the only
conflict, version 0.1.5.

Run at 3f65c63 (HOME=$(mktemp -d)):
- mote: bun test packages/kimi-desktop 36 pass, 0 fail.
- Windows (xiaomi-gpu, win-run): 36 pass, 0 fail (hard links on NTFS).
- Broken by hand, each reverted: Retry-After not forwarded -> its test red;
  the owner record written in place instead of linked -> 3 lock tests red;
  a malformed record silently returning false -> the malformed-record test red.
Not tried with the real Kimi desktop app.
2026-10-29 21:40:46 +08:00
keeuuandkeeuu f0ed150573 workbuddy 0.1.48: WorkBuddy AI's card shows the free model's daily token window (#299)
WorkBuddy AI's free model (deepseek-v4.1-flash) has a daily token window of
its own (about 1e8 tokens per account per 24h) that the credit meter doesn't
show. The plugin rebuilds it from magpie's usage.jsonl and adds it to the
card as "Free model tokens" beside Credits. WorkBuddy AI only; the China build
is unchanged.

Review merge: main (0.1.47) merged into the branch, conflicts in index.mjs
(imports, _internal) and package.json resolved, version 0.1.48. Added a test
that the window reaches the WorkBuddy AI card from a ledger in the sandbox
HOME, and that the China build's card has none.

Run at 09718f5 on mote (HOME=$(mktemp -d)):
- bun test packages/workbuddy: 237 pass, 0 fail (before the new test).
- bun test (whole repo): 3499 pass, 0 fail; bun scripts/check.mjs: ok.
- Broken by hand, each reverted: the card no longer pushing the window ->
  the new usage test red; an unreadable row time ending the read ->
  "a row whose time cannot be read is passed over" red.
Not tried against the live service (no WorkBuddy AI free account).

Co-authored-by: keeuu <keeuu@users.noreply.github.com>
2026-10-29 21:39:45 +08:00
MYCF711 421cad6b25 qoder 0.2.50: a phone account's card shows its phone, not its uuid (#487)
A Qoder CN / QwenWork phone account's card shows its masked phone
(phoneLabel / cardName, usage's `user`), a real email first, instead of its
uuid; accountId stays exactly what main computes. A renewal reads the name
outside the plugin-wide lock from the account's own site (a VPC token never
goes to the public hosts) and renames nothing. Rebased on a06512e, keeping
3c279f6's listing-renew change.

Reviewed at 6e39e8c (round 5). Run on mote (macOS, Bun 1.4.2) in a sandbox
HOME, at that head:
- bun test packages/qoder: 335 pass / 0 fail (listing-renew.test.mjs 5/0)
- bun scripts/check.mjs qoder: ok
Broken by hand: the device sign-in's cardName `realEmailOf(email) || label`
-> `label` (index.mjs:411) turns "qoder-cn: a device sign-in with an email
and a phone shows the email" red (334/1). Earlier rounds' breaks (renewal
cardName, own site, usage `who`) were red too.
CI (test, on-npm) green at 6e39e8c. Version 0.2.49 -> 0.2.50.
Not tried: a real Qoder CN or QwenWork phone account.
2026-10-29 21:35:38 +08:00
MYCF711 04b4438955 raccoon 0.1.5: the card names the account by its phone, not by Raccoon-pu-<uuid> (#486)
The card names a Raccoon account by its masked phone (cardName), read from
user_info, instead of Raccoon-pu-<uuid>; accountId stays the identity, and a
desktop seat is named by its phone too. A renewal never changes accountId, and
a desktop seat's refresh still gives nothing, as on main.

Reviewed at ac0d84e (round 4). Run on mote (macOS, Bun 1.4.2) in a sandbox
HOME, at that head:
- bun test packages/raccoon: 43 pass / 0 fail
- bun scripts/check.mjs raccoon: ok
Broken by hand: dropping `|| auth.source === "desktop"` from refresh's guard
(index.mjs:1047) turns "a desktop seat's refresh gives nothing, even when
user_info answers a phone" red (42/1), now that its record carries
refresh: "D1". Earlier rounds' breaks (usage's cardName, 0.1.4 record) were
red too.
CI (test, on-npm) green at ac0d84e. Version 0.1.4 -> 0.1.5.
Not changed: a test for the desktop seat picking up a new phone when the
app's token changes (index.mjs:337), optional in the review.
Not tried: a real Raccoon account.
2026-10-29 21:35:33 +08:00
MYCF711 b850c9da3d codearts 0.2.5: the card names the account by its phone, not by IAM's URN (#483)
The card names a CodeArts account by its masked phone (138****8000), read
from IAM once per account (6h cache), while accountId stays the IAM URN, the
account's identity. A renewal keeps the phone, reads it once for an account
signed in before 0.2.5, never renames a named account, and gives an account
stored without an accountId the URN.

Reviewed at fa5aaae (round 4). Run on mote (macOS, Node 22, Bun 1.4.2) in a
sandbox HOME, at that head:
- node --test packages/codearts/index.test.mjs: 125 pass / 0 fail
- bun test packages/codearts/index.test.mjs: 125 pass / 0 fail
- bun scripts/check.mjs codearts: ok
Broken by hand, each red at the test it should hit:
- sign-in accountId: identity.id -> identity.name (index.mjs:2746): "a
  sign-in names the account by its URN while the card shows the phone" red
  (124/1).
- refresh reads no phone (identified = next): "auth.refresh keeps a named
  account's identity ..." red (124/1).
CI (test, on-npm) green at fa5aaae. Version 0.2.4 -> 0.2.5.
Not tried: a real Huawei Cloud account.
2026-10-29 21:35:28 +08:00
Tsukikage 1e4c8a2b91 powercontext 0.2.0: PowerContext recall and opt-in capture as a gateway hook (#117)
PowerContext as a gateway hook package (@magpie-community/gateway-powercontext 0.2.0): recall from a user-deployed PowerContext service before a request, and opt-in capture of completed conversations, with a connection page that uses only the options/theme bridge. By @Tsukikage7.

Reviewed at c61036e9 (author) plus bff430f9 (maintainer merge of main: README, registry.json and scripts/check.mjs conflicts, both sides kept; check.mjs takes main's identical hooks skip).
All four points of the 10-25 review are fixed: the timing tests give the healthy side 1000 ms and move the backoff with a stubbed Date.now(); the empty page panels are gone; Scope ID is optional on the page as in the hook; both READMEs describe the npm install and the registry lists it.

Run on mote (macOS, Bun 1.4.2, temp HOME) at bff430f9:
- bun scripts/check.mjs: exit 0. Full bun test: 3423 pass, 8 skip, 0 fail.
- packages/powercontext: 107 pass, 5 runs in a row, then 8 runs in parallel, 0 fail each.
- Broken by hand: putting the Scope-required check back in page/settings.js turns the optional-Scope page test red; making the recall backoff expire at once (powercontext.hooks.mjs:336) turns 4 tests red (hung scope/prepare/body and connection-failure backoff).
- Earlier round (10-25): the real package in magpie's Bun host behind the gateway handler, against fake PowerContext and upstream.
Not tried: the page in a browser at this head (the author reports 40 Chromium/WebKit cases), a real PowerContext server.
2026-10-29 21:13:37 +08:00
Zhougeng Xu cbfa465ab6 registry: list WispTerm, Wisp Science and CiteBox agent plugins (#479)
Lists three third-party agent plugins (@hoptoper/magpie-agent-wispterm, -wisp-science, -citebox, all 0.1.0) in registry.json as kind "agent", without the community flag. registry.json only; no package code in this repo.

Reviewed at b3896e09f against the four points of the 10-29 05:45 review:
1. npm (`npm view --prefer-online`, and registry.npmjs.org directly): each package's `latest` and `alpha` are 0.1.0. The tarballs from registry.npmjs.org hash to the listed sha512 integrity. Each holds only agent.js, package.json, README.md and LICENSE: no scripts, no dependencies, no main, no files written on load.
2. The readers are in released tags: wispterm v1.46.1 src/assistant/profile/magpie.zig, wisp-science v1.23.0 crates/wisp-llm/src/magpie.rs and src-tauri/src/magpie.rs, citebox v0.38.0 internal/magpie/magpie.go. Each release is published, not a prerelease, with desktop assets.
3. setup.mjs and the dir declaration are gone; detection is `bin` or the config file.
4. `latest` is 0.1.0, not a prerelease.

Run (on mote):
- Merged onto main a06512e: `bun scripts/check.mjs` ok; `HOME=$(mktemp -d) bun test`: 3280 pass, 0 fail (main alone: 3280 pass, 0 fail).
- Released magpie v0.1.2061 CLI (SHA256SUMS checked), sandbox HOME: `magpie plugin add` for all three created no ~/.config/<id> folder; `magpie agents` showed all three "not detected"; with a fake `wispterm` on PATH only WispTerm was detected. With a custom provider, `magpie wispterm magpie/fakev/fake-model` wrote baseURL, apiKey and model into an existing magpie.json and kept its other keys; `magpie wispterm default` put back the original file. CiteBox with no bin and no file: connect wrote the file, `magpie agents` then listed it connected, and default left `{}`.

Not tried: the three real apps reading the file (the author reports a real-Mac run with the effort reaching the gateway).
2026-10-29 21:13:04 +08:00
lin2670 eeb344f174 catpaw: add the Meituan CatPaw plugin (#174)
Adds packages/catpaw (Meituan CatPaw): sign-in, paste-token sign-in, models, chat and usage. Hosts: ai.catpaw.meituan.com and catx.nocode.cn only; no dependencies or scripts; captures redacted.

Answers the 10-17 review: the request body's source/mode is CatPawCLI/CLI, matching the captured CLI round (testdata/captured-round.json, captured-turn.json) and enforced by the fake; the non-stream usage block that wasn't in the capture is gone; a no-credit error keeps the sign-in; the paste method returns a callback as the host calls it.

Run at 475979a (PR head 71f36ce with origin/main merged, loomy #175 included; registry.json conflict resolved keeping both entries), on mote with a sandbox HOME:
- bun test packages/catpaw: 24 pass, 0 fail
- bun scripts/check.mjs: exit 0 (catpaw ✓); bun test scripts: 3 pass, 0 fail
- Broken by hand, then restored: identity reverted to CatX/CATX_APP (8 fail), paste callback reverted (1 fail). The no-credit signIn:"kept" has no test (removing it stays green).

Not tried: a real CatPaw account. Not on npm yet: served from the dist branch until the first version is published by hand.
2026-10-29 21:12:00 +08:00
lin2670 6a9c528a5c loomy: add the iFlytek Loomy plugin (#175)
Adds packages/loomy (iFlytek Loomy): SMS sign-in, paste-a-session sign-in, models, chat, daily wallet usage and check-in. Hosts: account.xfinfr.com and loomyad.xunfei.cn only; no dependencies or scripts.

Answers the 10-17 review: the paste method now returns { url, instructions, method, callback } as internal/plugin/host.js calls it; the limit/remaining pair alone renders the daily wallet; a failed pre-check-in read reports failed instead of refreshing.

Run at fd963f1 (PR head 836ed7b with origin/main merged; registry.json conflict resolved keeping both entries), on mote with a sandbox HOME:
- bun test packages/loomy: 18 pass, 0 fail
- bun scripts/check.mjs: exit 0 (loomy ✓); bun test scripts: 3 pass, 0 fail
- Broken by hand, each red then restored: paste callback reverted (1 fail), pairPresent removed (1 fail), pre-read failure reverted (1 fail)

Not tried: a real Loomy account. Not on npm yet: served from the dist branch until the first version is published by hand.
2026-10-29 21:11:14 +08:00
William WANG b83e3dee36 factory 0.1.41: ZCode's environment paragraph reaches Factory as runtime context, not refused (#211, William-AIdev)
ZCode embeds its generated environment paragraph, with unindented bullets, inside a larger system prompt. No runtime-context adapter matched it, so "You have been invoked in the following environment:" and "You are powered by the model named" reached Factory unchanged in the system prompt (403). This renames a complete standalone paragraph in system prompts, later system messages and Gemini's system instruction, keeping every value. Also releases factory 0.1.41, which carries #213.

Reviewed at d4ef7d4e; the maintainer commits on top (eb016a4d) merge main b76a577, keep main's Gemini escape test beside this one, expect main's #258 escape in the Gemini user part, add a fenced-paragraph case and bump to 0.1.41.
- On main b76a577, a probe through _internal.droidBody still sends the paragraph unchanged on Responses and Messages; the PR's new tests fail there.
- At eb016a4d: `bun test` in packages/factory (sandbox HOME, on mote): 189 pass, 0 fail. `bun scripts/check.mjs factory`: ok.
- Broken by hand: zcodeRuntimeContext returning its input turns 5 tests red (Responses, Chat, Messages, Gemini, no-Shell). Dropping the insideFence check passed every original test (the fenced inputs never matched); the added fenced case goes red with it, green with it back.
- Not tried: a live Factory account (the PR body records the 403 on all four routes).
2026-10-29 21:09:00 +08:00
William WANG b76a577567 factory: ZCode's restored-read reminder reaches Factory renamed, not refused (#213, William-AIdev)
Factory refuses the fixed "Called the Read tool with the following input:" opening. ZCode restores a pre-compaction read as one reminder carrying the arguments and the file's text, a shape no adapter matched, so it reached Factory unchanged (403). This renames that opening, as COMPACT_READ already does for Claude Code's arguments-only reminder, and adapts the file text as a read result.

Reviewed at d2d81da0, merged onto main a06512e (clean):
- On main a06512e (factory 0.1.40), a probe through _internal.droidBody still sends the restored reminder with the phrase unchanged; the PR's 5 new tests are 3 fail / 2 pass there.
- With the PR: `bun test` in packages/factory (sandbox HOME, on mote): 183 pass, 0 fail. `bun scripts/check.mjs factory`: ok.
- Broken by hand: dropping the restoredReadText call turns 3 of the 5 new tests red; keeping the file text raw (no quotedToolText) turns the encoding test red.
- Not tried: a live Factory account (the PR body records 403 -> 200 on Messages and Responses).

The version bump (factory 0.1.41) follows on main.
2026-10-29 21:07:24 +08:00
mola 443c808517 layerfs 0.10.0: the page's live channel returns, out of the install's own folder (#441)
LayerFS's trajectory page is served by a loopback service the host starts once a store exists (no write into the install), keeps its view in location.hash across its 5 s reload, reports every skipped secret-shaped file in sorted order (#477), and drops the unloaded sample. By @Mola-maker.

Run at dfa99f7e merged onto current main:
- mote (macOS, Bun 1.4.2, temp HOME): bun test in packages/layerfs, 64 pass 0 fail, 2 of 2; bun scripts/check.mjs layerfs ok; the temp HOME held nothing from layerfs afterwards.
- WSL2 Ubuntu 24.04 (temp HOME): 64 pass 0 fail, 2 of 2 (#477's item 3 was red here on f3633eaf8).
- Broken by hand: dropping the `location.hash =` assignment in page/app.js turns the hash test red. Earlier rounds' breaks (Origin/Host checks, < escape, start gates, nosniff, sort, restore/settle/round, reload guard) each went red, see the 05:18 and 05:45 reviews.
- Earlier round: the page in a magpie-shaped sandboxed frame with pagePolicy CSP, Chromium and WebKit.
- PR checks: test and on-npm pass.
Not tried: a real magpie window.
2026-10-29 21:07:14 +08:00
yetone a06512e0b9 registry: ComfyUI's market name reads in every language
#497 named the entry "ComfyUI 本地模型桥接", which English and Japanese
users would see as is; the summary already says what it is in en and zh.
Other entries use the product's own name (Search1API, Calc), so this one
is "ComfyUI". registry.json parses (python json.load).
2026-10-29 20:41:13 +08:00
Zebro 3104d00c39 registry: add ComfyUI local model bridge (magpie-comfyui-link) (#497)
Lists magpie-comfyui-link (npm, 321sssrt-bit/magpie-comfyui) as a tools
plugin: resources/submit/history/view against ComfyUI servers the user
configures, with a settings panel. Only registry.json changes.

Reviewed at ad2f51b. What was run:
- npm tarball 0.2.0 read whole (index.js, ui/settings.*, READMEs,
  package.json); its sha512 matches registry.npmjs.org, and every file
  is byte-identical to the source repo at f60e3f4. No install script, no
  dependencies, no address but the user's own ComfyUI servers and
  example.com placeholders; the token comes from an env var the user
  names, sent only to that connection.
- Source repo's `node --test index.test.js ui/settings.test.js` on mote:
  3 pass, 0 fail (fetch is mocked, no network).
- scripts/check.mjs over the package on mote: ok (tool shape magpie's
  host takes).
- A fake ComfyUI on 127.0.0.1 driven through the plugin's tools:
  connections, models, models/checkpoints, object_info, submit, history,
  view (PNG back byte-exact), Bearer + Comfy-User headers on every call;
  "../x" ids, an unknown connection, an ftp:// server and a bad graph
  each refused; a 404 surfaces as "ComfyUI HTTP 404".
- registry.json parses, 52 entries, no duplicate package.

Not tried: a real ComfyUI server, or installing through magpie's plugin
host. Later versions are published from the author's repo and are not
reviewed here (as with officeace-auth).
2026-10-29 20:41:03 +08:00
yetone 3c279f66db qoder 0.2.49: a model the listing has off on a stale job token renews it once and reads the list again (#484)
On an enterprise qoder.com account under 0.2.48, 12 of the 14 app models
(ultimate, fast, efficient, smodel, cmodel, qmodel_38max, gmodel,
gfmodel, kmodel_latest, kmodel, dmodel, mmodel) were answered with the
plugin's own 400 "unknown or disabled model" while dfmodel and qfmodel,
the two free ones, were served. That 400 is said from the account's
listing before any chat is sent, so the renewal 0.2.48 gave a refused
chat (#474) never ran for those models.

ask() now does what it does for a refused chat when a model Qoder serves
(the site's shipped list, or any key a listing has named, on or off) is
off or missing in the listing: relogin once (the pair saved since, else
one refresh under the lock, not again within RELOGIN_GAP) and read the
list again before the 400. An id Qoder never served gets the 400 at once
with no renewal.

Not proven: why the reporter's listing had only the free models on. The
listing and lookup code is the same in 0.2.47 and 0.2.48; the fake here
models a job token Qoder no longer honours in full getting the free view.
There is no enterprise account here to reproduce it on.

Run (mote-run, Bun 1.4.2):
- listing-renew.test.mjs against cc3f000c's index.mjs (0.2.48): 3 of 5
  red (the reporter's 14 ids get 400; the renewal isn't said).
- the same file with this change: 5 of 5 pass.
- bun test packages/qoder at this head: 325 pass, 0 fail (320 before,
  lapsed.test.mjs and usage.test.mjs from #474 still green).
- bun scripts/check.mjs qoder: ok.
2026-10-29 20:05:46 +08:00
QingJ 1e04c1d324 agent-office 0.1.0: live agent activity office page (#478)
A new community page plugin by QingJ01: Agent Office, a page in magpie's window that shows each local agent session as a worker in an office (3D/2D) or a list, with status, current step and a resume command.

- Its host part (office.hooks.mjs, an async gateway hook) reads the session files of Claude Code, Codex, dsh, Gemini CLI, Qwen Code, Pi, omp, Qoder, WorkBuddy and CodeBuddy every 1.5 s and writes page/live.js beside the page. It opens no socket and sends nothing off the machine. The page makes no magpie.read calls and loads only its own files.
- Text switch: with text off, the host writes no prompt, reply, error or tool argument (the title falls back to the folder, the step to the tool name), and the page redacts whatever live.js holds.
- Options are read at module load from plugins.json in the host's cwd (magpie's config folder), with the XDG path as a fallback. npm specs are matched with @tag/@version stripped, a path spec by realpath against the package's own folder. It fails closed: text stays off until an install's options or a request's ctx.options turn it on.
- The disclosure (package description, registry summary, root README) says which session files it reads. magpie's install sheet still says "reads nothing" for such a page (yetone/magpie#4187).

Run at the reviewed head e76d1a3, on mote:
- bun test in packages/agent-office: 44 pass, 0 fail.
- The whole repo at origin/main 3462544 merged with e76d1a3: bun test 3275 pass, 8 skip, 0 fail (HOME sandboxed); bun scripts/check.mjs exit 0.
- The new privacy tests run against 9230da7's hooks: 5 of 11 red (@latest, @0.1.0, cwd-only config, no config, unmatched spec).
- e76d1a3's case (cwd plugins.json without this entry, XDG plugins.json with text:true), by hand: text stays off. With d4acdae's hooks: text on and the prompt leaks. No test covers this case. The privacy tests stay green with it reverted.
- Real magpie: main 0745db932, built for macOS with -tags nogui, run as a portable magpie (.portable marker) in a sandbox HOME. The plugin was added from a folder named zz-src, so no name guess can match. A decoy ~/.config/magpie/plugins.json said text:true. The sandbox HOME had a seeded Claude Code session with a secret prompt, reply and Bash argument. magpie web was driven in Playwright Chromium and WebKit (WebKit in zh). With text on, the prompt, reply and command showed. With text off, the page hid them within 0.3 s. live.js went text:false after the host restarted, and over 30 s of sampling no secret was on the page or in live.js. After a reload, the switch was off and nothing leaked. The frame requested only its own files under /_magpie/plugin/<token>/, with no request leaving 127.0.0.1:3592. The plugin host had no sockets (lsof).

Not changed: the XDG fallback can read another magpie's plugins.json, but only when the host's cwd has none. magpie starts the host in its own config folder, which always has one, so a real host never reaches it.
2026-10-29 19:45:44 +08:00
liangmouse 346254444d joycode 0.2.1: drop unstored reasoning ids (#493)
Responses requests with `store` not true have the `id` removed from `reasoning` input items before they go to JoyCode, keeping `summary` and `encrypted_content`; `store: true` and every other item's id are left as sent. JoyCode looked the replayed `rs_…` id up as a stored item and refused Codex's compaction with "Item with id 'rs_…' not found". Codex serializes a reasoning item's id when it has one (codex-rs protocol `ResponseItem::Reasoning`, `id: Option<ResponseItemId>`).

Reviewed at f7627eb8956be934e728bbaa93843b257dd877ed:
- `HOME=$(mktemp -d) bun test packages/joycode` three times on mote: 44 pass, 0 fail each; only loopback fetches (net guard preload).
- `bun scripts/check.mjs`: every package passes.
- Broken by hand: no stripping, stripping with `store: true`, and stripping every item's id each turn one of the two new tests red.
- Not tried: a real JoyCode request (no JoyCode account here); the author's live repro with `rs_18e2e0b7486f2800000002e3` is in the PR. A request without `store` is treated as unstored, as the PR describes.
2026-10-29 18:02:30 +08:00
yetone 060722efcf cursor 0.2.32: a merged (newer) plan's included usage is one Weekly window for every model, no Other Models
majiang_ai on X: Cursor's newer plans have no third-party-model pool,
while magpie's card still showed Cursor Models, Other Models and Total.

What Cursor says: GetPlanInfo answers isMerged true and
planInfo.includedUsagePeriod INCLUDED_USAGE_PERIOD_WEEKLY for such a plan
(enum 1 MONTHLY, 2 WEEKLY, from cursor-agent 2026.10.22's proto), and
GetCurrentPeriodUsage's billing cycle is then the week, with
autoPercentUsed == totalPercentUsed and apiPercentUsed 0. The dashboard's
usage page (cursor.com/v2/usage, chunk read on 10-29) draws one meter,
"Weekly usage limit", from the period's totalPercentUsed.

Now planOf reads isMerged and the period with the plan name (same hourly
cache, last good answer kept). A merged plan's usage is one window,
Weekly (span 7d; Monthly on a monthly merged plan, Included when not
said), with no models list, so it counts every model; On-demand and
Grok Bot as before; no Other Models or Total. A plan GetPlanInfo can't
read, or isMerged false, keeps the two pools.

Run:
- HOME=$(mktemp -d) bun test (whole repo, on mote): 3229 pass, 8 skip, 0 fail
- bun scripts/check.mjs: ok
- Broken by hand: the merged branch turned off, 5 of the 6 new tests red
  (the 6th checks the unmerged case still has the pools).
- Real account (owner's Cursor, a merged Premium plan, keychain token,
  read-only calls): the published 0.2.31 shows Cursor Models 7%, Other
  Models 0%, Total 7%; this change shows Weekly 7% (resets 11-03), Grok
  Bot, On-demand.

Not tried: an old (unmerged) plan's real account; none is at hand, the
unmerged path is unchanged and covered by the existing tests. A merged
monthly plan was not seen for real.
2026-10-29 17:55:11 +08:00
yetone 374b1fe186 factory 0.1.40: a usage policy refusal is a 400 with Factory's code, not a 403 (#494)
sweanng (yetone/magpie, Discord #general, 10-29): ZCode on Factory's GLM
5.3 got Factory's usage policy check refusing the conversation (403,
code content_policy_rejected). The plugin handed it on as a 403
permission_error with code null, so magpie passed the 403 through and
ZCode showed "Provider authentication failed" (reason=auth_failed
status=403), as if the account were broken.

The plugin now answers that refusal (only content_policy_rejected
without an x-factory-upstream-error header, as droid 0.245.0 tells it)
as a 400 invalid_request_error with code content_policy_rejected kept on
the error, on both the Anthropic (/llm/a) and OpenAI (/llm/o) routes,
with Factory's words and the "start a new session" advice as before.
Every other 403 stays a 403 permission_error. magpie reads the code as
a refusal of the request (yetone/magpie, same day).

Run (on mote): HOME=$(mktemp -d) bun test packages/factory: 178 pass,
0 fail. bun scripts/check.mjs: ok.
Broken by hand: with index.mjs back at main, content-policy.test.mjs
fails 3 of 6 (both 403 shapes on /llm/a and the new /llm/o case).
Not tried: a real Factory refusal; the refusal's body comes from
doubl4door's and sweanng's reports, not a live capture.
2026-10-29 17:51:44 +08:00
yetone 77c257c0c6 trae: README says the daily check-in is one per device (#436)
moxuanchen ran TRAE CN 3.4.4 with its own --user-data-dir on 10-29: the
second account's sign-in was kept apart, but its device id matched the
default folder's and the client said 本设备今日已签到. The README no
longer says that case is unknown, and says only the first account on a
machine gets the day's credits. Docs only; no version bump, nothing run.
2026-10-29 17:29:05 +08:00
yetone 9410e2a510 commandcode 0.1.19, devin 0.1.26, kiro 0.1.19: a refused sign-in marks the account signed out
blue12345655 (magpie Discord #help): a Command Code account signed in
through the plugin was signed out, and magpie offered no 重新登录, on
v0.1.1844 and still on v0.1.2021.

Cause: commandcode said X-Magpie-Sign-In "kept" on every answer and
signIn "kept" on every usage read, so a revoked key came back as a card
saying "Unauthorized" while magpie kept the account signed in, routed to
it, and never showed Sign in again on its rows. Devin and Kiro did the
same in their usage reads: their errors already said "sign in again",
but "kept" stops magpie from reading those words.

- commandcode: a usage read whose credits are refused (401/403), or a
  request answered 401, asks /alpha/whoami; when whoami refuses the key
  too, the usage says signIn "expired" with "Command Code's sign-in has
  expired; sign in again", and the answer carries X-Magpie-Sign-In:
  expired, its body unchanged. A 403 for a model the plan lacks, a 401
  whoami still takes, and a whoami 500 keep the account. A clean usage
  read says "renewed", which takes a mark off.
- devin: a usage read Devin answers 401 says "expired"; a clean read
  "renewed"; other failures "kept". Requests unchanged.
- kiro: a usage read whose sign-in Kiro refused (the errors made by
  gone) says "expired"; a clean read "renewed"; other failures "kept".
  auth.refresh and requests unchanged.

The response bytes in commandcode/signed-out.test.mjs are what
api.commandcode.ai answered an unknown key on 2026-10-29 (whoami,
billing/credits, billing/subscriptions, provider/v1/chat/completions).

Run (WSL magpie-desktop, Bun 1.4.2, HOME=$(mktemp -d)):
- bun test in packages/commandcode: 82 pass, 0 fail; packages/devin:
  142 pass; packages/kiro: 67 pass.
- bun scripts/check.mjs: every package ok.

Broken by hand: signed-out.test.mjs against the 0.1.18 index.mjs, 4 of
9 red (usage expired, clean read renewed, Provider API expired, Go
expired). kiro's and devin's changed usage tests against their old
index.mjs: red ("kept" received where "expired" expected).

Not tried: a real revoked Command Code, Devin or Kiro account; the
whoami check is only against an unknown key's real answers.
2026-10-29 17:04:52 +08:00
yetone 6a86762e26 cursor 0.2.31: Included usage only, a plugin option that stops an account once its included pools are used up (#485)
A new magpie plugin option, included_only ("Included usage only", off by
default), read through input.magpie.option at each usage reading, so a
change needs no restart. Modelled on Factory's standard_only (#349).

On: Cursor Models and Other Models drive routing (they lose `aside`), and
On-demand (fixed or unlimited) and Total are shown with `aside`, so a team
member whose on-demand could still pay is no longer kept in routing once
an included pool is used up. The Enterprise path does the same: the
Enterprise allowance stops the account and On-demand is shown only.
Off, or outside magpie, or an option that throws or isn't `true`: the
windows are exactly as 0.2.30 gives them.

Tests (included-only.test.mjs, new): Team accounts with a member's own
fixed limit, an org-wide fixed pool and unlimited on-demand, each with the
pools spent, left, and only Cursor Models spent, read with the switch off
and on; a fixed budget spent stops either way; no on-demand allowed is
unchanged; the switch flipped on one plugin instance between readings;
input missing/throwing/non-true; Enterprise unlimited and fixed-with-room;
the option's declaration fits host.js's limits (label 60, description 300).

Run on mote (mote-run):
- HOME=$(mktemp -d) bun test packages/cursor: 344 pass, 0 fail, 20 files
- bun scripts/check.mjs: ok
Broken by hand (each in mote's copy, included-only + usage tests):
- pools keep `aside` with the switch on: 8 fail
- fixed On-demand not set aside: 2 fail
- Enterprise allowance ignores the switch: 2 fail
- Enterprise fixed On-demand not set aside: 1 fail
- switch always on: 23 fail
- switch read once at plugin start: 1 fail
- a truthy non-true value taken as on: 1 fail
- option declared under another key: 1 fail

Not tried: a real Cursor Team account with the switch on in magpie (none
with on-demand here); the dashboard replies are fixtures shaped as
usage.test.mjs's. The option label is English only, as every plugin's
options are (magpie shows auth.options' label as given).
2026-10-29 16:29:48 +08:00
yetoneandWangzehong111 fada6e0b98 factory 0.1.39: DeepSeek V4.1 Flash 1017 goes to its registry default, Fireworks
Follows Wangzehong111's commit (from #480), with the review's change:
the plugin sends x-provider-routing-source: registry_default on every
request, and droid 0.251.0 sends that only with apiProviders[0]. 1017's
apiProviders is ["fireworks","baseten","databricks"], so Baseten with
registry_default is a header pair droid never sends. 1017 now goes to
Fireworks like every other model's first upstream; the droid test checks
both headers, the README says so, and the fixture header names the binary
the bytes were checked against.

Reported on Discord by sweanng: the model list had DeepSeek V4.1 Flash but
no 1017.

Checked: droid 0.251.0 (LATEST) darwin-arm64 from downloads.factory.ai,
sha256 d3c0b87f..., has the 1017 entry byte for byte as in testdata, with
the c(o,t) helper and I()'s registry_default rule.

Closes #480.

Co-authored-by: Wangzehong111 <112800852+Wangzehong111@users.noreply.github.com>
2026-10-29 16:25:54 +08:00
Wangzehong111 36f2d757c3 factory 0.1.39: add DeepSeek V4.1 Flash 1017
Offer deepseek-v4.1-flash-1017 on chat completions with the limits,
reasoning variants, attachments and 0.12x rate in Factory.app's Droid
0.251.0 registry. Keep the original Flash entry and its Fireworks route.

Use Baseten: authenticated Factory routing checked on 2026-10-29 orders
1017 as [baseten, fireworks]. Live plugin requests succeeded on both
backends with the distinct 1017 response model IDs. Baseten accepted none
and high; the arithmetic high sample reported 104 reasoning tokens.

Keep the raw registry entry and context helper in a versioned fixture,
including the binary SHA-256. Check both OpenCode config and Magpie's
provider.models hook, retain price checks for every model across the
0.241.1 and 0.251.0 fixtures, and include 1017 in Droid Core usage tests.

Validation: 176 Factory tests pass; all 30 plugins pass check.mjs.
Pack dry-run and an unpacked-package smoke test confirm all five runtime
files are present and the model hooks and request loader load correctly.
2026-10-29 16:15:25 +08:00
yetone 1e7122e161 workbuddy 0.1.47: a conversation's ids are one account's own
leaves5760 on Discord: every account of a group of WorkBuddy accounts gets
403 "request illegal", WorkBuddy saying the account is restricted for
abnormal behaviour.

X-Conversation-ID and X-Conversation-Request-ID were derived from the
session (or first user message) and the turn alone, with a salt per
process. One magpie session spread over several accounts therefore sent the
same conversation and turn ids under every account's X-User-Id. WorkBuddy's
own client (5.9.3, @genie/agent-cli 2.165.0) is signed in as one account,
so a conversation never shows up under two. The ids now also hash the
account (uid, enterpriseId, and for a key account the key), and a chat sent
again after a 401 as another account (a sign-in saved since) gets that
account's ids. The same account keeps stable ids as before.

This is a divergence from the official client found by reading its
bundle, not a verified cause of the restriction. Not changed, reported
only: no X-Private-Data, traceparent/baggage, reasoning_summary "auto",
or the client's /v2/report telemetry.

Run on mote at this tree: HOME=$(mktemp -d) bun test in packages/workbuddy,
209 pass 0 fail; bun scripts/check.mjs exit 0.
Broken by hand: with the account left out of the ids, both new tests
(conversation.test.mjs, unauthorized.test.mjs) fail; with reattend a no-op,
the 401 test fails.
Not tried: a real WorkBuddy account (none used, by the task's rule).
2026-10-29 15:37:53 +08:00
yetone dec921767e commandcode 0.1.18: Jev (typesafe/jev), Command Code's decision model, can be picked in magpie
joeliu96872540 on X: magpie couldn't get Command Code's typesafe/jev.
Command Code's /provider/v1/models (94 models) doesn't list it; the CLI
(command-code 1.88.2, read from its bundle, not run) knows it as
SYSTEM_ONE_MODELS ["typesafe/jev"], asked at POST /provider/v1/systemone
with {model, state, questions} and buildCommandAuthHeaders, answered with
{model, answers, usage}. That is magpie's System One shape.

- config sets decide: true on the provider and adds Jev to its models,
  marked decides (magpie's plugin decision API, yetone/magpie#1514).
- provider.models adds Jev, marked, to every plan's list (Go's, the live
  one, the default standing in); Command Code decides which plans may ask.
- fetch sends a /systemone question as the CLI does: its headers
  (User-Agent cli, x-command-code-version 1.88.2, project slug, session,
  Bearer key, x-cmd-zdr when ZDR is on), not the chat's x-api-key, with
  Jev's other names (jev, jev-latest, typesafe-ai/jev) sent as
  typesafe/jev. The answer goes back as it came; a refusal through
  failure(), the account kept; a Go plan's "no API access" keeps the key
  as Go's.
- The plan-list tests that count chat models leave Jev out (talking()).

Run: bun test in packages/commandcode on mote: 72 pass, 1 skip (as
before), 0 fail; bun scripts/check.mjs all green. Broken by hand (the
/systemone branch, decide and withJev turned off): 6 of jev.test.mjs's 8
go red; the ZDR and Go-refusal cases pass either way, as the generic
Provider API path does the same for them.

Not tried: a real Command Code account (none in a sandbox HOME), so no
real /systemone answer has been seen, nor which plans Command Code lets
ask Jev.
2026-10-29 14:52:38 +08:00
yetone 644038d95a trae 0.2.25: a 9074 or 9095 says which device the check-in went on (#436)
moxuanchen (plugins#436, Windows 11, TRAE CN 3.4.4, plugin 0.2.24):
account A checked in (100 credits), account B got 9074. Learning why
took running clientDevice by hand: both of that machine's profiles
(Trae CN, TRAE SOLO CN) were signed in as A with one device, so B's
claim went on magpie's own device for it.

The 9074 and 9095 messages now end with the device the claim went on:
this machine's client's, signed in as the account, or magpie's own,
with how many client profiles were found and that none is the
account's. A client device another account's profile also has is named
as shared. No uid or device id is in the message. clientDevice now reads
through clientProfiles; its answers are unchanged.

Not done: explicit profile dirs or --user-data-dir discovery. Whether
TRAE CN keeps a separate, registered device in such a dir is unverified,
and the issue asks the reporter for that first.

Run at this tree (rebased onto ea9201d; nothing under packages/trae changed):
- mote-run, HOME=$(mktemp -d): packages/trae bun test 227 pass 0 fail;
  whole repo bun test 3184 pass 0 fail at the rebased head; bun scripts/check.mjs ok.
  `node scripts/check.mjs` fails with ERR_INVALID_ARG_TYPE here and on
  main 4a46212 alike (it uses Bun's import.meta.dir; CI runs it with bun).
- win-run (xiaomi-gpu, Windows 11), fresh HOME: packages/trae 227 pass.
- Broken by hand: deviceNote reading no profiles turns the four new
  #436 tests red (4 fail), green again restored.
Not tried: a real Trae CN account or client.
2026-10-29 13:45:18 +08:00
mola ea9201df1f mail-watch 0.1.0: mail session ends, failed turns and refusals through your own SMTP (#457)
mail-watch 0.1.0: a hooks plugin that mails a rendered event (per event or as a digest) when a session ends, a turn fails, or a request is refused, through the user's own SMTP server.

The digest's due time is kept in the state file (digestAt/digestHours), so a restart neither resets nor fires it early; the timer step is capped at 2^31-1 ms and an early wake re-arms for the rest instead of sending.

Run at the reviewed head 8415dd9eb (sandbox HOME):
- mote: packages/mail-watch `bun test` 44 pass, 0 fail, three times; whole repo `bun test` 2982 pass, 8 skip, 0 fail; `bun scripts/check.mjs` exit 0; e2e.smoke.mjs against a local SMTP sink: onRequest returns undefined, onResponse returns without awaiting the mail, the mail arrives with the rendered event and subject.
- Linux (WSL2 Ubuntu 24.04): packages/mail-watch `bun test` 44 pass, 0 fail.
- Broken by hand, each red: no step cap (2 red: monthly digest, early wake), no due-time-ahead check (early wake), no persisted due time (restart test), no prune, raw guard, no shrink (1 red each). Making the persist write unconditional stayed green, as expected (a cost fix only).
- CI at this head: test and on-npm green.

Not tried: a real SMTP provider (Gmail, Fastmail); the smoke test uses a local sink.
2026-10-29 13:40:31 +08:00
yetone b08a6c1bce workbuddy 0.1.46: WorkBuddy AI's chats carry its current 5.9.3 client's headers
Two Discord users report WorkBuddy AI accounts answering 403 11140
("account restricted due to unusual activity"). While looking into it,
the plugin was found sending WorkBuddy AI's chats as a client one release
behind: WorkBuddy/5.8.4 workbuddy-ai/5.8.4 CLI/2.161.0, X-IDE-Version
5.8.4, no X-Agent-Runtime. Not shown to be the cause of the restrictions
(no real account was used); it is a header that no longer matches the
official client.

Read (never run) on 2026-10-29, unauthenticated:
- www.workbuddy.ai/v2/update?platform=workbuddy-darwin-arm64 answers
  5.9.3.42398134 for every version asked from 5.3.0 to 5.8.4.41366630
  (the desktop's resolveUpdateClientTypePrefix maps workbuddy-ai to
  "workbuddy"), download.codebuddy.ai, last-modified 2026-10-27.
- That zip, range-read: "WorkBuddy AI.app" CFBundleShortVersionString
  5.9.3, bundle id com.workbuddy.workbuddy-ai, cli/package.json
  @genie/agent-cli 2.165.0, cli/product.json productName WorkBuddy AI,
  platform workbuddy-ai, Electron Framework 37.10.3.
- Every file under app.asar.unpacked/cli has the China 5.9.3 zip's CRC
  but product.json and sandbox-config.json, so the CLI's headers
  (UserAgentHttpInterceptor, axiosToFetchAdapter, X-Stainless-*, gzip)
  are the China build's.
- Its app.asar puts agentRuntime `local-agent` in the prompt meta, as
  the China build's does, so X-Agent-Runtime: local-agent goes on
  WorkBuddy AI too.

Now WorkBuddy AI sends WorkBuddy/5.9.3 workbuddy-ai/5.9.3 CLI/2.165.0,
X-IDE-Version 5.9.3 and X-Agent-Runtime local-agent; the China build is
unchanged.

Run (on mote, HOME=$(mktemp -d) bun test in packages/workbuddy): 207 pass,
0 fail. bun scripts/check.mjs: exit 0.
Broken by hand: conversation.test.mjs on origin/main's index.mjs (0.1.45):
2 of 13 red (the WorkBuddy AI User-Agent, and the per-build header test).
Not tried: a real WorkBuddy AI chat with the new headers. Still not sent:
X-Device-Token (Tencent's native device SDK). No text added names magpie
or WorkBuddy's limits.
2026-10-29 13:40:02 +08:00
yetone 4a46212f89 page-chat 0.1.2: opened from another machine, the page reaches its service through magpie web
aigcfree (Discord DM) runs `magpie web --addr 0.0.0.0:3430` on an Ubuntu
server behind nginx, and opens it from a Windows PC. The chat tab showed
"127.0.0.1 refused to connect": boot.js sent the frame to 127.0.0.1, the
viewer's own PC. 0.1.1 (8a9680b) explains an SSH tunnel instead. With a
magpie that proxies a page's service, no tunnel is needed:

- package.json declares magpie.page.service {port: 3477, option: "port"},
  the same port index.mjs listens on. magpie web then proxies the service
  under the page's token (/_magpie/plugin/<token>/_magpie/service/) and the
  bridge hands that address to the page as magpie.service.
- boot.js goes to magpie.service when it is an http(s) address. Without
  one (the desktop window, or an older magpie) it behaves as 0.1.1: on
  loopback it goes to 127.0.0.1, from another machine it explains the
  tunnel.
- The chat client asks api/... by relative address (app.js, index.html,
  library.mjs's icon URLs), so it works under the proxied path. Served
  from 127.0.0.1:<port>/ these resolve as before.

The service still listens on 127.0.0.1 only, and still checks Host,
Origin and its token. magpie's proxy sets Host to 127.0.0.1:<port>.

Run: bun test packages/chat (16 pass) and bun scripts/check.mjs on mote.
Real: a sandbox magpie web on mote (0.0.0.0, LAN), this package installed
from a folder, a fake gateway. Playwright on the Windows box opened the
chat tab over the LAN in Chromium and WebKit, sent a message, and got the
streamed answer; the fake gateway logged both requests.
Broken by hand: the service branch in boot.js off, 2 tests red.
Not tried: behind a real nginx; the desktop window with this version (the
fallback is the 0.1.1 path, covered by the launcher tests).
2026-10-29 13:26:58 +08:00
yetone 8a9680b4cb page-chat 0.1.1: opened from another machine (magpie web on a server), the launcher explains the SSH tunnel instead of navigating to a refused 127.0.0.1 2026-10-29 13:14:24 +08:00
yetone 1f56706556 zen-free 0.1.18: the environment block names a real directory, since Zen refuses "Working directory: unknown"
shanmao_10826 on magpie's #help, 10-29: every free model (deepseek-v4.1-
flash-free and others) answers 429 "Free usage limit reached. Free
models work in OpenCode", while OpenCode itself on the same machine works.

Cause, found against opencode.ai from the Linux box (xiaomi-gpu WSL) on
2026-10-29, deepseek-v4.1-flash-free, one request each, minutes apart,
same IP, only the system prompt and stub-tool text changed:
- the plugin's own request through loader.fetch (0.1.17): 429
  FreeUsageLimitError, the reporter's message;
- "You are opencode." + <env> Working directory: /tmp/x: 200;
- the plugin's exact block "<env>\n  Working directory: unknown\n</env>"
  (alone, or after a prompt, either tool description): 429;
- the same block with /tmp/x for "unknown": 200;
- the plugin's stub description "Not available. Never call this tool."
  with a path in the block: 200.
So Zen now refuses the literal placeholder 0.1.15 to 0.1.17 added, the
plugin's fingerprint, as it refused the plugin's old User-Agent on 10-26.
Headers were diffed against OpenCode v2.2.0 (packages/core/src/session/
model-request.ts, app.ts useragent, plugin/provider/opencode.ts): the
same set the plugin sends; nothing new on the request since 2.0.25. Zen's
server code is no longer public (packages/console's handler went on
10-11), so this was found by bisecting real requests.

Fix: the block added is OpenCode 2.2.0's own (instructions/builtins.ts:
the intro line, Working directory, Workspace root folder, Is directory a
git repo, Platform; not its line about OpenCode's temp folder), with the
directory the agent's own prompt or first user message names (Codex's
<cwd>, a "Working directory:" line, Kimi's "The current working directory
is `...`"; absolute paths only), or the user's home folder when none is
named. A prompt that already has a block goes as it is, as before.

Run:
- Real, through the fixed plugin's loader.fetch from the same IP right
  after the 429s: deepseek-v4.1-flash-free with no prompt 200, with an
  agent prompt naming its directory 200, glm-5.3-flash-free 200.
- New test (the block names the stated or home directory, never a
  placeholder; Codex/Kimi/Windows/Anthropic cases): red on origin/main's
  provider.mjs (1 fail of 44 in index.test.mjs), green with it.
- HOME=$(mktemp -d) bun test in packages/zen-free: 201 pass, 0 fail.
- HOME=$(mktemp -d) bun test at the repo root: 3131 pass, 1 fail, the
  fail is layerfs "item 3: an import skips secret-shaped files", red the
  same at origin/main cc3f000, filed as #477.
- bun scripts/check.mjs: ok.
All on the Linux box (wsl-run); mote was unreachable.

Not tried: the reporter's own agent through magpie (they didn't say
which); a Responses or Anthropic free model (Zen lists none free); a
Windows or macOS host (the block's Platform and home path differ there).
2026-10-29 11:38:06 +08:00
yetone cc3f000c6d qoder 0.2.48: a job token Qoder refuses as Login expired is renewed once and asked again (#474)
ahang39 (plugins#474): international Qoder answered dfmodel with 403
"Login expired" in bursts of ~16 requests over 2-5 minutes, about every
24h, shown by magpie as 401 "the sign-in lapsed". The report's times put
the burst's start where magpie's renewal came due (saved end less the
10-minute lead) and its end where the renewed pair was saved: Qoder
refused a job token the plugin still had as minutes from its end, and
nothing asked again with a renewed one. Why Qoder ended it early isn't
proven from the report.

- A chat's 401/403 now marks the failure lapsed. ask re-reads the saved
  sign-in under the refresh lock: a pair renewed meanwhile (another
  request, magpie's auth.refresh, another process) is used with no
  refresh; else the refresh token is spent once, the pair saved, and the
  request sent once more. A burst shares one refresh. A token this
  process renewed under 5 minutes ago that is refused too isn't renewed
  again, so a refusal not about the token's end doesn't churn refresh
  tokens; the 401 is said as before.
- A refreshed job token's end is read as an exchanged PAT's was:
  expire_time / expires_at (a date, or an epoch in s or ms) first, then
  expires_in, then a day. An end already past is ignored.

Run (mote, mote-run, HOME=$(mktemp -d), --timeout 60000; mote at load
20-28):
- packages/qoder: 320 pass, 0 fail.
- whole repo: 3129 pass, 1 fail: commandcode "a plan saved stands in
  for a subscription slow to read" (16.8s against its 3s bar), passes
  alone 13/13, filed as #475.
- bun scripts/check.mjs: ok.
- lapsed.test.mjs on the old index.mjs: 8 of 9 red. The 9th (magpie's
  own renewal begun during the refusal) was rewritten after that run and
  not run against the old code again.

Not tried: a real international Qoder account at the moment its token
is refused; the fake Qoder (refusal body {"message":"Login expired"},
single-use refresh tokens) is built from the report's words only.
2026-10-29 10:59:24 +08:00
yetone 50e99c2524 trae: the token_usage TRAE CN's own client got keeps its cache read (#455)
chansee97's capture of TRAE CN's llm_utils_chat answer, byte for byte:
an id line and no space after any colon (id:30 / event:token_usage /
data:{...cache_read_input_tokens:4096...}). The plugin already reads it:
cache_read_input_tokens 4096 of prompt_tokens 4122 goes on to magpie,
streamed and not. No change to the plugin, so no version bump.

Run (mote, bun 1.4.2, sandbox HOME): bun test cache.test.mjs, 6 pass.
Broken by hand: an "event:" line with no space read as unknown makes both
new cases red (2 fail); the four older cases, built with a space, stay
green, so this is the only test of the no-space form.
Not tried: a real Trae CN account (none here).
2026-10-29 09:33:56 +08:00
yetoneandMagiczerowxy 526c7853c3 page-chat 0.1.0: Magic_zero's chat page, with tests, a registry entry and check.mjs for a page's host part
Lists Magic_zero's (Magiczerowxy) magpie-chat as @magpie-community/page-chat:
a chat page in magpie's window over magpie's own gateway, models, MCP
servers, instructions and skills. Not a provider or a relay: it signs in
to nothing and every request goes through magpie's gateway.

- chat.test.mjs starts the service on a free port against a fake
  gateway in a temp config folder: no token (Origin null and none), a
  wrong token, another Origin and a rebound Host are refused and nothing
  reaches the gateway; with the token a chat streams with the caller key;
  the icon redirect has a Location; boot.js makes no request; app.js
  sends the token.
- scripts/check.mjs takes the OpenCode v1 default export {id, server}
  as magpie's host does, and doesn't start a page's server (it would bind
  a port and write config); layerfs's tools are still checked.
- package.json declares the port option (3477) both parts read; boot.js's
  comment says so instead of a fallback to 3478 that never existed.
- README in the repo's style with credit, what the service reads and
  sends, who can use it, and the changes from the original.
- registry.json entry and a row in the Pages table.

Run on mote (bun 1.4.2) at this tree:
- cd packages/chat && HOME=$(mktemp -d) bun test: 11 pass.
- HOME=$(mktemp -d) bun test (whole repo): 3119 pass, 0 fail, 3127
  tests across 261 files; bun scripts/check.mjs: exit 0, chat and
  layerfs ok.
Broken by hand: with the token check off, "a page without the token
can't chat" went red; with the Host check off, "a DNS-rebound Host is
refused" went red.
Not tried: the page in a real magpie window (sandboxed frame navigation
and the host calling server()).

Co-authored-by: Magiczerowxy <magiczerowxy@users.noreply.github.com>
2026-10-29 09:07:44 +08:00
yetoneandMagiczerowxy bdf3bf8405 page-chat: a token and a Host check guard the local service; port option honoured
The service on 127.0.0.1:3477 answered Origin: null (any site's sandboxed
iframe or a data: page) with ACAO null, and had no Host check, so a
hostile page could POST /api/chat on the user's magpie gateway key, read
and rewrite conversations and settings, and drive MCP tools; a DNS-rebound
page could read conversations with a plain GET.

- Every /api/ route except ping, fonts.css and icon/* now needs a
  per-process token (x-magpie-chat-token, timing-safe compare). The token
  is put in index.html as a meta tag, and index.html goes out without
  CORS, so only a page that navigated to the service can read it. app.js
  sends it on every call and reloads once when the service restarted.
- The Host must be 127.0.0.1:<port> or localhost:<port>, checked first.
- index.mjs starts the service when the host calls server(), not on
  import, and passes the plugin option's port, which page/boot.js already
  read; before, a port set in the options moved the page and not the
  service.
- Port 0 binds a free port (tests); the actual port is used for the Host
  and Origin lists.
- /api/icon's remote icon answered 302 without a Location; it has one.
- /api/bootstrap reports the package version instead of "0.1.0".
- package.json: 0.1.0 in magpie-community/plugins, author credit, start
  runs serve.mjs.

Co-authored-by: Magiczerowxy <magiczerowxy@users.noreply.github.com>
2026-10-29 09:03:53 +08:00
yetoneandMagiczerowxy 4193f7410c chat: Magic_zero's magpie-chat page, as published at Magiczerowxy/magpie-chat 15de02d
The files its package.json ships, unchanged, from
https://github.com/Magiczerowxy/magpie-chat at 15de02d (0.1.18). The
vendored KaTeX is katex@0.16.11's dist, byte for byte (checked against
npm's tarball). Not published from this commit: the next ones close the
local service to other pages and fit it to the repo.

Co-authored-by: Magiczerowxy <magiczerowxy@users.noreply.github.com>
2026-10-29 09:01:47 +08:00
MYCF711 f968917875 qoder 0.2.47: every model a site ships says whether it takes images (#470)
Every model a site ships now sets attachment and modalities.input either way, so a text-only model (QwenWork's three, Qoder CN's Lite) no longer falls back to models.dev's vote by bare model id.

Run at 20043420a48079429896d861b33f2140261cf1df, on mote: HOME=$(mktemp -d) bun test in packages/qoder, 311 pass, 0 fail. Broken by hand (attachment: true for every model): config-capabilities.test.mjs goes 0 pass / 2 fail.
Checked: QWORK_FALLBACK_LISTING marks all three QwenWork models is_vl: false, so text-only matches the vendor's listing. A signed-in account's own listing (is_vl) still takes over from the shipped list.
Not tried: a real Qoder CN account's Lite with an image.
2026-10-29 02:43:18 +08:00
yetone 744e1e26f3 autoclaw 0.2.12: the overseas chat sends the official 2.0.3 fingerprint, and X-Tm "linux" on Linux as the official client does (#367)
menhouran captured the official AutoClaw 2.0.3 Linux chat request and
corrected the report behind 0.2.7: the official client sends X-Tm "linux",
not "linux-x64". The overseas gateway refuses "linux" only beside a
non-official fingerprint (X-Channel AutoClaw4, X-Version 1.18.1, no
X-Auth-*); "linux-x64" got through only because it isn't the one value
checked.

Read from the official client itself: AutoClaw-2.0.3-x64.AppImage from
autoclaw.z.ai's Linux download (sha512 matches latest-linux.yml),
resources/app/dist/main.cjs, extracted with 7zz and never run.
createZworkManagedRequestHeaders and createZworkManagedModelRequestResolvers
build the chat headers:
- X-Tm from managedPlatform(): darwin mac, win32 win, else process.platform
  as is (Linux is "linux" on x64 and arm64);
- X-Auth-Sign = md5("100003&<seconds>&<appKey>"), the same identity and
  signature the plugin already sends on its sign-in/wallet paths;
- X-Channel official, X-Version app.getVersion() (2.0.3), X-Lang the
  product language (en in the reporter's capture), X-Product autoclaw,
  X-Client-Type pc, x_trace_id autoclaw-desktop;
- X-Request-Id = X-Trace-Id = a randomUUID per attempt; X-Session-Id the
  session's UUID; X-Authorization Bearer, no Authorization;
- the request goes through the OpenAI SDK 6.26.0 in Electron 42.6.1
  (Node v24.18.0), which adds User-Agent "OpenAI/JS 6.26.0" and
  X-Stainless-* (OS/Arch through the SDK's own normalizers).

The overseas chat now sends that set. X-Session-Id is a UUID derived from
the conversation's first non-system message, so it stays the same across a
conversation's turns as the official one does. The caller's own
X-Stainless-* headers are dropped. bizHeaders (sign-in, refresh, wallet,
check-in) keep AutoClaw4/1.18.1 and send X-Tm "linux" again, as before
0.2.7, when they worked on Linux. README says what is sent and that
linux-x64 was a bypass.

Not changed: the overseas chat path keeps /v1/chat/completions, which the
reporter verified; the official client posts to .../autoclaw/chat/completions.
X-Stainless-Timeout is 600, the SDK default when no per-request timeout is
passed; whether zwork passes one wasn't traced to the end.

Run: HOME=$(mktemp -d) bun test in packages/autoclaw on mote, 46 pass;
bun scripts/check.mjs autoclaw ok; the same suite on Linux (wsl-run,
magpie-desktop) 46 pass. The new tests on origin/main's index.mjs: 4 fail
(the three #367 tests and the UA check in the 406 test).
Not tried: a real overseas account (none here), on Linux or anywhere; the
reporter is asked to confirm on #367.
2026-10-29 01:46:07 +08:00
yetone dd260b4a3a trae: #434's "max" is the app's 1M-window Max switch, not a level (comments)
hbw169 (#434) on trae 0.2.23, TRAE CN: magpie model efforts prints
"low high xhigh" for deepseek-v4.1-flash and deepseek-v4.1-flash-max.
Their screenshot of the TRAE CN app's DeepSeek V4.1 Flash card shows
思考强度 轻 / 高 / 极高 only (light / high / extra_high, the plugin's
low / high / xhigh), and a separate 更大上下文 (Max) switch: "1M window,
more credits". That switch is the plugin's deepseek-v4.1-flash-max model
(maxModel, the list's __max entry with context_window_tokens.max), which
the reporter already has. So the plugin offers exactly what the app does.

Magpie's side passes a plugin model's variants through unchanged
(internal/provider/plugins.go: c.Efforts = m.Variants; provider.Levels
holds max), so it doesn't narrow anything either.

0.2.23's comments said the app offers DeepSeek V4.1 Flash max as a level.
That was wrong; they now say what the screenshot shows. No code change,
no version bump: LEVELS keeps medium/max for a list that names them.

Run: packages/trae, HOME=$(mktemp -d) bun test on mote: 221 pass, 0 fail.
Broken by hand: nothing; comment-only.
Not tried: a real TRAE CN account's model list; the read rests on the
reporter's screenshot and the client binary's field names
(reasoning_effort_config, reasoning_effort_options,
default_reasoning_effort, context_window_tokens), not a captured list.
2026-10-29 01:13:35 +08:00
liangmouse f653369a77 joycode 0.2.0: route models by adapterType to Chat, Responses and Messages (#464)
joycode 0.2.0 (liangmouse). Each JoyCode model is routed by the `extJson.adapterType` in its catalogue entry:
- missing/other → Chat Completions (`@ai-sdk/openai-compatible`, `chat_completions`)
- `openai-response` → Responses (`@ai-sdk/openai`, `responses_completions`)
- `anthropic` → Anthropic Messages (`@ai-sdk/anthropic`, `anthropic_completions`)

The routing matches JoyCoder.joycoder-fe 3.8.71's `buildApiHandler`. Other changes:
- Anthropic `/messages/count_tokens` gets a local 404 and nothing goes upstream, so magpie's `unsupportedCount` uses its local estimate.
- All three protocols send `language: UNKNOWN`, as JoyCode's own handlers do.
- Non-streaming JSON for Anthropic and Responses counts as success.
- `flatten` applies to chat only.
- JoyCode's extra SSE layer (`data: event:` / `data: data:`) is removed line by line as the stream arrives. Standard SSE passes through unchanged.

Reviewed and run at f1ccb2ab59b0570295264317f270b266c7a585da (on mote, macOS, Bun 1.4.2, HOME a temp dir):
- `bun test packages/joycode`: 42 pass. `node --test packages/joycode/*.test.mjs`: 42 pass. `bun scripts/check.mjs joycode`: ok.
- Broken by hand, one at a time, each went red:
  - count_tokens guard off → the count_tokens test;
  - Anthropic normalizer off → the Anthropic double-wrapped test;
  - Responses normalizer off → the Responses double-wrapped test;
  - `language` dropped → 2 tests.
- Official SDKs (`@anthropic-ai/sdk` 1.3.0, `openai` 7.45.1) read JoyCode-framed streams through the plugin's fetch, served locally and cut into 7-byte chunks:
  - `messages.stream` got the full event sequence, text "OK", `end_turn`;
  - `responses.create({stream})` got 9 events ending in `response.completed`, text "OK".
  - The same bytes without the plugin: "request ended without sending any chunks" from Anthropic and "malformed server-sent event JSON" from OpenAI.
- Upstream functionIds seen were `anthropic_completions` and `responses_completions`.

Real account: the author's run is in the PR thread and the CHANGELOG (`provider test` GPT-6 Astra 200 in 3.0s, Claude-Opus-5-hq 200 in 7.3s). Not tried here: no JoyCode account.
2026-10-29 01:12:42 +08:00
yetone 880cd9319c workbuddy 0.1.45: only a chat completion goes gzipped; magpie's drawings go as plain JSON
iwinux on Discord (2026-10-28 ~22:30 UTC+8, magpie v0.1.1812): the Magpie
Image MCP through WorkBuddy AI failed from the minute 0.1.43 was published
(14:30Z) with
  400 Bad Request: Unmarshal create image params failed with error:
  invalid character '\x1f' looking for beginning of value (11101)
0.1.43 (f4d48ac) gzipped every body the loader's fetch sent that wasn't
Messages. magpie's drawWorkBuddy (internal/gateway/draw_workbuddy.go) sends
its JSON to <site>/v2/images/generations and /v2/images/edits through that
same fetch, and WorkBuddy's images API reads the raw bytes as JSON: '\x1f'
is gzip's first byte. magpie itself passes the JSON string through
unchanged (host.js bodyOf); the plugin set Content-Encoding: gzip and
compressed it.

Now only a chat completion (a path ending /chat/completions, or with no URL
to read, a body holding messages: isCompletion) goes gzipped, and only one
is given the model's default effort, which also ran on a drawing's body and
read /v3/config for it. Messages and everything else go as they came.
Sibling paths checked: /v3/config is a GET with no body; Messages and
count_tokens were already left alone; the plugin serves no embeddings.

Run (on mote, HOME=$(mktemp -d) bun test in packages/workbuddy): 207 pass,
0 fail. bun scripts/check.mjs: exit 0.
Broken by hand: the new images.test.mjs on origin/main's index.mjs (0.1.44):
4 of 6 red, the fake images API answering 400 with the reporter's own
"invalid character '\x1f' ... (11101)"; the 2 that pass guard that a chat
still goes gzipped on both builds.
Not tried: a real WorkBuddy drawing (no live account used here); whether
WorkBuddy's own CLI gzips its image requests (its images API doesn't take
gzip either way).
2026-10-29 00:33:30 +08:00