把表格与文档(xlsx、csv、pdf、zip…)粘贴或拖拽进 DSH 输入框即可附加:文件会保存到会话工作区并插入 @引用。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:yybukn/dsh-table-attach
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Paste or drag tables & documents (.xlsx, .csv, .pdf, .zip, …) into the
DSH web composer. The file is saved into the current session's workspace and an
@reference is inserted at the caret, so the agent reads the real file.
The official DSH composer only accepts images (PNG/JPG/WebP/GIF) on paste/drop. This plugin adds non-image file attachments.
Features
- Paste & drop: works for file pastes (
⌘Ca file, then paste) and drag-and-drop. - Any non-image file: spreadsheets, CSVs, documents, PDFs, archives, JSON, …
- Saves into the session workspace: files land in
<workspace>/attachments/(auto-renamed with a-1/-2… suffix on name clashes). - Inserts an
@reference: e.g.@attachments/report.xlsx(quoted as@"attachments/my report.xlsx"when the name contains spaces) — matching the host's @-mention grammar so the agent can read the file. - Safe by default: 50 MiB size cap, executable extensions blocked
(
.exe,.dll,.sh,.js, …), and path-traversal-proof file names. - Images untouched: PNG/JPG/WebP/GIF pastes/drops still go through the built-in image path.
- i18n: zh / en toasts and drop-hint overlay.
Install
Currently distributed from GitHub (npm publishing pending):
dsh plugin add github:yybukn/dsh-table-attach
For local development:
dsh plugin --profile web add /path/to/dsh-table-attach
Usage
- Open any session (it provides the workspace).
- Drag a
.xlsx/.csv/.pdf/.zip… into the composer, or copy a file and paste it into the composer. - A toast reports progress; on success the composer contains
@attachments/<file>. - Send the message — the agent can read the referenced file.
Pasting table cell text (copied out of Excel) is treated as ordinary text and passes through untouched; it is not converted into a file.
How it works
- Host side (
lib/index.js) registers a Typert Remote servicetableAttach.saveFile(agent, payload). It validates the payload, keeps the path inside the session workspace, de-duplicates file names and writes with0o644. It runs as a cordis plugin (no build step — plain ESM + zod). - Client side (
lib/client.js) is a web bundle. It interceptspaste/dragenter/dragover/dropat the document level before the conversation plugin's handlers, base64-encodes the file, calls the host remote, and inserts the@mentioninto the composer (which is a Lexical contenteditable — insertion goes throughexecCommand("insertText"), the samebeforeinputpath the editor itself uses).
Security
- Files larger than 50 MiB are rejected before bytes cross the wire.
- Executable extensions (
.exe,.dll,.app,.sh,.js,.jar, …) are blocked. - File names are sanitized (no directories, control characters, dotfiles or traversal), and the target path is verified to stay inside the workspace.
- The agent only ever sees the workspace-relative reference, never an arbitrary absolute path.
Development
dsh-table-attach/
├── lib/
│ ├── index.js # host: cordis plugin + Typert Remote service
│ └── client.js # browser: interception, upload, composer insertion
├── cordis.patch.yml # loader entry for the host bundle
├── dsh.plugin.json # plugin manifest
└── package.json # exports ./client for the web platform
The host runs in the DSH harness (Node); the client runs in the web GUI. When
installed from npm the host's peer deps (@deepseek-ai/cordis,
@deepseek-ai/dsh-typert-protocol, zod) resolve from the profile's shared
dependency closure. A local link: install outside the profile needs those
deps made resolvable (e.g. node_modules symlinks into the app bundle) — these
are not part of the package and are git-ignored.
License
链接
同类插件
Tencent/WeKnora#dsh-weknora★ 34626
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 5760
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
T-Auto/dsh-ops★ 3102
为 Windows 的 DSH 提供 bash、PowerShell 7 及 Rust 高性能工具,减少 token 消耗。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1139
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
sixtysevenlf/dsh-blender-plugin★ 599
让 DSH agent 通过直连 TCP 通道驱动本地 Blender,提供 16 个工具:视口帧、自定义视角渲染、Python 执行、无头与作业卸载、事务回滚,以及 28 个 family / 186 个 op 的规划层。
anysearch-team/anysearch-dsh★ 537
基于 AnySearch 的实时网页与垂直搜索插件,为 DeepSeek Harness 提供搜索工具。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。