@magpie-community/opencode-workbuddy-auth 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/index.mjs +12 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,6 +83,13 @@ Each chat carries WorkBuddy's headers:
|
|
|
83
83
|
A chat that doesn't open with a system message is given WorkBuddy's
|
|
84
84
|
default one, as the app does.
|
|
85
85
|
|
|
86
|
+
WorkBuddy refuses some agents' identity lines as an "unapproved channel"
|
|
87
|
+
(11128), so those lines are reworded before a chat goes out. Since 0.1.27
|
|
88
|
+
(#279) that includes DeepSeek Harness's opening line. A refusal of words
|
|
89
|
+
not reworded yet ends in a hint that names no one client (since 0.1.28):
|
|
90
|
+
WorkBuddy refused words in this client's prompt; use it from Hermes,
|
|
91
|
+
OpenCode or Pi, or add another provider to the group.
|
|
92
|
+
|
|
86
93
|
The loader also translates OpenAI-compatible request spellings WorkBuddy
|
|
87
94
|
doesn't take: `max_completion_tokens` becomes `max_tokens`, `developer`
|
|
88
95
|
messages become `system`, and an object `tool_choice` becomes WorkBuddy's
|
package/index.mjs
CHANGED
|
@@ -463,6 +463,10 @@ const FLAGGED = [
|
|
|
463
463
|
[/You are Claude Code, Anthropic['’]s official CLI for Claude/gi, "You are Claude Code, Anthropic's CLI for Claude"],
|
|
464
464
|
[/Main branch \(you will usually use this for PRs\)/gi, "Main branch (usually the base for PRs)"],
|
|
465
465
|
[/(?<!the )Codex CLI is an open source project led by OpenAI\./gi, "The Codex CLI is an open source project led by OpenAI."],
|
|
466
|
+
// DeepSeek Harness (DSH) opens its system prompt with this line, which
|
|
467
|
+
// WorkBuddy refuses as 11128 (magpie-community/plugins#279; the same
|
|
468
|
+
// refusal traced in smart-open/TraeWorkAssistant#125).
|
|
469
|
+
[/You are an AI agent powered by DeepSeek Harness\.?/gi, "You are an AI agent that helps the user with programming tasks."],
|
|
466
470
|
]
|
|
467
471
|
|
|
468
472
|
function unflagged(text) {
|
|
@@ -1695,11 +1699,15 @@ function makePlugin(site) {
|
|
|
1695
1699
|
|
|
1696
1700
|
// REFUSED_HINT is what the user can do about WorkBuddy's "Illegal API
|
|
1697
1701
|
// invocation from an unapproved channel": both builds answer it to a chat
|
|
1698
|
-
// holding words
|
|
1699
|
-
//
|
|
1700
|
-
//
|
|
1702
|
+
// holding words they turn away, whatever the headers. Codex's and Claude
|
|
1703
|
+
// Code's were the first (magpie #182), DeepSeek Harness's and Claude
|
|
1704
|
+
// Desktop's came later (#279, #170), and WorkBuddy reads every message, so
|
|
1705
|
+
// it names no client. FLAGGED rewrites the words known; this is for ones it
|
|
1706
|
+
// doesn't know. It ends the error's message word for word as magpie's
|
|
1707
|
+
// Routing page has it (WB_REFUSED in its routing client.js), which says it
|
|
1708
|
+
// apart from WorkBuddy's own words.
|
|
1701
1709
|
const REFUSED_HINT =
|
|
1702
|
-
"WorkBuddy
|
|
1710
|
+
"WorkBuddy refused words in this client's prompt (most often its system prompt); use it from Hermes, OpenCode or Pi, or add another provider to this group"
|
|
1703
1711
|
const REFUSED = /unapproved channel|illegal api invocation/i
|
|
1704
1712
|
|
|
1705
1713
|
// RESTRICTED_HINT is what the user can do about WorkBuddy's 403 code 11140
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magpie-community/opencode-workbuddy-auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"description": "OpenCode provider plugins for WorkBuddy's plans: WorkBuddy (CodeBuddy, copilot.tencent.com) and WorkBuddy AI (www.workbuddy.ai)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.mjs",
|