react-native-mcp-kit 4.1.0 → 4.2.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.
Files changed (308) hide show
  1. package/README.md +6 -6
  2. package/dist/babel/testIdPlugin/collectHooks.d.ts +13 -0
  3. package/dist/babel/testIdPlugin/collectHooks.d.ts.map +1 -0
  4. package/dist/babel/testIdPlugin/collectHooks.js +112 -0
  5. package/dist/babel/testIdPlugin/collectHooks.js.map +1 -0
  6. package/dist/babel/testIdPlugin/constants.d.ts +6 -0
  7. package/dist/babel/testIdPlugin/constants.d.ts.map +1 -0
  8. package/dist/babel/testIdPlugin/constants.js +49 -0
  9. package/dist/babel/testIdPlugin/constants.js.map +1 -0
  10. package/dist/babel/testIdPlugin/helpers.d.ts +7 -0
  11. package/dist/babel/testIdPlugin/helpers.d.ts.map +1 -0
  12. package/dist/babel/testIdPlugin/helpers.js +77 -0
  13. package/dist/babel/testIdPlugin/helpers.js.map +1 -0
  14. package/dist/babel/testIdPlugin/hocUnwrap.d.ts +4 -0
  15. package/dist/babel/testIdPlugin/hocUnwrap.d.ts.map +1 -0
  16. package/dist/babel/testIdPlugin/hocUnwrap.js +94 -0
  17. package/dist/babel/testIdPlugin/hocUnwrap.js.map +1 -0
  18. package/dist/babel/{testIdPlugin.d.ts → testIdPlugin/index.d.ts} +1 -1
  19. package/dist/babel/testIdPlugin/index.d.ts.map +1 -0
  20. package/dist/babel/testIdPlugin/index.js +205 -0
  21. package/dist/babel/testIdPlugin/index.js.map +1 -0
  22. package/dist/babel/testIdPlugin/inject.d.ts +7 -0
  23. package/dist/babel/testIdPlugin/inject.d.ts.map +1 -0
  24. package/dist/babel/testIdPlugin/inject.js +86 -0
  25. package/dist/babel/testIdPlugin/inject.js.map +1 -0
  26. package/dist/babel/testIdPlugin/types.d.ts +59 -0
  27. package/dist/babel/testIdPlugin/types.d.ts.map +1 -0
  28. package/dist/babel/testIdPlugin/types.js +3 -0
  29. package/dist/babel/testIdPlugin/types.js.map +1 -0
  30. package/dist/bin/ios-hid +0 -0
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +2 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/modules/alert/alert.d.ts.map +1 -1
  36. package/dist/modules/alert/alert.js +18 -3
  37. package/dist/modules/alert/alert.js.map +1 -1
  38. package/dist/modules/console/console.d.ts.map +1 -1
  39. package/dist/modules/console/console.js +38 -12
  40. package/dist/modules/console/console.js.map +1 -1
  41. package/dist/modules/console/types.d.ts +1 -1
  42. package/dist/modules/console/types.d.ts.map +1 -1
  43. package/dist/modules/device/device.d.ts.map +1 -1
  44. package/dist/modules/device/device.js +17 -4
  45. package/dist/modules/device/device.js.map +1 -1
  46. package/dist/modules/errors/errors.d.ts.map +1 -1
  47. package/dist/modules/errors/errors.js +3 -1
  48. package/dist/modules/errors/errors.js.map +1 -1
  49. package/dist/modules/fiberTree/fiberTree.d.ts.map +1 -1
  50. package/dist/modules/fiberTree/fiberTree.js +44 -7
  51. package/dist/modules/fiberTree/fiberTree.js.map +1 -1
  52. package/dist/modules/fiberTree/finder.d.ts +2 -0
  53. package/dist/modules/fiberTree/finder.d.ts.map +1 -1
  54. package/dist/modules/fiberTree/finder.js +3 -1
  55. package/dist/modules/fiberTree/finder.js.map +1 -1
  56. package/dist/modules/fiberTree/hooks/extract.d.ts +6 -0
  57. package/dist/modules/fiberTree/hooks/extract.d.ts.map +1 -0
  58. package/dist/modules/fiberTree/hooks/extract.js +187 -0
  59. package/dist/modules/fiberTree/hooks/extract.js.map +1 -0
  60. package/dist/modules/fiberTree/hooks/flatten.d.ts +4 -0
  61. package/dist/modules/fiberTree/hooks/flatten.d.ts.map +1 -0
  62. package/dist/modules/fiberTree/hooks/flatten.js +81 -0
  63. package/dist/modules/fiberTree/hooks/flatten.js.map +1 -0
  64. package/dist/modules/fiberTree/hooks/index.d.ts +5 -0
  65. package/dist/modules/fiberTree/hooks/index.d.ts.map +1 -0
  66. package/dist/modules/fiberTree/hooks/index.js +10 -0
  67. package/dist/modules/fiberTree/hooks/index.js.map +1 -0
  68. package/dist/modules/fiberTree/hooks/options.d.ts +9 -0
  69. package/dist/modules/fiberTree/hooks/options.d.ts.map +1 -0
  70. package/dist/modules/fiberTree/hooks/options.js +27 -0
  71. package/dist/modules/fiberTree/hooks/options.js.map +1 -0
  72. package/dist/modules/fiberTree/hooks/patterns.d.ts +2 -0
  73. package/dist/modules/fiberTree/hooks/patterns.d.ts.map +1 -0
  74. package/dist/modules/fiberTree/hooks/patterns.js +26 -0
  75. package/dist/modules/fiberTree/hooks/patterns.js.map +1 -0
  76. package/dist/modules/fiberTree/hooks/shape.d.ts +3 -0
  77. package/dist/modules/fiberTree/hooks/shape.d.ts.map +1 -0
  78. package/dist/modules/fiberTree/hooks/shape.js +66 -0
  79. package/dist/modules/fiberTree/hooks/shape.js.map +1 -0
  80. package/dist/modules/fiberTree/hooks/slotCount.d.ts +2 -0
  81. package/dist/modules/fiberTree/hooks/slotCount.d.ts.map +1 -0
  82. package/dist/modules/fiberTree/hooks/slotCount.js +93 -0
  83. package/dist/modules/fiberTree/hooks/slotCount.js.map +1 -0
  84. package/dist/modules/fiberTree/{hooks.d.ts → hooks/types.d.ts} +18 -34
  85. package/dist/modules/fiberTree/hooks/types.d.ts.map +1 -0
  86. package/dist/modules/fiberTree/hooks/types.js +3 -0
  87. package/dist/modules/fiberTree/hooks/types.js.map +1 -0
  88. package/dist/modules/fiberTree/hooks/value.d.ts +2 -0
  89. package/dist/modules/fiberTree/hooks/value.d.ts.map +1 -0
  90. package/dist/modules/fiberTree/hooks/value.js +89 -0
  91. package/dist/modules/fiberTree/hooks/value.js.map +1 -0
  92. package/dist/modules/fiberTree/utils/constants.d.ts +8 -0
  93. package/dist/modules/fiberTree/utils/constants.d.ts.map +1 -0
  94. package/dist/modules/fiberTree/utils/constants.js +15 -0
  95. package/dist/modules/fiberTree/utils/constants.js.map +1 -0
  96. package/dist/modules/fiberTree/utils/index.d.ts +9 -0
  97. package/dist/modules/fiberTree/utils/index.d.ts.map +1 -0
  98. package/dist/modules/fiberTree/utils/index.js +34 -0
  99. package/dist/modules/fiberTree/utils/index.js.map +1 -0
  100. package/dist/modules/fiberTree/utils/match.d.ts +4 -0
  101. package/dist/modules/fiberTree/utils/match.d.ts.map +1 -0
  102. package/dist/modules/fiberTree/utils/match.js +169 -0
  103. package/dist/modules/fiberTree/utils/match.js.map +1 -0
  104. package/dist/modules/fiberTree/utils/naming.d.ts +4 -0
  105. package/dist/modules/fiberTree/utils/naming.d.ts.map +1 -0
  106. package/dist/modules/fiberTree/utils/naming.js +52 -0
  107. package/dist/modules/fiberTree/utils/naming.js.map +1 -0
  108. package/dist/modules/fiberTree/utils/native.d.ts +5 -0
  109. package/dist/modules/fiberTree/utils/native.d.ts.map +1 -0
  110. package/dist/modules/fiberTree/utils/native.js +101 -0
  111. package/dist/modules/fiberTree/utils/native.js.map +1 -0
  112. package/dist/modules/fiberTree/utils/projection.d.ts +9 -0
  113. package/dist/modules/fiberTree/utils/projection.d.ts.map +1 -0
  114. package/dist/modules/fiberTree/utils/projection.js +75 -0
  115. package/dist/modules/fiberTree/utils/projection.js.map +1 -0
  116. package/dist/modules/fiberTree/utils/root.d.ts +4 -0
  117. package/dist/modules/fiberTree/utils/root.d.ts.map +1 -0
  118. package/dist/modules/fiberTree/utils/root.js +30 -0
  119. package/dist/modules/fiberTree/utils/root.js.map +1 -0
  120. package/dist/modules/fiberTree/utils/screen.d.ts +10 -0
  121. package/dist/modules/fiberTree/utils/screen.d.ts.map +1 -0
  122. package/dist/modules/fiberTree/utils/screen.js +39 -0
  123. package/dist/modules/fiberTree/utils/screen.js.map +1 -0
  124. package/dist/modules/fiberTree/utils/serialize.d.ts +4 -0
  125. package/dist/modules/fiberTree/utils/serialize.d.ts.map +1 -0
  126. package/dist/modules/fiberTree/utils/serialize.js +102 -0
  127. package/dist/modules/fiberTree/utils/serialize.js.map +1 -0
  128. package/dist/modules/fiberTree/utils/traverse.d.ts +12 -0
  129. package/dist/modules/fiberTree/utils/traverse.d.ts.map +1 -0
  130. package/dist/modules/fiberTree/utils/traverse.js +107 -0
  131. package/dist/modules/fiberTree/utils/traverse.js.map +1 -0
  132. package/dist/modules/i18next/i18next.d.ts.map +1 -1
  133. package/dist/modules/i18next/i18next.js +27 -6
  134. package/dist/modules/i18next/i18next.js.map +1 -1
  135. package/dist/modules/logBox/logBox.d.ts.map +1 -1
  136. package/dist/modules/logBox/logBox.js +8 -4
  137. package/dist/modules/logBox/logBox.js.map +1 -1
  138. package/dist/modules/navigation/navigation.d.ts.map +1 -1
  139. package/dist/modules/navigation/navigation.js +19 -4
  140. package/dist/modules/navigation/navigation.js.map +1 -1
  141. package/dist/modules/network/network.js +1 -1
  142. package/dist/modules/network/network.js.map +1 -1
  143. package/dist/modules/reactQuery/reactQuery.d.ts.map +1 -1
  144. package/dist/modules/reactQuery/reactQuery.js +2 -1
  145. package/dist/modules/reactQuery/reactQuery.js.map +1 -1
  146. package/dist/modules/storage/storage.d.ts.map +1 -1
  147. package/dist/modules/storage/storage.js +23 -8
  148. package/dist/modules/storage/storage.js.map +1 -1
  149. package/dist/server/bridge.d.ts +2 -0
  150. package/dist/server/bridge.d.ts.map +1 -1
  151. package/dist/server/bridge.js +61 -5
  152. package/dist/server/bridge.js.map +1 -1
  153. package/dist/server/dispatch.d.ts +15 -0
  154. package/dist/server/dispatch.d.ts.map +1 -0
  155. package/dist/server/dispatch.js +121 -0
  156. package/dist/server/dispatch.js.map +1 -0
  157. package/dist/server/helpers.d.ts +97 -0
  158. package/dist/server/helpers.d.ts.map +1 -0
  159. package/dist/server/helpers.js +162 -0
  160. package/dist/server/helpers.js.map +1 -0
  161. package/dist/server/host/deviceResolver/byClient.d.ts +5 -0
  162. package/dist/server/host/deviceResolver/byClient.d.ts.map +1 -0
  163. package/dist/server/host/deviceResolver/byClient.js +171 -0
  164. package/dist/server/host/deviceResolver/byClient.js.map +1 -0
  165. package/dist/server/host/deviceResolver/byId.d.ts +5 -0
  166. package/dist/server/host/deviceResolver/byId.d.ts.map +1 -0
  167. package/dist/server/host/deviceResolver/byId.js +81 -0
  168. package/dist/server/host/deviceResolver/byId.js.map +1 -0
  169. package/dist/server/host/deviceResolver/enrich.d.ts +5 -0
  170. package/dist/server/host/deviceResolver/enrich.d.ts.map +1 -0
  171. package/dist/server/host/deviceResolver/enrich.js +123 -0
  172. package/dist/server/host/deviceResolver/enrich.js.map +1 -0
  173. package/dist/server/host/deviceResolver/index.d.ts +13 -0
  174. package/dist/server/host/deviceResolver/index.d.ts.map +1 -0
  175. package/dist/server/host/deviceResolver/index.js +65 -0
  176. package/dist/server/host/deviceResolver/index.js.map +1 -0
  177. package/dist/server/host/deviceResolver/list.d.ts +10 -0
  178. package/dist/server/host/deviceResolver/list.d.ts.map +1 -0
  179. package/dist/server/host/deviceResolver/list.js +119 -0
  180. package/dist/server/host/deviceResolver/list.js.map +1 -0
  181. package/dist/server/host/deviceResolver/scan.d.ts +4 -0
  182. package/dist/server/host/deviceResolver/scan.d.ts.map +1 -0
  183. package/dist/server/host/deviceResolver/scan.js +102 -0
  184. package/dist/server/host/deviceResolver/scan.js.map +1 -0
  185. package/dist/server/host/{deviceResolver.d.ts → deviceResolver/types.d.ts} +1 -16
  186. package/dist/server/host/deviceResolver/types.d.ts.map +1 -0
  187. package/dist/server/host/deviceResolver/types.js +3 -0
  188. package/dist/server/host/deviceResolver/types.js.map +1 -0
  189. package/dist/server/host/tools/capture.d.ts.map +1 -1
  190. package/dist/server/host/tools/capture.js +52 -22
  191. package/dist/server/host/tools/capture.js.map +1 -1
  192. package/dist/server/host/tools/devices.d.ts.map +1 -1
  193. package/dist/server/host/tools/devices.js +25 -4
  194. package/dist/server/host/tools/devices.js.map +1 -1
  195. package/dist/server/host/tools/input/android.d.ts +15 -0
  196. package/dist/server/host/tools/input/android.d.ts.map +1 -0
  197. package/dist/server/host/tools/input/android.js +88 -0
  198. package/dist/server/host/tools/input/android.js.map +1 -0
  199. package/dist/server/host/tools/input/constants.d.ts +14 -0
  200. package/dist/server/host/tools/input/constants.d.ts.map +1 -0
  201. package/dist/server/host/tools/input/constants.js +41 -0
  202. package/dist/server/host/tools/input/constants.js.map +1 -0
  203. package/dist/server/host/tools/input/drag.d.ts +4 -0
  204. package/dist/server/host/tools/input/drag.d.ts.map +1 -0
  205. package/dist/server/host/tools/input/drag.js +76 -0
  206. package/dist/server/host/tools/input/drag.js.map +1 -0
  207. package/dist/server/host/tools/input/index.d.ts +8 -0
  208. package/dist/server/host/tools/input/index.d.ts.map +1 -0
  209. package/dist/server/host/tools/input/index.js +18 -0
  210. package/dist/server/host/tools/input/index.js.map +1 -0
  211. package/dist/server/host/tools/input/longPress.d.ts +4 -0
  212. package/dist/server/host/tools/input/longPress.d.ts.map +1 -0
  213. package/dist/server/host/tools/input/longPress.js +49 -0
  214. package/dist/server/host/tools/input/longPress.js.map +1 -0
  215. package/dist/server/host/tools/input/pressKey.d.ts +4 -0
  216. package/dist/server/host/tools/input/pressKey.d.ts.map +1 -0
  217. package/dist/server/host/tools/input/pressKey.js +42 -0
  218. package/dist/server/host/tools/input/pressKey.js.map +1 -0
  219. package/dist/server/host/tools/input/swipe.d.ts +4 -0
  220. package/dist/server/host/tools/input/swipe.d.ts.map +1 -0
  221. package/dist/server/host/tools/input/swipe.js +71 -0
  222. package/dist/server/host/tools/input/swipe.js.map +1 -0
  223. package/dist/server/host/tools/input/tap.d.ts +4 -0
  224. package/dist/server/host/tools/input/tap.d.ts.map +1 -0
  225. package/dist/server/host/tools/input/tap.js +49 -0
  226. package/dist/server/host/tools/input/tap.js.map +1 -0
  227. package/dist/server/host/tools/input/typeText.d.ts +4 -0
  228. package/dist/server/host/tools/input/typeText.d.ts.map +1 -0
  229. package/dist/server/host/tools/input/typeText.js +52 -0
  230. package/dist/server/host/tools/input/typeText.js.map +1 -0
  231. package/dist/server/host/tools/input/typeTextBatch.d.ts +4 -0
  232. package/dist/server/host/tools/input/typeTextBatch.d.ts.map +1 -0
  233. package/dist/server/host/tools/input/typeTextBatch.js +106 -0
  234. package/dist/server/host/tools/input/typeTextBatch.js.map +1 -0
  235. package/dist/server/host/tools/tapFiber.d.ts.map +1 -1
  236. package/dist/server/host/tools/tapFiber.js +2 -0
  237. package/dist/server/host/tools/tapFiber.js.map +1 -1
  238. package/dist/server/instructions.d.ts +2 -0
  239. package/dist/server/instructions.d.ts.map +1 -0
  240. package/dist/server/instructions.js +74 -0
  241. package/dist/server/instructions.js.map +1 -0
  242. package/dist/server/mcpServer.d.ts +0 -12
  243. package/dist/server/mcpServer.d.ts.map +1 -1
  244. package/dist/server/mcpServer.js +26 -877
  245. package/dist/server/mcpServer.js.map +1 -1
  246. package/dist/server/metro/tools/events.d.ts.map +1 -1
  247. package/dist/server/metro/tools/events.js +1 -0
  248. package/dist/server/metro/tools/events.js.map +1 -1
  249. package/dist/server/metro/tools/openInEditor.d.ts.map +1 -1
  250. package/dist/server/metro/tools/openInEditor.js +4 -1
  251. package/dist/server/metro/tools/openInEditor.js.map +1 -1
  252. package/dist/server/metro/tools/symbolicate.d.ts.map +1 -1
  253. package/dist/server/metro/tools/symbolicate.js +41 -11
  254. package/dist/server/metro/tools/symbolicate.js.map +1 -1
  255. package/dist/server/predicate.d.ts +31 -0
  256. package/dist/server/predicate.d.ts.map +1 -0
  257. package/dist/server/predicate.js +104 -0
  258. package/dist/server/predicate.js.map +1 -0
  259. package/dist/server/tools/assert.d.ts +4 -0
  260. package/dist/server/tools/assert.d.ts.map +1 -0
  261. package/dist/server/tools/assert.js +79 -0
  262. package/dist/server/tools/assert.js.map +1 -0
  263. package/dist/server/tools/call.d.ts +4 -0
  264. package/dist/server/tools/call.d.ts.map +1 -0
  265. package/dist/server/tools/call.js +38 -0
  266. package/dist/server/tools/call.js.map +1 -0
  267. package/dist/server/tools/connectionStatus.d.ts +4 -0
  268. package/dist/server/tools/connectionStatus.d.ts.map +1 -0
  269. package/dist/server/tools/connectionStatus.js +41 -0
  270. package/dist/server/tools/connectionStatus.js.map +1 -0
  271. package/dist/server/tools/describeTool.d.ts +4 -0
  272. package/dist/server/tools/describeTool.d.ts.map +1 -0
  273. package/dist/server/tools/describeTool.js +130 -0
  274. package/dist/server/tools/describeTool.js.map +1 -0
  275. package/dist/server/tools/listTools.d.ts +4 -0
  276. package/dist/server/tools/listTools.d.ts.map +1 -0
  277. package/dist/server/tools/listTools.js +109 -0
  278. package/dist/server/tools/listTools.js.map +1 -0
  279. package/dist/server/tools/waitUntil.d.ts +4 -0
  280. package/dist/server/tools/waitUntil.d.ts.map +1 -0
  281. package/dist/server/tools/waitUntil.js +119 -0
  282. package/dist/server/tools/waitUntil.js.map +1 -0
  283. package/dist/shared/projection/projectValue.d.ts +12 -1
  284. package/dist/shared/projection/projectValue.d.ts.map +1 -1
  285. package/dist/shared/projection/projectValue.js +42 -12
  286. package/dist/shared/projection/projectValue.js.map +1 -1
  287. package/dist/shared/projection/resolvePath.d.ts +14 -2
  288. package/dist/shared/projection/resolvePath.d.ts.map +1 -1
  289. package/dist/shared/projection/resolvePath.js +25 -3
  290. package/dist/shared/projection/resolvePath.js.map +1 -1
  291. package/package.json +2 -2
  292. package/dist/babel/testIdPlugin.d.ts.map +0 -1
  293. package/dist/babel/testIdPlugin.js +0 -537
  294. package/dist/babel/testIdPlugin.js.map +0 -1
  295. package/dist/modules/fiberTree/hooks.d.ts.map +0 -1
  296. package/dist/modules/fiberTree/hooks.js +0 -532
  297. package/dist/modules/fiberTree/hooks.js.map +0 -1
  298. package/dist/modules/fiberTree/utils.d.ts +0 -39
  299. package/dist/modules/fiberTree/utils.d.ts.map +0 -1
  300. package/dist/modules/fiberTree/utils.js +0 -616
  301. package/dist/modules/fiberTree/utils.js.map +0 -1
  302. package/dist/server/host/deviceResolver.d.ts.map +0 -1
  303. package/dist/server/host/deviceResolver.js +0 -621
  304. package/dist/server/host/deviceResolver.js.map +0 -1
  305. package/dist/server/host/tools/input.d.ts +0 -10
  306. package/dist/server/host/tools/input.d.ts.map +0 -1
  307. package/dist/server/host/tools/input.js +0 -478
  308. package/dist/server/host/tools/input.js.map +0 -1
package/README.md CHANGED
@@ -185,9 +185,9 @@ What you get:
185
185
 
186
186
  - **Real OS input** — `tap`, `long_press`, `swipe`, `drag`, `type_text`, `type_text_batch`, `press_key`. Goes through the real iOS/Android touch pipeline.
187
187
  - **`tap_fiber`** — one call to locate a component via fiber_tree and tap its center. No copy-paste of bounds between calls.
188
- - **Screenshots** — WebP, auto-diffing (`unchanged: true` on identical frames). Pass `region` in physical pixels to crop to a specific element and keep vision-token cost low. Works on iOS simulators, Android sims/emulators/devices, **and physical iOS 17+ devices** (over Apple's CoreDevice tunnel — no external tools or sudo required, the connected RN client's `isSimulator: false` flag picks the right path automatically).
188
+ - **Screenshots** — WebP, auto-diffing. Every response carries a `hash` so callers can diff externally; `{ unchanged: true, lastMeta }` is returned when bytes match the previous capture (`lastMeta` mirrors the original meta — width / height / scale / hash — so polling loops don't need to re-query). Pass `region` in physical pixels to crop to a specific element and keep vision-token cost low. Works on iOS simulators, Android sims/emulators/devices, **and physical iOS 17+ devices** (over Apple's CoreDevice tunnel — no external tools or sudo required, the connected RN client's `isSimulator: false` flag picks the right path automatically).
189
189
  - **App lifecycle** — launch, terminate, restart.
190
- - **Device enumeration** — list sims / emulators / devices, annotated with active MCP clients.
190
+ - **Device enumeration** — list sims / emulators / devices, annotated with active MCP clients. Pass `connected: true` to filter to just devices with a live MCP client attached.
191
191
 
192
192
  iOS input goes through a bundled `ios-hid` Swift binary that injects HID events directly into iOS Simulator via private frameworks — no external daemons to install or keep running. Real-device iOS input isn't supported yet (screenshots are); use a simulator or Android device for tap/swipe automation.
193
193
 
@@ -259,7 +259,7 @@ Show a native `Alert.alert` from the agent with any combination of `default` / `
259
259
 
260
260
  ### console
261
261
 
262
- Tails `console.log` / `warn` / `error` / `info` / `debug` into a ring buffer the agent can read or clear. Each entry carries a monotonic `id`. Args are stored raw and projected at query time — Errors, Dates, class instances, cyclic refs, functions, Symbols, Maps, Sets all collapse to compact `${kind}` markers. Listing tools accept standard `path` / `depth` / `maxBytes` projection args (default depth 3); drill via `path: '[-1:][0].args[1]'` to fetch one specific arg. Buffer size, captured levels, and whether stack traces are collected are all configurable.
262
+ Tails `console.log` / `warn` / `error` / `info` / `debug` / `trace` / `group` / `groupCollapsed` / `groupEnd` into a ring buffer the agent can read or clear. `trace` (and error / warn by default) capture stacks. Each entry carries a monotonic `id`. Args are stored raw and projected at query time — Errors, Dates, class instances, cyclic refs, functions, Symbols, Maps, Sets all collapse to compact `${kind}` markers. Listing tools accept standard `path` / `depth` / `maxBytes` projection args (default depth 3); drill via `path: '[-1:][0].args[1]'` to fetch one specific arg. Buffer size, captured levels, and whether stack traces are collected are all configurable.
263
263
 
264
264
  ```ts
265
265
  consoleModule({
@@ -281,7 +281,7 @@ Captures unhandled JS errors (via `ErrorUtils.setGlobalHandler`) and unhandled p
281
281
 
282
282
  The heart of UI inspection. Search the component tree via a chained `query`: each step narrows the result by **criteria** within a given **scope**, with multiple matches fanning out into the next step.
283
283
 
284
- - **Criteria**: `name`, `testID`, `mcpId`, `text`, `hasProps`, `props` (equality + `contains`), `not`, `any`.
284
+ - **Criteria**: `name`, `testID`, `mcpId`, `text`, `hasProps`, `props` (equality + `contains` / `regex`), `not`, `any`. `name` / `mcpId` / `testID` / `text` accept either an exact string or a `/pattern/flags` slash form (e.g. `name: "/^Pressable/"` matches Pressable / PressableView / …) — same syntax wherever string matching shows up in the tool.
285
285
  - **Scopes**: `descendants`, `children`, `parent`, `ancestors`, `siblings`, `self`, `root` (the React fiber root — useful as a first step to dump the whole tree), `screen` (focused screen fiber from React Navigation), `nearest_host` (closest host component).
286
286
 
287
287
  Wrapper cascades (`PressableView → Pressable → View → RCTView`) collapse to the topmost by default, so overlapping matches don't drown the result. `bounds` come back in physical pixels and pair directly with `host__tap` — or use `host__tap_fiber` for the locate-and-tap shortcut.
@@ -291,14 +291,14 @@ Pass `waitFor: { until: 'appear' | 'disappear', timeout?, interval?, stable? }`
291
291
  **Per-field projection.** Heavy fields — `props` and `hooks` — are projected per-field via `select`, so the rest of the response (mcpId, name, total) stays raw and always visible. Each takes its own `path` / `depth` / `maxBytes` knobs:
292
292
 
293
293
  - `select: [{ props: { path: "data[0:5]", depth: 2 } }]` — drill into props.data[0..5) with 2 levels of expansion.
294
- - `select: [{ hooks: { kinds: ["State"], names: ["isLoading"], withValues: true, depth: 2, path: "[0].value" } }]` — filter hooks by kind/name + project hook values.
294
+ - `select: [{ hooks: { kinds: ["State"], names: ["isLoading"], withValues: true, depth: 2, path: "[0].value" } }]` — filter hooks by kind/name + project hook values. `mcpIds: ['count:screens/HomeScreen/HomeScreen:50']` targets one specific call-site directly; `kinds` covers React 18/19 too (`Optimistic`, `ActionState`, `Use`, plus the classic State / Effect / Memo / …).
295
295
  - `select: [{ children: 5 }]` — recursive light-only walker, dumps a tree of mcpId/name 5 levels deep from each match. At the bottom, sub-children appear as `{ "${arr}": N }` so you see there's more to drill. Heavy fields (`props`/`hooks`) are not allowed inside `select.children` — query a child's mcpId separately when you need them.
296
296
  - `select: ['mcpId', 'refMethods']` — list native-ref methods (focus, blur, measure, scrollTo, ...) available for `call({ method })`. `null` when the fiber has no native instance.
297
297
  - `query({ steps: [{ scope: 'root' }], select: [{ children: 5 }] })` — the canonical "dump the whole tree" entry point.
298
298
 
299
299
  Heavy nested values render as compact `${kind}`-keyed markers — `{"${arr}":47}`, `{"${fun}":"onPress"}`, `{"${str}":{ "len":1247, "preview":"..." }}` for long strings, `{"${Date}":"iso"}`, `{"${Err}":{ name, msg }}`, `{"${cyc}":true}`, `{"${ref}":{ mcpId, name }}` for component refs. Wide objects/arrays (>30 keys / >50 items) get a `${truncated}` sentinel as the first entry.
300
300
 
301
- Hooks pull `useState` / `useMemo` / `useCallback` / `useRef` / `useEffect` / custom hooks with variable names recovered from source (via `__mcp_hooks` metadata from the test-id babel plugin). `withValues: true` adds resolved values; `expansionDepth` caps custom-hook recursion (`0` = top-level only); `format: "tree"` returns nested children instead of flat `via` chains. Sensitive names (password, token, jwt, secret, credential, apiKey, authorization, *Pin) are auto-redacted — override via `fiberTreeModule({ redactHookNames, additionalRedactHookNames })`. Works against any HOC chain (`memo`, `forwardRef`, custom HOCs, `as` casts) and library hooks from react-query, react-redux, reanimated, react-navigation.
301
+ Hooks pull `useState` / `useMemo` / `useCallback` / `useRef` / `useEffect` / custom hooks with variable names recovered from source (via `__mcp_hooks` metadata from the test-id babel plugin). Every entry also carries an `mcpId` — `<name>:<shortFile>:<line>` in the same shape as JSX `data-mcp-id` — so you can drop it straight into `Read(file, line)` to jump to the call site without grepping. React 18 and 19 hooks are mapped to dedicated kinds (`Optimistic`, `ActionState`, `Use`, `SyncExternalStore`, `DeferredValue`, …) alongside the classics; `use(promise | context)` is detected too, with `<obj>.use(...)` calls (`database.use`, `app.use`) filtered out by a React-namespace guard so they don't show up as false-positive hooks. `withValues: true` adds resolved values; `expansionDepth` caps custom-hook recursion (`0` = top-level only); `format: "tree"` returns nested children instead of flat `via` chains. Sensitive names (password, token, jwt, secret, credential, apiKey, authorization, *Pin) are auto-redacted — override via `fiberTreeModule({ redactHookNames, additionalRedactHookNames })`. Works against any HOC chain (`memo`, `forwardRef`, custom HOCs, `as` casts) and library hooks from react-query, react-redux, reanimated, react-navigation.
302
302
 
303
303
  ### i18n
304
304
 
@@ -0,0 +1,13 @@
1
+ import { type NodePath, type types as BabelTypes } from '@babel/core';
2
+ import { type CollectedHook } from './types';
3
+ /**
4
+ * Walk a function body collecting hook-call metadata in source order. Names
5
+ * come from the consuming binding:
6
+ * const [count, setCount] = useState(0) → "count"
7
+ * const memoValue = useMemo(...) → "memoValue"
8
+ * useEffect(...) → "effect:<index>"
9
+ * The `kind` is taken from HOOK_KIND for built-ins, or "Custom" for any
10
+ * other identifier matching `/^use[A-Z]/`.
11
+ */
12
+ export declare const collectHooksInBody: (body: NodePath<BabelTypes.Node>, t: typeof BabelTypes, shortFile: string, separator: string) => CollectedHook[];
13
+ //# sourceMappingURL=collectHooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectHooks.d.ts","sourceRoot":"","sources":["../../../src/babel/testIdPlugin/collectHooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,KAAK,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAGtE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,SACvB,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,KAC5B,OAAO,UAAU,aACT,MAAM,aACN,MAAM,KAChB,aAAa,EAmGf,CAAC"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.collectHooksInBody = void 0;
4
+ const constants_1 = require("./constants");
5
+ /**
6
+ * Walk a function body collecting hook-call metadata in source order. Names
7
+ * come from the consuming binding:
8
+ * const [count, setCount] = useState(0) → "count"
9
+ * const memoValue = useMemo(...) → "memoValue"
10
+ * useEffect(...) → "effect:<index>"
11
+ * The `kind` is taken from HOOK_KIND for built-ins, or "Custom" for any
12
+ * other identifier matching `/^use[A-Z]/`.
13
+ */
14
+ const collectHooksInBody = (body, t, shortFile, separator) => {
15
+ const hooks = [];
16
+ const anonCounters = {};
17
+ body.traverse({
18
+ CallExpression(callPath) {
19
+ const callee = callPath.node.callee;
20
+ // Three call shapes:
21
+ // useState(x) — direct identifier
22
+ // React.useState(x) — MemberExpression (compiled react libs)
23
+ // _React2.useState(x) — MemberExpression (bundler-mangled)
24
+ let hookIdent;
25
+ let isMemberCall = false;
26
+ let memberObject;
27
+ if (t.isIdentifier(callee)) {
28
+ hookIdent = callee.name;
29
+ }
30
+ else if (t.isMemberExpression(callee) &&
31
+ !callee.computed &&
32
+ t.isIdentifier(callee.property)) {
33
+ hookIdent = callee.property.name;
34
+ isMemberCall = true;
35
+ if (t.isIdentifier(callee.object))
36
+ memberObject = callee.object.name;
37
+ }
38
+ if (!hookIdent || !constants_1.HOOK_NAME_RE.test(hookIdent))
39
+ return;
40
+ // For the `<obj>.use(...)` form, only accept calls with a React-like
41
+ // namespace as the object — otherwise `database.use(middleware)` and
42
+ // friends light up. `useXxx` member calls (`React.useState`) keep
43
+ // working through the same gate since their property name is unique
44
+ // enough on its own; the filter just prunes ambiguous bare `use`.
45
+ if (isMemberCall && hookIdent === 'use' && !constants_1.REACT_NAMESPACE_RE.test(memberObject ?? '')) {
46
+ return;
47
+ }
48
+ const kind = constants_1.HOOK_KIND[hookIdent] ?? 'Custom';
49
+ // Resolve hook name from the consuming binding when possible.
50
+ let hookName;
51
+ const parent = callPath.parent;
52
+ if (t.isVariableDeclarator(parent)) {
53
+ const id = parent.id;
54
+ if (t.isIdentifier(id)) {
55
+ hookName = id.name;
56
+ }
57
+ else if (t.isArrayPattern(id)) {
58
+ // const [value, setter] = useState(0) → pick the first binding
59
+ const first = id.elements[0];
60
+ if (first && t.isIdentifier(first)) {
61
+ hookName = first.name;
62
+ }
63
+ }
64
+ else if (t.isObjectPattern(id)) {
65
+ // const { foo } = useCustomHook() — rare, name it after the first key
66
+ const firstProp = id.properties[0];
67
+ if (firstProp && t.isObjectProperty(firstProp) && t.isIdentifier(firstProp.key)) {
68
+ hookName = firstProp.key.name;
69
+ }
70
+ }
71
+ }
72
+ if (!hookName) {
73
+ // Naked hook call (typical for useEffect). Generate a positional name
74
+ // keyed by the hook kind so "effect:0" / "effect:1" don't collide
75
+ // with state hooks if user has multiple effects.
76
+ const counterKey = kind.toLowerCase();
77
+ const index = anonCounters[counterKey] ?? 0;
78
+ anonCounters[counterKey] = index + 1;
79
+ hookName = `${counterKey}:${index}`;
80
+ }
81
+ const entry = { hook: hookIdent, kind, name: hookName };
82
+ const line = callPath.node.loc?.start.line;
83
+ if (line) {
84
+ entry.mcpId = `${hookName}${separator}${shortFile}${separator}${line}`;
85
+ }
86
+ if (kind === 'Custom' && !isMemberCall) {
87
+ // Only attach a function reference for direct-identifier calls where
88
+ // we can verify the binding is module-scoped (import / top-level
89
+ // const/let/var/function). MemberExpression calls (React.useX) are
90
+ // always built-in hooks anyway — kind ends up mapped, no expansion
91
+ // needed. Local/parameter names would throw ReferenceError at the
92
+ // injection site (which is module-level).
93
+ const binding = callPath.scope.getBinding(hookIdent);
94
+ if (binding && binding.scope.block.type === 'Program') {
95
+ entry.fnIdent = hookIdent;
96
+ }
97
+ }
98
+ hooks.push(entry);
99
+ },
100
+ Function(innerPath) {
101
+ // Don't descend into nested functions — their hooks are not this
102
+ // component's hooks. `useCallback(() => {...})` is still traversed
103
+ // because the wrapper call is a call expression visited before we
104
+ // skip into the body (we only skip the nested function's own
105
+ // declaration/body traversal).
106
+ innerPath.skip();
107
+ },
108
+ });
109
+ return hooks;
110
+ };
111
+ exports.collectHooksInBody = collectHooksInBody;
112
+ //# sourceMappingURL=collectHooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectHooks.js","sourceRoot":"","sources":["../../../src/babel/testIdPlugin/collectHooks.ts"],"names":[],"mappings":";;;AAEA,2CAA0E;AAG1E;;;;;;;;GAQG;AACI,MAAM,kBAAkB,GAAG,CAChC,IAA+B,EAC/B,CAAoB,EACpB,SAAiB,EACjB,SAAiB,EACA,EAAE;IACnB,MAAM,KAAK,GAAoB,EAAE,CAAC;IAClC,MAAM,YAAY,GAA2B,EAAE,CAAC;IAEhD,IAAI,CAAC,QAAQ,CAAC;QACZ,cAAc,CAAC,QAAQ;YACrB,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;YACpC,qBAAqB;YACrB,8CAA8C;YAC9C,mEAAmE;YACnE,+DAA+D;YAC/D,IAAI,SAA6B,CAAC;YAClC,IAAI,YAAY,GAAG,KAAK,CAAC;YACzB,IAAI,YAAgC,CAAC;YACrC,IAAI,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC3B,SAAS,GA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YAAY,EAAE,CAAC;gBACvC,qEAAqE;gBACrE,iEAAiE;gBACjE,mEAAmE;gBACnE,mEAAmE;gBACnE,kEAAkE;gBAClE,0CAA0C;gBAC1C,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;gBACrD,IAAI,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;oBACtD,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC;gBAC5B,CAAC;YACH,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;QACD,QAAQ,CAAC,SAAS;YAChB,iEAAiE;YACjE,mEAAmE;YACnE,kEAAkE;YAClE,6DAA6D;YAC7D,+BAA+B;YAC/B,SAAS,CAAC,IAAI,EAAE,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAxGW,QAAA,kBAAkB,sBAwG7B"}
@@ -0,0 +1,6 @@
1
+ export declare const DEFAULT_ATTR = "data-mcp-id";
2
+ export declare const DEFAULT_EXCLUDE: string[];
3
+ export declare const HOOK_KIND: Record<string, string>;
4
+ export declare const HOOK_NAME_RE: RegExp;
5
+ export declare const REACT_NAMESPACE_RE: RegExp;
6
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/babel/testIdPlugin/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,gBAAgB,CAAC;AAE1C,eAAO,MAAM,eAAe,UAO3B,CAAC;AAQF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmB5C,CAAC;AAIF,eAAO,MAAM,YAAY,QAAkB,CAAC;AAQ5C,eAAO,MAAM,kBAAkB,QAAoB,CAAC"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REACT_NAMESPACE_RE = exports.HOOK_NAME_RE = exports.HOOK_KIND = exports.DEFAULT_EXCLUDE = exports.DEFAULT_ATTR = void 0;
4
+ exports.DEFAULT_ATTR = 'data-mcp-id';
5
+ exports.DEFAULT_EXCLUDE = [
6
+ 'Fragment',
7
+ 'React.Fragment',
8
+ 'React.StrictMode',
9
+ 'React.Suspense',
10
+ 'StrictMode',
11
+ 'Suspense',
12
+ ];
13
+ // Map of built-in React hook names → agent-friendly `kind` labels. Anything
14
+ // matching the hook-name detector (`use` exact or `/^use[A-Z]/`) that is
15
+ // NOT in this table is treated as "Custom".
16
+ //
17
+ // react-dom-only hooks (`useFormStatus`, `useFormState`) are intentionally
18
+ // omitted — this library targets React Native, where neither exists.
19
+ exports.HOOK_KIND = {
20
+ use: 'Use',
21
+ useActionState: 'ActionState',
22
+ useCallback: 'Callback',
23
+ useContext: 'Context',
24
+ useDebugValue: 'DebugValue',
25
+ useDeferredValue: 'DeferredValue',
26
+ useEffect: 'Effect',
27
+ useId: 'Id',
28
+ useImperativeHandle: 'ImperativeHandle',
29
+ useInsertionEffect: 'InsertionEffect',
30
+ useLayoutEffect: 'LayoutEffect',
31
+ useMemo: 'Memo',
32
+ useOptimistic: 'Optimistic',
33
+ useReducer: 'Reducer',
34
+ useRef: 'Ref',
35
+ useState: 'State',
36
+ useSyncExternalStore: 'SyncExternalStore',
37
+ useTransition: 'Transition',
38
+ };
39
+ // Hook-name detector. Accepts `use` exact (React 19's `use(promise|context)`)
40
+ // AND the classic `use[A-Z]\w*` pattern.
41
+ exports.HOOK_NAME_RE = /^use([A-Z]|$)/;
42
+ // For the MemberExpression form (`X.use(...)`) we need to filter out
43
+ // unrelated method calls — `database.use(middleware)`, `app.use(router)` etc.
44
+ // Allow only object names that look like React-namespace bindings: literal
45
+ // `React` / `react` and the common bundler-mangled forms (`_react`,
46
+ // `_React2`, `_react3`, …). Same heuristic for any hook, but matters most
47
+ // for bare `use` whose name is otherwise too generic to disambiguate.
48
+ exports.REACT_NAMESPACE_RE = /^_?[Rr]eact\d*$/;
49
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/babel/testIdPlugin/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,aAAa,CAAC;AAE7B,QAAA,eAAe,GAAG;IAC7B,UAAU;IACV,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,YAAY;IACZ,UAAU;CACX,CAAC;AAEF,4EAA4E;AAC5E,yEAAyE;AACzE,4CAA4C;AAC5C,EAAE;AACF,2EAA2E;AAC3E,qEAAqE;AACxD,QAAA,SAAS,GAA2B;IAC/C,GAAG,EAAE,KAAK;IACV,cAAc,EAAE,aAAa;IAC7B,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,SAAS;IACrB,aAAa,EAAE,YAAY;IAC3B,gBAAgB,EAAE,eAAe;IACjC,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,IAAI;IACX,mBAAmB,EAAE,kBAAkB;IACvC,kBAAkB,EAAE,iBAAiB;IACrC,eAAe,EAAE,cAAc;IAC/B,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,YAAY;IAC3B,UAAU,EAAE,SAAS;IACrB,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,OAAO;IACjB,oBAAoB,EAAE,mBAAmB;IACzC,aAAa,EAAE,YAAY;CAC5B,CAAC;AAEF,8EAA8E;AAC9E,yCAAyC;AAC5B,QAAA,YAAY,GAAG,eAAe,CAAC;AAE5C,qEAAqE;AACrE,8EAA8E;AAC9E,2EAA2E;AAC3E,oEAAoE;AACpE,0EAA0E;AAC1E,sEAAsE;AACzD,QAAA,kBAAkB,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type NodePath, type types as BabelTypes } from '@babel/core';
2
+ export declare const isCapitalized: (name: string | undefined) => boolean;
3
+ export declare const getShortFile: (filename: string | null | undefined) => string;
4
+ export declare const isCustomHookName: (name: string | undefined) => boolean;
5
+ export declare const bodyUsesJSX: (bodyPath: NodePath<BabelTypes.Node>) => boolean;
6
+ export declare const bodyCallsHook: (bodyPath: NodePath<BabelTypes.Node>, t: typeof BabelTypes) => boolean;
7
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/babel/testIdPlugin/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,KAAK,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAQtE,eAAO,MAAM,aAAa,SAAU,MAAM,GAAG,SAAS,KAAG,OAOxD,CAAC;AAMF,eAAO,MAAM,YAAY,aAAc,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAMlE,CAAC;AAMF,eAAO,MAAM,gBAAgB,SAAU,MAAM,GAAG,SAAS,KAAG,OAE3D,CAAC;AAIF,eAAO,MAAM,WAAW,aAAc,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,KAAG,OAWjE,CAAC;AAEF,eAAO,MAAM,aAAa,aACd,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,KAChC,OAAO,UAAU,KACnB,OAwBF,CAAC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bodyCallsHook = exports.bodyUsesJSX = exports.isCustomHookName = exports.getShortFile = exports.isCapitalized = void 0;
4
+ // Cheap, conservative component detector: the binding name starts with a
5
+ // capital letter and the function body mentions JSX somewhere. Covers
6
+ // `function LoginForm() { return <View />; }` and
7
+ // `const LoginForm = (props) => <View />;`. HOC-wrapped components
8
+ // (memo / forwardRef / observer) are handled in `VariableDeclarator` by
9
+ // unwrapping the call expression first via `findInnerFunctionBodyPath`.
10
+ const isCapitalized = (name) => {
11
+ return (!!name &&
12
+ name.length > 0 &&
13
+ name[0] === name[0]?.toUpperCase() &&
14
+ name[0] !== name[0]?.toLowerCase());
15
+ };
16
+ exports.isCapitalized = isCapitalized;
17
+ // Strip the absolute path prefix (anything up to and including the project's
18
+ // `/src/`) and drop the .ts/.tsx/.js/.jsx extension. Same shape components
19
+ // use inside `data-mcp-id` so a hook's `mcpId` and a JSX element's
20
+ // `data-mcp-id` look interchangeable to an agent reading them.
21
+ const getShortFile = (filename) => {
22
+ const file = filename ?? 'unknown';
23
+ const relative = file.includes('/src/')
24
+ ? (file.split('/src/').pop() ?? file)
25
+ : (file.split('/').pop() ?? file);
26
+ return relative.replace(/\.(tsx?|jsx?)$/, '');
27
+ };
28
+ exports.getShortFile = getShortFile;
29
+ // Is this a candidate custom hook definition? Name matches `use[A-Z]...`
30
+ // and the body contains at least one built-in or custom hook call. Matches
31
+ // userland hooks AND library hook sources that happen to pass through our
32
+ // babel transform (Metro runs plugins on node_modules by default).
33
+ const isCustomHookName = (name) => {
34
+ return !!name && /^use[A-Z]/.test(name);
35
+ };
36
+ exports.isCustomHookName = isCustomHookName;
37
+ // Heuristic: the function body must reference JSX. Otherwise it's just a
38
+ // plain capitalized helper that happens to share the naming convention.
39
+ const bodyUsesJSX = (bodyPath) => {
40
+ let uses = false;
41
+ bodyPath.traverse({
42
+ JSXElement() {
43
+ uses = true;
44
+ },
45
+ JSXFragment() {
46
+ uses = true;
47
+ },
48
+ });
49
+ return uses;
50
+ };
51
+ exports.bodyUsesJSX = bodyUsesJSX;
52
+ const bodyCallsHook = (bodyPath, t) => {
53
+ let hit = false;
54
+ bodyPath.traverse({
55
+ CallExpression(callPath) {
56
+ if (hit)
57
+ return;
58
+ const callee = callPath.node.callee;
59
+ if (t.isIdentifier(callee) && /^use[A-Z]/.test(callee.name)) {
60
+ hit = true;
61
+ return;
62
+ }
63
+ if (t.isMemberExpression(callee) &&
64
+ !callee.computed &&
65
+ t.isIdentifier(callee.property) &&
66
+ /^use[A-Z]/.test(callee.property.name)) {
67
+ hit = true;
68
+ }
69
+ },
70
+ Function(innerPath) {
71
+ innerPath.skip();
72
+ },
73
+ });
74
+ return hit;
75
+ };
76
+ exports.bodyCallsHook = bodyCallsHook;
77
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/babel/testIdPlugin/helpers.ts"],"names":[],"mappings":";;;AAEA,yEAAyE;AACzE,sEAAsE;AACtE,kDAAkD;AAClD,mEAAmE;AACnE,wEAAwE;AACxE,wEAAwE;AACjE,MAAM,aAAa,GAAG,CAAC,IAAwB,EAAW,EAAE;IACjE,OAAO,CACL,CAAC,CAAC,IAAI;QACN,IAAI,CAAC,MAAM,GAAG,CAAC;QACf,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE;QAClC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CACnC,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB;AAEF,6EAA6E;AAC7E,2EAA2E;AAC3E,mEAAmE;AACnE,+DAA+D;AACxD,MAAM,YAAY,GAAG,CAAC,QAAmC,EAAU,EAAE;IAC1E,MAAM,IAAI,GAAG,QAAQ,IAAI,SAAS,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QACrC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC;QACrC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,CAAC;IACpC,OAAO,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC,CAAC;AANW,QAAA,YAAY,gBAMvB;AAEF,yEAAyE;AACzE,2EAA2E;AAC3E,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AQ,CAAC,SAAS;YAChB,SAAS,CAAC,IAAI,EAAE,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AA3BW,QAAA,aAAa,iBA2BxB"}
@@ -0,0 +1,4 @@
1
+ import { type NodePath, type types as BabelTypes } from '@babel/core';
2
+ export declare const findInnerFunctionBodyPath: (startPath: NodePath<BabelTypes.Node>, t: typeof BabelTypes) => NodePath<BabelTypes.Node> | null;
3
+ export declare const findInnerIdentifier: (startPath: NodePath<BabelTypes.Node>, t: typeof BabelTypes) => NodePath<BabelTypes.Identifier> | null;
4
+ //# sourceMappingURL=hocUnwrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hocUnwrap.d.ts","sourceRoot":"","sources":["../../../src/babel/testIdPlugin/hocUnwrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,KAAK,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAmFtE,eAAO,MAAM,yBAAyB,cACzB,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,KACjC,OAAO,UAAU,KACnB,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,IAO9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,cACnB,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,KACjC,OAAO,UAAU,KACnB,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,IAIpC,CAAC"}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findInnerIdentifier = exports.findInnerFunctionBodyPath = void 0;
4
+ // Recognize callee shapes that look like an HOC application without locking
5
+ // to a hardcoded name list. Two shapes pass:
6
+ // 1. `memo(fn)` / `forwardRef(fn)` / `withAuth(fn)` — bare Identifier callee.
7
+ // 2. `React.memo(fn)` / `Mobx.observer(fn)` — MemberExpression where the
8
+ // object identifier resolves to a module (import) binding. This rules
9
+ // out `arr.map(fn)` and similar local-method calls, which would
10
+ // otherwise produce harmless-but-noisy metadata on a non-component
11
+ // binding. Property access on a deep chain (`a.b.c(fn)`) is rejected.
12
+ const isLikelyHocCallee = (callPath, t) => {
13
+ const callee = callPath.node.callee;
14
+ if (t.isIdentifier(callee))
15
+ return true;
16
+ if (t.isMemberExpression(callee) &&
17
+ !callee.computed &&
18
+ t.isIdentifier(callee.property) &&
19
+ t.isIdentifier(callee.object)) {
20
+ const binding = callPath.scope.getBinding(callee.object.name);
21
+ return !!binding && binding.kind === 'module';
22
+ }
23
+ return false;
24
+ };
25
+ // Walk down a CallExpression chain (`memo(forwardRef(...))`,
26
+ // `withAuth(observer(...))`, etc.) to whatever the chain bottoms out at.
27
+ // Returns null if no unwrap happened (the start was not a recognized HOC
28
+ // chain). Each link must look like a plausible HOC application via
29
+ // `isLikelyHocCallee`, so non-HOC calls that happen to take a function
30
+ // argument (e.g. `arr.map(fn)`) don't trigger metadata attachment on the
31
+ // outer binding.
32
+ //
33
+ // Transparently steps through `AssignmentExpression` and `SequenceExpression`
34
+ // wrappers — react-refresh injects `_c = <fn>` and similar synthetic
35
+ // expression wraps around the inner component during its `VariableDeclaration`
36
+ // enter visitor (which runs before our `VariableDeclarator` visitor). Without
37
+ // the step-through, our unwrap would dead-end at the AssignmentExpression
38
+ // and miss the inner arrow / function expression entirely.
39
+ const unwrapTransparentExpr = (path) => {
40
+ let cur = path;
41
+ // Bound the loop to defend against pathological ASTs.
42
+ for (let i = 0; i < 8; i++) {
43
+ if (cur.isAssignmentExpression() && cur.node.operator === '=') {
44
+ cur = cur.get('right');
45
+ continue;
46
+ }
47
+ if (cur.isSequenceExpression()) {
48
+ const exprs = cur.get('expressions');
49
+ if (exprs.length === 0)
50
+ break;
51
+ cur = exprs[exprs.length - 1];
52
+ continue;
53
+ }
54
+ break;
55
+ }
56
+ return cur;
57
+ };
58
+ const unwrapHocChainToBottom = (startPath, t) => {
59
+ let cur = unwrapTransparentExpr(startPath);
60
+ let unwrapped = false;
61
+ while (cur.isCallExpression() && cur.node.arguments.length > 0 && isLikelyHocCallee(cur, t)) {
62
+ const arg0 = cur.get('arguments.0');
63
+ if (!arg0.node)
64
+ return null;
65
+ cur = unwrapTransparentExpr(arg0);
66
+ unwrapped = true;
67
+ }
68
+ return unwrapped ? cur : null;
69
+ };
70
+ // Two consumers of the unwrap walk:
71
+ // 1. Inline-function case (`memo(() => <JSX />)`) — find the body so we can
72
+ // collect hooks and attach metadata directly to the outer binding.
73
+ // 2. Identifier-ref case (`memo(InnerFn)`) — record `{ outer, inner }` so a
74
+ // deferred copy `Outer.__mcp_hooks = Inner.__mcp_hooks` can be emitted
75
+ // at Program:exit. The inline case can't use the deferred copy approach
76
+ // because there's no name to copy from.
77
+ const findInnerFunctionBodyPath = (startPath, t) => {
78
+ const bottom = unwrapHocChainToBottom(startPath, t);
79
+ if (!bottom)
80
+ return null;
81
+ if (bottom.isArrowFunctionExpression() || bottom.isFunctionExpression()) {
82
+ return bottom.get('body');
83
+ }
84
+ return null;
85
+ };
86
+ exports.findInnerFunctionBodyPath = findInnerFunctionBodyPath;
87
+ const findInnerIdentifier = (startPath, t) => {
88
+ const bottom = unwrapHocChainToBottom(startPath, t);
89
+ if (!bottom)
90
+ return null;
91
+ return bottom.isIdentifier() ? bottom : null;
92
+ };
93
+ exports.findInnerIdentifier = findInnerIdentifier;
94
+ //# sourceMappingURL=hocUnwrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hocUnwrap.js","sourceRoot":"","sources":["../../../src/babel/testIdPlugin/hocUnwrap.ts"],"names":[],"mappings":";;;AAEA,4EAA4E;AAC5E,6CAA6C;AAC7C,gFAAgF;AAChF,2EAA2E;AAC3E,2EAA2E;AAC3E,qEAAqE;AACrE,wEAAwE;AACxE,2EAA2E;AAC3E,MAAM,iBAAiB,GAAG,CACxB,QAA6C,EAC7C,CAAoB,EACX,EAAE;IACX,MAAM,MAAM,GAAG,QAAQ,CAAC,IAA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C,GAAG,CAAC,MAAM,CAA8B,CAAC;IACzD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAVW,QAAA,yBAAyB,6BAUpC;AAEK,MAAM,mBAAmB,GAAG,CACjC,SAAoC,EACpC,CAAoB,EACoB,EAAE;IAC1C,MAAM,MAAM,GAAG,sBAAsB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACpD,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,OAAO,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAE,MAA0C,CAAC,CAAC,CAAC,IAAI,CAAC;AACpF,CAAC,CAAC;AAPW,QAAA,mBAAmB,uBAO9B"}
@@ -2,4 +2,4 @@ import { type PluginObj, type types as BabelTypes } from '@babel/core';
2
2
  export default function testIdPlugin({ types: t }: {
3
3
  types: typeof BabelTypes;
4
4
  }): PluginObj;
5
- //# sourceMappingURL=testIdPlugin.d.ts.map
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/babel/testIdPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,KAAK,KAAK,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAoBtF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAAE,KAAK,EAAE,OAAO,UAAU,CAAA;CAAE,GAAG,SAAS,CAgN1F"}