love1sbug on X found Names in agents' lists seemed to do nothing. Claude
Code and Qwen Code follow it now; a sweep of every agent in a sandbox
HOME (each set to one relay model, the setting switched, the files
compared) found the rest that follow it, and those that can't:
- handed the models' ids alone, their formats having no name for one:
Goose, jcode, Hermes Agent, Reasonix Studio, AtomCode, fx, Antigravity
CLI, AstrBot, Mister Morph;
- with no list of magpie's models: Gemini CLI, Snow CLI;
- reading the gateway's /v1/models themselves, whose display_name is the
name alone on purpose (a remote magpie relies on it): Empryo, Cursor
Private Inference.
Those carry agent.NoNames (copied to an agent in WSL), sent to the GUI
as noNames. Where the setting is offered (Settings › Provider in model
names, Routing's Names in agents' lists, a provider's Names & levels) a
line names the connected ones: "Changes nothing in Goose, Hermes Agent:
magpie's names don't reach their model lists", in every language. With
none connected nothing is said, so the Settings row keeps no line under
its name (1ooogle on X, model-suffix-own's check). A page drawn before
the agents are read (Routing, an open provider editor) says it once they
are (redrawNoNames, beside redrawSuffix).
name-suffix-no-names.test.cjs checks the three places in chromium and
webkit, en/zh/zh-TW/ja/de, at 900px and 390px with no sideways scroll,
that an agent not connected or following it isn't named, that none
says nothing, and, with /api/state answered 1.5s late, that all three
still say it. On the old assets 12 of the first 13 chromium tests fail;
the late case failed on this commit's first version too (found when a
loaded run failed the editor's case; reproduced with the injected delay).
Run: that test and i18n-keys, gateway-mode, model-suffix-own,
name-suffix-remote, name-suffix-saved, name-suffix-where-named,
settings-general/groups/search/sections in both engines; go
test -tags nogui ./internal/agent ./internal/gui ./internal/provider ./internal/gateway (before the rebase);
gofmt -l; go vet darwin/linux/windows. With 11 files at once at load
80-120, webkit failed once on this test's "no page errors" check (ja
900px, the late case) beside settings-sections' "Settings in parts";
not reproduced in 3 runs since (10 files, then 8 copies at once), and
the errors weren't kept.
Not tried: the GUI against a real magpie with Goose connected.
What: every place magpie looks for installed apps outside the home folder
now goes through proc.SystemDirs, which in a test binary testenv isolated
puts the path under the test's home (as it already does for Homebrew's
bin, #1525):
- agent: a new macAppFolders(home) (/Applications via SystemDirs, plus
~/Applications) is used by appFolders (desktop apps: Codex, dsh),
pencilApp, t3App and reasonixDetected;
- cursorLocalRoots: macOS through macAppFolders, Windows' ProgramFiles and
Linux's /opt, /usr/share, /usr/lib through SystemDirs;
- zedAppPath's /Applications/Zed*.app, npmGlobalPrefix's ProgramFiles npm
fallback, and provider's /Applications/ZCode.app builtin config.
Production behaviour is unchanged: SystemDirs returns paths as they are
outside a sandboxed test.
Why: HasApp/AppVersion read the real /Applications, so on a Mac with
DeepSeek Harness.app the dsh fixture's CLI was never "missing" and the test
failed every time; CI has no such app, so nobody else saw it. The same
shape was in five other readers.
Test: TestAppFoldersStayInTheTestHome checks every app folder lies under
testenv's home (all OSes), and on macOS that an app installed in the
sandbox's /Applications is the one found.
Run (go1.26.8, sandbox HOME, private GOCACHE):
- repro on old code: appFolders pointed at a temp folder holding a fake
"DeepSeek Harness.app/Contents/Info.plist" (com.deepseek.dsh) ->
TestAsideOfflineDisconnectRestoresWithoutDaemon FAIL "native fixture must
report missing CLI".
- break check: macAppFolders put back to the literal /Applications ->
TestAppFoldersStayInTheTestHome FAIL (appFolders, macAppFolders,
cursorLocalRoots look in /Applications; sandbox app not found). Restored:
pass.
- gofmt -l clean; go vet ./... (darwin), GOOS=linux go vet -tags nogui
./..., GOOS=windows go vet ./...: clean.
- go test -tags nogui ./internal/agent ./internal/proc ./internal/provider: ok.
- -race -count=5 on the touched agent tests: ok.
Not run: the full go test ./...; Windows and Linux test runs (vet only);
reasonix's Windows registry lookup and Zed's mdfind fallback still ask
the machine (not folder paths) and are left as they are.
Reported-by: mdwsk88
The gateway takes gateway.Token, and the keys that name an agent
(gateway.TokenFor), only from loopback. When MAGPIE_ADDR pins the
gateway to an address beyond loopback and sharing is on, keyAt gives the
LAN sharing key, and most writers use it. T3 Code's instance still wrote
gateway.Token, so every call it made got 401. Air's and OpenChamber's
Checks compared against gateway.Token, so they said the wiring Sync had
just written was off.
The same mistake was in every writer that pairs gateway.URL() or
gatewayV1() with a fixed token:
- agy, Alma, Cindy, Claude Desktop, Copilot for JetBrains, Cursor's
local agent, OpenHanako, Pencil, VS Code / Insiders / VSCodium,
WorkBuddy-family models.json, ZCode (both files), Zed's credential,
Aside's provider, and the legacy Claude token rename.
- Fix: these now take agentKey(agent) or hereKey(), which are keyAt and
agentKeyAt for gateway.URL(). On loopback they are unchanged.
- Alma re-keys a provider that holds any of magpie's keys other than the
one it should have now.
- WorkBuddy and Aside also count the new key as theirs.
- ZCode treats a saved address equal to the pinned gateway as this
machine's, not another magpie's.
What was run:
- New tests: TestT3CodeKeyBeyondLoopback and
TestAirAndOpenChamberChecksTakeTheKeyForTheGateway (from the
reporter's patch), and TestPinnedGatewayKeyForEveryWriter, which covers
the other writers.
- With the product files reverted, all three are red. The T3 token reads
"magpie", and each of the 11 writers shows its old key. They are green
with the fix.
- go test -tags nogui ./internal/agent/ is green.
- gofmt -l and go vet are clean on darwin, linux and windows.
Not tried with a real T3 Code, Air, OpenChamber or a real pinned
MAGPIE_ADDR on a second machine.
A Chinese window said "ZCode 已接入 magpie. ZCode reads its providers at
start-up — restart ZCode …": the notice an agent gives after a change
(state.notice) was English text written in place in each agent's file, and
i18n.js had no entry for any of them.
What changed:
- internal/agent/notice.go: a notice is a template registered with
newNotice ("Restart {agent} to …"), filled with say(kv...); Notices()
lists every one. All the agents' notices (claude, codex daemon, zcode,
agy, cursor-local, wsl, AstrBot's added today, …) are now such templates, the issue's list
being a sample of them.
- i18n.js: every template has a zh, zh-TW, ja and de translation, and
NOTICES lists them. tNotice() reads a notice of several joined: longest
template first, a {slot} never runs over a sentence's end, and a notice
with any part that has no template (a plugin's own) reads as given
rather than half in each language. withNotice() joins the status line
and the notice with 。 in zh/ja.
- app.js: the six places that showed state.notice use withNotice.
Tests:
- TestEveryNoticeIsTranslated: every Notices() template is in NOTICES and
in each language table, with the same slots. Fails with the zh ZCode
line deleted from i18n.js (tried).
- TestNoticesAreTemplates: an AST scan for English written in place as a
Notice. Fails with zcode.go's literal put back (tried).
- tests/agent-notice-lang.test.cjs: every template, filled, alone and
joined, plus a plugin's notice, and connecting ZCode as the reporter
did; en, zh, zh-TW, ja, de at 1100 and 420px, Chromium and WebKit:
22/22. Its zh subtests fail without the zh line.
Run: go test -tags nogui ./internal/agent ./internal/gui; gofmt -l;
GOOS=linux and GOOS=windows go vet -tags nogui ./internal/agent
./internal/gui; the full GUI suite (node --test, both engines, -concurrency 6,
machine load ~140): 5130/5195, 64 failing in 22 files. Rerun alone, 16
files pass; mobile-web, old-webkit, panel-usage and routing-context/
group/keys-fold fail the same on the base commit, b6a263b9.
go test -tags nogui -timeout 40m ./... on the rebased tree: every package
ok but internal/gateway, whose TestQueuedStreamKeptAliveForTheMinute hit
its 1.5s read deadline at a machine load of ~130; it passes -count=3 run
alone, and this change touches nothing it runs.
It was found only by a product.json naming it in one of the apps
folders (on Windows %LOCALAPPDATA%\Programs, %LOCALAPPDATA%, Program
Files). Its 3.24.9 Windows user setup (CursorUserSetup-x64-3.24.9.exe,
from the cursor-local download) installs flat - resources\app\
product.json beside "Cursor Private Inference.exe" - into whatever
folder the installer is given, so one put on another drive or folder
was never found, and Routing still showed requests from it while the
Agents page had only Cursor. On Linux the build is only an AppImage
(Cursor_Private_Inference-3.24.9-x86_64.AppImage), a single file that
no product.json lookup could find.
findCursorLocal now also takes the folders Windows' uninstall entries
name for "Cursor Private Inference (User)" (cursorLocalInstalls: HKCU
and HKLM, InstallLocation, else DisplayIcon's folder), and an AppImage
named for the build in the Linux apps folders plus ~/.local/bin, ~/bin,
~/Downloads and ~ (regular Cursor's Cursor-<v>-x86_64.AppImage isn't
taken).
Run:
- TestCursorLocalFoundWhereInstalled fails with each half removed by
hand ("installed in a folder of the user's: found \"\"", "its
AppImage: found \"\"") and passes with the change.
- On the Windows 11 box: the real 3.24.9 user setup installed silently
into C:\Users\yeton\cpi-1254\app; a probe test in the cross-built
agent.test.exe found nothing with the old lookup and found
"...\app\Cursor Private Inference.exe" (detected: true) with the
new; TestCursorLocal* pass there. The copy was uninstalled after.
- go test -tags nogui ./internal/agent under a temp HOME; go vet
(darwin, GOOS=linux and GOOS=windows, nogui); gofmt -l clean.
Not run: the AppImage on a real Linux desktop.