pi-automem-bridge 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 +5 -1
- package/examples/config.advanced.json +61 -59
- package/package.json +59 -58
- package/src/config.ts +262 -251
- package/src/mcp-client.ts +401 -361
- package/src/project-detect.ts +96 -94
- package/src/recall.ts +283 -254
- package/src/tools/memory-tools.ts +307 -307
- package/src/tools/relationship-tools.ts +121 -114
- package/src/write-policy.ts +148 -142
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+
|
|
3
5
|
# pi-automem-bridge
|
|
4
6
|
|
|
5
7
|
The missing link between [pi](https://github.com/earendil-works/pi) and [AutoMem](https://github.com/verygoodplugins/automem). If you already have both set up, this package connects them — giving pi automatic long-term memory: startup recall, turn-level recall, policy-gated writes, and relationship tools.
|
|
@@ -8,6 +10,9 @@ The missing link between [pi](https://github.com/earendil-works/pi) and [AutoMem
|
|
|
8
10
|
pi install npm:pi-automem-bridge
|
|
9
11
|
```
|
|
10
12
|
|
|
13
|
+
[](https://badge.fury.io/js/pi-automem-bridge)
|
|
14
|
+
[](https://www.npmjs.com/package/pi-automem-bridge)
|
|
15
|
+
|
|
11
16
|
[](https://ko-fi.com/L2J320X82M)
|
|
12
17
|
|
|
13
18
|
</div>
|
|
@@ -169,7 +174,6 @@ npm run test:smoke # live smoke test (requires AutoMem)
|
|
|
169
174
|
npm run test:live # full round-trip write test (requires AutoMem)
|
|
170
175
|
```
|
|
171
176
|
|
|
172
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for architecture notes, test descriptions, and release process.
|
|
173
177
|
|
|
174
178
|
---
|
|
175
179
|
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"mcpServerName": "automem",
|
|
3
|
-
"startupRecall": {
|
|
4
|
-
"queries": [
|
|
5
|
-
"user preferences working style",
|
|
6
|
-
"agent operating guidelines",
|
|
7
|
-
"local development environment",
|
|
8
|
-
"active projects recent decisions"
|
|
9
|
-
],
|
|
10
|
-
"tags": ["source:pi"],
|
|
11
|
-
"tagMode": "any",
|
|
12
|
-
"limit": 6,
|
|
13
|
-
"maxBytes": 5000
|
|
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
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"mcpServerName": "automem",
|
|
3
|
+
"startupRecall": {
|
|
4
|
+
"queries": [
|
|
5
|
+
"user preferences working style",
|
|
6
|
+
"agent operating guidelines",
|
|
7
|
+
"local development environment",
|
|
8
|
+
"active projects recent decisions"
|
|
9
|
+
],
|
|
10
|
+
"tags": ["source:pi"],
|
|
11
|
+
"tagMode": "any",
|
|
12
|
+
"limit": 6,
|
|
13
|
+
"maxBytes": 5000,
|
|
14
|
+
"timeoutMs": 15000
|
|
15
|
+
},
|
|
16
|
+
"turnRecall": {
|
|
17
|
+
"enabled": true,
|
|
18
|
+
"limit": 5,
|
|
19
|
+
"maxBytes": 3000,
|
|
20
|
+
"contextTypes": ["Preference", "Decision", "Pattern", "Insight", "Context"],
|
|
21
|
+
"expandRelations": true,
|
|
22
|
+
"expandEntities": true,
|
|
23
|
+
"timeoutMs": 8000
|
|
24
|
+
},
|
|
25
|
+
"projectDetection": {
|
|
26
|
+
"tagPrefix": "project:",
|
|
27
|
+
"folderTags": {
|
|
28
|
+
"projects": ["project"],
|
|
29
|
+
"areas": ["area"],
|
|
30
|
+
"resources": ["resource"]
|
|
31
|
+
},
|
|
32
|
+
"gitRepoToTag": {
|
|
33
|
+
"my-project": "project:my-project"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"writePolicy": {
|
|
37
|
+
"mode": "safe-auto",
|
|
38
|
+
"autoWriteCategories": ["technical-decision", "agent-pattern", "bug-fix", "tooling-lesson"],
|
|
39
|
+
"confirmCategories": ["personal", "financial", "private", "identity"],
|
|
40
|
+
"blockedCategories": ["secret", "credential", "api-key", "raw-transcript"],
|
|
41
|
+
"alwaysTag": ["source:pi"],
|
|
42
|
+
"minImportanceToWrite": 0.7,
|
|
43
|
+
"dedupeBeforeWrite": true,
|
|
44
|
+
"dedupeLimit": 3
|
|
45
|
+
},
|
|
46
|
+
"behavior": {
|
|
47
|
+
"displayRecall": "hidden",
|
|
48
|
+
"maxContentLength": 2000,
|
|
49
|
+
"preferredContentLength": 500
|
|
50
|
+
},
|
|
51
|
+
"projectOverrides": {
|
|
52
|
+
"project:my-large-project": {
|
|
53
|
+
"limit": 10,
|
|
54
|
+
"maxBytes": 6000
|
|
55
|
+
},
|
|
56
|
+
"project:quick-scripts": {
|
|
57
|
+
"limit": 2,
|
|
58
|
+
"maxBytes": 1000
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
package/package.json
CHANGED
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-automem-bridge",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Automatic long-term memory recall and policy-gated writes for pi agents via AutoMem MCP",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"pi-package",
|
|
7
|
-
"pi-extension",
|
|
8
|
-
"automem",
|
|
9
|
-
"mcp",
|
|
10
|
-
"memory",
|
|
11
|
-
"long-term-memory",
|
|
12
|
-
"semantic-memory",
|
|
13
|
-
"memory-write-policy",
|
|
14
|
-
"agent-memory"
|
|
15
|
-
],
|
|
16
|
-
"license": "MIT",
|
|
17
|
-
"author": "vaniteav",
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "https://github.com/vaniteav/pi-automem-bridge.git"
|
|
21
|
-
},
|
|
22
|
-
"peerDependencies": {
|
|
23
|
-
"@earendil-works/pi-coding-agent": ">=0.78.0",
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"test
|
|
29
|
-
"test:
|
|
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
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-automem-bridge",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Automatic long-term memory recall and policy-gated writes for pi agents via AutoMem MCP",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pi-package",
|
|
7
|
+
"pi-extension",
|
|
8
|
+
"automem",
|
|
9
|
+
"mcp",
|
|
10
|
+
"memory",
|
|
11
|
+
"long-term-memory",
|
|
12
|
+
"semantic-memory",
|
|
13
|
+
"memory-write-policy",
|
|
14
|
+
"agent-memory"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"author": "vaniteav",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/vaniteav/pi-automem-bridge.git"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@earendil-works/pi-coding-agent": ">=0.78.0",
|
|
24
|
+
"@verygoodplugins/mcp-automem": "*",
|
|
25
|
+
"typebox": "*"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"test": "tsx tests/unit.ts && tsx tests/phase2-policy.ts && tsx tests/review-fixes.ts",
|
|
29
|
+
"test:smoke": "tsx tests/phase1-smoke.ts",
|
|
30
|
+
"test:live": "tsx tests/phase2-live-write.ts"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"tsx": "^4.20.6"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {},
|
|
36
|
+
"pi": {
|
|
37
|
+
"extensions": [
|
|
38
|
+
"./src/index.ts"
|
|
39
|
+
],
|
|
40
|
+
"skills": [
|
|
41
|
+
"./skills"
|
|
42
|
+
],
|
|
43
|
+
"prompts": [
|
|
44
|
+
"./prompts"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/vaniteav/pi-automem-bridge/issues"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://github.com/vaniteav/pi-automem-bridge#readme",
|
|
51
|
+
"files": [
|
|
52
|
+
"src",
|
|
53
|
+
"skills",
|
|
54
|
+
"prompts",
|
|
55
|
+
"examples",
|
|
56
|
+
"README.md",
|
|
57
|
+
"LICENSE"
|
|
58
|
+
]
|
|
59
|
+
}
|