dsh-model-switch 0.4.20 → 0.4.21
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 +212 -203
- package/IMPLEMENTATION_PLAN.md +40 -40
- package/LICENSE +21 -21
- package/PRODUCT.md +33 -33
- package/README.md +214 -208
- package/README.zh.md +212 -206
- package/cordis.patch.yml +515 -30
- package/lib/client.js +245 -258
- package/lib/compaction.js +205 -0
- package/lib/index.js +12 -242
- package/lib/types/capabilities-rpc.d.ts +2 -3
- package/lib/types/client/ModelSwitchSettings.d.ts +2 -2
- package/lib/types/client/derived-settings-scope.d.ts +4 -4
- package/lib/types/client/locales.d.ts +4 -3
- package/lib/types/client/picker/PlanReviewCard.d.ts +0 -3
- package/lib/types/client/picker/locales.d.ts +0 -8
- package/lib/types/client/remote-settings-scope.d.ts +45 -45
- package/lib/types/client-contract.d.ts +10 -4
- package/lib/types/compaction.d.ts +56 -0
- package/lib/types/host-runtime.d.ts +8 -2
- package/lib/types/host-settings.d.ts +10 -5
- package/lib/types/picker/plan-goal.d.ts +29 -3
- package/package.json +360 -356
- package/lib/types/picker/plan-compact.d.ts +0 -48
- package/lib/types/plan-compact.d.ts +0 -82
package/CHANGELOG.md
CHANGED
|
@@ -1,203 +1,212 @@
|
|
|
1
|
-
## v0.4.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- **
|
|
6
|
-
- **
|
|
7
|
-
- **
|
|
8
|
-
- Verification: `pnpm run check` green (`tsc` + `tsdown`,
|
|
9
|
-
|
|
10
|
-
## v0.4.
|
|
11
|
-
|
|
12
|
-
Plan Review
|
|
13
|
-
|
|
14
|
-
- The
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
## [0.4.
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
## 0.4.
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
## 0.3.
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
-
|
|
144
|
-
|
|
145
|
-
## 0.3.
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
## 0.3.
|
|
163
|
-
|
|
164
|
-
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
|
|
171
|
-
## 0.3.
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
## 0.3.
|
|
177
|
-
|
|
178
|
-
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
-
|
|
1
|
+
## v0.4.21
|
|
2
|
+
|
|
3
|
+
Two product changes and one investigation: plan-exit auto-compaction is removed entirely; official compaction (`/compact` and official automatic compaction) gains one configurable summarization model; and the "endless automatic compaction" reports are investigated and attributed to the official engine.
|
|
4
|
+
|
|
5
|
+
- **Removed: plan-exit compaction (0.4.20).** The plan-exit auto-compaction feature ships no more: the `plan-compact` plugin RPC endpoint, the Host runner, the card call, and the `planCompactThreshold` setting are gone, and plan approvals commit immediately as they did before 0.4.20. Switch-time compaction (`compactOnSwitch`, the fork's original send-time protection) is untouched and still optional.
|
|
6
|
+
- **Compaction model.** New settings card (default **off = official default = the conversation target model**; on seeds from Main) pins the summarization route for **all** official compaction — `/compact` and official automatic compaction alike. `dsh-model-switch/compaction` mounts the **same official `BasicCompactionEngine`** with the official row's own config forwarded unchanged and only `summarizationProvider`/`summarizationModel` overlaid when both settings fields are set (either field alone is ignored). Reaching the engine takes two row replacements: the top-level `compaction-basic` row (surfaces that compose the agent process-wide, e.g. the TUI) and — because the Web surface runs session compaction inside each agent preset's isolated `compaction` group, which profile patches cannot address — a wholesale replacement of the shipped preset rows (the Web preset editor's own save mechanism) that swaps that group's engine for the routed one; the preset copies are re-synced per DSH release during the existing compatibility verification. The engine remounts dispose-first whenever the composed config changes (`model-switch/settings-update`, emitted on ordinary and volatile saves; the listener is global so preset-realm instances hear it), and the initial mount is awaited so `/compact` resolves the service the moment the row completes. Failure ladder: configured route → official defaults → unmounted, each step with explicit errors. Saving while a compaction is running may interrupt it; it retries next time.
|
|
7
|
+
- **Known issue (upstream): official automatic compaction churns under sustained context pressure.** While the working set stays above the engine's pressure threshold (`thresholdRatio`, default `0.8 × target context window`), every `agent/pre-step` attempts compaction; once the remaining compactable ranges are small, the official "summary is not smaller than the shadowed content" guard rejects the summary and the next step retries the same range — a visible loop of automatic compactions. A session-level A/B pinned the source to the official engine, not this plugin: 180 compaction events in one session (62 rejected summaries, 1–2 attempts per step for hours), churn active only while the active model's window kept the threshold crossed, identical before and after disabling this plugin. Mitigations: set `auto: false` (keeps `/compact`) or raise `thresholdRatio` on the compaction-basic row config — this plugin forwards row config unchanged; reduce mounted tool schema; or pin a compaction model that produces leaner summaries. Recorded for upstream in `docs/seam-gap.md`.
|
|
8
|
+
- Verification: `pnpm run check` green (`tsc` + `tsdown`, 51 test files / 349 tests, pack gate); reverse verification — breaking the route overlay or the official-row forwarding turns the compaction tests red, then green again after restore; lab 3082 smoke with the shipped patch only: a keyless `compactProvider` pin makes `/compact` fail with that route's `MISSING_CREDENTIAL`, saving a working pin applies on the very next `/compact` without a restart, and an empty pair summarizes via the conversation target; auto-review runtime check on 3082: a pinned reviewer route receives the review call (tool bodies stay blocked when it fails), pin off reviews follow the session model.
|
|
9
|
+
|
|
10
|
+
## v0.4.20
|
|
11
|
+
|
|
12
|
+
Three coordinated additions: the Plan Review card shows only the official summary and restores the right-sidebar full-plan preview; the official Auto reviewer's model becomes configurable; and switching models at plan exit compacts long context first.
|
|
13
|
+
|
|
14
|
+
- **Plan Review body = summary, full plan in the sidebar.** The card renders the official two-part summary (`extractMarkdownPlainText` first-line + first-paragraph) instead of the whole document, with a "View full plan" header action. The full plan auto-opens in the right sidebar by driving ui-plan's registered preview opener: a composer-takeover entry cannot render `conversation.plan-review.actions` (one declarer per child slot, plus per-entry `renderSlot` authorization), so the card drives ui-plan's own inject face — address, params, logged-plan branch, and mounted-session gate all stay ui-plan's. `planReviewOf` now passes `intent.callId` through, matching the official narrow. Recorded in `docs/seam-gap.md`.
|
|
15
|
+
- **Auto review model.** New settings card (default **off = reviews follow the session model**; on seeds from Main) pins the reviewer route in the shared `model-switch` namespace. `cordis.patch.yml` disables the official `auto-review` row and inserts `dsh-model-switch/auto-review`, which runs the **same official `apply`** under a scoped child context whose `llm.stream` `provider/model` are rewritten only when both settings fields are set (identity passthrough otherwise, route re-read per call). The row mounts only when the profile started with the optional `@deepseek-ai/dsh-experimental-auto-review` bundle and reports an already-active official row instead of double-registering. Optional peer `@deepseek-ai/dsh-experimental-auto-review >=0.1.7-rc.2` (lowest verified; the devDep pins the matching 0.1.7-rc.2 line).
|
|
16
|
+
- **Plan-exit compaction.** When an approval switches provider/model and the estimated next request exceeds the new threshold (tokens, default 200,000, `0` disables, edited in the Send protection group), the card calls a new `plan-compact` plugin-RPC endpoint **before** committing anything: the Host prices the session with `ctx.tokenMeter` (larger of the two envelope prices) and, over threshold, summarizes once through an isolated `compaction-basic` engine pinned to the switched-to model via the turn-safe `compactIfNeeded(..., 'context-overflow')` — `exit_plan_mode` awaits its question inside a live tool call, so the idle-only `compactNow` cannot run at plan exit. Then the model commits and the review answers; **Set as goal and run** compacts before arming the goal. Same-model or effort-only approvals never trigger the endpoint, an empty history proceeds after a notice, and a failed compaction keeps the review pending and retryable. Seams and the borrowed overflow trigger are recorded in `docs/seam-gap.md`.
|
|
17
|
+
- Verification: `pnpm run check` green (`tsc` + `tsdown`, 50 test files / 348 tests, pack gate); reverse verification — restoring the full-plan body, removing the switch gate, and dropping the route rewrite each turn the targeted tests red, then green again after restore.
|
|
18
|
+
|
|
19
|
+
## v0.4.19
|
|
20
|
+
|
|
21
|
+
Plan Review gains a **Set as goal and run** action: it arms the reviewed Plan as the session's goal and only then answers it, so `dsh-goal-round-driver` carries the Plan after plan mode exits.
|
|
22
|
+
|
|
23
|
+
- The goal is set before the answer, matching the card's existing commit-then-answer order; a refusal keeps the review pending and reports the Host's own wire code.
|
|
24
|
+
- An unfinished goal is replaced through `get` + `clear` + `create` rather than edited, so a new Plan starts with a fresh round cap, and the card says it replaced the previous goal.
|
|
25
|
+
- The goal face is resolved per render (`ctx.get('remote.goals', false)`) instead of listed in the static client `inject`, so a deployment that mounts no `@deepseek-ai/dsh-goal` keeps loading this plugin and the action disables itself with an explicit reason while the other three actions keep working. `@deepseek-ai/dsh-goal` is declared as an optional peer.
|
|
26
|
+
- The objective is the Plan's trimmed markdown. The plugin stores no goal state, owns no part of the goal domain, and schedules no rounds.
|
|
27
|
+
- Records the seam in `docs/seam-gap.md` (the released `remote.goals.create` exists while DSH's own goal surface deliberately omits creation) and the action in PRODUCT.md and both READMEs.
|
|
28
|
+
|
|
29
|
+
## v0.4.18
|
|
30
|
+
|
|
31
|
+
Declare official DSH `0.2.0-rc.2` compatible in `package.json#dsh.compatibility.dshReleases`.
|
|
32
|
+
|
|
33
|
+
Evidence, in the order this repository's compatibility policy requires:
|
|
34
|
+
|
|
35
|
+
- **Public API review:** the 0.2.x Host renamed the pending-question withdrawal verb (`PendingQuestion.cancel()` → `dismiss()`), fires `session.selectModel`'s deployment-default write without awaiting it, and reports a refused `ModelDirectory.select` as a returned `{ ok: false }` value instead of throwing. Each difference broke v0.4.16, and each is fixed in v0.4.17.
|
|
36
|
+
- **Tests and build:** `pnpm run check` green — `tsc` + `tsdown`, the full vitest suite, and the pack gate against a real tarball.
|
|
37
|
+
- **Lab plane:** profile composition `exit 0` with no skipped bundle, Host boot on port 3082 with the plugin's capability RPC answering, and the npm-installed build booting on port 3085 with its client bundle served.
|
|
38
|
+
- **Live desktop verification on 0.2.0-rc.2:** all three Plan Review actions exercised against a real session — Discuss withdraws the takeover and returns the composer; Reject delivers typed feedback verbatim as the answer's `custom` text; Confirm commits a different execution model, approves the plan, and restores the Main default to its pre-switch value.
|
|
39
|
+
|
|
40
|
+
## v0.4.17
|
|
41
|
+
|
|
42
|
+
First release published to the npm registry, so `dsh plugin --profile <name> add dsh-model-switch` installs prebuilt code without a git build authorization. Publishing builds `lib/` through `prepublishOnly`, and `pnpm run check` now runs its pack gate on Windows as well.
|
|
43
|
+
|
|
44
|
+
- Plan Review **Discuss in chat** now withdraws the takeover through the verb the running Host publishes (`PendingQuestion.dismiss()` on 0.2.x, `cancel()` on 0.1.x) instead of calling `cancel()` unconditionally, which threw on a Host that renamed it; a Host exposing neither is named explicitly.
|
|
45
|
+
- Plan Review **Reject** sends text from the card's feedback field as the answer's `custom` text, so a rejection reaches the model with what to change instead of a bare option label.
|
|
46
|
+
- Compensate the deployment default through the namespace revision actually observed: wait for the Host's unawaited `session.selectModel` default write, fence on the observed revision, retry once against a concurrent edit, and never fail the answer. The previous `captured + 1` fence assumed an awaiting Host and could either refuse the restore (leaving the Plan unanswerable) or silently leave the Main default switched.
|
|
47
|
+
- Treat a refused official `ModelDirectory.select` result as an uncommitted model change instead of reporting success.
|
|
48
|
+
- Keep Confirm and Reject closed after a settled review while Discuss and a reload affordance stay reachable, and surface the wire code of a failed action.
|
|
49
|
+
- Fix a line-ending fragile mobile width-budget assertion.
|
|
50
|
+
- Make the pack gate portable: resolve npm's own CLI when a shell-less spawn cannot launch the Windows `.cmd` shim, compare archive members across line endings, and link the extracted package with a junction on Windows.
|
|
51
|
+
|
|
52
|
+
## v0.4.16
|
|
53
|
+
|
|
54
|
+
- Bundle shared Provider UI helpers from the published v0.2.14 release.
|
|
55
|
+
- Apply the official menu backdrop material and preserve picker focus through model selection, pane changes, and search dismissal.
|
|
56
|
+
- Keep search autofocus and return focus to the trigger when Escape closes the summary.
|
|
57
|
+
- Verify official DSH 0.1.7-rc.2 with open-ended Host dependency ranges.
|
|
58
|
+
|
|
59
|
+
## v0.4.15
|
|
60
|
+
|
|
61
|
+
Accept DSH releases from 0.1.7-alpha.2 onward through open-ended peer and development ranges. Rebuild and verify against official 0.1.7-rc.1 without changing model routing behavior.
|
|
62
|
+
|
|
63
|
+
## v0.4.14
|
|
64
|
+
|
|
65
|
+
Target official DSH `0.1.7-alpha.2`, pin Provider UI `0.2.12`, and move Main, Subagent, search, image, and compaction controls to published ConfigForms. On non-loopback browsers the official forms are memory-only: Settings shows an explicit unavailable state and the picker refuses selections that would otherwise persist a deployment-wide default without a safe restoration path.
|
|
66
|
+
|
|
67
|
+
## v0.4.13
|
|
68
|
+
|
|
69
|
+
Replacement Subagent runtime exposes public `resolveMaxDepth` so Host 0.1.6-alpha.2 Standard remount keeps Model Switch routing. Compile target stays `0.1.5-rc.1`.
|
|
70
|
+
|
|
71
|
+
## v0.4.12
|
|
72
|
+
|
|
73
|
+
Optional Default Subagent route (Official inherit when off) and Switch compaction as a Send protection B-row.
|
|
74
|
+
|
|
75
|
+
## v0.4.11
|
|
76
|
+
|
|
77
|
+
Rank live catalogRoutes. Compact-on-switch uses previous-provider usage when present.
|
|
78
|
+
|
|
79
|
+
# Changelog
|
|
80
|
+
|
|
81
|
+
## [0.4.10] - 2026-09-13
|
|
82
|
+
|
|
83
|
+
- Include completion notices in the send-time budget; verify concurrent sessions, retained-input retry, live progress, and durable notice replay through the real agent loop.
|
|
84
|
+
- On send, when the assembled target model or context-tier id differs from the last request, check the pending request against the target window and compact once with the previous model if needed. Picker-only changes do no work. Default on; Settings → Model Switch can turn it off without disabling DSH automatic compaction.
|
|
85
|
+
- DSH Host packages are no longer version-locked. `@deepseek-ai/dsh-*` peers are `*` and optional; unknown Hosts warn once and still mount. Cordis stays `>=4.0.2 <5.0.0`. Compile-target `devDependencies` remain `0.1.5-rc.1`.
|
|
86
|
+
- Keep Fast / Context / Thinking / Effort switches on the current Agent after a turn; disable unpublished sibling rows instead of ignoring clicks.
|
|
87
|
+
- Composer picker Cursor mark comes from `dsh-llm-providers-ui` 0.2.6.
|
|
88
|
+
|
|
89
|
+
## [0.4.9] - 2026-09-09
|
|
90
|
+
|
|
91
|
+
- Reserve the selected execution runtime as soon as a prompt is submitted, before the first token or native binding.
|
|
92
|
+
- Native Antigravity keeps its models and effort; DSH keeps LLM-provider choices and disables Agent providers until cancel or a durable native binding.
|
|
93
|
+
|
|
94
|
+
## [0.4.8] - 2026-09-07
|
|
95
|
+
|
|
96
|
+
- Development dependency now points at the final `dsh-llm-providers-ui` 0.1.10 release URL with pinned integrity; Alpha.4 fixtures updated coherently (roots + provider identity + fresh self-root tarball).
|
|
97
|
+
|
|
98
|
+
## [0.4.7] - 2026-09-06
|
|
99
|
+
|
|
100
|
+
- Unify provider-owned independent Web search metadata and execution for DeepSeek, Codex and Grok through the existing adapter registry and authenticated capability RPC.
|
|
101
|
+
- Reuse official DeepSeek search settings/credentials and preserve the deployment’s complete Web config, including fetchProvider. Global search routing remains an explicit opt-in with no silent fallback.
|
|
102
|
+
- Recover capability polling after transient failures and Host revision resets; skip unchanged heartbeats without hiding unload warnings or enabling stale saves.
|
|
103
|
+
- Preserve Antigravity session routing and released v0.4.6 runtime compatibility; correct picker test fixtures without weakening approval safety assertions.
|
|
104
|
+
- Coordinate with Codex 0.3.14, Grok 0.3.11 and Provider Directory 0.1.9; install and validate immutable packages in lab before production promotion.
|
|
105
|
+
|
|
106
|
+
## [0.4.6] - 2026-09-03
|
|
107
|
+
|
|
108
|
+
### Changed
|
|
109
|
+
|
|
110
|
+
- DSH compatibility declarations cover the verified Alpha.4 and rc.1 runtimes.
|
|
111
|
+
- Unknown runtimes warn once and use the normal best-effort mount path; only reproduced failures may be blocklisted.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## 0.4.2
|
|
115
|
+
|
|
116
|
+
- Settings → LLM Providers: drag cards to reorder; chat picker follows `llm-providers.order` via dsh-llm-providers-ui.
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
## 0.4.3
|
|
120
|
+
|
|
121
|
+
- Keep a Host-accepted composer selection visible while its durable Session projection catches up, then return authority to newer projected selections.
|
|
122
|
+
|
|
123
|
+
## 0.4.1 - 2026-08-29
|
|
124
|
+
|
|
125
|
+
- Support DSH 0.1.2-alpha.1 through the public Cordis, Settings, Remote, Session, and Model Directory services after the monolithic client runtime removal.
|
|
126
|
+
- Carry fixed Subagent reasoning effort on alpha.1.
|
|
127
|
+
- Let the composer model trigger use the full available seat width on mobile instead of clipping long model labels.
|
|
128
|
+
- Keep Composer and Plan model switches session-local with a revision-fenced Main-default restore where the Host couples session selection to deployment defaults.
|
|
129
|
+
- Publish bilingual product documentation and screenshots, including the provider-catalog rules for custom Picker families.
|
|
130
|
+
|
|
131
|
+
## 0.3.11 - 2026-08-27
|
|
132
|
+
|
|
133
|
+
- Lock the real composer UI path for independent Context 1M and Fast On selection: when the provider catalog publishes a combined `*-1m-fast` row, the picker preserves both dimensions and submits that exact model id.
|
|
134
|
+
- Document through regression evidence that providers must publish the combined row; separate `*-1m` and `*-fast` rows cannot represent both dimensions simultaneously.
|
|
135
|
+
|
|
136
|
+
## 0.3.10 - 2026-08-27
|
|
137
|
+
|
|
138
|
+
- Keep mobile picker triggers, headings, model names, catalog descriptions, and values readable by rendering and wrapping instead of truncating.
|
|
139
|
+
- Resolve optional mobile interaction operations only through Cordis's typed public non-strict service lookup.
|
|
140
|
+
- Consolidate each picker snapshot and its operations into one render view backed by the official directory status/routability contract, retaining selected routes absent from the advisory catalog.
|
|
141
|
+
- Isolate popup activation, positioning, and dismissal in a deep internal module.
|
|
142
|
+
- Keep composer and Plan Review picker crashes mounted as localized, retryable diagnostics.
|
|
143
|
+
- Preserve Plan Review's one-row mobile footer while shrinking controls and wrapping action labels inside their buttons at narrow widths.
|
|
144
|
+
|
|
145
|
+
## 0.3.9 - 2026-08-27
|
|
146
|
+
|
|
147
|
+
- Preserve the 320px preferred picker width whenever the mobile viewport allows it, shifting away from the trigger instead of squeezing to 240px.
|
|
148
|
+
- Hide horizontal list overflow while retaining vertical scrolling, removing the mobile horizontal scrollbar.
|
|
149
|
+
|
|
150
|
+
## 0.3.8 - 2026-08-27
|
|
151
|
+
|
|
152
|
+
- Keep a mobile pointer's open/close intent idempotent through the 750ms tap-fallback window so a detail-zero programmatic click cannot reopen a picker that the user just closed.
|
|
153
|
+
|
|
154
|
+
## 0.3.7 - 2026-08-27
|
|
155
|
+
|
|
156
|
+
- Make click the sole owner of picker toggle state so one mobile touch cannot open on pointerdown and immediately close on its synthetic click.
|
|
157
|
+
|
|
158
|
+
## 0.3.6 - 2026-08-27
|
|
159
|
+
|
|
160
|
+
- Restore non-strict lookup for the optional mobile interaction service; Cordis may reject direct undeclared-property access, which previously crashed the custom seat on render.
|
|
161
|
+
|
|
162
|
+
## 0.3.5 - 2026-08-27
|
|
163
|
+
|
|
164
|
+
- Declare the merged picker's Sessions and model-directory services in the client plugin's top-level injection contract so production completes the custom seat registration.
|
|
165
|
+
|
|
166
|
+
## 0.3.4 - 2026-08-27
|
|
167
|
+
|
|
168
|
+
- Contain composer-seat render/effect errors inside the merged picker so a crash cannot silently abdicate to the official picker; show a retryable diagnostic instead.
|
|
169
|
+
- Treat the Sessions face as optional while the public model-directory service gate is active.
|
|
170
|
+
|
|
171
|
+
## 0.3.3 - 2026-08-27
|
|
172
|
+
|
|
173
|
+
- Restore merged picker ownership of the composer model seat by matching the official service gate and using an unambiguous winning priority.
|
|
174
|
+
- Treat optional mobile interaction-surface failures as a graceful degradation instead of crashing and abdicating the custom seat to the official picker.
|
|
175
|
+
|
|
176
|
+
## 0.3.2 - 2026-08-27
|
|
177
|
+
|
|
178
|
+
- Match Model Switch route cards to the shared LLM Providers chrome: radius, fill, border, spacing, icon treatment, title weight, summary size, chevron, and expanded body.
|
|
179
|
+
|
|
180
|
+
## 0.3.1 - 2026-08-27
|
|
181
|
+
|
|
182
|
+
- Keep the Model Switch settings nav glyph after the official Settings shell redraws its SVG.
|
|
183
|
+
- Restore a visible platform-gray fill for collapsed route cards; every route remains collapsed on mount.
|
|
184
|
+
|
|
185
|
+
## 0.3.0 - 2026-08-27
|
|
186
|
+
|
|
187
|
+
- Absorb the composer model picker and Plan Review execution picker into this package.
|
|
188
|
+
- Plan Review uses the official warn-strip card, a short capsule trigger, and a two-level Model/Effort/Context/Fast/Thinking menu.
|
|
189
|
+
- One `dsh plugin add dsh-model-switch` now covers routing Settings and composer/Plan selection. Remove a standalone `dsh-composer-picker` install to avoid a second model seat.
|
|
190
|
+
- Picker trigger shows the family name plus distinct effort / Fast / context bits; duplicate context windows collapse to one menu row.
|
|
191
|
+
- Known limitations: Settings nav icon still patches official nav DOM (no public icon field, same pattern as usage-monitor).
|
|
192
|
+
|
|
193
|
+
## 0.2.0 - 2026-08-26
|
|
194
|
+
|
|
195
|
+
- Keep official `web_search` ownership and add a thin `model-switch` Web Search provider with Codex model routing.
|
|
196
|
+
- Add stable `generate_image` routing through optional Codex and Grok adapters, with provider-specific schemas regenerated after Image route changes.
|
|
197
|
+
- Add Search and Image settings cards while keeping Vision/read_image excluded.
|
|
198
|
+
- Preserve existing provider-specific image tools and `web_fetch` as rollback paths.
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
## 0.1.1 - 2026-08-26
|
|
202
|
+
|
|
203
|
+
- Ship compiled Host/Client `lib/` in the git tag so `github:…#v0.1.1` installs can boot.
|
|
204
|
+
|
|
205
|
+
## 0.1.0 - 2026-08-26
|
|
206
|
+
|
|
207
|
+
- Add Main default and follow-main/fixed Subagent model routing for DSH 0.1.1-rc.2.
|
|
208
|
+
- Resolve follow-main from the active parent request header before stale session options.
|
|
209
|
+
- Preserve inherited provider/model when rc.2 cannot carry reasoning effort.
|
|
210
|
+
- Leave Search, Vision, image reading, ordinary chat attachments, and image generation on their existing official/provider paths.
|
|
211
|
+
- Add localized Model Switch settings and clean plugin lifecycle integration.
|
|
212
|
+
- Keep ordinary chat attachments on the official DSH path.
|
package/IMPLEMENTATION_PLAN.md
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
# Model Switch implementation plan
|
|
2
|
-
|
|
3
|
-
## Milestone 1 — package and pure routing core
|
|
4
|
-
|
|
5
|
-
1. Establish the publishable package, strict TypeScript declaration build, ESM bundle, and fail-closed Cordis entry.
|
|
6
|
-
2. Preserve the released Main/Subagent deep modules. Add two confirmed v0.2 seams: a `ModelSwitchSearchProvider` implementing the official `WebSearchProvider` interface over a provider adapter registry, and a stable `generate_image` tool over an Image adapter registry. Keep Vision outside runtime delivery.
|
|
7
|
-
3. Gate an actual tarball: load every export target from extraction; reject source, tests, scripts, source maps, patch/diff payloads, Core paths/fork contracts, and local dependency protocols.
|
|
8
|
-
4. Prove emitted artifacts reproduce from different checkout paths.
|
|
9
|
-
|
|
10
|
-
**Completion:** `pnpm run check` and `git diff --check` pass. No DSH runtime, UI, preset, or lab changes occur.
|
|
11
|
-
|
|
12
|
-
## Milestone 2 — released runtime seams
|
|
13
|
-
|
|
14
|
-
Register each feasible Settings/runtime capability only through released public Cordis/DSH interfaces, and expose every unavailable route as explicit capability data rather than simulated behavior. Contract-test against clean alpha.1 infrastructure rather than a hand-built context alone.
|
|
15
|
-
|
|
16
|
-
**Implemented foundation on alpha.1:** Model Switch owns its Settings namespace; Main reads/saves through the official Agent Default Model service; registration, committed updates, Main delegation, and disposal are covered by a real Cordis + Settings composition test.
|
|
17
|
-
|
|
18
|
-
**Implemented coordinated replacement:** the package bundle patch disables the released Loader row with id `subagent` and inserts the uniquely identified plugin-owned `dsh-model-switch/subagent-runtime`; removing the bundle restores the official profile composition. The replacement selects provider/model/effort before delegating to the official alpha.1 one-shot and continuable descriptor creation, and fails closed for partial routes, ambiguous or unexpected rows, and unsupported effort transport. Do not replace the launcher-pinned AgentPresets row: a nested AgentPresets instance loads a second dsh-scope identity and breaks session.create. Official presets consume the replacement `subagents` service after the Subagent Loader row is replaced. Search must use the released Web provider seam rather than registering a duplicate tool; Image may register only the unique `generate_image` name.
|
|
19
|
-
|
|
20
|
-
Known seam constraints from alpha.1 inspection:
|
|
21
|
-
|
|
22
|
-
- Web session creation has no atomic create-time model override; use the existing public Main Settings namespace rather than post-create selection. The Host couples `session.selectModel` to a deployment-default write, so the owned composer/Plan picker restores the captured Main default through `settings.mutate` at the immediately following revision; conflicts are left untouched so concurrent Settings edits win.
|
|
23
|
-
- Tool registration has disposal but no atomic replacement; stage complete generations and roll back on registration failure.
|
|
24
|
-
- A later child model switch cannot rewrite its durable continuable descriptor; creation snapshots remain authoritative.
|
|
25
|
-
- Search routing owns only provider id `model-switch`; the deployment profile pins `web.searchProvider: model-switch` while preserving its existing `fetchProvider`. The official `web_search` and `web_fetch` tools are untouched.
|
|
26
|
-
- `generate_image` is unique, so existing provider-specific image tools remain enabled and require no owner suppression.
|
|
27
|
-
- Codex and Grok register Search and Image adapters. The DeepSeek bridge reuses the official public search implementation and existing settings/credential service. Optional Cordis injection preserves standalone provider behavior and disposal; only Host-projected search metadata reaches the UI.
|
|
28
|
-
- Vision remains outside runtime delivery and must not register or shadow `read_image`.
|
|
29
|
-
|
|
30
|
-
## Milestone 3 — settings surface
|
|
31
|
-
|
|
32
|
-
Contribute the Model Switch settings section through declared client slots (alpha.1 has no generic standalone page registry). Use one lifecycle controller/store, three derived prop shares, plain presentation data/callbacks, optimistic revisions, independent row saves, capability filtering, and zh/en dictionaries.
|
|
33
|
-
|
|
34
|
-
## Milestone 4 — provider adapters and composition
|
|
35
|
-
|
|
36
|
-
Keep the launcher-pinned `agent-presets` row and official web tools. Add clean optional adapter releases to Codex and Grok without Vision or hard runtime dependency cycles. Explicitly configure Lab `web.searchProvider` to `model-switch` while preserving the complete existing Web config, including `fetchProvider`. The bundle does not modify the Web row; restore the prior deployment search pin before removing Model Switch. Model Switch ships no preset copies.
|
|
37
|
-
|
|
38
|
-
## Milestone 5 — pack/profile/lab acceptance
|
|
39
|
-
|
|
40
|
-
Run the full composition matrix from packed artifacts under `DSH_HOME=~/.dsh-lab` on port 3082. Validate boot, HTTP, profile composition, and artifact hashes; leave browser-only visual checks to the human because the managed browser must not open DSH itself.
|
|
1
|
+
# Model Switch implementation plan
|
|
2
|
+
|
|
3
|
+
## Milestone 1 — package and pure routing core
|
|
4
|
+
|
|
5
|
+
1. Establish the publishable package, strict TypeScript declaration build, ESM bundle, and fail-closed Cordis entry.
|
|
6
|
+
2. Preserve the released Main/Subagent deep modules. Add two confirmed v0.2 seams: a `ModelSwitchSearchProvider` implementing the official `WebSearchProvider` interface over a provider adapter registry, and a stable `generate_image` tool over an Image adapter registry. Keep Vision outside runtime delivery.
|
|
7
|
+
3. Gate an actual tarball: load every export target from extraction; reject source, tests, scripts, source maps, patch/diff payloads, Core paths/fork contracts, and local dependency protocols.
|
|
8
|
+
4. Prove emitted artifacts reproduce from different checkout paths.
|
|
9
|
+
|
|
10
|
+
**Completion:** `pnpm run check` and `git diff --check` pass. No DSH runtime, UI, preset, or lab changes occur.
|
|
11
|
+
|
|
12
|
+
## Milestone 2 — released runtime seams
|
|
13
|
+
|
|
14
|
+
Register each feasible Settings/runtime capability only through released public Cordis/DSH interfaces, and expose every unavailable route as explicit capability data rather than simulated behavior. Contract-test against clean alpha.1 infrastructure rather than a hand-built context alone.
|
|
15
|
+
|
|
16
|
+
**Implemented foundation on alpha.1:** Model Switch owns its Settings namespace; Main reads/saves through the official Agent Default Model service; registration, committed updates, Main delegation, and disposal are covered by a real Cordis + Settings composition test.
|
|
17
|
+
|
|
18
|
+
**Implemented coordinated replacement:** the package bundle patch disables the released Loader row with id `subagent` and inserts the uniquely identified plugin-owned `dsh-model-switch/subagent-runtime`; removing the bundle restores the official profile composition. The replacement selects provider/model/effort before delegating to the official alpha.1 one-shot and continuable descriptor creation, and fails closed for partial routes, ambiguous or unexpected rows, and unsupported effort transport. Do not replace the launcher-pinned AgentPresets row: a nested AgentPresets instance loads a second dsh-scope identity and breaks session.create. Official presets consume the replacement `subagents` service after the Subagent Loader row is replaced. Search must use the released Web provider seam rather than registering a duplicate tool; Image may register only the unique `generate_image` name.
|
|
19
|
+
|
|
20
|
+
Known seam constraints from alpha.1 inspection:
|
|
21
|
+
|
|
22
|
+
- Web session creation has no atomic create-time model override; use the existing public Main Settings namespace rather than post-create selection. The Host couples `session.selectModel` to a deployment-default write, so the owned composer/Plan picker restores the captured Main default through `settings.mutate` at the immediately following revision; conflicts are left untouched so concurrent Settings edits win.
|
|
23
|
+
- Tool registration has disposal but no atomic replacement; stage complete generations and roll back on registration failure.
|
|
24
|
+
- A later child model switch cannot rewrite its durable continuable descriptor; creation snapshots remain authoritative.
|
|
25
|
+
- Search routing owns only provider id `model-switch`; the deployment profile pins `web.searchProvider: model-switch` while preserving its existing `fetchProvider`. The official `web_search` and `web_fetch` tools are untouched.
|
|
26
|
+
- `generate_image` is unique, so existing provider-specific image tools remain enabled and require no owner suppression.
|
|
27
|
+
- Codex and Grok register Search and Image adapters. The DeepSeek bridge reuses the official public search implementation and existing settings/credential service. Optional Cordis injection preserves standalone provider behavior and disposal; only Host-projected search metadata reaches the UI.
|
|
28
|
+
- Vision remains outside runtime delivery and must not register or shadow `read_image`.
|
|
29
|
+
|
|
30
|
+
## Milestone 3 — settings surface
|
|
31
|
+
|
|
32
|
+
Contribute the Model Switch settings section through declared client slots (alpha.1 has no generic standalone page registry). Use one lifecycle controller/store, three derived prop shares, plain presentation data/callbacks, optimistic revisions, independent row saves, capability filtering, and zh/en dictionaries.
|
|
33
|
+
|
|
34
|
+
## Milestone 4 — provider adapters and composition
|
|
35
|
+
|
|
36
|
+
Keep the launcher-pinned `agent-presets` row and official web tools. Add clean optional adapter releases to Codex and Grok without Vision or hard runtime dependency cycles. Explicitly configure Lab `web.searchProvider` to `model-switch` while preserving the complete existing Web config, including `fetchProvider`. The bundle does not modify the Web row; restore the prior deployment search pin before removing Model Switch. Model Switch ships no preset copies.
|
|
37
|
+
|
|
38
|
+
## Milestone 5 — pack/profile/lab acceptance
|
|
39
|
+
|
|
40
|
+
Run the full composition matrix from packed artifacts under `DSH_HOME=~/.dsh-lab` on port 3082. Validate boot, HTTP, profile composition, and artifact hashes; leave browser-only visual checks to the human because the managed browser must not open DSH itself.
|