pi-ate-memory 1.0.0 → 1.1.0
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.en.md +8 -0
- package/README.md +8 -0
- package/index.ts +281 -198
- package/lib/conflict-detect.ts +44 -38
- package/lib/memory-hook.ts +47 -37
- package/lib/memory-inject.ts +74 -72
- package/lib/memory-parser.ts +100 -95
- package/lib/types.ts +24 -32
- package/lib/writer.ts +68 -69
- package/package.json +60 -60
- package/prompts/update-description.md +1 -1
- package/tsconfig.json +10 -10
package/package.json
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-ate-memory",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "File-based persistent memory for AI coding agents",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pi-package"
|
|
7
|
+
],
|
|
8
|
+
"type": "commonjs",
|
|
9
|
+
"main": "index.ts",
|
|
10
|
+
"types": "index.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "vitest run",
|
|
13
|
+
"typecheck": "tsc --noEmit"
|
|
14
|
+
},
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"@earendil-works/pi-coding-agent": ">=1.0.0"
|
|
17
|
+
},
|
|
18
|
+
"peerDependenciesMeta": {
|
|
19
|
+
"@earendil-works/pi-coding-agent": {
|
|
20
|
+
"optional": true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@sinclair/typebox": "^0.34.49",
|
|
25
|
+
"@types/node": "^25.6.2",
|
|
26
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
27
|
+
"typescript": "^6.0.3",
|
|
28
|
+
"vitest": "^3.0.0"
|
|
29
|
+
},
|
|
30
|
+
"pi": {
|
|
31
|
+
"extensions": [
|
|
32
|
+
"."
|
|
33
|
+
],
|
|
34
|
+
"skills": [
|
|
35
|
+
"skills"
|
|
36
|
+
],
|
|
37
|
+
"prompts": [
|
|
38
|
+
"prompts"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"index.ts",
|
|
43
|
+
"lib/",
|
|
44
|
+
"prompts/",
|
|
45
|
+
"memory-prompt.md",
|
|
46
|
+
"README.md",
|
|
47
|
+
"README.en.md",
|
|
48
|
+
"tsconfig.json",
|
|
49
|
+
"package.json"
|
|
50
|
+
],
|
|
51
|
+
"homepage": "https://catlain.github.io/pi-atelier/",
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "git+ssh://git@github.com:catlain/pi-memory.git"
|
|
55
|
+
},
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/catlain/pi-memory/issues"
|
|
58
|
+
},
|
|
59
|
+
"license": "MIT"
|
|
60
|
+
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
- 旧结论已被新结论取代 → 用新内容覆盖旧文件(同名),不要新建
|
|
21
21
|
- 不确定是否重复 → 先 memory_index 确认,不要盲目新建
|
|
22
22
|
- 记忆文件总数超过 25 个时 → 主动考虑合并/归档,减少碎片化
|
|
23
|
-
- 记忆文件总数超过
|
|
23
|
+
- 记忆文件总数超过 80 个时 → 工具拒绝写入,必须先清理
|
|
24
24
|
|
|
25
25
|
清理操作步骤(记忆文件过多时执行):
|
|
26
26
|
A. 同主题合并:read 所有同 topic/高关键词重叠的文件 → 整合为一份 → memory_update 覆盖 → 删除旧文件
|
package/tsconfig.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "ES2022",
|
|
5
|
+
"outDir": "dist",
|
|
6
|
+
"rootDir": ".",
|
|
7
|
+
"types": ["node", "vitest/globals"]
|
|
8
|
+
},
|
|
9
|
+
"include": ["index.ts", "lib/**/*.ts", "tests/**/*.ts"]
|
|
10
|
+
}
|