@1e0zj/dsh-plugin-mall 0.1.0 → 0.1.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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 1e0zj
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 1e0zj
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,71 +1,71 @@
1
- # dsh-plugin-mall
2
-
3
- **dsh 插件市场** — 搜索 GitHub `dsh-plugin` 话题下的 DeepSeek Harness 插件仓库,并一键安装到本地 dsh profile。
4
-
5
- 两个入口:
6
-
7
- 1. **设置 → 插件 → 插件市场 tab**(浏览器 UI,dsh web 模式):搜索、看详情、点安装、看进度与已装列表
8
- 2. **会话内 4 个 agent 工具**(所有模式可用)
9
-
10
- | 工具 | 作用 |
11
- |---|---|
12
- | `market_search` | 搜索 GitHub 上带 `topic:dsh-plugin` 标签的仓库(按 star 排序,可按关键词过滤) |
13
- | `market_info` | 查看单个仓库详情:star、license、package.json、是否声明 `dsh.bundle.patch` / `dsh.client` |
14
- | `market_install` | 把插件装进某个 profile(后台任务,可用 `job_output` 查看进度) |
15
- | `market_installed` | 列出某 profile 已装的插件及其 bundle 状态 |
16
-
17
- ## 安装
18
-
19
- ```powershell
20
- # 从 npm(发布后)
21
- dsh plugin --profile web add @1e0zj/dsh-plugin-mall
22
-
23
- # 从 GitHub
24
- dsh plugin --profile web add github:1e0zj/dsh-plugin-mall
25
-
26
- # 本地开发(软链,改代码后重启 dsh 即生效)
27
- dsh plugin --profile web add link:C:\path\to\dsh-plugin-mall
28
- ```
29
-
30
- 装完**重启 dsh**(`dsh web` 进程)后生效。
31
-
32
- > Windows 下用 `link:` 开发本插件时,Node 会从项目的真实路径加载模块,
33
- > 因此项目目录里必须先装一次依赖(`npm install`),裸导入才能解析;
34
- > 通过 npm/GitHub 安装时无此要求(pnpm 会把真实拷贝装进 profile 的 node_modules)。
35
-
36
- ## 工作原理
37
-
38
- - 双面包(dual-face)插件:`dsh.bundle` 半边挂在 **host 平面**(profile bundle 层),
39
- 注册 4 个 agent 工具(进 global 层,所有会话可见,与 MCP 工具同理);
40
- `dsh.client` 半边是浏览器插件,往设置页插件区注册「插件市场」tab
41
- (`settings.plugins.tab` slot;手写无构建,经 `window.__ModuleLoader__` 加载)。
42
- - 浏览器 → 服务端走 Connection 服务的独立 RPC 通道 `/market`
43
- (loopback-only,与 `/api` 通道互不干扰);页面发起的安装任务用进程内
44
- tracker 跟踪 —— web host 层没有 job 控制器,`ctx.jobs` 无法在会话外起任务。
45
- - `market_install` 复刻官方 `dsh plugin add` 的流程:在 profile 目录跑
46
- `pnpm add <spec>`,成功后把声明了 `dsh.bundle.patch` 的依赖登记进
47
- `dsh.profile.bundles`(layer 列表),声明了 `dsh.client` 的依赖自动在
48
- profile 的 `cordis.patch.yml` 注册加载行,与官方 reconcile 逻辑一致。
49
- - GitHub 源的插件安装时要跑 prepare 构建脚本,pnpm 默认拦截;本插件检测到
50
- 拦截后会把包名自动合并进 profile 的 `pnpm-workspace.yaml` 的 `allowBuilds`
51
- 并自动重试一次。
52
- - 配置(`cordis.patch.yml` 中可改):`defaultProfile`(默认装进哪个 profile,
53
- 默认 `web`)、`apiBase`(GitHub API 地址)、`perPageMax`(搜索单页上限)。
54
-
55
- ## 发布
56
-
57
- ```bash
58
- npm publish
59
- # 或在 GitHub 建仓库并打上 topic:dsh-plugin
60
- ```
61
-
62
- ## 开发说明
63
-
64
- - 插件形态:`package.json` 里 `"dsh": { "bundle": { "patch": "./cordis.patch.yml" } }`,
65
- patch 文件把 `dsh-plugin-mall` 这一行 insert 进装配树;**同一行同时是
66
- client 插件行**(`dsh.client` 声明让 client-modules 扫描并服务
67
- `/plugins/<id>/client.js`)。
68
- - node 半边导出具名成员 `{ name, inject, Config, apply }`,**不要** `export default`
69
- (cordis loader 会做 `exports.default ?? exports` 解包,default 会吞掉 inject/Config);
70
- client 半边是 `window.__ModuleLoader__.load({id, factory})`,导出 `{ apply, inject }`。
71
- - 单测 `src/github.js`(无 harness 依赖):`node src/github.js --self-test`。
1
+ # dsh-plugin-mall
2
+
3
+ **dsh 插件市场** — 搜索 GitHub `dsh-plugin` 话题下的 DeepSeek Harness 插件仓库,并一键安装到本地 dsh profile。
4
+
5
+ 两个入口:
6
+
7
+ 1. **设置 → 插件 → 插件市场 tab**(浏览器 UI,dsh web 模式):搜索、看详情、点安装、看进度与已装列表
8
+ 2. **会话内 4 个 agent 工具**(所有模式可用)
9
+
10
+ | 工具 | 作用 |
11
+ |---|---|
12
+ | `market_search` | 搜索 GitHub 上带 `topic:dsh-plugin` 标签的仓库(按 star 排序,可按关键词过滤) |
13
+ | `market_info` | 查看单个仓库详情:star、license、package.json、是否声明 `dsh.bundle.patch` / `dsh.client` |
14
+ | `market_install` | 把插件装进某个 profile(后台任务,可用 `job_output` 查看进度) |
15
+ | `market_installed` | 列出某 profile 已装的插件及其 bundle 状态 |
16
+
17
+ ## 安装
18
+
19
+ ```powershell
20
+ # 从 npm(发布后)
21
+ dsh plugin --profile web add @1e0zj/dsh-plugin-mall
22
+
23
+ # 从 GitHub
24
+ dsh plugin --profile web add github:1e0zj/dsh-plugin-mall
25
+
26
+ # 本地开发(软链,改代码后重启 dsh 即生效)
27
+ dsh plugin --profile web add link:C:\path\to\dsh-plugin-mall
28
+ ```
29
+
30
+ 装完**重启 dsh**(`dsh web` 进程)后生效。
31
+
32
+ > Windows 下用 `link:` 开发本插件时,Node 会从项目的真实路径加载模块,
33
+ > 因此项目目录里必须先装一次依赖(`npm install`),裸导入才能解析;
34
+ > 通过 npm/GitHub 安装时无此要求(pnpm 会把真实拷贝装进 profile 的 node_modules)。
35
+
36
+ ## 工作原理
37
+
38
+ - 双面包(dual-face)插件:`dsh.bundle` 半边挂在 **host 平面**(profile bundle 层),
39
+ 注册 4 个 agent 工具(进 global 层,所有会话可见,与 MCP 工具同理);
40
+ `dsh.client` 半边是浏览器插件,往设置页插件区注册「插件市场」tab
41
+ (`settings.plugins.tab` slot;手写无构建,经 `window.__ModuleLoader__` 加载)。
42
+ - 浏览器 → 服务端走 Connection 服务的独立 RPC 通道 `/market`
43
+ (loopback-only,与 `/api` 通道互不干扰);页面发起的安装任务用进程内
44
+ tracker 跟踪 —— web host 层没有 job 控制器,`ctx.jobs` 无法在会话外起任务。
45
+ - `market_install` 复刻官方 `dsh plugin add` 的流程:在 profile 目录跑
46
+ `pnpm add <spec>`,成功后把声明了 `dsh.bundle.patch` 的依赖登记进
47
+ `dsh.profile.bundles`(layer 列表),声明了 `dsh.client` 的依赖自动在
48
+ profile 的 `cordis.patch.yml` 注册加载行,与官方 reconcile 逻辑一致。
49
+ - GitHub 源的插件安装时要跑 prepare 构建脚本,pnpm 默认拦截;本插件检测到
50
+ 拦截后会把包名自动合并进 profile 的 `pnpm-workspace.yaml` 的 `allowBuilds`
51
+ 并自动重试一次。
52
+ - 配置(`cordis.patch.yml` 中可改):`defaultProfile`(默认装进哪个 profile,
53
+ 默认 `web`)、`apiBase`(GitHub API 地址)、`perPageMax`(搜索单页上限)。
54
+
55
+ ## 发布
56
+
57
+ ```bash
58
+ npm publish
59
+ # 或在 GitHub 建仓库并打上 topic:dsh-plugin
60
+ ```
61
+
62
+ ## 开发说明
63
+
64
+ - 插件形态:`package.json` 里 `"dsh": { "bundle": { "patch": "./cordis.patch.yml" } }`,
65
+ patch 文件把 `dsh-plugin-mall` 这一行 insert 进装配树;**同一行同时是
66
+ client 插件行**(`dsh.client` 声明让 client-modules 扫描并服务
67
+ `/plugins/<id>/client.js`)。
68
+ - node 半边导出具名成员 `{ name, inject, Config, apply }`,**不要** `export default`
69
+ (cordis loader 会做 `exports.default ?? exports` 解包,default 会吞掉 inject/Config);
70
+ client 半边是 `window.__ModuleLoader__.load({id, factory})`,导出 `{ apply, inject }`。
71
+ - 单测 `src/github.js`(无 harness 依赖):`node src/github.js --self-test`。
package/cordis.patch.yml CHANGED
@@ -1,13 +1,13 @@
1
- # dsh-plugin-mall bundle patch: registers the plugin marketplace row.
2
- # Mounted at the host plane (profile bundle layer), so its tools land in the
3
- # tools registry's global layer and every session sees them.
4
- - insert:
5
- - id: dsh-market
6
- name: '@1e0zj/dsh-plugin-mall'
7
- config:
8
- # The profile market_install targets when the caller names none.
9
- defaultProfile: web
10
- # GitHub REST API base (override for self-hosted mirrors/proxies).
11
- apiBase: https://api.github.com
12
- # Upper bound for market_search perPage.
13
- perPageMax: 30
1
+ # dsh-plugin-mall bundle patch: registers the plugin marketplace row.
2
+ # Mounted at the host plane (profile bundle layer), so its tools land in the
3
+ # tools registry's global layer and every session sees them.
4
+ - insert:
5
+ - id: dsh-plugin-mall
6
+ name: '@1e0zj/dsh-plugin-mall'
7
+ config:
8
+ # The profile market_install targets when the caller names none.
9
+ defaultProfile: web
10
+ # GitHub REST API base (override for self-hosted mirrors/proxies).
11
+ apiBase: https://api.github.com
12
+ # Upper bound for market_search perPage.
13
+ perPageMax: 30
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1e0zj/dsh-plugin-mall",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "dsh 插件市场:搜索 GitHub dsh-plugin 话题下的插件仓库,一键安装到本地 dsh profile(agent 工具 + 设置页插件市场 tab)",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -35,13 +35,13 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@deepseek-ai/dsh-app-boot": "^0.1.0-rc.6",
39
- "@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
40
- "@deepseek-ai/schemastery": "^3.18.1",
41
38
  "js-yaml": "^4.2.0"
42
39
  },
43
40
  "peerDependencies": {
44
- "@deepseek-ai/cordis": "^4.0.1"
41
+ "@deepseek-ai/cordis": "^4.0.1",
42
+ "@deepseek-ai/dsh-app-boot": "*",
43
+ "@deepseek-ai/dsh-tools": "*",
44
+ "@deepseek-ai/schemastery": "*"
45
45
  },
46
46
  "repository": {
47
47
  "url": "git+https://github.com/1e0zj/dsh-plugin-mall.git",