dsh-codebuddy-llm 0.1.1 → 0.1.3
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 +2 -1
- package/README.zh.md +2 -1
- package/index.js +10 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ This is an unofficial, third-party plugin. Its author is the only party behind i
|
|
|
28
28
|
|
|
29
29
|
## Requirements
|
|
30
30
|
|
|
31
|
-
- DeepSeek Harness
|
|
31
|
+
- DeepSeek Harness `>=0.2.1-rc.2 <0.3.0` (declared as `engines.dsh`; the installer refuses a mismatched host instead of loading it)
|
|
32
32
|
- Node.js `>=24.9`
|
|
33
33
|
- The `codebuddy` CLI on `PATH`, signed in (or point `command` at its absolute path)
|
|
34
34
|
|
|
@@ -119,6 +119,7 @@ Model ids come from the CLI itself: an `acp` route asks the handshake (which als
|
|
|
119
119
|
- `permissionMode` governs the CLI's tools, and harness permission presets, the filesystem sandbox, and the shell sandbox do not mediate them. The default `bypassPermissions` therefore grants the child the desktop process's OS access — narrow it when that is not intended.
|
|
120
120
|
- Only CodeBuddy-shaped output is understood: both the `stream-json` vocabulary and the positional-prompt invocation are CodeBuddy's.
|
|
121
121
|
- A missing or unreachable executable is reported as a refusal naming the configured command, instead of an empty catalog; the route still mounts, and still serves a `models` list you configured yourself. Model calls then fail the same way, so fix the `command` before relying on the route.
|
|
122
|
+
- A listing command that exits non-zero, times out, or prints a help text without the model line is reported the same way: discovery never turns an unreadable CLI into a silently empty catalog.
|
|
122
123
|
- Compaction and a model switch need a context capacity: the CLI must report one, or the catalog entry must declare `contextWindow`.
|
|
123
124
|
|
|
124
125
|
## Provenance
|
package/README.zh.md
CHANGED
|
@@ -28,7 +28,7 @@ description: "委托式 CLI LLM 适配器:每次模型调用都交给 CodeBudd
|
|
|
28
28
|
|
|
29
29
|
## 运行要求
|
|
30
30
|
|
|
31
|
-
- DeepSeek Harness
|
|
31
|
+
- DeepSeek Harness `>=0.2.1-rc.2 <0.3.0`(以 `engines.dsh` 声明,宿主版本不符时安装器会拒绝,而不是带病装载)
|
|
32
32
|
- Node.js `>=24.9`
|
|
33
33
|
- `PATH` 上有 `codebuddy` 命令并已登录(或用 `command` 指向绝对路径)
|
|
34
34
|
|
|
@@ -119,6 +119,7 @@ dsh plugin --profile work add dsh-codebuddy-llm
|
|
|
119
119
|
- `permissionMode` 管的是 CLI 的工具;harness 的权限预设、文件系统沙箱和 shell 沙箱都不介入。因此默认的 `bypassPermissions` 等于把桌面进程的 OS 权限交给子进程——不希望如此时请调窄。
|
|
120
120
|
- 只理解 CodeBuddy 形状的输出:`stream-json` 词汇和位置参数式调用都是 CodeBuddy 的约定。
|
|
121
121
|
- 可执行文件缺失或不可执行时,会以拒绝的形式报出所配置的命令,而不是返回空目录;路由仍会挂载,你自己在 `models` 里配置的列表也照常可用。此时模型调用同样会失败,请先修好 `command` 再依赖该路由。
|
|
122
|
+
- 列表命令非零退出、超时,或输出里没有模型行时,同样以拒绝形式报出:探测不会把「读不懂的 CLI」伪装成「空目录」。
|
|
122
123
|
- 压缩与模型切换需要上下文容量:要么 CLI 报出该值,要么目录条目声明 `contextWindow`。
|
|
123
124
|
|
|
124
125
|
## 来源
|
package/index.js
CHANGED
|
@@ -1566,7 +1566,16 @@ async function discoverAcpModels(request) {
|
|
|
1566
1566
|
async function discoverCliModels(request) {
|
|
1567
1567
|
const advertised = request.acp === void 0 ? void 0 : await discoverAcpModels(request);
|
|
1568
1568
|
const help = advertised === void 0 || advertised.length === 0 ? await captureListing(request) : void 0;
|
|
1569
|
-
|
|
1569
|
+
let discovered;
|
|
1570
|
+
if (advertised !== void 0 && advertised.length > 0) discovered = [...advertised];
|
|
1571
|
+
else if (help === void 0) throw new Error(`the discovery command \`${request.argv.join(" ")}\` reported nothing within ${String(request.timeoutMs)}ms (non-zero exit, timeout, or cancellation)`);
|
|
1572
|
+
else {
|
|
1573
|
+
discovered = parseCodeBuddyModels(help);
|
|
1574
|
+
// Help text without the model listing means this CLI's ids cannot be read,
|
|
1575
|
+
// which is a different fault from a route that serves none: reporting it
|
|
1576
|
+
// keeps a shape change from passing as an empty catalog.
|
|
1577
|
+
if (discovered.length === 0) throw new Error(`\`${request.argv.join(" ")}\` listed no supported models; the CLI's --model help text is not in the expected shape`);
|
|
1578
|
+
}
|
|
1570
1579
|
const seen = new Set(discovered.map((model) => model.id));
|
|
1571
1580
|
const models = [...discovered];
|
|
1572
1581
|
for (const model of request.configured) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-codebuddy-llm",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Delegating CLI LLM adapter for the DeepSeek Harness: answers each model call by running the CodeBuddy CLI child that carries its own sign-in and agent loop, so a deployment runs without an API key",
|
|
5
5
|
"author": "saisaiwang <287442583@qq.com>",
|
|
6
6
|
"repository": {
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"registry": "https://registry.npmjs.org/"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
|
-
"dsh": "
|
|
49
|
+
"dsh": ">=0.2.1-rc.2 <0.3.0",
|
|
50
50
|
"node": ">=24.9"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@deepseek-ai/dsh-llm": "
|
|
53
|
+
"@deepseek-ai/dsh-llm": ">=0.2.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"@deepseek-ai/dsh-llm": {
|