memtrace 0.1.50 → 0.2.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.md
CHANGED
|
@@ -235,7 +235,7 @@ For manual setup:
|
|
|
235
235
|
```bash
|
|
236
236
|
claude plugin marketplace add syncable-dev/memtrace
|
|
237
237
|
claude plugin install memtrace-skills@memtrace --scope user
|
|
238
|
-
claude mcp add memtrace -- memtrace mcp -e
|
|
238
|
+
claude mcp add memtrace -- memtrace mcp -e MEMTRACE_ARCADEDB_BOLT_URL=bolt://localhost:7687
|
|
239
239
|
```
|
|
240
240
|
|
|
241
241
|
### Other Editors (Cursor, Windsurf, VS Code, Cline)
|
|
@@ -248,7 +248,7 @@ After `npm install -g memtrace`, add the MCP server to your editor's config:
|
|
|
248
248
|
"memtrace": {
|
|
249
249
|
"command": "memtrace",
|
|
250
250
|
"args": ["mcp"],
|
|
251
|
-
"env": { "
|
|
251
|
+
"env": { "MEMTRACE_ARCADEDB_BOLT_URL": "bolt://localhost:7687" }
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
}
|
|
@@ -17,7 +17,7 @@ async function tryMcpAddJson(memtraceBinary) {
|
|
|
17
17
|
const config = JSON.stringify({
|
|
18
18
|
command: memtraceBinary,
|
|
19
19
|
args: ['mcp'],
|
|
20
|
-
env: {
|
|
20
|
+
env: { MEMTRACE_ARCADEDB_BOLT_URL: 'bolt://localhost:7687' },
|
|
21
21
|
});
|
|
22
22
|
// Shell-quote the JSON. Use single quotes; escape any embedded single quote.
|
|
23
23
|
const escaped = config.replace(/'/g, `'\\''`);
|
|
@@ -151,7 +151,7 @@ export function registerMcpInSettingsAt(settingsPath, memtraceBinary) {
|
|
|
151
151
|
settings.mcpServers['memtrace'] = {
|
|
152
152
|
command: memtraceBinary,
|
|
153
153
|
args: ['mcp'],
|
|
154
|
-
env: {
|
|
154
|
+
env: { MEMTRACE_ARCADEDB_BOLT_URL: 'bolt://localhost:7687' },
|
|
155
155
|
};
|
|
156
156
|
writeJsonAtomic(settingsPath, settings);
|
|
157
157
|
return { registered: true };
|
|
@@ -325,7 +325,7 @@ function writeClaudeLocalMcp(mcpPath, binary) {
|
|
|
325
325
|
cfg.mcpServers['memtrace'] = {
|
|
326
326
|
command: binary,
|
|
327
327
|
args: ['mcp'],
|
|
328
|
-
env: {
|
|
328
|
+
env: { MEMTRACE_ARCADEDB_BOLT_URL: 'bolt://localhost:7687' },
|
|
329
329
|
};
|
|
330
330
|
writeJsonAtomic(mcpPath, cfg);
|
|
331
331
|
return true;
|
|
@@ -30,7 +30,7 @@ export function registerCursorMcpAt(mcpFile, binary) {
|
|
|
30
30
|
cfg.mcpServers['memtrace'] = {
|
|
31
31
|
command: binary,
|
|
32
32
|
args: ['mcp'],
|
|
33
|
-
env: {
|
|
33
|
+
env: { MEMTRACE_ARCADEDB_BOLT_URL: 'bolt://localhost:7687' },
|
|
34
34
|
};
|
|
35
35
|
writeJsonAtomic(mcpFile, cfg);
|
|
36
36
|
return { registered: true };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memtrace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Code intelligence graph — MCP server + AI agent skills + visualization UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"fs-extra": "^11.0.0"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@memtrace/darwin-arm64": "0.
|
|
40
|
-
"@memtrace/linux-x64": "0.
|
|
41
|
-
"@memtrace/win32-x64": "0.
|
|
39
|
+
"@memtrace/darwin-arm64": "0.2.0",
|
|
40
|
+
"@memtrace/linux-x64": "0.2.0",
|
|
41
|
+
"@memtrace/win32-x64": "0.2.0"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=18"
|
|
@@ -20,7 +20,7 @@ Graph algorithms that reveal the structural architecture of a codebase — commu
|
|
|
20
20
|
| Tool | Purpose |
|
|
21
21
|
|------|---------|
|
|
22
22
|
| `find_bridge_symbols` | Architectural chokepoints — symbols that connect otherwise-separate modules |
|
|
23
|
-
| `find_central_symbols` | Most important symbols
|
|
23
|
+
| `find_central_symbols` | Most important symbols (PageRank via ArcadeDB `algo.pagerank`) |
|
|
24
24
|
| `list_communities` | Louvain-detected logical modules/services |
|
|
25
25
|
| `list_processes` | Execution flows: HTTP handlers, background jobs, CLI commands, event handlers |
|
|
26
26
|
| `get_process_flow` | Trace a single process step-by-step |
|
|
@@ -67,7 +67,8 @@ Use `find_central_symbols` to identify the most important symbols:
|
|
|
67
67
|
- `repo_id` — string, required.
|
|
68
68
|
- `branch` — string, optional. Defaults to `"main"`.
|
|
69
69
|
- `limit` — **integer**, optional. How many to return. Default `20`, capped at `100`.
|
|
70
|
-
|
|
70
|
+
|
|
71
|
+
Returns the top-N symbols ranked by **PageRank** (ArcadeDB's native `algo.pagerank` procedure). Filters the global run to Function/Method/Class/Interface/Struct in the requested repo + branch. Falls back to in-degree centrality only if the native procedure isn't registered on the connected ArcadeDB build.
|
|
71
72
|
|
|
72
73
|
### 3. Find architectural chokepoints
|
|
73
74
|
|
|
@@ -81,6 +82,8 @@ Use `find_bridge_symbols` to find symbols that, if removed, would disconnect par
|
|
|
81
82
|
- `branch` — string, optional. Defaults to `"main"`.
|
|
82
83
|
- `limit` — **integer**, optional. Default `15`, capped at `50`.
|
|
83
84
|
|
|
85
|
+
Ranks symbols by **betweenness centrality** (ArcadeDB's native `algo.betweenness` with `normalized: true`) — how many shortest paths between other symbols pass through each one. Falls back to an in-degree × out-degree heuristic only if the native procedure isn't registered.
|
|
86
|
+
|
|
84
87
|
### 4. Trace execution flows
|
|
85
88
|
|
|
86
89
|
Use `list_processes` to see all entry points (HTTP handlers, background jobs, CLI commands, event handlers).
|
|
@@ -111,7 +114,7 @@ Use `execute_cypher` for advanced graph queries not covered by built-in tools. T
|
|
|
111
114
|
| Question | Tool |
|
|
112
115
|
|----------|------|
|
|
113
116
|
| "What are the main modules?" | `list_communities` |
|
|
114
|
-
| "What are the most important functions?" | `find_central_symbols`
|
|
117
|
+
| "What are the most important functions?" | `find_central_symbols` (PageRank, native) |
|
|
115
118
|
| "Where are the bottlenecks?" | `find_bridge_symbols` |
|
|
116
119
|
| "How does a request flow through the system?" | `list_processes` → `get_process_flow` |
|
|
117
120
|
| "What's the entry point for feature X?" | `list_processes`, then filter by name |
|
|
@@ -50,7 +50,7 @@ Each community represents a cohesive module — these are the "areas" of the cod
|
|
|
50
50
|
|
|
51
51
|
### 4. Find the most important symbols
|
|
52
52
|
|
|
53
|
-
Call `find_central_symbols` with `
|
|
53
|
+
Call `find_central_symbols` with `limit: 15`. It ranks symbols by PageRank (ArcadeDB's native `algo.pagerank`) — no extra parameter needed.
|
|
54
54
|
|
|
55
55
|
These are the symbols that the rest of the codebase depends on most heavily. They form the "skeleton" of the architecture.
|
|
56
56
|
|