dshan
开发工具 活跃维护

dshan

Paraso42/dshan

提供原生聊天视图,经本地API接入后端,将Obsidian笔记库变为可交互的AI工作区。侧边栏内直接使用,无需切换,数据仅走本地,流畅且私密。

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

dshan — DeepSeek Harness in your Obsidian sidebar

MIT License
GitHub release
GitHub Downloads
CI
Obsidian min version

中文文档 · Contributing · Code of Conduct · Security

dshan is a community plugin for Obsidian that brings the
DeepSeek Harness (DSH) into your vault as a native Obsidian chat
view
— like Claudian, the UI lives inside Obsidian (native DOM, Obsidian's own Markdown rendering, wikilinks work),
while the agent runs on your local DSH service.

dshan shares the ONE local dsh web server you already use (default http://127.0.0.1:3080) as the service
backend
, and speaks DSH's /api wire protocol directly from the plugin: sessions, streaming turns, tool cards,
approvals, and cancel all render as native Obsidian UI. The browser UI is never embedded — it stays available via
an optional "open in browser" command and shows the same conversations.

Features

  • Obsidian-native chat view — right sidebar (default), left sidebar, tab, or pop-out window
  • Vault = DSH workspace — sessions are created with cwd = vault, so the agent reads/writes your vault and picks
    up CLAUDE.md as workspace instructions automatically; every file it writes appears in Obsidian's file explorer
  • Full turn experience, natively rendered — streaming assistant text (Markdown with working [[wikilinks]]),
    collapsible reasoning, tool-call cards, approval buttons, stop button, session list & history
  • Process management — probe-first auto-start (no double-boot), crash recovery with backoff, configurable
    shutdown behavior on Obsidian exit
  • Workspace controls — per-session model selector and agent-preset selector, plus a new-session
    permission default (read-only / workspace-write / full access), mirroring the web UI's settings
  • Obsidian interop — "Send selection to dshan" / "Send current note to dshan" insert text directly into the
    native composer
  • One shared DSH server — Obsidian, the browser UI and your terminal all talk to the same service, so
    conversations stay in sync and never race on the session store

Requirements

  • Obsidian 1.7.2+ (desktop only: macOS / Linux / Windows)
  • DSH CLI installed (npm install -g @deepseek-ai/dsh), or configured via the plugin settings

Installation

  • Build from source (see docs/DEVELOPMENT.md) or use GitHub Releases once published.
  • Manual: copy main.js, manifest.json, styles.css into vault/.obsidian/plugins/dshan/ and enable the plugin.

Settings

Setting Default Meaning
DSH executable auto-detect PATH, npm-global shims, or the @deepseek-ai/dsh Node entrypoint
DSH web port 3080 The shared DSH server: dshan reuses whatever answers here, or starts one when nothing is listening
Shutdown behavior leave running Keep a plugin-started server alive when Obsidian exits, or stop it
View placement right sidebar right/left sidebar, tab, or pop-out window
Auto start on Start (or reuse) the DSH server when the plugin loads

Architecture

Obsidian renderer (native chat view: composer, bubbles, tool cards, approvals)
  │  node:http POST /api/<method>      (client-request envelope)
  │  node:net WebSocket /api/events.*  (downlink frames, auto-reconnect)
  ▼
dsh web (shared service backend; sessions are created with cwd = vault, so the vault is the workspace)

See docs/05-api-contract.md for the wire contract dshan depends on.

Privacy & data

  • All traffic stays between the plugin and your local DSH server on 127.0.0.1. Nothing is sent anywhere else.
  • The agent's behavior is governed by your existing DSH configuration (model, preset, approval policy, skills).
    dshan never modifies DSH configuration or presets.
  • dshan only writes inside its own plugin folder (.obsidian/plugins/dshan/data.json).

License

MIT — see LICENSE. Process-spawn, CLI-detection, view-registration, and CI/release patterns are adapted
from Claudian (MIT, © Yishen Tu); see NOTICE.