Commit Graph
638 Commits
Author SHA1 Message Date
IceCodeNew c5dc2e691c nowledge-mem 0.1.0: recall and opt-in capture from your Nowledge Mem, by IceCodeNew (#526)
Adds @magpie-community/gateway-nowledge-mem, an asynchronous gateway hook by
IceCodeNew (#526): before each request it recalls from the user's Nowledge
Mem (and the Context Bundle / Working Memory on a session's first turn), and,
only when `capture` is turned on, imports completed conversations as Mem
Threads. It applies to direct local requests and the `magpie-key` sharing
key this computer writes into the user's own agents; other gateway keys,
remote and unknown origins are never included. A page sets the connection
and runs a real connection test through a loopback service guarded by Host,
Origin and a per-start token. The package writes nothing into magpie's
Library. registry.json gains one compact entry.

Reviewed head 3f4ba91 (f9eb686 plus a maintainer commit adding a test that
starts the service and expects 403 for a foreign Host, Origin and token).
Run at 3f4ba91's tree on mote (macOS, Bun 1.4.2, HOME=$(mktemp -d)):
repo `bun test` 3861 pass, 9 skip, 0 fail; `bun scripts/check.mjs` exit 0;
packages/nowledge-mem 53 pass, 1 skip.
Broken by hand: each of the service's four guards in handle() turns the new
test red; earlier rounds broke the origin gate, the block escaping, the
secret check and the cleartext-HTTP guard, each red.
Not tried: a real Mem server, a real magpie with the plugin installed,
Windows.

Co-authored-by: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com>
2026-10-30 21:37:55 +08:00
Yuchen 5b4ef414e2 registry: PinK agent plugin (magpie-plugin-pink) (#514)
Lists PinK (magpie-plugin-pink, YuchenWell, MIT) as an Agent plugin. Only registry.json changes: one entry, unpinned, so magpie installs npm's newest version (0.1.1).

Reviewed at 78185d2 (the reviewed head):
- magpie-plugin-pink@0.1.1 from registry.npmjs.org: its sha512 matches dist.integrity. The dist diff against 0.1.0 is only the worker lifecycle fix (worker.mjs exits when its host's pid is gone; index.mjs refreshes launch.json before it spawns). There is no network call, no install script and no encoded code.
- Harness on macOS (sandbox HOME, mock PinK folder, network refused). Connect, switch and disconnect restore the files byte for byte. The worker exits within 1 s of its host, plugin on. On 0.1.0 it was still alive after 5 s. A second host spawns a new worker. A worker stays alive under host A after a short-lived host B leaves. No stray worker is left.
- The repo suite on a local merge with main 848497c: HOME=$(mktemp -d) bun test 3808 pass, 8 skip, 0 fail. check.mjs: only cloudflare-workers-ai is red, the known #519 offline.
- Not tried: real PinK chat, and a run inside a real magpie app.
2026-10-30 19:45:52 +08:00
狂気のMad Scientist鳳凰院胸針 848497c40b orcaterm 0.1.1: QR sign-in null fields, OAuth quota, stable account identity (#510)
orcaterm 0.1.1 (hg1048596-pixel):
- WeChat QR sign-in accepts the official bridge's null fields.
- QR accounts read their AI quota through orcaterm.com's product API, with the token sent as the ot_session cookie only to https://orcaterm.com/cgi/api and redirects refused.
- A QR re-sign-in reuses the same account, keyed by the stable OrcaTerm user id.
- The README (en and zh) lists every host and what each one receives.

Run at the reviewed head a9ab6853b (Mac mini, Bun 1.4.2): `bun test` in packages/orcaterm passed 101 of 101 with every non-loopback fetch and socket refused (none was attempted), and `bun scripts/check.mjs orcaterm` passed.

Broken by hand at fa028746c, the last code change, each going red: the /cb null check, accountId on the QR result, and redirect: "error".
2026-10-30 19:39:18 +08:00
unisong c590a74057 codex-history 0.1.2: a group or fallback try is filtered with the tried provider's rule (#525)
A request through a Magpie group or fallback names the group, so 0.1.1's
onRequest found no provider rule and sent old reasoning, ciphertext and item
IDs to members whose filter was on. onProvider now filters each provider try
with the tried provider's rule (`magpie:<ctx.provider.id>`, through aliases).
A direct provider/model request filtered in onRequest is marked in
ctx.state.historyFiltered and its tries pass it on. A try with no rule, a rule
off, another protocol, the compact path or history that can't move is
returned unchanged (onProvider can't reject). cases.json gains 10 synthetic
provider-try cases in the shared scripts/middleware.mjs format (no real data).

Run at the reviewed head c50f542 (on mote):
- `HOME=$(mktemp -d) bun test`: 3776 pass, 8 skip, 0 fail.
- `bun scripts/check.mjs`: exit 0.
- PR's tests against the 0.1.1 middleware: 8 fail (the group/fallback cases
  and the export check), 34 pass.
- Probes in magpie's own engine (moejs, origin/main 3bce283df,
  internal/middleware Run.Request + Run.Tried, not committed): a group with a
  filtered, an unfiltered, a rule-off member, a retry on the filtered one and
  a member with another include rule: each try filtered by its own rule, the
  retry byte-identical to the first, unfiltered tries byte-identical to the
  request. A direct request: filtered once in onRequest, its try, a retry and
  a fallback to another provider sent what onRequest left. ctx.state doesn't
  reach the next request. Red on 0.1.1 (group), red with the
  historyFiltered guard removed (fallback re-filtered) and red with
  onProvider setting the flag (retry unfiltered).
- PROVENANCE: the shipped files' sha256 match unisong/magpie-codex-history-filter
  at 43e0b5c, which is on its main.

Not tried: a real Magpie with real providers; a group whose members speak
different protocols.
2026-10-30 18:46:55 +08:00
yetone 254c3e7aef grok 0.2.3: Codex's output.encrypted_content is left out of include (#524)
Codex asks an OpenAI-named provider for output token replay with
include ["reasoning.encrypted_content", "output.encrypted_content"]
(codex-rs/core/src/client.rs). Grok answers 400 'Argument not
supported: "output.encrypted_content" in "include" field'. rewrite()
now drops that one value (and include when nothing is left), and its
pre-filter also opens a body that names it, so an include-only body is
no longer passed through untouched. reasoning.encrypted_content and the
tool-output values xAI's docs list stay; store is not touched (Grok
takes it).

Tests: packages/grok/include.test.mjs, from the reporter's two bodies
and Codex's include. Red on the old index.mjs (4 of 5; the 5th checks
that accepted values stay). Broken by hand: without the pre-filter
change the include-only case is red.
Run on mote: HOME=$(mktemp -d) bun test (3782 pass, 0 fail) and
bun scripts/check.mjs (exit 0).
Not tried: a real Grok account; no Codex turn sent through Grok.
Sealed copies an OpenAI model wrote earlier in a thread (encrypted_content
on a message) are not stripped here; magpie's forVendor takes those out
before a non-OpenAI provider.
2026-10-30 18:45:39 +08:00
MYCF711andMYCF711 3968cdd75f workbuddy 0.2.3: a refused opening is said with a comma first, and remembered (#513)
A chat WorkBuddy refuses as an unapproved channel (11128) for an opening FLAGGED
doesn't know is sent once more with one more comma in the opening ("You are an
AI agent, powered by X.") before the system prompt is moved into the first user
message. The comma is set in system and assistant messages only; user messages
and tool results go out as written. A system prompt whose comma passed is
remembered (bounded at 256, like refusedSystems) and its next chats go with the
comma before the first send, so a tool loop is not refused on every step. A
refusal that stands names REFUSED.md (new) before the hint; that address is
only in the error returned to the client, nothing sent upstream names magpie.
Version 0.2.3.

Run at the reviewed head cb8a026 on mote (macOS), temp HOME, outbound network
denied by sandbox-exec (localhost allowed):
- packages/workbuddy `bun test`: 271 pass, 0 fail.
- repo root `bun test`: 3774 pass, 1 fail (layerfs import-limit, fixed on main
  by 3dd0f44). cb8a026 merged with origin/main 4d8d031: 3777 pass, 0 fail.
- `bun scripts/check.mjs`: only cloudflare-workers-ai fails, with the network
  refused (#519); workbuddy ✓.
Broken by hand: no commaSystems.add -> remembered-comma test red; no pre-send
commaPausedOn -> same test red; role filter removed -> 5 tests red.
Not covered: dropping the roles.has("system") guard leaves every test green
(an assistant-only comma would be remembered). Not tried against
copilot.tencent.com in this review.

Co-authored-by: MYCF711 <MYCF711@users.noreply.github.com>
2026-10-30 18:15:12 +08:00
MYCF711 4d8d0310f9 codearts 0.2.6: an IAM internal id is never the account's display name (#518)
An account whose IAM phone read yields nothing no longer shows
iam::<domain>:user:<name>, the hw... account name, a urn:, a uuid or a bare
hex id as its card name. accountIdentityOf() walks the same candidates in the
same order and skips any that looks like an id; with none left the name is ""
and the host shows the provider's name. id/uid/accountId are unchanged (still
the URN, as #483 settled), so no account is renamed. The only reader of
.name is usage()'s `user` fallback.

Reviewed at d8583da plus the reviewer's version bump (0.2.5 -> 0.2.6) at
f77e5bb. Run on mote (macOS, Bun 1.4.2) at f77e5bb, from the repo root:
- HOME=$(mktemp -d) bun test: 3763 pass / 0 fail (3771 tests, 298 files)
- bun scripts/check.mjs: exit 0
Red on the old code: the PR's tests against main's index.mjs, 125 pass /
2 fail (both new tests).
Broken by hand: displayNameOf without the looksLikeIdentifier skip ->
"accountIdentityOf never makes an IAM id the account's name" red (126/1).
Not tried: a real CodeArts sign-in whose phone read fails.
2026-10-30 17:26:37 +08:00
yetone 3dd0f44c15 layerfs: the import-limit test uses a small limit, not 20,001 real files
The only red in `HOME=$(mktemp -d) bun test` at the root on mote (57f3f90)
was "item 3: an import over the file limit is refused, not swept in". It
timed out at 30s (34s) under the full suite. Run by itself it passes in
about 10s, which is the time to write 20,001 empty files. CI on ubuntu is
green. scanImportTree now takes { maxFiles } (the default is still
IMPORT_MAX_FILES), so the test checks 51 files against a limit of 50 and 51.
The test also pins the 20000 default.

Run on mote: layerfs.test.mjs 38 pass; scripts/check.mjs ok. The full
root suite at 57f3f90 had 3769 tests, 1 fail (this one). Broken by hand:
checkImportLimits compared against IMPORT_MAX_FILES again, and the test went
red. Not tried: running the old test under load again to watch it time out;
the full-suite log shows that.
No version bump: the default behaviour is unchanged.
2026-10-30 17:02:02 +08:00
liangmouse 57f3f90698 joycode 0.2.2: Responses efforts JoyCode refuses go as low, per measured model (#499)
On JoyCode's Responses models, an explicit reasoning effort that the backend refuses now goes as `low`. Which efforts are refused was measured per model on the live gateway on 2026-10-30. GPT-6 Astra and GPT-6.1 Sol refuse both `none` and `minimal`. GPT-6 Sol and GPT-5.6 Sol refuse `minimal` but accept `none`, which still goes as written. Unknown models, other protocols, and valid or missing efforts are unchanged. This answers the earlier review: every Responses model was probed, `minimal` is covered, and the full upstream errors with their supported values are in the PR.

Run at the reviewed head 3b654be, merged onto main 7673cd0, on mote (macOS, Bun 1.4.2, Node 22) with HOME=$(mktemp -d):
- packages/joycode `bun test`: 64 pass, 0 fail. `node --test`: 64 pass, 0 fail.
- `bun scripts/check.mjs joycode`: ok
- `npm pack --dry-run`: magpie-community-opencode-joycode-auth-0.2.2.tgz, 6 files
- Broken by hand: swapped `none` between GPT-6.1 Sol and GPT-6 Sol in the table, and both of their mapping tests went red (2 fail).
- Version: the dist branch has 0.2.1 and this PR ships 0.2.2. The package isn't on npm yet; magpie installs it from dist.

Not tried: a real JoyCode request, because the review has no JoyCode account. The eight live probes are the author's. Codex's original long-conversation compaction wasn't run again (the author says so too).
2026-10-30 14:30:56 +08:00
MYCF711 79b02cc568 workbuddy 0.2.2: DeepSeek Harness's opener keeps the harness's name (#511)
WorkBuddy refuses DeepSeek Harness's opener "You are an AI agent powered by DeepSeek Harness." as 11128 (#279). The plugin used to reword it into "You are an AI agent that helps the user with programming tasks.", which dropped the harness's name from the line the rest of a DSH prompt refers back to. It now adds one comma ("You are an AI agent, powered by DeepSeek Harness."), which the author measured passing WorkBuddy's whole-line check (400 11128 without the comma, 200 with it, copilot.tencent.com, 2026-10-30).

Run at the reviewed head 4830b16, merged onto main 7673cd0 (a fast-forward), on mote (macOS, Bun 1.4.2) with HOME=$(mktemp -d):
- packages/workbuddy `bun test`: 257 pass, 0 fail
- `bun scripts/check.mjs workbuddy`: ok
- `npm pack --dry-run`: magpie-community-opencode-workbuddy-auth-0.2.2.tgz, 3 files
- Broken by hand: put the old rewording back in index.mjs, and both unflag tests went red (2 fail).
- Real request: the comma line sent to workbuddy-ai/deepseek-v4.1-flash through a live magpie gateway (0.2.1, which leaves the comma line as written) came back 200, and the model answered "I'm running in the DeepSeek Harness."
- Version: npm has 0.2.1 and this PR ships 0.2.2.

Not tried: the China WorkBuddy site, because the review account's desktop sign-in answers 401 there. That 400/200 pair is the author's measurement.
2026-10-30 14:30:38 +08:00
Jinpyandjinpy666 5a9c776832 zcode 0.1.38: freeFirst, the plain model spends the account's gift first (#505)
freeFirst (a boolean plugin or provider option): a plain model request
spends the dual account's own live gift first, under the name the gift
lists, and falls back to the coding plan when the gift can't serve it.
Any gift failure (spent 1113/1005, block page, 4xx/5xx, its own
waited-out busy cap, a network throw) is replayed on the plan in the same
request with the plan's own busy patience; a caller's abort stays an
abort. -Trial entries keep their strict meaning. Off by default.
zcode 0.1.38.

Run at the reviewed head 7ae2ea15d (on main 7673cd0), on mote (macOS,
Bun 1.4.2, temp HOME): `bun test` in packages/zcode 173 pass 0 fail;
`bun scripts/check.mjs zcode` ok; `npm pack --dry-run` 4 files
(README.md, index.mjs, package.json, prompt.mjs) at 0.1.38.

Broken by hand: the gift's catch reduced to `throw e` turns "a gift that
cannot be asked at all is answered from the plan" red; the abort guard
reduced to `if (!freeGift) throw e` turns both abort tests red (2 fail);
the signal check alone removed turns the in-flight abort test red.
Reviewer probes (abort before/in flight, gift 3008 then throw, gift and
plan both throwing, freeFirst off) behave as intended.

Not tried: a real dual account against zcode.z.ai; every case here runs
against a fetch fake.

Co-authored-by: jinpy666 <5868671+jinpy666@users.noreply.github.com>
2026-10-30 14:27:16 +08:00
yetone 7673cd06de zcode 0.1.37: an account with no gift plan to claim is no check-in event, not a failed check-in
hykql (Discord, magpie v0.1.2143, zcode 0.1.36) saw every ZCode account's
daily check-in fail with "gift plans to claim: no plan list in the reply",
a Start Plan account and one with no GLM Coding Plan alike. ZCode's
GET /billing/preview answers an account with nothing to claim with no
data at all, not data.plans []:

  {"code":0,"msg":"","logid":"202610300535585c4e3de75769b684da87"}

(the owner's account, read 10-30 with GETs only, with and without the
X-ZCode-App-Version / X-Platform headers; both the same). #503's capture
of 10-29 had "plans": [], so 0.1.35 took a missing list as unreadable.

previewPlans now reads the list for both the claim and the card's claim
line: no data, data null, or data without plans (or plans null) is a
list of none, so the check-in is "inactive" (magpie shows "No check-in
event now"). call has already judged the code, so only a code 0 reply
gets here. Data that isn't an object, or plans that aren't a list, still
don't read and stay failed, never claimed.

Run (wsl-run on magpie-desktop, HOME=$(mktemp -d); mote was at load
220-250): `bun test` in packages/zcode, 152 pass 0 fail; the whole
repo's `bun test`, 3720 pass 0 fail of 3727 across 298 files;
`bun scripts/check.mjs zcode` ok. The new checkin test (the real
no-data reply, data null, data without plans, plans null) is red on
0.1.36's index.mjs (1 fail). Broken by hand: plans that aren't a list
read as none turns "a preview that doesn't read is failed" red; put
back, green.

Not tried: a real claim (no account has a plan to claim now), and the
official ZCode client's own parse of this reply (no ZCode app on hand);
the fixture is the vendor's real bytes. Not changed: #505 (freeFirst)
touches other parts of index.mjs.
2026-10-30 13:45:42 +08:00
HaroldLeo 219a8aa0a7 registry: add AWS Bedrock SSO (#508)
Lists the third-party npm package magpie-aws-bedrock-sso (provider id
bedrock-sso): Amazon Bedrock's Claude and GPT models through an AWS CLI
profile (SSO / IAM Identity Center), SigV4-signed, no Bedrock API key.

Reviewed at 5a66cee: registry.json only (+3 -1), based on current main.
The entry has package, name, providers and en/zh summary, no "community"
flag, as the other third-party listings (officeace-auth, @hoptoper/*).
bedrock-sso doesn't collide with magpie's bedrock / bedrock-mantle presets.

Package read in full from npm pack magpie-aws-bedrock-sso@0.3.3 (sha512
matches npm's dist.integrity; 9 files: index.mjs, lib/{credentials,
sigv4,models,converse,eventstream}.mjs, README, LICENSE, package.json).
No dependencies, no install/postinstall scripts, no telemetry. Requests
go only to bedrock-runtime.<region>.amazonaws.com (fetch refuses any
other host, port, query or redirect; region is regex-checked) and
bedrock.<region>.amazonaws.com/inference-profiles for the model list.
Credentials come from `aws configure export-credentials`, `aws sts
get-caller-identity` and `aws sso login`, run through execFile/spawn with
argument arrays; they are kept in memory only. Files read: section names
of ~/.aws/config and ~/.aws/credentials, and magpie's ~/.cache/magpie/
models.json. Nothing is written. Not a relay: Bedrock is the vendor's
own platform.

Run on mote at 5a66cee: a registry check (JSON parses, 61 entries,
unique packages and provider ids, en/zh summaries), HOME=$(mktemp -d)
bun test (3718 pass, 8 skip, 0 fail) and bun scripts/check.mjs (all ok).

Not tried: the package itself with real AWS credentials.
2026-10-30 13:05:37 +08:00
SemonCat 498358c04e kiro 0.1.21: choose direct AWS sign-in for a remote magpie (#507)
The Kiro browser sign-in asks first which way to sign in:

- AWS Builder ID registers a client with AWS OIDC (us-east-1) and opens
  AWS's authorize page directly.
- IAM Identity Center asks for the organization's HTTPS Start URL and AWS
  region (blank is us-east-1), then opens that region's AWS authorize page.
- Kiro sign-in page keeps the portal (Google, GitHub, other ways); a caller
  without inputs (OpenCode's CLI) keeps it too.

The direct ways skip the portal's first loopback callback, so a magpie on a
server or in Docker needs one pasted callback address instead of two. Still
authorization code + PKCE, same scopes, same hosts (oidc.<region>.amazonaws.com,
Kiro's own API). The callback handler now takes each stage's own state and
path once, answers a stale or foreign address with 404 without ending the
sign-in, says 409 to a second paste while a code is traded, sends a repeated
portal address to the same AWS page, and a new sign-in ends the one left
behind and frees its port at once. Kiro's page's region and AWS issuer are
checked for shape (a region can no longer put another host into the OIDC
address). Version 0.1.20 -> 0.1.21.

Reviewed head: 236db712518305415f15651178696a59a72c4a8b (base f6412ab).

Run at that head, on mote, HOME=$(mktemp -d):
- bun test packages/kiro: 110 pass, 0 fail (17 files).
- bun scripts/check.mjs kiro: ok; node --check packages/kiro/index.mjs: ok.
- Review probes (not committed), 9 pass: method list and labels the same as
  main; the portal URL (no inputs, {}, portal) has main's shape; direct
  Builder ID through magpie's loopbackPorts/openPastedCallback emulation
  signs in with the PKCE verifier, reaches only oidc.us-east-1.amazonaws.com
  and management.us-east-1.kiro.dev, and the account it saves refreshes
  through the IdC refresh_token grant; a host-injecting region
  ("us-east-1.evil.com", "us-east-1/x") and a credentialed or http Start URL
  are refused before any request; cancelled at AWS (access_denied) fails
  with AWS's reason; an expired code at the token exchange fails plainly;
  AWS register failing throws and frees the port; a superseded sign-in
  fails "another sign-in to Kiro was started" and its port is reused; a
  portal-state address on a direct sign-in is 404 and ends nothing.
- PR CI (test, on-npm): green.

Not tried: a real AWS account sign-in (the author reports reaching the
Builder ID and organization login pages on a remote magpie, and one
organization sign-in completed); the 10-minute timeout path.
2026-10-30 12:34:29 +08:00
Fantasy f6412abc6f GoAnyAPI: the Discover card shows its own logo, a homepage link and new summaries (0.1.1) (#506)
GoAnyAPI: the Discover card shows its own logo, a homepage link and new summaries (0.1.1) (#506)

registry.json's icon was an https URL. magpie's icon() reads any name as
a bundled icon file, so the mask failed and the card fell back to the
generic cube. Without the registry icon, the card uses the package's
magpie.icon, which magpie fetches and stores. Also adds the package's
homepage and rewrites the en/zh summaries.

Reviewed at 33624fbc: metadata only (+4 -3). Checked icon() in
internal/gui/assets/app.js on magpie origin/main: an http(s) name goes to
maskSpan("icons/<url>.svg") and falls back to generic, as the PR says.
CI test and on-npm green. Kilo, Search1API and PowerContext's registry
icons hit the same fallback; that is fixed on the magpie side.
2026-10-30 11:24:13 +08:00
yetone b9cbb9dd01 workbuddy 0.2.1: an enterprise (教育公益版, team) sign-in is named with its enterprise, kept beside the personal one
A person's personal account and their enterprise account (a team, or
「WorkBuddy 教育公益版」, picked on WorkBuddy's sign-in page after the
phone sign-in) share the uid and the nickname. magpie's plugin host keeps
one account per name and uid (settle in host.js), so signing in to the
education account replaced the same person's personal account, and the
two could never sit in one pool.

A browser sign-in that WorkBuddy places in an enterprise is now named
"nickname · enterprise name": the name from /login/account, else from
the matching /v2/plugin/accounts entry, else "enterprise <last 6 of id>".
A personal account's name is unchanged. Old data: an enterprise account
signed in before keeps its old name until its Sign in again, which uses
the same key and renames it in place; its free-model window, read from
ledger rows under the old name, starts again (README says so).

Run (mote, HOME=$(mktemp -d)): bun test in packages/workbuddy, 256 pass
0 fail; bun scripts/check.mjs ok. Broken by hand: accountName returning
the nickname alone turns the 4 new enterprise.test.mjs tests red.
Not tried: a real education account (the owner has none; the live
/v2/plugin/accounts shows only a personal entry), so enterpriseName's
presence in WorkBuddy's replies for 教育公益版 is from the web client's
SelectAccount code, not a live reply; the id fallback covers its absence.
2026-10-30 11:01:20 +08:00
yetone 63748b9d67 zcode 0.1.36: a gift bucket beside a Coding Plan is named by its model first (#504)
Danbuth's GLM Coding Max account had claimed ZCode's Start Plan (plan_id
zcode-v3-start-plan-1029, named "ZCODE GLOBAL BUILD") and found no Start
Plan on magpie's card. The plugin did read it: usage asks
/billing/balance beside /quota/limit and adds every live gift plan's
buckets after the Coding windows, whatever the plan type, every plan
and not only the first. The bucket was the panel's third ring, named
"ZCODE GLOBAL BUILD · GLM-5.3-Trial", which magpie's ring and account row
cut to "ZCODE GLOBAL BUI…": neither the model nor the plan's kind.

ZCode 3.16.3's own popover (host getStartPlanSnapshot, renderer
"Today's balance") lists these buckets by show_name, apart from the
Coding Plan's windows. So a gift bucket's name now starts with that
(the picker's -Trial id when it counts a model) and the plan follows:
"GLM-5.3-Trial · ZCODE GLOBAL BUILD". A gift-only account with several
plans names them the same way round.

Run (on mote, HOME=$(mktemp -d)): `bun test packages/zcode`, 151 pass 0
fail; `bun scripts/check.mjs`, every package ok, exit 0. The new test
uses a real /quota/limit reply (owner's account, read in a sandbox HOME
copy with GETs only) and the real ZCODE GLOBAL BUILD plan row from #503,
times moved to now. Broken by hand (old label order): the new test and
five others red; put back, green.

Not tried: a real balance of the ZCODE GLOBAL BUILD plan (the owner's
account has none), so its buckets take the shape of ganlerk's Start Plan
balance. Not changed: magpie's tray panel shows at most three rings and
the account row two windows, so beside a Coding Plan's 5h and weekly
only the first gift bucket is on the panel; the rest are in the tooltip
and on the Usage page.
2026-10-30 10:31:28 +08:00
yetone 8ebbaa5880 zcode 0.1.35: claims each account's ZCode gift plans daily through magpie's check-in (#503)
ZCode hands out gift/resource plans that sit on an account until claimed,
and an account used only through magpie let them lapse. The plugin now has
auth.checkin, so magpie's daily check-in (`magpie accounts checkin`, and
Settings -> Daily check-in, where ZCode is off until the user turns it on)
claims them, the shape the MiniMax, Qoder and Loomy plugins use.

claimDaily reads GET /api/v1/zcode-plan/billing/preview (the list the card
already read) and POSTs {"plan_id"} to /billing/claim for each plan it
lists, with the account's ZCode jwt, X-Device-Mid, X-ZCode-App-Version and
X-Platform, as kongbai01203 captured them. The claim is judged by the body's
code: 0 claimed, 1003 "target already exists" (HTTP 200) done, 3007 or a
captcha message "captcha" (claim it in the ZCode app), anything else, an
HTTP error without a code or a body that isn't JSON failed. A failed read is
never taken as claimed, and no answer carries signIn, so a failed claim
leaves the account as it was. Nothing listed is inactive; a key-only
account is ineligible; an expired ZCode session is failed with no request.
A plan claimed now drops the account's cached route, so the next request
uses it. One failed among several makes the whole answer failed (with the
claimed ones named), so magpie asks again later and the claimed ones then
answer 1003.

Run (on mote, HOME=$(mktemp -d)): `bun test` in packages/zcode, 150 pass;
the whole repo's `bun test`, 3698 pass 0 fail of 3706 across 297 files;
`bun scripts/check.mjs zcode` ok. checkin.test.mjs covers preview empty,
one plan claimed with code 0 (request body and headers checked), 1003,
3007, seven unreadable claim answers, five unreadable previews, one
claimed + one failed then asked again, and key/expired accounts asking
nothing. Broken by hand: 1003 -> claimed and an unreadable reply ->
claimed turned three of these tests red; put back, green.

Not tried: a real claim that answers code 0. No account has a plan to
claim right now (every preview answers plans: []), so the code 0 body is
a fixture carrying only its code, and nothing else of it is read. On
10-06 a claim without the ZCode app's Aliyun captcha was answered 400
code 3007 (#30); if ZCode still asks that for a fresh plan, the check-in
says "captcha" and the plan is claimed in the app, as before. The real
1003 reply is in the tests as captured.
2026-10-30 08:24:30 +08:00
yetone 9608d0311d grok 0.2.2: Responses requests ask for Grok Build's loop checks (yetone/magpie#3594)
Grok Build 1.0.67 sends `x-grok-doom-loop-check: 1024` and
`x-grok-exact-repetition-check: 64` on every /v1/responses request
(seen in a mitm capture of the real CLI; the strings are in its binary
next to "server reported doom-loop triggers for this response"). The
plugin sent neither. Without them cli-chat-proxy lets a reply that
repeats itself run on: it cut "* " repeated after ~4,265 output tokens,
and a looser loop runs to max_output_tokens (128000 from Pi). That is
the "repeats until max output, ends in Internal error during token
generation" of #3594, seen on Pi -> magpie -> Grok but not in Grok
Build. The fetch now sets both on a Responses request unless the
caller set them already.

Ruled out while diffing the CLI's request against magpie's: the system
prompt. `instructions`, a system message and a developer message in
`input` all reach the model (same input_tokens, 1266 vs 1249 without,
same reply), so magpie's `instructions` is not lost.

Run:
- bun test in packages/grok on mote: 85 pass 0 fail.
- bun run check (whole repo) on mote: exit 0.
- Broken by hand: loop-check.test.mjs against index.mjs at HEAD:
  2 of 3 fail (the headers are missing); with the change 3 pass.
- Real account (owner's SuperGrok, sandbox magpie on origin/main with
  this plugin from disk, requests through mitm): the same "* " x3000
  prompt over /v1/responses, /v1/chat/completions and /v1/messages each
  carried both headers upstream and was stopped after ~1,020 deltas
  (~1K tokens) with "Internal error during token generation", against
  ~4,265 tokens without the headers (direct curl, earlier).

Not tried: the CLI's client-side doom-loop recovery (it resamples a
confident tool-call loop with a reminder). The proxy's
response.doom_loop_check event (a soft loop it reports, not stops)
goes through as it came and nothing acts on it yet.
2026-10-30 06:51:57 +08:00
yetone 24d0d428f0 registry: GitHub Copilot's card shows GitHub Copilot's logo
Its listing named no icon, so magpie's Discover page drew the generic
plugin glyph for it, beside every other subscription's vendor logo.
"githubcopilot" is the icon magpie bundles (internal/gui/assets/icons/
githubcopilot.svg) and already uses for the built-in Copilot.

Run: registry.json parses as JSON; the icon file exists on magpie main.
2026-10-30 04:01:46 +08:00
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