(feat) hot-reload engine settings via settings.yaml + /acp config (phase 1; supersedes #76) - #130
Conversation
…yaml / /acp config Phase 1 of issue Tyan66666#75: the six scalar knobs (modelContextLimit, autoModelContextLimit, nudgeMin/Max/EmergencyPct, autoNudge) now resolve through the host settings layer (installSettingsSection seam) — editing ~/.dsh/settings.yaml or the new /acp config subcommand applies to running sessions without a restart. Window-key changes clear the probe cache so a fixed gateway re-probes; settingsEnabled:false is a composition-only kill switch. New deps: peer @deepseek-ai/dsh-settings (dual-tuple range) + schemastery peer; dev deps pinned exact (token-meter caret fixed). 188 tests pass incl. E2E via an in-memory provider + the HMR remount gate.
…TS.md module map + design doc Config table rows carry runtime-adjustable markers, a new README section covers settings.yaml / /acp config usage and the kill switch, the window probe-failure copy now points at /acp config, and the docs index lists the new design doc.
…6-09-06 exploration)
…son — unbreak CI on linux
Sync Tyan66666#106 output-reservation, Tyan66666#103 shadow-price (heuristicTokens ?? tokens), Tyan66666#124 tool-pairing local mirror, the dist-bot CI workflow, and related docs into the settings-integration feature branch. Nine conflicts resolved as orthogonal unions (the settings seam and the output-reservation logic are independent and both kept); dist rebuilt from merged source; full regression green (228/228).
Resolve conflicts against the 0.1.5 seam and port the settings wiring. The 0.1.0 seam exposed a free function installSettingsSection(ctx, ns, schema, entry, hooks) plus a settingsNamespace(id) helper; 0.1.5 replaced both with the provider method settingsProvider.installSection(...) reached through ctx.inject(['settings'], ...) and a plain namespace literal branded at the call site. Also: peer range for @deepseek-ai/dsh-settings now spans the 0.1.5 line like the other four seam peers, @deepseek-ai/schemastery is declared as a peer (it is a value import), devDep pinned to 0.1.5-rc.2, and the docs that said four runtime seam packages now say five. dist/ is not carried on the branch: repo policy is that dist-bot rebuilds it after the merge lands.
|
Merged 1. Why the merge was needed, and what the seam adaptation touchedThe branch was written against Adapted in this push: 2. Four findings from a merge review, all fixed
3. Verification
This PR supersedes #76 (it carries the same feature plus |
|
Merged Why it had gone stale — Conflict resolution — one file, one hunk: Everything else auto-merged: dist — reset to Verification — |
Independently re-verified against the current head Build & tests (independent run)
Diff & dist (vs true current
The conflict you flagged — Seam adaptation (spot-checked in code)
Docs — synced: AGENTS.md rule 17 present; README zh/en gained the runtime-settings section + config-table rows (+ One minor nit (non-blocking): Verdict: ready to merge. (Merges stay human-only, so I won't merge it myself.) Once it lands, #76 can be closed as superseded. 一句话中文:独立复验通过——typecheck 干净、280/280、 |
What this PR does
Makes the engine's runtime configuration hot-editable, no restart required. The six scalar knobs —
modelContextLimit,autoModelContextLimit,nudgeMinContextLimitPct,nudgeMaxContextLimitPct,nudgeEmergencyThresholdPct,autoNudge— can now be changed through the host's~/.dsh/settings.yaml(namespacecompaction-acp) and take effect on a running session. Adds a/acp configcommand (list / set / reset) and asettingsEnabledkill switch that reverts to the current composition-layer-only behavior. Full design:docs/settings-integration-design.md.Why a new PR (supersedes #76)
PR #76 carried this exact feature work, but it was branched from an older commit. Since then,
mainshipped three changes that touch the very files this feature rewrites — #106 (output reservation), #103 (shadow-price meter heuristic), #124 (tool-pairing mirror) — which left #76 with conflicts that can no longer be auto-resolved. This branch is the same feature work withmainmerged in and every conflict resolved, so it is cleanly mergeable.Merge notes (what was kept from each side)
src/index.ts: keeps BOTH the settings seam and the output-reservation logic (fields,windowForcap + live gate, and all three methods).src/window.ts: keeps the output-reservation probe.package-lock.json, and the builtdist/are regenerated from the merged source.Verification (all run on the merged branch)
npm run typecheck: clean (tsc --noEmit, zero errors).npm test: 228/228 pass, 0 fail.dist/rebuilt from merged source.Supersedes #76.