dsh-github-copilot 0.4.0-alpha.100 → 0.4.0-alpha.102
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 +10 -1
- package/README.md +9 -6
- package/README.zh.md +9 -6
- package/deployment-baseline.json +1 -1
- package/docs/copilot-accounts.md +14 -1
- package/lib/client.js +2 -1
- package/lib/client.js.map +1 -1
- package/lib/index.js +7 -8
- package/lib/remote.js +2 -1
- package/lib/types/copilot-accounts-types.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.4.0-alpha.
|
|
3
|
+
## 0.4.0-alpha.102 (prepared)
|
|
4
|
+
|
|
5
|
+
- Read official rc.2 SettingsForms values without requiring the retired `get()` method, fixing an unconditional `COPILOT_ACCOUNTS_EVIDENCE_INCOMPLETE` account-switching blocker (#301).
|
|
6
|
+
- Exercise the production route diagnostic in native account persistence and restart coverage. Preserve unknown-evidence rejection, managed-only eligibility, activity fencing, target validation and selector CAS; no credentials, history, model-selection or Core changes.
|
|
7
|
+
|
|
8
|
+
## 0.4.0-alpha.101 (prepared)
|
|
9
|
+
|
|
10
|
+
- Accept GitHub Enterprise Managed User login names, including underscore-separated enterprise suffixes and setup admin names, in both Host identity normalization and strict Client Remote decoding. Keep bounded JSON, numeric identity, credentials and account-switching safeguards unchanged.
|
|
11
|
+
|
|
12
|
+
## 0.4.0-alpha.100
|
|
4
13
|
|
|
5
14
|
- Add independently authorized GitHub Copilot accounts through official OAuth and the existing DSH credentials service (#297). Preserve the canonical compatibility account; inactive-account refresh remains lazy and record-bound.
|
|
6
15
|
- Manage, confirm switches, remove inactive authorizations and reauthorize the same identity in Models. Managed-only evidence, target preflight, activity fencing and path-level selector CAS prevent unsafe switches; no history, selected-model or default rewrites.
|
package/README.md
CHANGED
|
@@ -12,8 +12,9 @@ The [account requirements and design](./docs/copilot-accounts.md) cover
|
|
|
12
12
|
independent official authorizations in the existing credentials service.
|
|
13
13
|
**Models → Manage → GitHub accounts** is the only management/switching entry;
|
|
14
14
|
Credits details show the current GitHub identity read-only.
|
|
15
|
+
Identity display accepts GitHub Enterprise Managed User names, including their underscore-separated enterprise suffixes.
|
|
15
16
|
|
|
16
|
-
**Source candidate: `0.4.0-alpha.
|
|
17
|
+
**Source candidate: `0.4.0-alpha.102` (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.
|
|
17
18
|
|
|
18
19
|
## What you can do
|
|
19
20
|
|
|
@@ -46,10 +47,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
|
|
|
46
47
|
For a **standalone named profile**:
|
|
47
48
|
|
|
48
49
|
```sh
|
|
49
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
50
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.102/dsh-github-copilot-0.4.0-alpha.102.tgz
|
|
50
51
|
```
|
|
51
52
|
|
|
52
|
-
For **Desktop**, its native package manager accepts `dsh-github-copilot@0.4.0-alpha.
|
|
53
|
+
For **Desktop**, its native package manager accepts `dsh-github-copilot@0.4.0-alpha.102` 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.
|
|
53
54
|
|
|
54
55
|
After an approved reload/restart:
|
|
55
56
|
|
|
@@ -61,6 +62,8 @@ Sign-out requires an explicit action and removes only the active account's autho
|
|
|
61
62
|
|
|
62
63
|
In **Manage → GitHub accounts**, adding an account never replaces the active one. A confirmed switch applies profile-wide to subsequent managed requests; relevant active work and native-route or incomplete evidence block it. 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. Missing/revoked accounts never fall back to another account.
|
|
63
64
|
|
|
65
|
+
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
|
+
|
|
64
67
|
**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).
|
|
65
68
|
|
|
66
69
|
## Auto and model preferences
|
|
@@ -189,14 +192,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
189
192
|
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.
|
|
190
193
|
|
|
191
194
|
```sh
|
|
192
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
193
|
-
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.102/dsh-github-copilot-0.4.0-alpha.102.tgz
|
|
196
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.102/SHA256SUMS
|
|
194
197
|
sha256sum --check SHA256SUMS
|
|
195
198
|
```
|
|
196
199
|
|
|
197
200
|
```powershell
|
|
198
201
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
199
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
202
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.102.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
200
203
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
201
204
|
```
|
|
202
205
|
|
package/README.zh.md
CHANGED
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
[账号需求与技术方案](./docs/copilot-accounts.md)说明如何在现有凭据服务中
|
|
12
12
|
分别保存独立官方授权。**模型 → Manage → GitHub accounts**是唯一管理/
|
|
13
13
|
切换入口;Credits 详情只读展示当前 GitHub 身份。
|
|
14
|
+
身份展示支持 GitHub 企业托管账号,包括带下划线企业后缀的用户名。
|
|
14
15
|
|
|
15
|
-
**源码候选版本:`0.4.0-alpha.
|
|
16
|
+
**源码候选版本:`0.4.0-alpha.102`(尚未发布)。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。** 较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。下方带版本的命令适用于候选版本发布后,不代表对应资产已经存在。
|
|
16
17
|
|
|
17
18
|
## 你可以做什么
|
|
18
19
|
|
|
@@ -45,10 +46,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
45
46
|
**独立具名 profile**:
|
|
46
47
|
|
|
47
48
|
```sh
|
|
48
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
49
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.102/dsh-github-copilot-0.4.0-alpha.102.tgz
|
|
49
50
|
```
|
|
50
51
|
|
|
51
|
-
**Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.
|
|
52
|
+
**Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.102`。官方 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 或删除配置。
|
|
52
53
|
|
|
53
54
|
经批准 reload/restart 后:
|
|
54
55
|
|
|
@@ -60,6 +61,8 @@ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/release
|
|
|
60
61
|
|
|
61
62
|
在 **Manage → GitHub accounts**添加账号不会替换活动账号。确认切换后,当前 profile 的后续托管请求使用新账号;相关工作仍在运行、原生路由尚存或证据不完整时会阻止切换。新账号可能没有已选模型,旧加密 replay 也可能绑定原账号;不会自动替换模型或删除历史。**Reauthorize**仅更新同一已存身份的授权;**Remove**仅删除非活动授权。账号缺失/失效不会自动回退到其它账号。
|
|
62
63
|
|
|
64
|
+
切换资格通过官方 rc.2 SettingsForms 的配置值读取,不再依赖已退役的 Settings `get()` API。缺失或无效配置仍视为证据不完整;升级不会绕过原生路由或运行中工作的限制。
|
|
65
|
+
|
|
63
66
|
**Desktop 生命周期:**停用、移除、升级后的 Web 服务重组可能需要完整冷重启。若插件已 Off,而原生 manager 仅提示 `pending (waiting for service: web)`,不要反复切换或重装。先取得重启许可,遵循[rc.2 生命周期说明](./docs/web-lifecycle-rc2.md)。
|
|
64
67
|
|
|
65
68
|
## Auto 与模型偏好
|
|
@@ -188,14 +191,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
188
191
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
189
192
|
|
|
190
193
|
```sh
|
|
191
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
192
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
194
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.102/dsh-github-copilot-0.4.0-alpha.102.tgz
|
|
195
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.102/SHA256SUMS
|
|
193
196
|
sha256sum --check SHA256SUMS
|
|
194
197
|
```
|
|
195
198
|
|
|
196
199
|
```powershell
|
|
197
200
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
198
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
201
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.102.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
199
202
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
200
203
|
```
|
|
201
204
|
|
package/deployment-baseline.json
CHANGED
package/docs/copilot-accounts.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
This document records the approved requirements and implementation design for
|
|
6
6
|
issue #297. Multi-account 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.102`;
|
|
9
9
|
publication, installation and loaded runtime state are separate evidence.
|
|
10
10
|
|
|
11
11
|
## Requirements
|
|
@@ -98,6 +98,11 @@ detection, not usernames or token strings. Identity reads are bounded,
|
|
|
98
98
|
Host-only, redirect-refusing and cancellation-aware. Normalize only required
|
|
99
99
|
public identity fields, discard unrelated `/user` fields, and reject results
|
|
100
100
|
whose credential/selection evidence changed during the read.
|
|
101
|
+
Host normalization and strict Remote decoding share the same bounded login
|
|
102
|
+
pattern. It accepts ordinary names and GitHub.com Enterprise Managed User names
|
|
103
|
+
with underscore-separated shortcodes, including setup admin names. This is not
|
|
104
|
+
support for a custom enterprise OAuth host; `enterpriseUrl` remains unsupported.
|
|
105
|
+
See [GitHub's official username rules](https://docs.github.com/en/enterprise-cloud@latest/admin/managing-iam/iam-configuration-reference/username-considerations-for-external-authentication).
|
|
101
106
|
|
|
102
107
|
Token refresh remains lazy. Inactive accounts need not hold fresh Copilot
|
|
103
108
|
tokens. Refresh uses native `Models.getAuth()` and the corresponding DSH record
|
|
@@ -114,6 +119,14 @@ reported truthfully and can be retried or explicitly removed.
|
|
|
114
119
|
|
|
115
120
|
Switching has a preparation phase and a commit phase:
|
|
116
121
|
|
|
122
|
+
Route eligibility reads official rc.2 SettingsForms through redacted
|
|
123
|
+
`describe()` values and revision-bearing namespaces; it does not require the
|
|
124
|
+
retired `get()` method. Missing or malformed configuration still means
|
|
125
|
+
incomplete evidence, not an absent native route. The legacy reader remains
|
|
126
|
+
available for retained compatibility fixtures. Account persistence acceptance
|
|
127
|
+
uses real SettingsForms and the production route diagnostic, without an
|
|
128
|
+
eligibility override.
|
|
129
|
+
|
|
117
130
|
1. Capture the selector revision and verify managed-only route eligibility.
|
|
118
131
|
2. Validate target identity, refresh authorization as needed and check account
|
|
119
132
|
model metadata without publishing it as the active account.
|
package/lib/client.js
CHANGED
|
@@ -5581,6 +5581,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5581
5581
|
//#endregion
|
|
5582
5582
|
//#region lib/types/copilot-accounts-types.js
|
|
5583
5583
|
const COPILOT_ACCOUNT_ID_PATTERN = /^(?:canonical|[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$/u;
|
|
5584
|
+
const GITHUB_ACCOUNT_LOGIN_PATTERN = /^[a-zA-Z0-9](?:[a-zA-Z0-9_-]*[a-zA-Z0-9])?$/u;
|
|
5584
5585
|
const COPILOT_ACCOUNTS_DIAGNOSTICS = [
|
|
5585
5586
|
"COPILOT_ACCOUNTS_SELECTOR_INVALID",
|
|
5586
5587
|
"COPILOT_ACCOUNTS_SETTINGS_UNAVAILABLE",
|
|
@@ -5906,7 +5907,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5906
5907
|
"unknown"
|
|
5907
5908
|
]),
|
|
5908
5909
|
identity: object({
|
|
5909
|
-
login: string().min(1).max(39).regex(
|
|
5910
|
+
login: string().min(1).max(39).regex(GITHUB_ACCOUNT_LOGIN_PATTERN),
|
|
5910
5911
|
userId: number().int().positive().max(Number.MAX_SAFE_INTEGER)
|
|
5911
5912
|
}).strict().optional()
|
|
5912
5913
|
}).strict()).max(32),
|