memtrace 0.1.37 → 0.1.45
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 +2 -2
- package/bin/memtrace.js +102 -14
- package/install.js +21 -179
- package/installer/dist/commands/doctor.d.ts +16 -0
- package/installer/dist/commands/doctor.js +86 -0
- package/installer/dist/commands/install.d.ts +9 -0
- package/installer/dist/commands/install.js +104 -0
- package/installer/dist/commands/picker.d.ts +6 -0
- package/installer/dist/commands/picker.js +22 -0
- package/installer/dist/fs-safe.d.ts +21 -0
- package/installer/dist/fs-safe.js +35 -0
- package/installer/dist/index.d.ts +2 -0
- package/installer/dist/index.js +52 -0
- package/installer/dist/skills.d.ts +17 -0
- package/installer/dist/skills.js +64 -0
- package/installer/dist/transformers/claude.d.ts +41 -0
- package/installer/dist/transformers/claude.js +400 -0
- package/installer/dist/transformers/cursor.d.ts +7 -0
- package/installer/dist/transformers/cursor.js +84 -0
- package/installer/dist/transformers/index.d.ts +7 -0
- package/installer/dist/transformers/index.js +7 -0
- package/installer/dist/transformers/types.d.ts +39 -0
- package/installer/dist/transformers/types.js +1 -0
- package/installer/dist/utils.d.ts +5 -0
- package/installer/dist/utils.js +22 -0
- package/installer/package.json +49 -0
- package/installer/skills/commands/memtrace-api-topology.md +65 -0
- package/installer/skills/commands/memtrace-cochange.md +76 -0
- package/installer/skills/commands/memtrace-evolution.md +135 -0
- package/installer/skills/commands/memtrace-graph.md +117 -0
- package/installer/skills/commands/memtrace-impact.md +64 -0
- package/installer/skills/commands/memtrace-index.md +66 -0
- package/installer/skills/commands/memtrace-quality.md +69 -0
- package/installer/skills/commands/memtrace-relationships.md +73 -0
- package/installer/skills/commands/memtrace-search.md +67 -0
- package/installer/skills/workflows/memtrace-change-impact-analysis.md +85 -0
- package/installer/skills/workflows/memtrace-codebase-exploration.md +108 -0
- package/installer/skills/workflows/memtrace-episode-replay.md +100 -0
- package/installer/skills/workflows/memtrace-first.md +120 -0
- package/installer/skills/workflows/memtrace-incident-investigation.md +125 -0
- package/installer/skills/workflows/memtrace-refactoring-guide.md +116 -0
- package/installer/skills/workflows/memtrace-session-continuity.md +98 -0
- package/package.json +10 -5
- package/skills/commands/memtrace-api-topology.md +3 -0
- package/skills/commands/memtrace-cochange.md +3 -0
- package/skills/commands/memtrace-evolution.md +3 -0
- package/skills/commands/memtrace-graph.md +54 -4
- package/skills/commands/memtrace-impact.md +3 -0
- package/skills/commands/memtrace-index.md +3 -0
- package/skills/commands/memtrace-quality.md +3 -0
- package/skills/commands/memtrace-relationships.md +3 -0
- package/skills/commands/memtrace-search.md +18 -13
- package/skills/workflows/memtrace-first.md +12 -0
- package/uninstall.js +22 -28
|
@@ -29,19 +29,24 @@ Find code using hybrid BM25 full-text + semantic vector search with Reciprocal R
|
|
|
29
29
|
|
|
30
30
|
### 2. Execute the search
|
|
31
31
|
|
|
32
|
-
**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- `
|
|
36
|
-
- `
|
|
37
|
-
- `
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- `
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- `
|
|
44
|
-
- `
|
|
32
|
+
> **Parameter types:** numbers must be JSON numbers, not strings. `limit: 20` is correct; `limit: "20"` returns `MCP error -32602: expected usize`.
|
|
33
|
+
|
|
34
|
+
**`find_code` parameters:**
|
|
35
|
+
- `query` — string, required. Natural-language or exact text.
|
|
36
|
+
- `repo_id` — string, optional. Scope to a single repo (omit to search all).
|
|
37
|
+
- `kind` — string, optional. Filter by symbol type: `"Function"`, `"Class"`, `"Method"`, `"Interface"`, `"APIEndpoint"`, `"APICall"`.
|
|
38
|
+
- `limit` — **integer**, optional. Max results. Default `20`, capped at `100`.
|
|
39
|
+
- `as_of` — string, optional. ISO-8601 timestamp for time-travel search (e.g. `"2026-04-01T00:00:00Z"`).
|
|
40
|
+
- `file_path` — string, optional. File path or directory substring to constrain results (e.g. `"cli/commands"` or `"auth.py"`).
|
|
41
|
+
|
|
42
|
+
**`find_symbol` parameters:**
|
|
43
|
+
- `name` — string, required. Exact or partial symbol name (e.g. `"ValidateToken"`).
|
|
44
|
+
- `fuzzy` — boolean, optional. Enable Levenshtein correction. Default `false`.
|
|
45
|
+
- `edit_distance` — **integer**, optional. Maximum Levenshtein edit distance for fuzzy search. Default `2`, capped at `2`.
|
|
46
|
+
- `repo_id` — string, optional. Scope to a single repo.
|
|
47
|
+
- `kind` — string, optional. Filter by symbol type (e.g. `"Function"`, `"Class"`, `"Variable"`).
|
|
48
|
+
- `file_path` — string, optional. Filter by file path substring.
|
|
49
|
+
- `limit` — **integer**, optional. Max results. Default `10`, capped at `50`.
|
|
45
50
|
|
|
46
51
|
**Success criteria:** Results include `file_path`, `start_line`, `kind`, and relevance `score`.
|
|
47
52
|
|
|
@@ -16,6 +16,18 @@ Memtrace is the memory layer of the codebase. It has the full knowledge graph: e
|
|
|
16
16
|
|
|
17
17
|
**97% better accuracy. 83% fewer wasted tokens. No exceptions.**
|
|
18
18
|
|
|
19
|
+
## Parameter Types — Read This Before Calling Any Tool
|
|
20
|
+
|
|
21
|
+
All memtrace MCP tools are **strictly typed**. Pass JSON numbers (not strings) for integer parameters.
|
|
22
|
+
|
|
23
|
+
| Parameter | Correct | WRONG (fails with MCP error -32602) |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| `limit`, `min_size`, `depth`, `max_depth`, `last_n` | `limit: 20` | `limit: "20"` |
|
|
26
|
+
| `repo_id`, `branch`, `name`, `symbol_name`, `query` | `repo_id: "my-repo"` | `repo_id: my-repo` (unquoted) |
|
|
27
|
+
| `fuzzy`, `include_tests`, `invalidate` | `fuzzy: true` | `fuzzy: "true"` |
|
|
28
|
+
|
|
29
|
+
If you see `failed to deserialize parameters: invalid type: string "N", expected usize`, remove the quotes from the number and retry.
|
|
30
|
+
|
|
19
31
|
## Check Indexing First (Once Per Session)
|
|
20
32
|
|
|
21
33
|
```
|
package/uninstall.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
const os = require("os");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const fs = require("fs");
|
|
7
|
-
const { execSync } = require("child_process");
|
|
7
|
+
const { execSync, spawnSync } = require("child_process");
|
|
8
8
|
|
|
9
9
|
// ── Constants ─────────────────────────────────────────────────────────────────
|
|
10
10
|
|
|
@@ -140,38 +140,32 @@ function tryClaudeCliUninstall() {
|
|
|
140
140
|
|
|
141
141
|
// ── Main uninstall logic ───────────────────────────────────────────────────
|
|
142
142
|
|
|
143
|
+
function legacyCleanup() {
|
|
144
|
+
try { removeSkills(); } catch (e) { console.warn(`memtrace: skill removal failed: ${e.message}`); }
|
|
145
|
+
try { tryClaudeCliUninstall(); } catch { /* silent */ }
|
|
146
|
+
try { removePlugin(); } catch (e) { console.warn(`memtrace: plugin removal failed: ${e.message}`); }
|
|
147
|
+
try { removeMcpServer(); } catch (e) { console.warn(`memtrace: MCP server removal failed: ${e.message}`); }
|
|
148
|
+
}
|
|
149
|
+
|
|
143
150
|
function run() {
|
|
144
151
|
console.log("memtrace: cleaning up...");
|
|
145
152
|
|
|
146
|
-
//
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
//
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
// 3. Remove plugin + marketplace from settings
|
|
161
|
-
try {
|
|
162
|
-
removePlugin();
|
|
163
|
-
} catch (e) {
|
|
164
|
-
console.warn(`memtrace: plugin removal failed: ${e.message}`);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// 4. Remove MCP server from settings
|
|
168
|
-
try {
|
|
169
|
-
removeMcpServer();
|
|
170
|
-
} catch (e) {
|
|
171
|
-
console.warn(`memtrace: MCP server removal failed: ${e.message}`);
|
|
153
|
+
// Try delegating to the compiled installer (handles ALL agents via registry)
|
|
154
|
+
const bundled = path.join(__dirname, "installer", "dist", "index.js");
|
|
155
|
+
if (fs.existsSync(bundled)) {
|
|
156
|
+
const result = spawnSync(process.execPath, [bundled, "uninstall"], {
|
|
157
|
+
stdio: "inherit",
|
|
158
|
+
});
|
|
159
|
+
if (result.status !== 0) {
|
|
160
|
+
console.warn(`memtrace: installer uninstall exited ${result.status}; falling back to legacy cleanup`);
|
|
161
|
+
legacyCleanup();
|
|
162
|
+
}
|
|
163
|
+
} else {
|
|
164
|
+
// No bundled installer — use legacy JS-only cleanup (Claude-only)
|
|
165
|
+
legacyCleanup();
|
|
172
166
|
}
|
|
173
167
|
|
|
174
|
-
//
|
|
168
|
+
// Always clean up ~/.memtrace/
|
|
175
169
|
try {
|
|
176
170
|
const memtraceDir = path.join(os.homedir(), ".memtrace");
|
|
177
171
|
if (fs.existsSync(memtraceDir)) {
|