komoai2026/dsh-kolmopdf0

kolmopdf

KolmoPDF tools for DeepSeek Harness with durable API-key settings and CLI configuration.

AI Analysis

核心用途是进行高质量的 PDF 解析、翻译及格式转换。适合需要处理大量 PDF 文档、公式、表格,并希望将其高保真转化为 Markdown 或 Word 的科研与办公用户。

Package
kolmopdf
Version
0.1.0
License
MIT
Last updated
Aug 17, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

kolmopdf

English | 中文

KolmoPDF tools for DeepSeek Harness: high-fidelity PDF→Markdown parsing, layout-preserving PDF translation, Markdown conversion, credit estimates, and balance checks.

Repository:

Features

ToolCapability
kolmopdf_parse_pdfPDF → Markdown, optional translation, formulas, tables, images, enrichment sidecars
kolmopdf_translate_pdfLayout-preserving PDF translation (translated-only or side-by-side)
kolmopdf_convert_markdownMarkdown/ZIP → DOCX, HTML, PDF, LaTeX
kolmopdf_estimate_costLocal page-count + balance estimate (does not spend credits)
kolmopdf_check_balanceCurrent credit balance
kolmopdf_get_task_statusInspect a task by id
  • The GUI stores the API key through DSH credentials (KOLMOPDF_API_KEY). The value never rides settings describe responses.
  • Settings → KolmoPDF is a dedicated settings page (configured / missing, save, clear).
  • Tools check the key lazily. A missing key tells the user to open Settings or run the CLI.
  • KOLMOPDF_API_KEY in the process environment is also accepted. An env key shadows the GUI credential and makes the settings page read-only.
  • HTTP upload, poll, download, and ZIP extract honor the tool abort signal.

Requirements

  • Node.js >= 20
  • DeepSeek Harness 0.1.0-rc.6 compatible
  • KolmoPDF Plus or Pro account
  • An API key from

Install

Install the package into the DSH profile you use (example: web). GitHub is the recommended path:

# From GitHub (recommended; no npm publish required)
dsh plugin --profile web add github:komoai2026/dsh-kolmopdf

# Equivalent
dsh plugin --profile web add https://github.com/komoai2026/dsh-kolmopdf.git

A Git install runs prepare and builds lib/ (needs Node.js >= 20).

Other install sources:

# After the npm package is published
dsh plugin --profile web add kolmopdf

# Local checkout
dsh plugin --profile web add D:/code/dsh-zhiyipdf

Then add a host-plane row to that profile's cordis.patch.yml:

- insert:
    - id: kolmopdf
      name: kolmopdf

See examples/cordis.patch.yml. The row lives on the host plane so the credential/settings namespace is shared across sessions. Tools register into the host tool registry.

Restart the profile:

dsh web

dsh plugin ... add only installs the npm/git dependency. You still need the composition row above.

Configure the API key

Option 1: Web Settings (recommended)

In the DeepSeek Harness Web GUI:

  1. Open Settings.
  2. Open the KolmoPDF section.
  3. Enter the API key and save.

The page writes the key into the DSH credential store ($DSH_HOME/.credentials.yaml, reference KOLMOPDF_API_KEY). It does not go through the settings-document allowlist. If KOLMOPDF_API_KEY is already in the process environment, the page is read-only (env wins and cannot be overwritten).

A missing key does not prevent the plugin from starting. The first authenticated tool call returns an actionable prompt.

Option 2: CLI

After install:

kolmopdf config set-key

This reads the key with a masked prompt and writes kolmopdf.apiKey in $DSH_HOME/settings.yaml (default ~/.dsh/settings.yaml).

# Non-interactive (lands in shell history; not recommended)
kolmopdf config set-key sk-xxxxxxxxxxxxxxxx

# Scripts / CI: read from stdin
printf '%s' "$KOLMOPDF_API_KEY" | kolmopdf config set-key

# Status (never prints the key)
kolmopdf config status

# Settings file path
kolmopdf config path

# Clear the stored key
kolmopdf config clear-key

# Custom settings file
kolmopdf config set-key --file D:/path/to/settings.yaml

The CLI preserves YAML comments, uses the same .lock writer lock and atomic replace as DSH (@deepseek-ai/dsh-atomic-write), and sets owner-only permissions (0600; Windows still uses ACLs). A running DSH with file watch enabled hot-reloads the change.

Option 3: Environment variable

export KOLMOPDF_API_KEY=sk-xxxxxxxxxxxxxxxx

PowerShell:

$env:KOLMOPDF_API_KEY = 'sk-xxxxxxxxxxxxxxxx'
dsh web

Set the variable before starting DSH. You can change the name with apiKeyEnv in the composition.

Resolution order: CLI settings.apiKey → credential / environment (KOLMOPDF_API_KEY).

Optional config

Composition config is the base layer; the user settings document still overrides it:

- insert:
    - id: kolmopdf
      name: kolmopdf
      config:
        outputDir: ./kolmopdf-output
        pollIntervalMs: 2000
        maxPollMinutes: 30
        httpTimeoutMs: 60000
        uploadTimeoutMs: 600000
FieldDefaultNotes
apiKeyunsetSecret. Prefer GUI credentials or CLI; do not commit this
apiKeyEnvKOLMOPDF_API_KEYEnvironment / credential reference name
baseUrlhttps://www.kolmopdf.comKolmoPDF API origin
outputDir./kolmopdf-outputResult directory (relative to DSH cwd)
pollIntervalMs2000Status poll interval
maxPollMinutes30Maximum poll duration
httpTimeoutMs60000Ordinary HTTP timeout
uploadTimeoutMs600000Upload / download timeout

Development

corepack enable pnpm
pnpm install
pnpm check

pnpm check runs TypeScript, Vitest, and the production build.

Security

  • Do not put a real API key in the repo, README, screenshots, or issues.
  • The Web credentials API reports only configured / writable state, never the secret.
  • The CLI status command only prints configured / not configured.
  • Tools read local PDF/Markdown/ZIP paths from the model and write under outputDir. Enable this plugin only in a trusted composition.
  • Output directories are checked with realpath so output_subdir and symlinks cannot escape outputDir.
  • ZIP extraction rejects absolute paths and ../ entries. Caps: 10,000 entries, 4 GiB uncompressed, 2 GiB download.
  • Inputs are capped at 300 MB and 800 pages (same as the KolmoPDF service) and validated locally before upload.

License

MIT