sage-mem 0.5.1 → 0.5.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 +7 -0
- package/lib/client.js +14 -14
- package/lib/typert.host.js +11 -11
- package/package.json +71 -69
package/README.md
CHANGED
|
@@ -88,6 +88,13 @@ sage-mem 是纯 DSH 插件,在 `package.json` 的 `dsh.compatibility.dshReleas
|
|
|
88
88
|
| 0.1.3-alpha.1 | compatible |
|
|
89
89
|
| 0.1.3-alpha.2 | compatible |
|
|
90
90
|
| 0.1.5-rc.1 | compatible |
|
|
91
|
+
| 0.1.6-alpha.1 | compatible |
|
|
92
|
+
| 0.1.6-alpha.2 | compatible |
|
|
93
|
+
|
|
94
|
+
自 DSH `0.1.6-alpha.2` 起,TypertCodec 契约从「读 `schema`」改为「读 `create()` 工厂」——
|
|
95
|
+
仍只写 `schema:` 的插件会在注册阶段直接抛错,导致整棵插件树加载失败。自 0.5.2 起每个 codec
|
|
96
|
+
同时带 `schema` 与 `create: () => schema`,因此**同一份构建同时兼容 alpha.1 及更早(读
|
|
97
|
+
schema)与 alpha.2 及以后(读 create)**,升级 DSH 时不需要换插件版本。
|
|
91
98
|
|
|
92
99
|
Node.js 要求 `>= 18`(见 `engines.node`)。
|
|
93
100
|
|
package/lib/client.js
CHANGED
|
@@ -63,7 +63,7 @@ const StarmapRuntime = (function (require, _react) {
|
|
|
63
63
|
method: "listStars",
|
|
64
64
|
invocation: { kind: "direct" },
|
|
65
65
|
parameters: [],
|
|
66
|
-
result: { mode: "strict", typeSymbol: "sage-starmap/types#StarList", schema: listSchema },
|
|
66
|
+
result: { mode: "strict", typeSymbol: "sage-starmap/types#StarList", schema: listSchema, create: () => listSchema },
|
|
67
67
|
sourceLocation: { "file": "workspace/sage-starmap/lib/index.js", "line": 1, "column": 1 },
|
|
68
68
|
},
|
|
69
69
|
{
|
|
@@ -73,9 +73,9 @@ const StarmapRuntime = (function (require, _react) {
|
|
|
73
73
|
method: "readFile",
|
|
74
74
|
invocation: { kind: "direct" },
|
|
75
75
|
parameters: [
|
|
76
|
-
{ name: "name", wire: "name", source: "json", codec: { mode: "strict", typeSymbol: "sage-starmap/types#FileName", schema: strSchema } },
|
|
76
|
+
{ name: "name", wire: "name", source: "json", codec: { mode: "strict", typeSymbol: "sage-starmap/types#FileName", schema: strSchema, create: () => strSchema } },
|
|
77
77
|
],
|
|
78
|
-
result: { mode: "strict", typeSymbol: "sage-starmap/types#FileContent", schema: readSchema },
|
|
78
|
+
result: { mode: "strict", typeSymbol: "sage-starmap/types#FileContent", schema: readSchema, create: () => readSchema },
|
|
79
79
|
sourceLocation: { "file": "workspace/sage-starmap/lib/index.js", "line": 1, "column": 1 },
|
|
80
80
|
},
|
|
81
81
|
],
|
|
@@ -1357,7 +1357,7 @@ const StarmapRuntime = (function (require, _react) {
|
|
|
1357
1357
|
method: "listFiles",
|
|
1358
1358
|
invocation: { kind: "direct" },
|
|
1359
1359
|
parameters: [],
|
|
1360
|
-
result: { mode: "strict", typeSymbol: "sage-mem/types#FileList", schema: listSchema },
|
|
1360
|
+
result: { mode: "strict", typeSymbol: "sage-mem/types#FileList", schema: listSchema, create: () => listSchema },
|
|
1361
1361
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
1362
1362
|
},
|
|
1363
1363
|
{
|
|
@@ -1367,9 +1367,9 @@ const StarmapRuntime = (function (require, _react) {
|
|
|
1367
1367
|
method: "readFile",
|
|
1368
1368
|
invocation: { kind: "direct" },
|
|
1369
1369
|
parameters: [
|
|
1370
|
-
{ name: "name", wire: "name", source: "json", codec: { mode: "strict", typeSymbol: "sage-mem/types#FileName", schema: strSchema } },
|
|
1370
|
+
{ name: "name", wire: "name", source: "json", codec: { mode: "strict", typeSymbol: "sage-mem/types#FileName", schema: strSchema, create: () => strSchema } },
|
|
1371
1371
|
],
|
|
1372
|
-
result: { mode: "strict", typeSymbol: "sage-mem/types#FileContent", schema: readSchema },
|
|
1372
|
+
result: { mode: "strict", typeSymbol: "sage-mem/types#FileContent", schema: readSchema, create: () => readSchema },
|
|
1373
1373
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
1374
1374
|
},
|
|
1375
1375
|
{
|
|
@@ -1379,10 +1379,10 @@ const StarmapRuntime = (function (require, _react) {
|
|
|
1379
1379
|
method: "writeFile",
|
|
1380
1380
|
invocation: { kind: "direct" },
|
|
1381
1381
|
parameters: [
|
|
1382
|
-
{ name: "name", wire: "name", source: "json", codec: { mode: "strict", typeSymbol: "sage-mem/types#FileName", schema: strSchema } },
|
|
1383
|
-
{ name: "content", wire: "content", source: "json", codec: { mode: "strict", typeSymbol: "sage-mem/types#FileContent", schema: strSchema } },
|
|
1382
|
+
{ name: "name", wire: "name", source: "json", codec: { mode: "strict", typeSymbol: "sage-mem/types#FileName", schema: strSchema, create: () => strSchema } },
|
|
1383
|
+
{ name: "content", wire: "content", source: "json", codec: { mode: "strict", typeSymbol: "sage-mem/types#FileContent", schema: strSchema, create: () => strSchema } },
|
|
1384
1384
|
],
|
|
1385
|
-
result: { mode: "strict", typeSymbol: "sage-mem/types#WriteResult", schema: writeSchema },
|
|
1385
|
+
result: { mode: "strict", typeSymbol: "sage-mem/types#WriteResult", schema: writeSchema, create: () => writeSchema },
|
|
1386
1386
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
1387
1387
|
},
|
|
1388
1388
|
{
|
|
@@ -1392,9 +1392,9 @@ const StarmapRuntime = (function (require, _react) {
|
|
|
1392
1392
|
method: "deleteFile",
|
|
1393
1393
|
invocation: { kind: "direct" },
|
|
1394
1394
|
parameters: [
|
|
1395
|
-
{ name: "name", wire: "name", source: "json", codec: { mode: "strict", typeSymbol: "sage-mem/types#FileName", schema: strSchema } },
|
|
1395
|
+
{ name: "name", wire: "name", source: "json", codec: { mode: "strict", typeSymbol: "sage-mem/types#FileName", schema: strSchema, create: () => strSchema } },
|
|
1396
1396
|
],
|
|
1397
|
-
result: { mode: "strict", typeSymbol: "sage-mem/types#DeleteResult", schema: deleteSchema },
|
|
1397
|
+
result: { mode: "strict", typeSymbol: "sage-mem/types#DeleteResult", schema: deleteSchema, create: () => deleteSchema },
|
|
1398
1398
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
1399
1399
|
},
|
|
1400
1400
|
{
|
|
@@ -1404,7 +1404,7 @@ const StarmapRuntime = (function (require, _react) {
|
|
|
1404
1404
|
method: "listStars",
|
|
1405
1405
|
invocation: { kind: "direct" },
|
|
1406
1406
|
parameters: [],
|
|
1407
|
-
result: { mode: "strict", typeSymbol: "sage-mem/types#StarmapList", schema: starmapListSchema },
|
|
1407
|
+
result: { mode: "strict", typeSymbol: "sage-mem/types#StarmapList", schema: starmapListSchema, create: () => starmapListSchema },
|
|
1408
1408
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
1409
1409
|
},
|
|
1410
1410
|
{
|
|
@@ -1414,9 +1414,9 @@ const StarmapRuntime = (function (require, _react) {
|
|
|
1414
1414
|
method: "readFile",
|
|
1415
1415
|
invocation: { kind: "direct" },
|
|
1416
1416
|
parameters: [
|
|
1417
|
-
{ name: "name", wire: "name", source: "json", codec: { mode: "strict", typeSymbol: "sage-mem/types#FileName", schema: strSchema } },
|
|
1417
|
+
{ name: "name", wire: "name", source: "json", codec: { mode: "strict", typeSymbol: "sage-mem/types#FileName", schema: strSchema, create: () => strSchema } },
|
|
1418
1418
|
],
|
|
1419
|
-
result: { mode: "strict", typeSymbol: "sage-mem/types#StarmapRead", schema: starmapReadSchema },
|
|
1419
|
+
result: { mode: "strict", typeSymbol: "sage-mem/types#StarmapRead", schema: starmapReadSchema, create: () => starmapReadSchema },
|
|
1420
1420
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
1421
1421
|
},
|
|
1422
1422
|
],
|
package/lib/typert.host.js
CHANGED
|
@@ -66,7 +66,7 @@ export const TYPERT = {
|
|
|
66
66
|
method: 'listFiles',
|
|
67
67
|
invocation: { kind: 'direct' },
|
|
68
68
|
parameters: [],
|
|
69
|
-
result: { mode: 'strict', typeSymbol: 'sage-mem/types#FileList', schema: listResultSchema },
|
|
69
|
+
result: { mode: 'strict', typeSymbol: 'sage-mem/types#FileList', schema: listResultSchema, create: () => listResultSchema },
|
|
70
70
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
71
71
|
},
|
|
72
72
|
{
|
|
@@ -76,9 +76,9 @@ export const TYPERT = {
|
|
|
76
76
|
method: 'readFile',
|
|
77
77
|
invocation: { kind: 'direct' },
|
|
78
78
|
parameters: [
|
|
79
|
-
{ name: 'name', wire: 'name', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#FileName', schema: fileNameSchema } },
|
|
79
|
+
{ name: 'name', wire: 'name', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#FileName', schema: fileNameSchema, create: () => fileNameSchema } },
|
|
80
80
|
],
|
|
81
|
-
result: { mode: 'strict', typeSymbol: 'sage-mem/types#FileContent', schema: readResultSchema },
|
|
81
|
+
result: { mode: 'strict', typeSymbol: 'sage-mem/types#FileContent', schema: readResultSchema, create: () => readResultSchema },
|
|
82
82
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
83
83
|
},
|
|
84
84
|
{
|
|
@@ -88,10 +88,10 @@ export const TYPERT = {
|
|
|
88
88
|
method: 'writeFile',
|
|
89
89
|
invocation: { kind: 'direct' },
|
|
90
90
|
parameters: [
|
|
91
|
-
{ name: 'name', wire: 'name', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#FileName', schema: fileNameSchema } },
|
|
92
|
-
{ name: 'content', wire: 'content', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#FileContent', schema: fileContentSchema } },
|
|
91
|
+
{ name: 'name', wire: 'name', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#FileName', schema: fileNameSchema, create: () => fileNameSchema } },
|
|
92
|
+
{ name: 'content', wire: 'content', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#FileContent', schema: fileContentSchema, create: () => fileContentSchema } },
|
|
93
93
|
],
|
|
94
|
-
result: { mode: 'strict', typeSymbol: 'sage-mem/types#WriteResult', schema: writeResultSchema },
|
|
94
|
+
result: { mode: 'strict', typeSymbol: 'sage-mem/types#WriteResult', schema: writeResultSchema, create: () => writeResultSchema },
|
|
95
95
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
96
96
|
},
|
|
97
97
|
{
|
|
@@ -101,9 +101,9 @@ export const TYPERT = {
|
|
|
101
101
|
method: 'deleteFile',
|
|
102
102
|
invocation: { kind: 'direct' },
|
|
103
103
|
parameters: [
|
|
104
|
-
{ name: 'name', wire: 'name', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#FileName', schema: fileNameSchema } },
|
|
104
|
+
{ name: 'name', wire: 'name', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#FileName', schema: fileNameSchema, create: () => fileNameSchema } },
|
|
105
105
|
],
|
|
106
|
-
result: { mode: 'strict', typeSymbol: 'sage-mem/types#DeleteResult', schema: deleteResultSchema },
|
|
106
|
+
result: { mode: 'strict', typeSymbol: 'sage-mem/types#DeleteResult', schema: deleteResultSchema, create: () => deleteResultSchema },
|
|
107
107
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
108
108
|
},
|
|
109
109
|
{
|
|
@@ -113,7 +113,7 @@ export const TYPERT = {
|
|
|
113
113
|
method: 'listStars',
|
|
114
114
|
invocation: { kind: 'direct' },
|
|
115
115
|
parameters: [],
|
|
116
|
-
result: { mode: 'strict', typeSymbol: 'sage-mem/types#StarmapList', schema: starmapListSchema },
|
|
116
|
+
result: { mode: 'strict', typeSymbol: 'sage-mem/types#StarmapList', schema: starmapListSchema, create: () => starmapListSchema },
|
|
117
117
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -123,9 +123,9 @@ export const TYPERT = {
|
|
|
123
123
|
method: 'readFile',
|
|
124
124
|
invocation: { kind: 'direct' },
|
|
125
125
|
parameters: [
|
|
126
|
-
{ name: 'name', wire: 'name', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#FileName', schema: fileNameSchema } },
|
|
126
|
+
{ name: 'name', wire: 'name', source: 'json', codec: { mode: 'strict', typeSymbol: 'sage-mem/types#FileName', schema: fileNameSchema, create: () => fileNameSchema } },
|
|
127
127
|
],
|
|
128
|
-
result: { mode: 'strict', typeSymbol: 'sage-mem/types#StarmapRead', schema: starmapReadSchema },
|
|
128
|
+
result: { mode: 'strict', typeSymbol: 'sage-mem/types#StarmapRead', schema: starmapReadSchema, create: () => starmapReadSchema },
|
|
129
129
|
sourceLocation: { "file": "workspace/sage-mem/lib/index.js", "line": 1, "column": 1 },
|
|
130
130
|
},
|
|
131
131
|
],
|
package/package.json
CHANGED
|
@@ -1,69 +1,71 @@
|
|
|
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",
|
|
4
|
-
"version": "0.5.
|
|
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/index.js",
|
|
15
|
-
"lib/client.js",
|
|
16
|
-
"lib/typert.host.js",
|
|
17
|
-
"cordis.patch.yml",
|
|
18
|
-
"NOTICE"
|
|
19
|
-
],
|
|
20
|
-
"license": "Apache-2.0",
|
|
21
|
-
"engines": {
|
|
22
|
-
"node": ">=18"
|
|
23
|
-
},
|
|
24
|
-
"dsh": {
|
|
25
|
-
"bundle": {
|
|
26
|
-
"patch": "./cordis.patch.yml"
|
|
27
|
-
},
|
|
28
|
-
"client": {
|
|
29
|
-
"platform": "web",
|
|
30
|
-
"inject": [
|
|
31
|
-
"@deepseek-ai/dsh-client-locale"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"compatibility": {
|
|
35
|
-
"dsh": ">=0.1.2-rc.1",
|
|
36
|
-
"dshReleases": {
|
|
37
|
-
"0.1.2-rc.1": "compatible",
|
|
38
|
-
"0.1.3-alpha.1": "compatible",
|
|
39
|
-
"0.1.3-alpha.2": "compatible",
|
|
40
|
-
"0.1.5-rc.1": "compatible"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"@deepseek-ai/
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
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",
|
|
4
|
+
"version": "0.5.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/index.js",
|
|
15
|
+
"lib/client.js",
|
|
16
|
+
"lib/typert.host.js",
|
|
17
|
+
"cordis.patch.yml",
|
|
18
|
+
"NOTICE"
|
|
19
|
+
],
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=18"
|
|
23
|
+
},
|
|
24
|
+
"dsh": {
|
|
25
|
+
"bundle": {
|
|
26
|
+
"patch": "./cordis.patch.yml"
|
|
27
|
+
},
|
|
28
|
+
"client": {
|
|
29
|
+
"platform": "web",
|
|
30
|
+
"inject": [
|
|
31
|
+
"@deepseek-ai/dsh-client-locale"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"compatibility": {
|
|
35
|
+
"dsh": ">=0.1.2-rc.1",
|
|
36
|
+
"dshReleases": {
|
|
37
|
+
"0.1.2-rc.1": "compatible",
|
|
38
|
+
"0.1.3-alpha.1": "compatible",
|
|
39
|
+
"0.1.3-alpha.2": "compatible",
|
|
40
|
+
"0.1.5-rc.1": "compatible",
|
|
41
|
+
"0.1.6-alpha.1": "compatible",
|
|
42
|
+
"0.1.6-alpha.2": "compatible"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"zod": "^4.4.3"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
51
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.2-rc.1",
|
|
52
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.2-rc.1",
|
|
53
|
+
"react": "^18.0.0"
|
|
54
|
+
},
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "git",
|
|
57
|
+
"url": "git+https://github.com/gezi-wen/sage-mem.git"
|
|
58
|
+
},
|
|
59
|
+
"keywords": [
|
|
60
|
+
"memory",
|
|
61
|
+
"ai-memory",
|
|
62
|
+
"long-term-memory",
|
|
63
|
+
"markdown",
|
|
64
|
+
"dsh",
|
|
65
|
+
"deepseek-harness",
|
|
66
|
+
"plugin",
|
|
67
|
+
"ai-agent",
|
|
68
|
+
"agent",
|
|
69
|
+
"claude-code"
|
|
70
|
+
]
|
|
71
|
+
}
|