dsh-m 0.1.0 → 0.1.1
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.en.md +89 -0
- package/README.md +45 -22
- package/lib/client.js +515 -142
- package/lib/core/dsh-cli.js +118 -10
- package/lib/core/installed.js +69 -4
- package/lib/core/market.js +10 -5
- package/lib/core/progress.js +113 -0
- package/lib/core/registry.js +3 -1
- package/lib/core/versions.js +34 -6
- package/lib/host.js +12 -0
- package/lib/tools.js +2 -1
- package/package.json +2 -1
- package/registry.json +66 -0
package/README.en.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# dsh-m — Plugin Marketplace for DeepSeek Harness
|
|
2
|
+
|
|
3
|
+
[](../../releases)
|
|
4
|
+
[](https://www.npmjs.com/package/dsh-m)
|
|
5
|
+
[](../../actions/workflows/registry.yml)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
[](#faq)
|
|
8
|
+
|
|
9
|
+
English · [中文](./README.md)
|
|
10
|
+
|
|
11
|
+
Your personal plugin marketplace for DeepSeek Harness (DSH): **browse, install, uninstall, upgrade** — all local. Ships as a DSH web plugin: the "Plugin Marketplace" sidebar entry opens a three-view panel, backed by seven `dshm_*` agent tools and the `dshm` CLI.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install -g dsh-m # or: dsh plugin --profile web add dsh-m@<version>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
1. **Restart DSH Web** after installing (one-click restart works too).
|
|
20
|
+
2. Refresh the page and click "**Plugin Marketplace**" at the bottom of the sidebar.
|
|
21
|
+
|
|
22
|
+
First listings include: DSH Skins, DSH Web Search, the Lark / QQ / Weixin / WeCom / DingTalk channel bridges, and dsh-m itself.
|
|
23
|
+
|
|
24
|
+
## Panel
|
|
25
|
+
|
|
26
|
+
| View | Capabilities |
|
|
27
|
+
|---|---|
|
|
28
|
+
| **Market** | Card flow with search, category filters and tags; expandable details; "Install" — npm sources pin the latest exact version, GitHub sources pin the release/tag commit |
|
|
29
|
+
| **Installed** | What your web profile actually has, annotated "via market / non-market"; update badges, upgrade, two-step confirm uninstall; 📖 README preview (64KB cap) |
|
|
30
|
+
| **Settings** | Registry cache status + force refresh, registry source override, dsh-m self-update |
|
|
31
|
+
|
|
32
|
+
After any mutation a "⚡ Restart" banner appears — restart goes through the systemd unit (same-origin checked, detached-helper fallback) and polls by boot id until the service is back. Installs stream live pnpm progress (resolve → download → link → build).
|
|
33
|
+
|
|
34
|
+
## Agent tools (7)
|
|
35
|
+
|
|
36
|
+
| Tool | Purpose |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `dshm_search` | Search the curated registry (renders cards in chat) |
|
|
39
|
+
| `dshm_list` | List installed plugins (market / non-market annotated) |
|
|
40
|
+
| `dshm_install` | Install by listing id |
|
|
41
|
+
| `dshm_uninstall` | Uninstall (confirm first; data kept, leftovers reported) |
|
|
42
|
+
| `dshm_outdated` | Check for newer versions |
|
|
43
|
+
| `dshm_upgrade` | Upgrade to the latest |
|
|
44
|
+
| `dshm_restart` | Restart DSH Web (with user consent) |
|
|
45
|
+
|
|
46
|
+
## CLI
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
dshm search [--query topic] [--category ui]
|
|
50
|
+
dshm list | outdated | registry
|
|
51
|
+
dshm install --id dsh-web-search
|
|
52
|
+
dshm upgrade --pkg dsh-web-search --yes
|
|
53
|
+
dshm uninstall --pkg dsh-web-search --yes
|
|
54
|
+
dshm restart --yes
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Registry
|
|
58
|
+
|
|
59
|
+
`registry.json` is hand-curated and served at runtime via **raw.githubusercontent / jsDelivr `@main`** (local 60-min TTL cache + bundled snapshot fallback) — listing updates are decoupled from plugin releases. To add or amend a listing, edit `registry.json` and open a PR; CI validates schema, npm/GitHub existence, duplicate ids and URL reachability.
|
|
60
|
+
|
|
61
|
+
Security baseline: HTTPS-only fetches with size caps and timeouts; npm installs verified by lock integrity + post-install version match; GitHub installs pinned to commit SHA; pnpm build scripts are allowed-by-policy with an explicit report when unblocked.
|
|
62
|
+
|
|
63
|
+
## Development
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
npm ci
|
|
67
|
+
npm run build # tsc (host/core/cli) + esbuild (client, tree-shaking off)
|
|
68
|
+
npm run typecheck
|
|
69
|
+
node scripts/validate-registry.mjs
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
For local iteration use a `link:` dependency (same trick as dsh-skins): point the profile dependency at this repo, then `npm run build` + restart.
|
|
73
|
+
|
|
74
|
+
Release: `npm version patch|minor|major && git push --tags` → OIDC trusted publishing.
|
|
75
|
+
|
|
76
|
+
## FAQ
|
|
77
|
+
|
|
78
|
+
**Why don't GitHub-sourced update hints follow main?**
|
|
79
|
+
Intermediate commits on main can be unstable. dsh-m tracks **releases / tags** only (`releases/latest` first, tags list as fallback) and pins the commit SHA the tag points to.
|
|
80
|
+
|
|
81
|
+
**Does uninstalling delete my data?**
|
|
82
|
+
No. Only the package reference in the profile is removed (live UI disabled first), and suspected leftover paths are reported to you.
|
|
83
|
+
|
|
84
|
+
**Does it work with third-party skins?**
|
|
85
|
+
Yes. Every color comes from DSH theme semantic tokens (`state-*` / `brand-*` / `bg-overlay`), verified against the official light/dark themes and third-party skins.
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,32 +1,43 @@
|
|
|
1
|
-
# dsh-m —
|
|
1
|
+
# dsh-m — DeepSeek Harness 插件市场
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](../../releases)
|
|
4
|
+
[](https://www.npmjs.com/package/dsh-m)
|
|
5
|
+
[](../../actions/workflows/registry.yml)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
[](#faq)
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
[English](./README.en.md) · 中文
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
个人自用的 DeepSeek Harness (DSH) 插件市场:**收录 · 安装 · 卸载 · 升级**,全部本机完成。以 DSH web 插件形态运行——侧栏「插件市场」打开三视图面板,同时提供 `dshm_*` agent 工具与 `dshm` CLI。
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
## 30 秒上手
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install -g dsh-m # 或 dsh plugin --profile web add dsh-m@<version>
|
|
11
17
|
```
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
1. 安装后**重启 DSH Web**(一键重启亦可)。
|
|
20
|
+
2. 刷新页面,点击侧栏底部的「**插件市场**」。
|
|
21
|
+
|
|
22
|
+
收录清单里的首批插件:DSH Skins、DSH Web Search、Lark / QQ / 微信 / 企业微信 / 钉钉通道桥,以及 dsh-m 自身。
|
|
14
23
|
|
|
15
|
-
##
|
|
24
|
+
## 界面(侧栏「插件市场」)
|
|
16
25
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
| 视图 | 能力 |
|
|
27
|
+
|---|---|
|
|
28
|
+
| **市场** | 收录卡片流;关键词搜索、分类筛选、标签;卡片展开详情与「安装」;npm 源锁定最新精确版本,GitHub 源锁定 release/tag 指向的 commit |
|
|
29
|
+
| **已装** | web profile 实装列表,标注「市场安装 / 非市场安装」;可升级徽标、升级、两段式确认卸载;📖 README 预览(64KB 截断) |
|
|
30
|
+
| **设置** | 收录清单缓存状态与强制刷新、registry 源覆盖、dsh-m 自更新 |
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
安装 / 卸载 / 升级完成后出现「⚡ 一键重启」横幅——重启走 systemd 单元(同源校验,兜底 detached helper),按 boot id 轮询直至服务恢复。安装过程实时显示 pnpm 进度(解析 → 下载 → 链接 → 构建)。
|
|
22
33
|
|
|
23
|
-
## Agent
|
|
34
|
+
## Agent 工具(7 个)
|
|
24
35
|
|
|
25
36
|
| 工具 | 用途 |
|
|
26
37
|
|---|---|
|
|
27
38
|
| `dshm_search` | 搜收录清单(对话内出卡片) |
|
|
28
|
-
| `dshm_list` |
|
|
29
|
-
| `dshm_install` | 按收录 id
|
|
39
|
+
| `dshm_list` | 列已装插件(市场/非市场标注) |
|
|
40
|
+
| `dshm_install` | 按收录 id 安装 |
|
|
30
41
|
| `dshm_uninstall` | 卸载(先确认;不删数据,报告残留路径) |
|
|
31
42
|
| `dshm_outdated` | 检查最新版本 |
|
|
32
43
|
| `dshm_upgrade` | 升级到最新 |
|
|
@@ -34,10 +45,9 @@ npm install -g dsh-m # 或由你的 DSH 插件市场/手动装进 web profile
|
|
|
34
45
|
|
|
35
46
|
## CLI
|
|
36
47
|
|
|
37
|
-
```
|
|
48
|
+
```sh
|
|
38
49
|
dshm search [--query 主题] [--category ui]
|
|
39
|
-
dshm list
|
|
40
|
-
dshm outdated
|
|
50
|
+
dshm list | outdated | registry
|
|
41
51
|
dshm install --id dsh-web-search
|
|
42
52
|
dshm upgrade --pkg dsh-web-search --yes
|
|
43
53
|
dshm uninstall --pkg dsh-web-search --yes
|
|
@@ -46,20 +56,33 @@ dshm restart --yes
|
|
|
46
56
|
|
|
47
57
|
## 收录清单(registry)
|
|
48
58
|
|
|
49
|
-
`registry.json` 手工 curated,运行时经 **
|
|
59
|
+
`registry.json` 手工 curated,运行时经 **raw.githubusercontent / jsDelivr `@main`** 分发(本地 60 分钟 TTL 缓存 + 包内快照兜底)——收录更新与插件发版**解耦**。收录 / 修订直接改 `registry.json` 发 PR,CI 自动校验:schema、npm 包与 GitHub 仓库存在性、重复 id、URL 可达性。
|
|
50
60
|
|
|
51
61
|
安全基线:拉取仅 HTTPS + 体积上限 + 超时;npm 安装按 lock integrity 校验 + 装后版本核对;GitHub 安装强制锁定 commit SHA;pnpm 构建脚本被拦时按策略放行并明确报告。
|
|
52
62
|
|
|
53
63
|
## 开发
|
|
54
64
|
|
|
55
|
-
```
|
|
65
|
+
```sh
|
|
56
66
|
npm ci
|
|
57
|
-
npm run build # tsc(host/core/cli)+ esbuild(client,tree-shaking
|
|
67
|
+
npm run build # tsc(host/core/cli)+ esbuild(client,tree-shaking 已关闭)
|
|
58
68
|
npm run typecheck
|
|
59
69
|
node scripts/validate-registry.mjs
|
|
60
70
|
```
|
|
61
71
|
|
|
62
|
-
|
|
72
|
+
本地调试推荐 `link:` 模式(与 dsh-skins 相同):profile 依赖指向本仓库目录,`npm run build` + 重启即生效。
|
|
73
|
+
|
|
74
|
+
发版:`npm version patch|minor|major && git push --tags` → OIDC trusted publishing 自动发布。
|
|
75
|
+
|
|
76
|
+
## FAQ
|
|
77
|
+
|
|
78
|
+
**为什么 GitHub 来源的更新提示不走 main HEAD?**
|
|
79
|
+
main 上的中间提交可能不稳定。dsh-m 只跟踪 **release / tag**(优先 `releases/latest`,无 release 回退 tags 列表),安装时锁定 tag 指向的 commit SHA。
|
|
80
|
+
|
|
81
|
+
**卸载会删我的数据吗?**
|
|
82
|
+
不会。只移除 profile 中的包引用(卸载前先下线运行中的界面),并把疑似残留路径报告给你。
|
|
83
|
+
|
|
84
|
+
**支持第三方皮肤吗?**
|
|
85
|
+
支持。全部配色来自 DSH 主题语义 token(`state-*` / `brand-*` / `bg-overlay` 等),官方深浅色与第三方皮肤均已验证。
|
|
63
86
|
|
|
64
87
|
## License
|
|
65
88
|
|