Commit Graph
248 Commits
Author SHA1 Message Date
yetone ddf2ef83f5 panel: a meter in the tray's panel turns used or left when clicked, as the Usage page's do, and says so when pointed at — the one setting for every meter and the menu bar (#124) 2026-09-28 10:11:42 +08:00
yetone e31a6a15b0 usage: the menu bar's usage is refreshed as often as asked — every 1, 3, 5, 10 or 30 minutes, 3 as before — and reads as used or left as the Usage page does; that choice is a setting now rather than the browser's, so the page, the panel and the menu bar agree, and Settings has it too; a browser's choice from before is carried over once (#122) 2026-09-28 09:27:49 +08:00
yetone 0686bdffa7 accounts: a magpie just started no longer holds every page and request for cursor-agent and devin — who their CLIs say is signed in is kept on disk (cli-identity.json), served at once on the next start and asked again behind it; only a first look ever, or one after a sign-in or out, waits for the CLI. The window's first read went from ~4s to ~0.15s here with both signed in, and the gateway page shows its skeleton, not blank cards, while the state loads (#123) 2026-09-28 09:21:24 +08:00
yetone 316803e260 warm-up: Claude accounts too — a Claude window, the 5-hour one and the weekly one, starts at the account's first request after it resets, so with Claude Code warm-up on (Settings: off, weekly, or weekly and 5-hour) the magpie serving the gateway sends each account one "hi" as its window starts over, through Claude Code itself (Haiku, none of its tools, settings or MCP servers, nothing kept on disk), a saved account with its own sign-in; once per reset, kept in claude-warmup.json, as Codex's is 2026-09-28 06:31:40 +08:00
yetone 1324b61fac quota: a relay's balance can be told by a sub2api panel, and one that tells none says so — a balance token that is a JWT (a sub2api panel's login token, for GET /api/v1/user/profile) is sent as a Bearer, a new-api access token still as it is, and the editor says which goes there; magpie quota <provider> on one with no balance endpoint gives a line saying it isn't configured and how, --json included, rather than an empty list, and an unknown name is an error 2026-09-28 03:28:17 +08:00
yetone 2d0058b9b9 providers: the context window field offers its usual sizes under it, one click each — 128K, 200K, 256K, 1M — and, where models take more than they are said to, each one's own most: Codex's GPT-6 and GPT-5.6 are said to hold 272K and take 872K when asked, a size nobody remembers, so one chip sets it for every such model (#120). The most is read from max_context_window in the list ChatGPT gives and in Codex CLI's cache 2026-09-28 01:53:08 +08:00
yetone de59782fba providers: Jev through Vercel's AI Gateway and Cloudflare's Workers AI — two presets, Jev · Vercel AI Gateway and Jev · Cloudflare Workers AI, route groups and pick their effort as TypeSafe's own does, each asked its own way: Vercel's evaluation-model with the model in a header, a noul asked as a boolean and a confidence taken from the probabilities; Workers AI's run of typesafe/jev at the account its API token works in, found once, out of Cloudflare's envelope. A key is checked by the gateway's free call (Vercel's credits, Cloudflare's accounts) 2026-09-28 01:43:09 +08:00
yetone 74cbac06ec gateway: the page is left as it is when nothing on it changed — coming back to the window no longer wipes it to placeholders and redraws, which put the reader back at the top; a reload draws again only what changed (the calls alone when only they did) and keeps where the reader was. The model list folds away under its heading, with its count, so Recent calls sits under Connect; the fold is remembered. Asked on Discord 2026-09-28 01:21:26 +08:00
yetone 6c9a0aa4d7 agents: OpenHanako — magpie is a provider there, chat completions at the gateway's /v1 under the key magpie-hanako with every model it serves, their windows, output, images and reasoning said; picking one makes it the primary agent's chat model, and default puts back the one it had and removes the provider, marked deleted as OpenHanako marks one it removes. While OpenHanako runs it goes through its local API (server-info.json's port and token), which reloads at once; otherwise into provider-catalog.json and agents/<id>/config.yaml for its next start. Asked on Discord; checked with OpenHanako's own provider registry and model manager, which list magpie's models and resolve the chat model to the gateway 2026-09-28 01:12:46 +08:00
yetone 24a57f8c69 providers: a subscription's editor has the Context window field too (#120) — only an API provider's editor had it, so the 872K a Codex account's models take couldn't be set where the account is edited; it saves with the account, and the agents are told it over the 272K Codex's backend reports 2026-09-28 00:47:18 +08:00
yetone 98efe400b5 gateway: Add to Cindy — Cindy (makecindy/cindy) takes a provider only through its import link, confirmed in Cindy, so the Gateway view's connect card has a button that opens cindy://provider/import with magpie as a custom provider: the gateway for Claude Code on Messages, Codex on Responses and Pi on Chat Completions, each listing the gateway's models, under the key magpie-cindy so Cindy's calls are known as Cindy's. Checked against Cindy's own parser (all three engines in its preview) and its model fetcher (the sandbox gateway's 30 models on each endpoint) 2026-09-28 00:26:04 +08:00
yetone 521747465a usage: every window says when it starts again, on the clock — "resets 14:30 · in 3h", "tomorrow 09:00", "Fri 00:06" or "Oct 13 00:06" — under its bar on the Usage page, under its meter in the panel, and in the TUI whatever its use (not only once nearly spent) and magpie quota, rather than only in a tooltip 2026-09-28 00:07:47 +08:00
yetone d8200dfe54 usage: a plan says when its paid time ends — a ChatGPT account the date its sign-in names (only while it is ahead: a token not refreshed since says nothing of now), a GLM Coding plan (ZCode, or a Zhipu or Z.ai key) its renewal or end from the account's subscriptions as ZCode reads them — beside the plan on the Usage page, under the account in the panel, and in the TUI and magpie quota 2026-09-27 23:23:56 +08:00
yetone 8f34b6d37e icon: macOS 26 draws magpie's icon light or dark — AppIcon.icon (the bird on a pale tile, or in white on a dark one) compiled into Assets.car beside the .icns, where the .icns alone was darkened whole in dark mode, the black bird lost on a black tile (#117); the app no longer sets a light picture over it in the Dock 2026-09-27 22:55:20 +08:00
yetone 36a93974b3 ui: a subscription's window count stays inside its card at every width — each window's one column is its own width rather than its count's, so a long count like ZCode's 74217 / 140000 · 已用 53% no longer runs past the card's right edge, and a count too long for its window breaks at its · with the share on a second line; widening the window puts the counts back beside their names, as the check now measures a count's own parts, not the stacked box that spans the row (#90) 2026-09-27 22:18:37 +08:00
yetone 926362db4a providers: a removed account's Add it back line can be dismissed for good — Don't remind me beside it hides the line across restarts, and the Add sheet offers the account back under Removed from magpie, one click, for when it's wanted again; removing it again brings the line back (#116) 2026-09-27 22:16:15 +08:00
yetone c76af6822f ui: a subscription's windows side by side put every count under its name once one's doesn't fit beside it, not one up by its name and the next a line below (#90); a provider's models can be picked all at once (those the filter shows) or none, and their list scrolls on its own, not the editor with it (#115); DeepSeek Harness's own models are listed under its name, apart from magpie's DeepSeek provider, which read as DeepSeek twice (#115); Hide emails says when it is on — a struck eye, 邮箱已打码 and the accent, an open eye while emails show 2026-09-27 21:38:25 +08:00
yetone 6c89759239 ui: an outcome told while a dialog is open (Test models in a provider's editor) floats over the dialog's scrim at the bottom of the window — in the footer it sat under the scrim, dimmed and blurred out of sight 2026-09-27 20:50:06 +08:00
yetone 3d4ae0db47 routing: a Claude account is known once it answers — Claude Code's rate_limit_event (Anthropic's anthropic-ratelimit-unified-* headers: the five hours and the week, used and when they renew) is kept as the account's allowance, standing an hour for a usage endpoint that turns magpie away; and one not known yet goes before those known in smart routing, not after them, where it never answered and so was never known 2026-09-27 20:46:39 +08:00
yetone d6c3baa0b8 cursor: served straight through Cursor's agent API, not cursor-agent over ACP — each request is a Run on AgentService, the stream cursor-agent itself opens, with its sign-in (the keychain's or auth.json's token, renewed by cursor-agent near its end): the conversation goes whole as AI SDK messages the server reads as blobs, the caller's tools as MCP tools the model calls through CallDynamicTool, and the reply streams back text, thinking and calls, the Run closed once the step's calls are all made. None of Cursor's own tools run. Tested live from a sandbox: Claude Code and OpenCode on Sonnet 5 and GPT-5.4 mini read and write files through several tool rounds; parallel calls, a continuation and an image answered 2026-09-27 20:41:29 +08:00
yetone ef13e07e79 ui: an outcome in the footer (Refresh, Test models, a save) is a solid pill in its colour, larger, and an error stays 8 seconds — a result in the window's corner was faint over a desktop showing through, told only by its colour 2026-09-27 20:31:22 +08:00
yetone 73b650b281 routing: a request a group's rule sent to a member that can't take it fails over to the members the rules after it that match too name, in their order, before the group's others (#112) — two rules for images, the first's model out of quota, now go on to the second's vision model rather than the group's text-only first; and while the first's rests, the second's goes first. The trace names who comes next, and says a turn stays with whoever took it, not the model the rule named 2026-09-27 20:28:38 +08:00
yetone 1d0c9ccf27 settings: a choice's buttons keep their names on one line in a narrow window — the row's description gives way instead, so the Dock's 跟随窗口 and Codex warm-up's 每周和 5 小时 no longer broke a character to a line 2026-09-27 19:50:43 +08:00
yetone 4e83dc6be8 web: magpie web knows its version and updates itself as the app does — the badge's restart puts the new version in and runs it in the old one's place with the same arguments and key, so the open page reloads onto it (#111); routing: a gateway served by magpie serve, which has no window, is told apart from another magpie's window, and the routing view says to stop it so this magpie serves the gateway and shows routing live (#110) 2026-09-27 19:39:45 +08:00
yetone a7dd920e8a tray: the terminal-only build builds again — the menu bar's usage watcher, which needs the tray, is in a file of its own left out of nogui builds; 9cbcb68 had it beside the card's text, which every build has 2026-09-27 19:33:03 +08:00
yetone 9cbcb681dd tray: a subscription's use can sit beside the icon in the menu bar — Settings → Usage in the menu bar picks one of the Usage page's cards, and its windows' use shows there ("42% · 18%", the shortest window first; a key's balance as it reads), with each window and when it starts again in the tooltip, brought up to date every few minutes from the page's own caches, so the vendors are asked no more often. Windows' tray has no room for text and shows the tooltip only. Asked for on Discord 2026-09-27 19:10:27 +08:00
yetone ebdf44821f sessions: Terminal is opened through proc.Command, as every command magpie runs is — os/exec there failed TestNoCommandBypassesProc and kept main's CI red since 78fe45d (spotted by @hezhizhen in #103) 2026-09-27 18:54:09 +08:00
yetone ab76cce91b providers: a custom provider's icon can come from its website (#12) — From the website, beside Choose a picture, finds the site behind the base URL (its host, then the domains it sits under: api.deepseek.com, then deepseek.com) and keeps the icon its home page names (an SVG first, then the apple-touch-icon, data: URIs too) or its /favicon.ico, like a picture picked by hand; only public https hosts are reached. Icons are fetched as magpie, since deepseek.com turns Go's own User-Agent away 2026-09-27 18:52:49 +08:00
yetone 78fe45dbc3 usage: Sessions — Claude Code's and Codex's own session files read into a list beside the overview: each session's folder, first prompt, models, tokens and estimated cost at list price, filtered by agent and searched; Resume copies the cd and claude --resume / codex resume that picks it up, and the Mac app can open it in Terminal. Only the latest 200 are read, cached by size and time, nothing written to the agents' folders 2026-09-27 17:47:14 +08:00
yetone c96cfa0ba0 codex: warm-up — a ChatGPT account's next window can be started as soon as the last one resets, by a one-word request to the mini model at low effort, so the 5-hour (or weekly) clock is already running when work begins; Settings → Codex 预热: off, weekly, or weekly and 5-hour. Checked every 5 minutes, only a window seen idle (nothing used, its reset a full span away) is warmed, three tries per reset 2026-09-27 17:36:20 +08:00
yetone 8f915a5a23 web: MAGPIE_WEB_KEY takes letters, digits and - . _ ~ only — a cookie can't hold a space, ; or a quote, so the browser was sent a cookie that wasn't the key and turned away with no word why 2026-09-27 17:26:21 +08:00
Arvak 84ef25805e web: MAGPIE_WEB_KEY keeps the page's key across runs — for magpie web kept running as a service, where a new key each start signs every browser out; with it the cookie outlives the browser session too (400 days, Chrome's most). Unset, each run makes its own key in a session cookie, as before. A key under 16 characters is refused. (#109) 2026-09-27 17:26:32 +08:00
yetone e173710982 backup: the library goes with a backup and a WebDAV sync — the instructions, MCP servers and skills with their files, a fifth part, ticked by default (magpie backup/restore --no-library). A backup without keys leaves the servers' secret env and headers empty and a restore fills them from the servers kept here; a skill's file over 2 MB, or past 32 MB in all, stays behind; a path that climbs out of its skill is refused. What it replaces is kept with the library's backups. Tested from a sandbox: exported without keys, changed and removed things, imported — the server back with the local key kept, the skill back as files, run.sh still executable 2026-09-27 17:24:53 +08:00
yetone c7b4f9a6db usage: the page counts on while it is looked at — every few seconds it asks for the counts again and redraws only when they changed, so a request through the gateway shows without a refresh, and the subscriptions' windows are asked again each minute (the vendors' answers are cached behind them). A window in the background or an open menu is left alone. Tested from a sandbox: requests sent with the page open appeared within five seconds, and nothing redrew while nothing changed 2026-09-27 17:16:05 +08:00
yetone 3597cbbcc3 library: instructions come in sets — Default and any others named, each its own text, one of them the one the agents read; a set is added, renamed, switched to and removed (after a confirm, never the one in use or Default) in Library → Instructions, and a setup snapshot keeps which was in use. Providers: each protocol keeps its own URL, so a saved chat URL no longer shows as the Anthropic one; a URL typed and not saved yet moves to the protocol picked after it, spelled as that one wants it (/v1 dropped for Anthropic, added for OpenAI). Settings: an open WebDAV, export or import form is no longer emptied when the window regains focus. Tested in the browser from a sandbox. Issues #104 #105 #106 2026-09-27 17:05:59 +08:00
yetone 59e4f417b2 web: magpie web serves the app's window to a browser, with the gateway beside it — for a computer that can't show the app: no desktop, WSL, a server over SSH, or the CLI-only build, which now carries the page too (what of the app needs Wails is left out of nogui builds). Every request needs this run's key, which the printed link carries and trades for a cookie other sites' pages can't send with a POST; --lan serves it on the network too, with a warning, --addr elsewhere, --no-open leaves the browser shut. In the browser the page opens links and sign-ins itself, names a folder instead of opening it, and leaves out the tray, the Dock and open at login. Tested from a nogui build in a sandbox: no key, a wrong key and a cookieless POST are refused; with the link Agents, Providers and Settings load and a setting saves. Issue #102 2026-09-27 16:21:26 +08:00
yetone dad2787f55 settings: the Dock can follow the window — Hide, With window, Show. With window, magpie is in the Dock (and Cmd-Tab) while its window is open and leaves it when the window is closed, so it can be switched to without an icon kept there the rest of the time. Tested on a sandboxed bundle: shown at start, gone on close, back on reopen; Show and Hide behave as before. Issue #101 2026-09-27 16:14:54 +08:00
yetone 154d071699 routing: a group's effort can be picked per turn by any classifier, not only TypeSafe's Jev — a model that isn't a decision API (Jev Router on OpenRouter, Jev on OpenCode Zen, or any small fast model) is asked in words which of low, medium, high or xhigh the turn needs, in a call of its own beside the intent's, and told what the turn before needed; the routing editor offers every model for it 2026-09-27 16:11:23 +08:00
yetone 5bed05f5fb providers: CherryIN (open.cherryin.ai) is a preset — a New API relay serving chat, Responses and Anthropic's messages at one host, so its models reach every agent with just a key 2026-09-27 15:59:59 +08:00
yetone bc33064c14 usage: a subscription's windows side by side keep their bars on one line when one window's count wraps under its name — each window takes two rows of the grid (a subgrid), its names and its bar, so ZCode's 5 小时 bar no longer sat a line above Weekly's 2026-09-27 15:28:33 +08:00
yetone 372bf7331b providers: a model id typed in the add box and not yet Entered is kept by Save, as if Enter had been pressed on it — Save dropped it, so a hand-typed id looked saved ("TRelay saved") but never was 2026-09-27 15:22:48 +08:00
yetone 18af9889fb usage: a subscription window's count on a line of its own starts at the left, under the name — it kept to the right, as it is beside the name, so a short one looked indented by spaces (ZCode's 5 小时 under Weekly's). Issue #90 2026-09-27 14:29:01 +08:00
yetone 17f289dd4a gateway: shared on the local network from Settings — Share on local network puts the gateway on every interface at its port, at once and without a restart, so agents on other computers use magpie's models; a request from another machine must carry the API key magpie makes for it (shown with the addresses, copied, renewed in place), and goes on as this computer's own, which need none as before. Off puts it back on loopback. Tested live from a Windows machine on the LAN: no key or a wrong one is turned away (401), the key lists the models and a chat completion goes through to the vendor with the provider's own key. Saving the Settings page no longer drops what other pages keep in settings.json (models' names and levels, who sees which, the network sharing) 2026-09-27 13:48:57 +08:00
yetone 0669c450e3 settings: Open at login starts magpie in the tray when you log in, so agents find the gateway from the start — a launch agent on the Mac, the user's Run value on Windows, an autostart entry on Linux, which is where whether it's on is read from too (magpie autostart [on|off] in the terminal) 2026-09-27 12:44:39 +08:00
yetone 08309e8c04 providers: Test models sends each model agents see a tiny request of its own, on the endpoint it's served on and with a key that sees it, and marks its chip with a dot — green with how long it took, red with what the vendor said — so a relay whose other models answer can't hide one that doesn't (magpie provider test <id> <model>… does it in the terminal). Usage has Hide emails too, one setting with Routing's, to screenshot the subscription cards 2026-09-27 12:26:00 +08:00
yetone 097f399fc1 usage: Kimi Code's plan windows (its /usages, the 5-hour and weekly allowances) show on the Usage page like the GLM Coding Plan's; the Used / Left toggle sits under an Allowances heading above the subscription cards, away from the period's list-price total it never changed, and a balance says why it is only what is left 2026-09-27 11:45:47 +08:00
yetone 6f792a3739 library: RTK's card shows RTK's own mark (the helmet from rtk-ai.app), drawn in the text's colour, in place of a generic terminal glyph 2026-09-27 11:40:03 +08:00
yetone c1d38cc50f effort: Claude Code can start at max — settings.json's effortLevel keeps up to xhigh (/effort max lasts a session), so magpie keeps max as CLAUDE_CODE_EFFORT_LEVEL in its env, which every session asks for (tested: Claude Code then sends output_config.effort max), and another level takes it away. A model whose reasoning levels aren't known (one models.dev doesn't list, a custom provider's) can be given some of none…max on the Providers page or with magpie model efforts, which the lists agents get and the gateway then take it to have: a request's effort is fitted to them, max sent as max 2026-09-27 11:05:47 +08:00
yetone 035dd5b5e3 panel: the tray panel shows every subscription's allowance under the agents — a line per account with its two rolling windows (how much used, or left, as the Usage page is set), its balance, or why it can't be read; the rest stays on the Usage page, and the Usage heading folds it away, remembered 2026-09-27 09:55:40 +08:00
smallnest 03a01a548d agent: MiMo Code — Xiaomi's fork of OpenCode, sharing its config shape (#98)
* agent: MiMo Code — a terminal coding assistant that is Xiaomi's fork of OpenCode, whose config keeps OpenCode's shape: its own mimocode.json(c) under ~/.config/mimocode, its auth beside it, and a magpie provider block with npm/@ai-sdk/openai-compatible, model and small_model fields. opencode() becomes openCodeLike() for the two to share it, and magpieProviderJSON splits shape from the catalog id (magpieProviderJSONFor), so a visibility narrowed on mimocode (magpie visible mimocode …) narrows its list and leaves OpenCode's alone. The library gives it the same instructions, MCP servers (its mcp key) and skills as OpenCode, except the shared skills go into its own skills/ folder: it reads Claude Code's skills only behind a flag, though it reads its CLAUDE.md like OpenCode, and the page says so. Its requests are told by the mimocode/ User-Agent. Checked against XiaomiMiMo/MiMo-Code

* icon: MiMo Code's own favicon, from packages/ui/src/assets/favicon — its frame with the bottom bar, in the monochrome the app masks to the text colour
2026-09-27 08:42:44 +08:00