Commit Graph
7 Commits
Author SHA1 Message Date
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