{"_id":"@duke-dsh-plugins/dsh-memory-manager","_rev":"6-00f77e0cee922f6913a750252508285f","name":"@duke-dsh-plugins/dsh-memory-manager","dist-tags":{"latest":"1.4.2"},"versions":{"1.3.0":{"name":"@duke-dsh-plugins/dsh-memory-manager","version":"1.3.0","keywords":["dsh","deepseek-harness","plugin","memory"],"license":"MIT","_id":"@duke-dsh-plugins/dsh-memory-manager@1.3.0","maintainers":[{"name":"dukebywwh","email":"wwhbygx@sina.com"}],"homepage":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager","bugs":{"url":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web"}},"dist":{"shasum":"cbf0f057831428b8eb4a5bbdd790ee63e7050263","tarball":"https://registry.npmjs.org/@duke-dsh-plugins/dsh-memory-manager/-/dsh-memory-manager-1.3.0.tgz","fileCount":8,"integrity":"sha512-LiNtqjS9EFqDgPXKf1K8atHQOQQvHasVgrI12JTBksITBwd5yFnH91YTdx7SssDYcbdLuCnVKP0LU8ZIejFA3g==","signatures":[{"sig":"MEUCIA3RpYUPK5pOnCZ2BYKPKXgOqmm7lcTjlyyPc5Xpd+zDAiEAzXiqMbhM8y/jfe79WFIBQutSUHn5w+2BI3LNTL7pl1s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":121861},"main":"index.js","type":"module","exports":{".":"./index.js","./client":"./client.js","./typert":"./typert.host.js","./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"gitHead":"ba41973ac69b3222200c6749460546e99c40f11d","scripts":{"test":"node scripts/self-test.mjs","check":"node --check index.js && node --check client.js && node --check typert.host.js && node --check memory-core.mjs && node --check scripts/self-test.mjs"},"_npmUser":{"name":"dukebywwh","email":"wwhbygx@sina.com"},"repository":{"url":"git+https://github.com/MoonlitDropOfBlood/dsh-memory-manager.git","type":"git"},"_npmVersion":"11.17.0","description":"Persistent project memory for DeepSeek Harness, ported from ZCode: ZCode-style markdown memory store (per project + global) with a full memory-management page in Settings, index-first prompt injection, agent memory tools (memory_save / memory_get / memory","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^4.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"_npmOperationalInternal":{"tmp":"tmp/dsh-memory-manager_1.3.0_1787440115809_0.8496952012068033","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@duke-dsh-plugins/dsh-memory-manager","version":"1.3.1","keywords":["dsh","deepseek-harness","plugin","memory"],"license":"MIT","_id":"@duke-dsh-plugins/dsh-memory-manager@1.3.1","maintainers":[{"name":"dukebywwh","email":"wwhbygx@sina.com"}],"homepage":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager","bugs":{"url":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web"}},"dist":{"shasum":"1d801279976b0cd217b67ad02dcce94e42f65f58","tarball":"https://registry.npmjs.org/@duke-dsh-plugins/dsh-memory-manager/-/dsh-memory-manager-1.3.1.tgz","fileCount":8,"integrity":"sha512-w7NsUOC6/uziU1n1XcpjnS+kOi8PhyoXUhlNT1OPjLsr5mzuiRkGsuQ8MxjezazD7JVNn+Gv9kGkp613z3QPuw==","signatures":[{"sig":"MEUCIBBOKNTl0tCvXSrxj2Ohnlyp8FzGye0o5Oo2OupsIiprAiEAr41amyYGDPzL1MmQ+EZYi8k3iPrucuMtf2bZXRhfdZA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@duke-dsh-plugins%2fdsh-memory-manager@1.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":121879},"main":"index.js","type":"module","exports":{".":"./index.js","./client":"./client.js","./typert":"./typert.host.js","./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"gitHead":"8d95b2f99dde40decb287c794c41e755b6dc0a7a","scripts":{"test":"node scripts/self-test.mjs","check":"node --check index.js && node --check client.js && node --check typert.host.js && node --check memory-core.mjs && node --check scripts/self-test.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e7bb20fd-0625-435e-9aa4-9f8382848f0b"}},"repository":{"url":"git+https://github.com/MoonlitDropOfBlood/dsh-memory-manager.git","type":"git"},"_npmVersion":"11.17.0","description":"Persistent project memory for DeepSeek Harness, ported from ZCode: ZCode-style markdown memory store (per project + global) with a full memory-management page in Settings, index-first prompt injection, agent memory tools (memory_save / memory_get / memory","directories":{},"_nodeVersion":"24.19.0","dependencies":{"zod":"^4.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"_npmOperationalInternal":{"tmp":"tmp/dsh-memory-manager_1.3.1_1787442815164_0.9030042349438503","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@duke-dsh-plugins/dsh-memory-manager","version":"1.3.2","keywords":["dsh","deepseek-harness","plugin","memory"],"license":"MIT","_id":"@duke-dsh-plugins/dsh-memory-manager@1.3.2","maintainers":[{"name":"dukebywwh","email":"wwhbygx@sina.com"}],"homepage":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager","bugs":{"url":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web"}},"dist":{"shasum":"3a0b27ac108274ca602da08fa80191d18c6ac8eb","tarball":"https://registry.npmjs.org/@duke-dsh-plugins/dsh-memory-manager/-/dsh-memory-manager-1.3.2.tgz","fileCount":8,"integrity":"sha512-Ppwxz15oqKFk8FRfp6MfJsCKJjQdoleBrcYE8wv7aBg0e2TFTV51JEm1SHb4dKS0I9o+rnit/ZKadbb19MxZcA==","signatures":[{"sig":"MEUCIQDERMFQ1AxRZrZ6syMCwARJXdn2bGwGb+4YVp2aKC2JRgIgALweoSee/haVzSDGCqbk/tW4omfuYIlryOk0oHWQGts=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@duke-dsh-plugins%2fdsh-memory-manager@1.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":121897},"main":"index.js","type":"module","exports":{".":"./index.js","./client":"./client.js","./typert":"./typert.host.js","./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"gitHead":"718fb47a7b19147f5f8a9170ecacd3708ae8b4bc","scripts":{"test":"node scripts/self-test.mjs","check":"node --check index.js && node --check client.js && node --check typert.host.js && node --check memory-core.mjs && node --check scripts/self-test.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e7bb20fd-0625-435e-9aa4-9f8382848f0b"}},"repository":{"url":"git+https://github.com/MoonlitDropOfBlood/dsh-memory-manager.git","type":"git"},"_npmVersion":"11.17.0","description":"Persistent project memory for DeepSeek Harness, ported from ZCode: ZCode-style markdown memory store (per project + global) with a full memory-management page in Settings, index-first prompt injection, agent memory tools (memory_save / memory_get / memory","directories":{},"_nodeVersion":"24.19.0","dependencies":{"zod":"^4.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"_npmOperationalInternal":{"tmp":"tmp/dsh-memory-manager_1.3.2_1787443989663_0.1485643708154567","host":"s3://npm-registry-packages-npm-production"}},"1.3.3":{"name":"@duke-dsh-plugins/dsh-memory-manager","version":"1.3.3","keywords":["dsh","deepseek-harness","plugin","memory"],"license":"MIT","_id":"@duke-dsh-plugins/dsh-memory-manager@1.3.3","maintainers":[{"name":"dukebywwh","email":"wwhbygx@sina.com"}],"homepage":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager","bugs":{"url":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web"}},"dist":{"shasum":"5cf1b2ff55e8221340ec7179c6e34608637b7559","tarball":"https://registry.npmjs.org/@duke-dsh-plugins/dsh-memory-manager/-/dsh-memory-manager-1.3.3.tgz","fileCount":8,"integrity":"sha512-IPPspoXdKbYEA8dkwkVT1Im5iHWQs9e6bAlehgrGTQtIOpqwAaFPdUgof9N6oJEnkDWNOdd7fL7Ao5W9pIuB1A==","signatures":[{"sig":"MEUCIQCCwdyU4T4+VBpJ3Bz8yXj3C24Xm3TN8nsLTmS2c/KjUwIgdspKA2ufAVM4I1ZlOCaMZtUMU01CuWgpNIJI+mUy3PQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@duke-dsh-plugins%2fdsh-memory-manager@1.3.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":121915},"main":"index.js","type":"module","exports":{".":"./index.js","./client":"./client.js","./typert":"./typert.host.js","./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"gitHead":"6828583e6bd8b094eaef803a181977e132b202c6","scripts":{"test":"node scripts/self-test.mjs","check":"node --check index.js && node --check client.js && node --check typert.host.js && node --check memory-core.mjs && node --check scripts/self-test.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e7bb20fd-0625-435e-9aa4-9f8382848f0b"}},"repository":{"url":"git+https://github.com/MoonlitDropOfBlood/dsh-memory-manager.git","type":"git"},"_npmVersion":"11.17.0","description":"Persistent project memory for DeepSeek Harness, ported from ZCode: ZCode-style markdown memory store (per project + global) with a full memory-management page in Settings, index-first prompt injection, agent memory tools (memory_save / memory_get / memory","directories":{},"_nodeVersion":"24.19.0","dependencies":{"zod":"^4.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"_npmOperationalInternal":{"tmp":"tmp/dsh-memory-manager_1.3.3_1787444301156_0.15345107041536976","host":"s3://npm-registry-packages-npm-production"}},"1.4.1":{"name":"@duke-dsh-plugins/dsh-memory-manager","version":"1.4.1","keywords":["dsh","deepseek-harness","plugin","memory"],"license":"MIT","_id":"@duke-dsh-plugins/dsh-memory-manager@1.4.1","maintainers":[{"name":"dukebywwh","email":"wwhbygx@sina.com"}],"homepage":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager","bugs":{"url":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web"}},"dist":{"shasum":"35b3ad27972cd9bd4cca73b650980424d3059abc","tarball":"https://registry.npmjs.org/@duke-dsh-plugins/dsh-memory-manager/-/dsh-memory-manager-1.4.1.tgz","fileCount":8,"integrity":"sha512-lSAE/k2A6MRoCK4Uv6j+MK1OSr0JgYMErdqqSlJBMhingWAuefr+JZYgTHrUQpO9jK5BGzgJzCIJPy5Qy6IYsA==","signatures":[{"sig":"MEYCIQCISt8IrpULTWHpKjDtd+6PGjNlyvAMKkzqHz17HGu/5wIhAIgDHXWnwwD+I8T0PhkfJP+g6soYPHlJBHEYs5JLrFTs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIFud1sl2UQiUEW9UlZHXfCISRmaVLaFKDeL1pieHDFu4AiBmXKgMLinxXk8pBocUVE5y+/8lyKq4Kax7imc1ny68jw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@duke-dsh-plugins%2fdsh-memory-manager@1.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":123327},"main":"index.js","type":"module","engines":{"dsh":"^0.1.0-rc.7"},"exports":{".":"./index.js","./client":"./client.js","./typert":"./typert.host.js","./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"gitHead":"d12874a3459f997c8d9a1682d66b20f785769206","scripts":{"test":"node scripts/self-test.mjs && node scripts/test-typert-contract.mjs","check":"node --check index.js && node --check client.js && node --check typert.host.js && node --check memory-core.mjs && node --check scripts/self-test.mjs && node --check scripts/test-typert-contract.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e7bb20fd-0625-435e-9aa4-9f8382848f0b"}},"repository":{"url":"git+https://github.com/MoonlitDropOfBlood/dsh-memory-manager.git","type":"git"},"_npmVersion":"11.19.0","description":"Persistent project memory for DeepSeek Harness, ported from ZCode: ZCode-style markdown memory store (per project + global) with a full memory-management page in Settings, index-first prompt injection, agent memory tools (memory_save / memory_get / memory","directories":{},"_nodeVersion":"24.21.0","dependencies":{"zod":"^4.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.1.7-rc.1","@deepseek-ai/dsh-typert-protocol":"^0.1.7-rc.1"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"_npmOperationalInternal":{"tmp":"tmp/dsh-memory-manager_1.4.1_1790407135150_0.9473522567931449","host":"s3://npm-registry-packages-npm-production"}},"1.4.2":{"_id":"@duke-dsh-plugins/dsh-memory-manager@1.4.2","dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web"}},"bugs":{"url":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager/issues"},"dist":{"shasum":"9f1a46c19da702d1481d2fb3ffa63aa4daa9b647","tarball":"https://registry.npmjs.org/@duke-dsh-plugins/dsh-memory-manager/-/dsh-memory-manager-1.4.2.tgz","fileCount":8,"integrity":"sha512-xBc1FmUdpCp4HvY5COGd+/hZ6LGdg/duxRvMVjEzeF2ctiWxBW8UXkRyz/24VlfFrrq7FjHeUJdDeZNHIxcAHg==","signatures":[{"sig":"MEQCIA2sp6obVF2aF7HrK5C/4lwYV6UoLwWUfHv87Dv52ejQAiADc1XWguftJikJ5ymD7TcLlF4q80N8NOylBDjQJkaLDw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGEf5HheoZk+6k94qry5rUh/6RZGwQ1k97H03pqsNgWfAiBWJqFKSsXMnTbbY1Es7hPRnC+sLeRWqf6AVpCfjoR1ZA=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@duke-dsh-plugins%2fdsh-memory-manager@1.4.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":123944},"main":"index.js","name":"@duke-dsh-plugins/dsh-memory-manager","type":"module","engines":{"dsh":"^0.1.0-rc.7 || ^0.2.0-rc.1"},"exports":{".":"./index.js","./client":"./client.js","./typert":"./typert.host.js","./package.json":"./package.json","./cordis.patch.yml":"./cordis.patch.yml"},"gitHead":"2ac59cb913526f639d2a759c20826cc64cc10fad","license":"MIT","scripts":{"e2e":"node verify-real-install.mjs","test":"node scripts/self-test.mjs && node scripts/test-typert-contract.mjs","check":"node --check index.js && node --check client.js && node --check typert.host.js && node --check memory-core.mjs && node --check scripts/self-test.mjs && node --check scripts/test-typert-contract.mjs && node --check verify-real-install.mjs"},"version":"1.4.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"e7bb20fd-0625-435e-9aa4-9f8382848f0b"}},"homepage":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager","keywords":["dsh","deepseek-harness","plugin","memory"],"repository":{"url":"git+https://github.com/MoonlitDropOfBlood/dsh-memory-manager.git","type":"git"},"_npmVersion":"11.19.0","description":"Persistent project memory for DeepSeek Harness, ported from ZCode: ZCode-style markdown memory store (per project + global) with a full memory-management page in Settings, index-first prompt injection, agent memory tools (memory_save / memory_get / memory","directories":{},"maintainers":[{"name":"dukebywwh","email":"wwhbygx@sina.com"}],"_nodeVersion":"24.21.0","dependencies":{"zod":"^4.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.2.0-rc.1","@deepseek-ai/dsh-typert-protocol":"^0.2.0-rc.1"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7 || ^0.2.0-rc.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-memory-manager_1.4.2_1790641826083_0.6640674567752722"}}},"time":{"created":"2026-08-22T23:08:35.665Z","modified":"2026-09-29T00:30:26.520Z","1.3.0":"2026-08-22T23:08:35.947Z","1.3.1":"2026-08-22T23:53:35.305Z","1.3.2":"2026-08-23T00:13:09.819Z","1.3.3":"2026-08-23T00:18:21.294Z","1.4.1":"2026-09-26T07:18:55.227Z","1.4.2":"2026-09-29T00:30:26.156Z"},"bugs":{"url":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager/issues"},"license":"MIT","homepage":"https://github.com/MoonlitDropOfBlood/dsh-memory-manager","keywords":["dsh","deepseek-harness","plugin","memory"],"repository":{"url":"git+https://github.com/MoonlitDropOfBlood/dsh-memory-manager.git","type":"git"},"description":"Persistent project memory for DeepSeek Harness, ported from ZCode: ZCode-style markdown memory store (per project + global) with a full memory-management page in Settings, index-first prompt injection, agent memory tools (memory_save / memory_get / memory","maintainers":[{"name":"dukebywwh","email":"wwhbygx@sina.com"}],"readme":"<p align=\"center\">\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"120\" height=\"120\" viewBox=\"0 0 14 14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" color=\"#4D6BFE\"><rect x=\"1\" y=\"2.5\" width=\"12\" height=\"9.5\" rx=\"1.2\"/><path d=\"M4 5.5h6M4 7.5h4\"/></svg>\n</p>\n\n<h3 align=\"center\">DeepSeek Harness 记忆管理插件</h3>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/badge/DSH-Plugin-4D6BFE?style=flat\" alt=\"DSH plugin\">\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-2EA44F?style=flat\" alt=\"MIT License\"></a>\n  <img src=\"https://img.shields.io/badge/Web%20UI-Yes-22C55E?style=flat\" alt=\"Web UI\">\n</p>\n\n<p align=\"center\"><sub>中文</sub></p>\n\n---\n\n为 [DeepSeek Harness（DSH）](https://github.com/deepseek-ai/deepseek-harness) Web UI 打造的**持久化记忆**插件，移植自 **ZCode 的项目记忆（Memory）**：按项目（工作区）保存结构化记忆，并在**设置**里提供完整的记忆管理页面。\n\n记忆以 ZCode 同款 Markdown 格式落盘（`<DSH_HOME>/memories/projects/<project>/memory/*.md`，含 `MEMORY.md` 索引与 `memory_summary.md` 摘要），并支持**一键从 ZCode 记忆目录导入**，把 ZCode 里积累的用户偏好 / 反馈 / 技术参考直接搬进 DSH。\n\n## 功能\n\n| 功能 | 说明 |\n|---|---|\n| 🧠 ZCode 记忆移植 | 沿用 ZCode 的记忆文件格式（YAML frontmatter + 正文）、类型体系（user / feedback / reference / project / other）与按项目分目录的存储布局 |\n| ⚙️ 设置中的记忆管理 | 设置面板新增 **记忆管理** 页：搜索、项目/类型筛选、按项目分组、新建 / 编辑 / 删除（二次确认）/ 查看正文 |\n| 🔄 自动加载到对话 | 每次模型调用自动把「当前项目 + 全局」的记忆**索引**（名称 + 描述）作为系统提示注入给智能体，省上下文；也可切换为附带正文截断的旧模式 |\n| 🤖 Agent 记忆工具 | 注册 `memory_save` / `memory_get` / `memory_list` 三个模型工具：agent 可按需读取记忆全文、跨项目搜索，并在发现用户偏好 / 纠正 / 项目约定时**自己回写记忆**（同名即更新，`origin: agent`） |\n| 📥 从 ZCode 导入 | 一键扫描 `~/.zcode/cli/memories`（`memory/` + `topics/`），按项目 + 名称去重，不覆盖已有记忆 |\n| 🌐 全局 + 项目记忆 | `global` 项目存放跨项目记忆；项目 key 取自工作区路径名，自动清洗为安全片段 |\n| 📄 自动索引 | 每次变更自动重写 `MEMORY.md` 索引与 `memory_summary.md` 摘要 |\n| 🌗 主题适配 | 全部使用 DSH 设计 token（按钮为官方 DSH Button 组件），明暗主题自动跟随 |\n\n## 安装\n\n### 标准安装（推荐）\n\n本插件是**标准 DSH bundle**：`package.json` 声明 `dsh.bundle.patch`，包内自带 `cordis.patch.yml`，用官方 `dsh plugin` 命令安装：\n\n```bash\n# 本地开发：pnpm 软链到本仓库，改代码即生效（无需重新复制）\ndsh plugin --profile web add /path/to/dsh-memory-manager\n\n# 正式发布：从 GitHub Release tarball 安装\ndsh plugin --profile web add https://github.com/MoonlitDropOfBlood/dsh-memory-manager/releases/download/v1.2.0/dsh-memory-manager-1.2.0.tgz\n```\n\n重启 DSH 后，打开 **设置 → 记忆管理** 即可使用。\n\n> `dsh plugin add` 把插件装成 profile 的 npm 依赖并追加到 `dsh.profile.bundles`，启动时 DSH 自动应用包内的 `cordis.patch.yml` 挂载插件。卸载：`dsh plugin --profile web remove dsh-memory-manager`。\n\n### 宿主兼容性\n\n支持 **DSH 0.1.0-rc.7 ~ 0.2.0-rc.x**（`engines.dsh: ^0.1.0-rc.7 || ^0.2.0-rc.1`，已在本机 0.2.0-rc.1 宿主端到端验证）。DSH 0.2.0 起宿主会在启动时按 `peerDependencies` 的 `@deepseek-ai/dsh*` 声明做兼容预检，范围不满足的 bundle 会被静默跳过——如果升级宿主后插件消失，先确认版本声明覆盖了新宿主，再跑 `npm run e2e`（对真实安装验证闸门、Host 激活、CRUD、TypertRegistry 与 client bundle）。\n\n## 使用\n\n1. 打开 **设置**，侧栏出现 **记忆管理** 页。\n2. 列表按项目分组、最新优先；顶部可**搜索**（名称/描述）、按**项目**和**类型**筛选；卡片展示类型徽章与更新时间。\n3. **自动加载记忆到对话上下文**：默认开启。每次模型调用，DSH 会把当前会话工作区项目的记忆 + 全局记忆的**索引**（名称 + 描述，不含正文）作为系统提示注入给智能体，agent 对某条感兴趣时自行用 `memory_get` 工具读取全文——比全量注入省一个量级的上下文。需要旧行为（每条附带 400 字正文截断）可在记忆管理页打开「注入记忆正文」。\n4. **Agent 回写记忆**：agent 在对话中发现值得长期保留的用户偏好、纠正/反馈、项目约定时，会自己调用 `memory_save` 写入记忆（`origin: agent`），之后每轮索引自动带上它。也可在记忆管理页看到、编辑或删除这些记忆。\n5. **新建记忆**：填写名称（建议短横线 slug，可含中文）、类型、项目（`global` = 全局，或某个项目名，可参考工作区建议）、描述与 Markdown 正文。\n6. **编辑 / 查看 / 删除**：每行右侧操作；删除需二次确认（永久，不可恢复）。\n7. **从 ZCode 导入**：一键导入 `~/.zcode/cli/memories` 下各项目的记忆，同名自动跳过，结束后展示每个项目的导入/跳过统计。\n\n## 工作原理\n\n```\nDSH Web UI\n  └─ client.js (window.__ModuleLoader__.load bundle)\n       └─ settings.section 注册「记忆管理」页\n            └─ ctx.remote.memoryManager.{list|get|create|update|delete|importZCode|getConfig|setConfig}\n                 └─ index.js (MemoryService, TypertRemoteService)\n                      ├─ systemPrompt.section（order 90）→ 每次模型调用注入「记忆索引」段落\n                      │    └─ context.agent.session.header.cwd → 项目 key → 项目 + 全局记忆索引（同步渲染，进程内缓存）\n                      ├─ ctx.tools.register → memory_save / memory_get / memory_list（agent 回写与按需读取）\n                      │    └─ systemPrompt.section（order 100）→ 工具使用指引\n                      └─ memory-core.mjs（node:fs 直接读写）\n                           ├─ <DSH_HOME>/memories/projects/<p>/memory/<name>.md\n                           ├─ <DSH_HOME>/memories/projects/<p>/MEMORY.md\n                           ├─ <DSH_HOME>/memories/projects/<p>/memory_summary.md\n                           └─ <DSH_HOME>/memories/config.json（autoLoad / injectBody 开关）\n```\n\n记忆存储走 `node:fs` 直接落在 `<DSH_HOME>/memories/`（与 DSH 核心写 `~/.dsh` 的方式一致），无需 shell 沙箱。\n\n## 目录结构\n\n```\ndsh-memory-manager/\n├── index.js            # Host 半：MemoryService（Remote 服务）\n├── client.js           # Client 半：设置「记忆管理」页 UI bundle\n├── typert.host.js      # Typert Host manifest（Remote 方法描述）\n├── memory-core.mjs     # 共享记忆核心（frontmatter / 存储 / 索引 / ZCode 导入），零依赖\n├── cordis.patch.yml    # dsh bundle patch（挂载行）\n├── scripts/self-test.mjs # 独立核心自测（无需 DSH 进程）\n├── .github/workflows/  # GitHub Actions 发布\n├── AGENTS.md           # 面向 AI agent 的开发指南（含踩坑）\n└── LICENSE             # MIT\n```\n\n## 开发\n\n```bash\nnpm run check           # 全文件语法检查\nnpm test                # 独立核心自测（临时目录 CRUD / 索引 / ZCode 导入）\ndsh plugin --profile web add /path/to/dsh-memory-manager   # 安装/重装到本机 DSH profile\n```\n\n详见 [AGENTS.md](AGENTS.md)——记录了 DSH 正式插件（Host/Client/Typert 三件套）的完整机制和踩坑。\n\n## License\n\n本项目遵循 [MIT License](LICENSE)。\n\n> 本项目是基于 DeepSeek Harness 构建的社区插件，并非 DeepSeek 官方产品。记忆格式移植自 ZCode 的项目记忆设计。\n","readmeFilename":"README.md"}