e7fbbaab9f3cd87f6ca6250f1978006bc4fd3fc7
6116
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e7fbbaab9f |
plugin: an author's own listing is kept, for a search to find (plugins#479)
On magpie-community/plugins#479 the owner ruled that registry.json
entries for packages published from their author's own repository
rightly leave out "community": true, and are shown under the
publisher's name, to a search alone. parseMarket dropped every entry
without the flag, so PinK (YuchenWell, plugins#617), and WispTerm,
CiteBox and Wisp Science (hoptoper) couldn't be found in magpie at
all.
What changed:
- parseMarket keeps a listing without the flag; Listing.Community
says which it is. The new plugin.Community(l) picks the community's.
- Every reader of the market was re-derived:
- plugins.js already browses community listings alone, matches a
search over every listing (name, package, summary, providers, npm
publisher), and shows a non-community card and page under its npm
publisher, without the magpie community badge. Unchanged.
- plugin.resolve (a short name like "river") reads the community's
alone: an author's "pink" stays npm's own name "pink".
- pluginAgents (/api/plugins/agents, the Agents page's suggestions)
reads the community's alone, as Discover's Agents section does.
- plugin.Icon's fallback by provider id reads the community's alone;
its exact-package match reads all, so PinK's own icon shows.
- pluginListings and pluginMarketState pass every listing on.
- Docs (en, zh, ja plugins.html) say such a package isn't browsed and
is found by a search, under its publisher.
Tests:
- TestMarketKeepsAuthorsOwnListings parses registry.json's River and
PinK entries as they are at plugins 486a68a5 (#617's base, lines
126-130, PinK without the flag; testdata/registry-pink.json). PinK is
kept, not community, with its kind, summary and icon; resolve("pink")
is "pink" and resolve("river") the community's package.
- TestMarketSources now expects the non-community entry kept.
- plugin-authors-listing.test.cjs: PinK isn't browsed (Agents shows
Kilo, no PinK anywhere), a search by name or publisher shows one PinK
card under "zhouzhenzhou" with no badge, its page reads
"zhouzhenzhou · magpie-plugin-pink" with no badge, River keeps its
badge. en, zh, zh-TW, ja, de; 980 and 420 wide; chromium and webkit.
Broken by hand, each red, then put back:
- parseMarket's `&& l.Community` restored: TestMarketSources and
TestMarketKeepsAuthorsOwnListings red.
- resolve without Community(): TestMarketKeepsAuthorsOwnListings red
(pink resolved to magpie-plugin-pink).
- pluginAgents without Community(): TestPluginAgentsNotInstalled red.
- plugins.js Agents without the l.community filter, and the badge shown
for every agent: plugin-authors-listing 0/22 each.
Run on mote at this head (rebased on a4916aec1; i18n-keys and plugin-authors-listing ran again there, both engines):
- gofmt -l: clean. GOOS=linux go vet -tags nogui and GOOS=windows go
vet of internal/plugin and internal/gui: ok.
- go test -timeout 45m internal/plugin, internal/provider: ok.
internal/gui: ok but TestMainWindowCorners/macOS_26_SDK (#3949,
mote's macOS 27, nothing here touches it).
- At 3086c650b (rebased on 541102eba; the rebase since touched
host.js, a gateway test and a provider test only): agent, agentplug,
backup, davsync, library, middleware, usage and plugins/...: ok.
cli: TestEveryRouteHasACommandOrIsNamed (#4826); gateway:
TestCodexPoolSaysTheClientsVersion (#4807). Both filed, untouched
here.
- node --test site/*.test.mjs: 80/80.
- GUI, every file that reaches the Plugins page (agent-plugin-agents,
i18n-keys, market-*, plugin*; 1078 tests, both engines): 1074 pass,
plugin-authors-listing 22/22. The 4 reds are plugin-move-unserved's
"Try again takes the models unticked" (#4410, models folded behind
"Show the other"), not reached here. The whole GUI suite wasn't run:
mote held two other sessions' full suites for over an hour, and this
changes no app.js, plugins.js, layout or API call. That run was at
f5c956b84; after the rebase on
|
||
|
|
a4916aec10 |
gateway: a Codex websocket turn sent to a Responses relay leaves Lite's client_metadata marker behind (#4853)
A Codex title request through a Responses relay (CPA) failed with "X-OpenAI-Internal-Codex-Responses-Lite requires reasoning.context to be all_turns". fromLite took Lite's shape off for a backend that isn't OpenAI's: it lifted additional_tools, left reasoning.context out and didn't send the Lite header on. But over a websocket Codex says it is Lite a second way, in client_metadata (ws_request_header_x_openai_internal_codex_responses_lite: "true", codex-rs client.rs build_ws_client_metadata). magpie left that marker in, so the relay still read the request as Lite and passed it to the ChatGPT backend without the context it had been told to expect. fromLite now also drops that one client_metadata key (withoutLiteMetadata). Every other client_metadata entry, the instructions and the identity line go as Codex sent them. Reported by ChangQiu on Discord and filed as #4853 by ZyphrZero. The withoutLiteMetadata patch and its two tests are ported from ZyphrZero's fork commit 7f67c732. TestCodexSocketLiteTurnLeavesLiteForARelay is new: it sends #4853's title request through passthrough to a fake relay and checks that the marker, the context and the header are all gone. Run on mote at this head: - the three new tests plus TestLiteSubagentLeavesLite and the additional_tools tests: ok - go test -timeout 45m ./internal/gateway: one red, TestCodexPoolSaysTheClientsVersion (#4807). It passes 3/3 alone here and on origin/main. - go vet ./internal/gateway with GOOS=linux, windows and darwin: clean. gofmt -l: clean. Broken by hand: with withoutLiteMetadata stubbed to return its input, all three new tests went red. Not tried: a real CPA, or a real Codex websocket session through magpie. |
||
|
|
225d521cde |
minimax: Desktop keeps its own model pick, so magpie says to pick once in its menu
教父 on Discord (MiniMax Code 3.1.10, magpie v0.1.2629 and v0.1.2679):
MiniMax Code turned on in magpie's Agents page with a model picked, and
MiniMax Code went on with the user's own MiniMax-M3.1-Flash; Sessions
showed nothing.
3.1.10 is MiniMax Code Desktop (Electron, MiniMax Code.app). It runs the
mcode runtime on the same ~/.minimax/config.yaml magpie writes, and that
write is right: defaultModel is custom_provider:magpie/<model>. But
Desktop's window keeps the global model last picked in it in Chromium
localStorage ("mavis:model-selection", read from 3.1.10's renderer chunk
56321) and, when the model list loads, marks that one selected while it
is still in the runtime's list, ignoring the runtime's own default.
Only a session.model_updated from the runtime's own select API moves it,
and the runtime reads config.yaml at start-up and doesn't watch it. A
release build has no local HTTP API (local-runtime's server listens only
with the diagnostic sidecar env set), so magpie can't move the pick, and
writing the app's leveldb would risk the user's app data. Nothing changed
here between v0.1.2629 and main (only 35c47f762's dsh YAML speed-up).
What changed:
- desktopApps knows MiniMax Code Desktop: MiniMax Code.app with bundle id
com.minimax.agent.cn (filecdn.minimax.chat) or com.minimax.agent
(file.cdn.minimax.io), and on Windows electron-builder's per-user
default %LOCALAPPDATA%\Programs\MiniMax Code\MiniMax Code.exe. So its
version shows beside the CLI's, and ~/.minimax isn't a leftover there.
- With the app installed, MiniMax Code's notice says to restart the app
and pick a magpie model once in its model menu (under magpie); mcode
sessions still need a restart. Translated in zh, zh-TW, ja and de.
- agent-wiring.md says why.
Run (on mote) at the first base
|
||
|
|
a1f56720cd |
gateway: Claude Desktop's catalog-named rows say their provider in the description (4 v5)
4 v5 on Discord: with Provider in model names on, Claude Desktop's picker listed four relays' Opus 5.5 (老林夕, 新林夕, 百德, chatflowsai) all as "Opus 5.5 (…7922287072.anthropic.claude-opus-5-5)", told apart only by the id's tail. Cause: a Claude model with reasoning levels is listed as magpie-<n>.anthropic.<model> so Desktop gives it the effort picker (claudeLooking). Desktop 4.4212 labels a picker row by labelOverride, then its signed catalog's name, then display_name (ngn in index.chunk-m4oMImJ-.js), so our display_name "Opus 5.5 · 老林夕" is never shown for those ids; Qhn then appends the differing id tail to rows of one name. labelOverride comes only from an admin inferenceModels list in Desktop's profile (static, read at start, sealed at rest in 4.4212, and it can't say DesktopLongest's "[1m] only"), so magpie doesn't write it. Turning the catalog off would lose the effort picker for opus/sonnet 5.5 (Kfn lacks them). Change: Desktop shows the gateway's description under the name, before the catalog's (which has none for these models). desktopModels now puts the provider there for a catalog-named row (DesktopNumber != "") when the Provider in model names setting puts it after the name (desktopSaidBy): on, every one; own, every vendor-named one; off, only two of one name. A DesktopLongest 1M row says "1M context window · <provider>". Ids are unchanged, so saved sessions and picks still resolve. Rows Desktop names by display_name are unchanged. agent-wiring.md updated. Run on mote. At base |
||
|
|
d577c184b3 |
redact: a user name's and an address's stand-ins come back in any case (yapechan on Discord)
yapechan (Discord #feedback): with masking on, a person's name sometimes
came back as letters that are no one's, with no {{…}} braces. A user name
in a home folder goes to the vendor as eight made-up lowercase letters
(standInOf). When the login name is the user's own name (yaobin), a model
takes those letters for the user's name and writes them as a name is
written, "作者:Tmhdfetm", "Hi Tmhdfetm,". restoreShapes put a stand-in
back only as written, so a capitalised or upper-case one reached the user
as garbage. An IP stand-in (public-ip-…), a host name that is the same in
any case, had the same gap.
Now a USERNAME or IP stand-in is put back in any ASCII case: in Restore,
RestoreJSON (hasShapes), a stream's held tail (shapeTail) and
outsideShapes. Matching uses an ASCII-lowered copy of the same length
(lowerASCII, which now returns s itself with no capital in it, so there
is no copy), and strings.Index runs once per stand-in as before. An IP
stand-in is still put back only as a whole name. A key's made-up form
(Options.Shape) is still put back only as written, because a key's case
is part of it.
The restart question: the placeholder-to-value map is in memory only.
But a placeholder is an HMAC of its value under a key kept on disk
(redact.key, 0600, SetKeyPath from the gateway), and an agent resends its
history with the values on every turn. So after a restart the same value
goes as the same placeholder and the reply comes back whole.
TestPlaceholdersOutliveARestart now guards that, using the reporter's
姚斌 as a user word. Nothing new is written to disk.
Not found in magpie: a homophone (姚斌 -> 姚兵). Nothing in redact, pii
or restore maps a name by sound. A value goes back only for its own
placeholder or stand-in. The test records that 姚兵 goes back as the
vendor wrote it. Most likely the vendor model wrote it from a
romanisation it saw (a login name, an address); this is not reproduced.
Run at 19e9f7a82 (rebased on
|
||
|
|
4fc34828e5 |
docs: an agent's model picker sends a model in its vendor's fast mode from the bolt on its row (Phoen1xCode on Discord)
Phoen1xCode asked whether magpie can send a ChatGPT (Codex) account's models to other agents in Codex's Fast mode, service_tier "priority". It already does, since #954: the bolt beside a model's star in the agent's picker (shown on the picked row and under the pointer, like the star), and a routing group member's Fast switch. Nothing in the site docs said so, and the bolt is hidden on the other rows, so the feature couldn't be found without hovering the right row. Section 2 of the start page (en, zh, ja) now says which models have the bolt (provider.CanFast: a ChatGPT account's GPT, an OpenAI key's GPT and o-series, Cursor's with a fast variant, Claude Opus on an Anthropic key, a plugin's or remote magpie's that says priority), what it sends (service_tier "priority" as Codex's /fast does, checked against openai/codex a09812981 codex-rs/protocol/src/config_types.rs: ServiceTier::Fast.request_value() is "priority"; Claude's speed "fast"), the Ultrafast step, that it is per agent and leaves fallbacks as they are, and the routing group's switch. No code changed. The GUI's hover-only bolt is left as it is: it matches the star beside it. Run at this head on mote: node --test site/worker.test.mjs site/install.test.mjs site/stable.test.mjs site/credits.test.mjs, 80/80. Not tried: a real ChatGPT account's priority request; no test covers docs text. Not changed: the CLI and TUI have no way to switch an agent's fast pick (#4860). |
||
|
|
2b938b170d |
gateway keys: the key editor offers decision models (Jev, Clef) beside the groups
Kautism on Discord: a gateway key held to a few routing groups couldn't use Clef or Jev, and they showed nowhere for it. A decision model is a model: /v1/systemone and the decision list another magpie asks for (DecidersHeader) hold a key to it as to any model, which stays so (the restriction covers both routes). But GET /api/caller-keys/models listed only provider.Catalog, which has no decision models, so the only way to let a held key ask one was All models. - caller_keys.go: the picker's list now has OfferedDeciders, each after its provider's chat models, marked decides. - keys.js: such a model's note says it is a decision model that a routing group asks whatever the key may use, and that picking it lets the key ask it itself; en, zh, zh-TW, ja, de. - A group the key names still asks its own Jev for every turn with no key check (askJev); TestGatewayKeyHeldToAGroupKeepsItsDecider holds that, and that the key is refused Jev at /v1/systemone and not listed it until it names it, then allowed and listed. - docs/reference.md and gateway-routing.md say so. Run on mote at the pre-rebase head; at the pushed head (rebased on |
||
|
|
066ece93bb |
provider: LongCat is a vendor preset, Meituan's LongCat API platform with chat completions, Responses and Anthropic messages (hoobnn on Discord)
LongCat makes its own models (LongCat-2.5, launched 11-02) and serves them
at api.longcat.chat. magpie had LongCat's icon but no preset for it.
The new preset is longcat ("LongCat", KindVendor, icon longcat, catalog
models.dev's longcat). It uses:
- chat completions and Responses at https://api.longcat.chat/openai/v1;
- Anthropic messages at https://api.longcat.chat/anthropic;
- docs at longcat.chat/platform/docs/zh/api-docs, keys at
longcat.chat/platform/api_keys.
The key goes as a Bearer. magpie sends both headers, and the docs ask for
Bearer on both endpoints; x-api-key alone gets "missing_api_key". The model
list is /openai/v1/models. longcat.chat's and longcat.ai's accounts use the
same API host (both sites' api-docs pages name api.longcat.chat).
An entry at those endpoints imports as the preset, for example CC Switch's
Claude Code and Codex entries from LongCat's cc-switch page. OpenCode's
auth.json "longcat" (models.dev's id) maps to the preset too. The README
(en, zh), docs/reference.md and the site's import pages (en, zh, ja, and
import.html, with the icon) list it.
Sources, read 11-02: api-docs, api/models, api/model, api/model-params,
api/chat, api/messages, image-video-understanding, cc-switch, pricing/
longcat-2.5, change-log, faq.
Probed without a key, from this machine: /openai/v1/models and
/anthropic/v1/models answer 401 authentication_error "missing_api_key".
/openai/v1/chat/completions, /openai/v1/responses and
/anthropic/v1/messages with a bad Bearer answer 401 "incorrect api key".
Run at this head (base
|
||
|
|
d24be3c251 |
gateway: a request over a provider's byte cap is asked again with its oldest images left out (EDwinpzy)
EDwinpzy on Discord (v0.1.2605, Windows, Codex Desktop, compaction on auto/deepseek-v4.1-flash through Command Code): a long session full of screenshots could not compact. Command Code refused the summary request with 400 "Request body is 40.1 MB, over the 32 MB limit for one request (33554432 bytes)". That is not a 413, so summaryTooLarge never sent it to the text-only ask, and Codex's compaction failed three times. The compaction guard then held it for five minutes, and after that the same 40 MB body was sent again. Agent turns of the same session hit the cap the same way. What changed (internal/gateway/body_cap.go, wired in forward and forwardOnce): - byteCapRefusal: a 413, or a refusal of any other status whose words say the body is over a size limit. A 401, 403, 429 or a context overflow (tooLong) never counts. - refitOverCap (forward): the cap is taken from the refusal (the smallest size it names below what was sent, else 3/4 of what was sent) and kept per provider id. The request is then asked again, fitted to 3/4 of the cap, at most three times. - To fit a request, the oldest history images are replaced one by one, each with a text part: "[An earlier image was left out here to keep this request under its size limit.]" (it names neither magpie nor the vendor). The latest user message's images, and every text including tool output, are kept. Every other byte of the body stays as it was. Covers Responses, Chat, Anthropic and Gemini. - withinCap (forwardOnce): once a cap is known, a later request near it is fitted before it goes, so each turn doesn't pay a refusal first. - When leaving out every earlier image still doesn't fit, or every size is refused, the agent gets a 413 request_too_large naming the size, the cap and what was kept. Codex reads that as context_length_exceeded, and its compaction goes on to plainCompact and localSummary instead of sending the same body into the guard's hold. Every route that calls serve goes through forward, including magpie's own: compaction, titles, the classifier, search, vision and the Codex fallback turn. So all of them are fitted. Not changed: magpie's own requests still run no gateway hooks, so a plugin's onRequest doesn't see compaction (EDwinpzy's other ask). Running them there changes the plugin contract: a recall plugin's context would land in summaries and titles, and onResponse would see calls the user never sent. Filed as #4847, and written in gateway-request-hooks.md. gateway-routing.md describes the byte-cap fitting. Tests (body_cap_test.go), built from the reporter's shape: a ~40 MB Codex session of 20 ~2 MB screenshots, from view_image tool outputs and pasted user images, and a latest user message with its own screenshot. The fake upstream refuses anything over 32 MiB with the reporter's literal 400 body. No network. - TestCompactionOverByteCapLeavesOutOldImages (Responses and Chat upstreams): Codex gets the model's SUMMARY. The second ask is under 24 MiB, the oldest screenshot is replaced by the marker, SHOT19 (the latest user message's image) is kept, and every user text and tool output text is kept. - TestTurnOverByteCapLeavesOutOldImages: a turn is fitted the same way, and the next turn goes fitted with one upstream call. - TestOverByteCapNothingToLeaveOut: every image is in the latest message. The body is sent once, and Codex gets context_length_exceeded with "over the 32.0 MB 1017dp takes in one request ... no earlier image". - TestCompactionOverByteCapEveryTime: refused at every size. Asks get smaller, there are at most 6 calls, and it ends in a local summary with no image in it. - TestByteCapRefusal and TestWithoutOldImagesEachProtocol: the classifier (TPM 429, context overflow, 401 and an invalid-schema 400 are not caps), statedCap, and the Chat, Anthropic and Gemini splices. Run on mote (Go 1.26.8, macOS) at this change on |
||
|
|
f5c956b848 |
plugin: a 401 on an access token its refresh token renews makes it due, not the sign-in gone (plugins#618)
jinpy666 (magpie-community/plugins#618): with Copilot plugin 0.1.0, the two Copilot slots that carried no traffic said "sign-in has expired — sign in again" within a day or two, while their GitHub OAuth token still traded at /copilot_internal/v2/token. A plugin's bare 401 (no X-Magpie-Sign-In) marked the account whatever the cause, and a mark is cleared only by a success or a usage read that says so, which an idle slot never gets. The host now judges such a 401 against the sign-in as the request found it (staleAccess in host.js). For an OAuth sign-in with a refresh token whose access token is still the stored one and not due yet, it makes the token due (expires 1, under the auth lock, only while the access token is unchanged), drops the account's loader and says "kept": the gateway fails the request over as before, and the next request renews the token through the plugin's loader (or magpie's auth.refresh) and goes through. Still marked: an access token renewed for this request and turned away, one that was due already and not renewed, an account with no refresh token, and a plugin saying "expired" (a refused refresh). A sign-in that can't be read when the 401 comes is unknown: kept, not marked. A marked account stays routable (pluginAlsoOn doesn't filter marks), so a slot marked before this is renewed on its next request and the success clears it. Copilot isn't a mover; its plugin 0.1.1 (plugins 53d4813, on the dist branch; never on npm) says "expired" for the exchange's own 401 and "renewed" for a quota read GitHub answers, which clears old marks. TestPluginStaleAccessRenewsNotLapses (new, fake plugin + local vendor, no network): idle account kept and due after the 401, renewed and 200 on the next request; a renewed token refused is marked; a refused refresh (signIn "expired") is marked; plugin-auth.json unreadable at the 401 marks nothing; a marked account is still routed. TestPluginFailover's "gone" case asserted one 401 marks; it now asserts no mark after that 401 and the mark once the account's renewed token is refused too. docs/subsystems/provider-plugins.md has the rule. Run at this commit's tree (mote, rebased on |
||
|
|
541102eba2 |
claude: a saved account's .claude.json gets the onboarding mark when it lacks it (Jaxxxxnn on X)
Jaxxxxnn on X (magpie 0.1.2669, Claude Code 2.1.316, macOS arm64): a saved Claude account's config directory had a .claude.json without hasCompletedOnboarding. Claude Code's interactive mode then asked for a login method beside a sign-in that works, the run ended on it, and both requests and the usage read failed as if signed out. Adding the mark by hand fixed it with the same token. magpie wrote the mark only when it made .claude.json itself, so a directory -p ran in (before the interactive mode was the default) or one an earlier magpie made kept a file without it. claudeOnboarded now adds the mark to the file that is there, every other key kept (numbers read with UseNumber), on both paths of claudeSavedDir (sign-in put in, or there already) and in claudeTokenDir. A file that can't be read or parsed, which Claude Code may be writing, is left as it is. Run (mote, at this tree): - go test -count=1 ./internal/provider ./internal/claudetui: ok - go vet ./internal/provider, GOOS=linux and GOOS=windows: ok - gofmt -l: clean Broken by hand: with claude_dirs.go and claude_setup_token.go at origin/main, TestClaudeSavedDirMarksOnboardingDone and TestClaudeTokenDirMarksOnboardingDone are red. Not tried: a real Claude Code 2.1.316 run in a directory without the mark; the reporter's own fix (the same mark) is the evidence. Not the full suite. |
||
|
|
a69ffd9f01 |
appdir: a portable data folder in a moved Downloads, Desktop or Documents stays magpie's on update (jwaitq)
jwaitq on Discord (#feedback, 11-02): updated from v0.1.2630 to v0.1.2670 with the update button, and magpie showed the setup of long ago. |
||
|
|
b611215034 |
gateway: a relay's 400 "concurrency limit, retry later" says the agent can retry (#2372, zminds, ump45nose)
|
||
|
|
0431793db4 |
provider: a key added beside others takes the models its own list has
Young on Discord: a provider of several keys, each of a relay group that serves some of its models, had every key added or imported allow every model, so the user narrowed each by hand, and requests went to a key that can't serve the model. A key added now (GUI Add key, Import keys, several keys pasted in the provider's key field, and Import local configurations, CC Switch's entries folded into one provider included) is asked for its own /models, with that key alone, within the add's 8s wait and beside the provider's own Fetch. What it answers becomes its AccountModels when it leaves out a model the provider's other keys serve. Only a new key with no models of its own is given a list: the keys a provider had keep theirs (none, or the user's), and a pick the user makes while the list is asked is kept. A key whose list can't be told keeps every model, as before, and no empty list is written: a refused key, an empty list, one past the wait, a base that didn't answer (its part would be the provider's old list), a vendor with no list (Preset.NoList, plan-only presets, Cline and Kilo's feeds), a provider of one key, and a key that lists every model the others do (a list would only hold back what the vendor adds later). The CLI has no key add (`provider key` replaces the key), so it is unchanged. Run on mote at the pushed head (on origin/main |
||
|
|
fa6725ee7f |
grok: an account with no plan says Grok, and the provider is Grok, not "Grok (SuperGrok)" (#3668, zane668, skygunner)
zane668's two Grok accounts both showed "SuperGrok", one of them on a plan that isn't. Two places named a tier no one had told magpie: - the account chip's Grok branch (accountPlan in app.js) fell back to the literal "SuperGrok" when the plugin reported no plan, and the Grok plugin reports none, so every account said it; - the retired built-in's provider name (movedCards in plugin_usage.go) and the Add sheet's Grok tile were "Grok (SuperGrok)". A known plan is still shown as told; with none, the chip says the provider's own name, Grok. The provider row and the Add tile say Grok; the tile's plans line still lists "SuperGrok · X Premium+" as the plans it takes. skygunner's patch (their branch fix/r25-grok-plan-absent-label, commit 7ca156c68, on #3668) is the app.js fallback and grok-plan.test.cjs, with plugin-plan.test.cjs updated; applied as written. The provider name and the Add tile are added here. Not changed: the plugin's own name "Grok (SuperGrok)" in magpie-community/plugins (packages/grok), which magpie's moved-card name overrides, and the plugin still returns no plan, so the real tier needs Grok's API for it, which isn't known yet. Run at the pushed head, on mote: - GUI (chromium + webkit, narrow widths, every language): grok-plan (new), plugin-plan, i18n-keys, add-sheet, deprecated-subscriptions, plugin-market, provider-listed-as, plugin-movable-review, plugin-signed-out-account: 65 pass, 0 fail. - go test -tags nogui ./internal/provider/ ./internal/gui/: ok (TestMovedProviderName now expects "Grok"). - GOOS=linux and GOOS=windows go vet -tags nogui ./internal/provider/: ok; gofmt -l clean. - Broken by hand: the "SuperGrok" fallback put back, grok-plan is red. Not tried: the real Grok plugin signed in with a real account. Co-authored-by: skygunner <84759+skygunner@users.noreply.github.com> Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com> |
||
|
|
b3eb26400c |
library: a ${NAME} only the login shell exports reaches the MCP server magpie starts or calls
Cyrus on Discord: once a Library MCP server's token was written as
${NAME}, the Library listed no tools for it. magpie expanded the
reference from its own environment only, and a magpie opened from the
Finder or the Dock has none of the profile's variables, so a token
exported in .zshrc was "not set" for the tool-list check, and the
router (dialHub) and Codex's run through the gateway (specOf) didn't
start the server either.
expandAll, the one place all three expand a reference, now takes a
variable magpie's environment hasn't from proc.LoginVars: what the
login shell (and fish or nushell, as shellEnv asks them) exports, read
through /bin/sh as the existing PATH probe is, each answer kept a
minute. On Windows it reads the registry's user then machine variables
(one set with setx after magpie started). The value is only in memory
at call time: never set in magpie's environment, never written to
library.json or an agent's file, never logged. A variable set nowhere
is still novar, naming it ("NAME not set" on the page, unchanged). The
library only documents ${NAME} (no ${NAME:-default}), so nothing else
is parsed.
Run at this head (90d554db1 rebased on
|
||
|
|
46a13f8375 |
gateway: a Claude Code Message Threads turn is refused so it is sent again whole (#2480, zane668, Vincentzyx)
Claude Code's Message Threads (message-threads-2026-08-12) send
"thread": {"type":"create"} on a thread's first turn and
{"type":"continue","previous_message_id":...} after, and a continue
carries only what came after that message: the history, the system
prompt and the tools are left to the server. magpie keeps no thread and
never read the field, so a continue went on to the upstream as the
latest turn alone. Vincentzyx's case (#2480): 50,381 input tokens on one
turn, 2,034 on the next, and the model asked what the task was.
What changed: /v1/messages (and /messages) answers a request that names
a thread, create or continue, before it is routed, with Anthropic's
refusal for a thread it can't serve: 400 invalid_request_error,
error.details.error_code "thread_unsupported_request". Claude Code's
tether reads that code as "unsupported_request" and sends the same turn
again stateless, with the whole history, system and tools, and keeps
that thread stateless on that model for the rest of the session (read
from Claude Code 2.1.316's own code: "[tether] ...: resending this turn
stateless; this thread stays stateless on this model for the session").
A request with no thread, or "thread": null, is served as before.
Nothing is passed through for an upstream that might keep threads: magpie
routes each turn on its own, so a continue can't be trusted to reach the
upstream that saw its create.
Run at the pushed head, on mote:
- TestMessageThreadsSentAgainWhole (new; #2480's own synthetic bodies,
both paths, create and continue; and the turn sent again whole is
served with its system and tools): ok.
- Broken by hand (the check turned off): red, the create and the
continue both reach the fake upstream with "thread" in them.
- go test -tags nogui -timeout 45m ./internal/gateway/ at the rebased
head: every test ok except
TestCodexPoolSaysTheClientsVersion, red the same in a full run at a
clean
|
||
|
|
838d12d6f8 |
sessions: the Move sessions to Codex's provider dialog has Select all and Invert selection
Cyrus on Discord asked for a way to pick all and to invert the picks in
the "Move sessions to {to}?" dialog (the Codex sessions made with another
provider, each with a checkbox).
Over a list of more than one, a quiet row above it now says how many are
picked ("{n} selected", the core's word), with two text buttons: Select
all, which reads Deselect all once every one is picked, and Invert
selection. Each press re-ticks the boxes; the count and Move follow, and
Move is off with none picked, as it was for boxes unticked by hand. A
list of one has no row. Plain text buttons, no native select, no
coloured border. Only the sessions plugin changes (client.js, its CSS
and i18n.js); app.js and the core budget are untouched. "Select all" and
"{n} selected" are the core's keys; "Deselect all" and "Invert
selection" are new, in zh, zh-TW, ja and de.
Run on mote at this tree (base
|
||
|
|
1a864f156e |
usage: a hidden card a menu bar cell showed offers Show in Overview, not Hide again
Found while fixing yuu003348's report ( |
||
|
|
dee1afa400 |
usage: what is hidden from the Overview can be found again (yuu003348 on Discord)
yuu003348 on Discord: "观测/用量/概览 从概览中隐藏 后 无法取消隐藏". The way
back was there: a "{n} hidden" line under the cards (#quotaHid), each row with
Unhide, Show all from two. But it was drawn in --faint (#b9b9c2 on #f4f4f6,
1.77:1, 11.5px), so it couldn't be found; the Agents list's line (ikunbots on
X) is the same class.
- app.css: .us-hid .us-hidline is --muted (3:1 or more in light; ~5:1 in
dark by the tokens), for both lines.
- plugins/usage/page.js: while any are hidden, a card's menu and an Agents
row's menu end with "Show {n} Hidden". It opens the line under its list,
puts the keyboard on it and brings it into sight on the menu's click
(openHidden, scrollOnPurpose). hiddenQuotas() is the one count both the
line and the menu read.
- i18n: "Show {n} Hidden" in zh, zh-TW, ja, de.
- docs/subsystems/gui-shell.md says both.
- usage-cards-hide / usage-agents-hide now expect the new item when
something is hidden already.
Run (mote, node --test):
- usage-hidden-way-back.test.cjs (new): chromium and webkit, en/zh/zh-TW/ja/
de, 1200, 560 and 390 (touch long-press): 2 of 2 ok (32 cases).
- 130 Usage/menu/tray GUI files: the only reds the change made were
usage-cards-hide and usage-agents-hide's exact menu lists, now updated.
Every other red there is red at origin/main
|
||
|
|
d39358f1bb |
claude: /usage and "hi" reads run in magpie's work folder and say why they ended (#4830)
mydosu's Claude Code quota reads on Windows failed for both accounts
with "exit status 1" alone. Two things were behind it:
- Each one-off interactive run (claudeUsageTUI, askClaudeTUI) started in
a new magpie-claude-<n> temp folder, which the helper trusted, so each
read wrote one more trusted projects entry into the config's state file.
The reporter had 67 in ~/.claude.json.
- The caller's budget (subscriptionTimeout, 20s) is shorter than the
helper's own waits (45s for the prompt, 20s for a panel). The context's
kill came first, and that is TerminateProcess on Windows, so Wait said
"exit status 1" with an empty stderr. On Unix the same kill says
"signal: killed".
What changed:
- One-off TUI runs work in claudeWorkDir (oneOffDir). That is the
owner-checked folder the bridge's own runs already use, so each config
directory holds one trusted entry instead of one per read. A temp
folder is made only when that folder can't be.
- The run's session file there is removed by the session_id the helper's
init line names (dropOneOff). It is not removed under WSL.
- The helper is told its caller's deadline (claudetui.DeadlineEnv, the
context's deadline less min(3s, a quarter of what is left)). At that
time it ends on its own, saying what Claude Code hadn't done and its
last screen, e.g. "Claude Code hadn't drawn /usage's panel in the
2.9s its caller waits for it: ...".
- A run that still says nothing reads "Claude Code's interactive mode
said nothing before magpie stopped waiting for it (...)" (oneOffErr),
not an exit code.
- quotaError says these reasons on the card as "Allowance unavailable:
{why}" (an existing key in every language). The full text stays in
the tooltip. Nearby comments were cut so the core script budget holds
without a raise.
- No -p fallback was added. The -p asks keep their own temp folder,
since -p asks nothing about trust.
- The entries older magpies left in ~/.claude.json are left alone:
magpie never writes that file.
Run at this head (after the rebase on
|
||
|
|
c875e66c24 |
gateway: reasoning a Chat, Messages or Gemini client's calls carry, refused by another Responses upstream, is asked again without (#4798)
Since |
||
|
|
fdfce4d986 |
provider: WorkBuddy's mover asks for opencode-workbuddy-auth 0.2.11, whose card shows the plan's credits apart from gifted ones (akic404)
akic404 on Discord: "workbuddy 积分总量可否分离套餐内的总量和赠送的总量?…
现在这样那个匀速用量线实际没意义的". The plugin summed every package of the
resource summary into one "Credits" window, so gifted and activity credits
used long ago put the card at most of its allowance on the first day of
the month. magpie-community/plugins 486a68a (workbuddy 0.2.11) splits it
by package code, as WorkBuddy's own client groups them: "Credits" is the
plan's packages (those the client refreshes each cycle, or the named
subscription) with the plan's cycle, "Extra credits" the ones that only
lapse. One of the two is set aside, so routing still stops the account
only when both are spent. keepMovedCurrent brings every moved user up to
it.
Run, on mote at this tree (origin/main
|
||
|
|
18c3976234 |
gateway: DSML calls Alma relays from a group's DeepSeek are guarded on the Responses route
wishSeikouudoku on X (tweet 2117056042001719807, 11-02 08:47 +0800): Alma, through a magpie group to DeepSeek, got <||DSML|| calls>, invoke name="…" and parameter as its reply's text, and no tool ran. Cause, already fixed on main: Alma's magpie provider is of type openai, which the AI SDK sends to /v1/responses (the owner's usage log: 4365 Alma rows with ep /v1/responses). DeepSeek's preset speaks Responses too, so the reply was relayed as it came, and before |
||
|
|
ca1fc43fc9 |
provider: quota history draws no line for a plugin's aside window that says no share (#4825)
ggbdpq's patch (gua2100 on Discord), reviewed and landed with an
end-to-end test and a doc line.
What changed
- quotaOfPlugin marks an aside window that leaves `used` out, with no
count to reckon one from, as noShare. pointOf refuses such a window,
so the history no longer draws a flat 100%-left line for it. The card
still shows the row as before.
- noShare is unexported and so lost on JSON. Cards restored from the
cache have AsOf set, and noteQuotaHistory skips them, so this never
matters.
- Review changes: TestAsideWindowWithoutUsedDrawsNoLine now also runs
the windows through noteQuotaHistory and QuotaHistories in a sandbox
HOME, and wants lines [Bonus Weekly] only.
docs/subsystems/providers-accounts.md says such a window isn't kept.
Run at the pushed head (on mote, base
|
||
|
|
33f21bdb1f |
otlp: a global proxy switch drops the exporter's idle connection to the collector (#4824)
The residue ggbdpq's #4824 patch named. The OTel exporter keeps its own
long-lived transport (Proxy: netproxy.Func). An https collector gets
HTTP/2, which pools by authority alone, so after the global proxy moved,
every batch kept going through the old proxy's connection. The exporter
now holds a netproxy.Watch, and send closes the client's idle
connections when the proxy has moved since the last send. An exporter
built without one (otel_cost_test's literal) skips the check.
Run at the pushed head (on mote, base
|
||
|
|
3ed3605ba0 |
netproxy: a global proxy switch drops the idle connections of the sync and the icon fetch (#4824)
ggbdpq's patch (gua2100 on Discord), reviewed and landed with test changes. What changed - netproxy.Watch gives the dispatch's per-request check for a moved global proxy (#4523) to transports magpie keeps for itself. The sync (davsync) uses http.DefaultTransport, so when one of its requests finds the proxy moved, it now drops the idle connections itself. Before this, only a DefaultClient request dropped them, and a backup kept going through the old proxy's HTTP/2 connection. - FetchIcon now closes the pool of the client that only the fetch used. Nothing closed it before. - Review changes: the davsync test restores settings.json afterwards, and the icon test's wait for idle is bounded at 20s, not 2s, to leave room under load. Run at the pushed head (on mote, base |
||
|
|
4d55a0a02c |
provider: Cursor's mover min is 0.2.37, which starts a long step on a fresh Run and says to retry a deadline cut (#4419)
Okxdd123 (#4419): a Pi turn on cursor/grok-4.7@500k went on in a retained native Run with 494 s of its 15-minute lifetime left, and the deadline cut the answer with "native Run lifetime expired", words Pi doesn't retry on. ggbdpq found the cause and wrote a gateway-side patch and repro; the plugin owns both the deadline and the words, so the fix is there (magpie-community/plugins#616, 3f615ea): - a step with under 10 minutes of the lifetime left goes on a fresh Run from the history instead of the old Run (was: the last minute); - a Run the deadline still cuts says "native Run lifetime expired: the Run timed out; retry your request", which Pi's retry list and magpie's passingSaid both take. This raises the mover's min to 0.2.37, so keepMovedCurrent updates every moved user's plugin. npm view --prefer-online shows 0.2.37. Run (mote, temp HOME): go test ./internal/provider ok (103.9s); go vet ./internal/provider for darwin, GOOS=linux -tags nogui and GOOS=windows clean; gofmt -l internal/provider prints nothing. Not tried: a real Cursor account reaching the deadline, or a real moved user's plugin update to 0.2.37. Co-authored-by: ggbdpq <ggbdpq@gmail.com> |
||
|
|
679bc412cb |
library: Magpie Browser's row asks which agents may use it, once connected
Magpie Browser is added with no agents (opt-in), so the router offers it to none until one is ticked, and an agent asked to use the browser reached for AppleScript instead. While its extension is connected (GET /api/library/browser, read again every 3s while the row is shown, so connecting it needs no reload) and no agent has it, its row asks "Which agents may use it? They act in your tabs, signed in as you are.", a button per agent that clicks that agent's chip (servers/agents, as a chip's click). Once one has it, the row asks nothing more. Not connected, or given to an agent already, it asks nothing. Run on mote at this head ( |
||
|
|
8e884421cb |
library: opening the page draws it again only for a change (#3099)
Every opening of the Library (its nav clicked, while on it too, or back from another page) read the library and drew the whole page again, changed or not. The rows were replaced under the reader's pointer, so the trash shown on a row's hover went away mid-click, and library-row-remove's click measured a row already gone: red about half the time in Chromium since 10-29 (the test opens the page at ?view=library, then clicks Library again). Opening the page now draws it again only when the library changed, or on RTK's tab, which is asked again each time; a language change still draws it all again. Found by logging render()'s callers: two opens, the second drawing the same library 10-20ms after the first. Run on mote at this head ( |
||
|
|
e44ad72cfd |
gui: a failed status dot is an x, not a red dot alone
coolmantou on Discord (#feedback), who is red-green colour-weak, could barely tell the green status dot from the red one. Under a deuteranopia or protanopia simulation the two are one olive colour, in light and dark. Making the green lighter would not help a greyscale or protan reader, so the failed state now says it by shape (Apple HIG: never colour alone). What changed - app.css: a --x-mark token (an SVG x, used as a mask). Each failed dot keeps its red and its 6-7px box, is drawn through the mask and scaled 1.5 so it reads as heavy as the round dot. Layout is unchanged. Dots: Test models (.tdot.bad), an agent's status (.ag-st.bad .ag-dot), the check-in (.ci-dot.bad), the request ledger (.led tr.bad .st .dot). - routing.css: a try or probe (.rt-req/.rt-probe.bad .to i), a step (.rt-steps li.bad::before), the preview (.ps-dst.bad > i). - library.css: a server that failed (.lib-health.err::before). A ring was not used because "not checked" is already a ring there (#2308). - Not changed: green-only dots with no red pair (gateway, keys, tiles, live), chart markers, routing's animated packets, redact's categorical facet dots. The tray has no status dots of its own. - docs/subsystems/gui-shell.md says it beside "State is shown with a dot". Tests - status-dot-shape.test.cjs (new): for all 9 pairs with the real stylesheets, in chromium and webkit, light and dark, 980 and 420 wide: the good dot has no mask, the failed one has the x mask and the good one's box, and its pixels have ink on the arms and centre and none above the centre. - library-mcp-health.test.cjs: its "a dot, not a stripe" check now expects the x for a failed server and a round dot for the rest. Run at the pushed head (mote, via mote-run) - status-dot-shape + library-mcp-health: 16 pass, 0 fail (chromium and webkit). - go test -run 'Asset|CSS|Budget|Compress|Revalidate' ./internal/gui: ok. - At |
||
|
|
22f69ae443 |
gateway, routing: a group in a group says the group above picked its reasoning (#4358)
30c55ff5e skips a nested group's effort classifier once the group above
picked, and traced it as Classified{Error: "the group above already
picked this turn's reasoning"}. The Routing page reads an Error with no
intents as "{by} was to rate how hard turn {turn} is, but couldn't —
{err} — so it reasons as the agent asked", which is wrong: the turn
reasons at the group above's pick.
Classified gets Above, the pick of the group above, in place of that
Error (also on a classifier still asked for intents), and classWhy says
"{by} wasn't asked how hard turn {turn} is: the group above picked
{level} reasoning for it.", in zh, zh-TW, ja and de too.
TestNestedGroupClassifierNotAskedWhenTheParentPicked checks the nested trace carries
Above "high" and no Error; routing-classifier-above.test.cjs checks the
line in every language at 1100px and 390px, with no sideways scroll
and without the old "reasons as the agent asked".
Run on mote: go test -tags nogui ./internal/gateway/ -run
'Nested|Classif|Intent|Effort|Rule' ok; node --test (chromium and
webkit) routing-classifier-above, routing-classifier-said,
routing-intent-fallback, routing-smart-intent and i18n-keys: 124 of 124
pass. Broken by hand: classWhy without the Above branch, the new GUI
file 0 of 10 in chromium.
Not tried: a real nested effort=auto group.
The whole batch (101e6201c..this, gua2100's five patches and three
follow-ups) at this tree, on mote: gofmt -l clean; go vet -tags nogui
for GOOS darwin, linux, windows, and go vet (GUI) darwin, all ok;
go test -tags nogui -count=1 -timeout 45m ./...: 85 packages ok and 2
reds, neither from this batch. internal/cli
TestEveryRouteHasACommandOrIsNamed is red at origin/main
|
||
|
|
1ad8b20c7a |
library: the sweep of ~/.agents/skills leaves the user's own entries (#4379)
e938a4f13's sweepShared removes magpie's entries from the shared folder once no agent whose folder it is gives them. Its tests cover magpie's links only. TestKimiSweepLeavesTheUsersOwnSharedSkills puts the user's own folder, a folder by the name of a library skill Kimi Code is given (pdf), and the user's own link to a folder elsewhere into a sandbox HOME's ~/.agents/skills, syncs twice, and checks each is still there with its SKILL.md and link target unchanged. A skill given to Kimi Code and Codex (both read the shared folder besides their own) lands in each one's own folder, not the shared one. Test only; no code change. Run on mote: go test -tags nogui ./internal/library/ -run 'Kimi|Shared|Skill' ok. Broken by hand: the sweep without its ours() check deletes all three of the user's entries (the new test red); without the sweep step TestKimiOldSharedEntrySwept is red; Kimi Code's folder put back to ~/.agents/skills turns all three Kimi tests red. Not tried: a real Kimi Code 2.x reading the folder. |
||
|
|
a130035a0d |
gateway: only a relay whose list draws a GPT Image takes the family (#4432)
34199952b let any keyed provider at a Responses base draw every gpt-image-* name. Its body says "a Codex backend relay whose model list carries any gpt-image* name", but the code read no list: a chat-only relay ahead of one that draws took a bare gpt-image-2 and failed it at its vendor, and a Codex turn on a chat-only relay lost the Settings pick it drew with before. The patch changed TestCodexDrawingFallsBackToImage- Setting's expectations (and moved its "off" checks to no turn) to fit. drawsFamily now takes a keyed Responses relay only when its own Drawers hold one gpt-image-* already, as the patch's description had it. Both of the patch's tests stay green; TestCodexDrawingFallsBackToImageSetting is back to its form before the patch, and TestRelayDrawingNoGPTImageClaims- NoneOfTheFamily covers the chat-only relay. Run on mote: go test -tags nogui ./internal/gateway/ -run 'Draw|Drawing|Relay' ok. Broken by hand: the case returning true for any gpt-image-* (the patch's rule) fails the new test (plain/gpt-image-2) and TestCodexDrawingFallsBackToImageSetting (text-only/gpt-image-2); the case removed fails the patch's two tests and the new one. Not tried: a real sub2api relay (loscoy's), whose list magpie_image drew from per the report. |
||
|
|
7e44e57b4e |
fix(gateway): a Codex backend's relay draws the gpt-image family it serves (#4432)
A harness asking for its own image model by the bare name its vendor gives it (Codex CLI asks its provider for gpt-image-2) was turned away by magpie when the provider is a Codex backend relay (sub2api) whose model list names another of the family, or none: drawsFamily admitted only a ChatGPT account and a Grok subscription, so resolveDrawing answered 404 "magpie knows no model "gpt-image-2" to draw with", and a Codex turn's own provider lost the drawing to magpie's Settings pick, the harness's own model overridden. The relay serves the ChatGPT backend's images API, which draws the same for any gpt-image-* name (#1865), as #870 had it draw its listed ones; it draws the family the same way, the vendor refusing in its own words one it doesn't serve. Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
ecdcbe48a8 |
fix(library): give Kimi Code its own skills folder (#4379)
A skill given to the new Kimi Code (2.x) had no folder of its own to go to: its target was ~/.agents/skills, which fourteen other agents read as well, so it reached every one of them whatever the library ticks, and the page locked their chips for it. Handing it over to the library didn't isolate it either: Kimi Code's own link was written into the shared folder all the same, and no sync took it out, since none of the agents whose folder the shared one is had given the skill. Kimi Code 2.x reads a folder of its own besides the shared one ($KIMI_CODE_HOME/skills, else ~/.kimi-code/skills - docs/ customization/skills.md, "Skill Locations"), so its skills go there now, and it joins readsShared: a skill kept in ~/.agents/skills for another agent is read where it is, with no second link in Kimi Code's own folder. The legacy kimi-cli branch stays as it was: it reads the first of ~/.kimi/skills, ~/.claude/skills, ~/.codex/skills, so a folder of its own would hide Claude Code's from it. What an older magpie put in ~/.agents/skills for Kimi Code is swept out: an entry of the library's own stays there only while an agent whose folder the shared one is still gives the skill. The user's own entries stay, and so does a copy takeEdits couldn't scan. Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
339ff564e6 |
fix(gateway): skip a nested group's effort classifier when the group above picked (#4358)
A group reached through a parent group runs its own classifier when it is effort=auto, even after the parent's classifier already picked the turn's reasoning: the request goes out at the parent's pick (the outermost pick stands, gateway.go), so the group in it pays for an answer the turn throws away. On one reporter's day the group in it answered 27 of 28 such turns, 2-8 s each, and 14 of the 28 parent picks discarded the answer. ruleFor now takes the pick a group above it already made: with one standing, the classifier is not asked for the effort again. The intents, when the group's rules have them, are still asked — they are the group's own routing. The trace says why nothing was asked. The fallback keeps working: the group in it is asked as before whenever the group above gave no pick. Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
021a75762a |
fix(copilot): list an Experimental vendor's model the picker offers (#4343)
What changed: copilotModels dropped every model whose vendor is "Experimental" before looking at anything else, so mai-code-2-flash — an Enterprise account's, vendor "Experimental", model_picker_enabled true, served on /responses — never reached the catalog. A saved selection of it then failed everywhere with "copilot has no model mai-code-2-flash (magpie provider copilot lists them)" (serves() is Available() ∪ Exposed(), both built from the fetched list). The vendor is now only one more reason a model no picker offers stays out: an Experimental model the picker offers (model_picker_enabled true) is listed, as VS Code's own picker shows it. One the picker doesn't offer (kimi-k3-base) stays out. Run: TestCopilotSignAndModels fails on the old code (ids end "gpt-4.1,auto"), passes now; the fixture carries both shapes. Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
f0b9c8af9c |
provider, plugin: a plugin's word on its model's inputs stands without a word of images
pluginCatalog read a plugin's word on what its model takes only where the plugin also said whether it takes images: the InputModalities assignment sat whole behind ImageSaid, so a model said text alone (Command Code's plans, no word of images, #4436) came out with no input modalities at all, though the host had passed its inputs through. But the host's passing them through is not the plugin saying them: for a config model nothing was said of, the host's own default capabilities say input {"text": true} (internal/plugin/host.js), and listing that as the model's word would claim text-only of a model nobody described, which the readers read as no images — what the #1595 guard exists to keep out. The first cut gated on the inputs being non-empty and did just that; this one asks the host whose word the kinds are instead. inputSaid keeps that default ({"text": true} alone) out: whoever says the kinds says them each, models.dev and the config expanding them all, a plugin's models hook giving its own. The model carries inputsSaid as it carries outputsSaid, and pluginCatalog gates InputModalities on it: Command Code's plans list their inputs, a model nobody described still lists none. Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
eceb815160 |
site: the IndexNow key, so Bing and the other IndexNow engines take our URLs
IndexNow checks that a submitter owns the site by fetching this key at the site's root; it stays as long as we submit. Run: nothing; it is a static file, checked live after deploy. |
||
|
|
377e3ca6e8 |
site: the Google Search Console verification tag on the home page
Search Console verifies https://usemagpie.ai/ by this meta tag and checks it again later, so it stays. Run: on mote, node --test worker.test.mjs install.test.mjs from site/: 54 of 54 pass. |
||
|
|
ad53a23dc8 |
gateway: X-Magpie-Account takes a percent-encoded name (plugins#615)
StockRabbit (magpie-community/plugins#615, Magpie 0.1.2587, Windows): pinning the Fingerprint page to the WorkBuddy account 北冥 failed every sample with "Header 'X-Magpie-Account' has invalid value". A header value is ASCII on the wire and fetch refuses any other, and the gateway matched the header only against the account's user (北冥) or its trace id (workbuddy@北冥/…), so no ASCII form could name that account. pinTo now matches the value as written or percent-decoded (pinnedName: url.PathUnescape, kept only when it decodes to valid UTF-8). The trace's Pinned, the call's error and the 404's "no account %q" name it decoded. gateway.go:2701 is the one place that reads the value; codex_backend.go, codex_relay.go and gateway.go:2523 test only that it is present, so they need nothing. docs/reference.md and the gateway-routing page say how to send such a name. Run at this head (rebased on |
||
|
|
c3048cd266 |
site: a sitemap, robots rules, a searchable title and canonical docs pages
usemagpie.ai had no sitemap, a robots.txt with Cloudflare's comments
only, a home page titled just "magpie" in every language, and docs
pages with no canonical or x-default.
- public/sitemap.xml lists the home page in en, zh, ja and de and every
docs page by its clean URL. A test fails when a docs page on disk is
missing from it, or it lists one that isn't there.
- public/robots.txt names the sitemap and keeps crawlers off /api/,
/go/, /r/ and /download, so a crawler's fetch isn't counted as a
download or a partner click.
- The home <title>, og:title and twitter:title name the agents
("magpie: one model switcher for Claude Code, Codex and Gemini CLI"),
translated by worker.js like the rest (meta.title, meta.locale in
i18n.js). og:type, og:site_name and og:locale are added, plus JSON-LD
for a free, MIT-licensed SoftwareApplication and the WebSite.
- Each docs page has rel=canonical to its own clean URL and an
x-default alternate to the English page, plus og:site_name. A test
checks each one, and that every hreflang alternate is a listed page.
Run: on mote, node --test worker.test.mjs install.test.mjs from site/
at this tree: 54 of 54 pass. Broken by hand in a copy: a docs page
without its canonical, and the sitemap without docs/zh/docker, each
turns the sitemap test red.
Not tried: Google's Rich Results test; the live check is after deploy.
|
||
|
|
6247086fe9 |
agent: Alma's providers are decoded once per answer kept
A heap profile of the live magpie (v0.1.2646, 37 minutes, the owner's real accounts) had almaProvidersSeen decode Alma's whole /api/providers answer 390MB worth: the Agents page's model field (almaGet, 221MB) and Alma's check (alma.func1, 167MB) each decoded the answer almaSend already kept for 5s, every poll. almaProvidersSeen keeps the slice it decoded beside the bytes it decoded it from, and gives it again while almaSend gives the same kept bytes. A new answer (5s on, or any change sent to Alma, which forgets the kept ones) is decoded anew; a failed read is an error, never the last good answer. Its three callers only read what it gives. Run on mote (macOS 27.2): - TestAlmaProvidersSeenDecodeOnce (new): 400 known models; 10 allocs or fewer a look, one ask of Alma, the new models after a PUT, an error with Alma gone. With the bytes check turned off by hand: "a look at the answer kept allocates 6833 times", red. Restored: ok. - The owner's real Alma answer (227KB with keys blanked, 11 providers, 539 models; probe not committed): a look 1,182,317 B / 30,690 allocs before, 48 B / 1 after. - go test ./internal/agent: ok (161.6s); -race -run TestAlma: ok. - gofmt -l clean; go vet, GOOS=windows and GOOS=linux go vet: ok. |
||
|
|
78cbb711d9 |
agent, codexcat: a poll asks Vision once per stamp and reads Codex's cache levels once per change
A heap profile of the live magpie (v0.1.2646, 37 minutes, the owner's real accounts) had buildModels allocate 1288MB. 553MB of it was the gateway's seer, asked once per list build (provider.Described), and 238MB was codexEfforts -> TakesEffort -> CacheEntries, which decodes the whole Codex models_cache.json for each model asked. - buildModels asks describedNow(), kept per provider.StampNow() in a stampedLists like the lists themselves, so every agent's list of one stamp shares one answer, and a change (a provider saved) asks again. - TakesEffort reads a slug's default level from cacheLevels(), a filememo.Read of the cache file by its stat: the decode keeps only each model's level, and runs again when the file changes. magpie's own added entries are skipped as CacheEntries skips them. Run on mote (macOS 27.2): - TestListsAskVisionOnce (new): pi, claude, codex, opencode, droid and dsh lists ask Described once; after a provider save, once more, and a "no" reaches the new list. With buildModels asking Described itself (put back by hand): red. Restored: ok. - TestTakesEffortReadsTheCacheOnChange (new): a 300-model cache, levels for a slug and codex/<slug>, the default for magpie/x and an unknown one, 20 allocs or fewer a look, and the new level after a rewrite a minute later. With TakesEffort on CacheEntries again (by hand): red. Restored: ok. - go test ./internal/agent ./internal/codexcat at this tree: ok (162.5s). ./internal/gateway and ./internal/gui at the tree before the test's last fix (only the new test changed since): ok but TestCodexPoolSaysTheClientsVersion (#4807, red in a full gateway run on mote, untouched here) and TestMainWindowCorners/macOS_26_SDK (#3949, red on macOS 27). - gofmt -l clean; go vet, GOOS=windows and GOOS=linux go vet of both packages: ok. Not tried: a heap profile of a live build with this change. |
||
|
|
7e201ce20d |
browser: one tool, browser, whose action says what to do
magpie-browser listed 17 tools (11,483 bytes of schema in every request); it now lists one, browser, whose action picks what to do (4,087 bytes). The old tool names are still accepted on tools/call, and text the extension writes about browser_X now says "the X action". Any action takes screenshot: true and returns the page after it, as a 1024px-wide JPEG (q70), so an agent sees the page without a second call. Run on mote at this head: go test -tags nogui -run Browser ./internal/gateway/ with a real Chromium: ok, including TestBrowserToolActionsInARealBrowser. TestBrowserToolCallsTheExtensionsTool went red with the name rewrite taken out by hand and with the downscale taken out (2880x1800 stays 2880x1800). gofmt clean; go vet -tags nogui for darwin, linux and windows ok. Not tried: Claude Code and Codex using the one tool against a live gateway. |
||
|
|
da23fcb169 |
browser: frames from other sites are read and acted on; failures say their kind
A page's cross-site iframes (out-of-process frames) were missing from the
snapshot: Page.getFrameTree on the parent doesn't list them, so a checkout
form or a login inside such a frame couldn't be read or clicked. The
snapshot now adds each frame whose session was auto-attached under its
parent (t.frameOf), and actions on its refs go to that frame's session.
A failed action now says its kind (STALE_REF, DIALOG_OPEN, LOAD_FAILED,
PAGE_BLOCKED, WAIT_TIMEOUT, OUTCOME_UNKNOWN, BAD_ARGS ...) with what to try next, and an action
settles on the DOM going quiet before it says done. Extension 0.1.3.
Run on mote at this head: go test -tags nogui -run Browser
./internal/gateway/ ./internal/browserext/ with a real Chromium
(MAGPIE_BROWSER_CHROME, Chrome for Testing 1234): ok, including
TestBrowserFramesAndFailuresInARealBrowser. Red on the old code ("no
textbox Card"); the settle taken out by hand made it red ("doesn't say
done"). gofmt clean; go vet -tags nogui for darwin, linux and windows ok.
Not tried: a real site's payment iframe in the owner's own Chrome.
|
||
|
|
35c47f762f |
agent: the window's drift poll parses dsh's YAML once per change, not per field and per look
The window asks /api/drift every 15s. On the owner's live magpie a heap profile showed Drift and Values allocating ~3.3 GB in 37 minutes, most of it DeepSeek Harness: settings.yaml (80 KB) parsed again for each field GetYAML read (465 MB of it), and each profile entry's YAML parsed again on each of dshCheck's looks (dshHomeHas, dshOver, dshConfigIndex, dshRoutesIn, dshConfig). - edit.loadYAML memoizes the parsed root through filememo, keyed by the file's stat, and shares it with GetYAML, GetYAMLMap, GetYAMLList and GetYAMLText, which only read it. Writes go through their own parse as before. BlockList skips the decode for a text that starts as a block list (blockSequence), which every dsh patch list does. - dshNodeShared parses an entry's text once and shares the node with the read-only lookers (dshConfig, dshConfigIndex, dshRoutesIn, dshOver's patch side). The writers (dshOver's base, the route and start writes) keep dshNode's own copy. 512 entries kept at most. Run on mote (macOS 27.2): - Probe on copies of the owner's real ~/.dsh (settings.yaml, config.yaml, the desktop and web profiles; probe not committed, copies deleted): a.Values() + a.Drift() per poll, 20 polls: 16381 KB / 223788 allocs per poll with the edit change alone -> 4355 KB / 2588 allocs. - TestGetYAMLParsesTheFileOnce (new): a look at a 3000-entry file allocates under a tenth of its size; sees SetYAML, another process's write, a removed file and a list-topped file. TestBlockSequenceAgreesWithADecode (new): ~24 texts against yaml's own decode. - TestDshLookParsesAnEntryOnce (new): with dshConfig and dshConfigIndex put back on dshNode by hand: "27388 allocations, want a few", red. Restored: ok. It also checks a writer's change never shows in a look. - go test ./internal/agent ./internal/edit: ok (164.2s, 5.9s). go vet both: ok. gofmt -l: clean. Not tried: the full suite (only internal/agent and internal/edit call these); a live window poll after the release. |
||
|
|
f1eeeb8fd5 |
sessions: a Codex session's window lives an hour past its last change, not five minutes (#4369)
A Codex rollout's summary and its calls each keep an index of what they read (the Codex window) so the next lines are read on from where the last read ended. A window was let go five minutes after its file last changed (revisionIdle), so the turn after any longer pause (a long think, a meeting, a review of the diff) read the whole rollout again from its first line, for the summary and the calls alike: on #4369's real rollouts, 21.5 MB read twice for one line. revisionIdle is an hour, as a working Claude window's already is (revisionWorking). What can be held is bounded as before: revisionFiles (8) windows within revisionEntries, and revisionActiveFiles (2) past it up to revisionActiveEntries each, so the most held is what working sessions held already; an idle one is held longer. A session left over an hour is read whole once on its next turn, now in one pass for both readers (the commit before). Run on mote (macOS 27.2): - TestCodexSessionReadOnAfterAPause (new): a 40-call rollout last changed ten minutes ago is read (calls, then List), a turn appended: no scan of it from 0, 41 calls. With revisionIdle back at five minutes: "the turn after a pause read the rollout from its first line: [0 0]". Restored: ok. - go test ./internal/sessions -run "Pause|Revision|Settled|LongCodex|PlainRollout": ok. - go test -timeout 45m ./internal/sessions ./internal/usage ./internal/gateway ./internal/gui: ok for sessions (11.3s, -race 56.2s, at this tree), usage (30.2s), gateway (575.6s); internal/gui: ok but TestMainWindowCorners/macOS_26_SDK, red on macOS 27 as #3949 records (same message), untouched here - TestIdleWindowsYieldToRecentWork's ten-minute pause was written -2*revisionIdle (ten minutes at five); it is ten minutes as written, since at an hour it was a two-hour pause, past revisionWorking. - gofmt -l: clean. Not measured: RSS over an hour of real Codex use with several sessions open; the bound is the count above, not a measurement. |
||
|
|
2140f5b935 |
sessions: a plain Codex rollout read from its start has its calls read on the summary's pass (#4369)
A start parses every changed session file for Sessions (refresh ->
parseWith), then reads every changed file's calls for Requests
(ReadCallSource -> readCalls). callsAlong already let a packed rollout
and an unread Claude session be read once for both; a plain .jsonl
rollout was read twice. On copies of the owner's real ~/.codex and
~/.claude (1.7 GB), a cold start scanned 931 times, 3.49 GB, every large
rollout x2.
callsAlong now takes a plain rollout too, when both reads start at its
first line: the summary it goes on from has no Codex window (nothing
kept, or kept on disk, which holds none), and parseWith lets the ride go
when either read goes on from an offset (calls.st.Off as well as s.Off),
so a read on from where it was is two incremental reads, as before. A
summary that still has its window is passed in so such a file's calls
shard isn't loaded only to be let go.
keepCalls names the root when none is named yet. A ride keeps a
rollout's calls (Codex window and all) during the Sessions parse, before
any Requests read has called pruneCalls; pruneCalls took the empty root
for a moved one and dropped everything kept. The shard on disk has no
window, so the next line read the rollout whole again (in the same run,
seconds after the start). TestHistoricalClaudeFilesDoNotDisplaceActive
Windows went red on exactly that ("rebuilt active call shard" for its
Codex rollout) until this.
TestWarmReadsOnlyInItsSlots' calls phase found nothing left to read,
since the index phase now reads every file's calls along; it appends a
line to each source first, so the calls have reading of their own.
Tests' forget (in the new test, claude_ride_test.go and
codex_zst_warm_test.go) calls Reset before removing the cache file:
Reset writes a save still pending, which put back the file just removed,
and the next List then went on from disk states (no window), red 1 in
~40 under -race. TestHistoricalClaudeFilesDoNotDisplaceActiveWindows
waits for the save (saved()) before writing its marker onto a cached
state the save's goroutine was encoding (a DATA RACE under -race).
Run on mote (macOS 27.2):
- TestPlainRolloutReadOnceForSessionsAndCalls (new): 3 plain rollouts.
Nothing kept: each scanned once, from 0. Read, kept on disk, the long
one grown and Reset: that one scanned once, from 0. An append in the
same run: no scan from 0 (with keepCalls' root line removed by hand:
"an append: the long rollout read again from its first line:
[213219 0]", and the Historical test red as above). Calls, List and StatsAt reflect.DeepEqual to
a calls-first read without the ride in each case. With plain rollouts
kept out of callsAlong by hand: "first read: ... scanned from [0 0],
want once from 0" for all 3. Restored: ok. -race -count=80 with
the Packed, ClaudeSessionReadOnce, CodexSessionReadOn, Historical and
WarmReads tests: ok (108.8s)
- Real data (copies of 1.7 GB of the owner's sessions, probe run
sessions.List(200), usage QueryPage Today and Week; probe not
committed): cold 931 scans / 3.49 GB -> 718 / 2.10 GB, no rollout read
twice; no change 0 / 0; the first line appended to the newest rollout
after the cold read: read whole by both readers -> read whole once
(1 scan, 10.8 MB; the before run's newest was a 21.5 MB one, read
twice). It is read whole at all because it was last changed on 10-31,
past any window's idle time: a session left that long is read whole
once on its next line, now in one pass. Later lines: 2 scans, 0 MB.
- go test -timeout 45m ./internal/sessions ./internal/usage
./internal/gateway ./internal/gui: ok for sessions (11.3s, -race 56.2s, at this tree), usage (30.2s), gateway (575.6s); internal/gui: ok but TestMainWindowCorners/macOS_26_SDK, red on macOS 27 as #3949 records (same message), untouched here
- GOOS=windows and GOOS=linux go vet ./internal/sessions: ok. gofmt -l:
clean.
Not tried: a packed rollout's path is unchanged (it rode before).
|