dsh-mobile-plugin 0.1.64 → 0.1.65

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.
@@ -469,7 +469,10 @@ function registerControlPlaneRoutes(deps) {
469
469
  // 拿不到(无头部署 / 没有外壳的那一版)就退回这一代自己的版本号。
470
470
  registerRoute({ kind: 'exact', path: '/api/relay/update/check', handler: localOnly('POST', async (_req, res) => {
471
471
  const runtime = pluginRuntime()
472
- const snapshot = runtime ? runtime.status() : null
472
+ // 形状必须和上面那条 `update/status` **一模一样**(含 `available`)。2026-10-11 的真机现场:
473
+ // 这条只回 `runtime.status()`,面板拿它 `setHost()` 覆盖掉好状态,`available` 变成 undefined,
474
+ // 卡片当场从「宿主模式」掉进取降级那一半 —— 用户看到的现象是「有新版本却没有『立即更新』」。
475
+ const snapshot = runtime ? { available: true, ...runtime.status() } : null
473
476
  try {
474
477
  const update = await checkForUpdate({
475
478
  installedVersion: snapshot?.installedVersion ?? snapshot?.version ?? generationVersion(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mobile-plugin",
3
- "version": "0.1.64",
3
+ "version": "0.1.65",
4
4
  "description": "Mobile API (/api/mobile/v1) and relay client for the DSH mobile app — desktop profile build (0.2.0-rc.2 compatible, peers resolved by the host)",
5
5
  "license": "MIT",
6
6
  "type": "module",