rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:tmt-homelab/dsh-session-auto-resume
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness plugin that automatically resumes agent sessions interrupted by app closure. When the DSH host relaunches, sessions that were mid-work at closure are detected from persisted state and recovered without human action:
goal-round-driver continues the round budget automatically. (The driver deliberately "never revives work on its own"; this plugin performs the explicit resume the driver requires.)The desktop host has quit-time inspection of active work but no startup recovery path: after any closure (crash, SIGTERM, deliberate quit/reload), interrupted sessions stay interrupted until a human notices. This plugin closes that gap entirely outside the app bundle, so it survives app updates.
Tested against a real closure-then-relaunch cycle (operator-approved SIGTERM of the running host; app relaunched):
verify-d1.mjs (included) turns any future closure into a one-command verdict: PASS (exit 0) / FAIL (exit 1, names the broken check + evidence tail) / VOID (exit 2, no closure recorded after the plugin armed). Its own fixture selftest (verify-d1.test.mjs) exercises every verdict path against synthetic evidence trees.
active auto-resumes; paused/blocked goals are deliberate human states and are never re-armed; non-goal sessions are surfaced only. The plugin's installation is the one-time authorization.agents.resume({resumeSessionId, agentOptions, setup}) + goals.resume(agent, {id, revision})), including binding the default model — a resume without a model binding produces turns failing with prompt variable "{{model}}" has no value (the agent loop binds that variable from agent.options). This plugin binds it and logs a loud resume-no-model line if it cannot.headerSeq must reference an earlier request/header) make cold-log markers unsafe; detection is recorded in the plugin's own log instead.Copy this package to ~/.dsh/plugins/dsh-session-auto-resume.
Link it into your profile's dependencies and add it to the profile's dsh.profile.bundles list:
"dependencies": { "@local/dsh-session-auto-resume": "link:/Users/you/.dsh/plugins/dsh-session-auto-resume" },
"dsh": { "profile": { "bundles": [ "@local/dsh-session-auto-resume" ] } }
The package's own cordis.patch.yml carries the required insert row (a bundles-list entry alone is silently skipped). It ships with dryRun: true — the first boot logs would-resume decisions without acting; verify them against your live sessions, then set dryRun: false.
Restart the app. Evidence lands in ~/.dsh/logs/session-auto-resume.log (ARMED on every activation, one pass-done per boot).
node selftest.mjs # classification truth table, fake-ctx passes, mutation checks
node verify-d1.test.mjs # proves verify-d1 on every verdict path (synthetic fixtures)
ELECTRON_RUN_AS_NODE).scanLimit), and the mechanism mounts at boot only (no hot reload of plugin-file changes).Not affiliated with DeepSeek. MIT licensed. Filed upstream as a discussion — this repo is the reference implementation.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。