1ccacad63281094de8a3372d5a507d38f9969e5c
216
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
13a9f1263a |
plugins: Discover counts who uses and likes each plugin
Discover showed npm's weekly downloads, which CI, mirrors and magpie's own keepMovedCurrent updates inflate. Now each card and the hero say how many people use a plugin, counted by magpie itself, and a plugin's page has a like. - The daily stats send (stats.Send) also POSTs usemagpie.ai /api/plugins/report with the install id and the installed, switched-on plugins Discover lists, by their Discover key: the npm name, or github:owner/repo for a repository tagged magpie-plugin (plugin.Public). A folder, a private repository or an unlisted package is never named. It goes only while "Share the agents, providers, models and plugins I use" is on (noUsageStats), and only where the day's event goes at all (Count me as a user, DO_NOT_TRACK, MAGPIE_NO_STATS, release builds). - site/pluginstats.js on D1 magpie-plugins: users are the ids that reported a plugin in the last 7 days, reports drop after 30 days, a caller's address is kept only as a hash for an hour (60 asks an hour). /api/plugins/stats carries no id and is cached for an hour. - A like (POST /api/plugins/like through the GUI's /api/plugins/like) is taken only for a plugin installed and on here, can be taken back, and is kept in plugin-likes.json. - "Most liked" sorts by likes once a plugin has 20, below that by GitHub's stars. - plugincounts.js is loaded with the Plugins page, not the core, and redraws the cards only when the counts changed. - The privacy text follows: README.md, README.zh-CN.md, docs/reference.md, the site's privacy and start pages in en, zh and ja, llms-full.txt, and the Privacy switch's label and description in every language. Run at this tree (on origin/main |
||
|
|
065ca02c28 |
provider: Fireworks Nexus preset, Nexus Auto on all three APIs (CNSA0422 on X)
Fireworks Nexus is an account and plan of its own (nexus.fireworks.ai, Pro $8, Team, Enterprise) on the platform's /inference endpoints, which speak chat completions, Responses and Anthropic messages (docs.fireworks.ai/nexus/apis-and-sdks). Its keys are made at nexus.fireworks.ai/settings/api-keys; a platform key carries no Nexus plan. The new preset fireworks-nexus (Add sheet tile "Nexus", the Fireworks logo) sets all three endpoints and lists only `auto`: Pro and Team refuse an open model named directly with a 403 (nexus/open-models), so the platform's /models would offer models the plan refuses, and no list is asked for. Enterprise users type their open models in, or set a models URL. The editor offers x-anthropic-api-key and x-openai-api-key, the headers Nexus Auto takes the user's own Claude and OpenAI keys in. No usage API is documented (only the nexus.fireworks.ai/usage dashboard), so there is no usage card. READMEs (en, zh) and docs/reference.md list it. Run (mote): go test -run 'TestFireworksNexus|Preset' ./internal/provider ok at the pushed head; go test -count=1 -timeout 45m ./internal/provider ./internal/gui ./internal/catalog at the pre-rebase base: provider and catalog ok, gui red only in the real-window AppKit tests killed at their deadline under mote's load (TestCoveredWindowStaysUp, TestClosingWindowMarksPageOutOfSight, TestPanelHiddenByWailsMarksPageOutOfSight; #2645, #4924, #4125). gofmt clean; go vet darwin, linux (nogui) and windows of internal/provider. Broken by hand: without NoList TestFireworksNexusPreset goes red, the fake platform list's accounts/fireworks/models/glm-5p3 listed and its /models asked. Not tried: a real Nexus key (none here), so neither `auto` on each API, the header passthrough, nor what /models answers for a Nexus key; the `auto` context window is left to the catalog (Nexus CLI writes 1M/131K). GUI suite not run: presets reach the Add sheet as data and no GUI file names a preset list. |
||
|
|
0baa223ec9 |
agent: Kun, magpie as a provider connection through its runtime API (zhongxingyuyes on X)
Kun (KunAgent 0.4.5, Electron, com.xingyuzhong.deepseekgui) keeps its
model providers in ~/.kun/data/model-connections.v2.json (or
$KUN_DATA_DIR) and changes them only through its runtime's admin API,
whose address and token are in runtime.json. magpie wires Kun by
calling that API while Kun runs:
POST /v1/model-connections/connect the magpie connection
PATCH /v1/model-connections/:id models, gateway address
POST /v1/model-connections/select the default model
DELETE /v1/model-connections/:id off
POST /v1/provider-config/transactions/preview, then commit
off when magpie's connection is the default: Kun refuses a
plain DELETE of the connection its default names, so the
transaction clears the default and removes it in one step,
and the default the user had before is put back.
When Kun isn't running, wiring says "open Kun, then try again"; the
file is never written behind Kun's back. Kun joins the agent list,
desktop-app detection, the env guard, the icon set (kun.png), the
READMEs and docs/reference.md and docs/subsystems/agent-wiring.md.
Run:
- WSL (Ubuntu 24.04), at the rebased head: go test -tags nogui
-run 'Kun|ListsModels|Picker|Spelled|HandWired|Sync|Drift|ListOnly|
Moved|LAN|Proxy' ./internal/agent ./internal/agentenv ok;
./internal/library ok; ./internal/gui -run 'Icon|Budget|CSS|I18n|
Picker' ok (agentenv: no tests match the filter).
- Windows (win-run): go test -run 'Kun|ListsModels|Picker|Spelled|
HandWired|Drift|ListOnly' ./internal/agent ok. CGO_ENABLED=0 go vet
for windows (agent, gui, agentenv), darwin nogui (agent, agentenv)
and linux nogui (agent, agentenv, gui): clean. gofmt -l clean.
- GUI (WSL, chromium + webkit): i18n-keys, i18n-en-no-cjk,
icon-one-tone, routing-client-icons, icon-tile together 63/63 at
this head. An earlier run at the pre-rebase head was 60/63, the 3
reds icon-one-tone's "Open Design one-tone ... Plugins page"
(chromium), which passed 48/48 alone there and at origin/main: a
load red (#5425).
- Real Kun 0.4.5 (Linux build, sandbox HOME, `kun serve`): connect,
a second model, Sync, restart, off. `kun run`
finished a turn through the gateway (POST /v1/chat/completions,
Bearer magpie-kun, reply "hello from magpie"). Off restored the
previous default, and with no previous default Kun was left with
none and no magpie connection.
Broken by hand: off through the plain DELETE again. The fake Kun now
refuses it as the real one does, and TestKunFromNothing and
TestKunFollowsTheGateway went red with "Deleted connection still has
references: default.providerId"; green with the transaction.
Not tried: Kun's desktop window itself (the runtime was driven
headless); macOS (mote refused SSH all session); `kun run --model`
(run uses its own default model, not the registry's default, so a
CLI run picks magpie's model only with --model).
|
||
|
|
6a450c4982 |
agent: Shelley, magpie's models as its custom models (on X, tweet 2120109384315658393)
"Can support Shelley?" Shelley is boldsoftware/shelley (Apache-2.0, Go,
`shelley serve`). It keeps models and profiles in its SQLite database,
not in a config file, so magpie talks to a running Shelley through the
same API its own Models and Profiles pages use, on the Unix socket it
opens for its CLI ($SHELLEY_SOCKET, else shelley.sock / shelley-N.sock in
$XDG_CONFIG_HOME/shelley or ~/.config/shelley; read from its source).
- Connect: each magpie model is a custom model (POST /api/custom-models,
provider_type openai, endpoint = the gateway's /v1, Shelley's own
gateway key, model_name = the catalog id, reasoning/images/max_tokens
from the catalog). Picking one makes it the default profile's model
(PUT /api/profiles/{name} with the whole profile, as the API requires)
and clears a thinking level the model can't take.
- The user's own values: the profile's model and thinking level are
stashed once and put back on Disconnect (to the server's default if
that model is gone); only the custom models magpie made (ids stashed)
are deleted, so a model the user pointed at the gateway by hand stays.
- Sync re-points magpie's models when the gateway port moves; Check names
a model left on an old address. Shelley not running is an error on a
pick and nothing on Sync/Check; turned off while Shelley is uninstalled,
the takeout is stashed and done when Shelley answers again (Alma's way).
- A notice: new conversations start on the pick, an open one keeps its
model. i18n for zh, zh-TW, ja, de.
- Icon: Shelley's own S mark from its assets, one tone. README (en, zh),
site index, docs/reference.md, docs/integrating.md, site integrate
pages (en, zh), docs/subsystems/agent-wiring.md.
- Library: listed as "not looked at (#5897)" like the other new agents.
- Shelley has no Windows build, so there is no Windows or WSL wiring.
Run (mote refused SSH for the whole session, kex reset, so runs went to
the Linux VM and the Windows box):
- Real binary: shelley v0.1718.926152762 linux_amd64 (sha256 66cb5acb…
checked) in a sandbox HOME/XDG_CONFIG_HOME/-db on the Linux VM, with a
throwaway test driving it against a fake OpenAI upstream at
MAGPIE_ADDR: connect made custom model glm-4-6-… and the default
profile's model; POST /api/conversations/new sent two
/v1/chat/completions with model=relay/glm-4.6, auth magpie-shelley,
UA Shelley/58d5f200; disconnect left the profile as before and no
custom models. Check "" and Drift nil while connected.
- Linux (wsl-run, nogui): go vet ./internal/agent ./internal/agentenv
./internal/library; go test ./internal/agent ./internal/agentenv
./internal/library ./internal/profile ./internal/sessions: ok except
TestGrokInstalled (#3548, red on base too) and, before its fix here,
TestEveryAgentInLibrary. internal/cli times out there in
TestEveryAgentFieldNameWritesNothing (43m, the #5234 class).
- Windows (win-run): go vet ./internal/agent ./internal/agentenv;
GOOS=darwin and GOOS=linux -tags nogui vet; the Shelley, applied,
rewire, disconnect, mark and kept tests: red only in
TestAppliedOfParsesAnUnchangedFileOnce (#5950),
TestAsideOfflineDisconnectRestoresWithoutDaemon (#5951) and the #4786
allocation tests, all red on base
|
||
|
|
c2c2c82ca8 |
agent: Tuanjie Cowork, a magpie provider and model in its Custom Models (Charles24209792 on X)
Tuanjie Cowork (Unity China's coworker app, dev.codelycowork.desktop,
2.1.6-stable) keeps the user's own models in ~/.codely/settings.json:
customModelProviders {id, name, baseUrl, apiKey, authType} and
customModels {id, model, providerId, displayName, roles, wireApi,
supportsMultimodal}, read afresh on every lookup. Read from the app's own
core (tZ/oE for the file, Mwi for a session's OPENAI_BASE_URL/KEY, BOe
for the model list, rha/sha for its startup migrations).
magpie adds a provider and a model of its own, both id "magpie": the
gateway's /v1 with Cowork's own magpie key, the model picked, wireApi
chat. The user's providers and models and every other key stay as
written; a name or roles given magpie's entries in Cowork are kept when
the model changes. Off takes both out, and the file too when magpie made
it and nothing else is in it. A provider or model with id magpie that is
the user's own is left alone, with an error. Which model a chat is on is
Cowork's own per-workspace pick, which magpie doesn't write; a notice
says to pick "<model> (magpie)" in its model menu while it runs. Skills
go to the shared ~/.agents/skills, which its core scans. Icon from the
app's icon.icns. Lists, READMEs, reference, agent-wiring doc, i18n.
Run:
- go test ./internal/agent ./internal/library ./internal/gui on mote;
TestTuanjieCowork* and TestHandWiredMagpieProviderSiblings on Windows
(win-run).
- gofmt; go vet darwin, linux -tags nogui, windows.
- GUI, chromium and webkit: i18n-keys, i18n-en-no-cjk,
agent-notice-lang, gui-de, gui-ja, gui-zh-tw, icon-one-tone,
icon-tile, routing-client-icons, usage-agent-filter-icons,
agent-connect, agent-models, agent-layout.
- Cowork's own code on magpie's output: its tZ, oE, rha, sha, cE, KGa,
Mwi, kOe and BOe, extracted from the 2.1.6 core, run in node on the
settings.json magpie wrote (with the user's own provider, and fresh).
Its migrations leave magpie's entries; cE("magpie") finds the model,
the picker label is "deepseek/pro (magpie)", a session gets
OPENAI_BASE_URL http://127.0.0.1:3425/v1 and magpie's key, the list
URL is /v1/models, and the user's glm-4.5 is still there.
Where: the packages, vets and GUI files above ran on mote at b834dc2a7
(this change on
|
||
|
|
5e3f14f21f |
agent: Paimon, magpie's models through its litellm provider (ditangongyuan on X)
Paimon (aisk/paimon, `uv tool install paimon`) is a terminal coding agent on pydantic-ai. Read at 7f7fa51 (config.py, llm.py): its settings are one JSON file, $PAIMON_CONFIG_HOME/config.json, else ~/.config/paimon/config.json on every OS. "model" is provider:name, and "providers" keeps each provider's api_base and api_key. magpie connects it through pydantic-ai's litellm provider, an OpenAI-compatible proxy that profiles a vendor/model name by its vendor, as magpie's ids are spelled, and which Paimon's login never offers: model = litellm:<catalog id>, providers.litellm = the gateway's /v1 and magpie's key for Paimon (0600, as Paimon writes it), and compaction.context_window = the model's window. Paimon compacts against that only for names genai-prices doesn't know, which magpie's ids aren't; for a model whose window magpie doesn't know it gets the user's own back, never the last model's. What the user had in the three keys is stashed and put back on Disconnect (or `magpie paimon default`); the rest of the file is untouched, and a file magpie made goes again. A model picked in Paimon itself while magpie's provider stays is the user's from then on. Requests are told apart by Paimon's paimon/<version> User-Agent. WSL distros, the PAIMON_CONFIG_HOME isolation, notices in every language, icon, READMEs, docs/reference.md, agent-wiring.md and the site's list come with it. Run: mote refused SSH all session (kex reset), so the Linux runs went through wsl-run (magpie-desktop) and Windows through win-run: - go vet: linux -tags nogui, GOOS=windows, GOOS=darwin -tags nogui on internal/agent, agentenv, library: ok. gofmt -l: clean. - go test -tags nogui ./internal/agent/... agentenv library gui cli (WSL, base |
||
|
|
9c39edb92c |
agent: Avibe, magpie as a model source through its Model Hub (alex_metacraft on X)
Avibe (avibe-bot/avibe, avibe-os on PyPI, the `vibe` CLI) runs its own
agent, Vibey, and Claude Code, Codex and OpenCode, all on models from its
Model Hub. Its sources live in model_hub.sources of config/config.json in
$AVIBE_HOME (else ~/.avibe, else a legacy ~/.vibe_remote), but a source
can't be written there by hand: its key is sealed in the hub's credential
store and Avibe puts it into its agents' route chains as it is made.
So the Avibe row adds "magpie" the way Avibe's Models page does, through
its internal API (POST /internal/model-hub on state/dispatch.sock, or on
Windows the loopback port + bearer of runtime/control-ipc/endpoint.json):
create_source with kind api_key, vendor custom, base_url the gateway's
/v1, key agentKey("avibe"), protocol openai_chat and save_unverified.
Avibe then lists the models from /v1/models and adds the source to
Vibey's, Claude's, Codex's and OpenCode's chains itself.
- openai_chat, not openai_responses: for a Responses source Avibe's
CLIProxyAPI runs Codex's executor, which sends codex-tui headers the
gateway would take for Codex.
- Off is delete_source with force, sent again with the would_remove_hops
and would_interrupt Avibe answers, as its page confirms them. Sync is
refresh_source the same way; on a moved gateway the source is made
again (the key goes with the address; patch_source can't change it).
- The source id is stashed; a custom source at the gateway's /v1 counts
as magpie's too and is stashed once seen.
- Every change needs Avibe running; otherwise the switch says to run
`vibe start` (errAvibeDown). Nothing is written to config.json.
- A sync moves the source only from the gateway's own address on an
older port (avibeMoved). One the user pointed at a NAS's or the LAN's
magpie, a local proxy's route, or a WSL distro's way to Windows stays,
as kept.away keeps every file-written agent's; a Rewire after a port
move sets it again through the field's Set.
- Every test of the package but Avibe's own finds an Avibe running for
each home (runningAvibe, served in-process), so the tests that connect
every agent (gateway moved, LAN and proxy addresses kept, drift,
ListOnly) take Avibe in too.
- The logo is a tile solid to its edges, so it joins app.css's tile rule
(icon-tile.test.cjs went red without it).
- AVIBE_HOME joins agentenv and the ~-expanding path vars (Avibe expands
it). Icon from Avibe's assets/logo.png (MIT), 64px.
Run:
- Real Avibe 3.2.5 (uv tool install avibe-os) in a sandbox HOME in WSL
magpie-desktop, with a fake OpenAI server as the gateway: magpie's own
code (a throwaway test, AVIBE_HOME + MAGPIE_ADDR) connected it, Avibe
discovered both fake models with "Authorization: Bearer magpie-avibe"
and put the source in vibey/claude/codex/opencode chains; Sync
refreshed; a gateway move to :3592 made the source again there and
stashed the new id; a second run found the source by address alone
and still followed the move; off removed it (list_sources []).
Earlier, by hand: Anthropic /v1/messages and /v1/responses through the
hub reached the fake as chat completions.
- wsl-run, at this head rebased on origin/main
|
||
|
|
021a6e1fd9 |
readme: sponsor logos at 200x50, up from 144x36
The owner asked for bigger sponsor logos in the README. Every logo in the en and zh Sponsors rows takes the same size, so three still fit a row at GitHub's ~830px README width. Checked: rendered the en Sponsors rows at 830px in Chromium (Playwright on magpie-desktop; mote refused ssh); three per row, no wrap. No test reads these sizes. |
||
|
|
617200a320 |
providers: Vercel AI Gateway is a preset (Archie627 on X)
Archie627 said magpie has no Vercel AI Gateway. It is now a preset in Add: Chat Completions and Responses at https://ai-gateway.vercel.sh/v1, Anthropic Messages at https://ai-gateway.vercel.sh (Vercel takes the key as Bearer there too), models.dev's "vercel" catalog, the vercel icon the vercel-jev decision preset already used, and its API keys page. An OpenCode or URL import at that host becomes the preset. READMEs and the site's import pages (en, zh, ja) list it. Its /v1/models (public, 505 rows today) marks each row's "type". Read as before, the decision models (liquid/d1, typesafe-ai/jev) and realtime voices showed as chat models, ElevenLabs voices were dropped, and transcribers (elevenlabs/scribe-v2) showed as chat. At Vercel's host alone (catalog.VercelGateway) the type now decides: evaluation and realtime rows are left out, speech, transcription, embedding and reranking rows get their Serves, image rows draw and video rows film. The 48 "-batch" ids are left out: Vercel's docs say "Synchronous requests don't accept -batch IDs". context_window gives the window. Another host's "type" is read as before. Run: TestVercelPreset and TestVercelLiveList (real rows from Vercel's list in testdata, served through an httptest server, no network); go test ./internal/catalog ./internal/provider on Linux (wsl-run) and macOS (mote, -run Vercel|Preset|Import before mote stopped taking SSH); gofmt; go vet linux, windows, darwin (CGO off). Broken by hand: VercelGateway returning false turns TestVercelLiveList red (decision, realtime, batch and transcriber rows back in chat); the -batch skip alone turned off turns it red too. Not tried: no Vercel key, so no real chat, Responses or Messages call; only the public GET /v1/models. No GUI file reads the preset list by name (the Add sheet is built from /api/presets), so no GUI run. |
||
|
|
8cc4bd7e3c |
agent: Craft Agents, through a keyless connection at the gateway (springg1998 on X)
Craft Agents (lukilabs/craft-agents-oss, thecraftagents.com) keeps its LLM connections in config.json under $CRAFT_CONFIG_DIR or ~/.craft-agent (paths.ts, storage.ts, llm-connections.ts, v0.15.8). magpie adds one connection: slug magpie, providerType pi_compat, authType none, baseUrl at the gateway's /agent/craft-agents/v1, customEndpoint.api openai-completions. Its models are the ones picked for it, and defaultModel is always one of them, because Craft resets a default that isn't in the list to the first. magpie makes it defaultLlmConnection. The user's default is stashed (as JSON, "" for none) and put back on off when that connection still exists. A name the user gives magpie's entry stays, and a sync with nothing to change writes nothing. A config.json with no workspaces list is one Craft doesn't load, so magpie never creates one: open Craft once first. Picking one of the user's own models removes magpie's entry and sets that model on their default connection. Sessions keep the connection they started on, so the notice says new sessions use it (zh, zh-TW, ja, de). Detected by ~/.craft-agent, Craft Agents.app (com.lukilabs.craft-agent), or %LOCALAPPDATA%\Programs\@craft-agentelectron\Craft Agents.exe (per-user NSIS; the GUID is the UUID v5 of the appId, derived the same way as dsh's known one). Skills go to ~/.agents/skills. CRAFT_CONFIG_DIR is in agentenv.Vars. Icon from Craft's own icon.svg (#9570BE). README, reference, agent-wiring and site list it. Run on mote, first on origin/main |
||
|
|
ece12b370d |
search: TinyFish is a built-in search API (Niapyaya on X)
Niapyaya asked on X for TinyFish (tinyfish.ai) among the search APIs. TinyFish has a plain Search API beside its browser agents, so it is added as vendor "tinyfish", following Yuanbao Search ( |
||
|
|
d109ec8da8 |
agent: miniQ, its provider on magpie's gateway (xiancrong on X)
miniQ (LeadingThink/miniQ, 0.1.213) is a desktop coworker and a `miniq`
terminal, both clients of one miniq-daemon. Its model is one provider in
<data dir>/settings.json, {baseUrl, apiKey, model, apiProtocol}: the data
dir is $MINIQ_DATA_DIR, else the folder miniq-data-dir.json names, else
%LOCALAPPDATA%\miniq or ~/.local/share/miniq (macOS too).
Picking one of magpie's models writes the provider as the gateway's /v1,
magpie's key for miniQ (it sends no User-Agent of its own), the catalog id
and apiProtocol chat_completions ("auto" guesses a protocol from the model
name). What the user had is stashed whole and put back on Disconnect; the
rest of settings.json is left alone. A settings.json magpie made is 0600
and goes again when magpie steps out. The daemon reads settings.json once
and writes its copy back on every change, so a running one is told too:
settings.update over the WebSocket daemon.json names, as miniQ's own
Settings does, which also moves open chats. Notice compares the daemon's
settings.get with the file and asks for a restart when they differ.
"On magpie" is known by magpie's key, so a moved port or a proxy in front
of the gateway is told apart by Check (baseUrl and apiKey). WSL: the
distro's ~/.local/share/miniq. Icon, i18n (zh, zh-TW, ja, de), READMEs,
reference, site, MINIQ_DATA_DIR in agentenv.Vars.
Run:
- At the pushed head, rebased on
|
||
|
|
5a02bf8c14 |
agent: mu, Pi with a judgment kernel, wired in ~/.mu/agent (xteam3301 on X)
mu (github.com/qybaihe/mu, npm mu-agent, the mu command and the mu
desktop app) is Pi 1.4.0 with a judgment-kernel extension. Its
kyrn/bin/mu.mjs starts Pi on its own agent folder, so Pi's settings.json
and models.json live in ~/.mu/agent, and the desktop app runs the same
Pi on the same folder. magpie now wires it as it wires Pi.
- agent: mu (piLikeKeyed). Its folder is found as mu.mjs finds it:
$MU_AGENT_DIR, $KYRN_AGENT_DIR, $MU_CODING_AGENT_DIR,
$KYRN_CODING_AGENT_DIR ("~" expanded), else ~/.mu/agent, or
~/.kyrn/agent while ~/.kyrn is a folder and ~/.mu isn't. Its requests
say pi/<version>, so the provider's key magpie-mu names it. The alias
is mu-agent. Its judge (~/.mu/mu.json) is left alone.
- `mu` is also maildir-utils' command (brew, distros). A mu on PATH
that neither is nor names mu.mjs / mu-agent is not taken for it
(notMuAgent).
- Gemini models stay on Chat for mu, as for Pi and StepCode (piAsked).
- WSL kind at ~/.mu/agent (found by its folder, not the command); CLI
update through npm mu-agent; the desktop app (io.github.qybaihe.mu,
mu.app, %LOCALAPPDATA%\Programs\mu\mu.exe, /opt/mu).
- agentenv and appdir know the four variables.
- library: mu's AGENTS.md / AGENTS.override.md, its mcp.json (Pi's
native format) and skills in its folder; it reads ~/.agents/skills.
- GUI: a one-tone icon. Default in its model picker says it clears the
default and mu picks one itself (PICKS_ITSELF).
- docs: READMEs, reference.md, agent-wiring.md.
Run (mote, at this tree before the rebase):
- gofmt -l internal/ clean; go vet darwin, GOOS=linux -tags nogui and
GOOS=windows of agent, library, appdir (and agentenv on darwin): clean.
- go test -count=1 ./internal/agent ./internal/library ./internal/appdir
./internal/agentenv ./internal/usage: ok (agent after its maildir
fixture stopped using testenv.Program, which refuses a non-script).
New: TestMu, TestMuDir, TestMuNotMaildirUtils, TestMuTarget; mu added
to the handwired, spelled, Pi scope, scope-gone and Gemini-on-Chat
lists.
- Windows (win-run on xiaomi-gpu): go test -run 'TestMu|TestPiScope|
TestScopeGone|TestHandwired|TestSpelled|TestPiFolderKeepsGemini'
./internal/agent ./internal/library ./internal/appdir: ok.
- Real mu-agent 0.3.9 (Node 22.22.0) on mote in a sandbox HOME, a
sandbox gateway on 47822 over a fake OpenAI upstream: `magpie agents`
found mu with the user's deepseek model; `magpie mu magpie/fakeup/m1`
wrote defaultProvider magpie and providers.magpie with key magpie-mu,
keeping the user's deepseek provider; `mu -p ping` answered "pong from
fake upstream" (upstream saw POST /v1/chat/completions, model m1,
UA pi/0.3.9); `magpie usage today` counted the call under agent mu;
`magpie mu default` put settings.json and models.json back byte for
byte (cmp).
- GUI, chromium and webkit: pi-default-note (with mu added),
icon-one-tone, icon-tile, mono-icon-redraw, routing-client-icons,
usage-agent-filter-icons, i18n-keys, i18n-en-no-cjk, agent-connect,
agent-models, agent-layout: 88 of 88.
- Rebased onto
|
||
|
|
b922e51685 |
agents: nanobot gets magpie as a provider of its own (Niapyaya on X)
nanobot (HKUDS/nanobot, pip install nanobot-ai) is now an agent magpie connects. Its config is read from its own source (5c72ced, 0.4.1): ~/.nanobot/config.json, camelCase or snake_case keys, any extra key under providers an OpenAI-compatible endpoint whose name is stripped from the model. magpie adds providers.magpie (apiBase at the gateway's /v1, its key, and extraHeaders User-Agent nanobot), and sets agents.defaults provider magpie, model magpie/<id> and contextWindowTokens when the window is known. What the user had there, both spellings, and a modelPreset that would go over magpie's model, is stashed and put back on disconnect, the window as a number. A file magpie made goes again. Also in WSL distros, with a notice in every language, the icon (a tile in app.css's rule), READMEs, site list, docs/reference.md and agent-wiring.md. Run: - real nanobot 0.4.1 on mote in a sandbox HOME (~/nbsb), a sandbox gateway on 47812 over a fake OpenAI upstream: `magpie nanobot magpie/fakeup/m1` wrote the config and kept the user's relay provider and channels; `nanobot agent -m ping` answered "pong from fake upstream"; the upstream saw POST /v1/chat/completions, model m1, UA nanobot; `magpie nanobot default` put relay/glm-4.6 back exactly. - go test ./internal/agent ./internal/gui ok; ./internal/gateway and ./internal/cli -run 'Client|UA|Agent|Empryo' ok; go vet darwin, linux -tags nogui, windows ok; gofmt -l clean. - GUI, chromium 110/110 and webkit 65/65: i18n-keys, i18n-en-no-cjk, agent-notice-lang, gui-de, gui-ja, gui-zh-tw, icon-one-tone, icon-tile, routing-client-icons, usage-agent-filter-icons, agent-connect, agent-models, agent-layout. Broken by hand, each red in TestNanobot: modelPreset not stashed (preset left over magpie's model), the made file not removed, and the window restored as a string. Not tried: a real vendor behind the gateway (fake upstream only), nanobot's long-running `nanobot gateway`/WebUI picking the change up live, and WSL. |
||
|
|
d1f8d8aae7 |
agent: Cherry Studio adds magpie through its providers link (plugins#865)
Cherry Studio (CherryHQ) shows on the Agents page, and with
`magpie cherrystudio`, on macOS, Windows and Linux. Its row is the link
its main process takes, cherrystudio://providers/api-keys?v=1&data=, with
the gateway at <gw>/v1 as an OpenAI-compatible provider named magpie and
the named key agentKeyAt("cherrystudio"). Cherry Studio asks the user to
confirm it. magpie writes nothing into its store. "Added" is read
untouched from its 2.x database (Data/cherrystudio.sqlite, user_provider),
in the default userData and every one boot-config.json moved it to. A
database or boot-config that can't be read, or a 1.x userData (Local
Storage, no database), is unknown. The data is standard base64, because
Cherry Studio swaps raw + and / before parsing and back after. /api/open
lets that link through. aionui's database status is generalized into
dbStatus{has} so both apps share it. Icon: Cherry Studio's own logo, not
cherryin-color (a different product).
Run (mote, at this change on origin/main c66cdbea9; then rebased on
|
||
|
|
32fc5809e1 |
agents: OpenMausBot gets magpie as an engine of its own, written as its own Claude endpoints are (a user on X)
A user on X asked for OpenMausBot (github.com/milind-soni/OpenMausBot,
read at 516ca75; released 0.1.145). Its bots run on engines from
`instances` in ~/.openmausbot/config.json ($OMB_DATA_DIR,
server/config.ts:713). Without this, a Claude bot reached magpie only
through ~/.claude/settings.json, and its picker listed Claude's static
models alone: OpenMausBot doesn't read the model from env
(readClaudeModelCatalog, claude.ts:296-316).
- openmausbot.go writes `instances.magpie` in the shape of OpenMausBot's
own "Claude endpoint" (newClaudeEndpoint, claude-endpoints.ts:91-139):
- driver claudeAgent, access custom
- config.configDir is <data>/providers/magpie. Given that,
OpenMausBot starts Claude Code with that CLAUDE_CONFIG_DIR and
strips account keys the engine doesn't set (claudeEnvironment,
claude.ts:111-136, 158-179), so the engine owns its routing.
- requireApiKey
- ANTHROPIC_BASE_URL, AUTH_TOKEN, API_KEY and MODEL point at the
gateway
- endpointModels holds magpie's models, kept to the ids
CLAUDE_MODEL_ID accepts. One bad id makes OpenMausBot refuse the
whole engine (claude.ts:636).
- A non-empty `instances` is the whole fleet (config.ts:1173). With
none saved, magpie writes DEFAULT_FLEET (instance-fleets.ts) beside
magpie, stashed as openmausbot.fleet. Off takes the fleet out again
if the user hasn't changed it.
- What stays the user's: the engine's name, a model they picked from
the list, their other env and an inherited `cli`.
- Check reports the base URL drifting away from the gateway.
- OpenMausBot reads config.json once at start (index.ts:780), and an
engine edited in it writes back the fleet it holds
(routes/instances.ts:132, config.ts:997-1012). So Set is refused
while it runs (errOMBRunning), and the notice asks to quit it first,
since Windows can't tell.
- ListOnly, ListsModels, OMB_DATA_DIR in agentenv. The icon is
OpenMausBot's build/icon.svg (Apache-2.0).
- i18n in zh, zh-TW, ja and de. Docs: reference, agent-wiring, both
READMEs.
- Codex bots use ~/.codex (codex.ts:373-386), which the Codex wiring
already covers.
- The agent package's TestMain holds ombRunning false. An OpenMausBot
open on the test machine refused every test that turns magpie on for
each agent: my own sandbox OpenMausBot on mote turned
TestSyncKeepsAnAddressOnAnotherMachine, TestListOnlyAgentsReadConnected
and TestReverseProxyIsStillMagpie red. With a process named
openmausbot running, they now pass. LiveAgent's, OpenPencil's and
NewMax's running checks have the same hole and are left to #5587.
Run (all on mote):
- gofmt -l: clean
- go vet ./... on darwin, GOOS=linux -tags nogui and GOOS=windows: ok
- go build for the same three targets: ok
- go test -tags nogui ./... -timeout 45m at e1453a168 (this change on
origin/main
|
||
|
|
e6b9d1199c |
readme: Kimi's thanks sits just above the sponsor row
The owner wants the line up top: "Thanks to Kimi for supporting magpie
and the open source community" now sits between the badges and the
Sponsors (赞助商) label, centred like them, in README.md and
README.zh-CN.md. The Acknowledgements (致谢) section
|
||
|
|
218b38c596 |
readme: Kimi is thanked in its own section instead of the sponsor row
Kimi asked not to sit in a row of gateways. Its logo leaves the sponsor row in README.md and README.zh-CN.md, and an Acknowledgements (致谢) section before the license says "Thanks to Kimi for supporting magpie and the open source community", linked through the same /go/kimi/readme and /go/kimi-cn/readme redirects (both checked: 302 to kimi.ai/code and kimi.com/code with aff=magpie). The other five logos keep their order, three in the first row and two in the second. Run: no code changed; checked the rows' alt texts and both redirects. |
||
|
|
e17c6976b2 |
provider: Voyage AI preset, its embedding and rerank models (heatonz on Discord)
heatonz on Discord asked for Voyage AI, its embeddings and rerank. The gateway already had /v1/embeddings and /v1/rerank; what was missing was a way to add Voyage and have its models found there. - presets.go: `voyage`, a vendor with an API key at https://api.voyageai.com/v1 (docs.voyageai.com, keys at dashboard.voyageai.com). Voyage has no /models, so it is NoList and the preset names its models in two new PresetDef fields, Embeddings (voyage-4-large, -4, -4-lite, code-4, finance-2, law-2, 3-large, 3.5, 3.5-lite, code-3, code-2) and Rerankers (rerank-3, -3-lite, 2.5, 2.5-lite), as Voyage's docs list them on 11-06. Region gets Rerankers too. - models.go: planMedia marks each plan model with what it serves (catalog.Model.Serves), falls back to the preset's own lists when the provider has no region, and PlanRerankers / PlanRetrieval(kind) sit beside PlanEmbeddings. A NoList provider's ListAll has them too, marked, so catalog.Chat keeps them out of agents' lists, keys and Routing's chat pickers. - gateway: resolveRetrievalModel and servesKind look up the kind asked for (PlanRetrieval(kind)) and not only embeddings. Before this, a plan's embedding model named on /v1/rerank was sent there, and a plan's reranker was never found. - catalog.ServesOf: `voyage-*` is an embedding model (its ids have no "embed"), so Test, detection and a relay serving voyage ids know it. - test.go / gui providers.go: the retrieval-only Test fallback and the editor's "retrieval" count read PlanRetrieval as well. - docs/reference.md: a new "Embeddings and rerank" section with both routes' bodies (OpenAI's for embeddings; the Cohere/Jina/Voyage shape for rerank, top_n or top_k) and the Voyage preset. READMEs and the import docs pages (en, ja, zh) list it. Not served: Voyage's contextualized and multimodal embeddings (their own endpoints). A Voyage 4xx comes back as its raw {"detail": ...} body with its status (errorSaid has no "detail" reader). Tests (no network; a fake built from Voyage's documented request and reply shapes): TestVoyageEmbeddingsAndRerank (bare and provider ids, input_type/output_dimension and top_k/return_documents passed on, usage total_tokens recorded), TestVoyageModelsStayOnTheirRoutes, TestVoyageRefusalSaysWhy, TestVoyagePreset, TestVoyageTestAsksItsRetrievalAPIs, TestServesOf's voyage cases. Run on mote: go test -count=1 -timeout 45m ./internal/provider ./internal/catalog ./internal/gui ./internal/gateway. provider, catalog and gateway ok. gui has one red, TestMainWindowCorners/macOS_26_SDK, which is #3949 (red on macOS 27); this change doesn't touch AppKit. go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... ok. gofmt -l clean. Broken by hand: - resolveRetrievalModel/servesKind back on PlanEmbeddings: TestVoyageEmbeddingsAndRerank red (rerank-3: 404 "magpie knows no model"), TestVoyageModelsStayOnTheirRoutes red (voyage-4 on /v1/rerank answered 200). - the voyage- prefix out of ServesOf: TestServesOf and TestVoyagePreset red. Not tried: against the real API. No Voyage key was available, so the endpoints, auth and shapes come from Voyage's docs alone. Not tried in the GUI's Add sheet by hand, and not on Windows or Linux beyond vet. |
||
|
|
9d143eacab |
uninstall: install.sh --uninstall disconnects every agent first, a deleted magpie too
whimsical_wolf_15477 (Discord): after uninstalling magpie, Codex didn't go back to its own config. `install.sh --uninstall` deleted the magpie command and app and left every agent wired to a gateway that no longer runs: Codex kept openai_base_url (or model_provider = "magpie" and model_catalog_json) pointing at 127.0.0.1. A magpie deleted by hand undid nothing either, and `--purge` refused with no magpie left to run. - `magpie uninstall --keep-data` (uninstall.KeepData): every agent disconnected and its own values put back from stash.json, the service, autostart, shortcut, scheme and helpers removed, magpie's settings, providers and usage kept. - install.sh --uninstall runs `magpie uninstall --yes --keep-data` (--purge: `--yes`) before deleting anything, and stops if it fails. With no magpie of its own (deleted by hand) but magpie's config left, it fetches the newest release into a temporary folder, checks its sha256, runs that, and deletes it after. An older magpie without --keep-data gets the newest one for this too. A magpie on PATH that the script didn't install is left to its own `magpie uninstall`, and said so. - MAGPIE_UNINSTALL_SCRIPT=1: under the script magpie doesn't ask to delete a path that the script deletes next. - docs (en/zh/ja start.html #uninstall) and READMEs: what the line does, that it works for a magpie already deleted, and Codex's lines by hand. Run (WSL magpie-desktop; mote's disk is full, nothing run or deleted there): - go test -tags nogui -run "Uninstall|Help|TestKeepData" ./internal/cli/ ./internal/uninstall/: ok. node --test site/install.test.mjs: all pass. - The new install tests against the old install.sh: 5 red. Broken by hand (--keep-data case removed, Data() back in KeepData): TestUninstallKeepData and TestKeepData red. - Real e2e: magpie built from this tree, Codex wired in a sandbox HOME (not signed in, and ChatGPT signed in), magpie installed and deleted by hand; install.sh --uninstall with a local feed. config.toml's diff before wiring vs after is the [model_providers.magpie] table only (kept on purpose for threads started on magpie); model, effort, openai_base_url, model_provider and model_catalog_json are the user's again; settings kept. - gofmt -l clean; go vet GOOS=windows/darwin/linux (nogui) for the two packages; sh -n and dash -n install.sh. Not tried: macOS's zip path for a deleted magpie run for real (tests cover it with fakes), Termux, Windows (no install.sh there; docs say download magpie again and use Settings › Uninstall). The full internal/cli package timed out at 10m under WSL load in providers_unreadable_cli_test (not touched here); see the full suite record. |
||
|
|
c03dee7e3e |
agent: LiveAgent, magpie's models in its model picker (xiaoxiaofei. on Discord)
xiaoxiaofei. asked for LiveAgent (Stack-Cairn/LiveAgent, v2). LiveAgent 2 is a Tauri app that runs its models through K-brain, a Go backend it starts as `k-brain backend -data-dir <root>`; every provider lives in <root>/config.json (JSONC, Pi's provider shape). Root: $LIVEAGENT_HOME, else $K_BRAIN_HOME, else the folder ~/.liveagent/data-dir.json points to, else ~/.liveagent, on every OS (LiveAgent's data_home.rs and kbrain_backend.rs, K-brain's internal/config and internal/storage). Connect adds providers.magpie: type claude_code + api anthropic-messages (what LiveAgent's own settings write for an Anthropic-compatible provider), baseUrl the gateway root (K-brain appends /v1 and posts /messages with X-Api-Key), the key naming LiveAgent, activeModels null, modelOrder in magpie's order, models sorted by id with display name, window, output limit and input [text, image]. K-brain decodes with unknown fields refused, so only its fields are written. A default or compact model still K-brain's endpoint-less demo model1 becomes magpie's first; the user's own pick stays. Through a sync the user's name, the models they turned off, their order, K-brain's metadata and a model's own displayName stay; a new model is on and last; nothing to change writes nothing. A file K-brain wouldn't read as providers (not an object, providers not an object, top-level models, a bare provider) is left alone. Disconnect takes the entry out, puts picks back to K-brain's default, gives a file left with no provider K-brain's demo back (its CLI restores config.json.bak, which could hold magpie's, from a file with none), and removes a file holding only what magpie made. LiveAgent's backend holds the settings and writes them whole on any change, so a change is refused while liveagent or k-brain runs (macOS/Linux; the notice says to quit it first, in every language). Logo: the app's own 64px icon (src-tauri/icons/64x64.png, MIT) in an SVG. Run on mote at this tree: - gofmt -l clean; go vet ./internal/agent ./internal/agentenv for darwin, linux (nogui) and windows - go test -tags nogui ./internal/agent -run 'LiveAgent|GatewayKey|ListsModels' ok; ./internal/agentenv ok; ./internal/gui: only TestCoreScriptBudget red, which is red on its base too (app.js untouched here; #5139) - GUI icon-tile, i18n-keys, agent-notice-lang, gui-zh-tw, gui-ja, gui-de: Chromium 27/27, WebKit 27/27 Broken by hand on mote, each red: the user's activeModels not kept (TestLiveAgentProvider "activeModels after sync [], want [...]"); the demo provider not put back (TestLiveAgentMakesItsFile "emptied file"); the demo default not replaced (TestLiveAgentProvider, TestLiveAgentMakesItsFile). Real use on mote (sandbox HOME and LIVEAGENT_HOME, this magpie on 127.0.0.1:3562, a fake Anthropic upstream on 3561, LiveAgent 2.0.5's bundled k-brain from the release dmg): - k-brain backend's first start wrote config.json as {}; magpie liveagent magpie then wrote providers.magpie and the default pick - `k-brain run "Reply with exactly: pong"` (K-brain's CLI, same config and routing code) answered "pong"; the upstream saw POST /v1/messages from magpie - the backend LiveAgent starts listed magpie's model in /v1/models with it as the default, and its /v1/text/generate answered "pong" through magpie - with k-brain running, connect/disconnect were refused with the notice; after it quit, disconnect removed the file magpie made Not tried: LiveAgent's window itself (its model picker was not opened; the backend's API it reads was); LiveAgent on Linux or Windows; a real vendor reply (fake upstream). |
||
|
|
5f0a84a003 |
agent: Air in JetBrains IDEs gets magpie's Magpie agent in ~/.jetbrains/acp.json (Jumy on Discord)
Jumy asked for the "air-plugin" new in IntelliJ IDEA 2026.3 (Settings ›
AI › Air). magpie's air agent wrote the Air app's acp.json, in
~/Library/Application Support/JetBrains/Air, which the IDE plugin never
reads: the plugin (com.intellij.air, air-plugin-262.8665.521-mac-arm64
from JetBrains Marketplace) loads its custom ACP agents in
AcpConfigurationLoader (intellij.air.backend.acp.runtime) from
user.home/.jetbrains/acp.json on every system, the file AI Assistant's
custom agents use too; AgentServerConfig takes command, args, env,
use_idea_mcp and use_custom_mcp. The standalone app (Air-262.1037.14,
Fleet-based) reads acp.json from its own configs folder
(genericAcpConfigPath), so the two are separate files.
Air's own agents have no base URL: JetBrains AI, the agent's own login,
or an Anthropic, OpenAI, Gemini or OpenRouter key under AI › Air ›
Accounts. So the IDE gets the same route as the app: a new air-ide agent
("Air (JetBrains IDEs)", aliases air-plugin, air-in-ides) writes a
Magpie entry (opencode acp, OPENCODE_CONFIG naming magpie-opencode.json
beside acp.json) and nothing else; the user's agents and
default_mcp_settings stay, and disconnecting takes out that entry and
that file. air and air-ide share airAt. air-ide shows for an IDE config
folder of 2026.2 or later (the plugin is bundled from 2026.3), or with
its entry already in acp.json. Notice in en, zh, zh-TW, ja, de; README,
reference and agent-wiring rows.
Run at this head (rebased on
|
||
|
|
066ece93bb |
provider: LongCat is a vendor preset, Meituan's LongCat API platform with chat completions, Responses and Anthropic messages (hoobnn on Discord)
LongCat makes its own models (LongCat-2.5, launched 11-02) and serves them
at api.longcat.chat. magpie had LongCat's icon but no preset for it.
The new preset is longcat ("LongCat", KindVendor, icon longcat, catalog
models.dev's longcat). It uses:
- chat completions and Responses at https://api.longcat.chat/openai/v1;
- Anthropic messages at https://api.longcat.chat/anthropic;
- docs at longcat.chat/platform/docs/zh/api-docs, keys at
longcat.chat/platform/api_keys.
The key goes as a Bearer. magpie sends both headers, and the docs ask for
Bearer on both endpoints; x-api-key alone gets "missing_api_key". The model
list is /openai/v1/models. longcat.chat's and longcat.ai's accounts use the
same API host (both sites' api-docs pages name api.longcat.chat).
An entry at those endpoints imports as the preset, for example CC Switch's
Claude Code and Codex entries from LongCat's cc-switch page. OpenCode's
auth.json "longcat" (models.dev's id) maps to the preset too. The README
(en, zh), docs/reference.md and the site's import pages (en, zh, ja, and
import.html, with the icon) list it.
Sources, read 11-02: api-docs, api/models, api/model, api/model-params,
api/chat, api/messages, image-video-understanding, cc-switch, pricing/
longcat-2.5, change-log, faq.
Probed without a key, from this machine: /openai/v1/models and
/anthropic/v1/models answer 401 authentication_error "missing_api_key".
/openai/v1/chat/completions, /openai/v1/responses and
/anthropic/v1/messages with a bad Bearer answer 401 "incorrect api key".
Run at this head (base
|
||
|
|
611ce90d15 |
agent: OpenBot, magpie's models in its model picker (jiezhengj)
OpenBot (nightly-labs/openbot, openbot.run, v0.58.0) is a new row on the
Agents page. jiezhengj on Discord asked for it: today they type magpie's
address into OpenBot by hand and add each model one at a time.
OpenBot lists the user's own OpenAI-compatible endpoints from
openbot-custom-providers-v1.json in its userData folder:
~/Library/Application Support/OpenBot, %APPDATA%\OpenBot, or
~/.config/OpenBot. Connecting adds an entry with id "magpie" pointing at
the gateway's /v1 and holding the models picked for OpenBot, with
secret null. OpenBot seals an entry's key in safeStorage, which magpie
doesn't open, so the entry has no key. OpenBot hands it to OpenCode
keyless, and the gateway accepts it as a request from this computer.
What the entry keeps to:
- OpenBot's decoders drop the whole list over one bad entry. So the entry
has at most 64 models, only ids OpenBot accepts as magpie/<id>, and a
context window only inside 1,024 to 100,000,000.
- The user's other entries stay. The name, harness and secret they give
magpie's entry in OpenBot stay too.
- A sync with nothing to change doesn't write.
- A file whose version isn't the number 1, or whose providers isn't a
list, is one OpenBot refuses itself, so magpie leaves it alone.
- Disconnect takes out magpie's entry, and the file too when only the
version and an empty list are left.
OpenBot reads the file at start, so while it runs, a notice says to
restart it. The notice is in every language.
OpenBot is detected by its userData folder, OpenBot.app
(app.openbot.desktop), or OpenBot.exe under %LOCALAPPDATA%\Programs or
%ProgramFiles%. Docs updated: agent-wiring.md, reference.md, and both
READMEs.
Run at the pushed head, on mote:
- gofmt -l: clean.
- go vet -tags nogui for internal/agent and internal/gui, and for ./...
with GOOS=linux and GOOS=windows: ok.
- go test -tags nogui -count=1 -timeout 45m on internal/agent and every
package that imports it (., backup, cli, davsync, gui, library,
profile, stats, tui, uninstall, plugins/...): ok.
- GUI: agent-notice-lang, i18n-keys, header-relang and about-notices in
Chromium and WebKit: 58 of 58 pass.
After rebasing on
|
||
|
|
5dfbca6274 |
cli: magpie settings list|get|set|reset, through the window's own save (#4745)
Stage 1 of #4745 (StringKe): every setting POST /api/settings saves can be read and set from the terminal. - internal/settingsapi holds the save the handler made: Merge (the carry of keys a page leaves out, moved verbatim from api.go, plus upstream's RouterNote line), the vision/imageGen/searcher checks, settings.Save's own checks, catalog.Touched. POST /api/settings and `magpie settings` both call settingsapi.Apply, so a value is checked and saved one way. It sits outside internal/gui so the nogui build has it. - `magpie settings` (list, the default, with value, default and choices; get; set; reset to settings.Defaults()), --json on list and get. Body sends the whole file with one key changed, so a key the save keeps when absent (noBird, refusalRetries, ...) is set even to off. A flag where a key or value goes, an unknown key (with near matches named) or a refused value writes nothing and exits 1; --help prints usage. - Parity guards: TestKeysAreWhatTheSaveWrites (each Settings field sent changed on its own; what the save takes must equal Keys), TestSettingsCLISetsWhatTheWindowSaves (every key the page's prefsKeep and savePrefs send is a key), TestEveryRouteHasACommandOrIsNamed (each /api route has a command or a reason in notYet, which later stages shrink; 36 have one now). - Item 3 of the stage (per-provider CLI-only fields in the window) is left for stage 2. - The open app's in-process follow-ups (fonts, Dock, tray menu, alerts, language, update re-check) run only from the window's save: #4752. Run (mote, at the pushed head |
||
|
|
93879515a0 |
agent: QwenPaw, each of its agents' active_model one of magpie's (pkh1585 on Discord)
pkh1585 asked for QwenPaw (AgentScope, github.com/agentscope-ai/QwenPaw)
on Discord. Read in its source, 2.2.2.post1, as data:
- Its folder is QWENPAW_WORKING_DIR, else ~/.copaw when that exists (the
old name), else ~/.qwenpaw; WORKING_DIR/.env is loaded without
overriding the environment. config.json's agents.profiles lists the
agents, each with a workspace_dir whose agent.json holds active_model
{provider_id, model}, read again on each message.
- Providers are no plain config: SECRET_DIR (QWENPAW_SECRET_DIR, else
"<WORKING_DIR>.secret") holds providers/{builtin,custom}/<id>.json,
read once at start. A plain api_key there is encrypted to "ENC:" at
start, so that is the place QwenPaw itself keeps keys.
What magpie does now:
- `magpie qwenpaw <model>` and the GUI: a row per QwenPaw agent
(qwenpaw#<id>, the default one as plain qwenpaw), skipping agents whose
backend is ACP (another CLI runs those) and agents turned off.
- Connecting writes providers/custom/magpie.json (mode 600, the gateway's
/v1 and the magpie-qwenpaw key, magpie's models as extra_models with
their window, output and tool use) and sets that agent's active_model
to {magpie, <provider>/<model>}. The old active_model is stashed as it
was and put back verbatim on disconnect, absent and null included.
The provider file is removed only when no QwenPaw agent still uses it.
- A sync after QwenPaw re-saved the provider (encrypted key, discovered
models, its own defaults) keeps what QwenPaw wrote and changes only
what magpie owns, so a second connect leaves the file as it is.
- The notice says QwenPaw reads providers at start-up: restart it once
after connecting and after magpie's models change. New text in every
locale.
- appdir: QWENPAW_WORKING_DIR and QWENPAW_SECRET_DIR take ~/ as QwenPaw's
expanduser does; agentenv clears them in tests.
- README (en, zh), docs/reference.md, agent-wiring.md, the site's agent
list and start pages (en, zh, ja), icon.
Run:
- internal/agent's QwenPaw tests (Connect, AgentsAreRows, SyncKeeps-
WhatQwenPawChanged, Check, NotStartedYet, Folders, OwnModelAfter-
Magpies, SyncAfterQwenPawSaved, NullModelRestored) on mote, and the
all-agent tests (applied, rewire, lan_kept, proxy_kept, spelled) with
a QwenPaw fixture.
- Broken by hand, each red: always rewriting the key
(SyncKeepsWhatQwenPawChanged), removing the provider while another
agent uses it (AgentsAreRows), no backend filter (AgentsAreRows lists
qwenpaw#coder), dropping the keep of QwenPaw's own fields
(SyncAfterQwenPawSaved), IsObject for Exists (NullModelRestored).
- Real QwenPaw 2.2.2.post1 (Python 3.12 via uv) in a sandbox HOME on
the Linux box (WSL magpie-desktop), magpie on 3741, a fake OpenAI
upstream on 3742: first start wrote config.json and agent.json;
`magpie provider add fake …`, `magpie serve`, `magpie qwenpaw
magpie/fake/echo-1`; after a restart QwenPaw encrypted the key (ENC:)
and `qwenpaw agents chat` answered "PAWPAW-OK from the fake upstream",
its log "built agent … model=magpie/fake/echo-1"; the upstream saw
/v1/chat/completions model echo-1 streamed, magpie's usage.jsonl
agent qwenpaw status 200. A second connect and `magpie models` left
the provider file unchanged. `magpie qwenpaw default` took
active_model back out (the only diff in agent.json) and removed the
provider; QwenPaw started clean after.
- gofmt -l clean; go vet darwin, GOOS=linux and GOOS=windows -tags nogui.
- Full suite on mote (go test -tags nogui -count=1 -timeout 45m ./...)
at 9554883db on
|
||
|
|
2cfb8351d0 |
install.sh: a Linux desktop without WebKitGTK 4.1 has it installed through sudo, then gets the desktop app (shuhai)
shuhai on Discord, on f68ddca37's hint: "为什么不能帮用户直接装好?" On a
desktop without WebKitGTK 4.1 the installer put in the terminal build and
told the user to `sudo apt install libwebkit2gtk-4.1-0` and run it again.
Now, on a desktop without the libraries (and with --gui), when someone is
at the terminal, the script installs WebKitGTK 4.1 (GTK 3 comes with it)
with the distribution's package manager, says first in one line what and
why, and installs the desktop app:
- apt-get install -y libwebkit2gtk-4.1-0 (Debian/Ubuntu family), and when
that fails, apt-get update and once more (lists missing or stale);
- dnf install -y webkit2gtk4.1 (Fedora/RHEL family);
- pacman -S --needed --noconfirm webkit2gtk-4.1 (Arch family; no -Sy, so
no partial upgrade);
- zypper --non-interactive install libwebkit2gtk-4_1-0 (openSUSE).
Through sudo, which asks for the password itself; as root, without it.
"At the terminal" is /dev/tty opening (in a subshell, since a failed
redirection would end the script): curl | sh gives the script the pipe
for stdin, so every package command reads /dev/tty too, never the script.
No terminal, no sudo, the package manager missing, Void/Gentoo/another
distribution, or the install failing: the terminal build and the command,
as before, with "didn't work (see above)" when it was tried. --tui and
MAGPIE_CLI=1 install no package; a headless computer neither.
MAGPIE_TTY points the check at another file for the tests.
Docs: reference.md Install, README en/zh, docs start (en/zh/ja).
Run:
- sh -n, dash -n; shellcheck -s sh: only SC2010 at the uninstall's
ls | grep, there before.
- site/install.test.mjs, 5 new tests (fake sudo, id and package managers;
every distro's command, root without sudo, no tty, no sudo on PATH,
Void, NixOS, a failing install, apt's update-and-retry, --gui, --tui,
MAGPIE_CLI, headless): red on origin/main's install.sh (the 5 new fail,
19 pass), green after. CI's site step (sh -n + node --test
site/*.test.mjs) at this head, rebased on origin/main: 63/63 on mote
(macOS sh) and 63/63 on magpie-desktop through wsl-run (/bin/sh = dash).
- Real installs in fresh containers (Docker on xiaomi-gpu, amd64), a user
u with sudo, DISPLAY=:0, `cat install.sh | sh` (stdin a pipe), the
terminal kept with setpriv (su -c starts a session without one),
v0.1.2399/2400 from the real feed; then ldd (nothing missing),
`magpie version`, and the package query:
- Debian 12, sudo with a password, typed by expect at sudo's prompt,
package lists deleted first: install failed "Unable to locate", apt-get
update, retry ok, desktop app, libwebkit2gtk-4.1-0 installed;
- Ubuntu 24.04 (NOPASSWD): libwebkit2gtk-4.1-0, desktop app;
- Fedora 44, password via expect: webkit2gtk4.1, desktop app;
- Arch (archlinux:latest): webkit2gtk-4.1 2.54.2, desktop app;
- openSUSE Tumbleweed and Leap 15.6: libwebkit2gtk-4_1-0, desktop app;
- Debian 12 as root: apt-get without sudo, desktop app;
- Ubuntu 24.04 --gui: installed, desktop app; --tui: terminal build,
nothing installed;
- Debian 12 without -t (no terminal): terminal build + the apt line, no
install tried; without sudo at a terminal: the same;
- Ubuntu 20.04 (no WebKitGTK 4.1 in focal): install, update, retry all
fail "Unable to locate", then the terminal build and the "didn't work
(see above)" hint.
Not tried: a real desktop VM (the containers fake one with DISPLAY=:0);
the installed app wasn't opened, only `magpie version`. Void and Gentoo
stay hint-only (Gentoo would build WebKit from source). Debian 11 failed
in the container's own setup (archives unreachable), so focal stood in
for a distribution without 4.1. A held dpkg lock (unattended-upgrades)
would fail the install and fall back; not reproduced. On focal the hint
still names libwebkit2gtk-4.1-0, which focal lacks, as before.
|
||
|
|
f68ddca370 |
install.sh: a Linux desktop gets the desktop app, or the command that installs its WebKitGTK; --gui and --tui choose (shuhai)
shuhai on Discord: on a Linux desktop install.sh installed the terminal build, and a desktop user expects the app. The script chose by `ldconfig -p` alone, and on Debian a user's PATH has no /sbin, so ldconfig wasn't found and every Debian desktop got the terminal build even with WebKitGTK 4.1 installed. Without the libraries, the only hint was a line mid-output. Now, with nothing asked (curl | sh stays unattended): - the libraries are looked up with ldconfig from PATH, /sbin or /usr/sbin, and in the usual lib folders when there is no cache (NixOS, Guix); GTK 3 is checked beside WebKitGTK 4.1, which brings the rest the app links (readelf -d of v0.1.2359's magpie-linux-amd64: gtk-3, webkit2gtk-4.1, soup-3.0, javascriptcoregtk-4.1, glib, X11, wayland-client, glibc); - libraries there: the desktop app, as before; - a desktop without them: the terminal build, and last in the output the distribution's command (apt/dnf/pacman/zypper/xbps/emerge from os-release ID and ID_LIKE), "run this again", or --gui. A desktop is DISPLAY, WAYLAND_DISPLAY, XDG_CURRENT_DESKTOP/XDG_SESSION_DESKTOP/ DESKTOP_SESSION, XDG_SESSION_TYPE x11/wayland, the user's logind Display session when its Type is x11/wayland/mir (over ssh; logind falls back to a tty login, which doesn't count), or a session file in xsessions/wayland-sessions under XDG_DATA_DIRS; - headless without them: the terminal build, with no desktop advice; - --gui: the app even before its libraries, with the package to add; --tui (or MAGPIE_CLI=1, kept) the terminal build on a desktop too; - musl (Alpine): always the terminal build; --gui refuses, since the app is built against glibc. Docs: reference.md Install, README en/zh, docs start FAQ (en/zh/ja, #linux-build). Run: - shellcheck -s sh: only SC2010 at the uninstall's `ls | grep`, there before this change. sh -n and dash -n clean. - site/install.test.mjs (5 new tests): 19/19 on mote (macOS sh) and on magpie-desktop through wsl-run (dash); CI's site step (sh -n + node --test site/*.test.mjs) 58/58 on magpie-desktop and 58/58 on mote. - Red on the old install.sh: tests 16-19 fail (desktop advice, headless advice, --gui, --tui). With the logind Type check taken out by hand, the headless test fails on login "135 tty". - Real installs on magpie-desktop (Ubuntu 24.04, XFCE, WSLg, /bin/sh = dash), `cat install.sh | env ... sh -s`, stdin a pipe, into a /tmp sandbox HOME/XDG dirs/MAGPIE_BIN_DIR, each removed after, v0.1.2360 downloaded from the real feed and `magpie version` run: session with DISPLAY/WAYLAND_DISPLAY: desktop app + menu entry; env -i with PATH=/usr/local/bin:/usr/bin:/bin: desktop app (the old script gave the terminal build here, run the same way); an ldconfig whose cache lacks the libs + DISPLAY=:0, and the same in env -i (found by /usr/share/xsessions): terminal build + the apt line; that with XDG_DATA_DIRS=/nonexistent: terminal build, quiet; --gui there: desktop app + the apt line; --tui in the session: terminal build. The first run found the tty-login fallback (logind's Display=135 is this WSL user's pts session), fixed before commit. - site/install.test.mjs on Windows (win-run): 0/19, the same 14 old tests too: the box has no sh for spawnSync; CI runs this file on Linux only. Not tried: a real Debian, Fedora, Arch or openSUSE box, or a box without WebKitGTK installed (simulated with a fake ldconfig); the package names were checked against each index (Ubuntu noble, Debian bookworm, Arch, Fedora mdapi, Tumbleweed oss, void-packages, Gentoo), not installed. The installed app wasn't opened (only `magpie version`), to keep off ports other sessions use there. Termux and macOS paths are unchanged and their tests pass. |
||
|
|
305c624eda |
install.sh: --uninstall takes off what it installed, --purge the settings too
pota on Discord: the Linux install script only installs. Now
curl -fsSL https://usemagpie.ai/install.sh | sh -s -- --uninstall
takes off what the script put there, and nothing of the user's:
- Linux: $bin/magpie, the menu entry (while it starts this magpie, or
one that is gone; another magpie's stays), its icon, the
x-scheme-handler/magpie=magpie.desktop line xdg-mime wrote (that line
only), and the menu's mimeinfo.cache when it lists nothing else. The
service and login entry go too while they start this magpie, since
left they would start a program that is gone at each login
(`magpie daemon uninstall`, systemctl as a fallback).
- macOS: magpie.app in /Applications or ~/Applications and the
~/.local/bin link into it. Termux: $PREFIX/bin/magpie.
- ~/.config/magpie stays and the script says so. A magpie still
running is named with its pid; it ends when the user quits it.
- --purge runs `magpie uninstall --yes` first (agents disconnected and
put back, magpie's folders deleted), then the above. With no magpie
to ask it refuses, and if magpie uninstall fails nothing of the
install is taken, so it can be run again.
- Nothing is downloaded; the uninstall runs before the CPU check.
Docs: an FAQ entry "How do I uninstall magpie?" in docs/start (en, zh,
ja), and a line in both READMEs' install note.
Run at
|
||
|
|
0804f2d97d |
search: Tencent Cloud's Yuanbao Search (wsa) is a built-in search API (plugins#509)
chenjiangzi asked for Tencent Cloud's WSA SearchPro (元宝搜索). It is added
as vendor "wsa", following Doubao Search (
|
||
|
|
dca3e2d716 |
search: Doubao Search (Volcengine) as a search API (CyberCaius on Discord)
CyberCaius asked on Discord #help (10-30) for Volcengine's Doubao search under Settings › Models › Search APIs, or a custom API address. Volcengine's Doubao Search Custom (豆包搜索 Custom版, once 联网搜索 / 融合信息搜索, docs.volcengine.com/docs/networked-search/networked-search, the same page as volcengine.com/docs/87772/2272953) can now be added with its API key: - provider.SearchVendors: volcengine, "Doubao Search (Volcengine)", at https://open.feedcoopapi.com, keys at console.volcengine.com/search-infinity/api-key, after DeepSeek. The GUI takes its vendors from SearchVendors, so it shows in the Search API picker with its Get a key link and base URL field; no GUI file changes. - askSearchAPI: POST /search_api/web_search, Bearer key (the default, as the docs and volcengine/mcp-server's askecho_search_infinity send it), body {Query, SearchType: "web", Count: searchHits, Filter: {NeedUrl: true}}. The query is cut to the 100 characters the docs allow. NeedUrl leaves out its 火山如意 cards, which have no URL to cite. - readVolcSearch reads Result.WebResults: Summary as the page's text (the docs recommend it for models; Content is the whole page, Snippet ~200 chars "only for list display"), Snippet when there is no Summary, PublishTime as the page's age, a 1970-01-01 time (its image example's stand-in) as none, and a result with no Url left out. - volcSearchError: its errors are in ResponseMetadata.Error, a code the docs list, and the docs don't say the HTTP status, so the code decides: 10401/10403/10409 rest the key as turned away (403), 10406/10408/ 10410/10412 (free searches spent with none paid, no plan, plan spent) as out of credit (402), 700429 as rate limited (429). Any other code is a plain error, a 200 carrying one included. The key is masked in the error as for every vendor. - A custom address: every search API already takes a base URL (#1580, the field under the key in Settings, url= in the CLI), so an endpoint that answers as Tavily, SearXNG, Brave, Exa, Firecrawl, You.com, DeepSeek or now Doubao Search does can be set there. There is no common format across the vendors (each has its own path, body and reply), so no separate "custom" vendor was added. - Siblings: CLI usage (main.go, search_cli.go's api list and empty-state hint), README.md, README.zh-CN.md, gateway-routing.md's path list and refusal paragraph. The test's reply is the docs' own web-search response example, byte for byte (testdata/volcengine_web_search.json); its error replies are the docs' error example with its "// 该字段为错误码" note taken out (not JSON). Not tried against the real API: no Volcengine search key in this run. Run (worktree on origin/main |
||
|
|
3c6b7d585f |
agent: OpenClaw is wired up like the other agents
arthur041691 (Discord #help) runs OpenClaw for WhatsApp and asked for it in
Agents. Connecting writes magpie as a custom provider of OpenClaw's own, in
openclaw.json, and makes the picked model agents.defaults.model's primary.
What is written, from OpenClaw's source at 5bab0c14 (npm 2026.10.8, dc2523e):
- the file: OPENCLAW_CONFIG_PATH, else $OPENCLAW_STATE_DIR/openclaw.json,
else ~/.openclaw-<profile> for a named OPENCLAW_PROFILE, else
~/.openclaw; ~ is OPENCLAW_HOME when set (src/config/paths.ts,
src/config/state-dir.ts, src/cli/profile-utils.ts). OPENCLAW_PROFILE is
a name, not a path (agentenv.NotPaths); the other three expand a
leading ~, as resolveUserPath does (appdir.usable).
- models.providers.magpie: baseUrl (the gateway's /v1), apiKey (the
OpenClaw-named gateway key), api "openai-completions", and every model
magpie serves with id, name, input, reasoning and contextWindow
(src/config/zod-schema.core.ts, docs/gateway/config-tools/custom-providers.md).
A user's own keys on a model entry (headers, maxTokens…) stay on Sync.
- agents.defaults.model keeps its shape (string or {primary, fallbacks});
agents.defaults.models gets the ref's {} entry as `openclaw models set`
adds it (src/commands/models/shared.ts), only when that map exists; a
non-empty modelPolicy.allow gets "magpie/*" when nothing there lets
magpie's models in (src/agents/model-selection-normalize.ts).
- Model changes are hot-reloaded (docs/gateway/configuration/hot-reload.md);
a chat that already has a model keeps it (docs/concepts/models.md), so
the notice says to send /model default there. Translated in every
language.
- The file is written through temp-and-rename; a new one is 0600 in a
0700 folder, as OpenClaw makes it (src/config/io.write.ts). A file that
isn't JSON after comments are blanked (JSON5's bare keys) is left alone
with an error, never read as empty.
- Disconnect puts back the model there was, removes magpie's provider,
its {} entries, the allow entry and any object magpie made, and the
file itself if magpie made it.
Icon: a mask drawn from OpenClaw's ui/public/favicon.svg (MIT).
Run, on mote at this tree:
- go test -tags nogui ./internal/agent -run OpenClaw plus the every-agent
tests (drift, port move, sync on another machine, reverse proxy, LAN,
pinned key per writer, notices translated), ./internal/appdir,
./internal/agentenv: ok.
- Broken by hand, each red then green again: no stash restore
(TestOpenClaw, Shapes, AllowList), user keys dropped
(SyncKeepsTheirs), no allow entry (AllowList), no JSON5 guard
(JSON5LeftAlone), profile ignored (Paths), OPENCLAW_PROFILE back as a
path variable (Paths).
- Real OpenClaw 2026.10.8 from npm, Node 24.22.2, sandbox HOME on mote:
onboard --non-interactive made the file (its bytes are the test
fixture); magpie's code connected it; `openclaw config validate` ok;
`openclaw models list` shows magpie/kimi/k2 as default; `openclaw agent
--local` sent POST /v1/chat/completions with Bearer magpie-openclaw and
model kimi/k2 to a fake gateway on 3425 and showed its reply; no
agents/*/models.json override was written; Disconnect gave the file
back byte for byte and it validates.
- GUI: i18n-keys, agent-notice-lang, icon-tile, about-notices,
agent-connect (Chromium and WebKit): 53/53.
- gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows ok.
- Full suite, go test -tags nogui -timeout 45m ./... at
|
||
|
|
b2d005bf38 |
gateway: a MiniMax API key makes videos with H3 (_tigerqueen_05867)
A MiniMax API-key provider (api.minimax.io, api.minimaxi.com, api.minimax.cn) now lists MiniMax-H3, -H3-Highspeed, -H3-Lite and -H3-Max as video models. They are never in chat lists. generate_video and /v1/videos start a task at <host>/v2/video_generation, poll /v2/query/video_generation/<id> and hand back the MP4. The prompt, seconds (raised to each model's minimum and capped at 15), resolution (from Extra or size, clamped to the model), ratio, first and last frame and up to 9 reference images go through. /v1/videos now reads last_frame; MiniMax and a remote magpie pass it on, other videomakers ignore it. The MCP schema is unchanged. Failures say which one it is: a turned-away key (1004/2049/401), no pay-as-you-go balance (1008/402), refused input or output (1026/1027), a Token Plan key without H3 (2061/2068/2057, which moves on to the next key), or the rate limit. AutoVideomaker puts MiniMax last, so generate_video, which has no model argument, uses MiniMax-H3 only when nothing else makes videos. All of it is gated on a MiniMax host, so no other vendor changes. Run on mote at 798c8fd48 (base |
||
|
|
6ecc65b6db |
agent: the CodeBuddy IDE is CodeBuddy too, found with no CLI
bjzhangwn on X: magpie supported CodeBuddy only as its CLI, not the IDE. The CodeBuddy IDE (4.12.2, codebuddy.ai's CodeBuddy.app, com.tencent.codebuddy, and codebuddy.cn's CodeBuddy CN.app, com.tencent.codebuddycn) reads the file magpie already writes for the CLI: its genie extension's CustomModelsProductProvider loads ~/.codebuddy/models.json's "models" (a string id and url each) and "availableModels", and lists them in its own picker. So one row, renamed CodeBuddy, stands for both. desktopApps gets a "codebuddy" entry, with a "more" list for the second build's bundle id. A `sign` lists the row with only the IDE installed. That row shows the IDE's version, is never "CLI not found", and the CLI isn't offered for install. Tests: TestCodeBuddyIDEIsCodeBuddy uses the real Info.plist bytes of both builds, cut to their first keys. TestCodeBuddyIDEReadsMagpieModels reads the written models.json the way the IDE's loader does. Run (mote, macOS 27): - gofmt -l: clean. - GOOS=linux and GOOS=windows go vet of ./internal/agent/... and ./internal/sessions/..., plus GOOS=windows -tags nogui ./internal/gui: ok. - go test -timeout 45m -count=1 ./... at |
||
|
|
f95121dd05 |
README: sponsors in two rows of three, each logo in an equal slot
Six logos wrapped onto a row of five and a lone AIGoCode. Now a <br> after the third, and every logo is width=144 height=36 so the columns line up (SVGs keep their ratio inside the box). AIGoCode's PNG is 640x170, which would stretch at 4:1, so the READMEs use a copy padded to 680x170 (light and dark); the home page keeps the original. Run: mote-run node --test site/*.test.mjs, 45/45 pass. Rendered the rows in headless Chrome on a dark background and checked the columns line up. Not tried: GitHub's own render (it goes live with the push). |
||
|
|
dfb73a04ef |
site, README: AIGoCode's dark logo in dark mode
AIGoCode sent the logo on a navy background; the navy is taken out to transparency (colours un-blended at the edges) and the logo is placed in the light PNG's 640x170 box, so the card doesn't move between themes. Checked by eye over a dark and a white background. Ran: node --test site/*.test.mjs on mote, 45/45 pass. |
||
|
|
0f053024f5 |
README, site: link Apache Magpie and the ASF in the not-affiliated note
Jarek Potiuk (Apache Magpie PMC) suggested linking magpie.apache.org and apache.org instead of naming them, to avoid any other confusion. Both READMEs and the site footer (en, zh, ja, de) now link them. Run: node --test site/*.test.mjs on mote, 45 of 45 pass. |
||
|
|
dc1cfe0156 |
site: AIGoCode on usemagpie.ai's Sponsored by and in the READMEs
AIGoCode took the home and README seats together (paid, Wise USD). A fifth home card after SoleAPI, and a logo at the end of the Sponsors row in README.md and README.zh-CN.md. The logo is the 1280x368 PNG AIGoCode sent, cropped to its content and scaled to 640x170. Its blue and purple mark sits on transparency and reads on white, #1c1c1e and GitHub's #0d1117, so one copy serves both themes. The en and zh taglines are AIGoCode's own; ja and de are translated from them. /go/aigocode/home sends the browser to https://www.aigocode.net/ and /go/aigocode/readme to https://www.aigocode.net/invite/MAGPIE, the link AIGoCode gave for the README (first top-up bonus). Not tried: AIGoCode's API in a real agent. The owner chose to go live without a test key; neither seat puts AIGoCode in the app. Run: node --test site/*.test.mjs (45 pass). Logo rendered on light and dark backgrounds and looked at. |
||
|
|
5a9fb36a10 |
README, site: magpie is not affiliated with Apache Magpie or the ASF
Apache Magpie's PMC asked about the shared name. magpie keeps its name (a common word, thousands of older projects use it) and says plainly it is not affiliated with Apache Magpie or the Apache Software Foundation: a line under License in both READMEs and in the site footer (en, zh, ja, de). Ran: node --test site/*.test.mjs (45 pass). |
||
|
|
e7173958e9 |
agent: NewMax, magpie's models in its model picker (jwaitq on Discord)
jwaitq asked in #general (10-27) for NewMax (newmax.cc), an Electron app
built on the Claude Agent SDK. NewMax keeps its settings in
~/.newmax/newmax.db ($NEWMAX_USER_DATA_DIR wins), a SQLite table
settings(key, value) whose "app" row is JSON.stringify of every setting.
Connect adds one Anthropic-format provider, id magpie-gateway, with
magpie's gateway root (NewMax adds /v1/messages itself), its key and up to
20 models (NewMax's MAX_MODELS), appends it to providerOrder and, when
the user had kept NewMax's default, picks it. The row is edited by
splicing raw JSON in one immediate transaction, so every other byte the
user has stays as written. Disconnect removes the entry and its order id,
puts providerId/model back to "default" when they were magpie's, and
deletes the row when magpie made it. NewMax holds settings in memory and
writes the whole row on any change, so magpie refuses to write while
NewMax runs (macOS/Linux, matched on the program, not on a folder named
newmax) and says why in every language.
Run:
- go test -tags nogui -count=1 -timeout 45m ./internal/agent
./internal/agentenv ./internal/appdir ./internal/sessions at this head
(rebased on
|
||
|
|
3fd7e16983 |
agent: PenguinHarness is installed from the Agents page and served by magpie with nothing to set up
rankyurky asked on Discord #feedback for PenguinHarness (npm @prismshadow/penguin-cli, command penguin). Every value comes from Penguin's own source (0.2.17): - Config: $PENGUIN_HOME (else ~/.penguin/data, every OS) / $PENGUIN_PROJECT_ID (else default_project) /.project_config.toml. magpie writes [providers.magpie] (base_url, client_type, api_key), one [[models]] entry per magpie model (context_window, vision, max_tokens, [models.pricing] in usd_per_mtok) and default_model in Penguin's own inline spelling. Penguin's server reads the file again when its mtime changes, so no restart; a default naming no entry is refused by Penguin, so Check fails when one is missing. - A file magpie creates is 0600 in a 0700 folder, as Penguin keeps it. Disconnect restores the user's own default_model (or none), drops a magpie vision model, and removes the file when magpie made it. Penguin's own entries, providers and command_policy rules are kept. - A sync that changes nothing writes nothing (bytes and mtime kept), so Penguin's watcher isn't woken. - Install: curl -fsSL https://penguin.ooo/install.sh | sh, or irm https://penguin.ooo/install.ps1 | iex on Windows; update: npm, or penguin update --yes for the tarball, except on Windows where update.ts refuses it. - WSL: a penguin kind with no restart notice; the WSL test now expects an empty Notice for a kind with no restart. - agentenv: PENGUIN_HOME, PENGUIN_PROJECT_ID; the project id is in NotPaths, or appdir dropped a value like "work" as a relative path. - edit.SetTOMLArrayTables: replaces every [[name]] entry with key = value (with child tables) by blocks, or removes them; blank lines between replaced entries go with them, and an unchanged result isn't written. - GUI: penguin-color.svg icon; README (en, zh-CN), docs/reference.md and docs/subsystems/agent-wiring.md. Run (worktree at |
||
|
|
ea1f9492bc |
cli: magpie tools lists, and magpie tool calls, the tools magpie's MCP servers give agents (iwinux)
iwinux on Discord (#feedback) wanted magpie's image generation, image recognition and web search without going through an agent's MCP, and had written a Python script for generate_image. magpie now has it: magpie tools [<name>] magpie tool <name> [--<param> <value>…] [<words>…] [-o <file|folder>] [--json] Both ask the running gateway's own MCP servers (gateway.OwnMCPServers: image, vision, web-search, plugin tools) over HTTP, with the local token and the magpie-tool/1 User-Agent, so the tools, schemas, models from Settings and usage counting are the ones an agent gets. Nothing is started besides (#3318: the cases sit before startUp, beside mcp). - Parameters are read against the tool's inputSchema: types (integer, number, boolean, array given once per item, object as JSON), enum, - and _ alike, --p v or --p=v. The words left over are the tool's one required text, else its prompt. An unknown flag or parameter, a missing required one, a bad value, a value given twice or both words and the same --param are refused with "nothing was called"; no request is sent. - A file path a parameter takes (its description says file and path) is made absolute, since the gateway doesn't know the current folder. - --help prints toolUsage (static): help is handled before anything runs. - A still-being-made answer is waited on with generation_result (1s between asks, 30 min at most). The gateway's image server now says so in _meta too: usemagpie.ai/pending is the id, usemagpie.ai/files the files made ({url, inline}); an older gateway is read from its text. - Images and videos are saved through imagemcp.Target (now exported): -o file or folder, else the current folder named from the prompt, numbered when more than one, never over a file that is there; a file not inline is downloaded by its path from the gateway asked (the token goes nowhere else). --json prints the raw answer and saves nothing. - No magpie at the address: "magpie isn't running at <url>: open the app or run magpie serve". MAGPIE_GATEWAY=<url> points at another. Docs: usage lines in magpie help, docs/reference.md (Use), the gateway routing subsystem page (_meta and the CLI), README en/zh, site docs start page en/zh/ja. Tests (internal/cli/tool_cli_test.go, never the network; every test sets MAGPIE_GATEWAY to its own httptest server): - TestToolsListsTheServersTools, TestToolReadsParameters, TestToolRefusesWhatItDoesntKnowAndCallsNothing (no tools/call, no file), TestToolHelpCallsNothing (no request at all), TestToolSavesTheImage, TestToolWaitsOnWhatIsStillMade (pending _meta, then the old text form, download with the key from the gateway asked, not the URL's host), TestToolErrorIsSaid, TestToolSaysMagpieIsntRunning, TestToolDrawsThroughTheGateway (the real gateway.New().Handler() with a fake vendor: lists, draws, saves the vendor's PNG). - TestImageMCPDrawsAndServesTheImage, ...SlowDrawingIsWaitedOn and ...MakesVideos now check the _meta. Red on the old behaviour: with withMeta setting nothing (what main answers) all three fail ("_meta map[], want pending img_…"). - Broken by hand: dropping the unknown-parameter check makes TestToolRefuses… red (the --model call was made); saving an inline image by its URL instead makes TestToolSavesTheImage red. Both restored. - TestHelpOnEveryCommandDoesNothing covers tool and tools. Run with this change on origin/main |
||
|
|
11c3fbb197 |
README: say masking is off by default, and when a quota has nowhere to go
A review on X (zhengtang364848, 10-26) tested magpie in Docker and found three README lines that read stronger than the default: - "keys, passwords and emails in a prompt are masked" — masking is off until Settings → Privacy turns it on; the bullet now says so, and the masking section's last line says it's off until turned on. - An email at a test domain stayed as written with masking on. That is realEmail in internal/redact/redact.go leaving example.com/.org/.net, localhost, .test, .invalid and .example alone on purpose; the masking section now names them. - "when a quota runs out, it quietly moves on to the next account" — a provider's next account takes over, and a group moves on to another model or provider; with one account and no group the 429 reaches the agent, as the review saw. The bullet now says that. English and 简体中文 both. Docs only: no test reads these lines (grep for README.md in *_test.go and the GUI tests), nothing run. |
||
|
|
67271e7020 |
site: WandAPI is a README sponsor
WandAPI took a README seat with its in-app one. README.md shows its
English banner ("Connect to global AI models"), README.zh-CN.md its
Chinese one ("畅连全球AI大模型"). Their SVGs switch colours with a
prefers-color-scheme rule inside; each is kept as a light copy (the rule
taken out) and a dark copy (the rule's colours as the only ones), shown
through <picture> like the other sponsors. All paths, no text or outside
references. Both link usemagpie.ai/go/wandapi/readme, which sponsors.js
sends to wandapi.ai/r/magpierepo, the link WandAPI gave for the README.
Run: node --test site/*.test.mjs (31 of 31 ok). The four banners rendered
with rsvg-convert on white and on GitHub's dark background and looked at.
After the deploy, /go/wandapi/readme is checked for its 302.
|
||
|
|
4b1994ad31 |
agent: AionUi, added through its add-provider link
seven7032 on Discord asked how to connect AionUi to magpie. AionUi
keeps its providers in its own SQLite database
(<userData>/aionui/aionui-backend.db, WAL mode), each key encrypted, so
there is no config file for magpie to write. The one supported way in
is its deeplink. AionUi 2.2.2's main process parses it
(parseDeepLinkUrl), and its renderer opens Settings -> Model with the
add form filled in, which the user confirms:
aionui://add-provider?api_key=magpie-aionui&base_url=<gw>/v1&name=magpie&platform=custom
The AionUi row works the way Cindy's and Lody's do:
- Add magpie opens that link. /api/open allows the aionui://add-provider?
prefix only. `magpie aionui add` opens it from the CLI.
- The key is agentKeyAt("aionui"), so it becomes the LAN key while
sharing is on (added to TestPinnedGatewayKeyForEveryWriter).
- "custom" is AionUi's OpenAI-compatible platform. Its base URLs end in
/v1, as its own OpenAI preset's does.
- Added reads providers.base_url for the gateway's address without
touching the database (sessions.OpenUntouched, from the previous
commit). A database that can't be read is unknown, never "not added".
The last read is kept while the database and its log keep their size
and time, for 15s at most, so the Agents poll doesn't copy a running
AionUi's database every time.
- It is detected by userData/aionui (os.UserConfigDir()/AionUi on every
OS).
- As with Cindy and Lody, the TUI leaves the row out (nothing to pick).
Tests:
- TestAionUiLink: the link's exact bytes.
- TestAionUiLinkParsedAs2_2_2: runs the link through
testdata/aionui/deeplink-2.2.2.js, which is parseDeepLinkUrl copied
byte for byte from 2.2.2's app.asar (out/main/index.js 50995-51021)
plus the renderer's add-provider mapping and the form prefill. The
result is action add-provider, route /settings/model, and the form gets
platform custom, the /v1 base URL and the key.
- TestAionUiHas: a fixture database built from 2.2.2's real providers
schema (taken from the database 2.2.2 made at first start). It covers
none, another gateway, a row present only in the log of a running app,
and a closed app, and checks that AionUi's folder is unchanged each
time.
- TestAionUiUnreadableIsUnknown, TestAionUiStatusRereadsOnChange,
TestAionUiDetect, TestAionUiImportRow (GUI: the row, unknown status,
and /api/open refusing other aionui:// links).
- import-row.test.cjs gains the AionUi row (icon, known status in each
language, the click opens the exact link, and it fits at 420px), in
chromium and webkit across en, zh, zh-TW, ja and de. The same file
now waits for the rows to settle before its alignment check: under
load 105 one run caught Cindy's button mid-resize at 193.4px beside
the picker's 194.4px. The old file passed 3/3 alone, so it is a
timing assumption, not a layout bug.
Run at 18041fc5b (this change on origin/main
|
||
|
|
5509128b1b |
readme, site: privacy masking gets its own section, with the Masking page
The owner asked for masking to be shown prominently in the README and on
usemagpie.ai. Each says what masking does, how, and what it costs:
- README.md, README.zh-CN.md: a bullet in "Is magpie for you?", a
"Privacy masking" section second under What it does (screenshot, a
table of how values are found, put back, kept off disk and shown, and
the trade-off: the model sees the placeholder, so a task about the
value needs Never mask), and a line in Privacy linking to it.
- site/public/index.html, site/i18n.js: a #masking section after the
menu bar, a nav link, en/zh/ja/de strings; the screenshot follows the
language (de keeps the English one).
- site/public/docs/{,zh/,ja/}privacy.html: a "Masking what goes to
providers" section and its TOC entry.
- site/public/img/masking{,-zh,-ja}-{light,dark}.png: Insights › Masking
drawn by the real GUI assets in Chromium with mocked /api data, 1912px.
Every claim was checked against the code: off by default
(settings.Redact omitempty), 503 when asked for and not serving
(reference.md), the local model's 1.6 GB (internal/pii modelSize), the
UI names in each language from internal/gui/assets/i18n.js.
Run at this tree: site `node --test` 31 pass 0 fail (worker.test.mjs
checks every key in every language). The section rendered with each
dictionary applied in Playwright Chromium: en 1280 light, zh 1280 dark,
ja 390 light, de 760 dark; no horizontal scroll, the right screenshot
per language. Not tried: `wrangler dev` (it fails to start on ICON_MAX,
unrelated); the deployed site is checked with curl after deploy.
|
||
|
|
b5d46acbed |
agent: Kiro Crew runs on a harness connected to magpie
Vincent on Discord asked for Kiro Crew (kirodotdev/KiroCrew v0.9.0: the KiroCrew.app desktop app, the kirocrew CLI, its dashboard and the Gateway on :5476). Crew has no model provider of its own. It runs each session on an ACP harness picked by agent.acp_backend (and dispatched members by agent.member_acp_backend) in $KIROCREW_HOME/config.json, default ~/.kiro/crew (src/kiro_crew/config/paths.py, loader.py, sections.py; ACP_BACKENDS_MEMBER_DISPATCH in agent_sdk/backends.py). Connecting sets those keys to an agent already connected to magpie, tried in this order: Codex, Claude Code, OpenCode, Pi, Goose. One whose ACP adapter is installed (codex-acp, claude-agent-acp, pi-acp) wins, so one click is enough. magpie looks for the adapter where Crew does and installs nothing; when it's missing, the notice gives the npm command. With no harness connected the connect is refused with a message naming which agents to connect. A harness set in config.local.json wins over config.json, so magpie doesn't write it and the row says so. The previous values are stashed. On Disconnect they are put back, but only for keys that still hold what magpie wrote, and a file magpie created is removed once it's empty. The row reads as connected only while its harness is still wired to magpie. deepseek is not offered: Crew runs it as dsh --profile acp, which magpie's dsh wiring doesn't reach. KIROCREW_HOME and the adapter path variables are read from the login shell (agentenv). Run (Go and the GUI files at base |
||
|
|
3840333c51 |
site: APIKEY.FAN is a README sponsor
APIKEY.FAN added a README seat to its in-app one. README.md shows its
English logo ("Enterprise AI Gateway"), README.zh-CN.md its Chinese one
("企业级 AI 中转站"), each with a dark copy whose #111111 lettering is
#F2F2F2, the orange mark unchanged. Both link usemagpie.ai/go/apikeyfan/readme,
which sponsors.js sends to apikey.fan/?aff=mg_readme, the link APIKEY.FAN
gave for the README.
Run: node --test site/*.test.mjs (30 of 30 ok). The four logos rendered
with rsvg-convert on white and on GitHub's dark background and looked at.
After the deploy, /go/apikeyfan/readme is checked for its 302.
|
||
|
|
eee9ece293 |
readme: the Sponsors label stands a paragraph's space above the logos
The owner (10-23, a screenshot of the README in dark mode): "Sponsors" sat right on the logos. A <br> kept it in the logos' paragraph; a blank line makes it its own, so GitHub's paragraph margin (16px) comes between. English and 简体中文 alike. Checked: gh api markdown (gfm) renders <sub>Sponsors</sub> in its own <p>, the logos in the next. |
||
|
|
be002aca05 |
site: Kimi Code is a partner in the Add sheet and a README sponsor
Kimi took an in-app seat and a README seat. The partner "kimi" (Kimi Code) has four regions under "Plan": the Kimi Code membership in China (api.kimi.com/coding, catalog kimi-code-plan-cn, the default) and globally (api.kimi.ai/coding, kimi-code-plan-global), and Moonshot's pay as you go in China and globally (catalog moonshotai), with the endpoints and catalogs of the built-in kimi-code, kimi-code-cn and moonshot presets, so the plan's handling (keyed on those catalogs and hosts) is the same. Each region's key page and website is Kimi's aff=magpie link for it. The tagline is in all five app languages; it is listed in every language from 10-23, with no end set yet. README.md links sponsor "kimi" (www.kimi.ai/code), README.zh-CN.md "kimi-cn" (www.kimi.com/code), with a light and a dark logo. The icon and logos are drawn from Kimi's mark. Run: node --test site/*.test.mjs (30 of 30 ok). The served feed (worker.js served() over partners.js) parsed with partnerFeed and passed checkPartner and validPartners in a throwaway test in internal/provider: one partner, the cn region's endpoints as default, every link a /go one. Not tried: the app's Add sheet with this feed; the editor's link reads usemagpie.ai, not www.kimi.com, until the app shows a partner's own host. |