dsh-github-copilot 0.1.0-alpha.6.dsh.0.2.2.rc.3 → 0.1.0-alpha.7.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/CHANGELOG.md +5 -0
- package/README.md +6 -4
- package/README.zh.md +5 -4
- package/deployment-baseline.json +2 -2
- package/docs/auto-review-sampling.md +7 -4
- package/lib/client.js +1 -1
- package/lib/index.js +66 -11
- package/lib/types/native-copilot-access.d.ts +8 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.7.dsh.0.2.2.rc.3 (prepared)
|
|
4
|
+
|
|
5
|
+
- Qualify native search and Auto reviewer compatibility using the adapter-owned pi-ai catalog even when the plugin resolves a separate copy (#461).
|
|
6
|
+
- Leave unknown package exports, model protocols and changed route ownership unavailable rather than guessing or changing native settings.
|
|
7
|
+
|
|
3
8
|
## 0.1.0-alpha.6.dsh.0.2.2.rc.3 (prepared)
|
|
4
9
|
|
|
5
10
|
- Permit managed multi-account switching alongside independently configured native Copilot, retaining credential/turn isolation and the native interface (#470).
|
package/README.md
CHANGED
|
@@ -67,15 +67,15 @@ After the exact compatible release is available and verified, download its
|
|
|
67
67
|
original asset and checksum in an empty directory:
|
|
68
68
|
|
|
69
69
|
```sh
|
|
70
|
-
curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
71
|
-
curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
70
|
+
curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.7.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.7.dsh.0.2.2.rc.3.tgz
|
|
71
|
+
curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.7.dsh.0.2.2.rc.3/SHA256SUMS
|
|
72
72
|
sha256sum --check SHA256SUMS
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
For the `web` profile, install the same Release asset:
|
|
76
76
|
|
|
77
77
|
```sh
|
|
78
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
78
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.7.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.7.dsh.0.2.2.rc.3.tgz
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
Choose the intended profile explicitly. Then:
|
|
@@ -113,7 +113,9 @@ Custom endpoint, credential or transport overrides and unproven models remain
|
|
|
113
113
|
unavailable. There is no model retry, backend replacement or plugin routing UI.
|
|
114
114
|
The native Auto reviewer's qualified Copilot Responses requests omit
|
|
115
115
|
`temperature`; ordinary Chat and native allow/deny/error/cancel behavior remain
|
|
116
|
-
unchanged.
|
|
116
|
+
unchanged. Qualification uses the native adapter's pi-ai catalog even when
|
|
117
|
+
the plugin resolves a separate copy; missing protocol facts remain unavailable.
|
|
118
|
+
See [reviewer compatibility](./docs/auto-review-sampling.md).
|
|
117
119
|
The native route's quota and optional identity display use only the canonical OAuth account. If the
|
|
118
120
|
provider names a credential, endpoint or nonempty headers override, or its configuration
|
|
119
121
|
cannot be verified, quota is shown as unavailable rather than attributed to a
|
package/README.zh.md
CHANGED
|
@@ -55,15 +55,15 @@ node scripts/select-core-release.mjs 0.2.2-rc.3
|
|
|
55
55
|
精确兼容版本发布且通过验证后,在空目录下载原始制品并校验:
|
|
56
56
|
|
|
57
57
|
```sh
|
|
58
|
-
curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
59
|
-
curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
58
|
+
curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.7.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.7.dsh.0.2.2.rc.3.tgz
|
|
59
|
+
curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.7.dsh.0.2.2.rc.3/SHA256SUMS
|
|
60
60
|
sha256sum --check SHA256SUMS
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
例如安装到 `web` profile:
|
|
64
64
|
|
|
65
65
|
```sh
|
|
66
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
66
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.7.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.7.dsh.0.2.2.rc.3.tgz
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
请明确选择目标 profile,然后:
|
|
@@ -91,7 +91,8 @@ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/release
|
|
|
91
91
|
自定义端点、凭据或传输覆盖,以及无法确认的模型,保持不可用。没有自动换模型重试、
|
|
92
92
|
Web 服务替换或旧插件路由 UI。
|
|
93
93
|
原生 Auto reviewer 经确认的 Copilot Responses 审核请求会省略 `temperature`;
|
|
94
|
-
普通聊天和原生 allow/deny/error/cancel
|
|
94
|
+
普通聊天和原生 allow/deny/error/cancel 行为不变。即使插件解析到另一份 pi-ai,
|
|
95
|
+
资格判断也使用原生适配器的目录;无法确认协议时仍不可用。参见
|
|
95
96
|
[审核兼容说明](./docs/auto-review-sampling.md)。
|
|
96
97
|
原生路线的额度和可选身份显示只使用 canonical OAuth 账号;如果 provider 指定了其他凭据、
|
|
97
98
|
端点或非空请求头,或无法确认其配置,则显示额度不可用,不会将其他账号的额度归到原生路线。
|
package/deployment-baseline.json
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.1.0-alpha.
|
|
11
|
+
"version": "0.1.0-alpha.7.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.
|
|
18
|
+
{ "core": "0.2.2-rc.3", "version": "0.1.0-alpha.7.dsh.0.2.2.rc.3", "status": "pending" }
|
|
19
19
|
],
|
|
20
20
|
"evidence": {
|
|
21
21
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
The same reviewer-only policy also covers `github-copilot` when the public
|
|
6
6
|
Loader root, native adapter package callback, configurable-provider directory,
|
|
7
|
-
settings revision and
|
|
8
|
-
route.
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
settings revision and the adapter-owned public pi-ai 1.3.0 catalog prove a
|
|
8
|
+
native Responses route. The adapter and plugin may resolve separate pi-ai copies;
|
|
9
|
+
protocol facts come from the adapter's copy, not an assumed equivalent plugin
|
|
10
|
+
catalog. Missing exports or incomplete metadata leave the enhancement
|
|
11
|
+
unavailable with a diagnostic. It requires `purpose: 'auto-review'` and excludes
|
|
12
|
+
loop-owned requests. Custom credential, endpoint and compatibility overrides
|
|
13
|
+
remain native; unknown models are diagnosed, never assigned a guessed protocol.
|
|
11
14
|
|
|
12
15
|
The auxiliary request is cloned without temperature and prepared through public
|
|
13
16
|
`llm.prepareCall`. Identity and configuration are checked again after awaits,
|
package/lib/client.js
CHANGED
|
@@ -7647,7 +7647,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7647
7647
|
};
|
|
7648
7648
|
//#endregion
|
|
7649
7649
|
//#region package.json
|
|
7650
|
-
var version = "0.1.0-alpha.
|
|
7650
|
+
var version = "0.1.0-alpha.7.dsh.0.2.2.rc.3";
|
|
7651
7651
|
//#endregion
|
|
7652
7652
|
//#region lib/types/diagnostics-client.js
|
|
7653
7653
|
let owner;
|
package/lib/index.js
CHANGED
|
@@ -617,7 +617,7 @@ const result$1 = strictRemoteCodec("dsh-github-copilot#DiagnosticsView", Diagnos
|
|
|
617
617
|
var package_default = {
|
|
618
618
|
name: "dsh-github-copilot",
|
|
619
619
|
description: "Account-aware GitHub Copilot models for DeepSeek Harness through its published native adapter.",
|
|
620
|
-
version: "0.1.0-alpha.
|
|
620
|
+
version: "0.1.0-alpha.7.dsh.0.2.2.rc.3",
|
|
621
621
|
releaseNotes: "CHANGELOG.md",
|
|
622
622
|
publishConfig: {
|
|
623
623
|
"access": "public",
|
|
@@ -11830,6 +11830,12 @@ var preview_route_default = {
|
|
|
11830
11830
|
};
|
|
11831
11831
|
//#endregion
|
|
11832
11832
|
//#region lib/types/native-copilot-access.js
|
|
11833
|
+
var __rewriteRelativeImportExtension$1 = function(path, preserveJsx) {
|
|
11834
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
11835
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
11836
|
+
});
|
|
11837
|
+
return path;
|
|
11838
|
+
};
|
|
11833
11839
|
const NATIVE = "@deepseek-ai/dsh-llm-pi-ai";
|
|
11834
11840
|
const PI = "@earendil-works/pi-ai";
|
|
11835
11841
|
const NATIVE_COPILOT = "github-copilot";
|
|
@@ -11847,9 +11853,9 @@ function customTransport(value) {
|
|
|
11847
11853
|
return field !== void 0 && field !== "" && (!record$1(field) || Object.keys(field).length > 0);
|
|
11848
11854
|
});
|
|
11849
11855
|
}
|
|
11850
|
-
/** Only the
|
|
11851
|
-
function nativeCopilotModels(profile) {
|
|
11852
|
-
if (!record$1(profile) || customTransport(profile)) return void 0;
|
|
11856
|
+
/** Only the adapter's native catalog and its explicit native narrowing are qualified. */
|
|
11857
|
+
function nativeCopilotModels(profile, catalog) {
|
|
11858
|
+
if (!record$1(profile) || customTransport(profile) || !Array.isArray(catalog)) return void 0;
|
|
11853
11859
|
const configured = profile.models;
|
|
11854
11860
|
if (configured !== void 0 && !Array.isArray(configured)) return void 0;
|
|
11855
11861
|
if (Array.isArray(configured) && configured.some((value) => !record$1(value) || customTransport(value))) return void 0;
|
|
@@ -11857,10 +11863,37 @@ function nativeCopilotModels(profile) {
|
|
|
11857
11863
|
const ids = Array.isArray(configured) && configured.length > 0 ? new Set(configured.filter(record$1).map((value) => value.id)) : void 0;
|
|
11858
11864
|
const api = profile.api;
|
|
11859
11865
|
if (api !== void 0 && api !== "" && api !== "openai-responses" && api !== "openai-completions" && api !== "anthropic-messages") return void 0;
|
|
11860
|
-
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
|
|
11866
|
+
const models = /* @__PURE__ */ new Map();
|
|
11867
|
+
for (const model of catalog) {
|
|
11868
|
+
if (!record$1(model) || typeof model.id !== "string" || model.id.length === 0 || model.id !== model.id.trim() || typeof model.api !== "string" || model.api.length === 0 || model.api !== model.api.trim() || models.has(model.id)) return void 0;
|
|
11869
|
+
models.set(model.id, {
|
|
11870
|
+
id: model.id,
|
|
11871
|
+
api: api || model.api
|
|
11872
|
+
});
|
|
11873
|
+
}
|
|
11874
|
+
if (ids !== void 0) {
|
|
11875
|
+
for (const id of models.keys()) if (!ids.has(id)) models.delete(id);
|
|
11876
|
+
}
|
|
11877
|
+
return models;
|
|
11878
|
+
}
|
|
11879
|
+
function nativeCatalogUrl(manifestPath, exports) {
|
|
11880
|
+
if (!record$1(exports)) return void 0;
|
|
11881
|
+
const exact = exports["./providers/all"];
|
|
11882
|
+
const wildcard = exact === void 0;
|
|
11883
|
+
if (wildcard && Object.keys(exports).some((key) => {
|
|
11884
|
+
if (key === "./providers/*") return false;
|
|
11885
|
+
const parts = key.split("*");
|
|
11886
|
+
if (parts.length !== 2) return false;
|
|
11887
|
+
const [prefix = "", suffix = ""] = parts;
|
|
11888
|
+
return "./providers/all".startsWith(prefix) && "./providers/all".endsWith(suffix) && prefix.length + suffix.length <= 15;
|
|
11889
|
+
})) return void 0;
|
|
11890
|
+
const descriptor = wildcard ? exports["./providers/*"] : exact;
|
|
11891
|
+
const target = typeof descriptor === "string" ? descriptor : record$1(descriptor) && Object.keys(descriptor).every((key) => key === "types" || key === "import") && typeof descriptor.import === "string" ? descriptor.import : void 0;
|
|
11892
|
+
if (!target || !/^\.\/(?:[A-Za-z0-9._-]+\/)*[A-Za-z0-9._*-]+\.m?js$/u.test(target) || target.split("/").slice(1).some((part) => part === "." || part === "..")) return void 0;
|
|
11893
|
+
if ([...target].filter((character) => character === "*").length !== (wildcard ? 1 : 0)) return void 0;
|
|
11894
|
+
const base = new URL(".", pathToFileURL(manifestPath));
|
|
11895
|
+
const url = new URL(wildcard ? target.replace("*", "all") : target, base);
|
|
11896
|
+
return url.href.startsWith(base.href) ? url.href : void 0;
|
|
11864
11897
|
}
|
|
11865
11898
|
/**
|
|
11866
11899
|
* Qualify the native Loader root and its exact published pi-ai dependency.
|
|
@@ -11888,14 +11921,36 @@ async function captureNativeCopilot(ctx, diagnose = () => {}) {
|
|
|
11888
11921
|
if (owner?.version !== "0.2.2-rc.3" || owner.manifestPath !== importedOwner?.manifestPath) return unproven("COPILOT_NATIVE_PACKAGE_UNPROVEN");
|
|
11889
11922
|
const nativePi = packages.packageOf(PI, pathToFileURL(owner.manifestPath).href);
|
|
11890
11923
|
const localPi = packages.packageOf(PI, import.meta.url);
|
|
11891
|
-
if (nativePi?.version !== "1.3.0" || localPi?.
|
|
11924
|
+
if (nativePi?.name !== PI || nativePi.version !== "1.3.0" || localPi?.name !== PI || localPi.version !== "1.3.0") return unproven("COPILOT_NATIVE_PI_UNPROVEN");
|
|
11925
|
+
const ownerPath = owner.manifestPath;
|
|
11926
|
+
const nativePiPath = nativePi.manifestPath;
|
|
11927
|
+
const localPiPath = localPi.manifestPath;
|
|
11892
11928
|
const view = () => settings.describe({ redactSecrets: true }).find((value) => value.ns === directory.settingsNs);
|
|
11893
11929
|
const captured = view();
|
|
11894
11930
|
if (!captured || !record$1(captured.value) || !record$1(captured.value.providers)) return unproven("COPILOT_NATIVE_SETTINGS_UNPROVEN");
|
|
11895
|
-
const
|
|
11931
|
+
const catalogUrl = nativeCatalogUrl(nativePiPath, nativePi.manifest.exports);
|
|
11932
|
+
if (!catalogUrl) return unproven("COPILOT_NATIVE_CATALOG_UNAVAILABLE");
|
|
11933
|
+
let catalog;
|
|
11934
|
+
try {
|
|
11935
|
+
const nativeModule = await import(__rewriteRelativeImportExtension$1(
|
|
11936
|
+
/* @vite-ignore */
|
|
11937
|
+
catalogUrl
|
|
11938
|
+
));
|
|
11939
|
+
if (!record$1(nativeModule) || typeof nativeModule.getBuiltinModels !== "function") return unproven("COPILOT_NATIVE_CATALOG_UNAVAILABLE");
|
|
11940
|
+
catalog = nativeModule.getBuiltinModels(NATIVE_COPILOT);
|
|
11941
|
+
} catch {
|
|
11942
|
+
return unproven("COPILOT_NATIVE_CATALOG_UNAVAILABLE");
|
|
11943
|
+
}
|
|
11944
|
+
const models = nativeCopilotModels(captured.value.providers[NATIVE_COPILOT], catalog);
|
|
11896
11945
|
if (!models) return unproven("COPILOT_NATIVE_MODELS_UNPROVEN");
|
|
11897
11946
|
const module = await import("@deepseek-ai/dsh-llm-pi-ai");
|
|
11898
|
-
const current = () =>
|
|
11947
|
+
const current = () => {
|
|
11948
|
+
const nativeOwner = packages.packageOf(NATIVE, base);
|
|
11949
|
+
const importedOwner = packages.packageOf(NATIVE, import.meta.url);
|
|
11950
|
+
const nativeCatalog = packages.packageOf(PI, pathToFileURL(ownerPath).href);
|
|
11951
|
+
const pluginCatalog = packages.packageOf(PI, import.meta.url);
|
|
11952
|
+
return fiber.uid !== null && entry.fiber?.ctx.fiber === fiber && fiber.runtime?.callback === module.apply && entry.options.name === NATIVE && view()?.revision === captured.revision && nativeOwner?.manifestPath === ownerPath && nativeOwner.version === "0.2.2-rc.3" && importedOwner?.manifestPath === ownerPath && importedOwner.version === "0.2.2-rc.3" && nativeCatalog?.manifestPath === nativePiPath && nativeCatalog.version === "1.3.0" && pluginCatalog?.manifestPath === localPiPath && pluginCatalog.version === "1.3.0" && llm.listProviders().some((value) => value.id === "github-copilot");
|
|
11953
|
+
};
|
|
11899
11954
|
if (!current()) return unproven("COPILOT_NATIVE_SNAPSHOT_REVOKED");
|
|
11900
11955
|
return {
|
|
11901
11956
|
models,
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
-
import type { Api, Model } from '@earendil-works/pi-ai';
|
|
3
2
|
export declare const NATIVE_COPILOT = "github-copilot";
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
interface NativeCopilotModel {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly api: string;
|
|
6
|
+
}
|
|
7
|
+
/** Only the adapter's native catalog and its explicit native narrowing are qualified. */
|
|
8
|
+
export declare function nativeCopilotModels(profile: unknown, catalog: unknown): ReadonlyMap<string, NativeCopilotModel> | undefined;
|
|
6
9
|
export interface NativeCopilotSnapshot {
|
|
7
|
-
readonly models: ReadonlyMap<string,
|
|
10
|
+
readonly models: ReadonlyMap<string, NativeCopilotModel>;
|
|
8
11
|
readonly namespace: string;
|
|
9
12
|
assertCurrent(): void;
|
|
10
13
|
}
|
|
@@ -13,4 +16,5 @@ export interface NativeCopilotSnapshot {
|
|
|
13
16
|
* No credential, discovery, settings write or private adapter registry access.
|
|
14
17
|
*/
|
|
15
18
|
export declare function captureNativeCopilot(ctx: Context, diagnose?: (code: string) => void): Promise<NativeCopilotSnapshot | undefined>;
|
|
19
|
+
export {};
|
|
16
20
|
//# sourceMappingURL=native-copilot-access.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.
|
|
4
|
+
"version": "0.1.0-alpha.7.dsh.0.2.2.rc.3",
|
|
5
5
|
"releaseNotes": "CHANGELOG.md",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|