sootsim 0.1.66 → 0.1.68

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 (152) hide show
  1. package/dist-cli/bin.js +7 -28
  2. package/dist-cli/chunks/agent-RWWC5VLR.js +46 -0
  3. package/dist-cli/chunks/{agent-wrapper-5DJBERZP.js → agent-wrapper-AZ2TWUZV.js} +2 -2
  4. package/dist-cli/chunks/{assert-RHILK3WR.js → assert-YVADDYYY.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-E62IXD2G.js +2 -0
  6. package/dist-cli/chunks/beta-7MI67AHK.js +2 -0
  7. package/dist-cli/chunks/{chunk-XZ5SQJM2.js → chunk-2HVRBEOU.js} +128 -36
  8. package/dist-cli/chunks/chunk-2NFRZQ3K.js +73 -0
  9. package/dist-cli/chunks/{chunk-22CO2ZE3.js → chunk-3HF6BNSA.js} +2 -2
  10. package/dist-cli/chunks/{chunk-GDCMTHEU.js → chunk-3NNUNABL.js} +1 -1
  11. package/dist-cli/chunks/{chunk-BD76YSRN.js → chunk-3QA6YYSG.js} +2 -2
  12. package/dist-cli/chunks/{chunk-T4YLDM5C.js → chunk-52QFCYGQ.js} +3 -3
  13. package/dist-cli/chunks/chunk-5LDGAVAV.js +23 -0
  14. package/dist-cli/chunks/{chunk-LRBMW2WC.js → chunk-5QUYJKLU.js} +2 -2
  15. package/dist-cli/chunks/chunk-5SGAFI2M.js +23 -0
  16. package/dist-cli/chunks/{chunk-VRV2X4X2.js → chunk-6453CCSA.js} +1 -1
  17. package/dist-cli/chunks/{chunk-FXF2FHPI.js → chunk-6JGI2JVM.js} +2 -2
  18. package/dist-cli/chunks/chunk-6TQ2IBH6.js +2 -0
  19. package/dist-cli/chunks/chunk-72Y42WVX.js +186 -0
  20. package/dist-cli/chunks/{chunk-4LYNJPUM.js → chunk-BQLKO6NP.js} +2 -2
  21. package/dist-cli/chunks/{chunk-AYBGSHQK.js → chunk-C3R25CWY.js} +2 -2
  22. package/dist-cli/chunks/{chunk-TJEP4DBA.js → chunk-CFR6W2AH.js} +2 -2
  23. package/dist-cli/chunks/chunk-CMEWLMED.js +1 -0
  24. package/dist-cli/chunks/chunk-CZWZG7GL.js +2 -0
  25. package/dist-cli/chunks/chunk-D5LXWWGN.js +12 -0
  26. package/dist-cli/chunks/{chunk-EIQLQDKX.js → chunk-E7FCGYB5.js} +2 -2
  27. package/dist-cli/chunks/{chunk-DEQ7RED3.js → chunk-FBO7YRJM.js} +2 -2
  28. package/dist-cli/chunks/chunk-FITG7BVA.js +1 -0
  29. package/dist-cli/chunks/{chunk-BEQD2DSK.js → chunk-G3WXMB3Z.js} +1 -1
  30. package/dist-cli/chunks/chunk-GFXFPPNR.js +35 -0
  31. package/dist-cli/chunks/chunk-H6YUT7HX.js +372 -0
  32. package/dist-cli/chunks/{chunk-D4VEI6MI.js → chunk-HC43PTFD.js} +1 -1
  33. package/dist-cli/chunks/chunk-HPFXTPOD.js +1 -0
  34. package/dist-cli/chunks/{chunk-V4SZERWD.js → chunk-J7XCQWQI.js} +14 -14
  35. package/dist-cli/chunks/{chunk-HIN5TAAL.js → chunk-K6N6DEL5.js} +1 -1
  36. package/dist-cli/chunks/{chunk-6AP6LXVV.js → chunk-KKK4RTBP.js} +1 -1
  37. package/dist-cli/chunks/{chunk-NCSGLZRV.js → chunk-OFTI3N27.js} +2 -2
  38. package/dist-cli/chunks/{chunk-BTHB3PMG.js → chunk-QHAZOOK2.js} +3 -3
  39. package/dist-cli/chunks/{chunk-4NT6VRUU.js → chunk-QYFPV5YO.js} +1 -1
  40. package/dist-cli/chunks/chunk-TBVBPZRF.js +3 -0
  41. package/dist-cli/chunks/{chunk-LVFWALS4.js → chunk-TKDMCYGS.js} +2 -2
  42. package/dist-cli/chunks/{chunk-LCKLQSZX.js → chunk-TY5CBM3C.js} +2 -2
  43. package/dist-cli/chunks/{chunk-WAOLC7WV.js → chunk-TZYXNQHA.js} +1 -1
  44. package/dist-cli/chunks/chunk-U7KUAZJB.js +119 -0
  45. package/dist-cli/chunks/{chunk-M2Q4FXRE.js → chunk-WHJFB6AK.js} +1 -1
  46. package/dist-cli/chunks/{chunk-HWCZYW6M.js → chunk-WIW3G6HS.js} +2 -2
  47. package/dist-cli/chunks/chunk-WXISHMXL.js +2 -0
  48. package/dist-cli/chunks/{chunk-UMXVWFST.js → chunk-YSDIOWNN.js} +1 -1
  49. package/dist-cli/chunks/{chunk-EEMGSSWY.js → chunk-Z6BCORBY.js} +2 -2
  50. package/dist-cli/chunks/{chunk-UNSLXX7V.js → chunk-ZP7YYRHI.js} +2 -2
  51. package/dist-cli/chunks/cli-version-LM6OBGUK.js +2 -0
  52. package/dist-cli/chunks/{compat-I7JXYUJN.js → compat-Z3IFUQ73.js} +3 -3
  53. package/dist-cli/chunks/{config-3HR5RKVH.js → config-XBERIMLW.js} +2 -2
  54. package/dist-cli/chunks/control-SWOP3KB7.js +2 -0
  55. package/dist-cli/chunks/{cpu-profile-ZVHMTVAU.js → cpu-profile-SNX23Q5V.js} +2 -2
  56. package/dist-cli/chunks/daemon-QQPC4GOV.js +65 -0
  57. package/dist-cli/chunks/{debug-CQ6Y7GJ2.js → debug-WENYS45R.js} +5 -5
  58. package/dist-cli/chunks/demo-app-registry-QWOGX5C2.js +2 -0
  59. package/dist-cli/chunks/{detox-7ZKTGLDR.js → detox-P4N47V6P.js} +2 -2
  60. package/dist-cli/chunks/{device-4M6Z7E2N.js → device-5WWFV22H.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-SMQLYGNX.js → diagnose-HJ4F3ER7.js} +2 -2
  62. package/dist-cli/chunks/drivers-GAEMIY75.js +2 -0
  63. package/dist-cli/chunks/{electron-6N2MIN5W.js → electron-JHFA2OGV.js} +3 -3
  64. package/dist-cli/chunks/flow-J67STV2Q.js +2 -0
  65. package/dist-cli/chunks/{hints-RJCZS2E3.js → hints-UHQ2T2RX.js} +2 -2
  66. package/dist-cli/chunks/{home-paths-DCUNA3CD.js → home-paths-NWDFFIX4.js} +2 -2
  67. package/dist-cli/chunks/inspect-O34RH4AE.js +970 -0
  68. package/dist-cli/chunks/install-ZB2AGO44.js +2 -0
  69. package/dist-cli/chunks/{install-desktop-C7424OSW.js → install-desktop-RYP35PHA.js} +3 -3
  70. package/dist-cli/chunks/{keys-TXUQOAZ3.js → keys-U5YI77TK.js} +2 -2
  71. package/dist-cli/chunks/{launch-MVA44QTC.js → launch-UFOGCQWO.js} +3 -3
  72. package/dist-cli/chunks/{login-NHO2WTHC.js → login-SPX6IK6Q.js} +4 -4
  73. package/dist-cli/chunks/{logout-SRRWADCE.js → logout-I6UE3XYL.js} +2 -2
  74. package/dist-cli/chunks/{maestro-UHNXEZAN.js → maestro-IPEULAUZ.js} +2 -2
  75. package/dist-cli/chunks/{preview-ETIUP7KC.js → preview-CE27FPGG.js} +2 -2
  76. package/dist-cli/chunks/{profile-MY5JFVIF.js → profile-JZSFMO2Y.js} +2 -2
  77. package/dist-cli/chunks/{react-KCMC4GL3.js → react-6IJQG4V3.js} +2 -2
  78. package/dist-cli/chunks/record-6WDKEBXL.js +70 -0
  79. package/dist-cli/chunks/runtime-P54OGI57.js +2 -0
  80. package/dist-cli/chunks/{runtime-delivery-LQZIWQU6.js → runtime-delivery-C4KG6ISS.js} +2 -2
  81. package/dist-cli/chunks/screenshot-VQTI6G32.js +33 -0
  82. package/dist-cli/chunks/{screenshot-mode-USPWASI3.js → screenshot-mode-JBDCHRSS.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-EPEDNA6H.js → screenshots-HLMGN2OX.js} +2 -2
  84. package/dist-cli/chunks/{server-222QT33M.js → server-U3QLKQDX.js} +6 -6
  85. package/dist-cli/chunks/setup-repo-TZULA5RK.js +2 -0
  86. package/dist-cli/chunks/{skills-6XRREE2M.js → skills-SMML5DJP.js} +2 -2
  87. package/dist-cli/chunks/{start-YCAZBZEX.js → start-7SCU4I64.js} +4 -4
  88. package/dist-cli/chunks/store-WEIVIM3L.js +2 -0
  89. package/dist-cli/chunks/telemetry-U3BBVPLJ.js +2 -0
  90. package/dist-cli/chunks/{test-6TNRHSWC.js → test-UWFHFDN7.js} +3 -3
  91. package/dist-cli/chunks/{three-mode-MDOLHGXW.js → three-mode-CJUNGCIF.js} +2 -2
  92. package/dist-cli/chunks/{timeline-72MWE44G.js → timeline-DIRXVM6R.js} +3 -3
  93. package/dist-cli/chunks/{upgrade-IHZ4DFAE.js → upgrade-LQQU4GSZ.js} +2 -2
  94. package/dist-cli/chunks/upload-SSAFKJGF.js +2 -0
  95. package/dist-cli/chunks/web-AJU6QA43.js +2 -0
  96. package/dist-cli/chunks/what-happened-QFXDQ6VU.js +22 -0
  97. package/dist-cli/chunks/{whoami-2EYGCRDQ.js → whoami-HWXPDZEF.js} +2 -2
  98. package/dist-lib/agent-daemon-client.cjs +1 -1
  99. package/dist-lib/agent-events.cjs +1 -1
  100. package/dist-lib/agent-sessions.cjs +1 -1
  101. package/dist-lib/attached-projects.cjs +1 -1
  102. package/dist-lib/auth/shared-session.cjs +1 -1
  103. package/dist-lib/backend-origin.cjs +1 -1
  104. package/dist-lib/bridge-constants.cjs +1 -1
  105. package/dist-lib/cli-constants.cjs +1 -1
  106. package/dist-lib/config.cjs +1 -1
  107. package/dist-lib/dev-bundle-resolution.cjs +9 -2
  108. package/dist-lib/home-paths.cjs +1 -1
  109. package/dist-lib/host/bridge-host.cjs +23 -7
  110. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  111. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  112. package/dist-lib/index.cjs +1 -1
  113. package/dist-lib/metro.cjs +1 -1
  114. package/dist-lib/profiles.cjs +1 -1
  115. package/dist-lib/render-mode.cjs +1 -1
  116. package/dist-lib/vite-base.cjs +23 -7
  117. package/dist-lib/vite.cjs +1 -1
  118. package/package.json +1 -1
  119. package/dist-cli/chunks/agent-IW7CCSSI.js +0 -61
  120. package/dist-cli/chunks/auto-bootstrap-PS2UDBP7.js +0 -2
  121. package/dist-cli/chunks/beta-XLYWSKEA.js +0 -2
  122. package/dist-cli/chunks/chunk-5MVFADNH.js +0 -3
  123. package/dist-cli/chunks/chunk-7NYW73Q6.js +0 -2
  124. package/dist-cli/chunks/chunk-EMMX6RF7.js +0 -73
  125. package/dist-cli/chunks/chunk-FIIBCY5I.js +0 -3
  126. package/dist-cli/chunks/chunk-G4VWDOWB.js +0 -17
  127. package/dist-cli/chunks/chunk-GMKGJHVG.js +0 -1
  128. package/dist-cli/chunks/chunk-M3ZEZHOB.js +0 -34
  129. package/dist-cli/chunks/chunk-MWTMLNGM.js +0 -348
  130. package/dist-cli/chunks/chunk-NQKBIKUZ.js +0 -1
  131. package/dist-cli/chunks/chunk-QMRXLBPN.js +0 -11
  132. package/dist-cli/chunks/chunk-X4HQLK4V.js +0 -119
  133. package/dist-cli/chunks/chunk-XOTJSR4T.js +0 -2
  134. package/dist-cli/chunks/chunk-YSQV4D7P.js +0 -1
  135. package/dist-cli/chunks/chunk-Z6HSVZIO.js +0 -100
  136. package/dist-cli/chunks/cli-version-ESQ2S6N5.js +0 -2
  137. package/dist-cli/chunks/control-TDZXFNVT.js +0 -2
  138. package/dist-cli/chunks/daemon-VYRTYH55.js +0 -83
  139. package/dist-cli/chunks/demo-app-registry-JAYU7BBM.js +0 -2
  140. package/dist-cli/chunks/drivers-SIY6JBEM.js +0 -2
  141. package/dist-cli/chunks/flow-BZEWL7UQ.js +0 -2
  142. package/dist-cli/chunks/inspect-T5NC7HHB.js +0 -1025
  143. package/dist-cli/chunks/install-YTJI5RS7.js +0 -2
  144. package/dist-cli/chunks/record-DHDSXC2Y.js +0 -51
  145. package/dist-cli/chunks/runtime-AJP6V5LM.js +0 -2
  146. package/dist-cli/chunks/screenshot-4KPEEI6I.js +0 -28
  147. package/dist-cli/chunks/setup-repo-D56L3CEB.js +0 -2
  148. package/dist-cli/chunks/store-Z32KZ34K.js +0 -2
  149. package/dist-cli/chunks/telemetry-RFTX2BZK.js +0 -2
  150. package/dist-cli/chunks/upload-G5C7LJWG.js +0 -2
  151. package/dist-cli/chunks/web-JLJSJUS2.js +0 -2
  152. package/dist-cli/chunks/what-happened-BUXSJ3QS.js +0 -15
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as I,e as N,i as S}from"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";import{createWriteStream as k,mkdirSync as v,writeFileSync as C}from"fs";import{dirname as T,resolve as w}from"path";import{Readable as F}from"stream";import{pipeline as y}from"stream/promises";import{createGzip as x}from"zlib";async function U(o,m){let n=Number(b(o,"--duration")??"5");if(!Number.isFinite(n)||n<=0)return console.error(" --duration must be a positive number (seconds)"),1;let a=Number(b(o,"--sample-interval")??"10");if(!Number.isFinite(a)||a<=0)return console.error(" --sample-interval must be a positive number (milliseconds)"),1;let t=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(t)||t<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(o,"--output")??b(o,"-o"),l=w(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=l.endsWith(".gz"),h=I(o,{port:m.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(n+20)*1e3)});try{let u=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:t});if(!u?.started)return u?.error?.includes("cpu-profile-unsupported")?(console.error(" cpu-profile is currently unsupported."),console.error(" the JS Self-Profiler API cannot profile a dedicated worker, and"),console.error(" sootsim runs the guest app in the tenant worker. a CDP-based"),console.error(" profiler is required \u2014 tracked as the F28 follow-up.")):(console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `sootsim list`)")),1;m.verbose&&console.error(` started: sampleInterval=${u.sampleInterval}ms buffer=${u.maxBufferSize}`),console.log(` recording for ${n}s\u2026`),await new Promise(r=>setTimeout(r,n*1e3));let s=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!s||s.error||!s.trace)return console.error(` profile capture failed: ${s?.error??"no trace returned"}`),1;let P=B(s.trace),e=JSON.stringify(P);v(T(l),{recursive:!0}),g?await y(F.from([e]),x(),k(l)):C(l,e);let i=(Buffer.byteLength(e)/1024/1024).toFixed(2);return console.log(` samples: ${P.samples.length} (${i} MB uncompressed)`),console.log(` saved: ${l}`),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}catch(u){let s=u?.message??String(u);return console.error(` profile failed: ${s}`),/could not connect|ECONNREFUSED/i.test(s)&&console.error(" is sootsim running? (try `sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],n=o.resources??[],a=o.stacks??[],t=o.samples??[],p=1,l=[{id:p,callFrame:{functionName:"(root)",scriptId:"0",url:"",lineNumber:-1,columnNumber:-1},hitCount:0,children:[]}];for(let e=0;e<a.length;e++){let i=a[e],r=m[i.frameId]??{name:"(unknown)"},f=r.resource!==void 0?n[r.resource]??"":"";l.push({id:e+2,callFrame:{functionName:r.name||"(anonymous)",scriptId:r.resource!==void 0?String(r.resource):"0",url:f,lineNumber:typeof r.line=="number"?r.line-1:-1,columnNumber:typeof r.column=="number"?r.column-1:-1},hitCount:0,children:[]})}for(let e=0;e<a.length;e++){let i=a[e],r=e+2,f=i.parentId!==void 0?i.parentId+2:p,d=l[f-1];d&&!d.children.includes(r)&&d.children.push(r)}let g=[],h=[],c=t.length>0?t[0].timestamp:0,u=c;for(let e=0;e<t.length;e++){let i=t[e],r=i.stackId!==void 0?i.stackId+2:p;g.push(r);let f=l[r-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-u;h.push(Math.max(0,Math.round(d*1e3))),u=i.timestamp}let s=Math.round(c*1e3),P=t.length>0?Math.round(t[t.length-1].timestamp*1e3):s;return{nodes:l,startTime:s,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let n=o.indexOf(m);if(!(n<0||n===o.length-1))return o[n+1]}export{U as runCpuProfile};
1
+ /*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as I,e as N,i as S}from"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";import{createWriteStream as k,mkdirSync as v,writeFileSync as C}from"fs";import{dirname as T,resolve as w}from"path";import{Readable as F}from"stream";import{pipeline as y}from"stream/promises";import{createGzip as x}from"zlib";async function U(o,m){let n=Number(b(o,"--duration")??"5");if(!Number.isFinite(n)||n<=0)return console.error(" --duration must be a positive number (seconds)"),1;let a=Number(b(o,"--sample-interval")??"10");if(!Number.isFinite(a)||a<=0)return console.error(" --sample-interval must be a positive number (milliseconds)"),1;let t=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(t)||t<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(o,"--output")??b(o,"-o"),l=w(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=l.endsWith(".gz"),h=I(o,{port:m.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(n+20)*1e3)});try{let u=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:t});if(!u?.started)return u?.error?.includes("cpu-profile-unsupported")?(console.error(" cpu-profile is currently unsupported."),console.error(" the JS Self-Profiler API cannot profile a dedicated worker, and"),console.error(" sootsim runs the guest app in the tenant worker. a CDP-based"),console.error(" profiler is required \u2014 tracked as the F28 follow-up.")):(console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `sootsim list`)")),1;m.verbose&&console.error(` started: sampleInterval=${u.sampleInterval}ms buffer=${u.maxBufferSize}`),console.log(` recording for ${n}s\u2026`),await new Promise(r=>setTimeout(r,n*1e3));let s=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!s||s.error||!s.trace)return console.error(` profile capture failed: ${s?.error??"no trace returned"}`),1;let P=B(s.trace),e=JSON.stringify(P);v(T(l),{recursive:!0}),g?await y(F.from([e]),x(),k(l)):C(l,e);let i=(Buffer.byteLength(e)/1024/1024).toFixed(2);return console.log(` samples: ${P.samples.length} (${i} MB uncompressed)`),console.log(` saved: ${l}`),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}catch(u){let s=u?.message??String(u);return console.error(` profile failed: ${s}`),/could not connect|ECONNREFUSED/i.test(s)&&console.error(" is sootsim running? (try `sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],n=o.resources??[],a=o.stacks??[],t=o.samples??[],p=1,l=[{id:p,callFrame:{functionName:"(root)",scriptId:"0",url:"",lineNumber:-1,columnNumber:-1},hitCount:0,children:[]}];for(let e=0;e<a.length;e++){let i=a[e],r=m[i.frameId]??{name:"(unknown)"},f=r.resource!==void 0?n[r.resource]??"":"";l.push({id:e+2,callFrame:{functionName:r.name||"(anonymous)",scriptId:r.resource!==void 0?String(r.resource):"0",url:f,lineNumber:typeof r.line=="number"?r.line-1:-1,columnNumber:typeof r.column=="number"?r.column-1:-1},hitCount:0,children:[]})}for(let e=0;e<a.length;e++){let i=a[e],r=e+2,f=i.parentId!==void 0?i.parentId+2:p,d=l[f-1];d&&!d.children.includes(r)&&d.children.push(r)}let g=[],h=[],c=t.length>0?t[0].timestamp:0,u=c;for(let e=0;e<t.length;e++){let i=t[e],r=i.stackId!==void 0?i.stackId+2:p;g.push(r);let f=l[r-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-u;h.push(Math.max(0,Math.round(d*1e3))),u=i.timestamp}let s=Math.round(c*1e3),P=t.length>0?Math.round(t[t.length-1].timestamp*1e3):s;return{nodes:l,startTime:s,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let n=o.indexOf(m);if(!(n<0||n===o.length-1))return o[n+1]}export{U as runCpuProfile};
@@ -0,0 +1,65 @@
1
+ /*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as T}from"./chunk-5SGAFI2M.js";import"./chunk-ZP7YYRHI.js";import"./chunk-U7KUAZJB.js";import"./chunk-6TQ2IBH6.js";import"./chunk-YSDIOWNN.js";import"./chunk-QYFPV5YO.js";import{a as _,b as N}from"./chunk-FBO7YRJM.js";import"./chunk-E7FCGYB5.js";import"./chunk-6JGI2JVM.js";import"./chunk-CZWZG7GL.js";import{g as I,o as C,p as w,q as B}from"./chunk-G3WXMB3Z.js";import{a as W}from"./chunk-HC43PTFD.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as a,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as p}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as D,rmSync as X,writeFileSync as P}from"fs";import{dirname as L}from"path";var Q="dev.sootsim.daemon",O="SootSim Daemon",F="0.1.36";function R(t,e,r){let o=w(),n=B(),i=L(L(n)),f=L(n),u=`${i}/Resources`;X(o,{recursive:!0,force:!0}),D(C(),{recursive:!0}),D(f,{recursive:!0}),D(u,{recursive:!0}),P(`${i}/Info.plist`,z()),P(`${i}/PkgInfo`,"APPL????"),P(n,J(t,e,r)),K(n,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:n}}function z(){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>${O}</string>
9
+ <key>CFBundleExecutable</key><string>sootsim-daemon</string>
10
+ <key>CFBundleIdentifier</key><string>${Q}</string>
11
+ <key>CFBundleInfoDictionaryVersion</key><string>6.0</string>
12
+ <key>CFBundleName</key><string>${O}</string>
13
+ <key>CFBundlePackageType</key><string>APPL</string>
14
+ <key>CFBundleShortVersionString</key><string>${F}</string>
15
+ <key>CFBundleSignature</key><string>????</string>
16
+ <key>CFBundleVersion</key><string>${F}</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 J(t,e,r){let n=[t.executable,...t.prefixArgs,"server","--quiet","--port",String(e)].map(Z).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 ${n}
31
+ `}function Z(t){return`'${t.replace(/'/g,"'\\''")}'`}var j=60,m="dev.sootsim.daemon",E="dev.sootsim.server",d="sootsim-server",h=p($(),"Library/Logs/sootsim"),ot=p($(),".local/state/sootsim");async function Ct(t,e={}){let[r,...o]=t,n=e.port??7668;if(!r||r==="--help"||r==="-h"){V();return}new Set(["install","uninstall","restart","start","stop"]).has(r)&&_({event:`daemon_${r}`,properties:{platform:process.platform,subsource:"daemon"}});try{switch(r){case"install":return await ut({port:n,force:o.includes("--force")});case"uninstall":return await dt();case"status":return await pt();case"restart":return await mt();case"start":return await gt();case"stop":return await ft();default:console.error(` unknown daemon subcommand: ${r}`),V(),process.exit(1)}}finally{await N()}}function V(){T("daemon")}function nt(){let t=st();return{executable:process.execPath,prefixArgs:[t]}}function st(){try{let e=et("which",["sootsim"],{encoding:"utf8"}).trim();if(e&&a(e))return q(e)}catch{}let t=process.argv[1];if(t&&a(t))return q(t);throw new Error("could not locate the sootsim binary")}function q(t){try{return W("fs").realpathSync(t)}catch{return t}}function it(t,e){v(h,{recursive:!0});let r=p(h,"server.out.log"),o=p(h,"server.err.log"),{launcherPath:n}=R(t,e,{stdout:r,stderr:o}),i=` <string>${ct(n)}</string>`;return`<?xml version="1.0" encoding="UTF-8"?>
32
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
+ <plist version="1.0">
34
+ <dict>
35
+ <key>Label</key><string>${m}</string>
36
+ <key>ProgramArguments</key>
37
+ <array>
38
+ ${i}
39
+ </array>
40
+ <key>RunAtLoad</key><true/>
41
+ <key>KeepAlive</key><true/>
42
+ <key>ThrottleInterval</key><integer>${j}</integer>
43
+ <key>ProcessType</key><string>Background</string>
44
+ <key>StandardOutPath</key><string>${r}</string>
45
+ <key>StandardErrorPath</key><string>${o}</string>
46
+ </dict>
47
+ </plist>
48
+ `}function at(t,e){return v(ot,{recursive:!0}),`[Unit]
49
+ Description=sootsim bridge daemon
50
+ After=default.target
51
+
52
+ [Service]
53
+ Type=simple
54
+ ExecStart=${[t.executable,...t.prefixArgs].map(lt).join(" ")} server --quiet --port ${e}
55
+ Restart=always
56
+ RestartSec=${j}
57
+
58
+ [Install]
59
+ WantedBy=default.target
60
+ `}function ct(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function lt(t){return/[^\w@%+=:,./-]/.test(t)?`'${t.replace(/'/g,"'\\''")}'`:t}function b(){return p($(),"Library/LaunchAgents",`${m}.plist`)}function G(){return p($(),"Library/LaunchAgents",`${E}.plist`)}function x(){return p($(),".config/systemd/user",`${d}.service`)}function H(){let t=G();return a(t)?(s("launchctl",["bootout",`gui/${process.getuid()}/${E}`],{stdio:"ignore"}),S(t,{force:!0}),!0):!1}async function ut({port:t,force:e}){if(I())throw new Error(`refusing to install the persistent sootsim daemon agent from a dev checkout.
61
+ the launchd / systemd agent would point at workspace artifacts that change
62
+ between sessions, and would serve stale prod-built engine assets instead of
63
+ the live \`bun dev:sootsim\` output. start the daemon manually in another
64
+ shell with: sootsim server
65
+ (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to override.)`);let r=nt();if(console.log(` binary: ${[r.executable,...r.prefixArgs].join(" ")}`),console.log(` port: ${t}`),process.platform==="darwin"){H()&&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(M(o),{recursive:!0}),U(o,it(r,t)),console.log(` wrote ${o}`);let n=`gui/${process.getuid()}`,i=`${n}/${m}`,f=()=>{let l=s("launchctl",["bootstrap",n,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=s("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(s("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=s("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 ${p(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: ${p(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(M(o),{recursive:!0}),U(o,at(r,t)),console.log(` wrote ${o}`);let n=s("systemctl",["--user","daemon-reload"],{stdio:"pipe",encoding:"utf8"});if(n.status!==0){let c=(n.stderr||n.stdout||"").trim();throw new Error(`systemctl daemon-reload failed${c?`: ${c}`:""}`)}let i=s("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=(s("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 dt(){if(process.platform==="darwin"){let t=b(),e=H();e&&console.log(` removed legacy ${G()}`);let r=a(t);r&&(s("launchctl",["bootout",`gui/${process.getuid()}/${m}`],{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}s("systemctl",["--user","disable","--now",d],{stdio:"ignore"}),S(t,{force:!0}),s("systemctl",["--user","daemon-reload"],{stdio:"ignore"}),console.log(` removed ${t}`);return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function pt(){if(process.platform==="darwin"){let t=b();if(!a(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let e=yt(t);e&&console.log(` binary: ${e}`);let r=s("launchctl",["print",`gui/${process.getuid()}/${m}`],{encoding:"utf8"});if(r.status===0){let o=r.stdout.match(/state\s*=\s*(\w+)/)?.[1],n=r.stdout.match(/pid\s*=\s*(\d+)/)?.[1];console.log(` state: ${o||"unknown"}${n?` (pid ${n})`:""}`)}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=s("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=s("launchctl",["kickstart","-k",`gui/${process.getuid()}/${m}`],{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=s("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 gt(){if(process.platform==="darwin"){s("launchctl",["kickstart",`gui/${process.getuid()}/${m}`],{stdio:"inherit"});return}if(process.platform==="linux"){s("systemctl",["--user","start",d],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function ft(){if(process.platform==="darwin"){s("launchctl",["bootout",`gui/${process.getuid()}/${m}`],{stdio:"inherit"});return}if(process.platform==="linux"){s("systemctl",["--user","stop",d],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}function yt(t){try{return rt(t,"utf8").match(/<array>\s*<string>([^<]+)<\/string>/)?.[1]||null}catch{return null}}export{ut as daemonInstall,Ct as runDaemon};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as f}from"./chunk-5MVFADNH.js";import{b as A}from"./chunk-M3ZEZHOB.js";import{E as D,F as O,G as x,H as T,I as v}from"./chunk-V4SZERWD.js";import{c as S,e as $,g as N}from"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{e as f,l as T}from"./chunk-GFXFPPNR.js";import{F as A,G as D,H as O,I as x,J as v}from"./chunk-J7XCQWQI.js";import{c as S,e as $,g as N}from"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
3
3
  sootsim debug \u2014 drive __sootsimDebug from the terminal
4
4
 
5
5
  usage:
@@ -167,8 +167,8 @@ examples:
167
167
  } : null,
168
168
  samples,
169
169
  }
170
- })()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-T5NC7HHB.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
171
- known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await D(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await O(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
170
+ })()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-O34RH4AE.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
171
+ known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await A(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await D(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(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(o)});
173
173
  if (!d) return null;
174
174
  return {
@@ -179,4 +179,4 @@ examples:
179
179
  removed: d.removed,
180
180
  changed: d.changed,
181
181
  };
182
- })()`,m=await c(t,s);console.log(a(m,n));break}case"clear-snapshots":{let e=r[0],o=e?`window.__sootsimDebug.clearSnapshots(${JSON.stringify(e)})`:"window.__sootsimDebug.clearSnapshots()";await c(t,o),console.log(a({cleared:e||"all"},n));break}case"find":{let e=r[0];if(e==="sheets"||e==="portals"){let o=await x(t,e);console.log(a(o,n))}else console.error(" usage: sootsim debug find <sheets|portals>"),process.exit(1);break}case"trace":{let e=r[0],o=r[1];if(e==="anim"){let s=r[1];if((!s||s==="--help"||s==="-h")&&(console.error(" usage: sootsim debug trace anim <on|off|status|clear|<id>> [id|limit]"),process.exit(1)),s==="on"){let d=r[2]??"all",p=r[3]?Number(r[3]):void 0,h=d==="all"?"all":Number(d);h!=="all"&&!Number.isFinite(h)&&(console.error(` invalid target: ${d}`),process.exit(1)),await f(t,"enableAnimationTrace",h,p);let F=await f(t,"listAnimationTraces");console.log(a({enabled:h,traces:F},n));break}if(s==="off"){let d=r[2]??"all",p=d==="all"?"all":Number(d);p!=="all"&&!Number.isFinite(p)&&(console.error(` invalid target: ${d}`),process.exit(1)),await f(t,"disableAnimationTrace",p),console.log(a({disabled:p},n));break}if(s==="status"||s==="clear"){s==="clear"&&await f(t,"disableAnimationTrace","all");let d=await f(t,"listAnimationTraces");console.log(a({traces:d},n));break}let m=Number(s);Number.isFinite(m)||(console.error(` invalid id: ${s}`),process.exit(1));let C=r[2]?Number(r[2]):void 0,E=await f(t,"getAnimationTrace",m,C);console.log(a({id:m,samples:E},n));break}if(e!=="shell"&&(console.error(" usage: sootsim debug trace <shell|anim> [args]"),process.exit(1)),!o||/^[0-9]+$/.test(o)){let s=o?Number(o):50,m=await c(t,J(s));console.log(a(m,n));break}if(o==="on"){let s=r[2]?Number(r[2]):240,m=await c(t,w("on",s));console.log(a(m,n));break}if(o==="off"){let s=await c(t,w("off"));console.log(a(s,n));break}if(o==="clear"){let s=await c(t,w("clear"));console.log(a(s,n));break}if(o==="status"){let s=await c(t,w("status"));console.log(a(s,n));break}console.error(" usage: sootsim debug trace shell [on [limit]|off|status|clear|recentLimit]"),process.exit(1)}case"record":{let e=r[0],s=await c(t,`window.__sootsimDebug.record(${e==="on"?"true":e==="off"?"false":"undefined"})`);console.log(a({recording:s},n));break}case"recent":{let e=r[0],o=r[1]?Number(r[1]):50,s=await T(t,e,o);console.log(a(s,n));break}case"clear-events":{await c(t,"window.__sootsimDebug.clearEvents()"),console.log(a({cleared:!0},n));break}default:console.error(` unknown subcommand: ${k}`),L(),process.exit(1)}}catch(e){console.error(` debug failed: ${e.message}`),await A(t,{errorsCommand:`sootsim get errors 5${y}`,warningsCommand:`sootsim get warnings 5${y}`,requestsCommand:`sootsim get requests 5${y}`}),process.exit(1)}finally{t.close()}}export{Y as runDebug};
182
+ })()`,m=await c(t,s);console.log(a(m,n));break}case"clear-snapshots":{let e=r[0],o=e?`window.__sootsimDebug.clearSnapshots(${JSON.stringify(e)})`:"window.__sootsimDebug.clearSnapshots()";await c(t,o),console.log(a({cleared:e||"all"},n));break}case"find":{let e=r[0];if(e==="sheets"||e==="portals"){let o=await O(t,e);console.log(a(o,n))}else console.error(" usage: sootsim debug find <sheets|portals>"),process.exit(1);break}case"trace":{let e=r[0],o=r[1];if(e==="anim"){let s=r[1];if((!s||s==="--help"||s==="-h")&&(console.error(" usage: sootsim debug trace anim <on|off|status|clear|<id>> [id|limit]"),process.exit(1)),s==="on"){let d=r[2]??"all",p=r[3]?Number(r[3]):void 0,h=d==="all"?"all":Number(d);h!=="all"&&!Number.isFinite(h)&&(console.error(` invalid target: ${d}`),process.exit(1)),await f(t,"enableAnimationTrace",h,p);let F=await f(t,"listAnimationTraces");console.log(a({enabled:h,traces:F},n));break}if(s==="off"){let d=r[2]??"all",p=d==="all"?"all":Number(d);p!=="all"&&!Number.isFinite(p)&&(console.error(` invalid target: ${d}`),process.exit(1)),await f(t,"disableAnimationTrace",p),console.log(a({disabled:p},n));break}if(s==="status"||s==="clear"){s==="clear"&&await f(t,"disableAnimationTrace","all");let d=await f(t,"listAnimationTraces");console.log(a({traces:d},n));break}let m=Number(s);Number.isFinite(m)||(console.error(` invalid id: ${s}`),process.exit(1));let C=r[2]?Number(r[2]):void 0,E=await f(t,"getAnimationTrace",m,C);console.log(a({id:m,samples:E},n));break}if(e!=="shell"&&(console.error(" usage: sootsim debug trace <shell|anim> [args]"),process.exit(1)),!o||/^[0-9]+$/.test(o)){let s=o?Number(o):50,m=await c(t,J(s));console.log(a(m,n));break}if(o==="on"){let s=r[2]?Number(r[2]):240,m=await c(t,w("on",s));console.log(a(m,n));break}if(o==="off"){let s=await c(t,w("off"));console.log(a(s,n));break}if(o==="clear"){let s=await c(t,w("clear"));console.log(a(s,n));break}if(o==="status"){let s=await c(t,w("status"));console.log(a(s,n));break}console.error(" usage: sootsim debug trace shell [on [limit]|off|status|clear|recentLimit]"),process.exit(1)}case"record":{let e=r[0],s=await c(t,`window.__sootsimDebug.record(${e==="on"?"true":e==="off"?"false":"undefined"})`);console.log(a({recording:s},n));break}case"recent":{let e=r[0],o=r[1]?Number(r[1]):50,s=await x(t,e,o);console.log(a(s,n));break}case"clear-events":{await c(t,"window.__sootsimDebug.clearEvents()"),console.log(a({cleared:!0},n));break}default:console.error(` unknown subcommand: ${k}`),L(),process.exit(1)}}catch(e){console.error(` debug failed: ${e.message}`),await T(t,{errorsCommand:`sootsim get errors 5${y}`,warningsCommand:`sootsim get warnings 5${y}`,requestsCommand:`sootsim get requests 5${y}`}),process.exit(1)}finally{t.close()}}export{Y as runDebug};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-TY5CBM3C.js";import"./chunk-HC43PTFD.js";export{a as APPS};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-MWTMLNGM.js";import"./chunk-LVFWALS4.js";import"./chunk-YSQV4D7P.js";import"./chunk-4LYNJPUM.js";import"./chunk-EMMX6RF7.js";import"./chunk-EEMGSSWY.js";import"./chunk-XZ5SQJM2.js";import"./chunk-QMRXLBPN.js";import"./chunk-HWCZYW6M.js";import"./chunk-M3ZEZHOB.js";import"./chunk-V4SZERWD.js";import"./chunk-LCKLQSZX.js";import"./chunk-Z6HSVZIO.js";import"./chunk-GDCMTHEU.js";import"./chunk-NQKBIKUZ.js";import"./chunk-AYBGSHQK.js";import"./chunk-HIN5TAAL.js";import"./chunk-UNSLXX7V.js";import"./chunk-XOTJSR4T.js";import"./chunk-DEQ7RED3.js";import"./chunk-EIQLQDKX.js";import"./chunk-LRBMW2WC.js";import"./chunk-FXF2FHPI.js";import"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.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=`
1
+ /*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-H6YUT7HX.js";import"./chunk-TKDMCYGS.js";import"./chunk-HPFXTPOD.js";import"./chunk-BQLKO6NP.js";import"./chunk-2NFRZQ3K.js";import"./chunk-Z6BCORBY.js";import"./chunk-2HVRBEOU.js";import"./chunk-D5LXWWGN.js";import"./chunk-WIW3G6HS.js";import"./chunk-GFXFPPNR.js";import"./chunk-J7XCQWQI.js";import"./chunk-TY5CBM3C.js";import"./chunk-72Y42WVX.js";import"./chunk-3NNUNABL.js";import"./chunk-FITG7BVA.js";import"./chunk-C3R25CWY.js";import"./chunk-K6N6DEL5.js";import"./chunk-ZP7YYRHI.js";import"./chunk-6TQ2IBH6.js";import"./chunk-FBO7YRJM.js";import"./chunk-E7FCGYB5.js";import"./chunk-5QUYJKLU.js";import"./chunk-6JGI2JVM.js";import"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.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
3
  sootsim detox \u2014 run detox-style tests against a sootsim shell
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-YSQV4D7P.js";import"./chunk-UNSLXX7V.js";import"./chunk-LRBMW2WC.js";import{f as c,g as r,h as g}from"./chunk-FXF2FHPI.js";import{c as d,e as l,h as a}from"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";function h(){console.log(`
1
+ /*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-HPFXTPOD.js";import"./chunk-ZP7YYRHI.js";import"./chunk-5QUYJKLU.js";import{f as c,g as r,h as g}from"./chunk-6JGI2JVM.js";import{c as d,e as l,h as a}from"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";function h(){console.log(`
3
3
  sootsim device \u2014 inspect or change the live device preset for a sim
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as E,e as R,h as b}from"./chunk-G4VWDOWB.js";import{b as v}from"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.js";function F(e){return e.ts??e.t??0}function W(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 B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
1
+ /*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as E,e as R,h as b}from"./chunk-5LDGAVAV.js";import{b as v}from"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";function F(e){return e.ts??e.t??0}function W(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 B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
3
3
  sootsim diagnose \u2014 compact "what just went wrong?" report
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-CMEWLMED.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-72Y42WVX.js";import"./chunk-3NNUNABL.js";import"./chunk-FITG7BVA.js";import"./chunk-C3R25CWY.js";import"./chunk-K6N6DEL5.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.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};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-6AP6LXVV.js";import"./chunk-GMKGJHVG.js";import{a as v,f as h}from"./chunk-QMRXLBPN.js";import"./chunk-HWCZYW6M.js";import"./chunk-M3ZEZHOB.js";import"./chunk-V4SZERWD.js";import"./chunk-LCKLQSZX.js";import{b as f,g as u}from"./chunk-Z6HSVZIO.js";import{a as p}from"./chunk-GDCMTHEU.js";import"./chunk-NQKBIKUZ.js";import{c as m}from"./chunk-AYBGSHQK.js";import"./chunk-HIN5TAAL.js";import"./chunk-XOTJSR4T.js";import"./chunk-G4VWDOWB.js";import"./chunk-VRV2X4X2.js";import"./chunk-7NYW73Q6.js";import"./chunk-BEQD2DSK.js";import"./chunk-D4VEI6MI.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(`
1
+ /*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-KKK4RTBP.js";import"./chunk-CMEWLMED.js";import{a as v,f as h}from"./chunk-D5LXWWGN.js";import"./chunk-WIW3G6HS.js";import"./chunk-GFXFPPNR.js";import"./chunk-J7XCQWQI.js";import"./chunk-TY5CBM3C.js";import{b as f,g as u}from"./chunk-72Y42WVX.js";import{a as p}from"./chunk-3NNUNABL.js";import"./chunk-FITG7BVA.js";import{c as m}from"./chunk-C3R25CWY.js";import"./chunk-K6N6DEL5.js";import"./chunk-6TQ2IBH6.js";import"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.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
3
  sootsim electron \u2014 launch the desktop companion
4
4
 
5
5
  usage:
@@ -15,4 +15,4 @@ examples:
15
15
  sootsim electron
16
16
  sootsim electron --port 5173
17
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-C7424OSW.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};
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-RYP35PHA.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.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as d,c as e,d as f}from"./chunk-H6YUT7HX.js";import"./chunk-TKDMCYGS.js";import"./chunk-HPFXTPOD.js";import"./chunk-BQLKO6NP.js";import"./chunk-2NFRZQ3K.js";import"./chunk-Z6BCORBY.js";import{d as a,e as b}from"./chunk-2HVRBEOU.js";import"./chunk-D5LXWWGN.js";import"./chunk-WIW3G6HS.js";import"./chunk-GFXFPPNR.js";import"./chunk-J7XCQWQI.js";import"./chunk-TY5CBM3C.js";import"./chunk-72Y42WVX.js";import"./chunk-3NNUNABL.js";import"./chunk-FITG7BVA.js";import"./chunk-C3R25CWY.js";import"./chunk-K6N6DEL5.js";import"./chunk-ZP7YYRHI.js";import"./chunk-6TQ2IBH6.js";import"./chunk-FBO7YRJM.js";import"./chunk-E7FCGYB5.js";import"./chunk-5QUYJKLU.js";import"./chunk-6JGI2JVM.js";import"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.66 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-FIIBCY5I.js";import"./chunk-VRV2X4X2.js";import"./chunk-D4VEI6MI.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};
1
+ /*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-TBVBPZRF.js";import"./chunk-6453CCSA.js";import"./chunk-HC43PTFD.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};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.66 | (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-BEQD2DSK.js";import"./chunk-D4VEI6MI.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};
1
+ /*! sootsim v0.1.68 | (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-G3WXMB3Z.js";import"./chunk-HC43PTFD.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};