sootsim 0.1.43 → 0.1.44

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 (134) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-SNOLNP4V.js → agent-NVU7E7EV.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-TY6IPXYH.js → agent-wrapper-CLEYNPJK.js} +2 -2
  4. package/dist-cli/chunks/{assert-QISZB6TE.js → assert-F7B6TVEQ.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-BIH3TKGB.js +2 -0
  6. package/dist-cli/chunks/beta-DD7XOVXJ.js +2 -0
  7. package/dist-cli/chunks/{chunk-JA2UNVA3.js → chunk-2Q5YKX76.js} +1 -1
  8. package/dist-cli/chunks/chunk-2TU7QJGH.js +1 -0
  9. package/dist-cli/chunks/{chunk-26LJCQNQ.js → chunk-4ZA3J2BV.js} +1 -1
  10. package/dist-cli/chunks/{chunk-EW7G6TZV.js → chunk-54V7OVL6.js} +2 -2
  11. package/dist-cli/chunks/chunk-5A7UO4OE.js +1 -0
  12. package/dist-cli/chunks/{chunk-CHAVUZ6X.js → chunk-6QY5P2H6.js} +2 -2
  13. package/dist-cli/chunks/{chunk-3VULRGJO.js → chunk-6TO2XBUK.js} +2 -2
  14. package/dist-cli/chunks/{chunk-PXUQ5FQN.js → chunk-7PUVSCSF.js} +1 -1
  15. package/dist-cli/chunks/{chunk-7OKSILLD.js → chunk-B4B6RECG.js} +2 -2
  16. package/dist-cli/chunks/{chunk-CPYDJJTX.js → chunk-BU7OXA7Y.js} +3 -3
  17. package/dist-cli/chunks/{chunk-5A4JEYK2.js → chunk-E3DHOL7O.js} +3 -3
  18. package/dist-cli/chunks/{chunk-XXJAHIR4.js → chunk-EAMMI2FH.js} +2 -2
  19. package/dist-cli/chunks/{chunk-LTUGPDW5.js → chunk-ECIHLBNE.js} +1 -1
  20. package/dist-cli/chunks/{chunk-FQHGM7T3.js → chunk-F76MMAMV.js} +2 -2
  21. package/dist-cli/chunks/{chunk-V527VARZ.js → chunk-FBCGPPDA.js} +2 -2
  22. package/dist-cli/chunks/{chunk-QD23HPD4.js → chunk-GLLMLIXC.js} +2 -2
  23. package/dist-cli/chunks/{chunk-MFLW2R4J.js → chunk-HIQJTM66.js} +2 -2
  24. package/dist-cli/chunks/{chunk-4NPUTEDF.js → chunk-IIFZNK4R.js} +2 -2
  25. package/dist-cli/chunks/{chunk-W7N6B2MX.js → chunk-IMTTDIJJ.js} +1 -1
  26. package/dist-cli/chunks/{chunk-NTZRFKEN.js → chunk-JK3BWGI5.js} +1 -1
  27. package/dist-cli/chunks/{chunk-BAHIX7JY.js → chunk-K4BRBIGO.js} +2 -2
  28. package/dist-cli/chunks/chunk-KVJEI5YO.js +1 -0
  29. package/dist-cli/chunks/{chunk-HFRDF5SI.js → chunk-KWU3WMFD.js} +2 -2
  30. package/dist-cli/chunks/{chunk-YSSNIJC6.js → chunk-L7V75VQK.js} +1 -1
  31. package/dist-cli/chunks/{chunk-4D2BRAPP.js → chunk-LCDWXJ6X.js} +1 -1
  32. package/dist-cli/chunks/{chunk-QOOTU75R.js → chunk-LCUVF6MI.js} +2 -2
  33. package/dist-cli/chunks/{chunk-UBJJEZO4.js → chunk-MS5QBIOB.js} +3 -3
  34. package/dist-cli/chunks/{chunk-OTTV2PFN.js → chunk-NMFN4EIE.js} +2 -2
  35. package/dist-cli/chunks/{chunk-A2NHH4S4.js → chunk-OBIALIWI.js} +1 -1
  36. package/dist-cli/chunks/{chunk-6GYM3Z7K.js → chunk-POPZHYTD.js} +1 -1
  37. package/dist-cli/chunks/{chunk-RHH6P5Z7.js → chunk-QB4INK6X.js} +2 -2
  38. package/dist-cli/chunks/{chunk-OK3YCEYK.js → chunk-RN5LEOFJ.js} +1 -1
  39. package/dist-cli/chunks/{chunk-4YM33L7G.js → chunk-T5UKNA5K.js} +1 -1
  40. package/dist-cli/chunks/{chunk-XWVTLGO2.js → chunk-TXCWW2IX.js} +2 -2
  41. package/dist-cli/chunks/{chunk-MK6M3NP4.js → chunk-VFUO52ZQ.js} +1 -1
  42. package/dist-cli/chunks/{chunk-JJGG2ICF.js → chunk-VP52RZT7.js} +2 -2
  43. package/dist-cli/chunks/{chunk-GYQ75E5Z.js → chunk-VQKQSSUD.js} +1 -1
  44. package/dist-cli/chunks/{chunk-LR5DET6G.js → chunk-WLH4MLBC.js} +2 -2
  45. package/dist-cli/chunks/{chunk-IFJMJS4Y.js → chunk-YROS5I43.js} +2 -2
  46. package/dist-cli/chunks/{chunk-MHETWJAQ.js → chunk-YWBUHBLD.js} +2 -2
  47. package/dist-cli/chunks/chunk-ZLOUP7JS.js +1 -0
  48. package/dist-cli/chunks/{chunk-X3ZHRSH4.js → chunk-ZNMOLPG5.js} +1 -1
  49. package/dist-cli/chunks/chunk-ZP4PF72U.js +2 -0
  50. package/dist-cli/chunks/{chunk-IBKI7UPZ.js → chunk-ZZOYYBLO.js} +2 -2
  51. package/dist-cli/chunks/{compat-3XWL4ATU.js → compat-5XJPHPPL.js} +3 -3
  52. package/dist-cli/chunks/{config-HMLAEAGT.js → config-SHZ662ER.js} +2 -2
  53. package/dist-cli/chunks/control-ONCNZDD5.js +2 -0
  54. package/dist-cli/chunks/{cpu-profile-OORGMNDG.js → cpu-profile-KFM3R5MY.js} +2 -2
  55. package/dist-cli/chunks/{daemon-QYMI2BWG.js → daemon-QRHS6CAR.js} +2 -2
  56. package/dist-cli/chunks/{debug-TOBBTGKD.js → debug-CRQNVODN.js} +3 -3
  57. package/dist-cli/chunks/demo-app-registry-GCDJ3DX7.js +2 -0
  58. package/dist-cli/chunks/{detox-GSTT2HKN.js → detox-PEPICVRX.js} +2 -2
  59. package/dist-cli/chunks/{device-MZZLHS7H.js → device-4GRKBTIY.js} +2 -2
  60. package/dist-cli/chunks/{diagnose-TWYOGKQL.js → diagnose-FRGJNGVH.js} +2 -2
  61. package/dist-cli/chunks/drivers-LRMIFMFF.js +2 -0
  62. package/dist-cli/chunks/{electron-JFXGQSEJ.js → electron-KAAQYVLY.js} +3 -3
  63. package/dist-cli/chunks/flow-P6N565XT.js +2 -0
  64. package/dist-cli/chunks/{hints-AUB2PZR7.js → hints-JDTUIEQI.js} +2 -2
  65. package/dist-cli/chunks/{home-paths-H7UWBZTI.js → home-paths-MCK43U6W.js} +2 -2
  66. package/dist-cli/chunks/{inspect-CRW5T6XB.js → inspect-2ORQQN7T.js} +3 -3
  67. package/dist-cli/chunks/install-KVZFRP22.js +2 -0
  68. package/dist-cli/chunks/{install-desktop-ZMNP3JUU.js → install-desktop-YEGVQFNS.js} +3 -3
  69. package/dist-cli/chunks/{keys-EXQ4HPRI.js → keys-2QRSFPVS.js} +2 -2
  70. package/dist-cli/chunks/{launch-BJCVATQA.js → launch-L25GI237.js} +3 -3
  71. package/dist-cli/chunks/{login-DCGHEA5P.js → login-FHC2PLFD.js} +4 -4
  72. package/dist-cli/chunks/{logout-OXKHJTNH.js → logout-FJQU7HI2.js} +2 -2
  73. package/dist-cli/chunks/{maestro-7AWJXCCS.js → maestro-Z6YMB7VM.js} +2 -2
  74. package/dist-cli/chunks/{preview-RSYAEZKJ.js → preview-7ZCBU2IE.js} +2 -2
  75. package/dist-cli/chunks/{profile-Z4KSPIT2.js → profile-JTJF6PY6.js} +2 -2
  76. package/dist-cli/chunks/{react-ED3FJ4IM.js → react-XP2AJQ4T.js} +2 -2
  77. package/dist-cli/chunks/record-56JAGJUN.js +17 -0
  78. package/dist-cli/chunks/runtime-T2X2XY72.js +2 -0
  79. package/dist-cli/chunks/{runtime-delivery-YWGRJ62P.js → runtime-delivery-O655KIUB.js} +2 -2
  80. package/dist-cli/chunks/{screenshot-LJ3IRZSJ.js → screenshot-CPCNSTFP.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-BIMMQHLF.js → screenshot-mode-MGWQGOM7.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-ABB7QEYX.js → screenshots-ZD7HJ4GA.js} +2 -2
  83. package/dist-cli/chunks/{server-FCZUE6AB.js → server-V55GYTFF.js} +2 -2
  84. package/dist-cli/chunks/setup-repo-SGAHUDYC.js +2 -0
  85. package/dist-cli/chunks/{skills-NU3ZVGQW.js → skills-PGTMJCNI.js} +2 -2
  86. package/dist-cli/chunks/{start-FUBNFTAN.js → start-OB5MRSE4.js} +4 -4
  87. package/dist-cli/chunks/store-SUEZBGQY.js +2 -0
  88. package/dist-cli/chunks/telemetry-COZXGX5D.js +2 -0
  89. package/dist-cli/chunks/{test-NHEBEWQA.js → test-OXVUTEEX.js} +3 -3
  90. package/dist-cli/chunks/{three-mode-PWUWCXOA.js → three-mode-P6JQUJEA.js} +2 -2
  91. package/dist-cli/chunks/{timeline-OODTUKKH.js → timeline-TVXCZIHI.js} +2 -2
  92. package/dist-cli/chunks/{upgrade-2GN4KRQ6.js → upgrade-PDM3N57Q.js} +2 -2
  93. package/dist-cli/chunks/upload-U55QDSSX.js +2 -0
  94. package/dist-cli/chunks/{web-DPMKOIAX.js → web-F5K7GAGR.js} +2 -2
  95. package/dist-cli/chunks/{what-happened-6UXAA7YR.js → what-happened-QE3IR6K4.js} +2 -2
  96. package/dist-cli/chunks/{whoami-2IEZXYNZ.js → whoami-NPO62CNB.js} +2 -2
  97. package/dist-lib/agent-daemon-client.cjs +1 -1
  98. package/dist-lib/agent-events.cjs +1 -1
  99. package/dist-lib/agent-sessions.cjs +1 -1
  100. package/dist-lib/attached-projects.cjs +1 -1
  101. package/dist-lib/auth/shared-session.cjs +1 -1
  102. package/dist-lib/backend-origin.cjs +1 -1
  103. package/dist-lib/bridge-constants.cjs +1 -1
  104. package/dist-lib/cli-constants.cjs +1 -1
  105. package/dist-lib/config.cjs +1 -1
  106. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  107. package/dist-lib/home-paths.cjs +1 -1
  108. package/dist-lib/host/bridge-host.cjs +1 -1
  109. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  110. package/dist-lib/index.cjs +1 -1
  111. package/dist-lib/metro.cjs +1 -1
  112. package/dist-lib/profiles.cjs +1 -1
  113. package/dist-lib/render-mode.cjs +1 -1
  114. package/dist-lib/vite-base.cjs +1 -1
  115. package/dist-lib/vite.cjs +1 -1
  116. package/package.json +1 -1
  117. package/dist-cli/chunks/auto-bootstrap-QHKU7RLG.js +0 -2
  118. package/dist-cli/chunks/beta-WKOGR7HH.js +0 -2
  119. package/dist-cli/chunks/chunk-HKZEU76U.js +0 -1
  120. package/dist-cli/chunks/chunk-KFTTDAPI.js +0 -2
  121. package/dist-cli/chunks/chunk-L6EBBORR.js +0 -1
  122. package/dist-cli/chunks/chunk-SIH4PE3C.js +0 -1
  123. package/dist-cli/chunks/chunk-WWTI3E3U.js +0 -1
  124. package/dist-cli/chunks/control-G35A52LM.js +0 -2
  125. package/dist-cli/chunks/demo-app-registry-COFN4PSB.js +0 -2
  126. package/dist-cli/chunks/drivers-HPWMBGHU.js +0 -2
  127. package/dist-cli/chunks/flow-TZQRP7FD.js +0 -2
  128. package/dist-cli/chunks/install-MFIJGPJ6.js +0 -2
  129. package/dist-cli/chunks/record-UDDH36YF.js +0 -15
  130. package/dist-cli/chunks/runtime-EIEXL23W.js +0 -2
  131. package/dist-cli/chunks/setup-repo-6CIEQXRN.js +0 -2
  132. package/dist-cli/chunks/store-VHZ4TFK4.js +0 -2
  133. package/dist-cli/chunks/telemetry-6ZYCDCLG.js +0 -2
  134. package/dist-cli/chunks/upload-AIOY3AZW.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-26LJCQNQ.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-4ZA3J2BV.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:
@@ -20,7 +20,7 @@ examples:
20
20
  sootsim compat react-native-reanimated
21
21
  sootsim compat --json
22
22
  sootsim compat --brief
23
- `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-DPMKOIAX.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-DPMKOIAX.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
23
+ `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-F5K7GAGR.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-F5K7GAGR.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
24
24
  sootsim compatibility report
25
25
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
26
26
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-26LJCQNQ.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-4ZA3J2BV.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m}from"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-ZP4PF72U.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as I,e as N,i as S}from"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.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 t=Number(b(o,"--duration")??"5");if(!Number.isFinite(t)||t<=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 s=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(s)||s<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(o,"--output")??b(o,"-o"),u=w(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=u.endsWith(".gz"),h=I(o,{port:m.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(t+20)*1e3)});try{let l=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:s});if(!l?.started)return console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `bun sootsim list`)"),1;m.verbose&&console.error(` started: sampleInterval=${l.sampleInterval}ms buffer=${l.maxBufferSize}`),console.log(` recording for ${t}s\u2026`),await new Promise(r=>setTimeout(r,t*1e3));let n=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!n||n.error||!n.trace)return n?.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(` profile capture failed: ${n?.error??"no trace returned"}`),1;let P=B(n.trace),e=JSON.stringify(P);v(T(u),{recursive:!0}),g?await y(F.from([e]),x(),k(u)):C(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(l){let n=l?.message??String(l);return console.error(` profile failed: ${n}`),/could not connect|ECONNREFUSED/i.test(n)&&console.error(" is sootsim running? (try `bun sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],t=o.resources??[],a=o.stacks??[],s=o.samples??[],p=1,u=[{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?t[r.resource]??"":"";u.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=u[f-1];d&&!d.children.includes(r)&&d.children.push(r)}let g=[],h=[],c=s.length>0?s[0].timestamp:0,l=c;for(let e=0;e<s.length;e++){let i=s[e],r=i.stackId!==void 0?i.stackId+2:p;g.push(r);let f=u[r-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-l;h.push(Math.max(0,Math.round(d*1e3))),l=i.timestamp}let n=Math.round(c*1e3),P=s.length>0?Math.round(s[s.length-1].timestamp*1e3):n;return{nodes:u,startTime:n,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let t=o.indexOf(m);if(!(t<0||t===o.length-1))return o[t+1]}export{U as runCpuProfile};
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as I,e as N,i as S}from"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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 t=Number(b(o,"--duration")??"5");if(!Number.isFinite(t)||t<=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 s=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(s)||s<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(o,"--output")??b(o,"-o"),u=w(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=u.endsWith(".gz"),h=I(o,{port:m.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(t+20)*1e3)});try{let l=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:s});if(!l?.started)return console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `bun sootsim list`)"),1;m.verbose&&console.error(` started: sampleInterval=${l.sampleInterval}ms buffer=${l.maxBufferSize}`),console.log(` recording for ${t}s\u2026`),await new Promise(r=>setTimeout(r,t*1e3));let n=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!n||n.error||!n.trace)return n?.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(` profile capture failed: ${n?.error??"no trace returned"}`),1;let P=B(n.trace),e=JSON.stringify(P);v(T(u),{recursive:!0}),g?await y(F.from([e]),x(),k(u)):C(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(l){let n=l?.message??String(l);return console.error(` profile failed: ${n}`),/could not connect|ECONNREFUSED/i.test(n)&&console.error(" is sootsim running? (try `bun sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],t=o.resources??[],a=o.stacks??[],s=o.samples??[],p=1,u=[{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?t[r.resource]??"":"";u.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=u[f-1];d&&!d.children.includes(r)&&d.children.push(r)}let g=[],h=[],c=s.length>0?s[0].timestamp:0,l=c;for(let e=0;e<s.length;e++){let i=s[e],r=i.stackId!==void 0?i.stackId+2:p;g.push(r);let f=u[r-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-l;h.push(Math.max(0,Math.round(d*1e3))),l=i.timestamp}let n=Math.round(c*1e3),P=s.length>0?Math.round(s[s.length-1].timestamp*1e3):n;return{nodes:u,startTime:n,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let t=o.indexOf(m);if(!(t<0||t===o.length-1))return o[t+1]}export{U as runCpuProfile};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as T,b as _}from"./chunk-IBKI7UPZ.js";import"./chunk-QOOTU75R.js";import"./chunk-L6EBBORR.js";import{g as I,o as C,p as w,q as B}from"./chunk-PXUQ5FQN.js";import{a as W}from"./chunk-26LJCQNQ.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}
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as T,b as _}from"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import{g as I,o as C,p as w,q as B}from"./chunk-7PUVSCSF.js";import{a as W}from"./chunk-4ZA3J2BV.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
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
4
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5
5
  <plist version="1.0">
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as f}from"./chunk-LR5DET6G.js";import{A as x,B as T,C as v,y as D,z as O}from"./chunk-NTZRFKEN.js";import{b as A}from"./chunk-X3ZHRSH4.js";import{c as S,e as $,g as N}from"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as f}from"./chunk-WLH4MLBC.js";import{A as x,B as T,C as v,y as D,z as O}from"./chunk-JK3BWGI5.js";import{b as A}from"./chunk-ZNMOLPG5.js";import{c as S,e as $,g as N}from"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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,7 +167,7 @@ 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-CRW5T6XB.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,...]>
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-2ORQQN7T.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
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=`(() => {
172
172
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
173
173
  if (!d) return null;
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-K4BRBIGO.js";import"./chunk-4ZA3J2BV.js";export{a as APPS};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as S}from"./chunk-UBJJEZO4.js";import"./chunk-XXJAHIR4.js";import"./chunk-EW7G6TZV.js";import"./chunk-SIH4PE3C.js";import"./chunk-IFJMJS4Y.js";import"./chunk-QD23HPD4.js";import"./chunk-XWVTLGO2.js";import"./chunk-YSSNIJC6.js";import"./chunk-X3ZHRSH4.js";import"./chunk-HFRDF5SI.js";import"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-BAHIX7JY.js";import"./chunk-JJGG2ICF.js";import"./chunk-4NPUTEDF.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import"./chunk-RHH6P5Z7.js";import"./chunk-KFTTDAPI.js";import"./chunk-3VULRGJO.js";import"./chunk-OK3YCEYK.js";import"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-IBKI7UPZ.js";import"./chunk-QOOTU75R.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as S}from"./chunk-MS5QBIOB.js";import"./chunk-EAMMI2FH.js";import"./chunk-54V7OVL6.js";import"./chunk-KVJEI5YO.js";import"./chunk-YROS5I43.js";import"./chunk-GLLMLIXC.js";import"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-K4BRBIGO.js";import"./chunk-VP52RZT7.js";import"./chunk-IIFZNK4R.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-QB4INK6X.js";import"./chunk-ZP4PF72U.js";import"./chunk-6TO2XBUK.js";import"./chunk-RN5LEOFJ.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-SIH4PE3C.js";import"./chunk-RHH6P5Z7.js";import"./chunk-3VULRGJO.js";import{f as c,g as r,h as g}from"./chunk-OK3YCEYK.js";import{c as d,e as l,h as a}from"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";function h(){console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-KVJEI5YO.js";import"./chunk-QB4INK6X.js";import"./chunk-6TO2XBUK.js";import{f as c,g as r,h as g}from"./chunk-RN5LEOFJ.js";import{c as d,e as l,h as a}from"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as v,e as E,h as b}from"./chunk-MFLW2R4J.js";import{b as $}from"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.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(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var W=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as v,e as E,h as b}from"./chunk-HIQJTM66.js";import{b as $}from"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var W=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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-ZLOUP7JS.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-4D2BRAPP.js";import"./chunk-HKZEU76U.js";import{a as v,f as h}from"./chunk-XWVTLGO2.js";import"./chunk-YSSNIJC6.js";import"./chunk-X3ZHRSH4.js";import{b as f,g as u}from"./chunk-HFRDF5SI.js";import{a as p}from"./chunk-JA2UNVA3.js";import{c as m}from"./chunk-OTTV2PFN.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import"./chunk-KFTTDAPI.js";import"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-LCDWXJ6X.js";import"./chunk-ZLOUP7JS.js";import{a as v,f as h}from"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import{b as f,g as u}from"./chunk-KWU3WMFD.js";import{a as p}from"./chunk-2Q5YKX76.js";import{c as m}from"./chunk-NMFN4EIE.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-ZP4PF72U.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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-ZMNP3JUU.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-YEGVQFNS.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d}from"./chunk-MS5QBIOB.js";import"./chunk-EAMMI2FH.js";import"./chunk-54V7OVL6.js";import"./chunk-KVJEI5YO.js";import"./chunk-YROS5I43.js";import"./chunk-GLLMLIXC.js";import"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-K4BRBIGO.js";import"./chunk-VP52RZT7.js";import"./chunk-IIFZNK4R.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-QB4INK6X.js";import"./chunk-ZP4PF72U.js";import"./chunk-6TO2XBUK.js";import"./chunk-RN5LEOFJ.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";export{b as discoverSootsimUrl,a as parseFlowFile,d as runFlow,c as runFlowPlayback};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-FQHGM7T3.js";import"./chunk-A2NHH4S4.js";import"./chunk-26LJCQNQ.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-F76MMAMV.js";import"./chunk-OBIALIWI.js";import"./chunk-4ZA3J2BV.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.43 | (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-PXUQ5FQN.js";import"./chunk-26LJCQNQ.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.44 | (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-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as G}from"./chunk-FQHGM7T3.js";import{a as Ce,b as De}from"./chunk-W7N6B2MX.js";import{a as X,b as C,c as D,d as z,e as ce,f as ne,g as ot,h as st,i as xe}from"./chunk-LR5DET6G.js";import{D as tt,a as Be,b as je,c as Le,d as Je,e as qe,f as be,g as we,h as We,i as He,j as Ke,k as Ue,l as ze,m as Ye,n as Ge,o as Xe,p as Ve,q as Qe,u as Ze,w as se,x as et}from"./chunk-NTZRFKEN.js";import{a as Re,e as le}from"./chunk-QD23HPD4.js";import{b as nt,c as rt,i as it}from"./chunk-XWVTLGO2.js";import"./chunk-YSSNIJC6.js";import{a as Ee}from"./chunk-X3ZHRSH4.js";import"./chunk-HFRDF5SI.js";import"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import{a as ge,c as ye,d as Ie}from"./chunk-6GYM3Z7K.js";import{a as Ne}from"./chunk-KFTTDAPI.js";import{c as Fe,e as Ae,f as Pe,g as Oe,h as he}from"./chunk-MFLW2R4J.js";import{b as _e}from"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";import{existsSync as Lt,mkdirSync as Jt,readFileSync as qt,rmSync as at,writeFileSync as Wt}from"fs";import{tmpdir as Ht}from"os";import{dirname as Kt,join as Ut,resolve as zt}from"path";var re=1,Yt="SOOTSIM_INSPECT_NOTICE_PATH",Gt=300*1e3,Xt=15e3;function lt(){return zt(process.env[Yt]||Ut(Ht(),"sootsim-inspect-notice-state.json"))}function Vt(s,d){return Object.fromEntries(Object.entries(s).filter(([,a])=>typeof a?.signature=="string"&&Number.isFinite(a?.updatedAt)&&d-a.updatedAt<=Gt))}function Qt(s){let d=lt();if(!Lt(d))return{version:re,entries:{}};try{let a=JSON.parse(qt(d,"utf8"));return a.version!==re||!a.entries||typeof a.entries!="object"?(at(d,{force:!0}),{version:re,entries:{}}):{version:re,entries:Vt(a.entries,s)}}catch{return at(d,{force:!0}),{version:re,entries:{}}}}function Zt(s){let d=lt();Jt(Kt(d),{recursive:!0}),Wt(d,JSON.stringify(s,null,2)+`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as G}from"./chunk-F76MMAMV.js";import{a as Ce,b as De}from"./chunk-IMTTDIJJ.js";import{a as X,b as C,c as D,d as z,e as ce,f as ne,g as ot,h as st,i as xe}from"./chunk-WLH4MLBC.js";import{D as tt,a as Be,b as je,c as Le,d as Je,e as qe,f as be,g as we,h as We,i as He,j as Ke,k as Ue,l as ze,m as Ye,n as Ge,o as Xe,p as Ve,q as Qe,u as Ze,w as se,x as et}from"./chunk-JK3BWGI5.js";import{a as Re,e as le}from"./chunk-GLLMLIXC.js";import{b as nt,c as rt,i as it}from"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import{a as Ee}from"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import{a as ge,c as ye,d as Ie}from"./chunk-POPZHYTD.js";import{a as Ne}from"./chunk-ZP4PF72U.js";import{c as Fe,e as Ae,f as Pe,g as Oe,h as he}from"./chunk-HIQJTM66.js";import{b as _e}from"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import{existsSync as Lt,mkdirSync as Jt,readFileSync as qt,rmSync as at,writeFileSync as Wt}from"fs";import{tmpdir as Ht}from"os";import{dirname as Kt,join as Ut,resolve as zt}from"path";var re=1,Yt="SOOTSIM_INSPECT_NOTICE_PATH",Gt=300*1e3,Xt=15e3;function lt(){return zt(process.env[Yt]||Ut(Ht(),"sootsim-inspect-notice-state.json"))}function Vt(s,d){return Object.fromEntries(Object.entries(s).filter(([,a])=>typeof a?.signature=="string"&&Number.isFinite(a?.updatedAt)&&d-a.updatedAt<=Gt))}function Qt(s){let d=lt();if(!Lt(d))return{version:re,entries:{}};try{let a=JSON.parse(qt(d,"utf8"));return a.version!==re||!a.entries||typeof a.entries!="object"?(at(d,{force:!0}),{version:re,entries:{}}):{version:re,entries:Vt(a.entries,s)}}catch{return at(d,{force:!0}),{version:re,entries:{}}}}function Zt(s){let d=lt();Jt(Kt(d),{recursive:!0}),Wt(d,JSON.stringify(s,null,2)+`
3
3
  `)}function eo(s,d){let a=d.trim()||"default";return`${s}:${a}`}function $e(s,d,a,l={}){let f=l.nowMs??Date.now(),i=l.cooldownMs??Xt,h=Qt(f),S=eo(s,d),I=h.entries[S];return I&&I.signature===a&&f-I.updatedAt<i?!1:(h.entries[S]={signature:a,updatedAt:f},Zt(h),!0)}async function ct(s,d={args:[]}){let a=await Be(s);if(C(d.args)){D(a);return}console.log(` nodes: ${a.nodes}`)}function Se(s,d){let a=s.indexOf(d);return a>=0&&a+1<s.length?s[a+1]:null}async function dt(s){let{bridge:d,args:a,positional:l}=s,f=a.includes("--verbose")||a.includes("-v"),i=C(a),h=f&&!i,S=a.includes("--watch")||a.includes("-w"),I=1e3,T=a.includes("--compact"),w=a.includes("--no-xy"),v=Se(a,"--testid-like"),_=Se(a,"--only"),M=Se(a,"--subtree"),R=l[1],c=R?/[*?]/.test(R):!1,J=!c&&!_?R:void 0,U=_??(c?R:void 0),E=async()=>{await ce(d,{verbose:h});let Y=await Je(d,{describe:!0,verbose:f,filter:J||"",testIdLike:v||void 0,onlyGlob:U||void 0,subtreeRoot:M||void 0,compact:T,hideXy:w}),W=Y?.tree,x=Y?.shell,N=Y?.keyboard;if(i){D({shell:x,tree:W??"",keyboard:N});return}if(x&&typeof x=="object"){let F=[x.state?`state=${x.state}`:null,x.activeApp?`app=${x.activeApp}`:null,x.showSwitcher?"switcher":null,x.switcherPhase&&x.switcherPhase!=="idle"?`phase=${x.switcherPhase}`:null].filter(Boolean);F.length>0&&console.log(` shell: ${F.join(" ")}`)}if(typeof W=="string"&&W.startsWith("__SUBTREE_NOT_FOUND__:")){let F=W.slice(22);console.log(` subtree root not found: ${F}`),G("subtree-root-not-found",F);return}if(!W){let F=Y?.nodeCount??0;console.log(" no matching nodes found"),!(J||v||U||M)&&F<10&&G("app-still-loading",F);return}if(console.log(W),!(J||v||U||M)&&!S&&W.split(`
4
4
  `).length>=80&&G("describe-use-filters"),N&&N.visible){let F=N.spec,V=[F?.keyboardType?`type=${F.keyboardType}`:null,F?.returnKeyType&&F.returnKeyType!=="default"?`return=${F.returnKeyType}`:null,N.mode!=="letters"?`mode=${N.mode}`:null,N.shifted?"shift":null,N.capsLock?"caps":null,F?.autoCapitalize&&F.autoCapitalize!=="sentences"?`autoCap=${F.autoCapitalize}`:null,N.accessoryBarId?`accessory=${N.accessoryBarId}`:null].filter(Boolean);console.log(`
5
5
  keyboard: ${V.join(" ")||"visible"}`)}};if(S)for(console.log(` watching... (Ctrl+C to stop)
@@ -135,7 +135,7 @@ import{a as G}from"./chunk-FQHGM7T3.js";import{a as Ce,b as De}from"./chunk-W7N6
135
135
  `);console.log(`${t??""}
136
136
 
137
137
  ${o}
138
- `),process.exit(0)}let _=f.wsPort,M=f.simId,R=f.commandTimeoutMs;if(h==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-HPWMBGHU.js"),t=e();console.log(` available drivers (${t.length}):
138
+ `),process.exit(0)}let _=f.wsPort,M=f.simId,R=f.commandTimeoutMs;if(h==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-LRMIFMFF.js"),t=e();console.log(` available drivers (${t.length}):
139
139
  `);let o=Math.max(...t.map(n=>n.id.length),6),r=Math.max(...t.map(n=>n.kind.length),4);for(let n of t){let u=n.available?"\u2713":"\u2717",m=n.id.padEnd(o),y=n.kind.padEnd(r);console.log(` ${u} ${m} ${y} ${n.description}`),n.available&&n.detail?console.log(` ${n.detail}`):!n.available&&n.reason&&console.log(` unavailable: ${n.reason}`)}return}let c=Ae(f),J=M||"default",U=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]);function E(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function L(e){let t=ut()?1200:350;try{let{settled:o,elapsed:r}=await oe({bridge:e,maxMs:t,pollMs:32,stablePolls:2});o||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
140
140
  `)}catch{}}async function Y(){try{return await c.send({type:"evaluate",code:`(() => ({
141
141
  console: window.__sootsimConsole?.count?.() || null,
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-YWBUHBLD.js";import"./chunk-LCDWXJ6X.js";import"./chunk-E3DHOL7O.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as b}from"./chunk-4D2BRAPP.js";import{a as x}from"./chunk-JA2UNVA3.js";import"./chunk-26LJCQNQ.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as b}from"./chunk-LCDWXJ6X.js";import{a as x}from"./chunk-2Q5YKX76.js";import"./chunk-4ZA3J2BV.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
3
3
  `),t=n[n.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=v(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),e=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return e.status!==0&&console.warn(` warning: failed to unmount ${t} (${e.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function L(r){let o=v(process.env.HOME||"","Applications");y(o,{recursive:!0});let n=f(o,"sootsim.AppImage");return w(n)&&g(n,{force:!0}),T(r,n),S(n,493),n}async function C(r){return await new Promise((o,n)=>{let s=k("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",n),s.once("exit",t=>{t===0?o():n(new Error(`installer exited with code ${t}`))})}),r}async function Y(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
4
4
  sootsim install-desktop \u2014 download and install the optional desktop GUI
5
5
 
@@ -20,4 +20,4 @@ examples:
20
20
  `),process.exit(0));let o=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,n=r.includes("--force"),s=x();if(s&&!n){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=A();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await b("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(D(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
21
21
  `);try{await O({url:t.url,dest:i,onProgress:(e,m)=>{let $=Date.now();$-d<100&&e<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(e,m)}`))}})}catch(e){g(a,{recursive:!0,force:!0}),console.error(`
22
22
  download failed: ${e instanceof Error?e.message:String(e)}`),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
23
- `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-6ZYCDCLG.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
23
+ `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-COZXGX5D.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as l,b as d,c as k,d as y,e as g}from"./chunk-4NPUTEDF.js";import{d as c}from"./chunk-QOOTU75R.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as l,b as d,c as k,d as y,e as g}from"./chunk-IIFZNK4R.js";import{d as c}from"./chunk-LCUVF6MI.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
3
3
  created: ${t.record.label} (${t.record.keyPrefix}\u2026)`),console.log(` scopes: ${t.record.scopes.join(",")}`),console.log(`
4
4
  secret: ${t.secret}
5
5
  `),console.log(` copy this now \u2014 we can't show it again.
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-HKZEU76U.js";import{b as m}from"./chunk-HFRDF5SI.js";import{a as u}from"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-ZLOUP7JS.js";import{b as m}from"./chunk-KWU3WMFD.js";import{a as u}from"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
3
3
  sootsim launch \u2014 one-shot: install runtime if needed, start daemon, open app
4
4
 
5
5
  usage:
@@ -13,4 +13,4 @@ options:
13
13
  examples:
14
14
  sootsim launch
15
15
  sootsim launch --version 1.2.3
16
- `);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-EIEXL23W.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
16
+ `);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-T2X2XY72.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as f,d as m}from"./chunk-QOOTU75R.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(t){if(t)return t;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function R(){console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as f,d as m}from"./chunk-LCUVF6MI.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(t){if(t)return t;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function R(){console.log(`
3
3
  sootsim login \u2014 sign in so desktop uploads can attach to your account
4
4
 
5
5
  usage:
@@ -21,6 +21,6 @@ options:
21
21
  <p style="color:#ccc">${t}</p>
22
22
  </div>
23
23
  </body>
24
- </html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-6ZYCDCLG.js");n({event:"cli_login_succeeded",identity:{userId:r.userId??s?.user?.id??null},properties:{origin:e,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${r.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(r=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,g=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),g){n.end(u(`sign-in failed: ${g}`)),r({ok:!1,error:g}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),r({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),r({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),r({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),r({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){r({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${e.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",e),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
24
+ </html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-COZXGX5D.js");n({event:"cli_login_succeeded",identity:{userId:r.userId??s?.user?.id??null},properties:{origin:e,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${r.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(r=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,g=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),g){n.end(u(`sign-in failed: ${g}`)),r({ok:!1,error:g}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),r({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),r({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),r({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),r({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){r({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${e.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",e),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
25
25
  ${n.toString()}
26
- `),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-6ZYCDCLG.js");r({event:"cli_login_failed",properties:{origin:e,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}f({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:e,source:"cli"});let d=await m(e),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-6ZYCDCLG.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:e}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
26
+ `),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-COZXGX5D.js");r({event:"cli_login_failed",properties:{origin:e,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}f({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:e,source:"cli"});let d=await m(e),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-COZXGX5D.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:e}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r,b as i}from"./chunk-IBKI7UPZ.js";import{a as t,c as o}from"./chunk-QOOTU75R.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r,b as i}from"./chunk-ZZOYYBLO.js";import{a as t,c as o}from"./chunk-LCUVF6MI.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as h}from"./chunk-UBJJEZO4.js";import"./chunk-XXJAHIR4.js";import"./chunk-EW7G6TZV.js";import"./chunk-SIH4PE3C.js";import"./chunk-IFJMJS4Y.js";import"./chunk-QD23HPD4.js";import"./chunk-XWVTLGO2.js";import"./chunk-YSSNIJC6.js";import"./chunk-X3ZHRSH4.js";import"./chunk-HFRDF5SI.js";import"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-BAHIX7JY.js";import"./chunk-JJGG2ICF.js";import"./chunk-4NPUTEDF.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import"./chunk-RHH6P5Z7.js";import"./chunk-KFTTDAPI.js";import"./chunk-3VULRGJO.js";import"./chunk-OK3YCEYK.js";import"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-IBKI7UPZ.js";import"./chunk-QOOTU75R.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";import*as i from"fs";import*as l from"path";var y=[".maestro","maestro"];function b(){console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as h}from"./chunk-MS5QBIOB.js";import"./chunk-EAMMI2FH.js";import"./chunk-54V7OVL6.js";import"./chunk-KVJEI5YO.js";import"./chunk-YROS5I43.js";import"./chunk-GLLMLIXC.js";import"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-K4BRBIGO.js";import"./chunk-VP52RZT7.js";import"./chunk-IIFZNK4R.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-QB4INK6X.js";import"./chunk-ZP4PF72U.js";import"./chunk-6TO2XBUK.js";import"./chunk-RN5LEOFJ.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import*as i from"fs";import*as l from"path";var y=[".maestro","maestro"];function b(){console.log(`
3
3
  sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-26LJCQNQ.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-4ZA3J2BV.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
3
3
  sootsim preview \u2014 production-like preview
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as s,c as i,d as t,e as n,f as c}from"./chunk-OTTV2PFN.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";function f(){console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as s,c as i,d as t,e as n,f as c}from"./chunk-NMFN4EIE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";function f(){console.log(`
3
3
  sootsim profile \u2014 manage isolated storage profiles
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as w,e as b,h as m,i as f}from"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";function h(){console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as w,e as b,h as m,i as f}from"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";function h(){console.log(`
3
3
  sootsim react \u2014 inspect React component render cost in the tenant worker
4
4
 
5
5
  usage:
@@ -0,0 +1,17 @@
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as C}from"./chunk-YROS5I43.js";import"./chunk-VP52RZT7.js";import{d as V}from"./chunk-IIFZNK4R.js";import"./chunk-2TU7QJGH.js";import{d as L}from"./chunk-ECIHLBNE.js";import{c as b,e as y}from"./chunk-HIQJTM66.js";import{b as j}from"./chunk-OBIALIWI.js";import"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import{existsSync as de,mkdirSync as x,readdirSync as ce,readFileSync as le,rmSync as W,writeFileSync as M}from"fs";import{homedir as ue,tmpdir as me}from"os";import{dirname as P,extname as G,join as I,resolve as fe}from"path";var q=6e4,pe=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin"]),ge=new Set(["start","stop","cancel","status"]);function we(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){pe.has(o)&&r++;continue}return ge.has(o)?{name:o,index:r}:null}return null}async function Ee(e,r){let o=we(e);if(o){let a=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await $e(a,r);return}if(o.name==="stop"){await _e(a,r);return}if(o.name==="cancel"){await xe(a,r);return}await Re(a,r);return}let n=b(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin"]}),t=X(l(e,"--mode")),i=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,d=l(e,"--format");d&&!["webm","mp4","gif","png"].includes(d)&&(console.error(` invalid --format "${d}" \u2014 expected webm | mp4 | gif | png`),process.exit(1));let c=l(e,"--output"),s=Number(l(e,"--duration")??"10");(!Number.isFinite(s)||s<=0)&&(console.error(` invalid --duration "${l(e,"--duration")}" \u2014 expected a positive number of seconds`),process.exit(1));let u=Number(l(e,"--fps")??"30"),f=l(e,"--frames");if(f!==void 0){let a=Number(f);(!Number.isInteger(a)||a<=0)&&(console.error(` invalid --frames "${f}" \u2014 expected a positive integer count`),process.exit(1))}let _=e.includes("--open"),J=l(e,"--max-width")?Number(l(e,"--max-width")):void 0,h=Math.max(100,Math.round(s*1e3)),ie=l(e,"--origin");if(t==="live"||t==="combined"){c&&console.log(` note: --output is ignored for --mode ${t} \u2014 the recording uploads to /preview/<id>`),await C("record",{originOverride:ie});let a=y({...n,commandTimeoutMs:6e4});try{await Z(a),await ee(a),await oe(a,t)||(console.error(` start failed: recording store refused to start (${t})`),process.exit(1)),console.log(` recording ${t} for ${s}s`),await new Promise(S=>setTimeout(S,h)),await re(a);let k=await te(a);ne(k,_,t)}finally{a.close()}return}let F=f?Number(f):null,$=ve(d,c,F),g=y({...n,commandTimeoutMs:6e4});try{if(await H(g),$==="png"){let v=F??10,p=B(c,`sootsim-frames-${O()}`);c&&G(c)&&console.log(` note: --frames writes multiple pngs, so --output "${c}" is a directory \u2014 frame-NNN.png files land inside it`),x(p,{recursive:!0});for(let m of ce(p))/^frame-\d+\.png$/.test(m)&&W(I(p,m),{force:!0});console.log(` sampling ${v} frames over ${s}s \u2192 ${p}`);let w=await g.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${v}, durationMs: ${h}${i?`, layers: ${JSON.stringify(i)}`:""} })`});(!w.ok||!w.requestId)&&(console.error(` frame capture start failed: ${w.error??"unknown error"}`),process.exit(1)),await new Promise(m=>setTimeout(m,h));let se=Date.now()+Math.max(5e3,h),E=null;for(;;){let m=await g.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${w.requestId})`});if(m||(console.error(" frame capture result missing"),process.exit(1)),m.done){m.ok||(console.error(` frame capture failed: ${m.error??"unknown error"}`),process.exit(1)),E=m.frames??[];break}Date.now()>=se&&(console.error(" frame capture timed out"),process.exit(1)),await new Promise(N=>setTimeout(N,100))}E.forEach((m,N)=>{let ae=`${p}/frame-${String(N+1).padStart(3,"0")}.png`;M(ae,Buffer.from(m.data,"base64"))}),console.log(` saved ${E.length} frames`);return}if($==="gif"){let v=F??Math.max(10,Math.round(s*u/3)),p=B(c,`sootsim-${O()}.gif`);x(P(p),{recursive:!0}),console.log(` encoding gif: ${v} frames over ${s}s \u2192 ${p}`);let w=await g.send({type:"evaluate",code:`window.__sootsimRecorder.captureGif({ frames: ${v}, durationMs: ${h}${J?`, maxWidth: ${J}`:""}${i?`, layers: ${JSON.stringify(i)}`:""} })`});w||(console.error(" gif capture returned no frames"),process.exit(1)),M(p,Buffer.from(w.data,"base64")),console.log(` saved: ${p} (${T(w.size)})`);return}let a=B(c,`sootsim-${O()}.${$}`);x(P(a),{recursive:!0});let A={format:$,fps:u};i&&(A.layers=i);let k=await g.send({type:"evaluate",code:`window.__sootsimRecorder.start(${JSON.stringify(A)})`});k.ok||(console.error(` start failed: ${k.error??"unknown error"}`),process.exit(1)),console.log(` recording ${$} for ${s}s \u2192 ${a}`),await new Promise(v=>setTimeout(v,h));let S=await g.send({type:"evaluate",code:"window.__sootsimRecorder.stop()"});S.ok||(console.error(` stop failed: ${S.error??"unknown error"}`),process.exit(1)),S.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),process.exit(1)),await Q(g,a),console.log(` saved: ${a} (${T(S.size)})`)}finally{g.close()}}var be=6e3;async function K(e,r){try{return await e.send({type:"evaluate",code:r},{timeoutMs:be})}catch(o){let n=o instanceof Error?o.message:String(o);throw/^command timed out after \d+s$/.test(n)&&(console.error(" sim did not respond \u2014 it is connected to the bridge but has not\n loaded an app (or its page is unresponsive). run `sootsim list`\n and target a sim with a loaded app via --sim <id>."),process.exit(1)),o}}async function H(e){await K(e,'typeof window.__sootsimRecorder !== "undefined"')||(console.error(" window.__sootsimRecorder missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function Q(e,r){let o=[],n=0;for(;;){let t=await e.send({type:"evaluate",code:`window.__sootsimRecorder.getBlobBase64({ offset: ${n}, chunk: 2097152 })`});if(!t)throw new Error("no blob available on recorder");if(o.push(Buffer.from(t.data,"base64")),n=t.offset,t.done)break}M(r,Buffer.concat(o))}function l(e,r){let o=e.indexOf(r);if(!(o<0||o===e.length-1))return e[o+1]}function ye(e){if(!e)return;let r=G(e).toLowerCase().replace(/^\./,"");if(r==="webm"||r==="mp4"||r==="gif")return r;if(r==="png")return"png"}function ve(e,r,o){return e||(o!=null?"png":ye(r)??"webm")}function O(){return new Date().toISOString().replace(/[:T]/g,"-").replace(/\..+/,"")}function he(){let e=I(ue(),".sootsim","recordings");return x(e,{recursive:!0}),e}function B(e,r){return e?fe(process.cwd(),e):I(he(),r)}function T(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function X(e){if(!e)return"video";if(e==="video"||e==="live"||e==="combined")return e;console.error(` invalid --mode "${e}" \u2014 expected video | live | combined`),process.exit(1)}function D(){return I(me(),`sootsim-recording-${j()}.json`)}function U(){let e=D();if(!de(e))return null;try{return{mode:"video",...JSON.parse(le(e,"utf8"))}}catch{return W(e,{force:!0}),null}}function Se(e){M(D(),JSON.stringify(e,null,2))}function R(){W(D(),{force:!0})}function z(e,r){e&&r.simId&&e!==r.simId&&console.log(` note: the tracked recording session is on sim ${r.simId}, not the
3
+ requested sim ${e}. record state is global (not per-sim);
4
+ this command acts on that session regardless of --sim.`)}async function $e(e,r){let o=U();o&&(console.error(` recording already in progress (started ${o.startedAt}, sim ${o.simId??"?"}). run \`sootsim record stop\` first, or \`sootsim record cancel\` to discard.`),process.exit(1));let n=b(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only"],stripValueFlags:["--mode","--fps","--format","--max-width","--origin"]}),t=X(l(e,"--mode")),i=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,d=l(e,"--format"),c=d==="mp4"?"mp4":"webm";d&&c!==d&&(console.error(` record start only supports webm or mp4 (got: ${d}). for gif/png use atomic mode: sootsim record --format ${d} --duration <s>`),process.exit(1));let s=Number(l(e,"--fps")??"30"),u=y({...n,commandTimeoutMs:15e3});try{if(t==="live"||t==="combined")await C("record",{originOverride:l(e,"--origin")}),await Z(u),await ee(u),await oe(u,t)||(console.error(` start failed: recording store refused to start (${t})`),process.exit(1));else{await H(u);let f={format:c,fps:s};i&&(f.layers=i);let _=await u.send({type:"evaluate",code:`window.__sootsimRecorder.start(${JSON.stringify(f)})`});_.ok||(console.error(` start failed: ${_.error??"unknown error"}`),process.exit(1))}Se({simId:n.simId??null,mode:t,format:c,fps:s,layers:i,startedAt:new Date().toISOString()}),console.log(t==="video"?` recording ${c} @ ${s}fps${i?` (${i})`:""} \u2014 run \`sootsim record stop --output <path>\` when done`:` recording ${t} \u2014 run \`sootsim record stop\` when done (add --open to launch the preview URL)`)}finally{u.close()}}async function Y(e){try{let r=await e.send({type:"evaluate",code:`(() => {
5
+ const store = window.SootSim?.bridges?.getRecordingState?.();
6
+ const headless = window.__sootsimRecorder?.state?.();
7
+ return { store: store ? store.state : undefined, headless };
8
+ })()`});return r?r.store==="recording"||r.headless==="recording"?"recording":r.store==="processing"?"processing":r.store==="idle"||r.headless==="idle"?"idle":null:null}catch{return null}}async function Re(e,r){let o=U();if(o){z(b(e,{port:r.port}).simId,o),o.mode==="video"?console.log(` recording ${o.mode} (${o.format} @ ${o.fps}fps) on sim ${o.simId??"?"} since ${o.startedAt}`):console.log(` recording ${o.mode} on sim ${o.simId??"?"} since ${o.startedAt}`);return}let n=b(e,{port:r.port}),t=y({...n,commandTimeoutMs:8e3});try{let i=await Y(t);console.log(i==="recording"||i==="processing"?` a recording is in progress (engine state: ${i}), but not via
9
+ \`record start\` \u2014 likely an atomic \`record --duration\` run or the
10
+ in-browser record button. it will finish and upload on its own.
11
+ \`record stop\` / \`record cancel\` only manage \`record start\` sessions.`:" no recording in progress")}finally{t.close()}}async function xe(e,r){let o=U();if(!o){let d=b(e,{port:r.port}),c=y({...d,commandTimeoutMs:8e3});try{let s=await Y(c);console.log(s==="recording"||s==="processing"?" a recording is in progress, but not via `record start` \u2014 it was\n started by an atomic `record --duration` run or the in-browser\n record button, which own their own lifecycle. it cannot be\n cancelled from here; it will finish on its own.":" no recording in progress")}finally{c.close()}return}let n=b(e,{port:r.port});z(n.simId,o);let t=o.simId??n.simId??void 0,i=y({...n,simId:t,commandTimeoutMs:15e3});try{o.mode==="live"||o.mode==="combined"?await i.send({type:"evaluate",code:"void window.SootSim?.bridges?.cancelRecording?.()"}):await i.send({type:"evaluate",code:"window.__sootsimRecorder.stop()"})}catch{}finally{R(),i.close()}console.log(" recording cancelled")}async function _e(e,r){let o=U();o||(console.error(" no recording in progress. start one with `sootsim record start`."),process.exit(1));let n=b(e,{port:r.port,stripBooleanFlags:["--open"],stripValueFlags:["--output"]});z(n.simId,o);let t=o.simId??n.simId??void 0,i=e.includes("--open"),d=y({...n,simId:t,commandTimeoutMs:6e4});try{if(o.mode==="live"||o.mode==="combined"){await re(d);let f=await te(d);R(),ne(f,i,o.mode);return}let c=l(e,"--output"),s=B(c,`sootsim-${O()}.${o.format}`);x(P(s),{recursive:!0});let u=await d.send({type:"evaluate",code:"window.__sootsimRecorder.stop()"});u.ok||(console.error(` stop failed: ${u.error??"unknown error"}`),R(),process.exit(1)),u.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),R(),process.exit(1)),await Q(d,s),R(),console.log(` saved: ${s} (${T(u.size)})`)}finally{d.close()}}async function Z(e){await K(e,'typeof window.SootSim?.bridges?.startRecording === "function" && typeof window.SootSim?.bridges?.stopRecording === "function"')||(console.error(" SootSim.bridges.startRecording missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function ee(e){let r=V();if(!r)return;let o=r.kind==="api-key"?r.secret:r.token;await e.send({type:"evaluate",code:`(() => {
12
+ const set = window.SootSim && window.SootSim.bridges && window.SootSim.bridges.setSession
13
+ if (typeof set !== 'function') return false
14
+ set({ token: ${JSON.stringify(o)}, user: null })
15
+ return true
16
+ })()`})||(console.error(" SootSim.bridges.setSession missing \u2014 this sim is running an engine\n build without CLI-injected preview auth. reload the sim or open a\n fresh one (`sootsim open --new`); if it persists, update sootsim."),process.exit(1))}async function oe(e,r){return await e.send({type:"evaluate",code:`window.SootSim.bridges.startRecording(${JSON.stringify(r)})`})===!0}async function re(e){await e.send({type:"evaluate",code:"void window.SootSim.bridges.stopRecording()"})}async function te(e){let r=Date.now()+q;for(;Date.now()<r;){let o=await e.send({type:"evaluate",code:"(() => { const s = window.SootSim?.bridges?.getRecordingState?.(); return s ? { state: s.state, lastUpload: s.lastUpload, uploadError: s.uploadError } : null })()"});if(o&&o.state==="idle"){if(o.uploadError)return{uploadError:o.uploadError};if(o.lastUpload?.previewUrl)return{previewUrl:o.lastUpload.previewUrl,eventCount:o.lastUpload.eventCount}}await new Promise(n=>setTimeout(n,300))}return{uploadError:`upload did not settle within ${q/1e3}s`}}function ne(e,r,o){e.uploadError&&(console.error(` upload failed: ${e.uploadError}`),process.exit(1)),e.previewUrl||(console.error(" upload returned no preview URL"),process.exit(1)),console.log(` preview: ${e.previewUrl}`),o==="live"&&e.eventCount===0&&console.log(` note: this live recording captured no events \u2014 the preview has nothing
17
+ to replay and will boot a fresh interactive session instead.`),r&&L(e.previewUrl)}export{ye as extToFormat,ve as resolveFormat,Ee as runRecord,l as valueOf};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-BU7OXA7Y.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-FBCGPPDA.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";export{a as runRuntime};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-V527VARZ.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";export{a as DEFAULT_RUNTIME_CDN_ORIGIN,b as RUNTIME_CDN_ORIGIN_ENV,c as RUNTIME_CHANNEL_ENV,l as checkRuntimeUpToDate,h as fetchRuntimeManifest,j as installRuntime,d as resolveRuntimeCdnOrigin,e as resolveRuntimeChannel,i as resolveRuntimeVersion,f as runtimeManifestUrl,g as runtimeTarballUrl,k as updateRuntimeToLatest};
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-FBCGPPDA.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";export{a as DEFAULT_RUNTIME_CDN_ORIGIN,b as RUNTIME_CDN_ORIGIN_ENV,c as RUNTIME_CHANNEL_ENV,l as checkRuntimeUpToDate,h as fetchRuntimeManifest,j as installRuntime,d as resolveRuntimeCdnOrigin,e as resolveRuntimeChannel,i as resolveRuntimeVersion,f as runtimeManifestUrl,g as runtimeTarballUrl,k as updateRuntimeToLatest};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as v}from"./chunk-EW7G6TZV.js";import"./chunk-SIH4PE3C.js";import{a as x}from"./chunk-W7N6B2MX.js";import"./chunk-RHH6P5Z7.js";import"./chunk-3VULRGJO.js";import{f as m}from"./chunk-OK3YCEYK.js";import{c as h,d as g,e as w,h as y}from"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";import{mkdirSync as R,writeFileSync as S}from"fs";import{dirname as _,resolve as B}from"path";async function W(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as v}from"./chunk-54V7OVL6.js";import"./chunk-KVJEI5YO.js";import{a as x}from"./chunk-IMTTDIJJ.js";import"./chunk-QB4INK6X.js";import"./chunk-6TO2XBUK.js";import{f as m}from"./chunk-RN5LEOFJ.js";import{c as h,d as g,e as w,h as y}from"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import{mkdirSync as R,writeFileSync as S}from"fs";import{dirname as _,resolve as B}from"path";async function W(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim screenshot \u2014 capture the canvas as a PNG
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as o}from"./chunk-CHAVUZ6X.js";import"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";async function n(e,s){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-6QY5P2H6.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";async function n(e,s){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim screenshot-mode \u2014 toggle the screenshot-mode chrome overlay
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as Y}from"./chunk-UBJJEZO4.js";import"./chunk-XXJAHIR4.js";import{b as j}from"./chunk-EW7G6TZV.js";import"./chunk-SIH4PE3C.js";import"./chunk-IFJMJS4Y.js";import{b as O}from"./chunk-QD23HPD4.js";import"./chunk-XWVTLGO2.js";import"./chunk-YSSNIJC6.js";import"./chunk-X3ZHRSH4.js";import"./chunk-HFRDF5SI.js";import"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-BAHIX7JY.js";import"./chunk-JJGG2ICF.js";import"./chunk-4NPUTEDF.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import"./chunk-RHH6P5Z7.js";import"./chunk-KFTTDAPI.js";import"./chunk-3VULRGJO.js";import{a as w,b as D,c as k,d as z,e as x,f as T}from"./chunk-OK3YCEYK.js";import"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-IBKI7UPZ.js";import"./chunk-QOOTU75R.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";import{mkdirSync as B,readFileSync as pe,writeFileSync as G}from"fs";import{tmpdir as je}from"os";import C from"path";import{mkdirSync as I,readFileSync as Q,writeFileSync as H}from"fs";import F from"path";function _(e){return e.replace(/\\/g,"/").replace(/\.png$/i,"").trim().split("/").filter(Boolean).join("--").replace(/[^A-Za-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"slide"}function v(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}function ee(e){let t=e.trim();return/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function M(e,t){let o=ee(e),i=Math.max(0,Math.min(1,t)),n=o.match(/^#([0-9a-f]{6})$/i);if(n){let s=n[1],r=Number.parseInt(s.slice(0,2),16),a=Number.parseInt(s.slice(2,4),16),u=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${u}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function te(e){if(e.type==="solid")return e.color||"#000000";let t=e.direction??180,o=e.stops?.map(i=>`${i.color} ${i.offset}%`).join(", ")||"#000000 0%, #111111 100%";return`linear-gradient(${t}deg, ${o})`}function re(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${M(t,.46)} 0%, ${M(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function A(e){switch(e){case"tilted-left":return"perspective(2400px) rotateY(10deg) rotateZ(-2deg)";case"tilted-right":return"perspective(2400px) rotateY(-10deg) rotateZ(2deg)";case"cut-bottom":return"translateY(10%) scale(1.08)";case"cut-top":return"translateY(-16%) scale(1.08)";default:return"none"}}function L(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function E(e){let t=M(e.color,e.opacity),o=M(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function R(e,t){return!t.glow||e.color&&e.color!==w.color?e:{...e,color:t.glow}}function oe(e,t){if(e==="editorial-left"){let n=Math.round(t.height*.056),s=Math.round(t.height*.022);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.12)}px`,`left:${Math.round(t.width*.085)}px`,`width:${Math.round(t.width*.42)}px`,"text-align:left","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.92;`,subStyle:`font-size:${s}px;line-height:1.36;max-width:${Math.round(t.width*.36)}px;`,eyebrowStyle:"align-items:flex-start;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),c=a.pose||r.pose||"tilted-right",m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.18)+l}px`,`left:${Math.round(t.width*.56)}px`,`width:${p}px`,"transform-origin:center center",`transform:${A(c)}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}if(e==="minimal-bottom"){let n=Math.round(t.height*.041),s=Math.round(t.height*.019);return{copyStyle:["position:absolute",`left:${Math.round(t.width*.12)}px`,`right:${Math.round(t.width*.12)}px`,`bottom:${Math.round(t.height*.085)}px`,"text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.96;`,subStyle:`font-size:${s}px;line-height:1.34;max-width:${Math.round(t.width*.56)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),c=a.pose||r.pose,m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${L("translateX(-50%)",A(c))}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}let o=Math.round(t.height*.04),i=Math.round(t.height*.019);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.084)}px`,"left:50%",`width:${Math.round(t.width*.88)}px`,"transform:translateX(-50%)","text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${o}px;line-height:0.92;`,subStyle:`font-size:${i}px;line-height:1.34;max-width:${Math.round(t.width*.6)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(n,s,r)=>{let a=t.name==="ipad-13"?.54:.64,u=Math.round(t.width*a*(s.scale??n.scale)),p=Math.round(t.height*(n.offsetY+(s.offsetY??0))),l=s.pose||n.pose,c=R(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*(t.name==="ipad-13"?.25:.28))+p}px`,"left:50%",`width:${u}px`,"transform-origin:center top",`transform:${L("translateX(-50%)",A(l))}`,`filter:${E(c)}`,"z-index:2"].join(";")}}}function ne({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=oe(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),u=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${v(o.headline)}</div>`:"",p=o.subheadline?`<div style="margin-top:${Math.round(e.height*.018)}px;color:${t.text.subColor};white-space:pre-line;text-wrap:balance;${s.subStyle}">${v(o.subheadline)}</div>`:"",l=o.eyebrow?`<div style="display:flex;${s.eyebrowStyle}margin-bottom:${Math.round(e.height*.016)}px;"><div style="font-size:${Math.round(e.height*.014)}px;font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:${t.text.eyebrowColor};">${v(o.eyebrow)}</div></div>`:"";return`<!doctype html>
1
+ /*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as Y}from"./chunk-MS5QBIOB.js";import"./chunk-EAMMI2FH.js";import{b as j}from"./chunk-54V7OVL6.js";import"./chunk-KVJEI5YO.js";import"./chunk-YROS5I43.js";import{b as O}from"./chunk-GLLMLIXC.js";import"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-K4BRBIGO.js";import"./chunk-VP52RZT7.js";import"./chunk-IIFZNK4R.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-QB4INK6X.js";import"./chunk-ZP4PF72U.js";import"./chunk-6TO2XBUK.js";import{a as w,b as D,c as k,d as z,e as x,f as T}from"./chunk-RN5LEOFJ.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import{mkdirSync as B,readFileSync as pe,writeFileSync as G}from"fs";import{tmpdir as je}from"os";import C from"path";import{mkdirSync as I,readFileSync as Q,writeFileSync as H}from"fs";import F from"path";function _(e){return e.replace(/\\/g,"/").replace(/\.png$/i,"").trim().split("/").filter(Boolean).join("--").replace(/[^A-Za-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"slide"}function v(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}function ee(e){let t=e.trim();return/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function M(e,t){let o=ee(e),i=Math.max(0,Math.min(1,t)),n=o.match(/^#([0-9a-f]{6})$/i);if(n){let s=n[1],r=Number.parseInt(s.slice(0,2),16),a=Number.parseInt(s.slice(2,4),16),u=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${u}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function te(e){if(e.type==="solid")return e.color||"#000000";let t=e.direction??180,o=e.stops?.map(i=>`${i.color} ${i.offset}%`).join(", ")||"#000000 0%, #111111 100%";return`linear-gradient(${t}deg, ${o})`}function re(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${M(t,.46)} 0%, ${M(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function A(e){switch(e){case"tilted-left":return"perspective(2400px) rotateY(10deg) rotateZ(-2deg)";case"tilted-right":return"perspective(2400px) rotateY(-10deg) rotateZ(2deg)";case"cut-bottom":return"translateY(10%) scale(1.08)";case"cut-top":return"translateY(-16%) scale(1.08)";default:return"none"}}function L(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function E(e){let t=M(e.color,e.opacity),o=M(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function R(e,t){return!t.glow||e.color&&e.color!==w.color?e:{...e,color:t.glow}}function oe(e,t){if(e==="editorial-left"){let n=Math.round(t.height*.056),s=Math.round(t.height*.022);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.12)}px`,`left:${Math.round(t.width*.085)}px`,`width:${Math.round(t.width*.42)}px`,"text-align:left","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.92;`,subStyle:`font-size:${s}px;line-height:1.36;max-width:${Math.round(t.width*.36)}px;`,eyebrowStyle:"align-items:flex-start;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),c=a.pose||r.pose||"tilted-right",m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.18)+l}px`,`left:${Math.round(t.width*.56)}px`,`width:${p}px`,"transform-origin:center center",`transform:${A(c)}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}if(e==="minimal-bottom"){let n=Math.round(t.height*.041),s=Math.round(t.height*.019);return{copyStyle:["position:absolute",`left:${Math.round(t.width*.12)}px`,`right:${Math.round(t.width*.12)}px`,`bottom:${Math.round(t.height*.085)}px`,"text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.96;`,subStyle:`font-size:${s}px;line-height:1.34;max-width:${Math.round(t.width*.56)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),c=a.pose||r.pose,m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${L("translateX(-50%)",A(c))}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}let o=Math.round(t.height*.04),i=Math.round(t.height*.019);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.084)}px`,"left:50%",`width:${Math.round(t.width*.88)}px`,"transform:translateX(-50%)","text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${o}px;line-height:0.92;`,subStyle:`font-size:${i}px;line-height:1.34;max-width:${Math.round(t.width*.6)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(n,s,r)=>{let a=t.name==="ipad-13"?.54:.64,u=Math.round(t.width*a*(s.scale??n.scale)),p=Math.round(t.height*(n.offsetY+(s.offsetY??0))),l=s.pose||n.pose,c=R(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*(t.name==="ipad-13"?.25:.28))+p}px`,"left:50%",`width:${u}px`,"transform-origin:center top",`transform:${L("translateX(-50%)",A(l))}`,`filter:${E(c)}`,"z-index:2"].join(";")}}}function ne({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=oe(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),u=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${v(o.headline)}</div>`:"",p=o.subheadline?`<div style="margin-top:${Math.round(e.height*.018)}px;color:${t.text.subColor};white-space:pre-line;text-wrap:balance;${s.subStyle}">${v(o.subheadline)}</div>`:"",l=o.eyebrow?`<div style="display:flex;${s.eyebrowStyle}margin-bottom:${Math.round(e.height*.016)}px;"><div style="font-size:${Math.round(e.height*.014)}px;font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:${t.text.eyebrowColor};">${v(o.eyebrow)}</div></div>`:"";return`<!doctype html>
3
3
  <html>
4
4
  <head>
5
5
  <meta charset="utf-8" />