nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:bufan528/dsh-longterm-memory
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Long-term memory for DeepSeek Harness, stored as a plain Markdown vault you own.
A first-level sidebar page, nine model tools, token-budgeted recall, and a durable
history journal — no database, no telemetry, no cloud. Your memories stay as
Obsidian-compatible .md files on disk.
Install · DSH Plugin Market · dsh.works · Features · Configuration · Data safety · Privacy · Development · 简体中文
Project status (2026-11-15).
0.2.0is published on npm and attached to the latest GitHub Release (with a version-agnosticdsh-longterm-memory.tgzasset). It adds a first-level tab, 9 RPCs and 5 model tools, so upgrading is a deliberate step — read What's new first. The plugin is listed in two community registries: the DSH Plugin Market (added 2026-10-19) and the dsh.works community registry (dshworks/awesome-dsh-plugins, verified, added 2026-10-19). The in-app 插件市场 / Plugin Market is the dshmarket plugin and reads that same catalog, so the plugin is discoverable and one-click installable there as well (no separate submission). Install it from the in-app market, or from npm withdsh plugin add dsh-longterm-memory@latest. The desktop-app plugin entry is verified end-to-end in the running desktop app (61/61 real-browser checks over the five pre-existing tabs, real vault, restored afterwards; the 0.1.5 QQ tab was verified separately on an isolated 0.2.1-rc.3 host, see docs/evidence/qq-verification.md). See Install, What's new and Project status & limitations.
0.2.0 is a breaking release: the management page gains a first-level tab (伙伴中心 / Companion
centre) with eight panes — seven tabs in total — the RPC surface grows from 50 to 59 methods, and
the model gets five action tools alongside the four memory tools. Stickers, reminders and persona documents become
vault-owned files (Companion/, Reminders/), each with its own delivery rhythm; persona
evolution is queued for review and undoable; and the Owner gate gains an opt-in local-session
switch so a desktop install can read its own memory. Stored files remain compatible — only the
surface grew. See CHANGELOG.md for the full list and the four bugs found by
round-trip verification.
0.1.8 removes an experimental QQ message-merge control surface from the QQ tab. The tab is back to what this plugin owns: connection status, memory-linkage policy, session isolation, inbox wiring, diagnostics and security. No other behaviour changes; existing memory data, index, tools, prompt injection and all other tabs are untouched.
0.1.5 adds a sixth tab, QQ integration
(记忆总览 | 记忆检索 | 记忆管理 | 收件箱 | QQ 接入 | 设置), plus an optional
QQ ↔ long-term-memory linkage policy (three modes, four enforcement points) and a
diagnostics card. It is documented in docs/qq-integration.md.
The existing 61-check real-browser E2E suite still covers the five pre-existing tabs;
the QQ tab was verified on an isolated 0.2.1-rc.3 host (see
docs/evidence/qq-verification.md).
0.1.4 is a documentation release: the plugin is now listed in the DSH Plugin
Market (added 2026-10-19) and in the dsh.works community registry
(dshworks/awesome-dsh-plugins, verified; it powers the 插件 → DSH 社区 market in
the dsh-armory dashboard). Install or
update from the in-app 插件市场 / Plugin Market, or from npm. No code changes; it
ships all of the 0.1.3 fixes below.
0.1.3 made the Inbox actionable and fixed three other user-facing bugs:
low confidence is raised
to medium), folds a duplicate/supplement into the existing memory instead of
duplicating it, and keeps both sides of a contradiction. Rejecting writes no file.evidence: block
scalar no longer blocks saves with unsafe-edit.npm run verify:e2e) covering all five tabs,
including the Inbox, detail, settings, batch and merge flows.Full details: CHANGELOG.md · latest release

Most "agent memory" features are a vector store or a black-box service. DSH Memory Vault makes the opposite trade-off:
.dsh-memory/index.json is derived data; delete it and
the plugin rebuilds it from Markdown. Losing the index never loses a memory.| First-level sidebar page | Registers a sidebar.panellist entry and a full management page (overview / search / manage / inbox / QQ integration / companion centre / settings) — not a chat tab. |
| Nine model tools | Memory: memory_search, memory_get, memory_save, memory_forget (save refuses credential-like content). Life: sticker_pick, sticker_ingest, reminder_create, reminder_list, reminder_complete. |
| Automatic extraction | Rule-based, fully local candidate extraction at the real turn/end boundary. Optional model-assisted extraction is off by default. |
| Ranked recall | BM25-style lexical ranking over Markdown, with type/status/tag filters and a token budget. |
| Memory lifecycle | pending → active → stale / superseded / archived / conflict, plus low/medium/high confidence. Low confidence and sensitive content wait in the Inbox for human confirmation. |
| Safe updates | Deterministic dedupe/merge rules: duplicates merge, additions update while keeping sources, contradictions keep both sides, low confidence goes to Inbox. |
| Conflict handling | Conflicting facts are kept side by side, never silently overwritten; a conflict-resolution page supports keep / merge / both. |
| Crash-safe writes | Single-file atomic replace, per-file lock, optimistic checksum concurrency, durable journal outbox with idempotent recovery. |
| Obsidian compatible | The vault carries .obsidian/, [[wikilinks]], stable frontmatter and a human-readable Index/. |
| Companion centre (since 0.2.0) | A first-level tab with eight panes: overview, persona, shared memory, inbox, stickers, reminders, privacy, diagnostics. Persona voice anchors, a sticker library with previews and a send rhythm, reminder capture in natural language, and persona evolution that stays review-gated and undoable. |
| Delivery rhythms, not hope | Stickers obey a cooldown, a 24 h ceiling, quiet tags and an optional probability gate; reminders obey quiet hours (22:00-08:00) and exponential backoff (15 min × 1.6, five attempts). Both live in the vault, and a refusal always carries the reason and the retry instant. |
| Auto-collect from chat | Reaction images from a chat are saved to the library on the model's own initiative — at most three a day, never screenshots, documents or real photos. Toggle it under Settings → extraction. |
| Bilingual UI | Chinese and English (language: zh | en). |
| Optional QQ integration tab | Status / detection / linkage policy / diagnostics for the official @tencent-connect/dsh-qqbot — read-only where it can be, never reimplements the QQ protocol, never touches credentials. |
| *No runtime dependency on `@deepseek-ai/`** | The host half only uses the Cordis context passed in, so DSH internals can change without breaking the bundle. |
Real acceptance screenshots (headless Chrome, real host data — no mocks):
| Sidebar entry | Management page |
|---|---|
![]() |
![]() |
More: overview · search · manage · inbox · settings · dark theme
flowchart LR
A[DSH host] -->|tools / prompt section| P[Memory Vault host plugin]
U[Sidebar page] -->|local HTTP RPC| P
P --> V[(Markdown vault<br/>source of truth)]
P --> I[(index.json<br/>derived)]
P --> J[(journal outbox<br/>history)]
P --> Q[(quarantine<br/>unreadable notes)]
V -. rebuild .-> I
J -. recover .-> V
POST /dsh-longterm-memory/api/<method>, 29 methods) guarded by a browser-trust
fence (loopback / trusted hosts, Origin, sec-fetch-site).memory_search and automatic injection share one engine; explicit
recall may include retired memories (labelled history), injection only uses current
facts. POST /api/previewStanding and POST /api/previewRecall return the exact
text that would be injected.How market updates actually work. The catalog entry has an
npmfield, so dshmarket resolves this plugin from the npmlatesttag — not from the GitHub Release tarball URL that is also listed. The catalog itself carries a version string and is rebuilt daily (02:23 UTC), so after a new npm publish the card may need until the next build to show the new version. If the card still offers 0.1.8, use Option C to install 0.2.0 immediately.
In the official desktop app, open 插件市场 / Plugin Market, search for
长期记忆 or DSH Memory Vault, then install or update from the plugin card and
restart the app when prompted. That in-app market is the
dshmarket plugin
(dshmarket.com); it reads the same
awesome-dsh-plugin
catalog (added 2026-10-19), so no separate dshmarket submission or association is
needed. After the first listing, each npm publish makes the new version available for
one-click updates once the catalog rebuilds.
Market page: https://awesome-dsh-plugin.com/p/bufan528/dsh-longterm-memory/
Also discoverable via dsh-armory. The dsh-armory dashboard's 插件 → DSH 社区 market reads the dshworks/awesome-dsh-plugins registry (browse at dsh.works), where this plugin is listed as verified with npm
dsh-longterm-memory. There is no separate submission to dsh-armory: keeping the npmlatesttag current keeps both listings current.
dsh plugin --profile web add dsh-longterm-memory@latest
Latest npm release:
dsh-longterm-memory@0.2.0. Use@latest(or omit the version) so an installation always fetches the newest published version. The newest GitHub release isv0.2.0; both point at the same build.
Every GitHub Release ships a versionless alias (dsh-longterm-memory.tgz) next to
the versioned copy and their SHA-256 checksums, so "latest" needs no version number:
# Stable URL — always the newest release
Invoke-WebRequest -Uri https://github.com/bufan528/dsh-longterm-memory/releases/latest/download/dsh-longterm-memory.tgz -OutFile .\dsh-longterm-memory.tgz
# optional: verify the checksum against the published .sha256 asset
Invoke-WebRequest -Uri https://github.com/bufan528/dsh-longterm-memory/releases/latest/download/dsh-longterm-memory.tgz.sha256 -OutFile .\dsh-longterm-memory.tgz.sha256
(Get-FileHash .\dsh-longterm-memory.tgz -Algorithm SHA256).Hash.ToLower() -eq ((Get-Content .\dsh-longterm-memory.tgz.sha256) -split '\s+')[0]
dsh plugin --profile web add .\dsh-longterm-memory.tgz
With the gh CLI, the same alias can be fetched version-agnostically:
gh release download --repo bufan528/dsh-longterm-memory --pattern "dsh-longterm-memory.tgz" --dir .
dsh plugin --profile web add .\dsh-longterm-memory.tgz
No gh? Open
https://github.com/bufan528/dsh-longterm-memory/releases/latest and download the
asset manually.
Requires Node.js ≥ 20 and a DSH CLI. Use an isolated DSH_HOME so the test
profile cannot touch your daily DSH profile:
# 1. Build and pack
npm install
npm run build
npm pack # -> dsh-longterm-memory-0.2.0.tgz
# 2. Install into an isolated profile
$env:DSH_HOME = "<temporary dir>" # PowerShell
# export DSH_HOME="<temporary dir>" # bash
dsh plugin --profile lmv add .\dsh-longterm-memory-0.2.0.tgz
# 3. Start
dsh --profile lmv --no-open --port 0
Open the Web UI, click 长期记忆 / Long-term Memory in the sidebar, and choose a vault directory (or let the plugin initialize one). You can also pre-set it:
# <DSH_HOME>/profiles/lmv/cordis.patch.yml
- id: longterm-memory
name: dsh-longterm-memory
config:
vaultPath: 'D:/path/to/DSH Memory'
language: zh
Data-location warning. If
vaultPathis unset, the plugin initializes the default location (~/Documents/DSH Memoryon Windows).DSH_HOMEisolates the profile, not the vault. Always setvaultPathwhen testing.
DSH Memory/
├── README.md # generated; user edits are preserved
├── Memory Home.md # entry page
├── .obsidian/ # makes Obsidian treat it as a vault
├── Profile/ Preferences/ # profile, long-term preferences
├── Projects/ Projects/State/ # projects and project state
├── Decisions/ Knowledge/ # decisions, knowledge
├── Experiences/ Tasks/ # lessons, tasks
├── Inbox/ # candidates awaiting confirmation
├── Archive/ Conflicts/ # retired / contradictory memories
├── Index/ # human-readable index (regenerated)
├── History/ # change-history notes
├── Companion/ # persona documents (since 0.2.0)
│ ├── Persona.md # name, address, tone, catchphrases, avoid
│ ├── Examples/ # voice anchors, one file per preset
│ ├── Stickers/ # catalog.json, policy.json, image files
│ └── Evolution/ # suggestions.json (review queue)
├── Reminders/ # one note per reminder, plus policy.json
└── .dsh-memory/ # config.json, index.json, journal/, quarantine/
Memory types: profile, preference, project, project-state, decision,
knowledge, experience, task. Status: active, pending, stale,
superseded, conflict, archived. Format details:
docs/storage-format.md.
All settings are optional; defaults live in src/host/config.ts and can be overridden
from your profile's cordis.patch.yml.
| Key | Default | Meaning |
|---|---|---|
vaultPath |
auto-discover / initialize | Absolute memory vault path |
language |
zh |
UI language (zh / en) |
enableTools |
true |
Expose the four model tools |
enablePromptSection |
true |
Inject the standing memory section |
standingBudgetTokens |
700 |
Token cap for the standing section |
standingMaxItems |
12 |
Item cap for the standing section |
recallBudgetTokens |
600 |
Token cap for one recall answer |
recallMaxItems |
8 |
Item cap for one recall answer |
enablePerStepRecall |
false |
Splice retrieved memory into each step (replayed for the rest of the session) |
enableAutoExtraction |
true |
Rule-based extraction at turn end (local) |
enableLlmExtraction |
false |
Optional model-assisted extraction (sends turn text to your provider) |
redactSecrets |
true |
Refuse credential-like candidates |
sensitiveNeedsConfirmation |
true |
Health/finance/identity content waits for confirmation |
maxCandidatesPerTurn |
5 |
Extraction cap per turn |
The fifth tab is QQ 接入 / QQ access; the full tab order is
记忆总览 | 记忆检索 | 记忆管理 | 收件箱 | QQ 接入 | 伙伴中心 | 设置
(overview · search · manage · inbox · QQ access · companion centre · settings). It is a status,
navigation, policy and diagnostics page: it never reimplements the QQ protocol and
never copies the official connector's code.
GET /qqbot/im-qqbot/bind probe
(4 s timeout): 200 = loaded (the JSON phase is bound, waiting, starting,
saving or failed), 404 = not installed / not loaded, anything else =
cannot confirm. It does not use ctx.get('im-qqbot'): the official plugin
registers no cordis service, so that lookup is undefined even when it is loaded.appId the official plugin's own status route
returns).Optional policy enforced at four points; off by default:
| Mode | Effect |
|---|---|
off (default) |
Identical to running without QQ integration |
deny-qq |
Sessions matching your QQ markers do not read long-term memory |
allowlist |
Only sessions matching your trusted markers read memory |
The four enforcement points are the standing prompt section, per-step recall,
turn-end write-back (QQ candidates go to the Inbox unless writeMode: direct) and the
four memory tools (allowTools, default false). QQ sessions can only be identified
by markers you declare — origin, agentPreset or cwd (for example the
preset/cwd set in the official plugin's config). Private and group chats cannot
be told apart: the official plugin knows the scope internally but does not write it
into the DSH session header, so this plugin does not fake per-group isolation.
Details: docs/qq-integration.md §5.
appId/appSecret as plaintext YAML into
<profile>/cordis.patch.yml (no keychain, no encryption). This plugin never reads
that file, never stores a credential, and never displays appSecret (the only
identity value it shows is the non-secret appId from the official status route).deny-qq / allowlist exist.vaultPath values at the same Vault; concurrent writes rely on the existing
journal / atomic-write / lock machinery. This plugin never edits any profile.The official @tencent-connect/dsh-qqbot lists only DSH 0.1.0-rc.8 and
0.2.0-rc.2 as validated; it does not validate DSH 0.2.1-rc.3. The host still
admits it because the package has no engines.dsh and its @deepseek-ai/dsh-* peer
floor is evaluated with includePrerelease: true — installable is not validated.
There are open community reports on the 0.2.1 line (issues #60 / #58). See
docs/compatibility.md §13.
npx @deepseek-ai/dsh plugin --profile <profile> add @tencent-connect/dsh-qqbot
Then bind it from the in-app 设置 → QQ 机器人 panel or the right-sidebar QQ 机器人绑定 tab (0.5.1+ ships the in-app UI; older versions only print a terminal QR code). The official plugin is a separate project; this plugin only reads its binding status.
A first-level tab, not a chat tab. Eight panes share one set of vault-owned stores, so the page works without the QQ plugin being installed at all:
| Pane | What it is for |
|---|---|
| 总览 Overview | Four numbers: memories, pending review, conflicts, link state. |
| 人格中心 Persona | Persona.md plus voice anchors. Six presets, a two-sided preview, and an evolution queue where every suggestion names the memories it came from. |
| 共享记忆 Shared | Per-memory visibility between desktop and QQ. |
| 记忆收件箱 Inbox | Candidate memories waiting for a decision. |
| 表情图库 Stickers | Import, preview, tag, favourite, and the send rhythm. |
| 提醒中心 Reminders | Natural-language capture (明天下午三点), grouping by local midnight, and the delivery rhythm. |
| 隐私安全 Privacy | Owner binding, and the local-session trust switch described below. |
| 运行诊断 Diagnostics | Which execution points the host actually gave us, rather than a green tick that means nothing. |
Two rhythms, both in the vault. Stickers: a minimum gap, a 24 h ceiling, quiet tags, optional probability. Reminders: quiet hours and an exponential backoff. A refusal is information — the model gets the reason and the instant it may try again, so it says "give it a few minutes" instead of pretending.
Persona evolution is review-gated. Proposals are deterministic (no model call), touch only the variable layer (address, catchphrases, avoid, tone), never the fixed core (name, identity, boundaries), and stay undoable after acceptance.
Personal memory sits behind an Owner gate that is fail-closed by default. A QQ C2C session is allowed by its bound owner; a desktop session has no QQ provenance, so it reads nothing — which is correct for a shared machine and useless for a single-user install.
trustLocalSessions (Settings → 本机会话, off by default) resolves that: when enabled, a session
with no live provenance, not known to the QQ registry, and with a readable registry is treated as
local. QQ groups, QQ sessions whose live source vanished, a broken registry, and unrecognised
platforms are still refused — the switch fills exactly one gap, it does not open the gate.
rebuildIndex / syncIndex recover from a deleted or
corrupt index. Corruption diagnostics are surfaced, not hidden.GET /qqbot/im-qqbot/bind probe
— both loopback. The 0.1.3 desktop E2E run exercised the real page and asserted zero
page errors / uncaught exceptions; it is not a packet-level network audit.enableLlmExtraction) is off and, when enabled, uses the provider you
configured in DSH.| DSH runtime | >=0.2.1-rc.3 <0.2.2 (engines.dsh; 0.2.0-rc.2 is not supported) |
| Verified DSH version | 0.2.1-rc.3 — current desktop host; the plugin is loaded and serving RPC on it (see docs/compatibility.md §12) |
| Node.js | >=20 |
| Platform | Windows (primary), Node path rules elsewhere |
| npm package | dsh-longterm-memory — 0.2.0 published on npm and GitHub |
| Downloads | Latest GitHub Release — stable alias dsh-longterm-memory.tgz (+ .sha256), or npm @latest (0.2.0) |
| DSH Plugin Market | Listed in awesome-dsh-plugin since 2026-10-19; updates follow the npm latest tag |
| dshmarket (in-app market) | Listed through the same awesome-dsh-plugin catalog; the catalog is rebuilt daily from the npm latest tag (no separate dshmarket submission) |
| dsh.works registry | Listed + verified in dshworks/awesome-dsh-plugins since 2026-10-19; surfaced by the 插件 → DSH 社区 market in the dsh-armory dashboard |
The dsh.compatibility field is informational; engines.dsh is the only decision
source. Details and evidence: docs/compatibility.md.
npm install
npm run build # tsc -> lib/host, esbuild -> lib/client.js
npm run typecheck # tsc --noEmit
npm run lint # contract checks + version-consistency check
npm test # full suite (78 suites / 1148 cases via run-isolated-suite.mjs)
npm run check # build -> typecheck -> lint -> test (clean checkout safe)
npm run pack:plugin # build + npm pack
npm run verify:e2e -- --url "http://127.0.0.1:<port>/?token=..." # real-browser E2E (61 checks)
verify:e2e drives a real Chrome over CDP, clicks the real management page and checks
every effect through the plugin RPC and the Markdown files on disk. For a token-guarded
desktop listener, mint the desktop launch cookie for the current machine and pass it
with --cookie-file <name=value file>.
Tests cover unit, integration, packaging, real HTTP-route validation, and deterministic
fault injection (including real subprocess kills). The browser acceptance scripts are
zero-dependency CDP clients using Node's built-in WebSocket.
0.1.0 was the first public
version, and 0.2.0 is the current release.dsh-longterm-memory@0.2.0 (2026-11-15); the npm latest dist-tag
points at it and registry installation is verified. The same build is attached to the
latest GitHub Release (dsh-longterm-memory-0.2.0.tgz plus the version-agnostic
dsh-longterm-memory.tgz and their .sha256 files).latest tag, so no new
marketplace submission is needed per version. The China-region catalog mirror may lag
the origin by up to about a day.0.1.4 with 5 screenshots;
updates follow the npm latest tag.status: verified with npm: dsh-longterm-memory (added 2026-10-19), so the
插件 → DSH 社区 market in the
dsh-armory dashboard lists and installs it
without any separate dsh-armory submission. Both registries follow the npm latest
tag; dsh-armory revalidates its catalog cache every few minutes (new installs fetch
fresh).0.2.1-rc.3 host with a real browser (see
docs/evidence/qq-verification.md). They are not
part of the 61-check E2E suite yet. The official QQ plugin is not installed on this
machine, so only its 404 probe branch was observed; the 200 branch and the official
connector's actual behaviour on DSH 0.2.1-rc.3 are unverified.待确认数量 / the Inbox/ folder until confirmed; they leave the Inbox when
confirmed or rejected. A few concurrency and move-atomicity edge cases remain open;
frontmatter and lock regressions found in review were fixed in 0.1.0 and are locked
by tests.vaultPath unset the plugin initializes
~/Documents/DSH Memory. Set it explicitly to keep test data isolated.| Doc | Contents |
|---|---|
| docs/architecture.md | Architecture, DSH API usage, prompt assembly |
| docs/storage-format.md | Markdown / frontmatter / index / journal formats |
| docs/privacy.md | Privacy and threat model |
| docs/compatibility.md | Compatibility contract and evidence |
| docs/qq-integration.md | QQ integration tab, official-plugin detection, memory linkage, vault/profile modes |
| docs/verification.md | Verification log and acceptance evidence |
| CHANGELOG.md | Release notes for every published version |
| docs/troubleshooting.md | Recovery and FAQ |
| docs/evidence/ | Screenshots and raw acceptance data |
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: memory。