sootsim 0.1.39 → 0.1.41
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 +15 -15
- package/dist-cli/bin.js +16 -15
- package/dist-cli/chunks/{agent-HZP3LUGJ.js → agent-7BJ2ZP22.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-CS6TV5UR.js → agent-wrapper-OXBYRJVT.js} +2 -2
- package/dist-cli/chunks/{assert-WVTX4CNR.js → assert-NZTYFTTT.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-4KQT4TCR.js +2 -0
- package/dist-cli/chunks/beta-3S56PNSS.js +2 -0
- package/dist-cli/chunks/{chunk-NYZGZDHI.js → chunk-2T6UOHPO.js} +1 -1
- package/dist-cli/chunks/chunk-334L67M2.js +2 -0
- package/dist-cli/chunks/{chunk-7J4UIBA5.js → chunk-33R6QMNO.js} +2 -2
- package/dist-cli/chunks/{chunk-XYTDYBXJ.js → chunk-4UA6P3T2.js} +1 -1
- package/dist-cli/chunks/{chunk-GUHXSXNO.js → chunk-5JOYGXCS.js} +2 -2
- package/dist-cli/chunks/chunk-6PLNIOJP.js +17 -0
- package/dist-cli/chunks/{chunk-YGUQSPU6.js → chunk-7YZJHZ7X.js} +1 -1
- package/dist-cli/chunks/{chunk-4YUHJ5FX.js → chunk-ANDSHXLU.js} +2 -2
- package/dist-cli/chunks/chunk-AOYBIMKL.js +4 -0
- package/dist-cli/chunks/chunk-ASSV2FFC.js +1 -0
- package/dist-cli/chunks/chunk-BR6QRN7U.js +11 -0
- package/dist-cli/chunks/{chunk-C6GUAXKO.js → chunk-C4AMFYK3.js} +2 -2
- package/dist-cli/chunks/{chunk-B2SCT4DL.js → chunk-ECIRRKKE.js} +2 -2
- package/dist-cli/chunks/{chunk-FEMOLCB5.js → chunk-FZB4W23Y.js} +2 -2
- package/dist-cli/chunks/chunk-G2QUPNHI.js +2 -0
- package/dist-cli/chunks/chunk-GB3G5LVB.js +108 -0
- package/dist-cli/chunks/{chunk-NJ4WXWKO.js → chunk-GI7FXE7J.js} +2 -2
- package/dist-cli/chunks/{chunk-JXKW62SL.js → chunk-GOFKXREQ.js} +2 -2
- package/dist-cli/chunks/chunk-HAVQS3PI.js +2 -0
- package/dist-cli/chunks/{chunk-223TXYOC.js → chunk-HZVPHAJX.js} +20 -20
- package/dist-cli/chunks/{runtime-YJPWA3XA.js → chunk-I5Y4IECP.js} +3 -3
- package/dist-cli/chunks/{chunk-YHYSOUIJ.js → chunk-IF33CQL4.js} +2 -2
- package/dist-cli/chunks/chunk-IP2MARRU.js +27 -0
- package/dist-cli/chunks/{chunk-ECDPQ6S7.js → chunk-J3JJRXIP.js} +1 -1
- package/dist-cli/chunks/{chunk-2ESCYOZW.js → chunk-LMNB7NYI.js} +2 -2
- package/dist-cli/chunks/{chunk-YUKH7HF6.js → chunk-LX6KS6TL.js} +1 -1
- package/dist-cli/chunks/{chunk-RJQ73DLG.js → chunk-MBGNDWGV.js} +4 -4
- package/dist-cli/chunks/{chunk-WD54RD4K.js → chunk-N7DDNZTO.js} +1 -1
- package/dist-cli/chunks/chunk-NZ5O2OEL.js +56 -0
- package/dist-cli/chunks/{chunk-ZBB7YS6C.js → chunk-OJFHAMXD.js} +2 -2
- package/dist-cli/chunks/{chunk-VLUFTHBB.js → chunk-OPDPXAYA.js} +2 -2
- package/dist-cli/chunks/chunk-OXTFYLZJ.js +4 -0
- package/dist-cli/chunks/{chunk-MGVTLDI3.js → chunk-Q6DGMQ2V.js} +2 -2
- package/dist-cli/chunks/{chunk-UWRBEBML.js → chunk-S3SQITOO.js} +2 -2
- package/dist-cli/chunks/{chunk-P6F636LU.js → chunk-SHHUVGL2.js} +1 -1
- package/dist-cli/chunks/{chunk-RLGCJT2D.js → chunk-SWHWVYZS.js} +1 -1
- package/dist-cli/chunks/{chunk-CBPTHIJV.js → chunk-TBIGAH3T.js} +1 -1
- package/dist-cli/chunks/chunk-UNJTJDZZ.js +62 -0
- package/dist-cli/chunks/chunk-WN6YFWS5.js +117 -0
- package/dist-cli/chunks/{chunk-E5RYQUFB.js → chunk-WZDE344I.js} +3 -3
- package/dist-cli/chunks/{chunk-NF65BNJR.js → chunk-Y2YNXUBT.js} +2 -2
- package/dist-cli/chunks/chunk-YFX2XIR4.js +1 -0
- package/dist-cli/chunks/chunk-YKFRPIVC.js +1 -0
- package/dist-cli/chunks/chunk-ZPURE62G.js +1 -0
- package/dist-cli/chunks/{compat-UMJ2IXUW.js → compat-BA6HDW3Q.js} +5 -5
- package/dist-cli/chunks/{config-YMJK426V.js → config-QQ63IS5P.js} +2 -2
- package/dist-cli/chunks/control-GNJNC524.js +2 -0
- package/dist-cli/chunks/cpu-profile-3DDV2SYN.js +2 -0
- package/dist-cli/chunks/{daemon-LIVCJZR3.js → daemon-RYSVONEV.js} +2 -2
- package/dist-cli/chunks/{debug-EV73WC7H.js → debug-YXE4XZLP.js} +20 -20
- package/dist-cli/chunks/demo-app-registry-3VFEW4NV.js +2 -0
- package/dist-cli/chunks/{detox-NBT5BVX3.js → detox-2UI3EAXA.js} +2 -2
- package/dist-cli/chunks/{device-MMROWQZ3.js → device-UGDJBZKD.js} +2 -2
- package/dist-cli/chunks/diagnose-IRDRYKYZ.js +41 -0
- package/dist-cli/chunks/drivers-EAONIWG3.js +2 -0
- package/dist-cli/chunks/{electron-F5DT7CFY.js → electron-ZCYWIZAE.js} +3 -3
- package/dist-cli/chunks/flow-ECSMFTKS.js +2 -0
- package/dist-cli/chunks/{hints-RODH4XE4.js → hints-OWOBCWJH.js} +2 -2
- package/dist-cli/chunks/{home-paths-PCUMN33Z.js → home-paths-5QMCFTBP.js} +2 -2
- package/dist-cli/chunks/inspect-K4VXPM5J.js +995 -0
- package/dist-cli/chunks/install-YFE7C2NU.js +2 -0
- package/dist-cli/chunks/{install-desktop-ASRNFHZU.js → install-desktop-U3723T63.js} +3 -3
- package/dist-cli/chunks/{keys-DOOCGNTD.js → keys-IFVXJ7C2.js} +2 -2
- package/dist-cli/chunks/{launch-DTVAQMZG.js → launch-NDGFTRZ5.js} +3 -3
- package/dist-cli/chunks/{login-JA6VEDEP.js → login-KEU6RAV3.js} +4 -4
- package/dist-cli/chunks/{logout-H4WFWTPC.js → logout-KNFLP5OQ.js} +2 -2
- package/dist-cli/chunks/{maestro-4TR7U6TS.js → maestro-GBUBLS6L.js} +2 -2
- package/dist-cli/chunks/{preview-GP7XXDW6.js → preview-7OKMPPMN.js} +2 -2
- package/dist-cli/chunks/{profile-3FESGAZD.js → profile-CHKDPGJF.js} +2 -2
- package/dist-cli/chunks/{react-SJD2DQQV.js → react-GYI5VITJ.js} +2 -2
- package/dist-cli/chunks/record-DQR2TEIF.js +45 -0
- package/dist-cli/chunks/runtime-XXNKSGFE.js +2 -0
- package/dist-cli/chunks/runtime-delivery-JCAY2QVQ.js +2 -0
- package/dist-cli/chunks/{screenshot-45SAK7EW.js → screenshot-3T6MNPH7.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-TCY7FBGR.js → screenshot-mode-BUGXY7SQ.js} +2 -2
- package/dist-cli/chunks/{screenshots-KZ364S2O.js → screenshots-EMTXGI2Q.js} +2 -2
- package/dist-cli/chunks/server-46H2M4TF.js +35 -0
- package/dist-cli/chunks/setup-repo-P4LCPAF6.js +2 -0
- package/dist-cli/chunks/{skills-SMXCCJCM.js → skills-2RP2CFPD.js} +2 -2
- package/dist-cli/chunks/start-QFREXALP.js +23 -0
- package/dist-cli/chunks/store-GH77HGEB.js +2 -0
- package/dist-cli/chunks/telemetry-WC5J4TE5.js +2 -0
- package/dist-cli/chunks/{test-ZXTSA5GV.js → test-LI4PGGTE.js} +3 -3
- package/dist-cli/chunks/{three-mode-4Q65J2ZA.js → three-mode-PKINB46T.js} +2 -2
- package/dist-cli/chunks/{timeline-ISEDS6XR.js → timeline-5AREJDL5.js} +2 -2
- package/dist-cli/chunks/upgrade-W2AGIOSC.js +4 -0
- package/dist-cli/chunks/upload-RLS6KTG6.js +2 -0
- package/dist-cli/chunks/web-JM6WDSZQ.js +2 -0
- package/dist-cli/chunks/what-happened-SVCASJKT.js +15 -0
- package/dist-cli/chunks/whoami-5NJ6IPLT.js +2 -0
- 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 +127 -88
- 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 +152 -94
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-3TUCG2BC.js +0 -2
- package/dist-cli/chunks/beta-3SCMB3IN.js +0 -2
- package/dist-cli/chunks/chunk-4LHQRDSN.js +0 -2
- package/dist-cli/chunks/chunk-4UI5OHEO.js +0 -1
- package/dist-cli/chunks/chunk-5L5SZXXG.js +0 -2
- package/dist-cli/chunks/chunk-5RSSCKBF.js +0 -1
- package/dist-cli/chunks/chunk-6TSUQHSC.js +0 -4
- package/dist-cli/chunks/chunk-B3OEHV2C.js +0 -1
- package/dist-cli/chunks/chunk-DSDLGFWH.js +0 -61
- package/dist-cli/chunks/chunk-HWRR23AJ.js +0 -17
- package/dist-cli/chunks/chunk-MIE6NMPJ.js +0 -117
- package/dist-cli/chunks/chunk-NFJDHJHK.js +0 -1
- package/dist-cli/chunks/chunk-OB3TB4AN.js +0 -4
- package/dist-cli/chunks/chunk-SLQ2GTYF.js +0 -27
- package/dist-cli/chunks/chunk-W4QHQT64.js +0 -2
- package/dist-cli/chunks/chunk-WHQWINDB.js +0 -11
- package/dist-cli/chunks/control-DJR3DUAB.js +0 -2
- package/dist-cli/chunks/cpu-profile-67MCPAA2.js +0 -22
- package/dist-cli/chunks/demo-app-registry-NZBZVJ52.js +0 -2
- package/dist-cli/chunks/diagnose-WXOKGBAJ.js +0 -41
- package/dist-cli/chunks/drivers-NSPV5S6T.js +0 -2
- package/dist-cli/chunks/flow-T6DZQWHE.js +0 -2
- package/dist-cli/chunks/inspect-BIMFJFDR.js +0 -1101
- package/dist-cli/chunks/install-5YPVP466.js +0 -2
- package/dist-cli/chunks/record-PQUAMW5K.js +0 -37
- package/dist-cli/chunks/server-S5CRYXXZ.js +0 -35
- package/dist-cli/chunks/setup-repo-TH3GXOP7.js +0 -2
- package/dist-cli/chunks/start-KLSAQM3C.js +0 -23
- package/dist-cli/chunks/store-E2N5NOUS.js +0 -2
- package/dist-cli/chunks/telemetry-RJXVYJSN.js +0 -2
- package/dist-cli/chunks/upload-KB7INQRC.js +0 -2
- package/dist-cli/chunks/what-happened-STY3AOCQ.js +0 -15
- package/dist-cli/chunks/whoami-VKRQOG2U.js +0 -2
package/dist-lib/vite-base.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.41 | (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",
|
|
@@ -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);
|
|
@@ -1247,6 +1247,37 @@ var init_dev_server_scanner = __esm({
|
|
|
1247
1247
|
}
|
|
1248
1248
|
});
|
|
1249
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
|
+
|
|
1250
1281
|
// src/home-paths.ts
|
|
1251
1282
|
function sootsimHomeDir() {
|
|
1252
1283
|
const override = process.env[SOOTSIM_HOME_ENV];
|
|
@@ -1282,7 +1313,7 @@ function configFilePath() {
|
|
|
1282
1313
|
}
|
|
1283
1314
|
function readSharedConfig() {
|
|
1284
1315
|
try {
|
|
1285
|
-
const raw =
|
|
1316
|
+
const raw = import_node_fs3.default.readFileSync(configFilePath(), "utf8");
|
|
1286
1317
|
const parsed = JSON.parse(raw);
|
|
1287
1318
|
return parsed && typeof parsed === "object" ? parsed : {};
|
|
1288
1319
|
} catch {
|
|
@@ -1300,34 +1331,34 @@ function writeSharedConfig(patch) {
|
|
|
1300
1331
|
};
|
|
1301
1332
|
}
|
|
1302
1333
|
const tmp = `${configFilePath()}.tmp`;
|
|
1303
|
-
|
|
1334
|
+
import_node_fs3.default.writeFileSync(tmp, `${JSON.stringify(next, null, 2)}
|
|
1304
1335
|
`, "utf8");
|
|
1305
|
-
|
|
1336
|
+
import_node_fs3.default.renameSync(tmp, configFilePath());
|
|
1306
1337
|
return next;
|
|
1307
1338
|
}
|
|
1308
1339
|
function ensureSootsimHome() {
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
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 });
|
|
1314
1345
|
}
|
|
1315
1346
|
function readActiveRuntime() {
|
|
1316
1347
|
try {
|
|
1317
|
-
const value =
|
|
1348
|
+
const value = import_node_fs3.default.readFileSync(activeRuntimeFile(), "utf8").trim();
|
|
1318
1349
|
return value.length > 0 ? value : null;
|
|
1319
1350
|
} catch {
|
|
1320
1351
|
return null;
|
|
1321
1352
|
}
|
|
1322
1353
|
}
|
|
1323
1354
|
function writeActiveRuntime(version) {
|
|
1324
|
-
|
|
1325
|
-
|
|
1355
|
+
import_node_fs3.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
1356
|
+
import_node_fs3.default.writeFileSync(activeRuntimeFile(), `${version}
|
|
1326
1357
|
`, "utf8");
|
|
1327
1358
|
}
|
|
1328
1359
|
function listInstalledRuntimes() {
|
|
1329
1360
|
try {
|
|
1330
|
-
return
|
|
1361
|
+
return import_node_fs3.default.readdirSync(runtimesDir(), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort(compareSemver);
|
|
1331
1362
|
} catch {
|
|
1332
1363
|
return [];
|
|
1333
1364
|
}
|
|
@@ -1358,17 +1389,17 @@ function activeRuntimeDir() {
|
|
|
1358
1389
|
if (!version) return null;
|
|
1359
1390
|
const dir = runtimeDir(version);
|
|
1360
1391
|
try {
|
|
1361
|
-
if (
|
|
1392
|
+
if (import_node_fs3.default.statSync(dir).isDirectory()) return dir;
|
|
1362
1393
|
} catch {
|
|
1363
1394
|
}
|
|
1364
1395
|
return null;
|
|
1365
1396
|
}
|
|
1366
1397
|
function readDaemonLockfile() {
|
|
1367
1398
|
try {
|
|
1368
|
-
const fd =
|
|
1399
|
+
const fd = import_node_fs3.default.openSync(daemonLockfilePath(), "r");
|
|
1369
1400
|
try {
|
|
1370
1401
|
const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
|
|
1371
|
-
const bytesRead =
|
|
1402
|
+
const bytesRead = import_node_fs3.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
|
|
1372
1403
|
const raw = buf.subarray(0, bytesRead).toString("utf8");
|
|
1373
1404
|
const parsed = JSON.parse(raw);
|
|
1374
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") {
|
|
@@ -1376,7 +1407,7 @@ function readDaemonLockfile() {
|
|
|
1376
1407
|
}
|
|
1377
1408
|
return null;
|
|
1378
1409
|
} finally {
|
|
1379
|
-
|
|
1410
|
+
import_node_fs3.default.closeSync(fd);
|
|
1380
1411
|
}
|
|
1381
1412
|
} catch {
|
|
1382
1413
|
return null;
|
|
@@ -1395,9 +1426,9 @@ function isDaemonLockfileFresh(lock, now = Date.now()) {
|
|
|
1395
1426
|
function writeDaemonLockfile(data) {
|
|
1396
1427
|
ensureSootsimHome();
|
|
1397
1428
|
const tmp = `${daemonLockfilePath()}.tmp`;
|
|
1398
|
-
|
|
1429
|
+
import_node_fs3.default.writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
|
|
1399
1430
|
`, "utf8");
|
|
1400
|
-
|
|
1431
|
+
import_node_fs3.default.renameSync(tmp, daemonLockfilePath());
|
|
1401
1432
|
}
|
|
1402
1433
|
function claimDaemonLockfile(data) {
|
|
1403
1434
|
ensureSootsimHome();
|
|
@@ -1410,15 +1441,15 @@ function claimDaemonLockfile(data) {
|
|
|
1410
1441
|
}
|
|
1411
1442
|
function removeDaemonLockfile() {
|
|
1412
1443
|
try {
|
|
1413
|
-
|
|
1444
|
+
import_node_fs3.default.unlinkSync(daemonLockfilePath());
|
|
1414
1445
|
} catch {
|
|
1415
1446
|
}
|
|
1416
1447
|
}
|
|
1417
|
-
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;
|
|
1418
1449
|
var init_home_paths = __esm({
|
|
1419
1450
|
"src/home-paths.ts"() {
|
|
1420
1451
|
"use strict";
|
|
1421
|
-
|
|
1452
|
+
import_node_fs3 = __toESM(require("node:fs"), 1);
|
|
1422
1453
|
import_node_os2 = require("node:os");
|
|
1423
1454
|
import_node_path4 = __toESM(require("node:path"), 1);
|
|
1424
1455
|
SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
|
|
@@ -1723,7 +1754,7 @@ function loadStore() {
|
|
|
1723
1754
|
const file = storeFile();
|
|
1724
1755
|
let raw;
|
|
1725
1756
|
try {
|
|
1726
|
-
raw =
|
|
1757
|
+
raw = import_node_fs4.default.readFileSync(file, "utf8");
|
|
1727
1758
|
} catch (err) {
|
|
1728
1759
|
if (err.code === "ENOENT") return cloneEmpty();
|
|
1729
1760
|
throw err;
|
|
@@ -1740,7 +1771,7 @@ function loadStore() {
|
|
|
1740
1771
|
} catch (err) {
|
|
1741
1772
|
const quarantine = `${file}.corrupt-${Date.now()}`;
|
|
1742
1773
|
try {
|
|
1743
|
-
|
|
1774
|
+
import_node_fs4.default.renameSync(file, quarantine);
|
|
1744
1775
|
console.warn(
|
|
1745
1776
|
`[sootsim] attached-projects.json was unparseable; quarantined to ${quarantine}. original error: ${err.message}`
|
|
1746
1777
|
);
|
|
@@ -1751,16 +1782,16 @@ function loadStore() {
|
|
|
1751
1782
|
}
|
|
1752
1783
|
function writeStore(store) {
|
|
1753
1784
|
const file = storeFile();
|
|
1754
|
-
|
|
1785
|
+
import_node_fs4.default.mkdirSync(import_node_path5.default.dirname(file), { recursive: true });
|
|
1755
1786
|
const tmp = `${file}.tmp-${process.pid}-${Date.now()}`;
|
|
1756
|
-
const fd =
|
|
1787
|
+
const fd = import_node_fs4.default.openSync(tmp, "w", 384);
|
|
1757
1788
|
try {
|
|
1758
|
-
|
|
1759
|
-
|
|
1789
|
+
import_node_fs4.default.writeFileSync(fd, JSON.stringify(store, null, 2));
|
|
1790
|
+
import_node_fs4.default.fsyncSync(fd);
|
|
1760
1791
|
} finally {
|
|
1761
|
-
|
|
1792
|
+
import_node_fs4.default.closeSync(fd);
|
|
1762
1793
|
}
|
|
1763
|
-
|
|
1794
|
+
import_node_fs4.default.renameSync(tmp, file);
|
|
1764
1795
|
}
|
|
1765
1796
|
function mutateStore(fn) {
|
|
1766
1797
|
const store = loadStore();
|
|
@@ -1940,7 +1971,7 @@ async function seedFromDemoAppRegistry() {
|
|
|
1940
1971
|
const apps = APPS2;
|
|
1941
1972
|
mutateStore((store) => {
|
|
1942
1973
|
for (const app of apps) {
|
|
1943
|
-
if (!
|
|
1974
|
+
if (!import_node_fs4.default.existsSync(app.dir)) continue;
|
|
1944
1975
|
const cwd = import_node_path5.default.resolve(app.dir);
|
|
1945
1976
|
const id = projectIdForCwd(cwd);
|
|
1946
1977
|
if (store.attachedProjects.some((p) => p.id === id)) continue;
|
|
@@ -1962,12 +1993,12 @@ async function seedFromDemoAppRegistry() {
|
|
|
1962
1993
|
}
|
|
1963
1994
|
});
|
|
1964
1995
|
}
|
|
1965
|
-
var import_node_crypto,
|
|
1996
|
+
var import_node_crypto, import_node_fs4, import_node_path5, overrideDir, COST_HISTORY_MAX_AGE_MS;
|
|
1966
1997
|
var init_attached_projects = __esm({
|
|
1967
1998
|
"src/attached-projects.ts"() {
|
|
1968
1999
|
"use strict";
|
|
1969
2000
|
import_node_crypto = require("node:crypto");
|
|
1970
|
-
|
|
2001
|
+
import_node_fs4 = __toESM(require("node:fs"), 1);
|
|
1971
2002
|
import_node_path5 = __toESM(require("node:path"), 1);
|
|
1972
2003
|
init_home_paths();
|
|
1973
2004
|
overrideDir = null;
|
|
@@ -1996,7 +2027,7 @@ function pidIsAlive(pid, sessionId) {
|
|
|
1996
2027
|
return false;
|
|
1997
2028
|
}
|
|
1998
2029
|
if (sessionId) {
|
|
1999
|
-
if (!
|
|
2030
|
+
if (!import_node_fs5.default.existsSync(sessionDir(sessionId))) return false;
|
|
2000
2031
|
}
|
|
2001
2032
|
return true;
|
|
2002
2033
|
}
|
|
@@ -2012,7 +2043,7 @@ function resolveSootsimInvocation() {
|
|
|
2012
2043
|
import_node_path6.default.join(resourcesPath, "bin", `sootsim-${process.platform}-${process.arch}`)
|
|
2013
2044
|
];
|
|
2014
2045
|
for (const c of candidates) {
|
|
2015
|
-
if (
|
|
2046
|
+
if (import_node_fs5.default.existsSync(c)) return { cmd: c, prefixArgs: [] };
|
|
2016
2047
|
}
|
|
2017
2048
|
}
|
|
2018
2049
|
}
|
|
@@ -2036,14 +2067,14 @@ function tryWorkspaceSootsim() {
|
|
|
2036
2067
|
if (!sootsimDir) return null;
|
|
2037
2068
|
const binaryName = `sootsim-${process.platform}-${process.arch}`;
|
|
2038
2069
|
const distBinary = import_node_path6.default.join(sootsimDir, "dist-bin", binaryName);
|
|
2039
|
-
if (
|
|
2070
|
+
if (import_node_fs5.default.existsSync(distBinary)) return { cmd: distBinary, prefixArgs: [] };
|
|
2040
2071
|
const distBin = import_node_path6.default.join(sootsimDir, "dist-cli", "bin.js");
|
|
2041
|
-
if (
|
|
2072
|
+
if (import_node_fs5.default.existsSync(distBin)) {
|
|
2042
2073
|
try {
|
|
2043
2074
|
const src = import_node_path6.default.join(sootsimDir, "cli", "commands", "agent-wrapper.ts");
|
|
2044
|
-
if (
|
|
2045
|
-
const srcMtime =
|
|
2046
|
-
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;
|
|
2047
2078
|
if (buildMtime < srcMtime) {
|
|
2048
2079
|
console.warn(
|
|
2049
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).`
|
|
@@ -2071,8 +2102,8 @@ function resolveSootsimPackageDir() {
|
|
|
2071
2102
|
for (let i = 0; i < 8; i++) {
|
|
2072
2103
|
const pkg = import_node_path6.default.join(cur, "package.json");
|
|
2073
2104
|
try {
|
|
2074
|
-
if (
|
|
2075
|
-
const parsed = JSON.parse(
|
|
2105
|
+
if (import_node_fs5.default.existsSync(pkg)) {
|
|
2106
|
+
const parsed = JSON.parse(import_node_fs5.default.readFileSync(pkg, "utf8"));
|
|
2076
2107
|
if (parsed.name === "sootsim") return cur;
|
|
2077
2108
|
}
|
|
2078
2109
|
} catch {
|
|
@@ -2094,9 +2125,9 @@ function fileFromImportMeta() {
|
|
|
2094
2125
|
}
|
|
2095
2126
|
async function withStartLock(projectId, provider, fn) {
|
|
2096
2127
|
const lockDir = import_node_path6.default.join(getUserDataDir(), "locks");
|
|
2097
|
-
|
|
2128
|
+
import_node_fs5.default.mkdirSync(lockDir, { recursive: true });
|
|
2098
2129
|
try {
|
|
2099
|
-
|
|
2130
|
+
import_node_fs5.default.chmodSync(lockDir, 448);
|
|
2100
2131
|
} catch {
|
|
2101
2132
|
}
|
|
2102
2133
|
const lockPath = import_node_path6.default.join(lockDir, `start-${projectId}-${provider}.lock`);
|
|
@@ -2104,17 +2135,17 @@ async function withStartLock(projectId, provider, fn) {
|
|
|
2104
2135
|
let fd = null;
|
|
2105
2136
|
while (fd === null) {
|
|
2106
2137
|
try {
|
|
2107
|
-
fd =
|
|
2138
|
+
fd = import_node_fs5.default.openSync(
|
|
2108
2139
|
lockPath,
|
|
2109
|
-
|
|
2140
|
+
import_node_fs5.constants.O_WRONLY | import_node_fs5.constants.O_CREAT | import_node_fs5.constants.O_EXCL,
|
|
2110
2141
|
384
|
|
2111
2142
|
);
|
|
2112
2143
|
} catch (err) {
|
|
2113
2144
|
if (err.code !== "EEXIST") throw err;
|
|
2114
2145
|
try {
|
|
2115
|
-
const stale = Number(
|
|
2146
|
+
const stale = Number(import_node_fs5.default.readFileSync(lockPath, "utf8").trim());
|
|
2116
2147
|
if (stale && !isProcessAlive(stale)) {
|
|
2117
|
-
|
|
2148
|
+
import_node_fs5.default.unlinkSync(lockPath);
|
|
2118
2149
|
continue;
|
|
2119
2150
|
}
|
|
2120
2151
|
} catch {
|
|
@@ -2128,15 +2159,15 @@ async function withStartLock(projectId, provider, fn) {
|
|
|
2128
2159
|
}
|
|
2129
2160
|
}
|
|
2130
2161
|
try {
|
|
2131
|
-
|
|
2162
|
+
import_node_fs5.default.writeFileSync(fd, String(process.pid));
|
|
2132
2163
|
return await fn();
|
|
2133
2164
|
} finally {
|
|
2134
2165
|
try {
|
|
2135
|
-
|
|
2166
|
+
import_node_fs5.default.closeSync(fd);
|
|
2136
2167
|
} catch {
|
|
2137
2168
|
}
|
|
2138
2169
|
try {
|
|
2139
|
-
|
|
2170
|
+
import_node_fs5.default.unlinkSync(lockPath);
|
|
2140
2171
|
} catch {
|
|
2141
2172
|
}
|
|
2142
2173
|
}
|
|
@@ -2151,24 +2182,24 @@ function isProcessAlive(pid) {
|
|
|
2151
2182
|
}
|
|
2152
2183
|
function mkfifoSync(p) {
|
|
2153
2184
|
const parent = import_node_path6.default.dirname(p);
|
|
2154
|
-
|
|
2185
|
+
import_node_fs5.default.mkdirSync(parent, { recursive: true });
|
|
2155
2186
|
try {
|
|
2156
|
-
|
|
2187
|
+
import_node_fs5.default.chmodSync(parent, 448);
|
|
2157
2188
|
} catch {
|
|
2158
2189
|
}
|
|
2159
|
-
if (
|
|
2190
|
+
if (import_node_fs5.default.existsSync(p)) {
|
|
2160
2191
|
try {
|
|
2161
|
-
const stat =
|
|
2192
|
+
const stat = import_node_fs5.default.statSync(p);
|
|
2162
2193
|
if (stat.isFIFO()) {
|
|
2163
2194
|
try {
|
|
2164
|
-
|
|
2195
|
+
import_node_fs5.default.chmodSync(p, 384);
|
|
2165
2196
|
} catch {
|
|
2166
2197
|
}
|
|
2167
2198
|
return;
|
|
2168
2199
|
}
|
|
2169
|
-
|
|
2200
|
+
import_node_fs5.default.unlinkSync(p);
|
|
2170
2201
|
} catch {
|
|
2171
|
-
|
|
2202
|
+
import_node_fs5.default.unlinkSync(p);
|
|
2172
2203
|
}
|
|
2173
2204
|
}
|
|
2174
2205
|
const result = (0, import_node_child_process.spawnSync)("mkfifo", ["-m", "600", p]);
|
|
@@ -2209,9 +2240,9 @@ async function startSession(opts) {
|
|
|
2209
2240
|
mkfifoSync(promptIn);
|
|
2210
2241
|
mkfifoSync(eventsOut);
|
|
2211
2242
|
const transcriptDir = import_node_path6.default.dirname(transcript);
|
|
2212
|
-
|
|
2243
|
+
import_node_fs5.default.mkdirSync(transcriptDir, { recursive: true });
|
|
2213
2244
|
try {
|
|
2214
|
-
|
|
2245
|
+
import_node_fs5.default.chmodSync(transcriptDir, 448);
|
|
2215
2246
|
} catch {
|
|
2216
2247
|
}
|
|
2217
2248
|
const { cmd, prefixArgs } = resolveSootsimInvocation();
|
|
@@ -2262,7 +2293,7 @@ async function startSession(opts) {
|
|
|
2262
2293
|
}
|
|
2263
2294
|
}
|
|
2264
2295
|
try {
|
|
2265
|
-
|
|
2296
|
+
import_node_fs5.default.rmSync(sessionDir(session.id), { recursive: true, force: true });
|
|
2266
2297
|
} catch {
|
|
2267
2298
|
}
|
|
2268
2299
|
updateSessionStatus(session.id, { status: "ended" });
|
|
@@ -2290,18 +2321,18 @@ async function sendPrompt(sessionId, prompt) {
|
|
|
2290
2321
|
);
|
|
2291
2322
|
}
|
|
2292
2323
|
const fifo = promptFifoPath(sessionId);
|
|
2293
|
-
if (!
|
|
2324
|
+
if (!import_node_fs5.default.existsSync(fifo)) {
|
|
2294
2325
|
throw new AgentSessionError("NO_FIFO", `prompt FIFO missing: ${fifo}`);
|
|
2295
2326
|
}
|
|
2296
|
-
const fd =
|
|
2327
|
+
const fd = import_node_fs5.default.openSync(fifo, import_node_fs5.constants.O_WRONLY);
|
|
2297
2328
|
try {
|
|
2298
2329
|
const wireText = encodeAgentPromptEnvelope(prompt);
|
|
2299
2330
|
if (!wireText) {
|
|
2300
2331
|
throw new AgentSessionError("EMPTY_PROMPT", "prompt text is empty");
|
|
2301
2332
|
}
|
|
2302
|
-
|
|
2333
|
+
import_node_fs5.default.writeSync(fd, wireText + "\n");
|
|
2303
2334
|
} finally {
|
|
2304
|
-
|
|
2335
|
+
import_node_fs5.default.closeSync(fd);
|
|
2305
2336
|
}
|
|
2306
2337
|
updateSessionStatus(sessionId, {
|
|
2307
2338
|
lastPrompt: prompt.displayText ?? prompt.text,
|
|
@@ -2323,7 +2354,7 @@ async function endSession(sessionId) {
|
|
|
2323
2354
|
const base = getUserDataDir();
|
|
2324
2355
|
if (dir.startsWith(base)) {
|
|
2325
2356
|
try {
|
|
2326
|
-
|
|
2357
|
+
import_node_fs5.default.rmSync(dir, { recursive: true, force: true });
|
|
2327
2358
|
} catch {
|
|
2328
2359
|
}
|
|
2329
2360
|
}
|
|
@@ -2331,11 +2362,11 @@ async function endSession(sessionId) {
|
|
|
2331
2362
|
}
|
|
2332
2363
|
function subscribeEvents(sessionId, onEvent) {
|
|
2333
2364
|
const fifo = eventsFifoPath(sessionId);
|
|
2334
|
-
if (!
|
|
2365
|
+
if (!import_node_fs5.default.existsSync(fifo)) {
|
|
2335
2366
|
throw new AgentSessionError("NO_FIFO", `events FIFO missing: ${fifo}`);
|
|
2336
2367
|
}
|
|
2337
|
-
const fd =
|
|
2338
|
-
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 });
|
|
2339
2370
|
const rl = import_node_readline.default.createInterface({ input: stream, crlfDelay: Infinity });
|
|
2340
2371
|
rl.on("line", (line) => {
|
|
2341
2372
|
const event = parseAgentEventLine(line);
|
|
@@ -2356,7 +2387,7 @@ function subscribeEvents(sessionId, onEvent) {
|
|
|
2356
2387
|
};
|
|
2357
2388
|
}
|
|
2358
2389
|
async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
2359
|
-
const fd =
|
|
2390
|
+
const fd = import_node_fs5.default.openSync(fifo, import_node_fs5.constants.O_RDWR | import_node_fs5.constants.O_NONBLOCK);
|
|
2360
2391
|
const buf = Buffer.alloc(8192);
|
|
2361
2392
|
let leftover = "";
|
|
2362
2393
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -2364,7 +2395,7 @@ async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
|
2364
2395
|
while (Date.now() < deadline) {
|
|
2365
2396
|
let n = 0;
|
|
2366
2397
|
try {
|
|
2367
|
-
n =
|
|
2398
|
+
n = import_node_fs5.default.readSync(fd, buf, 0, buf.length, null);
|
|
2368
2399
|
} catch (err) {
|
|
2369
2400
|
if (err.code !== "EAGAIN") throw err;
|
|
2370
2401
|
n = 0;
|
|
@@ -2384,16 +2415,16 @@ async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
|
2384
2415
|
}
|
|
2385
2416
|
return null;
|
|
2386
2417
|
} finally {
|
|
2387
|
-
|
|
2418
|
+
import_node_fs5.default.closeSync(fd);
|
|
2388
2419
|
}
|
|
2389
2420
|
}
|
|
2390
|
-
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;
|
|
2391
2422
|
var init_agent_sessions = __esm({
|
|
2392
2423
|
"src/agent-sessions.ts"() {
|
|
2393
2424
|
"use strict";
|
|
2394
2425
|
import_node_child_process = require("node:child_process");
|
|
2395
2426
|
import_node_crypto2 = require("node:crypto");
|
|
2396
|
-
|
|
2427
|
+
import_node_fs5 = __toESM(require("node:fs"), 1);
|
|
2397
2428
|
import_node_path6 = __toESM(require("node:path"), 1);
|
|
2398
2429
|
import_node_readline = __toESM(require("node:readline"), 1);
|
|
2399
2430
|
init_agent_events();
|
|
@@ -2423,11 +2454,11 @@ function mapFrameworkToProjectFramework(fw) {
|
|
|
2423
2454
|
if (fw === "one" || fw === "vxrn") return "one";
|
|
2424
2455
|
return "unknown";
|
|
2425
2456
|
}
|
|
2426
|
-
var
|
|
2457
|
+
var import_node_fs6, import_node_path7, WS_OPEN, AgentHost;
|
|
2427
2458
|
var init_agent_host = __esm({
|
|
2428
2459
|
"src/host/agent-host.ts"() {
|
|
2429
2460
|
"use strict";
|
|
2430
|
-
|
|
2461
|
+
import_node_fs6 = __toESM(require("node:fs"), 1);
|
|
2431
2462
|
import_node_path7 = __toESM(require("node:path"), 1);
|
|
2432
2463
|
init_dev_server_scanner();
|
|
2433
2464
|
init_agent_sessions();
|
|
@@ -2601,10 +2632,10 @@ var init_agent_host = __esm({
|
|
|
2601
2632
|
}
|
|
2602
2633
|
getTranscript(sessionId) {
|
|
2603
2634
|
const p = transcriptPath(sessionId);
|
|
2604
|
-
if (!
|
|
2635
|
+
if (!import_node_fs6.default.existsSync(p)) {
|
|
2605
2636
|
return { error: "transcript not found", code: "NO_TRANSCRIPT" };
|
|
2606
2637
|
}
|
|
2607
|
-
return
|
|
2638
|
+
return import_node_fs6.default.readFileSync(p, "utf8");
|
|
2608
2639
|
}
|
|
2609
2640
|
getPaths() {
|
|
2610
2641
|
const dir = getUserDataDir();
|
|
@@ -3146,9 +3177,7 @@ function buildChromiumUrlCommand(url, options = {}) {
|
|
|
3146
3177
|
throw new Error("browser launch requires Chrome, Chromium, Edge, Brave, or Arc");
|
|
3147
3178
|
}
|
|
3148
3179
|
const args = [];
|
|
3149
|
-
if (options.
|
|
3150
|
-
args.push("--headless=new");
|
|
3151
|
-
} else if (options.newWindow !== false) {
|
|
3180
|
+
if (options.newWindow !== false) {
|
|
3152
3181
|
args.push("--new-window");
|
|
3153
3182
|
}
|
|
3154
3183
|
args.push(url);
|
|
@@ -3242,7 +3271,7 @@ function shouldAcquireLease(msg) {
|
|
|
3242
3271
|
if (msg.readOnly === true) return false;
|
|
3243
3272
|
return WRITE_COMMAND_TYPES.has(msg.type);
|
|
3244
3273
|
}
|
|
3245
|
-
function injectSharedConfigIntoHtml(data) {
|
|
3274
|
+
function injectSharedConfigIntoHtml(data, bridgePort, sootbeanOrigin) {
|
|
3246
3275
|
let payload;
|
|
3247
3276
|
try {
|
|
3248
3277
|
const cfg = readSharedConfig();
|
|
@@ -3250,7 +3279,9 @@ function injectSharedConfigIntoHtml(data) {
|
|
|
3250
3279
|
} catch {
|
|
3251
3280
|
payload = "{}";
|
|
3252
3281
|
}
|
|
3253
|
-
const
|
|
3282
|
+
const bridgePortTag = bridgePort > 0 ? `window.__sootsimBridgePort=${bridgePort};` : "";
|
|
3283
|
+
const sootbeanOriginTag = sootbeanOrigin ? `window.__sootsimSootbeanOrigin=${JSON.stringify(sootbeanOrigin)};` : "";
|
|
3284
|
+
const tag = `<script>window.__sootsimSharedConfig=${payload};` + bridgePortTag + sootbeanOriginTag + `window.__sootsimCliVersion=${JSON.stringify(getCliVersion())};</script>`;
|
|
3254
3285
|
const html = data.toString("utf8");
|
|
3255
3286
|
if (html.includes("</head>")) return html.replace("</head>", tag + "</head>");
|
|
3256
3287
|
if (html.includes("</body>")) return html.replace("</body>", tag + "</body>");
|
|
@@ -3267,6 +3298,7 @@ var init_bridge_host = __esm({
|
|
|
3267
3298
|
import_ws = require("ws");
|
|
3268
3299
|
init_dev_server_scanner();
|
|
3269
3300
|
init_bridge_constants();
|
|
3301
|
+
init_cli_version();
|
|
3270
3302
|
init_home_paths();
|
|
3271
3303
|
init_runtime_delivery();
|
|
3272
3304
|
init_agent_host();
|
|
@@ -3329,6 +3361,7 @@ var init_bridge_host = __esm({
|
|
|
3329
3361
|
preferredPort;
|
|
3330
3362
|
portFallbackCount;
|
|
3331
3363
|
shouldWriteLockfile;
|
|
3364
|
+
sootbeanOrigin = null;
|
|
3332
3365
|
effectivePort = 0;
|
|
3333
3366
|
startedAt = 0;
|
|
3334
3367
|
heartbeatTimer = null;
|
|
@@ -3361,6 +3394,7 @@ var init_bridge_host = __esm({
|
|
|
3361
3394
|
this.portFallbackCount = Math.max(1, opts.portFallbackCount ?? 10);
|
|
3362
3395
|
this.openUrlHandler = opts.openUrl;
|
|
3363
3396
|
this.agentHost = new AgentHost({ getExcludePorts: opts.agentScanExcludes });
|
|
3397
|
+
this.sootbeanOrigin = opts.sootbeanOrigin?.replace(/\/$/, "") || null;
|
|
3364
3398
|
}
|
|
3365
3399
|
/** expose the agent host so tests and embedders can inspect state or
|
|
3366
3400
|
* inject behavior. not part of the public WS protocol. */
|
|
@@ -3558,6 +3592,12 @@ var init_bridge_host = __esm({
|
|
|
3558
3592
|
sim.url = registration.url;
|
|
3559
3593
|
sim.title = registration.title;
|
|
3560
3594
|
sim.userAgent = registration.userAgent;
|
|
3595
|
+
if (typeof registration.kind === "string" && registration.kind.trim()) {
|
|
3596
|
+
sim.kind = registration.kind.trim();
|
|
3597
|
+
}
|
|
3598
|
+
if (registration.meta && typeof registration.meta === "object") {
|
|
3599
|
+
sim.meta = registration.meta;
|
|
3600
|
+
}
|
|
3561
3601
|
if (restored) {
|
|
3562
3602
|
this.broadcastSimAssignments();
|
|
3563
3603
|
this.broadcastSimClientStates();
|
|
@@ -4237,7 +4277,9 @@ var init_bridge_host = __esm({
|
|
|
4237
4277
|
res.end();
|
|
4238
4278
|
return;
|
|
4239
4279
|
}
|
|
4240
|
-
res.end(
|
|
4280
|
+
res.end(
|
|
4281
|
+
injectSharedConfigIntoHtml(data, this.effectivePort, this.sootbeanOrigin)
|
|
4282
|
+
);
|
|
4241
4283
|
});
|
|
4242
4284
|
return;
|
|
4243
4285
|
}
|
|
@@ -4260,7 +4302,9 @@ var init_bridge_host = __esm({
|
|
|
4260
4302
|
}
|
|
4261
4303
|
return;
|
|
4262
4304
|
}
|
|
4263
|
-
res.end(
|
|
4305
|
+
res.end(
|
|
4306
|
+
injectSharedConfigIntoHtml(data, this.effectivePort, this.sootbeanOrigin)
|
|
4307
|
+
);
|
|
4264
4308
|
});
|
|
4265
4309
|
return;
|
|
4266
4310
|
}
|
|
@@ -4482,7 +4526,9 @@ var init_bridge_host = __esm({
|
|
|
4482
4526
|
lockedBy: lease ? lease.cliLabel || lease.cliIdentityKey : void 0,
|
|
4483
4527
|
lockedByKind: lease ? lease.kind : void 0,
|
|
4484
4528
|
lockExpiresAt: lease ? lease.expiresAt : void 0,
|
|
4485
|
-
userFocused: sim.userFocused || void 0
|
|
4529
|
+
userFocused: sim.userFocused || void 0,
|
|
4530
|
+
kind: sim.kind,
|
|
4531
|
+
meta: sim.meta
|
|
4486
4532
|
};
|
|
4487
4533
|
}
|
|
4488
4534
|
getActiveLease(sim) {
|
|
@@ -5298,6 +5344,18 @@ var COMPAT_REACT_NATIVE_DEEP_STUBS = {
|
|
|
5298
5344
|
runtimeTier: "core",
|
|
5299
5345
|
buildResolvers: ["vite"]
|
|
5300
5346
|
},
|
|
5347
|
+
rendererImplementation: {
|
|
5348
|
+
specifier: "react-native/Libraries/ReactNative/RendererImplementation",
|
|
5349
|
+
stubFile: "rn-libraries/RendererImplementation.ts",
|
|
5350
|
+
runtimeTier: "core",
|
|
5351
|
+
buildResolvers: ["vite"]
|
|
5352
|
+
},
|
|
5353
|
+
rendererProxy: {
|
|
5354
|
+
specifier: "react-native/Libraries/ReactNative/RendererProxy",
|
|
5355
|
+
stubFile: "rn-libraries/RendererProxy.ts",
|
|
5356
|
+
runtimeTier: "core",
|
|
5357
|
+
buildResolvers: ["vite"]
|
|
5358
|
+
},
|
|
5301
5359
|
getDevServer: {
|
|
5302
5360
|
specifier: "react-native/Libraries/Core/Devtools/getDevServer",
|
|
5303
5361
|
stubFile: "rn-libraries/getDevServer.ts",
|
|
@@ -6648,8 +6706,8 @@ ${result}` : result;
|
|
|
6648
6706
|
function stubMissingNativeDeps(appDir) {
|
|
6649
6707
|
const checked = /* @__PURE__ */ new Map();
|
|
6650
6708
|
function packageExists(pkgName) {
|
|
6651
|
-
const
|
|
6652
|
-
if (
|
|
6709
|
+
const cached2 = checked.get(pkgName);
|
|
6710
|
+
if (cached2 !== void 0) return cached2;
|
|
6653
6711
|
let exists = moduleExistsIn(pkgName, sootsimRoot2);
|
|
6654
6712
|
if (!exists && appDir) exists = moduleExistsIn(pkgName, appDir);
|
|
6655
6713
|
checked.set(pkgName, exists);
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.41 | (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.39 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a,b,c,d}from"./chunk-E5RYQUFB.js";import"./chunk-HWRR23AJ.js";import"./chunk-RLGCJT2D.js";import"./chunk-B3OEHV2C.js";import"./chunk-ECDPQ6S7.js";import"./chunk-WD54RD4K.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.39 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|