dsh-repro
已验证 · 实测可装 EvilIrving
功能简介
最小化、脱敏、可重放的DSH会话问题包
可用 — 实测通过,早期项目
最小化、脱敏、可重放的DSH会话问题包 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-repro
Export a minimal, secret-scrubbed, replayable problem bundle for the DeepSeek
Harness.
/repro reads the current session's complete canonical log throughsessionPersistence.inspect, scrubs secrets value by value, collects failed
commands and a git diff, and writes a repro-<sessionId>.json manifest.
Install
dsh plugin --profile <name> add github:EvilIrving/dsh-repro
Or, from a checkout:
dsh plugin --profile <name> add ./dsh-repro
The bundle patch inserts one plugin row (dsh-repro); it needs thecommands and sessionPersistence services, which the base profile already
mounts.
What the bundle contains
interface ReproManifest {
formatVersion: number // 1
header: SessionHeader // cwd, lineage, delegation depth
events: SessionEvent[] // complete, secret-scrubbed canonical log
failedCommands: string[] // `name <arguments>` for each errored tool call
gitDiff: string // empty when git or a repo is unavailable
versions: Record<string, string>
}
The events array is the full canonical log (contiguous from seq 0), so it can
later be replayed via ctx.sessions.create(id, { seed }); secrets are redacted,
not dropped, which preserves replay balance.
Secret scrubbing (fail-closed)
redactValue walks the detached JSON log and:
- redacts any object key matching the harness's credential pattern
(/KEY|PASSWORD|SECRET|TOKEN/i) whole; - redacts any string beginning with a known token prefix (
sk-,ghp_,xoxb-,Bearer, 锟斤拷); - redacts any high-entropy run (long base64/hex/token-shaped sequence).
Both prefix and entropy thresholds are Config-driven. The default is
fail-closed: a string that looks credential-shaped is redacted rather than
passed through. This mirrors session-telemetry's waterfall shape (rewrite an
outbound copy, never the canonical log) while supplying the value-level rules
the telemetry seam deliberately ships without.
Config
export interface Config {
tokenPrefixes: string[]
minHighEntropyLength: number // default 20
gitDiffMaxBytes: number // default 256 KiB
gitGraceMs: number // default 5000
}
Dependencies
commandsandsessionPersistenceare hard dependencies (inject).subprocessis optional (ctx.get):git diffdegrades to an empty string
when it is absent or the cwd is not a repository.
Model Experience
Request context and condition
What the model sees
A single slash command /repro [output directory]. Its result is a one-line
success message naming the written bundle path; the bundle contents are never
injected into the model context.
Token effect
Zero-direct effect; the command result is a single short text line.
KV Cache effect
Append-only: the command lifecycle events (command/run, command/done) append
to the log and never rewrite earlier tokens.
Known Limitations and Deferred Work
- Bundle write bypasses the sandboxed
ctx.fsseam 锟斤拷 v1 usesnode:fs/promisesdirectly; routing the write throughctx.fs(so a
sandboxed deployment constrains the output path) is deferred. - Replay CLI is out of scope 锟斤拷
dsh repro run <bundle>is a separate
process-level seam (boot/cmdline+cmdlineArgs), not/repro; v1 only
exports. - No oversized-artifact inlining 锟斤拷 spill artifacts are referenced by
locator, never inlined; any file-byte inlining would need a size policy.
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-repro」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:EvilIrving/dsh-repro Headless(CLI)profile:
dsh plugin --profile headless add github:EvilIrving/dsh-repro 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。
适合谁
想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。
二次开发建议
工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。