证据快照复核于 2026-09-16GitHub 数据核对日期: 2026-08-21
证据已验证Plugin Bundle文件与文档Web Profile

dsh-hwp

在 DeepSeek Harness 中将韩文 HWP 5.x 和 HWPX 文档读取为 Markdown 或文本。

快速了解

它能做什么

在 DeepSeek Harness 中将韩文 HWP 5.x 和 HWPX 文档读取为 Markdown 或文本。

本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。

使用场景
文件与文档文件文档自动化
适配技术
deepseek-harnessnodejshwphwpx
兼容性

Web Profile
>=0.1.5-rc.1 <0.2.0-0

可信度与状态

证据已验证
核对日期 2026/9/15 UTC 14:14

有代码证据的贡献

它为 DSH 增加什么

read_hwp 文档读取工具

让智能体将受支持的韩文 HWP 5.x 和 HWPX 文档转换为 Markdown 或纯文本。

机制证据

选择前先看

它注册 read_hwp 工具,使智能体能够提取标准 read 工具无法读取的韩文文档中的段落、表格、文本框、题注和注释。插件按文件内容识别格式,支持分页输出,并可将表格转换为 Markdown。

适合谁

需要让 DeepSeek Harness 智能体检查韩国政府、学校、企业或其他韩文文字处理文档的用户。

常见任务

  • 从 HWPX 公告中整理申请资格和截止日期。
  • 从 HWP 5.x 文档中提取 Markdown 表格和正文。
  • 使用 offset 和 limit 分段读取较长的韩文文档。

权限与数据

通过 Harness 文件系统接口读取请求的文档字节;未声明运行时依赖。

权限
  • 访问当前 Harness 文件系统策略允许该工具读取的文件。
  • 仅在你配置时执行可选的外部转换器程序。
数据处理
  • 相对文档路径会在会话工作区中解析,并遵循 Harness 文件系统策略。
  • 使用外部转换器时,插件会写入临时文档副本,只向可执行文件传递该临时路径,随后删除临时目录。
外部服务
  • 内置读取器未声明外部服务。
凭据
  • 未声明需要凭据。

局限

  • 内置读取器不支持 HWP 3.x 或 HWPML;这些格式需要可选的外部转换器。
  • 拒绝读取密码保护、DRM 保护和配发版文档。
  • 不会读取页眉页脚、评论、公式、图像、图表、OLE 对象和修订历史。
  • 不会保留字体、颜色、标题层级和对齐等格式。
  • 不支持超过 4 GiB 的 HWPX ZIP64 包;大文件可能短暂阻塞 Harness 事件循环。

DSHub 已核对

  • 不可变 Git 源、Bundle 结构和 Cordis patch 已通过验证。
  • 包声明需要 Node.js >=22.0.0 和 DeepSeek Harness >=0.1.5-rc.1 <0.2.0-0。
  • README 声称已进行测试、CI 覆盖和本地 Harness 安装演练;这些属于发布者声明。

DSHub 未核对

  • 本次收录未独立执行安装或运行验证。
  • 可选外部转换器的安全性和行为取决于你配置的可执行文件。
  • 提供的证据中未找到 npm 注册表包版本。

固定版本安装

安装 dsh-hwp

这个Plugin Bundle没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。

访问源码项目

维护者原文

项目 README

查看 commit 7ab042d 对应的 README
维护者编写的上游内容原文于 2026/9/15README.md 获取,正文和仓库相对媒体固定到 commit 7ab042da76ad,内容哈希为 e5d360c06019。以下是未经 DSHub 翻译的上游原文,语言可能与当前页面不同;第三方托管的 badge 可能独立更新。

dsh-hwp

CI license: MIT

English | 한국어

A DeepSeek Harness plugin that lets agents read Korean Hangul word processor documents — .hwp (HWP 5.x) and .hwpx — as Markdown or plain text.

HWP files are everywhere in Korean government, public institutions, schools, and companies, but they are binary (or zipped XML), so the built-in read tool rejects them. dsh-hwp registers one tool, read_hwp, that converts a document into text the model can use: paragraphs, tabs and line breaks, tables (as Markdown tables), text boxes, captions, and footnotes/endnotes.

  • No native binaries and no runtime dependencies. The HWP 5.x compound-file reader, the HWPX ZIP reader, and the XML parser are small TypeScript modules that use only Node.js built-ins.
  • Reads through the harness filesystem seam (ctx.fs), so relative paths resolve against the session workspace and sandbox / observation policy apply exactly as they do for the built-in read tool.
  • Bounded and pageable. File size, decompressed size, record/element counts, nesting depth, and output size are all capped; long documents are returned in windows with offset / limit.
  • Optional external converter for formats the built-in reader does not handle (for example HWP 3.x), run without a shell.

Install

Requires a DeepSeek Harness host (tested with @deepseek-ai/dsh 0.1.5 release candidates) and Node.js 22 or newer.

dsh plugin --profile web add github:kevin9327/dsh-hwp

Restart dsh web afterwards. The repository ships the built lib/ output, so installing from GitHub needs no build step and no allowBuilds approval. You can pin a commit for reproducibility:

dsh plugin --profile web add github:kevin9327/dsh-hwp#<commit-sha>

To install from a local checkout instead:

git clone https://github.com/kevin9327/dsh-hwp.git
dsh plugin --profile web add ./dsh-hwp

The package declares a dsh.bundle manifest; its cordis.patch.yml inserts one plugin row (id: dsh-hwp). Remove it with dsh plugin --profile web remove dsh-hwp.

Usage

Ask the agent to read a document, for example:

공고문.hwpx 파일을 읽고 신청 자격과 마감일을 정리해 줘.

The model calls read_hwp:

{ "file_path": "공고문.hwpx" }

and receives something like:

공고문.hwpx (hwpx 5.1.1.0, builtin reader, markdown) — lines 1-42 of 42

2026년 지원사업 모집 공고
...
| 구분 | 신청 기간 | 비고 |
| --- | --- | --- |
| 1차 | 3.2.~3.20. | 온라인 접수 |

Tool reference: read_hwp

Parameters

Name Type Required Description
file_path string yes Path to the .hwp / .hwpx file. Relative paths resolve against the session workspace.
format "markdown" | "text" no markdown (default): tables become Markdown tables. text: table rows become tab-separated lines.
offset integer no 1-based first line of the converted output. Default 1.
limit integer no Maximum number of lines to return. Default and maximum: readLimit (1000).

The format is detected from the file content, never from the extension.

Result

The model sees a header line, the requested lines, a continuation hint when more lines remain, and any warnings. Programmatic callers (for example PTC mode) receive this canonical value:

Field Type Description
path string Display path of the file that was read.
sourceFormat hwp5 | hwpx | hwp3 | hwpml | unknown Detected container format.
engine builtin | converter Which reader produced the text.
version string? Format version declared by the file, e.g. 5.1.0.1.
sections integer? Number of body sections (built-in reader only).
format markdown | text Output format used.
offset integer First line requested.
lines { number, text }[] The returned window.
totalLines integer Total lines of the converted document.
nextOffset integer? Present when more lines remain; pass it as offset to continue.
warnings string[] Non-fatal problems, e.g. a truncated trailing record.

Errors

Failures are returned as tool errors whose message starts with a stable code:

Code Meaning
HWP_UNSUPPORTED_FORMAT Not an HWP 5.x or HWPX document (HWP 3.x and HWPML need the external converter).
HWP_ENCRYPTED Password-protected or DRM-protected document.
HWP_DISTRIBUTION Read-only "distribution" document (배포용 문서) whose body text is encrypted.
HWP_MALFORMED The container or record structure is damaged.
HWP_TOO_LARGE A size, count, or nesting limit was exceeded.
HWP_CONVERTER_FAILED The external converter is misconfigured, failed, timed out, or produced too much output.

Missing files, directories, and invalid arguments produce the usual harness tool errors.

Configuration

Every field has a default. Override fields in your profile's cordis.patch.yml; remember that a patch replaces a row's whole config, so restate every field you want to keep non-default.

- id: dsh-hwp
  name: dsh-hwp
  config:
    readLimit: 500
    maxOutputChars: 30000
Field Default Description
maxFileBytes 52428800 (50 MiB) Largest file read by one call.
maxDecompressedBytes 268435456 (256 MiB) Largest total decompressed size of one document (decompression-bomb guard).
readLimit 1000 Default and maximum number of lines per call.
maxOutputChars 40000 Character budget of one returned window.
maxLineChars 4000 Longer lines are cut and marked. Must not exceed maxOutputChars.
timeoutMs 120000 Cooperative timeout of one call.
converter.command "" Absolute path of an external converter executable. Empty disables it.
converter.args ["{input}"] Converter arguments; {input} is replaced by the path of a temporary copy of the document.
converter.mode fallback fallback: use the converter only when the built-in reader reports HWP_UNSUPPORTED_FORMAT or HWP_MALFORMED. always: use it for every file.
converter.timeoutMs 60000 Converter timeout.
converter.maxOutputBytes 33554432 (32 MiB) Largest converter output accepted.

External converter

You can plug in any command-line converter you trust that prints Markdown or text to stdout. The plugin:

  1. reads the document through ctx.fs (size-checked),
  2. writes those bytes to a private temporary directory as document.hwp / .hwpx / .hml,
  3. spawns converter.command directly, without a shell, with {input} in converter.args replaced by that temporary path — nothing from the model's arguments or the document ends up on the command line,
  4. enforces the timeout and output cap, and deletes the temporary directory.

Encrypted and distribution documents are never sent to the converter. On Windows, .cmd / .bat wrappers are rejected because they would need a shell; point command at the real executable (for a Node.js converter, use node.exe and put the script path first in args). The converter runs with the harness process's permissions, outside any sandbox — configure only programs you trust.

Limitations

  • Not read: page headers and footers, memos/comments, hidden comments, field guide text (누름틀 안내문), equations, images and their embedded data, charts and OLE objects, and change-tracking history.
  • Not supported by the built-in reader: HWP 3.x (.hwp from Hangul 97 and earlier) and HWPML (.hml) — use an external converter; password-protected, DRM-protected, and distribution documents are refused.
  • Formatting is not preserved: heading levels, fonts, colors, and alignment are dropped. Merged table cells keep their text in the top-left cell and leave the covered cells empty; nested tables are flattened into their parent cell; a 1×1 table (a boxed paragraph) is rendered as plain paragraphs.
  • HWPX ZIP64 packages (over 4 GiB) are not supported.
  • Parsing is synchronous; a very large document can block the harness event loop for a moment.

How it was tested

  • 76 unit and integration tests (Vitest), run in CI on Linux and Windows. Fixtures are synthetic documents generated by the tests themselves: HWP 5.x records inside compound files written by the independent cfb library, and HWPX packages zipped by fflate.
  • Seeded fuzz tests mutate compound files, ZIP archives, and record streams and assert that only typed HwpReadErrors escape — no RangeErrors, hangs, or unbounded allocations.
  • The plugin is composed with the real @deepseek-ai/dsh-tools, @deepseek-ai/dsh-system-prompt, and @deepseek-ai/dsh-fs-local services in a Cordis context and called through the harness tool pipeline.
  • The packed plugin was installed with dsh plugin add into a @deepseek-ai/dsh 0.1.5-rc profile and driven through the real headless agent loop by a local stand-in model provider (no API key): the agent called read_hwp with a workspace-relative path and received the converted .hwp and .hwpx content, and a missing file came back as a tool error.
  • During development the reader was also cross-checked against an independent open-source HWP parser on a local corpus of about 1,000 real-world public documents (not included in this repository).

Development

npm ci
npm run typecheck
npm test
npm run build   # regenerates lib/, which is committed so GitHub installs need no build step

License

MIT. dsh-hwp has no runtime dependencies; the @deepseek-ai/* packages it uses are peer dependencies provided by the harness. Development-only dependencies are MIT, ISC, BSD, or Apache-2.0 licensed.

This plugin was written from the publicly available HWP 5.0 and OWPML (HWPX) format documentation. "Hangul", "HWP", and "Hancom" are trademarks of Hancom Inc.; this project is not affiliated with or endorsed by Hancom Inc. or DeepSeek.


한국어

dsh-hwpDeepSeek Harness용 플러그인으로, 에이전트가 한글 문서(.hwp HWP 5.x, .hwpx)를 Markdown 또는 일반 텍스트로 읽을 수 있게 해 주는 read_hwp 도구를 등록합니다.

  • 네이티브 바이너리·런타임 의존성 없음: HWP 5.x 복합 파일, HWPX(ZIP+XML) 파서를 Node.js 내장 기능만으로 구현했습니다.
  • 읽는 내용: 문단, 탭·줄바꿈, 표(Markdown 표), 글상자, 캡션, 각주·미주.
  • 안전장치: 파일 크기·압축 해제 크기·레코드 수·중첩 깊이·출력 길이를 모두 제한하고, 긴 문서는 offset/limit로 나눠 읽습니다.
  • 외부 변환기(선택): HWP 3.x처럼 내장 파서가 읽지 못하는 형식은 사용자가 지정한 변환 프로그램으로 읽을 수 있습니다. 셸을 거치지 않고 실행하며, 임시 사본 경로만 인자로 넘깁니다.

설치

dsh plugin --profile web add github:kevin9327/dsh-hwp

설치 후 dsh web을 다시 시작하세요.

사용 예

공고문.hwpx 파일을 읽고 신청 자격과 마감일을 정리해 줘.

제한 사항

  • 머리말·꼬리말, 메모, 숨은 설명, 누름틀 안내문, 수식, 그림·차트·OLE 개체, 변경 추적 기록은 읽지 않습니다.
  • HWP 3.x, HWPML(.hml)은 외부 변환기가 필요합니다. 암호·DRM이 걸린 문서와 배포용 문서는 읽지 않습니다.
  • 글꼴·제목 수준·정렬 같은 서식은 보존하지 않습니다. 병합된 셀은 왼쪽 위 칸에 내용을 두고 나머지는 비웁니다.

라이선스: MIT

有意识地管理

安装与管理

前置条件与目标 Profile

目标 Web Profile

交付方式 Git Bundle — kevin9327/dsh-hwp#7ab042da76ad4e3b9db8d74126c869c07cad5a64

验证、更新与移除

显示生命周期命令
验证
dsh plugin --profile web list

兼容性与访问范围

DeepSeek Harness plugin; Node.js 22+ required >=0.1.5-rc.1 <0.2.0-0

检查兼容性证据

风险事实

filesystem-access

Reads selected HWP/HWPX files through the Harness filesystem service.

证据
external-execution

An optional user-configured converter runs with the Harness process permissions outside its sandbox.

证据
证据与编辑审查Manifest、Bundle patch、分发与新鲜度

不可变证据

审查状态与源码活动

AI 已审查

请使用固定提交的 Git 安装路径。配置可选转换器时,应将其视为受信任的本地进程执行。

AI 审查于 2026/9/15 UTC 14:15GitHub 事实核对日期: 2026/9/15 UTC 14:15

自当前证据基线以来,没有记录到重要源码变化。

下一步

按 Plugin 安装流程操作

订阅重要变化: dsh-hwp