# DeepSeek Harness 工作区文件传输插件 **Repository Path**: az13js/dsh-workspace-transfer ## Basic Information - **Project Name**: DeepSeek Harness 工作区文件传输插件 - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-10-26 - **Last Updated**: 2026-10-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 工作区文件传输 · Workspace File Transfer A DeepSeek Harness Web plugin that moves files between the browser and a Session's workspace. - **Browse** the Session working directory in the right sidebar. - **Upload** one or many files, through the file picker or by dropping them on the page. Uploads go into the folder currently shown. - **Download** any file with one click; the browser's normal save flow is used. - Follows the host's **light and dark themes** through `--dsw-alias-*` theme tokens, so custom themes work too. ## Open it - Click the transfer glyph in the Session header, or - open the right sidebar's **Start** guide and pick **Workspace file transfer**. The page opens as a tab in the right sidebar. It is Session-scoped: each Session sees its own working directory. ## How it works The Client half registers a page type named `workspace-transfer`, its body and title, a guide doorway, and a Session-header action. Directory listings use the shipped `workspaceFiles` Remote namespace (`workspaceFiles.list`). The two byte paths that namespace intentionally does not expose are provided by the Host half as authenticated routes on the browser carrier: | Route | Purpose | | --- | --- | | `POST /api/workspace-transfer/upload` | stream a `application/octet-stream` body into the workspace | | `GET /api/workspace-transfer/download` | stream a workspace file back as an attachment | Both routes take `sessionId` and `path` query parameters. The path is resolved against the Session's committed working directory; the route rejects a target outside it (including an ancestor-symlink escape) and requires the parent directory to exist. Uploads are written to a temporary sibling and published with one atomic rename, so an aborted transfer never leaves a partial file. The upload cap is 512 MiB and is enforced on both sides. ## Files | File | Role | | --- | --- | | `index.js` | Host half: the two authenticated routes. | | `client.js` | Client half: the transfer page, guide entry, and header action. | | `cordis.patch.yml` | Inserts the Host row into the profile. | | `locale/*.json` | Plugin Manager title, description, and icon metadata. | | `icon.svg` | Original plugin artwork. | ## Scope and assumptions - The workspace filesystem is host-local. The Host half resolves the workspace through `ctx.fs`, then streams bytes with Node's filesystem APIs; a remote or container-backed filesystem would need its own write seam. - Reads and listing stay on `workspaceFiles`; the download route adds only a streaming read whose target is fenced to the same workspace. - Download is capped by what the browser can buffer for the save flow. Very large workspace artifacts are better fetched from a terminal.