e4e9eb0928becfa4e48484dde85ef5032671d582
188
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
426a707a19 |
library: each subagent is kept in a Markdown file to edit, or one of the user's own in a git repo (JonahFu on X)
JonahFu asked on X (tweet 2123236872940073039) for each subagent's local path in Library > Subagents, to edit it with an LLM, or to keep a subagent in a git repository. Each subagent of the library (not a plugin's) is now kept on this computer in <library>/subagents/<name>.md as well, in Claude Code's shape (name, description, model, skills, mcpServers, the prompt), or in a file of the user's own set under the editor's Advanced (folded unless one is set), in a repository say: - FileHash is what the file said when magpie last wrote or took it in. An edit there (by hand, by an agent, a git pull) is taken in at the next sync and before a change made on the page, and every ticked agent gets it. While magpie runs, KeepLinked's loop syncs when a file's hash differs, once per edit. - An edit that can't be read as a subagent (no front matter, another name, no prompt) is left as it is, the agents keep what it said before, and the editor says why. magpie writes a file only when it is missing, or still as magpie left it; never the user's edit. - A file of the user's own that is there already is what the subagent says (a bad one refuses the save). It must be an absolute .md path, not a folder, not inside the library, not one another subagent uses, and not a file magpie writes for an agent. - Rename and remove take the library's own file only while it is as magpie wrote it; the user's own file always stays. - File and FileHash are this computer's: Collect leaves them out, Put keeps this computer's. The editor shows the path (click reveals it, Copy copies it), a line that edits there reach the agents, and the error when one wasn't taken in. i18n in zh, zh-TW, ja and de. docs/subsystems/library.md: a row for the subagent's own file and its tests. Run at the tree before |
||
|
|
3132fa1cd9 |
library: Rules, a folder of rules given to Claude Code, Cline and Kiro CLI (JonahFu on X)
JonahFu asked on X (tweet 2123237371739316685) for Claude's rules folder in the Library. A new Rules tab keeps rules once and gives each to the agents ticked for it, in the folder each reads by itself: - Claude Code: <claude dir>/rules/<name>.md. `paths` is the only front matter key it reads (code.claude.com/docs/en/memory). Checked on real 2.1.327 in a sandbox: it reads every .md under the folder, loads one without paths at launch, and one with paths when Read/Write/Edit touches a matching file. - Cline: <cline dir>/rules (CLINE_DIR, else ~/.cline). Cline 3.0.70 reads every rule always and has no paths key, so a rule with paths isn't written for it; the agent gets a problem and the editor says why under the paths. - Kiro CLI: ~/.kiro/steering, `inclusion: fileMatch` + `fileMatchPattern` for paths, else always. A rule named "agents" is refused there (it would be AGENTS.md on a disk that ignores case). - Not listed: Cursor (user rules live in its settings; .cursor/rules is per project), Codex (its rules are execpolicy), Droid (command permissions), Gemini CLI, Qwen Code and OpenCode (no rules folder). A body starting with --- gets an empty front matter first. Files are recorded with their hash in Applied.Rules through the same syncOwnFiles as subagents and slash commands: a file of the user's own by that name, or one magpie wrote that the user edited, is never written over or taken away. Bundles (backup, WebDAV) carry rules; a bundle from an older magpie leaves this computer's alone. The editor lists each agent's file to reveal. No CLI yet. docs/subsystems/library.md: a Rules row and its tests. Run (mica-run, at this tree): - go vet -tags nogui ./internal/library ./internal/gui ./internal/davsync ./internal/cli: ok. gofmt -l: none. - go test -tags nogui -timeout 45m ./internal/library ./internal/davsync: ok (TestRulesEachAgentsFile, TestRulesKeptToTheirPaths, TestRulesLeaveTheUsersFiles, TestRuleCheck, TestRulesCarried). - node --test library-rules, library-subagents, library-commands, library-hooks, library-loading, library-groups, i18n-keys, i18n-en-no-cjk (Chromium and WebKit, 420 and 1100 wide, en zh zh-TW ja de): 78 of 78. - The full suite and cross-OS vet ran at the next commit, which this one is under. - Real use: Claude Code 2.1.327 in a sandbox HOME loaded a rule without paths at launch and one with paths only on touching a match; a sandbox magpie on mica wrote ~/.claude/rules/go-style.md with paths: ["**/*.go"]. Not tried: Cline and Kiro CLI loading the files for real, project-level rules (.claude/rules in a repository), Copilot and CodeBuddy (not verified, not listed), Windows and Linux. |
||
|
|
88b65d7584 |
library: the skills sheet says why an agent gets copies (4kT1FohCTP97031 on X)
The report (X, tweet 2123056163587780891): "Claude Code can only copy
skills, never link them; every other agent can use paths." Claude Code
already takes links: real claude 2.1.327 in a sandbox HOME and
CLAUDE_CONFIG_DIR loads a symlinked skill folder and a symlinked
SKILL.md, and reads the files beside it. The row that said 只能用副本
with no reason and no switch was Claude Desktop's (Cowork), which
really does skip a linked skill (Claude Desktop 2.7032; see
desktop_skills.go), so it keeps copies.
- AgentView gains CopyWhy and CopyWith (copyWhy in skill_how.go):
desktop, liveagent, wsl (a WSL agent on a Windows drive), junction
(agy/antigravity/crush on Windows), and shared, for an agent that reads
the same folder as one given copies. A shared agent was shown as
"Gets links" while syncSkills gave it copies (l.copies with sharers);
its How is now copy and the row names whose copies they are.
- The How sheet's row says the reason ("Only ever takes copies: Cowork
skips a linked skill"), in en, zh, zh-TW, ja and de. Without a known
reason it still says "Only ever takes copies".
- docs/subsystems/library.md says so.
Not changed: agy/crush on Windows take copies even where a symlink
could be made (#5107, #6610 decided that); not part of this report.
Tests:
- TestSkillHowSaysWhyCopies: Claude Code link, Claude Desktop
desktop, Codex reading Claude Code's folder as copies -> Claude Code
how copy, shared, ["Codex"], a copy on disk, and links again after.
Red on the old behaviour (fields kept, copyWhy and the How override
dropped): "Claude Desktop: why """ and "Claude Code: how "link"".
- skill-how.test.cjs: the desktop row's reason, a shared row, a bare
must-copy row, and a new all-languages test (en zh zh-TW ja de) at a
phone width. Red on origin/main's plugins/library client.js and
i18n.js in every language (expected the reason, got the bare words).
Run:
- gofmt -l clean. go vet internal/library and (-tags nogui)
internal/gui on Linux, GOOS=windows, GOOS=darwin (wsl-run): ok.
- go test ./internal/library -count=1 at this head (rebased on
origin/main
|
||
|
|
b400566f96 |
library: a resize no longer works out every agent chip's style again (lexrus on X)
lexrus's Skills page (196 skills, By source, about 24 agent chips a row, dark) crawled while the window was resized. Each row's chip strip was a size container, and the chips' gap used cqw. Chromium invalidates every style with container units on each change of the viewport width (ViewportUnits), so every chip was recalculated on each resize step. Now handGap works the gap out in whole pixels from each row's content-box width, which a ResizeObserver on the .lib-row hands over, so there is no forced layout and no container query. The CSS clamps --lib-gap as before, and the gap is set only when it changes. While the window is resized, .lib-resizing (held 600ms after the last step) turns the chips' translate transitions off, which WebKit was paying to start on every step. Measured with a Playwright probe at the reporter's scale (259 rows, 6425 chips, every group open), 30 resize steps between 1200px and up, CDP Performance.getMetrics and tracing, on mote: - Chromium: resize wall 24.4-29.3s -> 2.7s; style recalc 18.2-22.1s -> 1.3s; layout 0.47-0.71s -> 0.17s; long tasks 53-65 (6.8-8.0s) -> 15 (1.7s). - WebKit: resize wall 25.9-31.6s -> 9.2s; average frame 235-277ms -> 48ms (hiding every chip gives 1.8s, the floor). - Scroll is unchanged (about 31ms frames in Chromium, 20ms in WebKit). content-visibility was tried and dropped: it made scroll worse. skill-name-many-agents.test.cjs now resizes 866px -> 560px and checks the strips match a fresh 560px render, and a guard fails if library.css uses container units again. Broken by hand (handGap run only once): 3 pass, 3 fail. Restored: green. Run on mote at this head (rebased on |
||
|
|
1c0ecec0f6 |
library: a magpie in Docker keeps skills and prompts for its clients
fenglian980510 on X: in the Docker gateway the Library had MCP and no Skills. Since |
||
|
|
888d4eba52 |
library: the MCP market puts the most used servers first, counted from the day's report
gugediyige666 and freedomf26 on X asked for an MCP list ranked by
downloads, searchable and installable. Search and install from the list
were already there; skills were already ranked by skills.sh's install
counts. What was missing was a count of who uses each MCP server.
- internal/library/market_public.go: PublicServers names the Library's
servers that an agent is given and that the market lists from what
ships with magpie (featured, or the registry snapshot), by market id
only, matched by serverKey. A bare command names no package and is
never matched; a server of the user's own, one found only by a
search, and its address, command or keys never go.
- internal/stats/plugins.go: the day's plugin report carries them as
"servers" (at most 50), and goes when either list has something.
PluginCounts returns a Board with plugins and servers.
- site/pluginstats.js: servers are kept as mcp:<id> beside the plugins,
pruned apart (D1 binds at most 100 values a statement; the test's
stand-in now enforces that), never liked, and /api/plugins/stats
returns them under servers.
- GUI: with nothing searched, a server with 20 or more users comes
first, most used first, with a person chip of its count; the rest
keep the curated order. Counts are waited for at most a second, so a
drawn list never reorders; a search keeps the registry's ranking; a
failed ask is tried again after a minute, not with every search.
- Privacy text: READMEs (en, zh), site privacy and start pages (en, zh,
ja), reference.md, the Settings privacy row (zh, zh-TW, ja, de),
llms-full.txt and search indexes rebuilt; docs/subsystems/library.md.
Run (mote, rebased on 18fe1e2dc; budget, TestI18n*, i18n-keys, market-used and privacy-usage-stats again at
|
||
|
|
223b900b48 |
library: a skill from GitHub or git syncs as its source, and what a sync leaves out is said (#5715)
JJasonsun (Discord #help, #5715): a skill over a sync's 64 MiB budget was left out of the server's file while Settings > Sync said the sync worked, so the other computer silently didn't have it. A library skill from GitHub or another git repository whose folder is still what was fetched (editState known and unedited, or Pending) now goes as its source, as a plugin does (plugin_carry.go): CarriedSkill gets Fetch, Hash and Commit, and the receiving computer fetches it itself after Put lets go of the library lock (fetchSkills, through updateSkills). Its files still go as far as the room the skills carried as files leave, so a magpie from before this, which ignores Fetch, writes the skill as it did. On the receiving side (fromSourceHere): same version is kept; one changed here is kept and, when the other computer has another version, said as a problem ("Update replaces them"); another version or a skill new here is fetched, unless the carried files are already the whole of it. A skill that can't be fetched stays Pending, shows "Not fetched yet" on its Library row, and is said as a problem until Update fetches it (library.Unsettled drops a settled one). A skill changed here, one from a folder, and one from a link holding a token (whose link must not be synced) go as their files, as before. What a sync still leaves out is said: state.LibraryLeft names skills and plugins whose files were too big (or that this computer never got, Skill.Missing, carried on as Left so a third computer isn't told it has them), state.LibraryProblems what the last sync bringing the library in couldn't put here. Status gives them as libraryLeft and libraryProblems, and Settings > Sync shows them in red under the status (askPreviewRows). Strings in every language. Run at this head (rebased on origin/main |
||
|
|
b1f044fc1e |
library: a Claude plugin goes to another computer whole, its hooks naming that computer's folder (#6685)
A plugin installed from Library > Claude plugins didn't reach the other
computer by sync: the bundle carried its parts as plain items, with
${CLAUDE_PLUGIN_ROOT} already resolved to the first computer's
<library>/plugins/<name>, and neither the plugin record nor its folder.
Hooks there pointed at a path that doesn't exist, Windows' too.
Now Bundle.Plugins carries each plugin's record (name, version, source,
pick, agents, Off, parts taken out by hand) and never its parts:
- A GitHub or git link goes as its source. The receiving computer
installs it from there, as UpdatePlugin does, after the library's lock
is let go. Re-installing from the source was chosen because the files
stay the vendor's and an update keeps working there; a fetch that
fails keeps the plugin Pending (shown on its row, "Update tries again")
with a problem, and the next sync or Update tries again.
- A plugin from a local folder, or from a link holding a token (whose
link must not be synced), goes with its files on the skills' budget,
executables kept executable, and is installed from them.
- Either way the parts are read again there, so every hook, server and
skill names that computer's own plugin folder. A plugin the bundle no
longer has is removed with its folder; Off spreads.
- A bundle from an older magpie has no plugins list: this computer's
plugins keep their parts over the same-named items it carries.
- An empty list hashes as before, so computers without plugins don't
see a change; the preview names each plugin, its files as one digest.
- Sibling: a plugin installed from a marketplace under a name other
than its manifest's named the manifest's folder in its parts.
- The sync settings' text says Claude plugins go with the Library (en,
zh, zh-TW, ja, de); "Claude plugins" moved into the core i18n.js since
the core now says it.
Run at this head (54e682dc5's tree on
|
||
|
|
ae94571d70 |
library: a project's own instructions, in the file each agent reads
@VictorHong1022 on X asked to manage AGENTS.md per project beside a project's skills, so the shared instructions keep only general rules. A project in the Library now has instructions of its own (the Instructions tab, expand a project; `magpie library project instructions <dir>`). magpie writes them into the project file each picked agent reads there, by that agent's own name for it: Claude Code CLAUDE.md (or .claude/CLAUDE.md when that is the one there), Codex and pi their override first, Gemini GEMINI.md (or its context.fileName), Qwen QWEN.md, CodeBuddy CODEBUDDY.md, the rest AGENTS.md. magpie owns only a marked part (<!-- magpie:begin … --> to <!-- magpie:end -->): the user's own text around it is kept byte for byte, CRLF included, a hand edit of magpie's part stays until the project's text changes, a file magpie made is listed in the repo's .git/info/exclude and removed when emptied, and an agent's user-wide instructions file is refused. Worktrees of the project follow it. A first text goes to the agents the shared instructions are on for, else every agent here that reads a project file. Problems show as the project's "instructions" problem. Tested: - internal/library: 8 new tests (block kept around user text, CRLF, hand edit kept, made file excluded and removed, renamed files, global file refused, worktrees). Four broken by hand, each red. - internal/cli: TestLibraryProjectInstructionsCmd; red with the default agents dropped. - GUI: project-instructions.test.cjs, en and zh, chromium and webkit, 6 of 6. Red when Goose (no project file) was offered, and red when the defaults ignored the agents the instructions are on for. - Real use on mote: the built binary, sandbox HOME and project. add, text, agents; CLAUDE.md kept CRLF with the part appended; AGENTS.md and GEMINI.md made and excluded; the user-wide CLAUDE.md untouched; zed refused; an edited part survived `library sync`; `agents none` put CLAUDE.md back byte for byte, removed the made files and emptied the exclude block. - Full Go suite (go test ./... -timeout 45m) on mote: 103 packages ok, gofmt clean, go vet darwin, linux (nogui) and windows rc=0, at this change on origin/main |
||
|
|
3be322fe4c |
library: a skill brought in from an agent goes back to it when removed (BeiWeiji on X)
BeiWeiji on X (v0.1.4322, zh): a skill imported from "Agent 中已有"
had no way back, only off or Remove, and removed it was gone from the
agents and from "Agent 中已有" too: Remove sent the folder that had been
moved into the library to magpie's backups and took the agents' links
and marked copies away.
ImportSkill now records where the skill was (Skill.Home, this
computer's own; Put keeps it for the same source, a sync never carries
it): the folder moved in (Home.Dir; handOver points it at the shared
~/.agents/skills place) and each agent's entry, a link with its own
text or a byte copy. RemoveSkill/RemoveSkills put it back (putBack):
the library's folder moves back to Home.Dir with what was changed in
the library, or the library's link goes; each agent's link is made
again as it was and each copy copied back. It is in "In your agents"
again and nothing goes to the backups. An entry the user replaced since
is left alone; when Home.Dir is taken the skill is removed as before,
its folder to the backups. This covers every agent with a skills folder
(the record is per agent entry, links and copies alike).
The page: SkillView.back lists those agents, and such a row has Put
back in the trash's place ("放回 {agents}"), whose sheet says where it
goes and sends skills/remove. Other skills keep the trash.
Old imports: a skill brought in before this has no Home record.
Removed, its folder goes to magpie's backups as before, where it can
be moved back by hand (the reporter's already-removed skill is there).
Run (at this change on
|
||
|
|
64c4261582 |
sessions: search what was said in every agent's sessions, from the page and an MCP server
cryingLiu on X asked to search the chat history of every agent magpie
reads sessions from: prompts and replies, from one place.
What the user gets:
- The Sessions page's search also lists, under the agent's own list,
the other agents' sessions whose conversation says the words, each
with a snippet. A hit opens the conversation in the sheet at the
message that said it (transcript?find=), with "N earlier messages
not shown"; the page itself never scrolls. While the index is still
being built the head says "Indexing sessions…" or "Indexing N of M
sessions…", and the page asks again every 3s until it is done.
- Magpie Sessions, a built-in MCP server in Library → MCP (Discover),
opt in per agent like the other magpie servers. Its tools are
search_sessions(query, agent?, limit) and read_session(id, around?),
both returning text. It runs as `magpie mcp sessions` over stdio and
reaches the gateway's /mcp/magpie/sessions, which serves only local
callers that are not browsers.
How it works:
- internal/sessions/said_index.go keeps said-v1.db beside sessions.json:
a contentless SQLite FTS5 index (detail=none) of the words each
session says. It is built from the sessions list sessions already
caches and refreshed at most every 10s: a new or rewritten file is
read once, a grown Claude Code or Codex file only from where it ended,
and a gone one is forgotten. A query asks the index which sessions
have every word, then reads only those files for the snippet, for at
most 6s. A search waits up to 2s for a refresh. While the first
listing is still running the answer says `listing`, so an empty first
answer is not read as "no session says it".
- Privacy: only agents sessions.Reads allows are indexed or searched;
nothing is read until the user has answered the sessions question,
and in gateway mode no agent's own files are read (the page doesn't
ask). Reset forgets the index.
- /api/sessions/said for the page; the CLI parity list names it.
Run, at this tree (rebased on origin/main
|
||
|
|
e34228669c |
library: agy's GEMINI.md is no longer emptied by Antigravity's app switched off
vizmoe42 on X (v0.1.4271): Library -> Instructions had agy CLI's
GEMINI.md switched on, but ~/.gemini/config/GEMINI.md held nothing.
agy and Antigravity's app share that file (and its folder). With the
built-in agy the targets run agy first, then Antigravity; agy wrote its
part and the unticked Antigravity row, wanting nothing, took it out
again, leaving the file empty or gone. The unticked row also showed
"edited". With agy on its plugin the order is reversed, so it worked by
luck there.
syncInstructions now takes every target. A file another target reads
too belongs to the one switched on (instrOwner): the others leave it
and drop their own record. The Edited check compares against that
owner's text (wantedIn). The path itself is right: agy 1.5.9 reads
~/.gemini/GEMINI.md, ~/.gemini/AGENTS.md and their config/ copies
(binary strings and `agy changelog`, sandbox HOME). MCP and skills in
the shared folder already behaved; probed, unchanged.
Existing users: agy's record says written but the file has no block,
so the next start-up Sync writes it, without switching anything again
(covered by the test).
Run:
- TestAntigravitySharedInstructionsFile (agy and antigravity subtests),
red on the old code (file empty after the switch; agy row Edited),
green with the fix, on mica.
- go vet ./internal/library; go test -count=1 ./internal/library
./internal/gui ./internal/tui ./internal/cli: all ok on mica.
- At the pushed head (rebased on
|
||
|
|
d7cda856ad |
library: MCP servers turned off fold away below the ones on (hzlxb on X)
hzlxb on X asked for Library -> MCP servers to keep the servers turned off apart, folded, as Providers keeps the providers turned off. The list now holds the servers on. The ones off sit below it, above "+ Add server", under a "Servers turned off (N)" fold drawn with Providers' Turned off markup (row-head off-head, .fold with the chevron, the count in .note). It is folded at first and remembered in localStorage magpie.offServersOpen, as magpie.offProvidersOpen is. A server switched off moves under the fold, and one switched on comes back up. While picking (Select) the fold is held open and disabled, so every server picked is in sight, as Providers holds its fold open while searching. The MCP tab has no filter of its own, so there is nothing else for it to hide from. With every server off only the fold shows. With none off there is no fold. Strings are in en, zh, zh-TW, ja and de. Run: - library-mcp-off-fold.test.cjs (new): Chromium and WebKit, 1100 and 420 wide, en/zh/zh-TW/ja/de. It checks order, label, count, title, aria-expanded, that opening by a wheel-scrolled click leaves the head where it is and opens no editor, the reload memory, moving on a switch, picking, all off and none off. It is red on the old library files (no fold; checked on mica in chromium). - Library/MCP/i18n/click-scroll/providers-off-fold GUI files (102 files, both engines) on mote at the pre-rebase head 29a5f10f9: 2304 of 2310 pass. The 6 reds are library-open-again's 1100px cases, red the same alone on the old tree (filed as #6751). - go test -count=1 ./internal/gui/ on mica at this head: ok (143s). gofmt clean. - The whole GUI suite on mote at 29a5f10f9, in two parts (mote rebooted mid-run; the rest ran after it came back, under suite.lock). Part 1: 411 not ok in 75 files. Part 2 (640 files): 11355 tests, 10911 pass, 444 fail. No red is in the files this change touches except library-open-again (#6751). Every red file has an open issue saying it is red on main: skill-fold-all/skill-manual (#6667, #6668, the window's /api/update/using), skill-group-shared (#6687), view-open-wheel (#4723), view-trackpad-coast (#4724), view-wheel-unheard (#5158), usage-* (#6743, #4263), the rest in #6709 or by name; icon-tile was unfiled and is now #6759 (dim-color from |
||
|
|
ec1a1a7a55 |
library: import the slash commands the agents already have
miantiao_me on X (after v0.1.4189): 「之前在 Pi 定义的可以导入吗?」. Library ›
Slash commands now has a "Find in agents" card at the top. It reads the
command files each agent already has, from the same places magpie writes
them (Pi prompts/*.md, Claude commands/*.md, OpenCode command/ and
commands/, Gemini and Qwen .toml, Qwen .md, Droid), and lists them to
import, the way Subagents' import does.
- Parsing: frontmatter description plus body; for TOML, description and
prompt. Arguments go back to magpie's form: Claude's $ARGUMENTS[n] and
$n (0-based) become $n+1, Gemini/Qwen {{args}} becomes $ARGUMENTS,
Pi's $@ becomes $ARGUMENTS (${@:N} is left as written).
- Files magpie wrote itself are skipped. The same content in several
agents is one command; a name with different bodies per agent shows
"Differs by agent" and one of them is picked; a name the library has
with other content is "Name taken" and can't be picked.
- An imported command keeps its source agents ticked, and magpie adopts
each original file byte for byte (Command.Taken): sync writes the same
bytes at the same path, so the file is never doubled or rewritten.
After an edit the agent gets magpie's render at that path; a rename
drops Taken. Taken never leaves the machine (Collect strips it, Put
keeps the local one).
- API: POST /api/library/commands/probe, and commands/import through
the library change route. internal/cli's parity test names the probe
as stage 3, like subagents/probe.
- Docs: docs/subsystems/library.md has the new row.
Run at 039e25752 (on origin/main
|
||
|
|
ca64168d3e |
library: a skill beside itself folds back on read; GitHub by git address is one repo
Refeccd on X said |
||
|
|
91d27452b7 |
library: slash commands, written into each agent's own command folder
miantiao_me on X asked for custom slash commands (prompt templates) kept
once in the Library and given to agents as skills are. Library → Slash
commands keeps a name, a description and a prompt where $ARGUMENTS is
every word typed after /name and $1, $2… the first, second… word. Each
ticked agent gets its own command file, in its own folder and shape
(internal/library/commands.go, from each agent's docs and source):
- Claude Code: <claude dir>/commands/<name>.md; $n becomes $ARGUMENTS[n-1]
(Claude counts from 0), a literal $0 is escaped.
- OpenCode: <config>/commands/<name>.md, as written.
- Pi: <agent dir>/prompts/<name>.md, as written.
- Gemini CLI: ~/.gemini/commands/<name>.toml, $ARGUMENTS is {{args}}.
- Qwen Code: <qwen home>/commands/<name>.md, {{args}}.
- Factory Droid: ~/.factory/commands/<name>.md, $ARGUMENTS.
- Gemini, Qwen and Droid have no $1…: a command using them is not written
for those agents, and the row and editor say so.
- Codex is listed greyed: it reads ~/.codex/prompts no more, its skills
took their place. WSL agents get none yet.
What magpie wrote is recorded per file with its hash (Applied.Commands),
through syncOwnFiles, now shared with subagents: a file the user changed,
or one by that name magpie didn't write, is never overwritten or removed;
one equal to magpie's bytes is adopted. Commands travel with backups and
WebDAV sync (Bundle.Commands; an older bundle keeps this computer's).
docs/subsystems/library.md has the row.
Run (mote was over its load, so mica, then mote at the end):
- At 4119054bb on origin/main
|
||
|
|
da29171a4e |
library: a plugin hook that reads CLAUDE_PLUGIN_ROOT itself gets the folder
@AXmake110 on X: with the Claude Code plugin ponytail installed for an
agent, every start of the agent printed a red error. ponytail's hooks
read the folder in Node, not through the shell:
node -e "require(require('path').join(process.env.CLAUDE_PLUGIN_ROOT.split(String.fromCharCode(92)).join('/'), 'hooks/ponytail-activate.js'))"
magpie replaced only ${CLAUDE_PLUGIN_ROOT} and $CLAUDE_PLUGIN_ROOT, so
the command went into Claude Code's settings.json (and, for the
UserPromptSubmit hook, Codex's hooks.json) as written. Outside Claude
Code's plugin runtime nothing sets the variable, and Node threw
"Cannot read properties of undefined (reading 'split')".
Fixed for the class (plugin_env.go):
- a hook program's own read of CLAUDE_PLUGIN_ROOT or CLAUDE_PLUGIN_DATA
becomes a quoted string literal of the folder, with forward slashes:
process.env.X, process.env['X'], Bun.env, Deno.env.get, Python's
os.environ[...]/.get/os.getenv, Ruby's ENV[...]/ENV.fetch. The quote
is chosen so it doesn't end the sh quoting around it. PowerShell's
$env:X / ${env:X} and cmd's %X% become the folder.
- a plugin's command MCP server gets both variables in its env, as
Claude Code gives them, unless the plugin set them.
- ${CLAUDE_PLUGIN_ROOT}/DATA in a subagent's prompt and in a copied
SKILL.md are resolved, as Claude Code resolves them in Markdown.
- every agent gets the same text: the parts are library items, so
Claude Code, Codex, Gemini, Cursor and Grok are all written from them.
- existing installs: load() heals the hooks, servers and subagent
prompts of an installed plugin that still name the variables, and the
next sync (the app's startup sync) writes them out again; the old
entry is replaced, not duplicated. A SKILL.md copied before is fixed
by the plugin's Update or a reinstall.
Not carried yet, filed as #6682: exec-form hooks (command + args, whose
args are dropped today) and CLAUDE_PLUGIN_OPTION_<KEY>.
The fixture is ponytail's published hooks files, byte for byte
(DietrichGebert/ponytail 96608e07, testdata/ponytail/README.md).
Run (mote; full suite at 901b56c80 on origin/main
|
||
|
|
411769e9c7 |
library: GitHub Copilot gets the Library's instructions with VS Code or JetBrains alone
@codealc on X (0.1.3827, Windows, Codex with Copilot as the provider): 资源库 › 指令 has no way to give GitHub Copilot instructions. The only Copilot row was Copilot CLI's, listed only when the CLI was detected (settings.json or the copilot command) and not uninstalled, so a user of Copilot in VS Code or JetBrains saw none. Which file Copilot reads, from each surface's own source: - Copilot CLI 1.0.95: $COPILOT_HOME/copilot-instructions.md, else ~/.copilot/copilot-instructions.md (run for real, below). - VS Code (microsoft/vscode d95071e96, promptsServiceImpl / computeAutomaticInstructions): ~/.copilot/copilot-instructions.md, plus ~/.copilot/instructions/**/*.instructions.md; its docs' reference table gives the same for the Copilot harness's user scope. - GitHub Copilot for JetBrains 1.21.0 (javap of the plugin's classes): getCopilotCliHomePath() (COPILOT_HOME, else ~/.copilot) + copilot-instructions.md. So Copilot CLI's agent now has shared "GitHub Copilot" (as Cursor CLI's ~/.cursor is the Cursor editor's) and a sharedApp check: VS Code, VS Code Insiders, or the JetBrains plugin is here. agent.SharedRead says so; SharedHere is true with it even before ~/.copilot exists, and targetsAsleep keeps a CLIMissing agent whose folder such an app still reads. The Library's row is named GitHub Copilot; the agent stays Copilot CLI on the Agents page. SharedName also names Copilot CLI's chats in Sessions, which are now "GitHub Copilot" as Cursor CLI's are "Cursor". The user's own text in copilot-instructions.md stays outside magpie's block, and comes back whole when magpie's instructions are emptied. Tests (internal/library/copilot_shared_test.go): row named GitHub Copilot; VS Code alone (no ~/.copilot) gets the row and the file written without making Copilot CLI detected; JetBrains plugin alone; the user's own file kept; CLI uninstalled with VS Code still here keeps the row, with nothing reading it drops it; COPILOT_HOME followed. TestCursorIsCursorCLI and TestCursorFolderFromTheEditorIsNotTheCLI now allow Copilot beside Cursor. Run: - The six new tests on the old code (source files checked out from |
||
|
|
106a24b95e |
library: skills from GitHub and git update by themselves when switched on
0xYaCo on X: "skill 能自动化升级吗?". magpie already checked for skill updates by itself (every 12h, as the Skills tab opens), but each update waited for a click on Update. A new switch, Update by themselves, sits under the Skills list while a skill comes from GitHub or git (POST /api/library/skills/auto-update; `magpie library skill auto-update on|off`; library.json's autoUpdateSkills, this computer's own). It is off by default. When it is on, KeepSkillsCurrent (a gateway.WhileServing loop) runs AutoUpdateTick 2 minutes after start and then hourly. Every 12h that runs CheckSkills, then UpdateSomeSkills on the skills found at "update". So a skill changed here stays in Unupdated with its Update button, one removed upstream is only marked, and a replaced edited version goes to the backups, as with an update by hand. Updated names and a new error are logged. Run (WSL2 magpie-desktop, Go 1.26.8; mote was at load 167, mica's disk full), at ab637d3c4 (this change on |
||
|
|
01c3efc4f7 |
library: billion-context's compression markers can be switched off (@JamesYu32 on X)
@JamesYu32 asked for a switch that turns off the markers billion-context adds after it folds: compress.visibilityMarkers. In bili 0.1.213 (CONFIGURATION.md, dist/index.js) it is a boolean, true by default; true appends the 📦/❌ line after a compress, decompress, search_context or acp_status call and re-injects it into the rebuilt history, false drops both, and the tool calls still run. Some models imitate the markers. The billion-context tab's Advanced fold gets "Show compression markers", on unless the file says false. Off writes compress.visibilityMarkers: false through edit.PatchJSON (comments and every other key kept); on takes the key out, back to bili's default, rather than leaving a value magpie chose. A provider's or model's own compress.visibilityMarkers is the user's and is left as it is; a non-boolean value (which bili rejects) is not read as off. The running bili is asked to reload, as for the other settings. Under Advanced because it is rarely changed. Run (mote, at this tree on origin/main |
||
|
|
df2b819c67 |
library: Antigravity and Crush get copies of skills on Windows (#6610, #5107)
On Windows without the right to make a symlink, magpie links a skill with a junction. Go 1.23+ lists a junction as ModeIrregular, neither a folder nor a symlink, and Antigravity (the app and agy: customizations' discoverInSubDirsFiltered) and Crush (internal/skills on fastwalk, which follows only a ModeSymlink) keep only folders and symlinks, so a junctioned skill never showed in them. dsh, pi and the other Node, Bun, Rust and Python agents follow a junction. Checked against the real apps on xiaomi-gpu (Windows 11) in a sandbox USERPROFILE: Antigravity 2.30.0's language_server.exe (--standalone) GetAllSkills lists a skill in a folder and one behind a symlink, not one behind a junction. crush v0.101.0's `crush run` request to a local capture server listed the folder and the symlink, not the junction. On macOS agy 1.5.8 (ACP session/new, available_commands_update) takes a symlink that leads out of ~/.gemini/config, so #6610's "confined to the folder" filter doesn't touch magpie's links there. - junctionBlind (agy, antigravity, crush) and skipsJunctions: on Windows these targets have Copy, so they get marked copies, made again when the library's changes, and the Library page shows "Only ever takes copies" for them. A junction an older magpie made becomes a copy. - inShared: a link in ~/.agents/skills is no skill to them, so Crush, which reads that folder too, gets its own copy. - A project's .agents/skills entry that one of them reads is a copy (syncFolder's per-entry flag); one no such agent reads is a link again. - takeEdits takes an edit made in a project's copy into the library, as one in an agent's copy is, so a copy a user edits isn't undone by the next sync (Project.Copy's copies too, which were made again over an edit before). - behind lists these agents' stale copies. Run: - go vet ./internal/library, GOOS=windows and GOOS=linux go vet, gofmt -l: clean (mote). - go test -count=1 ./internal/library: ok on mote (macOS) 107.9s and on xiaomi-gpu (Windows 11) 440.0s, at this change on |
||
|
|
7b002b6be8 |
library: an MCP command's %USERPROFILE%, $USERPROFILE and ~\ are the home on every system (0xBCD18E on X)
0xBCD18E's Library server ran
"%USERPROFILE%\AppData\Local\Programs\Pinky\pinky.exe", and the check
said it couldn't find "%USERPROFILE%\A…": magpie read $NAME, ${NAME}
and ~ in a command but not cmd.exe's %NAME%, so the only way to share
one server across computers with different user names was a per-device
command.
Now HOME and USERPROFILE are both the home, on every system, as $NAME,
${NAME} or %NAME% (either case), and a leading ~ or ~\ too:
- library.json (and so sync and backups) keeps them as written;
- an agent that reads references in a command (Claude Code, CodeBuddy,
WorkBuddy, Grok, Gemini, omp/Qoder/AtomCode, OpenCode, Cursor) is
given the home's own variable where it runs: ${USERPROFILE} on
Windows, where an agent seldom has HOME, ${HOME} on a Mac, Linux and
in WSL, where nothing has USERPROFILE. Before this, $HOME went to
Claude Code on Windows as ${HOME}, which it usually hasn't;
- every other agent (Codex, Kiro, Droid, Copilot, Crush, Goose, Pi, ...)
and magpie's own start (the check, the router, Codex through the
gateway) get the home's path;
- any other %NAME% (%APPDATA%) is a variable on Windows only, and is
left as written elsewhere, so 100% or %Y% in an arg stays as it is;
- a command's environment: a leading ~ and %USERPROFILE% / %HOME% in a
value are put in as the home for every agent and for magpie's start
(homeEnv); ${NAME} there stays envref's.
No cwd: a Library server has none.
Tests: TestCmdVarsUserProfile forces cmdOS to windows, darwin and linux
for Codex, Claude, Cursor, OpenCode and Claude in WSL, command, args
and env; TestCmdVarsUserProfileLaunch starts a real server by
%USERPROFILE%<sep>prog, %HOME%/prog and $USERPROFILE/prog.
TestCmdVarsPerAgent pins the Unix variable; TestCmdVarsSync expects
${USERPROFILE} in .claude.json on Windows.
Run: the red was checked on origin/main e0889719c's cmdvars.go,
mcp_check.go and mcp_run.go with these tests: all 8 subtests of
TestCmdVarsUserProfile and TestCmdVarsUserProfileLaunch FAIL; with the
change, ok on mote (darwin), on xiaomi-gpu (Windows 11, win-run: the
real check starts the server by %USERPROFILE%\prog, and Claude Code's
.claude.json gets ${USERPROFILE}/bin/x) and in WSL magpie-desktop
(wsl-run). Full suite at b84b6dc3c (this change on
|
||
|
|
4e770f733a |
library: subagents imported from a repository
CHENGJIAHEGOXIS on X asked for an easy way to install a repository of
subagents such as msitarzewski/agency-agents. Library → Subagents now
has a find line. It takes what the skill installer takes: owner/repo, a
GitHub or GitLab link to a repository, folder or file, any git address,
or a folder on this computer. It lists the subagents found, lets the
user tick all or some, and imports them as Library subagents for the
agents ticked.
- Fetching is the skill importer's: resolvePluginRoot's source handling
moved into fetchSourceRoot, which both use. tooBig still refuses a
whole repository that is too big and asks for the folder's link.
- A subagent is a Markdown file whose front matter has a description.
- Its name is the slug of `name`. In an `agents` or `droids` folder
with no `name`, it is the file's own name.
- The description is folded to one line of at most 1000 characters.
- The body is the prompt.
- Dropped: every other front-matter key (agency-agents' color, emoji
and vibe, and tools, model, author or anything else). A Codex TOML
role is not read. A skill's folder (one with SKILL.md) and .git,
.github and node_modules are skipped.
- Two files with one name: the shallower is taken, and the other is
listed as left out, with why. So is a file Subagent.check refuses.
- An imported subagent records its source and file (From) and a hash
of its description and prompt as imported (FromHash). Imported again,
a subagent from the same file is:
- have, when it is unchanged;
- update, when upstream changed and the library's copy still matches
FromHash (description and prompt replaced; agents, skills, servers
and model kept);
- edited, when the user changed it in magpie (left as it is).
- A name the library already uses for another subagent is never written
over: the import takes the next free name-N.
- A carried library carries From.
- The page has Select all, a filter past eight, a tag per state, the
files left out, and a summary of what was imported and updated.
i18n: zh, zh-TW, ja, de.
- The fixture is agency-agents' own files in
internal/library/testdata/agency-agents. No test reaches the network.
Run on 80ae5ba24, which is this change on
|
||
|
|
1730c75b97 |
library: Claude Magpie is an agent of its own (xMopf7RF on X)
xMopf7RF asked for Claude Magpie, the separate Claude Desktop, to show on its own in the Library's instructions, skills and MCP, like an independent agent. Before, Claude Desktop's target wrote its servers (DesktopConfigs3p) and Cowork skills (desktopdir.Everywhere) into Claude-Magpie-3p too, and the twin's Code tab folder ~/.claude-magpie-desktop (a claude# row) got nothing from the Library. - agent.DesktopTwinApp: claude-desktop#magpie, "Claude Magpie", an app target while the Separate app is on and its folder is there (macOS). MCP to Claude-Magpie-3p's claude_desktop_config.json, Cowork skills to its skills-plugin. No instructions file: noPlace points to its Code tab's row. - Claude Desktop's target leaves Claude-Magpie-3p out (DesktopConfigs3p, desktopSkillRoots). - Every claude#<name> row takes CLAUDE.md, skills/ and .claude.json in its folder (~/.claude.json for ~/.claude itself). settings.json features (hooks, env, tools off) stay keyed on claude. - Old data: carryTwin, on load and only while nothing is recorded for the twin, ticks for Claude Magpie each server and skill magpie gave Claude Desktop that is in Claude-Magpie-3p already, so an update takes nothing away. library.json syncs, so another Mac's twin sees the same ticks. Unticked later, it stays unticked. - Not changed: desktopCarryMCP still copies the user's own Desktop servers into the twin when it is wired. Run (mote, sandbox HOME in the tests): - go test -tags nogui ./internal/library ./internal/agent ./internal/desktopiso ./internal/desktopdir: ok (167s, 251s). GOOS=linux and GOOS=windows go vet of library and agent ok; gofmt clean. - TestClaudeMagpieIsItsOwnLibraryAgent: InstallSkills, SaveServer and SaveInstructions write only Claude-Magpie-3p and ~/.claude-magpie-desktop; Claude Desktop's config and manifest, ~/.claude/settings.json unchanged; ~/.claude.json, ~/.claude/CLAUDE.md and ~/.claude/skills/pdf not written. TestClaudeMagpieKeepsWhatDesktopWasGiven. - GUI, both engines: library-*.test.cjs (76 files), by-agent, every-skill, group-skill-chips, pick-skills, project-*, skill-*, i18n-keys and the new library-desktop-twin.test.cjs (separate chips for Claude Magpie and Claude Code · Claude Magpie, lit only for what they were given, a click on Claude Desktop's asks for it alone; en, zh, zh-TW, ja, de at 980 and 420px). 1850 of 1878 the first run, with a library.css hand change since dropped; the 28 reds were all in library-new-skill, library-subagents, library-wsl-asleep and skill-where, and those four files plus the twin test, run again without it: 174 of 174. Broken by hand, each red then restored: carryTwin off (fs/pdf not ticked, nothing recorded); Desktop's skill roots with the twin's folder (target reaches Claude Magpie's folder); the claude# branch off (Code tab target nil); DesktopConfigs3p with the isolated config again (library and agent tests red). Filed: #6558, a row's chips reach past its edge at 420px (ja with four agents, before this too with six); the twin test skips that check for ja at 420px until it is fixed. Not tried: a real Claude Magpie.app on a desktop reading the new files. |
||
|
|
533f351085 |
library: billion-context.json syncs, its settings change from its tab, running bilis reload
@Luxzinw on X asked for three things: sync billion-context's config, edit its settings in the Library's billion-context tab, and have running bili proxies reload after a change. Sync. billion-context.json goes in the library part (library.Bundle.Bili), by sync and backup file alike. magpie finds it the way bili's src/paths.ts does: BILI_CONFIG_FILE, else $XDG_CONFIG_HOME (or ~/.config, %USERPROFILE%\.config on Windows), then billion-context/billion-context.json. - The text is carried as written, comments kept. - magpie's summary recipe is carried at the canonical gateway address and localized to this computer's gateway when written, so two computers on different ports don't trade it back and forth. - A newer local file is never blindly overwritten. Before a carried file replaces a different one here, this computer's copy is kept with the backups. - An unreadable file, or one over 1 MiB, counts as unknown and is never carried as empty. A bundle without the file leaves this computer's alone. - A file naming a DSN is left out of keyless backups. - The credential store (<config>.summary-credentials.json) never travels. - A library with no such file hashes as before. - The new sync preview names the file when it would be added, changed or removed. Settings. GET/POST /api/library/bili/settings, and a Settings section under the agents in the tab: - In front: "Summarize with a fast model" (externalSummary), picked from the app's menu, never a <select>. It offers magpie's served models and the file's own recipes. "Fold only when nudged" (requireNudge) and "Nudge every N tokens" (nudgeGrowthTokens). - Under Advanced, collapsed: the compression philosophy (prompts.compressPhilosophy with acknowledgePromptsRisk, which bili needs before it reads a prompt override). Writes go through edit.PatchJSON and temp+rename, so unknown keys, comments and the BOM are kept. bili disables its whole compress section on one bad value, so magpie writes only values bili accepts. A magpie model becomes a providers.magpie recipe whose key is saved in bili's own credential store, the way bili writes it (0600, O_EXCL .lock, temp+rename). A user's own providers.magpie is never taken over. A file bili can't read is said so and left alone. Reload. After a change, and after sync writes the file, every running bili on loopback is sent POST /__bili/config/reload. bili reloads routes and compress there. The status line says whether it did, or that the agent needs a restart. Also: agentenv.Vars clears BILI_CONFIG_FILE in sandboxes, and the settings-parity list names the two routes for stage 3, as the other bili routes are. Run (mica, macOS): - At abcbc632e, this change on origin/main |
||
|
|
741d502d2a |
library: a synced MCP server can run its own command on this computer (jinpwng on X, #6426)
jinpwng runs one MCP server on a Mac and in WSL. Each needs its own program path, and the only ways around it were two servers with two names or keeping the server to one computer, which loses the sync of its agents and note (#3836). A command server now has an optional `shared` start. When it is set, command, args and env are this computer's, and every reader (the agents' files, projects, the router, the check) runs them with no change of its own. Collect carries the shared start in their place and never the field, so the other computers get exactly what they had. Put keeps this computer's start, and what comes in for the server becomes the shared start, so a note, agents or the other computer's own command change still comes in. A server that comes in as a URL, one kept to this computer, and the editor sending no shared start each end it. - GUI: a saved synced command server's editor has "Use another command on this computer" under Command. With it on, the hint names what the other computers run, and "Use the synced command" goes back. Nothing else on the page moves; a new server and a local one have no button. - CLI: `magpie library mcp here <name> <command args…>` and `… here <name> off`; the listing names a server that has one. - TUI: an edit keeps the shared start. - Docs: docs/subsystems/library.md, site docs (en, zh, ja). Run (mote, at the tree pushed but before the rebase): - go test ./internal/library/... ./internal/cli/... ./internal/tui/... ./internal/backup/... ./internal/gui/: ok - gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows: clean - GUI, chromium and webkit: mcp-server-here (new: en, zh, zh-TW, ja, de at 1100 and 390, the payload, no button on a local server, no sideways scroll), library-mcp-json, library-mcp-spaced-path, library-mcp-win-line, market-address, mcp-home-health, mcp-startup-timeout, market-have, mcp-editor-cancel, mcp-local-server, i18n-en-no-cjk, i18n-keys and the other library MCP files: 235 of 238. The reds: - i18n-keys "a plugin's words are its own": the same at origin/main |
||
|
|
ac1702c330 |
library: the first part of a skill group opens below its heading, not over it (jinpwng on X)
jinpwng on X (macOS, Chinese UI): in Library > Skills, opening the first group made the page jump, and what was clicked went off the screen; the others opened downwards. The group was the first part of a big group (a repository split by folder, drawn in the group's windowed list). A click on a part's heading draws it anew, and the first part's only neighbour above it is the list's zero-height pad, which the click's hold passes over. So the page held the next part's heading, the rows opened pushed it down, and the view scrolled by the whole part: the clicked heading went from 152 to -920. A part's heading is now data-unrolls, so the hold keeps its list, whose top doesn't move. Top-level groups, projects and the Instructions agents already held still; the new test guards them too. library-group-steady.test.cjs opens and folds, at the top and scrolled: the Skills groups and the big group's parts (first and second, and the first with the second open), the projects in Skills, MCP and Subagents (first and third), and two Instructions agents. Each heading must stay within 1.5px of where it was clicked. Clicks and scrolls go through page.mouse, since Playwright's own scroll before a click reads as the reader's. Run (mica, mica-run), at base |
||
|
|
c2fd48782b |
Put back what 1f05c311d took out of main by mistake
|
||
|
|
1f05c311d9 |
library: an open memory holds still while the Memory tab polls (Nietzsche_Li on X)
"资源库-记忆中,被展开的记忆的表单会定时抖动". While search by meaning
still has memories to read (read < of, which can last up to a minute
between memembed.Keep's reads) or a learn-from-conversations run goes,
the Memory tab reads its row again every 2s, and each read drew the
whole page anew. The open editor was a new .lib-detail each time and
played its content-in entrance (opacity .5, 2px slide) every 2s.
- semWatch/distWatch draw nothing when the read changed nothing, and
redraw only their own row (redrawRow) when it did; the whole tab only
when the memories changed.
- render() marks a .lib-detail open before it (same data-detail) as kept,
so it doesn't replay its entrance. This covers every render of an
open editor in the Library: memories, instruction sets and agents'
files (the siblings; no other Library tab polls into render()).
- A new memory's text no longer takes the focus back on every render.
Run (mote): library-memory-steady.test.cjs, all 5 languages, 980/420,
chromium + webkit: green 4 of 4 whole-file runs after the last change
(webkit alone 2 of 2 before it). Broken by hand: the same test against
origin/main's client.js and library.css: 22 of 22 red ("the editor
played its entrance again"). One webkit de 420 red was the test's own
first row click intercepted by the header at 420px while the page
settled; the test now opens rows with a DOM click.
Also run, both engines, every language, 980/420: library-memory, library-memory-select, library-memory-suggest, memory-icon, library-instr-busy, library-instr-sets, library-linked-set, library-follow-server: all green. No Go code changed, so no go test or vet.
Not tried: the real app on a real memory store mid-read.
|
||
|
|
4431e31f7c |
library: a project gets subagents of its own, per agent (jinpwng on X)
The Subagents tab now lists the projects as Skills and MCP do. Opening
a project shows each library subagent with chips for the agents that
read a project's own subagent folder: Claude Code (.claude/agents),
Codex (.codex/agents, TOML), OpenCode, Gemini CLI, Qwen Code, Droid
(.factory/droids), Cursor and Copilot (.github/agents/*.agent.md). A
tick writes the subagent into that project only, in the agent's own
format; the agent's global folder and other projects are untouched.
Each file is recorded by its hash and rewritten or removed only while
it is exactly as magpie wrote it, so a same-name file of the user's is
left alone. A rename in the library follows into each project. The
files are kept out of git by the project's info/exclude block, and
follow the repository's other worktrees (syncTrees now copies
Subagents, and clears it for a worktree let go).
POST /api/library/projects/subagents {dir, name|names, agents}. No CLI
yet, like project servers. Hooks, instructions and Claude plugins have
no project scope yet (filed separately).
Run (mica / mote via mica-run, mote-run):
- go test -count=1 ./internal/library ./internal/gui: ok
- node --test, chromium + webkit: project-subagents, project-scope,
project-servers, project-skills-pick, project-skills-groups,
project-remove-keep, library-subagents, library-all, library-items,
i18n-keys, i18n-en-no-cjk, claude-subagents-pick,
codex-subagents-lead, subagent-effort: 150/150 pass
- gofmt -l clean; go vet darwin, linux -tags nogui, windows on
internal/library and internal/gui: ok
Broken by hand: dropping Subagents from syncTrees' copy made
TestProjectSubagentsFollowWorktrees red ("the worktree hasn't the
project's subagent"); the earlier session broke the fix by hand and
saw the new library tests go red.
Not tried: a real Claude Code/Codex session picking up the project
subagent; the full go suite (started after the tag); Windows/Linux
runs of the GUI.
|
||
|
|
610ae1f541 |
library: handing skills over turns off the all-in-~/.agents/skills setting and takes magpie's links out (ConatusMoon2222 on X)
Put skills in "~/.agents/skills" (SharedSkills) gives every agent that reads
that folder every skill, so it cannot go with choosing agents per skill,
which is what "Manage in magpie" (HandOverSkills) is for. With the setting
on, a handed-over skill's entry was taken away and the next sync linked it
back there, so the link stayed (reproduced in a sandbox HOME). Handing over
now turns the setting off in the same write; the sync then removes magpie's
own links there (sweepShared: only ours, never the user's entries). The
confirm sheet says so, only while the setting is on. The Put skills in note
says the skill router lists nothing while every skill is in
~/.agents/skills (the "none" the reporter met), only when both are on.
Strings in zh, zh-TW, ja, de.
Run (on mote, at this tree):
- TestHandOverWithSharedSetting: red with the l.SharedSkills = false line
commented out ("a link is left in ~/.agents/skills"), green with it.
- go test ./internal/library ok; go vet darwin, GOOS=windows, linux nogui
on internal/library ok; gofmt -l clean.
- GUI: skill-handover, shared-skills, i18n-keys, i18n-en-no-cjk in chromium
and webkit, 23/23 each.
Not run: the full GUI suite and go test ./... before the tag; a real
account's Library; WebKitGTK.
|
||
|
|
f1f512c1ec |
library: a repository's heading folds an agent's profiles into one chip, and a row's profiles chip lines up with the hand (Yanzhongixuy on X)
0.1.3926, several Hermes profiles: the Skills page's source headings (anthropics/skills ...) drew one icon per profile, a long strip, and the one chip |
||
|
|
fd9033cbfd |
library: a synced skill keeps its library group (ConatusMoon2222 on X)
Cause. A skill's group is traced (tracer.repoOf) from files that belong to
one computer: the skills CLI's lock, a git checkout, CC Switch's record,
and Skill.From noted by an install-again or Group again. The sync bundle
carried none of it (CarriedSkill had Source, not From), and Put built every
skill as a new Skill, so the other computer had nothing to trace and put
the skill under "this computer". Group again only fetches repositories some
skill is already traced to, so with no skill traced it had nothing to start
from; and where it did group, the next sync's Put wrote the skill new again
and took it back out.
Change. Collect carries the traced repository as CarriedSkill.From for a
skill with no source of its own (none, or a folder). Put writes it as
Skill.From. When the bundle has none (made by a magpie before this), Put
keeps the From this computer already found for the same skill, and keeps
Skill.Gone ("kept on this computer only") for one with the same source.
Old data. Skills synced before this stay in "this computer" until one of:
the computer that has the trace updates and syncs (its bundle then carries
From, and Put applies it here), or Group again here, which works as soon as
one skill of the pack still names the repository (a skill installed from
GitHub carries its source); the result now survives later syncs. A pack
with no skill traced anywhere on the receiving computer has nothing to start
from there until the first computer has synced with this version.
Tests (library/carry_from_test.go), each red on the old code:
TestSyncedSkillKeepsItsRepo (lock-traced skill A -> B -> C),
TestSyncKeepsRepoFoundHere (old bundle, From found here kept),
TestRegroupAfterOldSync (old sync, Group again, then the same bundle
again). Broke Put's From by hand: first two go red.
Run on mote: go test ./internal/library ./internal/davsync ./internal/backup
./internal/gui ok; Library GUI files in chromium and webkit (see below).
Not tried: two real machines through S3 (the fake-S3 davsync tests pass);
a copy Group again bound to its repository is still unbound by a sync from
a computer that has it unbound (filed).
|
||
|
|
2a1111cbab |
library: an agent's profiles are one chip on a row, picked in the app menu (Yanzhongixuy on X)
With several Hermes profiles the Library listed each as its own icon on every skill/MCP row (~20 identical glyphs). Profiles of one agent family (hermes#, omp#, claude#, qwenpaw#, WSL variants too) now collapse into one chip with a count; a click opens the app menu (openProtoMenu, multi-tick, live) to pick profiles one by one. All still toggles every profile. Rows only; the By agent view is unchanged. Other multi-profile agents (omp, claude, qwenpaw) had the same problem and go through the same code. Run on mote at the branch head: library-profile-chip.test.cjs (new, 12 cases, chromium + webkit, en/zh/zh-TW/ja/de), red 12 of 12 with profileChip broken by hand; library-*, group-skill-chips, skill-*, mcp-*, i18n-*, hermes-*, omp-*, project-* GUI files: all green except library-loading (Claude plugins tab, already #6204) and one webkit billion-context card case that passed alone (load flake). Not tried: a real Hermes install with 20 profiles, Linux WebKitGTK. |
||
|
|
5d5d57cbbb |
library: Variables are carried in backups and sync, keys only with keys (onducoder on X)
A skill's key set once as a Library variable (ANYSEARCH_API_KEY and the like) now goes with the library: Bundle.Env carries name, value and agents (nil from an older magpie, and Put then keeps this computer's). It follows how servers' tokens are carried: a backup or sync without keys keeps the names and empties every value (whatever the name, since a variable's name says nothing of its value), WithSecrets fills them from this computer's, and one with keys is sealed under its passphrase. A variable with no value is not written into an agent (syncEnv), and a value the user set in the agent's file is still never overridden. Not built: showing the variables a skill needs on its sheet; nothing in a SKILL.md says them reliably. Run (mote): go test ./internal/library ./internal/backup ./internal/davsync ok; gofmt clean; go vet darwin, windows, linux -tags nogui clean. Broken by hand: WithoutSecrets leaving the value turns TestEnvIsCarried red. Not tried: real Claude Code / Codex reading the carried key; a real WebDAV or S3 round trip; the full suite; GUI tests (no GUI file touched). |
||
|
|
a1a3b6fadb |
library: DeepSeek Harness folds its context with billion-context through its /bili/ prefix (VantH_off on X)
VantH_off asked for DeepSeek Harness in billion-context's support.
Library's billion-context tab offered Pi, omp, OpenCode, Claude Code, Hermes
and Zed. bili's dsh route is `dsh plugin add billion-context` (billion-context
0.1.213 README), which loads in dsh's process and takes traffic by proxy
settings; magpie's dsh route is baseURL http://127.0.0.1:3425/v1, plain http
on loopback, so that never sees it and the plugin would add tools and fold
nothing (the Hermes case,
|
||
|
|
e174b55150 |
library: a Variables tab gives environment variables to Claude Code and Codex (paopao_baobao on X)
An environment variable is kept once in the Library and written into each agent picked: Claude Code's settings.json "env", Codex's config.toml [shell_environment_policy.set] (a sub-table or inline set is edited; a dotted spelling is refused). It follows Hooks: Applied.Env records what magpie wrote, so turning it off or removing it takes out only that, and a value the user set or changed in the file is never overridden (a conflict is a problem on the row). An unreadable file is an error, nothing is written. The tab has name, value and agent chips, an edit sheet and a row Remove with a confirm; its sidebar entry is in "Every agent". Not carried in backups, as hooks first were. docs/subsystems/library.md updated. Run (mica, sandbox HOME): internal/library and internal/gui go tests ok; gofmt clean; go vet darwin, linux -tags nogui, windows clean; GUI library-*, i18n-* in chromium and webkit (en, zh, zh-TW, ja, de, 440px): all green except "the Library while it loads", red on the merge base too (not from this change). Existing tab-list assertions in library-hooks, -subagents, -groups, -loading now include Variables. Broken by hand: syncEnv overwriting the user's value turns TestEnvNeverOverridesTheUsers red. Not tried: real Claude Code / Codex reading the written env; other agents (Gemini .env, Qwen, Droid); WSL; env in backup carry. |
||
|
|
60fde6fb1a |
library: an MCP server holds several accounts, one in use, switched in place (Elorynth on X)
A remote server can hold several OAuth sign-ins or several sets of headers (Authorization keys), one in use, which every agent given the server follows. - mcpauth: a server's sign-ins are kept with the one in use at m[name] and the others in Spare (Use, RemoveAccount, StartAccount); the gateway sends the one in use from its next request on. - library: Server.Accounts and Server.Account; `live` lays the account's headers over the server's own in through, remoteHeaders and hubKey, so a switch rewrites each agent's file. A save from the editor keeps them, and a backup or sync carries no account's key (carry.go). Add, use and remove calls, POST /api/library/mcp-account, and mcp-signin takes add and label. - GUI: a server with one set of headers or one sign-in looks as before, with a quiet "+ Add account"; with several, a list with the one in use marked, a click to switch, an x to remove. Four languages. - mcp_rename tests compare mcpauth.Record with reflect.DeepEqual now, as Spare makes it not comparable (the windows one too). Run (mote, at this tree): go test ./internal/library ./internal/mcpauth/... ./internal/gui; go vet darwin, linux nogui, windows; mcp-accounts.test.cjs in chromium and webkit, five languages, plus the existing mcp-* and library-mcp-* and i18n GUI files. Broken by hand: live() returning the server unchanged turns TestServerAccountsSwitchEveryAgent red; the use click removed turns mcp-accounts red. Not tried: a real OAuth server with two real accounts; an agent's upstream Mcp-Session-Id is not reset by a switch. |
||
|
|
b52c711142 |
Restore what 85e6ec540 reverted: it was committed on a stale index and took out b587eb306's and earlier work (webview2, library skills, opencode endpoints, quotas); this puts the tree at b587eb306 plus the Paseo agent only
|
||
|
|
85e6ec5406 |
agent: Paseo's Claude model picker lists magpie's models (@TheMist016 on X)
Paseo (getpaseo/paseo) starts the same Claude Code, but builds its own model
list: first-party models plus settings.json's `model` and a few
ANTHROPIC_*_MODEL variables (providers/claude/models.ts). It never reads
Claude Code's modelPicker, where magpie writes every model, so the rest were
not selectable in Paseo. Paseo's own ~/.paseo/config.json takes
agents.providers.claude.additionalModels ([{id,label,description}], checked
against protocol/src/provider-config.ts) and passes each id to Claude Code as
written.
New agent "Paseo" (detected by ~/.paseo or PASEO_HOME): its switch writes the
models Claude Code's /model lists (same ids, [1m] marks, names; only the ones
picked for it) there, marked "via magpie" in the description; the user's own
entries and keys stay, off takes out only magpie's, a sync refreshes when on.
Claude Code must be connected to magpie as well.
Run (mote-run, sandbox HOME in tests): TestPaseoAdditionalModels,
TestStateListsPaseo, internal/agentenv, internal/gui full package ok;
internal/agent full run red only on TestPiGroupEntryKeepsItsMembers, which is
red the same on origin/main
|
||
|
|
12cd456f2c |
library: Skills > New skill makes a skill of the user's own (josephBenchap on X)
josephBenchap asked to create a skill in the Library; it could only
install or bring one in. Skills now has a New skill button beside Find
skills. A dialog takes a name, a description and the agents (the app's
chips, no select); Create writes skills/<name>/SKILL.md in the library's
folder with name and description front matter (YAML-marshalled, one line,
at most 1024 characters), lists it with no source, gives it to the agents
picked like any imported skill, and opens it in the reader, whose path
link opens the file in the user's editor. The name is checkName's, and
refused when the library or an agent already has one by that name
(compared without case) or a folder is in the way. The follow-the-server
note already sits above the Skills tab, so it covers this too. en, zh,
zh-TW, ja, de. docs/subsystems/library.md says so.
Run on mote at this head:
- gofmt -l clean; go vet ./internal/library ./internal/gui on darwin,
GOOS=linux -tags nogui and GOOS=windows: ok.
- go test ./internal/library ./internal/gui: ok. TestCreateSkill is new.
- GUI node --test in chromium and webkit: library-new-skill (new; en and
zh, 1100 and 420px: refusal stays in the dialog, agent untick posted,
reader opens, no select, no sideways scroll), library-items,
library-follow-server, library-all, library-discover-jump,
library-groups, library-intro-width, library-linked-set,
library-pick-remove, library-row-open-scroll, library-ime-scroll,
library-desktop-skills, library-gone-agents, library-bar-more,
library-chip-fan, i18n-keys, i18n-en-no-cjk, gui-de, gui-ja, gui-zh-tw:
all pass.
- library-loading is red (2 of 6) on this tree and on origin/main
|
||
|
|
8af7c27fff |
library: mcp add takes header=, env= and timeout= as settings, mcp set and mcp show (Abandon332 on X, #6111)
`magpie library mcp add` handed env=A=B and timeout=30 to the program as arguments (exit 0, written into the agent), and refused header= on a URL, so a token-bearing remote MCP needed a hand edit of library.json. SplitServerWords takes header=K=V (or K: V), env=K=V, timeout=SECS, agents= and --local out of the line; words after -- are the program's. A setting-looking word magpie doesn't know (headers=, envs=) is refused; header= on a command or env= on a URL is an error. New: mcp set <name> header=|header-=|env=|env-=|timeout= keeps the rest of the server, and mcp show <name> prints it as JSON. Header names match without case and keep the stored spelling. Run (wsl-run, -tags nogui): TestSplitServerWords, TestSetServerKeepsTheRest, TestLibraryMCPHeadersEnvTimeout, all of internal/cli and internal/library ok; GOOS=windows and darwin go vet of both packages; gofmt clean. The new CLI test fails on the old code by construction (env/timeout in Args). Not broken by hand separately. Not tried: win-run, the GUI (its save already sends headers; a stale open editor over a hand edit isn't addressed), the TUI line (still ServerOf), the other agents' encoders for timeout. Not run: full suite. |
||
|
|
5a9b5720da |
library: a Remote magpie's skills and prompts can be used on the client (KoiLx0 on X)
A Remote magpie's editor has a new switch, Use its skills and prompts. The remote serves its Library at GET /v1/magpie/library (local or shared callers; a held key is refused; no MCP servers, which the MCP switch already covers; borrowed items are never passed on). The client fetches it every 10 minutes and once on switching on, and adds each skill and prompt set as remote-<id>-<name>, recording a hash of what it wrote. It only changes what still matches that hash: a skill or set of the user's by the same name, one the user edited, and one the user removed stay as they are; an update or drop moves the old copy to the backups; switching off takes out what is unchanged. The first set becomes active only when no prompt is active. Run (wsl-run, magpie-wt/remote-library at the pushed head after rebase): - go vet -tags nogui ./..., GOOS=windows and GOOS=darwin vet of library, provider, gateway, gui: clean. gofmt -l clean. - go test ./internal/library ./internal/provider: ok. internal/gateway: TestReadOnlyKeyEveryRoute named the new route (fixed here, now ok); the package then ran to the end of a 30m wsl timeout on a slow box. - TestBorrowRemoteLibrary and TestBorrowedSkillGoesWithTheRemote: broke by hand (the user's-own-skill guard turned off), TestBorrowRemoteLibrary went red with "kept []", restored. - GUI remote-magpie.test.cjs (chromium + webkit): its new assertions for the switch pass, but the file is red on main before this change (#6099: line 160 and a layout assertion), so they ran in a copy with those two assertions relaxed. i18n tests ran in the same call. Reds not mine: #6099, #6103 (TestSettingsSaveKeepsWhatItDoesNotSend). Not tried: a real two-machine run; internal/gui and gateway full packages to completion on wsl; Collect/Put (sync backups) still carry borrowed items as ordinary ones. |
||
|
|
3bb9575dc3 |
library: an rtk.exe in winget's folder that winget doesn't list is upgraded from rtk's release (netube99 on X)
RTK upgrade failed with "winget failed (exit code 0x8A150014): winget finds no rtk-ai.rtk package". rtkUpgrader took any rtk under a \WinGet\ folder for winget's and ran winget upgrade, though winget had no record of it. Now, when the exe sits inside winget's folders and winget says it did not install it (wingetDisowns: records elsewhere, or winget list exit 0x8A150014), the upgrader is the existing Windows-release action (zip checked against checksums.txt), applied to the file a WinGet\Links link points to. A link to an exe outside winget's folders (--location) and an rtk winget does list still go to winget; winget that can't answer is not taken over, as before. Run: wsl-run go test ./internal/library (full package, ok), go vet linux and GOOS=windows ok, gofmt clean. New TestRTKWingetFolderWithoutRecord is red on the old rtk_upgrader (stash-tested). On xiaomi-gpu (win-run) a real rtk 1.1.0 in a fake WinGet\Packages\rtk-ai.rtk_fake folder went to 1.2.0 through UpgradeRTK. Not tried: netube99's actual machine, so why winget lost its record is unknown; GUI (no page change). |
||
|
|
61a04f42a2 |
library: a project's Skills menu groups the skills by source, a heading ticks the whole group (Elorynth on X)
The project card's Skills menu listed every library skill flat. It now
lists them as the Library does (skillGroups(true): by repository or the
user's own group, this computer's last, whatever sort the list has), with
a heading over each group. Pressing a heading ticks all of the group's
skills, or unticks them when all are in; it is half-ticked while some are.
A typed filter keeps a group's heading over the skills it finds, and
matches a skill by its group's name. One group only stays the flat list.
openProtoMenu takes a `group` option (the values it ticks) for this.
Paid for in app.js by five comments cut, no budget raise.
Run on the Windows box (mote's Chromium launch hung, SSH refused at
times): project-skills-groups.test.cjs, new, in chromium and webkit,
en/zh/zh-TW/ja/de at 400px wide: red on the old code (6 of 6), green
after. With project-*, i18n-*, menu-*, proto-menu-overflow and
skill-group* GUI files in both engines: all green except
menu-input-scroll and menu-scroll (14 chromium, 13 webkit), which are
red the same at origin/main
|
||
|
|
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
|
||
|
|
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.
|
||
|
|
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 ( |
||
|
|
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). |