HongMing-Huang/dsh-file-upload ↗★ 24

dsh-file-upload

DeepSeek Harness dual-face plugin: Codex-style file references (@path), fully bundled document→Markdown (MarkItDown engine, 20+ formats), mature image handling (read_image for multimodal routes, automatic vision descriptions for text-only models), read_document tool. 适合需要让智能体免配置读取、解析本地各类文档与图片的用户。

パッケージ
dsh-file-upload
互換性
未検証
Harness ピア範囲
^0.1.0-rc.6
Cordis ピア範囲
*
バージョン
0.5.2
ライセンス
MIT
最終更新
2026/08/19

同名パッケージの別リポジトリ

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:HongMing-Huang/dsh-file-upload

ドキュメント

README 全文を読む ↗

Usage

  1. Click the paperclip in the composer toolbar, or drag files anywhere over the window;
  2. Small text files land directly in the composer; documents appear as attachment cards and their path is sent with the message;
  3. The agent reads documents with read_document — converted to Markdown on demand, pageable with offset/limit.

MarkItDown (fully bundled — no downloads, no setup)

The MarkItDown capability ships inside the plugin. Works out of the box: no Python, no pip, no downloads, no build-script approval.

  • Bundled engine — the Microsoft MarkItDown TypeScript port (markitdown-node) is a regular dependency covering 20+ formats: PDF, DOCX, PPTX, XLSX, HTML, CSV, JSON, XML, RSS, Atom, ZIP, Jupyter notebooks, images (OCR via Tesseract, 110+ languages), and audio transcription (via LLM, needs model credentials).
  • Images — OCR to text by default through the bundled engine.
  • Offline — all parsing runs locally, no network calls.

Optional upgrade: if an official MarkItDown CLI already exists on your machine (or is set via markitdownBin), the plugin prefers it (adds EPUB and more); without one the bundled engine is always available.

- id: file-upload
  config:
    markitdownBin: /path/to/your/markitdown   # optional; empty = bundled engine only

Startup log (bundled mode):

[dsh-file-upload] Document → Markdown ready: bundled MarkItDown engine (20+ formats, image OCR) — fully packaged, no downloads, no Python.

How images are handled (auto-explained)

The plugin detects your session's model capability at upload time:

Detected routeWhat happens
Multimodal model (declares image input, e.g. GPT-4o / Qwen-VL / Claude / Gemini)imageMode: native — the agent uses the official read_image tool; the image enters model context directly
Vision bridge installed (dsh-vision-proxy and similar)detected automatically (they declare image input on their route) — same native path
Text-only model (the DeepSeek API is text-only)an automatic image description is generated via the vision discovery chain and inserted with the message — the model reasons about the image content immediately

Vision discovery chain (zero-config): ① explicit visionEndpoint/visionModel → ② local Ollama at http://localhost:11434 (picks a VL model such as DeepSeek-VL2 — images never leave the machine) → ③ OpenAI standard endpoint using a key from the dsh credentials seam.

Note: DeepSeek's official API does not offer vision input (the multimodal line — DeepSeek-VL2/Janus — is open-source and self-hostable); deploy DeepSeek-VL2 via Ollama for a fully local "official DeepSeek vision" experience.

The route detection mirrors the official read_image gate (ctx.llm.resolveModelInfo + inputModalities).

Configuration

All fields have sensible defaults — you can install and use the plugin without touching any of them. Tune only what you need.

FieldDefaultDescription
uploadMaxBytes25165824 (24 MB)Max bytes per uploaded file
allowedExtensions[]Extension allowlist; empty = all allowed
uploadTtlMs604800000 (7 days)Unreferenced upload lifetime
sweepIntervalMs3600000 (1 h)Sweep period; 0 = disabled
maxConcurrentUploads4Concurrent upload limit
inlineTextLimit8192 (8 KB)Text inlined into the composer up to this size
previewTextLimit2048 (2 KB)Preview length for larger text files
maxFileBytes25165824Byte cap for one document read
readLimit2000Max lines returned by one read_document call
sheetRowLimit200Rows kept per XLSX sheet
maxSheets5Sheets read per workbook
cacheEntries16Parse-cache entry count
cacheMaxBytes67108864 (64 MB)Parse-cache byte budget
markitdownBin''Optional MarkItDown CLI path; empty = auto-detect PATH
markitdownTimeoutMs120000Timeout for one CLI invocation
visionEndpoint''Vision endpoint for image explanations; empty = auto (local Ollama → OpenAI standard)
visionModel''Vision model id; empty = auto
visionApiKeyEnvOPENAI_API_KEYCredential reference for the vision key (dsh credentials seam)
visionMaxBytes10485760 (10 MB)Max image bytes sent to the vision endpoint