Commit Graph
701 Commits
Author SHA1 Message Date
yetoneandump45nose 3618bf9f22 zed 0.1.14: a Gemini model's effort variants are keyed lowercase, and its thinking level reaches Zed uppercase (#215)
Zed's cloud parses a Google request with its own serde enums (zed
crates/google_ai): ThinkingLevel is rename_all UPPERCASE (MINIMAL, LOW,
MEDIUM, HIGH) and FunctionCallingMode rename_all lowercase (auto, any,
none). A thinking budget reached it as thinkingLevel "low" and was
answered 400 "failed to parse Google AI request: unknown variant `low`,
expected one of `MINIMAL`, `LOW`, `MEDIUM`, `HIGH`" (iron-water, #215).

- The gemini wire in providerRequest() now goes through geminiEnums(),
  from ump45nose's #587: the thinking level is uppercased (an empty one
  left out) and the tool-calling mode lowercased, as 0.1.13 already did,
  with VALIDATED, which Zed has no variant for, asked as auto.
- Zed's /models now lists a Gemini model's supported_effort_levels
  uppercase (LOW/MEDIUM/HIGH; Yezike-yyy's Student-plan list on #215), so
  the variants were keyed LOW and carried thinkingLevel "LOW". magpie's pi
  profile, which maps efforts by key, matched none of them, and
  @ai-sdk/google (thinkingLevel z.enum minimal/low/medium/high) refuses
  an uppercase level. effortsOf() now lowercases the values whatever case
  /models writes, once each, so a variant keeps the AI SDK's lowercase
  spelling (the owner's review on #587) and only the wire is uppercase.
  This covers every vendor's efforts, not only Google's.
- _internal exports model() so the test checks provider.models' variants.

Tests: gemini-enums.test.mjs builds its model list from the
supported_effort_levels Yezike-yyy pasted on #215, byte for byte, and its
fake /completions refuses both enums with Zed's error text.

Run on mote at f4e2ac3 plus this change: packages/zed `bun test` 61 pass,
0 fail; root `HOME=$(mktemp -d) bun test` 4545 pass, 0 fail; `bun
scripts/check.mjs` ok. (A root run with a HOME outside tmpdir gives the
same 20 devin/isolated-home reds on origin/main as with this change.)
Broken by hand:
- origin/main's index.mjs under the new test: 7 of 7 fail;
- effortsOf without the lowercase: 4 fail;
- the wire level not uppercased: 2 fail;
- VALIDATED not mapped to auto: 1 fail.
Not tried: a live request to cloud.zed.dev and OpenCode with the real
@ai-sdk/google (no Zed account here). Yezike-yyy reports the same two
changes, patched into 0.1.13, answered 200 for low/medium/high on
zed/gemini-4-argon through magpie on Windows with pi.

Thanks to Yezike-yyy for the uppercase /models finding and its check
through pi.

Co-authored-by: ump45nose <52391318+ump45nose@users.noreply.github.com>
2026-11-01 23:44:10 +08:00
yetoneandggbdpq f4e2ac36fe zed 0.1.13: a Gemini request's tool-calling mode goes to Zed's cloud in lowercase (magpie#4657)
Zed's cloud reads toolConfig.functionCallingConfig.mode with lowercase
variants only (auto, any, none). The Gemini API's proto enums, which the
AI SDK's @ai-sdk/google and magpie's Code Assist envelope both write
(AUTO, ANY, NONE), were answered 400 "failed to parse Google AI request:
unknown variant `AUTO`, expected one of `auto`, `any`, `none`", so every
Gemini turn that declared a tool failed while plain chat and a model test
worked (atticuskk on magpie#4657). providerRequest's gemini case now
lowercases the mode; nothing else in the request moves.

ggbdpq (gua2100) found the cause and proposed the fix on magpie's side
(a body fitter for the zed account). It is made here instead, where the
request is fitted to Zed's cloud: the plugin is what knows Zed's wire, and
OpenCode users of this plugin, whose @ai-sdk/google writes AUTO too, are
covered the same way.

Run (mote): cd packages/zed && bun test: 54 pass, 0 fail;
bun scripts/check.mjs zed: ok. Broken by hand: the lowercase line off ->
gemini-tool-mode.test.mjs red (3 fail, 400 for AUTO, ANY, NONE).
Not tried: a live request to cloud.zed.dev (no Zed account here).

Co-authored-by: ggbdpq <ggbdpq@gmail.com>
2026-11-01 22:23:14 +08:00
yetone 464acbc2fc kiro: the README no longer lists usage under Not included
The plugin has read usage (auth.usage, Get-Usage-Limits) since 0.1.17, and #602 added a "Usage in magpie" section right above the stale line. README only, no version bump: it ships with the next kiro release. Nothing to run.
2026-11-01 22:19:11 +08:00
Giant_GKL 605381174d kiro 0.1.25: bonus credits show on the Usage card, each with when it lapses (#602)
kiro 0.1.25: bonus credits (bonuses in Get-Usage-Limits) show on the Usage card as windows of their own, aside, with when they lapse; a month used up while a bonus has credits left is set aside too, since Kiro spends plan credits first.

Reviewed head fc9eb1e on main df98bf6, on macOS (Bun 1.4.2): packages/kiro bun test 126 pass 0 fail; root bun test 4533 pass 9 skip 0 fail; scripts/check.mjs ok. With main's index.mjs, 3 of the new usage tests fail; removing the carried aside, the expiry filter, the ACTIVE filter, the bonus aside or the spent-bonus runsOut guard each turns at least one red. Shape checked against kiro-cli's UsageBreakdown model (bonuses, FIRST_UPGRADE_TRIAL) and kiro.dev/docs/billing. Not tried with a real Kiro account by the reviewer.
2026-11-01 22:14:27 +08:00
yetone 0678f8613f zen-free 0.1.21: another agent's <env> block is not taken for OpenCode's
The plugin added OpenCode's environment block unless a system message
already carried any <env> ... Working directory: ... </env>. Claude Code up
to about 2.1.100 ends its own prompt with such a block ("Here is useful
information about the environment you are running in:\n<env>\nWorking
directory: ..."), so its requests went to Zen without OpenCode's block,
while Pi's prompt, which has none, always got it. Zen gives a request
without OpenCode's block a small daily allowance on the same per-address
count, so it served Pi and answered Claude Code 429 FreeUsageLimitError
from the same machine (MrHayesLin and GuodingZ47927 on X, 2026-11-01).

Now only OpenCode's own block counts: <env>, then "  Working directory: "
two spaces in, as OpenCode 1.x and 2.x write it. Claude Code's block stays
and OpenCode's, naming the same folder, follows it. magpie's built-in Zen
path gets the same check in the same change.

Run at this tree on mote: bun test in packages/zen-free (204 pass, 0 fail),
bun scripts/check.mjs (every package ok).
Broken by hand: with the old regex the new case is red in all three
protocols (chat, responses, anthropic).
Checked by hand: Claude Code 2.0.76, 2.1.0 and 2.1.100 (npm) carry the
block; 2.1.316 (latest) has none, and its requests already got OpenCode's
block through this plugin (sandbox HOME, fake upstream).
Not tried: a request to Zen itself. Every machine here leaves from one
address whose free quota was spent today (real OpenCode 2.2.5 got the
same 429), so it can't be compared before 00:00 UTC. Why a current Claude
Code (2.1.316) is refused, if it is, is not known yet.
2026-11-01 22:07:03 +08:00
yetone df98bf6fb2 nowledge-mem 0.1.3: skipAgents leaves the apps you name without memory (#597)
QingZ11 relayed a user whose Doubao translator, behind magpie, had Mem
recall added to every translation. The plugin had one global recall
switch, so the only way out was turning memory off for every agent.

skipAgents (option, and "Apps without memory" on the plugin page) lists
apps by the agent name magpie gives a request (ctx.agent, the Agent
column on magpie's Usage page). A listed app's request is treated like
another machine's: no search, no Context Bundle, no capture, nothing
sent to Mem, request unchanged, reported "skipped". Names compare
without case, spaces or punctuation, so "Claude Code" matches
claude-code. A list or a comma-separated string (ASCII or full-width
comma). Default empty: nothing changes for anyone who doesn't set it.

Run (mote, at this tree on origin/main 1a3a138):
- HOME=$(mktemp -d) bun test: 4529 pass, 0 fail, 9 skip (live checks).
- bun scripts/check.mjs: ok.
- Broken by hand: without the skipAgents check in run(), the new test
  goes red (1 fail), green with it.
Not tried: a real magpie with a real translator app; the hook's ctx is
driven as magpie's host calls it, and the page script through its test.
2026-11-01 18:39:03 +08:00
yetone 1a3a138491 devin 0.1.31: each cache keep-alive ping is told to magpie; the interval and count get magpie's Options editor (#592)
zelong77 asked for two things once 0.1.30's keep-alive worked: the pings
were invisible in magpie, and the interval and ping count could only be
edited in plugins.json.

- Each ping that wasn't cut short is reported through magpie.usage (new
  in magpie, plugins#592) with kind cache_keepalive, the conversation's
  model (chat.model) and account (magpie.account at request time), its
  input, output, cache read and write tokens, status, time, and why it
  failed. The ping still goes straight to Devin, never back through the
  gateway: the gateway re-shapes a request, and the cache would no
  longer match. An older magpie or OpenCode has no magpie.usage and is
  told nothing; the pings go on the same.
- pingOnce now also reads output tokens (usage field 3) and keeps the
  failure's message.
- package.json magpie.options gives the two settings' defaults
  (285 s, 6), which magpie's Plugins › Options editor now starts from
  for a provider plugin. The switch's description says where they are
  and that pings show in Usage, in all five languages, each under the
  host's 300-character cap.

Run (on mote, sandbox HOME): bun test in packages/devin, 174 pass;
bun scripts/check.mjs devin ok.
Broken by hand: reporting aborted pings too fails "a ping cut short by
the conversation's next request isn't told"; dropping the report call
fails "each ping is told to magpie".
Not tried: a real Devin account's ping reported into a real magpie.
2026-11-01 17:59:33 +08:00
yetone 11e0acd9b1 agent-office 0.2.4: a jumpRequest.at ahead of the clock no longer blocks every later jump (#583)
0.2.3's host acted on any jumpRequest no older than 15 s, a future one
too, and kept its time in $XDG_CACHE_HOME/agent-office/last-jump.json;
every later click had at <= that time and was dropped until the clock
got there. The decision is now judgeJump(at, seen, now) in lib/jump.mjs:

- A request fires only from 15 s old to 5 s ahead, once.
- One stamped further ahead is set aside and recorded, so it never
  fires when the clock reaches it.
- A seen time ahead of now (0.2.3's file for such a request, or a clock
  that stepped back) blocks only that same request (at === seen); any
  other fresh click fires and rewrites the file. With seen in the past,
  an older or equal request is still never acted on, so nothing is
  replayed across restarts.
- The target is still worked out by the host from the session id; a
  page-stamped time can only make a request be skipped, not fire it
  later or elsewhere. Non-finite times are ignored and never written.

Existing bad last-jump.json from 0.2.3: read as before, no migration
needed; it no longer blocks, and the next click replaces it.

Run at this tree (base b797476), HOME=$(mktemp -d):
- mote (macOS): packages/agent-office bun test 180 pass, 0 fail;
  bun scripts/stamp-page.mjs --check ok; bun scripts/check.mjs ok.
- wsl-run (Ubuntu 24.04): agent-office bun test 180 pass, 0 fail.
- win-run (Windows 11): agent-office bun test 180 pass, 0 fail.
  The two host tests are macOS-only (fake herdr, like the 0.2.3 restart
  test); judgeJump's table test runs on all three.
- New tests against 0.2.3's office.hooks.mjs (mote): both host tests
  fail; a bad last-jump.json blocked the fresh jump, and a request an
  hour ahead fired at once.
- Broken by hand (mote): dropping the 5 s ahead bound (2 fail), letting
  a seen time ahead of now order requests again (3 fail), not recording
  a set-aside future request (2 fail).

Not tried: a real magpie with a real herdr or terminal, or a real clock
step; whole-repo bun test (only agent-office changed).
2026-11-01 14:35:42 +08:00
yetone b797476f6b devin 0.1.30: an opt-in cache keepalive, as the devin CLI's (#592)
Devin's prompt cache lasts 5 minutes and has no longer TTL to ask for.
A switch, "Keep the cache warm" (cache_keepalive, off by default, with
zh, zh-TW, ja and de labels), keeps it as the CLI's cache_keepalive.rs
does: after a reply that read or wrote the cache, whatever it stopped
for, the same GetChatMessage goes again every 285 s with one more user
prompt, "continue", and max_tokens 1. The request's bytes are encoded
once, and the ping is them with that prompt and field 8's max_tokens.

- A conversation is session + Claude Code agent id (when the headers
  reach the plugin) + a hash of the instructions, tool names and first
  user message; its next real request stops its pings, so a subagent
  never stops its lead's.
- Stops on 401, 402, 429, two pings in a row reading under half their
  prompt from the cache, the most pings (6), the switch going off, and
  process exit. Timers are unref'd. At most 32 conversations are kept.
- Options cacheKeepaliveInterval (30-299 s) and cacheKeepaliveMaxPings
  (1-50); OpenCode, which has no switch, takes cacheKeepalive: true.
- README says the cost (each ping is a cache read of the whole context,
  spent whether the user comes back or not) and why it is off.

Run (mote, HOME=$(mktemp -d)):
- bun test packages/devin: 170 pass, 0 fail (14 new in keepalive.test.mjs).
- Whole repo bun test: 4520 pass, 9 skip, 1 fail: gcp-ai's "a lock held
  by another process is waited for, then taken" (ENOENT in abandoned()'s
  stat, a race in lib/lock.mjs; passes 3 of 3 alone), filed as #594.
- bun scripts/check.mjs: ok.
- The new tests against the old index.mjs: 14 of 14 fail.

Broken by hand, each red in the test named for it: no cancel on the next
request, no agent id in the key, no prefix hash, no stop on 401/402/429,
no miss count, no cap, no unref, max_tokens kept, pings after a reply
that touched no cache.

Real account (the owner's Devin sign-in read, nothing written, sandbox
HOME, this Mac): claude-sonnet-5-5-low, an 11k-token prompt wrote 10,984
to the cache; one ping 287 s later read 10,984 from it (cacheWrite 3,
output 1) and, at max 1, stopped.

Not tried: more than one ping or a long Claude Code session; the OpenCode
2 (v2) path, which has no keepalive. magpie doesn't pass
x-claude-code-session-id / x-claude-code-agent-id to a plugin's fetch, so
under magpie the key rests on the prefix hash (a lead and a subagent
differ there; two sessions with the same prefix share one keepalive).
2026-11-01 14:12:06 +08:00
yetone 85019888d7 zen-free 0.1.20: send each protocol where OpenCode 2 does
0.1.19 matched OpenCode 2.2.5's headers and body, but the capture behind
it set OpenCode's baseURL to the recorder, so the path wasn't compared.
OpenCode 2.2.5 reads models.dev's v2 catalog
(models.opencode.ai/experimental/v2.0/api.json; models-dev.ts takes each
model's api.base_url), which gives every opencode model, the 38 free
chat ones included, https://opencode.ai/inference/openai/v1 for
chat-completions and responses and /inference/anthropic/v1 for messages.
The plugin sent all of them to /inference/v1, where no OpenCode 2
request goes. It now sends each to OpenCode's base; a baseURL given in
options (the tests' fixtures) is still asked as given. The model list
stays at /inference/v1/models: OpenCode reads its catalog instead, and
/inference/openai/v1/models is a 404 (checked on mote).

Run:
- bun test in packages/zen-free on mote (temp HOME as CI) and in WSL
  magpie-desktop: 204 pass.
- Broken by hand: upstream back to baseURL: the inference-path test red.
- OpenCode's captured request replayed from mote at
  /inference/openai/v1/chat/completions and at /inference/v1: both 429
  FreeUsageLimitError, as everything from our egress IP is.

Not tried: a 200 (the IP's free limit is spent, see 0.1.19's body), and
a capture of OpenCode at its default URL (TLS to opencode.ai; the path
comes from its source and the catalog instead).
2026-11-01 13:47:44 +08:00
yetone d62193c43c zen-free 0.1.19: send OpenCode 2.2.5's request, header for header
laomao04_65777 (magpie Discord, 11-01) gets 429 FreeUsageLimitError
("Free models work in OpenCode") on every Zen free model through
zen-free 0.1.18, while real OpenCode works on the same machine.

OpenCode 2.2.5 (@opencode/cli, npm latest; release binary from
anomalyco/opencode) was run in a sandbox HOME on mote against a recording
proxy, and its primary chat request was diffed against 0.1.18's
carrying the same body. 0.1.18 differed in:
- User-Agent opencode/latest/2.0.25/cli, not 2.2.5;
- x-opencode-project "global" on every request. OpenCode 2 sends
  sha1("directory:" + folder), or sha1("git-remote:host/path") in a
  repository with a remote (packages/core/src/project.ts), and "global"
  only from a repository with no remote and no commit;
- no b3 or traceparent trace headers;
- Accept set by hand, so it went first, where OpenCode's is fetch's own,
  after Connection;
- the model list GET went with User-Agent Bun/1.4.2;
- the stand-in tools were 1.x's (bash, filePath), with no required or
  strict:false; 2.x has shell and path;
- the environment block lacked 2.x's "Prefer <tmp>/opencode ..." line.

All of them now match. The version is read from OpenCode's own updater
(opencode.ai/update/api/latest/cli/npm) at most every six hours, never
older than the built-in 2.2.5, which stays when it can't be read. Not
asked when a test gives its own baseURL.

Run:
- bun test in packages/zen-free on mote (macOS) and in WSL magpie-desktop
  (Linux), with HOME a temp dir as CI: 204 pass.
- bun scripts/check.mjs on mote: every package ok.
- Broken by hand: project back to "global", b3 removed, version back to
  2.0.25: 8 tests red (the three header tests, the four project tests,
  the updater test).
- Recapture on mote: the plugin's loader.fetch given OpenCode 2.2.5's own
  captured body, at the same recorder. Headers in order and the body are
  byte for byte the same as OpenCode's once the per-request session,
  trace and span ids are masked. 0.1.18's capture differs as listed
  above. The model list GET now goes as opencode/latest/2.2.5/cli.

Not tried: a 200. Real OpenCode 2.2.5 itself gets the same 429 from our
egress IP (mote, this Mac and xiaomi-gpu share it), as do replays of its
captured request with a fresh project id, so the free limit on that IP
is spent and no request from it can show the fix served. The title
request an agent sends still goes with the environment block and tools
added (as since 0.1.15), which OpenCode's own title request has not;
an agent's title request can't be told from its turn.
2026-11-01 13:44:22 +08:00
yetone aec58aec33 workbuddy 0.2.10: "Free models only" in magpie's languages, and says it filters the list (#590)
anewuser6937 (Discord, #590) saw one model in WorkBuddy's editor and took
the plugin for broken: they had turned on "Free models only" themselves,
but its label and description read in English inside magpie's Chinese
window, and nothing by the models said the list was filtered.

The switch now gives its label and description in Chinese, Traditional
Chinese, Japanese and German (labels, descriptions, by magpie's window
language) and says filtersModels: true, so a magpie that knows these
fields says under the models that the list is filtered while it is on.
Both are magpie's own fields inside auth.options, which OpenCode
(AuthHook: provider, loader, methods) never reads; an older magpie's host
copies only key/label/description/default/confirm, so it shows the English
words as before. Nothing else changes: what the switch does is the same.

Run on mote: HOME=$(mktemp -d) bun test packages/workbuddy: 303 pass,
0 fail; bun scripts/check.mjs ok. The new freeonly test ("says its words
in magpie's languages, and that it filters the list", both sites) fails
2 of 2 with index.mjs put back. Loaded into magpie's real plugin host
(the magpie change beside it), plugin.Providers lists both sites' free_only
with all four languages and filtersModels true.
2026-11-01 13:15:09 +08:00
yetone 7a79949ccb qoder 0.2.52: an account's model list on a job token Qoder lists only the free model for is renewed once and read again
star21321321124_93024 (Discord #general, 2026-11-01): a Qoder CN personal
account with all 1500 credits left listed one model in magpie, the free
Flash ("Qoder CN: 1 model"), so agents saw only that one.

Cause, from Qoder CN's real bytes: gateway.qoder.com.cn's
/algo/api/v2/model/list answers a caller it doesn't take for an account
with every model that costs credits `enable: false` and the free
Qwen3.8-Flash on, in every scene (captured 2026-11-01 for an unknown uid,
kept as testdata/cn-listing-free-view.json). plugins#484 saw the same view
for a stale job token on qoder.com. 0.2.49 renewed the job token when a
chat asked for a model that list had off, but provider.models (the list
magpie and its agents see) read it as it came, so the account showed
the free model alone and nothing renewed it.

Now models() marks such a listing (freeView: some paid model, none on),
and the provider.models hook renews the job token once through relogin
(same lock and 5-minute rule as #474/#484), saves it, reads the list
again and says the renewal on the next usage read or answer. A renewed
token that still gets the free view is remembered and not renewed for the
list again, so an account that really has only the free models doesn't
spend a refresh token each time magpie lists.

Tests (cn-free-view.test.mjs, from the captured bytes; the account's list
is the same bytes with each model on):
- free view on jt-1 -> one refresh, all 10 app models listed, jt-2 saved;
  listing again spends none.
- the next usage read says "renewed".
- free view on the renewed token too: listed as it is, one refresh over
  three lists an hour apart.
- a list with paid models on spends none; freeView's edge cases.

Run on mote (Bun 1.4.2):
- cn-free-view.test.mjs against origin/main's index.mjs: 4 of 6 fail
  (the list is ["qfmodel"]); with this change 6 pass.
- Broken by hand: the stillFree guard off, the "renewed once" test fails
  (3 refreshes).
- bun test in packages/qoder: 345 pass, 0 fail. bun scripts/check.mjs: ok.

Checked live (read only): qoder.com's listing for the owner's account has
every model on in every scene, the same with its device token and with a
bogus token (qoder.com keys the list on the uid). Qoder CN's CLI
(@qodercn-ai/qoderclicn 1.1.81) reads the same /api/v2/model/list.

Not tried: a real Qoder CN account (none here), so it is not confirmed
that a renewal gives the reporter back the full list; if their token is
honoured and the list is still the free view, the account itself has
the paid models off and this change lists it as it is.
2026-11-01 12:43:47 +08:00
yetone b38ad66551 page-chat 0.1.8: the service takes its port once the old host lets go, instead of giving up after 6s (ferock on Discord)
ferock on Discord, after page-chat updated itself to 0.1.7: typing a
system prompt said "保存失败:Failed to fetch", and every message after
failed the same way. The system prompt wasn't the cause. Nothing was
listening on the page's port any more.

magpie swaps plugin hosts when a plugin is updated, installed or set
(Restart, or another magpie's change to plugins.json). An old host that
is still finishing a call (a reply, a tool call) keeps running, up to 10
minutes, and its page service keeps 3477. The new host's service tried
for 6s, threw "3477 一直被占用", and never tried again. When the old
host left, nobody had the port. The page's frame stayed on
127.0.0.1:3477, and every fetch failed until magpie was restarted.

startServer now tries for those 6s (bindTries x 500ms) without holding
up the host. Then it goes on trying once a second in the background
until the port is free, and stops when the service is closed. The page's
next request gets 403 with the new token, and the page reloads itself
as before. index.mjs logs "listening" when the port is bound.

Run (mote):
- Reproduced with real magpie serve (magpie origin/main 36af588e2) in a
  sandbox HOME, page-chat on port 3592. A plugin tool that takes 40s was
  in flight while page-chat 0.1.6 was auto-updated to 0.1.7 by
  KeepUpdated, or while another plugin was added. 0.1.7's service logged
  "could not start: 3592 一直被占用", and every save to /api/settings got
  000 (no listener) after the old host left, even with a fresh token.
  With this change the same run logs "还被占着" and then "listening".
  A save gets 403 (new token), and the page's reload saves 200.
- Without a busy host, an update came back on its own (403, reload). So
  did saves of Chinese, quoted, multi-line and 50k-char system prompts
  and a chat on 0.1.7. None of them failed.
- bun test chat.test.mjs: 31 pass. The two new tests are red on the old
  lib ("58585 一直被占用,服务起不来"), checked by hand.
- bun scripts/check.mjs ok.

Not tried: magpie's desktop window (WebKit). The page there was not
driven; its 403 reload path is unchanged.
2026-11-01 12:25:02 +08:00
YanYunCY 74ef5602f1 notify 0.1.1: an interim agent notification or a SendMessage resume holds the turn (YanYunCY, #578)
Claude Code background agents: an interim `<task-notification>` (the agent stopped with background work of its own still running, or a late message is resuming it) no longer ends the turn early, and a SendMessage that resumes an agent (`resumedAgentId`) holds the turn until that agent notifies again. Fixes #576. By YanYunCY.

- Only the `<note>` decides that a notification is interim; the agent's own `<result>` may quote the same words. (Checked against claude 2.1.316's source: the binary always writes `<note>` before `<result>` in an agent notification.)
- An entry marked interim is dropped when the user's next own message starts a turn, so an agent that keeps a dev server running never silences later turns.
- A notification with a `<tool-use-id>` ends only that call; one with only a `<task-id>` ends every call the agent is out under. A SendMessage resume replaces the agent's earlier calls.
- notify 0.1.1. Fixtures recorded from the real claude 2.1.316 (agent-interim, sendmessage, late-message).

What was run (reviewed head 045668c, on the mote Mac mini, Bun 1.4.2, HOME=$(mktemp -d)):
- `bun test packages/notify`: 57 pass, 0 fail. `bun scripts/check.mjs`: exit 0. `bun test` (whole repo) at the head: 4474 pass, 9 skip, 0 fail; and with origin/main e8050e8 merged in: 4494 pass, 9 skip, 0 fail.
- Both repros from the first review are in the suite and pass. At 5d2ed61's turn.mjs/notify.hooks.mjs, 11 tests fail.
- Broken by hand, one at a time: reading the whole notification instead of `<note>` turns 2 tests red; not dropping interim entries on the next message turns 2 red; not replacing an agent's earlier calls on SendMessage turns 1 red; ending by task-id as well as tool-use-id turns 10 red (the hand-built older-run test among them).
- Real fetch to a local fake ntfy server, replaying the recorded runs: agent-interim [0,0,0,0,0,0,1], sendmessage and late-message [0,0,0,0,0,0,0,1]; the first review's second repro pushes the next turn ("took 10 min") and the one after it.
- Extra edge cases, built by hand: two agents, one interim and one still out: the next message drops only the interim one, the interim agent's late task-id-only notification doesn't end the other, and the push comes when the other notifies. An interim agent resumed by SendMessage in the next turn holds that turn until its notification.

Not tried: a live claude session against magpie. Known and accepted: if the user's own words arrive in the same request as an interim notification, that turn stays held until the user writes again (the entry is marked after the drop).
2026-11-01 11:24:52 +08:00
yetone e8050e812d kiro 0.1.24: a conversation past the model's window is a 400 that says too long
Kiro says a conversation is too long for the model three ways: an HTTP
400 ValidationException "Input is too long." (CONTENT_LENGTH_EXCEEDS_THRESHOLD),
the same ValidationException as an exception frame in the event stream,
or a metadataEvent with stopReason MODEL_CONTEXT_WINDOW_EXCEEDED. Only the
first came out as the 400 "input is too long for the model's context: ..."
that magpie's gateway reads as an overflow (tooLong). The stream exception
went out as a 502 (failedBefore), and the stop reason as end_turn.

As a 502, magpie counted a passing failure: it asked the same Kiro model
again, could rest the account, and in a group routed by intent only moved
on as for any vendor error; a lone agent got a vendor error instead of
context_length_exceeded, so it never compacted. Reported by
ergou0954_54426 on Discord (Kiro's Claude/GPT and DeepSeek in intent
routing, "kiro 那边报错说超出上下文").

Now failedBefore, and the turn after a web search, answer a too-long
exception with that 400. A MODEL_CONTEXT_WINDOW_EXCEEDED stop before any
of the reply is the same 400; after some of it, the reply ends with stop
reason model_context_window_exceeded (Anthropic's word for it). Other
exceptions keep 502, quota and throttling keep 429.

Run on mote: HOME=$(mktemp -d) bun test in packages/kiro, 122 pass;
bun scripts/check.mjs ok. Broken by hand: with index.mjs at HEAD the
three new too-long tests fail (13 pass, 3 fail in errors.test.mjs).
Not tried: a real Kiro account pushed past its window; the stream shapes
come from Kiro's own clients (amazon-q-developer-cli's error enums,
kiro.rs, opencodex's kiro stream reader).
2026-11-01 11:11:02 +08:00
SadWood 5067a29772 nowledge-mem: the README says the package adds no Library entry, and requestTimeoutMs defaults to 1500 (#584)
nowledge-mem's README says what the package does: it adds no Library entry or skill (the user adds Mem's MCP server), and requestTimeoutMs defaults to 1500 (900 is the package's example options).

Docs only, no runtime change. Reviewed at bb4aa074: checked against origin/main's mem.mjs:101 (`integer("requestTimeoutMs", 1500, 50, 5000)`), package.json's example options (900) and the README's own Tools section (no Library entry, no skill). CI test and on-npm green at this head. No version bump: the package's behaviour is unchanged.
2026-11-01 10:36:51 +08:00
Jixing Liu 3303225dc9 agent-office 0.2.3: jump to a session's live terminal tab, pane or window on macOS, by jixing475 (#552)
On macOS, Agent Office now finds the terminal tab, multiplexer pane or desktop
window where a live session runs (Terminal.app, iTerm2, tmux, Herdr, Otty,
Claude Desktop, Cursor, VS Code). The panel has a jump button, or you can
double-click a worker, name tag or row. The page sends only
{key, session, preferredHostId, at} through options.set. The hooks host
resolves the target from its own ps/herdr/otty/tmux snapshot, and runs fixed
binaries with args it derived itself. TTYs are checked against
^/dev/ttys?\d+$ and quoted before they go into AppleScript. Nothing resolves
on Linux or Windows. When magpie restarts the host after options.set, a fresh
request (15s or newer) runs once. The last handled time is kept in
$XDG_CACHE_HOME/agent-office/last-jump.json, and plugins.json is never
written. The standalone server never reads plugins.json. Version 0.2.3.

By jixing475 (#552).

Run at b4654a2:
- mote (macOS 27.2, Bun 1.4.2), sandbox HOME: packages/agent-office bun test
  177 pass 0 fail; stamp-page --check 0; root scripts/check.mjs 0.
- WSL magpie-desktop: 177 pass 0 fail. Windows 11 xiaomi-gpu: 177 pass 0 fail.
- Broken by hand, each red: lastJumpAt seeded from the request (restart
  test), no last-jump.json write (replay check), all plugins.json options
  merged (--private test), req.target trusted (crafted-target test).
- Real magpie at main 4179cf2d8 on mote, sandbox HOME, plugin added from a
  folder, magpie web, fake herdr. The page's options.set sent by curl gave
  workspace/tab/agent focus after the host restart. plugins.json stayed 0600
  with another plugin's apiKey. A second restart with the same request did
  not replay it. A click within 1s of a save got 429, and the next click
  jumped.
- Not tried: a real iTerm2, Terminal, Herdr.app, Otty or Claude Desktop
  window, or the page clicked in a browser.

Follow-up: #583 (a future jumpRequest.at blocks later jumps).
2026-11-01 08:52:04 +08:00
yetone 044313a9d0 agent-office 0.2.2: a same-size sidecar rewrite inside one timestamp tick is read again (#580)
The scanner judged a Grok usage.json / summary.json revision by
"size:mtime:ctime" alone. Linux stamps a write with the coarse kernel
clock: on the WSL2 box 199 of 200 same-size in-place rewrites kept all
three (mote, APFS: 0 of 200). So "midnight and metadata-only changes do
not read JSONL again" was red there (usage 100 -> 200 serialize to the
same length, written ms apart) and green on mote and CI. A user's
usage.json rewritten that way kept the old token count. This is a
product bug, not a test assumption.

A sidecar's revision is now "size:mtime:ctime:ino", plus "#sha1" of
its bytes while its stamp is under 2.5 s old (RACY_MS, git's racy-index
idea). sameSidecar compares the stamps, and the digests where both
carry one, so a stamp aging out of the window is not a new revision and
the same bytes written again are not parsed again. Cost: a sidecar
(<= 256 KiB meta, <= 32 MiB usage) is read and hashed on each tick for
2.5 s after a write. createScanner takes statSync (sidecars only) so a
test can freeze the stamps.

New test: "a same-size usage.json or summary.json rewrite inside one
timestamp tick is read again" (frozen mtime/ctime; in place, temp and
rename, same bytes again with no parse).

Run at this tree (5403c21 + this commit, = origin/main just fetched):
- mote: packages/agent-office HOME=$(mktemp -d) bun test 168 pass 0 fail;
  stamp-page.mjs --check 0; bun scripts/check.mjs agent-office 0; full
  HOME=$(mktemp -d) bun test 4470 pass 9 skip 0 fail.
- wsl-run (magpie-desktop): packages/agent-office 168 pass 0 fail; full
  bun test 4471 pass 8 skip 0 fail.
Broken by hand:
- origin/main's scan.mjs with the new test on WSL: both #580's test
  (line 162) and the new one (line 206) red.
- on mote, digest and ino both removed: the new test red at line 206;
  ino kept, digest removed: red at 206; digest kept, ino removed: green
  (the digest catches the rename too; ino is belt and braces).
Not tried: a real Grok Build session writing usage.json; Windows.
Not changed: the session files themselves (Gemini .json, dsh .zstd,
JSONL, Codex session_index.jsonl) have the same stamp-only check;
filed as #581.
2026-11-01 08:02:29 +08:00
yetone 5403c21484 qoder 0.2.51: a native tool call that never gets its name no longer fails the turn (#579)
bigstage915 (Qoder CN, qoder-cn/qfmodel through ZCode) saw qfmodel now and
then begin a native tool call and never send its function name. events()
then ended the stream with "the model's native tool call has no name", an
SSE error frame on a 200, which ZCode reads as not retryable: the whole
turn died, with the reasoning and text already shown (9 incidents in four
days, after reasoning-end and after a named call's tool-input-start and
argument deltas).

An unnamed call is still never given, and its held arguments go nowhere,
not into the text. Now:
- Nothing of the answer said before it (no text, reasoning or call): the
  reply is the same 502 as before, marked nameless, and ask sends the
  request once more under a new request_id. A second such reply goes back
  as the 502, before any byte, which magpie's gateway retries or fails
  over (retryable: status >= 500).
- The answer had begun: the call is dropped and the answer ends as it
  would have without it, tool_calls beside a named call, stop (or length)
  otherwise, and console.warn says so (the host's stderr, in magpie's
  log). The non-streaming reply is the same: named calls kept, the
  unnamed one left out.

Tests (native-tools.test.mjs): the after-reasoning test now expects the
reasoning kept, no tool frame, finish stop and the warning; new cases for
an unnamed call after a named call's start and argument deltas (stream),
beside a named one (non-streaming, unnamed first and after), after text,
and nothing-said (asked twice, then 502; asked twice, second answer
given). The two 502 tests now also count two chat requests.

Run, on the WSL2 box (magpie-desktop, Bun 1.4.2; mote at load ~120):
- native-tools.test.mjs: 15 pass.
- The new test file against origin/main's index.mjs: the 7 new or
  changed tests fail, the 8 others pass.
- Broken by hand: the in-plugin retry off, 3 fail (the retry tests);
  reasoning not counted as said, 1 fails (after-reasoning).
- Full `HOME=$(mktemp -d) bun test` at this tree: 4469 pass, 1 fail,
  agent-office's "midnight and metadata-only changes do not read JSONL
  again", red alone on untouched origin/main 26864ec too, in UTC and
  Asia/Shanghai: filed as #580. `bun scripts/check.mjs`: ok.

Siblings: no other package has this guard (grep of the error text and an
unnamed-call check over packages/). magpie's own chatTidy already drops a
call whose first fragment has no name and ends stop (#1475), the same
choice.

Not tried: a real Qoder CN account; the failure is the model's and not
reproducible on demand.
2026-11-01 07:06:57 +08:00
yetone 26864ec9b0 zcode 0.1.40: two accounts take requests at once, the others in reserve
01huadalang on Discord (#feedback): three ZCode accounts used at once
from one address got the address refused with a 405; two were served.
They asked for the first account to be used until it runs out, then the
next.

The plugin now declares maxAccounts 2, on the auth hook and as
magpie.maxAccounts in package.json, beside maxConcurrency. magpie (the
release after this, its provider setting Accounts at once) sends
requests to the first two accounts of the user's list only and holds the
others in reserve; one that runs out or fails rests and the first in
reserve takes its place. The user's own value on the provider wins, 0
for every account. A magpie that doesn't read the field uses every
account, as before. README: "Two accounts at once".

Run on mote: HOME=$(mktemp -d) bun test in packages/zcode (183 pass,
0 fail) and bun scripts/check.mjs (exit 0). Broken by hand:
package.json's maxAccounts set to 3 turns "two accounts at once are
declared, the same number twice" red. Not tried: real ZCode accounts
(none used, per the task), and whether two at once is always under
ZCode's limit; that is the reporter's finding, and the user can lower
it to 1.
2026-11-01 04:02:16 +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
yetone 6727a1e68c workbuddy 0.2.9: a model declared before the account's list is read takes images (#572)
kongbai01203 found WorkBuddy AI's kimi-k3 listed as image: false and
reasoning: false. That is the list the plugin declares (configModels): what
magpie has before an account's own list is read, for an API key whose CLI
reads no config, or when /v3/config can't be read. It declared every model
text-only. The live list already says kimi-k3 takes images.

Read on 2026-11-01 with the owner's real accounts: both sites' /v3/config
mark every model supportsImages (WorkBuddy AI's glm-5.3 aside, which
textOnly already turns off, measured 10-13). Through this plugin's own
loader fetch, a chat to www.workbuddy.ai's kimi-k3 with a 32x16 PNG, blue
left and yellow right, answered "Blue yellow" (HTTP 200). kimi-k3-1, the
id in the report, is a copilot.tencent.com model: www.workbuddy.ai answers
it 400 11102 "service info not found".

A declared model now takes images unless textOnly says its site drops them.

Run (mote-run, bun 1.4.2, HOME=$(mktemp -d)): packages/workbuddy bun test,
301 pass 0 fail.
Broken by hand: with index.mjs at origin/main, declared-images.test.mjs is
0 pass 2 fail.
Not tried: the static list's models the live config no longer lists
(gpt-5.5, kimi-k2.6, ...) with an image; they are declared as the config
said of every model.
2026-11-01 00:09:58 +08:00
yetone e7dfe88218 fingerprint 0.2.1: the page shows in magpie's Linux and Windows windows
nb5p (Discord #feedback, 10-31): the 模型指纹 page stays blank in the
desktop app while `magpie web` (Chromium) shows it.

Cause, Linux: magpie frames a plugin page in <iframe sandbox="allow-scripts">,
so the service document has an opaque origin. WebKitGTK (2.52.6, magpie's
Linux window) then matches nothing to CSP 'self', and the service's policy
was 'self' alone for scripts, styles and images: the bundle was never
requested. Chromium and macOS WebKit match 'self' there, so web mode and the
Mac app worked. The service now names its own validated listener
(http://127.0.0.1:<port> or localhost:<port>) and, when proxied, the
validated launcher origin, in every fetch directive. Nothing else is
allowed: script-src keeps its nonce and no 'unsafe-inline', and
object-src/base-uri/form-action are 'none'.

Two Windows faults on the same path:
- boot.js took the window's http://wails.localhost for a remote web page
  and showed "upgrade magpie" instead of going to the local service.
  Every *.localhost, localhost, ::1 and 127.x now count as this computer
  (the service still checks Host and Origin and its bearer token).
- server.ts kept assets inside ui/ with startsWith(resolve(uiDir) + "/"),
  which never holds for backslash paths, so every asset was a 404 on
  Windows, in web mode too. It now uses path.relative, and still refuses
  .., encoded .. and a backslash escape.

integration.md says the same about the CSP. dist rebuilt with Bun 1.4.2 on
mote (the old source rebuilt to the committed dist byte for byte, so the
dist diff is only this change).

Run:
- mote (macOS 27): bun run build, typecheck, bun test: 33 pass.
- win-run (Windows 11): bun test: 33 pass.
- Linux, the real app: a dev magpie (-tags dev,gtk3) in WSL magpie-desktop
  under a sandbox HOME, with this plugin installed. Old plugin: the frame
  reached the service and no script ran, blank. New: the service page
  rendered and connected to magpie.
- macOS, a WKWebView with a wails:// scheme over a real dev backend on
  mote, sandboxed frame: renders with the old and the new policy.

Broken by hand:
- the new CSP test is red on the old server.ts (no own origin in
  script-src etc.);
- the boot test for wails.localhost is red on the old boot.js;
- the asset test is red on Windows with the old containment check.

Not tried: the real Windows Wails app (WebView2) end to end, and the
reporter's own machine; their platform isn't stated, and Linux is the one
where this reproduces.
2026-11-01 00:08:40 +08:00
SadWood 5b1ae40256 nowledge-mem 0.1.2: opt-in capture filtering, by SadWood (#567)
nowledge-mem 0.1.2 (SadWood): opt-in capture filtering. `captureFilter: "off"|"human"`
(default "off") and `captureCindy` (default false). Human mode imports only user/assistant
text (tool results dropped, commentary on tool calls kept); with captureCindy and
ctx.agent === "cindy" it removes complete, recognized leading Cindy host notes and keeps
anything unknown, incomplete, fenced, quoted or carrying a scheduled-run/handoff marker
verbatim. Only the copy sent to POST /threads/import changes; external IDs still hash the
original text and occurrence index, so off-mode IDs are unchanged. No new network route.

Reviewed head fed33102005d118507ab14cdc2765a2761254329, merged locally onto origin/main
8b01396 (0fb659a), all on mote:
- node --test packages/nowledge-mem/capture-filter.test.mjs: 52/52.
- bun test packages/nowledge-mem: 105 pass, 1 skip (live).
- Differential test of 0.1.1 vs 0.1.2 hooks (9 requests over chat/responses/anthropic/
  gemini, Cindy notes, tools, images, repeats; 6 off-mode option sets incl. recall and
  captureTools false): import payloads, returned request and reports byte-identical
  (tool_version aside). Human+Cindy mode returns the same request to the model as 0.1.1.
- Full bun test, HOME=$(mktemp -d): 4419 pass, 9 skip, 0 fail. bun scripts/check.mjs: ok.
- Broken by hand, each red: request mutated in capture (34 red); unclosed directory tag
  stripped, truncated UI-language note matched, unterminated context note stripped,
  fences ignored (quoted/fenced/incomplete test red each); default "human" (defaults +
  off-diff red); filtered index in IDs; no trim in off mode; mixed-source guard removed;
  Cindy cleanup for any agent or without opt-in.
Not tried: a real Mem server or a real Cindy session.
2026-10-31 22:39:34 +08:00
luodaoyi f7e0dcb823 respire-memory 0.3.10: diary readback looks up the turn marker lexically and checks every matching candidate (#568)
respire-memory 0.3.10 (luodaoyi, follow-up to #553):

- readDiary looks up the turn's source hash with `diary-search --mode lexical` instead of hybrid, so unrelated semantic matches no longer fill (and overrun) the 4000-character readback budget. Ordinary model diary searches keep the hybrid default.
- readDiary checks every matching candidate (lexical limit 5) for the complete written body, instead of only the first match, so an earlier diary with the same deterministic marker no longer makes a real write "unconfirmed". Source id/version, Unicode ranges, overlap, budgets and no-replay checks are unchanged; any inconsistent fragment still fails closed.
- A model's diary-search/diary-fragment result is held to the requested --max-chars on the compact `details` JSON, in Unicode characters (was: whole envelope <= 8000 UTF-16 units). This is the Runtime's own contract (respire-cli docs/diary-fragments.md: the budget bounds compact-serialized `details`; crates/app/src/diary.rs budget()).
- Settings page and README tell first-time users to install the Respire CLI (`npm install -g rsrs-cli`, risense-ai/respire-cli) and start its Runtime before configuring the plugin; README install line uses the listing's short name `respire-memory`, which magpie's resolver accepts (registry.json name).

Reviewed head 507db0483db4c7caaa49208fb17c93ef436179e2, merged onto origin/main 8b01396, run on mote (macOS):
- packages/respire-memory: `node scripts/check.mjs` and `bun scripts/check.mjs` pass; `bun test` 1 pass 0 fail (Bun 1.4.2).
- root `bun scripts/check.mjs`: exit 0.
- Broken by hand, each red in scripts/check.mjs: readback search back to hybrid (diary-output-too-large); first candidate only (diary-readback-unconfirmed); throw instead of continue on a non-matching candidate; body check removed (missing rejection); old whole-envelope 8000 budget; budget check removed.
- Not guarded by a test (stayed green when broken): the exact budget boundary (only a 4033-vs-4000 fixture; a +33 slack passes), UTF-16 vs code-point counting (fixtures are ASCII), and on the now-lexical readback path the search's own budget check and the source_id filter (the over-budget/unrelated fixtures are hybrid-only).
- Tests use a local http server only; no network.
- Not tried: a real Respire Runtime (author's CI and NPM-LIVE-0.3.10 report cover that). Not on npm yet: first version needs an owner publish; magpie installs it from dist meanwhile.
2026-10-31 22:36:04 +08:00
yetone 8b01396ffe devin 0.1.29: a failed tool result on the Messages path says "Error: " first (#566)
0.1.28 moved Devin's Claude models onto Anthropic's Messages API, where
a failed result arrives as tool_result is_error. On chat completions
magpie's gateway writes it into the text, "Error: " first (failedAsText:
Devin has no failed mark), and TestPluginToolFailureSaid holds that; the
Messages path dropped is_error. It now says it the same way.

Run:
- mote-run: HOME=$(mktemp -d) bun test in packages/devin, 156 pass 0
  fail; bun scripts/check.mjs ok.
- Broken by hand: without the prefix the new test fails.
Not tried against the real Devin API (the change is text only).
2026-10-31 22:20:09 +08:00
yetone 1d340e873e devin 0.1.28: Claude models keep the client's cache marks and block boundaries (#566)
Claude Code's growing classifier history read only ~558 tokens from
Devin's cache: the plugin declared @ai-sdk/openai-compatible for every
model, so magpie turned Anthropic Messages into chat and the blocks were
joined into one text with no cache_control, and encodeMsg never sent
ChatMessagePrompt.prompt_cache_options.

- Claude models (id matching /claude/i) now declare @ai-sdk/anthropic
  (config provider.npm, runtime api.npm, variants {effort}); every other
  model is unchanged (chat, {reasoningEffort}).
- The loader serves .../messages: buildMessages makes each text block,
  system block, assistant text, tool-call turn and tool result its own
  ChatMessagePrompt in order, every boundary kept (yetone/magpie#3835),
  with field 8 {1: 1} (EPHEMERAL) where the client put cache_control.
  The encoding is the devin CLI's own: a capture of devin 3000.11.92
  through a recording proxy carries 0801 at field 8 of its user prompt.
  Claude Code's billing line (cch changes each turn) is dropped. Tools
  with a server type are not offered; tool_choice none offers none.
  Effort: output_config.effort, else the thinking budget, none when
  thinking is disabled.
- Replies come back as Anthropic's message / SSE events, usage with
  cache_read_input_tokens and cache_creation_input_tokens; errors in
  Anthropic's shape, X-Magpie-Sign-In: kept; /messages/count_tokens 404.
- The chat path's request bytes are unchanged (build's tail moved into
  encodeRequest).

Run:
- mote-run: HOME=$(mktemp -d) bun test in packages/devin, 155 pass 0
  fail (19 files, at this tree rebased on 42a5055); bun scripts/check.mjs
  ok.
- Broken by hand: without the field 8 line, 3 of the 8 new tests fail;
  with user blocks joined into one prompt, the two cache tests fail.
- Real Devin account (sandbox credentials, the plugin's completeMessages
  called directly, no magpie), the issue's sequence ~7.3k tokens, first /
  resend / grown history / resend, cache read/write:
  claude-haiku-5-5 whole: 558/6760, 7318/0, 7318/560, 7878/0
  claude-opus-5-5 streamed: 558/6760, 7318/0, 7318/560, 7878/0
  old 0.1.27 chat path, same text: 558/6787, 7345/0, 558/7344, 7902/0
  A tool round trip on haiku (streamed tool_use, then a tool_result
  marked, two assistant text blocks as two prompts) answered correctly.

Not tried: through a magpie gateway end to end with Claude Code (the
non-streaming Messages path for plugin accounts is yetone/magpie#4571);
images in a Messages request against the real API; the v2 (OpenCode 2)
path, which is unchanged.
2026-10-31 22:14:06 +08:00
yetone 42a5055fe0 workbuddy 0.2.8: deepseek-v4.1-flash takes the config's million on copilot.tencent.com again (#561)
0.2.7 capped deepseek-v4.1-flash's context at 100000 on the China build
(SITES.workbuddy.contextCap, contextOf) from one report's error text,
"prompt is too long: 100001 tokens > 100000 maximum", which I could not
check myself. It was wrong for every other account we have numbers for.
On 2026-10-31, on copilot.tencent.com with China Free-plan accounts
(#561):
- CNife: 110,041, 200,041, 500,041 and 900,041 prompt tokens, all 200;
  a 900,077-token prompt with needles at 5/40/75/99.5% recalled all four.
- 1529119384: 82,767 to 992,389 tokens, all 200 with a needle at
  position 0 recalled; 1,157,831 answered 400 "prompt is too long:
  1157831 tokens > 1048576 maximum", the vendor's own ceiling. After the
  0.2.7 update the cap hurt their compaction.
- UNscientific-9: 153,501 and 203,021 tokens, 200 on four accounts.
brickhao on Discord said 100k compacts far too often.

The cap and contextOf are gone: both sites list the config's
maxInputTokens (1000000) for it, as for every other model. #563's none
level from 0.2.7 stays.

No cap in its place: a prompt WorkBuddy does find too long is its own 400,
which the plugin already passes on as it came (explained leaves it alone,
X-Magpie-Sign-In kept). magpie's tooLongRe matches "prompt is too long",
so overflowed() makes it context_length_exceeded for the agent to compact,
and retryable() says false for it, so no account is rested or asked again.
The new tests hold that passthrough.

Run:
- deepseek-flash.test.mjs against 0.2.7's index.mjs on mote: 3 fail (the
  China million, a 1048576 config listed as given, no site caps), 5 pass;
  against this one: 8 pass.
- Broken by hand: explained() treating "too long" as credits exhausted
  turns both passthrough tests red (2 fail).
- The workbuddy package on mote, HOME=$(mktemp -d) bun test: 299 pass,
  0 fail.
- bun scripts/check.mjs on mote: ok.

Not tried: a real request on copilot.tencent.com (my CN sign-ins still
answer 401); the numbers above are the testers'. The passthrough test's
envelopes are WorkBuddy's {code, msg, extError} as it words other 400s
and the bare OpenAI shape; only the message text is the vendor's literal.
2026-10-31 22:04:38 +08:00
yetone 3e940bc81b zed 0.1.12: a string message content goes to Zed's cloud as a text block
Zed's cloud parses an Anthropic body's message content as blocks only, and
answers a string, which Anthropic's own API takes, with 400 "failed to parse
Anthropic request: invalid type: string \"hi\", expected a sequence".
magpie's Test models sends {"role":"user","content":"hi"}, so every Claude
model failed its test in Zed's provider page (Been on Discord, 0.1.11). The
anthropic wire now turns each turn's string content into one text block; a
top-level system string is left as sent (Zed takes it either way).

Not here: Gemini's "missing field contents" in the same test is magpie
sending a non-Gemini body to a plugin's @ai-sdk/google model; fixed in
magpie.

Run (mote-run, bun 1.4.2): packages/zed bun test, 49 pass 0 fail.
Broken by hand: with index.mjs reverted, string-content.test.mjs is 0
pass 2 fail. system-role.test.mjs's effort test now expects blocks.
2026-10-31 22:03:06 +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
yetone 5499be8536 page-chat 0.1.7: magpie's own MCP servers that are on are used beside the Library's (ferock on Discord)
ferock on Discord: with "使用 magpie 的全部 MCP 服务器" on, a chat got
only the servers in library.json, never magpie's own web search, image
recognition or image generation.

ownMcp (lib/gateway.mjs) asks the gateway's GET /v1/magpie/mcp (magpie
v0.1.2397) for the ones on now and mounts each at the gateway's address
with the gateway key. readMcp adds them after the Library's, which every
route takes its MCP list from: the page's list (libraryView), a chat's
tools, a tool call and the connection check; a Library server of the
same name (an installed magpie-image) is used in its place. One turned
off in magpie's Settings is left out of the next chat. An older magpie
(404), a gateway that doesn't answer, or a bad reply lists none, as
before. lib/mcp.mjs loadServers (library.json only) is unchanged; the
page calls listTools/callTool with server objects, never by name.

Run (mote): bun test chat.test.mjs, 29 pass; the new test is red on the
old lib (Expected 2 more tools, Received 0), checked by hand.
bun scripts/check.mjs ok. magpie's side was run against its real binary
(magpie commit cac655c14's body).

Not tried: the page in magpie's window against a real magpie with the
switch on (the test drives the page's service with a fake gateway).
2026-10-31 20:38:10 +08:00
yetone 2fc8945de4 orcaterm 0.1.2: a new upstream conversation per request, and the envelope unwrapped wherever it shows (#564)
ferocknew saw a reply come out as the assistant's own envelope
({"action":"completion","ph_1":"--","taskCompletion":"…"}) and another
session's transcript end with OrcaTerm's output format.

Cause: the plugin kept one upstream conversationId per account and
session (and "default" when no session was named). OrcaTerm keeps a
conversation's turns by its id, while the plugin already sends the whole
transcript, so a reused id put upstream's copy of earlier turns (the RE_ACT
output format and raw envelopes) in front of each request; two sessions on
one id (no session id, or magpie's first-user-turn hash shared by a title
request or a same-opening chat) read each other's. Three more routes let an
envelope through: one written with bare line breaks or quotes is not JSON
and went out whole; an envelope sent only as thinking was the fallback
text as it was; and an earlier envelope the agent kept in its history went
back up as the assistant's turn, which the model then imitated.

Now every request gets a fresh cid-<uuid>-orcaterm (the user id stays per
session), a hand-written envelope is read for its answer
(looseEnvelopeAnswer), the thinking fallback and the history turns go
through the same extractor. The plugin adds nothing to other providers'
requests: its only non-auth hook is chat.headers, gated on providerID.

Run on mote: bun test in packages/orcaterm 110/110 pass; bun scripts/check.mjs
orcaterm ok; bun test scripts 3/3. leak.test.mjs at the old index.mjs: 4 of
7 red (bare line breaks, thinking-only, history turn, shared conversation
id); the reporter's literal envelope itself already unwrapped when clean.
Not tried: a real OrcaTerm account (none here), so upstream's keeping of
turns by conversationId is from the plugin's own measurements, not re-run.
2026-10-31 20:36:11 +08:00
yetone 8693d77c00 trae 0.2.26: a token_usage naming no cache count is unknown, not a 0% miss (yetone/magpie#3991, #3979)
Trae CN users see cache read 0 / write 0 on every call since 10-28
(modeyang: 786 trae-cn calls on 10-29 all 0, 77 hits on 10-27; an
identical resend also 0). The plugin passes on what token_usage says:
cache_read_input_tokens / cache_creation_input_tokens. A token_usage
with no cache field at all (chansee97's real super_completion_query
capture in #455: {"prompt_tokens":1717,"completion_tokens":2,
"total_tokens":1719}) came out as a usage with no cache field, which
magpie can only read as a counted miss. CDX-5 (#434) reports Trae's
chat replies switched to that shape at 10-27 23:07; not verified with
raw bytes. Trae's own client (3.5.20, libai_agent.dylib) still has the
9-field TokenUsageEvent, so the fields exist in the protocol.

Now:
- no cache field named at all -> magpie_cache_unknown: true (as the
  Kiro plugin does), so magpie shows the cache as unknown;
- DeepSeek's prompt_cache_hit_tokens, cached_tokens and
  prompt/input_tokens_details.cached_tokens are read as cache reads
  (largest of them, so a 0 in one spelling never hides a hit);
- an explicit 0 stays a counted miss.

This cannot make Trae cache; if Trae no longer reports cache, the
plugin cannot know the hit rate.

Run (mote, bun 1.4.2):
- packages/trae bun test: 230 pass, 0 fail
- whole repo HOME=$(mktemp -d) bun test: 4324 pass, 9 skip, 0 fail
- bun scripts/check.mjs: exit 0
Broken by hand: the old index.mjs with the new tests fails 4 (3 new
cases + request.test's stream usage).

Not tried: a real Trae CN account (none available), so whether Trae
now omits the cache fields or sends 0 is not confirmed.
2026-10-31 20:21:40 +08:00
yetone fee318fed4 workbuddy 0.2.7: deepseek-v4.1-flash lists none (#563); copilot.tencent.com's takes 100000 tokens (#561)
#563: deepseek-v4.1-flash and deepseek-v4.1-flash-sg list a "none"
level. Both sites' /v3/config call them onlyReasoning, so WorkBuddy's
own client hides the off switch and the plugin listed none of it. They
take it anyway. On WorkBuddy AI on 2026-10-31, reasoning_effort "none"
answered 200 with 0 reasoning tokens (twice on -flash, once on -sg).
"low" spent 1221 and 1127 reasoning tokens, and no effort (the plugin's
default high) spent 1219. glm-5.3-flash still lists no none. The
default effort stays the config's high.

#561: on the China build (copilot.tencent.com), deepseek-v4.1-flash's
context is capped at 100000 (SITES.workbuddy.contextCap, contextOf). A
smaller config value is kept. The reporter's vendor error was "prompt is
too long: 100001 tokens > 100000 maximum", seen 11 times on 2 accounts,
while glm-5.3-flash on the same endpoint takes 1M. The config says
1000000 on both sites. WorkBuddy AI's deepseek-v4.1-flash took 148,793-
and 181,887-token prompts, so that site keeps the million.

Run:
- deepseek-flash.test.mjs (new, against testdata/config-561.json, the
  real configs cut to the models compared) and efforts.test.mjs,
  against the old index.mjs on mote: 5 fail, 3 pass. The ones that
  pass are the glm/no-none and unchanged-sibling checks.
- The workbuddy package on mote, HOME=$(mktemp -d) bun test: 297 pass,
  0 fail.
- bun scripts/check.mjs on mote: ok.
- Real WorkBuddy AI account in a sandbox HOME, through the plugin loader:
  the none/low/default and long-prompt numbers above.

Not tried: the China build itself. Both CN sign-ins I have (desktop on
this Mac and on the Windows box) answer 401 on chat, so the 100000 cap
rests on the reporter's literal error, not on a reply of my own.
2026-10-31 20:17:58 +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
yetone 62ba6d7267 agent-office 0.2.1: cold image scans frame only the unfinished EOF record (#559)
Bumps the version for #559's scanner change and moves its changelog
lines from 0.2.0 into a 0.2.1 section; cli.test's ping expects 0.2.1.

Run on mote at this tree (0e3562b + this commit): packages/agent-office
HOME=$(mktemp -d) bun test 167 pass 0 fail; stamp-page.mjs --check 0;
root bun scripts/check.mjs 0. #559's full suite at its head: 4321 pass,
9 skip, 0 fail.
2026-10-31 19:10:19 +08:00
QingJ 0e3562b25f agent-office: frame only fragments unfinished at EOF in cold image scans (#559)
The incremental session scanner frames only fragments still unfinished at
EOF, instead of passing every 64 KiB fragment of a complete cross-chunk
record through the character framer. A framed-part index stops a later
tick from walking text it already framed. Adds regressions for the four
mutation gaps named on #551 and a WebKit CSP diagnostic script.

Reviewed at 5f564b034df26e12b60c40f683922ce0389abdd1 on main 7714b61.
Run on the Mac mini test box (mote, Bun 1.4.2):
- packages/agent-office: HOME=$(mktemp -d) bun test: 167 pass, 0 fail;
  bun scripts/stamp-page.mjs --check: exit 0.
- Full repo: HOME=$(mktemp -d) bun test: 4321 pass, 9 skip, 0 fail
  (338 files); bun scripts/check.mjs: exit 0.
- Broken by hand: eager framing restored -> both cold-scan tests red;
  framed index not advanced -> 2 red (cold-scan EOF, unfinished quoted
  brace never reparses); ExtendedTail disabled -> extended-EOF test red.
  Each restored -> 167 pass.
- bench-scan.mjs 100 1 1, initial scan: ~29-32 ms at this head vs
  ~294-319 ms at main.
- Host probe: office.hooks.mjs imported without
  MAGPIE_AGENT_OFFICE_PAGE in a sandbox HOME with one Claude session;
  snapshot() ok and page/live.js written.
Not tried: a real magpie install of the page.
2026-10-31 19:09:38 +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
yetone d05f55e7c9 commandcode 0.1.21: a Google model's tool schemas have nested $refs written out
kthink on Discord: dsh on google/gemini-3.8-flash was refused 400
AI_UnsupportedFunctionalityError "Google schema conversion only supports
references to direct children of root-level $defs or definitions ...
#/properties/func/properties/triggers/items". dsh reuses part of its own
schema by a pointer into properties. For a Google model (google/..., or an
id naming gemini) such a $ref is now written out in place, on the Provider
API and on Go's /alpha/generate; a ref to a direct child of $defs or
definitions goes as it came; a loop or 32 deep ends at the target's type.
Data named $ref (default, enum) and refs that name nothing are untouched.
Every other model's schema goes as it came.

Run (mote, HOME from mktemp -d): bun test in packages/commandcode, 94 pass;
bun scripts/check.mjs commandcode ok. google-schema.test.mjs against the old
index.mjs: 6 of 7 red, including both end-to-end tests (GOAT, Go) that
send the dsh-shaped schema to google/gemini-3.8-flash.

Not tried: a real request. Both Command Code keys in magpie's plugin-auth
answer 401, so the fix is not checked against Command Code's gateway.
Siblings (other plugins with Gemini models) are not checked: #557.
2026-10-31 18:04:23 +08:00
yetone 622f950392 commandcode 0.1.20: Go, GOAT and Pro's month is said in credits; Provider has no month (#556)
NeuroPaw (#556): PLAN_NAMES sizes GOAT's month at 70 and Pro's at 80,
while Command Code's pricing now says GOAT "up to $100" and Pro "up to
$110", per model.

Checked against Command Code's live pages (2026-10-31). The usage limits
page says "on Go, GOAT and Pro, credits are usage-value units -
full-allowance models like GLM-5.2 get $1 of usage per credit", and that
GOAT's 14 credits in 5 hours and 35 in 7 days are "worth up to $20 / $50
of usage on a $100 model like Ling 3.1 Flash, or $14 / $35 on a $70 model
like GLM-5.2" (Pro: 16 / 40, up to $22 / $55 on a $110 model, $16 / $40
on an $80 one). billing/credits' windowLimits caps are those credits (the
recorded GOAT reply has caps 14 and 35, monthlyCredits 69.80). So the
month is 70 credits on GOAT and 80 on Pro, in the units monthlyCredits
counts in: the CLI's 70 and 80 still match, and raising them to 100 and
110 would mix dollars into a credit count. What was wrong is the card
calling those credits dollars ("$0.20 / $70.00"). The pricing page lists
Provider as "$15 /month ... Pay as you go" with no credits, and the
table's 15 made a "$x / $15.00" month for it.

- Go, GOAT and Pro (both Pro ids): the Credits window is the month's
  credits, said as credits ("0.20 / 70.00 credits"); bought and free
  credits, dollars at model cost, are said beside it ("+ $5.00 extra")
  and no longer added to the pool.
- Max, Ultra, Teams Pro (1 credit = $1): the CLI's pool, in dollars,
  unchanged.
- Provider: no month of credits, so its card is the balance.
- The 5-hour and weekly windows are unchanged.

The response has no field with the plan's total, so the month's size
still comes from the table; /alpha/usage/summary was not read (see Not
tried).

Run (mote, Bun 1.4.2, HOME=$(mktemp -d), at this tree on b70725c):
- bun test (whole repo): 4201 pass, 0 fail, 4210 tests across 329 files.
- bun scripts/check.mjs commandcode: ok.

Broken by hand:
- plan-credits.test.mjs against origin/main's index.mjs: 4 of 5 red
  (GOAT real reply, credits labels, GOAT extras, Provider balance); the
  Max parity test stays green, as it should.
- GOAT set to 100 (the issue's option 2) in the new index.mjs: 3 of 5
  red.

Not tried: a live Command Code account. Both keys here (~/.commandcode
and magpie's plugin account) are answered 401 by billing/credits,
billing/subscriptions and usage/summary today, so the GOAT reply is the
one recorded in testdata (2026-09/10). Which planId today's $20 Pro has
(individual-pro, 30 in the CLI, or individual-pro-v1, 80) is not
confirmed; both are left as the CLI has them.
2026-10-31 17:19:44 +08:00
yetone b70725c1a6 cursor 0.2.35: a step ends on calls Cursor completed itself, or on a checkpoint waiting on every call (#550)
Windsland52's wire trace (stateless path): partial c1 -> completed c1,
partial c2 -> completed c2, partial c3 -> started c3 -> one exec, then
the tool count (update 27), 7 set_blob, a checkpoint whose
pending_tool_calls (ConversationStateStructure 4) holds one id, and
240s of heartbeats. Cursor's count includes calls it completed itself
(#7 then #3, with no #2 and no exec), which never reach this side, so
the step waited for calls that were never coming while Cursor waited on
the one exec's result. The native path had the same gap and failed after
batchWait. Cursor's own client (cursor-agent 2026.10.01) takes a
toolCallCompleted for a call it never started, and never waits on
toolRequestsListed.

Now, on both paths, a #3 for a call seen as #7 in the same step, never
started (#2) or exec'd here, counts toward the step's tool count, and a
checkpoint after the count whose pending calls equal the calls this side
holds ends the step too. The strict "more calls than the count" check
still counts only calls that came and were answered here. The quiet
error and batchWait name the count, the calls, the answered and those
completed by Cursor; the Wire trace keeps each update's count, tool
kind, pending and why the Run was cut. Update 8 is named (token count).

Run at this head: stall-550.test.mjs (10 tests, built from the trace's
195 inbound frames in order) and the cursor suite 376/0 on mote; the
root suite with a temp HOME 4196 pass, 0 fail, and check.mjs cursor ok
on mote; native-session, native-e2e, stall-550, conversation and
stepusage 191/0 on Windows (win-run).
Broken by hand, each red only in its own test: the stateless
completed-by-Cursor rule, the stateless checkpoint rule, the native
completed rule, the native checkpoint (waitedOn), and the #7-in-this-step
requirement.
Not tried: a real Cursor account; the real count value (the trace gives
only 2..127); that a #3's call_id equals McpArgs.tool_call_id; what the
two completed calls were; whether Cursor can checkpoint mid-step with
pending equal to the calls before more execs.
2026-10-31 16:36:38 +08:00
yetone 1a5b184991 cursor 0.2.34: the quiet error names its checkpoint; an opt-in Wire trace saves a failed Run's frames (#550)
Windsland52 (#550, 0.2.33, cursor/grok-4.6 at xhigh): four Runs ended
"Cursor went quiet: 24 heartbeats and nothing else for 240 s, its last
message checkpoint". They asked for the checkpoint to be named, and for a
way to see what Cursor sends after it. No change to quiet's budget or to
retry, as asked.

The quiet error now says, for a checkpoint: its number in the Run, which
of its step's checkpoints it was (native path; the stateless path doesn't
count steps), how many came in a row, and the kinds before it, e.g.
"its last message checkpoint #1 of the Run, the first of step 1, after
blob request x2, thinking". Other kinds read as before.

Wire trace is a new plugin option (wire_trace), off by default. With it
on, a Run that fails (not one the caller cancels), native or stateless,
writes <magpie's folder>/cursor-traces/<start>-<rand>.json (temp and
rename, mode 600, newest 20 kept). It holds both directions' frames as
time, size, kind, top-level field numbers with wire type and size, and
the field numbers and sizes one level inside: the shape, never the bytes.
No text, thinking, tool name or argument, blob or blob id, checkpoint
content, token, header, account or conversation id is read into it. The
error message is scrubbed of email-, uuid-, auth-id- and token-shaped
strings. It also has quiet's counters, the model id and plugin version.
The first 2000 and last 3000 frames are kept, the rest counted. The
folder comes from input.directory, which magpie sets to its config
folder. The option exists only in magpie, so OpenCode's project folder is
never written to.

Run on mote at this tree (33027a8 + this change):
- HOME=$(mktemp -d) bun test at the root: 4186 pass, 9 skip, 0 fail.
- bun scripts/check.mjs cursor ok.
- native-session + native-e2e on xiaomi-gpu (Windows, win-run): 165
  pass, 0 fail.
Broken by hand, on mote:
- The new tests against origin/main's code: 5 fail.
- Raw frame bytes added to each entry: both e2e trace tests red (secret,
  token found).
- Tracing cancelled Runs too: the cancelled test red.
- Ignoring the option: "off unless the option is on" red.
Not tried: a real Cursor account. The stall hasn't been reproduced here,
so the fixtures follow what #550 reports (heartbeats after a checkpoint),
not a captured Run. Not tried in the magpie GUI either: that the option
shows as a toggle under Plugin options is from how Included usage only
shows, not looked at.
2026-10-31 15:10:54 +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
yetone 39de03001d page-chat 0.1.6: one switch uses every MCP server in magpie's Library (Magiczerowxy/magpie-chat#4)
ferocknew asked for a way to give new chats every MCP server without
ticking each one. The MCP list in the settings sidebar now starts with a
switch, "使用 magpie 的全部 MCP 服务器". On, a chat uses every server in
library.json, read again on each chat, so a server added to magpie later
is in too; the rows show checked and disabled. Off (the default, and what
a 0.1.5 settings.json reads as), ticking works as before, and the ticks
set before turning it on come back.

The whole path: the setting is mcpAll in the service's settings
(cleanSettings keeps it, default false). runChat wants tools when mcpAll
is on even with nothing ticked, and pickServers() picks every Library
server; "检查连接" (/api/mcp/tools) checks the same set. The page sends
useTools when mcpAll is on. The service picks servers from the saved
settings, while the page saves them 320ms after a change, so send() now
saves pending settings before /api/chat; a switch flipped just before
sending (or a server just ticked) counts.

Run (mote, bun 1.4.2, HOME a temp dir): bun test chat.test.mjs, 28 pass;
bun scripts/check.mjs chat ok. Three new tests: a chat against two fake
Streamable-HTTP MCP servers gets only the ticked one with the switch off,
both with it on and nothing ticked, a third added to library.json after
turning it on, and /api/mcp/tools lists all three; a 0.1.5 settings.json
reads as off; the page's wantsTools and the save-before-send.
Broken by hand: pickServers ignoring mcpAll fails the first two tests;
cleanSettings dropping mcpAll fails the same two; useTools back to
"mcp ticked" fails the third.
Real page, Playwright 1.62.0, 1200 and 760 wide: switch off by default
with the old tick, on makes every row checked and disabled, flipping it
and pressing Enter saves settings before /api/chat with useTools true,
still on after reload, off brings back the old tick, rows clickable.
Chromium on mote, 18 of 18; WebKit on Linux (WSL magpie-desktop), 18 of
18, since WebKit on mote didn't launch within 180s (other sessions'
WebKit processes were running there).

Not tried: a real magpie window with real MCP servers and a real model
call (the gateway in the browser run was absent; tool lists came from
fakes); stdio servers under the switch (same pick, only http was run);
macOS WebKit; languages other than Chinese (the page has no i18n).
2026-10-31 12:25:16 +08:00
yetone 3d56e7e4d6 kiro 0.1.23: an effort without thinking asked for is sent no thinking (#538)
thinking() turned thinking on for any output_config.effort above low,
even when the request had no thinking object or had thinking disabled.
Claude Code's title and side requests carry an effort and no thinking,
and a turn with thinking turned off says disabled, so Kiro was sent a
<max_thinking_length> budget for them, or, for a model whose catalog lists
effort fields, adaptive thinking at that level. Low alone was spared.
Now only thinking.type enabled or adaptive asks for thinking, as
Anthropic's API and magpie's gateway (anthropic.go) read a request.

With thinking on, nothing changes: each of low, medium, high, xhigh and
max goes as additionalModelRequestFields {thinking: adaptive,
output_config: {effort}} when the model's schema lists it, else as the
10k/20k/30k/50k/50k budget.

Run: HOME=$(mktemp -d) bun test in packages/kiro on mote: 118 pass.
bun scripts/check.mjs: ok. Broken by hand: with index.mjs at HEAD~,
the new "an effort without thinking asked for" test fails, the
per-level test passes. A probe built the body for every level x
{adaptive, enabled, none, disabled} x {schema, no schema}.
Not tried: a live Kiro account whose catalog lists effort levels.
2026-10-31 10:32:35 +08:00
MagiczerowxyandMagiczerowxy 0b463793be page-chat 0.1.5: README names the settings.json gateway port (#542)
page-chat 0.1.5 documents the gateway port it now reads from magpie's settings.json (#534's follow-up).

The README order now matches chat's code at 20a3898: MAGPIE_CHAT_GATEWAY, then MAGPIE_ADDR, then settings.json's port, then 127.0.0.1:3425. settings.json is listed as read for fonts and the port.

Run: read the diff against packages/chat's gateway lookup at 20a3898. It is docs plus the version bump; no code changed, so no tests were run.

Co-authored-by: Magiczerowxy <Magiczerowxy@users.noreply.github.com>
2026-10-31 10:28:19 +08:00
Magiczerowxy 20a3898bf5 page-chat 0.1.4: model brand icons, data-URI images only (a remote image is a link), gateway port from magpie's settings.json, by Magic_zero (#534)
page-chat 0.1.4, by Magic_zero (Magiczerowxy). This adds:
- model brand icons in the picker and the transcript, from @lobehub/icons (MIT, chat/icons/models/NOTICE);
- inline images, base64 data URIs only. A remote ![](https://…) image is shown as a link the user can click and is never fetched, so a reply can't send data off the machine through an image URL;
- the gateway port read from magpie's settings.json, read-only and 127.0.0.1 only, after an explicit gateway or MAGPIE_ADDR;
- a switch for the system prompt;
- stdio MCP servers run in a workspace folder of their own;
- code fences kept whole while a reply streams.

The suggestion buttons and the 「模型」 label are gone from the empty state. finish() still renders a reply that arrives in one chunk (the fix from #498).

Run at the reviewed head 8ded766, on the Mac mini (Bun 1.4.2, sandbox HOME):
- bun test: 3871 pass, 0 fail, 9 skip. bun scripts/check.mjs: exit 0.
- A Playwright probe ran the real service against a fake gateway that sends the reply in one SSE chunk, and recorded every request leaving 127.0.0.1. The reply carried md, http, protocol-relative and blob images, HTML img, srcset, picture, inline style url(), a <style> block, a link around an image, a reference-style image, a bare URL, KaTeX \includegraphics and \href, and a data:image/svg+xml with script, onload, <image href> and CSS url(); the probe also opened that SVG in the lightbox. No request left the machine and the reply rendered. Run in Chromium on the Mac mini, and in Chromium and WebKit on Linux (magpie-desktop). WebKit didn't launch on the loaded Mac mini.
- Broken by hand: letting https images through safeImgSrc turns "the chat UI never auto-loads a remote image" red, and the probe records the request to attacker.example. finish() back to checking only .md-stable turns "finish() renders a reply that arrived in one chunk" red, and the probe shows an empty body.

Not tried: the real magpie window, and a portable install's data/settings.json.
2026-10-31 10:10:30 +08:00
yetone 659967c9bc agent-office 0.1.1: an agent another agent killed is stopped, and any agent not at work can be cleared
flying_crp (X, 2026-10-31): when one agent hands work to another and then
interrupts it from the command line, the delegated session hangs in the
Agent Office as abnormal and can't be cleaned up; it only goes once the
session is deleted in magpie.

The cause: a killed agent writes no end of turn. Reproduced in a sandbox
HOME with the real CLIs:
- Codex 0.165 under SIGTERM or SIGKILL: the rollout ends at the
  function_call (on SIGINT it writes turn_aborted, which was fine).
- Claude Code 2.1.314 `claude -p` under SIGTERM: a tool_result
  ("Exit code 137") and no end_turn, and it removes its
  sessions/<pid>.json. Under SIGKILL: the file ends at tool_use, and the
  pid file stays with a dead pid.
The office read each file as at work, then "error · stuck" once quiet for
ten minutes, until hideAfter (6h, or never; a waiting session never
leaves). The page had no way to take one out.

The fix:
- lib/scan.mjs: for a source with a process folder (Claude Code's
  <config>/sessions, also Qoder, WorkBuddy and CodeBuddy), a session
  quiet mid-turn for 10s with no live process named in that folder is
  read as aborted ("stopped"). A folder that can't be read, a
  half-written file, or one that has never held a pid file means
  unknown, and nothing changes. A pid file from another pidDomain (WSL)
  counts as alive.
- page: Clear (清除) in the panel of any agent not at work (stuck,
  error, stopped, done, waiting) hides it until its session moves again.
  It is kept in the page's options as {key: at}, pruned to sessions
  live.js still has. This covers Codex and every agent with no process
  registry.

Run:
- On mote (mote-run): bun test in packages/agent-office gives 54 pass,
  0 fail. bun scripts/check.mjs exits 0.
- killed.test.mjs uses the real killed files (test/killed, trimmed and
  with paths replaced). With the old scan.mjs, 3 tests fail. With the old
  model.js, 2 fail.
- End to end: the real office.hooks.mjs over a sandbox HOME holding the
  killed Claude and Codex files and a live lead pid file. live.js had
  claude "aborted" and codex "tool". Then the real page in list mode, zh,
  at widths 1100 and 420: the Codex row shows 已 N 分 没有动静, its
  panel shows 清除, clicking it removes the row, and options.set gets
  cleared. Chromium ran on mote. WebKit ran on the Linux box (wsl-run),
  because WebKit on mote didn't launch within 180s while ~108 WebKit
  processes from other sessions were running. Screenshots were checked
  at both widths.

Not tried:
- A Codex liveness signal: its thread-writer-locks are flock-only files,
  which Node can't check. Codex relies on Clear.
- Windows: the pidDomain value and process.kill(pid, 0) there.
- Whether Qoder, WorkBuddy or CodeBuddy write pid files at all. Without
  them, nothing changes for those agents.
- Gemini, Qwen, dsh and pi killed mid-turn: they have no registry and
  rely on Clear.
- The page inside the real magpie window, and WebKitGTK.
2026-10-31 09:52:19 +08:00