peachsim 0.1.2489 → 0.1.2491

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 (145) hide show
  1. package/cli/bridge-flow-runner.ts +190 -167
  2. package/cli/cloud-client.ts +7 -2
  3. package/cli/commands/control.ts +36 -26
  4. package/cli/commands/inspect/settling.ts +7 -2
  5. package/cli/commands/kotlin.ts +2 -0
  6. package/cli/commands/swift.ts +3 -0
  7. package/cli/native-input.ts +2 -0
  8. package/dist-lib/agent-daemon-client.cjs +1 -1
  9. package/dist-lib/agent-events.cjs +1 -1
  10. package/dist-lib/attached-projects.cjs +1 -1
  11. package/dist-lib/auth/shared-session.cjs +1 -1
  12. package/dist-lib/backend-origin.cjs +1 -1
  13. package/dist-lib/beta.cjs +1 -1
  14. package/dist-lib/beta.mjs +2 -2
  15. package/dist-lib/bridge-constants.cjs +1 -1
  16. package/dist-lib/bridge-contract-input.cjs +1 -1
  17. package/dist-lib/bridge-contract-input.mjs +5 -5
  18. package/dist-lib/bridge-contract.cjs +1 -1
  19. package/dist-lib/bridge-contract.mjs +3 -3
  20. package/dist-lib/bundle-channel.cjs +3 -3
  21. package/dist-lib/capture-contract.cjs +1 -1
  22. package/dist-lib/capture-contract.mjs +3 -3
  23. package/dist-lib/cloud-contract.cjs +1 -1
  24. package/dist-lib/cloud-contract.mjs +3 -3
  25. package/dist-lib/cloud-test-args.cjs +1 -1
  26. package/dist-lib/cloud-test-args.mjs +2 -2
  27. package/dist-lib/cloud.cjs +1 -1
  28. package/dist-lib/cloud.mjs +7 -7
  29. package/dist-lib/config.cjs +1 -1
  30. package/dist-lib/config.mjs +5 -5
  31. package/dist-lib/detox/index.cjs +8 -3
  32. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  33. package/dist-lib/esm-chunks/{acorn-46P725QB.mjs → acorn-2J725R5I.mjs} +3 -3
  34. package/dist-lib/esm-chunks/{chunk-PWLDSFLP.mjs → chunk-2HK4H7ZI.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-NN6KHA6F.mjs → chunk-6VR25SPG.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-T53UQ6V7.mjs → chunk-6XNOBDYY.mjs} +3 -3
  37. package/dist-lib/esm-chunks/{chunk-K3NXHJBV.mjs → chunk-7VU3MCJG.mjs} +12 -12
  38. package/dist-lib/esm-chunks/{chunk-FXOLLJ7N.mjs → chunk-7WLZ4NHN.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-CB2MREW2.mjs → chunk-AQZG62OH.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-FNFDX5OA.mjs → chunk-EIM3TPVZ.mjs} +2 -2
  41. package/dist-lib/esm-chunks/{chunk-QR4AFBNL.mjs → chunk-EMQ3TSAN.mjs} +5 -5
  42. package/dist-lib/esm-chunks/{chunk-KFJJOPLU.mjs → chunk-EN5F4P2G.mjs} +5 -5
  43. package/dist-lib/esm-chunks/{chunk-G4KFSINI.mjs → chunk-EZBJ5J3I.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-MOGXM5NJ.mjs → chunk-FX5ONYBN.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-HO4COZOG.mjs → chunk-GNJLEHNW.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-ST7BG6HB.mjs → chunk-GQJ6AWTA.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-5F5TV3M5.mjs → chunk-GV6SJTHZ.mjs} +4 -4
  48. package/dist-lib/esm-chunks/{chunk-ZGCWGHEX.mjs → chunk-IUJGRRA5.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-E7Z6E4VM.mjs → chunk-KYB5R7DP.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-XYRP56S5.mjs → chunk-MAHSHPSW.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{chunk-2ZAKSUG3.mjs → chunk-NLX75NDQ.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{chunk-75IXYYPA.mjs → chunk-NPNMSHHT.mjs} +1 -1
  53. package/dist-lib/esm-chunks/{chunk-FMR76G4M.mjs → chunk-PE74RKR2.mjs} +1 -1
  54. package/dist-lib/esm-chunks/{chunk-YH2VVDO2.mjs → chunk-Z2NSJMVJ.mjs} +1 -1
  55. package/dist-lib/esm-chunks/{metro-layout-parser-FPL6XENQ.mjs → metro-layout-parser-G37VWZEJ.mjs} +3 -3
  56. package/dist-lib/esm-chunks/{swift-package-prebuilt-FYUAWFYO.mjs → swift-package-prebuilt-SEN55VIB.mjs} +10 -10
  57. package/dist-lib/esm-chunks/{swift-sdk-app-module-RVHNFMEY.mjs → swift-sdk-app-module-UK4USPH3.mjs} +13 -13
  58. package/dist-lib/esm-chunks/{swift-sdk-image-JHQ6DP5G.mjs → swift-sdk-image-IBWK7WQH.mjs} +13 -13
  59. package/dist-lib/esm-chunks/{swift-sdk-image-producer-XQ5W4ONP.mjs → swift-sdk-image-producer-NLZJWZSK.mjs} +4 -4
  60. package/dist-lib/expo-swift-bundle.cjs +2 -2
  61. package/dist-lib/expo-swift-metadata.cjs +1 -1
  62. package/dist-lib/expo-swift-metadata.mjs +7 -7
  63. package/dist-lib/home-paths.cjs +1 -1
  64. package/dist-lib/host/bridge-host.cjs +31 -8
  65. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  66. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  67. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  68. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  69. package/dist-lib/host/websocket-proxy.cjs +1 -1
  70. package/dist-lib/index.cjs +11 -5
  71. package/dist-lib/kotlin-host.cjs +1 -1
  72. package/dist-lib/menu.cjs +1 -1
  73. package/dist-lib/menu.mjs +3 -3
  74. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  75. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  76. package/dist-lib/metro-production-bundle.cjs +1 -1
  77. package/dist-lib/metro-production-bundle.mjs +4 -4
  78. package/dist-lib/native-app-identity-project.cjs +1 -1
  79. package/dist-lib/native-app-identity-project.mjs +15 -15
  80. package/dist-lib/native-app-identity.cjs +1 -1
  81. package/dist-lib/native-app-identity.mjs +6 -6
  82. package/dist-lib/native-firebase-metadata.cjs +1 -1
  83. package/dist-lib/native-firebase-metadata.mjs +3 -3
  84. package/dist-lib/pdfium-raster.cjs +1 -1
  85. package/dist-lib/pdfium-raster.mjs +2 -2
  86. package/dist-lib/plist.cjs +1 -1
  87. package/dist-lib/plist.mjs +3 -3
  88. package/dist-lib/profiles.cjs +1 -1
  89. package/dist-lib/public-brand.cjs +1 -1
  90. package/dist-lib/public-origins-lib-esm.json +79 -79
  91. package/dist-lib/public-origins-lib.json +69 -69
  92. package/dist-lib/react-native-host-modules.cjs +1 -1
  93. package/dist-lib/react-native-host-modules.mjs +2 -2
  94. package/dist-lib/reap-browser.cjs +1 -1
  95. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  96. package/dist-lib/sdk.cjs +8 -3
  97. package/dist-lib/sdk.mjs +14 -9
  98. package/dist-lib/skills.cjs +223 -208
  99. package/dist-lib/swift-compile.cjs +1 -1
  100. package/dist-lib/swift-compile.mjs +10 -10
  101. package/dist-lib/swift-package.cjs +1 -1
  102. package/dist-lib/swift-package.mjs +3 -3
  103. package/dist-lib/swift-submit.cjs +1 -1
  104. package/dist-lib/swift-submit.mjs +5 -5
  105. package/dist-lib/swift-svg-raster.cjs +1 -1
  106. package/dist-lib/swift-svg-raster.mjs +2 -2
  107. package/dist-lib/swift-toolchain.cjs +1 -1
  108. package/dist-lib/swift.cjs +1 -1
  109. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  110. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  111. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  112. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  113. package/dist-lib/vendor/acorn.cjs +1 -1
  114. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  115. package/dist-lib/vendor/ignore.cjs +1 -1
  116. package/dist-lib/vendor/magic-string.cjs +1 -1
  117. package/dist-lib/vendor/plist.cjs +1 -1
  118. package/dist-lib/vendor/smol-toml.cjs +1 -1
  119. package/dist-lib/vendor/stream-json.cjs +1 -1
  120. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  121. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  122. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  123. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  124. package/dist-lib/vendor/sucrase.cjs +1 -1
  125. package/dist-lib/vendor/terser.cjs +1 -1
  126. package/dist-lib/vendor/valibot.cjs +1 -1
  127. package/dist-lib/vendor/ws.cjs +1 -1
  128. package/dist-lib/vendor/zod.cjs +1 -1
  129. package/dist-lib/worklet-executable.cjs +1 -1
  130. package/dist-lib/worklet-executable.mjs +3 -3
  131. package/dist-types/packages/peach-engine/src/render-worker/auxPointerContract.d.ts +4 -0
  132. package/dist-types/packages/peach-engine/src/render-worker/host.d.ts +187 -0
  133. package/dist-types/packages/peach-engine/src/render-worker/live-frame-to-shell.d.ts +2 -0
  134. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +10 -10
  135. package/dist-types/packages/peach-engine/src/render-worker/render-host-ref.d.ts +14 -0
  136. package/dist-types/packages/peach-engine/src/render-worker/surface-ownerContract.d.ts +2 -0
  137. package/dist-types/packages/peach-globals/src/index.d.ts +2 -2
  138. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
  139. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +13 -1
  140. package/package.json +1 -1
  141. package/src/bridge-contract.ts +2 -17
  142. package/src/connect.ts +1 -1
  143. package/src/swift-host.ts +11 -2
  144. package/src/swift-sdk-later-data.ts +21 -4
  145. package/src/swift-startup-split.ts +6 -1
@@ -1,5 +1,6 @@
1
1
  import { type AndroidSystemGestureCandidateRegion, type ShellGestureRegion } from './scene-gesture-host.d.ts';
2
2
  import type { NativeWindowOwnership, NativeWindowSource } from './compositor-protocol.d.ts';
3
+ import type { RenderHost } from './host.d.ts';
3
4
  import type { ShellHost } from './shell-host-types.d.ts';
4
5
  import type { WheelTrackTarget } from './shell-protocol.d.ts';
5
6
  export type ShellExclusiveRegion = Exclude<ShellGestureRegion, null | AndroidSystemGestureCandidateRegion>;
@@ -82,6 +83,7 @@ export interface SurfaceOwnerResolver {
82
83
  }
83
84
  export interface WheelTrackHost {
84
85
  shell: Pick<ShellHost, 'trackWheel' | 'onWheelTarget'>;
86
+ tenant?: () => Pick<RenderHost, 'trackWheel' | 'onWheelTarget'> | null;
85
87
  scale: () => number;
86
88
  toDevice: (x: number, y: number) => {
87
89
  x: number;
@@ -8,8 +8,8 @@ export type { NativeViewMeasureMode, NativeViewMeasure, PeachNativeWorkletEventD
8
8
  export { SOOTSIM_BOOT_STAGE_ORDER, SOOTSIM_TENANT_READY_MARK, SOOTSIM_BOOT_MARKS_GLOBAL, dispatchSootsimEvent, listenSootsimEvent, } from './eventBridgeContract.d.ts';
9
9
  export { isDeviceHardwareAction, type DeviceHardwareAction, } from './eventBridgeContract.d.ts';
10
10
  export type { SootsimBridgeStatusDetail, SootsimActiveAppChangeDetail, SootsimSettingsPage, SootsimSettingsRoute, SootsimNavigateAppDetail, SootsimNavigateHomeDetail, SootsimEmbedVisibilityDetail, SootsimEmbedInteraction, SootsimEngineFailureDetail, SootsimBootStage, SootsimBootMarkName, SootsimBootMark, SootsimHostKeyDetail, SootsimHapticActivityDetail, SootsimColorScheme, SootsimTopOverlayKind, SootsimEventMap, SootsimEventName, } from './eventBridgeContract.d.ts';
11
- export type { SootSimTestQueryFilter, SootSimTextCandidatesOptions, SootSimTextCandidate, SootSimTextCandidatesResult, SootSimDumpTreeOptions, SootSimInspectPointOptions, SootSimTapTargetOptions, SootSimListInspectableOptions, SootSimRequestEntry, SootSimRequestCounts, SootSimTestBridge, SootSimTestBridgeMethod, SootSimTestBridgeArgs, SootSimTestBridgeResult, } from './testBridgeContract.d.ts';
12
- export type { SootSimInspectNeighborDirection, SootSimTapPathEntry, SootSimTapRefusal, SootSimTapTargetMatch, SootSimTapTargetVerification, SootSimNativePresentationInfo, SootSimTapResult, SootSimTapTargetStrategy, SootSimTapTargetInfo, SootSimRouteInfo, SootSimUndeclaredScreen, SootSimScrollToResult, SootSimCursorState, SootSimLoupeState, SootSimEditMenuRect, SootSimEditMenuItem, SootSimEditMenuState, SootSimTextSelection, SootSimTextSelectionHandles, SootSimAnimationSource, SootSimAnimationInfo, SootSimAnimationTraceSample, SootSimAnimationTraceStatus, SootSimRuntimeState, SootSimScreenTransitionWaitOptions, SootSimScreenTransitionWaitResult, SootSimInspectDeviceInfo, SootSimInspectAncestor, SootSimInspectBoxModel, SootSimInspectImageSource, SootSimInspectHookKind, SootSimInspectHookSummary, SootSimInspectCommitCause, SootSimInspectLastCommit, SootSimInspectReactInfo, SootSimInspectNavigationInfo, SootSimInspectTimelineEntry, SootSimInspectTreeNode, SootSimInspectInfo, PeachSemanticInspectInfo, PointerDispatchOptions, PeachAccessibilityNode, PeachSwiftUiAccessibility, PeachDebugSnapshotOperation, SootSimTargetMatcher, SootSimTargetObservation, PeachPeerStatsProgress, PeachPeerStats, SootSimAccessibilityState, SootSimAccessibilityValue, SootSimAccessibilityLiveRegion, SootSimFocusedNodeInfo, SootSimAccessibilityInput, SootSimNodeInfo, SootSimStyleTokenBinding, SootSimCapturedTextSegment, SootSimCapturedTextLine, SootSimRenderTreeNode, SootSimRenderTreeSnapshot, SootSimSemanticRenderTreeNode, SootSimSemanticRenderTreeSnapshot, SootSimCaptureTransactionReceipt, SootSimCaptureBoundLongPressReceipt, SootSimCaptureBoundTapReceipt, SootSimDebugNodeInfo, SootSimVisibleFrame, SootSimVisibilityNodeRef, SootSimVisibleFrameHidden, SootSimLayout, SootSimDeviceSpec, } from './nodeContract.d.ts';
11
+ export type { SootSimTestQueryFilter, SootSimTextCandidatesOptions, SootSimTextCandidate, SootSimTextCandidatesResult, SootSimDumpTreeOptions, SootSimInspectPointOptions, SootSimTapTargetOptions, SootSimListInspectableOptions, SootSimRequestEntry, SootSimRequestCounts, SootSimTestBridge, SootSimRenderReadinessStats, SootSimTestBridgeMethod, SootSimTestBridgeArgs, SootSimTestBridgeResult, } from './testBridgeContract.d.ts';
12
+ export type { SootSimInspectNeighborDirection, SootSimTapPathEntry, SootSimTapRefusal, SootSimTapTargetMatch, SootSimTapTargetVerification, SootSimNativePresentationInfo, SootSimTapResult, SootSimTapTargetStrategy, SootSimTapTargetInfo, SootSimRouteInfo, SootSimUndeclaredScreen, SootSimScrollToResult, SootSimCursorState, SootSimLoupeState, SootSimEditMenuRect, SootSimEditMenuItem, SootSimEditMenuState, SootSimTextSelection, SootSimTextSelectionHandles, SootSimAnimationSource, SootSimAnimationInfo, SootSimAnimationTraceSample, SootSimAnimationTraceStatus, SootSimRuntimeState, SootSimScreenTransitionWaitOptions, SootSimScreenTransitionWaitResult, SootSimInspectDeviceInfo, SootSimInspectAncestor, SootSimInspectBoxModel, SootSimInspectImageSource, SootSimInspectHookKind, SootSimInspectHookSummary, SootSimInspectCommitCause, SootSimInspectLastCommit, SootSimInspectReactInfo, SootSimInspectNavigationInfo, SootSimInspectTimelineEntry, SootSimInspectTreeNode, SootSimInspectInfo, PeachSemanticInspectInfo, PointerDispatchOptions, PeachAccessibilityNode, PeachSwiftUiAccessibility, PeachDebugSnapshotOperation, SootSimTargetMatcher, SootSimTargetObservation, PeachPeerStatsProgress, PeachPeerStats, SootSimAccessibilityState, SootSimAccessibilityValue, SootSimAccessibilityLiveRegion, SootSimFocusedNodeInfo, SootSimAccessibilityInput, SootSimNodeInfo, SootSimNodeRecord, SootSimStyleTokenBinding, SootSimCapturedTextSegment, SootSimCapturedTextLine, SootSimRenderTreeNode, SootSimRenderTreeSnapshot, SootSimSemanticRenderTreeNode, SootSimSemanticRenderTreeSnapshot, SootSimCaptureTransactionReceipt, SootSimCaptureBoundLongPressReceipt, SootSimCaptureBoundTapReceipt, SootSimDebugNodeInfo, SootSimVisibleFrame, SootSimVisibilityNodeRef, SootSimVisibleFrameHidden, SootSimLayout, SootSimDeviceSpec, } from './nodeContract.d.ts';
13
13
  export type { SootSimInteractBridge } from './interactionBridgeContract.d.ts';
14
14
  export { isTextInputEditCommand, NATIVE_TEXT_INPUT_TYPES, } from './keyboardBridgeContract.d.ts';
15
15
  export type { GuardedTextInputResult, TextInputEditRange, NativeTextInputIntent, NormalizedTextInputEditCommand, TextInputEditCommand, SootSimKeyboardBridge, } from './keyboardBridgeContract.d.ts';
@@ -556,6 +556,7 @@ export interface SootSimNodeInfo {
556
556
  accessibilityValue: SootSimAccessibilityValue | null;
557
557
  accessibilityInput?: SootSimAccessibilityInput;
558
558
  }
559
+ export type SootSimNodeRecord = Pick<SootSimNodeInfo, 'nodeId' | 'id' | 'testID' | 'text' | 'accessibilityLabel' | 'accessibilityRole' | 'accessibilityState' | 'placeholder' | 'absolutePosition' | 'layout' | 'visibleFrame' | 'isTextInput'>;
559
560
  export interface SootSimStyleTokenBinding {
560
561
  token: string;
561
562
  theme: string;
@@ -1,7 +1,7 @@
1
1
  import type { MaybeAsync } from './bridgeContract.d.ts';
2
2
  import type { GuestExecutionSnapshot } from './guestExecutionContract.d.ts';
3
3
  import type { GuardedTextInputResult } from './keyboardBridgeContract.d.ts';
4
- import type { SootSimAccessibilityState, SootSimNodeInfo, PeachAccessibilityNode, SootSimTargetMatcher, SootSimTargetObservation, SootSimTapTargetInfo, SootSimTapTargetVerification, SootSimDebugNodeInfo, SootSimInspectInfo, SootSimInspectNeighborDirection, PeachSemanticInspectInfo, SootSimInspectTreeNode, SootSimRenderTreeSnapshot, SootSimSemanticRenderTreeSnapshot, SootSimCaptureTransactionReceipt, SootSimCaptureBoundLongPressReceipt, SootSimCaptureBoundTapReceipt, SootSimLayout, SootSimFocusedNodeInfo, PeachPeerStats, PeachPeerStatsProgress, PeachDebugSnapshotOperation, SootSimScreenTransitionWaitOptions, SootSimScreenTransitionWaitResult, SootSimAnimationInfo, SootSimAnimationTraceSample, SootSimAnimationTraceStatus, SootSimRuntimeState, SootSimCursorState, SootSimLoupeState, SootSimEditMenuState, SootSimTextSelection, SootSimTextSelectionHandles, SootSimScrollToResult, SootSimTapResult, SootSimRouteInfo, SootSimUndeclaredScreen } from './nodeContract.d.ts';
4
+ import type { SootSimAccessibilityState, SootSimNodeInfo, SootSimNodeRecord, PeachAccessibilityNode, SootSimTargetMatcher, SootSimTargetObservation, SootSimTapTargetInfo, SootSimTapTargetVerification, SootSimDebugNodeInfo, SootSimInspectInfo, SootSimInspectNeighborDirection, PeachSemanticInspectInfo, SootSimInspectTreeNode, SootSimRenderTreeSnapshot, SootSimSemanticRenderTreeSnapshot, SootSimCaptureTransactionReceipt, SootSimCaptureBoundLongPressReceipt, SootSimCaptureBoundTapReceipt, SootSimLayout, SootSimFocusedNodeInfo, PeachPeerStats, PeachPeerStatsProgress, PeachDebugSnapshotOperation, SootSimScreenTransitionWaitOptions, SootSimScreenTransitionWaitResult, SootSimAnimationInfo, SootSimAnimationTraceSample, SootSimAnimationTraceStatus, SootSimRuntimeState, SootSimCursorState, SootSimLoupeState, SootSimEditMenuState, SootSimTextSelection, SootSimTextSelectionHandles, SootSimScrollToResult, SootSimTapResult, SootSimRouteInfo, SootSimUndeclaredScreen } from './nodeContract.d.ts';
5
5
  import type { SootSimScrollOffsetSample } from './performanceBridgeContract.d.ts';
6
6
  import type { SystemPermissionApp, AppSettingsSnapshot, SystemPermissionKind, SystemPermissionMutation } from './permissionsBridgeContract.d.ts';
7
7
  import type { SootSimReplayTarget } from './replayBridgeContract.d.ts';
@@ -16,6 +16,16 @@ export type FrameProducerFrameReceipt = {
16
16
  firstFrameMs: number | null;
17
17
  replayedFrames?: FrameProducerClockSample[];
18
18
  };
19
+ export interface SootSimRenderReadinessStats {
20
+ appCommitCount: number;
21
+ pendingImageFetches: number;
22
+ renderRequested?: boolean;
23
+ layoutDirty?: boolean;
24
+ hasActiveAnims?: boolean;
25
+ hasActiveBlockingNativeAnimations?: boolean;
26
+ hasPendingBlockingAnimationFrames?: boolean;
27
+ hasPendingReadinessAnimationFrames?: boolean;
28
+ }
19
29
  export interface SootSimTestQueryFilter {
20
30
  type?: string;
21
31
  hasText?: string;
@@ -174,6 +184,7 @@ export interface SootSimTestBridge {
174
184
  targets: number;
175
185
  loadingText: string;
176
186
  }>;
187
+ getRemoteRenderReadiness?(): MaybeAsync<SootSimRenderReadinessStats>;
177
188
  getGeometryRevision(): MaybeAsync<string | null>;
178
189
  scrollTouchSlop(): MaybeAsync<number>;
179
190
  getCullStats?(reset?: boolean): MaybeAsync<{
@@ -224,6 +235,7 @@ export interface SootSimTestBridge {
224
235
  keyboardHandlers: number;
225
236
  } | null>;
226
237
  queryAll(filter: SootSimTestQueryFilter): MaybeAsync<SootSimNodeInfo[]>;
238
+ queryNodeRecords?(id?: string, text?: string): MaybeAsync<SootSimNodeRecord[]>;
227
239
  queryTextCandidates(opts: SootSimTextCandidatesOptions): MaybeAsync<SootSimTextCandidatesResult>;
228
240
  dumpTree(maxDepth?: number, opts?: SootSimDumpTreeOptions): MaybeAsync<string>;
229
241
  dumpAccessibilityTree(maxDepth?: number): MaybeAsync<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2489",
3
+ "version": "0.1.2491",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -25,7 +25,7 @@ import type {
25
25
  SootSimLocationCommand,
26
26
  SootSimLocationFix,
27
27
  SootSimLocationResult,
28
- SootSimNodeInfo,
28
+ SootSimNodeRecord,
29
29
  SootSimRecorderBridge,
30
30
  SootSimReplayTarget,
31
31
  SootSimTapRefusal,
@@ -673,22 +673,7 @@ export type SimSemanticQuery =
673
673
  // the element at a point, with its frame and source chain
674
674
  | { kind: 'inspectAt'; x: number; y: number; excludeTestIds?: string[] }
675
675
 
676
- // the fields a selector reads from an engine node, without its styles
677
- export type SimNodeRecord = Pick<
678
- SootSimNodeInfo,
679
- | 'nodeId'
680
- | 'id'
681
- | 'testID'
682
- | 'text'
683
- | 'accessibilityLabel'
684
- | 'accessibilityRole'
685
- | 'accessibilityState'
686
- | 'placeholder'
687
- | 'absolutePosition'
688
- | 'layout'
689
- | 'visibleFrame'
690
- | 'isTextInput'
691
- >
676
+ export type SimNodeRecord = SootSimNodeRecord
692
677
 
693
678
  export interface SimSemanticQueryResult {
694
679
  nodes: SimSemanticNode[]
package/src/connect.ts CHANGED
@@ -67,6 +67,7 @@ export async function connect(options: ConnectOptions = {}): Promise<SimClient>
67
67
  const target = {
68
68
  simId: options.sim,
69
69
  simIdSource: options.sim ? 'flag' : 'none',
70
+ explicitPort: options.port !== undefined,
70
71
  } satisfies Parameters<typeof resolveCloudSessionForParsed>[0]
71
72
  const cloud = resolveCloudSessionForParsed(target)
72
73
  if (cloud) {
@@ -82,7 +83,6 @@ export async function connect(options: ConnectOptions = {}): Promise<SimClient>
82
83
  const parsed = {
83
84
  ...target,
84
85
  wsPort: options.port ?? resolveBridgeWorld().bridgePort,
85
- explicitPort: options.port !== undefined,
86
86
  commandTimeoutMs,
87
87
  positional: [],
88
88
  } satisfies ParsedBridgeCliArgs
package/src/swift-host.ts CHANGED
@@ -3927,6 +3927,7 @@ export async function swiftPackageMetadata(
3927
3927
  startupEnvironment: readonly string[] = [],
3928
3928
  startupRuntimeUrl?: URL,
3929
3929
  startupGuest?: SwiftStartupLaunch['guest'],
3930
+ startupArguments: readonly string[] = [],
3930
3931
  ): Promise<SwiftEntryModuleArgs> {
3931
3932
  packagePath = fs.realpathSync(packagePath)
3932
3933
  const project = projectFor(packagePath, hosted, signal)
@@ -4060,6 +4061,7 @@ export async function swiftPackageMetadata(
4060
4061
  (profileOrigin) => metadata(profileOrigin, artifact),
4061
4062
  {
4062
4063
  environment: startupEnvironment,
4064
+ arguments: startupArguments,
4063
4065
  guest: startupGuest,
4064
4066
  },
4065
4067
  startupRuntimeUrl,
@@ -4088,6 +4090,7 @@ export async function swiftPackageMetadata(
4088
4090
  startupEnvironment,
4089
4091
  startupRuntimeUrl?.origin,
4090
4092
  startupGuest,
4093
+ startupArguments,
4091
4094
  ])
4092
4095
  let startup = profiles.get(key)
4093
4096
  if (!startup) {
@@ -4100,6 +4103,7 @@ export async function swiftPackageMetadata(
4100
4103
  runtimeRoot,
4101
4104
  artifactHash: artifact.hash,
4102
4105
  environment: startupEnvironment,
4106
+ arguments: startupArguments,
4103
4107
  guest: startupGuest,
4104
4108
  metadata: (profileOrigin) => metadata(profileOrigin, artifact, sdkDigest),
4105
4109
  serveAsset: serveSwiftPackageAsset,
@@ -4194,13 +4198,18 @@ function swiftSdkStartup(
4194
4198
  packagePath: string,
4195
4199
  artifactHash: string,
4196
4200
  metadata: SwiftStartupLaunch['metadata'],
4197
- launch: Pick<SwiftStartupLaunch, 'environment' | 'guest'>,
4201
+ launch: Pick<SwiftStartupLaunch, 'environment' | 'arguments' | 'guest'>,
4198
4202
  runtimeRootOverride?: URL,
4199
4203
  ) {
4200
4204
  const { key } = sdk
4201
4205
  const app = createHash('sha256')
4202
4206
  .update(
4203
- JSON.stringify([packagePath, launch.environment, runtimeRootOverride?.origin]),
4207
+ JSON.stringify([
4208
+ packagePath,
4209
+ launch.environment,
4210
+ runtimeRootOverride?.origin,
4211
+ ...(launch.arguments?.length ? [launch.arguments] : []),
4212
+ ]),
4204
4213
  )
4205
4214
  .update(launch.guest?.source ?? '')
4206
4215
  .digest('hex')
@@ -166,6 +166,7 @@ interface SdkPieces {
166
166
  ends: Uint32Array
167
167
  /** pieces in segments named as C identifiers, which code walks between start and stop. */
168
168
  walked: Uint8Array
169
+ swiftRecordsAddress: number | undefined
169
170
  edgeSources: Uint32Array
170
171
  edgeTargets: Uint32Array
171
172
  functionSlots: Uint32Array
@@ -204,10 +205,18 @@ function readSdkPieces(directory: string): SdkPieces {
204
205
  edgeSources[i] = edges[i * 2]!
205
206
  edgeTargets[i] = edges[i * 2 + 1]!
206
207
  }
208
+ const recordSymbol = manifest.strings.indexOf('__peach_sdk_records')
209
+ const recordIndex = recordSymbol < 0 ? -1 : block('pieceSymbols').indexOf(recordSymbol)
210
+ const records = order.find(
211
+ (field) =>
212
+ fields[field + 5]! <= recordIndex &&
213
+ recordIndex < fields[field + 5]! + fields[field + 6]!,
214
+ )
207
215
  const result = {
208
216
  starts,
209
217
  ends,
210
218
  walked,
219
+ swiftRecordsAddress: records === undefined ? undefined : fields[records],
211
220
  edgeSources,
212
221
  edgeTargets,
213
222
  functionSlots: block('functionSlots').slice(),
@@ -426,9 +435,9 @@ export interface SwiftSdkLaterSplit {
426
435
 
427
436
  /**
428
437
  * moves the sdk data that only deferred sdk code can reach out of an app's binding. data stays
429
- * in the binding when the primary's code, the binding's values and fixups, or a walked segment
430
- * reaches it, or when no code reaches it at all; the loader writes the rest before any deferred
431
- * sdk part runs.
438
+ * in the binding when startup code, binding values, fixups, Swift registration or a walked
439
+ * segment reaches it, or when no code reaches it at all. The loader writes the rest before any
440
+ * deferred sdk part runs.
432
441
  */
433
442
  export function splitSwiftSdkLaterData(
434
443
  directory: string,
@@ -462,13 +471,21 @@ export function splitSwiftSdkLaterData(
462
471
  for (const value of decoded.values)
463
472
  if (value >= 0n && value < 2n ** 32n) seed(Number(value))
464
473
  for (let i = 0; i < decoded.memory.length; i += 3) seed(decoded.memory[i]!)
465
- for (const { address, bytes } of runs)
474
+ for (const { address, bytes } of runs) {
475
+ if (address === pieces.swiftRecordsAddress) {
476
+ seed(address)
477
+ const records = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength)
478
+ // the binding writer adds these pointers after the sdk's static relocations are recorded.
479
+ for (let offset = 9 * 4; offset < records.byteLength; offset += 4)
480
+ seed((records.getUint32(offset, true) & ~3) >>> 0)
481
+ }
466
482
  for (
467
483
  let piece = firstAtOrAfter(pieces.ends, address + 1);
468
484
  piece < pieces.starts.length && pieces.starts[piece]! < address + bytes.length;
469
485
  piece++
470
486
  )
471
487
  if (pieces.walked[piece] || !groups[piece]) seeds.push(piece)
488
+ }
472
489
  closeOverData(pieces, eager, seeds)
473
490
 
474
491
  const now: { address: number; bytes: Uint8Array }[] = []
@@ -56,6 +56,7 @@ const postPaintProfileMs = 850
56
56
  interface SwiftStartupPreview {
57
57
  runtimeRoot: string | URL
58
58
  environment: readonly string[]
59
+ arguments?: readonly string[]
59
60
  guest?: { packageName: string; source: string }
60
61
  metadata(origin: string): SwiftEntryModuleArgs | Promise<SwiftEntryModuleArgs>
61
62
  serveAsset(pathname: string, response: ServerResponse): boolean | Promise<boolean>
@@ -165,7 +166,10 @@ export async function splitSwiftApp(
165
166
  ? `-${digest(Buffer.from(JSON.stringify(launch.environment)))}`
166
167
  : ''
167
168
  const guest = launch.guest ? `-${digest(Buffer.from(launch.guest.source))}` : ''
168
- const cache = join(parent, `startup-v7-${platform}${environment}${guest}`)
169
+ const args = launch.arguments?.length
170
+ ? `-argv-${digest(Buffer.from(JSON.stringify(launch.arguments)))}`
171
+ : ''
172
+ const cache = join(parent, `startup-v7-${platform}${environment}${guest}${args}`)
169
173
  return (
170
174
  readSwiftStartupImage(cache) ??
171
175
  (await withStartupWork(bytes, async (work) => {
@@ -465,6 +469,7 @@ export async function bootSwiftPreview(
465
469
  compositorBackend: 'ganesh',
466
470
  }).toString()
467
471
  for (const entry of launch.environment) url.searchParams.append('env', entry)
472
+ for (const arg of launch.arguments ?? []) url.searchParams.append('arg', arg)
468
473
  const page = await browser.newPage()
469
474
  const launchErrors: string[] = []
470
475
  page.on('pageerror', (error) =>