Files
magpie/internal/cli
yetone 8af7c27fff library: mcp add takes header=, env= and timeout= as settings, mcp set and mcp show (Abandon332 on X, #6111)
`magpie library mcp add` handed env=A=B and timeout=30 to the program as
arguments (exit 0, written into the agent), and refused header= on a URL,
so a token-bearing remote MCP needed a hand edit of library.json.

SplitServerWords takes header=K=V (or K: V), env=K=V, timeout=SECS,
agents= and --local out of the line; words after -- are the program's.
A setting-looking word magpie doesn't know (headers=, envs=) is refused;
header= on a command or env= on a URL is an error. New: mcp set <name>
header=|header-=|env=|env-=|timeout= keeps the rest of the server, and
mcp show <name> prints it as JSON. Header names match without case and
keep the stored spelling.

Run (wsl-run, -tags nogui): TestSplitServerWords, TestSetServerKeepsTheRest,
TestLibraryMCPHeadersEnvTimeout, all of internal/cli and internal/library
ok; GOOS=windows and darwin go vet of both packages; gofmt clean. The new
CLI test fails on the old code by construction (env/timeout in Args). Not
broken by hand separately. Not tried: win-run, the GUI (its save already
sends headers; a stale open editor over a hand edit isn't addressed), the
TUI line (still ServerOf), the other agents' encoders for timeout.
Not run: full suite.
2026-11-11 17:01:36 +08:00
..