Vai al contenuto principale
D

dsh-client-ui-obsidian-memory

detongz/dsh-client-ui-obsidian-memory

Persistent AI memory backed by a local Obsidian/Codex vault: five obsidian_memory_* read/write/search tools plus a sidebar vault browser.

Installazione

dsh plugin --profile web add github:detongz/dsh-client-ui-obsidian-memory

README

dsh-client-ui-obsidian-memory

๐Ÿง  Obsidian Memory for DeepSeek Harness โ€” persistent memory via local Markdown vault

A DSH plugin that gives your AI agent persistent memory backed by a local Obsidian (or plain Markdown) vault. It registers 5 file-system tools (obsidian_memory_*) and renders a sidebar panel showing vault status and tool reference.

Inspired by @Saccc_c's Codex memory techniques.

Obsidian Memory Panel


What it does

  • 5 memory tools โ€” AI can read, list, search, write, and append to your local vault
  • Sidebar panel โ€” renders inside the sidebar.obsidian-memory slot in DSH's left column
  • No external server โ€” talks directly to the file system via DSH's host runtime
  • Codex-compatible โ€” works with the Codex/ directory structure recommended by the community

Available Tools

ToolAction
obsidian_memory_readRead a Markdown or text file
obsidian_memory_listList files and directories
obsidian_memory_searchFull-text search across .md and .txt files
obsidian_memory_writeWrite or overwrite a file
obsidian_memory_appendAppend content to the end of a file

Quick Start

1. Prepare your vault

Create a Codex/ folder anywhere on your machine (e.g. inside an Obsidian vault):

~/Documents/Obsidian Vault/
โ””โ”€โ”€ Codex/
    โ”œโ”€โ”€ AGENTS.md      โ† AI operating instructions
    โ”œโ”€โ”€ TODO.md        โ† pending tasks / open loops
    โ”œโ”€โ”€ people/
    โ”œโ”€โ”€ projects/
    โ”œโ”€โ”€ notes/
    โ””โ”€โ”€ daily/

2. Install the plugin

One command, from anywhere:

dsh plugin add dsh-client-ui-obsidian-memory        # npm release (recommended)
# or install straight from source:
dsh plugin add detongz/dsh-client-ui-obsidian-memory

The plugin ships a dsh.bundle manifest, so dsh plugin add both installs the package and activates it as a profile layer (the bundled cordis.patch.yml inserts the ui-obsidian-memory entry). No manual cordis.patch.yml edit is needed to load the plugin.

3. Configure your vault path

Point the plugin at your Codex/ folder. In your profile's cordis.patch.yml:

- id: ui-obsidian-memory
  config:
    vaultPath: /Users/YOURNAME/Documents/Obsidian Vault/Codex

Replace vaultPath with the absolute path to your Codex/ folder. Alternatively set the environment variable OBSIDIAN_VAULT_PATH.

4. Restart DSH

dsh web   # or however you launch DSH

After restart:

  • The sidebar panel appears in the left column (๐Ÿง  Obsidian Memory)
  • The 5 tools are available to the AI when vaultPath is configured

Configuration

OptionTypeDefaultDescription
vaultPathstringโ€”Absolute path to your Codex/ vault directory

Environment variable fallback (optional):

export OBSIDIAN_VAULT_PATH=/Users/YOURNAME/Documents/Obsidian Vault/Codex

If neither vaultPath in config nor the env var is set, the plugin logs a warning and skips tool registration.


Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ DSH Web (browser)                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚ sidebar.obsidian-memory          โ”‚    โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚    โ”‚
โ”‚  โ”‚  โ”‚ ๐Ÿง  Obsidian Memory      โ”‚    โ”‚    โ”‚
โ”‚  โ”‚  โ”‚  โ€” tool reference       โ”‚    โ”‚    โ”‚
โ”‚  โ”‚  โ”‚  โ€” vault structure      โ”‚    โ”‚    โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                    โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ DSH Host (Node.js)                      โ”‚
โ”‚  โ€ข reads / writes local files           โ”‚
โ”‚  โ€ข registers 5 obsidian_memory_* tools  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                    โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Local File System                       โ”‚
โ”‚  ~/Documents/Obsidian Vault/Codex/      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
ComponentRole
Host (lib/index.js)Node side: registers tools, reads/writes vault files
Client (lib/client.js)Browser side: sidebar panel with static tool reference
VaultData source: local Markdown files

Troubleshooting

SymptomCauseFix
Plugin not in Settings โ†’ Pluginsdsh plugin add installed an older version (pre-0.3.2) as a plain dependencyReinstall: dsh plugin add dsh-client-ui-obsidian-memory@latest
Tools not available to AIvaultPath not configuredSet vaultPath in cordis.patch.yml or env var
Sidebar panel not visibleDSH version lacks sidebar.obsidian-memory slotUpgrade DSH to โ‰ฅ 0.1.0-rc.5 (or a build that declares the slot)
"Path traversal detected" errorAI tried to access files outside vaultAll paths are sandboxed to vaultPath

Development

git clone https://github.com/detongz/dsh-client-ui-obsidian-memory.git
cd dsh-client-ui-obsidian-memory
npm install
npm run build        # outputs lib/index.js + lib/client.js
npm run watch        # dev mode with auto-rebuild

Build artifacts:

  • lib/index.js โ€” host entry (tool registration + file I/O)
  • lib/client.js โ€” browser bundle (DSH closure-factory format, CSS inlined)

License

MIT

Plugin correlati