@dan-ai-studio/dshopencodego 0.1.88 → 0.1.89
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 +5 -5
- package/README.md +5 -5
- package/lib/index.js +710 -256
- package/package.json +29 -29
package/README.en.md
CHANGED
|
@@ -240,7 +240,7 @@ The verdict:
|
|
|
240
240
|
- not satisfied → **that plugin row is disabled with a printed reason** (`Plugin … is incompatible with dsh …`), leaving other plugins untouched;
|
|
241
241
|
- to take the risk anyway, grant an **exact-version exemption**: `dsh plugin --profile <profile> allow-version <pkg>@<version> --dsh-version <exact> --accept-risk` (applies only to that package and that exact runtime version); `dsh plugin --profile <profile> version-exemptions` lists what a profile holds.
|
|
242
242
|
|
|
243
|
-
**This plugin declares `engines.dsh`, so that is the range the gate enforces**; the peer ranges are a declaration for readers and package managers, and only take over the verdict if `engines.dsh` is removed. The upper bound is written `<0.3.0-0` rather than `<0.3.0` precisely because the check includes prereleases: `<0.3.0` would judge `0.3.0-rc.1` and its siblings **compatible** and let them load, while `<0.3.0-0` closes the whole `0.3.0` line. `@deepseek-ai/cordis` is declared separately as `4.0.4 || 4.0.5-alpha.1 || 4.0.5-alpha.2 || 4.0.5` — the runtimes used by DSH `0.2.0-rc.1`/`rc.2`, `0.2.1-alpha.1`/`alpha.2`, `0.2.1-alpha.3`–`alpha.5`, and `0.2.1-rc.2` respectively (`4.0.2`/`4.0.3` were dropped along with pre-`0.2.0` support).
|
|
243
|
+
**This plugin declares `engines.dsh`, so that is the range the gate enforces**; the peer ranges are a declaration for readers and package managers, and only take over the verdict if `engines.dsh` is removed. The upper bound is written `<0.3.0-0` rather than `<0.3.0` precisely because the check includes prereleases: `<0.3.0` would judge `0.3.0-rc.1` and its siblings **compatible** and let them load, while `<0.3.0-0` closes the whole `0.3.0` line. `@deepseek-ai/cordis` is declared separately as `4.0.4 || 4.0.5-alpha.1 || 4.0.5-alpha.2 || 4.0.5 || 4.0.6-alpha.1 || 4.0.6-alpha.2` — the runtimes used by DSH `0.2.0-rc.1`/`rc.2`, `0.2.1-alpha.1`/`alpha.2`, `0.2.1-alpha.3`–`alpha.5`, and `0.2.1-rc.2` respectively (`4.0.2`/`4.0.3` were dropped along with pre-`0.2.0` support).
|
|
244
244
|
|
|
245
245
|
**Outside the declared range**: everything before `0.2.0-rc.1`, and the whole `0.3.0` line (prereleases included), are refused. If the seam is compatible, widen or drop this plugin's **`engines.dsh`** in your own build — widening the peer range does nothing, since it takes no part in the verdict — or wait for a plugin release.
|
|
246
246
|
|
|
@@ -250,10 +250,10 @@ The verdict:
|
|
|
250
250
|
| --- | --- | --- |
|
|
251
251
|
| `engines.dsh` | `>=0.2.0-rc.1 <0.3.0-0` | **DSH's gate at plugin load time; declaring it skips the peer verdict entirely** |
|
|
252
252
|
| `peerDependencies` (20 `@deepseek-ai/dsh-*` packages) | all `>=0.2.0-rc.1 <0.3.0-0` | takes over only when `engines.dsh` is absent; this plugin declares it, so the peers take no part today |
|
|
253
|
-
| `@deepseek-ai/cordis` | `4.0.4 \|\| 4.0.5-alpha.1 \|\| 4.0.5-alpha.2 \|\| 4.0.5` | the same peer channel |
|
|
253
|
+
| `@deepseek-ai/cordis` | `4.0.4 \|\| 4.0.5-alpha.1 \|\| 4.0.5-alpha.2 \|\| 4.0.5 \|\| 4.0.6-alpha.1 \|\| 4.0.6-alpha.2` | the same peer channel |
|
|
254
254
|
| `engines.node` | `^22.19.0 \|\| >=24.0.0` | the package manager |
|
|
255
|
-
| bundled `@earendil-works/pi-ai` |
|
|
256
|
-
| bundled `@deepseek-ai/schemastery` | `~3.18.
|
|
255
|
+
| bundled `@earendil-works/pi-ai` | `1.5.0` (within 1.5.x), **compiled into `lib/`** (devDependency) | an independent coupling: a change in pi-ai's request construction changes this plugin's wire behaviour, and its opencode-go builtin catalog is this plugin's fallback data. Bundling leaves the plugin with **no runtime dependencies** for an installer to resolve |
|
|
256
|
+
| bundled `@deepseek-ai/schemastery` | `~3.18.6-alpha.2`, **compiled into `lib/`** (devDependency) | a build-time dependency |
|
|
257
257
|
|
|
258
258
|
Things to keep in mind when maintaining this:
|
|
259
259
|
|
|
@@ -276,7 +276,7 @@ Things to keep in mind when maintaining this:
|
|
|
276
276
|
| The usage button shows "unavailable" | An endpoint or credential change invalidated the previous reading. Fix the configuration and press Retry. It never shows `0` in place of a missing reading. |
|
|
277
277
|
| npm publish fails with `ENEEDAUTH` | OIDC did not match: check the Trusted Publisher's **workflow filename** (must be exactly `publish-npm.yml`, case-sensitive) and the organization/repository fields; run on GitHub-hosted runners with `id-token: write`. A `repository.url` that does not match the GitHub repository is rejected as well. |
|
|
278
278
|
| A flood of `Accessing non-existent property 'Allow' of module exports inside circular dependency` | Caused by `pi-ai`'s **named import** of `partial-json`: resolving a named export from CommonJS enumerates the module's exports, and that package's `index.js`/`options.js` require each other, so reading `Allow` before its module initialises prints once per read — **a plugin reload turns it into a flood** (a restart usually clears it). **Removed at the mechanism since v0.1.38**: `pi-ai` and `partial-json` are now **compiled into the bundle**, so Node's ESM→CJS interop is not involved and there is no enumeration of an uninitialised export to begin with. That is a fix, not a filter. |
|
|
279
|
-
| The whole DSH process stalls during ultra-long tool calls (multi-MB arguments) | Observed on pi-ai `0.87.1`: per-delta re-parsing of the accumulated arguments (issue #9265 / PR #9461). This plugin does not port DSH's consumer-side patch (ADR-0005); the bundled dependency is now
|
|
279
|
+
| The whole DSH process stalls during ultra-long tool calls (multi-MB arguments) | Observed on pi-ai `0.87.1`: per-delta re-parsing of the accumulated arguments (issue #9265 / PR #9461). This plugin does not port DSH's consumer-side patch (ADR-0005); the bundled dependency is now `1.5.0`, so a recurrence would be upstream behaviour and would be fixed by an upstream release. |
|
|
280
280
|
|
|
281
281
|
## Development
|
|
282
282
|
|
package/README.md
CHANGED
|
@@ -239,7 +239,7 @@ API Key 通过 Harness 凭证库提供(引用名 `OPENCODE_GO_API_KEY`),
|
|
|
239
239
|
- 不满足 → **该插件行被禁用并打印原因**(`Plugin … is incompatible with dsh …`),其他插件不受影响;
|
|
240
240
|
- 需要冒险时可用**精确版本豁免**:`dsh plugin --profile <profile> allow-version <包>@<版本> --dsh-version <精确版本> --accept-risk`(只对该包与该精确版本生效);`dsh plugin --profile <profile> version-exemptions` 可列出当前 profile 的豁免。
|
|
241
241
|
|
|
242
|
-
**本插件声明了 `engines.dsh`,所以生效的门禁就是它**;peer 范围是给读者与包管理器的声明,只在 `engines.dsh` 被删除之后才会接管判定。上界写成 `<0.3.0-0` 而不是 `<0.3.0`,正是因为判定含预发布:`<0.3.0` 会把 `0.3.0-rc.1` 这类**预发布版判为兼容**并放行,`<0.3.0-0` 才真正封住整条 `0.3.0` 线。`@deepseek-ai/cordis` 单独声明为 `4.0.4 || 4.0.5-alpha.1 || 4.0.5-alpha.2 || 4.0.5`——依次是 DSH `0.2.0-rc.1`/`rc.2`、`0.2.1-alpha.1`/`alpha.2`、`0.2.1-alpha.3`–`alpha.5`、以及 `0.2.1-rc.2` 所用的运行时(`4.0.2`/`4.0.3` 随 `0.2.0` 之前的支持一并移除)。
|
|
242
|
+
**本插件声明了 `engines.dsh`,所以生效的门禁就是它**;peer 范围是给读者与包管理器的声明,只在 `engines.dsh` 被删除之后才会接管判定。上界写成 `<0.3.0-0` 而不是 `<0.3.0`,正是因为判定含预发布:`<0.3.0` 会把 `0.3.0-rc.1` 这类**预发布版判为兼容**并放行,`<0.3.0-0` 才真正封住整条 `0.3.0` 线。`@deepseek-ai/cordis` 单独声明为 `4.0.4 || 4.0.5-alpha.1 || 4.0.5-alpha.2 || 4.0.5 || 4.0.6-alpha.1 || 4.0.6-alpha.2`——依次是 DSH `0.2.0-rc.1`/`rc.2`、`0.2.1-alpha.1`/`alpha.2`、`0.2.1-alpha.3`–`alpha.5`、以及 `0.2.1-rc.2` 所用的运行时(`4.0.2`/`4.0.3` 随 `0.2.0` 之前的支持一并移除)。
|
|
243
243
|
|
|
244
244
|
**声明范围之外**:`0.2.0-rc.1` 之前的所有版本、以及整条 `0.3.0` 线(含预发布)都会被拒绝加载。如果 DSH 侧接口兼容,可自行放宽或删除该插件的 **`engines.dsh`** 后重新构建(改 peer 范围是无效的——它不参与判定);否则请等插件跟进发版。
|
|
245
245
|
|
|
@@ -249,10 +249,10 @@ API Key 通过 Harness 凭证库提供(引用名 `OPENCODE_GO_API_KEY`),
|
|
|
249
249
|
| --- | --- | --- |
|
|
250
250
|
| `engines.dsh` | `>=0.2.0-rc.1 <0.3.0-0` | **DSH 加载时的真门禁;声明了它,peer 判定被整体跳过** |
|
|
251
251
|
| `peerDependencies`(20 个 `@deepseek-ai/dsh-*`) | 均为 `>=0.2.0-rc.1 <0.3.0-0` | 仅当 `engines.dsh` 缺席时才接管;本插件声明了它,故当前不参与判定 |
|
|
252
|
-
| `@deepseek-ai/cordis` | `4.0.4 \|\| 4.0.5-alpha.1 \|\| 4.0.5-alpha.2 \|\| 4.0.5` | 同上(peer 通道) |
|
|
252
|
+
| `@deepseek-ai/cordis` | `4.0.4 \|\| 4.0.5-alpha.1 \|\| 4.0.5-alpha.2 \|\| 4.0.5 \|\| 4.0.6-alpha.1 \|\| 4.0.6-alpha.2` | 同上(peer 通道) |
|
|
253
253
|
| `engines.node` | `^22.19.0 \|\| >=24.0.0` | 包管理器 |
|
|
254
|
-
| 已打包依赖 `@earendil-works/pi-ai` |
|
|
255
|
-
| 已打包依赖 `@deepseek-ai/schemastery` | `~3.18.
|
|
254
|
+
| 已打包依赖 `@earendil-works/pi-ai` | `1.5.0`(1.5.x 内),**打进产物**(devDependency) | 独立耦合:pi-ai 改请求构造即影响本插件的线上行为;其 opencode-go 内置目录同时是本插件的打底数据。打包后本插件**没有任何运行时依赖**,安装者不必再解析它 |
|
|
255
|
+
| 已打包依赖 `@deepseek-ai/schemastery` | `~3.18.6-alpha.2`,**打进产物**(devDependency) | 构建期依赖 |
|
|
256
256
|
|
|
257
257
|
维护时需要注意:
|
|
258
258
|
|
|
@@ -275,7 +275,7 @@ API Key 通过 Harness 凭证库提供(引用名 `OPENCODE_GO_API_KEY`),
|
|
|
275
275
|
| 用量按钮显示「不可用」 | 端点或凭证变化导致旧读数作废;配置正确后点「重试」。数值不会以 0 冒充。 |
|
|
276
276
|
| npm 发布报 `ENEEDAUTH` | OIDC 没匹配上:核对包设置里 Trusted Publisher 的 **workflow 文件名**(必须恰为 `publish-npm.yml`、大小写敏感)与组织/仓库字段;确认跑在 GitHub 托管 runner 上且工作流带 `id-token: write`。`package.json` 的 `repository.url` 与仓库不符也会被拒。 |
|
|
277
277
|
| 日志成片出现 `Accessing non-existent property 'Allow' of module exports inside circular dependency` | 成因是 `pi-ai` 对 `partial-json` 的**具名导入**:Node 解析 CJS 的具名导出时会枚举其 exports,而该包内部 `index.js`/`options.js` 互相 require,读到尚未初始化的 `Allow` 就打印一次——**插件重载会让它成片出现**(重启后往往消失)。**自 v0.1.38 起从机制上消除**:`pi-ai` 与 `partial-json` 已**打包进产物**,Node 的 ESM→CJS 互操作不再参与,因此不存在"枚举读到未初始化属性"这一步(不是过滤,是让该路径不存在)。 |
|
|
278
|
-
| 超长工具调用(多 MB 参数)期间整个 DSH 进程卡顿 | 曾在 pi-ai `0.87.1` 上观测到逐 delta 重解析的固有开销(issue #9265 / PR #9461)。本插件不移植 DSH 的消费者侧补丁(ADR-0005);当前自带依赖已是
|
|
278
|
+
| 超长工具调用(多 MB 参数)期间整个 DSH 进程卡顿 | 曾在 pi-ai `0.87.1` 上观测到逐 delta 重解析的固有开销(issue #9265 / PR #9461)。本插件不移植 DSH 的消费者侧补丁(ADR-0005);当前自带依赖已是 `1.5.0`,若仍复现则属上游行为,随其发版解决。 |
|
|
279
279
|
|
|
280
280
|
## 开发
|
|
281
281
|
|