@noob-stupid/dsh-plugin-console 0.5.7 → 0.5.9

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
@@ -268,6 +268,21 @@ The floating "Sources" button (right of the title row, semi-transparent) opens t
268
268
 
269
269
  <img width="393" height="525" alt="56ccd0b3-f174-4365-848b-64013b27d604" src="https://github.com/user-attachments/assets/5a2816ce-12d9-4001-b895-1e422c11d423" />
270
270
 
271
+ ## Framework compatibility
272
+
273
+ Measured on isolated instances (fresh `DSH_HOME`, real HTTP probes) — **supported: framework ≥ `0.1.5-rc.2`**, no workarounds needed.
274
+
275
+ | | 0.1.7-rc.2 (current) | 0.1.5-rc.2 / 0.1.2-rc.1 |
276
+ |---|---|---|
277
+ | Official plugins page (`@deepseek-ai/dsh-client-ui-plugin-manager`) | present | **not shipped by the framework at all** |
278
+ | The official-style **Upgrade safety** entry | shown (hosted in that page's own `plugins.bundle.config` slot) | not shown — there is no page to host it |
279
+ | Classic **Plugins** tab (`settings.plugins.tab`) | shown | **shown** |
280
+ | Server-side features (upgrade / rollback / gating / marketplace) | all available | **all available** (every route answered 200 in the matrix) |
281
+ | Errors | none | **none** (the slot registration degrades silently) |
282
+
283
+ So on an older framework the plugin is **the old UI with the full feature set** — the new entry simply has nowhere to live. It never white-screens and never throws.
284
+
285
+ Verification matrix, raw logs and the one framework-side caveat (`0.1.2-rc.1` ships `patchReload: "live"` for a web tree without the HMR service → boot exits 1 after ~10s; unrelated to this plugin) are recorded in `.testdir/fw-old-matrix/report.md`.
271
286
  ## Documentation
272
287
 
273
288
  - [AI Empower 与服务器组件控制](docs/ai-empower.md)
package/README.zh.md CHANGED
@@ -210,6 +210,21 @@ git clone https://github.com/Noob-stupid/dsh-plugin-hub /tmp/dsh-plugin-console
210
210
 
211
211
  ---
212
212
 
213
+ ## 框架兼容性
214
+
215
+ 在隔离实例(全新 `DSH_HOME` + 真实 HTTP 探针)实测:**支持框架 ≥ `0.1.5-rc.2`**,无需任何变通。
216
+
217
+ | | 0.1.7-rc.2(当前) | 0.1.5-rc.2 / 0.1.2-rc.1 |
218
+ |---|---|---|
219
+ | 官方插件页(`@deepseek-ai/dsh-client-ui-plugin-manager`) | 有 | **框架根本没带这一页** |
220
+ | 官方风格「升级安全」入口 | 显示(挂在那一页自己的 `plugins.bundle.config` 插槽) | 不显示 —— 载体页面都不存在 |
221
+ | 原「插件」tab(`settings.plugins.tab`) | 显示 | **照样显示** |
222
+ | 服务端功能(升级 / 回滚 / 门控 / 市场) | 全有 | **全有**(矩阵里每条路由都返回 200) |
223
+ | 报错 | 无 | **无**(插槽注册静默降级) |
224
+
225
+ 也就是说:老框架上就是**老界面 + 完整功能** —— 新入口不是被隐藏,而是根本没有可挂的地方;不会白屏、不会抛错。
226
+
227
+ 验证矩阵、原始日志,以及一个**框架自身的坑**(`0.1.2-rc.1` 给没有 HMR 服务的 web 树配了 `patchReload: "live"` → 启动约 10 秒后 exit 1,与本插件无关)都记录在 `.testdir/fw-old-matrix/report.md`。
213
228
  ## 文档
214
229
 
215
230
  - [AI 赋能与服务器组件控制](docs/ai-empower.zh.md)
package/lib/client.js CHANGED
@@ -5048,12 +5048,22 @@ setMessage(t("failed") + ":" + (data?.reason ?? "未知"));
5048
5048
  // 且仅当 configured = ledger.bundles.has(pkg.name) 为真 —— 我们是 profile bundle,天然满足。
5049
5049
  // 所以入口长在那一页「已安装 → 我们的 bundle」详情里,用的是官方容器与官方风格,不是 DOM 注入。
5050
5050
  // 之前那个独立的「升级安全」tab 已按用户要求关闭(错误落点不占位);原 tab(id=console) 一行未动。
5051
- ctx.slots.inject("plugins.bundle.config", () => ctx.slots.register({
5052
- name: "plugins.bundle.config",
5053
- key: "@noob-stupid/dsh-plugin-console",
5054
- locale: NS,
5055
- inject: () => ({}),
5056
- }, PluginSafetyTab));
5051
+ //
5052
+ // 老框架兼容(2026-09-25 用户提问后加固):`plugins.bundle.config` 是**官方插件管理页声明的子插槽**,
5053
+ // 老版本框架里可能根本不存在这个插槽。此时绝不能让它把一个异常抛到 apply() 外面 —— 那样会连带
5054
+ // 把上面那个「插件」tab 一起拖没(前端半边整个 pending/异常)。这里包一层 try/catch:
5055
+ // 插槽不存在 → 只是这个新入口不显示,其余功能(含原 tab)照常。
5056
+ try {
5057
+ ctx.slots.inject("plugins.bundle.config", () => ctx.slots.register({
5058
+ name: "plugins.bundle.config",
5059
+ key: "@noob-stupid/dsh-plugin-console",
5060
+ locale: NS,
5061
+ inject: () => ({}),
5062
+ }, PluginSafetyTab));
5063
+ } catch (error) {
5064
+ // 静默降级:老框架没有该子插槽属预期情况,不该在用户控制台里刷错误
5065
+ ctx.logger?.debug?.("plugin-console: plugins.bundle.config 插槽不可用,已跳过「升级安全」入口", error)
5066
+ }
5057
5067
  }
5058
5068
  exports.NS = NS;
5059
5069
  exports.apply = apply;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noob-stupid/dsh-plugin-console",
3
- "version": "0.5.7",
3
+ "version": "0.5.9",
4
4
  "description": "DSH 框架升级安全与插件升级门控:一键升级、失败自动回滚、升级后回滚上版、旧插件不适配自动禁用;内置多源插件市场为发现层,插件源全部可自定义,可指向公司内网私有源 / 私有索引 / 本地 Git 仓库,纯内网离线可用 | Framework upgrade safety & plugin version gating for DSH, with a customizable multi-source plugin market: point every source at internal mirrors or a local file:// repo for intranet-only, offline installs.",
5
5
  "repository": {
6
6
  "type": "git",