4b3bdbe28c682ef178672883a4c9d6495dd4e7eb
4522
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
4b3bdbe28c |
masking: the flow's dots, scan and Live dot stop moving once played (#3185)
The Masking page never came to rest. Each dot in its agents-to-providers flow was an SVG animateMotion with repeatCount "indefinite", the scan mark on the middle line ran forever, and the Live dot pulsed forever. The SMIL dots alone made Chromium lay the page out ~700 times a second (6,965 layouts and 2,282 style recalcs in 10s, read with CDP Performance.getMetrics). Removing just those 22 elements took it to 0. Now each dot goes round twice when the flow is drawn, and the scan mark plays twice. The flow is drawn again only when the numbers change. The Live dot pulses once each time the list is drawn again, which happens on each 15s read. Reduced motion is unchanged: still no motion at all. Measured on a sandbox `magpie app` (origin/main, sandbox HOME, real deepseek provider, the real masking log copied in: 19,657 values over 577 requests). The Masking page was loaded in Playwright 1.62.0, and only that browser's own processes were sampled with proc_pid_rusage, 20s per sample: - WebKit, before: 180 wakeups/s, 2.8% CPU, 56 mW. After: 37/s and 9.7 mW while the motion plays out (8-28s), then 10.8/s, 0.1% CPU, 1.4 mW. - Chromium, before: 96-98/s, 17% CPU, 537-543 mW. After: 40/s, 2.0% CPU, 57 mW while the motion plays out, then 18.5/s, 0.5% CPU, 10 mW. - The other pages at rest: 12-30/s and 1.6-7.7 mW in WebKit. Test: masking-records' new "the masking page's motion ends" (chromium and webkit, 1100px and 640px). It moves the SVG clock on an hour and asks Chromium whether any dot is still in an interval. In both engines it checks that no SMIL element is set to repeat for good and that no CSS animation has an infinite end. All 4 cases are red on the old page.js/redact.css and green on the new ones. Run at this tree: - masking-records, held-animations and i18n-keys: 68/68. - account-mask-sessions, account-mask, mask-actions, mask-emails, provider-unmasked and redact-*: 172/172. - go test -timeout 45m ./internal/gui: ok. - GOOS=linux and GOOS=windows go vet -tags nogui ./internal/gui: ok. - gofmt: clean. Other states measured, with no change made: - Go main process at rest with the window open: 25/s, 7 mW. - Streaming 3 deepseek-flash replies (2,450 SSE events in 20s): 275/s, 3.5% CPU, 107 mW, about 2 wakeups per event. Not tried: the window hidden and the tray panel open; the WKWebView in the real app window on Masking (measured in Playwright's WebKit instead); the full GUI suite. |
||
|
|
41b0445ccf |
provider: a local server's address is a field shown first, and address= on the command line (LM Studio on another computer)
mengxiangziyou on X: "供应商里的LM Studio只能用本地的,怎么用局域网里其他机器 上的LM Studio, baseUrl 不能改". Moving a local preset (Ollama, LM Studio, oMLX, MLX-Serve) to another host has worked since #1165, but the window put the Address in a "Server address" fold under the key, while the Endpoints row showed http://localhost:1234/v1 as plain text. Reproduced in a sandbox: Add > LM Studio shows the URL and nothing to change it with unless the small fold is found. - GUI: the Server address field is shown first, above the key, never folded, for a new provider and a saved one alike (its label and hint are the strings the fold used, so no new i18n keys). Saving still sends the URLs moved only when the address was changed. - CLI: `magpie provider add|set <id> address=<host:port>` moves every URL the provider has (chat, Anthropic, Responses, decision), each keeping its path; from the preset's when it was saved with none, and `address=` alone puts a local server back at its preset's. A provider of the user's own moves its own URLs. Vertex refuses it as it does url=. Before, Ollama on another computer needed url= and anthropic=. - TUI: unchanged (asked on adding, `w` after). - docs/subsystems/providers-accounts.md: Local servers row. Security: only upstream URLs move. The gateway's own loopback/origin guards are about inbound requests and don't read them; the one rule that looks at an upstream being on the LAN (Unredacted) stays the user's own switch. Run at this tree (origin/main |
||
|
|
5be7d05d28 |
agent: Desktop on magpie offers its own import of the signed-in sessions (lambdua on X)
lambdua on X: "claude Code桌面端支持么? 我桌面端切换账号,对话都能全都不见".
Nothing is lost. Desktop on magpie runs in 3p mode, whose userData is
Claude-3p, a folder apart from Claude/. Desktop 2.7032 keys Code and
Cowork sessions by account and org (claude-code-sessions/<acct>/<org>):
in 1p the claude.ai login's, in 3p the install id in ant-did and a fixed
org. So the sessions made signed in stay in Claude/ untouched and show
again when Desktop is switched back; claude.ai chats are on Anthropic's
servers. magpie's on/off never writes or removes a session (desktopOff
removes only what magpie made, and only when empty).
Desktop has its own importer (Settings -> Import: the signed-in userData,
other Claude* folders, ~/.claude/projects; copies under new ids, originals
left), but in 3p only when the profile's claudeAiImport.enabled is true
(3p-only policy, default off, since 1.28929.0). magpie's profile now gets
"claudeAiImport":{"enabled":true,"bannerBehavior":"detect"} once per
folder set (desktopSeedImport, stash mark claude-desktop.import): on the
switch on, and from Sync at magpie's start for a Desktop already on
magpie. A claudeAiImport already there is kept; one the user removes is
not written back (the mark is read, never unstashed).
Run (suite at origin/main
|
||
|
|
07936ca890 |
gateway: a turn held before routing shows on Routing and is answered 504 after 2m
heyusaku6 on X: Codex desktop thought for over ten minutes on a model served through magpie (a routing group's DeepSeek, then Qoder CN's MiniMax, then GPT-6.1 Sol), the Routing page showed none of them, and only restarting Codex and magpie ended it. Codex waits for a reply's headers with no limit of its own, and a request shows on the Routing page only once a route is begun for it, so whatever held these requests held them before routing, in silence. The root cause was not found. Every pre-route wait read (the classifier, image description, plugin GatewayBegin, JS middleware, provider.Hold, the body read, pluginrt.Refresh, the trace lock) has a bound or follows the request's context. So this makes the stall visible and bounded instead, and records where it was held: - counted watches an agent's turn (Chat, Responses, Messages, Gemini generateContent, Codex backend /responses) while no route is begun for it (unrouted.go). After 15s a route of provider "magpie" shows it on the Routing page as routing; it gives way to the request's own route when one begins (noteRoute, trace.drop). - After 2m with no route and nothing written, the client is answered 504 in its own protocol, whole (Content-Length, Connection: close) so it has the error even if the handler stays stuck. The request's context ends with errUnrouted, its route ends with the error, and the log gets every goroutine's stack (at most once in 10 minutes), which says what held it next time. - The handler writes through heldWriter, which drops its writes once magpie has answered for it. A request waiting on another request's identical image description for over 2m is now answered 504 too; the retry finds the description cached. Run in the worktree at origin/main |
||
|
|
2f44e075a2 |
agent: TZ is not an agent's folder (#3600)
|
||
|
|
5df62c5cda |
pii: pf-serve is pf-v2, which holds the model once on a GPU (#3590)
pf-v2 is 642d430ec's pf-serve (weights-once.patch): on Metal and Vulkan the GGUF is read straight into the device's buffer instead of also kept whole in a CPU copy. serveSHA pins pf-v2's five zips, each checked against the release's SHA256SUMS. A user who turned the model on before has pf-v1 on disk, in a folder named for its tag. pf-v1 now still counts as installed and is run (oldTags), and starting it fetches pf-v2 in the background (upgrade): once fetched, the running pf-v1 is ended so the next request starts pf-v2, and pf-v1's folder is deleted. One that can't be fetched leaves pf-v1 running and is tried on the next start. A fresh download fetches pf-v2 and deletes an old tag's folder. Run: - go test ./internal/pii ./internal/redact (ok), -run TestLoopGuard ./internal/gateway and -run Privacy ./internal/gui (ok, the doc and the settings route); go build; GOOS=linux and GOOS=windows go vet -tags nogui ./internal/pii; gofmt -l clean. - TestOldServeRunsUntilUpgraded and TestUpgradeThatFailsKeepsTheOld are red with `go upgrade()` taken out of start (not upgraded / never tried) and with binDir looking at serveTag alone (the old pf-serve not taken for installed). - Real: a sandbox cache with the released pf-v1 darwin-arm64 and the real model, pii.Find through it: pf-v1 answered, pf-v2 was fetched from the real release, pf-v1's folder deleted, the next request started pf-v2 (ps shows its path), 1664 MB phys_footprint idle. - pf-v2's released darwin-arm64 probed alone: 1680 MB idle (pf-v1 4777 MB), spans identical to pf-v1's; load ~1 s both, alternated 3 times. Not tried: the upgrade on Windows, where the old folder can only be deleted after its pf-serve ends (upgrade ends it first; a folder left is deleted on a later start). |
||
|
|
254461829b |
gateway: a Codex Lite request is no longer decoded whole, nor parsed twice for its facts
XiaoYin_OK on X: after a long run the app's memory climbs toward 2 GB. The owner's own app (26h up) showed RSS 550 MB, HeapInuse 317 MB but HeapSys 992 MB: the heap peaks while requests are in flight. Its profile had 209 GB allocated, ~94 GB of it under codexBackend/serve, of which: - parseResponses 24.7 GB, liftAdditionalTools 14.9 GB of it; - factsOf 24.6 GB, reached from turnOf (13.6 GB) and dirOf (11.0 GB), the same conversation parsed twice per request. Three causes, each fixed where it is: 1. liftAdditionalTools decoded the whole Lite request into maps to move its additional_tools item, and wrote it all again: ~7.6x the body. Now only that item and the tools are decoded; every other item and member goes byte for byte as it came, written once into one buffer. 2. affine counted the turn in the masked body while dirOf read the plain one, two different slices, so factsOf's memo could never serve both. affine now counts it in the body as the agent wrote it. 3. That body is rarely the one readRequestBody held (requestModel, spawnAgentModels and the lift each write a new one), so factsOf's memo missed for it anyway. serve now holds it (holdBody), and holdBody lists a body once when it is held twice. Tests (internal/gateway/lite_lift_test.go), each red on the old code: - TestLiteLiftMovesOnlyTheTools: same result as the old whole decode (liftWhole, kept in the test) on testdata/context/codex.json, the merged-namespace case, a 2,000-word conversation and the no-op shapes; an item with its keys unsorted, \u escapes and 2.50 goes as written. Old: the kept item came back re-sorted and re-escaped. - TestLiteLiftAllocatesAboutTheBody: under 2x a 1.35 MB body. Old: 14,126,976 B (10.4x). - TestMaskedRequestParsedOnceForItsFacts: a served masked Lite request is parsed once for its turn and folder (factsParsed hook in readFacts). Old: 2. With only change 2 it was still 2 (cause 3). Measured (darwin/arm64, a 4,012,240 B Lite body): - liftAdditionalTools: 30.46 MB/op, 98,560 allocs -> 5.17 MB/op, 6,609. - readFacts of it: 54.0 MB/op -> 26.7 MB/op. - Served through New().Handler() with masking on, 8 concurrent x 5 rounds of a 4,010,268 B body, two runs each: allocated per request 215.6 / 220.7 MB -> 116.2 / 116.2 MB; peak HeapInuse 993 / 802 MB -> 612 / 561 MB; HeapSys 1001 / 892 MB -> 699 / 674 MB. - The live app's WebKit processes were ~8-9 MB RSS each, so the webview is not where the memory went on macOS; the live pid sat at 476-596 MB RSS over a 15-minute sample. Run at this head: gofmt -l clean; go vet ./...; GOOS=linux go vet -tags nogui ./...; GOOS=windows go vet ./...; go build (gui and nogui); go test -tags nogui -timeout 45m ./... in a sandbox HOME at |
||
|
|
642180a809 |
redact: Insights › Masking and Try it mark a made-up key as a placeholder (#3599)
With "Keep a key's form" on ( |
||
|
|
642d430ecb |
native: pf-serve on a GPU reads the model once, not twice (#3590)
On a GPU (Metal, Vulkan), privacy-filter.cpp read the whole 1.6 GB GGUF into a CPU ggml context, copied every tensor into the device's buffer, and kept the CPU copy "as source" for as long as pf-serve ran. #3590's Mac held 4.7 GB of physical footprint idle. patches/weights-once.patch opens the GGUF metadata-only when the backend isn't the CPU, and reads each tensor from the file straight into the device's buffer through one 16 MB chunk. The CPU backend still reads it whole and uses that buffer in place, as before. Run: build.sh for every target on CI (privacy-filter run 40188759504, green on all five), then a probe (start pf-serve, classify 7 texts in en/zh/code/cards plus a 57K and a 20K text, 20 hot requests, 3 long ones, read memory after 5 s idle) on the released pf-v1 and on this commit's CI build, with the pinned model (sha256 80efc180…): Mac M4 Pro, Metal, GGML_METAL_NO_RESIDENCY=1 as magpie starts it: idle phys_footprint 4777 MB -> 1683 MB, RSS 4798 -> 1706 MB hot request median 9.0/13.8 ms -> 10.8/9.9 ms (two runs each, load average ~180, so noisy); long 1.5-1.9 s both Mac, CPU: 1852 MB both, as before Windows, AMD 8060S, Vulkan: private bytes 6629 MB -> 1968 MB, working set 3258 -> 174 MB hot median 4.2-4.7 ms both, long 0.79-0.85 s both, load 1.2 -> 0.8 s Windows, CPU: 1810 MB working set both The spans are byte-identical before and after on each backend (Metal, Mac CPU, Vulkan, Windows CPU; each backend's own as before). Not tried: Linux's pf-serve-vulkan on a real GPU (the same code path as Windows' Vulkan); linux-arm64 and darwin-amd64 run on the CPU only, which this doesn't change, and were only built. |
||
|
|
83571db8ed |
provider: Command Code's plugin is at least 0.1.17, its Credits bar second where magpie shows two windows (01huadalang on Discord)
01huadalang said the Command Code card has no bar for the total quota left. The Providers account line (quotaLine) and the menu bar (trayusage) show a provider's first two windows. A plan account's plugin reported [5 hours, Weekly, Credits], so the dollars were only in the tooltip. Plugin 0.1.17 (plugins 8531ccc) puts Credits second, after the 5 hours. The min goes to 0.1.17 so keepMovedCurrent updates every moved user. npm view @magpie-community/opencode-commandcode-auth --prefer-online: latest 0.1.17, published by publish.yml run 40186792179 with provenance (its npm job is red only on think-tags 0.1.1's known E404, plugins#180). The plugin's bun test: 65 pass. The plugin's auth.usage, against the owner's real GOAT account: 5 hours 0.93%, Credits $0.63 / $70.00, Weekly 1.20% (before: 5 hours, Weekly, Credits). Plugins PR #303 was reviewed and not merged (it loses the $ on today's magpie and adds no bar); see its comment. At the pushed head (this and the provider commit, rebased on origin/main |
||
|
|
47689f9fd9 |
gui: the usage heatmap scrolls under the app's thin thumb, not the system's bar (cybercaius on Discord)
cybercaius said the usage heatmap's scrollbar looked out of place beside the rest of the window. .heat-scroll was the only scroller with scrollbar-width: thin. In Chromium (so WebView2) a non-auto scrollbar-width drops every ::-webkit-scrollbar rule and draws the system's bar, gray track and all; on a Mac the WebView draws only the overlay bar, which a mouse never shows. The line is gone, and the Mac rules pages, dialogs and framed editors use take .heat-scroll too, so the weeks scroll under the same 8px (Mac) or 10px thumb as the page. No layout change. heatmap-scrollbar.test.cjs: chromium and webkit, on and off a Mac, a 420px card of 53 weeks: the weeks overflow, scrollbar-width is auto, and the heatmap's bar gutter equals a .view's. What was run, at this commit's tree (base |
||
|
|
758be6d14e |
library: magpie-setup is first in the market's skills, so an agent can set magpie up as asked
Leyuu_5 on X: "功能越来越多,感觉可以来个skill让AI来帮设置需求了". The skill
lives in magpie-community/plugins (skills/magpie-setup, e513644) and
teaches an agent to turn a request into magpie's own commands. Listing
it in featuredSkills puts it first under Library › Market › Skills,
official, one click to add, with no setup.
What was run at this head:
- go test ./internal/library ./internal/cli: ok (library's first run
failed only with "no space left on device" while writing testlog.txt;
run again on its own: ok 193.7s)
- TestFeaturedSkills extended: magpie-setup first, quota second, both
Official/Featured with a description; "setup", "routing" and
"gateway key" find magpie-setup first, "quota" finds magpie-quota
and not setup. Red with magpie-setup taken out of the list.
- gofmt -l internal/: empty; go vet (darwin), GOOS=linux go vet -tags
nogui, GOOS=windows go vet on internal/library and internal/cli; go build
- library.InstallMarketSkill("magpie-community/plugins", "magpie-setup")
in a sandbox HOME against the pushed plugins repo: Installed
[magpie-setup], SKILL.md in library/skills/magpie-setup.
Not run: the full ./... suite (the disk had under 1GB free), the GUI
suite (no GUI asset changed; market-featured-skill.test.cjs fakes the
list).
|
||
|
|
fba554c7f8 |
library: magpie library mcp add without agents= says the server went to no agent
A server added with no agents= is kept in the library and given to no
agent, but the command printed "✓ every agent already has it". It now
says "<name> is in the library, given to no agent yet" and names
`magpie library mcp agents <name> <a,b…>`. With agents=, and for
`mcp agents`, the output is as before ("written into claude").
Found while trying the magpie-setup skill's commands in a sandbox HOME.
Not changed (#3598): `library instructions set` with no agents chosen still
prints "every agent already has it" while no agent is given it.
Instructions have sets, so its check needs the active set's agents.
Run: go test ./internal/cli -run TestLibrary -count=1 ok; the new
TestLibraryMCPAddNoAgents fails on the old library_cli.go (reverted by
hand: "✓ every agent already has it") and passes with it. go vet
./internal/cli and gofmt -l clean.
|
||
|
|
6bffcfe178 |
gateway-key: a key's monthly limit can be set from the CLI again
`magpie gateway-key limit <id> month --cost 5` (and `add month`) failed with "an N-hour cycle is a whole number of hours …: \"month\"": parseKeyLimit cut an h off any window ending in one before it looked for a named period, and month ends in an h. A named period (day, week, month) is now taken as itself before the <N>d and <N>h forms are read. Found while trying every command for the magpie-setup skill in a sandbox HOME. Run: go test ./internal/cli -run TestGatewayKey -count=1 ok; the new month cases in TestGatewayKeyLimitCLI fail on the old parseKeyLimit (reverted by hand) and pass with it. Tried the built binary in a sandbox HOME: limit <id> month --cost 5 sets "this month". |
||
|
|
7536477c8e |
gui: the Dock icon flaps its wing and tail as the header logo does
Clicking magpie's Dock icon plays the header logo's .logo.wag on the tile: the same keyframes, turn points, .9s and cubic-bezier(.3, 0, .3, 1), a frame every 30ms. The icon macOS draws (its glass tile and glossy bird) is cut into body, tail and wing by index.html's own clip paths, the tile under the bird filled with the tile's colour read either side of it, and each frame turns the pieces over it, set as the Dock tile's content view. The tile goes back to the system's icon after. It plays only when the Dock draws icons light (no AppleIconAppearanceTheme, RegularLight, or RegularAutomatic in light mode); a dark, clear or tinted Dock is left as it is. A click while it plays doesn't start another. Run: - go test ./internal/gui/ -run TestDockFlap: TestDockFlapIsTheLogos holds the keyframes, origins, length and easing to app.css and parses the bird and clips out of the embedded index.html. Broken by hand: changing one keyframe in flapkeys.go turns it red. - TestDockFlapFrames (MAGPIE_DOCK_APP=/Applications/magpie.app) wrote the 31 frames; looked at by eye. Frame 0 against the system's own 512px render: inside the tile 0.03% of pixels differ by over 40/255 (the tile's rim resampled); the pieces' seams were visible until they overlapped by 1px. - A sandbox bundle (own bundle id, sandbox HOME, ports 3446/3447) got the Dock's reopen event by pid: a burst of screen captures of the real Dock shows the tile in different poses. - go vet ./internal/gui/, GOOS=windows go vet, GOOS=linux go vet -tags nogui, GOOS=linux go build -tags nogui, GOOS=windows go build, gofmt -l. Not tried: a dark or tinted Dock (skipped by the gate, not drawn), a real mouse click on the Dock (the same reopen event, sent by pid). |
||
|
|
7ad6df865c |
whatsnew: many releases' notes read as one list, by kind
The owner: nine releases of a line each, in the update sheet's "What
changed since v0.1.1521", read as a scattered list. When more than one
release is shown, their notes are now merged: a line saying the range
("9 releases · v0.1.1522 – v0.1.1530"), then one heading per kind (New
features, Improvements, Performance, Bug fixes, Security, Provider
changes, Changes, Documentation, then any heading of their own) with how
many lines it has, each line with the version it came in, newest first.
A line two releases both carry is said once, at the newest; a line with
no heading goes under Changes. One release reads as before. Both the
update sheet and What's new (after an update, and Settings' range
picker) merge; the not-installed badge names its range.
Run at this tree (rebased on origin/main
|
||
|
|
db6d1540ef |
redact: eval cases that reach more of modelTakes/modelFits
TestMaskEval's cases reached 5 of the 36 checks on model spans: breaking any other one by hand left it green. This adds 21 cases (39 to 60), most of them texts from modelfits_test.go and vendorchecks_test.go, the places the model was seen misreading, and records the real model's spans on them (testdata/eval-model.json). Breaking each check by hand (breaks.py: one replacement in model.go, TestMaskEval run, file restored) now turns 13 red (5 before): secret-madeID, person-2runes, email-realEmail, person-zhTrim, person-assistant, account-numberLike, account-cue, address-letter, secret-wordstart, secret-uuid, secret-hexwords, secret-hexcue, edge-delimiter. Still green, because the real model gives no such span on any text tried (24 more probed) or another check catches the same span first: secret-namesThing, secret-len8, person-snakeWord, account-madeID, cut-from-word, person-chars, person-filedot, person-pathpart, person-colon, person-lowerword (person-chars keeps the same lower-case word), account-hex, account-version, the four phone checks, secret-pattern, secret-json, secret-link, secret-base64, email-wordstart, email-modcache, email-userinfo. Their unit tests in modelfits_test.go still cover them with recorded spans. A new real miss: "hex40 ok? 1 <sha1>" is one secret span "1 <sha1>" to the model, and the hex-words check only looks at the first field. Filed as #3597 and marked Known. Totals at this head (rules / model / both, masked and wrongly): 16/40 0/89, 38/40 28/89, 39/40 1/89. Run: MAGPIE_EVAL_CACHE=$HOME/.cache go test -run TestMaskEval -v ./internal/redact (recorded, then replayed green); go test -count=1 ./internal/redact ./internal/pii ok; go vet ./internal/redact for darwin, linux and windows; gofmt -l clean; breaks.py over all 36 checks. Not tried: the full suite (only test files changed in internal/redact). |
||
|
|
dc6f3d496c |
masking: the flow's logos sit on one disc each, before the name on both sides
Insights › Masking's flow card showed each agent's and provider's logo
bare in a 16px box. A logo's own drawing fills that box or not (Pi's
edge to edge, Codex's a small tile, Alma's a picture), so three logos
of one box read as three sizes (the owner's screenshot). And an
agent's logo came after its right-aligned name, so the logos and the
names on that side lined up with nothing.
- Every logo sits 14px on a 24px disc (card fill, hairline ring), the
disc the app's agent stacks use.
- Both sides read logo, then name over count, left-aligned. The
agents' nodes are one block against the lines (a grid track as wide
as the widest), so their logos make one column and their names one
edge, as the providers' do.
Run (rebased on origin/main of 19:00, 10-25):
- masking-records.test.cjs: 52/52, Chromium and WebKit, 5 languages,
1100px and 640px. Its flow check now asserts logo before name on
both sides, a 24px round disc for every logo, and one column of
logos and one edge of names per side.
- Screenshots with the owner's case (Pi, Codex, Alma → OpenRouter,
Codex, OpenCode Zen), dark, 1x and 2x, looked at.
Broken by hand: the agent's logo back after its name turns
masking-records red ("the logo before the name").
Not tried: the light theme by eye (the disc is drawn from theme
tokens), the real app on WebKitGTK or Windows. Budgets untouched:
plugins/redact isn't in the core.
|
||
|
|
30d3001a04 |
gui: a wheel or coast macOS 13's WebKit never tells the page of still scrolls the view (issenn on Discord)
issenn, on macOS 13.7.8 (system WebKit 18615, Safari 16.6's): no page of the window scrolls by trackpad or mouse wheel, the bar doesn't move, a forced trackpad scroll shakes and snaps back, and only dragging the bar works. Cause (hedged, not seen on a real WebKit 16.6): the view guard puts back every .view scroll outside a window the reader's own events open (wheel, touch, keys, scrollOnPurpose). The bar's drag goes past it (barDrag), which is why that alone works. WebKit 16.x can scroll a view under a wheel or a coast it never dispatches to the page (WebKit bug 256582, Safari 16.4.1: monitorEvents(window) showed no wheel over some elements). With no wheel heard, no window opens, and every reader scroll is taken as code's and put back. That is the shake, and the v0.1.1488 coast chain couldn't help, since it starts from a heard wheel. Fix, in puttingBack: three put-backs on one view in one direction within a second, with no click holding (held), are the reader's. They are given back, and the fling window opens. Each later put-back the same way within a second of the last is given back at once. So a wheel turned slowly, or one run broken on a loaded Mac, loses no step. A scroll by code happens once and makes no run: two at rest are still put back, and scrolls a click holds against still are. On a WebKit that does dispatch the wheel, nothing changes: the wheel opens the window first and nothing is put back. To stay under appScriptBudget with no raise, the guard header's click bullet was shortened, and its detail moved to gui-shell.md. Test: view-wheel-unheard.test.cjs (Chromium and WebKit, en and zh). A capture listener stops every wheel before app.js hears it. Then: - ten fast 20px wheels must move the view 190px or more; - five notches 400ms apart must land, down and back up; - six wheels up must bring it back; - two code scrolls at rest are still put back; - after a click on an agent row, a code scroll each frame leaves the row in place. Run: - At origin/main |
||
|
|
2c7f0ac12c |
plugin: options saved from a hooks package's own page reach its hook
SetPageOptions saved without starting the host again for any package whose
page and panels looked like all it had. Window() only reads main/exports,
so a package with magpie.hooks and a page (magpie-community/plugins#117's
PowerContext) counted as page-only. The host hands each hook the options it
loaded with, so a Service URL or key saved from the page did nothing until
magpie restarted. A gateway hook now goes through SetOptions, as a
middleware and an agent already did.
Run at
|
||
|
|
d2e0ea393d |
pii: pf-serve starts with ggml's Metal residency heartbeat off (#3185)
macOS's Energy Impact puts magpie at the top while CPU stays at ~6% (#3185). Energy Impact counts wakeups, and an idle pf-serve (the privacy filter's llama.cpp child) woke 134-146 times a second: ggml's Metal backend keeps a residency set alive with a heartbeat. pf-serve stays up for 10 minutes after each masked request, so any masking user pays that most of the day. GGML_METAL_NO_RESIDENCY=1 turns the residency set off. Measured with proc_pid_rusage (ri_interrupt_wkups, ri_energy_nj) on an M4 Pro, idle pf-serve, 20s windows: - before, pf-serve pf-v1 as magpie starts it today: 140.0 and 138.5 wakeups/s, 2.67 mW; the user's live v0.1.1370 pf-serve child read 134-142/s - after, pf-serve started through pii.Find at this commit: 0.4, 0.3, 0.3 wakeups/s, 0.02 mW - GGML_METAL_RESIDENCY_KEEP_ALIVE_S=0 or 1 instead: 143-146/s, no help - latency: hot requests 51-78ms either way; the first request after a 5-60s idle spell 57-77ms before, 105-518ms after; 90s idle through pii.Find at this commit 56-183ms Run at this commit: - go test -count=1 ./internal/pii/ ok; TestServeStartsWithoutResidencyHeartbeat red with the env line put back to os.Environ() ("residency " on both starts), green with it - GOOS=linux and GOOS=windows go vet -tags nogui ./internal/pii/ ok, gofmt -l clean Also measured: current main in a sandbox HOME with clones of the real Claude/Codex sessions and magpie cache (no logins), window open, after warm-up: main process 1.1-2.2 wakeups/s, 0.9-1.9 mW; its WebContent 0.5/s and GPU 0.3/s. The app.js intervals and the Go tickers were read and are already held while the document is hidden or cheap. Not tried: the full suite (an env-only change to one package); a logged-in instance. The user's live v0.1.1370 main process reads 69-217 wakeups/s and 25-120 mW, which the sandbox at main (no logins) doesn't reproduce, so its source is still unknown; Vulkan/Linux pf-serve (the variable is Metal's only and ignored there). |
||
|
|
0cba7fa680 |
provider: ZCode's mover min is 0.1.30 (plugins #387)
zcode 0.1.30 (plugins 57598ad) puts metadata.user_id
{"device_id":<sign-in's device>,"account_uuid":"","session_id":""} on a
GLM Coding Plan or team Messages request when the agent sent none, as
ZCode 3.14.3's client does on every Anthropic-format request
(glm/zcode.cjs Pst/MLs, vWr); before, only the Start Plan's dressed body
carried it. A key-only account's device is hashed from the key, the same
on every start. keepMovedCurrent brings every moved user up to it.
npm view --prefer-online @magpie-community/opencode-zcode-auth version:
0.1.30 when this landed.
Run at this tree: go test ./internal/provider/ -run
'Mover|Move|Moved|Migrat|ZCode|Retir|Adopt|HandOver' -count=1 -> ok.
Not run: the full suite (a one-line min change).
|
||
|
|
09c0a844bd |
gui: the tray panel draws its last allowances at once and asks for them beside the state (#3160, #3134)
The panel's Allowances tab stood on skeletons until the whole /api/state had been read and only then asked /api/usage/quotas: the request trace on the old code shows the quotas GET starting after the state ends every time (state 216+73ms, quotas at 321ms; a run whose state took 2704ms asked at 2825ms). On a machine with many agents the state alone is seconds, and the vendors' reads came after it. - The panel keeps the allowances last read in its webview's storage (magpie.panelQuotas) and draws them at once, each card's refresh turning (.quota-refresh.reading) until the read lands in their place (yiliang114's stale-while-revalidate, #3160). Kept cards wait for a state, the kept ?last=1 one or the read one, to say which are hidden. - The first load asks for the allowances beside the state, not after it (panelQuotasNow, the same opened/not-opened rule as before, #1588). - The core budgets go to the new size: the tray panel's, the core's own. |
||
|
|
f1537d9f95 |
context: the map counts on as a live request grows, and keeps its tip
The owner asked for the rest of what flohoeller's context map on X does,
keeping the A1 colours. On a live request's redraw:
- Every token count (the big number, the short head, the legend, each
tile's value) counts on from what it said to the new value over 620ms
(ease-out), instead of jumping. morph rolls any element with data-n;
a tile's value rolls as the tile glides. With motion reduced, or on a
first draw, the value is simply set.
- A tile pointed at keeps its tip through the redraw: the tip is told
again with what the tile holds now and kept over it while it glides
(followTip). Before, every redraw closed it.
- A tool's gathered results say how many ("exec_command ×20"), and the
small files gathered into one tile name the folder they share
("api/ · 6 files") where they share one; otherwise "N more" as before.
"{n} files" is translated (zh, zh-TW, ja, de).
A frame's time can be before the roll's start, which made the first
frame count back (40K, 39.8K, 40.7K); the progress is clamped at 0.
coreScriptBudget: 1,530,631 to 1,533,445: 2,810 bytes of context.js
(which the Routing page draws as well as Usage) and 4 bytes
|
||
|
|
b30734f964 |
sessions: Antigravity CLI (agy) conversations are listed, with title, folder, tokens and resume (RickyWei, #1718)
agy's conversations were on no Sessions page: internal/sessions had no lister for them, only the calls reader of #2097. Now each ~/.gemini/antigravity-cli/brain/<id>/.system_generated/logs/transcript_full.jsonl is a session (agy.go). Its steps give the start and last times, the first prompt (taken out of agy's <USER_REQUEST> wrapper), prompts, replies, tool calls, and tokens under the model "agy", since no step names one. A step written again replaces its tokens, read on or read whole. The title and folder come from the conversation's conversation_summaries.db row: title, and workspace_uris through agyFolder, which turns file:///C:/... and file:///c%3A/... into C:\... and a host into \\host\share on Windows. agy writes the title after the transcript, so the row is the file's rev. The database is read again only when it or its -wal changed, and a failed read keeps the rows read before. A row with conversations/<id>.db and no transcript (#1718's case) is listed from the row alone, with no tokens and no conversation to open. Resume is "agy --conversation <id>". When agy is set to use magpie, it is the agent's launch command (gateway variables and --model, the PowerShell form on Windows) with --conversation after it, through sessions.AgyStart, which package agent sets. The transcript (user text, thinking, text, tool calls, tool results) can be opened and searched. Format read from real files: agy 1.3.5 and 1.4.7 in a sandbox HOME against a fake Gemini endpoint, with plain replies, a read_file tool call with thinking, invalid tool calls, and a conversation picked up again with --conversation from another folder. testdata/agy-sessions is three of those conversations with paths rewritten to /work. Resume tried for real in the sandbox: `agy --conversation <id> -p again` from another folder appended steps 2-4 to the same transcript and kept the row's folder. Interactive `agy --conversation <id>` (in tmux) showed the earlier turns. Run at this tree, rebased on origin/main: - gofmt -l internal clean - go vet: darwin; GOOS=linux -tags nogui; GOOS=windows - GOOS=windows go build ./...; GOOS=linux go build -tags nogui ./... - go test -count=1 ./internal/sessions ./internal/gui ./internal/agent: ok before the row-only change. After it, sessions ok, and gui had one red, TestMainWindowCorners killed at its 40s deadline at load ~300 (#1936). It passes alone (47s). - GUI (playwright 1.62.0, chromium and webkit, en and zh): i18n-keys, gui-de, gui-ja, gui-zh-tw, session-terminal, sessions-bar-names, sessions-manage, sessions-talk, sessions-toolbar: 49 of 49. No GUI asset changed. Tab names come from the agent registry. Fails without the change (broken by hand, each one red): - agyFiles out of allFiles: TestAgySessions, TestAgyTitleLater, TestAgyTranscript - agy out of refresh's DBRevision check: TestAgyTitleLater - no dropUse of a rewritten step: TestAgyGrows (4510 input, want 3010) - AgyStart ignored: TestAgySessions (wired resume) - drive letter not handled: TestAgyFolder - agy out of HasTranscript: TestAgySessions, TestAgyTranscript - the row-only listing off: TestAgyRowOnly; readable() off: TestAgyRowOnly Not tried: agy on Windows. The Windows box (10.0.0.132) didn't answer ssh, so the Windows paths are covered by unit tests only (agyFolder, the Set-Location resume form). A wired resume through magpie's real gateway was not tried. Not done: subagents (parent_conversation_id), which I never saw agy write. The model name, which is only in conversations/<id>.db's protobuf (#3147). Deleting an agy session from magpie. agy in WSL: #3595. Side effect: agy's self-updater ran in the sandbox and replaced the live ~/.local/bin/agy, 1.3.5 -> 1.4.7. |
||
|
|
84c50f0328 |
update: an old "up to date" isn't said, and Settings' Version row asks again (RickyWei)
RickyWei (Discord, Windows, Chinese UI): Settings > 关于 said 版本 0.1.1402 ·
已是最新 with v0.1.1517 out on yetone/magpie-releases.
Cause, from the v0.1.1402 code (internal/gui/update.go is unchanged since):
state "latest" is set only when a check that worked found nothing newer,
and a failed read is state "error" ("Couldn't check for updates"), so the
row's claim is the answer of one check. Nothing aged it: the state stayed
"latest" until the next check, and the row only read it. v0.1.1402 was the
newest release from 13:14 to 13:37 UTC on 10-24 (v0.1.1403 at 13:37), so
a check then said up to date, and with automatic checks off (Settings'
"only when asked") or once a day that stood for the next day while ~115
releases went out. The feed itself is right: usemagpie.ai/api/latest,
with ?lang=zh too, answers 0.1.1517 (gh release list agrees), the version
order is numeric, and nothing on Windows skips the check. Hedged: the
user's settings aren't known, so the interval is inferred, not seen.
Now:
- jsonIn reports a "latest" older than freshAfter (5 min) as "" (not
asked lately), so no surface says up to date from an old answer.
- GET /api/update?fresh=1, which only Settings' Version row sends, asks
the feed again over a stale "latest" with automatic updates on; the row
shows checking and reads again. With them off nothing is asked by
itself, and the row says "Automatic updates are off" with Check.
The header pill's reads don't ask, so the feed's cadence is unchanged
for a window left open.
- app.js stays inside TestCoreScriptBudget: a comment word went.
Run, at this tree:
- TestStaleLatestIsNotUpToDate (new): 1402 checked while newest, then
the feed at 1517 and the answer aged past freshAfter: the plain read
isn't "latest" and asks nothing, the row's read finds 1517
("available"); with automatic updates off it is "" and asks nothing.
Red on origin/main's update.go ("an old answer still says up to date"),
green with it.
- update-check.test.cjs asserts the row reads with fresh=1: red on
origin/main's app.js (4 of 4 language/engine cases), green now.
- go test -tags nogui ./internal/gui ./internal/update (sandbox HOME): ok.
- The 21 GUI files that fake /api/update plus i18n-keys, Chromium and
WebKit, en/zh where they cover them: 299 of 300 pass. The red is
header-centre webkit (ResizeObserver loop as a page error), red the
same on untouched origin/main
|
||
|
|
c888ef2725 |
routing: a rule's hours are kept in the zone they were set in (gaubeebangeel on X)
magpie on a cloud server in UTC read a routing group's rule hours on the
server's clock, so a Beijing user's 09:00-18:00 held at 17:00-02:00
Beijing time, with nothing saying so.
- provider.TimeWindow carries the IANA zone its hours were set in
("zone": "Asia/Shanghai", omitempty). Holds reads From, To and Days in
that zone (time.LoadLocation, cached; Go's embedded tzdata, so Windows
knows them too). A window with no zone, every one saved before this,
stays on magpie's own clock (time.Local) as before. A zone magpie
doesn't know is refused on save (clean); one in a file edited by hand
makes the window never hold, so the rule is as if absent, never always
on and never hours off. Text() adds " (Zone)"; Line() writes tz=.
- GUI: changing a rule's hours or days in the editor saves the browser's
zone (Intl resolvedOptions().timeZone); hours left alone keep theirs.
/api/groups gives magpie's clock (clock: zone, offset in seconds), and
when its offset differs from the hours' zone the Routing page tells the
zone beside them, on the group's rules and in the editor: "Asia/Shanghai
time" (zh "Asia/Shanghai 时间"), or "server time, UTC+0" (zh "服务器时间
UTC+0") for hours with no zone. Nothing is added when the clocks agree.
zh, zh-TW, ja, de.
- CLI and TUI: time=09:00-18:00@Asia/Shanghai or tz=Asia/Shanghai; with
none, this computer's zone ($TZ, time.Local, the /etc/localtime link)
when it has an IANA name, otherwise none (magpie's clock). An unknown
zone is refused with what one looks like; tz= alone needs time= or
days=. Usage text updated.
- docs/subsystems/gateway-routing.md: the zone rules.
Older magpie reading a shared or synced group ignores zone and reads the
hours on its own clock, as before.
Run in a sandbox HOME with pinned Go caches, first at base
|
||
|
|
11907448e3 |
provider: the Cursor mover's min is 0.2.23, which sends a Team account's x-cursor-team-id (plugins#231)
npm view --prefer-online @magpie-community/opencode-cursor-auth: 0.2.23. Ran: go test ./internal/provider -run 'Mover|Moved|Min|Cursor' (ok), gofmt -l clean. Not run: the full suite (a one-line min change). The plugin change itself was reviewed and run against a real Cursor account in plugins#231. |
||
|
|
120264a49f |
sessions: a Codex line's marks are read in one pass, not one bytes.Contains each (#3493)
callHead and codexCallLine asked of every rollout line, with a
bytes.Contains each, whether it held "type":"user_message",
"role":"user", "type":"function_call_output" and nine more: up to twelve
passes over the line in each, a line of megabytes of tool output
included. A CPU profile of a cold usage read on Windows (20,807 Codex
rollouts, 44GB, magpie web in a sandbox home on the Windows box) put 37%
of its 270s of samples in that bytes.Contains (indexbody).
cxMarksOf reads them all in one pass: it walks each `":"` that ends a key
(in a JSON string the quotes are escaped, so never one inside a string),
and records the "type" values and the user's role it finds. It finds
what each value's own pass found: the same line, anywhere in it.
Run:
- TestCxMarksAsContains: twelve lines (long escaped strings holding the
values, a nested value past a long string, "subtype"/"xtype" keys,
"role":"users", empty and cut lines) give the same marks as a
bytes.Contains of each. Red when the role is not recorded (3 lines).
- Every line of the owner's real ~/.codex/sessions, read only: 619
files, 20,059 lines, 4.3GB, 0 lines whose marks differ.
- BenchmarkCxMarks, a 1MB exec_command_end line: 0.36ms a line, from
11.2ms.
- Windows box, cold (.cache\magpie removed), magpie web, 3 rounds each,
alternating, origin/main
|
||
|
|
d580537201 |
provider: the ZCode mover's min is 0.1.29, a sign-in keeping the account's user id
zcode 0.1.29 (plugins 5c9b7a4) gives each sign-in uid: ZCode's user_id, so the plugin host tells two ZCode accounts of one name apart (wakkana on Discord reported it for WorkBuddy), and the app's entry follows ZCode only while it is signed in to that user id. keepMovedCurrent brings moved users up to it. npm view --prefer-online @magpie-community/opencode-zcode-auth version: 0.1.29 at landing. go test -run 'Mover|Movers|Notice|Migrat' ./internal/provider: ok. |
||
|
|
552cdf8071 |
redact: a value the model spans from the delimiter before it is masked (#3591)
The model's span may start at the token before a value: the `":"` of
a JSON field, a CSV row's comma. A phone number in
{"phone":"+86 139 1234 5678"} came as `":"+86 139 1234 5678`, and in a
CSV row as `,+81 90-1234-5678`, which the PHONE check took for no
number, and it went as written. A name came as `"Wei Zhang"` and was
masked with its quotes, so the JSON lost them. modelSpans now trims
spaces and `"',;:` from both ends of a name's, a phone's, an
address's, an account's and an email's span; a secret's only spaces,
since a password may start or end with a quote.
Found by TestMaskEval: its 3 #3591 phones are no longer Known, and
"both" reads 33/34 masked, 0/40 wrongly (from 30/34).
Run: go test ./internal/redact and ./internal/pii ok; -run
'Mask|Redact|Privacy' ./internal/gui ./internal/gateway ok; go vet
darwin, linux, windows; gofmt -l clean.
Broken by hand: edge = isSpace for every kind: TestModelSpanLeavesDelimiters
red (both phones as written, the name's quotes gone) and TestMaskEval
red on the 3 phones.
Not tried: the full suite (internal/proc's #3567 is red on main), a
real request through the gateway with the model on.
|
||
|
|
033990e642 |
redact: the masking evaluation starts with nothing known
A value Mask masks is known from then on, and masked wherever it is again (known.go), Preview's too. TestMaskEval ran after the tests that masked hunter2pass, rina.k@fastmail.com and the like, so in the package's full run what they masked was masked in its cases too, and the rules' column was not the rules': with one test before it that masked the eval's phones, rules read 19/34 for 16/34. Forget (export_test.go) lets every value go before the cases. 180cfb565's body says 38 cases; there are 39. Run: go test ./internal/redact (TestMaskEval in the full run and alone: 16/34 rules either way) and ./internal/pii ok; go vet darwin, linux, windows; gofmt -l clean. Broken by hand: without Forget and with a test before it that masks the eval's phones, rules read 19/34. |
||
|
|
a30aed0162 |
provider: the WorkBuddy mover tells two accounts of one nickname apart by uid
wakkana on Discord: WorkBuddy accounts with one display name collapse into one, deduped by name (wbWho's nickname, addSideLogin's EqualFold). Where that runs today: WorkBuddy's built-in sign-in is gone, so addSideLogin no longer writes WorkBuddy accounts. A sign-in through the plugin goes to the plugin host, whose settle already keeps two accounts of one name with different uids apart and lets the same uid replace itself (#413, TestPluginSameNameOtherUID, passes at this head). What was left by name is the mover, for accounts not moved yet: - wbLogins dropped WorkBuddy desktop's account when an account magpie signed in had the same nickname, whatever its uid (the generic "one of magpie's stands for the agent's own" rule). Now it stands for it only when the uid matches; one removed in magpie stays out. - renewedSince matched by name, so the desktop's marker read as the other "Me" renewed and the move would never commit. Moving and movedAccount carry the vendor's id (WorkBuddy's uid), matched by it where both have one; the agent's own is never compared; putBack skips by plugin key, not name. Other movers have no id set, so they match by name as before; their built-ins name accounts by email or login. The live addSideLogin callers (Copilot, Google, ChatGPT API) name accounts by login or email too. Sibling plugin: zcode 0.1.29 (plugins 5c9b7a4) now gives a uid, its min is raised in a separate commit. Run on origin/main |
||
|
|
a093e9c3a5 |
claude: a Claude Code run holding over its memory budget is let go after its turn, its session resumed (#3256)
claudeRoom bounded how many Claude Code processes run, not how large each one is. A run is kept for its conversation's next turn, turn after turn, and on a service never restarted one grew for days: a node-MainThread in magpie.service reached 8 GiB RSS on a 31 GiB host and the OOM killer took the machine down (#3256). Now each time a run's reply ends, its process tree's resident memory is read (proc.Tree.RSS: /proc VmRSS on Linux, ps on macOS, the working sets of its job's processes on Windows, so an npm claude.cmd's node counts) and logged with its pid. Over the budget (an eighth of memLimit on Linux, of the computer's memory elsewhere, 1 GiB at least, 4 GiB if unknown), a whole turn's run is not kept idle: its session is shelved and the next turn resumes it in a new Claude Code with --resume, told only the new messages. A run parked on tool calls is let go past 1.5x the budget (no session to shelve there; its results start a new run). Each Claude Code also logs pid and model at start, and run time, how it ended and peak RSS (ru_maxrss) at its end, so an OOM pid can be found in magpie's log. Budget on the reporter's 31 GiB host: 3.9 GiB. Run (worktree at |
||
|
|
59f02d42cb |
provider: the Qoder mover's min is 0.2.37, so a QwenWork personal account's usage shows what is left (plugins#385)
opencode-qoder-auth 0.2.37 (npm view --prefer-online: 0.2.37) reads a QwenWork personal account's account-context quota, whose total and used are null, as a balance of the credits left, with the daily, monthly and long-term pools from /api/v1/adapter/user/wallets, as QwenWorkCN.app 1.2.1's own client reads them. 0.2.36 called every such account "the account reports no credits". Run: go test ./internal/provider -count=1 ok (141.6s); go vet ./internal/provider for darwin, linux and windows; gofmt -l clean. |
||
|
|
180cfb565e |
redact: an evaluation of the masking, with the rules, the model and both
TestMaskEval scores 38 made-up texts of the kinds agents send (prose, code, logs, tool results, JSON, CSV, Chinese) with 34 values to mask and 40 to keep. The cases start from what users reported masked wrongly (#3144, #3143, #3029, #3538, #3577, |
||
|
|
5f17c5a38e |
gui: a request's tool results are orange in its context, not pink
The owner found the context map's colours a little off (10-25, the Routing card). Tool results, often the biggest tile, took the palette's pink, which at the map's 11% tint sinks to a maroon between violet, sky and slate. Of the drafts shown (current, results orange, equal lightness, stronger tint) the owner picked results orange. --k-results is #fdba74 in dark mode and #ea580c in light, deep enough there to stand apart from memory's amber (#f59e0b). Colorblind mode keeps its palette's --c5, as every other part does. Nothing else changes: the tint, edges, text mixes and the other parts' colours. Run (darwin): go test ./internal/gui ok; GUI in chromium and webkit: context-map 22/22, routing-context-fold 24/24, context-window 24/24. Not run: the whole GUI suite; no screenshot of light mode in the app. |
||
|
|
1dfa284840 |
usage: a plugin's row of text alone shows its text, not "· 100% left"
AutoClaw's 积分余额, Cline's balance, Cursor's Auto + Composer note and
the other plugin rows that are only words come to magpie as a window set
aside with a display and nothing counted (used 0, no amount, no limit).
Every surface read that used 0 as a share: the usage card said
"1,234 积分 · 100% left" (or "· 0% used") beside an empty meter, the
panel drew an empty ring, the TUI an empty bar, `magpie accounts` and
`magpie quota` "积分余额 0% (1,234 积分)", and the status line
"积分余额 0%".
provider: QuotaWindow.Text (json "text") marks such a row in
quotaOfPlugin: aside, a display, used/amount/limit all 0. Aside is
required: Cursor's On-demand "$0 / $20" isn't set aside and is a real
0%. QuotaSpan carries it to /api/quotas.
GUI (app.js): quotaText gives the display alone; the account row's
meter, the Usage page's track and the panel's rings leave the row out;
a panel card with only such rows shows their text on its line, as an
Unlimited card does. The tray's menu-bar text already skips aside rows.
TUI quotaCell, the CLI's quotaCell (accounts, quota) and statuslineCard
write the name and the text.
app.js stays under its budget (1,322,289, not raised; now 1,322,275):
to make room, the 8 copies of Math.max(0, Math.min(100, x)) are one
to100(x), and 8 one-line [..].filter(Boolean).join("\n") tooltips are
tipLines(..). Same results; the GUI files below cover those callers.
Readings cached before this release have no text flag and show as
before until the account is read again (a minute's cache, or Refresh).
Run, at this commit's tree (rebased on origin/main
|
||
|
|
99de8e1ad1 |
gui: the warm-up's whole-history reads hold Go to the memory it held when they began (#3493)
A cold build of the request index (after any update that changes
internal/usage) reads every session again and allocates ~1.2 GB to keep
~40 MB more. Even under GOGC 25 the heap overshot its goal into pages it
kept, so a cold start peaked ~70 MB over a warm one. underTightGC now also
sets a soft memory limit at what Go holds of the system's memory when its
read begins (total mapped less released), and puts the old limit back
after. A lower limit the user set is kept, and GOGC off gets none.
Real data, 15.7k sessions (sbpairs: copies of the real cache/config, the
real Claude Code and Codex session folders linked read-only), harness
TestZZWarm running warmSteps under sessions.Warm, phys_footprint_peak,
old =
|
||
|
|
54b198c5c1 |
gui: a plugin's page grows to its README on a spring, not in one jump
A plugin's page (Plugins › Discover) opens with a skeleton for its README, and when the README came in the dialog took its new height in one frame. Now detail()'s fill() measures the dialog, puts the README in, re-centres it (holdModal), and animates height and top together from the old box to the new on SPRING, the curve the dialog opened on (570ms, 1.5% over), clipped while it grows; the README fades in over it. Height and top move on one curve, so the dialog keeps the middle in every frame. The same for the error note when npm or GitHub doesn't answer. Reduced motion: no animation, as before. Budget: the core 1,530,050 -> 1,530,631, the 581 bytes of fill(), the Plugins page's own, no room added. Run at this head (rebased on |
||
|
|
9277c25673 |
masking: under the number, the flow's middle takes the card's width, and sits further from the chart
The owner's screenshot of Insights › 脱敏 with the band stacked: the animation stayed narrow, as each of the flow's three columns kept a third of the card, and it sat 16px under the chart. Under 780px the names now take what they need (fit-content, up to 150px, 120px under 640px) and the middle the rest; the gap is 28px. Measured in Chromium, the middle's width before → after: 760px window 386 → 452, 640px 189 → 365, 560px 162 → 285, 480px 135 → 205. 820px and up (the flow beside the number) is unchanged. Run: screenshots at 760, 640 and 560 in Chromium and WebKit, before and after; GUI masking-records 52/52, privacy-usage-stats 4/4, mask-actions 20/20, i18n-keys 4/4, click-scroll 22/22; privacy-model 23/24 in that run, beside a Go test run, and 24/24 three times alone after it (the failing test's name wasn't kept); go test -tags nogui -run Budget ./internal/gui ok. Not tried: the whole GUI suite; the real Linux app (WebKitGTK). |
||
|
|
3ee37aea64 |
gui: Codex's card has no subagent-model or memories square beside its settings rows
Codex's sheet has "Codex subagent model" and "Codex memories model" as
named rows (renderCodexSubagentModel, renderCodexMemories), just under
the card, and the card also drew a square for each: the same setting
twice (the owner, 10-25, a screenshot of the notebook square beside the
memories row). The squares are no longer drawn for the Codex those rows
read (id "codex", not gateway mode); they are left out of the extras
count and of the extras toggle too. A Codex in WSL, which the rows don't
read, keeps its squares.
Tests: codex-memories and codex-subagent-model run the square on a WSL
Codex and check Codex's own card has none; codex-subagent-model picks
and resets through #codexSubagentModelRow; codex-memories-settings
resets through the row instead of the square.
Run: GUI codex-memories, codex-memories-settings, codex-subagent-model,
codex-subagents-lead, desktop-subagent-model, Chromium and WebKit, every
language and width they have: 82 of 82. Earlier run of these plus
codex-start-model-field, subagent-effort, agent-prefs, agent-tweak-fold,
gateway-mode and mobile-web at concurrency 4: only the expected square
reds plus two page.goto/click timeouts under load (codex-subagents-lead
webkit zh-TW 560, desktop-subagent-model webkit zh 1100), both green in
the 82-of-82 run. After the rebase on origin/main the change was trimmed (one sq helper
for the extras toggle and count) and the budgets raised to its size:
app.js 1,322,537, core 1,530,050, with no room added (TestCoreScriptBudget
ok). Rerun at that tree: codex-memories, codex-memories-settings,
codex-subagent-model, agent-tweak-fold, gateway-mode, 58 of 60; the two
reds are gateway-mode's masking tab, red the same on origin/main
|
||
|
|
9dc7d6eb84 |
usage: a large build's archives are held in a spill file as they are made (#3493)
A cold build (first start, or after an update that changes internal/usage)
kept every chunk's archive on the heap until save had written
requests-v1.bin and swapped them for the file's pages: 31MB for 15.7k
sessions, the largest thing a cold peak held over a warm start's.
Now a build that wants requestDiskLeast or more files written writes each
archive to requests-*.spill as the chunk is made, lets go of the heap copy,
and maps the file once the build is done (unlinked at once). save then
swaps the spill's pages for requests-v1.bin's as before: pagesRank orders
heap < spill < file, and keep and save take the later. A spill that can't
be written or mapped has each of its chunks made again from its source, so
none is left without an archive. Windows maps no file, so nothing changes
there.
Run, real data (15.7k Claude Code + Codex sessions, sandbox HOME, copies of
the call shards, requests-v1.bin removed before each run), the gui warm-up
harness alternating old (
|
||
|
|
e4809a150a |
redact: a key of digits only after 密钥为, token 是, apikey:… is masked; PIN码, 安全码, 授权码 join the names (CyberCaius on Discord)
"密钥为12231241" in Settings → Masking's 试一试 came back "这里没有需要脱敏的
内容". ee715c2e0's key rules (a CJK name for a key or token, or an English
one before 为/為/是/:) asked for letters in the value, so that
"RSA 密钥为 2048 位" stays; an all-digit key went as written. 密码/口令 took
digits already (
|
||
|
|
4b1994ad31 |
agent: AionUi, added through its add-provider link
seven7032 on Discord asked how to connect AionUi to magpie. AionUi
keeps its providers in its own SQLite database
(<userData>/aionui/aionui-backend.db, WAL mode), each key encrypted, so
there is no config file for magpie to write. The one supported way in
is its deeplink. AionUi 2.2.2's main process parses it
(parseDeepLinkUrl), and its renderer opens Settings -> Model with the
add form filled in, which the user confirms:
aionui://add-provider?api_key=magpie-aionui&base_url=<gw>/v1&name=magpie&platform=custom
The AionUi row works the way Cindy's and Lody's do:
- Add magpie opens that link. /api/open allows the aionui://add-provider?
prefix only. `magpie aionui add` opens it from the CLI.
- The key is agentKeyAt("aionui"), so it becomes the LAN key while
sharing is on (added to TestPinnedGatewayKeyForEveryWriter).
- "custom" is AionUi's OpenAI-compatible platform. Its base URLs end in
/v1, as its own OpenAI preset's does.
- Added reads providers.base_url for the gateway's address without
touching the database (sessions.OpenUntouched, from the previous
commit). A database that can't be read is unknown, never "not added".
The last read is kept while the database and its log keep their size
and time, for 15s at most, so the Agents poll doesn't copy a running
AionUi's database every time.
- It is detected by userData/aionui (os.UserConfigDir()/AionUi on every
OS).
- As with Cindy and Lody, the TUI leaves the row out (nothing to pick).
Tests:
- TestAionUiLink: the link's exact bytes.
- TestAionUiLinkParsedAs2_2_2: runs the link through
testdata/aionui/deeplink-2.2.2.js, which is parseDeepLinkUrl copied
byte for byte from 2.2.2's app.asar (out/main/index.js 50995-51021)
plus the renderer's add-provider mapping and the form prefill. The
result is action add-provider, route /settings/model, and the form gets
platform custom, the /v1 base URL and the key.
- TestAionUiHas: a fixture database built from 2.2.2's real providers
schema (taken from the database 2.2.2 made at first start). It covers
none, another gateway, a row present only in the log of a running app,
and a closed app, and checks that AionUi's folder is unchanged each
time.
- TestAionUiUnreadableIsUnknown, TestAionUiStatusRereadsOnChange,
TestAionUiDetect, TestAionUiImportRow (GUI: the row, unknown status,
and /api/open refusing other aionui:// links).
- import-row.test.cjs gains the AionUi row (icon, known status in each
language, the click opens the exact link, and it fits at 420px), in
chromium and webkit across en, zh, zh-TW, ja and de. The same file
now waits for the rows to settle before its alignment check: under
load 105 one run caught Cindy's button mid-resize at 193.4px beside
the picker's 194.4px. The old file passed 3/3 alone, so it is a
timing assumption, not a layout bug.
Run at 18041fc5b (this change on origin/main
|
||
|
|
c26a418d23 |
agent: an import app's status magpie can't read is unknown, not "not added"
Agent.Added now returns (added, known). Cindy's reader turned any
failure (a locked, corrupt or unreadable cindy-local-v1.db) into "Not
added", which told a user who had added magpie that they hadn't. Now
an unreadable database is unknown: /api/agents leaves `added` out and
the row shows the "confirm it there" hint, as it does for Lody. A
stopped WSL distro's app is unknown too, not "not added".
Cindy's database is also read without writing beside it. A mode=ro
open of a WAL database while Cindy was closed made cindy-local-v1.db-wal
and -shm in Cindy's own folder. It now goes through
sessions.OpenUntouched, which is what the Cursor reader already did
(immutable with no log, from a copy with one), moved out of
openCursorStore so both share it.
The CLI's list still offers `magpie cindy add` when the status is
unknown; it never said magpie was missing.
Run: go test ./internal/agent ./internal/sessions ./internal/cli ok;
go test ./internal/gui -run 'Import|Lody|Cindy|Agents' ok.
Broken by hand: Cindy's reader put back on the mode=ro open made
TestCindyHasClosedWALAndUnreadable red ("Cindy's folder changed:
cindy-local-v1.db -> cindy-local-v1.db,cindy-local-v1.db-shm,
cindy-local-v1.db-wal"); api.go ignoring `known` made
TestImportStatusUnreadableIsUnknown red. Both restored, both green.
Not tried: a real Cindy install; the read is tested on fixture
databases only.
|
||
|
|
faa79ea2f5 |
redact: a Unix time the local model takes for a phone is not masked (#3577)
id.null (v0.1.1483) saw a tool result's "timestamp": 1792903687 go as
"timestamp": {{PHONE_c2ukh7gk}}. The PHONE rule needs eleven digits, so
the local model found it; v0.1.1457's check leaves a bare number alone
unless a cue is before it, but cues match inside words, and a log's
"tool_call" (or "telemetry") is "call" (or "tel").
A ten-digit time, or a thirteen-digit one in milliseconds, starting with
1 and nothing else, is now never a phone, cued or not: a North American
area code starts with 2 to 9, and a Chinese mobile is eleven digits.
The loose cues themselves are #3585.
Run: go test ./internal/redact ok; go vet darwin, linux, windows; gofmt
clean. Broken by hand: without the epochNumber check
TestModelPhoneKeepsUnixTime is red with the reporter's line masked.
Not tried: the real model on the reporter's whole tool result (their
screenshot only has the one line); the full Go suite.
|
||
|
|
fc91e58ba4 |
redact: a bare JSON number ("timestamp": 17929036837) is not masked as a phone (id.null on Discord)
The 脱敏 before/after view showed a tool result holding a session file's
JSONL line, and its "timestamp": 17929036837 went as {{PHONE_…}}. The
PHONE rule is 1[3-9]\d{9} bounded by digits, so any 11-digit number
starting 13-19 is a CN mobile wherever it sits. A phone, a card or an ID
number in JSON is a string; a bare number there is a count, an id or a
time.
Now a personal kind's value that is all of a bare JSON number is left,
judged by where it sits and its form, not by the key's name: digits only,
after "key": (an object's value) or inside an array of numbers, with only
, } ] or the text's end after it. It sits beside the decimal check
(noDecimals, now noNumbers), so it holds for what the rules, the model
and values known before find alike. A BANK_CARD (Luhn-valid snowflake)
and an ID_CARD's digits as JSON numbers are left the same way.
Still masked (tested): "phone": "13800138000", ["13800138000"],
phone:13800138000, "call 13800138000, thanks", 我的号码 13800138000,谢谢,
"numbers 13900139000, 13800138000]" (no [ before), a phone inside a JSON
string's text, "card": "4111111111111111", and every case of
TestStandaloneNumbersStillMasked. "phone": 13800138000 as a number is
left too; that is the cost of not going by the key's name.
Run at this head:
- go test ./internal/redact ./internal/pii ./internal/settings
./internal/masking ./internal/otlp ./internal/sessions ./internal/gui
-count=1: ok
- go test ./internal/gateway -run 'CJK|Mask|Redact|Privacy|PII|Secret': ok
- gofmt -l, go vet, GOOS=windows go vet, GOOS=linux go vet -tags nogui
./internal/redact: clean
- Broken by hand: with origin/main's redact.go, TestBareJSONNumberNotMasked
fails 7 cases (the reporter's line, {"n": 13800138000}, a spread-out
object, two arrays, the card and the ID number). The 10- and 13-digit
epochs were not masked before either; they are in the test to stay so.
Not tried: the GUI before/after view in a running magpie, and the full suite.
|
||
|
|
0152f66966 |
provider: a Remote magpie's model list follows the other magpie's, fetched every 10m (6igsteven on Discord)
6igsteven (Discord, 10-24/10-25): GLM-5.3-Trial and GLM-5.3-Flash-Trial are listed on the magpie that runs the ZCode plugin, and not on the magpie that uses it as a Remote magpie. The trial entries come from the ZCode plugin once it reads the account's gift (zcode 0.1.26), and the other magpie's /v1/models lists them as it lists every catalog entry. But a Remote magpie is a provider of keys: its list was fetched when it was added and then only when Fetch models was pressed in its editor (KeepListsFresh asks only providers with a RefreshEvery, FetchNew only accounts). So anything listed there later (the trial models, a new provider, plugin or routing group) never reached this magpie. A Remote magpie with no RefreshEvery now has a 10m schedule (RemoteMagpieEvery, RefreshSchedule), so KeepListsFresh refetches it through the same Refetch as Fetch models. `magpie provider refresh-every <id> off` on a Remote magpie is kept as "off" rather than "" so the user's off isn't read as unset. CLI show/refresh-every print the schedule in force. Other providers are unchanged: no schedule means only when asked. Run: TestRemoteMagpieListFollowsTheOtherMagpie (new) with TestKeepListsFreshFetchesWhatIsDue, TestParseRefreshEvery, TestSaveKeepsTheListsScheduleAndRules: ok, sandbox HOME, Go caches pinned. Broken by hand: RefreshSchedule returning RefreshEvery alone (the old behaviour) fails the new test with "asked [], want [office]"; restored, ok. gofmt -l clean. Then, at this commit: go test ./internal/provider ./internal/cli ok (140s, 58s); go vet ./... on darwin, GOOS=linux -tags nogui and GOOS=windows ok; darwin, linux (nogui) and windows builds ok. Not run: go test ./... - the machine's disk had under 1GB free (other sessions' work) and load ~200, so a full suite would not fit. Not tried: a real two-computer setup with a live ZCode gift. A Remote magpie whose user curated its picks (left a listed model unpicked) still doesn't take new models by itself (withNewlyListed, by design). |
||
|
|
c490165b14 |
gui: a menu of actions keeps no empty tick column, so its items line up with its heading
Sessions' "Continue in" menu (a screenshot from the owner) drew each
agent's logo and name about 21px right of its heading. The menu is a
list of actions with nothing ticked, but the shared menu reserved its
14px tick column anyway. The same happens in Usage's "Count this
client's calls as", Library's "Copy config…" and Routing's "Add a
condition".
app.css now hides .pm-tick in a menu with no ticked item and no
checkbox item. A choice menu (something ticked) and a multi-pick menu
(menuitemcheckbox, where a tick can appear later) keep the column. The
rule is CSS only: an app.js version put the core 209 bytes over its
budget, which is not raised for this.
Run at
|