feat(plugin-inventory): guard critical plugins from enable/disable
Every entry now carries a protected flag. The guard is default-protect: disabling a plugin another plugin injects breaks the dependent, and enabling one whose service is unavailable fails the boot (dsh-tool-ralph: pending on workflowEngine). setEnabled refuses and the UI hides the toggle for every shipped plugin; only opt-in-bundle plugins (USER_TOGGLEABLE_PLUGINS in required.ts) are toggleable. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write .agents/notes/implemented/feature/2026-08-14-plugin-enable-disable-in-page.md
|
||||
2026-08-14-plugin-enable-disable-in-page.md: 18e3ce19da7e23f10a9fd9a79bbbcc907378065a
|
||||
2026-08-14-plugin-enable-disable-in-page.zh.md: 4726f39a04d8157759f2d67553f04d749c601ba7
|
||||
2026-08-14-plugin-enable-disable-in-page.md: 10560799d5543a3622e0a8d751012066ca36512a
|
||||
2026-08-14-plugin-enable-disable-in-page.zh.md: 988b9f8fad9216f358e39966767e2e0649715a43
|
||||
|
||||
@@ -35,6 +35,14 @@ patch's `applyEntryPatches` target lookup.
|
||||
The Web plugin-list tab (`ui-settings-plugin-inventory`) adds an enable/disable
|
||||
button to each expanded card, wired to the Remote, re-listing after the toggle.
|
||||
|
||||
**Guard:** every entry carries a `protected` flag. The rule is default-protect —
|
||||
disabling a plugin that another plugin injects breaks the dependent, and
|
||||
enabling one whose service is unavailable fails the boot (both surfaced as
|
||||
`dsh-tool-ralph: pending (waiting for service: workflowEngine)` after a bad
|
||||
toggle). So `setEnabled` refuses and the UI hides the toggle for every shipped
|
||||
plugin; only plugins added through an opt-in bundle (`USER_TOGGLEABLE_PLUGINS`
|
||||
in `src/required.ts`) are toggleable.
|
||||
|
||||
## Persistence caveat
|
||||
|
||||
A runtime toggle alone does not survive a restart for a row enabled by a bundle
|
||||
|
||||
@@ -28,6 +28,12 @@ Web UI 的插件列表是只读的:它展示 Loader 的条目和生命周期
|
||||
Web 插件列表 tab(`ui-settings-plugin-inventory`)在每张展开卡片的详情区加启用/停用按钮,
|
||||
绑定该 Remote,切换后重新拉取列表。
|
||||
|
||||
**门卫:** 每条条目带 `protected` 标记。规则默认保护——停用一个被其他插件注入的插件会破坏
|
||||
依赖者,启用一个服务不可用的插件会导致启动失败(坏切换后都会表现为
|
||||
`dsh-tool-ralph: pending (waiting for service: workflowEngine)`)。所以 `setEnabled`
|
||||
拒绝、UI 隐藏所有随包插件的开关;只有通过 opt-in bundle 添加的插件
|
||||
(`src/required.ts` 的 `USER_TOGGLEABLE_PLUGINS`)可切换。
|
||||
|
||||
## 持久化注意
|
||||
|
||||
仅运行时 toggle 对由 bundle patch 启用的行不持久,因为 `Entry.update` 写回的是补丁后的整棵树,
|
||||
|
||||
Reference in New Issue
Block a user