peachsim 0.1.2469 → 0.1.2470

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 (141) hide show
  1. package/cli/bridge-flow-runner.ts +1 -7
  2. package/cli/catalog/meta.ts +2 -0
  3. package/cli/command-agent.ts +2 -0
  4. package/cli/commands/camera.ts +46 -1
  5. package/cli/commands/inspect.ts +19 -8
  6. package/dist-lib/agent-daemon-client.cjs +1 -1
  7. package/dist-lib/agent-events.cjs +1 -1
  8. package/dist-lib/attached-projects.cjs +1 -1
  9. package/dist-lib/auth/shared-session.cjs +1 -1
  10. package/dist-lib/backend-origin.cjs +1 -1
  11. package/dist-lib/beta.cjs +1 -1
  12. package/dist-lib/beta.mjs +2 -2
  13. package/dist-lib/bridge-constants.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.cjs +17 -1
  15. package/dist-lib/bridge-contract-input.mjs +5 -5
  16. package/dist-lib/bridge-contract.cjs +2 -1
  17. package/dist-lib/bridge-contract.mjs +3 -3
  18. package/dist-lib/bundle-channel.cjs +3 -3
  19. package/dist-lib/capture-contract.cjs +1 -1
  20. package/dist-lib/capture-contract.mjs +3 -3
  21. package/dist-lib/cloud-contract.cjs +1 -1
  22. package/dist-lib/cloud-contract.mjs +3 -3
  23. package/dist-lib/cloud-test-args.cjs +1 -1
  24. package/dist-lib/cloud-test-args.mjs +2 -2
  25. package/dist-lib/cloud.cjs +1 -1
  26. package/dist-lib/cloud.mjs +7 -7
  27. package/dist-lib/config.cjs +1 -1
  28. package/dist-lib/config.mjs +5 -5
  29. package/dist-lib/detox/index.cjs +10 -2
  30. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  31. package/dist-lib/esm-chunks/{acorn-RUQOAGI5.mjs → acorn-UYJCU4LQ.mjs} +3 -3
  32. package/dist-lib/esm-chunks/{chunk-R3LJ4ZC3.mjs → chunk-3LUHAGKN.mjs} +3 -3
  33. package/dist-lib/esm-chunks/{chunk-MJGQZB6C.mjs → chunk-5EVI2Q7R.mjs} +11 -11
  34. package/dist-lib/esm-chunks/{chunk-QHM3L2GR.mjs → chunk-62GDPPRK.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-GDWCS6RK.mjs → chunk-63YE3HPT.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-Y54JPUXM.mjs → chunk-ADSOZUR7.mjs} +2 -2
  37. package/dist-lib/esm-chunks/{chunk-LX3ARQQD.mjs → chunk-BAJ5TJJJ.mjs} +2 -1
  38. package/dist-lib/esm-chunks/{chunk-3OY5CI75.mjs → chunk-CZUHIYNB.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-UZ7RN7ZH.mjs → chunk-FEVD526T.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-INFZIWN3.mjs → chunk-JCFAV27Q.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-5WNBQQPT.mjs → chunk-K75XVJ6M.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-3T6R7CTS.mjs → chunk-LI6FJRET.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-GKD52W3V.mjs → chunk-OBHGZUZU.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-LQ73FHTJ.mjs → chunk-Q6BHZLJE.mjs} +19 -3
  45. package/dist-lib/esm-chunks/{chunk-AAGUNFF2.mjs → chunk-RTVCEFGY.mjs} +4 -4
  46. package/dist-lib/esm-chunks/{chunk-ITMBWPDN.mjs → chunk-SBGAGY36.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-TQSZGSCD.mjs → chunk-UATEBCVH.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-IMZPP6SN.mjs → chunk-WYKU357M.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-EBAFY4YY.mjs → chunk-XJBFYM6G.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-KO5PNAZT.mjs → chunk-YHRVFO7U.mjs} +4 -4
  51. package/dist-lib/esm-chunks/{chunk-JATA7AWA.mjs → chunk-ZIO5YODN.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{metro-layout-parser-I7INIBX6.mjs → metro-layout-parser-O4IPDC42.mjs} +3 -3
  53. package/dist-lib/esm-chunks/{swift-package-prebuilt-5HPXIJVD.mjs → swift-package-prebuilt-4M7BXJ3C.mjs} +9 -9
  54. package/dist-lib/esm-chunks/{swift-sdk-app-module-GWKASPDV.mjs → swift-sdk-app-module-LXZCH25K.mjs} +12 -12
  55. package/dist-lib/esm-chunks/{swift-sdk-image-MIDTGKXA.mjs → swift-sdk-image-OMB2EECT.mjs} +12 -12
  56. package/dist-lib/expo-swift-bundle.cjs +2 -2
  57. package/dist-lib/expo-swift-metadata.cjs +1 -1
  58. package/dist-lib/expo-swift-metadata.mjs +7 -7
  59. package/dist-lib/home-paths.cjs +1 -1
  60. package/dist-lib/host/bridge-host.cjs +3 -3
  61. package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  64. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  65. package/dist-lib/host/websocket-proxy.cjs +1 -1
  66. package/dist-lib/index.cjs +9 -1
  67. package/dist-lib/kotlin-host.cjs +1 -1
  68. package/dist-lib/menu.cjs +1 -1
  69. package/dist-lib/menu.mjs +3 -3
  70. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  71. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  72. package/dist-lib/metro-production-bundle.cjs +1 -1
  73. package/dist-lib/metro-production-bundle.mjs +4 -4
  74. package/dist-lib/native-app-identity-project.cjs +1 -1
  75. package/dist-lib/native-app-identity-project.mjs +14 -14
  76. package/dist-lib/native-app-identity.cjs +1 -1
  77. package/dist-lib/native-app-identity.mjs +6 -6
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +3 -3
  80. package/dist-lib/pdfium-raster.cjs +1 -1
  81. package/dist-lib/pdfium-raster.mjs +2 -2
  82. package/dist-lib/plist.cjs +1 -1
  83. package/dist-lib/plist.mjs +3 -3
  84. package/dist-lib/profiles.cjs +1 -1
  85. package/dist-lib/public-brand.cjs +1 -1
  86. package/dist-lib/public-origins-lib-esm.json +78 -75
  87. package/dist-lib/public-origins-lib.json +80 -69
  88. package/dist-lib/react-native-host-modules.cjs +1 -1
  89. package/dist-lib/react-native-host-modules.mjs +2 -2
  90. package/dist-lib/reap-browser.cjs +1 -1
  91. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  92. package/dist-lib/sdk.cjs +7 -1
  93. package/dist-lib/sdk.mjs +7 -7
  94. package/dist-lib/skills.cjs +27 -11
  95. package/dist-lib/swift-compile.cjs +1 -1
  96. package/dist-lib/swift-compile.mjs +9 -9
  97. package/dist-lib/swift-package.cjs +1 -1
  98. package/dist-lib/swift-package.mjs +3 -3
  99. package/dist-lib/swift-submit.cjs +1 -1
  100. package/dist-lib/swift-submit.mjs +5 -5
  101. package/dist-lib/swift-svg-raster.cjs +1 -1
  102. package/dist-lib/swift-svg-raster.mjs +2 -2
  103. package/dist-lib/swift-toolchain.cjs +1 -1
  104. package/dist-lib/swift.cjs +1 -1
  105. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  106. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  108. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  109. package/dist-lib/vendor/acorn.cjs +1 -1
  110. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  111. package/dist-lib/vendor/ignore.cjs +1 -1
  112. package/dist-lib/vendor/magic-string.cjs +1 -1
  113. package/dist-lib/vendor/plist.cjs +1 -1
  114. package/dist-lib/vendor/smol-toml.cjs +1 -1
  115. package/dist-lib/vendor/stream-json.cjs +1 -1
  116. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  117. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  118. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  119. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  120. package/dist-lib/vendor/sucrase.cjs +1 -1
  121. package/dist-lib/vendor/terser.cjs +1 -1
  122. package/dist-lib/vendor/valibot.cjs +1 -1
  123. package/dist-lib/vendor/ws.cjs +1 -1
  124. package/dist-lib/vendor/zod.cjs +1 -1
  125. package/dist-lib/worklet-executable.cjs +1 -1
  126. package/dist-lib/worklet-executable.mjs +3 -3
  127. package/dist-types/packages/peach-engine/src/engine/canvaskit/text.d.ts +1 -0
  128. package/dist-types/packages/peach-engine/src/engine/generated/node-record-contract.d.ts +2 -2
  129. package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -1
  130. package/dist-types/packages/peach-engine/src/engine/remote-display-protocol.d.ts +14 -3
  131. package/dist-types/packages/peach-engine/src/observability/diagnostics-sample.d.ts +2 -1
  132. package/dist-types/packages/peach-engine/src/observability/types.d.ts +7 -0
  133. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +8 -4
  134. package/dist-types/packages/peach-globals/src/cameraInputBridgeContract.d.ts +12 -1
  135. package/dist-types/packages/peach-globals/src/eventBridgeContract.d.ts +2 -0
  136. package/dist-types/packages/peach-globals/src/index.d.ts +5 -2
  137. package/dist-types/packages/peach-globals/src/locationBridgeContract.d.ts +9 -0
  138. package/package.json +1 -1
  139. package/runtime-companion.json +1 -1
  140. package/src/bridge-contract-input.ts +6 -0
  141. package/src/bridge-contract.ts +13 -24
@@ -1,4 +1,4 @@
1
- import type { LogEntry, NetworkEntry } from './types.d.ts';
1
+ import type { LogEntry, NetworkEntry, SessionActivityEntry } from './types.d.ts';
2
2
  export interface DiagnosticsSample {
3
3
  intervalMs: number;
4
4
  fps: number;
@@ -6,5 +6,6 @@ export interface DiagnosticsSample {
6
6
  memoryBytes: number | null;
7
7
  logs: LogEntry[];
8
8
  network: NetworkEntry[];
9
+ activity?: SessionActivityEntry[];
9
10
  }
10
11
  export declare function isDiagnosticsSample(value: unknown): value is DiagnosticsSample;
@@ -33,6 +33,13 @@ export type LogEntry = {
33
33
  stack: string | null;
34
34
  item?: string;
35
35
  };
36
+ export type SessionActivityEntry = {
37
+ id: string;
38
+ ts: number;
39
+ type: 'launch' | 'openUrl';
40
+ url: string | null;
41
+ agent: string | null;
42
+ };
36
43
  export type Store<T extends {
37
44
  id: string;
38
45
  source: string;
@@ -1,7 +1,8 @@
1
1
  export declare const DISPLAY_SERVER_VERSION = 29;
2
2
  export declare const DISPLAY_SERVER_MAJOR = 2;
3
- export declare const DISPLAY_SERVER_MINOR = 43;
4
- export declare const DISPLAY_SERVER_SUBPROTOCOL = "rnx.display-server.v2.wire29.minor43";
3
+ export declare const DISPLAY_SERVER_MINOR = 44;
4
+ export declare const DISPLAY_SERVER_RUNTIME_VERSION_MINOR = 41;
5
+ export declare const DISPLAY_SERVER_SUBPROTOCOL = "rnx.display-server.v2.wire29.minor44";
5
6
  export declare const DISPLAY_SERVER_TOKEN_SUBPROTOCOL_PREFIX = "rnx.sim-token.";
6
7
  export declare const RNX_CLOUD_DISPLAY_GRANT_TTL_MS: number;
7
8
  export declare const RNX_CLOUD_DISPLAY_CLOSE: {
@@ -43,7 +44,7 @@ export declare const DISPLAY_SERVER_LIMITS: {
43
44
  readonly maxGpuWireChunkBytes: 2097152;
44
45
  };
45
46
  export type DisplayServerAppearance = 'light' | 'dark';
46
- export interface RemotePeerIdentity {
47
+ export interface DisplayPeerIdentity {
47
48
  surfaceId: string;
48
49
  appearance: DisplayServerAppearance;
49
50
  deviceProfile: string;
@@ -52,8 +53,12 @@ export interface RemotePeerIdentity {
52
53
  canvasKitBuild: string;
53
54
  fontManifestHash: string;
54
55
  assetManifestHash: string;
56
+ runtimeVersion?: string;
57
+ }
58
+ export interface RemotePeerIdentity extends DisplayPeerIdentity {
55
59
  runtimeVersion: string;
56
60
  }
61
+ export declare function readDisplayPeerIdentity(value: unknown): DisplayPeerIdentity | null;
57
62
  export declare function readRemotePeerIdentity(value: unknown): RemotePeerIdentity | null;
58
63
  export interface CloudDisplayGrantRecord {
59
64
  tokenHash: string;
@@ -65,7 +70,6 @@ export interface OfferedDisplayWire {
65
70
  versions: readonly [major: number, wire: number, minor: number];
66
71
  }
67
72
  export declare function displayWireFromSubprotocols(offered: readonly string[]): OfferedDisplayWire | null;
68
- export declare function displayWireIsNewer(wire: OfferedDisplayWire, other: OfferedDisplayWire): boolean;
69
73
  export declare function displayTokenFromSubprotocols(offered: readonly string[]): string | null;
70
74
  export declare function mintCloudDisplayGrant(now: number): Promise<{
71
75
  authToken: string;
@@ -1,5 +1,16 @@
1
1
  export type SootSimCameraInputMode = 'off' | 'test-pattern' | 'photo' | 'video' | 'webcam';
2
2
  export type SootSimCameraInputMimeType = 'image/jpeg' | 'image/png' | 'image/webp';
3
+ export declare const CAMERA_INPUT_MAX_BYTES = 1048576;
4
+ export declare const CAMERA_INPUT_MAX_EDGE = 2048;
5
+ export type SootSimCameraInputCommand = {
6
+ action: 'status' | 'stop' | 'test-pattern';
7
+ } | {
8
+ action: 'photo';
9
+ mimeType: SootSimCameraInputMimeType;
10
+ data: string;
11
+ label?: string;
12
+ };
13
+ export declare function readCameraInputCommand(value: unknown): SootSimCameraInputCommand | null;
3
14
  export interface SootSimCameraInputState {
4
15
  mode: SootSimCameraInputMode;
5
16
  label?: string;
@@ -20,7 +31,7 @@ export type SootSimCameraInputPayload = {
20
31
  export interface SootSimCameraInputBridge {
21
32
  get(): SootSimCameraInputState;
22
33
  setTestPattern(): SootSimCameraInputState;
23
- setFrame(frame: SootSimCameraInputFrame): SootSimCameraInputState;
34
+ setFrame(frame: SootSimCameraInputFrame): Promise<SootSimCameraInputState>;
24
35
  clear(): SootSimCameraInputState;
25
36
  subscribe(listener: (state: SootSimCameraInputState) => void): () => void;
26
37
  }
@@ -199,3 +199,5 @@ export interface SootsimEventMap {
199
199
  export type SootsimEventName = keyof SootsimEventMap;
200
200
  export declare function dispatchSootsimEvent<K extends SootsimEventName>(name: K, detail: SootsimEventMap[K], target?: EventTarget): void;
201
201
  export declare function listenSootsimEvent<K extends SootsimEventName>(name: K, handler: (detail: SootsimEventMap[K]) => void, target?: EventTarget): () => void;
202
+ export type DeviceHardwareAction = 'shake' | 'ring' | 'silent';
203
+ export declare function isDeviceHardwareAction(value: unknown): value is DeviceHardwareAction;
@@ -6,6 +6,7 @@ export type { Emitter, SootSimChrome, SootSimBridges, SootSimEngineSnapshot, Soo
6
6
  export { SOOTSIM_NATIVE_PUBLIC_INSTANCE, isSootSimNativePublicInstance, withSootSimNativePublicInstanceTags, } from './nativeViewContract.d.ts';
7
7
  export type { NativeViewMeasureMode, NativeViewMeasure, PeachNativeWorkletEventDispatcher, SootSimNativePublicInstance, NumericTextPaintRequest, } from './nativeViewContract.d.ts';
8
8
  export { SOOTSIM_BOOT_STAGE_ORDER, SOOTSIM_TENANT_READY_MARK, SOOTSIM_BOOT_MARKS_GLOBAL, dispatchSootsimEvent, listenSootsimEvent, } from './eventBridgeContract.d.ts';
9
+ export { isDeviceHardwareAction, type DeviceHardwareAction, } from './eventBridgeContract.d.ts';
9
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';
10
11
  export type { SootSimTestQueryFilter, SootSimTextCandidatesOptions, SootSimTextCandidate, SootSimTextCandidatesResult, SootSimDumpTreeOptions, SootSimInspectPointOptions, SootSimTapTargetOptions, SootSimListInspectableOptions, SootSimRequestEntry, SootSimRequestCounts, SootSimTestBridge, SootSimTestBridgeMethod, SootSimTestBridgeArgs, SootSimTestBridgeResult, } from './testBridgeContract.d.ts';
11
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';
@@ -41,8 +42,10 @@ export type { SootSimLaunchArguments, SootSimExternalAppLifecycleOptions, SootSi
41
42
  export { maestroSelectorMatcher } from './maestro-selector.d.ts';
42
43
  export { PEACH_FINAL_LAUNCH_GLOBAL, PEACH_RELOAD_APP_BRIDGE_PATH, } from './appLifecycleBridgeContract.d.ts';
43
44
  export type { SootSimSettingsBridge } from './settingsBridgeContract.d.ts';
44
- export type { SootSimCameraInputMode, SootSimCameraInputMimeType, SootSimCameraInputState, SootSimCameraInputFrame, SootSimCameraInputPayload, SootSimCameraInputBridge, } from './cameraInputBridgeContract.d.ts';
45
- export type { SootSimLocationFix, SootSimLocationResult, SootSimLocationBridge, } from './locationBridgeContract.d.ts';
45
+ export type { SootSimCameraInputCommand, SootSimCameraInputMode, SootSimCameraInputMimeType, SootSimCameraInputState, SootSimCameraInputFrame, SootSimCameraInputPayload, SootSimCameraInputBridge, } from './cameraInputBridgeContract.d.ts';
46
+ export { CAMERA_INPUT_MAX_BYTES, CAMERA_INPUT_MAX_EDGE, readCameraInputCommand, } from './cameraInputBridgeContract.d.ts';
47
+ export type { SootSimLocationCommand, SootSimLocationFix, SootSimLocationResult, SootSimLocationBridge, } from './locationBridgeContract.d.ts';
48
+ export { isValidLocationFix, readSimulatedLocationCommand, } from './locationBridgeContract.d.ts';
46
49
  export { SOOTSIM_CAPTURE_IMAGE_QUALITY, sootsimCaptureIsFlat, } from './captureBridgeContract.d.ts';
47
50
  export type { SootSimCaptureFilter, SootSimCaptureOptions } from './captureBridgeContract.d.ts';
48
51
  export { SOOTSIM_TIMELINE_KINDS, isTimelineKind, isTimelineEvent, } from './timelineBridgeContract.d.ts';
@@ -18,3 +18,12 @@ export interface SootSimLocationBridge {
18
18
  clear(): SootSimLocationResult;
19
19
  subscribe(listener: (status: SootSimLocationResult) => void): () => void;
20
20
  }
21
+ export type SootSimLocationCommand = ({
22
+ action: 'set';
23
+ } & SootSimLocationFix) | {
24
+ action: 'clear';
25
+ } | {
26
+ action: 'get';
27
+ };
28
+ export declare function isValidLocationFix(value: unknown): value is SootSimLocationFix;
29
+ export declare function readSimulatedLocationCommand(value: unknown): SootSimLocationCommand | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2469",
3
+ "version": "0.1.2470",
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",
@@ -1 +1 @@
1
- {"abi":1,"sha256":"ccccb88de85b136640e26a11829ae110f023a06499947b513105951c7d6aae0f","file":"node/cli-ccccb88de85b136640e26a11829ae110f023a06499947b513105951c7d6aae0f.cjs"}
1
+ {"abi":1,"sha256":"e7f1c9e8915dde6d33182604db7b13e169aa5c1b29cbe8f575b24818535e0b9f","file":"node/cli-e7f1c9e8915dde6d33182604db7b13e169aa5c1b29cbe8f575b24818535e0b9f.cjs"}
@@ -1,3 +1,4 @@
1
+ import { isDeviceHardwareAction } from '@peach/globals'
1
2
  import { SIM_LONG_PRESS_MAX_MS } from './bridge-contract'
2
3
  import { isRecord } from './is-record'
3
4
  // untrusted JSON -> bridge-contract argument. one owner for that conversion, so
@@ -353,6 +354,11 @@ export function parsePerformStep(value: unknown, index: number): SimPerformStep
353
354
  }
354
355
  case 'deviceInfo':
355
356
  return { type }
357
+ case 'deviceHardware':
358
+ if (!isDeviceHardwareAction(step.action)) {
359
+ validationFailure(`${path}.action`, 'must be shake, ring or silent')
360
+ }
361
+ return { type, action: step.action }
356
362
  case 'buttonDown':
357
363
  case 'buttonUp': {
358
364
  const button =
@@ -9,6 +9,7 @@
9
9
  // this is the direction that ships.
10
10
 
11
11
  import type {
12
+ DeviceHardwareAction,
12
13
  SystemPermissionKind,
13
14
  SystemPermissionStatus,
14
15
  PeachAccessibilityNode,
@@ -16,9 +17,14 @@ import type {
16
17
  SootSimAgentActionDetail,
17
18
  SootSimAgentIdentity,
18
19
  SootSimCaptureFilter,
20
+ SootSimCameraInputCommand,
21
+ SootSimCameraInputState,
19
22
  SootSimExternalAppLifecycleOptions,
20
23
  SootSimFocusedNodeInfo,
21
24
  SootSimInspectInfo,
25
+ SootSimLocationCommand,
26
+ SootSimLocationFix,
27
+ SootSimLocationResult,
22
28
  SootSimNodeInfo,
23
29
  SootSimRecorderBridge,
24
30
  SootSimReplayTarget,
@@ -311,6 +317,7 @@ export type PerformStep =
311
317
  | { type: 'keyUp'; key: string }
312
318
  | { type: 'setOrientation'; orientation: 'portrait' | 'landscape' }
313
319
  | { type: 'deviceInfo' }
320
+ | { type: 'deviceHardware'; action: DeviceHardwareAction }
314
321
  // refused with a named reason, never emulated: no hardware-button model,
315
322
  // no storekit simulation, no stepper primitive, and key/orientation state
316
323
  // the engine does not hold.
@@ -417,6 +424,7 @@ export function performStepRefusal(type: PerformStep['type']): string | null {
417
424
  case 'toggleKeyboard':
418
425
  case 'openUrl':
419
426
  case 'deviceInfo':
427
+ case 'deviceHardware':
420
428
  case 'wait':
421
429
  case 'waitFor':
422
430
  return null
@@ -764,13 +772,13 @@ export interface CameraPlayOptions {
764
772
 
765
773
  export type CameraCommand =
766
774
  | ({ action: 'play' } & CameraPlayOptions)
767
- | { action: 'stop' }
768
- | { action: 'status' }
775
+ | SootSimCameraInputCommand
769
776
 
770
777
  export interface CameraResult {
771
778
  ok: boolean
772
779
  // 'live' = real getUserMedia, 'fixture' = injected video, 'idle' = no session
773
780
  source: 'live' | 'fixture' | 'idle'
781
+ input?: SootSimCameraInputState
774
782
  url?: string
775
783
  loop?: boolean
776
784
  rate?: number
@@ -787,28 +795,9 @@ export interface CameraResult {
787
795
  // to forward to the host browser's real navigator.geolocation (leaking the
788
796
  // operator's real position). a cleared device reports iOS's own default, not
789
797
  // an empty/pending state invented here.
790
- export interface LocationFix {
791
- latitude: number
792
- longitude: number
793
- altitude?: number
794
- accuracy?: number
795
- heading?: number
796
- speed?: number
797
- }
798
-
799
- export type LocationCommand =
800
- | ({ action: 'set' } & LocationFix)
801
- | { action: 'clear' }
802
- | { action: 'get' }
803
-
804
- export interface LocationResult {
805
- ok: boolean
806
- // 'custom' = an app or `peach location set` chose this fix, 'default' = iOS's
807
- // own un-set simulator location
808
- source: 'custom' | 'default'
809
- fix?: LocationFix
810
- error?: string
811
- }
798
+ export type LocationFix = SootSimLocationFix
799
+ export type LocationCommand = SootSimLocationCommand
800
+ export type LocationResult = SootSimLocationResult
812
801
 
813
802
  // commands that change what a sim shows or runs must respect the cli lease.
814
803
  // observational/lifecycle commands pass through the host without taking or