dshbase

插件目录 / Developer / dsh-tool-doc

dsh-tool-doc

已验证 · 实测可装 zhangjiabo522

✓ 持续维护 基于 6 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-15最近推送
跨平台平台

功能简介

DeepSeek Harness 文档工具插件:read/create/edit PDF/DOCX/XLSX/PPTX/CSV/Markdown(read_document、create_document、edit_document)

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

DeepSeek Harness 文档工具插件:read/create/edit PDF/DOCX/XLSX/PPTX/CSV/Markdown(read_document、create_document、edit_document) 实测能干净安装、正常启动。早期项目,但功能可用。

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

README

@deepseek-ai/dsh-tool-doc

English | 中文

Model-facing document tools: read, create and edit PDF / DOCX / XLSX / PPTX / CSV / Markdown files without shelling out to external utilities.

What it does

Registers three tools on ctx.tools:

  • read_document(file_path) — reads PDF (text layer, page by page), DOCX (mammoth), XLSX (every sheet, cell values), PPTX (per-slide text), CSV (delimiter-sniffed, quote-aware) and plain text (md/txt/yaml/json/log). Output is bounded by maxTextChars (default 200,000) with an explicit truncation notice. Scanned/image-only PDFs yield no text.
  • create_document(file_path, content) — creates a NEW file; the target must not exist (createIfAbsent semantics — use edit_document to change an existing file). DOCX/PDF take Markdown-lite text (# /## /### headings, - bullets) plus title and (DOCX) tables; XLSX takes sheets; CSV takes rows; md/txt take plain text. PDF embeds a system CJK font when one is discoverable (cjkFontPath config overrides the search).
  • edit_document(file_path, operations) — applies ordered literal edits in place. DOCX: replace_text (inside single text runs, count defaults to 1, 'all' replaces every match) and append_paragraph. XLSX: set_cell / append_rows / add_sheet (1-based addressing; sheet omitted means the first sheet). CSV: set_cell / append_rows. Operations validate up front; a rejected op aborts the call before any write.

Legacy binary .doc / .xls / .ppt files are not supported — the tools ask the user to convert them first. PPTX is read-only.

Filesystem seam

Text formats (csv/md/txt/…) read and write through the governed ctx.fs seam, so sandbox policy, approval flows and observation events apply as with the native read/write tools. Binary formats read through ctx.fs.readBytes (capped by readMaxBytes, default 50 MB) but write to the resolved process path with node:fs, because the seam is text-only; sandbox write policy does not fence those binary writes.

Configuration

All optional: maxTextChars (read text budget), readMaxBytes (binary read cap), cjkFontPath (explicit CJK font file for PDF creation — any fontkit-openable TTF/OTF/TTC).

Model Experience

Tool schema

The model sees one schema per tool with a precise per-format description; edit_document operations are a oneOf discriminated by a const op, so the model gets an exact contract for each edit kind.

Tool-call history and result

Read results carry a <path>/<kind>/<details>/<content> envelope (bounded text); create/edit results return a one-line acknowledgement with byte counts or per-op summary numbers. Errors are stable Chinese/English message strings describing the rejection (unsupported legacy format, target already exists, unknown worksheet, zero matches, …).

Known Limitations and Deferred Work

  • PDF CJK fonts are discovered, not bundled — with no usable system font, CJK text falls back to the built-in Latin font (the create result reports it). The .ttc collection path extracts the first face to a temp TTF because pdfkit cannot embed collections.
  • DOCX edits are paragraph-level — replace_text matches inside single <w:t> runs (text split across runs does not match); headers, footers, fields and numbering are out of edit scope.
  • No in-place edits for PDF/PPTX/text — recreate with create_document instead.
  • Legacy binary office formats unsupported — .doc/.xls/.ppt need a user-side conversion first.

安装

🧩 让 Agent 自动装(推荐)

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

dsh plugin add dshbase-catalog

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

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

Web profile:

dsh plugin --profile web add github:zhangjiabo522/dsh-tool-doc

Headless(CLI)profile:

dsh plugin --profile headless add github:zhangjiabo522/dsh-tool-doc

实测报告

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

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

分享徽章

Developer 里更多

浏览全部 7819 个插件 →