1ccacad63281094de8a3372d5a507d38f9969e5c
3263
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d62220d43e |
gui: a proxy's web page regexps compile when first used (TestNoEagerPackageRegexps)
|
||
|
|
f5e1b10913 |
settings: longest context can hold a model's own window too (WJaunita45604 on X)
v0.1.3681's Longest context left a window the user set for a model, or "*"
on its provider, alone even when longer. Settings > Models > Routing now has
a menu beside the field: "Models without their own" (the default, as before)
or "Every model". In both modes the shorter of the cap and the user's own
window is told; they differ only when the user's own is longer (own keeps it,
every model brings it down). Settings.ContextCapAll, Settings.CappedOwn,
POST /api/settings/context-cap-mode {all}, magpie model context-cap all|own.
Applied in provider.windowIn (so /v1/models, catalogs, compaction), Codex's
CodexNativeWindow/CodexWindow (the list's ETag tag carries the mode) and the
gateway fallback window. i18n in zh, zh-TW, ja, de.
Run (wsl-run, mote's disk was full): provider (full), settings, settingsapi,
codexcat packages; cli -run ContextCap; gateway -run ContextCap|ModelsList;
GUI context-cap, i18n-keys, model-load, settings-places, settings-general in
chromium and webkit; TestCoreScriptBudget; gofmt; go vet nogui and
GOOS=windows vet. Broken by hand: windowIn's CappedOwn removed turns
TestContextCapAllHoldsTheUsersOwnWindowsToo red.
Not tried: the whole Go and GUI suites, a real Codex reading the list, macOS
or Windows runs, GUI in zh-TW/ja/de beyond the i18n-keys check.
|
||
|
|
a46c90e7c3 |
providers: a key's usage cap is set from its row, as an account's is (@wanggenjidev on X)
GUI half of the previous commit; same pill and words as the account cap. key-usage-cap.test.cjs passes in chromium and webkit, en zh zh-TW ja de, 900 and 400px. |
||
|
|
4a7d222dc8 |
providers: an OpenCode Go key takes the usage cap an account does (@wanggenjidev on X)
Backend only; GUI follows. Tests: provider TestKeyTakesUsageCap, gateway TestKeyUsageCapPassesTheKeyOver (red with the hold removed by hand). |
||
|
|
d936be7639 |
usage: Claude's card shows the extra-usage cap and its spend (Shinji_Zl on X)
Claude Code's `claude -p /usage` text omits extra usage, but with `--output-format json --verbose` a message carries usage_report.rate_limits.extra_usage (cap and spend in cents). The gateway adds it as a line; parseClaudeUsage reads it as an Aside "Usage credits" window (n / cap USD), so a spent cap never marks the account used up. magpie asks Anthropic nothing itself, and cannot make a request spend credits: Anthropic decides. The prepaid balance is a separate endpoint and is not shown. Run (wsl-run, linux): TestClaudeUsage*/TestClaudeOverage in provider and gateway, go vet linux/windows/darwin, i18n-keys, i18n-en-no-cjk and claude-overages GUI files (chromium + webkit). Broken by hand: Aside false -> TestClaudeUsageCredits red. Not tried: a real account with extra usage on (the owner's is off); full suite after the tag; Windows run. |
||
|
|
465e9f721f |
gui: library-bili waits for the sidebar's sections before it picks a tab by place
The sidebar list is drawn once in the strip's order and again in sections once navicons.js is loaded; Pi packages then sits before RTK, so a click by an index read before the redraw landed on another tab. Run: library-bili and library-groups on Windows (xiaomi-gpu), Chromium and WebKit: 100 of 100. Red before this wait in WebKit on mote, 2 of 4 cases. |
||
|
|
29d37b4a6c |
gui: Library's sidebar list is in sections: every agent, one agent, magpie (@ConatusMoon2222 on X)
The list under Library in the sidebar was one flat column mixing what every
agent shares, what one agent has and magpie's own add-ons. It now has three
quiet section names, as a Mac source list's: "Every agent" (Instructions,
Memory, MCP servers, Skills, Hooks, Subagents), "One agent" (Claude plugins,
Pi packages) and "magpie" (RTK, billion-context). Same pages, same strip,
same routes; the page's own strip is unchanged. A section with no tab showing
has no name, and a list of one section (agentless) has none at all. The names
are said in zh, zh-TW, ja and de ("One agent" is new; "Every agent" was
already there); no colour, no gradient, no border.
The grouping and the sort live in navicons.js (loaded with the first list,
which then draws again), so the core script budget holds; a few navSubs
comments were cut for the bytes.
Run:
- library-groups.test.cjs (new): the three names and the rows' order in en
zh zh-TW ja de, no names in the strip, a name is no tab, quiet style, a tab
still opens, hidden-only section loses its name, one section none, 420px and
dark: Chromium and WebKit, 16 of 16 on mote before the rebase, 100 of 100
with library-bili on Windows (xiaomi-gpu) after it, and with sidebar.test.cjs
on WSL.
- Broken by hand: names always shown made the hidden-section case red in both
engines.
- go test -run Budget ./internal/gui: ok before the rebase.
- Screenshots zh light/dark at 900 and 420, before and after, in
magpie-wt/library-groups-scratch/shots.
- Wider sidebar and library set on mote: 302 of 304; the 2 reds were
library-bili in WebKit, a click by an index read before the redraw
(fixed in the next commit). mote could not launch browsers afterwards.
Not tried: the whole GUI suite (mote refused connections and then browser
launches for hours; run after the tag), the real Linux WebKitGTK app.
|
||
|
|
61a04f42a2 |
library: a project's Skills menu groups the skills by source, a heading ticks the whole group (Elorynth on X)
The project card's Skills menu listed every library skill flat. It now
lists them as the Library does (skillGroups(true): by repository or the
user's own group, this computer's last, whatever sort the list has), with
a heading over each group. Pressing a heading ticks all of the group's
skills, or unticks them when all are in; it is half-ticked while some are.
A typed filter keeps a group's heading over the skills it finds, and
matches a skill by its group's name. One group only stays the flat list.
openProtoMenu takes a `group` option (the values it ticks) for this.
Paid for in app.js by five comments cut, no budget raise.
Run on the Windows box (mote's Chromium launch hung, SSH refused at
times): project-skills-groups.test.cjs, new, in chromium and webkit,
en/zh/zh-TW/ja/de at 400px wide: red on the old code (6 of 6), green
after. With project-*, i18n-*, menu-*, proto-menu-overflow and
skill-group* GUI files in both engines: all green except
menu-input-scroll and menu-scroll (14 chromium, 13 webkit), which are
red the same at origin/main
|
||
|
|
b39a793c98 |
codex: the Codex app, left showing fewer projects after a switch while it ran, says to quit and reopen it (linsm66 on X)
"为什么codex在触发自动更换账号后侧边栏已有的项目文件夹会消失呢". v0.1.3600 ( |
||
|
|
4ddc150c66 |
gui: a hover hint beside the account switch says how it works and why it is the agent's own use
The owner (11-11): "在这个切换开关旁边有一个 hover 的提示,提示这个原理是啥,
以及它为什么不会让你的账号被封禁". Beside Switch {agent}'s account
automatically, an ⓘ mark; resting on the row (or a key reaching the
switch) shows settingshints.js's card with three lines:
- how: the next account's sign-in is written where the agent keeps its
own, as /login or codex login does; what is left is read by Claude
Code's own /usage, or where Codex's /status reads it; sessions already
open keep their account until restarted;
- why it is the agent's own use: Claude Code still sends every request
itself, straight to Anthropic, unchanged, and magpie sends none (an
account's own proxy kept); for Codex, only which of your own accounts
it is signed in to changes;
- the limit: the same as switching by hand; use only your own accounts,
sharing one is against the vendor's terms. It promises nothing about
bans: that is the vendor's call.
Only where the switch moves the sign-in. Under the gateway it moves
Claude Code's requests instead, and the "straight to Anthropic" line
would be false, so SignInMovesOf now says `routed` on a kept Claude
whose requests go through the gateway, and the hint shows for `moves`
and for `kept` without it.
The lines and mark are in autoswitchtip.js, imported when the switch is
drawn; app.js gets the one import line, paid for by cutting this branch's
own two comments: the core is 1,533,771, under 1,533,802, no raise.
Strings in zh, zh-TW, ja and de.
Run (xiaomi-gpu, Windows 11, win-run; mote refuses ssh):
- node --test sign-in-moves, keep-login, pool-ends, old-webkit, i18n-keys,
i18n-en-no-cjk, settings-hints, editor-hints: 148/152. The 4 reds are
the same at the base
|
||
|
|
e31625f641 |
gui: one helper builds a lib-switch button, one a button that opens a menu
origin/main's core scripts were 1,533,806 bytes, 4 over their budget (TestCoreScriptBudget red), and the accounts list's automatic-switching switch (the previous two commits) added 2,248 more. Ten places built the same lib-switch button by hand (type, role, aria-checked, aria-label, the knob); libSwitch(cls, on, label) builds it. Five set aria-haspopup and aria-expanded=false in a row; menuOf(b) does. The switch's own comments are cut to a line each, and the routing note's gateway sentence comes from signInMovesLine instead of a second copy. The core is 1,533,756 after, under its budget with no raise; the budget's history says so. What each switch does is unchanged: same classes, role, aria-checked and label. Two differences: providerSwitch's button now has type="button" like the rest, and Only models I pick's aria-checked is "false" rather than "undefined" when the setting is unset. Run (Windows box, win-run): node --check app.js; TestCoreScriptBudget ok. The whole GUI suite: see the push record. |
||
|
|
fc24a89183 |
gui: switching the agent's account is a switch of its own
The owner (11-11): "这个轮换做成一个开关". The used-up switch was off
behind a "Keep Claude Code signed in to" tick box, and the tick box read
as something else. Under the accounts of a Claude Code or Codex with
more than one account there is now a "Switch Claude Code's account
automatically" switch:
- on: the line from the previous commit sits under it, saying when the
sign-in moves and whether it comes back;
- off: "Keep Claude Code signed in to [account]", the picker that was
the tick box's (first account, or the one picked);
- switch-only: held on and disabled, with a title saying why, since
switch-only always moves the sign-in.
The switch posts provider/keeplogin as the tick box did (keepLogin is
the switch off), so nothing on the server changes and a user's saved
keepLogin reads as the switch off. The name is a label for the switch:
clicking it flips it too. `.editor label`'s text-align: right is undone
for it, so its words start at the left. The two "Automatic switching is
off" strings give way to the switch's name and title in zh, zh-TW, ja
and de. docs/subsystems/providers-accounts.md says it under "Used-up
switch".
Run (Windows box, win-run; mote refused ssh and WSL's GUI runs failed
with E_UNEXPECTED):
- sign-in-moves, keep-login, pool-ends, i18n-keys, i18n-en-no-cjk,
routing-signin, account-return in chromium and webkit, en and zh:
100 pass
- after the alignment fix: sign-in-moves, keep-login, pool-ends: 72 pass
- TestCoreScriptBudget (wsl-run): PASS
- screenshots, chromium en and zh, on and off: name at the left, switch
at the right, line or picker under it
- after rebasing on origin/main: see the push
Broken by hand:
- posting !on from the switch: sign-in-moves red 4 of 16;
- dropping the text-align fix: the "words start at the left" check red
(160 to 224px in), where the old box check had passed.
Not run: the whole GUI suite with the switch (mote and WSL down). At the
previous commit it was cut short on mote with load timeouts; the account
reds there (account-arrange, agent-switch-accounts, claude-switch-only's
"page doesn't move") also fail on origin/main
|
||
|
|
8a3dbf0232 |
gui: the accounts list says what magpie does with the agent's sign-in
A user with two Claude accounts read the used-up switch as gone. Their "Keep Claude Code signed in to" box was ticked, which turns the switch off, and nothing on the page said so. Under the accounts of a Claude Code or Codex with more than one account, a line now says what the switch does, as NextLogin decides it: - kept: switching is off, the agent stays on the first account (or the one picked) even once it runs out; - gateway: Claude Code's requests go through magpie, which picks an account per request; its own sign-in stays put; - moves: the share it moves at (98%, or used up for In order / Until used up), and whether it comes back to the first (returnsToFirst). provider.SignInMovesOf gives the mode from the same checks NextLogin makes (leftAlone, keep, ClaudeThroughMagpie && !SwitchOnly, SpentShareOf, returnsToFirst). /api/providers carries it as signInMoves on the agent's own provider row. The Routing tab's sign-in note says the gateway case too. Strings in zh, zh-TW, ja and de. Run (mote, through mote-run): - go test -run 'TestSignInMoves|TestClaudeRouted|TestKeepLogin| TestClaudeSwitched|TestNextLogin|TestCodexLogin' ./internal/provider: ok - go test -timeout 45m ./internal/gui ./internal/provider: ok (script size budgets included) - gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows on provider and gui: ok - GUI: sign-in-moves, keep-login, i18n-keys, i18n-en-no-cjk, routing-signin, account-return in chromium and webkit: 60 pass - whole GUI suite (make test-ui): see below - screenshots in WebKit, en and zh: the line sits inside the list at the rows' inset; zh sentences join with no space Broken by hand: dropping NextLogin's keep case from SignInMovesOf turns TestSignInMovesSaysWhatSwitchDoes red; not appending the line turns sign-in-moves.test.cjs red 4 of 4. Not tried: the real app with the owner's accounts; the user's own keepLogin is left as it is. |
||
|
|
1315ac7d99 |
update: the first update finds a magpie without gateway.json, and a restart waits a bounded time (ljlwlcz on X)
Two edges of v0.1.3687's gateway.json:
1. The first update from a magpie older than the record found no gateway.json,
asked 3425, said "isn't running" and left a service on MAGPIE_ADDR=0.0.0.0:10100
on the old version. With no record, no MAGPIE_ADDR and no answer at the usual
address, `magpie update` now tries the installed service's MAGPIE_ADDR (read
from its unit or launch agent, daemon.Addr), the port in Settings and 3425,
and takes the first that answers as magpie. --addr and MAGPIE_ADDR stay the
user's word.
2. A restart asked by `magpie update` waited on "N requests" with no end (Windows
hands nothing over, long streams never finish). The app and magpie serve now
wait at most 10 minutes for that ask, then restart; the output says so
("or in 10 min at the latest, which cuts what is still running"). `magpie
update --force` restarts at once (gateway.SetForceRestarter), and says if the
running magpie is too old to know --force. The app's own look at the disk
(followReplaced) and autonomous serve follow still never cut a request.
Run (mote refused SSH; win-run on xiaomi-gpu): go vet cli/gui/gateway/daemon
(windows), linux nogui vet; go test -run TestUpdate|TestServeFollow|
TestTerminalUpdate|TestRestart over cli, gui, gateway, daemon: ok except
TestUpdateThatWontStart, red on origin/main on the same box too (#6059).
Broken by hand: drain bound off, record fallback off, serve bound off: the new
tests TestTerminalUpdateWaitIsBoundedAndCanBeForced, TestUpdateFindsAMagpieThatWroteNoRecord,
TestServeFollowDrainIsBounded go red.
Not tried: a real systemd service upgrade; darwin cross vet (cgo) and the full
suite (started after the tag if mote is back).
|
||
|
|
059d995d56 |
gateway keys: the list reads the ledger once for all keys, and a proxy's web page is said by its title (aiandcloud on X)
aiandcloud (2.98B tokens, 12,654 requests a day, server mode behind a
proxy) saw Gateway keys draw a Cloudflare 524 page as raw HTML.
Slow list: every poll of /api/caller-keys read up to a month of ledger
rows once per window per key. budget.AllOf now reads each distinct window
once for all keys, and keeps the settled blocks' sums with a cursor
(usage.VisitFrom), so a poll only reads what was appended since; the
unfinished tail block is always read again. A rewritten or shorter log
resets the cursor. All(k) is AllOf of one key.
Numbers (BenchmarkAll vs BenchmarkReadEach, 8 keys x day/week/month,
31 days x 12000 rows/day = 372k rows, warm): 211-228 ms before, 23.5 ms
after.
Raw HTML: fail() now turns an error string holding a web page (a remote
magpie's or a vendor's 524/502 page inside the JSON error) into a short
said/what pair, "A proxy in front of magpie answered, not magpie ({what})"
with the page's title, translated in all 5 languages (key already in
i18n.js). The browser already handled non-JSON bodies (notJSON, #2032).
Run (Windows box, mote ssh was down earlier): go test budget, usage, gui
(AllOf, Budget, FailSays, I18n, Keys); gateway-keys-proxy-page and
gateway-key-limit GUI files in chromium and webkit, 5 languages: 24/24;
gofmt; vet windows, linux nogui, darwin (mote, only a clang deprecation
warning). Broken by hand: with the old fail() TestFailSaysAProxyPageByItsTitle
is red; with VisitFrom's reset() removed TestAllOfIsWhatEachWindowRead is red.
Not tried: a user-scale cold ledger, a server behind a real Cloudflare,
the full suite before the tag (started after).
|
||
|
|
1ae2241538 |
gateway keys: the model picker offers image and video models (aipha2025 on X)
/api/caller-keys/models listed provider.Catalog() only, which leaves out image and video models (Codex's gpt-image, a catalog's drawers, ...). The gateway already holds a key to them on /v1/images and /v1/videos (keyHolds + modelAllowed in draw.go, video.go), so a key held to some models could not be let draw. Each provider's Drawers and Videomakers now follow its chat models in the picker. Run: TestCallerKeyModelsOfferImageAndVideoModels red on old code (pix/gpt-image-2 offered 0 times), green now; gofmt; vet darwin/windows/linux-nogui on mote. Not tried: GUI suites (no JS change); full ./internal/gui run timed out at 600s on loaded mote. |
||
|
|
dd3c9042c5 |
tests: the saved proxies' routes and settings are named in the guards
|
||
|
|
61a93b531f |
gui: the core's scripts back under their budget, by a comment cut
Main at |
||
|
|
c1a0726369 |
tests: context-cap and the catalog's model list are named in the route and settings guards
|
||
|
|
58fb070953 |
settings: named proxies, chosen as inherit, direct or a saved one anywhere a proxy is (@tsingchao on X)
Settings > Network keeps named proxies (name, address, optional login)
with a Test that says reachable and the latency. Everywhere a proxy can be
chosen (global, plugin downloads, a provider, a key, a Claude account) now
has a Saved mode beside the others; the value is "@<id>". Addresses typed
before are read exactly as before, nothing is migrated or overridden.
netproxy.Parse/Resolve/Redact/EnvWith/Dispatch resolve a reference at the
lowest layer, so a proxy edited once reaches the gateway, usage reads,
sign-ins and the plugin host at the next request; Claude Code's
settings.json env (a snapshot) is rewritten by provider.ProxyEdited.
A reference this computer lacks fails closed (DeadProxy), says the proxy's
name in the request error and as "Proxy missing: {name}" on the provider
row, and never goes direct. The password lives in settings.json (0600), is
never read back by the page, logged, or put in Settings sync. The list
rides with the providers part of a sync (Bundle.Proxies, MergeProxies by
id, passwords only with keys). A proxy in use can't be deleted (409).
The saved list's page code is in proxies.js, loaded when Settings draws it;
app.js grew by Saved-mode helpers only, paid for by 16 long comments cut
(core budget unchanged, no raise).
Run (mote refused ssh all session, so Go and GUI went through win-run on
xiaomi-gpu, Windows 11; gofmt and darwin/linux-nogui/windows go vet were
clean on mote before it went down, at the pre-sync tree):
- go test settings, netproxy, backup, settingsapi, davsync: ok on Windows
(earlier on mote: also gui, provider, plugin with real Bun, gateway).
- saved-proxies.test.cjs 20 of 20 (chromium+webkit, en zh zh-TW ja de,
420px) twice more on Windows; provider-proxy-missing.test.cjs 20 of 20.
One webkit de 420px run of saved-proxies failed once under 4-way
concurrency and passed 3 of 3 alone; not reproduced.
- TestCoreScriptBudget ok after the move (it was 3.4KB over before).
Red on this tree and on origin/main alike (Windows run, not mine):
settings TestSharedCheckedReadsOnceAndKnowsUnknown; provider
Codex keychain/Git tests; plugin TestHostRunsAsMagpieBun, TestPiPackage;
gui TestGatewayHeldByAContainer and others; old-webkit "compat.js is the
first" (headerpresets.js) and ":has() (Safari 15.4)" on origin/main
|
||
|
|
245f07b19e |
agent: the pages that poll name rows from a list built once a while
The Sessions page polls its list and its stats every 15s, the Usage page its clients, and each asked agent.Clients() only for each agent's id, name and icon. Clients() builds every agent (30+ constructors): 2.5 ms, 378 KB and 3411 allocations a call on the Windows box with discovery's real 2s look window, mostly os.Stat, filepath.Join and Getenv. On the real-account run (t69, 4 min) agent.All under the sessions handler was 22 MB of 210 MB allocated. agent.Looks keeps that id/name/shared-name/icon list for 30s, built again at once when the plugins' agents change (agentplug's set) or the Agents page's refresh (Rescan). A new omp or QwenPaw profile shows by its id for up to 30s. Nothing is kept in a test binary unless a test says, so tests that add an agent read it at once. The GUI's sessions list, stats, one session, markdown export, trash, manage and reads views, and usageapi.Clients, read Looks. Tests: TestLooksBuiltOnceAWhile — six asks build once, the list equals Clients(), a plugin agent switched on and off shows at once, Rescan builds again. Broken by hand (memo check made false): "six asks built the agents 6 times; want once". Run on the Windows box: go test ./internal/agent ./internal/gui ./internal/usageapi at the pre-rebase base |
||
|
|
4df5256db8 |
plugins: a plugin's page shows its README in the UI's language (ahwulv on X)
A plugin that ships README.zh-CN.md still showed README.md on its details page with magpie in Chinese. GET /api/plugins/page now takes ?lang= (the page's document language) and plugin.ReadmeIn picks the README named for it: README.zh-CN.md, README_zh.md, README-zh.md, README.zh-Hans.md, README.CN.md and the like, any case (readmeTag/pickReadme). Order: the language's own tag, then its base (zh-TW takes a simplified README over English), then the plain README.md as before. Where it reads from: an installed plugin's folder; an npm package not installed from its files through jsDelivr's file list (the registry entry holds README.md only), public registry only, never a user's private one; a GitHub repository not installed from its contents list. Any failure keeps the old README.md path. The page cache in plugins.js is keyed by package and language. A package only on the community dist branch still shows the README its index carries (English). Before/after: zh UI + a package with README.zh-CN.md showed README.md; now shows the Chinese one. en UI, no such file, or jsDelivr down: unchanged. Run: TestPickReadmeByLanguage, TestReadmeInUILanguage (fake npm, jsDelivr, GitHub, installed folder) on mote at the commit before the final rebase and on a WSL box; broken by hand (lang forced to "" in ReadmeIn) the test goes red. GUI plugin-readme-lang (new, chromium + webkit, en and zh) green, red when &lang= is dropped from the request; plugin-detail-escape green. go vet darwin green. Not tried: a real npm package with a localized README against the live jsDelivr; the other plugin GUI files and linux/windows vet were still queued on mote when this was pushed. |
||
|
|
914fcf59b0 |
gui: Sessions' Settings › no longer scrolls the whole window (kalicyh on X)
Settings' explanation lines are held out of sight with position:absolute (hover mice), but their row had no positioned ancestor, so each sat at the window's top-left corner, below the fold for the rows far down a page. The document (body is overflow:hidden, still scrollable by script) then had ~870px of scroll, and Sessions' Settings › (openSettingsAt -> scrollIntoView on the Privacy session-history rows) scrolled the window as well as the page: Settings' top, the header, was pushed off the screen. The row's .who is now the line's box (position:relative), in Settings and in the provider editor's prefs (same rule, same hole). Every other openSettingsAt link (Privacy rows, General's name row) shared it. Run (win-run xiaomi-gpu; mote refused SSH all session, WSL tar errors): - sessions-to-settings, all 5 languages x 1100/420 x chromium+webkit: 20 of 20 ok. The new check (window scrollTop 0, Settings top >= 0, document no taller than the window) is red on the old CSS, 4 of 4 in zh (both engines, both widths). - settings-hints/-lines-wrap/-places/-back/-search/-tabs-stick, editor-hints/-roomy, provider-prefs: 15 failures on this change against 18 on the old CSS, the same names minus three the fix cleared (webkit de 440 line-wrap, webkit hover hints); the remaining 15 (chromium de 440 line-wrap, Settings' search, both engines) fail the same on the old CSS on the Windows box. Not run: the full GUI suite, go test, macOS/Linux WebKitGTK. |
||
|
|
7476328901 |
settings: one longest context for every model (WJaunita45604 on X)
Settings > Models > Routing has a Longest context field (magpie model context-cap [<size>|off], POST /api/settings/context-cap). It lowers every model's window to it, so a user need not set each model. A window the user set on a model, or on its provider with "*", wins and is not capped; a model whose window is unknown stays unknown. It is applied where the window is derived, provider.windowIn, so /v1/models, every agent's catalog, group windows and the compaction thresholds that follow the window all agree. Codex's own models take it through CodexNativeWindow, CodexWindow and codexcat.Cap on the list the gateway serves; the list's ETag carries the cap so Codex asks again. The provider editor's Listed value stays the vendor's. Run (mote): provider, codexcat, cli, settings, settingsapi, gateway tests; GUI context-cap, model-load, settings-places, i18n-keys, settings-general in chromium and webkit (en, zh); TestCoreScriptBudget; gofmt; vet on darwin, linux nogui and windows. Broken by hand: windowIn without the cap turns TestContextCapHoldsEveryModelButTheOnesTheUserSet and TestModelsListContextCap red. Not tried: the whole GUI suite (one row added to an existing list, no new API read on page load), a real Codex reading the capped list, Windows run. Not covered: Claude Code's own [1m] choice (claudeRunName) and agent/claude.go's fallback when a ref has no window. |
||
|
|
eb56de0b59 |
gui: a model's Same as can be picked from models.dev's list, filtered (timfang4162 on X)
In Model settings the Same as box, which binds a provider's model to
another model's metadata (window, reply limit, levels, images, list
price), was a bare text field. A button beside it now opens the app's own
menu (not a <select>) with the models of the models.dev catalog magpie has
already synced: id, name, window and price on each line, a Filter… box over
id, name and maker, the current one ticked. A pick fills the box, so it is
staged and saved with the editor's Save like a typed id, and a value typed
afterwards still wins; nothing about how Same as is read changed.
GET /api/catalog/models lists the cache with one entry per model
(catalog.SameModel), taken from the provider that lists its window and
price. It fetches nothing. The picker lives in modellimits.js, loaded with
the model rows, so the core script budget is not raised (five comments in
renderModels cut to pay for the strings, 613 bytes of room before).
Run on mote at this tree:
- TestCatalogModelsListsTheSyncedCatalogOnce; broken by hand (last
provider wins instead of the one with window and price) it fails with
"kimi-k3 = {ID: ... }; want the provider that lists its window and
price".
- model-same-pick.test.cjs, 22 cases (chromium and webkit, en zh zh-TW ja
de, 400 and 900px): filter by maker, name and id, Enter picks, the
current one ticked, one catalog read, no scroll, no <select>, saved as
modelPrefs same; a failed read says so. With the filter argument taken
out of openProtoMenu it fails. provider-same-as.test.cjs still passes.
- gofmt, go vet (darwin, linux nogui, windows) on internal/gui,
TestCoreScriptBudget.
Full GUI suite at this tree (rebased on
|
||
|
|
0cc91af3db |
agy: magpie's models go in a settings file of its own, so agy's remote control works (baysonfox on X)
magpie wrote modelProvider gemini, the model and its custom models into agy's settings.json. That made every agy an API-key session: no Google account, so no remote control (needs the sign-in plus Google's server-side flag), and a plain agy asked for GEMINI_API_KEY too. Now they go in ~/.gemini/antigravity-cli/magpie-settings.json, handed to agy as --settings for the one session (the launch command, magpie agy run, and the function in a shell or a WSL distro). settings.json stays the user's. An older wiring is given back (stashed model and provider) at the next Sync or pick. agy remote-control and --remote-control run plain, on the sign-in. Run (mote): go vet, GOOS=windows and linux nogui vet, agent/cli/sessions/update packages (see push note). Real agy 1.5.3 in a sandbox HOME: plain agy with the user's untouched settings.json now asks for sign-in (no GEMINI_API_KEY error); the new launch reached a stub gateway at /v1beta/models/<m>:streamGenerateContent. Broken by hand: remote-control bypass removed, TestAgyRun red; TestAgy red on the old code (settings.json written). Not tried: real remote control (needs a Google sign-in, none in the sandbox); signed-in BYOM custom models; Windows PowerShell function run. |
||
|
|
89f66966d9 |
release builds: the UI's files are packed into one zip, ~5.7 MB off each binary (@ZhangXiaof48473 on X)
The Windows and Linux downloads (and the CLI builds) are the raw binary, so
what is embedded counts in full. 8.2 MB of the 12 MB under internal/gui/assets
is scripts, styles and svgs. `make assets-pack` (build/assetpack) writes them
to internal/gui/assets.zip (deflate; png/jpg/webm stored), and the release
targets and `make app` build with -tags packedassets, which embeds that zip
instead of the tree (assets_packed.go: a file is unpacked once, on first use,
and served seekable with no modification time, as an embedded one is). Plain
`go build`, `make build`, `make cli` and every test still embed the tree.
The zip is git-ignored and made before every release build.
Sizes (go build -trimpath -ldflags="-s -w", on mote, at
|
||
|
|
5c05ac41b9 |
web: a LazyCat sign-in takes no peer on a public address; the manifest lists /magpie-ca.crt (forgetable024 on X, #5987)
Follows Rainier's two commits (cherry-picked with authorship, #5987). What LazyCat's own docs say (developer.lazycat.cloud/en/http-request-headers.html, read today): lzc-ingress authenticates a request, and after a success sets X-HC-User-ID, -User-Role (NORMAL or ADMIN), -Device-*, -Login-Time; "if authentication fails, it will clear the above X-HC-XX headers", and "lzcapp developers ... can directly trust X-HC-User-ID". X-HC-User-Groups is said to have the caller's own removed. X-HC-Source is in no page of the docs; the sign-in's use of it only narrows who gets in. The docs name no address for the ingress, so the peer can't be named; a TCP ingress or port forward passes headers as sent (the docs for it say no authentication), which the manifest section already says to keep off the page's port. This commit: lazyCatSignIn turns away a peer that isn't on a private, loopback or link-local address (or isn't an address), whatever headers it sends. The client-routes list gains /magpie-ca.crt, which main added after the branch's base (TestLazyCatManifestListsTheClientRoutes was red on it). TestTranslatedRoutesDropProxyIdentity adds the chat and messages routes to the vendor-leak tests (native, Codex relay and MCP were covered). Run (mote, go1.26.8): gofmt clean; go vet on gui, gateway and cli for darwin, linux nogui and windows; LazyCat, ProxyIdentity, OnePort and Web tests in internal/gui and internal/gateway ok. Broken by hand: with the peer check off, TestLazyCatSignInIgnoresAPublicPeer is red; with X-Hc- out of proxyIdentity, TestNativeAnyDropsProxyIdentity and TestPassthroughDropsProxyIdentity are red. Not tried: a real LazyCat box (none here); the plugin fetch route builds its headers from the request magpie made, read, not run. Full suite and GUI tests follow the tag. Co-Authored-By: Rainier <74943233+Rmosser@users.noreply.github.com> |
||
|
|
4d9b798d50 |
web: a LazyCat box's administrators open the page with the box's sign-in (MAGPIE_WEB_SIGN_IN=lazycat) (#5987)
magpie in a LazyCat app (懒猫微服) is opened from the box's app list by someone signed in to the box already, and asks for a key they never saw: it is in the container's log. A package can only hand the key to every browser that reaches the app, or put a proxy in front that adds the key's cookie to what the box signed in. The box's ingress, lzc-ingress, sends a browser that isn't signed in to the box's login page, and puts on every request it passes the app the box account (X-HC-User-ID), its role (X-HC-User-Role, ADMIN or NORMAL) and what sent it (X-HC-Source, client for a browser), in place of what the caller sent. With MAGPIE_WEB_SIGN_IN=lazycat webGuard takes that sign-in besides the key: lazyCatSignIn lets in an ADMIN account sent by a browser, each of the three named once, and tells anyone else the box's reason. The box's sign-in is a cookie of the box's, and the box's apps are one site, so a browser sends it with another app's page's requests too: an earlier build of this change let another app's page on the box include /boot.js and read window.bootPrefs. So it is taken only for what the page itself or the user asked for (boxFetched, the Fetch Metadata: Sec-Fetch-Site same-origin or none, or a GET or HEAD navigation to a document from another page), never for another page's script, frame, fetch or form POST, nor from a browser that sends no Fetch Metadata. It sets no cookie of the page's own, so signing out of the box signs out of the page. The key's link and cookie work as before, /api still answers the page alone (webOwnPage), and the gateway's client routes on the page's port go to the gateway first (onePort), which asks for a gateway key. StartWeb refuses another value, and lazycat where LAZYCAT_APP_DOMAIN, which LazyCat sets in an app's containers, isn't set: all magpie can check, so the setting is the package's word that the box's ingress is the only way to the page's port. magpie web prints the box's address beside the link. Docs: reference.md's new LazyCat section, with a manifest and what must never reach the page's port, and gui-shell.md's Browser mode row. On a box (lzcos 1.6.2+fix.4), a probe app that echoes its request headers: a signed-in browser's request carries X-HC-User-ID, X-HC-User-Role ADMIN and X-HC-Source client, forged ones replaced; not signed in, / goes to the login page and a public path gets none of the three (forged ones taken off, repeated or in lower case too), while X-HC-User-Groups passes on as the caller wrote it, so it is never read; a TCP ingress passes every header as sent. Another app's container reaches the app through the ingress alone (straight to the app's container it times out); the box itself, and a container in its network (network_mode: host, which a manifest may set), reach the port. A test app made from the docs' manifest, running a build of this change on |
||
|
|
88c417392e |
usage: a sortable model speed ranking on the Requests tab (@flying_crp on X)
Usage's Requests tab gets a "Model speed" card: per model, the median output tokens/s, the median wait for the first token and the request count, over the selected range, sortable by every column (aria-sort header buttons, quiet table, no gradients). A request counts when it was answered (not rejected, handed on, failed or canceled), its first token was timed and it wrote 100 tokens or more (usage.MinRankTokens; the tooltip says so). Computed locally: each chunk keeps a 2% log-bin histogram per model beside its cells (speed_rank.go, chunkPart.speeds), a page merges the chunks' histograms, so there is no per-request sort and medians are within ~1%. The settled chunks' histograms are in the page file; its key salt is now page-v2, so the first load after upgrade recounts settled history once. /api/ledger sends speeds and speed_min. Run (mote): gofmt clean; go vet darwin, linux nogui, windows for the touched packages and ./... earlier; go test internal/usage, internal/usageapi, internal/gui ok at this head; usage-model-speed.test.cjs 12 of 12 (chromium and webkit, en/zh/zh-TW/ja/de, 400px: order, sort by every column, aria-sort, focus kept, no horizontal overflow, ellipsis, hidden when empty); with i18n-keys and i18n-en-no-cjk 20 of 20; the whole GUI suite once on the branch before the rebase: every red is in a file unrelated to this change (account-arrange #6010, account-refresh-holds #5814, account-eye #5052, agent-switch-accounts #5925, bulk visibility and disconnect previews #5982 fixed in |
||
|
|
e430e27500 |
gui tests: agent-bulk-visibility and agent-disconnect-preview leave the window's in-use signal out of the writes they count (#5982)
|
||
|
|
28a79bc33a |
gui: the gateway-mode stats test holds its clock at a local 00:30 (#5690)
TestGatewayModeStatsNameTheGatewaySessions wrote its record at
time.Now()-1h, which in the first hour of a local day is yesterday, so
days=1 left it out: red on macOS and ubuntu CI at
|
||
|
|
68d1fda92b |
providers: GPUStack, a self-hosted model server, in the Add sheet (tayedexuanfeng on X)
tayedexuanfeng asked for GPUStack so locally deployed models import quickly.
GPUStack (github.com/gpustack/gpustack, read at 26b4af6) serves its
OpenAI-compatible API at <server>/v1 (/v1-openai is the legacy path), takes
the key as a Bearer (docs/user-guide/api-key-management.md), and lists the
ready models at GET /v1/models as {"object":"list","data":[{"id",
"object":"model","created","owned_by":"gpustack"}]} (routes/openai.py).
A KindLocal preset, so the Add sheet's Server address field, the CLI's
address=, the TUI's ask and AtAddress all apply as for Ollama; unlike
Ollama it is not NoKey, so its key is asked for. Default http://localhost/v1
(port 80). Logo: the project's own docs/assets/logo.png (Apache-2.0), 96px,
in pngIcons as mlx-serve's is (lobehub has none). Note translated in zh,
zh-TW, ja, de.
Run on mote: go test -count=1 of internal/provider, gui, cli, tui (ok);
go vet on darwin, windows and linux nogui for provider and gui (ok);
GUI i18n-keys, i18n-en-no-cjk, models-add-and-icons, local-address and the
new gpustack-add (56 of 56 in chromium and webkit; gpustack-add also in en,
zh, zh-TW, ja, de at 900 and 440px). The new Go tests use a fake server in
GPUStack's documented shape and never reach the network.
Broken by hand: NoKey true on the preset turns TestGPUStackPreset red;
dropping gpustack from pngIcons turns gpustack-add red (11 failed).
Not tried: a real GPUStack server (none on the LAN), the Linux WebKitGTK
app, the Windows box. Not built: GPUStack's /v1/responses and /v1/messages
(chat only).
|
||
|
|
ae449f8e4f |
gui: the sidebar's tab lists give each tab a mark of its own
Library's, Usage's, Plugins' and Settings' tabs, listed under their page
in the sidebar (navSubs), were names alone while every page above them
has an icon (the owner, with a screenshot of Library's list). Each tab
now has a 14px line mark before its name, from NAV_SUB_IC by page and
tab id: segs gives its buttons data-seg (Usage's own strip too), and
Settings' tabs have data-set. A tab with no mark (none today) keeps an
empty slot, so the names stay in one column. The mark is muted, and
takes the row's ink when the row is hovered or picked.
The marks are in navicons.js, imported with the first list drawn, which
then draws again with them. Its one line in app.js is paid for by two
navSubs comments cut, so the core's script budget is not raised
(1,533,751 of 1,533,802).
German's longest Settings names ("Synchronisierung und Backup") were
cut with an ellipsis at 1100 before this; "Netzwerk und Freigabe" now
is too (7px). Left as is: shortening the word would change it in five
other German sentences that name the tab.
Run:
- nav-sub-icons.test.cjs (new): every row of the four lists has its
mark, 14px, before its name and level with it, one column per list,
names whole (not German); en zh zh-TW ja de, Chromium and WebKit, on
WSL (magpie-desktop): 12 of 12. Red with Library's memory mark taken
out by hand ("library: Memory has a mark").
- go test ./internal/gui on Windows: 8 reds, the same 8 alone on
origin/main
|
||
|
|
9212185a73 |
gateway keys: Model names is a row of name and a picked model, not a textarea (tsingchao on X)
The key's Model names editor was one textarea of "name = provider/model" lines. It is now a row a name: the name typed, the model picked in the app's menu (search by name or id), x to remove, Add a name for another, the Headers editor's row. A row with a name and no model, or the reverse, holds Save off; a row with neither is left out. aliases-key's body and the saved data are as before; the line-format message is gone, so is its key. Run (mote): gateway-key-search-names (rewritten for the rows) + i18n-keys, 24 ok, chromium and webkit, en/zh/zh-TW/ja/de, 1100 and 440. Broken by hand: half-row check off, the test goes red in all 10 chromium cases. Screenshots before and after in chromium, dark and light, 900 and 420. Not tried: Windows/Linux GUI run; the whole GUI suite runs after the tag. |
||
|
|
0d0462d4a2 |
gui: a Presets menu in a provider's Headers fills in what a common client sends (l3123109756 on X)
The Headers editor gets a small Presets button beside + Add header. It
opens the app menu (openProtoMenu) with Codex CLI, Gemini CLI, OpenCode,
Kilo Code, Cline, Roo Code and Cherry Studio. A pick adds that client's
headers: a header the draft already has with a value keeps the user's own,
one with no value is filled, the rest become rows. The list lives in
headerpresets.js, imported when Presets is pressed, so the core's script
budget is not touched. No Claude Code preset and nothing that imitates it.
Where each value comes from (another app's values come from that app):
- Codex CLI: originator codex_cli_rs and the User-Agent shape from
codex-rs login/src/auth/default_client.rs (as internal/provider
codex_request.go sends them), version 0.167.0 = @openai/codex on npm.
- Gemini CLI: GeminiCLI/<ver>/<model> (<platform>; <arch>; terminal) as
internal/provider/google.go userAgent has it, 0.67.0 = @google/gemini-cli
on npm.
- OpenCode: opencode/latest/<ver>/cli (packages/core/src/app.ts,
internal/provider/opencode_client.go), 2.2.7 = @opencode/cli on npm.
- Kilo Code: HTTP-Referer, X-Title, User-Agent, X-KILOCODE-EDITORNAME from
Kilo-Org/kilocode request.ts and headers.ts (internal/provider/kilo.go),
7.8.27 = @kilocode/cli on npm.
- Cline: cline/cline sdk/packages/llms/src/providers/cline-client-headers.ts
(internal/provider/cline.go), desktop client, 3.5.54 as cline.go has it.
- Roo Code: DEFAULT_HEADERS in RooCodeInc/Roo-Code
src/api/providers/constants.ts, RooCode/3.53.0 = src/package.json on main.
- Cherry Studio: defaultAppHeaders in CherryHQ/cherry-studio
src/main/utils/http.ts, read from main on 2026-11-11.
Run (mote, at the pushed head, rebased on origin/main):
- new header-presets.test.cjs: 20 of 20 in chromium and webkit, en, zh,
zh-TW, ja, de, 900px and 420px. With the user-value rule broken by hand
(a preset overwrote a set value) it was 0 of 20.
- header-session-hint, model-headers, i18n-keys, i18n-en-no-cjk: green.
- TestCoreScriptBudget: ok. app.js is smaller than before.
- editor-hints.test.cjs webkit: 10 red here and on a clean origin/main
copy alike ("Tab didn't come back to Certificate's box"), filed in
#5872.
- The whole GUI suite is running on mote after the tag; reds will be
filed.
Not tried: a real request through a preset's headers against a vendor
that checks them. Codex's and Gemini's User-Agents carry macOS and arm64
as magpie's own Go code does.
|
||
|
|
ce5e5964db |
gateway keys: model search box, re: patterns and Model names in the key editor (tsingchao on X)
The model picker of a gateway key gets a search box (name or id) and takes "re:<regexp>" typed then Enter; the row menu gets Model names (aliases-key). Docs: gateway-routing.md "A key's model patterns and names". Run (mote): go vet darwin, windows, linux nogui on access/gateway/cli/gui; go test internal/access, gateway (937s), cli, gui all ok at the pre-rebase base; after rebasing on origin/main: go build ./..., the new Go tests, TestCoreScriptBudget, and GUI gateway-key-search-names + gateway-key-models + i18n-keys (28 ok, chromium and webkit, en/zh/zh-TW/ja/de, 1100 and 440). Broken by hand: pattern match off (gateway + access tests red), aliasRequest off (alias test red), search argument removed (all 20 chromium GUI red). Not tried: Windows/Linux GUI run, a real client against a real key; the full suite runs after the tag. |
||
|
|
13a9f1263a |
plugins: Discover counts who uses and likes each plugin
Discover showed npm's weekly downloads, which CI, mirrors and magpie's own keepMovedCurrent updates inflate. Now each card and the hero say how many people use a plugin, counted by magpie itself, and a plugin's page has a like. - The daily stats send (stats.Send) also POSTs usemagpie.ai /api/plugins/report with the install id and the installed, switched-on plugins Discover lists, by their Discover key: the npm name, or github:owner/repo for a repository tagged magpie-plugin (plugin.Public). A folder, a private repository or an unlisted package is never named. It goes only while "Share the agents, providers, models and plugins I use" is on (noUsageStats), and only where the day's event goes at all (Count me as a user, DO_NOT_TRACK, MAGPIE_NO_STATS, release builds). - site/pluginstats.js on D1 magpie-plugins: users are the ids that reported a plugin in the last 7 days, reports drop after 30 days, a caller's address is kept only as a hash for an hour (60 asks an hour). /api/plugins/stats carries no id and is cached for an hour. - A like (POST /api/plugins/like through the GUI's /api/plugins/like) is taken only for a plugin installed and on here, can be taken back, and is kept in plugin-likes.json. - "Most liked" sorts by likes once a plugin has 20, below that by GitHub's stars. - plugincounts.js is loaded with the Plugins page, not the core, and redraws the cards only when the counts changed. - The privacy text follows: README.md, README.zh-CN.md, docs/reference.md, the site's privacy and start pages in en, zh and ja, llms-full.txt, and the Privacy switch's label and description in every language. Run at this tree (on origin/main |
||
|
|
51da6f1f5c |
gui tests: the settings-keep test sets Bark's server, key and daily time, which have their own route
|
||
|
|
796f759e20 |
gui tests: library-bar-more leaves the window's in-use signal out of what the page posted (#5982)
|
||
|
|
d77eb6d236 |
memory: search by meaning, on a small model on this computer
A memory search now finds what means the same in other words or another
language ("什么时候上线" finds "Releases go out on Tuesdays"), for the
MCP server's memory_search and the Library's Memory tab alike. It is off
until switched on under Memory → Search by meaning, since it downloads
paraphrase-multilingual-MiniLM-L12-v2 (Xenova's int8 ONNX, ~135 MB,
pinned revision, size and sha256 checked); switched off, the model is
deleted.
- internal/pii/guard: the BERT code runs the embedder too (LoadEmbedder,
mean pooling; the tokenizer reads 250,002 pieces and WhitespaceSplit).
Its vectors match ONNX Runtime's int8 to cosine >= 0.995 and are no
further from fp32 than ORT's own; testdata carries both.
- internal/memembed: the switch, the download, vectors.bin keyed by each
memory's sha256 (read once, again when the text changes, a cut-short
file read as none), Keep reading in the backend, the model let go after
10 minutes unused.
- internal/memory: memory.Semantic fuses the meaning ranking with the word
ranking by reciprocal rank; a tie goes to the nearer in meaning, since
a first word hit may hold one common word ("when do we release" had
"Never delete images when..." first). Near 0.30 / Within 0.15 come from
97 real memories and 16 queries, half Chinese for English memories:
12 of 16 sought found with ~4 others each. Rank searches without noting
memories used.
- GUI: the Search by meaning row (download %, memories read, failures),
and the tab's search lists what the backend ranked first
(POST /api/memory/rank), then word matches. zh, zh-TW, ja, de.
- docs/subsystems/memory.md: the section, out of "Not built yet".
Why not multilingual-e5-small, which this was built on first: run for
real, its cosines sat at 0.78-0.89 for everything, and a Chinese search
ranked Chinese memories over the English one it meant. e5-small, e5-base
and MiniLM were compared in ONNX Runtime on the same 97 memories; MiniLM
put the sought one first 9 of 16 and in the top 3 12 of 16, with the
rest at a median cosine of 0.16.
Run before the rebases (mote, on origin/main as of the work):
- gofmt -l internal/ clean; go vet of memembed, memory, pii/..., gui,
library; GOOS=linux and GOOS=windows vet of memembed and pii/guard.
- MAGPIE_EMBED_DIR=~/models/pml go test -run Embedder ./internal/pii/guard:
7 texts (CJK, full width, emoji, digits before runs of spaces) at
0.9962-1.0000 with ORT int8.
- go test memembed, memory, memdistill, pii/..., library, browsermcp.
- Linux (magpie-desktop, -tags nogui, mote's disk was full): go test
memembed, memory, pii/guard, gui (461s), cli (1228s, past the default
10m timeout, so -timeout 30m); gateway -run 'MemoryMCP|OwnMCP'.
- Rebased on origin/main
|
||
|
|
47e30d0e97 |
gui: the Mac's title bar drags while a dialog is open, and the bar's middle does everywhere (ssuuuuooo on X)
v0.1.3624 added the .modal-grip strip but it could not work on the Mac: there the scrim begins under the bar (body.window.mac .modal top: 50px), so the strip sat below the bar, while the bar itself (header, sidebar top) is inert whilst a dialog is open (modalBackground), and an inert element is not hit, so nothing there carried --wails-draggable. On Windows and Linux the strip worked only at the sides: the dialog's 16-28px top padding let a tall dialog (the provider editor) lie over the strip's middle. Now on the Mac the strip reaches up over the bar (top: -grip height; a fixed child would not do, the scrim's backdrop-filter is its containing block), and off the Mac the scrim's top padding is at least the strip's height so no dialog lies over it. docs/subsystems/gui-shell.md updated. Run (mote-run, chromium and webkit): modal-title-drag.test.cjs gains "the middle of the title bar drags with a tall dialog open" (web and mac classes, 5 x 3 points along the bar, header inert): 0 of 4 on the old css, 4 of 4 now. With modal-*, dialog-*, add-sheet*, signin-closes-sheet, sidebar*, click-scroll, panel-drag-linux, title-bar-tools, i18n-keys, popover-mac-chrome, editor-roomy: 351 pass; the 3 reds of that run (modal-centred-late, sidebar-overlay-scrollbar webkit, title-bar-tools zh-TW webkit) pass 36 of 36 rerun alone at this tree, and sidebar-overlay-scrollbar webkit also failed once on the base (load). Not tried: a real drag in the signed macOS app (the test checks the --wails-draggable value under the pointer, which Wails reads); the confirmation (action-confirm, top layer) still has no strip. |
||
|
|
b9f8548d22 |
accounts: export ChatGPT and Claude accounts as Sub2API or CLIProxyAPI files (heyiwei5 and Rk1ngggg on X)
WIP commit before the full checks; body rewritten at ship. |
||
|
|
696556e26c |
provider: Google Vertex AI takes an API key (express mode) and a base URL (Langanpaibian on X)
Vertex AI could only be signed with gcloud credentials and a project id. A provider now takes one API key instead: a Key with no project is Vertex express mode, asked at https://aiplatform.googleapis.com/v1/publishers/ google/models/<model>:streamGenerateContent with the key in x-goog-api-key (Google's docs), no project, no token minted. Express serves Gemini models only, so Base(Chat)/Base(Anthropic) are empty and the models list drops partner and Claude models. A key with a project is asked at the project's address, signed by the key. Vertex.BaseURL (optional, /v1 stripped) replaces Google's host for a keyed provider, such as a proxy. Security: a Google token or gcloud credentials go only to Google's own address. A BaseURL is honoured only with a key, and the key is the only credential sent there; without a key Save refuses it and a providers.json holding one has it dropped on load. Wired through: provider.Save/normalize/Sign/Base/planModels, `magpie provider add google-vertex <key>`, `provider key`, `provider set ... url=`, `provider <id>` and the list, the editor's API key and Base URL fields (app.js, 4 translations each), the Providers row pill, and the providers-accounts subsystem page. Run (mote-run): gofmt -l clean; go vet for darwin, linux -tags nogui and windows over ./...; go test -run Vertex for provider, cli, gui, gateway and tui, all green, with new tests TestVertexExpressKey, TestVertexExpressBaseURL, TestVertexExpressEditor (fake server) and the gateway's TestVertexExpressStreams (chat, streamed and whole, asks /v1/publishers/google/models/... with the key header, no token minted); vertex-editor, i18n-keys and ledger-protocol GUI files in chromium and webkit (en and zh editor flows; the i18n check covers zh, zh-TW, ja, de). Broken by hand: Sign without x-goog-api-key turns the provider, gui and gateway express tests red. The existing tests that pinned "a key is refused" now pin the new rules. Not tried: a real Vertex AI key (no account on hand; the endpoint and header are from Google's express-mode docs, the tests use fakes), the full GUI suite in webkit, Windows and Linux runs of the tests. |
||
|
|
71c4ef2d07 |
gui: Bark push target for every alert, and a daily spend summary (EV_John_Liu on X)
Settings > Usage has a Bark row: a server (default https://api.day.app, or
a self-hosted one) and the device key, then Test and Remove. Every alert
that goes through notifier.sendAs (allowance, balance, reset reminder, task
done, masking, sign-in) is also pushed to Bark when a key is set, whether or
not the system lets this computer notify. A second row, once a key is set,
turns on a daily summary at a time of day: today's cost and request count,
and each window or balance near its cap (the Allowance alert's share, else
80%), capped at 8 lines. It is pushed once a day (a restart does not resend;
a failed push is retried every 15 minutes; one more than 6 hours late is
left), in the page's language (en, zh, zh-TW, ja, de).
The device key is a key: the page only gets barkKeySet, never the key; it has
its own route (POST /api/settings/bark, key omitted keeps it, "" removes it),
a Settings save carries it (settingsapi.Merge), and a backup or sync without
keys leaves it out and keeps this machine's. No log line or error names it
(the Bark client replaces it with "..." in what the server or client says).
bark.js is a lazy module so app.js (budget) gains one line.
Run (mote, at the pushed tree before the rebase onto
|
||
|
|
6af54dc9a9 |
library: Claude Code plugins kept as one item, with a Claude plugins tab (FakeshadowzZ on X)
A Claude Code plugin (.claude-plugin/plugin.json, skills/, agents/, hooks/hooks.json, .mcp.json) can be installed into the Library from a folder, a git address or a marketplace.json, and is one row: turned on, off or removed as a whole, and given to the agents picked with the chips every tab has. Its skills, MCP servers, hooks and subagents are ordinary library items tagged Bundle: <plugin>, so each agent gets them through the code of its kind and the Skills, MCP servers, Hooks and Subagents tabs go on working. Off clears every part's agents and keeps them for on; Remove removes the parts. A part whose name the library has gets the plugin's name as a prefix, never over the user's own. Claude hook events and matchers map to the portable ones; others become claude:<Event>, for Claude Code only. Slash commands, LSP servers and non-command hooks are listed as not carried, not dropped. internal/library/plugin.go, POST /api/library/plugins/*, the Claude plugins tab in plugins/library/client.js (en, zh, zh-TW, ja, de), docs/subsystems/library.md. Run (mote): go test -tags nogui ./internal/library ./internal/gui ./internal/backup ./internal/davsync ok; gofmt clean; go vet darwin, linux (-tags nogui) and windows clean. GUI, chromium and webkit, en zh zh-TW ja de at 420 and 1100: library-plugins (new), library-hooks, library-subagents, i18n-keys, i18n-en-no-cjk, click-scroll all pass. Whole GUI suite started and cut short at ~460 of its tests: failing only account-dragging and accounts-sheet (routing, untouched by this), not compared on origin/main. Broken by hand: dropping the Off handling in givePlugin and the hookTakes filter each turned the new Go tests red. Not tried: a real Claude Code plugin from a marketplace, a git source (tests use folders), WSL, Windows. Not carried yet: commands/*.md, LSP servers, a plugin's folder across computers (a backup carries the parts, not the plugin record). |
||
|
|
5df062f0f2 |
provider, gui: a Claude account with its provider switched off shows its last reading, or says it is switched off, not "No allowance reported" (Kunlin03 on X)
Kunlin03 (Pro subscription, "Claude Code" switch off): the account's card
said "暂无额度数据". LoginUsage returns nothing for a provider magpie leaves
alone (switched off or removed, leftAlone), so /api/login/usage answered {}
and the card had neither a reading nor an error, although left_alone.go says
what was last known is still shown. Pro versus Max is not the cause: the
read itself (Claude Code's /usage) is the same for both.
LoginUsageShown, used by /api/login/usage and `magpie accounts`, answers such
an account from keepLast (its last reading, readDeferred, "not refreshed this
time") and, with none kept, errLeftAlone, which the card words as "Switched
off, so no allowance is read — switch it on and refresh" (4 languages).
LoginUsage itself is unchanged: warm-ups and switching act on it and must
not take a kept reading for a fresh one. Nothing is requested for a provider
left alone.
Not changed: the Usage page and a card refresh for an off provider (they
read through loginReading as before). Not tried with a real Claude Pro
account; the sandbox has none.
Run (mote): TestLoginUsageShownOfSwitchedOffClaude (red without errLeftAlone
in readDeferred), claude-off-usage-card.test.cjs in chromium and webkit, 5
languages, 2 widths (red with the quotaError branch removed), gofmt, vet
darwin/linux nogui/windows, the provider, cli and gui packages, i18n and
account/usage GUI files.
|
||
|
|
1d41799f2a |
agent: turn off every agent's telemetry from Settings › Privacy (OipsAnthony on X)
OipsAnthony on X: "magpie 设置 - 隐私,支持统一关闭所有 Agent 的遥测功能, 这个统一管理的地方优先级最高". v0.1.3562 gave Codex, Claude Code, Gemini CLI and Qwen Code a Telemetry row each; there was no one switch for all. Settings › Privacy now has "Turn off telemetry for all agents" (settings.AgentTelemetryOff, POST /api/settings/agent-telemetry, agent.SetTelemetryAll in internal/agent/telemetry_all.go): - On: every agent found here with a telemetry switch is turned off through its own switch and that switch's rules (only keys the file lacks are written; a value of the user's own that keeps telemetry on is never written over: the agent stays on and the reply's "refused" names it and why). Each agent the switch turned off gets a stash marker, <id>.telemetry.all. An agent found later is turned off on the next state the window reads and by a one-minute gateway loop (KeepTelemetryAllOff, in WhileServing). - While on, each agent's own Telemetry row shows off, says "Off for all agents in Settings › Privacy" and its buttons are disabled; the API refuses it too (ErrTelemetryAllOff). - Off: only the marked agents are turned back on, which takes out only magpie's keys. An agent off by its own row or the user's own config before stays off. - An unreadable settings.json is unknown: nothing is written. - The setting is per computer (KeepOwn) and the generic settings POST can't change it (settingsapi.Merge carries it). app.js pays for its ~650 bytes with ten Privacy-section comments cut (core 1,533,550, under its 1,533,802 budget, no raise). Run (mote, first on |
||
|
|
6a81a3c62a |
masking: its head's Settings link is a link, and the head wraps before it squeezes the title
v0.1.3386 (
|
||
|
|
5048a48d5c |
gui: a plugin's README renderer moves out of the core, to pluginmd.js
Discover and the new Install button took TestCoreScriptBudget 2,766 bytes over. The README's Markdown renderer moves to pluginmd.js, imported once plugins.js has run; the core is 1,531,323 of 1,533,802, no raise. markdown and mdLoad stay function declarations: as consts, window.mdRender = markdown at the top of plugins.js threw "Cannot access 'markdown' before initialization" and every page failed (the first WSL run). The Library's skill files read through window.mdRender too, so the import isn't left for the Plugins page to open. old-webkit lists pluginmd.js with the other lazily loaded files. Run record: the Discover commit's (same push). |