dsh-llm-workbuddy 0.1.15 → 0.1.16
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/CHANGELOG.md +21 -0
- package/lib/index.js +42 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@
|
|
|
4
4
|
每次发版请同步 `package.json` 的 `version` 并打一个 `git tag`(如 `v0.1.13`),
|
|
5
5
|
在 GitHub 创建 Release 时本文件即为更新说明来源。
|
|
6
6
|
|
|
7
|
+
## [0.1.16] - 2026-09-10
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **适配 DeepSeek Harness `0.1.5-rc.1`(此前 0.1.15 在该版本上完全无法加载)**。
|
|
11
|
+
0.1.5-rc.1 移动了两个导出符号,而具名导入一个已不存在的符号会触发 ESM
|
|
12
|
+
**加载期 `SyntaxError`**,整个插件在 `import` 阶段即崩溃(provider、状态胶囊、
|
|
13
|
+
用量面板全部消失),不是运行期告警。现改为经命名空间对象取值并带兜底:
|
|
14
|
+
- `@deepseek-ai/dsh-llm`:`CallId` 在 0.1.5-rc.1 改名为 `ToolCallId`。
|
|
15
|
+
- `@deepseek-ai/dsh-settings`:`settingsNamespace` 已移除(改由注册内部
|
|
16
|
+
`parseSettingsNamespace` 校验,规则同为 `/^[a-z][a-z0-9-]*$/`),
|
|
17
|
+
`installSettingsSection` 改为 settings 服务的 `installSection` 方法。
|
|
18
|
+
- `settings` 分区改走 `ctx.inject(["settings"], (c) => c.settings.installSection(...))`,
|
|
19
|
+
与官方 `dsh-llm-deepseek` / `dsh-llm-pi-ai` 在 0.1.5-rc.1 上的写法一致。
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- `peerDependencies` 放宽为 `^0.1.1-rc.2 || ^0.1.5-rc.1`(`dsh-llm` /
|
|
23
|
+
`dsh-settings` / `dsh-timeout`),`@deepseek-ai/cordis` 放宽为 `^4.0.1 || ^4.0.2`,
|
|
24
|
+
以显式声明对 0.1.5-rc.1 的支持。修复为运行时取值,**同一个包在
|
|
25
|
+
0.1.1-rc.2 与 0.1.5-rc.1 上均可加载**。
|
|
26
|
+
|
|
7
27
|
## [0.1.15] - 2026-09-10
|
|
8
28
|
|
|
9
29
|
### Fixed
|
|
@@ -79,6 +99,7 @@
|
|
|
79
99
|
---
|
|
80
100
|
|
|
81
101
|
<!-- 历史版本锚点(便于生成 Release 时对比区间) -->
|
|
102
|
+
[0.1.16]: https://github.com/zdk119746/dsh-llm-workbuddy/compare/v0.1.15...v0.1.16
|
|
82
103
|
[0.1.15]: https://github.com/zdk119746/dsh-llm-workbuddy/compare/v0.1.14...v0.1.15
|
|
83
104
|
[0.1.14]: https://github.com/zdk119746/dsh-llm-workbuddy/compare/v0.1.13...v0.1.14
|
|
84
105
|
[0.1.13]: https://github.com/zdk119746/dsh-llm-workbuddy/compare/v0.1.12...v0.1.13
|
package/lib/index.js
CHANGED
|
@@ -23,7 +23,6 @@ import { fileURLToPath } from "node:url";
|
|
|
23
23
|
import z from "@deepseek-ai/schemastery";
|
|
24
24
|
import {
|
|
25
25
|
CONTEXT_WINDOW_EXCEEDED_CODE,
|
|
26
|
-
CallId,
|
|
27
26
|
EMPTY_RESPONSE_CODE,
|
|
28
27
|
LlmAdapter,
|
|
29
28
|
LlmError,
|
|
@@ -33,9 +32,50 @@ import {
|
|
|
33
32
|
isContextWindowExceededError,
|
|
34
33
|
isQuotaExceededError,
|
|
35
34
|
} from "@deepseek-ai/dsh-llm";
|
|
36
|
-
|
|
35
|
+
// Namespace imports for symbols that moved between harness releases. A named
|
|
36
|
+
// import of a symbol that no longer exists is an ESM load-time SyntaxError that
|
|
37
|
+
// takes the whole plugin down, so these resolve through the namespace object
|
|
38
|
+
// with a fallback instead.
|
|
39
|
+
import * as dshLlm from "@deepseek-ai/dsh-llm";
|
|
40
|
+
import * as dshSettings from "@deepseek-ai/dsh-settings";
|
|
37
41
|
import { MAX_TIMER_DELAY_MS, idleWatchdog, timeoutOf } from "@deepseek-ai/dsh-timeout";
|
|
38
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Brand a tool-call id. Harness 0.1.1-rc.2 exports `CallId`; 0.1.5-rc.1 renamed
|
|
45
|
+
* it to `ToolCallId`. Both brands are string-preserving, so the first one the
|
|
46
|
+
* loaded harness provides is correct on either release.
|
|
47
|
+
*/
|
|
48
|
+
const CallId = dshLlm.CallId ?? dshLlm.ToolCallId;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Validate a settings namespace. Harness 0.1.5-rc.1 stopped exporting
|
|
52
|
+
* `settingsNamespace` and validates inside registration instead; this mirrors
|
|
53
|
+
* the same lowercase-hyphenated grammar so a bad namespace still fails loudly.
|
|
54
|
+
*/
|
|
55
|
+
const settingsNamespace = dshSettings.settingsNamespace ?? ((value) => {
|
|
56
|
+
if (typeof value !== "string" || !/^[a-z][a-z0-9-]*$/.test(value)) {
|
|
57
|
+
throw new TypeError(`settings namespace "${value}" must match /^[a-z][a-z0-9-]*$/`);
|
|
58
|
+
}
|
|
59
|
+
return value;
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Wire this plugin's settings section to the optional settings service.
|
|
64
|
+
* Harness 0.1.1-rc.2 exports the free function `installSettingsSection`;
|
|
65
|
+
* 0.1.5-rc.1 replaced it with the `installSection` method on the settings
|
|
66
|
+
* service, reached through `ctx.inject(["settings"], …)`. Both register the
|
|
67
|
+
* plugin's composition config as the namespace base and fall back to it when
|
|
68
|
+
* the service is absent, so behaviour is identical either way.
|
|
69
|
+
*/
|
|
70
|
+
function installSettingsSection(ctx, ns, schema, entry, hooks) {
|
|
71
|
+
if (typeof dshSettings.installSettingsSection === "function") {
|
|
72
|
+
return dshSettings.installSettingsSection(ctx, ns, schema, entry, hooks);
|
|
73
|
+
}
|
|
74
|
+
ctx.inject(["settings"], (settingsCtx) => {
|
|
75
|
+
settingsCtx.settings.installSection(ctx, ns, schema, entry, hooks);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
39
79
|
/** Plugin identity (Cordis convention). */
|
|
40
80
|
export const name = "llm-workbuddy";
|
|
41
81
|
// `llm` is a hard requirement (the adapter must always register). `webServer`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-llm-workbuddy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "WorkBuddy (via the local workbuddy2api proxy) LLM provider adapter for DeepSeek Harness, with a Web login-status widget",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"CHANGELOG.md"
|
|
49
49
|
],
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@deepseek-ai/cordis": "^4.0.1",
|
|
52
|
-
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
|
|
53
|
-
"@deepseek-ai/dsh-settings": "^0.1.1-rc.2",
|
|
54
|
-
"@deepseek-ai/dsh-timeout": "^0.1.1-rc.2",
|
|
51
|
+
"@deepseek-ai/cordis": "^4.0.1 || ^4.0.2",
|
|
52
|
+
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2 || ^0.1.5-rc.1",
|
|
53
|
+
"@deepseek-ai/dsh-settings": "^0.1.1-rc.2 || ^0.1.5-rc.1",
|
|
54
|
+
"@deepseek-ai/dsh-timeout": "^0.1.1-rc.2 || ^0.1.5-rc.1",
|
|
55
55
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
56
56
|
}
|
|
57
57
|
}
|