Back to home@unStone

dsh-plugin-web-ppt

DeepSeek Harness plugin: let your agent read and export .pptx / .ppt — pure JS, no PowerPoint, no conversion, no network.

Stars
0
Language
TypeScript
Created
Aug 22, 2026
Updated
Aug 22, 2026

Introduction

dsh-plugin-web-ppt

DeepSeek Harness 插件:让 agent 直接读懂并导出 .pptx / .ppt

解析与渲染全部走 web-ppt纯 JS——不装 PowerPoint、不起 LibreOffice、不转格式、不联网。

安装

dsh plugin --profile <你的 profile> add dsh-plugin-web-ppt

装完 dsh --profile <name> --dump-config 里会多出一层 # == dsh-plugin-web-ppt,启动即生效。

工具

工具干什么关键参数
ppt_read逐页返回标题 / 正文 / 演讲者备注,agent 认识一份 PPT 的入口pathpagespasswordinclude_hidden
ppt_render_svg每页导出一个自包含 SVG(图片内联为 data URI)pathout_dirpages
ppt_export_html整份导出成一份可打印 HTML,浏览器「打印为 PDF」即得 PDFpathout_fileanimation_steps

pages 一律是 1 基选择串,形如 1-3,7;不传表示全部。隐藏页默认不参与,与 PowerPoint 放映一致。

文件读写全部经 Harness 的 fs 服务,因此 workspace 归属、沙箱策略与写入审批都照常生效。

配置

在 profile 的 cordis.patch.yml 里按 id 覆盖(注意 patch 会整体替换 config,要把键写全):

- id: web-ppt
  name: dsh-plugin-web-ppt
  config:
    maxFileBytes: 134217728
    maxTextChars: 40000
    includeHidden: false
默认说明
maxFileBytes67108864(64 MB)单文件读取上限,超出直接失败
maxTextChars20000ppt_read 的文本预算,超出截断并置 truncated
includeHiddenfalse是否默认把隐藏页算进来

边界

不能
.pptx(Zip+OOXML)与 .ppt(CFB+Escher)导出 PNG——需要 canvas,Node 里没有
加密文件(传 password写入 / 编辑 PPT,本插件只读
图表、SmartArt、公式、EMF/WMF 图元播放动画,只能按终态或按点击批次展开成多页

导出的 SVG 固定走原生 <text> 而不是 foreignObject:后者只有浏览器认,Inkscape / librsvg / 设计工具打开会整块丢失文本。文件是要交出去的,必须自包含。

开发

npm install && npm test

改完代码跑 npm run check && npm test,两条都绿才算完成。

本地挂进 DSH 验证:

dsh plugin --profile dev add /path/to/dsh-plugin-web-ppt

发布

版本号改完打 tag 即可,release.yml 走 npm Trusted Publishing(OIDC),Secrets 里不存凭据:

git tag -a v0.1.0 -m "v0.1.0" && git push origin v0.1.0

⚠️ 第一版走不了 OIDC:npm 要求包已存在才能配置 Trusted Publishing,而包要先发布才会存在。首发先在本地 npm publish 一次,再去 npm 包设置里配好 trusted publisher。

License

MIT