给你的 Harness 一棵会生长的记忆树A growing memory tree for your Harness
dsh-memlite 把 memlite 的因果树记忆装进 DeepSeek Harness:每轮 agent/pre-step 同步召回,标题级记忆以 source=memlite 的 user 消息追加——不占 tool 调用;规则 section 恒定注入。侧栏「插件」里还有完整的图形配置页。数据落本地 JSONL,与 Rust memlite 双向互通。dsh-memlite brings memlite's causal-tree memory into DeepSeek Harness: synchronous recall in agent/pre-step appends title-level memories as source=memlite user messages — no tool calls — while a static rules section is always injected. A full GUI settings page ships in Sidebar → Plugins. Data stays as local JSONL and interoperates with Rust memlite.
召回发生在 agent/pre-step,用预算/阈值裁到标题级后作为 user 消息追加,不占 tool 调用;memlite:rules(order 850)恒定注入 9 条行为契约。turn-stopping 每轮最多一次收尾提醒,不查库。Recall runs in agent/pre-step, trimmed by budget/threshold to title level and appended as a user message — no tool call. memlite:rules (order 850) always injects the 9 behavior rules. turn-stopping nudges at most once per turn and never reads the store.
Synchronous recall in agent/pre-step: trimmed by count/threshold/char budget to title level and appended as a source=memlite user message — zero tool calls. Expand bodies on demand with memlite_show.
Memories form parent-child chains: parent = cause, child = effect. Hits show their causes and effects; cycles capped at 64 levels; /memlite-chain retrieves a whole chain.
Sidebar → Plugins → the Memlite Memory row → Configure. The plugin ships its own browser half: the form stages a draft, shows effective values, and only Save writes the profile's cordis.patch.yml. Recall parameters apply live; directory/embedding/sync changes rebuild the engine.
Pre-write scan for plaintext passwords, API keys, ID numbers, bank cards (Luhn), phone numbers, JWT, PEM keys — hits are rejected with a pointer suggestion.
The Obsidian bridge in the settings page previews/imports a vault, exports the library as a vault, and checks synced/outdated/missing states; /memlite-import and /memlite-export do the same. One-way tools, not two-way sync.
Storage is plain memory.jsonl + an emb.f32 sidecar — libraries written by the Rust memlite CLI read directly in the plugin and vice versa. One memory, shared across CLI, Harness, and future Kimi/ZCode plugins.
Sidebar → Plugins → the Memlite Memory row → Configure: the plugin ships its own browser half; the form stages a draft, shows effective values, and only Save writes to the profile's cordis.patch.yml. Keys live in credentials, never in config files or the data store.
字段
Field
默认
Default
说明
Notes
enabled
true
总开关;关闭后立即停注入/召回/提醒,工具与命令回执拒绝
Master switch; disables rules, recall, nudges, tools and commands immediately
表单只投影 volatile 配置:根 Config 声明 .volatile(),保存不重挂插件——召回参数下一次调用即生效,dataDir/embedding/sync/sensitiveGate 变化由插件重建记忆引擎。密钥只存 DSH credentials(credentialRef),绝不写入配置文件或数据仓。The form projects only volatile config: the root Config declares .volatile(), so saving never remounts the plugin — recall parameters take effect on the next call, while dataDir/embedding/sync/sensitiveGate changes rebuild the memory engine. Keys live only in DSH credentials (credentialRef), never in config files or the data store.
展示名称来自包内 locale/zh.json / locale/en.json 的 meta.title「Memlite 记忆」/「Memlite Memory」;缺失时回退 package.json 的 name/description,再回退完整包名。改展示名只需改 locale JSON 并重启该插件行。Display name comes from meta.title in locale/zh.json / locale/en.json ("Memlite 记忆" / "Memlite Memory"); missing fields fall back to package.jsonname/description, then the full package name. Renaming only needs a locale JSON edit and a row restart.
嵌入三档:none(默认,纯 BM25 零外网)→ openai-compatible(独立嵌入服务,密钥走 credentials)→ host 在 DSH 0.2.x 暂不可用(宿主无 embeddings API,插件加载时告警并自动回退 BM25——明示降级,不静默)。Three embedding tiers: none (default, pure BM25, zero network) → openai-compatible (dedicated service, key via credentials) → host is unavailable on DSH 0.2.x (no embeddings API; the plugin warns and falls back to BM25 — explicit, not silent).
Obsidian 桥(GUI):同一配置页可直接预览/导入 vault、把记忆库导出为 vault、检查 synced/outdated/missing。路径是主机上的路径(支持 ~);请求走 /api/memlite/obsidian/{import,export,status},由 DSH connection 服务完成浏览器认证与 Host/Origin 信任栅栏,仅 owner Peer 可用;同一时刻只允许一个导入/导出任务。Obsidian bridge (GUI): the same settings page previews/imports a vault, exports the library as a vault, and checks synced/outdated/missing states. Paths are on the host (with ~ expansion); requests go to /api/memlite/obsidian/{import,export,status}, authenticated and Host/Origin-fenced by DSH's connection service for the owner Peer only; one import/export task at a time.
Record a cause, append an effect — next time a related conversation starts, the memory is already in the prompt.
060.3.1 实测记06Field notes
从 0.1.0 的 API 漂移,到 0.3.1 的 GUI 配置页与展示名——每一条都先在真机坐实,再回写代码与文档。
From the 0.1.0 API drifts to the 0.3.1 GUI settings page and display name — every item was confirmed on a real host before being written back into code and docs.
GUI 配置页GUI settings page真机用 UI 自动化验证:把 recallLimit 改成 6 保存,profile 的 cordis.patch.yml 出现 - id: memlite / config: recallLimit: 6;改回 5 保存,覆盖被 unset 移除。verified with UI automation: setting recallLimit to 6 wrote - id: memlite / config: recallLimit: 6 into the profile's cordis.patch.yml; setting it back to 5 removed the override via unset.
volatile 投影Volatile projectionsettings 只投影 .volatile() 字段,且同一 schema 内不允许嵌套 volatile——所以根 Config 整体 volatile,插件按次读快照。settings projects only .volatile() fields and forbids nested volatile inside one schema — so the root Config is volatile and the plugin reads a snapshot per call.
展示名称Display name来自 locale/<lang>.json 的 meta.title/meta.description;包有 exports 时必须导出 ./locale/*.json,否则静默回退包名。bundle 卡片与行共用同一份 meta。comes from meta.title/meta.description in locale/<lang>.json; when the package declares exports, ./locale/*.json must be exported or it silently falls back to the package name. Bundle cards and rows share the same meta.
重载方式Reloading a row本 profile 下 set_plugin 对 bundle 内行返回 overridden 且不生效;用 set_bundle 关/开组合包,行才会重启并重读 manifest 与客户端 bundle。on this profile set_plugin reports overridden for a row inside a bundle and does nothing; toggling the bundle with set_bundle restarts the row and re-reads its manifest and client bundle.
AssembleContext类型面无 agent 字段,运行时实传 {agent, scope, signal}——防御性读取。has no agent field in types, but the runtime passes {agent, scope, signal} — read defensively.
无 providers 服务No providers service——dsh-llm 只有 chat,无 embeddings;host 档明示回退。— dsh-llm is chat-only; the host tier falls back explicitly.
COMMAND_NAME单 token 正则——命令名含空格注册即拒。is a single-token regex — spaced names are rejected at registration.