nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:sdf-jkl-gh/dsh-memory-panel
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Persistent memory plugin for DeepSeek Harness: model-facing
memory_*tools, automaticmemory:recallprompt injection,/memory/apiJSON routes, and a Settings → 记忆 (Memory) management panel.
dsh-memory-panel gives every agent session a durable, searchable memory
that survives process restarts:
| Capability | Where | Description |
|---|---|---|
memory_save |
model tool | Create or update a memory entry (title + content + tags + importance) |
memory_search |
model tool | Ranked keyword search — Latin whole-word plus CJK bigram scoring |
memory_list |
model tool | List entries newest-first, optionally filtered by tag, with tag/importance stats |
memory_get |
model tool | Read one full entry by id |
memory_delete |
model tool | Delete an entry by id |
memory:recall |
system prompt | Top 6 memories (high-importance first) are auto-injected into every agent's prompt at assembly time |
/memory/api/* |
host route | JSON API used by the settings panel |
| Settings → 记忆 | web panel | Browse, search, create, edit, and delete memories in the GUI |
The plugin is mounted at the user layer of the DSH profile composition, so its tools are visible to every session regardless of which agent preset is active.
┌──────────────────────────── DSH host process ───────────────────────────┐
│ │
│ tools registry ◄── memory_save/search/list/get/delete (model-facing) │
│ ▲ │
│ │ createMemoryStore (src/store.js) │
│ │ ┌──────────────────────────────────┐ │
│ │ │ pure logic: scoring, recall, │ │
│ └──── execute ────────│ serialized write chain │ │
│ └───────────────┬──────────────────┘ │
│ │ load / persist (injected) │
│ /memory/api/* routes ◄── POST ──┐ ▼ │
│ ▲ │ fs service │
│ │ │ │ │
│ systemPrompt.memory:recall ◄───┘ ▼ │
│ ▲ <home>/.dsh-memory/memories.json │
│ │ (30s guarded refresh + │
│ │ refresh on every save/delete) │
└────────┴───────────────────────────────────────────────────────────────────┘
┌────────────────────────── browser (web client) ─────────────────────────┐
│ Settings → 记忆 panel ── fetch('/memory/api/<method>', { method: 'POST' })│
└────────────────────────────────────────────────────────────────────────────┘
memories.json under <user home>/.dsh-memory/ — resolved from
the host sandboxPolicy.workspaceRoot, i.e. the user home, not the
session workspace. Created on first save; survives restarts.memory:recall system-prompt section renders a plain-string
cache synchronously (the section text hook is sync, ctx.fs is async);
the cache is rebuilt after every save/delete and on a guarded 30s timer.dsh plugin --profile <profile-name> add dsh-memory-panel
The package declares dsh.bundle.patch: ./cordis.patch.yml; the CLI reconciles
the profile bundle stack and the patch inserts the plugin row, so no profile
file edits are needed.
Copy the package anywhere DSH can resolve it, then append to your profile's
cordis.patch.yml:
- insert:
- id: tool-memory
name: 'dsh-memory-panel'
Restart DSH. New entries must be added with insert (an id-less override is
ignored by the patch loader).
Upgrading from an older manual mount: if your profile already mounts the plugin row in its own
cordis.patch.yml, remove that line before switching to the bundle channel to avoid double-mounting (two host halves, duplicated tools and routes).
Just talk naturally — or call the tools directly:
memory_save(title="User prefers Chinese thinking", content="...", tags=["preference"], importance="high")
memory_search(query="Chinese thinking")
memory_list(tag="preference")
memory_get(id="m...")
memory_delete(id="m...")
Every agent automatically sees the top saved memories through the
memory:recall section (marked [重要] when high importance) and is told to
call memory_search for the full picture.
Open Settings → 记忆 (Memory): browse all entries with stats, search,
create/edit/delete. The panel talks to the host through
POST /memory/api/* JSON routes.
npm test # node:test — pure-logic + plugin-level integration tests
src/
index.js Host half: tools, routes, recall injection (Cordis plugin)
client.js Client half: Settings → 记忆 panel (module-loader bundle)
store.js Pure logic: scoring, recall builder, injected store factory
test/
store.test.js Unit tests for src/store.js
index.test.js Integration tests with a mocked Cordis ctx + in-memory fs
docs/
design.md Architecture and data-flow deep dive
FAQ.md Common questions
MIT © 2026 dsh-memory-panel contributors
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: memory。