8576e3cc3370ce761ffade4e07b3c142d75c4dd2
2323
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8576e3cc33 | gui tests: routing-sessions leaves the held live trace for a reload to cancel; letting it go just before the reload had the page ask again while going away, which WebKit turned away "due to access control checks" as a page error (#1307) | ||
|
|
023f5aaad2 |
provider: a background reading of an account writes its quota history too (#1318)
* provider: a background reading of an account writes its quota history too
GET /v1/magpie/quotas/history was written only by the Usage page's
reads, so a magpie only ever serving other magpies - nobody opens its
Usage page - kept an empty history while its routing read each account
every few minutes.
When a login's fresh reading is kept, it is now noted in the history as
a page reading is, named for its account (a login's reading itself
carries no user); a read that failed is skipped, not told again. The
test is the reporter's story: a background LoginUsage, then the
history, no Usage page involved; it fails on main. Keys' background
readings (KeyAllowance) are not noted here - the page names a key's
history line by its key name, which routing's reading does not have.
Invited by yetone on #1317 after
|
||
|
|
84c3eb0362 |
provider: moved Cursor users get plugin 0.2.1: an id 0.1.x listed, at an effort only its other branch has, goes as that branch's nearest effort, not as the default's id with parameters that contradict it (magpie-community/plugins#54, geoqiao)
On 0.2.0, cursor/claude-opus-5 at xhigh went as claude-opus-5-thinking-high with thinking=false, effort=xhigh, because Opus 5 without thinking stops at high. 0.2.1 sends claude-opus-5-high with effort=high, as 0.1.11 did. The cursor mover's min goes from 0.2.0 to 0.2.1, so keepMovedCurrent updates every moved Cursor user. 0.2.1 on npm (registry.npmjs.org) has an index.mjs byte-identical to plugins main cf0de01e. The plugin PR was reviewed at ea00bd9 and merged: - bun test in packages/cursor: 49 pass, 0 fail - whole repo: 987 pass, 0 fail - bun scripts/check.mjs passes for all 15 packages - the new test fails on 0.2.0's index.mjs - not tried with a real Cursor account on the review side (the stored token answers 401) The case where the default's own branch stops short is still open: magpie-community/plugins#55. go test -tags nogui ./internal/provider passes (temp HOME, pinned caches). go vet -tags nogui ./internal/provider passes for darwin, linux and windows. gofmt -l is clean. |
||
|
|
b91569d311 | readme: feedback goes to Discord, and the repository takes no pull requests (only collaborators can open one) | ||
|
|
55209c5529 |
plugin tests: TestHostStreamCreditBoundsTheQueue waits for the given-up call to leave the host, which it does once its abort's write is known, after the child may already have read it (red on ubuntu CI at 2b5f19fc; a 50ms pause before the write is known fails the old check every time)
Co-Authored-By: Claude <noreply@anthropic.com> |
||
|
|
ed31293c0e |
usage, gui: a reply its vendor let go in a burst over a couple of hundred milliseconds tells no speed, not 2,237 tok/s (John on Discord)
John's Kimi Code rows after v0.1.1119 (OpenCode, group/k3-glm, api.kimi.ai,
Chat, k3-256k): 550 tokens, 22 of them reasoning, in 16 s with the first
content at 5.2 s read 2,237 tok/s, and 395 tokens in 19 s 2,012. 528 answer
tokens at 2,237 tok/s is 236 ms: the burst the vendor let go at the end.
|
||
|
|
3d34c2d747 |
routing: live, the next request is patched into the context window that is there, so its cells don't come in again and the card no longer goes and comes back, moving the request list under it (Zhenzhen on Discord)
Each new request in a session emptied the card while the gateway read its prompt (the box collapsed to 0, everything under it jumped up), then drew a new card whose 400 cells scaled in again, then a third card when it was done; a request under way had no Prompt cache stat, so the grid moved again when it came. Now ctxCard returns a card with ctxUpdate: the grid's cells are made once and only their classes change, the head, stats, legend, contents rows and foot are morphed in place, and an under-way request keeps the cache stat's place with "—". Routing patches the live card, keeps it in place while a live request has no prompt yet, and still draws a request the reader picks afresh. Verified: routing-live-patch.test.cjs (new) feeds two requests in three steps each, at 420 and 1100 wide, in Chromium and WebKit: the old rows, card, grid, cells, legend and contents rows stay the same nodes, the grid and card keep their height on every ResizeObserver frame, the view never scrolls. Without the change it fails: the card reads '' while the request is under way, the card/grid are new nodes, the box goes 884 -> 0 -> 789 -> 884. routing-*, context-*, click-scroll, panel-routing, old-webkit, gui-ja/de/zh-tw, usage* pass in both engines; go test ./internal/gui and GOOS=linux/windows go vet pass. |
||
|
|
ae24bcfcfb |
agent, gui: Codex's row on the Agents page shows its desktop app's version beside its CLI's ("CLI 0.130.0", "App 26.930.31730"), and the app's alone where no CLI is on PATH (#1334, laacmilan)
The app's version is read from /Applications or ~/Applications
ChatGPT.app (or Codex.app) Contents/Info.plist, taken only when its bundle
id is com.openai.codex, so the ChatGPT chat app (com.openai.chat) isn't
taken for it. macOS only: the Windows Store package isn't read yet. The
app chip's tooltip says it reads the same settings as the CLI, so
connecting Codex connects both. At narrow widths the chip ellipsizes, and
below 250px it gives way so the name keeps its room.
Verified: TestCodexAppVersion fails without the CLI() change ("the app
alone, no CLI"); agent-app-version.test.cjs fails 12/16 without the app.js
change and passes 16/16 with it, Chromium and WebKit, en/zh/ja/de, at 980,
560 and 440px. agent-cli-missing, agent-connect, agent-field-names,
agent-layout, agent-update-all, cli-update, click-scroll, gui-ja, gui-de,
i18n-keys pass in both engines. internal/agent passes in Linux Docker
(non-root); full ./... on macOS; vet darwin/linux/windows. Read
26.930.51102 from the real /Applications/ChatGPT.app on this Mac. Not
tried on the reporter's machine.
|
||
|
|
2b5f19fc73 |
gateway: a request whose tool results another request already answered (Claude Code's fork sub-agents and their lead, a turn sent again) gets a Claude Code run of its own instead of a 409 "the agent's turn is already being resumed" (ylorn on Discord)
A Claude Code fork sub-agent's first request is its lead's conversation
with a result for each of the lead's in-flight calls ("Fork started —
processing in background") and its directive after. The lead's own resume
and every fork it started therefore match the same run at once; the first
to claim it won and the rest got a terminal 409 that Claude Code does not
retry, so the forks died. The 409 dates from
|
||
|
|
325b2a67fb |
gui: Settings says the GitHub token also installs skills from private repositories it can read, and needs no scopes for public ones (37FlowAI on X)
Co-Authored-By: Claude <noreply@anthropic.com> |
||
|
|
3bf88948b5 |
library: a skill in a private GitHub repository installs with the GitHub token set in Settings → Network and sharing (or GITHUB_TOKEN/GH_TOKEN), asked of GitHub's API, which alone gets the token; without one the error says where it is set (37FlowAI on X)
Co-Authored-By: Claude <noreply@anthropic.com> |
||
|
|
172f45a5e6 |
agent: dsh's check stays quiet when its key store holds a caller key of this gateway's (#1332) (#1339)
The drift check asked only whether refs.MAGPIE_GATEWAY_KEY equals the key magpie writes into .env, so a caller key the gateway itself issued — which dsh's store prefers and the gateway authenticates — was named as "another MAGPIE_GATEWAY_KEY" and the user was told to remove it there, while delete → disconnect → re-apply wrote the very same state back. The check now asks the gateway's own Authenticate first: a key it takes means dsh is going through magpie, and only a key it would refuse (a foreign one, a switched-off one) is drift. The .env side needs nothing: the serving round rewrites .env to magpie's key, so a stray value there heals itself. TestDshStoreHoldingAGatewayCallerKey (a key from access.Update add-key in the store's refs) failed without the change with the "holds another MAGPIE_GATEWAY_KEY" drift; with it the check is quiet, and a key the gateway doesn't take still reports. Verified: go test -tags nogui ./internal/agent -count=1; the three dsh store tests under -race -count=10; gofmt -l clean; go vet -tags nogui ./internal/agent; go build and GOOS=linux/GOOS=windows go build -tags nogui. Generated-by: GLM-5.3-Flash (ZCode) |
||
|
|
8df15fd437 |
sessions: the page's limit counts nonempty sessions only (#1324)
List sorted the session keys by file mtime and truncated them to the limit before assemble dropped empty sessions, so a newest empty file ate the page: List(1) answered no session at all though List(0) found two, and on an mtime tie an empty one could win the key tie-break. The limit now falls on the assembled sessions: keys are walked newest first and a nonempty one takes an empty one's place until limit are collected; the most-recently-active-first order is kept. Reproducer by @Ethereal49 in #1320, red before (limit=1 returned 0 nonempty sessions, want 1) and green after; the TestList flake they saw under -race -count=20 does not repeat with it. Fixes #1320. Signed-off-by: Charan Rathore <180254320+charan-rathore@users.noreply.github.com> |
||
|
|
920aab3326 |
provider: the Claude sign-in without Claude Code says it needs the claude command line, not the Claude desktop app, which a reporter had installed and took for it (xlz on Discord)
Ran: go test -tags nogui ./internal/provider -run 'Claude|SignIn' (Docker, linux). |
||
|
|
238f0d927b |
gateway tests: the fake Cursor servers close their connection after a reply, so their log has no "http: panic serving …: invalid concurrent Body.Read call" (CI Test run 37791950740 at 8db24fd6, macOS, and green runs since 85fd35ab)
The five fakes answer a Run in full duplex (EnableFullDuplex) and return
while magpie's request body is still open, as Cursor does. Go's server
then reads the rest of that body in finishRequest's Close, after it has
stopped the connection's background read; the read's EOF starts another
background read, and the kept-alive connection's next request reads
beside it and panics. net/http recovers it and the tests pass, so it
was only noise in the log, beside the run's real failure
(TestBurstTellsNoSpeed, fixed in
|
||
|
|
24bef0f9be |
gateway: a streamed request waiting for its key's slot (Concurrency) or for room in its minute (Requests per minute) has its agent sent the stream's 200 and SSE keepalives after 15s, as a held try's stream is, instead of nothing until it is sent (coeo91 on Discord: WorkBuddy, Trae and Qoder said it timed out)
serve's try took its lane slot and waited for the minute ( |
||
|
|
5e17a1835f |
gateway tests: the burst tests' burst is 5,000 tokens, so the time magpie takes to pass it on reads faster than any stream (TestBurstTellsNoSpeed red on macOS CI at 8db24fd6: 1000 tokens in 138 ms read 7246 tok/s)
A burst tells no speed when its window is under MinDecodeMs or its speed
over MaxDecodeSpeed. de5455b8's burst was 1,000 tokens: on a busy macOS
runner magpie took 138 ms to relay it, which is over 100 ms and under
10,000 tok/s, so it read a speed. A real burst of a few thousand tokens
reads over the cap; at 5,000 the relay would need over 500 ms to read a
speed. TestCodexBackendBurstTellsNoSpeed had the same 1,000; both change.
Red before: with the fake upstream taking 150 ms over the burst (two
writes), all three burst cases fail with CI's message ("1000 tokens in
192 ms … read 5208 tok/s"); with 5,000 they pass 3 of 3 with the same
delay. Still guards
|
||
|
|
cdf325f178 |
plugins: a package that is only a command (an MCP server like magpie-x-search) isn't listed under Unreviewed, isn't added as a plugin, and one added before says what it is instead of a host stack (#1327, congee949)
A repository tagged magpie-plugin whose npm copy (from that repository) names no file to load (no main, no exports) was listed and installed from npm without the entry check the GitHub route has; it then failed every host start with "has no entry" and a stack. Now: - the Unreviewed list checks npm's copy the same way: one that names no file needs the index.js the repository's own route needs (askTagged); - `magpie plugin add` / the Plugins page refuse a package that names no file, has no index file and is neither pi's nor a middleware, take the package just installed for it out again, and say it isn't an OpenCode or magpie plugin, and, for one with a bin, to add an MCP server under Library → MCP servers (notPlugin); - the host says the same, without a stack, for one already on the list. Run: TestCommandOnlyPackageIsNoPlugin (magpie-x-search 1.2.0's real package.json) fails without the change (Add = <nil>; with only host.js reverted, the stack message), TestTaggedRepos with the real GitHub package.json and npm latest of cyberElar/magpie-x-search fails without it (listed), both pass with it; TestNotPluginKeepsPlugins (index.mjs, main, exports, middleware, pi, a file stay plugins). go test -tags nogui ./internal/plugin under a temp HOME ok; go vet -tags nogui for darwin, linux, windows. The built binary in a sandbox HOME: `magpie plugin add magpie-x-search@latest` from real npm prints the new error, and plugins/package.json no longer lists it. Co-Authored-By: Claude <noreply@anthropic.com> |
||
|
|
0feffaa7f9 |
agent: TestFolderVarsAreListed knows MAGPIE_PARTNERS is magpie's own partner-list source, not an agent's folder (red on main since 10578ce6)
Run: go test -tags nogui ./internal/agent under a temp HOME: FAIL before
("MAGPIE_PARTNERS, read by ../provider/partners.go, is not in
agentenv.Vars"), ok after.
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|
|
d9caa3dd13 |
library: Hermes Agent in a WSL distro takes skills and MCP servers there, and so does every other WSL agent that keeps them in its own folder (omp, OpenCode, MiMo Code, Droid, Grok Build, Command Code, AtomCode, Qoder, MiniMax Code, fx, dsh) (#1323, Kevinzz224)
wslTargetOf knew only Claude Code, Codex, Pi and OmO, so hermes@wsl:Ubuntu
was never a Library target and a skill meant for it could only go to
Windows' ~/.hermes. An agent whose places are all its own folder (a.Dir,
or beside a.Path) now gets the target targetOf makes on this machine, at
the distro's home the agent was found with: copies for skills, its MCP
file marked as WSL's (a Windows program is refused, magpie's own image
server goes by its WSL path), and the skills it reads besides its own are
the same distro's agents'. Agents whose places depend on this machine's
variables or home (Kimi Code, Crush, Cline, CodeBuddy, Goose) stay out.
Run: TestWSLOwnFolderTargets fails without the change (hermes@wsl,
omp@wsl, droid@wsl, opencode@wsl aren't targets; no copy of the skill),
passes with it. go test -tags nogui ./internal/library ./internal/agent
under a temp HOME on macOS (library ok; agent's TestFolderVarsAreListed is
red on main since
|
||
|
|
9a4b25aa60 |
gui: Usage's request sources round their end cells as their bar does, so a hovered, focused or filtered-by first or last source no longer lays a square corner over the bar's rounded one, in a row or stacked (yetone)
Run: usage-ledger-chart (Chromium + WebKit; new corner checks fail on the old CSS, pass now; hover screenshots wide and 560px, dark), usage-ledger, usage-ledger-fit, -detail, -content, ledger-hscroll, ledger-protocol, mobile-web, number-units: all pass in both engines. |
||
|
|
10578ce683 |
providers: the add sheet lists Partners first, above Subscriptions, under a heading that says they sponsor magpie; who they are comes from usemagpie.ai/api/partners (site/partners.js), so a paid listing changes with a deploy, not a release (yetone)
The app fetches the list behind the call every 6 hours (10 minutes after a failure), never waiting, and keeps it in the cache folder. Each entry is checked: its own id, never a built-in preset's; a name and an endpoint; https only; at most 12; no decision API, no-key or user endpoint. Its logo goes through FetchIcon. A partner is a preset to the rest of magpie, and one that has left still is to the providers added from it, unsponsored. The window lists a partner in the languages it names only, with its tagline in the page's language; `magpie presets` and the TUI list them first too. MAGPIE_PARTNERS moves the list, off lists none. Run: go test -tags nogui -race ./internal/provider ./internal/gui ./internal/tui . (ok); TestPartners* -race -count=3; node --test internal/gui/tests/partners.test.cjs add-sheet gui-ja gui-de i18n-keys in Chromium and WebKit (en/zh/ja/de, 900 and 440px); node --test site/worker.test.mjs site/install.test.mjs; the built binary in a sandbox HOME against a local feed: listed, an http entry left out, listed from the cache with the site down, `provider add` from it. |
||
|
|
5ba0601fda |
gateway: Codex's Ultrafast goes first to a ChatGPT account whose own model list offers it, and one whose plan doesn't is asked for Fast instead of being sent a tier it may refuse (yxinyu715 on X)
Co-Authored-By: Claude <noreply@anthropic.com> |
||
|
|
8db24fd62f |
gui: Routing folds three or more of a provider's keys for one model into one row that shows the count and their state, and opens in place to each key (#1319, tkhs101)
53 agnes-3.0-flash keys were 53 near-identical stage rows and 53 rows under Accounts and keys. Now three or more keys of one provider standing together for one model (same fixed effort, fallback and group-in-group heading) fold into one stage row: "Agnes 53 keys agnes-3.0-flash", then the lit key and what it does, "51 available · 2 resting". A request on a folded key flies to the fold; a key failing and the next answering show there (its 429 tag too). A click, Enter or Space opens it in place: each key keeps its own row, state and wire, drawn from the fold. Accounts and keys folds the provider's keys into one row with their summed tally and models, and opens the same way. Open folds are kept per reader in localStorage magpie.routingKeysOpen. Two keys stay two rows; one key is as before. Display only: the gateway's order and choice don't change. New strings in zh, zh-TW, ja and de. docs/subsystems/gui-shell.md says how. routing-account-order's relay has three keys, so it now opens their fold to read their order. Run: routing-keys-fold.test.cjs (32: folded, open/persist/Enter, live updates folded and open, Accounts and keys, 440px; Chromium and WebKit; en, zh, ja, de) — fails on main (no fold). All routing-*.test.cjs, panel-routing, click-scroll, fold-show-grip, gui-ja, gui-de, gui-zh-tw, i18n-keys: 409 pass. Every other test that opens Routing (29 files, 152 tests) passes but purpose-filter's WebKit "returning focus does not scroll the page", which fails the same alone on origin/main (off by 1px). go vet -tags nogui ./internal/gui (darwin, GOOS=linux, GOOS=windows). |
||
|
|
dfd881231e |
usage: a DeepSeek balance in CNY and USD at once reads in one order every read ("$11.12 · ¥-0.05", the currency with money left first), and its trend is that currency's own line in its own sign, not ¥-0.05 and $11.12 joined into one alternating line (gakki on Discord)
DeepSeek's /user/balance lists balance_infos in an order that changes from
read to read. readDeepSeek wrote them as they came, and the balance history
kept the first number of the string, so the chart alternated between the two
currencies. readDeepSeek now sorts them (money left first, then by code). The
history keeps each currency of such a balance under a key of its own
(balanceCurrencies), the card's trend is the first one's with
BalanceTrend.currency set, and the card's old line (which can't be split
again) is dropped on the first such read. app.js says the curve's legend,
readings and pace in that sign alone ("$11.12", not "$11.12 · ¥-0.05" after
every amount). The usage alert reads the first amount too, so it no longer
flips between the two currencies either.
Red before: TestBalanceHistoryTwoCurrencies (reporter's shape: CNY -0.05 and
USD 11.12, order swapped each read) fails with 'card says "¥-0.05 · $11.12",
want "$11.12 · ¥-0.05"' on the old readDeepSeek, and with the old history
alone the trend holds 11.2, -0.05, 11.15, …; TestBalanceReaders' two new
cases fail the same way. balance-currencies.test.cjs fails on the old app.js
with 'Balance$11.12 · ¥-0.05' and 'about $0.44 · ¥-0.05 a day'.
Run (Docker golang:1.26, temp HOME): go test -tags nogui ./... (only
internal/agent's TestAside* write-failure tests fail, as root in the
container; they pass as uid 501), go vet ./internal/provider ./internal/gui,
GOOS=linux/windows/darwin go vet ./internal/provider, gofmt -l. GUI:
balance-currencies, balance-curve, balance-parts, balance-fix in Chromium
and WebKit (110 pass; en/zh, light/dark, 900 and 440px). No new t() strings.
Not tried with a real DeepSeek account holding both currencies.
|
||
|
|
0d8f85e47b |
gui: Providers, Library and Plugins no longer scroll 12-16px sideways in macOS 15 with scroll bars shown (#1236, pineog)
Library's and Plugins' sticky tab strip (.lib-head) and Providers' sticky Add bar (#view-providers .after-list) reached over the view's side padding by a negative margin (-12px, -16px in the window, the view's padding in the narrow browser page), so their boxes ran 12-16px past the view's content end edge. macOS 15's WebKit (Safari 18) takes a flex scroller's scrollable width as the furthest in-flow child's right edge plus max(0, margin-end), then adds the padding-end (RenderBlock::computeOverflow's includePaddingEnd, before WebKit 290159@main / bug 218579, which shipped in macOS 26): the negative margin is left out, the page is 12px (Providers) or 16px (Library, Plugins) wider than the view, and with classic scrollbars a draggable horizontal bar shows. That is the reporter's three pages and only those, at every text size and width. Chromium and macOS 26's WebKit count the margin, so neither scrolls. The strips' boxes now keep to the content box; a ::before paints the frosted strip / the fade over the padding (--bleed-l/-r), the hairline moves to it, and the pre-color-mix fallback too. Looks the same (before/after screenshots, light, window and browser page). New internal/gui/tests/view-no-sideways.test.cjs visits every page, en/zh/ ja/de, the window (body.mac) at 560 (windowMinW) and 1000px and the browser page at 360/440/1000px, Chromium with its scrollbars shown and WebKit, and checks both macOS 15 WebKit's sum, worked out from the layout, and the engine's own scrollWidth. Red before: 40 of 40 cases in each engine, on providers (12px, div.after-list), library and plugins (12/16px, div.lib-head) and no other page. Green after, 42/42. Also run, BROWSER=chromium and BROWSER=webkit (712 of 714 pass; the 2 are library-servers-bulk in Chromium, the same 2px flake on the old assets, #1322): click-scroll, gui-ja, gui-de, add-button, deprecated-subscriptions, plugin-market, provider-discovery, every library-*, plugin-* and provider(s)-* test. GOOS=linux and GOOS=windows go vet -tags nogui ./internal/gui pass. Not tried in a real macOS 15 WKWebView: this Mac runs macOS 26, whose WebKit has the fix; the rule was read from WebKit's source at 2025-01. |
||
|
|
3856a9a6d8 |
provider: moved Cursor users get plugin 0.2.0: the list is Cursor's model picker, a model once per context size with that window (claude-opus-5-5@300k, @1m), effort and fast sent as the variant's parameters, and an id 0.1.x listed still runs as the variant it stood for (magpie-community/plugins#51, geoqiao)
The cursor mover's min goes from 0.1.11 to 0.2.0, so keepMovedCurrent updates every moved Cursor user. The ids picks were saved under before (claude-opus-5-5, claude-opus-5-5-fast, cursor-grok-4.6, a variant's own slug) keep working. magpie still sends an id the plugin no longer lists to the plugin unchanged: provider.Resolve accepts any cursor/<model> while the provider is on, and pluginFetch builds a stub model. The plugin's named() then resolves the id to its variant. 0.2.0 on npm was checked against registry.npmjs.org: its index.mjs is byte-identical to plugins main 8cd5a0f. The plugin PR was reviewed at c64bc3d and merged onto main: - bun test in packages/cursor: 48 pass, 0 fail - bun scripts/check.mjs cursor passes - seven deliberate breaks, each caught - not tried with a real Cursor account on the review side go test -tags nogui ./internal/provider passes in Docker (golang:1.26.8, temp HOME, module cache read-only). go vet -tags nogui ./internal/provider passes for linux, windows and darwin. gofmt -l is clean. |
||
|
|
ddb6f806ac |
gui: the sessions warm-up hands its garbage back to the system when it ends, so a magpie just started doesn't read ~470 MB at rest for its first two minutes (H20 on Discord)
The warm-up reads every session file for the Sessions page and Usage › Requests. On a 13.5k-session history it allocates ~830 MB (QueryPage ~570, StatsFor ~260) to keep ~80 MB of indexes, and Go's scavenger returns the freed pages only over the next minutes. warmUp now calls debug.FreeOSMemory once its reads are done: one forced GC and scavenge, once, at start. RSS of a linux nogui `magpie web` in Docker on a copy of a real config with those sessions mounted read-only, sampled every 15 s from start (with the dsh round change before it): 15 s 472 -> 197 MB, 30 s 475 -> 285, 60 s 417 -> 281, 2 min 337 -> 281, 3.5 min 266 -> 218, 12 min ~250 -> ~204. TestWarmUpReturnsItsGarbage fails without the FreeOSMemory call (10 of 10: 46-334 MB of freed heap still held, or the heap not yet collected) and passes 10 of 10 with it. go test -tags nogui ./internal/gui ./internal/sessions (Docker golang:1.26.8, temp HOME), go vet -tags nogui ./internal/gui for linux, windows and darwin, and gofmt -l pass. Not measured on macOS: a fresh build there hangs at exec behind syspolicyd today. |
||
|
|
1d1c9e07d2 |
agent: without dsh, the dsh round every 30 s doesn't build magpie's whole catalog for no patch list (H20 on Discord: magpie idles near 500 MB)
dshWiredOnce built magpieModels("dsh") before looking for a profile, so every magpie, dsh or not, built the catalog every 30 s and threw it away: 93% of what a magpie at rest allocated (pprof heap?gc=1 delta over 120 s, a linux nogui `magpie web` in Docker on a copy of a real config with 13.5k Codex and Claude Code sessions mounted read-only). That garbage kept the heap at its GC goal, about twice what it keeps. It now returns before the catalog when there is no profile; with one, nothing changes.
Same measurement, this commit and the warm-up one together: idle allocation 73 MB per 2 min -> 6.8 MB (3.8 MB of it the profile read itself); RSS at rest after the first minutes ~250 MB -> ~203 MB, the heap no longer climbing 125 -> 192 MB between GCs. TestDshRoundWithoutDshBuildsNoCatalog fails without the change (475 allocations a round) and passes with it. go test -tags nogui ./internal/agent (Docker golang:1.26.8, non-root, temp HOME), go vet -tags nogui ./internal/agent for linux, windows and darwin, and gofmt -l pass. Not measured on macOS: a fresh build there hangs at exec behind syspolicyd today.
|
||
|
|
8d6e9bad49 |
gateway tests: the burst tests allow the moment a first word takes to reach magpie (TestCodexBackendBurstTellsNoSpeed red on macOS CI at 58f45d05: Millis 612, TTFT 13)
de5455b8's tests asserted that the time from the first word to the end was at least the upstream's 600 ms wait. The fake upstream starts that wait once it has sent the first word, and magpie stamps TTFT when the word arrives, so the span is the gap less the delivery time: 599 ms on a busy macOS runner. TestBurstTellsNoSpeed had the same `span < gap` check; both now want 90% of the gap. The speed assertions they guard (a burst tells no speed, a steady stream keeps it) are unchanged. Run in docker golang:1.26.8 as uid 1000: go vet -tags nogui ./internal/gateway; go test -race -count=15 -cpu 1,4 -run 'TestCodexBackendBurstTellsNoSpeed|TestBurstTellsNoSpeed' pass. Not reproduced locally with an injected delay; the CI log above is the red. |
||
|
|
4ed6df801c |
provider: moved Factory users get plugin 0.1.21, whose pi compaction summary no longer opens with the sentence Factory refuses (#1316, Eriice)
After pi compacted a session, every turn on factory/claude-opus-5-5 was 403 "Factory: Forbidden". The reporter's replays found the refused part: pi's fixed opening of its summary message, "The conversation history before this point was compacted into the following summary:" (COMPACTION_SUMMARY_PREFIX in pi-coding-agent dist/core/messages.js), whole. Plugin 0.1.21 (magpie-community/plugins f4c0d96, on npm) rewords that sentence, and pi's branch summary opening, when a user text is pi's whole summary, on Messages, chat completions and Responses; the mover's min is raised so keepMovedCurrent updates moved users. The built-in, which has none of the plugin's pi or Claude Code adaptations (#952, #1132), is unchanged. Plugin: its new pi.test.mjs tests fail on 0.1.20 and pass on 0.1.21; bun test (114 pass) and check.mjs factory pass; the npm tarball's index.mjs is the committed one. Here: go test -tags nogui -count=1 ./internal/provider/ in Docker (golang:1.26.8; on the Mac new test binaries hung in dyld while syspolicyd was at 100%), go vet -tags nogui for darwin, linux and windows, gofmt -l pass. Not tried against Factory itself (no Factory account here). |
||
|
|
8514750426 |
gui: focusing the window no longer blanks the Usage chart: the window coming back (focus, visibilitychange) reads the Usage tab shown as its timer does, drawn again only on a change and with no skeleton between; the tray panel's Usage tab isn't dimmed or redrawn by its 10 s timer or a focus when nothing changed; Routing's groups aren't redrawn on focus when the same (Zhenzhen on Discord: omarchy/Hyprland, focus follows mouse, the bar chart flashed each time the pointer crossed into magpie)
Cause: window focus and visibilitychange called load(), which on the Usage
page called loadUsage(): renderUsageLoading() hid #chart, put the KPI
skeletons up, and renderUsage() drew every bar again. Under focus-follows-
mouse every pointer crossing is a focus. load(true) now goes through
refreshUsage() when the tab's figures are drawn (usageDrawn), and loadUsage()
as before on a first draw or when the language changed.
Test: internal/gui/tests/usage-focus-steady.test.cjs fires focus and
visibilitychange and watches the Overview bars, the Requests columns, the
tray panel's columns and Routing's group card. With the old app.js it fails
in all 4 runs ("nothing changed: the chart isn't blanked": skeleton, chart
hidden); with only the panel change reverted ("dimmed", "bars removed");
with only the Requests path reverted ("bars removed"); with the old
routing.js ("the same group card stays": 0 vs 1). Passes in Chromium and
WebKit, en and zh. 998/998 pass across the usage*, panel*, tray*,
sessions*, context*, group*, routing* and focus/visibility-firing GUI
tests in both engines. No strings or Go changed (no gui-ja/gui-de, go vet
needed). Not tried on real Hyprland.
|
||
|
|
de3b1c646a |
usage: a subscription card's window says what the whole window holds, "Whole ≈ N tokens · ≈ $X", reckoned from what magpie routed through the account since the window began over the share used, at API list prices (Chiao on Discord)
usage.WithWindowHolds fills QuotaWindow.Holds on GET /api/usage/quotas and its refresh, from usage.jsonl: the card's provider (by its id now, so a moved plugin's card and a renamed provider count), its account (ProviderAccount, or an older record's Host), calls to the models the window counts (Claude's Opus-only or Fable week), not turned away, from the window's start up to when the share was read. Priced by catalog.Price.CostSplit at the maker's list price, else the provider's own list, never the user's own subscription price: Anthropic's 5-minute and 1-hour cache writes at 1.25x and 2x input, OpenAI's cached input and no cache write price. A call with no API price leaves the window tokens-only. The caller's cards are not written to. Not told where it wouldn't be honest: under 5% used, nothing routed in the window, magpie's log starting after the window did, no reset or no span (credits with no reset, Copilot's premium requests), Antigravity's per-model family and pool windows, Aside windows, a card with an error, a balance, or one read from another computer. The tooltip says how it was reckoned and that use of the account outside magpie makes it read low (the request said 偏高; such use raises the share without adding to what magpie saw, so the estimate is lower than the truth). en, zh, zh-TW, ja, de. Run: go test -tags nogui ./... in Docker (golang:1.26.8): all pass but internal/agent's Aside* chmod tests, which fail only as root and pass with --user 1000. The new tests fail with the log-start check removed, the model scope removed, the caller's windows not cloned, and 1-hour cache writes at the 5-minute price. Against a read-only copy of the owner's usage.jsonl, quotas.json and models.json: Claude's week (71%) ≈ 46K tokens / $14.16 from 165 calls, its Fable week and 5 hours (12%) nothing, every other card nothing (under 5%, or no reset). New quota-holds.test.cjs passes in Chromium and WebKit at 360, 440 and 1000px in en, zh (万), zh-TW (萬), ja, de, and fails with the new CSS removed; click-scroll, gui-ja, gui-de, i18n-keys, quota-* and usage-* pass (304/304). go vet -tags nogui (darwin, GOOS=linux, GOOS=windows) and gofmt -l on the touched packages pass. |
||
|
|
137ebee82f |
provider: a remote magpie's cards carry what was read behind the requests — the account switching's, the Codex warm-up's and routing's readings of each account (LoginUsage), routing's of each key (KeyAllowance) — and after a restart the readings kept in quotas.json, not only what the Usage page last read (#1313, jorben)
A magpie serving only other magpies (`magpie serve` in a container) has nobody on its Usage page, so GET /v1/magpie/quotas/cards, answered by CachedCards from the page's caches (subscriptionUsageCache, planQuotaCache, keyBalanceCache), said "nothing read on that magpie yet" while its Codex account's usage was read every few minutes behind the requests: those readings land in loginUsageCache (and a key's in keyAllowances), which CachedCards never looked at; after a restart even a page-read card was gone until the page was opened, though quotas.json held it.
CachedCards still asks nobody. It now lays each account's latest LoginUsage reading over its card when it is newer by readSeq (perLogin's cards are that same reading, so the page's own later read stands), adds a card for an account read that way and never on the page, named and drawn as the page names it (accountCard: perLogin now takes that face), and falls back to the reading kept on disk, dated (AsOf). Keys the same way: routing's KeyAllowance reading now keeps what was read with the windows (plan, balance, parts, readSeq) and is laid over the key's plan or balance card, or makes one; with no card read since start, the plan and balance cards kept in quotas.json are told. Cursor (known by asking its CLI), Grok (read by home) and a Kiro key keep the page's cards only. The local Usage page is unchanged.
Not fixed here: the quota history (/v1/magpie/quotas/history) is still written only by the page's reads.
Red before: with CachedCards as on origin/main and everything else in place, TestRemoteMagpieShowsBackgroundReadings (gateway, through lanGuard(New().Handler()) and a remote-magpie provider: CodexUsedUp, then RemoteCards) fails with the reporter's card ("nothing read on that magpie yet; refresh to have it read"), and TestCachedCardsTellBackgroundReadings, TestCachedCardsKeepALaterPageRead and TestCachedCardsTellKeyReadings fail; all pass with it. ForgetKeptCardsForTest is called from the gateway's fresh() so TestRemoteMagpieQuotas's "nothing read" holds under -count.
Run (Docker golang:1.26.8, the Mac's syspolicyd pegged): go test -tags nogui ./internal/... (internal/agent as uid 1000), go test -race ./internal/provider ./internal/gateway, go test -count=2 -run TestRemoteMagpie ./internal/gateway; go vet -tags nogui for darwin, linux and windows on internal/provider and internal/gateway; gofmt -l. No app.js change.
|
||
|
|
58f45d0530 | provider: Qoder's mover asks for opencode-qoder-auth 0.2.10, whose international check-in finds the device identity runtime where Qoder CLI caches it on macOS and Linux (~/.qoder/.bin/runtime-info-<platform>-<arch>-<hash>, a file, not the umid-* folder 0.2.9 looked for, which the CLI makes only on Windows) and where the Linux desktop installs it (/opt/Qoder/resources/umid), so those users aren't 502 "device identity runtime not found" while Qoder CN checks in (ARNO on Discord). magpie-community/plugins 5e80f39; npm view shows 0.2.10 latest. go test -tags nogui ./internal/provider (Docker golang:1.26.8, temp HOME) and go vet -tags nogui ./internal/provider for linux, windows and darwin pass. | ||
|
|
ae39bc8ec8 |
agents: Qwen Code (qwen) as a managed agent (#1311)
* agents: Qwen Code (qwen) as a managed agent (#1279) Qwen Code (QwenLM/qwen-code, a Gemini CLI fork) keeps custom model providers in ~/.qwen/settings.json modelProviders.<protocol> entries ({baseUrl, envKey, id, name}, envKey naming a variable in the same file's env object) and its session model in settings.model {name, baseUrl}. magpie writes one modelProviders.openai entry per catalog model — wire id the gateway takes, name magpie/<provider>/<model>, every one on env.MAGPIE_API_KEY holding the gateway's key, which is how an entry of magpie's is told from the user's own — and points settings.model at a pick. Stash, Check/drift, Sync, port-move Rewire and disconnect work as for the other JSON-config agents; on disconnect the user's entries, model and key are restored, the file byte-identical to before. Verified: go build, GOOS=linux nogui + GOOS=windows builds, go vet ./...; go test -tags nogui ./internal/agent (TestQwen* pass; TestDriftUnwiredEveryAgent/qwen and TestPortMovesEveryAgent pass after binding drift identity to the entry, not the address), go test -race -count=3 -run TestQwen, go test . (TestAgentQwenDefault: set then 'default' restores the settings byte-for-byte). TestQwen fails with 'unknown agent' when the registration is reverted. Real use: a copy of a live 341-line settings.json in a sandbox HOME — wire, then 'qwen default' left it byte-identical. Not run: GUI suite (no gui/assets change); TestReasonixCLI* and TestPluginHTTP2TakesTheProxy fail on main too (fixture/network), unchanged by this. * agents: qwen honors QWEN_HOME, sets auth type, owns a qwen-specific key name, carries context windows (#1279 review) - $QWEN_HOME stands for ~/.qwen, resolved as the other agents' (via place.getenv, appdir.Getenv; a distro's isn't read), and is in agentenv.Vars so the sandbox clears it - wiring sets security.auth.selectedType openai so qwen skips the /auth prompt; the user's own (including a pre-existing "openai", told from magpie's by a stash marker) is restored on disengage - envKey is MAGPIE_QWEN_API_KEY: a shell-exported or ~/.qwen/.env value wins over the settings' env, so the magpie-generic name is not used - entries carry generationConfig.contextWindowSize from the catalog - a settings.json without modelProviders reads as no models of anyone, instead of gjson's 'cannot use null as iterable' Verified: TestQwen* incl. TestQwenAuthOpenAIOfTheUsersOwn and TestQwenHomeOverride, TestAgentQwenDefault (CLI), -race -count=3; unwired-drift and port-move generic tests pass. Real end-to-end: dev gateway on 127.0.0.1:3999 in a sandbox HOME, real qwen binary in a sandbox QWEN_HOME ran a prompt through the gateway (PONG), and wire → default left the settings byte-identical. Reasonix fixture tests fail on main too (environment). * agents: qwen's requests are attributed by their QwenCode/<version> User-Agent |
||
|
|
b56476b970 |
fix(provider): omit Anthropic version headers from OpenAI probes (#1312)
Reported by mac0923: Agent Space rejects Responses probes with anthropic-version as 400 invalid_headers. Add the default version only for Anthropic Messages while preserving custom headers through Sign. TestProviderProbesUseProtocolHeaders fails before the fix across endpoint tests, model tests and both detection paths, then passes with the fix, including 20 race-detector runs. go vet and macOS, Linux and Windows builds pass. |
||
|
|
9bf20dbfc1 |
gateway: a model a relay serves with tools on Responses alone goes to the provider's Responses URL (#1308, Stevenzc888)
A custom provider with the same relay as its OpenAI compatible and OpenAI
Responses URL: magpie asks a GPT on a relay on Chat Completions first (Pi is
wired on openai-completions for it), and the relay turned Pi's tools away with
400 "gpt-6.1-sol requires Responses for tool calls; this account only supports
Chat Completions". wrongEndpoint didn't know that wording, so the 400 reached
Pi instead of the request going on to the Responses URL. "requires responses"
is now one of its phrases: the model is remembered as not served on that
relay's Chat, and the request (relayed as Pi sent it, or translated from
Claude Code's Messages) is spoken as Responses there, later turns at once.
Where the provider has no Responses URL, the error now says so
("gpt-6.1-sol is served on /v1/responses, which <provider> has no URL for")
rather than the relay's word alone (wrongAPINote reads the error body).
Red before: TestToolsThatNeedResponsesGoThere failed with the user's exact
error ("status 400: ... requires Responses for tool calls; this account only
supports Chat Completions"); TestTranslatedToolsThatNeedResponsesGoThere,
TestToolsThatNeedResponsesNameTheMissingURL and TestWrongEndpoint's new case
failed too. With the phrase but without the note, the missing-URL test fails.
go test -tags nogui ./internal/gateway ./internal/provider pass, and
./internal/agent as a non-root user (as root in Docker its chmod-based
aside_offline tests fail, unrelated); go vet -tags nogui ./internal/gateway
for darwin, linux and windows, and gofmt -l pass (linux, golang:1.26.8 in
Docker: this Mac's syspolicyd is pegged and new binaries hang at launch).
Not tried against the reporter's real relay.
|
||
|
|
2cdae80a10 |
stats: the day's event no longer names an omp profile or a model the user named; an omp profile goes as omp, and on a key's provider a model id models.dev doesn't list (an Ollama model, a fine-tune with the user's organisation in it) goes as <provider>/other
|
||
|
|
0470411122 |
providers: a provider has a Requests per minute limit beside Concurrency: each key or account sends the vendor at most that many requests in any rolling minute, one more waits for room (coeo91 on Discord: OpenRouter's free models take 20 a minute, which Concurrency 1 can't keep to)
Set in the provider editor (under Concurrency; empty or 0 is no limit) or with `magpie provider rpm <id> [n|off]`; kept per provider as MaxRPM, a subscription's with its picks. Over the limit the gateway waits until the oldest request of the minute is a minute old, in the order they came, after the lane's slot and right before sending. A wait longer than 2 minutes (or the provider's Queue wait, when shorter) is turned away at once with a 429 and a Retry-After of when the minute has room; nothing rests for it. An agent gone while waiting gives its place back and is never sent. Every request that reaches the vendor counts: each try of the forward loop (retries, the next key, fallbacks) waits in serve, and requests a try makes on the way plus the gateway's own (count_tokens, System One decisions, embeddings, drawing/video, Kimi search) are counted by an rpmTransport on s.client. count_tokens never waits: a key with no room is skipped and the local estimate answers. A key or account with no room in its minute gives way to a ready one of the provider or the group, as a full lane does (laneMate). No wait happens under rpms.mu. Not counted: a plugin account's own extra requests (its own transport; its tries are). Verified (Go tests on Linux in Docker, golang:1.26.8, since new binaries hang at launch on this Mac while syspolicyd is pegged): - internal/gateway rpm_test.go through the real server stack (lanGuard(s.Handler())): limit 2, third request reaches the vendor a window after the first, all 200; past the bound a 429 with Retry-After and no rest; a cancelled waiter is never sent and gives its place back; a 503 retry and a count_tokens count, and a count with no room is estimated; a group member with no room gives way. With RPMLimit forced to 0, those five gateway tests fail. -race -count=5 passes. - internal/provider TestSetRPM (clamp, subscription picks reach each account), TestRPMCmd, internal/gui TestRPMSave. - go test -tags nogui ./... on Linux: all pass except internal/agent's TestAside* write-refusal tests, which fail only as root in Docker and pass as uid 1000. - go vet -tags nogui for linux, windows and darwin; gofmt -l clean. - GUI: new provider-rpm.test.cjs (en/zh/ja/de, 360 and 440px, Chromium and WebKit; 32 pass, and all 16 Chromium cases fail on the old app.js), plus gui-ja, gui-de, gui-zh-tw, i18n-keys, provider-concurrency, lane-limit, provider-price-rate and clinepass-pin in both engines. Not tried against the real OpenRouter. |
||
|
|
de5455b8fe |
gateway, usage, gui: a reply whose vendor sent its first words and held the rest to send in one burst tells no speed, not 1,367 tok/s (John on Discord)
John's request (OpenCode, a group served by Kimi Code at api.kimi.ai, Chat) showed 1,367 token/s: its tokens counted over the time from its first token to its end, though nothing came in between and the rest came at once. The 100 ms / 10,000 tok/s bounds catch a burst only when the first content comes with it. firstToken now reads on past the first text and marks when each content event's bytes came (one mark a millisecond, up to 65,536 marks and the 8 MB it reads), and flowMs is how long the content took to come from where the speed is counted: the span from a tenth of its bytes to nine tenths, scaled to the whole. A steady stream gets about its whole window; one let go in a burst about 1 ms. It is kept as Call/Try/Route .flow and usage.Record.flow_ms (and the Requests page's packed rows), and usage.DecodeOf, routing.js's decodeOf and app.js's ledDecode count no longer a window than it. A record without it reads as before. Verified: TestBurstTellsNoSpeed, a fake Chat vendor that sends a word, waits 600 ms, then 199 words and the end in one write (1,000 tokens), for a Chat and a Responses agent: no speed; before, 1636 and 1655 tok/s. Its steady case (a word every 60 ms) keeps 200 tokens over most of its window. TestCodexBackendBurstTellsNoSpeed is the same through Codex's own ChatGPT backend (before: 1,000 tokens in 601 ms). TestFirstTokenKinds now expects the stream read past its first text. Go tests ran on Linux (golang:1.26 in Docker; this Mac's syspolicyd held new test binaries at launch). GUI: routing-burst-speed (a route with John's 5.1 s first token, 6.7 s and a 2 ms flow: was "1367 tok/s", now none) and usage-speed (a row with flow_ms 2 shows "—") fail without the JS change and pass with it, with reasoning-speed, routing-request-metrics and usage-ledger-detail, in Chromium and WebKit (en/zh, ja/de where the tests have them); no strings changed. Not reproduced with Kimi Code itself: whether it holds the stream so is inferred from the numbers. |
||
|
|
7611c36e6f |
agent: wiring Alma also makes the model magpie draws with Alma's image generation model, when Alma has it on Auto (Sorghum on Discord)
Alma has one: Settings › Image Generation, settings.imageGen.model,
"<providerId>:<model>" like chat.defaultModel, "" for Auto (Alma's
src/services/settingsApiService.ts defaults). Its `alma image gen` and
in-chat image requests send an openai-type provider's model to
{baseURL}/images/generations, which the gateway draws with.
Choosing one of magpie's models for Alma now also sets imageGen.model to
magpie's provider and the model magpie draws with (gateway.Drawer: the
Settings' Image generation model, else AutoDrawer's), only when it is
Auto: a model the user picked, theirs or magpie's, is left. Sync leaves
an Auto alone (the user may have gone back to it) and only replaces one of
magpie's that magpie no longer offers. That model is listed on magpie's
provider with capabilityOverrides.imageOutput, as Alma's picker lists only
a provider's models that make images and shows another as "unavailable".
Going back to Alma's own model puts an image model of magpie's back to
Auto with the provider. Nothing changes when magpie draws with nothing.
Verified: TestAlmaImageGen against the fake Alma (settings kept whole,
aspectRatio untouched): Auto filled with p1:img/gpt-image-1 and the model
listed with imageOutput; the user's own pick and a magpie chat model kept
by Apply and Sync; Auto kept by Sync; a stale magpie drawer replaced; Auto
again on going back. It fails without almaSetImage ("image generation:
\"\", want \"p1:img/gpt-image-1\""). TestAlma checks nothing is written
when magpie draws with nothing. Go tests ran on Linux (golang:1.26 in
Docker). Not tried with the real Alma: Alma's settings page reading the
override as an image model, and an image drawn through it, are unverified.
|
||
|
|
cf10394527 |
agent: alma-server on Linux is found and wired as Alma, so its requests show as Alma, not "ai-sdk" (Lutra.x on Discord)
alma-server (Alma without a desktop, Linux x64/arm64) keeps its data in
$ALMA_DATA_DIR, else $XDG_DATA_HOME/alma, else ~/.local/share/alma
(Alma's electron/headless/electron-shim.ts getDefaultUserDataPath), and
answers on the same localhost:23001. magpie looked only in the desktop's
folder (os.UserConfigDir()/alma), so on such a machine Alma's Sync never
ran, its magpie provider kept the old shared key, and the gateway read its
requests by their User-Agent alone, the AI SDK's
("ai-sdk/openai/4.0.15 ai-sdk/provider-utils/5.0.10 runtime/node.js/22",
@ai-sdk/openai 4.0.15 and provider-utils 5.0.10 as alma-server bundles
them; Alma sends no header of its own). almaDir now also looks in
alma-server's folders on systems other than macOS and Windows, the
desktop's first; ALMA_DATA_DIR is in agentenv's Vars.
Verified: TestAlmaServerKeyed (a Linux home with only
~/.local/share/alma and a fake Alma whose magpie provider has the old
key): Sync re-keys it to magpie-alma; XDG_DATA_HOME and ALMA_DATA_DIR are
followed, the desktop's folder wins, and macOS/Windows look only in the
desktop's. It fails without the change ("Alma's folder:
.../.config/alma, want alma-server's .../.local/share/alma").
TestAgentOf has alma-server's real User-Agent bytes: Alma with magpie's
Alma key, "ai-sdk" without. Go tests ran on Linux (golang:1.26 in Docker;
this Mac's syspolicyd held every new test binary at launch).
Not tried with a real alma-server, and an alma-server on another
computer, reaching magpie with a gateway key, still reads as the AI SDK:
its User-Agent says nothing of Alma.
|
||
|
|
577a0e4377 |
gateway: every upstream's call ids reach an Anthropic client as [A-Za-z0-9_-] only and go back to the upstream as it gave them, not only Devin's (#1304, StarMoonCity)
|
||
|
|
56d1665251 |
library: a skill an agent has of its own is removed from every agent that has it, from its row under "In your agents" (trash) or with d twice in the TUI, without bringing it into the library first (#1303, sxwedo)
Until now the only action on such a row was Bring in: removing it meant bringing it in and then removing it from the library. RemoveFoundSkill (skills/remove-found) takes out of each agent that has it its folder, or its copy of the very same files, and its links; its entry in the shared ~/.agents/skills, which agents read too, and a folder of it in the library's own folder go as well. Nothing is deleted: folders go to the backups (setAside), links are taken away, and a folder elsewhere that the agents only linked to stays where it is. Another skill by that name (Others) is a different skill and stays. The page asks first and says which agents it leaves and what stays. TestRemoveFoundSkill (library), TestLibraryPage's new part (TUI) and remove-found-skill.test.cjs (GUI) fail without the change. The GUI test fails 4 of 4 with library.js from before it, and passes in Chromium and WebKit, in en, zh, ja and de, and at 440px wide. Run: go test -tags nogui ./internal/library ./internal/tui ./internal/gui, and go vet for linux, windows and darwin with -tags nogui, in Docker (golang:1.26.8, a temporary HOME). The Mac's syspolicyd held test binaries at launch. On the Mac, in Chromium and WebKit: remove-found-skill, gui-ja, gui-de, i18n-keys, import-all-skills, own-skill, shared-skills, library-own-folder, library-items, remove-all-skills, library-desktop-skills, skill-name-many-agents and mobile-web, 133 of 133. In one earlier run of that set at load ~40, mobile-web's WebKit "idle scripts cannot scroll" failed once. It passed 3 of 3 alone with this change, and passed in the full rerun. Not tried: the reporter's own agents, and a WSL agent's folder. |
||
|
|
2da80009b0 |
gateway tests: TestClaudeOldSessionsAreSwept waits for the old session's folder as well as its file (red on ubuntu CI -race at 9275abcd: "the old session's folder stayed"). The sweep runs in a goroutine and removes <sid>.jsonl, then the <sid> folder; the test waited only for the file to go and then looked at the folder at once, so a goroutine preempted between the two removals failed it. The app is right, the test was wrong. Red before: with a 50 ms sleep put between the two removals in removeSession, the old test fails 5 of 5 with CI's message; the new one passes 5 of 5. Without the sleep, go test -race -count=50 -run 'TestClaudeOldSessionsAreSwept$|TestClaudeSessionFilesAreRemoved$' ./internal/gateway and gofmt -l pass (linux, golang:1.26.8 in Docker: this Mac's syspolicyd is pegged and new binaries hang at launch).
|
||
|
|
02ecc4ccf6 |
provider: moved Devin users get plugin 0.1.13, whose call ids Claude Code takes, going back to Devin as Devin gave them (#1304, StarMoonCity)
SWE-2's call ids ("Bash:0#a65b…") went to the agent as Devin gave them, and Claude Code dropped each call: "The model's tool call could not be parsed". Plugin 0.1.13 (magpie-community/plugins d33df7e) sends such an id as "dv_" and its base64url and turns it back for Devin. Raising the mover's min makes keepMovedCurrent update every moved user's plugin.
npm view @magpie-community/opencode-devin-auth version prints 0.1.13; the plugin's publish run had 973 pass, 0 fail. go vet for darwin, GOOS=linux and GOOS=windows pass; go test -tags nogui ./internal/provider passes on Linux (Docker; this Mac can't exec new test binaries right now).
|
||
|
|
d358107766 |
gateway: Devin's call ids reach the agent as [A-Za-z0-9_-] only and go back to Devin as Devin gave them, so Claude Code runs SWE-2's tool calls (#1304, StarMoonCity)
SWE-2 names a call after its tool and turn ("Bash:0#a65b6a5e02194b87bbc796c4428c946d"). Claude Code takes a tool_use id only of [A-Za-z0-9_-], dropped every such call and failed the turn with "The model's tool call could not be parsed (retry also failed)"; Codex and pi take any id. decodeDevin now sends an id with another character, or one beginning "dv_", as "dv_" and its base64url (devinOutID), and buildDevin turns it back (devinInID) on the assistant's call and on the result that answers it, so Devin sees its own id. A safe id goes both ways as it came. It is stateless, and the same mapping the Devin plugin makes in 0.1.13 (outID/inID).
TestDevinCallIDsSafeBothWays takes Devin's reply with the reporter's literal id through serveDevin on Anthropic, Chat and Responses, and answers the call in the next request of each: with devinOutID and devinInID made to return the id as it came (the old behavior) it fails "anthropic: call id \"Bash:0#a65b6a5e02194b87bbc796c4428c946d\", want one of [A-Za-z0-9_-] only"; with only devinInID taken out (a one-way clean, as the issue proposed) it fails too, Devin getting the cleaned id. TestDevinSafeCallIDsUnchanged keeps safe ids, and a caller's own "dv_…", as they came.
go test -tags nogui ./internal/provider ./internal/gateway pass on Linux (golang:1.26.8 in Docker, temp HOME, module cache mounted read-only): on this Mac every freshly built test binary hangs at exec (syspolicyd at 100% CPU), so no darwin test run. go vet -tags nogui for darwin, GOOS=linux and GOOS=windows and gofmt -l pass. Not tried against a real Devin account.
|
||
|
|
169c23c18e | stats: the day's event says which agents, providers and models magpie is used with, by magpie's own ids (a provider of the user's own, and its models, only "custom"), with how many of each and of routing groups: one "magpie uses" event per id in the same PostHog batch, so unique users break down by agent, provider and model. Settings → Privacy → Share the agents, providers and models I use turns it off (on by default; gone while Count me as a user is off); no names, URLs, accounts, keys or usage. go test ./internal/stats (payload, off switch, labels), the Privacy switch in Chromium and WebKit (en, zh), go test -tags nogui ./... in a temp HOME, go vet, GOOS=linux/windows builds pass; read against the real config: 9 agents, 24 providers, 25 groups in 0.75 s | ||
|
|
78d90571cf |
agent: each named omp profile is an agent of its own, on Windows and in each WSL distro (#1233)
* agent: each named omp profile is an agent of its own, on Windows and in each WSL distro (#1187) The Agents tab's omp row only ever wrote the one folder ompDir picks, so a profile started with omp --profile kept the model it had. ~/.omp/profiles/* is now listed per location: omp#<name> on Windows, omp#<name>@wsl:<distro> in a distro, each with the omp row's model, role and thinking controls writing that profile's own config.yml and models.yml. The profile the default row already points at (OMP_PROFILE) is not listed twice, and a stopped distro is not started to list its profiles: the names come from the probe and stay in wsl.json. * gui: an omp profile's id is encoded in the Agents page's requests (#1187) omp#<name> went into /api/agents/connect and the rest raw, so a browser read #work as the fragment and connected, disconnected or previewed the default omp row instead. api() now encodes each path segment, which is what agent-models and agents/cli already did for the id alone. * agent, gui: an omp profile name is one omp takes, and only its # is encoded (#1187) api() encoded every character of a path, so a query's ? = & became part of the path and Usage, quotas and Sessions 404ed. Only # is encoded now, which is what omp#<name> needs; a query stays a query. ompProfileOK also refuses the Windows device names omp refuses on every platform (aux, nul, com1, lpt9.x, con.work), and work. is checked through that rule rather than by making the folder, which Windows would turn into work. |