Introduction¶
DSH models can read plain text files directly, but the documents encountered in daily use are mostly binary containers such as .docx, .xlsx, .pptx, and .pdf. To enable the model to analyze quarterly reports, bidding materials, or e-books, developers typically need to run an external conversion tool suite first and then feed the results back into the context. Alternatively, letting the model read strings directly means the text, tables, and formulas within binary containers simply cannot be accessed.
The dsh-anydoc introduced below attempts to converge this step into a single plugin: it is based on the local Rust parsing engine of Firecrawl AnyDoc, converts local office documents, e-books, CSV, and text-based PDFs into GitHub-Flavored Markdown, and registers as a native Tool directly callable by DSH models. Developed by community maintainer kevinasworks, the plugin relies entirely on the upstream parsing capabilities of Firecrawl AnyDoc 0.2.4. This project serves solely as the DSH integration layer and is an independent community project, not an official plugin of Firecrawl, DeepSeek, or any institution.
Positioning: What Problem Does It Solve¶
The plugin hooks AnyDoc’s parsing capabilities into DSH’s tool registry. The call chain is:
User Question → Model calls anydoc_convert → Plugin parses locally → Markdown written to file + preview returned → Model continues analysis based on content
The key point is that the entire process is offline and does not upload documents. The only online path for AnyDoc is explicitly passing ocr: 'hosted', and this plugin never passes this parameter. Scanned PDFs will return NEEDS_OCR with the page number, and the user decides the subsequent actions; the plugin will not automatically upload or enable hosted OCR.
Three Native Tools¶
The plugin registers three Tools, covering single file, batch, and self-inspection paths.
| Tool | Description |
|---|---|
anydoc_convert |
Single file conversion. Returns fields like success, detectedFormat, outputPath, markdownPreview, truncated, warnings, errorCode, etc. The full Markdown is written to a file. |
anydoc_batch_convert |
Batch conversion. Supports file lists or single directories (non-recursive by default), concurrency limits, failure isolation, and returns success/failure/skipped statistics. |
anydoc_capabilities |
Read-only health check. Returns plugin and AnyDoc version, native binding status, current platform and platformSupport, current engine, supported formats, OCR strategy, resource limits; when selfTest: true, it uses an internal micro-CSV to run the full chain without reading any user documents. |
Supported Formats¶
Based on the official support table of AnyDoc 0.2.4, the plugin has been tested item by item.
| Category | Extensions |
|---|---|
| Word | .doc .docx .docm |
| PowerPoint | .ppt .pps .pot .pptx .pptm .ppsx .ppsm |
| Excel | .xls .xlsx .xlsm .xlsb |
| OpenDocument | .odt .ods .odp |
| Other | .rtf .epub .csv .pdf (text layer) |
Points to note:
- Format is determined by file content, extensions are just hints. Renaming
report.docxtoreport.bincan still be converted, and the plugin will give a warning that “extension is not in the support table”. .csvhas no content signature and relies on extension for identification, thereforeformatSourcewill beextensionrather thancontent..pdfonly covers the text layer; scanned versions returnNEEDS_OCR.
Installation¶
The plugin is installed as a DSH official Bundle, does not modify DSH core source code, and does not require manual editing of profile files.
Installation via npm package name is recommended: enter in DSH’s “Plugins” → “Add Plugin”:
dsh-anydoc
If a specific version is needed, enter dsh-anydoc@0.2.1. See dsh-anydoc for the npm package address. After the first release, the China mirror may not be synchronized yet, so you can switch to the official npm source first.
You can also install by entering the full GitHub address:
https://github.com/kevinasworks/dsh-anydoc
This method fetches the GitHub source code but does not display the version update block found in npm installations. Neither the repository nor the npm package contains node_modules/. During installation, you must be able to access the selected source to pull the plugin, AnyDoc dependencies, and the native binding for the current platform; document conversion itself is still performed locally and offline.
When installing from a local directory, first install runtime dependencies:
cd /path/to/dsh-anydoc
npm install --omit=dev
Then instruct the Agent to call plugin_manager, changing target to the actual absolute path of the plugin directory:
{ "action": "install_bundle", "target": "/path/to/dsh-anydoc" }
Windows users please use the actual Windows absolute path, and write backslashes in JSON as \\.
After installation, confirm with a self-test:
anydoc_capabilities → {"selfTest": true}
You should see native binding: ok, engine: worker, self test: passed.
Typical Usage¶
Single file conversion, specifying preview length:
{ "sourcePath": "~/Documents/季度报告.docx", "previewChars": 12000 }
Returns something like:
Converted /Users/me/Documents/季度报告.docx -> /Users/me/.dsh/anydoc-output/季度报告.md
format: docx (content) · 13,902 chars · 37,767 input bytes · 41 ms · engine: worker
--- markdown preview ---
# 季度技术评审报告 …
Large files only return truncated previews; the end of the preview indicates N/M characters have been shown, and the full content can be found in outputPath, avoiding model context overflow due to excessively long body text.
Batch conversion, non-recursive by default, here explicitly enabled:
{ "directory": "~/Documents/投标资料", "recursive": true, "concurrency": 2, "exportAssets": true }
Export with images:
{ "sourcePath": "report.docx", "exportAssets": true }
Embedded resources like images are written to <output directory>/<filename>.assets/ and an index ## Exported assets is appended at the end of the Markdown. The plugin only exports raw bytes and does not perform image semantic analysis or fabricate image descriptions.
Defaults and Limits¶
| Item | Default | Description |
|---|---|---|
| Single File Size | 100 MiB | Rejected directly if exceeded, does not enter parsing engine |
| Single File Timeout | 60 s | In worker mode, actually kills the process, not just lets the Promise timeout |
| Batch Concurrency | 2 | Specifiable at call time, max 8 |
| Batch File Count | 50 | Excess marked as unprocessed, no silent truncation |
| Inline Preview | 8000 chars | Can be overridden at call time |
| Total Output Length | 5,000,000 chars | Rejected if exceeded and reports OUTPUT_TOO_LARGE |
| Resource Export Limit | 64 MiB | Excess skipped with warning |
| Output Directory | ~/.dsh/anydoc-output |
Can be overridden by outputDir parameter or outputRoot config |
See CONFIGURATION.md in the repository for the full list of configuration items.
Compatibility and Platforms¶
The plugin’s engines.dsh declares and tests three DSH lines:
>=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-rc.1 <0.2.3-0
0.2.0-rc.2, 0.2.1-rc.2 ~ rc.5, 0.2.2-rc.1 ~ 0.2.2 have been tested; versions outside the range such as 0.2.0-rc.1, 0.2.1-alpha.*, 0.2.3+, 0.3.x will be rejected by DSH’s准入 check. @firecrawl/anydoc is still strictly locked to 0.2.4. Backward compatibility targets the DSH host, not the parsing engine version.
The platform support scope is strictly equal to the 7 precompiled targets of upstream AnyDoc 0.2.4: macOS arm64 / x64, Windows x64, Linux glibc x64/arm64, Linux musl x64/arm64. Native processes on Windows on ARM are not supported, and upstream does not have an ARM64 binding, so the self-test will report platformSupport: unsupported. The CI verification boundaries given in the README are macOS Apple chip 107/107, Intel Mac 107/107, Windows Server runner 104 passed 0 failed 3 skipped; Ubuntu and Alpine for both architectures 107/107 each. CI run verification does not replace full DSH desktop UI acceptance testing; the x64 Electron host on Intel Mac, interaction and file locking on Windows 10/11, and SMB scenarios still need to be verified separately.
Privacy and Data Flow¶
Local File → Plugin (process or subprocess) → @firecrawl/anydoc → Rust parsing → Markdown → Local File
The plugin does not automatically upload files, does not call Firecrawl Parse, and does not send telemetry. Logs only record source path, format, character count, duration, and output path, without recording document content. npm install pulling dependencies is public network traffic and is unrelated to document content transmission. The evidence given in TEST_REPORT.md in the repository is static scanning plus conversion performed inside a process/sub-process with fetch disabled.
Use Cases and Notes¶
Suitable for scenarios where local office documents, e-books, and CSVs need to be converted to Markdown in DSH for model analysis, especially for developers with local processing requirements for document content who do not want content to leave the local machine. macOS (Apple chip) is the main platform the author uses daily and has verified with real DSH Tool Calls; other supported targets rely mainly on CI coverage.
Points to note: The plugin runs with the permissions of the current DSH process and can directly read file paths the user has access to. Before installation, it is recommended to check the source code and license (itself MIT, AnyDoc is MIT, copyright Sideguide Technologies Inc.). It is an independent community project and does not represent the official stance of Firecrawl or DeepSeek. To disable:
{ "action": "set_bundle", "target": "dsh-anydoc", "enabled": false }
Uninstall using remove_bundle, which removes dependencies and bundle selection from the profile’s package.json and does not affect other plugins. The plugin will not delete user output documents; ~/.dsh/anydoc-output needs to be cleaned manually. Profile snapshots before installation are saved in .backup/pre-install-<timestamp>/ and can be used for recovery in case of anomalies.
Conclusion¶
dsh-anydoc focuses on a specific task: encapsulating AnyDoc’s offline parsing capabilities into a native DSH Tool, allowing the model to obtain Markdown body text with a single call, while using process isolation, timeouts, size limits, and format detection to secure the boundaries of the integration. If you are selecting plugins for DSH document processing, you can start here.
- Community Directory: https://www.skillhub.cn/plugins/kevinasworks/dsh-anydoc
- GitHub: https://github.com/kevinasworks/dsh-anydoc