dsh-life-pack 0.3.50 → 0.3.51

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/dist/client.js CHANGED
@@ -159,14 +159,14 @@ window.__ModuleLoader__.load({
159
159
  path: "/api/ilife-manager"
160
160
  };
161
161
  //#endregion
162
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/config.js
162
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/config.js
163
163
  function assertPrefix(value, role) {
164
164
  if (typeof value !== "string" || value.length === 0) throw new Error("[dsh-plugin-update] " + role + " 非法:须为非空字符串(收到 " + JSON.stringify(value) + ")");
165
165
  if (value.includes(".") || value.includes("/") || value.includes("\\") || /\s/.test(value)) throw new Error("[dsh-plugin-update] " + role + " 非法:不得含有点、路径分隔符或空白(收到 " + JSON.stringify(value) + ")");
166
166
  return value;
167
167
  }
168
168
  //#endregion
169
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/redaction.js
169
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/redaction.js
170
170
  const COPY_BUDGET_CHARS = 1500;
171
171
  const REDACTED_PATH = "<路径>";
172
172
  const REDACTED_SECRET = "<脱敏>";
@@ -230,7 +230,7 @@ window.__ModuleLoader__.load({
230
230
  return truncateForCopy(scrubWithoutBudget(flat));
231
231
  }
232
232
  //#endregion
233
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/service.js
233
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/service.js
234
234
  function updateError(code) {
235
235
  return Object.assign(new Error(code), { code });
236
236
  }
@@ -317,7 +317,7 @@ window.__ModuleLoader__.load({
317
317
  return 0;
318
318
  }
319
319
  //#endregion
320
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/lang.js
320
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/lang.js
321
321
  function normalizeLangTag(tag) {
322
322
  if (typeof tag !== "string") return "zh";
323
323
  const s = tag.trim().toLowerCase().replace(/_/g, "-");
@@ -438,7 +438,7 @@ window.__ModuleLoader__.load({
438
438
  };
439
439
  }
440
440
  //#endregion
441
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/bilingual.js
441
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/bilingual.js
442
442
  const BILINGUAL_STRINGS = {
443
443
  "entry.label.idle": {
444
444
  en: "Check for updates",
@@ -2030,7 +2030,7 @@ window.__ModuleLoader__.load({
2030
2030
  }
2031
2031
  const BILINGUAL_CSS = [".dsh-upd-bi{display:inline;overflow-wrap:anywhere}", ".dsh-upd-bi [lang]{overflow-wrap:anywhere}"].join("\n");
2032
2032
  //#endregion
2033
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/changelog.js
2033
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/changelog.js
2034
2034
  const CHANGELOG_MAX_CHARS = 65536;
2035
2035
  const CHANGELOG_ALL_CATEGORIES = [
2036
2036
  "Added",
@@ -2507,12 +2507,12 @@ ${blocks.join("\n")}
2507
2507
  }
2508
2508
  }
2509
2509
  //#endregion
2510
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/log-events.js
2510
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/log-events.js
2511
2511
  const LOG_EVENT_CALL = "host.call";
2512
2512
  const LOG_EVENT_CALL_FAIL = "host.call.fail";
2513
2513
  const LOG_EVENT_INSTALL_EXEC = "update.install.exec";
2514
2514
  //#endregion
2515
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/panel.js
2515
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/panel.js
2516
2516
  function normalizePanelTheme(value) {
2517
2517
  return value === "archive" ? "archive" : "default";
2518
2518
  }
@@ -2540,6 +2540,7 @@ ${blocks.join("\n")}
2540
2540
  busyBorder: "--dsh-update-busy-border",
2541
2541
  busyText: "--dsh-update-busy-text",
2542
2542
  newText: "--dsh-update-new-text",
2543
+ newOkText: "--dsh-update-new-ok-text",
2543
2544
  fontSans: "--dsh-update-font-sans",
2544
2545
  fontSerif: "--dsh-update-font-serif",
2545
2546
  fontMono: "--dsh-update-font-mono",
@@ -2575,7 +2576,8 @@ ${blocks.join("\n")}
2575
2576
  "busyBg",
2576
2577
  "busyBorder",
2577
2578
  "busyText",
2578
- "newText"
2579
+ "newText",
2580
+ "newOkText"
2579
2581
  ]);
2580
2582
  function themeTokensError(raw) {
2581
2583
  return /* @__PURE__ */ new Error(`[dsh-plugin-update] \u4E3B\u9898\u53C2\u6570 themeTokens \u975E\u6CD5\uFF1A\u53EA\u6536\u5DF2\u77E5 token \u952E\uFF08\u989C\u8272\u7528 hex \u6216\u82F1\u6587\u540D\uFF0C\u5B57\u4F53/\u5706\u89D2/\u9634\u5F71/\u5C3A\u5BF8\u4E3A\u5B89\u5168 CSS \u503C\uFF0CentryScale \u4E3A\u5927\u4E8E 0 \u7684\u6709\u9650\u6570\uFF09\uFF08\u6536\u5230 ${JSON.stringify(raw ?? null)})`);
@@ -2753,6 +2755,59 @@ ${blocks.join("\n")}
2753
2755
  if (manual) lines.push(copyText("panel.diag.label.manual", l, { manual }));
2754
2756
  return redactForCopy(lines.join("\n"));
2755
2757
  }
2758
+ const DIAG_KNOWN_TYPES = {
2759
+ v: "number",
2760
+ stage: "string",
2761
+ route: "string",
2762
+ method: "string",
2763
+ httpStatus: "number",
2764
+ exitCode: "number",
2765
+ latencyMs: "number",
2766
+ detail: "string",
2767
+ targetPackageName: "string",
2768
+ runningVersion: "string",
2769
+ latestVersion: "string",
2770
+ environmentKind: "string",
2771
+ requestId: "string",
2772
+ checkId: "string",
2773
+ registryHost: "string",
2774
+ action: "string"
2775
+ };
2776
+ function readDiagTolerant(diag) {
2777
+ const empty = {
2778
+ stage: null,
2779
+ route: null,
2780
+ method: null,
2781
+ httpStatus: null,
2782
+ exitCode: null,
2783
+ latencyMs: null,
2784
+ detail: null,
2785
+ targetPackageName: null,
2786
+ runningVersion: null,
2787
+ latestVersion: null,
2788
+ environmentKind: null,
2789
+ requestId: null,
2790
+ checkId: null,
2791
+ registryHost: null,
2792
+ action: null,
2793
+ unknownKeys: []
2794
+ };
2795
+ if (!diag || typeof diag !== "object" || Array.isArray(diag)) return empty;
2796
+ const raw = diag;
2797
+ const out = {
2798
+ ...empty,
2799
+ unknownKeys: []
2800
+ };
2801
+ for (const key of Object.keys(DIAG_KNOWN_TYPES)) {
2802
+ if (!Object.prototype.hasOwnProperty.call(raw, key)) continue;
2803
+ const v = raw[key];
2804
+ if (v === void 0 || v === null) continue;
2805
+ if (typeof v !== DIAG_KNOWN_TYPES[key]) continue;
2806
+ out[key] = v;
2807
+ }
2808
+ for (const key of Object.keys(raw)) if (!Object.prototype.hasOwnProperty.call(DIAG_KNOWN_TYPES, key)) out.unknownKeys.push(key);
2809
+ return out;
2810
+ }
2756
2811
  function queueTextOf(queuePosition, lang, _diagQueuePos) {
2757
2812
  const l = normalizeLangTag(lang ?? "zh");
2758
2813
  const pos = typeof queuePosition === "number" ? queuePosition : null;
@@ -2980,19 +3035,6 @@ ${blocks.join("\n")}
2980
3035
  showReset: true,
2981
3036
  queueNote
2982
3037
  };
2983
- if (snapshot.blockedReason === "pending-restart") return {
2984
- banner: {
2985
- kind: "restart",
2986
- title: copyText("panel.banner.restart-title", l, { latest: snapshot.latestVersion ?? snapshot.installedVersion ?? "" }),
2987
- action: blockedCopy("pending-restart", l)?.action ?? ""
2988
- },
2989
- installEnabled: false,
2990
- installLabel: copyText("panel.action.install", l),
2991
- skippedLatest: false,
2992
- showManual: manual ? true : false,
2993
- showReset: false,
2994
- queueNote
2995
- };
2996
3038
  if (jobState === "installing" || jobState === "verifying") {
2997
3039
  const ver = typeof job?.targetVersion === "string" && job.targetVersion.trim() ? job.targetVersion.trim() : "";
2998
3040
  let installingTitle = copyText("panel.banner.installing-title", l, { version: ver || " " });
@@ -3033,6 +3075,19 @@ ${blocks.join("\n")}
3033
3075
  queueNote
3034
3076
  };
3035
3077
  }
3078
+ if (snapshot.blockedReason === "pending-restart") return {
3079
+ banner: {
3080
+ kind: "restart",
3081
+ title: copyText("panel.banner.restart-title", l, { latest: snapshot.latestVersion ?? snapshot.installedVersion ?? "" }),
3082
+ action: blockedCopy("pending-restart", l)?.action ?? ""
3083
+ },
3084
+ installEnabled: false,
3085
+ installLabel: copyText("panel.action.install", l),
3086
+ skippedLatest: false,
3087
+ showManual: manual ? true : false,
3088
+ showReset: false,
3089
+ queueNote
3090
+ };
3036
3091
  if (snapshot.blockedReason) {
3037
3092
  const copy = blockedCopy(snapshot.blockedReason, l);
3038
3093
  const stop = l === "en" ? "." : "。";
@@ -3379,8 +3434,10 @@ ${blocks.join("\n")}
3379
3434
  const busyAct = input.busyAct;
3380
3435
  const checkBusy = busyAct === "check";
3381
3436
  const installBusy = busyAct === "install";
3437
+ const jobState = snapshot?.job?.state;
3438
+ const macroBusy = busyAct === "check" || busyAct === "install" || jobState === "installing" || jobState === "verifying";
3382
3439
  actions.push("<div class=\"dsh-upd-actions\">");
3383
- actions.push((checkBusy ? `<button type="button" data-action="check" disabled aria-busy="true" title="${escapeHtml$2(copyText("panel.action.checking-busy-title", l))}">${escapeHtml$2(copyText("panel.action.checking-busy", l))}</button>` : `<button type="button" data-action="check" title="${escapeHtml$2(copyText("panel.action.check-title", l))}">${escapeHtml$2(copyText("panel.action.check", l))}</button>`) + (installBusy ? `<button type="button" data-action="install" data-primary="1" disabled aria-busy="true" title="${escapeHtml$2(copyText("panel.action.installing-busy-title", l))}">${escapeHtml$2(copyText("panel.action.installing-busy", l))}</button>` : `<button type="button" data-action="install" data-primary="1" title="${escapeHtml$2(copyText("panel.action.install-title", l))}"${view.installEnabled ? "" : " disabled"}>${escapeHtml$2(view.installLabel)}</button>`));
3440
+ actions.push((checkBusy ? `<button type="button" data-action="check" disabled aria-busy="true" title="${escapeHtml$2(copyText("panel.action.checking-busy-title", l))}">${escapeHtml$2(copyText("panel.action.checking-busy", l))}</button>` : `<button type="button" data-action="check" title="${escapeHtml$2(copyText("panel.action.check-title", l))}"${macroBusy ? " disabled" : ""}>${escapeHtml$2(copyText("panel.action.check", l))}</button>`) + (installBusy ? `<button type="button" data-action="install" data-primary="1" disabled aria-busy="true" title="${escapeHtml$2(copyText("panel.action.installing-busy-title", l))}">${escapeHtml$2(copyText("panel.action.installing-busy", l))}</button>` : `<button type="button" data-action="install" data-primary="1" title="${escapeHtml$2(copyText("panel.action.install-title", l))}"${macroBusy || !view.installEnabled ? " disabled" : ""}>${escapeHtml$2(view.installLabel)}</button>`));
3384
3441
  if (snapshot?.latestVersion && !view.skippedLatest && view.banner.kind === "update") actions.push(`<button type="button" data-action="skip" title="${escapeHtml$2(copyText("panel.action.skip-title", l))}">${escapeHtml$2(copyText("panel.action.skip", l))}</button>`);
3385
3442
  if (view.showReset && snapshot?.latestVersion) actions.push(`<button type="button" data-action="reset-skip" title="${escapeHtml$2(copyText("panel.action.unskip-title", l))}">${escapeHtml$2(copyText("panel.action.unskip", l, { version: snapshot.latestVersion }))}</button>`);
3386
3443
  if (view.showManual && manual) actions.push(`<button type="button" data-action="copy-manual" title="${escapeHtml$2(copyText("panel.action.copy-manual-title", l))}">${escapeHtml$2(copyText("panel.action.copy-manual", l))}</button>`);
@@ -3510,7 +3567,7 @@ ${UPDATE_PANEL_ARCHIVE_CSS}` : UPDATE_PANEL_CSS}</style>
3510
3567
  ${body}`;
3511
3568
  }
3512
3569
  //#endregion
3513
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/entry.js
3570
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/entry.js
3514
3571
  const UPDATE_ENTRY_CSS = [
3515
3572
  ".dsh-upd-entry{display:inline-flex;align-items:center;gap:8px;font:13px/1.6 var(--dsh-update-font-sans,system-ui,\"Microsoft YaHei\",sans-serif);font-size:var(--dsh-update-entry-font-size,13px);color:var(--dsh-update-text,#1f2937)}",
3516
3573
  ".dsh-upd-entry-btn{font:inherit;border:1px solid var(--dsh-update-border,#d1d5db);border-radius:var(--dsh-update-entry-border-radius,6px);",
@@ -3624,7 +3681,7 @@ ${body}`;
3624
3681
  }
3625
3682
  }
3626
3683
  //#endregion
3627
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/panel-batch.js
3684
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/panel-batch.js
3628
3685
  const BATCH_PANEL_POLL = {
3629
3686
  defaultMs: 1500,
3630
3687
  minMs: 250
@@ -3641,7 +3698,7 @@ ${body}`;
3641
3698
  prefsSave: p + ".batchPrefsSave"
3642
3699
  };
3643
3700
  }
3644
- function batchLedgerCounts(rows, inventory) {
3701
+ function batchLedgerCounts(rows, inventory, session) {
3645
3702
  const counts = {
3646
3703
  updatable: 0,
3647
3704
  installing: 0,
@@ -3657,20 +3714,18 @@ ${body}`;
3657
3714
  else if (phase === "failed") counts.failed += 1;
3658
3715
  else if (phase === "installing") counts.installing += 1;
3659
3716
  else if (phase === "ready") counts.updatable += 1;
3660
- else if (phase === "pending") counts[ledgerKnowledgeBucket(knowledgeEntryOf(inventory, row.key))] += 1;
3717
+ else if (phase === "pending") counts[isInUnfinishedRound(session, row.key) ? "pending" : ledgerKnowledgeBucket(knowledgeEntryOf(inventory, row.key))] += 1;
3661
3718
  else if (phase === "checking") counts.pending += 1;
3662
3719
  else if (phase === "skipped") counts.skipped += 1;
3663
3720
  else if (row.restartRequired === true) counts.restart += 1;
3664
- else counts.settled += 1;
3721
+ else counts[worldUpdateVersion(row, knowledgeEntryOf(inventory, row.key), sessionUpdatedAtOf(session, row.key)) ? "updatable" : "settled"] += 1;
3665
3722
  }
3666
3723
  return counts;
3667
3724
  }
3668
3725
  function ledgerKnowledgeBucket(entry) {
3669
- if (!entry) return "pending";
3670
- if (entry.error) return "failed";
3671
- if (entry.latestVersion && entry.installedVersion) return entry.latestVersion !== entry.installedVersion ? "updatable" : "settled";
3672
- if (entry.latestVersion && !entry.installedVersion) return "updatable";
3673
- if (entry.lastCheckedAt > 0) return "settled";
3726
+ const verdict = knowledgeVerdictOf(entry);
3727
+ if (verdict === "update") return "updatable";
3728
+ if (verdict === "current") return "settled";
3674
3729
  return "pending";
3675
3730
  }
3676
3731
  function batchLedgerText(counts, lang) {
@@ -3706,6 +3761,13 @@ ${body}`;
3706
3761
  error: typeof e["error"] === "string" ? e["error"] : null
3707
3762
  };
3708
3763
  }
3764
+ function knowledgeVerdictOf(entry) {
3765
+ if (!entry) return "never";
3766
+ if (entry.error) return "failed";
3767
+ if (entry.latestVersion && entry.installedVersion) return entry.latestVersion !== entry.installedVersion ? "update" : "current";
3768
+ if (entry.latestVersion && !entry.installedVersion) return "update";
3769
+ return "never";
3770
+ }
3709
3771
  function langOf(lang) {
3710
3772
  try {
3711
3773
  return normalizeLangTag(typeof lang === "string" ? lang : resolveLang(lang));
@@ -3720,34 +3782,52 @@ ${body}`;
3720
3782
  return "";
3721
3783
  }
3722
3784
  }
3723
- function hasUnfinishedRows(rows, session) {
3724
- if (isObject$1(session)) {
3725
- const entries = session["entries"];
3726
- if (Array.isArray(entries)) {
3727
- for (const item of entries) {
3728
- if (!isObject$1(item)) continue;
3729
- const phase = item["phase"];
3730
- if (typeof phase === "string" && !isTerminalPhase(asBatchPhase(phase))) return true;
3731
- }
3732
- return false;
3733
- }
3785
+ function sessionEntriesOf(session) {
3786
+ if (!isObject$1(session)) return null;
3787
+ const entries = session["entries"];
3788
+ if (!Array.isArray(entries)) return null;
3789
+ return entries.filter((item) => isObject$1(item));
3790
+ }
3791
+ function entryPhaseOf(entry) {
3792
+ const phase = entry["phase"];
3793
+ return typeof phase === "string" ? asBatchPhase(phase) : null;
3794
+ }
3795
+ function isUnfinishedEntry(entry) {
3796
+ const phase = entryPhaseOf(entry);
3797
+ return phase !== null && !isTerminalPhase(phase);
3798
+ }
3799
+ function isInUnfinishedRound(session, key) {
3800
+ const entries = sessionEntriesOf(session);
3801
+ if (entries === null) return false;
3802
+ return entries.some((entry) => entry["key"] === key && isUnfinishedEntry(entry));
3803
+ }
3804
+ function sessionUpdatedAtOf(session, key) {
3805
+ const entries = sessionEntriesOf(session);
3806
+ if (entries === null) return null;
3807
+ for (const entry of entries) {
3808
+ if (entry["key"] !== key) continue;
3809
+ const at = entry["updatedAt"];
3810
+ if (typeof at === "number" && Number.isFinite(at)) return at;
3734
3811
  }
3812
+ return null;
3813
+ }
3814
+ function worldUpdateVersion(row, knowledge, sessionUpdatedAt) {
3815
+ const phase = asBatchPhase(row.phase);
3816
+ if (phase !== "current" && !(phase === "done" && row.restartRequired !== true)) return null;
3817
+ if (!knowledge || knowledge.error) return null;
3818
+ if (sessionUpdatedAt !== null && !(knowledge.lastCheckedAt > sessionUpdatedAt)) return null;
3819
+ const parts = batchRowVersionParts(row, knowledge);
3820
+ return parts.hasUpdate && parts.latest ? parts.latest : null;
3821
+ }
3822
+ function hasUnfinishedRows(rows, session) {
3823
+ const entries = sessionEntriesOf(session);
3824
+ if (entries !== null) return entries.some(isUnfinishedEntry);
3735
3825
  if (rows.length === 0) return false;
3736
3826
  return !rows.every((row) => isTerminalPhase(asBatchPhase(row.phase)));
3737
3827
  }
3738
3828
  function unfinishedCount(rows, session) {
3739
- if (isObject$1(session)) {
3740
- const entries = session["entries"];
3741
- if (Array.isArray(entries)) {
3742
- let n = 0;
3743
- for (const item of entries) {
3744
- if (!isObject$1(item)) continue;
3745
- const phase = item["phase"];
3746
- if (typeof phase === "string" && !isTerminalPhase(asBatchPhase(phase))) n += 1;
3747
- }
3748
- return n;
3749
- }
3750
- }
3829
+ const entries = sessionEntriesOf(session);
3830
+ if (entries !== null) return entries.filter(isUnfinishedEntry).length;
3751
3831
  return rows.filter((row) => !isTerminalPhase(asBatchPhase(row.phase))).length;
3752
3832
  }
3753
3833
  function batchRowStatus(row, skippedVersion, lang) {
@@ -3768,11 +3848,10 @@ ${body}`;
3768
3848
  }
3769
3849
  function batchRowKnowledgeText(row, entry, lang) {
3770
3850
  if (asBatchPhase(row.phase) !== "pending" || !entry) return null;
3771
- if (entry.error) return batchText("batch.row.failed", lang);
3772
- if (entry.latestVersion && entry.installedVersion && entry.latestVersion !== entry.installedVersion) return batchText("batch.row.update", lang, { version: entry.latestVersion });
3773
- if (entry.latestVersion && entry.installedVersion && entry.latestVersion === entry.installedVersion) return batchText("batch.row.current", lang);
3774
- if (entry.latestVersion && !entry.installedVersion) return batchText("batch.row.update", lang, { version: entry.latestVersion });
3775
- if (entry.lastCheckedAt > 0) return batchText("batch.row.current", lang);
3851
+ const verdict = knowledgeVerdictOf(entry);
3852
+ if (verdict === "update" && entry.latestVersion) return batchText("batch.row.update", lang, { version: entry.latestVersion });
3853
+ if (verdict === "current") return batchText("batch.row.current", lang);
3854
+ if (verdict === "failed") return batchText("batch.row.failed", lang);
3776
3855
  return batchText("batch.row.never", lang);
3777
3856
  }
3778
3857
  function batchRowVersionParts(row, knowledge) {
@@ -3808,9 +3887,9 @@ ${body}`;
3808
3887
  hasUpdate: false
3809
3888
  };
3810
3889
  if (latest) return {
3811
- current: latest,
3812
- latest: null,
3813
- hasUpdate: false
3890
+ current: null,
3891
+ latest,
3892
+ hasUpdate: true
3814
3893
  };
3815
3894
  return {
3816
3895
  current: null,
@@ -3820,7 +3899,11 @@ ${body}`;
3820
3899
  }
3821
3900
  function batchRowVersionHTML(row, knowledge) {
3822
3901
  const parts = batchRowVersionParts(row, knowledge);
3823
- if (parts.hasUpdate && parts.latest) return "<span class=\"dsh-upd-bver\"><span class=\"dsh-upd-bver-cur\">" + escapeHtml$1(parts.current ?? "?") + "</span><span class=\"dsh-upd-bver-arrow\" aria-hidden=\"true\"> → </span><span class=\"dsh-upd-bver-new\">" + escapeHtml$1(parts.latest) + "</span></span>";
3902
+ if (parts.hasUpdate && parts.latest) {
3903
+ const cur = parts.current ?? "?";
3904
+ const newCls = asBatchPhase(row.phase) === "done" ? "dsh-upd-bver-new-ok" : "dsh-upd-bver-new";
3905
+ return "<span class=\"dsh-upd-bver\"><span class=\"dsh-upd-bver-cur\">" + escapeHtml$1(cur) + "</span><span class=\"dsh-upd-bver-arrow\" aria-hidden=\"true\"> → </span><span class=\"" + newCls + "\">" + escapeHtml$1(parts.latest) + "</span></span>";
3906
+ }
3824
3907
  if (parts.current) return "<span class=\"dsh-upd-bver\">" + escapeHtml$1(parts.current) + "</span>";
3825
3908
  return "";
3826
3909
  }
@@ -3840,7 +3923,7 @@ ${body}`;
3840
3923
  const expandedKey = typeof input.expandedKey === "string" && input.expandedKey ? input.expandedKey : null;
3841
3924
  const lastError = typeof input.lastError === "string" && input.lastError ? input.lastError : null;
3842
3925
  const loaded = input.loaded === void 0 ? rows.length > 0 : input.loaded === true;
3843
- const counts = batchLedgerCounts(rows, input.inventory);
3926
+ const counts = batchLedgerCounts(rows, input.inventory, input.session);
3844
3927
  const installing = counts.installing > 0;
3845
3928
  const macroBusy = input.inFlight === true || installing;
3846
3929
  const total = rows.length;
@@ -3862,7 +3945,8 @@ ${body}`;
3862
3945
  changelogMarkdown: null,
3863
3946
  lang,
3864
3947
  knowledge: null,
3865
- inRound: false
3948
+ inRound: false,
3949
+ worldLatest: null
3866
3950
  };
3867
3951
  const parts = [];
3868
3952
  parts.push("<div class=\"dsh-upd-batch-head\">");
@@ -3881,24 +3965,13 @@ ${body}`;
3881
3965
  const showControls = total > 0 && hasUnfinishedRows(rows, session ?? void 0);
3882
3966
  const prefs = isObject$1(input.prefs) ? input.prefs : null;
3883
3967
  const checkOnOpen = prefs === null ? null : prefs["checkOnOpen"] === false ? false : true;
3884
- function roundEntryPhase(key) {
3885
- if (!session) return null;
3886
- const entries = session["entries"];
3887
- if (!Array.isArray(entries)) return null;
3888
- for (const item of entries) {
3889
- if (!isObject$1(item)) continue;
3890
- const e = item;
3891
- if (e["key"] === key && typeof e["phase"] === "string") return e["phase"];
3892
- }
3893
- return null;
3894
- }
3895
3968
  parts.push("<div class=\"dsh-upd-btable\">");
3896
3969
  for (const row of rows) {
3897
3970
  const raw = skippedVersions[row.key];
3898
3971
  const skipped = typeof raw === "string" && raw ? raw : null;
3899
3972
  const expanded = row.key === expandedKey;
3900
- const entryPhase = roundEntryPhase(row.key);
3901
- const inRound = entryPhase !== null && !isTerminalPhase(asBatchPhase(entryPhase));
3973
+ const inRound = isInUnfinishedRound(input.session, row.key);
3974
+ const knowledge = !inRound ? knowledgeEntryOf(input.inventory, row.key) : null;
3902
3975
  parts.push(rowSetHTML(row, {
3903
3976
  ...ctx,
3904
3977
  expanded,
@@ -3906,8 +3979,9 @@ ${body}`;
3906
3979
  notice: expanded && row.key === detailNoticeKey ? notice : null,
3907
3980
  changelogMarkdown: expanded && typeof changelogs[row.key] === "string" ? changelogs[row.key] : null,
3908
3981
  lang,
3909
- knowledge: asBatchPhase(row.phase) === "pending" && !inRound ? knowledgeEntryOf(input.inventory, row.key) : null,
3910
- inRound
3982
+ knowledge,
3983
+ inRound,
3984
+ worldLatest: worldUpdateVersion(row, knowledge, sessionUpdatedAtOf(input.session, row.key))
3911
3985
  }));
3912
3986
  }
3913
3987
  parts.push("</div>");
@@ -4007,7 +4081,7 @@ ${body}`;
4007
4081
  const queued = isQueuedRow(row);
4008
4082
  const position = queued ? queuePositionOf(row) : null;
4009
4083
  const versionHTML = batchRowVersionHTML(row, ctx.knowledge);
4010
- const rowStatusText = queued ? batchQueuedStatus(position, ctx.lang) : ctx.inRound ? batchRowKnowledgeText(row, ctx.knowledge, ctx.lang) ?? batchRowStatus(row, skipped, ctx.lang) : batchRowPendingStatus(row, ctx.knowledge, ctx.lang) ?? batchRowStatus(row, skipped, ctx.lang);
4084
+ const rowStatusText = queued ? batchQueuedStatus(position, ctx.lang) : ctx.worldLatest !== null ? batchText("batch.row.update", ctx.lang, { version: ctx.worldLatest }) : ctx.inRound ? batchRowKnowledgeText(row, ctx.knowledge, ctx.lang) ?? batchRowStatus(row, skipped, ctx.lang) : batchRowPendingStatus(row, ctx.knowledge, ctx.lang) ?? batchRowStatus(row, skipped, ctx.lang);
4011
4085
  const actions = [];
4012
4086
  const off = ctx.inFlight ? " disabled" : "";
4013
4087
  if (phase === "installing") actions.push("<button type=\"button\" data-act=\"row-install\" data-key=\"" + keyAttr + "\" disabled>" + escapeHtml$1(batchText("batch.row-action.installing", ctx.lang)) + "</button>");
@@ -4028,7 +4102,7 @@ ${body}`;
4028
4102
  const codeEsc = escapeHtml$1(failCode);
4029
4103
  return "<span class=\"dsh-upd-bfail\">" + (escaped.includes(codeEsc) ? escaped.replace(codeEsc, "<code>" + codeEsc + "</code>") : escaped) + "</span>";
4030
4104
  })() : "";
4031
- const main = "<button type=\"button\" class=\"dsh-upd-brow-main\" data-act=\"toggle-details\" data-key=\"" + keyAttr + "\" aria-expanded=\"" + (ctx.expanded ? "true" : "false") + "\"><span class=\"dsh-upd-updot\" data-tone=\"" + dotToneOf(row, phase, skipped, queued) + "\"></span><span class=\"dsh-upd-bname\">" + escapeHtml$1(titleOf(row, ctx.titles)) + "</span>" + versionHTML + "<span class=\"dsh-upd-bstat\">" + escapeHtml$1(rowStatusText) + (ctx.inRound && !queued ? "(" + escapeHtml$1(batchText("batch.row.unfinished-tag", ctx.lang)) + ")" : "") + "</span>" + failLine + "</button>";
4105
+ const main = "<button type=\"button\" class=\"dsh-upd-brow-main\" data-act=\"toggle-details\" data-key=\"" + keyAttr + "\" aria-expanded=\"" + (ctx.expanded ? "true" : "false") + "\"><span class=\"dsh-upd-updot\" data-tone=\"" + dotToneOf(row, phase, skipped, queued, ctx.worldLatest) + "\"></span><span class=\"dsh-upd-bname\">" + escapeHtml$1(titleOf(row, ctx.titles)) + "</span>" + versionHTML + "<span class=\"dsh-upd-bstat\">" + escapeHtml$1(rowStatusText) + (ctx.inRound && !queued ? "(" + escapeHtml$1(batchText("batch.row.unfinished-tag", ctx.lang)) + ")" : "") + "</span>" + failLine + "</button>";
4032
4106
  const detail = ctx.expanded ? "<div class=\"dsh-upd-bdetail\" data-key=\"" + keyAttr + "\">" + detailActionsHTML(row, ctx) + (ctx.notice !== null ? "<div class=\"dsh-upd-bdetail-notice\" role=\"status\">" + escapeHtml$1(ctx.notice) + "</div>" : "") + detailHTML(row, ctx) + "</div>" : "";
4033
4107
  return "<div class=\"dsh-upd-brow-set\" data-key=\"" + keyAttr + "\"><div class=\"dsh-upd-brow\" data-phase=\"" + escapeHtml$1(phase) + "\" data-key=\"" + keyAttr + "\"" + (queued ? " data-queued=\"1\"" : "") + ">" + main + "<span class=\"dsh-upd-brow-actions\">" + actions.join("") + "</span></div>" + detail + "</div>";
4034
4108
  }
@@ -4048,6 +4122,7 @@ ${body}`;
4048
4122
  theme: ctx.theme,
4049
4123
  themeTokens: ctx.themeTokens,
4050
4124
  profileName: typeof row.profileName === "string" && row.profileName ? row.profileName : null,
4125
+ hostKind: typeof row.hostKind === "string" && row.hostKind ? row.hostKind : null,
4051
4126
  actions: "none"
4052
4127
  }, ctx.lang));
4053
4128
  }
@@ -4063,6 +4138,7 @@ ${body}`;
4063
4138
  if (cancelQueuePhoneOf(row) !== null && queuedRequestIdOf(row) !== null) buttons.push("<button type=\"button\" data-act=\"row-cancel-queue\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$1(batchText("batch.row-action.cancel-queue", ctx.lang)) + "</button>");
4064
4139
  } else if (phase === "failed") buttons.push("<button type=\"button\" data-act=\"row-install\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$1(ctx.busy ? batchText("batch.row-action.queue", ctx.lang) : batchText("batch.row-action.retry", ctx.lang)) + "</button>");
4065
4140
  else if (phase === "ready" && ctx.skipped === null) buttons.push("<button type=\"button\" data-act=\"row-install\" data-key=\"" + keyAttr + "\" data-primary=\"1\"" + off + ">" + escapeHtml$1(ctx.busy ? batchText("batch.row-action.queue", ctx.lang) : version !== null ? batchText("batch.row-action.install-version", ctx.lang, { version }) : batchText("batch.row-action.install-generic", ctx.lang)) + "</button>");
4141
+ if (phase !== "installing" && singleCheckPhoneOf(row) !== null) buttons.push("<button type=\"button\" data-act=\"row-check\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$1(batchText("batch.action.check", ctx.lang)) + "</button>");
4066
4142
  if (!queued && phase === "ready" && ctx.skipped === null && version !== null) buttons.push("<button type=\"button\" data-act=\"row-skip\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$1(batchText("batch.row-action.skip", ctx.lang)) + "</button>");
4067
4143
  if (ctx.skipped !== null) buttons.push("<button type=\"button\" data-act=\"row-resume-skip\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$1(batchText("batch.row-action.unskip", ctx.lang, { version: ctx.skipped })) + "</button>");
4068
4144
  if (typeof row.manual === "string" && row.manual) buttons.push("<button type=\"button\" data-act=\"row-copy-manual\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$1(batchText("batch.row-action.copy-manual", ctx.lang)) + "</button>");
@@ -4072,11 +4148,12 @@ ${body}`;
4072
4148
  function stripActionButtons(html) {
4073
4149
  return html.replace(/<button\b[^>]*data-action=[^>]*>[\s\S]*?<\/button>/g, "");
4074
4150
  }
4075
- function dotToneOf(row, phase, skipped, queued) {
4151
+ function dotToneOf(row, phase, skipped, queued, worldLatest = null) {
4076
4152
  if (phase === "failed" && !queued) return "bad";
4077
4153
  if (phase === "installing" || phase === "checking") return "busy";
4078
4154
  if (queued) return "warn";
4079
4155
  if (row.restartRequired === true) return "warn";
4156
+ if (worldLatest !== null) return "todo";
4080
4157
  if (phase === "ready") return skipped === null ? "todo" : "idle";
4081
4158
  if (phase === "current" || phase === "done") return "ok";
4082
4159
  return "idle";
@@ -4108,11 +4185,15 @@ ${body}`;
4108
4185
  ".dsh-upd-bver-cur{opacity:.65}",
4109
4186
  ".dsh-upd-bver-arrow{opacity:.6}",
4110
4187
  ".dsh-upd-bver-new{color:var(--dsh-update-new-text,#dc2626);font-weight:700}",
4188
+ ".dsh-upd-bver-new-ok{color:var(--dsh-update-new-ok-text,#047857);font-weight:700}",
4111
4189
  ".dsh-upd-bstat{font-size:12.5px;opacity:.9;min-width:0;overflow-wrap:anywhere}",
4112
4190
  ".dsh-upd-bfail{grid-column:1/-1;display:block;font-size:12.5px;color:var(--dsh-update-bad-border,#dc2626)}",
4113
4191
  ".dsh-upd-batch{--dsh-update-new-text:#dc2626}",
4192
+ ".dsh-upd-batch{--dsh-update-new-ok-text:#047857}",
4114
4193
  "@media (prefers-color-scheme: dark){.dsh-upd-batch{--dsh-update-new-text:#f87171}}",
4194
+ "@media (prefers-color-scheme: dark){.dsh-upd-batch{--dsh-update-new-ok-text:#34d399}}",
4115
4195
  "@media (forced-colors: active){.dsh-upd-bver-new{color:CanvasText}}",
4196
+ "@media (forced-colors: active){.dsh-upd-bver-new-ok{color:CanvasText}}",
4116
4197
  ".dsh-upd-blist{font-size:12.5px;margin-top:2px}",
4117
4198
  ".dsh-upd-batch-ledger{margin:8px 0 0;font-size:13px;opacity:.85}",
4118
4199
  ".dsh-upd-batch-more{margin-top:6px}",
@@ -4148,7 +4229,10 @@ ${body}`;
4148
4229
  ".dsh-upd[data-theme=\"archive\"] .dsh-upd-bver{font-family:var(--dsh-update-font-mono);color:var(--dsh-update-text-muted)}",
4149
4230
  ".dsh-upd[data-theme=\"archive\"] .dsh-upd-bver-cur{opacity:.75}",
4150
4231
  ".dsh-upd[data-theme=\"archive\"] .dsh-upd-bver-new{color:var(--dsh-update-new-text,#b3261e)}",
4232
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-bver-new-ok{color:var(--dsh-update-new-ok-text,#1a7f37)}",
4233
+ "@media (prefers-color-scheme: dark){.dsh-upd[data-theme=\"archive\"] .dsh-upd-batch{--dsh-update-new-ok-text:#8fd6a4}}",
4151
4234
  ".dsh-upd[data-theme=\"archive\"] .dsh-upd-batch{--dsh-update-new-text:#b3261e}",
4235
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-batch{--dsh-update-new-ok-text:#1a7f37}",
4152
4236
  "@media (prefers-color-scheme: dark){.dsh-upd[data-theme=\"archive\"] .dsh-upd-batch{--dsh-update-new-text:#ef8a7d}}",
4153
4237
  ".dsh-upd[data-theme=\"archive\"] .dsh-upd-batch-ledger{color:var(--dsh-update-text-muted)}",
4154
4238
  ".dsh-upd[data-theme=\"archive\"] .dsh-upd-batch-sum{color:var(--dsh-update-text)}",
@@ -4192,6 +4276,12 @@ ${body}`;
4192
4276
  for (const entry of queue.waiting) if (entry && typeof entry.requestId === "string" && entry.requestId) return entry.requestId;
4193
4277
  return null;
4194
4278
  }
4279
+ function singleCheckPhoneOf(row) {
4280
+ const phones = isObject$1(row.phoneNames) ? row.phoneNames : null;
4281
+ if (!phones) return null;
4282
+ const check = phones["updateCheck"];
4283
+ return typeof check === "string" && check ? check : null;
4284
+ }
4195
4285
  function cancelQueuePhoneOf(row) {
4196
4286
  const phones = isObject$1(row.phoneNames) ? row.phoneNames : null;
4197
4287
  if (!phones) return null;
@@ -4269,6 +4359,21 @@ ${body}`;
4269
4359
  detail: detail || null
4270
4360
  };
4271
4361
  }
4362
+ function diagStructuredSuffix(diagValue) {
4363
+ const t = readDiagTolerant(diagValue);
4364
+ const parts = [];
4365
+ if (t.stage) parts.push("stage=" + t.stage);
4366
+ if (t.route) parts.push("route=" + t.route);
4367
+ if (t.method) parts.push("method=" + t.method);
4368
+ if (typeof t.httpStatus === "number") parts.push("HTTP=" + String(t.httpStatus));
4369
+ if (typeof t.exitCode === "number") parts.push("exit=" + String(t.exitCode));
4370
+ if (typeof t.latencyMs === "number") parts.push("latency=" + String(t.latencyMs) + "ms");
4371
+ if (t.registryHost) parts.push("source=" + t.registryHost);
4372
+ if (t.action) parts.push("action=" + t.action);
4373
+ if (t.requestId) parts.push("request=" + t.requestId);
4374
+ if (t.checkId) parts.push("check=" + t.checkId);
4375
+ return parts.length > 0 ? parts.join(" · ") : null;
4376
+ }
4272
4377
  function diagTextOf(row, lang) {
4273
4378
  const snapshot = isObject$1(row.snapshot) ? row.snapshot : null;
4274
4379
  const queue = isObject$1(row.queue) ? row.queue : null;
@@ -4276,7 +4381,9 @@ ${body}`;
4276
4381
  const text = (value) => typeof value === "string" && value ? value : null;
4277
4382
  const job = jobFailureOf(row);
4278
4383
  const diagDetail = diag ? text(diag["detail"]) : null;
4279
- const detail = diagDetail !== null ? diagDetail : job !== null && job.detail !== null ? job.detail + batchText("batch.diag.source-job", langOf(lang)) : null;
4384
+ const baseDetail = diagDetail !== null ? diagDetail : job !== null && job.detail !== null ? job.detail + batchText("batch.diag.source-job", langOf(lang)) : null;
4385
+ const structured = diagStructuredSuffix(row.diag);
4386
+ const detail = baseDetail !== null && structured !== null ? baseDetail + " [" + structured + "]" : baseDetail ?? structured;
4280
4387
  return buildDiagnosticText({
4281
4388
  pluginId: pluginIdOf(row),
4282
4389
  code: job !== null && job.code !== null ? job.code : row.error || "check-failed",
@@ -4385,6 +4492,7 @@ ${body}`;
4385
4492
  let notice = null;
4386
4493
  let noticeKey = null;
4387
4494
  let inFlight = false;
4495
+ let inFlightIsCheck = false;
4388
4496
  let loaded = false;
4389
4497
  let refreshing = false;
4390
4498
  let confirmCancelArmed = false;
@@ -4666,6 +4774,7 @@ ${body}`;
4666
4774
  async function phone(name, args, busyRowKey = null) {
4667
4775
  if (!mounted || inFlight) return null;
4668
4776
  inFlight = true;
4777
+ inFlightIsCheck = name === phones.check;
4669
4778
  clearNotice();
4670
4779
  render();
4671
4780
  let out = null;
@@ -4685,6 +4794,7 @@ ${body}`;
4685
4794
  out = null;
4686
4795
  } finally {
4687
4796
  inFlight = false;
4797
+ inFlightIsCheck = false;
4688
4798
  if (mounted) render();
4689
4799
  }
4690
4800
  maybeAutoRowChangelog(expandedKey);
@@ -4759,6 +4869,10 @@ ${body}`;
4759
4869
  const row = typeof key === "string" && key ? rowOfKey(key) : null;
4760
4870
  const version = row ? latestVersionOf(row) : null;
4761
4871
  if (!row || !version) return;
4872
+ if (!validReleaseVersion(version)) {
4873
+ render();
4874
+ return;
4875
+ }
4762
4876
  try {
4763
4877
  skipStoreFor(pluginIdOf(row)).skip(version);
4764
4878
  } catch {}
@@ -4777,6 +4891,46 @@ ${body}`;
4777
4891
  render();
4778
4892
  return;
4779
4893
  }
4894
+ case "row-check": {
4895
+ const row = typeof key === "string" && key ? rowOfKey(key) : null;
4896
+ if (!row) return;
4897
+ const phoneName = singleCheckPhoneOf(row);
4898
+ if (phoneName === null) return;
4899
+ if (inFlight) return;
4900
+ inFlight = true;
4901
+ inFlightIsCheck = true;
4902
+ clearNotice();
4903
+ render();
4904
+ try {
4905
+ const reply = await call(phoneName, {
4906
+ includeEnv: true,
4907
+ includeQueue: true
4908
+ });
4909
+ if (!mounted) return;
4910
+ if (isObject$1(reply) && reply["ok"] !== true) {
4911
+ const rec = reply;
4912
+ const kind2 = typeof rec["errorKind"] === "string" && rec["errorKind"].trim() ? rec["errorKind"].trim() : "";
4913
+ const err = typeof rec["error"] === "string" && rec["error"].trim() ? rec["error"].trim() : "";
4914
+ const code = kind2 || err || "check-failed";
4915
+ const copy = failureCopy(code, currentLang());
4916
+ say(copy ? copy.zh + "|" + copy.act : code, row.key);
4917
+ }
4918
+ } catch {
4919
+ if (mounted) {
4920
+ const copy = failureCopy("check-failed", currentLang());
4921
+ say(copy ? copy.zh + "|" + copy.act : "check-failed", row.key);
4922
+ }
4923
+ } finally {
4924
+ inFlight = false;
4925
+ inFlightIsCheck = false;
4926
+ }
4927
+ try {
4928
+ for (const k of [...rowFailedAt.keys()]) if (k === row.key || k.startsWith(row.key + "\0")) rowFailedAt.delete(k);
4929
+ } catch {}
4930
+ await refresh();
4931
+ maybeAutoRowChangelog(expandedKey);
4932
+ return;
4933
+ }
4780
4934
  case "row-cancel-queue": {
4781
4935
  const row = typeof key === "string" && key ? rowOfKey(key) : null;
4782
4936
  if (!row) return;
@@ -4966,7 +5120,7 @@ ${body}`;
4966
5120
  } catch {}
4967
5121
  const timer = getTimer();
4968
5122
  const handle = timer.set(() => {
4969
- if (inFlight) return;
5123
+ if (inFlight && inFlightIsCheck) return;
4970
5124
  refresh();
4971
5125
  }, pollMs);
4972
5126
  try {
@@ -4986,7 +5140,7 @@ ${body}`;
4986
5140
  };
4987
5141
  }
4988
5142
  //#endregion
4989
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.8.0/node_modules/dsh-plugin-update/dist/entry-batch.js
5143
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.9.0/node_modules/dsh-plugin-update/dist/entry-batch.js
4990
5144
  function isObject(value) {
4991
5145
  return !!value && typeof value === "object" && !Array.isArray(value);
4992
5146
  }
@@ -4999,7 +5153,9 @@ ${body}`;
4999
5153
  }
5000
5154
  function batchEntrySummary(state, lang) {
5001
5155
  const rows = state?.rows ?? null;
5002
- const counts = batchLedgerCounts(Array.isArray(rows) ? rows : []);
5156
+ const inventory = state?.inventory ?? void 0;
5157
+ const session = state?.session;
5158
+ const counts = batchLedgerCounts(Array.isArray(rows) ? rows : [], inventory, session);
5003
5159
  const total = Array.isArray(rows) ? rows.length : 0;
5004
5160
  let kind;
5005
5161
  if (!Array.isArray(rows) || rows.length === 0) kind = state?.error ? "failed" : "idle";
@@ -5097,6 +5253,8 @@ ${body}`;
5097
5253
  const ENTRY_SELECTOR = "[data-dsh-upd-entry]";
5098
5254
  let rows = null;
5099
5255
  let error = null;
5256
+ let inventory = null;
5257
+ let session = null;
5100
5258
  let note = null;
5101
5259
  let loaded = false;
5102
5260
  let activating = false;
@@ -5124,7 +5282,9 @@ ${body}`;
5124
5282
  function stateOf() {
5125
5283
  return {
5126
5284
  rows,
5127
- error
5285
+ error,
5286
+ inventory,
5287
+ session
5128
5288
  };
5129
5289
  }
5130
5290
  function summaryOf() {
@@ -5161,6 +5321,8 @@ ${body}`;
5161
5321
  }
5162
5322
  const next = asRows(reply["rows"]);
5163
5323
  if (next) rows = next;
5324
+ if (isObject(reply) && "inventory" in reply) inventory = reply["inventory"] ?? null;
5325
+ if (isObject(reply) && "session" in reply) session = reply["session"] ?? null;
5164
5326
  error = null;
5165
5327
  loaded = true;
5166
5328
  }
@@ -7283,7 +7445,7 @@ ${body}`;
7283
7445
  }, react.createElement("span", { style: S.morePkg }, row.pkg), react.createElement("span", { style: S.moreDesc }, row.desc), react.createElement("span", { style: S.moreIcon }, react.createElement(ExternalIcon, null)))));
7284
7446
  }
7285
7447
  /** 版本胶囊那一行字:只在这里拼一次,屏上与用例读的是同一串。 */
7286
- const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.50";
7448
+ const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.51";
7287
7449
  /** 爱生活面板:总设置区 + 检查更新(七家)+ 爱生活页签条(slot 驱动)+ 技能设置页投影/缺席卡。 */
7288
7450
  function LifePackSection(props) {
7289
7451
  const tabsId = react.useId();