Commit Graph
15 Commits
Author SHA1 Message Date
yetone 823e8baedd ui-preview: the sandbox has Claude Desktop, on magpie (#400) — the preview's home had Claude Code, Codex, Gemini and OpenCode but no Claude Desktop, so a PR changing Desktop's row (#399: tier menu, model picker, gateway notice) recorded "not available". run.sh now makes $XDG_CONFIG_HOME/Claude, where magpie looks for Desktop on Linux (the runner), and runs magpie claude-desktop provider magpie, which writes Claude/ and Claude-3p/configLibrary in that home as the Agents page would; no Desktop app is installed. The CLI writes the folders where the OS keeps them, so a local run on macOS gets Desktop under ~/Library/Application Support too. Checked in a sandbox HOME (darwin): Desktop absent from magpie ls before, "provider magpie" after, its profile pointing at MAGPIE_ADDR 127.0.0.1:3430; the Linux path is TestDesktopDirs's. bash -n run.sh, go test -tags nogui ./internal/agent -run Desktop pass. 2026-10-01 15:51:54 +08:00
yetone d1b6c119c7 ci: the UI preview's planner uses deepseek-flash instead of deepseek-v4-pro (PLAN_MODEL still overrides) — asked for by the maintainer. Checked against DeepSeek's API: deepseek-flash answers the planner's JSON mode (response_format json_object) with a valid plan; it reasons first (~1k tokens on a small plan), well inside the planner's max_tokens 16000. 2026-09-30 21:15:51 +08:00
yetone de07d8de24 ci: a UI preview goes by the diff, not the PR's description — on #287 the description (out of date) promised a 用量小数位 setting the code doesn't have, and the preview repeated it as the change, captioned a screenshot "默认 0 位" of a setting that wasn't there. The planner is told the description may be wrong, to plan and summarise from the diff, and what the sandbox lacks (subscription quotas above all); the preview now says, apart from the summary (改动(按代码)), where the description and the code disagree (描述与代码不符) and what the sandbox can't show (沙盒里看不到). Tested locally with run.sh on #287's code: it names the missing setting, says the sandbox has only a DeepSeek balance and no percentage windows, and shows the two places the change would be. 2026-09-30 15:45:23 +08:00
yetone 795a4d7130 ci: the UI preview checks out a fork's PR — actions/checkout now refuses fork code under pull_request_target unless told allow-unsafe-pr-checkout, and every fork PR failed there (#287, run 36682482508); #289 came from a branch here, so it passed. The record job is the one meant to run the PR's code: read-only token, no credentials kept. 2026-09-30 15:34:30 +08:00
yetone 190248d204 ci: the UI preview records without waiting for approval (the user: 去掉批准吧) — the ui-preview environment keeps the DeepSeek key but no longer names a reviewer; the comments and the "recording" note stop mentioning one. 2026-09-30 15:07:06 +08:00
yetone e79343b1bb ci: the UI preview's planner is shown how to reach what the PR changes — the pages are outlined closed, so on #289 (a hover colour inside an agent's model list) it once said nothing visible changed and once opened the drag handle's menu instead. It now also gets the PR's own front-end code around the diff: where the changed classes and functions are built and, two hops up, what calls them (here modelsEntry's .ag-models button opening openAgentModels), and is told that something missing from the outlines is to be opened, not taken as absent. A close-up no longer fails on clip (declared inside the try it was read after), and a DeepSeek reply that is cut short or not JSON is asked for again instead of ending the repair. Tested locally with run.sh on #289's source: 2 screenshots of the list, the button red on hover, and the video, no errors. 2026-09-30 14:40:04 +08:00
yetone 3a193423b6 ci: a UI preview's close-up keeps what's around the thing it shows (at least 560×340) and no screenshot is stretched past its own size in the PR — the first real run (#289) cropped a hover to the button alone, 100×68, then showed it 760 wide. Checked on #289 with workflow_dispatch. 2026-09-30 14:27:19 +08:00
yetone 7396b11998 ci: a pull request that changes the UI shows it — the real app built from the PR, run with a real DeepSeek key, screenshots and, when the change spans pages or needs clicking, an mp4 recording with the pointer, its trail and every click drawn in, in a fixed block at the foot of the PR's description (the user: 如果某个PR涉及了UI/UX改动,那么就把这个PR中的Magpie真实的运行起来…录屏中一定要画出鼠标指针的位置,以及鼠标的轨迹,以及鼠标的点击; 一定要贴在原始的PR Description的下面的固定区域).
.github/workflows/ui-preview.yml, on pull_request_target or by hand (-f pr=N): detect (internal/gui/assets/, the GUI's non-test Go, or the ui-preview label) puts a "recording" note in the block; record, behind the ui-preview environment's approval since PRs come from forks, builds the PR's magpie (nogui), runs `magpie web` in a fresh home with DeepSeek added and a few requests sent through the gateway, and has DeepSeek plan from the diff and the pages' real outlines what to click and capture (record.mjs, Chromium at 2x, cursor.js drawing the mouse); publish, which never runs the PR's code, puts the files on the ui-previews branch served by Pages and rewrites only the block between <!-- magpie-ui-preview:begin/end --> — the video's poster links to its player page, since GitHub embeds no video it didn't host. Captions say what is being done, never what should come of it. Anything on screen matching the key or the web link's key throws the whole recording away.

Tested locally with run.sh on 033a151's diff in a sandbox home: 3 screenshots and a 16 s mp4 of the Codex model list's 全部隐藏/全部显示, pointer, trail and clicks visible; actionlint passes. Not yet run on GitHub.
2026-09-30 14:22:13 +08:00
1a704bd6ba docker: a server image and a multi-arch build workflow (#245)
* docker: a server image and a multi-arch build workflow

The image is the terminal-only binary built with -tags nogui on
distroless static, run as nonroot with magpie's files on a /config
volume, created and chowned at build time so a fresh named volume
is writable by uid 65532.

The workflow builds amd64 and arm64 on native runners, smoke-tests
each image before anything is pushed (ready probe, unknown-model
4xx JSON, /config write), pushes by digest, merges a multi-arch
manifest (semver trio plus latest on v* tags, edge otherwise) and
attests build provenance. PR runs build and smoke-test only.

The README documents running the image, the web UI mode, and why
subscription sign-ins must start where a browser shares loopback
with magpie.

Co-Authored-By: glm-5.3-flash <hakase@ooooo.space>
Generated-By: omp 18.4.3

* docker: README publishes the ports on the host's loopback and says how to require a key — until the gateway is shared from Settings it takes any key from anyone who reaches it, and Docker's -p 3425:3425 puts it on every interface of the host past its firewall. Checked in the built image: with settings lan+lanKey a request from the host through the published port without the key gets 401 and with it 200; without them any key gets 200.

---------

Co-authored-by: glm-5.3-flash <hakase@ooooo.space>
Co-authored-by: yetone <yetoneful@gmail.com>
2026-09-30 03:21:19 +08:00
Zhizhen HeandClaude Code 3fe606e4b3 providers: account usage no longer writes its map from two goroutines at once — an account fetched less than a minute ago went into the map the other accounts' fetches were still writing to, which Go answers with a fatal concurrent map writes, not a panic anything recovers from; LoginUsage and Grok's copy of it now write that hit under the lock their fetches use (#119)
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-09-27 23:32:15 +08:00
Zhizhen HeandClaude Code 41de0d87eb gateway: count_tokens counts the masked prompt, and a count that cannot be had is told apart — the count Claude Code asks for before every turn went to the vendor as the conversation was written, so Mask secrets was defeated on every one; it now goes masked, the same prompt the turn it counts sends. An endpoint that doesn't implement counting (404/405/501, or a 400 that says so, in English or Chinese) falls back to the local estimate as before; a limited key or a broken connection yields to the next checked key and rests the one that failed, as a generation would, while a client's own cancellation rests nothing; and a real error — a wrong key, a prompt past the model's context, an image it won't take — reaches the agent. The gateway tests are isolated from the machine now (a temp HOME, inert stubs for the sign-in CLIs and the keychain) so a cache that outlives a test can't reach a real login, and the redaction tests' cold starts run in parallel. (#103)
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-09-27 18:58:23 +08:00
yetone 497f2cac6e ci: Windows compiles the tests rather than running them — they fake a home through $HOME, which Windows doesn't read 2026-09-25 02:11:01 +08:00
yetone fb258266ee ci: vet and test on Linux, macOS and Windows for every push to main and every pull request, and build the terminal-only magpie 2026-09-25 02:08:26 +08:00
yetone 6c99ab01ef Open source under MIT; the site shows third-party models in every agent
The site leads with what magpie is for: Codex on DeepSeek, Claude Code on
Kimi. New screenshots (Codex's picker, the panel, Providers), a diagram of
the gateway, shared subscriptions, a light/dark/system theme switch, a new
OG image, and links to the source.
2026-09-24 02:16:29 +08:00
yetone 0bcb2cc26c release: a v* tag dispatches the build to yetone/magpie-releases 2026-09-24 01:09:59 +08:00