Daseanle/dsh-obsidian-bridge0

dsh-obsidian-bridge

Bidirectional knowledge bridge between DeepSeek Harness and Obsidian Vault — FTS5 search, draft writing, session linking

包名
dsh-obsidian-bridge
版本
0.2.0
许可证
MIT
最近更新
2026年8月18日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

Configuration

Create or edit cordis.patch.yml in your DSH config directory:

- id: dsh-obsidian-bridge
  config:
    vaultPath: /path/to/your/vault
    autoContext: false        # auto-inject vault context before each model step
    autoCapture: false        # auto-capture non-Obsidian tool results as drafts
    draftFolder: dsh-drafts   # folder for draft notes
    sessionId: ""             # optional: link drafts to a specific session

Or use environment variables (legacy, used as fallback when config values are not provided):

export OBSIDIAN_VAULT_PATH="/path/to/your/vault"
export DSH_OBSIDIAN_AUTO_CONTEXT=true   # optional
export DSH_OBSIDIAN_AUTO_CAPTURE=true   # optional
export DSH_SESSION_ID="my-session"      # optional

Configuration

Config Schema (zod)

FieldTypeDefaultDescription
vaultPathstring""Absolute path to your Obsidian Vault
autoContextbooleanfalseAuto-inject vault context before each model step
autoCapturebooleanfalseAuto-capture non-Obsidian tool results as drafts
draftFolderstring"dsh-drafts"Folder name for draft notes
sessionIdstring""Session ID for draft frontmatter and session linking

Config is validated via zod Standard Schema V1. Values can be provided through cordis.patch.yml or environment variables (as fallback).

Environment Variables

VariableFallback ForDefault
OBSIDIAN_VAULT_PATHvaultPath
DSH_OBSIDIAN_AUTO_CONTEXTautoContextfalse
DSH_OBSIDIAN_AUTO_CAPTUREautoCapturefalse
DSH_SESSION_IDsessionId""

SQLite FTS5 Index

The plugin creates a .dsh/index.db SQLite database inside your vault directory:

  • FTS5 virtual table with unicode61 tokenizer
  • UNINDEXED columns for metadata (path, frontmatter, mtime, etc.)
  • BM25 relevance ranking for search results
  • Incremental sync: only re-reads notes whose mtime changed
  • Throttled sync: skips re-sync within 2s of last sync (unless invalidated)
  • Chinese support: CJK characters are split for unicode61 tokenization
  • WAL mode with 16MB cache for performance