dsh-github-copilot 0.4.0-alpha.21 → 0.4.0-alpha.23
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 +14 -0
- package/README.md +22 -16
- package/README.zh.md +22 -16
- package/deployment-baseline.json +22 -5
- package/docs/agent-readiness.md +1 -0
- package/docs/dual-model.md +9 -0
- package/docs/session-search-routing.md +14 -6
- package/lib/client.js +127 -61
- package/lib/client.js.map +1 -1
- package/lib/index.js +860 -498
- package/lib/remote.js +21 -1
- package/lib/routed-web.js +44 -5
- package/lib/types/dual-model-host.d.ts +3 -2
- package/lib/types/routed-web.d.ts +13 -1
- package/lib/types/search-routing-host.d.ts +19 -0
- package/lib/types/search-routing-policy.d.ts +18 -0
- package/lib/types/search-routing-remote.d.ts +20 -0
- package/lib/types/search-tool-routing.d.ts +22 -0
- package/lib/types/web-search-routing-card.d.ts +2 -1
- package/lib/types/web-search-routing-config.d.ts +3 -7
- package/package.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.23 (prepared)
|
|
4
|
+
|
|
5
|
+
- Fix Model roles loading by exposing the dedicated Host `view`, `save` and `create` methods through the public Typert Remote service, retaining strict validation, CAS and session-creation ownership (#134).
|
|
6
|
+
- Replace Copilot-specific Auto/fixed labels and static provider suggestions with a real registered search-provider catalog shared by the primary and final-fallback selectors (#135).
|
|
7
|
+
- Follow the initiating Chat provider in Auto mode, keep an explicitly selected primary independent of Chat, and attempt at most one distinct final fallback. Preserve legacy settings without automatic writes and keep model choices provider-owned.
|
|
8
|
+
- Capture registration and account continuity before asynchronous work; silently revoked Copilot proof, cancellation, unload or registration replacement cannot authorize a paid fallback.
|
|
9
|
+
- Add real Host Gateway, registration-lifecycle, provider-routing and UI regressions plus an isolated built-component browser fixture. Preserve alpha.21 shared-peer ownership and alpha.22 React Client external declarations; no Core or live-profile changes are included.
|
|
10
|
+
|
|
11
|
+
## 0.4.0-alpha.22 (prepared)
|
|
12
|
+
|
|
13
|
+
- Declare React as the DSH Client ModuleLoader external used by the actual built Client bundle, while removing it from the strict Desktop Node peer graph and retaining it only for development.
|
|
14
|
+
- Extend packed-manifest validation from Host shared-package intersection to every declared required peer and Client external, preserving required authorization/schemastery Host peers.
|
|
15
|
+
- Regress the actual packaged Desktop 0.1.5 startup failure `requires missing react@^18.2.0` without bundling a second React instance or weakening `autoInstallPeers: false` graph validation.
|
|
16
|
+
|
|
3
17
|
## 0.4.0-alpha.21 (prepared)
|
|
4
18
|
|
|
5
19
|
- Move Desktop-owned `@deepseek-ai/dsh-authorization` and `@deepseek-ai/schemastery` from private runtime dependencies to required compatible peers while retaining development copies for standalone build and test verification.
|
package/README.md
CHANGED
|
@@ -46,9 +46,13 @@ The exact `dsh-v0.1.6-alpha.1` source fixture now awaits serialized `agent/creat
|
|
|
46
46
|
|
|
47
47
|
The candidate manifest treats `@deepseek-ai/dsh-authorization` and `@deepseek-ai/schemastery` as required Host peers instead of private runtime dependencies. Development copies remain pinned for standalone build, unit, Host import, Client loader, and Remote codec verification. The packed-tarball gate audits every declared dependency and peer against a hash-pinned actual Desktop 0.1.5 runtime descriptor and the generated Desktop 0.1.6 package-set input; it rejects bundled, optional, incompatible, or newly unaudited shared ownership. The 0.1.6 package-set is authoritative input to descriptor generation but is not a materialized Desktop descriptor, live activation, OAuth, or model-call result. This change preserves the existing Settings → Models provider card, authentication flow, lifecycle adaptation, and image-offload behavior, and does not weaken Desktop validation.
|
|
48
48
|
|
|
49
|
+
### Alpha.22 Client React ownership fix (#132)
|
|
50
|
+
|
|
51
|
+
The built Client intentionally requests React from DSH's browser `ModuleLoader` singleton. React is not a Desktop Host shared package and must not be installed as a required Node profile peer. Alpha.22 declares `dsh.client.external: [\"react\"]`, removes the root React peer, and retains React only as a development dependency. Packed verification now audits every required peer and Client external, confirms the real built Client requests exactly React from the loader, and preserves authorization/schemastery as required Host peers. This fixes the packaged Desktop startup error `requires missing react@^18.2.0` without enabling peer auto-install, bundling another React copy, or weakening Desktop graph validation. Actual packaged Electron loading remains a downstream acceptance gate.
|
|
52
|
+
|
|
49
53
|
## Install and sign in
|
|
50
54
|
|
|
51
|
-
The commands below target the package version `0.4.0-alpha.
|
|
55
|
+
The commands below target the package version `0.4.0-alpha.23`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
|
|
52
56
|
|
|
53
57
|
Before installing/updating, unpack the **checksum-verified** archive into a temporary directory and run its read-only composition preflight (replace all paths with absolute paths for the intended profile):
|
|
54
58
|
|
|
@@ -61,7 +65,7 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
|
|
|
61
65
|
For approved online installation, the supported CLI command is:
|
|
62
66
|
|
|
63
67
|
```sh
|
|
64
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
68
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.23/dsh-github-copilot-0.4.0-alpha.23.tgz
|
|
65
69
|
```
|
|
66
70
|
|
|
67
71
|
If registry access is blocked or unavailable, do not retry it through another network. Desktop-managed profiles may instead use the [controlled offline CLI procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance), with an approved, checksum-verified local Release and existing dependency cache (`--offline --ignore-scripts`). All preflight and approval requirements still apply.
|
|
@@ -126,7 +130,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
|
|
|
126
130
|
5. Confirm **Signed in** and inspect the automatic discovery result before asking the user to choose a model. Already-signed-in Models opening ensures missing/stale metadata automatically; fresh ready cache makes no request. Use visible **Retry** for errors or **Manage → Refresh models** for an intentional forced update, not routine setup. Status alone does not discover, and login, metadata and successful model calls remain separate evidence.
|
|
127
131
|
6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
|
|
128
132
|
|
|
129
|
-
GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. The native Desktop package manager is preferred when permitted registry access is available; after npm publication is verified it accepts `dsh-github-copilot@0.4.0-alpha.
|
|
133
|
+
GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. The native Desktop package manager is preferred when permitted registry access is available; after npm publication is verified it accepts `dsh-github-copilot@0.4.0-alpha.23`, not a URL or file. Desktop-managed profiles also support explicitly approved [controlled offline CLI maintenance](./docs/npm-distribution.md#controlled-offline-cli-maintenance) with a verified local Release and `--offline --ignore-scripts`. Follow the mandatory search-composition preflight, backup, single-writer and post-install checks; do not bypass a corporate registry ban, disable TLS verification or restart without separate approval. Offline installation is not proof that npm networking/publication was repaired. See [distribution and publication requirements](./docs/npm-distribution.md).
|
|
130
134
|
|
|
131
135
|
No `copilot2api` process, external gateway, placeholder API key, pasted GitHub token, or separate `dsh-web-search-provider` installation is required.
|
|
132
136
|
|
|
@@ -145,7 +149,9 @@ DSH Core continues to own model selection, sandboxing, tools, attachments, and o
|
|
|
145
149
|
|
|
146
150
|
Under **Settings → Models → Model roles**, enable dedicated dual-model sessions, select two available account models, save, and choose **Create session with this configuration** for an existing workspace. The planner handles planning and acceptance; `copilot_execute` delegates implementation to a native continuable child with a fixed execution model. Configuration is off by default and affects only sessions created through this entry. It does not change the global default, existing sessions, credentials or the ordinary Subagent model-selection setting.
|
|
147
151
|
|
|
148
|
-
Unavailable models are not substituted. Uncertain creation retries keep the same request identity. The feature requires public role/session/subagent capabilities and is visibly unavailable when they are absent; historical package compatibility is not blanket certification of this optional flow. See [setup, lifecycle, limitations and evidence](./docs/dual-model.md). The feature is included in the `0.4.0-alpha.
|
|
152
|
+
Unavailable models are not substituted. Uncertain creation retries keep the same request identity. The feature requires public role/session/subagent capabilities and is visibly unavailable when they are absent; historical package compatibility is not blanket certification of this optional flow. See [setup, lifecycle, limitations and evidence](./docs/dual-model.md). The feature is included in the `0.4.0-alpha.23` candidate; source and fixture tests are not proof of publication or Desktop activation.
|
|
153
|
+
|
|
154
|
+
If the card says **Could not load model roles**, do not change model defaults to work around it: this is a failed settings load, distinct from unsupported capabilities or unavailable models. In particular, a `githubCopilotDualModel/view` HTTP 404 indicates missing Host Remote exposure, not that the feature is off. See [troubleshooting and verification](./docs/dual-model.md#loading-and-remote-troubleshooting).
|
|
149
155
|
|
|
150
156
|
## Shared account, independent sessions (V3)
|
|
151
157
|
|
|
@@ -224,22 +230,22 @@ The bundle composes a plugin-owned web-service facade while preserving the origi
|
|
|
224
230
|
|
|
225
231
|
A separate **Web search** card under **Settings → Models** controls routing across search backends. On older Core versions without the Models footer, it appears as **Settings → Web search**. The companion owns the namespaced policy (`github-copilot-search-routing`); it does not claim a global Core namespace. Removing the companion restores the original web service.
|
|
226
232
|
|
|
227
|
-
Auto
|
|
233
|
+
The **Search provider** selector offers **Auto — follow Chat** and the actual search providers registered through the routed facade. **Default search provider** uses the same catalog, with an additional **None — no fallback** choice. These are search backends, not individual models: Copilot is one backend even when different account models can execute its search requests.
|
|
228
234
|
|
|
229
|
-
- `github-copilot-search-routing.
|
|
230
|
-
-
|
|
231
|
-
- `
|
|
232
|
-
-
|
|
235
|
+
- `github-copilot-search-routing.searchProvider: auto` follows the initiating Chat provider. Copilot's plugin-owned aliases retain their existing ownership and model-capability checks; other Chat provider IDs must exactly match a registered search provider ID. Names, suffixes and model families are never guessed. This convention does not promise the same model or account across independently registered providers.
|
|
236
|
+
- A concrete `searchProvider` ID pins the primary backend independently of Chat.
|
|
237
|
+
- `defaultSearchProvider` is only the final fallback when no primary matches or the primary search fails. It is attempted at most once, never retried when it is already the primary, and never replaces a successful empty result. `none` disables fallback without disabling the primary.
|
|
238
|
+
- Copilot selected explicitly or as the fallback uses its provider-owned `github-copilot.searchModel`. Other backends own their model configuration, if any. A registered backend is not proof that every model supports search.
|
|
233
239
|
|
|
234
|
-
|
|
240
|
+
Existing `searchMode: auto/fixed` settings remain readable without automatic writes. Legacy fixed mode preserves its old default as the primary; fixed plus `none` stays disabled. An explicit save writes the new independent keys. The UI explains that saving adopts the chosen final fallback, including possible API charges; legacy `github-copilot.searchFallback: none` failure-spending restrictions remain until that choice is saved. Unregistered saved IDs remain visible as unavailable instead of being silently substituted.
|
|
235
241
|
|
|
236
|
-
`github-copilot.routeWebSearch`
|
|
242
|
+
`github-copilot.routeWebSearch: false` still delegates to the original configured web service. Otherwise cancellation, unload and captured account-proof invalidation never authorize a fallback. Generic registered backends must honor cancellation; their public interface does not expose an internal pre-network authorization hook. The historical direct Copilot/DeepSeek path retains its stronger owned pre-dispatch guard. Neither path supplies another provider's credentials from Copilot sign-in.
|
|
237
243
|
|
|
238
|
-
|
|
244
|
+
The catalog contains registrations observed by this facade, not hidden registrations made directly in another realm. Listing it does not call availability checks, model discovery, credentials or search; actual usability is checked for each request. No static list of example providers is presented as installed support. Custom/nonstandard web compositions still require review. Fetch is unchanged. See [implementation and evidence limits](docs/session-search-routing.md).
|
|
239
245
|
|
|
240
246
|
Requests go directly to the credential-resolved HTTPS Copilot endpoint after strict host validation: GitHub-hosted `api.*.githubcopilot.com`, or `copilot-api.<signed-in-enterprise-domain>` for an accepted GitHub Enterprise credential. No external gateway receives the credential.
|
|
241
247
|
|
|
242
|
-
By default (`probe: true`), search fails closed unless the selected route is canonical `github-copilot` or the plugin-owned `github-copilot-preview`, the account authorizes the model, its verified protocol supports native search, and a bounded capability probe succeeds. Managed-model conversations always use their native adapter; independent Responses `ctx.web` search uses account-bound authorization without the old static-catalog ID restriction. Setting `probe: false` bypasses only capability proof and trusts the selected native protocol; route, account, protocol, endpoint, and authentication checks remain active. The underlying hosted-search provider does not itself fall back. The
|
|
248
|
+
By default (`probe: true`), search fails closed unless the selected route is canonical `github-copilot` or the plugin-owned `github-copilot-preview`, the account authorizes the model, its verified protocol supports native search, and a bounded capability probe succeeds. Managed-model conversations always use their native adapter; independent Responses `ctx.web` search uses account-bound authorization without the old static-catalog ID restriction. Setting `probe: false` bypasses only capability proof and trusts the selected native protocol; route, account, protocol, endpoint, and authentication checks remain active. The underlying hosted-search provider does not itself fall back. The routed facade may apply the explicitly selected final fallback for eligible failures; aborts and invalidated owner/account proofs remain terminal. Requests containing any Core file block—including files nested in tool-result content—also fail closed to `next()`, preserving Core's file projection instead of letting the hosted-search serializer drop that context.
|
|
243
249
|
|
|
244
250
|
Search proof is lazy: attach, settings updates and `credentials/record-updated` for `llm-pi-ai/github-copilot` only invalidate cached plans, without starting network work. The next actual eligible request proves capability again; unrelated credentials are ignored and event bursts do not trigger repeated eager probes. In-flight proofs are cancelled on invalidation/disposal. If credentials change during proof or final auth resolution, the current request fails closed rather than applying account A's proof to account B. Submit a new request after the update; there is no automatic retry loop or implicit `probe: false` fallback.
|
|
245
251
|
|
|
@@ -368,8 +374,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
|
|
|
368
374
|
`package.json` declares public npm distribution. A release tag must equal `v${package.json.version}`. Versions use standard SemVer prerelease labels (`alpha`, `beta`, or `rc`), each with its matching npm dist-tag; only stable versions use `latest`. The Release workflow performs the frozen install and complete verification gate, packs once (or recovers the original archive on retry), verifies `SHA256SUMS`, publishes the immutable GitHub Release and then publishes those same bytes to npm through OIDC. Either channel failing means delivery is incomplete. First package creation needs an authorized maintainer; staging requires an existing package and is not a first-package bootstrap. Historical releases are not republished.
|
|
369
375
|
|
|
370
376
|
```sh
|
|
371
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
372
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
377
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.23/dsh-github-copilot-0.4.0-alpha.23.tgz
|
|
378
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.23/SHA256SUMS
|
|
373
379
|
sha256sum --check SHA256SUMS
|
|
374
380
|
```
|
|
375
381
|
|
|
@@ -377,7 +383,7 @@ PowerShell can verify the same two downloaded files with:
|
|
|
377
383
|
|
|
378
384
|
```powershell
|
|
379
385
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
380
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
386
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.23.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
381
387
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
382
388
|
```
|
|
383
389
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
一个聚焦 GitHub Copilot 登录、通用账号模型发现、Copilot 专用 Tool 兼容与供应方托管搜索的 DSH companion。插件根据供应方返回的端点和能力元数据组装模型,复用公开的 `@deepseek-ai/dsh-llm-pi-ai` adapter 与 pi-ai SDK,不另写一套通用传输/序列化器,也不维护需要逐个添加新模型 ID 的静态目录。
|
|
11
11
|
|
|
12
|
-
> 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.
|
|
12
|
+
> 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.23`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
|
|
13
13
|
|
|
14
14
|
## 已测试基线
|
|
15
15
|
|
|
@@ -48,6 +48,10 @@ bundle 通过插件自有的 Models 页策略分流搜索:`auto` 优先合格
|
|
|
48
48
|
|
|
49
49
|
Candidate manifest 将 `@deepseek-ai/dsh-authorization` 与 `@deepseek-ai/schemastery` 声明为必需 Host peer,不再作为插件私有 runtime dependency。开发环境仍保留固定依赖,用于 standalone build、单元测试、Host import、Client loader 与 Remote codec 验证。真实 packed-tarball gate 会将全部 dependency/peer 与 hash 固定的 Desktop 0.1.5 实际 runtime descriptor、Desktop 0.1.6 生成 package-set 输入逐项审计,并拒绝打包 Host 共享包、把必需 peer 标为 optional、版本不兼容或新增但未审计的依赖。0.1.6 package-set 是 descriptor 生成的权威输入,但不是已经物化的 Desktop descriptor、live 激活、OAuth 或模型调用证据。本修复保留现有 Settings → Models provider card、认证入口、生命周期适配与图片卸载行为,也不弱化 Desktop validator。
|
|
50
50
|
|
|
51
|
+
### Alpha.22 Client React 所有权修复(#132)
|
|
52
|
+
|
|
53
|
+
实际 built Client 会从 DSH 浏览器 `ModuleLoader` singleton 请求 React。React 不是 Desktop Host shared package,也不应作为 Node profile 的必需 peer 安装。Alpha.22 声明 `dsh.client.external: [\"react\"]`,移除 root React peer,仅在开发依赖中保留 React。Packed verification 现在覆盖全部 required peer 与 Client external,确认真实 built Client 只向 loader 请求 React,并继续要求 authorization/schemastery 使用 Host peer。该修复解决 packaged Desktop 启动错误 `requires missing react@^18.2.0`,不启用 peer 自动安装、不打包第二份 React,也不弱化 Desktop graph validator。实际 packaged Electron 加载仍由下游验收 gate 证明。
|
|
54
|
+
|
|
51
55
|
## 安装与登录
|
|
52
56
|
|
|
53
57
|
将当前 release 安装到你实际使用的 profile(其它 profile 请替换 `web`):
|
|
@@ -63,7 +67,7 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
63
67
|
获准且网络可用时,可通过受支持的 CLI 命令安装:
|
|
64
68
|
|
|
65
69
|
```sh
|
|
66
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
70
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.23/dsh-github-copilot-0.4.0-alpha.23.tgz
|
|
67
71
|
```
|
|
68
72
|
|
|
69
73
|
若 registry 被公司封禁或不可用,不要更换网络绕行。Desktop 管理的 profile 可以改用[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance):使用来源获准、校验通过的本地 Release 和已有依赖缓存(`--offline --ignore-scripts`)。预检、备份和授权要求仍然适用。
|
|
@@ -128,7 +132,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
|
|
|
128
132
|
5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
|
|
129
133
|
6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
|
|
130
134
|
|
|
131
|
-
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。在获准且可用的 registry 网络环境中,优先使用原生 Desktop 包管理器;确认 npm 发布后,它接受 `dsh-github-copilot@0.4.0-alpha.
|
|
135
|
+
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。在获准且可用的 registry 网络环境中,优先使用原生 Desktop 包管理器;确认 npm 发布后,它接受 `dsh-github-copilot@0.4.0-alpha.23`,不是 URL 或本地文件。Desktop 管理的 profile 也允许经明确授权的[受控离线 CLI 维护](./docs/npm-distribution.md#controlled-offline-cli-maintenance):使用已验证的本地 Release 和 `--offline --ignore-scripts`,执行必需的组合预检、私密元数据备份、单写入者控制及安装后差异核验。缓存不足或出现权限拒绝时停止,不绕过公司 registry 封禁,不关闭 TLS 校验;重启仍需单独授权。离线安装成功不表示 npm 联网或发布问题已修好。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
|
|
132
136
|
|
|
133
137
|
不需要运行 `copilot2api`,不需要外部 gateway、placeholder API key、原始 GitHub token 或单独安装 `dsh-web-search-provider`。
|
|
134
138
|
|
|
@@ -149,7 +153,9 @@ DSH Core 继续负责模型选择、sandbox、工具、附件与其它 provider
|
|
|
149
153
|
|
|
150
154
|
在 **设置 → 模型 → 模型分工** 中启用双模型会话,选择账号下可用的主模型和执行模型,保存后选工作区,再点 **用此配置新建会话**。主模型负责规划与验收;`copilot_execute` 创建原生可继续执行的子代理,并固定其执行模型。默认关闭,仅专用入口创建的新会话采用此策略;不修改全局默认、已有会话、登录凭据或原生 Subagent 授权开关。
|
|
151
155
|
|
|
152
|
-
模型不可用时明确报错,不自动替换。创建结果不明时重试同一个请求,不为绕过未知结果另建会话。功能依赖公开的会话、策略和子代理能力;缺少接口时显示不可用,不把历史版本的包兼容范围当成此功能的全面验收。详见[配置、生命周期、限制与验证范围](./docs/dual-model.md)。本功能包含在 `0.4.0-alpha.
|
|
156
|
+
模型不可用时明确报错,不自动替换。创建结果不明时重试同一个请求,不为绕过未知结果另建会话。功能依赖公开的会话、策略和子代理能力;缺少接口时显示不可用,不把历史版本的包兼容范围当成此功能的全面验收。详见[配置、生命周期、限制与验证范围](./docs/dual-model.md)。本功能包含在 `0.4.0-alpha.23` candidate 中,源码和合成测试不代表已发布或当前 Desktop 已生效。
|
|
157
|
+
|
|
158
|
+
若卡片显示 **Could not load model roles(无法加载模型分工)**,不要通过修改默认模型绕过:这是设置加载失败,与能力不支持或模型不可用不同。尤其 `githubCopilotDualModel/view` 返回 HTTP 404,表示 Host Remote 未暴露,并非功能开关处于关闭状态。详见[加载故障排查与验证](./docs/dual-model.md#loading-and-remote-troubleshooting)。
|
|
153
159
|
|
|
154
160
|
## 全局账号,多模型与独立会话(V3)
|
|
155
161
|
|
|
@@ -232,22 +238,22 @@ Grant 写入或复用前,Host normalizer 只会把 pi-ai 文档化的 `type`
|
|
|
232
238
|
|
|
233
239
|
**设置 → 模型**下新增独立的 **Web search** 卡片;旧版 Core 没有 Models footer 时,使用独立的 **设置 → Web search** 分区。策略由本插件的 `github-copilot-search-routing` 命名空间持有,不占用 Core 通用命名空间;卸载本插件后恢复原 web 服务。
|
|
234
240
|
|
|
235
|
-
|
|
241
|
+
**Search provider** 主选择器提供 **Auto — follow Chat** 和通过路由外观层实际注册的搜索 Provider;**Default search provider** 使用同一目录,额外提供 **None — no fallback**。选择项代表搜索后端,不代表单个模型:即使多个账号模型可以执行搜索,Copilot 仍然只有一个搜索后端。
|
|
236
242
|
|
|
237
|
-
- `github-copilot-search-routing.
|
|
238
|
-
-
|
|
239
|
-
- `
|
|
240
|
-
-
|
|
243
|
+
- `github-copilot-search-routing.searchProvider: auto` 跟随发起 Chat 的 Provider。本插件自有 Copilot 别名保留既有 owner 和模型能力检查;其他 Chat Provider 的原始 ID 必须精确匹配已注册的搜索 Provider ID,不猜名字、后缀或模型家族。这是路由约定,不承诺独立注册的后端一定使用相同模型或账号。
|
|
244
|
+
- 将 `searchProvider` 设为具体 ID,就固定主搜索后端,不再随 Chat 改变。
|
|
245
|
+
- `defaultSearchProvider` 仅在无匹配主后端或主搜索失败时作最终兜底,最多尝试一次;与主后端相同时不重试,成功但结果为空也不触发兜底。`none` 仅关闭兜底,不关闭主搜索。
|
|
246
|
+
- 显式选择 Copilot 或将它作为兜底时,使用 Provider 自有的 `github-copilot.searchModel`。其他后端自行管理模型配置(若有);后端已注册不代表其每个模型都支持搜索。
|
|
241
247
|
|
|
242
|
-
`auto`
|
|
248
|
+
旧 `searchMode: auto/fixed` 配置继续兼容读取,不自动写入。旧 fixed 保留原 default 作为主后端;fixed 加 `none` 继续禁用。用户明确保存后才写入新的独立配置键。界面会说明保存将采用选中的最终兜底并可能产生 API 费用;旧的 `github-copilot.searchFallback: none` 失败兜底付费限制保留到明确保存新选择为止。已保存但未注册的 ID 保持显示为不可用,不静默替换。
|
|
243
249
|
|
|
244
|
-
`github-copilot.routeWebSearch
|
|
250
|
+
`github-copilot.routeWebSearch: false` 仍委托原始 web 服务。其余情况下,取消、卸载及捕获的账号证明失效都不能触发兜底。通用注册后端必须遵守取消信号,但公开接口没有提供其内部鉴权后、网络发送前的检查钩子;历史 Copilot/DeepSeek 直调路径保留更强的自有发送前保护。两条路径都不会用 Copilot 登录替其他 Provider 提供凭据。
|
|
245
251
|
|
|
246
|
-
|
|
252
|
+
目录只包含本路由外观层观察到的注册,不包含直接在其他作用域注册的隐藏后端。列目录不做可用性探测、模型发现、凭据读取或搜索;实际调用时再检查可用性,不再把写死的示例列表当成已安装支持。非标准 web 组合仍需审查,网页抓取不变。详见[实现与验收范围](docs/session-search-routing.md)。
|
|
247
253
|
|
|
248
254
|
请求经过严格 Host 校验后,直接发往 credential 解析出的 HTTPS Copilot endpoint:GitHub-hosted `api.*.githubcopilot.com`,或已接受 GitHub Enterprise credential 对应的 `copilot-api.<signed-in-enterprise-domain>`。Credential 不会经过外部 gateway。
|
|
249
255
|
|
|
250
|
-
默认 `probe: true` 时,搜索 fail closed:当前 route 必须是 canonical Copilot 或本插件拥有的托管账号路由,账号必须允许该模型,所选协议必须支持对应搜索表面,且 bounded capability probe 必须成功。托管模型还必须有当前账号的有效发现证据,不能拿另一个 pi 副本的静态条目代替。显式设置 `probe: false` 只会跳过 capability proof,并信任所选原生协议;route、account、protocol、endpoint 与 authentication 检查仍然生效。底层 hosted-search provider
|
|
256
|
+
默认 `probe: true` 时,搜索 fail closed:当前 route 必须是 canonical Copilot 或本插件拥有的托管账号路由,账号必须允许该模型,所选协议必须支持对应搜索表面,且 bounded capability probe 必须成功。托管模型还必须有当前账号的有效发现证据,不能拿另一个 pi 副本的静态条目代替。显式设置 `probe: false` 只会跳过 capability proof,并信任所选原生协议;route、account、protocol、endpoint 与 authentication 检查仍然生效。底层 hosted-search provider 自身不执行回退;路由外观层可对符合条件的失败使用显式选择的最终兜底后端,但取消和 owner/账号证明失效仍立即终止。请求只要包含任意 Core file block(包括嵌套在 tool-result content 内的文件),也会 fail closed 到 `next()`,由 Core 保留文件投影,避免 hosted-search serializer 静默丢弃文件上下文。
|
|
251
257
|
|
|
252
258
|
搜索 proof 采用惰性验证:attach、settings 更新以及 `llm-pi-ai/github-copilot` 的 `credentials/record-updated` 事件只使缓存计划失效,不启动网络工作。下一次真实且符合条件的请求才重新验证;忽略无关凭据更新,连续事件不会引发重复的提前 probe。失效或卸载会取消正在执行的 proof。如果凭据在 proof 或最终认证解析期间改变,当前请求会 fail closed,避免把账号 A 的 proof 用于账号 B。更新后可重新提交请求;不会自动循环重试,也不会隐式使用 `probe: false`。
|
|
253
259
|
|
|
@@ -379,8 +385,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
|
|
|
379
385
|
`package.json` 声明公开 npm 分发。Release tag 必须严格等于 `v${package.json.version}`。预发布使用 `alpha`、`beta` 或 `rc` 及对应 npm dist-tag,只有稳定版使用 `latest`。Release workflow 执行 frozen install 和完整门禁,只打包一次(重试恢复原始归档),验证 `SHA256SUMS`,发布不可变 GitHub Release,再通过 OIDC 将同一份字节发布到 npm。任一渠道失败都表示交付未完成。首次建包须由获准环境中的维护者完成;staging 要求包已存在,不能代替首次建包。不会批量补发历史版本。
|
|
380
386
|
|
|
381
387
|
```sh
|
|
382
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
383
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
388
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.23/dsh-github-copilot-0.4.0-alpha.23.tgz
|
|
389
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.23/SHA256SUMS
|
|
384
390
|
sha256sum --check SHA256SUMS
|
|
385
391
|
```
|
|
386
392
|
|
|
@@ -388,7 +394,7 @@ PowerShell 可以对已下载的同一组文件执行:
|
|
|
388
394
|
|
|
389
395
|
```powershell
|
|
390
396
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
391
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
397
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.23.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
392
398
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
393
399
|
```
|
|
394
400
|
|
package/deployment-baseline.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.4.0-alpha.
|
|
11
|
+
"version": "0.4.0-alpha.23"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -175,6 +175,13 @@
|
|
|
175
175
|
"@deepseek-ai/dsh-authorization": "0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.3-alpha.1 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1",
|
|
176
176
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
177
177
|
},
|
|
178
|
+
"clientExternals": {
|
|
179
|
+
"react": {
|
|
180
|
+
"range": "^18.2.0",
|
|
181
|
+
"owner": "dsh-client-module-static-singleton",
|
|
182
|
+
"nodeGraph": false
|
|
183
|
+
}
|
|
184
|
+
},
|
|
178
185
|
"desktopSharedPackageContracts": [
|
|
179
186
|
{
|
|
180
187
|
"id": "desktop-0.1.5-rc.2-installed-runtime",
|
|
@@ -193,15 +200,18 @@
|
|
|
193
200
|
{
|
|
194
201
|
"id": "desktop-shared-package-ownership",
|
|
195
202
|
"required": true,
|
|
196
|
-
"evidenceScope": "packed-manifest-against-actual-0.1.5-and-generated-0.1.6-
|
|
203
|
+
"evidenceScope": "packed-manifest-required-peer-and-client-external-closure-against-actual-0.1.5-and-generated-0.1.6-contracts",
|
|
197
204
|
"sourceMarkers": [
|
|
198
205
|
{"file": "scripts/verify-desktop-package-graph.mjs", "marker": "verifyDesktopPackageGraph"},
|
|
199
206
|
{"file": "scripts/verify-tarball.mjs", "marker": "desktopSharedGraphs"},
|
|
200
|
-
{"file": "tests/fixtures/desktop-shared-package-contracts.json", "marker": "desktop-0.1.6-alpha.1-generated-package-set"}
|
|
207
|
+
{"file": "tests/fixtures/desktop-shared-package-contracts.json", "marker": "desktop-0.1.6-alpha.1-generated-package-set"},
|
|
208
|
+
{"file": "tsdown.config.ts", "marker": "const externals = new Set(['react'])"},
|
|
209
|
+
{"file": "package.json", "marker": "\"external\": ["}
|
|
201
210
|
],
|
|
202
211
|
"tests": [
|
|
203
212
|
{"file": "tests/scripts/desktop-package-graph.test.mjs", "name": "packed manifest composes with the actual 0.1.5 and generated 0.1.6 Desktop shared graphs"},
|
|
204
|
-
{"file": "tests/scripts/desktop-package-graph.test.mjs", "name": "shared graph gate rejects bundled, optional, incompatible, or unaudited host ownership"}
|
|
213
|
+
{"file": "tests/scripts/desktop-package-graph.test.mjs", "name": "shared graph gate rejects bundled, optional, incompatible, or unaudited host ownership"},
|
|
214
|
+
{"file": "tests/scripts/desktop-package-graph.test.mjs", "name": "client externals stay outside the strict Node peer graph"}
|
|
205
215
|
]
|
|
206
216
|
},
|
|
207
217
|
{
|
|
@@ -224,8 +234,12 @@
|
|
|
224
234
|
{
|
|
225
235
|
"id": "session-model-search-routing",
|
|
226
236
|
"required": true,
|
|
227
|
-
"evidenceScope": "development-real-consumer-and-
|
|
237
|
+
"evidenceScope": "development-real-consumer-loader-gateway-and-ui-synthetic",
|
|
228
238
|
"sourceMarkers": [
|
|
239
|
+
{"file": "src/search-routing-host.ts", "marker": "extends TypertRemoteService"},
|
|
240
|
+
{"file": "src/search-routing-remote.ts", "marker": "githubCopilotSearchRouting.providers"},
|
|
241
|
+
{"file": "src/search-routing-policy.ts", "marker": "normalizeWebSearchRouting"},
|
|
242
|
+
{"file": "src/search-tool-routing.ts", "marker": "routeSearchTools"},
|
|
229
243
|
{"file": "src/routed-web.ts", "marker": "extends WebRuntime"},
|
|
230
244
|
{"file": "src/index.ts", "marker": "ctx.provide('githubCopilotSearchRouter'"},
|
|
231
245
|
{"file": "src/web-search-routing-config.ts", "marker": "WEB_SEARCH_ROUTING_SETTINGS_NAMESPACE"},
|
|
@@ -233,6 +247,9 @@
|
|
|
233
247
|
{"file": "cordis.patch.yml", "marker": "web: github-copilot-original-web"}
|
|
234
248
|
],
|
|
235
249
|
"tests": [
|
|
250
|
+
{"file": "tests/search-provider-catalog.spec.ts", "name": "lists only actual facade registrations without availability checks, auth or search"},
|
|
251
|
+
{"file": "tests/scripts/search-provider-gateway.test.mjs", "name": "search catalog Remote reaches actual facade registrations and unloads cleanly"},
|
|
252
|
+
{"file": "tests/web-search-routing-card.spec.ts", "name": "loads one actual provider catalog into both selectors without Copilot-specific Auto labels"},
|
|
236
253
|
{"file": "tests/routed-web.spec.ts", "name": "keeps the configured provider for DeepSeek and all other model routes"},
|
|
237
254
|
{"file": "tests/routed-web.spec.ts", "name": "dispatches a router-selected provider by exact registered id"},
|
|
238
255
|
{"file": "tests/routed-web.spec.ts", "name": "retains pre-execute denial and the surrounding execution middleware"},
|
package/docs/agent-readiness.md
CHANGED
|
@@ -21,6 +21,7 @@ The existing project already has useful architecture boundaries, strict Remote c
|
|
|
21
21
|
| Build evidence | verify:package checked Host existence, then claimed built Host verified | Import real built Host without the Vitest Typert alias; assert exported contract and label the evidence as import-only |
|
|
22
22
|
| Archive delivery | Pack/checksum did not check actual exported files or README media; images were omitted | `verify:tarball` inspects bounded tar data without extraction; rejects paths/links/duplicates/unexpected files/trailing payload; compares the full normalized manifest and every packed file to the checkout/build; checks exports and README media; CI/release run it after packing |
|
|
23
23
|
| Desktop shared-package ownership | Alpha.18-alpha.20 tarballs privately declared Host-owned authorization and schema packages, so native Desktop profile validation rejected the graph | Alpha.21 makes both required peers with development-only copies; the packed-manifest gate audits every runtime/peer declaration against hash-pinned 0.1.5 actual descriptor and 0.1.6 generated package-set projections |
|
|
24
|
+
| Client external ownership | Alpha.21 left React as a required nonshared Node peer, so packaged Desktop with `autoInstallPeers: false` stopped before receipts/state | Alpha.22 declares `dsh.client.external: [\"react\"]`, removes the root React peer, retains a dev copy, and verifies the actual built Client requests exactly the shell-owned React singleton |
|
|
24
25
|
| External verifier safety | Fixed fixture path could overwrite then delete a pre-existing upstream file | Exclusive create, pinned clean tracked sources, physical-path containment, identity/byte-guarded cleanup and bounded child; twelve synthetic failure/sentinel tests including a Windows junction |
|
|
25
26
|
| Release prerequisite | Tag workflow could run independently of complete platform/Core matrix | Reuse CI through workflow_call; publish job needs matrix success on tag revision; contract verifier checks the dependency |
|
|
26
27
|
| Session model correctness | Inline preflight checked provider but plan sends default-route candidate.model | Historical guard matched provider AND model and delegated mismatches; alpha.8 replaces default-derived planning with initiating-owner/request identity (see #99 below) |
|
package/docs/dual-model.md
CHANGED
|
@@ -30,6 +30,14 @@ The browser generates a request UUID and keeps the original workspace and settin
|
|
|
30
30
|
|
|
31
31
|
After a confirmed save conflict, reload settings and review the current configuration. During an uncertain creation the original input is held until confirmation. Reloading the whole browser can lose its in-memory pending receipt; inspect the session list before issuing a fresh creation request. The same supplied request UUID remains idempotent on the Host across process restart.
|
|
32
32
|
|
|
33
|
+
## Loading and Remote troubleshooting
|
|
34
|
+
|
|
35
|
+
**Could not load model roles** is a failed Remote load, not an instruction to change global model defaults. A `githubCopilotDualModel/view` HTTP 404 means the Host did not expose the endpoint; Client descriptors alone cannot register Host methods. The Host uses the public `TypertRemoteService` binding and marks only `view`, `save` and `create` with `@Remote`. A source fix does not change an already running installation.
|
|
36
|
+
|
|
37
|
+
A successful view can still report `DUAL_MODEL_UNSUPPORTED` when optional public capabilities are missing. An off configuration alone does not disable the model selectors. Read-only settings, a missing revision, pending operations, unavailable models and unavailable workspaces retain their existing gates. Reload after an ordinary transient failure; do not repeatedly save or create sessions to diagnose an endpoint failure.
|
|
38
|
+
|
|
39
|
+
Loading a supported view performs non-forcing account discovery and may use the existing OAuth refresh/network lifecycle. It is not guaranteed to be a credential- or network-side-effect-free probe. Regression tests use isolated synthetic services instead of the live profile.
|
|
40
|
+
|
|
33
41
|
## UI verification captures
|
|
34
42
|
|
|
35
43
|
These are the actual built component with **synthetic** account/workspace responses, not the production Desktop. [Capture provenance and artifact hashes](./images/dual-model-provenance.json) identify the exact evidence.
|
|
@@ -49,6 +57,7 @@ Regression evidence is separated deliberately:
|
|
|
49
57
|
- `dual-model-card.spec.ts`: real React DOM/jsdom interaction, bilingual copy, CAS, unavailable models, stale responses and uncertain-create receipt handling.
|
|
50
58
|
- `dual-model-ui.spec.ts`: optional Slot registration, fallback and cleanup.
|
|
51
59
|
- `dual-model-remote.spec.ts` / `dual-model-gateway.spec.ts`: strict owned codecs and the actual installed Client Gateway with synthetic RPC. Older Client Gateways do not sanitize successful values or arbitrary nested error details; the Host builds bounded DTOs, and the UI renders only its diagnostic allowlist.
|
|
60
|
+
- `tests/scripts/dual-model-host-gateway.test.mjs`: postbuild Node tests drive the real public Host Connection Fetch handler and Gateway, bypassing Vitest's protocol stub. They cover endpoint exposure, unsupported capabilities, domain input validation, private-method refusal, disposal, and synthetic model/workspace view plus CAS save. SRC JSON fallback does not inherit the Client's strict descriptors; Host validation rejects malformed nested inputs.
|
|
52
61
|
- `dual-model-host.spec.ts`: actual Core Session/projection/scope/tool primitives combined with synthetic Agent, model, persistence and workspace edges. This is not a paid live model run or a full installed Desktop certification.
|
|
53
62
|
- `tests/browser/serve-dual-model.mjs`: serves the actual built Client component on a separate loopback fixture using synthetic account/workspace responses. Run after `pnpm build`; the printed URL is explicitly **not** the production DSH GUI.
|
|
54
63
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Provider-aware web search routing
|
|
1
|
+
# Provider-aware web search routing
|
|
2
2
|
|
|
3
3
|
## Requested behavior
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Issue #135 separates the primary search provider from the final fallback. `github-copilot-search-routing.searchProvider` is `auto` or an exact registered search-provider ID; `defaultSearchProvider` is an independent ID or `none`. Auto follows the initiating Chat provider, never the global default. Copilot's owned aliases retain their existing account/model checks; other Chat IDs must exactly match an observed search registration, without name/suffix/model-family inference. This is a provider-level convention, not a promise of the same execution model or account across independent registries. GPT, Gemini and Grok models do not each become a separate Copilot search provider. Explicit/fallback Copilot uses its provider-owned `github-copilot.searchModel`.
|
|
6
6
|
|
|
7
7
|
All implementation belongs to this plugin. No Core source, deployed Core artifact, prototype, private registry, credential copy or global chat-model choice is modified. The original official WebRuntime configuration, including its selected search/fetch providers, is preserved. The routed facade mirrors public search-provider registrations so exact-id selection works for official and community providers without reading Core's private registry.
|
|
8
8
|
|
|
@@ -20,13 +20,21 @@ This is a plugin-owned subclass and explicit public service composition, not a r
|
|
|
20
20
|
|
|
21
21
|
## Routing and fallback
|
|
22
22
|
|
|
23
|
-
`src/search-routing.ts`
|
|
23
|
+
`src/search-tool-routing.ts` executes an operation-local primary and at most one distinct final fallback. A primary success, including zero sources, ends routing. Failure never retries the same provider as its own fallback, recurses or adds an original-Web hidden third tier. Caller/owner/policy cancellation, facade disposal, captured registration replacement and account-proof invalidation stop the operation rather than authorizing another paid attempt. Generic providers own their internals and must honor the supplied cancellation signal.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
The facade captures registered implementations, not merely IDs that could point to a replacement after an await. The main router resolves Auto from captured initiating-session provider leaves; a fixed selection is not overridden by Copilot inline search or prompt guidance. Copilot's special native/configured paths require its own registered implementation and existing ownership checks, never a third party that happens to register the same ID.
|
|
26
26
|
|
|
27
|
-
Fallback notices
|
|
27
|
+
Fallback notices remain inside canonical `WebSearchResult.content`, so Core result projection and query merging retain them. They identify the actual registered backend and possible charges, without copying arbitrary exception messages. Generic backends have no public endpoint/model provenance contract; those fields must not be guessed from the Chat model. Provider-owned safe content can include more precise provenance.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Legacy direct callers without the facade capture seam keep the historical `src/search-routing.ts` Copilot/DeepSeek path only for legacy policy. Its `src/deepseek-search-fallback.ts` constructs the unchanged public official adapter and retains its safe URL validation, exact option snapshot, credential ownership and post-auth/pre-fetch guard. The new catalog-based path instead calls the actual registered backend; an identical ID does not authorize replacing it with that factory. Generic `search()` exposes no internal authentication/pre-network hook, so do not claim the stronger legacy guard for arbitrary third-party implementations.
|
|
30
|
+
|
|
31
|
+
`src/search-routing-policy.ts` normalizes settings without writes: a new explicit `searchProvider` wins; old auto remains Auto; old fixed preserves its default as primary; old fixed plus `none` stays disabled. Unknown saved IDs remain visible and fail closed at dispatch. Until an explicit UI save adopts the new fallback choice, legacy `searchFallback: none` preserves its failure-spending restriction. The save writes primary and default independently in the existing namespace with CAS. Copilot model configuration remains a separate namespace; a partial model save retains its new revision and reports the unconfirmed routing save. `routeWebSearch: false`, the master enable switch, Copilot allowlists and capability proof keep their existing responsibilities.
|
|
32
|
+
|
|
33
|
+
## Search directory and settings UI
|
|
34
|
+
|
|
35
|
+
Both selectors use `githubCopilotSearchRouting.providers()`, a separate strict Remote exposed through the public `TypertRemoteService` binding. Its catalog contains only fresh IDs from registrations observed by this facade, not Core private registry objects or hidden/direct-original registrations. The read invokes no `available()`, auth, discovery or search: availability is contextual and checked on actual use. A missing facade yields `supported: false`, not a static example list. Newly registered IDs appear on reload; removed saved entries remain visibly unavailable. Primary adds Auto; default adds None. Models are provider-specific configuration, not additional search-provider entries.
|
|
36
|
+
|
|
37
|
+
Focused postbuild checks must run after `pnpm build`. `tests/search-provider-catalog.spec.ts` checks registration lifecycle, duplicate handling and read purity; `tests/scripts/search-provider-gateway.test.mjs` drives the real Connection Fetch/Gateway against the packaged facade and emitted Remote controller. `tests/web-search-routing-card.spec.ts` covers both selectors, unavailable catalogs, narrow CAS, legacy choices, stale generations and partial saves. These fixtures are not live account, installed Desktop or paid model evidence.
|
|
30
38
|
|
|
31
39
|
## Review hardening
|
|
32
40
|
|