dsh-session-repair
DSH Web plugin for session diagnosis, trusted checkpoints, pre-repair backups, and safe repair. 适合需要对异常会话进行健康检查、备份和一键修复的用户。
Other repositories with this package name
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Zn-Dk/dsh-session-repairREADME
Read the full README ↗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/blockedand 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
repairableand 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:
- In a healthy session, tell the agent: "diagnose the history-unavailable session session-xxxx" — the agent calls
dsh_session_repairwith the old sessionId. - 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.