workbuddy: reword DeepSeek Harness's identity line WorkBuddy refuses (11128) (#280)

DeepSeek Harness (dsh) opens every system prompt with "You are an AI agent powered by DeepSeek Harness." WorkBuddy refuses such chats as 11128, "Illegal API invocation from an unapproved channel". A FLAGGED rule now rewords that line to "You are an AI agent that helps the user with programming tasks." The new wording names neither magpie nor WorkBuddy.

Fixes #279. The issue stays open until the reporter confirms.

Verified at the reviewed head 3d275794edfccaf4fdafa75729c61cdb7015b5a5:
- The fixture is DSH's own line. The installed @deepseek-ai/dsh 0.2.0-rc.2 package dsh-system-prompt documents it as the fixed first-party opener at order -1000 (includeHarnessIdentity, default true), and its text is exactly "You are an AI agent powered by DeepSeek Harness."
- The new unflag.test.mjs lines fail against main e2c3a35's index.mjs (Received: "You are an AI agent powered by DeepSeek Harness. Be brief.") and pass with the change.
- packages/workbuddy `HOME=$(mktemp -d) bun test` with the change on main: 101 pass, 0 fail.
- Not tried: a live WorkBuddy request from DSH. The reporter's account and smart-open/TraeWorkAssistant#125 tie the refusal to this line.
This commit is contained in:
xiaozpp
2026-10-21 00:41:30 +08:00
committed by GitHub
parent d87950e1d7
commit 82452c58d8
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -463,6 +463,10 @@ const FLAGGED = [
[/You are Claude Code, Anthropic['’]s official CLI for Claude/gi, "You are Claude Code, Anthropic's CLI for Claude"],
[/Main branch \(you will usually use this for PRs\)/gi, "Main branch (usually the base for PRs)"],
[/(?<!the )Codex CLI is an open source project led by OpenAI\./gi, "The Codex CLI is an open source project led by OpenAI."],
// DeepSeek Harness (DSH) opens its system prompt with this line, which
// WorkBuddy refuses as 11128 (magpie-community/plugins#279; the same
// refusal traced in smart-open/TraeWorkAssistant#125).
[/You are an AI agent powered by DeepSeek Harness\.?/gi, "You are an AI agent that helps the user with programming tasks."],
]
function unflagged(text) {
+2
View File
@@ -15,6 +15,8 @@ test("each flagged phrase is put in other words, whatever its case", () => {
expect(unflagged(unflagged(codex))).toBe(unflagged(codex))
expect(unflagged("x-anthropic-billing-header: cc_version=2.1.280.31f; cc_entrypoint=sdk-cli;\nhello")).toBe("hello")
expect(unflagged("nothing to see")).toBe("nothing to see")
expect(unflagged("You are an AI agent powered by DeepSeek Harness. Be brief.")).toBe("You are an AI agent that helps the user with programming tasks. Be brief.")
expect(unflagged("YOU ARE AN AI AGENT POWERED BY DEEPSEEK HARNESS")).toBe("You are an AI agent that helps the user with programming tasks.")
})
test("Claude Code's request through magpie passes: header block gone, the rest rewritten", () => {