dsh-github-copilot 0.4.0-alpha.102 → 0.4.0-alpha.104
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/AGENTS.md +3 -1
- package/CHANGELOG.md +12 -0
- package/README.md +23 -11
- package/README.zh.md +21 -10
- package/deployment-baseline.json +22 -1
- package/docs/copilot-accounts.md +53 -23
- package/docs/copilot-usage.md +5 -3
- package/lib/client.js +322 -30
- package/lib/client.js.map +1 -1
- package/lib/index.js +912 -224
- package/lib/remote.js +67 -10
- package/lib/routed-web.js +1 -1
- package/lib/{search-routing-CqysPLve.js → search-routing-CHyF6TbO.js} +1 -1
- package/lib/types/config.d.ts +7 -2
- package/lib/types/copilot-accounts-host.d.ts +10 -2
- package/lib/types/copilot-usage-card.d.ts +17 -0
- package/lib/types/copilot-usage-host.d.ts +3 -0
- package/lib/types/preview-route.d.ts +1 -1
- package/lib/types/replay-recovery-host.d.ts +2 -2
- package/lib/types/session-accounts-controller.d.ts +18 -0
- package/lib/types/session-accounts-host.d.ts +32 -0
- package/lib/types/session-accounts-remote.d.ts +106 -0
- package/lib/types/session-accounts.d.ts +36 -0
- package/lib/types/turn-selection-card.d.ts +5 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -49,7 +49,9 @@ This repository owns eleven narrow surfaces:
|
|
|
49
49
|
|
|
50
50
|
The user approved independently authorized account records in the existing DSH credentials service. The canonical `llm-pi-ai/github-copilot` record remains unchanged as the compatibility account. Additional plugin-owned `github-copilot/account-<opaque-id>` records must be written directly by official pi-ai OAuth through public account-bound stores; never copy/move grants, refill the canonical record, introduce a separate credential storage service, patch Core, or implement another wire/catalog. Native `Models.getAuth()` and DSH `modifyRecord()` remain the refresh and serialization owners.
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Settings store only the opaque global account selector and explicit `sessionAccounts` rows. Missing/invalid selectors or records fail explicitly, without another-account fallback. Models alone manages authorizations and the global default; Credits may select an already authorized account for this Session's subsequent turns or restore global inheritance (#305). An explicit choice equal to the default remains explicit. Freeze account ownership before Auto assessment and request admission, holding mutation fences until native `turn/end`/disposal; later Session/default changes never redirect running steps, retries or search. Account-local credentials, metadata, quota, proof cancellation and native adapter composition must remain isolated. Keep one public adapter/controller registration, with no second wire/catalog or Core changes. Reauthorization/removal of a pinned record stays blocked; global-default selection may continue independently.
|
|
53
|
+
|
|
54
|
+
Use hidden volatile `sessionAccounts` with path-level SettingsForms CAS, readback and restart evidence. Session account Remotes use explicit viewed IDs, native Agent lookup and strict codecs, never automatic Client scope. Credits uses that Session's account for identity/quota, rejecting mismatched or late results. Historical Account is an additive assistant-actions disclosure beside native Usage, captured only after a real ordinary native chunk; bounded Host-lifetime evidence becomes unknown after restart/eviction and is never reconstructed from today's settings. No new durable events, history/default/model/Usage writes, automatic account fallback, replay deletion or message retry. See [the requirements and acceptance gates](./docs/copilot-accounts.md).
|
|
53
55
|
|
|
54
56
|
## Retired model-role compatibility boundary (#158)
|
|
55
57
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.104 (prepared)
|
|
4
|
+
|
|
5
|
+
- Select an already authorized account inside Credits for this Session's subsequent turns, or follow the Models global default. Explicit same-as-default choices remain overrides; running turns keep their frozen account (#305).
|
|
6
|
+
- Isolate managed account metadata, OAuth resolution, Auto assessment, request recovery, quota and search proofs through the published native adapter. Default or Session preference changes do not redirect running steps, retries or search; pinned accounts remain protected from reauthorization/removal.
|
|
7
|
+
- Add Account beside native turn Usage using captured ordinary-request evidence. This bounded Host-lifetime evidence becomes unknown after restart or eviction; no durable events, history changes, inferred billing receipts or subagent totals.
|
|
8
|
+
- Persist only opaque Session preferences through native path-level SettingsForms CAS. Reuse existing Credits/turn popover styles and explicit Session lookup with separate strict Remotes; preserve native account compatibility and credential ownership.
|
|
9
|
+
|
|
10
|
+
## 0.4.0-alpha.103 (prepared)
|
|
11
|
+
|
|
12
|
+
- Reevaluate transient account BUSY failures from current leases, authorization and managed Agent activity on status reads instead of retaining a stale rejection after work ends (#303).
|
|
13
|
+
- Keep active work blocked and preserve missing evidence, native-route restrictions and uncertain-commit errors. Status recovery does not refresh credentials, authorize another account, switch models or write settings/history.
|
|
14
|
+
|
|
3
15
|
## 0.4.0-alpha.102 (prepared)
|
|
4
16
|
|
|
5
17
|
- Read official rc.2 SettingsForms values without requiring the retired `get()` method, fixing an unconditional `COPILOT_ACCOUNTS_EVIDENCE_INCOMPLETE` account-switching blocker (#301).
|
package/README.md
CHANGED
|
@@ -6,15 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
**English** | [简体中文](./README.zh.md)
|
|
8
8
|
|
|
9
|
-
GitHub Copilot account discovery, contextual Auto routing and hosted search for DSH. The plugin reuses DSH's published native adapter
|
|
9
|
+
GitHub Copilot account discovery, contextual Auto routing and hosted search for DSH. The plugin reuses DSH's published native adapter, retaining a profile-wide account default with independent Session next-turn choices; it does not patch Core or maintain a second model catalog.
|
|
10
10
|
|
|
11
11
|
The [account requirements and design](./docs/copilot-accounts.md) cover
|
|
12
12
|
independent official authorizations in the existing credentials service.
|
|
13
|
-
**Models → Manage → GitHub accounts**
|
|
14
|
-
Credits
|
|
13
|
+
**Models → Manage → GitHub accounts** manages authorizations and the global default.
|
|
14
|
+
Inside **Credits**, choose a saved account for this Session's subsequent turns or
|
|
15
|
+
restore **Follow global default**. Running turns retain their original account.
|
|
15
16
|
Identity display accepts GitHub Enterprise Managed User names, including their underscore-separated enterprise suffixes.
|
|
16
17
|
|
|
17
|
-
**Source candidate: `0.4.0-alpha.
|
|
18
|
+
**Source candidate: `0.4.0-alpha.104` (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.
|
|
18
19
|
|
|
19
20
|
## What you can do
|
|
20
21
|
|
|
@@ -22,6 +23,7 @@ Identity display accepts GitHub Enterprise Managed User names, including their u
|
|
|
22
23
|
|---|---|
|
|
23
24
|
| Sign in and manage account models | **Settings → Models → GitHub Copilot → Sign in** |
|
|
24
25
|
| Add or switch GitHub accounts | **Manage → GitHub accounts**; managed-only profiles |
|
|
26
|
+
| Select this Session's next-turn account | **Credits → Switch account**; saved authorizations only |
|
|
25
27
|
| Exclude or restore individual models | **Manage → Model preferences** |
|
|
26
28
|
| Choose models automatically | Pick **Auto · Balance**, **Auto · Efficiency** or **Auto · Intelligence** |
|
|
27
29
|
| Follow a parent model in supported subagents | **Plugins → dsh-github-copilot → Details → Follow parent model** |
|
|
@@ -30,7 +32,13 @@ Identity display accepts GitHub Enterprise Managed User names, including their u
|
|
|
30
32
|
|
|
31
33
|

|
|
32
34
|
|
|
33
|
-
Actual published Client components with synthetic models in an isolated browser.
|
|
35
|
+
Actual published Client components with synthetic models in an isolated browser. This screenshot demonstrates presentation, not live sign-in, model availability, search or loaded Desktop state.
|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
The account images show the earlier account-management components with synthetic accounts and quota in an isolated browser. The current Session switcher is inside Credits; these images show account management and identity presentation, not real authorization, supplier availability, live account data or loaded Desktop state.
|
|
34
42
|
|
|
35
43
|
## Install and sign in
|
|
36
44
|
|
|
@@ -47,10 +55,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
|
|
|
47
55
|
For a **standalone named profile**:
|
|
48
56
|
|
|
49
57
|
```sh
|
|
50
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
58
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.104/dsh-github-copilot-0.4.0-alpha.104.tgz
|
|
51
59
|
```
|
|
52
60
|
|
|
53
|
-
For **Desktop**, its native package manager accepts `dsh-github-copilot@0.4.0-alpha.
|
|
61
|
+
For **Desktop**, its native package manager accepts `dsh-github-copilot@0.4.0-alpha.104` 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.
|
|
54
62
|
|
|
55
63
|
After an approved reload/restart:
|
|
56
64
|
|
|
@@ -60,10 +68,14 @@ After an approved reload/restart:
|
|
|
60
68
|
|
|
61
69
|
Sign-out requires an explicit action and removes only the active account's authorization, not other saved grants or route settings. Upgrades preserve existing native Copilot profiles; two groups can remain until [explicit single-route migration](./docs/single-route-migration.md). Installation never migrates conversations or defaults.
|
|
62
70
|
|
|
63
|
-
In **Manage → GitHub accounts**, adding an account never replaces the
|
|
71
|
+
In **Manage → GitHub accounts**, adding an account never replaces the global default. A confirmed switch changes future inherited turns, not running turns or explicit Session overrides. **Credits → Switch account** persists a choice only for this Session's subsequent turns; **Follow global default** clears it. Explicitly choosing today's default still remains a Session override. Native-route or incomplete evidence blocks account switching. The new account may not offer your selected model, and old encrypted replay may be account-bound: no automatic model substitution or history removal occurs. **Reauthorize** renews the same saved identity; **Remove** deletes only an inactive saved authorization and cannot mutate a running turn's pinned account. Missing/revoked accounts never fall back.
|
|
72
|
+
|
|
73
|
+
Completed managed turns show **Account** beside native Usage. It records the request account, not billing or subagent totals. Evidence is bounded to the Host lifetime; restart, cold history or missing delivery displays unknown, never reconstructed from the current picker/default.
|
|
64
74
|
|
|
65
75
|
Account eligibility reads official rc.2 SettingsForms values, without requiring the retired settings `get()` API. Missing or malformed configuration remains incomplete evidence; upgrading does not bypass native-route or activity restrictions.
|
|
66
76
|
|
|
77
|
+
`COPILOT_ACCOUNTS_BUSY` is reevaluated from current activity, not retained after work ends. Use **Refresh account information** to update the open card after relevant work settles. If only the active account is listed, first **Add GitHub account**; **Switch** appears beside another saved account.
|
|
78
|
+
|
|
67
79
|
**Desktop lifecycle:** disable/remove/upgrade can require a full cold restart for Web service recomposition. If the plugin is Off and the native manager reports only `pending (waiting for service: web)`, do not repeatedly toggle or reinstall. Obtain restart approval and follow [rc.2 lifecycle guidance](./docs/web-lifecycle-rc2.md).
|
|
68
80
|
|
|
69
81
|
## Auto and model preferences
|
|
@@ -192,14 +204,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
192
204
|
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.
|
|
193
205
|
|
|
194
206
|
```sh
|
|
195
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
196
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
207
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.104/dsh-github-copilot-0.4.0-alpha.104.tgz
|
|
208
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.104/SHA256SUMS
|
|
197
209
|
sha256sum --check SHA256SUMS
|
|
198
210
|
```
|
|
199
211
|
|
|
200
212
|
```powershell
|
|
201
213
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
202
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
214
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.104.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
203
215
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
204
216
|
```
|
|
205
217
|
|
package/README.zh.md
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
[English](./README.md) | **简体中文**
|
|
8
8
|
|
|
9
|
-
为 DSH 提供 GitHub Copilot 账号模型发现、上下文 Auto 选模和 hosted search。插件复用 DSH
|
|
9
|
+
为 DSH 提供 GitHub Copilot 账号模型发现、上下文 Auto 选模和 hosted search。插件复用 DSH 公开的原生适配器,保留 profile 全局默认账号,并支持 Session 后续 turn 指定独立账号;不修改 Core,也不维护第二套模型目录。
|
|
10
10
|
|
|
11
11
|
[账号需求与技术方案](./docs/copilot-accounts.md)说明如何在现有凭据服务中
|
|
12
|
-
分别保存独立官方授权。**模型 → Manage → GitHub accounts
|
|
13
|
-
|
|
12
|
+
分别保存独立官方授权。**模型 → Manage → GitHub accounts**管理授权和全局默认;
|
|
13
|
+
在 Credits 内选择本 Session 后续 turn 的账号,或恢复跟随全局默认;正在运行的 turn 保持原账号。
|
|
14
14
|
身份展示支持 GitHub 企业托管账号,包括带下划线企业后缀的用户名。
|
|
15
15
|
|
|
16
|
-
**源码候选版本:`0.4.0-alpha.
|
|
16
|
+
**源码候选版本:`0.4.0-alpha.104`(尚未发布)。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。** 较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。下方带版本的命令适用于候选版本发布后,不代表对应资产已经存在。
|
|
17
17
|
|
|
18
18
|
## 你可以做什么
|
|
19
19
|
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
|---|---|
|
|
22
22
|
| 登录并管理账号模型 | **设置 → 模型 → GitHub Copilot → Sign in** |
|
|
23
23
|
| 添加/切换 GitHub 账号 | **Manage → GitHub accounts**;仅限托管路由 profile |
|
|
24
|
+
| 指定本 Session 后续 turn 的账号 | **Credits → Switch account**;仅选择已保存授权 |
|
|
24
25
|
| 排除/恢复单个模型 | **Manage → Model preferences** |
|
|
25
26
|
| 自动选择模型 | 选择 **Auto · Balance / Efficiency / Intelligence** |
|
|
26
27
|
| 让受支持子代理跟随父模型 | **插件 → dsh-github-copilot → 详情 → Follow parent model** |
|
|
@@ -31,6 +32,12 @@
|
|
|
31
32
|
|
|
32
33
|
图片来自实际已发布 Client 组件和隔离浏览器中的模拟模型,仅说明界面,不证明真实登录、模型可用性、搜索或 Desktop 已加载。
|
|
33
34
|
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
39
|
+
账号图片来自较早的账号管理组件和隔离浏览器中的模拟账号及额度。当前 Session 切换入口位于 Credits 内;这些图片仅说明账号管理与身份展示,不证明真实授权、供应方可用性、真实账号数据或 Desktop 已加载。
|
|
40
|
+
|
|
34
41
|
## 安装与登录
|
|
35
42
|
|
|
36
43
|
使用已校验的固定版本、指定 profile 和获准的包源。不需要 `copilot2api`、外部网关、手工粘贴 GitHub token、占位 key 或另装 `dsh-web-search-provider`。
|
|
@@ -46,10 +53,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
46
53
|
**独立具名 profile**:
|
|
47
54
|
|
|
48
55
|
```sh
|
|
49
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
56
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.104/dsh-github-copilot-0.4.0-alpha.104.tgz
|
|
50
57
|
```
|
|
51
58
|
|
|
52
|
-
**Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.
|
|
59
|
+
**Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.104`。官方 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 或删除配置。
|
|
53
60
|
|
|
54
61
|
经批准 reload/restart 后:
|
|
55
62
|
|
|
@@ -59,10 +66,14 @@ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/release
|
|
|
59
66
|
|
|
60
67
|
退出须显式操作,只删除活动账号的授权,保留其它授权与路由设置。升级保留已有原生 Copilot profile;在[显式单路由迁移](./docs/single-route-migration.md)前,仍可能存在两个分组。安装不迁移会话或默认模型。
|
|
61
68
|
|
|
62
|
-
在 **Manage → GitHub accounts
|
|
69
|
+
在 **Manage → GitHub accounts**添加账号不会替换全局默认。确认切换只影响后续跟随默认的 turn,不影响正在运行的 turn 或 Session 已指定账号。**Credits → 切换账号**只为本 Session 后续 turn 保存选择;**跟随全局默认**清除该选择。即使显式选中的账号恰好等于全局默认,也仍是 Session 覆盖。原生路由尚存或证据不完整时会阻止账号切换。新账号可能没有已选模型,旧加密 replay 也可能绑定原账号;不会自动替换模型或删除历史。**Reauthorize**仅更新同一已存身份的授权;**Remove**仅删除非全局活动授权,正在运行 turn 锁定的授权不能修改。账号缺失/失效不会自动回退到其它账号。
|
|
70
|
+
|
|
71
|
+
已完成的托管 turn 在原生 Usage 旁显示 **Account**,记录实际请求账号,不是计费归因或子 Agent 汇总。证据仅在 Host 生命周期内有界保留;重启、冷历史或没有原生流返回时显示未知,不从当前选择或全局默认反推历史。
|
|
63
72
|
|
|
64
73
|
切换资格通过官方 rc.2 SettingsForms 的配置值读取,不再依赖已退役的 Settings `get()` API。缺失或无效配置仍视为证据不完整;升级不会绕过原生路由或运行中工作的限制。
|
|
65
74
|
|
|
75
|
+
`COPILOT_ACCOUNTS_BUSY` 根据当前活动重新判断,不会在工作结束后保留旧拒绝。相关工作结束后,点击 **Refresh account information** 更新已打开的卡片。如果只列出活动账号,需先 **Add GitHub account**;另一个已保存账号旁才会出现 **Switch**。
|
|
76
|
+
|
|
66
77
|
**Desktop 生命周期:**停用、移除、升级后的 Web 服务重组可能需要完整冷重启。若插件已 Off,而原生 manager 仅提示 `pending (waiting for service: web)`,不要反复切换或重装。先取得重启许可,遵循[rc.2 生命周期说明](./docs/web-lifecycle-rc2.md)。
|
|
67
78
|
|
|
68
79
|
## Auto 与模型偏好
|
|
@@ -191,14 +202,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
191
202
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
192
203
|
|
|
193
204
|
```sh
|
|
194
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
195
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
205
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.104/dsh-github-copilot-0.4.0-alpha.104.tgz
|
|
206
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.104/SHA256SUMS
|
|
196
207
|
sha256sum --check SHA256SUMS
|
|
197
208
|
```
|
|
198
209
|
|
|
199
210
|
```powershell
|
|
200
211
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
201
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
212
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.104.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
202
213
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
203
214
|
```
|
|
204
215
|
|
package/deployment-baseline.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.4.0-alpha.
|
|
11
|
+
"version": "0.4.0-alpha.104"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -288,6 +288,27 @@
|
|
|
288
288
|
]
|
|
289
289
|
},
|
|
290
290
|
"capabilities": [
|
|
291
|
+
{
|
|
292
|
+
"id": "copilot-session-accounts",
|
|
293
|
+
"required": true,
|
|
294
|
+
"evidenceScope": "synthetic-turn-routing-native-gateways-settings-persistence-and-ui-not-live-account-access",
|
|
295
|
+
"activation": "managed-only-explicit-session-choice-or-global-default",
|
|
296
|
+
"sourceMarkers": [
|
|
297
|
+
{"file": "src/session-accounts-host.ts", "marker": "class SessionAccountsHost"},
|
|
298
|
+
{"file": "src/session-accounts-controller.ts", "marker": "extends TypertRemoteService"},
|
|
299
|
+
{"file": "src/session-accounts-remote.ts", "marker": "githubCopilotSessionAccount"},
|
|
300
|
+
{"file": "src/config.ts", "marker": "sessionAccounts:"},
|
|
301
|
+
{"file": "src/remote.ts", "marker": "...sessionAccountsRemote.descriptors"},
|
|
302
|
+
{"file": "AGENTS.md", "marker": "Historical Account is an additive assistant-actions disclosure"}
|
|
303
|
+
],
|
|
304
|
+
"tests": [
|
|
305
|
+
{"file": "tests/session-accounts.spec.ts", "name": "freezes each turn across preference changes, steps and retries"},
|
|
306
|
+
{"file": "tests/session-accounts-host.spec.ts", "name": "holds account mutation fencing through abort until the actual turn boundary"},
|
|
307
|
+
{"file": "tests/copilot-usage-card.spec.ts", "name": "switches only subsequent Session turns inside Credits and can restore inheritance"},
|
|
308
|
+
{"file": "tests/fixtures/remote-core.fixture.ts", "name": "binds Session account choices and historical reads through native Client and %s Host gateways"},
|
|
309
|
+
{"file": "tests/fixtures/copilot-accounts-persistence-core.fixture.ts", "name": "persists independent native credentials and SettingsForms CAS across profile restart without cross-account OAuth writes"}
|
|
310
|
+
]
|
|
311
|
+
},
|
|
291
312
|
{
|
|
292
313
|
"id": "independent-copilot-accounts",
|
|
293
314
|
"required": true,
|
package/docs/copilot-accounts.md
CHANGED
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
## Delivery status
|
|
4
4
|
|
|
5
5
|
This document records the approved requirements and implementation design for
|
|
6
|
-
|
|
6
|
+
issues #297 and #305. Candidate behavior is not released or installed until the
|
|
7
7
|
acceptance gates below complete. The existing single-account behavior remains
|
|
8
|
-
the compatibility baseline. The current source candidate is `0.4.0-alpha.
|
|
8
|
+
the compatibility baseline. The current source candidate is `0.4.0-alpha.104`;
|
|
9
9
|
publication, installation and loaded runtime state are separate evidence.
|
|
10
10
|
|
|
11
11
|
## Requirements
|
|
12
12
|
|
|
13
13
|
- Keep multiple independently authorized GitHub Copilot accounts in one DSH
|
|
14
|
-
profile.
|
|
15
|
-
|
|
16
|
-
- Models
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
profile. Models retains the global default. Sessions without an override
|
|
15
|
+
inherit that default at each new turn; explicit Session choices take priority.
|
|
16
|
+
- Models alone manages authorizations. A low-frequency account selector inside
|
|
17
|
+
existing Credits applies to this Session's subsequent turns. No standalone
|
|
18
|
+
composer selector, one-turn override or DSH application identity replacement.
|
|
19
19
|
- Persist OAuth grants through the existing DSH credentials service. Use
|
|
20
20
|
official pi-ai login, refresh and transport, not copied credentials, a token
|
|
21
21
|
backup/refill scheme, a separate credential store, a second wire or Core edits.
|
|
@@ -25,8 +25,10 @@ publication, installation and loaded runtime state are separate evidence.
|
|
|
25
25
|
- Changing the account must not change Session histories, selected models,
|
|
26
26
|
future global defaults, model exclusions or billing/Usage records. A selected
|
|
27
27
|
model unavailable to the new account fails explicitly, without substitution.
|
|
28
|
-
-
|
|
29
|
-
|
|
28
|
+
- Freeze an admitted turn's account before Auto assessment. Later Session/global
|
|
29
|
+
choices do not redirect its steps, native retries or hosted search. Block
|
|
30
|
+
reauthorization/removal of its pinned record until native turn end/disposal.
|
|
31
|
+
Never cancel a running answer automatically. Explain that encrypted historical replay can be
|
|
30
32
|
account-bound; do not silently remove replay or replay a message.
|
|
31
33
|
- No automatic fallback to another account on quota exhaustion, authorization
|
|
32
34
|
failure, missing records or invalid settings.
|
|
@@ -79,17 +81,20 @@ single-record policy:
|
|
|
79
81
|
|
|
80
82
|
## Account binding and persistence
|
|
81
83
|
|
|
82
|
-
Settings contain
|
|
84
|
+
Settings contain an opaque global active account identifier, written with a
|
|
83
85
|
path-level compare-and-swap in the existing `github-copilot` namespace. An
|
|
84
86
|
absent selector means the canonical compatibility account. An invalid selector
|
|
85
87
|
or missing selected record is an error, not permission to use canonical.
|
|
86
88
|
There is no persisted membership list: native `credentials.listRecords()`
|
|
87
89
|
enumerates record keys and kinds, while public identity stays in bounded
|
|
88
90
|
Host-memory cache. No usernames, grants or auxiliary account list are stored
|
|
89
|
-
in Settings.
|
|
91
|
+
in Settings. Hidden volatile `sessionAccounts` additionally persists bounded
|
|
92
|
+
`{sessionId, accountId}` overrides, changed through a separate path-level CAS.
|
|
93
|
+
Selecting the same account as the default is still an explicit override.
|
|
94
|
+
Choosing **Follow global default** removes only this Session's row.
|
|
90
95
|
|
|
91
96
|
A request captures an immutable account identifier, record key and selection
|
|
92
|
-
|
|
97
|
+
ownership. Its `CredentialStore.read/modify/delete` methods all refer to that
|
|
93
98
|
record. A mutable active-account lookup inside each store method is forbidden:
|
|
94
99
|
an A refresh must never commit into B after a switch.
|
|
95
100
|
|
|
@@ -130,11 +135,20 @@ eligibility override.
|
|
|
130
135
|
1. Capture the selector revision and verify managed-only route eligibility.
|
|
131
136
|
2. Validate target identity, refresh authorization as needed and check account
|
|
132
137
|
model metadata without publishing it as the active account.
|
|
133
|
-
3.
|
|
134
|
-
|
|
138
|
+
3. Hold an admission fence during commit. Existing account-pinned managed
|
|
139
|
+
turns may continue; unbound legacy preparation remains conservatively fenced.
|
|
135
140
|
4. CAS the selector, read back committed settings and confirm target evidence.
|
|
136
|
-
5.
|
|
137
|
-
|
|
141
|
+
5. Update the default directory and UI without revoking another account's
|
|
142
|
+
running turn/proofs or writing model/history/default selection. Credential
|
|
143
|
+
replacement revokes only the matching account runtime and search/quota proof.
|
|
144
|
+
|
|
145
|
+
`COPILOT_ACCOUNTS_BUSY` is transient: each account status read reevaluates
|
|
146
|
+
current managed Agent activity, operation leases and authorization. A rejected
|
|
147
|
+
switch must not remain busy after that work settles. Reading status does not
|
|
148
|
+
refresh credentials or retry the rejected switch. In Models, use **Refresh
|
|
149
|
+
account information** after work ends to update the mounted view. With only
|
|
150
|
+
one saved account, first use **Add GitHub account**; a **Switch** control is
|
|
151
|
+
shown only for another saved account. No running work is cancelled for this.
|
|
138
152
|
|
|
139
153
|
Failed preparation leaves the old selector unchanged. A committed selector
|
|
140
154
|
followed by failed readback is reported as uncertain, never successful and
|
|
@@ -147,8 +161,9 @@ native auth refresh, managed answer streams and hosted search. Release leases
|
|
|
147
161
|
on completion, failure, cancellation and disposal. Switching never terminates
|
|
148
162
|
native retries, rewrites native retry policy or manufactures Usage.
|
|
149
163
|
An abandoned signal-free prepared call has no public completion/cancellation
|
|
150
|
-
evidence; it conservatively retains its barrier until disposal.
|
|
151
|
-
|
|
164
|
+
evidence; it conservatively retains its account mutation barrier until disposal.
|
|
165
|
+
Changing the global default can still proceed without redirecting that call.
|
|
166
|
+
A guessed idle timeout must not permit reauthorization/removal of its account.
|
|
152
167
|
|
|
153
168
|
## Route compatibility
|
|
154
169
|
|
|
@@ -191,9 +206,22 @@ The separate `githubCopilotAccounts` namespace exposes `get`,
|
|
|
191
206
|
cannot be named `remove`: official rc.2 reserves that inherited service name
|
|
192
207
|
and rejects the entire Client contribution.
|
|
193
208
|
|
|
194
|
-
Credits shows
|
|
195
|
-
|
|
196
|
-
|
|
209
|
+
Credits shows the Session's next-turn account and quota under the existing title.
|
|
210
|
+
Its **Switch account** disclosure lists saved authorizations and **Follow global
|
|
211
|
+
default**. No Add, reauthorization or sign-out action appears in Chat. Changing
|
|
212
|
+
the preference while a turn runs leaves that turn's old account pinned; the
|
|
213
|
+
popover identifies it separately. Other Sessions are unchanged. Unknown identity
|
|
214
|
+
is unavailable, not a stale username presented as current.
|
|
215
|
+
|
|
216
|
+
Completed managed turns have a compact **Account** disclosure alongside native
|
|
217
|
+
Usage/selection actions through the public assistant-actions slot. This is
|
|
218
|
+
request-account evidence, not billing attribution or a subagent account rollup.
|
|
219
|
+
It captures an optional cached identity on the first real ordinary native chunk,
|
|
220
|
+
not discovery, preparation or auxiliary Auto assessment. Host memory retains at
|
|
221
|
+
most 64 Sessions and 128 turns per Session. Restart, cold history, eviction or a
|
|
222
|
+
request with no native delivery is unknown. Failed reads are distinct from
|
|
223
|
+
unknown evidence; Retry rereads the same turn without inference. Official rc.2
|
|
224
|
+
has no ignorable account-history event seam: no new durable event is emitted.
|
|
197
225
|
|
|
198
226
|
Identity and quota have separate error states but must share account evidence.
|
|
199
227
|
Models account mutations invalidate mounted Credits presentation before the
|
|
@@ -220,7 +248,9 @@ or inference is introduced.
|
|
|
220
248
|
- Behavior: absent-selector compatibility, missing-selector fail-closed,
|
|
221
249
|
duplicate identity, same-account renewal, canonical route blocker, selected
|
|
222
250
|
model missing, revoked permissions and account-bound replay.
|
|
223
|
-
- UI: Models-
|
|
251
|
+
- UI: Models global-default management, Session switching only inside Credits,
|
|
252
|
+
global inheritance/explicit same-value override, frozen running turns,
|
|
253
|
+
historical Account/unknown/read-error distinctions, dark/light/mobile,
|
|
224
254
|
keyboard interaction, loading/error states and no overlapping controllers.
|
|
225
255
|
- No native Usage filtering, history edits, default selection changes or
|
|
226
256
|
automatic model/account substitution.
|
|
@@ -239,7 +269,7 @@ The temporary-profile persistence fixture uses native `LocalCredentialProvider`,
|
|
|
239
269
|
profile boot/Loader, ConfigEditor, SettingsForms CAS, authorization and SDK.
|
|
240
270
|
Independent grants and the selector survive disposal/reopen; stale CAS does
|
|
241
271
|
not replace the config fiber; account A refresh never writes B. It injects
|
|
242
|
-
|
|
272
|
+
model preflight, and mocks identity/provider
|
|
243
273
|
HTTP. It is not full production lifecycle or live OAuth qualification.
|
|
244
274
|
|
|
245
275
|
The local frozen install and full gate are blocked by HTTP 404s for unchanged
|
package/docs/copilot-usage.md
CHANGED
|
@@ -15,9 +15,11 @@ The control is an additive `conversation.composer.dock` contribution for the cur
|
|
|
15
15
|
The compact control shows reported usage and remaining allocation where available. Its details explain the unit, budget, reset timestamp, freshness and unavailable data. Legacy premium requests must never be relabeled AI credits. A pooled organization account can have absolute credits used without a personal denominator; it does not imply unlimited use or expose a knowable organization balance. Percentage-only data must not create falsely precise absolute amounts.
|
|
16
16
|
|
|
17
17
|
The account extension described in [Copilot accounts](./copilot-accounts.md)
|
|
18
|
-
adds a readonly GitHub identity under the details title.
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
adds a readonly GitHub identity under the details title. Models retains account
|
|
19
|
+
authorization and the global default. Managed Sessions can select an already
|
|
20
|
+
authorized account inside Credits for subsequent turns, or restore global
|
|
21
|
+
inheritance; running turns remain on their frozen account. Identity and quota
|
|
22
|
+
must carry matching Session-account evidence before they are presented together.
|
|
21
23
|
Failure to read identity is not a different account or a zero balance.
|
|
22
24
|
|
|
23
25
|
Detailed amounts are rounded to two decimal places for display; a positive amount below 0.01 is shown as `<0.01`, not zero. GitHub billing remains authoritative. Known individual budgets at 90% used show a low-budget warning, not a spending restriction. The plan link uses the supported Desktop browser handoff with a selectable URL fallback. Details use the browser's native popover top layer when available and a fixed-position fallback otherwise; no additional ReactDOM copy or private Core DOM access is introduced.
|