deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:xiaohj233/dsh-resume
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Status: Feature Plugin with Compatibility Patch. Tested only with DeepSeek Harness 0.1.0-rc.6.
dsh-resume adds two continuity behaviors to the DSH Web profile: an interrupted turn can continue from an empty submit without adding a visible "continue" message, and sessions that were still running when DSH stopped can be resumed after the next boot.
Upstream DSH can resume stored sessions and repair torn logs, but it does not treat an empty composer submission as continuation and does not automatically restart the exact set of sessions and subagents that were active at process shutdown.
~/.dsh/resume-state.json.resume_interrupted_subagents.~/.dsh/resume-state.log.This package does not import sessions from other agents, rewind arbitrary turns, migrate workspaces, guarantee that a remote provider can reproduce an interrupted stream byte-for-byte, or repair every upstream session-log race.
The host plugin listens to agent lifecycle events and uses the official agents.resume service. Compatibility patches add partial-turn folding and empty-submit handling to:
@deepseek-ai/dsh-agent-loop@0.1.0-rc.6@deepseek-ai/dsh-session@0.1.0-rc.6@deepseek-ai/dsh-client-ui-conversation@0.1.0-rc.6Every target hunk is idempotent and has an explicit reverse operation. Version policy is adaptive by default: a copy whose installed version differs from 0.1.0-rc.6 is still patched when every hunk anchor matches uniquely (recorded as an adaptive match), and skipped with a reason when anchors drifted. The programmatic strict option restores the old exact-version-only apply behavior. One drifted copy never blocks the others, and patch application never throws during module loading, so an upstream upgrade cannot brick the agent loop. Restore remains strictly version-guarded in every mode.
Tested with DeepSeek Harness 0.1.0-rc.6, Node.js ^22.19.0 || >=24, and pnpm >=10. After an upstream upgrade, run dsh-resume-restore and verify:anchors once to confirm every hunk is either applied or intentionally skipped.
dsh plugin --profile web add "github:xiaohj233/dsh-resume#v0.2.1"
Restart the Web profile. Startup applies the guarded compatibility patches before enabling resume behavior.
Override the dsh-resume row in a later profile patch when needed:
- id: dsh-resume
config:
enabled: true
restoreDelayMs: 2000
enabled controls startup restoration. Runtime tracking remains active so a later enabled boot can restore the recorded set.
Restore official package files before removing the plugin:
pnpm --dir "$DSH_HOME/profiles/web" exec dsh-resume-restore
dsh plugin --profile web remove dsh-resume
When $DSH_HOME is unset the profile lives under the home directory (POSIX: ~/.dsh/profiles/web; Windows PowerShell: %USERPROFILE%\.dsh\profiles\web); on Windows pass the resolved path to pnpm --dir instead of ~. Normal Cordis shutdown does not reverse patches; shutdown is when continuity state must be preserved.
After uninstall, resume-state.json and resume-state.log are no longer read. Delete them manually if their session identifiers and diagnostics are no longer needed.
The state and log files contain session/subagent identifiers, model and recovery diagnostics, and failure messages. They do not intentionally store credential values, but they should be treated as private runtime data. Automatic restoration can issue new model requests and incur provider usage.
npm test
npm run check
npm pack --dry-run
The test suite covers exact version refusal, unique-anchor refusal, whole-run atomicity, idempotence, byte-exact patch/restore round trips, normal-shutdown behavior, and restore CLI failures.
Upstream already provides resumeSessionId, interrupted-turn closers, checkpoints, and session persistence. This package builds on those mechanisms and patches only the missing empty-continuation and shutdown-set restoration behavior. DSH Discussion #420 documents an upstream resume/closer sequence race that this package does not claim to eliminate.
MIT. Patch targets are MIT-licensed; see THIRD_PARTY_NOTICES.md.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。