@noob-stupid/dsh-plugin-console 0.5.9 → 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 +8 -0
- package/README.zh.md +8 -0
- package/lib/client.js +11 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -268,6 +268,14 @@ 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.
|
|
271
279
|
## Framework compatibility
|
|
272
280
|
|
|
273
281
|
Measured on isolated instances (fresh `DSH_HOME`, real HTTP probes) — **supported: framework ≥ `0.1.5-rc.2`**, no workarounds needed.
|
package/README.zh.md
CHANGED
|
@@ -210,6 +210,14 @@ 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-*`;找不到明确肇事者则进安全模式先让服务起来)。**起不来的控制台什么都门控不了** —— 所以这条救火链路永远生效。
|
|
213
221
|
## 框架兼容性
|
|
214
222
|
|
|
215
223
|
在隔离实例(全新 `DSH_HOME` + 真实 HTTP 探针)实测:**支持框架 ≥ `0.1.5-rc.2`**,无需任何变通。
|
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 (
|
|
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.
|
|
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",
|