@memlab/mcp-server 2.3.0 → 2.52.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 +18 -14
- package/bin/.eslintrc.js +26 -0
- package/bin/memlab-cli.js +313 -0
- package/dist/artifact-classes.d.ts +86 -0
- package/dist/artifact-classes.d.ts.map +1 -0
- package/dist/artifact-classes.js +261 -0
- package/dist/artifact-classes.js.map +1 -0
- package/dist/capture-mode.d.ts +60 -0
- package/dist/capture-mode.d.ts.map +1 -0
- package/dist/capture-mode.js +39 -0
- package/dist/capture-mode.js.map +1 -0
- package/dist/guardrail.d.ts.map +1 -1
- package/dist/guardrail.js +13 -0
- package/dist/guardrail.js.map +1 -1
- package/dist/heap-state.d.ts +96 -2
- package/dist/heap-state.d.ts.map +1 -1
- package/dist/heap-state.js +197 -2
- package/dist/heap-state.js.map +1 -1
- package/dist/index.js +41 -1
- package/dist/index.js.map +1 -1
- package/dist/progress.d.ts +25 -0
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +46 -0
- package/dist/progress.js.map +1 -0
- package/dist/result-handles.d.ts +11 -0
- package/dist/result-handles.d.ts.map +1 -0
- package/dist/result-handles.js +77 -0
- package/dist/result-handles.js.map +1 -0
- package/dist/string-index.d.ts +55 -0
- package/dist/string-index.d.ts.map +1 -0
- package/dist/string-index.js +91 -0
- package/dist/string-index.js.map +1 -0
- package/dist/tool-registry.d.ts +42 -0
- package/dist/tool-registry.d.ts.map +1 -0
- package/dist/tool-registry.js +20 -0
- package/dist/tool-registry.js.map +1 -0
- package/dist/tools/analyze-run.d.ts +12 -0
- package/dist/tools/analyze-run.d.ts.map +1 -0
- package/dist/tools/analyze-run.js +343 -0
- package/dist/tools/analyze-run.js.map +1 -0
- package/dist/tools/app-heap.d.ts +12 -0
- package/dist/tools/app-heap.d.ts.map +1 -0
- package/dist/tools/app-heap.js +140 -0
- package/dist/tools/app-heap.js.map +1 -0
- package/dist/tools/auto-investigate.d.ts.map +1 -1
- package/dist/tools/auto-investigate.js +91 -49
- package/dist/tools/auto-investigate.js.map +1 -1
- package/dist/tools/batch.d.ts +12 -0
- package/dist/tools/batch.d.ts.map +1 -0
- package/dist/tools/batch.js +168 -0
- package/dist/tools/batch.js.map +1 -0
- package/dist/tools/cache-analysis.d.ts.map +1 -1
- package/dist/tools/cache-analysis.js +156 -5
- package/dist/tools/cache-analysis.js.map +1 -1
- package/dist/tools/class-histogram.d.ts.map +1 -1
- package/dist/tools/class-histogram.js +14 -3
- package/dist/tools/class-histogram.js.map +1 -1
- package/dist/tools/collection-trend.d.ts +55 -0
- package/dist/tools/collection-trend.d.ts.map +1 -0
- package/dist/tools/collection-trend.js +315 -0
- package/dist/tools/collection-trend.js.map +1 -0
- package/dist/tools/detached-dom.d.ts +2 -0
- package/dist/tools/detached-dom.d.ts.map +1 -1
- package/dist/tools/detached-dom.js +291 -20
- package/dist/tools/detached-dom.js.map +1 -1
- package/dist/tools/dev-artifacts.d.ts +62 -6
- package/dist/tools/dev-artifacts.d.ts.map +1 -1
- package/dist/tools/dev-artifacts.js +466 -23
- package/dist/tools/dev-artifacts.js.map +1 -1
- package/dist/tools/diff-snapshots.d.ts.map +1 -1
- package/dist/tools/diff-snapshots.js +101 -44
- package/dist/tools/diff-snapshots.js.map +1 -1
- package/dist/tools/dominator-attribution.d.ts +12 -0
- package/dist/tools/dominator-attribution.d.ts.map +1 -0
- package/dist/tools/dominator-attribution.js +189 -0
- package/dist/tools/dominator-attribution.js.map +1 -0
- package/dist/tools/dominator-chain.d.ts +12 -0
- package/dist/tools/dominator-chain.d.ts.map +1 -0
- package/dist/tools/dominator-chain.js +92 -0
- package/dist/tools/dominator-chain.js.map +1 -0
- package/dist/tools/duplicate-objects.d.ts +12 -0
- package/dist/tools/duplicate-objects.d.ts.map +1 -0
- package/dist/tools/duplicate-objects.js +172 -0
- package/dist/tools/duplicate-objects.js.map +1 -0
- package/dist/tools/duplicated-strings.d.ts.map +1 -1
- package/dist/tools/duplicated-strings.js +46 -38
- package/dist/tools/duplicated-strings.js.map +1 -1
- package/dist/tools/eval.d.ts +1 -0
- package/dist/tools/eval.d.ts.map +1 -1
- package/dist/tools/eval.js +787 -30
- package/dist/tools/eval.js.map +1 -1
- package/dist/tools/explain-delta.d.ts +12 -0
- package/dist/tools/explain-delta.d.ts.map +1 -0
- package/dist/tools/explain-delta.js +170 -0
- package/dist/tools/explain-delta.js.map +1 -0
- package/dist/tools/find-nodes-by-class.d.ts.map +1 -1
- package/dist/tools/find-nodes-by-class.js +112 -13
- package/dist/tools/find-nodes-by-class.js.map +1 -1
- package/dist/tools/finding-index.d.ts +22 -0
- package/dist/tools/finding-index.d.ts.map +1 -0
- package/dist/tools/finding-index.js +247 -0
- package/dist/tools/finding-index.js.map +1 -0
- package/dist/tools/for-each.d.ts.map +1 -1
- package/dist/tools/for-each.js +15 -3
- package/dist/tools/for-each.js.map +1 -1
- package/dist/tools/get-references.d.ts.map +1 -1
- package/dist/tools/get-references.js +35 -6
- package/dist/tools/get-references.js.map +1 -1
- package/dist/tools/get-referrers.d.ts.map +1 -1
- package/dist/tools/get-referrers.js +52 -6
- package/dist/tools/get-referrers.js.map +1 -1
- package/dist/tools/hunt-report.d.ts +12 -0
- package/dist/tools/hunt-report.d.ts.map +1 -0
- package/dist/tools/hunt-report.js +186 -0
- package/dist/tools/hunt-report.js.map +1 -0
- package/dist/tools/hypothesis.d.ts +12 -0
- package/dist/tools/hypothesis.d.ts.map +1 -0
- package/dist/tools/hypothesis.js +221 -0
- package/dist/tools/hypothesis.js.map +1 -0
- package/dist/tools/intern-opportunities.d.ts.map +1 -1
- package/dist/tools/intern-opportunities.js +721 -75
- package/dist/tools/intern-opportunities.js.map +1 -1
- package/dist/tools/ladder.d.ts +33 -0
- package/dist/tools/ladder.d.ts.map +1 -0
- package/dist/tools/ladder.js +266 -0
- package/dist/tools/ladder.js.map +1 -0
- package/dist/tools/largest-objects.d.ts.map +1 -1
- package/dist/tools/largest-objects.js +43 -16
- package/dist/tools/largest-objects.js.map +1 -1
- package/dist/tools/leak-report.d.ts +12 -0
- package/dist/tools/leak-report.d.ts.map +1 -0
- package/dist/tools/leak-report.js +256 -0
- package/dist/tools/leak-report.js.map +1 -0
- package/dist/tools/load-snapshot.d.ts +78 -0
- package/dist/tools/load-snapshot.d.ts.map +1 -1
- package/dist/tools/load-snapshot.js +519 -29
- package/dist/tools/load-snapshot.js.map +1 -1
- package/dist/tools/map-entries.d.ts +12 -0
- package/dist/tools/map-entries.d.ts.map +1 -0
- package/dist/tools/map-entries.js +139 -0
- package/dist/tools/map-entries.js.map +1 -0
- package/dist/tools/match-object.d.ts +12 -0
- package/dist/tools/match-object.d.ts.map +1 -0
- package/dist/tools/match-object.js +165 -0
- package/dist/tools/match-object.js.map +1 -0
- package/dist/tools/object-shape.d.ts.map +1 -1
- package/dist/tools/object-shape.js +92 -30
- package/dist/tools/object-shape.js.map +1 -1
- package/dist/tools/population-diff.d.ts +57 -0
- package/dist/tools/population-diff.d.ts.map +1 -0
- package/dist/tools/population-diff.js +338 -0
- package/dist/tools/population-diff.js.map +1 -0
- package/dist/tools/quick-diagnosis.d.ts.map +1 -1
- package/dist/tools/quick-diagnosis.js +12 -4
- package/dist/tools/quick-diagnosis.js.map +1 -1
- package/dist/tools/retainer-layers.d.ts +23 -0
- package/dist/tools/retainer-layers.d.ts.map +1 -0
- package/dist/tools/retainer-layers.js +179 -0
- package/dist/tools/retainer-layers.js.map +1 -0
- package/dist/tools/retainer-summary.d.ts +1 -0
- package/dist/tools/retainer-summary.d.ts.map +1 -1
- package/dist/tools/retainer-summary.js +128 -32
- package/dist/tools/retainer-summary.js.map +1 -1
- package/dist/tools/retainer-trace.d.ts.map +1 -1
- package/dist/tools/retainer-trace.js +105 -25
- package/dist/tools/retainer-trace.js.map +1 -1
- package/dist/tools/search-nodes.d.ts.map +1 -1
- package/dist/tools/search-nodes.js +5 -1
- package/dist/tools/search-nodes.js.map +1 -1
- package/dist/tools/search-strings.d.ts.map +1 -1
- package/dist/tools/search-strings.js +53 -7
- package/dist/tools/search-strings.js.map +1 -1
- package/dist/tools/sequence-analysis.d.ts +49 -0
- package/dist/tools/sequence-analysis.d.ts.map +1 -1
- package/dist/tools/sequence-analysis.js +268 -78
- package/dist/tools/sequence-analysis.js.map +1 -1
- package/dist/tools/shape-histogram.d.ts.map +1 -1
- package/dist/tools/shape-histogram.js +9 -2
- package/dist/tools/shape-histogram.js.map +1 -1
- package/dist/tools/sliced-strings.d.ts.map +1 -1
- package/dist/tools/sliced-strings.js +22 -4
- package/dist/tools/sliced-strings.js.map +1 -1
- package/dist/tools/snapshot-header.d.ts +28 -0
- package/dist/tools/snapshot-header.d.ts.map +1 -0
- package/dist/tools/snapshot-header.js +111 -0
- package/dist/tools/snapshot-header.js.map +1 -0
- package/dist/tools/string-patterns.d.ts.map +1 -1
- package/dist/tools/string-patterns.js +5 -4
- package/dist/tools/string-patterns.js.map +1 -1
- package/dist/tools/tools-index.d.ts +12 -0
- package/dist/tools/tools-index.d.ts.map +1 -0
- package/dist/tools/tools-index.js +342 -0
- package/dist/tools/tools-index.js.map +1 -0
- package/dist/tools/verify-fix.d.ts +23 -0
- package/dist/tools/verify-fix.d.ts.map +1 -0
- package/dist/tools/verify-fix.js +211 -0
- package/dist/tools/verify-fix.js.map +1 -0
- package/dist/tools/weakmap-entries.d.ts.map +1 -1
- package/dist/tools/weakmap-entries.js +6 -1
- package/dist/tools/weakmap-entries.js.map +1 -1
- package/dist/utils.d.ts +204 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +478 -8
- package/dist/utils.js.map +1 -1
- package/package.json +5 -4
package/dist/heap-state.js
CHANGED
|
@@ -42,6 +42,72 @@ function instrumentSnapshot(snapshot) {
|
|
|
42
42
|
// don't take an explicit snapshot argument.
|
|
43
43
|
const loaded = new Map();
|
|
44
44
|
let currentHandle = null;
|
|
45
|
+
// Monotonic access stamp per handle, for LRU eviction under memory pressure.
|
|
46
|
+
// A counter rather than a clock: two snapshots can be touched inside the same
|
|
47
|
+
// millisecond, and only the ORDER matters here.
|
|
48
|
+
const lastUsed = new Map();
|
|
49
|
+
let useCounter = 0;
|
|
50
|
+
function touch(handle) {
|
|
51
|
+
if (handle != null)
|
|
52
|
+
lastUsed.set(handle, ++useCounter);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Drop the least-recently-used resident snapshot, never the current one.
|
|
56
|
+
* Returns its metadata, or null when there is nothing else to evict.
|
|
57
|
+
*
|
|
58
|
+
* Used by the loader's memory-headroom guard: with `keep_previous`, several
|
|
59
|
+
* full graphs stay resident, and the load that tips the process over is the one
|
|
60
|
+
* that dies — taking every resident snapshot with it. Evicting the coldest one
|
|
61
|
+
* first turns an OOM crash into a slower session.
|
|
62
|
+
*/
|
|
63
|
+
export function evictLeastRecentlyUsed() {
|
|
64
|
+
let victim = null;
|
|
65
|
+
let victimStamp = Infinity;
|
|
66
|
+
for (const handle of loaded.keys()) {
|
|
67
|
+
if (handle === currentHandle)
|
|
68
|
+
continue;
|
|
69
|
+
const stamp = lastUsed.get(handle) ?? 0;
|
|
70
|
+
if (stamp < victimStamp) {
|
|
71
|
+
victimStamp = stamp;
|
|
72
|
+
victim = handle;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (victim == null)
|
|
76
|
+
return null;
|
|
77
|
+
const meta = loaded.get(victim)?.metadata ?? null;
|
|
78
|
+
loaded.delete(victim);
|
|
79
|
+
lastUsed.delete(victim);
|
|
80
|
+
dropEvalScratch(victim);
|
|
81
|
+
return meta;
|
|
82
|
+
}
|
|
83
|
+
// Per-snapshot scratch space for memlab_eval sessions: lets a custom script
|
|
84
|
+
// build an index once (e.g. class/typename → ids) and reuse it across
|
|
85
|
+
// subsequent eval calls instead of re-scanning millions of nodes every time.
|
|
86
|
+
// Keyed by handle so switching snapshots never crosses the streams; dropped
|
|
87
|
+
// when the snapshot is replaced/unloaded so a stale index can't outlive its
|
|
88
|
+
// snapshot.
|
|
89
|
+
const evalScratch = new Map();
|
|
90
|
+
/**
|
|
91
|
+
* Returns the mutable scratch object for the current snapshot, creating it on
|
|
92
|
+
* first use. Node ids and any derived index are only valid for the snapshot they
|
|
93
|
+
* were built from, so the scratch is keyed to the active handle.
|
|
94
|
+
*/
|
|
95
|
+
export function getEvalScratch() {
|
|
96
|
+
const key = currentHandle ?? '__none__';
|
|
97
|
+
let s = evalScratch.get(key);
|
|
98
|
+
if (!s) {
|
|
99
|
+
s = {};
|
|
100
|
+
evalScratch.set(key, s);
|
|
101
|
+
}
|
|
102
|
+
return s;
|
|
103
|
+
}
|
|
104
|
+
function dropEvalScratch(handle) {
|
|
105
|
+
if (handle == null) {
|
|
106
|
+
evalScratch.clear();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
evalScratch.delete(handle);
|
|
110
|
+
}
|
|
45
111
|
const sessionConfig = {
|
|
46
112
|
quietHeader: false,
|
|
47
113
|
suppressSuggestions: false,
|
|
@@ -73,6 +139,46 @@ export function shouldEmitHeader() {
|
|
|
73
139
|
headerEmitted = true;
|
|
74
140
|
return true;
|
|
75
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Standing explanatory notes — artifact-family write-ups, capture-mode caveats,
|
|
144
|
+
* "a candidate is not a verdict" — are the same text on every call, and a trend
|
|
145
|
+
* tool gets called many times per investigation (8 times in one measured
|
|
146
|
+
* session). The information is worth stating; restating it is not. Returns true
|
|
147
|
+
* the FIRST time a key is seen in this server process and false thereafter, so
|
|
148
|
+
* a caller can print the long form once and a one-line pointer after that.
|
|
149
|
+
*
|
|
150
|
+
* Session-scoped on purpose, not per-snapshot: the reader is the same agent
|
|
151
|
+
* across snapshots, and re-teaching it the same caveat when it switches rungs is
|
|
152
|
+
* exactly the repetition being removed.
|
|
153
|
+
*/
|
|
154
|
+
const emittedNotes = new Set();
|
|
155
|
+
export function shouldEmitNote(key) {
|
|
156
|
+
if (emittedNotes.has(key))
|
|
157
|
+
return false;
|
|
158
|
+
emittedNotes.add(key);
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
/** True if `key` has already been emitted, without marking it. */
|
|
162
|
+
export function noteAlreadyEmitted(key) {
|
|
163
|
+
return emittedNotes.has(key);
|
|
164
|
+
}
|
|
165
|
+
/** Force the standing notes to print again (used by `repeat_notes`). */
|
|
166
|
+
export function resetEmittedNotes() {
|
|
167
|
+
emittedNotes.clear();
|
|
168
|
+
}
|
|
169
|
+
const savedResults = new Map();
|
|
170
|
+
export function setSavedResult(name, value, handle) {
|
|
171
|
+
savedResults.set(name, { value, handle });
|
|
172
|
+
}
|
|
173
|
+
export function getSavedResult(name) {
|
|
174
|
+
return savedResults.get(name);
|
|
175
|
+
}
|
|
176
|
+
export function listSavedResults() {
|
|
177
|
+
return [...savedResults.entries()].map(([name, r]) => ({
|
|
178
|
+
name,
|
|
179
|
+
handle: r.handle,
|
|
180
|
+
}));
|
|
181
|
+
}
|
|
76
182
|
function uniqueHandle(base) {
|
|
77
183
|
// Sanitize to a short slug, then disambiguate against existing handles.
|
|
78
184
|
const slug = base
|
|
@@ -87,14 +193,42 @@ function uniqueHandle(base) {
|
|
|
87
193
|
i++;
|
|
88
194
|
return `${slug}#${i}`;
|
|
89
195
|
}
|
|
90
|
-
|
|
196
|
+
/**
|
|
197
|
+
* The current snapshot.
|
|
198
|
+
*
|
|
199
|
+
* A LIGHT snapshot (loaded with `light: true`) has no dominator tree, no
|
|
200
|
+
* retained sizes and no shortest-path edges. On such a snapshot `retainedSize`
|
|
201
|
+
* reads 0 and `dominatorNode` / `pathEdge` are absent — which does not throw, it
|
|
202
|
+
* silently produces zeros and empty traces. A tool that reported those as
|
|
203
|
+
* results would be confidently wrong, which is worse than refusing.
|
|
204
|
+
*
|
|
205
|
+
* So light access is DENY-BY-DEFAULT and must be opted into per call site with
|
|
206
|
+
* `{allowLight: true}`, by tools that read only counts, names, types, self
|
|
207
|
+
* sizes, string values or edges. Enforcing it here rather than in the tool
|
|
208
|
+
* wrapper is deliberate: this is the one funnel every tool goes through,
|
|
209
|
+
* including tools dispatched in-process by `memlab_batch`, which bypass the
|
|
210
|
+
* guardrail wrapper entirely.
|
|
211
|
+
*/
|
|
212
|
+
export function getSnapshot(opts) {
|
|
91
213
|
const entry = currentHandle ? loaded.get(currentHandle) : undefined;
|
|
92
214
|
if (!entry) {
|
|
93
215
|
throw new Error('No heap snapshot loaded. Use memlab_load_snapshot first.');
|
|
94
216
|
}
|
|
217
|
+
if (entry.metadata.light && !opts?.allowLight) {
|
|
218
|
+
throw new Error(`Snapshot "${entry.metadata.handle}" was loaded in LIGHT mode, which skips the dominator/retained-size pass — this analysis needs it. ` +
|
|
219
|
+
'Light mode supports count / name / type / self-size / string queries only: memlab_class_histogram (with include_retained_size:false), memlab_search_nodes (without min_retained_size), memlab_search_strings, memlab_string_patterns, plus memlab_snapshot_header and memlab_snapshots, which do not read the graph. ' +
|
|
220
|
+
`Reload for full analysis: memlab_load_snapshot({file_path: "${entry.metadata.filePath}"}).`);
|
|
221
|
+
}
|
|
222
|
+
touch(currentHandle);
|
|
95
223
|
instrumentSnapshot(entry.snapshot);
|
|
96
224
|
return entry.snapshot;
|
|
97
225
|
}
|
|
226
|
+
/** True when the current snapshot was loaded without the dominator pass. */
|
|
227
|
+
export function isLightSnapshot() {
|
|
228
|
+
if (!currentHandle)
|
|
229
|
+
return false;
|
|
230
|
+
return loaded.get(currentHandle)?.metadata.light === true;
|
|
231
|
+
}
|
|
98
232
|
export function getFilePath() {
|
|
99
233
|
if (!currentHandle)
|
|
100
234
|
return null;
|
|
@@ -125,17 +259,73 @@ export function setSnapshot(snapshot, filePath, metadata, opts = {}) {
|
|
|
125
259
|
const replace = opts.replace ?? true;
|
|
126
260
|
if (replace) {
|
|
127
261
|
loaded.clear();
|
|
262
|
+
dropEvalScratch(null);
|
|
128
263
|
}
|
|
129
264
|
const handle = uniqueHandle(opts.alias || metadata.fileName);
|
|
130
|
-
const full = {
|
|
265
|
+
const full = {
|
|
266
|
+
handle,
|
|
267
|
+
filePath,
|
|
268
|
+
...metadata,
|
|
269
|
+
light: metadata.light === true,
|
|
270
|
+
};
|
|
131
271
|
loaded.set(handle, { snapshot, metadata: full });
|
|
132
272
|
currentHandle = handle;
|
|
273
|
+
touch(handle);
|
|
133
274
|
headerEmitted = false;
|
|
134
275
|
return full;
|
|
135
276
|
}
|
|
136
277
|
export function listSnapshots() {
|
|
137
278
|
return [...loaded.values()].map(l => l.metadata);
|
|
138
279
|
}
|
|
280
|
+
/**
|
|
281
|
+
* Drop all resident snapshots and reset the current handle. Used to release the
|
|
282
|
+
* previous snapshot's memory BEFORE parsing a replacement, so peak RSS during a
|
|
283
|
+
* large load is one heap rather than two (avoids the GC death-spiral described
|
|
284
|
+
* in P2403258184 §3).
|
|
285
|
+
*/
|
|
286
|
+
export function clearAllSnapshots() {
|
|
287
|
+
loaded.clear();
|
|
288
|
+
lastUsed.clear();
|
|
289
|
+
dropEvalScratch(null);
|
|
290
|
+
currentHandle = null;
|
|
291
|
+
headerEmitted = false;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* A resident snapshot loaded from this exact path, if any.
|
|
295
|
+
*
|
|
296
|
+
* The point of a snapshot cache is to not re-parse a file this process already
|
|
297
|
+
* has in memory; that check has to key on the resolved path, since the handle is
|
|
298
|
+
* derived from the file name and may have been disambiguated.
|
|
299
|
+
*/
|
|
300
|
+
export function findResidentByPath(filePath) {
|
|
301
|
+
for (const { metadata } of loaded.values()) {
|
|
302
|
+
if (metadata.filePath === filePath)
|
|
303
|
+
return metadata;
|
|
304
|
+
}
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Drop every resident snapshot except `handle`, which becomes current.
|
|
309
|
+
*
|
|
310
|
+
* Used by the load cache-hit path so a hit is indistinguishable from a real load
|
|
311
|
+
* apart from speed: a replace-mode load unloads the others, and a hit must do
|
|
312
|
+
* the same or the two paths leave different state behind.
|
|
313
|
+
*/
|
|
314
|
+
export function retainOnlySnapshot(handle) {
|
|
315
|
+
if (!loaded.has(handle))
|
|
316
|
+
return false;
|
|
317
|
+
for (const h of [...loaded.keys()]) {
|
|
318
|
+
if (h === handle)
|
|
319
|
+
continue;
|
|
320
|
+
loaded.delete(h);
|
|
321
|
+
lastUsed.delete(h);
|
|
322
|
+
dropEvalScratch(h);
|
|
323
|
+
}
|
|
324
|
+
currentHandle = handle;
|
|
325
|
+
touch(handle);
|
|
326
|
+
headerEmitted = false;
|
|
327
|
+
return true;
|
|
328
|
+
}
|
|
139
329
|
export function getCurrentHandle() {
|
|
140
330
|
return currentHandle;
|
|
141
331
|
}
|
|
@@ -149,11 +339,16 @@ export function setCurrentSnapshot(handle) {
|
|
|
149
339
|
if (!loaded.has(handle))
|
|
150
340
|
return false;
|
|
151
341
|
currentHandle = handle;
|
|
342
|
+
touch(handle);
|
|
152
343
|
headerEmitted = false;
|
|
153
344
|
return true;
|
|
154
345
|
}
|
|
155
346
|
export function removeSnapshot(handle) {
|
|
156
347
|
const existed = loaded.delete(handle);
|
|
348
|
+
if (existed) {
|
|
349
|
+
lastUsed.delete(handle);
|
|
350
|
+
dropEvalScratch(handle);
|
|
351
|
+
}
|
|
157
352
|
if (existed && currentHandle === handle) {
|
|
158
353
|
currentHandle = loaded.size > 0 ? [...loaded.keys()][0] : null;
|
|
159
354
|
headerEmitted = false;
|
package/dist/heap-state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heap-state.js","sourceRoot":"","sources":["../src/heap-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAIlD,6EAA6E;AAC7E,gFAAgF;AAChF,+EAA+E;AAC/E,+EAA+E;AAC/E,iFAAiF;AACjF,MAAM,YAAY,GAAG,qBAAqB,CAAC;AAE3C,SAAS,mBAAmB,CAAC,UAAmB,EAAE,OAAiB;IACjE,IAAI,CAAC,UAAU,IAAI,OAAO,UAAU,K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M,CAAC,EAAE,QAAQ,IAAI,IAAI,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAC;IACtC,aAAa,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,MAAM,CAAC,CAAC;IACd,aAAa,GAAG,KAAK,CAAC;IACtB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,OAAO,EAAE,CAAC;QACZ,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACxB,eAAe,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,OAAO,IAAI,aAAa,KAAK,MAAM,EAAE,CAAC;QACxC,aAAa,GAAG,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/D,aAAa,GAAG,KAAK,CAAC;IACxB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { installAnalysisGuardrail } from './guardrail.js';
|
|
|
17
17
|
// so the MCP server can return proper error responses to the client.
|
|
18
18
|
config.errorHandling = ErrorHandling.Throw;
|
|
19
19
|
import { registerLoadSnapshot } from './tools/load-snapshot.js';
|
|
20
|
+
import { registerSnapshotHeader } from './tools/snapshot-header.js';
|
|
20
21
|
import { registerSnapshotSummary } from './tools/snapshot-summary.js';
|
|
21
22
|
import { registerLargestObjects } from './tools/largest-objects.js';
|
|
22
23
|
import { registerGetNode } from './tools/get-node.js';
|
|
@@ -54,6 +55,7 @@ import { registerReferrerSummary } from './tools/referrer-summary.js';
|
|
|
54
55
|
import { registerEventListenerLeaks } from './tools/event-listener-leaks.js';
|
|
55
56
|
import { registerFindByShape } from './tools/find-by-shape.js';
|
|
56
57
|
import { registerWeakMapEntries } from './tools/weakmap-entries.js';
|
|
58
|
+
import { registerMapEntries } from './tools/map-entries.js';
|
|
57
59
|
import { registerGetValue } from './tools/get-value.js';
|
|
58
60
|
import { registerGetString } from './tools/get-string.js';
|
|
59
61
|
import { registerSearchStrings } from './tools/search-strings.js';
|
|
@@ -66,16 +68,35 @@ import { registerGrowthSignals } from './tools/growth-signals.js';
|
|
|
66
68
|
import { registerServerStatus } from './tools/server-status.js';
|
|
67
69
|
import { registerDevArtifacts } from './tools/dev-artifacts.js';
|
|
68
70
|
import { registerSequenceAnalysis } from './tools/sequence-analysis.js';
|
|
71
|
+
import { registerLeakReport } from './tools/leak-report.js';
|
|
72
|
+
import { registerMatchObject } from './tools/match-object.js';
|
|
73
|
+
import { registerExplainDelta } from './tools/explain-delta.js';
|
|
74
|
+
import { registerHypothesis } from './tools/hypothesis.js';
|
|
75
|
+
import { registerLadder } from './tools/ladder.js';
|
|
76
|
+
import { registerFindingIndex } from './tools/finding-index.js';
|
|
77
|
+
import { registerAppHeap } from './tools/app-heap.js';
|
|
78
|
+
import { registerHuntReport } from './tools/hunt-report.js';
|
|
69
79
|
import { registerEventRegistry } from './tools/event-registry.js';
|
|
80
|
+
import { registerDominatorChain } from './tools/dominator-chain.js';
|
|
81
|
+
import { registerDuplicateObjects } from './tools/duplicate-objects.js';
|
|
82
|
+
import { registerRetainerLayers } from './tools/retainer-layers.js';
|
|
83
|
+
import { registerBatch } from './tools/batch.js';
|
|
84
|
+
import { registerPopulationDiff } from './tools/population-diff.js';
|
|
85
|
+
import { registerDominatorAttribution } from './tools/dominator-attribution.js';
|
|
86
|
+
import { registerCollectionTrend } from './tools/collection-trend.js';
|
|
87
|
+
import { registerVerifyFix } from './tools/verify-fix.js';
|
|
88
|
+
import { registerToolsIndex } from './tools/tools-index.js';
|
|
89
|
+
import { registerAnalyzeRun } from './tools/analyze-run.js';
|
|
70
90
|
const server = new McpServer({
|
|
71
91
|
name: 'memlab',
|
|
72
|
-
version: '2.
|
|
92
|
+
version: '2.52.0', // keep in sync with package.json
|
|
73
93
|
});
|
|
74
94
|
// Wrap every tool with a wall-clock guardrail (default 90s, override per-call
|
|
75
95
|
// with timeout_ms or globally with MEMLAB_ANALYSIS_TIMEOUT_MS). Must run before
|
|
76
96
|
// the tools are registered so their handlers are wrapped.
|
|
77
97
|
installAnalysisGuardrail(server);
|
|
78
98
|
registerLoadSnapshot(server);
|
|
99
|
+
registerSnapshotHeader(server);
|
|
79
100
|
registerSnapshotSummary(server);
|
|
80
101
|
registerLargestObjects(server);
|
|
81
102
|
registerGetNode(server);
|
|
@@ -111,6 +132,7 @@ registerReferrerSummary(server);
|
|
|
111
132
|
registerEventListenerLeaks(server);
|
|
112
133
|
registerFindByShape(server);
|
|
113
134
|
registerWeakMapEntries(server);
|
|
135
|
+
registerMapEntries(server);
|
|
114
136
|
registerGetValue(server);
|
|
115
137
|
registerGetString(server);
|
|
116
138
|
registerSearchStrings(server);
|
|
@@ -125,7 +147,25 @@ registerGrowthSignals(server);
|
|
|
125
147
|
registerServerStatus(server);
|
|
126
148
|
registerDevArtifacts(server);
|
|
127
149
|
registerSequenceAnalysis(server);
|
|
150
|
+
registerLeakReport(server);
|
|
151
|
+
registerMatchObject(server);
|
|
152
|
+
registerExplainDelta(server);
|
|
153
|
+
registerHypothesis(server);
|
|
154
|
+
registerLadder(server);
|
|
155
|
+
registerFindingIndex(server);
|
|
156
|
+
registerAppHeap(server);
|
|
157
|
+
registerHuntReport(server);
|
|
128
158
|
registerEventRegistry(server);
|
|
159
|
+
registerDominatorChain(server);
|
|
160
|
+
registerDuplicateObjects(server);
|
|
161
|
+
registerRetainerLayers(server);
|
|
162
|
+
registerBatch(server);
|
|
163
|
+
registerPopulationDiff(server);
|
|
164
|
+
registerDominatorAttribution(server);
|
|
165
|
+
registerCollectionTrend(server);
|
|
166
|
+
registerVerifyFix(server);
|
|
167
|
+
registerToolsIndex(server);
|
|
168
|
+
registerAnalyzeRun(server);
|
|
129
169
|
async function main() {
|
|
130
170
|
const transport = new StdioServerTransport();
|
|
131
171
|
await server.connect(transport);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAC,oBAAoB,EAAC,MAAM,2CAA2C,CAAC;AAC/E,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,MAAM,EAAC,MAAM,EAAE,aAAa,EAAC,GAAG,UAAU,CAAC;AAC3C,OAAO,EAAC,wBAAwB,EAAC,MAAM,gBAAgB,CAAC;AAExD,qEAAqE;AACrE,qEAAqE;AACrE,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC;AAE3C,OAAO,EAAC,oBAAoB,EAAC,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAC,uBAAuB,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAC,sBAAsB,EAAC,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,wBAAwB,EAAC,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAC,oBAAoB,EAAC,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAC,yBAAyB,EAAC,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAC,wBAAwB,EAAC,MAAM,8BAA8B,CAAC;AACtE,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MAAM,CAAC,CAAC;AAC5B,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC7B,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC3B,cAAc,CAAC,MAAM,CAAC,CAAC;AACvB,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC7B,eAAe,CAAC,MAAM,CAAC,CAAC;AACxB,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC3B,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAC9B,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAC/B,wBAAwB,CAAC,MAAM,CAAC,CAAC;AACjC,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAC/B,aAAa,CAAC,MAAM,CAAC,CAAC;AACtB,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAC/B,4BAA4B,CAAC,MAAM,CAAC,CAAC;AACrC,uBAAuB,CAAC,MAAM,CAAC,CAAC;AAChC,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC1B,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC3B,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAE3B,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
* @oncall memory_lab
|
|
9
|
+
*/
|
|
10
|
+
export interface ProgressReporter {
|
|
11
|
+
/**
|
|
12
|
+
* Report entry into a phase. `step` is 1-based and `total` is the expected
|
|
13
|
+
* number of phases, so a host can render a determinate bar.
|
|
14
|
+
*/
|
|
15
|
+
phase(step: number, total: number, message: string): void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Build a reporter from a tool handler's `extra` argument.
|
|
19
|
+
*
|
|
20
|
+
* Tolerates a missing or empty `extra`: tools dispatched in-process by
|
|
21
|
+
* `memlab_batch` are called with `{}`, and a reporter that threw there would
|
|
22
|
+
* turn a progress nicety into a batch-wide failure.
|
|
23
|
+
*/
|
|
24
|
+
export declare function makeProgressReporter(extra: unknown, label: string): ProgressReporter;
|
|
25
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../src/progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqCH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3D;AASD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,GACZ,gBAAgB,CAsBlB"}
|
package/dist/progress.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
* @oncall memory_lab
|
|
9
|
+
*/
|
|
10
|
+
const NOOP = {
|
|
11
|
+
phase: () => {
|
|
12
|
+
// No progress channel and no stderr labelling to do for a caller that
|
|
13
|
+
// supplied no `extra` (in-process dispatch); reporting is simply off.
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Build a reporter from a tool handler's `extra` argument.
|
|
18
|
+
*
|
|
19
|
+
* Tolerates a missing or empty `extra`: tools dispatched in-process by
|
|
20
|
+
* `memlab_batch` are called with `{}`, and a reporter that threw there would
|
|
21
|
+
* turn a progress nicety into a batch-wide failure.
|
|
22
|
+
*/
|
|
23
|
+
export function makeProgressReporter(extra, label) {
|
|
24
|
+
if (extra == null || typeof extra !== 'object')
|
|
25
|
+
return NOOP;
|
|
26
|
+
const e = extra;
|
|
27
|
+
const token = e._meta?.progressToken;
|
|
28
|
+
const send = typeof e.sendNotification === 'function' ? e.sendNotification : null;
|
|
29
|
+
return {
|
|
30
|
+
phase(step, total, message) {
|
|
31
|
+
process.stderr.write(`[${label} ${step}/${total}] ${message}\n`);
|
|
32
|
+
if (send == null || token == null)
|
|
33
|
+
return;
|
|
34
|
+
// Fire-and-forget: a client that cannot accept the notification must not
|
|
35
|
+
// fail the operation the notification is about.
|
|
36
|
+
void send({
|
|
37
|
+
method: 'notifications/progress',
|
|
38
|
+
params: { progressToken: token, progress: step, total, message },
|
|
39
|
+
}).catch(() => {
|
|
40
|
+
// Swallowed on purpose: a client that rejects the notification must not
|
|
41
|
+
// fail the operation the notification is merely describing.
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../src/progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6CH,MAAM,IAAI,GAAqB;IAC7B,KAAK,EAAE,GAAG,EAAE;QACV,sEAAsE;QACtE,sEAAsE;IACxE,CAAC;CACF,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAAc,EACd,KAAa;IAEb,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC5D,MAAM,CAAC,GAAG,KAA6B,CAAC;IACxC,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE,aAAa,CAAC;IACrC,MAAM,IAAI,GACR,OAAO,CAAC,CAAC,gBAAgB,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC;IAEvE,OAAO;QACL,KAAK,CAAC,IAAY,EAAE,KAAa,EAAE,OAAe;YAChD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,OAAO,IAAI,CAAC,CAAC;YACjE,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI;gBAAE,OAAO;YAC1C,yEAAyE;YACzE,gDAAgD;YAChD,KAAK,IAAI,CAAC;gBACR,MAAM,EAAE,wBAAwB;gBAChC,MAAM,EAAE,EAAC,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAC;aAC/D,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;gBACZ,wEAAwE;gBACxE,4DAA4D;YAC9D,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
* @oncall memory_lab
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveSavedNodeIds(name: string): number[];
|
|
11
|
+
//# sourceMappingURL=result-handles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result-handles.d.ts","sourceRoot":"","sources":["../src/result-handles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAuBH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CA+C1D"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
* @oncall memory_lab
|
|
9
|
+
*/
|
|
10
|
+
import { getEvalScratch } from './heap-state.js';
|
|
11
|
+
/**
|
|
12
|
+
* Read a saved result (from `memlab_eval`'s `save_as` / `helpers.save`) as a
|
|
13
|
+
* node-id list, so one tool's output can feed another's input without the ids
|
|
14
|
+
* making a round trip through the transcript.
|
|
15
|
+
*
|
|
16
|
+
* A list of a few thousand ids is tens of thousands of tokens to print and
|
|
17
|
+
* re-type, and re-typing them is where they get truncated or corrupted. The
|
|
18
|
+
* scratch store already existed for `eval`; this makes it readable by the tools
|
|
19
|
+
* that take `node_ids`, which is where such a list is actually wanted.
|
|
20
|
+
*
|
|
21
|
+
* Accepts the shapes a result realistically has: an array of numbers, an array
|
|
22
|
+
* of `{id}` objects, or an object with an `ids`/`node_ids` array.
|
|
23
|
+
*/
|
|
24
|
+
// `memlab_eval` namespaces saved values in the shared per-snapshot scratch so
|
|
25
|
+
// they cannot collide with its own indexes. Reading them back means honoring
|
|
26
|
+
// that prefix — a bare-name lookup finds nothing and reports "not saved" for a
|
|
27
|
+
// result that is sitting right there.
|
|
28
|
+
const SAVED_PREFIX = '__saved:';
|
|
29
|
+
export function resolveSavedNodeIds(name) {
|
|
30
|
+
const scratch = getEvalScratch();
|
|
31
|
+
const prefixed = SAVED_PREFIX + name;
|
|
32
|
+
const key = prefixed in scratch ? prefixed : name;
|
|
33
|
+
if (!(key in scratch)) {
|
|
34
|
+
const available = Object.keys(scratch)
|
|
35
|
+
.filter(k => k.startsWith(SAVED_PREFIX))
|
|
36
|
+
.map(k => k.slice(SAVED_PREFIX.length));
|
|
37
|
+
throw new Error(`No saved result named "${name}". ` +
|
|
38
|
+
(available.length > 0
|
|
39
|
+
? `Saved: ${available.join(', ')}.`
|
|
40
|
+
: 'Nothing is saved for this snapshot. Save one with memlab_eval({code, save_as: "name"}).') +
|
|
41
|
+
' Saved results are per-snapshot and are dropped when the snapshot is replaced.');
|
|
42
|
+
}
|
|
43
|
+
const raw = scratch[key];
|
|
44
|
+
const fromArray = (arr) => {
|
|
45
|
+
const ids = [];
|
|
46
|
+
for (const item of arr) {
|
|
47
|
+
if (typeof item === 'number' && Number.isFinite(item)) {
|
|
48
|
+
ids.push(item);
|
|
49
|
+
}
|
|
50
|
+
else if (item != null && typeof item === 'object' && 'id' in item) {
|
|
51
|
+
const id = item.id;
|
|
52
|
+
if (typeof id === 'number')
|
|
53
|
+
ids.push(id);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return ids;
|
|
57
|
+
};
|
|
58
|
+
let ids = [];
|
|
59
|
+
if (Array.isArray(raw)) {
|
|
60
|
+
ids = fromArray(raw);
|
|
61
|
+
}
|
|
62
|
+
else if (raw != null && typeof raw === 'object') {
|
|
63
|
+
const obj = raw;
|
|
64
|
+
const arr = Array.isArray(obj.ids)
|
|
65
|
+
? obj.ids
|
|
66
|
+
: Array.isArray(obj.node_ids)
|
|
67
|
+
? obj.node_ids
|
|
68
|
+
: null;
|
|
69
|
+
if (arr != null)
|
|
70
|
+
ids = fromArray(arr);
|
|
71
|
+
}
|
|
72
|
+
if (ids.length === 0) {
|
|
73
|
+
throw new Error(`Saved result "${name}" holds no node ids. Expected an array of ids, an array of objects with an \`id\` field, or an object with an \`ids\` array.`);
|
|
74
|
+
}
|
|
75
|
+
return ids;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=result-handles.js.map
|
|
@@ -0,0 +1 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,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
* @oncall memory_lab
|
|
9
|
+
*/
|
|
10
|
+
import type { IHeapNode, IHeapSnapshot } from '@memlab/core';
|
|
11
|
+
/**
|
|
12
|
+
* Per-value string duplication stats: how many copies, what they cost, and a
|
|
13
|
+
* bounded sample of node ids to follow up on.
|
|
14
|
+
*/
|
|
15
|
+
export interface StringDupStats {
|
|
16
|
+
count: number;
|
|
17
|
+
totalSize: number;
|
|
18
|
+
exampleIds: number[];
|
|
19
|
+
/**
|
|
20
|
+
* Copies reachable ONLY through a dev/automation root. -1 when the index was
|
|
21
|
+
* built without the dev-root pass (see {@link buildStringIndex}).
|
|
22
|
+
*/
|
|
23
|
+
devOnlyCount: number;
|
|
24
|
+
}
|
|
25
|
+
export interface StringIndex {
|
|
26
|
+
byValue: Map<string, StringDupStats>;
|
|
27
|
+
/** True when `devOnlyCount` is populated. */
|
|
28
|
+
hasDevOnly: boolean;
|
|
29
|
+
concatStringCount: number;
|
|
30
|
+
concatStringSize: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Build (or reuse) the per-value string duplication index for a snapshot.
|
|
34
|
+
*
|
|
35
|
+
* `memlab_duplicated_strings` and `memlab_intern_opportunities` were each doing
|
|
36
|
+
* their own full pass over every string node to build the same value → {count,
|
|
37
|
+
* size, ids} map, and both are commonly run back to back on the same snapshot —
|
|
38
|
+
* so the second one re-walked millions of nodes to recompute what the first had
|
|
39
|
+
* already produced. The scan is cached in the per-snapshot eval scratch, which
|
|
40
|
+
* already has exactly the lifecycle this needs: keyed by the active handle, and
|
|
41
|
+
* dropped when that snapshot is replaced or unloaded, so a stale index can never
|
|
42
|
+
* outlive the graph its node ids refer to.
|
|
43
|
+
*
|
|
44
|
+
* `withDevOnly` gates the dev/automation reachability pass, which is a whole-
|
|
45
|
+
* graph walk that only `intern_opportunities` needs. A cached index built
|
|
46
|
+
* without it is UPGRADED (rebuilt once) rather than silently returned, since
|
|
47
|
+
* `devOnlyCount: -1` would otherwise be read as "no dev-only copies".
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildStringIndex(snapshot: IHeapSnapshot, opts?: {
|
|
50
|
+
withDevOnly?: boolean;
|
|
51
|
+
isDevOnlyNode?: (node: IHeapNode) => boolean;
|
|
52
|
+
}): StringIndex;
|
|
53
|
+
/** True when this snapshot's string index is already built and resident. */
|
|
54
|
+
export declare function stringIndexIsCached(): boolean;
|
|
55
|
+
//# sourceMappingURL=string-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-index.d.ts","sourceRoot":"","sources":["../src/string-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,cAAc,CAAC;AAG3D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACrC,6CAA6C;IAC7C,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAQD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,aAAa,EACvB,IAAI,GAAE;IACJ,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,OAAO,CAAC;CACzC,GACL,WAAW,CAoDb;AAED,4EAA4E;AAC5E,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C"}
|