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,5 +1,5 @@
1
- /*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-LHDWH7VS.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-VIEK76DX.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim compat \u2014 check package compatibility
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-LHDWH7VS.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-VIEK76DX.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim config \u2014 manage sootsim configuration
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m}from"./chunk-CHMHTTI7.js";import"./chunk-E473YTRQ.js";import"./chunk-SKNHJDYO.js";import"./chunk-JJVZMGRM.js";import"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-FRE5TY3C.js";import"./chunk-FX3PPKSJ.js";import"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";export{d as buildOpenUrl,c as buildShellUrl,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,l as runClaimCommand,m as runCloseCommand,k as runFocusCommand,h as runListCommand,i as runOpenCommand,j as runUseCommand,e as summarizeSimUrl,g as waitForSimMatch};
@@ -0,0 +1,22 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as I,e as N,i as S}from"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{createWriteStream as v,mkdirSync as k,writeFileSync as w}from"fs";import{dirname as C,resolve as T}from"path";import{Readable as x}from"stream";import{pipeline as y}from"stream/promises";import{createGzip as F}from"zlib";async function E(r,l){if(r.includes("--help")||r.includes("-h"))return console.log(`
3
+ sootsim cpu-profile \u2014 capture a sampled CPU trace from the tenant worker
4
+
5
+ usage:
6
+ sootsim cpu-profile [options]
7
+
8
+ options:
9
+ --duration <seconds> recording duration (default: 5)
10
+ --output <path> output file (default: /tmp/sootsim.cpuprofile)
11
+ if the path ends in .gz, the output is gzipped
12
+ --sample-interval <ms> requested sample interval in ms (default: 10 \u2014
13
+ chrome may clamp upward)
14
+ --max-buffer <n> max samples buffered (default: 100000)
15
+ --sim <sim> target a specific sim
16
+ --port <number> ws bridge port (default: 7668)
17
+
18
+ examples:
19
+ sootsim cpu-profile --duration 3
20
+ sootsim cpu-profile --duration 10 --output /tmp/after.cpuprofile.gz
21
+ sootsim cpu-profile --duration 3 -o /tmp/before.cpuprofile
22
+ `),0;let n=Number(b(r,"--duration")??"5");if(!Number.isFinite(n)||n<=0)return console.error(" --duration must be a positive number (seconds)"),1;let m=Number(b(r,"--sample-interval")??"10");if(!Number.isFinite(m)||m<=0)return console.error(" --sample-interval must be a positive number (milliseconds)"),1;let s=Number(b(r,"--max-buffer")??"100000");if(!Number.isFinite(s)||s<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(r,"--output")??b(r,"-o"),u=T(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=u.endsWith(".gz"),h=I(r,{port:l.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(n+20)*1e3)});try{let a=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:m,maxBufferSize:s});if(!a?.started)return console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `bun sootsim list`)"),1;l.verbose&&console.error(` started: sampleInterval=${a.sampleInterval}ms buffer=${a.maxBufferSize}`),console.log(` recording for ${n}s\u2026`),await new Promise(o=>setTimeout(o,n*1e3));let t=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!t||t.error||!t.trace)return console.error(` profile capture failed: ${t?.error??"no trace returned"}`),t?.error?.includes("not available")&&(console.error(" your browser or page is missing the JS Self-Profiler API."),console.error(" requires chromium-based browser and Document-Policy: js-profiling.")),1;let P=z(t.trace),e=JSON.stringify(P);k(C(u),{recursive:!0}),g?await y(x.from([e]),F(),v(u)):w(u,e);let i=(Buffer.byteLength(e)/1024/1024).toFixed(2);return console.log(` samples: ${P.samples.length} (${i} MB uncompressed)`),console.log(` saved: ${u}`),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}catch(a){let t=a?.message??String(a);return console.error(` profile failed: ${t}`),/could not connect|ECONNREFUSED/i.test(t)&&console.error(" is sootsim running? (try `bun sootsim list`)"),1}finally{c.close()}}function z(r){let l=r.frames??[],n=r.resources??[],m=r.stacks??[],s=r.samples??[],p=1,u=[{id:p,callFrame:{functionName:"(root)",scriptId:"0",url:"",lineNumber:-1,columnNumber:-1},hitCount:0,children:[]}];for(let e=0;e<m.length;e++){let i=m[e],o=l[i.frameId]??{name:"(unknown)"},f=o.resource!==void 0?n[o.resource]??"":"";u.push({id:e+2,callFrame:{functionName:o.name||"(anonymous)",scriptId:o.resource!==void 0?String(o.resource):"0",url:f,lineNumber:typeof o.line=="number"?o.line-1:-1,columnNumber:typeof o.column=="number"?o.column-1:-1},hitCount:0,children:[]})}for(let e=0;e<m.length;e++){let i=m[e],o=e+2,f=i.parentId!==void 0?i.parentId+2:p,d=u[f-1];d&&!d.children.includes(o)&&d.children.push(o)}let g=[],h=[],c=s.length>0?s[0].timestamp:0,a=c;for(let e=0;e<s.length;e++){let i=s[e],o=i.stackId!==void 0?i.stackId+2:p;g.push(o);let f=u[o-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-a;h.push(Math.max(0,Math.round(d*1e3))),a=i.timestamp}let t=Math.round(c*1e3),P=s.length>0?Math.round(s[s.length-1].timestamp*1e3):t;return{nodes:u,startTime:t,endTime:P,samples:g,timeDeltas:h}}function b(r,l){let n=r.indexOf(l);if(!(n<0||n===r.length-1))return r[n+1]}export{E as runCpuProfile};
@@ -0,0 +1,83 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as T,b as _}from"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import"./chunk-23YMXBQ2.js";import{g as I,o as C,p as w,q as B}from"./chunk-6UJXRT7F.js";import{a as W}from"./chunk-VIEK76DX.js";import{execFileSync as tt,spawnSync as n}from"child_process";import{existsSync as a,mkdirSync as v,readFileSync as et,rmSync as S,writeFileSync as R}from"fs";import{homedir as $}from"os";import{dirname as U,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as H,mkdirSync as D,rmSync as K,writeFileSync as L}from"fs";import{dirname as P}from"path";var X="dev.sootsim.daemon",N="SootSim Daemon",O="0.1.36";function F(t,e,r){let o=w(),s=B(),i=P(P(s)),f=P(s),u=`${i}/Resources`;K(o,{recursive:!0,force:!0}),D(C(),{recursive:!0}),D(f,{recursive:!0}),D(u,{recursive:!0}),L(`${i}/Info.plist`,Q()),L(`${i}/PkgInfo`,"APPL????"),L(s,z(t,e,r)),H(s,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(c){let g=c instanceof Error?c.message:String(c);console.warn(` warning: ad-hoc codesign of ${o} failed: ${g}
3
+ the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:s}}function Q(){return`<?xml version="1.0" encoding="UTF-8"?>
4
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5
+ <plist version="1.0">
6
+ <dict>
7
+ <key>CFBundleDevelopmentRegion</key><string>en</string>
8
+ <key>CFBundleDisplayName</key><string>${N}</string>
9
+ <key>CFBundleExecutable</key><string>sootsim-daemon</string>
10
+ <key>CFBundleIdentifier</key><string>${X}</string>
11
+ <key>CFBundleInfoDictionaryVersion</key><string>6.0</string>
12
+ <key>CFBundleName</key><string>${N}</string>
13
+ <key>CFBundlePackageType</key><string>APPL</string>
14
+ <key>CFBundleShortVersionString</key><string>${O}</string>
15
+ <key>CFBundleSignature</key><string>????</string>
16
+ <key>CFBundleVersion</key><string>${O}</string>
17
+ <key>LSBackgroundOnly</key><true/>
18
+ <key>LSUIElement</key><true/>
19
+ <key>LSMinimumSystemVersion</key><string>13.0</string>
20
+ <key>NSHumanReadableCopyright</key><string>Tamagui LLC</string>
21
+ </dict>
22
+ </plist>
23
+ `}function z(t,e,r){let s=[t.executable,...t.prefixArgs,"server","--quiet","--port",String(e)].map(J).join(" ");return`#!/bin/sh
24
+ # SootSim Daemon launcher \u2014 auto-generated by 'sootsim daemon install'.
25
+ # launchd spawns this; we exec the real sootsim invocation in place so
26
+ # launchd tracks the daemon process, not the shell wrapper.
27
+ #
28
+ # stdout: ${r.stdout}
29
+ # stderr: ${r.stderr}
30
+ exec ${s}
31
+ `}function J(t){return`'${t.replace(/'/g,"'\\''")}'`}var q=60,p="dev.sootsim.daemon",E="dev.sootsim.server",d="sootsim-server",h=m($(),"Library/Logs/sootsim"),rt=m($(),".local/state/sootsim");async function At(t,e={}){let[r,...o]=t,s=e.port??7668;if(!r||r==="--help"||r==="-h"){M();return}new Set(["install","uninstall","restart","start","stop"]).has(r)&&T({event:`daemon_${r}`,properties:{platform:process.platform,subsource:"daemon"}});try{switch(r){case"install":return await lt({port:s,force:o.includes("--force")});case"uninstall":return await ut();case"status":return await dt();case"restart":return await mt();case"start":return await pt();case"stop":return await gt();default:console.error(` unknown daemon subcommand: ${r}`),M(),process.exit(1)}}finally{await _()}}function M(){console.log(`
32
+ sootsim daemon \u2014 manage the sootsim bridge daemon
33
+
34
+ the daemon is registered automatically on first CLI use, so you usually
35
+ don't need to run any of these subcommands. use them to inspect or remove
36
+ the launchd/systemd agent.
37
+
38
+ usage:
39
+ sootsim daemon uninstall stop and remove the login agent
40
+ sootsim daemon status show whether the agent is installed + running
41
+ sootsim daemon restart restart the agent (use after 'npm update -g sootsim')
42
+ sootsim daemon start start the installed agent
43
+ sootsim daemon stop stop the running agent
44
+
45
+ examples:
46
+ sootsim daemon status
47
+ sootsim daemon restart
48
+ sootsim daemon uninstall
49
+ `)}function ot(){let t=st();return{executable:process.execPath,prefixArgs:[t]}}function st(){try{let e=tt("which",["sootsim"],{encoding:"utf8"}).trim();if(e&&a(e))return V(e)}catch{}let t=process.argv[1];if(t&&a(t))return V(t);throw new Error("could not locate the sootsim binary")}function V(t){try{return W("fs").realpathSync(t)}catch{return t}}function nt(t,e){v(h,{recursive:!0});let r=m(h,"server.out.log"),o=m(h,"server.err.log"),{launcherPath:s}=F(t,e,{stdout:r,stderr:o}),i=` <string>${at(s)}</string>`;return`<?xml version="1.0" encoding="UTF-8"?>
50
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
51
+ <plist version="1.0">
52
+ <dict>
53
+ <key>Label</key><string>${p}</string>
54
+ <key>ProgramArguments</key>
55
+ <array>
56
+ ${i}
57
+ </array>
58
+ <key>RunAtLoad</key><true/>
59
+ <key>KeepAlive</key><true/>
60
+ <key>ThrottleInterval</key><integer>${q}</integer>
61
+ <key>ProcessType</key><string>Background</string>
62
+ <key>StandardOutPath</key><string>${r}</string>
63
+ <key>StandardErrorPath</key><string>${o}</string>
64
+ </dict>
65
+ </plist>
66
+ `}function it(t,e){return v(rt,{recursive:!0}),`[Unit]
67
+ Description=sootsim bridge daemon
68
+ After=default.target
69
+
70
+ [Service]
71
+ Type=simple
72
+ ExecStart=${[t.executable,...t.prefixArgs].map(ct).join(" ")} server --quiet --port ${e}
73
+ Restart=always
74
+ RestartSec=${q}
75
+
76
+ [Install]
77
+ WantedBy=default.target
78
+ `}function at(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function ct(t){return/[^\w@%+=:,./-]/.test(t)?`'${t.replace(/'/g,"'\\''")}'`:t}function b(){return m($(),"Library/LaunchAgents",`${p}.plist`)}function j(){return m($(),"Library/LaunchAgents",`${E}.plist`)}function x(){return m($(),".config/systemd/user",`${d}.service`)}function G(){let t=j();return a(t)?(n("launchctl",["bootout",`gui/${process.getuid()}/${E}`],{stdio:"ignore"}),S(t,{force:!0}),!0):!1}async function lt({port:t,force:e}){if(I())throw new Error(`refusing to install the persistent sootsim daemon agent from a dev checkout.
79
+ the launchd / systemd agent would point at workspace artifacts that change
80
+ between sessions, and would serve stale prod-built engine assets instead of
81
+ the live \`bun dev:sootsim\` output. start the daemon manually in another
82
+ shell with: bun sootsim server
83
+ (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to override.)`);let r=ot();if(console.log(` binary: ${[r.executable,...r.prefixArgs].join(" ")}`),console.log(` port: ${t}`),process.platform==="darwin"){G()&&console.log(` migrated away from legacy ${E} plist`);let o=b();if(a(o)&&!e){console.log(` already installed at ${o}`),console.log(" pass --force to overwrite, or use 'sootsim daemon restart' to reload");return}v(U(o),{recursive:!0}),R(o,nt(r,t)),console.log(` wrote ${o}`);let s=`gui/${process.getuid()}`,i=`${s}/${p}`,f=()=>{let l=n("launchctl",["bootstrap",s,o],{stdio:"pipe",encoding:"utf8"}),k=(l.stderr||l.stdout||"").trim();if(l.status!==0)return{ok:!1,reason:`bootstrap exit ${l.status}${k?`: ${k}`:""}`};let A=n("launchctl",["print",i],{encoding:"utf8"});return A.status!==0?{ok:!1,reason:`bootstrap returned 0 but service not registered (print exit ${A.status})`}:{ok:!0}},u=f();if(!u.ok){let l=u.reason;if(n("launchctl",["bootout",i],{stdio:"ignore"}),u=f(),!u.ok)throw new Error(`launchctl bootstrap failed: ${u.reason}`+(l!==u.reason?` (initial: ${l})`:"")+" \u2014 try `sootsim daemon uninstall` then retry, or reboot if launchd state is stuck.")}let c=Date.now()+4e3,g,y;for(;Date.now()<c;){let l=n("launchctl",["print",i],{encoding:"utf8"});if(l.status===0&&(g=l.stdout?.match(/state\s*=\s*(\w+)/)?.[1],y=l.stdout?.match(/pid\s*=\s*(\d+)/)?.[1],g==="running"||y))break;await new Promise(k=>setTimeout(k,150))}if(g!=="running"&&!y)throw new Error(`daemon registered but did not reach running state within 4s (last state: ${g||"unknown"}). check ${m(h,"server.err.log")} \u2014 typically a stale runtime or a port already bound by another process.`);console.log(` registered (state: ${g||"unknown"}${y?`, pid ${y}`:""}, log: ${m(h,"server.err.log")})`);return}if(process.platform==="linux"){let o=x();if(a(o)&&!e){console.log(` already installed at ${o}`),console.log(" pass --force to overwrite, or use 'sootsim daemon restart' to reload");return}v(U(o),{recursive:!0}),R(o,it(r,t)),console.log(` wrote ${o}`);let s=n("systemctl",["--user","daemon-reload"],{stdio:"pipe",encoding:"utf8"});if(s.status!==0){let c=(s.stderr||s.stdout||"").trim();throw new Error(`systemctl daemon-reload failed${c?`: ${c}`:""}`)}let i=n("systemctl",["--user","enable","--now",d],{stdio:"pipe",encoding:"utf8"});if(i.status!==0){let c=(i.stderr||i.stdout||"").trim();throw new Error(`systemctl enable --now failed${c?`: ${c}`:""} \u2014 try \`sootsim daemon uninstall\` then retry.`)}let u=(n("systemctl",["--user","is-active",d],{encoding:"utf8"}).stdout||"").trim()||"unknown";console.log(` registered (state: ${u}, journalctl --user -u ${d} to tail logs)`);return}console.error(` sootsim daemon install is not supported on ${process.platform}`),console.error(" run 'sootsim server' in a persistent shell instead"),process.exit(1)}async function ut(){if(process.platform==="darwin"){let t=b(),e=G();e&&console.log(` removed legacy ${j()}`);let r=a(t);r&&(n("launchctl",["bootout",`gui/${process.getuid()}/${p}`],{stdio:"ignore"}),S(t,{force:!0}),console.log(` removed ${t}`));let o=w();a(o)&&(S(o,{recursive:!0,force:!0}),console.log(` removed ${o}`)),!r&&!e&&console.log(" not installed");return}if(process.platform==="linux"){let t=x();if(!a(t)){console.log(" not installed");return}n("systemctl",["--user","disable","--now",d],{stdio:"ignore"}),S(t,{force:!0}),n("systemctl",["--user","daemon-reload"],{stdio:"ignore"}),console.log(` removed ${t}`);return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function dt(){if(process.platform==="darwin"){let t=b();if(!a(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let e=ft(t);e&&console.log(` binary: ${e}`);let r=n("launchctl",["print",`gui/${process.getuid()}/${p}`],{encoding:"utf8"});if(r.status===0){let o=r.stdout.match(/state\s*=\s*(\w+)/)?.[1],s=r.stdout.match(/pid\s*=\s*(\d+)/)?.[1];console.log(` state: ${o||"unknown"}${s?` (pid ${s})`:""}`)}else console.log(" state: not running");return}if(process.platform==="linux"){let t=x();if(!a(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let e=n("systemctl",["--user","is-active",d],{encoding:"utf8"});console.log(` state: ${e.stdout.trim()||"unknown"}`);return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function mt(){if(process.platform==="darwin"){let t=b();a(t)||(console.error(" daemon not registered \u2014 run any sootsim command to bootstrap it"),process.exit(1));let e=n("launchctl",["kickstart","-k",`gui/${process.getuid()}/${p}`],{stdio:"pipe",encoding:"utf8"});e.status!==0&&(console.error(` kickstart failed: ${e.stderr?.trim()}`),process.exit(1)),console.log(" restarted");return}if(process.platform==="linux"){let t=x();a(t)||(console.error(" daemon not registered \u2014 run any sootsim command to bootstrap it"),process.exit(1));let e=n("systemctl",["--user","restart",d],{stdio:"pipe",encoding:"utf8"});e.status!==0&&(console.error(` restart failed: ${e.stderr?.trim()}`),process.exit(1)),console.log(" restarted");return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function pt(){if(process.platform==="darwin"){n("launchctl",["kickstart",`gui/${process.getuid()}/${p}`],{stdio:"inherit"});return}if(process.platform==="linux"){n("systemctl",["--user","start",d],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function gt(){if(process.platform==="darwin"){n("launchctl",["bootout",`gui/${process.getuid()}/${p}`],{stdio:"inherit"});return}if(process.platform==="linux"){n("systemctl",["--user","stop",d],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}function ft(t){try{return et(t,"utf8").match(/<array>\s*<string>([^<]+)<\/string>/)?.[1]||null}catch{return null}}export{lt as daemonInstall,At as runDaemon};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.36 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as f}from"./chunk-CYCXOAVZ.js";import{b as N}from"./chunk-OXN2PEB7.js";import{c as v,e as $,g as S}from"./chunk-SMVJOWSV.js";import"./chunk-6GGMKFWJ.js";import"./chunk-ZEW3RF5Q.js";import"./chunk-5QIUJNT3.js";import"./chunk-LHDWH7VS.js";var A=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],x="__sootsimShellAnimationTrace",R="__sootsimDebugAnimation";function D(){console.log(`
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as f}from"./chunk-MTPWS4JK.js";import{b as N}from"./chunk-SKNHJDYO.js";import{c as v,e as $,g as S}from"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";var A=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],x="__sootsimShellAnimationTrace",R="__sootsimDebugAnimation";function D(){console.log(`
3
3
  sootsim debug \u2014 drive __sootsimDebug from the terminal
4
4
 
5
5
  usage:
@@ -49,7 +49,7 @@ subcommands:
49
49
 
50
50
  options:
51
51
  --port <port> WS bridge port (default: ${7668})
52
- --session <session-id> target a specific connected browser tab
52
+ --sim <sim> target a specific connected sim
53
53
  --pretty format JSON output for humans (default)
54
54
  --json compact JSON output for pipelines
55
55
 
@@ -167,7 +167,7 @@ examples:
167
167
  } : null,
168
168
  samples,
169
169
  }
170
- })()`}async function l(i,c){return S(i,c)}async function z(i,c){let g=v(i,{port:c.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),m=g.positional;(!m[0]||i.includes("--help")||i.includes("-h"))&&(D(),process.exit(0));let C=g.wsPort,k=g.browserId,n=!i.includes("--json"),y=k?` --session ${k}`:"",_=m[0],a=m.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(_)){let{runInspect:e}=await import("./inspect-POOPWUQI.js");await e(["debug",...i],{port:c.port,verbose:c.verbose});return}let o=$(g);try{switch(_){case"enable":{let e=O(a[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
170
+ })()`}async function l(i,c){return S(i,c)}async function z(i,c){let g=v(i,{port:c.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),m=g.positional;(!m[0]||i.includes("--help")||i.includes("-h"))&&(D(),process.exit(0));let C=g.wsPort,k=g.simId,n=!i.includes("--json"),y=k?` --sim ${k}`:"",_=m[0],a=m.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(_)){let{runInspect:e}=await import("./inspect-6FPPW7GS.js");await e(["debug",...i],{port:c.port,verbose:c.verbose});return}let o=$(g);try{switch(_){case"enable":{let e=O(a[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
171
171
  known: ${A.join(", ")}`),process.exit(1));let t=e.map(u=>JSON.stringify(u)).join(", "),s=await l(o,`window.__sootsimDebug.enable(${t})`);console.log(r({active:s},n));break}case"disable":{let e=O(a[0]),t=e.length>0?e.map(u=>JSON.stringify(u)).join(", "):"'all'",s=await l(o,`window.__sootsimDebug.disable(${t})`);console.log(r({active:s},n));break}case"toggle":{let e=a[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let t=await l(o,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(r({[e]:t},n));break}case"status":{let e=await l(o,"window.__sootsimDebug.status()");console.log(r(e,n));break}case"channels":{let e=await l(o,"window.__sootsimDebug.channels()");console.log(r(e,n));break}case"flags":{let e=await l(o,"window.__sootsimDebug.flags()");console.log(r(e,n));break}case"snapshot":{let e=a[0],t=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await l(o,`(() => { const s = ${t}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(r(s,n));break}case"snapshots":{let e=await l(o,"window.__sootsimDebug.snapshots()");console.log(r(e,n));break}case"diff":{let e=a[0],t=a[1];(!e||!t)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
172
172
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(t)});
173
173
  if (!d) return null;
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-VVUEWU2P.js";import"./chunk-VIEK76DX.js";export{a as APPS};
@@ -0,0 +1,49 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as S}from"./chunk-NSZBULGG.js";import"./chunk-QD22CQLH.js";import"./chunk-H6CG42HE.js";import"./chunk-CB4PUMI2.js";import"./chunk-FCOCFEBU.js";import"./chunk-LNRBXCUI.js";import"./chunk-CHMHTTI7.js";import"./chunk-E473YTRQ.js";import"./chunk-SKNHJDYO.js";import"./chunk-JJVZMGRM.js";import"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-VVUEWU2P.js";import"./chunk-ARH3T5NK.js";import"./chunk-UD5ILFN5.js";import"./chunk-FRE5TY3C.js";import"./chunk-Z2PBRNJP.js";import"./chunk-FX3PPKSJ.js";import"./chunk-GWQUPWVO.js";import"./chunk-ZEVZN3S4.js";import"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
3
+ sootsim detox \u2014 run detox-style tests against a sootsim shell
4
+
5
+ usage:
6
+ sootsim detox [testFiles...] run all tests under e2e/, test/e2e/, or detox/
7
+ sootsim detox --config <path> use a specific jest config
8
+ sootsim detox init scaffold sootsim-detox.config.cjs + sample test
9
+ sootsim detox --watch jest watch mode
10
+ sootsim detox --headed keep the sootsim shell window visible
11
+ sootsim detox -t <pattern> pass a jest --testNamePattern
12
+ sootsim detox --no-launch skip auto-launching a sootsim shell
13
+
14
+ sootsim detox auto-launches a sootsim shell if none is running on the
15
+ expected port. disable with --no-launch if you're managing the shell yourself.
16
+ `;async function B(e,s={}){if((e.includes("--help")||e.includes("-h"))&&(console.log(F),process.exit(0)),e[0]==="init")return U();let c=t=>{let o=e.indexOf(t);return o>=0?e[o+1]:void 0},r=t=>e.includes(t),w=r("--watch"),h=r("--headed"),O=r("--no-launch"),y=c("--config"),d=s.port||Number(process.env.SOOTSIM_PORT)||5173,j=e.filter((t,o)=>{if(t.startsWith("--")||t==="-t"||t==="-h")return!1;let m=e[o-1];return!(m==="--config"||m==="-t"||m==="--testNamePattern"||m==="--grep")}),T=e.filter(t=>t==="--runInBand"||t.startsWith("--maxWorkers=")),x=["e2e","test/e2e","detox"],l=process.env.SOOTSIM_TEST_DIR?n(process.cwd(),process.env.SOOTSIM_TEST_DIR):null;if(!l)for(let t of x){let o=n(process.cwd(),t);if(u(o)){l=o;break}}l||(console.error(` error: no detox tests found. expected one of: ${x.join(", ")}
17
+ run 'sootsim detox init' to scaffold a starter suite.`),process.exit(1)),O||await k(d);let i=["jest"],p=y||R(["sootsim-detox.config.cjs","jest.config.cjs","jest.config.js"]),a=null;if(p)i.push("--config",n(process.cwd(),p));else{let t=n(E(),"jest-preset.cjs");a=M(P(),`sootsim-detox-${process.pid}.config.cjs`);let o={rootDir:l,roots:["<rootDir>"],testMatch:["<rootDir>/**/*.test.ts","<rootDir>/**/*.test.js"]};f(a,`module.exports = { ...require(${JSON.stringify(t)}), ...${JSON.stringify(o)} }
18
+ `),i.push("--config",a)}w&&i.push("--watch");let g=c("-t")||c("--testNamePattern")||c("--grep");g&&i.push("-t",g),process.env.SOOTSIM_JEST_JSON==="1"&&i.push("--json"),process.env.SOOTSIM_JEST_OUTPUT_FILE&&i.push("--outputFile",process.env.SOOTSIM_JEST_OUTPUT_FILE),i.push(...T),i.push(...j),console.log(" sootsim detox"),console.log(` test dir: ${l}`),console.log(` port: ${d}${h?" (headed)":""}`),p&&console.log(` config: ${p}`);let v=D("npx",i,{cwd:process.cwd(),stdio:"inherit",env:{...process.env,SOOTSIM_TEST_DIR:l,SOOTSIM_PORT:String(d),SOOTSIM_HEADED:h?"1":"",SOOTSIM_URL:process.env.SOOTSIM_URL||`http://localhost:${d}`}}),b=await new Promise(t=>v.on("exit",o=>t(o||0)));if(a)try{I(a)}catch{}process.exit(b)}function R(e){for(let s of e)if(u(n(process.cwd(),s)))return s;return null}async function k(e){await S()||console.warn(` warn: no sootsim shell reachable on :${e}. start one with \`bun run dev:sootsim:shell\`
19
+ or pass --no-launch if you're managing the shell yourself.`)}function U(){let e=process.cwd(),s=n(e,"sootsim-detox.config.cjs");u(s)?console.log(` skip: ${s} already exists`):(f(s,`// sootsim detox jest config.
20
+ // extends the sootsim preset, which rewrites \`import ... from 'detox'\`
21
+ // to the sootsim driver and keeps your jest transforms intact.
22
+
23
+ /** @type {import('@jest/types').Config.InitialOptions} */
24
+ module.exports = {
25
+ preset: 'sootsim/detox/jest-preset',
26
+ rootDir: __dirname,
27
+ testMatch: ['<rootDir>/e2e/**/*.test.ts', '<rootDir>/e2e/**/*.test.js'],
28
+ }
29
+ `),console.log(` created ${s}`));let c=n(e,"e2e"),r=n(c,"example.test.ts");u(r)?console.log(` skip: ${r} already exists`):(_(c,{recursive:!0}),f(r,`// sample sootsim detox test. resolve \`detox\` via the jest preset in
30
+ // sootsim-detox.config.cjs \u2014 no extra imports required.
31
+
32
+ import { by, device, element, expect, waitFor } from 'detox'
33
+
34
+ describe('example', () => {
35
+ beforeAll(async () => {
36
+ await device.launchApp()
37
+ })
38
+
39
+ it('shows the welcome text', async () => {
40
+ await waitFor(element(by.text('Welcome'))).toBeVisible().withTimeout(5000)
41
+ })
42
+
43
+ it('taps a button by id', async () => {
44
+ await element(by.id('start-button')).tap()
45
+ await expect(element(by.id('home-screen'))).toBeVisible()
46
+ })
47
+ })
48
+ `),console.log(` created ${r}`)),console.log(`
49
+ next:`),console.log(" bun sootsim detox # run the sample"),console.log(" bun sootsim detox --watch"),process.exit(0)}export{B as runDetox};
@@ -0,0 +1,16 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-CB4PUMI2.js";import"./chunk-Z2PBRNJP.js";import"./chunk-GWQUPWVO.js";import{f as c,g as r,h as g}from"./chunk-ZEVZN3S4.js";import{c as d,e as l,h as a}from"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";function h(){console.log(`
3
+ sootsim device \u2014 inspect or change the live device preset for a sim
4
+
5
+ usage:
6
+ sootsim device
7
+ sootsim device get
8
+ sootsim device set <model> [--sim <id>]
9
+ sootsim device list
10
+
11
+ examples:
12
+ sootsim device
13
+ sootsim device set iphone-14
14
+ sootsim device set ipad-pro-13 --sim a7
15
+ `)}function v(t){let o=r(t);console.log(` ${t.padEnd(14)} ${String(o.width).padStart(4)}x${String(o.height).padEnd(4)} pt ${String(o.width*o.scale).padStart(4)}x${String(o.height*o.scale).padEnd(4)} px ${o.name}`)}async function u(t){let o=l(t);try{let s=await a(o,"SootSim.bridges.settings.get")??{deviceModel:null},i=typeof s.deviceModel=="string"?s.deviceModel:null;if(!i||!(i in c))return null;let e=r(i);return{model:i,width:e.width,height:e.height,scale:e.scale,name:e.name}}finally{o.close()}}async function x(t,o){(t.includes("--help")||t.includes("-h"))&&(h(),process.exit(0));let s=t[0];if(!s||s==="get"){let i=d(t,{port:o.port}),e=await u(i);e||(console.error(" error: could not read current device from the target sim"),process.exit(1)),console.log(` ${e.model} ${e.width}x${e.height} pt ${e.width*e.scale}x${e.height*e.scale} px ${e.name}`);return}if(s==="list"){console.log(` available devices:
16
+ `);for(let i of g())v(i);return}if(s==="set"){let i=t[1];i||(console.error(" error: device set expects a model"),process.exit(1)),i in c||(console.error(` error: unknown device "${i}"`),console.error(" run `sootsim device list` to see valid models"),process.exit(1));let e=d(t,{port:o.port}),m=l(e);try{let p=await a(m,"SootSim.bridges.settings.set","deviceModel",i),n=r(i);console.log(` ${p?"set":"kept"} device: ${i} (${n.width}x${n.height} pt, ${n.width*n.scale}x${n.height*n.scale} px)${p?" \u2014 reloading sim":""}`)}finally{m.close()}return}h(),console.error(` unknown subcommand: ${s}`),process.exit(1)}export{x as runDeviceCommand};
@@ -0,0 +1,41 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as v,e as R,h as b}from"./chunk-TR554AIH.js";import{b as $}from"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";function j(e){return e.ts??e.t??0}function F(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var W=new Set(["timeline","network","react","console","screen"]);function A(){console.log(`
3
+ sootsim diagnose \u2014 compact "what just went wrong?" report
4
+
5
+ usage:
6
+ sootsim diagnose recent [--since <duration>] [--include <csv>] [--json]
7
+
8
+ options:
9
+ --since <d> absolute window for timeline + network (e.g. 90s, 2m, 500ms; default 90s)
10
+ --include <csv> comma-separated dimensions: timeline, network, react, console, screen
11
+ (default: all)
12
+ --slow-threshold <n> network slow-request threshold in ms (default 1000)
13
+ --limit <n> rows to print per react table (default 8)
14
+ --json emit a single structured JSON document
15
+
16
+ the diagnose report runs every dimension in parallel against the same
17
+ sim and returns a grouped summary. use \`sootsim what-happened\`
18
+ for chronological events, \`sootsim network\` for full request inspection,
19
+ \`sootsim react summary\` for the React tables on their own.
20
+
21
+ examples:
22
+ sootsim diagnose recent
23
+ sootsim diagnose recent --since 30s --include network,react
24
+ sootsim diagnose recent --json > /tmp/diagnose.json
25
+ `)}function D(e,s){if(!e)return s;let o=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(e.trim());if(!o)return s;let r=Number(o[1]),t=o[2]??"ms";return t==="s"?r*1e3:t==="m"?r*6e4:r}function O(e){if(!e)return W;let s=new Set;for(let o of e.split(",")){let r=o.trim().toLowerCase();r&&s.add(r)}return s}function k(e,s){let o=e.indexOf(s);if(o>=0&&o+1<e.length)return e[o+1];let r=`${s}=`;return e.find(t=>t.startsWith(r))?.slice(r.length)}function E(e,s,o){let r=k(e,s);if(r===void 0)return o;let t=Number(r);return Number.isFinite(t)&&t>0?Math.round(t):o}async function P(e,s){let o={limit:500,since:Date.now()-s},t=(await b(e,"SootSim.bridges.timeline.recent",o)).events??[],i={},c=[],m=[],p=[];for(let u of t){i[u.kind]=(i[u.kind]??0)+1;let l=u.data,g=l&&typeof l=="object"?l.level:void 0;u.kind==="console"&&(g==="error"||g==="warn")&&c.push(u),(u.kind==="alert"||u.kind==="actionsheet"||u.kind==="picker")&&m.push(u),(u.kind==="screen"||u.kind==="route")&&p.push(u)}return{events:t,byKind:i,total:t.length,errors:c,alerts:m,screens:p}}async function B(e,s,o){let r=await e.send({type:"evaluate",code:`(() => {
26
+ const obs = window.__sootsimObservability;
27
+ if (!obs) return { ok: false };
28
+ return { ok: true, entries: obs.network.getSnapshot() };
29
+ })()`});if(!r||!r.ok)return{error:"observability bridge not installed"};let t=r.entries??[],i=Date.now()-s,c=t.filter(l=>(l.startTs??l.startedAt??0)>=i),m=c.filter(l=>!!l.error||l.status!=null&&l.status>=400),p=c.filter(l=>l.durationMs!=null&&l.durationMs>=o).sort((l,g)=>(g.durationMs??0)-(l.durationMs??0)),u=c.filter(l=>l.durationMs==null).length;return{total:c.length,failed:m,slow:p,inFlight:u,slowThresholdMs:o}}async function L(e,s){let[o,r]=await Promise.all([b(e,"SootSim.bridges.reactProfile.slow",{limit:s}),b(e,"SootSim.bridges.reactProfile.rerenders",{limit:s})]);return{commits:o.commits??r.commits??0,slow:o.rows??[],rerenders:r.rows??[],durationWarning:o.durationWarning,error:o.error??r.error}}async function C(e,s){let o=await e.send({type:"evaluate",code:`(() => {
30
+ const obs = window.__sootsimObservability;
31
+ if (!obs) return { ok: false };
32
+ return { ok: true, entries: obs.logs.getSnapshot() };
33
+ })()`});if(!o||!o.ok)return{error:"observability bridge not installed"};let r=Date.now()-s,i=(o.entries??[]).filter(c=>j(c)>=r&&(c.level==="error"||c.level==="warn"));return{entries:i.slice(-20),total:i.length}}function T(e){let s=e.error?"err":e.status!=null?String(e.status):"...",o=(e.method??"GET").padEnd(6),r=e.durationMs!=null?`${e.durationMs.toFixed(0)}ms`:"...",t=e.displayUrl??e.url,i=t.length>96?`${t.slice(0,92)}\u2026`:t;return` ${s.padStart(3)} ${o} ${r.padStart(7)} ${i} (${e.id})`}function N(e,s){let o=((e.t-s)/1e3).toFixed(2),r=e.t>=s?"-":"+",t=e.data,i="";if(t&&typeof t=="object"){let c=(t.message??"").toString().slice(0,120),m=(t.title??t.name??t.path??t.url??"").toString();i=[(t.phase??"").toString(),m,c].filter(Boolean).join(" \xB7 ")}return` -${o.padStart(5)}s [${e.kind}] ${i}`}function M(e,s,o){if(s.length===0)return`${o}(no rows)`;let r=e.map((i,c)=>Math.max(i.length,...s.map(m=>m[c]?.length??0))),t=i=>i.map((c,m)=>c.padEnd(r[m])).join(" ").trimEnd();return[t(e),t(e.map(i=>"-".repeat(i.length))),...s.map(t)].map(i=>`${o}${i}`).join(`
34
+ `)}async function q(e,s){if(e.includes("--help")||e.includes("-h"))return A(),0;let o=v(e,{port:s.port,stripBooleanFlags:["--json","--help","-h"],stripValueFlags:["--since","--include","--limit","--slow-threshold"]}),r=o.positional[0]??"recent";if(r!=="recent")return console.error(` unknown subcommand: ${r}`),console.error(" did you mean: sootsim diagnose recent ?"),1;let t=D(k(e,"--since"),9e4),i=O(k(e,"--include")),c=E(e,"--limit",8),m=E(e,"--slow-threshold",1e3),p=e.includes("--json"),u=R(o);try{let l=[],g=[];(i.has("timeline")||i.has("screen")||i.has("alert"))&&(g.push("timeline"),l.push(P(u,t))),(i.has("network")||i.has("fetch"))&&(g.push("network"),l.push(B(u,t,m))),i.has("react")&&(g.push("react"),l.push(L(u,c))),i.has("console")&&(g.push("console"),l.push(C(u,t)));let x=await Promise.all(l),w={};for(let n=0;n<g.length;n++)w[g[n]]=x[n];if(p)return console.log(JSON.stringify({generatedAt:Date.now(),sinceMs:t,include:Array.from(i),slices:w},null,2)),0;let S=Date.now();if(console.log(` diagnose recent (last ${(t/1e3).toFixed(0)}s, include: ${Array.from(i).sort().join(",")}):`),w.timeline){let n=w.timeline;console.log(`
35
+ timeline \u2014 ${n.total} event(s) in window`);let f=Object.entries(n.byKind).sort((a,d)=>d[1]-a[1]).map(([a,d])=>`${d} ${a}`).join(" \xB7 ");if(f&&console.log(` summary: ${f}`),n.screens.length){let d=n.screens[n.screens.length-1].data,h=d?d.name??d.activeName??d.path??"?":"?";console.log(` last screen: ${String(h)}`)}if(n.alerts.length){console.log(` alerts (${n.alerts.length}):`);for(let a of n.alerts.slice(-5))console.log(N(a,S))}if(n.errors.length){console.log(` console errors/warns from timeline (${n.errors.length}):`);for(let a of n.errors.slice(-5))console.log(N(a,S))}}if(w.network){let n=w.network;if("error"in n)console.log(`
36
+ network \u2014 ${n.error}`);else{if(console.log(`
37
+ network \u2014 ${n.total} request(s), ${n.failed.length} failed, ${n.slow.length} slow (>${n.slowThresholdMs}ms), ${n.inFlight} in-flight`),n.failed.length){console.log(" failed:");for(let f of n.failed.slice(-8))console.log(T(f))}if(n.slow.length){console.log(" slowest:");for(let f of n.slow.slice(0,5))console.log(T(f))}}}if(w.react){let n=w.react;console.log(`
38
+ react \u2014 ${n.commits} commit(s)`),n.error&&console.log(` warning: ${n.error}`),n.durationWarning&&console.log(` warning: ${n.durationWarning}`),n.slow.length>0&&n.slow.every(a=>a.totalMs<=0&&a.slowestMs<=0)&&!n.durationWarning&&console.log(" warning: every commit reports actualDuration=0ms \u2014 bundle has React profiler timer disabled"),n.slow.length&&(console.log(" slowest:"),console.log(M(["component","total","commits","slowest"],n.slow.slice(0,c).map(a=>[a.displayName,`${a.totalMs.toFixed(2)}ms`,String(a.commitCount),`${a.slowestMs.toFixed(2)}ms`])," "))),n.rerenders.length&&(console.log(" most rerenders:"),console.log(M(["component","renders","top causes"],n.rerenders.slice(0,c).map(a=>{let d=Object.entries(a.causes??{}).filter(([,h])=>h>0).sort((h,y)=>y[1]-h[1]).slice(0,3).map(([h,y])=>`${h}:${y}`).join(", ");return[a.displayName,String(a.renders??a.count??0),d||"-"]})," ")))}if(w.console){let n=w.console;if("error"in n)console.log(`
39
+ console \u2014 ${n.error}`);else{console.log(`
40
+ console errors/warns \u2014 ${n.total} in window`);for(let f of n.entries.slice(-8)){let a=((j(f)-S)/1e3).toFixed(2),d=F(f).slice(0,160);console.log(` -${a.padStart(5)}s [${f.level}] ${d}`)}}}return $()&&console.log(`
41
+ next: sootsim what-happened (cursor advances) \xB7 sootsim network get <id> \xB7 sootsim react why <fiber-id>`),0}finally{u.close()}}export{q as runDiagnose};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-G62Q2MQI.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-JJVZMGRM.js";import"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-FRE5TY3C.js";import"./chunk-G23GIRBM.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
@@ -0,0 +1,18 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-B4VH67D3.js";import"./chunk-G62Q2MQI.js";import{a as v,e as h}from"./chunk-CHMHTTI7.js";import"./chunk-E473YTRQ.js";import"./chunk-SKNHJDYO.js";import{b as f,g as u}from"./chunk-JJVZMGRM.js";import{a as p}from"./chunk-QI4VLQ3A.js";import{c as m}from"./chunk-5XI3AB4I.js";import"./chunk-FRE5TY3C.js";import"./chunk-FX3PPKSJ.js";import"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
+ sootsim electron \u2014 launch the desktop companion
4
+
5
+ usage:
6
+ sootsim electron [options]
7
+
8
+ options:
9
+ --port <number> connect to running dev server on this port
10
+ --driver <id> override the launch driver (default: electron)
11
+ --profile <id> launch with an isolated persistent storage profile
12
+ --ephemeral launch with a temporary isolated storage profile
13
+
14
+ examples:
15
+ sootsim electron
16
+ sootsim electron --port 5173
17
+ sootsim electron --profile qa
18
+ `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-EKMYRDQH.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d}from"./chunk-NSZBULGG.js";import"./chunk-QD22CQLH.js";import"./chunk-H6CG42HE.js";import"./chunk-CB4PUMI2.js";import"./chunk-FCOCFEBU.js";import"./chunk-LNRBXCUI.js";import"./chunk-CHMHTTI7.js";import"./chunk-E473YTRQ.js";import"./chunk-SKNHJDYO.js";import"./chunk-JJVZMGRM.js";import"./chunk-QI4VLQ3A.js";import"./chunk-5XI3AB4I.js";import"./chunk-VVUEWU2P.js";import"./chunk-ARH3T5NK.js";import"./chunk-UD5ILFN5.js";import"./chunk-FRE5TY3C.js";import"./chunk-Z2PBRNJP.js";import"./chunk-FX3PPKSJ.js";import"./chunk-GWQUPWVO.js";import"./chunk-ZEVZN3S4.js";import"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";export{b as discoverSootsimUrl,a as parseFlowFile,d as runFlow,c as runFlowPlayback};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-P722XCFT.js";import"./chunk-2ABGQIW7.js";import"./chunk-VIEK76DX.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};