pqkisvery666/dsh-basic-office
DSH办公文件插件:阅读PDF/DOCX/XLSX/PPTX,生成DOCX/XLSX/PPTX/PDF/CSV。
Project Overview项目介绍
This is a native DSH plugin built exclusively for DeepSeek Harness that adds missing capabilities for working with common binary office documents. DSH’s built-in tools only handle UTF-8 plain text and image files, so this plugin fills that gap by adding tools for both reading and writing common office formats. All tools provided by this plugin use the office_* prefix to avoid conflicts with DSH’s native tools, and it can be installed directly via the DSH CLI with one command, either from the GitHub tarball or the git repo. After installation, you only need to restart the DSH web service to activate the plugin for all sessions.
To use the plugin, you just tell your DeepSeek Harness agent what you need in plain natural language. For example, you can ask the agent to read the first 10 pages of a PDF report stored on your local computer, or turn a structured data table into XLSX and CSV files, or generate a formatted weekly report as a DOCX with title and table. This plugin is designed for any DSH user that regularly works with office documents and wants to let their agent handle reading and generating files directly without extra manual steps.
This plugin is released under the open-source MIT license, and it has a few documented limitations that users should be aware of. It cannot extract text from scanned PDFs that only have image layers, does not support older binary .doc files (you need to save them as .docx first), and cannot render Chinese correctly in generated PDFs on non-Windows systems without CJK system fonts installed. For developers that want to contribute or modify the plugin, you can install dependencies with pnpm and run a smoke test to verify all tools work as expected before making changes.
这是一个专为 DeepSeek Harness 开发的原生办公文件处理插件,用于补齐 DSH 原生能力仅支持 UTF-8 纯文本和图片处理的空缺,让 Agent 可以读写常见的二进制办公文档。所有插件提供的工具都以 office_* 为前缀,不会和 DSH 原生工具产生命名冲突,当前支持读取 PDF、DOCX、XLSX、PPTX、CSV 五类常见文档,也可生成多格式办公文档。
普通用户可以通过 DSH 的命令行工具直接安装,无需克隆仓库到本地也能完成安装,安装后重启 DSH web 服务即可对所有会话生效,后续也可以通过命令行完成更新或卸载操作。用户只需要在对话中直接向 Agent 提出读写生成文档的需求,就能调用对应工具完成处理,适合需要让 Agent 帮忙处理各类办公文档的日常用户使用。
该插件采用 MIT 许可开源,目前存在几个已知限制:不支持提取扫描版 PDF 的文本,老式二进制 .doc 文件需要先另存为 .docx 才能处理,非 Windows 平台生成 PDF 时如果没有 CJK 系统字体,中文无法正常渲染。开发依赖 pnpm 安装依赖,可通过冒烟测试验证功能完整性。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-basic-office(pqkisvery666/dsh-basic-office)
仓库:https://github.com/pqkisvery666/dsh-basic-office
本站详情页:https://www.yhbd.top/plugins/pqkisvery666-dsh-basic-office/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-09-11 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add https://codeload.github.com/pqkisvery666/dsh-basic-office/tar.gz/refs/heads/main
把 pqkisvery666/dsh-basic-office 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-basic-office
DSH 办公文件插件:让 DeepSeek Harness 的 Agent 阅读常见二进制文档(PDF / DOCX / XLSX / PPTX / CSV),并生成常见办公文件(DOCX / XLSX / PPTX / PDF / CSV)。
DSH 原生的 read / write / edit 只处理 UTF-8 文本(read_image 只处理图片),二进制办公文档是空白。本插件补齐这一块,且不与任何原生工具重名/冲突(全部使用 office_* 前缀)。
提供的工具
| 工具 | 说明 |
|---|---|
office_read_pdf |
提取 PDF 文本,支持 page_start / page_end 页范围与 max_chars 截断 |
office_read_docx |
提取 Word .docx 文本(标题、段落、表格文字) |
office_read_xlsx |
读取 .xlsx / .xls / .csv,按工作表返回制表符分隔的行;支持 sheet / range / max_rows |
office_read_pptx |
提取 PowerPoint .pptx 每页幻灯片的文字(含表格文字) |
office_write_docx |
生成 Word 文档:居中标题、heading1-3/quote/普通段落(粗体/斜体/对齐/颜色)、带表头底色的表格 |
office_write_xlsx |
生成 Excel 工作簿:多工作表、字符串/数字/布尔/空单元格、自动列宽 |
office_write_pptx |
生成 PPT:16:9 宽屏、标题/副标题/分级项目符号/表格 |
office_write_pdf |
生成 PDF:多页、标题/段落/项目符号/表格;中文等非 ASCII 文本自动使用 Windows 系统字体(微软雅黑等) |
office_write_csv |
生成 CSV:可选表头、comma/tab/semicolon 分隔符、默认带 UTF-8 BOM(Excel 打开中文不乱码) |
设计要点(与原生能力对齐)
- 沙箱一致:生成文件与原生
write一样受会话沙箱策略约束——workspace-write下只能写入工作区与系统临时目录,越界会得到与原生相同的[sandbox: ...]拒绝提示,并支持sandbox_permissions+justification的一次性升级(需用户批准)。 - 读前保护:生成文件遵循原生 fs 观察策略(先读后覆写),未读过的已有文件不会被直接覆盖。
- 路径解析:相对路径按会话工作区解析,与原生
read/write一致。 - 观察事件:读取/生成都会发出
fs/observed,与原生工具链互通。 - 规范化:工具定义遵循官方文档
docs/user/develop/basic/tool.md与docs/cookbook/adding-a-tool.md(defineTool+ctx.tools.register、参数 DSL、规范返回值、output.render、纯函数presentCall)。
安装(用户)
# 无需 git,直接从 GitHub 下载安装(已实测可用):
dsh plugin --profile web add https://codeload.github.com/pqkisvery666/dsh-basic-office/tar.gz/refs/heads/main
# 或机器上有 git 时:
dsh plugin --profile web add git+https://github.com/pqkisvery666/dsh-basic-office.git
安装后 重启 dsh web 服务(Ctrl+C 后重新 dsh web),新工具即对所有会话生效。
dsh plugin --profile web up # 更新
dsh plugin --profile web remove dsh-basic-office # 卸载
卸载
dsh plugin --profile web remove dsh-basic-office
在会话中使用
直接对模型说即可,例如:
- 「读一下
C:\path\报告.pdf的前 10 页」 - 「把这个表格生成
data.xlsx和data.csv」 - 「把以下内容生成一份
周报.docx(带标题和表格)和一个 5 页的汇报.pptx」 - 「把这段总结输出成
总结.pdf」
开发
pnpm install # 安装依赖
node test/smoke.mjs # 冒烟测试:5 种格式生成↔解析回环 + 全工具面执行
目录结构
dsh-basic-office/
cordis.patch.yml # dsh.bundle.patch 层:插入插件行(office-tools)
lib/index.js # Cordis 插件入口:9 个工具的注册与执行
lib/parsers.js # 解析侧纯函数(PDF/DOCX/XLSX/PPTX)
lib/generators.js # 生成侧纯函数(DOCX/XLSX/PPTX/PDF/CSV)
test/smoke.mjs # 冒烟测试
已知限制
- 扫描版 PDF(纯图片无文字层)无法提取文本(无 OCR)。
- 老式二进制
.doc/.xls仅.xls受支持;.doc请先另存为.docx。 - 非 Windows 平台生成 PDF 时若无 CJK 系统字体,中文无法渲染(西文正常)。
- PPTX 读取不含图片/绘图中的文字。
yogsoth-ai/de-anthropocentric-research-engine
ZSeven-W/dsh-openpencil
HanaAyane/dsh-reasoning-effort
HuanLinOTO/dsh-plugin-better-sidebar-plugin-office
joeseesun/qiaomu-rss-dsh