DeepSeek Harness 插件

dsh-tool-somark

Model-facing SoMark document parser tool (somark_parse) for DeepSeek Harness(英文原文)

跳到安装方式

来源信息

GitHub 仓库
saurtone/dsh-tool-somark
最近更新
2026年8月14日
分类
模型与服务商
GitHub stars
2
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/saurtone/dsh-tool-somark
插件名:dsh-tool-somark
作者:saurtone

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器2 个文件
README.md来源说明 · 只读预览

dsh-tool-somark

A DeepSeek Harness plugin that gives the model a somark_parse tool: parse PDFs, images, Word, and PowerPoint files into structure-preserving Markdown and JSON through the SoMark document-parsing API, with page and token counts.

The document read goes through ctx.fs, so any mounted filesystem policy applies to the read. Parsed content is returned as data and must never be executed.

Install

# from npm (once published)
dsh plugin --profile <name> add dsh-tool-somark

# from a tarball
dsh plugin --profile <name> add ./dsh-tool-somark-0.1.0.tgz

# from git (requires the package's `prepare` build; see the harness docs)
dsh plugin --profile <name> add github:you/dsh-tool-somark

Then boot the profile; the somark_parse tool registers automatically. The plugin is also usable as a plain library dependency for programmatic parsing (src/client.ts exports the API client).

Requirements

  • A DeepSeek Harness profile with the base bundle (@deepseek-ai/dsh-base), which provides ctx.tools and ctx.fs.
  • A SoMark API key. Set SOMARK_API_KEY in the environment or configure apiKey below. SoMark is an external paid service and receives the uploaded document contents.

Config

All fields optional; defaults apply when omitted.

FieldDefaultMeaning
apiKeyunsetSoMark API key $SOMARK_API_KEY Empty → the tool errors at execution.
baseURLhttps://somark.tech/api/v1API base; /parse/async and /parse/async_check append.
outputFormats['markdown', 'json']Formats requested when a call omits outputFormats.
elementFormats{ image: 'url', formula: 'latex', table: 'html', cs: 'image' }Partial per-element rendering-format overrides.
featureConfigcross-page off, inline image / table image / image understanding on, header-footer offPartial feature-switch overrides.
pollIntervalMs2000Delay between status polls.
maxPollAttempts1000Maximum polls (≈ 33 minutes at the default interval).
maxFileBytes209715200Upload cap; SoMark documents a 200 MB limit.
markdownCapChars200000Inclusive cap on the markdown characters returned in one result.
jsonCapChars200000Inclusive cap on the stringified JSON characters returned in one result.

Example profile patch (cordis.patch.yml in the profile, or a --patch overlay):

- id: tool-somark
  config:
    apiKey: 'sk-…'

Invalid element/feature/output-format values fail the plugin load with a CONFIG_INVALID error rather than being silently accepted.

The tool

somark_parse takes a required path (absolute path to the document) and an optional outputFormats array. It returns the parsed Markdown (capped by markdownCapChars, flagged truncated), the page/token counts, and the structured JSON when requested and within jsonCapChars (otherwise flagged jsonOmitted).

Failures carry machine-routable codes on the tool result: NO_API_KEY, DOCUMENT_NOT_FOUND, DOCUMENT_NOT_A_FILE, UNSUPPORTED_EXTENSION, FILE_TOO_LARGE, CONFIG_INVALID, SUBMIT_FAILED, TASK_FAILED, POLL_TIMEOUT, ABORTED, REQUEST_FAILED, INVALID_RESPONSE.

Development

pnpm install
pnpm test        # vitest (79 tests, 100% src coverage)
pnpm build       # tsc → lib/
pnpm pack        # tarball for dsh plugin add

Known Limitations and Deferred Work

  • No batch/directory parsing — one path per call; callers loop the tool.
  • Element and feature formats are deployment config, not per-call arguments.
  • No artifact persistence — the result returns content; consumers can persist via tool/result.
  • Oversized JSON is omitted (jsonOmitted), not spilled.

License

MIT