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
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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 __defProp = Object.defineProperty;
|
|
@@ -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 __defProp = Object.defineProperty;
|
|
@@ -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 __defProp = Object.defineProperty;
|
package/dist-lib/config.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 __defProp = Object.defineProperty;
|
|
@@ -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 __defProp = Object.defineProperty;
|
package/dist-lib/home-paths.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;
|
|
@@ -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;
|
|
@@ -856,6 +856,7 @@ var APPS = [
|
|
|
856
856
|
// scripts/dev-server-scanner.ts
|
|
857
857
|
var execP = (0, import_util.promisify)(import_child_process.exec);
|
|
858
858
|
var TIMEOUT_MS = 250;
|
|
859
|
+
var MANIFEST_TIMEOUT_MS = 1500;
|
|
859
860
|
var TCP_GATE_MS = 120;
|
|
860
861
|
function tcpPing(port, timeout = TCP_GATE_MS) {
|
|
861
862
|
return new Promise((resolve2) => {
|
|
@@ -971,8 +972,8 @@ async function discoverListeningProcesses(excludePorts = []) {
|
|
|
971
972
|
var cwdByPid = /* @__PURE__ */ new Map();
|
|
972
973
|
async function resolveProcessCwd(pid) {
|
|
973
974
|
if (pid <= 0) return null;
|
|
974
|
-
const
|
|
975
|
-
if (
|
|
975
|
+
const cached2 = cwdByPid.get(pid);
|
|
976
|
+
if (cached2) return cached2;
|
|
976
977
|
try {
|
|
977
978
|
const { stdout } = await execP(`lsof -p ${pid} -a -d cwd -Fn 2>/dev/null`, {
|
|
978
979
|
encoding: "utf8",
|
|
@@ -1061,7 +1062,7 @@ async function probePort(port, buildIconProxyUrl) {
|
|
|
1061
1062
|
knownNonPatched.has(port) ? Promise.resolve(null) : httpGet(port, "/__soot/"),
|
|
1062
1063
|
httpGet(port, "/status"),
|
|
1063
1064
|
httpGet(port, onePath, "HEAD"),
|
|
1064
|
-
knownOne.has(port) ? Promise.resolve(null) : httpGet(port, "/", "GET",
|
|
1065
|
+
knownOne.has(port) ? Promise.resolve(null) : httpGet(port, "/", "GET", MANIFEST_TIMEOUT_MS, { "expo-platform": "ios" }),
|
|
1065
1066
|
knownNonExpo.has(port) ? Promise.resolve(null) : httpGet(port, "/_expo/status")
|
|
1066
1067
|
]);
|
|
1067
1068
|
if (expoRes && expoRes.statusCode === 200) {
|
|
@@ -1180,12 +1181,12 @@ async function scanDevServers(opts = {}) {
|
|
|
1180
1181
|
const results = [];
|
|
1181
1182
|
const toProbe = [];
|
|
1182
1183
|
for (const { port, pid } of processes) {
|
|
1183
|
-
const
|
|
1184
|
-
if (
|
|
1185
|
-
if (
|
|
1184
|
+
const cached2 = portCache.get(port);
|
|
1185
|
+
if (cached2 && __shouldReuseScannerCacheEntry(cached2, pid)) {
|
|
1186
|
+
if (cached2.result) results.push(cached2.result);
|
|
1186
1187
|
continue;
|
|
1187
1188
|
}
|
|
1188
|
-
if (
|
|
1189
|
+
if (cached2 && cached2.pid !== pid) {
|
|
1189
1190
|
knownNonPatched.delete(port);
|
|
1190
1191
|
knownNonExpo.delete(port);
|
|
1191
1192
|
knownOne.delete(port);
|
|
@@ -1225,8 +1226,33 @@ async function scanDevServers(opts = {}) {
|
|
|
1225
1226
|
// src/bridge-constants.ts
|
|
1226
1227
|
var DEFAULT_SOOTSIM_BRIDGE_PORT = 7668;
|
|
1227
1228
|
|
|
1229
|
+
// src/cli-version.ts
|
|
1230
|
+
var import_node_fs2 = require("node:fs");
|
|
1231
|
+
var import_node_url = require("node:url");
|
|
1232
|
+
var import_meta = {};
|
|
1233
|
+
var cached = null;
|
|
1234
|
+
function getCliVersion() {
|
|
1235
|
+
if (cached != null) return cached;
|
|
1236
|
+
const candidates = [
|
|
1237
|
+
() => (0, import_node_url.fileURLToPath)(import_meta.resolve("sootsim/package.json")),
|
|
1238
|
+
() => (0, import_node_url.fileURLToPath)(new URL("../package.json", __sootsim_import_meta_url))
|
|
1239
|
+
];
|
|
1240
|
+
for (const resolve2 of candidates) {
|
|
1241
|
+
try {
|
|
1242
|
+
const version = JSON.parse((0, import_node_fs2.readFileSync)(resolve2(), "utf8")).version;
|
|
1243
|
+
if (typeof version === "string" && version) {
|
|
1244
|
+
cached = version;
|
|
1245
|
+
return cached;
|
|
1246
|
+
}
|
|
1247
|
+
} catch {
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
cached = "0.0.0";
|
|
1251
|
+
return cached;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1228
1254
|
// src/home-paths.ts
|
|
1229
|
-
var
|
|
1255
|
+
var import_node_fs3 = __toESM(require("node:fs"), 1);
|
|
1230
1256
|
var import_node_os2 = require("node:os");
|
|
1231
1257
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
1232
1258
|
var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
|
|
@@ -1268,7 +1294,7 @@ function configFilePath() {
|
|
|
1268
1294
|
}
|
|
1269
1295
|
function readSharedConfig() {
|
|
1270
1296
|
try {
|
|
1271
|
-
const raw =
|
|
1297
|
+
const raw = import_node_fs3.default.readFileSync(configFilePath(), "utf8");
|
|
1272
1298
|
const parsed = JSON.parse(raw);
|
|
1273
1299
|
return parsed && typeof parsed === "object" ? parsed : {};
|
|
1274
1300
|
} catch {
|
|
@@ -1286,34 +1312,34 @@ function writeSharedConfig(patch) {
|
|
|
1286
1312
|
};
|
|
1287
1313
|
}
|
|
1288
1314
|
const tmp = `${configFilePath()}.tmp`;
|
|
1289
|
-
|
|
1315
|
+
import_node_fs3.default.writeFileSync(tmp, `${JSON.stringify(next, null, 2)}
|
|
1290
1316
|
`, "utf8");
|
|
1291
|
-
|
|
1317
|
+
import_node_fs3.default.renameSync(tmp, configFilePath());
|
|
1292
1318
|
return next;
|
|
1293
1319
|
}
|
|
1294
1320
|
function ensureSootsimHome() {
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1321
|
+
import_node_fs3.default.mkdirSync(sootsimHomeDir(), { recursive: true });
|
|
1322
|
+
import_node_fs3.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
1323
|
+
import_node_fs3.default.mkdirSync(electronDir(), { recursive: true });
|
|
1324
|
+
import_node_fs3.default.mkdirSync(profilesDir(), { recursive: true });
|
|
1325
|
+
import_node_fs3.default.mkdirSync(cacheDir(), { recursive: true });
|
|
1300
1326
|
}
|
|
1301
1327
|
function readActiveRuntime() {
|
|
1302
1328
|
try {
|
|
1303
|
-
const value =
|
|
1329
|
+
const value = import_node_fs3.default.readFileSync(activeRuntimeFile(), "utf8").trim();
|
|
1304
1330
|
return value.length > 0 ? value : null;
|
|
1305
1331
|
} catch {
|
|
1306
1332
|
return null;
|
|
1307
1333
|
}
|
|
1308
1334
|
}
|
|
1309
1335
|
function writeActiveRuntime(version) {
|
|
1310
|
-
|
|
1311
|
-
|
|
1336
|
+
import_node_fs3.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
1337
|
+
import_node_fs3.default.writeFileSync(activeRuntimeFile(), `${version}
|
|
1312
1338
|
`, "utf8");
|
|
1313
1339
|
}
|
|
1314
1340
|
function listInstalledRuntimes() {
|
|
1315
1341
|
try {
|
|
1316
|
-
return
|
|
1342
|
+
return import_node_fs3.default.readdirSync(runtimesDir(), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort(compareSemver);
|
|
1317
1343
|
} catch {
|
|
1318
1344
|
return [];
|
|
1319
1345
|
}
|
|
@@ -1344,7 +1370,7 @@ function activeRuntimeDir() {
|
|
|
1344
1370
|
if (!version) return null;
|
|
1345
1371
|
const dir = runtimeDir(version);
|
|
1346
1372
|
try {
|
|
1347
|
-
if (
|
|
1373
|
+
if (import_node_fs3.default.statSync(dir).isDirectory()) return dir;
|
|
1348
1374
|
} catch {
|
|
1349
1375
|
}
|
|
1350
1376
|
return null;
|
|
@@ -1352,10 +1378,10 @@ function activeRuntimeDir() {
|
|
|
1352
1378
|
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
1353
1379
|
function readDaemonLockfile() {
|
|
1354
1380
|
try {
|
|
1355
|
-
const fd =
|
|
1381
|
+
const fd = import_node_fs3.default.openSync(daemonLockfilePath(), "r");
|
|
1356
1382
|
try {
|
|
1357
1383
|
const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
|
|
1358
|
-
const bytesRead =
|
|
1384
|
+
const bytesRead = import_node_fs3.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
|
|
1359
1385
|
const raw = buf.subarray(0, bytesRead).toString("utf8");
|
|
1360
1386
|
const parsed = JSON.parse(raw);
|
|
1361
1387
|
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") {
|
|
@@ -1363,7 +1389,7 @@ function readDaemonLockfile() {
|
|
|
1363
1389
|
}
|
|
1364
1390
|
return null;
|
|
1365
1391
|
} finally {
|
|
1366
|
-
|
|
1392
|
+
import_node_fs3.default.closeSync(fd);
|
|
1367
1393
|
}
|
|
1368
1394
|
} catch {
|
|
1369
1395
|
return null;
|
|
@@ -1382,9 +1408,9 @@ function isDaemonLockfileFresh(lock, now = Date.now()) {
|
|
|
1382
1408
|
function writeDaemonLockfile(data) {
|
|
1383
1409
|
ensureSootsimHome();
|
|
1384
1410
|
const tmp = `${daemonLockfilePath()}.tmp`;
|
|
1385
|
-
|
|
1411
|
+
import_node_fs3.default.writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
|
|
1386
1412
|
`, "utf8");
|
|
1387
|
-
|
|
1413
|
+
import_node_fs3.default.renameSync(tmp, daemonLockfilePath());
|
|
1388
1414
|
}
|
|
1389
1415
|
function claimDaemonLockfile(data) {
|
|
1390
1416
|
ensureSootsimHome();
|
|
@@ -1397,7 +1423,7 @@ function claimDaemonLockfile(data) {
|
|
|
1397
1423
|
}
|
|
1398
1424
|
function removeDaemonLockfile() {
|
|
1399
1425
|
try {
|
|
1400
|
-
|
|
1426
|
+
import_node_fs3.default.unlinkSync(daemonLockfilePath());
|
|
1401
1427
|
} catch {
|
|
1402
1428
|
}
|
|
1403
1429
|
}
|
|
@@ -1614,13 +1640,13 @@ function extractTarball(tarPath, destDir) {
|
|
|
1614
1640
|
}
|
|
1615
1641
|
|
|
1616
1642
|
// src/host/agent-host.ts
|
|
1617
|
-
var
|
|
1643
|
+
var import_node_fs6 = __toESM(require("node:fs"), 1);
|
|
1618
1644
|
var import_node_path5 = __toESM(require("node:path"), 1);
|
|
1619
1645
|
|
|
1620
1646
|
// src/agent-sessions.ts
|
|
1621
1647
|
var import_node_child_process = require("node:child_process");
|
|
1622
1648
|
var import_node_crypto2 = require("node:crypto");
|
|
1623
|
-
var
|
|
1649
|
+
var import_node_fs5 = __toESM(require("node:fs"), 1);
|
|
1624
1650
|
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
1625
1651
|
var import_node_readline = __toESM(require("node:readline"), 1);
|
|
1626
1652
|
|
|
@@ -1665,7 +1691,7 @@ function encodeAgentPromptEnvelope(input) {
|
|
|
1665
1691
|
|
|
1666
1692
|
// src/attached-projects.ts
|
|
1667
1693
|
var import_node_crypto = require("node:crypto");
|
|
1668
|
-
var
|
|
1694
|
+
var import_node_fs4 = __toESM(require("node:fs"), 1);
|
|
1669
1695
|
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
1670
1696
|
var overrideDir = null;
|
|
1671
1697
|
function userDataDir() {
|
|
@@ -1692,7 +1718,7 @@ function loadStore() {
|
|
|
1692
1718
|
const file = storeFile();
|
|
1693
1719
|
let raw;
|
|
1694
1720
|
try {
|
|
1695
|
-
raw =
|
|
1721
|
+
raw = import_node_fs4.default.readFileSync(file, "utf8");
|
|
1696
1722
|
} catch (err) {
|
|
1697
1723
|
if (err.code === "ENOENT") return cloneEmpty();
|
|
1698
1724
|
throw err;
|
|
@@ -1709,7 +1735,7 @@ function loadStore() {
|
|
|
1709
1735
|
} catch (err) {
|
|
1710
1736
|
const quarantine = `${file}.corrupt-${Date.now()}`;
|
|
1711
1737
|
try {
|
|
1712
|
-
|
|
1738
|
+
import_node_fs4.default.renameSync(file, quarantine);
|
|
1713
1739
|
console.warn(
|
|
1714
1740
|
`[sootsim] attached-projects.json was unparseable; quarantined to ${quarantine}. original error: ${err.message}`
|
|
1715
1741
|
);
|
|
@@ -1720,16 +1746,16 @@ function loadStore() {
|
|
|
1720
1746
|
}
|
|
1721
1747
|
function writeStore(store) {
|
|
1722
1748
|
const file = storeFile();
|
|
1723
|
-
|
|
1749
|
+
import_node_fs4.default.mkdirSync(import_node_path3.default.dirname(file), { recursive: true });
|
|
1724
1750
|
const tmp = `${file}.tmp-${process.pid}-${Date.now()}`;
|
|
1725
|
-
const fd =
|
|
1751
|
+
const fd = import_node_fs4.default.openSync(tmp, "w", 384);
|
|
1726
1752
|
try {
|
|
1727
|
-
|
|
1728
|
-
|
|
1753
|
+
import_node_fs4.default.writeFileSync(fd, JSON.stringify(store, null, 2));
|
|
1754
|
+
import_node_fs4.default.fsyncSync(fd);
|
|
1729
1755
|
} finally {
|
|
1730
|
-
|
|
1756
|
+
import_node_fs4.default.closeSync(fd);
|
|
1731
1757
|
}
|
|
1732
|
-
|
|
1758
|
+
import_node_fs4.default.renameSync(tmp, file);
|
|
1733
1759
|
}
|
|
1734
1760
|
function mutateStore(fn) {
|
|
1735
1761
|
const store = loadStore();
|
|
@@ -1910,7 +1936,7 @@ async function seedFromDemoAppRegistry() {
|
|
|
1910
1936
|
const apps = APPS2;
|
|
1911
1937
|
mutateStore((store) => {
|
|
1912
1938
|
for (const app of apps) {
|
|
1913
|
-
if (!
|
|
1939
|
+
if (!import_node_fs4.default.existsSync(app.dir)) continue;
|
|
1914
1940
|
const cwd = import_node_path3.default.resolve(app.dir);
|
|
1915
1941
|
const id = projectIdForCwd(cwd);
|
|
1916
1942
|
if (store.attachedProjects.some((p) => p.id === id)) continue;
|
|
@@ -1954,7 +1980,7 @@ function pidIsAlive(pid, sessionId) {
|
|
|
1954
1980
|
return false;
|
|
1955
1981
|
}
|
|
1956
1982
|
if (sessionId) {
|
|
1957
|
-
if (!
|
|
1983
|
+
if (!import_node_fs5.default.existsSync(sessionDir(sessionId))) return false;
|
|
1958
1984
|
}
|
|
1959
1985
|
return true;
|
|
1960
1986
|
}
|
|
@@ -1970,7 +1996,7 @@ function resolveSootsimInvocation() {
|
|
|
1970
1996
|
import_node_path4.default.join(resourcesPath, "bin", `sootsim-${process.platform}-${process.arch}`)
|
|
1971
1997
|
];
|
|
1972
1998
|
for (const c of candidates) {
|
|
1973
|
-
if (
|
|
1999
|
+
if (import_node_fs5.default.existsSync(c)) return { cmd: c, prefixArgs: [] };
|
|
1974
2000
|
}
|
|
1975
2001
|
}
|
|
1976
2002
|
}
|
|
@@ -1994,14 +2020,14 @@ function tryWorkspaceSootsim() {
|
|
|
1994
2020
|
if (!sootsimDir) return null;
|
|
1995
2021
|
const binaryName = `sootsim-${process.platform}-${process.arch}`;
|
|
1996
2022
|
const distBinary = import_node_path4.default.join(sootsimDir, "dist-bin", binaryName);
|
|
1997
|
-
if (
|
|
2023
|
+
if (import_node_fs5.default.existsSync(distBinary)) return { cmd: distBinary, prefixArgs: [] };
|
|
1998
2024
|
const distBin = import_node_path4.default.join(sootsimDir, "dist-cli", "bin.js");
|
|
1999
|
-
if (
|
|
2025
|
+
if (import_node_fs5.default.existsSync(distBin)) {
|
|
2000
2026
|
try {
|
|
2001
2027
|
const src = import_node_path4.default.join(sootsimDir, "cli", "commands", "agent-wrapper.ts");
|
|
2002
|
-
if (
|
|
2003
|
-
const srcMtime =
|
|
2004
|
-
const buildMtime =
|
|
2028
|
+
if (import_node_fs5.default.existsSync(src)) {
|
|
2029
|
+
const srcMtime = import_node_fs5.default.statSync(src).mtimeMs;
|
|
2030
|
+
const buildMtime = import_node_fs5.default.statSync(distBin).mtimeMs;
|
|
2005
2031
|
if (buildMtime < srcMtime) {
|
|
2006
2032
|
console.warn(
|
|
2007
2033
|
`[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).`
|
|
@@ -2029,8 +2055,8 @@ function resolveSootsimPackageDir() {
|
|
|
2029
2055
|
for (let i = 0; i < 8; i++) {
|
|
2030
2056
|
const pkg = import_node_path4.default.join(cur, "package.json");
|
|
2031
2057
|
try {
|
|
2032
|
-
if (
|
|
2033
|
-
const parsed = JSON.parse(
|
|
2058
|
+
if (import_node_fs5.default.existsSync(pkg)) {
|
|
2059
|
+
const parsed = JSON.parse(import_node_fs5.default.readFileSync(pkg, "utf8"));
|
|
2034
2060
|
if (parsed.name === "sootsim") return cur;
|
|
2035
2061
|
}
|
|
2036
2062
|
} catch {
|
|
@@ -2052,9 +2078,9 @@ function fileFromImportMeta() {
|
|
|
2052
2078
|
}
|
|
2053
2079
|
async function withStartLock(projectId, provider, fn) {
|
|
2054
2080
|
const lockDir = import_node_path4.default.join(getUserDataDir(), "locks");
|
|
2055
|
-
|
|
2081
|
+
import_node_fs5.default.mkdirSync(lockDir, { recursive: true });
|
|
2056
2082
|
try {
|
|
2057
|
-
|
|
2083
|
+
import_node_fs5.default.chmodSync(lockDir, 448);
|
|
2058
2084
|
} catch {
|
|
2059
2085
|
}
|
|
2060
2086
|
const lockPath = import_node_path4.default.join(lockDir, `start-${projectId}-${provider}.lock`);
|
|
@@ -2062,17 +2088,17 @@ async function withStartLock(projectId, provider, fn) {
|
|
|
2062
2088
|
let fd = null;
|
|
2063
2089
|
while (fd === null) {
|
|
2064
2090
|
try {
|
|
2065
|
-
fd =
|
|
2091
|
+
fd = import_node_fs5.default.openSync(
|
|
2066
2092
|
lockPath,
|
|
2067
|
-
|
|
2093
|
+
import_node_fs5.constants.O_WRONLY | import_node_fs5.constants.O_CREAT | import_node_fs5.constants.O_EXCL,
|
|
2068
2094
|
384
|
|
2069
2095
|
);
|
|
2070
2096
|
} catch (err) {
|
|
2071
2097
|
if (err.code !== "EEXIST") throw err;
|
|
2072
2098
|
try {
|
|
2073
|
-
const stale = Number(
|
|
2099
|
+
const stale = Number(import_node_fs5.default.readFileSync(lockPath, "utf8").trim());
|
|
2074
2100
|
if (stale && !isProcessAlive(stale)) {
|
|
2075
|
-
|
|
2101
|
+
import_node_fs5.default.unlinkSync(lockPath);
|
|
2076
2102
|
continue;
|
|
2077
2103
|
}
|
|
2078
2104
|
} catch {
|
|
@@ -2086,15 +2112,15 @@ async function withStartLock(projectId, provider, fn) {
|
|
|
2086
2112
|
}
|
|
2087
2113
|
}
|
|
2088
2114
|
try {
|
|
2089
|
-
|
|
2115
|
+
import_node_fs5.default.writeFileSync(fd, String(process.pid));
|
|
2090
2116
|
return await fn();
|
|
2091
2117
|
} finally {
|
|
2092
2118
|
try {
|
|
2093
|
-
|
|
2119
|
+
import_node_fs5.default.closeSync(fd);
|
|
2094
2120
|
} catch {
|
|
2095
2121
|
}
|
|
2096
2122
|
try {
|
|
2097
|
-
|
|
2123
|
+
import_node_fs5.default.unlinkSync(lockPath);
|
|
2098
2124
|
} catch {
|
|
2099
2125
|
}
|
|
2100
2126
|
}
|
|
@@ -2109,24 +2135,24 @@ function isProcessAlive(pid) {
|
|
|
2109
2135
|
}
|
|
2110
2136
|
function mkfifoSync(p) {
|
|
2111
2137
|
const parent = import_node_path4.default.dirname(p);
|
|
2112
|
-
|
|
2138
|
+
import_node_fs5.default.mkdirSync(parent, { recursive: true });
|
|
2113
2139
|
try {
|
|
2114
|
-
|
|
2140
|
+
import_node_fs5.default.chmodSync(parent, 448);
|
|
2115
2141
|
} catch {
|
|
2116
2142
|
}
|
|
2117
|
-
if (
|
|
2143
|
+
if (import_node_fs5.default.existsSync(p)) {
|
|
2118
2144
|
try {
|
|
2119
|
-
const stat =
|
|
2145
|
+
const stat = import_node_fs5.default.statSync(p);
|
|
2120
2146
|
if (stat.isFIFO()) {
|
|
2121
2147
|
try {
|
|
2122
|
-
|
|
2148
|
+
import_node_fs5.default.chmodSync(p, 384);
|
|
2123
2149
|
} catch {
|
|
2124
2150
|
}
|
|
2125
2151
|
return;
|
|
2126
2152
|
}
|
|
2127
|
-
|
|
2153
|
+
import_node_fs5.default.unlinkSync(p);
|
|
2128
2154
|
} catch {
|
|
2129
|
-
|
|
2155
|
+
import_node_fs5.default.unlinkSync(p);
|
|
2130
2156
|
}
|
|
2131
2157
|
}
|
|
2132
2158
|
const result = (0, import_node_child_process.spawnSync)("mkfifo", ["-m", "600", p]);
|
|
@@ -2174,9 +2200,9 @@ async function startSession(opts) {
|
|
|
2174
2200
|
mkfifoSync(promptIn);
|
|
2175
2201
|
mkfifoSync(eventsOut);
|
|
2176
2202
|
const transcriptDir = import_node_path4.default.dirname(transcript);
|
|
2177
|
-
|
|
2203
|
+
import_node_fs5.default.mkdirSync(transcriptDir, { recursive: true });
|
|
2178
2204
|
try {
|
|
2179
|
-
|
|
2205
|
+
import_node_fs5.default.chmodSync(transcriptDir, 448);
|
|
2180
2206
|
} catch {
|
|
2181
2207
|
}
|
|
2182
2208
|
const { cmd, prefixArgs } = resolveSootsimInvocation();
|
|
@@ -2227,7 +2253,7 @@ async function startSession(opts) {
|
|
|
2227
2253
|
}
|
|
2228
2254
|
}
|
|
2229
2255
|
try {
|
|
2230
|
-
|
|
2256
|
+
import_node_fs5.default.rmSync(sessionDir(session.id), { recursive: true, force: true });
|
|
2231
2257
|
} catch {
|
|
2232
2258
|
}
|
|
2233
2259
|
updateSessionStatus(session.id, { status: "ended" });
|
|
@@ -2255,18 +2281,18 @@ async function sendPrompt(sessionId, prompt) {
|
|
|
2255
2281
|
);
|
|
2256
2282
|
}
|
|
2257
2283
|
const fifo = promptFifoPath(sessionId);
|
|
2258
|
-
if (!
|
|
2284
|
+
if (!import_node_fs5.default.existsSync(fifo)) {
|
|
2259
2285
|
throw new AgentSessionError("NO_FIFO", `prompt FIFO missing: ${fifo}`);
|
|
2260
2286
|
}
|
|
2261
|
-
const fd =
|
|
2287
|
+
const fd = import_node_fs5.default.openSync(fifo, import_node_fs5.constants.O_WRONLY);
|
|
2262
2288
|
try {
|
|
2263
2289
|
const wireText = encodeAgentPromptEnvelope(prompt);
|
|
2264
2290
|
if (!wireText) {
|
|
2265
2291
|
throw new AgentSessionError("EMPTY_PROMPT", "prompt text is empty");
|
|
2266
2292
|
}
|
|
2267
|
-
|
|
2293
|
+
import_node_fs5.default.writeSync(fd, wireText + "\n");
|
|
2268
2294
|
} finally {
|
|
2269
|
-
|
|
2295
|
+
import_node_fs5.default.closeSync(fd);
|
|
2270
2296
|
}
|
|
2271
2297
|
updateSessionStatus(sessionId, {
|
|
2272
2298
|
lastPrompt: prompt.displayText ?? prompt.text,
|
|
@@ -2288,7 +2314,7 @@ async function endSession(sessionId) {
|
|
|
2288
2314
|
const base = getUserDataDir();
|
|
2289
2315
|
if (dir.startsWith(base)) {
|
|
2290
2316
|
try {
|
|
2291
|
-
|
|
2317
|
+
import_node_fs5.default.rmSync(dir, { recursive: true, force: true });
|
|
2292
2318
|
} catch {
|
|
2293
2319
|
}
|
|
2294
2320
|
}
|
|
@@ -2296,11 +2322,11 @@ async function endSession(sessionId) {
|
|
|
2296
2322
|
}
|
|
2297
2323
|
function subscribeEvents(sessionId, onEvent) {
|
|
2298
2324
|
const fifo = eventsFifoPath(sessionId);
|
|
2299
|
-
if (!
|
|
2325
|
+
if (!import_node_fs5.default.existsSync(fifo)) {
|
|
2300
2326
|
throw new AgentSessionError("NO_FIFO", `events FIFO missing: ${fifo}`);
|
|
2301
2327
|
}
|
|
2302
|
-
const fd =
|
|
2303
|
-
const stream =
|
|
2328
|
+
const fd = import_node_fs5.default.openSync(fifo, import_node_fs5.constants.O_RDWR);
|
|
2329
|
+
const stream = import_node_fs5.default.createReadStream("", { fd, autoClose: true });
|
|
2304
2330
|
const rl = import_node_readline.default.createInterface({ input: stream, crlfDelay: Infinity });
|
|
2305
2331
|
rl.on("line", (line) => {
|
|
2306
2332
|
const event = parseAgentEventLine(line);
|
|
@@ -2321,7 +2347,7 @@ function subscribeEvents(sessionId, onEvent) {
|
|
|
2321
2347
|
};
|
|
2322
2348
|
}
|
|
2323
2349
|
async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
2324
|
-
const fd =
|
|
2350
|
+
const fd = import_node_fs5.default.openSync(fifo, import_node_fs5.constants.O_RDWR | import_node_fs5.constants.O_NONBLOCK);
|
|
2325
2351
|
const buf = Buffer.alloc(8192);
|
|
2326
2352
|
let leftover = "";
|
|
2327
2353
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -2329,7 +2355,7 @@ async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
|
2329
2355
|
while (Date.now() < deadline) {
|
|
2330
2356
|
let n = 0;
|
|
2331
2357
|
try {
|
|
2332
|
-
n =
|
|
2358
|
+
n = import_node_fs5.default.readSync(fd, buf, 0, buf.length, null);
|
|
2333
2359
|
} catch (err) {
|
|
2334
2360
|
if (err.code !== "EAGAIN") throw err;
|
|
2335
2361
|
n = 0;
|
|
@@ -2349,7 +2375,7 @@ async function waitForFirstEvent(fifo, predicate, timeoutMs) {
|
|
|
2349
2375
|
}
|
|
2350
2376
|
return null;
|
|
2351
2377
|
} finally {
|
|
2352
|
-
|
|
2378
|
+
import_node_fs5.default.closeSync(fd);
|
|
2353
2379
|
}
|
|
2354
2380
|
}
|
|
2355
2381
|
|
|
@@ -2531,10 +2557,10 @@ var AgentHost = class {
|
|
|
2531
2557
|
}
|
|
2532
2558
|
getTranscript(sessionId) {
|
|
2533
2559
|
const p = transcriptPath(sessionId);
|
|
2534
|
-
if (!
|
|
2560
|
+
if (!import_node_fs6.default.existsSync(p)) {
|
|
2535
2561
|
return { error: "transcript not found", code: "NO_TRANSCRIPT" };
|
|
2536
2562
|
}
|
|
2537
|
-
return
|
|
2563
|
+
return import_node_fs6.default.readFileSync(p, "utf8");
|
|
2538
2564
|
}
|
|
2539
2565
|
getPaths() {
|
|
2540
2566
|
const dir = getUserDataDir();
|
|
@@ -3194,7 +3220,7 @@ function injectSharedConfigIntoHtml(data) {
|
|
|
3194
3220
|
} catch {
|
|
3195
3221
|
payload = "{}";
|
|
3196
3222
|
}
|
|
3197
|
-
const tag = `<script>window.__sootsimSharedConfig=${payload};</script>`;
|
|
3223
|
+
const tag = `<script>window.__sootsimSharedConfig=${payload};window.__sootsimCliVersion=${JSON.stringify(getCliVersion())};</script>`;
|
|
3198
3224
|
const html = data.toString("utf8");
|
|
3199
3225
|
if (html.includes("</head>")) return html.replace("</head>", tag + "</head>");
|
|
3200
3226
|
if (html.includes("</body>")) return html.replace("</body>", tag + "</body>");
|
|
@@ -3459,6 +3485,12 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
3459
3485
|
sim.url = registration.url;
|
|
3460
3486
|
sim.title = registration.title;
|
|
3461
3487
|
sim.userAgent = registration.userAgent;
|
|
3488
|
+
if (typeof registration.kind === "string" && registration.kind.trim()) {
|
|
3489
|
+
sim.kind = registration.kind.trim();
|
|
3490
|
+
}
|
|
3491
|
+
if (registration.meta && typeof registration.meta === "object") {
|
|
3492
|
+
sim.meta = registration.meta;
|
|
3493
|
+
}
|
|
3462
3494
|
if (restored) {
|
|
3463
3495
|
this.broadcastSimAssignments();
|
|
3464
3496
|
this.broadcastSimClientStates();
|
|
@@ -3944,6 +3976,10 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
3944
3976
|
* non-upgrade routes that don't match serve index.html (SPA behavior) so
|
|
3945
3977
|
* electron's webContents can navigate freely inside the runtime. */
|
|
3946
3978
|
handleHttpRequest(req, res) {
|
|
3979
|
+
res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
|
|
3980
|
+
res.setHeader("Cross-Origin-Embedder-Policy", "credentialless");
|
|
3981
|
+
res.setHeader("Cross-Origin-Resource-Policy", "cross-origin");
|
|
3982
|
+
res.setHeader("Document-Policy", "js-profiling");
|
|
3947
3983
|
if (isFetchProxyRequestUrl(req.url)) {
|
|
3948
3984
|
void handleFetchProxyRequest(req, res);
|
|
3949
3985
|
return;
|
|
@@ -4379,7 +4415,9 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
4379
4415
|
lockedBy: lease ? lease.cliLabel || lease.cliIdentityKey : void 0,
|
|
4380
4416
|
lockedByKind: lease ? lease.kind : void 0,
|
|
4381
4417
|
lockExpiresAt: lease ? lease.expiresAt : void 0,
|
|
4382
|
-
userFocused: sim.userFocused || void 0
|
|
4418
|
+
userFocused: sim.userFocused || void 0,
|
|
4419
|
+
kind: sim.kind,
|
|
4420
|
+
meta: sim.meta
|
|
4383
4421
|
};
|
|
4384
4422
|
}
|
|
4385
4423
|
getActiveLease(sim) {
|
|
@@ -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/dist-lib/index.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/dist-lib/metro.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/dist-lib/profiles.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/dist-lib/render-mode.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 __defProp = Object.defineProperty;
|