deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
Turn-atomic message editing, retry, reroll, and version-tree navigation for DeepSeek Harness conversations.
truncate or preserve downstream turns).dsh-message-edit fails (see below).dsh-client-locale service.dsh plugin add dsh-turn-fork
Then restart dsh. The plugin registers a Turn Fork tab (between Trajectory and Prompt Studio), compact undo/redo/regenerate buttons in the session header, and retry/regenerate buttons on each finalized assistant message.
dsh-message-edit (v0.2.3) has a P0 defect: its durable provenance event
message-edit/version is written without the ignorable marker. The live
write path accepts it, but after a dsh restart the persistence layer's
cold-read vocabulary guard (assertEventsSupported) rejects the whole log
with SessionFormatUnsupportedError — every branch session becomes
unreadable. See tests/p0-persistence.test.mjs for a reproduction (live
write OK → restart → cold read REJECTED) and this plugin's regression test
(ignorable marker → restart → cold read PASSES), run against the real
dsh-session + dsh-session-persistence-jsonl packages in a fresh child
process.
dsh-turn-fork also fixes the design gaps the review found in the community
plugin:
| Gap | This plugin |
|---|---|
Custom events must be ignorable: true |
turn-fork/version is always ignorable; schema-versioned for future migration |
| HTTP route without trust fence (CSRF / DNS rebinding, quota burning) | Origin/Host loopback fence + content-type check + 64 KiB body cap |
| Message targeting by DOM text guessing | Official slots only (conversation.view, conversation.session.header.actions, conversation.chat.assistant-actions) |
reasoningEffort / config lost on fork |
provider/model/maxTokens derive from the last request/header; reasoningEffort and adapterDefaults ride the inherited header inside the seed |
| Steering messages dropped on replay | Every user input of a turn is preserved and replayed in order |
Assistant edits forge source: {kind:'model'} and drop tool calls |
Not supported (honest limitation, see below) |
| Undo navigation leaves branches running silently | Running branches are reported; each has an explicit Stop control |
preserve replays N turns with no confirmation |
Cost hint and explicit cascade choice before saving |
| No tests, no i18n | node:test suite + P0 regression + dsh-testkit lifecycle gate; zh/en dictionaries |
from "…" to "…"), marks the current version, and offers Undo/Redo
navigation plus Open for any branch. Branches with a running agent show a
warning and a Stop control.truncate drops everything after the edited turn;
preserve replays the edited turn and every later turn (each replayed input
becomes its own turn, with inputs of the same original turn kept in order).
The editor shows how many turns preserve will replay before you confirm.session.fork(atSeq) RPC cuts including
the anchored turn, which cannot express "edit turn N and re-run it". This
plugin therefore uses the same underlying transaction seam the official
fork uses internally — ctx.agents.create — with the seed cut before the
target turn, official lineage meta (parentSession, seedLength, cwd,
agentPreset), the source's preset re-mounted, and durability flushed
before the branch is announced.dsh-checkpoint-rewind) when you need workspace state rewind.dsh-message-edit. Logs written by the broken event
format are refused by the persistence layer itself, so no reader — this
plugin included — can repair them in place. The Timeline detects the
refusal and reports it explicitly. To recover old transcripts, use the
official export flow before upgrading, or wait for the upstream fix.The host route /turn-fork is served by the dsh web server, which performs no
origin checks of its own. Every request must pass the plugin's fence: a
browser Origin must be http(s)://localhost|127.0.0.1|[::1] with the
server's exact port (relaxed only when the server listens on 0.0.0.0, the
operator's explicit remote-exposure opt-in); requests without an Origin
must carry a loopback Host. POST bodies must be application/json and at
most 64 KiB.
npm install
npm run build # tsc typecheck + tsdown host/client bundles
npm test # build + node:test (core, lineage, P0 persistence regression)
tests/p0-persistence.test.mjs — the P0 regression: the plugin's real fork
seed is written through a real dsh-session store and
dsh-session-persistence-jsonl backend, flushed to disk, then cold-read in
a fresh child process ("restart"). A negative control proves the guard
rejects the same log with the marker stripped.tests/core.test.mjs — steering fidelity, plan boundaries, seed
construction, model-config derivation, trust-fence matrix, body cap,
operation decoding.tests/lineage.test.mjs — version projection, undo/redo stacks, running
flags.dsh-testkit.yaml — real-host lifecycle gate (install → boot → register →
uninstall → reboot → residue) via the community
dsh-testkit, plus the generated
.github/workflows/dsh-lifecycle.yml CI workflow.dsh-test --suite full reports flaky under --runner local: every attempt
passes every stage with identical assertions, but the repeatability digest
includes attempt-scoped absolute paths and timestamps, which necessarily
differ between attempts (the Docker default runner keeps the run-root path
stable). The quick suite is the authoritative lifecycle gate here; the CI
workflow runs it under Docker.
MIT. The client bundle preset under scripts/dsh-client-preset.ts is vendored
from the DeepSeek Harness repository (MIT, © DeepSeek).
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。