
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-wps-plugin
Advanced tools
DeepSeek Harness(DSH)金山文档 / WPS 能力集成插件。 装上之后,你可以直接在 DeepSeek Harness 对话里用自然语言操作 WPS 云文档:列文件、读文档、创建/上传文档、搜索文件等。
| 依赖 | 版本要求 | 说明 |
|---|---|---|
| Node.js | >= 18.0.0 | 建议 LTS(20/22) |
| DeepSeek Harness (DSH) | 0.1.0-rc.x | npm install -g @deepseek-ai/dsh |
| WPS 账号 | 个人账号 | 授权走 WPS OAuth,登录一次即可 |
# 安装 DSH(全局)
npm install -g @deepseek-ai/dsh
# 验证
dsh --version
是的——直接通过对话让 DeepSeek Harness 帮你安装即可。
你只需要在 DSH 对话里说一句:
「请帮我安装 dsh-wps-plugin 插件」
DSH 智能体会自动完成:
dsh plugin --profile web add <包源>(<包源> 为 npm 包名 / Git 地址 / 本地路径任一)
dsh-wps-plugin 时,DSH 会让 pnpm 从 npm 官方源解析。本包已发布到 npm(dsh-wps-plugin@0.2.0),因此「一句话安装」直接成立;也可改用 Git 地址或本地路径(见方式二 / 方式三)。tool-wps 行(cordis.patch.yml 内置 insert),无需再手动编辑 bundles 或 cordis.patch.yml。~/.dsh 系统目录的操作可能需要你在弹窗中批准)注意两点:
dsh web,然后回到对话说一声「重启好了」。不想用对话,也可以手动执行(与方式一的对话自动步骤等价):
# 1. 安装插件包(三选一)
dsh plugin --profile web add dsh-wps-plugin # 从 npm(已发布)
dsh plugin --profile web add https://github.com/handsomeboyck/dsh-wps-plugings.git # 从 Git
dsh plugin --profile web add /path/to/dsh-wps-plugin # 本地路径 / link
# 2. 重启 DSH
dsh web
说明:
dsh plugin命令本质是「把参数转发给 profile 目录下的 pnpm」,并把声明了dsh.bundle的包自动写入dsh.profile.bundles;插件自带的cordis.patch.yml会以insert形式自动注册tool-wps行。因此无需手动编辑bundles或cordis.patch.yml。
git clone https://github.com/handsomeboyck/dsh-wps-plugings.git
cd dsh-wps-plugings
npm install
npm run build # 编译 src → dist
# 以 link 方式接入 DSH
dsh plugin --profile web add link:$PWD
# 重启 dsh web 即可(bundle 自动注册 tool-wps 行)
mcp-center.wps.cn)授权轮询最长等待 5 分钟,请在该时间内完成登录。
装上之后,用自然语言即可,例如:
| 你说的话 | 实际调用的工具 |
|---|---|
| 「看看我最近的文件」 | list_latest_items |
| 「列出我的云文档根目录」 | list_my_files |
| 「搜一下含『周报』的文件」 | search_files |
| 「读一下这个文档」 | read_file |
| 「新建一个 docx 文档,内容是……」 | create_file_with_content |
| 「把这份周报上传到 WPS」 | upload_file / create_file_with_content |
| 「看下这个文件的详情 / 下载链接」 | get_file_info / download_file |
import { initPlugin } from 'dsh-wps-plugin';
const plugin = await initPlugin();
// 列出我的云文档根目录
const files = await plugin.callTool('list_my_files', { page_size: 10 });
// 搜索文件
const searchResult = await plugin.callTool('search_files', {
keyword: '周报',
file_type: 'file',
page_size: 5
});
// 创建带内容的文档(root 目录 parent_id 为 "0")
const newDoc = await plugin.callTool('create_file_with_content', {
name: '我的文档',
content: '# 标题\n\n正文内容',
file_extension: 'docx', // 支持 .otl/.docx/.pdf/.xls/.xlsx/.ksheet/.dbt
parent_id: '0'
});
// 读取文档内容
const content = await plugin.callTool('read_file', {
file_id: 'your_file_id_here',
format: 'markdown'
});
插件默认向 DSH 注册以下 56 个核心工具(由官方 SkillHub MCP tools/list 生成,参数 schema 自动净化到 DSH 强制子集):
| 服务 | 数量 | 工具 |
|---|---|---|
| 文件/云盘 | 13 | list_my_files list_files search_files get_file_info create_file_with_content create_folder upload_new_file download_file read_file move_file copy_file rename_file list_latest_items |
| 智能文档 otl | 6 | otl.insert_content otl.convert otl.block_query otl.block_insert otl.block_update otl.block_delete |
| 分享/协作 | 5 | share_file get_share_info set_collaborator_permissions list_document_collaborators create_document_comment |
| 文字 wps | 7 | wps.create_empty_document wps.read_text wps.write_text wps.read_table wps.write_table wps.search_replace wps.export |
| 表格 sheet | 10 | sheet.get_sheets_info sheet.get_range_data sheet.update_range_data sheet.range_data_batch_update sheet.add_sheet sheet.delete_sheets sheet.find_range_data sheet.delete_range_data sheet.insert_rows_cols sheet.merge_range |
| 演示 wpp | 4 | wpp.create_empty_presentation wpp.read_slide wpp.write_slide wpp.export_pdf |
| 4 | pdf.get_pdf_page_count pdf.extract_pdf_pages pdf.convert pdf.convert_query | |
| 多维表 dbsheet | 4 | dbsheet.get_schema dbsheet.list_records dbsheet.create_records dbsheet.update_records |
| 知识库 kwiki | 2 | kwiki.list_knowledge_views kwiki.list_items |
| 版本历史 | 1 | list_file_versions |
官方 SkillHub 端点共提供 258 个工具(含
aipptAI 生成 PPT、sheet图表/透视表、dbsheet视图/表单/权限、form等)。如需扩展更多能力,把新工具名加入scripts/generate-core-tools.mjs的CORE_NAMES,再node scripts/generate-core-tools.mjs && npm run build重新生成并构建即可。
按优先级降级:
dsh-wps/user-token<DSH 工作目录>/.dsh-wps-cache/token.json换了 WPS 账号想重新认证时:
:: Windows:删除旧凭据
cmdkey /delete:dsh-wps/user-token
然后 重启 DSH,重启后第一次调用 WPS 工具会自动弹出浏览器,用新账号登录即可。
为什么不删也「不生效」?运行中的 DSH 进程会在内存里缓存旧 Token,仅删除凭据不够,必须重启进程清空缓存——这是切换账号的标准步骤。
Invalid session ID):自动重建,无需人工干预| 症状 | 原因 | 解决 |
|---|---|---|
| 浏览器没弹出 / 授权超时 | 未登录或网络问题 | 确认能访问 mcp-center.wps.cn,重新触发一次工具调用 |
| 调工具返回 401/403 | Token 失效 | 插件会自动重授权;仍失败则删除凭据 + 重启 DSH |
| 显示的还是旧账号数据 | 进程内存缓存旧 Token | 删除凭据(cmdkey /delete:dsh-wps/user-token)并重启 DSH |
| 插件没生效(没有 WPS 工具) | 插件未安装或未重启 | 确认 dsh plugin --profile web add dsh-wps-plugin 已执行,并重启 dsh web |
dsh 命令找不到 | npm 全局目录不在 PATH | 将 npm root -g 目录加入 PATH 后重开终端 |
npm install # 安装依赖
npm run build # 构建(tsc:src → dist)
npm run dev # 监听模式开发
目录结构:
dsh-wps-plugin/
├── src/
│ ├── auth/ # 浏览器 OAuth 授权 + Token 存储
│ ├── tools/ # MCP API 客户端与工具定义
│ ├── core-tools.ts # 56 个核心工具定义(官方 tools/list 生成)
│ ├── client.ts # 编程式客户端(initPlugin / refreshToken)
│ ├── index.ts
│ └── plugin.ts # Cordis 插件入口(apply / Config)
├── scripts/ # 工具定义生成器 + 官方 tools/list 快照
├── cordis.patch.yml # bundle patch 层(insert 注册 tool-wps 行)
├── dist/ # 构建产物
└── package.json # dsh.bundle.patch 声明
本软件采用**双许可(Dual Licensing)**模式:
LICENSE。可免费使用、修改、分发,但衍生作品必须开源,SaaS 场景须公开源码。COMMERCIAL-LICENSE.md(联系邮箱:839567748@qq.com)。未经商业授权,不得闭源商用。
FAQs
DeepSeek Harness 插件 - 金山文档 WPS 能力集成
The npm package dsh-wps-plugin receives a total of 0 weekly downloads. As such, dsh-wps-plugin popularity was classified as not popular.
We found that dsh-wps-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.