peachsim 0.1.1465 → 0.1.1477

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 (86) hide show
  1. package/cli/bridge-flow-runner.ts +25 -17
  2. package/cli/cloud-client.ts +12 -19
  3. package/cli/commands/inspect/settling.ts +4 -1
  4. package/cli/drivers/playwright-sim-host.ts +7 -2
  5. package/cli/drivers/playwright.ts +6 -6
  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 +1 -1
  13. package/dist-lib/bridge-constants.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.mjs +1 -1
  16. package/dist-lib/bridge-contract.cjs +1 -1
  17. package/dist-lib/bridge-contract.mjs +1 -1
  18. package/dist-lib/bundle-channel.cjs +13 -2
  19. package/dist-lib/capture-contract.cjs +1 -1
  20. package/dist-lib/capture-contract.mjs +1 -1
  21. package/dist-lib/cloud-contract.cjs +1 -1
  22. package/dist-lib/cloud-contract.mjs +1 -1
  23. package/dist-lib/cloud-test-args.cjs +1 -1
  24. package/dist-lib/cloud-test-args.mjs +1 -1
  25. package/dist-lib/cloud.cjs +1 -1
  26. package/dist-lib/cloud.mjs +1 -1
  27. package/dist-lib/config.cjs +1 -1
  28. package/dist-lib/config.mjs +1 -1
  29. package/dist-lib/detox/index.cjs +46 -40
  30. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  31. package/dist-lib/expo-swift-bundle.cjs +7 -2
  32. package/dist-lib/expo-swift-metadata.cjs +1 -1
  33. package/dist-lib/expo-swift-metadata.mjs +1 -1
  34. package/dist-lib/home-paths.cjs +1 -1
  35. package/dist-lib/host/bridge-host.cjs +170 -16
  36. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  37. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  38. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  39. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  40. package/dist-lib/host/websocket-proxy.cjs +1 -1
  41. package/dist-lib/index.cjs +5 -2
  42. package/dist-lib/jump-to-source-babel.cjs +1 -1
  43. package/dist-lib/jump-to-source-native.cjs +1 -1
  44. package/dist-lib/kotlin-host.cjs +1 -1
  45. package/dist-lib/menu.cjs +1 -1
  46. package/dist-lib/menu.mjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  48. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  49. package/dist-lib/metro-production-bundle.cjs +1 -1
  50. package/dist-lib/metro-production-bundle.mjs +1 -1
  51. package/dist-lib/metro.cjs +1 -1
  52. package/dist-lib/native-app-identity-project.cjs +1 -1
  53. package/dist-lib/native-app-identity-project.mjs +1 -1
  54. package/dist-lib/native-app-identity.cjs +1 -1
  55. package/dist-lib/native-app-identity.mjs +1 -1
  56. package/dist-lib/native-firebase-metadata.cjs +1 -1
  57. package/dist-lib/native-firebase-metadata.mjs +1 -1
  58. package/dist-lib/plist.cjs +1 -1
  59. package/dist-lib/plist.mjs +1 -1
  60. package/dist-lib/profiles.cjs +1 -1
  61. package/dist-lib/public-brand.cjs +1 -1
  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/scripts/dev-server-scanner.cjs +1 -1
  65. package/dist-lib/sdk.cjs +5 -2
  66. package/dist-lib/sdk.mjs +5 -2
  67. package/dist-lib/skills.cjs +198 -83
  68. package/dist-lib/swift-compile.cjs +7 -2
  69. package/dist-lib/swift-compile.mjs +7 -2
  70. package/dist-lib/swift-package.cjs +1 -1
  71. package/dist-lib/swift-package.mjs +1 -1
  72. package/dist-lib/swift-submit.cjs +1 -1
  73. package/dist-lib/swift-submit.mjs +1 -1
  74. package/dist-lib/swift-toolchain.cjs +1 -1
  75. package/dist-lib/swift.cjs +1 -1
  76. package/dist-lib/vite-swift.cjs +7 -2
  77. package/dist-lib/vite.cjs +1 -1
  78. package/dist-lib/worklet-executable.cjs +1 -1
  79. package/dist-lib/worklet-executable.mjs +1 -1
  80. package/package.json +1 -1
  81. package/src/admitted-mac-build.ts +12 -0
  82. package/src/bridge-constants.ts +5 -3
  83. package/src/bundle-asset-resource.ts +8 -0
  84. package/src/host/bridge-host.ts +34 -6
  85. package/src/swift-compile.ts +5 -0
  86. package/src/worker-system-chunks.ts +10 -9
@@ -716,14 +716,14 @@ export interface MaestroStep {
716
716
  stopApp?: boolean | string | { appId?: string }
717
717
  clearState?: boolean | { appId?: string }
718
718
  clearKeychain?: boolean
719
- copyTextFrom?: string | { id?: string; text?: string }
719
+ copyTextFrom?: string | FlowTargetSelector
720
720
  evalScript?: string
721
721
  openLink?: string | { link: string; autoVerify?: boolean; browser?: boolean }
722
722
  // maestro `when:` conditional runs the step only if the predicate holds.
723
723
  // supports `visible` / `notVisible` with the same matcher shape used elsewhere.
724
724
  when?: {
725
- visible?: string | { id?: string; text?: string }
726
- notVisible?: string | { id?: string; text?: string }
725
+ visible?: string | FlowTargetSelector
726
+ notVisible?: string | FlowTargetSelector
727
727
  platform?: string
728
728
  true?: string | boolean
729
729
  }
@@ -1310,7 +1310,10 @@ export class SootSimBridgeFlowRunner {
1310
1310
  // engine's XCTest accessibility projection — one bridge evaluate, then the
1311
1311
  // same Orchestra.buildFilter semantics the render resolver implements, over
1312
1312
  // PeachAccessibilityNode instead of the visible semantic tree.
1313
- private async findElementAccessibilityTree(opts: FlowTargetSelector) {
1313
+ private async resolveAccessibilityElement(
1314
+ opts: FlowTargetSelector,
1315
+ command: string,
1316
+ ): Promise<PeachAccessibilityNode | null> {
1314
1317
  const tree = await this.evaluate(`(async () => {
1315
1318
  const test = window.__sootsimTest
1316
1319
  if (!test || typeof test.captureAccessibilityTree !== 'function') throw new Error('engine accessibility snapshot is unavailable')
@@ -1320,10 +1323,15 @@ export class SootSimBridgeFlowRunner {
1320
1323
  throw new Error('engine returned an invalid accessibility snapshot')
1321
1324
  if (tree.length === 0) return null
1322
1325
  if (tree.some((node) => node.platform !== 'ios'))
1323
- throw new Error(
1324
- 'containsChild, containsDescendants and focused require the iOS accessibility hierarchy',
1325
- )
1326
- const node = resolveAccessibilitySelector(tree, opts)
1326
+ throw new Error(`${command} requires the iOS accessibility hierarchy`)
1327
+ return resolveAccessibilitySelector(tree, opts)
1328
+ }
1329
+
1330
+ private async findElementAccessibilityTree(opts: FlowTargetSelector) {
1331
+ const node = await this.resolveAccessibilityElement(
1332
+ opts,
1333
+ 'containsChild, containsDescendants and focused',
1334
+ )
1327
1335
  if (!node) return null
1328
1336
  const frame = node.frame
1329
1337
  return {
@@ -1865,7 +1873,7 @@ export class SootSimBridgeFlowRunner {
1865
1873
  // assert a button that no finger could reach. visibleFrame already carries
1866
1874
  // the clipped, occlusion-subtracted rect, and tap-target refuses a covered
1867
1875
  // node on the same basis, so assertions and taps now agree.
1868
- private async isElementVisible(opts: { id?: string; text?: string }) {
1876
+ private async isElementVisible(opts: FlowTargetSelector) {
1869
1877
  const element = await this.findElement(opts)
1870
1878
  if (!element) return false
1871
1879
  const frame = element.visibleFrame
@@ -2894,17 +2902,17 @@ export class SootSimBridgeFlowRunner {
2894
2902
 
2895
2903
  // maestro copyTextFrom: find an element and capture its text for use in
2896
2904
  // later steps via ${maestro.copiedText} (upstream form) or the legacy
2897
- // ${maestroCopiedText}. the matcher shape matches tapOn.
2898
- async copyTextFrom(target: string | { id?: string; text?: string }) {
2899
- const opts = typeof target === 'string' ? { id: target } : target
2900
- const node = await this.findElement(opts)
2905
+ // ${maestroCopiedText}. the string form is a text selector, as in tapOn.
2906
+ // the copied text is Orchestra.resolveText over the XCTest attributes:
2907
+ // text (the value), then hintText (the placeholder), then the label.
2908
+ async copyTextFrom(target: string | FlowTargetSelector) {
2909
+ const opts = typeof target === 'string' ? { text: target } : target
2910
+ assertSupportedSelector(opts)
2911
+ const node = await this.resolveAccessibilityElement(opts, 'copyTextFrom')
2901
2912
  if (!node) {
2902
2913
  throw new Error(`copyTextFrom: element not found: ${JSON.stringify(opts)}`)
2903
2914
  }
2904
- const captured =
2905
- (node as { text?: string | null }).text ??
2906
- (node as { testID?: string | null }).testID ??
2907
- ''
2915
+ const captured = node.value || node.placeholder || node.label || ''
2908
2916
  this.js.setCopiedText(captured)
2909
2917
  this.js.putEnv('maestroCopiedText', captured)
2910
2918
  console.log(`[flow] copied text: ${JSON.stringify(captured)}`)
@@ -17,7 +17,7 @@ import {
17
17
  metroAssetScaleFilename,
18
18
  metroIosAssetDestRelatives,
19
19
  resolveMetroIosAssetDestFiles,
20
- type MetroArtifactAssetSize,
20
+ separateMetroArtifactAssets,
21
21
  type MetroAssetDescriptor,
22
22
  } from '../../contrast-bundler/src/metroAssetArtifact.ts'
23
23
  import {
@@ -647,18 +647,6 @@ function searchMetroAssetDest(
647
647
  return { dest: winner.dest, searched, truncated, unconfirmed: best === 0 }
648
648
  }
649
649
 
650
- function largestEmbeddedAssets(
651
- sizes: readonly MetroArtifactAssetSize[],
652
- count: number,
653
- ): string {
654
- if (sizes.length === 0) return ''
655
- const largest = sizes
656
- .slice(0, count)
657
- .map((entry) => `${entry.asset} ${entry.bytes} bytes`)
658
- .join(', ')
659
- return ` Largest embedded assets: ${largest}.`
660
- }
661
-
662
650
  async function inferCloudModuleIdentity(
663
651
  source: string,
664
652
  ): Promise<RNXMetroModuleIdentityMetadata> {
@@ -893,9 +881,15 @@ async function produceArtifact(
893
881
  })
894
882
  const bytes = Buffer.from(artifact.code, 'utf8')
895
883
  const assets = artifact.receipt.assets
896
- if (bytes.length > maxBytes) {
884
+ // previews keep their self-contained artifact. nano loads only the executable;
885
+ // its verified asset bytes live beside the upload in R2.
886
+ const executableBytes =
887
+ command === PREVIEW_COMMAND
888
+ ? bytes.length
889
+ : Buffer.byteLength((await separateMetroArtifactAssets(artifact.code)).code, 'utf8')
890
+ if (executableBytes > maxBytes) {
897
891
  throw new Error(
898
- `${REMOTE_COMMAND} artifact is ${bytes.length} bytes and exceeds the ${maxBytes}-byte limit. Embedded assets weigh ${assets.bytes} bytes on disk, and base64 embedding costs about a third on top of that, so the practical asset budget is roughly ${Math.round((maxBytes * 0.75) / 1e6)} MB.${largestEmbeddedAssets(assets.sizes, 10)}`,
892
+ `${command} executable is ${executableBytes} bytes and exceeds the ${maxBytes}-byte limit. The ${assets.bytes} asset bytes are stored outside guest code.`,
899
893
  )
900
894
  }
901
895
  const warnings: string[] = []
@@ -909,11 +903,10 @@ async function produceArtifact(
909
903
  `${command} embedded a placeholder image for ${prepared.substituted.length} asset(s) no scale of which is in ${prepared.search.searched.join(', ') || 'any asset dest directory'}: ${prepared.substituted.join(', ')}. Rebuild with \`react-native bundle --assets-dest\` to ship the real images.`,
910
904
  )
911
905
  }
912
- // an artifact this close to the ceiling is one asset away from being refused,
913
- // and the producer knows which assets it would be.
914
- if (bytes.length >= Math.floor(maxBytes * 0.8)) {
906
+ // warn on executable headroom; external assets do not consume this ceiling.
907
+ if (executableBytes >= Math.floor(maxBytes * 0.8)) {
915
908
  warnings.push(
916
- `${command} artifact is ${bytes.length} bytes, ${Math.round((bytes.length / maxBytes) * 100)}% of the ${maxBytes}-byte limit.${largestEmbeddedAssets(assets.sizes, 5)}`,
909
+ `${command} executable is ${executableBytes} bytes, ${Math.round((executableBytes / maxBytes) * 100)}% of the ${maxBytes}-byte limit.`,
917
910
  )
918
911
  }
919
912
  return {
@@ -357,6 +357,7 @@ export async function waitForSootsimIdle({
357
357
  return true
358
358
  }
359
359
  while (Date.now() < deadline) {
360
+ const pollStarted = Date.now()
360
361
  const snapshot = await readSnapshot()
361
362
  if (snapshot.runtimeUnsupported) return snapshot.runtimeUnsupported
362
363
  polls++
@@ -429,7 +430,9 @@ export async function waitForSootsimIdle({
429
430
  lastRequestTotal = snapshot.requestTotal
430
431
  lastAppCommits = snapshot.appCommits
431
432
  lastNodeCount = snapshot.nodeCount
432
- await sleep(pollMs)
433
+ // reply latency belongs inside the poll interval; the stillness window
434
+ // above remains measured from completed observations.
435
+ await sleep(Math.max(0, pollMs - (Date.now() - pollStarted)))
433
436
  }
434
437
  const last = await readSnapshot()
435
438
  if (last.runtimeUnsupported) return last.runtimeUnsupported
@@ -1,10 +1,13 @@
1
- import { acquireChromiumAdmission } from '../../../../scripts/lib/chromium-admission'
1
+ import {
2
+ acquireChromiumAdmission,
3
+ readChromiumQueue,
4
+ } from '../../../../scripts/lib/chromium-admission'
2
5
  // the detached browser host, as CJS source.
3
6
  //
4
7
  // it resolves playwright from the absolute path the driver hands it, launches
5
8
  // Chrome for Testing, opens the target url, then keeps itself (and therefore
6
9
  // the browser) alive until the page asks it to close (`peach close`, or the
7
- // bridge reaping the sim after AUTOMATION_SIM_IDLE_REAP_TTL_MS with no cli),
10
+ // bridge reclaiming an idle sim for a queued chromium launch),
8
11
  // the browser disconnects, or its owning session exits. all inputs arrive
9
12
  // through the environment.
10
13
  //
@@ -119,6 +122,7 @@ const webViewAutomationHelpers = ${webViewAutomationHelpersSource()};
119
122
  const readBrowserCompositeCaptureRequest = ${readBrowserCompositeCaptureRequest.toString()};
120
123
  const resolveBrowserCompositeCdpClip = ${resolveBrowserCompositeCdpClip.toString()};
121
124
  const acquireChromiumAdmission = ${acquireChromiumAdmission.toString()};
125
+ const readChromiumQueue = ${readChromiumQueue.toString()};
122
126
  // chrome tree reaper — playwright's browser.close() and even SIGKILLing the
123
127
  // root chrome process do NOT reliably take down the helper tree (gpu, renderer,
124
128
  // network/storage utilities). they reparent to launchd/init and survive, each
@@ -513,6 +517,7 @@ const cleanupProfile = () => {
513
517
  path: require('path'),
514
518
  childProcess: require('child_process'),
515
519
  label: 'peach sim host ' + profileDir,
520
+ readQueue: readChromiumQueue,
516
521
  });
517
522
  let launchErr = null;
518
523
  let launchedChannel = null;
@@ -226,14 +226,14 @@ async function launch(opts: DriverLaunchOptions): Promise<DriverLaunchResult> {
226
226
  })
227
227
  child.unref()
228
228
 
229
- // name both lifetime bounds: the bridge closes an automation sim neither a
230
- // cli nor a person has touched for the idle window, and the host watchdog closes chrome ~5s
231
- // after the owning session pid exits, which surprises one-shot/detached
232
- // shells (their topmost non-init ancestor is the shell itself, so the sim
233
- // dies the moment the command finishes).
229
+ // name both lifetime bounds: the host watchdog closes chrome ~5s after the
230
+ // owning session pid exits, which surprises one-shot/detached shells (their
231
+ // topmost non-init ancestor is the shell itself, so the sim dies the moment
232
+ // the command finishes), and the bridge reclaims a sim idle past its window
233
+ // only for a chromium launch waiting on the machine's cap.
234
234
  const ownerComm = getProcessComm(ownerPid)
235
235
  const idleMinutes = AUTOMATION_SIM_IDLE_REAP_TTL_MS / 60_000
236
- const ownerNote = ` — browser closes after ${idleMinutes} min with no peach command or input, or when pid ${ownerPid}${ownerComm ? ` (${ownerComm})` : ''} exits`
236
+ const ownerNote = ` — browser closes when pid ${ownerPid}${ownerComm ? ` (${ownerComm})` : ''} exits, or after ${idleMinutes} min with no peach command or input if another browser launch is waiting for its slot`
237
237
  return {
238
238
  launched: true,
239
239
  message: `playwright chrome launched → ${targetUrl.href}${ownerNote}`,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } 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.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } 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.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (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.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (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.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (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.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -76,6 +76,16 @@ var init_internal_child = __esm({
76
76
  }
77
77
  });
78
78
 
79
+ // src/admitted-mac-build.ts
80
+ function admittedMacBuilderSlot(env = process.env) {
81
+ return env.CONTRAST_REMOTE_BUILD === "mac" && env.REMOTE_MAC_SLOT_HELD === "1" && env.CONTRAST_HEAVY_ADMITTED === "1";
82
+ }
83
+ var init_admitted_mac_build = __esm({
84
+ "src/admitted-mac-build.ts"() {
85
+ "use strict";
86
+ }
87
+ });
88
+
79
89
  // src/is-record.ts
80
90
  function isRecord(value) {
81
91
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -2329,7 +2339,7 @@ function compileSwiftProjectUnit(input, options) {
2329
2339
  };
2330
2340
  const hash = swiftArtifactHash(input, options.release, moduleRoot);
2331
2341
  return serialize(root, async () => {
2332
- if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && moduleRoot === import_node_path2.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
2342
+ if (process.platform === "darwin" && process.env.TM_SESSION && !admittedMacBuilderSlot() && process.env.CI !== "true" && moduleRoot === import_node_path2.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
2333
2343
  const requestRoot = (0, import_node_fs2.mkdtempSync)(import_node_path2.default.join(root, ".builder-request-"));
2334
2344
  const output = import_node_path2.default.join(requestRoot, "output");
2335
2345
  const request = import_node_path2.default.join(requestRoot, "request.json");
@@ -2459,6 +2469,7 @@ var init_swift_compile = __esm({
2459
2469
  import_node_os = __toESM(require("node:os"), 1);
2460
2470
  import_node_path2 = __toESM(require("node:path"), 1);
2461
2471
  import_node_util2 = require("node:util");
2472
+ init_admitted_mac_build();
2462
2473
  init_swift_distribution_contract();
2463
2474
  init_swift_icu();
2464
2475
  init_swift_package();
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (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.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 40761776;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (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;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/config.ts
4
4
  import { isValidRuntimeVersion } from "@contrast/runtime-delivery/version";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1366,30 +1366,14 @@ var os = __toESM(require("node:os"), 1);
1366
1366
  var path = __toESM(require("node:path"), 1);
1367
1367
 
1368
1368
  // ../../scripts/lib/chromium-admission.ts
1369
- async function acquireChromiumAdmission(deps) {
1370
- const { fs: fs3, os: os2, path: path3, childProcess: childProcess2, label } = deps;
1369
+ function readChromiumQueue(deps, verified, own) {
1370
+ const { fs: fs3, os: os2, path: path3, childProcess: childProcess2 } = deps;
1371
1371
  const dir = path3.join(
1372
1372
  process.platform === "win32" ? os2.tmpdir() : "/tmp",
1373
1373
  "chromium-admission"
1374
1374
  );
1375
1375
  fs3.mkdirSync(dir, { recursive: true });
1376
1376
  const limit = Math.max(2, Math.floor(os2.availableParallelism() / 3));
1377
- const startedAt = Math.round(Date.now() / 1e3 - process.uptime());
1378
- const name2 = `${process.pid}-${startedAt}-${Math.random().toString(36).slice(2, 10)}`;
1379
- const ticket = path3.join(dir, name2);
1380
- fs3.closeSync(fs3.openSync(ticket, "wx"));
1381
- let released = false;
1382
- const release = () => {
1383
- if (released) return;
1384
- released = true;
1385
- process.removeListener("exit", release);
1386
- try {
1387
- fs3.unlinkSync(ticket);
1388
- } catch {
1389
- }
1390
- };
1391
- process.on("exit", release);
1392
- const verified = /* @__PURE__ */ new Map();
1393
1377
  const live = (entry) => {
1394
1378
  const match = /^(\d+)-(\d+)-/.exec(entry);
1395
1379
  if (!match) return false;
@@ -1413,29 +1397,50 @@ async function acquireChromiumAdmission(deps) {
1413
1397
  verified.set(entry, same);
1414
1398
  return same;
1415
1399
  };
1416
- let waited = false;
1417
- while (true) {
1418
- const tickets = [];
1419
- for (const entry of fs3.readdirSync(dir)) {
1420
- if (entry !== name2 && !live(entry)) {
1421
- try {
1422
- fs3.unlinkSync(path3.join(dir, entry));
1423
- } catch {
1424
- }
1425
- continue;
1426
- }
1400
+ const tickets = [];
1401
+ for (const entry of fs3.readdirSync(dir)) {
1402
+ if (entry !== own && !live(entry)) {
1427
1403
  try {
1428
- tickets.push({
1429
- entry,
1430
- created: fs3.statSync(path3.join(dir, entry), { bigint: true }).ctimeNs
1431
- });
1404
+ fs3.unlinkSync(path3.join(dir, entry));
1432
1405
  } catch {
1433
1406
  }
1407
+ continue;
1434
1408
  }
1435
- tickets.sort(
1436
- (a, b) => a.created === b.created ? a.entry < b.entry ? -1 : 1 : a.created < b.created ? -1 : 1
1437
- );
1438
- const rank = tickets.findIndex((t) => t.entry === name2);
1409
+ try {
1410
+ tickets.push({
1411
+ entry,
1412
+ created: fs3.statSync(path3.join(dir, entry), { bigint: true }).ctimeNs
1413
+ });
1414
+ } catch {
1415
+ }
1416
+ }
1417
+ tickets.sort(
1418
+ (a, b) => a.created === b.created ? a.entry < b.entry ? -1 : 1 : a.created < b.created ? -1 : 1
1419
+ );
1420
+ return { dir, limit, tickets: tickets.map((t) => t.entry) };
1421
+ }
1422
+ async function acquireChromiumAdmission(deps) {
1423
+ const { fs: fs3, path: path3, label, readQueue } = deps;
1424
+ const verified = /* @__PURE__ */ new Map();
1425
+ const startedAt = Math.round(Date.now() / 1e3 - process.uptime());
1426
+ const name2 = `${process.pid}-${startedAt}-${Math.random().toString(36).slice(2, 10)}`;
1427
+ const ticket = path3.join(readQueue(deps, verified, name2).dir, name2);
1428
+ fs3.closeSync(fs3.openSync(ticket, "wx"));
1429
+ let released = false;
1430
+ const release = () => {
1431
+ if (released) return;
1432
+ released = true;
1433
+ process.removeListener("exit", release);
1434
+ try {
1435
+ fs3.unlinkSync(ticket);
1436
+ } catch {
1437
+ }
1438
+ };
1439
+ process.on("exit", release);
1440
+ let waited = false;
1441
+ while (true) {
1442
+ const { limit, tickets } = readQueue(deps, verified, name2);
1443
+ const rank = tickets.indexOf(name2);
1439
1444
  if (rank < 0) {
1440
1445
  fs3.closeSync(fs3.openSync(ticket, "wx"));
1441
1446
  continue;
@@ -1446,7 +1451,7 @@ async function acquireChromiumAdmission(deps) {
1446
1451
  return release;
1447
1452
  }
1448
1453
  if (!waited) {
1449
- const holders = tickets.slice(0, limit).map((t) => t.entry.split("-")[0]);
1454
+ const holders = tickets.slice(0, limit).map((t) => t.split("-")[0]);
1450
1455
  process.stderr.write(
1451
1456
  `[chromium-admission] ${label}: ${limit} chromium launches already run on this machine (pids ${holders.join(" ")}), queued ${rank - limit + 1}
1452
1457
  `
@@ -1750,7 +1755,8 @@ async function launchReapedScoped(launch, readIdentity = processIdentity) {
1750
1755
  os,
1751
1756
  path,
1752
1757
  childProcess,
1753
- label: process.argv.slice(1, 3).join(" ")
1758
+ label: process.argv.slice(1, 3).join(" "),
1759
+ readQueue: readChromiumQueue
1754
1760
  });
1755
1761
  let browser;
1756
1762
  try {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1436,6 +1436,11 @@ var import_node_os = __toESM(require("node:os"), 1);
1436
1436
  var import_node_path2 = __toESM(require("node:path"), 1);
1437
1437
  var import_node_util2 = require("node:util");
1438
1438
 
1439
+ // src/admitted-mac-build.ts
1440
+ function admittedMacBuilderSlot(env = process.env) {
1441
+ return env.CONTRAST_REMOTE_BUILD === "mac" && env.REMOTE_MAC_SLOT_HELD === "1" && env.CONTRAST_HEAVY_ADMITTED === "1";
1442
+ }
1443
+
1439
1444
  // src/is-record.ts
1440
1445
  function isRecord(value) {
1441
1446
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -3745,7 +3750,7 @@ function compileSwiftProjectUnit(input, options) {
3745
3750
  };
3746
3751
  const hash = swiftArtifactHash(input, options.release, moduleRoot);
3747
3752
  return serialize(root, async () => {
3748
- if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && moduleRoot === import_node_path2.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
3753
+ if (process.platform === "darwin" && process.env.TM_SESSION && !admittedMacBuilderSlot() && process.env.CI !== "true" && moduleRoot === import_node_path2.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
3749
3754
  const requestRoot = (0, import_node_fs2.mkdtempSync)(import_node_path2.default.join(root, ".builder-request-"));
3750
3755
  const output = import_node_path2.default.join(requestRoot, "output");
3751
3756
  const request = import_node_path2.default.join(requestRoot, "request.json");
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bundleGlobalFooter.ts
4
4
  function readBundleGlobalFooter(source, name) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1477 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;