Zn-Dk/dsh-session-repair ↗★ 4

dsh-session-repair

DSH Web plugin for session diagnosis, trusted checkpoints, pre-repair backups, and safe repair. 适合需要对异常会话进行健康检查、备份和一键修复的用户。

Package
dsh-session-repair
Compatibility
Unverified
Harness peer range
>=0.1.0-rc.7
Cordis peer range
>=4.0.0-rc <5
Version
0.7.0
License
MIT
Last updated
Sep 29, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Zn-Dk/dsh-session-repair

Usage

Open any session and click Session Health Check in the Chat header. When the report is repairable and has at least one deterministic repair plan, the panel shows a Backup & Repair button and lists every seq chain to fix. Clicking it first confirms the target seqs and the pre-repair backup, then applies the repair in one batch and revalidates; ambiguous, live, changed-artifact, or otherwise blocked states never show a writable repair button.

Panel buttons:

  • Refresh: re-reads the current session artifact and updates the report.
  • Copy Report: copies the diagnostic JSON to the clipboard.
  • Export Report: downloads the diagnostic report as a JSON file.
  • Restore Pre-Repair: shown only when the session is repairable/blocked and a pre-repair backup exists; one-click rollback to the state before the most recent repair.
  • Clear Backups: manually clears safety backups.
  • Backup & Repair: shown only when the report is repairable and a deterministic repair plan exists.

Agent tool (model-invoked)

The plugin registers a model-invokable tool dsh_session_repair. It is not user-triggered manually; the agent decides when to call it:

  • Arguments: sessionId (optional; defaults to the current session)
  • Returns: a structured diagnostic report (severity / checks / repairPlans / maxSeq / eventCount, etc.)

Typical usage:

  1. In a healthy session, tell the agent: "diagnose the history-unavailable session session-xxxx" — the agent calls dsh_session_repair with the old sessionId.
  2. In the current session, tell the agent: "health-check the current session" — the agent calls it without sessionId.

Note: this tool is read-only diagnosis; it never repairs. Repair still requires the Session Health Check panel in the header.