dsh-github-copilot 0.4.0-alpha.119 → 0.4.0-alpha.120

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.120 (prepared)
4
+
5
+ - Let explicitly account-bound model preparation, native dispatch and subsequent turn steps continue during global selector switching, fixing `COPILOT_ACCOUNTS_BUSY` from the overly broad acquisition fence (#344).
6
+ - Keep unbound/global request fences, credential authorization/removal/sign-out protection, pinned-record leases, cancellation, route checks and original turn accounts. No automatic retry, message replay, fallback account, history rewrite, Core change, installation or restart.
7
+ - Exercise native Responses, Chat Completions and Anthropic dispatch while switch preflight is pending, then verify that the next turn adopts the confirmed new default.
8
+
3
9
  ## 0.4.0-alpha.119 (prepared)
4
10
 
5
11
  - Show Models global account metadata before background identity-name hydration, keeping Switch available when metadata and route/activity evidence allow it (#342). Hydration never authorizes a switch and late results cannot undo a confirmed change.
package/README.md CHANGED
@@ -13,6 +13,8 @@ independent official authorizations in the existing credentials service.
13
13
  **Models → Manage → GitHub accounts** manages authorizations and the global default.
14
14
  Inside **Credits**, choose a saved account for this Session's subsequent turns or
15
15
  restore **Follow global default**. Running turns retain their original account.
16
+ Selector-only switching permits their account-bound model preparation and
17
+ dispatch to continue; unbound requests and credential mutations remain fenced.
16
18
  Identity display accepts GitHub Enterprise Managed User names, including their underscore-separated enterprise suffixes.
17
19
 
18
20
  Models and Chat share an opaque, theme-aware account dropdown; translucent native menu tokens cannot reveal underlying controls or quota text. Both use restrained dark elevation in light and dark mode.
@@ -23,7 +25,7 @@ Visible Models and Credits resolve missing names for saved accounts without acti
23
25
 
24
26
  Adding an account now keeps the device-authorization link, selectable URL, one-time code, Copy code action and Cancel together while authorization is pending. After GitHub authorizes, identity and model verification are shown as a separate phase. Adding never changes the global default; use the existing explicit **Switch** action when ready. Technical diagnostics are secondary, and account/turn identity fallbacks never expose opaque account IDs or infer historical identity from today's settings.
25
27
 
26
- **Source candidate: `0.4.0-alpha.119` (unreleased). Supported host: official DSH / Windows Desktop `0.2.0-rc.2`.** Earlier DSH pins are historical evidence, not supported installation targets. Publication, profile installation and the version loaded by a running Host are separate states. The versioned commands below are for this candidate after publication, not evidence that its assets exist.
28
+ **Source candidate: `0.4.0-alpha.120` (unreleased). Supported host: official DSH / Windows Desktop `0.2.0-rc.2`.** Earlier DSH pins are historical evidence, not supported installation targets. Publication, profile installation and the version loaded by a running Host are separate states. The versioned commands below are for this candidate after publication, not evidence that its assets exist.
27
29
 
28
30
  ## What you can do
29
31
 
@@ -80,10 +82,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
80
82
  For a **standalone named profile**:
81
83
 
82
84
  ```sh
83
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.119/dsh-github-copilot-0.4.0-alpha.119.tgz
85
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.120/dsh-github-copilot-0.4.0-alpha.120.tgz
84
86
  ```
85
87
 
86
- For **Desktop**, its native package manager accepts `dsh-github-copilot@0.4.0-alpha.119` after publication. Official rc.2's **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
88
+ For **Desktop**, its native package manager accepts `dsh-github-copilot@0.4.0-alpha.120` after publication. Official rc.2's **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
87
89
 
88
90
  After an approved reload/restart:
89
91
 
@@ -245,14 +247,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
245
247
  GitHub Releases and npm distribute the same original verified tarball. Pin a version; verify Release SHA-256 or npm `dist.integrity`. Never repack an immutable release or move/reuse its tag.
246
248
 
247
249
  ```sh
248
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.119/dsh-github-copilot-0.4.0-alpha.119.tgz
249
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.119/SHA256SUMS
250
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.120/dsh-github-copilot-0.4.0-alpha.120.tgz
251
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.120/SHA256SUMS
250
252
  sha256sum --check SHA256SUMS
251
253
  ```
252
254
 
253
255
  ```powershell
254
256
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
255
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.119.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
257
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.120.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
256
258
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
257
259
  ```
258
260
 
package/README.zh.md CHANGED
@@ -11,6 +11,7 @@
11
11
  [账号需求与技术方案](./docs/copilot-accounts.md)说明如何在现有凭据服务中
12
12
  分别保存独立官方授权。**模型 → Manage → GitHub accounts**管理授权和全局默认;
13
13
  在 Credits 内选择本 Session 后续 turn 的账号,或恢复跟随全局默认;正在运行的 turn 保持原账号。
14
+ 仅切换全局选择期间,已绑定账号的模型准备和发送可以继续;未绑定请求及授权记录变更仍受锁保护。
14
15
  身份展示支持 GitHub 企业托管账号,包括带下划线企业后缀的用户名。
15
16
 
16
17
  Models 和 Chat 共用不透明、随主题适配的账号下拉层;原生菜单 token 即使半透明,也不会透出底下的按钮或额度文字。明暗主题均使用克制的深色投影,不产生白色光晕。
@@ -21,7 +22,7 @@ Models 和 Chat 共用不透明、随主题适配的账号下拉层;原生菜
21
22
 
22
23
  添加账号时,设备授权链接、可选择的网址、一次性授权码、复制授权码和取消操作会同时显示。GitHub 授权完成后,会单独显示身份与可用模型验证阶段。添加账号不会更改全局默认;准备好后仍需显式执行现有的**切换**操作。技术诊断收在次级折叠区;账号/历史 turn 缺少身份时不会暴露不透明账号 ID,也不会根据当前设置推断历史身份。
23
24
 
24
- **源码候选版本:`0.4.0-alpha.119`(尚未发布)。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。** 较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。下方带版本的命令适用于候选版本发布后,不代表对应资产已经存在。
25
+ **源码候选版本:`0.4.0-alpha.120`(尚未发布)。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。** 较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。下方带版本的命令适用于候选版本发布后,不代表对应资产已经存在。
25
26
 
26
27
  ## 你可以做什么
27
28
 
@@ -73,10 +74,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
73
74
  **独立具名 profile**:
74
75
 
75
76
  ```sh
76
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.119/dsh-github-copilot-0.4.0-alpha.119.tgz
77
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.120/dsh-github-copilot-0.4.0-alpha.120.tgz
77
78
  ```
78
79
 
79
- **Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.119`。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
80
+ **Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.120`。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
80
81
 
81
82
  经批准 reload/restart 后:
82
83
 
@@ -238,14 +239,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
238
239
  GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
239
240
 
240
241
  ```sh
241
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.119/dsh-github-copilot-0.4.0-alpha.119.tgz
242
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.119/SHA256SUMS
242
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.120/dsh-github-copilot-0.4.0-alpha.120.tgz
243
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.120/SHA256SUMS
243
244
  sha256sum --check SHA256SUMS
244
245
  ```
245
246
 
246
247
  ```powershell
247
248
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
248
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.119.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
249
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.120.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
249
250
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
250
251
  ```
251
252
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.119"
11
+ "version": "0.4.0-alpha.120"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -334,6 +334,7 @@
334
334
  {"file": "tests/copilot-usage-card.spec.ts", "name": "disables following when the Session selection cannot be read instead of treating it as a fixed account"},
335
335
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "never writes a captured A refresh into B after an external selection change"},
336
336
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "runs fresh switch identity and model preflight concurrently but commits only after both settle"},
337
+ {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "permits record-bound requests during selector switching without admitting global requests or credential mutations"},
337
338
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "cancels and drains sibling switch preflight before releasing its mutation fence"},
338
339
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "rejects a changed credential identity during overlapping switch checks without saving"},
339
340
  {"file": "tests/copilot-accounts-card.spec.ts", "name": "renders metadata and permits a confirmed switch while unrelated identity names remain pending"},
@@ -10,6 +10,20 @@ publication, installation and loaded runtime state are separate evidence.
10
10
 
11
11
  ## Requirements
12
12
 
13
+ ### Selector switching and account-bound turns (#344)
14
+
15
+ A global switch changes only the selector. Explicit record-bound request leases
16
+ may be acquired during its preflight and CAS so already admitted turns can
17
+ prepare and dispatch their next native step with their frozen account. A new
18
+ turn still captures its account once at admission; it does not adopt a later
19
+ selector. Unbound/global leases remain blocked during switching, and all
20
+ requests remain blocked during credential authorization/removal/sign-out.
21
+ Pinned records cannot be reauthorized or removed until their leases end.
22
+ Cancellation, route eligibility, credential validity and account-model checks
23
+ remain independent. This is not automatic retry or permission to redirect an
24
+ existing turn. Deferred native fixtures exercise all three supported protocols
25
+ while the selector operation is still pending, not just after it settles.
26
+
13
27
  ### Global switch responsiveness (#342)
14
28
 
15
29
  Models first reads metadata-only `get()` and separately hydrates display names
package/lib/index.js CHANGED
@@ -2998,7 +2998,7 @@ function createAccountProvider(descriptors, guard, baseURL) {
2998
2998
  var package_default = {
2999
2999
  name: "dsh-github-copilot",
3000
3000
  description: "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
3001
- version: "0.4.0-alpha.119",
3001
+ version: "0.4.0-alpha.120",
3002
3002
  publishConfig: {
3003
3003
  "access": "public",
3004
3004
  "registry": "https://registry.npmjs.org/",
@@ -3589,7 +3589,8 @@ var CopilotAccountsHost = class {
3589
3589
  binding.assertCurrent();
3590
3590
  }
3591
3591
  acquire(signal, requireManaged = true, accountId) {
3592
- if (this.operation !== void 0 || this.ctx.get("authorization")?.describe(recordKey("canonical"))?.inFlight === true) fail("COPILOT_ACCOUNTS_BUSY");
3592
+ const selectorOnly = this.operation === "switching" && accountId !== void 0;
3593
+ if (this.operation !== void 0 && !selectorOnly || this.ctx.get("authorization")?.describe(recordKey("canonical"))?.inFlight === true) fail("COPILOT_ACCOUNTS_BUSY");
3593
3594
  if (signal?.aborted) fail("COPILOT_ACCOUNTS_CHANGED");
3594
3595
  const binding = accountId === void 0 ? this.capture() : this.captureAccount(accountId);
3595
3596
  if (requireManaged && binding.accountId !== "canonical") {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-github-copilot",
3
3
  "description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
4
- "version": "0.4.0-alpha.119",
4
+ "version": "0.4.0-alpha.120",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "registry": "https://registry.npmjs.org/",