dsh-plugin-marketplace 0.3.4 → 0.3.5
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 +7 -15
- package/README.zh.md +4 -5
- package/client.js +2 -2
- package/index.js +20 -23
- package/package.json +65 -61
package/README.md
CHANGED
|
@@ -22,13 +22,12 @@ from the settings page — no terminal needed.
|
|
|
22
22
|
- Zero client dependencies (React only), no build step — hand-written
|
|
23
23
|
ModuleLoader bundle
|
|
24
24
|
|
|
25
|
-
## Compatibility (v0.3.
|
|
25
|
+
## Compatibility (v0.3.5)
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
installation is blocked upstream. Alpha releases remain `unknown`.
|
|
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`.
|
|
32
31
|
|
|
33
32
|
## Install
|
|
34
33
|
|
|
@@ -58,15 +57,8 @@ Manual mount in `$DSH_HOME/profiles/web/cordis.patch.yml`:
|
|
|
58
57
|
Then restart `dsh web` (new client plugins require a process restart to be
|
|
59
58
|
scanned into the browser roster) and open **Settings → Plugin Marketplace**.
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
therefore require DSH `0.1.0-rc.7` or newer. DSH `0.1.0-rc.6` users must pin
|
|
64
|
-
`dsh-plugin-marketplace@0.2.6`, the last release carrying the legacy
|
|
65
|
-
settings-allowlist compatibility patch.
|
|
66
|
-
|
|
67
|
-
DSH `0.1.2-rc.1` removed the client-side `connection.api` (the legacy settings
|
|
68
|
-
RPC face); version 0.3.1 therefore writes through the bound `settingsScope`'s
|
|
69
|
-
own `mutate` (hosts older than `0.1.2-rc.1` still use the legacy channel).
|
|
60
|
+
Version 0.3.5 uses DSH's `configForms` client service and Profile patch
|
|
61
|
+
settings. Use an older plugin release with older DSH hosts.
|
|
70
62
|
Note: when dsh web is opened from a non-loopback origin (a LAN IP, say), DSH
|
|
71
63
|
keeps settings writes process-local, so install / AI-explain requests never
|
|
72
64
|
reach the host.
|
package/README.zh.md
CHANGED
|
@@ -16,12 +16,11 @@
|
|
|
16
16
|
- 基于 GitHub 公开搜索 API(浏览器 CORS 直连,无需密钥;未认证限流 60 次/小时)
|
|
17
17
|
- 零客户端依赖(只用 React),无构建步骤 —— 手写 ModuleLoader bundle
|
|
18
18
|
|
|
19
|
-
## 兼容性(v0.3.
|
|
19
|
+
## 兼容性(v0.3.5)
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
`
|
|
24
|
-
包临时回退为 rc.2;rc.3 原样安装仍受上游阻塞。alpha 版本继续标记 `unknown`。
|
|
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`。
|
|
25
24
|
|
|
26
25
|
## 安装
|
|
27
26
|
|
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", "
|
|
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.
|
|
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,10 +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
|
-
|
|
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),
|
|
39
40
|
}),
|
|
40
41
|
/** AI-explain request (client writes repo/desc/readme, host answers). */
|
|
41
42
|
aiExplain: z.object({
|
|
@@ -51,13 +52,13 @@ const Config = z.object({
|
|
|
51
52
|
repo: z.string().default(""),
|
|
52
53
|
ts: z.number().default(0),
|
|
53
54
|
}),
|
|
54
|
-
});
|
|
55
|
+
}).volatile();
|
|
55
56
|
|
|
56
57
|
/** npm package-name shape (scope/name, no spaces, no path chars). */
|
|
57
58
|
const PKG_NAME = /^@?[a-z0-9][a-z0-9-._]*(?:\/[a-z0-9][a-z0-9-._]*)?$/;
|
|
58
59
|
|
|
59
|
-
function apply(ctx, config) {
|
|
60
|
-
|
|
60
|
+
function apply(ctx, config) {
|
|
61
|
+
const sourceGetter = () => typeof config.get === "function" ? config.get() : config;
|
|
61
62
|
let lastTs = 0;
|
|
62
63
|
let lastExplainTs = 0;
|
|
63
64
|
|
|
@@ -69,27 +70,23 @@ function apply(ctx, config) {
|
|
|
69
70
|
// `installSettingsSection` export (the provider now lives at ctx.settings).
|
|
70
71
|
// Inline the same logic via ctx.inject(["settings"]) — works on both
|
|
71
72
|
// 0.1.1 (module export wrapper) and 0.1.2 (ctx.settings) hosts.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
void maybeRunInstall();
|
|
81
|
-
void maybeRunExplain();
|
|
82
|
-
|
|
83
|
-
void maybeRunInstall();
|
|
84
|
-
void maybeRunExplain();
|
|
85
|
-
});
|
|
86
|
-
});
|
|
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
|
+
});
|
|
87
84
|
|
|
88
85
|
// DSH 0.1.0-rc.7+ exposes registered settings namespaces natively, allowing
|
|
89
86
|
// the browser client to write install requests without modifying host files.
|
|
90
87
|
/** Resolved current config (settings layer over the entry). */
|
|
91
88
|
function current() {
|
|
92
|
-
return sourceGetter
|
|
89
|
+
return sourceGetter();
|
|
93
90
|
}
|
|
94
91
|
|
|
95
92
|
/** Write the install-state report (and clear the consumed request). */
|
package/package.json
CHANGED
|
@@ -1,71 +1,75 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-plugin-marketplace",
|
|
3
|
-
"version": "0.3.
|
|
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
|
-
},
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-plugin-marketplace",
|
|
3
|
+
"version": "0.3.5",
|
|
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
16
|
"client": {
|
|
17
17
|
"platform": "web"
|
|
18
18
|
},
|
|
19
19
|
"compatibility": {
|
|
20
|
-
"dsh": ">=0.1.
|
|
20
|
+
"dsh": ">=0.1.7-rc.1 <0.2.0",
|
|
21
21
|
"dshReleases": {
|
|
22
|
-
"0.1.5-rc.2": "
|
|
23
|
-
"0.1.5-rc.3": "
|
|
22
|
+
"0.1.5-rc.2": "incompatible",
|
|
23
|
+
"0.1.5-rc.3": "incompatible",
|
|
24
24
|
"0.1.6-alpha.1": "unknown",
|
|
25
25
|
"0.1.6-alpha.2": "unknown",
|
|
26
|
-
"0.1.7-alpha.1": "unknown"
|
|
26
|
+
"0.1.7-alpha.1": "unknown",
|
|
27
|
+
"0.1.7-alpha.2": "unknown",
|
|
28
|
+
"0.1.7-rc.1": "compatible"
|
|
27
29
|
},
|
|
28
30
|
"node": ">=20.18",
|
|
29
|
-
"profiles": [
|
|
31
|
+
"profiles": [
|
|
32
|
+
"web"
|
|
33
|
+
]
|
|
30
34
|
}
|
|
31
|
-
},
|
|
32
|
-
"scripts": {
|
|
33
|
-
"test": "node --test tests/settings-write-verify.test.mjs"
|
|
34
|
-
},
|
|
35
|
-
"files": [
|
|
36
|
-
"index.js",
|
|
37
|
-
"client.js",
|
|
38
|
-
"cordis.patch.yml",
|
|
39
|
-
"README.md",
|
|
40
|
-
"README.zh.md",
|
|
41
|
-
"LICENSE",
|
|
42
|
-
"vendor"
|
|
43
|
-
],
|
|
44
|
-
"homepage": "https://github.com/Scorp1o117/dsh-plugin-marketplace",
|
|
45
|
-
"keywords": [
|
|
46
|
-
"dsh",
|
|
47
|
-
"dsh-plugin",
|
|
48
|
-
"deepseek-harness",
|
|
49
|
-
"marketplace",
|
|
50
|
-
"web-ui"
|
|
51
|
-
],
|
|
52
|
-
"license": "MIT",
|
|
53
|
-
"engines": {
|
|
54
|
-
"node": ">=20.18"
|
|
55
|
-
},
|
|
56
|
-
"repository": {
|
|
57
|
-
"type": "git",
|
|
58
|
-
"url": "git+https://github.com/Scorp1o117/dsh-plugin-marketplace.git"
|
|
59
|
-
},
|
|
60
|
-
"bugs": {
|
|
61
|
-
"url": "https://github.com/Scorp1o117/dsh-plugin-marketplace/issues"
|
|
62
|
-
},
|
|
63
|
-
"peerDependencies": {
|
|
64
|
-
"react": "^18.2.0",
|
|
65
|
-
"@deepseek-ai/dsh-settings": "^0.1.
|
|
66
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
67
|
-
},
|
|
68
|
-
"dependencies": {
|
|
69
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
70
|
-
}
|
|
71
|
-
}
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"test": "node --test tests/settings-write-verify.test.mjs"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"index.js",
|
|
41
|
+
"client.js",
|
|
42
|
+
"cordis.patch.yml",
|
|
43
|
+
"README.md",
|
|
44
|
+
"README.zh.md",
|
|
45
|
+
"LICENSE",
|
|
46
|
+
"vendor"
|
|
47
|
+
],
|
|
48
|
+
"homepage": "https://github.com/Scorp1o117/dsh-plugin-marketplace",
|
|
49
|
+
"keywords": [
|
|
50
|
+
"dsh",
|
|
51
|
+
"dsh-plugin",
|
|
52
|
+
"deepseek-harness",
|
|
53
|
+
"marketplace",
|
|
54
|
+
"web-ui"
|
|
55
|
+
],
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=20.18"
|
|
59
|
+
},
|
|
60
|
+
"repository": {
|
|
61
|
+
"type": "git",
|
|
62
|
+
"url": "git+https://github.com/Scorp1o117/dsh-plugin-marketplace.git"
|
|
63
|
+
},
|
|
64
|
+
"bugs": {
|
|
65
|
+
"url": "https://github.com/Scorp1o117/dsh-plugin-marketplace/issues"
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"react": "^18.2.0",
|
|
69
|
+
"@deepseek-ai/dsh-settings": "^0.1.7-rc.1",
|
|
70
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-rc.1"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@deepseek-ai/schemastery": "^3.18.4"
|
|
74
|
+
}
|
|
75
|
+
}
|