peachsim 0.1.1728 → 0.1.1744

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 (374) hide show
  1. package/README.md +4 -0
  2. package/cli/app-catalog.ts +47 -23
  3. package/cli/app-fonts.ts +19 -1
  4. package/cli/command-registry.ts +3 -0
  5. package/cli/commands/control.ts +68 -16
  6. package/cli/commands/coverage-swift.ts +112 -4
  7. package/cli/commands/device.ts +3 -1
  8. package/cli/commands/doctor.ts +1 -4
  9. package/cli/commands/inspect/settling.ts +6 -1
  10. package/cli/commands/inspect/wait-ready.ts +22 -2
  11. package/cli/commands/package.ts +33 -21
  12. package/cli/commands/push.ts +56 -0
  13. package/cli/commands/serve.ts +9 -0
  14. package/cli/commands/shell-url.ts +41 -9
  15. package/cli/commands/swift.ts +1 -1
  16. package/cli/current-sim.ts +27 -0
  17. package/cli/drivers/linux-browser-libs.lock.json +323 -1
  18. package/cli/drivers/linux-browser-libs.ts +8 -6
  19. package/cli/drivers/playwright.ts +5 -1
  20. package/cli/internal-child.ts +11 -1
  21. package/cli/main.ts +6 -0
  22. package/cli/native-input.ts +1 -7
  23. package/cli/outbound-endpoints.ts +9 -1
  24. package/cli/packaged-app-launcher.ts +3 -1
  25. package/cli/scene-video.ts +28 -7
  26. package/cli/ws-bridge.ts +3 -1
  27. package/detox/index.ts +18 -5
  28. package/dist-lib/agent-daemon-client.cjs +1 -1
  29. package/dist-lib/agent-events.cjs +1 -1
  30. package/dist-lib/attached-projects.cjs +5 -2
  31. package/dist-lib/auth/shared-session.cjs +5 -2
  32. package/dist-lib/backend-origin.cjs +1 -1
  33. package/dist-lib/beta.cjs +1 -1
  34. package/dist-lib/beta.mjs +1 -1
  35. package/dist-lib/bridge-constants.cjs +1 -1
  36. package/dist-lib/bridge-contract-input.cjs +1 -1
  37. package/dist-lib/bridge-contract-input.mjs +1 -1
  38. package/dist-lib/bridge-contract.cjs +1 -1
  39. package/dist-lib/bridge-contract.mjs +1 -1
  40. package/dist-lib/bundle-channel.cjs +9932 -4561
  41. package/dist-lib/capture-contract.cjs +1 -1
  42. package/dist-lib/capture-contract.mjs +1 -1
  43. package/dist-lib/cloud-contract.cjs +1 -1
  44. package/dist-lib/cloud-contract.mjs +1 -1
  45. package/dist-lib/cloud-test-args.cjs +1 -1
  46. package/dist-lib/cloud-test-args.mjs +1 -1
  47. package/dist-lib/cloud.cjs +1 -1
  48. package/dist-lib/cloud.mjs +1 -1
  49. package/dist-lib/config.cjs +1 -1
  50. package/dist-lib/config.mjs +1 -1
  51. package/dist-lib/detox/index.cjs +30 -8
  52. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  53. package/dist-lib/expo-swift-bundle.cjs +6886 -3303
  54. package/dist-lib/expo-swift-metadata.cjs +14 -2
  55. package/dist-lib/expo-swift-metadata.mjs +14 -2
  56. package/dist-lib/home-paths.cjs +7 -2
  57. package/dist-lib/host/bridge-host.cjs +8513 -3085
  58. package/dist-lib/host/fetch-proxy-handler.cjs +19 -7
  59. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  60. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  61. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  62. package/dist-lib/host/websocket-proxy.cjs +6 -3
  63. package/dist-lib/index.cjs +175 -80
  64. package/dist-lib/jump-to-source-babel.cjs +1 -1
  65. package/dist-lib/jump-to-source-native.cjs +1 -1
  66. package/dist-lib/kotlin-host.cjs +209 -32
  67. package/dist-lib/menu.cjs +7 -1
  68. package/dist-lib/menu.mjs +7 -1
  69. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  70. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  71. package/dist-lib/metro-production-bundle.cjs +1 -1
  72. package/dist-lib/metro-production-bundle.mjs +1 -1
  73. package/dist-lib/metro.cjs +146 -76
  74. package/dist-lib/native-app-identity-project.cjs +76 -39
  75. package/dist-lib/native-app-identity-project.mjs +76 -39
  76. package/dist-lib/native-app-identity.cjs +10 -3
  77. package/dist-lib/native-app-identity.mjs +10 -3
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +1 -1
  80. package/dist-lib/plist.cjs +1 -1
  81. package/dist-lib/plist.mjs +1 -1
  82. package/dist-lib/profiles.cjs +5 -2
  83. package/dist-lib/public-brand.cjs +1 -1
  84. package/dist-lib/public-origins-lib-esm.json +25 -23
  85. package/dist-lib/public-origins-lib.json +138 -80
  86. package/dist-lib/react-native-host-modules.cjs +5 -2
  87. package/dist-lib/react-native-host-modules.mjs +5 -2
  88. package/dist-lib/reap-browser.cjs +1 -1
  89. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  90. package/dist-lib/sdk.cjs +4 -1
  91. package/dist-lib/sdk.mjs +4 -1
  92. package/dist-lib/skills.cjs +41126 -36493
  93. package/dist-lib/swift-compile.cjs +2103 -444
  94. package/dist-lib/swift-compile.mjs +2025 -369
  95. package/dist-lib/swift-package.cjs +1 -1
  96. package/dist-lib/swift-package.mjs +1 -1
  97. package/dist-lib/swift-submit.cjs +2 -2
  98. package/dist-lib/swift-submit.mjs +2 -2
  99. package/dist-lib/swift-toolchain.cjs +84 -24
  100. package/dist-lib/swift.cjs +1 -1
  101. package/dist-lib/vite-swift.cjs +6094 -2687
  102. package/dist-lib/vite.cjs +32 -10
  103. package/dist-lib/worklet-executable.cjs +1 -1
  104. package/dist-lib/worklet-executable.mjs +1 -1
  105. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
  106. package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
  107. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
  108. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
  109. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -3
  110. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
  111. package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
  112. package/dist-types/packages/peach-engine/src/engine/node.d.ts +10 -1
  113. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
  114. package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
  115. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
  116. package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
  117. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
  118. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +6 -0
  119. package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
  120. package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
  121. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
  122. package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
  123. package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
  124. package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
  125. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
  126. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
  127. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
  128. package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
  129. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
  130. package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
  131. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -2
  132. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
  133. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +6 -0
  134. package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
  135. package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
  136. package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
  137. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +14 -1
  138. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
  139. package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
  140. package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
  141. package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
  142. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
  143. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
  144. package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
  145. package/dist-types/packages/peach-kit/src/capabilities.d.ts +8 -0
  146. package/kotlin/README.md +3 -0
  147. package/kotlin/sdk.tar.gz +0 -0
  148. package/package.json +2 -1
  149. package/runtime-companion.json +1 -1
  150. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
  151. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
  152. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
  153. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
  154. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
  155. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
  156. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
  157. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
  158. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
  159. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
  160. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
  161. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
  162. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
  163. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
  164. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
  165. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
  166. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
  167. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
  173. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
  175. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
  176. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
  177. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
  178. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
  179. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
  181. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
  182. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
  183. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
  184. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
  185. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
  186. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
  187. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
  188. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
  189. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
  190. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
  191. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
  192. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
  193. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
  194. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
  195. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
  196. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
  197. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
  198. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
  199. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
  200. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -9
  201. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +992 -98
  202. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
  203. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
  204. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
  205. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
  206. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
  207. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
  208. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
  209. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
  210. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
  211. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
  212. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
  213. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
  214. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
  215. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
  216. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
  217. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
  218. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
  219. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
  220. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
  221. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
  222. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
  223. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
  224. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
  225. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
  226. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
  227. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
  228. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
  229. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
  230. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
  231. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
  232. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
  233. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
  234. package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
  235. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
  236. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
  237. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
  238. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
  239. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
  240. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
  241. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
  242. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
  243. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
  244. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
  245. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
  246. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
  247. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
  248. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
  249. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
  250. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
  251. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
  252. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
  253. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
  254. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
  255. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
  256. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
  257. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
  258. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
  259. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
  260. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
  261. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
  262. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
  263. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
  264. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
  265. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
  266. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
  267. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
  268. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
  269. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
  270. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
  271. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
  272. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
  273. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
  274. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
  275. package/sdk/ios/usr/include/dns_sd.h +3616 -0
  276. package/sdk/ios/usr/include/dnssd.modulemap +4 -0
  277. package/sdk/ios/usr/include/module.modulemap +1 -0
  278. package/sdk/ios/usr/include/os/signpost.h +414 -0
  279. package/sdk/ios/usr/include/os.modulemap +5 -0
  280. package/sdk/ios/usr/include/sys/socketvar.h +191 -0
  281. package/sdk/ios/usr/include/sys/vsock.h +84 -0
  282. package/sdk/ios/wasm/include/errno.h +4 -20
  283. package/sdk/ios/wasm/include/pthread.h +3 -0
  284. package/sdk/ios/wasm/include/setjmp.h +57 -0
  285. package/sdk/ios/wasm/include/sys/resource.h +2 -2
  286. package/sdk/native-hashes.json +3 -3
  287. package/skills/contrast/SKILL.md +6 -5
  288. package/skills/peach-debug/SKILL.md +68 -265
  289. package/skills/peach-debug/references/accessibility.md +37 -73
  290. package/skills/peach-debug/references/commands.md +2 -2
  291. package/skills/peach-debug/references/events.md +74 -0
  292. package/skills/peach-perf/SKILL.md +64 -402
  293. package/skills/peach-perf/references/presentation.md +46 -0
  294. package/skills/peach-perf/references/profiling.md +93 -0
  295. package/skills/peach-perf/references/render-counters.md +57 -0
  296. package/skills/peach-setup/SKILL.md +66 -217
  297. package/skills/peach-setup/references/native-config.md +35 -0
  298. package/skills/peach-setup/references/reporting.md +28 -0
  299. package/skills/peach-test/SKILL.md +68 -285
  300. package/skills/peach-test/references/detox.md +69 -0
  301. package/skills/peach-test/references/maestro.md +95 -0
  302. package/skills/peach-visual/SKILL.md +53 -106
  303. package/src/android-autolinking.ts +1 -0
  304. package/src/android-bridge-packages.ts +279 -0
  305. package/src/appPackageContract.ts +14 -1
  306. package/src/assetCatalogContract.ts +8 -1
  307. package/src/bridge-contract.ts +6 -0
  308. package/src/bundle-channel.mjs +152 -60
  309. package/src/cli-runtime.ts +3 -0
  310. package/src/configured-bundle-producer.ts +10 -0
  311. package/src/device-catalog.ts +68 -4
  312. package/src/expo-discovery-cache.ts +10 -3
  313. package/src/expo-kotlin-host.ts +97 -26
  314. package/src/expo-native-workspace.ts +211 -52
  315. package/src/expo-swift-host.ts +149 -123
  316. package/src/expo-swift-ready.ts +5 -1
  317. package/src/expo-widget-assets.ts +76 -0
  318. package/src/expoKotlinContract.ts +12 -2
  319. package/src/expoSwiftContract.ts +21 -2
  320. package/src/generated/swift-c-predefines.json +1 -1
  321. package/src/home-paths.ts +6 -1
  322. package/src/host/bridge-host.ts +5 -0
  323. package/src/host/fetch-proxy-handler.ts +10 -0
  324. package/src/host/websocket-proxy.ts +7 -2
  325. package/src/kotlin-host.ts +204 -30
  326. package/src/kotlinSdkContract.ts +2 -1
  327. package/src/menu.ts +7 -0
  328. package/src/native-prebuilt.ts +154 -0
  329. package/src/nitro-adapter.lock.json +261 -261
  330. package/src/nitro-adapter.ts +118 -50
  331. package/src/nitro-bundle.ts +134 -96
  332. package/src/nitro-compile.ts +16 -6
  333. package/src/nitro-dependencies.ts +43 -28
  334. package/src/nitro-source.ts +142 -30
  335. package/src/nitro-superset.lock.json +103 -0
  336. package/src/nitro-superset.ts +137 -0
  337. package/src/nitroAdapterContract.ts +146 -98
  338. package/src/nitroContract.ts +68 -21
  339. package/src/react-bridge-importers.ts +1 -0
  340. package/src/react-native-bridge-modules.ts +2 -0
  341. package/src/react-native-host-modules.ts +4 -1
  342. package/src/settingsContract.ts +37 -1
  343. package/src/storageSnapshotContract.ts +29 -81
  344. package/src/swift-compile.ts +315 -117
  345. package/src/swift-compiler-digest.ts +2 -0
  346. package/src/swift-coverage/indexdump.ts +22 -6
  347. package/src/swift-coverage/indexing.ts +4 -4
  348. package/src/swift-coverage/sdk.ts +104 -20
  349. package/src/swift-coverage/types.ts +34 -0
  350. package/src/swift-coverage/xcode-packages.ts +61 -1
  351. package/src/swift-coverage/xcode.ts +19 -13
  352. package/src/swift-cxx-reachable.ts +1 -1
  353. package/src/swift-distribution.lock.json +18 -13
  354. package/src/swift-distribution.ts +57 -26
  355. package/src/swift-host.ts +51 -35
  356. package/src/swift-link-roots.ts +45 -18
  357. package/src/swift-objc-compile.ts +78 -2
  358. package/src/swift-objc-standin.ts +3 -0
  359. package/src/swift-shared-sdk.ts +85 -1
  360. package/src/swift-standin-emit.ts +6 -1
  361. package/src/swift-standins.ts +403 -19
  362. package/src/swift-submit.ts +17 -1
  363. package/src/swift-toolchain.ts +98 -23
  364. package/src/swift-wasm-prune.ts +1629 -0
  365. package/src/turbo-bundle.ts +82 -0
  366. package/src/turbo-compile.ts +120 -0
  367. package/src/turbo-runtime.lock.json +69 -0
  368. package/src/turbo-source.ts +754 -0
  369. package/src/vite-plugin-one.ts +15 -3
  370. package/src/vite-plugin.ts +82 -23
  371. package/src/wasm-optimize.ts +34 -0
  372. package/src/worker-system-chunks.ts +3 -3
  373. package/src/xcode-project.ts +52 -0
  374. package/src/xcode-target-members.ts +12 -1
@@ -1,255 +1,82 @@
1
1
  ---
2
2
  name: peach-test
3
- model: sm
4
- description: Run automated tests against your React Native app under Peach with Maestro YAML or Detox/Jest
3
+ description: Run or author automated React Native app flows in Peach using Maestro YAML, or run an existing Detox/Jest suite with the Peach driver. Use for test execution, live flow recording, and runner configuration; use peach-debug for investigating app failures.
5
4
  ---
6
5
 
7
6
  # Peach tests
8
7
 
9
- Peach has two test runners. Maestro owns every YAML test, whether it was
10
- hand-authored, generated from a goal, or recorded from live CLI actions.
11
- Detox runs existing imperative Jest suites through the Peach driver.
8
+ Use Maestro for YAML flows, whether written by hand, generated from a goal, or
9
+ recorded from CLI actions. Use the Detox driver for existing imperative Jest
10
+ suites. A short one-off command chain does not need a saved test.
12
11
 
13
- > needs a connected, pinned sim. if `peach describe` errors, load
14
- > `/peach-setup` first.
12
+ Start with a connected sim (`peach describe` returns the app); use `peach-setup`
13
+ if needed. Set `PEACH_NO_OPEN=1` before starting an app dev server for test-only
14
+ work so an optional plugin does not open another interactive window.
15
15
 
16
- Set `PEACH_NO_OPEN=1` before starting an app dev server for a Detox,
17
- Maestro, or iOS-only pass. Apps can opt into a named Electron window through
18
- the official Vite or Metro plugin, and test-only work must not open that window.
19
-
20
- ## route in (decision tree)
21
-
22
- - have an existing `.maestro/` directory? → [Maestro](#branch--maestro)
23
- - have existing Detox specs? → [detox drop-in](#branch--detox-drop-in)
24
- - writing tests fresh, want plain-language generation, or want live authoring? → [Maestro](#branch--maestro)
25
- - need one short, timing-sensitive sequence from the shell? → [inline chains](#one-off-inline-chains)
26
-
27
- Do not invent a third runner for how a Maestro flow was authored.
28
-
29
- ## anti-patterns (apply to both runners)
30
-
31
- - **`sleep` is almost always a bug.** the underlying CLI auto-settles
32
- before reads and polls layout hash after writes. if a flow fails
33
- without a `sleep`, the fix is `waitFor`, `waitForAnimationToEnd`, or
34
- `wait idle` — not a blind timer. the one legitimate case: a
35
- user-controlled debounce ("press and hold for 2s").
36
- - **prefer testID (`tapOn: { id: ... }`, `by.id(testID)`) over text.** text breaks
37
- under i18n, copy churn, and duplicate strings. add `testID` during
38
- implementation and author flows against it.
39
- - **pin a sim before running a suite.** parallel CI jobs colliding
40
- on the default bridge port is the #1 flake source. pass `--port` in
41
- CI and `peach use <id>` locally.
42
- - **admit a bounded stack and flow together.** if your environment requires
43
- resource admission, keep stack startup, readiness, sim opening and pinning,
44
- the flow, and cleanup of your owned stack in one admitted process group.
45
- A stack started in an admitted background command can hold the slot that a
46
- later tool call needs for the flow. Nested commands must inherit the real
47
- admission; never set admission flags by hand. Before the flow, confirm
48
- `peach describe --sim <id>` returns a tree: a saved sim id does not prove
49
- the connection survived the wait.
50
- - **every flow ends with an assert, not a screenshot.** a screenshot
51
- passes as long as the flow didn't throw. `assertVisible` (or
52
- `expect(...).toBeVisible()`) actually verifies the happy path.
53
- - **don't run a 40-step "smoke everything" flow.** when it fails, you
54
- can't tell what regressed. split into `login.yaml`, `compose.yaml`,
55
- `settings.yaml`, chain with `runFlow`.
56
- - **inside an `peach do` chain, use `sleep` only for gesture timing.** after the
57
- chain, use `peach wait` for app state so automation advances on a real condition.
58
-
59
- ## you're done when
60
-
61
- - the suite passes locally and in CI
62
- - every flake is either fixed or marked `xfail` with a written reason
63
- and a removal date
64
- - the green run took noticeably less wall-clock than the previous
65
- baseline (a suite that grows slower without growing wider is a smell)
66
-
67
- ## one-off inline chains
68
-
69
- repeat `--then` before each additional `do` action to run one ordered engine
70
- batch. use a chain for a short repro, form fill, or timing-sensitive gesture
71
- that does not belong in a saved test:
72
-
73
- ```sh
74
- peach do tap email --then type user@example.com --then tap submit
75
- peach wait selector dashboard
76
- ```
77
-
78
- the batch stops on the first failure. add `--json` for per-action results.
79
- `tap <id>` is the default way to tap by testID (`--testid <id>` and `tap-id <id>` are aliases); use `tap-text <text>` for visible text.
80
- punctuation in action data remains data. the exact `--then` token is reserved
81
- as the action boundary. use Maestro when the sequence should be reviewed,
82
- reused, or run in CI; an inline chain is not a third test runner and does not
83
- read flow files.
84
-
85
- ## branch — Maestro
86
-
87
- Write declarative Maestro YAML. The same command runs existing suites,
88
- generates tests, records live drafts, profiles, and uploads replayable results.
89
-
90
- ```sh
91
- peach maestro test .maestro/login.yaml # run one flow
92
- peach maestro test .maestro/login.yaml --record # record video
93
- peach maestro test .maestro/login.yaml --profile # include perf stats
94
- peach maestro test .maestro/ # run the suite
95
- ```
96
-
97
- Author from a live interaction:
16
+ ## Run a Maestro flow
98
17
 
99
18
  ```sh
100
- peach maestro start # begin a draft
101
- peach do tap loginButton # drive the app via the CLI
102
- peach maestro keep # save the step
103
- peach do type "user@example.com"
104
- peach maestro keep
105
- peach do tap submit
106
- peach maestro keep
107
- peach maestro end --output .maestro/login.yaml --validate
19
+ peach maestro test .maestro/login.yaml
20
+ peach maestro test .maestro/login.yaml --record --profile
21
+ peach maestro test .maestro/
108
22
  ```
109
23
 
110
- the recorder emits minimal YAML — no coordinate dumps, no `sleep` noise —
111
- because the underlying CLI already settled between every action.
24
+ `--url <port-or-url>` selects the app target. In parallel CI jobs, isolate the
25
+ bridge with `--port <number>`; the bridge port is separate from the app's dev
26
+ server port. Pin locally with `peach use <id>` and confirm the tree before a
27
+ longer flow.
112
28
 
113
- exemplar flow:
29
+ A small flow ends with an assertion:
114
30
 
115
31
  ```yaml
116
- # .maestro/login.yaml
117
32
  - launchApp: {}
118
-
119
- - waitFor:
120
- text: 'Sign in'
121
- timeout: 10000
122
-
123
33
  - tapOn:
124
34
  id: emailInput
125
35
  - inputText: '${USERNAME}'
126
-
127
- - tapOn:
128
- id: passwordInput
129
- - inputText: '${PASSWORD}'
130
-
131
36
  - tapOn:
132
37
  id: signInButton
133
- - waitForAnimationToEnd: true
134
-
135
- - assertVisible: 'Welcome back'
38
+ - waitFor:
39
+ id: dashboard
40
+ timeout: 10000
41
+ - assertVisible:
42
+ id: dashboard
136
43
  ```
137
44
 
138
- run with env interpolation:
139
-
140
45
  ```sh
141
- peach maestro --env USERNAME=alice --env PASSWORD=hunter2 \
142
- test .maestro/login.yaml \
143
- --record --profile
144
- ```
145
-
146
- automatic settling inside flows: every tap, type, scroll, swipe, and
147
- drag is backed by the same primitives that auto-wait for transitions on
148
- the way in and layout stability on the way out. you rarely need
149
- explicit waits; when you do, `waitForAnimationToEnd: true` maps to the
150
- CLI's `wait idle` with a generous budget. use it before any
151
- `assertVisible` that depends on a transition longer than ~800 ms.
152
-
153
- Generate and immediately run a Maestro flow from a plain-language goal:
154
-
155
- ```sh
156
- peach maestro generate "log in with the demo account and verify the dashboard"
46
+ peach maestro --env USERNAME=alice test .maestro/login.yaml
157
47
  ```
158
48
 
159
- Generation writes the same deterministic Maestro artifact, uploads its replay,
160
- and registers it as a Maestro run. The dashboard does not distinguish how it
161
- was authored.
162
-
163
- ### existing Maestro suites
164
-
165
- if you already have a `.maestro/` directory, the migration is one
166
- command change:
49
+ Prefer testIDs. On iOS, text selectors match the whole accessibility label,
50
+ value, or placeholder, including joined text groups. Inspect `peach get a11y`
51
+ when a visible string fails to match. Use an observed full name or an explicit
52
+ regular expression, rather than assuming rendered child text is separately
53
+ accessible.
167
54
 
168
- ```sh
169
- # before
170
- maestro test .maestro/login.yaml
55
+ Read [Maestro](references/maestro.md) for discovery, live authoring, generation,
56
+ artifacts, compatibility, and failure diagnosis. Check
57
+ `peach maestro --list-compat` before depending on an unfamiliar verb.
171
58
 
172
- # after
173
- peach maestro test .maestro/login.yaml
174
- ```
175
-
176
- no test rewrites, no detox config, no simulator. the runtime auto-launches
177
- a Peach shell if one isn't running.
59
+ ## Record a flow from CLI actions
178
60
 
179
61
  ```sh
180
- peach maestro # auto-discover .maestro/ or maestro/
181
- peach maestro test .maestro/login.yaml
182
- peach maestro test .maestro/ # workspace globs, root flows by default
183
- peach maestro init # scaffold a starter flow
184
- peach maestro --list-compat # supported / partial / unsupported
185
- peach maestro --env USERNAME=alice test .maestro/login.yaml
62
+ peach maestro start
63
+ peach do tap emailInput
64
+ peach maestro keep
65
+ peach do type "user@example.com"
66
+ peach maestro keep
67
+ peach do tap signInButton
68
+ peach maestro keep
69
+ peach maestro end --output .maestro/login.yaml --validate
186
70
  ```
187
71
 
188
- Directory discovery selects root YAML flows by default, as Maestro does.
189
- For nested suites, pass their folder, such as `.maestro/flows`, or add
190
- `config.yaml` with `flows: ["flows/**"]`. Keep shared subflows outside those
191
- globs; `runFlow` can still load them.
192
- Preview and hosted-run result receipts go to `--test-output-dir`, or to
193
- `--out` (default `/tmp/peach-recordings`); the CLI prints their directory.
194
-
195
- ### supported verbs
196
-
197
- `launchApp` (including JSON `arguments`), `stopApp`, `clearState`, `clearKeychain`, `tapOn`, `tapAtCoords`, `longPressOn`, `inputText`,
198
- `pressKey`, `dispatchKey`, `hideKeyboard`, `eraseText`, `assertVisible`,
199
- `assertNotVisible`, `assertTreeContains`, `waitFor`, `extendedWaitUntil`,
200
- `waitForAnimationToEnd`, `scroll`, `scrollUntilVisible`, `scrollTo`,
201
- `swipe`, `pinch`, `takeScreenshot`, `dumpTree`, `back`, `repeat.times`,
202
- `runFlow`, `when` (`visible` / `notVisible` / `platform` / `true`),
203
- `optional: true`, `onFlowStart` / `onFlowComplete`, `copyTextFrom` +
204
- `${maestroCopiedText}`, `evalScript`, `openLink`, `addMedia`, env var `${NAME}`
205
- interpolation.
206
-
207
- ### partial
72
+ Review the saved flow and add the assertion that proves its outcome.
73
+ `peach maestro generate "sign in and verify the dashboard"` also authors a
74
+ Maestro flow; review its selectors and expected result before relying on it.
208
75
 
209
- - `when.platform` — Peach emulates iOS; android branches are skipped.
210
- - `openLink`: app routing works; there is no OS-level browser fallback.
76
+ ## Existing Detox suites
211
77
 
212
- `stopApp` keeps the guest runtime stopped. The next `launchApp` starts a fresh
213
- guest with its replacement arguments. Every `openLink` replaces the guest and
214
- delivers the URL through React Native Linking after the replacement starts.
215
-
216
- ### not yet implemented
217
-
218
- these throw `unsupported maestro verb: X`:
219
-
220
- - `travel`, `setLocation`, `setAirplaneMode`, `killApp`
221
- - `repeat.while` (use `repeat.times`)
222
-
223
- ### troubleshooting
224
-
225
- - **"no maestro flows found"** — pass an explicit path
226
- (`peach maestro test path/to/flow.yaml`) or run `peach maestro
227
- init` to scaffold one.
228
- - **"missing environment variable for flow placeholder: FOO"** — pass
229
- `--env FOO=bar` or export it. pick one mechanism per repo and document
230
- it in the flow directory's README.
231
- - **flow can't find an element** — inspect `peach get a11y` on the target
232
- sim. On iOS, Maestro text selectors match the whole accessibility label,
233
- value or input placeholder, including joined text groups. Rendered text
234
- inside an accessible group is not a separate selector target. Use the
235
- observed full name or an explicit regular expression such as `.*part.*`;
236
- identifier selectors use testID. Android text selectors use the render
237
- tree, so qualify an existing suite against the same native platform.
238
- - **flow runs but nothing renders** — confirm the bundler your flow
239
- targets is reachable and pass `--url <port>` or add `app: <port>`
240
- frontmatter at the top of the YAML.
241
-
242
- ## branch — detox drop-in
243
-
244
- an existing detox suite runs against Peach with **one line** of jest
245
- config and zero test changes.
246
-
247
- `import { by, device, element, expect, waitFor } from 'detox'` is
248
- rewritten by jest to a peach-backed driver that drives the real shell
249
- over playwright. matchers, assertions, and the `waitFor` API match the
250
- upstream detox surface.
251
-
252
- ### one-line install
78
+ Use this Jest preset so imports from `detox` resolve to the Peach driver and
79
+ its cleanup hook closes the browser after each test file:
253
80
 
254
81
  ```js
255
82
  // peach-detox.config.cjs
@@ -260,78 +87,34 @@ module.exports = {
260
87
  }
261
88
  ```
262
89
 
263
- or, if you already have a jest config, pull in just the module mapper:
264
-
265
- ```js
266
- moduleNameMapper: {
267
- '^detox$': require.resolve('peachsim/detox'),
268
- }
269
- ```
270
-
271
- keep the **preset**, not just the mapper. its `setupFilesAfterEnv` hook closes
272
- the driver's browser after each test file. mapper-only configs need their own
273
- `afterAll` calling the driver's `cleanup()`.
274
-
275
- ### commands
276
-
277
90
  ```sh
278
- peach detox # run e2e/, test/e2e/, or detox/
279
- peach detox --config my.cjs # use a specific jest config
280
- peach detox --watch # jest watch mode
281
- peach detox -t "login" # --testNamePattern
282
- peach detox --headed # keep the shell window visible
283
- peach detox --no-launch # skip the running-shell check
284
- peach detox --port 5173 # explicit shell HTTP port for CI
285
- peach detox init # scaffold config + e2e/example.test.ts
91
+ peach detox --config peach-detox.config.cjs --app 8081
92
+ peach detox -t "login"
286
93
  ```
287
94
 
288
- ### compat surface
95
+ Read [Detox](references/detox.md) for mapper-only integration, command options,
96
+ compatibility, and troubleshooting. Existing suites can require unsupported
97
+ native APIs; do not assume full upstream compatibility.
289
98
 
290
- | detox API | Peach |
291
- | ---------------------------------- | ------- |
292
- | `element(by.id(...))` | supported |
293
- | `element(by.text(...))` | supported — but prefer `by.id` |
294
- | `element(by.label(...))` | supported |
295
- | `element(by.traits([...]))` | supported for the iOS trait set |
296
- | `.toBeVisible()` / `.not.toBeVisible()` | supported |
297
- | `.toHaveText(...)` / `.toHaveLabel(...)` | supported |
298
- | `.tap()` / `.longPress()` | supported |
299
- | `.typeText(...)` / `.replaceText(...)` | supported |
300
- | `.scroll(...)` / `.scrollTo(...)` | supported |
301
- | `.swipe(...)` | supported |
302
- | `.setColumnToValue(...)` | supported for uniquely named picker rows |
303
- | `waitFor(...).toBeVisible().withTimeout(...)` | supported |
304
- | `device.launchApp(...)` / `device.reloadReactNative()` | supported |
305
- | `device.shake()` | no-op |
306
- | `device.sendUserNotification(...)` | not yet |
99
+ ## Reliable flows
307
100
 
308
- ### troubleshooting
101
+ - Use state waits and assertions. CLI actions already settle layout; avoid
102
+ blind sleeps. Use `waitFor` or `waitForAnimationToEnd` for a transition that
103
+ outlasts automatic settling.
104
+ - Keep flows focused, with `runFlow` for reusable subflows. A screenshot records
105
+ appearance; it does not assert success.
106
+ - Investigate flakes on the same sim with `peach-debug`. Do not hide them with
107
+ retries, skips, or arbitrary timeout increases.
108
+ - End with a meaningful assertion and inspect `peach get errors 5` and
109
+ `peach get requests 5` when diagnosing a failure.
309
110
 
310
- - **"no Peach shell reachable"** — start one yourself
311
- (`peach open <port>`) or pass `--port <n>`.
312
- - **"jest cannot find module 'detox'"** — the preset isn't wired. confirm
313
- `preset: 'peachsim/detox'` is in the jest config jest
314
- actually loaded (`--config` overrides package.json).
315
- - **matchers fail on elements that exist** — canvas has no DOM. use
316
- `by.id` (testID); `peach describe` shows what the shell sees.
317
- - **passes locally, flakes in CI** — the shell boots asynchronously.
318
- bump jest `testTimeout` to 10–15 s and add a `waitFor(element(...))
319
- .toBeVisible().withTimeout(10000)` before the first assertion.
320
- - **port conflicts under parallel CI** — pass `--port` explicitly per
321
- job so workers don't collide on the default bridge port.
111
+ For a short ordered batch, repeat `--then`:
322
112
 
323
- ## recovery — common failure modes (both runners)
113
+ ```sh
114
+ peach do tap emailInput --then type user@example.com --then tap signInButton
115
+ peach wait selector dashboard
116
+ ```
324
117
 
325
- - **"no flows found"** — confirm the working directory or pass an explicit
326
- `.maestro/` path.
327
- - **"missing env variable"** — set with `--env` (or jest env config) and
328
- document the variable list in the flow directory's README so new
329
- contributors aren't guessing.
330
- - **CI flakes but local passes** — bump test timeouts to 10–15 s before
331
- the first assertion, pin the bridge port, and run with `--video` so
332
- failing Maestro runs land a recording next to the output.
333
- - **a flake reproduces but resists fixing** — don't paper over with
334
- `sleep`. open `/peach-debug` against the same sim, capture
335
- the timeline (`peach timeline start` → reproduce → `peach
336
- what-happened`), and look for the missing animation-completion or
337
- the unresolved fetch that's racing the assertion.
118
+ The batch stops on first failure; `--json` prints per-action results. Use sleeps
119
+ inside a chain only for deliberate gesture timing, then wait for app state.
120
+ Stop owned test processes and close only the sims you created when done.
@@ -0,0 +1,69 @@
1
+ # Detox integration
2
+
3
+ The `peachsim/detox` Jest preset maps imports from `detox` to the Peach driver.
4
+ It also installs the environment, transform, and post-file cleanup hook. Prefer
5
+ that preset to a mapper-only configuration.
6
+
7
+ ```js
8
+ // peach-detox.config.cjs
9
+ module.exports = {
10
+ preset: 'peachsim/detox',
11
+ rootDir: __dirname,
12
+ testMatch: ['<rootDir>/e2e/**/*.test.ts'],
13
+ }
14
+ ```
15
+
16
+ For an existing Jest setup that deliberately owns those pieces, the mapper is:
17
+
18
+ ```js
19
+ moduleNameMapper: {
20
+ '^detox$': require.resolve('peachsim/detox'),
21
+ }
22
+ ```
23
+
24
+ Mapper-only configurations must call the driver's `cleanup()` from `afterAll`
25
+ to close its browser. Preserve any environment and transform configuration
26
+ needed by the suite.
27
+
28
+ ```sh
29
+ peach detox init
30
+ peach detox --config peach-detox.config.cjs --app 8081
31
+ peach detox --watch
32
+ peach detox -t "login"
33
+ peach detox --headed
34
+ peach detox --no-launch
35
+ peach detox --port 7669 --app 8081
36
+ ```
37
+
38
+ `--app` selects the app dev-server port or URL; `--port` selects the bridge.
39
+ `--no-launch` skips the running-shell check when you manage it yourself.
40
+ Default discovery looks for `e2e/`, `test/e2e/`, or `detox/`.
41
+
42
+ ## Driver surface
43
+
44
+ | API | Support |
45
+ | --- | --- |
46
+ | `by.id`, `by.text`, `by.label` | Supported; prefer stable testIDs |
47
+ | `by.traits` | iOS trait set |
48
+ | Visibility, text, and label expectations | Supported |
49
+ | Tap, long press, type/replace text | Supported |
50
+ | Scroll, scrollTo, swipe | Supported |
51
+ | `setColumnToValue` | Uniquely named picker rows |
52
+ | `waitFor(...).toBeVisible().withTimeout(...)` | Supported |
53
+ | `device.launchApp`, `device.reloadReactNative` | Supported |
54
+ | `device.shake` | No-op |
55
+ | `device.sendUserNotification` | Push notifications delivered to the app delegate; other trigger types unsupported |
56
+
57
+ This is a supported subset, not a promise that every upstream suite runs
58
+ unchanged. Check unsupported native operations before migrating a suite.
59
+
60
+ ## Troubleshooting
61
+
62
+ - No shell reachable: open the app with `peach open <app-port>` and verify the
63
+ bridge target. In CI, assign each concurrent job a separate bridge port.
64
+ - Cannot resolve `detox`: confirm the Jest config actually loaded the preset;
65
+ `--config` overrides the package's default configuration.
66
+ - Element appears but matcher fails: inspect `peach describe` and prefer
67
+ `by.id(testID)`. Canvas pixels are not DOM elements.
68
+ - Startup races: wait for the first required element. Inspect readiness and
69
+ completion events with `peach-debug` rather than raising timeouts arbitrarily.
@@ -0,0 +1,95 @@
1
+ # Maestro workflows
2
+
3
+ ## Discovery and outputs
4
+
5
+ ```sh
6
+ peach maestro
7
+ peach maestro init
8
+ peach maestro test .maestro/login.yaml
9
+ peach maestro test .maestro/
10
+ peach maestro --env USERNAME=alice test .maestro/login.yaml
11
+ peach maestro test .maestro/login.yaml --record --profile
12
+ peach maestro --list-compat
13
+ ```
14
+
15
+ Automatic discovery looks in `.maestro/` or `maestro/`. Directory runs select
16
+ root YAML flows by default. Pass `.maestro/flows` for a nested suite, or use a
17
+ workspace configuration:
18
+
19
+ ```yaml
20
+ # .maestro/config.yaml
21
+ flows:
22
+ - 'flows/**'
23
+ ```
24
+
25
+ Keep shared subflows outside discovery globs; `runFlow` can still load them.
26
+ Workspace configuration supports inclusion globs, negation, and tags. Use
27
+ `--include-tags` or `--exclude-tags` for CLI tag selection.
28
+
29
+ Use `--url <port-or-url>` to load the app, or `app: <port>` flow frontmatter.
30
+ `--record` records a WebM; `--profile` collects performance stats. `--out <dir>`
31
+ sets recording/screenshot output (default `/tmp/peach-recordings`).
32
+ `--test-output-dir <dir>` sets flow artifact/result output. For JUnit, use
33
+ `--format junit --output report.xml`. `--continuous` runs once with a warning;
34
+ file watching is not implemented. `--format html` does not produce a report.
35
+
36
+ `--preview` records events and video, uploads them, and prints a replay link;
37
+ use it when sharing is intended. `--preview-open` opens that uploaded link.
38
+
39
+ ## Authoring
40
+
41
+ ```sh
42
+ peach maestro start
43
+ peach do tap emailInput
44
+ peach maestro keep
45
+ peach do type "user@example.com"
46
+ peach maestro keep
47
+ peach do tap signInButton
48
+ peach maestro keep
49
+ peach maestro end --output .maestro/login.yaml --validate
50
+ peach maestro validate .maestro/login.yaml
51
+ ```
52
+
53
+ `keep` saves the preceding interaction into the draft. Review the YAML and add
54
+ an outcome assertion. Generation also writes a Maestro flow:
55
+
56
+ ```sh
57
+ peach maestro generate "sign in with the demo account and verify the dashboard"
58
+ ```
59
+
60
+ Generation executes the generated flow and uploads a replay. Use it when the
61
+ app state and sharing intent permit that. Inspect the resulting artifact before
62
+ adopting it into a suite.
63
+
64
+ ## Compatibility
65
+
66
+ Use `peach maestro --list-compat` as the current verb and selector catalog,
67
+ rather than assuming every upstream Maestro command works.
68
+
69
+ Supported areas include lifecycle, tapping, typing, keyboard actions, clipboard,
70
+ visibility/tree assertions, conditional waits, scrolling, swiping, pinching,
71
+ screenshots, fixed-count repetition, subflows, hooks, JavaScript expressions,
72
+ `runScript`, `evalScript`, and environment interpolation.
73
+
74
+ `launchApp.arguments` supplies a JSON object before guest app entry.
75
+ `stopApp` keeps the guest stopped until `launchApp` or `openLink` starts it.
76
+ `openLink` replaces the guest and delivers the URL through React Native Linking.
77
+ It has no OS-level Safari fallback. The runner reports iOS for `when.platform`;
78
+ Android branches are skipped, and other `--platform` values are refused.
79
+
80
+ Unsupported steps include `travel`, `setLocation`, `setAirplaneMode`, `killApp`,
81
+ `faker`, `inputRandom*`, `startRecording`, `stopRecording`, and `repeat.while`.
82
+ Use `--record` for video and `repeat.times` for bounded repetition. CSS selectors
83
+ are unsupported. Missing environment names fail the step rather than typing
84
+ `undefined`; supply them with repeatable `--env KEY=VALUE` or exported variables.
85
+
86
+ ## Failures
87
+
88
+ - No flows: check working directory and discovery globs, or pass an explicit file.
89
+ - Missing variable: provide the named variable and document required inputs.
90
+ - Element missing: inspect `peach get a11y`. iOS text matching uses whole
91
+ accessible names, values, and placeholders, including joined text groups.
92
+ Use testID selectors or an intentional regular expression such as `.*part.*`.
93
+ - Blank app: verify the bundler is reachable and the flow's target is correct.
94
+ - Timing failure: wait for the required state and inspect the timeline with
95
+ `peach-debug`; do not replace the race with a delay or retry.