Reported by 1007cordon-ux in #605: every chat with 0.1.0 failed at the round step with "妙手 round 失败:HTTP 200 code=400 msg=source 不存在或未启用: CatPawCLI". The 10-09 capture the package was built from was the CatPaw CLI's (source CatPawCLI, mode CLI, m-appkey com.sankuai.mcopilot.cli); the gateway no longer serves that source. The reporter changed both bodies to source CatX / mode CATX_APP, kept the headers, and got a normal completion from catpaw/glm-5.3-flashx through a real gateway request. That is the combination the package README documented from the start, and the same author's magpie-catpaw-auth 0.2.3 on npm sends it with these same headers. - index.mjs: one frozen BODY_IDENTITY ({source: "CatX", mode: "CATX_APP"}) spread into both the round and the turn body, so they can't differ. Headers unchanged (m-appkey com.sankuai.mcopilot.cli, x-agent-version 1.2.0-beta.6, axios UA). - fake.mjs: answers a disabled source (CatPawCLI) with HTTP 200 {code: 400, msg: "source 不存在或未启用: <source>"}, the body behind the report, and refuses a turn whose source/mode differ from its round's. - testdata/issue-605.json holds the reporter's line verbatim; a test checks that the fake's refusal, put through the plugin's round error format, is that line byte for byte. - README: the protocol note says why the body isn't the capture's. Not confirmed: whether the official CatX desktop app sends a different m-appkey or x-agent-version. No official client is on npm, and the CatPaw sites offer no download without signing in, so the headers stay the captured CLI's (the reporter's verified combination). Run on mote at this tree (mote-run -C the worktree): - bun test packages/catpaw: 28 pass, 0 fail - HOME=$(mktemp -d) bun test (root): 4550 pass, 9 skip, 0 fail, 352 files - bun scripts/check.mjs: exit 0 (catpaw ✓) Broken by hand, then restored: - BODY_IDENTITY back to CatPawCLI/CLI: 9 fail, each chat error the reporter's exact text ("妙手 round 失败:HTTP 200 code=400 msg=source 不存在或未启用: CatPawCLI"). - only the turn body back to CatPawCLI/CLI: 5 fail. Not tried: a real CatPaw account (none available); the fix rests on the reporter's real request.
8 lines
665 B
JSON
8 lines
665 B
JSON
{
|
|
"note": "plugins#605 (1007cordon-ux, 2026-11-01): what magpie showed for every chat with plugin 0.1.0, verbatim. The plugin formats a refused round as `妙手 round 失败:HTTP <status> code=<code> msg=<msg>`, so the gateway answered HTTP 200 with the body under `upstream`. The reporter verified that source CatX / mode CATX_APP, with the same headers, gets a normal completion.",
|
|
"reported": "妙手 CatPaw: 妙手 round 失败:HTTP 200 code=400 msg=source 不存在或未启用: CatPawCLI",
|
|
"upstreamStatus": 200,
|
|
"upstream": { "code": 400, "msg": "source 不存在或未启用: CatPawCLI" },
|
|
"served": { "source": "CatX", "mode": "CATX_APP" }
|
|
}
|