1ccacad63281094de8a3372d5a507d38f9969e5c
329
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1ccacad632 |
agent: Obsidian is listed only when a vault has Copilot (iEthan333 on X)
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.
|
||
|
|
f5e1b10913 |
settings: longest context can hold a model's own window too (WJaunita45604 on X)
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.
|
||
|
|
aa2ea5c906 |
agent: Claude's main model is written as a tier alias, so Claude Desktop on a subscription no longer sends magpie's prefixed id (iryan_sun on X)
Claude Desktop's Code tab sets CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST=1. Claude
Code then ignores the env block of settings.json (base URL, token, tier model
vars) but still honours the top-level `model`. magpie wrote `model` as the
provider-prefixed id (anth/claude-opus-4-7), so the official API rejected it
and WebFetch failed.
writeTiers now writes `model` as the tier alias (opus/sonnet/haiku/fable, with
[1m]) whose ANTHROPIC_DEFAULT_<TIER>_MODEL already maps to the main model, on
this machine's ~/.claude only. A distro file, the claude-magpie launch file and
a main with no tier keep the id. The model field reads the alias back through
the tier env, also while the gateway is unreachable (drift). Unwire drops
`model` when magpie wrote the alias.
What happens to old values: a settings.json an older magpie wrote with the
prefixed id (model "up/big-x") is rewritten to the alias at the next catalog
sync, for every user, with no step on their side; the tier env already maps it
to the same model. A prefixed id picked from the modelPicker rows is brought to
the alias the same way. A model the user set themselves (claude-haiku-9,
own/xyz, opusplan) is never rewritten.
Ran:
- Real Claude Code CLI (~/.local/bin/claude) in a sandbox HOME and
CLAUDE_CONFIG_DIR, wired by a magpie built from this tree (gateway :38760)
to a scripted upstream that logs each request's model: main -> big-x,
`--model haiku` -> fast-x, a subagent (Agent tool) -> sub-x, WebFetch's
extraction of https://example.com -> fast-x (haiku's). Old prefixed file
migrated to "sonnet" by a catalog sync; the three user models above stayed.
- TestClaudeMainModelIsAnAlias: red on the old code, red again with mainWord
broken by hand, green with the fix; it also covers the user's own models.
- 11 existing tests read the raw `model` as an id; they read it through
writtenModel now. TestWSLClaudePick compares the distro's file with the
native one after normalising `model` (the distro keeps the id by design).
- go test ./internal/agent ok at the pushed head; gofmt; go vet darwin, linux
nogui, windows for internal/agent.
- internal/cli: TestGatewayKeyLimitCLI is red on origin/main
|
||
|
|
d1b4eff5aa |
agent: version detection and updates for agents installed in WSL distros (mewcoder on X)
A WSL twin row (<kind>@wsl:<distro>) showed no CLI version and no Update button; the host path's cliupdate machinery only knew host binaries. Now a twin in a running distro is read and updated inside the distro, for every cliSpecs kind that has a command (cliupdate_wsl.go): - one `wsl.exe -d <distro> -e sh` probe prints the command's real path, --version and exit code, with its own folder, npm prefix, ~/.local/bin and ~/.bun/bin first on PATH (wsl.exe -e has no login PATH, node CLIs exit 127); kept 10 min in wslProbes, dropped by Rescan and after an update. - wslHowInstalled applies the host rules to the Linux path: own updater (spec.self), Homebrew, npm, bun, pnpm; volta, yarn and unwritable prefixes are left alone. - the update runs in the distro through wsl.exe (wslRunUpdate); a Linux brew's newest is asked in the distro too. - a stopped distro is never started: no version, and an update says to start it. CLIs() lists twins, so Update all takes them in. No GUI change: the Agents row is keyed by agent id. Run: gofmt clean; go vet darwin, linux, windows on internal/agent; go test ./internal/agent ok on mote. TestWSLAgentCLIVersionAndUpdate (fake registry + fakeWSL distro with an nvm prefix) goes red with the CLI hook removed from CLI(). Real: win-run on xiaomi-gpu, magpie-desktop's own codex read 0.162.1, Update true, updated to 0.167.1. internal/gui on mote: only TestPanelHiddenByWailsMarksPageOutOfSight failed (AppKit test killed at 120s, mote load ~80; no GUI file touched). Not tried: real brew in a distro, proxy env inside the distro, sudo-owned npm folders, kinds without a bin (Goose, mu), starting a stopped distro. Host's proxy settings are not carried into the distro. |
||
|
|
7476328901 |
settings: one longest context for every model (WJaunita45604 on X)
Settings > Models > Routing has a Longest context field (magpie model context-cap [<size>|off], POST /api/settings/context-cap). It lowers every model's window to it, so a user need not set each model. A window the user set on a model, or on its provider with "*", wins and is not capped; a model whose window is unknown stays unknown. It is applied where the window is derived, provider.windowIn, so /v1/models, every agent's catalog, group windows and the compaction thresholds that follow the window all agree. Codex's own models take it through CodexNativeWindow, CodexWindow and codexcat.Cap on the list the gateway serves; the list's ETag carries the cap so Codex asks again. The provider editor's Listed value stays the vendor's. Run (mote): provider, codexcat, cli, settings, settingsapi, gateway tests; GUI context-cap, model-load, settings-places, i18n-keys, settings-general in chromium and webkit (en, zh); TestCoreScriptBudget; gofmt; vet on darwin, linux nogui and windows. Broken by hand: windowIn without the cap turns TestContextCapHoldsEveryModelButTheOnesTheUserSet and TestModelsListContextCap red. Not tried: the whole GUI suite (one row added to an existing list, no new API read on page load), a real Codex reading the capped list, Windows run. Not covered: Claude Code's own [1m] choice (claudeRunName) and agent/claude.go's fallback when a ref has no window. |
||
|
|
0cc91af3db |
agy: magpie's models go in a settings file of its own, so agy's remote control works (baysonfox on X)
magpie wrote modelProvider gemini, the model and its custom models into agy's settings.json. That made every agy an API-key session: no Google account, so no remote control (needs the sign-in plus Google's server-side flag), and a plain agy asked for GEMINI_API_KEY too. Now they go in ~/.gemini/antigravity-cli/magpie-settings.json, handed to agy as --settings for the one session (the launch command, magpie agy run, and the function in a shell or a WSL distro). settings.json stays the user's. An older wiring is given back (stashed model and provider) at the next Sync or pick. agy remote-control and --remote-control run plain, on the sign-in. Run (mote): go vet, GOOS=windows and linux nogui vet, agent/cli/sessions/update packages (see push note). Real agy 1.5.3 in a sandbox HOME: plain agy with the user's untouched settings.json now asks for sign-in (no GEMINI_API_KEY error); the new launch reached a stub gateway at /v1beta/models/<m>:streamGenerateContent. Broken by hand: remote-control bypass removed, TestAgyRun red; TestAgy red on the old code (settings.json written). Not tried: real remote control (needs a Google sign-in, none in the sandbox); signed-in BYOM custom models; Windows PowerShell function run. |
||
|
|
90a028d2c1 |
air: JetBrains IDEs get a Magpie agent for each running WSL distro (yanghonghang on X)
IDEA 2026.3 starts a WSL project's ACP agent inside the distro through EEL.
An absolute Windows command whose environment differs from the project's is
refused ("ACP executable belongs to a different environment"), which the AI
Assistant shows as "Magpie does not run". The host entry in ~/.jetbrains/acp.json
therefore never worked for a WSL project.
Now each running distro that has opencode gets its own "Magpie (WSL <distro>)"
entry: command is the distro's opencode as a \\wsl.localhost UNC path (the
WSL descriptor, accepted), env OPENCODE_CONFIG points at a magpie-opencode.json
written in the distro's ~/.jetbrains. Set, Sync, Check and the uninstall path
all reach the entries; a stopped distro is never started. The probe now
records the binary paths (distro.Paths).
Ran: mote-run go test -run 'TestAir|TestWSLProbeKeepsPaths' ./internal/agent
(ok), the same on win-run and wsl-run (ok), gofmt, GOOS darwin/linux/windows
go vet ./internal/agent. Broke by hand: turning the WSL branch off in airAt
turns TestAirIDEAddsMagpieAgentForWSLProjects red.
Not tried: a real JetBrains IDE (none on the Windows box); the EEL rule was
read from the IDE's bytecode.
|
||
|
|
bf0a1252fa |
codex: the chat open in the Codex app follows a provider switch (hubo31377762 on X)
Switching Codex between magpie and OpenAI left the chat that was open unusable. The Codex app holds the writer lock of every chat it has loaded, so no move touched that chat's row, and Codex 0.167 refuses to resume a chat whose provider isn't the configured one (modelProviderMismatch openai to magpie, modelProviderNotConfigured magpie to openai). Reopening it did not help. Just before magpie ends the Codex app's app-server for the route change, the held chats are now moved to the provider Codex is on: a paginated one by its row, a legacy plain rollout in place at equal id length (openai and magpie), packed legacy rollouts and other lengths left to the next sync (provider.CodexBeforeAppEnd, agent.codexRetagOpenThreads, sessions.RetagLoadedCodexThreads). The end is a clean SIGTERM and Codex writes nothing back. Run (mote-run): gofmt -l on the three packages; go vet for darwin, windows and linux with nogui over ./internal/...; go test internal/sessions, provider and agent. Real codex 0.167.1 app-server in a sandbox CODEX_HOME, both ways: no retag gives modelProviderMismatch (openai to magpie) and modelProviderNotConfigured (magpie to openai); with the row retagged and the app-server SIGTERMed, thread/resume succeeds on the new provider in both. Broken by hand: the hook call removed and the retag call emptied; both new tests go red (open chat stays on the old provider, order is [end] only). Not tried: the Codex app GUI itself, Windows runs, a packed legacy thread held open (left to the next sync). A resumed thread's sandbox falling back to config.toml's default happens with no provider change and is #6028. |
||
|
|
1d41799f2a |
agent: turn off every agent's telemetry from Settings › Privacy (OipsAnthony on X)
OipsAnthony on X: "magpie 设置 - 隐私,支持统一关闭所有 Agent 的遥测功能, 这个统一管理的地方优先级最高". v0.1.3562 gave Codex, Claude Code, Gemini CLI and Qwen Code a Telemetry row each; there was no one switch for all. Settings › Privacy now has "Turn off telemetry for all agents" (settings.AgentTelemetryOff, POST /api/settings/agent-telemetry, agent.SetTelemetryAll in internal/agent/telemetry_all.go): - On: every agent found here with a telemetry switch is turned off through its own switch and that switch's rules (only keys the file lacks are written; a value of the user's own that keeps telemetry on is never written over: the agent stays on and the reply's "refused" names it and why). Each agent the switch turned off gets a stash marker, <id>.telemetry.all. An agent found later is turned off on the next state the window reads and by a one-minute gateway loop (KeepTelemetryAllOff, in WhileServing). - While on, each agent's own Telemetry row shows off, says "Off for all agents in Settings › Privacy" and its buttons are disabled; the API refuses it too (ErrTelemetryAllOff). - Off: only the marked agents are turned back on, which takes out only magpie's keys. An agent off by its own row or the user's own config before stays off. - An unreadable settings.json is unknown: nothing is written. - The setting is per computer (KeepOwn) and the generic settings POST can't change it (settingsapi.Merge carries it). app.js pays for its ~650 bytes with ten Privacy-section comments cut (core 1,533,550, under its 1,533,802 budget, no raise). Run (mote, first on |
||
|
|
418bb6c9e1 |
codex: Show Codex's own models off leaves them out of Codex's own picker (iiiiiimone on X)
The switch (#1642) only narrowed the Agents page's pickers. Codex's own list, which the gateway hands it beside its sign-in and as the Codex app's list file, kept every model of the ChatGPT account, also with the Codex provider switched off. codexMerged now leaves the sign-in's visible models out when the switch is off (provider.CodexOwnLeftOut); the model Codex is set to, models magpie serves on a ChatGPT account and hidden jobs stay, and the list's ETag carries the switch so Codex asks again. Codex has one openai_base_url for every model, so one it is still set to goes through the gateway to OpenAI on its own sign-in; a model of it can't be sent direct beside magpie's models. Run: TestCodexListWithOwnModelsOff, red with the filter turned off (own models all listed, ETag unchanged); gateway, provider tests at this tree. Not tried: a real Codex app against the list. |
||
|
|
40cd70d54e |
agent: an agent behind billion-context's /bili/ lane still goes through magpie (33sczf on X)
The Library's billion-context tab puts Claude Code behind bili's lane: ANTHROPIC_BASE_URL http://127.0.0.1:18787/bili/http://127.0.0.1:3425, which forwards to the gateway. A local proxy with a path is checked by asking GET / there for magpie's info (#1985), and a bili lane runs only beside its agent, so the probe said no: the Agents page showed "配置已变更" with Reconnect, which would have written the gateway over the user's billion-context. chainsToGateway (reach.go): an address on this machine's loopback whose path ends in the gateway's own URL (/bili/<gw>, /bili/anthropic/<gw>, any port) reaches magpie without a probe. reachesMagpie and surelyMagpie take it, so every agent's drift check (wiringOff, Claude's managed settings, Reasonix, T3 Code, Zed) holds, and Claude Code's writes (a pick, Reconnect) keep ANTHROPIC_BASE_URL on the lane (gwAt/claudeProxied). The sync's kept-away filter (keptaway.go) kept nothing for a file that already named the gateway: chainPrefix now keeps one such proxy in front of the gateway wherever the file had it, for every agent's sync. Codex is left as it was: its openai_base_url check is exact, and bili's Codex lane is an MCP server that never takes this address. Run (mote): - go test -run 'TestBiliChain|TestChainsToGateway|TestClaudeBehindBili' ./internal/agent: ok - go test -run 'TestBiliChain|TestChainsToGateway|TestReverseProxy|TestClaudeManagedProxy|Kept|Away|Elsewhere|Proxy' ./internal/agent: ok - gofmt -l clean; go vet ./internal/agent for darwin, linux (nogui) and windows Broken by hand: chainsToGateway taken out of reachesMagpie/surelyMagpie and chainPrefix off: TestBiliChainIsStillMagpie red with the reporter's exact message for claude, claude-desktop, gemini, opencode and others, 53 files back on the gateway after a sync; TestClaudeBehindBiliLaneKept red. Not tried: a real bili lane with a real Claude Code; the full suite (started after the tag). |
||
|
|
c6bdce26fe |
agent: auto mode works on every model; its check is turned off unless each model gets Anthropic's results back (JoyYoung2Lucky on X)
Claude Code 2.1.322 in auto mode, routed through magpie, denied every action it would check with "Auto mode can't check actions in this session. Its safety check runs on the server, and your requests go through 127.0.0.1:3425, which doesn't pass it through" (auto_mode_no_check_in_session), on DeepSeek and on a Claude model alike. 2.1.316 fell back to its own classifier there; 2.1.322 doesn't when telemetry or feature flags are off (DISABLE_TELEMETRY, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC, ...), unless CLAUDE_CODE_AUTO_MODE_SERVER is "0". magpie wrote that "0" only when no model Claude Code could reach was reviewed. Any reviewed one, a relay's Claude on its Anthropic endpoint included, left it unset, and /model (or a route that drops safeguard_results) then left the session with no check. That is why a Claude model failed too. Now claudeReviewed asks every reachable model (shown entries, group members, fallbacks, the models it is set to) for gateway.AutoModeAnswered: a reviewable model on the Claude subscription or on api.anthropic.com. Any other writes "0", and Claude Code runs its own classifier through the gateway, fitted to any model (classifierStandIn); its model is the Claude Code card's auto mode square (CLAUDE_CODE_AUTO_MODE_MODEL). An empty slot Sync passes (no small model, say) is skipped, not judged as a model. The gateway still passes safeguards to relays as before. Nothing mimics Claude Code and CLAUDE_CODE_ENTRYPOINT is not set. Real runs, Claude Code 2.1.322 in a sandbox HOME against the live gateway as a client, auto mode, `ls /`, DISABLE_TELEMETRY=1: - deepseek/deepseek-flash: the user's exact denial (before). - deepseek/deepseek-flash with CLAUDE_CODE_AUTO_MODE_SERVER=0 (what the fix writes), with and without a classifier model set: the local classifier ran (permission_check_status checking -> done), Bash ran. - openrouter/anthropic/claude-opus-5.5: ran (OpenRouter returned the results; the fix still writes "0" for it, which also works). - claude/claude-sonnet-5 (subscription bridge): ran. Fake upstreams with and without safeguard_results (in a stream's message_delta delta) showed the same split. Tests: TestClaudeAutoModeReview (DeepSeek beside a Claude model writes 0, the user's case), TestClaudeReviewedOnlyWhereResultsComeBack, TestClaudeReviewedJudgesTheSetModelWhereItGoes (empty slot), TestT3CodeAutoModeReview, TestAutoModeAnsweredOnlyWhereResultsComeBack. Broken by hand on WSL, each went red: AutoModeAnswered true for any reviewable model (relay cases red in agent and gateway); the old "any shown entry reviewed" rule (the user's case and T3 Code red); an empty slot judged as a model (three Claude-alone cases red). Runs, each at the tree named (the diff is the same in all three): - On |
||
|
|
0baa223ec9 |
agent: Kun, magpie as a provider connection through its runtime API (zhongxingyuyes on X)
Kun (KunAgent 0.4.5, Electron, com.xingyuzhong.deepseekgui) keeps its
model providers in ~/.kun/data/model-connections.v2.json (or
$KUN_DATA_DIR) and changes them only through its runtime's admin API,
whose address and token are in runtime.json. magpie wires Kun by
calling that API while Kun runs:
POST /v1/model-connections/connect the magpie connection
PATCH /v1/model-connections/:id models, gateway address
POST /v1/model-connections/select the default model
DELETE /v1/model-connections/:id off
POST /v1/provider-config/transactions/preview, then commit
off when magpie's connection is the default: Kun refuses a
plain DELETE of the connection its default names, so the
transaction clears the default and removes it in one step,
and the default the user had before is put back.
When Kun isn't running, wiring says "open Kun, then try again"; the
file is never written behind Kun's back. Kun joins the agent list,
desktop-app detection, the env guard, the icon set (kun.png), the
READMEs and docs/reference.md and docs/subsystems/agent-wiring.md.
Run:
- WSL (Ubuntu 24.04), at the rebased head: go test -tags nogui
-run 'Kun|ListsModels|Picker|Spelled|HandWired|Sync|Drift|ListOnly|
Moved|LAN|Proxy' ./internal/agent ./internal/agentenv ok;
./internal/library ok; ./internal/gui -run 'Icon|Budget|CSS|I18n|
Picker' ok (agentenv: no tests match the filter).
- Windows (win-run): go test -run 'Kun|ListsModels|Picker|Spelled|
HandWired|Drift|ListOnly' ./internal/agent ok. CGO_ENABLED=0 go vet
for windows (agent, gui, agentenv), darwin nogui (agent, agentenv)
and linux nogui (agent, agentenv, gui): clean. gofmt -l clean.
- GUI (WSL, chromium + webkit): i18n-keys, i18n-en-no-cjk,
icon-one-tone, routing-client-icons, icon-tile together 63/63 at
this head. An earlier run at the pre-rebase head was 60/63, the 3
reds icon-one-tone's "Open Design one-tone ... Plugins page"
(chromium), which passed 48/48 alone there and at origin/main: a
load red (#5425).
- Real Kun 0.4.5 (Linux build, sandbox HOME, `kun serve`): connect,
a second model, Sync, restart, off. `kun run`
finished a turn through the gateway (POST /v1/chat/completions,
Bearer magpie-kun, reply "hello from magpie"). Off restored the
previous default, and with no previous default Kun was left with
none and no magpie connection.
Broken by hand: off through the plain DELETE again. The fake Kun now
refuses it as the real one does, and TestKunFromNothing and
TestKunFollowsTheGateway went red with "Deleted connection still has
references: default.providerId"; green with the transaction.
Not tried: Kun's desktop window itself (the runtime was driven
headless); macOS (mote refused SSH all session); `kun run --model`
(run uses its own default model, not the registry's default, so a
CLI run picks magpie's model only with --model).
|
||
|
|
388ca9ad45 |
agent: Claude Desktop says how to go on with the signed-in chats on magpie (Jacky_yyyyyyyy on X)
Jacky_yyyyyyyy on X asked that connecting Claude Desktop keep the earlier chats and let them be continued. They are kept already: in 3p mode Desktop runs in Claude-3p (its own userData), the signed-in profile's Code and Cowork sessions stay untouched in Claude/, claude.ai chats stay on Anthropic's servers, and Off brings them all back ( |
||
|
|
6a450c4982 |
agent: Shelley, magpie's models as its custom models (on X, tweet 2120109384315658393)
"Can support Shelley?" Shelley is boldsoftware/shelley (Apache-2.0, Go,
`shelley serve`). It keeps models and profiles in its SQLite database,
not in a config file, so magpie talks to a running Shelley through the
same API its own Models and Profiles pages use, on the Unix socket it
opens for its CLI ($SHELLEY_SOCKET, else shelley.sock / shelley-N.sock in
$XDG_CONFIG_HOME/shelley or ~/.config/shelley; read from its source).
- Connect: each magpie model is a custom model (POST /api/custom-models,
provider_type openai, endpoint = the gateway's /v1, Shelley's own
gateway key, model_name = the catalog id, reasoning/images/max_tokens
from the catalog). Picking one makes it the default profile's model
(PUT /api/profiles/{name} with the whole profile, as the API requires)
and clears a thinking level the model can't take.
- The user's own values: the profile's model and thinking level are
stashed once and put back on Disconnect (to the server's default if
that model is gone); only the custom models magpie made (ids stashed)
are deleted, so a model the user pointed at the gateway by hand stays.
- Sync re-points magpie's models when the gateway port moves; Check names
a model left on an old address. Shelley not running is an error on a
pick and nothing on Sync/Check; turned off while Shelley is uninstalled,
the takeout is stashed and done when Shelley answers again (Alma's way).
- A notice: new conversations start on the pick, an open one keeps its
model. i18n for zh, zh-TW, ja, de.
- Icon: Shelley's own S mark from its assets, one tone. README (en, zh),
site index, docs/reference.md, docs/integrating.md, site integrate
pages (en, zh), docs/subsystems/agent-wiring.md.
- Library: listed as "not looked at (#5897)" like the other new agents.
- Shelley has no Windows build, so there is no Windows or WSL wiring.
Run (mote refused SSH for the whole session, kex reset, so runs went to
the Linux VM and the Windows box):
- Real binary: shelley v0.1718.926152762 linux_amd64 (sha256 66cb5acb…
checked) in a sandbox HOME/XDG_CONFIG_HOME/-db on the Linux VM, with a
throwaway test driving it against a fake OpenAI upstream at
MAGPIE_ADDR: connect made custom model glm-4-6-… and the default
profile's model; POST /api/conversations/new sent two
/v1/chat/completions with model=relay/glm-4.6, auth magpie-shelley,
UA Shelley/58d5f200; disconnect left the profile as before and no
custom models. Check "" and Drift nil while connected.
- Linux (wsl-run, nogui): go vet ./internal/agent ./internal/agentenv
./internal/library; go test ./internal/agent ./internal/agentenv
./internal/library ./internal/profile ./internal/sessions: ok except
TestGrokInstalled (#3548, red on base too) and, before its fix here,
TestEveryAgentInLibrary. internal/cli times out there in
TestEveryAgentFieldNameWritesNothing (43m, the #5234 class).
- Windows (win-run): go vet ./internal/agent ./internal/agentenv;
GOOS=darwin and GOOS=linux -tags nogui vet; the Shelley, applied,
rewire, disconnect, mark and kept tests: red only in
TestAppliedOfParsesAnUnchangedFileOnce (#5950),
TestAsideOfflineDisconnectRestoresWithoutDaemon (#5951) and the #4786
allocation tests, all red on base
|
||
|
|
10bef5fe09 |
codex: every account shares one list of the Codex app's projects, removals remembered (Michael25651150 on X)
The reporter wants the Codex app's projects kept however magpie switches
ChatGPT accounts. v0.1.3559 (
|
||
|
|
c2c2c82ca8 |
agent: Tuanjie Cowork, a magpie provider and model in its Custom Models (Charles24209792 on X)
Tuanjie Cowork (Unity China's coworker app, dev.codelycowork.desktop,
2.1.6-stable) keeps the user's own models in ~/.codely/settings.json:
customModelProviders {id, name, baseUrl, apiKey, authType} and
customModels {id, model, providerId, displayName, roles, wireApi,
supportsMultimodal}, read afresh on every lookup. Read from the app's own
core (tZ/oE for the file, Mwi for a session's OPENAI_BASE_URL/KEY, BOe
for the model list, rha/sha for its startup migrations).
magpie adds a provider and a model of its own, both id "magpie": the
gateway's /v1 with Cowork's own magpie key, the model picked, wireApi
chat. The user's providers and models and every other key stay as
written; a name or roles given magpie's entries in Cowork are kept when
the model changes. Off takes both out, and the file too when magpie made
it and nothing else is in it. A provider or model with id magpie that is
the user's own is left alone, with an error. Which model a chat is on is
Cowork's own per-workspace pick, which magpie doesn't write; a notice
says to pick "<model> (magpie)" in its model menu while it runs. Skills
go to the shared ~/.agents/skills, which its core scans. Icon from the
app's icon.icns. Lists, READMEs, reference, agent-wiring doc, i18n.
Run:
- go test ./internal/agent ./internal/library ./internal/gui on mote;
TestTuanjieCowork* and TestHandWiredMagpieProviderSiblings on Windows
(win-run).
- gofmt; go vet darwin, linux -tags nogui, windows.
- GUI, chromium and webkit: i18n-keys, i18n-en-no-cjk,
agent-notice-lang, gui-de, gui-ja, gui-zh-tw, icon-one-tone,
icon-tile, routing-client-icons, usage-agent-filter-icons,
agent-connect, agent-models, agent-layout.
- Cowork's own code on magpie's output: its tZ, oE, rha, sha, cE, KGa,
Mwi, kOe and BOe, extracted from the 2.1.6 core, run in node on the
settings.json magpie wrote (with the user's own provider, and fresh).
Its migrations leave magpie's entries; cE("magpie") finds the model,
the picker label is "deepseek/pro (magpie)", a session gets
OPENAI_BASE_URL http://127.0.0.1:3425/v1 and magpie's key, the list
URL is /v1/models, and the user's glm-4.5 is still there.
Where: the packages, vets and GUI files above ran on mote at b834dc2a7
(this change on
|
||
|
|
4a9142ccd4 |
agent: Obsidian, magpie's models in Copilot for Obsidian (shirotokiren on X)
shirotokiren asked for magpie to set up Obsidian's AI plugins, naming Copilot and Smart Connections. The new agent "obsidian" finds the vaults in Obsidian's obsidian.json: ~/Library/Application Support/obsidian on a Mac, %APPDATA%\obsidian on Windows, and on Linux $XDG_CONFIG_HOME/obsidian or the Flatpak or Snap folder. In each vault that has Copilot for Obsidian 4+ (.obsidian/plugins/copilot), magpie edits data.json in the shape Copilot 4.0.19 reads: - it adds providers.magpie, openai-compatible at /agent/obsidian/v1, with requiresApiKey false and no keychain id; - it adds one configuredModels entry per magpie model, with a deterministic uuid v5 id, plus limits, image input and reasoning efforts; - new models go into backends.chat.enabledModels; - on the first wire it sets defaultModelKey, and stashes the old value. A sync keeps the models the user turned off, their default, and the name they gave the provider. It writes only the keys that change (edit.PatchJSON, then temp and rename), and nothing when nothing changed. A provider named magpie counts as magpie's only when its baseUrl is magpie's Obsidian route. One the user added by hand under that name is theirs: it doesn't read as connected, Disconnect leaves it, and Connect says so and writes nothing. Disconnect takes magpie's entries out and puts the old default back. Copilot 3, a data.json it can't parse, and no vault with Copilot are each an error, and nothing is written. A notice asks the user to reload Copilot, since Obsidian holds the settings in memory. The gateway now answers CORS for app://obsidian.md keylessly (appOrigin). Copilot streams through the window's fetch, and without CORS headers it can read no reply. Only Obsidian's own window sends that origin, so it gets no more than its calls without an Origin get. From the network it still needs a key. Smart Connections is not wired. Its free plugin embeds with a local model only, and its API providers are in the closed Pro plugin, with keys in the keychain. Run (mote, at |
||
|
|
5e3f14f21f |
agent: Paimon, magpie's models through its litellm provider (ditangongyuan on X)
Paimon (aisk/paimon, `uv tool install paimon`) is a terminal coding agent on pydantic-ai. Read at 7f7fa51 (config.py, llm.py): its settings are one JSON file, $PAIMON_CONFIG_HOME/config.json, else ~/.config/paimon/config.json on every OS. "model" is provider:name, and "providers" keeps each provider's api_base and api_key. magpie connects it through pydantic-ai's litellm provider, an OpenAI-compatible proxy that profiles a vendor/model name by its vendor, as magpie's ids are spelled, and which Paimon's login never offers: model = litellm:<catalog id>, providers.litellm = the gateway's /v1 and magpie's key for Paimon (0600, as Paimon writes it), and compaction.context_window = the model's window. Paimon compacts against that only for names genai-prices doesn't know, which magpie's ids aren't; for a model whose window magpie doesn't know it gets the user's own back, never the last model's. What the user had in the three keys is stashed and put back on Disconnect (or `magpie paimon default`); the rest of the file is untouched, and a file magpie made goes again. A model picked in Paimon itself while magpie's provider stays is the user's from then on. Requests are told apart by Paimon's paimon/<version> User-Agent. WSL distros, the PAIMON_CONFIG_HOME isolation, notices in every language, icon, READMEs, docs/reference.md, agent-wiring.md and the site's list come with it. Run: mote refused SSH all session (kex reset), so the Linux runs went through wsl-run (magpie-desktop) and Windows through win-run: - go vet: linux -tags nogui, GOOS=windows, GOOS=darwin -tags nogui on internal/agent, agentenv, library: ok. gofmt -l: clean. - go test -tags nogui ./internal/agent/... agentenv library gui cli (WSL, base |
||
|
|
9c39edb92c |
agent: Avibe, magpie as a model source through its Model Hub (alex_metacraft on X)
Avibe (avibe-bot/avibe, avibe-os on PyPI, the `vibe` CLI) runs its own
agent, Vibey, and Claude Code, Codex and OpenCode, all on models from its
Model Hub. Its sources live in model_hub.sources of config/config.json in
$AVIBE_HOME (else ~/.avibe, else a legacy ~/.vibe_remote), but a source
can't be written there by hand: its key is sealed in the hub's credential
store and Avibe puts it into its agents' route chains as it is made.
So the Avibe row adds "magpie" the way Avibe's Models page does, through
its internal API (POST /internal/model-hub on state/dispatch.sock, or on
Windows the loopback port + bearer of runtime/control-ipc/endpoint.json):
create_source with kind api_key, vendor custom, base_url the gateway's
/v1, key agentKey("avibe"), protocol openai_chat and save_unverified.
Avibe then lists the models from /v1/models and adds the source to
Vibey's, Claude's, Codex's and OpenCode's chains itself.
- openai_chat, not openai_responses: for a Responses source Avibe's
CLIProxyAPI runs Codex's executor, which sends codex-tui headers the
gateway would take for Codex.
- Off is delete_source with force, sent again with the would_remove_hops
and would_interrupt Avibe answers, as its page confirms them. Sync is
refresh_source the same way; on a moved gateway the source is made
again (the key goes with the address; patch_source can't change it).
- The source id is stashed; a custom source at the gateway's /v1 counts
as magpie's too and is stashed once seen.
- Every change needs Avibe running; otherwise the switch says to run
`vibe start` (errAvibeDown). Nothing is written to config.json.
- A sync moves the source only from the gateway's own address on an
older port (avibeMoved). One the user pointed at a NAS's or the LAN's
magpie, a local proxy's route, or a WSL distro's way to Windows stays,
as kept.away keeps every file-written agent's; a Rewire after a port
move sets it again through the field's Set.
- Every test of the package but Avibe's own finds an Avibe running for
each home (runningAvibe, served in-process), so the tests that connect
every agent (gateway moved, LAN and proxy addresses kept, drift,
ListOnly) take Avibe in too.
- The logo is a tile solid to its edges, so it joins app.css's tile rule
(icon-tile.test.cjs went red without it).
- AVIBE_HOME joins agentenv and the ~-expanding path vars (Avibe expands
it). Icon from Avibe's assets/logo.png (MIT), 64px.
Run:
- Real Avibe 3.2.5 (uv tool install avibe-os) in a sandbox HOME in WSL
magpie-desktop, with a fake OpenAI server as the gateway: magpie's own
code (a throwaway test, AVIBE_HOME + MAGPIE_ADDR) connected it, Avibe
discovered both fake models with "Authorization: Bearer magpie-avibe"
and put the source in vibey/claude/codex/opencode chains; Sync
refreshed; a gateway move to :3592 made the source again there and
stashed the new id; a second run found the source by address alone
and still followed the move; off removed it (list_sources []).
Earlier, by hand: Anthropic /v1/messages and /v1/responses through the
hub reached the fake as chat completions.
- wsl-run, at this head rebased on origin/main
|
||
|
|
99b080e2ee |
agents: an agent can have its own Provider in model names (KillTry27355 on X)
"希望 可以在不同的 agent中选择是否显示供应商名字,现在只能统一开关":
Provider in model names was one switch for every agent. An agent's
Details on the Agents page now has a Provider in model names row: As in
Settings · <mode> (the default, kept for everyone), On, Not on names I
set, or Off, for that agent alone. The CLI has the same thing:
`magpie model suffix <agent> [on|own|off|every]`.
- settings.AgentSuffix keeps the agent's own mode by the id its lists are
kept by (Agent.ListsFor, lower-cased, without @wsl: or #profile). An
agent with none follows PlainNames/PlainOwnNames as before, so nothing
a user already set changes.
- provider.LabelsFor(agent, es) reads that agent's mode. Every place
that named models with Labels for an agent now passes the agent: Codex's
catalog, the agents' written lists (route.go, Pi's extension), the
gateway's /v1/models (by agentOf(r)), Muse, Antigravity, Ollama, Claude
Desktop's catalog and descriptions, Claude Science. Labels is
LabelsFor("").
- POST /api/settings/agent-suffix sets it and rewrites the agents'
configs (catalog.Touched), as Settings' switch does.
- docs/subsystems/agent-wiring.md says where the mode is kept and read.
- The picker is in agentsuffix.js, imported when an agent's Details open,
so the core grows by the one line that loads it (1,529,335 of its
1,533,802 budget, after the previous commit's move). An agent whose
list takes no names of magpie's (noNames) has no row.
Tests, each red on the old code: TestAgentSuffix (provider: modes, keys
with @wsl and #profile, reset, bad input), TestAgentSuffixReachesItsFileAlone
(agent: Pi's file follows its own mode while Codex's follows Settings'),
TestModelsListFollowsAgentSuffix (gateway /v1/models per agent),
TestModelSuffixAgentCmd (cli), settings_keep (AgentSuffix survives a
Settings save), agent-suffix.test.cjs (5 languages x 1180/390 x chromium
and webkit, and a noNames agent has no row).
Broken by hand (a copy with LabelsFor ignoring the agent and the picker
reading no own mode): TestAgentSuffix, TestAgentSuffixReachesItsFileAlone,
TestModelsListFollowsAgentSuffix and every agent-suffix GUI case went red.
TestModelSuffixAgentCmd stayed green; it checks what is saved, not the
names.
Run on mote at this change on top of
|
||
|
|
248268ce4c |
codex: a switch of the preferred account leaves the Codex app running unless asked (Michael25651150 and ykj5353 on X)
After v0.1.3562 a switch of Codex's ChatGPT account made by hand in
magpie, between accounts that both had room, still ended the Codex
app's app-server with "Restart the Codex app when magpie switches its
account back" off. The app shows that as an error, relaunches, and
signs in as the new identity. ChatGPT.app 26.1103+ keeps its sidebar
projects per ChatGPT identity (electron-account-renderer-state-v1), so
on an identity that never had them it shows "没有项目" and every thread
under Recent: ykj5353's screenshot is the Codex app's sidebar, not
magpie's Sessions page.
codexAppStep no longer counts c.switched && !c.auto as by hand. Such a
switch is left running, logged, and the account rows' "still signed in
as" notice with its Restart is the way to follow, as for magpie's own
switch back. Still restarted with the tick off: a switch off a used-up
account (needed, the app greys Send there), Connect/Disconnect, the
takeover in and the takeover turned off by hand. RestartApp on restarts
on every switch as before.
Run (mote, at base 40ca0c88d; rebased onto
|
||
|
|
bc0d9e8739 |
agent: magpie's own Claude work folder isn't Claude Code bypassing magpie (ifccod7391564 on X)
The bridge runs Claude Code in os.TempDir()'s magpie-claude-work(-<uid>), and on the user's own home those prompts go into ~/.claude/history.jsonl too. LastUsed read them as Claude Code used with none of its requests reaching magpie, and the Agents page warned "Claude Code 最近绕过了 magpie". The owner's own history.jsonl has 1594 such lines, project /private/var/folders/.../T/magpie-claude-work-501. LastUsed now passes over lines whose project is that folder (inMagpieWork: the last path element, either slash, so a Mac's /private/var, C:/…, C:\… and a WSL mount all match; magpie-claude-workshop does not). lastJSONLTime takes a skip; Codex's history.jsonl has no project and passes nil. Run (wsl-run, magpie-desktop; mote refused SSH the whole time): - go test -count=1 -timeout 45m ./internal/provider ./internal/agent: provider ok; agent ok but TestGrokInstalled, the known WSL2 binfmt red (#3548), unrelated - TestClaudeBridgePromptsArentBypass, TestDriftBypassed on Windows: ok - cross-OS go vet as in the provider commit; gofmt -l clean Broken by hand: LastUsed with skip nil: the new test is red with the reporter's bypassed drift. Not tried: the GUI (no GUI change), the macOS run (mote down). |
||
|
|
8cc4bd7e3c |
agent: Craft Agents, through a keyless connection at the gateway (springg1998 on X)
Craft Agents (lukilabs/craft-agents-oss, thecraftagents.com) keeps its LLM connections in config.json under $CRAFT_CONFIG_DIR or ~/.craft-agent (paths.ts, storage.ts, llm-connections.ts, v0.15.8). magpie adds one connection: slug magpie, providerType pi_compat, authType none, baseUrl at the gateway's /agent/craft-agents/v1, customEndpoint.api openai-completions. Its models are the ones picked for it, and defaultModel is always one of them, because Craft resets a default that isn't in the list to the first. magpie makes it defaultLlmConnection. The user's default is stashed (as JSON, "" for none) and put back on off when that connection still exists. A name the user gives magpie's entry stays, and a sync with nothing to change writes nothing. A config.json with no workspaces list is one Craft doesn't load, so magpie never creates one: open Craft once first. Picking one of the user's own models removes magpie's entry and sets that model on their default connection. Sessions keep the connection they started on, so the notice says new sessions use it (zh, zh-TW, ja, de). Detected by ~/.craft-agent, Craft Agents.app (com.lukilabs.craft-agent), or %LOCALAPPDATA%\Programs\@craft-agentelectron\Craft Agents.exe (per-user NSIS; the GUID is the UUID v5 of the appId, derived the same way as dsh's known one). Skills go to ~/.agents/skills. CRAFT_CONFIG_DIR is in agentenv.Vars. Icon from Craft's own icon.svg (#9570BE). README, reference, agent-wiring and site list it. Run on mote, first on origin/main |
||
|
|
720200092e |
agent: turn off an agent's own telemetry from its settings (OipsAnthony on X)
An agent with a documented telemetry switch has a Telemetry row in its
Settings on the Agents page (opened row and settings sheet). Off writes
that switch into the agent's own config the way magpie writes it already:
- Codex: [analytics] enabled = false in config.toml (feedback left alone)
- Claude Code: env DISABLE_TELEMETRY and DISABLE_ERROR_REPORTING = "1"
- Gemini CLI, Qwen Code: privacy.usageStatisticsEnabled = false
Nothing is written until the user turns it off. Off writes only keys the
file lacks and records them in the stash; a key the user set on refuses
Off and names it; one they set off stays, and the row says so. On takes
out only the keys magpie wrote that still hold magpie's value. An
unreadable config is unknown: the row says so and can't be pressed.
Agent.Telemetry is not a Field, so profiles never carry it and Unwire
leaves it. Only agents on this computer (no WSL distro, #3896).
POST /api/agents/telemetry/{id}; strings in zh, zh-TW, ja, de.
The row is paid for in the core budget with sixteen Agents-page comments
cut in app.js (core 1,532,840 of 1,533,802 after the rebase), no raise.
Run (mote, at this head on origin/main 1ad9d157f; vet, the three packages and agent-telemetry, i18n-keys, agent-details-ready, click-scroll again there, 98 of 98):
- go test -run Telemetry ./internal/agent, then go test -count=1
./internal/agent ./internal/gui ./internal/cli: ok
- go vet ./..., GOOS=linux -tags nogui, GOOS=windows: ok; gofmt clean
- GUI, chromium and webkit: agent-telemetry (34 pass: every language at
1100 and 640px, no scroll on click, no select, the user's own off,
a refusal, the sheet), and 104 agent-*, i18n-*, click-scroll,
settings-search, panel-agent and agent-settings files: reds only in
page-width-steady and mobile-web (red the same at origin/main
|
||
|
|
15acba5347 |
codex: the Codex app's projects follow an account switch, and the app isn't quit unasked (Michael25651150 on X)
"切换账号 codex 添加的项目丢了 发生过好几次了 另外额度用尽时会强制重启 codex 客户端"
Projects. The Codex app (ChatGPT.app 26.1103 and on) keeps its sidebar's
projects per ChatGPT identity in $CODEX_HOME/.codex-global-state.json,
under electron-account-renderer-state-v1 ({owner, inactive:{<sha256 of
JSON.stringify([chatgpt_user_id, chatgpt_account_id])>: {atoms, globals}}}).
On an account change it parks the old identity's account-scoped globals
and loads the new one's, so magpie's switch (auth.json, then the
app-server's restart) showed an account that never had the app open with
no projects (#5497, #5602, #5702, #5874). Read from the app's own bundle
(early-bootstrap-133 selectRendererOwner, -815's owner hash). The app reads
the file only at launch and writes its memory over it, so magpie writes
it only while the app is closed (codex_projects.go): from the 3s loop once
the file, auth.json or logins.json changed (process listing at most every
30s), and between the quit and the open of every reopen (appQuitDone in
reopenBundle and restartWin). Each identity of auth.json and the saved
Codex logins whose snapshot has no local-projects key gets the project
keys of the identity with the most; an own list (an emptied one too) is
left; g-p- ChatGPT project mirrors and their ties aren't carried, and a
backing naming another account is dropped (the app refuses those). A
file without the key or that doesn't parse is not written; the first
write keeps the file as it was beside it (.magpie-before-projects).
Restart. When quota runs out magpie restarts the app's app-server (the
takeover needs it: the app reads its account only as its app-server
starts, else Send stays grey). A ChatGPT app can then show "hit a snag",
and magpie quit and reopened the whole app (CodexAppRelaunch), and on
Windows reopened an app that started no app-server (codexAppGotNone).
Both now happen only with "Restart the Codex app when magpie switches its
account back" ticked (codexRestartsApp, off by default); otherwise the
Agents row says to quit and reopen, as it did where a relaunch failed.
Run (mote unreachable all session: ssh kex reset on every try; so on the
Linux box and Windows box instead):
- wsl-run: go vet -tags nogui, GOOS=darwin CGO_ENABLED=0 go vet and
GOOS=windows go vet of internal/provider and internal/agent: ok.
- wsl-run go test -tags nogui ./internal/provider ./internal/agent:
provider ok; agent red only on TestGrokInstalled (#3548, WSL binfmt).
- win-run go test -run 'TestCodexProjects|TestCodexRendererOwner|
TestCodexApp|Restart' ./internal/provider ./internal/agent: provider ok;
agent red on TestWorkBuddyRestartOnMac (#4115) and
TestOpenMausBotRestartOnMac (added to #4115), neither touched.
- gofmt -l: clean.
- The owner hash checked against node's crypto (TestCodexRendererOwner).
Broken by hand: carryCodexProjects returning at once -> the four
TestCodexProjects* red; the snag gate removed -> TestCodexAppNotQuitUnasked
red (relaunched 1); the Windows gate removed -> red (reopened 1); the
backing strip removed -> TestCodexProjectsFollowASwitch red.
Not tried: the real Codex app. This Mac's ~/.codex state has no
per-identity key (read-only check), so the switch is reproduced against a
Go port of the app's selectRendererOwner on the issues' layout, not the
app itself. No macOS test run (mote down). The takeover (no account)
still shows no projects in the app, by the app's own rule; they come back
with the account. Projects added while the app runs reach other accounts
once it is closed.
|
||
|
|
d109ec8da8 |
agent: miniQ, its provider on magpie's gateway (xiancrong on X)
miniQ (LeadingThink/miniQ, 0.1.213) is a desktop coworker and a `miniq`
terminal, both clients of one miniq-daemon. Its model is one provider in
<data dir>/settings.json, {baseUrl, apiKey, model, apiProtocol}: the data
dir is $MINIQ_DATA_DIR, else the folder miniq-data-dir.json names, else
%LOCALAPPDATA%\miniq or ~/.local/share/miniq (macOS too).
Picking one of magpie's models writes the provider as the gateway's /v1,
magpie's key for miniQ (it sends no User-Agent of its own), the catalog id
and apiProtocol chat_completions ("auto" guesses a protocol from the model
name). What the user had is stashed whole and put back on Disconnect; the
rest of settings.json is left alone. A settings.json magpie made is 0600
and goes again when magpie steps out. The daemon reads settings.json once
and writes its copy back on every change, so a running one is told too:
settings.update over the WebSocket daemon.json names, as miniQ's own
Settings does, which also moves open chats. Notice compares the daemon's
settings.get with the file and asks for a restart when they differ.
"On magpie" is known by magpie's key, so a moved port or a proxy in front
of the gateway is told apart by Check (baseUrl and apiKey). WSL: the
distro's ~/.local/share/miniq. Icon, i18n (zh, zh-TW, ja, de), READMEs,
reference, site, MINIQ_DATA_DIR in agentenv.Vars.
Run:
- At the pushed head, rebased on
|
||
|
|
5a02bf8c14 |
agent: mu, Pi with a judgment kernel, wired in ~/.mu/agent (xteam3301 on X)
mu (github.com/qybaihe/mu, npm mu-agent, the mu command and the mu
desktop app) is Pi 1.4.0 with a judgment-kernel extension. Its
kyrn/bin/mu.mjs starts Pi on its own agent folder, so Pi's settings.json
and models.json live in ~/.mu/agent, and the desktop app runs the same
Pi on the same folder. magpie now wires it as it wires Pi.
- agent: mu (piLikeKeyed). Its folder is found as mu.mjs finds it:
$MU_AGENT_DIR, $KYRN_AGENT_DIR, $MU_CODING_AGENT_DIR,
$KYRN_CODING_AGENT_DIR ("~" expanded), else ~/.mu/agent, or
~/.kyrn/agent while ~/.kyrn is a folder and ~/.mu isn't. Its requests
say pi/<version>, so the provider's key magpie-mu names it. The alias
is mu-agent. Its judge (~/.mu/mu.json) is left alone.
- `mu` is also maildir-utils' command (brew, distros). A mu on PATH
that neither is nor names mu.mjs / mu-agent is not taken for it
(notMuAgent).
- Gemini models stay on Chat for mu, as for Pi and StepCode (piAsked).
- WSL kind at ~/.mu/agent (found by its folder, not the command); CLI
update through npm mu-agent; the desktop app (io.github.qybaihe.mu,
mu.app, %LOCALAPPDATA%\Programs\mu\mu.exe, /opt/mu).
- agentenv and appdir know the four variables.
- library: mu's AGENTS.md / AGENTS.override.md, its mcp.json (Pi's
native format) and skills in its folder; it reads ~/.agents/skills.
- GUI: a one-tone icon. Default in its model picker says it clears the
default and mu picks one itself (PICKS_ITSELF).
- docs: READMEs, reference.md, agent-wiring.md.
Run (mote, at this tree before the rebase):
- gofmt -l internal/ clean; go vet darwin, GOOS=linux -tags nogui and
GOOS=windows of agent, library, appdir (and agentenv on darwin): clean.
- go test -count=1 ./internal/agent ./internal/library ./internal/appdir
./internal/agentenv ./internal/usage: ok (agent after its maildir
fixture stopped using testenv.Program, which refuses a non-script).
New: TestMu, TestMuDir, TestMuNotMaildirUtils, TestMuTarget; mu added
to the handwired, spelled, Pi scope, scope-gone and Gemini-on-Chat
lists.
- Windows (win-run on xiaomi-gpu): go test -run 'TestMu|TestPiScope|
TestScopeGone|TestHandwired|TestSpelled|TestPiFolderKeepsGemini'
./internal/agent ./internal/library ./internal/appdir: ok.
- Real mu-agent 0.3.9 (Node 22.22.0) on mote in a sandbox HOME, a
sandbox gateway on 47822 over a fake OpenAI upstream: `magpie agents`
found mu with the user's deepseek model; `magpie mu magpie/fakeup/m1`
wrote defaultProvider magpie and providers.magpie with key magpie-mu,
keeping the user's deepseek provider; `mu -p ping` answered "pong from
fake upstream" (upstream saw POST /v1/chat/completions, model m1,
UA pi/0.3.9); `magpie usage today` counted the call under agent mu;
`magpie mu default` put settings.json and models.json back byte for
byte (cmp).
- GUI, chromium and webkit: pi-default-note (with mu added),
icon-one-tone, icon-tile, mono-icon-redraw, routing-client-icons,
usage-agent-filter-icons, i18n-keys, i18n-en-no-cjk, agent-connect,
agent-models, agent-layout: 88 of 88.
- Rebased onto
|
||
|
|
93a33d8174 |
agent: OpenBot's icon, its requests named its own, its skills in the Library (SSNQT on X)
SSNQT on X, magpie 0.1.3503 on macOS, OpenBot (
|
||
|
|
03a800ac69 |
agent: OpenCode 2's config in its own words (kaising00 on X)
For an OpenCode 2 magpie wrote OpenCode 1's opencode.json: its provider
under `provider`, the small model as `small_model`, and `reasoning: true`
on models that reason. OpenCode 2 converts the first two in memory, but
it doesn't read `reasoning` and logged a WARN for each such model on
every load ("configuration normalization diagnostic ... omitted
unsupported legacy setting", reproduced with a real OpenCode 2.2.6).
Now the OpenCode that reads the file decides its words (openCodeTwo in
opencode_v2.go: the opencode on PATH, or a WSL distro's probed version,
now asked for opencode too). For 2.x magpie writes `providers.magpie` in
OpenCode 2's shape (openCodeNative), `agents.title.model`, and no
`reasoning`. A file written for OpenCode 1 moves over on the next sync:
openCodeFromV1 ports migrateStandardProvider (v2.2.6) so the user's keys
in magpie's provider (headers, timeout, setCacheKey, their own variants,
limit.output) go along; an empty `provider` is dropped; a small_model
that isn't magpie's stays. OpenCode 1, or an unknown version, gets the
same output as before. OpenChamber writes the same file and takes the
same decision, so the two syncs don't undo each other. mimocode, DevEco
Code and Air keep OpenCode 1's words.
Run:
- gofmt; go vet ./internal/agent for darwin, linux (-tags nogui) and
windows (mote): clean.
- go test -count=1 ./internal/agent on mote: ok, at the rebased head.
- win-run go test -run 'OpenCode|OpenChamber|WSL' ./internal/agent: ok.
- Real binaries on mote, sandbox HOMEs, `opencode debug config
--print-logs`: the file magpie now writes for OpenCode 2 loads in
OpenCode 2.2.6 with no WARN/ERROR, and resolves (model, agents,
providers) exactly as 2.2.6 resolves the OpenCode 1 file it replaces;
the OpenCode 1 file loads in 1.19.5 with no WARN, small_model and
reasoning intact. The old file in 2.2.6 still shows the reasoning WARN.
Broken by hand:
- openCodeTwo always false: TestOpenCode2WritesItsOwnWords,
TestOpenCode2MovesAnOpenCode1File, TestOpenChamberAndOpenCode2AgreeOnWords
and TestOpenCodeTwo red.
- moveProvider not carrying the v1 block over: the move test red on the
user's timeout.
- moveSmall off: the move test red on agents.title.model.
Not tried: a real OpenCode 1 desktop app reading a file written for an
OpenCode 2 CLI on PATH (it would see no magpie provider; 1.19.5 logs
`providers` as not representable); Air's bundled OpenCode version; a real
WSL distro with OpenCode 2.
|
||
|
|
e7fe52fdc3 |
minimax: follow the data folder MiniMax Code Desktop moved, not ~/.minimax (YujunT46308 on X)
YujunT46308 on X (magpie 0.1.3519, MiniMax Code 3.1.13 CN): with the app's data folder moved to another parent (localRuntimeDataParentDir), magpie went on writing ~/.minimax/config.yaml, which the app no longer reads. How MiniMax Code 3.1.13 finds it, read from its own app.asar (dist/main/modules/local-runtime/data-dir.js, resolveLocalRuntimeDataDirSelection; @mavis/config's config.js for the runtime): MINIMAX_DATA_DIR, then MAVIS_DATA_DIR, then the desktop setting, then ~/.minimax. Settings' data-folder move keeps the parent as config.localRuntimeDataParentDir in its electron-store file (storage.ipc.js: minimax-agent-cn-config.json for the China build, minimax-agent-config.json for the global one) in Electron userData, named by app-identity.js: "MiniMax" (CN) / "MiniMax Agent". The data folder is <parent>/.minimax. What changed: - appdir.MiniMaxDirIn resolves the folder in that order, reading the store under ~/Library/Application Support on a Mac and %APPDATA% on Windows. A missing, unreadable or unparseable store, or a parent that isn't an absolute string, is ~/.minimax, as electron-store itself reads a file it can't parse as its defaults. - internal/agent's MiniMaxDir (detection, connect, restore, Sync, Check) and internal/sessions' MiniMaxDir (Usage's calls) both use it; the Library's skills follow a.Dir. WSL's mcode still uses the distro's ~/.minimax (no desktop app there). - MAVIS_DATA_DIR joins agentenv's variables, so tests sandbox it. - agent-wiring.md and reference.md say where the folder comes from. Run: - On mote, the real MiniMax Code 3.1.13 CN arm64 dmg: launched with no setting, userData was ~/Library/Application Support/MiniMax holding minimax-agent-cn-config.json; with config.localRuntimeDataParentDir set to a folder, the next launch created <parent>/.minimax/config.yaml. appdir.MiniMaxDir() against that real store printed <parent>/.minimax. (The test data I made on mote was removed after.) - mote-run go test -count=1 ./internal/appdir ./internal/agentenv ./internal/sessions ./internal/library: ok. ./internal/agent -run 'MiniMax|Minimax|WSL|Env|Spelled|Handwired': ok. - win-run go test -run MiniMax ./internal/appdir ./internal/agent ./internal/sessions: ok, TestMiniMaxDirIn and TestMiniMaxCodeMovedByDesktop ran (not skipped) with %APPDATA% paths. - gofmt -l clean; go vet of the touched packages for darwin, windows and linux (nogui, CGO off) ok. Broken by hand: with the desktop store read turned off, TestMiniMaxDirIn and TestMiniMaxCodeMovedByDesktop go red (the folder reads as ~/.minimax). Not tried: the Windows desktop app itself (userData %APPDATA%\MiniMax is Electron's appData plus the app name, the same rule seen on the Mac); the global build's store with a real install; a store mid-rollback (the app's guard writes the restored parent back to the same key on its next launch). A user who also runs the mcode CLI without MINIMAX_DATA_DIR has it on ~/.minimax, which magpie now leaves alone while the desktop folder is moved. |
||
|
|
031938ca97 |
antigravity: 2.30 reads its gateway from ~/.gemini/config/config.json; magpie writes both (YujunT46308 on X)
Antigravity 2.30.0 moved the Enterprise Gateway settings from ~/.antigravity/settings.json to ~/.gemini/config/config.json (same gateway/models schema, beside the app's userSettings and plugins). Each version reads only its own file and an update copies nothing across, so a wiring made for 2.29 left 2.30 off magpie, on every OS (the report was Windows). The AGY_LLM_GATEWAY_* variables and admin paths are unchanged. magpie now writes the same gateway block, listSource and defaultModelId into both files, each with its own stash, and puts each back on disconnect (config.json keeps userSettings/plugins; a config.json that isn't there is not created on disconnect). Sync carries a wiring made by an older magpie into config.json at the next start, at the level the wired file starts on. Check judges each file. Run: - Windows (xiaomi-gpu, real 2.30.0 per-user install, sandbox USERPROFILE/APPDATA): language_server.exe headless as the hub. With only settings.json wired (what magpie wrote before) it lists no models and never resolves a gateway catalog: the report reproduced. With this magpie.exe (serve, provider add, `antigravity magpie/up/g3`): config.json gets the block beside userSettings, the LS logs "Resolving models from Tier 2 (Remote catalog listSource: http://127.0.0.1:3640/v1/models" and GetAvailableModels returns up/g3. `antigravity default` gives config.json back as it was and settings.json as {}. - macOS (mote, real 2.30.0 language server headless): origin/main's magpie wires, then this tree's `magpie serve` syncs config.json, 2.30 resolves Tier 2 from it; off restores both files. - win-run go test -run ^TestAntigravity ./internal/agent: ok. - mote: go test ./internal/agent; -run Antigravity ./internal/gateway ./internal/gui; gofmt -l; go vet ./internal/agent; GOOS=linux go vet -tags nogui ./...; GOOS=windows go vet ./...: all ok. Broken by hand: config.json left out of antigravityFiles -> TestAntigravityConfigJSON and TestAntigravitySyncWiresConfigJSON red; Sync not connecting an unwired file -> TestAntigravitySyncWiresConfigJSON red. Not tried: a chat turn from the real 2.30 GUI app (only its language server, headless); Linux's 2.30 build (same language server code path, same home-relative file); whether the agy CLI reads config.json (it has its own ~/.gemini/antigravity-cli/settings.json row, untouched). |
||
|
|
5426c43cca |
gateway: DSH's compaction leaves a provider out of its limit for the same model elsewhere (qtwaiter on X)
qtwaiter's DSH chat ran on WorkBuddy's deepseek-v4.1-flash until
WorkBuddy rate-limited it. A switch to Trae CN's deepseek-v4.1-flash
failed with the same 429 ("WorkBuddy: 您的使用量已超出频率限制 ...
(out of its allowance: not asked again before ...)"), while DSH's own
DeepSeek route switched fine. compaction-basic (0.2.2-rc.1, agent/request
hook) compacts on the model it switches away from before a turn on
another, whenever the history is over the new model's threshold (Trae CN
lists the model at 200000/64000, so ~84K; DSH's own routes are 1M and
never compact), and fails the switch with MODEL_SWITCH_COMPACTION_FAILED
when that compaction is refused. The compaction went to WorkBuddy, which
magpie held as out of its allowance, so every switch failed.
Now a dsh compaction whose provider has every key or account resting
(quotaHeld or timedHeld over its candidates) goes on the same model from
another provider (provider.AutoGroupOf), the widest window that is
served, allowed to the key and not resting itself
(dshCompactElsewhere in dsh_compact.go). The route records it as
Moved{Why: "dsh-compact-rested"}, which the Routing page explains in
five languages. With no such provider it stays as asked with a log
line. A compaction model set on dsh's row (#5395) is still read first.
Run (mote):
- go test -run TestDshCompact ./internal/gateway/: ok.
TestDshCompactLeavesRestedProvider replays the screenshot's case:
turn on workbuddy 429 (Retry-After 3600), compaction then served by
trae-cn/deepseek-v4.1-flash with WorkBuddy not asked again, the next
ordinary turn still held. Red on the old code with the reporter's
exact 429 text. TestDshCompactStaysUnlessRested: not resting, no other
provider, another agent all stay.
- go vet ./internal/gateway/ on darwin, linux (nogui) and windows; gofmt.
- go test -count=1 -timeout 45m ./internal/gateway/: ok (908.8s)
- GUI (chromium + webkit, 5 languages, 2 widths): dsh-compact-model
20/20, routing-moved-why 20/20, i18n-keys 4/4, i18n-en-no-cjk 4/4.
At the pushed head (rebased): go vet and the TestDshCompact tests ok.
Broken by hand: skipping the stand-in (`false && m != ""`) turns
TestDshCompactLeavesRestedProvider red; removing the client.js case turns
dsh-compact-model red. Both restored.
Not tried: the real DSH app with a rate-limited WorkBuddy account. A
switch away from a model no other provider serves still fails while its
provider is out of its limit; the compaction model square covers it.
|
||
|
|
60f0433d1b |
dsh: a model of its own for DeepSeek Harness's compaction (Musikrv77852 on X, #5395)
DSH compacts on the session's latest model (compaction-basic with no summarizationModel). A session on magpie/workbuddy/deepseek-v4.1-flash switched to another model compacted on WorkBuddy first, got 429, and the switch failed. DeepSeek Harness's opened row on the Agents page now has a "compaction model" square (compact_model), offered once dsh is on magpie's route. It is magpie's own Live setting (settings.DshCompactModel), so nothing is written into dsh's profiles and no restart is needed. The gateway moves a dsh compaction to it (dshCompactTo, Route.Moved why "dsh-compact") when the model is enabled, served by its exact id and allowed to the key; else the compaction stays as asked with a log line. The Routing page says why. On magpie's llm-pi-ai routes DSH sends no x-deepseek-harness-compact mark, so its compaction is now known by compaction-basic's own ask (@deepseek-ai/dsh-compaction-basic 0.0.1-rc.3, the latest) in compactAsks. As a result DSH compactions show as Compaction in Usage and Routing, and a group's Compact rule reaches them too. The options are spelt magpie/<id> like the model field's, so `magpie dsh deepseek/flash` still sets the model (fieldForValue gives a bare value to the first field offering it). CLI: `magpie dsh compact_model magpie/deepseek/flash`; API: /api/set. zh, zh-TW, ja and de strings added. Run (mote): go test -count=1 -timeout 45m on internal/gateway, provider: ok at the base before the rebase on 0842bc517; agent, gui, settings, settingsapi, and the gateway's TestDsh/TestCompacting/ TestRuleCompact: ok at this head. The first agent run caught the square reading dsh's profiles at a stopped WSL distro (TestWSLColdPlaceOpensNothing, #3896); its options now look at nothing at a cold place. go vet on darwin, GOOS=linux -tags nogui and GOOS=windows: clean. gofmt clean. GUI in chromium and webkit: dsh-compact-model (new, 5 languages x 2 widths), desktop-subagent-model, codex-subagent-model, routing-moved-why, i18n-keys, i18n-en-no-cjk, claude-subagent-effort-row, codex-start-model-field, model-test-why and agent-connect-no-models: 140 of 140 pass; after the rebase (i18n.js changed upstream) i18n-keys, i18n-en-no-cjk, dsh-compact-model and routing-moved-why 48 of 48. Broken by hand, each red: dropping the compactAsks line (TestCompacting, TestDshCompactMoved on all three protocols), skipping the move in serve (TestDshCompactMoved), dropping the agent check (TestDshCompactLeft's other agent), taking the square out of extra() and dropping the routing story's case (dsh-compact-model.test.cjs). Not tried: a real DeepSeek Harness desktop app (none on this Mac or on mote); the compaction text was checked against the npm package's source. DS Bot's requests can't be told from dsh's, so its compactions follow the same setting, though it has no square of its own. |
||
|
|
b922e51685 |
agents: nanobot gets magpie as a provider of its own (Niapyaya on X)
nanobot (HKUDS/nanobot, pip install nanobot-ai) is now an agent magpie connects. Its config is read from its own source (5c72ced, 0.4.1): ~/.nanobot/config.json, camelCase or snake_case keys, any extra key under providers an OpenAI-compatible endpoint whose name is stripped from the model. magpie adds providers.magpie (apiBase at the gateway's /v1, its key, and extraHeaders User-Agent nanobot), and sets agents.defaults provider magpie, model magpie/<id> and contextWindowTokens when the window is known. What the user had there, both spellings, and a modelPreset that would go over magpie's model, is stashed and put back on disconnect, the window as a number. A file magpie made goes again. Also in WSL distros, with a notice in every language, the icon (a tile in app.css's rule), READMEs, site list, docs/reference.md and agent-wiring.md. Run: - real nanobot 0.4.1 on mote in a sandbox HOME (~/nbsb), a sandbox gateway on 47812 over a fake OpenAI upstream: `magpie nanobot magpie/fakeup/m1` wrote the config and kept the user's relay provider and channels; `nanobot agent -m ping` answered "pong from fake upstream"; the upstream saw POST /v1/chat/completions, model m1, UA nanobot; `magpie nanobot default` put relay/glm-4.6 back exactly. - go test ./internal/agent ./internal/gui ok; ./internal/gateway and ./internal/cli -run 'Client|UA|Agent|Empryo' ok; go vet darwin, linux -tags nogui, windows ok; gofmt -l clean. - GUI, chromium 110/110 and webkit 65/65: i18n-keys, i18n-en-no-cjk, agent-notice-lang, gui-de, gui-ja, gui-zh-tw, icon-one-tone, icon-tile, routing-client-icons, usage-agent-filter-icons, agent-connect, agent-models, agent-layout. Broken by hand, each red in TestNanobot: modelPreset not stashed (preset left over magpie's model), the made file not removed, and the window restored as a string. Not tried: a real vendor behind the gateway (fake upstream only), nanobot's long-running `nanobot gateway`/WebUI picking the change up live, and WSL. |
||
|
|
91fb441843 |
antigravity: effort stays selectable in the app's own picker
YujunT46308 on X: "antigravity 接入 magpie 会导致模型的 effort 不可选".
Antigravity's picker (main.js served by its 2.29.0 language server)
offers effort only by grouping catalog entries named "<name> (Low)",
"(Medium)", "(High)", "(XHigh)", "(Max)" under one row with an effort
submenu, two levels or more. magpie's listSource catalog listed each
model once, so no model of magpie's had an effort control.
Now /v1/models?format=antigravity lists a model with two or more of
those levels once a level, "<id>:<level>" named "<name> (<Level>)".
The app sends the chosen entry's id, and the gateway's existing
":level" suffix handling sends that level upstream, ahead of the row's
pick and of the app's own reasoning_effort (low whatever was chosen,
in a 2.29.0 run). models.defaultModelId names one of those entries
(gateway.AntigravityModel: the row's effort fitted, else medium, else
the lowest), since an id the catalog doesn't list starts the app on
its first model; Sync moves a file written before onto a level. The
row's effort sets the start level and still applies to models with
fewer than two levels. The model field shows the id without the level.
Run:
- Real Antigravity 2.29.0 language server + its UI in Playwright
Chromium on mote, sandbox HOME, magpie built from this tree serving
a fake upstream listing g3 with low/medium/high: `magpie provider
add`, `magpie antigravity magpie/up/g3` wrote defaultModelId
"up/g3:medium"; the picker shows one "g3 · up" row with Low, Medium,
High (starts on Medium); picking High and sending "ping" reached the
upstream as model g3 with reasoning_effort "high" (the app's title
call went at medium, the start level). `magpie antigravity default`
left {} as before.
- go test -tags nogui ./internal/agent ./internal/gateway -run
Antigravity on mote; gofmt -l; go vet of both packages;
GOOS=linux go vet -tags nogui ./...; GOOS=windows go vet ./...
- Full suite on mote, go test -tags nogui -timeout 45m ./... at this
commit on origin/main
|
||
|
|
b3a57b3d8f |
codex: turning the takeover off restarts the Codex app, so its ChatGPT projects come back
Herzz____ on X, the Windows Codex app: with Codex through magpie the sidebar's project list is empty; they use magpie only when their subscription runs out, and want to switch between magpie and the native sign-in with the projects whole each way. What happens. When the ChatGPT account is used up, magpie becomes Codex's provider (codex.out) without requires_openai_auth: on that account the app's composer gate greys Send for every model, magpie's too (#540). Checked again in ChatGPT.app 26.1029's bundle: the gate picks the account's own snapshot (limitName null) whenever it is blocked, before any per-model additional_rate_limits, so keeping the account during the takeover would still grey Send. The app-server then answers account/read with no account and the app hides its ChatGPT projects and chats ( |
||
|
|
92e8edd7fc |
windows: magpie is listed in Installed apps, and its Uninstall puts every agent back
Jevik_AI on X uninstalled magpie and rebooted, and Codex's config.toml still had openai_base_url = "http://127.0.0.1:3425/backend-api/codex"; Rk1ngggg asked whether an update cleans it. magpie's own uninstall (Settings › About › Uninstall magpie, `magpie uninstall`) already disconnects every agent and takes Codex's leftovers (#3866), but on Windows magpie wasn't in Settings › Apps › Installed apps, so it was removed the way Windows offers for a program it doesn't list: by deleting the exe and folders, which runs no code. shortcut.Ensure now writes HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\magpie (DisplayName, DisplayIcon, Publisher, InstallLocation, UninstallString, URLInfoAbout, NoModify, NoRepair) at every installed start, beside App Paths, and Remove (uninstall's System step) takes it out the same way: only while it names this exe, or an exe that is gone. Its Uninstall runs `magpie.exe uninstall --window` (shortcut.UninstallArgs). magpie.exe has no console, where the terminal's `magpie uninstall` would refuse for want of one to ask on, so those exact args open the app's window (or forward to the running app, OnSecondInstanceLaunch) on Settings › About with Uninstall magpie's question asked (uninstallView, ?uninstall=1). It asks once: a redraw of Settings doesn't ask again, and Cancel removes nothing. magpie web opened at that link asks nothing. Deleting the app by hand still runs no code (macOS drag-to-Trash included); agent-wiring.md says so. Run on mote at the pushed head (rebased onto |
||
|
|
39569d5604 |
claude desktop: an optional Claude Magpie app beside your own Claude (#5671)
baranwang on X asked to keep Claude Desktop's own (1P, Anthropic) sign-in while using magpie. Turning on "Separate app" in Claude Desktop's row on the Agents page (or `magpie claude-desktop launcher add`) moves magpie's 3P wiring into ~/Library/Application Support/Claude-Magpie-3p and adds ~/Applications/Claude Magpie.app. That launcher opens Claude.app with --user-data-dir on that folder, so it runs side by side with the user's own Claude.app. Its icon is Claude's icon with a magpie badge. Off is the default, and turning it off (`launcher remove`) moves the wiring back and removes the app. It is macOS only: Desktop's packaged app strips CLAUDE_USER_DATA_DIR, and on Windows it hardcodes LOCALAPPDATA\Claude-3p. The folder ends in -3p because Desktop adds -3p to any other name. Restarting the isolated app ends only its own process (pkill on its --user-data-dir) and opens the launcher again. Run at 1b25cda26 (this change on origin/main |
||
|
|
88b541a25c |
images: every pointer names Settings › Models › Images, where the page is
The image models moved under Settings › Models, but the Library's Magpie
Image sheet, the MCP server's instructions to agents, the gateway's
"no image model" errors, the video tool's text and the docs still sent
users to "Settings › Images", a tab that no longer exists (the scattered
settings audit after netube99 on X). Every user-facing string now names
Settings › Models › Images in en, zh, zh-TW, ja and de, as do the site's
Qwen docs (en, zh, ja), llms-full.txt, the subsystem pages and comments.
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
2b22425b45 |
agent: Claude Science in a WSL distro is found and run on magpie from Windows
shuitunlulu_ (Discord) has Claude Science in WSL2, and Windows magpie didn't find it. It is now a WSL twin (claude-science@wsl:<distro>), found by the probe's claude-science (~/.local/bin or PATH). Its daemon is restarted there through wsl.exe with ANTHROPIC_BASE_URL set, the same steps as this machine's (claudescience.go is now one scienceHost for here and for each distro), and v0.1.3334's keeper puts it back on magpie in each running distro that has a note (claude-science-wsl-<distro>.json). With no note, nothing runs in WSL. The daemon takes http only to a loopback address and sends its Claude sign-in as the key. In mirrored networking it gets the gateway's address. Under NAT magpie starts a relay in the distro: socat on 127.0.0.1:<gateway port> to Windows' WSL address. The daemon gets http://127.0.0.1:<port>/<WSL key>; the gateway's lanGuard takes the key off the path (takeWSLPathKey) before fromWSL judges it. Connect says so when the distro has no socat. Disconnect stops the relay with the connections it forked, as one process group. When Windows' firewall keeps WSL out, the row shows the same firewall drift and rule as other WSL agents. Run: - gofmt -l clean - go vet: darwin, GOOS=linux -tags nogui, GOOS=windows (mote) - go test ./internal/agent ./internal/gateway on mote (macOS) - go test ./internal/agent on xiaomi-gpu (Windows 11): 26 FAIL; 25 fail the same at origin/main |
||
|
|
f1a4b57511 |
agent: Claude Science goes back on magpie after its app starts its own daemon
shuitunlulu_ on Discord: after magpie connected Claude Science, it went
back off magpie. The daemon reads the gateway only from its environment's
ANTHROPIC_BASE_URL. The 0.1.72 app (Electron) attaches its window to a
daemon running; with none it starts its own (`serve --stdio
--adopt-install`, launch_context app-child) in its own environment, which
has no such variable. Its "let the app run it instead", and the offer it
makes once it updated past the daemon, stop magpie's daemon to do the
same. The keeper only started a daemon when none ran, so the app's stayed.
KeepClaudeScience now puts magpie's daemon back on the port the other was
on (stop, serve --detached with the variable) in three cases: a daemon
magpie didn't start, one started for the gateway's old address, or its
own older than the program installed (`--version`, asked again only when
the file changed). It does this only when status says no session runs
(active_frames and active_conversations 0; a status without them counts
as busy). It never touches one launchd or systemd keeps, and does it at
most three times an hour. It reads operon.lock every 10s and asks status
when the lock's pid changed or a minute went by.
Run:
- go test ./internal/agent (mote): ok 261s
- gofmt -l, go vet for darwin, linux and windows (mote): clean
- Real Claude Science 0.1.72 on mote, the keeper driven through a
throwaway test (not committed) against the real claude-science:
- App attached to a terminal daemon: status parsed (idle, terminal),
the daemon was replaced on port 18481 and the new one has
ANTHROPIC_BASE_URL. shell.log says "adopted daemon restarted
(45446 → 89598) — following the successor", so the window carried on.
- App opened with no daemon: it started its own (app-child, port 8000,
no ANTHROPIC_BASE_URL in ps -E). The keeper replaced it on 8000 with
the variable, and the app showed its "stopped from the command line"
screen. Reopening the app attached it to magpie's daemon
(ADOPT-RUNNING).
- Broken by hand, each red: no idle check (the busy and unknown-status
cases), no retake cap, no version skew, no lock-pid trigger.
Not tried:
- The screen's "start it again in the app" button (read in main.js:
runInvariant adopts the daemon running; reopening the app did the
same).
- A daemon with a session running: one would need a Claude sign-in.
The fake covers it.
- The Windows attach shell, and Linux.
Reported-by: shuitunlulu_
|
||
|
|
d1f8d8aae7 |
agent: Cherry Studio adds magpie through its providers link (plugins#865)
Cherry Studio (CherryHQ) shows on the Agents page, and with
`magpie cherrystudio`, on macOS, Windows and Linux. Its row is the link
its main process takes, cherrystudio://providers/api-keys?v=1&data=, with
the gateway at <gw>/v1 as an OpenAI-compatible provider named magpie and
the named key agentKeyAt("cherrystudio"). Cherry Studio asks the user to
confirm it. magpie writes nothing into its store. "Added" is read
untouched from its 2.x database (Data/cherrystudio.sqlite, user_provider),
in the default userData and every one boot-config.json moved it to. A
database or boot-config that can't be read, or a 1.x userData (Local
Storage, no database), is unknown. The data is standard base64, because
Cherry Studio swaps raw + and / before parsing and back after. /api/open
lets that link through. aionui's database status is generalized into
dbStatus{has} so both apps share it. Icon: Cherry Studio's own logo, not
cherryin-color (a different product).
Run (mote, at this change on origin/main c66cdbea9; then rebased on
|
||
|
|
cdf734757a |
agent: OpenMausBot gets magpie's models back, and a Restart for a list it hasn't read
maxleebeta (Discord #feedback, 11-08) picked Antigravity's models in
magpie, and OpenMausBot's model search didn't find them. magpie wrote them
correctly: a sandbox with an Antigravity sign-in lists
antigravity/gemini-3.8-flash[1m] and the others in config.json. OpenMausBot
loses them in three ways, each reproduced on the real app:
- it reads config.json once, at start, so a list magpie writes while it
runs never reaches its picker;
- a change to any engine in its Settings writes back every engine as it
held them since it started, so magpie's newer list is replaced by the
old one;
- an edit of magpie's engine there (updateClaudeEndpoint) keeps only the
model picked.
Nothing in magpie wrote the list again: a sync runs on a catalog change,
or when magpie starts.
- KeepOpenMausBotListed (gateway.WhileServing, every 30s) writes magpie's
list again when the file lists other models (ombListStale). The model
picked in OpenMausBot (ANTHROPIC_MODEL) and its other engines stay. It
isn't a Check drift: that reads as unwired, and a port change rewires
only agents without one.
- OpenMausBot gets a Restart on its Agents row (restartApps: OpenMausBot.app,
OpenMausBot.exe; appReads: ombPart = gateway, first model, list, not the
key), so one running on an older list is offered a reopen. Its own save
of the same engine after it starts doesn't count.
The same gap in NewMax, LiveAgent, OpenPencil, OpenBot, Pencil and ZCode
is #5662.
Run (mote, at this tree rebased on origin/main 00198b26e;
|
||
|
|
06324e99e8 |
automode: say that Claude Code may have no local check behind a gateway
chenxiang0010 saw "Auto mode can't check actions in this session ... your requests go through 127.0.0.1:3425, which doesn't pass it through". magpie's comments and the gateway-routing and agent-wiring pages said that Claude Code, finding no safeguard_results, classifies locally. Claude Code 2.1.312 to 2.1.316 (read from their bundles) turn that local classifier off behind a non-Anthropic base URL when Anthropic's per-account flag tengu_bright_dragonfly is "all" (PA(), bbt(): auto_mode_side_calls_retired, localClassifierSwitchedOff). A call with no server verdict then gets "No classifier runs for this session", and each action the check would judge asks for approval. 2.1.314 adds the text for CLAUDE_CODE_AUTO_MODE_SERVER=0: "Claude Code no longer has a check of its own to use instead". So on a route only Anthropic doesn't answer (another vendor's model, another subscription's Claude, a translated route, a relay that drops the fields), auto mode has no check at all for such an account. magpie can't answer one on Anthropic's behalf. The reviewed routes (Anthropic's API, a relay passing the fields, the Claude subscription bridge) still carry the beta, safeguards and safeguard_results as before. Comments and docs only, no change in behaviour. Not changed: answering 400 naming safeguards on an unreviewed route, as Claude Code's gateway spec allows. It sets a refused latch for the session, so a later /model to a reviewed Claude stays unchecked, while the strip loses nothing. Run: gofmt -l internal (clean); go vet -tags nogui ./internal/gateway ./internal/agent on mote (ok). Not tried: a real Claude Code run, since the flag is Anthropic's per account and the reporter's route is unknown. Reported-by: chenxiang0010 (Discord) |
||
|
|
21a89fa4e8 |
liveagent: a model or provider of magpie's deleted in LiveAgent stays out
zero2sin on Discord: every LiveAgent restart brought back magpie's three providers as magpie wrote them (one Anthropic model, two OpenAI providers of twenty or thirty models each) over what they had edited in LiveAgent. LiveAgent's developer pointed at magpie, rightly: SyncCatalog runs at magpie's start and on every catalog change, and LiveAgent's Sync wrote every model of magpie's into magpie, magpie-responses and magpie-anthropic each time. A model the user deleted, or a whole provider of magpie's, came back on the next sync, and LiveAgent read it at its next start. TestLiveAgentProvider even asserted that a model missing from the file is put back. magpie now remembers, per config.json, which of its models and providers LiveAgent has had (liveAgentKept, in the stash). One gone from the file since is the user's: it stays out until they put it back in LiveAgent, or turn magpie off and on for LiveAgent. A model new to magpie's list is still added, once. A provider of magpie's whose models the user all deleted is left as they have it. The user's own providers were never touched and still aren't. LiveAgent's backend writes back what it holds on any settings change, so a model magpie adds while LiveAgent runs is dropped by its next save without the user doing anything. Such a model is held as pending under the LiveAgent/k-brain pids then (liveAgentPIDs, pgrep): missing under the same pids, or after LiveAgent quit, it is written again; once other pids run (LiveAgent restarted and read it), it counts as had. Windows can't be asked what runs, so there each counts as had at once. Run (wsl-run, magpie-desktop; mote's disk is full, 553MB free): gofmt, go vet ./internal/agent for linux, windows and darwin, go test ./internal/agent: every test passes but TestGrokInstalled, red on WSL2 at main too (#3548, Windows binfmt interop takes the fake grok). On mote before its disk filled: go test -run TestLiveAgent -v ./internal/agent, all 10 pass. New tests: TestLiveAgentKeepsWhatTheUserTookOut (the reporter's case: magpie-anthropic and a Chat model deleted, a provider of their own added; two syncs leave the file byte for byte; a new magpie model is added once; a model put back stays; off then on gives everything back), TestLiveAgentAddedWhileRunning, TestLiveAgentAddedThenQuit. TestLiveAgentProvider now expects a deleted model to stay out and a model new to magpie to be added on and last. Broken by hand: take() returning want unchanged (the old behaviour) turns TestLiveAgentProvider, TestLiveAgentKeepsWhatTheUserTookOut and TestLiveAgentAddedWhileRunning red ("sync 0 undid the user's edits"); wrote() marking every added model as had turns TestLiveAgentAddedWhileRunning and TestLiveAgentAddedThenQuit red. Not tried: a real LiveAgent; the reporter's own config.json; a LiveAgent that saves over a pending model and is restarted before any sync (reads as the user deleting it, documented); baseUrl/apiKey/type edits on magpie's providers are still magpie's and are written back. Reported-by: zero2sin |
||
|
|
61394481c7 |
agent: DeepSeek Harness Desktop is found on Linux (AUR, .deb, AppImage entry)
xianhongtao (magpie 0.1.3232, Arch Linux) has DeepSeek Harness Desktop
from the AUR (deepseek-harness-desktop 0.2.2rc.1-1) and no dsh CLI.
magpie knew the app on macOS and Windows only, so it said "DeepSeek
Harness CLI not found ~/.dsh/profiles/web/cordis.patch.yml".
HasApp for dsh now also finds the Linux app (linuxApp, desktopapp_xdg.go):
- a folder holding the Electron executable deepseek-harness with
resources/app.asar beside it: /usr/lib/deepseek-harness-desktop (the
AUR's) or /opt/DeepSeek Harness (electron-builder's .deb/.rpm);
- or the app's desktop entry in the XDG data dirs (XDG_DATA_HOME first,
then XDG_DATA_DIRS, the first file of a name wins, Hidden=true hides
it): Name=DeepSeek Harness, Type Application, MimeType holding
x-scheme-handler/dsh, and its Exec program there (on PATH, or an
absolute executable file: an AppImage anywhere). Scans of a folder are
kept by its mtime, trusted only when read over a second after it
changed and for a minute at most.
Linux only; macOS and Windows keep their own checks.
Siblings: everything reading HasApp for dsh follows: the profile a fresh
~/.dsh gets (profiles/desktop), the desktop lead and notices, cliHeld and
CLIMissing (so the GUI's and the CLI's "CLI not found" go away). The
"running" check for noticeDsh2 also knows deepseek-harness, the app's
Linux executable. With both profiles present (the reporter's case) Path
stays profiles/web as on macOS; the desktop lead picks the model shown.
Run (mote, through mote-run):
- go test -count=1 -race -run 'TestDshLinux|TestDshDesktop|TestCodexLinux|Lody' ./internal/agent/: ok
- go test -count=1 ./internal/agent/ ./internal/gui/ ./internal/cli/: ok
- gofmt -l clean; go vet ./...; GOOS=linux go vet -tags nogui ./...;
GOOS=windows go vet ./...; GOOS=linux/windows go build: ok
Run (wsl-run, magpie-desktop, Ubuntu 24.04): the TestDshLinux tests
-count=3: ok. The first WSL run caught a stale scan of a folder made
again within the same mtime tick; the 1s rule fixes it.
Broken by hand (mote), each red, then restored:
- installed() without onLinux: all three new tests red ("the AUR's app:
app false, CLI missing true", "the AUR's entry, its program on PATH,
not found", the profile = profiles/web, want profiles/desktop);
- no scheme check: "another app's entry taken for DeepSeek Harness's";
- no Hidden check: "an entry the user hid still counts".
Not tried: a real AUR, .deb or AppImage install of DeepSeek Harness
Desktop (the fixtures are the AUR PKGBUILD's entry and layout as the
reporter gave them, and AppImageLauncher's entry shape); the GUI suite
(no GUI file changed). The full suite runs after the push.
Reported-by: xianhongtao (Discord)
|
||
|
|
e9bde2520d |
codex: OpenAI's threads follow Codex onto magpie from a provider of the user's, and a move the budget stopped asks for the next sync (Lice9735 on X)
Lice9735 on X, Windows, magpie 0.1.3233, Codex app 26.1104: an old chat (10-13) answered "模型提供商不匹配 — 此聊天使用的是 OpenAI,但你当前 的提供商是 magpie。请切换至 OpenAI 以继续", only a new chat worked, after |
||
|
|
e6cdeac9c6 |
proc: with no WSL distro registered, or after wsl.exe asks to be updated, magpie starts no wsl.exe (TraderX219 on X)
TraderX219 on Windows: while magpie ran, a console window "WSL 必须更新到 最新版本……按任意键安装" came up every 20 to 30 seconds. magpie asked wsl.exe for its distros (the running list retries every 30s after a failure), and Windows' inbox wsl.exe answers each run on a computer without a current WSL package by starting `wsl.exe --update --confirm --prompt-before-exit` in a console of its own. proc.Command, CommandContext and ProbeContext are where every wsl.exe magpie runs is made (agent's wslRun/wslExec, wslrun, claudetui, the library's rtk and MCP checks, the gateway's TUI helper), so both gates sit in wslOff beside #1264's ErrWSLOff: - The registry is read first (HKCU\...\CurrentVersion\Lxss, one subkey with a DistributionName per distro). With the key there or gone and no distro in it, wsl.exe isn't started: ErrNoWSLDistro. agent's wslList and wslrun's running list read that as "no distros", not as a failure or a hang, so nothing is retried every 30s. It is read at every start, so a distro installed later is seen at once. A read that fails is unknown: wsl.exe is asked as before. - When a run's output (UTF-16LE or UTF-8, stdout and stderr) says WSL must be updated or installed, proc.WSLSaid writes settings' wsl-update mark (atomic, like wsl-hung) and no magpie process starts wsl.exe for 6h: ErrWSLNeedsUpdate. The mark holds the WSL package version (HKLM Lxss\MSI Version) and the registered distros; a change to either clears it. A refused listing is unknown, so wsl.seen, WSLKept values and links are kept, never removed. docs/subsystems/agent-wiring.md describes both. Run: - mote: gofmt -l (clean); go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./...; go build for darwin, linux (nogui), windows: all ok. - mote: go test -count=1 of internal/proc, agent, wslrun, library, sessions, claudetui at base |
||
|
|
32fc5809e1 |
agents: OpenMausBot gets magpie as an engine of its own, written as its own Claude endpoints are (a user on X)
A user on X asked for OpenMausBot (github.com/milind-soni/OpenMausBot,
read at 516ca75; released 0.1.145). Its bots run on engines from
`instances` in ~/.openmausbot/config.json ($OMB_DATA_DIR,
server/config.ts:713). Without this, a Claude bot reached magpie only
through ~/.claude/settings.json, and its picker listed Claude's static
models alone: OpenMausBot doesn't read the model from env
(readClaudeModelCatalog, claude.ts:296-316).
- openmausbot.go writes `instances.magpie` in the shape of OpenMausBot's
own "Claude endpoint" (newClaudeEndpoint, claude-endpoints.ts:91-139):
- driver claudeAgent, access custom
- config.configDir is <data>/providers/magpie. Given that,
OpenMausBot starts Claude Code with that CLAUDE_CONFIG_DIR and
strips account keys the engine doesn't set (claudeEnvironment,
claude.ts:111-136, 158-179), so the engine owns its routing.
- requireApiKey
- ANTHROPIC_BASE_URL, AUTH_TOKEN, API_KEY and MODEL point at the
gateway
- endpointModels holds magpie's models, kept to the ids
CLAUDE_MODEL_ID accepts. One bad id makes OpenMausBot refuse the
whole engine (claude.ts:636).
- A non-empty `instances` is the whole fleet (config.ts:1173). With
none saved, magpie writes DEFAULT_FLEET (instance-fleets.ts) beside
magpie, stashed as openmausbot.fleet. Off takes the fleet out again
if the user hasn't changed it.
- What stays the user's: the engine's name, a model they picked from
the list, their other env and an inherited `cli`.
- Check reports the base URL drifting away from the gateway.
- OpenMausBot reads config.json once at start (index.ts:780), and an
engine edited in it writes back the fleet it holds
(routes/instances.ts:132, config.ts:997-1012). So Set is refused
while it runs (errOMBRunning), and the notice asks to quit it first,
since Windows can't tell.
- ListOnly, ListsModels, OMB_DATA_DIR in agentenv. The icon is
OpenMausBot's build/icon.svg (Apache-2.0).
- i18n in zh, zh-TW, ja and de. Docs: reference, agent-wiring, both
READMEs.
- Codex bots use ~/.codex (codex.ts:373-386), which the Codex wiring
already covers.
- The agent package's TestMain holds ombRunning false. An OpenMausBot
open on the test machine refused every test that turns magpie on for
each agent: my own sandbox OpenMausBot on mote turned
TestSyncKeepsAnAddressOnAnotherMachine, TestListOnlyAgentsReadConnected
and TestReverseProxyIsStillMagpie red. With a process named
openmausbot running, they now pass. LiveAgent's, OpenPencil's and
NewMax's running checks have the same hole and are left to #5587.
Run (all on mote):
- gofmt -l: clean
- go vet ./... on darwin, GOOS=linux -tags nogui and GOOS=windows: ok
- go build for the same three targets: ok
- go test -tags nogui ./... -timeout 45m at e1453a168 (this change on
origin/main
|