peachsim 0.1.1738 → 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 (327) 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 +67 -16
  6. package/cli/commands/device.ts +3 -1
  7. package/cli/commands/doctor.ts +1 -4
  8. package/cli/commands/inspect/settling.ts +6 -1
  9. package/cli/commands/inspect/wait-ready.ts +22 -2
  10. package/cli/commands/package.ts +22 -20
  11. package/cli/commands/push.ts +56 -0
  12. package/cli/commands/serve.ts +9 -0
  13. package/cli/commands/shell-url.ts +37 -9
  14. package/cli/commands/swift.ts +1 -1
  15. package/cli/current-sim.ts +27 -0
  16. package/cli/drivers/linux-browser-libs.lock.json +323 -1
  17. package/cli/drivers/linux-browser-libs.ts +8 -6
  18. package/cli/drivers/playwright.ts +5 -1
  19. package/cli/internal-child.ts +11 -1
  20. package/cli/main.ts +6 -0
  21. package/cli/native-input.ts +1 -7
  22. package/cli/outbound-endpoints.ts +9 -1
  23. package/cli/packaged-app-launcher.ts +3 -1
  24. package/cli/scene-video.ts +4 -0
  25. package/cli/ws-bridge.ts +3 -1
  26. package/detox/index.ts +9 -4
  27. package/dist-lib/agent-daemon-client.cjs +1 -1
  28. package/dist-lib/agent-events.cjs +1 -1
  29. package/dist-lib/attached-projects.cjs +1 -1
  30. package/dist-lib/auth/shared-session.cjs +1 -1
  31. package/dist-lib/backend-origin.cjs +1 -1
  32. package/dist-lib/beta.cjs +1 -1
  33. package/dist-lib/beta.mjs +1 -1
  34. package/dist-lib/bridge-constants.cjs +1 -1
  35. package/dist-lib/bridge-contract-input.cjs +1 -1
  36. package/dist-lib/bridge-contract-input.mjs +1 -1
  37. package/dist-lib/bridge-contract.cjs +1 -1
  38. package/dist-lib/bridge-contract.mjs +1 -1
  39. package/dist-lib/bundle-channel.cjs +7372 -3675
  40. package/dist-lib/capture-contract.cjs +1 -1
  41. package/dist-lib/capture-contract.mjs +1 -1
  42. package/dist-lib/cloud-contract.cjs +1 -1
  43. package/dist-lib/cloud-contract.mjs +1 -1
  44. package/dist-lib/cloud-test-args.cjs +1 -1
  45. package/dist-lib/cloud-test-args.mjs +1 -1
  46. package/dist-lib/cloud.cjs +1 -1
  47. package/dist-lib/cloud.mjs +1 -1
  48. package/dist-lib/config.cjs +1 -1
  49. package/dist-lib/config.mjs +1 -1
  50. package/dist-lib/detox/index.cjs +22 -8
  51. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  52. package/dist-lib/expo-swift-bundle.cjs +6340 -3064
  53. package/dist-lib/expo-swift-metadata.cjs +14 -2
  54. package/dist-lib/expo-swift-metadata.mjs +14 -2
  55. package/dist-lib/home-paths.cjs +1 -1
  56. package/dist-lib/host/bridge-host.cjs +6524 -2720
  57. package/dist-lib/host/fetch-proxy-handler.cjs +8 -7
  58. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  59. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  60. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  61. package/dist-lib/host/websocket-proxy.cjs +6 -3
  62. package/dist-lib/index.cjs +97 -31
  63. package/dist-lib/jump-to-source-babel.cjs +1 -1
  64. package/dist-lib/jump-to-source-native.cjs +1 -1
  65. package/dist-lib/kotlin-host.cjs +1 -1
  66. package/dist-lib/menu.cjs +1 -1
  67. package/dist-lib/menu.mjs +1 -1
  68. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  69. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  70. package/dist-lib/metro-production-bundle.cjs +1 -1
  71. package/dist-lib/metro-production-bundle.mjs +1 -1
  72. package/dist-lib/metro.cjs +71 -29
  73. package/dist-lib/native-app-identity-project.cjs +53 -22
  74. package/dist-lib/native-app-identity-project.mjs +53 -22
  75. package/dist-lib/native-app-identity.cjs +10 -3
  76. package/dist-lib/native-app-identity.mjs +10 -3
  77. package/dist-lib/native-firebase-metadata.cjs +1 -1
  78. package/dist-lib/native-firebase-metadata.mjs +1 -1
  79. package/dist-lib/plist.cjs +1 -1
  80. package/dist-lib/plist.mjs +1 -1
  81. package/dist-lib/profiles.cjs +1 -1
  82. package/dist-lib/public-brand.cjs +1 -1
  83. package/dist-lib/public-origins-lib-esm.json +25 -23
  84. package/dist-lib/public-origins-lib.json +111 -79
  85. package/dist-lib/react-native-host-modules.cjs +1 -1
  86. package/dist-lib/react-native-host-modules.mjs +1 -1
  87. package/dist-lib/reap-browser.cjs +1 -1
  88. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  89. package/dist-lib/sdk.cjs +4 -1
  90. package/dist-lib/sdk.mjs +4 -1
  91. package/dist-lib/skills.cjs +40549 -37613
  92. package/dist-lib/swift-compile.cjs +2054 -388
  93. package/dist-lib/swift-compile.mjs +1976 -312
  94. package/dist-lib/swift-package.cjs +1 -1
  95. package/dist-lib/swift-package.mjs +1 -1
  96. package/dist-lib/swift-submit.cjs +2 -2
  97. package/dist-lib/swift-submit.mjs +2 -2
  98. package/dist-lib/swift-toolchain.cjs +68 -8
  99. package/dist-lib/swift.cjs +1 -1
  100. package/dist-lib/vite-swift.cjs +5867 -2646
  101. package/dist-lib/vite.cjs +18 -8
  102. package/dist-lib/worklet-executable.cjs +1 -1
  103. package/dist-lib/worklet-executable.mjs +1 -1
  104. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
  105. package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
  106. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
  107. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +0 -3
  108. package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -0
  109. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
  110. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
  111. package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
  112. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
  113. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +1 -0
  114. package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
  115. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
  116. package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
  117. package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
  118. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
  119. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
  120. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
  121. package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
  122. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
  123. package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
  124. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +8 -0
  125. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
  126. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
  127. package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
  128. package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
  129. package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
  130. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +1 -0
  131. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
  132. package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
  133. package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
  134. package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
  135. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
  136. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
  137. package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
  138. package/dist-types/packages/peach-kit/src/capabilities.d.ts +7 -0
  139. package/package.json +2 -1
  140. package/runtime-companion.json +1 -1
  141. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
  142. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
  143. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
  144. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
  145. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
  146. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
  147. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
  148. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
  149. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
  150. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
  151. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
  152. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
  153. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
  154. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
  155. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
  156. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
  157. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
  158. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
  159. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
  160. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
  161. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
  162. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
  163. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
  164. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
  165. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
  166. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
  167. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
  173. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
  175. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
  176. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
  177. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
  178. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
  179. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
  181. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
  182. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
  183. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +0 -6
  184. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +356 -61
  185. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
  186. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
  187. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
  188. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
  189. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
  190. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
  191. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
  192. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
  193. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
  194. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
  195. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
  196. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
  197. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
  198. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
  199. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
  200. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
  201. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
  202. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
  203. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
  204. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
  205. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
  206. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
  207. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
  208. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
  209. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
  210. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
  211. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
  212. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
  213. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
  214. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
  215. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
  216. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
  217. package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
  218. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
  219. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
  220. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
  221. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
  222. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
  223. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
  224. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
  225. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
  226. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
  227. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
  228. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
  229. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
  230. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
  231. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
  232. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
  233. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
  234. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
  235. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
  236. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
  237. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
  238. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
  239. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
  240. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
  241. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
  242. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
  243. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
  244. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
  245. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
  246. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
  247. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
  248. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
  249. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
  250. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
  251. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
  252. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
  253. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
  254. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
  255. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
  256. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
  257. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
  258. package/sdk/ios/usr/include/dns_sd.h +3616 -0
  259. package/sdk/ios/usr/include/dnssd.modulemap +4 -0
  260. package/sdk/ios/usr/include/module.modulemap +1 -0
  261. package/sdk/ios/usr/include/sys/socketvar.h +191 -0
  262. package/sdk/ios/usr/include/sys/vsock.h +84 -0
  263. package/sdk/native-hashes.json +1 -1
  264. package/skills/contrast/SKILL.md +6 -5
  265. package/skills/peach-debug/SKILL.md +68 -264
  266. package/skills/peach-debug/references/accessibility.md +37 -73
  267. package/skills/peach-debug/references/commands.md +2 -2
  268. package/skills/peach-debug/references/events.md +74 -0
  269. package/skills/peach-perf/SKILL.md +64 -401
  270. package/skills/peach-perf/references/presentation.md +46 -0
  271. package/skills/peach-perf/references/profiling.md +93 -0
  272. package/skills/peach-perf/references/render-counters.md +57 -0
  273. package/skills/peach-setup/SKILL.md +66 -216
  274. package/skills/peach-setup/references/native-config.md +35 -0
  275. package/skills/peach-setup/references/reporting.md +28 -0
  276. package/skills/peach-test/SKILL.md +68 -284
  277. package/skills/peach-test/references/detox.md +69 -0
  278. package/skills/peach-test/references/maestro.md +95 -0
  279. package/skills/peach-visual/SKILL.md +53 -105
  280. package/src/appPackageContract.ts +12 -1
  281. package/src/assetCatalogContract.ts +8 -1
  282. package/src/bridge-contract.ts +6 -0
  283. package/src/bundle-channel.mjs +133 -59
  284. package/src/cli-runtime.ts +8 -9
  285. package/src/configured-bundle-producer.ts +10 -0
  286. package/src/device-catalog.ts +68 -4
  287. package/src/expo-discovery-cache.ts +3 -0
  288. package/src/expo-native-workspace.ts +81 -17
  289. package/src/expo-swift-host.ts +57 -104
  290. package/src/expo-widget-assets.ts +76 -0
  291. package/src/expoSwiftContract.ts +13 -1
  292. package/src/host/websocket-proxy.ts +7 -2
  293. package/src/native-prebuilt.ts +3 -3
  294. package/src/nitro-adapter.lock.json +263 -263
  295. package/src/nitro-adapter.ts +69 -7
  296. package/src/nitro-bundle.ts +52 -24
  297. package/src/nitro-compile.ts +6 -1
  298. package/src/nitro-source.ts +82 -4
  299. package/src/nitro-superset.lock.json +103 -0
  300. package/src/nitro-superset.ts +137 -0
  301. package/src/nitroContract.ts +5 -1
  302. package/src/react-bridge-importers.ts +1 -0
  303. package/src/settingsContract.ts +26 -1
  304. package/src/swift-compile.ts +267 -68
  305. package/src/swift-compiler-digest.ts +2 -0
  306. package/src/swift-coverage/xcode-packages.ts +61 -1
  307. package/src/swift-coverage/xcode.ts +10 -12
  308. package/src/swift-cxx-reachable.ts +1 -1
  309. package/src/swift-distribution.lock.json +15 -13
  310. package/src/swift-distribution.ts +57 -26
  311. package/src/swift-host.ts +48 -35
  312. package/src/swift-link-roots.ts +45 -18
  313. package/src/swift-objc-compile.ts +78 -2
  314. package/src/swift-objc-standin.ts +3 -0
  315. package/src/swift-shared-sdk.ts +85 -1
  316. package/src/swift-standins.ts +233 -11
  317. package/src/swift-submit.ts +13 -1
  318. package/src/swift-toolchain.ts +82 -7
  319. package/src/swift-wasm-prune.ts +1629 -0
  320. package/src/turbo-bundle.ts +11 -10
  321. package/src/turbo-runtime.lock.json +16 -16
  322. package/src/vite-plugin-one.ts +12 -1
  323. package/src/vite-plugin.ts +82 -23
  324. package/src/wasm-optimize.ts +34 -0
  325. package/src/worker-system-chunks.ts +3 -3
  326. package/src/xcode-project.ts +52 -0
  327. package/src/xcode-target-members.ts +12 -1
@@ -0,0 +1,889 @@
1
+ //
2
+ // quic_options.h
3
+ // Network
4
+ //
5
+ // Copyright (c) 2020-2021 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef __NW_QUIC_OPTIONS_H__
9
+ #define __NW_QUIC_OPTIONS_H__
10
+
11
+ #ifndef __NW_INDIRECT__
12
+ #warning "Please include <Network/Network.h> instead of this file directly."
13
+ #endif // __NW_INDIRECT__
14
+
15
+ #include <Network/protocol_options.h>
16
+
17
+ #include <Security/Security.h>
18
+
19
+
20
+ __BEGIN_DECLS
21
+
22
+ NW_ASSUME_NONNULL_BEGIN
23
+
24
+ #pragma mark - QUIC
25
+
26
+ /*!
27
+ * @function nw_protocol_copy_quic_definition
28
+ *
29
+ * @abstract
30
+ * Access the definition of the default system protocol implementation
31
+ * of QUIC. This protocol can be used as part of a
32
+ * connection's protocol stack as a transport protocol.
33
+ *
34
+ * @result
35
+ * Returns a retained protocol definition object.
36
+ */
37
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
38
+ NW_RETURNS_RETAINED nw_protocol_definition_t
39
+ nw_protocol_copy_quic_definition(void);
40
+
41
+ /*!
42
+ * @function nw_quic_create_options
43
+ *
44
+ * @abstract
45
+ * Create an instance of QUIC protocol options. This object can be added
46
+ * to an nw_protocol_stack_t to be used in an nw_connection_t or
47
+ * an nw_listener_t.
48
+ *
49
+ * @result
50
+ * Returns a retained protocol options object.
51
+ */
52
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
53
+ NW_RETURNS_RETAINED nw_protocol_options_t
54
+ nw_quic_create_options(void);
55
+
56
+ /*!
57
+ * @function nw_protocol_options_is_quic
58
+ *
59
+ * @abstract
60
+ * Checks whether the given protocol options define a QUIC protocol.
61
+ *
62
+ * @result
63
+ * Returns true if the protocol options are for QUIC, false otherwise.
64
+ */
65
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
66
+ bool
67
+ nw_protocol_options_is_quic(nw_protocol_options_t options);
68
+
69
+ /*!
70
+ * @function nw_quic_add_tls_application_protocol
71
+ *
72
+ * @abstract
73
+ * Adds an Application-Layer Protocol Negotiation (ALPN) value to present in the TLS handshake.
74
+ *
75
+ * @param options
76
+ * An nw_protocol_options_t for QUIC.
77
+ */
78
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
79
+ void
80
+ nw_quic_add_tls_application_protocol(nw_protocol_options_t options, const char *application_protocol);
81
+
82
+ /*!
83
+ * @function nw_quic_copy_sec_protocol_options
84
+ *
85
+ * @abstract
86
+ * Access the sec_protocol_options_t for a given QUIC
87
+ * options instance. See <Security/SecProtocolOptions.h> for functions
88
+ * to further configure security options.
89
+ *
90
+ * @param options
91
+ * An nw_protocol_options_t for QUIC.
92
+ *
93
+ * @result
94
+ * Returns a retained sec_protocol_options_t object.
95
+ */
96
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
97
+ NW_RETURNS_RETAINED sec_protocol_options_t
98
+ nw_quic_copy_sec_protocol_options(nw_protocol_options_t options);
99
+
100
+ #pragma mark - QUIC Options
101
+
102
+ /*!
103
+ * @function nw_quic_get_stream_is_unidirectional
104
+ *
105
+ * @abstract
106
+ * Returns whether or not a QUIC stream is unidirectional.
107
+ *
108
+ * @param options
109
+ * An nw_protocol_options_t for a QUIC stream.
110
+ *
111
+ * @result
112
+ * True if the stream is unidirectional, false otherwise.
113
+ */
114
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
115
+ bool
116
+ nw_quic_get_stream_is_unidirectional(nw_protocol_options_t options);
117
+
118
+ /*!
119
+ * @function nw_quic_set_stream_is_unidirectional
120
+ *
121
+ * @abstract
122
+ * Set whether or not a QUIC stream should be unidirectional.
123
+ *
124
+ * @param options
125
+ * An nw_protocol_options_t for a QUIC stream.
126
+ *
127
+ * @param is_unidirectional
128
+ * True if the stream is unidirectional, false otherwise.
129
+ */
130
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
131
+ void
132
+ nw_quic_set_stream_is_unidirectional(nw_protocol_options_t options,
133
+ bool is_unidirectional);
134
+
135
+ /*!
136
+ * @function nw_quic_get_stream_is_datagram
137
+ *
138
+ * @abstract
139
+ * Get whether or not the QUIC stream is a QUIC datagram flow.
140
+ *
141
+ * @param options
142
+ * An nw_protocol_options_t for QUIC.
143
+ *
144
+ * @result is_datagram
145
+ * True if the QUIC stream is a QUIC datagram flow.
146
+ */
147
+ API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0))
148
+ bool
149
+ nw_quic_get_stream_is_datagram(nw_protocol_options_t options);
150
+
151
+ /*!
152
+ * @function nw_quic_set_stream_is_datagram
153
+ *
154
+ * @abstract
155
+ * Set whether or not the QUIC stream should be a QUIC datagram flow.
156
+ * Only one QUIC datagram flow can be created per connection.
157
+ *
158
+ * @param options
159
+ * An nw_protocol_options_t for QUIC.
160
+ *
161
+ * @param is_datagram
162
+ * A boolean to indicate whether or not the QUIC stream should be a QUIC datagram flow.
163
+ */
164
+ API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0))
165
+ void
166
+ nw_quic_set_stream_is_datagram(nw_protocol_options_t options,
167
+ bool is_datagram);
168
+
169
+ /*!
170
+ * @function nw_quic_get_initial_max_data
171
+ *
172
+ * @abstract
173
+ * Get the initial_max_data transport parameter on a QUIC
174
+ * connection.
175
+ *
176
+ * @param options
177
+ * An nw_protocol_options_t for QUIC.
178
+ *
179
+ * @result
180
+ * The initial_max_data that a client
181
+ * is willing to receive on a connection.
182
+ */
183
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
184
+ uint64_t
185
+ nw_quic_get_initial_max_data(nw_protocol_options_t options);
186
+
187
+ /*!
188
+ * @function nw_quic_set_initial_max_data
189
+ *
190
+ * @abstract
191
+ * Set the initial_max_data transport parameter on a QUIC
192
+ * connection. Setting this option requires
193
+ * initial_max_stream_data_bidirectional_local,
194
+ * initial_max_stream_data_bidirectional_remote and
195
+ * initial_max_stream_data_unidirectional also to be set.
196
+ *
197
+ * @param options
198
+ * An nw_protocol_options_t for QUIC.
199
+ *
200
+ * @param initial_max_data
201
+ * The initial_max_data controls how much data, in bytes, a client
202
+ * is willing to receive on a connection.
203
+ */
204
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
205
+ void
206
+ nw_quic_set_initial_max_data(nw_protocol_options_t options,
207
+ uint64_t initial_max_data);
208
+
209
+ /*!
210
+ * @function nw_quic_get_max_udp_payload_size
211
+ *
212
+ * @abstract
213
+ * Get the maximum length of a QUIC packet (UDP payload)
214
+ * that the client is willing to receive on a connection, in bytes.
215
+ *
216
+ * @param options
217
+ * An nw_protocol_options_t for QUIC.
218
+ *
219
+ * @result
220
+ * The max_udp_payload_size value, in bytes.
221
+ */
222
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
223
+ uint16_t
224
+ nw_quic_get_max_udp_payload_size(nw_protocol_options_t options);
225
+
226
+ /*!
227
+ * @function nw_quic_set_max_udp_payload_size
228
+ *
229
+ * @abstract
230
+ * Define the maximum length of a QUIC packet (UDP payload)
231
+ * that the client is willing to receive on a connection, in bytes.
232
+ *
233
+ * @param options
234
+ * An nw_protocol_options_t for QUIC.
235
+ *
236
+ * @param max_udp_payload_size
237
+ * The max_udp_payload_size value, in bytes.
238
+ */
239
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
240
+ void
241
+ nw_quic_set_max_udp_payload_size(nw_protocol_options_t options,
242
+ uint16_t max_udp_payload_size);
243
+
244
+ /*!
245
+ * @function nw_quic_get_idle_timeout
246
+ *
247
+ * @abstract
248
+ * Get the idle timeout value for the QUIC connection. If no packets are sent or received
249
+ * within this timeout, the QUIC connection will be closed.
250
+ *
251
+ * @param options
252
+ * An nw_protocol_options_t for QUIC.
253
+ *
254
+ * @result
255
+ * The idle_timeout value, in milliseconds.
256
+ */
257
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
258
+ uint32_t
259
+ nw_quic_get_idle_timeout(nw_protocol_options_t options);
260
+
261
+ /*!
262
+ * @function nw_quic_set_idle_timeout
263
+ *
264
+ * @abstract
265
+ * Define an idle timeout value for the QUIC connection. If no packets are sent or received
266
+ * within this timeout, the QUIC connection will be closed.
267
+ *
268
+ * @param options
269
+ * An nw_protocol_options_t for QUIC.
270
+ *
271
+ * @param idle_timeout
272
+ * The idle_timeout value, in milliseconds.
273
+ */
274
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
275
+ void
276
+ nw_quic_set_idle_timeout(nw_protocol_options_t options,
277
+ uint32_t idle_timeout);
278
+
279
+ /*!
280
+ * @function nw_quic_get_initial_max_streams_bidirectional
281
+ *
282
+ * @abstract
283
+ * Get the initial value of maximum bidirectional streams
284
+ * that the peer can initiate on a QUIC connection.
285
+ *
286
+ * @param options
287
+ * An nw_protocol_options_t for QUIC.
288
+ *
289
+ * @result
290
+ * The initial value for the maximum concurrent bidirectional streams.
291
+ */
292
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
293
+ uint64_t
294
+ nw_quic_get_initial_max_streams_bidirectional(nw_protocol_options_t options);
295
+
296
+ /*!
297
+ * @function nw_quic_set_initial_max_streams_bidirectional
298
+ *
299
+ * @abstract
300
+ * Set the initial value of maximum bidirectional streams
301
+ * that the peer can initiate on a QUIC connection.
302
+ *
303
+ * @param options
304
+ * An nw_protocol_options_t for QUIC.
305
+ *
306
+ * @param initial_max_streams_bidirectional
307
+ * The initial value for the maximum concurrent bidirectional streams.
308
+ */
309
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
310
+ void
311
+ nw_quic_set_initial_max_streams_bidirectional(nw_protocol_options_t options,
312
+ uint64_t initial_max_streams_bidirectional);
313
+
314
+ /*!
315
+ * @function nw_quic_get_initial_max_streams_unidirectional
316
+ *
317
+ * @abstract
318
+ * Get the initial value of maximum unidirectional streams
319
+ * that the peer can initiate on a QUIC connection.
320
+ *
321
+ * @param options
322
+ * An nw_protocol_options_t for QUIC.
323
+ *
324
+ * @result
325
+ * The initial value for the maximum concurrent unidirectional streams.
326
+ */
327
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
328
+ uint64_t
329
+ nw_quic_get_initial_max_streams_unidirectional(nw_protocol_options_t options);
330
+
331
+ /*!
332
+ * @function nw_quic_set_initial_max_streams_unidirectional
333
+ *
334
+ * @abstract
335
+ * Set the initial value of maximum unidirectional streams
336
+ * that the peer can initiate on a QUIC connection.
337
+ *
338
+ * @param options
339
+ * An nw_protocol_options_t for QUIC.
340
+ *
341
+ * @param initial_max_streams_unidirectional
342
+ * The initial value for the maximum concurrent unidirectional streams.
343
+ */
344
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
345
+ void
346
+ nw_quic_set_initial_max_streams_unidirectional(nw_protocol_options_t options,
347
+ uint64_t initial_max_streams_unidirectional);
348
+
349
+ /*!
350
+ * @function nw_quic_get_initial_max_stream_data_bidirectional_local
351
+ *
352
+ * @abstract
353
+ * Get the initial_max_stream_data_bidi_local transport parameter
354
+ * on a QUIC connection.
355
+ *
356
+ * @param options
357
+ * An nw_protocol_options_t for QUIC.
358
+ *
359
+ * @result
360
+ * How much data the client is willing to receive on a locally initiated stream.
361
+ */
362
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
363
+ uint64_t
364
+ nw_quic_get_initial_max_stream_data_bidirectional_local(nw_protocol_options_t options);
365
+
366
+ /*!
367
+ * @function nw_quic_set_initial_max_stream_data_bidirectional_local
368
+ *
369
+ * @abstract
370
+ * Set the initial_max_stream_data_bidi_local transport parameter
371
+ * on a QUIC connection.
372
+ *
373
+ * @param options
374
+ * An nw_protocol_options_t for QUIC.
375
+ *
376
+ * @param initial_max_stream_data_bidirectional_local
377
+ * The initial_max_stream_data_bidi_local controls how much data
378
+ * the client is willing to receive on a locally initiated stream.
379
+ */
380
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
381
+ void
382
+ nw_quic_set_initial_max_stream_data_bidirectional_local(nw_protocol_options_t options,
383
+ uint64_t initial_max_stream_data_bidirectional_local);
384
+
385
+ /*!
386
+ * @function nw_quic_get_initial_max_stream_data_bidirectional_remote
387
+ *
388
+ * @abstract
389
+ * Get the initial_max_stream_data_bidi_remote transport parameter
390
+ * on a QUIC connection.
391
+ *
392
+ * @param options
393
+ * An nw_protocol_options_t for QUIC.
394
+ *
395
+ * @result
396
+ * How much data the client is willing to receive on a remotely initiated stream.
397
+ */
398
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
399
+ uint64_t
400
+ nw_quic_get_initial_max_stream_data_bidirectional_remote(nw_protocol_options_t options);
401
+
402
+ /*!
403
+ * @function nw_quic_set_initial_max_stream_data_bidirectional_remote
404
+ *
405
+ * @abstract
406
+ * Set the initial_max_stream_data_bidi_remote transport parameter
407
+ * on a QUIC connection.
408
+ *
409
+ * @param options
410
+ * An nw_protocol_options_t for QUIC.
411
+ *
412
+ * @param initial_max_stream_data_bidirectional_remote
413
+ * The initial_max_stream_data_bidi_remote controls how much data
414
+ * the client is willing to receive on a remotely initiated stream.
415
+ */
416
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
417
+ void
418
+ nw_quic_set_initial_max_stream_data_bidirectional_remote(nw_protocol_options_t options,
419
+ uint64_t initial_max_stream_data_bidirectional_remote);
420
+
421
+ /*!
422
+ * @function nw_quic_get_initial_max_stream_data_unidirectional
423
+ *
424
+ * @abstract
425
+ * Get the initial_max_stream_data_uni transport parameter
426
+ * on a QUIC connection.
427
+ *
428
+ * @param options
429
+ * An nw_protocol_options_t for QUIC.
430
+ *
431
+ * @result
432
+ * How much data the client is willing to receive on a unidirectional stream.
433
+ */
434
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
435
+ uint64_t
436
+ nw_quic_get_initial_max_stream_data_unidirectional(nw_protocol_options_t options);
437
+
438
+ /*!
439
+ * @function nw_quic_set_initial_max_stream_data_unidirectional
440
+ *
441
+ * @abstract
442
+ * Set the initial_max_stream_data_uni transport parameter
443
+ * on a QUIC connection.
444
+ *
445
+ * @param options
446
+ * An nw_protocol_options_t for QUIC.
447
+ *
448
+ * @param initial_max_stream_data_unidirectional
449
+ * The initial_max_stream_data_uni controls how much data
450
+ * the client is willing to receive on a unidirectional stream.
451
+ */
452
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
453
+ void
454
+ nw_quic_set_initial_max_stream_data_unidirectional(nw_protocol_options_t options,
455
+ uint64_t initial_max_stream_data_unidirectional);
456
+
457
+ /*!
458
+ * @function nw_quic_get_max_datagram_frame_size
459
+ *
460
+ * @abstract
461
+ * Get the max_datagram_frame_size transport parameter
462
+ * on a QUIC connection.
463
+ *
464
+ * @param options
465
+ * An nw_protocol_options_t for QUIC.
466
+ *
467
+ * @result
468
+ * If greater than zero, the max_datagram_frame_size value indicates that
469
+ * DATAGRAM frames are supported, and describes the maximum number
470
+ * of bytes that a single DATAGRAM frame can contain.
471
+ */
472
+ API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0))
473
+ uint16_t
474
+ nw_quic_get_max_datagram_frame_size(nw_protocol_options_t options);
475
+
476
+ /*!
477
+ * @function nw_quic_set_max_datagram_frame_size
478
+ *
479
+ * @abstract
480
+ * Set the max_datagram_frame_size transport parameter
481
+ * on a QUIC connection.
482
+ *
483
+ * @param options
484
+ * An nw_protocol_options_t for QUIC.
485
+ *
486
+ * @param max_datagram_frame_size
487
+ * If greater than zero, the max_datagram_frame_size value indicates that
488
+ * DATAGRAM frames are supported, and describes the maximum number
489
+ * of bytes that a single DATAGRAM frame can contain.
490
+ */
491
+ API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0))
492
+ void
493
+ nw_quic_set_max_datagram_frame_size(nw_protocol_options_t options,
494
+ uint16_t max_datagram_frame_size);
495
+
496
+ #pragma mark - QUIC Metadata
497
+
498
+ /**
499
+ * @typedef nw_quic_stream_type_t
500
+ * @abstract
501
+ * Represents the type of a QUIC stream.
502
+ */
503
+ typedef enum {
504
+ /*! @const nw_quic_stream_type_unknown A QUIC stream whose direction can not be determined. */
505
+ nw_quic_stream_type_unknown = 0,
506
+ /*! @const nw_quic_stream_type_bidirectional A bidirectional QUIC stream. */
507
+ nw_quic_stream_type_bidirectional = 1,
508
+ /*! @const nw_quic_stream_type_unidirectional An unidirectional QUIC stream. */
509
+ nw_quic_stream_type_unidirectional = 2,
510
+ /*! @const nw_quic_stream_type_datagram A QUIC datagram stream. */
511
+ nw_quic_stream_type_datagram = 3,
512
+ } nw_quic_stream_type_t;
513
+
514
+ /*!
515
+ * @function nw_protocol_metadata_is_quic
516
+ *
517
+ * @abstract
518
+ * Checks if a protocol metadata object is compatible with the
519
+ * accessors defined in this file for the default system
520
+ * implementation of QUIC.
521
+ *
522
+ * @result
523
+ * Returns true if the metadata is for the default system QUIC,
524
+ * false otherwise.
525
+ */
526
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
527
+ bool
528
+ nw_protocol_metadata_is_quic(nw_protocol_metadata_t metadata);
529
+
530
+ /*!
531
+ * @function nw_quic_copy_sec_protocol_metadata
532
+ *
533
+ * @abstract
534
+ * Access the sec_protocol_metadata_t for a given QUIC connection
535
+ * metadata instance. See <Security/SecProtocolOptions.h> for functions
536
+ * to further configure security options.
537
+ *
538
+ * Will be filled out on connected instances of QUIC for metadata
539
+ * returned by nw_connection_copy_protocol_metadata.
540
+ *
541
+ * @param metadata
542
+ * An nw_protocol_metadata_t for QUIC.
543
+ *
544
+ * @result
545
+ * Returns a retained sec_protocol_metadata_t object.
546
+ */
547
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
548
+ NW_RETURNS_RETAINED sec_protocol_metadata_t
549
+ nw_quic_copy_sec_protocol_metadata(nw_protocol_metadata_t metadata);
550
+
551
+ /*!
552
+ * @function nw_quic_get_stream_id
553
+ *
554
+ * @abstract
555
+ * Get the QUIC stream ID.
556
+ *
557
+ * @param metadata
558
+ * A nw_protocol_metadata_t for a QUIC stream.
559
+ *
560
+ * @result
561
+ * Returns the QUIC stream id.
562
+ */
563
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
564
+ uint64_t
565
+ nw_quic_get_stream_id(nw_protocol_metadata_t metadata);
566
+
567
+ /*!
568
+ * @function nw_quic_stream_get_type
569
+ *
570
+ * @abstract
571
+ * Describes the type of the QUIC stream.
572
+ *
573
+ * @param stream_metadata
574
+ * A nw_protocol_metadata_t for a QUIC stream.
575
+ *
576
+ * @result
577
+ * Returns the type of the QUIC stream, stored in nw_quic_stream_type_t.
578
+ * If the type can not be determined, returns nw_quic_stream_type_unknown.
579
+ */
580
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
581
+ uint8_t
582
+ nw_quic_get_stream_type(nw_protocol_metadata_t stream_metadata);
583
+
584
+ /*!
585
+ * @function nw_quic_get_stream_application_error
586
+ *
587
+ * @abstract
588
+ * Access the Application Error value received from the peer in a stream close
589
+ * message.
590
+ *
591
+ * @param metadata
592
+ * A nw_protocol_metadata_t for a QUIC stream.
593
+ *
594
+ * @result
595
+ * Returns the Application Error code value received from by the peer,
596
+ * or UINT64_MAX if no error has been received.
597
+ */
598
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
599
+ uint64_t
600
+ nw_quic_get_stream_application_error(nw_protocol_metadata_t metadata);
601
+
602
+ /*!
603
+ * @function nw_quic_set_stream_application_error
604
+ *
605
+ * @abstract
606
+ * Set an Application Error value to send to the peer when the stream
607
+ * is closed.
608
+ *
609
+ * @param metadata
610
+ * A nw_protocol_metadata_t for a QUIC stream.
611
+ *
612
+ * @param application_error
613
+ * An application-specific error code value.
614
+ */
615
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
616
+ void
617
+ nw_quic_set_stream_application_error(nw_protocol_metadata_t metadata,
618
+ uint64_t application_error);
619
+
620
+ /*!
621
+ * @function nw_quic_get_local_max_streams_bidirectional
622
+ *
623
+ * @abstract
624
+ * Get the most recent value of the maximum number of bidirectional streams that the peer can create.
625
+ *
626
+ * @param metadata
627
+ * A nw_protocol_metadata_t for QUIC.
628
+ *
629
+ * @result
630
+ * Returns the most recent value of the peer's max number of bidirectional streams.
631
+ */
632
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
633
+ uint64_t
634
+ nw_quic_get_local_max_streams_bidirectional(nw_protocol_metadata_t metadata);
635
+
636
+ /*!
637
+ * @function nw_quic_set_local_max_streams_bidirectional
638
+ *
639
+ * @abstract
640
+ * Sets the maximum number of bidirectional streams that the peer can create.
641
+ *
642
+ * @param metadata
643
+ * A nw_protocol_metadata_t for QUIC.
644
+ *
645
+ * @param max_streams_bidirectional
646
+ * The new number of maximum bidirectional streams.
647
+ */
648
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
649
+ void
650
+ nw_quic_set_local_max_streams_bidirectional(nw_protocol_metadata_t metadata,
651
+ uint64_t max_streams_bidirectional);
652
+
653
+ /*!
654
+ * @function nw_quic_get_local_max_streams_unidirectional
655
+ *
656
+ * @abstract
657
+ * Get the most recent value of the maximum number of unidirectional streams that the peer can create.
658
+ *
659
+ * @param metadata
660
+ * A nw_protocol_metadata_t for QUIC.
661
+ *
662
+ * @result
663
+ * Returns the most recent value of the peer's max number of unidirectional streams.
664
+ */
665
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
666
+ uint64_t
667
+ nw_quic_get_local_max_streams_unidirectional(nw_protocol_metadata_t metadata);
668
+
669
+ /*!
670
+ * @function nw_quic_set_local_max_streams_unidirectional
671
+ *
672
+ * @abstract
673
+ * Sets the maximum number of unidirectional streams that the peer can create.
674
+ *
675
+ * @param metadata
676
+ * A nw_protocol_metadata_t for QUIC.
677
+ *
678
+ * @param max_streams_unidirectional
679
+ * The new number of maximum unidirectional streams.
680
+ */
681
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
682
+ void
683
+ nw_quic_set_local_max_streams_unidirectional(nw_protocol_metadata_t metadata,
684
+ uint64_t max_streams_unidirectional);
685
+
686
+ /*!
687
+ * @function nw_quic_get_remote_max_streams_bidirectional
688
+ *
689
+ * @abstract
690
+ * Get the maximum number of bidirectional streams advertised by peer that an application
691
+ * is allowed to create.
692
+ *
693
+ * Note that while attempts to create streams above this limit will
694
+ * be blocked until the server increases the limit, these blocked
695
+ * attempts will cause a STREAMS_BLOCKED frame to be sent to the
696
+ * server. This informs the server that the client has more streams
697
+ * it would like to create. As a result, the caller should attempt to
698
+ * create streams over this limit if it desires more streams.
699
+ *
700
+ * @param metadata
701
+ * A nw_protocol_metadata_t for QUIC.
702
+ *
703
+ * @result
704
+ * Returns the most recent value of the peer's advertised max number of bidirectional streams.
705
+ */
706
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
707
+ uint64_t
708
+ nw_quic_get_remote_max_streams_bidirectional(nw_protocol_metadata_t metadata);
709
+
710
+ /*!
711
+ * @function nw_quic_get_remote_max_streams_unidirectional
712
+ *
713
+ * @abstract
714
+ * Get the maximum number of unidirectional streams advertised by peer that an application
715
+ * is allowed to create.
716
+ *
717
+ * Note that while attempts to create streams above this limit will
718
+ * be blocked until the server increases the limit, these blocked
719
+ * attempts will cause a STREAMS_BLOCKED frame to be sent to the
720
+ * server. This informs the server that the client has more streams
721
+ * it would like to create. As a result, the caller should attempt to
722
+ * create streams over this limit if it desires more streams.
723
+ *
724
+ * @param metadata
725
+ * A nw_protocol_metadata_t for QUIC.
726
+ *
727
+ * @result
728
+ * Returns the most recent value of the peer's advertised max number of unidirectional streams.
729
+ */
730
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
731
+ uint64_t
732
+ nw_quic_get_remote_max_streams_unidirectional(nw_protocol_metadata_t metadata);
733
+
734
+ /*!
735
+ * @function nw_quic_get_stream_usable_datagram_frame_size
736
+ *
737
+ * @abstract
738
+ * Get the usable size of a datagram frame from a QUIC datagram flow.
739
+ *
740
+ * @param metadata
741
+ * A nw_protocol_metadata_t for QUIC.
742
+ *
743
+ * @result
744
+ * Returns the usable datagram frame size.
745
+ */
746
+ API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0))
747
+ uint16_t
748
+ nw_quic_get_stream_usable_datagram_frame_size(nw_protocol_metadata_t metadata);
749
+
750
+ /*!
751
+ * @function nw_quic_get_application_error
752
+ *
753
+ * @abstract
754
+ * Access the Application Error value received from the peer in a connection close
755
+ * message.
756
+ *
757
+ * @param metadata
758
+ * A nw_protocol_metadata_t for QUIC.
759
+ *
760
+ * @result
761
+ * Returns the Application Error code value received from by the peer,
762
+ * or UINT64_MAX if no error has been received.
763
+ */
764
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
765
+ uint64_t
766
+ nw_quic_get_application_error(nw_protocol_metadata_t metadata);
767
+
768
+ /*!
769
+ * @function nw_quic_get_application_error_reason
770
+ *
771
+ * @abstract
772
+ * Access the Application Error reason string received from the peer in a connection
773
+ * close message.
774
+ *
775
+ * @param metadata
776
+ * A nw_protocol_metadata_t for QUIC.
777
+ *
778
+ * @result
779
+ * Returns the Application Error reason received from by the peer,
780
+ * or NULL if no error reason has been received.
781
+ */
782
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
783
+ const char * _Nullable
784
+ nw_quic_get_application_error_reason(nw_protocol_metadata_t metadata);
785
+
786
+ /*!
787
+ * @function nw_quic_set_application_error
788
+ *
789
+ * @abstract
790
+ * Set the Application Error value to send to the peer in a connection close
791
+ * message.
792
+ *
793
+ * @param metadata
794
+ * A nw_protocol_metadata_t for QUIC.
795
+ *
796
+ * @param application_error
797
+ * Sets the Application Error code value.
798
+ *
799
+ * @param reason
800
+ * An optional reason string to associate with the error.
801
+ */
802
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
803
+ void
804
+ nw_quic_set_application_error(nw_protocol_metadata_t metadata,
805
+ uint64_t application_error,
806
+ const char * _Nullable reason);
807
+
808
+ /*!
809
+ * @function nw_quic_get_keepalive_interval
810
+ *
811
+ * @abstract
812
+ * Retrieves the keep-alive interval set on a QUIC connection.
813
+ *
814
+ * @param metadata
815
+ * A nw_protocol_metadata_t for QUIC.
816
+ *
817
+ * @result
818
+ * Returns value of the keep-alive interval, in seconds,
819
+ * or 0 if the keep-alive timer is disabled.
820
+ */
821
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
822
+ uint16_t
823
+ nw_quic_get_keepalive_interval(nw_protocol_metadata_t metadata);
824
+
825
+ /*!
826
+ * @define NW_QUIC_CONNECTION_DEFAULT_KEEPALIVE
827
+ * @discussion A sentinel value passed to `nw_quic_set_keepalive_interval` to configure
828
+ * the default keepalive value. The current default behavior is to send a keepalive
829
+ * every 20 seconds, although this is subject to change.
830
+ */
831
+ #define NW_QUIC_CONNECTION_DEFAULT_KEEPALIVE UINT16_MAX
832
+
833
+ /*!
834
+ * @function nw_quic_set_keepalive_interval
835
+ *
836
+ * @abstract
837
+ * Changes the keep-alive interval for QUIC.
838
+ *
839
+ * @discussion
840
+ * QUIC connections are encrypted and operate over the UDP protocol
841
+ * which makes it hard for Network Address Translators and firewalls
842
+ * to track their state. For this reason, these middleboxes may
843
+ * use short timeouts for QUIC flows. By sending keep-alive packets
844
+ * (QUIC PING frames), the endpoint can maintain
845
+ * state of the flow across the network.
846
+ * Keep-alives should only be enabled while there is an outstanding
847
+ * exchange of information with the remote endpoint that has not yet
848
+ * completed, it is not recommended to enable keep-alive packets on an
849
+ * idle connection that is not expecting to send or receive data in
850
+ * the near future.
851
+ *
852
+ * @param metadata
853
+ * A nw_protocol_metadata_t for QUIC.
854
+ *
855
+ * @param keepalive_interval
856
+ * The keep-alive interval for QUIC, in seconds,
857
+ * or 0 if the keep-alive timer is disabled.
858
+ * Pass `NW_QUIC_CONNECTION_DEFAULT_KEEPALIVE` to use the default
859
+ * keep-alive interval.
860
+ */
861
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
862
+ void
863
+ nw_quic_set_keepalive_interval(nw_protocol_metadata_t metadata,
864
+ uint16_t keepalive_interval);
865
+
866
+ #pragma mark - QUIC Metadata Get Only
867
+
868
+ /*!
869
+ * @function nw_quic_get_remote_idle_timeout
870
+ *
871
+ * @abstract
872
+ * Access the idle_timeout value in milliseconds received from the peer
873
+ * in the transport parameters.
874
+ *
875
+ * @param metadata
876
+ * A nw_protocol_metadata_t for QUIC.
877
+ *
878
+ * @result
879
+ * Returns the idle_timeout value in milliseconds received from the peer.
880
+ */
881
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
882
+ uint64_t
883
+ nw_quic_get_remote_idle_timeout(nw_protocol_metadata_t metadata);
884
+
885
+ NW_ASSUME_NONNULL_END
886
+
887
+ __END_DECLS
888
+
889
+ #endif // __NW_QUIC_OPTIONS_H__