@memlab/mcp-server 2.18.1 → 2.86.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 +30 -16
- package/bin/.eslintrc.js +26 -0
- package/bin/memlab-cli.js +313 -0
- package/dist/anonymized-snapshot.d.ts +75 -0
- package/dist/anonymized-snapshot.d.ts.map +1 -0
- package/dist/anonymized-snapshot.js +101 -0
- package/dist/anonymized-snapshot.js.map +1 -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/eval-hints.d.ts +41 -0
- package/dist/eval-hints.d.ts.map +1 -0
- package/dist/eval-hints.js +115 -0
- package/dist/eval-hints.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-budget.d.ts +32 -0
- package/dist/heap-budget.d.ts.map +1 -0
- package/dist/heap-budget.js +90 -0
- package/dist/heap-budget.js.map +1 -0
- package/dist/heap-shapes.d.ts +148 -0
- package/dist/heap-shapes.d.ts.map +1 -0
- package/dist/heap-shapes.js +193 -0
- package/dist/heap-shapes.js.map +1 -0
- package/dist/heap-state.d.ts +109 -2
- package/dist/heap-state.d.ts.map +1 -1
- package/dist/heap-state.js +194 -3
- package/dist/heap-state.js.map +1 -1
- package/dist/index.js +102 -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/react-shapes.d.ts +42 -0
- package/dist/react-shapes.d.ts.map +1 -0
- package/dist/react-shapes.js +149 -0
- package/dist/react-shapes.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/server-version.d.ts +19 -0
- package/dist/server-version.d.ts.map +1 -0
- package/dist/server-version.js +19 -0
- package/dist/server-version.js.map +1 -0
- package/dist/snapshot-borrow.d.ts +67 -0
- package/dist/snapshot-borrow.d.ts.map +1 -0
- package/dist/snapshot-borrow.js +113 -0
- package/dist/snapshot-borrow.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 +99 -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 +404 -0
- package/dist/tools/analyze-run.js.map +1 -0
- package/dist/tools/anonymize-snapshot.d.ts +12 -0
- package/dist/tools/anonymize-snapshot.d.ts.map +1 -0
- package/dist/tools/anonymize-snapshot.js +159 -0
- package/dist/tools/anonymize-snapshot.js.map +1 -0
- package/dist/tools/app-config.d.ts +12 -0
- package/dist/tools/app-config.d.ts.map +1 -0
- package/dist/tools/app-config.js +217 -0
- package/dist/tools/app-config.js.map +1 -0
- package/dist/tools/app-heap.d.ts +30 -0
- package/dist/tools/app-heap.d.ts.map +1 -0
- package/dist/tools/app-heap.js +106 -0
- package/dist/tools/app-heap.js.map +1 -0
- package/dist/tools/artifact-budget.d.ts +12 -0
- package/dist/tools/artifact-budget.d.ts.map +1 -0
- package/dist/tools/artifact-budget.js +219 -0
- package/dist/tools/artifact-budget.js.map +1 -0
- package/dist/tools/async-census.d.ts +12 -0
- package/dist/tools/async-census.d.ts.map +1 -0
- package/dist/tools/async-census.js +243 -0
- package/dist/tools/async-census.js.map +1 -0
- package/dist/tools/auto-investigate.d.ts.map +1 -1
- package/dist/tools/auto-investigate.js +54 -5
- 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 +196 -0
- package/dist/tools/batch.js.map +1 -0
- package/dist/tools/cache-analysis.d.ts +15 -0
- package/dist/tools/cache-analysis.d.ts.map +1 -1
- package/dist/tools/cache-analysis.js +240 -14
- package/dist/tools/cache-analysis.js.map +1 -1
- package/dist/tools/census-diff.d.ts +55 -0
- package/dist/tools/census-diff.d.ts.map +1 -0
- package/dist/tools/census-diff.js +228 -0
- package/dist/tools/census-diff.js.map +1 -0
- package/dist/tools/chain-walk.d.ts +12 -0
- package/dist/tools/chain-walk.d.ts.map +1 -0
- package/dist/tools/chain-walk.js +184 -0
- package/dist/tools/chain-walk.js.map +1 -0
- 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-diff.d.ts +44 -0
- package/dist/tools/collection-diff.d.ts.map +1 -0
- package/dist/tools/collection-diff.js +343 -0
- package/dist/tools/collection-diff.js.map +1 -0
- 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 +5 -0
- package/dist/tools/detached-dom.d.ts.map +1 -1
- package/dist/tools/detached-dom.js +368 -22
- 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 +685 -24
- 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 +18 -2
- package/dist/tools/diff-snapshots.js.map +1 -1
- package/dist/tools/dom-audit.d.ts +37 -0
- package/dist/tools/dom-audit.d.ts.map +1 -0
- package/dist/tools/dom-audit.js +247 -0
- package/dist/tools/dom-audit.js.map +1 -0
- 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 +49 -40
- package/dist/tools/duplicated-strings.js.map +1 -1
- package/dist/tools/eval-across.d.ts +12 -0
- package/dist/tools/eval-across.d.ts.map +1 -0
- package/dist/tools/eval-across.js +135 -0
- package/dist/tools/eval-across.js.map +1 -0
- package/dist/tools/eval.d.ts +79 -0
- package/dist/tools/eval.d.ts.map +1 -1
- package/dist/tools/eval.js +2523 -197
- package/dist/tools/eval.js.map +1 -1
- package/dist/tools/event-listener-leaks.d.ts.map +1 -1
- package/dist/tools/event-listener-leaks.js +42 -17
- package/dist/tools/event-listener-leaks.js.map +1 -1
- package/dist/tools/event-registry.d.ts.map +1 -1
- package/dist/tools/event-registry.js +42 -8
- package/dist/tools/event-registry.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 +221 -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 +203 -0
- package/dist/tools/finding-index.d.ts.map +1 -0
- package/dist/tools/finding-index.js +566 -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-referrers.d.ts.map +1 -1
- package/dist/tools/get-referrers.js +17 -0
- package/dist/tools/get-referrers.js.map +1 -1
- package/dist/tools/get-value.d.ts +16 -0
- package/dist/tools/get-value.d.ts.map +1 -1
- package/dist/tools/get-value.js +96 -2
- package/dist/tools/get-value.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 +280 -0
- package/dist/tools/hypothesis.js.map +1 -0
- package/dist/tools/id-space-audit.d.ts +12 -0
- package/dist/tools/id-space-audit.d.ts.map +1 -0
- package/dist/tools/id-space-audit.js +262 -0
- package/dist/tools/id-space-audit.js.map +1 -0
- package/dist/tools/identify.d.ts +12 -0
- package/dist/tools/identify.d.ts.map +1 -0
- package/dist/tools/identify.js +205 -0
- package/dist/tools/identify.js.map +1 -0
- package/dist/tools/identity-diff.d.ts +12 -0
- package/dist/tools/identity-diff.d.ts.map +1 -0
- package/dist/tools/identity-diff.js +188 -0
- package/dist/tools/identity-diff.js.map +1 -0
- package/dist/tools/intern-opportunities.d.ts.map +1 -1
- package/dist/tools/intern-opportunities.js +116 -50
- package/dist/tools/intern-opportunities.js.map +1 -1
- package/dist/tools/ladder-probe.d.ts +65 -0
- package/dist/tools/ladder-probe.d.ts.map +1 -0
- package/dist/tools/ladder-probe.js +445 -0
- package/dist/tools/ladder-probe.js.map +1 -0
- 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 +6 -2
- package/dist/tools/largest-objects.js.map +1 -1
- package/dist/tools/leak-report.d.ts +35 -0
- package/dist/tools/leak-report.d.ts.map +1 -0
- package/dist/tools/leak-report.js +398 -0
- package/dist/tools/leak-report.js.map +1 -0
- package/dist/tools/load-snapshot.d.ts +29 -0
- package/dist/tools/load-snapshot.d.ts.map +1 -1
- package/dist/tools/load-snapshot.js +294 -23
- 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/metric.d.ts +13 -0
- package/dist/tools/metric.d.ts.map +1 -0
- package/dist/tools/metric.js +185 -0
- package/dist/tools/metric.js.map +1 -0
- package/dist/tools/module-attribution.d.ts +36 -0
- package/dist/tools/module-attribution.d.ts.map +1 -0
- package/dist/tools/module-attribution.js +235 -0
- package/dist/tools/module-attribution.js.map +1 -0
- package/dist/tools/next-measurement.d.ts +26 -0
- package/dist/tools/next-measurement.d.ts.map +1 -0
- package/dist/tools/next-measurement.js +149 -0
- package/dist/tools/next-measurement.js.map +1 -0
- package/dist/tools/object-cost-breakdown.d.ts.map +1 -1
- package/dist/tools/object-cost-breakdown.js +64 -0
- package/dist/tools/object-cost-breakdown.js.map +1 -1
- package/dist/tools/object-shape.d.ts.map +1 -1
- package/dist/tools/object-shape.js +53 -5
- 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/population-vs-owners.d.ts +12 -0
- package/dist/tools/population-vs-owners.d.ts.map +1 -0
- package/dist/tools/population-vs-owners.js +183 -0
- package/dist/tools/population-vs-owners.js.map +1 -0
- package/dist/tools/property-names.d.ts +29 -0
- package/dist/tools/property-names.d.ts.map +1 -0
- package/dist/tools/property-names.js +131 -0
- package/dist/tools/property-names.js.map +1 -0
- package/dist/tools/quick-diagnosis.d.ts.map +1 -1
- package/dist/tools/quick-diagnosis.js +7 -1
- package/dist/tools/quick-diagnosis.js.map +1 -1
- package/dist/tools/react-owners.d.ts +12 -0
- package/dist/tools/react-owners.d.ts.map +1 -0
- package/dist/tools/react-owners.js +167 -0
- package/dist/tools/react-owners.js.map +1 -0
- package/dist/tools/react-update-queues.d.ts +12 -0
- package/dist/tools/react-update-queues.d.ts.map +1 -0
- package/dist/tools/react-update-queues.js +173 -0
- package/dist/tools/react-update-queues.js.map +1 -0
- package/dist/tools/replicate.d.ts +49 -0
- package/dist/tools/replicate.d.ts.map +1 -0
- package/dist/tools/replicate.js +241 -0
- package/dist/tools/replicate.js.map +1 -0
- package/dist/tools/retainer-diff.d.ts +12 -0
- package/dist/tools/retainer-diff.d.ts.map +1 -0
- package/dist/tools/retainer-diff.js +168 -0
- package/dist/tools/retainer-diff.js.map +1 -0
- 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 +18 -0
- package/dist/tools/retainer-summary.d.ts.map +1 -1
- package/dist/tools/retainer-summary.js +210 -51
- 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 +14 -2
- package/dist/tools/retainer-trace.js.map +1 -1
- package/dist/tools/round-audit.d.ts +66 -0
- package/dist/tools/round-audit.d.ts.map +1 -0
- package/dist/tools/round-audit.js +258 -0
- package/dist/tools/round-audit.js.map +1 -0
- package/dist/tools/round-digest.d.ts +12 -0
- package/dist/tools/round-digest.d.ts.map +1 -0
- package/dist/tools/round-digest.js +190 -0
- package/dist/tools/round-digest.js.map +1 -0
- package/dist/tools/script-census.d.ts +12 -0
- package/dist/tools/script-census.d.ts.map +1 -0
- package/dist/tools/script-census.js +182 -0
- package/dist/tools/script-census.js.map +1 -0
- 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 +53 -0
- package/dist/tools/sequence-analysis.d.ts.map +1 -1
- package/dist/tools/sequence-analysis.js +313 -89
- package/dist/tools/sequence-analysis.js.map +1 -1
- package/dist/tools/server-status.d.ts.map +1 -1
- package/dist/tools/server-status.js +4 -1
- package/dist/tools/server-status.js.map +1 -1
- package/dist/tools/settle-check.d.ts +12 -0
- package/dist/tools/settle-check.d.ts.map +1 -0
- package/dist/tools/settle-check.js +188 -0
- package/dist/tools/settle-check.js.map +1 -0
- 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 +2 -1
- package/dist/tools/sliced-strings.js.map +1 -1
- package/dist/tools/snapshots.d.ts.map +1 -1
- package/dist/tools/snapshots.js +24 -6
- package/dist/tools/snapshots.js.map +1 -1
- package/dist/tools/sparse-elements.d.ts +12 -0
- package/dist/tools/sparse-elements.d.ts.map +1 -0
- package/dist/tools/sparse-elements.js +215 -0
- package/dist/tools/sparse-elements.js.map +1 -0
- package/dist/tools/stale-collections.d.ts +17 -0
- package/dist/tools/stale-collections.d.ts.map +1 -1
- package/dist/tools/stale-collections.js +28 -0
- package/dist/tools/stale-collections.js.map +1 -1
- package/dist/tools/string-patterns.d.ts.map +1 -1
- package/dist/tools/string-patterns.js +7 -5
- 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 +492 -0
- package/dist/tools/tools-index.js.map +1 -0
- package/dist/tools/trace-all.d.ts +42 -0
- package/dist/tools/trace-all.d.ts.map +1 -0
- package/dist/tools/trace-all.js +263 -0
- package/dist/tools/trace-all.js.map +1 -0
- package/dist/tools/unit-cost.d.ts +12 -0
- package/dist/tools/unit-cost.d.ts.map +1 -0
- package/dist/tools/unit-cost.js +219 -0
- package/dist/tools/unit-cost.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 +219 -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/tools/weakref-census.d.ts +15 -0
- package/dist/tools/weakref-census.d.ts.map +1 -0
- package/dist/tools/weakref-census.js +147 -0
- package/dist/tools/weakref-census.js.map +1 -0
- package/dist/tools/what-if.d.ts +12 -0
- package/dist/tools/what-if.d.ts.map +1 -0
- package/dist/tools/what-if.js +285 -0
- package/dist/tools/what-if.js.map +1 -0
- package/dist/utils.d.ts +238 -3
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +507 -15
- package/dist/utils.js.map +1 -1
- package/package.json +7 -6
|
@@ -10,9 +10,17 @@
|
|
|
10
10
|
import fs from 'fs';
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
import memlabHeapAnalysis from '@memlab/heap-analysis';
|
|
13
|
+
import memlabCore from '@memlab/core';
|
|
14
|
+
const { utils: memlabUtils } = memlabCore;
|
|
13
15
|
const { getFullHeapFromFile } = memlabHeapAnalysis;
|
|
14
|
-
import { resolveSnapshotPath } from './load-snapshot.js';
|
|
15
|
-
import { formatBytes, formatNumber, markdownTable,
|
|
16
|
+
import { LOCAL_FILE_SIZE_LIMIT_MB, MANIFOLD_FETCH_SIZE_LIMIT_MB, resolveMaxFileSizeMB, resolveSnapshotPath, } from './load-snapshot.js';
|
|
17
|
+
import { errorResult, formatBytes, formatNumber, markdownTable, pathsHeader, toolResult, } from '../utils.js';
|
|
18
|
+
import { resolveLadderPaths } from './ladder.js';
|
|
19
|
+
import { makeProgressReporter } from '../progress.js';
|
|
20
|
+
import { findResidentByPath, getSnapshotByHandle } from '../heap-state.js';
|
|
21
|
+
import { resetEmittedNotes, shouldEmitNote } from '../heap-state.js';
|
|
22
|
+
import { artifactLabel, artifactNote, classifyArtifact, } from '../artifact-classes.js';
|
|
23
|
+
import { classifyNumericCapture, SMI_NUMBER_CLASS_KEY } from '../capture-mode.js';
|
|
16
24
|
// A class key is "<type>::<name>". Value-named string "classes" (literal
|
|
17
25
|
// values used as the name, e.g. "554", "1780525701808.81", "o:10,add") are
|
|
18
26
|
// noise across a sequence — drop them like diff_snapshots does (§10).
|
|
@@ -25,6 +33,15 @@ function isNoiseClass(type, name) {
|
|
|
25
33
|
return true;
|
|
26
34
|
return false;
|
|
27
35
|
}
|
|
36
|
+
// V8 names per-instance Context/scope objects with a trailing " @<node-id>"
|
|
37
|
+
// (e.g. "system / Context / scope @706909"). Those ids differ per capture, so
|
|
38
|
+
// without normalization every scope is a distinct "class" that appears "new
|
|
39
|
+
// since baseline" and floods the report (observed: ~9,900 such keys, ~133k
|
|
40
|
+
// nodes, in a single Ads snapshot). Collapse the id so they aggregate into one
|
|
41
|
+
// comparable class across the sequence.
|
|
42
|
+
export function normalizeClassName(name) {
|
|
43
|
+
return name.replace(/ @\d+$/, ' @…');
|
|
44
|
+
}
|
|
28
45
|
function buildHistogram(snapshot) {
|
|
29
46
|
const hist = new Map();
|
|
30
47
|
let nodeCount = 0;
|
|
@@ -34,7 +51,7 @@ function buildHistogram(snapshot) {
|
|
|
34
51
|
totalSize += node.self_size;
|
|
35
52
|
if (node.id <= 3)
|
|
36
53
|
return;
|
|
37
|
-
const key = `${node.type}::${node.name}`;
|
|
54
|
+
const key = `${node.type}::${normalizeClassName(node.name)}`;
|
|
38
55
|
const e = hist.get(key);
|
|
39
56
|
if (e) {
|
|
40
57
|
e.count++;
|
|
@@ -64,12 +81,165 @@ function classifyTrend(counts) {
|
|
|
64
81
|
return 'grew-net';
|
|
65
82
|
return 'flat-or-mixed';
|
|
66
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Load an ordered ladder of snapshots and compute per-class growth trends.
|
|
86
|
+
*
|
|
87
|
+
* Extracted from the `memlab_sequence_analysis` handler so it can be composed
|
|
88
|
+
* (see `memlab_leak_report`) instead of re-implemented: the loop that loads each
|
|
89
|
+
* rung, histograms it, and drops the graph before the next is both the expensive
|
|
90
|
+
* part and the part that is easy to get subtly wrong (resolution, size guard,
|
|
91
|
+
* one-graph-resident-at-a-time).
|
|
92
|
+
*
|
|
93
|
+
* Failures THROW rather than returning an MCP error envelope — the callers are
|
|
94
|
+
* tool handlers that already wrap their body in try/catch, and a composed caller
|
|
95
|
+
* needs a failure it cannot accidentally treat as a result.
|
|
96
|
+
*/
|
|
97
|
+
export async function computeSequenceTrends(paths, opts) {
|
|
98
|
+
const toolName = opts.toolName ?? 'memlab_sequence_analysis';
|
|
99
|
+
const steps = [];
|
|
100
|
+
const reusedHandles = [];
|
|
101
|
+
// `paths: ["ladder:<name>"]` expands to a saved ladder (see ladder.ts), so a
|
|
102
|
+
// six-rung trend call is one token instead of six absolute paths.
|
|
103
|
+
const { paths: resolvedPaths } = resolveLadderPaths(paths);
|
|
104
|
+
// The >=2 requirement is enforced here rather than in the schema: a ladder
|
|
105
|
+
// reference is a SINGLE array element that expands to many, so a schema-level
|
|
106
|
+
// `.min(2)` rejects `["ladder:name"]` before it can be expanded.
|
|
107
|
+
if (resolvedPaths.length < 2) {
|
|
108
|
+
throw new Error(`${toolName} needs at least 2 snapshots; got ${resolvedPaths.length}. ` +
|
|
109
|
+
(paths.length === 1 && paths[0].startsWith('ladder:')
|
|
110
|
+
? 'That ladder has fewer than 2 rungs — check it with memlab_ladder({action:"show"}).'
|
|
111
|
+
: 'Pass an ordered list of paths, or a single ["ladder:<name>"] reference.'));
|
|
112
|
+
}
|
|
113
|
+
let rungIndex = 0;
|
|
114
|
+
for (const p of resolvedPaths) {
|
|
115
|
+
rungIndex++;
|
|
116
|
+
opts.progress?.phase(rungIndex, resolvedPaths.length, `rung ${rungIndex}/${resolvedPaths.length}: ${p.replace(/^.*\//, '')}`);
|
|
117
|
+
let local;
|
|
118
|
+
let fetchedFrom = null;
|
|
119
|
+
try {
|
|
120
|
+
const r = resolveSnapshotPath(p);
|
|
121
|
+
local = r.localPath;
|
|
122
|
+
fetchedFrom = r.fetchedFrom;
|
|
123
|
+
}
|
|
124
|
+
catch (e) {
|
|
125
|
+
throw new Error(`Failed to resolve "${p}": ${e instanceof Error ? e.message : String(e)}`);
|
|
126
|
+
}
|
|
127
|
+
if (!fs.existsSync(local)) {
|
|
128
|
+
throw new Error(`File not found: ${local}`);
|
|
129
|
+
}
|
|
130
|
+
const sizeMB = fs.statSync(local).size / (1024 * 1024);
|
|
131
|
+
const effectiveMaxFileSizeMB = resolveMaxFileSizeMB(opts.maxFileSizeMB, fetchedFrom != null);
|
|
132
|
+
if (sizeMB > effectiveMaxFileSizeMB) {
|
|
133
|
+
throw new Error(`${p} is ${sizeMB.toFixed(0)} MB — exceeds the ${effectiveMaxFileSizeMB} MB per-file safety limit. ` +
|
|
134
|
+
`Raise it with ${toolName}({max_file_size_mb: ${Math.ceil(sizeMB + 100)}}), ` +
|
|
135
|
+
`or restart the MCP server with more memory (NODE_OPTIONS="--max-old-space-size=8192") if it isn't already provisioned.`);
|
|
136
|
+
}
|
|
137
|
+
// Reuse a snapshot that is already resident rather than re-parsing it.
|
|
138
|
+
// Parsing a 250 MB capture costs tens of seconds, and the common call
|
|
139
|
+
// shape is a ladder whose rungs the caller already loaded to look at
|
|
140
|
+
// individually — so the expensive step was being paid twice for no
|
|
141
|
+
// difference in the result. Resident graphs are read-only here and the
|
|
142
|
+
// active handle is never changed.
|
|
143
|
+
const resident = findResidentByPath(local);
|
|
144
|
+
const residentSnapshot = resident != null ? getSnapshotByHandle(resident.handle) : null;
|
|
145
|
+
if (residentSnapshot != null)
|
|
146
|
+
reusedHandles.push(resident?.fileName ?? local);
|
|
147
|
+
// Otherwise load sequentially and drop the graph before the next one so
|
|
148
|
+
// only one full graph is resident at a time (memory-safe for big heaps).
|
|
149
|
+
// The trend pass reads counts, names, types and SELF sizes only —
|
|
150
|
+
// `buildHistogram` touches nothing that the dominator / retained-size /
|
|
151
|
+
// shortest-path pass produces. That pass is the expensive half of a load
|
|
152
|
+
// (measured on a 380 MB / 4.19M-node capture: 18s vs 8s), and paying it on
|
|
153
|
+
// five rungs to compute a histogram is most of why a six-rung report gets
|
|
154
|
+
// backgrounded past the tool timeout. A resident graph is still reused
|
|
155
|
+
// as-is, light or not.
|
|
156
|
+
const useLight = opts.light !== false;
|
|
157
|
+
const snapshot = residentSnapshot ??
|
|
158
|
+
(useLight
|
|
159
|
+
? await memlabUtils.getSnapshotFromFile(local, {
|
|
160
|
+
buildNodeIdIndex: true,
|
|
161
|
+
verbose: false,
|
|
162
|
+
})
|
|
163
|
+
: await getFullHeapFromFile(local));
|
|
164
|
+
const { hist, nodeCount, totalSize } = buildHistogram(snapshot);
|
|
165
|
+
steps.push({
|
|
166
|
+
label: fetchedFrom ?? p.replace(/^.*\//, ''),
|
|
167
|
+
localPath: local,
|
|
168
|
+
hist,
|
|
169
|
+
nodeCount,
|
|
170
|
+
totalSize,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
const n = steps.length;
|
|
174
|
+
// Union of non-noise class keys.
|
|
175
|
+
const keys = new Set();
|
|
176
|
+
for (const s of steps) {
|
|
177
|
+
for (const k of s.hist.keys()) {
|
|
178
|
+
const sep = k.indexOf('::');
|
|
179
|
+
const type = k.slice(0, sep);
|
|
180
|
+
const name = k.slice(sep + 2);
|
|
181
|
+
if (!isNoiseClass(type, name))
|
|
182
|
+
keys.add(k);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const rows = [];
|
|
186
|
+
for (const k of keys) {
|
|
187
|
+
const counts = steps.map(s => s.hist.get(k)?.count ?? 0);
|
|
188
|
+
const sizes = steps.map(s => s.hist.get(k)?.selfSize ?? 0);
|
|
189
|
+
const netCount = counts[n - 1] - counts[0];
|
|
190
|
+
const netSize = sizes[n - 1] - sizes[0];
|
|
191
|
+
if (netCount < opts.minGrowthCount)
|
|
192
|
+
continue;
|
|
193
|
+
const trend = classifyTrend(counts);
|
|
194
|
+
if (opts.monotonicOnly && trend !== 'monotonic-up')
|
|
195
|
+
continue;
|
|
196
|
+
if (trend !== 'monotonic-up' && trend !== 'grew-net')
|
|
197
|
+
continue;
|
|
198
|
+
const sep = k.indexOf('::');
|
|
199
|
+
const name = k.slice(sep + 2);
|
|
200
|
+
rows.push({
|
|
201
|
+
key: k,
|
|
202
|
+
type: k.slice(0, sep),
|
|
203
|
+
name,
|
|
204
|
+
counts,
|
|
205
|
+
netCount,
|
|
206
|
+
netSize,
|
|
207
|
+
trend,
|
|
208
|
+
artifact: classifyArtifact(name),
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
// Real growers first: genuine classes ahead of known artifacts, then
|
|
212
|
+
// monotonic ahead of noisy, then by net size delta.
|
|
213
|
+
rows.sort((a, b) => {
|
|
214
|
+
const aArt = a.artifact != null;
|
|
215
|
+
const bArt = b.artifact != null;
|
|
216
|
+
if (aArt !== bArt)
|
|
217
|
+
return aArt ? 1 : -1;
|
|
218
|
+
if (a.trend !== b.trend)
|
|
219
|
+
return a.trend === 'monotonic-up' ? -1 : 1;
|
|
220
|
+
return b.netSize - a.netSize;
|
|
221
|
+
});
|
|
222
|
+
return { steps, rows, keys, reusedHandles };
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Artifact-family explanations are long and identical on every call. Print the
|
|
226
|
+
* full note once per session and a one-line pointer afterwards; the COUNTS that
|
|
227
|
+
* accompany it are per-call data and are always shown by the caller.
|
|
228
|
+
*/
|
|
229
|
+
function pushArtifactNote(lines, kind) {
|
|
230
|
+
if (shouldEmitNote(`artifact:${kind}`)) {
|
|
231
|
+
lines.push('', `> ${artifactNote(kind)}`);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
lines.push('', `> ${artifactLabel(kind)} — explained earlier this session.`);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
67
237
|
export function registerSequenceAnalysis(server) {
|
|
68
238
|
server.tool('memlab_sequence_analysis', 'Trend analysis across an ORDERED sequence of >=2 heap snapshots (the canonical "is anything growing unboundedly?" tool). Loads each snapshot transiently (does NOT change your active snapshot), builds per-class histograms, and reports each class\'s value at every step plus a growth verdict: "monotonic-up" (grew every step — strongest leak signal) vs "grew-net" (grew overall but not every step — often GC/navigation noise) vs flat/shrank. Also lists classes new since the baseline. Paths may be local, manifold:// URLs, or bare filenames.', {
|
|
69
239
|
paths: z
|
|
70
240
|
.array(z.string())
|
|
71
|
-
.min(
|
|
72
|
-
.describe('Ordered list of >=2 snapshot paths (oldest first)
|
|
241
|
+
.min(1)
|
|
242
|
+
.describe('Ordered list of >=2 snapshot paths (oldest first): local absolute paths, manifold:// URLs, or bare snapshot filenames. A single ["ladder:<name>"] entry expands to a ladder saved with memlab_ladder.'),
|
|
73
243
|
limit: z
|
|
74
244
|
.number()
|
|
75
245
|
.optional()
|
|
@@ -85,79 +255,46 @@ export function registerSequenceAnalysis(server) {
|
|
|
85
255
|
.optional()
|
|
86
256
|
.default(false)
|
|
87
257
|
.describe('Report only classes that grew at EVERY step (default false: include grew-net too, flagged).'),
|
|
258
|
+
cycles: z
|
|
259
|
+
.number()
|
|
260
|
+
.optional()
|
|
261
|
+
.describe('Number of interaction cycles driven between the FIRST and LAST snapshot. When provided, a "Δ/cycle" column is reported. A per-cycle rate — not a total — is what tells you whether growth scales with interaction, and it is the number a leak hunt actually reasons about.'),
|
|
262
|
+
include_artifacts: z
|
|
263
|
+
.boolean()
|
|
264
|
+
.optional()
|
|
265
|
+
.default(false)
|
|
266
|
+
.describe('Include classes that are known measurement artifacts (CDP inspector network/performance/console retention, V8 JIT warmup, Blink a11y caches, captured Error stacks). Default false: they are collapsed into a one-line summary instead of filling the table, because in practice they dominate the top of the list and none of them is an app leak.'),
|
|
267
|
+
repeat_notes: z
|
|
268
|
+
.boolean()
|
|
269
|
+
.optional()
|
|
270
|
+
.default(false)
|
|
271
|
+
.describe('Re-print the standing explanatory notes (artifact-family write-ups, capture-mode caveats, the "candidate, not verdict" paragraph) that are otherwise emitted once per server session. The per-call DATA — which classes grew, how many artifacts were suppressed — is always shown; only the unchanging prose is deduplicated.'),
|
|
88
272
|
max_file_size_mb: z
|
|
89
273
|
.number()
|
|
90
274
|
.optional()
|
|
91
|
-
.
|
|
92
|
-
|
|
93
|
-
}, async ({ paths, limit, min_growth_count, monotonic_only, max_file_size_mb, }) => {
|
|
275
|
+
.describe(`Per-file size ceiling in MB to avoid OOM. Matches memlab_load_snapshot's by-source defaults — ${LOCAL_FILE_SIZE_LIMIT_MB} for local files and ${MANIFOLD_FETCH_SIZE_LIMIT_MB} for snapshots fetched from Manifold (server captures routinely exceed the local limit); pass an explicit value to override. Snapshots are loaded one at a time and dropped before the next, so a ladder of large files is safe as long as each single file is under the ceiling.`),
|
|
276
|
+
}, async ({ paths, limit, min_growth_count, monotonic_only, cycles, include_artifacts, repeat_notes, max_file_size_mb, }, extra) => {
|
|
94
277
|
try {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
catch (e) {
|
|
105
|
-
return errorResult(new Error(`Failed to resolve "${p}": ${e instanceof Error ? e.message : String(e)}`));
|
|
106
|
-
}
|
|
107
|
-
if (!fs.existsSync(local)) {
|
|
108
|
-
return errorResult(new Error(`File not found: ${local}`));
|
|
109
|
-
}
|
|
110
|
-
const sizeMB = fs.statSync(local).size / (1024 * 1024);
|
|
111
|
-
if (sizeMB > max_file_size_mb) {
|
|
112
|
-
return errorResult(new Error(`${p} is ${sizeMB.toFixed(0)} MB — exceeds max_file_size_mb (${max_file_size_mb}).`));
|
|
113
|
-
}
|
|
114
|
-
// Load sequentially and drop the graph before the next one so only
|
|
115
|
-
// one full graph is resident at a time (memory-safe for big heaps).
|
|
116
|
-
const snapshot = await getFullHeapFromFile(local);
|
|
117
|
-
const { hist, nodeCount, totalSize } = buildHistogram(snapshot);
|
|
118
|
-
steps.push({
|
|
119
|
-
label: fetchedFrom ?? p.replace(/^.*\//, ''),
|
|
120
|
-
hist,
|
|
121
|
-
nodeCount,
|
|
122
|
-
totalSize,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
278
|
+
if (repeat_notes)
|
|
279
|
+
resetEmittedNotes();
|
|
280
|
+
const { steps, rows, keys, reusedHandles } = await computeSequenceTrends(paths, {
|
|
281
|
+
minGrowthCount: min_growth_count,
|
|
282
|
+
monotonicOnly: monotonic_only,
|
|
283
|
+
maxFileSizeMB: max_file_size_mb,
|
|
284
|
+
progress: makeProgressReporter(extra, 'sequence_analysis'),
|
|
285
|
+
});
|
|
125
286
|
const n = steps.length;
|
|
126
287
|
const first = steps[0].hist;
|
|
127
288
|
const last = steps[n - 1].hist;
|
|
128
|
-
//
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
const rows = [];
|
|
140
|
-
for (const k of keys) {
|
|
141
|
-
const counts = steps.map(s => s.hist.get(k)?.count ?? 0);
|
|
142
|
-
const sizes = steps.map(s => s.hist.get(k)?.selfSize ?? 0);
|
|
143
|
-
const netCount = counts[n - 1] - counts[0];
|
|
144
|
-
const netSize = sizes[n - 1] - sizes[0];
|
|
145
|
-
if (netCount < min_growth_count)
|
|
146
|
-
continue;
|
|
147
|
-
const trend = classifyTrend(counts);
|
|
148
|
-
if (monotonic_only && trend !== 'monotonic-up')
|
|
149
|
-
continue;
|
|
150
|
-
if (trend !== 'monotonic-up' && trend !== 'grew-net')
|
|
151
|
-
continue;
|
|
152
|
-
rows.push({ key: k, counts, netCount, netSize, trend });
|
|
153
|
-
}
|
|
154
|
-
// Monotonic growers first, then by net size delta.
|
|
155
|
-
rows.sort((a, b) => {
|
|
156
|
-
if (a.trend !== b.trend)
|
|
157
|
-
return a.trend === 'monotonic-up' ? -1 : 1;
|
|
158
|
-
return b.netSize - a.netSize;
|
|
159
|
-
});
|
|
160
|
-
const top = rows.slice(0, limit);
|
|
289
|
+
// Known artifacts dominate the top of this table in practice and none
|
|
290
|
+
// of them is an app leak, so by default they are summarized rather than
|
|
291
|
+
// listed. They are still counted, and `include_artifacts` brings them
|
|
292
|
+
// back — suppression must never be silent.
|
|
293
|
+
const artifactRows = rows.filter(r => r.artifact != null);
|
|
294
|
+
const candidateRows = include_artifacts
|
|
295
|
+
? rows
|
|
296
|
+
: rows.filter(r => r.artifact == null);
|
|
297
|
+
const top = candidateRows.slice(0, limit);
|
|
161
298
|
const lines = [
|
|
162
299
|
`## Sequence / Trend Analysis (${n} snapshots)`,
|
|
163
300
|
'',
|
|
@@ -171,18 +308,33 @@ export function registerSequenceAnalysis(server) {
|
|
|
171
308
|
formatBytes(s.totalSize),
|
|
172
309
|
]);
|
|
173
310
|
lines.push(markdownTable(totalHeaders, totalRows, new Set([2, 3])));
|
|
311
|
+
if (reusedHandles.length > 0) {
|
|
312
|
+
lines.push('', `_${reusedHandles.length} of ${n} rung(s) were served from a snapshot already resident in this session rather than re-parsed._`);
|
|
313
|
+
}
|
|
174
314
|
const heapNet = steps[n - 1].totalSize - steps[0].totalSize;
|
|
175
315
|
lines.push('', `Overall heap self-size ${heapNet >= 0 ? 'grew' : 'shrank'} by ${formatBytes(Math.abs(heapNet))} across the sequence.`, '');
|
|
316
|
+
// With exactly two rungs "grew at every step" is the same statement as
|
|
317
|
+
// "grew overall", so the monotonic verdict carries no extra information
|
|
318
|
+
// and cannot distinguish a trend from a GC-band sample. Measured case: a
|
|
319
|
+
// 2-rung ladder read as a confident +154 KB/cycle retained leak, and a
|
|
320
|
+
// third and fourth rung showed the heap falling back below where it
|
|
321
|
+
// started — the band was ~25 MB wide, easily enough to fake a linear
|
|
322
|
+
// slope. Say so rather than letting the label imply a trend.
|
|
323
|
+
if (n === 2) {
|
|
324
|
+
lines.push('> ⚠️ **Only 2 snapshots: "↑ every step" is monotonic by construction** and cannot separate a real trend from a single GC-band sample. Capture at least a third rung (and prefer a targeted-retainer count over aggregate heap) before treating anything here as a leak.', '');
|
|
325
|
+
}
|
|
176
326
|
if (top.length === 0) {
|
|
177
327
|
lines.push(`No classes grew by >= ${formatNumber(min_growth_count)} instances across the sequence. Heap looks flat-to-shrinking — no unbounded-growth signal.`);
|
|
178
|
-
return toolResult(lines.join('\n'));
|
|
328
|
+
return toolResult(lines.join('\n'), pathsHeader(steps.map(s => s.label)));
|
|
179
329
|
}
|
|
180
330
|
lines.push('### Growing classes', '');
|
|
331
|
+
const perCycle = cycles != null && cycles > 0;
|
|
181
332
|
const headers = [
|
|
182
333
|
'Class',
|
|
183
334
|
'Type',
|
|
184
335
|
...steps.map((_, i) => `#${i + 1}`),
|
|
185
336
|
'Δ count',
|
|
337
|
+
...(perCycle ? ['Δ/cycle'] : []),
|
|
186
338
|
'Δ size',
|
|
187
339
|
'Verdict',
|
|
188
340
|
];
|
|
@@ -190,17 +342,18 @@ export function registerSequenceAnalysis(server) {
|
|
|
190
342
|
for (let i = 2; i < headers.length - 1; i++)
|
|
191
343
|
rightCols.add(i);
|
|
192
344
|
const tableRows = top.map(r => {
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
345
|
+
const { type, name } = r;
|
|
346
|
+
const verdict = r.artifact != null
|
|
347
|
+
? artifactLabel(r.artifact)
|
|
348
|
+
: r.trend === 'monotonic-up'
|
|
349
|
+
? '↑ every step (LEAK candidate)'
|
|
350
|
+
: 'grew net (noisy)';
|
|
199
351
|
return [
|
|
200
352
|
name.length > 36 ? name.slice(0, 33) + '…' : name,
|
|
201
353
|
type,
|
|
202
354
|
...r.counts.map(c => formatNumber(c)),
|
|
203
355
|
`+${formatNumber(r.netCount)}`,
|
|
356
|
+
...(perCycle ? [(r.netCount / cycles).toFixed(2)] : []),
|
|
204
357
|
`${r.netSize >= 0 ? '+' : ''}${formatBytes(r.netSize)}`,
|
|
205
358
|
verdict,
|
|
206
359
|
];
|
|
@@ -213,7 +366,11 @@ export function registerSequenceAnalysis(server) {
|
|
|
213
366
|
const c = last.get(k)?.count ?? 0;
|
|
214
367
|
if (c >= min_growth_count) {
|
|
215
368
|
const sep = k.indexOf('::');
|
|
216
|
-
|
|
369
|
+
const name = k.slice(sep + 2);
|
|
370
|
+
// Don't clutter the list with known JIT/automation artifacts.
|
|
371
|
+
if (classifyArtifact(name) != null)
|
|
372
|
+
continue;
|
|
373
|
+
newClasses.push(`${name} (${formatNumber(c)})`);
|
|
217
374
|
}
|
|
218
375
|
}
|
|
219
376
|
}
|
|
@@ -223,18 +380,85 @@ export function registerSequenceAnalysis(server) {
|
|
|
223
380
|
? `, … +${newClasses.length - 20} more`
|
|
224
381
|
: ''));
|
|
225
382
|
}
|
|
226
|
-
//
|
|
227
|
-
//
|
|
228
|
-
//
|
|
229
|
-
//
|
|
230
|
-
//
|
|
231
|
-
//
|
|
232
|
-
//
|
|
383
|
+
// `heap number` growth is a capture artifact when the snapshot was
|
|
384
|
+
// taken with numeric-value capture on (Chrome's captureNumericValue /
|
|
385
|
+
// the browser MCP's capture_numeric_value): that mode emits one graph
|
|
386
|
+
// node per distinct number and ~3x inflates the graph. With it off,
|
|
387
|
+
// these are ordinary boxed doubles that V8 allocates anyway, and growth
|
|
388
|
+
// can be a REAL signal.
|
|
389
|
+
//
|
|
390
|
+
// We deliberately do NOT try to auto-detect which mode produced the
|
|
391
|
+
// snapshot. The obvious signal — value-named nodes of type `number` —
|
|
392
|
+
// does not separate the two: a snapshot captured with
|
|
393
|
+
// capture_numeric_value:false was measured with 47,874 `heap number`
|
|
394
|
+
// nodes AND 165,193 value-named numeric nodes, so any threshold on that
|
|
395
|
+
// count mislabels it. Stating a conditional the caller can resolve from
|
|
396
|
+
// their own capture settings beats asserting a mode we cannot verify;
|
|
397
|
+
// the previous copy declared this "almost always a capture artifact"
|
|
398
|
+
// unconditionally, which trains readers to dismiss a grower that may be
|
|
399
|
+
// real.
|
|
233
400
|
if (top.some(r => r.key === 'number::heap number')) {
|
|
234
|
-
|
|
401
|
+
// State the answer instead of asking the caller for it. The runtime
|
|
402
|
+
// and the numeric-capture mode are both derivable from the histograms
|
|
403
|
+
// already built above, at no extra cost: `smi number` is the marker
|
|
404
|
+
// node type, and a `Window …` class means a browser capture. See
|
|
405
|
+
// capture-mode.ts for the matched-pair measurements behind this.
|
|
406
|
+
const last = steps[n - 1].hist;
|
|
407
|
+
const isBrowser = [...last.keys()].some(k => k.startsWith('object::Window '));
|
|
408
|
+
const isNode = !isBrowser && [...last.keys()].some(k => k === 'object::Module');
|
|
409
|
+
const verdict = classifyNumericCapture(isBrowser ? 'browser' : isNode ? 'node' : 'unknown', last.has(SMI_NUMBER_CLASS_KEY));
|
|
410
|
+
lines.push('', shouldEmitNote('seq:heap-number')
|
|
411
|
+
? `> ⚠️ \`heap number\` is growing. ${verdict.note}`
|
|
412
|
+
: '> ⚠️ `heap number` is growing (capture-mode caveat already stated this session).');
|
|
413
|
+
}
|
|
414
|
+
// `smi number` growth in a Node capture is pure capture overhead — those
|
|
415
|
+
// nodes do not exist unless the flag asked for them.
|
|
416
|
+
if (top.some(r => r.key === SMI_NUMBER_CLASS_KEY) &&
|
|
417
|
+
![...steps[n - 1].hist.keys()].some(k => k.startsWith('object::Window '))) {
|
|
418
|
+
lines.push('', shouldEmitNote('seq:smi-number')
|
|
419
|
+
? '> ⚠️ `smi number` is growing in a Node.js capture. Those nodes only exist because the snapshot was taken with numeric-value capture ON; they are capture overhead, not application memory. Re-capture without it to remove them from the trend.'
|
|
420
|
+
: '> ⚠️ `smi number` is growing — capture overhead (note already stated this session).');
|
|
421
|
+
}
|
|
422
|
+
// Known-artifact families: either annotate the rows that were shown,
|
|
423
|
+
// or account for the ones that were collapsed. Either way the caller is
|
|
424
|
+
// told what was set aside and why.
|
|
425
|
+
const shownKinds = new Set();
|
|
426
|
+
for (const r of top)
|
|
427
|
+
if (r.artifact != null)
|
|
428
|
+
shownKinds.add(r.artifact);
|
|
429
|
+
const suppressedByKind = new Map();
|
|
430
|
+
if (!include_artifacts) {
|
|
431
|
+
for (const r of artifactRows) {
|
|
432
|
+
suppressedByKind.set(r.artifact, (suppressedByKind.get(r.artifact) ?? 0) + 1);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
if (suppressedByKind.size > 0) {
|
|
436
|
+
const parts = [...suppressedByKind.entries()]
|
|
437
|
+
.sort((a, b) => b[1] - a[1])
|
|
438
|
+
.map(([kind, count]) => `${kind} ${count}`);
|
|
439
|
+
lines.push('', `> 🧹 **${artifactRows.length} growing class(es) suppressed as known measurement artifacts** (${parts.join(', ')}). None of these families is an application leak; pass \`include_artifacts: true\` to see them.`);
|
|
440
|
+
for (const kind of suppressedByKind.keys()) {
|
|
441
|
+
pushArtifactNote(lines, kind);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
for (const kind of shownKinds) {
|
|
445
|
+
pushArtifactNote(lines, kind);
|
|
446
|
+
}
|
|
447
|
+
if (shouldEmitNote('seq:candidate-not-verdict')) {
|
|
448
|
+
lines.push('', '_"↑ every step (LEAK candidate)" is the strong unbounded-growth signal — it is a candidate, not a verdict: confirm with `memlab_dev_artifacts` and a `memlab_retainer_trace` before calling it a leak; "grew net (noisy)" often reflects GC timing or navigation and warrants a closer look before treating as a leak. Object-identity matching across snapshots is not available (node ids differ per capture) — to localize a specific growing collection, load the last snapshot and use `memlab_cache_analysis` / `memlab_event_listener_leaks` / `memlab_growth_signals`._');
|
|
449
|
+
}
|
|
450
|
+
else {
|
|
451
|
+
lines.push('', '_"↑ every step" is a candidate, not a verdict — see the first `memlab_sequence_analysis` result this session for the full caveat, or pass `repeat_notes: true`._');
|
|
235
452
|
}
|
|
236
|
-
|
|
237
|
-
|
|
453
|
+
// A ladder driven under load cannot distinguish retention from work in
|
|
454
|
+
// flight: a burst legitimately inflates promise chains, IDB
|
|
455
|
+
// transactions, scheduler queues and request buffers, and every one of
|
|
456
|
+
// those climbs at every step exactly like a leak. The check that
|
|
457
|
+
// separates them is a rung captured after the app settles, and it is
|
|
458
|
+
// the step most often skipped — so the absence of one is called out
|
|
459
|
+
// here rather than left for the reader to remember.
|
|
460
|
+
lines.push('', '⏳ **No settle rung.** Every growth figure above was measured while the app was active, so in-flight work is indistinguishable from retention here. Capture one more snapshot after ~30-60s idle with a forced GC and run `memlab_settle_check(busy_handle, settled_handle)`: classes that return to baseline were backlog, not leaks.');
|
|
461
|
+
return toolResult(lines.join('\n'), pathsHeader(steps.map(s => s.label)));
|
|
238
462
|
}
|
|
239
463
|
catch (err) {
|
|
240
464
|
return errorResult(err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequence-analysis.js","sourceRoot":"","sources":["../../src/tools/sequence-analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,MAAM,EAAC,mBAAmB,EAAC,GAAG,kBAAkB,CAAC;AACjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACvD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,GACX,MAAM,aAAa,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AAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;oBAChC,CAAC,UAAU,CAAC,MAAM,GAAG,EAAE;wBACrB,CAAC,CAAC,QAAQ,UAAU,CAAC,MAAM,GAAG,EAAE,OAAO;wBACvC,CAAC,CAAC,EAAE,CAAC,CACV,CAAC;YACJ,CAAC;YAED,mEAAmE;YACnE,oEAAoE;YACpE,0EAA0E;YAC1E,qEAAqE;YACrE,wEAAwE;YACxE,oEAAoE;YACpE,gCAAgC;YAChC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,qBAAqB,CAAC,EAAE,CAAC;gBACnD,KAAK,CAAC,IAAI,CACR,EAAE,EACF,gWAAgW,CACjW,CAAC;YACJ,CAAC;YAED,KAAK,CAAC,IAAI,CACR,EAAE,EACF,iaAAia,CACla,CAAC;YAEF,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"sequence-analysis.js","sourceRoot":"","sources":["../../src/tools/sequence-analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,MAAM,EAAC,KAAK,EAAE,WAAW,EAAC,GAAG,UAAU,CAAC;AACxC,MAAM,EAAC,mBAAmB,EAAC,GAAG,kBAAkB,CAAC;AACjD,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;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EAAE,EACF,ijBAAijB,CACljB,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,IAAI,CACR,EAAE,EACF,kKAAkK,CACnK,CAAC;YACJ,CAAC;YAED,uEAAuE;YACvE,4DAA4D;YAC5D,uEAAuE;YACvE,iEAAiE;YACjE,qEAAqE;YACrE,oEAAoE;YACpE,oDAAoD;YACpD,KAAK,CAAC,IAAI,CACR,EAAE,EACF,uUAAuU,CACxU,CAAC;YAEF,OAAO,UAAU,CACf,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAChB,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACrC,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-status.d.ts","sourceRoot":"","sources":["../../src/tools/server-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"server-status.d.ts","sourceRoot":"","sources":["../../src/tools/server-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAKvE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwC5D"}
|
|
@@ -7,19 +7,22 @@
|
|
|
7
7
|
* @format
|
|
8
8
|
* @oncall memory_lab
|
|
9
9
|
*/
|
|
10
|
+
import { SERVER_VERSION } from '../server-version.js';
|
|
10
11
|
import { listSnapshots, getCurrentHandle } from '../heap-state.js';
|
|
11
12
|
import { formatBytes, formatNumber, errorResult, textResult } from '../utils.js';
|
|
12
13
|
export function registerServerStatus(server) {
|
|
13
|
-
server.tool('memlab_server_status', 'Cheap liveness/health check: returns instantly with the server process RSS, uptime, and the resident snapshots. Use it to confirm the server is responsive (vs. stuck behind a heavy scan) and to watch RSS against the snapshot-size ceiling. Scan tools are time-budgeted (timeout_ms) so a heavy scan returns cleanly instead of wedging the server; if a call ever seems hung, this check should still answer immediately.', {}, async () => {
|
|
14
|
+
server.tool('memlab_server_status', 'Cheap liveness/health check: returns instantly with the server VERSION, process RSS, uptime, and the resident snapshots. The version answers "is the attached server actually my local build?" — a running server keeps old code in memory after a rebuild, and the only previous way to tell was a hand-rolled JSON-RPC initialize handshake. Use it to confirm the server is responsive (vs. stuck behind a heavy scan) and to watch RSS against the snapshot-size ceiling. Scan tools are time-budgeted (timeout_ms) so a heavy scan returns cleanly instead of wedging the server; if a call ever seems hung, this check should still answer immediately.', {}, async () => {
|
|
14
15
|
try {
|
|
15
16
|
const mem = process.memoryUsage();
|
|
16
17
|
const uptimeS = Math.round(process.uptime());
|
|
18
|
+
const version = SERVER_VERSION;
|
|
17
19
|
const all = listSnapshots();
|
|
18
20
|
const cur = getCurrentHandle();
|
|
19
21
|
const lines = [
|
|
20
22
|
'## memlab server status',
|
|
21
23
|
'',
|
|
22
24
|
`- Status: ready`,
|
|
25
|
+
`- Server version: **${version}**`,
|
|
23
26
|
`- Uptime: ${uptimeS}s`,
|
|
24
27
|
`- Process RSS: ${formatBytes(mem.rss)} (heapUsed ${formatBytes(mem.heapUsed)} / heapTotal ${formatBytes(mem.heapTotal)})`,
|
|
25
28
|
`- Resident snapshots: ${all.length}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-status.js","sourceRoot":"","sources":["../../src/tools/server-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU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AAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CACjI,CAAC;YACJ,CAAC;YACD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACrB,KAAK,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;YAC3D,CAAC;YACD,KAAK,CAAC,IAAI,CACR,EAAE,EACF,wPAAwP,EACxP,2MAA2M,CAC5M,CAAC;YACF,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
11
|
+
export declare function registerSettleCheck(server: McpServer): void;
|
|
12
|
+
//# sourceMappingURL=settle-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settle-check.d.ts","sourceRoot":"","sources":["../../src/tools/settle-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAgEvE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwK3D"}
|