SeerableOfficial/dsh-anydoc-markdown ↗★ 1
dsh-anydoc-markdown
Converts documents (Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, PDF) to clean Markdown via the Rust firecrawl-anydoc crate and describes every embedded image with a vision model. Host plugin exposing a `convert_document` tool; the conversion + batched-vision engine is a bundled Python wrapper (`converter/anydoc_vlm.py`).
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SeerableOfficial/dsh-anydoc-markdown说明文档
阅读完整 README ↗Usage
- The agent calls the
convert_documenttool with the path to a document:convert_document(file_path: "report.pptx"). - The plugin runs the bundled Python wrapper (
converter/anydoc_vlm.py) againstanydoc, then describes every embedded image via the VLM in batches. - The tool returns the Markdown (with image descriptions substituted) to the model.
Composer document attach (native drop / multi-file)
Documents attach through the same whole-page drag the harness uses for
images: drag any number of documents (.docx .pdf .pptx .xlsx .odt .rtf .epub .csv .txt .md .html) onto the page and release. The harness's own drop overlay
(the one that says "Drag images and documents here to add them") invites the
drop, and the plugin shows the attached documents as cards in the composer's
input dock strip (a line above the composer card). Images dropped at the same
time keep using the harness's built-in image attach.
- Drag documents onto the page (or drop them) → they stream to the host's
attach.uploadRPC channel (/dsh-anydocby default). Each uploaded document is written toattachmentsDirand shown as a card (name + size + remove) in the dock strip. The cards clear automatically once you submit the message — the documents are already saved to disk, so the agent still gets their paths on the next step. - On the next agent step, the plugin hands the model the saved source file
path(s) as a model-visible pre-step message ("Use
convert_documenton each path below"). It never injects the converted Markdown. - The agent calls
convert_document(file_path: " ")on each. The tool converts the document, saves the Markdown tomarkdownOutputDir, and returns the.mdfile path (savedPath) alongside the Markdown. - Failed/oversized/unsupported files are reported individually and never break the rest of a batch.
Configuration
All fields have sensible defaults — install and use without touching any. Tune only what you need. Every knob is a validated
cordis.patch.ymlfield; none are hardcoded.
| Field | Default | Description |
|---|---|---|
converterPython | python | Python interpreter used to run the bundled wrapper. |
converterPath | converter/anydoc_vlm.py | Path to the bundled wrapper (in this dir). |
maxImagesPerRequest | 10 | Max images per vision request. Setup requirement — never lump all images into one request. |
maxChars | 60000 | Markdown truncation cap returned to the model. |
timeoutMs | 120000 | Cooperative tool-call timeout budget. |
visionEndpoint | '' | OpenAI-compatible vision endpoint; empty = offline metadata descriptions. |
visionModel | '' | Vision model id (e.g. gpt-4o); empty = offline metadata descriptions. |
visionApiKeyEnv | OPENAI_API_KEY | Env var supplying the vision API key. |
attachmentChannel | /dsh-anydoc | Generic RPC channel the composer uses to attach documents. |
attachmentsDir | /attachments | Directory uploaded SOURCE documents are written to; the agent is handed these paths. |
markdownOutputDir | '' | Directory where convert_document creates a subfolder named after the Markdown file (e.g. report/) and saves both the .md file and every extracted embedded image (as a PNG) inside it, returning the .md file path (savedPath) plus imageDir/savedImages. Empty = return the Markdown inline and save nothing. |
maxFileBytes | 26214400 (25 MiB) | Per-upload byte cap for document attachments (decoded size). |
allowedAttachExtensions | ['.docx','.doc','.pdf','.pptx','.ppt','.xlsx','.xls','.odt','.rtf','.epub','.csv','.txt','.md','.html','.htm'] | Document extensions the composer accepts. |
- id: dsh-anydoc-markdown
config:
maxImagesPerRequest: 10
visionEndpoint: https://api.openai.com/v1
visionModel: gpt-4o