dsh-github-copilot 0.4.0-alpha.100 → 0.4.0-alpha.101
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 +5 -1
- package/README.md +7 -6
- package/README.zh.md +7 -6
- package/deployment-baseline.json +1 -1
- package/docs/copilot-accounts.md +6 -1
- package/lib/client.js +2 -1
- package/lib/client.js.map +1 -1
- package/lib/index.js +3 -2
- 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,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.4.0-alpha.
|
|
3
|
+
## 0.4.0-alpha.101 (prepared)
|
|
4
|
+
|
|
5
|
+
- 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.
|
|
6
|
+
|
|
7
|
+
## 0.4.0-alpha.100
|
|
4
8
|
|
|
5
9
|
- 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
10
|
- 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.101` (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.101/dsh-github-copilot-0.4.0-alpha.101.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.101` 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
|
|
|
@@ -189,14 +190,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
189
190
|
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
191
|
|
|
191
192
|
```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.
|
|
193
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.101/dsh-github-copilot-0.4.0-alpha.101.tgz
|
|
194
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.101/SHA256SUMS
|
|
194
195
|
sha256sum --check SHA256SUMS
|
|
195
196
|
```
|
|
196
197
|
|
|
197
198
|
```powershell
|
|
198
199
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
199
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
200
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.101.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
200
201
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
201
202
|
```
|
|
202
203
|
|
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.101`(尚未发布)。支持宿主:官方 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.101/dsh-github-copilot-0.4.0-alpha.101.tgz
|
|
49
50
|
```
|
|
50
51
|
|
|
51
|
-
**Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.
|
|
52
|
+
**Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.101`。官方 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
|
|
|
@@ -188,14 +189,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
188
189
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
189
190
|
|
|
190
191
|
```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.
|
|
192
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.101/dsh-github-copilot-0.4.0-alpha.101.tgz
|
|
193
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.101/SHA256SUMS
|
|
193
194
|
sha256sum --check SHA256SUMS
|
|
194
195
|
```
|
|
195
196
|
|
|
196
197
|
```powershell
|
|
197
198
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
198
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
199
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.101.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
199
200
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
200
201
|
```
|
|
201
202
|
|
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.101`;
|
|
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
|
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),
|