@iasiv5/dsh-quota-watch 0.1.31 → 0.1.32

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 CHANGED
@@ -23,7 +23,7 @@
23
23
 
24
24
  | 项目 | 要求或声明 |
25
25
  |---|---|
26
- | DSH | `>=0.2.0-rc.1`(包元数据声明的最低版本);`0.2.1-rc.2` 已完成静态源码适配审计(`docs/reports/2026-10-17-dsh-0.2.1-rc.2-compat-audit.md`),运行时验证随宿主升级跟进 |
26
+ | DSH | `>=0.2.0-rc.1`(包元数据声明的最低版本);`0.2.1-rc.2` 已完成静态源码适配审计(`docs/reports/2026-10-17-dsh-0.2.1-rc.2-compat-audit.md`,含 2026-10-19 复核附记),并已在 DSH Web `0.2.1-rc.2` 实例上运行时实测 |
27
27
  | Node.js | `>=20` |
28
28
  | Cordis | peer dependency `^4.0.2` |
29
29
  | 客户端平台 | 包元数据声明 `web` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iasiv5/dsh-quota-watch",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "DSH Web sidebar monitor for GLM Coding Plan quotas and GitHub Copilot credits",
5
5
  "type": "module",
6
6
  "main": "./src/host.mjs",
package/src/access.mjs CHANGED
@@ -46,13 +46,17 @@ export function isLoopbackRequest(request) {
46
46
 
47
47
  function pairingService(ctx) {
48
48
  try {
49
+ // Sanctioned non-throwing lookup: works whenever a future host provides
50
+ // the pairing service again. On cordis Local a bare `ctx.remoteWebUiPairing`
51
+ // property read throws for a non-injected service, so it must not be used
52
+ // as a fallback (the service itself is absent from 0.2.x hosts — pairing
53
+ // authorization currently degrades to loopback-only).
49
54
  const fromGet = typeof ctx.get === 'function' ? ctx.get('remoteWebUiPairing', false) : undefined
50
55
  if (fromGet && typeof fromGet.isPairedDevice === 'function') return fromGet
51
56
  } catch {
52
57
  // Missing optional pairing service stays loopback-only.
53
58
  }
54
- const direct = ctx.remoteWebUiPairing
55
- return direct && typeof direct.isPairedDevice === 'function' ? direct : undefined
59
+ return undefined
56
60
  }
57
61
 
58
62
  /** Allow the local desktop or a browser session explicitly paired by the host. */