dsh-github-copilot 0.4.0-alpha.87 → 0.4.0-alpha.91

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.
@@ -1,198 +1,149 @@
1
- # Default dual distribution
1
+ # Distribution and installation
2
2
 
3
- Refs #43. This change supersedes the original Release-only distribution decision
4
- at the user's request; that closed issue did not originally request npm.
5
-
6
- Every new version is distributed through both an immutable GitHub Release and
7
- the public npm registry. The name `dsh-github-copilot` remains provisional until
8
- an authorized maintainer verifies availability or ownership. Never publish an
9
- empty placeholder package, reuse historical alpha.17, change immutable assets,
10
- or describe a local archive as a published package.
3
+ Every new version is distributed through an immutable GitHub Release and public
4
+ npm, using the **same original verified tarball**. Package bootstrap is complete;
5
+ subsequent publication uses the configured OIDC Trusted Publisher. Earlier
6
+ Release-only policy and one-time bootstrap tooling are historical.
11
7
 
12
8
  ## Authorization and readiness
13
9
 
14
- Use only organizationally approved registry access and build environments.
10
+ Use approved registry access and build environments.
15
11
  A blocked corporate registry is not authorization to use a VPN, proxy, mirror,
16
- personal device or GitHub Actions as a bypass. Obtain the applicable approval
17
- before any registry traffic or publication. Local tests use synthetic registry
18
- responses; they do not establish registry connectivity, ownership or live
19
- Desktop compatibility.
20
-
21
- Before the first release, confirm the package name and the maintainer's write
22
- access, public repository visibility, 2FA, approved publication environment, and
23
- the next unused version in both registries. Only then merge the prepared version
24
- through the normal reviewed PR path. Version changes include package.json,
25
- deployment-baseline.json and both README URLs; `publishConfig.tag` must agree
26
- with the channel. Do not silently rename a taken package.
27
-
28
- ## Initial package publication is complete
29
-
30
- The initial `dsh-github-copilot@0.4.0-alpha.18` package was published from the
31
- immutable `v0.4.0-alpha.18` GitHub Release archive. The public registry version,
32
- SHA-512 SRI, `alpha` tag, tarball size and SHA-256 were independently verified
33
- against those original Release bytes. The one-time workflow, token-authenticated
34
- bootstrap script and their focused tests have therefore been removed. No normal
35
- release workflow references `NPM_TOKEN`; removing any now-unused repository
36
- secret remains a separate explicit maintainer operation.
37
-
38
- The successful publish was not immediately visible to a read performed about
39
- four seconds later, so that workflow run ended as a failure even though the
40
- package and tag subsequently converged. Treat this as an uncertain write, not
41
- permission to publish again. npm registry package metadata and dist-tags are
42
- eventually consistent: after any successful or uncertain publish command, wait
43
- for the exact version to become observable, verify `dist.integrity` and the
44
- non-decreasing channel tag, then rerun the normal pipeline to reconcile
45
- read-only. Never retry a publish merely because immediate readback is stale.
46
-
47
- **`npm stage publish` cannot bootstrap a nonexistent package.** The
48
- [official npm stage prerequisites](https://docs.npmjs.com/cli/v11/commands/npm-stage/)
49
- require the package to already exist. For an existing package, staged publishing
50
- is an optional separately approved process: a maintainer reviews Staged Packages
51
- on npmjs.com and approves with 2FA. Staged is **pending approval**, not npm live.
52
- It reserves the version; a conflicting normal publish must fail, not reject or
53
- overwrite the stage automatically. Approval can update its immutable chosen
54
- dist-tag, so review channel ordering again before approval. This repository does
55
- not add a long-term manual/opt-in step to normal releases.
56
-
57
- ## Trusted publishing for subsequent versions
58
-
59
- [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) requires
60
- npm CLI >=11.5.1 and Node >=22.14.0. The publishing workflow uses Node 24 and
61
- pins npm 11.5.1; package development retains the pinned pnpm version.
62
-
63
- In the package settings, an authorized maintainer configures:
64
-
65
- | Field | Value |
66
- | --- | --- |
12
+ personal device or CI as a bypass. Local synthetic registry tests do not prove
13
+ connectivity, publication rights or live Desktop compatibility.
14
+
15
+ Versions align package, deployment baseline, both README URLs and annotated tag.
16
+ Channel is `alpha`, `beta`, `rc` or stable `latest`; never silently rename a
17
+ package, move/reuse tags, repack immutable assets or publish placeholders.
18
+
19
+ ## Trusted publishing
20
+
21
+ [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/) requires npm
22
+ >=11.5.1 and Node >=22.14.0. Publishing uses Node 24 and pinned npm 11.5.1;
23
+ development retains the package's pnpm pin.
24
+
25
+ | Publisher field | Value |
26
+ |---|---|
67
27
  | Provider | GitHub Actions, GitHub-hosted runner |
68
- | Organization or user | `cloga` |
69
- | Repository | `dsh-github-copilot` |
70
- | Workflow filename | `ci.yml` (the caller, **not** `release.yml`) |
71
- | Environment | Unset; the current release job declares none |
72
- | Allowed actions | Enable direct `npm publish` |
73
-
74
- Both caller and reusable child grant `id-token: write`. New trusted publisher
75
- configurations may default to stage-only permission: direct publish permission
76
- is an explicit maintainer choice, not implied by a successful stage. No
77
- `NPM_TOKEN` or `NODE_AUTH_TOKEN` is configured in normal release CI; missing OIDC
78
- fails loudly rather than falling back to persistent tokens. npm creates
79
- provenance automatically for supported public-repository trusted publishes.
80
- Do not change token/2FA policy as part of an automated repair.
28
+ | Owner / repository | `cloga` / `dsh-github-copilot` |
29
+ | Workflow | `ci.yml` caller, not reusable `release.yml` |
30
+ | Environment | Unset |
31
+ | Allowed action | Direct `npm publish` |
32
+
33
+ Caller and reusable workflow grant `id-token: write`. No normal release uses
34
+ `NPM_TOKEN` / `NODE_AUTH_TOKEN` or persistent-token fallback. Direct publication
35
+ permission is explicit, not implied by a stage. Staged publication is separately
36
+ approved, pending npm maintainer review/2FA, not live; it reserves the version.
37
+ [`npm stage publish`](https://docs.npmjs.com/cli/v11/commands/npm-stage/) requires
38
+ an existing package and cannot bootstrap one. Do not change auth/2FA policy to
39
+ repair publication.
81
40
 
82
41
  ## Same bytes, recovery and tags
83
42
 
84
- The repository-wide release concurrency group serializes releases and remains
85
- non-cancelling. External/manual publishers must coordinate with it: npm does
86
- not provide atomic compare-and-swap for a dist-tag. Do not run concurrent manual
87
- publishes or approvals while a release job is publishing.
88
-
89
- After the full compatibility gate, a new release packs one tarball with
90
- `pnpm --config.ignore-scripts=true pack --pack-destination artifacts`; verification
91
- already ran prepack's baseline check and built the package, so packing does not
92
- rebuild it. A retry
93
- first inspects the existing exact tag/Release and downloads the original
94
- uploaded archive. Recovery verifies asset sizes/digests, checksum and local
95
- build equality; it never repacks or overwrites an existing archive. Partial
96
- drafts with a tarball can recover their checksum; published incomplete or
97
- non-immutable Releases fail closed. GitHub publishing reconciles its immutable
98
- assets, and npm publishes the same archive with lifecycle scripts disabled.
99
-
100
- The npm step reads package/version state before writing. Only E404 means
101
- absence; auth, TLS, timeout, malformed metadata and registry failures stop
102
- delivery. An existing exact version is accepted only with matching SHA-512 SRI
103
- and a channel tag at that version or a newer one. Conflicting bytes fail closed.
104
- An uncertain write is not retried in-process. Allow registry visibility to
105
- converge, then rerun the workflow to reconcile the exact existing version.
106
- A matching version with an older/missing tag requires maintainer review; the
107
- workflow does not silently repair it with separate dist-tag writes.
108
-
109
- `alpha`, `beta`, and `rc` versions use those tags, never `latest`. Stable
110
- versions use `latest`. SemVer comparison (not lexical sorting) prevents tag
111
- downgrades. Publishing a missing older version when its tag already points to a
112
- newer version fails before writing; reconciling an already published older
113
- version does not lower that pointer.
114
-
115
- Report GitHub URL/tag/commit/asset/SHA-256 and npm version/channel/SRI separately.
116
- GitHub success followed by npm failure is partial delivery, not success.
117
- There is no historical bulk backfill and no silent npm opt-out.
43
+ The non-cancelling repository release concurrency group serializes publication.
44
+ External publishers must coordinate; dist-tags are not atomic CAS.
45
+
46
+ After the complete compatibility gate, pack once with
47
+ `pnpm --config.ignore-scripts=true pack --pack-destination artifacts`.
48
+ Verification already built/prepacked. Recovery downloads the original uploaded
49
+ archive, verifies tag/source, size/digests, SHA-256/SHA-512 and build equality,
50
+ and never repacks/overwrites immutable bytes. Release assets include
51
+ `SHA256SUMS`; npm receives that same archive with lifecycle scripts disabled.
52
+
53
+ Only registry E404 establishes absence. Auth, TLS, malformed metadata and network
54
+ failures stop delivery. Existing exact versions require matching SRI and a
55
+ same-channel tag at that version or newer; conflicting bytes fail closed.
56
+ Visibility can lag a successful write. After successful/uncertain publication,
57
+ wait for visibility and reconcile read-only; **never automatically republish**.
58
+ A missing/older tag needs review, not a hidden dist-tag write.
59
+
60
+ SemVer ordering prevents downgrades. Missing older releases are not published
61
+ when their channel already points newer; reconciling existing older bytes never
62
+ lowers the pointer. Report GitHub tag/commit/assets/SHA-256 and npm version/SRI
63
+ separately. One channel succeeding is partial delivery.
64
+ [Read-only reconciliation](./npm-publication-readback.md).
118
65
 
119
66
  ## Installation preflight still applies
120
67
 
121
- Desktop profiles must be managed through Desktop's native package manager.
122
- The reserved `desktop` profile is not supported by DSH CLI plugin commands.
123
- After npm publication is verified, the native manager accepts the exact
124
- `dsh-github-copilot@<version>` npm spec, not a Release URL or local tarball.
125
- The CLI procedure below applies only to standalone named profiles and is not a
126
- Desktop fallback when registry access is blocked.
127
-
128
- Neither entry point replaces the package's required
129
- `scripts/check-search-composition.mjs` preflight. The official DSH 0.2
130
- `composeProfile()` path writes the empty `cordis.yml` root before normal launch,
131
- including when Desktop supplies an already resolved profile. Therefore the
132
- preflight refuses a nonempty root as `NONEMPTY_DISPOSABLE_PROFILE_ROOT`; do not
133
- install or start/restart that profile until the data has been preserved and an
134
- officially supported migration has been established. A package lookup,
135
- preflight or successful installation is not proof of runtime activation or a
136
- model call.
68
+ Desktop's native package manager accepts an exact verified npm spec, not a URL
69
+ or local archive. Generic/global CLI entry points must not be assumed to manage the reserved
70
+ `desktop` profile. Qualify Desktop's dedicated entry below.
71
+
72
+ Neither entry replaces the checksum-verified package's
73
+ `scripts/check-search-composition.mjs` preflight. Official `composeProfile()`
74
+ writes the empty `cordis.yml` root during normal launch, including resolved
75
+ Desktop profiles. `NONEMPTY_DISPOSABLE_PROFILE_ROOT` must therefore stop
76
+ installation/startup until its contents are preserved and reviewed.
77
+
78
+ A nonempty root may be reconstructible from existing bundles and persistent
79
+ patches, but must never be assumed disposable. Establish complete equality
80
+ through public composition and recheck source hashes before any separately
81
+ approved normalization. Installation approval is not blanket configuration
82
+ deletion approval. Check actual shared-peer resolution for stale profile-local
83
+ shadows; do not patch/copy peers as a plugin compatibility workaround.
84
+
85
+ ### Desktop-bundled CLI on official rc.2
86
+
87
+ Read-only inspection of official `@deepseek-ai/dsh-desktop-host@0.2.0-rc.2`
88
+ `lib/cli.js` confirms `runDesktopCli` calls public `runCli` with
89
+ `manageDesktopProfile: true` and bundled pnpm through Electron Node mode.
90
+ This capability is specific to the qualified entry, not a global shim or an
91
+ unverified future release.
92
+
93
+ Resolve the intended installation's `resources\runtime\cli\bin\dsh.cmd`, verify
94
+ its owning version/public entry and exact profile/home/anchor; do not rely on
95
+ PATH. With explicit installation approval, verified bytes and `supported: true`:
96
+
97
+ ```powershell
98
+ & '<verified Desktop installation>\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop add '<absolute path to verified release.tgz>'
99
+ ```
100
+
101
+ This example grants no action permission or universal offline guarantee.
102
+ Dependencies still require an approved registry or complete authorized cache.
103
+ CLI support does **not** override composition safety: when preflight fails,
104
+ no add, root rewrite or
105
+ restart followed merely to get past that diagnostic is authorized.
106
+ Use one writer, a private metadata backup, guarded edits and full package/bundle/
107
+ patch/peer readback. Installed-on-disk and loaded runtime remain distinct.
108
+ Stopping/restarting requires separate restart approval.
137
109
 
138
110
  ## Controlled offline CLI maintenance for standalone profiles
139
111
 
140
- This path installs this package's prebuilt, verified Release without requiring
141
- access to a blocked npm registry. It is not permission to bypass organizational registry restrictions:
142
- use only artifacts obtained through organizationally approved sources and
143
- already available dependency caches. A registry ban remains in force; offline
144
- installation does not repair TLS or prove that npm publication is healthy. The
145
- dual-channel **publication** policy above is unchanged. **Do not use this path
146
- for a Desktop-managed/reserved profile.**
147
-
148
- 1. Obtain explicit installation approval for the exact version and profile.
149
- Resolve the standalone DSH CLI, install anchor, `DSH_HOME` and profile
150
- directory; do not target Desktop's reserved `desktop` profile or assume a
151
- shell shim points to the intended installation.
152
- 2. Verify the original Release tarball with an independently trusted SHA-256,
153
- its package name/version and safe archive layout. Do not substitute a local
154
- build or repack an existing immutable Release. Extract only the verified
155
- artifact before executing its packaged preflight.
156
- 3. Run `scripts/check-search-composition.mjs` against that exact profile, home
157
- and install anchor, including any extra startup patches. Require
158
- `supported: true`; unknown, conflicting or unsupported composition is a stop,
159
- not permission to remove guards or rewrite the profile.
160
- 4. Keep one writer: do not run concurrent package/profile updates. Take a
161
- private backup of installation metadata (package.json,
162
- lockfile, bundle/patch configuration and relevant package-manager settings),
163
- record the current version, and retain a verified rollback artifact.
164
- Do not copy credential stores, `.env` files or browser storage. If ensuring
165
- exclusive maintenance requires stopping the Host, obtain separate approval.
166
- 5. Invoke the supported DSH CLI with an absolute path to the verified archive:
112
+ This installs a prebuilt verified Release using existing authorized caches;
113
+ it is not permission to bypass organizational registry restrictions.
114
+ It does not fix TLS or prove public npm health. **Do not use this path
115
+ unchanged for a Desktop-managed/reserved profile**: qualify Desktop's own entry
116
+ and retain independent preflight/approval checks.
117
+
118
+ 1. Obtain explicit installation approval for exact version/profile. Resolve
119
+ standalone CLI, install anchor, home and profile; do not infer ownership from
120
+ PATH or target reserved Desktop with a generic entry.
121
+ 2. Verify original Release bytes with an independently trusted SHA-256,
122
+ package name/version and safe archive layout. Extract only that artifact,
123
+ never a substitute local build or repack.
124
+ 3. Run `scripts/check-search-composition.mjs` with all startup patches and require
125
+ `supported: true`. Unknown/conflicting composition stops before mutation.
126
+ 4. Keep one writer. Take a private backup of package/lock/bundle/patch metadata
127
+ and record rollback bytes. Do not copy credential stores, `.env` or browser
128
+ storage. Host shutdown needs separate permission.
129
+ 5. Invoke the qualified CLI:
167
130
 
168
131
  ```sh
169
132
  dsh plugin --profile web add /absolute/path/to/verified-release.tgz --offline --ignore-scripts
170
133
  ```
171
134
 
172
- Replace `web` and the archive path with the approved targets. `--offline`
173
- requires the existing cache; `--ignore-scripts` prevents package lifecycle
174
- scripts from creating a second, uncontrolled installation/network path. If
175
- the cache is incomplete or a dependency requires a new build, stop and report
176
- the missing requirement. Do not silently remove these flags, change registry,
177
- add a VPN/proxy/mirror, or fetch blocked dependencies through another channel.
178
- Keep TLS verification enabled. Actual platform permission/approval refusals
179
- remain authoritative; this procedure does not override them.
180
- 6. Check the exit result and read back the installed version, lock entry and
181
- package files against the verified archive. Re-run the composition preflight
182
- and an appropriate import-only smoke check without activating the plugin.
183
- Inspect all metadata differences: the CLI reconciles `dsh.profile.bundles`
184
- and may add unrelated installed bundles. Preserve unrelated settings; stop
185
- for review on unexpected changes and revert only changes proven to belong
186
- to this operation, never overwrite later user edits with a whole backup.
187
- Use the package manager, not manual copying into node_modules or Core patches.
188
- 7. Report the installed version, checksum, backup and evidence limits. Obtain
189
- separate restart approval before interrupting the Host or active Sessions.
190
- Installed-on-disk and loaded-runtime are separate states: after an approved
191
- restart, verify the loaded build and the intended behavior independently.
192
-
193
- If installation fails, inspect the actual installed state before retrying or
194
- rolling back; a failed command is not proof that nothing changed. A rollback
195
- also needs reviewed, narrowly scoped metadata/dependency restoration. This
196
- procedure does not authorize Desktop profile management, rewrite installed or
197
- published historical docs, change machine-wide registry policy, or grant blanket
198
- approval for future updates.
135
+ Offline needs existing cache; ignore-scripts excludes uncontrolled lifecycle
136
+ work. If cache is incomplete or a build is required, stop. Do not silently
137
+ remove flags, change registry or acquire blocked dependencies elsewhere.
138
+ Keep TLS verification enabled; platform refusals remain authoritative.
139
+ 6. Check exit result, installed version, lock/files and all metadata differences.
140
+ Re-run preflight and import-only smoke without plugin activation. CLI may
141
+ reconcile `dsh.profile.bundles`; preserve unrelated entries and review
142
+ unexpected changes. Use package manager, never manual node_modules copying
143
+ or Core patches. A failed command is not proof nothing changed.
144
+ 7. Report version/checksum/backup and evidence limits. Obtain restart approval,
145
+ then separately verify loaded build and intended behavior.
146
+
147
+ Rollback needs fresh-state review and narrow restoration of this operation's
148
+ changes, never a whole backup over later user edits. This procedure grants no
149
+ future-update permission or machine-wide network policy change.
@@ -1,5 +1,9 @@
1
1
  # Official-first review: DSH 0.1.6-alpha.2
2
2
 
3
+ > **Historical review:** this preserves the earlier evaluation, not current
4
+ > support or delivery readiness. Use the [rc.2 review](./official-first-020-rc2.md)
5
+ > and current README for the supported host.
6
+
3
7
  ## Target and evidence boundary
4
8
 
5
9
  Candidate plugin **`0.4.0-alpha.25`** adds the ninth exact target: official **`dsh-v0.1.6-alpha.2`**, commit **`ddefc45fbc7f8e46dd73185e68295696d1297887`**. All eight earlier pins remain, including the historical controlled Desktop baseline; development dependencies remain exactly `0.1.2-rc.1`. This review inspected the unchanged official source checkout read-only. Every official source link below is pinned to that commit, not a moving branch. The [official release notes](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.6-alpha.2) were also reviewed: runtime dependency resolution/unload and multiple coexisting Client Sessions make lifecycle and ownership checks mandatory; native subagent sidebar support is not frozen planner/executor policy parity. Native vision-input and Messages API fixes remain the adapter's responsibility, and the companion must not duplicate or override them. The new Plugin Manager owns persistent installation; this adaptation adds no dynamic-plugin replacement or installer. These notes plus source contracts are not published-artifact or installed-runtime qualification.
@@ -1,5 +1,9 @@
1
1
  # Official-first review: DSH 0.2.0-rc.1
2
2
 
3
+ > **Historical review:** this preserves the earlier evaluation, not current
4
+ > support or delivery readiness. Use the [rc.2 review](./official-first-020-rc2.md)
5
+ > and current README for the supported host.
6
+
3
7
  ## Target and evidence boundary
4
8
 
5
9
  Candidate plugin **`0.4.0-alpha.38`** adds official Core **`0.2.0-rc.1`**, tag commit [`4878cdabd87d4041bdaff61d04c966883b9fd07a`](https://github.com/deepseek-ai/deepseek-harness/commit/4878cdabd87d4041bdaff61d04c966883b9fd07a), as the current target while retaining every earlier compatibility pin. The independently observed Windows Desktop feed also identifies `0.2.0-rc.1`; its Desktop package set is not materialized in this checkout. Source/API qualification, npm package fixtures, and Desktop installation/runtime qualification are separate evidence.
@@ -1,75 +1,133 @@
1
- # Provider-aware web search routing
1
+ # Provider-aware Web search
2
2
 
3
- ## Requested behavior
3
+ Target: official DSH / Windows Desktop `0.2.0-rc.2`. The routed facade and
4
+ configuration page are shipped plugin functionality, not a pending proposal.
4
5
 
5
- Issue #135 separates the primary search provider from the final fallback. `searchRouting.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. Issue #148 makes ordinary settings provider-only: explicit/fallback Copilot resolves account-owned Responses candidates internally unless a nonempty legacy `github-copilot.searchModel` override is present. Issue #195 roots search routing under the existing `github-copilot` settings namespace at nested paths `searchRouting.searchProvider` and `searchRouting.defaultSearchProvider`, avoiding the unexported `installSection` limitation and preserving independent provider saves.
6
+ ## Choose who searches
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
+ Open **Plugins → dsh-github-copilot → Details → Web search**.
8
9
 
9
- ## Composition
10
+ | Control | Behavior |
11
+ |---|---|
12
+ | Search provider: Auto | Follow the initiating Chat provider when its exact supported search registration exists |
13
+ | Search provider: an ID | Always use that registered provider, independent of later Chat model changes |
14
+ | Fallback provider | At most one different final provider after an eligible failure; None disables it |
10
15
 
11
- Modern Core may mount `tool-web` in agent presets while disabling its historical Host row. Modifying that disabled row is insufficient. The bundle therefore changes the service composition, not the consumer or preset:
16
+ Saving both routing leaves uses one native settings CAS, with no Copilot
17
+ credential, model discovery or capability-probe prerequisite. Saving does not
18
+ prove a provider is available. The directory lists fresh public registrations,
19
+ not static examples; unavailable stored IDs stay visible and fail explicitly.
20
+ Reload sees newly registered IDs.
12
21
 
13
- 1. An id-and-name-guarded patch moves the existing `web` / `@deepseek-ai/dsh-web` row into the named `github-copilot-original-web` service realm without replacing its config.
14
- 2. The plugin's `web-delegate` entry exposes that same official service through a public, Fiber-owned bridge. It does not read any provider registry internals.
15
- 3. The plugin-owned `routed-web` service occupies the ordinary Host `web` scope. It forwards provider registration and fetch to the original service while retaining Fiber-scoped handles for exact-id search dispatch.
16
- 4. Auto-mode Copilot searches use the captured initiating-session route. Fixed/fallback Copilot searches preserve a nonempty explicit provider-owned `searchModel`, otherwise use bounded automatic selection from current account-owned Responses route facts. Other provider ids dispatch through the mirrored public registration. A separate private official WebRuntime supplies native request validation and source capping on every routed branch.
17
- 5. Native `tool-web` consumers, including those in agent presets, retain their original schemas, configured query/source limits, batching, execution policies, timeout metadata, formatting and presentation.
22
+ ![Actual parent-following and search controls with synthetic settings](images/copilot-search-routing.png)
18
23
 
19
- This is a plugin-owned subclass and explicit public service composition, not a replacement of Core prototypes or a mutation of a live registered service. It affects all `ctx.web.search` consumers with eligible Copilot context, not only one tool name. The bundle requires the standard enabled top-level official Host `web` row, static provider config and no prior isolation. The patch name guard does not make its separate inserted rows conditional: installing into a custom/missing/disabled/isolated web composition can prevent startup. Run the required read-only `scripts/check-search-composition.mjs` preflight over the existing profile before installing; it uses public readers and composition without calling write-capable `loadProfile` normalization. It compares a routing-free baseline with the actual post-install candidate at the existing bundle position (or the append position for first install), including profile, home and supplied launcher patches. Nonempty disposable `cordis.yml` roots are refused because normal CLI launch resets them; late isolation resets or an original web row inserted only after the routing guard are also refused. `dsh plugin add` does not automatically enforce this step. Unsupported shapes must be refused before mutation, not described as safe no-ops.
24
+ The picture uses actual published Client components in an isolated browser.
25
+ It does not demonstrate a live search or loaded Desktop runtime.
20
26
 
21
27
  ## Routing and fallback
22
28
 
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
-
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
-
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
-
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 ordinary save commits both primary and fallback leaves together in one CAS mutation in the existing `github-copilot` namespace at nested paths `['searchRouting', 'searchProvider']` and `['searchRouting', 'defaultSearchProvider']`. It neither requires account credentials nor performs account-status/model-discovery RPC or capability probe. A nonempty legacy `searchModel` remains authoritative and visible read-only; only the separate explicit reset sets `searchModel: ''` with the shared namespace revision, coordinating local revisions after either mutation to prevent false CAS conflicts while preserving unsaved drafts. A failed reset must not prevent an unrelated routing save. Missing namespaces, read-only deployments, stale revisions and uncertain responses must remain visible without exposing raw provider errors. `routeWebSearch: false`, the master enable switch, Copilot allowlists and capability proof keep their existing responsibilities.
32
-
33
- ## Search directory and settings UI
34
-
35
- Official rc.2 `SettingsForms` discovers active Loader entries and projects only volatile `Config` fields. There is no `settings.register()` or `installSettingsSection()` API. The plugin marks `searchRouting`, the hidden legacy `searchModel`, and the hidden restoration journal `temporaryRouteBackup` as volatile using Schemastery 3.18.4 or newer. The Host keeps their native references and reads a plain snapshot per operation; it must not reparse those snapshots through the live schema or freeze them at activation. Ordinary safety and transport fields remain ordinary configuration. Settings writes remain native, narrow, revision-checked profile edits.
36
-
37
- The settings contract regression uses the real Loader, ConfigEditor and SettingsForms with a disposable profile and the plugin's actual Config, rather than a pre-registered in-memory namespace. It covers discovery, two-leaf writes, unchanged fiber identity, stale CAS rejection, invalid/non-live field rejection, explicit legacy override reset and persistence across a fresh boot. It does not exercise the Host SettingsController over a network Gateway or access live credentials.
38
-
39
- Correction to the historical evidence below: the previous settings contract used a `MemorySettings` test double, not the real Settings service. It therefore could not detect missing Config projection. For #216, the updated contract passes against isolated unchanged Desktop rc.2 artifacts; the normal frozen development install is still blocked by missing rc.2 packages in the configured mirror. The development graph now uses Cordis 4.0.4 and a shared Schemastery 3.18.4 resolution: the old Settings peer selected 3.18.2, whose global declarations incorrectly merged with the live-field schema types. The lockfile was regenerated with pnpm on a GitHub runner, not patched dependency artifacts. Neither the supplemental run nor historical full-gate results replace required CI on the final revision.
40
-
41
- The five source-native settings cases and 198 Config/inline Host tests also pass against the unchanged GitHub commit `639ed015397290b3745d163aafe02ffee4aa3f84`, using a supplemental public-export resolver and TypeScript 6.0.3 without compiling or editing Core. Generated Client codec cases remain published-artifact evidence, not source-mode cases. The source-mode no-emit check reports no plugin-file diagnostics but still has upstream/generated-Remote declaration errors, so it is not a clean full typecheck. The frozen source dependency closure currently stops at the configured mirror's missing `@smithy/signature-v4@5.7.4` tarball. These are bounded validation results, not publication or live Desktop acceptance.
42
-
43
- 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; **Fallback provider** adds None while retaining the stored `defaultSearchProvider` key. The ordinary card has no model selector. Settings and routing Remote faces are captured once at UI registration: real pinned Cordis/Client Gateway namespace reads return fresh traced proxies, so looking them up in each render would change effect dependencies and reload drafts. Models remain provider internals, not additional search-provider entries.
44
-
45
- 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 search-catalog facade/controller. `tests/web-search-routing-card.spec.ts` covers both selectors, unavailable catalogs, one routing CAS without a model prerequisite, explicit separate override reset, safe conflict messages, legacy choices and stale generations. `tests/client-search-inject.spec.ts` mounts the actual Client callback with real React DOM and Cordis in jsdom, checking draft and pending-save continuity through parent rerenders for both footer and legacy section slots; its Remote transport remains synthetic. `tests/scripts/search-settings-contract.test.mjs` uses the real pinned Settings service with in-memory persistence and the unchanged generated Client codecs: two-leaf routing writes, stale CAS, writable hidden/empty legacy overrides and the flat returned namespace revision. It also mounts the real pinned Client Gateway/Remote descriptors to verify traced proxy identity, without RPC or streams. It does **not** execute the actual Host SettingsController write through Gateway. An isolated Edge reproduction with the old alpha.28 built card and actual registration callback, backed by synthetic fresh Remote getters, reproduced both a filled-model draft resetting on a parent render and a completed model write whose subsequent routing write was abandoned on a parent render. This establishes a reproducible plugin lifecycle defect, not a definitive diagnosis of the user's production runtime. The corrected built card passed the same isolated Edge rerender/save/reload flow without a model field or account-status RPC, plus explicit legacy override reset, safe CAS conflict recovery, read-only state, dark/light desktop and 375px mobile captures, and a 200% zoom overflow check. These fixtures are not live account, installed Desktop or paid model evidence. The final local `pnpm verify` passed with one test worker: 62 Vitest files, 1553 passing tests and 2 expected skips, 273 tooling tests, source/test typechecks, baseline checks, build and package smoke. An earlier unrestricted parallel run hit three import-time test timeouts; the unchanged tests passed with bounded concurrency, without extending timeouts or skipping assertions. Remote CI, release publication and loaded-runtime acceptance remain separate pending checks.
46
-
47
- ## Provider-owned automatic Copilot selection (#148)
48
-
49
- For explicit/fallback Copilot without a nonempty `searchModel`, an actual search non-forcing ensures current account metadata under the existing ownership, TTL, cooldown and credential guards. Eligible account-owned Responses routes are considered in deterministic model-ID order, with at most three candidates. No static model-name table, another Session's model, global Chat default or UI model list supplies the selection. A nonempty override remains the sole candidate and is not silently replaced if unavailable.
50
-
51
- Metadata determines eligibility, not native-search support. With the default `probe: true`, bounded candidate proof must succeed before one final user-query request is sent. Candidate proof is not a loop replaying the user's query; a final request failure is not retried on another model. The explicit `probe: false` trust override retains its existing meaning and is not a recovery recommendation. Empty/incomplete account evidence, unsupported protocols and proof exhaustion fail closed; cancellation or captured account-proof invalidation terminates the operation. Auto following a Copilot Chat route continues to use the captured initiating model rather than this independent selection. Existing outer primary/final-fallback policy, no-repeat backend rule and charge disclosures remain unchanged. Reusable successful proofs retain only account/owner lifetime, not the creating request's deadline or cancellation. Concurrent configured callers own separate unfinished probes; canceling one must not abort another, and a canceled probe is never reused as negative capability evidence.
52
-
53
- ## Review hardening
54
-
55
- The initiating router also captures the actual managed proof lifetime and its live grant deadline; ordinary metadata TTL refresh does not extend a captured deadline or count as credential revocation. Read-observed credential changes and native authorization failures invalidate continuity before generic probe/plan errors can become fallback eligibility. The same operation-local guard is checked in the native fallback's pre-dispatch recording callback, after asynchronous credential resolution and before either recording or fetching. Rejecting only after the fallback response arrives would be too late to prevent charges.
56
-
57
- The added regressions cover silent expiry/replacement, native final assertions, cold discovery, supported TTL refresh, delayed fallback credentials, literal-key authorization boundaries, cancellation, and legitimate transport-fallback controls. Supplemental public-API and in-memory reproductions are not a substitute for full CI on the final repaired commit or separately authorized live acceptance.
58
-
59
- ## Original verification inventory (before additional review regressions)
60
-
61
- - `tests/search-routing.spec.ts`: 20 synthetic policy regressions covering route preservation, captured selections, fallback disclosures, cancellation, proof invalidation, unknown fallback provider refusal and simultaneous operations.
62
- - `tests/routed-web.spec.ts`: 16 tests using actual official AgentRegistry, ToolRuntime, SystemPrompt, scoped official search consumers and WebRuntime instances. They cover native validation/caps, exact-id registered-provider dispatch, duplicate-query collapse, surrounding execution middleware, pre-execute denial, simultaneous Copilot/DeepSeek calls, unchanged fetch, provider Fiber disposal and fallback notices surviving canonical rendering/web-card metadata. Retained handles are rejected after facade disposal; in-flight Copilot work is aborted and drained; the official WebRuntime prototype remains unchanged.
63
- - `tests/deepseek-search-fallback.spec.ts`: 37 keyless tests composing the real public DeepSeek provider, covering option snapshots, settings/env/credential precedence, request recording, cancellation, redirects, result parsing, safe backend/error metadata and rejection of unsafe API bases. Concurrent searches retain distinct endpoint/model disclosures from their own actual option snapshots.
64
- - `tests/scripts/search-composition.test.mjs`: 22 pre-install checks, including real public parser use without initialization/normalization or secret output; custom/dynamic/nested/disabled/isolated web layouts are rejected before installation.
65
- - `tests/routed-web-loader.spec.ts`: public patch composition checks plus an actual Loader boot of the built facade/delegate and official consumers. Since Vitest lacks Node's exposed internal module loader, this test resolves this plugin's public export names to file URLs before Loader import; the realm/config patches and built implementations are unchanged. Main authorization/chat activation is disabled in this isolated test and replaced only by a synthetic routing service. This is not live account acceptance.
66
- - Existing inline-search tests use their pre-existing synthetic context; its fixture now models public `ctx.provide` registration and disposal required by the new router service. Nine additional main-router cases exercise non-Copilot delegation, owned managed primary search, real official fallback transport with synthetic responses, disabling fallback/routing, allowlist exclusion, user-facing disclosure guidance and credential invalidation before any fallback request.
67
- - `verify-tagged-core.mjs` now selects the policy, real-consumer and fallback suites in addition to prior adapter tests. CI/release install the unchanged official search dependency closure; tooling regressions reject missing/reordered closure steps. This is test wiring, not proof that the remote matrix has run.
68
-
69
- ## Remaining before shipping
70
-
71
- 1. Complete the full verification gate and update deployment/agent evidence inventories, public export smoke and both READMEs.
72
- 2. Add end-to-end coverage of the main router's managed metadata, fallback credentials/options, cancellations during discovery/fallback, mixed multi-query provenance, and complete unload/reload behavior.
73
- 3. Run retained exact Core-baseline fixtures, not only the development artifact. Do not infer eight-pin runtime compatibility from type checks.
74
- 4. Align the new package version, release metadata and package/archive tests.
75
- 5. Run bounded live Copilot hosted-search and permitted-fallback acceptance separately. A successful chat request does not prove hosted search. No live profile installation, global search selection change or restart has occurred for this work.
29
+ Auto uses the captured initiating Session/request route, never the global Chat
30
+ default or another Session. Copilot aliases keep their account/model checks;
31
+ other IDs match an observed search registration exactly. Model names/families
32
+ do not become search providers. This provider-level convention does not promise
33
+ the same account or execution model across independent registries.
34
+
35
+ A successful primary result, including zero sources, ends routing. Failure may
36
+ try one distinct final fallback, never the same backend twice, a hidden third
37
+ tier or recursive routing. Cancellation, disposal, registration replacement
38
+ and account-proof invalidation terminate the operation. Captured implementations,
39
+ not only replaceable IDs, remain bound to the request.
40
+
41
+ Fallback notices survive native result projection in `WebSearchResult.content`,
42
+ identify the backend and possible charges, and expose no raw exception.
43
+ Generic providers own their authentication and cancellation; their endpoint/model
44
+ provenance is not guessed from Chat. The stronger Copilot/legacy pre-dispatch
45
+ proof guard is not claimed for every third-party implementation.
46
+
47
+ ## Copilot model selection and proof
48
+
49
+ Auto-following Copilot search uses the initiating real model. Explicit/fallback
50
+ Copilot search instead preserves a nonempty `github-copilot.searchModel`
51
+ override; otherwise it non-forcing ensures current account metadata and
52
+ considers at most three eligible Responses models in deterministic ID order.
53
+ No model-name table, Session borrowing or global default supplies candidates.
54
+
55
+ Metadata establishes eligibility, not search capability. Default `probe: true`
56
+ requires bounded successful proof before **one final user-query request**.
57
+ Candidate proof is not query replay; a final failure never tries the query on
58
+ another model. `probe: false` is an explicit trust override, not a recommended
59
+ repair. Cancellation or captured credential/account-proof changes fail closed.
60
+ Successful reusable proofs retain account/owner lifetime, not the creating
61
+ request's signal/deadline. Concurrent callers own their unfinished probes.
62
+
63
+ ## Settings and legacy compatibility
64
+
65
+ Routing lives in `github-copilot.searchRouting`. One CAS writes nested paths
66
+ `['searchRouting', 'searchProvider']` and
67
+ `['searchRouting', 'defaultSearchProvider']`. Legacy separate namespaces are
68
+ read-only fallback sources. Old fixed/none spending restrictions are preserved
69
+ until an explicit save adopts new policy; unknown IDs never silently normalize
70
+ to an available provider.
71
+
72
+ A nonempty legacy `searchModel` is displayed read-only and remains authoritative.
73
+ Only its separate reset writes `searchModel: ''`. Both actions coordinate the
74
+ shared namespace revision without discarding unsaved drafts. A failed reset
75
+ does not block an unrelated routing save.
76
+
77
+ Official SettingsForms projects volatile Config leaves; the plugin uses native
78
+ live fields and narrow writes, not a manually invented namespace registration.
79
+ Traced Settings/routing Remote faces are captured once at UI registration so
80
+ parent renders retain drafts and pending saves. `routeWebSearch`, enable,
81
+ allowlists and capability proof keep independent responsibilities. Safety and
82
+ transport settings are not routine fields on this card.
83
+
84
+ ## Composition and installation safety
85
+
86
+ The plugin moves the original enabled top-level official Web service into
87
+ `github-copilot-original-web`, exposes it through a public Fiber-owned delegate,
88
+ and mounts its routed facade in ordinary Host Web scope. Original configuration,
89
+ fetch and native tool consumers remain under their owners. A separate private
90
+ official WebRuntime retains request validation/source capping for routed search.
91
+ No preset edits, private registry access or Core prototype replacement occurs.
92
+
93
+ Before install/update, run the verified package's read-only
94
+ `scripts/check-search-composition.mjs` with profile, home, install anchor and
95
+ all launcher patches. Require `supported: true`. It parses public composition
96
+ without booting plugins, credentials, network or settings writes and compares
97
+ the baseline with the actual candidate bundle position.
98
+
99
+ Custom/dynamic/nested/disabled/already-isolated layouts, collisions and a nonempty
100
+ disposable `cordis.yml` root are refused. Normal `composeProfile()` rewrites that
101
+ root to `[]`, so preserve it and review complete reconstructibility before any
102
+ separately approved normalization. `dsh plugin add` does not enforce preflight.
103
+ Do not describe unsupported composition as a safe no-op.
104
+
105
+ Desktop supports its qualified bundled CLI, not any generic shim.
106
+ [Installation guidance](./npm-distribution.md#desktop-bundled-cli-on-official-rc2).
107
+ Web service disable/remove/upgrade may require a cold restart; do not use
108
+ remove/re-add as a hot-upgrade workaround.
109
+ [Lifecycle characterization](./web-lifecycle-rc2.md).
110
+
111
+ ## Verification and limits
112
+
113
+ Real Loader/ConfigEditor/SettingsForms fixtures cover volatile discovery,
114
+ two-leaf CAS, same Fiber, stale conflicts, hidden legacy reset and restart
115
+ persistence. Client gateway/actual registration tests cover traced identities,
116
+ draft continuity and catalog reads; a settings-map mock alone cannot establish
117
+ native reachability. Native WebRuntime/Agent/tool fixtures cover validation,
118
+ registration disposal, result notices and original fetch ownership.
119
+
120
+ Policy and transport tests cover bounded candidates, lazy account discovery,
121
+ proof expiry, fallback auth, credential discontinuity, cancellation and
122
+ independent requests. Published Client desktop/narrow captures use synthetic
123
+ services. Required exact rc.2 Windows/Linux CI remains the release gate; counts
124
+ and old local registry failures belong in the relevant PR evidence, not permanent
125
+ setup instructions.
126
+
127
+ Live hosted-search capability, paid fallback behavior and Desktop activation
128
+ require separate authorized acceptance. Ordinary Chat success, saved routing,
129
+ synthetic tests or a source marker prove none of those layers.
130
+ Design history: [#135](https://github.com/cloga/dsh-github-copilot/issues/135),
131
+ [#148](https://github.com/cloga/dsh-github-copilot/issues/148),
132
+ [#195](https://github.com/cloga/dsh-github-copilot/issues/195) and
133
+ [#216](https://github.com/cloga/dsh-github-copilot/issues/216).