dsh-model-switch 0.4.32 → 0.4.33
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 +9 -1
- package/lib/auto-review-BLtwr83V.js +738 -0
- package/lib/auto-review.js +2 -718
- package/lib/client.js +5 -2
- package/lib/compaction.js +1 -1
- package/lib/index.js +8 -2
- package/lib/session-route-D1zoZgf3.js +258 -0
- package/lib/session-title.js +1 -1
- package/lib/subagent-runtime.js +1 -1
- package/lib/types/auto-review.d.ts +13 -0
- package/lib/types/client/locales.d.ts +1 -0
- package/lib/types/host-runtime.d.ts +7 -0
- package/lib/types/runtime-capabilities.d.ts +12 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## v0.4.33
|
|
2
|
+
|
|
3
|
+
The reviewer takeover now reports its own health to the settings page instead of only writing a Host log line.
|
|
4
|
+
|
|
5
|
+
- **Runtime-capability field (`src/runtime-capabilities.ts`, `src/host-runtime.ts`).** `autoReview` joins the capability snapshot: `{ available: true }` while this row holds the official reviewer route, `{ available: false, reason: 'auto-review-takeover' }` once it does not. The value comes from a live record (`autoReviewStatus` in `src/auto-review.ts`) updated on every claim, on the lost-seam path, and by the tool-call safety net — which also counts the calls it allowed unreviewed, so the card can say how much review was skipped.
|
|
6
|
+
- **Settings card warning (`src/client/ModelSwitchSettings.tsx`, `src/client/locales.ts`).** The「自动审查」section renders `autoReviewTakeoverNote` while the route is held and `autoReviewTakeoverWarning` otherwise (zh + en: tool calls keep running, those calls are unreviewed, restart DSH to converge). What used to be a Host-only log line is now visible where the human configures the route.
|
|
7
|
+
- **Verification.** `pnpm run check` green (55 test files / 494 tests + pack gate). The safety net's test now also asserts the allowed-call counter the snapshot reads, so the card's data path is covered end to end (host record → capability snapshot → card text selected by `available`).
|
|
8
|
+
|
|
1
9
|
## v0.4.32
|
|
2
10
|
|
|
3
11
|
A hot install could still break every tool call: replacing the plugin (disable → remove → install → enable, **without a DSH restart**) leaves the official `auto-review` row serving while this row's takeover is still trying to displace it, and its unshielded probe fails each call. This release makes that window non-fatal and shortens it.
|
|
@@ -6,7 +14,7 @@ A hot install could still break every tool call: replacing the plugin (disable
|
|
|
6
14
|
- **The takeover budget matches a real disposal (`src/auto-review-takeover.ts`).** 20×10 ms (~200 ms) → 60×50 ms (~3 s), plus `TAKEOVER_LATE_RETRY_DELAYS_MS` = 500/1000/1500 ms: three bounded re-claims after the loop gives up, because `Entry.update({ disabled: true })` starts the displaced fiber's teardown and the loader does not await it. A disposal that unmounts a gate, restores permission presets and unwinds fibers outlasted the old budget, which is exactly the reported hot-swap window. Timers are cleared with the row.
|
|
7
15
|
- **Actionable failure log.** The lost-seam error now says both what happens next ("the reviewer path is shielded instead of failing tool calls") and what the human can do ("Restart DSH to converge the reviewer row — a hot install cannot always displace the official row in time").
|
|
8
16
|
- **Docs.** `docs/seam-gap.md` records the two remaining gaps: no public seam lets a plugin **replace a bundled capability row at runtime** (only disable-and-reclaim through the loader), and the loader cannot address a row nested in a preset's `config.plugins` — the official bundle row is top-level today, but a future nesting would need a config-level bridge like 0.4.27's preset bridge.
|
|
9
|
-
- **Verification.** `pnpm run check` green (55 test files / 494 tests + pack gate). New coverage: the net allows the call and reports exactly once when the seam is broken, stays inert while this row holds the route, rethrows a reviewer quota error, and classifies an inject failure apart from a denial. The late-retry schedule is bounded by the row's lifetime. **
|
|
17
|
+
- **Verification.** `pnpm run check` green (55 test files / 494 tests + pack gate). New coverage: the net allows the call and reports exactly once when the seam is broken, stays inert while this row holds the route, rethrows a reviewer quota error, and classifies an inject failure apart from a denial. The late-retry schedule is bounded by the row's lifetime. **Lab evidence, released artifact:** the published `dsh-model-switch@0.4.32` was installed into the lab profile (`DSH_HOME=~/.dsh-lab`, dependency pinned to the registry version) and booted on 3082 with the official `auto-review` row **force-enabled** in the profile patch — the Host started, served its token URL, and reported no failed activation, so the takeover and the new budget converge at startup on the immutable artifact. **Still not reproduced:** the *runtime* toggle (enabling the official row while the Host is already serving) together with a real tool call — plugin logs do not reach stdout in web mode, so that needs the Host API or a browser-driven session.
|
|
10
18
|
|
|
11
19
|
## v0.4.31
|
|
12
20
|
|