dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
给 DeepSeek Harness 装上自研「第二大脑」:对话结束自动把值得复用的内容沉淀成本地 Markdown 知识卡(自研去重、CJK 检索、可 git 管理),设置页提供图形化知识库 + 交互式知识图谱(图例过滤、时间维、框选、合并、导入导出)。
🚨 Important: moved to memory-eternal
This plugin has been upgraded into an agent-agnostic standalone project — no longer tied to a single DSH service. New features and ongoing development live there:
- 📦 npm:
npm i memory-eternal(ordsh plugin --profile web add memory-eternal)- 🐙 GitHub / Gitee:
EternalNight996/memory-eternal
Auto-captures knowledge after every conversation and survives across sessions; recall fetches only the relevant chunks — saves tokens, less noise. Fully self-built, zero third-party memory framework, no DSH source changes, one vault shared by every Agent, plain Markdown & git-manageable.
⭐ Star it if you like it!
DSH one-liner: dsh plugin --profile web add dsh-memory-eternal
Install (dsh-desktop via DSH CLI, one command):
# dsh-desktop (recommended): install via DSH CLI into the profile
dsh plugin --profile web add dsh-memory-eternal
# or update directly in the profile (pnpm workspace). Use pnpm — `npm install` throws EUNSUPPORTEDPROTOCOL
cd ~/.dsh/profiles/web && pnpm add dsh-memory-eternal@latest
After restarting dsh web, three things are live immediately:
| Effect | Where |
|---|---|
| Auto-capture of knowledge cards | Happens every turn, no action needed |
memory_recall tool | Agent calls it automatically when it needs history |
| Visual UI | Sidebar bottom Memory button / Settings → Memory |
Entry: The sidebar-footer Memory button opens the vault (its left rail includes Cards / Graph / Usage / Audit Center / Recycle Bin / Memory Config); "DSH Settings → Memory" is the pure config page.
Edit config: Vault left rail "Memory Config" (or DSH Settings → Memory) → DSH memory config / cost control / auto-audit config / self-hosting — just hit "Save Config". autoWebMode / watchdogAutoSpawn changes require a DSH restart.
npm i -g dsh-memory-eternal # installs CLI + MCP (auto-writes ~/.claude.json + SessionEnd hook)
Ready after install: say "recall 数据库选型" in a session → auto-retrieves memory; on session end / before context compaction → auto-captures.
npm i -g dsh-memory-eternal # auto-writes Codex config.toml / Cursor mcp.json
Restart the tool → MCP is in the list; just use: 用 memory_recall 查一下项目历史决策.
dsh-memory open # starts web + opens browser (default http://127.0.0.1:7999)
Stats / search / card grid (add-edit-merge-import-export) / knowledge graph — all here. Same UI as the DSH embed; data stays in sync.
zcode (Zhipu): no native MCP; bridge via zcode-open-bridge or use the CLI directly.
dsh-memory recall "database selection" # retrieve
dsh-memory capture "important note..." # manual capture (- reads stdin)
dsh-memory sweep ~/.claude/projects # mine existing sessions
dsh-memory setup [--dry-run] # re-run / preview auto-mount (idempotent)
dsh-memory mcp # MCP stdio (mount to any MCP client)
dsh-memory serve [--port 7999] # run web in foreground
dsh-memory open # ensure web alive + open browser
dsh-memory watchdog [--port 7799] # watchdog keep-alive (standalone process)
When not running on DSH, the dsh-memory command comes from npm i -g.
Three concepts, don't mix them:
autoWebMode) → init=pull once at DSH start (default); interval=DSH in-process timer probes & auto-restarts (0 extra memory); manual=fully manual, only from dsh-memory open.watchdogAutoSpawn, default on) → a standalone node process that can pull web up even after DSH exits (~+47 MB RAM). Only turn on for 7×24 keep-alive.autoMcpSetup, default off) → whether to auto-write MCP into Claude Code/Codex/Cursor config. Off = don't touch your machine config; run dsh-memory setup manually when needed.Change these: Vault left rail "Memory Config" (or DSH Settings → Memory) → edit the table and save; autoWebMode / watchdogAutoSpawn need a DSH restart.
MCP is a protocol, not a resident service: the agent spawns it per session and exits when done — no "auto-start on boot" concept.
| Scenario | Config | Memory |
|---|---|---|
| Personal dev (default) | autoWebMode=init + watchdogAutoSpawn=off | web 47 MB |
| Resident 7×24 | watchdogAutoSpawn=on | web + watchdog 47+47 MB |
| True boot auto-start (no DSH) | Windows Task Scheduler runs dsh-memory watchdog --port 7799 --interval 5000 --max-restart 10 | same |
All settings live in the vault left rail "Memory Config" (or DSH Settings → Memory) — edit and hit "Save". Here's the full page (plugin info / Agent MCP mount status / auto-audit config):
| Setting | Default | In plain words |
|---|---|---|
| Auto capture | on | auto-store useful content as cards after each turn |
| Auto recall | on | AI auto-queries memory when it needs history |
| Vault dir | ~/.dsh/memory-vault | where memory lives, plain Markdown & git-able |
| Setting | Default | In plain words |
|---|---|---|
| Distill cards | on | compress a conversation into a sharp card (calls AI, costs money). Off = store raw text, zero cost |
| Dedup feeds AI | on | judge if new content is a duplicate (calls AI). Off = simple dedup, saves one AI call |
| Distill output cap | 900 | max chars per compress, bigger = sharper but pricier |
| Recall min score | 2 | how "close" a match must be to return; bigger = sharper but leaks more (cheaper) |
| Min capture chars | 200 | too-short chats aren't stored (avoids small-talk waste) |
| Daily quota | 60 | max cards per day, prevents AI burning money |
| Setting | Default | In plain words |
|---|---|---|
Keep-alive autoWebMode | init | init=open web once at DSH start; interval=periodically check & restart if dead; manual=fully manual |
Watchdog watchdogAutoSpawn | on | a standalone process keeps web alive (+47 MB). Personal use can turn off |
Auto-mount MCP autoMcpSetup | off | lets Claude Code / Codex / Cursor use your memory. On = auto-configures them; Off = never touches your config, run dsh-memory setup manually |
💰 To save money: turn
Distill cardsoff, lowerDistill output cap, raiseRecall min score.
Top of the config page: 🟢 A Light / 💰 B Budget / ⭐ C Premium — click to fill, then Save:
| Plan | Scenario | Keep-alive | Watchdog | Distill | Distill cap | Recall min | Memory | LLM cost |
|---|---|---|---|---|---|---|---|---|
| 🟢 A Light | Personal dev (default) | init | off | on | 900 | 2 | ~47 MB | normal |
| 💰 B Budget | Tight budget / many Agents | init | off | off | 500 | 3 | ~47 MB | ~0 |
| ⭐ C Premium | Long projects / teams | interval | on | on | 1200 | 1 | ~94 MB | high |
New cards go to the Audit Center (pending) by default and enter the main vault only after you approve them; rejected ones move to "Rejected", where you can restore or delete to the recycle bin. Cards matching an exemption (audit mode = skip all / exempt agents / exempt kinds) go straight in; recycle-bin cards are recoverable within 30 days, then auto-purged.
audit mode (audit all / skip all) + exempt agents + exempt kinds + recycle retention days.Most memory products (mem0 / Zep / agentmemory…) auto-ingest everything the moment a conversation ends, good or bad — noise, wrong facts, and sensitive content all go in and get recalled later, polluting context and amplifying hallucinations.
dsh-memory-eternal uses human-in-the-loop auditing — only trusted content enters the main vault:
| Dimension | Other memory products | dsh-memory-eternal audit system |
|---|---|---|
| Ingest | Auto-ingest all, no gate | New cards first enter the Audit Center (pending), approved before entering the vault |
| Quality | No filtering of noise/errors | Only cards you've confirmed → more accurate recall, less noise |
| Traceability | No source/audit trail | Every card carries submittedBy author + pending/approved/rejected state |
| No-friction | — | Exempt agents / exempt kinds hit → trusted cards go straight in, zero wait |
| Safety | Delete = gone forever | Recycle-bin soft delete, recoverable within 30 days |
Most memory solutions lean on third-party frameworks / spin up an MCP service / lock memory in a private store. This plugin builds the skeleton itself — zero third-party runtime deps, logic readable line by line:
| Module | Self-built | Replaces |
|---|---|---|
| Dedup | lexical Jaccard bigram (0.62) + semantic dedup | duplicate-card prevention |
| Retrieval | CJK-aware: Chinese whole-word + char bigram | no full-text search engine needed |
| Graph | force-directed + [[wikilink]]/shared-tag edges | see knowledge links at a glance |
| Storage | plain .md with frontmatter | not locked in, readable, git-able, any tool can read |
Same direction as popular projects (summarize→store→recall), but positioned differently: local, self-built, zero-dep, readable & controllable. If you already use mem0/Zep etc., just layer this as a "local persistent memory base".
npm i
npm test # unit tests: vault dedup/retrieval/graph + capture pipeline + API shapes
npm run build # builds lib/client.js (DSH embed) + web/app.js (standalone web bundle)
MIT
Make your AI truly remember: dialogue auto-captured, knowledge at your fingertips. ⭐ Star it if you like, Let's make AI not forget.
中文 README: README.md