sootsim 0.1.38 → 0.1.40
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/dist-cli/bin.js +16 -15
- package/dist-cli/chunks/{agent-CGQWOOOL.js → agent-3F5PO4NL.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-M6P53GJ2.js → agent-wrapper-LVUUZRWL.js} +2 -2
- package/dist-cli/chunks/{assert-O7N2SYJZ.js → assert-4WMVS3WU.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-Q4A3PTF5.js +2 -0
- package/dist-cli/chunks/beta-CLLKUB5X.js +2 -0
- package/dist-cli/chunks/{chunk-PFRPXFSL.js → chunk-4IAKB3C4.js} +6 -6
- package/dist-cli/chunks/chunk-4L45Q3YX.js +5 -0
- package/dist-cli/chunks/{chunk-BEY2QVU5.js → chunk-553OZX4H.js} +2 -2
- package/dist-cli/chunks/{chunk-IKVIHHWE.js → chunk-5GK4YX7O.js} +1 -1
- package/dist-cli/chunks/{runtime-GFWS3QLZ.js → chunk-5IAIIX7B.js} +3 -3
- package/dist-cli/chunks/{chunk-NSZBULGG.js → chunk-6X5NQJT7.js} +3 -3
- package/dist-cli/chunks/{chunk-H6CG42HE.js → chunk-6XI4VHIL.js} +2 -2
- package/dist-cli/chunks/{chunk-HNAGYNWN.js → chunk-BZED27B2.js} +2 -2
- package/dist-cli/chunks/{chunk-JJVZMGRM.js → chunk-CAJ247SC.js} +2 -2
- package/dist-cli/chunks/{chunk-E473YTRQ.js → chunk-CCZHRBXJ.js} +1 -1
- package/dist-cli/chunks/{chunk-FXY5FWVY.js → chunk-D2ZMP7G4.js} +2 -2
- package/dist-cli/chunks/{chunk-CHMHTTI7.js → chunk-D4Z7MWQY.js} +2 -2
- package/dist-cli/chunks/{chunk-VIEK76DX.js → chunk-DEBXVPIE.js} +1 -1
- package/dist-cli/chunks/{chunk-FCOCFEBU.js → chunk-DHJIXXWG.js} +2 -2
- package/dist-cli/chunks/chunk-DPZDTJVQ.js +1 -0
- package/dist-cli/chunks/{chunk-IE2WYVJF.js → chunk-DSTHAISO.js} +1 -1
- package/dist-cli/chunks/{chunk-G23GIRBM.js → chunk-EOWN4ZFJ.js} +1 -1
- package/dist-cli/chunks/chunk-FFR7EA4U.js +1 -0
- package/dist-cli/chunks/chunk-FNIL6BYS.js +108 -0
- package/dist-cli/chunks/chunk-I7KXFJDK.js +1 -0
- package/dist-cli/chunks/{chunk-B4VH67D3.js → chunk-J6BPROH4.js} +1 -1
- package/dist-cli/chunks/{chunk-LNRBXCUI.js → chunk-KGVH3YAG.js} +2 -2
- package/dist-cli/chunks/{chunk-MTPWS4JK.js → chunk-KVOMVYG6.js} +4 -4
- package/dist-cli/chunks/{chunk-VVUEWU2P.js → chunk-LCES5ZJI.js} +2 -2
- package/dist-cli/chunks/{chunk-ARH3T5NK.js → chunk-LXR5EI74.js} +2 -2
- package/dist-cli/chunks/{chunk-P722XCFT.js → chunk-MLCBIX7O.js} +2 -2
- package/dist-cli/chunks/{chunk-P32FCOS3.js → chunk-OV5TY7M3.js} +2 -2
- package/dist-cli/chunks/chunk-PKB6IEGM.js +2 -0
- package/dist-cli/chunks/chunk-PNGBWMQH.js +17 -0
- package/dist-cli/chunks/{chunk-SKNHJDYO.js → chunk-QMBYRPRK.js} +1 -1
- package/dist-cli/chunks/{chunk-UD5ILFN5.js → chunk-QUULF2II.js} +2 -2
- package/dist-cli/chunks/chunk-S4PJMUC7.js +2 -0
- package/dist-cli/chunks/{chunk-5XI3AB4I.js → chunk-TK2IPNHL.js} +2 -2
- package/dist-cli/chunks/chunk-U3JD6X75.js +4 -0
- package/dist-cli/chunks/{chunk-67K3WAEZ.js → chunk-W2XRHDQQ.js} +2 -2
- package/dist-cli/chunks/{chunk-T442FYM5.js → chunk-WPS3TIOB.js} +1 -1
- package/dist-cli/chunks/{chunk-Z2PBRNJP.js → chunk-WQXG4I5N.js} +2 -2
- package/dist-cli/chunks/{chunk-QI4VLQ3A.js → chunk-WZE6T3GT.js} +1 -1
- package/dist-cli/chunks/chunk-XWXFUFB2.js +1 -0
- package/dist-cli/chunks/{chunk-ZEVZN3S4.js → chunk-Y5CFIRLN.js} +2 -2
- package/dist-cli/chunks/{chunk-2ABGQIW7.js → chunk-Y66CDFAT.js} +1 -1
- package/dist-cli/chunks/chunk-YJMXGTP4.js +2 -0
- package/dist-cli/chunks/{chunk-6UJXRT7F.js → chunk-YKEBL6GE.js} +1 -1
- package/dist-cli/chunks/{chunk-5HNZO5AI.js → chunk-Z3I2I4IO.js} +3 -3
- package/dist-cli/chunks/{compat-DNQWSPFQ.js → compat-NBFWHK5S.js} +2 -2
- package/dist-cli/chunks/{config-ABR5BGUO.js → config-JEDQ3NHA.js} +2 -2
- package/dist-cli/chunks/control-IMWZVYC3.js +2 -0
- package/dist-cli/chunks/{cpu-profile-Y5YDH6X2.js → cpu-profile-MQPUSRHG.js} +2 -2
- package/dist-cli/chunks/{daemon-2Z4DAJT6.js → daemon-HOL7J3BI.js} +2 -2
- package/dist-cli/chunks/{debug-R36UPOJP.js → debug-LNVMIWD6.js} +20 -20
- package/dist-cli/chunks/demo-app-registry-4RFMJ4FM.js +2 -0
- package/dist-cli/chunks/{detox-FQJWEWLT.js → detox-EEZPH3DZ.js} +2 -2
- package/dist-cli/chunks/{device-SXKLDZEC.js → device-GVLYQI7X.js} +2 -2
- package/dist-cli/chunks/{diagnose-M7RKNI2H.js → diagnose-JQ7DPTSL.js} +2 -2
- package/dist-cli/chunks/drivers-JUW6JBWH.js +2 -0
- package/dist-cli/chunks/{electron-YUAKGT4H.js → electron-UDV6K3IH.js} +3 -3
- package/dist-cli/chunks/flow-JOW23WNH.js +2 -0
- package/dist-cli/chunks/{hints-SDD7L3VS.js → hints-46PJLATZ.js} +2 -2
- package/dist-cli/chunks/{home-paths-QMCX2227.js → home-paths-XD7AOYU7.js} +2 -2
- package/dist-cli/chunks/inspect-EDIKZ6O2.js +993 -0
- package/dist-cli/chunks/install-CCC3IF5S.js +2 -0
- package/dist-cli/chunks/{install-desktop-EKMYRDQH.js → install-desktop-CX6ATQTR.js} +3 -3
- package/dist-cli/chunks/{keys-ODG3TDUP.js → keys-CXQIYEVW.js} +2 -2
- package/dist-cli/chunks/{launch-7HUL745I.js → launch-DCFRKVD3.js} +3 -3
- package/dist-cli/chunks/{login-BJKQMJYT.js → login-HCIZL5GT.js} +4 -4
- package/dist-cli/chunks/{logout-7NG3KGJD.js → logout-7X2YHJY3.js} +2 -2
- package/dist-cli/chunks/{maestro-VFEUWV3Q.js → maestro-TY622MIW.js} +2 -2
- package/dist-cli/chunks/{preview-WZ6XNOBC.js → preview-DYI6ESOK.js} +2 -2
- package/dist-cli/chunks/{profile-DXFEZOHB.js → profile-7SXJEJTG.js} +2 -2
- package/dist-cli/chunks/{react-QP7PL5CZ.js → react-VGSDY766.js} +2 -2
- package/dist-cli/chunks/{record-AFE25EMH.js → record-7JX2SMVP.js} +2 -2
- package/dist-cli/chunks/runtime-FTOQD7QK.js +2 -0
- package/dist-cli/chunks/runtime-delivery-PWLODFCY.js +2 -0
- package/dist-cli/chunks/{screenshot-U6VFOVFW.js → screenshot-PTKY4UU4.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-HNGV3AFC.js → screenshot-mode-HSV7VY4G.js} +2 -2
- package/dist-cli/chunks/{screenshots-GYMRDUJR.js → screenshots-VY7VAGSV.js} +2 -2
- package/dist-cli/chunks/server-EDB3EK4K.js +35 -0
- package/dist-cli/chunks/setup-repo-S2GFZR7F.js +2 -0
- package/dist-cli/chunks/{skills-FT76ZVAV.js → skills-KEPQLCMR.js} +2 -2
- package/dist-cli/chunks/start-5CJTBNRM.js +23 -0
- package/dist-cli/chunks/store-SCRULNVS.js +2 -0
- package/dist-cli/chunks/telemetry-RC3OT67I.js +2 -0
- package/dist-cli/chunks/{test-AJPY2Q6W.js → test-REKHGKFE.js} +3 -3
- package/dist-cli/chunks/{three-mode-JZZVOMTG.js → three-mode-FZYHB4ZQ.js} +2 -2
- package/dist-cli/chunks/{timeline-GTSCF5P6.js → timeline-CWZAY52K.js} +2 -2
- package/dist-cli/chunks/upgrade-AIUJEF5F.js +4 -0
- package/dist-cli/chunks/upload-UDA5ITTE.js +2 -0
- package/dist-cli/chunks/what-happened-JSQQVQGE.js +15 -0
- package/dist-cli/chunks/{whoami-FOIMN6UC.js → whoami-5WUUPIRN.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.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/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.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 +121 -83
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +147 -90
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-DF4KYGPS.js +0 -2
- package/dist-cli/chunks/beta-AK25X3AU.js +0 -2
- package/dist-cli/chunks/chunk-23YMXBQ2.js +0 -1
- package/dist-cli/chunks/chunk-CB4PUMI2.js +0 -1
- package/dist-cli/chunks/chunk-FRE5TY3C.js +0 -1
- package/dist-cli/chunks/chunk-FX3PPKSJ.js +0 -2
- package/dist-cli/chunks/chunk-G62Q2MQI.js +0 -1
- package/dist-cli/chunks/chunk-GWQUPWVO.js +0 -2
- package/dist-cli/chunks/chunk-NKYTISAN.js +0 -4
- package/dist-cli/chunks/chunk-QD22CQLH.js +0 -5
- package/dist-cli/chunks/chunk-TR554AIH.js +0 -17
- package/dist-cli/chunks/control-DEHRU4XZ.js +0 -2
- package/dist-cli/chunks/demo-app-registry-DMMWYL7G.js +0 -2
- package/dist-cli/chunks/drivers-NSCX5CRA.js +0 -2
- package/dist-cli/chunks/flow-UQSRNEZD.js +0 -2
- package/dist-cli/chunks/inspect-6FPPW7GS.js +0 -1101
- package/dist-cli/chunks/install-TTH3PM3B.js +0 -2
- package/dist-cli/chunks/server-3Q22YYM6.js +0 -35
- package/dist-cli/chunks/setup-repo-NNDWIGZR.js +0 -2
- package/dist-cli/chunks/start-N573LFCF.js +0 -23
- package/dist-cli/chunks/store-6NTDGLPH.js +0 -2
- package/dist-cli/chunks/telemetry-SNZBIRGL.js +0 -2
- package/dist-cli/chunks/upload-UHTVCGGR.js +0 -2
- package/dist-cli/chunks/what-happened-N3AQ6I7O.js +0 -15
package/dist-lib/vite-base.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.40 | (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;
|
|
@@ -967,8 +967,8 @@ async function discoverListeningProcesses(excludePorts = []) {
|
|
|
967
967
|
}
|
|
968
968
|
async function resolveProcessCwd(pid) {
|
|
969
969
|
if (pid <= 0) return null;
|
|
970
|
-
const
|
|
971
|
-
if (
|
|
970
|
+
const cached2 = cwdByPid.get(pid);
|
|
971
|
+
if (cached2) return cached2;
|
|
972
972
|
try {
|
|
973
973
|
const { stdout } = await execP(`lsof -p ${pid} -a -d cwd -Fn 2>/dev/null`, {
|
|
974
974
|
encoding: "utf8",
|
|
@@ -1054,7 +1054,7 @@ async function probePort(port, buildIconProxyUrl) {
|
|
|
1054
1054
|
knownNonPatched.has(port) ? Promise.resolve(null) : httpGet(port, "/__soot/"),
|
|
1055
1055
|
httpGet(port, "/status"),
|
|
1056
1056
|
httpGet(port, onePath, "HEAD"),
|
|
1057
|
-
knownOne.has(port) ? Promise.resolve(null) : httpGet(port, "/", "GET",
|
|
1057
|
+
knownOne.has(port) ? Promise.resolve(null) : httpGet(port, "/", "GET", MANIFEST_TIMEOUT_MS, { "expo-platform": "ios" }),
|
|
1058
1058
|
knownNonExpo.has(port) ? Promise.resolve(null) : httpGet(port, "/_expo/status")
|
|
1059
1059
|
]);
|
|
1060
1060
|
if (expoRes && expoRes.statusCode === 200) {
|
|
@@ -1170,12 +1170,12 @@ async function scanDevServers(opts = {}) {
|
|
|
1170
1170
|
const results = [];
|
|
1171
1171
|
const toProbe = [];
|
|
1172
1172
|
for (const { port, pid } of processes) {
|
|
1173
|
-
const
|
|
1174
|
-
if (
|
|
1175
|
-
if (
|
|
1173
|
+
const cached2 = portCache.get(port);
|
|
1174
|
+
if (cached2 && __shouldReuseScannerCacheEntry(cached2, pid)) {
|
|
1175
|
+
if (cached2.result) results.push(cached2.result);
|
|
1176
1176
|
continue;
|
|
1177
1177
|
}
|
|
1178
|
-
if (
|
|
1178
|
+
if (cached2 && cached2.pid !== pid) {
|
|
1179
1179
|
knownNonPatched.delete(port);
|
|
1180
1180
|
knownNonExpo.delete(port);
|
|
1181
1181
|
knownOne.delete(port);
|
|
@@ -1211,7 +1211,7 @@ async function scanDevServers(opts = {}) {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
return results.filter((r) => !isSootSelfServer(r));
|
|
1213
1213
|
}
|
|
1214
|
-
var import_child_process, import_http, import_net, import_util, execP, TIMEOUT_MS, TCP_GATE_MS, FALLBACK_PORTS, cwdByPid, knownNonPatched, knownNonExpo, knownOne, portCache, NEGATIVE_CACHE_TTL_MS, WEAK_RESULT_CACHE_TTL_MS;
|
|
1214
|
+
var import_child_process, import_http, import_net, import_util, execP, TIMEOUT_MS, MANIFEST_TIMEOUT_MS, TCP_GATE_MS, FALLBACK_PORTS, cwdByPid, knownNonPatched, knownNonExpo, knownOne, portCache, NEGATIVE_CACHE_TTL_MS, WEAK_RESULT_CACHE_TTL_MS;
|
|
1215
1215
|
var init_dev_server_scanner = __esm({
|
|
1216
1216
|
"scripts/dev-server-scanner.ts"() {
|
|
1217
1217
|
"use strict";
|
|
@@ -1224,6 +1224,7 @@ var init_dev_server_scanner = __esm({
|
|
|
1224
1224
|
init_demo_app_registry();
|
|
1225
1225
|
execP = (0, import_util.promisify)(import_child_process.exec);
|
|
1226
1226
|
TIMEOUT_MS = 250;
|
|
1227
|
+
MANIFEST_TIMEOUT_MS = 1500;
|
|
1227
1228
|
TCP_GATE_MS = 120;
|
|
1228
1229
|
FALLBACK_PORTS = [
|
|
1229
1230
|
8081,
|
|
@@ -1246,6 +1247,37 @@ var init_dev_server_scanner = __esm({
|
|
|
1246
1247
|
}
|
|
1247
1248
|
});
|
|
1248
1249
|
|
|
1250
|
+
// src/cli-version.ts
|
|
1251
|
+
function getCliVersion() {
|
|
1252
|
+
if (cached != null) return cached;
|
|
1253
|
+
const candidates = [
|
|
1254
|
+
() => (0, import_node_url3.fileURLToPath)(import_meta.resolve("sootsim/package.json")),
|
|
1255
|
+
() => (0, import_node_url3.fileURLToPath)(new URL("../package.json", __sootsim_import_meta_url))
|
|
1256
|
+
];
|
|
1257
|
+
for (const resolve2 of candidates) {
|
|
1258
|
+
try {
|
|
1259
|
+
const version = JSON.parse((0, import_node_fs2.readFileSync)(resolve2(), "utf8")).version;
|
|
1260
|
+
if (typeof version === "string" && version) {
|
|
1261
|
+
cached = version;
|
|
1262
|
+
return cached;
|
|
1263
|
+
}
|
|
1264
|
+
} catch {
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
cached = "0.0.0";
|
|
1268
|
+
return cached;
|
|
1269
|
+
}
|
|
1270
|
+
var import_node_fs2, import_node_url3, import_meta, cached;
|
|
1271
|
+
var init_cli_version = __esm({
|
|
1272
|
+
"src/cli-version.ts"() {
|
|
1273
|
+
"use strict";
|
|
1274
|
+
import_node_fs2 = require("node:fs");
|
|
1275
|
+
import_node_url3 = require("node:url");
|
|
1276
|
+
import_meta = {};
|
|
1277
|
+
cached = null;
|
|
1278
|
+
}
|
|
1279
|
+
});
|
|
1280
|
+
|
|
1249
1281
|
// src/home-paths.ts
|
|
1250
1282
|
function sootsimHomeDir() {
|
|
1251
1283
|
const override = process.env[SOOTSIM_HOME_ENV];
|
|
@@ -1281,7 +1313,7 @@ function configFilePath() {
|
|
|
1281
1313
|
}
|
|
1282
1314
|
function readSharedConfig() {
|
|
1283
1315
|
try {
|
|
1284
|
-
const raw =
|
|
1316
|
+
const raw = import_node_fs3.default.readFileSync(configFilePath(), "utf8");
|
|
1285
1317
|
const parsed = JSON.parse(raw);
|
|
1286
1318
|
return parsed && typeof parsed === "object" ? parsed : {};
|
|
1287
1319
|
} catch {
|
|
@@ -1299,34 +1331,34 @@ function writeSharedConfig(patch) {
|
|
|
1299
1331
|
};
|
|
1300
1332
|
}
|
|
1301
1333
|
const tmp = `${configFilePath()}.tmp`;
|
|
1302
|
-
|
|
1334
|
+
import_node_fs3.default.writeFileSync(tmp, `${JSON.stringify(next, null, 2)}
|
|
1303
1335
|
`, "utf8");
|
|
1304
|
-
|
|
1336
|
+
import_node_fs3.default.renameSync(tmp, configFilePath());
|
|
1305
1337
|
return next;
|
|
1306
1338
|
}
|
|
1307
1339
|
function ensureSootsimHome() {
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1340
|
+
import_node_fs3.default.mkdirSync(sootsimHomeDir(), { recursive: true });
|
|
1341
|
+
import_node_fs3.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
1342
|
+
import_node_fs3.default.mkdirSync(electronDir(), { recursive: true });
|
|
1343
|
+
import_node_fs3.default.mkdirSync(profilesDir(), { recursive: true });
|
|
1344
|
+
import_node_fs3.default.mkdirSync(cacheDir(), { recursive: true });
|
|
1313
1345
|
}
|
|
1314
1346
|
function readActiveRuntime() {
|
|
1315
1347
|
try {
|
|
1316
|
-
const value =
|
|
1348
|
+
const value = import_node_fs3.default.readFileSync(activeRuntimeFile(), "utf8").trim();
|
|
1317
1349
|
return value.length > 0 ? value : null;
|
|
1318
1350
|
} catch {
|
|
1319
1351
|
return null;
|
|
1320
1352
|
}
|
|
1321
1353
|
}
|
|
1322
1354
|
function writeActiveRuntime(version) {
|
|
1323
|
-
|
|
1324
|
-
|
|
1355
|
+
import_node_fs3.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
1356
|
+
import_node_fs3.default.writeFileSync(activeRuntimeFile(), `${version}
|
|
1325
1357
|
`, "utf8");
|
|
1326
1358
|
}
|
|
1327
1359
|
function listInstalledRuntimes() {
|
|
1328
1360
|
try {
|
|
1329
|
-
return
|
|
1361
|
+
return import_node_fs3.default.readdirSync(runtimesDir(), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort(compareSemver);
|
|
1330
1362
|
} catch {
|
|
1331
1363
|
return [];
|
|
1332
1364
|
}
|
|
@@ -1357,17 +1389,17 @@ function activeRuntimeDir() {
|
|
|
1357
1389
|
if (!version) return null;
|
|
1358
1390
|
const dir = runtimeDir(version);
|
|
1359
1391
|
try {
|
|
1360
|
-
if (
|
|
1392
|
+
if (import_node_fs3.default.statSync(dir).isDirectory()) return dir;
|
|
1361
1393
|
} catch {
|
|
1362
1394
|
}
|
|
1363
1395
|
return null;
|
|
1364
1396
|
}
|
|
1365
1397
|
function readDaemonLockfile() {
|
|
1366
1398
|
try {
|
|
1367
|
-
const fd =
|
|
1399
|
+
const fd = import_node_fs3.default.openSync(daemonLockfilePath(), "r");
|
|
1368
1400
|
try {
|
|
1369
1401
|
const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
|
|
1370
|
-
const bytesRead =
|
|
1402
|
+
const bytesRead = import_node_fs3.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
|
|
1371
1403
|
const raw = buf.subarray(0, bytesRead).toString("utf8");
|
|
1372
1404
|
const parsed = JSON.parse(raw);
|
|
1373
1405
|
if (parsed && parsed.schema === 1 && typeof parsed.pid === "number" && typeof parsed.bridgePort === "number" && typeof parsed.runtimePort === "number" && typeof parsed.startedAt === "number" && typeof parsed.heartbeatAt === "number") {
|
|
@@ -1375,7 +1407,7 @@ function readDaemonLockfile() {
|
|
|
1375
1407
|
}
|
|
1376
1408
|
return null;
|
|
1377
1409
|
} finally {
|
|
1378
|
-
|
|
1410
|
+
import_node_fs3.default.closeSync(fd);
|
|
1379
1411
|
}
|
|
1380
1412
|
} catch {
|
|
1381
1413
|
return null;
|
|
@@ -1394,9 +1426,9 @@ function isDaemonLockfileFresh(lock, now = Date.now()) {
|
|
|
1394
1426
|
function writeDaemonLockfile(data) {
|
|
1395
1427
|
ensureSootsimHome();
|
|
1396
1428
|
const tmp = `${daemonLockfilePath()}.tmp`;
|
|
1397
|
-
|
|
1429
|
+
import_node_fs3.default.writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
|
|
1398
1430
|
`, "utf8");
|
|
1399
|
-
|
|
1431
|
+
import_node_fs3.default.renameSync(tmp, daemonLockfilePath());
|
|
1400
1432
|
}
|
|
1401
1433
|
function claimDaemonLockfile(data) {
|
|
1402
1434
|
ensureSootsimHome();
|
|
@@ -1409,15 +1441,15 @@ function claimDaemonLockfile(data) {
|
|
|
1409
1441
|
}
|
|
1410
1442
|
function removeDaemonLockfile() {
|
|
1411
1443
|
try {
|
|
1412
|
-
|
|
1444
|
+
import_node_fs3.default.unlinkSync(daemonLockfilePath());
|
|
1413
1445
|
} catch {
|
|
1414
1446
|
}
|
|
1415
1447
|
}
|
|
1416
|
-
var
|
|
1448
|
+
var import_node_fs3, import_node_os2, import_node_path4, SOOTSIM_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE, CONFIG_FILE, DAEMON_HEARTBEAT_STALE_MS, DAEMON_LOCKFILE_MAX_BYTES;
|
|
1417
1449
|
var init_home_paths = __esm({
|
|
1418
1450
|
"src/home-paths.ts"() {
|
|
1419
1451
|
"use strict";
|
|
1420
|
-
|
|
1452
|
+
import_node_fs3 = __toESM(require("node:fs"), 1);
|
|
1421
1453
|
import_node_os2 = require("node:os");
|
|
1422
1454
|
import_node_path4 = __toESM(require("node:path"), 1);
|
|
1423
1455
|
SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
|
|
@@ -1722,7 +1754,7 @@ function loadStore() {
|
|
|
1722
1754
|
const file = storeFile();
|
|
1723
1755
|
let raw;
|
|
1724
1756
|
try {
|
|
1725
|
-
raw =
|
|
1757
|
+
raw = import_node_fs4.default.readFileSync(file, "utf8");
|
|
1726
1758
|
} catch (err) {
|
|
1727
1759
|
if (err.code === "ENOENT") return cloneEmpty();
|
|
1728
1760
|
throw err;
|
|
@@ -1739,7 +1771,7 @@ function loadStore() {
|
|
|
1739
1771
|
} catch (err) {
|
|
1740
1772
|
const quarantine = `${file}.corrupt-${Date.now()}`;
|
|
1741
1773
|
try {
|
|
1742
|
-
|
|
1774
|
+
import_node_fs4.default.renameSync(file, quarantine);
|
|
1743
1775
|
console.warn(
|
|
1744
1776
|
`[sootsim] attached-projects.json was unparseable; quarantined to ${quarantine}. original error: ${err.message}`
|
|
1745
1777
|
);
|
|
@@ -1750,16 +1782,16 @@ function loadStore() {
|
|
|
1750
1782
|
}
|
|
1751
1783
|
function writeStore(store) {
|
|
1752
1784
|
const file = storeFile();
|
|
1753
|
-
|
|
1785
|
+
import_node_fs4.default.mkdirSync(import_node_path5.default.dirname(file), { recursive: true });
|
|
1754
1786
|
const tmp = `${file}.tmp-${process.pid}-${Date.now()}`;
|
|
1755
|
-
const fd =
|
|
1787
|
+
const fd = import_node_fs4.default.openSync(tmp, "w", 384);
|
|
1756
1788
|
try {
|
|
1757
|
-
|
|
1758
|
-
|
|
1789
|
+
import_node_fs4.default.writeFileSync(fd, JSON.stringify(store, null, 2));
|
|
1790
|
+
import_node_fs4.default.fsyncSync(fd);
|
|
1759
1791
|
} finally {
|
|
1760
|
-
|
|
1792
|
+
import_node_fs4.default.closeSync(fd);
|
|
1761
1793
|
}
|
|
1762
|
-
|
|
1794
|
+
import_node_fs4.default.renameSync(tmp, file);
|
|
1763
1795
|
}
|
|
1764
1796
|
function mutateStore(fn) {
|
|
1765
1797
|
const store = loadStore();
|
|
@@ -1939,7 +1971,7 @@ async function seedFromDemoAppRegistry() {
|
|
|
1939
1971
|
const apps = APPS2;
|
|
1940
1972
|
mutateStore((store) => {
|
|
1941
1973
|
for (const app of apps) {
|
|
1942
|
-
if (!
|
|
1974
|
+
if (!import_node_fs4.default.existsSync(app.dir)) continue;
|
|
1943
1975
|
const cwd = import_node_path5.default.resolve(app.dir);
|
|
1944
1976
|
const id = projectIdForCwd(cwd);
|
|
1945
1977
|
if (store.attachedProjects.some((p) => p.id === id)) continue;
|
|
@@ -1961,12 +1993,12 @@ async function seedFromDemoAppRegistry() {
|
|
|
1961
1993
|
}
|
|
1962
1994
|
});
|
|
1963
1995
|
}
|
|
1964
|
-
var import_node_crypto,
|
|
1996
|
+
var import_node_crypto, import_node_fs4, import_node_path5, overrideDir, COST_HISTORY_MAX_AGE_MS;
|
|
1965
1997
|
var init_attached_projects = __esm({
|
|
1966
1998
|
"src/attached-projects.ts"() {
|
|
1967
1999
|
"use strict";
|
|
1968
2000
|
import_node_crypto = require("node:crypto");
|
|
1969
|
-
|
|
2001
|
+
import_node_fs4 = __toESM(require("node:fs"), 1);
|
|
1970
2002
|
import_node_path5 = __toESM(require("node:path"), 1);
|
|
1971
2003
|
init_home_paths();
|
|
1972
2004
|
overrideDir = null;
|
|
@@ -1995,7 +2027,7 @@ function pidIsAlive(pid, sessionId) {
|
|
|
1995
2027
|
return false;
|
|
1996
2028
|
}
|
|
1997
2029
|
if (sessionId) {
|
|
1998
|
-
if (!
|
|
2030
|
+
if (!import_node_fs5.default.existsSync(sessionDir(sessionId))) return false;
|
|
1999
2031
|
}
|
|
2000
2032
|
return true;
|
|
2001
2033
|
}
|
|
@@ -2011,7 +2043,7 @@ function resolveSootsimInvocation() {
|
|
|
2011
2043
|
import_node_path6.default.join(resourcesPath, "bin", `sootsim-${process.platform}-${process.arch}`)
|
|
2012
2044
|
];
|
|
2013
2045
|
for (const c of candidates) {
|
|
2014
|
-
if (
|
|
2046
|
+
if (import_node_fs5.default.existsSync(c)) return { cmd: c, prefixArgs: [] };
|
|
2015
2047
|
}
|
|
2016
2048
|
}
|
|
2017
2049
|
}
|
|
@@ -2035,14 +2067,14 @@ function tryWorkspaceSootsim() {
|
|
|
2035
2067
|
if (!sootsimDir) return null;
|
|
2036
2068
|
const binaryName = `sootsim-${process.platform}-${process.arch}`;
|
|
2037
2069
|
const distBinary = import_node_path6.default.join(sootsimDir, "dist-bin", binaryName);
|
|
2038
|
-
if (
|
|
2070
|
+
if (import_node_fs5.default.existsSync(distBinary)) return { cmd: distBinary, prefixArgs: [] };
|
|
2039
2071
|
const distBin = import_node_path6.default.join(sootsimDir, "dist-cli", "bin.js");
|
|
2040
|
-
if (
|
|
2072
|
+
if (import_node_fs5.default.existsSync(distBin)) {
|
|
2041
2073
|
try {
|
|
2042
2074
|
const src = import_node_path6.default.join(sootsimDir, "cli", "commands", "agent-wrapper.ts");
|
|
2043
|
-
if (
|
|
2044
|
-
const srcMtime =
|
|
2045
|
-
const buildMtime =
|
|
2075
|
+
if (import_node_fs5.default.existsSync(src)) {
|
|
2076
|
+
const srcMtime = import_node_fs5.default.statSync(src).mtimeMs;
|
|
2077
|
+
const buildMtime = import_node_fs5.default.statSync(distBin).mtimeMs;
|
|
2046
2078
|
if (buildMtime < srcMtime) {
|
|
2047
2079
|
console.warn(
|
|
2048
2080
|
`[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with \`bun run --cwd packages/sootsim build:cli\` (watch:cli:binary builds dist-bin/ instead).`
|
|
@@ -2070,8 +2102,8 @@ function resolveSootsimPackageDir() {
|
|
|
2070
2102
|
for (let i = 0; i < 8; i++) {
|
|
2071
2103
|
const pkg = import_node_path6.default.join(cur, "package.json");
|
|
2072
2104
|
try {
|
|
2073
|
-
if (
|
|
2074
|
-
const parsed = JSON.parse(
|
|
2105
|
+
if (import_node_fs5.default.existsSync(pkg)) {
|
|
2106
|
+
const parsed = JSON.parse(import_node_fs5.default.readFileSync(pkg, "utf8"));
|
|
2075
2107
|
if (parsed.name === "sootsim") return cur;
|
|
2076
2108
|
}
|
|
2077
2109
|
} catch {
|
|
@@ -2093,9 +2125,9 @@ function fileFromImportMeta() {
|
|
|
2093
2125
|
}
|
|
2094
2126
|
async function withStartLock(projectId, provider, fn) {
|
|
2095
2127
|
const lockDir = import_node_path6.default.join(getUserDataDir(), "locks");
|
|
2096
|
-
|
|
2128
|
+
import_node_fs5.default.mkdirSync(lockDir, { recursive: true });
|
|
2097
2129
|
try {
|
|
2098
|
-
|
|
2130
|
+
import_node_fs5.default.chmodSync(lockDir, 448);
|
|
2099
2131
|
} catch {
|
|
2100
2132
|
}
|
|
2101
2133
|
const lockPath = import_node_path6.default.join(lockDir, `start-${projectId}-${provider}.lock`);
|
|
@@ -2103,17 +2135,17 @@ async function withStartLock(projectId, provider, fn) {
|
|
|
2103
2135
|
let fd = null;
|
|
2104
2136
|
while (fd === null) {
|
|
2105
2137
|
try {
|
|
2106
|
-
fd =
|
|
2138
|
+
fd = import_node_fs5.default.openSync(
|
|
2107
2139
|
lockPath,
|
|
2108
|
-
|
|
2140
|
+
import_node_fs5.constants.O_WRONLY | import_node_fs5.constants.O_CREAT | import_node_fs5.constants.O_EXCL,
|
|
2109
2141
|
384
|
|
2110
2142
|
);
|
|
2111
2143
|
} catch (err) {
|
|
2112
2144
|
if (err.code !== "EEXIST") throw err;
|
|
2113
2145
|
try {
|
|
2114
|
-
const stale = Number(
|
|
2146
|
+
const stale = Number(import_node_fs5.default.readFileSync(lockPath, "utf8").trim());
|
|
2115
2147
|
if (stale && !isProcessAlive(stale)) {
|
|
2116
|
-
|
|
2148
|
+
import_node_fs5.default.unlinkSync(lockPath);
|
|
2117
2149
|
continue;
|
|
2118
2150
|
}
|
|
2119
2151
|
} catch {
|
|
@@ -2127,15 +2159,15 @@ async function withStartLock(projectId, provider, fn) {
|
|
|
2127
2159
|
}
|
|
2128
2160
|
}
|
|
2129
2161
|
try {
|
|
2130
|
-
|
|
2162
|
+
import_node_fs5.default.writeFileSync(fd, String(process.pid));
|
|
2131
2163
|
return await fn();
|
|
2132
2164
|
} finally {
|
|
2133
2165
|
try {
|
|
2134
|
-
|
|
2166
|
+
import_node_fs5.default.closeSync(fd);
|
|
2135
2167
|
} catch {
|
|
2136
2168
|
}
|
|
2137
2169
|
try {
|
|
2138
|
-
|
|
2170
|
+
import_node_fs5.default.unlinkSync(lockPath);
|
|
2139
2171
|
} catch {
|
|
2140
2172
|
}
|
|
2141
2173
|
}
|
|
@@ -2150,24 +2182,24 @@ function isProcessAlive(pid) {
|
|
|
2150
2182
|
}
|
|
2151
2183
|
function mkfifoSync(p) {
|
|
2152
2184
|
const parent = import_node_path6.default.dirname(p);
|
|
2153
|
-
|
|
2185
|
+
import_node_fs5.default.mkdirSync(parent, { recursive: true });
|
|
2154
2186
|
try {
|
|
2155
|
-
|
|
2187
|
+
import_node_fs5.default.chmodSync(parent, 448);
|
|
2156
2188
|
} catch {
|
|
2157
2189
|
}
|
|
2158
|
-
if (
|
|
2190
|
+
if (import_node_fs5.default.existsSync(p)) {
|
|
2159
2191
|
try {
|
|
2160
|
-
const stat =
|
|
2192
|
+
const stat = import_node_fs5.default.statSync(p);
|
|
2161
2193
|
if (stat.isFIFO()) {
|
|
2162
2194
|
try {
|
|
2163
|
-
|
|
2195
|
+
import_node_fs5.default.chmodSync(p, 384);
|
|
2164
2196
|
} catch {
|
|
2165
2197
|
}
|
|
2166
2198
|
return;
|
|
2167
2199
|
}
|
|
2168
|
-
|
|
2200
|
+
import_node_fs5.default.unlinkSync(p);
|
|
2169
2201
|
} catch {
|
|
2170
|
-
|
|
2202
|
+
import_node_fs5.default.unlinkSync(p);
|
|
2171
2203
|
}
|
|
2172
2204
|
}
|
|
2173
2205
|
const result = (0, import_node_child_process.spawnSync)("mkfifo", ["-m", "600", p]);
|
|
@@ -2208,9 +2240,9 @@ async function startSession(opts) {
|
|
|
2208
2240
|
mkfifoSync(promptIn);
|
|
2209
2241
|
mkfifoSync(eventsOut);
|
|
2210
2242
|
const transcriptDir = import_node_path6.default.dirname(transcript);
|
|
2211
|
-
|
|
2243
|
+
import_node_fs5.default.mkdirSync(transcriptDir, { recursive: true });
|
|
2212
2244
|
try {
|
|
2213
|
-
|
|
2245
|
+
import_node_fs5.default.chmodSync(transcriptDir, 448);
|
|
2214
2246
|
} catch {
|
|
2215
2247
|
}
|
|
2216
2248
|
const { cmd, prefixArgs } = resolveSootsimInvocation();
|
|
@@ -2261,7 +2293,7 @@ async function startSession(opts) {
|
|
|
2261
2293
|
}
|
|
2262
2294
|
}
|
|
2263
2295
|
try {
|
|
2264
|
-
|
|
2296
|
+
import_node_fs5.default.rmSync(sessionDir(session.id), { recursive: true, force: true });
|
|
2265
2297
|
} catch {
|
|
2266
2298
|
}
|
|
2267
2299
|
updateSessionStatus(session.id, { status: "ended" });
|
|
@@ -2289,18 +2321,18 @@ async function sendPrompt(sessionId, prompt) {
|
|
|
2289
2321
|
);
|
|
2290
2322
|
}
|
|
2291
2323
|
const fifo = promptFifoPath(sessionId);
|
|
2292
|
-
if (!
|
|
2324
|
+
if (!import_node_fs5.default.existsSync(fifo)) {
|
|
2293
2325
|
throw new AgentSessionError("NO_FIFO", `prompt FIFO missing: ${fifo}`);
|
|
2294
2326
|
}
|
|
2295
|
-
const fd =
|
|
2327
|
+
const fd = import_node_fs5.default.openSync(fifo, import_node_fs5.constants.O_WRONLY);
|
|
2296
2328
|
try {
|
|
2297
2329
|
const wireText = encodeAgentPromptEnvelope(prompt);
|
|
2298
2330
|
if (!wireText) {
|
|
2299
2331
|
throw new AgentSessionError("EMPTY_PROMPT", "prompt text is empty");
|
|
2300
2332
|
}
|
|
2301
|
-
|
|
2333
|
+
import_node_fs5.default.writeSync(fd, wireText + "\n");
|
|
2302
2334
|
} finally {
|
|
2303
|
-
|
|
2335
|
+
import_node_fs5.default.closeSync(fd);
|
|
2304
2336
|
}
|
|
2305
2337
|
updateSessionStatus(sessionId, {
|
|
2306
2338
|
lastPrompt: prompt.displayText ?? prompt.text,
|
|
@@ -2322,7 +2354,7 @@ async function endSession(sessionId) {
|
|
|
2322
2354
|
const base = getUserDataDir();
|
|
2323
2355
|
if (dir.startsWith(base)) {
|
|
2324
2356
|
try {
|
|
2325
|
-
|
|
2357
|
+
import_node_fs5.default.rmSync(dir, { recursive: true, force: true });
|
|
2326
2358
|
} catch {
|
|
2327
2359
|
}
|
|
2328
2360
|
}
|
|
@@ -2330,11 +2362,11 @@ async function endSession(sessionId) {
|
|
|
2330
2362
|
}
|
|
2331
2363
|
function subscribeEvents(sessionId, onEvent) {
|
|
2332
2364
|
const fifo = eventsFifoPath(sessionId);
|
|
2333
|
-
if (!
|
|
2365
|
+
if (!import_node_fs5.default.existsSync(fifo)) {
|
|
2334
2366
|
throw new AgentSessionError("NO_FIFO", `events FIFO missing: ${fifo}`);
|
|
2335
2367
|
}
|
|
2336
|
-
const fd =
|
|
2337
|
-
const stream =
|
|
2368
|
+
const fd = import_node_fs5.default.openSync(fifo, import_node_fs5.constants.O_RDWR);
|
|
2369
|
+
const stream = import_node_fs5.default.createReadStream("", { fd, autoClose: true });
|
|
2338
2370
|
const rl = import_node_readline.default.createInterface({ input: stream, crlfDelay: Infinity });
|
|
2339
2371
|
rl.on("line", (line) => {
|
|
2340
2372
|
const event = parseAgentEventLine(line);
|
|
@@ -2355,7 +2387,7 @@ function subscribeEvents(sessionId, onEvent) {
|
|
|
2355
2387
|
};
|
|
2356
2388
|
}
|
|
2357
2389
|
async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
2358
|
-
const fd =
|
|
2390
|
+
const fd = import_node_fs5.default.openSync(fifo, import_node_fs5.constants.O_RDWR | import_node_fs5.constants.O_NONBLOCK);
|
|
2359
2391
|
const buf = Buffer.alloc(8192);
|
|
2360
2392
|
let leftover = "";
|
|
2361
2393
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -2363,7 +2395,7 @@ async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
|
2363
2395
|
while (Date.now() < deadline) {
|
|
2364
2396
|
let n = 0;
|
|
2365
2397
|
try {
|
|
2366
|
-
n =
|
|
2398
|
+
n = import_node_fs5.default.readSync(fd, buf, 0, buf.length, null);
|
|
2367
2399
|
} catch (err) {
|
|
2368
2400
|
if (err.code !== "EAGAIN") throw err;
|
|
2369
2401
|
n = 0;
|
|
@@ -2383,16 +2415,16 @@ async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
|
2383
2415
|
}
|
|
2384
2416
|
return null;
|
|
2385
2417
|
} finally {
|
|
2386
|
-
|
|
2418
|
+
import_node_fs5.default.closeSync(fd);
|
|
2387
2419
|
}
|
|
2388
2420
|
}
|
|
2389
|
-
var import_node_child_process, import_node_crypto2,
|
|
2421
|
+
var import_node_child_process, import_node_crypto2, import_node_fs5, import_node_path6, import_node_readline, AgentSessionError;
|
|
2390
2422
|
var init_agent_sessions = __esm({
|
|
2391
2423
|
"src/agent-sessions.ts"() {
|
|
2392
2424
|
"use strict";
|
|
2393
2425
|
import_node_child_process = require("node:child_process");
|
|
2394
2426
|
import_node_crypto2 = require("node:crypto");
|
|
2395
|
-
|
|
2427
|
+
import_node_fs5 = __toESM(require("node:fs"), 1);
|
|
2396
2428
|
import_node_path6 = __toESM(require("node:path"), 1);
|
|
2397
2429
|
import_node_readline = __toESM(require("node:readline"), 1);
|
|
2398
2430
|
init_agent_events();
|
|
@@ -2422,11 +2454,11 @@ function mapFrameworkToProjectFramework(fw) {
|
|
|
2422
2454
|
if (fw === "one" || fw === "vxrn") return "one";
|
|
2423
2455
|
return "unknown";
|
|
2424
2456
|
}
|
|
2425
|
-
var
|
|
2457
|
+
var import_node_fs6, import_node_path7, WS_OPEN, AgentHost;
|
|
2426
2458
|
var init_agent_host = __esm({
|
|
2427
2459
|
"src/host/agent-host.ts"() {
|
|
2428
2460
|
"use strict";
|
|
2429
|
-
|
|
2461
|
+
import_node_fs6 = __toESM(require("node:fs"), 1);
|
|
2430
2462
|
import_node_path7 = __toESM(require("node:path"), 1);
|
|
2431
2463
|
init_dev_server_scanner();
|
|
2432
2464
|
init_agent_sessions();
|
|
@@ -2600,10 +2632,10 @@ var init_agent_host = __esm({
|
|
|
2600
2632
|
}
|
|
2601
2633
|
getTranscript(sessionId) {
|
|
2602
2634
|
const p = transcriptPath(sessionId);
|
|
2603
|
-
if (!
|
|
2635
|
+
if (!import_node_fs6.default.existsSync(p)) {
|
|
2604
2636
|
return { error: "transcript not found", code: "NO_TRANSCRIPT" };
|
|
2605
2637
|
}
|
|
2606
|
-
return
|
|
2638
|
+
return import_node_fs6.default.readFileSync(p, "utf8");
|
|
2607
2639
|
}
|
|
2608
2640
|
getPaths() {
|
|
2609
2641
|
const dir = getUserDataDir();
|
|
@@ -3249,7 +3281,7 @@ function injectSharedConfigIntoHtml(data) {
|
|
|
3249
3281
|
} catch {
|
|
3250
3282
|
payload = "{}";
|
|
3251
3283
|
}
|
|
3252
|
-
const tag = `<script>window.__sootsimSharedConfig=${payload};</script>`;
|
|
3284
|
+
const tag = `<script>window.__sootsimSharedConfig=${payload};window.__sootsimCliVersion=${JSON.stringify(getCliVersion())};</script>`;
|
|
3253
3285
|
const html = data.toString("utf8");
|
|
3254
3286
|
if (html.includes("</head>")) return html.replace("</head>", tag + "</head>");
|
|
3255
3287
|
if (html.includes("</body>")) return html.replace("</body>", tag + "</body>");
|
|
@@ -3266,6 +3298,7 @@ var init_bridge_host = __esm({
|
|
|
3266
3298
|
import_ws = require("ws");
|
|
3267
3299
|
init_dev_server_scanner();
|
|
3268
3300
|
init_bridge_constants();
|
|
3301
|
+
init_cli_version();
|
|
3269
3302
|
init_home_paths();
|
|
3270
3303
|
init_runtime_delivery();
|
|
3271
3304
|
init_agent_host();
|
|
@@ -3557,6 +3590,12 @@ var init_bridge_host = __esm({
|
|
|
3557
3590
|
sim.url = registration.url;
|
|
3558
3591
|
sim.title = registration.title;
|
|
3559
3592
|
sim.userAgent = registration.userAgent;
|
|
3593
|
+
if (typeof registration.kind === "string" && registration.kind.trim()) {
|
|
3594
|
+
sim.kind = registration.kind.trim();
|
|
3595
|
+
}
|
|
3596
|
+
if (registration.meta && typeof registration.meta === "object") {
|
|
3597
|
+
sim.meta = registration.meta;
|
|
3598
|
+
}
|
|
3560
3599
|
if (restored) {
|
|
3561
3600
|
this.broadcastSimAssignments();
|
|
3562
3601
|
this.broadcastSimClientStates();
|
|
@@ -4042,6 +4081,10 @@ var init_bridge_host = __esm({
|
|
|
4042
4081
|
* non-upgrade routes that don't match serve index.html (SPA behavior) so
|
|
4043
4082
|
* electron's webContents can navigate freely inside the runtime. */
|
|
4044
4083
|
handleHttpRequest(req, res) {
|
|
4084
|
+
res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
|
|
4085
|
+
res.setHeader("Cross-Origin-Embedder-Policy", "credentialless");
|
|
4086
|
+
res.setHeader("Cross-Origin-Resource-Policy", "cross-origin");
|
|
4087
|
+
res.setHeader("Document-Policy", "js-profiling");
|
|
4045
4088
|
if (isFetchProxyRequestUrl(req.url)) {
|
|
4046
4089
|
void handleFetchProxyRequest(req, res);
|
|
4047
4090
|
return;
|
|
@@ -4477,7 +4520,9 @@ var init_bridge_host = __esm({
|
|
|
4477
4520
|
lockedBy: lease ? lease.cliLabel || lease.cliIdentityKey : void 0,
|
|
4478
4521
|
lockedByKind: lease ? lease.kind : void 0,
|
|
4479
4522
|
lockExpiresAt: lease ? lease.expiresAt : void 0,
|
|
4480
|
-
userFocused: sim.userFocused || void 0
|
|
4523
|
+
userFocused: sim.userFocused || void 0,
|
|
4524
|
+
kind: sim.kind,
|
|
4525
|
+
meta: sim.meta
|
|
4481
4526
|
};
|
|
4482
4527
|
}
|
|
4483
4528
|
getActiveLease(sim) {
|
|
@@ -5293,6 +5338,18 @@ var COMPAT_REACT_NATIVE_DEEP_STUBS = {
|
|
|
5293
5338
|
runtimeTier: "core",
|
|
5294
5339
|
buildResolvers: ["vite"]
|
|
5295
5340
|
},
|
|
5341
|
+
rendererImplementation: {
|
|
5342
|
+
specifier: "react-native/Libraries/ReactNative/RendererImplementation",
|
|
5343
|
+
stubFile: "rn-libraries/RendererImplementation.ts",
|
|
5344
|
+
runtimeTier: "core",
|
|
5345
|
+
buildResolvers: ["vite"]
|
|
5346
|
+
},
|
|
5347
|
+
rendererProxy: {
|
|
5348
|
+
specifier: "react-native/Libraries/ReactNative/RendererProxy",
|
|
5349
|
+
stubFile: "rn-libraries/RendererProxy.ts",
|
|
5350
|
+
runtimeTier: "core",
|
|
5351
|
+
buildResolvers: ["vite"]
|
|
5352
|
+
},
|
|
5296
5353
|
getDevServer: {
|
|
5297
5354
|
specifier: "react-native/Libraries/Core/Devtools/getDevServer",
|
|
5298
5355
|
stubFile: "rn-libraries/getDevServer.ts",
|
|
@@ -6643,8 +6700,8 @@ ${result}` : result;
|
|
|
6643
6700
|
function stubMissingNativeDeps(appDir) {
|
|
6644
6701
|
const checked = /* @__PURE__ */ new Map();
|
|
6645
6702
|
function packageExists(pkgName) {
|
|
6646
|
-
const
|
|
6647
|
-
if (
|
|
6703
|
+
const cached2 = checked.get(pkgName);
|
|
6704
|
+
if (cached2 !== void 0) return cached2;
|
|
6648
6705
|
let exists = moduleExistsIn(pkgName, sootsimRoot2);
|
|
6649
6706
|
if (!exists && appDir) exists = moduleExistsIn(pkgName, appDir);
|
|
6650
6707
|
checked.set(pkgName, exists);
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.40 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a,b,c,d}from"./chunk-5HNZO5AI.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|