rnxsim 0.1.376 → 0.1.377
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/README.md +28 -25
- package/cli/app-config.ts +9 -12
- package/cli/app-fonts.ts +3 -3
- package/cli/app-project.ts +8 -8
- package/cli/auth.ts +7 -9
- package/cli/bin.ts +16 -31
- package/cli/bridge-flow-runner.ts +3 -3
- package/cli/browser-backend.ts +44 -0
- package/cli/command-contract.ts +221 -0
- package/cli/command-registry.ts +291 -0
- package/cli/commands/agent-wrapper.ts +2 -2
- package/cli/commands/app-fonts.ts +2 -2
- package/cli/commands/assert.ts +3 -3
- package/cli/commands/auth.ts +1 -1
- package/cli/commands/box/cloud-box.ts +1 -1
- package/cli/commands/box/plane-share.ts +2 -2
- package/cli/commands/box.ts +4 -6
- package/cli/commands/compat.ts +1 -1
- package/cli/commands/config.ts +2 -2
- package/cli/commands/control.ts +29 -29
- package/cli/commands/cpu-profile.ts +7 -7
- package/cli/commands/daemon-mac-app.ts +7 -7
- package/cli/commands/daemon.ts +10 -10
- package/cli/commands/debug.ts +11 -11
- package/cli/commands/detox.ts +13 -13
- package/cli/commands/diagnose.ts +6 -6
- package/cli/commands/do-chain.ts +1 -2
- package/cli/commands/electron.ts +1 -3
- package/cli/commands/film.ts +3 -3
- package/cli/commands/flow.ts +43 -43
- package/cli/commands/inspect/count.ts +1 -1
- package/cli/commands/inspect/describe.ts +1 -1
- package/cli/commands/inspect/env.ts +2 -2
- package/cli/commands/inspect/get-layout.ts +1 -1
- package/cli/commands/inspect/keyboard.ts +1 -1
- package/cli/commands/inspect/list.ts +1 -1
- package/cli/commands/inspect/memory.ts +1 -1
- package/cli/commands/inspect/resolve-target.ts +1 -1
- package/cli/commands/inspect/screens.ts +1 -1
- package/cli/commands/inspect/tree.ts +1 -1
- package/cli/commands/inspect/url.ts +1 -1
- package/cli/commands/inspect/wait-event.ts +5 -5
- package/cli/commands/inspect.ts +34 -34
- package/cli/commands/install-desktop.ts +3 -3
- package/cli/commands/login.ts +6 -6
- package/cli/commands/maestro-generate.ts +5 -5
- package/cli/commands/maestro.ts +5 -5
- package/cli/commands/profile.ts +1 -1
- package/cli/commands/record.ts +9 -9
- package/cli/commands/runtime.ts +18 -18
- package/cli/commands/screenshot-command.ts +1 -1
- package/cli/commands/screenshot-layers.ts +5 -5
- package/cli/commands/screenshot-mode.ts +1 -1
- package/cli/commands/screenshot.ts +8 -8
- package/cli/commands/screenshots-capture.ts +5 -5
- package/cli/commands/serve.ts +3 -3
- package/cli/commands/setup.ts +20 -12
- package/cli/commands/skills.ts +5 -5
- package/cli/commands/slides.ts +1 -1
- package/cli/commands/telemetry.ts +1 -1
- package/cli/commands/three-mode.ts +1 -1
- package/cli/commands/timeline.ts +8 -8
- package/cli/commands/upgrade.ts +116 -131
- package/cli/commands/upload.ts +12 -12
- package/cli/commands/version.ts +7 -7
- package/cli/commands/what-happened.ts +9 -9
- package/cli/current-sim.ts +3 -3
- package/cli/desktop-companion.ts +1 -1
- package/cli/drivers/playwright.ts +9 -9
- package/cli/drivers/registry.ts +1 -1
- package/cli/drivers/types.ts +1 -1
- package/cli/flow-file.ts +2 -2
- package/cli/flow-session.ts +1 -1
- package/cli/help-core.ts +136 -0
- package/cli/help.ts +17 -53
- package/cli/hints.ts +5 -5
- package/cli/inspect-notice-state.ts +1 -1
- package/cli/maestro-js.ts +1 -1
- package/cli/outbound-endpoints.ts +23 -5
- package/cli/parse-args.ts +19 -66
- package/cli/recording-access.ts +1 -1
- package/cli/registry.ts +1 -0
- package/cli/run-registry.ts +1 -1
- package/cli/run-rnx-core.ts +148 -0
- package/cli/run-rnx.ts +6 -9
- package/cli/runtime-notes.ts +3 -3
- package/cli/standalone.ts +4 -0
- package/cli/ws-bridge.ts +8 -8
- package/detox/config-loader.ts +2 -2
- package/detox/index.ts +8 -8
- package/detox/jest-preset.cjs +1 -1
- package/detox/navigation.ts +2 -2
- package/dist-lib/agent-daemon-client.cjs +5 -5
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +2 -2
- package/dist-lib/agent-sessions.cjs +10 -10
- package/dist-lib/attached-projects.cjs +6 -6
- package/dist-lib/auth/shared-session.cjs +6 -6
- 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/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +25 -25
- package/dist-lib/detox/index.cjs +9 -9
- package/dist-lib/detox/jest-preset.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +29 -29
- package/dist-lib/host/bridge-host.cjs +128 -49
- 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 +14 -14
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.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 +8 -8
- package/dist-lib/profiles.cjs +12 -12
- 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 +8 -8
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +262 -135
- package/dist-lib/vite.cjs +9 -9
- package/package.json +4 -11
- package/scripts/dev-server-scanner.ts +2 -2
- package/scripts/optional-demo-registry.ts +1 -1
- package/skills/contrast/SKILL.md +3 -3
- package/skills/rnx-debug/SKILL.md +1 -1
- package/skills/rnx-test/SKILL.md +2 -2
- package/src/agent-identity.ts +1 -1
- package/src/agent-sessions.ts +7 -5
- package/src/cli-version.ts +12 -4
- package/src/config.ts +26 -28
- package/src/disk-cleanup.ts +11 -11
- package/src/home-paths.ts +28 -28
- package/src/host/bridge-host.ts +16 -16
- package/src/metro-plugin.ts +2 -2
- package/src/profiles.ts +2 -2
- package/src/runtime-assets.ts +7 -7
- package/src/runtime-delivery.ts +13 -13
- package/src/screenshots/orchestrate.ts +1 -1
- package/src/screenshots/schema.ts +2 -2
- package/src/skills/builtin/a11y-review.ts +2 -2
- package/src/skills/builtin/compat-check.ts +2 -2
- package/src/skills/builtin/maestro-test.ts +2 -2
- package/src/skills/builtin/perf-profile.ts +2 -2
- package/src/skills/builtin/screenshot-all.ts +2 -2
- package/src/skills/builtin/visual-diff.ts +2 -2
- package/src/skills/registry.ts +8 -8
- package/src/skills/types.ts +1 -1
- package/src/vite-plugin-one.ts +3 -3
- package/src/vite-plugin.ts +15 -2
- package/dist-cli/bin.js +0 -15
- package/dist-cli/chunks/agent-H42FCKFF.js +0 -48
- package/dist-cli/chunks/agent-wrapper-BBZKTZS6.js +0 -17
- package/dist-cli/chunks/app-fonts-43VXIKF4.js +0 -4
- package/dist-cli/chunks/assert-IXOLVO5Z.js +0 -49
- package/dist-cli/chunks/auth-KFMFB6FU.js +0 -12
- package/dist-cli/chunks/beta-5AO3SJB7.js +0 -4
- package/dist-cli/chunks/box-ZHM66L6K.js +0 -1730
- package/dist-cli/chunks/camera-FNJVFCDQ.js +0 -33
- package/dist-cli/chunks/chunk-37MCSPTE.js +0 -71
- package/dist-cli/chunks/chunk-3PEMSUAQ.js +0 -30
- package/dist-cli/chunks/chunk-4TQ5HOK3.js +0 -7
- package/dist-cli/chunks/chunk-5YZYDEMI.js +0 -4
- package/dist-cli/chunks/chunk-6CV3R3XD.js +0 -15
- package/dist-cli/chunks/chunk-7LGK5XU6.js +0 -4
- package/dist-cli/chunks/chunk-7R2TK2NY.js +0 -4
- package/dist-cli/chunks/chunk-7VZZQQEE.js +0 -497
- package/dist-cli/chunks/chunk-AFOVILIL.js +0 -130
- package/dist-cli/chunks/chunk-BEU7CD7E.js +0 -9
- package/dist-cli/chunks/chunk-CE4JQJ6Y.js +0 -6
- package/dist-cli/chunks/chunk-CIE6CZXL.js +0 -142
- package/dist-cli/chunks/chunk-CSJ7L7ZL.js +0 -312
- package/dist-cli/chunks/chunk-CWCQP53A.js +0 -27
- package/dist-cli/chunks/chunk-DCS5FK5N.js +0 -7
- package/dist-cli/chunks/chunk-DEV3E3MV.js +0 -4
- package/dist-cli/chunks/chunk-DGJMIVZM.js +0 -5
- package/dist-cli/chunks/chunk-DGX3MN65.js +0 -5
- package/dist-cli/chunks/chunk-DNPQMTW5.js +0 -4
- package/dist-cli/chunks/chunk-DOVBJBVD.js +0 -5
- package/dist-cli/chunks/chunk-DPBJ3S3J.js +0 -3
- package/dist-cli/chunks/chunk-FVZBGPCU.js +0 -4
- package/dist-cli/chunks/chunk-GDKMOIUT.js +0 -4
- package/dist-cli/chunks/chunk-GIF2NJCS.js +0 -32
- package/dist-cli/chunks/chunk-GZE57ORL.js +0 -4
- package/dist-cli/chunks/chunk-H3U56DKI.js +0 -24
- package/dist-cli/chunks/chunk-HZLOYAPH.js +0 -4
- package/dist-cli/chunks/chunk-J2IKAEU2.js +0 -4
- package/dist-cli/chunks/chunk-JXAXYK7W.js +0 -11
- package/dist-cli/chunks/chunk-KJE2O2GK.js +0 -4
- package/dist-cli/chunks/chunk-KMNVDZZI.js +0 -423
- package/dist-cli/chunks/chunk-LC3QRIRB.js +0 -10
- package/dist-cli/chunks/chunk-LGFTAQYC.js +0 -4
- package/dist-cli/chunks/chunk-LQMUA5IY.js +0 -4
- package/dist-cli/chunks/chunk-MFIQTWC5.js +0 -4
- package/dist-cli/chunks/chunk-MGALNF2F.js +0 -7
- package/dist-cli/chunks/chunk-MLBZZHOY.js +0 -4
- package/dist-cli/chunks/chunk-NNRF7GIB.js +0 -107
- package/dist-cli/chunks/chunk-NORLYTTO.js +0 -7
- package/dist-cli/chunks/chunk-P6KVGV3H.js +0 -14
- package/dist-cli/chunks/chunk-PAJTUK33.js +0 -4
- package/dist-cli/chunks/chunk-QELIC5XP.js +0 -4
- package/dist-cli/chunks/chunk-QRDF33WD.js +0 -11
- package/dist-cli/chunks/chunk-R76BA7C7.js +0 -535
- package/dist-cli/chunks/chunk-RVEB4CZ2.js +0 -4
- package/dist-cli/chunks/chunk-SK4M7NXT.js +0 -5
- package/dist-cli/chunks/chunk-SKMG5DD7.js +0 -5
- package/dist-cli/chunks/chunk-TEESPOYR.js +0 -4
- package/dist-cli/chunks/chunk-TH2UFGVP.js +0 -4
- package/dist-cli/chunks/chunk-TLP3T3VO.js +0 -4
- package/dist-cli/chunks/chunk-TZUABDIJ.js +0 -38
- package/dist-cli/chunks/chunk-UB2W6OQM.js +0 -99
- package/dist-cli/chunks/chunk-UYVXALPB.js +0 -506
- package/dist-cli/chunks/chunk-VQDYFFIG.js +0 -5
- package/dist-cli/chunks/chunk-VWCNJPCJ.js +0 -5
- package/dist-cli/chunks/chunk-VZIK4WIS.js +0 -74
- package/dist-cli/chunks/chunk-W3FNXAQP.js +0 -4
- package/dist-cli/chunks/chunk-XCDNVNP3.js +0 -4
- package/dist-cli/chunks/chunk-XSVILA4Z.js +0 -4
- package/dist-cli/chunks/chunk-XUTJ7ZWD.js +0 -4
- package/dist-cli/chunks/chunk-YTXY3MHW.js +0 -4
- package/dist-cli/chunks/chunk-ZF7PVX44.js +0 -28
- package/dist-cli/chunks/chunk-ZSSG7OR7.js +0 -4
- package/dist-cli/chunks/cleanup-MLOK2OZA.js +0 -25
- package/dist-cli/chunks/cli-version-OBNR366V.js +0 -4
- package/dist-cli/chunks/compat-SHMFSKU7.js +0 -23
- package/dist-cli/chunks/config-TPEAEUJ2.js +0 -13
- package/dist-cli/chunks/connect-3LEXWTE5.js +0 -4
- package/dist-cli/chunks/control-Z3FWA6BO.js +0 -4
- package/dist-cli/chunks/daemon-RSVYSC65.js +0 -4
- package/dist-cli/chunks/debug-GUVAK2KR.js +0 -200
- package/dist-cli/chunks/desktop-OOP2PTKP.js +0 -31
- package/dist-cli/chunks/detox-C2ILVBEC.js +0 -52
- package/dist-cli/chunks/device-NXIQQJWR.js +0 -18
- package/dist-cli/chunks/diagnose-2JBGYE5L.js +0 -43
- package/dist-cli/chunks/disk-cleanup-VURWJYQV.js +0 -4
- package/dist-cli/chunks/do-chain-DJ4UQC7A.js +0 -5
- package/dist-cli/chunks/drivers-JMA2OIKU.js +0 -4
- package/dist-cli/chunks/env-KTNPKEZR.js +0 -4
- package/dist-cli/chunks/film-DCPS7EID.js +0 -74
- package/dist-cli/chunks/flow-4DZ7B2OA.js +0 -4
- package/dist-cli/chunks/help-34CJMQY2.js +0 -4
- package/dist-cli/chunks/hidden-runtime-alias-HHT2C7WE.js +0 -4
- package/dist-cli/chunks/home-paths-KTPGCPMS.js +0 -4
- package/dist-cli/chunks/inspect-JF5WYJRD.js +0 -4
- package/dist-cli/chunks/install-desktop-ZIC4CDXI.js +0 -4
- package/dist-cli/chunks/login-TTJAOI2Q.js +0 -26
- package/dist-cli/chunks/logout-ERAQ6SKW.js +0 -4
- package/dist-cli/chunks/maestro-W46QCF77.js +0 -108
- package/dist-cli/chunks/maestro-generate-VBLM3MTU.js +0 -36
- package/dist-cli/chunks/mode-ZEDZK7R7.js +0 -26
- package/dist-cli/chunks/optional-demo-registry-ZUTPSVYQ.js +0 -4
- package/dist-cli/chunks/perf-YVT2WXT4.js +0 -48
- package/dist-cli/chunks/permissions-L7VVDHFP.js +0 -13
- package/dist-cli/chunks/platform-7TJOU2FB.js +0 -6
- package/dist-cli/chunks/privacy-57UOTB5J.js +0 -4
- package/dist-cli/chunks/record-VXG37P7U.js +0 -72
- package/dist-cli/chunks/report-issue-WNNOBZHC.js +0 -29
- package/dist-cli/chunks/reset-H5NBFE5U.js +0 -4
- package/dist-cli/chunks/resolve-target-57TK5WLE.js +0 -4
- package/dist-cli/chunks/runtime-QU2NIF2K.js +0 -4
- package/dist-cli/chunks/screenshot-command-AN56TTG7.js +0 -159
- package/dist-cli/chunks/screenshot-layers-3W5R7DB2.js +0 -20
- package/dist-cli/chunks/screenshots-capture-6AWJY7XZ.js +0 -42
- package/dist-cli/chunks/serve-GLYO5Q7J.js +0 -56
- package/dist-cli/chunks/setup-UA2HLD7S.js +0 -4
- package/dist-cli/chunks/sim-client-5C2RDQQO.js +0 -4
- package/dist-cli/chunks/skills-EYXWBRNQ.js +0 -50
- package/dist-cli/chunks/state-REJ7W6K3.js +0 -14
- package/dist-cli/chunks/storage-CFMDHI3V.js +0 -37
- package/dist-cli/chunks/store-XMCUA45G.js +0 -4
- package/dist-cli/chunks/telemetry-FBL3NAKB.js +0 -4
- package/dist-cli/chunks/timeline-HMCHN5FO.js +0 -24
- package/dist-cli/chunks/upgrade-2QSPAA3P.js +0 -7
- package/dist-cli/chunks/upload-DUQBKZYV.js +0 -4
- package/dist-cli/chunks/version-IOA6QFGB.js +0 -6
- package/dist-cli/chunks/web-NCGUYVCJ.js +0 -4
- package/dist-cli/chunks/welcome-QYGSQCWQ.js +0 -5
- package/dist-cli/chunks/what-happened-YTOUK4LO.js +0 -25
- package/dist-cli/chunks/ws-bridge-OF4OZARG.js +0 -4
- package/scripts/postinstall.cjs +0 -3
- package/scripts/preuninstall.cjs +0 -118
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.377 | (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;
|
|
@@ -1783,9 +1783,9 @@ var init_registry = __esm({
|
|
|
1783
1783
|
coverage: 0.9,
|
|
1784
1784
|
coverageSource: "estimated",
|
|
1785
1785
|
capabilityCoverage: CAPABILITY_INVENTORY_PACKAGE_COVERAGE["react-native-gesture-handler"],
|
|
1786
|
-
note: "tap, pan, pinch, rotation, fling, long press, race, manual, simultaneous",
|
|
1787
|
-
working: "GestureDetector, Gesture.Tap/Pan/Pinch/Rotation/Fling/LongPress/Manual/Race/Simultaneous/Exclusive/Hover, simultaneousWithExternalGesture/requireExternalGestureToFail/blocksExternalGesture, ScrollView/FlatList, Switch/RefreshControl, Pressable/Text, Touchables, BaseButton/RawButton/RectButton/BorderlessButton/PureNativeButton, Swipeable, ReanimatedSwipeable, DrawerLayout (the upstream component running on this seam: renderNavigationView, drawerPosition/drawerType/drawerWidth/edgeWidth, openDrawer/closeDrawer, edge-swipe drag, onDrawerOpen/onDrawerClose/onDrawerStateChanged), GestureHandlerRootView, createNativeWrapper, gestureHandlerRootHOC, PointerType/MouseButton/HoverEffect exports, velocity tracking, activeOffsets, multi-tap",
|
|
1788
|
-
missing: "
|
|
1786
|
+
note: "tap, pan, pinch, rotation, fling, long press, race, manual, simultaneous, force touch unavailable-hardware parity",
|
|
1787
|
+
working: "GestureDetector, Gesture.Tap/Pan/Pinch/Rotation/Fling/LongPress/ForceTouch/Manual/Race/Simultaneous/Exclusive/Hover, ForceTouchGestureHandler unavailable-hardware fallback (children render, forceTouchAvailable false, no force events), simultaneousWithExternalGesture/requireExternalGestureToFail/blocksExternalGesture, ScrollView/FlatList, Switch/RefreshControl, Pressable/Text, Touchables, BaseButton/RawButton/RectButton/BorderlessButton/PureNativeButton, Swipeable, ReanimatedSwipeable, DrawerLayout (the upstream component running on this seam: renderNavigationView, drawerPosition/drawerType/drawerWidth/edgeWidth, openDrawer/closeDrawer, edge-swipe drag, onDrawerOpen/onDrawerClose/onDrawerStateChanged), GestureHandlerRootView, createNativeWrapper, gestureHandlerRootHOC, PointerType/MouseButton/HoverEffect exports, velocity tracking, activeOffsets, multi-tap",
|
|
1788
|
+
missing: "Force Touch recognition is unavailable because browser pointer input has no pressure signal; both public APIs expose the upstream unavailable-hardware behavior instead of inventing force events"
|
|
1789
1789
|
}
|
|
1790
1790
|
]
|
|
1791
1791
|
},
|
|
@@ -2675,7 +2675,7 @@ var init_registry = __esm({
|
|
|
2675
2675
|
coverage: 0.95,
|
|
2676
2676
|
note: "suite-scoped NSUserDefaults-style string storage backed by localStorage or in-memory storage",
|
|
2677
2677
|
working: "default export, get, set, clear, getMultiple, setMultiple, clearMultiple, getAll, clearAll, setName, getName",
|
|
2678
|
-
missing: "sharing values with real native UserDefaults/app groups outside the
|
|
2678
|
+
missing: "sharing values with real native UserDefaults/app groups outside the RNX runtime"
|
|
2679
2679
|
}
|
|
2680
2680
|
]
|
|
2681
2681
|
},
|
|
@@ -14439,14 +14439,14 @@ var init_backend_origin = __esm({
|
|
|
14439
14439
|
function hasOwnKeys(value) {
|
|
14440
14440
|
return !!value && Object.keys(value).length > 0;
|
|
14441
14441
|
}
|
|
14442
|
-
function
|
|
14442
|
+
function hasRNXConfig(config) {
|
|
14443
14443
|
if (!config) return false;
|
|
14444
14444
|
return typeof config.runtimeVersion === "string" && config.runtimeVersion.length > 0 || hasOwnKeys(config.modules) || hasOwnKeys(config.turboModules) || hasOwnKeys(config.nativeModules) || hasOwnKeys(config.env) || hasOwnKeys(config.network?.remap) || hasOwnKeys(config.settings) || hasOwnKeys(config.initialState);
|
|
14445
14445
|
}
|
|
14446
|
-
function
|
|
14447
|
-
if (!
|
|
14448
|
-
if (!
|
|
14449
|
-
if (!
|
|
14446
|
+
function mergeRNXConfig(base, override) {
|
|
14447
|
+
if (!hasRNXConfig(base) && !hasRNXConfig(override)) return void 0;
|
|
14448
|
+
if (!hasRNXConfig(base)) return override ? { ...override } : void 0;
|
|
14449
|
+
if (!hasRNXConfig(override)) return base ? { ...base } : void 0;
|
|
14450
14450
|
return {
|
|
14451
14451
|
runtimeVersion: override.runtimeVersion ?? base.runtimeVersion,
|
|
14452
14452
|
modules: { ...base.modules || {}, ...override.modules || {} },
|
|
@@ -14466,20 +14466,20 @@ function mergeSootSimConfig(base, override) {
|
|
|
14466
14466
|
initialState: { ...base.initialState || {}, ...override.initialState || {} }
|
|
14467
14467
|
};
|
|
14468
14468
|
}
|
|
14469
|
-
function
|
|
14469
|
+
function applyRNXConfigToUrl(url, config) {
|
|
14470
14470
|
const parsed = new URL(url);
|
|
14471
|
-
if (
|
|
14472
|
-
parsed.searchParams.set(
|
|
14471
|
+
if (hasRNXConfig(config)) {
|
|
14472
|
+
parsed.searchParams.set(RNX_CONFIG_QUERY_PARAM, JSON.stringify(config));
|
|
14473
14473
|
} else {
|
|
14474
|
-
parsed.searchParams.delete(
|
|
14474
|
+
parsed.searchParams.delete(RNX_CONFIG_QUERY_PARAM);
|
|
14475
14475
|
}
|
|
14476
14476
|
return parsed.toString();
|
|
14477
14477
|
}
|
|
14478
|
-
var
|
|
14478
|
+
var RNX_CONFIG_QUERY_PARAM;
|
|
14479
14479
|
var init_config = __esm({
|
|
14480
14480
|
"src/config.ts"() {
|
|
14481
14481
|
"use strict";
|
|
14482
|
-
|
|
14482
|
+
RNX_CONFIG_QUERY_PARAM = "rnxConfig";
|
|
14483
14483
|
}
|
|
14484
14484
|
});
|
|
14485
14485
|
|
|
@@ -15219,7 +15219,7 @@ function withRuntimeConfig(port, bundleUrl, projectCwd) {
|
|
|
15219
15219
|
}) : [];
|
|
15220
15220
|
const exactKnownApps = knownApps.filter((app) => app.preferredPort === port);
|
|
15221
15221
|
const knownApp = exactKnownApps.length === 1 ? exactKnownApps[0] : exactKnownApps.length === 0 && knownApps.length === 1 ? knownApps[0] : void 0;
|
|
15222
|
-
const configured = knownApp?.runtimeConfig ?
|
|
15222
|
+
const configured = knownApp?.runtimeConfig ? applyRNXConfigToUrl(bundleUrl, knownApp.runtimeConfig) : bundleUrl;
|
|
15223
15223
|
return normalizeNativeDevBundleUrl(configured);
|
|
15224
15224
|
}
|
|
15225
15225
|
function isDirectOneBundleUrl(bundleUrl) {
|
|
@@ -15610,6 +15610,10 @@ var init_public_brand = __esm({
|
|
|
15610
15610
|
// src/cli-version.ts
|
|
15611
15611
|
function getCliVersion() {
|
|
15612
15612
|
if (cached2 != null) return cached2;
|
|
15613
|
+
if (typeof __RNX_CLI_VERSION__ !== "undefined" && typeof __RNX_CLI_VERSION__ === "string" && __RNX_CLI_VERSION__) {
|
|
15614
|
+
cached2 = __RNX_CLI_VERSION__;
|
|
15615
|
+
return cached2;
|
|
15616
|
+
}
|
|
15613
15617
|
const candidates = [
|
|
15614
15618
|
() => (0, import_node_url2.fileURLToPath)(import_meta.resolve(`${rnxPublicBrand.packageName}/package.json`)),
|
|
15615
15619
|
() => (0, import_node_url2.fileURLToPath)(new URL("../package.json", __sootsim_import_meta_url))
|
|
@@ -15647,7 +15651,7 @@ __export(home_paths_exports, {
|
|
|
15647
15651
|
DAEMON_HEARTBEAT_STALE_MS: () => DAEMON_HEARTBEAT_STALE_MS,
|
|
15648
15652
|
DAEMON_LOCKFILE: () => DAEMON_LOCKFILE,
|
|
15649
15653
|
DEV_BRIDGES_DIR: () => DEV_BRIDGES_DIR,
|
|
15650
|
-
|
|
15654
|
+
RNX_HOME_ENV: () => RNX_HOME_ENV,
|
|
15651
15655
|
activeRuntimeDir: () => activeRuntimeDir,
|
|
15652
15656
|
activeRuntimeFile: () => activeRuntimeFile,
|
|
15653
15657
|
cacheDir: () => cacheDir,
|
|
@@ -15664,7 +15668,7 @@ __export(home_paths_exports, {
|
|
|
15664
15668
|
electronDir: () => electronDir,
|
|
15665
15669
|
electronUserDataDir: () => electronUserDataDir,
|
|
15666
15670
|
electronVersionDir: () => electronVersionDir,
|
|
15667
|
-
|
|
15671
|
+
ensureRnxHome: () => ensureRnxHome,
|
|
15668
15672
|
isDaemonLockfileFresh: () => isDaemonLockfileFresh,
|
|
15669
15673
|
isDevBridgeLockfileFresh: () => isDevBridgeLockfileFresh,
|
|
15670
15674
|
isDevWorkstation: () => isDevWorkstation,
|
|
@@ -15681,11 +15685,11 @@ __export(home_paths_exports, {
|
|
|
15681
15685
|
readSimulatorDriverPreference: () => readSimulatorDriverPreference,
|
|
15682
15686
|
removeDaemonLockfile: () => removeDaemonLockfile,
|
|
15683
15687
|
removeDevBridgeLockfile: () => removeDevBridgeLockfile,
|
|
15688
|
+
rnxHomeDir: () => rnxHomeDir,
|
|
15684
15689
|
runtimeDir: () => runtimeDir,
|
|
15685
15690
|
runtimeUpgradeNoticePath: () => runtimeUpgradeNoticePath,
|
|
15686
15691
|
runtimesDir: () => runtimesDir,
|
|
15687
15692
|
shouldSkipPersistentDaemon: () => shouldSkipPersistentDaemon,
|
|
15688
|
-
sootsimHomeDir: () => sootsimHomeDir,
|
|
15689
15693
|
writeActiveRuntime: () => writeActiveRuntime,
|
|
15690
15694
|
writeDaemonLockfile: () => writeDaemonLockfile,
|
|
15691
15695
|
writeDevBridgeLockfile: () => writeDevBridgeLockfile,
|
|
@@ -15694,10 +15698,10 @@ __export(home_paths_exports, {
|
|
|
15694
15698
|
writeRuntimeUpgradeNotice: () => writeRuntimeUpgradeNotice,
|
|
15695
15699
|
writeSharedConfig: () => writeSharedConfig
|
|
15696
15700
|
});
|
|
15697
|
-
function
|
|
15698
|
-
const override = process.env[
|
|
15701
|
+
function rnxHomeDir() {
|
|
15702
|
+
const override = process.env[RNX_HOME_ENV];
|
|
15699
15703
|
if (override && override.length > 0) return import_node_path4.default.resolve(override);
|
|
15700
|
-
return import_node_path4.default.join((0, import_node_os.homedir)(), ".
|
|
15704
|
+
return import_node_path4.default.join((0, import_node_os.homedir)(), ".rnx");
|
|
15701
15705
|
}
|
|
15702
15706
|
function isSootsimDevCheckout() {
|
|
15703
15707
|
if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
|
|
@@ -15721,7 +15725,7 @@ function shouldSkipPersistentDaemon() {
|
|
|
15721
15725
|
return isSootsimDevCheckout() || isDevWorkstation();
|
|
15722
15726
|
}
|
|
15723
15727
|
function runtimesDir() {
|
|
15724
|
-
return import_node_path4.default.join(
|
|
15728
|
+
return import_node_path4.default.join(rnxHomeDir(), "runtimes");
|
|
15725
15729
|
}
|
|
15726
15730
|
function runtimeDir(version) {
|
|
15727
15731
|
return import_node_path4.default.join(runtimesDir(), version);
|
|
@@ -15730,7 +15734,7 @@ function activeRuntimeFile() {
|
|
|
15730
15734
|
return import_node_path4.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
15731
15735
|
}
|
|
15732
15736
|
function electronDir() {
|
|
15733
|
-
return import_node_path4.default.join(
|
|
15737
|
+
return import_node_path4.default.join(rnxHomeDir(), "electron");
|
|
15734
15738
|
}
|
|
15735
15739
|
function electronUserDataDir() {
|
|
15736
15740
|
return import_node_path4.default.join(electronDir(), "userData");
|
|
@@ -15739,28 +15743,28 @@ function electronVersionDir(version) {
|
|
|
15739
15743
|
return import_node_path4.default.join(electronDir(), version);
|
|
15740
15744
|
}
|
|
15741
15745
|
function profilesDir() {
|
|
15742
|
-
return import_node_path4.default.join(
|
|
15746
|
+
return import_node_path4.default.join(rnxHomeDir(), "profiles");
|
|
15743
15747
|
}
|
|
15744
15748
|
function cameraFixturesDir() {
|
|
15745
|
-
return import_node_path4.default.join(
|
|
15749
|
+
return import_node_path4.default.join(rnxHomeDir(), "camera-fixtures");
|
|
15746
15750
|
}
|
|
15747
15751
|
function daemonAppDir() {
|
|
15748
|
-
return import_node_path4.default.join(
|
|
15752
|
+
return import_node_path4.default.join(rnxHomeDir(), "daemon-app");
|
|
15749
15753
|
}
|
|
15750
15754
|
function daemonAppBundlePath() {
|
|
15751
|
-
return import_node_path4.default.join(daemonAppDir(), "
|
|
15755
|
+
return import_node_path4.default.join(daemonAppDir(), "RNX Daemon.app");
|
|
15752
15756
|
}
|
|
15753
15757
|
function daemonAppLauncherPath() {
|
|
15754
|
-
return import_node_path4.default.join(daemonAppBundlePath(), "Contents", "MacOS", "
|
|
15758
|
+
return import_node_path4.default.join(daemonAppBundlePath(), "Contents", "MacOS", "rnx-daemon");
|
|
15755
15759
|
}
|
|
15756
15760
|
function cacheDir() {
|
|
15757
|
-
return import_node_path4.default.join(
|
|
15761
|
+
return import_node_path4.default.join(rnxHomeDir(), "cache");
|
|
15758
15762
|
}
|
|
15759
15763
|
function daemonLockfilePath() {
|
|
15760
|
-
return import_node_path4.default.join(
|
|
15764
|
+
return import_node_path4.default.join(rnxHomeDir(), DAEMON_LOCKFILE);
|
|
15761
15765
|
}
|
|
15762
15766
|
function devBridgesDir() {
|
|
15763
|
-
return import_node_path4.default.join(
|
|
15767
|
+
return import_node_path4.default.join(rnxHomeDir(), DEV_BRIDGES_DIR);
|
|
15764
15768
|
}
|
|
15765
15769
|
function devBridgeLockfilePath(bridgePort) {
|
|
15766
15770
|
if (!Number.isInteger(bridgePort) || bridgePort <= 0) {
|
|
@@ -15769,7 +15773,7 @@ function devBridgeLockfilePath(bridgePort) {
|
|
|
15769
15773
|
return import_node_path4.default.join(devBridgesDir(), `${bridgePort}.json`);
|
|
15770
15774
|
}
|
|
15771
15775
|
function configFilePath() {
|
|
15772
|
-
return import_node_path4.default.join(
|
|
15776
|
+
return import_node_path4.default.join(rnxHomeDir(), CONFIG_FILE);
|
|
15773
15777
|
}
|
|
15774
15778
|
function readSharedConfig() {
|
|
15775
15779
|
try {
|
|
@@ -15781,7 +15785,7 @@ function readSharedConfig() {
|
|
|
15781
15785
|
}
|
|
15782
15786
|
}
|
|
15783
15787
|
function writeSharedConfig(patch) {
|
|
15784
|
-
|
|
15788
|
+
ensureRnxHome();
|
|
15785
15789
|
const current = readSharedConfig();
|
|
15786
15790
|
const next = { ...current, ...patch };
|
|
15787
15791
|
if (patch.settings && typeof patch.settings === "object") {
|
|
@@ -15835,10 +15839,10 @@ function readOrCreateAnonymousId() {
|
|
|
15835
15839
|
return created;
|
|
15836
15840
|
}
|
|
15837
15841
|
function runtimeUpgradeNoticePath() {
|
|
15838
|
-
return import_node_path4.default.join(
|
|
15842
|
+
return import_node_path4.default.join(rnxHomeDir(), "runtime-upgraded.json");
|
|
15839
15843
|
}
|
|
15840
15844
|
function writeRuntimeUpgradeNotice(notice) {
|
|
15841
|
-
|
|
15845
|
+
ensureRnxHome();
|
|
15842
15846
|
const tmp = `${runtimeUpgradeNoticePath()}.tmp`;
|
|
15843
15847
|
import_node_fs4.default.writeFileSync(tmp, `${JSON.stringify(notice)}
|
|
15844
15848
|
`, "utf8");
|
|
@@ -15859,8 +15863,8 @@ function consumeRuntimeUpgradeNotice() {
|
|
|
15859
15863
|
return null;
|
|
15860
15864
|
}
|
|
15861
15865
|
}
|
|
15862
|
-
function
|
|
15863
|
-
import_node_fs4.default.mkdirSync(
|
|
15866
|
+
function ensureRnxHome() {
|
|
15867
|
+
import_node_fs4.default.mkdirSync(rnxHomeDir(), { recursive: true });
|
|
15864
15868
|
import_node_fs4.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
15865
15869
|
import_node_fs4.default.mkdirSync(electronDir(), { recursive: true });
|
|
15866
15870
|
import_node_fs4.default.mkdirSync(profilesDir(), { recursive: true });
|
|
@@ -15983,7 +15987,7 @@ function readLiveRuntimeVersions() {
|
|
|
15983
15987
|
return [...versions].sort();
|
|
15984
15988
|
}
|
|
15985
15989
|
function writeDaemonLockfile(data) {
|
|
15986
|
-
|
|
15990
|
+
ensureRnxHome();
|
|
15987
15991
|
const lockfilePath = daemonLockfilePath();
|
|
15988
15992
|
const existing = readDaemonLockfile();
|
|
15989
15993
|
if (!existing) {
|
|
@@ -16113,7 +16117,7 @@ function releaseDaemonClaim(owner) {
|
|
|
16113
16117
|
}
|
|
16114
16118
|
}
|
|
16115
16119
|
function claimDaemonLockfile(data) {
|
|
16116
|
-
|
|
16120
|
+
ensureRnxHome();
|
|
16117
16121
|
if (!acquireDaemonClaim(data)) return false;
|
|
16118
16122
|
try {
|
|
16119
16123
|
const existing = readDaemonLockfile();
|
|
@@ -16154,7 +16158,7 @@ function removeDevBridgeLockfile(owner) {
|
|
|
16154
16158
|
} catch {
|
|
16155
16159
|
}
|
|
16156
16160
|
}
|
|
16157
|
-
var import_node_crypto, import_node_fs4, import_node_os, import_node_path4,
|
|
16161
|
+
var import_node_crypto, import_node_fs4, import_node_os, import_node_path4, RNX_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE, DEV_BRIDGES_DIR, CONFIG_FILE, DAEMON_HEARTBEAT_STALE_MS, CURRENT_ONBOARDING_VERSION, DAEMON_LOCKFILE_MAX_BYTES, DAEMON_CLAIM_STALE_MS;
|
|
16158
16162
|
var init_home_paths = __esm({
|
|
16159
16163
|
"src/home-paths.ts"() {
|
|
16160
16164
|
"use strict";
|
|
@@ -16162,7 +16166,7 @@ var init_home_paths = __esm({
|
|
|
16162
16166
|
import_node_fs4 = __toESM(require("node:fs"), 1);
|
|
16163
16167
|
import_node_os = require("node:os");
|
|
16164
16168
|
import_node_path4 = __toESM(require("node:path"), 1);
|
|
16165
|
-
|
|
16169
|
+
RNX_HOME_ENV = "RNX_HOME";
|
|
16166
16170
|
ACTIVE_RUNTIME_FILE = "active";
|
|
16167
16171
|
DAEMON_LOCKFILE = "daemon.json";
|
|
16168
16172
|
DEV_BRIDGES_DIR = "dev-bridges";
|
|
@@ -16612,7 +16616,7 @@ function findMonorepoRoot() {
|
|
|
16612
16616
|
return null;
|
|
16613
16617
|
}
|
|
16614
16618
|
function resolveDevCheckoutRuntimeRoot() {
|
|
16615
|
-
if (process.env.
|
|
16619
|
+
if (process.env.RNX_HOME && readActiveRuntime()) return null;
|
|
16616
16620
|
const root = findMonorepoRoot();
|
|
16617
16621
|
if (!root) return null;
|
|
16618
16622
|
const devBuild = import_path.default.join(root, "public/sootsim");
|
|
@@ -16682,7 +16686,7 @@ var init_runtime_assets = __esm({
|
|
|
16682
16686
|
});
|
|
16683
16687
|
|
|
16684
16688
|
// src/runtime-delivery.ts
|
|
16685
|
-
var DEFAULT_RUNTIME_CDN_ORIGIN,
|
|
16689
|
+
var DEFAULT_RUNTIME_CDN_ORIGIN, RNX_CHANGELOG_URL, RNX_CHANGELOG_API_URL, RNX_RUNTIME_PRODUCT, rnxRuntime;
|
|
16686
16690
|
var init_runtime_delivery = __esm({
|
|
16687
16691
|
"src/runtime-delivery.ts"() {
|
|
16688
16692
|
"use strict";
|
|
@@ -16690,10 +16694,10 @@ var init_runtime_delivery = __esm({
|
|
|
16690
16694
|
init_home_paths();
|
|
16691
16695
|
init_public_brand();
|
|
16692
16696
|
DEFAULT_RUNTIME_CDN_ORIGIN = "https://contrast.dev";
|
|
16693
|
-
|
|
16694
|
-
|
|
16695
|
-
|
|
16696
|
-
id: "
|
|
16697
|
+
RNX_CHANGELOG_URL = `${rnxPublicBrand.origin}/changelog`;
|
|
16698
|
+
RNX_CHANGELOG_API_URL = "https://contrast.dev/api/changelog/sootsim";
|
|
16699
|
+
RNX_RUNTIME_PRODUCT = {
|
|
16700
|
+
id: "rnx",
|
|
16697
16701
|
defaultCdnOrigin: DEFAULT_RUNTIME_CDN_ORIGIN,
|
|
16698
16702
|
manifestPath: "/runtimes/manifest.json",
|
|
16699
16703
|
tarballPath: (version) => `/runtimes/sootsim-runtime-${version}.tar.gz`,
|
|
@@ -16702,10 +16706,10 @@ var init_runtime_delivery = __esm({
|
|
|
16702
16706
|
// vite/metro plugins serve, so its absence means the tarball is not one.
|
|
16703
16707
|
installedMarker: "index.html",
|
|
16704
16708
|
env: {
|
|
16705
|
-
cdnOrigin: "
|
|
16706
|
-
channel: "
|
|
16709
|
+
cdnOrigin: "RNX_CDN_ORIGIN",
|
|
16710
|
+
channel: "RNX_RUNTIME_CHANNEL"
|
|
16707
16711
|
},
|
|
16708
|
-
ensureHome:
|
|
16712
|
+
ensureHome: ensureRnxHome,
|
|
16709
16713
|
configFile: configFilePath,
|
|
16710
16714
|
runtimesDir,
|
|
16711
16715
|
runtimeDir,
|
|
@@ -16713,7 +16717,7 @@ var init_runtime_delivery = __esm({
|
|
|
16713
16717
|
readActiveRuntime,
|
|
16714
16718
|
writeActiveRuntime
|
|
16715
16719
|
};
|
|
16716
|
-
|
|
16720
|
+
rnxRuntime = createRuntimeDelivery(RNX_RUNTIME_PRODUCT);
|
|
16717
16721
|
}
|
|
16718
16722
|
});
|
|
16719
16723
|
|
|
@@ -17076,8 +17080,8 @@ function pidIsAlive(pid, sessionId) {
|
|
|
17076
17080
|
return true;
|
|
17077
17081
|
}
|
|
17078
17082
|
function resolveSootsimInvocation() {
|
|
17079
|
-
if (process.env.
|
|
17080
|
-
return { cmd: process.env.
|
|
17083
|
+
if (process.env.RNX_BIN) {
|
|
17084
|
+
return { cmd: process.env.RNX_BIN, prefixArgs: [] };
|
|
17081
17085
|
}
|
|
17082
17086
|
if (process.versions.electron) {
|
|
17083
17087
|
const resourcesPath = process.resourcesPath;
|
|
@@ -17100,7 +17104,7 @@ function resolveSootsimInvocation() {
|
|
|
17100
17104
|
}
|
|
17101
17105
|
if (!argv1 || argv1.includes("/.bin/")) {
|
|
17102
17106
|
throw new Error(
|
|
17103
|
-
"rnx CLI not found. set
|
|
17107
|
+
"rnx CLI not found. set RNX_BIN to the path of the rnx binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`."
|
|
17104
17108
|
);
|
|
17105
17109
|
}
|
|
17106
17110
|
return { cmd: argv0, prefixArgs: [] };
|
|
@@ -17109,7 +17113,7 @@ function tryWorkspaceSootsim() {
|
|
|
17109
17113
|
try {
|
|
17110
17114
|
const sootsimDir = resolveSootsimPackageDir();
|
|
17111
17115
|
if (!sootsimDir) return null;
|
|
17112
|
-
const binaryName = `
|
|
17116
|
+
const binaryName = `rnx-${process.platform === "win32" ? "windows" : process.platform}-${process.arch}${process.platform === "win32" ? ".exe" : ""}`;
|
|
17113
17117
|
const distBinary = import_node_path8.default.join(sootsimDir, "dist-bin", binaryName);
|
|
17114
17118
|
if (import_node_fs8.default.existsSync(distBinary)) return { cmd: distBinary, prefixArgs: [] };
|
|
17115
17119
|
const distBin = import_node_path8.default.join(sootsimDir, "dist-cli", "bin.js");
|
|
@@ -18514,6 +18518,131 @@ var init_open_url = __esm({
|
|
|
18514
18518
|
}
|
|
18515
18519
|
});
|
|
18516
18520
|
|
|
18521
|
+
// ../contrast-harness/src/planeProtocol.ts
|
|
18522
|
+
function encodeBase64(bytes) {
|
|
18523
|
+
let binary = "";
|
|
18524
|
+
const CHUNK = 32768;
|
|
18525
|
+
for (let i = 0; i < bytes.length; i += CHUNK) {
|
|
18526
|
+
binary += String.fromCharCode(...bytes.subarray(i, i + CHUNK));
|
|
18527
|
+
}
|
|
18528
|
+
return btoa(binary);
|
|
18529
|
+
}
|
|
18530
|
+
function decodeBase64(value) {
|
|
18531
|
+
const binary = atob(value);
|
|
18532
|
+
const bytes = new Uint8Array(binary.length);
|
|
18533
|
+
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
18534
|
+
return bytes;
|
|
18535
|
+
}
|
|
18536
|
+
function indexVersion(index) {
|
|
18537
|
+
let a = 2166136261;
|
|
18538
|
+
let b = 16777619;
|
|
18539
|
+
for (const key of [...index.keys()].sort()) {
|
|
18540
|
+
const meta = index.get(key);
|
|
18541
|
+
if (!meta) continue;
|
|
18542
|
+
const line = `${key} ${meta.size} ${meta.readOnly ? 1 : 0}${meta.binary ? 1 : 0} ${meta.hash ?? ""}`;
|
|
18543
|
+
for (let i = 0; i < line.length; i++) {
|
|
18544
|
+
const c = line.charCodeAt(i);
|
|
18545
|
+
a = Math.imul(a ^ c, 16777619);
|
|
18546
|
+
b = Math.imul(b + c, 2246822507) ^ b >>> 13;
|
|
18547
|
+
}
|
|
18548
|
+
}
|
|
18549
|
+
return `${(a >>> 0).toString(36)}${(b >>> 0).toString(36)}-${index.size}`;
|
|
18550
|
+
}
|
|
18551
|
+
function serializeIndex(index) {
|
|
18552
|
+
const out = [];
|
|
18553
|
+
for (const [key, meta] of index) {
|
|
18554
|
+
const flags = (meta.readOnly ? PLANE_FLAG_READ_ONLY : 0) | (meta.binary ? PLANE_FLAG_BINARY : 0);
|
|
18555
|
+
out.push(meta.hash ? [key, meta.size, flags, meta.hash] : [key, meta.size, flags]);
|
|
18556
|
+
}
|
|
18557
|
+
return out;
|
|
18558
|
+
}
|
|
18559
|
+
async function dispatchPlaneCommand(plane, type, msg, mutationOptions) {
|
|
18560
|
+
switch (type) {
|
|
18561
|
+
case "plane:index":
|
|
18562
|
+
case "plane:refresh": {
|
|
18563
|
+
await plane.refresh();
|
|
18564
|
+
const version = indexVersion(plane.index());
|
|
18565
|
+
if (msg.sinceVersion && msg.sinceVersion === version) {
|
|
18566
|
+
return { result: { version, unchanged: true }, version };
|
|
18567
|
+
}
|
|
18568
|
+
return { result: { version, entries: serializeIndex(plane.index()) }, version };
|
|
18569
|
+
}
|
|
18570
|
+
case "plane:read":
|
|
18571
|
+
return { result: { content: await plane.read(String(msg.path)) } };
|
|
18572
|
+
case "plane:read-bytes":
|
|
18573
|
+
return { result: { base64: encodeBase64(await plane.readBytes(String(msg.path))) } };
|
|
18574
|
+
case "plane:write": {
|
|
18575
|
+
mutationOptions?.signal?.throwIfAborted();
|
|
18576
|
+
await plane.write(
|
|
18577
|
+
String(msg.path),
|
|
18578
|
+
decodeBase64(String(msg.base64 ?? "")),
|
|
18579
|
+
mutationOptions
|
|
18580
|
+
);
|
|
18581
|
+
const version = indexVersion(plane.index());
|
|
18582
|
+
return { result: { version }, version };
|
|
18583
|
+
}
|
|
18584
|
+
case "plane:delete": {
|
|
18585
|
+
mutationOptions?.signal?.throwIfAborted();
|
|
18586
|
+
await plane.delete(String(msg.path), mutationOptions);
|
|
18587
|
+
const version = indexVersion(plane.index());
|
|
18588
|
+
return { result: { version }, version };
|
|
18589
|
+
}
|
|
18590
|
+
default:
|
|
18591
|
+
return null;
|
|
18592
|
+
}
|
|
18593
|
+
}
|
|
18594
|
+
var PLANE_FLAG_READ_ONLY, PLANE_FLAG_BINARY;
|
|
18595
|
+
var init_planeProtocol = __esm({
|
|
18596
|
+
"../contrast-harness/src/planeProtocol.ts"() {
|
|
18597
|
+
"use strict";
|
|
18598
|
+
PLANE_FLAG_READ_ONLY = 1;
|
|
18599
|
+
PLANE_FLAG_BINARY = 2;
|
|
18600
|
+
}
|
|
18601
|
+
});
|
|
18602
|
+
|
|
18603
|
+
// ../contrast-harness/src/projectFileCache.ts
|
|
18604
|
+
var init_projectFileCache = __esm({
|
|
18605
|
+
"../contrast-harness/src/projectFileCache.ts"() {
|
|
18606
|
+
"use strict";
|
|
18607
|
+
}
|
|
18608
|
+
});
|
|
18609
|
+
|
|
18610
|
+
// ../contrast-harness/src/planeClient.ts
|
|
18611
|
+
var init_planeClient = __esm({
|
|
18612
|
+
"../contrast-harness/src/planeClient.ts"() {
|
|
18613
|
+
"use strict";
|
|
18614
|
+
init_planeProtocol();
|
|
18615
|
+
init_projectFileCache();
|
|
18616
|
+
}
|
|
18617
|
+
});
|
|
18618
|
+
|
|
18619
|
+
// ../contrast-harness/src/projectFilePlaneRpc.ts
|
|
18620
|
+
var init_projectFilePlaneRpc = __esm({
|
|
18621
|
+
"../contrast-harness/src/projectFilePlaneRpc.ts"() {
|
|
18622
|
+
"use strict";
|
|
18623
|
+
init_planeProtocol();
|
|
18624
|
+
}
|
|
18625
|
+
});
|
|
18626
|
+
|
|
18627
|
+
// ../contrast-harness/src/planeTransport.browser.ts
|
|
18628
|
+
var init_planeTransport_browser = __esm({
|
|
18629
|
+
"../contrast-harness/src/planeTransport.browser.ts"() {
|
|
18630
|
+
"use strict";
|
|
18631
|
+
}
|
|
18632
|
+
});
|
|
18633
|
+
|
|
18634
|
+
// ../contrast-harness/src/plane.ts
|
|
18635
|
+
var init_plane = __esm({
|
|
18636
|
+
"../contrast-harness/src/plane.ts"() {
|
|
18637
|
+
"use strict";
|
|
18638
|
+
init_planeProtocol();
|
|
18639
|
+
init_planeClient();
|
|
18640
|
+
init_projectFilePlaneRpc();
|
|
18641
|
+
init_planeTransport_browser();
|
|
18642
|
+
init_projectFileCache();
|
|
18643
|
+
}
|
|
18644
|
+
});
|
|
18645
|
+
|
|
18517
18646
|
// cli/commands/box/checkout-plane.ts
|
|
18518
18647
|
function looksBinary(filePath, size) {
|
|
18519
18648
|
if (size === 0) return false;
|
|
@@ -18639,13 +18768,13 @@ var init_checkout_plane = __esm({
|
|
|
18639
18768
|
});
|
|
18640
18769
|
|
|
18641
18770
|
// src/host/plane-host.ts
|
|
18642
|
-
var import_node_fs11, import_node_path11,
|
|
18771
|
+
var import_node_fs11, import_node_path11, WS_OPEN2, PlaneNotRegisteredError, PlaneHost;
|
|
18643
18772
|
var init_plane_host = __esm({
|
|
18644
18773
|
"src/host/plane-host.ts"() {
|
|
18645
18774
|
"use strict";
|
|
18646
18775
|
import_node_fs11 = __toESM(require("node:fs"), 1);
|
|
18647
18776
|
import_node_path11 = __toESM(require("node:path"), 1);
|
|
18648
|
-
|
|
18777
|
+
init_plane();
|
|
18649
18778
|
init_checkout_plane();
|
|
18650
18779
|
WS_OPEN2 = 1;
|
|
18651
18780
|
PlaneNotRegisteredError = class extends Error {
|
|
@@ -18737,7 +18866,7 @@ var init_plane_host = __esm({
|
|
|
18737
18866
|
const entry = {
|
|
18738
18867
|
root,
|
|
18739
18868
|
plane,
|
|
18740
|
-
version:
|
|
18869
|
+
version: indexVersion(plane.index()),
|
|
18741
18870
|
sockets: /* @__PURE__ */ new Set([ws])
|
|
18742
18871
|
};
|
|
18743
18872
|
this.open.set(planeId, entry);
|
|
@@ -18751,7 +18880,7 @@ var init_plane_host = __esm({
|
|
|
18751
18880
|
}
|
|
18752
18881
|
default: {
|
|
18753
18882
|
const entry = this.entry(msg);
|
|
18754
|
-
const handled = await
|
|
18883
|
+
const handled = await dispatchPlaneCommand(entry.plane, type, msg);
|
|
18755
18884
|
if (!handled) throw new Error(`unknown plane command: ${type}`);
|
|
18756
18885
|
if (handled.version) entry.version = handled.version;
|
|
18757
18886
|
return handled.result;
|
|
@@ -19546,7 +19675,7 @@ var init_bridge_host = __esm({
|
|
|
19546
19675
|
return;
|
|
19547
19676
|
}
|
|
19548
19677
|
if (msg.type === "runtime:list") {
|
|
19549
|
-
const versions =
|
|
19678
|
+
const versions = rnxRuntime.listInstalled();
|
|
19550
19679
|
const active = this.getActiveRuntime();
|
|
19551
19680
|
const reply = {
|
|
19552
19681
|
type: "runtime:list:ok",
|
|
@@ -19563,7 +19692,7 @@ var init_bridge_host = __esm({
|
|
|
19563
19692
|
}
|
|
19564
19693
|
if (msg.type === "runtime:use") {
|
|
19565
19694
|
const version = typeof msg.version === "string" ? msg.version : "";
|
|
19566
|
-
const installed2 =
|
|
19695
|
+
const installed2 = rnxRuntime.listInstalled();
|
|
19567
19696
|
if (!installed2.includes(version)) {
|
|
19568
19697
|
try {
|
|
19569
19698
|
ws.send(
|
|
@@ -19926,7 +20055,7 @@ var init_bridge_host = __esm({
|
|
|
19926
20055
|
this.wsHeartbeatTimer.unref();
|
|
19927
20056
|
if (this.shouldWriteLockfile) {
|
|
19928
20057
|
try {
|
|
19929
|
-
|
|
20058
|
+
ensureRnxHome();
|
|
19930
20059
|
const claimed = claimDaemonLockfile(this.buildLockfileSnapshot());
|
|
19931
20060
|
if (!claimed) {
|
|
19932
20061
|
throw new Error(
|
|
@@ -20056,7 +20185,7 @@ var init_bridge_host = __esm({
|
|
|
20056
20185
|
return this.inflightScan;
|
|
20057
20186
|
}
|
|
20058
20187
|
// serves one staged camera fixture. addressed by basename inside
|
|
20059
|
-
// ~/.
|
|
20188
|
+
// ~/.rnx/camera-fixtures, never by a caller-supplied path, so there is
|
|
20060
20189
|
// no traversal surface to defend: a name that is not a plain basename is
|
|
20061
20190
|
// rejected outright. range support is not optional here — chrome asks for
|
|
20062
20191
|
// byte ranges on media and cannot seek or loop a fixture without it.
|
|
@@ -20166,8 +20295,8 @@ var init_bridge_host = __esm({
|
|
|
20166
20295
|
}
|
|
20167
20296
|
startRuntimeUpdater() {
|
|
20168
20297
|
if (!this.shouldWriteLockfile || this.runtimeUpdateTimer) return;
|
|
20169
|
-
if (import_fs2.default.existsSync(import_path2.default.join(
|
|
20170
|
-
if (process.env.
|
|
20298
|
+
if (import_fs2.default.existsSync(import_path2.default.join(rnxHomeDir(), "runtime-update-disabled"))) return;
|
|
20299
|
+
if (process.env.RNX_HOME && isSootsimDevCheckout() && !readActiveRuntime()) {
|
|
20171
20300
|
return;
|
|
20172
20301
|
}
|
|
20173
20302
|
void this.runRuntimeUpdate("startup");
|
|
@@ -20184,7 +20313,7 @@ var init_bridge_host = __esm({
|
|
|
20184
20313
|
if (reason === "startup") {
|
|
20185
20314
|
process.stderr.write("rnx: checking for runtime updates\u2026\n");
|
|
20186
20315
|
}
|
|
20187
|
-
const result = await
|
|
20316
|
+
const result = await rnxRuntime.updateToLatest({
|
|
20188
20317
|
protectVersions: this.connectedRuntimeVersions()
|
|
20189
20318
|
});
|
|
20190
20319
|
if (!result.updated || !result.latestVersion) {
|
|
@@ -21448,7 +21577,7 @@ function getCurrentSimPath() {
|
|
|
21448
21577
|
return (0, import_path3.resolve)(process.env[CURRENT_SIM_PATH_ENV]);
|
|
21449
21578
|
}
|
|
21450
21579
|
const key = getCliIdentityKey();
|
|
21451
|
-
return (0, import_path3.join)((0, import_os.tmpdir)(), `
|
|
21580
|
+
return (0, import_path3.join)((0, import_os.tmpdir)(), `rnx-current-sim-${key}.json`);
|
|
21452
21581
|
}
|
|
21453
21582
|
function readCurrentSim() {
|
|
21454
21583
|
const filepath = getCurrentSimPath();
|
|
@@ -21504,7 +21633,7 @@ var init_current_sim = __esm({
|
|
|
21504
21633
|
CURRENT_SIM_VERSION = 1;
|
|
21505
21634
|
CURRENT_SIM_PATH_ENV = "SOOTSIM_CLI_CURRENT_SIM_PATH";
|
|
21506
21635
|
IDENTITY_ENV_VARS = [
|
|
21507
|
-
"
|
|
21636
|
+
"RNX_CLI_IDENTITY",
|
|
21508
21637
|
// explicit override — fastest path, skips all pid lookups
|
|
21509
21638
|
"TM_SESSION",
|
|
21510
21639
|
// Team Machine session id; routes prompt-bar followups back to this agent
|
|
@@ -21609,7 +21738,7 @@ function resolveDefaultDevBridgeLockfile() {
|
|
|
21609
21738
|
return lockfiles.find((lockfile) => lockfile.bridgePort === DEFAULT_SOOTSIM_BRIDGE_PORT) ?? lockfiles[0];
|
|
21610
21739
|
}
|
|
21611
21740
|
function resolveBridgeWorld() {
|
|
21612
|
-
const homeDir =
|
|
21741
|
+
const homeDir = rnxHomeDir();
|
|
21613
21742
|
if (resolvedWorld?.homeDir === homeDir) return resolvedWorld.world;
|
|
21614
21743
|
const world = resolveBridgeWorldFresh();
|
|
21615
21744
|
resolvedWorld = { homeDir, world };
|
|
@@ -22324,7 +22453,7 @@ function withDefault(index) {
|
|
|
22324
22453
|
};
|
|
22325
22454
|
}
|
|
22326
22455
|
function writeIndex(index) {
|
|
22327
|
-
|
|
22456
|
+
ensureRnxHome();
|
|
22328
22457
|
const next = withDefault(index);
|
|
22329
22458
|
const tmp = `${profileIndexPath()}.tmp`;
|
|
22330
22459
|
import_fs5.default.writeFileSync(tmp, `${JSON.stringify(next, null, 2)}
|
|
@@ -22383,8 +22512,8 @@ function firstNamedFile(dir, names) {
|
|
|
22383
22512
|
function findExpoAppConfig(dir) {
|
|
22384
22513
|
return firstNamedFile(dir, EXPO_APP_CONFIG_NAMES);
|
|
22385
22514
|
}
|
|
22386
|
-
function
|
|
22387
|
-
return firstNamedFile(dir,
|
|
22515
|
+
function findRNXAppConfig(dir) {
|
|
22516
|
+
return firstNamedFile(dir, RNX_APP_CONFIG_NAMES);
|
|
22388
22517
|
}
|
|
22389
22518
|
function resolveAppProject(projectRoot) {
|
|
22390
22519
|
const appDir = import_node_path14.default.resolve(projectRoot);
|
|
@@ -22393,13 +22522,13 @@ function resolveAppProject(projectRoot) {
|
|
|
22393
22522
|
} catch {
|
|
22394
22523
|
return null;
|
|
22395
22524
|
}
|
|
22396
|
-
const configPath =
|
|
22525
|
+
const configPath = findRNXAppConfig(appDir);
|
|
22397
22526
|
if (!configPath && !findExpoAppConfig(appDir) && !import_node_fs13.default.existsSync(import_node_path14.default.join(appDir, "package.json"))) {
|
|
22398
22527
|
return null;
|
|
22399
22528
|
}
|
|
22400
22529
|
return { appDir, configPath };
|
|
22401
22530
|
}
|
|
22402
|
-
var import_node_fs13, import_node_path14, EXPO_APP_CONFIG_NAMES,
|
|
22531
|
+
var import_node_fs13, import_node_path14, EXPO_APP_CONFIG_NAMES, RNX_APP_CONFIG_NAMES;
|
|
22403
22532
|
var init_app_project = __esm({
|
|
22404
22533
|
"cli/app-project.ts"() {
|
|
22405
22534
|
"use strict";
|
|
@@ -22412,11 +22541,11 @@ var init_app_project = __esm({
|
|
|
22412
22541
|
"app.config.mjs",
|
|
22413
22542
|
"app.json"
|
|
22414
22543
|
];
|
|
22415
|
-
|
|
22416
|
-
"
|
|
22417
|
-
"
|
|
22418
|
-
"
|
|
22419
|
-
"
|
|
22544
|
+
RNX_APP_CONFIG_NAMES = [
|
|
22545
|
+
"rnx.config.ts",
|
|
22546
|
+
"rnx.config.js",
|
|
22547
|
+
"rnx.config.mjs",
|
|
22548
|
+
"rnx.config.cjs"
|
|
22420
22549
|
];
|
|
22421
22550
|
}
|
|
22422
22551
|
});
|
|
@@ -22425,7 +22554,7 @@ var init_app_project = __esm({
|
|
|
22425
22554
|
function isOptionalRecord(value) {
|
|
22426
22555
|
return value === void 0 || value !== null && typeof value === "object" && !Array.isArray(value);
|
|
22427
22556
|
}
|
|
22428
|
-
function
|
|
22557
|
+
function isRNXConfig(value) {
|
|
22429
22558
|
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
22430
22559
|
const runtimeVersion = Reflect.get(value, "runtimeVersion");
|
|
22431
22560
|
const network = Reflect.get(value, "network");
|
|
@@ -22444,7 +22573,7 @@ function resolveConfigReplacementFiles(config, configPath) {
|
|
|
22444
22573
|
)
|
|
22445
22574
|
};
|
|
22446
22575
|
}
|
|
22447
|
-
async function
|
|
22576
|
+
async function loadRNXAppConfig(project) {
|
|
22448
22577
|
if (!project?.configPath) return void 0;
|
|
22449
22578
|
try {
|
|
22450
22579
|
const jiti = (0, import_jiti.createJiti)(__sootsim_import_meta_url, {
|
|
@@ -22456,7 +22585,7 @@ async function loadSootSimAppConfig(project) {
|
|
|
22456
22585
|
}
|
|
22457
22586
|
});
|
|
22458
22587
|
const loaded = await jiti.import(project.configPath, { default: true });
|
|
22459
|
-
if (!
|
|
22588
|
+
if (!isRNXConfig(loaded)) {
|
|
22460
22589
|
throw new Error("the default export must be an rnx config object");
|
|
22461
22590
|
}
|
|
22462
22591
|
return resolveConfigReplacementFiles(loaded, project.configPath);
|
|
@@ -22465,9 +22594,9 @@ async function loadSootSimAppConfig(project) {
|
|
|
22465
22594
|
throw new Error(`could not load ${project.configPath}: ${message}`);
|
|
22466
22595
|
}
|
|
22467
22596
|
}
|
|
22468
|
-
async function
|
|
22597
|
+
async function resolveRNXAppConfig(startDir = process.cwd()) {
|
|
22469
22598
|
const project = resolveAppProject(startDir);
|
|
22470
|
-
return { project, config: await
|
|
22599
|
+
return { project, config: await loadRNXAppConfig(project) };
|
|
22471
22600
|
}
|
|
22472
22601
|
var import_node_module, import_node_path15, import_jiti, require2;
|
|
22473
22602
|
var init_app_config = __esm({
|
|
@@ -23942,7 +24071,7 @@ function resolveUserDataDir(opts) {
|
|
|
23942
24071
|
return playwrightProfileUserDataDir(ensureProfile(opts.profileId).id);
|
|
23943
24072
|
}
|
|
23944
24073
|
if (opts.ephemeralProfile) {
|
|
23945
|
-
return (0, import_fs7.mkdtempSync)((0, import_path6.join)((0, import_os2.tmpdir)(), "
|
|
24074
|
+
return (0, import_fs7.mkdtempSync)((0, import_path6.join)((0, import_os2.tmpdir)(), "rnx-playwright-profile-"));
|
|
23946
24075
|
}
|
|
23947
24076
|
return "";
|
|
23948
24077
|
}
|
|
@@ -23974,7 +24103,7 @@ async function launch2(opts) {
|
|
|
23974
24103
|
}
|
|
23975
24104
|
const errLog = (0, import_path6.join)(
|
|
23976
24105
|
(0, import_os2.tmpdir)(),
|
|
23977
|
-
`
|
|
24106
|
+
`rnx-playwright-host-${Date.now().toString(36)}-${process.pid}.log`
|
|
23978
24107
|
);
|
|
23979
24108
|
const connectAckFile = `${errLog}.connected`;
|
|
23980
24109
|
const errFd = (0, import_fs7.openSync)(errLog, "a");
|
|
@@ -24066,7 +24195,7 @@ const callerUserDataDir = process.env.SOOTSIM_PW_USERDATADIR || '';
|
|
|
24066
24195
|
const ownerPid = Number(process.env.SOOTSIM_PW_OWNER_PID || 0);
|
|
24067
24196
|
const ownerPollMs = Number(process.env.SOOTSIM_PW_OWNER_POLL_MS || 5000);
|
|
24068
24197
|
// optional CDP port \u2014 exposes Chrome's remote-debugging endpoint so a
|
|
24069
|
-
// bridge-driven sim can also be cpu-profiled (
|
|
24198
|
+
// bridge-driven sim can also be cpu-profiled (rnx perf cpu --cdp-port).
|
|
24070
24199
|
// playwright keeps its own pipe connection; the port is an additional endpoint.
|
|
24071
24200
|
const cdpPort = process.env.SOOTSIM_PW_CDP_PORT || '';
|
|
24072
24201
|
// extra chromium launch args, space-separated. a linux GPU runner injects
|
|
@@ -24110,7 +24239,7 @@ const { join } = require('path');
|
|
|
24110
24239
|
//
|
|
24111
24240
|
// the prior approach was \`pgrep -f ms-playwright/[c]hromium\`. it never matched
|
|
24112
24241
|
// system Chrome, so the reaper was a no-op in the common case and every
|
|
24113
|
-
// aborted/closed \`
|
|
24242
|
+
// aborted/closed \`rnx open\` leaked a renderer + gpu helper burning 100%+
|
|
24114
24243
|
// CPU until manually killed (multiple incidents 2026-06).
|
|
24115
24244
|
//
|
|
24116
24245
|
// fix: identify our chrome tree by its UNIQUE user-data-dir. every helper a
|
|
@@ -24123,13 +24252,13 @@ const reapEnabled = process.platform !== 'win32';
|
|
|
24123
24252
|
let profileDir = callerUserDataDir;
|
|
24124
24253
|
let ephemeralProfile = false;
|
|
24125
24254
|
if (!profileDir) {
|
|
24126
|
-
profileDir = mkdtempSync(join(tmpdir(), '
|
|
24255
|
+
profileDir = mkdtempSync(join(tmpdir(), 'rnx-playwright-host-'));
|
|
24127
24256
|
ephemeralProfile = true;
|
|
24128
24257
|
}
|
|
24129
24258
|
// browser HTTP caches are acceleration data, not profile identity. give each
|
|
24130
24259
|
// host a bounded temporary cache so persistent named profiles retain cookies
|
|
24131
24260
|
// and storage without multiplying a private cache for every profile.
|
|
24132
|
-
const diskCacheDir = mkdtempSync(join(tmpdir(), '
|
|
24261
|
+
const diskCacheDir = mkdtempSync(join(tmpdir(), 'rnx-playwright-cache-'));
|
|
24133
24262
|
const chromePidsByProfile = () => {
|
|
24134
24263
|
if (!reapEnabled) return [];
|
|
24135
24264
|
try {
|
|
@@ -24300,7 +24429,7 @@ const cleanupProfile = () => {
|
|
|
24300
24429
|
// through shutdown(); the exit hook (sync sweep) still reaps the tree.
|
|
24301
24430
|
process.on('exit', () => { reapChrome(); cleanupProfile(); });
|
|
24302
24431
|
// owner-liveness watchdog \u2014 the load-bearing fix for leaked Chrome hosts.
|
|
24303
|
-
// we are spawned detached + unref'd so \`
|
|
24432
|
+
// we are spawned detached + unref'd so \`rnx open\` returns immediately,
|
|
24304
24433
|
// which means nothing in the OS process tree ties Chrome's lifetime to the
|
|
24305
24434
|
// session that asked for it. once the sim connects, the connect-timeout
|
|
24306
24435
|
// safety net is cleared, so absent an explicit \`sootsim close\` (or the
|
|
@@ -24329,7 +24458,7 @@ const cleanupProfile = () => {
|
|
|
24329
24458
|
// com.google.chrome.for.testing identity cannot intercept open/quit events for
|
|
24330
24459
|
// the user's com.google.Chrome browser. CI may use chromium_headless_shell;
|
|
24331
24460
|
// local rendering fails closed because that shell has no GPU and silently
|
|
24332
|
-
// chooses SwiftShader. NOTE: this is NOT enough to make \`
|
|
24461
|
+
// chooses SwiftShader. NOTE: this is NOT enough to make \`rnx perf cpu\`
|
|
24333
24462
|
// work \u2014 that profiles the tenant *worker*, and the JS Self-Profiler API
|
|
24334
24463
|
// cannot be constructed in a dedicated worker (see
|
|
24335
24464
|
// worker-handlers/cpu-profile.ts). cpu-profile needs a CDP-based profiler
|
|
@@ -24595,7 +24724,7 @@ var init_run_rnx = __esm({
|
|
|
24595
24724
|
|
|
24596
24725
|
// cli/commands/inspect/env.ts
|
|
24597
24726
|
function isAgentEnv() {
|
|
24598
|
-
if (process.env.
|
|
24727
|
+
if (process.env.RNX_AGENT === "0") return false;
|
|
24599
24728
|
for (const name2 of AGENT_ENV_VARS) {
|
|
24600
24729
|
const v = process.env[name2];
|
|
24601
24730
|
if (v && v.trim() && v !== "0") return true;
|
|
@@ -24607,7 +24736,7 @@ var init_env = __esm({
|
|
|
24607
24736
|
"cli/commands/inspect/env.ts"() {
|
|
24608
24737
|
"use strict";
|
|
24609
24738
|
AGENT_ENV_VARS = [
|
|
24610
|
-
"
|
|
24739
|
+
"RNX_AGENT",
|
|
24611
24740
|
"TM_SESSION",
|
|
24612
24741
|
"CLAUDECODE",
|
|
24613
24742
|
"CLAUDE_CODE_ENTRYPOINT",
|
|
@@ -24631,7 +24760,7 @@ function isChangelogEntry(value) {
|
|
|
24631
24760
|
}
|
|
24632
24761
|
async function fetchRuntimeReleaseNotes(version, fetchImpl = fetch) {
|
|
24633
24762
|
try {
|
|
24634
|
-
const url = new URL(
|
|
24763
|
+
const url = new URL(RNX_CHANGELOG_API_URL);
|
|
24635
24764
|
url.searchParams.set("version", version);
|
|
24636
24765
|
const response = await fetchImpl(url, {
|
|
24637
24766
|
headers: { accept: "application/json" },
|
|
@@ -24659,7 +24788,7 @@ function formatRuntimeReleaseNotes(version, entry) {
|
|
|
24659
24788
|
}
|
|
24660
24789
|
}
|
|
24661
24790
|
}
|
|
24662
|
-
lines.push(` full changelog: ${
|
|
24791
|
+
lines.push(` full changelog: ${RNX_CHANGELOG_URL}`);
|
|
24663
24792
|
return lines.join("\n");
|
|
24664
24793
|
}
|
|
24665
24794
|
var init_runtime_notes = __esm({
|
|
@@ -24701,7 +24830,7 @@ async function runRuntime(args, opts = {}) {
|
|
|
24701
24830
|
}
|
|
24702
24831
|
function printHelp() {
|
|
24703
24832
|
console.log(`
|
|
24704
|
-
rnx runtime \u2014 manage engine runtimes under ~/.
|
|
24833
|
+
rnx runtime \u2014 manage engine runtimes under ~/.rnx/runtimes/
|
|
24705
24834
|
|
|
24706
24835
|
usage:
|
|
24707
24836
|
rnx runtime install [version] install a version (default: channel latest)
|
|
@@ -24717,7 +24846,7 @@ flags:
|
|
|
24717
24846
|
--set-active=false do not switch active runtime after install
|
|
24718
24847
|
|
|
24719
24848
|
environment:
|
|
24720
|
-
|
|
24849
|
+
RNX_CDN_ORIGIN override the CDN base URL (default: ${DEFAULT_RUNTIME_CDN_ORIGIN})
|
|
24721
24850
|
|
|
24722
24851
|
examples:
|
|
24723
24852
|
rnx runtime install
|
|
@@ -24732,11 +24861,11 @@ async function runtimeInstall(args, opts) {
|
|
|
24732
24861
|
const channel = flags.channel ?? opts.channel ?? "stable";
|
|
24733
24862
|
const force = flags.force === true;
|
|
24734
24863
|
const setActive = flags.setActive !== false;
|
|
24735
|
-
|
|
24864
|
+
ensureRnxHome();
|
|
24736
24865
|
console.log(`rnx runtime install`);
|
|
24737
|
-
console.log(` cdn: ${
|
|
24866
|
+
console.log(` cdn: ${rnxRuntime.resolveCdnOrigin()}`);
|
|
24738
24867
|
try {
|
|
24739
|
-
const result = await
|
|
24868
|
+
const result = await rnxRuntime.install({
|
|
24740
24869
|
version: versionArg,
|
|
24741
24870
|
channel,
|
|
24742
24871
|
force,
|
|
@@ -24813,8 +24942,8 @@ async function tellDaemonRuntimeChanged(version) {
|
|
|
24813
24942
|
});
|
|
24814
24943
|
}
|
|
24815
24944
|
async function runtimeList(_args) {
|
|
24816
|
-
|
|
24817
|
-
const installed2 =
|
|
24945
|
+
ensureRnxHome();
|
|
24946
|
+
const installed2 = rnxRuntime.listInstalled();
|
|
24818
24947
|
const active = readActiveRuntime();
|
|
24819
24948
|
console.log(`installed:`);
|
|
24820
24949
|
if (installed2.length === 0) {
|
|
@@ -24826,7 +24955,7 @@ async function runtimeList(_args) {
|
|
|
24826
24955
|
}
|
|
24827
24956
|
}
|
|
24828
24957
|
try {
|
|
24829
|
-
const manifest = await
|
|
24958
|
+
const manifest = await rnxRuntime.fetchManifest();
|
|
24830
24959
|
console.log(`available (latest per channel):`);
|
|
24831
24960
|
for (const [name2, ch] of Object.entries(manifest.channels)) {
|
|
24832
24961
|
console.log(` ${name2.padEnd(8)} ${ch.latest}`);
|
|
@@ -24846,7 +24975,7 @@ async function runtimeUse(args) {
|
|
|
24846
24975
|
console.error(` usage: rnx runtime use <version>`);
|
|
24847
24976
|
rnxExit(1);
|
|
24848
24977
|
}
|
|
24849
|
-
const installed2 =
|
|
24978
|
+
const installed2 = rnxRuntime.listInstalled();
|
|
24850
24979
|
if (!installed2.includes(version)) {
|
|
24851
24980
|
console.error(` version ${version} is not installed`);
|
|
24852
24981
|
console.error(` installed: ${installed2.join(", ") || "(none)"}`);
|
|
@@ -24894,11 +25023,11 @@ async function runtimeNotes(args) {
|
|
|
24894
25023
|
console.error(` usage: rnx runtime notes`);
|
|
24895
25024
|
rnxExit(1);
|
|
24896
25025
|
}
|
|
24897
|
-
const { config } = await
|
|
25026
|
+
const { config } = await resolveRNXAppConfig();
|
|
24898
25027
|
const version = config?.runtimeVersion ?? readActiveRuntime();
|
|
24899
25028
|
if (!version) {
|
|
24900
25029
|
console.log(` no active runtime`);
|
|
24901
|
-
console.log(` release notes: ${
|
|
25030
|
+
console.log(` release notes: ${RNX_CHANGELOG_URL}`);
|
|
24902
25031
|
return;
|
|
24903
25032
|
}
|
|
24904
25033
|
console.log(formatRuntimeReleaseNotes(version, await fetchRuntimeReleaseNotes(version)));
|
|
@@ -25064,7 +25193,7 @@ function assertExplicitBridgeLock(preferredPort, explicitPort, lock) {
|
|
|
25064
25193
|
return;
|
|
25065
25194
|
}
|
|
25066
25195
|
throw new Error(
|
|
25067
|
-
`${rnxPublicBrand.commandName} open: requested bridge port ${preferredPort}, but the active daemon owns port ${lock.bridgePort}. explicit --port never selects another bridge; stop that daemon or use an isolated
|
|
25196
|
+
`${rnxPublicBrand.commandName} open: requested bridge port ${preferredPort}, but the active daemon owns port ${lock.bridgePort}. explicit --port never selects another bridge; stop that daemon or use an isolated RNX_HOME.`
|
|
25068
25197
|
);
|
|
25069
25198
|
}
|
|
25070
25199
|
async function ensureRuntimeForOpen() {
|
|
@@ -25278,7 +25407,7 @@ async function resolveOpenAppProject(resolvedBundle) {
|
|
|
25278
25407
|
async function ensureConfiguredRuntime(version) {
|
|
25279
25408
|
if (import_node_fs16.default.existsSync(import_node_path18.default.join(runtimeDir(version), "index.html"))) return;
|
|
25280
25409
|
console.error(` installing configured engine runtime ${version}...`);
|
|
25281
|
-
const result = await
|
|
25410
|
+
const result = await rnxRuntime.install({
|
|
25282
25411
|
version,
|
|
25283
25412
|
setActive: false,
|
|
25284
25413
|
protectVersions: readLiveRuntimeVersions()
|
|
@@ -25746,16 +25875,16 @@ function printOpenedSim(openUrl2, sim, mode, quiet = false) {
|
|
|
25746
25875
|
try {
|
|
25747
25876
|
const parsed = new URL(value);
|
|
25748
25877
|
let changed = false;
|
|
25749
|
-
if (parsed.searchParams.has(
|
|
25750
|
-
parsed.searchParams.set(
|
|
25878
|
+
if (parsed.searchParams.has(RNX_CONFIG_QUERY_PARAM)) {
|
|
25879
|
+
parsed.searchParams.set(RNX_CONFIG_QUERY_PARAM, "[redacted]");
|
|
25751
25880
|
changed = true;
|
|
25752
25881
|
}
|
|
25753
25882
|
const bundle = parsed.searchParams.get("bundle");
|
|
25754
25883
|
if (bundle) {
|
|
25755
25884
|
try {
|
|
25756
25885
|
const parsedBundle = new URL(bundle);
|
|
25757
|
-
if (parsedBundle.searchParams.has(
|
|
25758
|
-
parsedBundle.searchParams.set(
|
|
25886
|
+
if (parsedBundle.searchParams.has(RNX_CONFIG_QUERY_PARAM)) {
|
|
25887
|
+
parsedBundle.searchParams.set(RNX_CONFIG_QUERY_PARAM, "[redacted]");
|
|
25759
25888
|
parsed.searchParams.set("bundle", parsedBundle.toString());
|
|
25760
25889
|
changed = true;
|
|
25761
25890
|
}
|
|
@@ -25971,10 +26100,10 @@ async function runOpenCommand(args, opts = {}) {
|
|
|
25971
26100
|
}
|
|
25972
26101
|
const resolvedBundle = shouldResolveBundleTargetInCli(target) ? await resolveConnectionInputForCli(target) : void 0;
|
|
25973
26102
|
const project = await resolveOpenAppProject(resolvedBundle);
|
|
25974
|
-
const appConfig = await
|
|
26103
|
+
const appConfig = await loadRNXAppConfig(project);
|
|
25975
26104
|
const configuredRuntimeVersion = appConfig?.runtimeVersion;
|
|
25976
|
-
const runtimeConfig =
|
|
25977
|
-
|
|
26105
|
+
const runtimeConfig = mergeRNXConfig(
|
|
26106
|
+
mergeRNXConfig(
|
|
25978
26107
|
appConfig ? { ...appConfig, runtimeVersion: void 0 } : void 0,
|
|
25979
26108
|
opts.runtimeConfig
|
|
25980
26109
|
),
|
|
@@ -26063,7 +26192,7 @@ async function runOpenCommand(args, opts = {}) {
|
|
|
26063
26192
|
if (!targetSim && parsed.simIdSource !== "flag") {
|
|
26064
26193
|
targetShellUrl = await buildShellUrl(
|
|
26065
26194
|
target,
|
|
26066
|
-
|
|
26195
|
+
applyRNXConfigToUrl(baseUrl, runtimeConfig),
|
|
26067
26196
|
buildShellUrlOpts
|
|
26068
26197
|
);
|
|
26069
26198
|
const normalizedTarget = new URL(targetShellUrl);
|
|
@@ -26092,7 +26221,7 @@ async function runOpenCommand(args, opts = {}) {
|
|
|
26092
26221
|
const resolvedBaseUrl = hasExplicitBaseUrl || looksLikeSootsimUrl(target) ? baseUrl : deriveCurrentSimBaseUrl(targetSim, baseUrl);
|
|
26093
26222
|
const shellUrl = targetShellUrl ?? await buildShellUrl(
|
|
26094
26223
|
target,
|
|
26095
|
-
|
|
26224
|
+
applyRNXConfigToUrl(resolvedBaseUrl, runtimeConfig),
|
|
26096
26225
|
buildShellUrlOpts
|
|
26097
26226
|
);
|
|
26098
26227
|
bridge.send({
|
|
@@ -26129,7 +26258,7 @@ async function runOpenCommand(args, opts = {}) {
|
|
|
26129
26258
|
const resolvedBaseUrl = hasExplicitBaseUrl || looksLikeSootsimUrl(target) ? baseUrl : deriveCurrentSimBaseUrl(targetSim, baseUrl);
|
|
26130
26259
|
const shellUrl = targetShellUrl ?? await buildShellUrl(
|
|
26131
26260
|
target,
|
|
26132
|
-
|
|
26261
|
+
applyRNXConfigToUrl(resolvedBaseUrl, runtimeConfig),
|
|
26133
26262
|
buildShellUrlOpts
|
|
26134
26263
|
);
|
|
26135
26264
|
printOpenedSim(shellUrl, { ...targetSim, url: shellUrl }, "current sim", quiet);
|
|
@@ -26140,7 +26269,7 @@ async function runOpenCommand(args, opts = {}) {
|
|
|
26140
26269
|
bridge.close();
|
|
26141
26270
|
}
|
|
26142
26271
|
}
|
|
26143
|
-
const configuredBaseUrl =
|
|
26272
|
+
const configuredBaseUrl = applyRNXConfigToUrl(baseUrl, runtimeConfig);
|
|
26144
26273
|
const token = `cli-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
26145
26274
|
const openUrl2 = await buildOpenUrl(target, configuredBaseUrl, token, buildShellUrlOpts);
|
|
26146
26275
|
const ownerPid = getStableOwnerPid();
|
|
@@ -26236,7 +26365,7 @@ async function runUseLikeCommand(args, opts = {}) {
|
|
|
26236
26365
|
` refused: ${target.id} is leased by ${target.lockedBy} (${secs}s)`
|
|
26237
26366
|
);
|
|
26238
26367
|
console.error(
|
|
26239
|
-
` \`
|
|
26368
|
+
` \`rnx use ${target.id} --force\` to take it, or \`rnx open --new\` for a fresh sim`
|
|
26240
26369
|
);
|
|
26241
26370
|
rnxExit(1);
|
|
26242
26371
|
}
|
|
@@ -27453,14 +27582,12 @@ function resolveGitHubActionsAuth() {
|
|
|
27453
27582
|
};
|
|
27454
27583
|
}
|
|
27455
27584
|
function isCliApiKeySecret(secret) {
|
|
27456
|
-
return secret.startsWith("sk_rnx_")
|
|
27585
|
+
return secret.startsWith("sk_rnx_");
|
|
27457
27586
|
}
|
|
27458
27587
|
function readApiKeyFromEnv() {
|
|
27459
|
-
|
|
27460
|
-
|
|
27461
|
-
|
|
27462
|
-
}
|
|
27463
|
-
return null;
|
|
27588
|
+
const envName = "RNX_API_KEY";
|
|
27589
|
+
const secret = process.env[envName]?.trim();
|
|
27590
|
+
return secret && isCliApiKeySecret(secret) ? { secret, envName } : null;
|
|
27464
27591
|
}
|
|
27465
27592
|
function resolveCliAuth() {
|
|
27466
27593
|
const envKey = readApiKeyFromEnv();
|
|
@@ -27504,7 +27631,7 @@ var init_run_registry = __esm({
|
|
|
27504
27631
|
// cli/commands/upload.ts
|
|
27505
27632
|
async function resolveDefaultUploadOrigin(explicitOrigin) {
|
|
27506
27633
|
if (explicitOrigin) return explicitOrigin;
|
|
27507
|
-
if (process.env.
|
|
27634
|
+
if (process.env.RNX_UPLOAD_ORIGIN) return process.env.RNX_UPLOAD_ORIGIN;
|
|
27508
27635
|
return REMOTE_DEFAULT_ORIGIN;
|
|
27509
27636
|
}
|
|
27510
27637
|
var import_compress, import_compress_node, import_presigned_upload, import_trace, REMOTE_DEFAULT_ORIGIN, REMOTE_DEFAULT_PUBLIC_PREVIEW_ORIGIN;
|
|
@@ -27523,8 +27650,8 @@ var init_upload = __esm({
|
|
|
27523
27650
|
init_run_registry();
|
|
27524
27651
|
init_run_rnx();
|
|
27525
27652
|
init_ws_bridge();
|
|
27526
|
-
REMOTE_DEFAULT_ORIGIN = process.env.
|
|
27527
|
-
REMOTE_DEFAULT_PUBLIC_PREVIEW_ORIGIN = process.env.
|
|
27653
|
+
REMOTE_DEFAULT_ORIGIN = process.env.RNX_UPLOAD_ORIGIN || "https://contrast.dev";
|
|
27654
|
+
REMOTE_DEFAULT_PUBLIC_PREVIEW_ORIGIN = process.env.RNX_PREVIEW_ORIGIN || rnxPublicBrand.origin;
|
|
27528
27655
|
}
|
|
27529
27656
|
});
|
|
27530
27657
|
|
|
@@ -27942,7 +28069,7 @@ var init_bridge_flow_runner = __esm({
|
|
|
27942
28069
|
const extension = videoMime.includes("mp4") ? "mp4" : "webm";
|
|
27943
28070
|
const outputPath = path18.join(
|
|
27944
28071
|
this.opts.recordingOutputDir,
|
|
27945
|
-
`
|
|
28072
|
+
`rnx-${Date.now()}.${extension}`
|
|
27946
28073
|
);
|
|
27947
28074
|
fs18.writeFileSync(outputPath, Buffer.concat(chunks));
|
|
27948
28075
|
return outputPath;
|
|
@@ -29988,9 +30115,9 @@ var skillRegistry = {
|
|
|
29988
30115
|
this.register(skill7);
|
|
29989
30116
|
}
|
|
29990
30117
|
},
|
|
29991
|
-
// load skills from a project manifest (
|
|
30118
|
+
// load skills from a project manifest (rnx-skills.json)
|
|
29992
30119
|
async loadFromManifest(projectDir) {
|
|
29993
|
-
const manifestPath = path19.join(projectDir, "
|
|
30120
|
+
const manifestPath = path19.join(projectDir, "rnx-skills.json");
|
|
29994
30121
|
if (!fs19.existsSync(manifestPath)) return;
|
|
29995
30122
|
try {
|
|
29996
30123
|
const manifest = JSON.parse(fs19.readFileSync(manifestPath, "utf8"));
|