peachsim 0.1.2469 → 0.1.2471

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 (147) 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/agent.ts +4 -5
  5. package/cli/commands/camera.ts +46 -1
  6. package/cli/commands/inspect.ts +19 -8
  7. package/dist-lib/agent-daemon-client.cjs +3 -3
  8. package/dist-lib/agent-events.cjs +1 -1
  9. package/dist-lib/attached-projects.cjs +1 -1
  10. package/dist-lib/auth/shared-session.cjs +1 -1
  11. package/dist-lib/backend-origin.cjs +1 -1
  12. package/dist-lib/beta.cjs +1 -1
  13. package/dist-lib/beta.mjs +2 -2
  14. package/dist-lib/bridge-constants.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.cjs +17 -1
  16. package/dist-lib/bridge-contract-input.mjs +5 -5
  17. package/dist-lib/bridge-contract.cjs +2 -1
  18. package/dist-lib/bridge-contract.mjs +3 -3
  19. package/dist-lib/bundle-channel.cjs +8 -7
  20. package/dist-lib/capture-contract.cjs +1 -1
  21. package/dist-lib/capture-contract.mjs +3 -3
  22. package/dist-lib/cloud-contract.cjs +1 -1
  23. package/dist-lib/cloud-contract.mjs +3 -3
  24. package/dist-lib/cloud-test-args.cjs +1 -1
  25. package/dist-lib/cloud-test-args.mjs +2 -2
  26. package/dist-lib/cloud.cjs +1 -1
  27. package/dist-lib/cloud.mjs +7 -7
  28. package/dist-lib/config.cjs +1 -1
  29. package/dist-lib/config.mjs +5 -5
  30. package/dist-lib/detox/index.cjs +10 -2
  31. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  32. package/dist-lib/esm-chunks/{acorn-RUQOAGI5.mjs → acorn-SPB3XIZL.mjs} +3 -3
  33. package/dist-lib/esm-chunks/{chunk-5WNBQQPT.mjs → chunk-2MCZICO7.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-AAGUNFF2.mjs → chunk-36XXBAOZ.mjs} +4 -4
  35. package/dist-lib/esm-chunks/{chunk-3T6R7CTS.mjs → chunk-AQOQVXJ6.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-KO5PNAZT.mjs → chunk-CJ32VJRI.mjs} +4 -4
  37. package/dist-lib/esm-chunks/{chunk-QHM3L2GR.mjs → chunk-DPIPUFHI.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-GDWCS6RK.mjs → chunk-FBMOHCA6.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-INFZIWN3.mjs → chunk-FD2YXUSF.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-EBAFY4YY.mjs → chunk-GAIO63UI.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-LQ73FHTJ.mjs → chunk-GH5CVSUV.mjs} +19 -3
  42. package/dist-lib/esm-chunks/{chunk-LX3ARQQD.mjs → chunk-IHURNHG6.mjs} +2 -1
  43. package/dist-lib/esm-chunks/{chunk-3OY5CI75.mjs → chunk-JR3HW7JO.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-GKD52W3V.mjs → chunk-LBYHNL4Y.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-JATA7AWA.mjs → chunk-LNKA7KWU.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-MJGQZB6C.mjs → chunk-LYDOPEBO.mjs} +14 -13
  47. package/dist-lib/esm-chunks/{chunk-TQSZGSCD.mjs → chunk-M2RQMFY6.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-ITMBWPDN.mjs → chunk-MQFECF27.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-UZ7RN7ZH.mjs → chunk-NPWFUWK7.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-Y54JPUXM.mjs → chunk-PYJSA7I6.mjs} +2 -2
  51. package/dist-lib/esm-chunks/{chunk-IMZPP6SN.mjs → chunk-QPYS2KN6.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{chunk-R3LJ4ZC3.mjs → chunk-UFL4EVBK.mjs} +3 -3
  53. package/dist-lib/esm-chunks/{metro-layout-parser-I7INIBX6.mjs → metro-layout-parser-AFD6SXWJ.mjs} +3 -3
  54. package/dist-lib/esm-chunks/{swift-package-prebuilt-5HPXIJVD.mjs → swift-package-prebuilt-SD73WIK2.mjs} +9 -9
  55. package/dist-lib/esm-chunks/{swift-sdk-app-module-GWKASPDV.mjs → swift-sdk-app-module-RMAM2IZO.mjs} +12 -12
  56. package/dist-lib/esm-chunks/{swift-sdk-image-MIDTGKXA.mjs → swift-sdk-image-6LMFQKBB.mjs} +12 -12
  57. package/dist-lib/expo-swift-bundle.cjs +6 -5
  58. package/dist-lib/expo-swift-metadata.cjs +1 -1
  59. package/dist-lib/expo-swift-metadata.mjs +7 -7
  60. package/dist-lib/home-paths.cjs +1 -1
  61. package/dist-lib/host/bridge-host.cjs +47 -14
  62. package/dist-lib/host/fetch-proxy-handler.cjs +5 -5
  63. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  64. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  65. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  66. package/dist-lib/host/websocket-proxy.cjs +1 -1
  67. package/dist-lib/index.cjs +9 -1
  68. package/dist-lib/kotlin-host.cjs +1 -1
  69. package/dist-lib/menu.cjs +1 -1
  70. package/dist-lib/menu.mjs +3 -3
  71. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  72. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  73. package/dist-lib/metro-production-bundle.cjs +1 -1
  74. package/dist-lib/metro-production-bundle.mjs +4 -4
  75. package/dist-lib/native-app-identity-project.cjs +2 -2
  76. package/dist-lib/native-app-identity-project.mjs +14 -14
  77. package/dist-lib/native-app-identity.cjs +1 -1
  78. package/dist-lib/native-app-identity.mjs +6 -6
  79. package/dist-lib/native-firebase-metadata.cjs +1 -1
  80. package/dist-lib/native-firebase-metadata.mjs +3 -3
  81. package/dist-lib/pdfium-raster.cjs +1 -1
  82. package/dist-lib/pdfium-raster.mjs +2 -2
  83. package/dist-lib/plist.cjs +1 -1
  84. package/dist-lib/plist.mjs +3 -3
  85. package/dist-lib/profiles.cjs +1 -1
  86. package/dist-lib/public-brand.cjs +1 -1
  87. package/dist-lib/public-origins-lib-esm.json +78 -75
  88. package/dist-lib/public-origins-lib.json +80 -69
  89. package/dist-lib/react-native-host-modules.cjs +1 -1
  90. package/dist-lib/react-native-host-modules.mjs +2 -2
  91. package/dist-lib/reap-browser.cjs +1 -1
  92. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  93. package/dist-lib/sdk.cjs +7 -1
  94. package/dist-lib/sdk.mjs +7 -7
  95. package/dist-lib/skills.cjs +72 -23
  96. package/dist-lib/swift-compile.cjs +4 -3
  97. package/dist-lib/swift-compile.mjs +9 -9
  98. package/dist-lib/swift-package.cjs +1 -1
  99. package/dist-lib/swift-package.mjs +3 -3
  100. package/dist-lib/swift-submit.cjs +1 -1
  101. package/dist-lib/swift-submit.mjs +5 -5
  102. package/dist-lib/swift-svg-raster.cjs +1 -1
  103. package/dist-lib/swift-svg-raster.mjs +2 -2
  104. package/dist-lib/swift-toolchain.cjs +1 -1
  105. package/dist-lib/swift.cjs +1 -1
  106. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  108. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  109. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  110. package/dist-lib/vendor/acorn.cjs +1 -1
  111. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  112. package/dist-lib/vendor/ignore.cjs +1 -1
  113. package/dist-lib/vendor/magic-string.cjs +1 -1
  114. package/dist-lib/vendor/plist.cjs +1 -1
  115. package/dist-lib/vendor/smol-toml.cjs +1 -1
  116. package/dist-lib/vendor/stream-json.cjs +1 -1
  117. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  118. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  119. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  120. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  121. package/dist-lib/vendor/sucrase.cjs +1 -1
  122. package/dist-lib/vendor/terser.cjs +1 -1
  123. package/dist-lib/vendor/valibot.cjs +1 -1
  124. package/dist-lib/vendor/ws.cjs +1 -1
  125. package/dist-lib/vendor/zod.cjs +1 -1
  126. package/dist-lib/worklet-executable.cjs +1 -1
  127. package/dist-lib/worklet-executable.mjs +3 -3
  128. package/dist-types/packages/peach-engine/src/engine/canvaskit/text.d.ts +1 -0
  129. package/dist-types/packages/peach-engine/src/engine/generated/node-record-contract.d.ts +2 -2
  130. package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -1
  131. package/dist-types/packages/peach-engine/src/engine/remote-display-protocol.d.ts +15 -3
  132. package/dist-types/packages/peach-engine/src/observability/diagnostics-sample.d.ts +2 -1
  133. package/dist-types/packages/peach-engine/src/observability/types.d.ts +7 -0
  134. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +8 -4
  135. package/dist-types/packages/peach-globals/src/cameraInputBridgeContract.d.ts +12 -1
  136. package/dist-types/packages/peach-globals/src/eventBridgeContract.d.ts +2 -0
  137. package/dist-types/packages/peach-globals/src/index.d.ts +5 -2
  138. package/dist-types/packages/peach-globals/src/locationBridgeContract.d.ts +9 -0
  139. package/package.json +1 -1
  140. package/runtime-companion.json +1 -1
  141. package/src/agent-daemon-client.ts +3 -1
  142. package/src/agent-prompt.ts +7 -0
  143. package/src/bridge-contract-input.ts +6 -0
  144. package/src/bridge-contract.ts +13 -24
  145. package/src/canvas-agent-note-delivery.ts +16 -9
  146. package/src/case-insensitive-header-overlay.ts +4 -1
  147. package/src/host/agent-host.ts +40 -13
@@ -1,12 +1,12 @@
1
- /*! peach v0.1.2469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  parse
4
- } from "./esm-chunks/chunk-QHM3L2GR.mjs";
4
+ } from "./esm-chunks/chunk-DPIPUFHI.mjs";
5
5
  import {
6
6
  __privateAdd,
7
7
  __privateGet,
8
8
  __publicField
9
- } from "./esm-chunks/chunk-5WNBQQPT.mjs";
9
+ } from "./esm-chunks/chunk-2MCZICO7.mjs";
10
10
 
11
11
  // src/worklet-kernel.ts
12
12
  var Unsupported = class extends Error {
@@ -326,6 +326,7 @@ export interface TextStyle {
326
326
  foregroundColor?: InputColor;
327
327
  heightMultiplier?: number;
328
328
  halfLeading?: boolean;
329
+ androidLinearText?: boolean;
329
330
  letterSpacing?: number;
330
331
  locale?: string;
331
332
  shadows?: TextShadow[];
@@ -66,7 +66,7 @@ export declare const NODE_COLUMN: {
66
66
  readonly kRefreshHolding: 64;
67
67
  readonly kRefreshPullProgress: 65;
68
68
  readonly kImageMipmapped: 66;
69
- readonly kReserved67: 67;
69
+ readonly kAndroidLinearText: 67;
70
70
  readonly kShellOverlayRegion: 68;
71
71
  readonly kShellTestBridgeSurface: 69;
72
72
  readonly kTextLayoutKey: 70;
@@ -96,5 +96,5 @@ export declare const NODE_RECORD_EFFECT: {
96
96
  readonly hidden: 32;
97
97
  readonly clipped: 64;
98
98
  };
99
- export declare const NODE_SCALAR_FIELDS: readonly [readonly ['_wireRevision', 0, 'number', 'none'], readonly ['_wireSubtreeRevision', 1, 'number', 'none'], readonly ['_wireContentRevision', 2, 'number', 'none'], readonly ['_wireShapeRevision', 3, 'number', 'none'], readonly ['_styleEpoch', 4, 'number', 'none'], readonly ['_subtreeStyleEpoch', 5, 'number', 'none'], readonly ['_frameRevision', 6, 'number', 'none'], readonly ['_subtreeFrameEpoch', 7, 'number', 'none'], readonly ['_scrollOffsetX', 8, 'number', 'none'], readonly ['_scrollOffsetY', 9, 'number', 'none'], readonly ['_scrollPresentationDisplacementY', 10, 'number', 'none'], readonly ['_heldLargeTitleInsetReduction', 11, 'number', 'none'], readonly ['_hiddenValue', 18, 'boolean', 'hidden'], readonly ['_clippedSubview', 19, 'boolean', 'clipped'], readonly ['_clippingApplied', 20, 'boolean', 'none'], readonly ['_promotedLayer', 24, 'boolean', 'promoted'], readonly ['selectionStart', 26, 'nullableNumber', 'selection'], readonly ['selectionEnd', 27, 'nullableNumber', 'selection'], readonly ['selectionHandlesHidden', 28, 'boolean', 'selection'], readonly ['selectionTrailingHandleClipped', 29, 'inheritedBoolean', 'selection'], readonly ['_textLayoutRevision', 39, 'number', 'none'], readonly ['_receivedTextLayoutRevision', 40, 'nullableNumber', 'none'], readonly ['_adoptedSharedLayout', 41, 'boolean', 'none'], readonly ['_textFontScale', 42, 'nullableNumber', 'none'], readonly ['_accessibilityTextScale', 43, 'nullableNumber', 'none'], readonly ['_accessibilityBoldText', 44, 'nullableBoolean', 'none'], readonly ['_scrollRuntimeContentWidth', 51, 'unknownNumber', 'none'], readonly ['_scrollRuntimeContentHeight', 52, 'unknownNumber', 'none'], readonly ['_layoutSlot', 57, 'optionalNumber', 'none'], readonly ['_contentEpoch', 58, 'number', 'none'], readonly ['_treeContentShiftX', 59, 'optionalNumber', 'none'], readonly ['_treeContentShiftY', 60, 'optionalNumber', 'none'], readonly ['_lastOnTextLayoutDispatchedSignature', 61, 'nullableString', 'none'], readonly ['_onLayoutDispatchScheduled', 62, 'boolean', 'none'], readonly ['_refreshHolding', 64, 'optionalNullableBoolean', 'refresh'], readonly ['_refreshPullProgress', 65, 'optionalNumber', 'refresh'], readonly ['_skImageMipmapped', 66, 'optionalBoolean', 'none'], readonly ['_shellOverlayRegion', 68, 'boolean', 'none'], readonly ['_shellTestBridgeSurface', 69, 'boolean', 'none'], readonly ['_textLayoutKey', 70, 'nullableString', 'none'], readonly ['_interfaceStyle', 71, 'colorScheme', 'paintInputs'], readonly ['__lastBackdropSig', 72, 'optionalString', 'none'], readonly ['nativeRenderer', 74, 'renderer', 'none'], readonly ['fabricTextEpsilon', 75, 'epsilon', 'none'], readonly ['svgCurrentColorUsesPaintOpacity', 76, 'boolean', 'none'], readonly ['__surfaceId', 83, 'optionalString', 'none'], readonly ['__surfaceGeneration', 84, 'optionalNumber', 'none']];
99
+ export declare const NODE_SCALAR_FIELDS: readonly [readonly ['_wireRevision', 0, 'number', 'none'], readonly ['_wireSubtreeRevision', 1, 'number', 'none'], readonly ['_wireContentRevision', 2, 'number', 'none'], readonly ['_wireShapeRevision', 3, 'number', 'none'], readonly ['_styleEpoch', 4, 'number', 'none'], readonly ['_subtreeStyleEpoch', 5, 'number', 'none'], readonly ['_frameRevision', 6, 'number', 'none'], readonly ['_subtreeFrameEpoch', 7, 'number', 'none'], readonly ['_scrollOffsetX', 8, 'number', 'none'], readonly ['_scrollOffsetY', 9, 'number', 'none'], readonly ['_scrollPresentationDisplacementY', 10, 'number', 'none'], readonly ['_heldLargeTitleInsetReduction', 11, 'number', 'none'], readonly ['_hiddenValue', 18, 'boolean', 'hidden'], readonly ['_clippedSubview', 19, 'boolean', 'clipped'], readonly ['_clippingApplied', 20, 'boolean', 'none'], readonly ['_promotedLayer', 24, 'boolean', 'promoted'], readonly ['selectionStart', 26, 'nullableNumber', 'selection'], readonly ['selectionEnd', 27, 'nullableNumber', 'selection'], readonly ['selectionHandlesHidden', 28, 'boolean', 'selection'], readonly ['selectionTrailingHandleClipped', 29, 'inheritedBoolean', 'selection'], readonly ['_textLayoutRevision', 39, 'number', 'none'], readonly ['_receivedTextLayoutRevision', 40, 'nullableNumber', 'none'], readonly ['_adoptedSharedLayout', 41, 'boolean', 'none'], readonly ['_textFontScale', 42, 'nullableNumber', 'none'], readonly ['_accessibilityTextScale', 43, 'nullableNumber', 'none'], readonly ['_accessibilityBoldText', 44, 'nullableBoolean', 'none'], readonly ['_scrollRuntimeContentWidth', 51, 'unknownNumber', 'none'], readonly ['_scrollRuntimeContentHeight', 52, 'unknownNumber', 'none'], readonly ['_layoutSlot', 57, 'optionalNumber', 'none'], readonly ['_contentEpoch', 58, 'number', 'none'], readonly ['_treeContentShiftX', 59, 'optionalNumber', 'none'], readonly ['_treeContentShiftY', 60, 'optionalNumber', 'none'], readonly ['_lastOnTextLayoutDispatchedSignature', 61, 'nullableString', 'none'], readonly ['_onLayoutDispatchScheduled', 62, 'boolean', 'none'], readonly ['_refreshHolding', 64, 'optionalNullableBoolean', 'refresh'], readonly ['_refreshPullProgress', 65, 'optionalNumber', 'refresh'], readonly ['_skImageMipmapped', 66, 'optionalBoolean', 'none'], readonly ['androidLinearText', 67, 'boolean', 'none'], readonly ['_shellOverlayRegion', 68, 'boolean', 'none'], readonly ['_shellTestBridgeSurface', 69, 'boolean', 'none'], readonly ['_textLayoutKey', 70, 'nullableString', 'none'], readonly ['_interfaceStyle', 71, 'colorScheme', 'paintInputs'], readonly ['__lastBackdropSig', 72, 'optionalString', 'none'], readonly ['nativeRenderer', 74, 'renderer', 'none'], readonly ['fabricTextEpsilon', 75, 'epsilon', 'none'], readonly ['svgCurrentColorUsesPaintOpacity', 76, 'boolean', 'none'], readonly ['__surfaceId', 83, 'optionalString', 'none'], readonly ['__surfaceGeneration', 84, 'optionalNumber', 'none']];
100
100
  export declare const NODE_RECORD_READS: readonly [readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['boolean', 'dense', 0], readonly ['negative', 'dense', 0], readonly ['negative', 'dense', 0], readonly ['boolean', 'dense', 0], readonly ['number', 'dense', 0], readonly ['boolean', 'dense', 0], readonly ['boolean', 'dense', 0], readonly ['boolean', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['boolean', 'dense', 0], readonly ['number', 'dense', 0], readonly ['nullableNumber', 'dense', 0], readonly ['nullableNumber', 'dense', 0], readonly ['boolean', 'dense', 0], readonly ['inheritedBoolean', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['nullableNumber', 'dense', 0], readonly ['number', 'dense', 0], readonly ['nullableNumber', 'dense', 0], readonly ['nullableNumber', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['nullableNumber', 'dense', 0], readonly ['boolean', 'dense', 0], readonly ['nullableNumber', 'dense', 0], readonly ['nullableNumber', 'dense', 0], readonly ['nullableBoolean', 'dense', 0], readonly ['nullableNumber', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['number', 'dense', 0], readonly ['nullableNumber', 'dense', 0], readonly ['number', 'dense', 0], readonly ['unknownNumber', 'dense', 0], readonly ['unknownNumber', 'dense', 0], readonly ['number', 'dense', 0], readonly ['unknownNumber', 'dense', 0], readonly ['unknownNumber', 'dense', 0], readonly ['number', 'dense', 0], readonly ['optionalNumber', 'dense', 0], readonly ['number', 'sparse', 0], readonly ['optionalNumber', 'sparse', 0], readonly ['optionalNumber', 'sparse', 0], readonly ['nullableString', 'text', 0], readonly ['boolean', 'packed', 0], readonly ['boolean', 'packed', 1], readonly ['optionalNullableBoolean', 'packed', 2], readonly ['optionalNumber', 'sparse', 0], readonly ['optionalBoolean', 'packed', 4], readonly ['boolean', 'packed', 6], readonly ['boolean', 'packed', 7], readonly ['boolean', 'packed', 8], readonly ['nullableString', 'text', 0], readonly ['colorScheme', 'packed', 9], readonly ['optionalString', 'text', 0], readonly ['boolean', 'packed', 11], readonly ['renderer', 'packed', 12], readonly ['epsilon', 'packed', 14], readonly ['boolean', 'packed', 13], readonly ['optionalNumber', 'sparse', 0], readonly ['optionalNumber', 'sparse', 0], readonly ['number', 'sparse', 0], readonly ['number', 'sparse', 0], readonly ['number', 'sparse', 0], readonly ['number', 'sparse', 0], readonly ['optionalString', 'text', 0], readonly ['optionalNumber', 'sparse', 0], readonly ['optionalNumber', 'sparse', 0]];
@@ -235,7 +235,7 @@ export declare class SootSimNode extends NativeNodeRecord {
235
235
  constructor(type: SootSimNodeType | NodeAttachment, props?: Props, nativeRenderer?: NativeRenderer, fabricTextEpsilon?: number, resolvedStyle?: SootSimStyle, svgCurrentColorUsesPaintOpacity?: boolean, host?: {
236
236
  type: string;
237
237
  guest?: GuestReferences;
238
- });
238
+ }, androidLinearText?: boolean);
239
239
  }
240
240
  export declare class SootSimTextNode extends NativeNodeRecord {
241
241
  _hidden: boolean;
@@ -1,3 +1,4 @@
1
+ import { type DeviceHardwareAction } from '../../../peach-globals/src/index.d.ts';
1
2
  import { type DiagnosticsSample } from '../observability/diagnostics-sample.d.ts';
2
3
  import { type NativeUIEvent, type NativeUIRequest } from '../render-worker/native-ui-protocol.d.ts';
3
4
  import { type PointerSample } from '../render-worker/pointerSampleContract.d.ts';
@@ -30,6 +31,7 @@ export declare const DISPLAY_SERVER_DEVICE_CONFIGURATION_MINOR = 30;
30
31
  export declare const DISPLAY_SERVER_DEVICE_LOCATION_MINOR = 36;
31
32
  export declare const DISPLAY_SERVER_DEVICE_CAMERA_MINOR = 37;
32
33
  export declare const DISPLAY_SERVER_DEVICE_CONTROL_MINOR = 38;
34
+ export declare const DISPLAY_SERVER_DEVICE_APP_STATE_MINOR = 44;
33
35
  export declare const DISPLAY_SERVER_SEMANTIC_QUERY_MINOR = 40;
34
36
  export declare const DISPLAY_SERVER_DIAGNOSTICS_MINOR = 33;
35
37
  export declare const DISPLAY_SERVER_EDGE_SWIPE_MINOR = 9;
@@ -120,6 +122,7 @@ export declare const DISPLAY_SERVER_KIND: {
120
122
  readonly gpuWireRenderer: 46;
121
123
  readonly gpuWireResult: 47;
122
124
  readonly gpuWirePresented: 48;
125
+ readonly deviceAppState: 49;
123
126
  };
124
127
  export type DisplayServerKind = (typeof DISPLAY_SERVER_KIND)[keyof typeof DISPLAY_SERVER_KIND];
125
128
  export type DisplayServerRole = 'engine' | 'compositor';
@@ -456,7 +459,7 @@ export interface DisplayServerDeviceCamera {
456
459
  height: number;
457
460
  bytes: Uint8Array;
458
461
  }
459
- export type DisplayServerHardwareAction = 'shake' | 'ring' | 'silent';
462
+ export type DisplayServerHardwareAction = DeviceHardwareAction;
460
463
  export interface DisplayServerDeviceOpenUrl {
461
464
  kind: 'deviceOpenUrl';
462
465
  seq: number;
@@ -489,6 +492,14 @@ export interface DisplayServerDeviceHardware {
489
492
  epoch: number;
490
493
  action: DisplayServerHardwareAction;
491
494
  }
495
+ declare const DEVICE_APP_STATES: readonly ['active', 'inactive', 'background'];
496
+ export interface DisplayServerDeviceAppState {
497
+ kind: 'deviceAppState';
498
+ seq: number;
499
+ epoch: number;
500
+ state: (typeof DEVICE_APP_STATES)[number];
501
+ focused: boolean;
502
+ }
492
503
  export interface DisplayServerDeviceState {
493
504
  kind: 'deviceState';
494
505
  seq: number;
@@ -613,8 +624,8 @@ export interface DisplayServerGpuWirePresented {
613
624
  epoch: number;
614
625
  presented: number;
615
626
  }
616
- export type DisplayServerMessage = DisplayServerGpuWire | DisplayServerGpuWireResult | DisplayServerGpuWireRenderer | DisplayServerGpuWirePresented | DisplayServerHeartbeat | DisplayServerDiagnosticsRequest | DisplayServerDiagnostics | DisplayServerInputGranted | DisplayServerInputRequest | DisplayServerInputRevoked | DisplayServerInputProcessed | DisplayServerAppMotion | DisplayServerLiveFrame | DisplayServerLiveFrameAck | DisplayServerHello | DisplayServerReject | DisplayServerSceneCommit | DisplayServerResyncRequest | DisplayServerAppliedAck | DisplayServerPaintedAck | DisplayServerPointer | DisplayServerWheel | DisplayServerKeyboard | DisplayServerFontRegister | DisplayServerAssetRegister | DisplayServerScrollRegistry | DisplayServerScrollControl | DisplayServerImageLifecycle | DisplayServerAgentAction | DisplayServerTextInputState | DisplayServerAppInterfacePoses | DisplayServerTextInputEdit | DisplayServerLottieIntent | DisplayServerLottieLifecycle | DisplayServerNativeUIRequest | DisplayServerNativeUIEvent | DisplayServerDeviceConfiguration | DisplayServerDeviceLocation | DisplayServerDeviceCamera | DisplayServerDeviceOpenUrl | DisplayServerDeviceHardware | DisplayServerSemanticQuery | DisplayServerSemanticResult | DisplayServerDeviceState | DisplayServerDuoFold | DisplayServerEdgeSwipeRegister | DisplayServerEdgeSwipeUnregister | DisplayServerEdgeSwipeCommit;
617
- export type DisplayServerInputMessage = DisplayServerHeartbeat | DisplayServerGpuWireResult | DisplayServerGpuWireRenderer | DisplayServerGpuWirePresented | DisplayServerInputRequest | DisplayServerDiagnosticsRequest | DisplayServerLiveFrameAck | DisplayServerHello | DisplayServerResyncRequest | DisplayServerAppliedAck | DisplayServerPaintedAck | DisplayServerPointer | DisplayServerWheel | DisplayServerKeyboard | DisplayServerScrollControl | DisplayServerImageLifecycle | DisplayServerTextInputEdit | DisplayServerLottieLifecycle | DisplayServerNativeUIEvent | DisplayServerDeviceConfiguration | DisplayServerDeviceLocation | DisplayServerDeviceCamera | DisplayServerDeviceOpenUrl | DisplayServerDeviceHardware | DisplayServerSemanticQuery | DisplayServerDeviceState | DisplayServerDuoFold | DisplayServerEdgeSwipeCommit;
627
+ export type DisplayServerMessage = DisplayServerGpuWire | DisplayServerGpuWireResult | DisplayServerGpuWireRenderer | DisplayServerGpuWirePresented | DisplayServerHeartbeat | DisplayServerDiagnosticsRequest | DisplayServerDiagnostics | DisplayServerInputGranted | DisplayServerInputRequest | DisplayServerInputRevoked | DisplayServerInputProcessed | DisplayServerAppMotion | DisplayServerLiveFrame | DisplayServerLiveFrameAck | DisplayServerHello | DisplayServerReject | DisplayServerSceneCommit | DisplayServerResyncRequest | DisplayServerAppliedAck | DisplayServerPaintedAck | DisplayServerPointer | DisplayServerWheel | DisplayServerKeyboard | DisplayServerFontRegister | DisplayServerAssetRegister | DisplayServerScrollRegistry | DisplayServerScrollControl | DisplayServerImageLifecycle | DisplayServerAgentAction | DisplayServerTextInputState | DisplayServerAppInterfacePoses | DisplayServerTextInputEdit | DisplayServerLottieIntent | DisplayServerLottieLifecycle | DisplayServerNativeUIRequest | DisplayServerNativeUIEvent | DisplayServerDeviceConfiguration | DisplayServerDeviceLocation | DisplayServerDeviceCamera | DisplayServerDeviceOpenUrl | DisplayServerDeviceHardware | DisplayServerDeviceAppState | DisplayServerSemanticQuery | DisplayServerSemanticResult | DisplayServerDeviceState | DisplayServerDuoFold | DisplayServerEdgeSwipeRegister | DisplayServerEdgeSwipeUnregister | DisplayServerEdgeSwipeCommit;
628
+ export type DisplayServerInputMessage = DisplayServerHeartbeat | DisplayServerGpuWireResult | DisplayServerGpuWireRenderer | DisplayServerGpuWirePresented | DisplayServerInputRequest | DisplayServerDiagnosticsRequest | DisplayServerLiveFrameAck | DisplayServerHello | DisplayServerResyncRequest | DisplayServerAppliedAck | DisplayServerPaintedAck | DisplayServerPointer | DisplayServerWheel | DisplayServerKeyboard | DisplayServerScrollControl | DisplayServerImageLifecycle | DisplayServerTextInputEdit | DisplayServerLottieLifecycle | DisplayServerNativeUIEvent | DisplayServerDeviceConfiguration | DisplayServerDeviceLocation | DisplayServerDeviceCamera | DisplayServerDeviceOpenUrl | DisplayServerDeviceHardware | DisplayServerDeviceAppState | DisplayServerSemanticQuery | DisplayServerDeviceState | DisplayServerDuoFold | DisplayServerEdgeSwipeCommit;
618
629
  export type DisplayServerDecodeOk = {
619
630
  ok: true;
620
631
  message: DisplayServerMessage;
@@ -703,6 +714,7 @@ export interface EncodedSceneCommitFrame {
703
714
  export declare function encodeSceneCommitFrames(commit: DisplayServerSceneCommit, nextSeq: () => number, options: EncodeDisplayServerOptions): EncodedSceneCommitFrame[];
704
715
  export declare function decodePreparedDisplayServerMessage(bytes: Uint8Array, offset?: number): Promise<DisplayServerDecodeResult>;
705
716
  export declare function decodeDisplayServerMessage(bytes: Uint8Array, offset?: number): DisplayServerDecodeResult;
717
+ export declare function isDisplayWatchFrame(bytes: Uint8Array): boolean;
706
718
  export type DisplayServerInputDecodeResult = {
707
719
  ok: true;
708
720
  message: DisplayServerInputMessage;
@@ -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.2471",
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"}
@@ -22,6 +22,7 @@ import type {
22
22
  AgentInspectMessage,
23
23
  AgentPromptEnvelope,
24
24
  CanvasAgentNoteStatus,
25
+ CanvasAgentNoteWait,
25
26
  } from './agent-prompt.ts'
26
27
  import type { AgentSession, AttachedProject } from './attached-projects.ts'
27
28
  import type { CanvasAgentNote } from '@peach/globals'
@@ -202,8 +203,9 @@ export class AgentDaemonClient {
202
203
  async canvasNoteStatus(
203
204
  simId: string,
204
205
  messageId: string,
206
+ changedFrom: CanvasAgentNoteWait | null,
205
207
  ): Promise<CanvasAgentNoteStatus> {
206
- return this.send('agent:canvas-note-status', { simId, messageId })
208
+ return this.send('agent:canvas-note-status', { simId, messageId, changedFrom })
207
209
  }
208
210
 
209
211
  async replyCanvasNote(messageId: string, text: string): Promise<{ ok: true }> {
@@ -109,6 +109,13 @@ export function readCanvasNoteReply(value: unknown): string | null {
109
109
  : null
110
110
  }
111
111
 
112
+ // the statuses a delivery waits to leave: in the queue, then with the agent
113
+ export type CanvasAgentNoteWait = 'pending' | 'taken'
114
+
115
+ export function readCanvasAgentNoteWait(value: unknown): CanvasAgentNoteWait | null {
116
+ return value === 'pending' || value === 'taken' ? value : null
117
+ }
118
+
112
119
  export function readCanvasAgentNoteStatus(value: unknown): CanvasAgentNoteStatus | null {
113
120
  if (!value || typeof value !== 'object') return null
114
121
  const status: unknown = Reflect.get(value, 'status')
@@ -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
@@ -2,6 +2,7 @@ import {
2
2
  readCanvasAgentNoteStatus,
3
3
  type CanvasAgentNoteDelivery,
4
4
  type CanvasAgentNoteStatus,
5
+ type CanvasAgentNoteWait,
5
6
  } from './agent-prompt'
6
7
  import { cloudBoxIdFromSimulatorId } from './simulator-route'
7
8
  import type { CanvasAgentNote } from '@peach/globals'
@@ -10,9 +11,7 @@ export function isCanvasNoteSimulatorId(id: string): boolean {
10
11
  return /^[a-zA-Z0-9-]{1,64}$/.test(id) || cloudBoxIdFromSimulatorId(id) !== null
11
12
  }
12
13
 
13
- const STATUS_POLL_MS = 2_000
14
-
15
- function pause(signal: AbortSignal) {
14
+ function pause(ms: number, signal: AbortSignal) {
16
15
  return new Promise<void>((resolve, reject) => {
17
16
  const abort = () => {
18
17
  clearTimeout(timer)
@@ -21,34 +20,41 @@ function pause(signal: AbortSignal) {
21
20
  const timer = setTimeout(() => {
22
21
  signal.removeEventListener('abort', abort)
23
22
  resolve()
24
- }, STATUS_POLL_MS)
23
+ }, ms)
25
24
  signal.addEventListener('abort', abort, { once: true })
26
25
  if (signal.aborted) abort()
27
26
  })
28
27
  }
29
28
 
29
+ // a reader that can hold a read until the status leaves `changedFrom` answers
30
+ // as soon as it changes; `pollMs` spaces the reads that come back unchanged
30
31
  export function createCanvasAgentNoteDelivery(
31
32
  send: CanvasAgentNoteDelivery['send'],
32
- readStatus: (id: string, signal: AbortSignal) => Promise<CanvasAgentNoteStatus>,
33
+ readStatus: (
34
+ id: string,
35
+ signal: AbortSignal,
36
+ changedFrom: CanvasAgentNoteWait,
37
+ ) => Promise<CanvasAgentNoteStatus>,
38
+ pollMs: number,
33
39
  ): CanvasAgentNoteDelivery {
34
40
  return {
35
41
  send,
36
42
  async waitUntilTaken(id, signal) {
37
43
  while (true) {
38
44
  signal.throwIfAborted()
39
- const { status } = await readStatus(id, signal)
45
+ const { status } = await readStatus(id, signal, 'pending')
40
46
  if (status === 'taken' || status === 'replied') return
41
47
  if (status === 'missing') throw new Error('This note is no longer available.')
42
- await pause(signal)
48
+ await pause(pollMs, signal)
43
49
  }
44
50
  },
45
51
  async waitForReply(id, signal) {
46
52
  while (!signal.aborted) {
47
53
  // a reply can come hours later, so one failed read only waits for the next
48
- const read = await readStatus(id, signal).catch(() => null)
54
+ const read = await readStatus(id, signal, 'taken').catch(() => null)
49
55
  if (read?.status === 'replied') return read.reply
50
56
  if (read?.status === 'missing') return null
51
- await pause(signal).catch(() => {})
57
+ await pause(pollMs, signal).catch(() => {})
52
58
  }
53
59
  return null
54
60
  },
@@ -135,5 +141,6 @@ export function cloudCanvasAgentNoteDelivery(
135
141
  if (!status) throw new Error('The simulator did not report the note’s status.')
136
142
  return status
137
143
  },
144
+ 2_000,
138
145
  )
139
146
  }
@@ -40,7 +40,10 @@ function needsCaseOverlay(directory: string): boolean {
40
40
 
41
41
  function scan(directory: string, listed?: (file: string) => boolean): Node {
42
42
  const node: Node = { files: new Map(), directories: new Map() }
43
- for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
43
+ const entries = fs
44
+ .readdirSync(directory, { withFileTypes: true })
45
+ .sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))
46
+ for (const entry of entries) {
44
47
  const full = path.join(directory, entry.name)
45
48
  const stat = entry.isSymbolicLink()
46
49
  ? fs.statSync(full, { throwIfNoEntry: false })
@@ -23,6 +23,7 @@ import {
23
23
  createCanvasAgentInspectMessage,
24
24
  readCanvasAgentId,
25
25
  readCanvasAgentNote,
26
+ readCanvasAgentNoteWait,
26
27
  readCanvasNoteReply,
27
28
  type CanvasAgentNoteStatus,
28
29
  type AgentInspectMessage,
@@ -59,6 +60,8 @@ import type { WebSocket } from 'ws'
59
60
  // ws.readyState constant — avoid importing the module just for this enum.
60
61
  const WS_OPEN = 1
61
62
  const SESSION_STATUS_PERSIST_DELAY_MS = 25
63
+ // under the 15 s a shell bridge command may take
64
+ const CANVAS_NOTE_STATUS_HOLD_MS = 10_000
62
65
 
63
66
  interface FanoutSubscription {
64
67
  unsubscribe: () => void
@@ -117,6 +120,8 @@ export class AgentHost {
117
120
  string,
118
121
  { simId: string; expiresAt: number; reply?: string }
119
122
  >()
123
+ // canvas status reads held until their note is taken or answered
124
+ private noteWaiters = new Map<string, Set<() => void>>()
120
125
  // agent wrappers also emit prompt-received from the FIFO reader, but the
121
126
  // shell/daemon already knows the user-facing display text when send-prompt
122
127
  // is accepted. emit the friendly prompt immediately and suppress the raw
@@ -222,6 +227,7 @@ export class AgentHost {
222
227
  this.inspectListeners.clear()
223
228
  this.inspectQueues.clear()
224
229
  this.takenNotes.clear()
230
+ for (const id of [...this.noteWaiters.keys()]) this.wakeNote(id)
225
231
  this.allSockets.clear()
226
232
  this.browserSockets.clear()
227
233
  }
@@ -296,19 +302,23 @@ export class AgentHost {
296
302
  }
297
303
  case 'agent:canvas-note-status': {
298
304
  const simId = this.requireSimId(msg, type)
299
- this.pruneTakenNotes()
300
- const pending = this.inspectQueue(simId).some(
301
- (message) => message.id === msg.messageId,
302
- )
303
- const taken = this.takenNotes.get(String(msg.messageId))
304
- const status: CanvasAgentNoteStatus = pending
305
- ? { status: 'pending' }
306
- : taken?.simId !== simId
307
- ? { status: 'missing' }
308
- : taken.reply
309
- ? { status: 'replied', reply: taken.reply }
310
- : { status: 'taken' }
311
- return status
305
+ const messageId = String(msg.messageId)
306
+ const status = this.canvasNoteStatus(simId, messageId)
307
+ if (status.status !== readCanvasAgentNoteWait(msg.changedFrom)) return status
308
+ await new Promise<void>((resolve) => {
309
+ const waiters = this.noteWaiters.get(messageId) ?? new Set()
310
+ this.noteWaiters.set(messageId, waiters)
311
+ const wake = () => {
312
+ clearTimeout(timer)
313
+ waiters.delete(wake)
314
+ if (!waiters.size && this.noteWaiters.get(messageId) === waiters)
315
+ this.noteWaiters.delete(messageId)
316
+ resolve()
317
+ }
318
+ const timer = setTimeout(wake, CANVAS_NOTE_STATUS_HOLD_MS)
319
+ waiters.add(wake)
320
+ })
321
+ return this.canvasNoteStatus(simId, messageId)
312
322
  }
313
323
  case 'agent:reply-canvas-note': {
314
324
  this.pruneTakenNotes()
@@ -317,6 +327,7 @@ export class AgentHost {
317
327
  if (!reply) throw new AgentSessionError('INVALID_REPLY', 'invalid note reply')
318
328
  if (!taken) throw new AgentSessionError('NOT_FOUND', 'no taken note with that id')
319
329
  taken.reply = reply
330
+ this.wakeNote(String(msg.messageId))
320
331
  return { ok: true }
321
332
  }
322
333
  case 'agent:get-inspect-listener-status': {
@@ -381,6 +392,21 @@ export class AgentHost {
381
392
  })
382
393
  }
383
394
 
395
+ private canvasNoteStatus(simId: string, messageId: string): CanvasAgentNoteStatus {
396
+ this.pruneTakenNotes()
397
+ if (this.inspectQueue(simId).some((message) => message.id === messageId))
398
+ return { status: 'pending' }
399
+ const taken = this.takenNotes.get(messageId)
400
+ if (taken?.simId !== simId) return { status: 'missing' }
401
+ return taken.reply ? { status: 'replied', reply: taken.reply } : { status: 'taken' }
402
+ }
403
+
404
+ private wakeNote(messageId: string) {
405
+ const waiters = this.noteWaiters.get(messageId)
406
+ this.noteWaiters.delete(messageId)
407
+ for (const wake of waiters ?? []) wake()
408
+ }
409
+
384
410
  private pruneTakenNotes() {
385
411
  const now = Date.now()
386
412
  for (const [id, receipt] of this.takenNotes) {
@@ -395,6 +421,7 @@ export class AgentHost {
395
421
  simId: message.simId,
396
422
  expiresAt: Date.now() + AGENT_NOTE_TTL_MS,
397
423
  })
424
+ this.wakeNote(message.id)
398
425
  }
399
426
 
400
427
  private inspectQueue(simId: string): AgentInspectMessage[] {