dsh-mnemon 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/README.zh-CN.md +4 -4
- package/lib/index.js +10 -3
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<p align="center"><strong>English</strong> · <a href="./README.zh-CN.md">简体中文</a></p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<img src="https://img.shields.io/badge/release-v0.2.
|
|
6
|
+
<img src="https://img.shields.io/badge/release-v0.2.1-5b5bd6" alt="release v0.2.1">
|
|
7
7
|
<img src="https://img.shields.io/badge/memory-3%20tiers-087c5b" alt="three memory tiers">
|
|
8
8
|
<img src="https://img.shields.io/badge/providers-9-c66a09" alt="nine providers">
|
|
9
9
|
<img src="https://img.shields.io/badge/Node.js-%E2%89%A520-43853d" alt="Node.js 20 or newer">
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
17
|
<a href="https://github.com/omdsh-dev/dsh-mnemon/blob/e6ca446e45bdd17991f3c7c98560456de465282b/docs/assets/media/dsh-mnemon-memory-system-demo.mp4">
|
|
18
|
-
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-mnemon/
|
|
18
|
+
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-mnemon/9196fd9991676a6bd9a84d615fcd301eb52e872a/docs/assets/media/dsh-mnemon-memory-system-demo-poster.jpg" alt="dsh-mnemon v0.2.0 live multi-memory snapshot and observable provider surfaces" width="1180">
|
|
19
19
|
</a>
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
22
|
<p align="center">
|
|
23
23
|
<a href="./docs/en/capabilities.md"><strong>Explore the capability map</strong></a> ·
|
|
24
24
|
<a href="./docs/en/getting-started.md">Start in five minutes</a> ·
|
|
25
|
-
<a href="./docs/en/releases/v0.2.
|
|
25
|
+
<a href="./docs/en/releases/v0.2.1.md">Read the v0.2.1 notes</a> ·
|
|
26
26
|
<a href="https://github.com/omdsh-dev/dsh-mnemon/blob/e6ca446e45bdd17991f3c7c98560456de465282b/docs/assets/media/dsh-mnemon-memory-system-demo.mp4">Watch the widescreen demo</a>
|
|
27
27
|
</p>
|
|
28
28
|
|
|
@@ -190,7 +190,7 @@ See [Operations, security, and troubleshooting](./docs/en/operations.md) for bac
|
|
|
190
190
|
| Configure scope, routing, and model selection | [Configuration](./docs/en/configuration.md) |
|
|
191
191
|
| Back up, update, or troubleshoot | [Operations](./docs/en/operations.md) |
|
|
192
192
|
| Integrate tools, commands, or RPC | [Interface reference](./docs/en/interfaces.md) |
|
|
193
|
-
| Review the release | [v0.2.
|
|
193
|
+
| Review the release | [v0.2.1 release notes](./docs/en/releases/v0.2.1.md) |
|
|
194
194
|
|
|
195
195
|
See the [documentation hub](./docs/en/README.md) for the full map.
|
|
196
196
|
|
package/README.zh-CN.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<p align="center"><a href="./README.md">English</a> · <strong>简体中文</strong></p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<img src="https://img.shields.io/badge/release-v0.2.
|
|
6
|
+
<img src="https://img.shields.io/badge/release-v0.2.1-5b5bd6" alt="发布版本 v0.2.1">
|
|
7
7
|
<img src="https://img.shields.io/badge/%E8%AE%B0%E5%BF%86-3%20%E5%B1%82-087c5b" alt="三层记忆">
|
|
8
8
|
<img src="https://img.shields.io/badge/Provider-9-c66a09" alt="九种 Provider">
|
|
9
9
|
<img src="https://img.shields.io/badge/Node.js-%E2%89%A520-43853d" alt="Node.js 20 或更新版本">
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
17
|
<a href="https://github.com/omdsh-dev/dsh-mnemon/blob/e6ca446e45bdd17991f3c7c98560456de465282b/docs/assets/media/dsh-mnemon-memory-system-demo.mp4">
|
|
18
|
-
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-mnemon/
|
|
18
|
+
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-mnemon/9196fd9991676a6bd9a84d615fcd301eb52e872a/docs/assets/media/dsh-mnemon-memory-system-demo-poster.jpg" alt="dsh-mnemon v0.2.0 多记忆体实时快照与 Provider 可观察范围" width="1180">
|
|
19
19
|
</a>
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
22
|
<p align="center">
|
|
23
23
|
<a href="./docs/zh-CN/capabilities.md"><strong>先看能力地图</strong></a> ·
|
|
24
24
|
<a href="./docs/zh-CN/getting-started.md">5 分钟开始</a> ·
|
|
25
|
-
<a href="./docs/zh-CN/releases/v0.2.
|
|
25
|
+
<a href="./docs/zh-CN/releases/v0.2.1.md">v0.2.1 升级说明</a> ·
|
|
26
26
|
<a href="https://github.com/omdsh-dev/dsh-mnemon/blob/e6ca446e45bdd17991f3c7c98560456de465282b/docs/assets/media/dsh-mnemon-memory-system-demo.mp4">观看宽屏实机演示</a>
|
|
27
27
|
</p>
|
|
28
28
|
|
|
@@ -190,7 +190,7 @@ dsh plugin --profile headless add "link:/absolute/path/to/dsh-mnemon"
|
|
|
190
190
|
| 配置范围、路由与模型 | [配置参考](./docs/zh-CN/configuration.md) |
|
|
191
191
|
| 备份、更新或排障 | [运维指南](./docs/zh-CN/operations.md) |
|
|
192
192
|
| 接入工具、命令或 RPC | [接口参考](./docs/zh-CN/interfaces.md) |
|
|
193
|
-
| 查看本次升级 | [v0.2.
|
|
193
|
+
| 查看本次升级 | [v0.2.1 发布说明](./docs/zh-CN/releases/v0.2.1.md) |
|
|
194
194
|
|
|
195
195
|
完整目录见[文档中心](./docs/zh-CN/README.md)。
|
|
196
196
|
|
package/lib/index.js
CHANGED
|
@@ -896,12 +896,17 @@ var DocumentManager = class {
|
|
|
896
896
|
const GUIDANCE_SECTION_NAME = "mnemon:routing";
|
|
897
897
|
const RUNTIME_MEMORY_SECTION_NAME = "mnemon:runtime-memory";
|
|
898
898
|
const ROUTING_GUIDANCE = "Use memory only by need. For substantial project records, search active Mnemon Documents before deep recall. Call mnemon_recall when durable history may matter or an exact prior detail is missing; never infer a missing historical rule. New explicit reusable facts normally go to mnemon_runtime_memory. A write completes only with a tool receipt.";
|
|
899
|
+
const RUNTIME_MEMORY_EMPTY_BRACES_VARIABLE = "mnemon_runtime_memory_empty_braces";
|
|
900
|
+
const LITERAL_EMPTY_BRACES = "{{}}";
|
|
899
901
|
function systemPrompt(ctx) {
|
|
900
902
|
return ctx.get("systemPrompt");
|
|
901
903
|
}
|
|
902
904
|
function scopedSystemPrompt(agent) {
|
|
903
905
|
return agent.ctx.get?.("systemPrompt");
|
|
904
906
|
}
|
|
907
|
+
function runtimeMemoryPromptText(runtimeMemory) {
|
|
908
|
+
return runtimeMemory.contextText().replaceAll(LITERAL_EMPTY_BRACES, `{{${RUNTIME_MEMORY_EMPTY_BRACES_VARIABLE}}}`);
|
|
909
|
+
}
|
|
905
910
|
function registerGuidance(ctx, config) {
|
|
906
911
|
systemPrompt(ctx)?.section?.({
|
|
907
912
|
name: GUIDANCE_SECTION_NAME,
|
|
@@ -911,10 +916,12 @@ function registerGuidance(ctx, config) {
|
|
|
911
916
|
}
|
|
912
917
|
/** Inject the latest committed USER.md/MEMORY.md projections on every prompt assembly. */
|
|
913
918
|
function registerRuntimeMemoryContext(ctx, runtimeMemory) {
|
|
914
|
-
systemPrompt(ctx)
|
|
919
|
+
const prompt = systemPrompt(ctx);
|
|
920
|
+
prompt?.variable?.(RUNTIME_MEMORY_EMPTY_BRACES_VARIABLE, () => LITERAL_EMPTY_BRACES);
|
|
921
|
+
prompt?.section?.({
|
|
915
922
|
name: RUNTIME_MEMORY_SECTION_NAME,
|
|
916
923
|
order: 145,
|
|
917
|
-
text: () => runtimeMemory
|
|
924
|
+
text: () => runtimeMemoryPromptText(runtimeMemory)
|
|
918
925
|
});
|
|
919
926
|
}
|
|
920
927
|
/** Shadow the global fallback with the current Agent workspace's hot memory. */
|
|
@@ -922,7 +929,7 @@ function registerAgentRuntimeMemoryContext(agent, runtimeMemory) {
|
|
|
922
929
|
const dispose = scopedSystemPrompt(agent)?.section?.({
|
|
923
930
|
name: RUNTIME_MEMORY_SECTION_NAME,
|
|
924
931
|
order: 145,
|
|
925
|
-
text: () => runtimeMemory()
|
|
932
|
+
text: () => runtimeMemoryPromptText(runtimeMemory())
|
|
926
933
|
});
|
|
927
934
|
return typeof dispose === "function" ? dispose : () => {};
|
|
928
935
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Three-tier memory system for DeepSeek Harness with nine pluggable providers, smart routing, independent task Agents, WebUI, and headless tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -134,6 +134,7 @@
|
|
|
134
134
|
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6",
|
|
135
135
|
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6",
|
|
136
136
|
"@deepseek-ai/dsh-client-ui-tool": "0.1.0-rc.6",
|
|
137
|
+
"@deepseek-ai/dsh-system-prompt": "0.1.0-rc.6",
|
|
137
138
|
"@testing-library/react": "^16.3.0",
|
|
138
139
|
"@types/node": "^22.0.0",
|
|
139
140
|
"@types/react": "^18.3.0",
|