把表格与文档(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★ 38705
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37321
dsh 的 draw.io 绘图插件:通过 next-ai-drawio MCP 服务器作图,点回复里的链接在右侧栏打开实时预览,可以手动修改图,AI 的每次修改都是可以恢复的版本。需 Node.js 18+,首次使用由 npx 下载 MCP 服务器。
yikart/AiToEarn#dsh-plugin-aitoearn★ 28986
帮你生成文案/图文/短视频,一键分发抖音、快手、小红书、公众号、bilibili、Facebook、TikTok 等海内外平台,覆盖自媒体运营从内容创作,内容发布到内容变现全链路。
superdesigndev/treg★ 10137
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
T-Auto/dsh-ops★ 6125
为 Windows 的 DSH 提供 bash、PowerShell 7 及 Rust 高性能工具,减少 token 消耗。
Hithink-Tech-Org/Financial-API#hithink-finance★ 4781
在 DeepSeek Harness 中查询同花顺金融数据、在对话中查看图表,并保存可刷新的看板。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。