dsh-file-manager turns DeepSeek Harness workspaces into an editable file tree
DeepSeek Harness developers get a file manager that turns workspace files into a browsable and editable tree without leaving the tool. The plugin's zero-dependency host side and explicit UTF-8 handling set a practical pattern for building safe, locale-aware DSH plugins.
dsh-file-manager extends DeepSeek Harness with a full file manager. The plugin adds a left-sidebar entry that opens a central panel for browsing workspace files, previewing and editing text, and performing basic file and folder operations. It's built as a host+client bundle using DSH's Cordis scoped bundle mechanism. The host side, written in ESM, registers seven API routes for meta, list, read, mkdir, write, rename, and remove. It uses only Node.js fs/promises with zero third-party dependencies. The client side renders React via window.__ModuleLoader__.load, without JSX, and injects styles using DSH theme tokens.
Path safety comes from resolveRoot and inside() checks, confining operations to registered workspace roots, with a 4MB per-file limit. The UI supports workspace switching, breadcrumb navigation, fuzzy search, hidden file toggle, and skips node_modules and .git. Text preview handles UTF-8 and GBK encodings; editing writes back to disk. On macOS, protected directories may need TCC permission, and the plugin guides users to the right system settings.
The zero-dependency host side makes the plugin easy to audit and lightweight, a sensible choice for a narrow file management scope.
Explicit UTF-8 decoding on the client side solves a real pain point: Chinese filenames and content garble easily, and relying on implicit charset handling is fragile.
The path traversal protection, based on resolveRoot and inside(), is minimal but adequate for a single-user developer tool, trading breadth for simplicity.