Commit Graph
7858 Commits
Author SHA1 Message Date
yetone 8c0c2e8b6b gateway: Antigravity tool names, malformed calls and empty-reply retries (fwxkogaia on X)
Claude Desktop on antigravity/gemini-4-carbon failed 403 of 408 requests:
400 "Request contains an invalid argument", 502 empty reply after 170-230s,
and 200s marked failed with output tokens.

Changed, in internal/gateway:
- A tool name starting with a digit or a dash (MCP tools named for an id)
  goes to Google as _x_<name> and comes back without it; a property with no
  name is left out of the Antigravity schema. Both turned the whole request
  away on a live call.
- A MALFORMED_FUNCTION_CALL / UNEXPECTED_TOOL_CALL finish carries the call
  in finishMessage; it is now made the call instead of reading as an empty
  reply (tokens spent, then asked again for nothing).
- passing(): a 502 empty reply is asked again once, not lastRetries times on
  top of the in-place emptyRetries.

Run (mica): go test -run 'TestCodeAssist|TestEmptyReply' ./internal/gateway;
the new tests are red on the old code (names, malformed case).
Live (owner account, gemini-3.8-flash): names with a digit/dash first, a
space, unicode, a slash and an empty property key each 400; 64 and 100 char
names are 200.
Not tried: real gemini-4-carbon (the account lacks it, 404), so the user's
exact 400 is not reproduced; the finishMessage form is Google's documented
shape, not captured from Carbon.
2026-11-12 23:17:51 +08:00
yetone f4f104d1cc gui: a sign-in kept to its link shows Copy link with Open in browser beside it (Yink88564391 on X)
With Settings > Privacy > "Open sign-in pages in the browser" off, the
add-account window shows the link and opens nothing. The Open button sat
in a row under the link; it now sits in the link's own row, right of the
copy button, labelled "Open in browser" until the page has been opened
(then "Open again"). Every account sign-in goes through openSignIn, so
Codex, Claude and the rest follow it; MCP server sign-ins are not
account sign-ins and are unchanged. The default is unchanged.

Also: signin-close's "nothing else was changed" filter ignores
/api/update/using, which the page's in-use ping (10c4dc109) had turned
red on origin/main.

Run (mica): signin-*, i18n*, gui-* GUI files, chromium and webkit, en zh
zh-TW ja de: all pass; TestCoreScriptBudget ok. signin-link-only was red
on the old assets (no Open button in .signlink) and green after.
Not tried: a real Codex sign-in; Windows/Linux webviews.
2026-11-12 23:04:51 +08:00
yetone e18aca1038 agents: an agent's own context window, and a routing group's own Compact at (ul3140773077392, NovaStudiosss on X)
ul3140773077392 on X: dsh compacts earlier than other harnesses at the same
window, so one global size per model fits none. An agent's sheet (Agents,
the agent's Settings line) now holds "Context window": a size for every
model, or model=size pairs (provider/model, group/<id>, provider/*, a bare
model id, *). Empty follows each model's own window. It is applied in
provider.CatalogFor, the choke point every agent's model list goes through,
so dsh's contextWindow, Codex's catalog and Claude Code's window all read
it, and a window set this way makes Codex/Claude compact at that window
(Entry.WindowSet). Stored in settings.AgentContexts, kept by a general
save (settingsapi); POST /api/settings/agent-contexts and
`magpie model window <agent> [model=size...|off]`.

NovaStudiosss on X: Routing, a group's Edit, Advanced already had "Context"
(the window agents are told). It now has "Compact at" beside it
(Group.Compact; compactSet reads it before the members' smallest), also
`magpie group ... compact=`.

GUI: agentwindow.js, loaded on demand through agentcompact.js so app.js
stays inside its budget (TestCoreScriptBudget passes; the "Context window
in {agent}" label reuses the existing "Context window" key). Every agent
with fields now has a sheet; agent-prefs' Pi expectation says so.

Run at the pushed head, on mote: go vet (darwin; linux -tags nogui;
windows) on provider, agent, cli, gui, settings, settingsapi; gofmt clean;
go test provider, cli, settings, settingsapi, gui (TestCoreScriptBudget
and cli's route table fixed here), agent -run Dsh; node --test agent-window
and group-compact (chromium and webkit, en zh zh-TW ja de, 900 and 420px),
agent-compact, agent-prefs, compact-at. Reds seen identically on a
detached origin/main 4e0026661: agent-prefs webkit "in the panel a
Settings line..." (#6139) and old-webkit "compat.js is the first" / "styles
hold up in Safari 15.0" (#5919, #3403).

Broken by hand, each red then restored: withAgentWindows out of CatalogFor
(TestAgentOwnContextWindow, TestDshOwnContextWindow); the group branch in
compactSet (TestGroupOwnCompactAt); the settingsapi keep line
(TestSettingsSaveKeepsWhatItDoesNotSend); the window row in the sheet
(agent-window tests); compact dropped from the group save
(group-compact tests).

Not tried: a real dsh with a real account (its compaction is dsh's own;
the test reads the window magpie hands it), the full GUI suite (queued
behind another run on mote), Windows and Linux runs of the new tests.
2026-11-12 23:01:29 +08:00
yetone 836d074f1a providers: a model's maker logo is found for every catalog a preset names, StepFun's included (zzstar101 on X)
IconForCatalog compared a models.dev id with the preset's whole Catalog
string, so a preset naming several ("stepfun-ai-step-plan, stepfun-ai",
"stepfun-step-plan, stepfun", Xiaomi MiMo's, Azure's) matched none of
them and gave no logo for step-5-preview's catalog. It now also looks in
each preset's list (Provider.Catalogs), after the presets whose catalog is
exactly the id, so Azure's "azure, openai" never takes OpenAI's models.
An empty id gives none (it matched a preset with no catalog).

Run (mica, the load bar on mote): TestIconForCatalogFindsAListedCatalog
red on the old presets.go (stepfun, stepfun-step-plan, azure,
xiaomi-token-plan-cn), green on the new; go test of internal/provider,
internal/agent and internal/gui ok; gofmt; go vet on darwin, linux
nogui and windows.

Not reproduced: the Models page names step-5-preview's maker by its id
(agent.ModelIcon gives stepfun-color for every spelling tried), so this
does not by itself explain the report's icon; it fixes the lookup the
imported-provider path (importurl.go) and the by-catalog logos use.
Not tried: the reporter's own provider list.
2026-11-12 22:59:18 +08:00
yetone 4e0026661c gateway: CodeArts's "request param is invalid" is the request's, nobody rests (Abandon332 on X, #6342)
Huawei's gateway answers a parameter it can't take (the codearts plugin sent
`stop` as an array; plugin 0.3.15 sends a string) with InferHub.001001005.400
inside a 200. magpie read it as a plain 400 and rested the account, 182
times in the report. The code joins shapeWords, so a member behind it is
asked and the one that refused doesn't rest, as for any request shape a
vendor can't read.

Run (mica): TestCodeArtsInvalidParamIsTheRequests, shapeRefused, custom-tool
tests; go vet on darwin, windows, linux nogui; gofmt clean. The new test was
red before the regex change. Not tried: a real CodeArts account; the whole
suite (started after the tag). The last member in a group still rests as
before, since shapeRefused only applies when another is left.
2026-11-12 22:53:32 +08:00
yetone 74881f4d6a site: an OpenMausBot docs page in en, zh and ja
/docs/openmausbot says how magpie sets up OpenMausBot: config.json in
$OMB_DATA_DIR or ~/.openmausbot, and why its Claude bots need an engine
of magpie's own (Claude Code runs isolated, with only the sign-in keys
of ~/.claude/settings.json). The page covers the magpie engine, shaped
like OpenMausBot's Claude endpoint: claudeAgent, access custom, its own
configDir, requireApiKey, every magpie model in endpointModels, and the
gateway and key in the environment. It also covers routing owned by the
engine, the default fleet written beside it when the file has none,
refusing a change while OpenMausBot runs with the list rewritten after
it writes over it, what stays the user's, and switching off. Each claim
is from internal/agent/openmausbot.go. Linked from each language's
Mistral Vibe 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):
116 pass, 0 fail.
Not tried: OpenMausBot itself with magpie for this page; it names only
what magpie's source says.
2026-11-12 22:46:23 +08:00
yetone 477bbb7a15 usage: GET /v1/magpie/usage/requests?cursor= reads requests as changes, with stable ids (rdsaltbo on X, #6060)
A program keeping a ledger of its own (a WakaToken plugin) can now read the
requests incrementally: cursor=start or cursor=now, then each next_cursor.
Rows carry a stable content-derived id (same after a restart), origin, and
original_ids (request_id, response_id, client_response_id, message_id,
session_id, native_session_id), each only when the source gave it. A call
read late, a corrected row (same id, higher seq) and a native row replaced by
the gateway's (deleted, with seq) all come through a persisted journal
(usage-feed.jsonl, appended and synced before answering). Cursors magpie
cannot resume from are refused: 400 cursor_invalid / cursor_filter_changed,
410 cursor_expired / cursor_reset. A held key sees only its own rows and
tombstones. Without cursor, offset/limit mode is unchanged.

Also: Record.MessageID (not persisted) from the agent file's message id, and
usageapi's row decoration moved into a namer shared by both modes.
Docs: reference.md, integrating.md, gateway-routing.md, gateway-sessions.md,
site remote.html (en/zh/ja), llms-full.txt.

Run (mote, this tree): go vet darwin, GOOS=windows, GOOS=linux -tags nogui on
usage, usageapi, gateway (gui on darwin); go test -count=1 for
internal/usage, usageapi, gui, gateway: all ok. New tests: resume gets exactly
the new rows, ids and cursors survive a restart, correction keeps the id,
gateway takeover retires the native row, refused cursors, expiry, now cursor,
identical records, and the feed over the gateway (held key, 401 without key,
offset mode). Broken by hand: an unconditional memo made the new-rows test
red (fixed to memo only the next page).
Not tried: real Claude Code/Codex session files, a huge (700k+) history,
Windows run of the tests, GUI browser suites (no GUI file touched).
2026-11-12 22:40:15 +08:00
yetone 182803ea7d gui: the Mac's tray panel is made the first time it is opened
magpie made the quick panel as it started, hidden, so its page kept a
WebContent process of its own (~65 MB) for as long as magpie ran, for a
user who never opens the panel too. On the Mac it is now made by
panelWin on first open, the path lightweight mode already takes when it
let the panel go (madeAgain names it and hangs it on the tray icon).
Linux and Windows still make it at start: the made-again path hasn't
been run in a real window there.

Measured on mote, real window app, real account sandbox HOME:
- started plainly, at 40s: w32 (main) WebContent 69 MB + 65 MB;
  this change 65 MB alone, the panel's process gone.
- started as `magpie panel` (OpenPanel): both show the panel on screen
  (layer 101, 439x268 at 0,36, CGWindowList), with 2 WebContent
  processes of 65-66 MB each; magpie itself 175 MB vs 192 MB.
- a second `magpie panel` on the Mac only hands over (runningAlready);
  it never opened the panel, before or after.

Run: go test -run 'Panel|Light|Tray' ./internal/gui (mica, ok, with
TestPanelOnFirstOpen), go vet ./internal/gui darwin and GOOS=windows.
Not run: Linux GUI vet (no gtk4 dev packages in the WSL distro; the
Linux path is unchanged), a real tray click (no ssh-driven click; it
calls the same togglePanel as OpenPanel and the panel hotkey).
2026-11-12 22:28:44 +08:00
yetone 9192b78323 provider: a model's name that says its window is the window when nothing else does (maohy915 on X)
v0.1.3905 read an Ollama model's num_ctx from the Modelfile; maohy915 meant
the name itself ("Qwen-3.8-27b-128k"), which needs no Modelfile.

catalog.NameWindow reads the last part of an id (or of an Ollama tag,
"qwen:27b-128k", "qwen3-128k:latest") when it is a number and a unit alone:
4 to 2048 k, or 1, 2, 4, 5, 8, 10 m, as 1,000 and 1,000,000 like a "[200k]"
mark. Not read as a window: a size (27b, pythia-14m, smollm-135m), a date
(gpt-4o-2024), a quant (q4_k_m), a lone "128k", 1k, 3m, 1.5m, a size
followed by more words.

It is the last word: ListedWindow reads the list's window, then models.dev's,
then the name; a window the user typed (per model or "*") still wins in
windowIn. For a local Ollama list the name replaces the architecture's
maximum (the fallback) but never a num_ctx the Modelfile sets.

Run (mote-run): go test ./internal/catalog ./internal/provider with
NameWindow's edge table, the user/list/catalog order, and an Ollama list
with a fake /api/show; TestNameWindowIsTheLastWord red with the
ListedWindow line returned as 0. Not tried: a real Ollama server; the name's
window is not sent to Ollama as num_ctx.
2026-11-12 22:27:39 +08:00
yetone 15dd9ecad2 minimax: MiniMax-H3-Image and -Highspeed are offered and draw (netube99 on X)
MiniMax's new image models were missing from the MiniMax provider's image
models: only image-01 and image-01-live were listed. Per
platform.minimax.io/docs/guides/image-generation (and platform.minimaxi.com,
the same ids), MiniMax-H3-Image and MiniMax-H3-Image-Highspeed draw on an
OpenAI-shaped API of their own: POST /v1/images/generations, and
/v1/images/edits with images[].image_url, answered with data[].url (an item
that failed holds only an error and is skipped).

Both are now in minimaxDrawModels (every MiniMax API key, intl and CN) and
drawMiniMax asks them there. The size is the one form the API takes:
WIDTHxHEIGHT when it can draw it (655,360 to 20,000,000 px, within 1:3 and
3:1), else a ratio and a 1K/2K/4K tier, never both (the vendor answers 400).
A mask or markup layer is refused before anything is spent. catalog.ImagesAPI
knows "h3-image" so a relay serving the id is asked on its images API.

Run (mote-run): go test -run 'MiniMax|Draw|Image' ./internal/gateway
./internal/catalog ok; TestMiniMaxH3ImageDraws red with H3-Image taken out of
the list. Not tried: a real MiniMax key (none here); the fake follows the
docs' example answer. Streaming is not used.
2026-11-12 22:27:39 +08:00
yetone 59c9887f65 search: web_search takes sites, recency and images; the ChatGPT backend gets them as its own fields (LBM_OASIG on X)
The web-search MCP tool gains optional allowed_domains, blocked_domains,
recency_days, images and search_context_size. Codex search (/alpha/search,
codex-rs codex-api search.rs) gets them as the fields web.run has: a
query's domains and recency, image_query for images, settings.filters,
search_context_size, image_settings. Every other searcher is asked the
sites as site:/-site: operators and ignores the rest. Image results read
as pages whose text starts "Image: <url>". Arguments travel in ctx, never
in a request body. Schema text names neither magpie nor a vendor.

Run: real Plus account, curl to /alpha/search with image_query and with
domains+recency+filters: both accepted, image reply shape recorded in
TestImageResultsReadAsPages. New tests (search_scope_test.go) use the
fake backend; go test ./internal/gateway full on mote: only the count
schema tests red (a boolean default), fixed, then -run Search|Codex|
ChatGPT|ImageResults ok; vet linux/windows clean.
Not tried: through a running sandbox magpie end to end; GUI untouched.
2026-11-12 22:26:45 +08:00
yetone 7dbfc9f2fe usage: FlowDown and Bob are clients drawn with their own app icons (shannnnnks on X)
Their requests were unnamed in Usage and Routing. FlowDown (wiki.qaq.flow)
sets no User-Agent in its sources (checked Lakr233/FlowDown), so the system's
"FlowDown/<build> CFNetwork/..." is what arrives; Bob (com.hezongyidev.Bob) is
closed source and is matched the same way, by "bob/". Icons are the apps' own
App Store icons at 64px, as color SVGs wrapping the PNG, so app.js's size
budget is untouched.

Run: TestFlowDownAndBobAreClients (agent), see push notes for the rest.
Not tried: real traffic from Bob (its UA is the CFNetwork default for its
executable name, not captured); FlowDown/Bob are not wired as agents, since
neither reads a config file magpie can write.
2026-11-12 22:24:45 +08:00
yetone c96f33d659 agent: Hermes is one entry in the Agents list and the model pickers; its profiles are not rows (geekbb on X)
7050da0a4 (Norethcy on X) made each other Hermes profile an agent
hermes#<name> so the Library could give it its own skills and MCP servers,
and that also put one row per bot, each with its own model pick, in the
Agents list. geekbb: Hermes should have one entry; the bots Hermes made are
Hermes's to manage.

The profile agents stay, as the Library's targets (Norethcy's request keeps
working), but are now marked Agent.Nested: DetectedIn (the Agents list, the
tray panel and every picker built from it) and ClientsIn leave them out.
All and Find still reach hermes#<name> by id.

Existing settings: a model a user set on a profile lives in that profile's
config.yaml and is not touched, so it keeps applying; a profile on magpie
still follows the connected config's model unless it was picked, and a
picked one stays picked (hermes:<path>:picked). Nothing is dropped or
rewritten; what goes is only the extra row and its picker.

Run on mote: go test ./internal/agent ./internal/library; new
TestHermesProfilesAreNotListedAsAgents, red with Nested off and green with it;
GUI hermes-profile-row (rewritten: one Hermes row, no "Hermes ·" text),
hermes-profiles, i18n-keys in chromium and webkit, five languages; gofmt;
go vet darwin, linux, windows for agent and library.
Not tried: a real Hermes with several bots; the full suite before the tag.
2026-11-12 22:23:54 +08:00
yetone 3bbd8ceaaa routing: Least used first counts a small check-in reward about to lapse (kudi3699 on X)
kudi3699 again: v0.1.3877's Lapsing faded the lost share across the
week and needed 0.5 points. A WorkBuddy check-in reward is a few dozen
credits (20 of a 5100 pool is 0.39 points, less the fade), so it stayed
under the threshold until its last hours and the half-used account was
still never picked. The plugin side is fine: mover min is 0.2.29, past
0.2.27 that reports check-in rewards' runsOutAt/runsOut, so no plugin
change.

Allowance.Lapsing is now the whole loss in points when RunsOut is within
7 days, none past it (no fade); routes.lapsingMin is 0.1 points. A seat
at 90%+ is still not helped.

Run (mote): go test internal/routes, internal/provider -run
"Lapsing|LeastUsed|Allowance", internal/gateway -run
"WorkBuddy|LeastUsed|Smart|Pace|Routing"; go vet -tags nogui for linux,
windows, darwin on the three packages; gofmt clean. Broken by hand:
lapsingMin back to 0.5 turns TestLeastUsedSpendsSmallCheckInRewardSixDaysOut
red (20 credits, 6 days out, old 50% vs new 20%). Not run: the full suite
(after the tag), real WorkBuddy accounts.
2026-11-12 22:14:40 +08:00
yetone f57da2b5b9 gui: a test posted with an account is sent to that account or key (tmr11235 on X)
"Test on account..." posted the pick as `account` with provider/test, but
the test action never read it: the body's Account was only used by other
actions, so provider.TestOn was never called from the GUI and every test
went with routing's pick (d96403141 tested TestOn in the provider package
only). Now the action puts req.Account on the context for both the model
tests and the provider's Test, for every kind TestOn covers (keys, pool
sign-ins, plugin accounts), as one handler.

Run: gofmt clean; mote-run go test ./internal/gui (new
TestProviderTestIsPinnedToTheAccountPosted, TestProviderTestStops,
TestProviderInfoSaysTestPicks) ok. Broken by hand: with the TestOn line
back to r.Context() the new test is red (pinned to the second key came
back Account:first, 503 wrong key), which is the report.
Not tried: a real ChatGPT or plugin account pair; their path is the
provider package's, already covered by TestModelTestPinnedToAnAccount.
2026-11-12 22:12:32 +08:00
yetone b6043b8be3 site: a Mistral Vibe docs page in en, zh and ja
/docs/mistral-vibe says how magpie sets up Mistral Vibe (the vibe
CLI): config.toml in $VIBE_HOME or ~/.vibe, magpie's [[providers]]
entry at the gateway's /v1 and one [[models]] entry per catalog model
aliased magpie/<provider>/<model> for /model and active_model; the key
as an Authorization header in extra_headers, since Vibe reads keys only
from the environment or keyring, and nothing written to the environment
or ~/.vibe/.env; thinking levels and the 128K default; the user's other
keys kept and Avibe's vibe not taken for it; and active_model put back
on switching off. Each claim is from internal/agent/vibe.go. Linked
from each language's Pencil page and to the Mistral 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):
116 pass, 0 fail.
Not tried: Mistral Vibe itself with magpie for this page; it names only
what magpie's source says.
2026-11-12 22:11:19 +08:00
yetone 873b4987e9 gateway: a relayed Chat stream's tool calls are numbered from 0 in the order they start (hixonchan on X)
An upstream that turns Responses into Chat itself (OpenDesign,
deepseek-v4.1-flash) passed output_index on as tool_calls[].index. With a
sentence of text first the calls came as 1,1,2,3, and a client that keeps
calls in an array by index broke on the whole turn. chatTidy's renumber
gave a call its upstream index unless another call had it; it now gives
each call the next index in the order calls start, so 1,2,3 is 0,1,2 and
the 0,0,1 case still is 0,1,2. A stream numbered from 0 in order is
unchanged. The Responses to Chat encoder (chatEncoder) and the Messages
and Gemini translations already count calls, not positions; plugin
streams go through chatTidy.

Run: TestChatTidyNumbersCallsFromZero (text then three parallel calls),
red with the old renumber (frames 1-5 kept 1,2,3), green with it; the
chatTidy tests; go test ./internal/gateway on mote; vet on darwin, linux
nogui and windows.
Not run: the full suite before the tag; a real OpenDesign account.
2026-11-12 21:51:07 +08:00
yetone 10a27651f0 usage: a window's whole is kept across its reset until the new one tells its own (Musikrv77852 on X)
After Kimi Code's 7-day window reset with nothing used, the card lost its
"Whole ≈ N tokens" until the new week passed 5% used. The reckoning is
every provider's (usage.WithWindowHolds), so the fix is too: carryHolds
keeps the last whole told for each account's window (window-holds.json,
temp-and-rename) and, where the new window is under the floor or has none
routed yet, shows it with holds.prevAt set. The tooltip reuses the past
cycle's "Estimated from the window that began X, read Y" line; no new
label. The new window's own figure replaces it as soon as it can be told.

Run (mote): TestWholeKeptAcrossReset (reset with 0% and 2% used, restart
from disk, same-window under floor, other account, new window with data),
go test ./internal/usage ./internal/provider ./internal/gui (only
TestCoreScriptBudget red until its +10 here), quota-holds and quota-curve
GUI files in chromium and webkit (all 5 languages x 360/1000px for the new
case), gofmt, go vet darwin/linux/windows for usage and provider.
Broken by hand: carryHolds returning early reds the Go test and the GUI
case; dropping the prevAt branch in app.js reds the GUI case.
Not tried: a real Kimi account across a real weekly reset; a full
./... suite before the tag.
2026-11-12 21:48:04 +08:00
yetone b3b331e72f provider: ZCode's mover min is 0.1.61, which drops a reset past its end from the reset cards (nathan_ift_us on X)
The plugin's customer-package-reset list can flag a reset available after
its expireTime; 0.1.61 skips those (plugins fc87cc88). The min makes
keepMovedCurrent update every moved user.

Run: npm view --prefer-online shows 0.1.61; go test -run 'Moved|Mover|Migrat|ZCode'
./internal/provider on mote ok; gofmt clean. Plugin: bun test packages/zcode,
256 pass, the new test red on the old code.
Not tried: a full go test ./... before the tag, nathan's real reset list.
2026-11-12 21:47:48 +08:00
yetone e2afa3931a site: a Pencil docs page in en, zh and ja
/docs/pencil says how magpie sets up Pencil (pen.dev): a magpie
provider in Pi's format in ~/.pencil/models.json, on OpenAI Completions
at the gateway's /v1 for every model, under magpie's key for Pencil;
the fields each model carries (Pi's 128K and 16K defaults, zero cost,
no per-model api or baseUrl); the restart Pencil needs and the model
picked in its agent composer; how magpie finds it; the user's other
providers and their own keys kept; and switching off. Each claim is
from internal/agent/pencil.go and theirsKept in sync.go. Linked from
each language's WorkBuddy 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):
116 pass, 0 fail.
Not tried: Pencil itself with magpie for this page; it names only what
magpie's source says.
2026-11-12 21:37:44 +08:00
yetone ea3a00adc5 lessons: a commit message file is made fresh, and its subject read back
plugins bc9f611e (11-12) and ce1251cc9 (10-15) each shipped under
another change's stale message. Docs only.
2026-11-12 21:26:07 +08:00
yetone 55792628ac cli: magpie <agent> --help names the form that gives a tier its own model (KoiLx0 on X)
KoiLx0 could not find how to give Claude Code's opus tier a group of its
own. The CLI already does: `magpie claude opus <model>` (also sonnet,
haiku, fable; Claude Desktop the same; omp's roles as `magpie omp small
<model>`), and `<tier> default` puts it back on the main model. Only the
field list hinted at it, and a bare `magpie claude opus` sets the main
model. agentHelp now prints the form with the tiers or roles it takes.

Run (mote-run, sandbox HOME): a probe wired claude on group/opus, then
opus group/fast, sonnet b/gpt-5.5, haiku a/only-a wrote the three
ANTHROPIC_DEFAULT_*_MODEL lines; `opus nope/zzz` is refused ("not a model
magpie serves"); `--haiku x` is refused as an unknown flag. New
TestAgentHelpNamesTheTierForm, red with the help line switched off.
go test ./internal/cli ./internal/agent; vet darwin, linux nogui, windows.
Not tried: a real Claude Code session on the written tiers.
2026-11-12 21:16:10 +08:00
yetone cd6ab61370 provider: a local Ollama model's window is its Modelfile's num_ctx (maohy915 on X)
An Ollama provider's list (/v1/models) names no window, so every model
took models.dev's guess or the agent's default and had to be set by hand.
The list now asks each model's /api/show (8 at a time, 6s in all) and
takes the window from the Modelfile's `num_ctx` in "parameters", else the
architecture's model_info.*.context_length. The reply limit is a quarter
of the window up to 32K when neither models.dev nor the user says one.
Compaction follows the window, which Codex and Claude Code already hold
their threshold under. A window or Max output the user typed still wins
(windowIn, replyLimit); a model whose show fails keeps the list as it was.
Scoped to the "ollama" preset; Ollama Cloud is unchanged.

Run on mote: go test ./internal/provider ./internal/catalog ./internal/agent
ok; go vet darwin, GOOS=windows, GOOS=linux -tags nogui on internal/provider;
gofmt clean. New TestOllamaListGivesModelfileWindow (fake Ollama, user-set
window present) fails with the list hook commented out (Context:0).
Not run: full ./... suite before the tag, a real Ollama, Windows/Linux runs.
2026-11-12 21:09:26 +08:00
yetone e5ee114115 site: a WorkBuddy docs page in en, zh and ja
/docs/workbuddy says how magpie sets up Tencent's WorkBuddy: magpie's
models in ~/.workbuddy/models.json (or $WORKBUDDY_CONFIG_DIR), either
file shape, an entry's fields at /v1/chat/completions under magpie's key,
the custom-local:<id> picker per task and the restart WorkBuddy 5.6 can
need; the extra 200K context size and maxOutputTokens; what stays the
user's after WorkBuddy's own rewrite (models turned off, a NAS magpie,
typed reply limits, a default effort); WorkBuddy AI in ~/.workbuddy-ai,
WSL; and switching off. Each claim is from internal/agent/workbuddy.go.
Linked from each language's VS 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):
116 pass, 0 fail.
Not tried: WorkBuddy itself with magpie for this page; it names only
what magpie's source says.
2026-11-12 21:04:20 +08:00
yetone f5bd8710ac provider: Qoder's mover min is 0.2.67, whose total credits renew with the plan's (@tnt12231 on X)
Qoder 0.2.67 (npm has it, checked with npm view) gives the "Total credits"
window the plan's resetsAt. Routing reads no window set aside, so a Teams
account with plan + shared credits had no renewal and Smart put it behind a
WorkBuddy account renewing in 18 days. Plugin change and its test:
magpie-community/plugins bc9f611e (message there is wrong, see 7b42e404).

Run: mica-run go test -run 'Mover|Moved|Migrate|Qoder' ./internal/provider
ok; gofmt clean. Not run: the full suite, a real Teams account.
2026-11-12 20:54:34 +08:00
yetone 93e8e225ce lessons: 11-12, the eager-regexp guard red again, with the route guard
4519eea71 left two guards outside its packages red (fixed in
f97415bc0). Docs only.
2026-11-12 20:54:16 +08:00
yetone f97415bc0c gui: Report a problem's version line compiles on first use, and its route is named
4519eea71 (Settings › About's Report a problem) left main red on
ubuntu and macOS at d0a4e0be6 (run 43215704825) in two guards outside
the packages it ran:
- TestNoEagerPackageRegexps: feedback.go's osVersionRE was a
  package-level regexp.MustCompile; it is lazyre.New now.
- TestEveryRouteHasACommandOrIsNamed: GET /api/feedback had no command
  and wasn't in notYet. It is the window's own (it builds the block the
  About row copies), so it goes in notYet as W.

Run on mote at this tree: TestNoEagerPackageRegexps ok,
TestEveryRouteHasACommandOrIsNamed ok, internal/gui -run Feedback ok
(TestFeedbackBlockHoldsNoPrivateFacts), go vet of gui and cli plus
GOOS=linux nogui (cli) and GOOS=windows (gui) clean. Red before: both
guards in run 43215704825.
2026-11-12 20:53:53 +08:00
yetone a687f6b040 agent: a Hermes profile named in Chinese reads as its name, not u64cd-u4f5c (geekbb on X)
Hermes makes a profile's id from a non-ASCII name with slugifyProfileName
(apps/desktop hermes-bots/labels.ts): each non-ASCII letter becomes
-u<hex>-, so 个人数据管理 is u4e2a-u4eba-u6570-u636e-u7ba1-u7406. The
Agents list drew that id: "Hermes · u81ea-u52a8-u5316-u673a-u5668-u4eba".

A Hermes profile row (hermes#<id>, and the profile:<id> model field of the
connected Hermes) now reads the name Hermes keeps in the profile's
profile.yaml (ui_meta.hermes-bots.title, then display_name, the order its
Bots roster uses), else the id with those runs decoded: excel--u64cd-u4f5c-u5458
is excel操作员, test-u673a-u5668-u4eba is test机器人. A token below U+0080 or
not a letter or digit is left as written. The id (agent id, folder, `hermes -p`)
is unchanged; the row keeps its "Hermes · " prefix and layout. Every place
the name shows (GUI rows and subtitles, TUI, usage/sessions) takes Agent.Name,
so one change covers them.

Run: TestHermesProfileRowsReadAsNames with the reporter's six ids (red on the
old code: names stay the raw ids, broken by hand); go test ./internal/agent
./internal/library ./internal/usageapi ./internal/tui; vet darwin, linux nogui,
windows.
Not tried: a profile created in the real Hermes app (its source was read, not
run). A hand-named ASCII profile like "uface" (u + 4 hex) would also decode.
2026-11-12 20:47:42 +08:00
yetone 5a13482682 agent: dsh's settings section is compared as a tree, not as two Marshals
dshSettingsRoute marshalled the pi section before and after putting
magpie's routes in, to tell whether anything changed. On a real
account's sandbox (mote, ~/r2278) that was 12.75 MB of the first 45 s's
allocations, every start. The section is now copied, and the copy and
the edited tree compared field by field (yamlSame: every field Marshal
reads, not line and column). Only when the trees differ are both
marshalled, so a tag spelled out on one side still reads as no change.

Run:
- real-account sandbox, alloc profile at 45 s: w28 yaml.Marshal from
  dshSettingsRoute 12.75 MB, w30 none; total 547 -> 503 MB.
  settings.yaml's mtime unchanged (Nov 10) after the w30 start.
- mica: go test ./internal/agent ok (333s), go vet, GOOS=linux and
  windows vet; new TestYamlSameReadsWhatMarshalWrites.

Not tried: a settings.yaml whose section magpie does change, beyond
the existing dsh tests.
2026-11-12 20:46:57 +08:00
yetone 5d23ae8607 site: a VS Code docs page in en, zh and ja
/docs/vscode says how magpie sets up VS Code's own Chat (GitHub
Copilot Chat): the Custom Endpoint provider since Stable 1.122, with no
GitHub sign-in or Copilot plan; magpie's customendpoint group in
chatLanguageModels.json, each model at /v1/chat/completions with tool
calling on and magpie's token in requestHeaders, since an apiKey is read
from secret storage alone; chat.defaultModel for a new chat; every
profile, Insiders and portable builds; VSCodium's Marketplace Copilot
Chat 0.48.1 and its OpenAI Compatible provider (x-api-key, personal
Copilot plan, the product.json and chat.disableAIFeatures setup); what
picking VS Code's own model and switching off each do. Each claim is
from internal/agent/vscode.go. Linked from each language's Claude
Science 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):
116 pass, 0 fail.
Not tried: VS Code itself with magpie for this page; it names only
what magpie's source says.
2026-11-12 20:29:16 +08:00
yetone d0a4e0be6f lessons: a size budget is met, not raised, moves into the code standards
coreScriptBudget rose four times on 11-12 (d96403141, 05cadcafd,
4519eea71, 09e2eef0d), 1,089 bytes with nothing moved out, the third day
the budget lesson was seen (10-17, 11-10). Per LESSONS' rule it moves into
docs/code-standards.md as a row of "What a change contains". Docs only.
2026-11-12 20:11:44 +08:00
yetone 11a7e50bd4 gui: Add magpie for Cindy and the other apps opens their link on the host (Jealousy_Du on X)
In a browser tab (magpie web, or the app served to a browser) api("open")
always ran window.open in the viewer's browser, so a cindy:// import link
opened the viewer's own Cindy while the "added" status is read from the
host's Cindy database. App import links now go to /api/open and webHost
opens them with the host's system opener (openOnHost); http(s) links stay
the page's. Fixes Cindy, Lody, AionUi and Cherry Studio rows alike.

Run (mote, at this head): go test -tags nogui ./internal/gui ok; go vet nogui,
windows, darwin ok; gofmt clean; GUI import-web-host, import-row, click-scroll,
i18n-keys: 27 pass / 0 fail in chromium and in webkit.
Broken by hand: old app.js, new import-web-host test in chromium: red (the
page tried to launch cindy:// itself, no /api/open request). The Go test does
not compile on the old web.go (no openOnHost).
Not tried: a real remote host with a real Cindy; the old-code run in webkit.
2026-11-12 20:09:27 +08:00
yetone e9250203ae site: a Claude Science docs page in en, zh and ja
/docs/claude-science says how magpie connects Claude Science,
Anthropic's research app: it restarts the claude-science daemon (stop,
then serve --detached --no-browser on its port) with ANTHROPIC_BASE_URL
set to the gateway, and sets no variable for the user and writes no
file; the hand-run command (ScienceLaunch); https or loopback http only;
where the program is found; the Claude sign-in it still needs, which the
gateway never passes on, and the X-Anthropic-Surface: operon header;
claude-magpie-<number> aliases in its model menu; the keeper (restarts,
the window's own daemon, service managers, three retakes an hour); WSL
through wsl.exe with a socat relay under NAT; switching back. Each claim
is from internal/agent/claudescience.go, claudescience_wsl.go and
internal/gateway/science.go. Linked from each language's mu 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):
116 pass, 0 fail.
Not tried: Claude Science itself with magpie for this page; it names
only what magpie's source says.
2026-11-12 19:55:20 +08:00
yetone 09e2eef0d2 gui: the core script budget carries withScheme's 113 bytes (eachg0 on X)
6055f626e (v0.1.3899) fit the budget at fd9033cbf, but the base moved
under the rebase (a2feeb11a, 4519eea71) and TestCoreScriptBudget read
1264422 against 1264309. withScheme was already cut to one expression
and respellURL's /i flags dropped; nothing on the page has a plugin to
move to, so the budget rises by the 113 bytes over, as the entries
before it did. Run: TestCoreScriptBudget ok on mica.
2026-11-12 19:51:02 +08:00
yetone 6055f626e8 address: a scheme already typed is kept once, in any letter case (eachg0 on X)
Remote magpie and System One addresses got "http://" put in front by
several normalisers that each tested for "://" their own way, and one
saved "http://http://host" stayed that way until the address was deleted
and added again.

provider.WithScheme (new, internal/provider/scheme.go) is the one rule:
trim, add the default scheme when none is there, lowercase http/https,
and collapse a repeated http/https prefix to the innermost one. Path and
trailing slash are left as written; "host:3425/x?u=http://y" has no
scheme. It is used by provider.normalize (every provider URL, on read),
remoteMagpieEndpoints, DetectDecide, parseAddress and gui remoteAddr.
app.js has withScheme as its mirror, used by hostOf, localAddress,
vertexRoot and respellURL (whose gemini/openai regexes now match any
letter case).

Old data: an address saved with a doubled scheme is repaired when it is
read (provider.normalize for providers and System One addresses,
loadRemote for remote-magpie.json). The file is written out correctly on
the next save; nobody has to delete and re-add. Reading alone does not
rewrite the file.

app.js: the core script budget is met without a raise;
withScheme was cut down to fit (final package run after the rebase on fd9033cbf: gui and provider ok).

Run:
- go test ./internal/provider ./internal/gui ./internal/settings
  ./internal/cli on mote: ok, except TestCoreScriptBudget (284 over),
  fixed by shortening the JS and re-run alone: ok.
- gofmt -l, go vet darwin, GOOS=windows, GOOS=linux -tags nogui: clean.
- GUI on mica, chromium and webkit: scheme-once, local-address,
  custom-systemone-url, decide-endpoint-label, azure-endpoint, remote-*,
  i18n-keys, connect-address-kept: 158 of 164 pass; the 6 reds are
  "Remote magpie asks for the other magpie's address", red the same at
  origin/main 5e933e153 (#6099).
- add-sheet-custom, provider-fetch-again, provider-gemini: 14 of 54 red
  on mica, the same 14 at origin/main ab98228cc (#5232, #6209).
Red on the old code: scheme_test.go, remote_test.go (Go) and
scheme-once.test.cjs (withScheme undefined) were run against an
origin/main copy and failed there.

Not tried: the place that produced "http://http://" was not found by
reading (every guard used Contains("://")), so this hardens every
normaliser instead of one site; no real remote magpie was used; the full
GUI suite was not run.
2026-11-12 19:48:02 +08:00
yetone 7199afbb66 lessons: 11-12, the eager-regexp guard red a fourth day
36eebea13 (fixed in 10e783080) and 4028687b8 (af212c945).
2026-11-12 19:38:04 +08:00
yetone 10e783080a update: the urgent-release line compiles on first use
TestNoEagerPackageRegexps (root package) was red on main since
36eebea13: internal/update/behind.go:122 compiled urgentLine with
regexp.MustCompile at package level. Main's Test run 43201591823 (at
67f61bd78) failed on it on macOS and ubuntu. It now uses lazyre.New;
its one call is MatchString, which lazyre has.

Run on mote at origin/main f6c882ad7 + this: go test -run
TestNoEagerPackageRegexps . ok (red with the old line put back:
behind.go:122:18); go test ./internal/update ok; go vet of
internal/update, linux nogui and windows; gofmt -l empty.
2026-11-12 19:37:24 +08:00
yetone 17345f684f agent: Spotlight is asked once for every desktop app, and a stale answer never waits
After the Sessions caches dropped (five idle minutes), the next
/api/sessions/stats on `magpie web` took 2.3–4.1s on the real account
on mote while its handler ran ~220ms of CPU. Two goroutine dumps taken
1.2s and 1.8s into the ask both sat in ownSessionsOff → agentsHere →
agent.Detected → HasApp → desktopApp.version → spotlightBundles: one
mdfind per bundle id (13 of them, ~50ms each idle, far more under
load), serial under one lock, asked again whenever the 5-minute answer
expired. Every other agent.Detected caller (Providers, quit ask, gateway
pause, Sessions) paid the same.

- spotlightBundles asks one `mdfind -attr kMDItemCFBundleIdentifier`
  for every id desktopApps names, and keeps the answer by id. Past
  spotlightFresh a caller gets the kept answer at once while one
  goroutine asks again; only the first ask after start waits, once for
  every caller. A failed mdfind keeps the answer before it.
- agentsHere stops at the first detected agent instead of checking all.

Measured with the real account's data on mote, the Sessions stats ask
at 370s, after the drops (`magpie web`, sandbox HOME):
  main (w27)  2.3–4.1s in three runs earlier today; 1.34s in this run,
              while mote's load fell from ~180 to ~10
  this (w28)  0.77s at load ~170, then 0.046s
The rest of the 0.77s is the stats themselves being read again.
Tests: TestSpotlightParse; TestSpotlightOneAskStaleNeverWaits (10 reads
are one ask; a stale read returns while the refresh is held; two stale
reads are one refresh). On mica: go vet ./internal/agent ./internal/gui,
go test -count=1 -timeout 45m ./internal/agent ./internal/gui ok
(280s, 186s).
Not tried: Spotlight off on the Mac (mdfind fails; the answer is none,
as before); Intel Mac.
2026-11-12 19:36:52 +08:00
yetone a2feeb11a0 update: pick the update source by hand, Automatic, usemagpie.ai only or GitHub only (RootSir, Sakugar_ on X)
usemagpie.ai's download is slow for some users (Cloudflare R2) and GitHub
is the one that works for others. Settings > Network has an "Update source"
menu button under App updates' proxy (the app's menu, no native select):
Automatic (default, as before: the site, then GitHub when the feed can't be
reached), usemagpie.ai only, GitHub only. Settings.UpdateSource ""/site/
github, this computer's own (KeepOwn), in settingsapi.Keys and Choices so
`magpie settings set updateSource github` works; any other value is refused
on save. The menu loads from assets/updatesource.js, so app.js (at its
budget) grows by one line.

GitHub only: latestAt reads yetone/magpie-releases without asking the feed,
and download starts at the file's github.com address (mirror and GitHub's
API route as before), never the site. usemagpie.ai only: no fallback to
GitHub for the release (fallsBack) nor for a file (toGitHub, toAPI off).
Stable and a MAGPIE_UPDATE_FEED of your own keep reading the site's feed
whatever the source says (Stable's release list is only the site's; its
files still come from GitHub on GitHub only). Every source goes through
Release.verify: ed25519 signature against the embedded key, the version in
the signed text, each hash from the signed list; a release read from GitHub
must be signed whatever its version. The update private key is untouched.

Run (mote, tree before the commit): gofmt clean; go vet update/settings/gui,
GOOS=windows and linux vet of update; go test internal/update, settings,
settingsapi, backup, cli ok; internal/gui TestCoreScriptBudget, assets and
i18n tests ok. GUI: settings-update-source (chromium and webkit x en, zh,
zh-TW, ja, de x 1100 and 420px: three menu items, each pick saves updateSource
alone, tick, no overflow), settings-update-proxy, i18n-keys, i18n-en-no-cjk,
settings-*, gui-* ok except the 22 subtests (gui-de/ja "has every zh string",
settings-hints, settings-lines-wrap de 440, settings-search) that fail the
same on origin/main 5a3d73039 (#6234, #6073, #6156, #6133 are open for them).
New Go tests use a fake GitHub and a live fake site feed that count their
hits: GitHub only never asks the feed and downloads from GitHub, the site and
Automatic never ask GitHub, the site only never falls back (release or file),
GitHub only refuses wrong key, swapped sums, no/junk signature and an
unsigned old version, a custom feed is never overridden. Broken by hand:
without the githubOnly branch and the two download switches, 3 of them go red.
Not tried: the real github.com or R2, a Windows run, Stable with GitHub only.
2026-11-12 19:35:57 +08:00
yetone d99ebb371c gui: a provider's row says its accounts to test on, so "Test on account…" shows (tmr11235 on X)
d96403141 added "Test on account…" to a model chip's right-click, shown
when the provider row has testPicks, and added provider.TestPicks. The
row the GUI is sent (providerJSON in internal/gui/providers.go) never set
the field, so the entry never showed for any provider: tmr11235's ChatGPT
API with two ChatGPT sign-ins on v0.1.3884 has only Test this model, Copy
model ID and the image toggle. The GUI test fed a hand-made testPicks and
the provider tests called TestPicks directly, so nothing joined them.

providerJSON now carries TestPicks (p.TestPicks()).

Account kinds checked (TestPicks reads AccountsOn for any signed-in
provider, KeyList otherwise): API keys (first key and saved keys, off ones
left out); signed-in accounts and their also-on accounts of every sign-in
that AlsoOn lists: ChatGPT API's ChatGPT sign-ins, Codex and Claude logins,
Copilot, Gemini and Antigravity, plugin accounts. Read, not each signed in:
only keys are run as a row (new test); plugin accounts are covered by
TestModelTestPinnedToAnAccount; the ChatGPT API shape is in the GUI test.

Run on mote (load ~107 at the time, mica 128): go test ./internal/gui
./internal/provider ok; model-test-account (now with a ChatGPT API
provider with two accounts) and i18n-keys 14 of 14, chromium and webkit,
en zh zh-TW ja de; gofmt clean; go vet darwin, windows, linux nogui.
Broken by hand: with TestPicks left out of the row,
TestProviderInfoSaysTestPicks fails ("two keys on: testPicks []").

Not tried: the live app with two real ChatGPT sign-ins. The GUI test serves
a fixed /api/providers, so it is not red on the old code; the Go row test
is the guard. The other model-* and provider-* GUI files not rerun (a Go
field the page already reads).
2026-11-12 19:35:07 +08:00
yetone fd9033cbfd library: a synced skill keeps its library group (ConatusMoon2222 on X)
Cause. A skill's group is traced (tracer.repoOf) from files that belong to
one computer: the skills CLI's lock, a git checkout, CC Switch's record,
and Skill.From noted by an install-again or Group again. The sync bundle
carried none of it (CarriedSkill had Source, not From), and Put built every
skill as a new Skill, so the other computer had nothing to trace and put
the skill under "this computer". Group again only fetches repositories some
skill is already traced to, so with no skill traced it had nothing to start
from; and where it did group, the next sync's Put wrote the skill new again
and took it back out.

Change. Collect carries the traced repository as CarriedSkill.From for a
skill with no source of its own (none, or a folder). Put writes it as
Skill.From. When the bundle has none (made by a magpie before this), Put
keeps the From this computer already found for the same skill, and keeps
Skill.Gone ("kept on this computer only") for one with the same source.

Old data. Skills synced before this stay in "this computer" until one of:
the computer that has the trace updates and syncs (its bundle then carries
From, and Put applies it here), or Group again here, which works as soon as
one skill of the pack still names the repository (a skill installed from
GitHub carries its source); the result now survives later syncs. A pack
with no skill traced anywhere on the receiving computer has nothing to start
from there until the first computer has synced with this version.

Tests (library/carry_from_test.go), each red on the old code:
TestSyncedSkillKeepsItsRepo (lock-traced skill A -> B -> C),
TestSyncKeepsRepoFoundHere (old bundle, From found here kept),
TestRegroupAfterOldSync (old sync, Group again, then the same bundle
again). Broke Put's From by hand: first two go red.
Run on mote: go test ./internal/library ./internal/davsync ./internal/backup
./internal/gui ok; Library GUI files in chromium and webkit (see below).
Not tried: two real machines through S3 (the fake-S3 davsync tests pass);
a copy Group again bound to its repository is still unbound by a sync from
a computer that has it unbound (filed).
2026-11-12 19:33:39 +08:00
yetone ab98228cc1 redact: Cloudflare's tokens and keys are masked by default (eiyuuzaki2333 on X)
Formats from Cloudflare's docs (fundamentals/api/get-started/token-formats
and /ca-keys): the scannable prefixes cfut_ (user token), cfat_ (account
token), cfk_ (Global API Key) and cfoat_ (Wrangler OAuth), each 40
characters and a checksum; an Origin CA key, which always starts v1.0-
(two alphanumeric runs split by a hyphen); a tunnel token, base64 of
{"a":..,"t":..,"s":..} so it starts eyJhIjoi (the docs show only that
head). The X-Auth-Key and X-Auth-User-Service-Key headers are masked
whatever the value looks like. The unprefixed older token (40 letters) and
Global Key (37-45 hex), and an R2 Secret Access Key (64 hex), have no
shape and were already masked under their names (CLOUDFLARE_API_TOKEN,
AWS_SECRET_ACCESS_KEY); the test pins that. An R2 Access Key ID is an id
and goes as written by design (TestIDsGoAsWritten), so it is not masked.
The checksum's length and alphabet aren't documented, so the prefixed rule
takes 40 or more of [A-Za-z0-9_-]. The origin CA hex split is not in the
docs; the rule takes alphanumerics.

Docs: the masking page (en, zh, ja) and llms-full.txt list them.

Run (mica, mote was loaded): go test -count=1 ./internal/redact ok;
gofmt; go vet darwin, linux nogui, windows. The new tests were red on the
old code for every prefixed, Origin CA, tunnel and X-Auth-Key case, and
keep SHA-1/SHA-256/MD5 hex, a base62 string, v1.0-beta, a bare prefix, an
R2 id and a JWT header unmasked.
Not tried: a real Cloudflare token (fake values in the documented shapes);
the full suite and GUI suite (no GUI file touched).
2026-11-12 19:31:43 +08:00
yetone 4519eea711 gui: Settings › About has Report a problem, which copies the details and opens the feedback post (River_WLan on X)
A user who hit a problem had to work out what to tell us. Settings ›
About now has a Report a problem row with an Open button: it copies a
short block to the clipboard (magpie version, OS name and version,
architecture, and whether this is the app or the browser page), says it
was copied, and opens the feedback post
https://x.com/magpie_router/status/2119861020978188499 so the user can
paste it in a reply. GET /api/feedback builds the block and the URL.

The block holds no account names, keys, paths, host or user names, and
nothing is put in a URL: the opened address has no query or fragment.
The TUI has no Community links, so it gets nothing here. The core script
budget is raised by 458 bytes for the row and its translations
(1,263,851 to 1,264,309 with the provider commit under it).

Run, on mica: new TestFeedbackBlockHoldsNoPrivateFacts (version, OS,
arch, surface; no home dir, host or USER; URL with no ? or #; macOS
version present; unknown surface becomes app) and about-report.test.cjs
(clipboard gets the block, /api/open gets the post URL with no
diagnostics), chromium and webkit, en zh zh-TW ja de, widths 1100 and
420, 40 of 40 with about-website; vet on darwin, windows and linux nogui
clean. Broken by hand: a "Home:" line added to the block turns the Go
test red. A loaded run of the About files plus gui-de/ja/zh-tw and the
i18n files had 40 reds in usage and picker files; the reachable ones
were run alone on origin/main 5e933e153 (see the provider commit under
this one: usage-hidden-way-back #6295 and usage-agents-hide #3414 are
red there; the rest pass alone).

Not tried: the Linux app (WebKitGTK) and Windows; the clipboard write in
the Wails webview rather than a browser.
2026-11-12 19:31:11 +08:00
yetone 05cadcafd4 sync: a provider can stay only on this device (treydtw on X)
Providers sync between computers (WebDAV, S3, GitHub), so a model served
from one machine's localhost reached the others, where it can't be
reached. A provider now has "Only on this device": sync neither sends it
out nor lets a copy from another computer replace or delete it.

Provider.ThisDevice is set from the provider row's right-click menu
(Only on this device, a check when on) or `magpie provider this-device
<id> yes|no`, over POST /api/provider/thisdevice. davsync's collect drops
those providers and their order entries (provider.SyncedOnly); Mirror
skips an incoming copy of one and keeps the local ones; Restore keeps a
local mark. A normal editor save keeps the mark. File backups still carry
the provider with its mark.

Default is off for every provider, localhost included. A 127.0.0.1
provider is also what another computer runs for its own copy of the same
local server, and default-on would remove those copies on their next
sync; a LAN address is reachable from the other computers. Turning it on
at one computer removes the synced copy at the others on their next sync.
docs/subsystems/sync-backup.md says so.

The menu item gives no toast: its check mark is the answer, which also
keeps the core script budget at +151 bytes (1,263,700 to
1,263,851).

Run, on mica: new davsync TestProviderOnThisDeviceStaysOnIt (two
computers over a fake DAV) and this-device.test.cjs (chromium and
webkit, en zh zh-TW ja de, widths 1100 and 420); provider-find updated
for the new menu entry; davsync, provider, backup, cli, gui Go packages
ok except TestCoreScriptBudget, then fixed; vet on darwin, windows and
linux nogui clean. Broken by hand: SyncedOnly made a no-op turns the
davsync test red ("a sends its own model out"), and the Mirror skip
removed turns it red ("b after a's model synced"). GUI files that fail
in a loaded run (claude-quota-onboarding, provider-find, skill-fold-all,
usage-agents-hide, usage-cards-hide, usage-hidden-way-back) were run
alone on origin/main 5e933e153: usage-hidden-way-back (#6295) and
usage-agents-hide (#3414) are red there too, the rest pass; this branch
gives the same result. gui-de and gui-ja "has every zh string" are red on
5e933e153 as well.

Not tried: a real WebDAV/S3/GitHub server between two real computers;
the CLI command has no test of its own.
2026-11-12 19:31:11 +08:00
yetone 96f8726ed1 docs: how to verify a download's GitHub Actions attestation (ArcticLampyrid on X)
README (en, zh) and the start page's FAQ (en, zh, ja) give
'gh attestation verify <file> -R yetone/magpie-releases', say it holds from
v0.1.3891 and names the magpie-releases repo, not the source commit, and say
the updater keeps its own ed25519 check (offline, R2 mirror). Not adding
in-app Sigstore verification: it needs a TUF-fetched trust root and a bundle
per file, which breaks offline and mirror updates.

The workflow change is yetone/magpie-releases 9213fbd. Run: site/*.test.mjs
on mote (llms-full.txt regenerated, worker.test.mjs green). Not tried: the
attestation itself until v0.1.3891's run.
2026-11-12 19:30:45 +08:00
yetone f6c882ad77 site: a mu docs page in en, zh and ja
/docs/mu says how magpie sets up mu (qybaihe/mu, npm's mu-agent and
the mu desktop app), which is Pi with a judgment kernel: Pi's
settings.json (defaultProvider, defaultModel, defaultThinkingLevel) and
models.json (the provider magpie) in ~/.mu/agent; that this counts as
mu setup done; its own magpie-mu key, since its requests say pi/; the
folder variables (MU_AGENT_DIR and three more), ~/.kyrn as its old
name, and maildir-utils' mu not taken for it; mu.json and MU_JUDGE left
alone; switching back. Each claim is from internal/agent/mu.go and
piLikeKeyed in internal/agent/agents.go. Linked from each language's
Mister Morph 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):
116 pass, 0 fail.
Not tried: mu itself with magpie for this page; it names only what
magpie's source says.
2026-11-12 19:21:10 +08:00
Flandern1211 5e933e153a agent: ZCode gets a Restart when magpie's models change while it runs (Flandern1211 on X, #5662)
ZCode reads its providers at start. Its Agents row now offers Restart for a
model list magpie changed while the app runs, as Claude Desktop's, WorkBuddy's
and OpenMausBot's do: restartApps has ZCode.app (dev.zcode.app) and
ZCode.exe, appReads covers config.json and provider_config.json, and
zcodePart hashes only magpie's provider, provider rule and model rules,
without the key or another provider's rules.

Patch by Flandern1211 (fork branch fix/zcode-restart-5662, 7b663fea9), read
line by line: three files in internal/agent, no network, credential, dependency
or .github change. Kept as written; this commit only adds the Restart line to
docs/subsystems/agent-wiring.md.

Run (mote, at this tree on origin/main 5a3d73039):
- TestZCodeRestartOnWindows red with the zcode restartApps entry renamed away
  by hand ("behind: <nil>"), green with it.
- go vet darwin, darwin nogui, linux nogui, windows on internal/agent: ok.
- GUI agent-app-restart, restart-app, agent-notice-lang, agents-last-known in
  chromium and webkit: 100 of 100 pass.
- internal/agent package: started, result follows in the tag's suite record.
- gofmt -l: clean.

Not tried: a real ZCode on macOS. dev.zcode.app is the patch's bundle id and
could not be checked here (no ZCode.app on the Macs); a wrong id leaves the
Mac row without a Restart, as before, and does not close anything. Real
Windows ZCode.exe was reproduced by the author on 3.17.2, not by me.

Co-authored-by: Flandern1211 <163982805+Flandern1211@users.noreply.github.com>
2026-11-12 18:59:53 +08:00
yetone e2114780ab lessons: a test never swaps time.Local
From the race 4028687b8 brought to main (af212c945); #2949 and #4360
are the same class.
2026-11-12 18:59:09 +08:00
yetone af212c9454 tests: memory's date test holds its own zone, not time.Local
TestMemorySearchDatesInLocalTime (4028687b8) set time.Local to +08:00.
time.Local is read by every time.Now, so the swap raced an http conn
goroutine an earlier test (serveMTLSGateway) left finishing: main's Test
run 43194740198 at 727e23637 went red on macOS -race with a DATA RACE
on time.Local, memory_mcp_test.go:262 against net/http setState.

Now no test touches time.Local here:
- memoryStamp writes in memoryZone(), time.Local by default, a variable
  the gateway test sets.
- The half that checked a new save keeps its zone moved to memory's own
  TestSaveKeepsTheLocalZone, which holds memory's clock (now) at 04:30
  +08:00 and reads "+08:00" back from memory.json.

Run on mote: go vet ./internal/memory ./internal/gateway, linux nogui
and windows vet of both; go test ./internal/memory ok;
go test -race -count=3 -run ^TestMemory ./internal/gateway ok; gofmt -l
empty. Broken by hand, each red: Save's now() as now().UTC() fails
TestSaveKeepsTheLocalZone; memoryStamp in time.UTC fails
TestMemorySearchDatesInLocalTime ("2026-11-10T20:30Z").
Not run: the full gateway package (the race needs a leftover goroutine
from another test, so it isn't reproduced on demand; the swap that it
raced on is gone). Same class still open: #2949 (TestHeldClock) and
#4360 (testenv.Zone's cleanup), which swap time.Local too.
2026-11-12 18:58:43 +08:00
yetone 45dfdd9985 gateway: a conversation stays with who answered it for 30 days, 4096 kept (npikng161274 on X)
stickKeep was 24h and sticksKept 512. A long task picked up again after a
weekend lost its binding, the request went to another provider, and that
one refused the reasoning the first had sealed (invalid_encrypted_content).
Every answer already renews a binding, so only a gap over the keep let it
go. stickKeep is now 30 days and sticksKept 4096. No setting: the larger
default fits every case. Docs line in gateway-routing.md updated.

Run: TestStickSurvivesDaysAway (a 4-day-old binding saved and read back)
is red on the old 24h value ("a 4-day-old binding was lost") and green
now. Stick/Affinity/Sticks-named tests in internal/gateway pass via
mote-run; gofmt -l clean.
Not run yet: the full internal/gateway run and darwin/linux/windows go vet
were still going when this was pushed; results follow in a later commit
or note. Not tried: a real multi-day session. No GUI files touched.
2026-11-12 18:58:25 +08:00