@noob-stupid/dsh-plugin-console 0.3.27 → 0.3.29

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
@@ -18,139 +18,23 @@
18
18
  [![GitHub Release](https://img.shields.io/github/v/release/Noob-stupid/dsh-plugin-hub?style=flat-square)](https://github.com/Noob-stupid/dsh-plugin-hub/releases)[![dsh.so security](https://www.dsh.so/badge/dsh-plugin-hub.svg)](https://www.dsh.so/artifact/dsh-plugin-hub)
19
19
  [![dsh.so install](https://www.dsh.so/badge/install/dsh-plugin-hub.svg)](https://www.dsh.so/artifact/dsh-plugin-hub)
20
20
 
21
+ > Manage all your DeepSeek Harness plugins in one panel: one-click enable/disable,
22
+ > a 500+ plugin & skill marketplace with one-click install, and one-click framework
23
+ > upgrade with auto-rollback.
21
24
 
25
+ ## Why DSH Plugin Hub
22
26
 
23
- > ## 🎉 v0.3.27 released — family-bundle cards, never-crash safety & adapt-gate hardening (2026-09-04)
24
- >
25
- > **Family-bundle cards**: same-root subpath exports (e.g. `@linxin666/dsh-web-all/settings`) auto-group
26
- > into one family card at the bottom — collapse/expand, batch check-updates, **one-click unlock-adapted**,
27
- > known-check preview, `web-all/`-prefix-free sub-cards.
28
- > **Never-crash safety**: pre-enable import probe (child-process) + patch auto-heal (core-row restore &
29
- > missing-module auto-disable) + exports-fallback `package.json` resolution — the memory-plugin
30
- > false-disable incident is fixed.
31
- > **Adapt-gate hardening**: source-scan hard criterion (post-0.3.6 false-pass), migrate detection
32
- > (`dsh.migrate.to`), softened dependency-strict judgment, pending hints moved into details.
33
- > **Safe sub-package delete**: deleting a bundle sub-row disables only that row and keeps the bundle —
34
- > fixing the incident where deleting one sub-package removed the whole family bundle.
35
- >
36
- > **Install:**
37
- > ```bash
38
- > npm i -g @noob-stupid/dsh-plugin-console
39
- > # or in DSH: dsh plugin --profile web add @noob-stupid/dsh-plugin-console
40
- > ```
41
- > **Try it:** Plugin Console → family card at the bottom → 「批量检测更新 / 一键启用已适配」.
42
- >
43
- > Feedback: [GitHub Issues](https://github.com/Noob-stupid/dsh-plugin-hub/issues).
44
- A **plugin management panel** for the DeepSeek Harness (DSH) Web GUI: one-click
45
- enable/disable of installed plugins, a **multi-source plugin marketplace**
46
- (GitHub / Gitee / custom sources) with one-click install, an **auto-collected
47
- static plugin & skill index** refreshed by CI every 6 hours, skill install/disable,
48
- suite one-click assembly, and **one-click framework upgrade** (online install with
49
- auto-rollback).
50
-
51
- > ## 🎯 One-click framework upgrade (v0.3.13 highlight)
52
- >
53
- > Open the "Plugin Console" panel → **Plugin Marketplace** → the
54
- > `deepseek-ai/deepseek-harness` card → click **"Framework Upgrade → vX"**:
55
- > **backup config & framework (rollback point) → online install (service stays up) →
56
- > version verification → auto-rollback on failure → auto-restart**.
57
- >
58
- > After upgrade, framework packages are **auto-relinked** (fixes pnpm top-level link
59
- > staleness that caused mixed versions, e.g. an old model plugin missing vision models).
60
- > Tested: 0.1.0-rc.8 → **0.1.1-rc.2** end-to-end automatic, rollback-safe.
61
-
62
- <!-- TOC -->
63
- - [Highlights](#highlights)
64
- - [One-click install](#one-click-install)
65
- - [Usage](#usage)
66
- - [Features](#features)
67
- - [How it works](#how-it-works)
68
- - [Compatibility](#compatibility)
69
- - [Project layout](#project-layout)
70
- - [HTTP endpoints](#http-endpoints)
71
- - [Local AI fallback & consent dialog](#local-ai-fallback--consent-dialog)
72
- - [Framework patch (cordis.patch.yml parse tolerance)](#framework-patch-cordispatchyml-parse-tolerance)
73
- - [Security](#security)
74
- - [Disclaimer](#disclaimer)
75
- - [Known limitations](#known-limitations)
76
- - [Help](#help)
77
- - [Ecosystem & discoverability](#ecosystem--discoverability)
78
- - [Support](#support)
79
- - [Changelog](#changelog)
80
- - [License](#license)
81
- <!-- /TOC -->
82
-
83
- ---
84
-
85
- ## Highlights
86
-
87
- | | Benefit | Detail |
88
- |---|---|---|
89
- | 🤖 | **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 |
90
- | 🛡️ | **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 |
91
- | 🏠 | **Family-bundle cards & safety (v0.3.27)** | Same-root subpath exports group into one family card (collapse/expand, batch check-update, one-click unlock-adapted, known-check preview); never-crash safety (pre-enable import probe + patch auto-heal + exports fallback); adapt-gate source-scan hard criterion & migrate detection; deleting a bundle sub-row disables only that row |
92
- | 🚀 | **Server component cards** | Left-side floating card auto-aligned to the main panel: start / stop / status / **open Web UI** buttons, multi-server dropdown, collapsible |
93
- | 🧩 | **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 |
94
- | 🤖 | **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 |
95
- | ⚡ | **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** |
96
- | 🔄 | **Version detection & one-click update** | Semver-based; installed entries match npm `dist-tags.latest` / `beta`; subpackage mismatch warnings prevent mixed-version breakage |
97
- | 🔀 | **Multi-source** | GitHub / Gitee (direct-repo mode) / custom search sources (URL template + header auth + private http); `⊞` merges GitHub + all custom sources in parallel |
98
- | 🔒 | **Safe by default** | Loopback-only routes; AI fallback behind an explicit cost-consent modal; infrastructure rows are toggle-protected |
99
-
100
- <details>
101
- <summary><b>📑 目录 / Table of Contents</b></summary>
102
-
103
- - [Highlights](#highlights)
104
- - [AI 赋能与服务器组件控制](#ai-赋能与服务器组件控制)
105
- - [One-click install](#one-click-install)
106
- - [Usage](#usage)
107
- - [Features](#features)
108
- - [How it works](#how-it-works)
109
- - [Compatibility](#compatibility)
110
- - [Project layout](#project-layout)
111
- - [HTTP endpoints](#http-endpoints)
112
- - [Security](#security)
113
- - [Known limitations](#known-limitations)
114
- - [Help & Ecosystem](#help--ecosystem)
115
- - [Contributing](#contributing)
116
- - [Changelog](#changelog)
117
- - [License](#license)
118
- </details>
119
-
120
- ---
121
-
122
- ## AI 赋能与服务器组件控制
123
-
124
- > **AI Empower** — v0.3.24 正式版核心功能。
125
-
126
- 在插件控制台输入 **npm 包名或 GitHub 仓库**(如 `OpenViking`、`@noob-stupid/dsh-plugin-console`):
127
-
128
- 1. **AI 读文档出计划**:子代理调研 README/docs,产出结构化计划(类型:纯插件 / 服务器组件 / 仅配置;步骤:安装 / 写配置 / 下载 / 启动服务 / 健康检查);
129
- 2. **你确认**(计划在弹窗里逐步骤勾选)——安全护栏:命令/路径白名单、破坏性命令拦截、日志脱敏;
130
- 3. **安全执行**:实时回显日志、可中断、幂等(已装/已下载/服务健康则复用);
131
- 4. **自动生成组件卡片**:服务器类组件注册到组件清单,卡片出现在主面板左侧(启动/停止/状态/【打开】直达 Web UI;多服务器时 ▾ 下拉;打开详情时自动隐藏;可折叠并有状态记忆)。
132
-
133
- **内置 OpenViking 模板**:输入 `OpenViking` 秒出计划(pip 装 `openviking[local-embed]` → 下载中文嵌入模型 → 写 `ov.conf`(复用 DSH 的 DeepSeek 凭据,支持独立区块覆盖)→ 启动服务器 → 健康检查)。
134
-
135
- **模型配置**:默认跟随 DSH(`settings.yaml` + `.credentials.yaml`);可建 `~/.dsh/plugin-console/ai-empower.json` 独立覆盖:
136
-
137
- ```json
138
- { "vlm": { "provider": "openai", "api_base": "https://api.deepseek.com", "model": "deepseek-v4-flash-vision-exp" }, "api_key": "sk-..." }
139
- ```
140
-
141
- ---
142
-
143
- > **For plugin authors**: add the `dsh-plugin` topic to your repo — the official
144
- > [topic list](https://github.com/topics/dsh-plugin) is how both the ecosystem and this
145
- > hub discover you. For skills, add `agent-skills` / `claude-skills` / `dsh-skill`.
146
-
147
- ---
148
-
149
- ## One-click install
150
-
151
- ### Option 1: official command (recommended)
27
+ - 🧩 **Plugin & skill hub** — auto-collected index of `dsh-plugin` repos (500+ by
28
+ stars) plus a Skills tab; browse, search, one-click install, **zero GitHub API
29
+ calls** (served via CDN).
30
+ - 🚀 **One-click framework upgrade** — backup → online install (service stays up) →
31
+ verify → **auto-rollback on failure**. Tested end-to-end.
32
+ - 🤖 **AI Empower** — give the console a package name or GitHub repo, the local AI
33
+ reads its docs and drafts a safe, confirmable deployment plan (install / config /
34
+ start / health-check); server components get an automatic control card.
35
+ → [details](docs/ai-empower.md)
152
36
 
153
- The plugin declares a `dsh.bundle` manifest, so a single command installs and enables it:
37
+ ## Install
154
38
 
155
39
  ```sh
156
40
  # npm release (recommended: prebuilt, no git / build authorization needed)
@@ -160,14 +44,9 @@ dsh plugin --profile web add @noob-stupid/dsh-plugin-console
160
44
  dsh plugin --profile web add github:Noob-stupid/dsh-plugin-hub
161
45
  ```
162
46
 
163
- Uninstall / reinstall (update):
164
-
165
- ```sh
166
- dsh plugin --profile web remove @noob-stupid/dsh-plugin-console
167
- dsh plugin --profile web add @noob-stupid/dsh-plugin-console
168
- ```
47
+ Then restart the dsh service → refresh the page → **Settings → Plugins → Plugin Console**.
169
48
 
170
- Then restart the dsh service → refresh the page → Settings → Plugins → Plugin Console.
49
+ <details><summary><b>More install options</b> (deploy script / hand it to an AI)</summary>
171
50
 
172
51
  ### Option 2: deploy script (fallback when network is restricted)
173
52
 
@@ -196,6 +75,45 @@ idempotently appends an enable entry to `cordis.patch.yml`. Afterwards:
196
75
 
197
76
  Requires: DSH ≥ 0.1.0-rc.6 (web profile, with `dsh-client-modules` / `dsh-host-plugin-inventory`).
198
77
 
78
+ </details>
79
+
80
+ ---
81
+
82
+ ## Highlights
83
+
84
+ | | Benefit | Detail |
85
+ |---|---|---|
86
+ | 🤖 | **AI Empower ** | 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 |
87
+ | 🛡️ | **Framework upgrade safety & adapt gate ** | 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 |
88
+ | 🏠 | **Family-bundle cards & safety ** | Same-root subpath exports group into one family card (collapse/expand, batch check-update, one-click unlock-adapted, known-check preview); never-crash safety (pre-enable import probe + patch auto-heal + exports fallback); adapt-gate source-scan hard criterion & migrate detection; deleting a bundle sub-row disables only that row |
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 |
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 |
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 |
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** |
93
+ | 🔄 | **Version detection & one-click update** | Semver-based; installed entries match npm `dist-tags.latest` / `beta`; subpackage mismatch warnings prevent mixed-version breakage |
94
+ | 🔀 | **Multi-source** | GitHub / Gitee (direct-repo mode) / custom search sources (URL template + header auth + private http); `⊞` merges GitHub + all custom sources in parallel |
95
+ | 🔒 | **Safe by default** | Loopback-only routes; AI fallback behind an explicit cost-consent modal; infrastructure rows are toggle-protected |
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
+
199
117
  ---
200
118
 
201
119
  ## Usage
@@ -253,47 +171,6 @@ Requires: DSH ≥ 0.1.0-rc.6 (web profile, with `dsh-client-modules` / `dsh-host
253
171
  - **Card dismiss semantics**: terminal states (done/failed) are permanently dismissed on ✕
254
172
  (persisted); in-progress dismissal is session-only and the card returns after a refresh.
255
173
 
256
- ### Framework upgrade safety & plugin adapt gate (v0.3.25)
257
-
258
- > Origin: the 2026-09-04 DSH `0.1.1-rc.2 → 0.1.2-rc.1` incident — the upgrade script ran in
259
- > the wrong working directory, overwrote the new CLI into the old `.pnpm` entry, left a
260
- > mixed-version tree, and the service could not start. This version makes upgrade safety
261
- > and plugin compatibility detection first-class console mechanisms.
262
-
263
- **Upgrade safety trio**
264
-
265
- 1. **Framework root detection**: locates the real install root (the top-level `node_modules`
266
- containing `.pnpm`), fixing the `require.resolve`-returns-`.pnpm`-realpath root cause
267
- (relink no-op / new package overwriting the old tree); refuses to upgrade when the root
268
- cannot be identified (service stays running);
269
- 2. **Full-tree checkpoint before upgrade**: mirrors every `@deepseek-ai` version package in
270
- `.pnpm` + the top-level scope + `lock.yaml`
271
- (under `~/.dsh/plugin-console/framework-backups/<version>/fw-tree/`);
272
- 3. **Automatic full-tree rollback + retry**: install failure or relaunch failure restores
273
- the pre-upgrade tree and relaunches automatically — no more "please run it manually"
274
- dead-ends; after rollback, relink/repair steps are skipped to avoid damaging the
275
- restored tree a second time.
276
-
277
- **One-click rollback**: after an upgrade the framework card shows a **「回滚到上一版」** button
278
- (`/plugin-console/framework-rollback`): stop service → restore full tree → relaunch →
279
- health check, state visible throughout.
280
-
281
- **Plugin adapt gate (compatibility detection)**
282
-
283
- - After an upgrade, plugin entries recorded in `~/.dsh/plugin-console/compat-pending.json`
284
- are **force-disabled**; the enable button is locked and the server rejects `/toggle` with
285
- 409 (unbypassable). The enabled-button label itself shows「待适配」as the state hint;
286
- - The **details** panel explains the flow: **Check update → Update & adapt**;
287
- - **Post-update auto-verification**: scans the latest `package.json` for an explicit
288
- `dsh.engines.framework` / `engines.dsh` declaration plus `@deepseek-ai/*` dependency
289
- ranges (built-in zero-dependency semver engine — strict npm prerelease rules for
290
- dependencies, loose for explicit declarations); if the version changed and no
291
- incompatibility was found, the `disabled` block is **removed automatically** and the row
292
- unlocks; aggregator updates validate all synced subpackages too;
293
- - **AI Empower pre-check**: during planning the server pre-checks the registry's latest
294
- declaration and adapt-gate hits, injects them into the subagent prompt (the plan must
295
- explain the conclusion to the user) and marks it on the plan panel (red for incompatible).
296
-
297
174
  ### Marketplace (multi-source)
298
175
 
299
176
  - **Source switcher**: click the login pill to switch between **GitHub / Gitee / custom
@@ -343,183 +220,13 @@ The floating "Sources" button (right of the title row, semi-transparent) opens t
343
220
 
344
221
  ---
345
222
 
346
- ## How it works
347
-
348
- ### Toggle semantics
349
-
350
- The DSH web profile is composed of a bundle patch layer plus the user patch layer
351
- (`$DSH_HOME/profiles/web/cordis.patch.yml`); patches are **per-key overrides**.
352
- Toggling a plugin just appends/removes two YAML lines:
353
-
354
- ```yaml
355
- - id: plugin-entry-id
356
- disabled: true
357
- ```
358
-
359
- The config watcher (HMR) recomposes within ~1s — no restart needed except for host code.
360
-
361
- ### Install chain
362
-
363
- ```
364
- configured registries (primary→backup, default npmmirror → npmjs)
365
- → curl manual install (node networking blocked: tarball into node_modules)
366
- → git channel (GitHub via proxy+direct, Gitee via its platform)
367
- → EPERM stale-dir cleanup retry
368
- → repository subpackage expansion (aggregate packages first)
369
- → local AI fallback (behind an explicit cost-consent modal)
370
- ```
371
-
372
- Skills install directly by `git clone --depth 1` → copy SKILL.md bundle into
373
- `~/.dsh/skills/<name>/` (no npm, no patch, no restart).
374
-
375
- ### Data sources
376
-
377
- ```
378
- GitHub Actions (every 6h, repo token)
379
- └─ scripts/build-index.cjs: pages topic:dsh-plugin (500 by stars) + skills topics (300)
380
- └─ commits marketplace/index.json back to main
381
- └─ host reads it via jsDelivr CDN (10-min cache) → instant market, zero API calls
382
- └─ live search still uses the GitHub search API (browser-direct + server channel)
383
- ```
384
-
385
- ### Version detection & installed recognition
386
-
387
- - **Installed recognition**: match installed entries by `repository` field or module name
388
- against market items (repo name → package name mapping);
389
- - **Version detection**: `check-update` reads npm `dist-tags.latest` via curl; for aggregate
390
- packages it also compares subpackage declared vs actual versions (depsOutdated) to prevent
391
- mixed-version startup conflicts.
392
-
393
- ---
394
-
395
- ## Compatibility
396
-
397
- - Supports the **DSH 0.1.0 series** (`0.1.0-rc.6` and siblings).
398
- - The panel reads the running `@deepseek-ai/dsh-web-app` version: after a breaking upgrade
399
- (0.2 / 1.0) a compatibility warning appears instead of silent failure.
400
- - **Plugin adapt gate (v0.3.25)**: third-party plugins incompatible with the current
401
- framework are force-disabled after an upgrade (enable locked); run 「Check update」to
402
- upgrade the plugin first — it unlocks automatically after the auto-verification passes.
403
- See 「Framework upgrade safety & plugin adapt gate」.
404
- - Likely breaking seams: patch semantics, `webServer.register`, loader entry shape,
405
- `dsh.client` bundle format, `settings.plugins.tab` slot.
406
- - Deploy scripts do not check versions; the in-panel warning is authoritative.
407
-
408
- ---
409
-
410
- ## Project layout
411
-
412
- ```
413
- lib/index.js Host plugin (/plugin-console/* routes + patch I/O + multi-source search + install)
414
- lib/client.js Browser bundle (ModuleLoader format, settings tab)
415
- scripts/build-index.cjs Index builder (plugins --limit 500 / skills --skills --limit 300)
416
- scripts/apply-framework-patch.cjs Framework patch (issue #5, idempotent)
417
- .github/workflows/registry.yml Auto-collection CI (every 6h + manual dispatch)
418
- marketplace/index.json Generated static index (jsDelivr CDN)
419
- deploy.ps1 / deploy.sh One-click deploy scripts (Windows / Linux·macOS)
420
- test-harness.mjs Logic self-test (state/toggle/validation/loopback; search SKIP by network)
421
- ```
422
- <img width="1878" height="945" alt="image" src="https://github.com/user-attachments/assets/b26f2f19-0ba4-4be7-9ca1-b3fd4c51a7a8" />
423
-
424
- ---
425
-
426
- ## HTTP endpoints
427
-
428
- | Endpoint | Method | Purpose |
429
- |---|---|---|
430
- | `/plugin-console/state` | GET | Plugin list + patch state + compat + running install jobs |
431
- | `/plugin-console/toggle` | POST | Enable/disable an entry (writes user patch layer) |
432
- | `/plugin-console/uninstall` | POST | Remove entry + uninstall package (bundle-aware) |
433
- | `/plugin-console/search` | POST | Multi-source search (github/gitee/custom, `multi` merge) |
434
- | `/plugin-console/repo` | POST | Repo metadata: package.json, private root, dsh hint, **hasSkill** |
435
- | `/plugin-console/enrich` | POST | Server-side type markers (official/aggregate/skill) |
436
- | `/plugin-console/install` | POST | Install (plugin or `kind: skill`), returns a job id |
437
- | `/plugin-console/install-status` | POST | Poll an install job |
438
- | `/plugin-console/check-update` | POST | npm latest version + subpackage mismatch check |
439
- | `/plugin-console/market-index` | POST | Static index (jsDelivr CDN, 10-min cache) |
440
- | `/plugin-console/skills-installed` | GET | Installed skills under `~/.dsh/skills` |
441
- | `/plugin-console/sources` | GET/POST | Registry & search-source manager, Gitee OAuth setup |
442
- | `/plugin-console/gitee-oauth-url` / `gitee-oauth-callback` | GET | Gitee OAuth flow |
443
- | `/plugin-console/ai-consent` | POST | Approve/cancel the AI-fallback step |
444
- | `/plugin-console/restart` | POST | Watchdog-safe self-restart (panel button equivalent) |
445
- | `/plugin-console/framework-upgrade` | POST | One-click framework upgrade (full-tree checkpoint → online install → rollback protection) |
446
- | `/plugin-console/framework-rollback` | POST | One-click rollback to the previous version (stop → full-tree restore → auto relaunch → health check) |
447
- | `/plugin-console/self-update` | POST | Update the console itself (latest npm tarball into the profile) |
448
- | `/plugin-console/ai-empower/plan` / `status` / `run` / `cancel` | POST | AI Empower: plan (with framework compat pre-check) → status polling → confirmed run → cancel |
449
- | `/plugin-console/components` / `component/start` / `stop` / `status` | GET/POST | Server component registry and start/stop/status |
450
-
451
- ---
452
-
453
- ## Local AI fallback & consent dialog
454
-
455
- Installation goes through a **deterministic channel chain**:
456
- `configured sources (primary→backup) → curl manual install → git channel → EPERM cleanup retry
457
- → repository subpackage expansion`. Only when all deterministic channels fail does the
458
- **local AI fallback** take over.
459
-
460
- **What it is**: a local AI subagent takes over the install — it diagnoses like a human
461
- (inspects repo structure, finds subpackages/aggregate packages, cleans leftovers), installs
462
- with the right package manager and writes the config. **Note: this step calls a DeepSeek API
463
- model and may incur API costs.**
464
-
465
- **Consent dialog (cost transparency)**:
466
-
467
- 1. After all deterministic channels fail, the task enters "waiting for authorization" and a
468
- top-most modal appears:
469
- - explicitly states "will call a DeepSeek API model, may incur API costs"
470
- - offers **Approve, continue** / **Cancel** (Cancel = zero cost)
471
- - auto-cancels after 10 minutes
472
- 2. The modal offers **"Don't ask again"** (auto-approve) — restorable at the bottom of the
473
- marketplace page.
474
- 3. The floating **"AI fallback"** toggle can disable the feature entirely: deterministic
475
- failures cancel the install, **never calling a model API (zero cost)**.
476
-
477
- ---
478
-
479
- ## Framework patch (cordis.patch.yml parse tolerance)
480
-
481
- **Problem (issue #5)**: if `cordis.patch.yml` contains a top-level `[]` placeholder plus
482
- later entries (two YAML root nodes), DSH fails at startup:
483
- `end of the stream or a document separator is expected`.
484
-
485
- **Fix location**: `parsePatchList` in the DSH framework `dsh-app-boot` — on parse failure,
486
- top-level empty-array placeholder lines are dropped (treated as no-op) and parsing retries;
487
- normal files, pure `[]` files, and indented sub-arrays are unaffected.
488
-
489
- **Apply** (re-run after every DSH upgrade, which overwrites framework files):
490
-
491
- ```bash
492
- node scripts/apply-framework-patch.cjs
493
- ```
494
-
495
- The script locates `dsh-app-boot/lib/index.js` in the npx cache, skips when already patched
496
- (idempotent), and keeps a `.bak-issue5` backup on first apply.
497
-
498
- ---
499
-
500
- ## Security
501
-
502
- - All routes are loopback-only;
503
- - GitHub metadata is used only to discover public plugins; npm installs keep full TLS
504
- validation against the registry;
505
- - GitHub search is browser-direct; Gitee/custom source requests and headers (including
506
- credentials) are handled server-side only and never shipped to the browser;
507
- - Custom source URLs accept https and local/private http only (127.0.0.1, localhost,
508
- 10.x, 192.168.x, 172.16-31.x, etc.);
509
- - Skills are plain files (SKILL.md + assets) — installing a skill does **not** execute code;
510
- the git clone comes from the repo you chose, review the repo before installing.
511
-
512
- ---
513
-
514
- ## Disclaimer
223
+ ## Documentation
515
224
 
516
- - The marketplace lists third-party repositories from GitHub; each plugin is developed and
517
- maintained by its own author and has **no affiliation with DeepSeek Harness or this hub**.
518
- - This hub makes **no warranty** about any plugin's quality, reliability, security, license
519
- compliance or compatibility. Listing is **not an endorsement** — install means you have
520
- reviewed and accepted the risk. Read the repo source and README before installing.
521
- - This hub is provided AS-IS; neither the hub nor its developers are liable for any damage
522
- (data loss, system damage, privacy leaks) caused by installing or using third-party plugins.
225
+ - [AI Empower 与服务器组件控制](docs/ai-empower.md)
226
+ - [Framework upgrade safety & plugin adapt gate](docs/upgrade-safety-adapt-gate.md)
227
+ - [How it works](docs/how-it-works.md) · [Compatibility](docs/compatibility.md) · [Project layout](docs/project-layout.md)
228
+ - [HTTP endpoints](docs/http-endpoints.md) · [Local AI fallback & consent](docs/ai-fallback.md)
229
+ - [Framework patch (cordis.patch.yml)](docs/framework-patch.md) · [Security & disclaimer](docs/security-disclaimer.md)
523
230
 
524
231
  ---
525
232