kw78/dsh-office-tools
面向DeepSeek Harness的模型端Office工具:支持Word(.docx)、Excel(.xlsx)和PowerPoint(.pptx)的创建/读取/更新,使用工作区安全路径,并支持PPT图片嵌入。
项目介绍Project Overview
dsh-office-tools 是面向 DeepSeek Harness 的 Office 套件,提供七个工具以创建与读取 docx、xlsx 和 pptx 文件,能力涵盖生成文档、电子表格与幻灯片,以及抽取纯文本、单元格网格与幻灯片段落。适用于模型在会话工作区内按需产出或解析 Office 文件的场景。注意:所有路径解析均以会话工作目录为根,绝对路径需落在工作区内;写入默认拒绝覆盖,读取上限 50 MiB。
dsh-office-tools is a DeepSeek Harness plugin exposing seven model-facing tools for creating and reading .docx, .xlsx, and .pptx files. It handles document, spreadsheet, and slide generation, plus text, cell-grid, and slide-paragraph extraction. Use it when a model needs to produce or parse Office files within its session workspace. Caveat: all paths resolve against the session cwd, absolute paths must stay inside the workspace, writes refuse overwrite by default, and reads cap at 50 MiB.
请帮我了解并安装插件:【dsh-office-tools】【https://github.com/kw78/dsh-office-tools】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add dsh-office-tools
把 kw78/dsh-office-tools 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-office-tools
Seven model-facing Office file tools for DeepSeek Harness, running entirely in the plugin host half.
Install:
dsh plugin --profile web add github:kw78/dsh-office-tools
| Tool | Purpose | Library |
|---|---|---|
word_create |
Create .docx (title, paragraphs, bullets, one table) |
docx |
word_read |
Extract plain text from .docx |
mammoth |
excel_create |
Create a multi-sheet .xlsx from scalar cell grids |
SheetJS (xlsx) |
excel_read |
Read one or all sheets as scalar rows | SheetJS |
excel_update |
Replace/create whole sheets, or write cells by A1 address | SheetJS |
ppt_create |
Create a 16:9 .pptx (title slide, titles, paragraphs, bullets, notes, PNG/JPG/GIF images) |
pptxgenjs |
ppt_read |
Extract per-slide paragraph text, speaker notes, and image counts | jszip |
Harness integration
The plugin follows the standard DSH host-plugin contract:
- It exports
name/inject/apply;inject = ['tools']is its only runtime service dependency (@deepseek-ai/dsh-tools). apply(ctx)wraps everyctx.tools.register(defineTool({...}))inctx.effect(...)so Cordis disposes the registrations with the plugin fiber.defineTooldeclares model-visibleparameters, a validated canonicaloutput.schema, and a pureoutput.rendertext projection.execute(args, exec)resolves every path againstexec.agent.session.header.cwd; relative paths stay in the session workspace and absolute paths are accepted only when still inside it. Arealpathcheck on the nearest existing ancestor closes the symlink escape hatch.- Image files must live inside the session workspace (
.png/.jpg/.jpeg/.gif, 20 MiB each); explicit inch coordinatesx/y/w/hare supported, or omit them for automatic placement below the text. - Writes go through a same-directory temp file +
rename;overwritedefaults tofalse.
Build
pnpm install
pnpm run check # typecheck + tests + build
Artifacts: lib/index.js (ESM host bundle with Office libraries inlined; @deepseek-ai/* and cordis stay external) and lib/types/**/*.d.ts.
Install
# npm (recommended)
dsh plugin --profile web add dsh-office-tools
# GitHub source
dsh plugin --profile web add github:kw78/dsh-office-tools
# local checkout
dsh plugin --profile web add /path/to/dsh-office-tools
Restart the DSH server after installation. The seven tools appear in the next prompt assembly.
Community indexes
- Registration blocks for awesome-dsh-plugin / dsh-market are in docs/hub-registration.md.
- Recommended repository topics:
dsh,dsh-plugin,deepseek-harness,office.
Safety
- All file access is confined to the calling agent's session workspace.
- Reads are capped at 50 MiB; text/cell results are bounded and mark
truncated. - Creates/updates are bounded by row and cell limits and refuse overwrites by default.
- No LibreOffice/PowerPoint/Word subprocess is spawned; formats are generated and parsed with pure-JS libraries.
nexu-io/open-design
ruvnet/ruflo
amruthpillai/reactive-resume
volcengine/OpenViking
Molunerfinn/PicGo
titanwings/colleague-skill
nocobase/nocobase
Tencent/WeKnora