execbro 0.0.1-reserve → 1.10.13

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 (475) hide show
  1. package/LICENSE +32 -0
  2. package/README.md +496 -0
  3. package/build/__tests__/helpers/fake-cdp-server.d.ts +56 -0
  4. package/build/__tests__/helpers/fake-cdp-server.d.ts.map +1 -0
  5. package/build/__tests__/helpers/fake-cdp-server.js +120 -0
  6. package/build/__tests__/helpers/fake-cdp-server.js.map +1 -0
  7. package/build/__tests__/helpers/tap-test-helpers.d.ts +36 -0
  8. package/build/__tests__/helpers/tap-test-helpers.d.ts.map +1 -0
  9. package/build/__tests__/helpers/tap-test-helpers.js +130 -0
  10. package/build/__tests__/helpers/tap-test-helpers.js.map +1 -0
  11. package/build/__tests__/integration/auto-reconnect.test.d.ts +2 -0
  12. package/build/__tests__/integration/auto-reconnect.test.d.ts.map +1 -0
  13. package/build/__tests__/integration/auto-reconnect.test.js +118 -0
  14. package/build/__tests__/integration/auto-reconnect.test.js.map +1 -0
  15. package/build/__tests__/integration/connection-health.test.d.ts +2 -0
  16. package/build/__tests__/integration/connection-health.test.d.ts.map +1 -0
  17. package/build/__tests__/integration/connection-health.test.js +157 -0
  18. package/build/__tests__/integration/connection-health.test.js.map +1 -0
  19. package/build/__tests__/integration/execute-in-app.test.d.ts +2 -0
  20. package/build/__tests__/integration/execute-in-app.test.d.ts.map +1 -0
  21. package/build/__tests__/integration/execute-in-app.test.js +124 -0
  22. package/build/__tests__/integration/execute-in-app.test.js.map +1 -0
  23. package/build/__tests__/integration/per-call-timeout.test.d.ts +2 -0
  24. package/build/__tests__/integration/per-call-timeout.test.d.ts.map +1 -0
  25. package/build/__tests__/integration/per-call-timeout.test.js +103 -0
  26. package/build/__tests__/integration/per-call-timeout.test.js.map +1 -0
  27. package/build/__tests__/integration/tap-strategies.test.d.ts +2 -0
  28. package/build/__tests__/integration/tap-strategies.test.d.ts.map +1 -0
  29. package/build/__tests__/integration/tap-strategies.test.js +330 -0
  30. package/build/__tests__/integration/tap-strategies.test.js.map +1 -0
  31. package/build/__tests__/integration/tools.test.d.ts +2 -0
  32. package/build/__tests__/integration/tools.test.d.ts.map +1 -0
  33. package/build/__tests__/integration/tools.test.js +227 -0
  34. package/build/__tests__/integration/tools.test.js.map +1 -0
  35. package/build/__tests__/setup.d.ts +2 -0
  36. package/build/__tests__/setup.d.ts.map +1 -0
  37. package/build/__tests__/setup.js +15 -0
  38. package/build/__tests__/setup.js.map +1 -0
  39. package/build/__tests__/unit/androidEmulatorAvds.test.d.ts +2 -0
  40. package/build/__tests__/unit/androidEmulatorAvds.test.d.ts.map +1 -0
  41. package/build/__tests__/unit/androidEmulatorAvds.test.js +98 -0
  42. package/build/__tests__/unit/androidEmulatorAvds.test.js.map +1 -0
  43. package/build/__tests__/unit/buildToken.test.d.ts +2 -0
  44. package/build/__tests__/unit/buildToken.test.d.ts.map +1 -0
  45. package/build/__tests__/unit/buildToken.test.js +22 -0
  46. package/build/__tests__/unit/buildToken.test.js.map +1 -0
  47. package/build/__tests__/unit/bundle.test.d.ts +2 -0
  48. package/build/__tests__/unit/bundle.test.d.ts.map +1 -0
  49. package/build/__tests__/unit/bundle.test.js +53 -0
  50. package/build/__tests__/unit/bundle.test.js.map +1 -0
  51. package/build/__tests__/unit/burst.test.d.ts +2 -0
  52. package/build/__tests__/unit/burst.test.d.ts.map +1 -0
  53. package/build/__tests__/unit/burst.test.js +54 -0
  54. package/build/__tests__/unit/burst.test.js.map +1 -0
  55. package/build/__tests__/unit/connection-health.test.d.ts +2 -0
  56. package/build/__tests__/unit/connection-health.test.d.ts.map +1 -0
  57. package/build/__tests__/unit/connection-health.test.js +38 -0
  58. package/build/__tests__/unit/connection-health.test.js.map +1 -0
  59. package/build/__tests__/unit/debugGlobals.test.d.ts +2 -0
  60. package/build/__tests__/unit/debugGlobals.test.d.ts.map +1 -0
  61. package/build/__tests__/unit/debugGlobals.test.js +14 -0
  62. package/build/__tests__/unit/debugGlobals.test.js.map +1 -0
  63. package/build/__tests__/unit/deviceDiscovery.test.d.ts +2 -0
  64. package/build/__tests__/unit/deviceDiscovery.test.d.ts.map +1 -0
  65. package/build/__tests__/unit/deviceDiscovery.test.js +119 -0
  66. package/build/__tests__/unit/deviceDiscovery.test.js.map +1 -0
  67. package/build/__tests__/unit/deviceResolver.test.d.ts +2 -0
  68. package/build/__tests__/unit/deviceResolver.test.d.ts.map +1 -0
  69. package/build/__tests__/unit/deviceResolver.test.js +261 -0
  70. package/build/__tests__/unit/deviceResolver.test.js.map +1 -0
  71. package/build/__tests__/unit/escapeNonAscii.test.d.ts +2 -0
  72. package/build/__tests__/unit/escapeNonAscii.test.d.ts.map +1 -0
  73. package/build/__tests__/unit/escapeNonAscii.test.js +76 -0
  74. package/build/__tests__/unit/escapeNonAscii.test.js.map +1 -0
  75. package/build/__tests__/unit/exec.test.d.ts +2 -0
  76. package/build/__tests__/unit/exec.test.d.ts.map +1 -0
  77. package/build/__tests__/unit/exec.test.js +54 -0
  78. package/build/__tests__/unit/exec.test.js.map +1 -0
  79. package/build/__tests__/unit/executor.test.d.ts +2 -0
  80. package/build/__tests__/unit/executor.test.d.ts.map +1 -0
  81. package/build/__tests__/unit/executor.test.js +220 -0
  82. package/build/__tests__/unit/executor.test.js.map +1 -0
  83. package/build/__tests__/unit/failureArtifact.test.d.ts +2 -0
  84. package/build/__tests__/unit/failureArtifact.test.d.ts.map +1 -0
  85. package/build/__tests__/unit/failureArtifact.test.js +207 -0
  86. package/build/__tests__/unit/failureArtifact.test.js.map +1 -0
  87. package/build/__tests__/unit/fastRefreshRecorder.test.d.ts +2 -0
  88. package/build/__tests__/unit/fastRefreshRecorder.test.d.ts.map +1 -0
  89. package/build/__tests__/unit/fastRefreshRecorder.test.js +68 -0
  90. package/build/__tests__/unit/fastRefreshRecorder.test.js.map +1 -0
  91. package/build/__tests__/unit/fastRefreshTools.test.d.ts +2 -0
  92. package/build/__tests__/unit/fastRefreshTools.test.d.ts.map +1 -0
  93. package/build/__tests__/unit/fastRefreshTools.test.js +112 -0
  94. package/build/__tests__/unit/fastRefreshTools.test.js.map +1 -0
  95. package/build/__tests__/unit/fiberMatch.test.d.ts +2 -0
  96. package/build/__tests__/unit/fiberMatch.test.d.ts.map +1 -0
  97. package/build/__tests__/unit/fiberMatch.test.js +114 -0
  98. package/build/__tests__/unit/fiberMatch.test.js.map +1 -0
  99. package/build/__tests__/unit/fingerprint.test.d.ts +2 -0
  100. package/build/__tests__/unit/fingerprint.test.d.ts.map +1 -0
  101. package/build/__tests__/unit/fingerprint.test.js +99 -0
  102. package/build/__tests__/unit/fingerprint.test.js.map +1 -0
  103. package/build/__tests__/unit/focusedInput.test.d.ts +2 -0
  104. package/build/__tests__/unit/focusedInput.test.d.ts.map +1 -0
  105. package/build/__tests__/unit/focusedInput.test.js +58 -0
  106. package/build/__tests__/unit/focusedInput.test.js.map +1 -0
  107. package/build/__tests__/unit/focusedInputTools.test.d.ts +2 -0
  108. package/build/__tests__/unit/focusedInputTools.test.d.ts.map +1 -0
  109. package/build/__tests__/unit/focusedInputTools.test.js +79 -0
  110. package/build/__tests__/unit/focusedInputTools.test.js.map +1 -0
  111. package/build/__tests__/unit/iconSemantics.test.d.ts +2 -0
  112. package/build/__tests__/unit/iconSemantics.test.d.ts.map +1 -0
  113. package/build/__tests__/unit/iconSemantics.test.js +80 -0
  114. package/build/__tests__/unit/iconSemantics.test.js.map +1 -0
  115. package/build/__tests__/unit/imageBuffer.test.d.ts +2 -0
  116. package/build/__tests__/unit/imageBuffer.test.d.ts.map +1 -0
  117. package/build/__tests__/unit/imageBuffer.test.js +128 -0
  118. package/build/__tests__/unit/imageBuffer.test.js.map +1 -0
  119. package/build/__tests__/unit/logs.test.d.ts +2 -0
  120. package/build/__tests__/unit/logs.test.d.ts.map +1 -0
  121. package/build/__tests__/unit/logs.test.js +90 -0
  122. package/build/__tests__/unit/logs.test.js.map +1 -0
  123. package/build/__tests__/unit/measureComponent.test.d.ts +2 -0
  124. package/build/__tests__/unit/measureComponent.test.d.ts.map +1 -0
  125. package/build/__tests__/unit/measureComponent.test.js +66 -0
  126. package/build/__tests__/unit/measureComponent.test.js.map +1 -0
  127. package/build/__tests__/unit/measureComponentTools.test.d.ts +2 -0
  128. package/build/__tests__/unit/measureComponentTools.test.d.ts.map +1 -0
  129. package/build/__tests__/unit/measureComponentTools.test.js +94 -0
  130. package/build/__tests__/unit/measureComponentTools.test.js.map +1 -0
  131. package/build/__tests__/unit/metro.test.d.ts +2 -0
  132. package/build/__tests__/unit/metro.test.d.ts.map +1 -0
  133. package/build/__tests__/unit/metro.test.js +61 -0
  134. package/build/__tests__/unit/metro.test.js.map +1 -0
  135. package/build/__tests__/unit/network.test.d.ts +2 -0
  136. package/build/__tests__/unit/network.test.d.ts.map +1 -0
  137. package/build/__tests__/unit/network.test.js +102 -0
  138. package/build/__tests__/unit/network.test.js.map +1 -0
  139. package/build/__tests__/unit/networkInterceptor.test.d.ts +2 -0
  140. package/build/__tests__/unit/networkInterceptor.test.d.ts.map +1 -0
  141. package/build/__tests__/unit/networkInterceptor.test.js +104 -0
  142. package/build/__tests__/unit/networkInterceptor.test.js.map +1 -0
  143. package/build/__tests__/unit/probe.test.d.ts +2 -0
  144. package/build/__tests__/unit/probe.test.d.ts.map +1 -0
  145. package/build/__tests__/unit/probe.test.js +62 -0
  146. package/build/__tests__/unit/probe.test.js.map +1 -0
  147. package/build/__tests__/unit/rnGlobalsBootstrap.test.d.ts +2 -0
  148. package/build/__tests__/unit/rnGlobalsBootstrap.test.d.ts.map +1 -0
  149. package/build/__tests__/unit/rnGlobalsBootstrap.test.js +29 -0
  150. package/build/__tests__/unit/rnGlobalsBootstrap.test.js.map +1 -0
  151. package/build/__tests__/unit/screenState.test.d.ts +2 -0
  152. package/build/__tests__/unit/screenState.test.d.ts.map +1 -0
  153. package/build/__tests__/unit/screenState.test.js +384 -0
  154. package/build/__tests__/unit/screenState.test.js.map +1 -0
  155. package/build/__tests__/unit/screenshot-diff.test.d.ts +2 -0
  156. package/build/__tests__/unit/screenshot-diff.test.d.ts.map +1 -0
  157. package/build/__tests__/unit/screenshot-diff.test.js +97 -0
  158. package/build/__tests__/unit/screenshot-diff.test.js.map +1 -0
  159. package/build/__tests__/unit/tap-evidence.test.d.ts +2 -0
  160. package/build/__tests__/unit/tap-evidence.test.d.ts.map +1 -0
  161. package/build/__tests__/unit/tap-evidence.test.js +89 -0
  162. package/build/__tests__/unit/tap-evidence.test.js.map +1 -0
  163. package/build/__tests__/unit/tap.test.d.ts +2 -0
  164. package/build/__tests__/unit/tap.test.d.ts.map +1 -0
  165. package/build/__tests__/unit/tap.test.js +767 -0
  166. package/build/__tests__/unit/tap.test.js.map +1 -0
  167. package/build/__tests__/unit/timeoutClamp.test.d.ts +2 -0
  168. package/build/__tests__/unit/timeoutClamp.test.d.ts.map +1 -0
  169. package/build/__tests__/unit/timeoutClamp.test.js +17 -0
  170. package/build/__tests__/unit/timeoutClamp.test.js.map +1 -0
  171. package/build/__tests__/unit/toolDescriptions.test.d.ts +2 -0
  172. package/build/__tests__/unit/toolDescriptions.test.d.ts.map +1 -0
  173. package/build/__tests__/unit/toolDescriptions.test.js +145 -0
  174. package/build/__tests__/unit/toolDescriptions.test.js.map +1 -0
  175. package/build/__tests__/unit/transportClassify.test.d.ts +2 -0
  176. package/build/__tests__/unit/transportClassify.test.d.ts.map +1 -0
  177. package/build/__tests__/unit/transportClassify.test.js +60 -0
  178. package/build/__tests__/unit/transportClassify.test.js.map +1 -0
  179. package/build/__tests__/unit/verifyAction.test.d.ts +2 -0
  180. package/build/__tests__/unit/verifyAction.test.d.ts.map +1 -0
  181. package/build/__tests__/unit/verifyAction.test.js +26 -0
  182. package/build/__tests__/unit/verifyAction.test.js.map +1 -0
  183. package/build/core/android.d.ts +299 -0
  184. package/build/core/android.d.ts.map +1 -0
  185. package/build/core/android.js +1582 -0
  186. package/build/core/android.js.map +1 -0
  187. package/build/core/appDetection.d.ts +20 -0
  188. package/build/core/appDetection.d.ts.map +1 -0
  189. package/build/core/appDetection.js +167 -0
  190. package/build/core/appDetection.js.map +1 -0
  191. package/build/core/bundle.d.ts +49 -0
  192. package/build/core/bundle.d.ts.map +1 -0
  193. package/build/core/bundle.js +356 -0
  194. package/build/core/bundle.js.map +1 -0
  195. package/build/core/componentSearch.d.ts +41 -0
  196. package/build/core/componentSearch.d.ts.map +1 -0
  197. package/build/core/componentSearch.js +588 -0
  198. package/build/core/componentSearch.js.map +1 -0
  199. package/build/core/componentTree.d.ts +13 -0
  200. package/build/core/componentTree.d.ts.map +1 -0
  201. package/build/core/componentTree.js +275 -0
  202. package/build/core/componentTree.js.map +1 -0
  203. package/build/core/config.d.ts +9 -0
  204. package/build/core/config.d.ts.map +1 -0
  205. package/build/core/config.js +28 -0
  206. package/build/core/config.js.map +1 -0
  207. package/build/core/connection.d.ts +102 -0
  208. package/build/core/connection.d.ts.map +1 -0
  209. package/build/core/connection.js +1710 -0
  210. package/build/core/connection.js.map +1 -0
  211. package/build/core/connectionState.d.ts +122 -0
  212. package/build/core/connectionState.d.ts.map +1 -0
  213. package/build/core/connectionState.js +313 -0
  214. package/build/core/connectionState.js.map +1 -0
  215. package/build/core/debugGlobals.d.ts +6 -0
  216. package/build/core/debugGlobals.d.ts.map +1 -0
  217. package/build/core/debugGlobals.js +370 -0
  218. package/build/core/debugGlobals.js.map +1 -0
  219. package/build/core/deviceDiscovery.d.ts +52 -0
  220. package/build/core/deviceDiscovery.d.ts.map +1 -0
  221. package/build/core/deviceDiscovery.js +74 -0
  222. package/build/core/deviceDiscovery.js.map +1 -0
  223. package/build/core/deviceResolver.d.ts +44 -0
  224. package/build/core/deviceResolver.d.ts.map +1 -0
  225. package/build/core/deviceResolver.js +225 -0
  226. package/build/core/deviceResolver.js.map +1 -0
  227. package/build/core/errorScreenParser.d.ts +30 -0
  228. package/build/core/errorScreenParser.d.ts.map +1 -0
  229. package/build/core/errorScreenParser.js +198 -0
  230. package/build/core/errorScreenParser.js.map +1 -0
  231. package/build/core/errors.d.ts +14 -0
  232. package/build/core/errors.d.ts.map +1 -0
  233. package/build/core/errors.js +17 -0
  234. package/build/core/errors.js.map +1 -0
  235. package/build/core/escapeNonAscii.d.ts +18 -0
  236. package/build/core/escapeNonAscii.d.ts.map +1 -0
  237. package/build/core/escapeNonAscii.js +352 -0
  238. package/build/core/escapeNonAscii.js.map +1 -0
  239. package/build/core/exec.d.ts +22 -0
  240. package/build/core/exec.d.ts.map +1 -0
  241. package/build/core/exec.js +54 -0
  242. package/build/core/exec.js.map +1 -0
  243. package/build/core/executor.d.ts +9 -0
  244. package/build/core/executor.d.ts.map +1 -0
  245. package/build/core/executor.js +12 -0
  246. package/build/core/executor.js.map +1 -0
  247. package/build/core/failureArtifact.d.ts +120 -0
  248. package/build/core/failureArtifact.d.ts.map +1 -0
  249. package/build/core/failureArtifact.js +113 -0
  250. package/build/core/failureArtifact.js.map +1 -0
  251. package/build/core/fastRefreshRecorder.d.ts +23 -0
  252. package/build/core/fastRefreshRecorder.d.ts.map +1 -0
  253. package/build/core/fastRefreshRecorder.js +83 -0
  254. package/build/core/fastRefreshRecorder.js.map +1 -0
  255. package/build/core/fastRefreshTools.d.ts +19 -0
  256. package/build/core/fastRefreshTools.d.ts.map +1 -0
  257. package/build/core/fastRefreshTools.js +71 -0
  258. package/build/core/fastRefreshTools.js.map +1 -0
  259. package/build/core/feedback.d.ts +18 -0
  260. package/build/core/feedback.d.ts.map +1 -0
  261. package/build/core/feedback.js +73 -0
  262. package/build/core/feedback.js.map +1 -0
  263. package/build/core/fiberMatch.d.ts +25 -0
  264. package/build/core/fiberMatch.d.ts.map +1 -0
  265. package/build/core/fiberMatch.js +35 -0
  266. package/build/core/fiberMatch.js.map +1 -0
  267. package/build/core/fingerprint.d.ts +4 -0
  268. package/build/core/fingerprint.d.ts.map +1 -0
  269. package/build/core/fingerprint.js +47 -0
  270. package/build/core/fingerprint.js.map +1 -0
  271. package/build/core/focusedInput.d.ts +27 -0
  272. package/build/core/focusedInput.d.ts.map +1 -0
  273. package/build/core/focusedInput.js +110 -0
  274. package/build/core/focusedInput.js.map +1 -0
  275. package/build/core/focusedInputTools.d.ts +21 -0
  276. package/build/core/focusedInputTools.d.ts.map +1 -0
  277. package/build/core/focusedInputTools.js +51 -0
  278. package/build/core/focusedInputTools.js.map +1 -0
  279. package/build/core/format.d.ts +8 -0
  280. package/build/core/format.d.ts.map +1 -0
  281. package/build/core/format.js +34 -0
  282. package/build/core/format.js.map +1 -0
  283. package/build/core/guides.d.ts +21 -0
  284. package/build/core/guides.d.ts.map +1 -0
  285. package/build/core/guides.js +397 -0
  286. package/build/core/guides.js.map +1 -0
  287. package/build/core/iconSemantics.d.ts +18 -0
  288. package/build/core/iconSemantics.d.ts.map +1 -0
  289. package/build/core/iconSemantics.js +114 -0
  290. package/build/core/iconSemantics.js.map +1 -0
  291. package/build/core/imageBuffer.d.ts +37 -0
  292. package/build/core/imageBuffer.d.ts.map +1 -0
  293. package/build/core/imageBuffer.js +58 -0
  294. package/build/core/imageBuffer.js.map +1 -0
  295. package/build/core/index.d.ts +37 -0
  296. package/build/core/index.d.ts.map +1 -0
  297. package/build/core/index.js +66 -0
  298. package/build/core/index.js.map +1 -0
  299. package/build/core/inspector.d.ts +55 -0
  300. package/build/core/inspector.d.ts.map +1 -0
  301. package/build/core/inspector.js +603 -0
  302. package/build/core/inspector.js.map +1 -0
  303. package/build/core/ios.d.ts +263 -0
  304. package/build/core/ios.d.ts.map +1 -0
  305. package/build/core/ios.js +1705 -0
  306. package/build/core/ios.js.map +1 -0
  307. package/build/core/jsExecute.d.ts +62 -0
  308. package/build/core/jsExecute.d.ts.map +1 -0
  309. package/build/core/jsExecute.js +696 -0
  310. package/build/core/jsExecute.js.map +1 -0
  311. package/build/core/license.d.ts +48 -0
  312. package/build/core/license.d.ts.map +1 -0
  313. package/build/core/license.js +267 -0
  314. package/build/core/license.js.map +1 -0
  315. package/build/core/logbox.d.ts +58 -0
  316. package/build/core/logbox.d.ts.map +1 -0
  317. package/build/core/logbox.js +330 -0
  318. package/build/core/logbox.js.map +1 -0
  319. package/build/core/logs.d.ts +44 -0
  320. package/build/core/logs.d.ts.map +1 -0
  321. package/build/core/logs.js +149 -0
  322. package/build/core/logs.js.map +1 -0
  323. package/build/core/measureComponent.d.ts +19 -0
  324. package/build/core/measureComponent.d.ts.map +1 -0
  325. package/build/core/measureComponent.js +94 -0
  326. package/build/core/measureComponent.js.map +1 -0
  327. package/build/core/measureComponentTools.d.ts +6 -0
  328. package/build/core/measureComponentTools.d.ts.map +1 -0
  329. package/build/core/measureComponentTools.js +43 -0
  330. package/build/core/measureComponentTools.js.map +1 -0
  331. package/build/core/metro.d.ts +31 -0
  332. package/build/core/metro.d.ts.map +1 -0
  333. package/build/core/metro.js +124 -0
  334. package/build/core/metro.js.map +1 -0
  335. package/build/core/nativeOnlyHints.d.ts +14 -0
  336. package/build/core/nativeOnlyHints.d.ts.map +1 -0
  337. package/build/core/nativeOnlyHints.js +58 -0
  338. package/build/core/nativeOnlyHints.js.map +1 -0
  339. package/build/core/network.d.ts +43 -0
  340. package/build/core/network.d.ts.map +1 -0
  341. package/build/core/network.js +217 -0
  342. package/build/core/network.js.map +1 -0
  343. package/build/core/networkInterceptor.d.ts +30 -0
  344. package/build/core/networkInterceptor.d.ts.map +1 -0
  345. package/build/core/networkInterceptor.js +211 -0
  346. package/build/core/networkInterceptor.js.map +1 -0
  347. package/build/core/ocr.d.ts +87 -0
  348. package/build/core/ocr.d.ts.map +1 -0
  349. package/build/core/ocr.js +335 -0
  350. package/build/core/ocr.js.map +1 -0
  351. package/build/core/paths.d.ts +2 -0
  352. package/build/core/paths.d.ts.map +1 -0
  353. package/build/core/paths.js +28 -0
  354. package/build/core/paths.js.map +1 -0
  355. package/build/core/posthog.d.ts +5 -0
  356. package/build/core/posthog.d.ts.map +1 -0
  357. package/build/core/posthog.js +52 -0
  358. package/build/core/posthog.js.map +1 -0
  359. package/build/core/pressables.d.ts +46 -0
  360. package/build/core/pressables.d.ts.map +1 -0
  361. package/build/core/pressables.js +1719 -0
  362. package/build/core/pressables.js.map +1 -0
  363. package/build/core/probe.d.ts +12 -0
  364. package/build/core/probe.d.ts.map +1 -0
  365. package/build/core/probe.js +56 -0
  366. package/build/core/probe.js.map +1 -0
  367. package/build/core/redux.d.ts +22 -0
  368. package/build/core/redux.d.ts.map +1 -0
  369. package/build/core/redux.js +116 -0
  370. package/build/core/redux.js.map +1 -0
  371. package/build/core/register.d.ts +8 -0
  372. package/build/core/register.d.ts.map +1 -0
  373. package/build/core/register.js +202 -0
  374. package/build/core/register.js.map +1 -0
  375. package/build/core/rnGlobalsBootstrap.d.ts +16 -0
  376. package/build/core/rnGlobalsBootstrap.d.ts.map +1 -0
  377. package/build/core/rnGlobalsBootstrap.js +116 -0
  378. package/build/core/rnGlobalsBootstrap.js.map +1 -0
  379. package/build/core/screenLayout.d.ts +53 -0
  380. package/build/core/screenLayout.d.ts.map +1 -0
  381. package/build/core/screenLayout.js +878 -0
  382. package/build/core/screenLayout.js.map +1 -0
  383. package/build/core/screenState.d.ts +166 -0
  384. package/build/core/screenState.d.ts.map +1 -0
  385. package/build/core/screenState.js +1352 -0
  386. package/build/core/screenState.js.map +1 -0
  387. package/build/core/sdkBridge.d.ts +67 -0
  388. package/build/core/sdkBridge.d.ts.map +1 -0
  389. package/build/core/sdkBridge.js +148 -0
  390. package/build/core/sdkBridge.js.map +1 -0
  391. package/build/core/state.d.ts +37 -0
  392. package/build/core/state.d.ts.map +1 -0
  393. package/build/core/state.js +124 -0
  394. package/build/core/state.js.map +1 -0
  395. package/build/core/telemetry.d.ts +50 -0
  396. package/build/core/telemetry.d.ts.map +1 -0
  397. package/build/core/telemetry.js +653 -0
  398. package/build/core/telemetry.js.map +1 -0
  399. package/build/core/toolHelpers.d.ts +24 -0
  400. package/build/core/toolHelpers.d.ts.map +1 -0
  401. package/build/core/toolHelpers.js +118 -0
  402. package/build/core/toolHelpers.js.map +1 -0
  403. package/build/core/types.d.ts +162 -0
  404. package/build/core/types.d.ts.map +1 -0
  405. package/build/core/types.js +2 -0
  406. package/build/core/types.js.map +1 -0
  407. package/build/index.d.ts +4 -0
  408. package/build/index.d.ts.map +1 -0
  409. package/build/index.js +132 -0
  410. package/build/index.js.map +1 -0
  411. package/build/pro/screenshot-diff.d.ts +10 -0
  412. package/build/pro/screenshot-diff.d.ts.map +1 -0
  413. package/build/pro/screenshot-diff.js +38 -0
  414. package/build/pro/screenshot-diff.js.map +1 -0
  415. package/build/pro/tap.d.ts +291 -0
  416. package/build/pro/tap.d.ts.map +1 -0
  417. package/build/pro/tap.js +1839 -0
  418. package/build/pro/tap.js.map +1 -0
  419. package/build/pro/verifyAction.d.ts +50 -0
  420. package/build/pro/verifyAction.d.ts.map +1 -0
  421. package/build/pro/verifyAction.js +285 -0
  422. package/build/pro/verifyAction.js.map +1 -0
  423. package/build/tools/_deviceArg.d.ts +45 -0
  424. package/build/tools/_deviceArg.d.ts.map +1 -0
  425. package/build/tools/_deviceArg.js +58 -0
  426. package/build/tools/_deviceArg.js.map +1 -0
  427. package/build/tools/accountTools.d.ts +46 -0
  428. package/build/tools/accountTools.d.ts.map +1 -0
  429. package/build/tools/accountTools.js +223 -0
  430. package/build/tools/accountTools.js.map +1 -0
  431. package/build/tools/bundleTools.d.ts +3 -0
  432. package/build/tools/bundleTools.d.ts.map +1 -0
  433. package/build/tools/bundleTools.js +375 -0
  434. package/build/tools/bundleTools.js.map +1 -0
  435. package/build/tools/componentTools.d.ts +3 -0
  436. package/build/tools/componentTools.d.ts.map +1 -0
  437. package/build/tools/componentTools.js +746 -0
  438. package/build/tools/componentTools.js.map +1 -0
  439. package/build/tools/connectionTools.d.ts +3 -0
  440. package/build/tools/connectionTools.d.ts.map +1 -0
  441. package/build/tools/connectionTools.js +625 -0
  442. package/build/tools/connectionTools.js.map +1 -0
  443. package/build/tools/deviceTools.d.ts +3 -0
  444. package/build/tools/deviceTools.d.ts.map +1 -0
  445. package/build/tools/deviceTools.js +423 -0
  446. package/build/tools/deviceTools.js.map +1 -0
  447. package/build/tools/executionTools.d.ts +3 -0
  448. package/build/tools/executionTools.d.ts.map +1 -0
  449. package/build/tools/executionTools.js +243 -0
  450. package/build/tools/executionTools.js.map +1 -0
  451. package/build/tools/interactionTools.d.ts +3 -0
  452. package/build/tools/interactionTools.d.ts.map +1 -0
  453. package/build/tools/interactionTools.js +539 -0
  454. package/build/tools/interactionTools.js.map +1 -0
  455. package/build/tools/logTools.d.ts +3 -0
  456. package/build/tools/logTools.d.ts.map +1 -0
  457. package/build/tools/logTools.js +371 -0
  458. package/build/tools/logTools.js.map +1 -0
  459. package/build/tools/metaTools.d.ts +7 -0
  460. package/build/tools/metaTools.d.ts.map +1 -0
  461. package/build/tools/metaTools.js +186 -0
  462. package/build/tools/metaTools.js.map +1 -0
  463. package/build/tools/networkTools.d.ts +3 -0
  464. package/build/tools/networkTools.d.ts.map +1 -0
  465. package/build/tools/networkTools.js +478 -0
  466. package/build/tools/networkTools.js.map +1 -0
  467. package/build/tools/reduxTools.d.ts +3 -0
  468. package/build/tools/reduxTools.d.ts.map +1 -0
  469. package/build/tools/reduxTools.js +83 -0
  470. package/build/tools/reduxTools.js.map +1 -0
  471. package/build/tools/screenshotTools.d.ts +3 -0
  472. package/build/tools/screenshotTools.d.ts.map +1 -0
  473. package/build/tools/screenshotTools.js +703 -0
  474. package/build/tools/screenshotTools.js.map +1 -0
  475. package/package.json +63 -2
@@ -0,0 +1,46 @@
1
+ import { z } from "zod";
2
+ export declare function getActivateLicenseConfig(): {
3
+ description: string;
4
+ inputSchema: {
5
+ token: z.ZodString;
6
+ };
7
+ };
8
+ export declare function handleActivateLicense({ token }: {
9
+ token: string;
10
+ }): Promise<{
11
+ content: {
12
+ type: "text";
13
+ text: string;
14
+ }[];
15
+ isError: boolean;
16
+ } | {
17
+ content: {
18
+ type: "text";
19
+ text: string;
20
+ }[];
21
+ isError?: undefined;
22
+ }>;
23
+ export declare function getDeleteAccountConfig(): {
24
+ description: string;
25
+ inputSchema: {
26
+ confirm: z.ZodOptional<z.ZodString>;
27
+ };
28
+ };
29
+ export declare function handleDeleteAccount({ confirm }: {
30
+ confirm?: string;
31
+ }): Promise<{
32
+ content: {
33
+ type: "text";
34
+ text: string;
35
+ }[];
36
+ isError?: undefined;
37
+ } | {
38
+ content: {
39
+ type: "text";
40
+ text: string;
41
+ }[];
42
+ isError: boolean;
43
+ }>;
44
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
45
+ export declare function registerAccountTools(server: McpServer): void;
46
+ //# sourceMappingURL=accountTools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountTools.d.ts","sourceRoot":"","sources":["../../src/tools/accountTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,wBAAgB,wBAAwB;;;;;EASvC;AAED,wBAAsB,qBAAqB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;GA8FvE;AAED,wBAAgB,sBAAsB;;;;;EAarC;AAED,wBAAsB,mBAAmB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;GAuF1E;AAWD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAa5D"}
@@ -0,0 +1,223 @@
1
+ import { z } from "zod";
2
+ import { getInstallationId, getServerVersion, getPackageName } from "../core/telemetry.js";
3
+ import { getDeviceFingerprint } from "../core/fingerprint.js";
4
+ import { resetLicense, getDashboardUrl, ensureLicense } from "../core/license.js";
5
+ import { existsSync, unlinkSync } from "fs";
6
+ import { join } from "path";
7
+ import { getPostHogClient } from "../core/posthog.js";
8
+ import { CONFIG_DIR } from "../core/paths.js";
9
+ import { API_BASE_URL } from "../core/config.js";
10
+ const API_URL = API_BASE_URL;
11
+ const API_KEY = "fb4b5d8f410ff8d0dfe3ade01adc0b2444479ac9380b3f256554dd9d7044f5d2";
12
+ const API_TIMEOUT_MS = 10_000;
13
+ const TELEMETRY_FILE = join(CONFIG_DIR, "telemetry.json");
14
+ const LICENSE_FILE = join(CONFIG_DIR, "license.json");
15
+ export function getActivateLicenseConfig() {
16
+ return {
17
+ description: "Activate a Pro license using an activation token from your dashboard. " +
18
+ "Use this if you signed up on the website and need to link your account to this MCP installation.",
19
+ inputSchema: {
20
+ token: z.string().describe("Activation token from your dashboard"),
21
+ },
22
+ };
23
+ }
24
+ export async function handleActivateLicense({ token }) {
25
+ if (!API_URL) {
26
+ return {
27
+ content: [{ type: "text", text: "License activation is not configured yet." }],
28
+ isError: true,
29
+ };
30
+ }
31
+ try {
32
+ const controller = new AbortController();
33
+ const timeout = setTimeout(() => controller.abort(), API_TIMEOUT_MS);
34
+ const response = await fetch(`${API_URL}/api/accounts/activate`, {
35
+ method: "POST",
36
+ headers: {
37
+ "Content-Type": "application/json",
38
+ "X-API-Key": API_KEY,
39
+ },
40
+ body: JSON.stringify({
41
+ installationId: getInstallationId(),
42
+ fingerprint: getDeviceFingerprint(),
43
+ token,
44
+ }),
45
+ signal: controller.signal,
46
+ });
47
+ clearTimeout(timeout);
48
+ const data = await response.json();
49
+ if (response.ok) {
50
+ resetLicense();
51
+ await ensureLicense();
52
+ const distinctId = getInstallationId();
53
+ const posthog = getPostHogClient();
54
+ if (posthog) {
55
+ posthog.identify({
56
+ distinctId,
57
+ properties: {
58
+ $set: { plan: data.tier },
59
+ },
60
+ });
61
+ posthog.capture({
62
+ distinctId,
63
+ event: "license activated",
64
+ properties: {
65
+ tier: data.tier,
66
+ server_version: getServerVersion(),
67
+ package_name: getPackageName(),
68
+ },
69
+ });
70
+ }
71
+ return {
72
+ content: [{
73
+ type: "text",
74
+ text: `License activated. You're now on the ${data.tier === "pro" ? "Pro" : data.tier} plan.`,
75
+ }],
76
+ };
77
+ }
78
+ if (data.error === "invalid_token") {
79
+ const dashboardUrl = getDashboardUrl();
80
+ return {
81
+ content: [{
82
+ type: "text",
83
+ text: `Invalid or expired token. Generate a new one from your dashboard${dashboardUrl ? ` at ${dashboardUrl}` : ""}.`,
84
+ }],
85
+ isError: true,
86
+ };
87
+ }
88
+ if (data.error === "fingerprint_mismatch") {
89
+ return {
90
+ content: [{ type: "text", text: "Activation failed. This token cannot be used on this device." }],
91
+ isError: true,
92
+ };
93
+ }
94
+ if (data.error === "installation_not_found") {
95
+ return {
96
+ content: [{ type: "text", text: "Installation not found. Please restart your MCP server and try again." }],
97
+ isError: true,
98
+ };
99
+ }
100
+ return {
101
+ content: [{ type: "text", text: `Activation failed: ${data.error || "unknown error"}` }],
102
+ isError: true,
103
+ };
104
+ }
105
+ catch {
106
+ return {
107
+ content: [{ type: "text", text: "Activation failed due to a network error. Please try again." }],
108
+ isError: true,
109
+ };
110
+ }
111
+ }
112
+ export function getDeleteAccountConfig() {
113
+ return {
114
+ description: "Permanently delete your account and reset this MCP installation. " +
115
+ "Removes your server-side data and local cache. You will get a new installation ID on next restart. " +
116
+ "Requires confirm: 'DELETE' to proceed.",
117
+ inputSchema: {
118
+ confirm: z
119
+ .string()
120
+ .optional()
121
+ .describe("Must be exactly 'DELETE' to confirm account deletion"),
122
+ },
123
+ };
124
+ }
125
+ export async function handleDeleteAccount({ confirm }) {
126
+ if (confirm !== "DELETE") {
127
+ return {
128
+ content: [{
129
+ type: "text",
130
+ text: "This will permanently delete your account and all associated data.\n" +
131
+ "Your installation ID, license, and any linked account data will be removed.\n" +
132
+ "Local cache files will be cleared. You will get a new installation ID on next restart.\n\n" +
133
+ "To confirm, call: delete_account({ confirm: 'DELETE' })",
134
+ }],
135
+ };
136
+ }
137
+ if (!API_URL) {
138
+ cleanupLocalFiles();
139
+ return {
140
+ content: [{
141
+ type: "text",
142
+ text: "Local data cleared. You will get a new installation ID on next MCP server restart.",
143
+ }],
144
+ };
145
+ }
146
+ try {
147
+ const controller = new AbortController();
148
+ const timeout = setTimeout(() => controller.abort(), API_TIMEOUT_MS);
149
+ const response = await fetch(`${API_URL}/api/accounts/delete`, {
150
+ method: "POST",
151
+ headers: {
152
+ "Content-Type": "application/json",
153
+ "X-API-Key": API_KEY,
154
+ },
155
+ body: JSON.stringify({
156
+ installationId: getInstallationId(),
157
+ fingerprint: getDeviceFingerprint(),
158
+ }),
159
+ signal: controller.signal,
160
+ });
161
+ clearTimeout(timeout);
162
+ cleanupLocalFiles();
163
+ if (response.ok || response.status === 404) {
164
+ const posthog = getPostHogClient();
165
+ if (posthog) {
166
+ posthog.capture({
167
+ distinctId: getInstallationId(),
168
+ event: "account deleted",
169
+ properties: {
170
+ server_version: getServerVersion(),
171
+ package_name: getPackageName(),
172
+ },
173
+ });
174
+ }
175
+ return {
176
+ content: [{
177
+ type: "text",
178
+ text: "Account deleted. You will get a new installation ID on next MCP server restart.",
179
+ }],
180
+ };
181
+ }
182
+ const data = await response.json();
183
+ if (data.error === "fingerprint_mismatch") {
184
+ return {
185
+ content: [{
186
+ type: "text",
187
+ text: "Deletion failed: fingerprint mismatch. Local files have been cleared.",
188
+ }],
189
+ isError: true,
190
+ };
191
+ }
192
+ return {
193
+ content: [{ type: "text", text: "Account deletion may not have completed on the server. Local files have been cleared." }],
194
+ };
195
+ }
196
+ catch {
197
+ cleanupLocalFiles();
198
+ return {
199
+ content: [{
200
+ type: "text",
201
+ text: "Could not reach the server. Local data has been cleared. Server-side data may still exist.",
202
+ }],
203
+ };
204
+ }
205
+ }
206
+ function cleanupLocalFiles() {
207
+ try {
208
+ if (existsSync(LICENSE_FILE))
209
+ unlinkSync(LICENSE_FILE);
210
+ }
211
+ catch { /* best-effort */ }
212
+ try {
213
+ if (existsSync(TELEMETRY_FILE))
214
+ unlinkSync(TELEMETRY_FILE);
215
+ }
216
+ catch { /* best-effort */ }
217
+ }
218
+ import { registerToolWithTelemetry } from "../core/register.js";
219
+ export function registerAccountTools(server) {
220
+ registerToolWithTelemetry(server, "activate_license", getActivateLicenseConfig(), handleActivateLicense);
221
+ registerToolWithTelemetry(server, "delete_account", getDeleteAccountConfig(), handleDeleteAccount);
222
+ }
223
+ //# sourceMappingURL=accountTools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountTools.js","sourceRoot":"","sources":["../../src/tools/accountTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,OAAO,GAAG,YAAY,CAAC;AAC7B,MAAM,OAAO,GAAG,kEAAkE,CAAC;AACnF,MAAM,cAAc,GAAG,MAAM,CAAC;AAE9B,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;AAC1D,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAEtD,MAAM,UAAU,wBAAwB;IACpC,OAAO;QACH,WAAW,EACP,wEAAwE;YACxE,kGAAkG;QACtG,WAAW,EAAE;YACT,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;SACrE;KACJ,CAAC;AACN,CAAC;AAED,MAAM,CAAC,KAAK,UAAU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,CAAC;oBACN,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,4FAA4F;iBACrG,CAAC;SACL,CAAC;IACN,CAAC;AACL,CAAC;AAED,SAAS,iBAAiB;IACtB,IAAI,CAAC;QACD,IAAI,UAAU,CAAC,YAAY,CAAC;YAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IAC3D,CAAC;IAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC7B,IAAI,CAAC;QACD,IAAI,UAAU,CAAC,cAAc,CAAC;YAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;AACjC,CAAC;AAGD,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IAClD,yBAAyB,CACrB,MAAM,EACN,kBAAkB,EAClB,wBAAwB,EAAE,EAC1B,qBAAqB,CACxB,CAAC;IACF,yBAAyB,CACrB,MAAM,EACN,gBAAgB,EAChB,sBAAsB,EAAE,EACxB,mBAAmB,CACtB,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerBundleTools(server: McpServer): void;
3
+ //# sourceMappingURL=bundleTools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundleTools.d.ts","sourceRoot":"","sources":["../../src/tools/bundleTools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAwBzE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAsb3D"}
@@ -0,0 +1,375 @@
1
+ import { z } from "zod";
2
+ import { registerToolWithTelemetry } from "../core/register.js";
3
+ import { resolveAndroidDeviceId, resolveIosUdid } from "./_deviceArg.js";
4
+ import { getBundleStatusWithErrors, getBundleErrors, checkMetroState, parseErrorScreenText, bundleErrorBuffer, pushLogBox, dismissLogBox, formatDismissedEntries, addLogBoxIgnorePatterns, getLastLogBoxError, detectLogBox, connectedApps, androidScreenshot, iosScreenshot, inferIOSDevicePixelRatio, recognizeText, formatParsedError, } from "../core/index.js";
5
+ export function registerBundleTools(server) {
6
+ // Tool: LogBox control (replaces dismiss_logbox)
7
+ registerToolWithTelemetry(server, "logbox", {
8
+ description: "Interact with React Native's LogBox overlay (dev mode only). " +
9
+ 'Actions: "dismiss" clears all entries and returns their content. ' +
10
+ '"push" displays a message in the LogBox error banner (visible to the developer watching the device). ' +
11
+ '"ignore" adds patterns to suppress future LogBox entries for this session. ' +
12
+ '"detect" reads current LogBox state without modifying it. ' +
13
+ "Only works in __DEV__ mode — LogBox does not exist in production builds.\n" +
14
+ "PURPOSE: Control RN's on-device red/yellow overlay — clear it when it blocks UI, suppress noisy repeats, or push a message back to the developer.\n" +
15
+ "WHEN TO USE: Screenshot/tap reports LogBox is obstructing the screen, an error banner prevents interaction, or you want to surface info to the dev watching the simulator.\n" +
16
+ "WORKFLOW: logbox(action=\"detect\") -> if present: logbox(action=\"dismiss\") to read + clear -> continue UI work. Use action=\"ignore\" with patterns to stop repeat noise.\n" +
17
+ "LIMITATIONS: Dev-only — no effect in production builds. \"push\" at level=\"warning\" won't show a banner unless LogBox is already open.\n" +
18
+ "GOOD: logbox({ action: \"dismiss\" }); logbox({ action: \"ignore\", patterns: [\"[APOLLO]\"] })\n" +
19
+ "BAD: Spamming logbox(action=\"push\") for every tool step — annoys the developer.\n" +
20
+ "SEE ALSO: call get_usage_guide(topic=\"logs\") for the full logs playbook.",
21
+ inputSchema: {
22
+ action: z.enum(["dismiss", "push", "ignore", "detect"]).describe('Action to perform: "dismiss", "push", "ignore", or "detect"'),
23
+ message: z.string().optional().describe('Message to push into LogBox (required when action="push")'),
24
+ level: z.enum(["error", "warning"]).optional().describe('LogBox level for push (default: "error"). Only "error" shows a visible bottom banner; "warning" is stored but not visually shown unless LogBox is already open'),
25
+ expanded: z.boolean().optional().describe('When true, opens the full-screen LogBox detail view instead of the minimized bottom banner. Useful for important messages with clickable URLs (default: false)'),
26
+ subtitle: z.string().optional().describe('Additional info shown in the call stack area when expanded=true (default: "MCP Server"). Use for context like "License Check", "Usage Limit", etc.'),
27
+ target: z.enum(["logbox", "metro"]).optional().describe('Where to push the message (default: "logbox"). "logbox" shows on device screen, "metro" outputs to Metro terminal via console.log'),
28
+ patterns: z.array(z.string()).optional().describe('Patterns to ignore (required when action="ignore"), e.g. ["[APOLLO]", "deprecated"]'),
29
+ device: z.string().optional().describe("Target device name (substring match). Omit for default device. Run get_apps to see connected devices.")
30
+ }
31
+ }, async ({ action, message, level, expanded, subtitle, target, patterns, device }) => {
32
+ const explainLogBoxError = (base) => {
33
+ const reason = getLastLogBoxError();
34
+ const reasonHints = {
35
+ dev_false: "__DEV__ is false — either a production build OR a stale/zombie CDP target whose JS context is in a degraded state. Try scan_metro to drop stale connections, then retry.",
36
+ no_get_modules: "__r.getModules is missing — usually a stale CDP target (not a real runtime). Try scan_metro to refresh.",
37
+ modules_not_iterable: "Module registry returned an unexpected shape.",
38
+ logbox_module_not_found: "LogBoxData module not found in the Metro registry — possible if LogBox is tree-shaken or the app overrode it.",
39
+ execute_failed: "executeInApp failed — no connected app or evaluate timed out.",
40
+ exception: "Exception thrown during detection.",
41
+ };
42
+ const detail = reason ? (reasonHints[reason] ?? reason) : "unknown cause";
43
+ return `${base}\nReason: ${reason ?? "unknown"} — ${detail}`;
44
+ };
45
+ if (action === "dismiss") {
46
+ const result = await dismissLogBox(device);
47
+ if (result === null) {
48
+ return {
49
+ content: [
50
+ {
51
+ type: "text",
52
+ text: explainLogBoxError("LogBox not available.")
53
+ }
54
+ ]
55
+ };
56
+ }
57
+ if (result.totalDismissed === 0) {
58
+ return {
59
+ content: [
60
+ {
61
+ type: "text",
62
+ text: "No LogBox entries to dismiss."
63
+ }
64
+ ]
65
+ };
66
+ }
67
+ return {
68
+ content: [
69
+ {
70
+ type: "text",
71
+ text: formatDismissedEntries(result)
72
+ }
73
+ ]
74
+ };
75
+ }
76
+ if (action === "push") {
77
+ if (!message) {
78
+ return {
79
+ content: [
80
+ {
81
+ type: "text",
82
+ text: 'Error: "message" parameter is required when action is "push".'
83
+ }
84
+ ],
85
+ isError: true
86
+ };
87
+ }
88
+ const success = await pushLogBox(message, level || "error", expanded || false, target || "logbox", subtitle, device);
89
+ if (!success) {
90
+ return {
91
+ content: [
92
+ {
93
+ type: "text",
94
+ text: explainLogBoxError("Failed to push message to LogBox.")
95
+ }
96
+ ]
97
+ };
98
+ }
99
+ return {
100
+ content: [
101
+ {
102
+ type: "text",
103
+ text: target === "metro"
104
+ ? `Message pushed to Metro terminal: "${message}"`
105
+ : `Message pushed to LogBox as ${level || "error"}: "${message}"`
106
+ }
107
+ ]
108
+ };
109
+ }
110
+ if (action === "ignore") {
111
+ if (!patterns || patterns.length === 0) {
112
+ return {
113
+ content: [
114
+ {
115
+ type: "text",
116
+ text: 'Error: "patterns" parameter is required when action is "ignore" (non-empty array of strings).'
117
+ }
118
+ ],
119
+ isError: true
120
+ };
121
+ }
122
+ const activePatterns = await addLogBoxIgnorePatterns(patterns, device);
123
+ if (activePatterns === null) {
124
+ return {
125
+ content: [
126
+ {
127
+ type: "text",
128
+ text: explainLogBoxError("Failed to add ignore patterns.")
129
+ }
130
+ ]
131
+ };
132
+ }
133
+ return {
134
+ content: [
135
+ {
136
+ type: "text",
137
+ text: `Added ignore patterns: ${patterns.map((p) => `"${p}"`).join(", ")}\n\nAll active ignore patterns: ${activePatterns.map((p) => `"${p}"`).join(", ")}`
138
+ }
139
+ ]
140
+ };
141
+ }
142
+ if (action === "detect") {
143
+ const state = await detectLogBox(device);
144
+ if (state === null) {
145
+ return {
146
+ content: [
147
+ {
148
+ type: "text",
149
+ text: explainLogBoxError("LogBox not available.")
150
+ }
151
+ ]
152
+ };
153
+ }
154
+ if (state.total === 0) {
155
+ return {
156
+ content: [
157
+ {
158
+ type: "text",
159
+ text: "No LogBox entries detected."
160
+ }
161
+ ]
162
+ };
163
+ }
164
+ const MAX_MSG_LENGTH = 150;
165
+ let output = `LogBox state: ${state.total} entr${state.total === 1 ? "y" : "ies"} (${state.errors} error${state.errors !== 1 ? "s" : ""}, ${state.warnings} warning${state.warnings !== 1 ? "s" : ""}, ${state.fatals} fatal${state.fatals !== 1 ? "s" : ""})\n`;
166
+ for (const entry of state.entries) {
167
+ const truncated = entry.message.length > MAX_MSG_LENGTH ? entry.message.substring(0, MAX_MSG_LENGTH) + "..." : entry.message;
168
+ const countStr = entry.count > 1 ? ` (x${entry.count})` : "";
169
+ output += `\n[${entry.level}] ${truncated}${countStr}`;
170
+ }
171
+ return {
172
+ content: [
173
+ {
174
+ type: "text",
175
+ text: output
176
+ }
177
+ ]
178
+ };
179
+ }
180
+ return {
181
+ content: [
182
+ {
183
+ type: "text",
184
+ text: `Unknown action: "${action}". Use "dismiss", "push", "ignore", or "detect".`
185
+ }
186
+ ],
187
+ isError: true
188
+ };
189
+ });
190
+ // Tool: Get bundle status
191
+ registerToolWithTelemetry(server, "get_bundle_status", {
192
+ description: "Get the current Metro bundler status including build state and any recent bundling errors. Use this to check if there are compilation/bundling errors that prevent the app from loading.\n" +
193
+ "PURPOSE: Snapshot Metro's current build state (idle / transforming / error) together with any captured errors — a fast \"is the bundler healthy?\" check.\n" +
194
+ "WHEN TO USE: Before diving into runtime debugging — rules out compile-time failures that would make get_logs and tap pointless.\n" +
195
+ "WORKFLOW: get_bundle_status -> if errors present: get_bundle_errors for detail -> fix -> clear_bundle_errors.\n" +
196
+ "LIMITATIONS: Relies on Metro's WebSocket event stream; if Metro isn't running or the connection dropped, status may be stale.\n" +
197
+ "GOOD: get_bundle_status() at the start of a debug session.\n" +
198
+ "BAD: Polling every second — Metro events are push-based; just call once and act on the result.\n" +
199
+ "SEE ALSO: call get_usage_guide(topic=\"bundle\") for the full bundle-check playbook.",
200
+ inputSchema: {}
201
+ }, async () => {
202
+ // Get port from first connected app if available
203
+ const apps = Array.from(connectedApps.values());
204
+ const metroPort = apps.length > 0 ? apps[0].port : undefined;
205
+ const { formatted } = await getBundleStatusWithErrors(bundleErrorBuffer, metroPort);
206
+ return {
207
+ content: [
208
+ {
209
+ type: "text",
210
+ text: formatted
211
+ }
212
+ ]
213
+ };
214
+ });
215
+ // Tool: Get bundle errors
216
+ registerToolWithTelemetry(server, "get_bundle_errors", {
217
+ description: "Retrieve captured Metro bundling/compilation errors. These are errors that occur during the bundle build process (import resolution, syntax errors, transform errors) that prevent the app from loading. If no errors are captured but Metro is running without connected apps, automatically falls back to screenshot+OCR to capture the error from the device screen.\n" +
218
+ "PURPOSE: Surface Metro's build-time failures (not runtime JS errors) that keep the app from booting or hot-reloading.\n" +
219
+ "WHEN TO USE: App shows the red error screen, refuses to connect, or Fast Refresh stops working after an edit. Also use when get_logs is silent but the app is clearly broken.\n" +
220
+ "WORKFLOW: get_bundle_status -> get_bundle_errors -> fix source -> clear_bundle_errors -> reload_app.\n" +
221
+ "LIMITATIONS: Captures errors Metro emits via its WebSocket; the screenshot+OCR fallback requires a booted simulator and the platform param.\n" +
222
+ "GOOD: get_bundle_errors({ platform: \"ios\" })\n" +
223
+ "BAD: Using get_bundle_errors to look for runtime TypeErrors — those live in get_logs, not the bundler.\n" +
224
+ "SEE ALSO: call get_usage_guide(topic=\"bundle\") for the full bundle-check playbook.",
225
+ inputSchema: {
226
+ maxErrors: z.number().optional().default(10).describe("Maximum number of errors to return (default: 10)"),
227
+ platform: z
228
+ .enum(["ios", "android"])
229
+ .optional()
230
+ .describe("Platform for screenshot fallback when no errors are captured via CDP. Required to enable fallback."),
231
+ deviceId: z
232
+ .string()
233
+ .optional()
234
+ .describe("Optional device target for screenshot fallback. Accepts an adb serial / iOS UDID, an emulator/simulator name, or a substring of the connected RN device name. Uses first available device if not specified.")
235
+ }
236
+ }, async ({ maxErrors, platform, deviceId }) => {
237
+ // First, try to get errors from the buffer (captured via CDP/Metro WebSocket)
238
+ const { errors, formatted } = getBundleErrors(bundleErrorBuffer, { maxErrors });
239
+ if (errors.length > 0) {
240
+ return {
241
+ content: [
242
+ {
243
+ type: "text",
244
+ text: `Bundle Errors (${errors.length} captured):\n\n${formatted}`
245
+ }
246
+ ]
247
+ };
248
+ }
249
+ // No errors in buffer - check if we should try fallback
250
+ if (!platform) {
251
+ // No platform specified, return empty result with hint
252
+ return {
253
+ content: [
254
+ {
255
+ type: "text",
256
+ text: `Bundle Errors (0 captured):\n\nNo bundle errors captured.\n\nTip: If the app failed to load and you see a red error screen on the device, use the 'platform' parameter (ios/android) to enable screenshot+OCR fallback for error capture.`
257
+ }
258
+ ]
259
+ };
260
+ }
261
+ // Check Metro state to see if fallback is warranted
262
+ const metroState = await checkMetroState(connectedApps.size);
263
+ if (!metroState.needsFallback) {
264
+ // Metro not running or apps are connected - fallback not needed
265
+ const statusMsg = metroState.metroRunning
266
+ ? "Metro is running and apps are connected."
267
+ : "Metro is not running.";
268
+ return {
269
+ content: [
270
+ {
271
+ type: "text",
272
+ text: `Bundle Errors (0 captured):\n\nNo bundle errors captured. ${statusMsg}`
273
+ }
274
+ ]
275
+ };
276
+ }
277
+ // Metro is running but no apps connected - try screenshot fallback
278
+ try {
279
+ let screenshotResult;
280
+ if (platform === "android") {
281
+ const r = await resolveAndroidDeviceId(deviceId);
282
+ if (!r.ok)
283
+ return r.response;
284
+ screenshotResult = await androidScreenshot(undefined, r.serial);
285
+ }
286
+ else {
287
+ const r = await resolveIosUdid(deviceId);
288
+ if (!r.ok)
289
+ return r.response;
290
+ screenshotResult = await iosScreenshot(undefined, r.udid);
291
+ }
292
+ if (!screenshotResult.success || !screenshotResult.data) {
293
+ return {
294
+ content: [
295
+ {
296
+ type: "text",
297
+ text: `Bundle Errors (0 captured):\n\nNo bundle errors captured via CDP.\n\nMetro is running on port(s) ${metroState.metroPorts.join(", ")} but no apps are connected (possible bundle error).\n\nScreenshot fallback failed: ${screenshotResult.error || "No image data"}`
298
+ }
299
+ ]
300
+ };
301
+ }
302
+ // Calculate device pixel ratio for iOS
303
+ const devicePixelRatio = platform === "ios" && screenshotResult.originalWidth && screenshotResult.originalHeight
304
+ ? inferIOSDevicePixelRatio(screenshotResult.originalWidth, screenshotResult.originalHeight)
305
+ : 1;
306
+ // Run OCR on the screenshot
307
+ const ocrResult = await recognizeText(screenshotResult.data, {
308
+ scaleFactor: screenshotResult.scaleFactor || 1,
309
+ platform,
310
+ devicePixelRatio
311
+ });
312
+ if (!ocrResult.success || !ocrResult.fullText) {
313
+ return {
314
+ content: [
315
+ {
316
+ type: "text",
317
+ text: `Bundle Errors (0 captured):\n\nNo bundle errors captured via CDP.\n\nMetro is running on port(s) ${metroState.metroPorts.join(", ")} but no apps are connected.\n\nScreenshot captured but OCR found no text. The screen may not show an error message.`
318
+ }
319
+ ]
320
+ };
321
+ }
322
+ // Parse the OCR text for error information
323
+ const parsedError = parseErrorScreenText(ocrResult.fullText);
324
+ if (!parsedError.found || !parsedError.error) {
325
+ return {
326
+ content: [
327
+ {
328
+ type: "text",
329
+ text: `Bundle Errors (0 captured):\n\nNo bundle errors captured via CDP.\n\nMetro is running on port(s) ${metroState.metroPorts.join(", ")} but no apps are connected.\n\nScreenshot OCR text:\n${ocrResult.fullText.substring(0, 1000)}${ocrResult.fullText.length > 1000 ? "..." : ""}\n\n(No error pattern detected in text)`
330
+ }
331
+ ]
332
+ };
333
+ }
334
+ // Add the parsed error to the buffer for future reference
335
+ bundleErrorBuffer.add(parsedError.error);
336
+ return {
337
+ content: [
338
+ {
339
+ type: "text",
340
+ text: `Bundle Errors (1 captured via screenshot fallback):\n\n${formatParsedError(parsedError)}`
341
+ }
342
+ ]
343
+ };
344
+ }
345
+ catch (fallbackError) {
346
+ return {
347
+ content: [
348
+ {
349
+ type: "text",
350
+ text: `Bundle Errors (0 captured):\n\nNo bundle errors captured via CDP.\n\nMetro is running on port(s) ${metroState.metroPorts.join(", ")} but no apps are connected.\n\nScreenshot fallback error: ${fallbackError instanceof Error ? fallbackError.message : String(fallbackError)}`
351
+ }
352
+ ]
353
+ };
354
+ }
355
+ });
356
+ // Tool: Clear bundle errors
357
+ registerToolWithTelemetry(server, "clear_bundle_errors", {
358
+ description: "Clear the bundle error buffer.\n" +
359
+ "PURPOSE: Reset captured Metro build errors after a fix so get_bundle_status/get_bundle_errors reflect the current state.\n" +
360
+ "WHEN TO USE: After fixing a bundling error and before re-triggering Metro to confirm the error is gone.\n" +
361
+ "SEE ALSO: call get_usage_guide(topic=\"bundle\") for the full bundle-check playbook.",
362
+ inputSchema: {}
363
+ }, async () => {
364
+ const count = bundleErrorBuffer.clear();
365
+ return {
366
+ content: [
367
+ {
368
+ type: "text",
369
+ text: `Cleared ${count} bundle errors from buffer.`
370
+ }
371
+ ]
372
+ };
373
+ });
374
+ }
375
+ //# sourceMappingURL=bundleTools.js.map