sootsim 0.1.184 → 0.1.185

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 (148) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-KSX5D27X.js → agent-VF756RZU.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-MS6TJF5Y.js → agent-wrapper-IAFL7ROV.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-HHN6X2VJ.js → app-fonts-VWLEC7ZA.js} +2 -2
  5. package/dist-cli/chunks/{assert-XHVSQZOE.js → assert-I55QVGG7.js} +2 -2
  6. package/dist-cli/chunks/beta-X6YPQVZH.js +2 -0
  7. package/dist-cli/chunks/{camera-7L7D4XUO.js → camera-CYYBJH7W.js} +2 -2
  8. package/dist-cli/chunks/{chunk-C3WRMMUM.js → chunk-2T73IGB2.js} +2 -2
  9. package/dist-cli/chunks/{chunk-AKQWG57K.js → chunk-4NUQVW5P.js} +17 -4
  10. package/dist-cli/chunks/{chunk-IG7F7DTQ.js → chunk-4OUQAR34.js} +1 -1
  11. package/dist-cli/chunks/{chunk-7C6RC3BU.js → chunk-7OAUPGLN.js} +2 -2
  12. package/dist-cli/chunks/{chunk-NBF2SXAH.js → chunk-ARNLQPMQ.js} +2 -2
  13. package/dist-cli/chunks/{chunk-53KKDNCU.js → chunk-BI56RR3G.js} +1 -1
  14. package/dist-cli/chunks/{chunk-JFCJIRX6.js → chunk-BMCBPMTC.js} +1 -1
  15. package/dist-cli/chunks/{chunk-XSWATK6S.js → chunk-C3UEINOZ.js} +2 -2
  16. package/dist-cli/chunks/{chunk-YQNX7JK6.js → chunk-C63EVPDN.js} +2 -2
  17. package/dist-cli/chunks/{chunk-U636Z2JZ.js → chunk-CYBRFHPU.js} +2 -2
  18. package/dist-cli/chunks/{chunk-3KK3YZQ3.js → chunk-DZLBZGHN.js} +2 -2
  19. package/dist-cli/chunks/{chunk-V36X7TNR.js → chunk-E5DE33BU.js} +1 -1
  20. package/dist-cli/chunks/{chunk-S5XWFD5C.js → chunk-EXFB33AZ.js} +2 -2
  21. package/dist-cli/chunks/{chunk-7DKGX746.js → chunk-FHJTTB3W.js} +2 -2
  22. package/dist-cli/chunks/{chunk-OGLOOKK6.js → chunk-FUHXL6BW.js} +1 -1
  23. package/dist-cli/chunks/{chunk-7DHLNDOA.js → chunk-FY6DJGOS.js} +1 -1
  24. package/dist-cli/chunks/{chunk-IHH3JCV5.js → chunk-GX6MKIFC.js} +1 -1
  25. package/dist-cli/chunks/{chunk-IZMNFZXZ.js → chunk-HQG4DRQ3.js} +1 -1
  26. package/dist-cli/chunks/chunk-IGJHME3T.js +1 -0
  27. package/dist-cli/chunks/{chunk-ID25RWPE.js → chunk-IJP257WP.js} +1 -1
  28. package/dist-cli/chunks/chunk-JRL7PFNZ.js +463 -0
  29. package/dist-cli/chunks/{chunk-YYS2ITHH.js → chunk-K2THZIVC.js} +1 -1
  30. package/dist-cli/chunks/chunk-KOKIECMB.js +118 -0
  31. package/dist-cli/chunks/{chunk-3S5BOWO5.js → chunk-LI4RLX6B.js} +1 -1
  32. package/dist-cli/chunks/{chunk-N5LA5G7V.js → chunk-LJ3SOZBF.js} +2 -2
  33. package/dist-cli/chunks/{chunk-QZW44BMW.js → chunk-M3P67TBN.js} +1 -1
  34. package/dist-cli/chunks/{chunk-Q6EHTP4Q.js → chunk-MADEJDFD.js} +1 -1
  35. package/dist-cli/chunks/{chunk-WSN7MF4E.js → chunk-NL5IFN4T.js} +2 -2
  36. package/dist-cli/chunks/chunk-OAHGYDJR.js +13 -0
  37. package/dist-cli/chunks/{chunk-Q2S6VBXK.js → chunk-PDLQWZN4.js} +1 -1
  38. package/dist-cli/chunks/{chunk-6MPD3QXA.js → chunk-PIUKLO3W.js} +1 -1
  39. package/dist-cli/chunks/{chunk-6GC57KRY.js → chunk-PKZNXDUJ.js} +2 -2
  40. package/dist-cli/chunks/{chunk-MXXD5U6B.js → chunk-QQ4NSPAD.js} +2 -2
  41. package/dist-cli/chunks/{chunk-FAB5CDE7.js → chunk-QTFCJYBF.js} +3 -3
  42. package/dist-cli/chunks/{chunk-WAZCQ5UO.js → chunk-R4KLD4P4.js} +2 -2
  43. package/dist-cli/chunks/chunk-SL6565MR.js +1 -0
  44. package/dist-cli/chunks/{chunk-M6RZYHFK.js → chunk-TFZO277G.js} +1 -1
  45. package/dist-cli/chunks/{chunk-WMLFWLD7.js → chunk-TNHF6BON.js} +1 -1
  46. package/dist-cli/chunks/{chunk-T4XAQ7VQ.js → chunk-TUF6EPCQ.js} +2 -2
  47. package/dist-cli/chunks/chunk-V4M2R6FZ.js +2 -0
  48. package/dist-cli/chunks/{chunk-FD4BKULK.js → chunk-V5JEPE3P.js} +2 -2
  49. package/dist-cli/chunks/{chunk-WNUF6LJX.js → chunk-WBY4JJ2K.js} +2 -2
  50. package/dist-cli/chunks/{chunk-QQ4JDVR6.js → chunk-WEJKLJ4B.js} +2 -2
  51. package/dist-cli/chunks/{chunk-NWNFGZSI.js → chunk-X4KS33ZC.js} +2 -2
  52. package/dist-cli/chunks/{chunk-T5YWTSGG.js → chunk-XU5EMZ4B.js} +2 -2
  53. package/dist-cli/chunks/cli-version-ICHQMND6.js +2 -0
  54. package/dist-cli/chunks/{compat-EGXOXW5F.js → compat-ZJA3N4ZT.js} +3 -3
  55. package/dist-cli/chunks/{control-LUH3EQQG.js → control-CZFSYSYG.js} +2 -2
  56. package/dist-cli/chunks/{cpu-profile-7LF5VVWE.js → cpu-profile-ACSQMVXY.js} +2 -2
  57. package/dist-cli/chunks/daemon-337B4P3B.js +2 -0
  58. package/dist-cli/chunks/{debug-3J74TASS.js → debug-W2ZOVTQO.js} +3 -3
  59. package/dist-cli/chunks/{detox-PHLGST7G.js → detox-ANJO6T27.js} +2 -2
  60. package/dist-cli/chunks/{device-CBGLBSS6.js → device-KPPN4KYD.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-BXUHKEVI.js → diagnose-5PEJYGES.js} +2 -2
  62. package/dist-cli/chunks/drivers-MSDIFHBD.js +2 -0
  63. package/dist-cli/chunks/{electron-UYJPUPAG.js → electron-U456QLSQ.js} +3 -3
  64. package/dist-cli/chunks/flow-JL3SC6HC.js +2 -0
  65. package/dist-cli/chunks/help-PA4RTR5X.js +2 -0
  66. package/dist-cli/chunks/{hints-7A4UIZZL.js → hints-MBBQLMQU.js} +2 -2
  67. package/dist-cli/chunks/{home-paths-THYEF54Y.js → home-paths-KQKYP2SE.js} +2 -2
  68. package/dist-cli/chunks/{inspect-QULPTQ5V.js → inspect-ZP5SM4EW.js} +61 -61
  69. package/dist-cli/chunks/{install-desktop-X7G7VTBV.js → install-desktop-OR6ZJ43X.js} +3 -3
  70. package/dist-cli/chunks/{keys-JLP4YC4T.js → keys-JSQMBUE7.js} +2 -2
  71. package/dist-cli/chunks/{login-VB4HG5WR.js → login-DVMWAI3G.js} +4 -4
  72. package/dist-cli/chunks/{logout-TIVYUTTD.js → logout-RIVPFE5N.js} +2 -2
  73. package/dist-cli/chunks/{maestro-C2WVLDFM.js → maestro-TX6FPTVH.js} +8 -6
  74. package/dist-cli/chunks/optional-demo-registry-ONYG6DUI.js +2 -0
  75. package/dist-cli/chunks/{preview-YBV54B2S.js → preview-3AD7WNA6.js} +2 -2
  76. package/dist-cli/chunks/{profile-67C256LQ.js → profile-HY55VFNR.js} +2 -2
  77. package/dist-cli/chunks/{react-HJ3WPDNO.js → react-HDRCKCKV.js} +2 -2
  78. package/dist-cli/chunks/{record-FD4QYCBW.js → record-HW4C7QYN.js} +2 -2
  79. package/dist-cli/chunks/runtime-RHHPW5WO.js +2 -0
  80. package/dist-cli/chunks/{screenshot-UTVYF7F4.js → screenshot-XFR3QN5T.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-WPSK6REL.js → screenshot-mode-Y5CVO267.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-OXRAQXWN.js → screenshots-RKUL2ZZT.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-capture-KDNNRKDL.js → screenshots-capture-RVNF75ZD.js} +8 -8
  84. package/dist-cli/chunks/{serve-ZKEXM2U5.js → serve-QMRYLWL5.js} +2 -2
  85. package/dist-cli/chunks/{setup-A5RLMR3I.js → setup-ELNJS7AI.js} +3 -3
  86. package/dist-cli/chunks/{skills-FSJFEKNP.js → skills-GPSJYS4W.js} +2 -2
  87. package/dist-cli/chunks/{slides-UU3DFZDY.js → slides-OCFNPIFG.js} +2 -2
  88. package/dist-cli/chunks/store-MBKDUQEQ.js +2 -0
  89. package/dist-cli/chunks/telemetry-46XXIUEE.js +2 -0
  90. package/dist-cli/chunks/{telemetry-TOTJDY6O.js → telemetry-KFZQUFG5.js} +2 -2
  91. package/dist-cli/chunks/{test-D6T7Z4XS.js → test-Z2HZXCZM.js} +3 -3
  92. package/dist-cli/chunks/{three-mode-CAKEPRJQ.js → three-mode-NKJFCDYS.js} +2 -2
  93. package/dist-cli/chunks/{timeline-D6NKNKNS.js → timeline-PRGQMQRR.js} +2 -2
  94. package/dist-cli/chunks/{upgrade-DBT6E6DD.js → upgrade-3NW7JRRX.js} +2 -2
  95. package/dist-cli/chunks/upload-QVDVJ6ZK.js +2 -0
  96. package/dist-cli/chunks/{version-4PLJ73Q3.js → version-FDTZRIYT.js} +2 -2
  97. package/dist-cli/chunks/{web-O6QWIX3V.js → web-4N5QQEQJ.js} +2 -2
  98. package/dist-cli/chunks/{what-happened-67DBMM4S.js → what-happened-IX2RRCOS.js} +2 -2
  99. package/dist-cli/chunks/{whoami-PSQRCMUL.js → whoami-QZ42FYYF.js} +2 -2
  100. package/dist-lib/agent-daemon-client.cjs +1 -1
  101. package/dist-lib/agent-events.cjs +1 -1
  102. package/dist-lib/agent-sessions.cjs +1 -1
  103. package/dist-lib/attached-projects.cjs +1 -1
  104. package/dist-lib/auth/shared-session.cjs +1 -1
  105. package/dist-lib/backend-origin.cjs +1 -1
  106. package/dist-lib/beta.cjs +1 -1
  107. package/dist-lib/beta.mjs +1 -1
  108. package/dist-lib/bridge-constants.cjs +1 -1
  109. package/dist-lib/cli-constants.cjs +1 -1
  110. package/dist-lib/config.cjs +1 -1
  111. package/dist-lib/detox/index.cjs +1 -1
  112. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  113. package/dist-lib/home-paths.cjs +1 -1
  114. package/dist-lib/host/bridge-host.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  117. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  118. package/dist-lib/host/websocket-proxy.cjs +1 -1
  119. package/dist-lib/index.cjs +1 -1
  120. package/dist-lib/jump-to-source-babel.cjs +1 -1
  121. package/dist-lib/menu.cjs +1 -1
  122. package/dist-lib/menu.mjs +1 -1
  123. package/dist-lib/metro.cjs +1 -1
  124. package/dist-lib/profiles.cjs +1 -1
  125. package/dist-lib/render-mode.cjs +1 -1
  126. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  127. package/dist-lib/sdk.cjs +1 -1
  128. package/dist-lib/sdk.mjs +1 -1
  129. package/dist-lib/skills.cjs +218 -47
  130. package/dist-lib/vite.cjs +1 -1
  131. package/package.json +1 -1
  132. package/dist-cli/chunks/beta-JS4JTDFC.js +0 -2
  133. package/dist-cli/chunks/chunk-BB432MX4.js +0 -1
  134. package/dist-cli/chunks/chunk-MFL73VJG.js +0 -2
  135. package/dist-cli/chunks/chunk-VGTPGXKM.js +0 -1
  136. package/dist-cli/chunks/chunk-VVACMCCE.js +0 -118
  137. package/dist-cli/chunks/chunk-WDMIABUY.js +0 -463
  138. package/dist-cli/chunks/chunk-WLDAMCQK.js +0 -13
  139. package/dist-cli/chunks/cli-version-L6NDSEVW.js +0 -2
  140. package/dist-cli/chunks/daemon-NGDXMG6R.js +0 -2
  141. package/dist-cli/chunks/drivers-QX77DPCG.js +0 -2
  142. package/dist-cli/chunks/flow-KDVDRUEN.js +0 -2
  143. package/dist-cli/chunks/help-4L6UVSAZ.js +0 -2
  144. package/dist-cli/chunks/optional-demo-registry-WV2BZJ5T.js +0 -2
  145. package/dist-cli/chunks/runtime-BY3EB4G7.js +0 -2
  146. package/dist-cli/chunks/store-TZH6LKFH.js +0 -2
  147. package/dist-cli/chunks/telemetry-AHIQ3SS5.js +0 -2
  148. package/dist-cli/chunks/upload-JR2B3YT7.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as x}from"./chunk-IG7F7DTQ.js";import{a as k}from"./chunk-JFCJIRX6.js";import"./chunk-IHH3JCV5.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as b}from"path";var h="https://sootbean.com/api/electron-release";function O(){let n=process.arch;if(process.platform==="darwin"){let o=n==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=n==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function I({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error(`empty response body (${n})`);y(A(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,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(r=>r?p(r):l())})}}function _(n,o){let e=(n/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(n/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}% ${e} / ${t} MB`}async function L(n){let o=u("hdiutil",["attach","-nobrowse","-readonly",n],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as x}from"./chunk-4OUQAR34.js";import{a as k}from"./chunk-BMCBPMTC.js";import"./chunk-GX6MKIFC.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as b}from"path";var h="https://sootbean.com/api/electron-release";function O(){let n=process.arch;if(process.platform==="darwin"){let o=n==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=n==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function I({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error(`empty response body (${n})`);y(A(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,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(r=>r?p(r):l())})}}function _(n,o){let e=(n/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(n/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}% ${e} / ${t} MB`}async function L(n){let o=u("hdiutil",["attach","-nobrowse","-readonly",n],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
3
3
  `),t=e[e.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=b(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]),r=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return r.status!==0&&console.warn(` warning: failed to unmount ${t} (${r.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function C(n){let o=b(process.env.HOME||"","Applications");y(o,{recursive:!0});let e=f(o,"sootsim.AppImage");return w(e)&&g(e,{force:!0}),T(n,e),D(n),S(e,493),e}async function B(n){return await new Promise((o,e)=>{let s=v("cmd",["/c","start",'""',"/wait",n],{stdio:"inherit"});s.once("error",e),s.once("exit",t=>{t===0?o():e(new Error(`installer exited with code ${t}`))})}),n}async function q(n){(n.includes("--help")||n.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=n.includes("--yes")||n.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,e=n.includes("--force"),s=k();if(s&&!e){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=O();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, linux-arm64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await x("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(M(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
21
21
  `);try{await I({url:t.url,dest:i,onProgress:(r,m)=>{let $=Date.now();$-d<100&&r<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${_(r,m)}`))}})}catch(r){g(a,{recursive:!0,force:!0});let m=r instanceof Error?r.message:String(r);console.error(`
22
22
  download failed: ${m}`),console.error(` the ${t.platform} desktop build may not be published yet, or your`),console.error(" network blocked the request. check your connection and try again later;"),console.error(" the CLI + daemon work without the desktop app (run: sootsim --help)."),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-AHIQ3SS5.js");try{let r=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${r}`)}catch(r){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:r instanceof Error?r.message:String(r)}}),await p(),console.error(` install failed: ${r instanceof Error?r.message:String(r)}`),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{q 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-46XXIUEE.js");try{let r=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${r}`)}catch(r){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:r instanceof Error?r.message:String(r)}}),await p(),console.error(` install failed: ${r instanceof Error?r.message:String(r)}`),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{q as runInstallDesktop};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (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-6GC57KRY.js";import{d as c}from"./chunk-N5LA5G7V.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.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.185 | (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-PKZNXDUJ.js";import{d as c}from"./chunk-LJ3SOZBF.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as g,d as m}from"./chunk-N5LA5G7V.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";import{exec as O}from"node:child_process";import{randomBytes as S}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(r){if(r)return r;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 L(){console.log(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as g,d as m}from"./chunk-LJ3SOZBF.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";import{exec as O}from"node:child_process";import{randomBytes as S}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(r){if(r)return r;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 L(){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">${r}</p>
22
22
  </div>
23
23
  </body>
24
- </html>`}async function P(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let c=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${c}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function A(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function G(r){(r.includes("--help")||r.includes("-h"))&&(L(),process.exit(0));let e=[...r],t=await x(R(e,"--origin"));if(A(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await P(t);if(o.ok){g({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let s=await m(t),l=s?.user?.email||o.email||s?.user?.id||o.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-AHIQ3SS5.js");n({event:"cli_login_succeeded",identity:{userId:o.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let c=S(16).toString("hex"),i=await new Promise(o=>{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,$=a.searchParams.get("userId")||void 0,f=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),f){n.end(u(`sign-in failed: ${f}`)),o({ok:!1,error:f}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),o({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),o({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),o({ok:!0,token:k,email:b,userId:$}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),o({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"){o({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",t),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(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let c=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${c}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function A(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function G(r){(r.includes("--help")||r.includes("-h"))&&(L(),process.exit(0));let e=[...r],t=await x(R(e,"--origin"));if(A(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await P(t);if(o.ok){g({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let s=await m(t),l=s?.user?.email||o.email||s?.user?.id||o.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-46XXIUEE.js");n({event:"cli_login_succeeded",identity:{userId:o.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let c=S(16).toString("hex"),i=await new Promise(o=>{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,$=a.searchParams.get("userId")||void 0,f=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),f){n.end(u(`sign-in failed: ${f}`)),o({ok:!1,error:f}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),o({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),o({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),o({ok:!0,token:k,email:b,userId:$}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),o({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"){o({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",t),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
- `),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-AHIQ3SS5.js");o({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}g({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let d=await m(t),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-AHIQ3SS5.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:t}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
26
+ `),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-46XXIUEE.js");o({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}g({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let d=await m(t),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-46XXIUEE.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:t}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r,b as i}from"./chunk-YQNX7JK6.js";import{a as t,c as o}from"./chunk-N5LA5G7V.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.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.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r,b as i}from"./chunk-C63EVPDN.js";import{a as t,c as o}from"./chunk-LJ3SOZBF.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as y,c as v}from"./chunk-WDMIABUY.js";import"./chunk-C3WRMMUM.js";import"./chunk-VGTPGXKM.js";import"./chunk-MXXD5U6B.js";import"./chunk-NBF2SXAH.js";import"./chunk-6GC57KRY.js";import{b as h,c as w}from"./chunk-T5YWTSGG.js";import"./chunk-WLDAMCQK.js";import"./chunk-FD4BKULK.js";import"./chunk-7DKGX746.js";import"./chunk-7DHLNDOA.js";import"./chunk-WMLFWLD7.js";import"./chunk-ID25RWPE.js";import"./chunk-YYS2ITHH.js";import"./chunk-7C6RC3BU.js";import"./chunk-AKQWG57K.js";import"./chunk-JFCJIRX6.js";import"./chunk-IZMNFZXZ.js";import"./chunk-WNUF6LJX.js";import"./chunk-WSN7MF4E.js";import"./chunk-YQNX7JK6.js";import"./chunk-N5LA5G7V.js";import"./chunk-T4XAQ7VQ.js";import"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-OGLOOKK6.js";import"./chunk-IHH3JCV5.js";import*as n from"fs";import*as a from"path";var S=[".maestro","maestro"];function k(){console.log(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as w,c as v}from"./chunk-JRL7PFNZ.js";import"./chunk-2T73IGB2.js";import"./chunk-SL6565MR.js";import"./chunk-QQ4NSPAD.js";import"./chunk-ARNLQPMQ.js";import"./chunk-PKZNXDUJ.js";import{b as h,c as y}from"./chunk-XU5EMZ4B.js";import"./chunk-OAHGYDJR.js";import"./chunk-V5JEPE3P.js";import"./chunk-FHJTTB3W.js";import"./chunk-FY6DJGOS.js";import"./chunk-TNHF6BON.js";import"./chunk-IJP257WP.js";import"./chunk-K2THZIVC.js";import"./chunk-7OAUPGLN.js";import"./chunk-4NUQVW5P.js";import"./chunk-BMCBPMTC.js";import"./chunk-HQG4DRQ3.js";import"./chunk-WBY4JJ2K.js";import"./chunk-NL5IFN4T.js";import"./chunk-C63EVPDN.js";import"./chunk-LJ3SOZBF.js";import"./chunk-TUF6EPCQ.js";import"./chunk-V4M2R6FZ.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import"./chunk-FUHXL6BW.js";import"./chunk-GX6MKIFC.js";import*as n from"fs";import*as a from"path";var S=[".maestro","maestro"];function k(){console.log(`
3
3
  sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
4
4
 
5
5
  usage:
@@ -58,6 +58,8 @@ partial:
58
58
  openLink \u2014 dispatched into the app via the Linking emulation
59
59
  (react-navigation deep links work); no OS-level Safari fallback.
60
60
  launchApp.arguments \u2014 ignored; sootsim has no native process.
61
+ launchApp.resetRuntime \u2014 sootsim-only extension for recorded benchmarks:
62
+ keep tenant storage/auth, but soft-reload the guest app inside launchApp.
61
63
  takeScreenshot \u2014 maestro string form works unchanged; sootsim also accepts
62
64
  { path, withFrame } for framed export.
63
65
  env \u2014 sootsim seeds the JS env from the full shell environment, not just
@@ -68,7 +70,7 @@ not yet implemented (will throw "unsupported maestro verb"):
68
70
  travel, setLocation, setAirplaneMode, killApp, faker,
69
71
  addMedia, startRecording, stopRecording (use --record flag),
70
72
  repeat.while (only repeat.times is supported).
71
- `)}function b(o){return o.startsWith("-")}function $(o){let i=[];for(let e=0;e<o.length;e++){if(o[e]==="--env"||o[e]==="-e"){let s=o[e+1];if(!s||!s.includes("="))throw new Error(`--env expects KEY=VALUE (got ${JSON.stringify(s??"")})`);let p=s.indexOf("="),l=s.slice(0,p),f=s.slice(p+1);process.env[l]=f,e+=1;continue}i.push(o[e])}return i}function T(o){let i=[];for(let e=0;e<o.length;e++){let s=o[e];if(s==="--format"||s==="--output"||s==="--device"||s==="-d"){e+=1;continue}if(s==="--continuous"){console.warn(" warn: --continuous is not yet implemented in sootsim \u2014 running once");continue}i.push(s)}return i}function x(o){for(let i of S){let e=a.join(o,i);if(n.existsSync(e)&&n.statSync(e).isDirectory())return e}return null}function F(o){let i=n.statSync(o);if(i.isFile())return[o];if(!i.isDirectory())throw new Error(`not a file or directory: ${o}`);let e={},s=["config.yaml","config.yml"].map(t=>a.join(o,t)).find(t=>n.existsSync(t));if(s){let t=h.parse(n.readFileSync(s,"utf8"));t&&typeof t=="object"&&(e=t)}let p=Array.isArray(e.flows)&&e.flows.length>0?e.flows:["*"],l=t=>{let r=a.basename(t);return!(r.startsWith(".")||!r.endsWith(".yaml")&&!r.endsWith(".yml")||r==="config.yaml"||r==="config.yml")},f=new Set;for(let t of p)for(let r of n.globSync(t,{cwd:o})){if(!l(r))continue;let c=a.join(o,r);n.existsSync(c)&&n.statSync(c).isFile()&&f.add(c)}let m=[...f].sort(),u=Array.isArray(e.includeTags)?e.includeTags:[],d=Array.isArray(e.excludeTags)?e.excludeTags:[];return(u.length>0||d.length>0)&&(m=m.filter(t=>{let{frontmatter:r}=w(n.readFileSync(t,"utf8")),c=Array.isArray(r.tags)?r.tags:[];return!(u.length>0&&!c.some(g=>u.includes(g))||c.some(g=>d.includes(g)))})),m}async function E(o){let i=a.join(o,".maestro");n.mkdirSync(i,{recursive:!0});let e=a.join(i,"login.yaml");return n.existsSync(e)?(console.error(` error: ${e} already exists`),1):(n.writeFileSync(e,`# sootsim maestro starter flow \u2014 drop-in compatible with the maestro cli.
73
+ `)}function b(o){return o.startsWith("-")}function $(o){let i=[];for(let e=0;e<o.length;e++){if(o[e]==="--env"||o[e]==="-e"){let s=o[e+1];if(!s||!s.includes("="))throw new Error(`--env expects KEY=VALUE (got ${JSON.stringify(s??"")})`);let f=s.indexOf("="),l=s.slice(0,f),p=s.slice(f+1);process.env[l]=p,e+=1;continue}i.push(o[e])}return i}function T(o){let i=[];for(let e=0;e<o.length;e++){let s=o[e];if(s==="--format"||s==="--output"||s==="--device"||s==="-d"){e+=1;continue}if(s==="--continuous"){console.warn(" warn: --continuous is not yet implemented in sootsim \u2014 running once");continue}i.push(s)}return i}function x(o){for(let i of S){let e=a.join(o,i);if(n.existsSync(e)&&n.statSync(e).isDirectory())return e}return null}function F(o){let i=n.statSync(o);if(i.isFile())return[o];if(!i.isDirectory())throw new Error(`not a file or directory: ${o}`);let e={},s=["config.yaml","config.yml"].map(t=>a.join(o,t)).find(t=>n.existsSync(t));if(s){let t=h.parse(n.readFileSync(s,"utf8"));t&&typeof t=="object"&&(e=t)}let f=Array.isArray(e.flows)&&e.flows.length>0?e.flows:["*"],l=t=>{let r=a.basename(t);return!(r.startsWith(".")||!r.endsWith(".yaml")&&!r.endsWith(".yml")||r==="config.yaml"||r==="config.yml")},p=new Set;for(let t of f)for(let r of n.globSync(t,{cwd:o})){if(!l(r))continue;let c=a.join(o,r);n.existsSync(c)&&n.statSync(c).isFile()&&p.add(c)}let m=[...p].sort(),u=Array.isArray(e.includeTags)?e.includeTags:[],d=Array.isArray(e.excludeTags)?e.excludeTags:[];return(u.length>0||d.length>0)&&(m=m.filter(t=>{let{frontmatter:r}=y(n.readFileSync(t,"utf8")),c=Array.isArray(r.tags)?r.tags:[];return!(u.length>0&&!c.some(g=>u.includes(g))||c.some(g=>d.includes(g)))})),m}async function E(o){let i=a.join(o,".maestro");n.mkdirSync(i,{recursive:!0});let e=a.join(i,"login.yaml");return n.existsSync(e)?(console.error(` error: ${e} already exists`),1):(n.writeFileSync(e,`# sootsim maestro starter flow \u2014 drop-in compatible with the maestro cli.
72
74
  # run: sootsim maestro test .maestro/login.yaml
73
75
  appId: com.example.app
74
76
  ---
@@ -81,7 +83,7 @@ appId: com.example.app
81
83
  - inputText: "secret123"
82
84
  - tapOn: "Sign in"
83
85
  - assertVisible: "Welcome"
84
- `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function j(o,i={}){if(o.includes("--help")||o.includes("-h"))return k(),0;if(o.includes("--list-compat"))return A(),0;let e;try{e=$(o)}catch(t){return console.error(` error: ${t.message}`),1}e=T(e),e=v(e);let s=process.cwd(),p=e[0];if(p==="init")return E(s);let l=null,f;if(p==="test"){let t=e.slice(1).find(r=>!b(r));t?(l=a.resolve(s,t),f=e.slice(1).filter(r=>r!==t)):(l=x(s),f=e.slice(1))}else p&&!b(p)?(l=a.resolve(s,p),f=e.slice(1)):(l=x(s),f=e);if(!l)return console.error(`
86
+ `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function R(o,i={}){if(o.includes("--help")||o.includes("-h"))return k(),0;if(o.includes("--list-compat"))return A(),0;let e;try{e=$(o)}catch(t){return console.error(` error: ${t.message}`),1}e=T(e),e=v(e);let s=process.cwd(),f=e[0];if(f==="init")return E(s);let l=null,p;if(f==="test"){let t=e.slice(1).find(r=>!b(r));t?(l=a.resolve(s,t),p=e.slice(1).filter(r=>r!==t)):(l=x(s),p=e.slice(1))}else f&&!b(f)?(l=a.resolve(s,f),p=e.slice(1)):(l=x(s),p=e);if(!l)return console.error(`
85
87
  error: no maestro flows found.
86
88
  expected one of: ${S.map(t=>`./${t}/`).join(", ")}
87
89
  or pass a flow explicitly: sootsim maestro test path/to/flow.yaml
@@ -90,5 +92,5 @@ appId: com.example.app
90
92
  sootsim maestro \u2014 ${m.length} flow${m.length===1?"":"s"}
91
93
  root: ${a.relative(s,l)||"."}
92
94
  `);let u=0,d=[];for(let t of m){console.log(`
93
- \u25B6 ${a.relative(s,t)}`);let r=[t,...f];i.port&&!f.includes("--url")&&r.push("--url",String(i.port));let c=0;try{c=await y(r)}catch(g){console.error(` x ${g.message}`),c=1}d.push({file:t,exit:c}),c!==0&&u===0&&(u=c)}if(m.length>1){console.log(`
94
- maestro summary:`);for(let r of d){let c=r.exit===0?"pass":"fail";console.log(` ${c} ${a.relative(s,r.file)}`)}let t=d.filter(r=>r.exit===0).length;console.log(` ${t}/${d.length} passed`)}return u}export{F as collectFlowFiles,j as runMaestro};
95
+ \u25B6 ${a.relative(s,t)}`);let r=[t,...p];i.port&&!p.includes("--url")&&r.push("--url",String(i.port));let c=0;try{c=await w(r)}catch(g){console.error(` x ${g.message}`),c=1}d.push({file:t,exit:c}),c!==0&&u===0&&(u=c)}if(m.length>1){console.log(`
96
+ maestro summary:`);for(let r of d){let c=r.exit===0?"pass":"fail";console.log(` ${c} ${a.relative(s,r.file)}`)}let t=d.filter(r=>r.exit===0).length;console.log(` ${t}/${d.length} passed`)}return u}export{F as collectFlowFiles,R as runMaestro};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b}from"./chunk-K2THZIVC.js";import"./chunk-GX6MKIFC.js";export{a as loadOptionalDemoApps,b as optionalDemoAppsSync};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-IHH3JCV5.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.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-GX6MKIFC.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.184 | (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-WNUF6LJX.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";function f(){console.log(`
1
+ /*! sootsim v0.1.185 | (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-WBY4JJ2K.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as w,e as b,h as m,i as f}from"./chunk-7C6RC3BU.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";function h(){console.log(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as w,e as b,h as m,i as f}from"./chunk-7OAUPGLN.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";function h(){console.log(`
3
3
  sootsim react \u2014 inspect React component render cost in the tenant worker
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P}from"./chunk-MXXD5U6B.js";import"./chunk-NBF2SXAH.js";import{d as Z,f as ee}from"./chunk-6GC57KRY.js";import"./chunk-WMLFWLD7.js";import"./chunk-ID25RWPE.js";import{c as b,e as v,f as Q}from"./chunk-7C6RC3BU.js";import{d as Y}from"./chunk-IZMNFZXZ.js";import"./chunk-YQNX7JK6.js";import"./chunk-N5LA5G7V.js";import"./chunk-Q2S6VBXK.js";import{b as X}from"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";import{existsSync as we,mkdirSync as E,readdirSync as he,readFileSync as be,rmSync as J,writeFileSync as I}from"fs";import{homedir as ve,tmpdir as ye}from"os";import{dirname as W,extname as oe,join as N,resolve as Se}from"path";var z=24e4,Re=9e4,$e=3e4;async function D(e,r,o,i){let t=Math.max(2e4,i+$e);try{return await e.send({type:"evaluate",code:r},{timeoutMs:t})}catch(n){let s=n instanceof Error?n.message:String(n);/^command timed out after \d+s$/.test(s)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(t/1e3)}s; it is likely contended or wedged.
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P}from"./chunk-QQ4NSPAD.js";import"./chunk-ARNLQPMQ.js";import{d as Z,f as ee}from"./chunk-PKZNXDUJ.js";import"./chunk-TNHF6BON.js";import"./chunk-IJP257WP.js";import{c as b,e as v,f as Q}from"./chunk-7OAUPGLN.js";import{d as Y}from"./chunk-HQG4DRQ3.js";import"./chunk-C63EVPDN.js";import"./chunk-LJ3SOZBF.js";import"./chunk-PDLQWZN4.js";import{b as X}from"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";import{existsSync as we,mkdirSync as E,readdirSync as he,readFileSync as be,rmSync as J,writeFileSync as I}from"fs";import{homedir as ve,tmpdir as ye}from"os";import{dirname as W,extname as oe,join as N,resolve as Se}from"path";var z=24e4,Re=9e4,$e=3e4;async function D(e,r,o,i){let t=Math.max(2e4,i+$e);try{return await e.send({type:"evaluate",code:r},{timeoutMs:t})}catch(n){let s=n instanceof Error?n.message:String(n);/^command timed out after \d+s$/.test(s)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(t/1e3)}s; it is likely contended or wedged.
3
3
  the capture lock auto-releases, so simply retry the recording.
4
4
  if it persists, recover the sim with \`sootsim close --sim <id>\`.`),process.exit(1)),/render host not available|already streaming|already recording|lock already held/i.test(s)&&(console.error(` ${o} failed: ${s}
5
5
  a prior recording was abandoned and its capture is still
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-QTFCJYBF.js";import"./chunk-C3UEINOZ.js";import"./chunk-7OAUPGLN.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";export{a as runRuntime};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as E}from"./chunk-C3WRMMUM.js";import"./chunk-VGTPGXKM.js";import{a as R}from"./chunk-Q6EHTP4Q.js";import{r as y}from"./chunk-7DHLNDOA.js";import{c as x,d as v,e as S,f as b,h as _}from"./chunk-7C6RC3BU.js";import"./chunk-WSN7MF4E.js";import"./chunk-T4XAQ7VQ.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import{g as w}from"./chunk-OGLOOKK6.js";import"./chunk-IHH3JCV5.js";import{mkdirSync as $,writeFileSync as A}from"fs";import{dirname as M,resolve as F}from"path";async function Q(t,o){let e=q(t);(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as E}from"./chunk-2T73IGB2.js";import"./chunk-SL6565MR.js";import{a as R}from"./chunk-MADEJDFD.js";import{r as y}from"./chunk-FY6DJGOS.js";import{c as x,d as v,e as S,f as b,h as _}from"./chunk-7OAUPGLN.js";import"./chunk-NL5IFN4T.js";import"./chunk-TUF6EPCQ.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import{g as w}from"./chunk-FUHXL6BW.js";import"./chunk-GX6MKIFC.js";import{mkdirSync as $,writeFileSync as A}from"fs";import{dirname as M,resolve as F}from"path";async function Q(t,o){let e=q(t);(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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as o}from"./chunk-U636Z2JZ.js";import"./chunk-7C6RC3BU.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";async function n(e,s){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-CYBRFHPU.js";import"./chunk-7OAUPGLN.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as q}from"./chunk-WDMIABUY.js";import{b as L}from"./chunk-C3WRMMUM.js";import"./chunk-VGTPGXKM.js";import"./chunk-MXXD5U6B.js";import"./chunk-NBF2SXAH.js";import{d as U,e as K}from"./chunk-6GC57KRY.js";import{b as H}from"./chunk-T5YWTSGG.js";import"./chunk-WLDAMCQK.js";import"./chunk-FD4BKULK.js";import"./chunk-7DKGX746.js";import"./chunk-7DHLNDOA.js";import"./chunk-WMLFWLD7.js";import"./chunk-ID25RWPE.js";import"./chunk-YYS2ITHH.js";import"./chunk-7C6RC3BU.js";import"./chunk-AKQWG57K.js";import"./chunk-JFCJIRX6.js";import"./chunk-IZMNFZXZ.js";import"./chunk-WNUF6LJX.js";import"./chunk-WSN7MF4E.js";import"./chunk-YQNX7JK6.js";import"./chunk-N5LA5G7V.js";import"./chunk-T4XAQ7VQ.js";import"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import{a as y,b as A,c as v,d as E,e as O,f as C,g as _}from"./chunk-OGLOOKK6.js";import"./chunk-IHH3JCV5.js";import{mkdirSync as I,readFileSync as ye,writeFileSync as se}from"fs";import{tmpdir as We}from"os";import F from"path";import{mkdirSync as W,readFileSync as ae,writeFileSync as X}from"fs";import B from"path";function V(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 T(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}function ce(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 D(e,t){let o=ce(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),c=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${c}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function le(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 pe(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${D(t,.46)} 0%, ${D(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function R(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)";case"straight":default:return"none"}}function G(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function j(e){let t=D(e.color,e.opacity),o=D(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function Y(e,t){return!t.glow||e.color&&e.color!==y.color?e:{...e,color:t.glow}}function ue(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,c)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),m=a.pose||r.pose||"tilted-right",h=Y(r.shadow,c);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:${R(m)}`,`filter:${j(h)}`,"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,c)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),m=a.pose||r.pose,h=Y(r.shadow,c);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${G("translateX(-50%)",R(m))}`,`filter:${j(h)}`,"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=Math.round(t.width*.64*(s.scale??n.scale)),c=Math.round(t.height*(n.offsetY+(s.offsetY??0))),p=s.pose||n.pose,l=Y(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*.28)+c}px`,"left:50%",`width:${a}px`,"transform-origin:center top",`transform:${G("translateX(-50%)",R(p))}`,`filter:${j(l)}`,"z-index:2"].join(";")}}}function de({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=ue(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),c=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${T(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}">${T(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};">${T(o.eyebrow)}</div></div>`:"";return`<!doctype html>
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as q}from"./chunk-JRL7PFNZ.js";import{b as L}from"./chunk-2T73IGB2.js";import"./chunk-SL6565MR.js";import"./chunk-QQ4NSPAD.js";import"./chunk-ARNLQPMQ.js";import{d as U,e as K}from"./chunk-PKZNXDUJ.js";import{b as H}from"./chunk-XU5EMZ4B.js";import"./chunk-OAHGYDJR.js";import"./chunk-V5JEPE3P.js";import"./chunk-FHJTTB3W.js";import"./chunk-FY6DJGOS.js";import"./chunk-TNHF6BON.js";import"./chunk-IJP257WP.js";import"./chunk-K2THZIVC.js";import"./chunk-7OAUPGLN.js";import"./chunk-4NUQVW5P.js";import"./chunk-BMCBPMTC.js";import"./chunk-HQG4DRQ3.js";import"./chunk-WBY4JJ2K.js";import"./chunk-NL5IFN4T.js";import"./chunk-C63EVPDN.js";import"./chunk-LJ3SOZBF.js";import"./chunk-TUF6EPCQ.js";import"./chunk-V4M2R6FZ.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import{a as y,b as A,c as v,d as E,e as O,f as C,g as _}from"./chunk-FUHXL6BW.js";import"./chunk-GX6MKIFC.js";import{mkdirSync as I,readFileSync as ye,writeFileSync as se}from"fs";import{tmpdir as We}from"os";import F from"path";import{mkdirSync as W,readFileSync as ae,writeFileSync as X}from"fs";import B from"path";function V(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 T(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}function ce(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 D(e,t){let o=ce(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),c=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${c}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function le(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 pe(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${D(t,.46)} 0%, ${D(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function R(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)";case"straight":default:return"none"}}function G(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function j(e){let t=D(e.color,e.opacity),o=D(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function Y(e,t){return!t.glow||e.color&&e.color!==y.color?e:{...e,color:t.glow}}function ue(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,c)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),m=a.pose||r.pose||"tilted-right",h=Y(r.shadow,c);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:${R(m)}`,`filter:${j(h)}`,"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,c)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),m=a.pose||r.pose,h=Y(r.shadow,c);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${G("translateX(-50%)",R(m))}`,`filter:${j(h)}`,"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=Math.round(t.width*.64*(s.scale??n.scale)),c=Math.round(t.height*(n.offsetY+(s.offsetY??0))),p=s.pose||n.pose,l=Y(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*.28)+c}px`,"left:50%",`width:${a}px`,"transform-origin:center top",`transform:${G("translateX(-50%)",R(p))}`,`filter:${j(l)}`,"z-index:2"].join(";")}}}function de({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=ue(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),c=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${T(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}">${T(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};">${T(o.eyebrow)}</div></div>`:"";return`<!doctype html>
3
3
  <html>
4
4
  <head>
5
5
  <meta charset="utf-8" />
@@ -1,6 +1,6 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as I}from"./chunk-6GC57KRY.js";import"./chunk-N5LA5G7V.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";import{execSync as E}from"node:child_process";import{mkdirSync as L,mkdtempSync as W,rmSync as q,writeFileSync as z}from"node:fs";import{tmpdir as H}from"node:os";import{dirname as J,isAbsolute as K,join as A,resolve as V}from"node:path";import{chromium as Y}from"playwright-core";import{execSync as j}from"node:child_process";function N(o){let e=o;if(e&&typeof e.process=="function")try{let t=e.process();if(t&&typeof t.pid=="number"&&t.pid>0)return t.pid}catch{}if(e&&typeof e.browser=="function")try{let t=e.browser();if(t)return N(t)}catch{}return null}function x(o){let e=[];try{e=j(`pgrep -P ${o} || true`).toString().split(`
3
- `).filter(Boolean)}catch{}for(let t of e)x(Number(t));try{process.kill(o,"SIGKILL")}catch{}}var C=new Set,M=!1;function B(){if(M)return;M=!0;let o=()=>{for(let e of C)x(e)};process.on("SIGTERM",()=>{o(),process.exit(0)}),process.on("SIGINT",()=>{o(),process.exit(0)}),process.on("exit",o)}async function U(o){let e=await o(),t=N(e),n=new Set;t!=null&&(n.add(t),C.add(t),B());let i=e;return typeof i.on=="function"&&i.on("disconnected",()=>{for(let c of n)C.delete(c)}),{browser:e,reapNow:()=>{for(let c of n)x(c),C.delete(c);n.clear()}}}var Q=`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as N}from"./chunk-PKZNXDUJ.js";import"./chunk-LJ3SOZBF.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";import{execSync as D}from"node:child_process";import{mkdirSync as L,mkdtempSync as W,rmSync as q,writeFileSync as z}from"node:fs";import{tmpdir as H}from"node:os";import{dirname as J,isAbsolute as K,join as B,resolve as V}from"node:path";import{chromium as Y}from"playwright-core";import{execSync as O}from"node:child_process";function M(o){let e=o;if(e&&typeof e.process=="function")try{let t=e.process();if(t&&typeof t.pid=="number"&&t.pid>0)return t.pid}catch{}if(e&&typeof e.browser=="function")try{let t=e.browser();if(t)return M(t)}catch{}return null}function x(o){let e=[];try{e=O(`pgrep -P ${o} || true`).toString().split(`
3
+ `).filter(Boolean)}catch{}for(let t of e)x(Number(t));try{process.kill(o,"SIGKILL")}catch{}}var C=new Set,I=!1;function j(){if(I)return;I=!0;let o=()=>{for(let e of C)x(e)};process.on("SIGTERM",()=>{o(),process.exit(0)}),process.on("SIGINT",()=>{o(),process.exit(0)}),process.on("exit",o)}async function U(o){let e=await o(),t=M(e),n=new Set;t!=null&&(n.add(t),C.add(t),j());let i=e;return typeof i.on=="function"&&i.on("disconnected",()=>{for(let c of n)C.delete(c)}),{browser:e,reapNow:()=>{for(let c of n)x(c),C.delete(c);n.clear()}}}var Q=`
4
4
  sootsim screenshots capture \u2014 headlessly capture + upload App Store slides
5
5
 
6
6
  usage:
@@ -29,13 +29,13 @@ options:
29
29
  examples:
30
30
  sootsim screenshots capture --org acme --repo my-app --dry-run
31
31
  sootsim screenshots capture --org acme --repo my-app --branch main --force
32
- `;function X(o){let e=a=>{let c=o.indexOf(a);return c>=0?o[c+1]:void 0},t=a=>o.includes(a),n=e("--slides"),i=n?n.split(",").map(a=>Number(a.trim())).filter(a=>Number.isInteger(a)&&a>0):null;return{org:e("--org")??"",repo:e("--repo")??"",branch:e("--branch")??"main",platform:e("--platform")??"ios",slides:i&&i.length?i:null,dryRun:t("--dry-run"),force:t("--force"),out:e("--out")??null,shellOrigin:e("--shell-origin")??null,apiOrigin:e("--api-origin")??null,timeoutMs:Number(e("--timeout")??"45000")||45e3,json:t("--json")}}function Z(){let o=I();if(o&&o.kind==="session")return{token:o.token,origin:o.origin};process.stderr.write(`
32
+ `;function X(o){let e=a=>{let c=o.indexOf(a);return c>=0?o[c+1]:void 0},t=a=>o.includes(a),n=e("--slides"),i=n?n.split(",").map(a=>Number(a.trim())).filter(a=>Number.isInteger(a)&&a>0):null;return{org:e("--org")??"",repo:e("--repo")??"",branch:e("--branch")??"main",platform:e("--platform")??"ios",slides:i&&i.length?i:null,dryRun:t("--dry-run"),force:t("--force"),out:e("--out")??null,shellOrigin:e("--shell-origin")??null,apiOrigin:e("--api-origin")??null,timeoutMs:Number(e("--timeout")??"45000")||45e3,json:t("--json")}}function Z(){let o=N();if(o&&o.kind==="session")return{token:o.token,origin:o.origin};process.stderr.write(`
33
33
  sootsim screenshots capture needs a logged-in session.
34
34
  run \`sootsim login\` first (the captured slides upload to that account).
35
35
 
36
- `),process.exit(1)}function _(o){let e=o.replace(/^\[|\]$/g,"").toLowerCase();return e==="localhost"||e.endsWith(".localhost")||e==="::1"||/^127(?:\.\d{1,3}){3}$/.test(e)}function ee(o){let e=new URL(o);if(_(e.hostname)){let n=(Number(e.port)||3e3)-3e3;if(n>=0&&n<=1e3)return e.port=String(5173+n),e.origin}return e.hostname==="sootbean.com"||e.hostname.endsWith(".sootbean.com")?"https://sootsim.com":o}function oe(){try{return Number(E("sysctl -n vm.loadavg").toString().trim().split(/\s+/)[1])||0}catch{return 0}}async function te(o,e,t,n){let i=await fetch(`${o}/api/sootsim/screenshot-decks?org=${encodeURIComponent(t)}&repo=${encodeURIComponent(n)}`,{headers:{authorization:`Bearer ${e}`}});if(!i.ok)return[];let a=await i.json().catch(()=>null),c=[];for(let m of a?.decks??[])Array.isArray(m.config?.frames)&&c.push(...m.config.frames);return c}async function re(o,e,t,n){let i=await fetch(`${o}/api/sootsim/screenshot-capture?ref=${encodeURIComponent(n)}&org=${encodeURIComponent(t)}`,{headers:{authorization:`Bearer ${e}`}});return i.ok?`data:image/png;base64,${Buffer.from(await i.arrayBuffer()).toString("base64")}`:null}async function ne(o,e){let t=Date.now()+e;for(;Date.now()<t;){for(let n of o.frames())if(await n.evaluate(()=>!!globalThis.SootSim?.bridges?.screenshotControl).catch(()=>!1))return n;await o.waitForTimeout(250)}throw new Error("screenshot bridge never appeared \u2014 the build shell did not boot screenshot mode (check --branch/--platform has a ready build, and you are logged in)")}async function D(o){return o.evaluate(async()=>{let t=globalThis.SootSim?.bridges?.screenshotControl;if(!t)throw new Error("screenshotControl missing");return t.getState()})}async function se(o){await o.evaluate(async()=>{let e=globalThis.SootSim?.bridges?.settings,t=Date.now()+3e3;for(;Date.now()<t;){if(e?.get?.()?.screenshotMode)return;await new Promise(n=>setTimeout(n,50))}e&&!e.get().screenshotMode&&(e.set("screenshotMode",!0),e.get().showFrame||e.set("showFrame",!0))})}async function ie(o,e,t,n){await o.evaluate(async([i,a,c])=>{let m=globalThis.SootSim,h=m?.bridges?.screenshotControl;if(!h)throw new Error("screenshotControl missing");let w=b=>new Promise(d=>setTimeout(d,b));if(a){h.focusSlide(i);let b=Date.now()+3e4,d=m?.bridges?.threeMode;for(;Date.now()<b&&(d=m?.bridges?.threeMode,!(d?.setScreenImage&&d?.captureStage&&d?.getState?.()?.ready));)await w(150);await w(1e3);let l=a;d?.configure?.({colorway:l.colorway,background:l.background,...l.customGradient?{customGradient:l.customGradient}:{},room:!!l.room,bokeh:!!l.bokeh,environment:l.environmentActive?{pins:l.environmentPins??{},effects:l.environmentEffects??{}}:!1,pose:{phonePosition:l.phonePosition,phoneRotation:l.phoneRotation,cameraPosition:l.cameraPosition,target:l.target}}),await w(900),c&&d?.setScreenImage&&(d.setScreenImage(c),await w(1200))}await h.capture(i)},[e,t,n])}async function be(o){if(o.includes("--help")||o.includes("-h"))return console.log(Q),0;let e=X(o);if(!e.org||!e.repo)return process.stderr.write(` --org and --repo are required (see --help)
36
+ `),process.exit(1)}function _(o){let e=o.replace(/^\[|\]$/g,"").toLowerCase();return e==="localhost"||e.endsWith(".localhost")||e==="::1"||/^127(?:\.\d{1,3}){3}$/.test(e)}function ee(o){let e=new URL(o);if(_(e.hostname)){let n=(Number(e.port)||3e3)-3e3;if(n>=0&&n<=1e3)return e.port=String(5173+n),e.origin}return e.hostname==="sootbean.com"||e.hostname.endsWith(".sootbean.com")?"https://sootsim.com":o}function oe(){try{return Number(D("sysctl -n vm.loadavg").toString().trim().split(/\s+/)[1])||0}catch{return 0}}async function te(o,e,t,n){let i=await fetch(`${o}/api/sootsim/screenshot-decks?org=${encodeURIComponent(t)}&repo=${encodeURIComponent(n)}`,{headers:{authorization:`Bearer ${e}`}});if(!i.ok)return[];let a=await i.json().catch(()=>null),c=[];for(let m of a?.decks??[])Array.isArray(m.config?.frames)&&c.push(...m.config.frames);return c}async function re(o,e,t,n){let i=await fetch(`${o}/api/sootsim/screenshot-capture?ref=${encodeURIComponent(n)}&org=${encodeURIComponent(t)}`,{headers:{authorization:`Bearer ${e}`}});return i.ok?`data:image/png;base64,${Buffer.from(await i.arrayBuffer()).toString("base64")}`:null}async function ne(o,e){let t=Date.now()+e;for(;Date.now()<t;){for(let n of o.frames())if(await n.evaluate(()=>!!globalThis.SootSim?.bridges?.screenshotControl).catch(()=>!1))return n;await o.waitForTimeout(250)}throw new Error("screenshot bridge never appeared \u2014 the build shell did not boot screenshot mode (check --branch/--platform has a ready build, and you are logged in)")}async function A(o){return o.evaluate(async()=>{let t=globalThis.SootSim?.bridges?.screenshotControl;if(!t)throw new Error("screenshotControl missing");return t.getState()})}async function se(o){await o.evaluate(async()=>{let e=globalThis.SootSim?.bridges?.settings,t=Date.now()+3e3;for(;Date.now()<t;){if(e?.get?.()?.screenshotMode)return;await new Promise(n=>setTimeout(n,50))}e&&!e.get().screenshotMode&&(e.set("screenshotMode",!0),e.get().showFrame||e.set("showFrame",!0))})}async function ie(o,e,t,n){await o.evaluate(async([i,a,c])=>{let m=globalThis.SootSim,h=m?.bridges?.screenshotControl;if(!h)throw new Error("screenshotControl missing");let w=b=>new Promise(d=>setTimeout(d,b));if(a){h.focusSlide(i);let b=Date.now()+3e4,d=m?.bridges?.threeMode;for(;Date.now()<b&&(d=m?.bridges?.threeMode,!(d?.setScreenImage&&d?.captureStage&&d?.getState?.()?.ready));)await w(150);await w(1e3);let l=a;d?.configure?.({colorway:l.colorway,background:l.background,...l.customGradient?{customGradient:l.customGradient}:{},room:!!l.room,bokeh:!!l.bokeh,environment:l.environmentActive?{pins:l.environmentPins??{},effects:l.environmentEffects??{}}:!1,pose:{phonePosition:l.phonePosition,phoneRotation:l.phoneRotation,cameraPosition:l.cameraPosition,target:l.target}}),await w(900),c&&d?.setScreenImage&&(d.setScreenImage(c),await w(1200))}await h.capture(i)},[e,t,n])}async function be(o){if(o.includes("--help")||o.includes("-h"))return console.log(Q),0;let e=X(o);if(!e.org||!e.repo)return process.stderr.write(` --org and --repo are required (see --help)
37
37
  `),1;let{token:t,origin:n}=Z(),i=(e.apiOrigin??n).replace(/\/$/,""),a=(e.shellOrigin??ee(i)).replace(/\/$/,""),c=await te(i,t,e.org,e.repo);if(!e.dryRun&&!e.force&&c.length>0)return process.stderr.write(` refusing to overwrite the existing ${e.org}/${e.repo} deck (${c.length} slide(s)). re-run with --force to replace it, or --dry-run to preview.
38
- `),1;let m=oe(),h=Number(E("sysctl -n hw.ncpu").toString().trim())||8;if(m>h)return process.stderr.write(` load average ${m.toFixed(1)} exceeds ${h} cores \u2014 tear down other work first.
39
- `),1;let w=`${a}/build/${encodeURIComponent(e.org)}/${encodeURIComponent(e.repo)}/${encodeURIComponent(e.branch)}?platform=${encodeURIComponent(e.platform)}&ssMode=1`,b=W(A(H(),"sootsim-capture-")),{browser:d,reapNow:l}=await U(()=>Y.launchPersistentContext(b,{headless:!0,channel:"chrome",viewport:{width:393,height:852},deviceScaleFactor:3,args:["--enable-unsafe-webgpu","--enable-features=Vulkan,WebGPU","--hide-scrollbars"]}));await d.addInitScript(s=>{try{localStorage.setItem("sootsim.session.token",s)}catch{}},t);let y=[],g=d.pages()[0]??await d.newPage();e.dryRun?await g.route(/\/api\/sootsim\/screenshot-(decks|capture)/,s=>s.request().method()==="PUT"?s.abort():s.continue()):g.on("response",s=>{let p=s.url();s.request().method()==="PUT"&&(p.includes("/api/sootsim/screenshot-decks")?y.push({kind:"deck",status:s.status()}):p.includes("/api/sootsim/screenshot-capture")&&y.push({kind:"capture",status:s.status()}))});let R=[];g.on("pageerror",s=>R.push(s.message));let G=g.waitForResponse(s=>s.url().includes("/api/sootsim/screenshot-decks")&&s.request().method()==="GET",{timeout:e.timeoutMs}).catch(()=>null);try{await g.goto(w,{waitUntil:"domcontentloaded",timeout:e.timeoutMs});let s=await ne(g,e.timeoutMs);await se(s),await G,await g.waitForTimeout(800);let p=await D(s);if(p.slides.length===0)return process.stderr.write(` the deck has no slides to capture \u2014 add slides in the composer first.
40
- `),1;let P=e.slides?p.slides.filter(r=>e.slides.includes(r.index)):p.slides;console.log(` ${p.projectName} on ${p.deviceModel} \u2014 capturing ${P.length}/${p.slides.length} slide(s)${e.dryRun?" (dry-run, no upload)":""}`);for(let r of P)try{let u=c[r.index-1],f=u?.threeScene??null,$=f&&u?.screenRef?await re(i,t,e.org,u.screenRef):null;await ie(s,r.index,f,$),console.log(` \u2713 slide ${r.index} "${r.title.slice(0,40)}"`)}catch(u){console.log(` \u2717 slide ${r.index} "${r.title.slice(0,40)}" \u2014 ${u.message}`)}e.dryRun||await g.waitForTimeout(2500);let S=(await D(s)).slides.filter(r=>P.some(u=>u.id===r.id)),v=[];if(e.out){let r=K(e.out)?e.out:V(process.cwd(),e.out);for(let u of S){if(!u.captureRef)continue;let f=await s.evaluate(async k=>{let T=globalThis.SootSim?.bridges?.screenshotControl;if(!T)throw new Error("screenshotControl missing");return T.exportSlide(k)},u.index),$=f.dataUrl.match(/^data:[^;]+;base64,(.+)$/);if($){let k=A(r,f.name);L(J(k),{recursive:!0}),z(k,Buffer.from($[1],"base64")),v.push(k)}}}let F=S.filter(r=>r.captureRef&&r.cleanRef),O={org:e.org,repo:e.repo,branch:e.branch,dryRun:e.dryRun,slides:S.map(r=>({index:r.index,title:r.title,captureRef:!!r.captureRef,cleanRef:!!r.cleanRef,screenRef:!!r.screenRef,captureMode:r.captureMode})),editableCount:F.length,uploads:e.dryRun?"skipped (dry-run)":y,written:v,pageErrors:R.slice(0,5)};if(e.json)console.log(JSON.stringify(O,null,2));else{console.log(`
38
+ `),1;let m=oe(),h=Number(D("sysctl -n hw.ncpu").toString().trim())||8;if(m>h)return process.stderr.write(` load average ${m.toFixed(1)} exceeds ${h} cores \u2014 tear down other work first.
39
+ `),1;let w=`${a}/build/${encodeURIComponent(e.org)}/${encodeURIComponent(e.repo)}/${encodeURIComponent(e.branch)}?platform=${encodeURIComponent(e.platform)}&ssMode=1`,b=W(B(H(),"sootsim-capture-")),{browser:d,reapNow:l}=await U(()=>Y.launchPersistentContext(b,{headless:!0,channel:"chrome",viewport:{width:393,height:852},deviceScaleFactor:3,args:["--enable-unsafe-webgpu","--enable-features=Vulkan,WebGPU","--hide-scrollbars"]}));await d.addInitScript(s=>{try{localStorage.setItem("sootsim.session.token",s)}catch{}},t);let y=[],g=d.pages()[0]??await d.newPage();e.dryRun?await g.route(/\/api\/sootsim\/screenshot-(decks|capture)/,s=>s.request().method()==="PUT"?s.abort():s.continue()):g.on("response",s=>{let p=s.url();s.request().method()==="PUT"&&(p.includes("/api/sootsim/screenshot-decks")?y.push({kind:"deck",status:s.status()}):p.includes("/api/sootsim/screenshot-capture")&&y.push({kind:"capture",status:s.status()}))});let R=[];g.on("pageerror",s=>R.push(s.message));let E=g.waitForResponse(s=>s.url().includes("/api/sootsim/screenshot-decks")&&s.request().method()==="GET",{timeout:e.timeoutMs}).catch(()=>null);try{await g.goto(w,{waitUntil:"domcontentloaded",timeout:e.timeoutMs});let s=await ne(g,e.timeoutMs);await se(s),await E,await g.waitForTimeout(800);let p=await A(s);if(p.slides.length===0)return process.stderr.write(` the deck has no slides to capture \u2014 add slides in the composer first.
40
+ `),1;let P=e.slides?p.slides.filter(r=>e.slides.includes(r.index)):p.slides;console.log(` ${p.projectName} on ${p.deviceModel} \u2014 capturing ${P.length}/${p.slides.length} slide(s)${e.dryRun?" (dry-run, no upload)":""}`);for(let r of P)try{let u=c[r.index-1],f=u?.threeScene??null,$=f&&u?.screenRef?await re(i,t,e.org,u.screenRef):null;await ie(s,r.index,f,$),console.log(` \u2713 slide ${r.index} "${r.title.slice(0,40)}"`)}catch(u){console.log(` \u2717 slide ${r.index} "${r.title.slice(0,40)}" \u2014 ${u.message}`)}e.dryRun||await g.waitForTimeout(2500);let S=(await A(s)).slides.filter(r=>P.some(u=>u.id===r.id)),v=[];if(e.out){let r=K(e.out)?e.out:V(process.cwd(),e.out);for(let u of S){if(!u.captureRef)continue;let f=await s.evaluate(async k=>{let T=globalThis.SootSim?.bridges?.screenshotControl;if(!T)throw new Error("screenshotControl missing");return T.exportSlide(k)},u.index),$=f.dataUrl.match(/^data:[^;]+;base64,(.+)$/);if($){let k=B(r,f.name);L(J(k),{recursive:!0}),z(k,Buffer.from($[1],"base64")),v.push(k)}}}let F=S.filter(r=>r.captureRef&&r.cleanRef),G={org:e.org,repo:e.repo,branch:e.branch,dryRun:e.dryRun,slides:S.map(r=>({index:r.index,title:r.title,captureRef:!!r.captureRef,cleanRef:!!r.cleanRef,screenRef:!!r.screenRef,captureMode:r.captureMode})),editableCount:F.length,uploads:e.dryRun?"skipped (dry-run)":y,written:v,pageErrors:R.slice(0,5)};if(e.json)console.log(JSON.stringify(G,null,2));else{console.log(`
41
41
  ${F.length}/${S.length} slide(s) now have editable layers (captureRef + cleanRef)`);let r=S.filter(u=>u.captureRef&&!u.cleanRef);if(r.length&&console.log(` \u26A0 ${r.length} slide(s) baked a flat capture only (no cleanRef) \u2014 typically 3d slides whose scene didn't restore for a re-bake.`),!e.dryRun){let u=y.filter(f=>f.status>=200&&f.status<300).length;console.log(` uploads: ${u}/${y.length} PUT(s) succeeded`)}v.length&&console.log(` wrote ${v.length} local PNG(s) to ${e.out}`),R.length&&console.log(` \u26A0 ${R.length} page error(s) during capture`)}return 0}finally{await d.close().catch(()=>{}),l(),q(b,{recursive:!0,force:!0})}}export{be as runScreenshotsCapture};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as ae,c as H,d as ce,e as F,f as de,h as le,i as C,j as ue,k as pe,l as me,p as he,s as v,t as fe,u as ge,v as Se,w as ye}from"./chunk-QQ4JDVR6.js";import"./chunk-3S5BOWO5.js";import{a as oe}from"./chunk-NBF2SXAH.js";import"./chunk-6GC57KRY.js";import{g as se}from"./chunk-XSWATK6S.js";import{f as P}from"./chunk-FD4BKULK.js";import"./chunk-WMLFWLD7.js";import"./chunk-ID25RWPE.js";import"./chunk-YYS2ITHH.js";import"./chunk-7C6RC3BU.js";import{d as ne}from"./chunk-IZMNFZXZ.js";import{a as Q,b as ee}from"./chunk-YQNX7JK6.js";import"./chunk-N5LA5G7V.js";import{a as ie,b as re}from"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import{C as E,D as J,E as K,F as D,H as V,I as G,K as q,M as z,N as X,O as Y,P as U,Q as Z,y as M,z as j}from"./chunk-53KKDNCU.js";import{a as te}from"./chunk-6MPD3QXA.js";import"./chunk-IHH3JCV5.js";import{spawn as dt}from"child_process";import I from"fs";import{createServer as lt}from"http";import S from"path";import{WebSocket as h,WebSocketServer as ut}from"ws";import Ae from"node:fs";import _ from"node:path";import{spawn as Be}from"node:child_process";import Ne from"node:fs";import Me from"node:os";import De from"node:path";var ve=/^[A-Za-z0-9._:-]{1,160}$/;function W(o){if(!o?.startsWith("AGENTBUS_SESSION:"))return null;let e=o.slice(17).trim();return ve.test(e)?e:null}function be(o){return ve.test(o)}function Ue(o){return typeof o.text=="string"?o.text.trim():""}function He(o){let e=o?.trim();if(e)return e;let t=process.env.AGENTBUS_COMMAND?.trim();if(t)return t;let i=De.join(Me.homedir(),".local","bin","agentbus");return Ne.existsSync(i)?i:"agentbus"}async function we(o){let e=o.sessionId.trim();if(!be(e))throw new Error(`invalid agentbus session id: ${e||"<empty>"}`);let t=Ue(o.prompt);if(!t)throw new Error("prompt text is empty");let i=He(o.command),s=o.timeoutMs??15e3;await new Promise((n,a)=>{let r=Be(i,["send",e,t],{stdio:["ignore","ignore","pipe"],env:process.env}),c="",l=setTimeout(()=>{try{r.kill("SIGTERM")}catch{}a(new Error(`agentbus send timed out after ${Math.round(s/1e3)}s`))},s);r.stderr?.setEncoding("utf8"),r.stderr?.on("data",d=>{c.length<4e3&&(c+=String(d))}),r.on("error",d=>{clearTimeout(l),a(d)}),r.on("exit",(d,u)=>{if(clearTimeout(l),d===0){n();return}let p=c.trim();a(new Error(p||`agentbus send exited with ${u?`signal ${u}`:`code ${d??"unknown"}`}`))})})}var x=1;function Fe(){return[Number(process.env.VITE_PORT_WEB||process.env.PORT||3e3),Number(process.env.VITE_PORT_ZERO||7849),Number(process.env.VITE_PORT_POSTGRES||7432),Number(process.env.VITE_PORT_R2||9500)].filter(o=>Number.isFinite(o)&&o>0)}var R=class{subscriptions=new Map;sessionsBySocket=new Map;allSockets=new Set;pendingPromptEchoes=new Map;pendingTurns=new Map;opts;constructor(e={}){this.opts=e}registerSocket(e){this.allSockets.add(e)}unregisterSocket(e){let t=this.sessionsBySocket.get(e);if(t){for(let i of t)this.decrementSubscription(i);this.sessionsBySocket.delete(e)}this.allSockets.delete(e)}async handleMessage(e,t){let i=t?.type;if(typeof i!="string"||!i.startsWith("agent:"))return!1;let s=t.id;try{let n=await this.dispatch(e,i,t);this.respond(e,s,n)}catch(n){n instanceof v?this.respondError(e,s,n.message,n.code):this.respondError(e,s,n instanceof Error?n.message:String(n))}return!0}async seedOnBoot(){try{await me()}catch(e){process.stderr.write(`[sootsim-agent] seedFromDemoAppRegistry failed: ${e instanceof Error?e.message:String(e)}
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as ae,c as H,d as ce,e as F,f as de,h as le,i as C,j as ue,k as pe,l as me,p as he,s as v,t as fe,u as ge,v as Se,w as ye}from"./chunk-WEJKLJ4B.js";import"./chunk-LI4RLX6B.js";import{a as oe}from"./chunk-ARNLQPMQ.js";import"./chunk-PKZNXDUJ.js";import{g as se}from"./chunk-C3UEINOZ.js";import{f as P}from"./chunk-V5JEPE3P.js";import"./chunk-TNHF6BON.js";import"./chunk-IJP257WP.js";import"./chunk-K2THZIVC.js";import"./chunk-7OAUPGLN.js";import{d as ne}from"./chunk-HQG4DRQ3.js";import{a as Q,b as ee}from"./chunk-C63EVPDN.js";import"./chunk-LJ3SOZBF.js";import{a as ie,b as re}from"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import{C as E,D as J,E as K,F as D,H as V,I as G,K as q,M as z,N as X,O as Y,P as U,Q as Z,y as M,z as j}from"./chunk-BI56RR3G.js";import{a as te}from"./chunk-PIUKLO3W.js";import"./chunk-GX6MKIFC.js";import{spawn as dt}from"child_process";import I from"fs";import{createServer as lt}from"http";import S from"path";import{WebSocket as h,WebSocketServer as ut}from"ws";import Ae from"node:fs";import _ from"node:path";import{spawn as Be}from"node:child_process";import Ne from"node:fs";import Me from"node:os";import De from"node:path";var ve=/^[A-Za-z0-9._:-]{1,160}$/;function W(o){if(!o?.startsWith("AGENTBUS_SESSION:"))return null;let e=o.slice(17).trim();return ve.test(e)?e:null}function be(o){return ve.test(o)}function Ue(o){return typeof o.text=="string"?o.text.trim():""}function He(o){let e=o?.trim();if(e)return e;let t=process.env.AGENTBUS_COMMAND?.trim();if(t)return t;let i=De.join(Me.homedir(),".local","bin","agentbus");return Ne.existsSync(i)?i:"agentbus"}async function we(o){let e=o.sessionId.trim();if(!be(e))throw new Error(`invalid agentbus session id: ${e||"<empty>"}`);let t=Ue(o.prompt);if(!t)throw new Error("prompt text is empty");let i=He(o.command),s=o.timeoutMs??15e3;await new Promise((n,a)=>{let r=Be(i,["send",e,t],{stdio:["ignore","ignore","pipe"],env:process.env}),c="",l=setTimeout(()=>{try{r.kill("SIGTERM")}catch{}a(new Error(`agentbus send timed out after ${Math.round(s/1e3)}s`))},s);r.stderr?.setEncoding("utf8"),r.stderr?.on("data",d=>{c.length<4e3&&(c+=String(d))}),r.on("error",d=>{clearTimeout(l),a(d)}),r.on("exit",(d,u)=>{if(clearTimeout(l),d===0){n();return}let p=c.trim();a(new Error(p||`agentbus send exited with ${u?`signal ${u}`:`code ${d??"unknown"}`}`))})})}var x=1;function Fe(){return[Number(process.env.VITE_PORT_WEB||process.env.PORT||3e3),Number(process.env.VITE_PORT_ZERO||7849),Number(process.env.VITE_PORT_POSTGRES||7432),Number(process.env.VITE_PORT_R2||9500)].filter(o=>Number.isFinite(o)&&o>0)}var R=class{subscriptions=new Map;sessionsBySocket=new Map;allSockets=new Set;pendingPromptEchoes=new Map;pendingTurns=new Map;opts;constructor(e={}){this.opts=e}registerSocket(e){this.allSockets.add(e)}unregisterSocket(e){let t=this.sessionsBySocket.get(e);if(t){for(let i of t)this.decrementSubscription(i);this.sessionsBySocket.delete(e)}this.allSockets.delete(e)}async handleMessage(e,t){let i=t?.type;if(typeof i!="string"||!i.startsWith("agent:"))return!1;let s=t.id;try{let n=await this.dispatch(e,i,t);this.respond(e,s,n)}catch(n){n instanceof v?this.respondError(e,s,n.message,n.code):this.respondError(e,s,n instanceof Error?n.message:String(n))}return!0}async seedOnBoot(){try{await me()}catch(e){process.stderr.write(`[sootsim-agent] seedFromDemoAppRegistry failed: ${e instanceof Error?e.message:String(e)}
3
3
  `)}}close(){for(let e of this.subscriptions.values())try{e.unsubscribe()}catch{}this.subscriptions.clear(),this.sessionsBySocket.clear(),this.allSockets.clear()}async dispatch(e,t,i){switch(t){case"agent:list-projects":return F();case"agent:upsert-project":return H(i.input??{});case"agent:delete-project":return le(String(i.projectId)),{ok:!0};case"agent:auto-attach-for-url":return this.autoAttachForUrl(i.input??{});case"agent:list-sessions":return ue(i.projectId?String(i.projectId):void 0);case"agent:start-session":return this.doStartSession(i.input??{});case"agent:send-claimed-prompt":return this.sendClaimedPrompt(i);case"agent:send-prompt":{let n=String(i.sessionId),a=C(n);if(!a)throw new v("NO_SESSION",`no session: ${n}`);let r=this.normalizePromptEnvelope(i);return await ge(n,r),this.notePromptAccepted(n,r,a.status==="working")}case"agent:end-session":this.dropSessionFanout(String(i.sessionId)),await Se(String(i.sessionId));let s=C(String(i.sessionId));return s&&this.broadcastSessionStatus(s),{ok:!0};case"agent:get-transcript":return this.getTranscript(String(i.sessionId));case"agent:get-paths":return this.getPaths();case"agent:subscribe-events":return this.subscribeSocket(e,String(i.sessionId));case"agent:unsubscribe-events":return this.unsubscribeSocket(e,String(i.sessionId));default:throw new v("UNKNOWN_AGENT_MSG",`unknown agent message: ${t}`)}}async sendClaimedPrompt(e){let t=typeof e.simId=="string"?e.simId.trim():"";if(!t)throw new v("NO_SIM","agent:send-claimed-prompt requires simId");let i=this.opts.resolveCliLease?.(t)??null;if(!i||i.kind!=="cli"||i.expiresAt<=Date.now())throw new v("NO_CLAIM",`sim ${t} has no active CLI claim`);let s=W(i.cliIdentityKey);if(!s)throw new v("UNSUPPORTED_CLAIM",`sim ${t} is claimed by a CLI identity that is not promptable`);return await we({sessionId:s,prompt:this.normalizePromptEnvelope(e)}),{ok:!0,routed:"agentbus",sessionId:s}}async doStartSession(e){if(!ce(e.projectId))throw new v("NO_PROJECT",`no project: ${e.projectId}`);let i=await fe(e);return this.broadcastSessionStatus(i.session),i}async autoAttachForUrl(e){let t=e.bundleUrl??"",i=(()=>{try{return new URL(t).port||null}catch{return null}})();if(!i)return{project:null};let s=this.opts.getExcludePorts?.()??Fe(),a=(await P({excludePorts:s})).find(d=>String(d.port)===i);if(!a||!a.cwd)return{project:null};let r=F().find(d=>d.cwd===a.cwd)??null,c=Array.from(new Set([...r?.knownBundleUrls??[],a.bundleUrl,t]));return{project:H({cwd:a.cwd,name:a.projectName??_.basename(a.cwd),preferredProvider:e.provider??r?.preferredProvider,sourceRoots:r?.sourceRoots??[a.cwd],knownBundleUrls:c,framework:r?.framework??We(a.framework),bundleId:a.bundleId??r?.bundleId})}}getTranscript(e){let t=he(e);return Ae.existsSync(t)?Ae.readFileSync(t,"utf8"):{error:"transcript not found",code:"NO_TRANSCRIPT"}}getPaths(){let e=ae();return{userDataDir:e,storeFile:_.join(e,"attached-projects.json"),sessionsDir:_.join(e,"sessions"),transcriptsDir:_.join(e,"transcripts")}}subscribeSocket(e,t){let i=this.sessionsBySocket.get(e);if(i||(i=new Set,this.sessionsBySocket.set(e,i)),i.has(t))return{ok:!0,refCount:this.subscriptions.get(t)?.refCount??1};i.add(t);let s=this.subscriptions.get(t);if(s)return s.refCount++,{ok:!0,refCount:s.refCount};let n=ye(t,a=>{let r=this.coalescePromptEcho(t,a);if(r&&(this.applySessionEvent(t,r),this.fanOutEvent(t,r)),a.type==="turn-completed"){let c=C(t);if(c)try{de(c.projectId,{usd:a.costUsd,ts:a.ts})}catch(l){process.stderr.write(`[sootsim-agent] recordTurnTelemetry failed: ${l instanceof Error?l.message:String(l)}
4
4
  `)}}});return this.subscriptions.set(t,{unsubscribe:n,refCount:1}),{ok:!0,refCount:1}}unsubscribeSocket(e,t){let i=this.sessionsBySocket.get(e);return!i||!i.has(t)?{ok:!0,refCount:0}:(i.delete(t),this.decrementSubscription(t))}decrementSubscription(e){let t=this.subscriptions.get(e);if(!t)return{ok:!0,refCount:0};if(t.refCount--,t.refCount<=0){try{t.unsubscribe()}catch{}return this.subscriptions.delete(e),{ok:!0,refCount:0}}return{ok:!0,refCount:t.refCount}}dropSessionFanout(e){let t=this.subscriptions.get(e);if(t){try{t.unsubscribe()}catch{}this.subscriptions.delete(e)}for(let i of this.sessionsBySocket.values())i.delete(e);this.clearPromptTracking(e)}normalizePromptEnvelope(e){if(e?.prompt&&typeof e.prompt=="object"){let t=e.prompt;return{text:String(t.text??""),...typeof t.displayText=="string"?{displayText:t.displayText}:{},...typeof t.inspectSummary=="string"?{inspectSummary:t.inspectSummary}:{},...typeof t.inspectTrace=="string"?{inspectTrace:t.inspectTrace}:{}}}return{text:String(e?.text??""),...typeof e?.displayText=="string"?{displayText:e.displayText}:{},...typeof e?.inspectSummary=="string"?{inspectSummary:e.inspectSummary}:{},...typeof e?.inspectTrace=="string"?{inspectTrace:e.inspectTrace}:{}}}notePromptAccepted(e,t,i){let s=Date.now(),n=this.pendingPromptEchoes.get(e)??[];n.push({sentAt:s}),this.pendingPromptEchoes.set(e,n);let a=Math.max(this.pendingTurns.get(e)??0,i?1:0)+1;this.pendingTurns.set(e,a);let r=t.displayText??t.text;return this.patchSession(e,{lastPrompt:r,status:"working",needsAttention:!1}),this.fanOutEvent(e,{type:"prompt-received",text:r,...t.inspectSummary?{inspectSummary:t.inspectSummary}:{},...t.inspectTrace?{inspectTrace:t.inspectTrace}:{},ts:s}),{ok:!0,queued:a>1,pendingTurns:a,queueDepth:Math.max(0,a-1)}}applySessionEvent(e,t){switch(t.type){case"prompt-received":case"turn-started":this.patchSession(e,{status:"working",needsAttention:!1});return;case"turn-completed":{let i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"idle",needsAttention:!1,lastTurnFiles:t.filesTouched,currentlyEditing:void 0});return}case"approval-needed":this.patchSession(e,{status:"needs-attention",needsAttention:!0});return;case"error":{let i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"needs-attention",needsAttention:i<=0,currentlyEditing:void 0});return}case"exited":this.clearPromptTracking(e),this.patchSession(e,{status:"ended",needsAttention:!1,wrapperPid:void 0,currentlyEditing:void 0});return;case"ready":case"turn-reasoning":case"turn-message":case"turn-plan":case"tool-call":case"file-edited":case"file-diff-delta":return}}patchSession(e,t){pe(e,t);let i=C(e);i&&this.broadcastSessionStatus(i)}coalescePromptEcho(e,t){if(t.type!=="prompt-received")return t;let i=this.pendingPromptEchoes.get(e);if(!i||i.length===0)return t;for(;i.length>0&&Date.now()-i[0].sentAt>15e3;)i.shift();return i.length===0?(this.pendingPromptEchoes.delete(e),t):(i.shift(),i.length===0?this.pendingPromptEchoes.delete(e):this.pendingPromptEchoes.set(e,i),null)}consumeSettledTurn(e){let t=Math.max(0,(this.pendingTurns.get(e)??1)-1);return t>0?this.pendingTurns.set(e,t):this.pendingTurns.delete(e),t}clearPromptTracking(e){this.pendingPromptEchoes.delete(e),this.pendingTurns.delete(e)}fanOutEvent(e,t){let i=JSON.stringify({type:"agent:event",sessionId:e,event:t});for(let[s,n]of this.sessionsBySocket)if(n.has(e)&&s.readyState===x)try{s.send(i)}catch{}}broadcastSessionStatus(e){let t=JSON.stringify({type:"agent:session-status",session:e});for(let i of this.allSockets)if(i.readyState===x)try{i.send(t)}catch{}}respond(e,t,i){if(e.readyState===x)try{e.send(JSON.stringify({id:t,result:i}))}catch{}}respondError(e,t,i,s){if(e.readyState===x)try{e.send(JSON.stringify({id:t,error:i,...s?{code:s}:{}}))}catch{}}};function We(o){return o==="expo"?"expo":o==="one"||o==="vxrn"?"one":"unknown"}import Je from"http";import Ke from"https";var $="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36",$e=[{hostSuffix:"uniswap.org",headers:{origin:"https://app.uniswap.org",referer:"https://app.uniswap.org/"},suppressBrowserUserAgent:!0}];function je(o){let e=o.toLowerCase();for(let t of $e)if(e===t.hostSuffix||e.endsWith(`.${t.hostSuffix}`))return t}function ke(o){let e=je(o.hostname);return{"accept-encoding":"identity",...e?.suppressBrowserUserAgent?{}:{"user-agent":$},...e?.headers}}var Ve=new Set(["host","origin","referer","user-agent","accept-encoding","cookie","connection","keep-alive","transfer-encoding","upgrade","content-length","sec-fetch-site","sec-fetch-mode","sec-fetch-dest","sec-ch-ua","sec-ch-ua-mobile","sec-ch-ua-platform"]),Ge={"access-control-allow-origin":"*","access-control-allow-methods":"GET,POST,PUT,DELETE,PATCH,OPTIONS","access-control-allow-headers":"*","access-control-expose-headers":"*","access-control-max-age":"3600"},qe=new Set(["host","origin","referer","sec-fetch-site","sec-fetch-mode","sec-fetch-dest"]);function T(o){for(let[e,t]of Object.entries(Ge))o.setHeader(e,t)}function ze(o,e){let t=[],i=e;i?.code&&t.push(i.code),i?.message&&t.push(i.message),i?.cause?.code&&t.push(i.cause.code),i?.cause?.message&&t.push(i.cause.message);let n=[...new Set(t.filter(Boolean))].join(" | ")||String(e);return o.includes("stored-in-.env.local")?`${n} | upstream url still contains placeholder env values`:n}function Xe(o){let t=(Array.isArray(o)?o[0]:o)?.split(";",1)[0]?.trim().toLowerCase();return t?t.startsWith("text/")||t==="application/json"||t.endsWith("+json")||t==="application/x-www-form-urlencoded"||t==="application/xml"||t.endsWith("+xml")||t==="application/javascript"||t==="application/graphql":!1}function Ye(o,e){let t={};for(let[i,s]of Object.entries(o))s&&(Ve.has(i.toLowerCase())||(t[i]=Array.isArray(s)?s.join(", "):s));return Object.assign(t,e?ke(e):{"user-agent":$}),t}function Ze(o,e){let t={};for(let[i,s]of Object.entries(o))s&&(qe.has(i.toLowerCase())||(t[i]=s));return t.host=e.host,t.origin=e.origin,t.referer=`${e.origin}/`,t}function Ie(o){return o?.startsWith("/__fetch-proxy?")||o?.startsWith("/__proxy?")||!1}function Ce(o){return o?!!(o.startsWith("/__app-api?")||o.startsWith("/__app-api/")):!1}async function Te(o,e){if(o.method==="OPTIONS"){T(e),e.writeHead(204),e.end();return}let i=new URLSearchParams((o.url||"").split("?")[1]||"").get("url");if(!i){T(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("missing url param");return}let s;try{s=new URL(i)}catch{T(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("invalid url param");return}let n=Ye(o.headers,s),a;if(o.method!=="GET"&&o.method!=="HEAD"){let d=[];for await(let u of o)d.push(Buffer.isBuffer(u)?u:Buffer.from(u));if(d.length>0){let u=Buffer.concat(d);a=Xe(o.headers["content-type"])?u.toString("utf8"):u}}let r;try{r=await fetch(s.href,{method:o.method,headers:n,body:a,redirect:"follow"})}catch(d){T(e),e.writeHead(502,{"Content-Type":"text/plain"}),e.end(`fetch proxy error: ${ze(s.href,d)}`);return}r.headers.forEach((d,u)=>{let p=u.toLowerCase();p==="content-encoding"||p==="transfer-encoding"||p==="content-length"||p==="set-cookie"||p.startsWith("access-control-")||e.setHeader(u,d)}),T(e);let c=r.headers.getSetCookie?.()??[];c.length>0&&e.setHeader("x-sootsim-set-cookie",c.join(", ")),e.statusCode=r.status;let l=Buffer.from(await r.arrayBuffer());e.end(l)}function Ee(o,e){let t=o.url||"",i="",s="";if(t.startsWith("/__app-api?")){let l=new URL(t,"http://sootsim.local");i=l.searchParams.get("path")||"",s=l.searchParams.get("origin")?.trim()||""}else if(t.startsWith("/__app-api/"))i=t.slice(10);else return!1;if(!s)return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: missing origin query param"),!0;if(o.method==="OPTIONS")return e.writeHead(204,{"Access-Control-Allow-Origin":o.headers.origin||"*","Access-Control-Allow-Methods":"GET,POST,PUT,PATCH,DELETE,OPTIONS","Access-Control-Allow-Headers":o.headers["access-control-request-headers"]||"*","Access-Control-Allow-Credentials":"true","Access-Control-Max-Age":"86400"}),e.end(),!0;let n;try{n=new URL(i,s)}catch{return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: invalid origin or path"),!0}let a=n.protocol==="https:"?Ke:Je,r=Ze(o.headers,n),c=a.request({hostname:n.hostname,port:n.port||(n.protocol==="https:"?443:80),path:n.pathname+n.search,method:o.method,headers:r},l=>{let d=Object.keys(l.headers).filter(u=>{let p=u.toLowerCase();return!p.startsWith("access-control-")&&p!=="set-cookie"}).join(", ");e.writeHead(l.statusCode??502,{...l.headers,"access-control-allow-origin":o.headers.origin||"*","access-control-allow-credentials":"true","access-control-expose-headers":d}),l.pipe(e)});return c.on("error",l=>{e.statusCode=502,e.end(`app proxy error: ${l.message}`)}),o.pipe(c),!0}import{WebSocket as k,WebSocketServer as Qe}from"ws";var et="/__websocket-proxy",tt=new Set(["host","connection","upgrade","transfer-encoding","content-length","sec-websocket-accept","sec-websocket-extensions","sec-websocket-key","sec-websocket-protocol","sec-websocket-version"]);function A(o,e,t){try{o.write(`HTTP/1.1 ${e} ${t}\r
5
5
  Connection: close\r
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g,b as k}from"./chunk-IG7F7DTQ.js";import{b as S,c as x}from"./chunk-3KK3YZQ3.js";import{a as w}from"./chunk-YQNX7JK6.js";import"./chunk-N5LA5G7V.js";import"./chunk-NWNFGZSI.js";import"./chunk-S5XWFD5C.js";import"./chunk-T4XAQ7VQ.js";import"./chunk-VVACMCCE.js";import"./chunk-WAZCQ5UO.js";import"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import{D as v,I as f,K as m,l as b}from"./chunk-53KKDNCU.js";import"./chunk-6MPD3QXA.js";import"./chunk-QZW44BMW.js";import"./chunk-OGLOOKK6.js";import"./chunk-IHH3JCV5.js";import{existsSync as r,mkdirSync as j,readFileSync as d,readdirSync as I,writeFileSync as D}from"fs";import{basename as p,dirname as y,join as i,relative as c,resolve as h}from"path";var T=["bun","pnpm","npm"];async function pe(n){(n.includes("--help")||n.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g,b as k}from"./chunk-4OUQAR34.js";import{b as S,c as x}from"./chunk-DZLBZGHN.js";import{a as w}from"./chunk-C63EVPDN.js";import"./chunk-LJ3SOZBF.js";import"./chunk-X4KS33ZC.js";import"./chunk-EXFB33AZ.js";import"./chunk-TUF6EPCQ.js";import"./chunk-KOKIECMB.js";import"./chunk-R4KLD4P4.js";import"./chunk-V4M2R6FZ.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import{D as v,I as f,K as m,l as b}from"./chunk-BI56RR3G.js";import"./chunk-PIUKLO3W.js";import"./chunk-M3P67TBN.js";import"./chunk-FUHXL6BW.js";import"./chunk-GX6MKIFC.js";import{existsSync as r,mkdirSync as j,readFileSync as d,readdirSync as I,writeFileSync as D}from"fs";import{basename as p,dirname as y,join as i,relative as c,resolve as h}from"path";var T=["bun","pnpm","npm"];async function pe(n){(n.includes("--help")||n.includes("-h"))&&(console.log(`
3
3
  sootsim setup \u2014 set up this machine for SootSim
4
4
 
5
5
  usage:
@@ -94,4 +94,4 @@ module.exports = {
94
94
  4. inspect and drive it:
95
95
  sootsim describe
96
96
  sootsim do tap-text "Sign in"
97
- `)}function N(n,e){switch(n){case"bun":return`bunx ${e}`;case"pnpm":return`pnpm exec ${e}`;case"npm":return`npx ${e}`}}function ne(n,e){switch(n){case"bun":return`bun run ${e}`;case"pnpm":return`pnpm run ${e}`;case"npm":return`npm run ${e}`}}function oe(n){switch(n){case"bun":return"bun add -g sootsim";case"pnpm":return"pnpm add -g sootsim";case"npm":return"npm i -g sootsim"}}async function te(n,e){if(!e||n.dryRun)return;if(console.log(" last step:"),!process.stdin.isTTY){console.log(" run `sootsim open` after your Metro/Expo/One server is up");return}if(!await g("I'll run `sootsim open` for you now?",!0)){console.log(" later: sootsim open");return}let{runOpenCommand:o}=await import("./control-LUH3EQQG.js");await o([],{port:7668})}async function R(n,e,o){return o.yes?!0:process.stdin.isTTY?g(n,e):(console.log(` ${n} ${e?"[Y/n]":"[y/N]"} n (non-interactive; pass --yes to accept)`),!1)}export{J as detectConfigScaffoldExt,M as detectNodeVersionPins,W as detectPreferredPackageManager,E as readMachineSetupStatus,pe as runSetup,de as shouldRunSetupForBareCommand};
97
+ `)}function N(n,e){switch(n){case"bun":return`bunx ${e}`;case"pnpm":return`pnpm exec ${e}`;case"npm":return`npx ${e}`}}function ne(n,e){switch(n){case"bun":return`bun run ${e}`;case"pnpm":return`pnpm run ${e}`;case"npm":return`npm run ${e}`}}function oe(n){switch(n){case"bun":return"bun add -g sootsim";case"pnpm":return"pnpm add -g sootsim";case"npm":return"npm i -g sootsim"}}async function te(n,e){if(!e||n.dryRun)return;if(console.log(" last step:"),!process.stdin.isTTY){console.log(" run `sootsim open` after your Metro/Expo/One server is up");return}if(!await g("I'll run `sootsim open` for you now?",!0)){console.log(" later: sootsim open");return}let{runOpenCommand:o}=await import("./control-CZFSYSYG.js");await o([],{port:7668})}async function R(n,e,o){return o.yes?!0:process.stdin.isTTY?g(n,e):(console.log(` ${n} ${e?"[Y/n]":"[y/N]"} n (non-interactive; pass --yes to accept)`),!1)}export{J as detectConfigScaffoldExt,M as detectNodeVersionPins,W as detectPreferredPackageManager,E as readMachineSetupStatus,pe as runSetup,de as shouldRunSetupForBareCommand};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-IHH3JCV5.js";import*as r from"fs";import*as x from"os";import*as a from"path";import{fileURLToPath as p}from"url";function L(){try{let t=p(import.meta.resolve("sootsim/package.json"));return a.join(a.dirname(t),"skills")}catch{let t=a.dirname(p(import.meta.url));return a.resolve(t,"../../skills")}}var d=L(),w=new Set(["all","codex","claude"]);function h(){console.log(`sootsim skill
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-GX6MKIFC.js";import*as r from"fs";import*as x from"os";import*as a from"path";import{fileURLToPath as p}from"url";function L(){try{let t=p(import.meta.resolve("sootsim/package.json"));return a.join(a.dirname(t),"skills")}catch{let t=a.dirname(p(import.meta.url));return a.resolve(t,"../../skills")}}var d=L(),w=new Set(["all","codex","claude"]);function h(){console.log(`sootsim skill
3
3
 
4
4
  install and inspect bundled SootSim agent skills.
5
5
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as S,e as y,g as v,h as b,i as u}from"./chunk-7C6RC3BU.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";import{mkdirSync as $,writeFileSync as x}from"node:fs";import{dirname as k,isAbsolute as B,join as C,resolve as E}from"node:path";var z=`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as S,e as y,g as v,h as b,i as u}from"./chunk-7OAUPGLN.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";import{mkdirSync as $,writeFileSync as x}from"node:fs";import{dirname as k,isAbsolute as B,join as C,resolve as E}from"node:path";var z=`
3
3
  sootsim slides \u2014 compose App Store screenshots in the live sim
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-NL5IFN4T.js";import"./chunk-FUHXL6BW.js";import"./chunk-GX6MKIFC.js";export{a as settingsStore};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b}from"./chunk-C63EVPDN.js";import"./chunk-LJ3SOZBF.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";export{b as flushCliTelemetry,a as trackCliEvent};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as n,B as s,x as o}from"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";function l(){let t=n();console.log(` telemetry is ${t?"ON":"OFF"}`),console.log(` config: ${o()}`);let e=process.env.DO_NOT_TRACK;(e==="1"||e==="true")&&console.log(` note: DO_NOT_TRACK=${e} is set \u2014 telemetry is off for this run`)}async function i(t){let e=t.find(r=>!r.startsWith("-"))?.toLowerCase();switch(e){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${o()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${o()}`);return;default:console.error(` unknown telemetry action: ${e}`),console.error(" usage: sootsim telemetry [on|off|status]"),process.exit(1)}}export{i as runTelemetry};
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A as n,B as s,x as o}from"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";function l(){let t=n();console.log(` telemetry is ${t?"ON":"OFF"}`),console.log(` config: ${o()}`);let e=process.env.DO_NOT_TRACK;(e==="1"||e==="true")&&console.log(` note: DO_NOT_TRACK=${e} is set \u2014 telemetry is off for this run`)}async function i(t){let e=t.find(r=>!r.startsWith("-"))?.toLowerCase();switch(e){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${o()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${o()}`);return;default:console.error(` unknown telemetry action: ${e}`),console.error(" usage: sootsim telemetry [on|off|status]"),process.exit(1)}}export{i as runTelemetry};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-IHH3JCV5.js";import{spawn as m}from"child_process";import{existsSync as h,readdirSync as w}from"fs";import{resolve as u,dirname as x}from"path";import{fileURLToPath as y}from"url";var d=x(y(import.meta.resolve("sootsim-engine/package.json")));async function v(t,r){let l=t.includes("--flows"),f=t.includes("--detox"),c=t.includes("--parallel"),i=t.includes("--watch"),a=t.find((e,o)=>t[o-1]==="--reporter")||"console";if((t.includes("--help")||t.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-GX6MKIFC.js";import{spawn as m}from"child_process";import{existsSync as h,readdirSync as w}from"fs";import{resolve as u,dirname as x}from"path";import{fileURLToPath as y}from"url";var d=x(y(import.meta.resolve("sootsim-engine/package.json")));async function v(t,r){let l=t.includes("--flows"),f=t.includes("--detox"),c=t.includes("--parallel"),i=t.includes("--watch"),a=t.find((e,o)=>t[o-1]==="--reporter")||"console";if((t.includes("--help")||t.includes("-h"))&&(console.log(`
3
3
  sootsim test \u2014 run tests against sootsim
4
4
 
5
5
  usage:
@@ -26,6 +26,6 @@ examples:
26
26
  notes:
27
27
  playwright is best for smoke and package-local debugging
28
28
  --detox is the preferred parity lane for behavior that should match real RN
29
- `),process.exit(0)),l)await b(t,r,c,a);else if(f){let{runDetox:e}=await import("./detox-PHLGST7G.js");await e(t.filter(o=>o!=="--detox"),r)}else await g(t,r)}async function g(t,r){let l=["playwright","test"],f=t.find((e,o)=>t[o-1]==="-t")||t.find((e,o)=>t[o-1]==="--testNamePattern")||t.find((e,o)=>t[o-1]==="--grep");f&&l.push("-g",f),t.includes("--watch")&&l.push("--ui");let c=new Set(["--flows","--detox","--parallel","--watch","--reporter","-t","--testNamePattern","--grep"]);for(let e=0;e<t.length;e++){if(c.has(t[e])){(t[e]==="-t"||t[e]==="--testNamePattern"||t[e]==="--grep"||t[e]==="--reporter")&&e++;continue}l.push(t[e])}console.log(` running: npx ${l.join(" ")}`);let i=m("npx",l,{cwd:d,stdio:"inherit",env:{...process.env}}),a=await new Promise(e=>{i.on("exit",o=>e(o||0))});process.exit(a)}async function b(t,r,l,f){let c=["flows","test/flows","e2e/flows",".maestro","maestro"],i=[];for(let o of c){let s=u(d,o);if(h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}for(let o of c){let s=u(process.cwd(),o);if(!s.startsWith(d)&&h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}i.length===0&&(console.log(" no flow files found in flows/, test/flows/, or e2e/flows/"),process.exit(0)),console.log(` found ${i.length} flow(s)`);let a=0,e=0;for(let o of i)try{let{runFlowPlayback:s}=await import("./flow-KDVDRUEN.js"),p=r.port?`http://localhost:${r.port}`:"http://localhost:5173";if(await s([o,"--url",p,"--new"])!==0){e++;continue}a++}catch{e++}console.log(`
29
+ `),process.exit(0)),l)await b(t,r,c,a);else if(f){let{runDetox:e}=await import("./detox-ANJO6T27.js");await e(t.filter(o=>o!=="--detox"),r)}else await g(t,r)}async function g(t,r){let l=["playwright","test"],f=t.find((e,o)=>t[o-1]==="-t")||t.find((e,o)=>t[o-1]==="--testNamePattern")||t.find((e,o)=>t[o-1]==="--grep");f&&l.push("-g",f),t.includes("--watch")&&l.push("--ui");let c=new Set(["--flows","--detox","--parallel","--watch","--reporter","-t","--testNamePattern","--grep"]);for(let e=0;e<t.length;e++){if(c.has(t[e])){(t[e]==="-t"||t[e]==="--testNamePattern"||t[e]==="--grep"||t[e]==="--reporter")&&e++;continue}l.push(t[e])}console.log(` running: npx ${l.join(" ")}`);let i=m("npx",l,{cwd:d,stdio:"inherit",env:{...process.env}}),a=await new Promise(e=>{i.on("exit",o=>e(o||0))});process.exit(a)}async function b(t,r,l,f){let c=["flows","test/flows","e2e/flows",".maestro","maestro"],i=[];for(let o of c){let s=u(d,o);if(h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}for(let o of c){let s=u(process.cwd(),o);if(!s.startsWith(d)&&h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}i.length===0&&(console.log(" no flow files found in flows/, test/flows/, or e2e/flows/"),process.exit(0)),console.log(` found ${i.length} flow(s)`);let a=0,e=0;for(let o of i)try{let{runFlowPlayback:s}=await import("./flow-JL3SC6HC.js"),p=r.port?`http://localhost:${r.port}`:"http://localhost:5173";if(await s([o,"--url",p,"--new"])!==0){e++;continue}a++}catch{e++}console.log(`
30
30
  results: ${a} passed, ${e} failed (${i.length} total)
31
31
  `),process.exit(e>0?1:0)}export{v as runTest};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as $}from"./chunk-U636Z2JZ.js";import{c as p,e as h,i as R}from"./chunk-7C6RC3BU.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";var b=12e3;async function j(e,o){if((e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as $}from"./chunk-CYBRFHPU.js";import{c as p,e as h,i as R}from"./chunk-7OAUPGLN.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";var b=12e3;async function j(e,o){if((e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim three-mode \u2014 toggle the 3d device stage
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as m,e as d,h as s}from"./chunk-7C6RC3BU.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";import{writeFileSync as g}from"fs";function u(){console.log(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as m,e as d,h as s}from"./chunk-7OAUPGLN.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";import{writeFileSync as g}from"fs";function u(){console.log(`
3
3
  sootsim timeline \u2014 control the semantic event timeline
4
4
 
5
5
  usage:
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as i}from"./chunk-FAB5CDE7.js";import"./chunk-XSWATK6S.js";import"./chunk-7C6RC3BU.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import{G as e}from"./chunk-53KKDNCU.js";import{a as s}from"./chunk-6MPD3QXA.js";import"./chunk-IHH3JCV5.js";var r="https://registry.npmjs.org/sootsim/latest";async function g(n){let o=n.indexOf("--channel"),t=o>=0&&n[o+1]?n[o+1]:void 0;console.log(`sootsim upgrade
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as i}from"./chunk-QTFCJYBF.js";import"./chunk-C3UEINOZ.js";import"./chunk-7OAUPGLN.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import{G as e}from"./chunk-BI56RR3G.js";import{a as s}from"./chunk-PIUKLO3W.js";import"./chunk-GX6MKIFC.js";var r="https://registry.npmjs.org/sootsim/latest";async function g(n){let o=n.indexOf("--channel"),t=o>=0&&n[o+1]?n[o+1]:void 0;console.log(`sootsim upgrade
3
3
  `),await l(),console.log(`
4
4
  runtime:`),await i(["install",...t?["--channel",t]:[]],{})}async function l(){let n=s(),o=await c();if(!o){console.log(` cli: v${n} \u2014 couldn't reach the npm registry, skipped`);return}if(e(o,n)<=0){console.log(` cli: v${n} (latest)`);return}console.log(` cli: v${n} \u2192 v${o}`),console.log(" cli: use the latest CLI with:"),console.log(" sootsim@latest")}async function c(){try{let n=await fetch(r,{headers:{accept:"application/json"},signal:AbortSignal.timeout(8e3)});if(!n.ok)return null;let o=await n.json();return typeof o.version=="string"&&o.version?o.version:null}catch{return null}}export{g as runUpgrade};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-ARNLQPMQ.js";import"./chunk-PKZNXDUJ.js";import"./chunk-TNHF6BON.js";import"./chunk-IJP257WP.js";import"./chunk-7OAUPGLN.js";import"./chunk-HQG4DRQ3.js";import"./chunk-C63EVPDN.js";import"./chunk-LJ3SOZBF.js";import"./chunk-PDLQWZN4.js";import"./chunk-E5DE33BU.js";import"./chunk-BI56RR3G.js";import"./chunk-GX6MKIFC.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as s,d as l,h as r}from"./chunk-XSWATK6S.js";import{a as i}from"./chunk-S5XWFD5C.js";import"./chunk-53KKDNCU.js";import{a as t}from"./chunk-6MPD3QXA.js";import"./chunk-IHH3JCV5.js";async function d(u){let{IS_BETA:a,BETA_LABEL:m}=await import("./beta-JS4JTDFC.js"),c=a?` \xB7 ${m}`:"";console.log(`sootsim v${t()}${c}`);let o=i(),e=l();o.isDevBridge?(console.log(o.primary),o.installedRuntime&&console.log(`${o.installedRuntime} \xB7 ${e}`)):o.primary==="runtime not installed"?console.log("runtime not installed \u2014 run `sootsim runtime install`"):console.log(`${o.primary} \xB7 ${e}`);let n=await r({channel:e});n.outdated&&n.latest&&console.log(`
1
+ /*! sootsim v0.1.185 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as s,d as l,h as r}from"./chunk-C3UEINOZ.js";import{a as i}from"./chunk-EXFB33AZ.js";import"./chunk-BI56RR3G.js";import{a as t}from"./chunk-PIUKLO3W.js";import"./chunk-GX6MKIFC.js";async function d(u){let{IS_BETA:a,BETA_LABEL:m}=await import("./beta-X6YPQVZH.js"),c=a?` \xB7 ${m}`:"";console.log(`sootsim v${t()}${c}`);let o=i(),e=l();o.isDevBridge?(console.log(o.primary),o.installedRuntime&&console.log(`${o.installedRuntime} \xB7 ${e}`)):o.primary==="runtime not installed"?console.log("runtime not installed \u2014 run `sootsim runtime install`"):console.log(`${o.primary} \xB7 ${e}`);let n=await r({channel:e});n.outdated&&n.latest&&console.log(`
3
3
  \u2191 runtime v${n.latest} available \u2014 run \`sootsim upgrade\``),console.log(`
4
4
  what's new: ${s}`)}export{d as runVersion};