1ccacad63281094de8a3372d5a507d38f9969e5c
345
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e1a2226405 |
library: EverMe Memory and Nowledge Mem are offered in the market as memory sources, added in one step (OipsAnthony on X)
Both publish an MCP server: EverMe's @everme/memory-mcp (stdio, agent id and evt_ token, managed backend preset) and Nowledge Mem's Streamable HTTP endpoint at 127.0.0.1:14242/mcp (optional Bearer key for a Mem reached over Access Anywhere). Added beside Magpie Memory; their memories stay in their service, and magpie's digest and Memory tab don't read them (docs/subsystems/memory.md).
Run (wsl-run, magpie-wt/memprov at origin/main
|
||
|
|
0052c860e0 |
library: billion-context installed with bun is found on Windows (Zerenjie on X)
biliPath looked for bili.cmd on PATH and in %APPDATA%\npm only. bun add -g puts bili.exe (with a bili.bunx) in the bin of BUN_INSTALL or ~\.bun\bin, so a bun install was never found. It now asks proc.FindTool, which tries .exe and .cmd in every folder a user's tools are installed in. proc's UserBinDirs also takes BUN_INSTALL's bin (Windows and elsewhere), and Kiro Crew's adapter search gets ~/.bun/bin, BUN_INSTALL's bin and, on Windows, %APPDATA%\npm, its siblings that had the same hole. Run: on xiaomi-gpu (Windows 11) really `bun add -g billion-context` into a sandbox BUN_INSTALL with PATH holding no bun bin. Before the fix biliPath was "" ; after, it was bili.exe and `bili --version` answered 0.1.213. go vet and go test -run Bili|KiroCrew|ToolIn|UserPath for library, agent and proc passed on Windows and in WSL (magpie-desktop). The three new tests fail on the old code in WSL (broken by hand with the sources stashed). Not run: the full suite, a darwin vet and a mote run (mote's disk was full, 226Mi free), the GUI suites (no GUI file touched). |
||
|
|
cc659c7559 |
library: Instructions reach MiniMax Code and WorkBuddy (lysyscy8 on X)
MiniMax Code reads AGENTS.md in its data folder ($MINIMAX_DATA_DIR, else
~/.minimax) before every conversation (readGlobalInstructions in
@minimax-ai/code 0.7.6's chunks), so its target now names that file.
WorkBuddy and WorkBuddy AI keep their instructions as the string
personalization.customPrompt in app/app-config.json of their folder
(PersonalizationCollector and AppConfigService in 5.5.6's app.asar, both
builds). Target.Field says the instructions are a JSON string rather than a
file; instrRead/instrSave read and write it through edit.SetJSON/DelJSON, so
every other key, its order and indentation stay, the user's own prompt stays
in the field around magpie's marker part, and taking the part back leaves
the file byte for byte as it was (an empty personalization object magpie
made goes too). A file that is not JSON, or a field that is not text, is
unknown: reported, never written over. Import takes the user's prompt into
the library the same way.
Run: TestMiniMaxCodeInstructions, TestWorkBuddyInstructionsAreAJSONField,
TestWorkBuddyInstructionsFromNothing, TestWorkBuddyInstructionsUnreadFileIsLeftAlone,
TestWorkBuddyInstructionsImport and TestWorkBuddyAIInstructions, in a sandbox
HOME, on Linux (wsl-run) and Windows (win-run); all fail with the two target
assignments taken out (broken by hand), and pass with them. internal/library
whole on Linux (ok) and Windows: 3 reds, TestGoneAgentListedToTakeOut,
TestCheckMixedServerEachSide (both #4115) and TestPluginImportCarryOnOffRemove
(#6065), all three red the same on origin/main
|
||
|
|
855b97a407 |
library: an MCP call's stream is open before its request reaches the server (#5433)
ServeRun sent a call to the child server and only then opened the call's SSE stream. A server that asks roots/list at once could have the ask land before that stream existed: it went to an older session stream, or nowhere, and the call's own reply came first. That is #5433's red, TestRunServerAsks seeing "roots " with nothing after it, which came back on ubuntu CI at |
||
|
|
a68f114d9e |
lazyre: the plugin name and export file name regexps compile on first use (#6020)
|
||
|
|
faffb1e95b |
library: antigravity leaves noLibrary, it has a target now (xuanwo on X)
Run: go test ./internal/library full (only TestEveryAgentInLibrary red, fixed here), ./internal/agent ok, vet darwin/windows/linux nogui ok, via mote-run. |
||
|
|
076ead5773 |
library: the Antigravity app is a Library target, MCP servers and skills reach it as they reach agy (xuanwo on X)
The Antigravity app (agent "antigravity", the one magpie takes over) had no Library target: only agy did, so the app's row offered no MCP servers, skills or rules. antigravity.google/docs/skills and /mcp put the App's and the CLI's user-wide skills and mcp_config.json in the same ~/.gemini/config, so the app uses agy's paths (also in a project's .agents/skills). Run: TestAntigravityAppTarget red on the old code (target nil), green now; go test ./internal/library ./internal/agent and darwin/windows/linux vet via mote-run (see push). Not tried: the real app reading a magpie-written mcp_config.json (no app on this machine; the docs say it does). |
||
|
|
6af54dc9a9 |
library: Claude Code plugins kept as one item, with a Claude plugins tab (FakeshadowzZ on X)
A Claude Code plugin (.claude-plugin/plugin.json, skills/, agents/, hooks/hooks.json, .mcp.json) can be installed into the Library from a folder, a git address or a marketplace.json, and is one row: turned on, off or removed as a whole, and given to the agents picked with the chips every tab has. Its skills, MCP servers, hooks and subagents are ordinary library items tagged Bundle: <plugin>, so each agent gets them through the code of its kind and the Skills, MCP servers, Hooks and Subagents tabs go on working. Off clears every part's agents and keeps them for on; Remove removes the parts. A part whose name the library has gets the plugin's name as a prefix, never over the user's own. Claude hook events and matchers map to the portable ones; others become claude:<Event>, for Claude Code only. Slash commands, LSP servers and non-command hooks are listed as not carried, not dropped. internal/library/plugin.go, POST /api/library/plugins/*, the Claude plugins tab in plugins/library/client.js (en, zh, zh-TW, ja, de), docs/subsystems/library.md. Run (mote): go test -tags nogui ./internal/library ./internal/gui ./internal/backup ./internal/davsync ok; gofmt clean; go vet darwin, linux (-tags nogui) and windows clean. GUI, chromium and webkit, en zh zh-TW ja de at 420 and 1100: library-plugins (new), library-hooks, library-subagents, i18n-keys, i18n-en-no-cjk, click-scroll all pass. Whole GUI suite started and cut short at ~460 of its tests: failing only account-dragging and accounts-sheet (routing, untouched by this), not compared on origin/main. Broken by hand: dropping the Off handling in givePlugin and the hookTakes filter each turned the new Go tests red. Not tried: a real Claude Code plugin from a marketplace, a git source (tests use folders), WSL, Windows. Not carried yet: commands/*.md, LSP servers, a plugin's folder across computers (a backup carries the parts, not the plugin record). |
||
|
|
025123431c |
library: add and remove a project's skills from the CLI (Sephiro_Lan on X, #5193)
magpie library project … does what the window's Library › Projects page
does, through the same library calls its page makes (AddProject,
RemoveProject, ProjectSkills, ProjectSkill, ProjectCopy):
magpie library project [--json] the projects and their skills
magpie library project add <dir>
magpie library project rm <dir> [--keep-files]
magpie library project skills <dir> [--json]
magpie library project skill add <dir> <skill…> [agents=a,b…]
magpie library project skill rm <dir> <skill…>
magpie library project skill agents <dir> <skill> <a,b…|none>
magpie library project copy <dir> on|off
<dir> may be relative or "." (library.ProjectPath / ProjectAt find the
listed project, through a link too). A skill added with no agents= goes
to the agents the page's Skills menu picks: those the project's skills
are for already, else every agent here with a project skills folder.
Each skill added says where it was placed; one that wasn't (a folder
there that isn't magpie's, left as it is) is named with why, and the
command exits 1, so a script tells "installed" from "left as it is" by
the status. --help prints the project usage; an unknown flag, command,
skill, agent or on/off value is refused, and so is rm of a skill the
project doesn't have.
Docs: the Projects row of docs/subsystems/library.md, and the site's
library page in en/zh/ja. site/public/llms-full.txt rebuilt with
`node llms-full.mjs`; it also picks up a line (Alma, Shelley) another
docs change left out of it.
Run (mote, at this tree):
- go test -count=1 -run TestLibraryProject ./internal/cli: ok; the same
on Windows (win-run, xiaomi-gpu): ok.
- go vet ./internal/cli ./internal/library for darwin, linux (-tags nogui)
and windows: ok. go test -count=1 ./internal/cli ./internal/library:
ok (45s, 99s), at this head after the rebase. site: node --test worker.test.mjs: 38 pass. gofmt -l:
clean.
- A sandbox HOME end to end with the built binary: claude and codex
installed, three library skills, a git project. add ., skill add with
no agents= (links in .claude/skills and .agents/skills, listed
in .git/info/exclude, the .gitignore left as it is), a folder of the user's in .claude/skills/pdf (named,
exit 1, untouched), agents=codex, skill agents, unknown
skill/agent/flag/command refused, skills --json, skill rm, rm .: the
links, magpie's folders and the exclude block gone, the user's
folder kept.
Broken by hand: with the not-placed exit taken out, TestLibraryProjectCmd
goes red ("a folder of the user's in the way: <nil>").
Not tried: a project's MCP servers from the CLI (the issue asks for
skills; servers stay on the page), WSL agents, and a real Linux box.
|
||
|
|
3a3d161fa0 |
agent: Claude Desktop uninstalled on Windows is no longer listed (alien_jambob on X)
alien_jambob (Windows 11, 0.1.3603) uninstalled Claude Desktop and magpie still listed it under 未设置. The uninstall leaves %APPDATA%\Claude behind with its claude_desktop_config.json (their Everything search shows it), and Desktop counted as here whenever any of its folders was. - On Windows Desktop is listed only while its program is installed (desktopInstalled): Squirrel's %LOCALAPPDATA%\AnthropicClaude\claude.exe, the MSIX's package folder (desktopdir.Installed, as before), or its package in the AppX registry (Claude_… or the Store's AnthropicPBC.Claude_…, main package only). A Desktop still on magpie stays listed, so it can be turned off, as Alma's fix ( |
||
|
|
87b3af7653 |
library: a project turns a global MCP server or skill off, out of git, and its worktrees follow (WhyULose0 on X)
WhyULose0 asked for MCP servers and skills per project: a global set every project inherits, each project that set ± items (a global one turned off for one project too), one place to tick for every agent, nothing written into the project's git, the router running a shared server once, and a new git worktree following its main project. What was there: projects could add skills and servers (Library → a project's card), the MCP router ran each server once, but a project could not turn a global item off, magpie wrote its entries into the project's .gitignore (a tracked file), and a worktree got nothing. What changed: - Turning a global item off in one project (ProjectServerOff, ProjectSkillsOff; POST /api/library/projects/server-off, skill-off), done the way each agent reads a folder: Claude Code's record of the project in ~/.claude.json (disabledMcpServers; magpie takes out only names it put there), Codex's project .codex/config.toml ([mcp_servers.X] enabled = false, only for a server in Codex's own config), Claude Code's skillOverrides "off" in the project's .claude/settings.local.json. - With the router on, a project that adds or turns off a routed server gives Claude Code (local scope in its project record) and Codex (project config) the hub at /mcp/magpie/hub/<agent>~<projectKey>; hubServers serves that address the project's set, each server still started once. gateway.HubAgentOf cuts the key off for the log, errors and on-demand. - Out of git: entries go to the repository's info/exclude (one block per project, shared by every worktree); the .gitignore is left as the user wrote it, and a block an older magpie wrote there is taken out. A folder git-inited later gets its block on the next KeepLinked. - Worktrees: the project's folder in each worktree of its repository gets the same skills, servers and offs, found on KeepLinked, let go when removed. - GUI: a project's card lights each agent that has an item from the Library; a click turns it off (or back on) in that project. An agent that can't take an off (Gemini CLI etc., or a skill that goes through the skill router) stays lit and says why. The Skills menu ticks inherited skills; unticking turns one off. zh, zh-TW, ja, de. Limits, per agent: - Offs only for Claude Code (servers and skills) and Codex (servers). Codex reads the project config only in a trusted project. - A skill reached through the skill router can't be turned off in one project. - Claude Code keys its record by the repository's main top folder, so a project in a subfolder turns its server offs on repo-wide. Run (mote's SSH refused every try today, kex reset; every run went to the WSL box through wsl-run, linux, at load 60 to 80 from other runs): - go test -tags nogui ./internal/library: ok at this head. At the base before ( |
||
|
|
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
|
||
|
|
a1ba92ad8c |
library: a market of Pi's packages, installed and removed by pi itself (nineruiing on X)
Library -> Pi now has a Discover list of Pi packages: npm packages with the pi-package keyword (pi's own docs: the keyword makes a package eligible for the pi.dev/packages gallery), sorted by monthly downloads, with search. Like the other markets it ships a 500-entry snapshot (market_pi.json), keeps a 6h memory and disk cache, and refreshes from npm. Install and remove run that Pi's own `pi install npm:<name>` / `pi remove npm:<name>` with PI_CODING_AGENT_DIR set to its folder, so settings.json's packages list and <agentDir>/npm are written by pi, not by magpie. Each card says which Pis have it; Install goes straight to the only Pi without it or asks which one; the Pi's list gets a remove button behind a confirm. New routes: GET /api/library/market/pi, POST /api/library/pi/install and /api/library/pi/remove. Run: - mote: go test -count=1 -timeout 45m ./internal/library ./internal/cli ./internal/gui at this head: ok, ok, ok. - mote: gofmt -l clean; go vet of library, gui, cli for darwin, linux (-tags nogui) and windows: ok. - mote: library-pi-market, library-pi-extensions, i18n-keys, i18n-en-no-cjk in chromium and webkit: 52 of 52; the 17 market and library GUI files: 598 pass, 0 fail (pre-rebase tree). - win-run: go test -tags nogui ./internal/library -run 'TestPi|TestMarket' ok (TestPiRunGivesAgentDir skips on Windows). - wsl-run: library TestPi|TestMarket ok; library-pi-market 22 of 22. - Real pi 1.5.1 in a sandbox HOME on WSL: PI_CODING_AGENT_DIR=$A pi install npm:pi-btw wrote packages ["npm:pi-btw"] beside the existing theme and installed node_modules/pi-btw; pi remove put packages back to []. The live ~/.pi was untouched. Broken by hand (each red, then green restored): - the pi-package keyword filter dropped: TestPiMarketFromNPM; - the name check dropped in the market: TestPiMarketFromNPM; - the name check dropped in install: TestPiInstallAndRemove; - PI_CODING_AGENT_DIR not set: TestPiRunGivesAgentDir; - the identity dedupe dropped: TestPiInstallAndRemove; - the installed marking always "live": library-pi-market 11 of 11 red. Not tried: a real magpie binary driving pi install end to end; pi on native Windows; git: and local package sources (the market lists npm only, and the Pi's list still shows and removes them as before). |
||
|
|
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
|
||
|
|
399010bef4 |
library: Avibe and Obsidian have no Library place yet (#5897)
|
||
|
|
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 |
||
|
|
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 |
||
|
|
68cb92e8e6 |
library: name miniQ among the agents not looked at for the Library
|
||
|
|
7869a454cc |
library: the market's docker volume name is compiled on first use
|
||
|
|
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
|
||
|
|
00e8242e85 |
library: Hermes folds its context with billion-context through its /bili/ prefix (Duckb7si on X)
Library › billion-context said no agent could use it on a machine where
Hermes was connected to magpie. Hermes was left out of the lanes on
purpose: bili's native Hermes plugin (hermes-plugin/__init__.py,
apply_env, billion-context 0.1.213) only sets HTTPS_PROXY, HERMES_CA_BUNDLE
and SSL_CERT_FILE. magpie's Hermes provider is http://127.0.0.1:3425/v1,
plain http on loopback, so that proxy never sees it: the plugin would add
its tools and fold nothing.
Hermes now takes the route Zed takes, bili's documented /bili/ prefix.
Turned on, magpie runs `bili start --port 8787` and sets base_url of the
magpie and magpie-anthropic providers to http://127.0.0.1:8787/bili/<gw>,
in config.yaml and in every profile that has magpie's provider
(agent.HermesThrough). Each later Sync or pick keeps a loopback prefix
with a path (hermesPrefix), and drops anything else back to the gateway.
Turning it off puts the gateway back. The empty-list string, docs (en, zh,
ja), llms-full.txt and docs/subsystems/library.md name Hermes.
The other agents bili supports that magpie wires (dsh, Kimi, ZCode, Codex,
Gemini, Qwen, ...) are #5915.
Run (mote, at the rebased head unless said):
- go test -tags nogui ./internal/library: ok (252s) at the rebased head
- go test -run 'TestHermes|TestZed|TestProxy|TestBili|Kept'
./internal/agent ./internal/library: ok before the rebase (base
|
||
|
|
d3f8623408 |
library: a market docker server's options stay inside the container
|
||
|
|
93a33d8174 |
agent: OpenBot's icon, its requests named its own, its skills in the Library (SSNQT on X)
SSNQT on X, magpie 0.1.3503 on macOS, OpenBot (
|
||
|
|
6fa9ff8358 |
library: billion-context's version is read past the warnings bili prints first
readBili ran `bili --version` with stderr and took the output's first word. bili writes its warnings to stderr before the version; with a config key it doesn't know (models, in a sandbox HOME on mote, bili 0.1.213) the output began "2026-11-09T23:44:06.211 [warn] [v=0.1.213] ...", and that timestamp was the card's version. biliVersion takes the first word of the first line that is a version. Run: - go test -tags nogui -run 'TestBili' ./internal/library on mote: ok. - go vet ./internal/library for darwin, GOOS=linux -tags nogui and GOOS=windows: ok. gofmt -l clean. Broken by hand: readBili and the test back on the first word of the output: TestBiliVersionPastItsWarnings red (the timestamp, "[warn]", "command"). Not tried: the card showing it in the GUI (the field is the same string the card already prints). |
||
|
|
97fcbe3540 |
library: billion-context's card shows the tokens it saved (Scott__D on X)
The RTK tab says what RTK saved (rtk gain); the billion-context tab said nothing of its effect. bili 0.1.213 has no command that prints its savings. Its running proxy serves its dashboard's numbers at GET /__bili/overview, summed over every session in its one store, and each bili that runs registers in <state>/instances/<id>.json ($XDG_STATE_HOME or ~/.local/state, then billion-context, on every system; read from bili's dist and its Hermes plugin's twin reader). readBiliSaved (internal/library/bili_saved.go) asks the registered bilis newest first, loopback http origins only, 3s in all, and puts the first answer on BiliView.Saved: netSavedTotal (bili's headline "net savings", after post-fold rebuilds and the summaries' cost, only with hasFoldData), grossSavedTotal (which bili calls an upper bound), foldsTotal, sessions, requests. The answer is kept in bili-saved.json in magpie's config folder and shown "as of" its time when no bili runs; a kept file that doesn't parse is no answer. magpie never starts a bili to ask (it would auto-update and start watchers). The card says "166.3k tokens saved over 7 folds in 1 session", bili's own count over every session on this computer, the gross before costs; "Nothing folded yet over N requests" before a fold; and that it shows once bili has run when no bili ever answered. zh, zh-TW, ja and de; site docs (en, zh, ja) and docs/subsystems/library.md. Run: - Real bili 0.1.213 on mote in a sandbox HOME (ACP_AUTO_UPDATE=0, 20000 token window, bili start on 18799, a fake OpenAI upstream answering usage = bytes/4): ten turns of a growing conversation through /bili/<upstream>/ gave overview net 166285, gross 166390, 7 folds, 1 session, 10 requests. That literal answer is the Go fixture (testdata/bili/overview-0.1.213.json) and the GUI test's numbers. readBiliSaved/ReadBili run on mote against that live bili with that HOME read the same numbers (Live true, Version 0.1.213). - go test -tags nogui ./internal/library ./internal/gui on mote: ok. - win-run go test -run 'TestBiliSaved|TestBiliLoopback' ./internal/library on xiaomi-gpu: ok. - library-bili, i18n-keys and i18n-en-no-cjk in chromium and webkit (every language, 1100 and 420 wide): 92 pass, 0 fail. - gofmt -l clean; go vet darwin, GOOS=linux -tags nogui and GOOS=windows for internal/library and internal/gui: ok. - site/public/llms-full.txt regenerated (node llms-full.mjs); site worker.test.mjs: 38 of 38 ok. Broken by hand: - the loopback filter taken out: TestBiliSavedFromRunningBili red (192.0.2.7 asked first, the 3s budget gone, nothing read). - net read from tokensSaved, and a kept answer marked live: TestBiliSavedFromRunningBili and TestBiliSavedOnThePage red. - the card's line taken out: library-bili 40 of 42 red (chromium). Not tried: a real agent session with a real model through bili (the upstream was a fake with made-up usage, so only the plumbing of bili's numbers is checked, not how much a real session saves); a bili with money data (hasMoneyData; its dollars are passed as usd but not shown); the card on Linux WebKitGTK. |
||
|
|
eff7f9f62a |
library: a market server starts the way its registry entry says (fwxkogaia on X)
Serena from Library → MCP's market showed "已退出 (2)": magpie ran `uvx serena-agent`, which prints its help and exits 2. The registry has uvx run it as `uvx -p 3.13 serena-agent start-mcp-server --project-from-cwd --context desktop-app`: its runtimeArguments, which the shipped crawl (market_servers.json) had dropped and magpie never read. The class, fixed in launchLine (market_launch.go): - runtimeArguments are read: the runner's own options (uvx -p/--from/ --with/--prerelease, npx --package, docker's mounts, -e and --entrypoint) go before the package, the program's words after it, then packageArguments. A required option with no value magpie can fill keeps the package from being offered. - An executable not named after its package is reached with `uvx --from <pkg> <bin>` / `npx -y --package <pkg> <bin>`. The crawl now keeps each package's executables (`bins`: npm's `bin`, the wheel's console scripts); a package with none, or several with none standing out (pickBin), isn't offered. `python -m mod` among runtimeArguments runs that module from the package. - One package that can't be started no longer hides another of the same server (npm, then pypi, then oci). - serverKey/packageOf skip uvx's option values, so Serena's key stays "uvx serena-agent" and an installed one is still found. Audit of the 500 shipped entries (old line → new): 101 change. Among them firebase (`npx -y firebase-tools mcp`), basic-memory, docling, ouroboros, pm-claude-skills, llm-sandbox, polymarket-paper-trader, visualtorch, canvas-mcp, alfanous (python -m), uniswap, pyscrappy, llmtrim, reddit-research-mcp, word-mcp-live, omega, tinysearch, haiku-rag, orcareplay, terravision, watch-skill, PyMemoryEditor, edgartools/mirobody/new-term-radar/backlot (--with/--python), docker robin/funasr/MARM (mounts). No longer offered (no line that starts): aihawk and mcp-sap-docs (not on PyPI/npm), mcp-video, unifi-mcp-server, antigravity-link-extension (no executable), token-savior, flyto-core (several, none for MCP), maintenant and apollo (a docker mount to fill in). Users who installed one already: heal() gives a uvx/npx server whose command and arguments are exactly the line magpie offered before the line the registry says (healMarketLines), so the next start of magpie rewrites library.json and every agent given it. A line the user edited is left as it is. Run (mote, via mote-run): go test ./internal/library ./internal/gui; go vet darwin, GOOS=linux -tags nogui, GOOS=windows; gofmt. TestRegistryLaunchLines uses the registry's own entries (Serena, docling, olcli, alfanous, visualtorch, basic-memory, firebase, MARM, ...); TestPopularSerenaStarts reads the shipped crawl; TestInstalledMarketLineHealed seeds `uvx serena-agent` given to Codex, syncs, and checks config.toml and library.json. No network in tests. Real starts on mote in a sandbox HOME (MCP initialize): `uvx serena-agent` exits 2 with usage; the new Serena line answers initialize (serverInfo Serena). Also answer: polymarket pm-trader-mcp, basic-memory, llmtrim, pm-claude-skills, visualtorch-mcp. canvas and reddit start but need their keys. Broken by hand: ignoring runtimeArguments and the bins check turns 14 of TestRegistryLaunchLines' cases and TestPopularSerenaStarts red; dropping healMarketLines from heal turns TestInstalledMarketLineHealed red. Not tried / still wrong upstream: omega and tinysearch now run their real executable but their registry entries omit the `[server]` extra (omega also needs `serve`), so they still don't serve MCP; that is their registry entries. Docker lines weren't started. No GUI asset changed, so no GUI files were run. The full suite runs after the tag. |
||
|
|
e7fe52fdc3 |
minimax: follow the data folder MiniMax Code Desktop moved, not ~/.minimax (YujunT46308 on X)
YujunT46308 on X (magpie 0.1.3519, MiniMax Code 3.1.13 CN): with the app's data folder moved to another parent (localRuntimeDataParentDir), magpie went on writing ~/.minimax/config.yaml, which the app no longer reads. How MiniMax Code 3.1.13 finds it, read from its own app.asar (dist/main/modules/local-runtime/data-dir.js, resolveLocalRuntimeDataDirSelection; @mavis/config's config.js for the runtime): MINIMAX_DATA_DIR, then MAVIS_DATA_DIR, then the desktop setting, then ~/.minimax. Settings' data-folder move keeps the parent as config.localRuntimeDataParentDir in its electron-store file (storage.ipc.js: minimax-agent-cn-config.json for the China build, minimax-agent-config.json for the global one) in Electron userData, named by app-identity.js: "MiniMax" (CN) / "MiniMax Agent". The data folder is <parent>/.minimax. What changed: - appdir.MiniMaxDirIn resolves the folder in that order, reading the store under ~/Library/Application Support on a Mac and %APPDATA% on Windows. A missing, unreadable or unparseable store, or a parent that isn't an absolute string, is ~/.minimax, as electron-store itself reads a file it can't parse as its defaults. - internal/agent's MiniMaxDir (detection, connect, restore, Sync, Check) and internal/sessions' MiniMaxDir (Usage's calls) both use it; the Library's skills follow a.Dir. WSL's mcode still uses the distro's ~/.minimax (no desktop app there). - MAVIS_DATA_DIR joins agentenv's variables, so tests sandbox it. - agent-wiring.md and reference.md say where the folder comes from. Run: - On mote, the real MiniMax Code 3.1.13 CN arm64 dmg: launched with no setting, userData was ~/Library/Application Support/MiniMax holding minimax-agent-cn-config.json; with config.localRuntimeDataParentDir set to a folder, the next launch created <parent>/.minimax/config.yaml. appdir.MiniMaxDir() against that real store printed <parent>/.minimax. (The test data I made on mote was removed after.) - mote-run go test -count=1 ./internal/appdir ./internal/agentenv ./internal/sessions ./internal/library: ok. ./internal/agent -run 'MiniMax|Minimax|WSL|Env|Spelled|Handwired': ok. - win-run go test -run MiniMax ./internal/appdir ./internal/agent ./internal/sessions: ok, TestMiniMaxDirIn and TestMiniMaxCodeMovedByDesktop ran (not skipped) with %APPDATA% paths. - gofmt -l clean; go vet of the touched packages for darwin, windows and linux (nogui, CGO off) ok. Broken by hand: with the desktop store read turned off, TestMiniMaxDirIn and TestMiniMaxCodeMovedByDesktop go red (the folder reads as ~/.minimax). Not tried: the Windows desktop app itself (userData %APPDATA%\MiniMax is Electron's appData plus the app name, the same rule seen on the Mac); the global build's store with a real install; a store mid-rollback (the app's guard writes the restored parent back to the same key on its next launch). A user who also runs the mcode CLI without MINIMAX_DATA_DIR has it on ~/.minimax, which magpie now leaves alone while the desktop folder is moved. |
||
|
|
bb4dd86790 |
appdir: magpie's files and cache move to another disk, a link left where they were (CHENGJIAHEGOXIS and buhaodeshiyehao on X)
CHENGJIAHEGOXIS asked to keep magpie's data and cache on an external SSD instead of the Mac's own disk. buhaodeshiyehao asked to keep magpie's personal data on another disk. Settings › Sync now has a Data folder row. It shows where magpie's files are, with Show, Move… and Move back. `magpie data` does the same from a terminal. - What moves: appdir.Config() and Cache() only, into <picked>/magpie/config and /cache. The agents' own folders and session histories stay where each agent reads them. A link is left at each old path, so every path the agents were given still works. On Windows, when symlinks need a privilege (#973), the link is a junction; library's junction code moved into appdir for this. - Never under a running magpie. Move… explains first in the app's own dialog, then asks for the move (move-to.json). The app restarts itself through the update path's relaunch and quits, and the new process makes the move in cli.Main before it reads anything, once. A failed move is kept in move-result.json and shown under the row. When another magpie serves the gateway, or for magpie web, the app doesn't restart, and the row says the move waits, with Cancel. - Refused before anything quits: a relative or missing folder, a magpie folder there with files in it, or a folder inside magpie's own. - One disk: a rename. Across disks: a copy. The old folder is put aside until the link is made, and a failed copy leaves everything as it was. - Disk unplugged: magpie stops with an error (and a native alert from the app, as #989) instead of starting empty and writing over the link. - Usage history in auto backups is left for a follow-up: auto backups are plain JSON kept 7 times, and usage is large and synced separately. Docs: sync-backup.md has a "Data folder on another disk" section, and docs/start's #data-folder (en, zh, ja) describes Move…. Run (mote, at this tree on |
||
|
|
e4197144a8 |
perf: every package's package-level regexps compile on first use
v0.1.3516 made gateway's and redact's patterns lazy. The other 299 package-level regexp.MustCompile calls, in 148 files across agent, provider, gui, library, codexcat, sessions, usage, plugin and the rest, now go through lazyre.New too, so a launch that never reaches them (`magpie statusline`, run by Claude Code on every message) doesn't compile them. Fields, maps and params that held them are *lazyre.RE. Measured on mote (M5 Pro), sandbox HOME, v0.1.3516-equivalent build (t42) against this one (t43): - GODEBUG=inittrace=1 sum: 7.39 MB / 69,837 allocs -> 4.62 MB / 46,765 - `magpie statusline`, 3 runs each: instructions retired ~212M -> ~176M, peak memory footprint 19.2-19.4 MB -> 16.8-17.0 MB Run: go vet ./... (darwin) ok; GOOS=windows go vet on each of the 30 changed packages ok; GOOS=linux go vet ok except ., internal/cli and internal/gui, which stop in wails v3's cgo files when cross-compiled (the same at main). New TestAllLazyPatternsCompile at the root compiles all 574 registered patterns (ok), so a bad pattern fails a test rather than a first use. Not run before push: the changed packages' own test suites; they run on mote after it. |
||
|
|
ef0d589ed7 |
library: a project's skills are picked from its menu, its card lists only those it has (POM_JUMPING on X)
POM_JUMPING on X: "skill加入本地项目是能否可选?之前添加到本地项目会把所有skill添加进去".
Nothing wrote every skill into a project: AddProject starts it with none.
But an opened project card listed every library skill as a row, each with
its agent chips, so the project looked like it had them all, and choosing
meant scanning every row for the chip to press.
Now the open card lists only the skills the project has (a skill unticked
in this view stays listed until the card closes, so a chip slip can be
put back), with "No skills yet" when it has none. A "Skills" app menu
(openProtoMenu, multi-select, with search past 8 skills) beside the copy
switch picks which go in. On close it writes only what changed:
- a ticked skill goes to the agents the project's skills are already
for, or, in a project with none, to every agent that reads a project's
skills and is installed;
- an unticked one comes out (agents []);
- skills not touched keep their agents as they were.
Several picks are one write: library.ProjectSkills (API
projects/skills, {dir, names, agents}); ProjectSkill now calls it.
New status strings "{skills} are in/out of {name}" in zh, zh-TW, ja, de.
Run (mote; first at
|
||
|
|
4869d0c966 |
library: an MCP server switches off for every agent and app, and on again as it was (swang20201 on X)
An installed server in Library could only be removed. Each server row
now has a switch after its agent chips. Per-agent chips already
existed, but in Docker gateway mode there are none, and the MCP router
gives every server to any app at its address, so nothing could turn a
server off there.
ServerOn (POST /api/library/servers/on, `magpie library mcp off|on
<name>`) reuses the Hidden/Paused pair a plugin's hidden server
already has. Off: Hidden, with its agents kept in Paused. On: those
agents get it back, or none when it had none, so the router gives it
to other apps again. Its command, env, headers, sign-in, DisabledTools
and note stay in library.json. Off, it is also left out of every
project's files (syncProjectMCP) and of subagents' mcpServers
(renderSubagent), which before had only skipped a server gone from
the library. The router's held process ends on the next prune,
because Hidden/Paused are in its hubKey. An off row is dimmed, its
chips take no click, and it is health-checked only on a click.
Strings are in zh, zh-TW, ja and de. docs/subsystems/library.md has
a row for it, and mcp-router.md names it.
Run (mote):
- go test ./internal/library ./internal/cli ./internal/gui: ok.
- go vet ./..., GOOS=linux -tags nogui, GOOS=windows: ok.
- gofmt -l: empty.
- GUI: the 145 files that touch the Library, i18n-keys and gui-*, in
chromium and webkit. 2798 of 2881 passed.
- i18n-keys was red because the key "{name} on" also matched core's
"{name} on magpie". The key is now "Turn {name} on or off", and
i18n-keys and library-mcp-on are green (26/26).
- Nine files are red the same way on a clean origin/main
|
||
|
|
b75aff1073 |
library: billion-context for Zed through its /bili/ prefix (CoMi6818 on X)
billion-context's README lists Zed, but Library's billion-context tab offered only Pi, omp, OpenCode and Claude Code. Zed has no plugin of bili's. Upstream gives it two routes: `bili zed`, a Linux-only launcher that leaves a provider on loopback direct (so it never passes magpie's gateway), and, on every system, the /bili/ prefix its docs give any client whose model address can be edited, with `bili start` answering on 8787. Zed is now a URL lane (biliURLLanes, internal/library/bili_url.go). Switched on, magpie has bili start answer (one the user runs is used; else magpie runs its own under KeepLinked's context, logged to bili-start.log, and starts it again at magpie's start while Zed is on), then agent.ZedThrough sets the magpie provider's api_url to http://127.0.0.1:8787/bili/<gateway>/v1 and saves the key for that address in the credential store, where Zed looks it up by address. A pick and a sync keep the prefix while magpie answers through it (zedReach, #1985's proxy recognition). Off puts api_url back on the gateway and ends magpie's bili start when nothing goes through it. Zed must be on magpie first; the error says to pick a magpie model. Run: - bili 0.1.213 on mote: bili start --port N, then /bili/http://127.0.0.1:<fake magpie>/v1 forwarded GET /, GET /v1/models and POST /v1/chat/completions with Authorization kept and bili's tools injected (repro/zedroute.sh). - mote: go test -tags nogui ./internal/library ./internal/agent (full packages), go vet darwin, GOOS=linux -tags nogui, GOOS=windows. - mote: library-bili, i18n-keys, i18n-en-no-cjk GUI tests (chromium and webkit). - win-run: go test ./internal/agent ./internal/library -run 'TestZed|TestBili'. - gofmt -l clean. Broken by hand: SetBili without the URL-lane dispatch, and zedReach without the proxy keep: TestBiliZedThroughPrefix and TestZedThroughBili go red; restored, green. Not tried: a real Zed app through bili (no Zed on mote), and the real keychain write (zedCredential stubbed in tests, as before). Other clients upstream lists (Cline/Roo/Kilo, Continue, OpenHands, Void, Cursor, Warp, launcher-only lanes) are not added here. |
||
|
|
3aa55065a3 |
library: Claude Code keeps its auto-compaction beside billion-context (Kling__Lab on X)
Kling__Lab's Claude Code stopped after a little use with "Prompt is too long", every message answered at once (作業時間 0s) with nothing sent. bili's Claude Code install writes DISABLE_AUTO_COMPACT=1 into the shared ~/.claude/settings.json. A session bili doesn't fold then has nothing to keep it under the window: the Claude desktop app's Code tab runs Claude Code on that settings.json with its own ANTHROPIC_BASE_URL, past bili's proxy (bili's own #2290), and a window bili takes larger than the one magpie serves lets the session reach it first. With auto-compaction off, Claude Code blocks locally at about window-3000 and returns "Prompt is too long" without a request. magpie now writes "0" in place of bili's added "1" right after the install. bili leaves a value that isn't "1" as the user's, through its SessionStart hook and a reinstall, and its remove takes only a "1". So auto-compaction stays on as a backstop at the window magpie wrote (CLAUDE_CODE_AUTO_COMPACT_WINDOW), which bili, when it does fold, keeps the session under. A DISABLE_AUTO_COMPACT the user had before the install is left as theirs. A plugin magpie installed before this is mended from KeepLinked at start, and its bili-plugins.json record says "0" too, so switching it off still puts the file back as it was. Reproduced on mote with Claude Code 2.1.321 and billion-context 0.1.213 against a fake gateway reporting 195000 input tokens on a 200000 window: with DISABLE_AUTO_COMPACT=1 the second turn is "Prompt is too long" with no request sent; with 0 it compacts and goes on. Run (mote-run): go test -tags nogui ./internal/library -run 'TestBili|TestParseBiliList' -v, all ok, including the new TestBiliClaudeKeepsAutoCompact (on and off, the user's own value, a plugin installed before), then the whole package (go test -tags nogui ./internal/library ok, 154s). gofmt -l clean; go vet ./internal/library ./internal/gui/..., GOOS=linux -tags nogui and GOOS=windows go vet ./internal/library ok. Broken by hand: biliKeepCompact returning at once. The new test's "on and off" and "installed before" went red (DISABLE_AUTO_COMPACT = 1 after the install / after magpie started), "the user's own" stayed green. Not tried: the real Claude desktop app's Code tab, and a real bili install on a real account; the fake bili in the test copies bili 0.1.213's "1 only when absent or 1" rule, read from its source. |
||
|
|
fdc96dfe4d |
library: a billion-context tab switches its plugin on per agent and restores each file exactly
@Kling__Lab on X asked for billion-context (npm billion-context, CLI bili, github.com/ranxianglei/billion-context) beside RTK. The Library gets a billion-context tab after RTK, a card like RTK's: - No bili: its README's `npm install -g billion-context --prefix=~/.local` and Install billion-context (InstallBili; biliPath finds bili in ~/.local/bin when it isn't on PATH). - Installed: its version, a note that an agent switched on here can't also run billion-context-pi or opencode-acp, and a switch per agent that runs `bili plugin install|remove <agent>` (SetBili), read back from `bili plugin list`. - Offered for Pi, omp, OpenCode and Claude Code, the lanes that keep magpie in front: Pi/omp/OpenCode load it in process and still send to magpie; Claude Code goes through bili's proxy, which forwards to magpie's gateway. Not offered: Codex (MCP only), ZCode (routes only its own provider), Kimi Code (renames default_model to bili-kimi), dsh (its install failed through dsh's pnpm), Hermes (can't be tried in a sandbox HOME), and agents in WSL. bili's remove doesn't restore a file: it leaves `"packages": []` in Pi's settings and `extensions:` in omp's config, and after magpie rewrote Claude Code's settings.json it deleted ANTHROPIC_BASE_URL (Claude Code then went to Anthropic, not magpie) and put back DISABLE_AUTO_COMPACT. So switching on records each file before and after (bili-plugins.json in magpie's config folder), and off writes the before bytes back when the file is unchanged since, else merges JSON three ways; with no record (bili set up outside magpie) only a Claude Code ANTHROPIC_BASE_URL the remove took out is put back. bili's .bili-bak/.bili-last files go too. `GET/POST /api/library/bili`, `POST /api/library/bili/install` are named in the CLI parity list beside RTK's. Docs: site library pages (en, zh, ja) and docs/subsystems/library.md. Run: - go test ./internal/library -run 'TestBili|TestParseBiliList' on mote: ok (a fake bili mimicking pi/claude lanes, .bili-bak re-backup and claude's buggy remove; a fake npm for the install). - Full `go test -timeout 45m ./...` on mote at 16c67965f (this commit before the body was written, same tree): every package ok but internal/gateway's TestBurstTellsNoSpeed/responses_from_chat_burst (804ms burst read as a speed, load ~50 after a mote reboot); passes -count=3 alone at the same head; recorded on #2719, same test. An earlier full run at 8c8c63537 was all ok. - GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./..., go vet ./... at 16c67965f: ok. gofmt -l: nothing. - GUI at 16c67965f: library-bili, i18n-keys, i18n-en-no-cjk, library-memory, library-rtk-gain, library-pi-extensions, Chromium and WebKit (library-bili: every language, 1100 and 420 wide). 80 of 80 pass. - The whole GUI suite is still running on mote at this head, started before the tag; two earlier whole-suite runs were cut short (mote ran out of disk mid-run, then rebooted), so their reds are not a record. Its result goes in a follow-up. - Real, in a sandbox HOME (named dir, bili 0.1.213 installed there, magpie web built from this branch on 3486/3487): through magpie's API, Pi and Claude Code switched on; `claude -p` and `pi -p` each answered "pong" through magpie's gateway (Claude Code via bili's proxy on 18788 -> 127.0.0.1:3486); switched off: Pi's settings.json, Claude Code's settings.json and .claude.json byte-identical to before, no .bili-* files left, commands/acp-cache.md gone; claude -p answered again straight to the gateway. Earlier, with bili run by hand, Pi, OpenCode, omp, Claude Code and Kimi each sent a request through a recording relay with bili's tools/headers on it. Broken by hand: skipping biliRestore turned TestBiliOnOffExact, TestBiliClaudeKeepsMagpiesRoute and TestBiliOffWithoutRecord red; dropping the no-record URL fix turned TestBiliOffWithoutRecord red; removing the tab turned all 22 library-bili cases red; removing the zh note string turned the zh cases red in both engines. Each put back. Not tried: Kimi, dsh, Hermes, Codex, ZCode lanes (not offered); WSL; Windows (the %APPDATA%\npm lookup and npm without --prefix are untried on the Windows box); OpenCode and omp switched through magpie's API (switched by hand with bili before); a real npm install from the button (sandbox had bili already; the test fakes npm). |
||
|
|
a28744c325 |
gateway: memory is an MCP server every agent can mount
memory_search, memory_save and memory_forget at /mcp/magpie/memory, served and guarded as the search server is (serveMCP): another computer reaches it only while magpie is shared, with a gateway key. A save through it is active at once, origin agent, kept everywhere, for the project (the git repository the agent works in, by its remote) or for the agent alone; without a folder or a client name it says it can't know rather than guess. - The Library's market offers it as magpie-memory, run as `magpie mcp memory` (browsermcp.RunMemory): stdio relayed to the gateway with the folder it was started in (X-Magpie-Cwd) and the client name from initialize (X-Magpie-Mcp-Client). - Behind the MCP router the hub keeps it on this computer (hereOnly) and passes the caller's roots and client in _meta (wantsCaller), as it does for magpie's own server. - OwnMCPPath lists it among magpie's own servers. - Judged as its sibling servers are: a gateway key's MaxConcurrency doesn't hold it (a tool call of a turn already held), and a read-only key is refused (memory_save writes). The first full gateway run was red on TestKeySlotEveryRoute and TestReadOnlyKeyEveryRoute until the route was listed. Run (mote-run): - go test -tags nogui ./internal/gateway: ok (881.5s) - go test ./internal/browsermcp ./internal/cli ./internal/memory: ok - go test ./internal/library: ok (130.9s) - go vet, GOOS darwin, linux, windows: ok; gofmt -l clean Broken by hand, each red, then green restored: - the hub not sending memory its caller (wantsCaller without isMemory): TestHubTellsMagpieMemoryItsCaller "roots asked false" - the relay not setting X-Magpie-Cwd: TestMemoryBridgeSendsFolderAndClient - the gateway ignoring X-Magpie-Cwd: TestMemoryMCPSharedAcrossAgents (a project fact kept everywhere) Not tried: a real Claude Code or Codex mounting magpie-memory. |
||
|
|
79decfe71a |
library: the agents ticked for instructions are given memory's digest
The agents ticked under Library → Instructions get a "## Memory" part in
their instructions: the global memories, the agent's own, and each
project's under the folders it was seen in (memory.Digest), unless
Instructions.NoMemory. The digest changes only when published, so an
agent's instructions (and the prompt cache on them) change mid-session
only then: at once when the user changes memory (PublishMemory(false),
called by the GUI), and once a day from KeepLinked's loop for what
agents saved meanwhile (PublishMemory(true) -> memory.PublishDue).
PublishDue writes nothing while memory has never held anything, so a
user who never uses memory gets no memory.json.
Run (mote-run, whole worktree, with the rest of the memory layer):
- go test ./internal/memory ./internal/library: ok (library 130.9s)
- go vet ./internal/memory ./internal/library ./internal/gui, GOOS
darwin, linux, windows: ok
- gofmt -l: clean
Broken by hand (mote-run -run TestMemoryDigestInInstructions):
- memoryDigest's NoMemory check removed: red. It first stayed green,
since the test switched NoMemory on with memory.json deleted; the test
now gives memory back and sees the part return before switching it off.
- PublishDue's "nothing kept" guard removed: red ("a due publish with
nothing kept wrote memory.json").
Not tried: a real agent reading the digest in its instructions.
|
||
|
|
88b541a25c |
images: every pointer names Settings › Models › Images, where the page is
The image models moved under Settings › Models, but the Library's Magpie
Image sheet, the MCP server's instructions to agents, the gateway's
"no image model" errors, the video tool's text and the docs still sent
users to "Settings › Images", a tab that no longer exists (the scattered
settings audit after netube99 on X). Every user-facing string now names
Settings › Models › Images in en, zh, zh-TW, ja and de, as do the site's
Qwen docs (en, zh, ja), llms-full.txt, the subsystem pages and comments.
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
dae104bfac |
capre: a length check, not an unrolled repeat, holds nine patterns
Go's regexp unrolls a bounded repeat into that many copies of its
class: [A-Za-z0-9.-]{0,254} (the session terminal's bundle id) was
89kB of program, kept from start to exit, and Codex's item-id refusal
`.{0,1000}?` 88kB. Measured one by one over magpie's 540 package-level
patterns (1.5MB in all), the nine largest bounded ones were ~440kB.
capre.MustCompile(expr, max) is the pattern with * or +, matching only
a string of max characters at most (rune count, so the (?i) Kelvin
sign and invalid bytes count as the regexp counted them). The nine:
settings' bundle id, library's name and agent id (now name@wsl:distro
cut in two), Anthropic tool names, the trace page's name and find,
access's MCP server, OpenClaw's profile and Codex's provider id. The
item-id refusal is a function: the tail within 1000 characters of a
head.
Run on mote (go1.26.8):
- go test ./internal/capre ./internal/access ./internal/settings
./internal/library ./internal/sessions ./internal/agent ./internal/gui
. : ok; ./internal/gateway -run 'ItemID|Undeclared|ToolName|Refus': ok
- TestCappedMatchesBounded holds each old pattern against its new one
over 14 units x 19 lengths (0..300, at each bound +-1); with the
length check taken out it is red (1586 mismatches).
TestItemIDRefusalAsTheRegexp holds the function against the old
regexp at 998..1002 characters of x, é, 日, \xff, \n; with 1001 it is
red. TestCappedIsSmall: 1304 bytes held, 49680 bounded.
- go vet native, GOOS=linux and GOOS=windows over the touched packages
(gui natively: its Linux build needs cgo); gofmt -l clean.
- Real build, GODEBUG=inittrace=1: magpie's own inits allocate
11.93MB -> 10.61MB.
- Idle on the real-account copy, 180s heap: regexp programs (sampled)
4.54MB -> 3.01MB.
Not tried: the full ./... suite; the gateway package beyond the run
above.
|
||
|
|
fc8e98ba47 |
edit: Codex's thousands of [projects] tables are left out of the reads that don't want them (#2278)
Codex writes a [projects."…"] table for every project it is trusted in;
the owner's config.toml has 10,933 of them in 1.5 MB. go-toml's decoder
checks each table against its siblings one at a time, so every decode
of the file cost ~0.3s of CPU, and six readers decoded it again each
time Codex wrote it, plus a whole-file check before each write magpie
made to it.
- edit.TOMLWithout drops [projects…] tables in a single unstable.Parser
pass. The agent's codexTopOf, sessions' readCodexConfig, provider's
readCodexStoreSetting, library's rtk sandbox, hooks rekey and MCP
entries read through it. None of them reads projects. A file that
doesn't parse is passed through unchanged, so it still fails.
- validateTOML checks definitions with the rest of the file and the
projects decoded apart, 128 projects to a decode. A bare [projects]
table, a dotted projects.… key outside the tables, or any error
decodes the whole file, so the error is the one it gives.
Run on mote (M5 Pro):
- BenchmarkCodexConfigDecode (10,933 projects): 283ms -> 7.6ms a decode.
- BenchmarkValidateCodexConfig: 52ms (the whole decode was 283ms).
- Startup CPU profile, first 70s, the real-account copy (the real
1,524,099-byte config.toml): 2.76s -> 2.26s of samples; go-toml
0.32s -> none sampled.
- go test ./internal/edit ./internal/sessions ./internal/provider
./internal/library ./internal/agent: all ok.
- go vet of the same five on darwin, GOOS=linux and GOOS=windows; gofmt -l clean.
Broken by hand:
- Decoding the batches into struct{} instead of a map:
TestValidateTOMLDefinitionsInGroups went red ("a key twice", "a
subtable then its key"), so the check keeps maps.
Not tried:
- the whole suite. Only the five packages that read the file were run.
- Now that projects is left out, a project table defined twice no longer
fails these readers' decode. Codex itself refuses such a file.
|
||
|
|
b475004d52 |
library: Pi's extensions and packages, switched and copied between Pis
leokon3 runs Pi on Windows and in WSL and asked for magpie's Library to manage Pi's extensions and packages. A new "Pi packages" tab in the Library lists each Pi here (this computer's and each WSL distro's), with the extensions and packages it loads, read by Pi's own rules (@earendil-works/pi-coding-agent 1.4.0). Each has a switch, written as `pi config` writes it, and a "Copy to…" menu for the other running Pis. - A package is copied as its settings.json entry; Pi installs it itself when it next starts. node_modules is never copied. A local package, and one the other Pi already has by Pi's identity (npm name, git host/path), is refused. - An extension file or folder is copied as files, without node_modules, .git or symlinks, never over one of the same name. The page says to run npm install there when it has dependencies. - A package that already picks some parts (filtered in `pi config`) shows its switch disabled. A settings.json that can't be parsed lists nothing and is never written; a stopped distro is never started; every write is backed up first. - GET/POST /api/library/pi, POST /api/library/pi/copy (notYet in the CLI parity list, stage 3: the library). Run at 29d63e2dd (this tree on origin/main c7ebb6f8d; rebased after onto |
||
|
|
3480f822c5 |
library: an apply over a library that lost its instructions leaves the agents' parts alone (#5709)
Starting v0.1.3327 applied the Library at launch while it was empty, and
the apply wrote that over nine agents' instruction files: zcode's lost
magpie's part, and codex's, kimi's, opencode's and dsh's AGENTS.md were
deleted whole, with nothing asked or logged. library.json then recorded
hash("") for every agent. syncInstructions fell through to
withBlock(file, "") and, for a file with nothing of the user's outside
the part, edit.Remove.
Now:
- An automatic write (Sync: at a start, and beside a change) that would
write nothing over a part while the library has no instructions to
give anyone (no agent ticked, or no shared text) leaves the part where
it is and logs a line per agent, naming a record whose last write
hashes empty. The reporter's library.json had both. Only the page's
own write (changeInstructions) takes parts back; a text still held
with one agent unticked takes back as before (TestWSLStoppedInstructions).
- An automatic write never removes a whole instructions file; it empties
it in place. The page's write keeps the removal, with the backup first.
- A set's or an agent's extra text that is there but can't be read
(readText swallowed the error) is a Problem, never an empty text: an
unreadable set file no longer cuts parts down, on the page's writes too.
Siblings left: syncMCP, syncHooks, syncSkills and syncSubagents take back
by Applied record what magpie wrote (config entries and links that the
library and market can give again, not prose), and a library reset that
loses their lists loses those records too. The sync chain (an empty part
coming down from another computer) is #5642's commit.
Ported from ggbdpq's patch on the issue, with the guard widened from
"no shared text" to "no agent ticked or no shared text" and the
unreadable-text check added.
Run:
- New tests in internal/library/empty_library_test.go, all red on the
old instructions.go/sync.go (part cut to the user's own lines, or
"deleted whole by the apply"), green after:
TestEmptyLibraryApplyLeavesAgentsFilesAlone,
TestEmptyTextApplyLeavesTickedFilesAlone,
TestApplySaysWhyItLeftAPartAlone,
TestUntickedLibraryApplyLeavesFilesAlone (agents unticked, text kept:
red under the original patch's guard too; the page's untick still
takes back), TestUnreadableTextLeavesFilesAlone (set file mode 000).
- go test -tags nogui ./internal/davsync/ ./internal/library/ on mote.
- gofmt -l on the changed files: nothing.
Not tried: the reporter's v0.1.3327 upgrade that emptied the index.
Reported-by: lennonli (yetone/magpie#5709)
Reported-by: gua2100 (Discord)
Co-authored-by: ggbdpq <ggbdpq@gmail.com>
|
||
|
|
dc098c1e82 |
library: a skill from a folder follows GitHub once installed from there (biubiu8802 on X)
biubiu8802 (X, 2119602075864903924) downloaded a skill from GitHub and put it in the Library from its folder, so it had nothing to update from and no way to link it to GitHub. Installing it from its GitHub link now links the two, the way an update of a CC Switch skill already does: the library's skill by that name takes GitHub's files and GitHub as its source. A check and an update cover it from then on, and the agents' links keep pointing at it. When its own files aren't GitHub's, they go to the backups like UpdateSkill's replace does, and the result says so. A folder of the user's it was linked to stays as it is. followsHere (skill_link.go) decides it. It links only a skill with no remote source that wasn't renamed and is that skill: it traces to this repository (CC Switch, the skills CLI's lock, a git checkout, From), or it traces nowhere and its SKILL.md has the same description as GitHub's, as an older download of it does. One traced to another repository, or an untraced one that describes something else (mora1n's case, TestInstallSetPutsAnotherByTheSameNameBeside), still goes in beside it (skill_beside.go). A had skill with the same files and no source is bound to the GitHub source it was found in, so a later install of another repository's skill by that name goes beside it, not over it (TestSameFilesByNameAreHad). The probe marks such a candidate links:true. The GUI's Add list tags it "links to GitHub" with a tooltip, and the report names "updates from GitHub now" and "files of their own kept with the backups". The TUI's probe list and result line say the same. The new strings are in zh, zh-TW, ja and de. Run on mote (macOS), on |
||
|
|
2a64b4bcb7 |
library: a skill router, one magpie-skills skill listing an agent's skills
Like the MCP router, for skills. With the Skills tab's new "Skill router" switch on (off by default), each agent's skills folder gets one skill of magpie's, magpie-skills, in place of a link of each skill ticked for it. Its SKILL.md lists them, each with its description and the path of its SKILL.md, and the agent reads that file when a task fits. An agent then carries one skill's description in its prompt however many the Library gives it. - The entry is a link to <settings dir>/skill-router/<hash of the folder>/, which holds SKILL.md and a hidden .skills/<name> link of each listed skill (hidden, so Codex, OpenCode and Pi don't find a skill twice). Its description stays within 1024 bytes (Codex's limit), cut on a whole character. - Every skill is listed unless it is kept direct (a button on the skill, or `magpie library skill router <name> direct`; carried by a sync), is only for the user to type (disable-model-invocation), is in ~/.agents/skills, is blocked, or the agent has its own by that name. Those keep their own links. - An agent whose folder can't take it keeps every link, and the page says why: given copies, a live agent picking its own, the shared ~/.agents/skills, a Library skill called magpie-skills, or a magpie-skills of the user's (never written over). - Claude Code 2.1.316 asks before reading outside its project, its skills folder too, so magpie adds Read rules for the entry and the folders behind it to permissions.allow, records them, and takes out only its own when they go (as permissions.deny does). - The switch is this computer's alone; `magpie library skill router on|off` sets it from the CLI. - Sessions count a routed read of .skills/<name>/SKILL.md as <name> (Claude Code, Alma, Droid), and calling up magpie-skills itself as no skill, so a use counts once. - docs/subsystems/skill-router.md, with a row in the index. Run at this tree (rebased on origin/main |
||
|
|
56f0956044 |
codex: switching Codex off gives a relay's table its own base_url back
Switching Codex off on the Agents page left a provider table of the
user's own (a relay, not CC Switch's) pointed at magpie's gateway, and
forgot the relay's URL for good. takeTables points such a table at
magpie while a Codex thread names it, and keeps its base_url in the
stash (codex.tables). bringOver then moves that thread onto magpie, so
by the Disconnect no thread names the table any more: giveTables asked
ccSwitchTables for the tables on magpie, which skips a table no thread
names, put nothing back, and dropped the stash. Codex was left on the
user's provider again, with that provider sending to 127.0.0.1:3425.
giveTables now reads each stashed table as it is and puts the URL back
where it still says magpie's; one the user changed since stays.
The report ("all of Codex's configuration was reset to defaults" after
the switch and a Codex restart) is not reproduced as such: every other
line of a full config.toml survives the Disconnect, an edit made while
connected too, in each auth and provider case. The new test is the
guard for all of it. TestCodexOffKeepsAppsOwnConfig guards the other
writer the switch sets off (agent.Rewired starts the library's Sync,
which gives Codex its MCP servers one way on magpie and another off it):
what the Codex app writes for its browser, Chrome and computer use
(plugins, marketplaces, node_repl with its env table and env_vars, a
server kept off, shell_environment_policy.set, [desktop]) stays through
on and off, node_repl imported into the library or not. It passed on the
old code too.
Run (mote, then the Linux box once mote's disk filled up): go test -run TestCodexOffKeepsUsersConfig ./internal/agent
(10 subtests: ChatGPT, API key, no auth, relay, relay + ChatGPT, each
with and without an edit while connected), go test -run Codex
./internal/agent ok 37s, go vet for darwin, linux and windows; on Linux (wsl-run) go test -run
'TestCodexOffKeepsAppsOwnConfig|TestRunCodexEntry|TestRunDirectServerIsCodexsCommand'
./internal/library and TestCodexOffKeepsUsersConfig ok, go vet for all
three systems of internal/agent and internal/library. The
config.toml each subtest leaves was loaded by the real Codex CLI
0.164.0-alpha.11.1 (codex mcp list, sandbox CODEX_HOME): all ten load
and list the user's MCP servers.
Broken by hand: the old giveTables back, the four relay subtests go red
with "lost base_url = https://relay.example.com/v1".
Not tried: the Codex app (ChatGPT.app) itself switched off and
restarted; the reporter's own config, version and OS (not known).
Reported-by: darwish4021 (Discord)
|
||
|
|
922cc0ccf8 |
library: a plugin's tools hidden from every agent from its Plugins row
chengming0v0 (Discord) keeps a plugin for its providers but doesn't want
the MCP server it brings (minimax_query_video_generation and the rest)
shown to agents, and doesn't want to remove the plugin.
Before: a plugin that gives tools is a Library server of its own
(plugin_tools.go), switched per agent with the row's chips in Library ›
MCP, which held through updates and off/on. Nothing on the Plugins page
said so: its line read "Tools for every agent" whatever the Library had,
and an app at the router's address (/mcp/magpie/hub, agent "") was given
every server, ticked for any agent or none, so taking every chip off
still left the tools there.
Now:
- The plugin's tools line says "Tools for agents" or "Tools, hidden from
agents", with Hide from agents / Give to agents beside the copy button
(plugins.js, toolsServer in /api/plugins from library.PluginServers).
- PluginServerOn (servers/plugin-on {name, on}) sets Server.Hidden and
keeps the agents it had in Paused. Hidden, no agent is given it and
hubServers leaves it out for the router's address too. Give to agents
gives the kept agents back; with none kept, the router's agents
(hubAgents), or else every shown agent that can take it.
- It holds through a plugin update, the plugin off and on, an edit in the
Library editor (SaveServer keeps it) and an agent's "every server"
(serversAgents with no names skips a hidden one). Ticking an agent for
it in Library › MCP shows it again (save clears Hidden).
- Library › MCP tags the server "Plugin", its tooltip pointing at Plugins.
- /mcp/magpie/tools (every plugin's tools, wired by hand) is unchanged.
- Docs: plugin-tools.md, mcp-router.md, site docs plugins (en, zh, ja).
- The core script budget is not raised: two plugins.js comments cut, the
button's tooltips and status lines left out.
Run on mote at this tree (before the site docs, html only):
- go build ./..., go vet ./internal/library ./internal/gui, GOOS=windows
go vet of both, GOOS=linux go vet ./internal/library: ok.
- go test -count=1 ./internal/library/: ok (187s).
- go test -count=1 ./internal/gui/ -run 'Plugin|Library|Budget|Script':
ok (TestCoreScriptBudget 1,533,514 of 1,533,802).
- node --test plugin-tools.test.cjs (new: the line's words, Hide and Give
posting {name, on}, the button inside its row at 980 and 420, all five
languages, Chromium and WebKit): ok; builtins, every library-mcp-* and
mcp-* file: ok.
- i18n-keys "a plugin's words are its own": red, the same three words on
origin/main
|
||
|
|
a2b552a34b |
library: a session-start hook can be narrowed to some starts (#5604)
A Library hook on "When a session starts" can now carry a matcher of
starts: one or more of startup, resume, clear, compact and fork (Claude
Code's words, library.HookStarts), joined by "|". NEKO-CwC's case is a
hook that re-injects a file after compaction alone; written whole, it
also ran at startup and once for every subagent fork.
Each agent's format was read from its own source:
- Claude Code 2.1.316 tests the matcher against source, which has all
five starts. Its entry is written as given.
- Codex (codex-rs/hooks, rust-v0.165.0): SessionStartSource has the
same five, and a "|" list is read as exact names. Written as given.
- Gemini CLI 0.63.0 has startup, resume and clear only, and its
matchesTrigger compares the matcher whole. It takes one of those.
- Grok 1.0.67 tells only "new" (fresh, /new, /clear) from "load"
(resumed). It takes a set that is exactly one of those groups.
- Cursor (cursor-agent 2026.10.01) takes no matcher: its Claude-hooks
importer warns that a SessionStart trigger matcher "is not supported
in Cursor, hooks will fire for all triggers".
startMatcher keeps the chosen starts that the agent has. With none
left, the agent is refused; with every one it has, it gets the hook
whole. An agent that can't run the hook at exactly the starts picked is
refused with why, and its chip is greyed, as for any other per-agent
limit. This is the least surprising choice. Widening the hook to every
start would run it at the very starts the user excluded (the fork runs
the issue is about), and a matcher the agent never matches would do
nothing without saying so. SomeHooksAgents (Select) gives a narrowed
hook only to the agents that can run it.
Tool-event validation is unchanged: only tool events take shell or
edit, and only session-start takes starts. check() refuses an unknown
start, a start named twice, an empty part and a wrong case. The matcher
as written is recorded in Applied.Hooks, so an agent's own edit of the
entry is still theirs, and is kept when the hook changes or is removed.
GUI: the editor shows an "At which starts" app menu for session-start
(openProtoMenu, no <select>), with Any start, A fresh session, A
resumed session, After /clear, After the context is compacted, A
forked session and Any start but a fork. HookAgentView.Starts and
StartSources tell the page which matchers each agent takes. A chip that
can't take the matcher greys with one of three reasons, in the editor
and on the row, and save leaves it out. Every new string is in zh,
zh-TW, ja and de. docs/subsystems/library.md's Hooks row says all this.
Run, at 7f60927fd (origin/main
|
||
|
|
e932cd2589 |
library: a program whose path has spaces, typed as it is, is that program (zachzhao1984)
Library → MCP's command field splits a line at each unquoted space, as a
shell does, so "/Applications/Agent HUD.app/Contents/MacOS/Agent HUD --mcp"
reached the library as the program /Applications/Agent with the arguments
HUD.app/Contents/MacOS/Agent, HUD and --mcp. The save itself went through;
what was saved and written into every agent's config was a program that
isn't there, so the server never started. `magpie mcp add` with an
unquoted path and the TUI's line (strings.Fields) split it the same way.
Server.check, which every way in passes (the GUI's save, `magpie mcp add`,
the TUI, a market install, a backup or sync read in), now joins the words
back: when the command is a full path to no file, and it with the words
after it, joined by a space, is a program on this computer (a regular
file, executable outside Windows), that is the program and the rest are
its arguments; the fewest words that make one, as Windows reads an
unquoted path. A command that is there, a bare name (npx -y foo), or a
path no join makes stay as typed. Each agent is then given the program as
one argument with its spaces (JSON's and TOML's own quoting), and the GUI
shows it quoted ('/Applications/…/Agent HUD' --mcp), which reads back as
one word. A path typed in quotes, or with \ before its spaces, was already
one word. A server saved split before stays so until it is saved again:
opened and saved, its line is joined.
Tests:
- internal/library TestSpacedProgram: split, no arguments, given whole,
a bare name, a path no join makes, a program that is there keeps its
next word, a folder is no program.
- TestSpacedProgramSaved: ServerOf from the split words, SaveServer, the
library and Claude Code's .claude.json and Codex's config.toml each
hold the program whole and --mcp.
- internal/gui/tests/library-mcp-spaced-path.test.cjs: the reporter's
line typed in a new server's dialog is sent as typed; the row and the
editor show the path quoted; saving unchanged sends it whole; a quoted
path is sent whole; a save the library refuses (a name with a space)
shows its reason and the dialog stays. en and zh, 1100 and 390 wide,
Chromium and WebKit, nothing scrolls sideways. The fake save stands in
for the Go join.
Run (mote, via mote-run, at this tree on
|
||
|
|
d55881730d |
gateway: a key can be held to some MCP servers and tools
wakaka on Discord (#help, 11-06) asked for gateway keys limited to some MCP servers and tools, as keys already are to models (#882). A key's MCP list (caller-keys.json "mcp") holds entries "server" (every tool of it) or "server/tool"; "-" alone is no MCP server; an empty list is every server, as before. A key issued under another is held to its issuer's list too. Every MCP route checks it: - magpie's own servers (web search, vision, image, Magpie Browser, plugin tools) through serveMCP: initialize/tools/list/tools/call are refused or filtered per server and tool, and /v1/magpie/key-limits names "mcp"; - the Library hub ("magpie"): only the backing servers and tools the key may use are listed, and a call by name or by fallback is refused; - /mcp/<name> and /mcp/run/<name>: the server is refused, tools/list is filtered in JSON and SSE replies, tools/call refused; a reply the filter can't read (an encoded body) is a 502, never passed through. GUI: "MCP servers" in the key row's menu opens the app's own picker (no native select) with All, No MCP server, each server and its tools (GET /api/caller-keys/mcp lists magpie's own servers and the Library's). A key held to some shows a badge saying which, that opens the same list; a free key shows nothing more in its row, on hover either. A hover badge was tried first: it pushed the row past 560px (gateway-caller-keys) and squeezed the masked key under a drag at 420px (gateway-key-arrange). CLI: magpie gateway-key mcp <id> github fs/read_file | none | all. zh, zh-TW, ja, de strings; docs/reference.md and the gateway-routing and library subsystem pages. Not covered: a model's own built-in web search (a vendor tool, not MCP). GET /api/caller-keys/mcp is named in the CLI parity test's notYet (its list is what `magpie gateway-key mcp` takes; TestEveryRouteHasACommandOrIsNamed caught it at the rebased head). Run on mote (mote-run), at the pushed head: - go test ./internal/access ./internal/cli ./internal/gui ./internal/library ./internal/gateway at a9c40186d (this change on |
||
|
|
adcb69107c |
library: a skill set to disable-model-invocation is marked Manual only
sunset3279 on Discord asked to see which skills set
disable-model-invocation: true in their SKILL.md, the ones Claude Code
runs only when the user types /name. parseMeta reads the field into
meta.Manual; the library's rows (SkillView.Manual) and the agents' own
(FoundSkill.Manual) carry it, and the page puts a quiet "Manual only"
tag after the name, its tooltip naming /name and the field. A front
matter that doesn't parse, or a value that isn't a bool, is not known
to be manual: no tag. Translated in zh, zh-TW, ja and de.
Run (mote, through mote-run):
- go test -run 'TestSkillManualFromFrontMatter|TestSkillsFromFolder|TestFoundInLibraryFolder' ./internal/library: ok
- node --test internal/gui/tests/skill-manual.test.cjs: 22 pass, 0 fail
(en, zh, zh-TW, ja, de at 420 and 1180 px, Chromium and WebKit)
- go test ./internal/library: ok (692s)
- go vet ./internal/library for darwin, windows and linux (nogui): ok
- node --test i18n-keys and i18n-en-no-cjk: 7 pass, 1 fail. The fail is
"a plugin's words are its own", the same three entries on origin/main
|