dsh-opencode-go 0.1.5 → 0.1.7
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.en.md +152 -0
- package/README.md +63 -40
- package/docs/verification.md +88 -2
- package/lib/client.js +348 -20
- package/lib/index.js +86 -16
- package/lib/types/adapter.d.ts +2 -3
- package/lib/types/client/locales.d.ts +15 -0
- package/lib/types/client/section-controller.d.ts +28 -2
- package/lib/types/client/settings.d.ts +18 -0
- package/lib/types/client/staged-form.d.ts +11 -1
- package/lib/types/config.d.ts +29 -5
- package/lib/types/index.d.ts +10 -6
- package/package.json +36 -23
package/README.en.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# dsh-opencode-go
|
|
2
|
+
|
|
3
|
+
[中文](README.md)
|
|
4
|
+
|
|
5
|
+
Use OpenCode Go subscription models in [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), with streaming replies, tool calls, and image input.
|
|
6
|
+
|
|
7
|
+
The plugin adds the session headers required by OpenCode Go, reads the gateway model catalog, and displays subscription usage.
|
|
8
|
+
|
|
9
|
+
## Installation and usage
|
|
10
|
+
|
|
11
|
+
Plugin `0.1.7` supports DSH `0.1.5-rc.1`, `0.1.5-rc.2`, `0.1.6-alpha.1`, `0.1.6-alpha.2`, and `0.1.7-alpha.1`.
|
|
12
|
+
|
|
13
|
+
To build from source and install locally, use `npm ci --legacy-peer-deps`, `npm pack`, then `dsh plugin --profile web add ./dsh-opencode-go-0.1.7.tgz`. The development dependency tree intentionally includes multiple DSH generations.
|
|
14
|
+
|
|
15
|
+
### Web
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
dsh plugin --profile web add dsh-opencode-go@0.1.7
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Start or restart `dsh web`, then:
|
|
22
|
+
|
|
23
|
+
1. Open **Settings → OpenCode Go**.
|
|
24
|
+
2. Enter and save your OpenCode Go API key.
|
|
25
|
+
3. Select an OpenCode Go model from the conversation model picker.
|
|
26
|
+
|
|
27
|
+
### Headless
|
|
28
|
+
|
|
29
|
+
Install the plugin into the Headless profile:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
dsh plugin --profile headless add dsh-opencode-go@0.1.7
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Save the following as `headless.patch.yml` to select a default model:
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
- id: agent-default-model
|
|
39
|
+
config:
|
|
40
|
+
provider: opencode-go
|
|
41
|
+
model: deepseek-v4.1-flash
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Read the API key in Bash or Zsh, then run a task:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
read -s OPENCODE_API_KEY
|
|
48
|
+
export OPENCODE_API_KEY
|
|
49
|
+
dsh --profile headless --patch ./headless.patch.yml "Hello"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The model ID must be available in the current gateway catalog. Web and Headless use separate profiles, so install the plugin in each profile you use.
|
|
53
|
+
|
|
54
|
+
## Model capacity settings
|
|
55
|
+
|
|
56
|
+
In Web, open **Settings → OpenCode Go → Model capacities** to override capacities per model. The section is collapsed by default and lets you:
|
|
57
|
+
|
|
58
|
+
- Search by model name or ID.
|
|
59
|
+
- Set the **context window** and **maximum output**.
|
|
60
|
+
- See the catalog-advertised capacities as a reference.
|
|
61
|
+
- Click **Use catalog** for one model or clear all overrides.
|
|
62
|
+
|
|
63
|
+
Blank fields inherit the catalog values. Positive integers are passed directly to the adapter; the plugin does not clamp them to the provider's actual capabilities, so values above the upstream limit may be rejected by the gateway. Changes use the settings page's **Save** / **Discard** flow and take effect on the next request or model read without a restart.
|
|
64
|
+
|
|
65
|
+
Headless or profile patches can also configure `modelLimits` directly:
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
- id: opencode-go
|
|
69
|
+
config:
|
|
70
|
+
modelLimits:
|
|
71
|
+
deepseek-v4.1-flash:
|
|
72
|
+
contextWindow: 262144
|
|
73
|
+
maxTokens: 32768
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Each model may set only one field. Omitted fields inherit existing configuration, falling back to the catalog when no override exists. `maxTokens` also caps explicit request budgets while preserving smaller budgets.
|
|
77
|
+
|
|
78
|
+
Set a model entry or an individual field to `null` to explicitly select the catalog value even when a lower profile layer supplies an override. The Web reset and clear actions save this marker automatically. Changing limits preserves learned catalog metadata; the reference values always show the original catalog capacities.
|
|
79
|
+
|
|
80
|
+
DSH `0.1.5` / `0.1.6` use the legacy settings interface; `0.1.7-alpha.1` uses profile configuration. Changes take effect without restarting on all five supported versions.
|
|
81
|
+
|
|
82
|
+
## Updating the plugin
|
|
83
|
+
|
|
84
|
+
Update the plugin in the Web profile to the latest npm version:
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
dsh plugin --profile web update dsh-opencode-go --latest
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Restart `dsh web` and refresh the browser afterwards. For Headless, replace `web` with `headless`; if both profiles have the plugin installed, update each one separately.
|
|
91
|
+
|
|
92
|
+
## Subscription usage display
|
|
93
|
+
|
|
94
|
+

|
|
95
|
+
|
|
96
|
+
## FAQ
|
|
97
|
+
|
|
98
|
+
### Advanced settings after upgrading to DSH 0.1.7
|
|
99
|
+
|
|
100
|
+
DSH `0.1.7` stores settings in the current profile’s `cordis.patch.yml`, using entry ID `opencode-go`. Older hosts use the `llm-opencode-go` section in `settings.yaml`. The upstream importer does not map these different names automatically. If advanced settings return to defaults, copy the relevant values from `settings.yaml.imported` (or `settings.yaml` before import) into the new settings page or the existing `opencode-go` profile entry. Preserve other profile entries and any custom `apiKeyEnv` value. API keys remain in the credentials service; Web and Headless configurations are now independent.
|
|
101
|
+
|
|
102
|
+
### DSH 0.1.5 cannot start after installing the plugin
|
|
103
|
+
|
|
104
|
+
Plugin versions `0.1.0`–`0.1.4` used an image API introduced in DSH `0.1.6`. On an older DSH version this could produce an `IMAGE_OFFLOAD_REQUIRED_CODE` startup error for a missing export. Upgrade to plugin `0.1.5` or newer and restart:
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
dsh plugin --profile web add dsh-opencode-go@0.1.7
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
For Headless, replace `web` with `headless`. The fix preserves both host behaviors: DSH `0.1.5` turns the oldest image into placeholder text when the request exceeds the image budget, while DSH `0.1.6` continues to record and handle image offloading through the host.
|
|
111
|
+
|
|
112
|
+
### The `opencode-go` route is already in use
|
|
113
|
+
|
|
114
|
+
Only one adapter in a profile can provide the `opencode-go` route. If another plugin or a generic pi-ai configuration already connects OpenCode Go, disable that configuration first. Other providers can continue to run.
|
|
115
|
+
|
|
116
|
+
### An expected model is missing
|
|
117
|
+
|
|
118
|
+
Confirm that the plugin is enabled and an API key is configured, then refresh the model list in Settings. Each model-list read requests the gateway's `/models` endpoint and synchronizes the OpenCode Go configuration from [models.dev](https://models.dev/api.json). Protocol support, context length, output limit, and image capability come from the online configuration, so new models do not require a release of this plugin or pi-ai.
|
|
119
|
+
|
|
120
|
+
Models that are present in the gateway and have an entry using Anthropic Messages, OpenAI Chat Completions, or OpenAI Responses become available on the next list read or refresh. Refresh bypasses the existing catalog cache; a direct request for a previously unseen model also triggers an immediate resynchronization. The Settings page shows the complete discovery result.
|
|
121
|
+
|
|
122
|
+
A gateway model ID with no usable protocol or capability configuration is shown in Settings with a configuration-unavailable diagnostic and is kept out of the conversation picker, so one unconfigured model cannot block the rest of the list. Direct requests report the reason. Refresh after the upstream configuration is corrected. A model ID alone is not enough to reliably infer its transport; new protocols or protocol-specific exceptions may still require adapter changes.
|
|
123
|
+
|
|
124
|
+
A reasoning-capable model without adjustable reasoning levels (for example, `union-alpha`) remains selectable and usable; it simply has no reasoning-strength control.
|
|
125
|
+
|
|
126
|
+
If the online configuration is temporarily unavailable, the plugin prefers a configuration fetched successfully earlier in the process and falls back to pi-ai's built-in metadata. If the gateway catalog is unavailable, existing requests can use the last catalog; a Settings refresh reports the failure instead of presenting stale data as current. `refreshMinutes` controls the cache lifetime for ongoing model requests, but does not prevent an explicit model-list read from fetching fresh data.
|
|
127
|
+
|
|
128
|
+
## Features
|
|
129
|
+
|
|
130
|
+
- **Session headers**: Every request includes the Harness User-Agent and `x-opencode-session`. A session keeps one ID; requests without a session ID receive an independent random value.
|
|
131
|
+
- **Streaming and history**: Supports streaming output, tool calls, and history replay through pi-ai.
|
|
132
|
+
- **Image input**: Supports models that advertise image capability; the DSH attachment service is required.
|
|
133
|
+
- **Model capacity overrides**: Override the context window and maximum output per model, with blank values inheriting the online catalog.
|
|
134
|
+
- **Prompt and caching**: The plugin does not add hidden system prompts; the session ID is used for gateway routing.
|
|
135
|
+
|
|
136
|
+
## Uninstall
|
|
137
|
+
|
|
138
|
+
Remove the plugin from the relevant profile and restart the application:
|
|
139
|
+
|
|
140
|
+
```sh
|
|
141
|
+
dsh plugin --profile web remove dsh-opencode-go
|
|
142
|
+
# or
|
|
143
|
+
dsh plugin --profile headless remove dsh-opencode-go
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Feedback
|
|
147
|
+
|
|
148
|
+
Please open an issue for bugs or feature requests.
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
[MIT](LICENSE)
|
package/README.md
CHANGED
|
@@ -1,38 +1,44 @@
|
|
|
1
1
|
# dsh-opencode-go
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](README.en.md)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
无需任何设置,一key开始
|
|
5
|
+
在 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 中使用 OpenCode Go 订阅模型,支持流式回复、工具调用和图片输入。
|
|
8
6
|
|
|
7
|
+
插件会自动添加 OpenCode Go 所需的会话请求头、读取网关模型目录,并显示订阅用量。
|
|
9
8
|
|
|
10
9
|
## 安装与使用
|
|
11
10
|
|
|
12
|
-
插件 `0.1.
|
|
11
|
+
插件 `0.1.7` 兼容 DSH `0.1.5-rc.1`、`0.1.5-rc.2`、`0.1.6-alpha.1`、`0.1.6-alpha.2` 和 `0.1.7-alpha.1`,旧版 DSH 用户无需升级宿主。
|
|
12
|
+
|
|
13
|
+
如需从源码构建并安装本地包:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm ci --legacy-peer-deps
|
|
17
|
+
npm pack
|
|
18
|
+
dsh plugin --profile web add ./dsh-opencode-go-0.1.7.tgz
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
开发依赖包含多代 DSH 的真实测试包,安装时需要 `--legacy-peer-deps`。Headless 用户将 `web` 换成 `headless`。
|
|
13
22
|
|
|
14
|
-
npm 包通过 `engines.dsh` 明确声明宿主版本要求,并保留 DSH 组件的 peerDependencies。dshmarket 中本插件的安装来源也是该 npm 包,市场会将其安装到选定的 DSH profile。
|
|
15
23
|
|
|
16
24
|
### Web
|
|
17
25
|
|
|
18
26
|
```sh
|
|
19
|
-
dsh plugin --profile web add dsh-opencode-go
|
|
27
|
+
dsh plugin --profile web add dsh-opencode-go@0.1.7
|
|
20
28
|
```
|
|
21
29
|
|
|
22
|
-
安装后启动或重启 `dsh web
|
|
30
|
+
安装后启动或重启 `dsh web`,然后:
|
|
23
31
|
|
|
24
32
|
1. 打开 **设置 → OpenCode Go**。
|
|
25
33
|
2. 填入 OpenCode Go API Key 并保存。
|
|
26
34
|
3. 在会话的模型选择器中选择 OpenCode Go 模型。
|
|
27
35
|
|
|
28
|
-
API Key 来自你的 OpenCode Go 订阅。安装插件不会自动更改默认模型。
|
|
29
|
-
|
|
30
36
|
### Headless
|
|
31
37
|
|
|
32
38
|
安装到 Headless profile:
|
|
33
39
|
|
|
34
40
|
```sh
|
|
35
|
-
dsh plugin --profile headless add dsh-opencode-go
|
|
41
|
+
dsh plugin --profile headless add dsh-opencode-go@0.1.7
|
|
36
42
|
```
|
|
37
43
|
|
|
38
44
|
将以下内容保存为 `headless.patch.yml`,选择默认模型:
|
|
@@ -54,6 +60,34 @@ dsh --profile headless --patch ./headless.patch.yml "你好"
|
|
|
54
60
|
|
|
55
61
|
模型 ID 须在当前网关目录中可用。Web 和 Headless 使用各自的 profile,需要分别安装插件。
|
|
56
62
|
|
|
63
|
+
## 模型容量设置
|
|
64
|
+
|
|
65
|
+
Web 用户可在 **设置 → OpenCode Go → 模型容量** 中按模型覆盖容量。该区域默认折叠,打开后可以:
|
|
66
|
+
|
|
67
|
+
- 搜索模型名称或 ID。
|
|
68
|
+
- 设置 **上下文窗口** 和 **最大输出**。
|
|
69
|
+
- 查看目录公布的容量作为参考。
|
|
70
|
+
- 对单个模型点击 **使用目录值**,或清除全部覆盖。
|
|
71
|
+
|
|
72
|
+
留空的字段会继承目录值。填写的正整数会直接传给适配器,不会被插件自动限制到提供方能力以内;超过上游真实能力的值可能被网关拒绝。修改会跟随设置页的 **Save** / **Discard** 流程,并在下一次请求或模型读取时生效,无需重启。
|
|
73
|
+
|
|
74
|
+
Headless 或 profile patch 也可以直接配置 `modelLimits`:
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
- id: opencode-go
|
|
78
|
+
config:
|
|
79
|
+
modelLimits:
|
|
80
|
+
deepseek-v4.1-flash:
|
|
81
|
+
contextWindow: 262144
|
|
82
|
+
maxTokens: 32768
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
每个模型可以只设置其中一个字段;没有设置的字段沿用已有配置,无已有配置时使用目录值。`maxTokens` 同时约束显式请求的输出预算,较小的请求预算会保留。
|
|
86
|
+
|
|
87
|
+
在分层配置中,将某个模型或字段设为 `null` 可明确恢复在线目录值,即使下层 profile 已有覆盖。Web 的清空和“使用目录值”操作会自动保存这个标记。容量修改保留已获取的原始目录缓存,目录参考值始终显示上游公布的容量。
|
|
88
|
+
|
|
89
|
+
DSH `0.1.5` / `0.1.6` 通过旧设置接口保存;`0.1.7-alpha.1` 通过 profile 配置接口保存。五个受支持版本均无需重启即可生效。
|
|
90
|
+
|
|
57
91
|
## 升级插件
|
|
58
92
|
|
|
59
93
|
更新 Web profile 中的插件到 npm 最新版本:
|
|
@@ -64,48 +98,38 @@ dsh plugin --profile web update dsh-opencode-go --latest
|
|
|
64
98
|
|
|
65
99
|
完成后重启 `dsh web` 并刷新浏览器。Headless 用户将 `web` 换成 `headless`;如果两个 profile 都安装了插件,需要分别升级。
|
|
66
100
|
|
|
67
|
-
|
|
101
|
+
## 订阅用量显示
|
|
68
102
|
|
|
69
|
-
|
|
70
|
-
dsh plugin --profile web add dsh-opencode-go@latest
|
|
71
|
-
```
|
|
103
|
+

|
|
72
104
|
|
|
73
|
-
|
|
105
|
+
## 常见问题
|
|
74
106
|
|
|
75
|
-
|
|
107
|
+
### 升级到 DSH 0.1.7 后的高级设置
|
|
76
108
|
|
|
77
|
-
|
|
109
|
+
DSH `0.1.7` 将设置改存到当前 profile 的 `cordis.patch.yml`,本插件的条目 ID 为 `opencode-go`;旧宿主继续使用 `settings.yaml` 中的 `llm-opencode-go` 分区。API Key 仍由 credentials 服务保存。
|
|
78
110
|
|
|
79
|
-
|
|
111
|
+
上游的一次性设置导入无法自动把第三方插件的旧分区名映射到不同的条目 ID。如果升级后高级配置恢复默认值,可从 DSH home 下的 `settings.yaml.imported`(尚未导入时为 `settings.yaml`)找到 `llm-opencode-go`,在新设置页重新保存其中的配置;也可以将这些字段合并到目标 profile 的已有条目中,保留其他配置:
|
|
80
112
|
|
|
81
|
-
|
|
113
|
+
```yaml
|
|
114
|
+
- id: opencode-go
|
|
115
|
+
config:
|
|
116
|
+
# 将旧 llm-opencode-go 分区中需要保留的字段放在这里
|
|
117
|
+
apiKeyEnv: OPENCODE_API_KEY
|
|
118
|
+
refreshMinutes: 60
|
|
119
|
+
```
|
|
82
120
|
|
|
83
|
-
|
|
121
|
+
如果使用了自定义 API Key 引用,须保留原来的 `apiKeyEnv` 值。Web 和 Headless 的配置现在各自独立。
|
|
84
122
|
|
|
85
123
|
### DSH 0.1.5 安装插件后无法启动
|
|
86
124
|
|
|
87
125
|
插件 `0.1.0`–`0.1.4` 使用了 DSH `0.1.6` 新增的图片接口,在旧版 DSH 上可能出现 `IMAGE_OFFLOAD_REQUIRED_CODE` 导出不存在的启动错误。升级插件到 `0.1.5` 或更新版本后重启即可:
|
|
88
126
|
|
|
89
127
|
```sh
|
|
90
|
-
dsh plugin --profile web add dsh-opencode-go@0.1.
|
|
128
|
+
dsh plugin --profile web add dsh-opencode-go@0.1.7
|
|
91
129
|
```
|
|
92
130
|
|
|
93
131
|
Headless 用户将 `web` 换成 `headless`。修复保留了两版宿主的图片处理方式:DSH `0.1.5` 在请求超过图片预算时将最旧图片转成占位文本,DSH `0.1.6` 继续由宿主记录并处理图片卸载。
|
|
94
132
|
|
|
95
|
-
### 新版本是否必须等待一天才能安装
|
|
96
|
-
|
|
97
|
-
npm 本身没有统一的 24 小时安装等待期。DSH 插件命令底层使用 pnpm;pnpm 11 起默认设置 `minimumReleaseAge: 1440`,按包名或 `latest` 安装、升级时可能继续选中发布满一天的旧版本。默认的非严格策略允许上面显式指定 `@0.1.5` 的安装;如果 profile 显式配置了严格的发布时间限制,则仍会被阻止。
|
|
98
|
-
|
|
99
|
-
需要立即安装该修复时,可在对应 profile 的 `pnpm-workspace.yaml`(默认位于 `~/.dsh/profiles/web/`)中,将此版本合并到已有的例外列表,再运行上面的安装命令:
|
|
100
|
-
|
|
101
|
-
```yaml
|
|
102
|
-
minimumReleaseAgeExclude:
|
|
103
|
-
- dsh-opencode-go@0.1.5
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
保留文件中的其他设置和已有例外。此项仅豁免本插件的 `0.1.5`,不改变其他依赖的等待策略。参见 [pnpm 发布时间限制文档](https://pnpm.io/settings/dependency-resolution#minimumreleaseage)。市场目录、兼容性缓存或 npm 镜像也可能晚于官方 registry 更新;页面仍显示旧版本不代表新版尚未发布。
|
|
107
|
-
|
|
108
|
-
|
|
109
133
|
### 提示 `opencode-go` 路由已被占用
|
|
110
134
|
|
|
111
135
|
同一 profile 中只能有一个适配器提供 `opencode-go` 路由。如果已经通过其他插件或通用 pi-ai 配置接入 OpenCode Go,请先停用那一项配置。其他提供方可以继续使用。
|
|
@@ -127,7 +151,8 @@ minimumReleaseAgeExclude:
|
|
|
127
151
|
- **会话请求头**:每次请求包含 Harness User-Agent 和 `x-opencode-session`。同一会话保持相同 ID,无会话 ID 的请求使用独立随机值。
|
|
128
152
|
- **流式与历史**:支持流式输出、工具调用及历史回放,协议请求由 pi-ai 执行。
|
|
129
153
|
- **图片输入**:支持目录中声明图片能力的模型,需要 DSH attachment 服务。
|
|
130
|
-
-
|
|
154
|
+
- **模型容量覆盖**:可按模型覆盖上下文窗口和最大输出,空值继承在线目录。
|
|
155
|
+
- **提示与缓存**:插件不增加隐藏系统提示;会话 ID 用于网关路由。
|
|
131
156
|
|
|
132
157
|
## 卸载
|
|
133
158
|
|
|
@@ -139,11 +164,9 @@ dsh plugin --profile web remove dsh-opencode-go
|
|
|
139
164
|
dsh plugin --profile headless remove dsh-opencode-go
|
|
140
165
|
```
|
|
141
166
|
|
|
142
|
-
|
|
143
|
-
|
|
144
167
|
## 反馈
|
|
145
168
|
|
|
146
|
-
遇到bug或有功能建议请提issue
|
|
169
|
+
遇到 bug 或有功能建议请提 issue。
|
|
147
170
|
|
|
148
171
|
## 许可证
|
|
149
172
|
|
package/docs/verification.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Verification
|
|
2
2
|
|
|
3
|
+
## Per-model capacities on five hosts (2026-09-22)
|
|
4
|
+
|
|
5
|
+
PR #3's capacity editor is integrated on main commit `b093842`, preserving both legacy settings and the `0.1.7` profile configuration bridge. Each operation applies its captured overrides to original catalog metadata. The catalog cache remains available during outages, discovery shows the original reference values, and configured output caps also constrain explicit request budgets. Null model entries or fields explicitly restore catalog values over inherited configuration.
|
|
6
|
+
|
|
7
|
+
The built Host artifact passes the existing compatibility fixture with real published LLM/attachment packages for all five targets:
|
|
8
|
+
|
|
9
|
+
| DSH target | Capacities, output caps, hot update and reset | Text, image resizing and history checks |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| 0.1.5-rc.1 | Pass | Pass |
|
|
12
|
+
| 0.1.5-rc.2 | Pass | Pass |
|
|
13
|
+
| 0.1.6-alpha.1 | Pass | Pass |
|
|
14
|
+
| 0.1.6-alpha.2 | Pass | Pass |
|
|
15
|
+
| 0.1.7-alpha.1 | Pass | Pass |
|
|
16
|
+
|
|
17
|
+
The `0.1.7` fixture uses its actual Loader and settings service to edit and reset capacities without replacing the plugin fiber. Legacy settings tests verify null overrides of inherited capacities. Regressions also cover catalog references, metadata outages, concurrent configuration changes, and explicit output caps across Chat Completions, Responses and Anthropic Messages. Client tests cover Save/Discard, reset followed by another edit, customized counts, and offline reset; the distributed client mounts against both UI primitive generations.
|
|
18
|
+
|
|
19
|
+
Validation: Host/Client type checks, all **175 tests in 15 files**, build and `npm pack` pass on macOS / Node.js 24.14.1. Dependencies install with `npm ci --legacy-peer-deps` using main's unchanged lock. The older host matrix selects matching LLM/attachment packages through resolution hooks, with other services from the development tree; the `0.1.7` host uses its separately pinned workspace. UI validation is automated component/factory testing, not a manual five-version browser or Desktop matrix. All completions use a loopback fixture and fake credentials; no paid generation or npm publication was performed.
|
|
20
|
+
|
|
21
|
+
## DSH 0.1.7 compatibility (plugin 0.1.7)
|
|
22
|
+
|
|
23
|
+
Verified on macOS / Node.js 24.14.1 against published DSH `0.1.7-alpha.1`, while retaining the four previously tested hosts (`0.1.5-rc.1`, `0.1.5-rc.2`, `0.1.6-alpha.1`, `0.1.6-alpha.2`). The independent npm workspace at `tests/hosts/v017` keeps the new Cordis/Loader and DSH service identities separate from the legacy test dependencies. Install development dependencies with `npm ci --legacy-peer-deps`; the aliases deliberately contain incompatible peer ranges from different host generations.
|
|
24
|
+
|
|
25
|
+
The failures reproduced before their fixes were:
|
|
26
|
+
|
|
27
|
+
- `engines.dsh` rejected `0.1.7-alpha.1`.
|
|
28
|
+
- The real new settings service did not expose OpenCode Go because `installSection` was removed and the profile form requires volatile Config fields.
|
|
29
|
+
- New `role: 'tool'` history was sent as user text, losing its tool-call identity; tool-result images were rejected.
|
|
30
|
+
- The real Web settings page crashed with React error 130 because the host removed `IconChevronDownOutline14`.
|
|
31
|
+
|
|
32
|
+
Validation: Host/Client type checks and all **151 tests in 14 files** pass. The fresh-process host matrix exercises the built artifact, real LLM/attachment implementations, text streaming, tool history, image resizing and offload limits. The modern fixture additionally exercises the real usage RPC gateway. The profile-settings fixture uses the real Loader and settings service with an in-memory editor, and verifies live updates without remounting, toggling the route, and invalid-URL rejection. The browser artifact test now renders the actual page against both published UI primitive generations; merely checking registration had missed the removed icon.
|
|
33
|
+
|
|
34
|
+
An isolated npm consumer with the official `0.1.7-alpha.1` CLI passed `verify:installed` and `verify:headless` against a local fixture gateway. The final browser factory was also checked in that consumer's Web profile: the settings page renders, advanced fields are editable, saving `refreshMinutes: 30` and switching `enabled: false` persist in the real profile patch and survive a full page reload, with no new console errors. No real API key or paid model generation was used. Older custom settings may require the explicit migration described in README because the upstream importer does not map this plugin's legacy namespace to its bundle entry id.
|
|
35
|
+
|
|
36
|
+
The verification history below describes earlier releases; their live-provider results do not imply live-provider testing of this release.
|
|
37
|
+
|
|
3
38
|
Verified on macOS with Node.js 24.14.1 and npm-installed DSH 0.1.6-alpha.1. The plugin's dependencies came from npm, with no workspace aliases, symlinks into a checkout, or unpublished DSH exports.
|
|
4
39
|
|
|
5
40
|
## Local checks
|
|
@@ -59,7 +94,7 @@ A read-only check against the live OpenCode Go listing and models.dev resolved 3
|
|
|
59
94
|
|
|
60
95
|
## Remaining limits
|
|
61
96
|
|
|
62
|
-
|
|
97
|
+
Desktop, non-macOS platforms, and DSH releases outside the versions documented here are not verified. Live OpenCode Go verification is limited to the four image requests and four text-only code-generation requests documented below. The automated gateway tests preserve the adapter's request and replay semantics but cannot establish account validity or live provider availability.
|
|
63
98
|
|
|
64
99
|
## DSH 0.1.5 compatibility (plugin 0.1.5)
|
|
65
100
|
|
|
@@ -67,10 +102,61 @@ Issue #1 reproduced as an ESM import failure before plugin activation: DSH 0.1.5
|
|
|
67
102
|
|
|
68
103
|
`npm test` builds the distributed artifact and runs `tests/host-compatibility.spec.ts` in fresh Node processes against the published LLM packages `0.1.5-rc.1`, `0.1.5-rc.2`, and `0.1.6-alpha.1`. The two older versions are pinned npm aliases in development dependencies. A resolution hook selects the LLM package for both the plugin and Cordis Loader; it does not mock that package's exports. This focused matrix does not replace full CLI/profile checks.
|
|
69
104
|
|
|
70
|
-
The fixture verifies native ESM loading, Loader activation, model listing, streamed text, image transport, repeated-image byte accounting, nested oldest-image offloading, immutable history, and a second check against encoded image sizes. All external model metadata is replaced by an offline fixture, and completions go to a loopback gateway with a fake credential.
|
|
105
|
+
The original fixture verifies native ESM loading, Loader activation, model listing, streamed text, image transport with a mock attachment store, repeated-image byte accounting, nested oldest-image offloading, immutable history, and a second check against encoded image sizes. It did not validate the real attachment service's request policy (see Issue #2 below). All external model metadata is replaced by an offline fixture, and completions go to a loopback gateway with a fake credential.
|
|
71
106
|
|
|
72
107
|
The compatibility bridge uses the host's own functions. On 0.1.5 it preserves the stock adapter's two-pass transient projection (estimated bytes before reading images, exact encoded bytes afterward). On 0.1.6 it preserves durable offload marks and the `IMAGE_OFFLOAD_REQUIRED` retry signal; it never silently substitutes legacy offloading on a modern host. The existing conversion suite additionally checks surface-marked images, path descriptions, and unsupported image roles.
|
|
73
108
|
|
|
74
109
|
Validation: 146 tests passed, Host and Client type checks passed, and the package built successfully on Node.js 24.14.1.
|
|
75
110
|
|
|
76
111
|
Full installed checks also passed against separate npm CLI installations whose entire DSH dependency closures were pinned to `0.1.5-rc.1` and `0.1.5-rc.2` respectively (not just the CLI version). The `0.1.5` plugin tarball was installed through `dsh plugin` into each installation's Web and Headless profiles under isolated `DSH_HOME` directories. Both versions passed `verify:installed` for package resolution, catalog, streaming, request headers, and unload; both passed `verify:headless` through the official launcher and loopback gateway. Browser checks confirmed the Web shell and OpenCode Go settings section load, including the API-key field, advanced settings, and enable switch, with no page errors.
|
|
112
|
+
|
|
113
|
+
## Image policy compatibility (plugin 0.1.6, Issue #2)
|
|
114
|
+
|
|
115
|
+
The real published `dsh-attachment-local` 0.1.5-rc.2 reproduced `Image request maxPixels must be a positive integer.` with an 800×600 PNG before the fix. The adapter passed `{ width, height, maxBytes }`, but DSH 0.1.5 requires `{ maxPixels, maxBytes }`. DSH 0.1.6 requires explicit dimensions, so replacing dimensions with only the old policy would break the newer hosts. The adapter now supplies both the computed dimensions and the original pixel/byte budgets; each host consumes its own contract.
|
|
116
|
+
|
|
117
|
+
The automated matrix now covers four matching sets of published `dsh-llm`, `dsh-attachment`, and `dsh-attachment-local` packages:
|
|
118
|
+
|
|
119
|
+
| Host packages | Real image requests | Existing loading, text, and offload checks |
|
|
120
|
+
| --- | --- | --- |
|
|
121
|
+
| 0.1.5-rc.1 | Pass | Pass |
|
|
122
|
+
| 0.1.5-rc.2 | Pass | Pass |
|
|
123
|
+
| 0.1.6-alpha.1 | Pass | Pass |
|
|
124
|
+
| 0.1.6-alpha.2 | Pass | Pass |
|
|
125
|
+
|
|
126
|
+
`tests/fixtures/host-compatibility.mjs` saves actual PNGs in a temporary local attachment store, streams them through the built adapter to a loopback gateway, and decodes the transmitted bytes. It checks an unchanged 800×600 image, a 3000×2000 image downscaled under the default pixel budget, and a custom pixel/byte budget. Storage admission keeps the original dimensions so resizing is exercised in the request path. Temporary storage is removed after each run. The mock attachment checks remain for exact byte-bound and offload scenarios.
|
|
127
|
+
|
|
128
|
+
Run `npm test -- tests/host-compatibility.spec.ts` for the focused matrix. The aliases intentionally install multiple host generations; use `npm ci --force` to retain the pinned development dependency tree despite their conflicting peer ranges. Resolution hooks select the matching LLM and attachment API at runtime. Other services use the development dependency tree, so this is not a full four-version CLI/Desktop or browser matrix, and no live paid completion is sent.
|
|
129
|
+
|
|
130
|
+
Additional isolated-install checks passed on macOS/Node.js 24.14.1 for all four versions. The built tarball was npm-installed into four temporary consumers with all DSH packages in each dependency closure pinned to the target version (38, 38, 39, and 40 DSH packages respectively; no version mismatches). A copy of the fixture loaded the installed plugin and packages directly, without resolution hooks, and passed ESM loading, Cordis Loader activation, model listing, streamed text, real image resizing, custom budgets, and image-offload/history assertions. These checks exercise the installed dependency combinations, not the official CLI launcher, Desktop, or browser UI.
|
|
131
|
+
|
|
132
|
+
Validation: 147 tests passed, Host/Client type checks and builds passed, and the focused four-version matrix passed again after adding custom-budget checks. Windows Desktop remains unverified.
|
|
133
|
+
|
|
134
|
+
## Live image verification (2026-09-21)
|
|
135
|
+
|
|
136
|
+
With the user's authorization, the fixed tarball was tested against the real OpenCode Go endpoint `https://opencode.ai/zen/go/v1` using model `deepseek-v4.1-flash`. Each of the four isolated consumers above used its actual Cordis Loader, LLM service, local attachment service, and installed plugin, with no mocked metadata or gateway response. SHA-256 comparisons confirmed all four installed Host artifacts matched the current built fix.
|
|
137
|
+
|
|
138
|
+
Each consumer sent exactly one completion request containing an 800×600 solid red PNG and a 3000×2000 solid blue PNG. Admission preserved the original dimensions, so the larger image exercised the adapter's request-size preparation. The prompt asked for the two dominant colors in order without naming them. Every outgoing completion contained both image parts, received HTTP 200, returned `red, blue`, and ended with `finish.kind: stop`.
|
|
139
|
+
|
|
140
|
+
| DSH dependency version | Result | Elapsed time including setup/discovery | Reported input/output tokens |
|
|
141
|
+
| --- | --- | --- | --- |
|
|
142
|
+
| 0.1.5-rc.1 | Pass | 2.586 s | 1501 / 26 |
|
|
143
|
+
| 0.1.5-rc.2 | Pass | 2.503 s | 1501 / 70 |
|
|
144
|
+
| 0.1.6-alpha.1 | Pass | 2.993 s | 1501 / 128 |
|
|
145
|
+
| 0.1.6-alpha.2 | Pass | 2.686 s | 1501 / 53 |
|
|
146
|
+
|
|
147
|
+
Total: four live completion requests and 6,281 reported tokens (including reasoning output). The credential was supplied through hidden stdin, passed to child processes through their environment, and never saved in repository files or test logs. Temporary image storage was removed. These checks verify the real model/attachment request path on macOS; they do not exercise Windows Desktop's UI or establish compatibility for every other model.
|
|
148
|
+
|
|
149
|
+
## Live text-only code verification (2026-09-21)
|
|
150
|
+
|
|
151
|
+
The same four isolated consumers and `deepseek-v4.1-flash` model were then tested with one ordinary text-only code-generation request each. No attachment service was mounted for these requests. The task was to implement a JavaScript `mergeIntervals(intervals)` function that handles unsorted closed intervals, merges overlaps/shared endpoints, and returns new arrays without mutating its input. Each outgoing completion contained zero image parts and used the actual installed Loader, LLM service, and plugin against the live gateway.
|
|
152
|
+
|
|
153
|
+
All four requests returned HTTP 200 and `finish.kind: stop`. After inspecting each generated function, it was executed in a time-bounded VM context without process, filesystem, module-loading, or credential bindings. Eight cases covered empty input, overlaps, chains sharing endpoints, negative bounds, nested intervals, duplicate points, unsorted disjoint intervals, and distinct adjacent integer points. Inputs were frozen; every case checked the expected result, unchanged inputs, and independent output arrays.
|
|
154
|
+
|
|
155
|
+
| DSH dependency version | Code checks | Elapsed time including setup/discovery | Reported input/output tokens |
|
|
156
|
+
| --- | --- | --- | --- |
|
|
157
|
+
| 0.1.5-rc.1 | 8/8 passed | 4.278 s | 133 / 599 |
|
|
158
|
+
| 0.1.5-rc.2 | 8/8 passed | 4.487 s | 133 / 670 |
|
|
159
|
+
| 0.1.6-alpha.1 | 8/8 passed | 3.882 s | 133 / 589 |
|
|
160
|
+
| 0.1.6-alpha.2 | 8/8 passed | 4.759 s | 133 / 702 |
|
|
161
|
+
|
|
162
|
+
Total: four additional live completion requests and 3,092 reported tokens, including reasoning output. No code corrections or retries were needed. This verifies ordinary text-only code generation and executable output; it does not exercise an agent's multi-turn tool-call workflow. Credential handling was identical to the live image checks above.
|