sage-mem 0.6.0 → 0.6.2
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 +9 -8
- package/lib/client.js +8 -8
- package/lib/dream-audit.js +211 -211
- package/lib/dream-prompt.js +121 -123
- package/lib/dream-tools.js +365 -366
- package/lib/dream.js +886 -887
- package/lib/index.js +4 -3
- package/package.json +87 -86
package/lib/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* sage-mem —
|
|
2
|
+
* sage-mem — 文件式记忆插件。
|
|
3
3
|
*
|
|
4
4
|
* 记忆存在本地 markdown 文件目录(frontmatter + 正文,4 类),不是数据库。
|
|
5
|
-
* host
|
|
5
|
+
* host 侧三件事:
|
|
6
6
|
* 1. 按问题检索注入:system-prompt/assemble 时扫 memory 目录,按双字匹配
|
|
7
7
|
* 选相关文件,读全文注入 system prompt,让 agent 第一轮就「想起」
|
|
8
8
|
* 2. TypertRemoteService:给设置页「记忆管理」提供文件列表/读/写/删
|
|
9
|
+
* 3. dream(做梦):可选的记忆整理,见 lib/dream.js
|
|
9
10
|
*
|
|
10
11
|
* 写入靠 AGENTS.md 的「记忆使用」规则引导 agent 自己判断 + 用文件工具写
|
|
11
12
|
* memory 目录——透明、可检查、防膨胀。无 worker、无 SQLite、无端口。
|
|
@@ -609,7 +610,7 @@ markRemote(StarmapGateway, 'listStars', 'listStars')
|
|
|
609
610
|
markRemote(StarmapGateway, 'readFile', 'readFile')
|
|
610
611
|
|
|
611
612
|
/**
|
|
612
|
-
* dream 的 remote
|
|
613
|
+
* dream 的 remote 面:设置页「做梦」标签页唯一的数据通道。
|
|
613
614
|
*
|
|
614
615
|
* 这一层刻意很薄——全部判断(门控、模式、白名单)都在 DreamEngine 里,
|
|
615
616
|
* 这里只负责把 ctx 里的引擎接到 typert 的调用表上。想看行为就读 dream.js。
|
package/package.json
CHANGED
|
@@ -1,86 +1,87 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sage-mem",
|
|
3
|
-
"description": "File-based memory plugin for DeepSeek Harness (DSH) — cross-session memory in transparent markdown files, with a memory star-map view, type/tag filtering, and an optional
|
|
4
|
-
"version": "0.6.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./lib/index.js",
|
|
9
|
-
"./client": "./lib/client.js",
|
|
10
|
-
"./typert": "./lib/typert.host.js",
|
|
11
|
-
"./package.json": "./package.json"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"lib/",
|
|
15
|
-
"cordis.patch.yml",
|
|
16
|
-
"NOTICE"
|
|
17
|
-
],
|
|
18
|
-
"license": "Apache-2.0",
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=18"
|
|
21
|
-
},
|
|
22
|
-
"dsh": {
|
|
23
|
-
"bundle": {
|
|
24
|
-
"patch": "./cordis.patch.yml"
|
|
25
|
-
},
|
|
26
|
-
"client": {
|
|
27
|
-
"platform": "web",
|
|
28
|
-
"inject": [
|
|
29
|
-
"@deepseek-ai/dsh-client-locale"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"compatibility": {
|
|
33
|
-
"dsh": ">=0.1.2-rc.1",
|
|
34
|
-
"dshReleases": {
|
|
35
|
-
"0.1.2-rc.1": "compatible",
|
|
36
|
-
"0.1.3-alpha.1": "compatible",
|
|
37
|
-
"0.1.3-alpha.2": "compatible",
|
|
38
|
-
"0.1.5-rc.1": "compatible",
|
|
39
|
-
"0.1.6-alpha.1": "compatible",
|
|
40
|
-
"0.1.6-alpha.2": "compatible",
|
|
41
|
-
"0.1.7-rc.1": "compatible",
|
|
42
|
-
"0.1.7-rc.2": "compatible"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"@deepseek-ai/
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"dsh
|
|
77
|
-
"
|
|
78
|
-
"deepseek
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"agent",
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "sage-mem",
|
|
3
|
+
"description": "File-based memory plugin for DeepSeek Harness (DSH) — cross-session memory in transparent markdown files, with a memory star-map view, type/tag filtering, and an optional dream pass that consolidates memories on demand or on a schedule",
|
|
4
|
+
"version": "0.6.2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./lib/index.js",
|
|
9
|
+
"./client": "./lib/client.js",
|
|
10
|
+
"./typert": "./lib/typert.host.js",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"lib/",
|
|
15
|
+
"cordis.patch.yml",
|
|
16
|
+
"NOTICE"
|
|
17
|
+
],
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18"
|
|
21
|
+
},
|
|
22
|
+
"dsh": {
|
|
23
|
+
"bundle": {
|
|
24
|
+
"patch": "./cordis.patch.yml"
|
|
25
|
+
},
|
|
26
|
+
"client": {
|
|
27
|
+
"platform": "web",
|
|
28
|
+
"inject": [
|
|
29
|
+
"@deepseek-ai/dsh-client-locale"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"compatibility": {
|
|
33
|
+
"dsh": ">=0.1.2-rc.1",
|
|
34
|
+
"dshReleases": {
|
|
35
|
+
"0.1.2-rc.1": "compatible",
|
|
36
|
+
"0.1.3-alpha.1": "compatible",
|
|
37
|
+
"0.1.3-alpha.2": "compatible",
|
|
38
|
+
"0.1.5-rc.1": "compatible",
|
|
39
|
+
"0.1.6-alpha.1": "compatible",
|
|
40
|
+
"0.1.6-alpha.2": "compatible",
|
|
41
|
+
"0.1.7-rc.1": "compatible",
|
|
42
|
+
"0.1.7-rc.2": "compatible",
|
|
43
|
+
"0.2.0-rc.1": "compatible"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"zod": "^4.4.3"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"react": "^18.0.0"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
55
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.2-rc.1 || ^0.2.0-rc.1",
|
|
56
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.2-rc.1 || ^0.2.0-rc.1",
|
|
57
|
+
"react": "^18.0.0"
|
|
58
|
+
},
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "git+https://github.com/gezi-wen/sage-mem.git"
|
|
62
|
+
},
|
|
63
|
+
"homepage": "https://github.com/gezi-wen/sage-mem#readme",
|
|
64
|
+
"bugs": {
|
|
65
|
+
"url": "https://github.com/gezi-wen/sage-mem/issues"
|
|
66
|
+
},
|
|
67
|
+
"keywords": [
|
|
68
|
+
"memory",
|
|
69
|
+
"ai-memory",
|
|
70
|
+
"agent-memory",
|
|
71
|
+
"long-term-memory",
|
|
72
|
+
"cross-session-memory",
|
|
73
|
+
"context-management",
|
|
74
|
+
"knowledge-management",
|
|
75
|
+
"markdown",
|
|
76
|
+
"dsh",
|
|
77
|
+
"dsh-plugin",
|
|
78
|
+
"deepseek",
|
|
79
|
+
"deepseek-harness",
|
|
80
|
+
"cordis",
|
|
81
|
+
"typert",
|
|
82
|
+
"plugin",
|
|
83
|
+
"ai-agent",
|
|
84
|
+
"agent",
|
|
85
|
+
"claude-code"
|
|
86
|
+
]
|
|
87
|
+
}
|