dsh-plugin-marketplace 0.4.0 → 0.4.2

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
@@ -1,99 +1,108 @@
1
- # dsh-plugin-marketplace
2
-
3
- ## Configuration page (DSH 0.2.0-rc.2 and later)
4
-
5
- Open **Plugins → Installed → dsh-plugin-marketplace** from the homepage sidebar to configure and save this plugin. The page uses the official `plugins.bundle.config` interface, without a duplicate entry in global Settings. Web and Desktop share the page. This version requires DSH 0.2.0-rc.2 or a later 0.2.x host; existing configuration is retained.
6
-
7
- [![中文文档](https://img.shields.io/badge/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3-blue)](README.zh.md)
8
-
9
- **GitHub**: [Scorp1o117/dsh-plugin-marketplace](https://github.com/Scorp1o117/dsh-plugin-marketplace) · **npm**: [dsh-plugin-marketplace](https://www.npmjs.com/package/dsh-plugin-marketplace)
10
-
11
- [![Enhancement Suite](https://img.shields.io/badge/part%20of-Enhancement%20Suite-3964fe)](https://github.com/Scorp1o117/dsh-enhancement-suite) [![npm](https://img.shields.io/npm/v/dsh-enhancement-suite)](https://www.npmjs.com/package/dsh-enhancement-suite)
12
-
13
- Part of the [DeepSeek Harness Enhancement Suite](https://github.com/Scorp1o117/dsh-enhancement-suite) — Vision · Soul/Persona · Long-term Memory · Plugin Marketplace.
14
-
15
- A **plugin marketplace** inside the DeepSeek Harness Web UI: browse
16
- [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin) right
17
- from the settings page — no terminal needed.
18
-
19
- - **Search** the topic by keyword, **sort** by stars or last update
20
- - **Plugin cards** with description, stars, language, and update date
21
- - **Detail panel**: GitHub README summary, install command, repo/npm links
22
- - **AI explain**: one click asks the configured default model what a plugin
23
- roughly does, answered in the UI — no need to read the README yourself
24
- - Powered by the public GitHub search API (CORS-enabled, no key needed;
25
- unauthenticated rate limit 60 req/h)
26
- - Zero client dependencies (React only), no build step — hand-written
27
- ModuleLoader bundle
28
-
29
- ## Compatibility (v0.3.7)
30
-
31
- Verified with DSH `0.1.7-rc.2` (Web) and `0.2.0-rc.2` (Desktop runtime) in isolated profiles. The Desktop app uses its own `desktop` profile. Other DSH prereleases remain unverified.
32
-
33
- ## Desktop install
34
-
35
- Use the Desktop-installed `dsh` command (Application → Manage dsh Command), or the app’s Plugins page. Then install into the Desktop profile:
36
-
37
- ```powershell
38
- dsh plugin --profile desktop add dsh-plugin-marketplace@0.3.7
39
- ```
40
-
41
- Restart the Desktop app to load the client bundle. Desktop keeps its profile under `$DSH_HOME/profiles/desktop`.
42
-
43
-
44
- ## Install
45
-
46
- As a profile bundle (recommended):
47
-
48
- ```
49
- dsh plugin --profile web add dsh-plugin-marketplace
50
- ```
51
-
52
- or via the package's `dsh.bundle.patch` layer — add `dsh-plugin-marketplace`
53
- to `dsh.profile.bundles` in `$DSH_HOME/profiles/web/package.json`.
54
-
55
- Manual mount in `$DSH_HOME/profiles/web/cordis.patch.yml`:
56
-
57
- ```yaml
58
- - insert:
59
- - id: plugin-marketplace
60
- name: 'dsh-plugin-marketplace'
61
- ```
62
-
63
- > **Upgrading from ≤ 0.2.2?** If you previously mounted the plugin manually,
64
- > **remove that row from `cordis.patch.yml`** before switching to the bundle
65
- > install — the bundle layer already inserts the entry, and two entries with
66
- > the same id abort boot with `duplicate loader entry id: plugin-marketplace`.
67
- > The two ways are alternatives, not both.
68
-
69
- Then restart `dsh web` (new client plugins require a process restart to be
70
- scanned into the browser roster) and open **Settings → Plugin Marketplace**.
71
-
72
- Version 0.3.7 uses DSH's `configForms` client service and Profile patch
73
- settings. Use an older plugin release with older DSH hosts.
74
- Note: when dsh web is opened from a non-loopback origin (a LAN IP, say), DSH
75
- keeps settings writes process-local, so install / AI-explain requests never
76
- reach the host.
77
-
78
- ## How it works
79
-
80
- | Layer | File | Role |
81
- |---|---|---|
82
- | host shell | `index.js` | settings-backed install + AI-explain flows; `dsh.bundle.patch` makes the package a proper profile bundle |
83
- | browser half | `client.js` | registers the `settings.section` "marketplace" tab; fetches GitHub search API; renders cards + detail; "AI explain" button |
84
- | manifest | `package.json` | `dsh.bundle: { patch: "./cordis.patch.yml" }` + `dsh.client: { platform: "web" }` + `exports["./client"]` — discovered by `dsh-client-modules` |
85
-
86
- The browser half needs no `dsh.client.inject` packages: it only uses `react`
87
- (provided by the web runtime) and the `slots` / `locale` client services.
88
-
89
- ## Notes
90
-
91
- - The GitHub search API returns at most 1000 results; the topic currently has
92
- 280+ repos, so paging covers everything.
93
- - READMEs are fetched per plugin on demand and truncated to ~1200 chars.
94
- - If you see "rate-limited", wait an hour or run the web through a proxy that
95
- adds a GitHub token.
96
-
97
- ## License
98
-
99
- MIT
1
+ # dsh-plugin-marketplace
2
+
3
+ The plugin follows the DSH language setting (Chinese and English in DSH 0.2.0-rc.2), including configuration, status messages and plugin-list metadata. Language-pack locales use the host fallback chain. Switching languages preserves unsaved settings; there is no separate plugin language selector.
4
+
5
+ ## v0.4.1: desktop request handling
6
+
7
+ - Installation targets the active Host profile and home, resolves the Desktop Host `cli.js`, and runs Electron with `ELECTRON_RUN_AS_NODE=1` and `--expose-internals`.
8
+ - Install and AI-explain requests start outside the settings/HMR transaction. Transient state-write refusals are retried; spawn failures return an installation error.
9
+ - The UI shows progress while awaiting Host acknowledgement, and an error after 15 seconds without acknowledgement. This does not cap installation or model response time.
10
+ - Update to this release and restart DSH. Repositories without a matching npm package still return an explicit installation error.
11
+
12
+ ## Configuration page (DSH 0.2.0-rc.2 and later)
13
+
14
+ Open **Plugins → Installed → dsh-plugin-marketplace** from the homepage sidebar to configure and save this plugin. The page uses the official `plugins.bundle.config` interface, without a duplicate entry in global Settings. Web and Desktop share the page. This version requires DSH 0.2.0-rc.2 or a later 0.2.x host; existing configuration is retained.
15
+
16
+ [![中文文档](https://img.shields.io/badge/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3-blue)](README.zh.md)
17
+
18
+ **GitHub**: [Scorp1o117/dsh-plugin-marketplace](https://github.com/Scorp1o117/dsh-plugin-marketplace) · **npm**: [dsh-plugin-marketplace](https://www.npmjs.com/package/dsh-plugin-marketplace)
19
+
20
+ [![Enhancement Suite](https://img.shields.io/badge/part%20of-Enhancement%20Suite-3964fe)](https://github.com/Scorp1o117/dsh-enhancement-suite) [![npm](https://img.shields.io/npm/v/dsh-enhancement-suite)](https://www.npmjs.com/package/dsh-enhancement-suite)
21
+
22
+ Part of the [DeepSeek Harness Enhancement Suite](https://github.com/Scorp1o117/dsh-enhancement-suite) — Vision · Soul/Persona · Long-term Memory · Plugin Marketplace.
23
+
24
+ A **plugin marketplace** inside the DeepSeek Harness Web UI: browse
25
+ [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin) right
26
+ from the settings page — no terminal needed.
27
+
28
+ - **Search** the topic by keyword, **sort** by stars or last update
29
+ - **Plugin cards** with description, stars, language, and update date
30
+ - **Detail panel**: GitHub README summary, install command, repo/npm links
31
+ - **AI explain**: one click asks the configured default model what a plugin
32
+ roughly does, answered in the UI — no need to read the README yourself
33
+ - Powered by the public GitHub search API (CORS-enabled, no key needed;
34
+ unauthenticated rate limit 60 req/h)
35
+ - Zero client dependencies (React only), no build step — hand-written
36
+ ModuleLoader bundle
37
+
38
+ ## Compatibility (v0.3.7)
39
+
40
+ Verified with DSH `0.1.7-rc.2` (Web) and `0.2.0-rc.2` (Desktop runtime) in isolated profiles. The Desktop app uses its own `desktop` profile. Other DSH prereleases remain unverified.
41
+
42
+ ## Desktop install
43
+
44
+ Use the Desktop-installed `dsh` command (Application → Manage dsh Command), or the app’s Plugins page. Then install into the Desktop profile:
45
+
46
+ ```powershell
47
+ dsh plugin --profile desktop add dsh-plugin-marketplace@0.3.7
48
+ ```
49
+
50
+ Restart the Desktop app to load the client bundle. Desktop keeps its profile under `$DSH_HOME/profiles/desktop`.
51
+
52
+
53
+ ## Install
54
+
55
+ As a profile bundle (recommended):
56
+
57
+ ```
58
+ dsh plugin --profile web add dsh-plugin-marketplace
59
+ ```
60
+
61
+ or via the package's `dsh.bundle.patch` layer — add `dsh-plugin-marketplace`
62
+ to `dsh.profile.bundles` in `$DSH_HOME/profiles/web/package.json`.
63
+
64
+ Manual mount in `$DSH_HOME/profiles/web/cordis.patch.yml`:
65
+
66
+ ```yaml
67
+ - insert:
68
+ - id: plugin-marketplace
69
+ name: 'dsh-plugin-marketplace'
70
+ ```
71
+
72
+ > **Upgrading from ≤ 0.2.2?** If you previously mounted the plugin manually,
73
+ > **remove that row from `cordis.patch.yml`** before switching to the bundle
74
+ > install — the bundle layer already inserts the entry, and two entries with
75
+ > the same id abort boot with `duplicate loader entry id: plugin-marketplace`.
76
+ > The two ways are alternatives, not both.
77
+
78
+ Then restart `dsh web` (new client plugins require a process restart to be
79
+ scanned into the browser roster) and open **Settings → Plugin Marketplace**.
80
+
81
+ Version 0.3.7 uses DSH's `configForms` client service and Profile patch
82
+ settings. Use an older plugin release with older DSH hosts.
83
+ Note: when dsh web is opened from a non-loopback origin (a LAN IP, say), DSH
84
+ keeps settings writes process-local, so install / AI-explain requests never
85
+ reach the host.
86
+
87
+ ## How it works
88
+
89
+ | Layer | File | Role |
90
+ |---|---|---|
91
+ | host shell | `index.js` | settings-backed install + AI-explain flows; `dsh.bundle.patch` makes the package a proper profile bundle |
92
+ | browser half | `client.js` | registers the `settings.section` "marketplace" tab; fetches GitHub search API; renders cards + detail; "AI explain" button |
93
+ | manifest | `package.json` | `dsh.bundle: { patch: "./cordis.patch.yml" }` + `dsh.client: { platform: "web" }` + `exports["./client"]` — discovered by `dsh-client-modules` |
94
+
95
+ The browser half needs no `dsh.client.inject` packages: it only uses `react`
96
+ (provided by the web runtime) and the `slots` / `locale` client services.
97
+
98
+ ## Notes
99
+
100
+ - The GitHub search API returns at most 1000 results; the topic currently has
101
+ 280+ repos, so paging covers everything.
102
+ - READMEs are fetched per plugin on demand and truncated to ~1200 chars.
103
+ - If you see "rate-limited", wait an hour or run the web through a proxy that
104
+ adds a GitHub token.
105
+
106
+ ## License
107
+
108
+ MIT
package/README.zh.md CHANGED
@@ -1,101 +1,110 @@
1
- # dsh-plugin-marketplace
2
-
3
- ## 配置入口(DSH 0.2.0-rc.2 起)
4
-
5
- 在首页侧边栏打开 **插件 → 已安装 → dsh-plugin-marketplace**,直接在插件详情页配置并保存。配置页注册到官方的 `plugins.bundle.config` 接口;全局设置页不再重复显示配置入口。Web 与桌面版使用相同界面,本版要求 DSH 0.2.0-rc.2 或更新的 0.2.x 版本。现有配置无需迁移。
6
-
7
- **GitHub**: [Scorp1o117/dsh-plugin-marketplace](https://github.com/Scorp1o117/dsh-plugin-marketplace) · **npm**: [dsh-plugin-marketplace](https://www.npmjs.com/package/dsh-plugin-marketplace) · [English](README.md)
8
-
9
- [![Enhancement Suite](https://img.shields.io/badge/part%20of-Enhancement%20Suite-3964fe)](https://github.com/Scorp1o117/dsh-enhancement-suite) [![npm](https://img.shields.io/npm/v/dsh-enhancement-suite)](https://www.npmjs.com/package/dsh-enhancement-suite)
10
-
11
- 属于 [DeepSeek Harness Enhancement Suite](https://github.com/Scorp1o117/dsh-enhancement-suite) —— Vision · Soul/Persona · 长期记忆 · 插件市场。
12
-
13
- 在 DeepSeek Harness **Web UI 里内置的插件市场**:直接在设置页浏览
14
- [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin),无需打开终端。
15
-
16
- - **搜索**:按关键词搜索主题下的插件,按 Star 或更新时间**排序**
17
- - **插件卡片**:名称、简介、Star 数、语言、更新时间一目了然
18
- - **详情面板**:GitHub README 摘要、安装命令、仓库 / npm 链接
19
- - **AI 解释**:一键调用已配置的默认模型,用中文直接告诉你这个插件大概是干嘛的,不用自己啃 README
20
- - 基于 GitHub 公开搜索 API(浏览器 CORS 直连,无需密钥;未认证限流 60 次/小时)
21
- - 零客户端依赖(只用 React),无构建步骤 —— 手写 ModuleLoader bundle
22
-
23
- ## 兼容性(v0.3.7)
24
-
25
- 已在 DSH `0.1.7-rc.2`(Web)与 `0.2.0-rc.2`(桌面端运行时)的一次性 Profile 验证。桌面端使用独立的 `desktop` Profile;其他预发布版本暂未验证。
26
-
27
- ## 桌面端安装
28
-
29
- 在桌面端的“插件”页面安装,或使用桌面端“应用 → 管理 dsh 命令”注册的命令:
30
-
31
- ```powershell
32
- dsh plugin --profile desktop add dsh-plugin-marketplace@0.3.7
33
- ```
34
-
35
- 重启桌面端以加载客户端插件。配置位于 `$DSH_HOME/profiles/desktop`。
36
-
37
-
38
- ## 安装
39
-
40
- 作为 profile bundle 安装(推荐):
41
-
42
- ```
43
- dsh plugin --profile web add dsh-plugin-marketplace
44
- ```
45
-
46
- 或通过包的 `dsh.bundle.patch` 层:把 `dsh-plugin-marketplace` 加进
47
- `$DSH_HOME/profiles/web/package.json` 的 `dsh.profile.bundles`。
48
-
49
- 手动挂载(`$DSH_HOME/profiles/web/cordis.patch.yml`):
50
-
51
- ```yaml
52
- - insert:
53
- - id: plugin-marketplace
54
- name: 'dsh-plugin-marketplace'
55
- ```
56
-
57
- > **从 ≤ 0.2.2 升级?** 如果你之前是手动挂载的,切到 bundle 安装前**先删掉
58
- > `cordis.patch.yml` 里那一行**——bundle 层自己会插入条目,两行同 id 会让启动
59
- > 直接报 `duplicate loader entry id: plugin-marketplace`。两种方式二选一,别同时用。
60
-
61
- 然后重启 `dsh web`(新客户端插件需要重启进程才会被扫描进浏览器清单),打开 **插件 → dsh-plugin-marketplace**。
62
-
63
- DSH `0.1.0-rc.7` 起会公开全部已注册的 settings 命名空间,插件市场无需再修改官方文件。
64
- 因此从 `0.2.8` 起最低支持 DSH `0.1.0-rc.7`。仍使用 DSH `0.1.0-rc.6` 的用户
65
- 请锁定 `dsh-plugin-marketplace@0.2.6`;这是最后一个包含旧 settings 白名单兼容
66
- 补丁的版本。
67
-
68
- DSH `0.1.2-rc.1` 移除了客户端的 `connection.api`(旧 settings RPC 入口),
69
- `0.3.1` 起改用 `settingsScope` 自带的 `mutate` 写入(`0.1.2-rc.1` 之前的主机仍走
70
- 旧通道)。注意:非本机回环(如局域网 IP)访问 dsh web 时,DSH 的设置写入是
71
- 进程本地的,安装 / AI 解释请求不会到达宿主。
72
-
73
- ## 实现方式
74
-
75
- | 层 | 文件 | 作用 |
76
- |---|---|---|
77
- | 服务端壳 | `index.js` | settings 通道的安装 + AI 解释流程;`dsh.bundle.patch` 让包成为标准 profile bundle |
78
- | 浏览器端 | `client.js` | 注册 `settings.section` 的 "marketplace" 分区;调用 GitHub 搜索 API;渲染卡片 + 详情;"AI 解释"按钮 |
79
- | 清单 | `package.json` | `dsh.bundle: { patch: "./cordis.patch.yml" }` + `dsh.client: { platform: "web" }` + `exports["./client"]` —— 被 `dsh-client-modules` 扫描发现 |
80
-
81
- 浏览器端不需要任何 `dsh.client.inject` 依赖包:只用 `react`(web 运行时自带)和 `slots` / `locale` 客户端服务。
82
-
83
- ## v0.3.3:写入改为校验而非假定
84
-
85
- `writeField` 在走 settings scope 时只检查了 `snapshot.status === "ready"` 就返回成功。
86
- 但 scope 的契约是「完成写入与恢复读取后结算」,**被宿主以 `settings/conflict` 拒绝的
87
- 写入同样会 resolve**——而拒绝之后命名空间依然注册着,恢复读取也会把它重新渲染成
88
- `ready`,所以这个检查恒真,被拒的写入会被报成成功。
89
-
90
- 现在改为比对 section 自身的值(`settings-not-applied`),调用方拿到的 `{ok:false}` 才
91
- 真的代表写入没生效。
92
-
93
- ## 备注
94
-
95
- - GitHub 搜索 API 最多返回 1000 条;该主题目前有 280+ 仓库,翻页可以覆盖全部。
96
- - README 按需按插件拉取,截断到约 1200 字符。
97
- - 遇到 "rate-limited":等一小时,或让 web 走带 GitHub token 的代理。
98
-
99
- ## License
100
-
101
- MIT
1
+ # dsh-plugin-marketplace
2
+
3
+ 插件跟随 DSH 的语言设置(DSH 0.2.0-rc.2 内置中文和 English),配置页面、状态提示和插件列表名称/简介同步切换。扩展语言使用宿主的回退链。切换语言保留未保存的设置,无需单独选择插件语言。
4
+
5
+ ## v0.4.1:桌面端请求闭环
6
+
7
+ - 一键安装使用当前 Host 的 profile 和数据目录,解析桌面 Host 的 `cli.js`;Electron 子进程启用 `ELECTRON_RUN_AS_NODE=1` 与 `--expose-internals`。
8
+ - 安装和 AI 解释请求延后到 settings/HMR 事务之外处理,状态回写遇到暂时拒绝会重试,启动进程失败会返回安装错误。
9
+ - UI 在等待宿主确认时显示进度;15 秒未确认会显示错误。此超时只针对请求确认,不限制实际安装或模型响应时间。
10
+ - 需要更新到本版本并重启 DSH。GitHub 仓库没有同名 npm 包时,安装仍会明确报错。
11
+
12
+ ## 配置入口(DSH 0.2.0-rc.2 起)
13
+
14
+ 在首页侧边栏打开 **插件 → 已安装 → dsh-plugin-marketplace**,直接在插件详情页配置并保存。配置页注册到官方的 `plugins.bundle.config` 接口;全局设置页不再重复显示配置入口。Web 与桌面版使用相同界面,本版要求 DSH 0.2.0-rc.2 或更新的 0.2.x 版本。现有配置无需迁移。
15
+
16
+ **GitHub**: [Scorp1o117/dsh-plugin-marketplace](https://github.com/Scorp1o117/dsh-plugin-marketplace) · **npm**: [dsh-plugin-marketplace](https://www.npmjs.com/package/dsh-plugin-marketplace) · [English](README.md)
17
+
18
+ [![Enhancement Suite](https://img.shields.io/badge/part%20of-Enhancement%20Suite-3964fe)](https://github.com/Scorp1o117/dsh-enhancement-suite) [![npm](https://img.shields.io/npm/v/dsh-enhancement-suite)](https://www.npmjs.com/package/dsh-enhancement-suite)
19
+
20
+ 属于 [DeepSeek Harness Enhancement Suite](https://github.com/Scorp1o117/dsh-enhancement-suite) —— Vision · Soul/Persona · 长期记忆 · 插件市场。
21
+
22
+ 在 DeepSeek Harness **Web UI 里内置的插件市场**:直接在设置页浏览
23
+ [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin),无需打开终端。
24
+
25
+ - **搜索**:按关键词搜索主题下的插件,按 Star 或更新时间**排序**
26
+ - **插件卡片**:名称、简介、Star 数、语言、更新时间一目了然
27
+ - **详情面板**:GitHub README 摘要、安装命令、仓库 / npm 链接
28
+ - **AI 解释**:一键调用已配置的默认模型,用中文直接告诉你这个插件大概是干嘛的,不用自己啃 README
29
+ - 基于 GitHub 公开搜索 API(浏览器 CORS 直连,无需密钥;未认证限流 60 次/小时)
30
+ - 零客户端依赖(只用 React),无构建步骤 —— 手写 ModuleLoader bundle
31
+
32
+ ## 兼容性(v0.3.7)
33
+
34
+ 已在 DSH `0.1.7-rc.2`(Web)与 `0.2.0-rc.2`(桌面端运行时)的一次性 Profile 验证。桌面端使用独立的 `desktop` Profile;其他预发布版本暂未验证。
35
+
36
+ ## 桌面端安装
37
+
38
+ 在桌面端的“插件”页面安装,或使用桌面端“应用 → 管理 dsh 命令”注册的命令:
39
+
40
+ ```powershell
41
+ dsh plugin --profile desktop add dsh-plugin-marketplace@0.3.7
42
+ ```
43
+
44
+ 重启桌面端以加载客户端插件。配置位于 `$DSH_HOME/profiles/desktop`。
45
+
46
+
47
+ ## 安装
48
+
49
+ 作为 profile bundle 安装(推荐):
50
+
51
+ ```
52
+ dsh plugin --profile web add dsh-plugin-marketplace
53
+ ```
54
+
55
+ 或通过包的 `dsh.bundle.patch` 层:把 `dsh-plugin-marketplace` 加进
56
+ `$DSH_HOME/profiles/web/package.json` 的 `dsh.profile.bundles`。
57
+
58
+ 手动挂载(`$DSH_HOME/profiles/web/cordis.patch.yml`):
59
+
60
+ ```yaml
61
+ - insert:
62
+ - id: plugin-marketplace
63
+ name: 'dsh-plugin-marketplace'
64
+ ```
65
+
66
+ > **从 ≤ 0.2.2 升级?** 如果你之前是手动挂载的,切到 bundle 安装前**先删掉
67
+ > `cordis.patch.yml` 里那一行**——bundle 层自己会插入条目,两行同 id 会让启动
68
+ > 直接报 `duplicate loader entry id: plugin-marketplace`。两种方式二选一,别同时用。
69
+
70
+ 然后重启 `dsh web`(新客户端插件需要重启进程才会被扫描进浏览器清单),打开 **插件 → dsh-plugin-marketplace**。
71
+
72
+ DSH `0.1.0-rc.7` 起会公开全部已注册的 settings 命名空间,插件市场无需再修改官方文件。
73
+ 因此从 `0.2.8` 起最低支持 DSH `0.1.0-rc.7`。仍使用 DSH `0.1.0-rc.6` 的用户
74
+ 请锁定 `dsh-plugin-marketplace@0.2.6`;这是最后一个包含旧 settings 白名单兼容
75
+ 补丁的版本。
76
+
77
+ DSH `0.1.2-rc.1` 移除了客户端的 `connection.api`(旧 settings RPC 入口),
78
+ `0.3.1` 起改用 `settingsScope` 自带的 `mutate` 写入(`0.1.2-rc.1` 之前的主机仍走
79
+ 旧通道)。注意:非本机回环(如局域网 IP)访问 dsh web 时,DSH 的设置写入是
80
+ 进程本地的,安装 / AI 解释请求不会到达宿主。
81
+
82
+ ## 实现方式
83
+
84
+ | 层 | 文件 | 作用 |
85
+ |---|---|---|
86
+ | 服务端壳 | `index.js` | settings 通道的安装 + AI 解释流程;`dsh.bundle.patch` 让包成为标准 profile bundle |
87
+ | 浏览器端 | `client.js` | 注册 `settings.section` 的 "marketplace" 分区;调用 GitHub 搜索 API;渲染卡片 + 详情;"AI 解释"按钮 |
88
+ | 清单 | `package.json` | `dsh.bundle: { patch: "./cordis.patch.yml" }` + `dsh.client: { platform: "web" }` + `exports["./client"]` —— 被 `dsh-client-modules` 扫描发现 |
89
+
90
+ 浏览器端不需要任何 `dsh.client.inject` 依赖包:只用 `react`(web 运行时自带)和 `slots` / `locale` 客户端服务。
91
+
92
+ ## v0.3.3:写入改为校验而非假定
93
+
94
+ `writeField` 在走 settings scope 时只检查了 `snapshot.status === "ready"` 就返回成功。
95
+ 但 scope 的契约是「完成写入与恢复读取后结算」,**被宿主以 `settings/conflict` 拒绝的
96
+ 写入同样会 resolve**——而拒绝之后命名空间依然注册着,恢复读取也会把它重新渲染成
97
+ `ready`,所以这个检查恒真,被拒的写入会被报成成功。
98
+
99
+ 现在改为比对 section 自身的值(`settings-not-applied`),调用方拿到的 `{ok:false}` 才
100
+ 真的代表写入没生效。
101
+
102
+ ## 备注
103
+
104
+ - GitHub 搜索 API 最多返回 1000 条;该主题目前有 280+ 仓库,翻页可以覆盖全部。
105
+ - README 按需按插件拉取,截断到约 1200 字符。
106
+ - 遇到 "rate-limited":等一小时,或让 web 走带 GitHub token 的代理。
107
+
108
+ ## License
109
+
110
+ MIT