ca87ae9c596dc1e080c4e282c833f893994c054a
2518
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2ba62f7f76 |
gateway: agy's "Individual quota reached … Resets in" rests the account until then
@Airan_FS on X (11-17): an Antigravity account served through agy-cli answered "⚠ Individual quota reached. Please upgrade your subscription to increase your limits. Resets in …" as the model's reply, and routing never asked the next account. The agy-cli plugin 0.1.87 (magpie-community/plugins afe4c086, on the dist branch) now ends such a turn with a rate_limit_error in agy's words, before or after reply text, so the gateway fails over and rests the account as for any plugin quota error. Here, quotaResetAfter also reads the notice's "Resets in 1h18m40s" (Go's duration form, which resetsInWords can't read since no word ends after its "h"), scoped to the "individual quota reached" line, so the account rests until Google's reset instead of quotaRest's 15 minutes and isn't asked again every quarter hour. gateway-routing.md says so. Tests from the literal notice (discuss.ai.google.dev report, the tweet): TestAgyCLIQuotaNoticeRestsUntilItsResetAndFallsOver (group falls over to the next member, rest "resets" ~1h18m40s, next turn skips it), TestAgyCLIQuotaNoticeMidReplyStillRests (partial text kept, still rests), TestAgyQuotaNoticeResetIsRead. Run (mica, at f33278541 = this change less the doc line): go test ./... -timeout 45m: 102 ok, no FAIL. mote: GOOS=windows go vet ./... ok, GOOS=linux go vet -tags nogui ./... ok; gofmt -l clean. Broken by hand: the old quotaResetAfter with these tests: the account rests 14m59s by "quota" and resetsAfter reads 0, so all three fail. Not tried: a real agy account with its quota used up. |
||
|
|
ead91a9a50 |
gui: a browser tab's title names this magpie: MAGPIE_NAME or Settings › Network and sharing › Advanced › Name (starballl on X)
starballl on X (tweet 2122376116220633444) runs several magpie web pages
and every tab is titled "magpie", so they can't be told apart. A magpie
now has a name, and a browser tab's title is "<name> · magpie" (plain
"magpie" with none).
- settings.Name, set in Settings › Network and sharing › Advanced › Name
(instancename.js, imported when Settings is drawn, so nothing is added
to app.js's core). Advanced is closed until a name is set.
- MAGPIE_NAME (Docker, magpie web) names it while the field is empty and
is the field's placeholder. It is read, never written, so a name typed
in Settings always wins and clearing the field goes back to it.
- One line, at most 60 characters (settings.CleanName).
- This computer's own (KeepOwn): sync and a restored backup never bring
another magpie's name. A Settings save that leaves `name` out keeps it
(settingsapi.Merge).
- boot.js titles a browser tab itself for the first paint, so app.js's
core gains only the line in applyPrefs, which sets the title again from
every settings read (TestCoreScriptBudget was 74 bytes over with a
title function in app.js). Only a browser page (web) is retitled: the
app's windows and tray keep "magpie".
- Docker docs (en, zh, ja) list MAGPIE_NAME; docs/reference.md and
docs/subsystems/gui-shell.md say how it works.
Tests:
- TestInstanceName (internal/gui): the variable alone names it at boot;
a saved name wins over it, trimmed; a save without `name` keeps it;
KeepOwn keeps it; cleared goes back to the variable; no name, none at
boot. Broken by hand, each red: KeepOwn without Name ("KeepOwn took
\"other\""), Merge without the keep ("a save without the name changed
it to \"\""), boot.js with s.Name in place of InstanceName ("named by
the variable alone: boot <nil>"), boot.js not setting the title ("a
browser tab's boot.js sets no title"). The app window's boot.js sets
none.
- TestSettingsSaveKeepsWhatItDoesNotSend now sets Name: the page's other
saves leave it out, and it is kept.
- instance-name.test.cjs: title from the first paint, the field under a
closed Advanced, save and clear retitle the tab, Advanced open after a
reload, 360px, the app's window keeps "magpie"; en, zh, zh-TW, ja, de,
Chromium and WebKit, 16/16. 14 of 16 red with applyPrefs not setting
the title.
Run, at this commit on
|
||
|
|
dbbb2f26b1 |
groups: free: takes the models a catalog marks free (#5903)
A routing group's pattern may now start with free: (provider.FreePrefix): free:workbuddy/* is, of the models workbuddy/* matches, those whose catalog entry says free (Entry.Free, the vendor's or plugin's own flag as the catalog was last read). The rest after free: is a glob, a re: pattern or an id, matched as on its own, so free:re:workbuddy/hy.* works too. It is expanded where every pattern is (matchesIn, PatternHits) each time the groups are read, from the catalog magpie already keeps: no request to a vendor, and a model the next list marks free joins without a save. Only the flag decides. A $0 price (PricedFree), a rate of 0, an account named Free or "free" in an id never counts; the test holds a deepseek-v4-free id with no flag, a rate-0 model and an or/y priced at $0 out. Existing patterns read as before: openrouter/*:free still means ids ending in :free (that is why the rule is a prefix, not a :free suffix), and a provider's AutoInclude takes no free: (isIDPattern). GUI: the Routing editor's pattern box counts and lists a free: rule live as it does any pattern (patternTest in plugins/routing/client.js, from groups.models' free), refuses "free:" alone, and one hint line says the flag is the last catalog's, not a promise of no charge, in en, zh, zh-TW, ja and de. CLI help, docs/subsystems/providers-accounts.md and the site's routing-groups page (en, zh, ja) say the same. routing-levels.test.cjs: the Advanced hint line made the editor taller, so the second group's Levels row opened under the editor's sticky foot and the click landed on the foot (webkit en). The test already wheels to that row for its first group; it now does for the second too. Run: - TestGroupFreeRule, TestFreeRuleSyntax and the existing pattern tests pass. Broken by hand: with groupmatch.go and autolist.go from origin/main both are red (no members for free:workbuddy/*, IsPattern); with takes() ignoring the flag, TestGroupFreeRule is red (all six WorkBuddy models matched). - group-free-rule.test.cjs (new): chromium and webkit, en and zh, green; red with origin/main's client.js. - go vet ./... (darwin, mica), GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./...: clean. gofmt -l: nothing. - Full suite go test -tags nogui -timeout 45m ./... on Linux (WSL magpie-desktop) at 1e180c630 (this change on |
||
|
|
cb4ad12bd1 |
zcode: the mover's min is 0.1.68, whose every account takes requests (mathfournity on X)
mathfournity on X: several ZCode accounts in magpie, and requests went to two of them only. The plugin (0.1.40 to 0.1.67) declared maxAccounts 2, so keepAtOnce held every account past the first two in reserve until one rested. magpie's own handling of a plugin's accounts was right: on a throwaway gateway test with the real plugin under bun and four accounts on a fake Z.ai, 0.1.67 sent 12 requests at once 6/6 to two accounts and none to the others, and 1302, 1308, 3008 and 500 on one account each went to the next and rested the first. plugins 36dc4007 (zcode 0.1.68) declares no maxAccounts and holds what zcode.z.ai's firewall refuses an address for instead: six Start Plan requests in flight from this computer over all accounts, besides each account's three. On the same throwaway test, 0.1.68 sent the burst 3/3/3/3 over the four accounts, failover unchanged. Raising the min updates moved users (keepMovedCurrent). gateway-routing.md's Accounts at once row says the plugin no longer declares two. npm: registry.npmjs.org has 0.1.68 as latest (npm view --prefer-online --registry https://registry.npmjs.org). The plugins publish run is red only for middleware-system-prompt and middleware-think-tags (trusted publisher); its log shows "+ @magpie-community/opencode-zcode-auth@0.1.68". Run: - go test ./... -count=1 -timeout 45m on mica at |
||
|
|
1c59acd36d |
plugin: a fetch whose head never comes is given up on; Devin min 0.1.45 (wu_chong4136 on X)
wu_chong4136 on X: with the Devin plugin a session sometimes hung for
10 to 20 minutes with no reply, until the effort or the context was
changed. The Devin plugin returns its fetch's head only once Devin sends
the reply's first content, and the host's headRead waited for that head
with no bound, while the gateway kept the agent alive on keepalives. A
request Devin took and never answered therefore hung silently. The body
already had bodyIdleWait (30m between bytes, #4934); the head had none.
- host.go headRead: the same bodyIdleWait bounds the wait for the head.
On it the fetch ends with "the plugin sent no reply in 30m0s; that
fetch was given up on", Fetch settles the call, and the host writes
"abort", so the plugin's fetch signal ends its vendor request too. The
gateway answers the agent its retryable 502 (an SSE error event on a
stream). This holds for every plugin fetch, not only Devin's.
- ReplyWaitForTest lets the gateway test shorten the wait.
- Devin mover min 0.1.45 (on npm, `npm view --prefer-online`): the
plugin itself gives up after 5 minutes of quiet from Devin (no head,
or no frame between reads) with a retryable 504. A real probe saw
Devin's first frame at 2.5s and at most 13s between frames.
(magpie-community/plugins e30f8ed0)
- provider-plugins.md says so.
Tests:
- TestHostHeadWaitEndsAFetchNeverAnswered: a head that never comes ends
in "sent no reply", the host is sent "abort", and the call is
released; TestHostHeadWaitSparesAHeadInTime: a head in time is kept.
- TestPluginHeadNeverSentEndsInAnError (gateway, through the fake
plugin in Bun): a vendor that reads the request and never answers
gives the agent the error on a stream and on a whole reply, and every
vendor request the plugin made is closed afterwards (asked 30, open 0).
Run:
- mote: the three tests above, ok.
- Broken by hand (headRead without the timer case): the host test fails
("held its reader for ever") and the gateway test hangs to its 60s
timeout in io.ReadAll.
- mica: gofmt -l clean; go vet for darwin, GOOS=linux and GOOS=windows
on internal/plugin, internal/gateway, internal/provider: ok.
- mica: go test -tags nogui -timeout 45m ./... at this tree (rebased on
|
||
|
|
a24a5f6af4 |
gui: a model test its vendor queued shows queued, not green (sufeng1894 on X)
sufeng1894 (v0.1.4248) added Qoder China and QwenWork providers (both served by the Qoder plugin): their models were green in the provider's Test, and every request through Routing failed with 503. A Qoder/QwenWork plan queues a model (code 10605, e.g. "this plan's queue: p4"). The test sends x-magpie-fallback, the plugin answers the queue's 503 at once, and probe counts it OK with Result.Queued ( |
||
|
|
07f7e0b45d |
claudetui: Windows 10 gets Microsoft's ConPTY with the release, no folder to place (#5205)
|
||
|
|
efb62fe901 |
claudetui: a message Claude Code didn't get whole is asked again as claude -p (#5205)
The helper took a message as sent once a row of it reached the transcript (rows > before), whatever the row held. A console that loses part of a paste, as Windows 10's own ConPTY does (#5205), gave Claude Code the rest, and the model answered that as the message. Now the words the transcript records of it (a user row's text, or a queued message's) are compared with those pasted, white space, paste tags, image marks and format characters aside, read in place with no copy (whole.go). The paths of images Claude Code says it took ([Image: source: <path>] meta rows) are left out and the images counted. What Claude Code answers meanwhile is held for up to 2s. A message that isn't whole ends the turn as Unpastable before any of its reply, so the bridge asks it again as claude -p, as it does an image the interactive mode didn't take. This is 3leg0ocat's patch (github.com/3leg0ocat/magpie-lite, branch claudetui-whole-message, b800c0cb3b), applied as written, with TestShimCutMessageIsUnpastable added: the fake Claude Code gets a FAKE_CUT knob that keeps only a long paste's tail past its 1024-byte blocks, as Windows 10's conhost lost them. Run: - go test ./internal/claudetui ./internal/conptypair on mote (macOS): ok. TestShimCutMessageIsUnpastable broken by hand (send returning nil in place of checkWhole): red, the cut tail answered as "echo: ...". - go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... on mote: ok (with the next commit). - win-run go test ./internal/claudetui on xiaomi-gpu (Windows 11 26200, whose own ConPTY keeps the marks): every test ok but TestShimFirstMessageWaitsForTools, red on Windows at main (#4810). 3leg0ocat's own record: Windows 10 19044, Claude Code 2.1.319, Windows' own ConPTY at 64 KB caught 4 of 4 before any reply; with ConPTY 1.25.260930003, none caught across 8/64 KB, a leading /, two images, a queued message and two turns. Not tried by me: Windows 10 itself (no Windows 10 box here). |
||
|
|
5ba53b2392 |
agent: dsh and Pi ask a Gemini 3+ on Messages adaptively, so Xhigh reaches it as xhigh (#6778)
larryhaonlp: DSH's Xhigh on agy-cli/gemini-4-hydrogen through
magpie-anthropic reached agy-cli as high, and a compat
forceAdaptiveThinking: true added by hand in dsh went on restart.
Cause, from the installed sources (dsh 0.2.1-rc.2's and Pi 1.4.0's
pi-ai, anthropic-messages.js and simple-options.js): without
compat.forceAdaptiveThinking pi-ai asks a budget through
adjustMaxTokensForThinking, whose clampReasoning turns xhigh and max into
high (16384), and agy-cli's requestedEffort reads a budget of 16384 as
high. With the switch it sends thinking adaptive plus output_config.effort
from thinkingLevelMap, which agy-cli reads first. magpie wrote the switch
only for Claude that thinks only adaptively and GLM-5.2/5.3.
- gateway.AsksAdaptively is the one rule: adaptiveOnly, AdaptiveWithEffort
or a Gemini 3 or later (geminiGeneration, the rule geminiLevelBody
already turns a budget into adaptive + effort by). dsh's dshKindConfig
and Pi's piModelOn (both cases) use it. Pi now also gets the switch for
GLM-5.2/5.3, which it lacked (same clamp).
- omp is left on AdaptiveThinking, said in omp.go: its budget isn't
clamped (ANTHROPIC_THINKING xhigh and max are 32768, read as xhigh), and
its anthropic-adaptive mode turns thinking off by leaving thinking out at
the lowest effort, which a model that can stop thinking takes as on.
- The user's own values: dshKeepCompat kept a hand-set switch magpie
doesn't write, but magpie's own switch won over the user's. magpie
writes its switches only as true (omitempty), so a false in the file is
the user's, and now stays.
- The restart: dsh-settings' importLegacyDocument imports
~/.dsh/settings.yaml into the profile dsh starts on and renames it
.imported; magpie writes settings.yaml again with routes that had no
hand-set compat, so each start of dsh took it out of the profile.
dshProfilesCompat carries the profiles' hand-set compat into
settings.yaml's routes, by the same dshKeepCompat.
Existing users: KeepDshWired's sync (30s) and Pi's sync rewrite magpie's
routes, so forceAdaptiveThinking: true lands on a Gemini 3+ there with no
action; a false the user set stays. Pi's models.json provider block is
magpie's own and is written whole, as before.
Run (mote; sandbox HOME):
- go test -tags nogui ./internal/agent -run the new tests and the dsh,
Pi and omp compat tests (TestDshMaxReachesOutputEffortModels,
TestDshRefreshKeepsHandSetCompat, TestDshKeepCompatNotAcrossProtocols,
Pi.*API, Omp): ok
- gofmt -l: clean
- Shipped before the whole ./internal/agent and ./internal/gateway run and
vet (darwin, linux, windows) finished: it was still going on mote, over
its cores, and mica's disk was full. A red there gets its own fix or
issue.
Broken by hand:
- the new tests at origin/main
|
||
|
|
9b376de163 |
gateway: a Gemini model's levels above high come from its provider too (#6871, hhh2210)
withGeminiEffort (decide.go) and geminiLevelFor (gemini_level_body.go)
let a level above high through only where models.dev's catalog lists
it (catalog.EffortsOf). A model a plugin or relay lists that models.dev
doesn't have, such as ai-studio's gemini-4-hydrogen-search with
low/medium/high/xhigh, had agy's xhigh or max sent as high, after the
candidate step had already fitted it to xhigh from p.Efforts.
withGeminiEffortFor and geminiLevelForEfforts now take the provider's
levels (p.Efforts(model)) first and fall back to the catalog's; the four
withModelEffort sites in serve and passthrough's onEffort retry, and
geminiLevelBody, pass them. A model whose levels stop at high is still
asked high. Left as they were: aiStudioThinking and withFixedEffort
(no provider in scope there). Ported from hhh2210's
hhh2210/magpie#3 (8dd4c5f6e), the doc line reapplied by hand on
today's gateway-routing.md.
Broken by hand: with the tests alone on origin/main, both new tests
are red (gemini-4-hydrogen-search sent "high" for xhigh and max on
Gemini and Chat upstreams, output_config {"effort":"high"} on an
Anthropic relay); the high-only gemini-4-carbon-search case stays high
either way.
Run on mote at b394095c7 (origin/main
|
||
|
|
34606000da |
gui: the tray panel's Usage tab ends in a heatmap of recent weeks (eiyuuzaki2333 on X)
Asked for "a heatmap like GitHub's / Codex's, also in the tray". The window already has one (Usage › Requests, 53 weeks, #1369), so no second copy goes on the Overview, which counts gateway calls only while the heatmap counts session-file calls too. The tray panel had none. The panel's Usage tab now ends in a card of the recent weeks, one cell a day, Monday on top, as many weeks as the card fits (8 to 53: about 25 at the panel's 440, 17 at 320). It goes after the chart and ranking, so nothing above it moves. Its shades are the existing monochrome accent ramp (.l0 to .l4) and follow the tab's own Tokens / Cost / Requests switch, with no new read; a provider or computer picked above narrows it. A tooltip says the day and its tokens, requests and cost. Weeks with no call show no card. No animation. It reads the existing cached /api/usage/heatmap, at most once a minute and again when a pick changes; the tab's own 10 s reads don't wait for it, and no endpoint was added. The card, its reads and tooltip live in plugins/usage/page.js, which shares its grid (heatGridOf, taken out of drawLedHeat as it was) and tooltip (ledHeatTip, now told the metric and provider) with the Requests tab. app.js keeps one guarded call in renderPanelUse: the ledger read can come back before page.js has run, so page.js draws the tab again when it loads. Both script budgets hold it at this base with no raise. The card is .pu-heat, not .pu-card, so the chart's card stays the tab's one .pu-card. The panel's light pills are its card's white, so a quiet day there is a 7% shade of the text over the card. Run (rebased on origin/main |
||
|
|
2896e82ccb |
claude: a turn with a new image after a reply split by thinking goes on in its run
Yqihotaru on X (omp 18.20.3, magpie 0.1.4314, DEBUG on): a user turn with an image, after a reply with no tool calls, logged "no run here has had this conversation" and was told to a new Claude Code from a transcript (81 messages, 4 images; the turn before had 5), all of it written to the prompt cache again. The same turn after a reply with tool calls, and a text-only turn after it, went on in the run. omp keeps 5 images in a request to a provider it has no image budget for (clampProviderContextImages, providerImageBudget's default), so each new image takes the oldest out: the conversation's earlier images moved, and only looseTurn.rewrote's mediaMoved could match it. mediaMoved compared the conversation part by part (heardRuns), and the run keeps its reply as the one text it said while the client sends it back as the text blocks Anthropic's stream told it, one between each thinking block (#5705). #5705 made the turn keys read a reply's words without whitespace; the part-by-part compare still read two blocks against one text, so the first such turn found no run. heardRuns now reads an assistant run's texts in a row as one part, their words with no whitespace, as messageWords does. A user's texts stay apart: the text an image left between them is what lostFromRun reads. TestClaudeOmpImageBudgetGoesOnInItsRun sends omp's clamped history (the budget of 5, "[image omitted: provider image limit]" in a message left empty) eight turns, with the reply in one block and split by thinking, and an image with words, alone, before words, and two at once. The subsystem page says what heardRuns reads. Run (on mote, through mote-run, at |
||
|
|
ccae8e8211 |
claude-desktop: a 1M model runs at 1M in the Code tab again (fwxkogaia on X)
Claude Desktop 5.11492 (released 11-13) starts its Code tab's Claude Code
with CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 in its --settings file whenever
the provider routes models itself, the gateway included (Fcn=2e5 and Lcn in
index.chunk-xV3fJhc7.js; 4.16336 had no such value). Flag settings come
before ~/.claude/settings.json, so the window magpie writes there no longer
reached the Code tab, and every model picked by its plain entry ran at 200K,
a 1M one too. No magpie change caused it: nothing in v0.1.4300..v0.1.4322
touched what Desktop is told about 1M.
Claude Code takes a "[1m]" id for 1M whatever that variable says (pT in
2.1.322). magpie's profile now gets Desktop's own "Use 1M wherever it's
available" (modelPrefer1mContext: true, 3p only, Desktop 1.28929+) once, on
a switch on and from Sync, as toolSearchEnabled is (desktopSeedPrefer1M):
Desktop then shows a model it offers a 1M entry for by that entry alone
(D5n: prefer1m on every supports1m entry) and hands Claude Code its [1m] id.
Desktop offers that entry only for a row whose max_input_tokens is 1M or
more, so nothing smaller changes. The user's own value, false too, or their
taking it away, stays theirs. Compaction is as before: the working window,
or the whole window under Full window.
Not fixable this way: a model between 200K and 1M (a 272K or 400K GPT)
still runs at Desktop's 200K; only a managed policy setting comes before
flag settings, and magpie writes none.
Run (mote, at this tree):
- go test ./internal/agent -run TestClaudeDesktop: ok
- TestClaudeDesktopPrefers1M red with desktopSeedPrefer1M returning nil
("switch on: modelPrefer1mContext <nil>"), green with it
- go vet ./internal/agent for darwin, linux, windows: ok; gofmt -l: clean
- go test -timeout 45m ./... at base
|
||
|
|
98955300a7 |
claude: no request-sized value on a run's command line or in its environment (#6848)
recih (on X) ran a long Claude Code session through the Claude subscription's interactive mode on a Linux server: every start, the resume and the replay alike, failed "fork/exec <magpie>: argument list too long", 8 502s, and every request after. Linux starts nothing with one argument or variable over 128KiB (MAX_ARG_STRLEN), and startRun put the conversation's safeguards in CLAUDE_CODE_EXTRA_BODY whole and the JSON schema in --json-schema whole. Now no value of a request's goes on the command line or in the environment over claudetui.StartValueMax (16KiB, under Windows' 32K variable too): - interactive mode: CLAUDE_CODE_EXTRA_BODY is a stand-in (startSafeguards: all when they fit, else without the parts Claude Code itself sheds, else []); guard.json keeps them whole and tap.js puts them in each request, as before. tap.js no longer sets the variable to a file over the bound, since Claude Code's MCP servers and tools inherit it. It is given no --json-schema (it never used it; the answer tool has the schema). - -p: a schema over the bound goes with the initialize request (jsonSchema, as the Agent SDK sends it). Claude Code passes over an initialize schema it can't use silently, so such a schema is compiled first and refused with a 400, as the flag's exit was (#3036). Other per-request starts checked (warmups, usage, sign-ins, other agents' bridges): nothing request-sized on argv or env. Run: - TestClaudeTUIStartBounded, TestClaudePrintStartBounded, TestClaudePrintSchemaPlaces (gateway) and TestTapPutsSafeguardsTooLargeForTheEnvironment (claudetui, bun and node): red on the old code on mote (152KB env, 277KB arg, 502 for a bad large schema, 204KB variable left by tap.js), and on Linux (wsl-run, magpie-desktop) the old code failed with the real "fork/exec .../magpie: argument list too long" and the tap's child start with E2BIG. All green on the new code on mote and Linux. - Real claude 2.1.316: an initialize jsonSchema answered structured_output {"city":"Paris"} (haiku); CLAUDE_CODE_EXTRA_BODY {"safeguards":[]} is sent as "safeguards":[] in every request (local listener, sandbox config). - gofmt; go vet (darwin, GOOS=linux, GOOS=windows) on the two packages; go test -tags nogui ./internal/claudetui ./internal/gateway on mote: ok claudetui 182.5s, ok gateway 1066.8s (at base |
||
|
|
8707ea7757 |
gateway: Codex's prompt suggestions go on a model set for them (@0xcb198609 on X)
The Codex app's home-page prompt suggestions (thread_source ambient_suggestions, and their safety check, ambient_suggestion_safety; the Routing page's 提示词建议) are a background agentic turn that reads the project and connected apps. The app asks for the model its server config names (codex-app-model-routing's codex_ambient_suggestions_model_slug, gpt-6-luna) with provider model fallback on, so with magpie as Codex's provider they ran on the provider's default model, often auto: @0xcb198609 saw 76.9k tokens in 113s on deepseek-v4-pro. Codex has no config.toml key for that model, only an on/off switch in the app (store key ambient-suggestions-enabled, Settings › Configuration › Homepage suggestions; read from the 26.1106 bundle). magpie now has a setting for it, "Codex prompt suggestions" in Codex's row on the Agents page (Settings, beside Codex composer predictions): - Empty, the default, is Codex's own pick: nothing moves. A value the user set is never overridden. - A model or group of magpie's puts both calls there: in serve as the codex-suggestions move (the Routing page says why), and on the ChatGPT backend's route before the split, carrying the asked model to serve so the trace and ledger keep it. codexOwnOffMagpie leaves a bare gpt-6-luna to magpie while the setting is on (codexSideSet). - A target that is disabled, unserved or not allowed to the gateway key leaves the call as asked, with a log line (compactRefused). - To fit app.js's script budget without raising it, the suggestions and auto-review pickers share codexPick with codexSidePick, and every Codex row's button comes from condButton. The new route is named for the CLI (settings_parity_test.go). agent-prefs and settings-general list the new row. - The row's tooltip and the Routing page's Suggestions story say where Codex turns them off. magpie's old story said "Suggested prompts", which the current app no longer shows; corrected in all five languages from the app's own locale files. Run (mote, at this head rebased on |
||
|
|
e25210b6e4 |
providers: an Alibaba Token Plan's AccessKey says the grants it needs, in the reader's language (MetalHqa on X)
MetalHqa on X: "阿里云百炼 Token Plan 的额度查询需要的权限不明确,希望能够在里面备注出来". Since |
||
|
|
1bfc6378c9 |
providers: Antigravity CLI's own Gemini API key is found and imported (shenggxhz on X)
shenggxhz set agy up on an AI Studio key: "modelProvider": "gemini" in ~/.gemini/antigravity-cli/settings.json, GEMINI_API_KEY exported in the shell. `agy models` then listed Gemini 4 Carbon and Hydrogen. magpie's model refresh didn't, because the agy-cli subscription runs agy on its Google sign-in, whose models are the account's in Antigravity, and the key was used nowhere in magpie. The Providers page now finds that key on its own. A new import source, "Antigravity CLI" (readAgySettings), reads agy's settings.json and offers the key as the Google Gemini preset, which lists the key's models from the Gemini API. With GOOGLE_GEMINI_BASE_URL set, it uses that endpoint's Gemini API instead. The variables are taken from magpie's environment, else from the login shell's: a key exported only in .zshrc is found when magpie is opened from the Dock. proc.GeminiKeyVars are only read (LoginEnv), never set in magpie's environment. agy on its sign-in offers nothing. With no key the entry shows as not importable, and a key that points at magpie itself is refused. Not changed: the agy-cli plugin's own `agy models` reads the same setting and, with no key in magpie's environment, fails and keeps the old list silently. Filed as magpie-community/plugins#1218. Run: - red on the old code: with the appReaders entry removed, all four TestAgyGeminiKey* tests fail (no "agy" source); green with it. - a real login shell on mica, in a sandbox HOME (key exported only in .zshrc, MAGPIE env without it): DiscoverSources gives status new, preset google, the key read. - real agy 1.5.9 in a sandbox HOME: API-key mode lists the Gemini 4 models from a list built into agy; without the key it exits 1 with the modelProvider error. - go vet (darwin, GOOS=linux, GOOS=windows) for proc and provider, plus darwin internal/gui; gofmt -l clean. - full `go test -timeout 45m ./...` on Linux (magpie-desktop): every package ok except internal/usage's TestRequestStateKeptAcrossACatalogFetchedAgain (#6572, filed, untouched here) and the root, internal/cli and internal/gui, which don't build there (no gtk4/webkitgtk-6.0 dev packages). Those three, plus provider and proc, ran on mote (darwin): ok. A first full run on mica died of a full disk (117G of shared Go build cache), so it tested nothing. - GUI on Linux, Chromium + WebKit: icon-tile, import-collision, import-opencode, provider-discovery, import-row and i18n-keys pass, 92 of 93. The one red is icon-tile's dim-color (#6759, red on main). - appIcon became a table so the agy icon fits app.js's code budget without raising it (TestCoreScriptBudget ok). Not tried: a real AI Studio key or a real Gemini request; the GUI import sheet in a browser (the source shows through the existing discovery and import sheets, with Antigravity's icon); Windows (LoginEnv is "" there, so only magpie's own environment is read). |
||
|
|
b5688404da |
gateway: a body to another magpie goes as a delta against the one before (RFC 9842 dcz)
gaubeebangeel on X asked for RFC 9842 (Compression Dictionary Transport) on the magpie-to-magpie hop: a Remote magpie provider, a LAN share, a cloud or Docker deploy. Every agent request is its whole conversation, and that hop carried it uncompressed each turn on Chat and Anthropic (Responses already went as a semantic delta, remote_delta.go). Ideas from jixoai/reply9842 (MIT, by jixoai): dcz turned round for a request, content-defined anchors to pick the base. No code taken. How it goes (remote_dict.go; docs/subsystems/gateway-routing.md): - A request of 16 KB or more to a remote magpie offers its body (X-Magpie-Keep-Body: dcz). A magpie of this version keeps it, only from a magpie's request, scoped to the caller's key id and connection address, and answers X-Magpie-Kept-Body with the SHA-256. A magpie from before never answers, so it is sent every body as before. - Next request to that route: Content-Encoding dcz (the RFC's magic, dictionary hash, zstd frame with checksum) against the kept body that shares the most content anchors, Available-Dictionary naming it and X-Magpie-Body-Digest the body's own SHA-256. No base sharing: zstd. - Dictionary not held in that scope (restart, evicted, another key or computer), a corrupt frame, a digest that differs: 400 with X-Magpie-Dictionary-Miss before the key limit or any route, and this side sends it again whole at once; the agent sees nothing. A 415 does the same and the route goes uncompressed until it says it keeps bodies again. - Bounds: up to 48 MB a body, 30 min, server 8 per scope / 96 MB per scope / 256 MB in all (LRU), client 8 per route / 128 MB in all. Memory only. The headers are stripped on arrival and from the relayed reply. Measured (TestDictSavingOnALongConversation): two interleaved agent conversations, 80 requests of real repo Go files as tool results plus a 300 KB screenshot, a moving cache_control, growing to 1.1 MB: as sent 44,606,511 bytes zstd 26,409,026 (59.2%) dcz 639,701 (1.43%); the last 1.1 MB request went as 1,368 bytes; dcz encoding 179 ms over the 80 requests. Tests: TestRemoteMagpieBodyGoesAgainstTheOneBefore (one gateway as both computers, Anthropic protocol: turn 0 whole and offered, every turn after dcz under a quarter of its size, the vendor gets the same messages and no X-Magpie or encoding header), TestRemoteMagpieLostDictionaryResendsWhole (restart: miss, resent whole, agent gets 200, next turn dcz again), TestRemoteMagpieFromBeforeIsSentBodiesAsTheyWere, TestKeptBodyIsOnlyItsCallers (another key, no key, another computer, a truncated or flipped frame, another or no digest: 400 miss and the handler never reached), TestKeptBodiesBounded. remote_delta_test's hopLog now logs bodies as the other magpie reads them, and the raw wire bytes apart. Run: - go test ./internal/gateway -timeout 45m on mote on this change over |
||
|
|
e97271f027 |
agents: a client of a Remote magpie can connect new agents the remote has connected (KoiLx0 on X)
KoiLx0 runs one magpie as a client of another, through a gateway key, and had to switch every agent on by hand on the client before it took the remote's models. A Remote magpie's editor now has "Connect new agents to this remote" (自动接入新 agent) under Advanced, off by default. It is kept per computer in the stash (remote.<id>.connectAgents), not in providers.json, so a synced or shared providers list doesn't turn it on anywhere else. No server-side key permission. With it on, the follow loop (FollowRemotePicks, every 5 minutes, and at once when the switch is turned on) connects an agent installed here that the remote has connected, on the remote's pick (connectFromRemote), and records it as <agent>.remote.auto = on. An agent the user disconnected here is never connected again: - one with the Agents page's Disconnect mark, connected or not before; - one recorded on that is no longer connected (taken out by hand in its file, or by any other route) is recorded off. An agent magpie put back on quit (quit.restored) is left to RewireOnStart and not taken for a disconnect. Connecting it by hand records on again. The follow throttle's time is now under a mutex, since the save handler resets it from another goroutine. The switch shows in /api/providers as connectAgents and is saved as connectAgents (a save that leaves it out keeps it; a provider that isn't a Remote magpie is refused it). Advanced opens on its own while it is on. docs/subsystems/providers-accounts.md says all of this. app.js stays within its budget (TestCoreScriptBudget): the Remote magpie's three ticks (MCP servers, skills and prompts, agents) and their save are one loop, which the new switch costs less than it saves. Run: - mote, go test -tags nogui -count=1 -timeout 45m ./... with the first draft of app.js: every package ok but internal/gui, where only TestCoreScriptBudget failed (1087333 > 1086971). After the loop, rebased on origin/main |
||
|
|
187d067241 |
gui: a page's row in Sidebar pages is dragged by a finger too (chet030714 on X)
v0.1.4296's page order "根本拖不动" on a phone. Reproduced in Chromium with real touch input (CDP Input.dispatchTouchEvent, 390px, hasTouch, isMobile): the press on the grip went pointerdown, pointermove, lostpointercapture, and the drag ended before it began. A finger (and a pen, where the browser does so) is captured by what it pressed, here the grip span inside the row; dragRows then takes the capture on the row, the grip loses it, and its lostpointercapture bubbled to the row's listener in dragListen, which cancelled the drag. A mouse has no implicit capture, which is why the mouse test and the desktop app were fine (mouse drags passed in Chromium and WebKit, 1100px and 390px). dragListen now cancels only on the handle's own lostpointercapture. The fix is in the shared listener, so every dragRows/dragCards whose handle holds a child (the accounts' rows, a model's rows, plugin pages) gets it. On a coarse pointer the grip is 40px wide instead of 26, a finger's target. Alt+Up/Down is unchanged. No new motion: the rows' existing 0.16s strong ease-out shift (none under reduced motion) is what a finger drag shows. The listener's lines were written shorter so app.js stays under its budget (4 bytes of room left), no raise. Run: - nav-pages-order.test.cjs: a finger drag (CDP touch) and a pen drag (CDP pointerType pen) on the phone's menu, Chromium; WebKit checks the grip shows. 10/10 (Chromium, WebKit x en/zh/zh-TW/ja/de) on mica. Red on origin/main 269e54de5's app.js: "a finger dragged Masking up", chromium en and zh (2/2). The pen step passes on the old code too (Chromium's CDP pen isn't implicitly captured), so it guards nothing old, only the path. - The drag GUI files (account-arrange, agent-grip, codex-model-order, drag-rows-shift, gateway-key-arrange, group-arrange, group-member-drag, group-member-row-drag, panel-arrange, plugin-page-arrange, provider-order, routing-rule-drag, usage-arrange, usage-drag, tap-lost-click, tap-inverted, tap-click, search-order, nav-pages-order) on mica: 196 pass / 12 fail. The 12 are account-arrange (53 !== 52, #6010) and gateway-key-arrange 420px (#6268); both fail the same 12 at origin/main 269e54de5's assets. - go test ./internal/gui/ on mote: ok (TestCoreScriptBudget included). Not tried: a real phone (iOS Safari, Android Chrome); WebKit touch, which Playwright can't send; a real pen; the Wails windows. |
||
|
|
91b3af8470 |
usage: Qoder's own calls are under Not through magpie, by the credits they cost (eating_dream on X)
Qoder's and Qoder CN's sessions were on the Sessions page and nowhere in
Usage: callSources never listed their files. They are Claude Code's
lines, and are now read for calls as Claude Code's are (ccCallAgent:
claudeCallLine, the call cache, continuations and revisions).
Qoder writes a reply on its own models ("auto" among them) with every
token count 0 unless QODER_EXPOSE_TOKEN_USAGE is set: the transcript
writer (vUl in qodercli, the same in Qoder.app's worker, qoder-agent-sdk)
zeroes them unless the model is a custom one, from qodercli 1.1.0 on. It
keeps the reply's credits. So such a call carries Credits (new on
sessions.Call, passed to the ledger's Record), counted with no tokens
and no price; "auto" names no model, so nothing is priced for it. A
model of the user's own, whose counts are written, is read and priced
as before. The GUI's direct section already shows credits (ledCredits).
Fixture: testdata/qoder-1.1.89 is lines as qodercli 1.1.89's writer
lays them out (key order, zeroed usage, credits/original_credits/
billable, a reply with no usage), read from its npm bundle; the ids are
made up. The older invented qoder fixtures got message ids of their own
(Calls counts a message id once across agents, and they shared
WorkBuddy's m1/m2).
Run (on mica, at f07e3e067's tree, rebased on
|
||
|
|
269e54de5f |
gui: an update restart nobody clicked comes back in the tray alone (eating_dream on X)
eating_dream on X (v0.1.4303, macOS, Restart automatically on, a check every half hour, prerelease channel): after each automatic update the main window came back over what they were doing. A restart by itself brought the window back when it was up (#2096), and minimised when it was (#3495). Now every restart nobody clicked comes back with the tray icon alone, on every system, the window closed even when it was up. That covers Settings' AutoRestart, `magpie update` from a terminal, a Remote magpie's ask, and another copy replacing this binary. The restart path is restartBySelf, which updates.autoRestart calls. It still takes no focus and the Mac's Dock icon joins without coming to the front (quiet_restart.go). A restart the user clicked (the pill, Settings, the tray) opens the window as it was. No new setting. restartInto loses its minimised parameter, and markQuietRestart writes the seconds alone. An older version restarting into this one still asks for its window and may write "<seconds> minimised", so the reading side (takeQuietRestart, quietMinimised, showMinimised) stays. host.mainUp had no caller left, so it moved into the Windows test that reads it. Tests: - New TestRestartBySelfComesBackToTheTray: by itself asks for no window, clicked asks for it. - TestRestartBySelfComesBackQuietly now checks restartBySelf's mark and reads an older version's minimised mark (markOldQuietRestart, which the Windows minimised and quiet tests use too). Run, at fd407bc99 + this change: - mote-run: - go test ./internal/gui -count=1 -timeout 45m: ok - go vet ./internal/gui, GOOS=windows go vet ./internal/gui, GOOS=linux go vet -tags nogui ./internal/gui: clean - gofmt -l: clean - Broken by hand: restartBySelf asking for the window (the old behaviour with it up) fails "windows asked for [true true], want [false true]". The old code read the window through a live Wails window, so the test can't run against it as it was. - win-run go test ./internal/gui -run 'Quiet|BySelf|Minimised|RestartBy': ok. TestRestartMinimisedComesBackMinimised and TestRestartBySelfAsksNoAttention skip over ssh (session 0). - wsl-run go test -tags nogui ./internal/gui -run 'Quiet|BySelf|Beside': ok Not tried: a real automatic restart of the app on any system, and the Windows desktop tests in the signed-in session. The first update into this version is still made by the old one, which brings the window back once. Docs: gui-shell.md, restart by itself. |
||
|
|
e0f9218f91 |
update: Restart to update goes into the newest version out, not an older download (char1es_lu on X)
char1es_lu on X: Restart to update put in a version downloaded a while ago, and right after the restart magpie offered an update again. Since |
||
|
|
0f81c0b358 |
gateway: a Codex thread's system prompt says its latest collaboration mode, not the one it was compacted in (#6835, #6100)
@bubuweiying2026 on X (#6835): Codex Desktop on the Claude subscription,
interactive mode. A Codex compaction while the thread was in Plan mode
started a new Claude Code run whose append.md held the Plan block ("Plan
Mode is not changed by user intent"), since the Responses read lifts the
developer messages before the first reply into the system prompt. Every
later switch back to Default came after a reply, so it went into its
turn as a <system-reminder>, pasted text to Claude Code, and the model
refused to execute on every turn. #6100 is the same on a Chat provider:
a thread started in Plan keeps Plan in its system message.
Now every <collaboration_mode> block lifted into the system prompt says
the conversation's latest mode (latestModeInSystem in responses.go).
Codex's own words are not changed, and the switch stays in its turn too.
Every path that builds a run's instructions reads req.System, so
append.md for a new or resumed run, -p's first message and the
compaction request itself all carry the current mode. A switch changes
the system prompt once (one new run, one cache write), not every turn.
Run, at 8aaae20fa rebased on
|
||
|
|
fb711ae0fd |
settings: Quick check's Web search tests every search API, one line each (heyiwei5 on X)
heyiwei5 on X: "快速检测 联网搜索 是不是只检测第一个api 多个api的话 是不是不能检测?"
The Web search check ran one search (webSearch), which stops at the first
searcher that answers, so a second search API was never asked and a broken
one read as ok.
CheckPipeline's search now goes through checkSearch: it asks each searcher
a search can go to once, at the same time, by the path a search takes to
it, with no other standing in: the provider that searches (searcher, via
searchBy) unless provider search is off, and each search API on
(provider.SearchAPIs, via askSearchAPIKeys), in the order a search asks
them. The answer gains `searches` (name, ok, ms, error); the check is ok
only when every one is. Nothing set up, or the plugin off, says so as
before. pipecheck.js draws one line per searcher under the Web search row,
"Exa · 1.5 s" or "Tavily · <its error>" in red. Test and Test all are the
only things that ask, one call per searcher. No new strings. Documented
in docs/subsystems/gateway-routing.md.
Run (mica):
- TestCheckSearchAsksEveryAPI red on the old pipeline_check.go ("a broken
API reads as ok: {"kind":"search","ok":true}"), green now.
- pipeline-check.test.cjs red on the old pipecheck.js (0/16), green now
with i18n-keys.test.cjs, chromium + webkit, en/zh/zh-TW/ja/de, 1100px
and 400px.
- At
|
||
|
|
3d25679154 |
accounts: a setup-token pasted into the Claude import is added as one, not taken for a refresh token
liukaybee on X asked whether the token `claude setup-token` prints can be pasted into Providers > Claude > Import accounts. It couldn't: the paste box read every bare line as a refresh token, and a Claude one with no email failed with "the file doesn't say which Claude account this is". parseLoginImport now reads each bare line (and a JSON string) through bareImport. A line that is a setup-token (sk-ant-oat..., bare, as CLAUDE_CODE_OAUTH_TOKEN=... or export CLAUDE_CODE_OAUTH_TOKEN="...") is checked by checkClaudeSetupToken and added by AddClaudeSetupToken, the same path as "Add an account by setup-token...": kept in logins.json, named by its hash, nothing asked of Anthropic. One magpie already has is "exists", twice in one paste is "in the files twice", an sk-ant-api key pasted there is refused as an API key. In the ChatGPT import a setup-token is refused as Claude's and never sent to ChatGPT's token endpoint. Refresh-token lines and JSON files in the same import work as before. No result row carries the token; nothing here logs. Run (mica, mica-run): - TestImportClaudeSetupToken red on origin/main's login_import.go (#2..#5 failed, setup-token lines "doesn't say which Claude account"), green with the fix. - go test ./internal/provider -run 'Import|SetupToken|Login': ok - go vet ./internal/provider: ok - go test -timeout 45m ./internal/provider ./internal/cli: ok, ok - gofmt -l internal/provider: clean Not tried: a real setup-token pasted in the real app (the add path it calls is the existing one, itself not tried with a real token). |
||
|
|
56c988cb5e |
gateway: /v1/realtime passes a Realtime API session on to its provider (Qwen Token Plan's realtime voice)
gaubeebangeel (X) set up Qwen's Token Plan in magpie and couldn't use its
realtime voice: magpie had no /v1/realtime, so the WebSocket upgrade got a
404. Token Plan does cover realtime: qwen-audio-3.0-realtime-plus at
wss://<plan host>/api-ws/v1/realtime?model=… with the plan's sk-sp- key,
OpenAI Realtime events
(platform.qianwenai.com/docs/token-plan/best-practices/realtime-voice).
GET /v1/realtime and /realtime upgrade to a WebSocket after the same Front
guards as every route (lanGuard, corsGuard, keys, the rebinding check),
plus a same-origin check on the socket's Origin. The model resolves as on
the other routes (a bare id unlisted anywhere goes to the one DashScope
provider that is on), with key, model and account holds, and each try is
dialled in turn with the account's key. A DashScope base ending
/compatible-mode/v1 dials /api-ws/v1/realtime; any other base dials
base+/realtime (OpenAI). Frames go both ways as they are; a close goes on
with its code and reason. Text frames are masked going up and restored
coming down (audio appends and deltas are not), failing closed. Each
response.done's usage is recorded as a "realtime" call (cached input as
cache read). openai-insecure-api-key / organization / project
subprotocols never go upstream. Shutdown ends open sessions with 1001.
/realtime is a client route on magpie web's port (and in the LazyCat
manifest), and a read-only key is refused it.
Run (mote, at this tree):
- TestRealtime* (fake upstream WebSocket, no network): Token Plan path,
echo, binary, close both ways, usage 60 in / 40 cache read / 20 out,
OpenAI-style path, subprotocol filter, masking; guards: 426, 400, 404,
Origin evil/null/localhost subdomain 403, rebound host, remote without
key 401, key held to another provider 403, vendor 401 passed on.
- Broken by hand, each went red: subprotocol filter removed, masking off,
cached tokens not subtracted.
- GOOS=linux and GOOS=windows go vet ./internal/gateway: clean.
- go test -count=1 -timeout 45m ./internal/gateway ./internal/masking
./internal/gui: the first run found TestClientPathCoversHandler,
TestReadOnlyKeyEveryRoute and then TestLazyCatManifestListsTheClientRoutes
red, all fixed here and rerun green. Otherwise ok. The log has one
recovered "close of closed channel" in continuation_test.go:781's
doneHold fake upstream (a test fake this change doesn't touch; in both
runs), already filed as #6505 (and its duplicate #6690).
- Rebased on origin/main
|
||
|
|
afd2df09b9 |
gateway: a Copilot Gemini conversation past the model's 10 images goes on with its oldest left out (yuushabu_buyinn on X)
Copilot refuses a Gemini request whose conversation holds more images than
the model takes ("too many images: maximum allowed for model
gemini-4-carbon is 10, got 12"), and it counts every image in the
conversation, not one message's. A long chat with screenshots stopped
working for good.
Now, on that 400 from a Copilot account, the gateway learns the cap the
error states (per provider and model), replaces the oldest images outside
the latest user message with a one-line placeholder until the count fits,
and sends again once. Later turns are fitted before they are sent. A
request under the cap is never changed. If the latest user message alone
is over the cap, the refusal is passed on as it came. Other vendors are
untouched (imageCapped: Copilot accounts only).
The cap is learned from the 400, not from /models' max_prompt_images:
Copilot lists 1 for gpt-* and 5 for Claude models but took 3 images on
gpt-4.1 and 7 on claude-sonnet-5 live, so the list is enforced only for
Gemini and would strip images that are fine.
Run (suite at the pre-rebase tree 4649e2269; after rebasing on
|
||
|
|
b9c385286b |
agent: the disconnect preview reads no sign-ins, so macOS never asks "Keychain Not Found"
jasonz3g on X (macOS, two Claude accounts): clicking Claude Code on the Agents page made macOS ask "Keychain Not Found — A keychain cannot be found to store …" (Cancel / Reset To Defaults), dozens of times. The Agents page loads a disconnect preview each time an agent's box shows: DisconnectPreview runs Disconnect on a copy, in a subprocess whose HOME is a temporary folder. Claude Code's Disconnect builds the model list (buildModels -> CatalogFor -> provider.All -> Accounts -> rememberLogins -> liveLogin), which read the Claude sign-in with `security find-generic-password`, and Cursor's too. On a Mac the keychain is found through HOME, and the temporary one has none. With a copy of real ~/.claude and ~/.config/magpie, the dry run ran security three times under the temporary HOME, started Devin's CLI there, and rewrote held/lapsed in the copy's logins.json. previewEnv now sets MAGPIE_NO_ACCOUNTS=1, which every keychain read and write, liveLogin and askClaudeStatus already honour. The dry run of the same real copy then runs no security and no CLI, and the agent's ~/.claude files come out byte for byte the same as before (diff -r), so the preview shows the same changes. Run: - TestDisconnectPreviewReadsNoSignIns (new), red on the old code (security find-generic-password -s Claude Code-credentials ... twice), green after; its second half checks the fixture does reach the keychain out of the dry run. - go test ./internal/agent -count=1 -timeout 45m: ok on mica (macOS) and on WSL Ubuntu (magpie-desktop); GOOS=linux and GOOS=windows go vet ./internal/agent ok; gofmt -l clean. - Real binary, dry run of `claude` on a copy of real ~/.claude and ~/.config/magpie with logging security/claude stubs: 3 security calls before, none after. Not tried: the GUI dialog itself (no display over ssh); the reporter's own accounts. |
||
|
|
50f7a8e01f |
routing: a Smart row behind one renewing sooner says so; Smart says new conversations go there too
YsiCing on X: in Smart, every conversation went to one Codex account (pro,
74% of its week) while Business and team, both at 0%, said "已用 0% · 会话留在另一个账号" ("0% used · the conversation stays on another account").
That is what Smart is meant to do. It sends every request, new
conversations included, to the one account whose quota renews soonest, and
only Stays: Session or Strict spreads new conversations. But the row blamed
a kept conversation, and the Smart description said "one account at a time"
without saying that covers new conversations, plus "at 90%", which is wrong
for a week since
|
||
|
|
1aa348d145 |
gateway: Claude Code's /advisor works through a Claude subscription (#6804, #6813)
The Claude subscription bridge runs the real Claude Code with magpie's
tools only, so Claude Code's advisor (Anthropic's server tool
advisor_20260301) was read like a translation without one: dropped from
the request and its instructions rewritten to "The advisor tool is no
longer available". /advisor did nothing (recih on X, #6813; swordencao's
group advisor, #6804).
bridgeRequest now reads a Claude Code request whose advisor model magpie
serves (advisedInBridge: provider.Resolve takes it, groups and [1m]
included) as readAdvised does: Request.Advisor is set, the instructions
stay as Claude Code wrote them. The run is offered advisorToolDef beside
magpie's tools; mcpCall answers a call by asking the advisor model
(adviceRound, 55s), and the client is told a server_tool_use and an
advisor_tool_result as Anthropic's server tells it, max_uses_exceeded
past three a reply. Claude Desktop and an advisor magpie doesn't serve
go as before. Nothing about the request's identity changes: the run is
still the real Claude Code, and the advisor tool goes to no upstream.
adviceFor, shared with the vendor route, now cuts Claude Code's advisor
instructions from what the advisor model is asked (advisorCut). With
them, or advisorGone in their place, the advisor answered as the executor
that it had no advisor; seen in the reporter's exact #6804 run.
Not changed: Claude Code's Code Mode (read in 2.1.325) needs ANTHROPIC_BASE_URL
on api.anthropic.com, first-party auth with no auth token or helper, and
a GrowthBook flag; no gateway can serve it without faking Anthropic.
Run:
- go test ./internal/gateway -run 'Advis|ClaudeTUIAdvisor|BridgeRequest'
ok (mote). Red on the old code: TestBridgeRequestKeepsTheAdvisor
("the advisor is \"\""); with advisorCut a no-op,
TestAdvisorServedForAVendorModel and TestClaudeTUIAdvisorAnsweredHere
("the advisor was told of itself").
- go vet ./internal/gateway on darwin, linux, windows; go test
./internal/gateway -timeout 45m at 7abbfac34 (rebased on origin/main
2026-11-16): ok, 946s (mote). At d54abb292, rebased on
|
||
|
|
b1dd96ab14 |
agents: a client of a Remote magpie starts its agents on the remote's models and follows them (KoiLx0 on X)
KoiLx0 runs several computers on one remote magpie and had to set every agent's models again on each of them, and again whenever the remote changed. Routing groups already reach a client (a group is a model of the remote's list, TestRemoteMagpieNewGroupServedBesidePicks); the agents' picks did not. - The remote tells, per connected agent, each model field's catalog ref at GET /v1/magpie/agent-models (gateway.SharedAgentModels, agent.SharedModels). Guarded as the Library is: this computer, or a full-access key of a magpie shared on the network; a held key is refused (readonly_test), and another machine without a key gets 401 (TestNetworkGatewayGuardsEveryRoute). - An agent connected here starts on those picks where this magpie lists them as <remote id>/<ref> (How "remote", after "again" and "joined"; the Agents page says "as on the remote magpie", in all five languages). - A field taken from the remote, or found on its pick, is recorded in the stash and follows the remote's change every 5 minutes (FollowRemotePicks from library.KeepLinked). A model picked here is the user's: the record goes, and the field is left alone until it is on the remote's pick again. A pick this magpie doesn't list is skipped. - app.js budget: no raise. The new line's 76 bytes come from same and alike sharing one string (CONN_WAS) and the native joined case returning plain instead of the same t() again. Run at this head (rebased on |
||
|
|
c38753a7ee |
search: Settings can ask every search API at once, results merged (heyiwei5 on X)
The search APIs are asked in order: the next only when one fails or
finds nothing. Asking several together, with their pages merged and
repeats dropped, has existed since #2845 but only through
`magpie search mix`. Settings › Models › Web search now has an Advanced
fold, shown with two or more search APIs on, holding "Ask the search
APIs: In order | All at once". All at once marks every API on as mix
(POST /api/settings/search-api {"mix":[...]}, provider.MixSearchAPIs);
In order clears the marks. In order stays the default. A mix of some of
the APIs, set from the CLI, opens the fold with neither choice on and
names the APIs it asks.
Run (mote, at this tree):
- go test ./internal/gui -count=1: ok.
- TestSearchAPIsMixedFromSettings at origin/main's api.go: build fails
(searchAPIJSON has no Mix), so it is red on the old code.
- node --test search-mix, search-count, search-api, i18n-keys:
72/72 pass, chromium and webkit, en/zh/zh-TW/ja/de, 1100 and 560px.
- search-mix.test.cjs at origin/main's assets: 0 of 30 pass (red).
- gofmt -l: clean.
- After rebasing on
|
||
|
|
b010fba05b |
gui: the pages go in the reader's own order, in the sidebar and a phone's tab bar (chet030714 on X)
Settings › General › Sidebar pages, where pages are hidden, now also puts them in order: a row is dragged by its grip (shown on hover, always on a touch screen), or moved with Alt+↑/↓. The order is kept for this browser in localStorage magpie.navOrder, beside magpie.navHidden. The sidebar and the header's tabs follow it at once, and a phone's tab bar (phonetabs.js) shows the first four with the rest under More. Providers is listed (it can be moved, never hidden). While the order isn't the home one the sidebar's group names (Work, Models, ...) are left out, since a reordered list breaks the groups; Default order (shown only then) removes the key and puts the pages and their names back. A page the kept order doesn't name (new in an update) goes after the page it follows at home. Plugin pages keep their place in their group. A reader who never reorders sees nothing change. navOrder and navArrange live in the new navorder.js, imported by navHides only once an order is kept (and by navpages.js with the menu), so what is left in app.js is that one line: +107 on both core budgets, explained there. old-webkit's list of on-demand scripts names navorder.js. Built on the unpushed WIP 10b9ee22c (page-order worktree), cherry-picked onto origin/main; the WIP test clicked the aria-disabled Providers row without force, and its reload checks now wait for the async import. Run: - nav-pages-order.test.cjs (new): Chromium and WebKit, en/zh/zh-TW/ja/de, 10/10 pass. Red on origin/main (no menu opens), 5/5 chromium. - The whole GUI suite (make test-ui) on mote at the first, inline version (navArrange ran on every start; the final version runs nothing new for a reader with no order), stopped after 4,171 ok / 171 not ok, none in a nav, sidebar or phone file. Five of the red files (agent-switch-accounts, gateway-key-arrange, first-untick, data-folder, api-key-theme) rerun on mica at this tree and at origin/main |
||
|
|
c1ab9a4946 |
gateway: an input item a Responses upstream has no type for is translated, and a compaction refused so is asked as text (cyberestro on X)
cyberestro on X: a Codex subagent on a local Qwen server's Responses API (qwen, http://127.0.0.1:30010/v1) got "compaction: qwen (qwen, …) answered the summary request 400 Bad Request: qwen: Unsupported input item: agent_message". agent_message is the item Codex's MultiAgentV2 hands a subagent its task in (author, recipient, input_text content, as #5259's and plugins#61's requests carry it). Two gaps, both fixed: - The compaction's fallback for an input kind refused (inputKindRefused, #5181, #5259) read only "unsupported_input_item" and "unknown item type". inputKindWords now reads "unsupported input item" with spaces too, so the summary is asked again with the conversation as text, the agent_message as the user's turn (itemText), then compacted locally. - The normal path relayed every subagent turn to the same server with the agent_message as Codex sent it, and gave the 400 back. passthrough now treats that refusal, on a request carrying an item other than a message, function call, its output or reasoning (hasOtherItem), like a custom tool refused (#2656): the model is marked (inputKindsRefused) and the turn is translated on the same API, where agent_message is the user's turn and a custom tool call a function call; later such turns go translated at once. A native compaction or sealed task still gets the refusal, and magpie's own summary ask (inCompaction) keeps its text fallback. Run (mote, mica): - New tests on the old code ( |
||
|
|
c867a12c5b |
claude: a client sending earlier turns' images back still goes on in its run
Yqihotaru (X) keeps a long conversation on claude-opus-5-5 through the
bridge, and their client takes the images of earlier turns out of some
requests and sends them back in others: the log's image count flips
between 2 and 4, every turn says "no run here has had this conversation",
and a new Claude Code starts from a transcript each time, so the prompt
cache is lost every turn.
lostMedia (#1382) took only images taken out, and looseTurn compared the
last turn alone with the whole history before it hashed exactly. Now
mediaMoved compares the conversation one role's run of messages at a
time, either way (images taken out, or put back where nothing or a line
of text stood). follows uses it for tool results; looseTurn keeps the
whole conversation and its settings apart, and rewrote takes a request
with the same settings whose images alone moved, in any turn. A sealed
tool result keeps the last 2KB of its words so one sent back without the
client's line is told from one changed otherwise.
Run (mica): go test ./internal/gateway (whole package, -tags nogui,
-timeout 45m) ok; go vet, GOOS=linux go vet -tags nogui, GOOS=windows go
vet of internal/gateway ok; gofmt -l clean. Rebased on origin/main
|
||
|
|
3ad5b93d41 |
provider: a Gemini model id with a slash keeps it in the request path (#6695)
A custom Gemini compatible provider's namespaced model id (example/model-demo) was asked at /models/example%2Fmodel-demo, since GeminiPath escaped the whole id. A relay that routes by literal path segments answered 403 Invalid URL (POPOBE97 in #6695, LuoRuiyao on X). GeminiModelPath now escapes each segment and keeps the slashes, so the request goes to /models/example/model-demo:streamGenerateContent. An id with an empty, . or .. segment, which a server could clean into a path outside models/, still goes as one escaped segment. Google's own ids (no slash) give the same bytes as before. Siblings made to agree: Vertex AI's VertexPath, VertexWholePath, its model test and the Claude rawPredict path (a slash id there goes to partner chat completions, so only the pinned test changed), the plugin Code Assist path in plugins.go and Gemini image generation in draw.go, both of which put the id in raw before (a ? or space broke the URL). Run (on mote): - red on the old code (old provider/gateway files, a shim for the new helper): TestGeminiModelPathKeepsSlashes FAIL `GeminiModelPath("example/model-demo") = "example%2Fmodel-demo"`; TestGeminiNamespacedModelKeepsItsSlash FAIL `status 403, asked [/v1beta/models/example%2Fmodel-demo:streamGenerateContent?alt=sse]`. Both pass with the change. - gofmt -l clean; go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./..., go build for darwin, linux (nogui), windows. - go test -tags nogui -timeout 45m ./...: all 101 packages ok. Not tried: a real relay that routes by namespaced id, or a real call to Google's endpoint (its paths for slash-free ids are byte-identical, held by the test). |
||
|
|
13e8002641 |
claude-desktop: two providers' Claude model read "Opus 5.5 · agy-cli", not the id's tail (onkashiko on X)
Claude Desktop names a row listed as magpie-<n>.anthropic.claude-opus-5-5
after its own catalog ("Opus 5.5"), whatever display_name says, so
agy-cli's and another provider's claude-opus-5-5 read alike and Desktop
5.11492 told them apart by the part of the ids that differs: "Opus 5.5
(…<n>.anthropic.claude-opu…)" (xVn/wVn in its app.asar). Only an
inferenceModels entry's labelOverride comes before the catalog's name,
and Desktop never suffixes such a label (keep in xVn).
magpie now writes the profile's inferenceModels, each row's display_name
as labelOverride, while two rows are named after one Claude model of
Desktop's catalog (desktopNamesClash), not only while a tier is picked.
The ids are unchanged. As with a tier's list, Desktop reads it at start
and its menu stays as listed until the next start; the Agents row's
Restart shows.
desktopNames' own fallback for two rows display_name still leaves alike
(one provider's models named alike) is now the model's id, "Z · D (z2)",
not the whole catalog id; two providers of one name keep the catalog id.
Claude Science takes the same names.
Run (mote, at origin/main
|
||
|
|
023a563735 |
install: the Windows install dialog says the download can be deleted
@jiangshangmuyun on X updated on Windows and found a new magpie while "the original is still there". That is by design since |
||
|
|
9dcec67513 |
archive: the request archive in an S3 bucket is kept under a GiB, oldest calls removed
An R2 user on X: the sync bucket grew by 18 GB in under a month. The
backup and usage files are small and rewritten in place; what grew was
the request archive, every call written whole (bodies up to 32 MiB) as
archive/<date>/<id>.json and never removed. The archive on this computer
is capped at a GiB; the one in the bucket had no cap.
Now the bucket's archive is held to RequestArchiveMB (a GiB unless set,
carried by sync), down to a tenth under it past the cap, oldest first:
- only keys of ArchiveName's own shape under <prefix>/magpie/archive/
are counted or removed; the backup, usage, other prefixes and anything
else in the bucket are never touched (a test seeds seven such keys);
- uploads are counted as they go, and the bucket is listed again only
after a tenth of the cap more is uploaded: one LIST for ~1000 calls,
never one per call;
- the serving magpie lists once two minutes after it starts, archive on
or off, so a bucket grown before this update is brought under the cap
without the user doing anything (auto-cleanup chosen over a button:
the objects are magpie's own, already capped locally, and a removal
is logged);
- the Usage page's switch tooltip says the size ("…in <bucket>, up to
1.1 GB"), in every language; the core script budget is kept, not
raised: the two tooltips share one options object and the switch's
aria-checked is set from a boolean.
The Nov 3 rise in Class B reads has no code cause found: archive reads
are click-driven only, and the backup's conditional GET runs every 3
minutes per computer online.
Red on the old logic (bucketAdded and KeepBucketArchiveBounded made
no-ops by hand, on mica): TestRequestArchiveKeptUnderItsSize "after 200
calls the archive holds 248 calls, 7629310 bytes, over its 1048576 (48
from 2020 left); 0 LISTs, 0 DELETEs"; TestBucketArchiveBroughtUnderIts
SizeAtStart keeps 30 calls / 3000 bytes; TestBucketArchiveListedPer
TenthUploaded "0 LISTs". With the fix: "200 calls: 44 kept, 986389
bytes; 4461157 bytes uploaded, 39 LISTs, 203 DELETEs".
Run at this tree (rebased on
|
||
|
|
c6a67dd412 |
gui: the Windows main window is resized from its edges again (Puremilk_chun on X)
Since 0.1.4274 ( |
||
|
|
2ad38c8b3e |
provider: Baidu Qianfan's ended console sign-in asks for a new one in the editor, and a renewed cookie is kept (yuushabu_buyinn on X, #5860)
yuushabu_buyinn asked for AccessKey + SecretKey in place of the console cookie, which expires. Baidu has no such route. Its documented OpenAPI has no read for a Token Plan Personal: - the Qianfan API catalog (doc/qianfan/s/Smownk4en): 量包 v2/charge?Action=DescribePackageResources lists token packs by series, with no Token Plan; - Finance's API (doc/Finance/s/ojxecslph): bills, balance, orders, vouchers; - the Token Plan Enterprise's seat APIs (tokenplan?Action=... DescribeTeamSeatUsageDetail), which take an API key and are for team seats only. The Token Plan Personal doc (doc/qianfan/s/Dmrabu8b6) shows usage only on the console's 我的订阅 page. So the cookie stays, and what is mended is what happens when it ends: - Before, a session the console refused showed "Signed out of the Baidu Cloud console" on the card, while the provider's editor still said "Signed in" with only Sign out. Now the kept sign-in is marked ended (qianfanSession.Ended, set the first time only, and not when a newer paste has replaced the cookie the read used). /api/providers says qianfanPlan.ended, and qianfanplan.js draws "Baidu Cloud ended this sign-in. Bring a new one:" above the bookmarklet and paste steps. A new paste, or a later read the console takes, clears the mark. - A cookie the console sets in a reply that read the plan (on the resource's path) is merged into the kept Cookie header as a browser would: replaced in place, added, or taken out when deleted or expired (mergeQianfanCookies). A session Baidu renews as it is used then stays the one magpie holds. The paste check keeps what its reply set too. The StepFun sibling (the same "still Signed in" gap, drawn by renderStepPlan in app.js) is #6808. The Qianfan fix adds no app.js bytes. Run (mote, at |
||
|
|
f64c7e54f1 |
provider: a Remote magpie's cards, limits and router go with its client certificate (#6413)
hhdaxia on X (0.1.4258), and Linsenx in #6413 with a patch: a Remote
magpie behind mTLS, with Client certificate and Server CA set on the
provider, answered model calls, but Usage → Overview's read of its
cards went without the certificate. The remote's TLS refused it, and
the 403 was then shown as "remote magpie isn't shared".
Two causes, both fixed for the class:
- magpie's own requests to a Remote magpie built their context without
p.Via, so they missed the provider's proxy, client certificate,
Server CA, unchecked TLS and pin. Via now goes in at the three choke
points every such request goes through:
- remoteBodyAs: cards, refresh, quota history, Codex reset, Library,
version/update, the root /v1 that finds the MCP router;
- askRemoteKeyLimit: a key's limit;
- waitRemoteList: the model list's wait.
The Library server for a Remote magpie's MCP router (/mcp/magpie/hub)
is checked and called through checkTransport. That transport now goes
through ViaRemoteMagpieAt, which applies the Remote magpie provider
whose address matches.
- Every 403 without a key code was read as "isn't shared". remoteRefused
now gives that only when the remote says "shared on the local
network", which every not-shared 403 the gateway writes says. Any
other refusal (magpie's own client-certificate 403, a proxy's page,
an empty body) is shown with its status and the remote's own words,
or names a client certificate check or a proxy in front.
Model calls, the connection test, sign-in and the cert peek already
carried Via; a grep of every NewRequest to a remote address found no
other route.
Tests:
- TestRemoteMagpieOwnRequestsShowClientCert: a real httptest TLS server
with RequireAndVerifyClientCert and a cert from mtls.Store. It checks
cards, quota history, key limit, root and list wait.
- TestRemoteForbiddenSaysWhatRefused: 403 bodies for not shared (JSON
and lanGuard text), magpie's client-cert text, an nginx page and an
empty body, through both remoteBody and askRemoteKeyLimit.
- TestRemoteMagpieRouterShowsClientCert (library): CheckServer on the
router behind mTLS is refused with the CA alone and ok with the
provider's certificate.
- fakePeer's 403 now writes the gateway's real not-shared message.
Run:
- At origin/main
|
||
|
|
b34243823e |
routing: accounts' resets stay in their column, and resizing over many accounts is smooth (lexrus on X)
lexrus on X: on Routing's Accounts and keys, at some widths "resets in
3h" ran over the next column and the right column's words were cut, and
with many accounts dragging the window's edge was janky.
Overlap: the window parts' widths (--wk/--wv/--wr) were taken from the
widest window of the whole list, so one provider's long reset pushed
every row past its column. They are now per provider, and CSS caps each
part to its row.
Jank: the list was CSS columns, and the browser balanced every row again
on each layout. packActs (plugins/routing/client.js) places each
provider's box (and a long box's rows) itself under .rt-acts.packed with
--px/--py: down a column and on into the next, ends as level as a binary
search on the cap allows, a heading never last in a column. It runs on
the window's resize, on render, and a frame after a box's height changes.
Side mode (min1150, beside the requests) is unchanged: one scrolled
column, nothing placed. Measured on mote with a 100-row fixture, per
resize step: WebKit layout 26.6ms -> 5.9ms, frame p90 35 -> 18ms;
Chromium layout 8.24ms -> 2.86ms.
Test: routing-account-windows-fit.test.cjs, 4 and 20 Codex accounts, en
and zh, Chromium and WebKit, widths 420-1600: no window part runs past
or is cut, a provider's lines start together, the list isn't CSS
columns, boxes sit inside the list in column order without overlapping,
2+ columns at 700-1099. Broken by hand: the old assets are red on the
overlap; packing turned off is red ("the list isn't CSS columns").
gui-shell.md says how the columns are placed.
Run on mote at this change on origin/main
|
||
|
|
3b643f3978 |
provider: a Claude sign-in read mid-write on Windows is no sign-out
xbpb6 on X (0.1.4281, Windows 11, TUI mode): the account Claude Code is signed in to said "Sign-in required" with "can't read the allowance"; signing in again fixed it for a while, then it came back. Claude Code on Windows writes .credentials.json and .claude.json through a temp file and a rename. Go's os.ReadFile opens without FILE_SHARE_DELETE, so while magpie reads the file the rename gets EPERM. Claude Code then truncates the file and writes it in place (xO in its writer). A read in between finds the file empty or cut short. - rememberLogins took that read as a sign-out. claudeLoggedOut marked the Held account lapsed with claudeLogoutLapse, which breaks the rule that a failed read means unknown. - The account then read as not in use. Then claudeSavedDir, which has no Held check, could copy Claude Code's own sign-in into claude-accounts/<id> for a warm-up, a usage read or a request. Two Claude Codes then held one rotating refresh token, so whichever refreshed second signed the other out for good. That is why the account comes back as signed out again and again. Now: - claudeSignInUnsure reads the files again. The account counts as signed out only if the file is gone, Claude Code emptied it, `claude auth status` says logged out, or no account is named. A file that can't be read or isn't whole JSON is unknown for up to claudeUnsureGrace (2 minutes). - Meanwhile, rememberLogins doesn't lapse the Held account, and Logins and renewLogins keep it active. - claudeSavedDir refuses a Held account with errClaudeHeld, whose text is not one ClaudeSignInRequired matches. - The Mac keychain path is unchanged. Run: - TestClaudeHalfWrittenSignInIsNoLogout was red on the old code on mote, in two ways (logs kept). An empty credentials file gave Active:false with claudeLogoutLapse, the screenshot's state. claudeSavedDir put the Held account in .config/magpie/claude-accounts/7f327d2462d8fb58 with no error. Green after. - mote: go test ./internal/provider ./internal/gateway -count=1 -timeout 45m: ok, 142s and 913s. - win-run (xiaomi-gpu, Windows 11): TestClaudeHalfWrittenSignInIsNoLogout, TestClaudeAccountsOutliveLogout and TestClaudeSwitchIsNoLogout pass. - gofmt -l is clean. GOOS=windows and GOOS=linux go vet ./internal/provider pass. Not tried: - No real Claude account on Windows. The EPERM rewrite was read from Claude Code 2.1.316's source, not watched. - No full ./... suite. - A Claude Code killed mid-refresh on Windows is not covered. |
||
|
|
35face90f3 |
gateway: thinking.display goes to a Claude only (StudyingPython on X)
pi-ai, DeepSeek Harness's client, sends thinking {type, budget_tokens,
display: "summarized"} for every model it lets reason (and adaptive with
display for some). magpie passed display through to non-Claude models on
an Anthropic route, and Alibaba Cloud's Anthropic endpoint (Bailian and
its Coding Plan) answered a Qwen request with 400. The reporter saw it
around compaction, which dsh can move to another model.
withoutForeignDisplay drops thinking.display when the body's model is
not a Claude (claudeVersionOf, or "claude" in the name). It runs in
forwardOnce's Anthropic block after adaptiveThinking, so Anthropic's API,
the Claude subscription and relays serving Claude models keep display
"summarized" (#1485). The provider's own fields go on afterwards, so a
display the user forces there ("!thinking") is still sent.
Run (mote, at this commit on
|
||
|
|
ff5a7dfc03 |
lessons: one full suite per machine moves into the code standards
Seen a third day:
|
||
|
|
ada0125303 |
providers: Antigravity's accounts move to agy-cli in one click (@tongzhenbao on X)
@tongzhenbao asked whether accounts signed in on the old Antigravity plugin (opencode-antigravity-auth, withdrawn since |
||
|
|
64c4261582 |
sessions: search what was said in every agent's sessions, from the page and an MCP server
cryingLiu on X asked to search the chat history of every agent magpie
reads sessions from: prompts and replies, from one place.
What the user gets:
- The Sessions page's search also lists, under the agent's own list,
the other agents' sessions whose conversation says the words, each
with a snippet. A hit opens the conversation in the sheet at the
message that said it (transcript?find=), with "N earlier messages
not shown"; the page itself never scrolls. While the index is still
being built the head says "Indexing sessions…" or "Indexing N of M
sessions…", and the page asks again every 3s until it is done.
- Magpie Sessions, a built-in MCP server in Library → MCP (Discover),
opt in per agent like the other magpie servers. Its tools are
search_sessions(query, agent?, limit) and read_session(id, around?),
both returning text. It runs as `magpie mcp sessions` over stdio and
reaches the gateway's /mcp/magpie/sessions, which serves only local
callers that are not browsers.
How it works:
- internal/sessions/said_index.go keeps said-v1.db beside sessions.json:
a contentless SQLite FTS5 index (detail=none) of the words each
session says. It is built from the sessions list sessions already
caches and refreshed at most every 10s: a new or rewritten file is
read once, a grown Claude Code or Codex file only from where it ended,
and a gone one is forgotten. A query asks the index which sessions
have every word, then reads only those files for the snippet, for at
most 6s. A search waits up to 2s for a refresh. While the first
listing is still running the answer says `listing`, so an empty first
answer is not read as "no session says it".
- Privacy: only agents sessions.Reads allows are indexed or searched;
nothing is read until the user has answered the sessions question,
and in gateway mode no agent's own files are read (the page doesn't
ask). Reset forgets the index.
- /api/sessions/said for the page; the CLI parity list names it.
Run, at this tree (rebased on origin/main
|
||
|
|
103eff4d44 |
routing: a group's model is dragged by its row, not only by its number (NovaStudiosss on X)
NovaStudiosss on X: "the models added to a routing group should be draggable with the mouse; I move them often and Up/Down each time is not handy enough". A member could already be dragged since |