dshbase

插件目录 / Developer / dsh-office-tools

dsh-office-tools

已验证 · 实测可装 kw78

✓ 持续维护 基于 5 个官方 DSH 包 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

9Stars
1Forks
1未关闭 issue
TypeScript语言
2026-08-15最近推送
跨平台平台

功能简介

Model-facing Office tools for DeepSeek Harness: Word (.docx), Excel (.xlsx), and PowerPoint (.pptx) create/read/update with workspace-safe paths and PPT image embedding.

我们的评价
可用 — 实测通过,早期项目

Model-facing Office tools for DeepSeek Harness: Word (.docx), Excel (.xlsx), and PowerPoint (.pptx) create/read/update with workspace-safe paths and PPT image embedding. 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-office-tools

Seven model-facing Office file tools for DeepSeek Harness, running entirely in the plugin host half.

npm version ci License: MIT Listed on awesome-dsh-plugin

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 every ctx.tools.register(defineTool({...})) in ctx.effect(...) so Cordis disposes the registrations with the plugin fiber.
  • defineTool declares model-visible parameters, a validated canonical output.schema, and a pure output.render text projection.
  • execute(args, exec) resolves every path against exec.agent.session.header.cwd; relative paths stay in the session workspace and absolute paths are accepted only when still inside it. A realpath check 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 coordinates x/y/w/h are supported, or omit them for automatic placement below the text.
  • Writes go through a same-directory temp file + rename; overwrite defaults to false.

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.

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-office-tools」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:kw78/dsh-office-tools

Headless(CLI)profile:

dsh plugin --profile headless add github:kw78/dsh-office-tools

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7789 个插件 →