dsh-github-copilot 0.4.2-alpha.13 → 0.4.2-alpha.14
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 +11 -1
- package/README.md +7 -7
- package/README.zh.md +7 -7
- package/deployment-baseline.json +1 -1
- package/docs/copilot-accounts.md +9 -0
- package/lib/client.js +1 -1
- package/lib/index.js +10 -4
- package/lib/types/copilot-auth.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.4.2-alpha.
|
|
3
|
+
## 0.4.2-alpha.14 (prepared)
|
|
4
|
+
|
|
5
|
+
- Correlate certified native OAuth refresh writes across Cordis traced credentials
|
|
6
|
+
faces using the published original service identity. Keep actual credential
|
|
7
|
+
operations traced; no Core patch, private registry, timing exemption or retry.
|
|
8
|
+
- Exercise real Cordis Services and distinct contexts instead of a same-object
|
|
9
|
+
mock. Separate service/record isolation, duplicate/missing/delayed notifications
|
|
10
|
+
and failed/mismatched commits remain fail-closed. A historical unknown-source
|
|
11
|
+
observation still does not establish who wrote the credential.
|
|
12
|
+
|
|
13
|
+
## 0.4.2-alpha.13 (published)
|
|
4
14
|
|
|
5
15
|
- Give every hard-eligible fitting model positive opportunity across supplier
|
|
6
16
|
categories. Replace hard category filtering with per-model target/second/third
|
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
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
|
-
**Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.
|
|
11
|
+
**Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared prerelease: `0.4.2-alpha.14`.** `0.4.2-alpha.1` was not published: its release preflight failed, and its immutable tag will not be reused. Supported host: official DSH / Windows Desktop `0.2.0-rc.2`. The stable version is also published on npm's `latest` dist-tag; prereleases remain on their channel tags. Stability-channel promotion does not expand the qualified host baseline or prove live account, model, search or Desktop health. Earlier DSH pins are historical evidence, not supported installation targets. Published, installed in a profile and loaded by a running Host are separate states.
|
|
12
12
|
|
|
13
|
-
**
|
|
13
|
+
**Native refresh protection:** 0.4.1 introduced preservation of already-dispatched HTTP streams across proven plugin-owned refresh with unchanged account, endpoint and entitlements. Versions through 0.4.2-alpha.13 still missed this proof across real Cordis traced service faces; 0.4.2-alpha.14 fixes that identity mismatch. Subsequent requests use freshly validated auth and metadata. Unknown/external credential notifications, revocation, cancellation and provider rejections remain explicit—not a promise of invisible recovery or automatic retry. See [the refresh boundary](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385).
|
|
14
14
|
|
|
15
15
|
## What you can do
|
|
16
16
|
|
|
@@ -129,10 +129,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
|
|
|
129
129
|
For a **standalone named profile**:
|
|
130
130
|
|
|
131
131
|
```sh
|
|
132
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
132
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.14/dsh-github-copilot-0.4.2-alpha.14.tgz
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.
|
|
135
|
+
For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.14`; stable versions publish on npm's `latest` dist-tag and prereleases on their channel tags. The official rc.2 **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.
|
|
136
136
|
|
|
137
137
|
After an approved reload/restart:
|
|
138
138
|
|
|
@@ -322,14 +322,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
322
322
|
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.
|
|
323
323
|
|
|
324
324
|
```sh
|
|
325
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
326
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
325
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.14/dsh-github-copilot-0.4.2-alpha.14.tgz
|
|
326
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.14/SHA256SUMS
|
|
327
327
|
sha256sum --check SHA256SUMS
|
|
328
328
|
```
|
|
329
329
|
|
|
330
330
|
```powershell
|
|
331
331
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
332
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
332
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.14.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
333
333
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
334
334
|
```
|
|
335
335
|
|
package/README.zh.md
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
为 DSH 提供 GitHub Copilot 账号模型发现、上下文 Auto 选模和 hosted search。插件复用 DSH 公开的原生适配器,保留 profile 全局默认账号,并支持 Session 后续 turn 指定独立账号;不修改 Core,也不维护第二套模型目录。
|
|
10
10
|
|
|
11
|
-
**稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布预览版:`0.4.2-alpha.
|
|
11
|
+
**稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布预览版:`0.4.2-alpha.14`。** `0.4.2-alpha.1` 的发布预检失败,因此未发布;其不可变 tag 不会复用。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。稳定版也发布到 npm 的 `latest` dist-tag;预发布版本仍使用各自渠道 tag。稳定渠道不扩大已验证的宿主基线,也不证明实时账号、模型、搜索或 Desktop 健康状态。较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**原生刷新保护:**0.4.1 引入了窄范围保护:仅在插件拥有的原生刷新被精确验证,且账号、端点与权限连续时,保留已发出的 HTTP 流。但截至 0.4.2-alpha.13,真实 Cordis 服务代理身份不一致仍会导致保护证据匹配失败;0.4.2-alpha.14 修复此问题。后续请求重新验证认证与模型元数据。未知/外部凭据通知、撤销、取消与供应商拒绝仍明确报错,不承诺所有刷新无感,也不自动重试。参见[刷新边界](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385)。
|
|
14
14
|
|
|
15
15
|
## 你可以做什么
|
|
16
16
|
|
|
@@ -111,10 +111,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
111
111
|
**独立具名 profile**:
|
|
112
112
|
|
|
113
113
|
```sh
|
|
114
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
114
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.14/dsh-github-copilot-0.4.2-alpha.14.tgz
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
**Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.
|
|
117
|
+
**Desktop** 原生包管理器接受精确 npm spec,例如 `dsh-github-copilot@0.4.2-alpha.14`;稳定版发布到 npm `latest` dist-tag,预发布版使用对应渠道 tag。官方 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 或删除配置。
|
|
118
118
|
|
|
119
119
|
经批准 reload/restart 后:
|
|
120
120
|
|
|
@@ -301,14 +301,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
301
301
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
302
302
|
|
|
303
303
|
```sh
|
|
304
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
305
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
304
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.14/dsh-github-copilot-0.4.2-alpha.14.tgz
|
|
305
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.14/SHA256SUMS
|
|
306
306
|
sha256sum --check SHA256SUMS
|
|
307
307
|
```
|
|
308
308
|
|
|
309
309
|
```powershell
|
|
310
310
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
311
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
311
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.14.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
312
312
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
313
313
|
```
|
|
314
314
|
|
package/deployment-baseline.json
CHANGED
package/docs/copilot-accounts.md
CHANGED
|
@@ -17,6 +17,15 @@ normal native refresh by another same-account request. Upgrade to 0.4.1 for the
|
|
|
17
17
|
narrow plugin-owned refresh exception. This is synthetic regression evidence,
|
|
18
18
|
not attribution of a particular live error to refresh.
|
|
19
19
|
|
|
20
|
+
Versions through 0.4.2-alpha.13 keyed refresh evidence by a traced credentials
|
|
21
|
+
service face. Official rc.2 Cordis returns distinct faces on repeated reads,
|
|
22
|
+
so even certified refresh notifications could be classified as unknown source.
|
|
23
|
+
The plugin now correlates by the published `symbols.original` service identity,
|
|
24
|
+
while executing credential operations through the traced face. Real Service
|
|
25
|
+
regressions exercise distinct contexts, isolated services, duplicate/missing/
|
|
26
|
+
delayed notifications and failed/mismatched commits. This repairs qualification,
|
|
27
|
+
not proof that a particular historical notification was a token refresh.
|
|
28
|
+
|
|
20
29
|
Separately enabled request diagnostics may now record fixed qualification,
|
|
21
30
|
notification and commit reasons plus bounded live-wire populations; see
|
|
22
31
|
[credential-change decisions](./plugin-diagnostics.md#credential-change-decisions-402).
|
package/lib/client.js
CHANGED
|
@@ -7552,7 +7552,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7552
7552
|
};
|
|
7553
7553
|
//#endregion
|
|
7554
7554
|
//#region package.json
|
|
7555
|
-
var version = "0.4.2-alpha.
|
|
7555
|
+
var version = "0.4.2-alpha.14";
|
|
7556
7556
|
//#endregion
|
|
7557
7557
|
//#region lib/types/diagnostics-client.js
|
|
7558
7558
|
let owner;
|
package/lib/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { getCACertificates } from "node:tls";
|
|
|
12
12
|
import { Agent } from "undici";
|
|
13
13
|
import { createModels, getSupportedThinkingLevels, hasApi, lazyStream } from "@earendil-works/pi-ai";
|
|
14
14
|
import { githubCopilotProvider } from "@earendil-works/pi-ai/providers/github-copilot";
|
|
15
|
+
import { symbols } from "@deepseek-ai/cordis";
|
|
15
16
|
import { getBuiltinModels } from "@earendil-works/pi-ai/providers/all";
|
|
16
17
|
import { credentialKey, credentialRef } from "@deepseek-ai/dsh-credentials";
|
|
17
18
|
import { WebError } from "@deepseek-ai/dsh-web";
|
|
@@ -581,7 +582,7 @@ const result$1 = strictRemoteCodec("dsh-github-copilot#DiagnosticsView", Diagnos
|
|
|
581
582
|
var package_default = {
|
|
582
583
|
name: "dsh-github-copilot",
|
|
583
584
|
description: "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
584
|
-
version: "0.4.2-alpha.
|
|
585
|
+
version: "0.4.2-alpha.14",
|
|
585
586
|
releaseNotes: "CHANGELOG.md",
|
|
586
587
|
publishConfig: {
|
|
587
588
|
"access": "public",
|
|
@@ -2072,6 +2073,10 @@ function normalizeGitHubCopilotOAuthCredential(credential) {
|
|
|
2072
2073
|
const nativeRefreshResults = /* @__PURE__ */ new WeakSet();
|
|
2073
2074
|
const nativeRefreshRejections = /* @__PURE__ */ new WeakMap();
|
|
2074
2075
|
const refreshWrites = /* @__PURE__ */ new WeakMap();
|
|
2076
|
+
function credentialServiceIdentity(service) {
|
|
2077
|
+
const original = Reflect.get(service, symbols.original);
|
|
2078
|
+
return typeof original === "object" && original !== null ? original : service;
|
|
2079
|
+
}
|
|
2075
2080
|
/** Only a validated native OAuth refresh may certify its exact returned object. */
|
|
2076
2081
|
async function certifyCopilotNativeRefresh(previous, result, derive, signal) {
|
|
2077
2082
|
const ids = (grant) => grant.availableModelIds === void 0 ? void 0 : JSON.stringify([...grant.availableModelIds].sort());
|
|
@@ -2091,7 +2096,7 @@ async function certifyCopilotNativeRefresh(previous, result, derive, signal) {
|
|
|
2091
2096
|
/** Consume exactly one notification from the serialized, certified write. */
|
|
2092
2097
|
function observeCopilotNativeRefresh(ctx, key, diagnostic) {
|
|
2093
2098
|
const service = ctx.get("credentials");
|
|
2094
|
-
const write = service === void 0 ? void 0 : refreshWrites.get(service)?.get(key);
|
|
2099
|
+
const write = service === void 0 ? void 0 : refreshWrites.get(credentialServiceIdentity(service))?.get(key);
|
|
2095
2100
|
if (!write) {
|
|
2096
2101
|
diagnostic?.("notification", "unknown-source");
|
|
2097
2102
|
return;
|
|
@@ -2172,12 +2177,13 @@ function createGitHubCopilotCredentialStore(ctx, logicalProviderId = GITHUB_COPI
|
|
|
2172
2177
|
assertProvider(providerId);
|
|
2173
2178
|
binding?.assertCurrent();
|
|
2174
2179
|
const service = credentialService(ctx);
|
|
2180
|
+
const identity = credentialServiceIdentity(service);
|
|
2175
2181
|
let pending;
|
|
2176
2182
|
let expected;
|
|
2177
|
-
let writes = refreshWrites.get(
|
|
2183
|
+
let writes = refreshWrites.get(identity);
|
|
2178
2184
|
if (!writes) {
|
|
2179
2185
|
writes = /* @__PURE__ */ new Map();
|
|
2180
|
-
refreshWrites.set(
|
|
2186
|
+
refreshWrites.set(identity, writes);
|
|
2181
2187
|
}
|
|
2182
2188
|
try {
|
|
2183
2189
|
const stored = await service.modifyRecord(key, async (current) => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Provider-side GitHub Copilot auth resolution over the same credential record
|
|
3
3
|
* that DSH's built-in llm-pi-ai adapter owns.
|
|
4
4
|
*/
|
|
5
|
-
import type
|
|
5
|
+
import { type Context } from '@deepseek-ai/cordis';
|
|
6
6
|
import { type CredentialStore, type OAuthAuth } from '@earendil-works/pi-ai';
|
|
7
7
|
import { GITHUB_COPILOT_PROVIDER_ID, GITHUB_COPILOT_PREVIEW_PROVIDER_ID } from './copilot-identity.ts';
|
|
8
8
|
import type { GitHubCopilotOAuthCredential } from './copilot-grant.ts';
|
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.2-alpha.
|
|
4
|
+
"version": "0.4.2-alpha.14",
|
|
5
5
|
"releaseNotes": "CHANGELOG.md",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|