@noob-stupid/dsh-plugin-console 0.3.24 → 0.3.26
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 +117 -7
- package/README.zh.md +105 -7
- package/lib/client.js +474 -68
- package/lib/index.js +899 -69
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,13 +20,16 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
> ## 🎉 v0.3.
|
|
23
|
+
> ## 🎉 v0.3.25 released — framework-upgrade safety & plugin adapt gate (2026-09-04)
|
|
24
24
|
>
|
|
25
|
-
>
|
|
26
|
-
>
|
|
27
|
-
>
|
|
28
|
-
>
|
|
29
|
-
>
|
|
25
|
+
> **Upgrade safety trio**: framework root detection (fixes the `.pnpm` realpath
|
|
26
|
+
> mixed-version root cause), a **full-tree checkpoint** before upgrade, and
|
|
27
|
+
> **automatic full-tree rollback** on install/relaunch failure — plus a
|
|
28
|
+
> **one-click rollback** button on the framework card.
|
|
29
|
+
> **Plugin adapt gate**: plugins incompatible with the new framework are
|
|
30
|
+
> force-disabled (enable locked); 「Check update → Update & adapt」auto-verifies
|
|
31
|
+
> declarations/dependencies and unlocks on success; AI Empower pre-checks
|
|
32
|
+
> framework compatibility during planning.
|
|
30
33
|
>
|
|
31
34
|
> **Install:**
|
|
32
35
|
> ```bash
|
|
@@ -81,13 +84,59 @@ auto-rollback).
|
|
|
81
84
|
|
|
82
85
|
| | Benefit | Detail |
|
|
83
86
|
|---|---|---|
|
|
87
|
+
| 🤖 | **AI Empower (v0.3.24)** | Give the console a package name or GitHub repo — the local AI reads docs, drafts a **deployment plan** (install / write config / start service / health check) and executes it safely after your confirmation; server-type components get an automatic control card |
|
|
88
|
+
| 🛡️ | **Framework upgrade safety & adapt gate (v0.3.25)** | Force-disables plugins incompatible with the new framework (enable locked; 「Check update → Update & adapt」auto-verifies and unlocks); full-tree checkpoint before upgrade, automatic rollback on relaunch failure, one-click rollback to the previous version |
|
|
89
|
+
| 🚀 | **Server component cards** | Left-side floating card auto-aligned to the main panel: start / stop / status / **open Web UI** buttons, multi-server dropdown, collapsible |
|
|
84
90
|
| 🧩 | **Plugin & skill hub** | Auto-collected index of `dsh-plugin` topic repos (**500+** by stars) plus a **Skills tab** (`agent-skills` ∪ `claude-skills` ∪ `dsh-skill`, up to 300) — browse, search, one-click install, no GitHub API calls |
|
|
85
91
|
| 🤖 | **Auto-collection CI** | GitHub Actions reruns `build-index` every 6 hours (manual trigger available); authors just add the `dsh-plugin` / `agent-skills` / `claude-skills` / `dsh-skill` topic — no application needed |
|
|
86
92
|
| ⚡ | **Instant, rate-limit-free** | The index is served as a static `marketplace/index.json` via jsDelivr CDN (10-min host cache); terminal users make **zero GitHub API calls** |
|
|
87
|
-
| 🔄 | **Version detection & one-click update** |
|
|
93
|
+
| 🔄 | **Version detection & one-click update** | Semver-based; installed entries match npm `dist-tags.latest` / `beta`; subpackage mismatch warnings prevent mixed-version breakage |
|
|
88
94
|
| 🔀 | **Multi-source** | GitHub / Gitee (direct-repo mode) / custom search sources (URL template + header auth + private http); `⊞` merges GitHub + all custom sources in parallel |
|
|
89
95
|
| 🔒 | **Safe by default** | Loopback-only routes; AI fallback behind an explicit cost-consent modal; infrastructure rows are toggle-protected |
|
|
90
96
|
|
|
97
|
+
<details>
|
|
98
|
+
<summary><b>📑 目录 / Table of Contents</b></summary>
|
|
99
|
+
|
|
100
|
+
- [Highlights](#highlights)
|
|
101
|
+
- [AI 赋能与服务器组件控制](#ai-赋能与服务器组件控制)
|
|
102
|
+
- [One-click install](#one-click-install)
|
|
103
|
+
- [Usage](#usage)
|
|
104
|
+
- [Features](#features)
|
|
105
|
+
- [How it works](#how-it-works)
|
|
106
|
+
- [Compatibility](#compatibility)
|
|
107
|
+
- [Project layout](#project-layout)
|
|
108
|
+
- [HTTP endpoints](#http-endpoints)
|
|
109
|
+
- [Security](#security)
|
|
110
|
+
- [Known limitations](#known-limitations)
|
|
111
|
+
- [Help & Ecosystem](#help--ecosystem)
|
|
112
|
+
- [Contributing](#contributing)
|
|
113
|
+
- [Changelog](#changelog)
|
|
114
|
+
- [License](#license)
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## AI 赋能与服务器组件控制
|
|
120
|
+
|
|
121
|
+
> **AI Empower** — v0.3.24 正式版核心功能。
|
|
122
|
+
|
|
123
|
+
在插件控制台输入 **npm 包名或 GitHub 仓库**(如 `OpenViking`、`@noob-stupid/dsh-plugin-console`):
|
|
124
|
+
|
|
125
|
+
1. **AI 读文档出计划**:子代理调研 README/docs,产出结构化计划(类型:纯插件 / 服务器组件 / 仅配置;步骤:安装 / 写配置 / 下载 / 启动服务 / 健康检查);
|
|
126
|
+
2. **你确认**(计划在弹窗里逐步骤勾选)——安全护栏:命令/路径白名单、破坏性命令拦截、日志脱敏;
|
|
127
|
+
3. **安全执行**:实时回显日志、可中断、幂等(已装/已下载/服务健康则复用);
|
|
128
|
+
4. **自动生成组件卡片**:服务器类组件注册到组件清单,卡片出现在主面板左侧(启动/停止/状态/【打开】直达 Web UI;多服务器时 ▾ 下拉;打开详情时自动隐藏;可折叠并有状态记忆)。
|
|
129
|
+
|
|
130
|
+
**内置 OpenViking 模板**:输入 `OpenViking` 秒出计划(pip 装 `openviking[local-embed]` → 下载中文嵌入模型 → 写 `ov.conf`(复用 DSH 的 DeepSeek 凭据,支持独立区块覆盖)→ 启动服务器 → 健康检查)。
|
|
131
|
+
|
|
132
|
+
**模型配置**:默认跟随 DSH(`settings.yaml` + `.credentials.yaml`);可建 `~/.dsh/plugin-console/ai-empower.json` 独立覆盖:
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{ "vlm": { "provider": "openai", "api_base": "https://api.deepseek.com", "model": "deepseek-v4-flash-vision-exp" }, "api_key": "sk-..." }
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
91
140
|
> **For plugin authors**: add the `dsh-plugin` topic to your repo — the official
|
|
92
141
|
> [topic list](https://github.com/topics/dsh-plugin) is how both the ecosystem and this
|
|
93
142
|
> hub discover you. For skills, add `agent-skills` / `claude-skills` / `dsh-skill`.
|
|
@@ -201,6 +250,47 @@ Requires: DSH ≥ 0.1.0-rc.6 (web profile, with `dsh-client-modules` / `dsh-host
|
|
|
201
250
|
- **Card dismiss semantics**: terminal states (done/failed) are permanently dismissed on ✕
|
|
202
251
|
(persisted); in-progress dismissal is session-only and the card returns after a refresh.
|
|
203
252
|
|
|
253
|
+
### Framework upgrade safety & plugin adapt gate (v0.3.25)
|
|
254
|
+
|
|
255
|
+
> Origin: the 2026-09-04 DSH `0.1.1-rc.2 → 0.1.2-rc.1` incident — the upgrade script ran in
|
|
256
|
+
> the wrong working directory, overwrote the new CLI into the old `.pnpm` entry, left a
|
|
257
|
+
> mixed-version tree, and the service could not start. This version makes upgrade safety
|
|
258
|
+
> and plugin compatibility detection first-class console mechanisms.
|
|
259
|
+
|
|
260
|
+
**Upgrade safety trio**
|
|
261
|
+
|
|
262
|
+
1. **Framework root detection**: locates the real install root (the top-level `node_modules`
|
|
263
|
+
containing `.pnpm`), fixing the `require.resolve`-returns-`.pnpm`-realpath root cause
|
|
264
|
+
(relink no-op / new package overwriting the old tree); refuses to upgrade when the root
|
|
265
|
+
cannot be identified (service stays running);
|
|
266
|
+
2. **Full-tree checkpoint before upgrade**: mirrors every `@deepseek-ai` version package in
|
|
267
|
+
`.pnpm` + the top-level scope + `lock.yaml`
|
|
268
|
+
(under `~/.dsh/plugin-console/framework-backups/<version>/fw-tree/`);
|
|
269
|
+
3. **Automatic full-tree rollback + retry**: install failure or relaunch failure restores
|
|
270
|
+
the pre-upgrade tree and relaunches automatically — no more "please run it manually"
|
|
271
|
+
dead-ends; after rollback, relink/repair steps are skipped to avoid damaging the
|
|
272
|
+
restored tree a second time.
|
|
273
|
+
|
|
274
|
+
**One-click rollback**: after an upgrade the framework card shows a **「回滚到上一版」** button
|
|
275
|
+
(`/plugin-console/framework-rollback`): stop service → restore full tree → relaunch →
|
|
276
|
+
health check, state visible throughout.
|
|
277
|
+
|
|
278
|
+
**Plugin adapt gate (compatibility detection)**
|
|
279
|
+
|
|
280
|
+
- After an upgrade, plugin entries recorded in `~/.dsh/plugin-console/compat-pending.json`
|
|
281
|
+
are **force-disabled**; the enable button is locked and the server rejects `/toggle` with
|
|
282
|
+
409 (unbypassable). The enabled-button label itself shows「待适配」as the state hint;
|
|
283
|
+
- The **details** panel explains the flow: **Check update → Update & adapt**;
|
|
284
|
+
- **Post-update auto-verification**: scans the latest `package.json` for an explicit
|
|
285
|
+
`dsh.engines.framework` / `engines.dsh` declaration plus `@deepseek-ai/*` dependency
|
|
286
|
+
ranges (built-in zero-dependency semver engine — strict npm prerelease rules for
|
|
287
|
+
dependencies, loose for explicit declarations); if the version changed and no
|
|
288
|
+
incompatibility was found, the `disabled` block is **removed automatically** and the row
|
|
289
|
+
unlocks; aggregator updates validate all synced subpackages too;
|
|
290
|
+
- **AI Empower pre-check**: during planning the server pre-checks the registry's latest
|
|
291
|
+
declaration and adapt-gate hits, injects them into the subagent prompt (the plan must
|
|
292
|
+
explain the conclusion to the user) and marks it on the plan panel (red for incompatible).
|
|
293
|
+
|
|
204
294
|
### Marketplace (multi-source)
|
|
205
295
|
|
|
206
296
|
- **Source switcher**: click the login pill to switch between **GitHub / Gitee / custom
|
|
@@ -304,6 +394,10 @@ GitHub Actions (every 6h, repo token)
|
|
|
304
394
|
- Supports the **DSH 0.1.0 series** (`0.1.0-rc.6` and siblings).
|
|
305
395
|
- The panel reads the running `@deepseek-ai/dsh-web-app` version: after a breaking upgrade
|
|
306
396
|
(0.2 / 1.0) a compatibility warning appears instead of silent failure.
|
|
397
|
+
- **Plugin adapt gate (v0.3.25)**: third-party plugins incompatible with the current
|
|
398
|
+
framework are force-disabled after an upgrade (enable locked); run 「Check update」to
|
|
399
|
+
upgrade the plugin first — it unlocks automatically after the auto-verification passes.
|
|
400
|
+
See 「Framework upgrade safety & plugin adapt gate」.
|
|
307
401
|
- Likely breaking seams: patch semantics, `webServer.register`, loader entry shape,
|
|
308
402
|
`dsh.client` bundle format, `settings.plugins.tab` slot.
|
|
309
403
|
- Deploy scripts do not check versions; the in-panel warning is authoritative.
|
|
@@ -345,6 +439,11 @@ test-harness.mjs Logic self-test (state/toggle/validation/loopback; search SKI
|
|
|
345
439
|
| `/plugin-console/gitee-oauth-url` / `gitee-oauth-callback` | GET | Gitee OAuth flow |
|
|
346
440
|
| `/plugin-console/ai-consent` | POST | Approve/cancel the AI-fallback step |
|
|
347
441
|
| `/plugin-console/restart` | POST | Watchdog-safe self-restart (panel button equivalent) |
|
|
442
|
+
| `/plugin-console/framework-upgrade` | POST | One-click framework upgrade (full-tree checkpoint → online install → rollback protection) |
|
|
443
|
+
| `/plugin-console/framework-rollback` | POST | One-click rollback to the previous version (stop → full-tree restore → auto relaunch → health check) |
|
|
444
|
+
| `/plugin-console/self-update` | POST | Update the console itself (latest npm tarball into the profile) |
|
|
445
|
+
| `/plugin-console/ai-empower/plan` / `status` / `run` / `cancel` | POST | AI Empower: plan (with framework compat pre-check) → status polling → confirmed run → cancel |
|
|
446
|
+
| `/plugin-console/components` / `component/start` / `stop` / `status` | GET/POST | Server component registry and start/stop/status |
|
|
348
447
|
|
|
349
448
|
---
|
|
350
449
|
|
|
@@ -470,6 +569,17 @@ If this panel saves you time or makes DSH more fun to use:
|
|
|
470
569
|
|
|
471
570
|
---
|
|
472
571
|
|
|
572
|
+
## Contributing
|
|
573
|
+
|
|
574
|
+
Contributions of all kinds are welcome — issues, PRs, docs, translations.
|
|
575
|
+
|
|
576
|
+
- **Guidelines**: [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
577
|
+
- **Code of Conduct**: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
|
|
578
|
+
- **Security policy**: [SECURITY.md](SECURITY.md) (report vulnerabilities privately)
|
|
579
|
+
- **Issue templates**: bug reports & feature requests via the [new issue](https://github.com/Noob-stupid/dsh-plugin-hub/issues/new/choose) page
|
|
580
|
+
|
|
581
|
+
---
|
|
582
|
+
|
|
473
583
|
## Changelog
|
|
474
584
|
|
|
475
585
|
See [CHANGELOG.md](CHANGELOG.md).
|
package/README.zh.md
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
# DSH 插件中心(dsh-plugin-hub)
|
|
8
8
|
|
|
9
|
-
> ## 🎉 v0.3.
|
|
9
|
+
> ## 🎉 v0.3.25 正式发布 — 框架升级安全与插件适配门(2026-09-04)
|
|
10
10
|
>
|
|
11
|
-
>
|
|
12
|
-
>
|
|
13
|
-
>
|
|
11
|
+
> **升级安全三件套**:框架安装根识别(修复 `.pnpm` realpath 混版本根因)、升级前**全树 checkpoint**、
|
|
12
|
+
> 拉起失败**自动全树回滚**;升级后框架卡片**一键回滚到上一版**。
|
|
13
|
+
> **插件适配门**:升级后不兼容插件强制禁用(启用锁定),「检测更新 → 更新并适配」→
|
|
14
|
+
> 自动校验声明/依赖,通过即解锁;AI 赋能规划时自动预检框架适配并给出说明。
|
|
14
15
|
>
|
|
15
16
|
> **安装:**
|
|
16
17
|
> ```bash
|
|
@@ -74,12 +75,58 @@
|
|
|
74
75
|
|
|
75
76
|
| | 优势 | 说明 |
|
|
76
77
|
|---|---|---|
|
|
77
|
-
|
|
|
78
|
+
| 🤖 | **AI 赋能(v0.3.24)** | 输入 npm 包名 / GitHub 仓库,本地 AI 读文档生成**部署计划**(安装/写配置/启动服务/健康检查),你确认后安全执行;服务器类组件自动生成控制卡片 |
|
|
79
|
+
| 🛡️ | **框架升级适配门与安全(v0.3.25)** | 升级后不兼容插件强制禁用(适配门锁定,「检测更新 → 更新并适配 → 自动校验解锁」);升级前全树 checkpoint、拉起失败自动全树回滚、框架卡片一键回滚到上一版 |
|
|
80
|
+
| 🚀 | **服务器组件卡片** | 左侧浮卡与主面板顶边对齐:启动 / 停止 / 状态 / 【打开】直达 Web UI,多服务器下拉、可折叠(状态记忆) |
|
|
81
|
+
| 🧩 | **插件 + 技能双市场** | 自动收录 `dsh-plugin` topic 仓库(按 star **500+**),另有**技能 tab**(`agent-skills` ∪ `claude-skills` ∪ `dsh-skill`,最多 300)——浏览、搜索、一键安装,零 GitHub API 调用;插件自带技能(如 openviking-memory)只读展示 |
|
|
78
82
|
| 🤖 | **自动收录 CI** | GitHub Actions 每 6 小时自动重跑 `build-index`(也支持手动触发);作者只需给自己的仓库打 `dsh-plugin` / `agent-skills` / `claude-skills` / `dsh-skill` 标签,**无需申请、无需审核** |
|
|
79
83
|
| ⚡ | **秒开、零限流** | 索引以静态 `marketplace/index.json` 提交仓库,经 jsDelivr CDN 分发(宿主 10 分钟缓存)——终端用户**零 GitHub API 调用、零限流** |
|
|
80
|
-
| 🔄 | **版本检测与一键更新** |
|
|
84
|
+
| 🔄 | **版本检测与一键更新** | semver 比较 + beta/next 识别(本地已是测试版最新时不误报);已安装条目自动比对 npm `dist-tags`,聚合包子包版本不配套时给出 depsOutdated 提示 |
|
|
81
85
|
| 🔀 | **多源检索** | GitHub / Gitee(仓库直装模式)/ 自定义搜索源(URL 模板 + 请求头认证 + 私网 http);「⊞」并行合并 GitHub + 全部自定义源 |
|
|
82
|
-
| 🔒 | **安全默认** | 全部路由仅环回;AI
|
|
86
|
+
| 🔒 | **安全默认** | 全部路由仅环回;AI 兜底置于明确费用授权弹窗之后;AI 赋能执行器命令/路径白名单;基础设施行禁止开关(受保护) |
|
|
87
|
+
|
|
88
|
+
<details>
|
|
89
|
+
<summary><b>📑 目录</b></summary>
|
|
90
|
+
|
|
91
|
+
- [核心优势](#核心优势)
|
|
92
|
+
- [AI 赋能与服务器组件控制](#ai-赋能与服务器组件控制)
|
|
93
|
+
- [一键部署](#一键部署)
|
|
94
|
+
- [使用方法](#使用方法)
|
|
95
|
+
- [功能](#功能)
|
|
96
|
+
- [原理](#原理)
|
|
97
|
+
- [兼容性策略](#兼容性策略)
|
|
98
|
+
- [项目结构](#项目结构)
|
|
99
|
+
- [HTTP 接口](#http-接口)
|
|
100
|
+
- [安全说明](#安全说明)
|
|
101
|
+
- [已知限制](#已知限制)
|
|
102
|
+
- [帮助 / Help](#帮助--help)
|
|
103
|
+
- [生态与收录](#生态与收录)
|
|
104
|
+
- [参与贡献](#参与贡献)
|
|
105
|
+
- [许可证](#许可证)
|
|
106
|
+
</details>
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## AI 赋能与服务器组件控制
|
|
111
|
+
|
|
112
|
+
> **AI 赋能** — v0.3.24 正式版核心功能。
|
|
113
|
+
|
|
114
|
+
在插件控制台输入 **npm 包名或 GitHub 仓库**(如 `OpenViking`、`@noob-stupid/dsh-plugin-console`):
|
|
115
|
+
|
|
116
|
+
1. **AI 读文档出计划**:子代理调研 README/docs,产出结构化计划(类型:纯插件 / 服务器组件 / 仅配置;步骤:安装 / 写配置 / 下载 / 启动服务 / 健康检查);
|
|
117
|
+
2. **你确认**(计划弹窗里逐步骤勾选)——安全护栏:命令/路径白名单、破坏性命令拦截、日志脱敏;
|
|
118
|
+
3. **安全执行**:实时回显日志、可中断、幂等(已装 / 已下载 / 服务健康则复用);
|
|
119
|
+
4. **自动生成组件卡片**:服务器类组件注册到组件清单,卡片出现在主面板左侧(启动/停止/状态/【打开】直达 Web UI;多服务器时 ▾ 下拉;打开详情时自动隐藏;可折叠并有状态记忆)。
|
|
120
|
+
|
|
121
|
+
**内置 OpenViking 模板**:输入 `OpenViking` 秒出计划(pip 装 `openviking[local-embed]` → 下载中文嵌入模型 → 写 `ov.conf`(复用 DSH 的 DeepSeek 凭据)→ 启动服务器 → 健康检查)。
|
|
122
|
+
|
|
123
|
+
**模型配置**:默认跟随 DSH(`settings.yaml` + `.credentials.yaml`);可建 `~/.dsh/plugin-console/ai-empower.json` 独立覆盖:
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{ "vlm": { "provider": "openai", "api_base": "https://api.deepseek.com", "model": "deepseek-v4-flash-vision-exp" }, "api_key": "sk-..." }
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
83
130
|
|
|
84
131
|
> **给插件作者**:给仓库打上 `dsh-plugin` 标签即可被官方 [topic 列表](https://github.com/topics/dsh-plugin)
|
|
85
132
|
> 与本中心自动收录;技能类仓库请打 `agent-skills` / `claude-skills` / `dsh-skill`。
|
|
@@ -182,6 +229,37 @@ git clone https://github.com/Noob-stupid/dsh-plugin-hub /tmp/dsh-plugin-console
|
|
|
182
229
|
- **卡片关闭语义**:终态(成功/失败)点叉号永久关闭(持久化);进行中点叉号仅本次会话
|
|
183
230
|
隐藏,刷新后恢复显示。
|
|
184
231
|
|
|
232
|
+
### 框架升级适配门与升级安全(v0.3.25)
|
|
233
|
+
|
|
234
|
+
> 缘起:2026-09-04 DSH `0.1.1-rc.2 → 0.1.2-rc.1` 升级事故——升级脚本在错误的工作目录执行,
|
|
235
|
+
> 把新 CLI 原位覆盖进旧 `.pnpm` 目录、依赖树混版本,服务无法拉起。本版本把「升级安全」与
|
|
236
|
+
> 「插件兼容检测」固化为控制台机制。
|
|
237
|
+
|
|
238
|
+
**升级安全三件套**
|
|
239
|
+
|
|
240
|
+
1. **框架安装根识别**:定位真正的框架安装根(含 `.pnpm` 的顶层 `node_modules`),修复
|
|
241
|
+
`require.resolve` 返回 `.pnpm` 内部 realpath 导致的「重链空转 / 新包覆盖旧目录」根因;
|
|
242
|
+
定位不到时**拒绝升级**(不 kill 服务、服务保持运行);
|
|
243
|
+
2. **升级前全树 checkpoint**:镜像 `.pnpm` 全部 `@deepseek-ai` 版本包 + 顶层 scope +
|
|
244
|
+
`lock.yaml`(写入 `~/.dsh/plugin-console/framework-backups/<版本>/fw-tree/`);
|
|
245
|
+
3. **拉起失败自动全树回滚并重试**:安装失败或服务拉起失败都会自动恢复升级前全树并再次拉起,
|
|
246
|
+
不再只留「请手动运行」提示;回滚后跳过重链/修复(避免对已恢复旧树二次破坏)。
|
|
247
|
+
|
|
248
|
+
**一键回滚**:升级后框架卡片出现「回滚到上一版」按钮(`/plugin-console/framework-rollback`):
|
|
249
|
+
停服 → 全树恢复 → 自动拉起 → 健康检测,全程状态可见。
|
|
250
|
+
|
|
251
|
+
**插件适配门(插件检测)**
|
|
252
|
+
|
|
253
|
+
- 升级后写入 `~/.dsh/plugin-console/compat-pending.json` 的插件行被**强制禁用**,启用按钮
|
|
254
|
+
锁定(服务端 `/toggle` 直接 409,无法绕过);行状态以按钮文案「待适配」提示;
|
|
255
|
+
- 「详情」面板给出说明与入口:**检测更新 → 更新并适配**;
|
|
256
|
+
- **更新后自动校验**:扫描最新版 `package.json` 的 `dsh.engines.framework` / `engines.dsh`
|
|
257
|
+
显式声明 + `@deepseek-ai/*` 依赖范围(内置零依赖 semver 判定器:依赖判定遵循 npm
|
|
258
|
+
prerelease 严格规则、声明判定宽松);版本已变化且未判定不兼容 → **自动移除禁用块解锁**;
|
|
259
|
+
聚合包更新连带校验同步的子包;
|
|
260
|
+
- **AI 赋能适配预检**:规划时服务端预检 registry 最新版声明与适配门命中情况,注入子代理
|
|
261
|
+
提示词(要求计划向用户解释适配结论),并在计划面板标注(不兼容标红)。
|
|
262
|
+
|
|
185
263
|
### 插件市场(多搜索源)
|
|
186
264
|
|
|
187
265
|
- **搜索源切换**:点击顶部登录态标识弹出菜单,在 **GitHub / Gitee / 自定义源** 间切换(选择持久化);
|
|
@@ -278,6 +356,9 @@ GitHub Actions(每 6 小时,仓库自带 token)
|
|
|
278
356
|
- 当前支持 **DSH 0.1.0 系列**(`0.1.0-rc.6` 及同系列版本)。
|
|
279
357
|
- 面板会读取运行中的 `@deepseek-ai/dsh-web-app` 版本:官方发布破坏性升级
|
|
280
358
|
(0.2 / 1.0 等)后,面板顶部会显示兼容性警告并给出本仓库地址,而不是默默失效。
|
|
359
|
+
- **插件适配门(v0.3.25)**:框架升级后不兼容的第三方插件会被**强制禁用**(启用按钮锁定);
|
|
360
|
+
请先「检测更新」升级该插件,更新并通过自动校验后才会解锁——详见
|
|
361
|
+
「框架升级适配门与升级安全」。
|
|
281
362
|
- 官方破坏性更新可能改动的接口:补丁层语义、`webServer.register`、
|
|
282
363
|
加载器条目结构、`dsh.client` bundle 格式、`settings.plugins.tab` 插槽。
|
|
283
364
|
届时随官方版本更新本仓库即可(依赖面已收窄到上述几个点)。
|
|
@@ -296,6 +377,7 @@ scripts/apply-framework-patch.cjs 框架层补丁(issue #5,幂等,可重
|
|
|
296
377
|
marketplace/index.json 生成的静态索引(jsDelivr CDN 分发)
|
|
297
378
|
deploy.ps1 / deploy.sh 一键部署脚本(Windows / Linux·macOS)
|
|
298
379
|
test-harness.mjs 逻辑自检(state/toggle/校验/环回保护;搜索视网络环境 SKIP)
|
|
380
|
+
test-compat-gate.mjs 适配门单元测试(内置 semver 判定器:声明/依赖兼容规则)
|
|
299
381
|
```
|
|
300
382
|
<img width="1878" height="945" alt="image" src="https://github.com/user-attachments/assets/b26f2f19-0ba4-4be7-9ca1-b3fd4c51a7a8" />
|
|
301
383
|
|
|
@@ -320,6 +402,11 @@ test-harness.mjs 逻辑自检(state/toggle/校验/环回保护;搜索视
|
|
|
320
402
|
| `/plugin-console/gitee-oauth-url` / `gitee-oauth-callback` | GET | Gitee OAuth 流程 |
|
|
321
403
|
| `/plugin-console/ai-consent` | POST | 同意/取消 AI 兜底步骤 |
|
|
322
404
|
| `/plugin-console/restart` | POST | 自带守护的安全自重启(等同面板按钮) |
|
|
405
|
+
| `/plugin-console/framework-upgrade` | POST | 框架一键升级(全树 checkpoint → 在线安装 → 全树回滚保护) |
|
|
406
|
+
| `/plugin-console/framework-rollback` | POST | 一键回滚到升级前版本(停服 → 全树恢复 → 自动拉起 → 健康检测) |
|
|
407
|
+
| `/plugin-console/self-update` | POST | 控制台自身一键更新(npm 最新 tarball 到当前 profile) |
|
|
408
|
+
| `/plugin-console/ai-empower/plan` / `status` / `run` / `cancel` | POST | AI 赋能:规划(含框架适配预检)→ 状态轮询 → 确认执行 → 取消 |
|
|
409
|
+
| `/plugin-console/components` / `component/start` / `stop` / `status` | GET/POST | 服务器组件清单与启动/停止/状态 |
|
|
323
410
|
|
|
324
411
|
---
|
|
325
412
|
|
|
@@ -423,6 +510,17 @@ node scripts/apply-framework-patch.cjs
|
|
|
423
510
|
|
|
424
511
|
---
|
|
425
512
|
|
|
513
|
+
## 参与贡献
|
|
514
|
+
|
|
515
|
+
欢迎各种形式的贡献——Issue、PR、文档、翻译:
|
|
516
|
+
|
|
517
|
+
- **贡献指南**:[CONTRIBUTING.md](CONTRIBUTING.md)
|
|
518
|
+
- **行为准则**:[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
|
|
519
|
+
- **安全政策**:[SECURITY.md](SECURITY.md)(漏洞私下报告)
|
|
520
|
+
- **Issue 模板**:从 [新建 Issue](https://github.com/Noob-stupid/dsh-plugin-hub/issues/new/choose) 页面选择 Bug / 功能建议
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
426
524
|
## 更新日志
|
|
427
525
|
|
|
428
526
|
版本记录见 [CHANGELOG.md](CHANGELOG.md)。
|