magpie-muse-auth's accounts listed no image model, so Settings > Images and
generate_image could not use Muse. Meta's image generation page: POST
/v1/responses, model muse-image-1.0, the picture in image_generation_call.result.
The plugin signs /v1/responses only, so that is the path used; JSON and event
stream answers are both read. Video: Meta's API has no video generation.
UNTESTED against a real Muse account (none available); built from Meta's docs
and a fake plugin. Additive: a failure only affects the muse-image model.
Run at the pushed head (rebased on aebcfb93f): gofmt -l clean; GOOS=darwin and
GOOS=windows go vet ./internal/gateway clean (wsl-run); go test -run
'Draw|Muse|Image' ./internal/gateway ok, including TestMusePluginDraws (json
and stream). Broken by hand: before the draw dispatch was wired the test was red
(502 via the chat path). Not run: full suite, GUI tests, real Muse sign-in.
aiandcloud asked for GMI Cloud. It is now a preset in Add: OpenAI chat
completions at https://api.gmi-serving.com/v1, the key as Bearer, its model
list read from /v1/models, the gmicloud icon the GUI already ships, and its
console as the keys page. Only Chat is set: GMI's quickstart and LLM API
reference (docs.gmicloud.ai) name no Responses or Messages endpoint. READMEs
list it; the icon is copied to the site.
Run: TestGMICloudPreset (preset fields, no Responses or Anthropic URL, an
import at the host becomes the preset) and go test ./internal/provider -run
'Preset|Import|Icon' on Linux (wsl-run); gofmt; GOOS=windows go vet of
internal/provider. No network in the test.
Broken by hand: not run (without the preset FromPreset errors).
Not tried: no GMI key, so no real chat call or model list; mote's disk is
full, so no macOS run; no full suite before the tag.
Go on macOS and Windows verifies only against the system's store and
ignores those variables, so behind dev-sidecar (a local HTTPS-inspecting
proxy) with its root in a bundle the user pointed them at, the update
check and download failed with "unknown authority" while other programs
took the root. netproxy.TrustEnvRoots adds the certificates those
variables name to the system's roots (RootCAs from SystemCertPool, so the
platform verifier still runs) and the updater's transport uses it. Nothing
is turned off: a server signed by no trusted root is refused as before,
and the download is still checked against the feed's SHA-256 (and the
signer, on macOS). Only the updater takes it; vendor requests are
unchanged (sibling, to file).
Run: TestTrustEnvRoots and TestUpdaterTrustsSSLCertFile on Windows 11
(xiaomi-gpu, win-run); netproxy and update packages whole on WSL Ubuntu;
GOOS linux and darwin go vet of both packages clean; gofmt clean.
Broken by hand: with the TrustEnvRoots call taken out of proxied(),
TestUpdaterTrustsSSLCertFile is red on Windows ("signed by unknown
authority"); the same Windows run shows a plain transport refusing the
CA with SSL_CERT_FILE set, so the cause is confirmed there.
Not tried: dev-sidecar itself, a real macOS run (mote's disk is full),
the whole suite, the GUI.
Hermes reads skills/ and mcp_servers from each profile's own home, but the
Library only reached the connected profile. Every other profile is now an
agent row hermes#<name> ("Hermes · <name>"), like omp#<name>: its model pick
stays, and the Library target points at that profile's config.yaml and
skills/. No row is listed while Hermes itself is gone (CLIMissing). Tool
off-lists (tools.exclude) work on the rows too. The GUI says "starts on the
model picked here" for them as for Hermes.
Run: wsl-run go test ./internal/agent ./internal/library (ok, full packages);
GUI hermes-profile-row, hermes-profiles, omp-profile-connect, i18n-keys in
chromium and webkit, five languages; gofmt; go vet GOOS=darwin and windows
for agent and library.
Broken by hand: without hermesProfileAgents in onMachine,
TestHermesProfilesAreAgents is red; without the hermes# branch in targetOf,
TestHermesProfilesGetTheirOwnLibrary is red; without the app.js change the new
GUI test is red (10 of 10).
Not tried: a real Hermes with real profiles, Windows via win-run, the full
GUI suite, the internal/gui Go package (wsl lacks gtk4, build fails there).
/docs/pi says how magpie runs the pi coding agent on magpie's models:
the provider magpie in models.json (gateway, a key of its own, the
models) in ~/.pi/agent or $PI_CODING_AGENT_DIR (~ expanded, a relative
path ignored); defaultProvider and defaultModel in settings.json; each
model on its provider's native API (Responses for GPT and ChatGPT,
Messages for Claude), forceAdaptiveThinking, reasoning, contextWindow,
images and maxTokens, a typed maxTokens kept; defaultThinkingLevel held
to Pi's levels; sendSessionAffinityHeaders and why (usage and recorded
conversations per session), a user's own value kept; enabledModels
added to, never created; extensions/magpie.ts with the decision and
image models for codemode; the .before-magpie copies put back byte for
byte when unchanged; WSL; magpie pi <ref> and magpie pi default. Each
claim is from internal/agent/agents.go (piIn, piDir, piLike, the pi
provider block, piModelJSON, beforeMagpie), pi_extension.go and the pi
row in internal/agent/wsl.go; the UI label from i18n.js. Linked from
each language's Kimi Code page; in the sitemap, llms.txt and
llms-full.txt.
Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test site/*.test.mjs on the WSL box (magpie-desktop, wsl-run;
mote refuses SSH this session): 115 pass, 0 fail.
Not tried: Pi itself on magpie for this page; it names only what
magpie's source says.
8a3dbf023's accounts-list sign-in line had {agent} twice in de and ja, and the
Usage plugin's model-price line had {model} twice in ja. gui-de and gui-ja
'has every zh string, with its placeholders and tags' were red on origin/main
5c02be05b (found while running the balance change's GUI files).
Run: gui-ja, gui-de, gui-zh-tw, i18n-keys via wsl-run, 13 pass 0 fail.
The balance a user types to calibrate a key (GUI pill, keyownbalance, magpie
provider key-balance) was refused below 0 with 'a balance is an amount from 0',
while the card itself already shows an overdrawn key as ≈-$1.84 after spending.
So a user whose vendor page said -1.84 could not type what it says. The bound is
now -1,000,000 to 1,000,000 in both currencies, in the GUI, the CLI parser and
checkOwnBalance (which also guards what is read from disk). A sign may come
before the currency's (-$1.84, -¥5) as well as after it. Credit that expires
stays above 0 (a grant is never negative). Refusal text and its zh, zh-TW, ja, de
strings say the new range.
Run (wsl-run, mote's disk is full): go test -run Own ./internal/provider green;
red on the old checkOwnBalance/ParseOwnBalance (5 parse cases fail). Not tried:
a real overdrawn key; macOS/Windows.
From the 11-11 reds: f5e1b1091 ran `cli -run ContextCap` and left the CLI
parity, GUI keep and usage-column tests red (#6102 to #6104); e0cadc312's
memory routes had no parity entry; and the dsh round's fixed 300 read 421
on Windows (#6118).
TestDshRoundWithNothingChangedBuildsNothing held the round to a fixed 300
allocations, and Windows CI read 421 with the skip working. It now settles
the route over 2 models and over 402, and fails when the larger is over
1.5x the smaller + 50: reading the files differs by system, building the
catalog grows with the models.
Broken by hand (`if false && r.done && key == r.last` in dshRounds.once):
red on Windows, 78375 allocations over 402 models against 1780 over 2.
Run at 8fe720453 + this: -run TestDshRound -count=3 on Windows (ok);
internal/agent whole on WSL (ok, 736s).
f5e1b1091 gave `magpie model context-cap` a longer argument list with the
old padding, so its description started at column 57 against the others'
49 (TestModelUsageAlignsEveryDescription, TestModelUsageLinesUpItsDescriptions).
It also added Settings.ContextCapAll, which TestSettingsSaveKeepsWhatItDoesNotSend
saw unset; it is now set beside ContextCap, both kept by POST /api/settings
(the test passes, so the save already keeps it). #6102's parity entries came
in 150646bd0.
Run at 8fe720453 + this: internal/cli whole on Windows (ok, 364s) and on
WSL (ok, 105s, /mnt/c taken off PATH: #5234); internal/gui -run TestSettings
on WSL (ok); gofmt.
Not tried: the GUI browser suite (no GUI file changed), macOS (mote is down).
npm's human check answers 200 with a page that isn't the package's entry, so the
README showed "npm didn't answer: unexpected end of JSON input". The community
repo's tagged workflow now keeps each listed plugin's README at readmes/<key>.md
on dist (plugins repo, pushed), usemagpie.ai serves it at /api/plugins/readme
(edge 10 min, jsDelivr stands in for raw), and ReadmeIn asks it (5s an address,
MAGPIE_PLUGIN_CATALOG=off skips) before npm / GitHub; an installed plugin's folder
still comes first. A page that isn't npm's entry now says npm may be asking for
a human check. Only the plain README.md is kept: a language README is read from
npm/GitHub only when the copy is missing.
Run: go test ./internal/plugin ok (wsl); site/worker.test.mjs 40 pass (wsl).
Red on old code: TestReadmeFromTheKeptCopyBeforeNPM fails with "unexpected end of
JSON input" and npm asked 2 times; worker test red with the route removed.
tagged.mjs run on wsl against real GitHub: 369 plugins, 369 READMEs, a second run
re-read none. Not tried: the Actions run itself, the GUI (no GUI file changed).
The built-in agy agent (Antigravity CLI) is the first built-in agent a
community agent plugin serves, as the retired subscriptions moved onto
provider plugins. While @magpie-community/agent-agy is installed and on,
magpie's agy is the plugin's: the built-in leaves the list (here and in
WSL), its id and aliases are the plugin's, and what the built-in wired
is handed over. Turned off or removed, the built-in is back. Nothing is
forced yet; the forced install and the built-in's retirement come once
the plugin is on npm and a real run with it is on record.
The plugin (plugins ebcff866, 0.2.0) follows the built-in since
0cc91af3d: its config is magpie's own magpie-settings.json, handed to
agy with --settings, agy's settings.json is only read, and
remote-control runs as agy is.
What an agent plugin can say now (agentplug; docs/reference.md and the
site's plugins pages, en/zh/ja, and llms-full.txt):
- base: the agent's own settings file, read for the user's own model
and passed to connect and own; needs launch.args with {config}, and
stepping out removes magpie's config file whole;
- launch {env, model, args, plain}: `magpie start <id>` and the shell
functions (posix, fish, PowerShell, a WSL distro's) put args before
the model flag, and run a plain word or flag as the agent is;
- own({config, base, model}), effort, wsl, aliases.
Moving over (plugged_moved.go): agentMovers names agy's package;
agyHandover gives back a settings.json an older built-in wired (Sync),
then makes magpie-settings.json the plugin's stash, so the plugin's
agent reads as connected and stepping out removes the file.
Run (mote, macOS 27, Go 1.26.8) at fe8c05e0c, the base before the last
rebase:
- go test internal/agent (507s), agentplug, sessions, edit, update,
plugin: ok.
- internal/cli and internal/gui: red only on main's own reds, the same
at origin/main 8fe720453: TestModelUsageAlignsEveryDescription and
TestModelUsageLinesUpItsDescriptions (#6104),
TestSettingsSaveKeepsWhatItDoesNotSend (#6103), TestCoreScriptBudget
(#6116, filed now).
- GUI, both engines, and site node --test: agy-effort, agy-launch,
library-rtk-agy, gui-de, gui-zh-tw, i18n-en-no-cjk, i18n-keys,
plugin-page-foreign-error, site/*.test.mjs: 114 pass.
- vet: macOS, GOOS=windows, Linux in WSL (-tags gtk3); gofmt clean.
- The shell functions with a config path holding a space: bash and zsh
on mote, PowerShell on Windows (win-run), bash in WSL.
- Broken by hand: TestAgyPlugin red with Args, Plain or the file's
removal taken out.
At 20d807d92 (rebased on 8fe720453): vet (macOS, windows) ok, agentplug
and internal/agent -run 'Agy|Plugged' ok, agy-launch and i18n-keys
pass; plugin-page-foreign-error is red there and at plain origin/main
8fe720453, from that commit (#6117), not this change.
Plugins repo: bun test packages/agent-agy 4 pass.
Not tried: fish (on none of the machines); a real agy run with the
plugin at 0.2.0 (the 0.1.0 design ran for real in a sandbox HOME, the
settings.json one this replaces); Windows and WSL agy with the plugin;
an install from npm: @magpie-community/agent-agy isn't on npm yet, so
until its first publish no user is moved.
A first build of the request rows runs on any upgrade that changes
internal/usage (the cache key hashes its source) and on a first install.
Each prefetchEach worker holds a whole file's calls while it reads, so
eight of them stacked up in the cold peak.
Measured on mote with a copy of the owner's real accounts and history
(HOME ~/r2278/acct, requests-v1.bin removed before each start), five
cold starts of each build alternated, physical footprint peak at 12s
(vmmap):
eight workers: 248.3 259.1 252.1 257.5 276.1 MB (mean 258.6)
four workers: 243.3 230.2 232.6 245.2 246.7 MB (mean 239.6)
Every four-worker run is below every eight-worker run. The build takes
the same time: the gctrace burst ends at 5.0/5.0/5.6/5.0/6.2s against
5.0/4.8/4.9/5.0/6.4s, and CPU in the first 12s is 6.7-7.6s for both.
The cache written is the same size (71,523,711 bytes) for both.
TestPrefetchEachMakeIsAReadersOwn counts four readers' makes now.
Run at this head (rebased on 8fe720453), on mote: gofmt -l clean,
go test ./internal/usage ok. go test ./internal/gui: red only in
TestCoreScriptBudget (#6116) and TestSettingsSaveKeepsWhatItDoesNotSend
(#6103), both red on main at 8fe720453 and filed; this change touches
no GUI file.
Not run: the full ./... suite.
nivekxft opened Day card in magpie web and got "This page stopped
working" with "Failed to read the 'localStorage' property from 'Window':
The document is sandboxed and lacks the 'allow-same-origin' flag", often,
until a refresh. Neither magpie nor Day card's files read storage (grep of
both), so the SecurityError comes from a script put in the frame (an
extension's, on some loads), and pagebridge.js reported it as the page's.
a3900e46f let go of the "Blocked a frame" kind and extension stacks; this
one's message is the storage kind, which foreign() did not match.
foreign() now also lets go of a SecurityError that names storage or
cookies with "sandboxed"/"allow-same-origin" (Chromium) or WebKit's "The
operation is insecure". The page's own errors still break it.
Run (wsl-run, magpie-desktop): plugin-page-foreign-error.test.cjs with two
new cases (localStorage read uncaught, sessionStorage read rejected), both
engines green; red on the old pagebridge.js (storage and storageRejected,
via MAGPIE_BRIDGE). plugin-page and plugin-page-idle: 10 of 10 green in
chromium and webkit. Not confirmed: which script reads the storage (the
reporter gave a screenshot, no stack; extension is inferred). Not tried: a
real extension, Go tests, vet (JS-only change).
ANTHROPIC_DEFAULT_<TIER>_MODEL, ANTHROPIC_SMALL_FAST_MODEL,
CLAUDE_CODE_SUBAGENT_MODEL and the auto mode model stayed
"claude/claude-haiku-4-5[1m]" after the main model became an alias. A tier
variable can't be an alias of itself, so on this computer's own file a
Claude model of Claude Code's own subscription is now written as
Anthropic's bare id (provider.ClaudeBare): through magpie that id goes to the
same subscription (OwnRoute), and Anthropic knows it. Haiku has no 1M window,
so its [1m] mark is taken off. Read back, a bare Claude id is the
subscription's ref (ClaudeUnbare), so every field, the tiers' follow logic
and the gateway's stand-in read it as before.
Old files: a settings.json written with the prefixed ids is rewritten by the
next Sync (the check that already brought dashed spellings up to date), for
every user. Models of other vendors or a relay keep their ref: Anthropic has
no id for them. A distro's file and the claude-magpie launch file keep refs.
Run (wsl-run, Ubuntu, at the pushed head after rebasing on origin/main):
internal/agent -run "Claude|Tier|Folder" ok; internal/provider ok;
gofmt -l clean; go vet -tags nogui for linux, darwin and windows clean.
Before the rebase, the whole internal/agent package had two reds:
TestFolderVarsAreListed (BUN_INSTALL, fixed on main since) and
TestGrokInstalled (WSL2 binfmt, already #3548). Neither touches this change.
Real claude 2.1.316 with a fake upstream showed Desktop's
PROVIDER_MANAGED_BY_HOST sends the tier env as written, so prefixed ids go
to Anthropic.
Broken by hand: with ClaudeBare turned into a no-op,
TestClaudeModelVariablesAreAnthropicsOwnIDs fails on the bare ids and on the
Sync rewrite.
Not tried: the real Claude Desktop Code tab, a WSL distro user, real
accounts through magpie end to end. A non-Claude model or a relay-served
Claude model still has no Anthropic id, so its tier variable keeps the ref
and Desktop's Code tab still can't use it.
/docs/kimi-code says how magpie runs Kimi Code (Moonshot's kimi CLI)
on magpie's models: the provider magpie (type kimi, base_url, api_key)
and one [models."magpie/<provider>/<model>"] table per model in
~/.kimi-code/config.toml ($KIMI_CODE_HOME), default_model set to the
pick; display_name and max_context_size; thinking with support_efforts
and default_effort, always_thinking, image_in, tool_use and
max_output_size, a value set by hand kept; the old kimi-cli's ~/.kimi
($KIMI_SHARE_DIR) only where there is no ~/.kimi-code; Kimi Code 2.x
reloading its config as it runs and its app's Settings › Providers,
kimi-cli on restart; the user's sign-in, providers, models and provider
keys kept, their default put back; WSL; magpie kimi <ref> and magpie
kimi default. Each claim is from internal/agent/kimi.go (kimiIn,
kimiModelTables, kimiProvider, the notices) and the kimi row in
internal/agent/wsl.go. Linked from each language's Qwen Code page and
the Kimi provider page; in the sitemap, llms.txt and llms-full.txt.
Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test site/*.test.mjs on the WSL box (magpie-desktop, wsl-run;
mote refuses SSH this session): 114 pass, 0 fail.
Not tried: Kimi Code itself on magpie for this page; it names only
what magpie's source says.
A Remote magpie's editor has a new switch, Use its skills and prompts.
The remote serves its Library at GET /v1/magpie/library (local or shared
callers; a held key is refused; no MCP servers, which the MCP switch
already covers; borrowed items are never passed on). The client fetches
it every 10 minutes and once on switching on, and adds each skill and
prompt set as remote-<id>-<name>, recording a hash of what it wrote.
It only changes what still matches that hash: a skill or set of the
user's by the same name, one the user edited, and one the user removed
stay as they are; an update or drop moves the old copy to the backups;
switching off takes out what is unchanged. The first set becomes active
only when no prompt is active.
Run (wsl-run, magpie-wt/remote-library at the pushed head after rebase):
- go vet -tags nogui ./..., GOOS=windows and GOOS=darwin vet of library,
provider, gateway, gui: clean. gofmt -l clean.
- go test ./internal/library ./internal/provider: ok. internal/gateway:
TestReadOnlyKeyEveryRoute named the new route (fixed here, now ok);
the package then ran to the end of a 30m wsl timeout on a slow box.
- TestBorrowRemoteLibrary and TestBorrowedSkillGoesWithTheRemote: broke
by hand (the user's-own-skill guard turned off), TestBorrowRemoteLibrary
went red with "kept []", restored.
- GUI remote-magpie.test.cjs (chromium + webkit): its new assertions for
the switch pass, but the file is red on main before this change
(#6099: line 160 and a layout assertion), so they ran in a copy with
those two assertions relaxed. i18n tests ran in the same call.
Reds not mine: #6099, #6103 (TestSettingsSaveKeepsWhatItDoesNotSend).
Not tried: a real two-machine run; internal/gui and gateway full
packages to completion on wsl; Collect/Put (sync backups) still carry
borrowed items as ordinary ones.
The Agents row showed a plain black square for OpenMausBot. Its icon file
(OpenMausBot's build/icon.svg, a black tile with a silver cursor, Apache-2.0,
byte-identical to upstream at main) was named openmausbot.svg, and app.js
draws an SVG without the -color suffix as a one-tone mask: the black tile
became a black square. Renamed to openmausbot-color.svg, which app.js loads
as an image (as Antigravity, Cherry Studio).
TestEveryClientHasNameAndIcon now fails a client whose SVG holds gradients
but isn't named -color; it is red on the old name (checked by hand), green now.
Run (wsl-run, magpie-desktop, nogui tag; mote's disk is full):
- go test ./internal/agent: ok. go test -run 'Icon|Client' ./internal/gui: ok.
The full ./internal/gui run hung 600s in TestGatewayMode (gatewaymode_test.go:63)
on WSL, a test this change doesn't reach; not filed or investigated.
- go vet on linux (nogui) ./internal/agent ./internal/gui and windows ./internal/agent: ok.
- gofmt -l: clean.
Not tried: the live GUI in chromium/webkit; the full suite.
Protocol (HulaSup's question): magpie writes OpenMausBot an engine of its own
as a Claude endpoint (driver claudeAgent, ANTHROPIC_BASE_URL), Anthropic messages.
A New API relay with Chat, Responses and Anthropic URLs has channels per
API. Claude Code's /v1/messages turn for gpt-6.1-sol was relayed on the
Anthropic URL (usable lists the client's own API), where the relay has no
channel for a GPT and answers 503 "No available channel for model ...
under group ..." (or 当前分组 ... 无可用渠道). wrongEndpoint only knew 4xx
words, so the 503 reached Claude Code, and only removing the Anthropic URL
helped.
catalog.NoChannel recognises that 503 (and 404) in English and Chinese.
Server.noChannelElsewhere, used in passthrough and forwardTranslated next
to wrongEndpoint, marks the model unfit on that API and asks the next one
usable gives, but only when p speaks another API; with none left the
relay's word is returned and nothing is remembered. Claude models still go
to Anthropic: the rule fires only on the refusal.
Run (wsl-run, magpie-desktop): new TestNoChannelOnOneAPIGoesToTheNext
(fake New API: 503 bodies in Claude and OpenAI shapes; GPT goes to Chat on
the first ask and is not asked on Anthropic again; Claude stays on
Anthropic) and TestNoChannelWithNothingElseIsTheError, red on the old code
(503 reached the client), green with the fix; catalog.TestNoChannel;
TestToolsThatNeedResponses* siblings; go vet catalog+gateway; go test
catalog, gateway, provider (see push note). The 503 body is New API's as I
know it from its source, not captured from a live relay.
Not tried: a real New API relay; windows/darwin vet; GUI (no GUI change).
A Claude model whose Anthropic channel is briefly down is remembered off
Anthropic until magpie restarts.
In a provider editor's Advanced, .prefs .val's max-width: 60% read as the
least in the editor's auto grid track, so the 关闭/开启 buttons stacked. And
settingshints.js placed its card from .who's rect, which the editor lays out
as display: contents (no box), so "Warm up now"'s card showed at the window's
left edge. The val is 100% there; the card uses the name's rect.
Run (wsl-run, Linux, Playwright 1.62): new provider-prefs-layout.test.cjs,
chromium and webkit, 1100 and 420, en/zh/zh-TW/ja/de: 20 of 20 red on the old
code ("the buttons are stacked"), green with the fix. Reverting only the
settingshints.js change turns the card checks red ("the card is at x=16").
Also ran settings-hints, provider-prefs, warm-now, warm-at-own, warm-at-times,
claude-lean-prompt-setting, claude-tui-setting, editor-hints: the reds are the
same on origin/main 612dc1956 (settings-hints ja/de at 420; WebKit's
ResizeObserver pageerror in provider-prefs and warm tests), filed as issues.
Not run: the full GUI suite, Go suite (no Go change), a live app.
TestEveryRouteHasACommandOrIsNamed was red on main again: f5e1b1091
added POST /api/settings/context-cap-mode, which `magpie model
context-cap all|own` does, and POST /api/memory/promote, skill and
decline came with no command or notYet line (stage 3, the library).
Run on mote at a3900e46f plus this: go test -run
TestEveryRouteHasACommandOrIsNamed ./internal/cli/ ok; without it the
test names the four routes. The rest of internal/cli is red on main for
TestModelUsageAlignsEveryDescription and its sibling (#6104), not this.
onducoder opened Day card in magpie web (0.1.3702) and got "This page
stopped working" with "Failed to read a named property 'origin' from
'Location': Blocked a frame with origin "null" ..." logged as
plugin-day-card.open. magpie and Day card's files never read a window's
location; the error came out of a script in the frame (an extension's
inpage script, or a library probing parent/top) and pagebridge.js
reported every error and rejection in the frame as the page's own.
pagebridge.js now lets go of two kinds: an error whose stack or file
names chrome-/moz-/safari-web-extension://, and a SecurityError of the
"Blocked a frame with origin" (Chromium) / "Sandbox access violation"
(WebKit) kind. The page's own errors still break it.
Not confirmed: the reporter gave no stack, so the extension cause is an
inference; Day card's page (0.2.1) opened, with every background tile
clicked, raises nothing in Chromium. WebKit gives a sandboxed page's
uncaught error only as a bare "Script error." with no error object, so
there only rejections can be told apart.
Run (wsl-run, magpie-desktop): new plugin-page-foreign-error.test.cjs in
chromium and webkit, 3 of 3 green; red on the old pagebridge.js in both
(the exact `parent.location.origin` read, uncaught and as a rejection,
and extension stacks). plugin-page, plugin-page-idle: green. Not tried:
a real extension, Go tests (internal/gui needs webkitgtk on that box),
darwin/windows vet (JS-only change). menu-scroll.test.cjs is 0 of 24
there with the old bridge too, so not from this change; not filed here.
RTK upgrade failed with "winget failed (exit code 0x8A150014): winget finds
no rtk-ai.rtk package". rtkUpgrader took any rtk under a \WinGet\ folder
for winget's and ran winget upgrade, though winget had no record of it.
Now, when the exe sits inside winget's folders and winget says it did not
install it (wingetDisowns: records elsewhere, or winget list exit
0x8A150014), the upgrader is the existing Windows-release action (zip
checked against checksums.txt), applied to the file a WinGet\Links link
points to. A link to an exe outside winget's folders (--location) and an
rtk winget does list still go to winget; winget that can't answer is not
taken over, as before.
Run: wsl-run go test ./internal/library (full package, ok), go vet linux
and GOOS=windows ok, gofmt clean. New TestRTKWingetFolderWithoutRecord is
red on the old rtk_upgrader (stash-tested). On xiaomi-gpu (win-run) a real
rtk 1.1.0 in a fake WinGet\Packages\rtk-ai.rtk_fake folder went to 1.2.0
through UpgradeRTK.
Not tried: netube99's actual machine, so why winget lost its record is
unknown; GUI (no page change).
2c644da04 added POST /api/pipelines/check and left it out of the parity
table, so TestEveryRouteHasACommandOrIsNamed named it in the full suite
run after v0.1.3716. It waits for stage 2 beside /api/proxy/check and
/api/bark/test, the other one-call tests a setting has.
Run on mote at this head: go test -run TestEveryRouteHasACommandOrIsNamed
./internal/cli/: the pipelines/check line is gone. The test stays red
for four routes other commits added (memory/decline, promote, skill;
settings/context-cap-mode), filed on their own.
/docs/qwen-code says how magpie runs Qwen Code (qwen) on magpie's
models: one entry per model appended to modelProviders.openai in
~/.qwen/settings.json ($QWEN_HOME) with the gateway's address, the
model's id, name and context window, and model pointed at the pick;
the key in the settings' env as MAGPIE_QWEN_API_KEY;
security.auth.selectedType openai, so /auth isn't asked; a new session
or /model to pick a change up; the user's own entries kept first and
their model and auth type put back; WSL; magpie qwen <ref> and
magpie qwen default. Each claim is from internal/agent/qwen.go, qwenIn
in internal/agent/wsl.go and Agent.Spell. Linked from each language's
Copilot CLI page and the Qwen provider page; in the sitemap, llms.txt
and llms-full.txt.
Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test site/*.test.mjs on the WSL box (magpie-desktop, wsl-run;
mote refuses SSH this session): 114 pass, 0 fail.
Not tried: Qwen Code itself on magpie for this page; it names only
what magpie's source says.
14be7f69d added /api/plugins/tagged to site/worker.js and its test, but
wrote both over an older copy of the files: 514 lines of worker.js and
~400 of worker.test.mjs went with it, and it was deployed. Live on
usemagpie.ai since then:
- /api/latest names github.com for every file: no R2 /files copy and
no /dl detour for where github.com's downloads fail;
- ?channel=stable gives the newest release, not the week's;
- /api/plugins/ (Discover's installs and likes, 13a9f1263) is gone;
- /favicon.ico, the /r/ relay, the moved docs pages' redirects,
install.sh and download counts, the contributors tables and the
sponsor wall are gone, with the R2 cron and the release ledger.
Now worker.js is 14be7f69d's parent's, with its /api/plugins/tagged
route (ahead of the /api/plugins/ stats route) and taggedPlugins added;
worker.test.mjs is the parent's with its plugins/tagged test added.
The stale test copy was why the README sponsor test was red.
Run: node --test site/*.test.mjs on the WSL box (magpie-desktop,
wsl-run; mote refuses SSH this session): 114 pass, 0 fail (54 and 1
fail before). Broken by hand: without the tagged route its test is red.
Not tried: the deployed worker's R2 cron; it is checked after deploy by
curling /api/latest, /favicon.ico and /api/plugins/tagged.
Both were red on origin/main 2c644da04 on WSL (wsl-run, nogui).
TestFolderVarsAreListed: kirocrew.go reads BUN_INSTALL for its CLI search
path, but agentenv.Vars didn't list it, so no sandbox cleared it. Added.
TestGrokInstalled (#3548): the fake downloaded grok began with "MZ", which
WSL2's binfmt interop hands to the Windows loader (EINVAL), so the update
path reported "Invalid argument". On the non-Windows branch the fake now has
a body no loader claims, so exec gives ENOEXEC as on real Linux. The Windows
branch keeps MZ.
Run: both tests red before, green after at this change on WSL; gofmt, linux
and windows go vet of internal/agent and agentenv; -run "Grok|Update|Env|Kiro"
on internal/agent green. Not run: full suite, macOS.
Routing group, agent row, provider row, model chip and sessions folder row
passed their drag handle or their button as the menu's anchor, so a
right-click opened it at the far left (or far right) of the row. openRowMenu
and placeMenu take the pointer; each right-click passes it, and placeMenu
still keeps the menu inside the window and flips it above when there is no
room. The handles' and buttons' own clicks anchor as before.
Tests: route-menu-pointer (new), agent-here, provider-find, model-copy-id and
sessions-relocate assert the menu's left/top against the pointer.
Run (WSL magpie-desktop, chromium and webkit, via wsl-run; mote's disk was
full): route-menu-pointer 2/2, provider-find 12/12, sessions-relocate 40/40,
group-share, group-duplicate, group-arrange all pass; agent-here 29/30 once
(chromium zh panel, not reproduced in two chromium reruns, 15/15 each).
Broken by hand: the same test files against origin/main's assets: all red
(route-menu-pointer 0/2, provider-find 0/12, agent-here 0/30,
sessions-relocate 0/40), e.g. "menu at x=24, expected 342". TestCoreScriptBudget
ok on Windows. model-copy-id is red on origin/main already (the gpt-5.1 chip
is not found, #4621, #6096), so its pointer assertion is reached only for the
first chips. Not run: macOS, the full GUI suite, the real Linux app, every
other test that right-clicks (30 files ran on mote before its disk filled and
are void).
EV_John_Liu on X: "现在不是有图片生成、asr、tts管线和网络搜索。能不能做个快速
检测。可用". Settings › Models now ends with a Quick check: a row per
pipeline, each with Test, and Test all. A check makes the smallest real
call through the gateway, the way an agent's request goes:
- image generation: the image model in force (drawer), prompt "a dot", n 1
(quality low for gpt-image);
- text to speech: the first enabled model that serves speech, "Hi.";
- speech to text: the first that serves transcription, 1s of silence as a
16 kHz WAV;
- web search: one query through the searcher in force.
A row says ok with the model and how long it took, the vendor's error with
its status (provider.APIError's reading), or that nothing is set up. A 200
with an empty body is not ok. A check costs the user money, so it runs only
on a click: drawing the page calls nothing (the GUI test counts calls).
Disabled models are skipped. tts/whisper models are read from the
provider's own list, since the kept listing leaves them out.
POST /api/pipelines/check answers "Another magpie serves the gateway"
when this one doesn't serve it. pipecheck.js is loaded lazily, so the
core script budget is unchanged.
Run at this head (rebased on ce0cbff61). mote's disk was full (113 MB
free), so the Go and GUI runs went to the Linux box (WSL magpie-desktop):
- gofmt -l clean; go vet linux (-tags nogui) and windows on the Linux box,
darwin on mote once it had room: all clean.
- go test -tags nogui ./internal/gui/ ok (2033s); go test -run
'TestCheck|TestPipeline|TestAudio|TestSpeech|TestTranscri'
./internal/gateway/ ok; go build -tags nogui . ok.
- pipeline-check.test.cjs, chromium and webkit, en/zh/zh-TW/ja/de, 1100px
and 400px: 16 of 16 ok. i18n-keys, search-key-list and video-gen-pick
ok.
- Red the same at origin/main ce0cbff61, not this change: old-webkit
(headerpresets.js #6030, Safari 15 :has() #5919), settings-search
(/api/update/using, #5982), settings-hints ja/de 420px in both engines
(#6073, Linux numbers added there).
The test brings a row into view with the wheel and waits for the scroll
to rest (WebKit's runs on after the event; script scrolls are put back
by app.js), then presses where the button is.
Broken by hand, each red, then restored:
- FirstServing ignoring the provider's own model list: SpeechSaysAWord,
SpeechSaysTheVendorsError, TranscriptionSendsASecondOfSilence red.
- taking a disabled model: TestCheckSkipsADisabledModel red.
- any answer counted ok: SpeechSaysTheVendorsError red (OK:true Status:400).
- a check run when the page draws: pipeline-check.test.cjs 8 of 8 red in
chromium (a row showing "Testing…").
- not red: a press that scrolls #view-settings, or that adds 60px above
the list. app.js holds the clicked element in both cases, so the test's
"stays put" check guards that app-wide rule (click-scroll owns it), not
pipecheck.js.
Not tried: a real call to any vendor (fakes only); the real app window
on Windows, Linux or macOS; the whole GUI suite (only the files this can
reach, listed above).
Follows the cherry-picked 570633390 (Flandern1211): leftover Codex subagent
threads of a deleted parent are no rows, Codex's own threads only count in the
provider bar, a gateway session that spent nothing is no row. Rebased onto
main's Draft sessions group (zcodeDraft now also takes Codex's
~/Documents/Codex/<date>/<name>, temp folders and worktrees).
Run: go test ./internal/sessions, ./internal/usage and gui -tags nogui
'Session|Gateway|Manage' on WSL: ok; go vet linux nogui and windows: clean;
GUI sessions-codex-drafts (new), sessions-zcode-drafts, sessions-folder-list in
chromium and webkit: ok. Broken by hand: without keptSubagents
TestCodexSubagentWhoseParentIsGone is red.
Not tried: a live Codex Desktop; the full suite.
Deleting a thread in Codex leaves its subagent rollouts behind: the
guardian's review threads, titled by the prompt it asks ("The following
is the Codex agent history whose request action you are assessing…"),
and the title threads it opens. magpie reads every rollout, so each was
a session of its own, and one whose thread was gone had nothing to hang
under. On this computer 642 Codex sessions held 422 subagent threads,
86 of them with their parent thread's file gone (and 2 more under one of
those): they filled folders of their own (Documents\Codex\2026-08-17\
shan, wang, wei…), and the bar counted 531 sessions made with another
provider, 371 of them review threads no one ever opened. Codex Desktop
also makes a folder for every chat started without a project
(~/Documents/Codex/<date>/<name>, its outputs/ and work/ in it, named
from the prompt): 36 of them here were 36 folders of one session each.
listAgentWith now drops a Codex subagent thread whose parent is not
listed, to a fixed point, so a chain of them goes too; the agent's tab
counts the rows it lists. The "Scratch sessions" group that commit
e373adddf gave ZCode's draft folders now holds Codex's own per-session
folders as well (that one, Documents\Codex\<date>, a probe in a temp
folder, worktrees, another app's hidden folder). The provider bar counts
Codex's own threads only (role main or unknown): 531 became 160 here.
And a gateway session no call of which was answered and which spent
nothing is no row either (usage.GatewaySession.SpentNothing): the three
empty rows under "Seen through the gateway" were Codex's failed
title calls (kind thread_title, 400/499, 0 tokens), their ids ones no
file of Codex's has.
Rows: 642 Codex sessions to 554 (88 review threads gone), 422 subagent
threads to 334; 36 folders (51 sessions) folded into Scratch sessions;
3 gateway rows to 0, so "Seen through the gateway" is empty here. Usage
still counts every one of those calls, and nothing was deleted.
Run:
- go test ./internal/sessions -run 'TestCodexSubagentWhoseParentIsGone|TestZCode' -count=1: ok.
- go test ./internal/gui -run 'Session|Gateway|Manage' -count=1: ok.
- go build ./...; go vet ./internal/gui ./internal/usage ./internal/sessions; gofmt -l; git diff --check; node --check client.js: clean.
- go test ./internal/sessions -count=1: the same failures as without this
change (TestAgySessions, TestAgyRowOnly, TestAntigravityAppFolder,
TestCCListingKeepsItsNames: path separators and allocation counts on
this Windows box).
- go test ./internal/usage -count=1: TestDesktopSessionAccountMetadata
fails without this change too.
Broken by hand:
- without keptSubagents the 86 rows come back
(TestCodexSubagentWhoseParentIsGoneIsNoRow fails);
- hiding a gateway session on "spent nothing" alone breaks
TestSessionsSameWithoutRows and TestGatewayConversationAPI: a call
answered with no tokens is still a session, so SpentNothing also asks
that none of its calls was answered;
- counting subagent threads in the provider bar says 531 here, 371 of
them review threads.
Not changed: the review threads' calls are still counted by Usage and by
the Sessions page's stats; their rollouts stay on disk (Deleting the
parent does not delete them); the scratch grouping is worked out on the
page (client.js), so Usage's folder filter still lists those folders by
their paths.
Backups and sync. memory.json goes in every backup and in the WebDAV,
S3 and GitHub sync, under its own toggle (on unless turned off, as the
library is). A sync merges memories one by one (memory.Combine): the
newer change wins, a memory the user edited or pinned is never taken
over by one they didn't, an archived one is kept 30 days and the
suggestions turned down are joined. Settings > Sync has a Memory tick,
and the description lists memory.
Promotion. Library > Memory (In use, no search) shows what memory
suggests: a project memory that says the same in two or more projects
(the same text, or 60% of its words with 6 or more on each side), or
whose sources came from two or more, is offered as global; a procedure
searches returned 5 or more times is offered as a skill. Taking a
global one keeps the user's own or pinned memory first, then the most
used, makes it global and supersedes the rest (into a global with the
same text when there is one). Making a skill writes a library skill
from its text and why, named from its first words (procedure-<id> for
one in Chinese), for the agents ticked for instructions, and archives
the memory. A suggestion declined isn't made again, and that goes with
sync too. Routes: POST /api/memory/promote, /skill, /decline.
Docs: docs/subsystems/memory.md (Backups and sync, Promotion),
docs/subsystems/sync-backup.md.
Pushed on origin/main 14be7f69d, whose 5 commits since 8b2fb6b08 share no
file with this one (not run again). At 8b2fb6b08: i18n-keys, library-memory-suggest and
webdav-settings-refresh on WSL in both engines, and -run
"Memory|Skill|Market|ThirdParty|Promote|Suggest|Sync|Combine" of
library, memory and backup on Windows: ok. One rebase before, at
origin/main 69453574d: go vet of gui,
memory, library and -run "Memory|Settings|Parity|Budget|Skill|Promote|
Suggest" of gui and memory on Windows: ok; i18n-keys, library-memory*,
the five sync files below and sync-own-fields, library-backups-top on
WSL in both engines: ok but webkit s3-sync (below).
Before the rebase, Go code the same as at the run on the Windows box
(xiaomi-gpu, win-run; mote's disk is full, every run there stalled):
- go vet ./... (windows) and GOOS=linux go vet -tags nogui ./...: ok.
gofmt -l: clean.
- go test -count=1 ./internal/memory ./internal/backup ./internal/davsync
./internal/memdistill ./internal/memembed: ok.
- ./internal/library: ok but three tests red on Windows that are red the
same on origin/main d936be763 run alone there and are filed:
TestPluginImportCarryOnOffRemove (#6065), TestGoneAgentListedToTakeOut
and TestCheckMixedServerEachSide (#4115). -run "Memory|Skill": ok.
- ./internal/gui ./internal/cli -run
"Memory|Settings|Parity|Budget|Distill|Dream|Skill|Promote|Suggest": ok.
GUI on the WSL box (magpie-desktop), chromium and webkit:
- library-memory-suggest (new), library-memory, library-memory-select,
i18n-keys, sync-own-fields, sync-not-backup, auto-backup,
library-backups-top, library-bar-more, login-export, login-import: ok.
- every sync-*.test.cjs, github-sync, s3-sync, usage-computers,
webdav-settings-refresh, refresh-page, old-webkit: ok but
old-webkit's two reds, the same on main and filed (#6030, #5919), and
webkit s3-sync's "picking S3 must not scroll the page" (the page is
at 0 after the click), red the same on origin/main 1ccacad63 2 of 2 at
--test-concurrency=2 one step later ("picking S3 again", #3413).
github-sync, s3-sync, sync-signins, sync-other-kind and
webdav-settings-refresh were rerun after their expected bodies and
descriptions took memory: ok in both engines.
Broken by hand: Suggest without the Declined filter turned
TestSuggestSkillAndDecline red, and keptFirst without the Fixed order
turned TestPromoteKeepsTheUsersOwn red; restored.
Not tried: a real sync between two computers with real memory, and the
GUI on macOS (mote's disk is full).
Plugins -> Discover read GitHub's topic search plus a package.json, an npm
answer and an entry file for ~400 repositories on every desktop. Where GitHub
is unreachable or rate-limited the page said "Couldn't ask GitHub".
Now the community repo's `tagged` workflow (plugins repo, scripts/tagged.mjs,
every half hour) builds tagged.json on its dist branch, usemagpie.ai serves
it at /api/plugins/tagged (worker, edge-cached 10 min, jsDelivr and the last
whole copy as fallbacks), and magpie asks: usemagpie.ai, the dist branch
(jsDelivr with the China-mirror switch), then GitHub as before. parseCatalog
keeps only entries whose spec is github:<repo> or the package named from it,
and drops a file older than 48h. Degrades: a tagged repo shows within the
hour, not ten minutes; stars/https icons are as of the last build; owner
avatars and https icon URLs still come from GitHub hosts (data: icons work).
Run (wsl-run, mote's disk is full): go vet + go test ./internal/plugin,
node --test site/worker.test.mjs (21 pass), scripts/tagged.mjs against the
real GitHub (367 plugins, 253 with icons, 0 unread; workflow run green and
tagged.json on dist), usemagpie.ai/api/plugins/tagged after wrangler deploy
(200, 4.8MB). Broken by hand: skipping askCatalog turns
TestTaggedReposFromTheBuiltList red. Not tried: a real desktop with GitHub
blocked; GUI suites (no GUI file changed); Windows/darwin vet.
TestAutoVisionDoesNotBuildListsAgain checked AutoVision against its own
count with 4 models, but searcherModel against a fixed 50. What a call
allocates differs by OS: 130 on Windows (#5123), 51 on Linux at
origin/main, run alone too, so the test was red on both while the
lists were kept as meant. Both halves now measure 4 and 400 models and
fail when 400 costs more than 50 above 4, which is what the test is
named for.
Run:
- broken by hand (keptSmallCands builds the list each call): red on
WSL, AutoVision 496 -> 934 and searcherModel 135 -> 573.
- restored: -run 'TestAutoVision|TestSearcher' -count=5 ok on WSL
(382/382, 51/51); -count=3 ok on the Windows box (658/658, 130/130).
- go vet ./internal/gateway (Windows), gofmt -l: clean.
059d995d5 keeps what AllOf counted of each window, keyed by window{key,
start's Unix second, scope}. A 10-day limit reset and then made a
5-hour one a millisecond later share that key, so the 5-hour status
took the 10-day prefix: its Start was the 10-day Since, its Reset the
5-hour one, 5h0m0.0017s apart, and the rows it counted were from the
old start. CI at 61a04f42a was red on ubuntu and macOS for it.
A kept entry is reused now only when its start is the limit's own.
Run (mote is out of disk and refuses ssh, so WSL and the Windows box):
- TestAllOfKeptWindowIsOfItsOwnStart (new): red on the old code with
Start 14:36:23.1, Reset 19:36:23.1017, green with the fix.
- go test ./internal/budget ./internal/access: ok on WSL (-count=3)
and Windows.
- go test -run TestGatewayKey -v ./internal/cli: all 11 pass on
Windows, and with -tags nogui on WSL; TestGatewayKeyLimitCLI is the
CI red.
- go vet ./internal/budget, gofmt -l: clean.
- internal/gateway on Windows: TestClaudeAsRootEnv red (#2425, open),
and the package hit the 10m default timeout; not on this path.
Not tried: a full ./... run.
A Remote magpie's quota cards ignored which models the Remote has enabled,
so providers it does not serve (Kiro, Codex) showed up, and an A to B to C
to A cycle grew paths like remote-B/remote-C/remote-A/remote-B/remote-C/kiro
with snapshots hours apart. catalog.Self() is random per run, so after a
restart the stale copies in other caches no longer looked like ours.
- catalog.loops: a magpie id repeated inside one Via is a loop, restart-proof.
- namedRemoteCards keeps only cards whose provider head is among the
Remote's exposed model heads (none served: none; no list: all).
- CachedCards and RemoteCards keep one card per subscription account
(kind, leaf provider, user): the newest complete reading, then the
shorter path. Key plan and balance cards are not merged.
- keepRemoteCards evicts looped copies before caching.
- TestRemoteChainPassesOnCards: magpie3 now knows magpie2 alone, as the
same account by two paths is shown once.
Run (WSL, magpie-desktop): gofmt -l clean, go vet linux and windows,
go test internal/catalog and internal/provider ok, gateway Remote/Quota
subset ok. Broken by hand: no enabled-model filter, no dedupe and no
repeated-id rule each turn TestRemoteCardsFollowEnabledModelsAndDedupe or
TestLoopsOnARepeatedMagpie red.
Not tried: a real A to B to C to A cycle in sandbox HOMEs (fake peer in
test), the GUI suite, win-run, the Usage page's own-versus-remote copies.
/docs/copilot-cli says how magpie runs GitHub Copilot CLI on magpie's
models through Copilot's own providers (BYOK, no GitHub sign-in): the
provider named magpie, OpenAI-compatible, that magpie adds to
providers.json in ~/.copilot ($COPILOT_HOME, $COPILOT_PROVIDERS_CONFIG)
with the gateway's address, a key of Copilot's own and magpie's models
with their name, context and output limits; model = magpie/<ref> in
settings.json, a bare ref on the command line spelled so; Copilot's own
models and auto on the row; effortLevel, its levels and Copilot clearing
it on its own /model; the user's other providers, models, keys and an
unparsable file left alone; and switching back. Each claim is from
copilot() in internal/agent/agents.go, internal/agent/copilot_byok.go
and Agent.Spell. Linked from each language's Raycast page and the
Copilot provider page; in the sitemap, llms.txt and llms-full.txt.
Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test worker.test.mjs install.test.mjs on the WSL box
(magpie-desktop, wsl-run; mote has refused SSH this session): 71 pass,
0 fail.
Not tried: Copilot CLI itself on magpie for this page; it names only
what magpie's source says.
Settings > Privacy "Turn off telemetry for all agents" and each agent's own
Telemetry row now also cover Crush (options.disable_metrics), Kimi Code
(top-level telemetry in config.toml), Goose (GOOSE_TELEMETRY_ENABLED in
config.yaml), Pi (enableInstallTelemetry; Pi itself, not its forks) and
Cline CLI (telemetryOptOut in data/settings/global-settings.json). Each key
was read from that app's source, docs or binary. Same rules as before: only
missing keys are written, a user's own value is never overwritten, an
unreadable file is unknown (TOML and YAML are parsed strictly).
Antigravity (app and agy) has no local key: agy's EnableTelemetry is
json:"-" and the setting lives on the Google account. Droid (org-set),
OpenCode/omp (OTel is opt-in), Cursor CLI (account privacy mode) and Hermes
(sends none) have none either. Grok Build, Kiro, CodeBuddy, Command Code and
Amp were not looked at.
Run (wsl-run, mote's disk is full): telemetry_more_test.go green; broken by
hand twice (wrong off test: crush and cline red; lenient unreadable read:
kimi and goose red). go vet for windows, darwin and linux nogui clean.
internal/agent whole package: only TestGrokInstalled red, a WSL exec
"Invalid argument" in a /tmp stand-in, not touched here; the one red this
change caused (TestFolderVarsAreListed, CLINE_GLOBAL_SETTINGS_PATH) is fixed
in agentenv.Vars. Real goose and crush binaries read the sandbox paths; not
tried: that any of the five honours the written key at run time, Windows run.
warmSteps read every day's stats, then 30 days', each its own
StatsAndNativeAll: two listings of every session file, two
groupings by key, Claude Code's copies and branches found twice.
With a real account's history that was 196 MB of the 734 MB magpie
allocated in its first minute. warmStats reads the ranges not kept
yet in one pass and keeps each as statsForGen would.
Test: TestWarmUpReadsTheStatsInOnePass counts the passes. With
warmStats reading each range through statsFor, as the warm-up did,
it is red with two passes.
keepDshWired's round ran outside any provider.Hold, so every
PublicRef, RenamedRef and Exposed it asked built every provider's
models again. With a real account, 158 MB of what magpie allocated in
its first minute was this round, 72.55 MB of it dshStartOnItsRoute's
four refs, all worked out before the first was looked up.
The round now holds the catalog for its whole run, and the start's
refs are worked out only when the one before isn't listed.
provider.EntriesBuilt exposes the build count for the test.
Test: TestDshRoundBuildsTheCatalogOnce gives the start an auto ref
no model has and counts catalog builds in a writing round. On the
old dsh.go it is red with 3 builds; with the change, 1.
detect was "obsidian's config folder exists", so every Obsidian user got a
row whose provider field could only fail ("no Obsidian vault here has
Copilot"). It now needs a vault in obsidian.json with Copilot installed
(.obsidian/plugins/copilot/manifest.json) or magpie's provider already in
its data.json, so a wired vault can still be disconnected. Every OS's config
folder (mac, Windows, Linux, Flatpak, Snap) is already read by obsidianDirs.
Siblings checked: Zoo Code and Copilot (JetBrains) already require the
plugin installed; VS Code forks and Raycast are the apps that hold the
setting themselves. None changed.
Run: go test ./internal/agent -run Obsidian (wsl-run); the new no-Copilot
vault assertion is red on the old detect (checked by hand). Full agent
package, gofmt, linux and windows vet: see push notes. Not tried: a real
Obsidian install.
Both publish an MCP server: EverMe's @everme/memory-mcp (stdio, agent id and evt_ token, managed backend preset) and Nowledge Mem's Streamable HTTP endpoint at 127.0.0.1:14242/mcp (optional Bearer key for a Mem reached over Access Anywhere). Added beside Magpie Memory; their memories stay in their service, and magpie's digest and Memory tab don't read them (docs/subsystems/memory.md).
Run (wsl-run, magpie-wt/memprov at origin/main 032340056): go test -count=1 ./internal/library ok, GOOS=windows go vet ./internal/library, go vet -tags nogui ./internal/library, gofmt -l clean. TestThirdPartyMemoryServers is red without the two entries (the market has no such server). Not tried: a real EverMe token or a running Nowledge Mem; GUI market tests (the page lists servers from the API, no GUI file changed); mote was out of disk, so nothing ran there; full suite not run.
059d995d5 added webPageStart and webPageTitle as package-level
regexp.MustCompile, which TestNoEagerPackageRegexps refuses: every
package regexp goes through lazyre so start-up doesn't compile them.
CI at 61a04f42a was red on ubuntu and macOS for it.
Run (Windows box, win-run; mote is out of disk and refuses ssh):
- go test -run TestNoEagerPackageRegexps . : ok (red on CI before)
- go test -run 'TestFailSaysAProxyPage|WebPage' -v ./internal/gui:
TestFailSaysAProxyPageByItsTitle, TestWebPageHandlerEveryWhere pass
- go vet ./internal/gui, gofmt -l: clean
v0.1.3681's Longest context left a window the user set for a model, or "*"
on its provider, alone even when longer. Settings > Models > Routing now has
a menu beside the field: "Models without their own" (the default, as before)
or "Every model". In both modes the shorter of the cap and the user's own
window is told; they differ only when the user's own is longer (own keeps it,
every model brings it down). Settings.ContextCapAll, Settings.CappedOwn,
POST /api/settings/context-cap-mode {all}, magpie model context-cap all|own.
Applied in provider.windowIn (so /v1/models, catalogs, compaction), Codex's
CodexNativeWindow/CodexWindow (the list's ETag tag carries the mode) and the
gateway fallback window. i18n in zh, zh-TW, ja, de.
Run (wsl-run, mote's disk was full): provider (full), settings, settingsapi,
codexcat packages; cli -run ContextCap; gateway -run ContextCap|ModelsList;
GUI context-cap, i18n-keys, model-load, settings-places, settings-general in
chromium and webkit; TestCoreScriptBudget; gofmt; go vet nogui and
GOOS=windows vet. Broken by hand: windowIn's CappedOwn removed turns
TestContextCapAllHoldsTheUsersOwnWindowsToo red.
Not tried: the whole Go and GUI suites, a real Codex reading the list, macOS
or Windows runs, GUI in zh-TW/ja/de beyond the i18n-keys check.
TestSocketTurnBodiesFreed went red on ubuntu CI at a3d2a85dd ("turn
bodies [8] of 12 still kept"), after a268aadc4 had let the unrouted
watch's own timers go. Two more paths kept a turn's request, and with
it the whole conversation it was sent with:
- A context timer. Any WithTimeout under the request's context, stopped
as its call ended, is kept with its context in the timer heap of the
P that set it until that P tidies its heap, and an idle P never does.
Through the context's values it reached the watch twice: the
unroutedKey value held the watch itself, and inflightOf's value held
the inflight, whose f.unrouted is the watch. The watch holds the
request (u.r), and the request's Body and GetBody the bytes.
The unroutedKey value is now the watch's held pointer, as its timers
already were (unroutedOf), let go as the handler returns; done clears
f.unrouted too. Its readers (noteRoute, showRedacting, notDescribed)
run inside the handler, before done.
- An asynchronous release. holdBody and the body room let go of a body
in a context.AfterFunc, which runs in a goroutine of its own once the
turn's context ends, so under load the test's one collection could
come first. The test now collects until every body is gone, within
10s: far under unroutedShow (15s) and unroutedMost (2m), the times a
real holder kept one for.
Run (the Linux box, wsl-run, since mote is out of disk):
- origin/main 4ddc150c6, TestSocketTurnBodiesFreed -race -cpu 1,2:
1 red in 80. With a probe, the red was a body still held after 10s,
and in 9 of 300 runs bodies were freed only 30-120ms after the first
collection (the async release).
- With the context-value half only: 3 red in 200, each held over 10s.
With holdBody's sharing turned off: still 1 red in 200, so it isn't
a decoded string sharing the body. A goroutine dump at the red had 7
goroutines, none of the gateway's: a heap reference, not a runner.
- With both halves and the new test: 300 of 300 green (-race,
-count=150, -cpu 1,2).
- TestUnroutedContextLetsGoOfRequest, new, holds the request's context
past its handler: red 5 of 5 on the old code, red 5 of 5 with only
the context-value half, red 3 of 3 with only the f.unrouted half,
green with both. TestUnroutedTimersLetGoOfRequest still passes.
- go vet ./internal/gateway on Linux: ok. gofmt -l: clean.
- The whole internal/gateway package runs next on the Linux box; its
result goes on #5250.
Not tried: macOS and Windows runs (mote is out of disk and refuses
ssh); other context values that might hold a request are not audited.
gateway-routing.md and providers-accounts.md: a key whose usage windows magpie reads takes the same usage cap an account does.
Record for the three commits (@wanggenjidev on X: Codex-style percent cap for OpenCode Go keys, generically for every key with windows magpie reads):
- Run at the pushed head (rebased on 08a852a36): TestKeyTakesUsageCap and TestKeyUsageCapPassesTheKeyOver ok; gofmt clean; key-usage-cap, key-spend-cap, account-cap, window-cap, i18n-keys: 180 pass, 0 fail on WSL, chromium and webkit. window-cap in webkit alone: 60/0 on this head and on origin/main a3d2a85dd.
- Earlier on mote at the previous base: provider/gateway/cli targeted tests ok; ./internal/gui ok 188s with -timeout 45m; vet darwin, linux nogui, windows clean.
- Broken by hand: the gateway hold removed, TestKeyUsageCapPassesTheKeyOver goes red.
- mote's disk filled during checking (52 webkit window-cap fails there, 60/0 on WSL on both main and this head); not a window-cap bug found on this change.
- Not tried: a real OpenCode Go key with live windows, Windows/Linux GUI runs, WebKitGTK. The whole GUI suite and the Go suite run after the tag.
GUI half of the previous commit; same pill and words as the account cap. key-usage-cap.test.cjs passes in chromium and webkit, en zh zh-TW ja de, 900 and 400px.