dsh-m 0.10.2 → 0.10.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.en.md +2 -2
- package/README.md +2 -2
- package/lib/client.js +49 -6
- package/lib/core/host-api.js +8 -1
- package/package.json +1 -3
- package/registry.json +5 -5
- package/CHANGELOG.md +0 -1347
- package/docs/DESIGN.md +0 -311
package/README.en.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# dsh-m — Plugin Marketplace for DeepSeek Harness
|
|
2
2
|
|
|
3
|
-
[](https://github.com/iasiv5/dsh-m/releases)
|
|
4
3
|
[](https://www.npmjs.com/package/dsh-m)
|
|
5
4
|
[](https://github.com/iasiv5/dsh-m/actions/workflows/registry.yml)
|
|
6
5
|
[](./LICENSE)
|
|
7
|
-
[](#compatibility--faq)
|
|
8
7
|
|
|
9
8
|
English · [中文](./README.md)
|
|
10
9
|
|
|
@@ -80,6 +79,7 @@ The GUI and Agent tools manage the **current host profile** (Web or Desktop). Th
|
|
|
80
79
|
| `0.1.5-rc.1 / rc.2` | `register()` scope | Checked; rc.1 also page-tested |
|
|
81
80
|
| `0.1.7-rc.1 / rc.2` | `.volatile()` + `settings.update` | Checked |
|
|
82
81
|
| `0.2.0-rc.1 / rc.2` | Same as 0.1.7 | rc.2 and restart path live-tested |
|
|
82
|
+
| `0.2.1-rc.2` | Same as 0.2.0 | Install/upgrade and D3 self-upgrade dogfooded (0.10.x line) |
|
|
83
83
|
|
|
84
84
|
**Is Desktop identical to Web?** No. Desktop browsing, new-package installation, and toggles act on the desktop profile. Upgrades and uninstalls require capabilities from the official host `pluginManager`; if absent, dsh-m returns a structured refusal and guidance. Desktop uses the official app lifecycle rather than Web's one-click restart; quit and reopen as instructed. Favorites, operations, and installed states are separate between profiles.
|
|
85
85
|
|
package/README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# dsh-m — DeepSeek Harness 插件市场
|
|
2
2
|
|
|
3
|
-
[](https://github.com/iasiv5/dsh-m/releases)
|
|
4
3
|
[](https://www.npmjs.com/package/dsh-m)
|
|
5
4
|
[](https://github.com/iasiv5/dsh-m/actions/workflows/registry.yml)
|
|
6
5
|
[](./LICENSE)
|
|
7
|
-
[](#兼容与常见问题)
|
|
8
7
|
|
|
9
8
|
[English](./README.en.md) · 中文
|
|
10
9
|
|
|
@@ -80,6 +79,7 @@ GUI 与 Agent 工具始终跟随**当前宿主 profile**(Web / Desktop);
|
|
|
80
79
|
| `0.1.5-rc.1 / rc.2` | `register()` scope | 已核对;rc.1 另有页面实测 |
|
|
81
80
|
| `0.1.7-rc.1 / rc.2` | `.volatile()` + `settings.update` | 已核对 |
|
|
82
81
|
| `0.2.0-rc.1 / rc.2` | 同 0.1.7 通路 | rc.2 与重启链路实测 |
|
|
82
|
+
| `0.2.1-rc.2` | 同 0.2.0 通路 | 装机/升级与 D3 自升级 dogfood 实测(0.10.x 线) |
|
|
83
83
|
|
|
84
84
|
**Desktop 与 Web 完全一样吗?** 不是。Desktop 的浏览、安装新包和开关作用于 desktop profile;升级/卸载等操作需宿主官方 `pluginManager` 提供相应能力,缺失时返回结构化拒绝和指引。Desktop 不提供 Web 的一键重启;变更需按应用提示退出并重新打开。两边的收藏、操作记录和已装状态互不串联。
|
|
85
85
|
|
package/lib/client.js
CHANGED
|
@@ -1562,7 +1562,7 @@ function createOperationsStore(storage) {
|
|
|
1562
1562
|
}
|
|
1563
1563
|
};
|
|
1564
1564
|
}
|
|
1565
|
-
async function restoreRecords(records, stillApplies) {
|
|
1565
|
+
async function restoreRecords(records, stillApplies, installedVersionOf) {
|
|
1566
1566
|
const list = Array.isArray(records) ? records : [];
|
|
1567
1567
|
const out = [];
|
|
1568
1568
|
for (const rec of list) {
|
|
@@ -1584,6 +1584,24 @@ async function restoreRecords(records, stillApplies) {
|
|
|
1584
1584
|
} else if (rec.status === "input") {
|
|
1585
1585
|
out.push({ ...rec, status: "failed", error: "\u5F85\u51B3\u786E\u8BA4\u4E0D\u53EF\u6062\u590D\uFF0C\u8BF7\u91CD\u65B0\u53D1\u8D77", updatedAt: Date.now() });
|
|
1586
1586
|
} else if (rec.status === "running") {
|
|
1587
|
+
if (rec.kind === "upgrade" && rec.meta && typeof rec.meta.toVersion === "string" && rec.meta.toVersion !== "" && typeof installedVersionOf === "function") {
|
|
1588
|
+
let installed;
|
|
1589
|
+
try {
|
|
1590
|
+
installed = await installedVersionOf(rec);
|
|
1591
|
+
} catch {
|
|
1592
|
+
installed = void 0;
|
|
1593
|
+
}
|
|
1594
|
+
if (installed === rec.meta.toVersion) {
|
|
1595
|
+
out.push({
|
|
1596
|
+
...rec,
|
|
1597
|
+
status: "done",
|
|
1598
|
+
error: void 0,
|
|
1599
|
+
meta: { ...rec.meta, reconciledAfterRestart: true },
|
|
1600
|
+
updatedAt: Date.now()
|
|
1601
|
+
});
|
|
1602
|
+
continue;
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1587
1605
|
out.push({ ...rec, status: "failed", error: "\u8FDB\u7A0B\u91CD\u542F\u4E2D\u65AD", updatedAt: Date.now() });
|
|
1588
1606
|
} else {
|
|
1589
1607
|
out.push({ ...rec });
|
|
@@ -2351,6 +2369,8 @@ var ZH = {
|
|
|
2351
2369
|
"op.degraded": "\u5347\u7EA7\u5931\u8D25\uFF1A\u65B0\u7248\u5B89\u88C5\u672A\u6210\u529F\uFF0C\u5DF2\u81EA\u52A8\u6062\u590D\u65E7\u7248 {restoredTo}\u2014\u2014\u63D2\u4EF6\u5F53\u524D\u53EF\u7528\uFF0C\u53EF\u7A0D\u540E\u91CD\u8BD5\u3002",
|
|
2352
2370
|
"notify.selfupgraded": "dsh-m \u5DF2\u5347\u7EA7\uFF08v{from} \u2192 v{to}\uFF09",
|
|
2353
2371
|
"notify.selfupgraded.failed": "dsh-m \u5347\u7EA7\u5931\u8D25\uFF1A{err}",
|
|
2372
|
+
"selfupgrade.reconciled.done": "dsh-m \u81EA\u5347\u7EA7\u5DF2\u5B8C\u6210\uFF08\u5F00\u673A\u5BF9\u8D26\u786E\u8BA4\uFF09\uFF1A{from} \u2192 {to}\u3002",
|
|
2373
|
+
"selfupgrade.reconciled.failed": "dsh-m \u81EA\u5347\u7EA7\u672A\u5B8C\u6210\uFF08\u5F00\u673A\u5BF9\u8D26\u786E\u8BA4\uFF09\uFF1A\u76EE\u6807 {to} \u672A\u88C5\u673A\uFF0C\u5F53\u524D\u4ECD\u4E3A {current}\uFF0C\u53EF\u91CD\u8BD5\u3002",
|
|
2354
2374
|
"failed.install": "\u5B89\u88C5\u5931\u8D25\uFF1A{err}",
|
|
2355
2375
|
"failed.uninstall": "\u5378\u8F7D\u5931\u8D25\uFF1A{err}",
|
|
2356
2376
|
"failed.upgrade": "\u5347\u7EA7\u5931\u8D25\uFF1A{err}",
|
|
@@ -2652,6 +2672,8 @@ var EN = {
|
|
|
2652
2672
|
"op.degraded": "Upgrade failed: the new version did not install \u2014 rolled back to {restoredTo}. The plugin still works; you can retry later.",
|
|
2653
2673
|
"notify.selfupgraded": "dsh-m upgraded (v{from} \u2192 v{to})",
|
|
2654
2674
|
"notify.selfupgraded.failed": "dsh-m upgrade failed: {err}",
|
|
2675
|
+
"selfupgrade.reconciled.done": "dsh-m self-upgrade finished (confirmed by boot reconciliation): {from} \u2192 {to}.",
|
|
2676
|
+
"selfupgrade.reconciled.failed": "dsh-m self-upgrade did not complete (confirmed by boot reconciliation): target {to} is not installed \u2014 still {current}; you can retry.",
|
|
2655
2677
|
"failed.install": "Install failed: {err}",
|
|
2656
2678
|
"failed.uninstall": "Uninstall failed: {err}",
|
|
2657
2679
|
"failed.upgrade": "Upgrade failed: {err}",
|
|
@@ -4168,7 +4190,7 @@ function MarketTab({ notify, markets, onMutation, ops, favorites, profileKind, o
|
|
|
4168
4190
|
const r = await api("upgrade", { pkg: it.installedPkg });
|
|
4169
4191
|
const m = opUpgradeMeta2(r);
|
|
4170
4192
|
return m ? { ...r, opMeta: m } : r;
|
|
4171
|
-
});
|
|
4193
|
+
}, { toVersion: it.latest });
|
|
4172
4194
|
const degraded = oc.degradedOutcome(res);
|
|
4173
4195
|
if (degraded) {
|
|
4174
4196
|
notify({ kind: "warn", text: degraded.text });
|
|
@@ -4570,7 +4592,7 @@ function InstalledTab({ notify, installed, updates, onMutation, ops }) {
|
|
|
4570
4592
|
const r = await api("upgrade", { pkg: it.pkg });
|
|
4571
4593
|
const m = opUpgradeMeta2(r);
|
|
4572
4594
|
return m ? { ...r, opMeta: m } : r;
|
|
4573
|
-
});
|
|
4595
|
+
}, { toVersion: it.latestVersion });
|
|
4574
4596
|
const degraded = oc.degradedOutcome(res);
|
|
4575
4597
|
if (degraded) {
|
|
4576
4598
|
notify({ kind: "warn", text: degraded.text });
|
|
@@ -5198,6 +5220,12 @@ function DshmVersionChip({ version, notify, initialCheck, ops }) {
|
|
|
5198
5220
|
if (data && typeof data === "object" && typeof data.current === "string") {
|
|
5199
5221
|
writeSelfCheckCache2(typeof window !== "undefined" && window.localStorage ? window.localStorage : null, data);
|
|
5200
5222
|
setCheck(data);
|
|
5223
|
+
const ir = data.intentResolved;
|
|
5224
|
+
if (ir && ir.ok) {
|
|
5225
|
+
notify({ kind: "ok", text: lookup("selfupgrade.reconciled.done", { from: ir.fromVersion ? `v${ir.fromVersion}` : "\u2014", to: `v${ir.installedVersion}` }) });
|
|
5226
|
+
} else if (ir) {
|
|
5227
|
+
notify({ kind: "warn", text: lookup("selfupgrade.reconciled.failed", { to: `v${ir.intentVersion}`, current: `v${version}` }) });
|
|
5228
|
+
}
|
|
5201
5229
|
}
|
|
5202
5230
|
}).catch(() => {
|
|
5203
5231
|
});
|
|
@@ -5216,7 +5244,7 @@ function DshmVersionChip({ version, notify, initialCheck, ops }) {
|
|
|
5216
5244
|
const res = await (ops ? ops.runOp("upgrade", "dsh-m", async () => {
|
|
5217
5245
|
const r = await api("self-upgrade");
|
|
5218
5246
|
return { ...r, opMeta: { from: version, to: r.version || "latest" } };
|
|
5219
|
-
}, { npm: "dsh-m" }) : api("self-upgrade"));
|
|
5247
|
+
}, { npm: "dsh-m", toVersion: state.latest }) : api("self-upgrade"));
|
|
5220
5248
|
clearSelfCheckCache2(typeof window !== "undefined" && window.localStorage ? window.localStorage : null);
|
|
5221
5249
|
setCheck({ current: version, latest: null, outdated: false, ahead: false });
|
|
5222
5250
|
notify({
|
|
@@ -5732,19 +5760,34 @@ function MarketPanel({ onClose }) {
|
|
|
5732
5760
|
if (opsPumpCtx && opsPumpCtx.syncOps === syncOps) opsPumpCtx = null;
|
|
5733
5761
|
};
|
|
5734
5762
|
}, [stillApplies, dispatchRestored, syncOps, refreshViews]);
|
|
5763
|
+
const installedVersionOf = useCallback(async (r) => {
|
|
5764
|
+
try {
|
|
5765
|
+
const fresh = await api("installed", { probe: false });
|
|
5766
|
+
const items = fresh && Array.isArray(fresh.items) ? fresh.items : [];
|
|
5767
|
+
const row = items.find((it) => it && it.pkg === r.target);
|
|
5768
|
+
return row && typeof row.version === "string" ? row.version : void 0;
|
|
5769
|
+
} catch {
|
|
5770
|
+
return void 0;
|
|
5771
|
+
}
|
|
5772
|
+
}, []);
|
|
5735
5773
|
const restoredRef = useRef(false);
|
|
5736
5774
|
useEffect(() => {
|
|
5737
5775
|
if (restoredRef.current || !installed.data) return;
|
|
5738
5776
|
restoredRef.current = true;
|
|
5739
5777
|
void (async () => {
|
|
5740
|
-
const restored = await restoreRecords2(opsStore.list(), stillApplies);
|
|
5778
|
+
const restored = await restoreRecords2(opsStore.list(), stillApplies, installedVersionOf);
|
|
5779
|
+
for (const r of restored) {
|
|
5780
|
+
if (r.status === "done" && r.meta && r.meta.reconciledAfterRestart) {
|
|
5781
|
+
notify({ kind: "ok", text: lookup("upgrade.reconciled.done", { pkg: r.target, to: `v${r.meta.toVersion}` }) });
|
|
5782
|
+
}
|
|
5783
|
+
}
|
|
5741
5784
|
opsStore.replaceAll(restored);
|
|
5742
5785
|
syncOps();
|
|
5743
5786
|
if (restored.some((r) => r.status === "queued")) {
|
|
5744
5787
|
void opsPump.kick();
|
|
5745
5788
|
}
|
|
5746
5789
|
})();
|
|
5747
|
-
}, [installed.data, stillApplies, syncOps]);
|
|
5790
|
+
}, [installed.data, stillApplies, installedVersionOf, syncOps]);
|
|
5748
5791
|
const counts = {
|
|
5749
5792
|
market: marketCommunity.data ? marketCommunity.data.total : null,
|
|
5750
5793
|
installed: installed.data ? installed.data.items.length : null
|
package/lib/core/host-api.js
CHANGED
|
@@ -281,7 +281,14 @@ export function createApiDispatcher(ctx) {
|
|
|
281
281
|
if (rec && rec.status === 'delegated') {
|
|
282
282
|
const match = rec.version === ctx.pkg.version;
|
|
283
283
|
await d.resolveUpgradeIntent({ ok: match, installedVersion: match ? ctx.pkg.version : undefined });
|
|
284
|
-
intentResolved = {
|
|
284
|
+
intentResolved = {
|
|
285
|
+
ok: match,
|
|
286
|
+
target: rec.target,
|
|
287
|
+
// 0.10.4:intentVersion/fromVersion 透出——client 据此补「对账确认」横幅(成功/未完成双形态)
|
|
288
|
+
intentVersion: rec.version,
|
|
289
|
+
...(rec.fromVersion !== undefined ? { fromVersion: rec.fromVersion } : {}),
|
|
290
|
+
...(match ? { installedVersion: ctx.pkg.version } : {}),
|
|
291
|
+
};
|
|
285
292
|
}
|
|
286
293
|
}
|
|
287
294
|
catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-m",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"description": "可自定义收录清单的 DSH 插件市场:收录、安装、卸载、升级一站完成,附 agent 工具与 dshm CLI。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|
"registry.json",
|
|
21
21
|
"README.md",
|
|
22
22
|
"README.en.md",
|
|
23
|
-
"CHANGELOG.md",
|
|
24
|
-
"docs/DESIGN.md",
|
|
25
23
|
"LICENSE"
|
|
26
24
|
],
|
|
27
25
|
"keywords": [
|
package/registry.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
{
|
|
5
5
|
"id": "dsh-m",
|
|
6
6
|
"name": "DSH Marketplace",
|
|
7
|
-
"description": "自定义清单的 DSH 插件市场,收录/安装/卸载/升级;已适配 DSH 0.2.
|
|
7
|
+
"description": "自定义清单的 DSH 插件市场,收录/安装/卸载/升级;已适配 DSH 0.2.1-rc.2,支持 web 与 desktop 双 profile,详见仓库。",
|
|
8
8
|
"category": "essentials",
|
|
9
9
|
"alsoCategories": ["self-dev"],
|
|
10
10
|
"tags": ["市场", "插件管理"],
|
|
11
|
-
"verified": ["0.1.2-rc.1", "0.1.5-rc.1", "0.1.5-rc.2", "0.1.7-rc.1", "0.1.7-rc.2", "0.2.0-rc.1", "0.2.0-rc.2"],
|
|
11
|
+
"verified": ["0.1.2-rc.1", "0.1.5-rc.1", "0.1.5-rc.2", "0.1.7-rc.1", "0.1.7-rc.2", "0.2.0-rc.1", "0.2.0-rc.2", "0.2.1-rc.2"],
|
|
12
12
|
"source": "npm",
|
|
13
13
|
"npm": "dsh-m",
|
|
14
14
|
"github": "iasiv5/dsh-m",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
{
|
|
18
18
|
"id": "dsh-skins",
|
|
19
19
|
"name": "DSH Skins",
|
|
20
|
-
"description": "DSH Web 皮肤插件:多套品牌皮肤侧栏热切换,一键回到官方界面。已适配
|
|
20
|
+
"description": "DSH Web 皮肤插件:多套品牌皮肤侧栏热切换,一键回到官方界面。已适配 web 与 Desktop 0.2.0-rc.1+,详见仓库。",
|
|
21
21
|
"category": "essentials",
|
|
22
22
|
"alsoCategories": ["self-dev"],
|
|
23
23
|
"tags": ["皮肤", "主题", "美化", "界面"],
|
|
24
|
-
"verified": ["0.
|
|
24
|
+
"verified": ["0.2.0-rc.1", "0.2.0-rc.2", "0.2.1-rc.2"],
|
|
25
25
|
"source": "npm",
|
|
26
26
|
"npm": "@iasiv5/dsh-skins",
|
|
27
27
|
"github": "iasiv5/dsh-skins",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"description": "替换官方 Connection 跳过 BrowserAuth,免 Token;已适配七个已审计精确版本对,详见仓库。仅支持 web profile;desktop 宿主一律自动休眠(多进程树判别),desktop 用户请保持最新版。",
|
|
92
92
|
"category": "self-dev",
|
|
93
93
|
"tags": ["BrowserAuth", "连接", "安全", "工具"],
|
|
94
|
-
"verified": ["0.1.2-rc.1", "0.1.5-rc.1", "0.1.5-rc.2", "0.1.7-rc.1", "0.1.7-rc.2", "0.2.0-rc.1", "0.2.0-rc.2"],
|
|
94
|
+
"verified": ["0.1.2-rc.1", "0.1.5-rc.1", "0.1.5-rc.2", "0.1.7-rc.1", "0.1.7-rc.2", "0.2.0-rc.1", "0.2.0-rc.2", "0.2.1-rc.2"],
|
|
95
95
|
"source": "npm",
|
|
96
96
|
"npm": "@iasiv5/dsh-skip-browser-auth",
|
|
97
97
|
"github": "iasiv5/dsh-skip-browser-auth",
|