memorydetective 1.7.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/README.md +61 -29
- package/USAGE.md +87 -41
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime/axe.d.ts +86 -0
- package/dist/runtime/axe.js +249 -0
- package/dist/runtime/axe.js.map +1 -0
- package/dist/runtime/buildSettings.d.ts +27 -0
- package/dist/runtime/buildSettings.js +88 -0
- package/dist/runtime/buildSettings.js.map +1 -0
- package/dist/runtime/exec.d.ts +8 -1
- package/dist/runtime/exec.js +8 -2
- package/dist/runtime/exec.js.map +1 -1
- package/dist/runtime/simctl.d.ts +68 -0
- package/dist/runtime/simctl.js +194 -0
- package/dist/runtime/simctl.js.map +1 -0
- package/dist/tools/bootAndLaunchForLeakInvestigation.d.ts +166 -0
- package/dist/tools/bootAndLaunchForLeakInvestigation.js +367 -0
- package/dist/tools/bootAndLaunchForLeakInvestigation.js.map +1 -0
- package/dist/tools/captureMemgraph.d.ts +29 -1
- package/dist/tools/captureMemgraph.js +148 -6
- package/dist/tools/captureMemgraph.js.map +1 -1
- package/dist/tools/captureScenarioState.d.ts +77 -0
- package/dist/tools/captureScenarioState.js +159 -0
- package/dist/tools/captureScenarioState.js.map +1 -0
- package/dist/tools/detectLeaksInXCUITest.d.ts +2 -2
- package/dist/tools/getInvestigationPlaybook.d.ts +15 -0
- package/dist/tools/getInvestigationPlaybook.js +24 -1
- package/dist/tools/getInvestigationPlaybook.js.map +1 -1
- package/dist/tools/replayScenario.d.ts +243 -0
- package/dist/tools/replayScenario.js +187 -0
- package/dist/tools/replayScenario.js.map +1 -0
- package/package.json +3 -2
package/USAGE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Usage guide
|
|
2
2
|
|
|
3
|
-
Walkthrough of how `memorydetective` actually works in practice
|
|
3
|
+
Walkthrough of how `memorydetective` actually works in practice. What each tool returns, how fixes flow from diagnosis to your codebase, and the architecture decision behind splitting "diagnose" from "edit".
|
|
4
4
|
|
|
5
5
|
For a quick API reference, see the [`README.md`](./README.md). For the full changelog, see [`CHANGELOG.md`](./CHANGELOG.md).
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ For a quick API reference, see the [`README.md`](./README.md). For the full chan
|
|
|
8
8
|
|
|
9
9
|
## 1. Three ways to use it
|
|
10
10
|
|
|
11
|
-
### 1a. CLI mode
|
|
11
|
+
### 1a. CLI mode. Quickest way to see it work
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
npm install -g memorydetective
|
|
@@ -62,16 +62,16 @@ You see one block per ROOT CYCLE, like:
|
|
|
62
62
|
swiftui.foreach-state-tap
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
### 1b. JSON mode
|
|
65
|
+
### 1b. JSON mode. For scripts and CI
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
68
|
memorydetective analyze ~/Desktop/myapp.memgraph --json | jq .totals
|
|
69
69
|
memorydetective classify ~/Desktop/myapp.memgraph --json | jq '.classified[0].primaryMatch'
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
The JSON shape mirrors the MCP tool's response
|
|
72
|
+
The JSON shape mirrors the MCP tool's response. Same fields, no ANSI colours, ready to pipe into anything.
|
|
73
73
|
|
|
74
|
-
### 1c. MCP mode
|
|
74
|
+
### 1c. MCP mode. The actual product UX
|
|
75
75
|
|
|
76
76
|
This is what we built it for: an LLM agent (Claude Code, Claude Desktop, Cursor, Cline, Kiro, …) drives the investigation by chat.
|
|
77
77
|
|
|
@@ -99,12 +99,12 @@ Claude orchestrates the full flow (see [section 3](#3-how-fixes-actually-flow-fr
|
|
|
99
99
|
`classifyCycle` ships with a built-in catalog of 34 common iOS retain-cycle patterns. Each pattern returns:
|
|
100
100
|
|
|
101
101
|
- a textual `fixHint` (one-line plain-English direction)
|
|
102
|
-
- a `staticAnalysisHint` (which SwiftLint rule complements the runtime evidence
|
|
103
|
-
- a `fixTemplate` (Swift before/after code snippet
|
|
102
|
+
- a `staticAnalysisHint` (which SwiftLint rule complements the runtime evidence. Or an explicit gap notice)
|
|
103
|
+
- a `fixTemplate` (Swift before/after code snippet. New in v1.7) the agent can adapt directly
|
|
104
104
|
|
|
105
105
|
Patterns are grouped below by the framework / source they target.
|
|
106
106
|
|
|
107
|
-
### v1.0 core (8)
|
|
107
|
+
### v1.0 core (8). SwiftUI + Combine + Concurrency + Notifications
|
|
108
108
|
|
|
109
109
|
| Pattern ID | When it matches | Fix hint (summary) |
|
|
110
110
|
|---|---|---|
|
|
@@ -117,7 +117,7 @@ Patterns are grouped below by the framework / source they target.
|
|
|
117
117
|
| `concurrency.task-without-weak-self` | `_Concurrency.Task<…>` + `Closure context` | `Task { }` body strongly captures self for the lifetime of the task. `Task { [weak self] in guard let self else { return }; … }`. |
|
|
118
118
|
| `notificationcenter.observer-strong` | `NotificationCenter` / `NSNotificationCenter` + `Closure context` | Block-form `addObserver(forName:...)` keeps the block alive in the center. Use `[weak self]` in the block, or store the returned `NSObjectProtocol` and call `removeObserver(_:)` in `deinit`. |
|
|
119
119
|
|
|
120
|
-
### v1.4 expansion (16)
|
|
120
|
+
### v1.4 expansion (16). UIKit, Combine, Concurrency, SwiftUI, WebKit, RxSwift, Realm
|
|
121
121
|
|
|
122
122
|
| Pattern ID | When it matches | Fix hint (summary) |
|
|
123
123
|
|---|---|---|
|
|
@@ -138,7 +138,7 @@ Patterns are grouped below by the framework / source they target.
|
|
|
138
138
|
| `rxswift.disposebag-self-cycle` | `RxSwift.DisposeBag` / `RxSwift.AnonymousDisposable` in chain | Subscription retains self if `[weak self]` is omitted or unbound method ref is passed. Always use `[weak self]`. |
|
|
139
139
|
| `realm.notificationtoken-retained` | `RealmSwift.NotificationToken` / `RLMNotificationToken` | `Results.observe { ... }` retains the closure. `[weak self]` inside, `token?.invalidate()` in `deinit`. |
|
|
140
140
|
|
|
141
|
-
### v1.5 catalog completion (3)
|
|
141
|
+
### v1.5 catalog completion (3). Core Animation + Core Data
|
|
142
142
|
|
|
143
143
|
| Pattern ID | When it matches | Fix hint (summary) |
|
|
144
144
|
|---|---|---|
|
|
@@ -146,7 +146,7 @@ Patterns are grouped below by the framework / source they target.
|
|
|
146
146
|
| `coreanimation.layer-delegate-cycle` | Custom `CALayer` subclass (`CAShapeLayer` / `CAGradientLayer` / `CAEmitterLayer` / `CAMetalLayer` / etc.) in chain without `UIView` auto-pairing | Custom layer wired to non-UIView delegate leaks. Wrap in `WeakLayerDelegate` or clear `layer.delegate = nil` in `deinit`. |
|
|
147
147
|
| `coredata.fetchedresultscontroller-delegate` | `NSFetchedResultsController` / `_PFFetchedResultsController` in chain | Apple's historical strong-delegate quirk via the change-tracker. `frc.delegate = nil` in `viewWillDisappear` / `deinit`. |
|
|
148
148
|
|
|
149
|
-
### v1.6 catalog expansion (6)
|
|
149
|
+
### v1.6 catalog expansion (6). Swift 6 / Observation / SwiftData / NavigationStack era
|
|
150
150
|
|
|
151
151
|
Sourced from Apple Developer Forums (#736110, #716804, #748042), Swift Forums (#64584, #77257), Donny Wals on the Swift 6.2 `Observations` API, and the Embrace WKWebView memory-leak writeup.
|
|
152
152
|
|
|
@@ -154,23 +154,23 @@ Sourced from Apple Developer Forums (#736110, #716804, #748042), Swift Forums (#
|
|
|
154
154
|
|---|---|---|
|
|
155
155
|
| `swiftui.observable-state-modal-leak` | `_$ObservationRegistrar` + sheet/presentation host in chain | `@Observable` model passed as `@State` to a modal leaks. Move the model to `@StateObject` on the parent and pass via `@Bindable`, or use `.sheet(item:)` with a value type. |
|
|
156
156
|
| `swiftui.navigationpath-stored-in-viewmodel` | `NavigationPath` / `NavigationStackStore` / `AnyHashableStorageBase` in chain | NavigationPath retains every element ever pushed (FB11643551, unfixed). Keep it `@State` local to the view, or reset with `path = NavigationPath()` after `popToRoot`. |
|
|
157
|
-
| `concurrency.async-sequence-on-self` | `AsyncSequence` / `AsyncIteratorProtocol` + `Task<...>` in chain | `for await ... in seq { use(self) }` pins self via the iteration context
|
|
158
|
-
| `concurrency.notificationcenter-async-observer-task` | `NotificationCenter.Notifications` (the `AsyncSequence` form) + `Task<...>` | Special case of the above
|
|
157
|
+
| `concurrency.async-sequence-on-self` | `AsyncSequence` / `AsyncIteratorProtocol` + `Task<...>` in chain | `for await ... in seq { use(self) }` pins self via the iteration context. `[weak self]` does NOT help. Capture only the values needed before the loop, or `task.cancel()` in `deinit`. |
|
|
158
|
+
| `concurrency.notificationcenter-async-observer-task` | `NotificationCenter.Notifications` (the `AsyncSequence` form) + `Task<...>` | Special case of the above. `for await _ in NotificationCenter.default.notifications(named:)` never terminates. Same fix discipline. |
|
|
159
159
|
| `swiftui.observations-closure-strong-self` | `Observations` (the Swift 6.2 API, NOT `ObservationRegistrar`) + `Closure context` | The new non-SwiftUI `Observations { }` closure retains self like `Combine.sink`. Use `[weak self]` inside the closure. |
|
|
160
160
|
| `webkit.wkscriptmessagehandler-bridge` | `WKWebView` + `WKUserContentController` + `WKScriptMessageHandler` (or `*Bridge`/`*Handler` class) all in chain | The 3-link bridge cycle: bridge → webView → contentController → bridge. Wrap the handler in `WeakScriptMessageHandler` proxy, or `removeScriptMessageHandler(forName:)` for every name added. Fires alongside the broader v1.4 `webkit.scriptmessage-handler-strong` pattern when the full bridge shape is present. |
|
|
161
161
|
|
|
162
|
-
### v1.7 catalog (1)
|
|
162
|
+
### v1.7 catalog (1). SwiftData + Actor
|
|
163
163
|
|
|
164
164
|
| Pattern ID | When it matches | Fix hint (summary) |
|
|
165
165
|
|---|---|---|
|
|
166
166
|
| `swiftdata.modelcontext-actor-cycle` | `ModelContext` + `DefaultSerialModelExecutor` (or `ModelExecutor`) + `Actor` in chain | Apple-documented quirk on iOS 17 (FB13844786, fixed in iOS 18 beta 1). Prefer the `@ModelActor` macro over hand-rolled executors; or hold `ModelContext` weakly inside a custom executor and re-resolve per operation. |
|
|
167
167
|
|
|
168
|
-
**Confidence tiers**: each pattern returns `high`, `medium`, or `low` based on how many specific signals match. If multiple patterns fire on the same cycle, all matches are returned
|
|
168
|
+
**Confidence tiers**: each pattern returns `high`, `medium`, or `low` based on how many specific signals match. If multiple patterns fire on the same cycle, all matches are returned. The highest-confidence one is `primaryMatch`, the rest are in `allMatches`.
|
|
169
169
|
|
|
170
170
|
**Static analysis bridge (v1.6+)**: every classified cycle now carries a `staticAnalysisHint` field with three sub-fields:
|
|
171
|
-
- `rule
|
|
172
|
-
- `url
|
|
173
|
-
- `explanation
|
|
171
|
+
- `rule`: The SwiftLint rule that would have caught this at parse time (`weak_self`, `weak_delegate`, etc.), or `null` when no rule exists
|
|
172
|
+
- `url`: Link to the rule docs OR to the open issue tracking the gap (e.g. SwiftLint #776 for `@escaping` retain cycles)
|
|
173
|
+
- `explanation`: Plain-English description of the static-vs-runtime relationship
|
|
174
174
|
|
|
175
175
|
Reinforces the differentiator: **memorydetective sees the runtime evidence linters miss**. Examples:
|
|
176
176
|
- `combine.sink-store-self-capture` → `weak_self` (SwiftLint catches the closure form)
|
|
@@ -196,7 +196,7 @@ Where `staticAnalysisHint` says **which** linter rule complements this, `fixTemp
|
|
|
196
196
|
|
|
197
197
|
## 3. How fixes actually flow from diagnosis to edit
|
|
198
198
|
|
|
199
|
-
`memorydetective` covers the diagnose side **and the source-bridging side**. It tells you **what** is wrong, **where in the cycle**, **what type of fix** is needed, **where the relevant types live in your project** (via Swift LSP integration), and **every callsite that references them**. It does not edit your code
|
|
199
|
+
`memorydetective` covers the diagnose side **and the source-bridging side**. It tells you **what** is wrong, **where in the cycle**, **what type of fix** is needed, **where the relevant types live in your project** (via Swift LSP integration), and **every callsite that references them**. It does not edit your code. That final step still belongs to your LLM agent.
|
|
200
200
|
|
|
201
201
|
So the workflow has two halves:
|
|
202
202
|
|
|
@@ -207,7 +207,7 @@ So the workflow has two halves:
|
|
|
207
207
|
| **Decide the actual edit** | | ✅ The agent reads the surrounding code, picks the right capture-list pattern, writes the diff |
|
|
208
208
|
| **Apply the edit** | | ✅ The agent's `Edit`/`MultiEdit` tools write to the user's file |
|
|
209
209
|
|
|
210
|
-
The split between "locate" (us) and "edit" (the agent) is intentional. Locating is a deterministic SourceKit-LSP query; editing requires understanding the user's surrounding code style, naming conventions, and intent
|
|
210
|
+
The split between "locate" (us) and "edit" (the agent) is intentional. Locating is a deterministic SourceKit-LSP query; editing requires understanding the user's surrounding code style, naming conventions, and intent. That's the LLM's strength. We give the agent every piece of structured information it needs to make the edit, and step back at the file-write boundary.
|
|
211
211
|
|
|
212
212
|
### Concrete end-to-end example
|
|
213
213
|
|
|
@@ -226,13 +226,13 @@ What Claude does, step by step:
|
|
|
226
226
|
- Receives: `swiftui.tag-index-projection` (high confidence) + fix hint pointing at `.tag()` modifier capturing `self`.
|
|
227
227
|
|
|
228
228
|
3. **Calls `reachableFromCycle({ rootClassName: "DetailViewModel" })`**
|
|
229
|
-
- Confirms 4 `DetailViewModel` instances and ~1100 `NSURLSessionConfiguration`s reachable from each
|
|
229
|
+
- Confirms 4 `DetailViewModel` instances and ~1100 `NSURLSessionConfiguration`s reachable from each. The VM is the culprit pinning the network stack as collateral, not the other way around.
|
|
230
230
|
|
|
231
231
|
4. **Calls `swiftSearchPattern({ pattern: "\\.tag\\(", filePath: "..." })` across views**
|
|
232
232
|
- Surfaces 1 match in `MyApp/Views/MediaCarousel.swift:142`.
|
|
233
233
|
|
|
234
234
|
5. **Calls `swiftGetSymbolDefinition({ symbolName: "DetailViewModel", projectRoot: "~/Development/myapp/", candidatePaths: ["MyApp/ViewModels/"] })`**
|
|
235
|
-
- Returns `MyApp/ViewModels/DetailViewModel.swift:18
|
|
235
|
+
- Returns `MyApp/ViewModels/DetailViewModel.swift:18`. `class DetailViewModel: ObservableObject`.
|
|
236
236
|
|
|
237
237
|
6. **Calls `swiftFindSymbolReferences({ symbolName: "DetailViewModel", filePath: "..." })`**
|
|
238
238
|
- Lists 7 callsites across the codebase. Helps the agent gauge fix blast radius.
|
|
@@ -248,7 +248,7 @@ What Claude does, step by step:
|
|
|
248
248
|
> self.viewModel.handlePhotoTap(at: index)
|
|
249
249
|
> }
|
|
250
250
|
>
|
|
251
|
-
> // after
|
|
251
|
+
> // after. Static helper + weak captures
|
|
252
252
|
> onImageSliderTap: { [weak vm = _viewModel.wrappedValue,
|
|
253
253
|
> weak coord = self.coordinator] index in
|
|
254
254
|
> Self.handlePhotoTap(index: index, viewModel: vm, coordinator: coord)
|
|
@@ -269,7 +269,7 @@ What Claude does, step by step:
|
|
|
269
269
|
|
|
270
270
|
> **You:** Did the fix work? Compare `~/Desktop/before.memgraph` to `~/Desktop/after.memgraph`.
|
|
271
271
|
|
|
272
|
-
Claude calls `diffMemgraphs
|
|
272
|
+
Claude calls `diffMemgraphs`. Instance counts dropped, the `swiftui.tag-index-projection` cycle is gone from `cycles.persisted`, present in `cycles.goneFromBefore`.
|
|
273
273
|
|
|
274
274
|
### Why this is better than "memorydetective generates the diff"
|
|
275
275
|
|
|
@@ -279,7 +279,7 @@ If `memorydetective` tried to generate a code patch, it would have to:
|
|
|
279
279
|
- Track the actual variable names and types in scope
|
|
280
280
|
- Match surrounding code style
|
|
281
281
|
|
|
282
|
-
That's exactly what an LLM agent already does
|
|
282
|
+
That's exactly what an LLM agent already does. And does well. Splitting the responsibility keeps each side simple. `memorydetective` knows **iOS perf**; the agent knows **your codebase**. They compose.
|
|
283
283
|
|
|
284
284
|
---
|
|
285
285
|
|
|
@@ -289,24 +289,28 @@ Once you have the diagnosis, here are useful follow-up prompts you can paste int
|
|
|
289
289
|
|
|
290
290
|
| Prompt | What Claude calls |
|
|
291
291
|
|---|---|
|
|
292
|
-
| "I want to investigate a memgraph leak
|
|
292
|
+
| "I want to investigate a memgraph leak. What's the canonical sequence?" | `getInvestigationPlaybook({ kind: "memgraph-leak" })`. Returns the 6-step pipeline with `argsTemplate` for each tool. |
|
|
293
293
|
| "How many `DetailViewModel` instances are leaking?" | `countAlive(path, className: "DetailViewModel")` |
|
|
294
294
|
| "How many `NSURLSessionConfiguration`s are *inside* the cycle rooted at `DetailViewModel`?" | `reachableFromCycle(path, rootClassName: "DetailViewModel", className: "NSURLSessionConfiguration")` |
|
|
295
295
|
| "Show the retain chain that keeps `DetailViewModel` alive." | `findRetainers(path, className: "DetailViewModel")` |
|
|
296
|
-
| "Compare `~/Desktop/before.memgraph` to `~/Desktop/after.memgraph
|
|
297
|
-
| "Did my fix actually resolve the `swiftui.tag-index-projection` cycle?" | `verifyFix(before, after, expectedPatternId: "swiftui.tag-index-projection")
|
|
296
|
+
| "Compare `~/Desktop/before.memgraph` to `~/Desktop/after.memgraph`. Did the leak go away?" | `diffMemgraphs(before, after)` |
|
|
297
|
+
| "Did my fix actually resolve the `swiftui.tag-index-projection` cycle?" | `verifyFix(before, after, expectedPatternId: "swiftui.tag-index-projection")`. Returns PASS/PARTIAL/FAIL |
|
|
298
298
|
| "Render the cycle as a Mermaid graph for the PR description." | `renderCycleGraph(path, format: "mermaid")` |
|
|
299
299
|
| "Profile this app on my iPhone for 90 seconds and tell me about hangs." | `listTraceDevices` → `recordTimeProfile` → `analyzeHangs` |
|
|
300
300
|
| "Pull the last 5 minutes of `error`-level logs from `MyApp`." | `logShow(last: "5m", process: "MyApp", level: "default")` |
|
|
301
301
|
| "Run my XCUITest with leak detection." | `detectLeaksInXCUITest(workspace, scheme, testIdentifier, …)` |
|
|
302
|
-
| **
|
|
302
|
+
| **Verify-fix orchestration (v1.8). For the macOS 26.x `leaks` regression and deterministic before/after snapshots:** | |
|
|
303
|
+
| "Build, boot, and launch `MyApp` ready for leak investigation." | `bootAndLaunchForLeakInvestigation({ workspace, scheme, simulator: { name: "iPhone 15" } })`. Returns host PID + UDID + bundle id with `MallocStackLogging=1` already applied. |
|
|
304
|
+
| "Reproduce the carousel leak: tap Explore, swipe, then back, repeat 5 times." | `replayScenario({ simulatorUDID, actions: [{ type: "tap", label: "Explore" }, { type: "swipe", from: [350, 400], to: [50, 400] }, { type: "tap", label: "Back" }], repeat: 5 })` |
|
|
305
|
+
| "Snapshot before / after the fix into `~/Desktop/snaps/`." | `captureScenarioState({ simulatorUDID, pid, outputDir: "~/Desktop/snaps/", label: "before" })` then ship the fix and call again with `label: "after"`. Then `diffMemgraphs(before.memgraph, after.memgraph)`. |
|
|
306
|
+
| **Source bridging. Combine with the memory tools above:** | |
|
|
303
307
|
| "Where is `DetailViewModel` declared in this project?" | `swiftGetSymbolDefinition(symbolName, candidatePaths)` |
|
|
304
308
|
| "Find every reference to `DetailViewModel` across the codebase." | `swiftFindSymbolReferences(symbolName, filePath)` |
|
|
305
309
|
| "What types live in `MediaCarousel.swift`?" | `swiftGetSymbolsOverview(filePath)` |
|
|
306
310
|
| "What's the type at this position in this file?" | `swiftGetHoverInfo(filePath, line, character)` |
|
|
307
311
|
| "Search for `[weak self]` captures in this file." | `swiftSearchPattern(filePath, pattern: "\\[weak self\\]")` |
|
|
308
312
|
|
|
309
|
-
The agent decides which tool to call based on your prompt
|
|
313
|
+
The agent decides which tool to call based on your prompt. You don't need to remember the tool names.
|
|
310
314
|
|
|
311
315
|
---
|
|
312
316
|
|
|
@@ -333,11 +337,53 @@ Known limit. `xcrun xctrace export` of the `time-profile` schema crashes on heav
|
|
|
333
337
|
|
|
334
338
|
1. Open the trace once in Instruments.app (forces symbolication), then close it. Re-run `analyzeTimeProfile`.
|
|
335
339
|
2. Re-record with a shorter `--time-limit` (try 30 s instead of 90 s).
|
|
336
|
-
3. For hang analysis specifically, use `analyzeHangs` instead
|
|
340
|
+
3. For hang analysis specifically, use `analyzeHangs` instead. It parses a different (lighter) schema that doesn't crash.
|
|
337
341
|
|
|
338
342
|
### `captureMemgraph` fails on a physical iOS device
|
|
339
343
|
|
|
340
|
-
By design. `leaks(1)` only attaches to processes on the local Mac (which includes iOS simulators). Memory Graph capture from a physical device goes through Xcode's debugger over USB
|
|
344
|
+
By design. `leaks(1)` only attaches to processes on the local Mac (which includes iOS simulators). Memory Graph capture from a physical device goes through Xcode's debugger over USB. Different mechanism, no public CLI equivalent. Use Xcode's Memory Graph button + File → Export Memory Graph for physical devices.
|
|
345
|
+
|
|
346
|
+
### `captureMemgraph` returns `workaroundNotice: { issue: "minimal-corpse" }` (macOS 26.x)
|
|
347
|
+
|
|
348
|
+
`leaks --outputGraph` regressed on macOS 26.x and aborts with `Failed to get DYLD info for task` when the target process was not launched with `MallocStackLogging=1` in its environment. This is the new structured failure shape v1.8 surfaces:
|
|
349
|
+
|
|
350
|
+
```jsonc
|
|
351
|
+
{
|
|
352
|
+
"ok": false,
|
|
353
|
+
"pid": 49581,
|
|
354
|
+
"workaroundNotice": {
|
|
355
|
+
"issue": "minimal-corpse",
|
|
356
|
+
"message": "leaks --outputGraph could not introspect the target process...",
|
|
357
|
+
"fallbacks": [
|
|
358
|
+
"Relaunch the app with MallocStackLogging=1 (use bootAndLaunchForLeakInvestigation).",
|
|
359
|
+
"Open Xcode > Debug > View Memory Graph Hierarchy + File > Export Memory Graph.",
|
|
360
|
+
"Record an Allocations trace via recordTimeProfile + analyzeAllocations."
|
|
361
|
+
]
|
|
362
|
+
},
|
|
363
|
+
"suggestedNextCalls": [
|
|
364
|
+
{ "tool": "recordTimeProfile", "args": { "template": "Allocations", ... } },
|
|
365
|
+
{ "tool": "analyzeAllocations", "args": { ... } }
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
Recovery options in order of preference:
|
|
371
|
+
|
|
372
|
+
1. **Use `bootAndLaunchForLeakInvestigation`**. Single call that builds, boots, installs, and launches with the right env vars in one shot. Returns the host PID ready for `captureMemgraph`. This is the canonical fix.
|
|
373
|
+
2. **Xcode manual export.** With the app attached to Xcode debugger: Debug > View Memory Graph Hierarchy, then File > Export Memory Graph. Pass the resulting `.memgraph` to `analyzeMemgraph`.
|
|
374
|
+
3. **Allocations fallback.** Follow `suggestedNextCalls` to record an `Allocations` trace and inspect with `analyzeAllocations`. Not full cycle detection but reveals top live classes.
|
|
375
|
+
|
|
376
|
+
The `getInvestigationPlaybook({ kind: "memgraph-leak" })` response now carries a `troubleshooting` field with these recovery paths inline so an LLM agent can branch deterministically.
|
|
377
|
+
|
|
378
|
+
### `replayScenario` returns `workaroundNotice: { issue: "axe-not-found" }`
|
|
379
|
+
|
|
380
|
+
The `axe` CLI is not on your `$PATH`. Install with:
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
brew install cameroncooke/axe/axe
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
`axe` is a soft dependency. Only `replayScenario` and the `uiTree` sub-capture of `captureScenarioState` need it. Other tools work without it.
|
|
341
387
|
|
|
342
388
|
### Tests pass locally but fail in CI
|
|
343
389
|
|
|
@@ -345,7 +391,7 @@ The stress test has a wallclock budget that's tighter on slower runners. If you
|
|
|
345
391
|
|
|
346
392
|
### `detectLeaksInXCUITest` says "after-capture failed"
|
|
347
393
|
|
|
348
|
-
The app process exited before `leaks --outputGraph` could attach. Configure your XCUITest to keep the app alive at end-of-test (e.g. `XCTAssertTrue(true); _ = XCTWaiter.wait(for: [...], timeout: 1.0)`), or use a longer simulator boot. This tool is **experimental** in v1.0
|
|
394
|
+
The app process exited before `leaks --outputGraph` could attach. Configure your XCUITest to keep the app alive at end-of-test (e.g. `XCTAssertTrue(true); _ = XCTWaiter.wait(for: [...], timeout: 1.0)`), or use a longer simulator boot. This tool is **experimental** in v1.0. Feedback welcome.
|
|
349
395
|
|
|
350
396
|
---
|
|
351
397
|
|
|
@@ -353,7 +399,7 @@ The app process exited before `leaks --outputGraph` could attach. Configure your
|
|
|
353
399
|
|
|
354
400
|
Discovery is data, not inference. As of v1.3, the tools that matter most return a `suggestedNextCalls` field with pre-populated arguments and a one-sentence rationale per entry. The orchestrating agent can chain calls without re-reasoning over the result.
|
|
355
401
|
|
|
356
|
-
### `suggestedNextCalls
|
|
402
|
+
### `suggestedNextCalls`: example from `classifyCycle`
|
|
357
403
|
|
|
358
404
|
```jsonc
|
|
359
405
|
{
|
|
@@ -383,7 +429,7 @@ Discovery is data, not inference. As of v1.3, the tools that matter most return
|
|
|
383
429
|
|
|
384
430
|
The agent reads `suggestedNextCalls`, fills in the `<...>` placeholders from project context, and chains. No re-reasoning required.
|
|
385
431
|
|
|
386
|
-
### `getInvestigationPlaybook
|
|
432
|
+
### `getInvestigationPlaybook`: start here for a fresh investigation
|
|
387
433
|
|
|
388
434
|
For agents that haven't seen the project before, ask for the canonical pipeline first:
|
|
389
435
|
|
|
@@ -442,9 +488,9 @@ The tag is leading text in the MCP description, so it shows up in any tools/list
|
|
|
442
488
|
|
|
443
489
|
Since v1.6, memorydetective surfaces two MCP-spec features beyond raw Tools.
|
|
444
490
|
|
|
445
|
-
### Resources
|
|
491
|
+
### Resources: browsable cycle-pattern catalog
|
|
446
492
|
|
|
447
|
-
Each of the 33 catalog patterns is exposed as a read-only MCP resource at `memorydetective://patterns/{patternId}`. The body is markdown
|
|
493
|
+
Each of the 33 catalog patterns is exposed as a read-only MCP resource at `memorydetective://patterns/{patternId}`. The body is markdown. The pattern name, the fix hint, and a footer pointing at how it composes with `classifyCycle`'s `primaryMatch`.
|
|
448
494
|
|
|
449
495
|
```jsonc
|
|
450
496
|
// resources/list response (excerpt)
|
|
@@ -469,7 +515,7 @@ Each of the 33 catalog patterns is exposed as a read-only MCP resource at `memor
|
|
|
469
515
|
|
|
470
516
|
**Why this matters:** an agent that needs to ask "do you cover X?" can browse the resource list cheaply (no tool call). A UI-aware client can render the catalog as a sidebar or completion source.
|
|
471
517
|
|
|
472
|
-
### Prompts
|
|
518
|
+
### Prompts: investigation playbooks as slash commands
|
|
473
519
|
|
|
474
520
|
Five prompts ship, one per investigation kind:
|
|
475
521
|
|
|
@@ -481,12 +527,12 @@ Five prompts ship, one per investigation kind:
|
|
|
481
527
|
| `investigate-launch` | `/investigate-launch` | `tracePath` | `recordTimeProfile` (App Launch template) → `analyzeAppLaunch` → `swiftSearchPattern` |
|
|
482
528
|
| `verify-cycle-fix` | `/verify-cycle-fix` | `before`, `after` | `diffMemgraphs` → `classifyCycle` |
|
|
483
529
|
|
|
484
|
-
When the user invokes a prompt, the server fills the canonical playbook's argument templates with the user-provided values and returns a ready-to-execute brief. The agent then executes the steps
|
|
530
|
+
When the user invokes a prompt, the server fills the canonical playbook's argument templates with the user-provided values and returns a ready-to-execute brief. The agent then executes the steps. Same tool calls as if the user had typed them out, just orchestrated.
|
|
485
531
|
|
|
486
|
-
> **Both surfaces (Tools + Resources + Prompts) are independent
|
|
532
|
+
> **Both surfaces (Tools + Resources + Prompts) are independent. Clients that only support Tools still get the full catalog via `classifyCycle`.** Resources and Prompts are pure-add UX improvements for clients that surface them.
|
|
487
533
|
|
|
488
534
|
## 8. Where to go from here
|
|
489
535
|
|
|
490
536
|
- **Add a new cycle pattern**: see the *Adding a cycle pattern to `classifyCycle`* section in [`README.md`](./README.md#contributing).
|
|
491
537
|
- **Run a custom analysis from scratch**: every tool's input schema is documented via the MCP `tools/list` request. Hit the server with `{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}` over stdio.
|
|
492
|
-
- **Open an issue**: https://github.com/carloshpdoc/memorydetective/issues
|
|
538
|
+
- **Open an issue**: https://github.com/carloshpdoc/memorydetective/issues. Bug reports, feature requests, and pattern contributions are all welcome.
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,9 @@ import { listTraceDevices, listTraceDevicesSchema, } from "./tools/listTraceDevi
|
|
|
13
13
|
import { listTraceTemplates, listTraceTemplatesSchema, } from "./tools/listTraceTemplates.js";
|
|
14
14
|
import { recordTimeProfile, recordTimeProfileShape, } from "./tools/recordTimeProfile.js";
|
|
15
15
|
import { captureMemgraph, captureMemgraphShape, } from "./tools/captureMemgraph.js";
|
|
16
|
+
import { bootAndLaunchForLeakInvestigation, bootAndLaunchForLeakInvestigationShape, } from "./tools/bootAndLaunchForLeakInvestigation.js";
|
|
17
|
+
import { replayScenario, replayScenarioShape, } from "./tools/replayScenario.js";
|
|
18
|
+
import { captureScenarioState, captureScenarioStateShape, } from "./tools/captureScenarioState.js";
|
|
16
19
|
import { analyzeAnimationHitches, analyzeAnimationHitchesSchema, } from "./tools/analyzeAnimationHitches.js";
|
|
17
20
|
import { analyzeAllocations, analyzeAllocationsSchema, } from "./tools/analyzeAllocations.js";
|
|
18
21
|
import { analyzeAppLaunch, analyzeAppLaunchSchema, } from "./tools/analyzeAppLaunch.js";
|
|
@@ -155,7 +158,7 @@ server.registerTool("recordTimeProfile", {
|
|
|
155
158
|
});
|
|
156
159
|
server.registerTool("captureMemgraph", {
|
|
157
160
|
title: "Capture a .memgraph from a running process",
|
|
158
|
-
description: "[mg.memory] Wrapper around `leaks --outputGraph`. Resolves `appName` to a PID via `pgrep -x` (or accepts `pid` directly), then writes a `.memgraph` snapshot. **Limitation**: only works for processes running on the local Mac (Mac apps + iOS simulator). Does NOT work for physical iOS devices
|
|
161
|
+
description: "[mg.memory] Wrapper around `leaks --outputGraph`. Resolves `appName` to a PID via `pgrep -x` (or accepts `pid` directly), then writes a `.memgraph` snapshot. **Limitation**: only works for processes running on the local Mac (Mac apps + iOS simulator). Does NOT work for physical iOS devices, use Xcode's Memory Graph button there.",
|
|
159
162
|
inputSchema: captureMemgraphShape,
|
|
160
163
|
}, async (input) => {
|
|
161
164
|
const result = await captureMemgraph(input);
|
|
@@ -163,6 +166,36 @@ server.registerTool("captureMemgraph", {
|
|
|
163
166
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
164
167
|
};
|
|
165
168
|
});
|
|
169
|
+
server.registerTool("bootAndLaunchForLeakInvestigation", {
|
|
170
|
+
title: "Build, boot, install, and launch an iOS app for leak investigation",
|
|
171
|
+
description: "[mg.build] Single-call orchestration that runs `xcodebuild build` (optional), boots the iOS Simulator, installs the .app, and launches it with `MallocStackLogging=1` propagated via `SIMCTL_CHILD_*`. Required because `leaks --outputGraph` regressed on macOS 26.x and only works when the target was launched with malloc-stack-logging in its environment. Returns the host PID + simulator UDID + bundle id ready to chain into `captureMemgraph`. Auto-discovers BUILT_PRODUCTS_DIR, WRAPPER_NAME, EXECUTABLE_NAME, and PRODUCT_BUNDLE_IDENTIFIER from `xcodebuild -showBuildSettings -json`. Required: `scheme` and exactly one of `workspace` or `project`.",
|
|
172
|
+
inputSchema: bootAndLaunchForLeakInvestigationShape,
|
|
173
|
+
}, async (input) => {
|
|
174
|
+
const result = await bootAndLaunchForLeakInvestigation(input);
|
|
175
|
+
return {
|
|
176
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
177
|
+
};
|
|
178
|
+
});
|
|
179
|
+
server.registerTool("replayScenario", {
|
|
180
|
+
title: "Replay a UI scenario to amplify a suspected leak",
|
|
181
|
+
description: "[mg.scenario] Drive the iOS Simulator through a sequence of UI actions (tap, swipe, wait, type) and optionally repeat the sequence N times to amplify a leak that only manifests after iteration. Tied to verify-fix: pair with captureScenarioState before/after to make leak reproductions deterministic. Soft dependency on `axe` (https://github.com/cameroncooke/AXe) — when missing, returns a structured workaroundNotice with install instructions. Tap targets accept `label`, `elementId`, or explicit `coords`.",
|
|
182
|
+
inputSchema: replayScenarioShape,
|
|
183
|
+
}, async (input) => {
|
|
184
|
+
const result = await replayScenario(input);
|
|
185
|
+
return {
|
|
186
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
187
|
+
};
|
|
188
|
+
});
|
|
189
|
+
server.registerTool("captureScenarioState", {
|
|
190
|
+
title: "Capture a labeled before/after snapshot for verify-fix",
|
|
191
|
+
description: "[mg.scenario] Composite snapshot: writes a `.memgraph`, a `.png` screenshot, and a `.ui.json` accessibility tree into `outputDir`, all prefixed by `label` (e.g. `before` / `after`). Designed to bracket a fix or a replayScenario call so you can chain into diffMemgraphs and validate that a cycle actually closed. Sub-captures are best-effort: if leaks fails (macOS 26.x minimal-corpse), the screenshot + UI tree still complete and the captureMemgraph workaroundNotice is surfaced for follow-up. Required: `simulatorUDID`, `outputDir`, and exactly one of `pid` / `appName`.",
|
|
192
|
+
inputSchema: captureScenarioStateShape,
|
|
193
|
+
}, async (input) => {
|
|
194
|
+
const result = await captureScenarioState(input);
|
|
195
|
+
return {
|
|
196
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
197
|
+
};
|
|
198
|
+
});
|
|
166
199
|
server.registerTool("analyzeAnimationHitches", {
|
|
167
200
|
title: "Analyze animation hitches from a .trace bundle",
|
|
168
201
|
description: "[mg.trace] Parse the `animation-hitches` schema from a `.trace` recorded with the Animation Hitches Instruments template. Returns hitch totals, by-type counts, longest hitches, and how many crossed the user-perceptible 100ms threshold.",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,eAAe,EACf,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAA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,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACT,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAA8B,CAAC;iBACpD;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,yEAAyE;IACzE,sEAAsE;IACtE,sBAAsB;IACtB,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5C,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal infrastructure for driving the iOS Simulator UI from inside leak/perf
|
|
3
|
+
* workflows (replayScenario, captureScenarioState). NOT a generic UI automation
|
|
4
|
+
* surface, the public tool contract stays scoped to leak/perf debug.
|
|
5
|
+
*
|
|
6
|
+
* Wraps Cameron Cooke's `axe` CLI (https://github.com/cameroncooke/AXe).
|
|
7
|
+
* `axe` is a soft dependency: we detect it on first use and emit a structured
|
|
8
|
+
* install hint when missing, instead of hard-failing or bundling it.
|
|
9
|
+
*/
|
|
10
|
+
export interface AxeAvailability {
|
|
11
|
+
available: boolean;
|
|
12
|
+
/** Absolute path to the `axe` binary when found. */
|
|
13
|
+
binaryPath?: string;
|
|
14
|
+
/** Human-readable install instructions when `available === false`. */
|
|
15
|
+
installHint?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Check whether `axe` is available on the system. Cached at module load via
|
|
19
|
+
* `which` lookup so callers can skip the call when they already know.
|
|
20
|
+
*/
|
|
21
|
+
export declare function checkAxeAvailable(): Promise<AxeAvailability>;
|
|
22
|
+
export interface AxFrame {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
}
|
|
28
|
+
export interface UIElement {
|
|
29
|
+
label?: string;
|
|
30
|
+
identifier?: string;
|
|
31
|
+
role?: string;
|
|
32
|
+
frame?: AxFrame;
|
|
33
|
+
/** Raw axe payload preserved so callers can extract additional fields. */
|
|
34
|
+
raw?: Record<string, unknown>;
|
|
35
|
+
children?: UIElement[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Run `axe describe-ui --udid <udid>` and parse the tree into normalized
|
|
39
|
+
* `UIElement` nodes. Returns the root element.
|
|
40
|
+
*/
|
|
41
|
+
export declare function describeUI(udid: string): Promise<UIElement>;
|
|
42
|
+
/** Pure: parse `axe describe-ui` JSON output into normalized UIElement tree. */
|
|
43
|
+
export declare function parseAxeDescribeUI(stdout: string): UIElement;
|
|
44
|
+
/**
|
|
45
|
+
* Pure: parse an `AXFrame`-style frame from a node. Accepts both AppKit-style
|
|
46
|
+
* dictionaries `{AXX: 0, AXY: 0, AXWidth: 100, AXHeight: 100}` and CGRect
|
|
47
|
+
* strings `"{{0,0},{100,100}}"`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function parseAxFrame(obj: Record<string, unknown>): AxFrame | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Pure: find the first descendant whose label or identifier matches `query`
|
|
52
|
+
* (exact match preferred, falls back to substring). Walks the tree
|
|
53
|
+
* depth-first.
|
|
54
|
+
*/
|
|
55
|
+
export declare function findElementByLabel(root: UIElement, query: string): UIElement | null;
|
|
56
|
+
/** Pure: compute the center point of an `AxFrame` for tap targeting. */
|
|
57
|
+
export declare function centerOf(frame: AxFrame): {
|
|
58
|
+
x: number;
|
|
59
|
+
y: number;
|
|
60
|
+
};
|
|
61
|
+
export type TapTarget = {
|
|
62
|
+
kind: "label";
|
|
63
|
+
value: string;
|
|
64
|
+
} | {
|
|
65
|
+
kind: "elementId";
|
|
66
|
+
value: string;
|
|
67
|
+
} | {
|
|
68
|
+
kind: "coords";
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Tap on the simulator. Resolves label/elementId targets via `describe-ui`
|
|
74
|
+
* before issuing the tap.
|
|
75
|
+
*/
|
|
76
|
+
export declare function tap(udid: string, target: TapTarget): Promise<void>;
|
|
77
|
+
/** Swipe between two coordinates with optional duration in milliseconds. */
|
|
78
|
+
export declare function swipe(udid: string, from: {
|
|
79
|
+
x: number;
|
|
80
|
+
y: number;
|
|
81
|
+
}, to: {
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
}, durationMs?: number): Promise<void>;
|
|
85
|
+
/** Type a string into the currently focused field. */
|
|
86
|
+
export declare function typeText(udid: string, text: string): Promise<void>;
|