Files
plugins/packages/catpaw/testdata/captured-round.json
T
lin2670 eeb344f174 catpaw: add the Meituan CatPaw plugin (#174)
Adds packages/catpaw (Meituan CatPaw): sign-in, paste-token sign-in, models, chat and usage. Hosts: ai.catpaw.meituan.com and catx.nocode.cn only; no dependencies or scripts; captures redacted.

Answers the 10-17 review: the request body's source/mode is CatPawCLI/CLI, matching the captured CLI round (testdata/captured-round.json, captured-turn.json) and enforced by the fake; the non-stream usage block that wasn't in the capture is gone; a no-credit error keeps the sign-in; the paste method returns a callback as the host calls it.

Run at 475979a (PR head 71f36ce with origin/main merged, loomy #175 included; registry.json conflict resolved keeping both entries), on mote with a sandbox HOME:
- bun test packages/catpaw: 24 pass, 0 fail
- bun scripts/check.mjs: exit 0 (catpaw ✓); bun test scripts: 3 pass, 0 fail
- Broken by hand, then restored: identity reverted to CatX/CATX_APP (8 fail), paste callback reverted (1 fail). The no-credit signIn:"kept" has no test (removing it stays green).

Not tried: a real CatPaw account. Not on npm yet: served from the dist branch until the first version is published by hand.
2026-10-29 21:12:00 +08:00

43 lines
1.4 KiB
JSON

{
"note": "Captured 2026-10-09 from the official desktop client talking to its own gateway. Cookies, host and message text redacted; header keys, values and body protocol fields verbatim. See packages/catpaw/index.mjs gatewayHeaders and runConversation.",
"path": "/api/agent/conversation/round",
"headers": {
"accept": "application/json, text/plain, */*",
"accept-encoding": "gzip, compress, deflate, br",
"content-type": "application/json",
"user-agent": "axios/1.19.0",
"m-appkey": "com.sankuai.mcopilot.cli",
"m-debug": "true",
"m-host": "<client machine LAN IP — redacted>",
"m-spanid": "0.2",
"m-spanname": "conversation.round",
"m-traceid": "e66f2791065a78b22f6975d7726f30b7",
"x-request-id": "0e51db8a-9eae-44d0-b580-cec10f9a2154",
"x-trace-id": "e66f2791065a78b22f6975d7726f30b7",
"content-length": "1897"
},
"bodyProtocol": {
"agentType": "main",
"conversationId": "<redacted>",
"dxNoticeEnable": false,
"enableTodos": true,
"mcpServers": [],
"mode": "CLI",
"modelType": 30,
"permissionMode": "unsafeBypassPermissions",
"repositories": [],
"rulesMessage": "",
"source": "CatPawCLI",
"toolVersion": "2.0.2",
"goal": null,
"userPromptContext": {}
},
"headerless_message_shape": {
"type": "user",
"content_types": [
"text"
],
"finished": true
}
}