autoclaw 0.2.23: ZCode's subagent opening line is rewritten too (#1094)
ZCode's built-in subagents (general-purpose) open "You are an agent for ZCode CLI. …", which the "You are ZCode" rule doesn't match. AutoClaw answered 406 for them while the main session, in the same minute on the same account, was 200. As with Claude Code's subagent line, an article goes in front of the name: "You are an agent for the ZCode CLI." The reporter ran exactly this rule on 0.2.22: 406 before, 200 x2 after. Run (WSL, magpie-desktop, HOME=$(mktemp -d)): bun test in packages/autoclaw, 117 pass / 0 fail; bun scripts/check.mjs autoclaw ok. Broken by hand: without the new rule, "a system prompt carrying every known line at once comes out clean in one pass" goes red. Not tried: a real AutoClaw account. Reported-by: aynauynij
This commit is contained in:
@@ -97,6 +97,12 @@ const FLAGGED = [
|
||||
[/You are Cline/gi, "You are the Cline agent"],
|
||||
[/You are Qwen Code/gi, "You are the Qwen Code agent"],
|
||||
[/You are ZCode/gi, "You are the ZCode agent"],
|
||||
// #1094: ZCode's built-in subagents (general-purpose) open "You are an
|
||||
// agent for ZCode CLI." — 406 on autoclaw while the main session, same
|
||||
// minute and account, is 200; the reporter's patched run was 200 x2. The
|
||||
// "You are ZCode" rule above can't catch it. As for Claude Code's
|
||||
// subagents, only an article goes in front of the name.
|
||||
[/an agent for ZCode/gi, "an agent for the ZCode"],
|
||||
[/operating inside pi, a coding agent harness/gi, "operating inside the pi coding agent harness"],
|
||||
// ZCode's opening line is "This conversation is powered by GLM-<version>";
|
||||
// the CN gateway refuses that wording with any GLM version, in any case,
|
||||
|
||||
@@ -398,6 +398,10 @@ test("a system prompt carrying every known line at once comes out clean in one p
|
||||
["You are Cline, a coding assistant.", "You are the Cline agent, a coding assistant."],
|
||||
["You are Qwen Code, an interactive CLI tool.", "You are the Qwen Code agent, an interactive CLI tool."],
|
||||
["You are ZCode, an interactive coding agent", "You are the ZCode agent, an interactive coding agent"],
|
||||
// #1094: ZCode's subagent opening line
|
||||
["You are an agent for ZCode CLI. Given the user's message, you should use the tools available to complete the task.", "You are an agent for the ZCode CLI. Given the user's message, you should use the tools available to complete the task."],
|
||||
// the rewritten form is left as it is
|
||||
["You are an agent for the ZCode CLI.", "You are an agent for the ZCode CLI."],
|
||||
["operating inside pi, a coding agent harness.", "operating inside the pi coding agent harness."],
|
||||
["This conversation is powered by GLM-5.3 · AutoClaw 国内 (Zhipu)", "This conversation is powered by the GLM-5.3 model · AutoClaw 国内 (Zhipu)"],
|
||||
["You are powered by the model glm-5.3-flash[1m].", "You are powered by the GLM-5.3-flash model."],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@magpie-community/opencode-autoclaw-auth",
|
||||
"version": "0.2.22",
|
||||
"version": "0.2.23",
|
||||
"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": "./opencode.mjs",
|
||||
|
||||
Reference in New Issue
Block a user