peachsim 0.1.718 → 0.1.720

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 (77) hide show
  1. package/README.md +7 -1
  2. package/cli/commands/box.ts +2 -7
  3. package/cli/commands/control.ts +7 -7
  4. package/cli/commands/login.ts +5 -17
  5. package/cli/open-url.ts +1 -0
  6. package/detox/index.ts +24 -8
  7. package/dist-lib/agent-daemon-client.cjs +1 -1
  8. package/dist-lib/agent-events.cjs +1 -1
  9. package/dist-lib/agent-identity.cjs +1 -1
  10. package/dist-lib/agent-sessions.cjs +1 -1
  11. package/dist-lib/attached-projects.cjs +1 -1
  12. package/dist-lib/auth/shared-session.cjs +1 -1
  13. package/dist-lib/backend-origin.cjs +1 -1
  14. package/dist-lib/beta.cjs +1 -1
  15. package/dist-lib/beta.mjs +1 -1
  16. package/dist-lib/bridge-constants.cjs +1 -1
  17. package/dist-lib/bridge-contract-input.cjs +1 -1
  18. package/dist-lib/bridge-contract-input.mjs +1 -1
  19. package/dist-lib/bridge-contract.cjs +1 -1
  20. package/dist-lib/bridge-contract.mjs +1 -1
  21. package/dist-lib/capture-contract.cjs +1 -1
  22. package/dist-lib/capture-contract.mjs +1 -1
  23. package/dist-lib/cli-constants.cjs +1 -1
  24. package/dist-lib/cloud-contract.cjs +1 -1
  25. package/dist-lib/cloud-contract.mjs +1 -1
  26. package/dist-lib/cloud-test-args.cjs +1 -1
  27. package/dist-lib/cloud-test-args.mjs +1 -1
  28. package/dist-lib/cloud.cjs +1 -1
  29. package/dist-lib/cloud.mjs +1 -1
  30. package/dist-lib/config.cjs +1 -1
  31. package/dist-lib/detox/index.cjs +19 -4
  32. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  33. package/dist-lib/home-paths.cjs +1 -1
  34. package/dist-lib/host/bridge-host.cjs +27 -4
  35. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  37. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  38. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  39. package/dist-lib/host/websocket-proxy.cjs +1 -1
  40. package/dist-lib/index.cjs +1 -1
  41. package/dist-lib/jump-to-source-babel.cjs +1 -1
  42. package/dist-lib/jump-to-source-native.cjs +1 -1
  43. package/dist-lib/kotlin-host.cjs +1 -1
  44. package/dist-lib/menu.cjs +1 -1
  45. package/dist-lib/menu.mjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  48. package/dist-lib/metro-production-bundle.cjs +1 -1
  49. package/dist-lib/metro-production-bundle.mjs +1 -1
  50. package/dist-lib/metro.cjs +1 -1
  51. package/dist-lib/native-app-identity.cjs +1 -1
  52. package/dist-lib/native-app-identity.mjs +1 -1
  53. package/dist-lib/native-firebase-metadata.cjs +1 -1
  54. package/dist-lib/native-firebase-metadata.mjs +1 -1
  55. package/dist-lib/plist.cjs +1 -1
  56. package/dist-lib/plist.mjs +1 -1
  57. package/dist-lib/profiles.cjs +1 -1
  58. package/dist-lib/public-brand.cjs +1 -1
  59. package/dist-lib/react-native-host-modules.cjs +1 -1
  60. package/dist-lib/react-native-host-modules.mjs +1 -1
  61. package/dist-lib/render-mode.cjs +1 -1
  62. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  63. package/dist-lib/sdk.cjs +1 -1
  64. package/dist-lib/sdk.mjs +1 -1
  65. package/dist-lib/skills.cjs +32 -9
  66. package/dist-lib/swift-compile.cjs +1 -1
  67. package/dist-lib/swift-compile.mjs +1 -1
  68. package/dist-lib/swift-package.cjs +1 -1
  69. package/dist-lib/swift-package.mjs +1 -1
  70. package/dist-lib/swift-submit.cjs +1 -1
  71. package/dist-lib/swift-submit.mjs +1 -1
  72. package/dist-lib/swift-toolchain.cjs +1 -1
  73. package/dist-lib/swift.cjs +1 -1
  74. package/dist-lib/vite-swift.cjs +1 -1
  75. package/dist-lib/vite.cjs +1 -1
  76. package/package.json +1 -1
  77. package/src/host/open-url.ts +29 -4
package/README.md CHANGED
@@ -160,7 +160,13 @@ daemon is reachable, then opens a `WsBridge` (`cli/ws-bridge.ts`) on **port
160
160
  the Maestro runner is `cli/bridge-flow-runner.ts`; the Detox compat driver
161
161
  is in `detox/`. Test and screenshot paths additionally use `cli/drivers/*`.
162
162
  Browser sims launch in an isolated Playwright Chrome for Testing profile;
163
- Electron is the native desktop surface.
163
+ Electron is the native desktop surface. Team Machine sessions (`TM_SESSION`)
164
+ default to headless Playwright; `--headed` explicitly opens an isolated headed
165
+ browser. System browser launches, including share links, login, box links and
166
+ repo scripts, go through `src/host/open-url.ts`. That owner refuses a system
167
+ browser launch inside a Team Machine session and prints the URL plus
168
+ `--driver playwright --headless` guidance. Interactive human launches keep
169
+ their system browser behavior.
164
170
 
165
171
  **The daemon is one process** — `SootSimBridgeHost` (`src/host/bridge-host.ts`).
166
172
  `peach serve` runs it in the foreground; the background daemon is the *same
@@ -10,7 +10,6 @@
10
10
  // name on the command line, else the one `peach box use` remembered. see
11
11
  // boxTarget below.
12
12
 
13
- import { spawn } from 'node:child_process'
14
13
  import fs from 'node:fs'
15
14
  import path from 'node:path'
16
15
  import { createInterface } from 'node:readline'
@@ -35,6 +34,7 @@ import { readDefaultBox, writeDefaultBox } from '../../src/home-paths'
35
34
  import { rnxPublicBrand } from '../../src/public-brand'
36
35
  import { authHeaderOrExit, cloudAccountIdOrExit, type CliAuth } from '../auth'
37
36
  import { produceCloudBoxArtifact, type CloudBoxArtifactProduction } from '../cloud-client'
37
+ import { openUrl } from '../open-url'
38
38
  import { findRepositoryPackageRoot } from '../setup-repository'
39
39
  import { resolvePlacement } from '../ws-bridge'
40
40
  import { BundleFilePlane } from './box/bundle-plane'
@@ -490,12 +490,7 @@ async function runCloudBoxOpen(args: string[]): Promise<number> {
490
490
  * URL exists, so dropping it would cost the caller another mint.
491
491
  */
492
492
  export async function openInBrowser(url: string): Promise<number> {
493
- const child = spawn('open', [url], { stdio: 'ignore' })
494
- const opened = await new Promise<boolean>((resolve) => {
495
- child.once('error', () => resolve(false))
496
- child.once('close', (code) => resolve(code === 0))
497
- })
498
- if (!opened) console.log(url)
493
+ await openUrl(url, { background: false, detached: false }).catch(() => console.log(url))
499
494
  return 0
500
495
  }
501
496
 
@@ -77,7 +77,7 @@ import {
77
77
  saveCurrentSimId,
78
78
  } from '../current-sim'
79
79
  import { getDriver } from '../drivers/registry'
80
- import { openUrl as openUrlInBrowser } from '../open-url'
80
+ import { isTeamMachineSession, openUrl as openUrlInBrowser } from '../open-url'
81
81
  import { diagnosticsAllowedForCurrentProcess } from '../privacy'
82
82
  import { rethrowIfExit, rnxExit } from '../run-rnx'
83
83
  import { collectRuntimeDiagnostics } from '../runtime-diagnostics'
@@ -171,12 +171,13 @@ function simUsesDriver(sim: BridgeSimInfo, driverId: DriverId): boolean {
171
171
 
172
172
  // resolve headless for a driver launch. explicit flags always win
173
173
  // (--headless → true, --headed → false). otherwise: a headed default
174
- // on mac/windows. on linux with no DISPLAY/WAYLAND_DISPLAY there is no
174
+ // on mac/windows for humans; tm sessions default headless. on linux with no DISPLAY/WAYLAND_DISPLAY there is no
175
175
  // X server, so the playwright driver auto-flips to headless with a
176
176
  // single-line note. electron ignores headless mode, so it defaults false.
177
- function resolveDriverHeadless(args: string[], driverId: string): boolean {
177
+ export function resolveDriverHeadless(args: string[], driverId: string): boolean {
178
178
  if (args.includes('--headless')) return true
179
179
  if (args.includes('--headed')) return false
180
+ if (driverId === 'playwright' && isTeamMachineSession()) return true
180
181
  if (
181
182
  driverId === 'playwright' &&
182
183
  process.platform === 'linux' &&
@@ -1592,9 +1593,7 @@ export async function runOpenCommand(
1592
1593
  themeArg !== 'dark' &&
1593
1594
  themeArg !== 'auto'
1594
1595
  ) {
1595
- console.error(
1596
- ` peach open: --theme must be light, dark, or auto, got "${themeArg}"`,
1597
- )
1596
+ console.error(` peach open: --theme must be light, dark, or auto, got "${themeArg}"`)
1598
1597
  rnxExit(1)
1599
1598
  }
1600
1599
 
@@ -1623,7 +1622,7 @@ export async function runOpenCommand(
1623
1622
  console.log(
1624
1623
  ' that’s a peach preview/build link — a full player page, not a driveable sim.',
1625
1624
  )
1626
- console.log(' opening it in your browser for viewing…')
1625
+ if (!isTeamMachineSession()) console.log(' opening it in your browser for viewing…')
1627
1626
  try {
1628
1627
  await openUrlInBrowser(target, { background: false })
1629
1628
  } catch (err) {
@@ -1703,6 +1702,7 @@ export async function runOpenCommand(
1703
1702
  : process.env.CI === '1' ||
1704
1703
  process.env.CI === 'true' ||
1705
1704
  process.env.GITHUB_ACTIONS === 'true' ||
1705
+ isTeamMachineSession() ||
1706
1706
  isAgentEnv() ||
1707
1707
  !process.stdin.isTTY
1708
1708
  ? 'playwright'
@@ -1,4 +1,3 @@
1
- import { exec } from 'node:child_process'
2
1
  import { randomBytes } from 'node:crypto'
3
2
  import http from 'node:http'
4
3
  import { createInterface } from 'node:readline/promises'
@@ -10,6 +9,7 @@ import {
10
9
  } from '../../src/auth/shared-session'
11
10
  import { isLoopbackHost } from '../../src/backend-origin'
12
11
  import { rnxPublicBrand } from '../../src/public-brand'
12
+ import { openUrl } from '../open-url'
13
13
  import { rnxExit } from '../run-rnx'
14
14
 
15
15
  const REMOTE_DEFAULT_ORIGIN = process.env.PEACH_AUTH_ORIGIN || 'https://contrast.dev'
@@ -112,21 +112,6 @@ function extractStringFlag(args: string[], name: string): string | undefined {
112
112
  return value
113
113
  }
114
114
 
115
- function openBrowser(url: string) {
116
- const command =
117
- process.platform === 'darwin'
118
- ? `open "${url}"`
119
- : process.platform === 'win32'
120
- ? `start "" "${url}"`
121
- : `xdg-open "${url}"`
122
-
123
- exec(command, (err) => {
124
- if (!err) return
125
- console.log(' could not open browser automatically.')
126
- console.log(` open this URL manually:\n ${url}\n`)
127
- })
128
- }
129
-
130
115
  function renderCallbackPage(body: string) {
131
116
  return `<!doctype html>
132
117
  <html>
@@ -330,7 +315,10 @@ export async function runLogin(args: string[]) {
330
315
  )
331
316
  console.log(` waiting up to 5 minutes for the browser (ctrl+c to cancel)`)
332
317
  console.log(` if nothing opens, visit:\n ${url.toString()}\n`)
333
- openBrowser(url.toString())
318
+ void openUrl(url.toString(), { background: false, detached: false }).catch(() => {
319
+ console.log(' could not open browser automatically.')
320
+ console.log(` open this URL manually:\n ${url}\n`)
321
+ })
334
322
  })
335
323
  })
336
324
 
package/cli/open-url.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export {
2
2
  buildOpenUrlCommand,
3
3
  launchUrl,
4
+ isTeamMachineSession,
4
5
  openUrl,
5
6
  type OpenUrlCommand,
6
7
  type OpenUrlLaunchResult,
package/detox/index.ts CHANGED
@@ -47,6 +47,7 @@ import {
47
47
  } from './motion-change.cjs'
48
48
  import { describeSootsimBridgeFailure, navigateSootsimPage } from './navigation-lifecycle'
49
49
  import { REQUIRED_IDENTICAL_PROOF_FRAMES, framesIdentical } from './proof-frame.cjs'
50
+ import type { SootSimInteractBridge } from '../../peach-globals/src/index'
50
51
  import type { SootSimElement } from './element-types'
51
52
  import type { Browser, BrowserContext, Page } from 'playwright'
52
53
 
@@ -2239,11 +2240,9 @@ export const device = {
2239
2240
  __sootsimVisibleChangeCaptures?: Record<string, CaptureState>
2240
2241
  SootSim?: {
2241
2242
  bridges?: {
2242
- interact?: {
2243
- touchDown: (x: number, y: number) => Promise<boolean>
2244
- touchMove: (x: number, y: number) => Promise<boolean>
2245
- touchUp: (x: number, y: number) => Promise<boolean>
2246
- }
2243
+ interact?: Required<
2244
+ Pick<SootSimInteractBridge, 'touchDown' | 'touchMove' | 'touchUp'>
2245
+ >
2247
2246
  liveComposite?: {
2248
2247
  captureFresh: () => Promise<{
2249
2248
  canvas: HTMLCanvasElement | null
@@ -2410,11 +2409,23 @@ export const device = {
2410
2409
  holdState.nextMove++
2411
2410
  holdState.x = move.x
2412
2411
  holdState.y = move.y
2413
- await interact.touchMove(move.x, move.y)
2412
+ // event time remains on the replay clock when delivery ceilings
2413
+ // to a display tick or several native samples share one frame.
2414
+ await interact.touchMove(
2415
+ move.x,
2416
+ move.y,
2417
+ 999,
2418
+ controller.initialFrame.virtualTimestampMs + move.afterMs,
2419
+ )
2414
2420
  }
2415
2421
  if (receipt.frameIndex < holdEventFrameIndex(input.hold.durationMs)) return
2416
2422
  holdState.released = true
2417
- await interact.touchUp(holdState.x, holdState.y)
2423
+ await interact.touchUp(
2424
+ holdState.x,
2425
+ holdState.y,
2426
+ 999,
2427
+ controller.initialFrame.virtualTimestampMs + input.hold.durationMs,
2428
+ )
2418
2429
  }
2419
2430
  // an anchor is the frame before its visible change, which the detector
2420
2431
  // has already stepped past; its bitmap is kept so a 0ms stage can still
@@ -2426,7 +2437,12 @@ export const device = {
2426
2437
  baselineBitmap.close()
2427
2438
  state.ready = true
2428
2439
  if (input.hold && interact) {
2429
- const hit = await interact.touchDown(input.hold.x, input.hold.y)
2440
+ const hit = await interact.touchDown(
2441
+ input.hold.x,
2442
+ input.hold.y,
2443
+ 999,
2444
+ controller.initialFrame.virtualTimestampMs,
2445
+ )
2430
2446
  if (!hit) {
2431
2447
  throw new Error(
2432
2448
  `peach motion hold missed at ${input.hold.x},${input.hold.y}`,
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (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
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (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
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (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
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (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
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (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
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (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
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -5607,11 +5607,21 @@ var device = {
5607
5607
  holdState.nextMove++;
5608
5608
  holdState.x = move.x;
5609
5609
  holdState.y = move.y;
5610
- await interact.touchMove(move.x, move.y);
5610
+ await interact.touchMove(
5611
+ move.x,
5612
+ move.y,
5613
+ 999,
5614
+ controller.initialFrame.virtualTimestampMs + move.afterMs
5615
+ );
5611
5616
  }
5612
5617
  if (receipt.frameIndex < holdEventFrameIndex(input.hold.durationMs)) return;
5613
5618
  holdState.released = true;
5614
- await interact.touchUp(holdState.x, holdState.y);
5619
+ await interact.touchUp(
5620
+ holdState.x,
5621
+ holdState.y,
5622
+ 999,
5623
+ controller.initialFrame.virtualTimestampMs + input.hold.durationMs
5624
+ );
5615
5625
  };
5616
5626
  const keptFrames = /* @__PURE__ */ new Map();
5617
5627
  try {
@@ -5620,7 +5630,12 @@ var device = {
5620
5630
  baselineBitmap.close();
5621
5631
  state.ready = true;
5622
5632
  if (input.hold && interact) {
5623
- const hit = await interact.touchDown(input.hold.x, input.hold.y);
5633
+ const hit = await interact.touchDown(
5634
+ input.hold.x,
5635
+ input.hold.y,
5636
+ 999,
5637
+ controller.initialFrame.virtualTimestampMs
5638
+ );
5624
5639
  if (!hit) {
5625
5640
  throw new Error(
5626
5641
  `peach motion hold missed at ${input.hold.x},${input.hold.y}`
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -11036,7 +11036,11 @@ function buildOpenUrlCommand(url, options = {}) {
11036
11036
  if (platform === "darwin") {
11037
11037
  return {
11038
11038
  command: "open",
11039
- args: options.background === false ? [url] : ["-g", url],
11039
+ args: [
11040
+ ...options.background === false ? [] : ["-g"],
11041
+ ...options.application ? ["-a", options.application] : [],
11042
+ url
11043
+ ],
11040
11044
  via: "system"
11041
11045
  };
11042
11046
  }
@@ -11061,12 +11065,31 @@ async function spawnLaunch(command, args, detached) {
11061
11065
  });
11062
11066
  child.once("error", reject);
11063
11067
  child.once("spawn", () => {
11064
- if (detached) child.unref();
11065
- resolve5(child.pid);
11068
+ if (detached) {
11069
+ child.unref();
11070
+ resolve5(child.pid);
11071
+ }
11066
11072
  });
11073
+ if (!detached) {
11074
+ child.once("close", (code) => {
11075
+ if (code === 0) resolve5(child.pid);
11076
+ else reject(new Error(`${command} exited with code ${code}`));
11077
+ });
11078
+ }
11067
11079
  });
11068
11080
  }
11081
+ function isTeamMachineSession() {
11082
+ return Boolean(process.env.TM_SESSION);
11083
+ }
11069
11084
  async function launchUrl(url, options = {}) {
11085
+ if (isTeamMachineSession()) {
11086
+ console.log(` agent session: refusing to launch the user's browser.
11087
+ ${url}`);
11088
+ console.log(
11089
+ " use an isolated browser: peach open <app target> --driver playwright --headless"
11090
+ );
11091
+ return;
11092
+ }
11070
11093
  const command = buildOpenUrlCommand(url, options);
11071
11094
  const pid = await spawnLaunch(command.command, command.args, options.detached ?? true);
11072
11095
  return {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_NATIVE_USER_AGENT_HEADER = "x-sootsim-native-user-agent";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "Peach";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/native-app-identity.ts
4
4
  var NATIVE_APP_IDENTITY_PREFIX = "globalThis.__sootsimNativeAppIdentity=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/native-firebase-metadata.ts
4
4
  var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/plist.ts
4
4
  import plistModule from "@expo/plist";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/react-native-host-modules.ts
4
4
  var REACT_NATIVE_PASSTHROUGH_SPECIFIERS = [
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (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
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -26529,7 +26529,11 @@ function buildOpenUrlCommand(url, options = {}) {
26529
26529
  if (platform === "darwin") {
26530
26530
  return {
26531
26531
  command: "open",
26532
- args: options.background === false ? [url] : ["-g", url],
26532
+ args: [
26533
+ ...options.background === false ? [] : ["-g"],
26534
+ ...options.application ? ["-a", options.application] : [],
26535
+ url
26536
+ ],
26533
26537
  via: "system"
26534
26538
  };
26535
26539
  }
@@ -26554,12 +26558,31 @@ async function spawnLaunch(command, args, detached) {
26554
26558
  });
26555
26559
  child.once("error", reject);
26556
26560
  child.once("spawn", () => {
26557
- if (detached) child.unref();
26558
- resolve10(child.pid);
26561
+ if (detached) {
26562
+ child.unref();
26563
+ resolve10(child.pid);
26564
+ }
26559
26565
  });
26566
+ if (!detached) {
26567
+ child.once("close", (code) => {
26568
+ if (code === 0) resolve10(child.pid);
26569
+ else reject(new Error(`${command} exited with code ${code}`));
26570
+ });
26571
+ }
26560
26572
  });
26561
26573
  }
26574
+ function isTeamMachineSession() {
26575
+ return Boolean(process.env.TM_SESSION);
26576
+ }
26562
26577
  async function launchUrl(url, options = {}) {
26578
+ if (isTeamMachineSession()) {
26579
+ console.log(` agent session: refusing to launch the user's browser.
26580
+ ${url}`);
26581
+ console.log(
26582
+ " use an isolated browser: peach open <app target> --driver playwright --headless"
26583
+ );
26584
+ return;
26585
+ }
26563
26586
  const command = buildOpenUrlCommand(url, options);
26564
26587
  const pid = await spawnLaunch(command.command, command.args, options.detached ?? true);
26565
26588
  return {
@@ -39779,6 +39802,7 @@ __export(control_exports, {
39779
39802
  printOpenedSim: () => printOpenedSim,
39780
39803
  resolveDefaultShellBaseUrl: () => resolveDefaultShellBaseUrl,
39781
39804
  resolveDriverConnectWaitOptions: () => resolveDriverConnectWaitOptions,
39805
+ resolveDriverHeadless: () => resolveDriverHeadless,
39782
39806
  resolveShellBaseUrlForBridgePort: () => resolveShellBaseUrlForBridgePort,
39783
39807
  runClaimCommand: () => runClaimCommand,
39784
39808
  runCloseCommand: () => runCloseCommand,
@@ -39817,6 +39841,7 @@ function simUsesDriver(sim, driverId) {
39817
39841
  function resolveDriverHeadless(args, driverId) {
39818
39842
  if (args.includes("--headless")) return true;
39819
39843
  if (args.includes("--headed")) return false;
39844
+ if (driverId === "playwright" && isTeamMachineSession()) return true;
39820
39845
  if (driverId === "playwright" && process.platform === "linux" && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) {
39821
39846
  console.error(
39822
39847
  " no display detected \u2192 running playwright headless (override with --headed)"
@@ -40782,9 +40807,7 @@ async function runOpenCommand(args, opts = {}) {
40782
40807
  rnxExit(1);
40783
40808
  }
40784
40809
  if (themeArg !== void 0 && themeArg !== "light" && themeArg !== "dark" && themeArg !== "auto") {
40785
- console.error(
40786
- ` peach open: --theme must be light, dark, or auto, got "${themeArg}"`
40787
- );
40810
+ console.error(` peach open: --theme must be light, dark, or auto, got "${themeArg}"`);
40788
40811
  rnxExit(1);
40789
40812
  }
40790
40813
  if (isAppDeepLinkTarget(target)) {
@@ -40808,7 +40831,7 @@ async function runOpenCommand(args, opts = {}) {
40808
40831
  console.log(
40809
40832
  " that\u2019s a peach preview/build link \u2014 a full player page, not a driveable sim."
40810
40833
  );
40811
- console.log(" opening it in your browser for viewing\u2026");
40834
+ if (!isTeamMachineSession()) console.log(" opening it in your browser for viewing\u2026");
40812
40835
  try {
40813
40836
  await openUrl(target, { background: false });
40814
40837
  } catch (err) {
@@ -40866,7 +40889,7 @@ async function runOpenCommand(args, opts = {}) {
40866
40889
  );
40867
40890
  rnxExit(1);
40868
40891
  }
40869
- const driverId = isDriverId(requestedDriverId) ? requestedDriverId : process.env.CI === "1" || process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true" || isAgentEnv() || !process.stdin.isTTY ? "playwright" : readSimulatorDriverPreference() || "playwright";
40892
+ const driverId = isDriverId(requestedDriverId) ? requestedDriverId : process.env.CI === "1" || process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true" || isTeamMachineSession() || isAgentEnv() || !process.stdin.isTTY ? "playwright" : readSimulatorDriverPreference() || "playwright";
40870
40893
  const driverHeadless = resolveDriverHeadless(args, driverId);
40871
40894
  if (cdpPort && driverId !== "playwright") {
40872
40895
  console.error(" peach open: --cdp-port is only honored by the playwright driver");
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2 } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function isSwiftManifestFile(file) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-submit.ts
4
4
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.718 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.720 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.718",
3
+ "version": "0.1.720",
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",
@@ -5,6 +5,7 @@ export type OpenUrlLaunchVia = 'system'
5
5
  export interface OpenUrlOptions {
6
6
  detached?: boolean
7
7
  background?: boolean
8
+ application?: string
8
9
  }
9
10
 
10
11
  export interface OpenUrlCommandOptions extends OpenUrlOptions {
@@ -33,7 +34,11 @@ export function buildOpenUrlCommand(
33
34
  if (platform === 'darwin') {
34
35
  return {
35
36
  command: 'open',
36
- args: options.background === false ? [url] : ['-g', url],
37
+ args: [
38
+ ...(options.background === false ? [] : ['-g']),
39
+ ...(options.application ? ['-a', options.application] : []),
40
+ url,
41
+ ],
37
42
  via: 'system',
38
43
  }
39
44
  }
@@ -65,16 +70,36 @@ async function spawnLaunch(
65
70
  })
66
71
  child.once('error', reject)
67
72
  child.once('spawn', () => {
68
- if (detached) child.unref()
69
- resolve(child.pid)
73
+ if (detached) {
74
+ child.unref()
75
+ resolve(child.pid)
76
+ }
70
77
  })
78
+ if (!detached) {
79
+ child.once('close', (code) => {
80
+ if (code === 0) resolve(child.pid)
81
+ else reject(new Error(`${command} exited with code ${code}`))
82
+ })
83
+ }
71
84
  })
72
85
  }
73
86
 
87
+ // tm's authorization environment marks every wrapped agent and its child shells.
88
+ export function isTeamMachineSession(): boolean {
89
+ return Boolean(process.env.TM_SESSION)
90
+ }
91
+
74
92
  export async function launchUrl(
75
93
  url: string,
76
94
  options: OpenUrlOptions = {},
77
- ): Promise<OpenUrlLaunchResult> {
95
+ ): Promise<OpenUrlLaunchResult | undefined> {
96
+ if (isTeamMachineSession()) {
97
+ console.log(` agent session: refusing to launch the user's browser.\n ${url}`)
98
+ console.log(
99
+ ' use an isolated browser: peach open <app target> --driver playwright --headless',
100
+ )
101
+ return
102
+ }
78
103
  const command = buildOpenUrlCommand(url, options)
79
104
  const pid = await spawnLaunch(command.command, command.args, options.detached ?? true)
80
105
  return {