chunqing286/dsh-guard-degen ↗★ 0
dsh-guard-degen
Degeneration guard for DeepSeek Harness: detect and contain runaway symbol streams, verify writes, repair polluted artifacts and sessions
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chunqing286/dsh-guard-degenREADME
Read the full README ↗Configuration
| Key | Default | Meaning |
|---|---|---|
enabled | true | Master switch |
modelIncludes | [] | Guard only these models (empty = all) |
stream.reasoning | truncate | Reasoning policy: off/truncate/sanitize |
stream.text | sanitize | Text policy |
stream.holdbackChars | 256 | Characters held back before a verdict |
stream.maxInterventionsPerCall | 1 | Max interventions per call |
stream.unitRun | true | Also govern multi-character units repeated as a whole block |
stream.unitRepeats | 4 | How many repeats of a unit count as degeneration (stream guard) |
toolGuard.mode | warn | Degeneration in tool arguments: off/warn/refuse |
toolGuard.scope | all | all/write-only/oversized-only |
toolGuard.unitRun | true | Also govern multi-character units in tool arguments |
toolGuard.unitRepeats | 4 | How many repeats of a unit count as degeneration (tool guard) |
postExecute.enabled | false | Write-back verification (costs IO) |
postExecute.roots | [] | Restrict verification; empty = inside the workspace |
retry.policy | same-model | same-model/steer/no-retry |
retry.maxSameModelRetries | 1 | Same-model retry count |
retry.switchModel.enabled | false | Allow an automatic model switch |
artifacts.mode | collapse | collapse (marker) or remove |
artifacts.apply | false | Preview only by default |
artifacts.unitRun | true | Also govern multi-character units repeated as a whole block |
artifacts.unitRepeats | 4 | How many repeats of a unit count as degeneration |
artifacts.maxFileBytes | 8388608 | Per-file size limit; larger files are skipped (and listed) |
sessions.mode | copy | copy (new file) or replace |
sessions.maskMode | collapse | collapse (marker) or remove (delete the run) |
sessions.unitRun | true | Also govern multi-character units in session content |
sessions.unitRepeats | 4 | How many repeats of a unit count as degeneration |
logging.enabled | true | Persist the verdict journal |
Runtime edits are written to ~/.dsh/guard-degen/config.json, layered over the profile
configuration.