peachsim 0.1.1901 → 0.1.1904

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 (91) hide show
  1. package/cli/commands/record.ts +78 -43
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +80 -22
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +2 -1
  18. package/dist-lib/cloud-contract.mjs +2 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +2 -1
  22. package/dist-lib/cloud.mjs +2 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +2 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +24 -19
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +81 -22
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +3 -2
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +2 -2
  48. package/dist-lib/native-app-identity-project.cjs +2 -2
  49. package/dist-lib/native-app-identity-project.mjs +2 -2
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +53 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +81 -22
  69. package/dist-lib/swift-compile.cjs +22 -17
  70. package/dist-lib/swift-compile.mjs +22 -17
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +23 -18
  78. package/dist-lib/vite.cjs +1 -1
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-globals/src/recordingBridgeContract.d.ts +1 -0
  82. package/package.json +1 -1
  83. package/sdk/ios/usr/include/darwin.modulemap +430 -0
  84. package/sdk/ios/usr/include/module.modulemap +1 -0
  85. package/src/bridge-contract.ts +25 -0
  86. package/src/cloud-contract.ts +1 -0
  87. package/src/swift-compile.ts +13 -13
  88. package/src/swift-shared-sdk.ts +12 -7
  89. package/src/turbo-codegen-intake.ts +3 -0
  90. package/src/turbo-compile.ts +1 -0
  91. package/src/turbo-source.ts +62 -2
@@ -28,6 +28,7 @@ import {
28
28
  parseBridgeCliArgs,
29
29
  type WsBridge,
30
30
  } from '../ws-bridge'
31
+ import type { RecorderCommand, WsBridgeCommand } from '../../src/bridge-contract'
31
32
  import type { PreviewCaptureKind } from '@peach/globals'
32
33
 
33
34
  interface RecordOptions {
@@ -83,7 +84,7 @@ const CAPTURE_STEP_ENCODE_BUDGET_MS = 30_000
83
84
  // connection before the encode/flush step could use it.
84
85
  async function holdCapture(bridge: WsBridge, durationMs: number) {
85
86
  await bridge.send(
86
- { type: 'evaluate', code: `new Promise((r) => setTimeout(r, ${durationMs}))` },
87
+ { type: 'recorder', recorder: { method: 'hold', durationMs } },
87
88
  { timeoutMs: durationMs + CAPTURE_STEP_ENCODE_BUDGET_MS },
88
89
  )
89
90
  }
@@ -102,13 +103,13 @@ function captureStepTimeoutMs(
102
103
 
103
104
  async function evalCaptureStep<T>(
104
105
  bridge: WsBridge,
105
- code: string,
106
+ recorder: RecorderCommand,
106
107
  step: string,
107
108
  durationMs: number,
108
109
  timeoutMs: number,
109
110
  ): Promise<T> {
110
111
  try {
111
- return (await bridge.send({ type: 'evaluate', code }, { timeoutMs })) as T
112
+ return (await bridge.send({ type: 'recorder', recorder }, { timeoutMs })) as T
112
113
  } catch (err) {
113
114
  const msg = err instanceof Error ? err.message : String(err)
114
115
  if (/^command timed out after \d+(?:\.\d+)?s$/.test(msg)) {
@@ -489,10 +490,11 @@ export async function runRecord(args: string[], opts: RecordOptions) {
489
490
  console.log(` sampling ${count} frames over ${durationSec}s → ${outDir}`)
490
491
  const start: { ok: boolean; requestId?: number; error?: string } =
491
492
  await bridge.send({
492
- type: 'evaluate',
493
- code: `window.__sootsimRecorder.startFrameCapture({ count: ${count}, durationMs: ${durationMs}${
494
- layers ? `, layers: ${JSON.stringify(layers)}` : ''
495
- } })`,
493
+ type: 'recorder',
494
+ recorder: {
495
+ method: 'startFrameCapture',
496
+ options: { count, durationMs, ...(layers ? { layers } : {}) },
497
+ },
496
498
  })
497
499
  if (!start.ok || !start.requestId) {
498
500
  console.error(` frame capture start failed: ${start.error ?? 'unknown error'}`)
@@ -512,8 +514,12 @@ export async function runRecord(args: string[], opts: RecordOptions) {
512
514
  frames?: Array<{ data: string; size: number }>
513
515
  error?: string
514
516
  } | null = await bridge.send({
515
- type: 'evaluate',
516
- code: `window.__sootsimRecorder.getFrameCaptureResult(${start.requestId}, { offset: ${saved}, limit: ${FRAMES_PER_PAGE} })`,
517
+ type: 'recorder',
518
+ recorder: {
519
+ method: 'getFrameCaptureResult',
520
+ requestId: start.requestId,
521
+ options: { offset: saved, limit: FRAMES_PER_PAGE },
522
+ },
517
523
  })
518
524
  if (!result) {
519
525
  console.error(' frame capture result missing')
@@ -549,9 +555,15 @@ export async function runRecord(args: string[], opts: RecordOptions) {
549
555
  console.log(` encoding gif: ${count} frames over ${durationSec}s → ${out}`)
550
556
  const result: { data: string; size: number } | null = await evalCaptureStep(
551
557
  bridge,
552
- `window.__sootsimRecorder.captureGif({ frames: ${count}, durationMs: ${durationMs}${
553
- maxWidth ? `, maxWidth: ${maxWidth}` : ''
554
- }${layers ? `, layers: ${JSON.stringify(layers)}` : ''} })`,
558
+ {
559
+ method: 'captureGif',
560
+ options: {
561
+ frames: count,
562
+ durationMs,
563
+ ...(maxWidth ? { maxWidth } : {}),
564
+ ...(layers ? { layers } : {}),
565
+ },
566
+ },
555
567
  'gif encode',
556
568
  durationMs,
557
569
  captureStepTimeoutMs(parsed, durationMs, true),
@@ -574,9 +586,9 @@ export async function runRecord(args: string[], opts: RecordOptions) {
574
586
  mkdirSync(dirname(out), { recursive: true })
575
587
 
576
588
  const startOpts: {
577
- format: string
589
+ format: 'webm' | 'mp4'
578
590
  fps: number
579
- layers?: string
591
+ layers?: 'tenant' | 'shell'
580
592
  durationMs: number
581
593
  scene: boolean
582
594
  } = {
@@ -591,7 +603,7 @@ export async function runRecord(args: string[], opts: RecordOptions) {
591
603
  const startResult: { ok: boolean; error?: string; format?: string } =
592
604
  await evalCaptureStep(
593
605
  bridge,
594
- `window.__sootsimRecorder.start(${JSON.stringify(startOpts)})`,
606
+ { method: 'start', options: startOpts },
595
607
  `${format} start`,
596
608
  durationMs,
597
609
  captureStepTimeoutMs(parsed, durationMs, false),
@@ -626,7 +638,7 @@ export async function runRecord(args: string[], opts: RecordOptions) {
626
638
  frameCount?: number
627
639
  } = await evalCaptureStep(
628
640
  bridge,
629
- `window.__sootsimRecorder.stop()`,
641
+ { method: 'stop' },
630
642
  `${format} encode/flush`,
631
643
  durationMs,
632
644
  captureStepTimeoutMs(parsed, durationMs, false),
@@ -642,7 +654,13 @@ export async function runRecord(args: string[], opts: RecordOptions) {
642
654
  }
643
655
 
644
656
  if (startOpts.scene)
645
- await saveSceneVideo(bridge, out, { fps, layers, maxWidth, format, sceneOnly })
657
+ await saveSceneVideo(bridge, out, {
658
+ fps,
659
+ layers,
660
+ maxWidth,
661
+ format,
662
+ sceneOnly,
663
+ })
646
664
  else {
647
665
  await downloadBlob(bridge, out)
648
666
  console.log(` saved: ${out} (${formatBytes(stopResult.size)})`)
@@ -657,12 +675,11 @@ export async function runRecord(args: string[], opts: RecordOptions) {
657
675
  // died. without the short cap the probe stalls the full recording timeout
658
676
  // (60s) before failing; cap it at 6s and fail fast with an actionable message.
659
677
  const SIM_PROBE_TIMEOUT_MS = 6_000
660
- async function probeSim(bridge: WsBridge, code: string): Promise<boolean> {
678
+ async function probeSim(bridge: WsBridge, command: WsBridgeCommand): Promise<boolean> {
661
679
  try {
662
- return await bridge.send(
663
- { type: 'evaluate', code },
664
- { defaultTimeoutMs: SIM_PROBE_TIMEOUT_MS },
665
- )
680
+ return await bridge.send(command, {
681
+ defaultTimeoutMs: SIM_PROBE_TIMEOUT_MS,
682
+ })
666
683
  } catch (err) {
667
684
  const msg = err instanceof Error ? err.message : String(err)
668
685
  if (/^command timed out after \d+(?:\.\d+)?s$/.test(msg)) {
@@ -678,7 +695,10 @@ async function probeSim(bridge: WsBridge, code: string): Promise<boolean> {
678
695
  }
679
696
 
680
697
  async function assertRecorderAvailable(bridge: WsBridge) {
681
- const ok = await probeSim(bridge, 'typeof window.__sootsimRecorder !== "undefined"')
698
+ const ok = await probeSim(bridge, {
699
+ type: 'recorder',
700
+ recorder: { method: 'available' },
701
+ })
682
702
  if (!ok) {
683
703
  console.error(
684
704
  ' window.__sootsimRecorder missing — is peach engine running in this sim?',
@@ -721,10 +741,11 @@ async function downloadBlob(bridge: WsBridge, outPath: string) {
721
741
  done: boolean
722
742
  mime: string
723
743
  } | null = await bridge.send({
724
- type: 'evaluate',
725
- code: `window.__sootsimRecorder.getBlobBase64({ offset: ${offset}, chunk: ${
726
- 2 * 1024 * 1024
727
- } })`,
744
+ type: 'recorder',
745
+ recorder: {
746
+ method: 'getBlobBase64',
747
+ options: { offset, chunk: 2 * 1024 * 1024 },
748
+ },
728
749
  })
729
750
  if (!result) throw new Error('no blob available on recorder')
730
751
  chunks.push(Buffer.from(result.data, 'base64'))
@@ -809,7 +830,10 @@ async function renderStoreScene(
809
830
  },
810
831
  ) {
811
832
  const requestId: string | null = await bridge.send(
812
- { type: 'evaluate', code: 'window.__sootsimRecorder.waitSceneVideoRequest()' },
833
+ {
834
+ type: 'evaluate',
835
+ code: 'window.__sootsimRecorder.waitSceneVideoRequest()',
836
+ },
813
837
  { timeoutMs: UPLOAD_TIMEOUT_MS },
814
838
  )
815
839
  if (!requestId) return
@@ -833,7 +857,12 @@ async function renderStoreScene(
833
857
  const output = join(dir, `video.${video.format}`)
834
858
  const { renderSceneToVideo } = await import('../scene-video')
835
859
  const result = await holdBridgeDuring(bridge, () =>
836
- renderSceneToVideo({ scene: Buffer.concat(chunks), shellUrl, output, video }),
860
+ renderSceneToVideo({
861
+ scene: Buffer.concat(chunks),
862
+ shellUrl,
863
+ output,
864
+ video,
865
+ }),
837
866
  )
838
867
  const bytes = readFileSync(output)
839
868
  for (let start = 0; start < bytes.length; start += 1024 * 1024) {
@@ -1230,10 +1259,13 @@ async function probeEngineRecordingState(
1230
1259
  bridge: WsBridge,
1231
1260
  ): Promise<EngineRecordingState | null> {
1232
1261
  try {
1233
- const snap: { store?: string; headless?: string; eventRecording?: boolean } | null =
1234
- await bridge.send({
1235
- type: 'evaluate',
1236
- code: `(() => {
1262
+ const snap: {
1263
+ store?: string
1264
+ headless?: string
1265
+ eventRecording?: boolean
1266
+ } | null = await bridge.send({
1267
+ type: 'evaluate',
1268
+ code: `(() => {
1237
1269
  const store = window.SootSim?.bridges?.getRecordingState?.();
1238
1270
  const headless = window.__sootsimRecorder?.state?.();
1239
1271
  const eventRecorder = window.SootSim?.bridges?.eventRecorder ?? window.__sootsimEventRecorder;
@@ -1243,7 +1275,7 @@ async function probeEngineRecordingState(
1243
1275
  : false;
1244
1276
  return { store: store ? store.state : undefined, headless, eventRecording };
1245
1277
  })()`,
1246
- })
1278
+ })
1247
1279
  if (!snap) return null
1248
1280
  if (snap.headless === 'starting') return 'starting'
1249
1281
  if (snap.store === 'recording' || snap.headless === 'recording') return 'recording'
@@ -1407,7 +1439,10 @@ async function recordCancel(args: string[], opts: RecordOptions) {
1407
1439
  }
1408
1440
  return
1409
1441
  }
1410
- const parsed = parseBridgeCliArgs(args, { port: opts.port, commandTimeoutMs: 15_000 })
1442
+ const parsed = parseBridgeCliArgs(args, {
1443
+ port: opts.port,
1444
+ commandTimeoutMs: 15_000,
1445
+ })
1411
1446
  noteSimMismatch(parsed.simId, state)
1412
1447
  // the recorder (and its buffered blob) lives in the page of the sim the
1413
1448
  // recording was *started* on — `state.simId` wins over the requested
@@ -1574,10 +1609,10 @@ async function recordStop(args: string[], opts: RecordOptions) {
1574
1609
  // ─── store-backed recording helpers (live / combined) ─────────────────────
1575
1610
 
1576
1611
  async function assertStoreBridgesAvailable(bridge: WsBridge) {
1577
- const ok = await probeSim(
1578
- bridge,
1579
- 'typeof window.SootSim?.bridges?.startRecording === "function" && typeof window.SootSim?.bridges?.stopRecording === "function"',
1580
- )
1612
+ const ok = await probeSim(bridge, {
1613
+ type: 'evaluate',
1614
+ code: 'typeof window.SootSim?.bridges?.startRecording === "function" && typeof window.SootSim?.bridges?.stopRecording === "function"',
1615
+ })
1581
1616
  if (!ok) {
1582
1617
  console.error(
1583
1618
  ' SootSim.bridges.startRecording missing — is peach engine running in this sim?',
@@ -1600,15 +1635,15 @@ async function assertStoreBridgesAvailable(bridge: WsBridge) {
1600
1635
  // ran (QA F19-3). probe the same `__sootsimCaptureBundle` snapshot the upload
1601
1636
  // uses, up front, and fail fast with an actionable message instead.
1602
1637
  async function assertGuestBundleLoaded(bridge: WsBridge, mode: RecordMode) {
1603
- const hasBundle = await probeSim(
1604
- bridge,
1605
- `(() => {
1638
+ const hasBundle = await probeSim(bridge, {
1639
+ type: 'evaluate',
1640
+ code: `(() => {
1606
1641
  const fn = window.__sootsimCaptureBundle
1607
1642
  if (typeof fn !== 'function') return false
1608
1643
  const snap = fn()
1609
1644
  return !!(snap && snap.bundleUrl)
1610
1645
  })()`,
1611
- )
1646
+ })
1612
1647
  if (!hasBundle) {
1613
1648
  console.error(
1614
1649
  ` --mode ${mode} needs a guest app bundle to upload to /preview/<id>,\n` +
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/beta.ts
4
4
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SIM_LONG_PRESS_MAX_MS = 5e3;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -20785,7 +20785,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
20785
20785
  const overlay = import_node_path28.default.join(swiftSharedSdkRoot(moduleRoot, distribution), "wasm/include");
20786
20786
  const overlayFiles = (0, import_node_fs30.readdirSync)(overlay, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path28.default.join(entry.parentPath, entry.name)).sort();
20787
20787
  const key2 = JSON.stringify([
20788
- "v17",
20788
+ "v18",
20789
20789
  toolchainBin,
20790
20790
  sdk,
20791
20791
  frameworks,
@@ -20828,12 +20828,17 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
20828
20828
  const realRoot = import_node_path28.default.dirname(bundle);
20829
20829
  const overrides = new Map([
20830
20830
  [import_node_path28.default.join(sysroot, "darwin/System/Library/Frameworks"), frameworks],
20831
- ...["MacTypes.h", "net/if.h", "notify.h", "notify.modulemap"].map(
20832
- (header) => [
20833
- import_node_path28.default.join(sysroot, "darwin/usr/include", header),
20834
- import_node_path28.default.join(swiftSharedSdkRoot(moduleRoot, distribution), "usr/include", header)
20835
- ]
20836
- )
20831
+ ...[
20832
+ "MacTypes.h",
20833
+ "net/if.h",
20834
+ "notify.h",
20835
+ "notify.modulemap",
20836
+ "module.modulemap",
20837
+ "darwin.modulemap"
20838
+ ].map((header) => [
20839
+ import_node_path28.default.join(sysroot, "darwin/usr/include", header),
20840
+ import_node_path28.default.join(swiftSharedSdkRoot(moduleRoot, distribution), "usr/include", header)
20841
+ ])
20837
20842
  ]);
20838
20843
  for (const file of overlayFiles) {
20839
20844
  overrides.set(
@@ -28922,9 +28927,9 @@ function emitSwiftPackageManifest(args) {
28922
28927
  foundationCategoryObjects.map((name3) => `lib/Foundation-${name3}.o`)
28923
28928
  );
28924
28929
  const roots = swiftObjcRootObjects(distribution.id, moduleRoot, distribution.objects);
28925
- const eager = args.lazyDistribution ? new Set(
28930
+ const eager = new Set(
28926
28931
  objects.filter((object6) => roots.has(object6) || categoryObjects.has(object6))
28927
- ) : new Set(objects);
28932
+ );
28928
28933
  const list2 = [
28929
28934
  ...[...eager].map(quoted),
28930
28935
  "-Wl,--start-lib",
@@ -31171,8 +31176,7 @@ module ${moduleName2}.Swift {
31171
31176
  distributionLink: {
31172
31177
  path: import_node_path44.default.join(layout2.root, ".peach-distribution-objects.rsp"),
31173
31178
  files: files2
31174
- },
31175
- lazyDistribution: input.optimize
31179
+ }
31176
31180
  } : {},
31177
31181
  ...prebuilt && frameworkLink ? {
31178
31182
  prebuilt: {
@@ -31792,7 +31796,8 @@ async function buildFrameworkProducts(scratch2, args) {
31792
31796
  linked.owners.set(object6, "Foundation");
31793
31797
  }
31794
31798
  const providerDir = import_node_path44.default.join(scratch2, "darwin-records");
31795
- if (!(0, import_node_fs46.existsSync)(import_node_path44.default.join(providerDir, ".complete"))) {
31799
+ const providerStamp = import_node_path44.default.join(providerDir, ".complete");
31800
+ if (!(0, import_node_fs46.existsSync)(providerStamp) || (0, import_node_fs46.readFileSync)(providerStamp, "utf8") !== args.frameworkKey) {
31796
31801
  (0, import_node_fs46.rmSync)(providerDir, { recursive: true, force: true });
31797
31802
  (0, import_node_fs46.mkdirSync)(providerDir);
31798
31803
  const sdkPaths2 = swiftSdkPaths(args.moduleRoot, args.toolchainBin);
@@ -31804,7 +31809,7 @@ async function buildFrameworkProducts(scratch2, args) {
31804
31809
  minimum: darwinRecordsMinimum(),
31805
31810
  out: providerDir
31806
31811
  });
31807
- (0, import_node_fs46.writeFileSync)(import_node_path44.default.join(providerDir, ".complete"), "");
31812
+ (0, import_node_fs46.writeFileSync)(providerStamp, args.frameworkKey);
31808
31813
  }
31809
31814
  const providers = (0, import_node_fs46.readdirSync)(providerDir).filter((file) => file.endsWith(".o")).sort().map((file) => import_node_path44.default.join(providerDir, file));
31810
31815
  for (const provider of providers) linked.owners.set(provider, "DarwinRecords");
@@ -32104,7 +32109,7 @@ function compileSwiftProjectOnce(input, options) {
32104
32109
  process.env.LD_LIBRARY_PATH
32105
32110
  ].filter(Boolean).join(":")
32106
32111
  } : {},
32107
- ...input.optimize ? { PEACH_DEFER_WASM_LINK: "1" } : {}
32112
+ PEACH_DEFER_WASM_LINK: "1"
32108
32113
  },
32109
32114
  maxBuffer: 64 * 1024 * 1024,
32110
32115
  timeout: options.timeoutMs,
@@ -32331,7 +32336,7 @@ function compileSwiftProjectOnce(input, options) {
32331
32336
  );
32332
32337
  }
32333
32338
  if (options.project) removeProjectLinks(root);
32334
- if (input.optimize && !guestGraph)
32339
+ if (!guestGraph)
32335
32340
  pruneSwiftWasmLink(
32336
32341
  root,
32337
32342
  options.toolchainBin,
@@ -32545,7 +32550,7 @@ var init_swift_compile = __esm({
32545
32550
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
32546
32551
  MULTI_MANIFEST_VERSION = 66;
32547
32552
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
32548
- compilerSourceDigest = true ? "8768dadacf2e909cf808df3a31fe261832d51fb29d48f2b45bd4df5c117c6f69" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
32553
+ compilerSourceDigest = true ? "71079de71f4a1e7a0657c353087f4acbe4adbc3206addf4cb5fff1ceb7636910" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
32549
32554
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
32550
32555
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
32551
32556
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -38271,7 +38276,7 @@ var init_swift_standin_digest = __esm({
38271
38276
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
38272
38277
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
38273
38278
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
38274
- STANDIN_SOURCE_DIGEST = true ? "ae26db314b6d3703c6fc172d019e3cb0fe28a018e5f614bb804fae720ab78ff8" : standinSourceDigest();
38279
+ STANDIN_SOURCE_DIGEST = true ? "580db5994503f2975c631297effb0303b577cbf6383a5502509342728318995d" : standinSourceDigest();
38275
38280
  }
38276
38281
  });
38277
38282
 
@@ -38761,7 +38766,7 @@ var init_expo_native_prebuilt = __esm({
38761
38766
  init_swift_native_pin();
38762
38767
  init_xcode_project();
38763
38768
  EXPO_NATIVE_ENTRY_NAME = "ios";
38764
- EXPO_NATIVE_COMPILER_DIGEST = true ? "780db33c9e8fb9ec57f0ee9b47692f5b01abb32d39a360da96f271bdea787e67" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
38769
+ EXPO_NATIVE_COMPILER_DIGEST = true ? "9288eb4631d9a1252c94c4bbf61488c923fafaa02e01f7877e17351221a753d5" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
38765
38770
  IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
38766
38771
  expoNativeEntryUrl = (key2, file) => `${NATIVE_PREBUILT_ORIGIN}/${nativeEntryPrefix("expo", EXPO_NATIVE_ENTRY_NAME, key2)}/${file}`;
38767
38772
  isStringRecord = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
@@ -50623,6 +50628,9 @@ var init_turbo_codegen_intake = __esm({
50623
50628
  ];
50624
50629
  LEGACY_BRIDGE_PODS = /* @__PURE__ */ new Set([
50625
50630
  "React-Core",
50631
+ "React-hermes",
50632
+ "React-jsi",
50633
+ "React-logger",
50626
50634
  "React-cxxreact",
50627
50635
  "React-jsinspector",
50628
50636
  "React-jsinspectortracing",
@@ -51487,6 +51495,13 @@ async function collectTurboSources(options) {
51487
51495
  );
51488
51496
  return;
51489
51497
  }
51498
+ if (hermesHeaders && include.startsWith("hermes/") && import_node_fs80.default.existsSync(import_node_path78.default.join(hermesHeaders, include))) {
51499
+ alias(
51500
+ `${core}/include/${include}`,
51501
+ original(TURBO_CORE_TARGET, "hermes-engine", hermesHeaders, include, false)
51502
+ );
51503
+ return;
51504
+ }
51490
51505
  const nativeReactMaps = pod?.reactHeaderMaps ?? [];
51491
51506
  const mappedReact = (quoted ? [
51492
51507
  ...nativeReactMaps.filter(({ flag }) => flag === "-iquote"),
@@ -51631,6 +51646,7 @@ async function collectTurboSources(options) {
51631
51646
  let objc = false;
51632
51647
  let fabric = false;
51633
51648
  let legacyBridge = false;
51649
+ let hermesHeaders = null;
51634
51650
  const objcClasses = /* @__PURE__ */ new Set();
51635
51651
  const unregisteredObjcClasses = /* @__PURE__ */ new Set();
51636
51652
  const deferredDepUnits = [];
@@ -52108,7 +52124,47 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
52108
52124
  }
52109
52125
  }
52110
52126
  if (fabric || legacyBridge) {
52111
- if (!fabric) result.targets[0].cxxDefines = [...defines, "USE_HERMES=1"];
52127
+ if (!fabric) {
52128
+ result.targets[0].cxxDefines = [...defines, "USE_HERMES=1"];
52129
+ hermesHeaders = import_node_path78.default.join(
52130
+ options.projectRoot,
52131
+ "ios/Pods/hermes-engine/destroot/include"
52132
+ );
52133
+ if (!import_node_fs80.default.existsSync(import_node_path78.default.join(hermesHeaders, "hermes/hermes.h")))
52134
+ throw new Error(
52135
+ `the legacy bridge needs the installed hermes-engine headers in ${hermesHeaders}`
52136
+ );
52137
+ const runtimeUnit = `${core}/PeachHermesRuntime.cpp`;
52138
+ add(
52139
+ runtimeUnit,
52140
+ [
52141
+ "#include <hermes/hermes.h>",
52142
+ "#include <stdexcept>",
52143
+ "",
52144
+ "namespace hermes::vm {",
52145
+ "CrashManager::~CrashManager() = default;",
52146
+ "NopCrashManager::~NopCrashManager() = default;",
52147
+ "} // namespace hermes::vm",
52148
+ "",
52149
+ "namespace facebook::hermes {",
52150
+ "std::unique_ptr<HermesRuntime> makeHermesRuntime(const ::hermes::vm::RuntimeConfig &) {",
52151
+ ' throw std::logic_error("no native Hermes runtime in Peach: this app started the legacy bridge");',
52152
+ "}",
52153
+ "} // namespace facebook::hermes",
52154
+ ""
52155
+ ].join("\n")
52156
+ );
52157
+ scanText(
52158
+ {
52159
+ key: runtimeUnit,
52160
+ targetName: TURBO_CORE_TARGET,
52161
+ label: "peach",
52162
+ root: reactNative.root,
52163
+ relative: "PeachHermesRuntime.cpp"
52164
+ },
52165
+ result.files[runtimeUnit]
52166
+ );
52167
+ }
52112
52168
  addPodSources(
52113
52169
  installedFabricSources(reactNative.root, { legacyBridge, bridgeOnly: !fabric })
52114
52170
  );
@@ -52764,6 +52820,7 @@ var init_turbo_source = __esm({
52764
52820
  { from: "Libraries/TypeSafety", to: "RCTTypeSafety" },
52765
52821
  { from: "Libraries/FBLazyVector/FBLazyVector", to: "FBLazyVector" },
52766
52822
  { from: "ReactApple/RCTSwiftUIWrapper", to: "RCTSwiftUIWrapper" },
52823
+ { from: "ReactCommon/hermes/executor", to: "reacthermes" },
52767
52824
  {
52768
52825
  from: "ReactApple/Libraries/RCTFoundation/RCTDeprecation/Exported",
52769
52826
  to: "RCTDeprecation"
@@ -55866,7 +55923,7 @@ var init_nitro_superset = __esm({
55866
55923
  init_swift_standin_digest();
55867
55924
  NITRO_SUPERSET_ENTRY_NAME = "superset";
55868
55925
  packageVersion = (root) => JSON.parse((0, import_node_fs86.readFileSync)((0, import_node_path84.join)(root, "package.json"), "utf8")).version;
55869
- NITRO_COMPILER_DIGEST = true ? "dfa17c6e2cbecb906db123df784c6bf7a048b88c14fb188da27719440bbe221c" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
55926
+ NITRO_COMPILER_DIGEST = true ? "1248f428cf35666e713fd65b1f0ac037419c1c119f8ae3ecc6b8242255a7f2c7" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
55870
55927
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
55871
55928
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
55872
55929
  published2 = /* @__PURE__ */ new Map();
@@ -56208,7 +56265,8 @@ async function compileTurboModule(options) {
56208
56265
  reactNativeRoot: options.reactNativeRoot,
56209
56266
  providers: options.providers,
56210
56267
  codegenDir: import_node_path86.default.join(scratch2, "codegen"),
56211
- installedPods: options.installedPods
56268
+ installedPods: options.installedPods,
56269
+ projectRoot: options.projectRoot
56212
56270
  });
56213
56271
  const swiftTargets = collection.targets.filter(
56214
56272
  (target) => Object.keys(collection.files).some(
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/capture-contract.ts
4
4
  var RNX_SCREEN_CAPTURE_VERSION = 1;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -96,6 +96,7 @@ var RNX_CLOUD_COMMAND_SCOPES = {
96
96
  focus: "drive",
97
97
  flowStatus: "drive",
98
98
  reset: "reset",
99
+ recorder: "drive",
99
100
  camera: "media",
100
101
  location: "media",
101
102
  // string evaluation and arbitrary bridge calls are maestro's boundary: the
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 40761776;
@@ -47,6 +47,7 @@ var RNX_CLOUD_COMMAND_SCOPES = {
47
47
  focus: "drive",
48
48
  flowStatus: "drive",
49
49
  reset: "reset",
50
+ recorder: "drive",
50
51
  camera: "media",
51
52
  location: "media",
52
53
  // string evaluation and arbitrary bridge calls are maestro's boundary: the
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1904 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-test-args.ts
4
4
  var CLOUD_TEST_ARGS_MAX_COUNT = 32;