Commit Graph
81 Commits
Author SHA1 Message Date
YangHonghang 3944e53b8c registry: list Window Warmup (窗口预热) page plugin (#622, YangHonghang)
Lists magpie-window-warmup, YangHonghang's own page plugin published from his own repo (no community flag, search only, like PinK and WispTerm). It keeps subscription windows warm: on a window, daily or every-N-hours trigger it sends a fixed "hi" (max_tokens 16) through magpie's local gateway with the chosen account pinned.

Checked at c328ac6159554630eb4e8d350072cf8ea7a9bb55, against npm magpie-window-warmup@0.3.6 (sha512-NmLEUwVj..., the tarball reviewed):
- The package: no dependencies or install scripts, readable bundle; a rebuild from github.com/YangHonghang/magpie-window-warmup 29ad1e6 is byte-identical to the committed dist and to npm's. Its own tsc --noEmit and bun test (236 pass) on mote.
- Loaded as the plugin host does (import default, server({}, {port})) in a sandbox HOME with a fake gateway: every /api route needs its per-process token, a foreign Host or Origin gets 403, traversal 404; a task and run-now sent only the "hi" body to the gateway. It reads providers.json only to fingerprint keys (10 hex of sha256); no key appeared in gateway traffic or its own state.
- The page has no permissions and only navigates to its 127.0.0.1 service.
- CI (pr.yml): bun test and bun scripts/check.mjs green.
2026-11-02 16:01:23 +08:00
Cason Mo b48f2e754f agnes: add the international Agnes AI provider with browser sign-in, usage and balance (#619)
Adds @magpie-community/opencode-agnes-auth 0.1.0 (provider `agnes`): Agnes AI's
international API platform (apihub.agnes-ai.com for models, platform-backend.agnes-ai.com
for keys and usage). Agnes trains and serves its own agnes-* models, so it is a vendor,
not a relay, and a different channel from `agnes-code` (the Agnes Code desktop's
gateway). Sign-in: a private Chromium profile read over loopback CDP (plan, personal or
enterprise key), or an API key plus an optional console token. Usage: a plan key shows
Token Plan and Agent Plan windows; a personal or enterprise key shows the balance only.
By CasonMo (#619).

Since the first review (9242396): the callback's /user/self result no longer shadows the
Chrome session (6ca6f68 broke every browser sign-in); a page exception from CDP is
reported instead of timing out, but only once the same exception has lasted 4s, since
Chrome raises SecurityError on localStorage while the page is still loading; the
platform gets x-user-language en-US; browser sign-ins aren't told to paste a token.

Reviewed head 8a30c65ee88ab432ed7f63f86b81c18d0db3680c, merged onto origin/main 581ca13.
Run on mote, HOME=$(mktemp -d), Bun 1.4.2:
- bun scripts/check.mjs: exit 0 (agnes included)
- bun test packages/agnes: 51 pass, 1 skip, 0 fail
- bun test (whole repo): 4775 pass, 13 skip, 0 fail (main 581ca13 alone: 4741 pass, 0 fail)
- AGNES_BROWSER_TEST=1 with Chrome for Testing 1234 (--use-mock-keychain): the real-browser
  test passed 5 of 5 headed and 5 of 5 with --headless=new; no browser left running.
Broken by hand: making the first page exception final again turned the two new
token-poll tests red, and the real-browser test red 5 of 5 with the same
"SecurityError ... Access is denied for this document" seen at 1eea3f7. Earlier rounds
broke the TDZ fix and the exceptionDetails branch by hand; their tests went red.

Harm check: no dependencies, install scripts, .github or publish changes, or encoded
blobs. The only addresses are agnes-ai.com hosts and 127.0.0.1 CDP; the console token
goes only to platform-backend and the API key only to apihub. The plugin uses its own
browser profile, never the user's.

Not tried: a real Agnes account or the real login page (no account here; tests stay
offline); the Windows and Linux browser paths.
2026-11-02 15:54:08 +08:00
yetone 2595d48900 registry: Qoder's listing names Qoder 中国版 (qoder.cn) as a subscription of its own
小武 on Discord read the Qoder plugin as international only ("Qoder 只支持国际版
请添加 Qoder中国版"). The plugin has served qoder-cn since 0.2.0, but its
listing said only "国际版或 Qoder CN", so a search for 中国版 on magpie's
Plugins page (which matches the summary) found nothing. The summary now
says the two sites are separate subscriptions and names qoder.cn and its
Alibaba Cloud / phone sign-in, in en and zh.

No plugin code changed, so no version bump.

Run: bun scripts/check.mjs (✓ registry.json) and bun test
scripts/check.test.mjs (9 pass), on mote.
2026-11-02 13:33:16 +08:00
est7 c4d84633b5 junie 0.1.0: Junie CLI agent, a /v1/models seed and launch defaults (#610, est7)
Adds @magpie-community/agent-junie 0.1.0 (est7): Junie CLI on magpie's Agents page, plus an explicit seed.mjs that writes one Junie model profile per /v1/models entry and sets settings.json's modelForLaunch to magpie's selected model. Registry entry sits with the other agents; README agents table row added.

The three changes asked for at 12df8a6 are in 75a8c4b: repository.url is magpie-community/plugins, the README installs from the Plugins tab / `magpie plugin add` and gives seed.mjs's installed path (XDG_CONFIG_HOME aware), and the registry entry moved to the agents. seed.mjs, junie.agent.js and the tests are unchanged since that review.

Reviewed at 75a8c4b, merged locally onto main 486a68a, on mote (macOS, Bun 1.4.2), HOME=$(mktemp -d):
- bun scripts/check.mjs: exit 0. bun test: 4735 pass, 12 skip, 0 fail (the 17 junie tests included).
- seed.mjs against a local fake /v1/models: one request, Bearer key and User-Agent Junie; two 0600 profiles with id/baseUrl/apiType/apiKey/displayName/providerName/maxContextLength; model-locations appended to the user's own list; modelForLaunch set, user's other ECO entry kept. --model with an absent id refused with no writes. --remove: profiles gone, config.json and settings.json back to their values (re-indented only).
- Keys checked against Junie's docs (custom-llm-models, config.json, MCP ~/.junie/mcp/mcp.json with mcpServers, ~/.junie/skills, ~/.junie/AGENTS.md) and, for the undocumented settings keys (modelForLaunch, onboardingDefaultModelChosen, providerForLaunch, mixForLaunch, ecoModePerModel, acpEcoModePerModel), by grepping the released Junie 3976.1 macOS jar: every key is present.
- npm has no @magpie-community/agent-junie yet (404), so 0.1.0 doesn't collide. No dependencies, no install scripts; the only network call is the gateway's own /v1/models with redirect "error".

Not tried: a real Junie session through magpie (needs a JetBrains sign-in), and whether Junie's own requests carry a User-Agent matching the agent's ua "junie".
2026-11-02 11:42:06 +08:00
yetone 236071c300 README: one channel, one entry unless the new one names its difference (#614, Gyl1219)
The market section of the root README now says how duplicates are
judged: by channel, not by package shape. A channel listed in an
aggregate package's `providers` array counts as listed. A new standalone
package for a listed channel names its differences (sign-in, endpoint,
abilities, what it can do the existing entry can't) in the PR, its README
and its registry summary, or it isn't merged.

AStudio keeps both entries. From reading both packages' code:
- astudio (0.1.0 -> 0.1.1, README only): reads the AStudio desktop's
  session (ASTUDIO_HOME, Windows registry, ~/.acode) or a pasted
  modelBearerToken; calls /model-gateway/v1/responses; check-in touches
  the session and records the balance delta, claiming nothing.
- magpie-providers-hub 0.5.2 (npm, Gyl1219's repo) hub-astudio: a local
  login page (SMS code, password or WeChat QR, with geetest); calls
  /model-gateway/v1/chat/completions; check-in completes the
  client-popups daily reward and new-user dialogs.
Both read the same account's agent.xfyun.cn points/balance, so one
account has one daily points pool. The astudio README gets a table of
this; both registry summaries (en, zh) say it. The hub's own README lives
in Gyl1219/magpie-providers-hub and is not changed here.

Run on mote at this tree, HOME=$(mktemp -d), Bun 1.4.2:
- bun scripts/check.mjs: ✓ registry.json (the #612 validation), every
  package ✓, exit 0.
- bun test: 4709 pass, 0 fail, 12 skip (4721 tests, 363 files).
Not tried: a real AStudio sign-in on either package (no code changed).
2026-11-02 06:34:39 +08:00
yufeng 8f0280a96f registry: list OpenViking's memory gateway plugin (#604, yufeng201)
Lists OpenViking's memory gateway plugin, @openviking/magpie-plugin (maintained in volcengine/OpenViking), in registry.json and the README's Gateway hooks table, by yufeng201. Per review it sits after respire-memory in both lists; that reorder and a merge of main were pushed to the branch by the maintainer.

Package checked earlier (npm 0.1.0, integrity sha512-5cnu8bzg…AnQ== unchanged today): every line of the tarball was read. Its only network target is the user's OpenViking baseUrl from ~/.openviking/ovcli.conf, with redirect "error". It has no telemetry, no install scripts and no obfuscated code, and capture is off by default. Loaded in a temp HOME with no config: onRequest passes through and reports unavailable, the 5 tools register, status says unconfigured, and it makes 0 network calls. The icon URL answers 200.

At eb18bca (main 5b370f3 merged in), Mac mini, Bun 1.4.2, temp HOME: bun test 4703 pass, 12 skip, 0 fail; bun scripts/check.mjs exit 0. PR CI at eb18bca: test and on-npm pass.

Not tried: a real OpenViking server.
2026-11-02 05:25:13 +08:00
yihheng 04f3608d49 sensenova 0.1.0: SenseNova Token Plan provider plugin (#577, yihheng)
A new provider plugin, @magpie-community/opencode-sensenova-auth 0.1.0, for the SenseNova (SenseTime 日日新) Token Plan, provider id `sensenova-token-plan`.

- Sign-in: a console sign-in (OIDC + PKCE). The password is sealed to JWE under the platform's JWKS key and is not stored.
- Quota: the account's credit pools (5h/7d windows, expiring grants) from pool-usage.
- Chat: with an optional pasted API key, it serves the plan's chat models at token.sensenova.cn/v1. The list is filtered per account to models the plan covers.
- Also adds a registry.json entry and a root README row.

Hosts:
- platform.sensenova.cn gets the access JWT.
- iam.sensecoreapi.cn gets the sealed password.
- signin.sensecore.cn gets the refresh token and the code.
- token.sensenova.cn gets the API key.

There are no dependencies and no install scripts.

Run at head 3804ab46ae6c6c16d393e5dc08d6ae81c63da668 on mote (macOS 27.2, Bun 1.4.2), with a fresh HOME:
- `bun test packages/sensenova`: 43 pass, 0 fail.
- `bun scripts/check.mjs sensenova` passed.
- Full `bun test`: 4455 pass, 9 skip, 0 fail.
- Broken by hand: I removed each of the two `redirect: "manual"` lines that the last review found untested (IAM login, code exchange). Each time, its new 307 test went red (42/1). The earlier reviews' reverts went red at 0aa00b5 and 10984cf.

Not tried: a real sign-in, quota read or chat. There is no SenseNova account. Unauthenticated probes of the real hosts (in the last review) match the walk's shape.

This is the first version, not on npm yet, so the dist branch serves it until it is published.
2026-11-02 03:45:35 +08:00
Monica Everett cc7f4327e5 notify 0.1.2: a Gotify channel (#593, UnspokenSpell)
notify 0.1.2 adds a Gotify channel (UnspokenSpell): POST <server>/message with X-Gotify-Key, title and message; priority only when the channel sets it (an explicit 0 stays 0), so the application's own default applies otherwise; extras when set. Needs server and token. post() also reads Gotify's errorDescription on failure. Gotify is listed in the package README (with priority's fallback and extras), the root README and the registry summary.

Answers the 11-01 review at f2f5806: priority no longer defaults to 5, the sibling channel lists name Gotify, extras is documented and tested, errorDescription is read.

Run at the reviewed head f84a6a7 on mote:
- bun test packages/notify: 58 pass, 0 fail
- full bun test with HOME=$(mktemp -d): 4551 pass, 9 skip, 0 fail
- Broken by hand, each red then restored: priority back to `?? 5` (1 fail), errorDescription dropped (1 fail)
- A real Gotify server (3.1.1, 127.0.0.1, app with defaultPriority 2) through channels.mjs send(): no priority -> stored with priority 2; priority 0 -> stored 0; wrong token -> {ok:false,status:401,error:"you need to provide a valid access token or user credentials to access this api"}

Not tried: Gotify behind a reverse proxy at this head (tried at f2f5806, unchanged path code).
2026-11-02 03:37:00 +08:00
Pursuit806 684e4757ad astudio, agnes-code 0.1.0: AStudio and Agnes Code desktop provider plugins (#595, jinyue806)
Adds two unofficial provider packages by jinyue806:

- packages/astudio (@magpie-community/opencode-astudio-auth 0.1.0, provider `astudio`): iFLYTEK AStudio (Astron Studio) desktop's saved session or a pasted model token; OpenAI Responses at astronstudio-api-volces-prod.xf-yun.com, live catalog, points balance and an observed daily-login check-in from agent.xfyun.cn.
- packages/agnes-code (@magpie-community/opencode-agnes-code-auth 0.1.0, provider `agnes-code`): Agnes Code desktop's safeStorage session (Windows, DPAPI via PowerShell) or a pasted JWT; chat completions at api-agnes-code.agnes-ai.com, live catalog, credits balance from api.agnes-ai.com.
- README rows and two registry.json entries.

Answers the 11-01 review at 36dd528: tests added with injected fetch/fs/DPAPI, registry kept in its style, folders renamed, README ids fixed, paste methods store their inputs, check-in says inactive (not done) when nothing was observed, usage keeps signIn expired, injected homedir honoured, platform checked before any read on Agnes.

Run at the reviewed head 9aaff0d on mote:
- node --test: astudio 24 pass, agnes-code 17 pass
- bun scripts/check.mjs astudio / agnes-code: ok
- full bun test with HOME=$(mktemp -d): 4548 pass, 9 skip, 0 fail
- Broken by hand, each red then restored: fallback paths ignoring homedir (1 fail), usage swallowing expired (1 fail), Agnes check-in back to "done" (1 fail)
- Unauthenticated probe of each host: model-manager 401, Agnes /v1/models and credits-balance 401 "Login expired", agent.xfyun.cn 200 with code 80000 (all map to signIn expired in the code)

Hosts: only the vendors' own (xf-yun.com, xfyun.cn, agnes-ai.com). No dependencies, no install scripts.

Not tried: a real AStudio or Agnes Code account (no install on our machines), the Windows registry and DPAPI paths on a real Windows desktop. Not on npm yet: served from the dist branch until first published by hand.
2026-11-02 03:33:26 +08:00
YanYunCY ce3bcd26d1 notify 0.1.0: a push when an agent's turn is done (YanYunCY, #541)
A new gateway-hooks package, @magpie-community/gateway-notify 0.1.0. When an
agent's turn is over (the model answered and asked for no more tools) and it
ran at least minMinutes, or it failed, it sends one push to the channels the
user configured: ntfy, Bark, Server酱, Feishu, DingTalk, WeCom, Telegram or a
webhook. By default a push carries the agent, the project folder's name, the
model and the time taken. The reply's text is sent only with includeText.
Only `local` requests count unless allOrigins is on. The suggested options
have an empty ntfy topic, so nothing is sent until the user fills one in.

How a turn is found, checked on request bodies captured from the real
Claude Code 2.1.316 and Codex 0.166.0 (packages/notify/fixtures):
- A subagent is a conversation of its own, keyed by session plus its first
  words (Codex: its thread_id). It is nested when it first shows up while a
  top-level conversation in the session is busy, waiting on a tool, or
  holding background agents. Codex's client_metadata subagents are always
  nested, except /review.
- Compaction (Claude Code's summary request, Codex local and remote) neither
  opens nor closes a turn. The conversation that goes on from the summary
  takes over the conversation that asked for it.
- Background Agent and Workflow launches are held by tool_use_id until their
  <task-notification> arrives, whether the notification comes as its own
  message (with other <system-reminder> parts beside it) or inside a
  tool_result. A notification-only message is not the user's words.
  Background Bash doesn't hold the turn.
- A failure push waits failureHoldSeconds, and a retry cancels it.

Root README and registry.json each gain one notify row.

What was run, at the reviewed head 09dd37a1 (mote, macOS, Bun 1.4.2):
- `bun test packages/notify`: 47 pass, 0 fail. `bun scripts/check.mjs`:
  exit 0. Full `HOME=$(mktemp -d) bun test`: 4394 pass, 9 skip, 0 fail.
- PR CI (ubuntu) at 09dd37a1: test and on-npm green. The run first sat at
  action_required, so its green is attempt 2. Its log has 4412 pass, 0 fail.
- The reviewer's own Claude Code 2.1.316 captures, replayed through
  onRequest/onResponse in the gateway's call orders: 13 cases pass.
  Compaction mid-tool and `/compact` push once each, "took 20 min". A
  subagent racing the parent's reply is nested. Stale waiting conversations
  expire. A notification with a tools-used reminder beside it pushes once,
  "took 11 min" (round 4 blocker). A retried launch request pushes once,
  "took 11 min". An agent that notifies twice while a second agent runs
  pushes nothing, and one push follows when the second agent notifies.
- Each fixture group, replayed in order: one push per finished turn. There
  is no push on a notification-only message, a compaction request, a
  subagent's end, or the main conversation pausing with an agent out. Every
  push went only to the configured endpoint.
- Mutations: reverting each round-5 change turns the matching test red
  (reminder beside notification, notification inside tool_result, Workflow
  launch, launch without an Agent call, ids replaced by per-request counts,
  Codex client_metadata nesting, Codex thread id, Codex blocks opening a
  turn).
- Fixtures were scanned for personal paths, emails and keys. They hold only
  sandbox paths (/tmp/sbx, /tmp/claude-1000). The tests fake fetch, so there
  is no network. The fixtures are not in the package's npm `files`.

Not tried: the package in a live magpie gateway this round. Round 1 did
that end to end, and this round changes turn detection only. Gemini CLI has
no captured bodies. Two edges taken from the Claude Code binary and not
reproduced are filed as plugins#576. An agent's interim notification
("stopped with background work of its own still running") clears its id,
so the push can come early. A finished agent resumed by SendMessage is not
held.
2026-11-01 02:50:34 +08:00
qingnian108 08ad5e3956 page-agent-console 1.1.0: QA fixes, neutral accent, own dropdown menus, self-heal after a host restart, by qingnian108 (#569)
page-agent-console 1.1.0, by qingnian108 (#569).

QA fixes B1-B21, a reworked UI, a new logo, and self-heal after a plugin host restart. In this version:
- Accent: a fixed neutral grey (charcoal in light mode, light grey in dark mode). Magpie's accent tokens are dropped on purpose. Surfaces, text, lines, fonts and semantic colours still follow magpie.
- Every native <select> (composer effort/mode/Cursor fast, Settings, Debug) is now the page's own SelectMenu, a button plus a listbox.
- The registry summary again discloses the 127.0.0.1 service and its lifecycle, that only its own page gets the token, the ~46 MB first install, and that Claude Code isn't bundled (en, zh).
- session.js is written once at bind with beat:false, and beats every 4s only after the first /open. A new host deletes a dead host's session.js at startup (owner pid in session-owner.json, outside the page folder).
- The daemon swallows console EPIPE after a hard host kill and handles a lifeline close once.

Run at 930c6e2 on macOS (mote, Node 22), in a fresh copy:
- npm ci, then npm run check (tsc daemon + web): ok
- npx vitest run: 46 files, 288 passed, 17 skipped
- npm run verify:build: app.js, app.css, index.html and daemon/dist/main.js(.map) rebuild byte-identical
- bun scripts/check.mjs agent-console: ok
- Playwright Chromium and WebKit, light and dark, sandbox HOME, page served under /_magpie/plugin/<id>/page with a stub bridge passing accent #ff0000:
  - accent: --accent and the primary button stay grey (rgb(38,38,38) light, rgb(229,229,229) dark); no <select> anywhere.
  - Settings menus: click opens the menu inside the window; ArrowDown+Enter picks, closes and refocuses the trigger; the pick persists through the daemon.
  - Esc closes the menu, not the dialog, and then closes the dialog. Clicking an option keeps the dialog open; a click outside closes the menu.
  - A host that was never opened writes beat:false and doesn't rewrite session.js. SIGKILL it, start a new host: the stale file is removed and the page reaches the new daemon.
  - After an open, session.js beats. SIGKILL the host: the page heals in ~5.3s and stays. A daemon-only crash heals in ~5.3s.
  - Daemon logs: no uncaughtException or EPIPE, one lifeline line per daemon exit.
Not tried: the composer pickers in a browser (they need a thread with an installed agent; same SelectMenu component), magpie's real sandboxed frame, Windows and Linux.
2026-11-01 00:37:07 +08:00
luodaoyi 21cbeeefe0 respire-memory 0.3.6: per-turn recall and policy reads, verified background archival (luodaoyi)
Adds the respire-memory gateway middleware (packages/respire-memory, 0.3.6) by luodaoyi, with its registry.json entry and README row. It recalls from a loopback Respire Runtime on each new turn, reads the engine policy each turn and puts it in the history once (again only when it changes), keeps turn state in an encrypted store, and optionally archives turns in a detached worker through a user-configured Chat Completions service. Diary writes are confirmed by a bounded fragment readback.

Run at 7aba754 on mote (Node 22.22.0, Bun 1.4.2):
- packages/respire-memory: `node scripts/check.mjs` ok (4 protocol, policy dedup/change/revert, byte-identical prefixes, failed read, diary readback); `bun test` 1 pass.
- root: `HOME=$(mktemp -d) bun test` 4187 pass, 9 skip, 0 fail (4196 tests, 328 files); `bun scripts/check.mjs` exit 0.
- Review probe (fake loopback Runtime, 2000-byte policy, six chat turns with a host restart at turn 3, a policy change, then the Runtime down), Bun and Node: per-turn overhead grows ~524 bytes a turn (the read receipt), not the policy; no earlier prefix changed; one policy read per turn; two policy blocks after the change; with the Runtime down the latest turn is unchanged. With no Runtime at all the body passes through unchanged.
- Capture probe: with capture on, a turn whose JSON exceeds the ~4000-char readback budget is written and then recorded unconfirmed, and archival skips it. The PR's check asserts this and the README documents it.
- Harm check: no new dependencies, install scripts or workflow changes; network only to the loopback Runtime and the user's own generation URL.

Not tried: a real Respire Runtime.
2026-10-31 21:36:56 +08:00
qingnian108 a431798fe1 agent-console 1.0.0: a page plugin that drives the local Agent CLIs (#535)
Adds Agent Console (@magpie-community/page-agent-console 1.0.0), a community page plugin that drives the Agent CLIs on this computer (Claude Code, Codex, ACP agents) through a local daemon on 127.0.0.1, with its source in packages/agent-console and a registry entry. Claude Code is the user's own `claude` CLI driven over stream-json (daemon/src/providers/claude/cli.ts); no Anthropic SDK is installed, bundled or in the branch's history. Cold install ~45 MB (node-pty ~26 MB), stated in the README and registry summary in en and zh.

By qingnian108 (#535).

What was run at 8e8f910 (mote, macOS, throwaway HOME, no real accounts):
- packages/agent-console: `npm ci --ignore-scripts --workspaces=false`; `node scripts/verify-build.mjs`: all five bundles byte-identical (daemon/dist/main.js 08c95aa3…, app/app.js 9a6911f3…); `vitest run`: 45 files, 254 passed, 17 skipped; `npm run check` clean.
- Real Claude Code 2.1.316 (npm @anthropic-ai/claude-code, sandbox HOME/CLAUDE_CONFIG_DIR, local fake Messages API): `AC_REAL_CLAUDE=… vitest run --config vitest.real.config.ts test/real/claude-cli.real.test.ts`: 4 of 4 (initialize lists 51 slash commands, streaming turn, Bash permission approved and denied, interrupt, --resume with set_model).
- Probe: the driver's exact argv with `--permission-mode bypassPermissions --allow-dangerously-skip-permissions`: the tool runs with no can_use_tool request.
- Repo root: `HOME=$(mktemp -d) bun test`: 4006 tests, 0 fail; `bun scripts/check.mjs` exit 0.
- Install as magpie does: `npm pack --ignore-scripts` (552 KB) then `bun add --ignore-scripts`: 45 MB node_modules, no @anthropic-ai/*, index.mjs imports.
- Read every changed line since 41c7a94: argv values limited to SAFE_ARG tokens (no cmd.exe metacharacters reach the shim path), no new network hosts, no install scripts, no eval; no commit in main..8e8f910 contains claude-agent-sdk.

Not tried: magpie's desktop window loading the page; a Windows .cmd/.ps1 claude shim end to end.
2026-10-31 20:11:22 +08:00
QingJ 7714b617c7 agent-office 0.2.0: real 3D office, workbench, incremental session scan
Agent Office 0.2.0 (QingJ01, #551): a real 3D office, the workbench, and the earlier review's fixes. The session scanner now reads growing JSONL logs incrementally. It keeps a saved offset with 128 guard bytes, carries UTF-8 and partial JSON across ticks, applies a record complete at EOF once, and resets on truncation, inode or birthtime change and same-size rewrites. Readers update per kind (Claude response usage replaced, Grok sidecar daily totals replaced, metadata refreshed apart from logs).

Run at the reviewed head 3bf522f, merged on main 622f950, on mote under HOME=$(mktemp -d):
- agent-office bun test: 163 pass, 0 fail. Full bun test: 4310 pass, 9 skip, 0 fail. check.mjs agent-office and stamp-page --check: exit 0.
- 100MB log: append scan ~50ms -> 0.04-0.2ms (4x100MB: ~240ms -> 0.13-0.29ms). Through office.hooks: first scan 82ms, then 0.11-0.24ms per append.
- Fuzz with real Claude, Codex and Grok logs in random appends vs a fresh scanner: 0 mismatches.
- Broken by hand: 9 mutations of the cursor and readers go red. Gaps left as follow-ups: the inode check alone, ExtendedTail, the Codex title cursor and summary.json re-reads. Also follow-up: the first scan of an image-heavy log (336ms vs 42ms, framePart).

The package is new on npm: the owner publishes 0.2.0 by hand the first time.
2026-10-31 18:19:53 +08:00
sakisakisa-design 33027a8fb8 aelios 0.1.0: Aelios memory recall and opt-in recording as gateway hooks (#549)
New package @magpie-community/gateway-aelios 0.1.0: asynchronous gateway hooks for Aelios memory, by sakisakisa-design (Aelios's author).

- Recall before each human turn, appended after the last user message. Recording of completed turns is opt-in (record: false by default).
- Traffic goes only to the user's own serverUrl (HTTPS or loopback HTTP, redirects refused, a key required). Only local and magpie-key origins by default.
- Local admission: an authenticated, dialogue-free GET /v1/hook/identities decides which model maps to which identity. Unmatched turns, or an unavailable list, send no dialogue.
- The request is slimmed (system prompts, thinking and tool results dropped, historical credentials masked). The recorded reply is slimmed to text and tool calls before the secret check and the send.
- Settings page served by a loopback Bun service (Host, Origin null and per-process token checks).
- The cleanMessageText/appendMemory logic ported from AGPL Aelios is relicensed MIT by its sole author (PR thread).

Run at the reviewed head 620cd47 on mote (macOS, Bun 1.4.2):
- bun test packages/aelios: 178 pass. Full HOME=$(mktemp -d) bun test: 4176 pass, 0 fail. Merged onto main 39de030: 4179 pass, 0 fail. check.mjs: exit 0 at both.
- Broken by hand: recording the raw reply turns 5 tests red; admitting every model turns 11 red.
- Probe against a fake Aelios: no thinking, reasoning, signature or encrypted_content is recorded for Anthropic, Responses or Chat. A secret in visible text skips the record. An unmatched model, or an identities endpoint answering 404, malformed JSON or a network error, sends only the GET.
- Real magpie Bun host (origin/main ceeb73a0f, GatewayBegin/Finish): recall injected, the slimmed record sent, nothing for an unmatched model or a remote origin.
- PR CI: test red only on gcp-ai's browser test 40s timeout (#471, unrelated, passes on mote).

Not tried: a real Aelios deployment, or a real agent behind a running magpie.
2026-10-31 14:52:01 +08:00
MYCF711 f42a59adf5 codearts: an OfficeAce card for the same Huawei Cloud account (#522)
codearts: an OfficeAce card for the same Huawei Cloud account (#522, MYCF711)

Adds the OfficeAce (AgentArts) provider to the codearts package, replacing
officeace-auth; accounts signed in there keep working. Each card signs in on
its own and holds its own record and refresh token, because a Huawei Cloud
STS refresh token is spent once. A renewal writes only the record being
renewed, so a removed account never comes back.

Reviewed over eight rounds; reviewed head f7c2526. r8 is words only plus the
writeSharedRecord -> writeProviderRecord rename (every caller and the test
updated).

Run at f7c2526 on mote: node --test packages/codearts/index.test.mjs
164/164 pass; bun scripts/check.mjs exit 0, codearts ok.
Not tried: a real Huawei Cloud sign-in on either card.
2026-10-31 02:29:36 +08:00
KaranocaVe 00f4d84b8f fingerprint 0.1.0: a page that checks whether a model answers like the one it claims to be (#516)
Adds the Fingerprint page plugin (packages/fingerprint): it checks whether a model behind the local magpie gateway answers like the model it claims to be.

Reviewed at 531ca11f4 (KaranocaVe). Run at that head merged with main 848497c, through mote-run on the Mac mini with Bun 1.4.2:
- bun run rebuild from the committed bun.lock (frozen, --ignore-scripts): typecheck, 30/30 tests, build; diff -r against the committed dist/ is empty.
- HOME=$(mktemp -d) bun test: 3838 pass, 0 fail. bun scripts/check.mjs: exit 0.
- Offline preload refusing every non-loopback fetch/socket: 30/30, nothing refused.
- Broken by hand, each red: ensureDetector() in bootstrap, dropping ttl: Infinity, validating the job after the download.

Maintainer decision: the reference data comes from two third-party hosts (lm.ikale.io, cdn.jsdmirror.com), only on an explicit Download or a valid job, and both are named on the page, in registry.json and the READMEs. It is data used locally to rank candidates and is sent nowhere; the @latest fallback has no pinned hash, so a bad snapshot would rank wrongly, which the page states.

Not on npm yet (E404): magpie installs it from the dist branch until an owner publishes the first version.
2026-10-31 02:00:33 +08:00
Gyl1219 1acaf4964c registry: add magpie-providers-hub (community, 5 providers) (#502)
Adds magpie-providers-hub (Gyl1219, third-party adapter of dsh-providers-hub) to registry.json as a community entry: hub-astudio, hub-accio, hub-lobsterai, hub-magicrew, hub-magicrew-intl. All five are the vendors' own products (iFlytek, Alibaba, Youdao, MagiCrew); no relays.

Checked at reviewed head f7685c8:
- npm 0.5.1 (latest dist-tag) tarball fetched into an empty dir, nothing run from it: shasum baafab667248930ef67e19dadd289414728965d5, 16 files. page/snapshot.js is the empty template; no AK-like strings, balances or channel data. Hosts are only the vendors' own domains and 127.0.0.1.
- gitHead 8fe0abc exists in Gyl1219/magpie-providers-hub. Diff 0.5.0 -> 0.5.1: explicit files list, empty snapshot, buildSnapshot reuses a snapshot only when its runId is this process's.
- On mote: HOME=$(mktemp -d) bun test: 3808 pass, 8 skip, 0 fail. bun scripts/check.mjs: passed.

Not done: 0.5.0 and 0.4.7 are not deprecated yet (author's npm account blocked until 11-02).
2026-10-30 22:03:36 +08:00
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
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
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 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 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
狂気の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
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
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
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
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
mola ea9201df1f mail-watch 0.1.0: mail session ends, failed turns and refusals through your own SMTP (#457)
mail-watch 0.1.0: a hooks plugin that mails a rendered event (per event or as a digest) when a session ends, a turn fails, or a request is refused, through the user's own SMTP server.

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

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

Not tried: a real SMTP provider (Gmail, Fastmail); the smoke test uses a local sink.
2026-10-29 13:40:31 +08:00
yetoneandMagiczerowxy 526c7853c3 page-chat 0.1.0: Magic_zero's chat page, with tests, a registry entry and check.mjs for a page's host part
Lists Magic_zero's (Magiczerowxy) magpie-chat as @magpie-community/page-chat:
a chat page in magpie's window over magpie's own gateway, models, MCP
servers, instructions and skills. Not a provider or a relay: it signs in
to nothing and every request goes through magpie's gateway.

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

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

Co-authored-by: Magiczerowxy <magiczerowxy@users.noreply.github.com>
2026-10-29 09:07:44 +08:00
yelo 25488a7c8f opencodereview 0.1.0: Open Code Review (ocr) as an agent plugin (#463)
New agent plugin @magpie-community/agent-opencodereview 0.1.0 (imyelo): Open Code Review (Alibaba's `ocr` CLI) on magpie's Agents page. connect writes `provider: "magpie"` and one `custom_providers.magpie` object (gateway base url, protocol anthropic, magpie's key for ocr) into ~/.opencodereview/config.json; magpie writes `model`. Registered in registry.json and the README's Agents table.

Reviewed at 3ea944df15c566aabf2235a147da868ea1e64f02.

Run at that sha (on mote, macOS arm64, Bun 1.4.2):
- `HOME=$(mktemp -d) bun test packages/opencodereview`: 8 pass. `bun scripts/check.mjs opencodereview`: ok (it skips agent packages). Full `bun test`: 0 fail, both at the sha and merged with main d8cfee3 (3050 tests).
- Broken by hand, each went red: url = gateway.v1 (3 fail), protocol openai (2 fail), provider anthropic (3 fail).
- magpie's real engine (scratch internal/agent test at magpie ff6fdffd6, not committed) loading this agent.js: connect then Unwire on a fresh home (leaves `{"custom_providers":{}}`, as the README says), on a config with a pre-existing custom_providers.magpie holding extra keys plus other providers/mcp_servers (restored exactly), and on another active custom provider (restored exactly).
- End to end: ocr v1.13.3 built from source, `ocr llm test` against magpie's real gateway (in-process, sandbox HOME) with a fake OpenAI-compatible upstream: "Source: provider:magpie", URL <gateway>/v1/messages, "Connection test successful", "Tool-call round trip verified"; upstream got both turns.
- Checked against ocr's source (internal/llm/resolver.go): custom_providers keys, `magpie` is not a preset name, anthropic protocol appends /v1/messages, UA is "open-code-review/<ver>", config path is ~/.opencodereview/config.json. Nothing goes upstream naming magpie; the plugin sends no data and downloads nothing.

Not tried: a real vendor account behind the gateway, Linux and Windows, ocr review/scan on a real repo.
2026-10-28 23:07:35 +08:00
xiaomu 0f0e966402 river 0.1.0: River with your API key, per-account models, efforts and live prices (#390)
packages/river (@magpie-community/opencode-river-auth 0.1.0, provider `river`):
River's OpenAI-compatible inference API with the user's API key. Models come
from GET /v1/models, limits, image input and reasoning efforts come from
docs.river.ai, and live prices come from River's public pricing endpoint
(BOOT_PRICES as the fallback). Unknown ids are text-only. A 401 or 403 marks
the sign-in expired. The usage card says "Pay as you go". It adds River's
rows to registry.json and the README.

River runs open-weight models on its own GPU fleet (river.ai). It is not a
relay of other vendors' APIs.

Run at the reviewed head 751e502, merged onto main c0a0fd1, on mote (Bun 1.4.2):
- HOME=$(mktemp -d) bun test: 2975 pass, 8 skip, 0 fail across 250 files.
- bun test packages/river: 25 pass. bun scripts/check.mjs: ok.
- A probe with a fake fetch built from River's documented shapes and today's
  real /api/public/pricing body (ids GLM-5.3, Kimi-K3, DeepSeek-V4.1-Flash):
  - The rows have the documented limits. GLM-5.3 is text-only, the others take images.
  - Each variant carries { reasoningEffort } with the documented levels.
  - The costs come from the live prices.
  - 401 throws signIn "expired" from models and from usage.
  - A 503 or a network failure keeps the previous list.
  - An empty list replaces the bootstrap rows.
  - A provider the user configured is kept.
  - RiverPlugin is the only exported function.
- Today's docs.river.ai/guides/inference-models and inference-controls
  match LIMITS, IMAGES and VARIANTS.
- An earlier review round (at 233919f) broke the code by hand and saw the
  river tests go red.

Not tried: a live River key (I don't have one; the author ran one).
Known gap: GLM-5.3 (pricing id "GLM-5.3") has no LIMITS or VARIANTS row, so
it lists with unknown limits and no efforts. It is text-only, so this is
safe.
2026-10-28 12:55:32 +08:00
yetone 1fb8d68c99 registry: add Bub (agent-bub)
The plugins page lists Bub, merged in #81. Run on mote: bun scripts/check.mjs all ok, whole bun test (temp HOME) 2949 pass, 0 fail.
2026-10-28 12:32:23 +08:00
Mañjūṣaka 8022ca23cf history-trim 0.1.0: a middleware that trims repeated and oversized history (#423)
A new middleware package, @magpie-community/middleware-history-trim 0.1.0,
ported from OmniRoute's lite engine (MIT). It makes a request's history
smaller in four steps:

- folds runs of blank lines;
- drops a system prompt whose whole text repeats an earlier one;
- drops a message equal in every field to the one before it (tool results
  excepted);
- cuts a history tool result over maxToolLength at a word boundary.

None of the steps touch the turn being sent (after the last assistant), and
a request with no assistant goes on unchanged. The README states the
prompt-cache cost.

Reviewed at 8af038a60201728f00ee350f56eb35228049baa3, merged locally with
main b2fe48e:
- bun test packages/history-trim: 21 pass.
- On the Mac mini, sandbox HOME under TMPDIR: bun scripts/check.mjs ok; full
  bun test 2919 pass, 8 skip, 0 fail.
- Broken by hand, each turning cases.json red:
  - the current-turn guard in dropRepeatedSystemPrompts;
  - the current-turn guard in dropRepeatedMessages;
  - a 200-char system key;
  - a content-only compare;
  - folding the current turn;
  - the surrogate guard;
  - turnStart returning length with no assistant;
  - the cut's turn guard.
- Probes against the earlier review findings, each now as expected:
  - two system prompts under a shared header both kept;
  - tool_calls assistants that differ both kept;
  - alice and bob kept apart;
  - a patch with trailing spaces left whole;
  - emoji and astral CJK cuts well-formed;
  - the current turn's Anthropic tool_result left whole.
- npm and the dist index have no history-trim package yet, so 0.1.0 is free.

Not run: GitHub CI. The fork's pr workflow is waiting for approval
(action_required); the Mac mini run above stands in for it. No real
upstream request was sent through the middleware.
2026-10-28 03:34:45 +08:00
MYCF711 47cda88fbe registry: add OfficeAce (officeace-auth) (#399)
Adds the OfficeAce entry (officeace-auth, provider officeace, community: true)
to registry.json. Reviewed at 5c61f65965d15f6abf09e2f8bcc91b7d07df670e.

The 10-27 review blocked it on src/self-register.mjs in officeace-auth 0.1.8,
which rewrote magpie's ~/.cache/magpie/plugin-market.json on every load.
officeace-auth 0.1.9 (npm, 2026-10-27T16:24Z) removes it.

What was run:
- npm pack officeace-auth@0.1.9 and @0.1.8, diffed the trees: 0.1.9 drops
  src/self-register.mjs and its call, the `directory` argument and
  REGISTRY_ENTRY; adds CHANGELOG.md and publish-npm.mjs (an author-side
  publish helper, imported by nothing, no install scripts, no dependencies).
- grep over index.mjs and src/: no fs writes, child_process, eval or
  HOME/cache paths. Hosts: auth.huaweicloud.com, sts.cn-north-4.myhuaweicloud.com,
  agentarts.cn-southwest-2.myhuaweicloud.com,
  officeace.cn-southwest-2.huaweicloud-agentarts.com, api.modelarts-maas.com.
- Load probe in a sandbox HOME with a seeded plugin-market.json in
  ~/.cache/magpie and ~/Library/Caches/magpie, fetch stubbed to fail: 0.1.9
  leaves every file's mtime unchanged and makes no request at load; the same
  probe on 0.1.8 changes the cache file (the probe sees the write).
- Merged with origin/main c20fa33: bun scripts/check.mjs exit 0; full
  bun test (HOME under TMPDIR) 2902 pass, 3 skip, 0 fail.

magpie does not auto-update a package outside @magpie-community
(plugin.Official), so an install takes the npm latest at that time.
Not tried: a real Huawei Cloud sign-in.
2026-10-28 00:59:44 +08:00
Kurt Lee 67407cf00f copilot 0.1.0: GitHub Copilot with premium request and credit quota (#411)
New package @magpie-community/opencode-copilot-auth 0.1.0 (provider id
github-copilot), from kurtleee. It adapts opencode-copilot-auth 0.0.12 (MIT):
GitHub.com and GHE.com device sign-in, Copilot token renewal, request
signing with initiator and vision headers. Client versions match magpie's
native Copilot (vscode/1.140.0, copilot-chat/0.68.0). Host headers are
read as a Headers object, which is how magpie's host.js passes them. When the
sign-in isn't OAuth, the request goes on to plain fetch.

It adds magpie's auth.usage hook. The hook reads GET
api.<host>/copilot_internal/user with the GitHub OAuth token
(redirect: "error", 15s timeout) and turns the reply into windows the way
magpie's built-in Copilot reader does. It reads only the chat, completions
and premium_interactions snapshots. Credits are fractional, and string
counters are accepted. An exhausted unlimited pool counts as 100% used.
Managed seats block when spent, and personal seats with overage are aside.
credits_used is never divided by the entitlement. An unlimited pool's
credits_used goes in the display, aside and with no limit. Data that can't
be read is unknown, and only HTTP 401 expires the sign-in.

Run at head c7fb3abd, merged onto main 6a2ade35 (Bun 1.4.2, sandbox HOME
and TMPDIR, HTTP(S)_PROXY pointed at a closed port):
- packages/copilot bun test: 40 pass, 0 fail. Full repo bun test: 2838
  pass, 3 skip, 0 fail. bun scripts/check.mjs: all ok.
- A probe sent fetch to a local Bun server, using magpie's real Copilot
  quota bytes (internal/provider/copilot_usage_test.go). Max token billing:
  "0.1 / 20,000 credits used". Enterprise pool spent: 100%, blocking. Pro in
  overage: 300/300, aside. 401: signIn expired. A GHE sign-in reads
  api.<host>. The loader with a host-style Headers object renewed through
  v2/token with Bearer <oauth>. The chat request went out with content-type,
  accept and the extra header kept. Incoming authorization and x-api-key
  were replaced. Vision and X-Initiator were set, and the renewed token was
  saved under github-copilot.
- PR CI (approved at c7fb3abd): test and on-npm pass.

Not tried: a real GitHub or Enterprise account. Not changed: the device
flow treats slow_down as a failure. This comes from upstream.
2026-10-27 16:04:15 +08:00
zhigangYIandzhigangYI bf8faa2f17 kilo 0.1.0: Kilo Code on magpie's Agents page (#90)
New package @magpie-community/agent-kilo 0.1.0 (gangoogle, #90): Kilo Code on magpie's Agents page. connect writes one key, provider.magpie, into ~/.config/kilo/kilo.jsonc: @ai-sdk/openai-compatible at the gateway's /v1, every model magpie offers Kilo with tool_call, the model's own reasoning levels as variants (weakest first, {} when it has none), image input only for a model magpie says takes images, and limit only when the window is known. Library: AGENTS.md, kilo.jsonc mcp (opencode format), skills under ~/.config/kilo. The branch had main merged in (README agent table and registry.json conflicts, both sides kept).

What was run, at 601d2de56c38fe3cc430919d73502dfd96b3b8d8 (b67360c merged with main 10ebbb3):
- HOME=$(mktemp -d) bun test: 2770 pass, 0 fail (packages/kilo 10 pass). bun scripts/check.mjs: clean. PR workflow (test, check, on-npm) green on run 40432034838.
- magpie built from main 65ee8c65c, sandbox HOME, gateway on 3481, one custom provider fakeup whose upstream is a local fake logging every request: fake-chat (context 128000, output 16000, levels stored max,high), fake-vision (64000, vision on), fake-plain (nothing known).
- magpie plugin add packages/kilo, magpie kilo magpie/fakeup/fake-chat on a kilo.jsonc with a comment, $schema, theme, model and a provider of its own: all kept. fake-plain has no limit; fake-chat's variants are high, max.
- @kilocode/cli 7.8.18: kilo models magpie --verbose lists fake-chat with variants [high, max], the other two {}. kilo run --variant=max with a read tool call: the request reached the upstream at /v1/chat/completions with reasoning_effort max and 23 tools, the read went round trip (the file's text came back in the tool message) and the final reply printed. On fake-plain no reasoning_effort was sent. magpie usage counts the calls under agent Kilo Code (ua).
- magpie kilo default after on, a model switch and a turn: kilo.jsonc byte for byte as before (taken after Kilo's own one-time permission migration, which Kilo writes into the file on its first run).

Not tried: a real vision model (every model got image input here because magpie on main describes images for models that don't take them), the VS Code extension at 7.8.18 (the 7.8.8 extension was checked in review), the Library paths with a real Kilo. Found on the way, not this package's: turning an agent plugin off or removing it leaves the agent on magpie with no way back from magpie, for every agent plugin (yetone/magpie#3810).

Co-authored-by: zhigangYI <19320303+gangoogle@users.noreply.github.com>
2026-10-27 09:27:33 +08:00
wang2 6188ab5be7 search1api 0.1.0: Search1API's six tools with API key or OAuth sign-in (#384)
Adds packages/search1api as @magpie-community/tools-search1api 0.1.0
(fatwang2, replacing #340). It has six tools: search, news, ask, crawl,
sitemap and trending. Sign-in is one account by API key or OAuth: PKCE
S256, dynamic client registration and a loopback callback. Tokens refresh
through auth.refresh and on a 401. scripts/check.mjs now accepts a tools
plugin with auth and no loader, as long as its config gives the provider
no npm and no models.

Run at 7cf6a5c merged onto main, in a sandbox HOME, with HTTPS_PROXY
pointed at a dead port:
- bun test packages/search1api scripts/check.test.mjs: 19 pass.
- node --test on the package's own tests: 16 pass.
- tests/host.integration.mjs against main magpie's host.js: 2 pass.
- bun test across the whole repo: 2647 pass, 0 fail. This needs 017f05c.
  Before it, gcp-ai's fetch guard refused this package's loopback
  fixtures in the shared bun process.
- bun scripts/check.mjs: all ok.

Broken by hand, each one red:
- Dropping the SAME_SESSION check before a refresh: 1 test.
- Never refreshing an expired token: 3 tests.
- Ignoring the apiKey option: 4 tests.
- Not red: dropping the second check, which catches a logout during an
  in-flight refresh. The first check covers it in the logout test.

Real use:
- A sandbox magpie took the package with `plugin add`. `plugin list`
  shows its 6 tools. `plugin login search1api 2` with a key showed
  Providers as "Search1API · signed in as API key …-384 · no models
  exposed".
- The search tool ran against the real api.search1api.com with a fake
  key and got 401.
- OAuth discovery is live: oauth-protected-resource points to
  clerk.s1.dev, which has a registration endpoint and S256.

Not tried:
- A real OAuth consent, or a search with a real key. There is no
  Search1API account here.

Notes:
- The plugin reads the signed-in record from
  `<directory>/plugin-auth.json` itself, since tools get no getAuth.
  magpie writes that file by temp-and-rename, so a read never sees half a
  write.
- magpie's login line says "its models are search1api/<model>" for a
  provider with no models. That is magpie's wording, not this PR's.
2026-10-25 17:53:00 +08:00
cuddlesgiggles d467d29746 cowork 0.1.0: Tuanjie Cowork on magpie's Agents page (#239)
Adds @magpie-community/agent-cowork 0.1.0 (Tuanjie Cowork on magpie's Agents page) and its registry entry. The agent writes the one key defaultChatModelTitle in ~/.codely/ide-settings.json. seed.mjs copies magpie's catalog into Cowork's store, and prunes, relabels and removes only the entry ids recorded in settings.json.magpie-seeded.

Re-reviewed at cbe10c949940b75c6ac2b4cdcc2fe9a92ae6830c against the three earlier change requests (items 1-8, adoption by address, prune hold, relabel and selection).

What was run at cbe10c949940b75c6ac2b4cdcc2fe9a92ae6830c (it merges cleanly onto main b074782):
- bun test packages/cowork: 50 pass. node --test: 50 pass. node scripts/mutate.mjs: all mutations caught. bun scripts/check.mjs cowork: exit 0.
- seed.mjs in a sandbox HOME against a fake /v1/models on a random port, with the owner's fixture: custom-provider (a/one "One on my endpoint"), a user provider my-magpie at magpie's address (a/two "My Two", my-local "My Local"), and defaultChatModelTitle "My Two".
  - First run: +1 (a/three). Neither of the user's entries was touched or renamed. The record holds only magpie:a/three, and the selection is unchanged.
  - A user-added magpie:my-own survived seeding, --prune and --remove ("left 1 you added under it yourself").
  - Catalog shrunk to [a/one] with a/three selected: plain run held the entry ("pass --prune"), --check reported "1 held". --prune dropped a/four but kept the selected a/three.
  - An unreadable ide-settings.json makes the run refuse to write anything (exit 2).
- magpie (main 4dfd88206) in a sandbox via scripts/try.sh: magpie ls lists Tuanjie Cowork. magpie cowork fakeco/fake-model wrote only defaultChatModelTitle. magpie cowork default restored the file byte for byte.
Not run: Cowork itself (Windows). The author sent a real message through Cowork on magpie at 92c9b22 and d79a60f (logs quoted in the PR).
2026-10-25 14:33:36 +08:00
Yaka e801e434f3 gcp-ai: Vertex models and Google Cloud credits with your own gcloud ADC (#307)
New package gcp-ai (Yaka88): Vertex models and Google Cloud credits through the user's own gcloud ADC, with multiple accounts, a signed-in model list, and a pipe-only Chrome for the credits read.

Reviewed at 8989b58 against the 10-24 review at 4586c99. I read the whole incremental diff (index.mjs, lib/browser, lib/credentials, lib/lock, test/*). Earlier rounds had already reviewed the rest.
- Tests reaching the network: fixed. test/network.mjs replaces fetch and blocks non-local net/tls/http/dns. `bun test` (40 pass, 1 skip [Linux-only lock test], 0 fail, 106s) ran in a sandbox HOME/TMPDIR behind a dead HTTPS_PROXY, with a preload that logged non-local fetch and connect calls: 0 lines logged. Broken by hand: with the fetch stub removed from "already filed", the guard prints "Unexpected network fetch … userinfo" and bun exits 1. Restored, it exits 0.
- Chrome background traffic: lsof on the test Chrome processes (56 samples during browser.test.mjs, 5 pass) found no inet sockets at all.
- Leftover work after a test: close() now awaits settled, and every sign-in test closes in finally before restoring fetch.
- Smaller points: the lock's age ceiling now comes after the Linux /proc check; settings() is auth > options > env for every field; resolveAdcDirectory and authorizeAdc are removed.
- `bun scripts/check.mjs gcp-ai`: ok. The merge onto main 98985a2 is clean. Loaded into magpie's plugin host (origin/main 4dfd88206) with scripts/try.sh in a sandbox HOME: gcp-ai, 12 models, not signed in.

Not tried: a real Google account or gcloud sign-in, Windows, Linux (the lock test is skipped on macOS). The headless Console credits scrape still runs for every signed-in account, cached on failure, as noted in the earlier review.
2026-10-25 14:33:15 +08:00
Littlefish 3a59be3caf qoder 0.2.34: QwenWork (千问办公), the public cloud and the enterprise flagship (#319)
QwenWork (千问办公) is served from the qoder package as two more provider ids, as the ruling on #313/#314 asked: `qwenwork` (gateway.qwenwork.cn, the desktop client's device flow and account-context usage) and `qwenwork-enterprise` (the enterprise flagship on the enterprise's own domain, asked at sign-in or preset by QWENWORK_ENT_DOMAIN). Chat, the model list and the queue are signed for the site (ClientType 6, scene qwork, cosy 1.1.59, product qoder_work). No PAT and no check-in for QwenWork, so Qoder's desktop identity never reaches it. Qoder and Qoder CN are unchanged.

Reviewed at c543f1b (on main 8d687ad; main has no qoder or registry change since), by @LittlefishStudent.

Run at c543f1b, sandbox HOME and TMPDIR, network pointed at a dead proxy:
- packages/qoder `bun test`: 223 pass, 0 fail. `bun scripts/check.mjs qoder`: ok.
- Broken by hand, one at a time: the queue status signed without its site, 1 red; the usage 401 rotation removed, 1 red; the site's system prompt ignored, 1 red; the enterpriseHost routing removed, 6 red.
- Read every call of the changed signatures (cosyHeaders, userBlob, queueStatus, queueWait, qoderBody): each passes the site, and a Qoder site has none of the new fields, so its requests are as before (the earlier review's recording probe found them byte-identical).
- magpie origin/main 4dfd88206's plugin host, sandbox HOME (scripts/try.sh qoder): qoder 17 models, qoder-cn 4, qwenwork 3, qwenwork-enterprise 3.

Not tried against the real API here: no QwenWork account in the sandbox. The author ran sign-in, chats and usage against a real deployment.
2026-10-25 14:25:39 +08:00
kassama 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 57ec655:
- packages/joycode: `bun test` (Bun 1.4.2) 30 pass, 0 fail. `node --test` (Node 22) 30 pass.
- Whole repo, as CI runs it: `HOME=$(mktemp -d) bun test` 2373 pass, 0 fail. `bun scripts/check.mjs` all ✓.
- Broke the code by hand: removed the authKey check, made a wrong authKey end the sign-in, mapped the SSE code 401 to 502, and dropped `msg` in chat and in usage. Each one turns a test red.
- magpie built from main, in a sandbox HOME: `plugin add` lists `joycode (JoyCode, 5 models)`, and `plugin login joycode` offers both methods. With a made-up ptKey, provider.models, `provider test` and `quota` each fail with "JoyCode 登录已失效" and mark the sign-in expired. plugin-auth.json is mode 600.
- JD's gateway answered the made-up ptKey with HTTP 200 `{"code":401,"data":…,"msg":…}` on joycode_userInfo, chat_completions (as text/event-stream) and get_newpoint_ide.

Not tried: no JoyCode account was available, so no successful chat, model list, multiplier or quota read was made against JD. The author reports live JoyAI-Code-1.6 streaming and tool-call runs.
2026-10-24 03:34:36 +08:00
Jeff Li 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 8e479f1 (clean merge), sandbox HOME/TMPDIR:
- bun test (whole repo): 2305 pass, 0 fail, 194 files.
- node --test packages/nous/index.test.mjs: 55 pass, 0 fail.
- bun scripts/check.mjs: ok, nous listed.
- Probe through createAuth with a stubbed request: 403 HTML, empty 401, empty 403 -> oauth_request_failed, kept (e8831a8: invalid_grant, expired); 400 invalid_grant, 401 invalid_token, 400 refresh_token_reused -> expired; 401 invalid_client -> kept. Expiry: none -> +3600s; expires_in 900 -> +900s; exp 600 -> +600s; expires_in 300 -> +300s; expires_in 0, exp in the past, or expires_in 7200 with a past exp -> 1.
- Broken by hand: restoring the old 401/403 -> invalid_grant mapping turns 3 tests red; fallback back to 1 turns 3 red; letting the fallback outrank explicit bounds turns 4 red; keeping content-encoding/content-length turns 2 red.

Not tried: a real Nous Portal sign-in or request.
Follow-up: #328 (null or string expires_in beside a valid JWT exp gives expires=1).
2026-10-23 12:16:41 +08:00
mola 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 1ae89aa):
- bun scripts/check.mjs layerfs: ok
- bun test in the package under a temp HOME: 48 of 48 pass, worktree clean after
- the seven points from the last review, each re-run:
  1. source guard: ~/.Config/Magpie, a symlink to ~/.config/magpie, ~/.AWS, ~/.CONFIG and a symlinked parent are all refused
  2. names: project a / branch b--c and project a--b / branch c no longer share a workspace; Main and main are apart
  3. layerfs_history {limit:1} at 200 checkpoints: 0.1 ms (151 ms before), no trajectory.json written
  4. native backend and its SDK path removed; asking for it throws a clear error
  5. repository points at this repo; README images pinned
  6. runShell: cat returns in 32 ms (2005 before), a backgrounded sleep doesn't hold the call, a timeout kills the process
  7. storedBytes equals stored content plus checkpoint records; the description says so
- read every line changed since 1c9e4c1: no path escape, no writes outside its home

Not tried: a real agent using the tools through magpie.
Known: something exec starts in the background keeps running after a successful call, like a normal shell, and can land in the next checkpoint.
2026-10-23 08:16:30 +08:00
Guislabert 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.
2026-10-23 07:08:14 +08:00