@AXmake110 on X: on Library > Claude plugins, clicking the chip of a
Claude Code config folder (claude#magpie-desktop) answered
`agent "claude#magpie-desktop": not an agent's id`, so the plugin
couldn't be turned off for it. The page draws a chip for each profile
agent (claude#, hermes#, omp#), and the library already writes skills,
MCP servers and instructions to them (targets.go), but checkAgent took
only name or name@wsl:distro.
checkAgent is the one place an agent id is validated in the library.
It now takes name[#profile][@wsl:distro], the profile a plain file name
like a distro's. That fixes each route through it: plugins/agents
(PluginAgents), an agent's own instructions (SaveInstructions Extra,
setup.go's extras), skills/how (SetSkillHow) and carry.go's import.
The other chip routes (skills, servers, hooks, env, subagents agents)
never called it and already took profile ids. No GUI change.
Run on mica (mote at load ~130):
- TestLibraryTakesAProfilesAgentID (new): with origin/main's
library.go put back it FAILs at the plugin's off for the profile with
`agent "claude#magpie-desktop": not an agent's id`; passes with the
change. It also checks bad ids (claude#, #work, claude#../x,
claude#a/b, claude#a#b, claude#.x) are still refused.
- gofmt -l internal/library: nothing; go vet ./..., GOOS=linux go vet
-tags nogui ./..., GOOS=windows go vet ./...: ok.
- go test -tags nogui ./internal/library ./internal/gui -count=1: ok.
Not run: the full go test ./... (mica had another session's gateway
run and GUI suite going), the GUI suite (no GUI file changed), a real
Claude Desktop profile.
Run at base 534b1a334, then rebased onto 1ab2c3984 (tray/usage files only, nothing in internal/library).
TestPluginImportCarryOnOffRemove was red on Windows only (Windows CI
compiles tests and runs none). The import replaces ${CLAUDE_PLUGIN_ROOT}
with the plugin's folder as written, so "${CLAUDE_PLUGIN_ROOT}/scripts/lint.sh"
becomes "C:\...\acme-kit/scripts/lint.sh", as Claude Code itself expands
it. The test wanted filepath.Join's all-backslash path, and looked for it
unescaped in raw JSON, where every backslash is doubled. It now expects
root + "/scripts/lint.sh" (and bin/db, and the data folder) JSON-escaped.
No product code changes.
Run: go test -count=1 -run TestPlugin ./internal/library ok on Windows 11
(xiaomi-gpu, win-run), mote (macOS) and WSL magpie-desktop, at origin/main
961427f12 plus this. Before it, red alone on Windows at the same base.
Not changed: TestGoneAgentListedToTakeOut and TestCheckMixedServerEachSide,
still red on Windows (#4115).
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).