dsh-dpharness 0.6.0 → 0.6.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/lib/changelog.js +21 -0
- package/lib/client.js +145 -22
- package/lib/index.js +15 -1
- package/package.json +1 -1
package/lib/changelog.js
CHANGED
|
@@ -37,6 +37,27 @@ export function npmLatestUrl(pkg) {
|
|
|
37
37
|
* (用户要看的是行为变化,不是我们的 commit 分类)。
|
|
38
38
|
*/
|
|
39
39
|
export const CHANGELOG = [
|
|
40
|
+
{
|
|
41
|
+
version: "0.6.2",
|
|
42
|
+
date: "2026-10-19",
|
|
43
|
+
title: "卡片标签全部中文化",
|
|
44
|
+
items: [
|
|
45
|
+
"插件卡片上的标签改成中文:核心 / 相关、实装验证通过 / 未通过、人工实测通过、风险:中 / 高,不再出现 core、verify: pass 这类英文标记。",
|
|
46
|
+
"兼容范围写成「适配 DSH v0.20+」,一眼看出这条说的是 dsh 版本要求。",
|
|
47
|
+
"风险未评估的插件不再挂标记(此前几乎每张卡都有一条「未知」,等于噪声);只保留中等、高风险两种提示。",
|
|
48
|
+
"修复「对比」表把未实测、未验证、验证未通过都显示成「通过」的问题。",
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
version: "0.6.1",
|
|
53
|
+
date: "2026-10-17",
|
|
54
|
+
title: "重启横幅能认出「已经重启过」",
|
|
55
|
+
items: [
|
|
56
|
+
"修复「待重启」横幅在重启后仍然一直提示的问题:真的重启过一次,横幅会自动改口「已生效」,不必再手动点「知道了」。",
|
|
57
|
+
"「是否已生效」改由本机 dsh 的启动轮次判定(每次启动都不同)——「又装了另一个插件」不会再让上一次的重启结论失效。",
|
|
58
|
+
"未生效时会自动复查(最长约 4 分钟),页面不需要手动刷新;连续查不到状态时如实提示「查不到重启状态」,不再让人误以为自己没重启成功。",
|
|
59
|
+
],
|
|
60
|
+
},
|
|
40
61
|
{
|
|
41
62
|
version: "0.6.0",
|
|
42
63
|
date: "2026-10-16",
|
package/lib/client.js
CHANGED
|
@@ -289,7 +289,10 @@ window.__ModuleLoader__.load({
|
|
|
289
289
|
"compare.stars": "星标",
|
|
290
290
|
"compare.verify": "实装验证",
|
|
291
291
|
"compare.tested": "人工实测通过",
|
|
292
|
-
|
|
292
|
+
/* 与卡片标签同一口径(tag.verify.*):verifyStatus 是**实装验证**的结果,
|
|
293
|
+
不是 installCheck(装得上吗)—— 旧文案「通过安装校验」把两件事混成了一件。 */
|
|
294
|
+
"compare.verified": "实装验证通过",
|
|
295
|
+
"compare.failed": "实装验证未通过",
|
|
293
296
|
"compare.unverified": "未验证",
|
|
294
297
|
"compare.installed": "本机",
|
|
295
298
|
"compare.notInstalled": "未安装",
|
|
@@ -398,6 +401,17 @@ window.__ModuleLoader__.load({
|
|
|
398
401
|
"label.untranslated": "未汉化",
|
|
399
402
|
"label.repoSource": "GitHub 源",
|
|
400
403
|
"hint.repoSource": "该插件未发布到 npm,走 GitHub 源安装(与站点详情页同口径)。",
|
|
404
|
+
/* 卡片标签(站点英文枚举的中文名,见 makeUi 的 TAG_LABEL)
|
|
405
|
+
⚠️ tier 与 usage.core 是**两套语义**:这里是生态分层(核心 / 相关),
|
|
406
|
+
那里的「核心在用」是使用频次,别合并。 */
|
|
407
|
+
"tag.tier.core": "核心",
|
|
408
|
+
"tag.tier.related": "相关",
|
|
409
|
+
"tag.verify.pass": "实装验证通过",
|
|
410
|
+
"tag.verify.fail": "实装验证未通过",
|
|
411
|
+
"tag.tested.passed": "人工实测通过",
|
|
412
|
+
"tag.risk.medium": "风险:中",
|
|
413
|
+
"tag.risk.high": "风险:高",
|
|
414
|
+
"tag.compat": "适配 DSH {v}",
|
|
401
415
|
"best.recommend": "严选推荐",
|
|
402
416
|
"best.picks": "分类精选",
|
|
403
417
|
"best.catCount": "{subs} 个小类 · {n} 个",
|
|
@@ -432,6 +446,7 @@ window.__ModuleLoader__.load({
|
|
|
432
446
|
"install.effective": "已生效",
|
|
433
447
|
"install.effectiveBody": "{n}:改动已生效",
|
|
434
448
|
"install.dismiss": "知道了",
|
|
449
|
+
"install.unknownState": "查不到重启状态,可刷新页面确认",
|
|
435
450
|
"install.restartFailed": "重启接口不可用,请手动重启 dsh",
|
|
436
451
|
"install.failed": "安装失败",
|
|
437
452
|
"install.busy": "已有安装任务在进行",
|
|
@@ -534,7 +549,8 @@ window.__ModuleLoader__.load({
|
|
|
534
549
|
"compare.stars": "Stars",
|
|
535
550
|
"compare.verify": "Verified",
|
|
536
551
|
"compare.tested": "Hands-on tested",
|
|
537
|
-
"compare.verified": "Install
|
|
552
|
+
"compare.verified": "Install verified",
|
|
553
|
+
"compare.failed": "Install verification failed",
|
|
538
554
|
"compare.unverified": "Unverified",
|
|
539
555
|
"compare.installed": "On this machine",
|
|
540
556
|
"compare.notInstalled": "Not installed",
|
|
@@ -643,6 +659,14 @@ window.__ModuleLoader__.load({
|
|
|
643
659
|
"label.untranslated": "Not translated",
|
|
644
660
|
"label.repoSource": "GitHub source",
|
|
645
661
|
"hint.repoSource": "Not published to npm — installs from the GitHub source (same rule as the site's detail page).",
|
|
662
|
+
"tag.tier.core": "Core",
|
|
663
|
+
"tag.tier.related": "Related",
|
|
664
|
+
"tag.verify.pass": "Install verified",
|
|
665
|
+
"tag.verify.fail": "Install verification failed",
|
|
666
|
+
"tag.tested.passed": "Hands-on tested",
|
|
667
|
+
"tag.risk.medium": "Risk: medium",
|
|
668
|
+
"tag.risk.high": "Risk: high",
|
|
669
|
+
"tag.compat": "DSH {v}",
|
|
646
670
|
"best.recommend": "Curated",
|
|
647
671
|
"best.picks": "By category",
|
|
648
672
|
"best.catCount": "{subs} groups · {n}",
|
|
@@ -677,6 +701,7 @@ window.__ModuleLoader__.load({
|
|
|
677
701
|
"install.effective": "Active",
|
|
678
702
|
"install.effectiveBody": "{n}: changes are live",
|
|
679
703
|
"install.dismiss": "Got it",
|
|
704
|
+
"install.unknownState": "Can't confirm the restart state — reload the page",
|
|
680
705
|
"install.restartFailed": "Restart endpoint unavailable — restart dsh manually",
|
|
681
706
|
"install.failed": "Install failed",
|
|
682
707
|
"install.busy": "Another install is already running",
|
|
@@ -1074,7 +1099,12 @@ window.__ModuleLoader__.load({
|
|
|
1074
1099
|
rememberPending({ pkg: basePackage(target), via: via, at: Date.now() });
|
|
1075
1100
|
/* 本地通道改的是 profile,必须重启才生效 —— 记一条待重启横幅(市场通道热挂载,
|
|
1076
1101
|
不需要;same/none 版本没动,也没什么可生效的)。 */
|
|
1077
|
-
if (!done.market && done.changed)
|
|
1102
|
+
if (!done.market && done.changed) {
|
|
1103
|
+
/* 先钉住宿主这一轮的 bootId(一次本地 GET,拿不到也只是留空)——
|
|
1104
|
+
待重启记录必须记下「安装发生在哪一次启动里」,否则重启后无从判定。 */
|
|
1105
|
+
await primeHostBoot();
|
|
1106
|
+
markRestartPending(item.nameZh || item.name || target);
|
|
1107
|
+
}
|
|
1078
1108
|
return { ok: true, market: Boolean(done.market), via: via, why: "", changed: done.changed };
|
|
1079
1109
|
}
|
|
1080
1110
|
track("plugin_hub", {
|
|
@@ -1132,6 +1162,7 @@ window.__ModuleLoader__.load({
|
|
|
1132
1162
|
loadUpdates(true);
|
|
1133
1163
|
if (done.ok && done.changed) {
|
|
1134
1164
|
track("plugin_hub", { action: "remove_ok" });
|
|
1165
|
+
await primeHostBoot();
|
|
1135
1166
|
markRestartPending(item.nameZh || item.name || target);
|
|
1136
1167
|
} else if (done.ok) {
|
|
1137
1168
|
/* 退出码 0 但磁盘上没变 —— 与安装的 same 同一类三态,别谎报"已卸载" */
|
|
@@ -1398,13 +1429,38 @@ window.__ModuleLoader__.load({
|
|
|
1398
1429
|
所以这条提醒挂在面板与页签顶部,跨视图、跨会话存在,直到重启生效或
|
|
1399
1430
|
用户明确说「知道了」。 */
|
|
1400
1431
|
const RESTART_KEY = "dph-hub-restart-pending";
|
|
1432
|
+
/* 宿主 bootId 缓存 —— 安装时随待重启记录一起落盘,重启后 bootId 变了才是
|
|
1433
|
+
「已生效」的硬证据。时间戳只是兜底:它会被「又装了一个」刷新,也怕时钟回拨。 */
|
|
1434
|
+
let hostBootId = "";
|
|
1435
|
+
let bootInFlight = null;
|
|
1436
|
+
function primeHostBoot() {
|
|
1437
|
+
if (hostBootId) return Promise.resolve(hostBootId);
|
|
1438
|
+
if (bootInFlight) return bootInFlight;
|
|
1439
|
+
bootInFlight = getJson("/api/dpharness/meta")
|
|
1440
|
+
.then((result) => {
|
|
1441
|
+
const body = result && result.data;
|
|
1442
|
+
if (body && typeof body.bootId === "string" && body.bootId) hostBootId = body.bootId;
|
|
1443
|
+
return hostBootId;
|
|
1444
|
+
})
|
|
1445
|
+
.catch(() => hostBootId)
|
|
1446
|
+
.then((value) => {
|
|
1447
|
+
bootInFlight = null;
|
|
1448
|
+
return value;
|
|
1449
|
+
});
|
|
1450
|
+
return bootInFlight;
|
|
1451
|
+
}
|
|
1401
1452
|
function readRestartPending() {
|
|
1402
1453
|
try {
|
|
1403
1454
|
const raw = localStorage.getItem(RESTART_KEY);
|
|
1404
1455
|
if (!raw) return null;
|
|
1405
1456
|
const parsed = JSON.parse(raw);
|
|
1406
1457
|
if (!parsed || !Array.isArray(parsed.names) || !parsed.names.length) return null;
|
|
1407
|
-
return {
|
|
1458
|
+
return {
|
|
1459
|
+
names: parsed.names.map((name) => String(name)).filter(Boolean),
|
|
1460
|
+
at: Number(parsed.at) || 0,
|
|
1461
|
+
/* 旧记录没有 boot 字段 ⇒ 空串 ⇒ 判定回退到时间戳比较 */
|
|
1462
|
+
boot: typeof parsed.boot === "string" ? parsed.boot : "",
|
|
1463
|
+
};
|
|
1408
1464
|
} catch (error) {
|
|
1409
1465
|
return null;
|
|
1410
1466
|
}
|
|
@@ -1427,7 +1483,14 @@ window.__ModuleLoader__.load({
|
|
|
1427
1483
|
const label = String(name || "").trim();
|
|
1428
1484
|
if (!label) return;
|
|
1429
1485
|
const current = hub.restartPending || { names: [], at: 0 };
|
|
1430
|
-
const next = {
|
|
1486
|
+
const next = {
|
|
1487
|
+
names: Array.from(new Set(current.names.concat([label]))),
|
|
1488
|
+
at: Date.now(),
|
|
1489
|
+
/* boot = 装完这一刻宿主是哪一次启动(拿不到就留空,判定回退时间戳)。
|
|
1490
|
+
注意连装多个时 at 会被刷新,boot 不变 —— 正是「最后一次安装之后
|
|
1491
|
+
有没有重启过」这个语义。 */
|
|
1492
|
+
boot: hostBootId || "",
|
|
1493
|
+
};
|
|
1431
1494
|
storeRestartPending(next);
|
|
1432
1495
|
setHub({ restartPending: next });
|
|
1433
1496
|
}
|
|
@@ -2229,16 +2292,39 @@ window.__ModuleLoader__.load({
|
|
|
2229
2292
|
return h("span", { className: cls, key: label }, label);
|
|
2230
2293
|
}
|
|
2231
2294
|
|
|
2295
|
+
/* 标签文案表:站点 API 给的是**英文枚举**(tier / verifyStatus / testedStatus / riskLevel),
|
|
2296
|
+
原先直接渲染,中文界面里因此露出 `core`、`verify: pass`、`risk: unknown`
|
|
2297
|
+
(2026-10-19 用户截图指出)。这里把枚举翻成中文,与本文件 tierLabel 同一约定:
|
|
2298
|
+
**字典里没有的值返回空串** —— 不显示、不猜,也不把内部标识当文案丢给用户。
|
|
2299
|
+
新增枚举值只改这张表 + 两份字典,勿在 tagsOf 里现拼字符串。 */
|
|
2300
|
+
const TAG_LABEL = {
|
|
2301
|
+
tier: { core: "tag.tier.core", related: "tag.tier.related" },
|
|
2302
|
+
verify: { pass: "tag.verify.pass", fail: "tag.verify.fail" },
|
|
2303
|
+
tested: { passed: "tag.tested.passed" },
|
|
2304
|
+
/* low / unknown 有意**不给文案**:unknown 占当前样本 97%(194/200),
|
|
2305
|
+
挂一个「风险未知」等于每张卡都贴一条零信息量徽标;low 无风险可报(与站点
|
|
2306
|
+
「站点给的是结论,没结论就没有这条」同口径)。 */
|
|
2307
|
+
risk: { medium: "tag.risk.medium", high: "tag.risk.high" },
|
|
2308
|
+
};
|
|
2309
|
+
function tagLabel(group, value) {
|
|
2310
|
+
const key = TAG_LABEL[group] && TAG_LABEL[group][value];
|
|
2311
|
+
return key ? t(key) : "";
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2232
2314
|
function tagsOf(item) {
|
|
2233
2315
|
const tags = [];
|
|
2234
2316
|
// 中文分类放最前 —— 它是"这东西是干什么的"的第一眼信息
|
|
2235
2317
|
if (item.cat) tags.push(badge(item.cat, null));
|
|
2236
|
-
|
|
2237
|
-
if (
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
if (
|
|
2318
|
+
const tier = item.tier ? tagLabel("tier", item.tier) : "";
|
|
2319
|
+
if (tier) tags.push(badge(tier, item.tier === "core" ? "ok" : null));
|
|
2320
|
+
// 兼容范围是版本号,不翻译本体,只补中文前缀(站点原样是「DSH v0.20+」)
|
|
2321
|
+
if (item.compat) tags.push(badge(format(t("tag.compat"), { v: item.compat }), null));
|
|
2322
|
+
const verify = item.verify ? tagLabel("verify", item.verify) : "";
|
|
2323
|
+
if (verify) tags.push(badge(verify, item.verify === "pass" ? "ok" : "bad"));
|
|
2324
|
+
const tested = item.tested ? tagLabel("tested", item.tested) : "";
|
|
2325
|
+
if (tested) tags.push(badge(tested, "ok"));
|
|
2326
|
+
const risk = item.risk ? tagLabel("risk", item.risk) : "";
|
|
2327
|
+
if (risk) tags.push(badge(risk, item.risk === "high" ? "bad" : null));
|
|
2242
2328
|
return tags;
|
|
2243
2329
|
}
|
|
2244
2330
|
|
|
@@ -2597,7 +2683,7 @@ window.__ModuleLoader__.load({
|
|
|
2597
2683
|
if (list.length < 2) return null;
|
|
2598
2684
|
const rows = [
|
|
2599
2685
|
{ key: "stars", label: t("compare.stars"), value: (item) => format(t("badge.stars"), { n: item.stars }) },
|
|
2600
|
-
{ key: "verify", label: t("compare.verify"), value: (item) => (item.tested ? t("compare.tested") : item.verify ? t("compare.verified") : t("compare.unverified")) },
|
|
2686
|
+
{ key: "verify", label: t("compare.verify"), value: (item) => (item.tested === "passed" ? t("compare.tested") : item.verify === "pass" ? t("compare.verified") : item.verify === "fail" ? t("compare.failed") : t("compare.unverified")) },
|
|
2601
2687
|
{ key: "installed", label: t("compare.installed"), value: (item) => (item.installed ? format(t("card.installed"), { v: item.installed }) : t("compare.notInstalled")) },
|
|
2602
2688
|
{ key: "cat", label: t("compare.cat"), value: (item) => item.cat || "—" },
|
|
2603
2689
|
{ key: "sell", label: t("compare.sell"), value: (item) => item.sell || "—" },
|
|
@@ -2809,9 +2895,10 @@ window.__ModuleLoader__.load({
|
|
|
2809
2895
|
* 实测没有 dshmarket,安装全走本地通道、必须重启)。所以它挂在面板与页签
|
|
2810
2896
|
* 顶部,跨视图、跨会话存在,直到重启生效或用户明确说「知道了」。
|
|
2811
2897
|
*
|
|
2812
|
-
* 挂载时向宿主要 startedAt(/api/dpharness/meta
|
|
2813
|
-
*
|
|
2814
|
-
*
|
|
2898
|
+
* 挂载时向宿主要 startedAt / bootId(/api/dpharness/meta):bootId 变了(老宿主
|
|
2899
|
+
* 只给 startedAt,则看它是否比 pending.at 新)就说明重启已经发生过 —— 这时该说
|
|
2900
|
+
* 「已生效」而不是继续催重启。取不到就按「还没重启」处理:宁可多提醒一次,
|
|
2901
|
+
* 也不能把提醒悄悄吞掉。
|
|
2815
2902
|
*/
|
|
2816
2903
|
function RestartBanner(props) {
|
|
2817
2904
|
const pending = useHub().restartPending;
|
|
@@ -2820,18 +2907,53 @@ window.__ModuleLoader__.load({
|
|
|
2820
2907
|
const [restarting, setRestarting] = react.useState(false);
|
|
2821
2908
|
const [failed, setFailed] = react.useState(false);
|
|
2822
2909
|
const [effective, setEffective] = react.useState(false);
|
|
2910
|
+
const [unknown, setUnknown] = react.useState(false);
|
|
2823
2911
|
react.useEffect(() => {
|
|
2824
2912
|
if (!pending) return undefined;
|
|
2825
2913
|
let alive = true;
|
|
2914
|
+
let timer = 0;
|
|
2915
|
+
let asks = 0;
|
|
2916
|
+
let misses = 0;
|
|
2917
|
+
/* 只问一次是不够的:desktop 的「重启」换的是**宿主进程**,页面往往只是重连
|
|
2918
|
+
而不重新挂载 —— 那一次判定会被永久跳过,横幅就永远停在「待重启」
|
|
2919
|
+
(2026-10-17 用户实测:确实重启过,提示照旧)。所以按退避重试。 */
|
|
2920
|
+
const RETRY_MS = [0, 8000, 20000, 40000];
|
|
2921
|
+
const MAX_ASKS = 10;
|
|
2826
2922
|
/* 先按「需要重启」算:新的待重启(又装了一个)不能沿用上一次的「已生效」 */
|
|
2827
2923
|
setEffective(false);
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
}
|
|
2833
|
-
|
|
2834
|
-
|
|
2924
|
+
setUnknown(false);
|
|
2925
|
+
const ask = async () => {
|
|
2926
|
+
const result = await getJson("/api/dpharness/meta");
|
|
2927
|
+
if (!alive) return;
|
|
2928
|
+
/* ⚠️ getJson 返回的是 { status, data },不是裸 body。这里曾经直接读
|
|
2929
|
+
`body.startedAt`(永远 undefined),「已生效」分支因此从未生效过。 */
|
|
2930
|
+
const body = result && result.data;
|
|
2931
|
+
if (!body || typeof body.startedAt !== "number") {
|
|
2932
|
+
misses += 1;
|
|
2933
|
+
/* 连续取不到就别再假装「需要重启」—— 三次之后改说「确认不了」,
|
|
2934
|
+
否则用户会以为自己没重启成功,反复重启。 */
|
|
2935
|
+
if (misses >= 3) setUnknown(true);
|
|
2936
|
+
} else {
|
|
2937
|
+
misses = 0;
|
|
2938
|
+
setUnknown(false);
|
|
2939
|
+
/* bootId 优先:它每次进程启动都变,不受时钟与「又装一个把 at 刷新」
|
|
2940
|
+
的影响;任一端缺失才回退到时间戳比较。 */
|
|
2941
|
+
const restarted = pending.boot && typeof body.bootId === "string" && body.bootId
|
|
2942
|
+
? body.bootId !== pending.boot
|
|
2943
|
+
: body.startedAt > pending.at;
|
|
2944
|
+
if (restarted) {
|
|
2945
|
+
setEffective(true);
|
|
2946
|
+
return;
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
asks += 1;
|
|
2950
|
+
if (asks < MAX_ASKS) {
|
|
2951
|
+
const delay = asks < RETRY_MS.length ? RETRY_MS[asks] : 30000;
|
|
2952
|
+
timer = setTimeout(ask, delay);
|
|
2953
|
+
}
|
|
2954
|
+
};
|
|
2955
|
+
ask();
|
|
2956
|
+
return () => { alive = false; if (timer) clearTimeout(timer); };
|
|
2835
2957
|
}, [pending]);
|
|
2836
2958
|
if (!pending) return null;
|
|
2837
2959
|
const names = pending.names;
|
|
@@ -2857,6 +2979,7 @@ window.__ModuleLoader__.load({
|
|
|
2857
2979
|
h("span", { className: "dph_restartText", key: "text" }, format(t("install.pendingBody"), { n: label })),
|
|
2858
2980
|
h("span", { className: "dph_logCmd", key: "cmds" }, [
|
|
2859
2981
|
armed ? h("span", { className: "dph_setHint", key: "warn" }, t("updates.restartConfirm")) : null,
|
|
2982
|
+
unknown ? h("span", { className: "dph_setHint", key: "unknown" }, t("install.unknownState")) : null,
|
|
2860
2983
|
h("button", {
|
|
2861
2984
|
className: "dph_btn dph_btnPrimary",
|
|
2862
2985
|
key: "restart",
|
package/lib/index.js
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
37
|
import { spawn } from "node:child_process";
|
|
38
|
+
import { randomUUID } from "node:crypto";
|
|
38
39
|
import fs from "node:fs";
|
|
39
40
|
import os from "node:os";
|
|
40
41
|
import path from "node:path";
|
|
@@ -46,7 +47,7 @@ export const name = "dpharness";
|
|
|
46
47
|
/** The dsh web server service used to register HTTP routes. */
|
|
47
48
|
export const inject = ["webServer"];
|
|
48
49
|
|
|
49
|
-
export const VERSION = "0.6.
|
|
50
|
+
export const VERSION = "0.6.2";
|
|
50
51
|
|
|
51
52
|
/**
|
|
52
53
|
* 本插件在 npm 上的包名 —— 与 dsh 的插件 id(上面的 `name = "dpharness"`)**不是一回事**,
|
|
@@ -75,6 +76,18 @@ export const SHAPE_REV = 4;
|
|
|
75
76
|
*/
|
|
76
77
|
const STARTED_AT = Date.now() - Math.round(process.uptime() * 1000);
|
|
77
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Identity of this host process, renewed on every start.
|
|
81
|
+
*
|
|
82
|
+
* `STARTED_AT` alone turned out to be a weak proof of "a restart happened":
|
|
83
|
+
* it is a wall-clock value, so a clock step or a later install refreshing the
|
|
84
|
+
* client-side timestamp can make the comparison lie. A boot id has no such
|
|
85
|
+
* ambiguity — it is generated once per process and can only differ when the
|
|
86
|
+
* process really changed. The timestamp is kept as the fallback for clients
|
|
87
|
+
* that already stored a pending record before this field existed.
|
|
88
|
+
*/
|
|
89
|
+
const BOOT_ID = randomUUID();
|
|
90
|
+
|
|
78
91
|
/**
|
|
79
92
|
* Profile used for installs.
|
|
80
93
|
*
|
|
@@ -1976,6 +1989,7 @@ export function apply(ctx) {
|
|
|
1976
1989
|
upstream: UPSTREAM,
|
|
1977
1990
|
tracker: TRACK,
|
|
1978
1991
|
startedAt: STARTED_AT,
|
|
1992
|
+
bootId: BOOT_ID,
|
|
1979
1993
|
routes: [
|
|
1980
1994
|
"/api/dpharness/search",
|
|
1981
1995
|
"/api/dpharness/best",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-dpharness",
|
|
3
3
|
"icon": "./icon.svg",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.2",
|
|
5
5
|
"description": "Curated dpharness.com plugin catalog inside the DeepSeek Harness Web GUI: a conversation-view tab, a sidebar entry and a dismissible site-wide floating panel, offering a searchable full catalog, a monthly by-category shortlist, a daily pick and an update check (this plugin plus every installed plugin) with a red-dot reminder, with one-click install via dshmarket or the dsh CLI. Includes a settings page (General row + Plugins tab) for the widget visibility, the daily pick, the update check and the opt-out telemetry relay covering the full install funnel.",
|
|
6
6
|
"author": "zhanghao3693 <zhanghao3693@qq.com>",
|
|
7
7
|
"repository": {
|