/repro 导出最小可复现问题包:去 secret 的会话日志、失败命令与 git diff。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:EvilIrving/dsh-repro
GitHub 来源的插件在安装时会在你的机器上执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
Export a minimal, secret-scrubbed, replayable problem bundle for the DeepSeek Harness.
/repro reads the current session's complete canonical log through
sessionPersistence.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 the
commands 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.
链接
同类插件
hust-open-atom-club/oh-dsh★ 161
社区发行版:TUI、桌面端与 Web UI 统一体验,分层安装、一步到位。
Jayden-X-L/forkprobe★ 65
同一任务并行试跑多个技能,对比结果选出最优。
vlln/plugin-registry★ 33
插件生态基建:浏览器面板管理官方 repository 插件(0 patch)+ make-dsh-plugin 插件开发引导技能。
forrestchang/dsh-multica-runtime★ 28
让 dsh 运行时跑在 Multica 上。
DietCokewithSugar/dsh-user-experience★ 18
帮你发现项目中可能存在的用户体验问题:自动走查 React/TypeScript 源码,定位问题并给出具体优化建议。
omdsh-dev/dsh-plugin-check★ 17
插件健康检查:扫描清单协议/patch 格式/构建陷阱,零依赖只读。