xiaoshenming / dsh-session-surgeon

목록에 있음

Repair DeepSeek Harness sessions that refuse to load. 修好打不开的 DSH 会话文件。

main세션 소스 보기

설치

npx --yes github:xiaoshenming/dsh-session-surgeon scan

이 명령은 GitHub 저장소 주소에서 생성됩니다. 실행 전에 업스트림 README와 소스를 검토하고 재현성이 필요하면 release 또는 commit을 고정하세요.

README

유지 관리자가 작성한 문서 스냅샷입니다.

GitHub에서 보기 ↗
커밋 a35ea4f동기화 2026. 8. 18.

최근 디렉터리 동기화에서 이 README 스냅샷을 새로 고치지 못했습니다.

dsh-session-surgeon

Repair DeepSeek Harness sessions that refuse to load.

把打不开、卡死、seq 坏掉的 DSH 会话修回来。官方以后修加载器,也救不回已经坏掉的 session.jsonl.zstd

Compatible with @deepseek-ai/dsh@0.1.0-rc.6.

Install

One command, same as other DSH plugins:

dsh plugin --profile web add "github:xiaoshenming/dsh-session-surgeon#main"

Restart dsh web. Then:

  • Sidebar 会话医生 / Session surgeon: scan, inspect, copy id, dry-run repair, apply repair, compact preview, export JSONL
  • Session ⋯ menu: copy session ID / inspect / dry-run repair

Developers working in a checkout can still use dsh plugin --profile web add link:"$(pwd)".

Why

Real crash families from official Discussions:

  • #317 stack overflow on huge history
  • #1497 / #1586 seq gap in committed region
  • #436 lone UTF-16 surrogate → permanent HTTP 400
  • #674 leftover .tmp plaintext

Cost meters / memory / marketplaces are saturated. Almost nobody repairs the JSONL.

CLI

No dsh web required after the plugin (or this repo) is on disk:

npx --yes github:xiaoshenming/dsh-session-surgeon scan
npx --yes github:xiaoshenming/dsh-session-surgeon inspect <session-id>
npx --yes github:xiaoshenming/dsh-session-surgeon repair <session-id>          # dry-run
npx --yes github:xiaoshenming/dsh-session-surgeon repair <session-id> --apply  # writes .bak.<utc> first

Or from a clone: node bin/dsh-session-surgeon.mjs scan.

Agent tools after install: session_scan / session_inspect / session_repair (apply defaults to false).

Commands

commandmeaning
scan [root]list sessions + header health + orphan .tmp
inspect <id>decode every zstd frame, expand packed rows, report seq gaps
repair <id>default --dry-run; --apply rewrites after .bak.<utc>
compact <id> --keep-last-turns Nkeep the last N complete turns, renumber seq from 0
export <id>JSONL dump; redacts secrets unless --no-redact
index [root]session / parent / goal / health table

--format text prints a human table. Exit 0 on success, 2 on usage error, 1 on not-found / refuse.

What this is not

Not a marketplace, not a token heatmap, not a memory plugin, not a Codex task store.

DSH has session id + optional same-session goal id, not a Codex-style resumable task id. See docs/LEARNING-TASKS.md.

Docs

Safety

  • Default is read-only. Write paths require --apply and write .bak.<utc> first.
  • Never commit raw files from ~/.dsh/sessions (they contain user text and secrets).
  • Do not put @deepseek-ai/dsh-tools in dependencies.
  • Export redacts sk-*, PEM blocks, and home paths unless --no-redact.

License

MIT

프로젝트 파일 및 신호

표시된 항목은 디렉터리 스냅샷에서 감지된 공개 저장소 신호입니다.

테스트감지됨
문서감지됨

저장소 정보

언어
JavaScript
라이선스
MIT
최신 릴리스
v0.1.0
마지막 업데이트
2026. 8. 18. AM 6:55

신중하게 설치하기

소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.