deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
⚠️ Platform status: Windows verified only. This plugin has been tested on Windows (PowerShell). It has NOT been verified on Linux or macOS — path handling, shell behavior, and sandbox interactions may differ on those platforms. Use with caution on non-Windows systems.
A DeepSeek Harness (dsh) plugin that turns the Web UI into a lightweight coding workspace with Trae-style partial revert:
write / edit the agent makes is tracked with full before/after snapshots and rendered as line-level diff hunks, with live SSE updates.write / edit tool calls are tracked. Direct file edits made outside those tools (e.g. in your own editor) are not recorded.dsh plugin --profile web add github:houlain/dsh-workspace-studio
Then restart dsh web and open a new session.
Copy the package into the profile's node_modules:
$src = "<your-clone-path>\dsh-workspace-studio"
$dst = "$env:USERPROFILE\.dsh\profiles\web\node_modules\dsh-workspace-studio"
Copy-Item -Recurse -Force $src $dst
Register it in the profile's package.json:
{
"dependencies": { "dsh-workspace-studio": "0.1.0" },
"dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-workspace-studio"] } }
}
Restart dsh web.
The package ships pre-built (
lib/), so no build step is needed for installation. The installed copy must be a copy, not a symlink into a directory you keep editing — rebuild and re-copy after updating.
▸ / ▾); folders containing pending changes show a count badge and auto-expand.One package, two halves (dsh.bundle + dsh.client manifests), mounted as a single loader entry:
dsh-workspace-studio/
├── src/
│ ├── core/ # Pure logic, zero deps, fully unit-tested
│ │ ├── diff.ts # LCS line diff → hunks with context
│ │ ├── ledger.ts # before/after snapshot ledger + persistence
│ │ ├── hunkRevert.ts # per-hunk reverse apply + conflict detection
│ │ └── fileTree.ts # tree builder with ignore rules
│ ├── host/ # Node half: tools/result listener, HTTP/SSE routes, ctx.fs
│ ├── client/ # Browser half: Studio view (React, no external deps)
│ └── shared/ # Payload types shared by both halves
├── lib/ # Pre-built bundles (lib/index.js host, lib/client.js browser)
└── tests/ # 67 tests (node:test, no test framework dependency)
/ws-studio/*)| Route | Method | Purpose |
|---|---|---|
/ws-studio/tree?root= |
GET | Workspace file tree |
/ws-studio/file?path= |
GET | File content (size-capped) |
/ws-studio/ops?session= |
GET | Change operations with hunks (pending only in the file list) |
/ws-studio/revert?session= |
POST | Revert one hunk, or the whole file (no op/hunk) |
/ws-studio/accept?session= |
POST | Accept one hunk |
/ws-studio/clear?session= |
POST | Clear the session's change records |
/ws-studio/context?session= |
GET | Session working directory |
/ws-studio/events |
GET (SSE) | Live change notifications |
<profile-dir>/ws-studio-state.json (e.g. ~/.dsh/profiles/web/ws-studio-state.json), debounced, atomic write, flushed on exit.ctx.fs) with a session-level sandbox policy (workspace-write + the session's workspace root), so writes outside the session workspace are rejected by the harness sandbox itself.ctx.fs when available (fallback: node:fs).The file tree ignores common noise by default (.git, node_modules, dist, build, lockfiles, coverage, etc.). The ignore list lives in src/core/fileTree.ts (DEFAULT_TREE_OPTIONS) — rebuild if you want to customize it.
Requirements: Node.js ≥ 22.6 (tests run via Node's native TypeScript type-stripping — no build needed for tests), npm.
npm install # dev dependency: esbuild
npm run build # bundles lib/index.js (host) + lib/client.js (browser)
npm test # 67 tests via node --test
Notes for contributors:
React.createElement (no JSX) and a tiny local react stub under node_modules/react so tests can assert the rendered element tree without a DOM. Do not delete the stub; a real npm install react would replace it..ts extensions (NodeNext).write/edit tool calls.MIT © 2026 houlain
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。