rnxsim 0.1.377 → 0.1.378

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 (43) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/agent-identity.cjs +1 -1
  4. package/dist-lib/agent-sessions.cjs +1 -1
  5. package/dist-lib/attached-projects.cjs +1 -1
  6. package/dist-lib/auth/shared-session.cjs +1 -1
  7. package/dist-lib/backend-origin.cjs +1 -1
  8. package/dist-lib/beta.cjs +1 -1
  9. package/dist-lib/beta.mjs +1 -1
  10. package/dist-lib/bridge-constants.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.mjs +1 -1
  13. package/dist-lib/bridge-contract.cjs +1 -1
  14. package/dist-lib/bridge-contract.mjs +1 -1
  15. package/dist-lib/cli-constants.cjs +1 -1
  16. package/dist-lib/config.cjs +1 -1
  17. package/dist-lib/detox/index.cjs +65 -23
  18. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  19. package/dist-lib/home-paths.cjs +1 -1
  20. package/dist-lib/host/bridge-host.cjs +1 -1
  21. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  22. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  23. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  24. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  25. package/dist-lib/host/websocket-proxy.cjs +1 -1
  26. package/dist-lib/index.cjs +1 -1
  27. package/dist-lib/jump-to-source-babel.cjs +1 -1
  28. package/dist-lib/menu.cjs +1 -1
  29. package/dist-lib/menu.mjs +1 -1
  30. package/dist-lib/metro-production-bundle.cjs +1 -1
  31. package/dist-lib/metro-production-bundle.mjs +1 -1
  32. package/dist-lib/metro.cjs +1 -1
  33. package/dist-lib/profiles.cjs +1 -1
  34. package/dist-lib/public-brand.cjs +1 -1
  35. package/dist-lib/react-native-host-modules.cjs +1 -1
  36. package/dist-lib/react-native-host-modules.mjs +1 -1
  37. package/dist-lib/render-mode.cjs +1 -1
  38. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  39. package/dist-lib/sdk.cjs +1 -1
  40. package/dist-lib/sdk.mjs +1 -1
  41. package/dist-lib/skills.cjs +68 -26
  42. package/dist-lib/vite.cjs +1 -1
  43. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract-input.ts
4
4
  var BridgeInputError = class extends Error {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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;
@@ -216,7 +216,8 @@ var import_playwright = require("playwright");
216
216
  // ../../scripts/lib/reap-browser.ts
217
217
  var import_node_child_process = require("node:child_process");
218
218
  var discoveredChromePids = /* @__PURE__ */ new WeakMap();
219
- var reapPids = /* @__PURE__ */ new Set();
219
+ var discoveredChromeProcesses = /* @__PURE__ */ new WeakMap();
220
+ var reapPids = /* @__PURE__ */ new Map();
220
221
  var installed = false;
221
222
  function currentRuntime() {
222
223
  return { platform: process.platform, env: process.env };
@@ -226,6 +227,18 @@ function processCommand(pid) {
226
227
  encoding: "utf8"
227
228
  }).trim();
228
229
  }
230
+ function processIdentity(pid) {
231
+ try {
232
+ const identity = (0, import_node_child_process.execFileSync)(
233
+ "/bin/ps",
234
+ ["-p", String(pid), "-o", "lstart=", "-o", "command="],
235
+ { encoding: "utf8" }
236
+ ).trim();
237
+ return identity || null;
238
+ } catch {
239
+ return null;
240
+ }
241
+ }
229
242
  function softwareChromeAllowed(runtime = currentRuntime()) {
230
243
  return runtime.platform === "linux" && runtime.env.GITHUB_ACTIONS === "true" && runtime.env.RUNNER_OS === "Linux";
231
244
  }
@@ -351,6 +364,25 @@ function killTree(pid) {
351
364
  } catch {
352
365
  }
353
366
  }
367
+ function killOwnedTree(tracked) {
368
+ if (tracked.readIdentity(tracked.pid) !== tracked.identity) return;
369
+ killTree(tracked.pid);
370
+ }
371
+ function trackReapPid(pid, readIdentity = processIdentity) {
372
+ const identity = readIdentity(pid);
373
+ if (identity === null) return null;
374
+ const current = reapPids.get(pid);
375
+ if (current?.identity === identity && current.readIdentity === readIdentity) {
376
+ return current;
377
+ }
378
+ const tracked = { pid, identity, readIdentity };
379
+ reapPids.set(pid, tracked);
380
+ installReaper();
381
+ return tracked;
382
+ }
383
+ function untrackReapPid(tracked) {
384
+ if (reapPids.get(tracked.pid) === tracked) reapPids.delete(tracked.pid);
385
+ }
354
386
  function browserControl(b) {
355
387
  const candidate = b;
356
388
  if (!candidate || typeof candidate !== "object") return null;
@@ -365,11 +397,15 @@ function browserControl(b) {
365
397
  return null;
366
398
  }
367
399
  }
368
- function registerChromePid(browser, control, pid) {
400
+ function registerChromePid(browser, control, pid, readIdentity = processIdentity) {
369
401
  if (browser && typeof browser === "object") discoveredChromePids.set(browser, pid);
370
402
  discoveredChromePids.set(control, pid);
371
- reapPids.add(pid);
372
- installReaper();
403
+ const tracked = trackReapPid(pid, readIdentity);
404
+ if (tracked === null) return;
405
+ if (browser && typeof browser === "object") {
406
+ discoveredChromeProcesses.set(browser, tracked);
407
+ }
408
+ discoveredChromeProcesses.set(control, tracked);
373
409
  }
374
410
  async function discoverChromePid(browser) {
375
411
  const known = rootChromePid(browser);
@@ -387,10 +423,10 @@ async function discoverChromePid(browser) {
387
423
  }
388
424
  }
389
425
  async function rejectLaunchedBrowser(browser) {
390
- const root = rootChromePid(browser);
391
- if (root !== null) {
392
- reapPids.delete(root);
393
- killTree(root);
426
+ const tracked = browser && typeof browser === "object" ? discoveredChromeProcesses.get(browser) : void 0;
427
+ if (tracked) {
428
+ killOwnedTree(tracked);
429
+ untrackReapPid(tracked);
394
430
  return;
395
431
  }
396
432
  const candidate = browser;
@@ -401,12 +437,12 @@ async function rejectLaunchedBrowser(browser) {
401
437
  }
402
438
  }
403
439
  }
404
- async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget, commandForPid = processCommand) {
440
+ async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget, commandForPid = processCommand, readIdentity = processIdentity) {
405
441
  if (softwareChromeAllowed(runtime)) return;
406
442
  const root = rootChromePid(browser);
407
443
  const launchedControl = browserControl(browser);
408
444
  if (root !== null && launchedControl) {
409
- registerChromePid(browser, launchedControl, root);
445
+ registerChromePid(browser, launchedControl, root, readIdentity);
410
446
  }
411
447
  if (root !== null && (runtime.platform === "darwin" || runtime.platform === "linux")) {
412
448
  assertGpuBrowserCommand(commandForPid(root), runtime);
@@ -420,7 +456,7 @@ async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget, comm
420
456
  if (pid === null) {
421
457
  throw new Error("[reap-browser] Chrome did not report its browser process id");
422
458
  }
423
- registerChromePid(browser, control, pid);
459
+ registerChromePid(browser, control, pid, readIdentity);
424
460
  if (rendererBrowser && typeof rendererBrowser === "object") {
425
461
  discoveredChromePids.set(rendererBrowser, pid);
426
462
  }
@@ -440,7 +476,7 @@ function installReaper() {
440
476
  if (installed) return;
441
477
  installed = true;
442
478
  const reap = () => {
443
- for (const pid of reapPids) killTree(pid);
479
+ for (const tracked of reapPids.values()) killOwnedTree(tracked);
444
480
  };
445
481
  if (!signalShutdownClaimed) {
446
482
  process.on("SIGTERM", () => {
@@ -454,7 +490,7 @@ function installReaper() {
454
490
  }
455
491
  process.on("exit", reap);
456
492
  }
457
- async function launchReapedScoped(launch) {
493
+ async function launchReapedScoped(launch, readIdentity = processIdentity) {
458
494
  const browser = await launch();
459
495
  let root = rootChromePid(browser);
460
496
  if (root === null) {
@@ -466,22 +502,24 @@ async function launchReapedScoped(launch) {
466
502
  }
467
503
  const mine = /* @__PURE__ */ new Set();
468
504
  if (root != null) {
469
- mine.add(root);
470
- reapPids.add(root);
471
- installReaper();
505
+ const tracked = trackReapPid(root, readIdentity);
506
+ if (tracked !== null) mine.add(tracked);
472
507
  }
473
508
  const evented = browserControl(browser) ?? browser;
474
509
  if (typeof evented.on === "function") {
475
510
  const disconnectEvent = typeof evented.newBrowserCDPSession === "function" ? "disconnected" : "close";
476
511
  evented.on(disconnectEvent, () => {
477
- for (const pid of mine) reapPids.delete(pid);
512
+ for (const tracked of mine) {
513
+ killOwnedTree(tracked);
514
+ untrackReapPid(tracked);
515
+ }
478
516
  mine.clear();
479
517
  });
480
518
  }
481
519
  const reapNow = () => {
482
- for (const pid of mine) {
483
- killTree(pid);
484
- reapPids.delete(pid);
520
+ for (const tracked of mine) {
521
+ killOwnedTree(tracked);
522
+ untrackReapPid(tracked);
485
523
  }
486
524
  mine.clear();
487
525
  };
@@ -573,7 +611,8 @@ function platformChromeLaunch(launch, opts, rendererTarget, policy = {}) {
573
611
  browser,
574
612
  runtime,
575
613
  rendererTarget,
576
- policy.processCommand
614
+ policy.processCommand,
615
+ policy.processIdentity
577
616
  );
578
617
  } catch (err) {
579
618
  await rejectLaunchedBrowser(browser);
@@ -614,7 +653,10 @@ function chromeLaunchOptions(opts = {}, runtime = currentRuntime()) {
614
653
  return softwareChromeAllowed(runtime) ? softwareChromeLaunchOptions(opts) : gpuChromeLaunchOptions(opts, runtime);
615
654
  }
616
655
  async function launchReapedChromeScoped(launch, opts = {}, rendererTarget, policy = {}) {
617
- return launchReapedScoped(platformChromeLaunch(launch, opts, rendererTarget, policy));
656
+ return launchReapedScoped(
657
+ platformChromeLaunch(launch, opts, rendererTarget, policy),
658
+ policy.processIdentity
659
+ );
618
660
  }
619
661
 
620
662
  // src/poll-until.ts
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "rnx";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION = "rnxsim";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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;
@@ -44,6 +44,18 @@ function processCommand(pid) {
44
44
  encoding: "utf8"
45
45
  }).trim();
46
46
  }
47
+ function processIdentity(pid) {
48
+ try {
49
+ const identity = (0, import_node_child_process.execFileSync)(
50
+ "/bin/ps",
51
+ ["-p", String(pid), "-o", "lstart=", "-o", "command="],
52
+ { encoding: "utf8" }
53
+ ).trim();
54
+ return identity || null;
55
+ } catch {
56
+ return null;
57
+ }
58
+ }
47
59
  function softwareChromeAllowed(runtime = currentRuntime()) {
48
60
  return runtime.platform === "linux" && runtime.env.GITHUB_ACTIONS === "true" && runtime.env.RUNNER_OS === "Linux";
49
61
  }
@@ -169,6 +181,25 @@ function killTree(pid) {
169
181
  } catch {
170
182
  }
171
183
  }
184
+ function killOwnedTree(tracked) {
185
+ if (tracked.readIdentity(tracked.pid) !== tracked.identity) return;
186
+ killTree(tracked.pid);
187
+ }
188
+ function trackReapPid(pid, readIdentity = processIdentity) {
189
+ const identity = readIdentity(pid);
190
+ if (identity === null) return null;
191
+ const current = reapPids.get(pid);
192
+ if (current?.identity === identity && current.readIdentity === readIdentity) {
193
+ return current;
194
+ }
195
+ const tracked = { pid, identity, readIdentity };
196
+ reapPids.set(pid, tracked);
197
+ installReaper();
198
+ return tracked;
199
+ }
200
+ function untrackReapPid(tracked) {
201
+ if (reapPids.get(tracked.pid) === tracked) reapPids.delete(tracked.pid);
202
+ }
172
203
  function browserControl(b) {
173
204
  const candidate = b;
174
205
  if (!candidate || typeof candidate !== "object") return null;
@@ -183,11 +214,15 @@ function browserControl(b) {
183
214
  return null;
184
215
  }
185
216
  }
186
- function registerChromePid(browser, control, pid) {
217
+ function registerChromePid(browser, control, pid, readIdentity = processIdentity) {
187
218
  if (browser && typeof browser === "object") discoveredChromePids.set(browser, pid);
188
219
  discoveredChromePids.set(control, pid);
189
- reapPids.add(pid);
190
- installReaper();
220
+ const tracked = trackReapPid(pid, readIdentity);
221
+ if (tracked === null) return;
222
+ if (browser && typeof browser === "object") {
223
+ discoveredChromeProcesses.set(browser, tracked);
224
+ }
225
+ discoveredChromeProcesses.set(control, tracked);
191
226
  }
192
227
  async function discoverChromePid(browser) {
193
228
  const known = rootChromePid(browser);
@@ -205,10 +240,10 @@ async function discoverChromePid(browser) {
205
240
  }
206
241
  }
207
242
  async function rejectLaunchedBrowser(browser) {
208
- const root = rootChromePid(browser);
209
- if (root !== null) {
210
- reapPids.delete(root);
211
- killTree(root);
243
+ const tracked = browser && typeof browser === "object" ? discoveredChromeProcesses.get(browser) : void 0;
244
+ if (tracked) {
245
+ killOwnedTree(tracked);
246
+ untrackReapPid(tracked);
212
247
  return;
213
248
  }
214
249
  const candidate = browser;
@@ -219,12 +254,12 @@ async function rejectLaunchedBrowser(browser) {
219
254
  }
220
255
  }
221
256
  }
222
- async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget, commandForPid = processCommand) {
257
+ async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget, commandForPid = processCommand, readIdentity = processIdentity) {
223
258
  if (softwareChromeAllowed(runtime)) return;
224
259
  const root = rootChromePid(browser);
225
260
  const launchedControl = browserControl(browser);
226
261
  if (root !== null && launchedControl) {
227
- registerChromePid(browser, launchedControl, root);
262
+ registerChromePid(browser, launchedControl, root, readIdentity);
228
263
  }
229
264
  if (root !== null && (runtime.platform === "darwin" || runtime.platform === "linux")) {
230
265
  assertGpuBrowserCommand(commandForPid(root), runtime);
@@ -238,7 +273,7 @@ async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget, comm
238
273
  if (pid === null) {
239
274
  throw new Error("[reap-browser] Chrome did not report its browser process id");
240
275
  }
241
- registerChromePid(browser, control, pid);
276
+ registerChromePid(browser, control, pid, readIdentity);
242
277
  if (rendererBrowser && typeof rendererBrowser === "object") {
243
278
  discoveredChromePids.set(rendererBrowser, pid);
244
279
  }
@@ -257,7 +292,7 @@ function installReaper() {
257
292
  if (installed) return;
258
293
  installed = true;
259
294
  const reap = () => {
260
- for (const pid of reapPids) killTree(pid);
295
+ for (const tracked of reapPids.values()) killOwnedTree(tracked);
261
296
  };
262
297
  if (!signalShutdownClaimed) {
263
298
  process.on("SIGTERM", () => {
@@ -271,7 +306,7 @@ function installReaper() {
271
306
  }
272
307
  process.on("exit", reap);
273
308
  }
274
- async function launchReapedScoped(launch3) {
309
+ async function launchReapedScoped(launch3, readIdentity = processIdentity) {
275
310
  const browser = await launch3();
276
311
  let root = rootChromePid(browser);
277
312
  if (root === null) {
@@ -283,29 +318,31 @@ async function launchReapedScoped(launch3) {
283
318
  }
284
319
  const mine = /* @__PURE__ */ new Set();
285
320
  if (root != null) {
286
- mine.add(root);
287
- reapPids.add(root);
288
- installReaper();
321
+ const tracked = trackReapPid(root, readIdentity);
322
+ if (tracked !== null) mine.add(tracked);
289
323
  }
290
324
  const evented = browserControl(browser) ?? browser;
291
325
  if (typeof evented.on === "function") {
292
326
  const disconnectEvent = typeof evented.newBrowserCDPSession === "function" ? "disconnected" : "close";
293
327
  evented.on(disconnectEvent, () => {
294
- for (const pid of mine) reapPids.delete(pid);
328
+ for (const tracked of mine) {
329
+ killOwnedTree(tracked);
330
+ untrackReapPid(tracked);
331
+ }
295
332
  mine.clear();
296
333
  });
297
334
  }
298
335
  const reapNow = () => {
299
- for (const pid of mine) {
300
- killTree(pid);
301
- reapPids.delete(pid);
336
+ for (const tracked of mine) {
337
+ killOwnedTree(tracked);
338
+ untrackReapPid(tracked);
302
339
  }
303
340
  mine.clear();
304
341
  };
305
342
  return { browser, reapNow };
306
343
  }
307
- async function launchReaped(launch3) {
308
- const { browser } = await launchReapedScoped(launch3);
344
+ async function launchReaped(launch3, readIdentity = processIdentity) {
345
+ const { browser } = await launchReapedScoped(launch3, readIdentity);
309
346
  return browser;
310
347
  }
311
348
  function gpuChromeArgs(platform = process.platform) {
@@ -394,7 +431,8 @@ function platformChromeLaunch(launch3, opts, rendererTarget, policy = {}) {
394
431
  browser,
395
432
  runtime,
396
433
  rendererTarget,
397
- policy.processCommand
434
+ policy.processCommand,
435
+ policy.processIdentity
398
436
  );
399
437
  } catch (err) {
400
438
  await rejectLaunchedBrowser(browser);
@@ -435,15 +473,19 @@ function chromeLaunchOptions(opts = {}, runtime = currentRuntime()) {
435
473
  return softwareChromeAllowed(runtime) ? softwareChromeLaunchOptions(opts) : gpuChromeLaunchOptions(opts, runtime);
436
474
  }
437
475
  async function launchReapedChrome(launch3, opts = {}, rendererTarget, policy = {}) {
438
- return launchReaped(platformChromeLaunch(launch3, opts, rendererTarget, policy));
476
+ return launchReaped(
477
+ platformChromeLaunch(launch3, opts, rendererTarget, policy),
478
+ policy.processIdentity
479
+ );
439
480
  }
440
- var import_node_child_process, discoveredChromePids, reapPids, installed, signalShutdownClaimed;
481
+ var import_node_child_process, discoveredChromePids, discoveredChromeProcesses, reapPids, installed, signalShutdownClaimed;
441
482
  var init_reap_browser = __esm({
442
483
  "../../scripts/lib/reap-browser.ts"() {
443
484
  "use strict";
444
485
  import_node_child_process = require("node:child_process");
445
486
  discoveredChromePids = /* @__PURE__ */ new WeakMap();
446
- reapPids = /* @__PURE__ */ new Set();
487
+ discoveredChromeProcesses = /* @__PURE__ */ new WeakMap();
488
+ reapPids = /* @__PURE__ */ new Map();
447
489
  installed = false;
448
490
  signalShutdownClaimed = false;
449
491
  }
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.377 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.378 | (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": "rnxsim",
3
- "version": "0.1.377",
3
+ "version": "0.1.378",
4
4
  "description": "rnx CLI, Vite and Metro plugins, and agent skills for driving React Native apps in the browser.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",