@goodandready/dsh-opencode-provider 0.5.33 → 0.5.34

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/AUDIT.md ADDED
@@ -0,0 +1,51 @@
1
+ # Project and security audit
2
+
3
+ Read-only review of `main` on 2026-11-05. Findings are recorded separately from
4
+ implementation; no production runtime or other plugin was modified during the
5
+ review.
6
+
7
+ ## Scope
8
+
9
+ - Architecture: Host routes, adapter/transports, credentials, proxy, catalog,
10
+ analytics, settings/client bundle.
11
+ - Correctness: routing, account failover, streaming, tool-call normalization,
12
+ pricing/analytics, image policy.
13
+ - Security: HTTP boundary, secret handling, updater, dependency graph.
14
+ - Tests and prior issues: 149 tests, tracked parity/security backlog.
15
+
16
+ ## Verified findings
17
+
18
+ | # | Severity | Finding | Status |
19
+ |---|---|---|---|
20
+ | A1 | High (dev-only) | `zod` 4.4.3 is pinned by every `@deepseek-ai/dsh-*` 0.2.2-rc.1 package; GHSA-mrhx-c7xc-m3w5 affects `<4.6.6`. | Residual. `npm audit --omit=dev` reports **0 vulnerabilities**; the plugin does not bundle zod. No DSH 0.2.2 release with 4.6.6 exists and no forced override is applied. Re-audit after upstream. |
21
+ | A2 | Medium (deployment) | Same-origin checks are CSRF protection, not authentication. DSH exposes no host auth for plugin routes. | Mitigated by optional `adminToken`/`OPENCODE_ADMIN_TOKEN` with constant-time comparison on every `/dsh-opencode/*` route and a browser prompt. If no token is configured, the existing loopback/same-origin guard remains; this is documented, not represented as authentication. |
22
+ | A3 | Low (operational) | Production profile `pnpm-lock.yaml` files were not regenerated during manual `node_modules` deployments. | Residual operational note. Packages installed by verified tarballs; regenerate lockfiles separately before any `--frozen-lockfile` install. |
23
+ | A4 | Low (scope) | Engine compatibility cannot run from a worktree or force-kill a runtime under project rules. | `npm run test:engine -- <candidate.tgz>` validates immutable candidates read-only; compatibility execution stays on the approved MiniPC contour. |
24
+
25
+ No critical findings were verified. No raw API keys, prompt text, image bytes
26
+ or proxy passwords are written to analytics, heatmap, request logs or sticky /
27
+ cooldown state. Credential values are masked in the UI and diagnostics.
28
+
29
+ ## Evidence
30
+
31
+ ```bash
32
+ npm run check # 149 tests + typecheck + build
33
+ npm audit --omit=dev --json # 0 production vulnerabilities
34
+ npm ls zod --all # zod 4.4.3 through DSH dev packages
35
+ npm run test:engine -- <candidate.tgz>
36
+ ```
37
+
38
+ - Production package contents are limited by `files`; no tests, sources,
39
+ credentials or worktrees are published.
40
+ - HTTP writes require a JSON body, same-origin `Origin`/`Referer`, a trusted
41
+ Host, and the admin token when configured.
42
+ - The updater is loopback-only and also sits behind the admin-token guard.
43
+ - MOA and other plugins were not touched.
44
+
45
+ ## Conclusion
46
+
47
+ The production dependency surface is clean; the only high advisory is a
48
+ dev/peer `zod` pin inherited from DSH and blocked on an upstream release. The
49
+ remaining deployment caveats (optional admin token, profile lockfiles) are
50
+ documented and tracked. No open critical or correctness issue was found in the
51
+ reviewed scope.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.34 — release 11: engine matrix and audit closure
4
+
5
+ - **#55 — engine matrix**: `npm run test:engine -- <candidate.tgz>` validates one immutable candidate against `engines.dsh` and `dsh.compatibility.dshReleases`, and rejects test/source content. It never installs DSH, starts a runtime, extracts the tarball, uses a worktree path, or performs forced cleanup; compatibility execution remains on the approved MiniPC contour.
6
+ - **#39 — project/security audit**: added `AUDIT.md` with verified findings. Production dependencies audit clean; the dev/peer `zod` advisory and optional-auth/lockfile caveats are recorded as residuals.
7
+ - **#82 — Duskriver parity**: all 18 child issues are closed; the parity parent is closed with the evidence index.
8
+ - 149 tests.
9
+
3
10
  ## 0.5.33 — release 10: admin token and dependency audit
4
11
 
5
12
  - **#41 — authenticated HTTP routes**: optional owner `adminToken` (profile config or `OPENCODE_ADMIN_TOKEN`). When set, every `/dsh-opencode/*` route requires `x-opencode-token` or a Bearer token with constant-time comparison; forged Host/Origin alone no longer passes. The settings UI prompts for the token and keeps it in this browser.
package/README.md CHANGED
@@ -133,12 +133,12 @@ npm pack
133
133
  Install the **packed tarball** into a profile:
134
134
 
135
135
  ```bash
136
- dsh plugin --profile web add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.33.tgz
136
+ dsh plugin --profile web add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.34.tgz
137
137
  # DSH Desktop:
138
- dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.33.tgz
138
+ dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.34.tgz
139
139
 
140
140
  # Or install the published package:
141
- dsh plugin --profile web add @goodandready/dsh-opencode-provider@0.5.33
141
+ dsh plugin --profile web add @goodandready/dsh-opencode-provider@0.5.34
142
142
  ```
143
143
 
144
144
  Restart dsh (or DSH Desktop), then pick **OpenCode (plugin)** or **OpenCode Go (plugin)** in the model picker.
@@ -304,6 +304,10 @@ npm run sync:models # regenerate src/models.generated.ts from models.dev
304
304
 
305
305
  GitHub Actions runs `npm run check` and `npm pack` on push/PR (`.github/workflows/ci.yml`).
306
306
 
307
+ ### Engine matrix
308
+
309
+ `npm run test:engine -- <candidate.tgz>` validates one immutable, already-built package candidate against `engines.dsh` and `dsh.compatibility.dshReleases`, and checks that only production files are packaged. The command is read-only: it does not install DSH, start a runtime, extract the tarball, touch another plugin, or perform cleanup. Compatibility execution runs on the approved MiniPC test contour against the published candidate — never against a worktree path and never with forced processes or recursive deletion.
310
+
307
311
  ## Limitations
308
312
 
309
313
  - File attachments are forwarded as DSH handle text, not inline bytes; the harness normally supplies the read-only execution path. Tool-result images are inline on Anthropic, OpenAI Responses and Google; OpenAI Chat uses a placeholder.
@@ -318,6 +322,10 @@ GitHub Actions runs `npm run check` and `npm pack` on push/PR (`.github/workflow
318
322
  - Same-origin checks are CSRF protection, not authentication. Set an owner admin token in the profile config (`adminToken`) or `OPENCODE_ADMIN_TOKEN`; every `/dsh-opencode/*` route then requires `x-opencode-token` or `Authorization: Bearer`. The settings UI asks for the token once and keeps it in this browser. Without a token, routes retain the loopback/same-origin guard only.
319
323
  - `npm audit` still reports `zod < 4.6.6` (GHSA-mrhx-c7xc-m3w5) because every `@deepseek-ai/dsh-*` 0.2.2-rc.1 package pins `zod` 4.4.3. No DSH 0.2.2 release with 4.6.6 exists yet; this plugin does not bundle zod and no forced override is used. Re-audit after the upstream DSH update.
320
324
 
325
+ ## Audit
326
+
327
+ The read-only project and security review, including residual dependency and deployment findings, is in [AUDIT.md](./AUDIT.md).
328
+
321
329
  ## License
322
330
 
323
331
  MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY). See [LICENSE](./LICENSE) and [NOTICE](./NOTICE).
package/README.ru.md CHANGED
@@ -132,12 +132,12 @@ npm pack
132
132
  Установка из **упакованного tarball**:
133
133
 
134
134
  ```bash
135
- dsh plugin --profile web add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.33.tgz
135
+ dsh plugin --profile web add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.34.tgz
136
136
  # DSH Desktop:
137
- dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.33.tgz
137
+ dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.34.tgz
138
138
 
139
139
  # Либо установка опубликованного пакета из npm:
140
- dsh plugin --profile web add @goodandready/dsh-opencode-provider@0.5.33
140
+ dsh plugin --profile web add @goodandready/dsh-opencode-provider@0.5.34
141
141
  ```
142
142
 
143
143
  После установки перезапустите dsh (или DSH Desktop) и выберите **OpenCode (plugin)** или **OpenCode Go (plugin)** в списке моделей.
@@ -211,6 +211,10 @@ modelAccountRules:
211
211
 
212
212
  Язык вывода задаётся в **Настройки → OpenCode → `/opencode` command language** (`中文` включает китайский). По умолчанию английский.
213
213
 
214
+ ### Матрица движков
215
+
216
+ `npm run test:engine -- <candidate.tgz>` проверяет неизменяемый уже собранный пакет по `engines.dsh` и `dsh.compatibility.dshReleases`, а также состав production-файлов. Команда только читает: не ставит DSH, не запускает runtime, не распаковывает архив, не трогает другие плагины и не требует cleanup. Прогон совместимости выполняется на согласованном тестовом контуре MiniPC с опубликованным кандидатом — не из worktree и без принудительных процессов или рекурсивного удаления.
217
+
214
218
  ## Безопасность и надежность
215
219
 
216
220
  - Same-origin — это защита от CSRF, а не аутентификация. Задайте admin-токен владельца в конфиге профиля (`adminToken`) или `OPENCODE_ADMIN_TOKEN`; тогда все маршруты `/dsh-opencode/*` требуют `x-opencode-token` или `Authorization: Bearer`. UI спросит токен один раз и сохранит его в браузере. Без токена остаются только loopback и same-origin проверки.
package/README.zh.md CHANGED
@@ -127,12 +127,12 @@ npm pack
127
127
  通过**打包文件 (.tgz)**安装:
128
128
 
129
129
  ```bash
130
- dsh plugin --profile web add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.33.tgz
130
+ dsh plugin --profile web add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.34.tgz
131
131
  # DSH 桌面端:
132
- dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.33.tgz
132
+ dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-opencode-provider-0.5.34.tgz
133
133
 
134
134
  # 或从 npm 安装已发布版本:
135
- dsh plugin --profile web add @goodandready/dsh-opencode-provider@0.5.33
135
+ dsh plugin --profile web add @goodandready/dsh-opencode-provider@0.5.34
136
136
  ```
137
137
 
138
138
  安装完成后重启 dsh 或 DSH 桌面端,在模型选择器中选择 **OpenCode (plugin)** 或 **OpenCode Go (plugin)** 即可。
@@ -186,6 +186,10 @@ modelAccountRules:
186
186
 
187
187
  在 **设置 → OpenCode → `/opencode` 命令语言** 中选择 `中文` 即可切换输出语言,默认英语。
188
188
 
189
+ ### 引擎矩阵
190
+
191
+ `npm run test:engine -- <candidate.tgz>` 使用 `engines.dsh` 与 `dsh.compatibility.dshReleases` 校验不可变的已构建包,并检查只打包生产文件。该命令只读:不安装 DSH、不启动运行时、不解压归档、不修改其他插件,也不需要清理。兼容性执行在批准的 MiniPC 测试环境上使用已发布候选包完成,绝不使用 worktree 路径,也不强制结束进程或递归删除。
192
+
189
193
  ## 安全规范
190
194
 
191
195
  - 同源检查用于防御 CSRF,并非身份认证。在配置文件(`adminToken`)或 `OPENCODE_ADMIN_TOKEN` 中设置管理员令牌后,所有 `/dsh-opencode/*` 路由都要求 `x-opencode-token` 或 `Authorization: Bearer`;设置界面会要求输入一次并保存在当前浏览器。未设置令牌时仍只有 Loopback 与同源检查。
package/lib/index.js CHANGED
@@ -99,7 +99,7 @@ const DEFAULT_GO_API_BASE = "https://opencode.ai/inference/go";
99
99
  const DEFAULT_GO_ZEN_BASE = "https://opencode.ai/zen/go/v1";
100
100
  const DEFAULT_USAGE_URL = "https://opencode.ai/zen/go/v1/usage";
101
101
  const DEFAULT_AUTH_ENTRY = "opencode-go";
102
- const DEFAULT_USER_AGENT = "dsh-opencode-provider/0.5.33";
102
+ const DEFAULT_USER_AGENT = "dsh-opencode-provider/0.5.34";
103
103
  const DEFAULT_CONTEXT_WINDOW = 262144;
104
104
  const DEFAULT_MAX_TOKENS = 32768;
105
105
  const DEFAULT_GENERATE_MAX_TOKENS = 65536;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-opencode-provider",
3
- "version": "0.5.33",
3
+ "version": "0.5.34",
4
4
  "description": "OpenCode / OpenCode Go LLM provider plugin for DeepSeek Harness (dsh).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,6 +27,7 @@
27
27
  "CHANGELOG.md",
28
28
  "LICENSE",
29
29
  "NOTICE",
30
+ "AUDIT.md",
30
31
  "media/visual-verification.png"
31
32
  ],
32
33
  "publishConfig": {
@@ -70,10 +71,11 @@
70
71
  "build": "tsdown",
71
72
  "prepare": "tsdown 1>&2",
72
73
  "typecheck": "tsc --noEmit",
73
- "test": "node --import tsx --test tests/core.test.ts tests/routes.test.ts tests/limits.test.ts tests/analytics.test.ts tests/adapter.test.ts tests/usage.test.ts tests/request-log.test.ts tests/account-rules.test.ts tests/commands.test.ts tests/tool-schema.test.ts tests/tui-settings.test.ts tests/plan-filter.test.ts tests/image-budget.test.ts tests/tools.test.ts tests/plugin-updater.test.ts tests/client-render.test.tsx tests/sse.test.ts tests/proxy.test.ts tests/tool-call-validation.test.ts tests/pricing.test.ts",
74
+ "test": "node --import tsx --test tests/core.test.ts tests/routes.test.ts tests/limits.test.ts tests/analytics.test.ts tests/adapter.test.ts tests/usage.test.ts tests/request-log.test.ts tests/account-rules.test.ts tests/commands.test.ts tests/tool-schema.test.ts tests/tui-settings.test.ts tests/plan-filter.test.ts tests/image-budget.test.ts tests/tools.test.ts tests/plugin-updater.test.ts tests/client-render.test.tsx tests/sse.test.ts tests/proxy.test.ts tests/tool-call-validation.test.ts tests/pricing.test.ts tests/engine-matrix.test.ts",
74
75
  "check": "npm run typecheck && npm test && npm run build",
75
76
  "release": "npm run check && npm pack",
76
- "sync:models": "node scripts/sync-models.mjs"
77
+ "sync:models": "node scripts/sync-models.mjs",
78
+ "test:engine": "node scripts/test-engines.mjs"
77
79
  },
78
80
  "keywords": [
79
81
  "dsh",