0f94acc994a9fa9af0a5f8bbafa6bb74e7692b96
7289
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0f94acc994 |
provider: Kiro's mover min is 0.1.36, the overage against its own cap (wizcheu on X)
wizcheu on X, Kiro Power (10000 credits) with overage on: magpie showed 12589.24 / 37500 where the Kiro IDE shows 10000 / 10000 in plan and 2589.24 post-paid. The plugin took the overage cap for the month's whole limit. Kiro plugin 0.1.36 (plugins 5292fc9f, on npm) shows the plan's credits (shown only) and an "Overage" window against the cap, which counts the overage alone; that window stops the account. This raises the mover's min so every moved Kiro user gets it, and gives the new window name "Overage" its zh, zh-TW, ja and de words. Run (mote, macOS, at this commit): - go test -count=1 ./internal/provider: ok. - go vet ./internal/provider for darwin, linux (nogui) and windows: ok. gofmt -l: clean. - node --test i18n-keys and i18n-en-no-cjk: 8 pass, 0 fail. - npm view --prefer-online @magpie-community/opencode-kiro-auth version: 0.1.36. Plugin side: bun test packages/kiro 172 pass; origin/main's index.mjs under the new tests is 6 red, a region used up by its plan instead of its overage is 1 red. Not tried: a real Kiro account with overage on, nor the GUI card with the new windows in a browser; the full suite starts after the tag. |
||
|
|
617200a320 |
providers: Vercel AI Gateway is a preset (Archie627 on X)
Archie627 said magpie has no Vercel AI Gateway. It is now a preset in Add: Chat Completions and Responses at https://ai-gateway.vercel.sh/v1, Anthropic Messages at https://ai-gateway.vercel.sh (Vercel takes the key as Bearer there too), models.dev's "vercel" catalog, the vercel icon the vercel-jev decision preset already used, and its API keys page. An OpenCode or URL import at that host becomes the preset. READMEs and the site's import pages (en, zh, ja) list it. Its /v1/models (public, 505 rows today) marks each row's "type". Read as before, the decision models (liquid/d1, typesafe-ai/jev) and realtime voices showed as chat models, ElevenLabs voices were dropped, and transcribers (elevenlabs/scribe-v2) showed as chat. At Vercel's host alone (catalog.VercelGateway) the type now decides: evaluation and realtime rows are left out, speech, transcription, embedding and reranking rows get their Serves, image rows draw and video rows film. The 48 "-batch" ids are left out: Vercel's docs say "Synchronous requests don't accept -batch IDs". context_window gives the window. Another host's "type" is read as before. Run: TestVercelPreset and TestVercelLiveList (real rows from Vercel's list in testdata, served through an httptest server, no network); go test ./internal/catalog ./internal/provider on Linux (wsl-run) and macOS (mote, -run Vercel|Preset|Import before mote stopped taking SSH); gofmt; go vet linux, windows, darwin (CGO off). Broken by hand: VercelGateway returning false turns TestVercelLiveList red (decision, realtime, batch and transcriber rows back in chat); the -batch skip alone turned off turns it red too. Not tried: no Vercel key, so no real chat, Responses or Messages call; only the public GET /v1/models. No GUI file reads the preset list by name (the Add sheet is built from /api/presets), so no GUI run. |
||
|
|
8cc4bd7e3c |
agent: Craft Agents, through a keyless connection at the gateway (springg1998 on X)
Craft Agents (lukilabs/craft-agents-oss, thecraftagents.com) keeps its LLM connections in config.json under $CRAFT_CONFIG_DIR or ~/.craft-agent (paths.ts, storage.ts, llm-connections.ts, v0.15.8). magpie adds one connection: slug magpie, providerType pi_compat, authType none, baseUrl at the gateway's /agent/craft-agents/v1, customEndpoint.api openai-completions. Its models are the ones picked for it, and defaultModel is always one of them, because Craft resets a default that isn't in the list to the first. magpie makes it defaultLlmConnection. The user's default is stashed (as JSON, "" for none) and put back on off when that connection still exists. A name the user gives magpie's entry stays, and a sync with nothing to change writes nothing. A config.json with no workspaces list is one Craft doesn't load, so magpie never creates one: open Craft once first. Picking one of the user's own models removes magpie's entry and sets that model on their default connection. Sessions keep the connection they started on, so the notice says new sessions use it (zh, zh-TW, ja, de). Detected by ~/.craft-agent, Craft Agents.app (com.lukilabs.craft-agent), or %LOCALAPPDATA%\Programs\@craft-agentelectron\Craft Agents.exe (per-user NSIS; the GUID is the UUID v5 of the appId, derived the same way as dsh's known one). Skills go to ~/.agents/skills. CRAFT_CONFIG_DIR is in agentenv.Vars. Icon from Craft's own icon.svg (#9570BE). README, reference, agent-wiring and site list it. Run on mote, first on origin/main |
||
|
|
2fbead7983 |
provider: a relay URL typed without its /v1 (CRS's …/openai) is tested, detected and listed under it (Cyrus_4433 on X)
Cyrus_4433 added a claude-relay-service provider as OpenAI compatible at
http://<ip>:55088/openai. The list couldn't be fetched and Test models
said "gpt-6.1-sol: 404 · Not Found". From CRS's src/app.js and routes:
/openai mounts unifiedRoutes (POST /v1/chat/completions) and
openaiRoutes (/responses, /v1/responses); /api mounts GET /v1/models.
There is no /openai/chat/completions or /openai/models, and anything
unrouted is 404 {"error":"Not Found",...}. magpie asked base +
/chat/completions, i.e. /openai/chat/completions.
- probe: a Chat/Responses 404 at an unversioned base equal to the
provider's URL is asked once more at base/v1/... (missingV1; not
accounts, Azure, Bedrock, Vertex). Answered OK there, the saved URL
takes /v1 (setV1) and the result carries it (Result.V1); Detect uses
it as the base; the editor's URL field follows (draft.onV1) so Save
doesn't undo it. A 404 at both stays the first 404.
- catalog: an unversioned …/openai base is also listed at
<origin>/api/v1/models (RelayOpenAIList), and fixV1 adds /v1 when the
list answered there.
Run (WSL magpie-desktop via wsl-run; mote's sshd reset every
connection this session):
- at 630b0de98 (this change on
|
||
|
|
185ee6d5c1 |
gui: an auto restart brings a minimised main window back minimised on Windows (#3495, realLemonawa on X)
Settings' Auto restart after an update brought the main window back if it was up, and on Windows a window minimised to the taskbar counts as up, so the new version showed it on screen (quietly, without focus). Now the old version notes whether it was minimised: the restart-quiet mark reads "<seconds> minimised" (mainUp reads up and minimised together on the main thread). The new version, on Windows, puts the window straight onto the taskbar with SetWindowPlacement and SW_SHOWMINNOACTIVE, never shown on screen and never activated, at its kept place and size, with WPF_RESTORETOMAXIMIZED when it was maximised (placeMain split into placeAt and the maximise). A mark of the seconds alone, from an older version, still reads as a window up. A restart the user clicked is unchanged. The first auto update into this version is still made by the old one, which doesn't write the word, so the window comes back minimised from the update after it. macOS and Linux keep showing it quietly: #5926. Run: - Windows (xiaomi-gpu, in the signed-in console session through a one-shot schtasks /it, since the windows are real): TestRestartMinimisedComesBackMinimised, which starts the test binary as a Wails app three times: minimised, minimised and maximised, and shown. It checks the window comes back minimised, is never shown whole (WindowShow while not iconic), doesn't take the foreground, mainUp says up and minimised, and that SC_RESTORE brings it back (maximised when it was) with its page visible (the page reports document.visibilityState). PASS. - Windows over ssh: go test -count=1 ./internal/gui/ fails only TestGatewayHeldByAContainer, TestPluginAgentMissingSaysSo (#5324), TestLodyImportHandoff, TestImportStatusUnreadableIsUnknown, TestUpdateThatWontStart (#4115, #1827) and TestProviderSaveClientCert (filed #5928); all six fail the same at origin/main |
||
|
|
f1996e7e5d |
gateway: a provider named past its usage cap is not sent on to a group (Anotiaww on X)
Anotiaww on X: magpie on server B asked magpie on server A for claude/claude-opus-5-5. A's Claude account was past its usage cap (the trace: "a usage window at 98%, over the account's 98% cap"), and the Claude provider had no fallback set. The request was answered by a WorkBuddy member of the user's routing group claude-opus-5.5 (the trace row marked Fallback), with nothing said. They expect the cap's refusal. Cause: |
||
|
|
6b92824ff5 |
usage: a window's whole also at base rates, without long-context premiums (#5861, Norethcy on X)
A window's whole (WindowHolds) is priced at API list prices, which charge
GPT-6.1 Sol's input above 272K at a premium a subscription's own use
doesn't pay. A cycle with more long calls then reads as a larger
allowance: NorethSea's previous week came to $76.56, $53.52 without the
premium, against $56.99 for the current one.
Each priced call is now also costed at its model's base rates, the
long-context tiers left out and a peak hour's price kept (baseRates), and
the window's whole sent as BaseCost beside Cost, only when the two differ.
Past cycles get it too (HistoricalWindowHolds goes through windowHolds).
On the card the figure then says which it is ("≈ $76.56 API") and is a
button: a click switches every card, past cycles too, to the base figure
("≈ $53.52 base") and back, moves nothing, and is kept in the browser.
Its tooltip names both and says neither is an official dollar allowance
or a fixed quota. A window that paid no premium is drawn as before. The
ledger's and the API's real cost are unchanged. #4181 (auto-review calls
counted in the whole) is not part of this.
app.js and the core stay in their budgets with holdsLine's and holdsWhy's comments cut, no raise.
Run (mote's sshd reset every connection, so on the Linux box through
wsl-run; the package run at base
|
||
|
|
4921bf5a97 |
usage, sessions: one model option for a found routing group's two ids (#5892, Norethcy on X)
A found routing group is called by its public id (auto/<model>) and is kept as group/auto-<slug>; calls recorded under either were counted as two models, so Usage › Sessions' model filter listed the same group twice and the ledger, summaries and session lists split its calls. Ported from NorethSea's 30d6261cd on their fork: UsageAlias names a found group by its public id before the user's alias (both spellings, old session files too), sessions' lists, the ledger keyer, the summary cache's key and Codex's model/effort read through it, and a cache keyed on the group names (UsageNamesKey) is read again when a group is renamed. A user's own provider named "auto" keeps auto/<model> (autoRefsOn). Changed in review: the patch's ledger filter compared every record with provider.SameRef, which reads the providers (customIDs, a stat of providers.json) for each record a filter passes over. FilterOf, the one place a Filter is made from a query, now canonicalizes the model once, and keepsRecord asks the providers only for an auto/ record under a group/ filter (sameGroupModel). Run (mote's sshd reset every connection all afternoon, so on the Linux box through wsl-run; the package run at base |
||
|
|
44732325e7 |
gateway: test that OpenCode Go's keys take over at its usage limit (MelWoutersgghi on X)
MelWoutersgghi asked for an OpenCode Go provider that holds several keys and switches between them. That already works: OpenCode Go is a built-in key provider (presets.go), and every key provider keeps several keys (Provider.Keys, keys.go). The provider's editor lists them under Accounts with "Add another key" (renderKeyAccounts), a key is turned on or off by its dot, and with more than one on, Routing says how requests spread. Each key's 5-hour, weekly and monthly Go windows are read on its own (planquota.go, key_allowance.go). Nothing guarded it with OpenCode Go's own refusal, so this adds TestOpenCodeGoKeysTakeOverAtUsageLimit: the first key answers the 429 GoUsageLimitError body OpenCode's client records (its composer.spec.ts fixture), the second key serves the request, a key that is off is never tried, and the next request goes straight to the second key while the first rests. Run: go test -run 'TestOpenCodeGoKeysTakeOverAtUsageLimit| TestSeveralKeysOnTakeOverFromEachOther' ./internal/gateway, PASS, and go vet ./internal/gateway, clean, both on Linux (wsl-run; mote refused SSH six times in a row). gofmt -l clean. Broken by hand: KeysOn returning only the first key for opencode-go makes the test red (429, tried k-spent only); restored. Not tried: a real account with two OpenCode Go keys; the full suite (test-only change). |
||
|
|
208b89422d |
routing: a group carries a note of its own (ConatusMoon2222 on X)
ConatusMoon2222 asked whether a routing group can have a note. It couldn't: a group had an id and a name, nothing else of the user's. A group now has an optional one-line note (provider.Group.Note, "note" in providers.json). SaveGroup cleans it: whitespace and newlines run together, cut at 200 characters (in runes), and an empty one is no note. It is the user's own word and is never sent to an agent or a vendor. - Routing page: the note shows under the group's name as one muted, ellipsized line, the whole of it on hover, and only when there is one. The group editor has a Note field under Name (Enter saves, as in Name). Every save of the group sends it: the editor, a manual group's pick and a routing picked from the row, so none of them wipes it. - CLI: `magpie group set <id> note=...` (note= clears it), `magpie group add ... note=...`; `magpie group <id>` and the list print it. - TUI: N in a group's view edits it; the view shows it under the head. - A copy, a shared group, a backup (StoredGroups/RestoreGroups) and sync (Mirror) carry it: they move whole Group structs. TestGroupNote checks each. Two existing GUI tests clicked rows that the extra editor row pushed under the view's foot bar at 420px in WebKit, which doesn't scroll the page's own scroller to a click: group-defaults' reach() now counts in sight as above the foot bar, and group-unlists' openAdvanced wheels the summary into view as its other helpers do. Both passed on origin/main and failed on this change before the fix. Run (on mote, at this head rebased on origin/main): - go test ./internal/provider ./internal/cli ./internal/tui ./internal/gui: ok - gofmt -l: clean; go vet ./... darwin, GOOS=linux -tags nogui, GOOS=windows: ok - GUI, chromium + webkit: group-note (en, zh, zh-TW, ja, de, and 390px), every group-*, routing-group-*, routing-groups-*, settings-groups, routing-manual, routing-save*, routing-tag-whole, fallback-group and i18n-* file: 752 tests, 752 pass Broken by hand, each red: - SaveGroup without CleanNote, and the CLI's note= without it: TestGroupNote and TestGroupNoteCLI fail on the uncleaned note. - the editor's Save body without note: group-note fails (the typed note never posted). - the pick and route-tag bodies without note: group-note fails (the note wiped by a pick). Not tried: the real TUI by hand, the real app in Linux WebKitGTK, and Windows (the change has no OS-specific code; windows vet ran). |
||
|
|
40ca0c88de |
gui: a model's price is set from the Usage page (soilzhu80 on X)
A model an agent runs is often in no provider's list, so no provider's
Model settings could price it. A model's row on the Usage page (its "…"
or a right-click) and its bar in the Sessions tab's Models card (a
right-click) now offer "Set price…": a sheet with input, output, cache
read and cache write in $ / 1M tokens, the maker's list price greyed in
the empty boxes. It sets the model's price from any provider (*/model),
the key `magpie model price '*/model'` writes, through GET/POST
/api/model-price (modelprice.go). A provider's own price for the model
still comes first. Restore default takes the price away. Sessions' stats
are forgotten on a save, so past calls are counted at the new price too.
A Sessions bar prices the id after its last "/", the id sessions'
priceOf looks up.
Run (mote): go test -run ModelPrice ./internal/gui; node --test
usage-model-price (chromium + webkit, 420px wide, en/zh/zh-TW/ja/de),
usage-clear (its menu now has Set price… above Clear usage…),
i18n-keys; gofmt -l; go vet ./... for darwin, linux -tags nogui and
windows.
Broken by hand: SetModelPrice skipped, TestModelPriceFromAnyProvider red
("set: 200 {Price:<nil>}"); Set price… taken out of the row menu,
usage-model-price red.
Not tried: a real gateway call priced after setting it in the real app.
|
||
|
|
35fb5ad1bd |
gui: Model settings searches and expands a long list (soilzhu80 on X)
A relay's Model settings, hundreds of models, was a small box to scroll
with no way to find one. A list of more than five now has a search field
in its head, matching each row's id, name and typed names (every word
typed, each anywhere), and an Expand that lets the list be as tall as its
rows while the editor scrolls. Escape clears the search before it closes
anything; a list of five or fewer has neither. The code is modelfind.js,
imported when such a list is drawn, so app.js gains one line.
Run (mote): node --test model-find (chromium + webkit, en/zh/ja/de, 420px
wide), names-fold, old-webkit, i18n-keys; gofmt -l; go vet ./... for
darwin, linux -tags nogui and windows.
Broken by hand: the modelFind call turned off, model-find red in every
language.
Red not mine: old-webkit's "styles hold up in Safari 15.0" fails on
.side-foot:has(> .nav-sub) from
|
||
|
|
b9e5f856f7 | lessons: two more guard tests red on main from untouched packages (11-10) | ||
|
|
e39ecfec8d |
plugin: the hook-chain test leaves the first hook room for the host's start
TestGatewayHookChainStillTenSeconds gave each of two hooks 8s and had
both sleep 6s. On macOS CI at
|
||
|
|
2d92221880 |
site: APINEBULA's card takes the copy APINEBULA sent
The zh text is theirs word for word; en, ja and de are translated from it (0.6折 = 6% of list price). Ran: node --test site/*.test.mjs on magpie-desktop (WSL; mote refused ssh), 107/107 pass. |
||
|
|
25c36e862a |
gateway: a relay's pooled refusal of one model rests that model, not the key (Jray05343207 on X)
Jray05343207 (Windows) connected Codex through magpie and got
"auth_unavailable: no auth available (providers=codex, model=gpt-6-sol;
last upstream error: model_not_found: The 'gpt-6-sol' model is not
supported when using Codex with a ChatGPT account." That text is not
magpie's: it is CLIProxyAPI's (sdk/api/handlers/handlers_errors.go,
enrichAuthSelectionError), a relay pooling ChatGPT accounts. It lists
gpt-6-sol whatever its accounts' plans serve, and once every account
refused it answers 503 with the last refusal in its words.
modelRefused read only 400/403/404/422, so the 503 was a plain outage:
the whole key rested on the backoff ladder, every model on the relay
with it, and the model stayed offered. Now a 5xx whose body is that pool
answer ("no auth available (providers=…; last upstream error: …)",
poolLastError) is judged by the last upstream error's own words, as a
404 would be: a model refusal rests only that model on that key
(restID), and the key's other models are asked straight. A last error of
quota, or none named, reads as before. plainUnavailable leaves such a
refusal to modelRefused too. docs/subsystems/gateway-routing.md says so.
Run (WSL magpie-desktop, Linux; mote's sshd reset every connection):
- TestPoolModelRefusalRestsTheModelNotTheKey (two keys on a relay
answering the reporter's exact body as 503) and TestPoolLastErrorRead:
pass.
- Broken by hand (the poolLastError branch removed): both red; each key
rested whole ("Why:other Status:503 By:backoff") and gpt-6-sol didn't
rest on its own.
- TestModelNotInPlan*, TestFallback*, TestEscapedWords*: pass.
- go vet ./internal/gateway for linux, windows and darwin; gofmt -l clean.
- go test -count=1 -timeout 45m ./internal/gateway: ok (1025s, Linux)
Not tried: a real CLIProxyAPI with a plan lacking gpt-6-sol (fixture is
the reporter's literal text in CLIProxyAPI's body shape); the user's
Codex still gets the 503 if gpt-6-sol is the model it asks for and no
other provider serves it, so the reply asks them to pick another model.
|
||
|
|
68cb92e8e6 |
library: name miniQ among the agents not looked at for the Library
|
||
|
|
7869a454cc |
library: the market's docker volume name is compiled on first use
|
||
|
|
987eac0aae |
gateway: a reported call keeps the model asked for and the one that answered (req, served) (#3534, realLemonawa on X)
POST /v1/magpie/usage/requests took a usage.jsonl line's fields except
req and served, and refused a record that carried them, so a call an
app reported showed an empty Requested and Served model on the
Requests page. Both are now optional fields: req is the model the app
asked for (an alias or a group of its own), served the one its vendor's
reply said answered. Each is checked as model is (a string, at most
256 characters, no control characters) and kept only as sent; a record
without served is never filled from model, so it says nothing of what
answered. The GUI already shows Record.Requested and Record.Served.
The issue's other metadata (the rest of a gateway row's columns) is
left out: only the two models were asked for by name.
Run (mote): go test -count=1 -run 'TestUsageIngest|TestReported'
./internal/gateway/ ok. go vet darwin (gateway, usage), GOOS=linux
-tags nogui and GOOS=windows go vet ./internal/gateway/ ok. gofmt clean.
Broken by hand: req and served taken out of ingestFields again;
TestUsageIngestRequestedAndServed went red ("req: not a field a
reported record takes").
Not tried: a real app reporting its calls; the full suite runs after
the tag.
|
||
|
|
720200092e |
agent: turn off an agent's own telemetry from its settings (OipsAnthony on X)
An agent with a documented telemetry switch has a Telemetry row in its
Settings on the Agents page (opened row and settings sheet). Off writes
that switch into the agent's own config the way magpie writes it already:
- Codex: [analytics] enabled = false in config.toml (feedback left alone)
- Claude Code: env DISABLE_TELEMETRY and DISABLE_ERROR_REPORTING = "1"
- Gemini CLI, Qwen Code: privacy.usageStatisticsEnabled = false
Nothing is written until the user turns it off. Off writes only keys the
file lacks and records them in the stash; a key the user set on refuses
Off and names it; one they set off stays, and the row says so. On takes
out only the keys magpie wrote that still hold magpie's value. An
unreadable config is unknown: the row says so and can't be pressed.
Agent.Telemetry is not a Field, so profiles never carry it and Unwire
leaves it. Only agents on this computer (no WSL distro, #3896).
POST /api/agents/telemetry/{id}; strings in zh, zh-TW, ja, de.
The row is paid for in the core budget with sixteen Agents-page comments
cut in app.js (core 1,532,840 of 1,533,802 after the rebase), no raise.
Run (mote, at this head on origin/main 1ad9d157f; vet, the three packages and agent-telemetry, i18n-keys, agent-details-ready, click-scroll again there, 98 of 98):
- go test -run Telemetry ./internal/agent, then go test -count=1
./internal/agent ./internal/gui ./internal/cli: ok
- go vet ./..., GOOS=linux -tags nogui, GOOS=windows: ok; gofmt clean
- GUI, chromium and webkit: agent-telemetry (34 pass: every language at
1100 and 640px, no scroll on click, no select, the user's own off,
a refusal, the sheet), and 104 agent-*, i18n-*, click-scroll,
settings-search, panel-agent and agent-settings files: reds only in
page-width-steady and mobile-web (red the same at origin/main
|
||
|
|
7c41060c2c |
provider: Qoder's mover min is 0.2.65 (plugins#930)
opencode-qoder-auth before 0.2.65 joined two tool calls Qoder streams at
one tool_calls index into one, even with their own ids and names, so the
client got a single tool_use whose input was {"key":"A"}{"key":"B"}
(invalid JSON) and neither call ran. 0.2.65 (plugins 34786eda) keeps them
apart. Raising the min lets keepMovedCurrent move every moved Qoder and
Qoder CN user onto it.
TestQoderMoversKeepToolCallsAtOneIndexApart holds both movers at 0.2.65 or
later, as the 0.2.53/0.2.54/0.2.61 floors do.
npm: `npm view --prefer-online @magpie-community/opencode-qoder-auth
version` prints 0.2.65, checked again just before this commit.
Run on mote (mote-run, at this tree rebased on 1ad9d157f; the same was green on
|
||
|
|
1ad9d157fe |
gateway: a compaction a ChatGPT-account relay refuses as system asks again with the roles as sent (#5067, acui145 on X)
Codex's summary ask to a provider that isn't OpenAI's carries its developer messages as system ones (forVendor, #2955). A plugin provider fronting a ChatGPT account (magpie-sub2api -> sub2api -> Codex backend) is such a provider, and the backend behind it takes developer alone: every compaction came back "System messages are not allowed", the sessions that got through fell to the conversation-as-text summary, and the ones whose refusal came as an error event after a 200 skipped every retry and were held after three (compactFails). Now a summary refused "System messages are not allowed" (as passed through, or as a current sub2api words it), or with a relay's bare "Upstream request failed" (the reporter's sub2api), as a 4xx or as an error event in the stream (roleRefused), is asked once more with the roles as Codex sent them (askAsSent turns off the compaction marker, whose only reader is forVendor's swap), then as text, then made by magpie. A summary with no developer message to give back is not asked the same twice. Every route a compaction reaches a Responses provider by (CodexPath, Codex's own models through magpie's accounts, the mask route, a CC Switch table) goes through codexCompact and serve's one forVendor call, so all of them are covered. #2955's chat-only vendors take system and are unchanged. Ported from ggbdpq's patch (fix/5067-compaction-system-messages, 79ec15d26), which matched only the passed-through wording on a 400. The review added the reporter's own "Upstream request failed", the error-event shape, the developer gate, lazyre for the words, and the subsystem page. Run on mote at this change on 6a253f8af; rebased onto |
||
|
|
15acba5347 |
codex: the Codex app's projects follow an account switch, and the app isn't quit unasked (Michael25651150 on X)
"切换账号 codex 添加的项目丢了 发生过好几次了 另外额度用尽时会强制重启 codex 客户端"
Projects. The Codex app (ChatGPT.app 26.1103 and on) keeps its sidebar's
projects per ChatGPT identity in $CODEX_HOME/.codex-global-state.json,
under electron-account-renderer-state-v1 ({owner, inactive:{<sha256 of
JSON.stringify([chatgpt_user_id, chatgpt_account_id])>: {atoms, globals}}}).
On an account change it parks the old identity's account-scoped globals
and loads the new one's, so magpie's switch (auth.json, then the
app-server's restart) showed an account that never had the app open with
no projects (#5497, #5602, #5702, #5874). Read from the app's own bundle
(early-bootstrap-133 selectRendererOwner, -815's owner hash). The app reads
the file only at launch and writes its memory over it, so magpie writes
it only while the app is closed (codex_projects.go): from the 3s loop once
the file, auth.json or logins.json changed (process listing at most every
30s), and between the quit and the open of every reopen (appQuitDone in
reopenBundle and restartWin). Each identity of auth.json and the saved
Codex logins whose snapshot has no local-projects key gets the project
keys of the identity with the most; an own list (an emptied one too) is
left; g-p- ChatGPT project mirrors and their ties aren't carried, and a
backing naming another account is dropped (the app refuses those). A
file without the key or that doesn't parse is not written; the first
write keeps the file as it was beside it (.magpie-before-projects).
Restart. When quota runs out magpie restarts the app's app-server (the
takeover needs it: the app reads its account only as its app-server
starts, else Send stays grey). A ChatGPT app can then show "hit a snag",
and magpie quit and reopened the whole app (CodexAppRelaunch), and on
Windows reopened an app that started no app-server (codexAppGotNone).
Both now happen only with "Restart the Codex app when magpie switches its
account back" ticked (codexRestartsApp, off by default); otherwise the
Agents row says to quit and reopen, as it did where a relaunch failed.
Run (mote unreachable all session: ssh kex reset on every try; so on the
Linux box and Windows box instead):
- wsl-run: go vet -tags nogui, GOOS=darwin CGO_ENABLED=0 go vet and
GOOS=windows go vet of internal/provider and internal/agent: ok.
- wsl-run go test -tags nogui ./internal/provider ./internal/agent:
provider ok; agent red only on TestGrokInstalled (#3548, WSL binfmt).
- win-run go test -run 'TestCodexProjects|TestCodexRendererOwner|
TestCodexApp|Restart' ./internal/provider ./internal/agent: provider ok;
agent red on TestWorkBuddyRestartOnMac (#4115) and
TestOpenMausBotRestartOnMac (added to #4115), neither touched.
- gofmt -l: clean.
- The owner hash checked against node's crypto (TestCodexRendererOwner).
Broken by hand: carryCodexProjects returning at once -> the four
TestCodexProjects* red; the snag gate removed -> TestCodexAppNotQuitUnasked
red (relaunched 1); the Windows gate removed -> red (reopened 1); the
backing strip removed -> TestCodexProjectsFollowASwitch red.
Not tried: the real Codex app. This Mac's ~/.codex state has no
per-identity key (read-only check), so the switch is reproduced against a
Go port of the app's selectRendererOwner on the issues' layout, not the
app itself. No macOS test run (mote down). The takeover (no account)
still shows no projects in the app, by the app's own rule; they come back
with the account. Projects added while the app runs reach other accounts
once it is closed.
|
||
|
|
fbc1808f28 |
gui: an omp role is one line, its thinking level the step after its model (hongzaitou on X)
omp's roles square listed each role on one model twice: its model, then "<role> thinking" on a line of its own, so nine roles ran to a long menu. Now each role is one line, "model · level" once a level is set, and its level is picked as the next step of picking its model: a model picked (the current one too, which writes nothing) opens the level slider for that role, from the state the pick answered with. Same as model and omp's own pick leave the role on no model of its own, which takes no level, so no step follows. Claude Code's tiers keep their effort lines: a tier's effort can be set while the tier follows the model, an omp role's can't. The square now opens its menu from the state as it is, not as it was drawn: a level set from it isn't drawn again until the next render, so the line still read the old level. TestCoreScriptBudget: app.js is 4 bytes smaller, the change paid for by comments cut around the tiers' and Codex subagent squares, no raise. Run (mote-run, Chromium and WebKit): omp-roles (now with zh-TW too: en, zh, zh-TW, ja, de at 1100px and 390px) 20 of 20 ok, and mobile-web, desktop-tiers, tier-effort, wsl-claude-tiers, i18n-keys, i18n-en-no-cjk, panel-effort, subagent-effort, claude-subagent-effort-row, reasonix-roles, click-scroll and claude-effort: 156 ok (before the comment cuts); at the pushed head omp-roles, i18n-keys, tier-effort, desktop-tiers and go test -run Budget ./internal/gui again. mobile-web's 8 "desktop matches origin/main" subtests fail in a mote-run copy, which has no .git for their git show, whatever the tree; its phone subtests, omp's square among them, pass. Broken by hand: the old menu (a level on its own line, no level step) makes omp-roles 10 of 10 red in Chromium. Not tried: the real omp binary reading a level written this way (the write path, omp.go's role _thinking Set, is unchanged), the tray panel by hand. |
||
|
|
5a347ca8c6 | lessons: two sub-second guards red on main eight times on 11-10 | ||
|
|
488d0f9fc2 |
cli: name /api/memory/status with the Memory tab's routes
|
||
|
|
ece12b370d |
search: TinyFish is a built-in search API (Niapyaya on X)
Niapyaya asked on X for TinyFish (tinyfish.ai) among the search APIs. TinyFish has a plain Search API beside its browser agents, so it is added as vendor "tinyfish", following Yuanbao Search ( |
||
|
|
d109ec8da8 |
agent: miniQ, its provider on magpie's gateway (xiancrong on X)
miniQ (LeadingThink/miniQ, 0.1.213) is a desktop coworker and a `miniq`
terminal, both clients of one miniq-daemon. Its model is one provider in
<data dir>/settings.json, {baseUrl, apiKey, model, apiProtocol}: the data
dir is $MINIQ_DATA_DIR, else the folder miniq-data-dir.json names, else
%LOCALAPPDATA%\miniq or ~/.local/share/miniq (macOS too).
Picking one of magpie's models writes the provider as the gateway's /v1,
magpie's key for miniQ (it sends no User-Agent of its own), the catalog id
and apiProtocol chat_completions ("auto" guesses a protocol from the model
name). What the user had is stashed whole and put back on Disconnect; the
rest of settings.json is left alone. A settings.json magpie made is 0600
and goes again when magpie steps out. The daemon reads settings.json once
and writes its copy back on every change, so a running one is told too:
settings.update over the WebSocket daemon.json names, as miniQ's own
Settings does, which also moves open chats. Notice compares the daemon's
settings.get with the file and asks for a restart when they differ.
"On magpie" is known by magpie's key, so a moved port or a proxy in front
of the gateway is told apart by Check (baseUrl and apiKey). WSL: the
distro's ~/.local/share/miniq. Icon, i18n (zh, zh-TW, ja, de), READMEs,
reference, site, MINIQ_DATA_DIR in agentenv.Vars.
Run:
- At the pushed head, rebased on
|
||
|
|
3b261932e1 |
usage: what is kept of each chunk by its serial is let go after three idle minutes
Message keys, match hints, chunk first times and heat sums are kept by chunk serial and pruned only by turns, so with no pairing or heatmap while nobody looked they stayed for the life of the process (~4 MB of message keys alone in a real history's idle heap). They are now let go once none was read for three minutes, and read again from the chunk on the next ask. Test: TestDerivedLetGoWhenIdle (kept while read, let go when idle, same answers after). Run: go test ./internal/usage on mote at this head (ok, 36s) and on the Linux box; go vet linux, windows, darwin. Broken by hand (the drop skipped): red, "idle: 3 heat sums and 3 firsts kept". Real-account copy on mote, 330s idle, both orders: hintsOf's 1.6 MB is gone from the end heap; footprint moved with run order (+10-15 MB for whichever ran second), so no footprint gain is claimed. Not tried: an idle after the Requests page was paged, where message keys are kept. |
||
|
|
77035a4429 |
antigravity: a model read as its group's week is the group's, not a pool of its own (stacofman on X)
One Antigravity account showed "Gemini … 7d" rings at 1% once per Gemini model, beside Gemini's own 7d ring at the same 1%. The account's Gemini week was used up while its 5 hours were untouched, and then fetchAvailableModels gives each model the week's reading (1% left, reset in days), not the 5 hours'. pools() compared a model's reading with its group's 5 hours only; since it differed, each model became a pool of its own (the branch for Gemini 4 Argon read apart from its group, runking on Discord), each "7 days" at the week's figure. Now a model read as any other window of its group (same share left, same reset to a minute: sameReading) draws on the group: its Pool is the group's and its Span that window's, so the card, the menu bar rings and PooledWindows show the group's 5h and 7d once. A model read apart from every window of its group is still a pool of its own (runking's Argon case unchanged). Antigravity is the only provider with pools(). Run (mote): go test ./internal/provider ok; gofmt clean; go vet darwin, linux -tags nogui, windows ok; node --test quota-pools and window-cap-pool (chromium + webkit) 44/44. Broken by hand: without the new branch, TestAntigravityQuotaModelsReadAsGroupWeek fails with every model in a pool of its own and the pooled list showing a "… · 7 days" per model, as in the screenshot. Not tried: a real account with a used-up week; the fixture is built from the reporter's screenshot (Gemini 5h 100% left, 7d 1% left), not their bytes. |
||
|
|
f2b9ec354a |
gateway: Codex's auto-review goes on where its conversation does when the sign-in is out (riverleaf88 on X)
riverleaf88 on X: with Codex's ChatGPT allowance spent and magpie routing Codex on to another model, Codex's automatic review still failed. Codex's guardian (codex-rs guardian-v2 sync_reviewer) asks the same provider, so magpie's /backend-api/codex/responses, on codex-auto-review (approval_review_preferred_model) with x-openai-subagent: guardian. On a spent sign-in codexFallsBack and serve's groupsAfter looked for fallbacks and routing groups of codex/codex-auto-review, a model no group names, so the review was handed ChatGPT's 429 while the conversation's turns went on to the group. - codexReviewAfter: an auto-review on the codex sign-in takes the model its conversation's own turns go on (codexLeads). A codex model brings that model's fallbacks and groups (fallbacksOnly on the lead too); a magpie model the caller may use (servedSession) is tried itself. codexFallsBack and groupsAfter add them. - codexHolds: once a 429 naming a reset held the account, later turns (main turns too) were answered with the held refusal before any fallback. The held branch now hands a /responses turn with fallbacks to codexFallBack as the first spent turn was. - docs/subsystems/gateway-routing.md says both. Run (mote): go test -count=1 -run 'TestCodexReviewSpent|TestCodexHeld| TestCodexOneAccount|TestCodexSpent|Hold|Held' ./internal/gateway/ ok 71.2s; gofmt -l clean. New tests red on the old code: TestCodexReviewSpentFollowsTheGroup and ...FollowsMagpieModel (review got 429 usage_limit_reached); the held case in TestCodexHeldTurnFollowsTheGroup. Broken by hand: codexReviewAfter returning nil turns TestCodexReviewSpentFollowsTheGroup, ...FollowsMagpieModel and TestCodexHeldTurnFollowsTheGroup red; dropping the held-branch fallback turns TestCodexHeldTurnFollowsTheGroup and ...FollowsTheGroup red. Not tried: a real exhausted ChatGPT account; guardian-v2's async scorer; the multi-account pool path past serve's candidate loop is covered only through the one-account tests. Also run (mote, at this tree): go vet ./internal/gateway/ for darwin, GOOS=linux -tags nogui and GOOS=windows: clean. go test -count=1 -timeout 45m ./internal/gateway/: ok 1037.9s (base |
||
|
|
286e3b6d5f |
gui: the tray panel's Usage tab puts a vendor's account first from its count (RealZeroP27 on X)
RealZeroP27 asked to switch the Codex account in use from the menu bar panel's quota page, not from the Providers page. A vendor group with several accounts on the panel's Usage tab now draws its count as a button (the count and a chevron). It opens the app menu (openProtoMenu) with the accounts the provider editor can put first, the first one ticked, and Manage accounts… at the foot, which opens the window's Providers page. Picking one does what the editor's Make first or Use does, through the same code: putFirst, now shared by the editor and the panel. Kept signed in to one, that is provider/arrange with the account first in the order; otherwise login/switch. The first account's card gets a small tick. It works for any subscription with several signed-in accounts (Codex, Claude, a plugin's), not only Codex. Setup-token, access-only and lapsed accounts are left out, as in the editor; kept signed in, so are paused or off ones. A vendor with one account that can be first keeps its plain count. The panel's provider list (panelAccts) is now also read when the Usage tab has two accounts of one vendor, one read at a time. The menu reads a fresh list first when only the kept one is drawn. pluginSubs falls back to that list, since the panel has no window list (it threw on null before). Budget: the menu is in panelfirst.js, loaded when the count is pressed, and the Allowances tab's arranging (panelArrange, hidePanelUsage) moved out to panelarrange.js, loaded when Arrange is pressed. That pays for the rest with no comments cut and no raise (#5918); the core is at 1,533,604 of 1,533,802. old-webkit's lazy list names both files. Run (mote, at this change on origin/main 662546e78; rebased after onto |
||
|
|
55b0d7c24e |
gateway: a test that agy on magpie's Antigravity uses every account that is on (leoooeth on X)
leoooeth asked for several Antigravity accounts in agy. It already works: agy is started on magpie's gateway with a custom model magpie/antigravity/<model>, and the gateway spreads it over every Antigravity account that is on, passing over a spent one, as for any other agent. No test held that for agy's own route (Gemini's API with the agy key), so this one does: two accounts, the first 429 out of quota; both turns answer from the second, and the second turn asks it first. Run (mote): go test -count=1 -run 'TestAgyUsesEveryAntigravityAccount|TestAgyAgent' ./internal/gateway, ok. gofmt -l clean. Not tried: real agy with two real Antigravity accounts. |
||
|
|
662546e78d |
usage: a cache hit rate reads 100% only when all of the prompt was cached (ZhangXiaof48473 on X)
Routing's request list showed "缓存 100%" for Codex requests of 77.5K
tokens that read 77,200 of them from the cache (99.6%), beside rows at
99%, and the route line said "请求缓存命中率 99%". Every hit rate was
Math.round(100 * h) + "%", so anything from 99.5% up read 100%.
One formatter now says every hit rate: hitPct(h, d) in app.js, whole
percents (d decimals) unless rounding would say 100% or 0% of a prompt
not all or none cached, then one or two decimals (99.6%, 99.95%; never
past 99.99% or under 0.01%). Its callers: Routing's request rows, their
route line and a session's Avg. cache (plugins/routing/client.js); the
tray panel's Cache hit rate and the ranking rows' hit rate (app.js); the
Usage page's tiles, agent rows, Requests table, request detail and its
KPI strip, which keeps its one decimal (plugins/usage/page.js); the
context card's Prompt cache and the session traits Cache-friendly,
Cache misses and Cache hit (context.js). The TUI's and CLI's sessions
line, which floored the integer, use usage.HitPct, the same rule in Go;
it rounds now, so the TUI test's 67% (25.2K of 37.3K, 67.6%) reads 68%.
No new strings; app.js pays its bytes with six ledger comments cut, so
the core scripts are 15 bytes smaller than at its parent, no raise. Main
is over the core budget already (1,534,476 > 1,533,802 at the parent,
#5918); this commit doesn't add to it.
Run on mote:
- new internal/gui/tests/cache-hit-pct.test.cjs (Routing rows 99.6% /
100% / 99%, the route line, hitPct at its edges) in chromium and
webkit, en and zh: green; with the escalation line removed by hand,
red (99.99% where 99.6% is wanted).
- cache-hit-pct, panel-usage, context-window, i18n-keys, usage-ledger,
tray-totals, ctx-route, ledger-cache-hit, usage-hit-rate,
routing-request-metrics (both engines; ledger-cache-unknown and
ledger-cache-tokens in an earlier run): 186 pass, 6 red, all in
usage-ledger's 'newest live route needs no return-to-live button',
red the same on origin/main
|
||
|
|
5a02bf8c14 |
agent: mu, Pi with a judgment kernel, wired in ~/.mu/agent (xteam3301 on X)
mu (github.com/qybaihe/mu, npm mu-agent, the mu command and the mu
desktop app) is Pi 1.4.0 with a judgment-kernel extension. Its
kyrn/bin/mu.mjs starts Pi on its own agent folder, so Pi's settings.json
and models.json live in ~/.mu/agent, and the desktop app runs the same
Pi on the same folder. magpie now wires it as it wires Pi.
- agent: mu (piLikeKeyed). Its folder is found as mu.mjs finds it:
$MU_AGENT_DIR, $KYRN_AGENT_DIR, $MU_CODING_AGENT_DIR,
$KYRN_CODING_AGENT_DIR ("~" expanded), else ~/.mu/agent, or
~/.kyrn/agent while ~/.kyrn is a folder and ~/.mu isn't. Its requests
say pi/<version>, so the provider's key magpie-mu names it. The alias
is mu-agent. Its judge (~/.mu/mu.json) is left alone.
- `mu` is also maildir-utils' command (brew, distros). A mu on PATH
that neither is nor names mu.mjs / mu-agent is not taken for it
(notMuAgent).
- Gemini models stay on Chat for mu, as for Pi and StepCode (piAsked).
- WSL kind at ~/.mu/agent (found by its folder, not the command); CLI
update through npm mu-agent; the desktop app (io.github.qybaihe.mu,
mu.app, %LOCALAPPDATA%\Programs\mu\mu.exe, /opt/mu).
- agentenv and appdir know the four variables.
- library: mu's AGENTS.md / AGENTS.override.md, its mcp.json (Pi's
native format) and skills in its folder; it reads ~/.agents/skills.
- GUI: a one-tone icon. Default in its model picker says it clears the
default and mu picks one itself (PICKS_ITSELF).
- docs: READMEs, reference.md, agent-wiring.md.
Run (mote, at this tree before the rebase):
- gofmt -l internal/ clean; go vet darwin, GOOS=linux -tags nogui and
GOOS=windows of agent, library, appdir (and agentenv on darwin): clean.
- go test -count=1 ./internal/agent ./internal/library ./internal/appdir
./internal/agentenv ./internal/usage: ok (agent after its maildir
fixture stopped using testenv.Program, which refuses a non-script).
New: TestMu, TestMuDir, TestMuNotMaildirUtils, TestMuTarget; mu added
to the handwired, spelled, Pi scope, scope-gone and Gemini-on-Chat
lists.
- Windows (win-run on xiaomi-gpu): go test -run 'TestMu|TestPiScope|
TestScopeGone|TestHandwired|TestSpelled|TestPiFolderKeepsGemini'
./internal/agent ./internal/library ./internal/appdir: ok.
- Real mu-agent 0.3.9 (Node 22.22.0) on mote in a sandbox HOME, a
sandbox gateway on 47822 over a fake OpenAI upstream: `magpie agents`
found mu with the user's deepseek model; `magpie mu magpie/fakeup/m1`
wrote defaultProvider magpie and providers.magpie with key magpie-mu,
keeping the user's deepseek provider; `mu -p ping` answered "pong from
fake upstream" (upstream saw POST /v1/chat/completions, model m1,
UA pi/0.3.9); `magpie usage today` counted the call under agent mu;
`magpie mu default` put settings.json and models.json back byte for
byte (cmp).
- GUI, chromium and webkit: pi-default-note (with mu added),
icon-one-tone, icon-tile, mono-icon-redraw, routing-client-icons,
usage-agent-filter-icons, i18n-keys, i18n-en-no-cjk, agent-connect,
agent-models, agent-layout: 88 of 88.
- Rebased onto
|
||
|
|
4c5b894891 | lessons: a size budget that counts comments is met by deleting them (#5918) | ||
|
|
1b2ad557fb |
agent: Alma or OpenHanako uninstalled is turned off without opening it first (aooo_han on X)
aooo_han connected Alma, uninstalled the Alma app, and then couldn't turn Alma off in magpie: it said "Alma isn't running - open Alma and try again". Alma's settings are reached only through its local API, so an app that is gone could never be turned off. - Alma: when the API is down and Alma isn't installed (macOS bundle, Windows install folder or registered guid, Linux /opt or desktop entry, or alma-server on PATH), turning it off clears magpie's own record and remembers a takeout (alma.takeout in the stash). Alma's providers live in its SQLite database, so magpie doesn't edit its files. If Alma comes back, the next Sync takes magpie's provider and default model out of it, then forgets the takeout. Turning Alma on again forgets it too. An installed Alma that isn't running still says to open it. - OpenHanako (the sibling with the same need: a sealed catalog it rewrites only while running): uninstalled, the model in its config file goes back to the user's own and the sealed provider entry is left alone, instead of errSealed. - An app in the Trash, as a Mac app is uninstalled, still shows up in Spotlight. spotlightBundles now skips ~/.Trash and /.Trashes paths. Run: go test -run 'Alma|Hanako|InTrash' ./internal/agent and the whole internal/agent package (wsl-run, since mote's sshd refused connections); go vet for darwin, linux (nogui) and windows; gofmt. e2e in a sandbox HOME on WSL with no Alma: on origin/main `magpie alma default` printed "Alma isn't running - open Alma and try again"; with this change it prints "Alma model default", exit 0, and the list shows Alma off. Broken by hand: without the Alma branch TestAlmaOffUninstalled fails with "isn't running"; without the Hanako branch TestHanakoSealedUninstalled fails with errSealed; without the Sync takeout magpie's provider and default model stay in a returned Alma; inTrash returning false fails TestInTrash. Not tried: a real uninstalled Alma on macOS or Windows (the live Alma is the owner's); a reinstalled OpenHanako doesn't get its sealed provider taken out (its Sync is skipped once hand-wired); an AppImage OpenHanako isn't detected as installed. |
||
|
|
00e8242e85 |
library: Hermes folds its context with billion-context through its /bili/ prefix (Duckb7si on X)
Library › billion-context said no agent could use it on a machine where
Hermes was connected to magpie. Hermes was left out of the lanes on
purpose: bili's native Hermes plugin (hermes-plugin/__init__.py,
apply_env, billion-context 0.1.213) only sets HTTPS_PROXY, HERMES_CA_BUNDLE
and SSL_CERT_FILE. magpie's Hermes provider is http://127.0.0.1:3425/v1,
plain http on loopback, so that proxy never sees it: the plugin would add
its tools and fold nothing.
Hermes now takes the route Zed takes, bili's documented /bili/ prefix.
Turned on, magpie runs `bili start --port 8787` and sets base_url of the
magpie and magpie-anthropic providers to http://127.0.0.1:8787/bili/<gw>,
in config.yaml and in every profile that has magpie's provider
(agent.HermesThrough). Each later Sync or pick keeps a loopback prefix
with a path (hermesPrefix), and drops anything else back to the gateway.
Turning it off puts the gateway back. The empty-list string, docs (en, zh,
ja), llms-full.txt and docs/subsystems/library.md name Hermes.
The other agents bili supports that magpie wires (dsh, Kimi, ZCode, Codex,
Gemini, Qwen, ...) are #5915.
Run (mote, at the rebased head unless said):
- go test -tags nogui ./internal/library: ok (252s) at the rebased head
- go test -run 'TestHermes|TestZed|TestProxy|TestBili|Kept'
./internal/agent ./internal/library: ok before the rebase (base
|
||
|
|
d3f8623408 |
library: a market docker server's options stay inside the container
|
||
|
|
cec267f902 |
gui: a field's long explanation shows on asking, in the editor and Routing groups (yujezhang on X)
yujezhang on X (11-10): "现在界面好多描述都太繁琐了 ... 界面只保留完成
操作必需的信息". The longest always-visible lines left were in a
provider's editor (100 to 666 characters a field) and Routing groups'
settings (69 to 318). They now work like Settings' rows since 11-02:
with a mouse, the explanation rests out of sight and the row's hover
(450ms) or keyboard focus shows it in the shared .set-hint card. A touch
screen keeps every line. No layout moves, no new page, no info icon
(the owner chose hover on the row for Settings).
Removed or moved:
- Routing's empty caption ("Every request an agent sends to magpie
shows up here, routed for real.") is gone from the empty state: the
mode line above it says the same. The key stays, the panel uses it.
- A provider editor field's explanation (.fld > .hint.expl): Headers,
Certificate, Compaction, the routing and rate-limit fields and the
rest: in the card. A line with a link or control in it, a warning and
an error stay in sight.
- Two fields keep one short line in sight for what turning them on
costs: Certificate ("Turn it on only on a network you trust.") and
Compaction ("A conversation compacted this way continues only on
this provider and account."). New keys in zh, zh-TW, ja and de.
- The editor's own settings rows (.prov-prefs: warm-up, check-in,
resets) hide their lines as Settings' do; a result line (.say) stays.
- Routing groups: Found, Names and the three defaults' small lines: in
the card. The no-names line stays.
- settingshints.js listens on document, so the editor (in #modal) and
Routing get the card; the card grows from its row in 150ms, strong
ease-out, a fade alone under reduced motion.
A line held out of sight is position: absolute in its field's box
(.fld and .hint-row > .txt are position: relative): placed against the
page, deep in the editor's scroll, it grew the page a scrollbar and
made the editor 10px narrower, and account-weight's de 390 in WebKit
ran an account line 3px past its row. Its sr-only -1px margin is
dropped, so it no longer sits 1px left of its row (warm-at-times,
warm-now and checkin-now-account check every .sub is inside its row).
Tests:
- New editor-hints.test.cjs (chromium + webkit, en/zh/zh-TW/ja/de,
1100 and 420): at rest the explanation is out of sight and still
described; Certificate's lead is in sight on one line; a hover shows
the card with the text, inside the window, not over the name, nothing
moving, taking no pointer; leaving hides it; Tab onto a field shows
it; every out-of-sight line is placed in its own field; Routing
groups' lines the same. 42/42 with account-weight on the Linux box.
- Broken by hand: the hide rule replaced and ROWS without the editor
and groups: 0/20 red. The position: relative rule removed: 20/20 red
(the placement check), then restored.
- vertex-editor: a hint resting out of sight isn't "cut".
group-found-off: rows carry hint-row.
- 271 GUI files (every editor/edit= test, hints, visibility, prov-prefs,
rt-gset/rt-cap, i18n-keys, old-webkit) in both engines on the WSL box
(magpie-desktop), mine against a copy of
|
||
|
|
6a253f8af7 |
memory: pick several memories and keep, archive or delete them at once (RealZeroP27 on X)
Library -> Memory reviewed one memory at a time: To review held
candidates that had to be opened and kept or deleted one by one.
- Select (beside the filters, shown when two or more are listed) puts a
box on each memory. A click picks one, Shift-click the range from the
last one clicked, up/down move between the boxes (Shift picks as it
goes), Cmd/Ctrl+A picks all shown, Escape ends it. A search or filter
unpicks what it hides.
- The bar under the list (the library's lib-pickbar, as Skills' Select)
keeps (To review), archives (In use) or restores (Archived) the picked
ones, and deletes them on a second click.
- POST /api/memory/status {ids, status}: memory.SetStatus changes them in
one write, each as Edit by the user (an archived inferred memory is
dismissed, so it isn't proposed again). Unknown ids are skipped; none
found, or a bad status, is a 400 and changes nothing.
Delete reuses POST /api/memory/remove {ids}.
Run (mote, at this head):
- go test ./internal/memory ./internal/memdistill ./internal/library: ok
- go test -run 'Memory|Distill|Dream' ./internal/gui: ok
- go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet
./..., and the three builds: ok. gofmt -l: clean.
- library-memory-select.test.cjs (new): 22/22, chromium and webkit,
en/zh/zh-TW/ja/de at 980 and 420 wide (no native select, no sideways
overflow).
- Every library-*, i18n-* and gui-* GUI file (67), both engines: 1309 of 1309 pass.
- Rebased on
|
||
|
|
93a33d8174 |
agent: OpenBot's icon, its requests named its own, its skills in the Library (SSNQT on X)
SSNQT on X, magpie 0.1.3503 on macOS, OpenBot (
|
||
|
|
2219fdd49e | lessons: a searched-for word a port or id can spell, seen again (#5616) | ||
|
|
902237b325 |
gateway: TestSearchAPIFailureKeepsNoURL's comment names the route_id too (#5616)
On 11-10 ubuntu CI (run 42771382484, at
|
||
|
|
17b9b5b031 |
gateway: TestSearchAPIFailureKeepsNoURL's query has no number a port can hold (#5616)
Fixes #5616 Ubuntu CI run 42368406605 failed it: "the query's "4410" is in usage.jsonl", where the only 4410 was the fake server's random port, host 127.0.0.1:44105. The row rightly logs the host, so a query word made of digits matches the port now and then. The query is letters only now, as |
||
|
|
6fa9ff8358 |
library: billion-context's version is read past the warnings bili prints first
readBili ran `bili --version` with stderr and took the output's first word. bili writes its warnings to stderr before the version; with a config key it doesn't know (models, in a sandbox HOME on mote, bili 0.1.213) the output began "2026-11-09T23:44:06.211 [warn] [v=0.1.213] ...", and that timestamp was the card's version. biliVersion takes the first word of the first line that is a version. Run: - go test -tags nogui -run 'TestBili' ./internal/library on mote: ok. - go vet ./internal/library for darwin, GOOS=linux -tags nogui and GOOS=windows: ok. gofmt -l clean. Broken by hand: readBili and the test back on the first word of the output: TestBiliVersionPastItsWarnings red (the timestamp, "[warn]", "command"). Not tried: the card showing it in the GUI (the field is the same string the card already prints). |
||
|
|
97fcbe3540 |
library: billion-context's card shows the tokens it saved (Scott__D on X)
The RTK tab says what RTK saved (rtk gain); the billion-context tab said nothing of its effect. bili 0.1.213 has no command that prints its savings. Its running proxy serves its dashboard's numbers at GET /__bili/overview, summed over every session in its one store, and each bili that runs registers in <state>/instances/<id>.json ($XDG_STATE_HOME or ~/.local/state, then billion-context, on every system; read from bili's dist and its Hermes plugin's twin reader). readBiliSaved (internal/library/bili_saved.go) asks the registered bilis newest first, loopback http origins only, 3s in all, and puts the first answer on BiliView.Saved: netSavedTotal (bili's headline "net savings", after post-fold rebuilds and the summaries' cost, only with hasFoldData), grossSavedTotal (which bili calls an upper bound), foldsTotal, sessions, requests. The answer is kept in bili-saved.json in magpie's config folder and shown "as of" its time when no bili runs; a kept file that doesn't parse is no answer. magpie never starts a bili to ask (it would auto-update and start watchers). The card says "166.3k tokens saved over 7 folds in 1 session", bili's own count over every session on this computer, the gross before costs; "Nothing folded yet over N requests" before a fold; and that it shows once bili has run when no bili ever answered. zh, zh-TW, ja and de; site docs (en, zh, ja) and docs/subsystems/library.md. Run: - Real bili 0.1.213 on mote in a sandbox HOME (ACP_AUTO_UPDATE=0, 20000 token window, bili start on 18799, a fake OpenAI upstream answering usage = bytes/4): ten turns of a growing conversation through /bili/<upstream>/ gave overview net 166285, gross 166390, 7 folds, 1 session, 10 requests. That literal answer is the Go fixture (testdata/bili/overview-0.1.213.json) and the GUI test's numbers. readBiliSaved/ReadBili run on mote against that live bili with that HOME read the same numbers (Live true, Version 0.1.213). - go test -tags nogui ./internal/library ./internal/gui on mote: ok. - win-run go test -run 'TestBiliSaved|TestBiliLoopback' ./internal/library on xiaomi-gpu: ok. - library-bili, i18n-keys and i18n-en-no-cjk in chromium and webkit (every language, 1100 and 420 wide): 92 pass, 0 fail. - gofmt -l clean; go vet darwin, GOOS=linux -tags nogui and GOOS=windows for internal/library and internal/gui: ok. - site/public/llms-full.txt regenerated (node llms-full.mjs); site worker.test.mjs: 38 of 38 ok. Broken by hand: - the loopback filter taken out: TestBiliSavedFromRunningBili red (192.0.2.7 asked first, the 3s budget gone, nothing read). - net read from tokensSaved, and a kept answer marked live: TestBiliSavedFromRunningBili and TestBiliSavedOnThePage red. - the card's line taken out: library-bili 40 of 42 red (chromium). Not tried: a real agent session with a real model through bili (the upstream was a fake with made-up usage, so only the plumbing of bili's numbers is checked, not how much a real session saves); a bili with money data (hasMoneyData; its dollars are passed as usd but not shown); the card on Linux WebKitGTK. |
||
|
|
eff7f9f62a |
library: a market server starts the way its registry entry says (fwxkogaia on X)
Serena from Library → MCP's market showed "已退出 (2)": magpie ran `uvx serena-agent`, which prints its help and exits 2. The registry has uvx run it as `uvx -p 3.13 serena-agent start-mcp-server --project-from-cwd --context desktop-app`: its runtimeArguments, which the shipped crawl (market_servers.json) had dropped and magpie never read. The class, fixed in launchLine (market_launch.go): - runtimeArguments are read: the runner's own options (uvx -p/--from/ --with/--prerelease, npx --package, docker's mounts, -e and --entrypoint) go before the package, the program's words after it, then packageArguments. A required option with no value magpie can fill keeps the package from being offered. - An executable not named after its package is reached with `uvx --from <pkg> <bin>` / `npx -y --package <pkg> <bin>`. The crawl now keeps each package's executables (`bins`: npm's `bin`, the wheel's console scripts); a package with none, or several with none standing out (pickBin), isn't offered. `python -m mod` among runtimeArguments runs that module from the package. - One package that can't be started no longer hides another of the same server (npm, then pypi, then oci). - serverKey/packageOf skip uvx's option values, so Serena's key stays "uvx serena-agent" and an installed one is still found. Audit of the 500 shipped entries (old line → new): 101 change. Among them firebase (`npx -y firebase-tools mcp`), basic-memory, docling, ouroboros, pm-claude-skills, llm-sandbox, polymarket-paper-trader, visualtorch, canvas-mcp, alfanous (python -m), uniswap, pyscrappy, llmtrim, reddit-research-mcp, word-mcp-live, omega, tinysearch, haiku-rag, orcareplay, terravision, watch-skill, PyMemoryEditor, edgartools/mirobody/new-term-radar/backlot (--with/--python), docker robin/funasr/MARM (mounts). No longer offered (no line that starts): aihawk and mcp-sap-docs (not on PyPI/npm), mcp-video, unifi-mcp-server, antigravity-link-extension (no executable), token-savior, flyto-core (several, none for MCP), maintenant and apollo (a docker mount to fill in). Users who installed one already: heal() gives a uvx/npx server whose command and arguments are exactly the line magpie offered before the line the registry says (healMarketLines), so the next start of magpie rewrites library.json and every agent given it. A line the user edited is left as it is. Run (mote, via mote-run): go test ./internal/library ./internal/gui; go vet darwin, GOOS=linux -tags nogui, GOOS=windows; gofmt. TestRegistryLaunchLines uses the registry's own entries (Serena, docling, olcli, alfanous, visualtorch, basic-memory, firebase, MARM, ...); TestPopularSerenaStarts reads the shipped crawl; TestInstalledMarketLineHealed seeds `uvx serena-agent` given to Codex, syncs, and checks config.toml and library.json. No network in tests. Real starts on mote in a sandbox HOME (MCP initialize): `uvx serena-agent` exits 2 with usage; the new Serena line answers initialize (serverInfo Serena). Also answer: polymarket pm-trader-mcp, basic-memory, llmtrim, pm-claude-skills, visualtorch-mcp. canvas and reddit start but need their keys. Broken by hand: ignoring runtimeArguments and the bins check turns 14 of TestRegistryLaunchLines' cases and TestPopularSerenaStarts red; dropping healMarketLines from heal turns TestInstalledMarketLineHealed red. Not tried / still wrong upstream: omega and tinysearch now run their real executable but their registry entries omit the `[server]` extra (omega also needs `serve`), so they still don't serve MCP; that is their registry entries. Docker lines weren't started. No GUI asset changed, so no GUI files were run. The full suite runs after the tag. |
||
|
|
0ecba163b6 |
gui: the core scripts back under their budget after d374168d0
|
||
|
|
710a290e26 |
sessions: every session file's parse is let go three minutes after its last read
The parses of every session file (the sessions index, kept on disk as sessions.json) stayed in memory for the life of the process after one visit to the Sessions or Usage page, or the start's warm-up: ~23.5 MB of a 68 MB idle heap for a real history of 24.6 MB on disk. Now, once nothing has read them for cacheIdle (3 min), they are let go and the next read loads them from sessions.json, with no session file read again. They stay while a refresh is reading files, while glances are overlaid, while a save is not on disk yet (it is hurried first), and when the last save failed (writeCache now records that), so a let-go never means parsing a long history again. Measured on mote (macOS) with a copy of the real accounts, idle, no asks, 330 s, t51 = origin/main before this, t52 = this: footprint at the end 111 MB -> 96-100 MB Go heap at the end 68.05 MB -> 46.15 MB (decodeCache's 23.5 MB -> 0) Reads after 200 s idle (t52 had let go; t51 had not): /api/sessions 0.28 s -> 0.54 s /api/sessions/stats 0.19 s -> 0.36 s process CPU over the run 4.03 s -> 4.40 s A warm read is unchanged (0.24 s / 0.01 s). Run: go vet ./internal/sessions (darwin; windows and linux with CGO_ENABLED=0); go test ./internal/sessions ./internal/gui ./internal/usage on mote, all ok. TestIdleParsesLetGoAndComeBackFromDisk broken by hand twice: dropping the failed-save guard (red: "let go while the last save had failed") and not clearing the cache (red: "idle parses kept"). Not run: the full suite; Windows and Linux runs of the package. |