Files
zhangyandzy1233 a410afe0d9 zycode 0.1.0: zycode as a magpie agent through a reversible agent.toml (#1104)
Adds `@magpie-community/agent-zycode` 0.1.0: zycode (`zypi`, the VS Code extension, the ACP agent) on magpie's Agents page. magpie writes the model, gateway URL and key to `~/.pi-python/local.env`. A host part (`bridge.mjs`) copies them into the `[model]` table of `agent.toml` as text, and puts the file back byte for byte on disconnect, keeping any edits the user made meanwhile.

Reviewed at 618771e7c9269c8248599f05cd86eb18e00c358f:
- WSL Ubuntu 24.04, Bun 1.4.2: `bun test` in packages/zycode 20 pass; `bun scripts/check.mjs zycode` exit 0.
- Broken by hand: disconnect leaving agent.toml as is (`const back = current`) turns 9 of 20 red.
- No network and no child processes; local files only, temp-and-rename, symlinks refused.
- Real run by the author (Ubuntu VM, zypi 0.9.1, magpie v0.1.4069): only the four [model] lines changed; one turn answered through magpie (Usage shows zycode, 4 calls); after disconnect, agent.toml and local.env have identical sha256.

Not tried: Windows, macOS, the VS Code extension's frozen agent binary.

Co-authored-by: zy1233 <zy1233@users.noreply.github.com>
2026-11-13 23:17:06 +08:00

13 lines
548 B
JSON

{
"name": "@magpie-community/agent-zycode",
"version": "0.1.0",
"description": "zycode as a magpie agent: pick one of magpie's models for it on the Agents page",
"type": "module",
"main": "./index.mjs",
"files": ["zycode.agent.js", "index.mjs", "bridge.mjs", "README.md"],
"keywords": ["magpie", "magpie-agent", "zycode", "llm-gateway"],
"license": "MIT",
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/zycode" },
"magpie": { "agent": "./zycode.agent.js" }
}