dsh-plugin-marketplace 0.2.7 → 0.3.0
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 +21 -21
- package/README.md +5 -4
- package/README.zh.md +4 -3
- package/client.js +2 -2
- package/index.js +22 -12
- package/package.json +54 -54
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
|
@@ -50,10 +50,11 @@ Manual mount in `$DSH_HOME/profiles/web/cordis.patch.yml`:
|
|
|
50
50
|
Then restart `dsh web` (new client plugins require a process restart to be
|
|
51
51
|
scanned into the browser roster) and open **Settings → Plugin Marketplace**.
|
|
52
52
|
|
|
53
|
-
DSH `0.1.
|
|
54
|
-
marketplace works without patching official files.
|
|
55
|
-
`
|
|
56
|
-
`dsh-
|
|
53
|
+
DSH `0.1.0-rc.7` and newer expose every registered settings namespace, so the
|
|
54
|
+
marketplace works without patching official files. Version 0.2.8 and newer
|
|
55
|
+
therefore require DSH `0.1.0-rc.7` or newer. DSH `0.1.0-rc.6` users must pin
|
|
56
|
+
`dsh-plugin-marketplace@0.2.6`, the last release carrying the legacy
|
|
57
|
+
settings-allowlist compatibility patch.
|
|
57
58
|
|
|
58
59
|
## How it works
|
|
59
60
|
|
package/README.zh.md
CHANGED
|
@@ -41,9 +41,10 @@ dsh plugin --profile web add dsh-plugin-marketplace
|
|
|
41
41
|
|
|
42
42
|
然后重启 `dsh web`(新客户端插件需要重启进程才会被扫描进浏览器清单),打开 **设置 → 插件市场**。
|
|
43
43
|
|
|
44
|
-
DSH `0.1.
|
|
45
|
-
|
|
46
|
-
`dsh-
|
|
44
|
+
DSH `0.1.0-rc.7` 起会公开全部已注册的 settings 命名空间,插件市场无需再修改官方文件。
|
|
45
|
+
因此从 `0.2.8` 起最低支持 DSH `0.1.0-rc.7`。仍使用 DSH `0.1.0-rc.6` 的用户
|
|
46
|
+
请锁定 `dsh-plugin-marketplace@0.2.6`;这是最后一个包含旧 settings 白名单兼容
|
|
47
|
+
补丁的版本。
|
|
47
48
|
|
|
48
49
|
## 实现方式
|
|
49
50
|
|
package/client.js
CHANGED
|
@@ -82,7 +82,7 @@ window.__ModuleLoader__.load({
|
|
|
82
82
|
aiExplain: "🤖 AI 解释",
|
|
83
83
|
aiExplaining: "AI 解释中,请稍候…",
|
|
84
84
|
aiExplainErr: "AI 解释失败:{msg}",
|
|
85
|
-
notExposed: "当前 DSH 版本没有公开插件市场的设置通道;请升级到 DSH 0.1.
|
|
85
|
+
notExposed: "当前 DSH 版本没有公开插件市场的设置通道;请升级到 DSH 0.1.0-rc.7 或更高版本并重启 dsh web。"
|
|
86
86
|
};
|
|
87
87
|
var en = {
|
|
88
88
|
nav: "Plugin Marketplace",
|
|
@@ -113,7 +113,7 @@ window.__ModuleLoader__.load({
|
|
|
113
113
|
aiExplain: "🤖 AI Explain",
|
|
114
114
|
aiExplaining: "AI is explaining…",
|
|
115
115
|
aiExplainErr: "AI explain failed: {msg}",
|
|
116
|
-
notExposed: "This DSH version does not expose the plugin-marketplace settings channel. Upgrade to DSH 0.1.
|
|
116
|
+
notExposed: "This DSH version does not expose the plugin-marketplace settings channel. Upgrade to DSH 0.1.0-rc.7 or newer and restart dsh web."
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
// ── GitHub API ────────────────────────────────────────────────────────
|
package/index.js
CHANGED
|
@@ -16,14 +16,13 @@ import { join } from "node:path";
|
|
|
16
16
|
import os from "node:os";
|
|
17
17
|
import z from "@deepseek-ai/schemastery";
|
|
18
18
|
import { BlockAssembler, createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
19
|
-
import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-settings";
|
|
20
19
|
|
|
21
20
|
/** Cordis plugin name. */
|
|
22
21
|
const name = "plugin-marketplace";
|
|
23
22
|
/** Services this plugin needs injected from the host tree (ctx.get requires inject). */
|
|
24
23
|
const inject = ["llm", "agentDefaultModel"];
|
|
25
24
|
/** Settings namespace owned by this plugin (Web UI settings section + install channel). */
|
|
26
|
-
const NS =
|
|
25
|
+
const NS = "plugin-marketplace";
|
|
27
26
|
|
|
28
27
|
/** Runtime schema: the install request + the install state report. */
|
|
29
28
|
const Config = z.object({
|
|
@@ -63,20 +62,31 @@ function apply(ctx, config) {
|
|
|
63
62
|
let lastExplainTs = 0;
|
|
64
63
|
|
|
65
64
|
// ── settings-backed configuration ─────────────────────────────────────────
|
|
66
|
-
// The browser half edits this namespace;
|
|
67
|
-
// which is what turns an `install` request into a real
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
// The browser half edits this namespace; every write fires the onChange
|
|
66
|
+
// handler below, which is what turns an `install` request into a real
|
|
67
|
+
// install.
|
|
68
|
+
// Compat shim: dsh-settings 0.1.2-rc.1 removed the module-level
|
|
69
|
+
// `installSettingsSection` export (the provider now lives at ctx.settings).
|
|
70
|
+
// Inline the same logic via ctx.inject(["settings"]) — works on both
|
|
71
|
+
// 0.1.1 (module export wrapper) and 0.1.2 (ctx.settings) hosts.
|
|
72
|
+
ctx.inject(["settings"], (sctx) => {
|
|
73
|
+
const scope = sctx.settings.register(NS, Config, { base: config });
|
|
74
|
+
sourceGetter = () => scope.get();
|
|
75
|
+
sctx.effect(() => () => {
|
|
76
|
+
sourceGetter = null;
|
|
77
|
+
});
|
|
78
|
+
// Mirror the old installSettingsSection contract: fire once at attach so a
|
|
79
|
+
// request persisted across restarts is consumed, then on every write.
|
|
80
|
+
void maybeRunInstall();
|
|
81
|
+
void maybeRunExplain();
|
|
82
|
+
scope.watch(() => {
|
|
73
83
|
void maybeRunInstall();
|
|
74
84
|
void maybeRunExplain();
|
|
75
|
-
}
|
|
85
|
+
});
|
|
76
86
|
});
|
|
77
87
|
|
|
78
|
-
//
|
|
79
|
-
//
|
|
88
|
+
// DSH 0.1.0-rc.7+ exposes registered settings namespaces natively, allowing
|
|
89
|
+
// the browser client to write install requests without modifying host files.
|
|
80
90
|
/** Resolved current config (settings layer over the entry). */
|
|
81
91
|
function current() {
|
|
82
92
|
return sourceGetter ? sourceGetter() : config;
|
package/package.json
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name":
|
|
3
|
-
"version":
|
|
4
|
-
"description":
|
|
5
|
-
"type":
|
|
6
|
-
"main":
|
|
7
|
-
"exports":
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"dsh":
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"files":
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"homepage":
|
|
30
|
-
"keywords":
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"license":
|
|
38
|
-
"engines":
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"repository":
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"bugs":
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"peerDependencies":
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"dependencies":
|
|
54
|
-
|
|
55
|
-
|
|
2
|
+
"name": "dsh-plugin-marketplace",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "DeepSeek Harness Web UI 内置插件市场:在设置页直接浏览 github.com/topics/dsh-plugin,支持搜索、按 Star 排序、查看安装方式。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./client": "./client.js",
|
|
10
|
+
"./package.json": "./package.json"
|
|
11
|
+
},
|
|
12
|
+
"dsh": {
|
|
13
|
+
"bundle": {
|
|
14
|
+
"patch": "./cordis.patch.yml"
|
|
15
|
+
},
|
|
16
|
+
"client": {
|
|
17
|
+
"platform": "web"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"index.js",
|
|
22
|
+
"client.js",
|
|
23
|
+
"cordis.patch.yml",
|
|
24
|
+
"README.md",
|
|
25
|
+
"README.zh.md",
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"vendor"
|
|
28
|
+
],
|
|
29
|
+
"homepage": "https://github.com/Scorp1o117/dsh-plugin-marketplace",
|
|
30
|
+
"keywords": [
|
|
31
|
+
"dsh",
|
|
32
|
+
"dsh-plugin",
|
|
33
|
+
"deepseek-harness",
|
|
34
|
+
"marketplace",
|
|
35
|
+
"web-ui"
|
|
36
|
+
],
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=20.18"
|
|
40
|
+
},
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "git+https://github.com/Scorp1o117/dsh-plugin-marketplace.git"
|
|
44
|
+
},
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/Scorp1o117/dsh-plugin-marketplace/issues"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"react": "^18.2.0",
|
|
50
|
+
"@deepseek-ai/dsh-settings": "^0.1.0-rc.7 || ^0.1.1-rc.1 || ^0.1.2-rc.1",
|
|
51
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.7 || ^0.1.1-rc.1 || ^0.1.2-rc.1"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
55
|
+
}
|
|
56
56
|
}
|