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

dsh-session-repair

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

패키지
dsh-session-repair
호환성
미검증
Harness peer 범위
>=0.1.0-rc.7
Cordis peer 범위
>=4.0.0-rc <5
버전
0.7.0
라이선스
MIT
최근 업데이트
2026. 9. 29.

같은 패키지 이름의 다른 저장소

설치

$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.