e5994a0159e88dbcfbb04f8b587b8b7fee3a9c19
3479
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d628a1c803 |
settings: Automatic updates' hover card says why an update can be trusted
ArcticLampyrid on X asked for Settings to say why automatic updates are safe. Two lines now join the Automatic updates row's explanation. Like every Settings line, they show only in the row's hover card (or on focus, or inline where there is no hover), and a small info mark goes on the row's name where there is hover. There is no new section or row. - Every update is signed: its SHA-256 checksums carry an ed25519 signature, checked against a key built into magpie (internal/update/signed.go). - Its SLSA build attestation, signed through Sigstore, is checked too: it shows magpie's release workflow on GitHub built those exact files. An update that fails a check is not installed (internal/update/attest.go). The lines are added by updatetrust.js, a module settingshints.js loads on demand. It watches #about and adds them each time About is drawn. They live there and not in app.js because the core scripts' budget (TestCoreScriptBudget) has no room. old-webkit's list of on-demand scripts names it. Translated in zh, zh-TW, ja and de. update-auto.test.cjs: at rest the two lines are out of sight; hovering the name shows the card with the row's line, "ed25519" and "Sigstore"; the mark is there; and the card goes once the pointer leaves. The existing check of the switch's own line now reads the first line only. Run (mote-run, at this commit rebased on |
||
|
|
b05a525a33 |
update: Restart to update goes into the download waiting when downloads are automatic
canlee886 on X: auto-download had a version ready, but magpie releases
many times a day, so by the time they pressed Restart to update a newer
one was out. The click asked the feed (coeo91's "take the newest") and
downloaded the newer one whole while they waited, which made the
download done ahead of time useless ("这个自动下载在如此频繁的更新之下
简直就是摆设了").
Two ways to fix it: keep the staged copy current (check more often,
download each newer one), or restart into the staged copy and let the
next check fetch anything newer. This takes the second:
- the restart is at once, which is what the download ahead of time is for;
- no more bytes from R2 than before: one download per update. Keeping
the copy current would download 40 to 95 MB per release, several times
a day, which iiiiiimone's fix (the clock leaves the one waiting) took
out;
- the new version's first clock check, 5s after it starts, fetches
anything newer in the background, and the next restart goes into that.
So with downloads automatic (the default), recheck leaves a ready
download alone and doesn't ask the feed (keepsStaged). That covers the
page's Restart to update, the tray's restart, and Restart when idle.
The notes dialog's freshen (#910) still asks the feed for late notes
(#649), but with `keep` set it leaves the staged copy as the clock's
check does, so the dialog names the version the restart goes into.
With "Download updates automatically" off, nothing changes: a click asks
the feed and downloads the newest (coeo91).
Tests: TestRestartTakesTheDownloadWaiting (new) covers the page's click,
the tray's restartAsked, AutoRestart's waitIdle and a stale freshen. Each
keeps 0.1.11 with one download while the feed has 0.1.12, and a later
check takes 0.1.12. The coeo91 and #910 tests now set NoAutoDownload
(downloadsOnClick), the behaviour they guard.
TestUpdateClockLeavesWaitingDownload and TestUpdateNotesAskTheFeedAgain
expect the staged copy kept under auto-download.
Run (mote-run, at this change rebased on
|
||
|
|
f9ad4122bb |
providers: Compact at's size chips set several models at once (Yanzhongixuy on X)
A Compact at chip (128K, 200K, 272K, 500K, 1M) opens a menu of All
models and each served model, with the ones at that size ticked.
Ticking one gives it that size, unticking takes it back; the menu stays
open, so several models get one size in a few clicks. Context window
and Max output chips keep setting every model at once, as before.
The three fields' chip rows are now one helper, sizePicks, which keeps
app.js and the core script inside their budgets without a raise. Menu
strings (All models, Compact at {n}, Search models) already exist in
every language.
Run at
|
||
|
|
ea3edd4b13 |
routing: an account's share names its window when more than one counts the model (Wing8Aqua on X)
On the Routing page, under In turn, each account showed its week's share
("41% used") while its five hours were at 0%, and read as the five-hour
window. The row's share is Allowance.For's, the fullest window's, and
that is the one routing goes by: In turn rotates without weighing usage,
and sets an account aside only when a window reaches 98%, so the week at
98% stops it with the five hours empty. The number was right; it didn't
say which window it was.
Allowance.FullestName gives the name of the window the share is of when
two or more windows count the model (empty for one, as before). The
gateway puts it in Weighed.usedWindow, and the Routing row puts its short
form in front: "7d 41% used" (zh "7d 已用 41%").
Run (mica, -tags nogui): go test -run 'Fullest|UsedWindow|UsedRenews|Weigh'
./internal/provider ./internal/gateway ok; go vet darwin, linux, windows
on provider and gateway ok; gofmt clean. GUI (mote): the new
routing-used-window.test.cjs, 22 of 22 in chromium and webkit, en, zh,
zh-TW, ja and de, at 1100px and 420px; routing-*, i18n-keys, gui-zh-tw, gui-ja and
gui-de: 3234 of 3253; the reds are gui-de/gui-ja (fixed in this push's
sessions commit) and routing-context-fold, pin-away, row-swap, signin and
story-shrinks, red the same on a clean origin/main
|
||
|
|
ba60e2e7f4 |
sessions: de and ja name the uninstalled agent once, as the English does
fe20e4dbd's "{agent} isn't installed here…" has {agent} once; its German
and Japanese said it twice, so gui-de and gui-ja's placeholder check was
red on main. The second mention is now "seine eigenen Dateien" and
"そのファイル自体".
Run (mica): node --test gui-de, gui-ja, i18n-keys, sessions-forget: 20 of
20 pass. Before: gui-de and gui-ja "de/ja has every zh string" red on a
mote run of this branch.
|
||
|
|
dc1f17c1c8 |
library: RTK's chart says its top number is the busiest day, not a total (jasonchia58 on X)
jasonchia58 on X (macOS, v0.1.3119): the number at the top right of Library → RTK's chart (1.6M) stopped changing, while the total under the chart kept growing. That number is the bars' scale: the busiest day's (or week's) input in the range, shown bare since |
||
|
|
d21cb563e9 |
sync: Copy setup gives the sync setup as text, sealed with the passphrase (WJaunita45604 on X)
Setting sync up on a second computer meant typing the server, user, password (or S3 keys, or GitHub token) and every tick again. Settings › Sync's form, with sync on, now has Copy setup. It copies one line, `magpie-sync:…`, to paste into the same form on the other computer. - The line is not base64 of the settings. It is the setup (server, password or token, endpoint, region, path style, branch, the ticks) sealed with the sync passphrase by backup.SealData, the AES-GCM and PBKDF2 envelope the server's file already uses. The passphrase is never in it. Whoever has the line and not the passphrase has nothing. The copied note says what it holds and that the same passphrase opens it. - Pasted into any field of the form, the line is not typed in; the form asks for the passphrase, opens it (POST /api/davsync/setup-open), picks WebDAV, S3 or GitHub from its address and fills every field and tick. Nothing is saved until Turn on, and Turn on opens a pasted line first. A wrong passphrase, or text that isn't a setup, is said in the reader's language. A line a chat wrapped, or text around it, still opens. - Not built: GitLab or MySQL sync backends. Run (mica): - At the pushed tree (run as 8fadc2ef8, the same tree before these bodies): go test ./internal/gui ./internal/davsync ok; sync-setup-text, i18n-keys and i18n-en-no-cjk in the 110 of 110 the commit before names. At the base |
||
|
|
a44da380b9 |
providers: a vendor's setup pasted in any form fills the custom provider (WJaunita45604 on X)
|
||
|
|
e4ea313215 |
context: the last-cache fix fits the core script budget again
|
||
|
|
2f22cc7e80 |
redact: Settings › Privacy's masking rules are imported in bulk and copied out (hgk0x on X)
hgk0x on X had many fields to mask, and adding custom rules one at a
time was slow. The Masking rules row now has Import… and Copy beside its
words, as the word lists have:
- Import… opens a box under the row's fields. One rule a line: a name,
then a tab, =, : or comma, then the pattern; a bare pattern is CUSTOM.
The box's Regex/Prefix choice says how a pattern is read. A JSON list
(what Copy writes) is taken as it is, prefix and regex rules alike.
What was read is listed (the first eight, then "and N more"); a rule
the list has, or one pasted twice, is passed over. Import saves once,
after the rules there are. Escape and Cancel save nothing; a redraw
keeps the box, its text and its choice; a list the gateway refuses is
said in the box and the paste is kept.
- Copy writes the rules as JSON.
MaxRules stays 32. Measured on this machine: 32 rules took 83ms on a
190KB body, 100 took 343ms, and that cost is on every request. One
rule's regex with alternation (a|b|c) covers many fields, which the
reply says. There is no CLI for masking rules, so none was added.
Run (GUI, mote/mica, both engines):
- new redact-rules-import.test.cjs: 5 languages x chromium/webkit at
400px, 10/10 ok.
- the 56 GUI files that reach the privacy page, masking or i18n
(i18n-keys, i18n-en-no-cjk, plugin-own-words, redact-*, mask-*,
privacy-*, settings-*): 1333 tests, 27 red on loaded mica. The reds,
run again on mote at base
|
||
|
|
f9678cebe2 |
gui: Routing's quota bars are Usage's, and every account in a Usage card has a line over it
normalcoder_ on X: Routing's remaining/total bars were grey and black while the Usage overview's are blue, and in a Usage card with several accounts two accounts ran together with no divider. Routing's bars were never Usage's: |
||
|
|
5b25d7e9e8 |
context: a request under way in a long session shows the last cache, not "—" (shenggxhz on X)
shenggxhz's Codex session (T3 Code) on Routing showed "— 命中 · 供应商回答后可见" while a request was under way, and read it as the cache missing. The cache was there: Codex's rows record cache_read at about 32K of 34K. The card was dropping it for two reasons. - The card forgot the last cache whenever the first request in its session line changed (its key was opts.series[0].id). Routing keeps only the latest 60 requests. In a session longer than that, the first request moves on with every new request, so every request under way showed the dash. The key is now the caller's session key (opts.session: the Routing session key, else the conversation). - A card opened while a request was under way had no last cache to show, even when the session's answered requests were in the list. Routing now passes the session's last answered request with usage (opts.prev). Its cache is shown, dimmed and labelled "the last request's", until this request's own cache is read. Run (mote): - At the pushed head (rebased on |
||
|
|
f4a73672ef |
routing: a ChatGPT API account is weighed by its Codex twin's reading, and its story lines wear its own logo
tmr11235 on X (v0.1.3924): a routing group of two ChatGPT accounts, each
added both as Codex and as ChatGPT API (chatgpt-api). The Codex rows read
their week and reset; the story below said "剩余额度未知,排在已知的之后"
next to the Codex logo, so it read as the Codex rows being unknown.
Two causes, both still on main:
- The story's lines were about the ChatGPT API accounts, but a line
named only an account's name, and logoed() put the logo of the first
member of that name in the order: the Codex twin. asides() now says
which member each line is about (by its place, as two lines may say
the same words), and renderSteps hands it to logoed(), as it did for
a skipped member's line only.
- OpenAI tells a ChatGPT API account's plan usage nowhere magpie can
ask, so Smart weighed it as unknown and put it after every known
account, though it spends the same plan as its Codex twin.
Allowances("chatgpt-api") now gives such an account the Codex
account's allowance (samePlanAllowances), matched as
SamePlanAccounts matches them: both tokens' chatgpt_account_id and
chatgpt_user_id, never the name, so two Team seats of one email stay
apart. One with no Codex twin stays unknown. The Routing card reads
the same figure, as it reads the gateway's.
What was run (GUI on the Linux box through wsl-run, mote over its load
then; Go on mote):
- go test ./internal/provider -run 'TestChatGPTAPIAllowanceIsTheSameAccountsCodexReading|TestRenewedAccountForgetsItsAllowance|SamePlan': ok
- node --test routing-twin-logo (new; chromium and webkit; en, zh,
zh-TW, ja, de; 1100 and 420): 20 of 20 ok.
- Every GUI file that opens the Routing page (199) plus i18n-keys and
i18n-en-no-cjk: 3533 ok, 61 red in 13 files (click-scroll,
ctx-head-narrow, ctx-route-align, ctx-session-line,
inner-scroll-contain, mobile-web, routing-ctx-sessions,
routing-many-keys, routing-pin-away, routing-pulse-composited,
routing-row-swap, routing-sky-under, routing-story-shrinks). The same
13 files at origin/main
|
||
|
|
5d54a990d4 |
usage: switched-off providers' accounts can be checked in, and Check in all (wxkwxk666 on X)
wxkwxk666 asked for two things on the Usage page. First, a provider switched off should still show its accounts, at the bottom and folded, so they can still be checked in each day. Second, one button should check in every account at once. - provider.OffCheckins (off_checkins.go) lists every account a checkiner reaches whose provider is switched off (Off, not Hidden). Each is a card with no windows. Nothing is read or asked for it. Its check-in result is matched by its own key, not by its name, since two sign-ins can share a name (plugins#254). GET /api/usage/checkins/off serves the list. - The Usage page (plugins/usage) adds a "Switched off · n" line after the cards and the hidden line. It is folded until clicked. Each account shows today's check-in, and a Check in button when it isn't checked in yet. The button uses checkinnow.js's ciNowSend, which POSTs /api/usage/checkin-account. - Check in all, at the head of the allowances, presses every account not checked in today, from the cards and from the switched-off line. It sends one checkin-account request per account, three at a time, shows "Checking in i/n…", then gives the counts (checkinPressSaid). When no account is due, it says so and sends nothing. - Nothing switches a provider back on. The new strings are in zh, zh-TW, ja and de. Plugin files only: app.js is unchanged. - docs/subsystems/provider-plugins.md says all of this. Run, on mote: - TestOffCheckinsListsSwitchedOffAccounts, in the fakeco plugin sandbox: - nothing is listed before the switch-off; - after it, two cards with distinct keys; - a press on one checks in exactly that account; - the provider stays off; - only the pressed card carries a result; - nothing is listed once the provider is switched on. - go test ./internal/provider ./internal/gui, at this commit on origin/main |
||
|
|
a95a7a1cd8 |
providers: each API key can bill at a price rate of its own (tnt12231 on X)
A relay sells keys in groups that bill at different rates against the
official price (0.5x on one, 1.2x on another) under one endpoint, and
magpie had only the provider's price rate. Now a key can have its own:
- provider.KeyPriceRates, keyed by key id like KeySpendCaps: cloned,
normalized on save, carried when a key is replaced. A key without one
bills at the provider's PriceRate. A price the user set for a model
stands as set, as it does under the provider's rate.
- Usage prices each call at its key's rate (usage.Pricer memoizes per
key id, BaseKeyPriceIn), so the Usage page, a key's spend cap and its
typed balance follow it. PriceAt, used to route by price, takes the
rate of the key the provider holds.
- GUI: the provider editor's Advanced has "Price rate per key" under
Price rate, shown only with two or more keys, folded past 8 keys like
the per-key proxies. An empty line shows the provider's rate as its
placeholder. Save sends keyPriceRates ({} clears, left out keeps).
The lines, the check and the placeholder live in keyrates.js,
imported when a provider with two or more keys opens. The core's
budget goes up 397 for what is left in app.js (the import, the
draft's copy, Advanced opening for it, the save's line, proxyLines
drawing another kind of line); app.js stays under its own.
- CLI: magpie provider key-rate <id> [key [rate|default]].
- docs/subsystems/providers-accounts.md: a Key price rates row.
Run, at this head (rebased on
|
||
|
|
287a1ffa26 |
gui: Hermes's other profiles are picked on the one Hermes row again (Norethcy on X)
Norethcy on X, v0.1.4022: "Hermes 其他 profile 的配置消失了,只有默认的 Hermes Agent". |
||
|
|
5a2d0ff478 |
claude-desktop: Use Claude Magpie, a twin on magpie in one click (xMopf7RF on X)
xMopf7RF asked for the Separate app to be reached like a phone's app twin: one button that makes a second Claude Desktop on magpie and leaves their own Claude Desktop as it is. Claude Desktop's row, while it isn't on magpie and Desktop can run so (macOS), now has "Use Claude Magpie": it turns the Separate app on (settings/desktop-isolated) and then connects Desktop, so only Claude-Magpie-3p is wired, and says to open Claude Magpie from Applications. The order matters: connecting first would wire the user's own Desktop. The button is drawn by claudemagpie.js with the fold; app.js keeps the one line that places it, so the core budget goes up by 81. Run, at this commit: - TestCoreScriptBudget; gofmt clean. - GUI on mote, Chromium and WebKit: desktop-twin (five languages, 1100 and 640px: the posts in order, the status, the button gone after, no scroll, no native select; no button without the Separate app), desktop-isolated-claude, desktop-isolated, i18n-keys, i18n-en-no-cjk, old-webkit (its two reds are on origin/main, #6467, #5919), and every agent*/desktop*/claude* GUI file; its reds are all on origin/main (#6467, #5919, #6373, #5925, #6179, #6371, #6475). Broken by hand: connecting before turning the Separate app on turns desktop-twin red (the post order). Not tried: clicking the button in a real Desktop; the two calls it makes are the ones the commit before ran for real (launcher add, then claude- desktop magpie, in a sandbox HOME on mote). |
||
|
|
6bc0d1e203 |
claude-desktop: Claude Magpie's Code tab on a Claude Code folder of its own (#6459)
The Separate app (Claude Magpie.app, #5671) kept its own Desktop
userData, but its Code tab's bundled Claude Code still read and wrote
the user's ~/.claude: their CLAUDE.md, skills, plugins and history went
into the twin, and the twin's sessions into theirs (xMopf7RF on X).
An opt-in, macOS-only switch under the Separate app's Advanced fold
(settings.DesktopIsolatedClaude, POST /api/settings/desktop-isolated-
claude, `magpie claude-desktop launcher claude-dir on|off`) gives it
~/.claude-magpie-desktop:
- desktopiso.Script exports CLAUDE_CONFIG_DIR in the app's launch
script; turning the option on or off remakes the app, and the hint
says to quit and reopen Claude Magpie, since a running one keeps its
environment.
- desktopOn writes Desktop's model windows, caps and explore entries
into that folder's settings.json instead of ~/.claude's while it is on
(desktopCodeDir, desktopClaudeSync); off moves them back. The folder
is kept when it is turned off, and shows as the claude# row "Claude
Code · Claude Magpie".
- The fold is drawn by claudemagpie.js, imported the first time it
shows; what stays in app.js is the import (isoLazy) and the fold's
place, 216 bytes, so the core budget goes up by 180 (the 36 of room
there was taken first).
Run:
- gofmt -l clean; go vet ./internal/... on darwin, GOOS=windows and
GOOS=linux -tags nogui vet of agent, cli, desktopiso, gui, settings,
settingsapi (mote).
- go test agent, cli, desktopiso, desktopdir, settings, settingsapi,
gui, library on mote: all ok except cli's three healthcheck/update
tests, which ask the gateway mote's own magpie serves on :3425
(#6223, the same with or without this change).
- TestCoreScriptBudget and TestSettingsSaveKeepsWhatItDoesNotSend at
this commit and the next.
- GUI on mote, Chromium and WebKit: desktop-isolated-claude (five
languages, 1100 and 640px), desktop-isolated, i18n-keys,
i18n-en-no-cjk, old-webkit, and every agent*/desktop*/claude* file
(98 files, 1,595 of 1,662 pass). Every red is the same on origin/main
|
||
|
|
daaa11cb53 |
update: the clock's check leaves a waiting download alone (iiiiiimone on X)
"With magpie my proxy's traffic is far higher than usual." An idle `magpie web` (a released v0.1.4000 build, sandbox HOME, no accounts, every request through a counting proxy, 25 minutes in WSL) sent 89.4 MB: 88.6 MB of it the update download from usemagpie.ai, 0.7 MB models.dev's catalog (daily), ~80 KB the update feed and notes. Nothing else. The download is the waste. With a version downloaded and waiting for a restart, every check by the clock (every 6 hours by default, 30 minutes at the shortest) found a newer one, as magpie releases 100 to 160 times a day, and downloaded it whole (37 to 95 MB by platform) in place of the one waiting: up to ~380 MB a day by default on Windows and ~4.5 GB at 30 minutes, for an app left running, all over the user's proxy. Now the clock's check keeps the version waiting, as Settings' NoAutoDownload already did. Nothing is lost: every restart into it asks the feed first (recheck, the autorestart's waitRecheck) and fetches the newest then, quitting puts in the one waiting, and a check asked for (Settings' Check, Download update) still downloads the newest. With nothing waiting the clock's check downloads as before. Run: - TestUpdateClockLeavesWaitingDownload (new): three clock checks with newer versions out keep 0.1.11 and one download; recheck and a check asked for each fetch the newest. - go test ./internal/gui (nogui, CGO off) in WSL magpie-desktop at b883bd44e (rebased on |
||
|
|
db9a5ec7c4 |
gateway: Claude Code's advisor runs in magpie for a model whose upstream can't (Awad_Yoo on X)
Claude Code 2.1.316 sends its advisor (/advisor, settings.json's
advisorModel) for any model when CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL
is set: an advisor_20260301 server tool, which only Anthropic's server
runs. Until now magpie left it out for every other upstream (
|
||
|
|
507d612340 |
mcpauth: an MCP server's sign-in page is opened only when it is a web page
A sign-in to an MCP server opens the authorization_endpoint its metadata names, and the GUI handed that URL to the system (open / xdg-open / rundll32 url.dll,FileProtocolHandler) without looking at its scheme. A server the user added in the Library could name file:///…/Some.app, a file://\\host\share\x.exe UNC path, smb:// or an app's scheme, and pressing Sign in would launch, mount or hand off what the server chose. /api/open already kept to http(s); this path skipped it. - mcpauth.WebURL: http or https with a host. start refuses any other authorization endpoint before a flow (and its callback listener) exists. - gui.openMCPSignIn checks it again before OpenURL, so a State that didn't come through start is still not opened. Test: TestAuthorizeEndpointIsAWebPage (file:, UNC file:, smb:, vscode:, javascript:, https with no host) — red with the check turned off by hand (the sign-in started at file:///System/Applications/Calculator.app?…), green with it. Run (mote; mica's disk is full, mote at load ~33, small run only): go test -count=1 ./internal/mcpauth/... ok; go test -run 'MCP|SignIn|Library' ./internal/gui ok; go vet darwin ./internal/mcpauth ./internal/gui, GOOS=windows, GOOS=linux -tags nogui ok; gofmt -l clean. Not run: the full suite. |
||
|
|
f3ad175fb2 |
library: an MCP server's sign-in keeps to its link when Settings say so (hkxhkxhkx on X)
hkxhkxhkx asked for magpie never to open OAuth pages in the browser on
its own. Settings › Privacy › Sign-in pages › "Open sign-in pages in the
browser" (signInLinkOnly, since
|
||
|
|
d06d2383a4 |
gui: connect addresses' save and the typed certificate move into tlscerts.js, within the core script budget (quantum_lsfc on X)
The Connect to row put TestCoreScriptBudget 180 bytes over (1265892 > 1265712). The typed-certificate copy in asTyped and the resolve line in Save now live in tlscerts.js, which the editor imports, so the core carries no new code. A save before tlscerts.js has loaded sends no resolve, and the server keeps what was saved (a left-out resolve keeps it), as it already did for the server pin. Run on mote at the head rebased on origin/main |
||
|
|
40d0ab62ce |
gui: Advanced › Connect to, a provider's connect addresses (quantum_lsfc on X)
A provider of the user's own has a "Connect to" box under Advanced, one line per host: host = place, place. It is drawn by tlscerts.js, which the editor imports, beside the certificate rows; strings in every language. Broken by hand: Save without the resolve line turns provider-resolve.test.cjs's "saved as a map" and "keeps them, and clears them" red, 40 of 60, in both engines. Run on mote at the head rebased on origin/main |
||
|
|
4b93d391ca |
gui: the provider editor's connect addresses are saved and shown (quantum_lsfc on X)
/api/providers carries resolve and takesResolve; Save, Test, Fetch
models and peekcert take resolve (left out keeps what was saved, {}
clears it); provider.Save refuses a rule CheckResolve refuses or one on a
provider that takes none (TestResolveSaved, TestProviderSaveResolve).
Run on mote at the head rebased on origin/main
|
||
|
|
d370bef982 |
usage: Failed lists the requests a fallback answered, as Routing shows their tries failed (maohy915 on X)
maohy915 runs magpie on a NAS and uses it from another computer's magpie
through Remote magpie. The NAS's Routing page showed failed calls, but
Usage → Requests → Failed found none. Reproduced with two sandbox
instances on mote (B → remote-magpie → A, where A's provider `bad`
answers 429 and falls back to `good`). A's trace had 2 requests and 1
rerouted. Usage had 2 rows, Failed had 0 and Retried had 1. A try that
fails and is handed on writes no row when nothing is billed, and its
request's row is an answer on the second try. Failed kept only
LostRequest, the requests whose agent got the error, so the failed try
was nowhere under Failed. Plain failures, remote or not, were already
listed; only rerouted ones were missing.
Failed now keeps every request a try failed on (Record.FailedTry): the
requests the agent got an error for, the tries handed on, and the
requests a later try answered. Retried still keeps only the answered
ones. The counts are unchanged: each request is counted once, by how it
ended (小一's rule), so a Failed list reads "1 failed · 2 answered on a
retry". The Failed option and the card's "N failed" button now say so in
their tooltip, in every language. Filtered page cells are cached on disk
under the filter, so settledCountVersion goes to 4; the first start after
the upgrade pairs the history again once.
Run (mote):
- go test ./internal/usage ./internal/usageapi ./internal/gui: ok.
- New test TestFailedKeepsRequestsAFallbackAnswered; updated
TestRequestsCountedOnceWithTheirRetries.
- GUI, both engines: ledger-retried (5 languages, 420/1100), i18n-keys,
i18n-en-no-cjk, usage-ledger, api-key-usage, purpose-filter,
usage-ledger-content, usage-phone-head, usage-loops, usage-request-page.
All pass except known reds: i18n-keys "a plugin's words are its own"
(#6422/#6423) and usage-ledger "newest live route needs no
return-to-live button" (#4078/#3104/#4626).
- gofmt; go vet for darwin, linux -tags nogui, and windows.
- Real repro with a binary built from this tree: A's Failed went from 0
rows to the rerouted request, both in the API and in the real page
(Chromium).
Broken by hand:
- Filter back to LostRequest: both Go tests red.
- The Failed option's title dropped: ledger-retried red.
Not tried:
- Restoring settledCountVersion to 3 doesn't turn
TestSettledCountedAsVersioned red: it counts only Filter{}. The bump is
by reading.
- Not tried on a real NAS or in the desktop app's remote window; the
page is the NAS's own web page.
|
||
|
|
93906ba755 |
gui: a second launch on Windows hands over at once, not after 30s (shangyuan0818 on X)
On Windows, opening magpie from the Start menu while it already ran took over 10s to show the window, longer than a cold start. |
||
|
|
633ab58e9b |
gui: every page says it draws a dark theme, so browsers don't repaint it (xjp on X)
Chrome's Auto Dark Theme and Safari's Adaptive Dark Mode (Safari 27.3 beta) repaint pages that don't declare dark support. magpie's GUI draws both themes itself but never said so, so a browser's light magpie was repainted. WebKit's post (webkit.org/blog/18541) and Chrome's (developer.chrome.com/blog/auto-dark-theme) say: `color-scheme: light dark` (CSS on :root or the meta) is skipped; `light only` opts an element out (Safari 27.3 beta 1 doesn't honour `only` yet). - index.html: <meta name="color-scheme" content="light dark">. - app.css: :root takes `light dark` always (the signal browsers read); body takes the theme shown: Settings' Light is `light only`, Dark is `dark`, System follows the root. Native controls, scrollbars and a plugin's frame follow the theme shown. - pagebridge.js: a plugin page's light frame is `light only`. - The other pages magpie serves (magpie web's sign-in, a sign-in's end page, an MCP sign-in's end page, a plugin service's "starting" page) declare `light dark`; the MCP page drops its fixed #222 text so it reads on a dark canvas. keypage.html and the extension popup already did; site/ pages already do. Tests: color-scheme.test.cjs (chromium + webkit; system/light/dark on a dark OS: meta, root and body schemes), TestPagesDeclareBothColorSchemes, TestSignInPageDeclaresBothColorSchemes, TestPageDeclaresBothColorSchemes. Run (mote, before the rebase on origin/main |
||
|
|
a65dade2e3 |
gui: an accent colour of your own and a picture behind the pages (CHENGJIAHEGOXIS on X)
CHENGJIAHEGOXIS asked for colours beyond the three themes and for a local picture. Settings › General gains two rows under Appearance: - Accent color: magpie's own, six quiet presets (Blue, Teal, Green, Orange, Pink, Graphite) and a swatch that opens the system's colour picker. Saved as settings.accent (#rrggbb only, checked in saveOwn; `magpie settings set accent "#0d9488"` works through settingsapi.Keys). The server draws it (appearance.go accentVars): darkened on the light theme and lightened on the dark one until it reads as text at 4.5:1 on the background and cards, with white or near-black text on it, whichever reads better. Never under Omarchy, whose theme is the look. - Background image: Choose… takes a PNG, JPEG, GIF or WebP of 16 MB at most, sent as base64 JSON to POST /api/appearance/wallpaper, saved as `wallpaper` in magpie's folder (edit.WriteAtomic); settings.Wallpaper is its stamp. A thumbnail, Change and Remove show; Remove deletes the file. It is drawn behind the window's pages (never the tray panel) under a veil of the theme's background at 84%, so text reads as on the plain page; the cards stay opaque, and body's colour stays the theme's, which Windows' title bar tint reads. boot.js puts the look's stylesheet in before the first paint and says which look it drew (bootPrefs.look); applyPrefs asks /api/appearance/css only when the settings' look differs. The rows, with the Colorblind, Reduce motion and Loading bird rows, are drawn by appearance.js, imported when Settings draws, so the core scripts stay under their budgets with no raise (app.js 2,393 under, the core 503 under). A save of Settings that doesn't send accent keeps it (Merge guard), and the wallpaper stamp is kept by every Settings save. fonts.test.cjs: the two new rows push the font row to the foot of its 560×620 window, where Playwright's click scrolled it in by a pixel and the test read that as the page moving; the reader now scrolls it in first with the wheel. settings_keep_test sets Wallpaper; the three /api/appearance routes are named in the CLI parity test's notYet. Run (mote, at this change on origin/main 406ad72f1; after the rebase on |
||
|
|
741d502d2a |
library: a synced MCP server can run its own command on this computer (jinpwng on X, #6426)
jinpwng runs one MCP server on a Mac and in WSL. Each needs its own program path, and the only ways around it were two servers with two names or keeping the server to one computer, which loses the sync of its agents and note (#3836). A command server now has an optional `shared` start. When it is set, command, args and env are this computer's, and every reader (the agents' files, projects, the router, the check) runs them with no change of its own. Collect carries the shared start in their place and never the field, so the other computers get exactly what they had. Put keeps this computer's start, and what comes in for the server becomes the shared start, so a note, agents or the other computer's own command change still comes in. A server that comes in as a URL, one kept to this computer, and the editor sending no shared start each end it. - GUI: a saved synced command server's editor has "Use another command on this computer" under Command. With it on, the hint names what the other computers run, and "Use the synced command" goes back. Nothing else on the page moves; a new server and a local one have no button. - CLI: `magpie library mcp here <name> <command args…>` and `… here <name> off`; the listing names a server that has one. - TUI: an edit keeps the shared start. - Docs: docs/subsystems/library.md, site docs (en, zh, ja). Run (mote, at the tree pushed but before the rebase): - go test ./internal/library/... ./internal/cli/... ./internal/tui/... ./internal/backup/... ./internal/gui/: ok - gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows: clean - GUI, chromium and webkit: mcp-server-here (new: en, zh, zh-TW, ja, de at 1100 and 390, the payload, no button on a local server, no sideways scroll), library-mcp-json, library-mcp-spaced-path, library-mcp-win-line, market-address, mcp-home-health, mcp-startup-timeout, market-have, mcp-editor-cancel, mcp-local-server, i18n-en-no-cjk, i18n-keys and the other library MCP files: 235 of 238. The reds: - i18n-keys "a plugin's words are its own": the same at origin/main |
||
|
|
406ad72f1a |
gui: a gateway's provider editor keeps its warm-up and check-ins (wolfing88, magpie-community/plugins#1065)
wolfing88 runs magpie in Docker, so magpie web is in gateway mode. Their WorkBuddy, Trae CN, 商汤小浣熊, MiniMax Code and Qoder CN plugins check in, and Settings' search sends each "每日自动签到" to that provider's editor, but the editor had no check-in field. |
||
|
|
04776ec6cb |
providers: a plugin subscription imports accounts from a file through its own auth.import, WorkBuddy's from 0.2.32 (marchen_cc on X)
marchen_cc on X: 「从文件导入账号」 took no WorkBuddy sign-in file. The cause
was not WorkBuddy's: magpie's import reached only built-ins (Codex,
Claude, Antigravity, Factory), and a plugin had no way to say it could
read a file. This adds that for every plugin subscription:
- A plugin's auth may have import(texts, {signal}), returning sign-in
results, with importFrom (and importFroms by language) saying which
file to choose. The host's importFiles op keeps each one as a sign-in
is kept (keptAs, saved under signInKey, settled), so an account
already there comes back "updated"; it is cancellable (signInSteps)
and takes at most 100.
- /api/signin/import and `magpie accounts import <plugin> <files>` go
to provider.ImportPluginFiles when PluginImportable(id); the editor's
「从文件导入账号…」 row and the import sheet show for such a plugin, in
its own words (importSay), moved subscriptions included (subOf).
- docs/subsystems/provider-plugins.md: "Accounts from a file".
- WorkBuddy's mover min goes to 0.2.32, which reads the desktop app's
.info sign-in or a JSON credential, and sends a cloud-hosted
enterprise account (*.sso.copilot.tencent.com, *.copilot.qq.com,
*.sso.codebuddy.cn, iOA apart) to its enterprise's address (emilochen
on X), published and checked with npm view --prefer-online.
- TestCoreScriptBudget +468 for the import branch, packed to one
statement. importSay is read as the Providers rows draw, so it has
no lazy page; nothing else was moved out (#2710). The budget's
arithmetic was checked over this tree: 1,267,762, at the new cap.
Run on mote (mica's disk is full; mote over its cores) at this change
on 3f6b1b0c9;
|
||
|
|
ac1702c330 |
library: the first part of a skill group opens below its heading, not over it (jinpwng on X)
jinpwng on X (macOS, Chinese UI): in Library > Skills, opening the first group made the page jump, and what was clicked went off the screen; the others opened downwards. The group was the first part of a big group (a repository split by folder, drawn in the group's windowed list). A click on a part's heading draws it anew, and the first part's only neighbour above it is the list's zero-height pad, which the click's hold passes over. So the page held the next part's heading, the rows opened pushed it down, and the view scrolled by the whole part: the clicked heading went from 152 to -920. A part's heading is now data-unrolls, so the hold keeps its list, whose top doesn't move. Top-level groups, projects and the Instructions agents already held still; the new test guards them too. library-group-steady.test.cjs opens and folds, at the top and scrolled: the Skills groups and the big group's parts (first and second, and the first with the second open), the projects in Skills, MCP and Subagents (first and third), and two Instructions agents. Each heading must stay within 1.5px of where it was clicked. Clicks and scrolls go through page.mouse, since Playwright's own scroll before a click reads as the reader's. Run (mica, mica-run), at base |
||
|
|
3f6b1b0c94 |
agent: omp's advisor turns on with its model, and its review, wait and call-back are set in magpie (#6408, Awad_Yoo on X)
Awad_Yoo wants omp's advisor gated: one model executes, another reviews
only at key points. omp's advisor (src/advisor, advisor/settings.ts) runs
only while advisor.enabled is true, and omp leaves it off, so a model
picked for the advisor role in magpie reviewed nothing.
- A model picked for the advisor role writes advisor.enabled: true when
the user hasn't set it. The role's reset takes back only what that pick
wrote (a stash mark); the user's own on or off stays.
- Three Quiet fields write the rest of config.yml's advisor block, as omp
reads it (omp_advisor.go):
- advisor_review: off, turn, agent-end (enabled + reviewMode; off keeps
the mode);
- advisor_wait: syncBacklog off, "1", "3", "5", strict, written as
strings, since omp's enum settings take only strings;
- advisor_wake: continueSeverity nit, concern, blocker.
- GUI: omp's opened row and its panel sheet get three rows (Advisor; Waits
for its review; Calls a finished agent back on). The last two show only
while it reviews, and the rows redraw in place. They live in
ompadvisor.js, imported the first time. The roles square's advisor line
says " · off" when the advisor is off. Strings in zh, zh-TW, ja and de.
- Core script budget: +717 for what is left in app.js, after the rows
moved out.
- docs/subsystems/agent-wiring.md has an "omp's advisor" row.
Not magpie's: taking over from the executor after repeated failures of
the same kind. omp has no such setting; "escalate" in its source is only a
note's severity. An omp extension can do it (pi.on("tool_result") with
pi.setModel), and that keeps the session's trace and completed tool
results. Said on the issue.
Run:
- mica-run go test -count=1 ./internal/agent/: ok.
- go vet ./internal/agent/ ./internal/gui/ for darwin, linux (nogui) and
windows: clean. gofmt -l: nothing.
- internal/gui Go tests: on mote (below).
- GUI, on mote and mica: omp-advisor.test.cjs (new: chromium + webkit;
1100 and 390px; en, zh, zh-TW, ja, de; panel sheet at 360) passes, as do
agent-prefs, old-webkit's own check, i18n-en-no-cjk,
omp-profile-connect and agent-row-disclose.
- Reds that fail the same on a clean worktree at origin/main
|
||
|
|
870a9e0fe1 |
gui: the Windows tray panel stays where it opened, no jump left (jiangshangmuyun on X)
On Windows the panel opened flush against the right edge and, a moment later, moved a fair way left. The tray placed it as it opened (ToggleWindow -> PositionWindow), and every refit after that placed it by the icon again: fitPanel, each glidePanel step (stepGlide in glide_other.go) and zoomWindows all called tray.PositionWindow. Wails centres the panel on the icon only when Shell_NotifyIconGetRect's rect is inside the taskbar, and flush right otherwise. An icon clicked in Windows 11's overflow flyout isn't in the taskbar as the panel opens, so it went flush right; the page's first fit, once the flyout had closed, read the flyout's arrow and centred the panel over that. Now every refit of the open panel goes through sizeOpenPanel. On Windows it keeps the place the tray gave it as it opened: the centre and the edge by the taskbar held, kept inside the work area (panelRefit, one SetBounds). The Mac and Linux keep SetSize then PositionWindow, as before, in the same order. Run: - gofmt -l; go vet ./internal/gui ./internal/agent on darwin, linux (-tags nogui) and windows, on mote. - go test -count=1 ./internal/gui ./internal/agent on mote: ok (145s, 250s). - win-run on xiaomi-gpu: TestPanel*, TestOpenPanel*: ok. Broken by hand (win-run, ../tray-jump-scratch/break.log): - panelRefit holding the top edge in place of the taskbar's: TestPanelRefitKeepsItsPlace red in 4 cases. - sizeOpenPanel taking the old path on Windows too, and app.go at its base (PositionWindow in fitPanel and zoomWindows): TestOpenPanelRefitsInPlaceOnWindows red each time. Not tried: the real tray click on xiaomi-gpu. Nobody is signed in there (query user: no users, LogonUI up, no explorer), so no tray exists to click and the panel's moves couldn't be watched; the cause above is read from Wails beta.24's systemtray_windows.go positionWindow. No GUI (Playwright) file reaches this: the change is in Go, not the page. |
||
|
|
b942a872ba |
caps: a lone capped Codex account says its turns go to the fallbacks (not_4O4 on X)
not_4O4 asked for a way to switch to non-official models once a set share of the ChatGPT quota is used. magpie already does this: a usage cap on the Codex account (or a cap on the 5-hour / weekly window alone) plus the provider's Fallback. When Codex is connected to magpie beside its ChatGPT sign-in, or fails over through it, codexAccounts sends a capped lone account's own-model turn through serve, so the fallbacks answer it. The GUI said otherwise. The account row of a lone Codex account said "Codex still uses it" past the cap even when Codex was connected, and the cap note said requests are refused when the provider has fallbacks. Now: - the direct-use note shows for Codex only when it isn't connected or failing over (an agent row with wired or failover); - the held note says the requests go to this provider's fallbacks when it has some and Stop at the caps is off, in en, zh, zh-TW, ja, de. - TestCoreScriptBudget: +236 bytes for this, packed to its shortest form with no page to move it to (the account rows are core). The 11-04 grey Send default and the takeover are untouched: a cap never takes Codex off ChatGPT. New tests: - internal/gateway TestCappedLoneCodexAccountGoesToItsFallback: a lone account capped at 80% with usage at 85 is not tried and the fallback answers (stream and not); at 50 the account is tried. - account-cap.test.cjs: Codex connected, the lone capped row's note ends with the fallback line and has no direct note; not connected, the direct note stays. Chromium and WebKit, every language. Run (mica, mote was over its load), at the rebased head (origin/main |
||
|
|
c2a1d80fc2 |
routing: In turn says each message you send goes round, and draws it (Wing8Aqua on X)
"Each turn of a conversation goes to the next one" read as every message
of a session moving to another account, when a reader expects a new
session to be the unit, and the line was long. What the gateway does
(affinity.go affine): under In turn with Stays on Auto or Within a turn,
each message the user sends ("new-turn") goes to the next account, round
the list; the agent's tool calls for that message stay ("turn"); a new
conversation goes to the one holding fewest. Session and Strict keep a
whole conversation on one, so In turn goes round per conversation; Off
moves every request. Routing is unchanged.
The words now name the unit and the cost: each message you send goes to
the next one, round the list; its tool calls stay; a move costs some
prompt cache; Stays on Session keeps a whole conversation on one. Same
in the provider editor, a group's editor, the Routing plugin's mode
line, the CLI's groups help and the docs (en, zh, ja; llms-full.txt
rebuilt), in en, zh, zh-TW, ja and de.
Under the words, while In turn is picked, a small figure: two
conversations of three messages, a pill naming the account (A, B, C)
each message went to and dots for its tool calls in that account's
shade, drawn as Stays has it now (Auto moves each message, Session one
account a conversation, Off every request). Theme tokens only (--fg-2,
--muted, --faint, --card-2, --line), no colour. The figure lives in
rotfig.js, imported when In turn is first shown; the core keeps a
one-line hook, and its budget goes up 333 for that and the words.
Run (mote, at this tree): rotate-figure.test.cjs, new, provider editor
and group editor, en zh zh-TW ja de, 900px light and 420px dark,
chromium and webkit, 40/40; stays-strict, routing-group-strategy,
routing-save, routing-advanced, rate-limited-sink, group-template,
group-editor-fits, group-editor-align, routing-affinity-order,
routing-affinity-lead, routing-affinity-cache-write,
routing-pool-tooltip, routing-rows-fit, routing-weight-chip,
group-patience, group-defaults, builtins, search-keys, i18n-keys,
i18n-en-no-cjk, text-size, routing-editor-foot, gateway-key-own-rotate,
routing-accounts-narrow all ok; site worker.test.mjs 41/41;
TestCoreScriptBudget ok; go test ./internal/cli ok; gofmt clean; go vet
./internal/cli ./internal/gui darwin, linux -tags nogui, windows ok.
Red, the same on origin/main
|
||
|
|
1cc7b7267d |
gui: the Gateway list says a model takes video or audio (pingqipai3 on X)
The Gateway page's model list showed each model's reasoning levels,
images and context, but not video or audio input, which the catalog often
knows (a model list's input_modalities, a plugin's capabilities,
models.dev).
/api/providers now carries `inputs` (video, audio, in that order) on each
model, from catalog.Model.InputModalities, and on each routing group,
from its entry's Inputs (any one of its models'). gatewayModels passes it
on, and the gateway plugin's mediaInfo adds a video and an audio glyph
chip after modelInfo's image one, with "Accepts video" / "Accepts audio"
in the tooltip ("(one of its models does)" for a group). The chips live
in the plugin, not in app.js's modelInfo, so the core scripts stay under
TestCoreScriptBudget (they were 553 bytes over in app.js). Strings in
zh, zh-TW, ja and de.
Run: at origin/main
|
||
|
|
436d507f0e |
usage: a ChatGPT card's image row tells the window its replies' headers say, not a 15-minute guess (#6412, Green14964 on X)
ChatGPT's images API answers every drawing, a 200 too, with the image allowance it counted: x-codex-active-limit: imagegen_premium and the window in x-codex-primary-* (window-minutes 1440, reset-at), as the reporter captured on a Pro account; Codex 0.160.1 also reads it from a family named for the limit (x-imagegen-premium-primary-*, parse_all_rate_limits). magpie read none of it on the image path: the row said "Unknown" until a refusal, and a refusal whose body names no resets_at rested the image model for quotaRest's 15 minutes, so the card said "2 minutes" of a 24-hour window. - gateway/codex_image_limits.go: codexImageHeaderLimit reads the image window from the limit's own family or, when x-codex-active-limit names an image limit, from x-codex-*; heardCodexImage keeps it per account (in memory), handed to provider.ImageHeard. - Both drawing routes hear it: magpie's own (sendWith in draw.go) and Codex's relayed /images/generations and /images/edits (codex_backend.go). - codexHeaderLimits tells no chat window when the active limit is an image one, so the 1440-minute window never lands on the 5-hour or weekly row. - restDrawer: a 429 with the heard window at 100% counts as the quota (ChatGPT's "image limit reached" read as a rate limit), and with no resets_at in the body it rests until the heard reset, capped at longestQuota. - provider.WithImageLane: the row says Available (or Used up at 100%) with that reset; a rest still says Used up. "Available" translated (zh, zh-TW, ja, de). - docs/subsystems/providers-accounts.md updated. Run (mote): at base |
||
|
|
54b6d4d397 |
gui tests: editor-thumbs-batched checks the thumbs shown, then Advanced opened (#5886)
editor-thumbs-batched went red on main from |
||
|
|
6bba0572d6 |
gui: an open editor's readings redraw its accounts list, not the page (#5310)
When a provider editor opens, its accounts' readings load after it (loginUsageOf), and their arrival called renderProviders(true): every Providers row and the whole editor drawn again. With 600 accounts that was a second full draw of the editor. redrawAccounts now draws only the editor's accounts list again and puts it where the old one was. A full draw is kept for the cases it was there for: another provider being edited, a rename or a focused field (left alone, as before), and an arrangement in progress or no open list (drawn in full). What a full draw did, the in-place redraw does too: - the list's inputs are named and described as field() names them; that part of field() is now fieldInputs(label, control), shared; - the focus goes back to the same control of the same account, matched by tag and first class (a pressed refresh is "busy", so the whole className is not the same after), not its index in the list, which the readings' new controls move; - that focus is given back, not pressed (modalRefocus), so the dialog keeps holding the pressed element where it was; - the body's scroll is put back after the swap: the focused element taken out moved it by scroll anchoring (120 to 124 in editor-quota-quiet). The full draw also hid a gap it no longer covers: the provider editor's folds learn the labels' column from their own size (edAlign's ResizeObserver), and the prefs fields (Resets, Warm up, Check in, Claude Code) shown after the prefs load widen that column without changing a fold's size. The readings' full draw made new folds that measured it again. mountProvPrefs now aligns the editor's folds after showing its fields (edAlignAt, the observer's body made a function). Measured before (mote, 600 Claude accounts): the in-place redraw saves ~45ms in WebKit and ~30ms in Chromium of the editor's open. The rest of the ~1s is the first layout of 600 rows. Tests: - editor-readings-in-place (new): 12 accounts, readings held until the editor is open and the 3rd account's first button focused. After they arrive the Providers row and the editor's head are the nodes drawn before, the focus is that same button, and the list's labels match a full renderProviders(true). Chromium and WebKit, en/zh/zh-TW/ja/de: 10/10 green. - editor-quota-quiet's "redrawn" watch also counts the accounts list replaced alone; before, it waited for a new .ebody and failed "never came, so this tested nothing". Broken by hand: - the readings back to renderProviders(true): editor-readings-in-place 10/10 red on "the provider's row is the one drawn before". - the focus matched by the whole className: account-refresh-holds red in Chromium, "the focus stays on the pressed refresh" (null). - the refocus without modalRefocus: account-refresh-holds red, "the pressed refresh moved 186.875px". - without the scroll put back: editor-quota-quiet red 8/8, "the body keeps its scroll" (124, 120). - without mountProvPrefs' edAlignAt: editor-advanced-align red in Chromium, "en 1000: Advanced starts at 284.765625, its fields at 349.265625". Run (mote, load 25-45, other sessions' runs beside): - account-refresh-holds, claude-quota-onboarding, editor-advanced-align, editor-hints, editor-quota-quiet, editor-thumbs-batched, one at a time, on this change and on origin/main |
||
|
|
468102b721 |
gui: a move's done line, a sign-in page's open and the other-ways row each written once
Three pieces of app.js were written out more than once, word for word:
- movedSay(p): "{name} now runs on its plugin — {accounts}, {models}."
and the state read after it, in unmovedLine and renderMove.
- signInPage(url, id): open the sign-in page, and on a failure keep its
message on the sign-in still shown, in startSignIn, followSignIn and
startPluginSignIn.
- acts(): the sign-in's row of other ways, made when the first goes in,
five times in one function.
No behaviour changes. This pays TestCoreScriptBudget for the next
commit, the readings redrawing an open editor's accounts in place
(#5310); main was at the budget to the byte. Code bytes, as the budget
counts them: -1043.
Run: see the next commit, whose runs include this one.
|
||
|
|
c2fd48782b |
Put back what 1f05c311d took out of main by mistake
|
||
|
|
1f05c311d9 |
library: an open memory holds still while the Memory tab polls (Nietzsche_Li on X)
"资源库-记忆中,被展开的记忆的表单会定时抖动". While search by meaning
still has memories to read (read < of, which can last up to a minute
between memembed.Keep's reads) or a learn-from-conversations run goes,
the Memory tab reads its row again every 2s, and each read drew the
whole page anew. The open editor was a new .lib-detail each time and
played its content-in entrance (opacity .5, 2px slide) every 2s.
- semWatch/distWatch draw nothing when the read changed nothing, and
redraw only their own row (redrawRow) when it did; the whole tab only
when the memories changed.
- render() marks a .lib-detail open before it (same data-detail) as kept,
so it doesn't replay its entrance. This covers every render of an
open editor in the Library: memories, instruction sets and agents'
files (the siblings; no other Library tab polls into render()).
- A new memory's text no longer takes the focus back on every render.
Run (mote): library-memory-steady.test.cjs, all 5 languages, 980/420,
chromium + webkit: green 4 of 4 whole-file runs after the last change
(webkit alone 2 of 2 before it). Broken by hand: the same test against
origin/main's client.js and library.css: 22 of 22 red ("the editor
played its entrance again"). One webkit de 420 red was the test's own
first row click intercepted by the header at 420px while the page
settled; the test now opens rows with a DOM click.
Also run, both engines, every language, 980/420: library-memory, library-memory-select, library-memory-suggest, memory-icon, library-instr-busy, library-instr-sets, library-linked-set, library-follow-server: all green. No Go code changed, so no go test or vet.
Not tried: the real app on a real memory store mid-read.
|
||
|
|
70f4593e62 |
provider: a key's typed balance can refill each day (Kelen_Yc on X)
A key's balance typed by hand refilled each month or each week. A relay
key with a daily allowance had no way to say so. Now it can refill each
day, at local midnight, like the others:
- provider: Refill{Every: "day", Day: 0} (RefillDay). Last is today's
midnight in now's location, Next tomorrow's. check takes it with day 0
only; ParseRefill reads daily/day/d (daily:1 refused); String is
"daily". A magpie before this drops such a refill on read, as one
written by hand that isn't one, and counts from when it was typed.
- CLI: `magpie provider key-balance <id> <key> --refill daily`; usage
lines updated.
- GUI: the pill's menu has "Refills each day" after "Refills each
week…", posting {every: day, day: 0} at once (no day to pick, so no
ellipsis), with its toast; en, zh, zh-TW, ja, de.
- docs/subsystems/providers-accounts.md names it.
Tests: TestRefillDays gains daily rows (midday, exactly midnight, a
month's and a year's end, Asia/Shanghai). New
TestTypedBalanceRefillsDaily holds the clock in Pacific/Kiritimati
(UTC+14), Pacific/Pago_Pago (UTC-11) and UTC: a minute before local
midnight the spend counts from when it was typed, a minute after it
counts from local midnight and the next refill is the following one.
TestOwnBalanceParsedInYuanAndRefill and TestTypedBalanceRefills cover
parsing, the bad {day, 1}, and read-back; TestKeyBalanceCmd sets
--refill daily. key-own-balance.test.cjs picks Refills each day in
every language, both engines, 900 and 400px, checks the post and that
the menu then shows it picked.
Run on mica at
|
||
|
|
4431e31f7c |
library: a project gets subagents of its own, per agent (jinpwng on X)
The Subagents tab now lists the projects as Skills and MCP do. Opening
a project shows each library subagent with chips for the agents that
read a project's own subagent folder: Claude Code (.claude/agents),
Codex (.codex/agents, TOML), OpenCode, Gemini CLI, Qwen Code, Droid
(.factory/droids), Cursor and Copilot (.github/agents/*.agent.md). A
tick writes the subagent into that project only, in the agent's own
format; the agent's global folder and other projects are untouched.
Each file is recorded by its hash and rewritten or removed only while
it is exactly as magpie wrote it, so a same-name file of the user's is
left alone. A rename in the library follows into each project. The
files are kept out of git by the project's info/exclude block, and
follow the repository's other worktrees (syncTrees now copies
Subagents, and clears it for a worktree let go).
POST /api/library/projects/subagents {dir, name|names, agents}. No CLI
yet, like project servers. Hooks, instructions and Claude plugins have
no project scope yet (filed separately).
Run (mica / mote via mica-run, mote-run):
- go test -count=1 ./internal/library ./internal/gui: ok
- node --test, chromium + webkit: project-subagents, project-scope,
project-servers, project-skills-pick, project-skills-groups,
project-remove-keep, library-subagents, library-all, library-items,
i18n-keys, i18n-en-no-cjk, claude-subagents-pick,
codex-subagents-lead, subagent-effort: 150/150 pass
- gofmt -l clean; go vet darwin, linux -tags nogui, windows on
internal/library and internal/gui: ok
Broken by hand: dropping Subagents from syncTrees' copy made
TestProjectSubagentsFollowWorktrees red ("the worktree hasn't the
project's subagent"); the earlier session broke the fix by hand and
saw the new library tests go red.
Not tried: a real Claude Code/Codex session picking up the project
subagent; the full go suite (started after the tag); Windows/Linux
runs of the GUI.
|
||
|
|
889758605f |
import: open CC Switch's ccswitch:// provider links (coder_shaun on X)
A relay's one-click ccswitch://v1/import?resource=provider&app=…&name=… &endpoint=…&apiKey=… link now opens magpie's own import confirmation. The format is read from CC Switch's source (src-tauri/src/deeplink/parser.rs and provider.rs at 3c76d3b): host v1, path /import, resource=provider only, app, name, endpoint, apiKey, apiFormat, model/haiku/sonnet/opusModel, homepage, iconUrl, and the base64 config (claude env, codex auth + config.toml provider table, gemini env) filling what the URL leaves out. The link is translated into a magpie://import's parameters and goes through the same checks (https only, key shape, id rules, balance host) and the same confirmation; usage scripts, configUrl, enabled and notes are never taken, a codex env_key is refused. Registration, so as not to take CC Switch's links: Linux writes a separate magpie-ccswitch.desktop and sets the default only when `xdg-mime query default` is empty or already it; Windows writes HKCU ccswitch only when HKCR has no live handler of another program; uninstall and install.sh remove them only while they are ours. macOS declares the scheme in Info.plist (static), so with CC Switch installed too the system picks. Run: provider, gui (macOS mote; Linux gtk3 on WSL for the scheme tests), uninstall, cli, update packages; vet darwin, windows, linux nogui. The test parses CC Switch's own 11 provider examples (testdata/ccswitch_links.txt, copied from its repo) and refuses the other resources. Broken by hand: claude's default endpoint kind (4 reds) and the Linux "another app has it" check (TestRegisterSchemeLeavesCCSwitchItsLinks red). Not tried: Windows registry (vet only), a real CC Switch installed beside magpie, a browser click on a real relay's button. Rebased on |
||
|
|
48afb27b0f |
library: Claude plugin rows show counts, the dialog keeps its width and folds the parts (jinpwng on X, #6309)
The plugin dialog's description, part lists and source line sat in the
editor grid's 132px label column, so even Plannotator (3 hooks) read as a
narrow column: the Hooks heading landed in the right column, the names
under it on the left and the GitHub line in the middle. Description, parts
and hints now span the grid. The list row showed every skill name (PStack
lists a hundred); it shows "Skills 12 · Hooks 3", and the dialog lists each
part's names in a fold, closed by default.
Run at this head (rebased on
|
||
|
|
610ae1f541 |
library: handing skills over turns off the all-in-~/.agents/skills setting and takes magpie's links out (ConatusMoon2222 on X)
Put skills in "~/.agents/skills" (SharedSkills) gives every agent that reads
that folder every skill, so it cannot go with choosing agents per skill,
which is what "Manage in magpie" (HandOverSkills) is for. With the setting
on, a handed-over skill's entry was taken away and the next sync linked it
back there, so the link stayed (reproduced in a sandbox HOME). Handing over
now turns the setting off in the same write; the sync then removes magpie's
own links there (sweepShared: only ours, never the user's entries). The
confirm sheet says so, only while the setting is on. The Put skills in note
says the skill router lists nothing while every skill is in
~/.agents/skills (the "none" the reporter met), only when both are on.
Strings in zh, zh-TW, ja, de.
Run (on mote, at this tree):
- TestHandOverWithSharedSetting: red with the l.SharedSkills = false line
commented out ("a link is left in ~/.agents/skills"), green with it.
- go test ./internal/library ok; go vet darwin, GOOS=windows, linux nogui
on internal/library ok; gofmt -l clean.
- GUI: skill-handover, shared-skills, i18n-keys, i18n-en-no-cjk in chromium
and webkit, 23/23 each.
Not run: the full GUI suite and go test ./... before the tag; a real
account's Library; WebKitGTK.
|
||
|
|
dd9b2bcef5 |
gui: the new sign-in row and sentences within the core script budget, +296 (Wing8Aqua on X)
No page left to move them to; the row is packed to its shortest form.
Budget raised by exactly the 296 bytes over.
Record for this stack (Wing8Aqua's three reports: cap toggle wording,
Smart is not load balancing, Sign in on another computer), run on mica at
this head's content (rebased on
|