dsh-github-copilot 0.1.0-alpha.21.dsh.0.2.2.rc.3 → 0.1.0-alpha.22.dsh.0.2.2.rc.3

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 CHANGED
@@ -135,6 +135,16 @@ compatibility overrides. Recheck account/catalog/preferences and Settings eviden
135
135
  before the one-shot write, then atomically CAS the model list and any authorized
136
136
  route API together and read back both user and effective values. Never create a
137
137
  profile, change other paths or perform this sync automatically.
138
+
139
+ Native ID-only request headers (#512) use only the public synchronous
140
+ `llm-pi-ai/request-headers` waterfall. Fill missing Editor-Version,
141
+ Editor-Plugin-Version and Copilot-Integration-Id from the published Copilot
142
+ provider on its declared default endpoints and exact native route only.
143
+ Preserve explicit headers and DSH attribution; never read credentials, copy
144
+ capabilities, mutate catalogs/settings, replace transport or retry messages.
145
+ Disposal removes the listener, not saved IDs; model-list persistence does not
146
+ promise working inference after unload. Keep synthetic header delivery separate
147
+ from live supplier acceptance.
138
148
 
139
149
  The user-confirmed direction on 2026-11-14 supersedes conflicting legacy feature
140
150
  requirements below: this plugin is a lightweight GitHub Copilot model integration
package/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ release tags do not update this file after publication. Check the exact
5
5
  [GitHub Release](https://github.com/cloga/dsh-github-copilot/releases) and npm
6
6
  version separately rather than treating an old `prepared` label as current status.
7
7
 
8
+ ## 0.1.0-alpha.22.dsh.0.2.2.rc.3 (prepared)
9
+
10
+ - Fill missing native Copilot IDE request headers for ID-only models through the public header hook, using published provider values rather than a static model list (#512).
11
+ - Preserve native authentication, explicit headers, attribution and retry ownership. No settings migration, Core patch or automatic message replay; unloading removes the runtime contribution.
12
+
8
13
  ## 0.1.0-alpha.21.dsh.0.2.2.rc.3 (prepared)
9
14
 
10
15
  - Include a conditionally verified provider-wide API in confirmed native model sync when enabled account models share one protocol and matching native catalog entries agree (#510).
package/README.md CHANGED
@@ -73,15 +73,15 @@ After the exact compatible release is available and verified, download its
73
73
  original asset and checksum in an empty directory:
74
74
 
75
75
  ```sh
76
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.21.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.21.dsh.0.2.2.rc.3.tgz
77
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.21.dsh.0.2.2.rc.3/SHA256SUMS
76
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.22.dsh.0.2.2.rc.3.tgz
77
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/SHA256SUMS
78
78
  sha256sum --check SHA256SUMS
79
79
  ```
80
80
 
81
81
  For the `web` profile, install the same Release asset:
82
82
 
83
83
  ```sh
84
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.21.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.21.dsh.0.2.2.rc.3.tgz
84
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.22.dsh.0.2.2.rc.3.tgz
85
85
  ```
86
86
 
87
87
  Choose the intended profile explicitly. Then:
@@ -130,6 +130,14 @@ request defaults, with native definitions.** Review updated and removed entries
130
130
  before confirming. Other route-wide settings remain unchanged. This selects a
131
131
  model list; it does not prove supplier compatibility or enforce account-specific
132
132
  limits. Native requests retain DSH's transport, validation and error behavior.
133
+ While loaded, the plugin fills missing `Editor-Version`, `Editor-Plugin-Version`
134
+ and `Copilot-Integration-Id` request headers from the published pi-ai Copilot
135
+ provider through DSH's public request-header hook. This covers ID-only models
136
+ without inherited catalog headers. It preserves explicit headers, DSH
137
+ attribution and native authentication, and does not apply to custom endpoints
138
+ or other providers. No settings are written or failed messages retried.
139
+ Unloading the plugin removes this contribution: the saved model list remains,
140
+ but affected models can again fail with `missing Editor-Version header for IDE auth`.
133
141
  Custom native authentication,
134
142
  endpoints, headers, nonempty model overrides, or unproven route compatibility
135
143
  overrides block sync rather than changing those settings. An existing
package/README.zh.md CHANGED
@@ -61,15 +61,15 @@ node scripts/select-core-release.mjs 0.2.2-rc.3
61
61
  精确兼容版本发布且通过验证后,在空目录下载原始制品并校验:
62
62
 
63
63
  ```sh
64
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.21.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.21.dsh.0.2.2.rc.3.tgz
65
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.21.dsh.0.2.2.rc.3/SHA256SUMS
64
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.22.dsh.0.2.2.rc.3.tgz
65
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/SHA256SUMS
66
66
  sha256sum --check SHA256SUMS
67
67
  ```
68
68
 
69
69
  例如安装到 `web` profile:
70
70
 
71
71
  ```sh
72
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.21.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.21.dsh.0.2.2.rc.3.tgz
72
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.22.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.22.dsh.0.2.2.rc.3.tgz
73
73
  ```
74
74
 
75
75
  请明确选择目标 profile,然后:
@@ -106,6 +106,12 @@ API 变更会在同一次 Settings CAS 中写入并分别读回。原生校验
106
106
  **同步会用原生定义替换已有的模型自定义参数,包括单次请求输出默认值。**
107
107
  确认前请检查更新和移除项。其他路线级设置保持不变。这只是模型列表选择,不代表供应商
108
108
  兼容性已经验证,也不会强制执行账号特有的限制;传输、校验和错误处理仍由原生拥有。
109
+ 插件加载时,通过 DSH 公开请求头钩子,从已发布 pi-ai Copilot provider 补齐缺失的
110
+ `Editor-Version`、`Editor-Plugin-Version` 和 `Copilot-Integration-Id`。
111
+ 这覆盖仅含 ID、无法继承目录请求头的模型;保留显式请求头、DSH 标识和原生认证,
112
+ 不影响自定义端点或其他 provider,不写设置,也不自动重试失败消息。
113
+ 停用插件会移除此请求头补充:模型列表仍保留,但受影响模型可能再次出现
114
+ `missing Editor-Version header for IDE auth`。
109
115
  原生 provider 存在自定义认证、端点、请求头、非空模型覆盖或无法验证的
110
116
  路线兼容性覆盖时,同步会停止,不会修改这些设置。已有的 `compat.supportsStrictMode: false`
111
117
  会保留,但至少一个同步模型必须使用支持该设置的 Responses 或 Completions 协议。已有的
@@ -8,14 +8,14 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.1.0-alpha.21.dsh.0.2.2.rc.3"
11
+ "version": "0.1.0-alpha.22.dsh.0.2.2.rc.3"
12
12
  },
13
13
  "releaseLines": [
14
14
  { "core": "0.2.0-rc.2", "version": "0.4.2-alpha.15", "status": "published" },
15
15
  { "core": "0.2.1-alpha.4", "version": "0.4.2-alpha.16", "status": "published" },
16
16
  { "core": "0.2.1-alpha.5", "version": "0.1.0-alpha.2.dsh.0.2.1.alpha.5", "status": "published" },
17
17
  { "core": "0.2.1-rc.3", "version": "0.1.0-alpha.5.dsh.0.2.1.rc.3", "status": "published" },
18
- { "core": "0.2.2-rc.3", "version": "0.1.0-alpha.21.dsh.0.2.2.rc.3", "status": "pending" }
18
+ { "core": "0.2.2-rc.3", "version": "0.1.0-alpha.22.dsh.0.2.2.rc.3", "status": "pending" }
19
19
  ],
20
20
  "evidence": {
21
21
  "kind": "source-and-synthetic-test-inventory",
@@ -741,6 +741,23 @@
741
741
  {"file": "tests/preview-route.spec.ts", "name": "binds explicit summary capacity proof to its Agent rather than the current default"}
742
742
  ]
743
743
  },
744
+ {
745
+ "id": "native-copilot-ide-headers",
746
+ "required": true,
747
+ "activation": "request-local-native-header-waterfall",
748
+ "evidenceScope": "synthetic-native-stream-not-live-supplier",
749
+ "sourceMarkers": [
750
+ {"file": "src/native-copilot-headers.ts", "marker": "llm-pi-ai/request-headers"},
751
+ {"file": "src/index.ts", "marker": "installNativeCopilotHeaders"},
752
+ {"file": "src/native-copilot-headers.ts", "marker": "endpoints.has(endpoint.href)"}
753
+ ],
754
+ "tests": [
755
+ {"file": "tests/native-copilot-headers.spec.ts", "name": "fills only missing public IDE headers and removes its contribution on disposal"},
756
+ {"file": "tests/native-copilot-headers.spec.ts", "name": "does not contribute to other routes or custom endpoints"},
757
+ {"file": "tests/native-copilot-headers.spec.ts", "name": "composes with other contributors without retaining per-request headers"},
758
+ {"file": "tests/fixtures/auto-review-copilot-core.fixture.ts", "name": "records %s through real Loader qualification and synthetic stream delivery"}
759
+ ]
760
+ },
744
761
  {
745
762
  "id": "confirmed-native-model-sync",
746
763
  "required": true,
@@ -54,8 +54,22 @@ Confirming sync replaces per-model customizations, including explicit output
54
54
  request defaults. The preview discloses updated and removed entries, and the
55
55
  saved list is checked against both user and effective Settings. Failures and
56
56
  uncertain outcomes remain errors, with no automatic retry. Successful ID-only
57
- lists remain usable by the native adapter after plugin unload; that persistence
58
- does not prove supplier capability or successful inference.
57
+ lists remain saved after plugin unload; that persistence does not prove supplier
58
+ capability or successful inference.
59
+
60
+ On the pinned native adapter, ID-only models absent from the installed catalog
61
+ do not inherit its per-model IDE headers. A route-wide API selects a generic
62
+ protocol provider, not an alternative Copilot wire. The plugin supplements
63
+ missing `Editor-Version`, `Editor-Plugin-Version` and `Copilot-Integration-Id`
64
+ through the public `llm-pi-ai/request-headers` waterfall, taking values and
65
+ eligible default endpoints from the published pi-ai Copilot provider. It does
66
+ not copy capabilities, mutate the catalog, replace credentials or implement
67
+ another transport. Explicit request headers and native User-Agent attribution
68
+ remain unchanged; other providers and custom endpoints receive no contribution.
69
+ The listener is removed on disposal, without deleting the saved model list.
70
+ Consequently, affected models can fail again after unload. A synthetic native
71
+ stream regression covers missing-header rejection and successful header
72
+ delivery; it does not certify supplier acceptance or all model capabilities.
59
73
 
60
74
  The account controls cannot replace DSH's native provider **Edit/Delete**
61
75
  controls. Saving another native provider group remains a native DSH action; the
@@ -103,6 +117,14 @@ route API,且所有启用账号模型的已验证协议一致、目录中匹
103
117
  协议混合、证据缺失或冲突时阻止同步。模型列表和获准的 API 会在同一写入中提交,
104
118
  原生校验仍是最终依据。
105
119
 
120
+ 当前固定版本的原生适配器中,不在内置目录的 ID-only 模型不会继承模型级 IDE 请求头。
121
+ 插件通过公开 `llm-pi-ai/request-headers` 钩子,从已发布 pi-ai Copilot provider 补齐
122
+ 缺失的 `Editor-Version`、`Editor-Plugin-Version`、`Copilot-Integration-Id`,
123
+ 仅适用于原生 Copilot 路由及该 provider 公布的默认端点。保留显式请求头和原生
124
+ User-Agent;不改目录、能力、凭据或设置,不新增传输,也不自动重试。
125
+ 卸载插件会移除该补充而保留模型列表,因此受影响模型可能再次出现缺少请求头错误。
126
+ 合成原生流回归覆盖缺头拒绝和补齐后的交付,不代表所有模型能力或真实供应商调用均已验证。
127
+
106
128
  账号界面不能替代 DSH 原生 provider 的 **Edit/Delete** 控件。新增原生 provider 组仍是
107
129
  DSH 操作;插件不拦截,也不声称能强制只保留一个组。
108
130
 
package/lib/index.js CHANGED
@@ -3689,7 +3689,7 @@ function createAccountProvider(descriptors, guard, baseURL, classifierReasoningO
3689
3689
  const { name: name$1, version } = {
3690
3690
  name: "dsh-github-copilot",
3691
3691
  description: "Account-aware GitHub Copilot models for DeepSeek Harness through its published native adapter.",
3692
- version: "0.1.0-alpha.21.dsh.0.2.2.rc.3",
3692
+ version: "0.1.0-alpha.22.dsh.0.2.2.rc.3",
3693
3693
  releaseNotes: "CHANGELOG.md",
3694
3694
  publishConfig: {
3695
3695
  "access": "public",
@@ -11789,6 +11789,31 @@ function installAutoReviewSampling(ctx) {
11789
11789
  };
11790
11790
  }
11791
11791
  //#endregion
11792
+ //#region lib/types/native-copilot-headers.js
11793
+ /** Supplement ID-only models through the native adapter's request-local public hook. */
11794
+ function installNativeCopilotHeaders(ctx) {
11795
+ const native = githubCopilotProvider();
11796
+ const endpoints = new Set(native.getModels().map((model) => new URL(model.baseUrl).href));
11797
+ const publicHeaders = copilotPublicHeaders();
11798
+ const names = [
11799
+ "Editor-Version",
11800
+ "Editor-Plugin-Version",
11801
+ "Copilot-Integration-Id"
11802
+ ];
11803
+ return ctx.on("llm-pi-ai/request-headers", (request, headers, next) => {
11804
+ if (request.provider !== "github-copilot") return next();
11805
+ let endpoint;
11806
+ try {
11807
+ endpoint = new URL(request.baseURL);
11808
+ } catch {
11809
+ return next();
11810
+ }
11811
+ if (endpoint.protocol !== "https:" || endpoint.username || endpoint.password || !endpoints.has(endpoint.href)) return next();
11812
+ for (const name of names) if (!headers.has(name)) headers.set(name, publicHeaders[name]);
11813
+ return next();
11814
+ });
11815
+ }
11816
+ //#endregion
11792
11817
  //#region lib/types/native-copilot-search.js
11793
11818
  var __runInitializers = function(thisArg, initializers, value) {
11794
11819
  var useValue = arguments.length > 2;
@@ -12130,6 +12155,7 @@ const GITHUB_COPILOT_SETTINGS_NAMESPACE = "github-copilot";
12130
12155
  /** Register model integration after the required native services are available. */
12131
12156
  function apply(ctx, config) {
12132
12157
  ctx.effect(() => installAutoReviewSampling(ctx));
12158
+ ctx.effect(() => installNativeCopilotHeaders(ctx));
12133
12159
  ctx.inject([
12134
12160
  "web",
12135
12161
  "llm",
@@ -0,0 +1,4 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ /** Supplement ID-only models through the native adapter's request-local public hook. */
3
+ export declare function installNativeCopilotHeaders(ctx: Context): () => void;
4
+ //# sourceMappingURL=native-copilot-headers.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-github-copilot",
3
3
  "description": "Account-aware GitHub Copilot models for DeepSeek Harness through its published native adapter.",
4
- "version": "0.1.0-alpha.21.dsh.0.2.2.rc.3",
4
+ "version": "0.1.0-alpha.22.dsh.0.2.2.rc.3",
5
5
  "releaseNotes": "CHANGELOG.md",
6
6
  "publishConfig": {
7
7
  "access": "public",