@narumitw/pi-cbmem 0.0.0 → 0.0.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 +30 -39
- package/package.json +8 -11
package/README.md
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
# 🧠 pi-cbmem — Codebase Memory Tools for Pi
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@narumitw/pi-cbmem) [](https://pi.dev) [](./LICENSE)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Connect Pi to the local Codebase Memory CLI and give the model graph-first operating guidance.
|
|
6
6
|
|
|
7
7
|
## ✨ Features
|
|
8
8
|
|
|
9
|
-
- Registers
|
|
10
|
-
-
|
|
11
|
-
- Bundles the `codebase-memory` skill for evidence-tier
|
|
12
|
-
-
|
|
9
|
+
- Registers 15 Codebase Memory tools for graph queries, search, indexing, coverage, tracing, and architecture.
|
|
10
|
+
- Runs the local `codebase-memory-mcp` CLI with cancellation, failure reporting, and bounded output.
|
|
11
|
+
- Bundles the `codebase-memory` skill for graph-first, evidence-tier workflows.
|
|
12
|
+
- Loads the extension and skill from one package.
|
|
13
13
|
|
|
14
14
|
## 📦 Install
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Install persistently from npm:
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
```bash
|
|
19
|
+
pi install npm:@narumitw/pi-cbmem
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Try from npm without installing permanently:
|
|
19
23
|
|
|
20
24
|
```bash
|
|
21
|
-
pi
|
|
25
|
+
pi -e npm:@narumitw/pi-cbmem
|
|
22
26
|
```
|
|
23
27
|
|
|
24
|
-
Build and
|
|
28
|
+
Build and load a local checkout from the repository root:
|
|
25
29
|
|
|
26
30
|
```bash
|
|
27
31
|
npm --workspace @narumitw/pi-cbmem run build
|
|
@@ -31,14 +35,12 @@ pi --no-extensions -e ./packages/pi-cbmem
|
|
|
31
35
|
The package declares `dist/index.ts`, so an unbuilt local checkout must run the build before Pi loads the package directory.
|
|
32
36
|
|
|
33
37
|
Pi extensions run with your user permissions.
|
|
34
|
-
|
|
35
|
-
Review the source before loading the package.
|
|
38
|
+
Install only trusted packages, and review the source before loading this extension.
|
|
36
39
|
|
|
37
40
|
## 🚀 Quick start
|
|
38
41
|
|
|
39
|
-
Install `codebase-memory-mcp` at `~/.local/bin/codebase-memory-mcp`, load
|
|
40
|
-
|
|
41
|
-
The bundled skill tells Pi to check the active graph project before exploration and to verify material claims with graph snippets and index-coverage evidence.
|
|
42
|
+
Install `codebase-memory-mcp` at `~/.local/bin/codebase-memory-mcp`, load pi-cbmem, and ask Pi a structural codebase question.
|
|
43
|
+
The bundled skill directs Pi to identify the active graph project before exploration and verify material claims with snippets and index-coverage evidence.
|
|
42
44
|
|
|
43
45
|
## 🛠️ Tools
|
|
44
46
|
|
|
@@ -60,37 +62,26 @@ The extension registers these tools:
|
|
|
60
62
|
- `manage_adr`
|
|
61
63
|
- `ingest_traces`
|
|
62
64
|
|
|
63
|
-
Each tool sends JSON arguments to `codebase-memory-mcp cli <tool>` over standard input and returns the
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Standard output over 50 KB fails safely because the complete JSON response cannot be validated within the bounded capture.
|
|
68
|
-
|
|
69
|
-
Spawn failures, nonzero exits, oversized output, and missing JSON responses are reported as failed tool calls.
|
|
65
|
+
Each tool sends JSON arguments to `codebase-memory-mcp cli <tool>` over standard input and returns the final JSON response from standard output.
|
|
66
|
+
Validated JSON longer than 2,000 lines is truncated with an omission notice.
|
|
67
|
+
Standard output over 50 KB fails because the extension cannot validate a complete JSON response within its capture limit.
|
|
68
|
+
Spawn failures, nonzero exits, oversized output, and missing JSON responses fail the tool call.
|
|
70
69
|
|
|
71
70
|
## 🔒 Security and privacy
|
|
72
71
|
|
|
73
|
-
The Codebase Memory binary
|
|
74
|
-
|
|
72
|
+
The Codebase Memory binary inherits the Pi process environment and user permissions.
|
|
75
73
|
Tool calls can read and index repositories, inspect source, persist graph data, manage architecture decisions and traces, or delete indexed projects.
|
|
76
|
-
|
|
77
|
-
Deleting a project or replacing its Architecture Decision Records requires explicit confirmation in TUI or RPC mode and is rejected in non-interactive modes.
|
|
78
|
-
|
|
74
|
+
Deleting a project or replacing all Architecture Decision Records requires explicit confirmation in TUI or RPC mode and is rejected in other modes.
|
|
79
75
|
Repository content returned by graph tools can be sent to the selected model provider as tool output.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
The extension starts one local CLI child process per tool call in the active session directory and does not start background work during extension factory load.
|
|
84
|
-
|
|
85
|
-
Cancelling a tool call terminates its child process.
|
|
76
|
+
Terminal controls are removed at the TUI display boundary, while the validated raw result remains available to the model.
|
|
77
|
+
Each tool call starts one local CLI child process in the active session directory; extension loading starts no background work.
|
|
78
|
+
Cancelling the tool call terminates that child process.
|
|
86
79
|
|
|
87
80
|
## 🚧 Limitations
|
|
88
81
|
|
|
89
|
-
The package
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
The extension exposes static tool schemas that match the bundled Codebase Memory skill and delegates final argument validation to the installed CLI.
|
|
82
|
+
- The package requires `~/.local/bin/codebase-memory-mcp` for the current user.
|
|
83
|
+
- It does not install or update the Codebase Memory binary.
|
|
84
|
+
- Static tool schemas match the bundled skill, while the installed CLI performs final argument validation.
|
|
94
85
|
|
|
95
86
|
## 🗂️ Package layout
|
|
96
87
|
|
|
@@ -109,7 +100,7 @@ packages/pi-cbmem/
|
|
|
109
100
|
├── test/
|
|
110
101
|
│ ├── build-runtime.test.ts # Generated-runtime and Jiti loader coverage
|
|
111
102
|
│ └── cbmem.test.ts # Tool registration coverage
|
|
112
|
-
├── package.json #
|
|
103
|
+
├── package.json # Pi extension and skill declarations
|
|
113
104
|
├── tsconfig.json
|
|
114
105
|
├── README.md
|
|
115
106
|
└── LICENSE
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narumitw/pi-cbmem",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Pi extension package for Codebase Memory knowledge graph tools and guidance.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
@@ -28,9 +28,6 @@
|
|
|
28
28
|
"./skills"
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
|
-
"piExtension": {
|
|
32
|
-
"lifecycle": "stable"
|
|
33
|
-
},
|
|
34
31
|
"scripts": {
|
|
35
32
|
"build": "node scripts/build-runtime.mjs",
|
|
36
33
|
"check": "npm run build && biome check . && npm run typecheck",
|
|
@@ -45,13 +42,13 @@
|
|
|
45
42
|
"typebox": "*"
|
|
46
43
|
},
|
|
47
44
|
"devDependencies": {
|
|
48
|
-
"@biomejs/biome": "2.5.
|
|
49
|
-
"@earendil-works/pi-ai": "0.84.
|
|
50
|
-
"@earendil-works/pi-coding-agent": "0.84.
|
|
51
|
-
"@earendil-works/pi-tui": "0.84.
|
|
52
|
-
"@types/node": "26.
|
|
45
|
+
"@biomejs/biome": "2.5.11",
|
|
46
|
+
"@earendil-works/pi-ai": "0.84.4",
|
|
47
|
+
"@earendil-works/pi-coding-agent": "0.84.4",
|
|
48
|
+
"@earendil-works/pi-tui": "0.84.4",
|
|
49
|
+
"@types/node": "26.4.0",
|
|
53
50
|
"esbuild": "0.28.2",
|
|
54
|
-
"typebox": "1.3.
|
|
51
|
+
"typebox": "1.3.20",
|
|
55
52
|
"typescript": "7.0.2"
|
|
56
53
|
},
|
|
57
54
|
"dependencies": {
|