peachsim 0.1.730 → 0.1.746

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 (107) hide show
  1. package/cli/bridge-flow-runner.ts +15 -2
  2. package/cli/commands/control.ts +13 -3
  3. package/cli/commands/desktop.ts +1 -0
  4. package/cli/commands/electron.ts +12 -8
  5. package/cli/commands/flow.ts +1 -3
  6. package/cli/commands/install-desktop.ts +105 -66
  7. package/cli/commands/logout.ts +5 -1
  8. package/cli/commands/no-bridge-hint.ts +2 -2
  9. package/cli/commands/swift.ts +26 -9
  10. package/cli/desktop-companion.ts +36 -9
  11. package/cli/drivers/desktop.ts +65 -0
  12. package/cli/drivers/electron.ts +4 -66
  13. package/cli/drivers/index.ts +1 -0
  14. package/cli/drivers/playwright-sim-host.ts +2 -0
  15. package/cli/drivers/playwright.ts +3 -3
  16. package/cli/drivers/registry.ts +7 -2
  17. package/cli/drivers/types.ts +4 -3
  18. package/cli/maestro-js.ts +10 -0
  19. package/cli/outbound-endpoints.ts +2 -2
  20. package/dist-lib/agent-daemon-client.cjs +1 -1
  21. package/dist-lib/agent-events.cjs +1 -1
  22. package/dist-lib/agent-identity.cjs +1 -1
  23. package/dist-lib/agent-sessions.cjs +1 -1
  24. package/dist-lib/attached-projects.cjs +1 -1
  25. package/dist-lib/auth/shared-session.cjs +39 -9
  26. package/dist-lib/backend-origin.cjs +1 -1
  27. package/dist-lib/beta.cjs +1 -1
  28. package/dist-lib/beta.mjs +1 -1
  29. package/dist-lib/bridge-constants.cjs +1 -1
  30. package/dist-lib/bridge-contract-input.cjs +1 -1
  31. package/dist-lib/bridge-contract-input.mjs +1 -1
  32. package/dist-lib/bridge-contract.cjs +1 -1
  33. package/dist-lib/bridge-contract.mjs +1 -1
  34. package/dist-lib/capture-contract.cjs +13 -19
  35. package/dist-lib/capture-contract.mjs +13 -19
  36. package/dist-lib/cli-constants.cjs +1 -1
  37. package/dist-lib/cloud-contract.cjs +1 -1
  38. package/dist-lib/cloud-contract.mjs +1 -1
  39. package/dist-lib/cloud-test-args.cjs +1 -1
  40. package/dist-lib/cloud-test-args.mjs +1 -1
  41. package/dist-lib/cloud.cjs +1 -1
  42. package/dist-lib/cloud.mjs +1 -1
  43. package/dist-lib/config.cjs +1 -1
  44. package/dist-lib/detox/index.cjs +117 -11
  45. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  46. package/dist-lib/home-paths.cjs +32 -1
  47. package/dist-lib/host/bridge-host.cjs +1741 -540
  48. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  49. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  50. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  51. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  52. package/dist-lib/host/websocket-proxy.cjs +1 -1
  53. package/dist-lib/index.cjs +17 -22
  54. package/dist-lib/jump-to-source-babel.cjs +1 -1
  55. package/dist-lib/jump-to-source-native.cjs +1 -1
  56. package/dist-lib/kotlin-host.cjs +1 -1
  57. package/dist-lib/menu.cjs +1 -1
  58. package/dist-lib/menu.mjs +1 -1
  59. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  60. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  61. package/dist-lib/metro-production-bundle.cjs +1 -1
  62. package/dist-lib/metro-production-bundle.mjs +1 -1
  63. package/dist-lib/metro.cjs +1 -1
  64. package/dist-lib/native-app-identity.cjs +1 -1
  65. package/dist-lib/native-app-identity.mjs +1 -1
  66. package/dist-lib/native-firebase-metadata.cjs +1 -1
  67. package/dist-lib/native-firebase-metadata.mjs +1 -1
  68. package/dist-lib/plist.cjs +1 -1
  69. package/dist-lib/plist.mjs +1 -1
  70. package/dist-lib/profiles.cjs +1 -1
  71. package/dist-lib/public-brand.cjs +1 -1
  72. package/dist-lib/react-native-host-modules.cjs +1 -1
  73. package/dist-lib/react-native-host-modules.mjs +1 -1
  74. package/dist-lib/render-mode.cjs +1 -1
  75. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  76. package/dist-lib/sdk.cjs +2 -1
  77. package/dist-lib/sdk.mjs +2 -1
  78. package/dist-lib/skills.cjs +2431 -1075
  79. package/dist-lib/swift-compile.cjs +374 -65
  80. package/dist-lib/swift-compile.mjs +369 -66
  81. package/dist-lib/swift-package.cjs +146 -9
  82. package/dist-lib/swift-package.mjs +144 -9
  83. package/dist-lib/swift-submit.cjs +2 -2
  84. package/dist-lib/swift-submit.mjs +2 -2
  85. package/dist-lib/swift-toolchain.cjs +1 -1
  86. package/dist-lib/swift.cjs +1 -1
  87. package/dist-lib/vite-swift.cjs +1690 -233
  88. package/dist-lib/vite.cjs +4 -4
  89. package/package.json +1 -1
  90. package/skills/contrast/SKILL.md +1 -1
  91. package/src/auth/shared-session.ts +45 -9
  92. package/src/bridge-constants.ts +7 -7
  93. package/src/capture-contract.ts +18 -33
  94. package/src/desktop-host-delivery.ts +81 -0
  95. package/src/home-paths.ts +30 -0
  96. package/src/host/bridge-host.ts +11 -6
  97. package/src/native-seam-manifest.ts +0 -11
  98. package/src/sim-client.ts +1 -0
  99. package/src/swift-compile.ts +479 -76
  100. package/src/swift-distribution.lock.json +11 -11
  101. package/src/swift-host.ts +338 -45
  102. package/src/swift-package.ts +204 -19
  103. package/src/swift-remote-packages.ts +255 -0
  104. package/src/swift-submit.ts +4 -1
  105. package/src/vite-plugin-one.ts +2 -2
  106. package/src/vite-plugin.ts +29 -9
  107. package/src/xcode-project.ts +612 -0
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.730 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.746 | (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;
@@ -41,7 +41,6 @@ var import_fs2 = __toESM(require("fs"), 1);
41
41
  var import_node_crypto2 = require("node:crypto");
42
42
  var import_node_module = require("node:module");
43
43
  var import_path2 = __toESM(require("path"), 1);
44
- var import_vxrn = require("vxrn");
45
44
  var import_ws = require("ws");
46
45
 
47
46
  // src/simulator-route.ts
@@ -875,8 +874,9 @@ function rnxPlugin(options = {}) {
875
874
  config() {
876
875
  return { optimizeDeps: { include: ["use-latest-callback"] } };
877
876
  },
878
- configureServer(server) {
877
+ async configureServer(server) {
879
878
  if (options.enabled === false) return;
879
+ const { swiftPackageDirectories } = await import("vxrn");
880
880
  let swiftPackages;
881
881
  let swiftModuleRoot;
882
882
  const moduleRootFor = () => {
@@ -894,7 +894,7 @@ function rnxPlugin(options = {}) {
894
894
  };
895
895
  const activeSwiftPackages = /* @__PURE__ */ new Set();
896
896
  const packageMap = () => {
897
- swiftPackages ??= (0, import_vxrn.swiftPackageDirectories)(server.config.root);
897
+ swiftPackages ??= swiftPackageDirectories(server.config.root);
898
898
  return swiftPackages;
899
899
  };
900
900
  const wsOptions = server.config.server.ws;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.730",
3
+ "version": "0.1.746",
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",
@@ -19,7 +19,7 @@ automation, inspecting the render tree, and managing sims.
19
19
 
20
20
  | command | description |
21
21
  | --- | --- |
22
- | `peach swift` | preview a SwiftPM app with live Swift edits, compiled on this machine |
22
+ | `peach swift` | preview a SwiftPM or Xcode app with live Swift edits, compiled on this machine |
23
23
  | `peach kotlin` | run an Android Compose app module from its launcher activity |
24
24
  | `peach maestro` | author, generate, and run Maestro YAML flows against peach |
25
25
  | `peach detox` | run existing Detox suites against peach on headless Chromium |
@@ -1,12 +1,15 @@
1
+ import { randomUUID } from 'node:crypto'
1
2
  import {
2
3
  chmodSync,
3
4
  existsSync,
4
5
  mkdirSync,
5
6
  readFileSync,
7
+ renameSync,
6
8
  rmSync,
9
+ watch,
7
10
  writeFileSync,
8
11
  } from 'node:fs'
9
- import { dirname, join, resolve } from 'node:path'
12
+ import { basename, dirname, join, resolve } from 'node:path'
10
13
  import { electronUserDataDir } from '../home-paths.ts'
11
14
 
12
15
  export type SharedDesktopAuthTeamSummary = {
@@ -184,7 +187,17 @@ export function writeSharedDesktopAuthSession(
184
187
  validatedAt: session.validatedAt,
185
188
  accountId: session.accountId?.trim() || undefined,
186
189
  }
187
- writeFileSync(filepath, JSON.stringify(normalized, null, 2) + '\n')
190
+ // readers and directory watchers see a complete session, including replacement writes.
191
+ const temporary = `${filepath}.${process.pid}.${randomUUID()}.tmp`
192
+ try {
193
+ writeFileSync(temporary, JSON.stringify(normalized, null, 2) + '\n', {
194
+ mode: 0o600,
195
+ flag: 'wx',
196
+ })
197
+ renameSync(temporary, filepath)
198
+ } finally {
199
+ rmSync(temporary, { force: true })
200
+ }
188
201
  try {
189
202
  chmodSync(filepath, 0o600)
190
203
  } catch {
@@ -197,6 +210,25 @@ export function clearSharedDesktopAuthSession() {
197
210
  rmSync(getSharedDesktopAuthFilePath(), { force: true })
198
211
  }
199
212
 
213
+ export function watchSharedDesktopAuthSession(
214
+ changed: (session: SharedDesktopAuthSession | null) => void,
215
+ ): () => void {
216
+ const filepath = getSharedDesktopAuthFilePath()
217
+ mkdirSync(dirname(filepath), { recursive: true })
218
+ const snapshot = (session: SharedDesktopAuthSession | null) =>
219
+ JSON.stringify([session?.token, session?.user, session?.origin, session?.accountId])
220
+ let previous = snapshot(readSharedDesktopAuthSession())
221
+ const watcher = watch(dirname(filepath), (_event, filename) => {
222
+ if (filename !== null && filename !== basename(filepath)) return
223
+ const session = readSharedDesktopAuthSession()
224
+ const next = snapshot(session)
225
+ if (next === previous) return
226
+ previous = next
227
+ changed(session)
228
+ })
229
+ return () => watcher.close()
230
+ }
231
+
200
232
  export async function refreshSharedDesktopAuthSession(
201
233
  originOverride?: string,
202
234
  ): Promise<SharedDesktopAuthSession | null> {
@@ -209,27 +241,31 @@ export async function refreshSharedDesktopAuthSession(
209
241
  const res = await fetch(`${origin.replace(/\/$/, '')}/api/auth/me`, {
210
242
  headers: { authorization: `Bearer ${current.token}` },
211
243
  })
244
+ const body: unknown = res.ok ? await res.json() : null
245
+ const user =
246
+ body && typeof body === 'object' && 'user' in body ? normalizeUser(body.user) : null
247
+ const latest = readSharedDesktopAuthSession()
248
+ if (latest?.token !== current.token) return latest
212
249
  if (res.status === 401) {
213
250
  clearSharedDesktopAuthSession()
214
251
  return null
215
252
  }
216
- if (!res.ok) return current
253
+ if (!res.ok) return latest
217
254
 
218
- const data = (await res.json()) as { user?: SharedDesktopAuthUser | null }
219
- if (!data.user?.id) {
255
+ if (!user) {
220
256
  clearSharedDesktopAuthSession()
221
257
  return null
222
258
  }
223
259
 
224
260
  return writeSharedDesktopAuthSession({
225
261
  token: current.token,
226
- user: data.user,
262
+ user,
227
263
  origin,
228
- source: current.source,
264
+ source: latest.source,
229
265
  validatedAt: new Date().toISOString(),
230
- accountId: current.accountId,
266
+ accountId: latest.accountId,
231
267
  })
232
268
  } catch {
233
- return current
269
+ return readSharedDesktopAuthSession()
234
270
  }
235
271
  }
@@ -182,11 +182,11 @@ export const SOOTSIM_BRIDGE_SIM_CLOSE_REASON = 'sootsim close'
182
182
 
183
183
  // automation sims (spawned by the playwright driver: `peach open --driver
184
184
  // playwright`, the factory/screenshot capture path, `meta.sootsimHostDriver
185
- // === 'playwright'`) are unattended browsers, never a human's tab, and an idle
186
- // one still renders at full rate (the host disables background throttling so
187
- // captures see real motion). only a cli proves one is in use: attached, which
188
- // covers a long in-flight command such as a recording, or a command within
189
- // this window. past it the bridge reaper closes the sim socket with the code
190
- // above, the page asks its host to close, and the host exits with its chrome
191
- // tree.
185
+ // === 'playwright'`) also serve people (`peach open` launches one by default),
186
+ // and an idle one still renders at full rate (the host disables background
187
+ // throttling so captures see real motion). a cli attached, which covers a long
188
+ // in-flight command such as a recording, a command within this window, or a
189
+ // person's input on the page within it proves one is in use. past it the
190
+ // bridge reaper closes the sim socket with the code above, the page asks its
191
+ // host to close, and the host exits with its chrome tree.
192
192
  export const AUTOMATION_SIM_IDLE_REAP_TTL_MS = 5 * 60_000
@@ -188,7 +188,11 @@ function isLiveRasterSource(node: RnxRasterRegionTree['nodes'][number]): boolean
188
188
 
189
189
  export function selectRnxRasterNodeIds(tree: RnxRasterRegionTree): Set<number> {
190
190
  const nodesById = new Map(tree.nodes.map((node) => [node.nodeId, node]))
191
- const unsupported = new Set<number>()
191
+ const maxLayerArea = tree.width * tree.height * 0.25
192
+ // a layer over the per-layer cap never enters the atlas, so it cannot carry
193
+ // its descendants: a sheet's glass is too large, and the glass controls
194
+ // inside it still need their own regions.
195
+ const eligible = new Map<number, { nodeId: number; area: number; liveVideo: boolean }>()
192
196
  for (const node of tree.nodes) {
193
197
  const liveVideo = isLiveRasterSource(node)
194
198
  const visibleFrame =
@@ -198,7 +202,7 @@ export function selectRnxRasterNodeIds(tree: RnxRasterRegionTree): Set<number> {
198
202
  ? node.frame
199
203
  : (node.visibleFrame ?? node.frame)
200
204
  if (!visibleFrame || visibleFrame.width <= 0 || visibleFrame.height <= 0) continue
201
- if (
205
+ const unsupported =
202
206
  node.type === 'masked-view' ||
203
207
  liveVideo ||
204
208
  (node.type === 'text' &&
@@ -210,47 +214,28 @@ export function selectRnxRasterNodeIds(tree: RnxRasterRegionTree): Set<number> {
210
214
  node.style._liquidGlass !== undefined ||
211
215
  node.style._liquidGlassEdge !== undefined ||
212
216
  node.style._liquidGlassMaterialTint !== undefined
213
- ) {
214
- unsupported.add(node.nodeId)
217
+ const area = visibleFrame.width * visibleFrame.height
218
+ if (unsupported && (liveVideo || area <= maxLayerArea)) {
219
+ eligible.set(node.nodeId, { nodeId: node.nodeId, area, liveVideo })
215
220
  }
216
221
  }
217
-
218
- for (const nodeId of [...unsupported]) {
222
+ for (const nodeId of [...eligible.keys()]) {
219
223
  let parentNodeId = nodesById.get(nodeId)?.parentNodeId ?? null
220
224
  while (parentNodeId !== null) {
221
- if (unsupported.has(parentNodeId)) {
222
- unsupported.delete(nodeId)
225
+ if (eligible.has(parentNodeId)) {
226
+ eligible.delete(nodeId)
223
227
  break
224
228
  }
225
229
  parentNodeId = nodesById.get(parentNodeId)?.parentNodeId ?? null
226
230
  }
227
231
  }
228
-
232
+ const candidates = [...eligible.values()].sort(
233
+ (left, right) =>
234
+ Number(right.liveVideo) - Number(left.liveVideo) ||
235
+ left.area - right.area ||
236
+ left.nodeId - right.nodeId,
237
+ )
229
238
  const screenArea = tree.width * tree.height
230
- const maxLayerArea = screenArea * 0.25
231
- const candidates = [...unsupported]
232
- .map((nodeId) => {
233
- const node = nodesById.get(nodeId)
234
- if (!node) return null
235
- const liveVideo = isLiveRasterSource(node)
236
- const frame =
237
- liveVideo &&
238
- node.visibleFrame &&
239
- (node.visibleFrame.width <= 0 || node.visibleFrame.height <= 0)
240
- ? node.frame
241
- : (node.visibleFrame ?? node.frame)
242
- return frame ? { nodeId, area: frame.width * frame.height, liveVideo } : null
243
- })
244
- .filter(
245
- (candidate): candidate is { nodeId: number; area: number; liveVideo: boolean } =>
246
- candidate !== null && (candidate.liveVideo || candidate.area <= maxLayerArea),
247
- )
248
- .sort(
249
- (left, right) =>
250
- Number(right.liveVideo) - Number(left.liveVideo) ||
251
- left.area - right.area ||
252
- left.nodeId - right.nodeId,
253
- )
254
239
  const selected = new Set<number>()
255
240
  let atlasArea = 0
256
241
  for (const candidate of candidates) {
@@ -0,0 +1,81 @@
1
+ // peach's binding of the shared runtime-delivery machinery for the native
2
+ // desktop host. the host releases on its own (packages/peach-desktop's Native
3
+ // Desktop Release workflow) and the CLI installs it by version under
4
+ // ~/.peach/desktop/<version>/, exactly as `peach runtime install` manages the
5
+ // engine runtime. each channel publishes its own manifest per platform, so the
6
+ // staging and production queues never write the same object.
7
+
8
+ import path from 'node:path'
9
+ import { createRuntimeDelivery, type RuntimeDelivery } from '@contrast/runtime-delivery'
10
+ import {
11
+ cacheDir,
12
+ desktopHostDir,
13
+ desktopHostsDir,
14
+ ensureRnxHome,
15
+ readActiveDesktopHost,
16
+ writeActiveDesktopHost,
17
+ } from './home-paths.ts'
18
+
19
+ export const DESKTOP_HOST_CDN_ORIGIN = 'https://r2.rnxsim.com'
20
+ export const DESKTOP_HOST_CHANNELS = ['production', 'staging'] as const
21
+ export type DesktopHostChannel = (typeof DESKTOP_HOST_CHANNELS)[number]
22
+ const CHANNEL_ENV = 'PEACH_DESKTOP_CHANNEL'
23
+
24
+ /** the artifact platform this machine installs, or null where no host ships. */
25
+ export function desktopHostPlatform(): 'mac-arm64' | null {
26
+ if (process.platform === 'darwin' && process.arch === 'arm64') return 'mac-arm64'
27
+ return null
28
+ }
29
+
30
+ /** the executable inside an installed version, relative to its directory. */
31
+ export function desktopHostExecutable(): string {
32
+ return 'PeachDesktop.app/Contents/MacOS/PeachDesktop'
33
+ }
34
+
35
+ /** the app bundle of the active installed version, or null when none is. */
36
+ export function activeDesktopHostApp(): string | null {
37
+ const version = readActiveDesktopHost()
38
+ return version ? path.join(desktopHostDir(version), 'PeachDesktop.app') : null
39
+ }
40
+
41
+ function isChannel(value: string): value is DesktopHostChannel {
42
+ return DESKTOP_HOST_CHANNELS.some((channel) => channel === value)
43
+ }
44
+
45
+ export function desktopHostDelivery(channelInput?: string): RuntimeDelivery {
46
+ const platform = desktopHostPlatform()
47
+ if (!platform) {
48
+ throw new Error(
49
+ `the native desktop host ships for macOS arm64 only (this is ${process.platform}-${process.arch})`,
50
+ )
51
+ }
52
+ const channel = channelInput || process.env[CHANNEL_ENV] || 'production'
53
+ if (!isChannel(channel)) {
54
+ throw new Error(
55
+ `unknown desktop channel '${channel}' (use ${DESKTOP_HOST_CHANNELS.join(' or ')})`,
56
+ )
57
+ }
58
+ const prefix = `/releases/native/${channel}`
59
+ return createRuntimeDelivery({
60
+ id: 'peach desktop',
61
+ defaultCdnOrigin: DESKTOP_HOST_CDN_ORIGIN,
62
+ manifestPath: `${prefix}/manifest-${platform}.json`,
63
+ tarballPath: (version) =>
64
+ `${prefix}/${version}/PeachDesktop-${version}-${platform}.zip`,
65
+ installedMarker: desktopHostExecutable(),
66
+ env: {
67
+ cdnOrigin: 'PEACH_DESKTOP_CDN_ORIGIN',
68
+ channel: CHANNEL_ENV,
69
+ pin: 'PEACH_DESKTOP_VERSION',
70
+ },
71
+ defaultChannel: channel,
72
+ ensureHome: ensureRnxHome,
73
+ // the engine runtime owns ~/.peach/config.json's channel and pin keys
74
+ configFile: () => path.join(desktopHostsDir(), 'config.json'),
75
+ runtimesDir: desktopHostsDir,
76
+ runtimeDir: desktopHostDir,
77
+ cacheDir,
78
+ readActiveRuntime: readActiveDesktopHost,
79
+ writeActiveRuntime: writeActiveDesktopHost,
80
+ })
81
+ }
package/src/home-paths.ts CHANGED
@@ -118,6 +118,36 @@ export function activeRuntimeFile(): string {
118
118
  return path.join(runtimesDir(), ACTIVE_RUNTIME_FILE)
119
119
  }
120
120
 
121
+ // versioned native desktop hosts, laid out like runtimes: one directory per
122
+ // version plus an `active` file naming the one `peach desktop` launches.
123
+ export function desktopHostsDir(): string {
124
+ return path.join(rnxHomeDir(), 'desktop')
125
+ }
126
+
127
+ export function desktopHostDir(version: string): string {
128
+ return path.join(desktopHostsDir(), version)
129
+ }
130
+
131
+ export function readActiveDesktopHost(): string | null {
132
+ try {
133
+ const value = fs
134
+ .readFileSync(path.join(desktopHostsDir(), ACTIVE_RUNTIME_FILE), 'utf8')
135
+ .trim()
136
+ return value.length > 0 ? value : null
137
+ } catch {
138
+ return null
139
+ }
140
+ }
141
+
142
+ export function writeActiveDesktopHost(version: string): void {
143
+ fs.mkdirSync(desktopHostsDir(), { recursive: true })
144
+ fs.writeFileSync(
145
+ path.join(desktopHostsDir(), ACTIVE_RUNTIME_FILE),
146
+ `${version}\n`,
147
+ 'utf8',
148
+ )
149
+ }
150
+
121
151
  export function electronDir(): string {
122
152
  return path.join(rnxHomeDir(), 'electron')
123
153
  }
@@ -789,9 +789,14 @@ export class SootSimBridgeHost {
789
789
  return
790
790
  }
791
791
 
792
- // a capture the page is still running after its cli exited (`peach
793
- // record start`) is use the idle reaper cannot see in cli traffic.
794
- if (msg.type === 'bridge:capture-active' && sim) {
792
+ // a person's input anywhere on the page, and a capture the page is
793
+ // still running after its cli exited (`peach record start`), are use
794
+ // the idle reaper cannot see in cli traffic.
795
+ if (
796
+ (msg.type === 'bridge:user-present' ||
797
+ msg.type === 'bridge:capture-active') &&
798
+ sim
799
+ ) {
795
800
  sim.lastActiveAt = Date.now()
796
801
  return
797
802
  }
@@ -2020,9 +2025,9 @@ export class SootSimBridgeHost {
2020
2025
  if (attachedSimIds.has(sim.id)) continue
2021
2026
  const automation = this.isAutomationSim(sim)
2022
2027
  const lease = this.getActiveLease(sim)
2023
- // an automation sim is nobody's tab, so being primary or holding a cli
2024
- // lease (10 min from its last grant) says nothing about use: only a human
2025
- // interacting with a headed window keeps one past its idle window.
2028
+ // being primary or holding a cli lease (10 min from its last grant) says
2029
+ // nothing about an automation sim's use: only a person's input
2030
+ // (lastActiveAt, or a live user-active lease) keeps one past its window.
2026
2031
  if (
2027
2032
  automation ? lease?.kind === 'user-active' : sim.id === this.primarySimId || lease
2028
2033
  ) {
@@ -140,17 +140,6 @@ export const NATIVE_SEAM_MANIFEST: NativeSeamEntry[] = [
140
140
  notes:
141
141
  'ASAuthorizationAppleIDButton native view — render the system button surface while upstream AppleAuthenticationButton.tsx remains unchanged',
142
142
  },
143
- {
144
- pkg: 'expo-asset',
145
- // src/ExpoAsset.ts — `requireNativeModule('ExpoAsset')`; only
146
- // `downloadAsync` is on the native surface. all the rest (`Asset`,
147
- // `AssetHooks`, `AssetSourceResolver`, ...) is pure JS that composes on
148
- // top.
149
- seamBasenames: ['ExpoAsset'],
150
- target: seamPath('expo-asset'),
151
- notes:
152
- 'expo-modules-core requireNativeModule(ExpoAsset) — only downloadAsync; mirror upstream web build (return remote URL)',
153
- },
154
143
  {
155
144
  pkg: '@bam.tech/react-native-image-resizer',
156
145
  // a Metro bundle reaches the same seam through the ImageResizer
package/src/sim-client.ts CHANGED
@@ -188,6 +188,7 @@ const TARGET_SEARCH_PARAMS = [
188
188
  'port',
189
189
  'inspectOpen',
190
190
  'appFonts',
191
+ 'appManifest',
191
192
  'appSplash',
192
193
  'appCatalog',
193
194
  ]