Commit Graph
7893 Commits
Author SHA1 Message Date
yetone f8a00a3bee site: a quota page in en, zh and ja
/docs/quota says how to see what is left of every subscription, plan
and key: magpie quota and --json (lastServedAt, last), refresh (a Claude
account read by running /usage), GET /v1/magpie/quotas and its history
endpoint, reachable from another machine only while shared on the local
network, the magpie-quota skill, alert by percent and --balance, quota
wait with its exit codes and the until-loop for a stopped Codex job,
history kept 45 days, and a Codex account's reset, auto-reset and
credits. Every claim is from quotaUsage in internal/cli/quota_cli.go and
docs/subsystems/library.md, with the Usage and Library labels' zh and ja
from i18n.js. Linked from each language's routing groups page; in the
sitemap, llms.txt and llms-full.txt.

Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test site/*.test.mjs on the WSL box (magpie-desktop, wsl-run):
116 pass, 0 fail.
Not tried: running magpie quota against real accounts for this page; it
names only what magpie's source says.
2026-11-13 02:16:14 +08:00
yetone 9eda623406 docs: lessons: a script Settings loads runs in the panel too (#6139)
22f2759d7 left agent-prefs red for two days; 41e330bdf fixed it.
Docs only; nothing run.
2026-11-13 02:11:22 +08:00
yetone 41e330bdf8 gui: an agent's settings sheet opens from the panel again (#6139)
22f2759d7 (11-11, Settings › General › Sidebar pages) added
renderNavPages, which read $("#nav").querySelectorAll before it
looked at the mode. The panel has no #nav (app.js removes it), so
every Settings draw in the panel threw once navpages.js had loaded.
The second draw is the one openAgentPrefs waits on (loadSettings), so
in the panel the "Claude Code settings" and "Grok Build settings"
menu items opened nothing. #6139 was filed 46 minutes after
22f2759d7 and was seen again twice with no owner (#6311 its
duplicate).

renderNavPages now hides its row and returns before it reads #nav
outside a window. Its siblings (navHides, markNav, show) already
check mode === "window".

Found with a pageerror stack: "Cannot read properties of null
(reading 'querySelectorAll') at window.renderNavPages
(navpages.js:9)". agent-prefs' "in the panel a Settings line and the
agent's menu open its sheet" was red in both engines and all five
languages at 35aaaa4b9^, 35aaaa4b9, 8c7328f3a and origin/main
5f1a642b4^ (timeout at agent-prefs.test.cjs:192).

Run (mica, at this tree): node --test agent-prefs.test.cjs pass 56
fail 0 (both engines, every language), nav-pages-hidden pass 2,
i18n-keys pass 4.
2026-11-13 02:10:55 +08:00
yetone 5f1a642b42 docs: a commit's tree is origin/main plus its own change, in the code standards
Seen a third day: 8c7328f3a (11-13, remote quotas) was committed from a
stale tree and wrote 21 files back to their state before 35aaaa4b9,
taking out three commits (put back in 926b1e7df), after 85e6ec540
(11-11) and 76ceff87c (11-12). The rule moves from LESSONS.md into
docs/code-standards.md's Commits section, and LESSONS.md lists it under
Moved to the code standards. Docs only; nothing run.
2026-11-13 02:01:18 +08:00
yetone 19fd0dfb87 catalog: mmddSnapshot compiles on first use
1ca2c62c4 added a package-level regexp.MustCompile, so
TestNoEagerPackageRegexps was red (catalog.go:1184). It is a
lazyre.New now, as the file's other patterns are, and catalog.go no
longer imports regexp.

Run (mica): go test -count=1 -tags nogui ./internal/catalog . ok;
GOOS=linux and GOOS=windows go vet ./internal/catalog ok.
2026-11-13 02:00:40 +08:00
yetone b552740c4b cli: name POST /api/settings/codex-client and codex-open as not yet a command
35aaaa4b9 (codex-client) and ee1553913 (codex-open) each added a
settings route with no command and no notYet entry, so
TestEveryRouteHasACommandOrIsNamed was red on CI at 65f1fdd1d (macOS
and ubuntu). Both are a setting saved by its own route, like the other
codex-* settings beside them (S2).

Run (mica): go test -count=1 -tags nogui ./internal/cli . ok.
2026-11-13 02:00:40 +08:00
yetone 926b1e7dfb provider, gui: put back what 8c7328f3a took out of main by mistake (35aaaa4b9, 2fa79aef3, 797a23cad)
8c7328f3a (remote quotas: a Remote set to Select none still tells its
cards) was committed from a stale tree. Beside its own three files
(docs/subsystems/providers-accounts.md, remote_quotas_scope.go,
remote_quotas_test.go) it wrote 21 files back to their state before
35aaaa4b9, which took out:

- 35aaaa4b9, the Codex client setting (codex_request.go, codex_tier.go,
  settings.go, settingsapi.go, api.go, app.js, i18n.js, index.html,
  codex-client.test.cjs and the rest);
- 2fa79aef3, a save of the bytes a file already holds changes nothing
  (#6289: logins.go, logins_unchanged_test.go);
- 797a23cad, the tray's words (traywords.go, traytip_words_test.go).

The 21 files are checked out from 8c7328f3a^. After this commit
`git diff 8c7328f3a^ --stat` names only the three remote-quota files,
so main is the three lost commits plus 8c7328f3a's own change.

Run (mica, at this tree): gofmt -l clean; go test -count=1 -tags nogui
./internal/provider ./internal/settings ./internal/settingsapi ok.
./internal/cli and . are red on main already, not from this: the
codex-client and codex-open routes have no notYet entry, and
catalog.go's mmddSnapshot is compiled at launch (1ca2c62c4). Both are
fixed in the next two commits.
2026-11-13 02:00:40 +08:00
yetone f1f512c1ec library: a repository's heading folds an agent's profiles into one chip, and a row's profiles chip lines up with the hand (Yanzhongixuy on X)
0.1.3926, several Hermes profiles: the Skills page's source headings
(anthropics/skills ...) drew one icon per profile, a long strip, and the one
chip 2a1111cba made on a row sat out of line. That commit said "Rows only":
groupChips never set change.rows, so headings kept every profile. The row's
chip had data-members, not data-agent, so the fan/stack translate rules in
library.css never reached it.

groupChips now sets change.rows, and its profiles chip is half lit when a
profile has some of the skills. library.css applies the fan rules to
[data-members] chips too. docs/subsystems/library.md says so.

Files: plugins/library/client.js, plugins/library/library.css,
tests/library-profile-group.test.cjs (new), docs/subsystems/library.md.

Run on mote: library-profile-group.test.cjs (new; chromium + webkit, en/zh/
zh-TW/ja/de, 420 and 980px, 22 cases): 22 of 22 green; broken by hand (old
client.js and library.css) 22 of 22 red (13 Hermes chips, not 1); old
library.css alone 22 of 22 red (chips out of line). The Library GUI files,
group-skill-chips and i18n-keys ran in both engines: the only reds are
library-loading's chromium and webkit cases, red on origin/main
8c7328f3a6 too (run there alone, 2 of 6
red), filed as #6204.
Not run: the full Go suite and the 113-file GUI run's final tally (still
running when pushed), Linux WebKitGTK, a real Hermes install with many
profiles.
2026-11-13 01:42:52 +08:00
yetone 625f3db114 site: a routing groups page in en, zh and ja
/docs/routing-groups covers both levels of magpie's routing: several
accounts or keys on one provider (the editor's Routing and Stays, shown
once a second one is on, and what one rate limited with quota left does:
Keeps its place or Goes to the back), and routing groups across
providers (auto-found groups, members, nested groups, patterns, By
weight and Manual, rules, reasoning per member or by a classifier).
Each routing and Stays choice is worded from app.js's ROUTINGS and
STAYS and routing/client.js's options, with their zh and ja from
i18n.js and plugins/routing/i18n.js; the CLI lines and templates are
from groupUsage in internal/cli/groups_cli.go. Linked from each
language's subscriptions page; in the sitemap, llms.txt and
llms-full.txt.

Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test site/*.test.mjs on the WSL box (magpie-desktop, wsl-run):
116 pass, 0 fail.
Not tried: making a group or rotating real accounts for this page; it
names only what magpie's source says.
2026-11-13 01:42:34 +08:00
yetone 8c7328f3a6 remote quotas: a Remote set to Select none still tells its cards (@LOYSoLuI4PG4WlN on X)
On 0.1.3929 a Remote magpie added for the Usage page's quotas showed none
of the remote's subscriptions any more. cfd49e36a made a Remote's cards
follow its enabled models, and remoteCardWanted answered no card at all for
a provider that serves no model (Select none). Select none is documented to
serve no model while its balance and usage are still read and shown
(Provider.NoModels), and a Remote kept only to read quotas is set that way.
Now every card is wanted then; picks still narrow cards by their whole
provider path (93b855d90), and a list not read leaves all shown.

Run (mote): TestRemoteSelectNoneStillShowsItsCards is red on origin/main
797a23cad's scope file put back by hand ("map[]") and green with the fix;
-run 'Remote|Quota|Card' in internal/provider and internal/gateway ok;
go vet darwin/linux/windows of both packages ok; gofmt clean. GUI: remote-*,
usage-*, routing-remote-windows, panel-usage*, name-suffix-remote and
statusline-remote files in chromium and webkit: 74 red, all in usage-agents-hide,
usage-cards-hide, usage-fold, usage-hidden-way-back, usage-ledger,
usage-range-times, usage-speed-all-models, usage-compact-counts and
remote-magpie's address test; the same files are red the same on origin/main
797a23cad (75 red), already filed (#6003, #5475, #3414). The change is Go only.
Not tried: a real second magpie in sandbox HOMEs (a fake peer in the test),
the full Go suite (started after the tag).
2026-11-13 01:25:57 +08:00
yetone 797a23cade gui: the tray holds its page words in one language, not all four
The tray's tooltip names a usage window as its card does, with the
page's own translations from assets/i18n.js. pageWords parsed all four
language blocks (zh, zh-TW, ja, de, ~20k entries) once and kept them for
the life of the process: 6.5 MB of an idle tray magpie's heap, for the
few dozen words one language needs. It now parses only the block of the
language asked for and keeps that one; a change of language reads the
file again.

Run (real account sandbox on mote, `tray`, no page, 150 s):
- w35 (before): footprint 71 MB, live heap 16.7 MB; pageWord 6.5 MB cum.
- w36 (this):   footprint 67 MB, live heap 12.4 MB; pageWord 0.5 MB cum.
On mica: go vet ./internal/gui; go test -run 'PageWords|TrayTip|Tray'
./internal/gui ok, with a new TestParsePageWordsInOneLanguage (one block
read; ja then zh each give their own word). gofmt clean.
Not run: the full suite.
2026-11-13 01:19:34 +08:00
yetone 2fa79aef35 provider: a save of the bytes the file already holds changes nothing (#6289) (KdhsiiKshshhs on X)
writeLogins and writePrivate rewrote logins.json with identical bytes, which
moved its mtime and called filememo.Forget, so every read after parsed the
230 KB file again (anton1615 measured 182 reads in 15 s, CPU 3.3x after each
write). Now a file that holds exactly these bytes, at the mode the write
would give it, is left alone: no lastgood generation, no rename, no Forget.
A stat or read that fails is "not equal" and writes as before. Real changes
keep steady.WriteFile's temp-and-rename. The same check is in writePrivate,
writePrivateQuiet and (writeChanged) the sibling writers of codex-autoreset,
codex resets-used and Kiro's token file.

Nothing else bumped the mtime in the reporter's path: the other writers of
logins.json (rememberLogins, Claude/Codex sign-in syncs) all go through
writeLogins. Changed() still runs on a told save, so a list built before it
is not reused (TestLoginsListedOnceARequest unchanged).

Run on mote: TestUnchangedLoginsSaveKeepsFileAndParse and
TestWritePrivateSameBytesLeavesFile, -count=20 green; both red with
fileHolds forced to return false (mtime moved). gofmt clean; go vet on
darwin, linux nogui, windows nogui; go test -tags nogui ./internal/provider
./internal/filememo ./internal/lastgood (result below in the push notes).
Not tried: the reporter's 130-account gateway; the full suite before the tag.
2026-11-13 01:18:47 +08:00
yetone 35aaaa4b94 codex: a setting for which client the requests to ChatGPT say they come from, CLI or Codex Desktop (ouhthuo on X)
ouhthuo wants the originator "Codex Desktop", with which, they say, a
high-effort gpt-6.1-sol request is routed to a newer model. magpie sent
codex_cli_rs on every request, and codexSign even overwrote a real Desktop's
own originator.

Settings > Codex > "Codex client" (CLI, the default, or Codex Desktop; the
settings key codexClient is "" or "desktop", POST /api/settings/codex-client,
no free text). codexClientHeaders is the one place that sets originator and
User-Agent, so the model requests, the /wham usage and reset calls, the token
refresh, the device and code sign-in exchanges and "test as" all follow it.
Desktop sends originator "Codex Desktop" and the UA shape codex-rs builds for
it: Codex Desktop/<codex version> (<os>; <arch>) unknown (Codex Desktop; <app
build>). Source: codex-rs login/src/auth/default_client.rs and a captured
Desktop UA. The default is unchanged; base_instructions and the identity
prompt are untouched. The OAuth authorize URL keeps codex_cli_rs.

The row sits in the Codex agent preferences, 5 languages. The two Codex menu
buttons share one helper (codexMenuPick) so app.js stays inside its budget
without raising it.

Run (mote): TestCodexClientSetting (red with codexClientHeaders ignoring the
setting), settings, settingsapi, gui and provider Codex tests ok; gofmt clean;
go vet darwin, windows and linux nogui clean; GUI codex-client,
codex-service-tier, codex-open-button, i18n-keys, i18n-en-no-cjk,
settings-general, click-scroll in chromium and webkit ok. Real Codex account
in a sandbox HOME: gpt-6.1-sol and gpt-6-sol at high effort answer under both
identities with identical usage; the reply's model field only echoes the
requested name, so whether the served model differs can't be told from here.
Red and not mine, already filed: settings-search (#6133, #5982) and
agent-prefs "Settings line" (#6139) fail on origin/main, TestMoveToPlugin
#5524.

Not tried: the real Desktop app (not installed here); the app build number
in the UA is the newest seen in local logs and can go stale.
2026-11-13 01:17:30 +08:00
yetone b4821050a8 lessons: a commit's stat names only the files its change touched (76ceff87c)
76ceff87c, built on an older base, took out 7c37424fc and d6b5f24db with
their tests (restored in 8097860ab); 85e6ec540 did the same on 11-11.
Seen 2x, kept as its own lesson. Docs only; nothing run.
2026-11-13 01:08:07 +08:00
yetone 0f0f391e67 site: a web search page in en, zh and ja
/docs/web-search says how magpie gives web search to models that can't
search (DeepSeek, GLM, Qwen) when Claude Code's WebSearch or Codex's
web_search reaches them: Settings › Models › Web search, Search first
with, a provider that searches for other models (one magpie picks gives
way to the next, up to three; one you pick to If it fails, then the
Search APIs only when it can't serve at all), the providers that search
for their own models first, provider search turned off, the Search APIs
and magpie search's CLI (keys in turn, pick=order, url=, count, mix),
Models that search by themselves, and the MCP server at
/mcp/magpie/web-search with web_search and web_fetch. Facts from
internal/cli/search_cli.go, docs/subsystems/gateway-routing.md and
gui-shell.md, with the GUI's labels and their zh and ja from app.js and
i18n.js. Linked from each language's DeepSeek page; in the sitemap,
llms.txt and llms-full.txt.

Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test site/*.test.mjs on the WSL box (magpie-desktop, wsl-run):
116 pass, 0 fail.
Not tried: a search through a real searcher or Search API for this page;
it names only what magpie's source and docs say.
2026-11-13 01:07:39 +08:00
yetone 227171f69b tests: the tallies fixtures key a seat with a plan as the gateway does (RayYanOnline on X)
routing-acts-calm and routing-acts-idle wrote the day's tallies under the two-part key; tallyKey adds the plan since 2240e5b34 (d6b5f24db), so the page folded a seat's tally and its live request into two cards. They key as the gateway does now. Run (mote): both files in chromium and webkit, 11 and 7 of 7 pass; routing-day-tallies and routing-sign-in-again carry no plan.
2026-11-13 01:06:10 +08:00
yetone 1488762dae settings: MCP server addresses get the This computer / Local network switch (xzhih on X)
Settings > Models showed Image recognition's, Image generation's and Web
search's MCP server at 127.0.0.1 even on a magpie shared on the network.
While sharing is on, each address row now has a switch beside it, This
computer and the far address named as the gateway names it (addrWho: Local
network, Public address, On the internet). The far address is the one the
sidebar uses (sideLAN), so MAGPIE_PUBLIC_URL, container and LazyCat rules
carry over; nothing is copied. The pick is kept (magpie.mcpWhere); an app
starts at This computer as before, a page other machines opened (magpie
web) at the far address. Sharing off: no switch, as before. The Library hub
and the plugin tools line follow the pick through mcpAddress (no switch of
their own).

The two image rows moved from app.js into plugins/gateway/settings.js with
the switch; app.js ends smaller, and the core budget is met.

Run on mote at this tree: mcp-address-lan.test.cjs (new, 22 tests: chromium
and webkit, en zh zh-TW ja de, 1100 and 420px) 22 pass; with mcpAddress's
hook removed 11 of 11 chromium tests fail. vision-mcp, image-mcp,
search-mcp, public-url-default and 98 tests in all pass; the lan/mcp/
gateway/settings/search/vision/image GUI subset (122 files, 2181 tests): 2114 pass, 67 fail; the six failing files I reran (side-effort, settings-hints, settings-search, lan-join, images-codex-one, settings-lines-wrap) fail the same 35 tests on a clean origin/main copy, so they are not from this change; filed separately. The other failing files' names were lost to a tail (not reread). go test
./internal/gui (core budget included) ok; go vet darwin, linux nogui,
windows ok; gofmt clean.

Not run at the rebased head: the Go suite beyond internal/gui; the whole GUI suite and go test ./... (mote and mica both held a
GUI suite; queued after the tag). Not tried: a real LAN server. Library
hub address and the plugin tools line show the picked address but have no
switch of their own; they read it when drawn.
2026-11-13 01:02:07 +08:00
yetone 8097860ab1 gui: put back what 76ceff87c took out of main by mistake
76ceff87c was built on an older base and its tree dropped the Linux
backdrop-blur rule (7c37424fc) and Codex seats change (d6b5f24db) with
their tests, docs and history.go edits. This restores those files from
d6b5f24db; the diff against d6b5f24db is now only the hours feature.
Run: git diff d6b5f24db --stat lists the usage files alone.
2026-11-13 01:01:43 +08:00
yetone 1ca2c62c49 catalog: a relay's deepseek-v4.1-flash is priced at DeepSeek's, whose entry names it by a dated canonical id (Winnie7572 on X, #4811, #5622)
models.dev lists DeepSeek's V4.1 Flash only as deepseek-flash with
canonical_model_id deepseek/deepseek-v4.1-flash-1017. The canonical
fallback (#1520) matched the undated id alone, so every relay serving
deepseek-v4.1-flash (Open Design, WorkBuddy, Tencent Cloud) had no price
and no estimated cost. priceIndex now also keys a maker's own canonical
entries with a trailing snapshot date (-MMDD, -YYYYMMDD, -YYYY-MM-DD)
taken off, tried after the exact and dashed keys, so a price a vendor
lists by the id as given still wins. Only the provider that is the
canonical's maker counts, as before, so no other vendor's model is priced.

Open Design's other models were checked with the plugin's real ids
(packages/opendesign models.mjs) against models.dev: every one but
deepseek-v4.1-flash and deepseek-v4.1-flash-eco was already priced.
-eco is the plugin's own id, not a snapshot, and stays unpriced (filed).

Run (mote, at this tree): go test -count=1 for internal/provider,
catalog, usage, gui all ok; go vet darwin, windows, linux nogui ok.
New TestRelayDeepSeekSnapshotCanonicalPriced (models.dev entries in
testdata/models_dev_opendesign.json) is red with the snapshot key
disabled by hand. TestCommandCodePlanPrice's relay case asserted the gap
("a relay took Command Code's list price" for an unpriced model); it now
asserts DeepSeek's price, which Command Code's plan still beats with its
own catalog. Not tried: a live Open Design account.
2026-11-13 01:01:23 +08:00
yetone 76ceff87c9 usage: a number of hours the reader sets, beside the calendar (eachg0 on X)
The range menu behind Custom has a top row, "[N] hours back". Enter asks
the Usage page for the rolling window last:Nh (1 to 720), which the
backend already answers for every view (totals, chart, models, accounts,
Requests); the chip reads "Last 30 hours". The pick and N are kept on this
device (magpie.usagePeriod, magpie.usageHours). 24 stays the preset's
chip, and an empty page, the credit days and the menu-bar way in know the
new period. zh, zh-TW, ja, de strings added.

Run (mote, at the rebased head): usage-hours, usage-24h, i18n-keys in
chromium and webkit, en and zh. Broken by hand: keptPeriod limited to the
presets turned usage-hours red (expected last:30h, got today).
Not tried: the whole GUI suite (queued on mote's suite.lock behind other
sessions, still running), narrow widths by hand, the tray panel (it has no
24h chip and is unchanged).
2026-11-13 01:00:14 +08:00
yetone d6b5f24db5 routing: Codex seats of one name are not folded into one account card (RayYanOnline on X)
The accounts list on the Routing page folded accounts by provider and name, so a Team seat and a Pro Lite login (or two logins) that carry one email read as a single card, and the day's counts of all of them went to it. An account is now told apart by its plan as well: the page's foldActs key and the gateway's tallyKey add the lowercased plan when it has one; a seat with no plan keeps the two-part key, so stored tallies and fixtures are unchanged. The key still ignores the id, which flips between codex and codex@user when the live login switches.

Run (mote): routing-codex-seats.test.cjs, chromium and webkit, en zh zh-TW ja de: 5 of 5 each. Red on the old client.js (4 cards where 3 are wanted). TestTallyKeyTellsPlansApart and the tallies tests ok; go test ./internal/gui ok; go vet darwin, linux nogui and windows ok; gofmt clean.
Siblings: the TUI draws no account names (no Who use in internal/tui); the combo picker names members from groups.accounts, which already carries the backend's distinct names (email · Team, email · workspace).
Not tried: the reporter's real accounts; the whole GUI suite and the full Go suite are run after the tag.
2026-11-13 00:57:33 +08:00
yetone 7c37424fcf gui: the Linux app draws without backdrop blur, which WebKitGTK repaints on the CPU each frame (Lsheng2012 on X)
Lsheng2012 (CachyOS, KDE, i7-12700H, RTX 3070 Ti Laptop) found the UI laggy.
webkit_linux.go turns accelerated compositing off under Wayland and without a
GPU, and there every backdrop-filter is software-painted for its whole box
each frame. body.linux now drops it on .modal, .pop, the panel's profile
chips, Settings' sticky head and the confirm ::backdrop. Layout unchanged.

Measured (WebKitGTK 2.52.6, Xvfb on magpie-desktop, 240 rAF scroll frames of
600 rows, 1100x760): no blur 16.2ms, sticky head blur 16.2ms, full-window
modal blur(8px) 25.0ms with compositing off (16.4ms with it on).
Run: linux-no-backdrop-blur.test.cjs in chromium and webkit on mote (green;
red with the rule removed by hand), go test ./internal/gui asset tests.
Not tried: NVIDIA, Wayland/KDE, the omarchy VM, a full suite. The sticky head
cost nothing in the probe, so the modal is the measured gain; if the reporter
is still laggy the cause is elsewhere (CPU painting at HiDPI), and we ask for
their session type, driver and version.
2026-11-13 00:47:41 +08:00
yetone 65f1fdd1d1 gui: the history's warm-up starts with the app's page, not at start
sessionRoutes started warmSessions when the routes were made, so a
magpie started at login, by `magpie tray`, or as `magpie web` with no
page read every session's stats, the Requests page's whole history and
Codex's effort for nobody. What those reads kept went two minutes later
(statsIdle, requestIdle), so the reads were pure cost unless a window
opened in those minutes. The warm-up now starts when the app's page is
first served (GET / or /index.html, not mode=panel); the steady GC
setting is still made with the routes. On Linux and Windows the main
window is still made at start, so the warm-up runs there as before.

Measured on mote with the real account's history (~15.6k sessions),
the sandbox HOME at ~/r2278/acct, proxies to 127.0.0.1:9:
- `tray` start, CPU in the first 30 s: w34 2.67 s, w35 0.96 / 1.04 s.
- `web` with no page, at 150 s: footprint 104 -> 64 MB, live heap
  62 -> 9 MB, CPU 2.52 -> 0.65 s.
- normal launch (window shown): the warm-up still runs in the first
  30 s (warmStart 0.84 s, warmStats 0.47 s, QueryPage 0.31 s), as on
  w34 (0.73 s).
- `panel` start: no warm-up in the profile, 1.62 s CPU, no panic.

Tests: TestWarmsSessions (app page, panel page, assets, HEAD), and
-run 'TestWarmsSessions|TestPanelOnFirstOpen|TestMainOnFirstOpen|Warm|Cold'
./internal/gui ok on mica; go vet ./internal/gui and GOOS=windows go vet
./internal/gui ok.
Not run: the full suite, the GUI suite (no page script changed), Linux
GUI vet (no gtk4 dev packages in WSL).
Not tried: a first Sessions page asked within seconds of opening the
window after a hidden start; it takes turns with the warm-up
(coldTurns), as a first start's window did before.
2026-11-13 00:32:17 +08:00
yetone ad623e303b site: an agent drift troubleshooting page in en, zh and ja
/docs/agent-drift says what the Agents page means when it marks an
agent off magpie, one section per kind magpie reports: its config was
changed (unwired), a magpie model was replaced by the agent's own
(replaced: Apply again, or Keep current settings), it was used without
reaching the gateway (bypassed: quit and reopen it), nothing answers at
an address off loopback (unreachable: WSL's firewall rule, mirrored
networking, Share on local network, a portproxy, Use {url}), and Codex's
proxy not passing requests on (proxied: a DIRECT rule, NO_PROXY,
Windows' proxy exceptions). It also covers what isn't flagged (a move
between magpie models, a hand-written magpie provider) and Disconnect
from magpie. Each claim is from internal/agent/applied.go, reach.go and
codex_proxy.go, with the GUI's labels and their zh and ja from app.js
and i18n.js. Linked from each language's troubleshooting page (WSL
section); in the sitemap, llms.txt and llms-full.txt.

Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test site/*.test.mjs on the WSL box (magpie-desktop, wsl-run):
116 pass, 0 fail.
Not tried: making an agent drift by hand for this page; it names only
what magpie's source says.
2026-11-13 00:31:02 +08:00
yetone 6acf5ee5c3 providers: StepFun's logo is the current mark, five squares in a circle (zzstar101 on X)
magpie drew StepFun's old stepped-S in blue. StepFun's own sources show
the new mark: stepfun.com's favicon (step_favicon.svg), the Hugging Face
org avatar of stepfun-ai (the step-5-preview card), and lobe-icons'
`stepfun` (mono). lobe's `stepfun-color` is still the old mark, so there is
no colour one to take; the mark is one tone, so it is stored as the mono
icons are (icons/stepfun.svg, currentColor, drawn as a mask that follows
light and dark). The presets (StepFun, StepFun China), the "step" model-maker
rule (IconForCatalog's table) and Step Code use "stepfun". A provider saved
with "stepfun-color" keeps working: that file now holds the same new mark
in black, which the one-tone check draws as a mask too.

Run (mote): go test of internal/provider and internal/agent ok; go test
-tags nogui ./internal/gui ok; GUI files stepfun-per-provider, icon-one-tone,
mono-icon-redraw, models-add-and-icons, icon-tile, nav-sub-icons ok in
chromium and webkit; a screenshot of the Providers list in chromium and
webkit, light and dark, shows the new mark for both icon names.
usage-cards-hide's "de 560" sideways scroll is red in chromium and
webkit, and the same on origin/main aa744b9ed without this change
(#6294). Broken by hand: the old mark in stepfun.svg makes
TestStepFunLogoIsTheCurrentMark red.
Not tried: the Linux WebKitGTK window; the full suite before the tag.
2026-11-13 00:11:37 +08:00
yetone ee1553913d gui: Codex's Agents row has an Open button, for the app or the terminal by a setting (Yink88564391 on X)
The Codex row on the Agents page now has an Open button beside the start
button. It opens the Codex desktop app (mac and Windows) when it is
installed, else Codex's CLI in a terminal. "Open Codex with" in Codex's
details (Automatic, Codex app, Terminal) picks which; it is this computer's
own setting (settings.CodexOpen, kept across a sync and a Settings save).
The row menu's Open in terminal still opens the terminal. The web build has
no button.

Run (mica): go test internal/gui, agent, settings, settingsapi, provider
ok; gofmt clean; GOOS=windows vet and GOOS=linux -tags nogui vet clean;
GUI codex-open-button (62), agent-open-terminal (24), i18n-keys,
codex-service-tier in chromium and webkit, en/zh/zh-TW/ja/de, narrow.
agent-prefs lists the new row.
Broken by hand: codexOpensApp always false turns TestCodexOpenButton red.
Budget: coreScriptBudget +1,112 for this code, packed small, no page to
move it to.
Reds on main before this change, same count at e18aca103 without it:
agent-details-ready (16 chromium), gui-ja and gui-de (one string),
agent-prefs panel-sheet test (5 chromium), and from 4e0026661
plugin-signed-out-account, plugin-signin-no-url, saved-signedout-remove,
signin-proxy. Not caused here; not fixed here.
Not tried: a real Windows launch of the Codex app, a real macOS app open,
Linux.
2026-11-13 00:11:20 +08:00
yetone 118765663a lessons: a test that breaks a shared file puts its bytes back (aa744b9ed)
TestFetchPrivateEntries left "{not json" in the gateway package's shared
settings.json, since its cleanup restored through settings.Save, which
refuses to write over an unparseable file, and dropped the error.
TestRemoteMagpieAskedToFollow went red on ubuntu CI at 836d074f1.
Docs only; nothing run.
2026-11-13 00:07:35 +08:00
yetone aa744b9ed2 gateway: TestFetchPrivateEntries puts settings.json's bytes back, not a Save over "{not json"
ubuntu CI at 836d074f1 (run 43242922324, race) failed
TestRemoteMagpieAskedToFollow at remote_update_test.go:156: "could not
read settings ... invalid character 'n' looking for beginning of object
key string". The 'n' is TestFetchPrivateEntries' "{not json". That test
shares the package's HOME and restored it with allowPrivate's
t.Cleanup(settings.Save(was)), but Save refuses to write over a file it
can't parse (unless a last good generation is there), and the cleanup
dropped the error. The broken file was left to whichever later test
saved settings next without fresh(t).

It now reads the file's bytes before garbling it and writes them back in
a cleanup that runs before allowPrivate's, and reports a failed write.

Run (mote): go test -tags nogui -count=1 -run
'TestFetchPrivateEntries$|TestRemoteMagpieAskedToFollow$'
./internal/gateway: red on origin/main (the CI message, word for word),
ok with this change. gofmt -l empty.
Siblings checked: allow_test's garble runs under fresh(t);
backup's and davsync's unreadable-settings tests use their own HOMEs;
request_settings_once and the cli update tests write the bytes back.
Whole-package run: after the push (below in the loop's record).
2026-11-13 00:06:43 +08:00
yetone bbce1fc1ab update: the updater checks a download's GitHub build attestation too (ArcticLampyrid on X)
Release CI attests every file (SLSA provenance through Sigstore, v0.1.3891
on). The updater now fetches the bundle for a file's signed SHA-256 from
api.github.com/repos/yetone/magpie-releases/attestations/sha256:<digest>
before it downloads the file, and verifies it with sigstore-go against the
Sigstore trusted root embedded in the binary (attest_root.json, public
good instance): certificate chain, certificate timestamp, Rekor entry,
issuer token.actions.githubusercontent.com, subject release.yml of
yetone/magpie-releases on main or a v* tag, source repository
yetone/magpie-releases, and the digest among the statement's subjects. It is
in addition to the ed25519 check over SHA256SUMS, which still runs first
and still works offline and from the R2 mirror; the attestation is asked
about the digest that signed list gives, so both speak of the same bytes.

When the attestation can't be had (a failed read means "unknown", but an
outage of GitHub must not take updates away):
- a bundle that is there and fails (signature, identity, digest, a chain
  outside the trusted root), GitHub answering 404, or an empty list: the
  file is refused. GitHub was asked and says these bytes weren't built by
  that workflow.
- GitHub unreachable, rate limited (60/hour anonymously), 5xx, a body that
  isn't JSON, or Settings' update source set to the site alone (which never
  goes to GitHub): the update goes on, since the ed25519 check has held, and
  the log says the file went unattested and why. Someone who can only drop
  the API call downgrades an update to the ed25519 check, never below it.
- releases before 0.1.3891 and a MAGPIE_UPDATE_FEED of your own are not
  asked.
The bundle checks itself, so the API call goes through source.Do and may use
a mirror.

Cost: go.mod gains sigstore-go v1.1.4 and its tree (go.sum +350 lines).
The embedded root has to be renewed (gh attestation trusted-root, first
line) when Sigstore rotates its keys; docs/reference.md says so. Until then
a chain under a new key fails as "not attested" and is refused: a known
cost, in the doc.

Run (mote, sandbox HOME via testenv): go test ./internal/update (ok),
site node tests (112 of 114; docker-tags and the sponsors README test fail
because mote-run -C site cannot see ../README.md, unrelated), gofmt -l
empty, go vet darwin, GOOS=linux -tags nogui and GOOS=windows on
internal/update, go build ./... on all three. Fixture: the real answer
api.github.com gave for v0.1.3925's SHA256SUMS (testdata/attest), verified
offline; the whole run reaches no network.
New tests: TestAttestationOfARealBundleHolds, ...OfAnotherDigestRefused,
...TamperedRefused, ...EditedPayloadRefused, ...WrongIdentityRefused (repo,
workflow, ref, source repo, issuer each), ...NoneListedRefused,
...UnknownGoesOnAndSaysSo (403, 429, 502, HTML, nothing listening),
...OnlyWhereItIsOwed, TestVerifyMarksAttestedReleases,
TestDownloadRefusedWithoutAttestation.
Broken by hand: identity check swapped for WithoutIdentitiesUnsafe turns
WrongIdentityRefused red on all five cases; the attestedFile call removed
from download turns DownloadRefusedWithoutAttestation red (the file was
fetched). The first full run of the package, before TestMain pointed the
attestation API at a closed port, had TestSourceSiteAndAutomaticUseTheSite
reach the real GitHub with a made-up digest and be refused: now closed.
Not tried: a real update end to end (needs a release newer than the
running binary; the unit path covers download), Windows box, the
GUI, full suite (starts after the tag).
Docs: docs/reference.md, start.html (en, zh, ja) and llms-full.txt say what
the app checks now.
2026-11-13 00:01:01 +08:00
yetone 248240025b site: a Kiro Crew docs page in en, zh and ja
/docs/kirocrew says how magpie puts Kiro Crew on its models. Kiro Crew
has no model provider of its own; its models are its ACP harness's, so
magpie sets agent.acp_backend (and member_acp_backend for a harness
that can dispatch) in config.json in $KIROCREW_HOME or ~/.kiro/crew.
The harness is Codex, Claude Code, OpenCode, Pi or Goose connected to
magpie. The page covers which harness it keeps or picks, why deepseek
isn't offered, and the npm adapters Codex, Claude Code and Pi need,
looked for where Kiro Crew looks and never installed. It also covers
config.local.json winning and left alone, new sessions taking the
change, and switching off putting the keys back and disconnecting a
harness agent only when connecting Kiro Crew connected it. Each claim
is from internal/agent/kirocrew.go. Linked from each language's
JetBrains Copilot page; in the sitemap, llms.txt and llms-full.txt.

Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test site/*.test.mjs on the WSL box (magpie-desktop, wsl-run):
116 pass, 0 fail.
Not tried: Kiro Crew itself with magpie for this page; it names only
what magpie's source says.
2026-11-12 23:54:14 +08:00
yetone 6edf7a69e5 usage: hide and show single quota rows of an Overview card (wangshaowei39 on X)
Antigravity's card lists Claude & GPT, Gemini and more. A row group can now be
hidden from Usage > Overview the way a card can: right-click or long-press a
row, or use the card's "..." menu, and choose "Hide <group> from Overview". The
"Hidden" line under the cards lists hidden cards and rows with an Unhide button
and Show all. The last group of a card cannot be hidden (use the card's own
hide). Persisted as settings usageWindowsHidden ("<card>|<group>"), changed
through /api/usage/arrange { windowsHidden } and kept by the Settings save.
Table view and tray panel are untouched.

Run (on mote):
- go test: TestUsageArrange*, TestUsageArrangeWindowsHidden (new), TestSettingsSave*,
  settings_keep guard, TestCoreScriptBudget, ./internal/settings, ./internal/settingsapi;
  gofmt clean; go vet darwin, linux nogui, windows.
- GUI, chromium and webkit: usage-rows-hide (new, 5 languages x 1200/560/390;
  32/32), usage-card-more 32/32, usage-arrange, usage-all-accounts 24/24,
  i18n-keys 4/4.
- usage-cards-hide and usage-hidden-way-back: "de 560" red (no sideways scroll
  635 vs 560); the same red on a clean origin/main a5e5f539a, filed as #6294.
Broken by hand: withoutHiddenRows returning its input turns usage-rows-hide
16/16 red in chromium.
Not tried: a real Antigravity account (fixtures only); full suite starts after
the tag.
2026-11-12 23:45:43 +08:00
yetone a5e5f539ad settings: a MiniMax key kept for images can be picked in Settings → Images (netube99 on X)
Settings → Images checked the pick with provider.Resolve, which finds no
model of a key set to Select none (it serves no chat model), so
minimax-cn/MiniMax-H3-Image was refused with "no model ... to generate
images", and resolveDrawing, which the gateway draws through, refused it the
same way. image-01, image-01-live and -Highspeed and the international
minimax provider had the same gap. Settings now asks gateway.DrawerMissingOf
(the Drawers of the provider count), and resolveDrawing falls back to the
provider's Drawers when Resolve finds nothing.

Request shape checked against platform.minimax.io/docs/guides/image-generation:
POST /v1/images/generations (api.minimax.io; the CN key's host likewise), as
draw_minimax.go already sends it.

Run: TestMiniMaxImageModelPickable (both providers; all, none, picks; every
image model; one real draw through the gateway against a fake host) and
TestImageGenAcceptsMiniMaxImageModel, red on the old code (Select none case,
settings check reverted by hand). No real MiniMax account was asked.
2026-11-12 23:37:30 +08:00
yetone 8cacbaa7d4 library: REA's MCP shows rea.tools' own logo, not its owner's avatar (_meouwu on X)
The registry gives rea-agents no icon, so the market fell back to the
owner's GitHub avatar. The crawl entry now carries the site's favicon
(rea.tools/assets/favicon.svg, repo is MIT), brandIcons gives the live
registry path the same logo, and serverIcon swaps a stored owner avatar for
it, so servers added earlier get it too.

Run: go test ./internal/library (ok), TestReaKeepsItsOwnLogo red with the
JSON entry and Go changes reverted; gofmt; vet darwin/linux/windows.
Not tried: the full suite, seeing it in the GUI.
2026-11-12 23:24:50 +08:00
yetone 8c9676c98d gui: the Mac's main window is made when first shown, on a hidden start
Started without its window (at login, `magpie tray`; for the panel; for
a magpie:// link), magpie still made the main window hidden, and its
page kept a WebContent process (~66 MB) until the user opened it, which
after a boot can be never. On the Mac it is now made by openMain the
first time it is shown, the path lightweight mode already takes for a
window it let go (madeAgain). A start that shows the window is as
before, and Linux and Windows are unchanged (Windows' readiness waits
on the main window's page; see #6340 for the panel there).

Measured on mote, real window app, real account sandbox HOME, at 30s:
- `magpie tray`: v0.1.3916 (w33) WebContent 66 MB; this change none.
  magpie itself 154-174 MB vs 185-194 MB.
- `magpie panel`: one WebContent (the panel's, 70 MB) where w32 had two.
- a magpie:// link: the main window made later shows on screen in the
  same place and size (1540x959 at 190,31, CGWindowList), WebContent
  77 MB vs 80 MB.
- Start-up CPU in 30s varies 2-10 s for both builds (start-time jobs),
  no difference between them.

Run: go test -run 'Panel|Light|Tray|Main|Window|Dock|Reopen'
./internal/gui (mica, ok, with TestMainOnFirstOpen), go vet ./internal/gui
darwin and GOOS=windows. Every h.main use outside the start is
nil-guarded already (lightweight mode lets it go).
Not run: a real Dock click or tray-menu Open after a hidden start (no
ssh-driven click; both go to openMain/reopenMain, which make it when
nil, as the link start above did).
2026-11-12 23:24:29 +08:00
yetone f76a850c21 site: a JetBrains Copilot docs page in en, zh and ja
/docs/copilot-jetbrains says how magpie puts its models in GitHub
Copilot Chat in JetBrains IDEs and Android Studio. It covers Bring Your
Own Key's custom endpoint written into the Copilot language server's
byok.json, with the file's path on each system and its three keys as
the server saves them. The page also covers the restart the IDE needs,
the plans that have BYOK (Free, Pro, Pro+; Business and Enterprise by
policy), and the key kept in plain text in that file. It covers tool
calling turned on for agent mode, the 128K default window, Xcode's and
Eclipse's Copilot reading the same file, hidden models kept hidden, and
the three keys deleted on switching off. Each claim is from
internal/agent/copilotjetbrains.go. Linked from each language's
OpenMausBot page and to the Copilot page; in the sitemap, llms.txt and
llms-full.txt.

Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test site/*.test.mjs on the WSL box (magpie-desktop, wsl-run):
116 pass, 0 fail.
Not tried: a JetBrains IDE itself with magpie for this page; it names
only what magpie's source says.
2026-11-12 23:20:17 +08:00
yetone 8c0c2e8b6b gateway: Antigravity tool names, malformed calls and empty-reply retries (fwxkogaia on X)
Claude Desktop on antigravity/gemini-4-carbon failed 403 of 408 requests:
400 "Request contains an invalid argument", 502 empty reply after 170-230s,
and 200s marked failed with output tokens.

Changed, in internal/gateway:
- A tool name starting with a digit or a dash (MCP tools named for an id)
  goes to Google as _x_<name> and comes back without it; a property with no
  name is left out of the Antigravity schema. Both turned the whole request
  away on a live call.
- A MALFORMED_FUNCTION_CALL / UNEXPECTED_TOOL_CALL finish carries the call
  in finishMessage; it is now made the call instead of reading as an empty
  reply (tokens spent, then asked again for nothing).
- passing(): a 502 empty reply is asked again once, not lastRetries times on
  top of the in-place emptyRetries.

Run (mica): go test -run 'TestCodeAssist|TestEmptyReply' ./internal/gateway;
the new tests are red on the old code (names, malformed case).
Live (owner account, gemini-3.8-flash): names with a digit/dash first, a
space, unicode, a slash and an empty property key each 400; 64 and 100 char
names are 200.
Not tried: real gemini-4-carbon (the account lacks it, 404), so the user's
exact 400 is not reproduced; the finishMessage form is Google's documented
shape, not captured from Carbon.
2026-11-12 23:17:51 +08:00
yetone f4f104d1cc gui: a sign-in kept to its link shows Copy link with Open in browser beside it (Yink88564391 on X)
With Settings > Privacy > "Open sign-in pages in the browser" off, the
add-account window shows the link and opens nothing. The Open button sat
in a row under the link; it now sits in the link's own row, right of the
copy button, labelled "Open in browser" until the page has been opened
(then "Open again"). Every account sign-in goes through openSignIn, so
Codex, Claude and the rest follow it; MCP server sign-ins are not
account sign-ins and are unchanged. The default is unchanged.

Also: signin-close's "nothing else was changed" filter ignores
/api/update/using, which the page's in-use ping (10c4dc109) had turned
red on origin/main.

Run (mica): signin-*, i18n*, gui-* GUI files, chromium and webkit, en zh
zh-TW ja de: all pass; TestCoreScriptBudget ok. signin-link-only was red
on the old assets (no Open button in .signlink) and green after.
Not tried: a real Codex sign-in; Windows/Linux webviews.
2026-11-12 23:04:51 +08:00
yetone e18aca1038 agents: an agent's own context window, and a routing group's own Compact at (ul3140773077392, NovaStudiosss on X)
ul3140773077392 on X: dsh compacts earlier than other harnesses at the same
window, so one global size per model fits none. An agent's sheet (Agents,
the agent's Settings line) now holds "Context window": a size for every
model, or model=size pairs (provider/model, group/<id>, provider/*, a bare
model id, *). Empty follows each model's own window. It is applied in
provider.CatalogFor, the choke point every agent's model list goes through,
so dsh's contextWindow, Codex's catalog and Claude Code's window all read
it, and a window set this way makes Codex/Claude compact at that window
(Entry.WindowSet). Stored in settings.AgentContexts, kept by a general
save (settingsapi); POST /api/settings/agent-contexts and
`magpie model window <agent> [model=size...|off]`.

NovaStudiosss on X: Routing, a group's Edit, Advanced already had "Context"
(the window agents are told). It now has "Compact at" beside it
(Group.Compact; compactSet reads it before the members' smallest), also
`magpie group ... compact=`.

GUI: agentwindow.js, loaded on demand through agentcompact.js so app.js
stays inside its budget (TestCoreScriptBudget passes; the "Context window
in {agent}" label reuses the existing "Context window" key). Every agent
with fields now has a sheet; agent-prefs' Pi expectation says so.

Run at the pushed head, on mote: go vet (darwin; linux -tags nogui;
windows) on provider, agent, cli, gui, settings, settingsapi; gofmt clean;
go test provider, cli, settings, settingsapi, gui (TestCoreScriptBudget
and cli's route table fixed here), agent -run Dsh; node --test agent-window
and group-compact (chromium and webkit, en zh zh-TW ja de, 900 and 420px),
agent-compact, agent-prefs, compact-at. Reds seen identically on a
detached origin/main 4e0026661: agent-prefs webkit "in the panel a
Settings line..." (#6139) and old-webkit "compat.js is the first" / "styles
hold up in Safari 15.0" (#5919, #3403).

Broken by hand, each red then restored: withAgentWindows out of CatalogFor
(TestAgentOwnContextWindow, TestDshOwnContextWindow); the group branch in
compactSet (TestGroupOwnCompactAt); the settingsapi keep line
(TestSettingsSaveKeepsWhatItDoesNotSend); the window row in the sheet
(agent-window tests); compact dropped from the group save
(group-compact tests).

Not tried: a real dsh with a real account (its compaction is dsh's own;
the test reads the window magpie hands it), the full GUI suite (queued
behind another run on mote), Windows and Linux runs of the new tests.
2026-11-12 23:01:29 +08:00
yetone 836d074f1a providers: a model's maker logo is found for every catalog a preset names, StepFun's included (zzstar101 on X)
IconForCatalog compared a models.dev id with the preset's whole Catalog
string, so a preset naming several ("stepfun-ai-step-plan, stepfun-ai",
"stepfun-step-plan, stepfun", Xiaomi MiMo's, Azure's) matched none of
them and gave no logo for step-5-preview's catalog. It now also looks in
each preset's list (Provider.Catalogs), after the presets whose catalog is
exactly the id, so Azure's "azure, openai" never takes OpenAI's models.
An empty id gives none (it matched a preset with no catalog).

Run (mica, the load bar on mote): TestIconForCatalogFindsAListedCatalog
red on the old presets.go (stepfun, stepfun-step-plan, azure,
xiaomi-token-plan-cn), green on the new; go test of internal/provider,
internal/agent and internal/gui ok; gofmt; go vet on darwin, linux
nogui and windows.

Not reproduced: the Models page names step-5-preview's maker by its id
(agent.ModelIcon gives stepfun-color for every spelling tried), so this
does not by itself explain the report's icon; it fixes the lookup the
imported-provider path (importurl.go) and the by-catalog logos use.
Not tried: the reporter's own provider list.
2026-11-12 22:59:18 +08:00
yetone 4e0026661c gateway: CodeArts's "request param is invalid" is the request's, nobody rests (Abandon332 on X, #6342)
Huawei's gateway answers a parameter it can't take (the codearts plugin sent
`stop` as an array; plugin 0.3.15 sends a string) with InferHub.001001005.400
inside a 200. magpie read it as a plain 400 and rested the account, 182
times in the report. The code joins shapeWords, so a member behind it is
asked and the one that refused doesn't rest, as for any request shape a
vendor can't read.

Run (mica): TestCodeArtsInvalidParamIsTheRequests, shapeRefused, custom-tool
tests; go vet on darwin, windows, linux nogui; gofmt clean. The new test was
red before the regex change. Not tried: a real CodeArts account; the whole
suite (started after the tag). The last member in a group still rests as
before, since shapeRefused only applies when another is left.
2026-11-12 22:53:32 +08:00
yetone 74881f4d6a site: an OpenMausBot docs page in en, zh and ja
/docs/openmausbot says how magpie sets up OpenMausBot: config.json in
$OMB_DATA_DIR or ~/.openmausbot, and why its Claude bots need an engine
of magpie's own (Claude Code runs isolated, with only the sign-in keys
of ~/.claude/settings.json). The page covers the magpie engine, shaped
like OpenMausBot's Claude endpoint: claudeAgent, access custom, its own
configDir, requireApiKey, every magpie model in endpointModels, and the
gateway and key in the environment. It also covers routing owned by the
engine, the default fleet written beside it when the file has none,
refusing a change while OpenMausBot runs with the list rewritten after
it writes over it, what stays the user's, and switching off. Each claim
is from internal/agent/openmausbot.go. Linked from each language's
Mistral Vibe page; in the sitemap, llms.txt and llms-full.txt.

Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt;
node --test site/*.test.mjs on the WSL box (magpie-desktop, wsl-run):
116 pass, 0 fail.
Not tried: OpenMausBot itself with magpie for this page; it names only
what magpie's source says.
2026-11-12 22:46:23 +08:00
yetone 477bbb7a15 usage: GET /v1/magpie/usage/requests?cursor= reads requests as changes, with stable ids (rdsaltbo on X, #6060)
A program keeping a ledger of its own (a WakaToken plugin) can now read the
requests incrementally: cursor=start or cursor=now, then each next_cursor.
Rows carry a stable content-derived id (same after a restart), origin, and
original_ids (request_id, response_id, client_response_id, message_id,
session_id, native_session_id), each only when the source gave it. A call
read late, a corrected row (same id, higher seq) and a native row replaced by
the gateway's (deleted, with seq) all come through a persisted journal
(usage-feed.jsonl, appended and synced before answering). Cursors magpie
cannot resume from are refused: 400 cursor_invalid / cursor_filter_changed,
410 cursor_expired / cursor_reset. A held key sees only its own rows and
tombstones. Without cursor, offset/limit mode is unchanged.

Also: Record.MessageID (not persisted) from the agent file's message id, and
usageapi's row decoration moved into a namer shared by both modes.
Docs: reference.md, integrating.md, gateway-routing.md, gateway-sessions.md,
site remote.html (en/zh/ja), llms-full.txt.

Run (mote, this tree): go vet darwin, GOOS=windows, GOOS=linux -tags nogui on
usage, usageapi, gateway (gui on darwin); go test -count=1 for
internal/usage, usageapi, gui, gateway: all ok. New tests: resume gets exactly
the new rows, ids and cursors survive a restart, correction keeps the id,
gateway takeover retires the native row, refused cursors, expiry, now cursor,
identical records, and the feed over the gateway (held key, 401 without key,
offset mode). Broken by hand: an unconditional memo made the new-rows test
red (fixed to memo only the next page).
Not tried: real Claude Code/Codex session files, a huge (700k+) history,
Windows run of the tests, GUI browser suites (no GUI file touched).
2026-11-12 22:40:15 +08:00
yetone 182803ea7d gui: the Mac's tray panel is made the first time it is opened
magpie made the quick panel as it started, hidden, so its page kept a
WebContent process of its own (~65 MB) for as long as magpie ran, for a
user who never opens the panel too. On the Mac it is now made by
panelWin on first open, the path lightweight mode already takes when it
let the panel go (madeAgain names it and hangs it on the tray icon).
Linux and Windows still make it at start: the made-again path hasn't
been run in a real window there.

Measured on mote, real window app, real account sandbox HOME:
- started plainly, at 40s: w32 (main) WebContent 69 MB + 65 MB;
  this change 65 MB alone, the panel's process gone.
- started as `magpie panel` (OpenPanel): both show the panel on screen
  (layer 101, 439x268 at 0,36, CGWindowList), with 2 WebContent
  processes of 65-66 MB each; magpie itself 175 MB vs 192 MB.
- a second `magpie panel` on the Mac only hands over (runningAlready);
  it never opened the panel, before or after.

Run: go test -run 'Panel|Light|Tray' ./internal/gui (mica, ok, with
TestPanelOnFirstOpen), go vet ./internal/gui darwin and GOOS=windows.
Not run: Linux GUI vet (no gtk4 dev packages in the WSL distro; the
Linux path is unchanged), a real tray click (no ssh-driven click; it
calls the same togglePanel as OpenPanel and the panel hotkey).
2026-11-12 22:28:44 +08:00
yetone 9192b78323 provider: a model's name that says its window is the window when nothing else does (maohy915 on X)
v0.1.3905 read an Ollama model's num_ctx from the Modelfile; maohy915 meant
the name itself ("Qwen-3.8-27b-128k"), which needs no Modelfile.

catalog.NameWindow reads the last part of an id (or of an Ollama tag,
"qwen:27b-128k", "qwen3-128k:latest") when it is a number and a unit alone:
4 to 2048 k, or 1, 2, 4, 5, 8, 10 m, as 1,000 and 1,000,000 like a "[200k]"
mark. Not read as a window: a size (27b, pythia-14m, smollm-135m), a date
(gpt-4o-2024), a quant (q4_k_m), a lone "128k", 1k, 3m, 1.5m, a size
followed by more words.

It is the last word: ListedWindow reads the list's window, then models.dev's,
then the name; a window the user typed (per model or "*") still wins in
windowIn. For a local Ollama list the name replaces the architecture's
maximum (the fallback) but never a num_ctx the Modelfile sets.

Run (mote-run): go test ./internal/catalog ./internal/provider with
NameWindow's edge table, the user/list/catalog order, and an Ollama list
with a fake /api/show; TestNameWindowIsTheLastWord red with the
ListedWindow line returned as 0. Not tried: a real Ollama server; the name's
window is not sent to Ollama as num_ctx.
2026-11-12 22:27:39 +08:00
yetone 15dd9ecad2 minimax: MiniMax-H3-Image and -Highspeed are offered and draw (netube99 on X)
MiniMax's new image models were missing from the MiniMax provider's image
models: only image-01 and image-01-live were listed. Per
platform.minimax.io/docs/guides/image-generation (and platform.minimaxi.com,
the same ids), MiniMax-H3-Image and MiniMax-H3-Image-Highspeed draw on an
OpenAI-shaped API of their own: POST /v1/images/generations, and
/v1/images/edits with images[].image_url, answered with data[].url (an item
that failed holds only an error and is skipped).

Both are now in minimaxDrawModels (every MiniMax API key, intl and CN) and
drawMiniMax asks them there. The size is the one form the API takes:
WIDTHxHEIGHT when it can draw it (655,360 to 20,000,000 px, within 1:3 and
3:1), else a ratio and a 1K/2K/4K tier, never both (the vendor answers 400).
A mask or markup layer is refused before anything is spent. catalog.ImagesAPI
knows "h3-image" so a relay serving the id is asked on its images API.

Run (mote-run): go test -run 'MiniMax|Draw|Image' ./internal/gateway
./internal/catalog ok; TestMiniMaxH3ImageDraws red with H3-Image taken out of
the list. Not tried: a real MiniMax key (none here); the fake follows the
docs' example answer. Streaming is not used.
2026-11-12 22:27:39 +08:00
yetone 59c9887f65 search: web_search takes sites, recency and images; the ChatGPT backend gets them as its own fields (LBM_OASIG on X)
The web-search MCP tool gains optional allowed_domains, blocked_domains,
recency_days, images and search_context_size. Codex search (/alpha/search,
codex-rs codex-api search.rs) gets them as the fields web.run has: a
query's domains and recency, image_query for images, settings.filters,
search_context_size, image_settings. Every other searcher is asked the
sites as site:/-site: operators and ignores the rest. Image results read
as pages whose text starts "Image: <url>". Arguments travel in ctx, never
in a request body. Schema text names neither magpie nor a vendor.

Run: real Plus account, curl to /alpha/search with image_query and with
domains+recency+filters: both accepted, image reply shape recorded in
TestImageResultsReadAsPages. New tests (search_scope_test.go) use the
fake backend; go test ./internal/gateway full on mote: only the count
schema tests red (a boolean default), fixed, then -run Search|Codex|
ChatGPT|ImageResults ok; vet linux/windows clean.
Not tried: through a running sandbox magpie end to end; GUI untouched.
2026-11-12 22:26:45 +08:00
yetone 7dbfc9f2fe usage: FlowDown and Bob are clients drawn with their own app icons (shannnnnks on X)
Their requests were unnamed in Usage and Routing. FlowDown (wiki.qaq.flow)
sets no User-Agent in its sources (checked Lakr233/FlowDown), so the system's
"FlowDown/<build> CFNetwork/..." is what arrives; Bob (com.hezongyidev.Bob) is
closed source and is matched the same way, by "bob/". Icons are the apps' own
App Store icons at 64px, as color SVGs wrapping the PNG, so app.js's size
budget is untouched.

Run: TestFlowDownAndBobAreClients (agent), see push notes for the rest.
Not tried: real traffic from Bob (its UA is the CFNetwork default for its
executable name, not captured); FlowDown/Bob are not wired as agents, since
neither reads a config file magpie can write.
2026-11-12 22:24:45 +08:00
yetone c96f33d659 agent: Hermes is one entry in the Agents list and the model pickers; its profiles are not rows (geekbb on X)
7050da0a4 (Norethcy on X) made each other Hermes profile an agent
hermes#<name> so the Library could give it its own skills and MCP servers,
and that also put one row per bot, each with its own model pick, in the
Agents list. geekbb: Hermes should have one entry; the bots Hermes made are
Hermes's to manage.

The profile agents stay, as the Library's targets (Norethcy's request keeps
working), but are now marked Agent.Nested: DetectedIn (the Agents list, the
tray panel and every picker built from it) and ClientsIn leave them out.
All and Find still reach hermes#<name> by id.

Existing settings: a model a user set on a profile lives in that profile's
config.yaml and is not touched, so it keeps applying; a profile on magpie
still follows the connected config's model unless it was picked, and a
picked one stays picked (hermes:<path>:picked). Nothing is dropped or
rewritten; what goes is only the extra row and its picker.

Run on mote: go test ./internal/agent ./internal/library; new
TestHermesProfilesAreNotListedAsAgents, red with Nested off and green with it;
GUI hermes-profile-row (rewritten: one Hermes row, no "Hermes ·" text),
hermes-profiles, i18n-keys in chromium and webkit, five languages; gofmt;
go vet darwin, linux, windows for agent and library.
Not tried: a real Hermes with several bots; the full suite before the tag.
2026-11-12 22:23:54 +08:00
yetone 3bbd8ceaaa routing: Least used first counts a small check-in reward about to lapse (kudi3699 on X)
kudi3699 again: v0.1.3877's Lapsing faded the lost share across the
week and needed 0.5 points. A WorkBuddy check-in reward is a few dozen
credits (20 of a 5100 pool is 0.39 points, less the fade), so it stayed
under the threshold until its last hours and the half-used account was
still never picked. The plugin side is fine: mover min is 0.2.29, past
0.2.27 that reports check-in rewards' runsOutAt/runsOut, so no plugin
change.

Allowance.Lapsing is now the whole loss in points when RunsOut is within
7 days, none past it (no fade); routes.lapsingMin is 0.1 points. A seat
at 90%+ is still not helped.

Run (mote): go test internal/routes, internal/provider -run
"Lapsing|LeastUsed|Allowance", internal/gateway -run
"WorkBuddy|LeastUsed|Smart|Pace|Routing"; go vet -tags nogui for linux,
windows, darwin on the three packages; gofmt clean. Broken by hand:
lapsingMin back to 0.5 turns TestLeastUsedSpendsSmallCheckInRewardSixDaysOut
red (20 credits, 6 days out, old 50% vs new 20%). Not run: the full suite
(after the tag), real WorkBuddy accounts.
2026-11-12 22:14:40 +08:00
yetone f57da2b5b9 gui: a test posted with an account is sent to that account or key (tmr11235 on X)
"Test on account..." posted the pick as `account` with provider/test, but
the test action never read it: the body's Account was only used by other
actions, so provider.TestOn was never called from the GUI and every test
went with routing's pick (d96403141 tested TestOn in the provider package
only). Now the action puts req.Account on the context for both the model
tests and the provider's Test, for every kind TestOn covers (keys, pool
sign-ins, plugin accounts), as one handler.

Run: gofmt clean; mote-run go test ./internal/gui (new
TestProviderTestIsPinnedToTheAccountPosted, TestProviderTestStops,
TestProviderInfoSaysTestPicks) ok. Broken by hand: with the TestOn line
back to r.Context() the new test is red (pinned to the second key came
back Account:first, 503 wrong key), which is the report.
Not tried: a real ChatGPT or plugin account pair; their path is the
provider package's, already covered by TestModelTestPinnedToAnAccount.
2026-11-12 22:12:32 +08:00