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).