@magpie-community/opencode-workbuddy-auth 0.1.25 → 0.1.27
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 +4 -0
- package/index.mjs +20 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,6 +83,10 @@ 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.
|
|
89
|
+
|
|
86
90
|
The loader also translates OpenAI-compatible request spellings WorkBuddy
|
|
87
91
|
doesn't take: `max_completion_tokens` becomes `max_tokens`, `developer`
|
|
88
92
|
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) {
|
|
@@ -1461,6 +1465,21 @@ function priceOf(d, promotions, now = Date.now()) {
|
|
|
1461
1465
|
return { free: base === 0, rate: base }
|
|
1462
1466
|
}
|
|
1463
1467
|
|
|
1468
|
+
// effortsOf are the levels a config model takes. Most list them in
|
|
1469
|
+
// reasoning.supportedEfforts; some (fast-model, deepseek-v4.1-flash, kimi-k3,
|
|
1470
|
+
// gemini-3.5-flash … on both sites, plugins#255) say only supportsReasoning
|
|
1471
|
+
// and a default reasoning.effort. Those take low, high and max (each
|
|
1472
|
+
// reasoned under a real account, on four of them) and their own default.
|
|
1473
|
+
const EFFORT_ORDER = ["low", "medium", "high", "xhigh", "max"]
|
|
1474
|
+
function effortsOf(d) {
|
|
1475
|
+
const said = d.reasoning?.supportedEfforts
|
|
1476
|
+
if (Array.isArray(said) && said.length) return said
|
|
1477
|
+
if (d.supportsReasoning !== true) return []
|
|
1478
|
+
const own = d.reasoning?.effort
|
|
1479
|
+
const set = new Set(["low", "high", "max", ...(typeof own === "string" && EFFORT_ORDER.includes(own) ? [own] : [])])
|
|
1480
|
+
return EFFORT_ORDER.filter((e) => set.has(e))
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1464
1483
|
async function liveModels(site, a) {
|
|
1465
1484
|
const headers = new Headers()
|
|
1466
1485
|
sign(site, a, headers)
|
|
@@ -1483,7 +1502,7 @@ async function liveModels(site, a) {
|
|
|
1483
1502
|
m.output = d.maxOutputTokens
|
|
1484
1503
|
m.images = d.supportsImages === true && !textOnly(site, id)
|
|
1485
1504
|
Object.assign(m, priceOf(d, cfg.modelPromotions))
|
|
1486
|
-
const es = d
|
|
1505
|
+
const es = effortsOf(d)
|
|
1487
1506
|
if (es.length) {
|
|
1488
1507
|
const canOff = d.reasoning?.canDisableThinking
|
|
1489
1508
|
m.efforts = [...(!d.onlyReasoning && (canOff == null || canOff) ? ["none"] : []), ...es]
|
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.27",
|
|
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",
|