@noob-stupid/dsh-plugin-console 0.5.8 → 0.5.10

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,29 @@ 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
+ ### Run mode (managed / observer)
272
+
273
+ The mode decides **who leads framework upgrades** — nothing else:
274
+
275
+ - **Observer (default)**: the console only preflights, gates, and guards the rollback point. It does not take over upgrades.
276
+ - **Managed**: framework upgrade and rollback are owned by this console. It switches to managed automatically when you upgrade through this console, and records the reason.
277
+
278
+ **Boot-failure quarantine is not affected by the mode.** When the service cannot start, the console locates the culprit from the boot log and disables it (broken presets are renamed to `.broken-*`; with no clear culprit it falls back to safe mode so the service can start). A console that cannot boot cannot gate anything — so this rescue path always runs.
279
+ ## Framework compatibility
280
+
281
+ Measured on isolated instances (fresh `DSH_HOME`, real HTTP probes) — **supported: framework ≥ `0.1.5-rc.2`**, no workarounds needed.
282
+
283
+ | | 0.1.7-rc.2 (current) | 0.1.5-rc.2 / 0.1.2-rc.1 |
284
+ |---|---|---|
285
+ | Official plugins page (`@deepseek-ai/dsh-client-ui-plugin-manager`) | present | **not shipped by the framework at all** |
286
+ | 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 |
287
+ | Classic **Plugins** tab (`settings.plugins.tab`) | shown | **shown** |
288
+ | Server-side features (upgrade / rollback / gating / marketplace) | all available | **all available** (every route answered 200 in the matrix) |
289
+ | Errors | none | **none** (the slot registration degrades silently) |
290
+
291
+ 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.
292
+
293
+ 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
294
  ## Documentation
272
295
 
273
296
  - [AI Empower 与服务器组件控制](docs/ai-empower.md)
package/README.zh.md CHANGED
@@ -210,6 +210,29 @@ git clone https://github.com/Noob-stupid/dsh-plugin-hub /tmp/dsh-plugin-console
210
210
 
211
211
  ---
212
212
 
213
+ ### 运行模式(托管 / 观察者)
214
+
215
+ 模式只决定**谁来主导框架升级**,别的都不变:
216
+
217
+ - **观察者(默认)**:只做预检、门控与回滚点守护,不接管框架升级。
218
+ - **托管**:框架升级与回滚由本控制台负责。**走本控制台升级时会自动切到托管**并记下原因。
219
+
220
+ **启动失败隔离不受模式影响。** 服务起不来时,控制台会从启动日志定位肇事插件并禁用它(预设文件改名 `.broken-*`;找不到明确肇事者则进安全模式先让服务起来)。**起不来的控制台什么都门控不了** —— 所以这条救火链路永远生效。
221
+ ## 框架兼容性
222
+
223
+ 在隔离实例(全新 `DSH_HOME` + 真实 HTTP 探针)实测:**支持框架 ≥ `0.1.5-rc.2`**,无需任何变通。
224
+
225
+ | | 0.1.7-rc.2(当前) | 0.1.5-rc.2 / 0.1.2-rc.1 |
226
+ |---|---|---|
227
+ | 官方插件页(`@deepseek-ai/dsh-client-ui-plugin-manager`) | 有 | **框架根本没带这一页** |
228
+ | 官方风格「升级安全」入口 | 显示(挂在那一页自己的 `plugins.bundle.config` 插槽) | 不显示 —— 载体页面都不存在 |
229
+ | 原「插件」tab(`settings.plugins.tab`) | 显示 | **照样显示** |
230
+ | 服务端功能(升级 / 回滚 / 门控 / 市场) | 全有 | **全有**(矩阵里每条路由都返回 200) |
231
+ | 报错 | 无 | **无**(插槽注册静默降级) |
232
+
233
+ 也就是说:老框架上就是**老界面 + 完整功能** —— 新入口不是被隐藏,而是根本没有可挂的地方;不会白屏、不会抛错。
234
+
235
+ 验证矩阵、原始日志,以及一个**框架自身的坑**(`0.1.2-rc.1` 给没有 HMR 服务的 web 树配了 `patchReload: "live"` → 启动约 10 秒后 exit 1,与本插件无关)都记录在 `.testdir/fw-old-matrix/report.md`。
213
236
  ## 文档
214
237
 
215
238
  - [AI 赋能与服务器组件控制](docs/ai-empower.zh.md)
package/lib/client.js CHANGED
@@ -100,10 +100,11 @@ window.__ModuleLoader__.load({
100
100
  safetyBackfillBtn: "补声明({n} 项)",
101
101
  safetyBackfillDone: "补声明完成",
102
102
  safetyMode: "运行模式",
103
- safetyModeManaged: "托管:框架升级与回滚由本控制台负责(默认,行为与之前一致)",
104
- safetyModeManagedOn: "已切到托管模式:框架升级与回滚仍由本控制台负责",
105
- safetyModeObserver: "观察者:只做预检、门控与回滚点守护,不接管框架升级",
106
- safetyModeObserverOn: "已切到观察者模式:不再接管框架升级,只守门",
103
+ safetyModeManaged: "托管:框架升级与回滚由本控制台负责(走本控制台升级时自动切到这个模式)",
104
+ safetyModeManagedOn: "已切到托管模式:框架升级与回滚仍由本控制台负责。启动失败隔离不受模式影响",
105
+ safetyModeObserver: "观察者(默认):只做预检、门控与回滚点守护,不接管框架升级",
106
+ safetyModeObserverOn: "已切到观察者模式:不再接管框架升级,只守门。启动失败隔离不受模式影响",
107
+ safetyModeNote: "启动失败隔离不受模式影响:服务起不来时会自动定位肇事插件并禁用(预设文件会被改名为 .broken-*,找不到肇事者则进安全模式先让服务起来)。",
107
108
  safetyModeSwitch: "切换托管 / 观察者",
108
109
  safetySwitchFailed: "操作失败",
109
110
  safetyFrameworkTitle: "框架版本",
@@ -569,10 +570,11 @@ window.__ModuleLoader__.load({
569
570
  safetyBackfillBtn: "Declare {n}",
570
571
  safetyBackfillDone: "Declarations written",
571
572
  safetyMode: "Operating mode",
572
- safetyModeManaged: "Managed: this console owns framework upgrade and rollback (default, unchanged behaviour)",
573
- safetyModeManagedOn: "Switched to managed: framework upgrade and rollback stay with this console",
574
- safetyModeObserver: "Observer: preflight, gating and rollback-point guard only — does not take over upgrades",
575
- safetyModeObserverOn: "Switched to observer: no longer takes over framework upgrades, only gates",
573
+ safetyModeManaged: "Managed: this console owns framework upgrade and rollback (auto-selected when you upgrade through this console)",
574
+ safetyModeManagedOn: "Switched to managed: framework upgrade and rollback stay with this console. Boot-failure quarantine is unaffected",
575
+ safetyModeObserver: "Observer (default): preflight, gating and rollback-point guard only — does not take over upgrades",
576
+ safetyModeObserverOn: "Switched to observer: no longer takes over framework upgrades, only gates. Boot-failure quarantine is unaffected",
577
+ safetyModeNote: "Boot-failure quarantine is not affected by the mode: when the service cannot start, the culprit plugin is located and disabled automatically (broken presets are renamed to .broken-*, and with no clear culprit it falls back to safe mode).",
576
578
  safetyModeSwitch: "Switch managed / observer",
577
579
  safetySwitchFailed: "Action failed",
578
580
  safetyFrameworkTitle: "Framework version",
@@ -5000,7 +5002,7 @@ setMessage(t("failed") + ":" + (data?.reason ?? "未知"));
5000
5002
  el("div", { style: { fontSize: "12px", opacity: .7, marginTop: "2px" } }, (mode === "observer" ? t("safetyModeObserverShort") : t("safetyModeManagedShort")) + " · " + fw + (pending > 0 ? " · " + fill(t("safetyBackfillShort"), [["n", pending]]) : ""))),
5001
5003
  el("span", { style: { opacity: .5, flex: "0 0 auto", transform: open ? "rotate(90deg)" : "none", transition: "transform .2s cubic-bezier(.34,1.56,.64,1)" } }, el("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }, el("path", { d: "M9 6l6 6-6 6" }))));
5002
5004
  const panel = el("div", { className: "pc-safety-panel", style: { marginTop: "8px", padding: "8px", borderRadius: "12px", border: "1px solid var(--dsw-alias-border-secondary, rgba(127,127,127,.18))", background: "var(--dsw-alias-bg-layer-4, rgba(127,127,127,.10))", display: "flex", flexDirection: "column", gap: "4px" } },
5003
- row("shield", t("safetyMode"), mode === "observer" ? t("safetyModeObserver") : t("safetyModeManaged") + (status !== null && typeof status.modeReason === "string" && status.modeReason !== "" ? "(" + status.modeReason + ")" : ""), sw(mode === "observer", () => switchMode(mode === "observer" ? "managed" : "observer"), t("safetyModeSwitch"))),
5005
+ row("shield", t("safetyMode") + " · " + t("safetyModeNote"), mode === "observer" ? t("safetyModeObserver") : t("safetyModeManaged") + (status !== null && typeof status.modeReason === "string" && status.modeReason !== "" ? "(" + status.modeReason + ")" : ""), sw(mode === "observer", () => switchMode(mode === "observer" ? "managed" : "observer"), t("safetyModeSwitch"))),
5004
5006
  row("pin", t("safetyFrameworkTitle"), fill(t("safetyFrameworkDesc"), [["v", fw]])),
5005
5007
  row("back", t("safetyRollbackTitle"), rb.applicable === true ? fill(t("safetyRollbackOk"), [["from", rb.from], ["to", rb.to]]) : fill(t("safetyRollbackNone"), [["reason", rb.reason === null || rb.reason === undefined ? "-" : rb.reason]])),
5006
5008
  row("scan", t("safetyFpTitle"), fp.changed === true ? fill(t("safetyFpChanged"), [["reasons", (fp.reasons || []).join(";")]]) : t("safetyFpStable"), fp.changed === true ? el("button", { type: "button", className: styles.toggle, onClick: ack, disabled: busy }, t("safetyFpAck")) : null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noob-stupid/dsh-plugin-console",
3
- "version": "0.5.8",
3
+ "version": "0.5.10",
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",