sootsim 0.1.36 → 0.1.38

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.
Files changed (161) hide show
  1. package/README.md +20 -5
  2. package/dist-cli/bin.js +15 -20
  3. package/dist-cli/chunks/{agent-YZB6D3DR.js → agent-CGQWOOOL.js} +2 -2
  4. package/dist-cli/chunks/{agent-wrapper-VHCVS22I.js → agent-wrapper-M6P53GJ2.js} +10 -10
  5. package/dist-cli/chunks/{assert-AIVCKKLG.js → assert-O7N2SYJZ.js} +2 -2
  6. package/dist-cli/chunks/auto-bootstrap-DF4KYGPS.js +2 -0
  7. package/dist-cli/chunks/beta-AK25X3AU.js +2 -0
  8. package/dist-cli/chunks/chunk-23YMXBQ2.js +1 -0
  9. package/dist-cli/chunks/chunk-2ABGQIW7.js +4 -0
  10. package/dist-cli/chunks/chunk-5HNZO5AI.js +7 -0
  11. package/dist-cli/chunks/chunk-5XI3AB4I.js +3 -0
  12. package/dist-cli/chunks/{chunk-IJMYFYDZ.js → chunk-67K3WAEZ.js} +2 -2
  13. package/dist-cli/chunks/chunk-6UJXRT7F.js +5 -0
  14. package/dist-cli/chunks/chunk-ARH3T5NK.js +66 -0
  15. package/dist-cli/chunks/{chunk-VFDRZNPN.js → chunk-B4VH67D3.js} +1 -1
  16. package/dist-cli/chunks/chunk-BEY2QVU5.js +3 -0
  17. package/dist-cli/chunks/chunk-CB4PUMI2.js +1 -0
  18. package/dist-cli/chunks/chunk-CHMHTTI7.js +11 -0
  19. package/dist-cli/chunks/chunk-E473YTRQ.js +2 -0
  20. package/dist-cli/chunks/chunk-FCOCFEBU.js +27 -0
  21. package/dist-cli/chunks/chunk-FRE5TY3C.js +1 -0
  22. package/dist-cli/chunks/chunk-FX3PPKSJ.js +2 -0
  23. package/dist-cli/chunks/{chunk-27P763IZ.js → chunk-FXY5FWVY.js} +2 -2
  24. package/dist-cli/chunks/{chunk-A5BRCXYE.js → chunk-G23GIRBM.js} +1 -1
  25. package/dist-cli/chunks/chunk-G62Q2MQI.js +1 -0
  26. package/dist-cli/chunks/chunk-GWQUPWVO.js +2 -0
  27. package/dist-cli/chunks/{chunk-EWSQSALM.js → chunk-H6CG42HE.js} +4 -4
  28. package/dist-cli/chunks/chunk-HNAGYNWN.js +16 -0
  29. package/dist-cli/chunks/{chunk-KAXZHEKM.js → chunk-IE2WYVJF.js} +1 -1
  30. package/dist-cli/chunks/chunk-IKVIHHWE.js +2 -0
  31. package/dist-cli/chunks/chunk-JJVZMGRM.js +2 -0
  32. package/dist-cli/chunks/{chunk-HWCKZXNJ.js → chunk-LNRBXCUI.js} +2 -2
  33. package/dist-cli/chunks/{chunk-CYCXOAVZ.js → chunk-MTPWS4JK.js} +4 -4
  34. package/dist-cli/chunks/{chunk-G7XQD4KC.js → chunk-NKYTISAN.js} +2 -2
  35. package/dist-cli/chunks/chunk-NSZBULGG.js +348 -0
  36. package/dist-cli/chunks/chunk-P32FCOS3.js +4 -0
  37. package/dist-cli/chunks/chunk-P722XCFT.js +3 -0
  38. package/dist-cli/chunks/chunk-PFRPXFSL.js +117 -0
  39. package/dist-cli/chunks/chunk-QD22CQLH.js +5 -0
  40. package/dist-cli/chunks/chunk-QI4VLQ3A.js +5 -0
  41. package/dist-cli/chunks/{chunk-OXN2PEB7.js → chunk-SKNHJDYO.js} +3 -3
  42. package/dist-cli/chunks/{chunk-YIO6S3R5.js → chunk-T442FYM5.js} +1 -1
  43. package/dist-cli/chunks/chunk-TR554AIH.js +17 -0
  44. package/dist-cli/chunks/chunk-UD5ILFN5.js +3 -0
  45. package/dist-cli/chunks/{chunk-LHDWH7VS.js → chunk-VIEK76DX.js} +1 -1
  46. package/dist-cli/chunks/chunk-VVUEWU2P.js +64 -0
  47. package/dist-cli/chunks/{chunk-RMW5BO3S.js → chunk-Z2PBRNJP.js} +2 -2
  48. package/dist-cli/chunks/chunk-ZEVZN3S4.js +2 -0
  49. package/dist-cli/chunks/{compat-Y2O2U7FL.js → compat-DNQWSPFQ.js} +2 -2
  50. package/dist-cli/chunks/{config-SRBOFUCI.js → config-ABR5BGUO.js} +2 -2
  51. package/dist-cli/chunks/control-DEHRU4XZ.js +2 -0
  52. package/dist-cli/chunks/cpu-profile-Y5YDH6X2.js +22 -0
  53. package/dist-cli/chunks/daemon-2Z4DAJT6.js +83 -0
  54. package/dist-cli/chunks/{debug-BIDMW2PE.js → debug-R36UPOJP.js} +4 -4
  55. package/dist-cli/chunks/demo-app-registry-DMMWYL7G.js +2 -0
  56. package/dist-cli/chunks/detox-FQJWEWLT.js +49 -0
  57. package/dist-cli/chunks/device-SXKLDZEC.js +16 -0
  58. package/dist-cli/chunks/diagnose-M7RKNI2H.js +41 -0
  59. package/dist-cli/chunks/drivers-NSCX5CRA.js +2 -0
  60. package/dist-cli/chunks/electron-YUAKGT4H.js +18 -0
  61. package/dist-cli/chunks/flow-UQSRNEZD.js +2 -0
  62. package/dist-cli/chunks/hints-SDD7L3VS.js +2 -0
  63. package/dist-cli/chunks/home-paths-QMCX2227.js +2 -0
  64. package/dist-cli/chunks/inspect-6FPPW7GS.js +1101 -0
  65. package/dist-cli/chunks/install-TTH3PM3B.js +2 -0
  66. package/dist-cli/chunks/{install-desktop-2MYEI4FM.js → install-desktop-EKMYRDQH.js} +3 -3
  67. package/dist-cli/chunks/{keys-7PNASIQR.js → keys-ODG3TDUP.js} +2 -2
  68. package/dist-cli/chunks/{launch-JNS47LAQ.js → launch-7HUL745I.js} +3 -3
  69. package/dist-cli/chunks/{login-YWZWUHBS.js → login-BJKQMJYT.js} +4 -4
  70. package/dist-cli/chunks/{logout-O6SXMSBP.js → logout-7NG3KGJD.js} +2 -2
  71. package/dist-cli/chunks/maestro-VFEUWV3Q.js +80 -0
  72. package/dist-cli/chunks/{preview-WGKJO5FS.js → preview-WZ6XNOBC.js} +2 -2
  73. package/dist-cli/chunks/profile-DXFEZOHB.js +22 -0
  74. package/dist-cli/chunks/react-QP7PL5CZ.js +30 -0
  75. package/dist-cli/chunks/{record-QPWLYH5R.js → record-AFE25EMH.js} +5 -5
  76. package/dist-cli/chunks/{runtime-KEMO2MSB.js → runtime-GFWS3QLZ.js} +3 -3
  77. package/dist-cli/chunks/screenshot-U6VFOVFW.js +28 -0
  78. package/dist-cli/chunks/screenshot-mode-HNGV3AFC.js +17 -0
  79. package/dist-cli/chunks/screenshots-GYMRDUJR.js +70 -0
  80. package/dist-cli/chunks/server-3Q22YYM6.js +35 -0
  81. package/dist-cli/chunks/setup-repo-NNDWIGZR.js +2 -0
  82. package/dist-cli/chunks/{skills-MO7BFNVM.js → skills-FT76ZVAV.js} +2 -2
  83. package/dist-cli/chunks/start-N573LFCF.js +23 -0
  84. package/dist-cli/chunks/store-6NTDGLPH.js +2 -0
  85. package/dist-cli/chunks/telemetry-SNZBIRGL.js +2 -0
  86. package/dist-cli/chunks/{test-XUI3KNNQ.js → test-AJPY2Q6W.js} +3 -3
  87. package/dist-cli/chunks/three-mode-JZZVOMTG.js +39 -0
  88. package/dist-cli/chunks/timeline-GTSCF5P6.js +22 -0
  89. package/dist-cli/chunks/upload-UHTVCGGR.js +2 -0
  90. package/dist-cli/chunks/what-happened-N3AQ6I7O.js +15 -0
  91. package/dist-cli/chunks/whoami-FOIMN6UC.js +2 -0
  92. package/dist-lib/agent-daemon-client.cjs +4 -1
  93. package/dist-lib/agent-events.cjs +1 -1
  94. package/dist-lib/agent-sessions.cjs +41 -39
  95. package/dist-lib/attached-projects.cjs +30 -28
  96. package/dist-lib/auth/shared-session.cjs +35 -27
  97. package/dist-lib/backend-origin.cjs +1 -1
  98. package/dist-lib/bridge-constants.cjs +1 -1
  99. package/dist-lib/cli-constants.cjs +1 -1
  100. package/dist-lib/config.cjs +6 -2
  101. package/dist-lib/dev-bundle-resolution.cjs +5 -50
  102. package/dist-lib/home-paths.cjs +94 -38
  103. package/dist-lib/host/bridge-host.cjs +2144 -1330
  104. package/dist-lib/host/fetch-proxy-handler.cjs +248 -0
  105. package/dist-lib/index.cjs +21 -21
  106. package/dist-lib/metro.cjs +21 -21
  107. package/dist-lib/profiles.cjs +246 -0
  108. package/dist-lib/render-mode.cjs +1 -1
  109. package/dist-lib/vite-base.cjs +3410 -1632
  110. package/dist-lib/vite.cjs +1 -1
  111. package/package.json +7 -1
  112. package/dist-cli/chunks/auto-bootstrap-MLNTX23H.js +0 -2
  113. package/dist-cli/chunks/chunk-3UIWOHC2.js +0 -62
  114. package/dist-cli/chunks/chunk-5KGFHWVR.js +0 -1
  115. package/dist-cli/chunks/chunk-5QIUJNT3.js +0 -5
  116. package/dist-cli/chunks/chunk-6GGMKFWJ.js +0 -4
  117. package/dist-cli/chunks/chunk-6Z275LCY.js +0 -2
  118. package/dist-cli/chunks/chunk-75LBYBKW.js +0 -11
  119. package/dist-cli/chunks/chunk-DFN3GGH7.js +0 -5
  120. package/dist-cli/chunks/chunk-EBEHZJRG.js +0 -117
  121. package/dist-cli/chunks/chunk-EJLNUMMP.js +0 -3
  122. package/dist-cli/chunks/chunk-FE7UI3MT.js +0 -4
  123. package/dist-cli/chunks/chunk-G663654J.js +0 -1
  124. package/dist-cli/chunks/chunk-GW7XY5KC.js +0 -2
  125. package/dist-cli/chunks/chunk-H2QO4TDV.js +0 -22
  126. package/dist-cli/chunks/chunk-HWFHBMAQ.js +0 -27
  127. package/dist-cli/chunks/chunk-J7CTD37P.js +0 -1
  128. package/dist-cli/chunks/chunk-N32NCVL2.js +0 -3
  129. package/dist-cli/chunks/chunk-NIZBR7EK.js +0 -2
  130. package/dist-cli/chunks/chunk-NYY36OKU.js +0 -308
  131. package/dist-cli/chunks/chunk-PJL25JQV.js +0 -5
  132. package/dist-cli/chunks/chunk-SHO54NET.js +0 -2
  133. package/dist-cli/chunks/chunk-SMVJOWSV.js +0 -16
  134. package/dist-cli/chunks/chunk-TC6V7YFC.js +0 -3
  135. package/dist-cli/chunks/chunk-YLIIVTTQ.js +0 -3
  136. package/dist-cli/chunks/chunk-YR7BGGYE.js +0 -2
  137. package/dist-cli/chunks/chunk-ZEW3RF5Q.js +0 -1
  138. package/dist-cli/chunks/control-PL2V2O6S.js +0 -2
  139. package/dist-cli/chunks/daemon-IZC32PZW.js +0 -50
  140. package/dist-cli/chunks/demo-app-registry-5JFOUU3D.js +0 -2
  141. package/dist-cli/chunks/detox-B3FDOIS3.js +0 -49
  142. package/dist-cli/chunks/device-ZZSI363W.js +0 -16
  143. package/dist-cli/chunks/drivers-S4NGK4DB.js +0 -2
  144. package/dist-cli/chunks/electron-5YFHXEOI.js +0 -15
  145. package/dist-cli/chunks/flow-JJBO6TFY.js +0 -2
  146. package/dist-cli/chunks/hints-G5HBBV2O.js +0 -2
  147. package/dist-cli/chunks/home-paths-VWC3FWA3.js +0 -2
  148. package/dist-cli/chunks/inspect-POOPWUQI.js +0 -1034
  149. package/dist-cli/chunks/install-MP6FHXNZ.js +0 -2
  150. package/dist-cli/chunks/install-dev-desktop-SKH3KEHY.js +0 -100
  151. package/dist-cli/chunks/maestro-CW6XVUKV.js +0 -75
  152. package/dist-cli/chunks/profile-SUOBRPIC.js +0 -22
  153. package/dist-cli/chunks/screenshot-JTY46V7G.js +0 -26
  154. package/dist-cli/chunks/screenshot-mode-7OYBBX6D.js +0 -17
  155. package/dist-cli/chunks/screenshots-QISKC4GD.js +0 -70
  156. package/dist-cli/chunks/server-YSFJAKAV.js +0 -34
  157. package/dist-cli/chunks/setup-repo-LFB3HBEO.js +0 -2
  158. package/dist-cli/chunks/store-6MFL53I4.js +0 -2
  159. package/dist-cli/chunks/telemetry-CN42GMVC.js +0 -2
  160. package/dist-cli/chunks/upload-6FUT7AX5.js +0 -2
  161. package/dist-cli/chunks/whoami-TQFHY42N.js +0 -2
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (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;
@@ -59,8 +59,26 @@ __export(attached_projects_exports, {
59
59
  module.exports = __toCommonJS(attached_projects_exports);
60
60
  var import_node_crypto = require("node:crypto");
61
61
  var import_node_fs = __toESM(require("node:fs"), 1);
62
- var import_node_os = __toESM(require("node:os"), 1);
62
+ var import_node_path2 = __toESM(require("node:path"), 1);
63
+
64
+ // src/home-paths.ts
65
+ var import_node_os = require("node:os");
63
66
  var import_node_path = __toESM(require("node:path"), 1);
67
+ var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
68
+ function sootsimHomeDir() {
69
+ const override = process.env[SOOTSIM_HOME_ENV];
70
+ if (override && override.length > 0) return import_node_path.default.resolve(override);
71
+ return import_node_path.default.join((0, import_node_os.homedir)(), ".sootsim");
72
+ }
73
+ function electronDir() {
74
+ return import_node_path.default.join(sootsimHomeDir(), "electron");
75
+ }
76
+ function electronUserDataDir() {
77
+ return import_node_path.default.join(electronDir(), "userData");
78
+ }
79
+ var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
80
+
81
+ // src/attached-projects.ts
64
82
  var overrideDir = null;
65
83
  function setUserDataDir(dir) {
66
84
  overrideDir = dir;
@@ -70,29 +88,13 @@ function userDataDir() {
70
88
  if (overrideDir) return overrideDir;
71
89
  const fromEnv = process.env.SOOTSIM_USER_DATA_DIR;
72
90
  if (fromEnv) return fromEnv;
73
- try {
74
- const electron = require("electron");
75
- if (electron.app?.getPath) return electron.app.getPath("userData");
76
- } catch {
77
- }
78
- return platformDefaultUserDataDir();
79
- }
80
- function platformDefaultUserDataDir() {
81
- const home = import_node_os.default.homedir();
82
- if (process.platform === "darwin") {
83
- return import_node_path.default.join(home, "Library", "Application Support", "sootsim");
84
- }
85
- if (process.platform === "win32") {
86
- return import_node_path.default.join(process.env.APPDATA || home, "sootsim");
87
- }
88
- const xdg = process.env.XDG_CONFIG_HOME || import_node_path.default.join(home, ".config");
89
- return import_node_path.default.join(xdg, "sootsim");
91
+ return electronUserDataDir();
90
92
  }
91
93
  function getUserDataDir() {
92
94
  return userDataDir();
93
95
  }
94
96
  function storeFile() {
95
- return import_node_path.default.join(userDataDir(), "attached-projects.json");
97
+ return import_node_path2.default.join(userDataDir(), "attached-projects.json");
96
98
  }
97
99
  function cloneEmpty() {
98
100
  return {
@@ -134,7 +136,7 @@ function loadStore() {
134
136
  }
135
137
  function writeStore(store) {
136
138
  const file = storeFile();
137
- import_node_fs.default.mkdirSync(import_node_path.default.dirname(file), { recursive: true });
139
+ import_node_fs.default.mkdirSync(import_node_path2.default.dirname(file), { recursive: true });
138
140
  const tmp = `${file}.tmp-${process.pid}-${Date.now()}`;
139
141
  const fd = import_node_fs.default.openSync(tmp, "w", 384);
140
142
  try {
@@ -152,7 +154,7 @@ function mutateStore(fn) {
152
154
  return store;
153
155
  }
154
156
  function projectIdForCwd(cwd) {
155
- return (0, import_node_crypto.createHash)("sha256").update(import_node_path.default.resolve(cwd)).digest("hex").slice(0, 16);
157
+ return (0, import_node_crypto.createHash)("sha256").update(import_node_path2.default.resolve(cwd)).digest("hex").slice(0, 16);
156
158
  }
157
159
  function newSessionId() {
158
160
  return `s_${(0, import_node_crypto.randomBytes)(10).toString("hex")}`;
@@ -161,7 +163,7 @@ function newPreviewId() {
161
163
  return `pa_${(0, import_node_crypto.randomBytes)(10).toString("hex")}`;
162
164
  }
163
165
  function upsertProject(input) {
164
- const cwd = import_node_path.default.resolve(input.cwd);
166
+ const cwd = import_node_path2.default.resolve(input.cwd);
165
167
  const id = projectIdForCwd(cwd);
166
168
  let result;
167
169
  mutateStore((store) => {
@@ -187,7 +189,7 @@ function upsertProject(input) {
187
189
  const now = Date.now();
188
190
  const created = {
189
191
  id,
190
- name: input.name ?? import_node_path.default.basename(cwd),
192
+ name: input.name ?? import_node_path2.default.basename(cwd),
191
193
  cwd,
192
194
  repoRoot: input.repoRoot,
193
195
  sourceRoots: input.sourceRoots ?? [cwd],
@@ -214,7 +216,7 @@ function findProjectById(id) {
214
216
  return loadStore().attachedProjects.find((p) => p.id === id) ?? null;
215
217
  }
216
218
  function findProjectByCwd(cwd) {
217
- const resolved = import_node_path.default.resolve(cwd);
219
+ const resolved = import_node_path2.default.resolve(cwd);
218
220
  return loadStore().attachedProjects.find((p) => p.cwd === resolved) ?? null;
219
221
  }
220
222
  function findProjectByBundleUrl(bundleUrl) {
@@ -344,7 +346,7 @@ function upsertPreviewAttachment(input) {
344
346
  let result;
345
347
  mutateStore((store) => {
346
348
  const existing = store.previewAttachments.find(
347
- (pa) => pa.bundleUrl === input.bundleUrl && pa.browserId === input.browserId
349
+ (pa) => pa.bundleUrl === input.bundleUrl && pa.simId === input.simId
348
350
  );
349
351
  if (existing) {
350
352
  const merged = {
@@ -361,7 +363,7 @@ function upsertPreviewAttachment(input) {
361
363
  id: input.id ?? newPreviewId(),
362
364
  projectId: input.projectId ?? null,
363
365
  bundleUrl: input.bundleUrl,
364
- browserId: input.browserId,
366
+ simId: input.simId,
365
367
  deviceModel: input.deviceModel ?? "unknown",
366
368
  status: input.status ?? "connecting",
367
369
  lastSeenAt: Date.now()
@@ -399,7 +401,7 @@ async function seedFromDemoAppRegistry() {
399
401
  mutateStore((store) => {
400
402
  for (const app of apps) {
401
403
  if (!import_node_fs.default.existsSync(app.dir)) continue;
402
- const cwd = import_node_path.default.resolve(app.dir);
404
+ const cwd = import_node_path2.default.resolve(app.dir);
403
405
  const id = projectIdForCwd(cwd);
404
406
  if (store.attachedProjects.some((p) => p.id === id)) continue;
405
407
  const now = Date.now();
@@ -1,9 +1,11 @@
1
- /*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (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
+ var __create = Object.create;
4
5
  var __defProp = Object.defineProperty;
5
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
7
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
10
  var __export = (target, all) => {
9
11
  for (var name in all)
@@ -17,6 +19,14 @@ var __copyProps = (to, from, except, desc) => {
17
19
  }
18
20
  return to;
19
21
  };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
20
30
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
31
 
22
32
  // src/auth/shared-session.ts
@@ -30,42 +40,40 @@ __export(shared_session_exports, {
30
40
  });
31
41
  module.exports = __toCommonJS(shared_session_exports);
32
42
  var import_node_fs = require("node:fs");
43
+ var import_node_path2 = require("node:path");
44
+
45
+ // src/home-paths.ts
33
46
  var import_node_os = require("node:os");
34
- var import_node_path = require("node:path");
47
+ var import_node_path = __toESM(require("node:path"), 1);
48
+ var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
49
+ function sootsimHomeDir() {
50
+ const override = process.env[SOOTSIM_HOME_ENV];
51
+ if (override && override.length > 0) return import_node_path.default.resolve(override);
52
+ return import_node_path.default.join((0, import_node_os.homedir)(), ".sootsim");
53
+ }
54
+ function electronDir() {
55
+ return import_node_path.default.join(sootsimHomeDir(), "electron");
56
+ }
57
+ function electronUserDataDir() {
58
+ return import_node_path.default.join(electronDir(), "userData");
59
+ }
60
+ var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
61
+
62
+ // src/auth/shared-session.ts
35
63
  var SESSION_VERSION = 1;
36
64
  var SESSION_FILE_ENV = "SOOTSIM_SHARED_AUTH_FILE";
37
65
  var DEFAULT_ORIGIN = "https://sootbean.com";
38
66
  function getBaseDir() {
39
67
  const explicit = process.env[SESSION_FILE_ENV];
40
68
  if (explicit?.trim()) {
41
- return (0, import_node_path.dirname)((0, import_node_path.resolve)(explicit));
42
- }
43
- const home = (0, import_node_os.homedir)();
44
- if (!home) {
45
- throw new Error("could not determine home directory for sootsim auth storage");
46
- }
47
- switch ((0, import_node_os.platform)()) {
48
- case "darwin":
49
- return (0, import_node_path.join)(home, "Library", "Application Support", "sootsim");
50
- case "win32":
51
- return (0, import_node_path.join)(process.env.APPDATA || (0, import_node_path.join)(home, "AppData", "Roaming"), "sootsim");
52
- case "aix":
53
- case "android":
54
- case "cygwin":
55
- case "freebsd":
56
- case "haiku":
57
- case "linux":
58
- case "netbsd":
59
- case "openbsd":
60
- case "sunos":
61
- default:
62
- return (0, import_node_path.join)(process.env.XDG_CONFIG_HOME || (0, import_node_path.join)(home, ".config"), "sootsim");
69
+ return (0, import_node_path2.dirname)((0, import_node_path2.resolve)(explicit));
63
70
  }
71
+ return electronUserDataDir();
64
72
  }
65
73
  function getSharedDesktopAuthFilePath() {
66
74
  const explicit = process.env[SESSION_FILE_ENV];
67
- if (explicit?.trim()) return (0, import_node_path.resolve)(explicit);
68
- return (0, import_node_path.join)(getBaseDir(), "desktop-auth.json");
75
+ if (explicit?.trim()) return (0, import_node_path2.resolve)(explicit);
76
+ return (0, import_node_path2.join)(getBaseDir(), "desktop-auth.json");
69
77
  }
70
78
  function normalizeUser(input) {
71
79
  if (!input || typeof input !== "object") return null;
@@ -115,7 +123,7 @@ function readSharedDesktopAuthSession() {
115
123
  }
116
124
  function writeSharedDesktopAuthSession(session) {
117
125
  const filepath = getSharedDesktopAuthFilePath();
118
- (0, import_node_fs.mkdirSync)((0, import_node_path.dirname)(filepath), { recursive: true });
126
+ (0, import_node_fs.mkdirSync)((0, import_node_path2.dirname)(filepath), { recursive: true });
119
127
  const normalized = {
120
128
  version: SESSION_VERSION,
121
129
  token: session.token.trim(),
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (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.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (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.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (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.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (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;
@@ -39,7 +39,7 @@ function hasOwnKeys(value) {
39
39
  }
40
40
  function hasSootSimConfig(config) {
41
41
  if (!config) return false;
42
- return hasOwnKeys(config.modules) || hasOwnKeys(config.turboModules) || hasOwnKeys(config.env) || hasOwnKeys(config.settings) || hasOwnKeys(config.initialState);
42
+ return hasOwnKeys(config.modules) || hasOwnKeys(config.turboModules) || hasOwnKeys(config.nativeModules) || hasOwnKeys(config.env) || hasOwnKeys(config.settings) || hasOwnKeys(config.initialState);
43
43
  }
44
44
  function mergeSootSimConfig(base, override) {
45
45
  if (!hasSootSimConfig(base) && !hasSootSimConfig(override)) return void 0;
@@ -48,6 +48,10 @@ function mergeSootSimConfig(base, override) {
48
48
  return {
49
49
  modules: { ...base.modules || {}, ...override.modules || {} },
50
50
  turboModules: { ...base.turboModules || {}, ...override.turboModules || {} },
51
+ nativeModules: {
52
+ ...base.nativeModules || {},
53
+ ...override.nativeModules || {}
54
+ },
51
55
  env: { ...base.env || {}, ...override.env || {} },
52
56
  settings: {
53
57
  ...base.settings || {},
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (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;
@@ -54,10 +54,6 @@ function normalizeNativeDevBundleUrl(bundleUrl) {
54
54
  const parsed = new URL(bundleUrl, "http://soot.local");
55
55
  parsed.pathname = parsed.pathname.replace(/\.\.bundle$/, ".bundle");
56
56
  if (!isNativeDevBundlePath(parsed.pathname)) return bundleUrl;
57
- if (!parsed.searchParams.has("dev")) parsed.searchParams.set("dev", "true");
58
- if (!parsed.searchParams.has("minify")) {
59
- parsed.searchParams.set("minify", "false");
60
- }
61
57
  parsed.searchParams.delete("transform.bytecode");
62
58
  if (isAbsolute) return parsed.toString();
63
59
  return `${parsed.pathname}${parsed.search}${parsed.hash}`;
@@ -118,16 +114,6 @@ function isBaseServerUrl(url) {
118
114
  const path = url.pathname || "/";
119
115
  return (path === "/" || path === "") && !url.search && !url.hash;
120
116
  }
121
- async function hasDirectOneBundle(baseUrl) {
122
- try {
123
- const oneRes = await fetchDevProbe(`${baseUrl}${ONE_BUNDLE_PATH}`, {
124
- method: "HEAD"
125
- });
126
- return oneRes.ok;
127
- } catch {
128
- return false;
129
- }
130
- }
131
117
  async function probeBaseUrlBundle(baseUrl, port) {
132
118
  const normalizedBaseUrl = baseUrl.replace(/\/+$/, "");
133
119
  try {
@@ -139,49 +125,18 @@ async function probeBaseUrlBundle(baseUrl, port) {
139
125
  const client = manifest?.extra?.expoClient || manifest?.extra || {};
140
126
  const launchUrl = typeof manifest?.launchAsset?.url === "string" ? manifest.launchAsset.url : void 0;
141
127
  if (launchUrl || client.name) {
142
- const framework = inferManifestFramework(launchUrl, client.sdkVersion);
143
- const bundleUrl = framework === "one" && await hasDirectOneBundle(normalizedBaseUrl) ? `${normalizedBaseUrl}${ONE_BUNDLE_PATH}` : normalizeNativeDevBundleUrl(
144
- launchUrl || `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`
145
- );
146
128
  return {
147
- bundleUrl,
129
+ bundleUrl: normalizeNativeDevBundleUrl(
130
+ launchUrl || `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`
131
+ ),
148
132
  port,
149
- framework,
133
+ framework: inferManifestFramework(launchUrl, client.sdkVersion),
150
134
  projectName: client.name
151
135
  };
152
136
  }
153
137
  }
154
138
  } catch {
155
139
  }
156
- try {
157
- const oneRes = await fetchDevProbe(`${normalizedBaseUrl}${ONE_BUNDLE_PATH}`, {
158
- method: "HEAD"
159
- });
160
- if (oneRes.ok) {
161
- return {
162
- bundleUrl: `${normalizedBaseUrl}${ONE_BUNDLE_PATH}`,
163
- port,
164
- framework: "one"
165
- };
166
- }
167
- } catch {
168
- }
169
- try {
170
- const metroBundleRes = await fetchDevProbe(
171
- `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`,
172
- {
173
- method: "HEAD"
174
- }
175
- );
176
- if (metroBundleRes.ok) {
177
- return {
178
- bundleUrl: `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`,
179
- port,
180
- framework: "metro"
181
- };
182
- }
183
- } catch {
184
- }
185
140
  try {
186
141
  const statusRes = await fetchDevProbe(`${normalizedBaseUrl}/status`);
187
142
  if (statusRes.ok) {
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (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;
@@ -43,14 +43,21 @@ __export(home_paths_exports, {
43
43
  claimDaemonLockfile: () => claimDaemonLockfile,
44
44
  compareSemver: () => compareSemver,
45
45
  configFilePath: () => configFilePath,
46
+ daemonAppBundlePath: () => daemonAppBundlePath,
47
+ daemonAppDir: () => daemonAppDir,
48
+ daemonAppLauncherPath: () => daemonAppLauncherPath,
46
49
  daemonLockfilePath: () => daemonLockfilePath,
47
50
  electronDir: () => electronDir,
51
+ electronUserDataDir: () => electronUserDataDir,
48
52
  electronVersionDir: () => electronVersionDir,
49
53
  ensureSootsimHome: () => ensureSootsimHome,
50
54
  isDaemonLockfileFresh: () => isDaemonLockfileFresh,
55
+ isSootsimDevCheckout: () => isSootsimDevCheckout,
51
56
  listInstalledRuntimes: () => listInstalledRuntimes,
57
+ profilesDir: () => profilesDir,
52
58
  readActiveRuntime: () => readActiveRuntime,
53
59
  readDaemonLockfile: () => readDaemonLockfile,
60
+ readSharedConfig: () => readSharedConfig,
54
61
  readTelemetryEnabled: () => readTelemetryEnabled,
55
62
  removeDaemonLockfile: () => removeDaemonLockfile,
56
63
  runtimeDir: () => runtimeDir,
@@ -58,12 +65,13 @@ __export(home_paths_exports, {
58
65
  sootsimHomeDir: () => sootsimHomeDir,
59
66
  writeActiveRuntime: () => writeActiveRuntime,
60
67
  writeDaemonLockfile: () => writeDaemonLockfile,
68
+ writeSharedConfig: () => writeSharedConfig,
61
69
  writeTelemetryEnabled: () => writeTelemetryEnabled
62
70
  });
63
71
  module.exports = __toCommonJS(home_paths_exports);
64
- var import_fs = __toESM(require("fs"), 1);
65
- var import_os = require("os");
66
- var import_path = __toESM(require("path"), 1);
72
+ var import_node_fs = __toESM(require("node:fs"), 1);
73
+ var import_node_os = require("node:os");
74
+ var import_node_path = __toESM(require("node:path"), 1);
67
75
  var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
68
76
  var ACTIVE_RUNTIME_FILE = "active";
69
77
  var DAEMON_LOCKFILE = "daemon.json";
@@ -71,76 +79,116 @@ var CONFIG_FILE = "config.json";
71
79
  var DAEMON_HEARTBEAT_STALE_MS = 3e4;
72
80
  function sootsimHomeDir() {
73
81
  const override = process.env[SOOTSIM_HOME_ENV];
74
- if (override && override.length > 0) return import_path.default.resolve(override);
75
- return import_path.default.join((0, import_os.homedir)(), ".sootsim");
82
+ if (override && override.length > 0) return import_node_path.default.resolve(override);
83
+ return import_node_path.default.join((0, import_node_os.homedir)(), ".sootsim");
84
+ }
85
+ function isSootsimDevCheckout() {
86
+ if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
87
+ const env = process.env.SOOTSIM_DEV;
88
+ if (env === "1" || env === "true") return true;
89
+ if (env === "0" || env === "false") return false;
90
+ const argv1 = process.argv[1];
91
+ if (!argv1) return false;
92
+ try {
93
+ const real = import_node_fs.default.realpathSync(argv1);
94
+ return real.includes(`${import_node_path.default.sep}packages${import_node_path.default.sep}sootsim${import_node_path.default.sep}`);
95
+ } catch {
96
+ return false;
97
+ }
76
98
  }
77
99
  function runtimesDir() {
78
- return import_path.default.join(sootsimHomeDir(), "runtimes");
100
+ return import_node_path.default.join(sootsimHomeDir(), "runtimes");
79
101
  }
80
102
  function runtimeDir(version) {
81
- return import_path.default.join(runtimesDir(), version);
103
+ return import_node_path.default.join(runtimesDir(), version);
82
104
  }
83
105
  function activeRuntimeFile() {
84
- return import_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
106
+ return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
85
107
  }
86
108
  function electronDir() {
87
- return import_path.default.join(sootsimHomeDir(), "electron");
109
+ return import_node_path.default.join(sootsimHomeDir(), "electron");
110
+ }
111
+ function electronUserDataDir() {
112
+ return import_node_path.default.join(electronDir(), "userData");
88
113
  }
89
114
  function electronVersionDir(version) {
90
- return import_path.default.join(electronDir(), version);
115
+ return import_node_path.default.join(electronDir(), version);
116
+ }
117
+ function profilesDir() {
118
+ return import_node_path.default.join(sootsimHomeDir(), "profiles");
119
+ }
120
+ function daemonAppDir() {
121
+ return import_node_path.default.join(sootsimHomeDir(), "daemon-app");
122
+ }
123
+ function daemonAppBundlePath() {
124
+ return import_node_path.default.join(daemonAppDir(), "SootSim Daemon.app");
125
+ }
126
+ function daemonAppLauncherPath() {
127
+ return import_node_path.default.join(daemonAppBundlePath(), "Contents", "MacOS", "sootsim-daemon");
91
128
  }
92
129
  function cacheDir() {
93
- return import_path.default.join(sootsimHomeDir(), "cache");
130
+ return import_node_path.default.join(sootsimHomeDir(), "cache");
94
131
  }
95
132
  function daemonLockfilePath() {
96
- return import_path.default.join(sootsimHomeDir(), DAEMON_LOCKFILE);
133
+ return import_node_path.default.join(sootsimHomeDir(), DAEMON_LOCKFILE);
97
134
  }
98
135
  function configFilePath() {
99
- return import_path.default.join(sootsimHomeDir(), CONFIG_FILE);
136
+ return import_node_path.default.join(sootsimHomeDir(), CONFIG_FILE);
100
137
  }
101
138
  function readSharedConfig() {
102
139
  try {
103
- const raw = import_fs.default.readFileSync(configFilePath(), "utf8");
140
+ const raw = import_node_fs.default.readFileSync(configFilePath(), "utf8");
104
141
  const parsed = JSON.parse(raw);
105
142
  return parsed && typeof parsed === "object" ? parsed : {};
106
143
  } catch {
107
144
  return {};
108
145
  }
109
146
  }
110
- function readTelemetryEnabled() {
111
- const cfg = readSharedConfig();
112
- return cfg.telemetry !== false;
113
- }
114
- function writeTelemetryEnabled(enabled) {
147
+ function writeSharedConfig(patch) {
115
148
  ensureSootsimHome();
116
- const cfg = readSharedConfig();
117
- cfg.telemetry = enabled;
149
+ const current = readSharedConfig();
150
+ const next = { ...current, ...patch };
151
+ if (patch.settings && typeof patch.settings === "object") {
152
+ next.settings = {
153
+ ...current.settings && typeof current.settings === "object" ? current.settings : {},
154
+ ...patch.settings
155
+ };
156
+ }
118
157
  const tmp = `${configFilePath()}.tmp`;
119
- import_fs.default.writeFileSync(tmp, `${JSON.stringify(cfg, null, 2)}
158
+ import_node_fs.default.writeFileSync(tmp, `${JSON.stringify(next, null, 2)}
120
159
  `, "utf8");
121
- import_fs.default.renameSync(tmp, configFilePath());
160
+ import_node_fs.default.renameSync(tmp, configFilePath());
161
+ return next;
162
+ }
163
+ function readTelemetryEnabled() {
164
+ return readSharedConfig().telemetry !== false;
165
+ }
166
+ function writeTelemetryEnabled(enabled) {
167
+ writeSharedConfig({ telemetry: enabled });
122
168
  }
123
169
  function ensureSootsimHome() {
124
- import_fs.default.mkdirSync(sootsimHomeDir(), { recursive: true });
125
- import_fs.default.mkdirSync(runtimesDir(), { recursive: true });
126
- import_fs.default.mkdirSync(cacheDir(), { recursive: true });
170
+ import_node_fs.default.mkdirSync(sootsimHomeDir(), { recursive: true });
171
+ import_node_fs.default.mkdirSync(runtimesDir(), { recursive: true });
172
+ import_node_fs.default.mkdirSync(electronDir(), { recursive: true });
173
+ import_node_fs.default.mkdirSync(profilesDir(), { recursive: true });
174
+ import_node_fs.default.mkdirSync(cacheDir(), { recursive: true });
127
175
  }
128
176
  function readActiveRuntime() {
129
177
  try {
130
- const value = import_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
178
+ const value = import_node_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
131
179
  return value.length > 0 ? value : null;
132
180
  } catch {
133
181
  return null;
134
182
  }
135
183
  }
136
184
  function writeActiveRuntime(version) {
137
- import_fs.default.mkdirSync(runtimesDir(), { recursive: true });
138
- import_fs.default.writeFileSync(activeRuntimeFile(), `${version}
185
+ import_node_fs.default.mkdirSync(runtimesDir(), { recursive: true });
186
+ import_node_fs.default.writeFileSync(activeRuntimeFile(), `${version}
139
187
  `, "utf8");
140
188
  }
141
189
  function listInstalledRuntimes() {
142
190
  try {
143
- return import_fs.default.readdirSync(runtimesDir(), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort(compareSemver);
191
+ return import_node_fs.default.readdirSync(runtimesDir(), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort(compareSemver);
144
192
  } catch {
145
193
  return [];
146
194
  }
@@ -171,7 +219,7 @@ function activeRuntimeDir() {
171
219
  if (!version) return null;
172
220
  const dir = runtimeDir(version);
173
221
  try {
174
- if (import_fs.default.statSync(dir).isDirectory()) return dir;
222
+ if (import_node_fs.default.statSync(dir).isDirectory()) return dir;
175
223
  } catch {
176
224
  }
177
225
  return null;
@@ -179,10 +227,10 @@ function activeRuntimeDir() {
179
227
  var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
180
228
  function readDaemonLockfile() {
181
229
  try {
182
- const fd = import_fs.default.openSync(daemonLockfilePath(), "r");
230
+ const fd = import_node_fs.default.openSync(daemonLockfilePath(), "r");
183
231
  try {
184
232
  const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
185
- const bytesRead = import_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
233
+ const bytesRead = import_node_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
186
234
  const raw = buf.subarray(0, bytesRead).toString("utf8");
187
235
  const parsed = JSON.parse(raw);
188
236
  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") {
@@ -190,7 +238,7 @@ function readDaemonLockfile() {
190
238
  }
191
239
  return null;
192
240
  } finally {
193
- import_fs.default.closeSync(fd);
241
+ import_node_fs.default.closeSync(fd);
194
242
  }
195
243
  } catch {
196
244
  return null;
@@ -209,9 +257,9 @@ function isDaemonLockfileFresh(lock, now = Date.now()) {
209
257
  function writeDaemonLockfile(data) {
210
258
  ensureSootsimHome();
211
259
  const tmp = `${daemonLockfilePath()}.tmp`;
212
- import_fs.default.writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
260
+ import_node_fs.default.writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
213
261
  `, "utf8");
214
- import_fs.default.renameSync(tmp, daemonLockfilePath());
262
+ import_node_fs.default.renameSync(tmp, daemonLockfilePath());
215
263
  }
216
264
  function claimDaemonLockfile(data) {
217
265
  ensureSootsimHome();
@@ -224,7 +272,7 @@ function claimDaemonLockfile(data) {
224
272
  }
225
273
  function removeDaemonLockfile() {
226
274
  try {
227
- import_fs.default.unlinkSync(daemonLockfilePath());
275
+ import_node_fs.default.unlinkSync(daemonLockfilePath());
228
276
  } catch {
229
277
  }
230
278
  }
@@ -241,14 +289,21 @@ function removeDaemonLockfile() {
241
289
  claimDaemonLockfile,
242
290
  compareSemver,
243
291
  configFilePath,
292
+ daemonAppBundlePath,
293
+ daemonAppDir,
294
+ daemonAppLauncherPath,
244
295
  daemonLockfilePath,
245
296
  electronDir,
297
+ electronUserDataDir,
246
298
  electronVersionDir,
247
299
  ensureSootsimHome,
248
300
  isDaemonLockfileFresh,
301
+ isSootsimDevCheckout,
249
302
  listInstalledRuntimes,
303
+ profilesDir,
250
304
  readActiveRuntime,
251
305
  readDaemonLockfile,
306
+ readSharedConfig,
252
307
  readTelemetryEnabled,
253
308
  removeDaemonLockfile,
254
309
  runtimeDir,
@@ -256,5 +311,6 @@ function removeDaemonLockfile() {
256
311
  sootsimHomeDir,
257
312
  writeActiveRuntime,
258
313
  writeDaemonLockfile,
314
+ writeSharedConfig,
259
315
  writeTelemetryEnabled
260
316
  });