dsh-prompt-enhance 0.2.3 → 0.2.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.md CHANGED
@@ -55,6 +55,7 @@ The plugin is one npm package with two halves, following the dsh plugin conventi
55
55
  - `dsh >= 0.1.1-rc.2`
56
56
  - Boot-verified on `0.1.1-rc.2`, `0.1.2-alpha.3`, and `0.1.7-rc.2` (layer mounts, enhance route answers, client bundle builds; on alpha the plugin takes the newer `ctx.settings.installSection` registration path). The harness has broken two APIs the plugin touches: `@deepseek-ai/dsh-settings` changed its registration entry between the two early lines, and from `0.1.5-rc.3` the settings service became `SettingsForms` (no synchronous `get`) while `dsh-agent-default-model` moved the harness default model behind its own `ctx.agentDefaultModel.currentSelection()` service. The plugin probes all three shapes at runtime and adapts, no configuration needed.
57
57
  - Node `^22.19.0 || >=24.0.0` (for building from source)
58
+ - Browser peers `react` / `react-dom` (`^18.2.0`) come from the web shell's module registry. The host-half module `@deepseek-ai/dsh-llm` is a **runtime module supplied by the dsh host and is not installed from npm** (the `lib/` bundles keep every package import external), so it is declared as an *optional* peer: an install that does not provide it produces no warning, and the plugin reports a normal error at enhance time rather than failing to load.
58
59
 
59
60
  | | |
60
61
  |---|---|
package/README.zh-CN.md CHANGED
@@ -55,6 +55,7 @@ flowchart LR
55
55
  - `dsh >= 0.1.1-rc.2`
56
56
  - 实测环境:`0.1.1-rc.2`、`0.1.2-alpha.3`、`0.1.7-rc.2` 均已 boot 验证(插件层挂载、增强路由应答、客户端 bundle 构建通过;alpha 上走新版 `ctx.settings.installSection` 注册路径)。宿主在插件用到的两处 API 上做过破坏性变更:`@deepseek-ai/dsh-settings` 的注册入口在两条早期版本线之间变了;`0.1.5-rc.3` 起 settings 服务改为 `SettingsForms`(不再有同步 `get`),同时 `dsh-agent-default-model` 把全局默认模型收进了自己的 `ctx.agentDefaultModel.currentSelection()` 服务。插件对三种形态均做运行时探测并自动适配,无需配置。
57
57
  - Node `^22.19.0 || >=24.0.0`(仅从源码构建时需要)
58
+ - 浏览器侧 peer `react` / `react-dom`(`^18.2.0`)由 Web 壳的模块注册表提供。宿主半区用到的 `@deepseek-ai/dsh-llm` 是**由 dsh 宿主提供的运行时模块,不从 npm 安装**(`lib/` 产物把包引用全部保持为外部),因此声明为**可选** peer:未提供它的环境不会出现安装警告,增强时按正常错误路径报错,而不是加载失败。
58
59
 
59
60
  | | |
60
61
  |---|---|
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-prompt-enhance",
3
3
  "description": "Prompt enhancement for the dsh web GUI: rewrite the composer draft into a well-structured prompt through the harness LLM service, preview the before/after, then fill back, copy, or undo. Original draft is always preserved.",
4
- "version": "0.2.3",
4
+ "version": "0.2.4",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": "^22.19.0 || >=24.0.0"
@@ -40,10 +40,15 @@
40
40
  "schemastery": "^3.18.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
43
+ "@deepseek-ai/dsh-llm": ">=0.1.1-rc.2",
44
44
  "react": "^18.2.0",
45
45
  "react-dom": "^18.2.0"
46
46
  },
47
+ "peerDependenciesMeta": {
48
+ "@deepseek-ai/dsh-llm": {
49
+ "optional": true
50
+ }
51
+ },
47
52
  "devDependencies": {
48
53
  "@deepseek-ai/cordis": "^4.0.1",
49
54
  "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",