dshbase

插件目录 / Knowledge / dsh-llmwiki

dsh-llmwiki

已验证 · 实测可装 chancelu

✓ 持续维护 基于 4 个官方 DSH 包 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

2Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-15最近推送
跨平台平台

功能简介

本地Markdown维基作为长期记忆

✅
我们的评价
可用 — 实测通过,早期项目

本地Markdown维基作为长期记忆 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-llmwiki

Context Window = RAM, Local Wiki = Disk — long-term memory for DeepSeek Harness, powered by your local Markdown vault.

TypeScript port of llmwiki (Python: llmwiki-harness on PyPI), packaged as a native dsh plugin.

What it does

Mechanism dsh extension point
Inject relevant wiki knowledge into the same turn's model request session/event (agent/inbox/spliced, pre-assembly live event) → ctx.systemPrompt.context()
Teach the model about memory ctx.systemPrompt.section()
memory_search — model recalls prior sessions / curated notes ctx.tools.register()
memory_save — model persists durable insights ctx.tools.register()
Auto-capture every turn to chronicle/daily/YYYY-MM-DD.md session/event (turn/end)

Retrieval: keyword + wikilink graph + temporal strategies fused with RRF (Reciprocal Rank Fusion), assembled under a token budget, with an LRU + TTL cache. Zero runtime dependencies beyond Node.js.

Vault layout (created automatically)

my-vault/
├── raw/               # Layer 1: session dumps
├── chronicle/daily/   # Layer 2: auto-captured daily logs
├── entities/          # Layer 3: compiled knowledge
├── concepts/
├── comparisons/
├── projects/
└── queries/

Open it with Obsidian, curate Layer-3 notes with [[wikilinks]] — the graph strategy follows them.

Install

Requires Node.js ≥ 22 (same as dsh itself) and a working dsh CLI (npm install -g @deepseek-ai/dsh) with pnpm on PATH.

# from npm
dsh plugin --profile web add dsh-llmwiki

# or from a tarball
dsh plugin --profile web add ./dsh-llmwiki-0.1.1.tgz

# verify the layer, then boot
dsh --profile web --dump-config   # shows a "# == dsh-llmwiki" layer
dsh web                           # logs: [dsh-llmwiki] memory plugin loaded, vault: ...

The package declares dsh.bundle, so dsh plugin add activates it automatically — no manual patching needed.

Configure

The plugin works zero-config (vault defaults to ~/llmwiki-vault). To override, add a row to your profile's cordis.patch.yml (or a --patch overlay) — note the override restates the row by id without insert:

- id: llmwiki
  config:
    vaultPath: /path/to/your/vault   # Obsidian vault welcome
    tokenBudget: 2000
    strategies: [keyword, graph, temporal]
    daysBack: 7
    topK: 5
    autoInject: true
    autoCapture: true

A patch replaces the row's entire config, so restate every key you want to keep.

Config

Key Default Meaning
vaultPath ~/llmwiki-vault Markdown vault path; structure created if missing
tokenBudget 2000 Max tokens of injected wiki context
strategies [keyword, graph, temporal] Enabled recall strategies
daysBack 7 Temporal look-back window
topK 5 Results per retrieval
priority relevance Assembly priority: relevance / recency / diversity / structured
cacheTtl 300 Cache TTL seconds
autoInject true Inject wiki context on each user message
autoCapture true Append each turn to the daily chronicle

How the pieces map from the Python original

Python (llmwiki) TypeScript (dsh-llmwiki)
core/retriever.py src/retriever.ts
core/assembler.py src/assembler.ts
core/cache.py src/cache.ts
vault/capture.py src/capture.ts
search/python_engine.py merged into retriever.ts (keeps the package zero-dep)
OpenClawMemoryHook adapter the dsh plugin itself (src/index.ts)

Not yet ported: ripgrep / SQLite FTS engines (the pure-JS engine keeps installs dependency-free — contributions welcome), the LLM-driven curate pipeline (run the Python CLI alongside for now).

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-llmwiki」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

Web profile:

dsh plugin --profile web add dsh-llmwiki

Headless(CLI)profile:

dsh plugin --profile headless add dsh-llmwiki

包信息

npm:dsh-llmwiki · 版本 0.1.1 · 实测环境 dsh 0.1.0-rc.6

实测报告

端到端验证通过:dsh 0.1.0-rc.6 上 L1 安装 + L2 加载 + L3 运行问答。

使用场景

给 agent 一套记忆、知识库或检索层,让它不再跨会话丢上下文。

适合谁

跑长项目、想让 agent 记住决策、文档和偏好而不用每次重讲的人。

二次开发建议

记忆/检索后端是缝——插新存储、调蒸馏策略,或加引用与审计轨迹。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Knowledge 里更多

浏览全部 7797 个插件 →