dsh-github-copilot 0.4.0-alpha.32 → 0.4.0-alpha.33

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0-alpha.33 (prepared)
4
+
5
+ - Fix the account-usage composer component to call the public `useSession(selector)` hook with a selector instead of assuming a no-argument snapshot API (#156).
6
+ - Preserve native Session ownership and select only the open/current/not-removed predicate; no Core patch, credential change, network-policy change or automatic restart is required.
7
+ - Add positive canonical/managed Copilot rendering and required-selector lifecycle regressions. Earlier signed-out absence tests do not establish that the eligible-session control can render.
8
+
3
9
  ## 0.4.0-alpha.32 (prepared)
4
10
 
5
11
  - Add an optional, Copilot-session-scoped composer usage control without replacing the native Context meter or changing other providers (#153).
package/README.md CHANGED
@@ -61,6 +61,8 @@ Source markers, local rc.1-backed focused tests and fifteen scoped exact-source
61
61
 
62
62
  ## Copilot usage beside the composer
63
63
 
64
+ Alpha.33 corrects alpha.32's missing selector argument to the public Session hook, which could retire the registered usage entry after a render failure. Positive eligible-Session rendering must be verified separately from installed-version receipts or signed-out absence. The fix is plugin-only; no Core patch or automatic restart is included.
65
+
64
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.
65
67
 
66
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.
@@ -69,7 +71,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
69
71
 
70
72
  ## Install and sign in
71
73
 
72
- The commands below target the package version `0.4.0-alpha.32`. 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):
74
+ The commands below target the package version `0.4.0-alpha.33`. 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):
73
75
 
74
76
  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):
75
77
 
@@ -82,7 +84,7 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
82
84
  For approved online installation, the supported CLI command is:
83
85
 
84
86
  ```sh
85
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.32/dsh-github-copilot-0.4.0-alpha.32.tgz
87
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.33/dsh-github-copilot-0.4.0-alpha.33.tgz
86
88
  ```
87
89
 
88
90
  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.
@@ -147,7 +149,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
147
149
  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.
148
150
  6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
149
151
 
150
- 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.32`, 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).
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.33`, 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).
151
153
 
152
154
  No `copilot2api` process, external gateway, placeholder API key, pasted GitHub token, or separate `dsh-web-search-provider` installation is required.
153
155
 
@@ -166,7 +168,7 @@ DSH Core continues to own model selection, sandboxing, tools, attachments, and o
166
168
 
167
169
  Under **Settings → Models → Model roles**, enable dedicated dual-model sessions, select two available account models, and save the profile-global settings. No workspace is needed to save. **Create session with this configuration** uses the application's current workspace, shown read-only; open a workspace first if none is current. There is no separate workspace dropdown and no first/recent-workspace fallback. The planner handles planning and acceptance; `copilot_execute` delegates implementation to a native continuable child with a fixed execution model. Configuration is off by default and affects only sessions created through this entry. It does not change the global default, existing sessions, credentials or the ordinary Subagent model-selection setting.
168
170
 
169
- Unavailable models are not substituted. Uncertain creation retries keep the same request identity. The feature requires public role/session/subagent capabilities and is visibly unavailable when they are absent; historical package compatibility is not blanket certification of this optional flow. See [setup, lifecycle, limitations and evidence](./docs/dual-model.md). The feature is included in the `0.4.0-alpha.32` candidate; source and fixture tests are not proof of publication or Desktop activation.
171
+ Unavailable models are not substituted. Uncertain creation retries keep the same request identity. The feature requires public role/session/subagent capabilities and is visibly unavailable when they are absent; historical package compatibility is not blanket certification of this optional flow. See [setup, lifecycle, limitations and evidence](./docs/dual-model.md). The feature is included in the `0.4.0-alpha.33` candidate; source and fixture tests are not proof of publication or Desktop activation.
170
172
 
171
173
  If the card says **Could not load model roles**, do not change model defaults to work around it: this is a failed settings load, distinct from unsupported capabilities or unavailable models. In particular, a `githubCopilotDualModel/view` HTTP 404 indicates missing Host Remote exposure, not that the feature is off. See [troubleshooting and verification](./docs/dual-model.md#loading-and-remote-troubleshooting).
172
174
 
@@ -408,8 +410,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
408
410
  `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.
409
411
 
410
412
  ```sh
411
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.32/dsh-github-copilot-0.4.0-alpha.32.tgz
412
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.32/SHA256SUMS
413
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.33/dsh-github-copilot-0.4.0-alpha.33.tgz
414
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.33/SHA256SUMS
413
415
  sha256sum --check SHA256SUMS
414
416
  ```
415
417
 
@@ -417,7 +419,7 @@ PowerShell can verify the same two downloaded files with:
417
419
 
418
420
  ```powershell
419
421
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
420
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.32.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
422
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.33.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
421
423
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
422
424
  ```
423
425
 
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.32`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
12
+ > 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.33`;这不代表已有的两条真实路由被合并或移除。版本化 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
 
@@ -63,6 +63,8 @@ Candidate 追加第九个精确目标:`dsh-v0.1.6-alpha.2`,commit `ddefc45fb
63
63
 
64
64
  ## 输入框附近的 Copilot 用量
65
65
 
66
+ Alpha.33 修正 alpha.32 调用公开 Session hook 时遗漏 selector 参数的问题;该错误可能导致已注册的用量入口在渲染失败后被撤下。必须单独验证符合条件会话中的正向显示,不能用已安装版本收据或登出时不显示代替。本修复只修改插件,不包含 Core 补丁或自动重启。
67
+
66
68
  当前会话使用 `github-copilot` 或 `github-copilot-preview` 时,可选的 **Credits / 额度** 控件显示已登录账号本计费周期的已用量及服务端明确提供的剩余额度。控件通过公开 composer dock 增补,不修改原生 Context meter;切换其他 provider 后隐藏。展开可查看预算、重置时间、数据新鲜度并刷新。旧 Client 缺少公开插槽时只停用这一可选功能。
67
69
 
68
70
  数字不是 token 费用估算:旧计费账号显示 **Premium requests / 高级请求**;企业共享池可能只有已用 credits,没有个人剩余量。缺失数据显示不可用,不伪装成零或无限。刷新失败可保留明确标注的同账号历史快照;认证失效或账号变化会清除快照。**当前会话**消耗暂时显示不可用,因为受支持的原生 adapter 没有通过公开插件契约提供完整的 credit 计量;不会用账号余额差值推算。
@@ -84,7 +86,7 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
84
86
  获准且网络可用时,可通过受支持的 CLI 命令安装:
85
87
 
86
88
  ```sh
87
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.32/dsh-github-copilot-0.4.0-alpha.32.tgz
89
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.33/dsh-github-copilot-0.4.0-alpha.33.tgz
88
90
  ```
89
91
 
90
92
  若 registry 被公司封禁或不可用,不要更换网络绕行。Desktop 管理的 profile 可以改用[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance):使用来源获准、校验通过的本地 Release 和已有依赖缓存(`--offline --ignore-scripts`)。预检、备份和授权要求仍然适用。
@@ -149,7 +151,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
149
151
  5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
150
152
  6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
151
153
 
152
- 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。在获准且可用的 registry 网络环境中,优先使用原生 Desktop 包管理器;确认 npm 发布后,它接受 `dsh-github-copilot@0.4.0-alpha.32`,不是 URL 或本地文件。Desktop 管理的 profile 也允许经明确授权的[受控离线 CLI 维护](./docs/npm-distribution.md#controlled-offline-cli-maintenance):使用已验证的本地 Release 和 `--offline --ignore-scripts`,执行必需的组合预检、私密元数据备份、单写入者控制及安装后差异核验。缓存不足或出现权限拒绝时停止,不绕过公司 registry 封禁,不关闭 TLS 校验;重启仍需单独授权。离线安装成功不表示 npm 联网或发布问题已修好。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
154
+ 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。在获准且可用的 registry 网络环境中,优先使用原生 Desktop 包管理器;确认 npm 发布后,它接受 `dsh-github-copilot@0.4.0-alpha.33`,不是 URL 或本地文件。Desktop 管理的 profile 也允许经明确授权的[受控离线 CLI 维护](./docs/npm-distribution.md#controlled-offline-cli-maintenance):使用已验证的本地 Release 和 `--offline --ignore-scripts`,执行必需的组合预检、私密元数据备份、单写入者控制及安装后差异核验。缓存不足或出现权限拒绝时停止,不绕过公司 registry 封禁,不关闭 TLS 校验;重启仍需单独授权。离线安装成功不表示 npm 联网或发布问题已修好。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
153
155
 
154
156
  不需要运行 `copilot2api`,不需要外部 gateway、placeholder API key、原始 GitHub token 或单独安装 `dsh-web-search-provider`。
155
157
 
@@ -170,7 +172,7 @@ DSH Core 继续负责模型选择、sandbox、工具、附件与其它 provider
170
172
 
171
173
  在 **设置 → 模型 → 模型分工** 中启用双模型会话,选择账号下可用的主模型和执行模型,保存全局设置(同一配置档案内通用,不按工作区保存)。保存不需要工作区;**用此配置新建会话** 使用应用当前工作区,并只读显示目标。没有当前工作区时须先打开工作区,不再提供独立下拉框,也不会默认选择第一个或最近的工作区。主模型负责规划与验收;`copilot_execute` 创建原生可继续执行的子代理,并固定其执行模型。默认关闭,仅专用入口创建的新会话采用此策略;不修改全局默认、已有会话、登录凭据或原生 Subagent 授权开关。
172
174
 
173
- 模型不可用时明确报错,不自动替换。创建结果不明时重试同一个请求,不为绕过未知结果另建会话。功能依赖公开的会话、策略和子代理能力;缺少接口时显示不可用,不把历史版本的包兼容范围当成此功能的全面验收。详见[配置、生命周期、限制与验证范围](./docs/dual-model.md)。本功能包含在 `0.4.0-alpha.32` candidate 中,源码和合成测试不代表已发布或当前 Desktop 已生效。
175
+ 模型不可用时明确报错,不自动替换。创建结果不明时重试同一个请求,不为绕过未知结果另建会话。功能依赖公开的会话、策略和子代理能力;缺少接口时显示不可用,不把历史版本的包兼容范围当成此功能的全面验收。详见[配置、生命周期、限制与验证范围](./docs/dual-model.md)。本功能包含在 `0.4.0-alpha.33` candidate 中,源码和合成测试不代表已发布或当前 Desktop 已生效。
174
176
 
175
177
  若卡片显示 **Could not load model roles(无法加载模型分工)**,不要通过修改默认模型绕过:这是设置加载失败,与能力不支持或模型不可用不同。尤其 `githubCopilotDualModel/view` 返回 HTTP 404,表示 Host Remote 未暴露,并非功能开关处于关闭状态。详见[加载故障排查与验证](./docs/dual-model.md#loading-and-remote-troubleshooting)。
176
178
 
@@ -419,8 +421,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
419
421
  `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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
420
422
 
421
423
  ```sh
422
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.32/dsh-github-copilot-0.4.0-alpha.32.tgz
423
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.32/SHA256SUMS
424
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.33/dsh-github-copilot-0.4.0-alpha.33.tgz
425
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.33/SHA256SUMS
424
426
  sha256sum --check SHA256SUMS
425
427
  ```
426
428
 
@@ -428,7 +430,7 @@ PowerShell 可以对已下载的同一组文件执行:
428
430
 
429
431
  ```powershell
430
432
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
431
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.32.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
433
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.33.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
432
434
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
433
435
  ```
434
436
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.32"
11
+ "version": "0.4.0-alpha.33"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -227,12 +227,15 @@
227
227
  "sourceMarkers": [
228
228
  {"file": "src/index.ts", "marker": "ctx.plugin(GitHubCopilotUsageController)"},
229
229
  {"file": "src/client.ts", "marker": "registerCopilotUsageUi"},
230
+ {"file": "src/copilot-usage-ui.ts", "marker": "runtime.useSession(session =>"},
230
231
  {"file": "src/remote.ts", "marker": "...copilotUsageRemote.descriptors"},
231
232
  {"file": "docs/copilot-usage.md", "marker": "Percentage-only data must not create falsely precise absolute amounts"}
232
233
  ],
233
234
  "tests": [
234
235
  {"file": "tests/copilot-usage-normalize.spec.ts", "name": "never invents precise amounts from a rounded percentage"},
235
236
  {"file": "tests/copilot-usage-ui.spec.ts", "name": "uses real Cordis Remote tracing and reversible public SlotRegistry registration"},
237
+ {"file": "tests/copilot-usage-ui.spec.ts", "name": "renders the usage trigger through a required Session selector for %s"},
238
+ {"file": "tests/fixtures/copilot-usage-selector-core.fixture.ts", "name": "renders and reacts to the owning Session on %s"},
236
239
  {"file": "tests/scripts/copilot-usage-gateway.test.mjs", "name": "quota Remote reaches the actual Host gateway without startup or signed-out network requests"},
237
240
  {"file": "tests/client-bundle.spec.ts", "name": "mounts strict Host result codecs through the published rc.1 client carrier"},
238
241
  {"file": "tests/fixtures/remote-core.fixture.ts", "name": "mounts authorization, role and search-catalog Remotes on the exact target Client gateway"}
@@ -42,6 +42,14 @@ The internal client observes per-turn `copilot_usage.total_nano_aiu`, but existe
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
 
45
+ ## Session selector correction (alpha.33)
46
+
47
+ Alpha.32 called `useSession()` without the selector required by the public Core hook. A registration can therefore exist while the Slot renderer has retired its crashed entry; installed-version receipts and signed-out absence tests are not proof that the control renders in an eligible Session.
48
+
49
+ The correction consumes the existing `useSession(selector)` contract and selects only a boolean for the current, open, non-removed Session. It does not introduce a compatibility shim, copy Session data, patch Core, substitute model selection, or alter quota requests. The exact official alpha.1/alpha.2 contract is `SnapshotSelectorHook<T>` in `packages/client/store/src/contract.ts`, with the `bindSnapshotSelector` implementation in `packages/client/ui-renderer/src/client/bind.ts`. Model projection remains the public `useProjection('modelSelection')` reader, whose key-only overload is supported.
50
+
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
+
45
53
  ## Official-first retirement
46
54
 
47
55
  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
@@ -7481,11 +7481,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7481
7481
  return next.provider === "github-copilot" || next.provider === "github-copilot-preview" ? next : void 0;
7482
7482
  }
7483
7483
  function Surface({ runtime, remote, locale, diagnostic }) {
7484
- const session = runtime.useSession();
7484
+ const valid = runtime.useSession((session) => record(session) && session.sessionId === runtime.sessionId && session.removed === false && session.openState === "open");
7485
7485
  const projection = runtime.useProjection("modelSelection");
7486
7486
  const language = (0, react.useSyncExternalStore)(locale === void 0 ? emptySubscribe : (listener) => locale.subscribe(listener), () => locale?.getLocale().active ?? "en", () => "en");
7487
7487
  const current = effectiveCopilot(projection);
7488
- const valid = record(session) && session.sessionId === runtime.sessionId && session.removed === false && session.openState === "open";
7489
7488
  (0, react.useEffect)(() => {
7490
7489
  if (projection === void 0) diagnostic("COPILOT_USAGE_MODEL_PROJECTION_UNAVAILABLE");
7491
7490
  }, [projection, diagnostic]);