Introduction¶
The philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” The built-in Obsidian dsh-knj-obsidian provides AI agents with the ability to build project-level knowledge bases (wikis). An Agent can use tools to distill conversations, documents, web pages, and other source material into structured knowledge pages, written to .wiki/ in the project root, forming reusable and maintainable knowledge assets.
The plugin is maintained by yangdongzhen590. The current version includes v1 build, v2 retrieval, v3 graph export, v4 UI, and v5 note editing capabilities.
Installation and Activation¶
Before installing, ensure the environment meets the following requirements:
* Node.js >= 20
* DSH host installed (provides the dsh CLI and web profile)
Follow the steps below to install the plugin:
# 1. 在插件目录内打包
npm pack
# 2. 在插件目录内执行:安装到 DSH 的 web profile
dsh plugin --profile web add ./dsh-knj-obsidian-2026.8.257.tgz
# 3. 重启 DSH,确认宿主日志无相关报错
After installation, the plugin exposes tools to the Agent when DSH starts and ships the wiki-query skill in the package. No additional configuration is required.
v1 Build: Write Side¶
The plugin provides three core tools for building and maintaining the knowledge base.
wiki_ingest¶
Writes knowledge pages extracted by the Agent into the wiki in bulk. Supports contentHash incremental merging; if the source content SHA-256 matches the manifest record, the operation is skipped entirely, enabling incremental writes.
wiki_capture¶
Quick capture. Uses quick mode, writes to the references/ directory by default, and marks confidence as inferred. Suitable for immediately persisting conversation conclusions.
wiki_lint¶
Health check. Checks orphan pages (no inbound or outbound links), broken links ([[wikilink]] pointing to a non-existent page), and missing frontmatter, then returns a report.
The knowledge base structure is located in .wiki/ at the project root and includes the index.md, _system/, concepts/, entities/, references/, synthesis/, and projects/ directories.
v2 Retrieval: Dual-Channel¶
The retrieval capability is based on the same .wiki/ knowledge base and provides a dual-channel mechanism. Both channels are read-only operations.
wiki_query Tool¶
A built-in tool, exposed as soon as DSH starts. The Agent automatically calls it when asked existing-knowledge questions such as “What pitfalls did we encounter about X before?”
wiki-query skill¶
A standalone skill shipped with the package, serving as a fallback to the tool. When the tool is unavailable, the Agent can use this skill to perform equivalent layered retrieval with grep / glob / read.
Layered Retrieval Strategy¶
Both share the L1–L4 layered levels:
1. L1 — index fast layer: read .wiki/index.md.
2. L2 — title + tag layer: grep titles and tags; stop on hit.
3. L3 — body layer: open the body, locate the content, and extract context.
4. L4 — graph neighbors: parse [[wikilink]] outbound links and take one-hop neighbors.
v3 Graph Export¶
wiki_export Tool¶
Automatically called when the Agent is asked to “export the graph”. Provides two formats:
- html: generates
graph.html, a single-file interactive visualization with inline SVG + native JS and zero external dependencies. - json: generates
graph.json, containing nodes, edges, orphans, and statistics, for use by external tools.
Artifacts are written to <vault>/wiki-export/.
v4 UI: Sidebar¶
After installation, a “Knowledge Base” tab appears in the right sidebar of DSH, providing an entry point to the note/graph workbench.
v5 Note Editing¶
The note editor supports rich rendering, in-place bidirectional link navigation, source view, and full-text editing.
Local Semantic Search¶
In addition to keyword-based layered retrieval, the plugin provides the wiki_search_semantic tool for local semantic search. This feature depends on the QMD library, which is not installed by default.
Enablement Steps¶
QMD must be installed manually and the model downloaded:
# 1. 安装 QMD
dsh plugin --profile web add @tobilu/qmd@2.8.3
# 2. 手动下载模型(约 320 MB)
# 放置到:%USERPROFILE%\.dsh\qmd\models\embeddinggemma-300M-Q8_0.gguf
Offline Constraint¶
Semantic search is strictly offline. QMD’s cloud model path is disabled, and indexing and querying require zero network access throughout. Index status can be polled via the API.
Notes¶
- Dependency installation:
@tobilu/qmdis an optional peerDependency, and DSH does not install it automatically by default. The installation command above must be run explicitly. - Model download: The model file must be downloaded manually and placed in the specified path. The plugin does not download it automatically.
- Environment requirements: Node.js >= 20 and an installed DSH host are required.