f2eb56c6bbde1300dddc402861b59cd4e45e0215
249
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7bc602236b |
library: the MCP hub is called the MCP router
The owner asked why it was a "hub". Composio calls the same thing a Tool Router; "router" says what it does (one server that routes each call to the right one), and "gateway" is taken by magpie's LLM gateway. Only the words change: MCP router / MCP 路由 / MCP 路由 / MCP ルーター / MCP-Router, "Router address", and the CLI's `magpie library mcp router on|off`, where `hub` still works. The URL /mcp/magpie/hub, the mcpHub setting, the servers/hub API and the Go names stay, so nothing a user or an agent config holds changes. docs/subsystems/mcp-hub.md moves to mcp-router.md and the pages that link it follow. #4382's new words follow too: "Through the MCP router", "Not through the router" and their hints in every language, and the CLI's `magpie library mcp router <name> shared|direct` (`hub` works there too; library_hub_test.go says router for direct, hub for shared). Run at e2583df31 (this stack on |
||
|
|
b78b1de003 |
library: magpie-image is behind the MCP hub, saving into the calling agent's project
magpie-image was the one MCP server the hub left out, because it saves what it makes on disk and needs to know whose project that is. The hub now serves its tools like any other server's and tells it where the caller works: 1. the hub answers a tools/call as SSE and asks the agent roots/list on that stream (3s), as Claude Code answers; 2. else Codex's _meta x-codex-turn-metadata.workspaces (git repos only); 3. else the Codex thread's cwd from its session file (sessions.CodexThreadCwd), only with session consent; 4. else none, and the image goes to ~/Pictures/Magpie as before. The hub passes `magpie/roots` and `magpie/client` in the call's _meta; imagemcp saves into the first root and names the agent on its usage row. Its result carries `magpie/model`, which the hub's own usage row takes, so the row says which image model drew it. A WSL agent keeps magpie-image as its own entry (the hub can't reach a path inside the distro). docs/subsystems/mcp-hub.md (mcp-router.md after the next commit), gateway-routing.md and gateway-sessions.md say so. It is rebased on #4382 ( |
||
|
|
2570efb5f7 |
gateway: an image the picked model can't describe is described by the next model that sees (kelvinjason11 on X)
kelvinjason11 on X: "图片识别好像只支持一个模型识别 没有fallback". When
the describer (Settings' Image recognition model, or AutoVision's pick)
failed, the turn failed with it, though other models that see were there.
Now describeWith asks the pick first, always. When it fails for any reason
but the client's own cancel, magpie asks the next model that sees: the
first ready one of seersRanked, AutoVision's own order (ready, then
Claude account, Codex, API key, other, then cost), leaving out each model
already tried and each one that turned an image away (sightRefused). At
most 3 models (visionTries), and all of them within visionWaitMost
together: each try gets what is left of it, not a fresh visionTimeout.
- The text header names the model that described the image
("as other/bigeye describes it"), not the pick.
- The Routing row of the stand-in carries Instead, Why and Picked
(describingInstead, the same fields web search's searchingInstead
sets), and the Routing page says in every language that the pick
couldn't describe it, why, and which model did instead.
- When none answers, the error is the first failure as before, then
"nor could X, asked in its place: why" for each other model tried.
- Spent/allowance: each try goes through serve as before, so autoSpent
and spentModel judge every stand-in the same as they judged the pick.
- vision_mcp's describe_image tool gets the same fallback.
Cache (s.sights): a description is kept under the pick and the image,
whichever model described it, with the describer's name beside it. The
same image sent again asks no one, the stand-in's text is reused, and
its header still names the stand-in. A new image asks the pick first
again, so a pick that comes back is used at once. Failures are not kept.
Settings' text ("When the model in use can't see images, this one
describes them to it") is left as it is: the pick is still asked first
for every image.
Tests (internal/gateway/vision_fallback_test.go):
- TestPickedDescriberThatFailsGivesWayToTheNextThatSees
- TestAutoDescriberThatFailsGivesWayToTheNext
- TestNoDescriberAnswersNamesEach
- TestPickedDescriberThatAnswersIsTheOnlyOneAsked
- TestCanceledDescriptionAsksNoOther
TestDescriberThatCantSeeIsntAskedToDescribe now expects the next model
that sees to describe in place of a text-only pick, not a 502.
GUI: internal/gui/tests/vision-instead.test.cjs (every language, 1100
and 520 wide).
Run on mote at 45739f15b (this tree, on origin/main
|
||
|
|
2604d68db0 |
routing: the live card stays on the request it tells of while others come at once
qiang2040 on Discord ("狂闪", a screen recording): with Codex
conversations sending at once on group/glm-5.3-flash-free and
group/deepseek-v4.1-flash, the Routing page's top card (head, story,
context window) jumped to the newest request on every trace update,
and to "magpie hasn't routed this request yet" for each new one.
told() picks the request the card tells of: it stays on the one it
shows until that one is done, then goes to the newest, and a newer
request routing hasn't picked for yet doesn't take it from one that
was routed. play(), resume(), the live poll and rebuild() use it;
requests that come meanwhile still fly on the stage, without a caption
of their own. Pinned, replay and day views are unchanged.
Run:
- routing-concurrent-hold.test.cjs (new; two conversations interleaved,
every frame's head watched; en, zh, zh-TW, ja, de): red on the old
code in Chromium (mote); green on this code in Chromium (mote and
WSL) and WebKit (WSL).
- Broken by hand: told() returning newest() -> 6 of 6 red in Chromium
and WebKit (WSL), "the card stays on 101 while it is under way".
- routing-* and panel-routing* in both engines on WSL, against a base
worktree at origin/main: the reds are the same on base. row-swap is
red 3/3 on base too (#3799); live-patch's folded sample caught a
count-up mid-way once (129K vs 130K, the right request; #2174); the
rest are WSL WebKit reds under #4121.
- go test ./... -timeout 45m on mote: 80 packages ok; internal/gui's
10 real-window AppKit tests were killed at their deadlines (mote's
pboard/launchd state, #4125; also #2645, #1936). This change is
JavaScript only.
- The whole GUI suite (node --test, both engines) is still running on
WSL at push time; reds it shows that aren't on file get issues.
- At the pushed head (rebased on
|
||
|
|
59bdd4dbc3 |
routing: a group's pattern members can be put in order by hand (usrname1833)
In a routing group, members a pattern added followed the catalog's
order. The editor gave them no grip or Up/Down, and the gateway tried
them in that order. Now every row gets the same grip, Alt+arrow and
Up/Down that named members have. Matched rows still have no Remove,
since the pattern decides those.
The order is stored as Group.Placed, keyed by provider/model as Members
spells them. It is nil while the order equals the default (named, then
matched in catalog order), so existing groups.json files don't change.
Read (withMatches -> placedIn): members follow Placed. A model matched
since goes after them, and one no longer matched drops out. The gateway
tries members in the order the group is read, so it follows the editor.
Saved (SaveGroup -> placedOver): Members orders the named members, and
Placed (sent, or the stored one when a save doesn't send it) places the
matched ones. A save that doesn't know Placed (card routing, the CLI's
models+=, TUI, import) keeps the matched where they were, and a model it
names newly goes after the last named one. A provider rename, fold,
group rename and RenameMember carry Placed along.
Run:
- go test -timeout 45m -count=1 ./... on mote: 80 packages ok.
internal/gui fails 10 AppKit window tests at 30s (TestDockJoinLeadsCommandTab,
TestPanelCloseHidesIt, TestMainWindowCorners, ...). On a fresh origin/main
|
||
|
|
3b5dccd527 |
accounts: a plugin account goes by its usage's name, not its id (#4416)
A Huawei Cloud CodeArts account is kept by its accountId, an IAM id (iam::<domain>:user:<name>), and every list showed that id while its quota card showed the masked phone the plugin's usage() names it by. Display only: an account now reads as the name the user gave it, else the `user` its plugin's last usage read gave (PluginUserOf: the in-memory read, else quotas.json), else its id. The id stays the key everything is kept by; nothing stored changes or migrates. A read that fails keeps the last good name; nothing read yet is the id, never blank. One rule in provider (AccountShown, AccountShownOf, AccountLabelOf), used by every list: cards' Alias (Usage page, tray panel, /v1/magpie/quotas, magpie quota), magpie accounts, magpie providers, the TUI's Providers rows and quota titles, usageapi's Account filter, the quota alert. The GUI gets it as /api/providers' accountUsers (accountShownOf in app.js): the editor's account rows (the id in the tooltip), the per-account proxy lines, Routing's userShown, the Providers search, Hide accounts. app.js's account lookups share one helper, so the core stays in its budget (1,536,561 of 1,536,586), with no room added. Run: - go test ./... -timeout 45m on mote at |
||
|
|
0621e70fb9 |
routing: leave a provider out of the groups magpie finds
chenxiang0010 on Discord asked to keep a provider or a model out of the auto-created routing groups. A model could already be kept out (remove its found group; magpie keeps it removed), but a provider could only be turned off per group or everywhere. Now Routing -> Groups, under "Find groups on their own", has "Leave out a provider..." (app menu, saved when it closes) and `magpie group auto skip <provider>...|none`. The providers chosen (providers.json autoGroupSkip) join no found group; a group the user made or changed keeps them, a found group left with one provider goes away, and a request for it is served by AutoStandIn from a provider still in, and agents on it are reseated (agent.Reseat). A rename carries the id along. en, zh, zh-TW, ja, de. Run at 383947fce (this change on origin/main |
||
|
|
31728e29a8 |
routing: the German connection-check note names {agent} as often as the English one
The sibling of ec5571d6f's ja fix: da3c5e0c0's de string for "{agent}
checked that magpie answers ..." had a third {agent} too, so gui-de's "de
has every zh string, with its placeholders and tags" was red on main. "Das
Modell dieser Prüfung wählt {agent} selbst" now reads "wählt es selbst";
the sentence opens with {agent} already. zh and zh-TW had two.
Run: wsl-run gui-de, gui-ja, gui-zh-tw, i18n-keys: 13/13; gui-de alone
before this change: red, this test. Found in the whole GUI suite run
after v0.1.2228 (
|
||
|
|
b889ffe813 |
library: a server can stay each agent's own entry with the MCP hub on (#4382)
cuipengcx90's #4382, Option A's first step (nifengfanpan asked on Discord): with the MCP hub on, every Library server went behind magpie's one entry, so a server that reads its project from the folder it starts in, or keeps a session's state, resolved the wrong repository or shared state across agents. A server now has a hub policy, Server.Hub ("hub" in library.json): "" (shared, the default, so nothing changes for existing users; "shared" is saved as "") or "direct". A direct server is left out of the hub through inHub, the test that already keeps magpie's own image server out, so each agent given it keeps its own entry written as with the hub off, beside the hub's entry for the rest. An agent whose every server is direct gets no hub entry. The hub neither lists nor runs a direct server, at /mcp/magpie/hub either, and hubPrune ends one it held. Switching goes through change(), so the agents are written again at once and the entry from the other policy is removed. An unknown policy is an error. - GUI: with the hub on, the server editor has a "Through the MCP hub" switch (role=switch, not a <select>; not shown with the hub off or for the image server), a direct server's row has a "Not through the hub" tag, and the hub's line and the Connect sheet name the direct servers with the image server as given directly. Strings are in zh, zh-TW, ja and de ("MCP 聚合" as the core uses it). - CLI: magpie library mcp hub <name> shared|direct (ServerHub), and magpie library marks a direct server. - TUI: an edit keeps the policy. - Not done: Option B (per-roots/project backends behind the hub, keying hubPool by roots). It is left for later; #4382 stays open for it. Run: - TestHubDirectServer (internal/library) and the extended TestLibraryMCPHub (internal/cli) on mote. Broken by hand: inHub back to !isSelf(s) makes TestHubDirectServer red ("codex with the hub on: [magpie], want [index magpie]"). - Real configs in a sandbox HOME on mote (fake claude on PATH, the real binary built from this tree): mcp add index + web for claude and codex, hub on, hub index direct, shared, then both direct. The direct index entry was in .claude.json and .codex/config.toml beside magpie's; with every server direct both files were byte-for-byte as with the hub off (json.tool diff and diff); shared again removed the index entry. - Full Go suite (-tags nogui -timeout 45m ./...) on mote at this tree rebased on origin/main |
||
|
|
4f2d5fc7e0 |
routing: a group can put its cheapest member first, by each one's price at that hour
liyuanzheng (#general) and lam_em (#feedback) both asked for the same thing. Off-peak, DeepSeek's own API should come first for deepseek-flash. At DeepSeek's peak (weekdays 01-04 and 06-10 UTC, billed 2x since v0.1.2173), another provider should come first, Ollama say. A schedule editor would make the user copy DeepSeek's hours into magpie. Instead, a group gets one more routing, "Cheapest first" (`cheap`). Each request sorts the members by what they cost right then: input + output price per million, at the peak rate when it is peak hours. A tie goes to the lower cache-read price. Free models count as 0. A member with no known price keeps its listed place after the priced ones. Prices come from the same priceOf the usage ledger bills with, so the user's own ModelPrices, list prices and maker prices all count, and so does a provider's rate windows. - routes: Seat carries Priced/Cost/CacheCost; Strategy.ByPrice; Cheapest is a stable sort, so equal prices keep the user's order. - gateway: weighRouted prices each seat at priceClock() (time.Now; a test holds it) through the new provider.PriceAt. The trace's Weighed row gets a price (input/output/cacheRead/peak) so Routing can say why. - It is a group's alone, like Manual. A provider saved with it drops it, and `magpie provider set … routing=cheap` refuses it. Groups take it in the GUI menu (one more item, no new controls), the TUI and `magpie group set <id> routing=cheap` (aliases cheapest, price, cost). - Routing's mode line says why the first one is first, e.g. "Cheapest first: deepseek-v4-flash costs least on ollama-cloud now — $0.150 in, $0.600 out a million tokens.", with peak and unpriced variants. en/zh/zh-TW/ja/de. - Docs: gateway-routing, plugin-runtime, reference (it also points at Time window and Pause rules for a fixed schedule) and the site's start pages (en/zh/ja). Run, at |
||
|
|
ec5571d6f2 |
routing: the Japanese connection-check note names {agent} as often as the English one
da3c5e0c0's ja string for "{agent} checked that magpie answers ..." had a
third {agent}, so gui-ja's "ja has every zh string, with its placeholders
and tags" was red on origin/main (
|
||
|
|
c84c3e1c03 |
gateway: a key's holder sees its own usage and setup at /me
zytszone on X runs one magpie's gateway for a whole department, whose people can't be given the admin's app. Each now opens the gateway's /me at the address they reach it at, types the gateway key they were given, and sees that key's own name, limits and what is spent of them, its usage over today, 7 and 30 days with its most used models, the models it may use, and copy-ready setup for Claude Code (settings.json env), Codex (config.toml provider, /v1, responses), any OpenAI-compatible client and a curl test. The base URL is the address the page was opened at, never 127.0.0.1; the key is a placeholder until "Put my key in the setup" is ticked. Strings in en, zh, zh-TW, ja and de. - GET /me (keypage.html, embedded) is the same bytes for everyone and holds no data, so lanGuard serves exactly GET/HEAD /me (no escaped path) to another machine without a key, after the allow list, the rebinding check and the not-shared 403, which still apply. Its CSP loads nothing from elsewhere, posts no form and forbids framing. - GET /v1/magpie/me (keyInfo) answers access.Caller's own key only. No key, a wrong one, one turned off and magpie's own token are 401 alike; ?key= is refused 400 so a key never sits in an address or a log. It names no account, other key, provider or secret; its models are /v1/models' for that key (keyAllowed), none for a read-only key. The page sends the key as Authorization to its own origin with credentials omitted and keeps it in sessionStorage only. - Both are in readOnlyRoutes, /me in clientPrefixes (magpie web's page port), and Gateway -> Gateway keys shows the page's address (MAGPIE_PUBLIC_URL, else the LAN address offered) with a Copy, while shared and with a key. Docs: gateway-routing.md, reference.md. Run: - mote: go build -tags nogui ./...; go vet -tags nogui gateway+gui; GOOS=linux and GOOS=windows go vet -tags nogui ./internal/gateway; go test -tags nogui -count=1 ./internal/gateway ./internal/gui: ok (gateway 732s). gofmt -l clean. Rebased onto |
||
|
|
da3c5e0c0f |
gateway: Claude Desktop's connection check is tagged as one on the Routing page (cybercaius on Discord)
Also: the check follows a Desktop model switch made after the last turn.
cybercaius (#help): with gpt-6.1-sol on AnyRouter chosen in the
conversation, the Routing page showed "Claude Desktop requested
deepseek/deepseek-flash" while the answer came from gpt-6.1-sol. The route
was right; the row was not explained.
Those rows are Desktop's own connection check ({"max_tokens":1, content
"."}, app.asar 2.7032 lWt/YT). Desktop names its model itself: the
shortest listed id with haiku, else sonnet, else opus, else the FIRST
listed model. magpie lists no Claude-named ids to it, so the check names
the first one (deepseek-flash), whatever the conversation is on, and
magpie sends it to the model chosen in Desktop's menu (desktopChosen).
- The check is recorded with kind connection_check (KindDesktopCheck,
usage purposeKinds "Connection check", purposes.js regenerated). The
Routing page tags the row "Connection check" next to the requested id
and its story says the id is the one Desktop named from its list, not
the conversation's model, and where magpie sent it. zh/zh-TW/ja/de.
The requested id itself stays what Desktop sent.
- desktopChosen: a turn sent after cowork_account_settings.json was last
written wins over the menus (newer of the two). Before, the last
session's model came first whenever any menu still held it, so the Code
tab switched off DeepSeek with Cowork left on it kept the check on
DeepSeek. desktopPicked now carries when that turn was sent (the
file's mtime once read).
The two 400s were AnyRouter's own (the reporter says so); not changed.
Run (at 0013f990c, this tree before its rebase on
|
||
|
|
48edbcb674 |
library: RTK covers Droid, and lists Qoder, Cline and Kimi Code with why
lml0664 on Discord: Library > RTK offered a fixed few agents, even on the
latest magpie. RTK 1.1.0 (rtk-ai/rtk, Latest, 2026-10-25) has `rtk init`
agents claude, cursor, trae, windsurf, cline, kilocode, antigravity, kimi,
pi, hermes, droid, vibe, omp, plus --codex/--gemini/--opencode/--copilot.
Every one with a global hook that magpie has an agent for was already on
the page except Factory's Droid, which is added now:
- droid: rtk's own `rtk init -g --agent droid`, given Droid's folder as
FACTORY_HOME_OVERRIDE (magpie's droid agent honours it). rtk writes its
Execute group (`rtk hook droid`) into the root hooks.json, or into
settings.json's hooks.PreToolUse when Droid's hooks already live there
(src/hooks/init/droid.rs), so ReadRTK and switching off look at all
three files rtk may use (hooks.json, hooks/hooks.json, settings.json)
and leave the user's own hooks and settings. rtk before 0.44 has no
Droid agent, so it is blocked with "needs RTK 0.44 or newer".
- dropHook no longer slices key[:-1] for a top-level key (hooks.json's
"PreToolUse"); before, it would have panicked.
Listed with the switch off and their own reason (rtkNoHook and the page's
rtkNoHookWhy, in zh, zh-TW, ja and de too):
- Qoder, Qoder CN: rtk 1.1.0 has no Qoder agent (`--agent qoder` is an
invalid value), rtk-ai/rtk#1327 (PR #1721 open).
- Cline: `rtk init --agent cline` only writes a .clinerules in the
current project asking the model to type rtk, no hook (#3841).
- Kimi Code: Kimi's hooks can't rewrite a command; rtk writes only one
project's AGENTS.md and refuses -g ("Kimi AI is project-scoped").
RTK's Trae, Windsurf, Kilo Code and Mistral Vibe have no magpie agent.
Run:
- go test -tags nogui ./internal/library -run TestRTK on mote: ok
(TestRTKDroid home/override, TestRTKDroidSettingsHooks,
TestRTKNoHookQoderClineKimi new, sandbox HOME, fake rtk).
- Red on old code: rtk.go at HEAD^ -> TestRTKDroid, ...SettingsHooks and
...NoHookQoderClineKimi red. Broken by hand: version gate at 0.43, the
settings.json entry dropped -> red; FACTORY_HOME_OVERRIDE not passed ->
TestRTKDroid/home red. client.js at HEAD^ -> library-rtk-nohook red
(Qoder's reason was the generic one).
- Real rtk 1.1.0 (release tarball, sha256 checked against checksums.txt)
on mote in a sandbox HOME through SetRTK/ReadRTK: plain ~/.factory,
settings.json with the user's own Execute hook (kept, rtk's taken out)
and FACTORY_HOME_OVERRIDE: on, seen on, off, seen off. Real rtk also
refuses --agent qoder and -g --agent kimi, and cline writes .clinerules.
- Full suite on mote, go test -count=1 -timeout 45m ./...: 80 packages
ok; internal/gui red only in its 10 real-window AppKit tests (#4125).
- GOOS=linux and GOOS=windows go vet ./internal/library: ok. gofmt clean.
- GUI on the WSL box (mote's browsers crash at launch, #4125):
library-rtk-nohook (chromium+webkit, en+zh) and i18n-keys 10/10; all 45
library-*.test.cjs files 810/824, the 14 reds (library-chip-fan webkit,
library-items webkit, library-mcp-tools chromium ja 420) are the same
at origin/main
|
||
|
|
88e6fb9cf7 |
provider: a signed-in subscription's models stay in every agent's list with a group listing alone on
士奇 on Discord (Simplified Chinese GUI, the third report of this): with routing groups off, Hermes Agent's and WorkBuddy's model lists had the ChatGPT subscription's GPT models. With routing groups on, they were gone. Cause: the user's group names those models and lists itself alone (Group.Unlists, the routing plugin's option for that, #1783). While the group is on, catalogKeeping drops what it names from Catalog(), and every agent's list starts from Catalog(). With groups gated off the group's Unlists goes away, so the models came back. |
||
|
|
1bbaded622 |
usage: an agent's call to magpie's own MCP tools is a row of Requests
ferock (Discord) asked to see calls to magpie's MCP tools, such as magpie-image's generate_image, generate_video and generation_result, in Routing > Requests. Each tools/call to magpie's own MCP servers (image, vision, web search, tools and the Library hub) is now a row of the request log. The row has Source and Kind "mcp", the tool as its model, the server as its host, how long the call took, and its error if it failed. The provider and model it shows are those of the model requests the call made, collected through the request's context in appendUsage. generation_result names the model of the job it answers. The stdio Magpie Image server reports each call it answered to the gateway as "magpie/toolCalled". That report carries the tool, ms, model and error, never the prompt. The arguments are never stored at all, so there is nothing to mask. The rows go down the probe lane: they are listed, but no total, host list, budget or key limit counts them. The model requests a call made are rows of their own. In the GUI the row reuses the Requests list. It gets a muted "MCP" badge with a tooltip, the server beside the provider, and a Succeeded/Failed status. The Purpose filter gains "MCP tool" in every language. There is no new page, no <select> and no left border. The core scripts went over their budget with the new purpose. genpurposes now writes purposes.js as compact JSON, which makes the core 448 bytes smaller than main in all, and coreScriptBudget is lowered to the new total, 1,538,975. No room is added. Run on mote, at the rebased head: - gofmt -l: clean. go vet -tags nogui ./... with GOOS darwin, linux and windows: ok. - go test -tags nogui -timeout 45m: ./internal/usage, ./internal/imagemcp, ./internal/usageapi and ./internal/gui ok. internal/budget has no test files. ./internal/gateway (805s): every test ok except five Antigravity and Codex/Grok tests. They fail the same on a clean origin/main |
||
|
|
bcf0cfa232 |
sessions: usage counts a session Claude Desktop's Code tab ran under Desktop
CyberCaius on Discord: Usage's Claude Code filter listed Claude Desktop's
sessions. Desktop's Code tab runs Claude Code, which keeps the session in
~/.claude/projects like a terminal one; only each line's `entrypoint`
(claude-desktop, claude-desktop-3p) tells them apart. The calls were
counted under Desktop already (desktopEntrypoint), but the session, its
stats rows and its summary were Claude Code's, and the gateway's own
record of the session ("claude-desktop|<id>") wasn't matched with it, so
it could be listed twice.
The parse now keeps the entrypoint (state.Entry, on both the ccWhere fast
path and the full parse; cacheVersion 29) and a Code tab session gets
Session.App "claude-desktop". Its Agent, key claude:<id>, resume and
transcript stay Claude Code's. Stats rows and the summary use the app,
GatewayKeys and MergeExternal know the claude-desktop|<id> pair, the GUI
names it Claude Desktop, and Usage › Sessions filters by app || agent.
Run at the pushed tip (the AnySearch commit after this one, on
|
||
|
|
f2c6831a31 |
gateway: a read-only gateway key reads quotas and usage and uses nothing (Steven on Discord)
Steven's ESP32 desk display polls magpie (Docker, on his LAN) every 15s on GET /v1/magpie/quotas and /v1/magpie/usage and never sends a model request. Only a key held to nothing was told the usage summary, so the key kept in the device's flash had to be one that could spend every account. A gateway key can now be read-only (access.Key.ReadOnly): - `magpie gateway-key add <name> --read-only`, `magpie gateway-key access <id> [read-only|full]` (`gateway-key --help` lists it; `list` has an ACCESS column), and "Make read-only" / "Give full access" in the key's menu in Gateway -> Gateway keys, with a "Read only" tag on its row. - readOnlyGuard (internal/gateway/readonly.go), after callerGuard and before withCaller/keyLimited, judges the pattern ServeMux.Handler routes the request to. A read-only key is answered GET /, /v1, the quotas, their history and cards, the usage summary and its requests, its limit and the concurrency. Every other route is refused with 403 gateway_key_read_only: every model route, count_tokens, the Responses WebSocket's upgrade, every MCP server, Codex's and Gemini's backends, /v1/models and the Ollama routes, the catch-all, the trace and route, debug profiles, and every write (usage ingest, quotas refresh). It is default deny, so a route added later is refused until it is classified. - The key is held to nothing else, so heldKey leaves it alone: it reads the usage summary and every account's quotas, as a key held to nothing does. None of those routes holds a key's secret. - The sharing key can't be made read-only, since magpie gives it to its own agents (LANSecret). Update refuses it, and the GUI item is off with why. Older versions: a magpie from before this commit doesn't know `readOnly` and treats such a key as a full one, so downgrading magpie widens the key. Tests: - TestReadOnlyKeyEveryRoute (internal/gateway/readonly_test.go) takes the patterns from the router itself (routes() records each HandleFunc). It fails when a pattern is in neither readOnlyRoutes nor its refused list. It sends every refused pattern, by each method it takes, from 192.168.1.9 and from loopback, plus a WebSocket upgrade and an unclean chat path, and expects 403 gateway_key_read_only with the upstream never reached. It checks that every allowed route answers, that no body holds any key's secret or the upstream key, that the usage summary names the other key's use, and that a full key and a key made full again still reach the model. - TestReadOnlyKey (access) covers add-key and access-key on and off, Authenticate, List, and the sharing key refused. - TestGatewayKeyCLIReadOnly covers --read-only before and after the name and beside --key, access, the list column, bad values, and --help. - gateway-key-readonly.test.cjs runs Chromium and WebKit, 1100 and 420px, in en/zh/zh-TW/ja/de. It covers the tag, both menu items and what they post, the status line, the sharing key's item off with its why, no scroll on click, no sideways scroll, no select, and no left stripe. gateway-card.test.cjs now expects the menu's 4th item. - TestClientPathCoversHandler takes the patterns from routes() instead of parsing Handler's source, which moved into routes(). Broken by hand: - readOnlyGuard passing everything: TestReadOnlyKeyEveryRoute red (103 lines, /v1/models 200 onward). - A new `POST /v1/new-thing` route in routes(): red, "in neither readOnlyRoutes nor readOnlyRefused". - The GUI item not off for the sharing key: gateway-key-readonly red 10 of 10 in Chromium. Run at the pushed head (on origin/main |
||
|
|
869c4d112d |
routing: the magpies fly under the cards, and a long intent is cut short on its row (penershu on X)
penershu on X (v0.1.2123): with two agents sending at once through jd-auto-balanced, one magpie sat on the hub's "127.0.0.1:3425" with its dot beside it, another on the group's split dot, and the row smart routing picked ran "回答中… · 按意图“Design architecture…”" off the right edge. Cause: - .rt-sky (birds and dots) was z-index 2, over the cards (z 1). Flights cross the hub's box (via(), |
||
|
|
4054251865 |
library: an MCP server can be kept to this computer, never synced
huhuy72219405 on X: "能不能把不同设备的mcp区分一下,有些mcp属于本地的, 同步之后其他设备不应该读取到". A server in Library > MCP now has a "This computer only" switch in its editor (Server.Local; CLI `magpie library mcp add ... --local` and `magpie library mcp local <name> on|off`; the TUI keeps it on edit and marks the row). - Collect leaves local servers out (carriedServers), so neither a sync nor a backup file takes one to another computer. Turning a shared server local takes it out of what is carried, so the other computers drop it at their next sync; the flag itself is never carried. - Put (sync, join, Restore, Undo, backup file) keeps every local server, with its agents, and clears Local on what comes in. - Another computer's server by a local server's name goes to Library.Away: given to no agent, not in the hub, carried on as it came, so a push from here never removes it from the computers that have it. settleAway (every change) promotes it once the name is gone here, and drops it once the name is shared here again. - The hub serves local servers like any other (it runs here); subagents aren't carried, so one naming a local server keeps it. Docs: docs/subsystems/library.md, docs/subsystems/sync-backup.md. Run at |
||
|
|
2a1ef15ba9 |
routing: a found group's card leaves out a provider switched off, and counts it (XYenon)
XYenon on Discord (#feedback, 10-30): "已经关闭的提供商还会显示在路由页的 自动成组里是不是不太对". A provider switched off stays a member of the groups magpie found (#2671, on purpose: agents on auto-<model> aren't moved while it is off), and the gateway already skips it (membersIn reads only providers that are on; TestFoundGroupWithAProviderOff covers chat, and a fallback group, affinity and a group's classifier (decide_group.go) go through the same FindGroup). So no request reached it. What was wrong was the page: the card still listed it as "B · model (switched off)" and its logo sat in the group's icon stack, where every other model list leaves a provider switched off out. - Routing page (plugins/routing/client.js): a found group's card, its remove-picker row and its logos (groupIcons, also used by the group pickers) leave out members whose provider is switched off; a tag "{n} switched off" says how many, its title why (offWords). When none would be left they are listed as before. The editor and a manual group's pick still show them, greyed with why. A group of the user's is unchanged: it lists what they put in. - i18n: "{n} switched off" in zh, zh-TW, ja, de. - TUI (sibling): the routing list's line for a found group does the same ("N models · ... · 1 switched off"), and a group's page marks such a member "· switched off: skipped until it is on again" (any group). - docs/subsystems/providers-accounts.md: the row says it. Tests: routing-provider-off.test.cjs gains a found group (card text, tag text and title, no logo of the provider off, editor still has it) and one whose only member is off (listed as before, no tag); every language, 1100 and 420 wide, Chromium and WebKit. TestFoundGroupLineLeavesASwitchedOffProviderOut (internal/tui). Run on mote (mote-run, this tree): node --test of 45 GUI files (group-*, panel-routing*, routing-group*, routing-groups*, routing-provider-off, i18n-keys, found-*, remove-found*): 488/488 pass. go test ./internal/tui ok; go test ./internal/gui: all ok except TestMainWindowCorners/macOS_26_SDK, red on macOS 27 and already filed (#3949), an AppKit window test this change doesn't reach. gofmt -l clean; go vet ./internal/tui for darwin, linux (-tags nogui), windows ok. Broken by hand: with client.js from HEAD the new GUI case is red (expected 'A Cloud · luna', actual 'A Cloud · luna → B Cloud · luna (switched off)'); with listedMembers returning every member the TUI test is red ("2 models · ... pa/luna → pb/luna"). Not tried: the real app with a real provider switched off; the full GUI suite (1002 files) and the full go test ./... were not run. |
||
|
|
f5dd4e1423 |
routing: a try a plugin or Claude Code sent says why it has no time split
"Where the time went" needs magpie's own client to send the request (TryNet). A plugin sends its own through the plugin host, and a Claude subscription's goes through Claude Code, so those tries never have a split, and the page showed nothing in its place, which read as a request that lost its details (Discord, lute). A try now records who sent it when magpie didn't (Try.SentBy: "plugin" or "claude", from sentBy), and the request's story says it under a done, answered try with no timing: "Its plugin sent this request itself, so magpie can't split its time" (or Claude Code), in every language. Run (mote, go1.26.8, Node 22, Playwright 1.62.0): - TestPluginTrySaysWhoSentIt: red without the gateway.go line (SentBy empty), green with it. TestSentBy, TestTryTellsWhereItsTimeWent, TestCursorPlugin*: ok. - go test ./internal/gateway ./internal/usage -count=1 -timeout 45m: ok (gateway 502s, usage 16s). - node --test routing-time-went (now checks the plugin try's line and that a routed try has none), routing-masking, i18n-keys, routing-js, routing-time, routing-went-on, routing-steps-cap: 57 of 58 ok in Chromium and WebKit, every language. The red is routing-steps-cap's WebKit ResizeObserver error, red the same at |
||
|
|
8cbd0a9c91 |
gui: once the loading bird comes it lands before the page fills
The owner (10-30): a load that finished just as the bird came had it appear over no skeleton and streak off, which read as a bug. The bird still comes only after ~450ms of skeletons. Once it has come, a GET read through api() (and routing's history fetch) that comes back before its first landing waits for it: the skeletons stay, the bird drops and lands (about 0.5s), then flies off as the content goes in. A read back later isn't held. The hold lets go after 1.5s at most, for a hidden window that draws no frames. If its bar goes during the drop anyway (a read not through api()), the bird fades where it is instead of flying across the content. Reduced motion and Loading bird off never hold anything, since no bird comes. Run on mote (macOS 27), at this tree on origin/main |
||
|
|
05a6087e1f |
access: a key with accounts and no model may use only its accounts' providers' models
Linka on Discord (#feedback): in a gateway key's "Models this key can
use", ticking only an account and no model let the key list and use
every model of every provider.
Cause: Key.Models empty meant "every model", and Key.Accounts (#905)
held only the providers it names, so every other provider stayed open.
Change: access.HeldModels gives a key with accounts and no models the
models "<provider>/*" of each account's provider. Authenticate builds
the Identity with it, so every route's existing model gate narrows:
/v1/models, /v1beta/models, chat, responses, messages, Gemini,
count_tokens, embeddings, images, the Codex backend path, System One,
groups and fallbacks. A key that lists models is unchanged (#905: its
accounts still hold only the providers they name); a key with neither
is unchanged. The CLI's MODELS column and `gateway-key models` say so,
and the GUI editor's hint, the "not used" notes on providers no model
or account reaches, and the save status follow (en, zh, zh-TW, ja, de).
Tests:
- TestGatewayKeyAccountsOnlyHoldTheModels: each route above is 403 for
the accounts-only key and no upstream call reaches the other
provider, the decider or the image provider; its own provider, a
group of it and a key that also lists models work. Red on the old
code on every route (list showed spare/m2, chat/count_tokens/
embeddings/systemone 200).
- TestHeldModels (access).
- gateway-key-accounts.test.cjs: hint, notes and status; 4/4 red on
the old assets, green on the new.
- TestGatewayKeyAccountsListModels / SystemOne / OfANamedProvider and
TestHeldKeyToldItsOwnQuotas now encode the new rule (the held key is
told only its own provider's quotas).
Run on mote: gofmt -l clean; go vet darwin, linux -tags nogui, windows
on access, cli, gateway, gui ok; go test -timeout 45m ./internal/access
./internal/cli ./internal/gui ./internal/gateway: ok except gui's
TestMainWindowCorners/macOS_26_SDK (#3949, not this change) and
gateway's TestHeldKeyToldItsOwnQuotas, updated and rerun ok. After the
rebase on
|
||
|
|
9101bb8879 |
privacy: a request masking would change can go as written to a model you picked
jessyoungyu on X: when a masking rule hits, send the request to a self-hosted model instead, so a prompt like 「百度这家公司怎么样」 gets an answer about Baidu, not about a placeholder. Settings › Privacy › Instead of masking, send to (settings redactRouteTo). It is Off by default, and nothing changes for a user who leaves it Off. It is picked in the app menu, and only models whose every route is unmasked can be chosen: the provider is set to Send requests unmasked, it is on this computer or the network, it has no account, and any fallback or group member is unmasked too (gateway.MaskRoute, the same rule as provider.SkipsRedaction). The setting is saved on its own with POST /api/settings/redact-route, which checks it with MaskRoute. The general settings save keeps the value. Decisions: - When a value would actually be masked on an agent's turn (maskHits.n > 0), serve sends the request to the chosen model unmasked. Warn-only hits don't count, and Block still answers 400. - If that model fails, the request fails. It is never masked and re-sent to the model the agent asked for, and never goes to a cloud model with the unmasked text. Falling back to a masked cloud request would answer a different question in the background. The user picked this route because masking breaks the answer. - Streaming works the same as on any route. - The route is checked again on every request. A model that is gone or no longer unmasked, or that the caller's gateway key may not use, means the request is masked as before. - Covered: agents' Messages, Chat, Responses and Gemini turns (serve, marked by serveAgent), count_tokens, Codex magpie-model turns, and Codex own-sign-in /responses (codexMaskRoute). - Not covered: magpie's own asks (ownAsk clears the mark), embeddings, audio, images and video. These stay masked. GUI: redactRouteRow lives in plugins/redact/settings.js and wraps renderRedact, so app.js is byte-for-byte unchanged and the core budget is not raised. Strings are added in zh, zh-TW, ja and de. Docs: gateway-routing.md, gui-shell.md, and site/public/docs masking (en, zh, ja). Tests: internal/gateway/mask_route_test.go (TestMaskedRequestGoesToTheModelSet: unset, set, streamed, nothing to mask, local fails, falls back to a vendor, no longer unmasked, count_tokens; TestCodexSigninTurnGoesToTheModelSet; TestMaskRouteTakesOnlyUnmaskedRoutes; TestMaskRouteOnlyForTheAgentsTurn); internal/gui/redact_route_test.go; settings_keep_test.go; internal/gui/tests/redact-route.test.cjs (every language, chromium and webkit, 1100 and 640 wide). Broken by hand, each red: - serveAgent without the agent mark; - MaskRoute taking any route (TestMaskedRequestGoesToTheModelSet, TestMaskRouteTakesOnlyUnmaskedRoutes; at the pushed head); - the codex hook removed; - count_tokens without the mark; - ownAsk not clearing it; - no key check; - no reroute in serve; - the GUI: no keep in the general save, no MaskRoute check on save, and the picker listing every model; - the plugin script left out of index.html (redact-route.test.cjs 22 of 24 red; at the pushed head). Run on mote: - at 221ede767's tree, this change on |
||
|
|
ec789445db |
gui: Settings' session rows are the sessions plugin's settings.js; app.js back under its budget
|
||
|
|
af8f3a9399 |
sessions: a new install reads no agent's session history until the user allows it (RustCats on X)
RustCats on X: a fresh magpie showed every agent's session history on
the Sessions page before anyone agreed to it, and asked for a per-agent
choice instead.
- sessions.Reads(agent) (internal/sessions/access.go) is the one gate,
from settings.SessionReads {Asked, All, Agents}. Every lister asks it,
the aggregators (allFiles, callFilesWith, callSourcesWith,
traceLineFiles, wslFiles, DesktopDataDirs) filter by it again, and
readers of an already-listed session (TranscriptOf, ContentOf,
SearchSession, SubagentTranscript, CarryOver, ReadCallSource) return
ErrNotRead, so a cache from before a switch was turned off goes no
further. The Sessions list, stats, /api/sessions/overview, the call and
trace indexes, Usage's agent-file calls and the Codex/Pi title readers
all pass it.
- SettleReads decides once and saves: an install with sessions.json or
a calls-v* cache read sessions before and keeps all on; a fresh one
reads none, not asked. A saved value is never replaced; save, sync and
restore keep it (KeepOwn); only SetSessionReads writes it. An
unwritable settings.json reads nothing this run.
- GUI: GET/POST /api/sessions/reads. While not asked, the Sessions page
shows a consent card: each agent found (by a stat of its folder only)
with a switch, Allow selected and Allow all. Settings > Privacy >
Agents' session history has "Agents found later" and a row per agent.
Strings in en, zh, zh-TW, ja, de.
- CLI: magpie sessions read [on|off all|<agent>...]; magpie sessions
says on stderr when nothing is allowed yet; the TUI's empty Sessions
page says how.
Read either way, because none of it lists or shows a session: the
gateway's own usage ledger, its projections and the conversations it
recorded (magpie's own records, so usage and cost keep working); the
agents' config and sign-in files; Claude Code's and Codex's
history.jsonl last-used time and a session file's mtime for a quota's
first use; Codex's newest rollout's last line before magpie restarts
Codex (codexTurnOpen).
Tests: TestFreshInstallReadsNoAgentUntilAllowed,
TestSettleReadsKeepsWhatWasThere, TestSessionReadsRoutes,
TestSessionsRead, TestSessionsNotAskedSaysHow, sessions-reads.test.cjs
(26 cases: consent and Settings in 5 languages, Chromium and WebKit,
390 to 900 wide).
Run on mote:
- full Go suite (gofmt -l, go vet ./..., GOOS=linux go vet -tags nogui,
GOOS=windows go vet, go build, go test -timeout 45m ./...) at this
change on
|
||
|
|
f49cebb35b |
library: a click on an MCP server's needs-sign-in status signs in
The owner, on a remote server's "需要登录" status in Library > MCP servers: "这里点击应该走登录逻辑。" A click there checked the server again, which only said the same thing. - A remote (http) server whose check asked for an OAuth sign-in, and that no agent's own sign-in already uses (canSignIn), signs in from its status: the same library/mcp-signin the dialog's Sign in starts, the browser opened in a browser page as there. No dialog opens unless the user has something to do in it: the browser didn't open (the link to open by hand) or the sign-in failed. - While it is under way the status says "Opening the sign-in…", then "Finish signing in in your browser…"; a click on it then opens the dialog, which has Cancel. The dialog's box and the row's status both follow it (followSignIn, lifted out of the dialog so the row is told with the dialog closed), and Cancel there repaints the row. - The tip says "Click to sign in" on such a status; a server with no OAuth (a key it lacks) still checks again. - zh/zh-TW/ja/de for the two new strings. New mcp-signin-click: linear (a click signs in with no dialog, then 7 tools and Signed in), notion (the browser doesn't open: the dialog with the link, then Cancel, the row back to needs sign-in) and a keyed server (no OAuth: a click checks again), both engines, 5 languages, 1100 and 390 wide. Broken by hand (canSignIn false): 22/22 red. library-mcp-health's tip expectation is "Click to sign in" for linear. Run at this commit, on mote: mcp-signin-click, mcp-signin, mcp-signin-health, library-mcp-health, library-mcp-hub, i18n-keys: 82/82 ok. Earlier, this change with the two before it under the whole library/mcp/i18n GUI set: 944 tests, 942 ok; the 2 reds are library-row-remove's chromium ja hook row (#3099, open), not touched. go test ./internal/gui: TestMainWindowCorners/macOS_26_SDK red on mote's macOS 27 (#3949), the rest ok. Rebased on origin/main |
||
|
|
0aad5d56ac |
library: the Connect sheet's search has its glass and text on the box's middle
The owner: "这里的文字和icon竟然没有相对于输入框在垂直方向上居中". The
search box is a <label> inside the sheet, an .editor, so app.css's form
rule `.editor label { padding-top: 5px; text-align: right; font-size:
12px }` (8px under body.web) outranked `.lib-hubsearch`'s `padding: 0
8px`. With the box 28px tall, that pushed the glass and the input 2.5px
below the middle (more on a phone page).
- The box's rule is `.editor.lib-hubsheet label.lib-hubsearch`, which
outranks both, and says its own padding, alignment and size.
- The input fills the box's height with no margin.
- On a phone page (body.web, narrow) every input is 44px with 16px text,
so iOS doesn't zoom. The box grows to 44px round it rather than
squeezing the input.
library-mcp-hub now measures, in both engines, 5 languages, 1100 wide
in the app and 420 in a browser, that the glass, the input and its text
line are within 0.5px of the box's middle and the input stays in its
box. Red on the old CSS, 22/22 ("the search's glass is 2.50px off the
box's middle"). The first fix was red 12/22 at 420 (the input stayed
44px and ran 8px out of a 28px box), which is why the box grows on a
phone.
Run at this commit (its own worktree), on mote: library-mcp-hub and
i18n-keys, 26/26 ok. WebKit screenshots at zh 1100 and 420 checked by
eye: the glass and "agent 2" sit on the middle.
Not tried: the real app's WKWebView (Playwright WebKit only).
|
||
|
|
b0ab8420c1 |
library: the MCP hub's mark is magpie's bird, its address row says Hub address, and magpie-image is said to go direct
The owner, on Library > MCP servers: "我不喜欢这个logo" (the hub row's crosshair glyph), "其他应用的这个文案好莫名其妙" (the row with the hub's address was titled "Other apps"), and "我明明有两个MCP,这里为什么只显示 一个" (the Connect sheet counted linear and left magpie-image out). - The hub row and the Connect sheet's head draw magpie's bird (#bird), the one server each agent is given, in place of GLYPH.hub. - The address row is titled "Hub address"; who connects there (Cursor, VS Code, any other app) moved to its tooltip. - magpie-image is never served through the hub: it asks its agent for the project's folder (MCP roots; inHub in internal/library/mcp_hub.go). The hub's stats and the sheet's line now say "magpie-image is given to each agent directly", so the count adds up. The image-server test is one isSelf for both. - zh/zh-TW/ja/de for the three strings. Run at this commit (d8dc8a114's tree, worktree of its own), on mote: library-mcp-hub, library-mcp-health and i18n-keys, both engines, 5 languages, 1100 and 420 wide: 32/32 ok. The hub test's fixture has a magpie-image server now, and checks the bird in the row and the sheet, the "Hub address" name and the direct line. The whole library/mcp/i18n GUI set with the later two commits on top: 944 tests, 942 ok; the 2 reds are library-row-remove's chromium ja hook row (#3099, open, its trash has no box yet), not touched here. go test ./internal/gui: TestMainWindowCorners/macOS_26_SDK red on mote's macOS 27 (#3949), the rest ok. Not tried: the real app with a real magpie-image entry. |
||
|
|
00e0fd11b7 |
gui: a key switches off and on again by name, beside Remove (wei_VC on X)
wei_VC on X: "我希望可以 disabled 某些 key,现在只有移除,后面我想使用只能
再次新增". magpie could already keep a key off (KeyAccount.Off, the
caller key's Off), but the only switch was the tick dot at the row's
start, drawn with cursor: default and no word, so no one read it as
one. Remove was the only thing with a name.
- A provider's keys: each row has Switch off (on hover, beside Remove,
as Remove is) or, when the key is off, Switch on, always shown. The
first key too, while another key is on: keys/off gives its place to
the next one on (provider.SetKeyOn's promote, unchanged). The last
key on has none, as it has no Remove; the provider's own switch is
for that.
- Gateway keys (the caller keys on the Gateway page): Disable key /
Enable key is the first item of the key's … menu, above Rotate key
and Remove.
- Words reused, already in all five languages ("Switch off"/"Switch
on", "Disable key"/"Enable key"). No new i18n keys, no Go change.
The gateway already skips an off key on every route: providers'
keys go out only through Provider.KeysOn (fallback, key_models, video,
groups, remote key limits) and the first key is always on; an off
caller key is refused in access. Not changed.
Run:
- New internal/gui/tests/key-switch.test.cjs: Chromium + WebKit, en,
zh, zh-TW, ja, de, 420 and 900px: 20/20 ok on mote. It switches the
first key off, the off key on, the first back on, checks the posts
are keys/off and keys/on (never keys/remove), no scroll, the button
inside the row, and no Switch off on the last key on.
- gateway-card.test.cjs (now checks Disable key, Enable key, Rotate
key, Remove and the off-key/on-key posts) and api-key-theme: 46/46
ok with key-switch on mote.
- Broken by hand: key-switch on origin/main's app.js 0/10 (Chromium);
gateway-card on origin/main's keys.js 0/10 (Chromium).
- gofmt -l clean; go vet ./... darwin and GOOS=windows ok;
GOOS=linux go vet -tags nogui ./internal/{gui,provider,gateway}/...
ok (GOOS=linux ./... without nogui stops in Wails' cgo files on a
cross build, as before).
- go test -timeout 45m ./internal/provider/... ./internal/gateway/...
./internal/gui/... on mote at
|
||
|
|
3ce2a9819f |
library: RTK for agents in WSL, with the distro's own rtk (lex on Discord)
lex: Claude Code and other agents in WSL couldn't use the RTK of magpie
on Windows. rtkAgents looked an agent up in rtkSpecs by its whole id, so
claude@wsl:Ubuntu never matched and WSL agents weren't on the RTK page at
all. Even matched, the specs read this machine's home, and Windows' rtk.exe
is no command inside the distro, where the hook runs.
Now an agent is looked up by its kind (rtkKind). One in WSL:
- has its files read and written under the distro's home as magpie opens
it (rtkClaudeDir, rtkCodexDir, rtkHome), with blocked/version checks
against the distro's rtk and OpenCode;
- uses the distro's own rtk: rtkDistroOf asks the distro (wsl.exe -d <d>
-e sh -lc) where rtk is on its shells' PATH, else in ~/.local/bin or
~/.cargo/bin (offPath), kept 15s; ReadRTK lists one RTKDistro per distro;
- switching on runs that rtk there (rtk init -g ..., its folder on PATH);
- Install RTK in WSL <distro> (POST /api/library/rtk/install {distro},
magpie library rtk install <distro>) runs RTK's own Linux installer in
the distro (curl, or wget).
A distro that isn't running is never started (#3896): its agents are
listed asleep with the switch off, and switching or installing says to
start it. The page has a card per distro (install, off-PATH, asleep) and
uses the distro's rtk for each WSL row's tags and switch; strings in zh,
zh-TW, ja and de. The install route now refuses a body it can't read
instead of installing on this computer.
Run:
- mote (macOS 27), at origin/main
|
||
|
|
ec8fe29b89 |
routing: the row smart routing's intent chose says the intent where its allowance goes (joey_xue on Discord)
joey_xue (#feedback) asked that the Routing stage's row a smart-routing
decision picked say why, in the spot that shows the account's allowance
("剩余 90% · …"). When a group's rule by intent (the decision model's
answer, recorded in the trace as the rule's `intent "…"` condition, in the
group or a group in it) put the request's first where it is, that row now
says "picked for “<intent>”" in place of what it has left; while it
answers or once it answered it keeps saying so, the intent after it
("answered this request · picked for “complex”"). Resting, failed, passed
over and every other row, and a rule by no intent, read as before. No
gateway change: the trace already carries the rule step; nothing goes
upstream. New string in zh, zh-TW, ja, de (routing/i18n.js).
Run (Linux, WSL magpie-desktop, Playwright 1.62.0):
- routing-smart-intent.test.cjs, Chromium + WebKit, 5 languages, 1100 and
390px: 40/40 ok. With client.js at the parent (BROWSER=chromium): 30 red
("the chosen row: {a: 20% used, b: 10% used}"), the 10 no-intent cases ok.
- Every GUI file that opens the Routing page (184) + i18n-keys, both
engines, concurrency 6: 2421/2501 ok, 80 red in 28 files. Those 28
rerun at concurrency 2 here: 61 red; the same 28 at the parent
|
||
|
|
75a7db27b9 |
usage: an allowance card can be hidden from the Overview (whqtian_07012 on Discord)
whqtian wanted StepFun's plan card on Usage › Overview without its
balance card. Right-click a card (or long-press it on a touch screen)
and the app menu offers "Hide from Overview". With several accounts on
one card it says "Hide this account from Overview". A plan card that
carries its key's balance also offers "Hide its balance from Overview",
which keeps the plan. Each hidden card is saved as its tray card id plus
its kind (stepfun|balance, kimi|me@x|plan) in settings.UsageCardsHidden,
through POST /api/usage/arrange (cardsHidden). The Settings save keeps
it. Under the cards, a quiet "{n} hidden" line opens them, each with
Unhide, and Show all from two. It is the same pattern as the Agents
list's hide.
Display only: routing, caps, counting, the Accounts list, the tray
panel's Allowances (it has its own Arrange) and the menu bar cells
never see it. A cell clicked for a hidden card shows it until the page
is left (usagePeek). UI: the app menu, not a native select, no
coloured stripes, no new button on the cards.
Run at this head (rebased on
|
||
|
|
c1da9ccda3 |
library: a stopped WSL distro's agents are listed, and a tick for one is written there once it runs (cybercaius on Discord)
cybercaius: with WSL not started, the Library's MCP page didn't list the agents in the distro at all, and nothing ticked for them could be kept. A stopped distro's agents are no targets (#3896: opening their files starts the distro), so they fell off the page. While a distro runs, each agent's places and what its MCP file takes are kept in wsl.json (keepShape, agent.WSLKeep, key library:<kind>). While it is stopped, Read lists its agents from that (asleepView, asleep: <distro>) with the library's ticks; one magpie never saw is listed only on rows that name it, as unseen, its chip disabled and kept by every click (keptOf). A tick on a stopped agent is kept in library.json (Takes accepts a known shape, serversAgents judges it by shape.reaches); nothing is opened or run in the distro. Woken, from KeepLinked's 30s loop, syncs once a distro the library names goes from stopped to running (wsl.exe -l --running starts nothing). The page greys a stopped agent's chip and says why in its tooltip and one line per distro; the MCP hub leaves them out. The CLI says the same on stderr (AsleepIn). en, zh, zh-TW, ja, de. Run at this tree (20695ad8b before this message; on |
||
|
|
b64ec9d64f |
gateway: a picked model that turns an image away gets it described, not another provider (xyenon)
xyenon (Discord #feedback) picked provider-1/DeepSeek-V4.1-Flash in pi with an Image recognition model set. An image they sent wasn't described; the request was answered by provider-2/DeepSeek-V4.1-Flash. Cause: provider-1's list says nothing of images, so magpie took models.dev's word for the model (catalog.SeesImages: text+image) and sent the raw image. The relay answered DeepSeek's 400 "Failed to deserialize the JSON body ... unknown variant `image_url`, expected `text`". That matches shapeWords, so the try failed as a shape refusal and went on to the next candidate: provider-1's fallback (or the next group member), the same model at provider-2, which sees. The describer was never asked. Fix: a 400/415/422 whose words say images aren't taken (imageRefused: unknown variant image_url/input_image/image, OpenAI's "only supported by certain models", OpenRouter's "no endpoints found that support image", vLLM's "not a multimodal model", 不支持图片 and the like) marks the model blind for this server's run (refuseSight; blindTo checks it first). With a describer, the same candidate is asked again at once with the images described (seenBody, or seenGroup for a group), before any fallback or other member; the try reads failSight, which the Routing page tells as its own story (en/zh/zh-TW/ja/de); the row then reads answered, as for floor's and foreign's re-asks. Later requests are described up front, for a direct pick and a group (user or auto) alike, on Chat, Responses and Messages. Kept on purpose: with no describer (Image recognition off, or no model that sees), going on to a candidate whose copy sees is the only way to answer, so it still does (TestRefusedImageWithNoDescriberGoesToOneThatSees). Documented in docs/subsystems/gateway-routing.md, "A model that turns an image away". Run (on mote, through mote-run): - TestPickedModelThatRefusesAnImageIsGivenItDescribed (9 subtests: direct pick with a fallback, user group, group/auto-…; each API), TestRefusedImageWithNoDescriberGoesToOneThatSees, TestImageRefused: ok. - Broken by hand: with gateway.go/vision.go/routing.go reverted to origin/main ( |
||
|
|
792f0f2860 |
usage: Requests opened again on the same rows aren't drawn or fit again, and new rows wait for the sidebar to settle (#4064, xisdumpling)
xisdumpling (Discord dumplings04605) sees frames drop when switching into
Usage > Requests at 7 days (~1,670 requests): the ledger's redraw and
ledFit's reflows land inside the sidebar's 460ms navSubEnter move.
Two causes, both fixed in internal/gui/assets/plugins/usage/page.js:
- Coming back, open() -> loadUsage(true) -> loadLedger read the same page
again and redrew 100 rows even when nothing changed. The ledger now
remembers the ledParams it was read with; on open with the same params
it is read quietly ("open"), and same rows keep the table shown.
- #ledWrap's ResizeObserver refit the table at width 0 when the view was
hidden and again when shown. It now skips a fit while the wrap has no
width, so the table keeps the fit it had.
- Rows that did change on open are drawn after the sidebar settles
(navSettled: rAF until navTop.raf and .nav-sub.moving are gone, capped
at 700ms), and dropped if the reader moved on meanwhile.
No layout change: the table keeps its class (led tight) and the page its
scroll position in every run.
Measured with a harness (1,670 requests, 100 rows shown, 1280x800,
Gateway -> Usage click; Chromium trace counting full-tree style recalcs
(>1000 elements) and layouts (>1000 objects) within 480ms of the click):
- Chromium on mote, same rows, 4x CPU throttle: full restyles/layouts in
the move 8/5 -> 2/1, longest task 194 -> 108ms, style 280 -> 126ms,
layout 112 -> 46ms. Unthrottled: 8/5 -> 2/1, style 73 -> 37ms.
- Chromium, changed rows, 4x: 8/5 -> 2/1, longest frame gap in the move
167 -> 100ms, longest task in it 147 -> 67ms, busy 464 -> 230ms.
Unthrottled: in-move gap 33 both, longest task 40 -> 32ms; the gap
after the move is 33 -> 50ms, since the redraw now comes after it.
- WebKitGTK on WSL (software rendering, noisy): changed rows max gap
522 -> 339ms, in-move gap 222 -> 188ms; same rows 561 -> 490ms,
211 -> 195ms.
New test usage-ledger-open-settled.test.cjs (Chromium and WebKit): same
rows keep the table, draw nothing, refit 0; changed rows draw once with
the sidebar at rest, newest first, same fit, no scroll move.
Broken by hand: old page.js is red in both engines ("the table shown is
kept"); without the "open" wait red ("once, with the sidebar at rest");
without the width guard red ("nor fit again at the width it had").
Run at this head (rebased on
|
||
|
|
da8039368f |
library: skills kept in ~/.agents/skills can be handed over to the library, and then turned off per agent
tnt1223 on Discord asked for the skills in ~/.agents/skills to move into
magpie's library folder and be managed there ("统一移入 magpie 的资源库文件
夹,交给 magpie 管理"), since a skill there can't be turned off for one agent
("不能决定某个 skill 是否自由开启"). Codex, Gemini CLI and the other readers
of that folder read it themselves, whatever the library ticks. Goose, Kimi
Code and Cindy use it as their own folder.
HandOverSkills (POST /api/library/skills/hand-over with names) does the
hand-over only when the user asks for it:
- A folder kept in ~/.agents/skills moves into library/skills/<name>
(moveIn). It is renamed, or, across disks, copied. A copy has to read
back the same (sameTree) before the original is set aside with the
backups. On any failure the folder stays where it was and the library's
link stays as it was.
- An entry there that only links to a folder elsewhere is removed, and
the library links straight to that folder. The folder itself stays.
- The user's own links to the skill in agents' folders are removed too,
since they would point at nothing. The library gives those agents its
own link.
- Every agent here that read the skill there (readsSharedHere, plus the
agent of each such link) is ticked. So each agent keeps the skill, now
from the library, until the user unticks it or turns it off here.
- A skill found there that isn't in the library yet is imported first.
- A name that can't be handed over is listed in Result.Unmoved, and the
other names are handed over all the same.
HandBackSkill moves the folder back and links the library to it again.
"Kept there" is now sharedEntry: the skill's own entry in the shared
folder, by its name, or, for a library link into it under another
folder's name, by that folder's name. Everything that read the old
by-name check follows it:
- SkillView.Always, plus the new Shared and SharedElsewhere fields;
- syncSkills' in-shared check;
- the shared folder's own target, which no longer gets a second link
beside such an entry. TestSharedUnderAnotherName covers this, and it
fails without the guard.
Where:
- GUI, Library > Skills: a row kept there has "Manage in magpie"
("交给 magpie 管理") in its source line. With more than one such row,
the skills heading has "Manage {n} in magpie". Each asks first, in the
page, and says:
- where the folder goes, or that only the link goes;
- which agents keep the skill, ticked;
- how to put it back.
Cancel sends nothing. The strings are in en, zh, zh-TW, ja and de.
- CLI: `magpie library skill hand-over <name…>|--all` and
`magpie library skill hand-back <name>`.
Existing users: nothing changes until they click. A library.json gains
no new key.
Run (mote, at 58e926e5d/d4b7c0586 rebased on
|
||
|
|
8701eb35ea |
routing: with several routes on the stage, each route's rows hang under its own heading (hoobnn on Discord)
hoobnn: "路由这里,会莫名出现两个没有使用的路由,并且鼠标悬浮,显示错误的 供应商". The screenshot's header read "DeepSeek-V4.1-Flash · 路由组 · 启用 3 个 · 3 个 Agent 同时在发" over five rows: the group's three (Volcengine Ark, a DF Model account, Qwen China) and, between and below them, Pi's zcode account and OpenCode's Kimi Code (China) key. Cause: the stage shows up to four agents at once ( |
||
|
|
29185e3bbc |
gateway: a request held too long before routing leaves a report its user can copy
Jason on Discord (#general, v0.1.1995, AirbuildEnvironment over Codex's
/backend-api/codex/responses) got the 2m 504: "magpie held this request
for 2m0s without routing it to any provider ... report it with magpie's
log". The desktop app runs the gateway in-process and logs only to
stderr, so there is no log for him to send.
giveUp now writes a report of the held request to a small file in
magpie's cache (held/, folder 0700, temp file renamed into place, the
newest 5 kept). It holds the time, version, OS, the method and path, the
model and agent, how long it was held, each named wait with its time and
whether it was still under way (noteWait now takes a kind: body, body
room, decision model, image description, plugin hooks, JS middleware,
Codex reset, masking), the body room's state, the requests in flight,
and a goroutine profile (function names and lines only, cut at 128KB).
It holds no body and no headers. Route.Held names the file. On the
Routing page, the request's story then says a report was saved, with
Copy Report and Open Folder (Open Folder is left out in magpie web).
GET /api/gateway/held/{name} reads only a report's own name. The 504's
text no longer points to a log: it names Copy Report on the Routing page
and the folder. The log line names the waits too. i18n is in zh, zh-TW,
ja and de, and docs/subsystems/gateway-routing.md has the section.
What held Jason's request is not known from what he sent. The waits that
count before routing are: the body arriving (idle deadline only), body
room (up to 100s, then 503), the decision model (see the next commit),
plugin hooks (11s), JS middleware (250ms a hook), image description
(bounded by the request) and the Codex reset (20s). Slots, RPM and
upstream come after the route begins. A WebSocket upgrade gets a 426.
The report names the wait, so the next one says which.
Run:
- mote, at 57b21abd9 before the rebase: go test ./internal/gateway
-run 'Unrouted|Held|...' passed. The full go test ./... -timeout 45m
was cut off when mote dropped off the network (2 packages ok). The
full suite then went to the Windows box (see the next commit).
- xiaomi-gpu (Windows), node --test: routing-held-report 50/50 in
chromium and webkit, 5 languages, 1100/420px, app and web.
routing-held-request and i18n-keys pass. All routing-* and i18n*:
1742 tests, 94 reds, none in i18n*. The same files are red alone at
origin/main
|
||
|
|
f594b452e3 |
sessions: a Claude fork after a compaction is a branch under its session, read from the start
neo_o11 (Discord, after v0.1.1809): one conversation still showed as ~9
rows with the same title, and opening one showed "Session start" and a
single turn.
Cause, reproduced with real Claude Code 2.1.312 in a sandbox
CLAUDE_CONFIG_DIR: the reporter's session was compacted, then forked
several times (headless --fork-session per task, or /branch). Each fork
starts at the compact boundary and summary, and copies the session's
last reply under the same uuid. So every fork holds the original's
Leaf, and ccCopies hid the original as a fork's copy, though it alone
holds the conversation before the compaction. Each fork had a Leaf of
its own and stayed a row, with the copied title. Opening a fork read
its own file: the summary and one turn.
Fix:
- cc_copies.go: ccFamily returns copies and branches. A file is a
copy of another only when that one holds its Leaf and its Root too,
so a file with what came before the other's start is never hidden.
The members of a family left visible pick a head (holds the other's
Root, then named in the other's forkedFrom, then the earlier start,
then the lower key); the rest are branches of it.
- sessions.go, manage.go: a branch has role "branch" and
parent_session = its head, in List, Find/get and ListAgent.
- transcript.go: a branch's transcript is its head up to the fork
point (the last line of the head holding one of the branch's
uuids), then the branch's own lines. Search still reads its file.
- stats.go: a branch counts only its own lines, so tokens are not
counted twice.
- GUI sessions plugin: the fold under a session names branches apart
("2 branches · 1 subagent"), in en/zh/zh-TW/ja/de.
- Fixtures in testdata/claude-forks/tasks*.jsonl are trimmed from real
2.1.312 output: a session compacted once, two --fork-session task
forks and a /branch copy with forkedFrom.
- docs/subsystems/gateway-sessions.md: copies and branches.
Run:
- go test ./internal/sessions -run 'TestClaude|TestQoder|TestMergeExternal'
on mote, at
|
||
|
|
bc247a8cc4 |
sessions: the Sessions page answers before a first read of a long history
hey_boyce on X: "会话tab等的时间有点长", the page standing on its skeleton rows on its first open. /api/sessions/manage read every file it had no usable parse of whole before answering: the agent shown, and every agent with a gateway session for its ids (Codex's 52 GB too while Claude Code's page was shown). That is every file after a first start, a cacheVersion bump, or a Claude Code or Codex file whose kept parse can't be read on after a restart. |
||
|
|
3959192e94 |
gui: Settings' web search rows move out of app.js to plugins/search/settings.js (#4133)
TestCoreScriptBudget was red on main: the context map's tile wording ( |
||
|
|
449231c19f |
masking: the Masking page turns masking off as it turns it on
ZekeXiao on X: "脱敏好像只有一个打开开关,不能关?". Insights › Masking's header had "Turn on masking" while masking was off and nothing at all while it was on; the off switches were only in Settings › Privacy. - Masking on, the header has a "Turn off masking" text button where "Turn on masking" sits when off. It sets redact and redactPersonal off, and the card then says "Masking is off" with Turn on masking. - Turn on masking from this page after that brings personal data back on if it was on before (and Hide accounts with it, as Settings does); otherwise it turns secrets on, as before. - With the user's own Masked words, masking stays on with both switches off (masking.Wanted), so a button that turned the switches off would leave the page saying on, or lie. Then the button reads "Turn off in Settings" and opens Settings › Privacy, with a tooltip saying the words mask until they are taken out there. Words are never deleted from here. - Strings in plugins/redact/i18n.js for zh, zh-TW, ja, de. Run (worktree at origin/main |
||
|
|
310efb635c |
masking: a record from before a restart says its text was in memory only
brianeee2 on X: in Docker, the masked content can't be seen after the
container restarts; is a mounted folder missing?
No folder is missing. Reproduced on xiaomi-gpu with the image built from
|
||
|
|
85d159a288 |
library: Connect an app is two tabs, agents in groups with a switch each (#2679)
The sheet behind Connect… is redesigned, closer to how Composio's MCP
router reads, and holds up with 25+ agents.
Agents tab: agents → magpie → servers drawn as icon stacks with
magpie's own bird in the middle (no accent block), one line of where
things stand ("19 of 23 agents use…", or the lone agent named), then
the agents in three groups: not connected, connected, keeping each
server's own entry. Each row is a switch (servers/agents-all
{agents:[id], on}); a kept agent shows a short word for why with the
full reason behind (i). Connect all in the bar connects the rest in
one post. With more than 8 agents a search narrows every group, and
the connected and kept groups fold to one row each ("Claude Code,
Cursor and 17 more") so the sheet fits the window.
Other apps tab: the address, then a row per app (Cursor when it isn't
an agent, VS Code, Windsurf, any JSON app) saying where its entry goes,
with Copy entry; Cursor and VS Code get Add in the app (hub-open).
Behaviour change: the switch's off takes every Library server away from
that agent (as By agent's Turn all off does), so turning it on again
gives it all of them, not the ones it had before.
"Why", "Connected" and "Not connected" moved to the core i18n.js: Go
files say them too, so i18n-keys refuses them as plugin words. zh says
已连接 / 未连接.
docs/subsystems/mcp-hub.md's GUI row describes the new sheet (and loses
a duplicated cell).
Run at 239981794 (rebased on origin/main
|
||
|
|
0daf363325 |
gateway: a key resting after an outage is asked again in the background
heatonz on Discord: a key or provider paused after a failure stayed out
for its whole rest, even after its vendor was back. Only Try now got it
back early. probeOne asks only the resting candidate that comes back
soonest, so a key behind ready ones was never asked again early.
What changed:
- gateway/rest_probe.go: the background ask, with no setting.
- Which rests it asks: a key's own rest from a failure that names no
time (a 5xx, a 408, no connection), resting by backoff, at a vendor
whose model list is asked over the network (provider.ListAsks).
- How it asks: the vendor's model list, with the key and its p.Via
proxy. A list costs no allowance.
- When: 1m into the rest, then 2m, 5m and every 10m, each ask at least
half a step before the rest ends. The rest is lifted as soon as the
list answers, the way Try now lifts it (unsink, trace).
- Cost: one list per resting key per step, so at most 4 lists in a
10-minute rest.
- The loop runs from ListenAndServe. A Server whose loop isn't running
(a test's) queues nothing. A loop that ends waits for the asks under way.
- Not asked: a Retry-After or ratelimit reset header, quota or credit, a
rate limit, a refused key, a 4xx, one model's rest, a subscription's
account, a plugin. Those still end on time.
- Rate limits are left out on purpose. A model list answers while chat
still gets 429, so lifting early would undo Sink and go around the
vendor's limit.
- A list answers for the vendor, not for every model behind it. A key
that fails again within 30 minutes of a lift is not asked again until
it answers a real request (probeAnswered in served).
- Rest.Probed / KeyRest.Probed. The provider's key row and Routing's
words for the try add "checked in the background, back as soon as it
answers", in en, zh, zh-TW, ja and de.
- app.js stays under its budget with no raise: a shared hhmm helper, and
resetUsedWhen folded into the identical stamp.
- docs/subsystems/gateway-routing.md describes it.
Tests:
- rest_probe_test.go:
- lifted after one failed ask and one answered, asked with the resting
key;
- no ask again after a missed lift;
- each excluded rest: never queued, 0 asks;
- no loop, no queue; the loop waits for its asks, and a cut-short ask
doesn't lift.
- gui/tests/rest-probed.test.cjs: 5 languages x 1100/420px x chromium and
webkit, 40/40. Red on origin/main's assets.
Broken by hand on mote, each red:
- no lift: test 1 times out;
- no status check: refused key and bad request get asked;
- Retry-After ignored;
- no miss guard;
- no asks.Wait() in the loop's exit.
Run:
- go test -race -count=5 -run TestRestProbe ./internal/gateway: ok.
- mote: internal/gateway ok (636s); internal/provider ok.
internal/gui TestMainWindowCorners/macOS_26_SDK is red on macOS 27,
unrelated, #3949.
- Linux Go full suite (wsl-run, -timeout 45m) at 6cbd77608 (the same
change on
|
||
|
|
fe05f0a721 |
library: a skill can be turned off on this computer alone, and a sync neither carries that nor turns it on
hanslin1666 on Discord (#general 1565016936344191096) wanted a library
skill off on one computer only ("只在这台电脑上关掉"). The only way to do
that was to untick its agents, and the ticks are what a sync carries, so
every other computer lost it too. A sync from a computer that had it on
also gave it back here.
Skill.OffHere (library.json "offHere", omitempty) turns a skill off on
this computer. No agent here gets it, whatever Agents says. Every reader
that gives a skill to an agent now asks gives():
- syncSkills, including the shared ~/.agents/skills check;
- desktop_skills.go;
- skill_changed.go;
- skill_edits.go;
- behind;
- Targets.
Agents stays what a sync carries, and the page shows those chips faded.
Collect never carries OffHere, so turning a skill off changes no part a
sync uploads. Put keeps this computer's OffHere for a skill it puts, so
a sync from a computer that has it on (or that gives it to more agents)
leaves it off here.
Where to turn it off:
- GUI: a power button on the skill row (aria-pressed). When off, an
"Off on this computer" tag sits on its own line under the name; it
says why and turns the skill on when clicked.
- CLI: `magpie library skill off-here|on-here <name>`.
- TUI: the row says the skill is off.
The strings are in en, zh, zh-TW, ja and de.
Existing users: nothing changes. An older library.json has no offHere,
so every skill stays on, and a skill that was never turned off writes no
key (TestSkillOffHereOldLibraryIsOn).
Not covered:
- a project's skills;
- a library skill whose own folder is inside ~/.agents/skills, which
agents read in place;
- a skill another computer removes (the flag goes with it).
The skill's files in the library folder still update while it is off.
Docs: docs/subsystems/library.md and sync-backup.md.
Run at the parent
|
||
|
|
e0ea15b8e8 |
library: an MCP hub, one magpie server in place of every library server (#2679)
With Library → MCP → "MCP hub" on (off by default), each agent that takes an MCP server over HTTP is given one entry, magpie, at /mcp/magpie/hub/<agent>, in place of the library servers ticked for it. magpie runs those servers itself, once for every agent: a command starts on its first call and ends after 10 idle minutes, a URL server is reached with its headers and MCP sign-in. Tools are <server>__<tool>; a tool off in the library is neither listed nor run. Any other app connects at /mcp/magpie/hub, which serves every library server. Both are guarded as /mcp/magpie/tools is (local or a gateway key, no foreign page, 4 MiB, the key's limit per call). An agent that reaches no server over HTTP (Claude Desktop), has a magpie entry of its own, or sits beside a library server called magpie keeps each server's own entry, and the page says why. Off gives every agent its servers back and ends every process the hub started. GUI: a switch under the MCP list, a line of what it serves, the address, and a Connect… sheet. The sheet lists every agent magpie detects that takes MCP (not a fixed four), each with where it stands; one given none of the hub's servers has a Connect that ticks it for every server it can reach (servers/agents-all), so it gets the entry, and the sheet stays open. Then any other app: Cursor (when it isn't a detected agent), VS Code, Other, with the JSON and, in the app, "Add to …" through the app's own install link built in Go (servers/hub-open; the page never sends a link). CLI: magpie library mcp hub on|off. Design: docs/subsystems/mcp-hub.md. With #3885 ( |
||
|
|
2fc2d53583 |
routing: the head's line keeps its height live, so a pick doesn't pull the list up
|