@iasiv5/dsh-quota-watch 0.1.30 → 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
@@ -1,6 +1,5 @@
1
1
  # DSH Quota Watch
2
2
 
3
- [![Release](https://img.shields.io/github/v/release/iasiv5/dsh-quota-watch?label=Release&sort=semver)](https://github.com/iasiv5/dsh-quota-watch/releases)
4
3
  [![CI](https://img.shields.io/github/actions/workflow/status/iasiv5/dsh-quota-watch/ci.yml?branch=main&label=CI)](https://github.com/iasiv5/dsh-quota-watch/actions/workflows/ci.yml)
5
4
  [![npm](https://img.shields.io/npm/v/@iasiv5/dsh-quota-watch?label=npm)](https://www.npmjs.com/package/@iasiv5/dsh-quota-watch)
6
5
  [![License](https://img.shields.io/github/license/iasiv5/dsh-quota-watch?label=License)](./LICENSE)
@@ -24,7 +23,7 @@
24
23
 
25
24
  | 项目 | 要求或声明 |
26
25
  |---|---|
27
- | DSH | `>=0.1.7-rc.2`(包元数据声明的最低版本) |
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` 实例上运行时实测 |
28
27
  | Node.js | `>=20` |
29
28
  | Cordis | peer dependency `^4.0.2` |
30
29
  | 客户端平台 | 包元数据声明 `web` |
@@ -87,7 +86,7 @@ Web 与 Desktop profile 均已实测适配。按 DSH 插件管理器提示完成
87
86
 
88
87
  ## English summary
89
88
 
90
- DSH Quota Watch displays provider-reported quota snapshots for GLM Coding Plan and GitHub Copilot in a floating capsule, detail panel, and optional sidebar card that is hidden by default and toggled from the panel. It does not read DSH session tokens or derive Copilot remaining credits from credits used. The declared requirements are DSH `>=0.1.7-rc.2`, Node.js `>=20`, and Cordis peer `^4.0.2`; the package declares a Web client target. The plugin has been manually verified with both DSH Web and Desktop profiles; CI does not run host-profile integration tests.
89
+ DSH Quota Watch displays provider-reported quota snapshots for GLM Coding Plan and GitHub Copilot in a floating capsule, detail panel, and optional sidebar card that is hidden by default and toggled from the panel. It does not read DSH session tokens or derive Copilot remaining credits from credits used. The declared requirements are DSH `>=0.2.0-rc.1`, Node.js `>=20`, and Cordis peer `^4.0.2`; the package declares a Web client target. Compatibility with DSH `0.2.1-rc.2` has been reviewed by a static source audit (`docs/reports/2026-10-17-dsh-0.2.1-rc.2-compat-audit.md`); runtime verification follows host upgrades. The plugin has been manually verified with both DSH Web and Desktop profiles; CI does not run host-profile integration tests.
91
90
 
92
91
  Install for a DSH Web or Desktop profile from the DSH plugin marketplace. Both profiles have been manually verified; the CLI install commands are shown above.
93
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iasiv5/dsh-quota-watch",
3
- "version": "0.1.30",
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",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dsh": {
44
44
  "engines": {
45
- "dsh": ">=0.1.7-rc.2"
45
+ "dsh": ">=0.2.0-rc.1"
46
46
  },
47
47
  "bundle": {
48
48
  "patch": "./cordis.patch.yml"
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. */