dsh-github-copilot 0.4.0-alpha.34 → 0.4.0-alpha.35

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0-alpha.35 (prepared)
4
+
5
+ - Match the account-usage control to native secondary statistics typography, line height and pill spacing (#160).
6
+ - Keep its label on one line within the host's available width, with ellipsis and a full-label tooltip for constrained layouts; independent details, focus and account-wide billing semantics remain unchanged.
7
+ - Remove the permanently unavailable Session credits section. Hide missing, malformed, zero or elapsed reset metadata instead of displaying the Unix epoch; prefer a valid snapshot reset, then a valid account-level date, without inventing dates or discarding otherwise valid quota amounts.
8
+ - Continue using the existing additive composer dock. Shared-row placement and responsive wrapping belong to the host layout; no private DOM relocation, native statistics replacement or new Core API dependency is introduced by this plugin.
9
+ - Preserve alpha.34's Model roles retirement and compatibility-only historical Session behavior. This presentation update does not install, activate or restart a profile.
10
+
3
11
  ## 0.4.0-alpha.34 (prepared, PR-only)
4
12
 
5
13
  - Retire the Model roles / planner-executor settings, legacy Settings fallback, and dedicated-session creation UI (#158); ordinary Sessions and Core-owned subagents remain the intended workflow.
package/README.md CHANGED
@@ -65,13 +65,15 @@ Alpha.33 corrects alpha.32's missing selector argument to the public Session hoo
65
65
 
66
66
  For a Session using `github-copilot` or `github-copilot-preview`, an optional **Credits** control shows the signed-in account's reported billing-cycle usage and remaining allocation. It uses the public composer dock, leaves the native Context meter unchanged, and disappears for other providers. Open it for budget, reset time, freshness and refresh details. Unsupported Client slots disable only this optional control.
67
67
 
68
- Numbers are not token estimates: legacy accounts show **Premium requests**, a shared organization pool may provide used credits without any individual remaining balance, and absent data is **Unavailable**, never zero or unlimited. Failed refreshes may retain explicitly **last-known** same-account values; authentication/account invalidation removes them. **This session** remains unavailable because the supported native adapter does not expose complete provider-reported credit accounting through the public plugin contract. It is not inferred from account deltas.
68
+ Alpha.35 matches native secondary statistics typography and pill spacing. A host with a shared wrapping dock can place Credits directly after Cache hit and wrap entries when space runs out; older hosts retain their own layout. A reading wider than its allocated width is ellipsized, with its complete text retained for accessibility, the tooltip and independent details. The plugin does not move native DOM or replace statistics; [responsive layout ownership and evidence limits](./docs/copilot-usage.md#responsive-statistics-presentation-alpha35) remain explicit.
69
+
70
+ Numbers are not token estimates: legacy accounts show **Premium requests**, a shared organization pool may provide used credits without any individual remaining balance, and absent data is **Unavailable**, never zero or unlimited. Failed refreshes may retain explicitly **last-known** same-account values; authentication/account invalidation removes them. Per-session credits are not displayed because the supported native adapter does not expose complete provider-reported credit accounting through the public plugin contract. They are not inferred from account deltas. Reset time is shown only when a valid supplier-reported next-reset date is later than the snapshot observation; missing, invalid, zero or elapsed reset metadata is omitted without discarding otherwise valid account amounts.
69
71
 
70
72
  The Host reads GitHub's internal quota endpoint using the existing canonical OAuth grant, with bounded requests and cache lifetimes; no new sign-in, credential store, model transport, settings write or model switch is added. This internal endpoint can change or deny access; enterprise custom endpoints are not guessed. The public enterprise/organization metrics reports are not used as a live personal balance service. See [data semantics, lifecycle and evidence limits](./docs/copilot-usage.md). Synthetic tests do not establish real account access, billing freshness or installed Desktop activation.
71
73
 
72
74
  ## Install and sign in
73
75
 
74
- The commands below target the package version `0.4.0-alpha.34`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
76
+ The commands below target the package version `0.4.0-alpha.35`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
75
77
 
76
78
  Before installing/updating, unpack the **checksum-verified** archive into a temporary directory and run its read-only composition preflight (replace all paths with absolute paths for the intended profile):
77
79
 
@@ -84,7 +86,7 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
84
86
  For approved online installation, the supported CLI command is:
85
87
 
86
88
  ```sh
87
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.34/dsh-github-copilot-0.4.0-alpha.34.tgz
89
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.35/dsh-github-copilot-0.4.0-alpha.35.tgz
88
90
  ```
89
91
 
90
92
  If registry access is blocked or unavailable, do not retry it through another network. Desktop-managed profiles may instead use the [controlled offline CLI procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance), with an approved, checksum-verified local Release and existing dependency cache (`--offline --ignore-scripts`). All preflight and approval requirements still apply.
@@ -149,7 +151,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
149
151
  5. Confirm **Signed in** and inspect the automatic discovery result before asking the user to choose a model. Already-signed-in Models opening ensures missing/stale metadata automatically; fresh ready cache makes no request. Use visible **Retry** for errors or **Manage → Refresh models** for an intentional forced update, not routine setup. Status alone does not discover, and login, metadata and successful model calls remain separate evidence.
150
152
  6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
151
153
 
152
- GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. The native Desktop package manager is preferred when permitted registry access is available; after npm publication is verified it accepts `dsh-github-copilot@0.4.0-alpha.34`, not a URL or file. Desktop-managed profiles also support explicitly approved [controlled offline CLI maintenance](./docs/npm-distribution.md#controlled-offline-cli-maintenance) with a verified local Release and `--offline --ignore-scripts`. Follow the mandatory search-composition preflight, backup, single-writer and post-install checks; do not bypass a corporate registry ban, disable TLS verification or restart without separate approval. Offline installation is not proof that npm networking/publication was repaired. See [distribution and publication requirements](./docs/npm-distribution.md).
154
+ GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. The native Desktop package manager is preferred when permitted registry access is available; after npm publication is verified it accepts `dsh-github-copilot@0.4.0-alpha.35`, not a URL or file. Desktop-managed profiles also support explicitly approved [controlled offline CLI maintenance](./docs/npm-distribution.md#controlled-offline-cli-maintenance) with a verified local Release and `--offline --ignore-scripts`. Follow the mandatory search-composition preflight, backup, single-writer and post-install checks; do not bypass a corporate registry ban, disable TLS verification or restart without separate approval. Offline installation is not proof that npm networking/publication was repaired. See [distribution and publication requirements](./docs/npm-distribution.md).
153
155
 
154
156
  No `copilot2api` process, external gateway, placeholder API key, pasted GitHub token, or separate `dsh-web-search-provider` installation is required.
155
157
 
@@ -166,7 +168,7 @@ DSH Core continues to own model selection, sandboxing, tools, attachments, and o
166
168
 
167
169
  ## Retired planner / executor experience
168
170
 
169
- The `0.4.0-alpha.34` candidate removes **Model roles**, its legacy **Copilot · Model roles** fallback, the planning/execution selectors and the dedicated-session creation button (#158). Use ordinary Sessions and Core-owned model selection/subagents; this plugin adds no replacement role UI or automatic model mapping.
171
+ Since `0.4.0-alpha.34`, **Model roles**, its legacy **Copilot · Model roles** fallback, the planning/execution selectors and the dedicated-session creation button are retired (#158). Use ordinary Sessions and Core-owned model selection/subagents; this plugin adds no replacement role UI or automatic model mapping.
170
172
 
171
173
  Parent-model → subagent-model rules and their native settings UI are separate, still-pending work in [Core PR #95](https://github.com/cloga/deepseek-harness/pull/95). Removing this plugin UI does not make those rules available on older or currently installed Core versions, and does not depend on that PR shipping.
172
174
 
@@ -410,8 +412,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
410
412
  `package.json` declares public npm distribution. A release tag must equal `v${package.json.version}`. Versions use standard SemVer prerelease labels (`alpha`, `beta`, or `rc`), each with its matching npm dist-tag; only stable versions use `latest`. The Release workflow performs the frozen install and complete verification gate, packs once (or recovers the original archive on retry), verifies `SHA256SUMS`, publishes the immutable GitHub Release and then publishes those same bytes to npm through OIDC. Either channel failing means delivery is incomplete. First package creation needs an authorized maintainer; staging requires an existing package and is not a first-package bootstrap. Historical releases are not republished.
411
413
 
412
414
  ```sh
413
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.34/dsh-github-copilot-0.4.0-alpha.34.tgz
414
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.34/SHA256SUMS
415
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.35/dsh-github-copilot-0.4.0-alpha.35.tgz
416
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.35/SHA256SUMS
415
417
  sha256sum --check SHA256SUMS
416
418
  ```
417
419
 
@@ -419,7 +421,7 @@ PowerShell can verify the same two downloaded files with:
419
421
 
420
422
  ```powershell
421
423
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
422
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.34.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
424
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.35.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
423
425
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
424
426
  ```
425
427
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  一个聚焦 GitHub Copilot 登录、通用账号模型发现、Copilot 专用 Tool 兼容与供应方托管搜索的 DSH companion。插件根据供应方返回的端点和能力元数据组装模型,复用公开的 `@deepseek-ai/dsh-llm-pi-ai` adapter 与 pi-ai SDK,不另写一套通用传输/序列化器,也不维护需要逐个添加新模型 ID 的静态目录。
11
11
 
12
- > 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.34`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
12
+ > 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.35`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
13
13
 
14
14
  Alpha.24 修复 Web search 卡片缺少精确 Remote 依赖声明的问题。卡片仍位于 **Settings → Models**(`settings.models.footer`,list/root),旧 Core 回退到独立 Web search section,而非 General。搜索子 Fiber 独立等待 routing namespace,不影响账号控件和既有搜索安全检查;实际打包 Desktop 验收仍是独立关卡。
15
15
 
@@ -67,7 +67,9 @@ Alpha.33 修正 alpha.32 调用公开 Session hook 时遗漏 selector 参数的
67
67
 
68
68
  当前会话使用 `github-copilot` 或 `github-copilot-preview` 时,可选的 **Credits / 额度** 控件显示已登录账号本计费周期的已用量及服务端明确提供的剩余额度。控件通过公开 composer dock 增补,不修改原生 Context meter;切换其他 provider 后隐藏。展开可查看预算、重置时间、数据新鲜度并刷新。旧 Client 缺少公开插槽时只停用这一可选功能。
69
69
 
70
- 数字不是 token 费用估算:旧计费账号显示 **Premium requests / 高级请求**;企业共享池可能只有已用 credits,没有个人剩余量。缺失数据显示不可用,不伪装成零或无限。刷新失败可保留明确标注的同账号历史快照;认证失效或账号变化会清除快照。**当前会话**消耗暂时显示不可用,因为受支持的原生 adapter 没有通过公开插件契约提供完整的 credit 计量;不会用账号余额差值推算。
70
+ Alpha.35 对齐原生统计栏的次级字号、行高和 pill 间距。采用共用可换行横排布局的宿主可将 Credits 直接放在 Cache hit 后,空间不足时再换行;旧版宿主仍保留自己的布局。单个读数超过分配宽度时显示省略号,但无障碍文本、悬停提示和独立详情保留完整内容。插件不会移动原生 DOM 或替换统计组件;详见[响应式布局所有权与验收边界](./docs/copilot-usage.md#responsive-statistics-presentation-alpha35)。
71
+
72
+ 数字不是 token 费用估算:旧计费账号显示 **Premium requests / 高级请求**;企业共享池可能只有已用 credits,没有个人剩余量。缺失数据显示不可用,不伪装成零或无限。刷新失败可保留明确标注的同账号历史快照;认证失效或账号变化会清除快照。受支持的原生 adapter 没有通过公开插件契约提供完整的会话 credit 计量,因此不显示这一无法提供数据的区域,也不会用账号余额差值推算。重置时间只在供应方明确提供有效且晚于快照观察时间的下次重置日期时显示;缺失、无效、零值或已过期的重置元数据直接省略,不因此丢弃其他有效的账号用量。
71
73
 
72
74
  Host 使用现有 canonical OAuth grant 有界读取 GitHub 内部额度端点,不增加登录流程、凭据存储、模型传输、设置写入或模型切换。内部接口可能变化或拒绝访问;自定义企业端点不会被猜测。公开企业/组织报表也不被当作个人实时余额接口。详见[数据语义、生命周期与证据边界](./docs/copilot-usage.md)。合成测试不代表真实账号接口可用、账单实时或当前 Desktop 已生效。
73
75
 
@@ -86,7 +88,7 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
86
88
  获准且网络可用时,可通过受支持的 CLI 命令安装:
87
89
 
88
90
  ```sh
89
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.34/dsh-github-copilot-0.4.0-alpha.34.tgz
91
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.35/dsh-github-copilot-0.4.0-alpha.35.tgz
90
92
  ```
91
93
 
92
94
  若 registry 被公司封禁或不可用,不要更换网络绕行。Desktop 管理的 profile 可以改用[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance):使用来源获准、校验通过的本地 Release 和已有依赖缓存(`--offline --ignore-scripts`)。预检、备份和授权要求仍然适用。
@@ -151,7 +153,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
151
153
  5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
152
154
  6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
153
155
 
154
- 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。在获准且可用的 registry 网络环境中,优先使用原生 Desktop 包管理器;确认 npm 发布后,它接受 `dsh-github-copilot@0.4.0-alpha.34`,不是 URL 或本地文件。Desktop 管理的 profile 也允许经明确授权的[受控离线 CLI 维护](./docs/npm-distribution.md#controlled-offline-cli-maintenance):使用已验证的本地 Release 和 `--offline --ignore-scripts`,执行必需的组合预检、私密元数据备份、单写入者控制及安装后差异核验。缓存不足或出现权限拒绝时停止,不绕过公司 registry 封禁,不关闭 TLS 校验;重启仍需单独授权。离线安装成功不表示 npm 联网或发布问题已修好。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
156
+ 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。在获准且可用的 registry 网络环境中,优先使用原生 Desktop 包管理器;确认 npm 发布后,它接受 `dsh-github-copilot@0.4.0-alpha.35`,不是 URL 或本地文件。Desktop 管理的 profile 也允许经明确授权的[受控离线 CLI 维护](./docs/npm-distribution.md#controlled-offline-cli-maintenance):使用已验证的本地 Release 和 `--offline --ignore-scripts`,执行必需的组合预检、私密元数据备份、单写入者控制及安装后差异核验。缓存不足或出现权限拒绝时停止,不绕过公司 registry 封禁,不关闭 TLS 校验;重启仍需单独授权。离线安装成功不表示 npm 联网或发布问题已修好。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
155
157
 
156
158
  不需要运行 `copilot2api`,不需要外部 gateway、placeholder API key、原始 GitHub token 或单独安装 `dsh-web-search-provider`。
157
159
 
@@ -170,7 +172,7 @@ DSH Core 继续负责模型选择、sandbox、工具、附件与其它 provider
170
172
 
171
173
  ## 已退役的规划/执行专用体验
172
174
 
173
- `0.4.0-alpha.34` candidate 移除 **模型分工(Model roles)**、旧版 **Copilot · Model roles** 设置入口、规划/执行模型选择器和新建专用会话按钮(#158)。今后使用普通 Session 与 Core 自己的模型选择/subagent;插件不新增替代角色页面,也不自动映射模型。
175
+ 自 `0.4.0-alpha.34` 起,**模型分工(Model roles)**、旧版 **Copilot · Model roles** 设置入口、规划/执行模型选择器和新建专用会话按钮已退役(#158)。今后使用普通 Session 与 Core 自己的模型选择/subagent;插件不新增替代角色页面,也不自动映射模型。
174
176
 
175
177
  父模型 → subagent 模型规则及其原生设置 UI 属于另一个仍待交付的 [Core PR #95](https://github.com/cloga/deepseek-harness/pull/95)。移除本插件 UI 不代表旧版或当前安装的 Core 已具有规则功能,也不依赖该 PR 先发布。
176
178
 
@@ -421,8 +423,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
421
423
  `package.json` 声明公开 npm 分发。Release tag 必须严格等于 `v${package.json.version}`。预发布使用 `alpha`、`beta` 或 `rc` 及对应 npm dist-tag,只有稳定版使用 `latest`。Release workflow 执行 frozen install 和完整门禁,只打包一次(重试恢复原始归档),验证 `SHA256SUMS`,发布不可变 GitHub Release,再通过 OIDC 将同一份字节发布到 npm。任一渠道失败都表示交付未完成。首次建包须由获准环境中的维护者完成;staging 要求包已存在,不能代替首次建包。不会批量补发历史版本。
422
424
 
423
425
  ```sh
424
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.34/dsh-github-copilot-0.4.0-alpha.34.tgz
425
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.34/SHA256SUMS
426
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.35/dsh-github-copilot-0.4.0-alpha.35.tgz
427
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.35/SHA256SUMS
426
428
  sha256sum --check SHA256SUMS
427
429
  ```
428
430
 
@@ -430,7 +432,7 @@ PowerShell 可以对已下载的同一组文件执行:
430
432
 
431
433
  ```powershell
432
434
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
433
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.34.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
435
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.35.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
434
436
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
435
437
  ```
436
438
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.34"
11
+ "version": "0.4.0-alpha.35"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -233,6 +233,10 @@
233
233
  ],
234
234
  "tests": [
235
235
  {"file": "tests/copilot-usage-normalize.spec.ts", "name": "never invents precise amounts from a rounded percentage"},
236
+ {"file": "tests/copilot-usage-normalize.spec.ts", "name": "falls back from an absent snapshot reset and invalid UTC metadata to a valid account date"},
237
+ {"file": "tests/copilot-usage-normalize.spec.ts", "name": "does not let invalid optional account metadata suppress a valid snapshot reset"},
238
+ {"file": "tests/copilot-usage-card.spec.ts", "name": "uses native secondary type tokens and a bounded single-line trigger"},
239
+ {"file": "tests/copilot-usage-card.spec.ts", "name": "shows supplied account amounts without an unsupported Session credits section"},
236
240
  {"file": "tests/copilot-usage-ui.spec.ts", "name": "uses real Cordis Remote tracing and reversible public SlotRegistry registration"},
237
241
  {"file": "tests/copilot-usage-ui.spec.ts", "name": "renders the usage trigger through a required Session selector for %s"},
238
242
  {"file": "tests/fixtures/copilot-usage-selector-core.fixture.ts", "name": "renders and reacts to the owning Session on %s"},
@@ -6,7 +6,7 @@ The optional composer control separates three quantities:
6
6
  | --- | --- | --- |
7
7
  | Context occupancy | Current native request/context window | Remains owned by DSH's native meter. |
8
8
  | Account usage and remaining allocation | GitHub account billing cycle, across Copilot applications | Display only validated provider quota data; identify stale snapshots explicitly. |
9
- | Session credits | Complete provider-reported usage attributable to this DSH Session | Unavailable in this version. Do not infer it from tokens, cost estimates or account balance changes. |
9
+ | Session credits | Complete provider-reported usage attributable to this DSH Session | Not displayed because the supported adapter does not supply it. Do not infer it from tokens, cost estimates or account balance changes. |
10
10
 
11
11
  ## Presentation
12
12
 
@@ -38,7 +38,7 @@ Verified reference sources:
38
38
  - [GitHub's public organization/enterprise usage reporting API](https://docs.github.com/en/rest/copilot/copilot-usage-metrics) and [report fields](https://docs.github.com/en/copilot/reference/copilot-usage-metrics/copilot-usage-metrics). Daily administrator reports are not a live personal balance API.
39
39
  - [GitHub's explanation of used credits with no individual budget](https://github.blog/changelog/2026-07-20-copilot-users-can-now-see-ai-credits-used-per-billing-cycle/).
40
40
 
41
- The internal client observes per-turn `copilot_usage.total_nano_aiu`, but existence in another client's wire response is not evidence that the supported DSH/pi adapter exposes complete session accounting to plugins. On the exact alpha.2 source, [`mapUsage`](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/llm/llm-pi-ai/src/stream.ts) maps only token counts and cache counts into the public [`StreamChunk` usage contract](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/llm/llm/src/types.ts). Opaque replay state is not an accounting escape hatch. Until an unchanged public seam provides attributable, deduplicated receipts for ordinary calls, retries and background activity, **This session** remains unavailable.
41
+ The internal client observes per-turn `copilot_usage.total_nano_aiu`, but existence in another client's wire response is not evidence that the supported DSH/pi adapter exposes complete session accounting to plugins. On the exact alpha.2 source, [`mapUsage`](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/llm/llm-pi-ai/src/stream.ts) maps only token counts and cache counts into the public [`StreamChunk` usage contract](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/llm/llm/src/types.ts). Opaque replay state is not an accounting escape hatch. Until an unchanged public seam provides attributable, deduplicated receipts for ordinary calls, retries and background activity, per-session credit values are not displayed.
42
42
 
43
43
  Synthetic tests cover parsing, lifecycle, failure states, strict transport and UI. They do not establish production quota permissions, billing latency, live OAuth/model transport, installed Desktop bytes or loaded plugin state. No real account calls are made merely to generate test evidence.
44
44
 
@@ -50,6 +50,16 @@ The correction consumes the existing `useSession(selector)` contract and selects
50
50
 
51
51
  Validation must include positive rendering with actual selector-hook behavior for both canonical and managed Copilot routes, reactive provider/Session changes and disposal. A null/hidden signed-out surface alone is insufficient. Synthetic quota results prove rendering and lifecycle only, not live account permissions or balances. Current-runtime activation must be checked separately after an explicitly authorized upgrade; reloading alpha.32 does not fix its source call.
52
52
 
53
+ ## Responsive statistics presentation (alpha.35)
54
+
55
+ The unavailable Session credits section is omitted rather than permanently displaying a placeholder. Reset metadata is optional and independent from validated quota amounts: missing, malformed, zero or elapsed values are ignored. Select a supplier-reported next reset later than the snapshot observation, preferring the snapshot timestamp before valid UTC account, account or limited-user dates; never invent the next billing date. Invalid optional date metadata does not discard otherwise valid account amounts. The Client also hides reset rows without a known observation time or a later reset.
56
+
57
+ The compact control uses the native secondary font-size and line-height tokens, tertiary text color and pill padding. It stays one line within its allocated width, with ellipsis and a full-label tooltip if a single reading is wider than the available space. The complete reading remains its accessible button text; exact supplied amounts and account-wide scope remain available in the independent details dialog. Loading and unavailable text use the same bounds without extra quota requests.
58
+
59
+ The host owns placement of the existing public dock entries. On a shared-row host, the usage entry follows the native statistics group and can appear immediately after Cache hit; on an older stacked host, it retains that host's placement. The plugin neither relocates native DOM nor overrides native statistics styles, and it does not require a modified Core to activate. A separately authorized Desktop Client layout task owns wrapping and actual assembled native-statistics geometry checks.
60
+
61
+ Official `0.1.6-alpha.2` already provides the shared dock row in [`InputBar.module.css`](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css) and an intrinsic native statistics group in [`StatsPills.module.css`](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/client/ui-chat/src/client/chat/StatsPills.module.css). Reuse that official presentation primitive rather than inventing another statistics Slot or copying its token calculations. Wide/narrow layout and popup acceptance must use actual native components alongside the released Client; standalone plugin tests or a synthetic sibling label are not proof of native Cache hit alignment.
62
+
53
63
  ## Official-first retirement
54
64
 
55
65
  Retain this bounded companion feature only while native DSH lacks equivalent public account-usage presentation for the required scope. Migrate to native functionality once equivalent data semantics, account invalidation, session attribution, accessible presentation and supported-version acceptance are verified. Do not require a Core patch or add a parallel model transport to complete this integration.
package/lib/client.js CHANGED
@@ -6397,8 +6397,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6397
6397
  individual: "Cycle budget",
6398
6398
  pooled: "Shared budget · no personal balance available",
6399
6399
  budgetUnknown: "Budget unavailable",
6400
- session: "This session",
6401
- sessionExplanation: "The native adapter does not expose per-session billing usage. Token counts are not billing amounts.",
6402
6400
  close: "Close usage details",
6403
6401
  refresh: "Refresh",
6404
6402
  refreshing: "Refreshing…",
@@ -6430,8 +6428,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6430
6428
  individual: "周期额度",
6431
6429
  pooled: "共享额度 · 无个人余额信息",
6432
6430
  budgetUnknown: "额度上限暂不可用",
6433
- session: "本会话",
6434
- sessionExplanation: "原生适配器未提供单个会话的计费用量。Token 数量不等于计费额度。",
6435
6431
  close: "关闭用量详情",
6436
6432
  refresh: "刷新",
6437
6433
  refreshing: "正在刷新…",
@@ -6622,15 +6618,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6622
6618
  notation: "compact",
6623
6619
  maximumFractionDigits: 2
6624
6620
  }).format(value);
6625
- const reading = [
6621
+ const triggerText = `${[
6626
6622
  unit,
6627
6623
  ...view?.state === "stale" ? [t.stale] : [],
6628
6624
  used === void 0 ? void 0 : `${compact(used)} ${t.used}`,
6629
6625
  remaining === void 0 ? void 0 : `${compact(remaining)} ${t.left}`
6630
- ].filter(Boolean).join(" · ");
6631
- const noAmount = used === void 0 && remaining === void 0;
6626
+ ].filter(Boolean).join(" · ")}${used === void 0 && remaining === void 0 ? ` · ${busy ? t.loading : t.unavailable}` : ""}`;
6632
6627
  const observed = available ? dateLabel(view.observedAt, language) : void 0;
6633
- const reset = available ? dateLabel(view.resetAt, language) : void 0;
6628
+ const reset = available && view.resetAt !== void 0 && view.observedAt !== void 0 && view.resetAt > view.observedAt ? dateLabel(view.resetAt, language) : void 0;
6634
6629
  return (0, react.createElement)("span", { style: {
6635
6630
  display: "inline-flex",
6636
6631
  minWidth: 0,
@@ -6640,6 +6635,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6640
6635
  ref: trigger,
6641
6636
  type: "button",
6642
6637
  "data-copilot-usage-trigger": "",
6638
+ title: triggerText,
6643
6639
  "aria-haspopup": "dialog",
6644
6640
  "aria-expanded": open,
6645
6641
  "aria-controls": open ? id : void 0,
@@ -6650,17 +6646,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6650
6646
  ...button,
6651
6647
  border: "none",
6652
6648
  background: "transparent",
6653
- borderRadius: 16,
6654
- padding: "3px 5px",
6655
- fontSize: 11,
6649
+ borderRadius: 24,
6650
+ padding: "1px 8px",
6651
+ fontSize: "var(--dsh-content-font-size-secondary, 13px)",
6656
6652
  minWidth: 0,
6657
- lineHeight: 1.5,
6653
+ maxWidth: "100%",
6654
+ lineHeight: "calc(20px + var(--dsh-content-font-delta-secondary, 0px))",
6658
6655
  textAlign: "center",
6659
- overflowWrap: "anywhere",
6660
- color: secondary,
6656
+ whiteSpace: "nowrap",
6657
+ overflow: "hidden",
6658
+ textOverflow: "ellipsis",
6659
+ color: "var(--dsw-alias-label-tertiary, GrayText)",
6661
6660
  fontVariantNumeric: "tabular-nums"
6662
6661
  }
6663
- }, `${reading}${noAmount ? ` · ${busy ? t.loading : t.unavailable}` : ""}`), open ? (0, react.createElement)("div", {
6662
+ }, triggerText), open ? (0, react.createElement)("div", {
6664
6663
  id,
6665
6664
  ref: panel,
6666
6665
  role: "dialog",
@@ -6739,10 +6738,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6739
6738
  } })), view?.state === "ready" && percent !== void 0 && percent >= 90 ? (0, react.createElement)("p", {
6740
6739
  role: "status",
6741
6740
  style: muted
6742
- }, t.low) : null, (0, react.createElement)("p", { style: muted }, available && view.budget === "pooled" ? t.pooled : limit === void 0 ? t.budgetUnknown : `${t.individual}: ${format(limit)} ${unit}`), numbers ? (0, react.createElement)("p", { style: muted }, t.rounding) : null, reset === void 0 ? null : (0, react.createElement)("p", { style: muted }, `${t.reset}: ${reset}`), (0, react.createElement)("div", { style: separator }, (0, react.createElement)("div", { style: row }, (0, react.createElement)("strong", null, t.session), (0, react.createElement)("span", null, t.unavailable)), (0, react.createElement)("p", { style: {
6743
- ...muted,
6744
- marginTop: 4
6745
- } }, t.sessionExplanation)), (0, react.createElement)("div", { style: {
6741
+ }, t.low) : null, (0, react.createElement)("p", { style: muted }, available && view.budget === "pooled" ? t.pooled : limit === void 0 ? t.budgetUnknown : `${t.individual}: ${format(limit)} ${unit}`), numbers ? (0, react.createElement)("p", { style: muted }, t.rounding) : null, reset === void 0 ? null : (0, react.createElement)("p", { style: muted }, `${t.reset}: ${reset}`), (0, react.createElement)("div", { style: {
6746
6742
  ...row,
6747
6743
  ...separator
6748
6744
  } }, (0, react.createElement)("span", { style: muted }, observed === void 0 ? null : `${t.lastUpdated}: ${observed}`), (0, react.createElement)("button", {