da079585d9cdd1fcbedfcfc60bbff316efe5e76a
35
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
efa41e36e3 |
joycode 0.1.1: JoyCode (JD Cloud) with JD's browser sign-in, account models, credit multipliers and usage (#347)
New package @magpie-community/opencode-joycode-auth 0.1.1 (provider id `joycode`) and its registry entry (en and zh). JoyCode is JD Cloud's own coding IDE subscription (joycode.jd.com, api-ai.jd.com), not a relay.
- Browser sign-in through JoyCode's own login page. The page sends the browser to http://127.0.0.1:<authPort>/ with authKey and pt_key; I checked this against the page's bundle. A request without the right authKey gets a 404 and leaves the sign-in pending. A ptKey can also be pasted, with an optional tenant.
- Chat completions are signed per request (HMAC over a fresh t), with userId, tenant and orgFullName from joycode_userInfo. A bare JSON error sent as HTTP 200 SSE becomes an error reply: code 401 is 401 with sign-in expired, AI_GRAY_ACCESS_DENIED is 403, anything else is 502. JD's msg is kept as the error text.
- Account models come from joycode_modelList, credit multipliers from plugin_config billingRate, and credit usage from get_newpoint_ide (windows set aside).
- Contacts only JD's hosts. No runtime dependencies, no install scripts, no logging. The ptKey is kept only in magpie's plugin-auth.json.
Reviewed every line at c80068f and again at 1cac30c, which fixed all five review points: the README link, JD's `msg`, tests for the authKey check and for the HTTP 200 SSE code 401, the stale header comment, and stray loopback requests.
Run at the reviewed head 1cac30cce31a1f3efeb39b2c61df257963e655a, whose parent is main
|
||
|
|
08ff18a438 |
nous: Nous Portal models with Nous Portal's device sign-in (#163, laojianzi)
New package @magpie-community/opencode-nous-auth (provider nous-portal): Nous Portal models, signed in with Nous Portal's own OAuth device flow (public hermes-cli client, inference:invoke scope). The plugin keeps its own sign-in (never reads ~/.hermes), renews the single-use refresh token through x-nous-refresh-token, and sends requests to the Nous inference API with the JWT, retrying once after a 401.
Review fixes in d2f8fa0 (from the review at e8831a8):
- A refresh refused with 401/403 and no OAuth error code (HTML or empty body from an edge or proxy) keeps the sign-in and retries after 30s. Only invalid_grant, invalid_token or refresh_token_reused ask for a new sign-in.
- registry.json and README describe the plugin as Nous Portal models with Nous Portal's device sign-in; plan sharing is one line pointing to Nous's docs.
- content-encoding and content-length are dropped from the decoded response, like grok and cline.
- A token reply with neither expires_in nor JWT exp is renewed after one hour, not every 30s. The fallback never extends an explicit expires_in or exp (the earlier bound wins).
Run at d2f8fa0 merged with origin/main
|
||
|
|
e7f65641df |
Add layerfs: LayerFS workspaces as tools for every agent (#318)
New community tools package @magpie-community/tools-layerfs 0.7.1 (Mola-maker): LayerFS workspaces as tools for every agent. It imports a source folder into a versioned workspace under MAGPIE_LAYERFS_HOME (default ~/.magpie-layerfs), with checkpoints, history and diffs. Running commands (exec) is off unless the user turns it on. No network access. registry.json gains its one entry.
Run at the reviewed head 4795df0 (merges cleanly onto origin/main
|
||
|
|
dbcd4e9464 |
add cloudflare-workers-ai: Cloudflare Workers AI provider plugin (#326)
New community provider plugin @magpie-community/opencode-cloudflare-workers-ai-auth 0.0.1 (Guislabert): signs in to Cloudflare Workers AI with an API token and Account ID, lists the models models.dev has under cloudflare-workers-ai, marks the 8 paid-only models "(Paid)", and adds a Neurons/day quota row. registry.json gains its one entry.
Run at the reviewed head 84b3aaf (based on origin/main):
- bun scripts/check.mjs cloudflare-workers-ai: ok
- node --test in the package under a temp HOME: 12 of 12 pass
- models.dev outage repro (stubbed fetch, discoveryTTLMs 1, catalog reachable then down): the second request still goes out ("down: sent 2"). At 6e9fd73 it failed; review asked for this.
- registry.json diff against main: the one new entry only
Not tried: a real Cloudflare account; no request reached Cloudflare.
|
||
|
|
43ffb46018 |
agent: PiG (Pi in Go), with Magpie's endpoint and model catalog (#264)
New package @magpie-community/agent-pig 0.1.0, a connect-only Agent:
it manages the whole providers.magpie object in ~/.pig/agent/models.json
(name, baseUrl, apiKey, api openai-completions, models) and nothing else.
settings.json and auth.json are not touched; disconnect restores a prior
same-name provider or removes the provider whole. Models keep their ids,
names, image input, positive limits (output capped at the window), and
map Pi's seven thinking levels onto the model's efforts (off -> none,
unsupported -> null).
Re-review of head 7134b1038: both points of the 10-21 review are fixed.
The package README no longer names e2e scripts that aren't shipped, and
installs with `magpie plugin add @magpie-community/agent-pig`. Code is
unchanged from the reviewed 43fb5d927.
Run at this tree (PR squashed onto origin/main
|
||
|
|
6579f0682a |
codearts 0.2.0: Huawei Cloud CodeArts (码道) coding plans, with Huawei Cloud OAuth sign-in (#284)
New package @magpie-community/opencode-codearts-auth 0.2.0 (Sakura-Natsu): Huawei Cloud CodeArts (码道) coding plans, with Huawei Cloud OAuth sign-in, request signing (SDK-HMAC-SHA256), a per-account cap of 3 in-flight sessions, per-account free/regular model lists, and requests signed only for https Huawei Cloud hosts. Reviewed head 31099104 (two rounds; the first asked for changes at a793ca5, all fixed here). Run at the reviewed head, macOS, bun 1.4.2, with a preload that allows only loopback network: - HOME=$(mktemp -d) bun test packages/codearts: 91 pass, 0 fail - HOME=$(mktemp -d) bun test (whole repo): 2011 pass, 0 fail - bun scripts/check.mjs: 21 ok - 10 parallel bun test --rerun-each 40 in packages/codearts: 0 fail - 22 hand breaks (signature, DPoP proof, 403 expired mark, session clamp, host check, per-account lists, callback server, refresh mark); 21 went red. The one green is the callback's prefix-path match (follow-up). Not tried against Huawei's real API (no credentials); sign-in, signature acceptance, session counting and metering rest on the author's use on two accounts. Follow-ups: list the exact Huawei hosts instead of *.myhuaweicloud.com / *.huaweicloud.com; fail at once on a callback with no code; drop the unused ticketId; exact callback path match. This is a new npm name, so its first publish needs an owner. |
||
|
|
0a998a8a7f |
antigravity-cloak 0.1.0: Claude Code and Claude Desktop on an Antigravity account
Antigravity answers a system prompt that reads as Claude Code's or the
Claude Agent SDK's with a 429 "Resource has been exhausted", whatever
quota is left (xzplzpl on X). Tried with a real account, it matches
"x-anthropic-billing-header:" and "You are a Claude agent, built on
Anthropic's Claude Agent SDK", and lets the same prompt through with a
U+200B inside each. This middleware puts one after the first letter of
both words, in system text only (Anthropic system, Chat/Responses system
and developer messages, Responses instructions, Gemini
systemInstruction), and only in what an Antigravity account is sent: it
uses magpie's new onProvider hook (v0.1.1283), so a Claude subscription
or any other provider in the same routing group gets the prompt as the
agent wrote it. Options: extraWords, accounts, off. The README says the
ban risk and what happens if Google changes its match. After hexiaolv's
magpie-antigravity-cloak (MIT), which changes every request.
scripts/middleware.mjs: a case's "provider" runs the request on through
onProvider with ctx.provider, and expect_request is that try's body.
Run:
- HOME=$(mktemp -d) bun test: 1783 pass, 0 fail (the package's 12 cases
among them). bun scripts/check.mjs: every package ok.
- Real use: magpie built from e44b9aef3 in a sandbox HOME, a real
Antigravity account, this package added from its folder. Claude Code
2.1.302 `claude -p` on antigravity/gemini-3-flash answered; with
{"off": true} the same run got the 400. /v1/messages with the billing
line, the SDK line and Claude Code's three system blocks: 200 each on,
400 each off.
|
||
|
|
646776060f |
kimi-desktop: Kimi desktop Work as an agent, through its local runtime (#169)
Adds agent-kimi-desktop 0.1.0 (kupakupar): Kimi desktop Work on magpie's
Agents page. It moves the runtime's daimon-kimi-code baseUrl to a
loopback bridge and back, through Kimi's local control API.
Re-reviewed at dd8ed2c against the last review at 6c584bb:
1. menu-hook.cjs and selection.mjs are removed; no injected code ships.
2. No full config backup is written. Only before-menu-models.json (the
model list and current choice) is kept, and it is removed on a clean
disconnect.
3. providers.json and settings.json are never opened. The catalog comes
from the gateway's /v1/models with the agent's key and its registered
UA "Desktop Kimi Work".
4. No signal handlers and no process.exit. Restore runs on the 'exit'
event, which fires when magpie closes the host's stdin (host.js
rl.on("close") -> process.exit(0)). The README gives manual recovery
after a SIGKILL.
5. macOS record: COMPATIBILITY.md (macOS 26.6.2 arm64, Kimi 3.2.17
build 3.2.17.4, magpie 0.1.1276, Bun 1.4.3). All four control methods
succeeded, a streamed request returned 200, and a restore followed.
The README says what happens when a private method fails.
6. Search and fetch pass Kimi's own request, with its own key, to Kimi's
own origin, unchanged. This is the user's own account used by that
user, the same rule as #171, so it is accepted.
Run at dd8ed2c, and merged onto origin/main
|
||
|
|
adcc7252d0 |
kimi-work: a Kimi desktop Work subscription through the desktop's own sign-in (#171)
Adds kimi-work 0.1.3 (kupakupar): a provider for the Kimi desktop's Work
subscription, using the desktop app's own local sign-in. It stores only
a hashed account reference, rereads the desktop's tokens on each call,
writes nothing to disk and logs nothing.
Re-reviewed at d9fe48d against the last review at fc3e395:
- (1) the desktop credential: decided acceptable (same as WorkBuddy,
Qoder, ZCode: each user's own allowance).
- (2) macOS record: COMPATIBILITY.md, macOS 26.6.2 arm64, Kimi 3.2.17
(3.2.17.4), magpie 0.1.1276 (released 2026-10-16 17:11Z, before the
20:09Z run), Bun 1.4.3. The path and four field names match readDesktop.
- expireTime: resetsAt dropped, window renamed 会员共享额度.
- efforts: every advertised level is kept (redacted real catalog fixture).
- kimi-work-opencode overlap: the README credits it and says not to
enable both.
- Request input: handled; body, headers and signal are kept, and the
desktop credential replaces any caller Authorization or Cookie.
- Icon is shipped once (package.json); the UA reads the package version.
Run at d9fe48d, and merged onto origin/main
|
||
|
|
7687314d07 |
codex-history: opt-in Codex Responses history filter middleware (#152)
An opt-in gateway middleware for Codex Responses history after a provider or account switch. For a provider whose rule turns historyFilter on, it drops old reasoning items and items typed encrypted_content, removes the optional server id from message and tool items, and sets store false. It keeps text, tool arguments, results and call_id pairing. It rejects previous_response_id, conversation, item_reference, encrypted compaction and /responses/compact with a message, instead of dropping them silently. Every provider passes through unless configured. No network, file, env or child-process access. Run at the reviewed head 96881ead, merged with origin/main: - bun test packages/codex-history: 22 pass, 0 fail. - The same 22 cases.json cases through magpie's own engine (moejs, via internal/middleware Begin/Request in a throwaway test): 22 ran, all equal. - Broke it by hand (reasoning items kept): bun 4 fail, moejs 4 BAD; restored. - Whole repo: bun test 1606 pass, 0 fail; bun scripts/check.mjs exit 0. |
||
|
|
423e78e49c |
autoclaw 0.1.0: AutoClaw (Zhipu OpenClaw) provider plugin (#53, hubo1989)
Adds packages/autoclaw, @magpie-community/opencode-autoclaw-auth, for AutoClaw (Zhipu OpenClaw). - Providers autoclaw (oversea, web sign-in through Google or z.ai) and autoclaw-cn (CN, phone SMS). - Reads the credit balance and runs the daily check-in through auth.checkin. Since the 10-08 review, this fixes: - The OAuth callback takes a code only with the state the authorize page handed out (login CSRF). The legacy /callback is gone. - The local server closes after 10 minutes even if magpie never calls callback, so port 18432 isn't held. - The registry entry no longer uses ZCode's icon. - The User-Agent names the real arch. - The check-in row's used is 0. - A 401 or 403 the upstream answers without an envelope marks the sign-in expired. - New tests with a fake fetch cover loader().fetch, refreshTokens and the callback's state check. What was run, at 356fb53 (8a0fd3a plus a merge of origin/main 118cf2e; the merge resolved registry.json, raccoon's entry beside autoclaw's): - HOME=$(mktemp -d) bun test packages/autoclaw: 9 pass, 0 fail. - Whole repo, HOME=$(mktemp -d) bun test: 1584 pass, 0 fail. - bun scripts/check.mjs: all ✓. - Broken by hand, each turning a test red: - Dropping the callback's state comparison: 1 fail. - Dropping the expired mark on a non-envelope 401: 1 fail. - The package isn't on npm yet. magpie serves it from the dist branch until an owner publishes its first version. Not verified: a real AutoClaw account, and the 10-minute server close (read, not tested). |
||
|
|
118cf2edcc |
raccoon 0.1.0: SenseTime Raccoon (商汤小浣熊) provider plugin (#88, yijiemaooo-ux)
Adds packages/raccoon, @magpie-community/opencode-raccoon-auth, for SenseTime Raccoon (商汤小浣熊, xiaohuanxiong.com).
- Sign-in: through the browser, or reusing Raccoon desktop's live sign-in.
- Lists the models and makes chat requests.
- Reads account credits (balance and bills).
- Runs the daily check-in through auth.checkin, plus the desktop's first-login grant. The grant is marked settled only when the vendor gives a definite answer.
What was run, at the reviewed head 6078f92 merged onto origin/main
|
||
|
|
df3a04070a |
README, registry: tools, pages and routing strategies, and how to write your own
registry.json lists tools-calc (kind "tools"), page-usage (kind "page") and middleware-reserve (kind "middleware"), community, with en/zh summaries and no icon (magpie has none that fits). README: sections "Routing strategies" (under Gateway middleware), "Tools for every agent" and "Pages", each with a table and what a package of that kind is a folder with; "Write your own" pointing to usemagpie.ai/docs/plugins (#tools, #pages, #gateway-points, #middleware, #agents, #quick) and to a template package of each kind. The market section names the kinds. Run: registry.json parses (26 entries); HOME=$(mktemp -d) bun test 1554 pass, 0 fail; bun scripts/check.mjs ok. Known: magpie main's Plugins > Discover (plugins.js kindOf) treats any kind but middleware and agent as a provider, so the tools and page entries show with the provider chip until magpie learns those kinds. |
||
|
|
8c4bf5cc72 |
registry: Type4Me (agent-type4me 0.1.0) under Agents (#139, kchen0x)
Lists @magpie-community/agent-type4me (merged in #136) on the Plugins tab under Agents, with an en/zh summary like Aider's. Not on npm yet (E404 on registry.npmjs.org); magpie 0.1.1243+ installs it from `dist`, which the README's Publishing section says is no reason to hold a listing.
Run at the reviewed head 1ff93d8 (on top of origin/main
|
||
|
|
3db704a677 |
opendesign 0.1.4: Open Design Cloud (Design Plan) as a provider (#84, dbydd)
New package @magpie-community/opencode-opendesign-auth 0.1.4, provider id `opendesign`: an Open Design Cloud account's Design Plan as a magpie provider (dbydd, #84). Reviewed at this head (37ef688), as in the PR's last review: `HOME=<temp> bun test` for packages/opendesign, 19 pass; `bun scripts/check.mjs opendesign` ✓; the package loads under Node and Bun; `npm pack --dry-run` packs 5 files; a stubbed usage call sent its User-Agent to amr-api.open-design.ai only. The only hosts in it are amr-api.open-design.ai and amr-link.open-design.ai, with no install script, child process, or write outside OpenCode's auth store. It no longer waits on its first npm publish: the publish workflow packs it onto the dist branch, and magpie 0.1.1243 and later install it from there until npm has it. |
||
|
|
6aca699263 |
registry: Aider (agent-aider 0.1.0) under Agents, the market's first agent
Checked on npm first: npm view @magpie-community/agent-aider@0.1.0 resolves
(published by publish.yml over OIDC,
|
||
|
|
446d962769 |
registry: Block Patterns stays out of Discover until it is on npm
@magpie-community/middleware-block-patterns is new to npm, so trusted
publishing can't create it (publish run for
|
||
|
|
f0b34e2e53 |
block-patterns: turn away requests carrying listed words or patterns, in every API magpie serves (#39)
* jev-guard: Jev System One guardrail middleware for request inspection and rejection * block-patterns 0.1.0: turn away requests carrying text you list, in every API magpie serves yetone's review of the jev-guard PR (#39) showed the guard only caught a plain-string last user message: Claude Code's content blocks, Codex's Responses input_text items, Chat Completions parts, Gemini parts and the system prompt all passed it through, and the README claimed gemini was covered when no code read it. The package is renamed block-patterns, since "Jev" and "System One" are not explained anywhere and "System One" is already magpie's own routing feature, so users would read it as part of it. It is now plain substring and regular-expression matching, described as such, and the README says plainly that it is literal matching rather than a safety classifier: it does not understand a request, and a synonym or an obfuscated spelling passes it. build() now reads every shape an agent sends text in — plain strings, text and input_text blocks, Responses input items and Gemini parts — across all four APIs, and every user turn rather than only the last, so a pattern earlier in the conversation is caught. "system" (true by default) also reads the system prompt and the Responses instructions; set it to false to leave them out. Tool calls, tool arguments, tool results and Gemini thought parts are never read. The no-op onResponse is gone rather than kept for a hook call. Its cases.json covers each shape and each exclusion, and the middleware itself is only onRequest now. bun test packages/block-patterns (25 pass, 0 fail) and bun scripts/check.mjs pass. Not tried against a live gateway. * block-patterns 0.1.1: read every system prompt an API actually sends, and stop one bad pattern from throwing Four gaps in 0.1.0, all reported in the second review of #39 and confirmed against the code here before changing anything. Anthropic keeps its system prompt out of messages: it is the top-level `system` field, a string or the block array Claude Code sends, and only the Chat branch saw it as a message — so a listed word in an Anthropic system prompt passed even with "system": true. It is now read on the same terms as a system message, and left out with "system": false. Gemini's systemInstruction is documented as a Content, and only its string form was read; the `{ parts: [{ text }] }` object and the system_instruction spelling both passed. All three are read now, via a new systemTexts() that skips thought parts as the rest of the scan does. The Responses branch read `system` but not `developer`, though the Chat branch read both — now consistent. matcher() called new RegExp unguarded, so a single invalid pattern threw on every request the gateway saw, including ones that matched nothing. Each pattern is now compiled on its own first and one that fails is left out, so the others still work and nothing is thrown. The combined expression is compiled under a guard too, though an alternation of valid patterns cannot fail. cases.json is 39 (was 25): the four shapes above with their real request bodies, the two system:false counterparts, a Gemini thought part in a system instruction, four invalid-pattern cases, and a case pinning that Chat Completions has no top-level `system` to read. Both READMEs now carry a "Word Guard vs this" section and word-guard's README points back, so the two packages' split is documented rather than a reader's guess. The system prompt's home in each of the four APIs is a table rather than prose. Re-ran the first review's six shapes against the committed middleware: 6/6 blocked, and tool_result / tool_use input / assistant turns / Gemini thought parts / function_call_output all still pass through. Not tried against a live magpie gateway. bun test packages/block-patterns (39 pass, 0 fail), bun test packages/word-guard (13 pass, 0 fail), bun scripts/check.mjs pass. |
||
|
|
d17b7ed844 | registry: zen-free uses magpie's bundled opencode icon, since the GUI can't show an icon by URL | ||
|
|
f5dc146c2c |
Add OpenCode Zen Free provider plugin (#31)
* Add OpenCode Zen Free provider and market listing * Guard Zen tool calls and address provider review * Preserve upstream SSE error frames in Zen tool guard * Restore Zen Free package name and simplify README title |
||
|
|
d9236e976f | middleware: param-override, model-map, system-prompt, word-guard and think-tags — gateway middleware that magpie runs on every agent's requests and replies, mostly New API's channel settings with the same JSON (the owner) — magpie can now run a plugin as gateway middleware (onRequest, onEvent, onResponse, in-process on moejs), and these are the first ones: param-override is New API's param_override (both forms, operations with gjson paths and conditions, return_error); model-map is model_mapping (chains, /regex/ keys with $1) and puts the asked-for name back into replies; system-prompt adds a prompt in each API's own place, keeping an agent's own unless override (New API's semantics), by agent or model; word-guard is the sensitive-word filter (reject or mask the user's text, optionally replies); think-tags strips a leading <think>…</think> from replies across stream chunks, or puts Chat reasoning_content into the text (thinking_to_content). Each is one file with no imports, named @magpie-community/middleware-<name>, with magpie.options as the example the app's editor starts from; registry.json lists them with "kind": "middleware" and no providers; check.mjs skips middleware-only packages. scripts/middleware.mjs calls the hooks as the gateway does (events split, [DONE] passed by) and runs each package's cases.json. Tested with a real DeepSeek account and real Claude Code through magpie's gateway: a mapped model named back in message_start, max_tokens capped, a system prompt appended for claude only, a word turned away as a 400 in Anthropic's shape, return_error as a 403 in Chat's, <think> stripped from Chat and Responses streams and an Anthropic whole reply, reasoning_content moved into the text. bun test (61 for these five) and bun scripts/check.mjs pass; packages/devin's two image tests fail on this machine only, as on main. Their first npm version has to be published by hand (trusted publishing can't create a package); until then magpie shows them as Coming soon. | ||
|
|
42783f0033 |
trae: one package, two realms — Trae Global folds into packages/trae (#23)
* trae: one package, two realms — Trae Global folds into packages/trae The review asked for this and it is the right shape: the two deployments share one implementation. 86 of the 89 top-level names were already the same code; what differed was a table's worth of values (hosts, client, versions, usage page, fallback models, error codes) and two realm-only branches. A separate copy meant every request, stream and tool-call fix had to be made twice, and it had already drifted (the 0.1.15 Max fix came back as a bug there). packages/trae now holds a SITES table with two entries — trae-cn and trae-global — and makePlugin(site) builds a provider from one. Exported as TraeCNAuthPlugin and TraeGlobalAuthPlugin. The CN values are moved verbatim, not re-derived: same hosts, client id, app id, IDE/client versions, plugin version, brand, functions, fallback models, credits page, and its own check-in pages. The international entry carries what only it has: the second (US) deployment and the region that selects it, the dollar billing's entitlements page, its own model names, and its extra lapse/quota codes (20101, 4011). The CN plugin needs the stream fix too (the review's point), so the AbortController the loader now builds per request, openai()'s abort, and sse()'s finally are in this one implementation for both realms — as is the wrong-function retry releasing the read it leaves behind. fake.mjs takes a realm id, defaulting to CN so every test written before the fold is unchanged. The global tests move to global.test.mjs, plus new ones for what only the international realm does: the US/SG routing of a request and of a saved sign-in, its own error codes and error name, the dollar usage page, and its fallback model list. chatModel gains the picker's invisible-entry filter (paygo/auto twins, search agents) and the config hook names the realm's own provider. The acceptance test: packages/trae/*.test.mjs' 48 CN tests are untouched and green — that is the proof the refactor changed no CN behaviour, with its constants verified line by line against HEAD. bun test: 63 pass (48 CN + 15 global); bun scripts/check.mjs trae: ok. registry.json: one entry, providers [trae-cn, trae-global]. README: both realms, each realm's endpoints, usage page and codes; the verification range stated honestly (CN never run live; Global on one Free SG account, no Pro and no US account). * trae: Trae CN's model lists stay whole; only Global hides is_invisible_to_user The fold filtered is_invisible_to_user for both realms, which took 40 of Trae CN's 76 models out of its list. CN is served as before; Global (a site flag, hidesInvisible) keeps the filter. Also: the unsupported-request error names the realm, and two duplicated/merged comments are tidied. --------- Co-authored-by: yetone <yetoneful@gmail.com> |
||
|
|
99cac44cf8 | registry: hold Trae Global back until its first version is on npm — @magpie-community/opencode-trae-global-auth is new, trusted publishing can't create it (publish run 37282007405), so magpie's Plugins page listed a plugin whose install failed. Listed again once its first version is published by hand. | ||
|
|
228628689f |
Add Trae Global (trae.ai) plugin - trae-global provider (#22)
* Add Trae Global (trae.ai) plugin — trae-global provider Trae international (trae.ai, ByteDance's AI IDE international build) as a provider plugin: sign in with Trae's own browser flow, free tier included, models served through the international llm_utils_chat gateway. Same plugin contract and request/response machinery as the Trae CN plugin (packages/trae), a separate deployment: different domains, OAuth client, model catalog, plus a US region (coreva) routed by the account's AIRegion. The usage card reads the dollar billing's entitlements (basic+bonus allowance) from the pay host, with the Free plan's /month allowance riding it. bun test: 41 pass; bun scripts/check.mjs trae-global: ok * trae-global: a stream the agent walks away from closes Trae's connection The bug: an answer whose tool call the agent acts on is cancelled mid-read, and the read to Trae was left hanging. A generator's return cannot break a read that is already waiting on reader.read(), so the SSE reader kept its half of the connection open, and the host the next ask reused was one Trae had dropped — a stream that runs, then dies, exactly around tool calls. The fix: the answer's fetch is what gets stopped. The loader builds one AbortController per request, follows the caller's abort signal into it, and openai() aborts it when the stream is cancelled. sse() also lets its reader go in a finally, for the paths that end the generator rather than the fetch. stream.test.mjs: the agent reads, then cancels with nothing more coming, so only aborting Trae's fetch can release the read — red before, green after. bun test (42 pass); bun scripts/check.mjs trae-global: ok * trae-global: the review's three blockers — planLocked, the 0.1.15 Max, usage's error code planLocked is gone. It read display_contact_config's identity_list and assumed every account is Free (identity 0), so a paying account lost exactly the models it pays for — gpt-5.5, the gpt-5.6 family, gpt-6, glm-5.2 — and could never pick them. The plugin is never told the account's own identity (not at sign-in, not in the entitlement answer), so nothing is filtered on identity now: the list is the account's own, the IDE greys out what the plan locks, and a locked model answers Trae's own 1005 when asked. The picker's invisible entries (paygo/auto twins, search agents) stay out, as before. maxModel takes the 0.1.15 fix: a model's Max is found across every list that names it, not just the one entry the model is listed through — chat_v3 can name the __max model while the SOLO list names only __dev, and the window can be another entry's again. Without it the same "no -max model" bug the CN plugin fixed in 0.1.15 comes back here. maxes holds each model's Max for the models hook, as CN's does. usage: a 200 carrying an error code (e.code !== "0") now says Trae's own message instead of "no entitlement pack in the answer", as CN's does. README: the verification range is stated honestly — one Free account, SG realm, no Pro and no US account tried; paid-account behaviour is implemented from the interface's shape, not confirmed on a live one. registry.json marks Trae Global experimental, as Trae CN is. usage.test.mjs: the locked-model test now asserts the paying account's list, and a new one asks a paid account's gpt-5.5 through the gateway. stream.test.mjs: a Max split across lists is listed and asked where its __max model is named. Each red before its fix, green after. bun test (46 pass); bun scripts/check.mjs trae-global: ok |
||
|
|
5847375f65 | registry: Trae CN is back in magpie's Plugins list — @magpie-community/opencode-trae-auth 0.1.0 is on npm (published by hand), and publish.yml is its Trusted Publisher, so later versions publish from Actions like the rest | ||
|
|
3ef969d824 |
registry: Trae CN stays out of magpie's Plugins list until @magpie-community/opencode-trae-auth is on npm
Trusted publishing can't create a package that doesn't exist yet, so the publish run for trae 0.1.0 failed and magpie would offer an install that fails. The entry comes back once 0.1.0 is published by hand. |
||
|
|
6c048c7fc2 |
trae 0.1.0: Trae CN (trae.cn) accounts, free tier included, with Trae's browser sign-in (experimental; Discord pdzebkbd0701)
Sign-in is trae.cn's authorization page back to a 127.0.0.1 /authorize callback (userJwt + userInfo, or a refresh token exchanged), with a device made at sign-in and kept for the account. ExchangeToken renews the JWT through auth.refresh (refreshLead 10 min, one renewal per refresh token). Requests go to the IDE agent's llm_utils_chat (chat_v3, then solo_work_lite on 4001/4023/1005), its SSE events turned into OpenAI chunks; tools named natively and as <tool_call> blocks. Usage is the entitlement packs' credits. Worked out from wangqi233/trae2api and autumnsentiment/Trae2api-cn; not run against a real account. |
||
|
|
8b4f759455 |
Cline: usage billing, ClinePass and the free models, with Cline's own device sign-in or an API key (#2)
* Cline: usage-billed models, ClinePass's and Cline's free ones, on your own Cline account — Cline's device sign-in (WorkOS device code, traded at /auth/register) or an API key; chat completions on api.cline.bot with Cline's own client-identity headers (pinned to the current CLI release — what the free models' gate reads), the non-stream data envelope unwrapped, the model list from Cline's recommended-models feed, usage from the account's balance (counted in millionths of a dollar). cline-pass answers 403 ENTITLEMENT_ERROR without the subscription and the message says so; so does an empty balance, with the top-up URL.
* cline 0.1.0: the pinned CLI version and the workos: prefix move to Cline's current client — apps/cli is at 3.0.68, and provider-auth-registry's formatProviderOAuthApiKey lowercases before it startsWith("workos:") so a token stored as WorkOS: is not double-prefixed here either; bearerOf's "once" test fails against 0.1.0.
* cline 0.1.0: the model list is Cline's whole catalog, not just the recommended feed — the title promised usage-billed models but the plugin read only recommended-models (6 paid models), while Cline's own clients also load /api/v1/ai/cline/models (loadCloudModels), so most usage-billed models were missing. The four feed arrays are now read by name instead of walking every value (a tag or description could become a model, and one in both recommended and free lost its "(free)"), clineCloud stays out as the client leaves it out, a raw-id name is prettified, and the bundled snapshot drops gemini-2.5-pro and minimax-m2.5 (not in cline-recommended.generated.ts) and gains the missing cline-pass/* entries; the parseFeed, snapshot and models-merge tests fail against 0.1.0.
* cline 0.1.0: a refresh failure no longer fails a request that still has a good token, and a rotated pair survives a failing auth.set — a 4-minute token plus a 500 from /auth/refresh answered the chat 502 and never sent it, and with auth.set throwing the next request re-spent the old refresh token, got invalid_grant and marked the account expired. fresh now keeps the current token on a transient failure while it is still good (Cline's getValidClineCredentials), failing only once it has expired, and the latest rotated pair is held in memory beside the save (kiro's held), used when getAuth still hands back the spent token; the still-good-token and rotated-pair tests fail against 0.1.0.
* cline 0.1.0: failure() keys on Cline's error codes and whole phrases, not loose substrings — a 403 whose text mentioned "tokens" (max_tokens exceeds…) became "the sign-in lapsed — sign in again" and lost the real message, and any message containing "credit" became a 429 usage limit. The 401/403 token check, the out-of-credits and entitlement checks and the 429 check now match what Cline's client matches (ENTITLEMENT_ERROR, insufficient_credits, SPEND_LIMIT_EXCEEDED, the not-subscribed wording), and a renewed token clears the lapse mark through the error path too as qoder's renewed() does; the codes-and-phrases and renewed-mark tests fail against 0.1.0.
* cline 0.1.0: device polling grows the interval for good and rides out a bad poll — slow_down raised it for one poll only (RFC 8628 and Cline's pollWorkOSTokens do interval += 1 permanently), the minimum was 0.25s where the client clamps to 1s, and a single 5xx, non-JSON reply or network error ended the sign-in with "the token answer had no access token". The poll now keeps polling through those; the slow_down, one-second and bad-poll tests fail against 0.1.0.
* cline 0.1.0: the held pair covers every refresh token this run has spent, not only the last — when auth.set goes on failing (which a store that failed once usually does) getAuth keeps handing back the first pair, and a second rotation overwrote held.from, so the third request refreshed the already-spent r1 again: /auth/refresh went r1, r2, r1 and the chat answered 401 expired. held.from is a Set every rotation adds to now, and the held pair is used whenever the refresh token getAuth hands back is in it; the two-rotation test fails against 0.1.0 (200, 200, 401).
* cline 0.1.0: X-CORE-VERSION moves to 0.0.90 with the CLI release — the header set pinned 3.0.68 beside 0.0.89, but cline@3.0.68 depends on @cline/core 0.0.90 (0.0.89 is what 3.0.67 shipped) and resolveProviderRequestHeaders sends X-CORE-VERSION from that dependency, so the number the comment calls the one that has to match was a release behind; the client-header test pins the pair now and fails against 0.1.0.
* cline 0.1.0: a poll reply that isn't JSON and isn't a 5xx fails the sign-in at once — a body that wouldn't parse was read as WorkOS having a moment, so an HTML 400 (a proxy's error page, say) kept the poll going to the deadline, ten minutes, before failing there anyway. Only a network error and a 5xx are a poll to try again now; a 4xx that isn't JSON is the poll refused. The refusal test fails against 0.1.0.
* cline 0.1.0: a renewal's mark survives a network error on the chat itself — the 502 the fetch throws after a renewal returned without signed(..., renewed(cred)), so the request that never left the machine dropped the mark while the request that came back refused kept it; it is wrapped the way the !res.ok path is. The network-error test fails against 0.1.0.
* cline 0.1.0: the held pair is kept per rotation chain, so no account is sent on another's token — magpie calls ClinePlugin once for the provider and hands every account its own getAuth, so the one `held` pair outlived them: with two accounts, a save failing every time and every token wanting renewal, A, B, A went out as A-jwt1, B-jwt1, B-jwt2 and A's third request refreshed with B's token, spending it and billing B (yetone's two-loader repro, page-for-page the same). A spent refresh token now maps to the newest pair its own chain reached — the token getAuth handed back and the one the refresh spent both point at that chain — so a request offering either finds its own account's pair; the per-chain test fails against 0.1.0 on the third request's Authorization, with the 51 before it passing.
|
||
|
|
7c859cc532 |
minimax 0.1.0: MiniMax Code (mcode) accounts' credits and M Plan, China (minimax-code) and international (minimax-code-global), with MiniMax Code's own device sign-in (Magic_zero on Discord)
A new package, @magpie-community/opencode-minimax-auth, written from MiniMax Code 0.6.2's bundle. Sign-in: MiniMax Code's OAuth device flow, the same one mcode uses (account.minimax.cn / account.minimax.io, client mcode-public, scope agent.default, audience agent-backend, PKCE S256). It also handles MiniMax's own variant, where there is no device_code, the user_code is polled for, and expired_in may be an at-ms. The account is named from MiniMax's signed /v1/api/user/info. mcode's ~/.minimax sign-in is never read or written. Each account is a sign-in of its own, so magpie can hold several. Refresh: two minutes before the token ends, or once on a 401. One refresh runs per account (keyed by the refresh token it spends), and its result answers for the old token for a minute, so a late reader doesn't spend a rotated token twice. Only invalid_grant with HTTP 400 signs the account out (signIn: expired); any other failure keeps it and uses the token in hand while it lasts. Chats: Anthropic messages at <agent>/mavis/api/v1/llm/v1/messages, carrying: - Authorization: Bearer <token> - x-api-key sk-xxx (mcode's placeholder) - User-Agent MiniMaxAgent - X-Mavis-Agent-Id main - X-Mavis-Timezone-Offset - X-Mavis-Session-Id, from chat.headers' sessionID (otherwise a fixed id per run) A 402, 403 or 429 whose body says credits or quota ran out goes on as a 429 "usage limit reached". Models: the live config at GET /mavis/api/v1/models?region=&buildEnv=prod (asked again without auth on a 401/403), with mcode's built-in four as the fallback: MiniMax-M3.1-Flash-Preview, MiniMax-M3, MiniMax-M2.7 and MiniMax-M2.7-highspeed. Variants follow what mcode sends: adaptive thinking at an effort (output_config.effort), and none to turn thinking off. Usage: mcode's signed account API: user info, the type-0 workspace from get_user_extra_info, then get_membership_info. The card shows credits left (op_credit_summary / opcredit_balance), Free or "M Plan <tier>" with its end, and, for an M Plan, coding_plan/remains with X-Group-Id. That is read as magpie's readMiniMaxPlan reads it. There is no check-in. Tests: fakes only. nonet.mjs is imported first, so only 127.0.0.1 can be reached. They cover: - sign-in, the variant, refused, and other errors - refresh, a three-way race plus a late stale reader, per-account refreshes, invalid_grant, other failures, and 401 then refresh then retry - request headers and chat.headers - credits running out going on as a 429 - the live list, the retry without auth, and the fallback (the given object back) - signing, against fixed vectors and the bundle's formula - usage parsing (readMiniMaxPlan's own fixture), Free, M Plan, and a refused account bun test packages/minimax (27 pass) and bun scripts/check.mjs pass. End to end through magpie: origin/main b0486663, built with -tags nogui in a worktree since removed, under env -i with a sandbox HOME, a fake upstream on 127.0.0.1:47811, and a copy of the package with its hosts pointed there: - plugin add - plugin login minimax-code: the device flow and the account named; a second login of the same account merged into one - the live list: 2 models - provider test minimax-code: the chat went out with the headers above - quota: M Plan Plus, 321.5 credits, 5 hours and 7 days windows - an expired token refreshed and saved No request was made to MiniMax. |
||
|
|
cc57432d16 |
zcode: Start Plan requests go as ZCode's own, with its headers and system prompt (0.1.7) (#5)
ARNO on Discord: the plugin's Start Plan requests were answered 405 / 3012 "blocked due to unusual activity" while his own plugin (Freeflow, provider zcode-start) worked from the same machine. zcode.z.ai serves the plan only to what looks like ZCode's own request: a Start Plan request now carries ZCode's headers and its body is dressed as ZCode's (three cached system blocks, the environment section, the date reminder as the first turn, one cache mark on the last block, metadata.user_id naming the sign-in's device). The prompt texts are magpie's (901fd87e), each matching ARNO's plugin's hash. Coding Plan and team requests are unchanged. The Start Plan is advertised again. |
||
|
|
8c7e31911e |
qoder: Qoder CN (qoder.cn) as a second provider, qoder-cn (#1) (#4)
Hosts, client id and paths read from Qoder CN's own CLI (@qodercn-ai/qoderclicn 1.1.65): sign-in on qoder.cn, accounts on openapi.qoder.com.cn, models and chat on gateway.qoder.com.cn, client id e883ade2-…; signing unchanged. The same as magpie's built-in Qoder CN. When qoder.cn refuses a job token the account chats on its device token, renewed through /api/v1/deviceToken/refresh, as the CN CLI does. cn.test.mjs (12 tests, a local server standing in for every host) covers sign-in, polling, both tokens' refresh, a chat, models, usage and qoder.com unchanged; 6 fail with the CN chat host pointed back at api3.qoder.sh or the fallback off. Version 0.2.0. |
||
|
|
bd5e91ee00 | zcode: stop advertising ZCode's free Start Plan — zcode.z.ai serves it only to requests carrying the official ZCode client's system prompt and answers others HTTP 405 'request has been blocked due to unusual activity'; the plugin, like magpie, never rewrites prompts or poses as the official client, so the plan can't be used through it. registry.json's summary (en/zh), the root README's table, the package's description and its README now name the GLM Coding Plan and team seats only, and the package README says why the Start Plan isn't usable. Text only; no code or version change. | ||
|
|
6ba28f67ae | registry: list magpie's community's plugins alone — the OpenCode community's weren't written against magpie's sign-ins and fell short of them; they stay a search away in magpie | ||
|
|
6b33587488 | registry: drop Cognition's opencode-devin — its gateway answers 404 model_not_found for both the model list and chat with a valid Devin session, so it signs in and then can't serve a request | ||
|
|
03c948b6bb | registry.json: the list magpie's Plugins tab shows, and how to add to it |