Files
plugins/packages/autoclaw/package.json
T
yetone dff29df402 autoclaw 0.2.2: ZCode's and pi's identity lines are rewritten for the CN managed gateway (#245, #236)
autoclaw-cn's managed gateway (autoglm-acceleration-api.zhipuai.cn) answers
406 when the system text carries an agent identity line FLAGGED doesn't
cover. Two more entries, in the table's own style:

- "You are ZCode" (any case, anywhere; #245's probes) -> "You are the ZCode
  agent". #245 found "You are an interactive ZCode agent ..." answered 200,
  so the gateway reads the literal run, which the rewrite breaks.
- "operating inside pi, a coding agent harness" -> "operating inside the pi
  coding agent harness" (#236). pi's line wasn't probed, so the rewrite
  breaks both "inside pi" and "pi, a coding agent harness" and keeps pi's
  name for the model.

Both rewrites are fixed strings, so the same prompt always leaves the same
way and a cached prefix stays put. Only system and developer messages are
rewritten, as before. Claude Code's entry is unchanged. REFUSED_HINT names
ZCode and pi.

No general fallback: agents such as opencode put the user's own AGENTS.md
into the system text, so a pattern like "You are X, a ... agent" would
rewrite the user's words, and nothing shows the gateway matches that shape.

Tests use each reporter's literal line: unflagged, unflag's role scoping
(ZCode in a system part rewritten, the same line in a user message and pi's
in a tool message untouched), and the CN managed path end to end.

Run (worktree at origin/main 47fbf63):
- bun test packages/autoclaw/: 23 pass, 0 fail
- bun scripts/check.mjs autoclaw: ok
- HOME=$(mktemp -d) bun test: 1808 pass, 1 fail, the trae stream.test
  "connection reset" under the full suite (#124, open); packages/trae/
  alone 160/160 three times
- broken by hand: ZCode entry removed -> 3 red; pi entry removed -> 2 red;
  unflag's role check removed -> 2 red
- not tried against the real gateway: no autoclaw-cn account is signed in
  here
2026-10-19 17:42:06 +08:00

35 lines
1.0 KiB
JSON

{
"name": "@magpie-community/opencode-autoclaw-auth",
"version": "0.2.2",
"description": "OpenCode provider plugin for AutoClaw (Zhipu OpenClaw): oversea web sign-in (Google/z.ai) and CN phone SMS, multi-account pool, credit balance and daily check-in",
"type": "module",
"main": "./index.mjs",
"exports": "./index.mjs",
"files": [
"index.mjs",
"README.md"
],
"keywords": [
"opencode",
"opencode-plugin",
"magpie",
"autoclaw",
"zhipu",
"glm"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/autoclaw"
},
"magpie": {
"icon": "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%234f6ef7'/%3E%3Ctext x='32' y='42' font-size='28' text-anchor='middle' fill='white' font-family='sans-serif'%3E%E8%9F%B9%3C/text%3E%3C/svg%3E",
"options": {
"signin": true,
"signinHour": null,
"signinOnUsage": false
}
}
}