382c8c0bdfdcedadbfa35ce1df7bd34f583ec17b
7946
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
382c8c0bdf |
proc: magpie serve reaps the processes it adopts (Kling__Lab on X)
254 <defunct> children of `magpie serve` after 7 days, growing ~9 an hour (magpie, uv, node, npm, magpie-bun, code-review-graph), only a restart cleared them. Every command magpie starts is waited for (the AST guard TestEveryStartedCommandIsWaited holds, and I read each Start site and Output/StartTree/StartReaped by hand: none is missed). The zombies are the grandchildren: an agent CLI's MCP servers whose parent ended are adopted by magpie where it is PID 1 (a container) or a child subreaper, and nothing waits for a process it never started. proc.KeepReaping (Linux, from serve) does nothing unless magpie adopts (PID 1 or PR_GET_CHILD_SUBREAPER), and then reaps a child of its own that was a zombie at two looks 5s apart. Not tried: the reporter's container; the cause (PID 1 / subreaper) is inferred from the report, not seen. Run: TestAdoptedOrphansAreReaped (subreaper test process, 6 orphans) and the proc package through wsl-run on magpie-desktop: ok. Broken by hand (KeepReaping returning at once): 6 adopted zombies left, red. |
||
|
|
422f90e80b |
davsync: WebDAV answers a Digest challenge, MD5 and SHA-256 (caelum1990 on X)
Sync signed in with Basic only, so a server that takes Digest only (Apache mod_auth_digest, some NAS and nginx setups) answered 401 and magpie said the password was wrong. digestTransport (RFC 7616, qop=auth, -sess too) wraps the dav client: a 401 with a Digest challenge is sent again with a Digest header made from the same user name and password, SHA-256 chosen over MD5 when both are offered, and the challenge is kept, so the requests after it carry Digest with a rising nc and Basic is not sent to that server again. A PUT's body is made again from GetBody. A Basic server is untouched. Run: go test ./internal/davsync under mote-run, ok; vet darwin, linux nogui and windows on the package. New: TestDAVDigest (MD5, SHA-256 against a fake Digest-only server that checks response, nc replay, opaque, uri and the PUT body), TestDAVDigestWrongPassword (still reads as a wrong password; a Basic server is left alone). Broken by hand: newDAV without the transport, TestDAVDigest red with "refused the user name or password (HTTP 401)". Not tried: a real Digest server (only the fake, built from the RFC's formula); auth-int and SHA-512-256 are not answered. The first request of a connection still carries Basic, as before, so a Digest-only server over plain http sees the password once; nothing else was changed in that path. |
||
|
|
efc3e1e56b |
remote quotas: a Remote with no picks tells every card, a usage-only provider's included (fcooji on X)
On 0.1.3959 Claude Code set to usage only on the remote magpie showed no usage on the local magpie that added it as a Remote. A usage-only provider lists no model there, so a Remote with nothing picked here exposes only what the remote lists, and cfd49e36a/93b855d90's filter by enabled models dropped the Claude card. Only the user's own picks (Provider.Models) narrow cards now; no picks, or Select none, tells all of them. Run (mote): TestRemoteUsageOnlyProviderStillShowsItsCard is red with the new rule turned off by hand (map[office/codex:true]), green with it; -run 'Remote|Quota|Card' in internal/provider and internal/gateway ok; go vet darwin/linux/windows of internal/provider ok; gofmt clean. Not tried: two real magpies in sandbox HOMEs (a fake peer and list server in the test), the GUI suite (Go only), the full Go suite (started after the tag). |
||
|
|
e6eaf4d69c |
site: a mirrors page in en, zh and ja
/docs/mirrors says how magpie downloads from China: the Plugins page's Mirrors in China switch (npm at registry.npmmirror.com, Bun at npmmirror's binary mirror, the plugin list at jsDelivr, bun add pointed at npmmirror unless a registry is set), --proxy and --mirror for the installer and magpie update, magpie update mirror and Settings' Download source, the MAGPIE_MIRRORS fallback with MAGPIE_NPM_REGISTRY and MAGPIE_GITHUB_MIRROR, and what is checked: update files against usemagpie.ai's SHA-256, Bun's zip and npm integrity, credentialed requests never mirrored. Every claim is from docs/reference.md (Mirrors, the install and update section), internal/source/source.go and internal/cli/update_cli.go, with the labels' zh and ja from i18n.js. Linked from each language's troubleshooting 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 download through the mirrors from China for this page; it names only what magpie's reference and source say. |
||
|
|
2ae8e61a4f |
usage: an upgrade reads session files again only when the code of their rows changed (#2278)
requests-v1.bin and log-v1.bin were keyed on a hash of every .go file in internal/usage, so nearly every release that touched the package threw both away. The first start after such an upgrade read all ~24k call shards again: on the owner's real accounts (mote, acctp sandbox) that is 13.8s of CPU and ~3.4GB allocated before the page settles, against 2.4s warm. Each file now keys on the source its rows are made, written and read through: rowSource (15 files) and logSource (23 files), embedded by name. The row pricer and a file's chunk builder are lifted out of readRequestBlocks (sessionRowPricer, sessionChunk) so they can be roots. TestRequestDiskNamesTheCodeOfItsRows type-checks the package and walks every declaration reached from those roots (uses, package vars assigned elsewhere, interface calls, encoding/String/sort methods); it fails when a reached file is not embedded or an embedded one is not reached. Of the last six usage-changing releases, four (3962, 3958, 3941, 3908) would have kept the cache. Run: - go test -count=1 ./internal/usage on mote: ok 51.9s. - go vet ./internal/usage for darwin, windows, linux on mica: ok. - Broken by hand: session_provider.go left out of rowSource's embed -> "rowSource: session_provider.go is reached but isn't in its go:embed", FAIL; restored. - Real accounts on mote (pageheap.sh, page open, CPU at mark): w47v first start after an older binary 13.80s, numGC 217 (rebuild, expected); w47v again 2.45s; w48v (w47v plus a live init() in effort_split.go, a different binary) 2.59s, numGC 56; back to w47v 2.43s. Before, the same swap cost ~14s. Not tried: Windows or Linux real start. |
||
|
|
1f4f1874b5 |
site: a sync page in en, zh and ja
/docs/sync says how magpie keeps computers in sync: what the sealed file holds (providers and keys, settings, profiles, agents' models, the library, npm and git plugins, gateway keys) and what it doesn't (subscriptions' sign-ins), WebDAV (坚果云, Nextcloud, Synology), S3 (R2, B2, MinIO, path-style, OSS without conditional writes) and private GitHub repos, every 3 minutes with merged conditional writes, Kept on this computer and Follow the others, and the one-off magpie backup and restore with AES-256-GCM and PBKDF2-SHA256. Every claim is from docs/reference.md (Moving to another machine, Keeping machines in sync), with the labels' zh and ja from i18n.js and the commands checked in internal/cli/main.go. Linked from each language's start 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 real WebDAV, S3 or GitHub sync for this page; it names only what magpie's reference says. |
||
|
|
dbb2e5dd29 |
site: an OpenCode Go and ClinePass page in en, zh and ja
/docs/coding-plans says how magpie serves the two monthly plans for open coding models in any agent: OpenCode Go's three endpoints as Go's docs give them, each model sent on the protocol Go serves it on as OpenCode does (no more "Model does not support this protocol"), old addresses moved, and its 5-hour, 7-day and monthly windows on Quota; ClinePass at api.cline.bot with the plan's and Cline's free models from the list Cline's clients use, the free ones apart from the plan's quota and asked with the desktop app's headers. Every claim is from internal/provider (presets.go, opencode_endpoints.go, planquota.go, cline.go, models.go), with the labels' zh and ja from i18n.js. Linked from each language's opencode-models 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 real OpenCode Go or ClinePass key for this page; it names only what magpie's source says. |
||
|
|
363adb3528 |
plugin: the auth-lock test checks the loop ran while the lock was held, not how often a timer ticked (#5271)
TestAuthLockWaitDoesNotFreezeTheHost counted a 20ms setInterval over a 300ms sleep and wanted 8 ticks. A loaded runner fires the timer late and counts fewer while the loop is free all the same: 7 of 8 on mote (#5271), 6 on ubuntu CI at |
||
|
|
6af6ae9885 |
usage: a log of MCP calls and probes keeps its blocks on disk too (#2278)
log-v1.bin was written only once a gateway block had filled. A log of
MCP tool calls and probes has none (the real-account sandbox's 8.3 MB
log is 25,223 MCP lines and 2,539 probes, 54 probe blocks, 0 gateway
blocks), so full.n stayed 0, the file was never written, and every
start parsed all 27k lines again: readLogSnapshot took 60 MB of the
start's allocations. The probes that were kept went as JSON and were
parsed back a record at a time.
A full point is now marked too when a probe block fills while no
gateway row stands after the full blocks, and it records how many probe
blocks were full there (logFull.probes). Those go to the file as binary
entries, as the gateway blocks do, read from its mapped pages; only the
probes after them, up to the full point, still go as records. The file
is written again when its full point reaches further (by offset, not
the gateway block count). The magic is magpie-log-v2, so a v1 file is
parsed over once.
Run:
- go vet ./internal/usage; go test ./internal/usage ./internal/gateway
(mica, -timeout 45m): ok usage 31s, ok gateway 859s.
- TestStartReadsKeptProbeBlocks (new): an MCP-only log of 3 blocks + 100
is kept, a start reads 3 blocks from the file, and reads as a whole
parse. Broken by hand (no probe full point): red, "a log of probes
wasn't kept".
- Real-account sandbox on mote (acctp, page open 2.5 min, version
0.1.3961 builds): log-v1.bin written on the first start (645 KB);
warm starts, w45v (v0.1.3961) against this:
CPU at mark 3.21s, 3.00s -> 2.50s, 2.39s
allocated 701 MB -> 646 MB, 629 MB
readLogSnapshot cum 60 MB -> 2.6 MB
numGC 66 -> 56
Footprint 128-133 MB -> 132-135 MB, liveHeap ~80 MB both: the same
within noise.
Not tried: a log with both gateway and probe blocks across a v1 -> v2
start on a real account (the unit test's mixed log covers the format).
|
||
|
|
1e2ce24631 |
site: a free models page in en, zh and ja
/docs/free-models says how magpie serves free models: OpenCode Zen's -free models and big-pickle with no key, asked for as OpenCode asks; Kilo Gateway's :free models with no key, anonymous by IP at 200 requests an hour, a key for the rest; the free mark in pickers (PricedFree: that provider's $0 price on every count, not a maker's free tier or a plan's list, a price the user set wins); free models first in a routing group; and a deprecated model leaving the lists until answered or a week. Every claim is from internal/provider (presets.go, kilo.go, models.go) and docs/reference.md, with the label's zh and ja from i18n.js. Linked from each language's nvidia 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 real OpenCode Zen or Kilo request for this page; it names only what magpie's source says. |
||
|
|
235ed22eb1 | LESSONS: 11-13, a budget's pass recorded at a tree it wasn't run at | ||
|
|
5a44051eb5 |
gui: Discover's long-list hook moves into plugingrid.js, and the core budget carries the rest
TestCoreScriptBudget has been red on main since |
||
|
|
390dd407b9 |
site: a Fireworks and Fireworks Nexus page in en, zh and ja
/docs/fireworks says how magpie serves Fireworks AI and Fireworks Nexus: the fireworks preset on Chat Completions at api.fireworks.ai/inference/v1 with models.dev's fireworks-ai list, the agents' other APIs translated; the fireworks-nexus preset with keys from nexus.fireworks.ai on Chat, Responses and Messages, auto as its list since Pro and Team refuse an open model with a 403, Enterprise models typed in, and Claude and GPT through the x-anthropic-api-key and x-openai-api-key headers the editor offers (HeaderHints) or set with magpie provider set header.<Name>=. Every claim is from internal/provider/presets.go and docs/reference.md, with the labels' zh and ja from i18n.js. Linked from each language's groq 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 real Fireworks or Nexus key for this page; it names only what magpie's source says. |
||
|
|
abacab7207 |
provider: a model's listing providers share one copy of each provider
listedBy, the providers listing each model (for a model no catalog entry
has), appended a copy of the whole Provider (1.3KB) for every model of
every provider. It now keeps one copy per provider and every model points
at it; the one caller copies the provider it returns, as before.
Measured on mote with a real-account sandbox HOME (network blocked),
2.5 min with the usage page open, alloc_space of listedBy:
w44 (
|
||
|
|
f28787b396 |
site: an API relay page in en, zh and ja
/docs/relay says how magpie serves an API relay as a provider: the relay presets (AiHubMix, PipeLLM, 302.AI, CherryIN, 鱼鱼连线 and its three lines) and a custom one by url=, anthropic= and responses=; a Claude model sent on Messages when the relay has an Anthropic address, since relays drop cache_control on Chat (MessagesFirst, OnMessages, #997); magpie model price for a relay's real prices and the renamed model's price; magpie model wire, context and output; and refresh-every and auto-include for the list. Every claim is from docs/reference.md and internal/provider/presets.go and provider.go, with the label's zh and ja from i18n.js. Linked from each language's openrouter 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 real relay key for this page; it names only what magpie's source and reference say. |
||
|
|
61be687ffa |
claudetui: /usage's saved figures are not told when the refreshed panel's redraw stalls (#6376)
TestShimWaitsPastSavedUsage/refreshed went red on macOS CI at
|
||
|
|
482653868b |
gui: a provider row's read-once test measures the row's own work apart (#6375)
TestProviderInfoReadsTheListOnce was red on main since |
||
|
|
e9e63c6d77 |
site: an NVIDIA NIM page in en, zh and ja
/docs/nvidia says how magpie's nvidia preset serves NVIDIA NIM with one build.nvidia.com key: Chat Completions alone at integrate.api.nvidia.com/v1, since NIM's /v1/responses answers for few models (#197), with Claude Code's and Codex's requests translated; nvidia/<model> ids; the free badge for models NIM prices at 0, scoped to NIM (PricedFree, catalog.go); imported per-key copies folded into one provider (FoldCopies, fold.go); OpenCode's nvidia provider imported as the preset; and that magpie doesn't say how a NIM key bills (unsaidPresets). Every claim is from internal/provider and internal/catalog, with the labels' zh and ja from i18n.js. Linked from each language's modelscope 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 real NVIDIA NIM key for this page; it names only what magpie's source says. |
||
|
|
aa3fe0c79b |
site: a Vercel AI Gateway page in en, zh and ja
/docs/vercel says how magpie's vercel preset serves Vercel's AI Gateway with one key: Chat Completions and Responses at ai-gateway.vercel.sh/v1 and Anthropic Messages at its root, maker/model ids, a Claude model sent on Messages whatever the agent spoke so cache_control holds (MessagesFirst, OnMessages, #997), and the model list sorted by Vercel's own row types: chat models with context_window, image, video, embedding, reranking, speech and transcription models to their APIs, evaluation models, realtime voices and -batch ids left out. Every claim is from internal/provider/presets.go and provider.go and internal/catalog/live.go, with the label's zh and ja from i18n.js. Linked from each language's openrouter 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 real Vercel AI Gateway key for this page; it names only what magpie's source says. |
||
|
|
5a0e0378c0 |
plugins: Discover draws only the cards near the view in a long list
The owner, 11-13: "这个页面有点卡,记得做列表虚拟化" (Plugins › Discover with Subscriptions picked, 369 cards). Every redraw of Discover's body (npm's numbers coming in, a count changing) made all of them again. A grid of 48 cards or more (a kind picked, a search that matches hundreds, npm's hits) now draws only its rows near the view, 700px past each edge, and keeps the whole list's height in its padding above and below. The rows follow the scroll and the width (a ResizeObserver on the page): columns are read from the grid's own computed columns, so narrow widths and every language lay out as before. Row heights are measured as they are drawn. A card with focus stays in the page, held where it would be, so keys go on from it. Cards are made once per list and kept, so a click lands on the same node. A list shorter than 48 is drawn whole, as before. The code is in plugingrid.js, imported when Plugins first draws, so the core doesn't grow: TestCoreScriptBudget was 3,299 bytes over with it in plugins.js. Until the import lands, a long list is drawn whole, and the body is drawn again once it has. Measured with plugin-discover-virtual.test.cjs's PERF=1 on mote (load ~25 to 55, so the times are high). The time is from the Subscriptions click to the cards drawn, with a market of 503 plugins (370 subscriptions). - Before (origin/main): chromium 69.0ms at 1180px and 56.5ms at 420px, webkit 77ms and 74ms. 370 cards and 9,312 nodes in #view-plugins. - After: chromium 6.2 to 9.7ms, webkit 10 to 13ms. 30 cards and 810 nodes at 1180px, 10 cards and 312 nodes at 420px (de: 9 and 285). Guard: plugin-discover-virtual.test.cjs (new), in chromium and webkit, in en, zh, zh-TW, ja and de, at 1180px and 420px. It checks: - at most 72 cards are drawn, and the list keeps its whole height; - wheeling to the middle never shows an empty stretch, and the focused card is kept; - at the bottom pv-369 is in view and its Install posts its spec; - "pv-12" lists all 11 matches, and "pv" draws at most 72; - nothing scrolls sideways, and there are no page errors. Broken by hand: VMIN at 1e9 (every list drawn whole) turned it 22 of 22 red. Run on mote at this tree, before the rebase (mote-run): - go test ./internal/gui: ok (the budget too). gofmt -l: nothing. - plugin-discover-virtual: 22 of 22. - Every GUI file that draws plugin cards or Plugins (the 54 that grep finds pm-card, view=plugins or pluginAgentsTo), with i18n-keys and i18n-en-no-cjk: all pass, except the reds below. Reds, the same at origin/main |
||
|
|
7583ed65ce |
site: a Groq page in en, zh and ja
/docs/groq says how magpie's groq preset serves Groq with one key: adding it, Chat Completions and Responses both at api.groq.com/openai/v1, imports from OpenCode and other apps made the preset, Claude Code translated to Chat because Groq's Chat reports its cache (ResponsesTellsCache), Groq's list taken as a host's and no maker's (Hosts), a 429 naming the model resting that model alone (modelNamed), "reduce the length of the messages" read as an overflow the agent compacts on (tooLongRe), an "unsupported" field asked again without (refusesField), and Whisper and playai-tts through /v1/audio. Every claim is from internal/provider/presets.go, provider.go, models.go, importapps.go and import_opencode.go, internal/gateway/gateway.go, docs/reference.md and docs/subsystems/gateway-routing.md, with the label's zh and ja from i18n.js. Linked from each language's mistral 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 real Groq key for this page; it names only what magpie's source and docs say. |
||
|
|
aa84b568d6 |
claudetui: the undrawn-Claude test leaves its fake room to start
TestShimSaysWhatAnUndrawnClaudeWaitsOn/keychain went red on macOS CI
at
|
||
|
|
5f5307ab6d |
gui: each embedded file is hashed once, not on every load
revalidated read each embedded file again on every request to make its
ETag, and the page "/" read and hashed every file it names to version
their URLs. A release's files never change, so each one's sum (and the
versioned page) is now kept in a sync.Map after its first read. A dev
build (-tags dev) reads from disk and keeps nothing.
Measured: TestStaticFilesHashedOnce, 20 loads each, on mote:
with the memo green (app.js under 1x its size, page under 6x its)
memo off by hand app.js 26,516,856 B; page 165,916,424 B (~8 MB a
page load) - red
Run on mote: go vet ./internal/gui and -tags dev; go test -run
"StaticFilesHashedOnce|VersionedFilesKept|WebCompresses|PageFilesRevalidate|Revalidat"
./internal/gui ok.
Not tried: the full GUI suite (no change to what is served).
|
||
|
|
a8b0e80f65 |
usage: the request page's probes are made into a chunk once per change
readRequestBlocks made probeChunk again on every poll of the Requests and Usage pages: a rowChunk holding every probe since the period's start minus a day, interned again each time. On the real-account sandbox it was ~45 MB of 952 MB allocated in two and a half minutes (rowChunk.add under probeChunk, #2278). probeChunk now keeps the last chunk it made, with the probe blocks, since, renames and hosts it was made from. A frozen block is never written again (a new probe reopens the tail as a copy), UsageRenames hands back the same maps while providers.json is unchanged (Renames.Same compares them by identity), and hosts are compared by content, so the same inputs make the same chunk, which no reader writes. Any of them changing makes it again. TestProbeChunkMadeOncePerChange: the same inputs give the same chunk; a later since, a changed host and a new probe each make a new one. Measured on mote with the real-account sandbox (pageheap.sh, the request page polled to the mark): probeChunk allocated 43.81 MB at the base (w42) and 24.54 / 24.10 MB with this (w43, two runs). It is not zero there because the sandbox's network is blocked, so every probe fails and logs a new row, which makes the chunk again. Run on mote: go test ./internal/usage ok (33.9s); the test is red with the memo turned off by hand. |
||
|
|
e6184b368a |
provider: a provider's models.dev models are read, not copied three times
Provider.available, the base of every Available and Exposed, made three copies of a provider's catalog models on each call: catalog.Provider cloned the built list, available appended it into a list of its own to drop an id two catalogs share, and the list without experiments and previews was grown from nothing again. On a page open with the owner's accounts that was 74 MB of 952 MB allocated in 2m32s, the largest flat allocator of all. catalog.ProviderShared is the built list itself, for a reader (catalog.Provider still hands out a copy). available reads it through catalogsOf, which copies only when two catalogs are joined, and sizes the released list before filling it. The shared list is never returned: every way out of available returns Decorate's list, the released copy or the signed-in account's own. The built list is clipped, so an append to it reallocates. Run: go test ./internal/provider ./internal/catalog on mote (ok, provider 135s). Measured on mote's real-account sandbox (acctp, the Usage and Providers pages polled for 2m32s, pageheap.sh), w41 = the parent, w42 = this commit: allocations 993 -> 858 MB, available's cumulative 144.5 -> 52.3 MB, CPU at the settle mark 3.32 -> 3.18 s; footprint 130 MB and live heap ~76.7 MB both unchanged. The parent's full suite at d1e823d5f (same Go tree) was 99 ok, 0 FAIL; this commit's provider and catalog packages ran again, not the full suite. |
||
|
|
ac15036ab4 |
provider: a catalog entry points at its provider instead of copying it
Entry.Provider was a Provider value, 1,328 of an Entry's 1,760 bytes, copied into every model of every provider each time a catalog, an agent's list or a routing group's entries were built. It is now a *Provider: entriesOf and decide's list give every model of one provider the same one (sharedEntry), and a group's entry points at its first member's. It is read only; every place that hands it on as a value (Resolve, CanFast, ownAgent, modelAllowed, …) dereferences it, so what they get is a copy as before. entryFor keeps its signature for the one model ServedEntryOf builds; offEntries' entries now carry their provider too. Measured on mote with the owner's real accounts (acctp sandbox, page open for 2m32s, w40 = before, w41 = this, alternating): - catalogOf's allocations 106 MB -> 67 MB, providerEntries' 88 -> 78 MB - CPU at the page's settle mark 3.42/3.33 s -> 3.18/3.30 s - live heap unchanged (76.3/76.1 -> 76.7/75.9 MB): the lists are rebuilt, not kept, so the copies were churn for the GC, not held Run: go build and go vet ./... and the tests compiled (go test -run ^$) on mote; the full suite at this tree (d1e823d5f) on mica: 99 packages ok, 0 FAIL (agent 317s, gateway 972s, gui 188s, provider 220s, usage 56s). |
||
|
|
0fa15db1ca |
site: an Azure OpenAI page in en, zh and ja
/docs/azure says how magpie's azure preset serves the user's own Azure
resource: the endpoint and key from the portal (the editor's Endpoint,
or provider add azure <key> url=…), every address form AzureBase takes
moved onto the v1 API under /openai/v1 with no api-version, the key in
api-key and never a Bearer, deployments' names as the model ids and
what to type when no list comes back, an API Management gateway's URLs
kept, headers with ${sessionId}, imports made the azure preset,
content_filter read as a policy refusal (#248), Codex's bare reasoning
items left out unless store is true (#1008), and the Decisions API at
/openai/v1/decisions. Every claim is from internal/provider/azure.go
and presets.go, internal/gateway/fallback.go (policyRefusal),
internal/cli/providers_cli.go, docs/subsystems/gateway-routing.md and
providers-accounts.md, with the labels' zh and ja from i18n.js. Linked
from each language's openai 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 real Azure resource for this page; it names only what
magpie's source and docs say.
|
||
|
|
66f98d9d65 |
gui: the add sheet's tools show in the title bar once scrolled out of sight
The owner, 11-12, on the Providers page's Add sheet: 向上滑动,然后这些区域 不在可视区域的时候,这些区域应该自动浮现在Header处. Beside the sidebar (side-nav, a window 1024px wide or more), the sheet's search, Custom provider and Import… now show in the title bar's empty right, left of its buttons, once the sheet's head row has scrolled out of sight. They are put there the way Library's, Plugins' and Settings' tools are: position: fixed inside --tools-l/--tools-r/--top-h, which app.js tools() keeps out of the crumb's way (its head query now includes #addSheet .add-tools.afloat). Scrolled back up, they are in their row again. Close stays in the sheet; the screenshot's box didn't cover it. The group is pinned, never copied, so there is one search: the words typed and the focus stay with it both ways. Each change is a 180ms fade in going into the bar and 140ms coming back, cubic-bezier(.23, 1, .32, 1), opacity only, so reduced motion keeps it. Nothing moves in the sheet: the head row keeps its height while its tools are up. Narrow (no sidebar, which covers 420px and the panel): the bar has no free room, so the sheet's whole head (label, tools, Close) is held at the top of the page while the sheet is under it, the way Settings' head is in a narrow window. It has the same blur strip and a hairline once stuck. At 760px and under, the tools take a line of their own under the label. The code is in a new addfloat.js, which renderAdd imports the first time the sheet opens. In app.js it took TestCoreScriptBudget 487 bytes over (1266031 > 1265544); with the move the budget passes and isn't raised. old-webkit's list of scripts loaded on demand names it. Run at 39ac4fafe (on origin/main |
||
|
|
046a131304 |
gui: an agent's Long conversations is one row, and its context window is picked
The owner (11-12): an agent's sheet showed Long conversations twice, every
agent's row above the agent's own, which read as the same setting twice.
Now the sheet shows one row, the agent's own (.own-compact hides
#fullContextRow there). It shows the agent's own value, else every agent's,
and a change posts settings/agent-compact {agent, own: true, full, at}, so
it is that agent's alone. Settings keeps every agent's row for when no agent
holds one. The Context card's note says "Long conversations in {agent}" when
the agent holds its own value (context.js), in en/zh/zh-TW/ja/de.
The agent's context window (agentwindow.js) is picked, never typed as a
syntax: one size for all its models from the app's menu (Each model's own,
128K to 1M, Other size… typed as 300k), and "Set a model apart" adds a
model from the agent's model picker with its own size, a line each, with a
remove button.
Tests rewritten to the one row, keeping what each guarded:
- compact-one-value: Tuned for you and Long conversations are one window,
now through the agent's own value and its post.
- codex-compact-held: Codex's held values are under the agent's row.
- agent-prefs: what an agent's opened row and its panel sheet show
(#fullContextRow hidden, .row.agent-compact visible).
- compact-at: a typed size posts settings/agent-compact for Claude Code,
and never settings/full-context.
- codex-memories-settings "no Codex, no memories row": waits on the
merged row, lists the visible rows in its message.
- agent-compact, agent-window: the new row and the picker.
Run on mote (macOS, Playwright 1.62.0, chromium + webkit, every language
each file covers, narrow and wide), at
|
||
|
|
be8e352a20 |
editor: Proxy takes no room unless Custom is picked
The owner (11-12, "这些空白看起来好难受"): the Custom address and its login
were visibility:hidden while not picked, so each account kept an empty
strip (43px) between its proxy segs and the next account's name. They are
display:none now, so the gaps are even. proxy-gaps measures the segs'
bottom to the next element's top at 900 and 420 in every language;
account-proxy's no-move check now covers the lines above the pick.
Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
26/26; routing-advanced, proxy-gaps, login-export, routing-save,
key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
routing, export): 698/730. The same reds on origin/main
|
||
|
|
c21683cbf2 |
editor: Export accounts is the last account row, with an export glyph
The owner (11-12): Export accounts to a file goes last of the four account
rows, after Add an account by setup-token, and has an arrow out of a tray
instead of the plus: it adds nothing. login-export checks both.
Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
26/26; routing-advanced, proxy-gaps, login-export, routing-save,
key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
routing, export): 698/730. The same reds on origin/main
|
||
|
|
8f7ddb9e06 |
editor: Routing, Rate limited and Stays fold under Advanced
The owner (11-12): these are changed by few, so they sit at the top of the
editor's Advanced fold, collapsed by default. The fold opens on its own
when one isn't its default (routing, affinity or sink set), unless the
user already opened or closed it for this provider. Tests that pick a
routing seg open Advanced first; routing-advanced checks where the three
sit and when the fold opens, for a subscription and a relay.
Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
26/26; routing-advanced, proxy-gaps, login-export, routing-save,
key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
routing, export): 698/730. The same reds on origin/main
|
||
|
|
62044305e3 |
editor: a check-in or warm-up row holds its hidden line, so the dialog grows no second scrollbar
A provider's check-in and warm-up rows keep a .sub line out of sight,
position:absolute under hover. Their .who is display:contents and has no
box, so the line was held against the .dialog: with Advanced open the
dialog grew a scroll of its own (e.g. 1117 over 810) beside the editor's,
and in WebKit every row was 8px narrower (de 560 "Gewicht 3 · 75%" ran
2px past its row). Happens on main whenever Advanced is opened. The row
is now the line's containing block. account-weight opens Advanced and
checks the dialog doesn't scroll.
Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
26/26; routing-advanced, proxy-gaps, login-export, routing-save,
key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
routing, export): 698/730. The same reds on origin/main
|
||
|
|
2d2333cfa1 |
site: an Amazon Bedrock page in en, zh and ja
/docs/bedrock says how magpie's bedrock and bedrock-mantle presets serve Claude, OpenAI's GPT models and other makers' models with one Bedrock API key and no SigV4: adding it, region= (CLI and the editor's Region), the runtime's given list (global. profiles for Claude and GPT, in-region ids for the rest, geography profiles typed in), the API picked per model, Mantle's own model list, in-region ids and two OpenAI prefixes, Claude Code's CLAUDE_CODE_USE_BEDROCK taken out and put back, and the anthropic-beta 400 asked again without the betas. Every claim is from internal/provider/presets.go and provider.go, internal/cli/providers_cli.go (applyPairs' region=), docs/subsystems/providers-accounts.md, gateway-routing.md and agent-wiring.md, with the label's zh and ja from i18n.js. Linked from each language's anthropic 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 real Bedrock key for this page; it names only what magpie's source and docs say. |
||
|
|
909cd5c758 |
gateway tests: TestSearchQueueKeepsCodexAlive's hard cap starts at the headers
macOS CI at |
||
|
|
f9bc297a5e |
gui tests: TestPluginPageReadsWhatItDeclared's limiter check passes on every -count round
The check called pageSetAllowed with the fixed key "x", and its last call
stored "now + 2s" in the package's limiter. The next -count round's first
call, under a second later than that, was refused, so the test was red on
every round after the first ("pageSetAllowed"). The check now uses a key
of its own run.
Run on the Linux box (wsl-run, magpie-desktop; mote and mica were at load
58 and 72), at origin/main
|
||
|
|
3d4c8edcea |
gui: Open the Codex app is in Codex's row menu, not a button on its row
|
||
|
|
dbaf9d68cc |
edit: TOMLTables' list is kept with the file's other answers
The Codex agent's drift lists its config's tables on every look
(TOMLTables), and the list came from the whole parse. Over a Codex
config.toml with ~11k projects, the drift polls of an open page kept that
parse (3 to 5 MB) alive and it was never let go. GetTOMLTop and
GetTOMLTable answers were already kept beside the parse. The table list
is now kept there too, copied out of the file's text, so the idle drop
can let the parse go while a page is open.
Run (mote, at
|
||
|
|
1281046a02 |
gui: the Library's Variables tab is called Environment variables
What it holds are environment variables an agent starts with, and "Variables" alone read as something else (the owner: 应该叫环境变量). The tab, its empty line, its add buttons and the new item's sheet say environment variable in en, zh, zh-TW, ja and de (环境变量 / 環境變數 / 環境変数 / Umgebungsvariablen). "Environment variables" moves into the core i18n.js: otel's page uses the same words, and i18n-keys keeps a plugin's words its own. Run (mote, at origin/main |
||
|
|
32d6be0d05 |
gui: Memory has a brain of its own, in the sidebar and on its requests
The owner (11-12): Memory should have its own icon, a brain. The Library's Memory tab had a bookmark, and Memory's own requests (the conversations it reads into memories, made as memdistill.Agent "memory") were drawn in Routing's graph, Usage and Sessions with the generic cube under their raw id, since "memory" was no client. - icons/memory.svg: a brain, 16-grid, stroke 1.4 with round caps and joins, as the sidebar's marks are; drawn as a one-tone mask. - navicons.js: the Library's Memory tab draws the same path. - agent.others: a client "memory", named Memory, with that icon, so /api/state's clients and agent.Looks (Usage, Sessions) name and draw it. It has no User-Agent: its requests are known by their token. - TestEveryClientHasNameAndIcon: memdistill.Agent is among the ids the gateway records, so it must be a client with a real icon. - tests/memory-icon.test.cjs: the sidebar's Memory tab draws the path icons/memory.svg has (and no other tab does), and a request from "memory" in Routing is drawn with the memory mask, not the cube. Chromium and WebKit, en/zh/zh-TW/ja/de, 1100 and 420px (no sidebar at 420px, so there the request only). Run on the tree rebased onto |
||
|
|
ff8b437117 |
gui tests: library-loading's tab lists include Claude plugins (#6204)
|
||
|
|
0e181b6f88 |
gui: the saved-proxy form's fields are the app's own, and no field falls back to the browser's
The owner, 11-12, on Settings › Network › Proxies › Add (Name, http://127.0.0.1:7890, Username (optional), Password (optional)): "输入框 太简陋了。根本就不是我们整个产品的输入框组件。" proxyFormRow gave its four fields only the class proxy-credential, which sizes them in .proxy-form and styles them nowhere, so they drew as the browser's white inset boxes on either theme. They are input.words now, the same field as the gateway address and the share password on that page. The class: app.css gets a :where() base rule (zero specificity) for every text input and textarea: 1px var(--line) border, 7px radius, var(--card) background. Any rule that names a field still wins, so a field only takes it where it had the browser's look before. input-look.test.cjs opens every Settings part (Network with the saved-proxy form open and each Custom proxy pressed), a custom provider's editor and a signed-in Codex editor (every fold open, each Custom proxy pressed), and a routing group's editor (every fold open). No visible text field may have an inset/outset border, or a white background on the dark theme, and an input no rule names, put into the group editor, must not be inset. Chromium and WebKit, en zh zh-TW ja de, 1100 and 420px, light and dark. Run on mote (mote-run), at |
||
|
|
af7edcc02a |
gui: the Library's project section is titled by what it holds
The owner (11-12): the MCP tab's 项目中 ("In projects") read oddly over
the servers a project gets. The heading now says what the section is:
"Project servers" on the MCP tab and "Project skills" on the Skills tab,
which shares the section (项目服务器 / 项目技能, 專案伺服器 / 專案技能,
プロジェクトのサーバー / プロジェクトのスキル, Projektserver /
Projekt-Skills).
Run on mica, at this tree: project-servers, project-skills-groups,
project-scope, library-mcp-agentless, library-all, i18n-keys and
i18n-en-no-cjk, chromium and webkit: all ok (6, 12, 6, 22, 26, 4, 4).
project-servers checks the heading in en and zh, project-skills-groups
in every language. Broken by hand (t("In projects") back): both go red,
6 of 6 and 12 of 12.
Not tried: the real app; the change is the heading's words.
|
||
|
|
1729e1193a |
site: a Google Vertex AI page in en, zh and ja
/docs/vertex says how magpie's google-vertex preset serves Gemini, partner models (DeepSeek, GLM, gpt-oss) and Claude from the user's own Google Cloud project with no API key: turning on aiplatform.googleapis.com, gcloud application-default login or a key file, project=, location=, credentials= and impersonate= (with the GUI fields' labels), the models each location lists and typing in others, Model Garden and testing a partner or Claude model on its own, Claude on Messages API as with CLAUDE_CODE_USE_VERTEX, the Priority/Flex PayGo headers, and the errors reference.md lists. Every claim is from docs/reference.md (Google Vertex AI) and the CLI usage, with the labels' zh and ja from i18n.js. Linked from each language's gemini 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 real Vertex AI project for this page; it names only what magpie's docs and source say. |
||
|
|
5c00da3b25 |
gui: a group's note says it is optional
The owner (11-12): the note field under a group's name read as one more thing to fill in. Its placeholder now starts with "Optional", in every language: 可选,例如:给工作 Key 用 and the like. Run on mica, at this tree: group-note, group-keys, group-redact and i18n-keys in chromium and webkit, every language, 1100 and 420px: 86 of 86 ok. Broken by hand (the old placeholder back): group-note goes red. Not tried: nothing beyond the GUI tests; the change is the placeholder's words. |
||
|
|
109559913a |
gui: a group's gateway keys and masking sit under Advanced
The owner (11-12): few people bind a group to gateway keys or change how it is masked, so the group form showed two rows most never touch. Both rows now sit in the group's Advanced fold with the rest of what is set rarely, and the fold opens by itself when either is set, so a bound or masked group still shows it. Run on mica, at this tree: group-keys, group-redact, group-note and i18n-keys in chromium and webkit, en/zh/zh-TW/ja/de, 1100 and 420px: 86 of 86 ok. Broken by hand (the two rows back at the form's top level): the keys, redact and note tests fail, 50 of 82 red. group-redact now reaches its chip with reader.cjs reach(): Playwright's scrollIntoViewIfNeeded is put back by the app's scroll hold at 420px, which made it click the wrong place there. It also checks the click does not move the page. Not tried: the real app with real gateway keys. |
||
|
|
fa7e466acd |
gui: Settings' gateway row is titled a port when a port is what it takes
The owner (11-12): the row over a field that takes 3425 read 网关地址 (Gateway address). Only the port is typed there; it is titled Gateway port (网关端口, 閘道連接埠, ゲートウェイのポート, Port des Zugangspunkts), and the field's aria-label with it. With MAGPIE_ADDR set the field shows the whole host:port, off, and the row keeps Gateway address, as Chicring asked before. Run (mote, both engines): gateway-port, i18n-keys, i18n-en-no-cjk, 14 of 14 ok. Broken by hand: settings.js put back as on origin/main, gateway-port red in both engines (expected 'Gateway port'). Not tried: the real app. |
||
|
|
648cd3fdbb |
gateway: the management API leaves other keys that manage magpie alone
|
||
|
|
2bcbae35ef |
gui: Partners' heading in the Add sheet ends in "Become a sponsor"
The owner asked for an elegant sponsor button at the right of the Add sheet's Partners heading (在右边加上一个优雅精致的我要赞助的按钮). It is a quiet pill with an accent heart outline: 我要赞助 / 我要贊助 / スポンサーになる / Sponsor werden. Hover changes colour and border with `ease`, gated to a fine pointer, and :active scales to .97. A click opens the same mail usemagpie.ai's "Become a sponsor" writes (mailto:yetoneful@gmail.com?subject=Sponsoring%20magpie). /api/open lets through that one exact link (sponsorMail), not mailto: at large. Web mode sets location to it. The heading and the button share a .kind-row. The heading keeps its own box, so the Partners shine still wraps only the words. The shine test now finds the tiles after that row. Run on mica (mote was at load 33-57): - node --test add-sponsor-me, add-partners-shine, add-sheet: Chromium and WebKit, en/zh/ja/de at 900 and 440px. The new file and the shine file are green. - add-sheet chromium is red 1 of 3 with "Cannot read properties of null (reading 'serverPin')". It is red 1 of 3 on untouched origin/main |
||
|
|
1f9d2c36c6 |
edit: the YAML looks keep a slim tree, not yaml.v3's nodes
GetYAML, GetYAMLMap and GetYAMLList read the file through filememo, which kept yaml.v3's whole node tree for as long as magpie runs: ~160 bytes a node behind a pointer, with a tag, styles, comments and places that no look reads. For dsh's 68 KB settings.yaml, read by RenameLegacy at start and by dshGet on every poll, plus Hermes' config.yaml, that tree was the largest thing left in an idle tray's heap. The looks now keep a yamlLook instead: a node's kind, a scalar's value, and the nodes under it held inline. GetYAMLText still marshals yaml.v3's tree, so it keeps one under its own memo kind; only MiniMax's file is read that way. Run (pushed head's tree, on mica and mote): - go vet ./internal/edit ./internal/agent; go test ./internal/edit ok; go test ./internal/agent ok (190s, mica). - TestYAMLLooksReadAsTheNodeTree holds every key path of a file with anchors, aliases, merge keys, flow and block lists, complex keys and comments to what lookupYAML on yaml.v3's tree reads. Broken by hand (a mapping key copied as its tag, not its value), it goes red. - Idle tray, real account sandbox with the owner's 25,379 probe lines, at 150 s, three alternating runs: live heap 9.21 MB (w38, v0.1.3941) vs 8.39 and 8.41 MB (this); footprint 77 vs 75 and 74 MB. edit.parseYAMLRoot is gone from the inuse top. Not tried: Windows or Linux (no OS-specific code here). |