jiazekang/dsh-office

可以读写办公文件的插件,支持拖动办公文件到对话框

Project Overview项目介绍

dsh-office is a native plugin built exclusively for DeepSeek Harness (DSH), designed to add office document handling capabilities to the DSH agent environment. Its core features include reading content from Excel files, making precise edits to specific cells or ranges in Excel, and enabling users to drag and drop any office file directly into DSH’s conversation attachment bar. The plugin follows DSH’s official plugin development conventions, and can be installed either from the official npm registry or via a custom local development link for testing and customization by plugin developers.

This plugin targets DSH users who need to process Excel documents as part of their regular AI-assisted office work, including data workers, administrative staff, and software developers. When a user drags an Excel file into the DSH conversation attachment bar, the plugin first reads the full structured content of the file so the DSH agent can understand and analyze it. After the user submits a clear edit request, the plugin locates the target cells, makes the requested changes, and outputs the updated file for the user to download directly from the conversation.

The plugin relies on the exceljs library to handle all common Excel read and write operations. Development uses the pnpm package manager for full dependency installation, building, smoke testing, and hot reloading during active development of the plugin. Installing from the official npm registry automatically pulls in the exceljs dependency, but when using a local development link, you have to add exceljs to your local DSH profile manually. The project is released under the permissive MIT open source license, so it can be used freely for both personal and commercial purposes.

这是一个专为DeepSeek Harness(DSH)开发的原生文档处理插件,核心能力包括读取Excel文件内容、对Excel文件进行精准修改,同时支持将任意办公文件直接拖入对话的附件栏。插件使用TypeScript开发,严格遵循DSH的插件开发规范,打包后可通过npm公开发行版或者本地开发链接的方式安装到DSH的web配置环境中。

该插件面向需要在DSH对话中处理Excel办公文档的开发人员、行政办公人员和数据处理人员使用。典型工作流程为:用户将需要处理的Excel文件拖入对话附件栏,插件读取文件的完整内容后交给AI进行分析;用户提出具体的修改需求后,插件会精准定位目标单元格完成修改,最终输出修改后的新文件供用户下载使用。

插件依赖exceljs库实现Excel的读写操作,开发阶段使用pnpm进行依赖安装和打包构建,支持本地开发联调、冒烟测试和热构建等工作流。项目采用MIT许可证开源,个人和商业使用都无限制,npm安装时会自动处理依赖,本地开发链接模式则需要手动添加exceljs依赖到配置文件。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
  • No DSH plugin manifest detected - it may only carry the dsh-plugin topic, so the install method must be confirmed on the spot未检测到 DSH 插件清单:可能只是打了 dsh-plugin 话题,安装方式要现场确认
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 exceljs

把 jiazekang/dsh-office 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-office

DSH Office 文档插件:Excel 读取 + 精准修改 + 办公文件拖入附件栏。

结构

packages/
  dsh-office/   # Office 文档工具插件:Excel 读取/精准修改(exceljs)+ 拖入附件栏

常用命令(在仓库根目录执行)

pnpm install                       # 安装所有包依赖
pnpm --filter dsh-office build     # 构建单个插件(tsc 类型检查 + tsdown 打包到 lib/)
pnpm --filter dsh-office smoke     # dsh-office 冒烟测试(真实文件读写验证)
pnpm --filter dsh-office watch     # 开发热构建
pnpm -r typecheck                  # 全部包类型检查

安装 / 联调(web profile)

# 把本地开发版挂到 web profile(link: 协议,改完重新 build 即生效)
dsh plugin --profile web add link:D:\Porject\DSH\dsh-office\packages\dsh-office

# dsh-office 的 exceljs 是外部依赖,link: 开发模式下需单独装进 profile
dsh plugin --profile web add exceljs

# 不启动服务查看合并后的配置树,确认插件行已进入
dsh --profile web --dump-config

# 重启 dsh web 后生效

发布到 npm

cd packages/dsh-office
npm publish
# 用户安装:dsh plugin --profile web add dsh-office
# (npm 安装会自动带上 exceljs 依赖,无需手动装)

插件写法速记

  • 插件 = 导出 name / inject / Config / apply 的 npm 包。
  • 工具用 defineTool({ name, description, parameters, output, execute }) 定义, 参数与输出都必须是 JSON Schema,output.render 返回 ContentBlock[]。
  • 所有注册都包在 ctx.effect(fn, label) 里,卸载时自动清理。
  • @deepseek-ai/* 运行时服务声明为 peerDependencies,构建时保持外部(deps.neverBundle), 运行时由宿主进程解析,避免重复实例。
  • 包内 cordis.patch.yml 用 insert 把插件行加进 roster;声明 dsh.bundle.patch 后 dsh plugin add 会自动把它加入 profile 的 bundles 层。

更完整的参考:@linxin666/dsh-ssh(服务端全流程)与 @linxin666/dsh-client-ui-task-board(客户端全流程), 源码见 https://github.com/zhu1090093659/dsh-web-ui。

← 上一个 Prev dsh-1bot 下一个 Next MemVault →