Files
magpie/internal/cli
yetoneandArobotmaster ab342fa40d library: magpie library project server and subagent add, rm and agents (#7248)
The CLI had project skills and instructions only. `server` and
`subagent` now list, add (agents= or the agents already used, else every
agent here that reads a project's MCP file or subagents folder), take
out and re-point a project's library servers and subagents through
ProjectServer and ProjectSubagents, the calls the Library page makes.
A name the project doesn't have is refused, as is an unknown agent or
flag; a part magpie couldn't place exits 1 with why.

The command shape follows the reference commit in the reporter's fork
(0d3a6de55), rewritten over this tree's calls rather than ported.

Run: mote-run go test ./internal/cli -run TestLibraryProject (the new
TestLibraryProjectServerAndSubagentCmd: the user's own .mcp.json server
survives an add and an rm, Codex's file gets the server, Claude's and
Codex's subagent files come and go with their agents). gofmt and go vet
./internal/cli clean.
Not tried: the whole Go suite; the package run also prints testenv's
docs-index guard (routing-groups pages newer than the search index),
which is not about this change; a real agent reading the files.

Co-authored-by: Arobotmaster <50254754+Arobotmaster@users.noreply.github.com>
2026-11-20 02:40:53 +08:00
..