Releases: xiaohj233/dsh-keepalive
Release list
dsh-keepalive v0.2.12
fix: front-end plugin-failure detection now reports ONLY real plugin module-load failures.
Three rounds of false positives showed the earlier heuristics were too broad:
- window
errorevents caught arbitrary page script errors (e.g. a syntax error "Unexpected token ')'" in a plugin being edited) -> reported as plugin failures. - slots.onEntryError caught entry RENDER crashes (React error #130 on settings.section) -> also reported, but render crashes are UI-layer issues the repair agent cannot fix.
v0.2.12 reports only when the browser emits an explicit dynamic-import failure message ("Failed to fetch dynamically imported module" / "error loading dynamically imported module" / import-related). window error listeners and slots.onEntryError are removed. Watchdog-side guard remains: a degraded repair that changes nothing clears the report WITHOUT relaunching the web (no interruption).
Also surfaced in this session (unrelated to keepalive): D:\Code\dsh-cot-translate\client.js had a syntax error (missing closing brace) that was fixed manually (node --check passes, web boots).
dsh-keepalive v0.2.10
Front-end plugin failure reporting + degraded repair + global progress banner.
The watchdog previously only repaired launch failures (web down). A plugin failing to load in the BROWSER while the web process stays up (e.g. module-top-level raf is not defined) was invisible to it. Now:
- keepalive client watches window
error/unhandledrejectionand reports plugin-shaped failures to the host's new POST /api/keepalive/report-plugin-failure (throttled, trusted-loopback only). - The watchdog detects the report in keepalive.json and runs a DEGRADED repair while the web stays up: snapshot skips live dirs (sessions/storages/resume-state/settings.yaml that the running web writes), same headless agent + gates + rollback, then relaunches web to reload plugins and clears the report. Failed repairs clear the report so the watchdog never hot-loops.
- A global repair progress banner (fixed bottom-right, any page) renders while status=repairing: phase (检测故障/快照与审计/修复代理执行中/验证修复/正在重启服务) + agent [进度] lines + failure reason. It surfaces only during an actual repair: the host returns repairProgress only when status==repairing, and the watchdog clears the sidecar file on startup (crash recovery) and when a repair ends.
- Fixes found during end-to-end testing: runPluginFailureRepair referenced the main loop's local bootWait (crash); skipLiveDirs now also excludes resume-state.json and settings.yaml which the running web rewrites; KEEPALIVE_DYNAMIC includes pluginFailure.
End-to-end verified: removed the let raf = 0 declaration in dialog-optimize/client.js -> POSTed the front-end error -> watchdog detected it, the repair agent re-added the declaration (byte-identical to backup, node --check pass) -> web relaunched, report cleared, status back to watching. Full suite green.
dsh-keepalive v0.2.9
fix: the repair scope resolver previously treated the web profile's official @deepseek-ai/* link: dependencies as user dev checkouts. That made the snapshot copy 38 official packages (large, and wrongly writable by the repair agent) and broke the repair workspace root (install tree vs user code share only the drive letter, so the common parent fell back to the web profile and the agent could not write any link-target source).
Now:
- link:/file: targets whose package.json name starts with @deepseek-ai/ are excluded from link roots, snapshots, and source-edit scope.
- The headless repair agent's workspace root is the common parent of the remaining user dev checkouts (e.g. D:\Code), so the sanctioned minimal source edits (v0.2.8) actually land; writes stay bounded by the snapshot audit.
- The repair prompt names the workspace root and the exact allowed link-target dirs.
Verified end-to-end on a real failure: injected a syntax error into D:\Code\dialog-optimize\index.js -> web boot failed -> repair status page served on :3080 -> headless agent removed the injected line (node --check pass, byte-compared to backup) -> gates passed -> web relaunched and the page redirected back to the UI. Snapshot shrank from 1234 to 436 files.
Tests: new scenario for official-link exclusion (snapshot-rollback: 31 passed), full suite green.
dsh-keepalive v0.2.8
Repair status page: when a web launch fails and a repair begins, the watchdog now serves a zero-dependency status page on the web port (default 3080) instead of leaving "connection refused". It shows the failure, the live repair phase (detected/snapshot/agent-running/verifying/relaunching), the repair agent's real stdout stream ([agent] lines plus the new [进度] progress lines the agent is asked to emit), and elapsed vs timeout time. On success the page auto-redirects back to the web UI; on failure it shows the agent's conclusion. The page is served by the watchdog itself (Node http, no deps) and is released before the final web relaunch to avoid EADDRINUSE.
Repair scope: the repair agent may now make minimal source fixes inside the dev-checkout root that owns the failing plugin (link:/file: directory deps) — e.g. add a missing variable declaration, fix an import, repair syntax. That root is content-snapshotted and rollback-capable; file deletion is forbidden by the prompt and rolled back if it happens. Junction-additions under link-target node_modules remain supported.
Headless repair prompt now requires a one-line [进度] stage report after each major step, streamed live to the status page.
Tests: 5 new snapshot-rollback scenarios (link-target source edit/add/delete/rollback) and a new repair-page suite (8 checks: status API, HTML, phase flow, progress, port release). Full suite: 158 passed.
dsh-keepalive v0.2.7
Repair scope extension: the repair agent may now add dependency junctions under the node_modules of link:/file: (directory) dev-checkout dependencies declared in the web profile package.json. Additions are snapshot-tracked and removed on rollback; existing entries and the dev checkout source/config are never touched. This lets the auto-repair fix ERR_MODULE_NOT_FOUND failures for local link-installed plugins (e.g. @dsh-external/dsh-super-injector) instead of stopping with a manual-only diagnosis.
Fix false drift: watchdog-managed dynamic fields of keepalive.json (status, updatedAt, webPid, lastError, repairCount, lastRestoredAt, watchdogPid) no longer fail a repair pass as out-of-bounds drift when the watchdog refreshes them while the headless agent runs; static fields (enabled, autoRepair, repairProvider, repairModel, intervals, dshBin) are still gated.
Fix Windows junction detection in the snapshot layer: junction entries report isSymbolicLink() (not isDirectory()) under readdirSync, so top-level link-target entries are now tracked correctly.
Tests: 6 new snapshot-rollback scenarios (sanctioned junction additions, delete/retarget drift, rollback removal, keepalive dynamic-field exemption, static-field gating). Full suite: 144 passed.
dsh-keepalive v0.2.4
Repair scope extended to GitHub-installed user plugins under profiles/web/node_modules/dsh-* (snapshot/diff/rollback now cover them; official @deepseek-ai packages stay out of scope). Repair agent runs with cwd = the web profile and its prompt names both allowed trees. Repair model requests reasoningEffort max by default (configurable via keepalive.repairReasoningEffort). Headless timeout raised to 900s with an explicit TIMED OUT log marker.
dsh-keepalive v0.2.3
The repair agent previously failed immediately with MISSING_CREDENTIAL because the isolated repair runtime had no credential file. The watchdog now copies $DSH_HOME/.credentials.yaml into the temporary repair home before the headless run and removes it afterwards; the runtime directory is kept for diagnostics.
dsh-keepalive v0.2.2
The browser client was not being mounted because dsh.client.inject (module dependencies) was empty; the settings card never rendered.
Declares the client runtime, settings, connection, remotes, and locale module dependencies so Cordis mounts the card plugin.
Verified: Settings > Plugins now shows the keepalive card.
dsh-keepalive v0.2.1
Settings-namespace row now inserts at the top of the allowlist array, so it cannot consume the tail anchor shared with dsh-tavily-search-provider.
Both plugins coexist in either install order; each restore keeps the other plugin row.
Legacy tail layouts from older releases are detected as already-patched and never duplicated.
Chinese README with language cross-links.
dsh-keepalive v0.2.0
Adaptive version policy with strict option; patch failures never block host or watchdog startup.
Restore/uninstall remains strictly version-guarded.
Chinese README (README.zh.md) added.