deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:23swccp/dsh-undo
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
dsh-undo-plugin is a conversation-undo plugin for DeepSeek Harness (dsh): a single /undo rolls the workspace files and the conversation together back to before the latest completed message; rolled-back sessions land in "Settings → Archive Tasks" for management (view / restore / permanent delete / delete all). Made a mistake? The "revoke rollback" strip above the composer fully restores it.
The plugin ships as an installable bundle: a standalone workspace that never patches the dsh codebase and uses only the public dsh APIs published on npm (@deepseek-ai/dsh-*@0.1.0-rc.6). File rollback goes through a plugin-private Shadow Git snapshot (its own GIT_DIR, never your .git).
Note: the repository and the packages keep the historical
rollbackname; the user-facing commands are/undo(revert) and/update(self-update).
/undo slash command, and the strip above the composeragent/pre-step; a capture failure rejects the step (the model never receives the prompt) and refills the composer draft with the original prompt plus a redacted reason↩ 已回滚 <preview> [撤回回滚] strip appears only after a rollback and disappears once a new prompt is acceptedworkspace-diverged, never overwritten), then restores the source Session and files, and re-arms the rollback point — rollback and revoke are symmetric and repeatablerestoring / revoking journal phases are recovered deterministically on startupdata-chat-flow-kind boundaries (user / assistant-step / tool-call / turn-tail); React-owned node structure is never toucheddata-* hooks the stock renderer already publishes (data-tool, data-terminal, data-diff, …) — no hashed class names, React re-renders re-apply automatically/update in any session runs git pull --ff-only → pnpm install → pnpm run build in one pass (per-step timeouts; skips install/build when already up to date); restart dsh to activate--ff-only never rewrites local commitsdiff-tree path-limited restore, untrackedCache + splitIndex, fork ∥ restore parallelism, stat warm-up plus next-generation prearmEPERM / EBUSY / EACCES renames retried with backoff; failed temp files are cleaned up^22.19 || >=24) and dsh 0.1.0-rc.6 / 0.1.0-rc.7dsh-web-app surface (the web profile provides it by default; headless profiles may drop the four client-rollback-* rows from the bundle patch)git clone https://github.com/23swccp/dsh-undo.git
cd dsh-undo
pnpm install
pnpm run build
dsh plugin --profile web add ./packages/rollback-fork ./packages/rollback-archive ./packages/rollback-undo ./packages/client-rollback-button ./packages/client-rollback-settings ./packages/client-rollback-toolcards ./packages/client-rollback-trailfold ./packages/bundle-rollback
All eight packages must be linked: pnpm's link: protocol does not install a linked bundle's dependencies, and the dsh loader resolves plugin package names from the profile's node_modules, so the seven plugin packages need their own links next to the bundle.
After restarting dsh: the session header gains the rollback button, /undo rolls back directly, the Settings dialog gains the Archive Tasks page, every turn gains the reasoning-and-actions fold bar, and expanded tool-call cards are colored per tool type.
Run /update in any session (requires a git-clone install), then restart dsh. Manual equivalent:
git pull && pnpm install && pnpm run build
| Package | Role |
|---|---|
packages/rollback-fork |
Session fork capability: exact completed-turn / before-user-message Agent branches |
packages/rollback-archive |
Archive capability: list, read-only view, restore, permanent delete, delete-all |
packages/rollback-undo |
Shadow-Git journal + rollback/revoke orchestration + the /undo and /update commands |
packages/client-rollback-button |
Browser: session-header rollback action and the revoke strip (self-mounted Remotes) |
packages/client-rollback-settings |
Browser: Archive Tasks settings page (self-mounted Remotes) |
packages/client-rollback-toolcards |
Browser: per-tool-type colors for expanded tool-call cards (CSS-only injection) |
packages/client-rollback-trailfold |
Browser: per-turn reasoning-and-actions fold bar (DOM injection) |
packages/bundle-rollback |
Installable bundle: cordis.patch.yml + dependency manifest |
packages/typert-protocol |
Vendored @deepseek-ai/dsh-typert-protocol source (required by the typert generator, see below) |
pnpm install
pnpm run typecheck # builds host artifacts (typert generation) then checks the client face
pnpm test # vitest, 11 files / 53 tests
pnpm run build # host lib + client bundles (lib/client.js)
The typert generator recognizes Remote / TypertRemoteService only when the declaring package is workspace-registered, and it maps export targets back to src/. Against npm-resolved dsh packages two things were required:
packages/typert-protocol vendors the protocol source; pnpm-workspace.yaml overrides every dsh package to resolve it (workspace:^), and tsconfig.base.json maps @deepseek-ai/dsh-typert-protocol to src/.patches/typert-generator-workspace-only.patch (applied via patchedDependencies) restricts typert map/context collection to workspace-registered files — otherwise npm-resolved dsh twins (e.g. two dsh-session instances from circular peers) duplicate the map declarations and fail generation.delivery field in rc.6, so the source-kind + text-content check is the boundary.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。