yinguobing/dsh-memory-index ↗★ 0

dsh-memory-index

使用SQLite全文索引检索Markdown记忆 适合拥有本地知识库、需要快速检索记忆树且不愿运行向量服务的用户。

包名
dsh-memory-index
兼容性
待验证
版本
0.1.0
许可证
MIT
最近更新
2026年10月26日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:yinguobing/dsh-memory-index

Configuration

- id: memory-index
  name: dsh-memory-index
  config:
    workspace: /home/you/notes
    indexDb: .memory/index.sqlite
    roots:
      - { path: MEMORY.md, source: core }
      - { path: memory, source: daily }
      - { path: wiki, source: wiki }
      - { path: archive/sessions, source: session }
    writeRoots:
      - MEMORY.md
      - memory
    digest:
      - { path: MEMORY.md, maxChars: 3500 }
      - { path: 'memory/{today}.md', maxChars: 1500 }
      - { path: 'memory/{yesterday}.md', maxChars: 1000 }
    timeZone: Asia/Shanghai
    sourcePriority:
      core: 0
      daily: 1
      wiki: 2
      session: 3
    writeMode: readonly       # readonly | readwrite
    autoRecall: off           # off | startup
    buildOnStart: false
    maxResults: 8
    maxFileBytes: 20971520
    maxWriteBytes: 204800
    maxDigestChars: 8000
FieldDefaultMeaning
workspacerequiredDirectory containing the memory tree. Resolved once and used as the boundary for all reads/writes.
indexDb.memory/index.sqliteSQLite file, relative to workspace, or :memory:.
rootsMEMORY.md, memory/, wiki/, archive/sessions/Files or directories to index. A file root is indexed directly; a directory root is walked recursively. source labels the results.
writeRootsMEMORY.md, memory/Paths the agent may write. Entries ending in .md are files; others are directories.
digestMEMORY.md, today, yesterdayOptional startup excerpt. {today} and {yesterday} use timeZone.
timeZonesystem zoneUsed for daily-note filenames and digest placeholders.
sourcePrioritycore, daily, wiki, sessionLower ranks first in ties. Unknown sources sort last.
writeModereadonlySet readwrite to enable memory_write.
autoRecalloffSet startup to add the digest as prompt context for workspace agents.
buildOnStartfalseBuild the index in the background after plugin load.
maxResults8Default and cap for memory_search (1–20).
maxFileBytes20 MiBFiles larger than this are skipped.
maxWriteBytes200 KiBMaximum content accepted by one memory_write.
maxDigestChars8000Character budget for the startup digest.

roots and writeRoots are independent on purpose: you can index wiki/ and archive/sessions/ while allowing writes only to memory/.