dsh-plugin-marketplace 0.3.5 → 0.3.7

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Scorp1o117
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Scorp1o117
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,87 +1,95 @@
1
- # dsh-plugin-marketplace
2
-
3
- [![中文文档](https://img.shields.io/badge/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3-blue)](README.zh.md)
4
-
5
- **GitHub**: [Scorp1o117/dsh-plugin-marketplace](https://github.com/Scorp1o117/dsh-plugin-marketplace) · **npm**: [dsh-plugin-marketplace](https://www.npmjs.com/package/dsh-plugin-marketplace)
6
-
7
- [![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)
8
-
9
- Part of the [DeepSeek Harness Enhancement Suite](https://github.com/Scorp1o117/dsh-enhancement-suite) — Vision · Soul/Persona · Long-term Memory · Plugin Marketplace.
10
-
11
- A **plugin marketplace** inside the DeepSeek Harness Web UI: browse
12
- [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin) right
13
- from the settings page — no terminal needed.
14
-
15
- - **Search** the topic by keyword, **sort** by stars or last update
16
- - **Plugin cards** with description, stars, language, and update date
17
- - **Detail panel**: GitHub README summary, install command, repo/npm links
18
- - **AI explain**: one click asks the configured default model what a plugin
19
- roughly does, answered in the UI — no need to read the README yourself
20
- - Powered by the public GitHub search API (CORS-enabled, no key needed;
21
- unauthenticated rate limit 60 req/h)
22
- - Zero client dependencies (React only), no build step — hand-written
23
- ModuleLoader bundle
24
-
25
- ## Compatibility (v0.3.5)
26
-
27
- Targets DSH `0.1.7-rc.1` (`next`); npm `latest` is `0.1.5-rc.3`.
28
- The host now stores live plugin settings in the Profile patch and the browser
29
- uses `configForms`. This version was checked in a disposable Web profile.
30
- Older hosts require an older plugin release; alpha releases remain `unknown`.
1
+ # dsh-plugin-marketplace
2
+
3
+ [![中文文档](https://img.shields.io/badge/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3-blue)](README.zh.md)
4
+
5
+ **GitHub**: [Scorp1o117/dsh-plugin-marketplace](https://github.com/Scorp1o117/dsh-plugin-marketplace) · **npm**: [dsh-plugin-marketplace](https://www.npmjs.com/package/dsh-plugin-marketplace)
6
+
7
+ [![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)
8
+
9
+ Part of the [DeepSeek Harness Enhancement Suite](https://github.com/Scorp1o117/dsh-enhancement-suite) — Vision · Soul/Persona · Long-term Memory · Plugin Marketplace.
10
+
11
+ A **plugin marketplace** inside the DeepSeek Harness Web UI: browse
12
+ [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin) right
13
+ from the settings page — no terminal needed.
14
+
15
+ - **Search** the topic by keyword, **sort** by stars or last update
16
+ - **Plugin cards** with description, stars, language, and update date
17
+ - **Detail panel**: GitHub README summary, install command, repo/npm links
18
+ - **AI explain**: one click asks the configured default model what a plugin
19
+ roughly does, answered in the UI — no need to read the README yourself
20
+ - Powered by the public GitHub search API (CORS-enabled, no key needed;
21
+ unauthenticated rate limit 60 req/h)
22
+ - Zero client dependencies (React only), no build step — hand-written
23
+ ModuleLoader bundle
24
+
25
+ ## Compatibility (v0.3.7)
26
+
27
+ 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.
28
+
29
+ ## Desktop install
30
+
31
+ Use the Desktop-installed `dsh` command (Application → Manage dsh Command), or the app’s Plugins page. Then install into the Desktop profile:
32
+
33
+ ```powershell
34
+ dsh plugin --profile desktop add dsh-plugin-marketplace@0.3.7
35
+ ```
36
+
37
+ Restart the Desktop app to load the client bundle. Desktop keeps its profile under `$DSH_HOME/profiles/desktop`.
38
+
31
39
 
32
40
  ## Install
33
-
34
- As a profile bundle (recommended):
35
-
36
- ```
37
- dsh plugin --profile web add dsh-plugin-marketplace
38
- ```
39
-
40
- or via the package's `dsh.bundle.patch` layer — add `dsh-plugin-marketplace`
41
- to `dsh.profile.bundles` in `$DSH_HOME/profiles/web/package.json`.
42
-
43
- Manual mount in `$DSH_HOME/profiles/web/cordis.patch.yml`:
44
-
45
- ```yaml
46
- - insert:
47
- - id: plugin-marketplace
48
- name: 'dsh-plugin-marketplace'
49
- ```
50
-
51
- > **Upgrading from ≤ 0.2.2?** If you previously mounted the plugin manually,
52
- > **remove that row from `cordis.patch.yml`** before switching to the bundle
53
- > install — the bundle layer already inserts the entry, and two entries with
54
- > the same id abort boot with `duplicate loader entry id: plugin-marketplace`.
55
- > The two ways are alternatives, not both.
56
-
57
- Then restart `dsh web` (new client plugins require a process restart to be
58
- scanned into the browser roster) and open **Settings → Plugin Marketplace**.
59
-
60
- Version 0.3.5 uses DSH's `configForms` client service and Profile patch
41
+
42
+ As a profile bundle (recommended):
43
+
44
+ ```
45
+ dsh plugin --profile web add dsh-plugin-marketplace
46
+ ```
47
+
48
+ or via the package's `dsh.bundle.patch` layer — add `dsh-plugin-marketplace`
49
+ to `dsh.profile.bundles` in `$DSH_HOME/profiles/web/package.json`.
50
+
51
+ Manual mount in `$DSH_HOME/profiles/web/cordis.patch.yml`:
52
+
53
+ ```yaml
54
+ - insert:
55
+ - id: plugin-marketplace
56
+ name: 'dsh-plugin-marketplace'
57
+ ```
58
+
59
+ > **Upgrading from ≤ 0.2.2?** If you previously mounted the plugin manually,
60
+ > **remove that row from `cordis.patch.yml`** before switching to the bundle
61
+ > install — the bundle layer already inserts the entry, and two entries with
62
+ > the same id abort boot with `duplicate loader entry id: plugin-marketplace`.
63
+ > The two ways are alternatives, not both.
64
+
65
+ Then restart `dsh web` (new client plugins require a process restart to be
66
+ scanned into the browser roster) and open **Settings → Plugin Marketplace**.
67
+
68
+ Version 0.3.7 uses DSH's `configForms` client service and Profile patch
61
69
  settings. Use an older plugin release with older DSH hosts.
62
- Note: when dsh web is opened from a non-loopback origin (a LAN IP, say), DSH
63
- keeps settings writes process-local, so install / AI-explain requests never
64
- reach the host.
65
-
66
- ## How it works
67
-
68
- | Layer | File | Role |
69
- |---|---|---|
70
- | host shell | `index.js` | settings-backed install + AI-explain flows; `dsh.bundle.patch` makes the package a proper profile bundle |
71
- | browser half | `client.js` | registers the `settings.section` "marketplace" tab; fetches GitHub search API; renders cards + detail; "AI explain" button |
72
- | manifest | `package.json` | `dsh.bundle: { patch: "./cordis.patch.yml" }` + `dsh.client: { platform: "web" }` + `exports["./client"]` — discovered by `dsh-client-modules` |
73
-
74
- The browser half needs no `dsh.client.inject` packages: it only uses `react`
75
- (provided by the web runtime) and the `slots` / `locale` client services.
76
-
77
- ## Notes
78
-
79
- - The GitHub search API returns at most 1000 results; the topic currently has
80
- 280+ repos, so paging covers everything.
81
- - READMEs are fetched per plugin on demand and truncated to ~1200 chars.
82
- - If you see "rate-limited", wait an hour or run the web through a proxy that
83
- adds a GitHub token.
84
-
85
- ## License
86
-
87
- MIT
70
+ Note: when dsh web is opened from a non-loopback origin (a LAN IP, say), DSH
71
+ keeps settings writes process-local, so install / AI-explain requests never
72
+ reach the host.
73
+
74
+ ## How it works
75
+
76
+ | Layer | File | Role |
77
+ |---|---|---|
78
+ | host shell | `index.js` | settings-backed install + AI-explain flows; `dsh.bundle.patch` makes the package a proper profile bundle |
79
+ | browser half | `client.js` | registers the `settings.section` "marketplace" tab; fetches GitHub search API; renders cards + detail; "AI explain" button |
80
+ | manifest | `package.json` | `dsh.bundle: { patch: "./cordis.patch.yml" }` + `dsh.client: { platform: "web" }` + `exports["./client"]` — discovered by `dsh-client-modules` |
81
+
82
+ The browser half needs no `dsh.client.inject` packages: it only uses `react`
83
+ (provided by the web runtime) and the `slots` / `locale` client services.
84
+
85
+ ## Notes
86
+
87
+ - The GitHub search API returns at most 1000 results; the topic currently has
88
+ 280+ repos, so paging covers everything.
89
+ - READMEs are fetched per plugin on demand and truncated to ~1200 chars.
90
+ - If you see "rate-limited", wait an hour or run the web through a proxy that
91
+ adds a GitHub token.
92
+
93
+ ## License
94
+
95
+ MIT
package/README.zh.md CHANGED
@@ -1,88 +1,97 @@
1
- # dsh-plugin-marketplace
2
-
3
- **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)
4
-
5
- [![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)
6
-
7
- 属于 [DeepSeek Harness Enhancement Suite](https://github.com/Scorp1o117/dsh-enhancement-suite) —— Vision · Soul/Persona · 长期记忆 · 插件市场。
8
-
9
- 在 DeepSeek Harness **Web UI 里内置的插件市场**:直接在设置页浏览
10
- [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin),无需打开终端。
11
-
12
- - **搜索**:按关键词搜索主题下的插件,按 Star 或更新时间**排序**
13
- - **插件卡片**:名称、简介、Star 数、语言、更新时间一目了然
14
- - **详情面板**:GitHub README 摘要、安装命令、仓库 / npm 链接
15
- - **AI 解释**:一键调用已配置的默认模型,用中文直接告诉你这个插件大概是干嘛的,不用自己啃 README
16
- - 基于 GitHub 公开搜索 API(浏览器 CORS 直连,无需密钥;未认证限流 60 次/小时)
17
- - 零客户端依赖(只用 React),无构建步骤 —— 手写 ModuleLoader bundle
18
-
19
- ## 兼容性(v0.3.5)
20
-
21
- 适配 DSH `0.1.7-rc.1`(npm `next`);npm `latest` 是 `0.1.5-rc.3`。
22
- 新版使用 Profile patch 配置与客户端 `configForms`,已在一次性 Web Profile 验证。
23
- 旧宿主请使用插件旧版;alpha 版本继续标记 `unknown`。
1
+ # dsh-plugin-marketplace
2
+
3
+ **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)
4
+
5
+ [![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)
6
+
7
+ 属于 [DeepSeek Harness Enhancement Suite](https://github.com/Scorp1o117/dsh-enhancement-suite) —— Vision · Soul/Persona · 长期记忆 · 插件市场。
8
+
9
+ 在 DeepSeek Harness **Web UI 里内置的插件市场**:直接在设置页浏览
10
+ [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin),无需打开终端。
11
+
12
+ - **搜索**:按关键词搜索主题下的插件,按 Star 或更新时间**排序**
13
+ - **插件卡片**:名称、简介、Star 数、语言、更新时间一目了然
14
+ - **详情面板**:GitHub README 摘要、安装命令、仓库 / npm 链接
15
+ - **AI 解释**:一键调用已配置的默认模型,用中文直接告诉你这个插件大概是干嘛的,不用自己啃 README
16
+ - 基于 GitHub 公开搜索 API(浏览器 CORS 直连,无需密钥;未认证限流 60 次/小时)
17
+ - 零客户端依赖(只用 React),无构建步骤 —— 手写 ModuleLoader bundle
18
+
19
+ ## 兼容性(v0.3.7)
20
+
21
+ 已在 DSH `0.1.7-rc.2`(Web)与 `0.2.0-rc.2`(桌面端运行时)的一次性 Profile 验证。桌面端使用独立的 `desktop` Profile;其他预发布版本暂未验证。
22
+
23
+ ## 桌面端安装
24
+
25
+ 在桌面端的“插件”页面安装,或使用桌面端“应用 → 管理 dsh 命令”注册的命令:
26
+
27
+ ```powershell
28
+ dsh plugin --profile desktop add dsh-plugin-marketplace@0.3.7
29
+ ```
30
+
31
+ 重启桌面端以加载客户端插件。配置位于 `$DSH_HOME/profiles/desktop`。
32
+
24
33
 
25
34
  ## 安装
26
-
27
- 作为 profile bundle 安装(推荐):
28
-
29
- ```
30
- dsh plugin --profile web add dsh-plugin-marketplace
31
- ```
32
-
33
- 或通过包的 `dsh.bundle.patch` 层:把 `dsh-plugin-marketplace` 加进
34
- `$DSH_HOME/profiles/web/package.json` 的 `dsh.profile.bundles`。
35
-
36
- 手动挂载(`$DSH_HOME/profiles/web/cordis.patch.yml`):
37
-
38
- ```yaml
39
- - insert:
40
- - id: plugin-marketplace
41
- name: 'dsh-plugin-marketplace'
42
- ```
43
-
44
- > **从 ≤ 0.2.2 升级?** 如果你之前是手动挂载的,切到 bundle 安装前**先删掉
45
- > `cordis.patch.yml` 里那一行**——bundle 层自己会插入条目,两行同 id 会让启动
46
- > 直接报 `duplicate loader entry id: plugin-marketplace`。两种方式二选一,别同时用。
47
-
48
- 然后重启 `dsh web`(新客户端插件需要重启进程才会被扫描进浏览器清单),打开 **设置 → 插件市场**。
49
-
50
- DSH `0.1.0-rc.7` 起会公开全部已注册的 settings 命名空间,插件市场无需再修改官方文件。
51
- 因此从 `0.2.8` 起最低支持 DSH `0.1.0-rc.7`。仍使用 DSH `0.1.0-rc.6` 的用户
52
- 请锁定 `dsh-plugin-marketplace@0.2.6`;这是最后一个包含旧 settings 白名单兼容
53
- 补丁的版本。
54
-
55
- DSH `0.1.2-rc.1` 移除了客户端的 `connection.api`(旧 settings RPC 入口),
56
- `0.3.1` 起改用 `settingsScope` 自带的 `mutate` 写入(`0.1.2-rc.1` 之前的主机仍走
57
- 旧通道)。注意:非本机回环(如局域网 IP)访问 dsh web 时,DSH 的设置写入是
58
- 进程本地的,安装 / AI 解释请求不会到达宿主。
59
-
60
- ## 实现方式
61
-
62
- | 层 | 文件 | 作用 |
63
- |---|---|---|
64
- | 服务端壳 | `index.js` | settings 通道的安装 + AI 解释流程;`dsh.bundle.patch` 让包成为标准 profile bundle |
65
- | 浏览器端 | `client.js` | 注册 `settings.section` 的 "marketplace" 分区;调用 GitHub 搜索 API;渲染卡片 + 详情;"AI 解释"按钮 |
66
- | 清单 | `package.json` | `dsh.bundle: { patch: "./cordis.patch.yml" }` + `dsh.client: { platform: "web" }` + `exports["./client"]` —— 被 `dsh-client-modules` 扫描发现 |
67
-
68
- 浏览器端不需要任何 `dsh.client.inject` 依赖包:只用 `react`(web 运行时自带)和 `slots` / `locale` 客户端服务。
69
-
70
- ## v0.3.3:写入改为校验而非假定
71
-
72
- `writeField` 在走 settings scope 时只检查了 `snapshot.status === "ready"` 就返回成功。
73
- 但 scope 的契约是「完成写入与恢复读取后结算」,**被宿主以 `settings/conflict` 拒绝的
74
- 写入同样会 resolve**——而拒绝之后命名空间依然注册着,恢复读取也会把它重新渲染成
75
- `ready`,所以这个检查恒真,被拒的写入会被报成成功。
76
-
77
- 现在改为比对 section 自身的值(`settings-not-applied`),调用方拿到的 `{ok:false}` 才
78
- 真的代表写入没生效。
79
-
80
- ## 备注
81
-
82
- - GitHub 搜索 API 最多返回 1000 条;该主题目前有 280+ 仓库,翻页可以覆盖全部。
83
- - README 按需按插件拉取,截断到约 1200 字符。
84
- - 遇到 "rate-limited":等一小时,或让 web 走带 GitHub token 的代理。
85
-
86
- ## License
87
-
88
- MIT
35
+
36
+ 作为 profile bundle 安装(推荐):
37
+
38
+ ```
39
+ dsh plugin --profile web add dsh-plugin-marketplace
40
+ ```
41
+
42
+ 或通过包的 `dsh.bundle.patch` 层:把 `dsh-plugin-marketplace` 加进
43
+ `$DSH_HOME/profiles/web/package.json` 的 `dsh.profile.bundles`。
44
+
45
+ 手动挂载(`$DSH_HOME/profiles/web/cordis.patch.yml`):
46
+
47
+ ```yaml
48
+ - insert:
49
+ - id: plugin-marketplace
50
+ name: 'dsh-plugin-marketplace'
51
+ ```
52
+
53
+ > **从 ≤ 0.2.2 升级?** 如果你之前是手动挂载的,切到 bundle 安装前**先删掉
54
+ > `cordis.patch.yml` 里那一行**——bundle 层自己会插入条目,两行同 id 会让启动
55
+ > 直接报 `duplicate loader entry id: plugin-marketplace`。两种方式二选一,别同时用。
56
+
57
+ 然后重启 `dsh web`(新客户端插件需要重启进程才会被扫描进浏览器清单),打开 **设置 → 插件市场**。
58
+
59
+ DSH `0.1.0-rc.7` 起会公开全部已注册的 settings 命名空间,插件市场无需再修改官方文件。
60
+ 因此从 `0.2.8` 起最低支持 DSH `0.1.0-rc.7`。仍使用 DSH `0.1.0-rc.6` 的用户
61
+ 请锁定 `dsh-plugin-marketplace@0.2.6`;这是最后一个包含旧 settings 白名单兼容
62
+ 补丁的版本。
63
+
64
+ DSH `0.1.2-rc.1` 移除了客户端的 `connection.api`(旧 settings RPC 入口),
65
+ `0.3.1` 起改用 `settingsScope` 自带的 `mutate` 写入(`0.1.2-rc.1` 之前的主机仍走
66
+ 旧通道)。注意:非本机回环(如局域网 IP)访问 dsh web 时,DSH 的设置写入是
67
+ 进程本地的,安装 / AI 解释请求不会到达宿主。
68
+
69
+ ## 实现方式
70
+
71
+ | 层 | 文件 | 作用 |
72
+ |---|---|---|
73
+ | 服务端壳 | `index.js` | settings 通道的安装 + AI 解释流程;`dsh.bundle.patch` 让包成为标准 profile bundle |
74
+ | 浏览器端 | `client.js` | 注册 `settings.section` 的 "marketplace" 分区;调用 GitHub 搜索 API;渲染卡片 + 详情;"AI 解释"按钮 |
75
+ | 清单 | `package.json` | `dsh.bundle: { patch: "./cordis.patch.yml" }` + `dsh.client: { platform: "web" }` + `exports["./client"]` —— 被 `dsh-client-modules` 扫描发现 |
76
+
77
+ 浏览器端不需要任何 `dsh.client.inject` 依赖包:只用 `react`(web 运行时自带)和 `slots` / `locale` 客户端服务。
78
+
79
+ ## v0.3.3:写入改为校验而非假定
80
+
81
+ `writeField` 在走 settings scope 时只检查了 `snapshot.status === "ready"` 就返回成功。
82
+ 但 scope 的契约是「完成写入与恢复读取后结算」,**被宿主以 `settings/conflict` 拒绝的
83
+ 写入同样会 resolve**——而拒绝之后命名空间依然注册着,恢复读取也会把它重新渲染成
84
+ `ready`,所以这个检查恒真,被拒的写入会被报成成功。
85
+
86
+ 现在改为比对 section 自身的值(`settings-not-applied`),调用方拿到的 `{ok:false}` 才
87
+ 真的代表写入没生效。
88
+
89
+ ## 备注
90
+
91
+ - GitHub 搜索 API 最多返回 1000 条;该主题目前有 280+ 仓库,翻页可以覆盖全部。
92
+ - README 按需按插件拉取,截断到约 1200 字符。
93
+ - 遇到 "rate-limited":等一小时,或让 web 走带 GitHub token 的代理。
94
+
95
+ ## License
96
+
97
+ MIT
package/client.js CHANGED
@@ -52,7 +52,7 @@ window.__ModuleLoader__.load({
52
52
 
53
53
  // ── locale ────────────────────────────────────────────────────────────
54
54
  var NS = "marketplace";
55
- var inject = ["slots", "locale", "configForms", "connection"];
55
+ var inject = ["slots", "locale", "configForms", "connection"];
56
56
  var zh = {
57
57
  nav: "插件市场",
58
58
  search: "搜索插件(关键词或留空浏览全部)…",
@@ -441,7 +441,7 @@ window.__ModuleLoader__.load({
441
441
  function apply(ctx) {
442
442
  var t = ctx.locale.bind(NS);
443
443
  ctx.effect(function () { return ctx.locale.register(NS, { zh: zh, en: en }); }, "dsh-plugin-marketplace: dictionaries");
444
- var scope = ctx.configForms.get("plugin-marketplace");
444
+ var scope = ctx.configForms.get("plugin-marketplace");
445
445
  // dsh 0.1.2-rc.1 dropped connection.api; only older hosts still carry
446
446
  // the raw settings face there. writeField picks whichever exists.
447
447
  var api = (ctx.connection && ctx.connection.api) ? ctx.connection.api : null;
package/index.js CHANGED
@@ -32,11 +32,11 @@ const Config = z.object({
32
32
  /** client-set timestamp; host dedups on it. */
33
33
  ts: z.number().default(0),
34
34
  }),
35
- installState: z.object({
36
- status: z.string().default("idle"), // idle | running | ok | error
37
- message: z.string().default(""),
38
- pkg: z.string().default(""),
39
- ts: z.number().default(0),
35
+ installState: z.object({
36
+ status: z.string().default("idle"), // idle | running | ok | error
37
+ message: z.string().default(""),
38
+ pkg: z.string().default(""),
39
+ ts: z.number().default(0),
40
40
  }),
41
41
  /** AI-explain request (client writes repo/desc/readme, host answers). */
42
42
  aiExplain: z.object({
@@ -52,13 +52,13 @@ const Config = z.object({
52
52
  repo: z.string().default(""),
53
53
  ts: z.number().default(0),
54
54
  }),
55
- }).volatile();
55
+ }).volatile();
56
56
 
57
57
  /** npm package-name shape (scope/name, no spaces, no path chars). */
58
58
  const PKG_NAME = /^@?[a-z0-9][a-z0-9-._]*(?:\/[a-z0-9][a-z0-9-._]*)?$/;
59
59
 
60
- function apply(ctx, config) {
61
- const sourceGetter = () => typeof config.get === "function" ? config.get() : config;
60
+ function apply(ctx, config) {
61
+ const sourceGetter = () => typeof config.get === "function" ? config.get() : config;
62
62
  let lastTs = 0;
63
63
  let lastExplainTs = 0;
64
64
 
@@ -70,23 +70,23 @@ function apply(ctx, config) {
70
70
  // `installSettingsSection` export (the provider now lives at ctx.settings).
71
71
  // Inline the same logic via ctx.inject(["settings"]) — works on both
72
72
  // 0.1.1 (module export wrapper) and 0.1.2 (ctx.settings) hosts.
73
- // DSH 0.1.7 stores live plugin fields in the profile patch. Config is a
74
- // volatile proxy, and the settings service emits after a committed edit.
75
- ctx.on("settings/document-updated", (id) => {
76
- if (id !== NS) return;
77
- void maybeRunInstall();
78
- void maybeRunExplain();
79
- });
80
- queueMicrotask(() => {
81
- void maybeRunInstall();
82
- void maybeRunExplain();
83
- });
73
+ // DSH 0.1.7 stores live plugin fields in the profile patch. Config is a
74
+ // volatile proxy, and the settings service emits after a committed edit.
75
+ ctx.on("settings/document-updated", (id) => {
76
+ if (id !== NS) return;
77
+ void maybeRunInstall();
78
+ void maybeRunExplain();
79
+ });
80
+ queueMicrotask(() => {
81
+ void maybeRunInstall();
82
+ void maybeRunExplain();
83
+ });
84
84
 
85
85
  // DSH 0.1.0-rc.7+ exposes registered settings namespaces natively, allowing
86
86
  // the browser client to write install requests without modifying host files.
87
87
  /** Resolved current config (settings layer over the entry). */
88
88
  function current() {
89
- return sourceGetter();
89
+ return sourceGetter();
90
90
  }
91
91
 
92
92
  /** Write the install-state report (and clear the consumed request). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-marketplace",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "DeepSeek Harness Web UI 内置插件市场:在设置页直接浏览 github.com/topics/dsh-plugin,支持搜索、按 Star 排序、查看安装方式。",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -17,7 +17,7 @@
17
17
  "platform": "web"
18
18
  },
19
19
  "compatibility": {
20
- "dsh": ">=0.1.7-rc.1 <0.2.0",
20
+ "dsh": ">=0.1.7-rc.1 <0.2.0 || 0.2.0-rc.2",
21
21
  "dshReleases": {
22
22
  "0.1.5-rc.2": "incompatible",
23
23
  "0.1.5-rc.3": "incompatible",
@@ -25,11 +25,14 @@
25
25
  "0.1.6-alpha.2": "unknown",
26
26
  "0.1.7-alpha.1": "unknown",
27
27
  "0.1.7-alpha.2": "unknown",
28
- "0.1.7-rc.1": "compatible"
28
+ "0.1.7-rc.1": "compatible",
29
+ "0.1.7-rc.2": "compatible",
30
+ "0.2.0-rc.2": "compatible"
29
31
  },
30
32
  "node": ">=20.18",
31
33
  "profiles": [
32
- "web"
34
+ "web",
35
+ "desktop"
33
36
  ]
34
37
  }
35
38
  },
@@ -66,8 +69,8 @@
66
69
  },
67
70
  "peerDependencies": {
68
71
  "react": "^18.2.0",
69
- "@deepseek-ai/dsh-settings": "^0.1.7-rc.1",
70
- "@deepseek-ai/dsh-llm": "^0.1.7-rc.1"
72
+ "@deepseek-ai/dsh-settings": "^0.1.7-rc.1 || 0.2.0-rc.2",
73
+ "@deepseek-ai/dsh-llm": "^0.1.7-rc.1 || 0.2.0-rc.2"
71
74
  },
72
75
  "dependencies": {
73
76
  "@deepseek-ai/schemastery": "^3.18.4"