deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
🌐 English | 简体中文
Provides three capabilities inside the right-side panel of a DSH session view, all sharing the same workspace root:
workbench): a Windows 11 Explorer-style file managervscode): a CodeMirror multi-tab code editor + project treeOn top of that: Git / SVN management panels, sending files into the session input box as official @path reference chips, a background-task panel, and handling selected files with a sub-agent.
File viewing is delegated to the DSH native right-side viewer (Markdown / syntax-highlighted code / images / PDF / HTML / plain text); use the file editor for in-place editing, or right-click "Edit" in the file list to open the built-in notepad.
| Panel | Tab kind | Guide entry | Notes |
|---|---|---|---|
| File Workbench | workbench |
order 100 | Open from the right-sidebar guide area; auto-navigates to the current session's workspace directory on first open |
| File Editor | vscode |
order 101 | Same as above, listed below the File Workbench |
| Terminal | — | — | Toolbar terminal button, or right-click a directory → "Open in Terminal" |
The only entries are the right-sidebar guide cards and tabs; there are no input-box buttons or top drawer anymore.
Label (C:), falling back to a localized "Local Disk (C:)".? / A / M / D) badges + right-click Git operations.Ctrl+S saves; unsaved tabs confirm before closing; read-only files are clearly marked.cmd / powershell.taskkill /T, avoiding orphaned npm / python / node processes.Ctrl+C copies when there's a selection (otherwise passes SIGINT through), Ctrl+V paste, Ctrl+F search, Ctrl± / Ctrl+0 font size.ctx.webTerminals service when available, with automatic fallback to the plugin's own backend; SSH terminals always use the plugin's own SSH channel.Both panels open from the file workbench and the file editor (right-click → open management panel), each organized into sections in a narrow left column:
Git (7 sections)
| Section | Capabilities |
|---|---|
| Changes | staged / unstaged / untracked groups; inline stage, unstage, ignore, discard; stage all; commit (with quick commit) |
| History | commit graph (all / current branch) + commit details (hash / author / time / parents / refs / file list / patch); reset (soft / mixed / hard), revert, cherry-pick |
| Branches | create & switch, rename, local & remote branch list, switch, merge into current, push, delete, checkout remote branch |
| Tags | create, fetch all, publish Release, view, fetch remote tags, push, delete |
| Remotes | add, edit URL, delete |
| Stashes | create, view, apply / delete |
| Command line | built-in git CLI: run any git subcommand and see the output |
Plus per-file diff view / file history / blame, and upstream/downstream ↑ahead ↓behind display.
SVN (3 sections: Changes / Log / Output)
svn:ignore (a directory property applied on the parent directory; read-then-idempotently-append).Context menus are generated uniformly by composables/domain/repoMenu.ts (single source of truth); Git offers stage / commit / diff / discard / ignore (writing the repo-root .gitignore), SVN offers open management panel / update / add to version control / ignore.
Both the file editor and the file workbench let external plugins/scripts register their own views via a framework-agnostic Activity Bar registry — no Vue/React required; plain JS works too. Full author guide: docs/activity-bar-plugin.md.
window.__dshFileWorkbenchVSCode__.activityBar.register(view)window.__dshFileWorkbenchWorkbench__.activityBar.register(view){ id, title, icon?, order?, mount(el, ctx), when? }; mount(el, ctx) renders into el and may return a cleanup function invoked when the view is switched away or unmounted. ctx exposes projectDir / theme / activeFile getters, onProjectChange / onThemeChange / onDidChangeActiveFile subscriptions, and openFile / listOpenFiles / openDiff / toast.window.__dshFileWorkbenchVSCode__.commands (register / execute / unregister / list / has) — the analogue of VS Code's commands.registerCommand. Registered commands are inert until something invokes them by id, so they don't mutate editor behavior unprompted.window.__dshFileWorkbenchVSCode__.statusbar.register({ id, text, commandId, tooltip?, order?, when? }); clicking it auto-executes commandId with a { path, projectDir } context. This is the built-in trigger surface for commands — no need to host your own button.window.__dshFileWorkbenchWorkbench__.backgroundTasks (start(label, opts?) → { step, updateLabel, done, fail }, clearFinished, clearAll). Registered plugin tasks show up in the same bottom-bar task button with history/archives. When an injected view is active, only the local-nav areas of the status bar are dimmed/disabled — the background-task button stays clickable and viewable.title accepts a string or a per-locale object ({ zh, en }), resolved against the page language.id overwrites (supports hot-update); unregister(id) removes it cleanly. The registry lives at module scope, so panel unmount/remount keeps registrations.@path, source: "reference") — not plain text.Allow operations outside the workspace root (root switch), show hidden files, accent color, UI font size, font family, theme (follow host / dark / light), default view.
Global:
| Key | Action |
|---|---|
? |
Open shortcut help (global) |
File list (while focused):
| Key | Action |
|---|---|
Ctrl/Cmd+A |
Select all |
Ctrl/Cmd+C / X / V |
Copy / cut / paste |
Ctrl/Cmd+F |
Focus the filter box |
Ctrl+Shift+N |
New folder |
Delete / F2 / F5 |
Delete (confirm) / rename / refresh |
Enter |
Open file / enter directory |
↑ ↓ Home End |
Move selection |
Backspace / Alt+↑ |
Go to parent directory |
Alt+← / → |
Navigate history back / forward |
File editor & terminal:
| Key | Where | Action |
|---|---|---|
Ctrl/Cmd+S |
Editor | Save current tab |
| Tab-bar right click | Editor | Close / save & close / close others / close to the right / close all |
Ctrl+C |
Terminal | Copy when there's a selection; otherwise passes SIGINT through |
Ctrl+V |
Terminal | Paste |
Ctrl+F |
Terminal | Search terminal output |
Ctrl± / Ctrl+0 |
Terminal | Increase / decrease / reset font size |
src/
shared/
types.ts shared types (host ↔ client ↔ Vue)
locales.ts zh/en copy dictionary (both must be updated together)
session-files.ts session transcript file parsing
host/ server side (Cordis plugin)
index.ts apply: registers /api/dsh-file-workbench routes + static assets + self-update
updater.ts self-update after startup
fs/
fs-tree.ts list / sort / symlinks / containment guard
fs-search.ts recursive search + cross-file replace
fs-read.ts open / save
fs-zip.ts compress / extract
fs-drives.ts drives & volume labels (Win32_LogicalDisk, 5-min TTL cache)
recycle.ts system recycle bin
routes/
routes.ts route dispatch table
routes-fs.ts file system (list / search / read-write / compress / My Computer)
routes-git.ts Git (status / diff / add / discard / log / branch / tag / remote / stash / ignore)
routes-svn.ts SVN (info / status / run / log / blame)
routes-terminal.ts terminal: persistent ConPTY shells (SSE stream) + host privilege probe /term-env
routes-recycle.ts recycle bin
routes-session-stream.ts session-touched-files SSE
routes-subagent.ts sub-agent
routes-task-archives.ts background task archives
routes-persist.ts preference persistence
routes-util.ts JSON envelope / body parsing / static assets / path validation
store/
root-store.ts workspace root
workbench-store.ts prefs / favorites / layout persistence
subagent/subagent.ts official sub-agent sessions
client/ DSH client bridge (TSX, registered into the right sidebar; injects Vue assets + mounts)
index.tsx apply: registers the two right-sidebar tabs, redirects file opens, injects Vue assets, reference channel
RightPaneBridge.tsx mounts the Vue workbench / editor body into the right-panel container
ComposerBridge.tsx session input reference seat (official `@path` chip writing)
TabMenuBridge.tsx right-sidebar tab menu additions (new editor / float window)
OfficialTerminalBridge.ts official terminal bridge: local terminals via host ctx.webTerminals
api.ts "open tab" bridge
vue/ Vue 3 + Vite frontend
main.ts entry: right-panel mounting + global terminal mounted persistently (on body)
App.vue file workbench single-window shell
styles.css global theme variables & base styles
components/
common/ WinMenuBar / NavPathBar / Icon / ContextMenu / ConfirmDialog / ShortcutHelpDialog
business/explorer/ ExplorerPane (two panes + splitter), CommandBar, NavPane, FileListPane (list / recycle bin),
ThisPcPane, SearchPane, StatusBar, BgTaskPanel, TxtEditor
business/vscode/ VSCodePane, ProjectTree, TabBar, CodeEditor, FolderPickerDialog, langResolver
business/git/ GitPanel, GitDiffView, GitGraphList, SvnPanel, QuickCommit
business/terminal/ TerminalHost (global singleton host), TerminalDialog (floating / docked)
settings/ SettingsDialog
composables/
core/ useApi, settings, theme, i18n, dialog, fileTaskMeta
domain/ git, gitGraph, svn, repoMenu (single source for context menus), terminalStore,
officialTerm (official terminal bridge accessor), driveName
session/ sessionSse, tasks, listStatus
ui/ icons, clipboard, dnd, virtual
stores/ workbench, explorer, fileCommands, vscode, activityBar (external view-injection registry)
types/ auto-imports.d.ts, components.d.ts
Prerequisites: Node ≥ 20, npm (or pnpm).
| Command | Purpose |
|---|---|
npm run dev:vue |
Run the Vue app standalone for development (mounts #app itself; pair with a running host) |
npm run build:vue |
Build only the Vue bundle (dist/) |
npm run typecheck |
vue-tsc --noEmit |
npm run build |
Full build: Vite (Vue) + esbuild (host/client) → lib/ |
npm run build:dev |
Same, with --dev |
npm run sync |
Sync lib/ into the web profile |
npm run deploy |
build:dev + sync |
The API base defaults to /api/dsh-file-workbench and can be overridden with the VITE_API_BASE
environment variable (e.g. during development, point it at http://localhost:xxxx/api/dsh-file-workbench).
What a change affects (affects how you debug):
src/vue/** or src/shared/locales.ts → build + sync, then hard-refresh the browser.src/host/** or src/client/** (e.g. new routes) → must restart dsh web.npm run build && npm run sync # build and sync the bundle into the web profile
After installing, run npm install inside the profile (so cordis.patch.yml takes effect),
restart dsh web, and hard-refresh the browser (Cmd/Ctrl+Shift+R).
If
dsh webdoesn't already include the mount entry for this plugin, append the following to~/.dsh/profiles/web/cordis.patch.yml:- insert: - id: dsh-file-workbench name: 'dsh-file-workbench'
Ctrl+S to save.? shows the shortcut help.Terminal shells are spawned by the host via ConPTY, and child processes inherit the token of
the dsh web process — so "do commands in the terminal have administrator rights" equals
"was dsh web started as administrator".
dsh web as administrator (right-click the
terminal/shortcut → "Run as administrator"); then all terminals in the panel have
administrator rights.GET /term-env (on Windows, determined by the
integrity-level SID from whoami /groups; on POSIX, uid === 0).runas cannot attach to a ConPTY pseudo-console,
so the plugin cannot elevate a single terminal; the only viable path is elevating the host itself.sudo.exe (requires Windows sudo
enabled in inline mode), or a host-registered high-privilege helper bridged over a named pipe
(introduces a self-built elevation channel with a large security surface).{DSH_HOME|~/.dsh}/fileworkbench/.element-plus (UI components); @xterm/xterm + fit / search / web-links addons (terminal rendering).@codemirror/* language packages loaded on demand).node-pty (ConPTY interactive terminal, a native module; the terminal is unavailable if missing).fflate (compress / extract); fzstd (decompress zstd session transcripts).@deepseek-ai/cordis and @deepseek-ai/dsh-host-webserver.MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。