@deepseek-ai/dsh-plugin-manager 0.2.1-alpha.3 → 0.2.1-alpha.4

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.i18n.yaml CHANGED
@@ -18,8 +18,8 @@
18
18
  en: 95c1b18f8432090a
19
19
  zh: 213e54a1547a1da1
20
20
  /deepseek-ai-dsh-plugin-manager/use-this-package/version-compatibility-and-exemptions:
21
- en: 920c0acb3b9feaf3
22
- zh: ba6e832a256880a7
21
+ en: 483285658e267dd5
22
+ zh: 846bec2daac59a96
23
23
  /deepseek-ai-dsh-plugin-manager/use-this-package/configuration:
24
24
  en: d5643a06f300c30a
25
25
  zh: 9348b6a7676a2849
package/README.md CHANGED
@@ -66,13 +66,13 @@ When pnpm 11 blocks dependency scripts, the failed installation reports every pe
66
66
  <a id="version-compatibility-and-exemptions"></a>
67
67
  ### Version compatibility and exemptions
68
68
 
69
- An install command that names packages (`add`, or `install` with specs) is checked before pnpm runs: a local path is read from its own `package.json`, and a registry spec is resolved through pnpm's registry lookup for the version its range selects and the peers that version declares. An incompatible DSH peer rejects the operation before pnpm runs, so nothing is downloaded and no build script runs; a build approval the caller supplied with the request is recorded before this check and remains. A git or tarball spec needs the fetch itself, so it is judged after installation: the operation then restores the profile manifest and lockfile, reinstalls the restored lockfile (or, when the profile had none, reinstalls from the restored manifest without creating one), and reports whether that recovery succeeded; already permitted build-script effects may remain. A dependency the run did not change never blocks an unrelated operation: it stays installed, the run reports a warning naming it, and profile startup denies it. Installation requests with `enabled: false` are checked the same way. Startup checks run independently; see [App boot](../app-boot/README.md#profiles) for range semantics. Version exemptions do not authorize dependency scripts.
69
+ An install command that names packages (`add`, or `install` with specs) is checked before pnpm runs: a local path is read from its own `package.json`, and a registry spec is resolved through pnpm's registry lookup for the version its range selects and the `engines` and `peerDependencies` that version declares. An unmet DSH requirement rejects the operation before pnpm runs, so nothing is downloaded and no build script runs; a build approval the caller supplied with the request is recorded before this check and remains. A git or tarball spec needs the fetch itself, so it is judged after installation: the operation then restores the profile manifest and lockfile, reinstalls the restored lockfile (or, when the profile had none, reinstalls from the restored manifest without creating one), and reports whether that recovery succeeded; already permitted build-script effects may remain. A dependency the run did not change never blocks an unrelated operation: it stays installed, the run reports a warning naming it, and profile startup denies it. Installation requests with `enabled: false` are checked the same way. Startup checks run independently; see [App boot](../app-boot/README.md#profiles) for range semantics. Version exemptions do not authorize dependency scripts.
70
70
 
71
71
  An exemption is an exact `package-name@version` mapped to a list of exact DSH runtime versions in the profile's own `compatibility.json`, beside `package.json` and `cordis.patch.yml`. Writing it changes no dependency, no bundle selection, and no patch layer. Neither plugin upgrades nor DSH upgrades inherit permission. Use `plugin_manager` with `list_version_exemptions` to obtain the runtime version and saved grants, then `set_version_exemption` with `target`, `runtimeVersion`, and `enabled`. Granting also requires `acceptRisk: true`, only after warning the user that incompatible plugins may cause crashes or data loss and receiving explicit permission for that pair. The service checks the acknowledgement and versions, not conversation history. Revocation can remove historical runtime grants.
72
72
 
73
73
  A grant takes effect on the next composition. A live profile recomposes, so the granted plugin mounts in the running session and the result reports `applied`; a startup-only profile keeps its current entries until restart and reports `restart-required`.
74
74
 
75
- The CLI exposes `dsh plugin --profile <profile> version-exemptions`, `allow-version <package@version> --dsh-version <runtime> --accept-risk`, and `revoke-version <package@version> --dsh-version <runtime>`. A grant prints a risk warning before saving. A compatibility refusal carries the `incompatible-version` code with each refused package's `name`, `version`, `runtimeVersion`, and unsatisfied `peers`; each surface renders that record itself. The Web page words it through its locale dictionary, and a CLI refusal prints the exact `allow-version` command. Use the tool or CLI to grant an exemption and retry the original operation.
75
+ The CLI exposes `dsh plugin --profile <profile> version-exemptions`, `allow-version <package@version> --dsh-version <runtime> --accept-risk`, and `revoke-version <package@version> --dsh-version <runtime>`. A grant prints a risk warning before saving. A compatibility refusal carries the `incompatible-version` code with each refused package's `name`, `version`, `runtimeVersion`, and unmet `requirements`, keyed `engines.dsh` or by DSH peer package name; each surface renders that record itself. The Web page words it through its locale dictionary, and a CLI refusal prints the exact `allow-version` command. Use the tool or CLI to grant an exemption and retry the original operation.
76
76
 
77
77
  ### Configuration
78
78
 
package/README.zh.md CHANGED
@@ -66,13 +66,13 @@ pnpm 11 拦下依赖脚本时,失败的安装在 `pendingBuilds` 里报告 pro
66
66
  <a id="version-compatibility-and-exemptions"></a>
67
67
  ### 版本兼容性与豁免
68
68
 
69
- 点名软件包的安装命令(`add`,或带 spec 的 `install`)会在 pnpm 运行前完成检查:本地路径直接读取其 `package.json`,registry spec 通过 pnpm 的 registry 查询得到该范围选中的版本及其声明的 peer。不兼容的 DSH peer 会在 pnpm 运行前使操作失败,因此不会下载任何内容、不会运行构建脚本;调用方随请求提交的构建批准在此检查之前记录,会保留下来。git 或 tarball spec 必须先抓取,因此在安装后才判定:此时操作会恢复 profile 清单与锁文件,并按恢复后的锁文件重新安装(profile 原本没有锁文件时,按恢复后的清单重新安装且不创建锁文件),同时报告该恢复是否成功;已获准构建脚本的副作用可能保留。本次运行未改动的依赖不会阻塞无关操作:它保持已安装状态,运行会输出点名它的警告,由 profile 启动拒绝加载。请求 `enabled: false` 的安装同样受检。启动检查独立执行;版本范围语义见 [App boot](../app-boot/README.zh.md#profiles)。版本豁免不授权依赖脚本。
69
+ 点名软件包的安装命令(`add`,或带 spec 的 `install`)会在 pnpm 运行前完成检查:本地路径直接读取其 `package.json`,registry spec 通过 pnpm 的 registry 查询得到该范围选中的版本及其声明的 `engines` 和 `peerDependencies`。未满足的 DSH 版本要求会在 pnpm 运行前使操作失败,因此不会下载任何内容、不会运行构建脚本;调用方随请求提交的构建批准在此检查之前记录,会保留下来。git 或 tarball spec 必须先抓取,因此在安装后才判定:此时操作会恢复 profile 清单与锁文件,并按恢复后的锁文件重新安装(profile 原本没有锁文件时,按恢复后的清单重新安装且不创建锁文件),同时报告该恢复是否成功;已获准构建脚本的副作用可能保留。本次运行未改动的依赖不会阻塞无关操作:它保持已安装状态,运行会输出点名它的警告,由 profile 启动拒绝加载。请求 `enabled: false` 的安装同样受检。启动检查独立执行;版本范围语义见 [App boot](../app-boot/README.zh.md#profiles)。版本豁免不授权依赖脚本。
70
70
 
71
71
  豁免保存在 profile 自己的 `compatibility.json` 中(与 `package.json`、`cordis.patch.yml` 并列),将精确的 `package-name@version` 映射到精确 DSH 运行时版本列表。写豁免不改变依赖、组合包选择或 patch 层。插件升级和 DSH 升级都不继承授权。使用 `plugin_manager` 的 `list_version_exemptions` 获取运行时版本与已有授权,再通过 `set_version_exemption` 提交 `target`、`runtimeVersion` 和 `enabled`。授权还要求 `acceptRisk: true`;只能在警告用户不兼容插件可能导致崩溃或数据丢失,并获得用户对此版本组合的明确许可后传入。服务校验确认参数和版本,不核实对话历史。撤销可以移除历史运行时版本的授权。
72
72
 
73
73
  授权在下一次组合时生效。在线 profile 会重新组合,被授权的插件会在当前会话中挂载,结果报告 `applied`;仅启动型 profile 在重启前保留当前条目并报告 `restart-required`。
74
74
 
75
- CLI 提供 `dsh plugin --profile <profile> version-exemptions`、`allow-version <package@version> --dsh-version <runtime> --accept-risk` 和 `revoke-version <package@version> --dsh-version <runtime>`。授权会在保存前打印风险警告。兼容性拒绝带有 `incompatible-version` 错误码,以及每个被拒绝软件包的 `name`、`version`、`runtimeVersion` 和未满足的 `peers`;各界面自行呈现这份记录。Web 页面通过 locale 词典生成文案,CLI 拒绝时打印精确的 `allow-version` 命令。通过工具或 CLI 添加豁免后,重试原操作。
75
+ CLI 提供 `dsh plugin --profile <profile> version-exemptions`、`allow-version <package@version> --dsh-version <runtime> --accept-risk` 和 `revoke-version <package@version> --dsh-version <runtime>`。授权会在保存前打印风险警告。兼容性拒绝带有 `incompatible-version` 错误码,以及每个被拒绝软件包的 `name`、`version`、`runtimeVersion` 和未满足的 `requirements`(键为 `engines.dsh` 或 DSH peer 包名);各界面自行呈现这份记录。Web 页面通过 locale 词典生成文案,CLI 拒绝时打印精确的 `allow-version` 命令。通过工具或 CLI 添加豁免后,重试原操作。
76
76
 
77
77
  ### 配置
78
78
 
package/lib/index.js CHANGED
@@ -221,14 +221,14 @@ var ManagementFailure = class extends Error {
221
221
  /**
222
222
  * Drop the exemption status from an unexempted compatibility result.
223
223
  * @param issue Result whose exemption is not active.
224
- * @returns The package, runtime, and rejected peer ranges.
224
+ * @returns The package, runtime, and unmet DSH requirements.
225
225
  */
226
226
  function incompatiblePlugin(issue) {
227
227
  return {
228
228
  name: issue.name,
229
229
  version: issue.version,
230
230
  runtimeVersion: issue.runtimeVersion,
231
- peers: issue.peers
231
+ requirements: issue.requirements
232
232
  };
233
233
  }
234
234
  //#endregion
@@ -390,7 +390,7 @@ function namedSpecs(args) {
390
390
  }
391
391
  /** The manifest a named spec would install, read without installing it.
392
392
  * A path spec is read from disk. A registry spec asks pnpm's own configuration for the version the
393
- * range selects and its peer requirements. A git or tarball spec needs the fetch itself, so the
393
+ * range selects and its dsh requirements (`engines` and peerDependencies). A git or tarball spec needs the fetch itself, so the
394
394
  * check after installation is what judges it.
395
395
  * @param dir Profile directory the lookup runs in.
396
396
  * @param spec Anchored install spec.
@@ -412,6 +412,7 @@ async function namedSpecManifest(dir, spec, options, environment, flags) {
412
412
  parsed.spec,
413
413
  "name",
414
414
  "version",
415
+ "engines",
415
416
  "peerDependencies",
416
417
  "--json",
417
418
  ...flags,
@@ -56,7 +56,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
56
56
  'name': z.string(),
57
57
  'version': z.string(),
58
58
  'runtimeVersion': z.string(),
59
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
59
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
60
60
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
61
61
  }).optional(),
62
62
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -71,7 +71,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
71
71
  'name': z.string(),
72
72
  'version': z.string(),
73
73
  'runtimeVersion': z.string(),
74
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
74
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
75
75
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
76
76
  }).optional(),
77
77
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -115,7 +115,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema =
115
115
  'name': z.string(),
116
116
  'version': z.string(),
117
117
  'runtimeVersion': z.string(),
118
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
118
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
119
119
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
120
120
  }).optional(),
121
121
  'rows': z.array(z.object({
@@ -199,7 +199,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema =
199
199
  'name': z.string(),
200
200
  'version': z.string(),
201
201
  'runtimeVersion': z.string(),
202
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
202
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
203
203
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
204
204
  }).optional(),
205
205
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -214,7 +214,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema =
214
214
  'name': z.string(),
215
215
  'version': z.string(),
216
216
  'runtimeVersion': z.string(),
217
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
217
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
218
218
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
219
219
  }).optional(),
220
220
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -243,7 +243,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$sche
243
243
  'name': z.string(),
244
244
  'version': z.string(),
245
245
  'runtimeVersion': z.string(),
246
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
246
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
247
247
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
248
248
  }).optional(),
249
249
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -258,7 +258,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$sche
258
258
  'name': z.string(),
259
259
  'version': z.string(),
260
260
  'runtimeVersion': z.string(),
261
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
261
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
262
262
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
263
263
  }).optional(),
264
264
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -287,7 +287,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$sche
287
287
  'name': z.string(),
288
288
  'version': z.string(),
289
289
  'runtimeVersion': z.string(),
290
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
290
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
291
291
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
292
292
  }).optional(),
293
293
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -302,7 +302,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$sche
302
302
  'name': z.string(),
303
303
  'version': z.string(),
304
304
  'runtimeVersion': z.string(),
305
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
305
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
306
306
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
307
307
  }).optional(),
308
308
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -335,7 +335,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$s
335
335
  'name': z.string(),
336
336
  'version': z.string(),
337
337
  'runtimeVersion': z.string(),
338
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
338
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
339
339
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
340
340
  }).optional(),
341
341
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -350,7 +350,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$s
350
350
  'name': z.string(),
351
351
  'version': z.string(),
352
352
  'runtimeVersion': z.string(),
353
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
353
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
354
354
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
355
355
  }).optional(),
356
356
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -377,7 +377,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema
377
377
  'name': z.string(),
378
378
  'version': z.string(),
379
379
  'runtimeVersion': z.string(),
380
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
380
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
381
381
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
382
382
  }).optional(),
383
383
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -392,7 +392,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema
392
392
  'name': z.string(),
393
393
  'version': z.string(),
394
394
  'runtimeVersion': z.string(),
395
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
395
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
396
396
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
397
397
  }).optional(),
398
398
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -1006,7 +1006,7 @@ export const TYPERT = {
1006
1006
  },
1007
1007
  {
1008
1008
  "name": "IncompatiblePlugin",
1009
- "declaration": "export interface IncompatiblePlugin {\n name: string;\n version: string;\n runtimeVersion: string;\n peers: Record<string, string>;\n}"
1009
+ "declaration": "export interface IncompatiblePlugin {\n name: string;\n version: string;\n runtimeVersion: string;\n requirements: Record<string, string>;\n}"
1010
1010
  },
1011
1011
  {
1012
1012
  "name": "InspectOptions",
@@ -56,7 +56,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
56
56
  'name': z.string(),
57
57
  'version': z.string(),
58
58
  'runtimeVersion': z.string(),
59
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
59
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
60
60
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
61
61
  }).optional(),
62
62
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -71,7 +71,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
71
71
  'name': z.string(),
72
72
  'version': z.string(),
73
73
  'runtimeVersion': z.string(),
74
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
74
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
75
75
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
76
76
  }).optional(),
77
77
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -115,7 +115,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema =
115
115
  'name': z.string(),
116
116
  'version': z.string(),
117
117
  'runtimeVersion': z.string(),
118
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
118
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
119
119
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
120
120
  }).optional(),
121
121
  'rows': z.array(z.object({
@@ -199,7 +199,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema =
199
199
  'name': z.string(),
200
200
  'version': z.string(),
201
201
  'runtimeVersion': z.string(),
202
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
202
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
203
203
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
204
204
  }).optional(),
205
205
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -214,7 +214,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema =
214
214
  'name': z.string(),
215
215
  'version': z.string(),
216
216
  'runtimeVersion': z.string(),
217
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
217
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
218
218
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
219
219
  }).optional(),
220
220
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -243,7 +243,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$sche
243
243
  'name': z.string(),
244
244
  'version': z.string(),
245
245
  'runtimeVersion': z.string(),
246
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
246
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
247
247
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
248
248
  }).optional(),
249
249
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -258,7 +258,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$sche
258
258
  'name': z.string(),
259
259
  'version': z.string(),
260
260
  'runtimeVersion': z.string(),
261
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
261
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
262
262
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
263
263
  }).optional(),
264
264
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -287,7 +287,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$sche
287
287
  'name': z.string(),
288
288
  'version': z.string(),
289
289
  'runtimeVersion': z.string(),
290
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
290
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
291
291
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
292
292
  }).optional(),
293
293
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -302,7 +302,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$sche
302
302
  'name': z.string(),
303
303
  'version': z.string(),
304
304
  'runtimeVersion': z.string(),
305
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
305
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
306
306
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
307
307
  }).optional(),
308
308
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -335,7 +335,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$s
335
335
  'name': z.string(),
336
336
  'version': z.string(),
337
337
  'runtimeVersion': z.string(),
338
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
338
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
339
339
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
340
340
  }).optional(),
341
341
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -350,7 +350,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$s
350
350
  'name': z.string(),
351
351
  'version': z.string(),
352
352
  'runtimeVersion': z.string(),
353
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
353
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
354
354
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
355
355
  }).optional(),
356
356
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -377,7 +377,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema
377
377
  'name': z.string(),
378
378
  'version': z.string(),
379
379
  'runtimeVersion': z.string(),
380
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
380
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
381
381
  })).optional().describe('Present with `incompatible-version`: the packages the running DSH version rejects.'),
382
382
  }).optional(),
383
383
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
@@ -392,7 +392,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema
392
392
  'name': z.string(),
393
393
  'version': z.string(),
394
394
  'runtimeVersion': z.string(),
395
- 'peers': z.record(z.string(), z.string()).describe('Only the DSH peer ranges the running version does not satisfy.'),
395
+ 'requirements': z.record(z.string(), z.string()).describe('Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name.'),
396
396
  })).optional().describe('Present when a compatibility check refused the run: the packages the running DSH version rejects.'),
397
397
  }).optional(),
398
398
  'bundle': z.string().optional().describe('The bundle an installation added, once pnpm and the bundle check accepted it.'),
@@ -16,7 +16,7 @@ export declare class ManagementFailure extends Error {
16
16
  /**
17
17
  * Drop the exemption status from an unexempted compatibility result.
18
18
  * @param issue Result whose exemption is not active.
19
- * @returns The package, runtime, and rejected peer ranges.
19
+ * @returns The package, runtime, and unmet DSH requirements.
20
20
  */
21
21
  export declare function incompatiblePlugin(issue: PluginCompatibility): IncompatiblePlugin;
22
22
  //# sourceMappingURL=failure.d.ts.map
@@ -17,9 +17,9 @@ export class ManagementFailure extends Error {
17
17
  /**
18
18
  * Drop the exemption status from an unexempted compatibility result.
19
19
  * @param issue Result whose exemption is not active.
20
- * @returns The package, runtime, and rejected peer ranges.
20
+ * @returns The package, runtime, and unmet DSH requirements.
21
21
  */
22
22
  export function incompatiblePlugin(issue) {
23
- return { name: issue.name, version: issue.version, runtimeVersion: issue.runtimeVersion, peers: issue.peers };
23
+ return { name: issue.name, version: issue.version, runtimeVersion: issue.runtimeVersion, requirements: issue.requirements };
24
24
  }
25
25
  //# sourceMappingURL=failure.js.map
@@ -163,7 +163,7 @@ function namedSpecs(args) {
163
163
  }
164
164
  /** The manifest a named spec would install, read without installing it.
165
165
  * A path spec is read from disk. A registry spec asks pnpm's own configuration for the version the
166
- * range selects and its peer requirements. A git or tarball spec needs the fetch itself, so the
166
+ * range selects and its dsh requirements (`engines` and peerDependencies). A git or tarball spec needs the fetch itself, so the
167
167
  * check after installation is what judges it.
168
168
  * @param dir Profile directory the lookup runs in.
169
169
  * @param spec Anchored install spec.
@@ -181,7 +181,7 @@ async function namedSpecManifest(dir, spec, options, environment, flags) {
181
181
  if (parsed.kind !== 'registry')
182
182
  return undefined;
183
183
  const viewed = await execa(options.command ?? 'pnpm', [
184
- ...options.args ?? [], 'view', parsed.spec, 'name', 'version', 'peerDependencies', '--json',
184
+ ...options.args ?? [], 'view', parsed.spec, 'name', 'version', 'engines', 'peerDependencies', '--json',
185
185
  ...flags, '--config.fetch-retries=0',
186
186
  ], {
187
187
  cwd: dir, env: environment, extendEnv: false, reject: false, stdin: 'ignore',
@@ -533,7 +533,7 @@ export async function runProfilePnpm(context, args, options) {
533
533
  }
534
534
  }
535
535
  if (warnings.length > 0) {
536
- // A bundle component's peers need installed contents, so this rejection lands after pnpm
536
+ // A bundle component's requirements need installed contents, so this rejection lands after pnpm
537
537
  // replaced the tree: restore the files, then reinstall the restored lockfile so the version
538
538
  // that worked before this run keeps loading. A profile that had no lockfile is reinstalled
539
539
  // from its restored manifest without creating one, which removes what this run added.
@@ -73,7 +73,7 @@ export const inject = ['tools', 'pluginManager', 'sandboxPolicy'];
73
73
  export function apply(ctx) {
74
74
  ctx.tools.register(defineTool({
75
75
  name: 'plugin_manager',
76
- description: 'List plugins or bundles in the current profile, enable or disable them, install a bundle, or remove an installed bundle. Every action requires danger-full-access permission or approval for this call. Approval does not change the session permission mode. Changes affect every session in this profile. List first to obtain exact identifiers. Package installation can execute allowed build scripts. Live profiles apply changes immediately, including upgrades of installed packages; a change result that is not applied carries nextStep, which says what to do or tell the user. Incompatible DSH peer dependencies block installation and activation. Version exemptions risk crashes and data loss: warn the user and obtain explicit permission for the exact plugin and runtime versions before granting one.',
76
+ description: 'List plugins or bundles in the current profile, enable or disable them, install a bundle, or remove an installed bundle. Every action requires danger-full-access permission or approval for this call. Approval does not change the session permission mode. Changes affect every session in this profile. List first to obtain exact identifiers. Package installation can execute allowed build scripts. Live profiles apply changes immediately, including upgrades of installed packages; a change result that is not applied carries nextStep, which says what to do or tell the user. Unmet DSH version requirements (engines.dsh, else DSH peer dependencies) block installation and activation. Version exemptions risk crashes and data loss: warn the user and obtain explicit permission for the exact plugin and runtime versions before granting one.',
77
77
  parameters: {
78
78
  action: { type: 'string', required: true, enum: ['list_plugins', 'list_bundles', 'set_plugin', 'set_bundle', 'install_bundle', 'remove_bundle', 'list_version_exemptions', 'set_version_exemption'], description: 'Management operation.' },
79
79
  target: { type: 'string', description: 'Plugin entry id, bundle package name, or installation spec, according to action. For an Official catalog entry, pass list_bundles installTarget.spec to install_bundle.' },
@@ -6,13 +6,13 @@ export type { PluginEntryId } from '@deepseek-ai/dsh-host-plugin-inventory/types
6
6
  import type { PluginEntryId } from '@deepseek-ai/dsh-host-plugin-inventory/types';
7
7
  /** Reasons a profile control cannot modify its target. */
8
8
  export type ReadOnlyReason = 'management-required' | 'unaddressable';
9
- /** A package whose declared DSH peers reject the running DSH version, without an exemption for the exact pair. */
9
+ /** A package whose declared DSH requirements reject the running DSH version, without an exemption for the exact pair. */
10
10
  export interface IncompatiblePlugin {
11
11
  name: string;
12
12
  version: string;
13
13
  runtimeVersion: string;
14
- /** Only the DSH peer ranges the running version does not satisfy. */
15
- peers: Record<string, string>;
14
+ /** Only the requirements the running version does not satisfy, keyed `engines.dsh` or by DSH peer package name. */
15
+ requirements: Record<string, string>;
16
16
  }
17
17
  /** Localizable management failure and optional external diagnostic. */
18
18
  export interface ManagementError {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-plugin-manager",
3
3
  "description": "Current-profile plugin and bundle management shared by dsh CLI, Web and agent tools",
4
- "version": "0.2.1-alpha.3",
4
+ "version": "0.2.1-alpha.4",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -60,26 +60,26 @@
60
60
  ],
61
61
  "license": "MIT",
62
62
  "dependencies": {
63
- "@deepseek-ai/dsh-app-boot": "0.2.1-alpha.3",
64
- "@deepseek-ai/dsh-atomic-write": "0.2.1-alpha.3",
63
+ "@deepseek-ai/dsh-app-boot": "0.2.1-alpha.4",
64
+ "@deepseek-ai/dsh-atomic-write": "0.2.1-alpha.4",
65
65
  "@deepseek-ai/schemastery": "~3.18.5-alpha.2",
66
66
  "execa": "^10.0.1",
67
67
  "yaml": "^2.9.0",
68
68
  "zod": "4.4.3",
69
- "@deepseek-ai/dsh-util-values": "0.2.1-alpha.3"
69
+ "@deepseek-ai/dsh-util-values": "0.2.1-alpha.4"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@deepseek-ai/cordis": "~4.0.5-alpha.2",
73
73
  "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.2",
74
- "@deepseek-ai/dsh-host-plugin-inventory": "0.2.1-alpha.3",
75
- "@deepseek-ai/dsh-subprocess": "0.2.1-alpha.3",
76
- "@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.3",
77
- "@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
78
- "@deepseek-ai/dsh-hmr": "0.2.1-alpha.3",
79
- "@deepseek-ai/dsh-brand": "0.2.1-alpha.3",
80
- "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.3",
81
- "@deepseek-ai/dsh-sandbox": "0.2.1-alpha.3",
82
- "@deepseek-ai/dsh-user-approval": "0.2.1-alpha.3"
74
+ "@deepseek-ai/dsh-host-plugin-inventory": "0.2.1-alpha.4",
75
+ "@deepseek-ai/dsh-subprocess": "0.2.1-alpha.4",
76
+ "@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.4",
77
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.4",
78
+ "@deepseek-ai/dsh-hmr": "0.2.1-alpha.4",
79
+ "@deepseek-ai/dsh-brand": "0.2.1-alpha.4",
80
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.4",
81
+ "@deepseek-ai/dsh-sandbox": "0.2.1-alpha.4",
82
+ "@deepseek-ai/dsh-user-approval": "0.2.1-alpha.4"
83
83
  },
84
84
  "peerDependenciesMeta": {
85
85
  "@deepseek-ai/dsh-hmr": {
@@ -91,22 +91,22 @@
91
91
  },
92
92
  "devDependencies": {
93
93
  "chokidar": "^4.0.3",
94
- "@deepseek-ai/dsh-package-manifest": "0.2.1-alpha.3",
94
+ "@deepseek-ai/dsh-package-manifest": "0.2.1-alpha.4",
95
95
  "@deepseek-ai/cordis": "~4.0.5-alpha.2",
96
96
  "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.2",
97
- "@deepseek-ai/dsh-host-plugin-inventory": "0.2.1-alpha.3",
98
- "@deepseek-ai/dsh-subprocess": "0.2.1-alpha.3",
99
- "@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.3",
100
- "@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
101
- "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.3",
102
- "@deepseek-ai/dsh-hmr": "0.2.1-alpha.3",
97
+ "@deepseek-ai/dsh-host-plugin-inventory": "0.2.1-alpha.4",
98
+ "@deepseek-ai/dsh-subprocess": "0.2.1-alpha.4",
99
+ "@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.4",
100
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.4",
101
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.4",
102
+ "@deepseek-ai/dsh-hmr": "0.2.1-alpha.4",
103
103
  "@deepseek-ai/cordis-plugin-timer": "~1.1.7-alpha.2",
104
- "@deepseek-ai/dsh-brand": "0.2.1-alpha.3",
105
- "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.3",
106
- "@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
107
- "@deepseek-ai/dsh-session": "0.2.1-alpha.3",
108
- "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.3",
109
- "@deepseek-ai/dsh-sandbox": "0.2.1-alpha.3",
110
- "@deepseek-ai/dsh-user-approval": "0.2.1-alpha.3"
104
+ "@deepseek-ai/dsh-brand": "0.2.1-alpha.4",
105
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.4",
106
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.4",
107
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.4",
108
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.4",
109
+ "@deepseek-ai/dsh-sandbox": "0.2.1-alpha.4",
110
+ "@deepseek-ai/dsh-user-approval": "0.2.1-alpha.4"
111
111
  }
112
112
  }