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 f1b0663f1, mote):
- go test -tags nogui -timeout 45m ./internal/library ./internal/davsync
./internal/backup: ok
- gofmt -l: empty; go vet GOOS=darwin (library, davsync, backup, gui),
GOOS=linux -tags nogui ./..., GOOS=windows ./...: clean
- Windows (win-run, xiaomi-gpu): go test ./internal/library -run
TestPlugin and ./internal/davsync -run Plugin: ok. The hook there names
B's C:\...\plugins\kit/bin/done (TestSyncLibraryPlugins first failed
on Windows for the test's own path form; fixed in the test).
- GUI, Chromium and WebKit, every language the files test:
library-plugins, library-items, agent-plugin-agents, i18n-keys,
i18n-en-no-cjk, old-webkit, every sync-*, github-sync, s3-sync,
auto-backup: 337 pass, 1 fail: webkit en "S3 sync settings", red the
same at origin/main f1b0663f1 (#2448, #3413, open).
Broken by hand, each red, then restored:
- parts not skipped and Plugins not set in Collect:
TestPluginCarriedWhole, TestPluginCarriedBySource,
TestSyncLibraryPlugins
- held.without dropped: TestPluginOldBundleKeepsPlugins
- fetchPlugins dropped: TestPluginCarriedBySource
- marketplace name fix reverted: TestPluginMarketplaceNameIsItsFolder
- empty list not hashed as none: TestNoPluginsHashAsBefore
- TestPluginFromFilesEitherOS guards that a Mac path is files on
Windows and C:\ on a Mac; it passed without a new check (such paths
are no git source), so none was added.
Not tried:
- a real two-computer sync through the GUI, Mac to Windows;
- a local marketplace entry's own fields (strict: false) aren't carried,
so there it is read from its files alone;
- a private git source over ssh on the receiving computer.
Reported by JJasonsun on Discord; issue by JJasonSun (#6685).