rnxsim 0.1.496 → 0.1.498
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.
- package/cli/ws-bridge.ts +44 -26
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +33 -19
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +33 -19
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/vite-plugin.ts +22 -4
package/cli/ws-bridge.ts
CHANGED
|
@@ -616,23 +616,26 @@ export function createBridge(wsPort: number, opts: WsBridgeOptions = {}): WsBrid
|
|
|
616
616
|
|
|
617
617
|
let warnedAboutContention = false
|
|
618
618
|
let noticedTarget = false
|
|
619
|
-
// the browser host behind
|
|
620
|
-
//
|
|
621
|
-
|
|
622
|
-
|
|
619
|
+
// the browser host behind each target, learned while that sim is still
|
|
620
|
+
// connected. a reload changes the sim id but not the host.
|
|
621
|
+
const hostPidBySimId = new Map<string, number>()
|
|
622
|
+
const lineageLookupBySimId = new Map<string, Promise<void>>()
|
|
623
623
|
|
|
624
624
|
// a reload retires the sim id but keeps the browser host, so a successor
|
|
625
625
|
// sharing that host pid IS the same page lineage rather than a guess. only
|
|
626
626
|
// an unambiguous match counts; callers fail closed on null.
|
|
627
627
|
function pickReloadedSuccessor(sims: unknown, retiredSimId: string): string | null {
|
|
628
|
-
|
|
628
|
+
const pinnedHostPid = hostPidBySimId.get(retiredSimId)
|
|
629
|
+
if (pinnedHostPid === undefined) return null
|
|
629
630
|
const successors = (Array.isArray(sims) ? (sims as BridgeSimInfo[]) : []).filter(
|
|
630
631
|
(sim) =>
|
|
631
632
|
sim.id !== retiredSimId &&
|
|
632
633
|
sim.readyState === 'open' &&
|
|
633
634
|
sim.meta?.sootsimHostPid === pinnedHostPid,
|
|
634
635
|
)
|
|
635
|
-
|
|
636
|
+
if (successors.length !== 1) return null
|
|
637
|
+
hostPidBySimId.set(successors[0].id, pinnedHostPid)
|
|
638
|
+
return successors[0].id
|
|
636
639
|
}
|
|
637
640
|
|
|
638
641
|
// print a one-line notice on first sim-scoped command so agents/users see
|
|
@@ -736,7 +739,7 @@ export function createBridge(wsPort: number, opts: WsBridgeOptions = {}): WsBrid
|
|
|
736
739
|
if (payload.simId === undefined && defaultSimId) {
|
|
737
740
|
payload.simId = defaultSimId
|
|
738
741
|
}
|
|
739
|
-
maybeNoticeTarget(
|
|
742
|
+
maybeNoticeTarget(payload.type ?? '', payload.simId)
|
|
740
743
|
ws.send(JSON.stringify(payload))
|
|
741
744
|
})
|
|
742
745
|
}
|
|
@@ -750,27 +753,42 @@ export function createBridge(wsPort: number, opts: WsBridgeOptions = {}): WsBrid
|
|
|
750
753
|
// fail-closed saved-sim-gone path below when the pin file is cleared.
|
|
751
754
|
const sentSimId =
|
|
752
755
|
opts.simIdSource === 'flag' ? opts.simId : (readCurrentSimId() ?? opts.simId)
|
|
756
|
+
const targetedSimId =
|
|
757
|
+
typeof cmd.simId === 'string' && cmd.simId ? cmd.simId : sentSimId
|
|
753
758
|
try {
|
|
754
|
-
|
|
755
|
-
// the
|
|
756
|
-
// so
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
759
|
+
// a command can itself reload the page and retire its sim id. capture
|
|
760
|
+
// the browser-host lineage before dispatch, while the target still
|
|
761
|
+
// exists, so the caller can follow the replacement without guessing.
|
|
762
|
+
if (
|
|
763
|
+
targetedSimId &&
|
|
764
|
+
cmd.type !== 'bridge:list-sims' &&
|
|
765
|
+
!hostPidBySimId.has(targetedSimId)
|
|
766
|
+
) {
|
|
767
|
+
let lookup = lineageLookupBySimId.get(targetedSimId)
|
|
768
|
+
if (!lookup) {
|
|
769
|
+
lookup = (async () => {
|
|
770
|
+
try {
|
|
771
|
+
const sims = await sendOnce(undefined, { type: 'bridge:list-sims' })
|
|
772
|
+
if (!Array.isArray(sims)) return
|
|
773
|
+
const targeted = (sims as BridgeSimInfo[]).find(
|
|
774
|
+
(sim) => sim.id === targetedSimId,
|
|
775
|
+
)
|
|
776
|
+
const hostPid = targeted?.meta?.sootsimHostPid
|
|
777
|
+
if (typeof hostPid === 'number') {
|
|
778
|
+
hostPidBySimId.set(targetedSimId, hostPid)
|
|
779
|
+
}
|
|
780
|
+
} catch {
|
|
781
|
+
// lineage enables fail-closed reload following, but a failed
|
|
782
|
+
// observation must not replace the caller's command failure.
|
|
783
|
+
} finally {
|
|
784
|
+
lineageLookupBySimId.delete(targetedSimId)
|
|
785
|
+
}
|
|
786
|
+
})()
|
|
787
|
+
lineageLookupBySimId.set(targetedSimId, lookup)
|
|
788
|
+
}
|
|
789
|
+
await lookup
|
|
772
790
|
}
|
|
773
|
-
return
|
|
791
|
+
return await sendOnce(sentSimId)
|
|
774
792
|
} catch (error) {
|
|
775
793
|
const message = error instanceof Error ? error.message : String(error)
|
|
776
794
|
const missingSimMessage = `no sim connected with id ${sentSimId}`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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/cloud.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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/cloud.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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);
|
package/dist-lib/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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/detox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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;
|
|
@@ -1063,14 +1063,17 @@ function createBridge(wsPort, opts = {}) {
|
|
|
1063
1063
|
});
|
|
1064
1064
|
let warnedAboutContention = false;
|
|
1065
1065
|
let noticedTarget = false;
|
|
1066
|
-
|
|
1067
|
-
|
|
1066
|
+
const hostPidBySimId = /* @__PURE__ */ new Map();
|
|
1067
|
+
const lineageLookupBySimId = /* @__PURE__ */ new Map();
|
|
1068
1068
|
function pickReloadedSuccessor(sims, retiredSimId) {
|
|
1069
|
-
|
|
1069
|
+
const pinnedHostPid = hostPidBySimId.get(retiredSimId);
|
|
1070
|
+
if (pinnedHostPid === void 0) return null;
|
|
1070
1071
|
const successors = (Array.isArray(sims) ? sims : []).filter(
|
|
1071
1072
|
(sim) => sim.id !== retiredSimId && sim.readyState === "open" && sim.meta?.sootsimHostPid === pinnedHostPid
|
|
1072
1073
|
);
|
|
1073
|
-
|
|
1074
|
+
if (successors.length !== 1) return null;
|
|
1075
|
+
hostPidBySimId.set(successors[0].id, pinnedHostPid);
|
|
1076
|
+
return successors[0].id;
|
|
1074
1077
|
}
|
|
1075
1078
|
function maybeNoticeTarget(cmdType, simId) {
|
|
1076
1079
|
if (noticedTarget) return;
|
|
@@ -1153,26 +1156,37 @@ function createBridge(wsPort, opts = {}) {
|
|
|
1153
1156
|
if (payload.simId === void 0 && defaultSimId) {
|
|
1154
1157
|
payload.simId = defaultSimId;
|
|
1155
1158
|
}
|
|
1156
|
-
maybeNoticeTarget(
|
|
1159
|
+
maybeNoticeTarget(payload.type ?? "", payload.simId);
|
|
1157
1160
|
ws.send(JSON.stringify(payload));
|
|
1158
1161
|
});
|
|
1159
1162
|
};
|
|
1160
1163
|
const sentSimId = opts.simIdSource === "flag" ? opts.simId : readCurrentSimId() ?? opts.simId;
|
|
1164
|
+
const targetedSimId = typeof cmd.simId === "string" && cmd.simId ? cmd.simId : sentSimId;
|
|
1161
1165
|
try {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1166
|
+
if (targetedSimId && cmd.type !== "bridge:list-sims" && !hostPidBySimId.has(targetedSimId)) {
|
|
1167
|
+
let lookup = lineageLookupBySimId.get(targetedSimId);
|
|
1168
|
+
if (!lookup) {
|
|
1169
|
+
lookup = (async () => {
|
|
1170
|
+
try {
|
|
1171
|
+
const sims = await sendOnce(void 0, { type: "bridge:list-sims" });
|
|
1172
|
+
if (!Array.isArray(sims)) return;
|
|
1173
|
+
const targeted = sims.find(
|
|
1174
|
+
(sim) => sim.id === targetedSimId
|
|
1175
|
+
);
|
|
1176
|
+
const hostPid = targeted?.meta?.sootsimHostPid;
|
|
1177
|
+
if (typeof hostPid === "number") {
|
|
1178
|
+
hostPidBySimId.set(targetedSimId, hostPid);
|
|
1179
|
+
}
|
|
1180
|
+
} catch {
|
|
1181
|
+
} finally {
|
|
1182
|
+
lineageLookupBySimId.delete(targetedSimId);
|
|
1183
|
+
}
|
|
1184
|
+
})();
|
|
1185
|
+
lineageLookupBySimId.set(targetedSimId, lookup);
|
|
1186
|
+
}
|
|
1187
|
+
await lookup;
|
|
1174
1188
|
}
|
|
1175
|
-
return
|
|
1189
|
+
return await sendOnce(sentSimId);
|
|
1176
1190
|
} catch (error) {
|
|
1177
1191
|
const message = error instanceof Error ? error.message : String(error);
|
|
1178
1192
|
const missingSimMessage = `no sim connected with id ${sentSimId}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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.
|
|
1
|
+
/*! rnx v0.1.498 | (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);
|
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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;
|
|
@@ -31101,14 +31101,17 @@ function createBridge(wsPort, opts = {}) {
|
|
|
31101
31101
|
});
|
|
31102
31102
|
let warnedAboutContention = false;
|
|
31103
31103
|
let noticedTarget = false;
|
|
31104
|
-
|
|
31105
|
-
|
|
31104
|
+
const hostPidBySimId = /* @__PURE__ */ new Map();
|
|
31105
|
+
const lineageLookupBySimId = /* @__PURE__ */ new Map();
|
|
31106
31106
|
function pickReloadedSuccessor(sims, retiredSimId) {
|
|
31107
|
-
|
|
31107
|
+
const pinnedHostPid = hostPidBySimId.get(retiredSimId);
|
|
31108
|
+
if (pinnedHostPid === void 0) return null;
|
|
31108
31109
|
const successors = (Array.isArray(sims) ? sims : []).filter(
|
|
31109
31110
|
(sim) => sim.id !== retiredSimId && sim.readyState === "open" && sim.meta?.sootsimHostPid === pinnedHostPid
|
|
31110
31111
|
);
|
|
31111
|
-
|
|
31112
|
+
if (successors.length !== 1) return null;
|
|
31113
|
+
hostPidBySimId.set(successors[0].id, pinnedHostPid);
|
|
31114
|
+
return successors[0].id;
|
|
31112
31115
|
}
|
|
31113
31116
|
function maybeNoticeTarget(cmdType, simId) {
|
|
31114
31117
|
if (noticedTarget) return;
|
|
@@ -31191,26 +31194,37 @@ function createBridge(wsPort, opts = {}) {
|
|
|
31191
31194
|
if (payload.simId === void 0 && defaultSimId) {
|
|
31192
31195
|
payload.simId = defaultSimId;
|
|
31193
31196
|
}
|
|
31194
|
-
maybeNoticeTarget(
|
|
31197
|
+
maybeNoticeTarget(payload.type ?? "", payload.simId);
|
|
31195
31198
|
ws.send(JSON.stringify(payload));
|
|
31196
31199
|
});
|
|
31197
31200
|
};
|
|
31198
31201
|
const sentSimId = opts.simIdSource === "flag" ? opts.simId : readCurrentSimId() ?? opts.simId;
|
|
31202
|
+
const targetedSimId = typeof cmd.simId === "string" && cmd.simId ? cmd.simId : sentSimId;
|
|
31199
31203
|
try {
|
|
31200
|
-
|
|
31201
|
-
|
|
31202
|
-
|
|
31203
|
-
|
|
31204
|
-
|
|
31205
|
-
|
|
31206
|
-
|
|
31207
|
-
|
|
31208
|
-
|
|
31209
|
-
|
|
31210
|
-
|
|
31211
|
-
|
|
31204
|
+
if (targetedSimId && cmd.type !== "bridge:list-sims" && !hostPidBySimId.has(targetedSimId)) {
|
|
31205
|
+
let lookup = lineageLookupBySimId.get(targetedSimId);
|
|
31206
|
+
if (!lookup) {
|
|
31207
|
+
lookup = (async () => {
|
|
31208
|
+
try {
|
|
31209
|
+
const sims = await sendOnce(void 0, { type: "bridge:list-sims" });
|
|
31210
|
+
if (!Array.isArray(sims)) return;
|
|
31211
|
+
const targeted = sims.find(
|
|
31212
|
+
(sim) => sim.id === targetedSimId
|
|
31213
|
+
);
|
|
31214
|
+
const hostPid = targeted?.meta?.sootsimHostPid;
|
|
31215
|
+
if (typeof hostPid === "number") {
|
|
31216
|
+
hostPidBySimId.set(targetedSimId, hostPid);
|
|
31217
|
+
}
|
|
31218
|
+
} catch {
|
|
31219
|
+
} finally {
|
|
31220
|
+
lineageLookupBySimId.delete(targetedSimId);
|
|
31221
|
+
}
|
|
31222
|
+
})();
|
|
31223
|
+
lineageLookupBySimId.set(targetedSimId, lookup);
|
|
31224
|
+
}
|
|
31225
|
+
await lookup;
|
|
31212
31226
|
}
|
|
31213
|
-
return
|
|
31227
|
+
return await sendOnce(sentSimId);
|
|
31214
31228
|
} catch (error) {
|
|
31215
31229
|
const message = error instanceof Error ? error.message : String(error);
|
|
31216
31230
|
const missingSimMessage = `no sim connected with id ${sentSimId}`;
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.498 | (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
package/src/vite-plugin.ts
CHANGED
|
@@ -469,12 +469,30 @@ function rnghUpstreamInternalResolvePlugin(): Plugin {
|
|
|
469
469
|
// workletsBabelTransform populates `__closure` on user-code worklets so
|
|
470
470
|
// useAnimatedStyle/useDerivedValue/etc. subscribe correctly inside the
|
|
471
471
|
// worker. matching is content-driven today, so the predicate is `() => true`.
|
|
472
|
+
export function recordingPluginWorkerRedirect(): Plugin {
|
|
473
|
+
const workerTarget = path.resolve(
|
|
474
|
+
workspaceRoot,
|
|
475
|
+
'packages/rnx-plugin-recording/src/worker.ts',
|
|
476
|
+
)
|
|
477
|
+
return {
|
|
478
|
+
name: 'sootsim-recording-plugin-worker-redirect',
|
|
479
|
+
enforce: 'pre',
|
|
480
|
+
resolveId(source) {
|
|
481
|
+
if (source === '@rnx/plugin-recording') {
|
|
482
|
+
return workerTarget
|
|
483
|
+
}
|
|
484
|
+
return null
|
|
485
|
+
},
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
472
489
|
export function engineShellWorkerPlugins(): Plugin[] {
|
|
473
490
|
return [
|
|
474
491
|
workerReactBridgePlugin(),
|
|
475
492
|
fixJsxRuntimeExports(),
|
|
476
493
|
flowStripTransform(),
|
|
477
494
|
nodeModulesJsxTransform(),
|
|
495
|
+
recordingPluginWorkerRedirect(),
|
|
478
496
|
reanimatedNativeSeamRedirect(),
|
|
479
497
|
manifestNativeSeamRedirect(),
|
|
480
498
|
keyboardControllerBindingsRedirect(),
|
|
@@ -501,8 +519,8 @@ export function engineShellWorkerPlugins(): Plugin[] {
|
|
|
501
519
|
export type WorkerBootClosure = {
|
|
502
520
|
// substring of the worker entry module id this applies to
|
|
503
521
|
entry: string
|
|
504
|
-
// byte cap on the rendered worker file;
|
|
505
|
-
//
|
|
522
|
+
// byte cap on the rendered worker file; fix excess boot dependencies and
|
|
523
|
+
// unneeded inclusions rather than raising the cap
|
|
506
524
|
maxBytes: number
|
|
507
525
|
}
|
|
508
526
|
|
|
@@ -515,7 +533,7 @@ const ENGINE_WORKER_BOOT_CLOSURES: WorkerBootClosure[] = [
|
|
|
515
533
|
// when adding font work here, or both caps take the parser again.
|
|
516
534
|
// gesture handler 3's upstream hook surface moved the measured closure to
|
|
517
535
|
// 3,446,531 bytes. the vector catalog lookup and PUA overlay add 675 bytes.
|
|
518
|
-
{ entry: 'src/render-worker/shell-worker-entry.ts', maxBytes:
|
|
536
|
+
{ entry: 'src/render-worker/shell-worker-entry.ts', maxBytes: 3_451_000 },
|
|
519
537
|
{ entry: 'src/render-worker/compositor-worker-entry.ts', maxBytes: 1_080_000 },
|
|
520
538
|
{ entry: 'src/render-worker/compositor-worker-ganesh-entry.ts', maxBytes: 1_820_000 },
|
|
521
539
|
]
|
|
@@ -547,7 +565,7 @@ export function workerBootChunkPlugin(closures: WorkerBootClosure[]): Plugin {
|
|
|
547
565
|
const bytes = Buffer.byteLength(chunks[0].code)
|
|
548
566
|
if (bytes > closure.maxBytes) {
|
|
549
567
|
this.error(
|
|
550
|
-
`worker ${closure.entry}: ${chunks[0].fileName} is ${bytes} bytes, over the ${closure.maxBytes} byte cap;
|
|
568
|
+
`worker ${closure.entry}: ${chunks[0].fileName} is ${bytes} bytes, over the ${closure.maxBytes} byte cap; eliminate excess boot dependencies rather than raising the cap`,
|
|
551
569
|
)
|
|
552
570
|
}
|
|
553
571
|
},
|