dsh-plugin-marketplace 0.2.2 → 0.2.4

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,53 +1,78 @@
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
- A **plugin marketplace** inside the DeepSeek Harness Web UI: browse
8
- [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin) right
9
- from the settings page — no terminal needed.
10
-
11
- - **Search** the topic by keyword, **sort** by stars or last update
12
- - **Plugin cards** with description, stars, language, and update date
13
- - **Detail panel**: GitHub README summary, install command, repo/npm links
14
- - Powered by the public GitHub search API (CORS-enabled, no key needed;
15
- unauthenticated rate limit 60 req/h)
16
- - Zero client dependencies (React only), no build step — hand-written
17
- ModuleLoader bundle
18
-
19
- ## Install
20
-
21
- In `$DSH_HOME/profiles/web/cordis.patch.yml`:
22
-
23
- ```yaml
24
- - insert:
25
- - id: plugin-marketplace
26
- name: 'dsh-plugin-marketplace'
27
- ```
28
-
29
- Then restart `dsh web` (new client plugins require a process restart to be
30
- scanned into the browser roster) and open **Settings → Plugin Marketplace**.
31
-
32
- ## How it works
33
-
34
- | Layer | File | Role |
35
- |---|---|---|
36
- | host shell | `index.js` | empty apply — makes the package a loader entry |
37
- | browser half | `client.js` | registers the `settings.section` "marketplace" tab; fetches GitHub search API; renders cards + detail |
38
- | manifest | `package.json` | `dsh.client: { platform: "web" }` + `exports["./client"]` — discovered by `dsh-client-modules` |
39
-
40
- The browser half needs no `dsh.client.inject` packages: it only uses `react`
41
- (provided by the web runtime) and the `slots` / `locale` client services.
42
-
43
- ## Notes
44
-
45
- - The GitHub search API returns at most 1000 results; the topic currently has
46
- 280+ repos, so paging covers everything.
47
- - READMEs are fetched per plugin on demand and truncated to ~1200 chars.
48
- - If you see "rate-limited", wait an hour or run the web through a proxy that
49
- adds a GitHub token.
50
-
51
- ## License
52
-
53
- MIT
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
+ A **plugin marketplace** inside the DeepSeek Harness Web UI: browse
8
+ [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin) right
9
+ from the settings page — no terminal needed.
10
+
11
+ - **Search** the topic by keyword, **sort** by stars or last update
12
+ - **Plugin cards** with description, stars, language, and update date
13
+ - **Detail panel**: GitHub README summary, install command, repo/npm links
14
+ - **AI explain**: one click asks the configured default model what a plugin
15
+ roughly does, answered in the UI — no need to read the README yourself
16
+ - Powered by the public GitHub search API (CORS-enabled, no key needed;
17
+ unauthenticated rate limit 60 req/h)
18
+ - Zero client dependencies (React only), no build step — hand-written
19
+ ModuleLoader bundle
20
+
21
+ ## Install
22
+
23
+ As a profile bundle (recommended):
24
+
25
+ ```
26
+ dsh plugin --profile web add dsh-plugin-marketplace
27
+ ```
28
+
29
+ or via the package's `dsh.bundle.patch` layer — add `dsh-plugin-marketplace`
30
+ to `dsh.profile.bundles` in `$DSH_HOME/profiles/web/package.json`.
31
+
32
+ Manual mount in `$DSH_HOME/profiles/web/cordis.patch.yml`:
33
+
34
+ ```yaml
35
+ - insert:
36
+ - id: plugin-marketplace
37
+ name: 'dsh-plugin-marketplace'
38
+ ```
39
+
40
+ > **Upgrading from ≤ 0.2.2?** If you previously mounted the plugin manually,
41
+ > **remove that row from `cordis.patch.yml`** before switching to the bundle
42
+ > install — the bundle layer already inserts the entry, and two entries with
43
+ > the same id abort boot with `duplicate loader entry id: plugin-marketplace`.
44
+ > The two ways are alternatives, not both.
45
+
46
+ Then restart `dsh web` (new client plugins require a process restart to be
47
+ scanned into the browser roster) and open **Settings → Plugin Marketplace**.
48
+
49
+ **If the install button answers `settings namespace "plugin-marketplace" is
50
+ not exposed to configuration clients`**: the host apiproxy only lets a
51
+ hard-coded allowlist through, and this plugin patches that allowlist on its
52
+ first boot — the running process still answers `settings-not-exposed` until
53
+ `dsh web` is restarted. Restart once; if the error persists, check the boot
54
+ log for `[settings-expose]` lines (the fix line names the file to edit —
55
+ `WEB_SETTINGS_NAMESPACES` in `dsh-host-apiproxy/lib/index.js`).
56
+
57
+ ## How it works
58
+
59
+ | Layer | File | Role |
60
+ |---|---|---|
61
+ | host shell | `index.js` | settings-backed install + AI-explain flows; `dsh.bundle.patch` makes the package a proper profile bundle |
62
+ | browser half | `client.js` | registers the `settings.section` "marketplace" tab; fetches GitHub search API; renders cards + detail; "AI explain" button |
63
+ | manifest | `package.json` | `dsh.bundle: { patch: "./cordis.patch.yml" }` + `dsh.client: { platform: "web" }` + `exports["./client"]` — discovered by `dsh-client-modules` |
64
+
65
+ The browser half needs no `dsh.client.inject` packages: it only uses `react`
66
+ (provided by the web runtime) and the `slots` / `locale` client services.
67
+
68
+ ## Notes
69
+
70
+ - The GitHub search API returns at most 1000 results; the topic currently has
71
+ 280+ repos, so paging covers everything.
72
+ - READMEs are fetched per plugin on demand and truncated to ~1200 chars.
73
+ - If you see "rate-limited", wait an hour or run the web through a proxy that
74
+ adds a GitHub token.
75
+
76
+ ## License
77
+
78
+ MIT
package/README.zh.md CHANGED
@@ -1,44 +1,64 @@
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
- 在 DeepSeek Harness **Web UI 里内置的插件市场**:直接在设置页浏览
6
- [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin),无需打开终端。
7
-
8
- - **搜索**:按关键词搜索主题下的插件,按 Star 或更新时间**排序**
9
- - **插件卡片**:名称、简介、Star 数、语言、更新时间一目了然
10
- - **详情面板**:GitHub README 摘要、安装命令、仓库 / npm 链接
11
- - 基于 GitHub 公开搜索 API(浏览器 CORS 直连,无需密钥;未认证限流 60 次/小时)
12
- - 零客户端依赖(只用 React),无构建步骤 —— 手写 ModuleLoader bundle
13
-
14
- ## 安装
15
-
16
- 在 `$DSH_HOME/profiles/web/cordis.patch.yml` 里:
17
-
18
- ```yaml
19
- - insert:
20
- - id: plugin-marketplace
21
- name: 'dsh-plugin-marketplace'
22
- ```
23
-
24
- 然后重启 `dsh web`(新客户端插件需要重启进程才会被扫描进浏览器清单),打开 **设置 → 插件市场**。
25
-
26
- ## 实现方式
27
-
28
- | 层 | 文件 | 作用 |
29
- |---|---|---|
30
- | 服务端壳 | `index.js` | 空 apply —— 让包成为 loader entry |
31
- | 浏览器端 | `client.js` | 注册 `settings.section` 的 "marketplace" 分区;调用 GitHub 搜索 API;渲染卡片 + 详情 |
32
- | 清单 | `package.json` | `dsh.client: { platform: "web" }` + `exports["./client"]` —— 被 `dsh-client-modules` 扫描发现 |
33
-
34
- 浏览器端不需要任何 `dsh.client.inject` 依赖包:只用 `react`(web 运行时自带)和 `slots` / `locale` 客户端服务。
35
-
36
- ## 备注
37
-
38
- - GitHub 搜索 API 最多返回 1000 条;该主题目前有 280+ 仓库,翻页可以覆盖全部。
39
- - README 按需按插件拉取,截断到约 1200 字符。
40
- - 遇到 "rate-limited":等一小时,或让 web 走带 GitHub token 的代理。
41
-
42
- ## License
43
-
44
- MIT
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
+ 在 DeepSeek Harness **Web UI 里内置的插件市场**:直接在设置页浏览
6
+ [github.com/topics/dsh-plugin](https://github.com/topics/dsh-plugin),无需打开终端。
7
+
8
+ - **搜索**:按关键词搜索主题下的插件,按 Star 或更新时间**排序**
9
+ - **插件卡片**:名称、简介、Star 数、语言、更新时间一目了然
10
+ - **详情面板**:GitHub README 摘要、安装命令、仓库 / npm 链接
11
+ - **AI 解释**:一键调用已配置的默认模型,用中文直接告诉你这个插件大概是干嘛的,不用自己啃 README
12
+ - 基于 GitHub 公开搜索 API(浏览器 CORS 直连,无需密钥;未认证限流 60 次/小时)
13
+ - 零客户端依赖(只用 React),无构建步骤 —— 手写 ModuleLoader bundle
14
+
15
+ ## 安装
16
+
17
+ 作为 profile bundle 安装(推荐):
18
+
19
+ ```
20
+ dsh plugin --profile web add dsh-plugin-marketplace
21
+ ```
22
+
23
+ 或通过包的 `dsh.bundle.patch` 层:把 `dsh-plugin-marketplace` 加进
24
+ `$DSH_HOME/profiles/web/package.json` 的 `dsh.profile.bundles`。
25
+
26
+ 手动挂载(`$DSH_HOME/profiles/web/cordis.patch.yml`):
27
+
28
+ ```yaml
29
+ - insert:
30
+ - id: plugin-marketplace
31
+ name: 'dsh-plugin-marketplace'
32
+ ```
33
+
34
+ > **从 ≤ 0.2.2 升级?** 如果你之前是手动挂载的,切到 bundle 安装前**先删掉
35
+ > `cordis.patch.yml` 里那一行**——bundle 层自己会插入条目,两行同 id 会让启动
36
+ > 直接报 `duplicate loader entry id: plugin-marketplace`。两种方式二选一,别同时用。
37
+
38
+ 然后重启 `dsh web`(新客户端插件需要重启进程才会被扫描进浏览器清单),打开 **设置 → 插件市场**。
39
+
40
+ **如果点安装按钮报 `settings namespace "plugin-marketplace" is not exposed to
41
+ configuration clients`**:宿主 apiproxy 只放行硬编码白名单里的命名空间,本插件会在
42
+ 首次启动时自动把命名空间补进白名单——但当前进程要到**重启 `dsh web`** 之后才会放行。
43
+ 重启一次即可;若重启后仍报错,看启动日志里的 `[settings-expose]` 提示(它会指出要手动
44
+ 编辑的文件:`dsh-host-apiproxy/lib/index.js` 的 `WEB_SETTINGS_NAMESPACES`)。
45
+
46
+ ## 实现方式
47
+
48
+ | 层 | 文件 | 作用 |
49
+ |---|---|---|
50
+ | 服务端壳 | `index.js` | settings 通道的安装 + AI 解释流程;`dsh.bundle.patch` 让包成为标准 profile bundle |
51
+ | 浏览器端 | `client.js` | 注册 `settings.section` 的 "marketplace" 分区;调用 GitHub 搜索 API;渲染卡片 + 详情;"AI 解释"按钮 |
52
+ | 清单 | `package.json` | `dsh.bundle: { patch: "./cordis.patch.yml" }` + `dsh.client: { platform: "web" }` + `exports["./client"]` —— 被 `dsh-client-modules` 扫描发现 |
53
+
54
+ 浏览器端不需要任何 `dsh.client.inject` 依赖包:只用 `react`(web 运行时自带)和 `slots` / `locale` 客户端服务。
55
+
56
+ ## 备注
57
+
58
+ - GitHub 搜索 API 最多返回 1000 条;该主题目前有 280+ 仓库,翻页可以覆盖全部。
59
+ - README 按需按插件拉取,截断到约 1200 字符。
60
+ - 遇到 "rate-limited":等一小时,或让 web 走带 GitHub token 的代理。
61
+
62
+ ## License
63
+
64
+ MIT