rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Dynesshely/dsh-plugin-endurance
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Run the full duration. Verify until it converges.
A DeepSeek Harness plugin that keeps long-running tasks under real convergence checks until they genuinely settle — not until the model feels finished.
Long-running agent tasks usually end when the model says it is done. For overnight or multi-hour work that is the wrong signal: the task ends early, the artifact is only half-verified, and you find out in the morning that the plan needs another round.
Endurance adds a user-declared convergence contract to a session:
After the model registers the run, Endurance injects model-authored verification prompts at the end of task rounds. The model reports confidence with task_endurance_post, or asks to keep working with task_endurance_reset. The run only settles on the user's terms.
| Mode | Behavior |
|---|---|
converge |
Settles as soon as N consecutive checks pass. The plan duration is a planning reference. |
idempotent_soak |
First reaches N consecutive passes, then keeps frozen-artifact checks on a fixed cadence until the plan time; any rework requires reset. |
The mode is user-owned. When the user has not clearly chosen one, the model asks first — task_endurance_set rejects a missing mode with ENDURANCE_MODE_REQUIRED.
| Tool | Purpose |
|---|---|
task_endurance_set |
Register a run: duration, consecutive passes, gate, check prompt, mode, optional idempotent interval. |
task_endurance_post |
Report this round's confidence (0–100) and evidence. |
task_endurance_reset |
Keep working; clears the consecutive-pass streak. |
task_endurance_status |
Read mode, phase, streak, plan progress, and recent checks. |
task_endurance_cancel |
Stop the run — only on an explicit user request. |
task_endurance_set with a model-authored check prompt template.$endurance_id, $endurance_gate, $endurance_deadline, …), appends a status footer, and injects it as its own user message.task_endurance_post with a confidence or task_endurance_reset to continue.converge settles immediately when the streak is met. idempotent_soak freezes the artifact, re-verifies on an interval until the plan time, and settles there; a regression returns the run to active checks.flowchart TD
U[User declares duration, rounds, gate, mode] --> S[task_endurance_set]
S --> W[Task round]
W --> I[Convergence check injected]
I --> V{Verify}
V -->|work remains| R[task_endurance_reset] --> W
V -->|confident| P[task_endurance_post]
P --> G{streak >= N ?}
G -->|no| I
G -->|yes| M{mode}
M -->|converge| D[Converged]
M -->|idempotent_soak| F[Frozen-artifact checks until plan time] --> D
set / cancel require a direct human turn on a root agent; post / reset require the exact injected check round. A model cannot self-arm a multi-hour run or pad its own streak.counted: false; reset takes precedence over a same-round post.plugin:dsh-plugin-endurance/state records in the owning session, so restart, resume, and reload all recover the same run.The full contract — state machine, tool schemas, prompt placeholders, error codes, and security limits — lives in docs/DESIGN.md.
Requirements: DeepSeek Harness 0.2.2 (or a compatible 0.2.x), Node.js 20+.
Endurance is a host-side plugin: it registers tools, tracks runs, and drives sessions entirely on the Host. It has no client UI yet (the status row and /endurance commands arrive in M2), so it works in Web, Desktop, headless, and SDK profiles wherever the bundle is installed.
dsh plugin --profile web add /absolute/path/to/dsh-plugin-endurance
This links the bundle into the profile and adds dsh-plugin-endurance to its bundle list. Enable the endurance row on the Plugins page — the host half applies without a full DSH restart.
Optional overrides in the profile's cordis.patch.yml:
- id: endurance
config:
maxDurationHours: 24
maxChecks: 100
minCheckGapMs: 30000
Desktop runs the same Web workspace in an Electron shell and keeps its own profile (desktop), separate from CLI profiles. Install the bundle with either of these:
Option A — Plugins page (recommended)
dsh-plugin-endurance from its local directory, repository, or package spec.endurance row. The shared plugin manager applies the host half; if Desktop asks to restart, quit and reopen the application (running tasks are warned before quitting).Option B — Desktop's own dsh command
Desktop can install a matching dsh command from its application menu: Manage dsh Command… → Install. Then:
Launch Desktop once so Desktop initializes $DSH_HOME/profiles/desktop, then fully quit the application (use Quit, not just close the window).
Install into the Desktop profile:
dsh plugin --profile desktop add /absolute/path/to/dsh-plugin-endurance
Reopen Desktop, open Plugins, and enable the endurance row.
Notes for Desktop:
dsh command installed by Desktop. An npm-installed dsh manages ordinary CLI profiles but cannot mutate the Desktop profile or its executable package graph.dsh command can manage the desktop profile while the application is quit, but it cannot boot that profile.After enabling the plugin, ask in a session:
Plan a long-running task: duration 8h, require 3 consecutive checks at 85% or above,
and keep idempotent verification every hour until the plan time.
Already running? Toggling the
endurancerow is enough for the host tools to appear; new tool declarations are appended on the next model step.
Issues and pull requests are welcome.
docs/DESIGN.md is the source of truth for tool contracts, state transitions, prompt placeholders, and safety limits. Update it in the same PR.feat/<issue>-<slug>, fix/<issue>-<slug>, or chore/<issue>-<slug>; run npm test and npm run check before opening the PR.node:test coverage; extend it rather than describing the change in prose.npm test # node --test
npm run check # syntax checks
npm run demo # deterministic end-to-end demo of the loop
dsh-plugin-endurance/
├── index.js # host entry re-exports
├── cordis.patch.yml # bundle row: id=endurance
├── src/
│ ├── plugin.js # wiring: tools, driver, system-prompt guidance
│ ├── host.js # host Session module bridge + plugin-record writer
│ ├── config.js # config clamping
│ ├── domain.js # pure state machine: modes, phases, limits, snapshots
│ ├── prompt.js # placeholder rendering, status footer, kickoff copy
│ ├── authority.js # human-turn / check-round matching, work evidence
│ ├── service.js # per-session run registry and persistence
│ ├── driver.js # idle/tick scheduling, injection, recovery
│ └── tools.js # the five model-facing tools
├── test/ # domain, prompt, tools, driver, host-bridge tests
├── tools/demo-endurance.mjs # deterministic loop demo (npm run demo)
├── docs/DESIGN.md # full design and contract
├── locale/ # bundle metadata (en / zh)
├── assets/ # README banner
└── icon.svg
MIT © Dynesshely. See LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。