본문으로 건너뛰기
K

dsh-kolmopdf

komoai2026/dsh-kolmopdf

DeepSeek Harness 공식 KolmoPDF 플러그인입니다. PDF를 수식·표를 포함한 Markdown으로 변환 및 OCR, 레이아웃을 유지한 PDF 번역, Markdown을 DOCX/PDF/HTML/LaTeX로 내보내기, 비용 추정, Settings → KolmoPDF 키 및 실시간 크레딧 패널을 위한 도구 6개를 제공합니다. 처리한 PDF와 Markdown은 API 키를 사용해 KolmoPDF 클라우드(www.kolmopdf.com)에 업로드되며 변환에는 KolmoPDF 크레딧이 사용됩니다.

설치

dsh plugin --profile web add github:komoai2026/dsh-kolmopdf

README

KolmoPDF for DeepSeek Harness (@kolmopdf/dsh-kolmopdf)

KolmoPDF icon

English | 中文

npm License: MIT

Official KolmoPDF plugin for DeepSeek Harness (dsh): high-fidelity PDF → Markdown / OCR (preserving formulas, tables, columns, and images), layout-preserving PDF translation (translated-only or side-by-side bilingual PDF), Markdown export to Word (DOCX), PDF, HTML, and LaTeX, credit cost estimation, and balance checks.

Tools

ToolCapability
kolmopdf_parse_pdfPDF → Markdown / OCR with formulas, tables, multi-column layout, images, optional translation, and enrichment sidecars (outline, summary)
kolmopdf_translate_pdfLayout-preserving PDF translation (translated_only or side_by_side bilingual PDF, with optional image/table translation)
kolmopdf_convert_markdownConvert .md / .markdown / .zip (with images) → DOCX, HTML, PDF, or LaTeX
kolmopdf_estimate_costLocal PDF page-count + balance estimate before running a job (does not spend credits)
kolmopdf_check_balanceQuery current credit balance for the configured API key
kolmopdf_get_task_statusInspect an existing KolmoPDF task by task_id

Built-in Web GUI Integration

  • Dedicated Settings → KolmoPDF page with secure API key management (stored in $DSH_HOME/.credentials.yaml under KOLMOPDF_API_KEY; never exposed in settings describe payloads).
  • Live credits card and Task overview list (auto-refreshes every 30 s / 10 s, manual refresh & clear log; local history stored in $DSH_HOME/kolmopdf/tasks.json, newest 200 tasks).
  • Lazy credential checks: missing keys never crash startup; tool calls return actionable setup instructions.
  • KOLMOPDF_API_KEY in the process environment is also supported (read-only on the Settings page when present).
  • Upload, polling, download, and ZIP extraction all respect tool abort signals.

Requirements

  • Node.js >= 20
  • DeepSeek Harness >=0.2.0-rc.1 <0.3.0 (dsh.bundle + dsh.client lazy-CJS format)
  • A KolmoPDF API key from https://www.kolmopdf.com/api-keys (Free, PAYG, Go, Plus, and Pro accounts all supported; Web, API, and DSH share the same credits)

Install

dsh plugin --profile web add @kolmopdf/dsh-kolmopdf

Restart the profile (dsh web) or let HMR apply if enabled.

Option 2: DSH Desktop / Plugin Market

  • DSH Desktop / dsh-market: Search for kolmopdf or @kolmopdf/dsh-kolmopdf in Plugins and click Install.
  • DSH Built-in Discover (0.2.1+): Enable Custom plugin indexes under Experimental plugins, add an index source (such as https://cdn.jsdelivr.net/npm/dsh-plugin-catalog/index.json), search kolmopdf, and install.

Option 3: From GitHub

dsh plugin --profile web add github:komoai2026/dsh-kolmopdf

This repository ships prebuilt lib/ artifacts and declares dsh.bundle, so dsh plugin add appends @kolmopdf/dsh-kolmopdf to dsh.profile.bundles automatically without running build scripts. Host packages (@deepseek-ai/dsh-tools, @deepseek-ai/dsh-settings, etc.) are declared as optional peerDependencies so they always resolve to the running Harness instance.

Configure the API Key

  1. Open DeepSeek Harness Web / Desktop GUI.
  2. Go to Settings → KolmoPDF.
  3. Enter your API key from https://www.kolmopdf.com/api-keys and click Save.

Option 2: CLI

dsh plugin --profile web exec kolmopdf -- config set-key

This stores KOLMOPDF_API_KEY inside $DSH_HOME/.credentials.yaml (version: 1, refs.KOLMOPDF_API_KEY) using DSH's file lock and atomic write (0600), so a running DSH picks up the change automatically.

# Pipe from stdin in scripts/CI
printf '%s' "$KOLMOPDF_API_KEY" | dsh plugin --profile web exec kolmopdf -- config set-key

# Check status (never prints the secret)
dsh plugin --profile web exec kolmopdf -- config status

# Print the credentials file path
dsh plugin --profile web exec kolmopdf -- config path

# Remove the stored key
dsh plugin --profile web exec kolmopdf -- config clear-key

Option 3: Environment Variable

export KOLMOPDF_API_KEY=sk-xxxxxxxxxxxxxxxx
dsh web

PowerShell:

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

Optional Composition Config

- insert:
    - id: kolmopdf
      name: '@kolmopdf/dsh-kolmopdf'
      config:
        outputDir: ./kolmopdf-output
        pollIntervalMs: 2000
        maxPollMinutes: 30
        httpTimeoutMs: 60000
        uploadTimeoutMs: 600000
FieldDefaultNotes
apiKeyunsetSecret override; prefer Settings GUI or CLI .credentials.yaml
apiKeyEnvKOLMOPDF_API_KEYCredential reference / environment variable name
baseUrlhttps://www.kolmopdf.comKolmoPDF API origin
outputDir./kolmopdf-outputResult output directory (relative to DSH cwd)
pollIntervalMs2000Task status polling interval
maxPollMinutes30Maximum polling duration
httpTimeoutMs60000Standard HTTP timeout
uploadTimeoutMs600000File upload / result download timeout

Development

corepack enable pnpm
pnpm install
pnpm check
pnpm test:host
pnpm test:client

Security

  • Never commit real API keys into repositories, configs, or issues.
  • The credentials API only reports configured / writable state, never the secret value.
  • Output paths are validated with realpath so output_subdir and symlinks cannot escape outputDir.
  • ZIP extraction rejects absolute paths and ../ entries (capped at 10,000 entries, 4 GiB uncompressed, 2 GiB download).
  • Inputs are capped at 300 MB and 800 pages and validated locally before upload.

License

MIT

관련 플러그인