편집자 노트

跨会话记忆

remember/recall/forget/pin

이것은 DeepSeek Harness(DSH) 플러그인입니다. 이 사이트는 GitHub README, 설치 정보, 유지보수 상태, 공개 보안 시그널을 모아 보여줍니다.

업스트림에서 중국어 README를 제공하지 않아 저장소 원본 내용을 표시합니다.

dsh-memory 🧠

Cross-session memory plugin for DeepSeek Harness (dsh).

YAML-backed remember / recall / view / list / forget / pin tools with embedding search, title-first injection, and two-level (session/auto) automatic injection — the agent "naturally carries" memory without having to remember to call a tool.

English | 中文

✨ Features

FeatureDescription
remember / recall / view / list / forget / pinWrite, semantic search, expand-by-id, list (titles), soft-delete, force-inject pinning
Title-first injectionMemories inject as summary titles (with id), not full text — compact prompts; details expand via the view tool
Two-level injectioninjectLevel: session memories are resident (injected once at session start, OpenClaw-style); auto memories arrive via topic retrieval
Once-per-session injectionFixed memories inject on the session's FIRST step, then ride the history (no per-round re-render — token + prefix-cache friendly)
Embedding searchHybridSearch (keyword 2-gram + local embedding via ollama, RRF fusion) — catches paraphrases keyword search misses
Tuned matchingGeneric-word downweighting (文件/测试/文档…), ≥2-token keyword hits, retrieval gate skips test-chatter ("别管/只是测试")
Provenance labelingInjected memories are prefixed "…from the memory store (not conversation history)" so the model never mistakes them for dialogue
Data safetySerialized write queue (no lost updates), corrupt-file quarantine + backup, atomic writes, mtime cache invalidation

📦 Install

# From source (inside a dsh checkout)
pnpm install
pnpm run build

# Register in your profile patch (e.g. ~/.dsh/profiles/web/cordis.patch.yml)
- insert:
    - id: dsh-memory
      name: '@towzai/dsh-memory'
      config:
        file: /path/to/memory.yaml
        injectLimit: 8

Requires a local ollama instance with an embedding model (default qwen3-embedding:0.6b; override via DSH_MEMORY_EMBED_MODEL).

🔨 Build (from source)

Requires the dsh checkout's dependencies (the plugin's peer deps live there). On Windows you can junction them instead of reinstalling:

# in the plugin repo
cmd /c mklink /J node_modules <path-to-dsh-checkout>\node_modules
npm run build   # outputs lib/index.js

🛠️ Tools

ToolPurpose
rememberSave a memory (content / title / category / tags / importance / forceInject / injectLevel / source)
recallHybrid search (keyword + embedding) top-N
viewExpand ONE memory's full content by id (title-first injection's detail entry)
listList memories as titles (category/tag/importance filters, full for content)
forgetSoft-delete (marks retired, keeps history)
pinToggle forceInject — pinned memories always appear at session start

🗂️ Storage

Single YAML file (default memory.yaml). Each entry:

- id: MEM-20260814-001
  title: "Summary title (auto-derived if absent)"   # injected as title
  content: "..."
  category: preference | project | lesson | fact
  tags: [tag1, tag2]
  importance: high | normal | low
  created: 2026-08-14
  updated: 2026-08-14
  source: user | agent | conversation
  retired: false
  forceInject: false           # full behavioural rules, always resident
  injectLevel: session | auto  # resident vs on-demand
  vector: [...]   # 1024-dim embedding, auto-computed on write

🔧 Architecture

src/
├── index.ts    # plugin entry: tools + session-first injection + pre-step listener
├── storage.ts  # Storage interface + YamlStorage (queue, mtime cache, quarantine)
├── search.ts   # KeywordSearch / EmbeddingSearch / HybridSearch (RRF) / OllamaEmbedder
├── inject.ts   # selectForInjection / renderSection (title-first) / deriveTitle / entryTitle
├── dynamic.ts  # DynamicInjector (per-session dedup + retrieval gate + fixed-set exclusion)
└── types.ts    # data model (+ reserved fields: vector/scope/weight for future)

Design doc: docs/2026-08-13-dsh-memory-design.md.

⚠️ Notes

  • Embedding model change invalidates stored vectors (dimension mismatch is detected and logged)
  • The plugin is developed against dsh v0.1.0-rc.5; peer dependency ranges may need bumping

🔗 References

This plugin is part of the DeepSeek Harness (dsh) plugin ecosystem.

📄 License

MIT

REPOSITORY SIGNALS

보안 및 설치 증거

이 점수는 공개 저장소 메타데이터와 이 사이트에 등록된 설치 증거에만 기반하며, 코드 보안 감사와 다릅니다.

출처 추적 가능

공개 플러그인 카탈로그에서 왔으며, 공개 GitHub 저장소로 연결됩니다.

라이선스

저장소가 MIT 라이선스를 선언했습니다.

유지보수 활동

최근 180일 내 코드 업데이트가 있습니다.

설치 증거

재현 가능한 정확한 설치 메타데이터가 아직 등록되지 않았습니다. 저장소 설명에 따라 직접 확인하세요.

설치 라이프사이클 스크립트

검사한 패키지 메타데이터에 설치 라이프사이클 스크립트가 선언되지 않았습니다.