TINGOD2006/dsh-scratch-vault ↗★ 0
dsh-scratch-vault
Codex-style scratch execution for DeepSeek Harness: operation scripts run from a session scratch root and are collected into a plugin-owned vault, so the workspace only ever holds real deliverables. Diverts new scratch writes, and retrofits residue that was already there. 适合希望保持工作区整洁,避免临时草稿文件污染交付物的用户。
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:TINGOD2006/dsh-scratch-vaultREADME
Read the full README ↗Configuration
There is no Cordis Config schema on purpose. A profile that cannot resolve a
schema library's peer dependency would fail to mount the plugin entirely, and a
workspace-hygiene plugin that refuses to load is worse than one with no settings
form. Configuration is a plain JSON file instead:
/scratch-vault.json # default: ~/.dsh/scratch-vault/scratch-vault.json
$DSH_SCRATCH_VAULT_CONFIG # or point at any JSON file
Every key is optional; missing keys fall back to the built-in defaults.
| Key | Default | Meaning |
|---|---|---|
enabled | true | Master switch. |
interceptMode | "redirect" | "redirect" moves the write; "deny" refuses it and explains the alternative; "report" changes nothing but logs every file that would have been intercepted. |
scratchRoot | "" → /dsh-scratch | Where scratch files live. Must be outside the workspace. |
vaultDir | "" → /scratch-vault | Where collected scripts are archived. |
interceptWrites | true | Whether write/edit are inspected at all. |
rewriteShell | true | Whether shell command references follow a redirected write. |
injectPrompt | true | Whether the discipline section is added to the prompt. |
exposeEnv | true | Whether DSH_SCRATCH/DSH_VAULT are injected into shell calls. |
registerRunScript | true | Whether run_script is offered. |
interpreters | {python,node,powershell,bash} | Executable per language. |
extensions | {python:".py",node:".mjs",…} | Scratch file extension per language. |
scriptExtensions | 27 entries | Which extensions can be scratch scripts. |
scriptNamePatterns | narrow set | Base-name regexes marking a scratch script. |
scratchDirNames | _scratch, tmp, … | Directory names that mark everything beneath them. |
protectDirs | src, lib, test, … | Never touched — a project's real source. |
excludeGlobs | [] | Deliverable allowlist, workspace-relative. |
treatBareRootScriptsAsScratch | true | A script at the root of a workspace with no project manifest is scratch. |
retainDays | 14 | Purge cutoff. |
maxVaultEntries | 2000 | Ledger cap; oldest are dropped. |
maxEntryBytes | 4194304 | Above this the entry is recorded but its bytes are not stored. |
Start with report mode
On an unfamiliar repository, set "interceptMode": "report" first. It records
what the classifier would have done without moving a single file, which is the
cheap way to find out whether scriptNamePatterns needs tuning for your layout.