dsh-obsidian-agent-wiki
文件与数据 活跃维护

dsh-obsidian-agent-wiki

CagierAsh123/dsh-obsidian-agent-wiki

支持将本地Obsidian笔记自动构建为SQLite索引的可检索知识库,可直接对接DeepSeek Harness调用,无需额外复杂配置即可快速精准检索笔记内容,无缝适配Obsidian日常使用流程。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
16 KB
仓库大小
26 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:CagierAsh123/dsh-obsidian-agent-wiki
git clone https://github.com/CagierAsh123/dsh-obsidian-agent-wiki.git
git clone git@github.com:CagierAsh123/dsh-obsidian-agent-wiki.git
README.md main

dsh-obsidian-agent-wiki

SQLite-indexed Obsidian memory for DeepSeek Harness — gives the agent a searchable view of a local Obsidian vault, with no frontend (browse and edit notes in Obsidian itself).

Built on Node 22's built-in node:sqlite — zero runtime dependencies.

Why

Plain file-system memory plugins scan every file linearly and can't filter by directory. This plugin indexes the vault into an in-memory SQLite table at startup and keeps it fresh on every write, so the agent can:

  • full-text search any substring (including 2-character Chinese words),
  • filter by path / category / project / tag,
  • get results ranked by match count.

Install

dsh plugin add dsh-obsidian-agent-wiki
# or from source:
dsh plugin add CagierAsh123/dsh-obsidian-agent-wiki

Configure

Point the plugin at your vault in your profile's cordis.patch.yml:

- id: dsh-obsidian-agent-wiki
  name: dsh-obsidian-agent-wiki
  config:
    vaultPath: B:/path/to/your/vault

Or set the OBSIDIAN_VAULT_PATH env var. Restart dsh.

Tools

Tool Parameters Purpose
wiki_read file_path Read a note
wiki_list path? List a directory
wiki_write file_path, content Write / overwrite, then re-index
wiki_append file_path, content Append, then re-index
wiki_search query, path?, category?, project?, tag?, limit? Indexed full-text + structured search

wiki_search returns path, title, category, project, matches, and a snippet for each hit, ordered by match count.

Vault layout

category and project are inferred from each note's path:

  • 代码Wiki/<topic>/<note>.md → category 代码Wiki (shared technical notes)
  • 项目Wiki/<project>/<note>.md → category 项目Wiki, project <project>

tag filtering matches the frontmatter tags: value.

How indexing works

  • At startup the plugin scans the vault (skipping .obsidian/.git/node_modules/.trash) and builds the in-memory index.
  • On wiki_write / wiki_append the touched note is re-indexed immediately.
  • Manual edits made in Obsidian are picked up on the next dsh restart.

Full-text matching uses LIKE '%query%' rather than FTS5 trigram because trigram returns zero hits for queries shorter than 3 characters — which would drop the 2-character Chinese words that dominate a Chinese vault. At tens-to-hundreds of notes, a LIKE scan is sub-millisecond.

Requirements

  • Node ≥ 22.5 (for node:sqlite)
  • dsh ≥ 0.1.1-rc.2

License

MIT