Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/workbuddy/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,14 @@ const FLAGGED = [
[/(?<!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."],
// refusal traced in smart-open/TraeWorkAssistant#125). WorkBuddy matches
// the line whole and exactly, so a comma is enough to pass: measured on
// 2026-10-30 against copilot.tencent.com, one account, streamed, the line
// as DSH writes it answered 400 code 11128 and the same line with the
// comma answered 200. Saying it in another agent's terms passed too, but
// took the harness's own name out of the only line that says which agent
// runs here, and that name is what the rest of the prompt refers back to.
[/You are an AI agent powered by DeepSeek Harness\.?/gi, "You are an AI agent, powered by DeepSeek Harness."],
// A line WorkBuddy refuses in a long DeepSeek Harness chat, measured 400
// then 200 with this wording by tearslee (magpie-community/plugins#291). The
// model can quote it back into an assistant message, which the move to
Expand Down
2 changes: 1 addition & 1 deletion packages/workbuddy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magpie-community/opencode-workbuddy-auth",
"version": "0.2.1",
"version": "0.2.2",
"description": "OpenCode provider plugins for WorkBuddy's plans: WorkBuddy (CodeBuddy, copilot.tencent.com) and WorkBuddy AI (www.workbuddy.ai)",
"type": "module",
"main": "./index.mjs",
Expand Down
16 changes: 14 additions & 2 deletions packages/workbuddy/unflag.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,20 @@ 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.")
expect(unflagged("You are an AI agent powered by DeepSeek Harness. Be brief.")).toBe("You are an AI agent, powered by DeepSeek Harness. Be brief.")
expect(unflagged("YOU ARE AN AI AGENT POWERED BY DEEPSEEK HARNESS")).toBe("You are an AI agent, powered by DeepSeek Harness.")
})

// The opener says which harness the agent runs in, and the rest of a DSH
// prompt leans on that name. It is put in other words only as far as
// WorkBuddy's whole-line match needs, so the name stays.
test("DeepSeek Harness's opener keeps the harness's name", () => {
const opener = "You are an AI agent powered by DeepSeek Harness."
const spread = unflagged(opener)
expect(spread).toBe("You are an AI agent, powered by DeepSeek Harness.")
expect(spread).toContain("DeepSeek Harness")
expect(spread).not.toBe(opener)
expect(unflagged(spread)).toBe(spread)
})

test("Claude Code's request through magpie passes: header block gone, the rest rewritten", () => {
Expand Down
Loading