Introduction¶
On the DeepSeek Harness (DSH) desktop app, you frequently need to organize various documents (Office, PDF, EPUB, code, archives, etc.) into structured notes. A common workaround is to first convert them to Markdown locally using other tools, then import them into DSH; or rely on cloud services for parsing and synchronization, which raises privacy and performance concerns.
DSH’s philosophy is “everything is a plugin,” and this plugin fills exactly the gap of “local-first, multi-format, no upload”: simply drag files into “Settings → Knowledge Base,” and they automatically become searchable Markdown notes.
What It Is¶
dsh-knowledge-base is a DSH desktop plugin for building a local Markdown knowledge base. It is maintained by CHSCN123 and categorized under “Memory.”
It solves the following problems:
- Multi-format import: 262 file extensions are recognized, of which 181 have their body text extracted directly
- Local storage: Conversion and storage all happen within a specified disk directory — no network access, no upload, no cloud account required
- Automatic indexing:
index.mdis automatically rebuilt as a master index after every import or deletion - Legacy Office compatibility: Uses DSH’s built-in LibreOffice engine to handle
.doc/.xls/.pptand similar formats
Core Features¶
Import as Notes¶
Supports documents, spreadsheets, presentations, PDFs, EPUB, HTML, email, subtitles, CSV, archives, code, and plain text formats. Body text is extracted and generated as Markdown files with front-matter.
Legacy Office Processing¶
Legacy Office files such as .doc/.xls/.ppt/.wps/.et/.dps are converted via DSH’s built-in LibreOffice engine (toggleable; falls back to attachment mode on failure).
Archive Support¶
Archives such as .zip/.tar/.gz/.tgz are unpacked to produce a directory listing and embedded text; .jar/.apk/.whl/.vsix are likewise supported.
Media and Binary Handling¶
Images, audio/video, and binary files are stored as attachments with corresponding index entries — they are not discarded simply because “no text can be read.”
Automatic Indexing¶
After every import or deletion, the plugin rebuilds the knowledge base’s index.md for search and navigation.
Double-Click Preview¶
Double-clicking a title previews the note body directly within the card (auto-truncated at 256 KB for very long content).
Open in System¶
One-click via API to open the corresponding file with the system’s default application.
Deletion and Safety Design¶
Deletion requires a two-step confirmation (arm, then confirm), with a 4-second timeout that auto-resets; a batch deletion API is also available. read/open/delete only accept whitelisted relative paths such as notes/xxx.md, rejecting .. traversal, backslashes, and dotfiles.
Installation & Activation¶
Prerequisites: DSH desktop app; @deepseek-ai/cordis and @deepseek-ai/dsh-client-connection are bundled with DSH.
Install with a single command:
dsh plugin --profile web add github:CHSCN123/dsh-knowledge-base
After restarting DSH, open “Settings → Knowledge Base” and drag files into the card.
Manual installation steps (no command line):
- Clone the repository to any location:
git clone https://github.com/CHSCN123/dsh-knowledge-base
- Link it into the profile’s
node_modules:
New-Item -ItemType Junction -Path "$env:APPDATA\dsh-desktop\harness\profiles\web\node_modules\dsh-knowledge-base" -Target "<repo-path>"
- Register the plugin in the profile’s
cordis.patch.yml(matching thecordis.patch.ymlin the repository):
- insert:
- id: dsh-knowledge-base
name: dsh-knowledge-base
- Restart DSH.
Configuration¶
The config file is located at ~/.dsh/dsh-knowledge-base/config.json:
{
"enabled": true,
"root": "D:/knowledge-base",
"keepOriginal": true,
"legacyEngine": true,
"libreOfficeKitPath": ""
}
| Field | Description |
|---|---|
enabled |
Master switch; when off, the drag-and-drop zone is disabled |
root |
Knowledge base root directory, defaults to ~/knowledge-base |
keepOriginal |
Whether conversion-based imports retain an extra copy of the original in inbox/ |
legacyEngine |
Whether to enable Legacy Office (LibreOffice) conversion |
libreOfficeKitPath |
Manually specify the libreoffice-kit path (leave empty for auto-detection) |
Data Layout¶
<root>/ # Defaults to ~/knowledge-base; configurable via Settings page
index.md # Auto-generated master index (do not edit manually)
notes/ # Markdown notes
inbox/ # Retained originals and attachments
references/ # Reserved category directory
entities/
projects/
API¶
The plugin exposes the following endpoints via the DSH host proxy:
| Endpoint | Method | Request Body | Description |
|---|---|---|---|
/api/knowledge-base.state |
GET | — | Configuration, file list, statistics, engine status |
/api/knowledge-base.config |
POST | { enabled?, root?, keepOriginal?, legacyEngine?, libreOfficeKitPath? } |
Update configuration and return new state |
/api/knowledge-base.ingest |
POST | { name, contentBase64 } |
Import a file (32 MB limit) |
/api/knowledge-base.read |
POST | { path } |
Read entry content (text truncated at 256 KB) |
/api/knowledge-base.open |
POST | { path } |
Open with system default application |
/api/knowledge-base.delete |
POST | { path } or { paths: [...] } |
Delete and rebuild index |
/api/knowledge-base.office |
POST | — | Re-detect the LibreOffice engine |
What It Does NOT Do¶
- No OCR: Text in scanned PDFs or images cannot be extracted; you must run OCR beforehand
- 32 MB per-file limit: Split or convert larger files first
- No image/audio/video content parsing: Only stores attachments and index entries; no subtitle transcription or image captioning
- No synchronization: The knowledge base lives on your local disk; multi-device sync is your responsibility for that directory
- No automatic classification: All imports are written to
notes/in order;references/,entities/, andprojects/are left for manual organization
Use Cases & Notes¶
Suitable for developers, researchers, and knowledge workers who need to maintain a structured knowledge base locally — especially in scenarios involving large volumes of multi-format documents with strong privacy requirements.
The plugin runs with the current DSH process’s privileges. Review the source code and license before installing. Current version is 0.3.0, licensed under MIT.
Closing¶
This plugin lets you drag files into “Settings → Knowledge Base” in DSH and have them automatically become searchable local Markdown notes — no network, no upload; conversion and storage all happen on your own disk. For more details, see the table of contents page and the GitHub repository.