Files
magpie/docs
yetone 54b9516473 library: a project's Pi packages, on, off or removed, and adopting its own (#7249)
A project now takes Pi packages: entries of its .pi/settings.json
`packages`, matched by piSourceID. A package is on (its source), off but
kept (every filter empty, as `pi config` writes it) or removed. Project.Pi
is what the project wants, PiRecs what magpie wrote; only an entry still as
magpie wrote it is changed or taken out, and a file magpie made goes with
its last entry. An entry the project had is its own: refused with a problem
until adopted, then switched without a rewrite, and put back as it was (never
deleted) when let go; one that picks some resources is refused.

Surfaces: POST /api/library/projects/pi (how on|off|removed|adopt),
`magpie library project pi [list|add|on|off|rm|adopt] <dir> <source...>`,
the project's own packages in Own["pi"], and a Pi packages block on the
Claude plugins tab's project card (switch, remove, Take over, add field) in
en, zh, zh-TW, ja, de. Pi installs a package itself when it next starts.

Run (mote): gofmt, go vet; go test ./internal/library ./internal/cli
./internal/gui (library, cli ok; gui red only in TestBuiltinsTranslated
#7257 and TestSettingsSaveKeepsWhatItDoesNotSend #7240, both filed);
GUI project-pi (new), project-own, project-plugins, project-hooks,
project-claude-plugins, project-servers, i18n-keys in chromium and webkit.
Not tried: a real Pi starting in a project with these packages; the whole
GUI suite; Windows.
2026-11-20 05:46:18 +08:00
..