1ccacad63281094de8a3372d5a507d38f9969e5c
2284
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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. |
||
|
|
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
|
||
|
|
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. |
||
|
|
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).
|
||
|
|
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
|
||
|
|
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. |
||
|
|
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)
|
||
|
|
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 |
||
|
|
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). |
||
|
|
e369bf77b4 |
plugins: Install is a thin ring round body-coloured text, with its arrow
The owner picked option C of four: "一个个大安装像一个个补丁". Install, Move and a list's Sign in are a 1px ring (--ring-act, the text colour at 15%) round body-coloured text, with a download arrow before Install; hover fills it grey; Update is the same ring in green; the detail page's main action keeps its accent fill. Browsers without color-mix() (Safari before 16.2) get --line for the ring, which old-webkit's check asked for. plugin-update-button and plugin-market assert the ring and the fill of the new look. Run record: the Discover commit's (same push). |
||
|
|
fd568caf7d |
plugins: Discover is one market, with this week's picks on top
The owner asked for one market instead of three (magpie's community, other npm authors and repositories tagged magpie-plugin on GitHub) and approved the mockup: every plugin is the same card, its source said under its name, a strip picks the kind and a menu the source. The top is the week's picks: one a day from the community's most downloaded not installed yet, the most downloaded and the most starred. A search looks through every source at once, most used first. GitHub's slower answer shows a word that it is being asked, and a failed ask a quiet line with another go. The GUI tests that named the three sections now find the cards by source. plugin-manual-float picks Subscriptions so all 40 cards draw (Discover's shelves cap at 6). plugin-github waits for WebKit's wheel scroll to come to rest after reaching a card: it went on after the last wheel, and the scroll that was measured as the click's was its own (logged before, settled, open and closed: it moved before the click, never after). Run at 563b3dd92, the pushed head's tree (only messages changed since), on origin/main |
||
|
|
c4da9a97dd |
gui: the window drags from the title bar strip while a dialog is open (ssuuuuooo on X)
On the Mac the main window couldn't be dragged by its title bar while a dialog was open: #modal's scrim covers the whole window, including the bar, and had no drag region (--wails-draggable is read from the element under the pointer). #modal is the one overlay every dialog of the window uses (provider editor, new provider, what's new, sign-in, ...), so one strip fixes the class: .modal-grip, last child of #modal (app.js keeps the dialog the first child), as high as the title bar, drag. The dialog has z-index 1 over it and so is never a drag region, nor is the scrim below the strip, which still closes the dialog on a click; the strip counts as backdrop for modalBackdrop, so a click there closes it too. Not covered: the confirmation (action-confirm, a top-layer <dialog>); its ::backdrop hit-tests to the dialog element, which can't carry a strip. The add sheet is part of the page, not an overlay. Run (mote-run, chromium and webkit): new modal-title-drag.test.cjs (en, zh, 1100 and 440px; the provider editor and a new provider's editor): 8 of 8 pass; with the grip's drag style taken out it is 0 of 8. Also modal-*, dialog-*, add-sheet*, signin-closes-sheet, sidebar, click-scroll, panel-drag-linux, title-bar-tools, i18n-keys: 162 pass. go test ./internal/gui ok; go vet darwin, gofmt clean. Not tried: a real drag in the macOS app (the test checks the --wails-draggable value under the pointer, which is what Wails reads); windows/linux go vet of internal/gui (no assets-only Go change). |
||
|
|
5b28e85999 |
gui: the open-source licenses text takes the dialog's whole width (JiuLiaowkvn on X)
The notices <pre> sat in the editor grid's first column (fit-content 132px, or 35% at 420px) once framed, so only a narrow strip of the dialog showed text. It now spans both columns. Run (mote, chromium + webkit): about-notices.test.cjs, 20 pass. The new width assertion fails on the old CSS (15% of the dialog at 1100, 35% at 420), passes after. Not run: the rest of the GUI suite, full go suite. |
||
|
|
4623f54190 |
gateway: HTTPS for other computers, from magpie's CA or an imported certificate (zhangly1 on X)
zhangly1 on X: Claude on another computer on the LAN needed magpie at https://. Settings → Network and sharing → HTTPS (magpie https on) serves other computers TLS on the gateway's own port, with a certificate magpie's CA (the mTLS one, in ~/.config/magpie/mtls) signs for this computer's names and addresses; this computer keeps plain http://. The switch is read per connection, so no restart. - Certificate row: Import… takes the user's own PEM certificate (with chain) and unencrypted key, in any files and order; a pair that can't be served (no key, no cert, a stranger key, a passphrase, run out, nothing PEM) is refused with the reason in the page's language and leaves nothing behind. Remove goes back to magpie's CA. --tls-cert still comes first. - magpie's CA row: SHA-256 shown, Save puts magpie-ca.crt in Downloads; the gateway serves it without a key at /magpie-ca.crt to any address the share lets in. Rows under it give curl -kO, macOS, Windows, Linux and NODE_EXTRA_CA_CERTS steps with Copy. - A page open from another computer can't turn HTTPS on or off under itself (it would lose its own address). - magpie https status|on|off|import|remove|ca --out; the serve banner names magpie's CA or the imported file instead of "(mTLS)". - docs/reference.md and gateway-routing.md say all of it, and that Windows' curl.exe needs --ssl-no-revoke for any private CA. Run: - gofmt -l clean; go vet linux -tags nogui ./internal/..., GOOS=windows and GOOS=darwin -tags nogui vet of the touched packages (WSL, mote refused ssh all evening). - WSL: go test -tags nogui gateway -run HTTPS|MTLS|ClientCert|CAFile|TLS|LAN ok; gui -run HTTPS|MTLS|Keep ok; settings, settingsapi, mtls ok; cli -run Help|HTTPS|TLS|Serve|Banner|Flag|Unknown ok. The whole cli package hit its 40m timeout in TestEveryAgentFieldNameWritesNothing (#5234, #4247, not this change). - GUI (WSL Playwright, chromium + webkit): https-settings (en, zh, 390px, strings in all four languages) ok, plus mtls-settings, allow-ips, browser-access, cors-origins, gui-de/ja/zh-tw, i18n-keys, i18n-en-no-cjk, lan-*, public-url*, api-key-theme, connect-address-kept, gateway-connect-keys, gateway-caller-keys, side-gateway-lan, menu-scroll. Reds at load ~130: api-key-theme (#5044), connect-address-kept (#5972), gateway-caller-keys (#2572), gui-ja (#5943), lan-docker (#4692), all red the same at base |
||
|
|
6c3f113cee |
routing: a rule's hours over give the conversation back; looser times (MinglunZhu on X)
MinglunZhu asked twice for a provider by time of day and said the time setting in Routing rules is awkward. Three causes: - A conversation a night rule sent to its member stayed there after the hours: no rule matched the new turn, so Auto affinity kept it on the night's member by its cache (Smart and every routing but In order). ruleFor now sets RuleHit.Ended when the last turn's rule had hours that are over, and affine lets the conversation go (Affinity.Why "hours"); the trace says so in en, zh, zh-TW, ja, de. Tool rounds of a turn begun inside the hours stay put; Session, Strict and In turn keep their own way. - The time boxes took only ASCII "HH:MM", while their numeric keypad on a phone has no colon and a Chinese IME types ":". clockOf (GUI) and clockMinutes (CLI, saved files) now read "22", "2200", "930", "22:00", "22.00", "22点30" and full-width digits; "9:5" is still no time. time=22~08 takes ~ and ~ for the dash. - A new rule starts with an intent box; hours took an × and a +. Adding another condition now drops the intent box while it is empty. A time rule in a nested group doesn't give its conversation back yet: #5977. Run (mote): go test ./internal/provider (ok); go test -run 'TestRuleHoursOver|TestRuleTime|TestRule|Affinity|StandIn|Session|TestParse|Clock' ./internal/gateway (ok); go vet darwin, GOOS=linux -tags nogui, GOOS=windows for gateway and provider; gofmt. GUI, chromium and webkit: routing-time (8/8 after the new trace test's fix), and 28 rule/affinity/ i18n files (routing-rule-*, routing-time*, routing-intent-entry, routing-folder, routing-pause*, routing-smart-intent, routing-save*, routing-rules-line, routing-affinity-*, routing-behind-why, routing-kept-again, routing-session-folder, i18n-keys, i18n-en-no-cjk): 477/481, the 4 reds the new trace test's first wording, fixed and rerun. Broken by hand: affine's "hours" case off -> TestRuleHoursOverGiveThe ConversationBack red (Smart stays on kb by cache); origin's grouprule.go/ruleparse.go -> TestRuleTimeTypedLoosely red; client.js's "hours" case and the intent give-way off -> routing-time 0/4 in chromium; the old clockOf -> routing-time red on "9:00". Not tried: the real app with a real night/day pair of providers; the full gateway package and full GUI suite (the full Go suite runs after the tag); Windows run of the touched packages (vet only). |
||
|
|
b96847c3d9 |
gui tests: provider-find leaves the window's in-use signal out of what the page posted
|
||
|
|
72e804d2b5 |
gateway: a provider set Never a fallback takes no other model's request (sonnnnnnnnnnnna on X)
sonnnnnnnnnnnna asked that a request a local uncensored model was given
never falls back to an online provider (Anthropic, OpenAI) when the local
model is full (kv slots) or down, where it could get the account banned.
A provider now has Never a fallback (NoStandIn), off by default: the
Providers page's right-click, under Use first, ticks it; the CLI's
`magpie provider set <id> fallback-for-others=no` sets it. Its keys and
accounts are dropped from a request's plan once a candidate of an
unmarked provider was planned before them (standInsOut, run in planPaused
and in planGroup before restLast and sinkPlanned, so a local model that
failed and is resting still counts as first; a primary with nothing
planned counts too). A request that goes to a marked provider first still
moves on as before, and a weighed group (Smart, Cheapest) that picks a
marked member first sends it there. The dropped rows go to the trace's
left-out list as StandIn; the Routing page says why ("it is set never to
be a fallback for another model"), and the cap, held and barred refusal
checks ignore them so a refusal keeps its old status.
No classifier was built: the model that would judge the request is the
local one that is down, and any other would send the text somewhere the
user didn't choose.
Run on mote (macOS 27) at this tree on
|
||
|
|
e053c337aa |
gateway: join a shared magpie with a password (EV_John_Liu on X)
EV_John_Liu asked for quick setup on a LAN: the central magpie serves a
page behind a password where other PCs and Macs get their config and a
new key of their own.
Settings -> Network and sharing -> Join with a password sets the
password (at least 8 characters; only a salted PBKDF2-SHA256 hash is
kept, in join.json, 0600, written through temp-and-rename; a file that
can't be read or parsed means joining is closed). The row then shows the
address to give out, <shared address>/join, and Turn off joining.
/join is the key page (/me) opened to join: the visitor types a name for
the computer and the password. POST /v1/magpie/join makes a gateway key
named after that computer (or "Joined from <ip>"). The key is listed in
Gateway keys like any other, where it can be limited or removed. The
page shows the key once and then the setup for that key: Claude Code,
Codex, a new magpie tab (`magpie provider add remote-magpie '<key>'
url='<address>'`), OpenAI-compatible and curl.
Every route judged:
- lanGuard lets another machine reach GET /join and the join route
without a key, only while magpie is shared. The route checks the
password itself.
- A browser's POST must come from the page itself. Host must be one of
this computer's own names (IP, localhost, MAGPIE_PUBLIC_URL's, its
hostname), so a DNS-rebound name is refused. Origin must equal Host.
Missing Origin and Origin "null" are refused, and so is any
Sec-Fetch-Site but same-origin. corsGuard still refuses null, foreign
and *.localhost Origins before this. curl and scripts, which send no
browser marks, are judged on the password alone.
- Throttle: each try from another machine costs a token, a right
password too. The bucket holds 10 and refills one every 10s, so a
guesser gets about 360 tries an hour, and a flood of tries makes no
flood of keys. Over the limit the route answers 429 with Retry-After.
- The password and key never go in a URL or a log line. The key comes
back only in a no-store 201 body. Logs name the key's id and the
caller's address.
- The routes are classed in the key-slot and read-only route lists.
They carry no key.
Run on mote at this head (rebased on
|
||
|
|
87b3af7653 |
library: a project turns a global MCP server or skill off, out of git, and its worktrees follow (WhyULose0 on X)
WhyULose0 asked for MCP servers and skills per project: a global set every project inherits, each project that set ± items (a global one turned off for one project too), one place to tick for every agent, nothing written into the project's git, the router running a shared server once, and a new git worktree following its main project. What was there: projects could add skills and servers (Library → a project's card), the MCP router ran each server once, but a project could not turn a global item off, magpie wrote its entries into the project's .gitignore (a tracked file), and a worktree got nothing. What changed: - Turning a global item off in one project (ProjectServerOff, ProjectSkillsOff; POST /api/library/projects/server-off, skill-off), done the way each agent reads a folder: Claude Code's record of the project in ~/.claude.json (disabledMcpServers; magpie takes out only names it put there), Codex's project .codex/config.toml ([mcp_servers.X] enabled = false, only for a server in Codex's own config), Claude Code's skillOverrides "off" in the project's .claude/settings.local.json. - With the router on, a project that adds or turns off a routed server gives Claude Code (local scope in its project record) and Codex (project config) the hub at /mcp/magpie/hub/<agent>~<projectKey>; hubServers serves that address the project's set, each server still started once. gateway.HubAgentOf cuts the key off for the log, errors and on-demand. - Out of git: entries go to the repository's info/exclude (one block per project, shared by every worktree); the .gitignore is left as the user wrote it, and a block an older magpie wrote there is taken out. A folder git-inited later gets its block on the next KeepLinked. - Worktrees: the project's folder in each worktree of its repository gets the same skills, servers and offs, found on KeepLinked, let go when removed. - GUI: a project's card lights each agent that has an item from the Library; a click turns it off (or back on) in that project. An agent that can't take an off (Gemini CLI etc., or a skill that goes through the skill router) stays lit and says why. The Skills menu ticks inherited skills; unticking turns one off. zh, zh-TW, ja, de. Limits, per agent: - Offs only for Claude Code (servers and skills) and Codex (servers). Codex reads the project config only in a trusted project. - A skill reached through the skill router can't be turned off in one project. - Claude Code keys its record by the repository's main top folder, so a project in a subfolder turns its server offs on repo-wide. Run (mote's SSH refused every try today, kex reset; every run went to the WSL box through wsl-run, linux, at load 60 to 80 from other runs): - go test -tags nogui ./internal/library: ok at this head. At the base before ( |
||
|
|
7e1858515b |
remote magpie: name its models by the provider serving them there (lcc580 on X)
lcc580 asked for a pass-through on the Remote magpie provider: show the
upstream magpie's own provider beside each model, so an agent can tell the
same model from two of its providers apart. Before, the names followed
both magpies' Provider in model names: with either one Off, both relays'
DeepSeek Chat reached the agents as "DeepSeek Chat · Office" (or plain
"DeepSeek Chat").
- The list a magpie gives another magpie (X-Magpie-Drawers) now names,
as magpie_by, the provider serving each model there (Entry.ServedBy):
"routing group" for a group, and for a model of its own Remote magpie
the provider at the start of that chain. The fetch keeps it as the
model's By (catalog/live.go).
- A Remote magpie provider gets upstreamProviders: the editor's "Model
names" tick ("With the provider serving it there"), or
`magpie provider set <id> upstream-providers=on`. With it on, each of
its models is labelled "DeepSeek Chat · Office › Relay A" in every
agent's list, whatever either magpie's Provider in model names says,
unless the user named the model themselves under Own
(Entry.Label/upstream, LabelsFor). Model settings' "Agents' lists show"
line follows the tick at once.
- Ids are unchanged, so a request still goes by office/relay-b/model.
Off (the default) names everything as before. A remote older than
magpie_by has nothing to add, so its names stay as before.
- The core's scripts stay in budget: four long comments in app.js were
cut to pay for it, no raise.
Run:
- Tests that fail on the old code: TestRemoteMagpieUpstreamNames
(gateway: an httptest remote with two relays' DeepSeek Chat and a
group, every Provider in model names mode, on and off, the third
magpie's magpie_by, ids kept), TestServedByAndUpstreamLabel (provider),
and name-suffix-remote.test.cjs's new case (tick, hint, save body).
- Broken by hand: upstream() returning "" and the magpie_by line removed;
both Go tests went red with the plain labels, then restored.
- Two real gateways, built -tags nogui on the Linux box (WSL) under
sandbox HOMEs: B with Relay A and Relay B both serving deepseek-chat,
A with B as Remote magpie "Office". A's /v1/models before:
"DeepSeek Chat · Relay A · Office"; after
`provider set office upstream-providers=on`:
"DeepSeek Chat · Office › Relay A" / "› Relay B" / "› routing group".
A request for office/relay-b/deepseek-chat reached relay-b on B.
- gofmt -l clean; go vet darwin, linux (nogui), windows on the touched
packages; go test catalog, provider, gateway, cli, gui on mote
(macOS) at the rebased head: ok (catalog 2.6s, provider 165s, gateway 948s, cli 56s, gui 149s).
- GUI on mote, chromium and webkit: name-suffix-remote, remote-magpie,
remote-self, i18n-keys, i18n-en-no-cjk, gui-ja, gui-de, gui-zh-tw,
provider-detect-draft, provider-unmasked, routing-remote-windows,
usage-remote-cards: all green except reds that fail the same on origin/main
|
||
|
|
6bac8f8a59 |
gui: magpie web on a phone has a tab bar with More (geraldpppppp on X)
On a phone, magpie web's pages sat in a strip under the header that scrolled sideways, with nothing to show that more pages lay past its edge. Agents, Library and the rest looked missing. The pages are now a tab bar at the foot, as an iPhone app's (HIG): each tab its mark over its word, the page open marked. Five tabs at most: with more pages than that, the fifth is More, and its menu lists the rest with their marks and a tick on the open one. More is marked while one of them is open, and it carries the dot when one of them has one. phonetabs.js does this. app.js loads it lazily only on a phone, so the core script doesn't grow. A status line comes up over the bar. The bar is only for the window, never the tray panel (body.panel). Agents still isn't shown in gateway mode on a machine with no agents, as designed (Settings > General > Gateway mode brings it back). Library has been shown in gateway mode since |
||
|
|
388ca9ad45 |
agent: Claude Desktop says how to go on with the signed-in chats on magpie (Jacky_yyyyyyyy on X)
Jacky_yyyyyyyy on X asked that connecting Claude Desktop keep the earlier chats and let them be continued. They are kept already: in 3p mode Desktop runs in Claude-3p (its own userData), the signed-in profile's Code and Cowork sessions stay untouched in Claude/, claude.ai chats stay on Anthropic's servers, and Off brings them all back ( |
||
|
|
a1ba92ad8c |
library: a market of Pi's packages, installed and removed by pi itself (nineruiing on X)
Library -> Pi now has a Discover list of Pi packages: npm packages with the pi-package keyword (pi's own docs: the keyword makes a package eligible for the pi.dev/packages gallery), sorted by monthly downloads, with search. Like the other markets it ships a 500-entry snapshot (market_pi.json), keeps a 6h memory and disk cache, and refreshes from npm. Install and remove run that Pi's own `pi install npm:<name>` / `pi remove npm:<name>` with PI_CODING_AGENT_DIR set to its folder, so settings.json's packages list and <agentDir>/npm are written by pi, not by magpie. Each card says which Pis have it; Install goes straight to the only Pi without it or asks which one; the Pi's list gets a remove button behind a confirm. New routes: GET /api/library/market/pi, POST /api/library/pi/install and /api/library/pi/remove. Run: - mote: go test -count=1 -timeout 45m ./internal/library ./internal/cli ./internal/gui at this head: ok, ok, ok. - mote: gofmt -l clean; go vet of library, gui, cli for darwin, linux (-tags nogui) and windows: ok. - mote: library-pi-market, library-pi-extensions, i18n-keys, i18n-en-no-cjk in chromium and webkit: 52 of 52; the 17 market and library GUI files: 598 pass, 0 fail (pre-rebase tree). - win-run: go test -tags nogui ./internal/library -run 'TestPi|TestMarket' ok (TestPiRunGivesAgentDir skips on Windows). - wsl-run: library TestPi|TestMarket ok; library-pi-market 22 of 22. - Real pi 1.5.1 in a sandbox HOME on WSL: PI_CODING_AGENT_DIR=$A pi install npm:pi-btw wrote packages ["npm:pi-btw"] beside the existing theme and installed node_modules/pi-btw; pi remove put packages back to []. The live ~/.pi was untouched. Broken by hand (each red, then green restored): - the pi-package keyword filter dropped: TestPiMarketFromNPM; - the name check dropped in the market: TestPiMarketFromNPM; - the name check dropped in install: TestPiInstallAndRemove; - PI_CODING_AGENT_DIR not set: TestPiRunGivesAgentDir; - the identity dedupe dropped: TestPiInstallAndRemove; - the installed marking always "live": library-pi-market 11 of 11 red. Not tried: a real magpie binary driving pi install end to end; pi on native Windows; git: and local package sources (the market lists npm only, and the Pi's list still shows and removes them as before). |
||
|
|
10c4dc109a |
update: a restart by itself waits while magpie's window is in use (BESTLJP0412 on X)
With Restart automatically on, magpie restarted to update as soon as the
gateway was idle, even while the user was adding a provider or changing
settings in its own window, which closed what they were doing.
The page now tells the app it is in use: any pointerdown, keydown, input
or wheel posts /api/update/using (at most every 20s, and at once when a
dialog opens or closes, with whether #modal is open). inUseAt holds a
restart for 2 minutes after the last input (usingFor), or 15 minutes
while a dialog was open at the last input (openFor). waitFor skips the
restart while the window is in use, unless the restart was asked for
(the tray's Restart to update, Settings' Restart now), which still
restarts at once. A `magpie update` from a terminal (restartBeside) waits
the same way. The route writes nothing, so held doesn't drop caches for
it. /api/update says `using`, and Settings' Version row and the Update
pill add "waiting while you use magpie" (en, zh, zh-TW, ja, de).
docs/subsystems/gui-shell.md describes it.
Run (mote, at this head):
- go test -run 'AutoRestart|Wait|Idle|Restart|Using|EveryRoute|CoreScript|Budget'
./internal/gui/ ./internal/cli/: ok.
- go vet darwin, GOOS=linux -tags nogui, GOOS=windows for internal/gui
and internal/cli: ok. gofmt -l: clean.
- GUI, chromium and webkit: update-using (new), every update-*.test.cjs
and i18n-keys.
- TestCoreScriptBudget: fits with no raise. Main had 40 bytes left, so
the update code's comments next to this change were cut to one line
each (no code, every issue and reporter kept): 1,533,641 of 1,533,802.
- One webkit run of update-wait.test.cjs had a red subtest while mote
needed 10 ssh tries (its output was cut by my grep, so not filed);
update-wait passed 3 of 3 in webkit at this change and 3 of 3 on
origin/main
|