Within the DeepSeek Harness plugin ecosystem, providing agents with a local knowledge base is a common requirement. Traditional file system scanning plugins can only read linearly, cannot filter by directory or attributes, and full-text search often has limitations when handling short Chinese words. The dsh-obsidian-agent-wiki plugin resolves these issues by building an in-memory SQLite index at startup, providing agents with an Obsidian access layer that supports full-text search and structured filtering.
Core Features¶
- SQLite Index: The plugin is built on Node 22’s built-in
node:sqliteand has no runtime dependencies. At startup, it scans the vault and builds in-memory tables, and automatically updates the index duringwiki_writeandwiki_appendoperations. - Full-Text Search: Supports 2-character Chinese queries.
- Structured Filtering: Supports filtering by path, category, project, and tags.
- Result Sorting: Supports sorting by match count.
- Tool Support: Provides the
wiki_read,wiki_list,wiki_write,wiki_append, andwiki_searchtools.
Installation and Enabling¶
Installing the plugin requires DeepSeek Harness (dsh) version ≥ 0.1.1-rc.2 and Node version ≥ 22.5.
Run the following command in the terminal:
dsh plugin add dsh-obsidian-agent-wiki
Configuration¶
Configure the plugin to point to a local Obsidian vault.
Method 1: Configure in cordis.patch.yml
Add the following content to the dsh configuration file:
- id: dsh-obsidian-agent-wiki
name: dsh-obsidian-agent-wiki
config:
vaultPath: B:/path/to/your/vault
Method 2: Set an Environment Variable
Set the OBSIDIAN_VAULT_PATH environment variable, then restart dsh.
Tools and Usage¶
The plugin provides the following tools for agents to call:
-
wiki_read(file_path)
Reads the note content at the specified path. -
wiki_list(path?)
Lists the directories or files under the specified path. The path is optional. -
wiki_write(file_path, content)
Writes or overwrites note content, and reindexes immediately after the operation completes. -
wiki_append(file_path, content)
Appends content to a note, and reindexes immediately after the operation completes. -
wiki_search(query, path?, category?, project?, tag?, limit?)
Performs full-text search and structured filtering. The returned results include path, title, category, project, match count, and snippet, sorted by match count.
Indexing Mechanism and Search Details¶
- Index Building: At startup, the plugin scans the vault (skipping the
.obsidian,.git,node_modules, and.trashdirectories) and builds the index. - Index Updating: When notes are operated on through the
wiki_writeandwiki_appendtools, reindexing for the corresponding note is triggered immediately. - Manual Edits: If a note is manually edited in Obsidian, the index will not be updated automatically. The dsh process must be restarted for changes to take effect.
- Full-Text Matching: The plugin uses
LIKE '%query%'instead of FTS5 trigram for full-text matching. This ensures support for 2-character Chinese short-word queries (FTS5 trigram returns zero results for queries shorter than 3 characters).
Notes¶
- Version Dependencies: Ensure that the version requirements of Node ≥ 22.5 and dsh ≥ 0.1.1-rc.2 are met.
- Permissions and Security: The plugin runs with the dsh process permissions. It is recommended to review the source code and license (MIT) before installation.
- Search Implementation: Because
LIKEis used for scanning, performance remains sub-millisecond when the number of notes reaches tens to hundreds, but performance may degrade with an extremely large number of notes.
Ecosystem Background¶
The DeepSeek Harness philosophy is “everything is a plugin”. This plugin is maintained by community developer CagierAsh123. Its installation directory and GitHub repository are independent sites and have no official affiliation with DeepSeek / High-Flyer.