sootsim 0.1.51 → 0.1.52

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 (137) hide show
  1. package/dist-cli/bin.js +7 -7
  2. package/dist-cli/chunks/{agent-RLBVAUCW.js → agent-RUWGJCSS.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-TWLPNETE.js → agent-wrapper-FBCGP5N7.js} +2 -2
  4. package/dist-cli/chunks/{assert-JLQSBZPM.js → assert-IOU2NWE2.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-OYBDYAZM.js +2 -0
  6. package/dist-cli/chunks/beta-D4OEPOSE.js +2 -0
  7. package/dist-cli/chunks/{chunk-JZ65NOXB.js → chunk-2QNHBNWB.js} +2 -2
  8. package/dist-cli/chunks/{chunk-P45EZ2VW.js → chunk-3DDSYQHM.js} +2 -2
  9. package/dist-cli/chunks/{chunk-SLAAAEUZ.js → chunk-3MIWVHCX.js} +1 -1
  10. package/dist-cli/chunks/{chunk-PTW5KT4I.js → chunk-4TSGUAV3.js} +2 -2
  11. package/dist-cli/chunks/{chunk-3BUWCNVX.js → chunk-6QDFLMJL.js} +1 -1
  12. package/dist-cli/chunks/{chunk-VXLRXQER.js → chunk-7Y3FYPJH.js} +2 -2
  13. package/dist-cli/chunks/{chunk-2ZCJFJJN.js → chunk-A3YSGT76.js} +2 -2
  14. package/dist-cli/chunks/{chunk-ZT7672XM.js → chunk-ABEYZDD7.js} +3 -3
  15. package/dist-cli/chunks/{chunk-6NR6NFDC.js → chunk-BF7F45CZ.js} +2 -2
  16. package/dist-cli/chunks/{chunk-5PKYORP6.js → chunk-CTEXZ7BE.js} +1 -1
  17. package/dist-cli/chunks/{chunk-P2IC3VRD.js → chunk-DNKB2V2W.js} +2 -2
  18. package/dist-cli/chunks/chunk-DSJ7PGU3.js +2 -0
  19. package/dist-cli/chunks/{chunk-4QM4J2UK.js → chunk-DVCE2KQL.js} +1 -1
  20. package/dist-cli/chunks/{chunk-L4OPPOPY.js → chunk-EJYVXNQL.js} +2 -2
  21. package/dist-cli/chunks/{chunk-VDUWPVZT.js → chunk-EQPRFEHH.js} +2 -2
  22. package/dist-cli/chunks/{chunk-XWHWPFBE.js → chunk-EXQJSXDF.js} +1 -1
  23. package/dist-cli/chunks/{chunk-DBHV5S2L.js → chunk-EYRQG47K.js} +1 -1
  24. package/dist-cli/chunks/{chunk-SPMHQKNI.js → chunk-FPIJBBYW.js} +78 -78
  25. package/dist-cli/chunks/{chunk-RSEV5NWY.js → chunk-FVBSPGBR.js} +2 -2
  26. package/dist-cli/chunks/{chunk-45XEBYVX.js → chunk-GNQSOQXZ.js} +2 -2
  27. package/dist-cli/chunks/{chunk-265YGINI.js → chunk-H4G7IRXG.js} +6 -3
  28. package/dist-cli/chunks/{chunk-LMINUIAR.js → chunk-HRIQRZX3.js} +1 -1
  29. package/dist-cli/chunks/{chunk-DBYZF6KL.js → chunk-I5WEW3ES.js} +1 -1
  30. package/dist-cli/chunks/{chunk-54IIO5BV.js → chunk-IQU56D6C.js} +1 -1
  31. package/dist-cli/chunks/{chunk-IENPCJTB.js → chunk-IXITVIJV.js} +4 -4
  32. package/dist-cli/chunks/{chunk-FSTOUA6L.js → chunk-JPLTR6JM.js} +1 -1
  33. package/dist-cli/chunks/{chunk-FUHHRW7G.js → chunk-JPX7OS7B.js} +2 -2
  34. package/dist-cli/chunks/chunk-KVQWMXDV.js +2 -0
  35. package/dist-cli/chunks/{chunk-BKXH674Z.js → chunk-MBH3NFBC.js} +2 -2
  36. package/dist-cli/chunks/{chunk-HATEGE6O.js → chunk-MSKCUZ5B.js} +4 -4
  37. package/dist-cli/chunks/{chunk-BGZRRNK4.js → chunk-MTE3DEWY.js} +1 -1
  38. package/dist-cli/chunks/{chunk-IEYPDVW2.js → chunk-MWGIKDXO.js} +2 -2
  39. package/dist-cli/chunks/{chunk-EOYTPHOU.js → chunk-PDZ4JVAW.js} +1 -1
  40. package/dist-cli/chunks/{chunk-M7HK7MWE.js → chunk-PZJSYDQ7.js} +3 -3
  41. package/dist-cli/chunks/{chunk-67AZW4HJ.js → chunk-Q2424XB2.js} +1 -1
  42. package/dist-cli/chunks/chunk-SEETW74F.js +1 -0
  43. package/dist-cli/chunks/{chunk-AWQGGSDW.js → chunk-T6RAXKVI.js} +2 -2
  44. package/dist-cli/chunks/{chunk-ZEIDKF3M.js → chunk-U3UHXJNE.js} +1 -1
  45. package/dist-cli/chunks/{chunk-ET5NKJVL.js → chunk-UCCSXQ2P.js} +29 -29
  46. package/dist-cli/chunks/chunk-ULHAQFCE.js +1 -0
  47. package/dist-cli/chunks/{chunk-VR2UDTSA.js → chunk-USGUHWUJ.js} +2 -2
  48. package/dist-cli/chunks/{chunk-CLSZB5BN.js → chunk-UXE5BFPK.js} +2 -2
  49. package/dist-cli/chunks/{chunk-AQN3BB3D.js → chunk-YDKXZS7D.js} +1 -1
  50. package/dist-cli/chunks/chunk-YVGHAT6Q.js +1 -0
  51. package/dist-cli/chunks/cli-version-2VO66OZ6.js +2 -0
  52. package/dist-cli/chunks/{compat-WUI6VQPS.js → compat-ZBLH6EWV.js} +3 -3
  53. package/dist-cli/chunks/{config-XCFL4A6Z.js → config-DH2GG63H.js} +2 -2
  54. package/dist-cli/chunks/control-W3BOP6AT.js +2 -0
  55. package/dist-cli/chunks/{cpu-profile-CPOEDK5W.js → cpu-profile-3PRCXZMV.js} +2 -2
  56. package/dist-cli/chunks/{daemon-NFZOWPYN.js → daemon-XSFKUDKZ.js} +2 -2
  57. package/dist-cli/chunks/{debug-G6FBH3B4.js → debug-VAWCOXQ3.js} +3 -3
  58. package/dist-cli/chunks/demo-app-registry-7GNP7WE4.js +2 -0
  59. package/dist-cli/chunks/{detox-PUCPDKAO.js → detox-UABOFTDQ.js} +2 -2
  60. package/dist-cli/chunks/{device-IUUKTF7R.js → device-LCB4N66D.js} +2 -2
  61. package/dist-cli/chunks/diagnose-MT3WMY4M.js +41 -0
  62. package/dist-cli/chunks/drivers-YGVUWGMB.js +2 -0
  63. package/dist-cli/chunks/{electron-HGY5WSFG.js → electron-WVNFRA4S.js} +3 -3
  64. package/dist-cli/chunks/flow-OUOMEOSC.js +2 -0
  65. package/dist-cli/chunks/{hints-H7IVKEWB.js → hints-PFAKBGFX.js} +2 -2
  66. package/dist-cli/chunks/{home-paths-U5CDMYH5.js → home-paths-X6RB72PF.js} +2 -2
  67. package/dist-cli/chunks/{inspect-6WSCE3W3.js → inspect-UFYXDO6B.js} +74 -71
  68. package/dist-cli/chunks/install-NBUHIXEP.js +2 -0
  69. package/dist-cli/chunks/{install-desktop-QTZ3IBQW.js → install-desktop-W6QJX52Y.js} +3 -3
  70. package/dist-cli/chunks/{keys-DCQXAY66.js → keys-ORDSAMP7.js} +2 -2
  71. package/dist-cli/chunks/{launch-FTHBNATG.js → launch-NQZTWTPY.js} +3 -3
  72. package/dist-cli/chunks/{login-4GUBAGPQ.js → login-J2NVLHK5.js} +4 -4
  73. package/dist-cli/chunks/{logout-N25HFETU.js → logout-HI7A6PFH.js} +2 -2
  74. package/dist-cli/chunks/{maestro-WQBZZDTR.js → maestro-KIOOFK5M.js} +9 -9
  75. package/dist-cli/chunks/{preview-6MWJ6BSM.js → preview-QUJO4B4G.js} +2 -2
  76. package/dist-cli/chunks/{profile-UXJEGF4I.js → profile-U6RWYQV2.js} +2 -2
  77. package/dist-cli/chunks/{react-MHPIWH3F.js → react-3V65RTQC.js} +2 -2
  78. package/dist-cli/chunks/record-476LFCQV.js +41 -0
  79. package/dist-cli/chunks/runtime-4TK5DY5R.js +2 -0
  80. package/dist-cli/chunks/{runtime-delivery-IIDHK55K.js → runtime-delivery-BSRHUXJQ.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-MDE5ZSST.js → screenshot-2S3BCN35.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-mode-7W7L7IN3.js → screenshot-mode-SZCHOYZV.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-24LEZPD7.js → screenshots-LGP7LA3M.js} +2 -2
  84. package/dist-cli/chunks/{server-52HFHX3S.js → server-G4BGS6GE.js} +11 -11
  85. package/dist-cli/chunks/setup-repo-5LUDPPSI.js +2 -0
  86. package/dist-cli/chunks/{skills-3DGYETTU.js → skills-2YOLQVV6.js} +2 -2
  87. package/dist-cli/chunks/{start-NFVPQX74.js → start-SF3I4SLN.js} +4 -4
  88. package/dist-cli/chunks/store-LLUQKQB7.js +2 -0
  89. package/dist-cli/chunks/telemetry-RDTORLS2.js +2 -0
  90. package/dist-cli/chunks/{test-THI53N25.js → test-YYHXTVDI.js} +3 -3
  91. package/dist-cli/chunks/{three-mode-HUI4SESE.js → three-mode-5U3H4QDF.js} +2 -2
  92. package/dist-cli/chunks/{timeline-KAJ6PR4S.js → timeline-IOEIFEH2.js} +2 -2
  93. package/dist-cli/chunks/{upgrade-APDFMQCW.js → upgrade-YF2U5QJY.js} +2 -2
  94. package/dist-cli/chunks/upload-3DFSK4NV.js +2 -0
  95. package/dist-cli/chunks/web-GAOXH77P.js +2 -0
  96. package/dist-cli/chunks/{what-happened-4VMBEL5Z.js → what-happened-DBI2RQVE.js} +2 -2
  97. package/dist-cli/chunks/{whoami-NJOQICNO.js → whoami-YDAMLYNA.js} +2 -2
  98. package/dist-lib/agent-daemon-client.cjs +1 -1
  99. package/dist-lib/agent-events.cjs +1 -1
  100. package/dist-lib/agent-sessions.cjs +1 -1
  101. package/dist-lib/attached-projects.cjs +1 -1
  102. package/dist-lib/auth/shared-session.cjs +1 -1
  103. package/dist-lib/backend-origin.cjs +1 -1
  104. package/dist-lib/bridge-constants.cjs +1 -1
  105. package/dist-lib/cli-constants.cjs +1 -1
  106. package/dist-lib/config.cjs +1 -1
  107. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  108. package/dist-lib/home-paths.cjs +1 -1
  109. package/dist-lib/host/bridge-host.cjs +63 -7
  110. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  111. package/dist-lib/index.cjs +1 -1
  112. package/dist-lib/metro.cjs +1 -1
  113. package/dist-lib/profiles.cjs +1 -1
  114. package/dist-lib/render-mode.cjs +1 -1
  115. package/dist-lib/vite-base.cjs +67 -7
  116. package/dist-lib/vite.cjs +1 -1
  117. package/package.json +1 -1
  118. package/dist-cli/chunks/auto-bootstrap-UKUFJBJA.js +0 -2
  119. package/dist-cli/chunks/beta-4OEWPO5F.js +0 -2
  120. package/dist-cli/chunks/chunk-3HO4Q25D.js +0 -1
  121. package/dist-cli/chunks/chunk-4D7Z64YQ.js +0 -2
  122. package/dist-cli/chunks/chunk-ACQXOAQI.js +0 -2
  123. package/dist-cli/chunks/chunk-DV3SI64Q.js +0 -1
  124. package/dist-cli/chunks/chunk-EWSS4C2R.js +0 -1
  125. package/dist-cli/chunks/control-KE4VM2BN.js +0 -2
  126. package/dist-cli/chunks/demo-app-registry-U4FCHIYP.js +0 -2
  127. package/dist-cli/chunks/diagnose-6RY4YXSP.js +0 -41
  128. package/dist-cli/chunks/drivers-2FY62QZA.js +0 -2
  129. package/dist-cli/chunks/flow-HEYPRCST.js +0 -2
  130. package/dist-cli/chunks/install-NPNUNOL6.js +0 -2
  131. package/dist-cli/chunks/record-K5DRP3G7.js +0 -18
  132. package/dist-cli/chunks/runtime-UVFYTDXE.js +0 -2
  133. package/dist-cli/chunks/setup-repo-ZHEBGISP.js +0 -2
  134. package/dist-cli/chunks/store-R2RI4XAS.js +0 -2
  135. package/dist-cli/chunks/telemetry-KGU6DBN6.js +0 -2
  136. package/dist-cli/chunks/upload-K7OWH74D.js +0 -2
  137. package/dist-cli/chunks/web-XDGC5KGT.js +0 -2
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-FVBSPGBR.js";import"./chunk-YDKXZS7D.js";import"./chunk-MSKCUZ5B.js";import"./chunk-7Y3FYPJH.js";import"./chunk-DNKB2V2W.js";import"./chunk-MBH3NFBC.js";import"./chunk-CTEXZ7BE.js";import"./chunk-DSJ7PGU3.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as b}from"./chunk-AQN3BB3D.js";import{a as x}from"./chunk-DBYZF6KL.js";import"./chunk-3BUWCNVX.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as b}from"./chunk-YDKXZS7D.js";import{a as x}from"./chunk-I5WEW3ES.js";import"./chunk-6QDFLMJL.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
3
3
  `),t=n[n.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=v(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),e=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return e.status!==0&&console.warn(` warning: failed to unmount ${t} (${e.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function L(r){let o=v(process.env.HOME||"","Applications");y(o,{recursive:!0});let n=f(o,"sootsim.AppImage");return w(n)&&g(n,{force:!0}),T(r,n),S(n,493),n}async function C(r){return await new Promise((o,n)=>{let s=k("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",n),s.once("exit",t=>{t===0?o():n(new Error(`installer exited with code ${t}`))})}),r}async function Y(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
4
4
  sootsim install-desktop \u2014 download and install the optional desktop GUI
5
5
 
@@ -20,4 +20,4 @@ examples:
20
20
  `),process.exit(0));let o=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,n=r.includes("--force"),s=x();if(s&&!n){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=A();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await b("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(D(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
21
21
  `);try{await O({url:t.url,dest:i,onProgress:(e,m)=>{let $=Date.now();$-d<100&&e<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(e,m)}`))}})}catch(e){g(a,{recursive:!0,force:!0}),console.error(`
22
22
  download failed: ${e instanceof Error?e.message:String(e)}`),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
23
- `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-KGU6DBN6.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
23
+ `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-RDTORLS2.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.51 | (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-6NR6NFDC.js";import{d as c}from"./chunk-P2IC3VRD.js";import"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.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.52 | (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-BF7F45CZ.js";import{d as c}from"./chunk-DNKB2V2W.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.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.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-DV3SI64Q.js";import{b as m}from"./chunk-265YGINI.js";import{a as u}from"./chunk-DBYZF6KL.js";import"./chunk-VDUWPVZT.js";import"./chunk-EWSS4C2R.js";import"./chunk-BGZRRNK4.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-SEETW74F.js";import{b as m}from"./chunk-H4G7IRXG.js";import{a as u}from"./chunk-I5WEW3ES.js";import"./chunk-YVGHAT6Q.js";import"./chunk-EQPRFEHH.js";import"./chunk-MTE3DEWY.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
3
3
  sootsim launch \u2014 one-shot: install runtime if needed, start daemon, open app
4
4
 
5
5
  usage:
@@ -13,4 +13,4 @@ options:
13
13
  examples:
14
14
  sootsim launch
15
15
  sootsim launch --version 1.2.3
16
- `);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-UVFYTDXE.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
16
+ `);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-4TK5DY5R.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as f,d as m}from"./chunk-P2IC3VRD.js";import"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(t){if(t)return t;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function R(){console.log(`
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as f,d as m}from"./chunk-DNKB2V2W.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(t){if(t)return t;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function R(){console.log(`
3
3
  sootsim login \u2014 sign in so desktop uploads can attach to your account
4
4
 
5
5
  usage:
@@ -21,6 +21,6 @@ options:
21
21
  <p style="color:#ccc">${t}</p>
22
22
  </div>
23
23
  </body>
24
- </html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-KGU6DBN6.js");n({event:"cli_login_succeeded",identity:{userId:r.userId??s?.user?.id??null},properties:{origin:e,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${r.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(r=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,g=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),g){n.end(u(`sign-in failed: ${g}`)),r({ok:!1,error:g}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),r({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),r({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),r({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),r({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){r({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${e.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",e),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
24
+ </html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-RDTORLS2.js");n({event:"cli_login_succeeded",identity:{userId:r.userId??s?.user?.id??null},properties:{origin:e,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${r.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(r=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,g=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),g){n.end(u(`sign-in failed: ${g}`)),r({ok:!1,error:g}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),r({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),r({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),r({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),r({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){r({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${e.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",e),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
25
25
  ${n.toString()}
26
- `),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-KGU6DBN6.js");r({event:"cli_login_failed",properties:{origin:e,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}f({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:e,source:"cli"});let d=await m(e),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-KGU6DBN6.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:e}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
26
+ `),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-RDTORLS2.js");r({event:"cli_login_failed",properties:{origin:e,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}f({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:e,source:"cli"});let d=await m(e),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-RDTORLS2.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:e}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r,b as i}from"./chunk-VXLRXQER.js";import{a as t,c as o}from"./chunk-P2IC3VRD.js";import"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.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.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r,b as i}from"./chunk-7Y3FYPJH.js";import{a as t,c as o}from"./chunk-DNKB2V2W.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.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.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as h}from"./chunk-ET5NKJVL.js";import"./chunk-AWQGGSDW.js";import"./chunk-PTW5KT4I.js";import"./chunk-3HO4Q25D.js";import"./chunk-IEYPDVW2.js";import"./chunk-SPMHQKNI.js";import"./chunk-ZT7672XM.js";import"./chunk-SLAAAEUZ.js";import"./chunk-LMINUIAR.js";import"./chunk-265YGINI.js";import"./chunk-DBYZF6KL.js";import"./chunk-VDUWPVZT.js";import"./chunk-FUHHRW7G.js";import"./chunk-IENPCJTB.js";import"./chunk-6NR6NFDC.js";import"./chunk-EWSS4C2R.js";import"./chunk-BGZRRNK4.js";import"./chunk-VR2UDTSA.js";import"./chunk-4D7Z64YQ.js";import"./chunk-45XEBYVX.js";import"./chunk-67AZW4HJ.js";import"./chunk-BKXH674Z.js";import"./chunk-5PKYORP6.js";import"./chunk-VXLRXQER.js";import"./chunk-P2IC3VRD.js";import"./chunk-ACQXOAQI.js";import"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.js";import*as i from"fs";import*as l from"path";var y=[".maestro","maestro"];function b(){console.log(`
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as h,c as w}from"./chunk-UCCSXQ2P.js";import"./chunk-T6RAXKVI.js";import"./chunk-4TSGUAV3.js";import"./chunk-ULHAQFCE.js";import"./chunk-MWGIKDXO.js";import"./chunk-IXITVIJV.js";import"./chunk-BF7F45CZ.js";import"./chunk-FPIJBBYW.js";import"./chunk-ABEYZDD7.js";import"./chunk-3MIWVHCX.js";import"./chunk-HRIQRZX3.js";import"./chunk-H4G7IRXG.js";import"./chunk-I5WEW3ES.js";import"./chunk-YVGHAT6Q.js";import"./chunk-EQPRFEHH.js";import"./chunk-MTE3DEWY.js";import"./chunk-JPX7OS7B.js";import"./chunk-USGUHWUJ.js";import"./chunk-KVQWMXDV.js";import"./chunk-7Y3FYPJH.js";import"./chunk-DNKB2V2W.js";import"./chunk-GNQSOQXZ.js";import"./chunk-Q2424XB2.js";import"./chunk-MBH3NFBC.js";import"./chunk-CTEXZ7BE.js";import"./chunk-DSJ7PGU3.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.js";import*as i from"fs";import*as l from"path";var v=[".maestro","maestro"];function x(){console.log(`
3
3
  sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
4
4
 
5
5
  usage:
@@ -27,7 +27,7 @@ examples:
27
27
  sootsim maestro test .maestro/
28
28
  sootsim maestro --env USERNAME=alice test .maestro/login.yaml
29
29
  sootsim maestro init
30
- `)}function x(){console.log(`
30
+ `)}function S(){console.log(`
31
31
  sootsim maestro \u2014 compatibility matrix
32
32
 
33
33
  supported verbs:
@@ -54,7 +54,7 @@ not yet implemented (will throw "unsupported maestro verb"):
54
54
  travel, setLocation, setAirplaneMode, killApp,
55
55
  addMedia, startRecording, stopRecording (use --record flag),
56
56
  repeat.while (only repeat.times is supported).
57
- `)}function w(t){return t.startsWith("-")}function S(t){let r=[];for(let e=0;e<t.length;e++){if(t[e]==="--env"||t[e]==="-e"){let o=t[e+1];if(!o||!o.includes("="))throw new Error(`--env expects KEY=VALUE (got ${JSON.stringify(o??"")})`);let a=o.indexOf("="),s=o.slice(0,a),p=o.slice(a+1);process.env[s]=p,e+=1;continue}r.push(t[e])}return r}function $(t){let r=[];for(let e=0;e<t.length;e++){let o=t[e];if(o==="--format"||o==="--output"||o==="--device"||o==="-d"){e+=1;continue}if(o==="--continuous"){console.warn(" warn: --continuous is not yet implemented in sootsim \u2014 running once");continue}r.push(o)}return r}function g(t){for(let r of y){let e=l.join(t,r);if(i.existsSync(e)&&i.statSync(e).isDirectory())return e}return null}function k(t){let r=i.statSync(t);if(r.isFile())return[t];if(!r.isDirectory())throw new Error(`not a file or directory: ${t}`);let e=i.readdirSync(t),o=[];for(let a of e){if(a.startsWith("."))continue;let s=l.join(t,a);i.statSync(s).isFile()&&(a.endsWith(".yaml")||a.endsWith(".yml"))&&o.push(s)}return o.sort(),o}async function E(t){let r=l.join(t,".maestro");i.mkdirSync(r,{recursive:!0});let e=l.join(r,"login.yaml");return i.existsSync(e)?(console.error(` error: ${e} already exists`),1):(i.writeFileSync(e,`# sootsim maestro starter flow \u2014 drop-in compatible with the maestro cli.
57
+ `)}function g(t){return t.startsWith("-")}function $(t){let r=[];for(let e=0;e<t.length;e++){if(t[e]==="--env"||t[e]==="-e"){let o=t[e+1];if(!o||!o.includes("="))throw new Error(`--env expects KEY=VALUE (got ${JSON.stringify(o??"")})`);let a=o.indexOf("="),s=o.slice(0,a),p=o.slice(a+1);process.env[s]=p,e+=1;continue}r.push(t[e])}return r}function k(t){let r=[];for(let e=0;e<t.length;e++){let o=t[e];if(o==="--format"||o==="--output"||o==="--device"||o==="-d"){e+=1;continue}if(o==="--continuous"){console.warn(" warn: --continuous is not yet implemented in sootsim \u2014 running once");continue}r.push(o)}return r}function y(t){for(let r of v){let e=l.join(t,r);if(i.existsSync(e)&&i.statSync(e).isDirectory())return e}return null}function E(t){let r=i.statSync(t);if(r.isFile())return[t];if(!r.isDirectory())throw new Error(`not a file or directory: ${t}`);let e=i.readdirSync(t),o=[];for(let a of e){if(a.startsWith("."))continue;let s=l.join(t,a);i.statSync(s).isFile()&&(a.endsWith(".yaml")||a.endsWith(".yml"))&&o.push(s)}return o.sort(),o}async function F(t){let r=l.join(t,".maestro");i.mkdirSync(r,{recursive:!0});let e=l.join(r,"login.yaml");return i.existsSync(e)?(console.error(` error: ${e} already exists`),1):(i.writeFileSync(e,`# sootsim maestro starter flow \u2014 drop-in compatible with the maestro cli.
58
58
  # run: sootsim maestro test .maestro/login.yaml
59
59
  appId: com.example.app
60
60
  ---
@@ -67,14 +67,14 @@ appId: com.example.app
67
67
  - inputText: "secret123"
68
68
  - tapOn: "Sign in"
69
69
  - assertVisible: "Welcome"
70
- `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function F(t,r={}){if(t.includes("--help")||t.includes("-h"))return b(),0;if(t.includes("--list-compat"))return x(),0;let e;try{e=S(t)}catch(n){return console.error(` error: ${n.message}`),1}e=$(e);let o=process.cwd(),a=e[0];if(a==="init")return E(o);let s=null,p;if(a==="test"){let n=e.slice(1).find(c=>!w(c));n?(s=l.resolve(o,n),p=e.slice(1).filter(c=>c!==n)):(s=g(o),p=e.slice(1))}else a&&!w(a)?(s=l.resolve(o,a),p=e.slice(1)):(s=g(o),p=e);if(!s)return console.error(`
70
+ `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function O(t,r={}){if(t.includes("--help")||t.includes("-h"))return x(),0;if(t.includes("--list-compat"))return S(),0;let e;try{e=$(t)}catch(n){return console.error(` error: ${n.message}`),1}e=k(e),e=w(e);let o=process.cwd(),a=e[0];if(a==="init")return F(o);let s=null,p;if(a==="test"){let n=e.slice(1).find(c=>!g(c));n?(s=l.resolve(o,n),p=e.slice(1).filter(c=>c!==n)):(s=y(o),p=e.slice(1))}else a&&!g(a)?(s=l.resolve(o,a),p=e.slice(1)):(s=y(o),p=e);if(!s)return console.error(`
71
71
  error: no maestro flows found.
72
- expected one of: ${y.map(n=>`./${n}/`).join(", ")}
72
+ expected one of: ${v.map(n=>`./${n}/`).join(", ")}
73
73
  or pass a flow explicitly: sootsim maestro test path/to/flow.yaml
74
74
  or scaffold a starter flow: sootsim maestro init
75
- `),1;if(!i.existsSync(s))return console.error(` error: ${s} not found`),1;let u;try{u=k(s)}catch(n){return console.error(` error: ${n.message}`),1}if(u.length===0)return console.error(` error: no *.yaml or *.yml files found in ${s}`),1;console.log(`
75
+ `),1;if(!i.existsSync(s))return console.error(` error: ${s} not found`),1;let u;try{u=E(s)}catch(n){return console.error(` error: ${n.message}`),1}if(u.length===0)return console.error(` error: no *.yaml or *.yml files found in ${s}`),1;console.log(`
76
76
  sootsim maestro \u2014 ${u.length} flow${u.length===1?"":"s"}
77
77
  root: ${l.relative(o,s)||"."}
78
78
  `);let d=0,f=[];for(let n of u){console.log(`
79
- \u25B6 ${l.relative(o,n)}`);let c=[n,...p];r.port&&!p.includes("--url")&&c.push("--url",String(r.port));let m=0;try{m=await h(c)}catch(v){console.error(` x ${v.message}`),m=1}f.push({file:n,exit:m}),m!==0&&d===0&&(d=m)}if(u.length>1){console.log(`
80
- maestro summary:`);for(let c of f){let m=c.exit===0?"pass":"fail";console.log(` ${m} ${l.relative(o,c.file)}`)}let n=f.filter(c=>c.exit===0).length;console.log(` ${n}/${f.length} passed`)}return d}export{F as runMaestro};
79
+ \u25B6 ${l.relative(o,n)}`);let c=[n,...p];r.port&&!p.includes("--url")&&c.push("--url",String(r.port));let m=0;try{m=await h(c)}catch(b){console.error(` x ${b.message}`),m=1}f.push({file:n,exit:m}),m!==0&&d===0&&(d=m)}if(u.length>1){console.log(`
80
+ maestro summary:`);for(let c of f){let m=c.exit===0?"pass":"fail";console.log(` ${m} ${l.relative(o,c.file)}`)}let n=f.filter(c=>c.exit===0).length;console.log(` ${n}/${f.length} passed`)}return d}export{O as runMaestro};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-3BUWCNVX.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.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-6QDFLMJL.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.51 | (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-VDUWPVZT.js";import"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.js";function f(){console.log(`
1
+ /*! sootsim v0.1.52 | (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-EQPRFEHH.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.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.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as w,e as b,h as m,i as f}from"./chunk-BKXH674Z.js";import"./chunk-5PKYORP6.js";import"./chunk-ACQXOAQI.js";import"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.js";function h(){console.log(`
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as w,e as b,h as m,i as f}from"./chunk-MBH3NFBC.js";import"./chunk-CTEXZ7BE.js";import"./chunk-DSJ7PGU3.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.js";function h(){console.log(`
3
3
  sootsim react \u2014 inspect React component render cost in the tenant worker
4
4
 
5
5
  usage:
@@ -0,0 +1,41 @@
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as A}from"./chunk-MWGIKDXO.js";import"./chunk-IXITVIJV.js";import{d as K}from"./chunk-BF7F45CZ.js";import"./chunk-YVGHAT6Q.js";import{d as G}from"./chunk-MTE3DEWY.js";import"./chunk-7Y3FYPJH.js";import"./chunk-DNKB2V2W.js";import{c as v,e as y}from"./chunk-MBH3NFBC.js";import{b as q}from"./chunk-CTEXZ7BE.js";import"./chunk-DSJ7PGU3.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.js";import{existsSync as ue,mkdirSync as k,readdirSync as me,readFileSync as fe,rmSync as W,writeFileSync as M}from"fs";import{homedir as pe,tmpdir as ge}from"os";import{dirname as P,extname as H,join as U,resolve as we}from"path";var X=6e4,he=3e4;async function N(e,t,o,i){let r=Math.max(2e4,i+he);try{return await e.send({type:"evaluate",code:t},{timeoutMs:r})}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(r/1e3)}s; it is likely contended or wedged.
3
+ the capture lock auto-releases, so simply retry the recording.
4
+ if it persists, recover the sim with \`sootsim close --sim <id>\`.`),process.exit(1)),/render host not available|already streaming|already recording/i.test(s)&&(console.error(` ${o} failed: ${s}
5
+ a prior recording was abandoned and its capture is still
6
+ releasing. the lock self-heals in ~${Math.round((i+2e4)/1e3)}s \u2014 retry then, or recover now with
7
+ \`sootsim close --sim <id>\` and reopen the sim.`),process.exit(1)),console.error(` ${o} failed: ${s}`),process.exit(1)}}var be=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin"]),ve=new Set(["start","stop","cancel","status"]);function ye(e){for(let t=0;t<e.length;t++){let o=e[t];if(o.startsWith("-")){be.has(o)&&t++;continue}return ve.has(o)?{name:o,index:t}:null}return null}async function Pe(e,t){let o=ye(e);if(o){let d=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await ke(d,t);return}if(o.name==="stop"){await Me(d,t);return}if(o.name==="cancel"){await Be(d,t);return}await Oe(d,t);return}let i=v(e,{port:t.port,stripBooleanFlags:["--no-shell","--shell-only","--open"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin"]}),r=Z(u(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=u(e,"--format");s&&!["webm","mp4","gif","png"].includes(s)&&(console.error(` invalid --format "${s}" \u2014 expected webm | mp4 | gif | png`),process.exit(1));let c=u(e,"--output"),a=Number(u(e,"--duration")??"10");(!Number.isFinite(a)||a<=0)&&(console.error(` invalid --duration "${u(e,"--duration")}" \u2014 expected a positive number of seconds`),process.exit(1));let l=1800;a>l&&(console.error(` invalid --duration "${u(e,"--duration")}" \u2014 exceeds the ${l}s (30m) maximum`),process.exit(1));let g=Number(u(e,"--fps")??"30"),w=u(e,"--frames");if(w!==void 0){let d=Number(w);(!Number.isInteger(d)||d<=0)&&(console.error(` invalid --frames "${w}" \u2014 expected a positive integer count`),process.exit(1))}let V=e.includes("--open"),j=u(e,"--max-width")?Number(u(e,"--max-width")):void 0,f=Math.max(100,Math.round(a*1e3)),de=u(e,"--origin");if(r==="live"||r==="combined"){c&&console.log(` note: --output is ignored for --mode ${r} \u2014 the recording uploads to /preview/<id>`),n&&r==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await A("record",{originOverride:de});let d=y({...i,commandTimeoutMs:6e4});try{await oe(d),await te(d,r),await re(d),await ne(d,r,r==="combined"?n:void 0)||(console.error(` start failed: recording store refused to start (${r})`),process.exit(1)),console.log(` recording ${r} for ${a}s`),await new Promise(R=>setTimeout(R,f)),await ie(d);let x=await se(d);ae(x,V,r)}finally{d.close()}return}let I=w?Number(w):null,$=Re(s,c,I);V&&console.log(" note: --open is ignored for local-file capture \u2014 it applies to --mode live/combined");let h=y({...i,commandTimeoutMs:6e4});try{if(await Q(h),$==="png"){let S=I??10,p=B(c,`sootsim-frames-${O()}`);c&&H(c)&&console.log(` note: --frames writes multiple pngs, so --output "${c}" is a directory \u2014 frame-NNN.png files land inside it`),k(p,{recursive:!0});for(let m of me(p))/^frame-\d+\.png$/.test(m)&&W(U(p,m),{force:!0});console.log(` sampling ${S} frames over ${a}s \u2192 ${p}`);let b=await h.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${S}, durationMs: ${f}${n?`, layers: ${JSON.stringify(n)}`:""} })`});(!b.ok||!b.requestId)&&(console.error(` frame capture start failed: ${b.error??"unknown error"}`),process.exit(1)),await new Promise(m=>setTimeout(m,f));let ce=Date.now()+Math.max(5e3,f),T=null;for(;;){let m=await h.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${b.requestId})`});if(m||(console.error(" frame capture result missing"),process.exit(1)),m.done){m.ok||(console.error(` frame capture failed: ${m.error??"unknown error"}`),process.exit(1)),T=m.frames??[];break}Date.now()>=ce&&(console.error(" frame capture timed out"),process.exit(1)),await new Promise(F=>setTimeout(F,100))}T.forEach((m,F)=>{let le=`${p}/frame-${String(F+1).padStart(3,"0")}.png`;M(le,Buffer.from(m.data,"base64"))}),console.log(` saved ${T.length} frames`);return}if($==="gif"){let S=I??Math.max(10,Math.round(a*g/3)),p=B(c,`sootsim-${O()}.gif`);k(P(p),{recursive:!0}),console.log(` encoding gif: ${S} frames over ${a}s \u2192 ${p}`);let b=await N(h,`window.__sootsimRecorder.captureGif({ frames: ${S}, durationMs: ${f}${j?`, maxWidth: ${j}`:""}${n?`, layers: ${JSON.stringify(n)}`:""} })`,"gif encode",f);b||(console.error(" gif capture returned no frames"),process.exit(1)),M(p,Buffer.from(b.data,"base64")),console.log(` saved: ${p} (${D(b.size)})`);return}let d=B(c,`sootsim-${O()}.${$}`);k(P(d),{recursive:!0});let C={format:$,fps:g,durationMs:f};n&&(C.layers=n);let x=await N(h,`window.__sootsimRecorder.start(${JSON.stringify(C)})`,`${$} start`,f);x.ok||(console.error(` start failed: ${x.error??"unknown error"}`),/render host not available|already streaming|already recording/i.test(x.error??"")&&console.error(" a prior recording was abandoned and its capture is still\n releasing. retry in ~20s, or recover now with\n `sootsim close --sim <id>` then reopen the sim."),process.exit(1)),console.log(` recording ${$} for ${a}s \u2192 ${d}`),await new Promise(S=>setTimeout(S,f));let R=await N(h,"window.__sootsimRecorder.stop()",`${$} encode/flush`,f);R.ok||(console.error(` stop failed: ${R.error??"unknown error"}`),process.exit(1)),R.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),process.exit(1)),await Y(h,d),console.log(` saved: ${d} (${D(R.size)})`)}finally{h.close()}}var $e=6e3;async function z(e,t){try{return await e.send({type:"evaluate",code:t},{timeoutMs:$e})}catch(o){let i=o instanceof Error?o.message:String(o);throw/^command timed out after \d+s$/.test(i)&&(console.error(" sim did not respond \u2014 it is connected to the bridge but has not\n loaded an app (or its page is unresponsive). run `sootsim list`\n and target a sim with a loaded app via --sim <id>."),process.exit(1)),o}}async function Q(e){await z(e,'typeof window.__sootsimRecorder !== "undefined"')||(console.error(" window.__sootsimRecorder missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function Y(e,t){let o=[],i=0;for(;;){let r=await e.send({type:"evaluate",code:`window.__sootsimRecorder.getBlobBase64({ offset: ${i}, chunk: 2097152 })`});if(!r)throw new Error("no blob available on recorder");if(o.push(Buffer.from(r.data,"base64")),i=r.offset,r.done)break}M(t,Buffer.concat(o))}function u(e,t){let o=e.indexOf(t);if(!(o<0||o===e.length-1))return e[o+1]}function Se(e){if(!e)return;let t=H(e).toLowerCase().replace(/^\./,"");if(t==="webm"||t==="mp4"||t==="gif")return t;if(t==="png")return"png"}function Re(e,t,o){return e||(o!=null?"png":Se(t)??"webm")}function O(){return new Date().toISOString().replace(/[:T]/g,"-").replace(/\..+/,"")}function xe(){let e=U(pe(),".sootsim","recordings");return k(e,{recursive:!0}),e}function B(e,t){return e?we(process.cwd(),e):U(xe(),t)}function D(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function Z(e){if(!e)return"video";if(e==="video"||e==="live"||e==="combined")return e;console.error(` invalid --mode "${e}" \u2014 expected video | live | combined`),process.exit(1)}function L(){return U(ge(),`sootsim-recording-${q()}.json`)}function E(){let e=L();if(!ue(e))return null;try{return{mode:"video",...JSON.parse(fe(e,"utf8"))}}catch{return W(e,{force:!0}),null}}function _e(e){M(L(),JSON.stringify(e,null,2))}function _(){W(L(),{force:!0})}function J(e,t){e&&t.simId&&e!==t.simId&&console.log(` note: the tracked recording session is on sim ${t.simId}, not the
8
+ requested sim ${e}. record state is global (not per-sim);
9
+ this command acts on that session regardless of --sim.`)}async function ke(e,t){let o=E();o&&(console.error(` recording already in progress (started ${o.startedAt}, sim ${o.simId??"?"}). run \`sootsim record stop\` first, or \`sootsim record cancel\` to discard.`),process.exit(1));let i=v(e,{port:t.port,stripBooleanFlags:["--no-shell","--shell-only"],stripValueFlags:["--mode","--fps","--format","--max-width","--origin"]}),r=Z(u(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=u(e,"--format"),c=s==="mp4"?"mp4":"webm";s&&c!==s&&(console.error(` record start only supports webm or mp4 (got: ${s}). for gif/png use atomic mode: sootsim record --format ${s} --duration <s>`),process.exit(1));let a=Number(u(e,"--fps")??"30"),l=y({...i,commandTimeoutMs:15e3});try{if(r==="live"||r==="combined")n&&r==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await A("record",{originOverride:u(e,"--origin")}),await oe(l),await te(l,r),await re(l),await ne(l,r,r==="combined"?n:void 0)||(console.error(` start failed: recording store refused to start (${r})`),process.exit(1));else{await Q(l);let g={format:c,fps:a};n&&(g.layers=n);let w=await l.send({type:"evaluate",code:`window.__sootsimRecorder.start(${JSON.stringify(g)})`});w.ok||(console.error(` start failed: ${w.error??"unknown error"}`),process.exit(1))}_e({simId:i.simId??null,mode:r,format:c,fps:a,layers:n,startedAt:new Date().toISOString()}),console.log(r==="video"?` recording ${c} @ ${a}fps${n?` (${n})`:""} \u2014 run \`sootsim record stop --output <path>\` when done`:` recording ${r} \u2014 run \`sootsim record stop\` when done (add --open to launch the preview URL)`)}finally{l.close()}}async function ee(e){try{let t=await e.send({type:"evaluate",code:`(() => {
10
+ const store = window.SootSim?.bridges?.getRecordingState?.();
11
+ const headless = window.__sootsimRecorder?.state?.();
12
+ return { store: store ? store.state : undefined, headless };
13
+ })()`});return t?t.store==="recording"||t.headless==="recording"?"recording":t.store==="processing"?"processing":t.store==="idle"||t.headless==="idle"?"idle":null:null}catch{return null}}async function Oe(e,t){let o=E();if(o){J(v(e,{port:t.port}).simId,o),o.mode==="video"?console.log(` recording ${o.mode} (${o.format} @ ${o.fps}fps) on sim ${o.simId??"?"} since ${o.startedAt}`):console.log(` recording ${o.mode} on sim ${o.simId??"?"} since ${o.startedAt}`);return}let i=v(e,{port:t.port}),r=y({...i,commandTimeoutMs:8e3});try{let n=await ee(r);console.log(n==="recording"||n==="processing"?` a recording is in progress (engine state: ${n}), but not via
14
+ \`record start\` \u2014 it was started by an atomic \`record --duration\`
15
+ run or the in-browser record button, which own their own lifecycle.
16
+ if that controlling run is still alive it will finish on its own
17
+ (atomic \`--mode video/gif/png\` writes a local file from that
18
+ process; live/combined upload to /preview/<id>). if the run was
19
+ killed, the recording is abandoned and will NOT finish \u2014 reclaim
20
+ it now with \`sootsim record cancel\`, or it auto-reclaims when the
21
+ abandoned capture's deadline lapses.`:" no recording in progress")}finally{r.close()}}async function Be(e,t){let o=E();if(!o){let s=v(e,{port:t.port}),c=y({...s,commandTimeoutMs:8e3});try{let a=await ee(c);if(a==="recording"||a==="processing"){let l=await c.send({type:"evaluate",code:`(async () => {
22
+ const r = window.__sootsimRecorder;
23
+ if (r && typeof r.forceRelease === 'function') return await r.forceRelease();
24
+ return false;
25
+ })()`}).catch(()=>!1);console.log(l?" reclaimed an abandoned recording (started by an atomic\n `record --duration` run or the record button whose owner is\n gone). the recorder is idle again \u2014 live/combined can start.":" a recording is in progress and still owned by a live atomic\n `record --duration` run or the in-browser record button \u2014 it\n will finish on its own and nothing was reclaimed.")}else console.log(" no recording in progress")}finally{c.close()}return}let i=v(e,{port:t.port});J(i.simId,o);let r=o.simId??i.simId??void 0,n=y({...i,simId:r,commandTimeoutMs:15e3});try{o.mode==="live"||o.mode==="combined"?await n.send({type:"evaluate",code:"void window.SootSim?.bridges?.cancelRecording?.()"}):await n.send({type:"evaluate",code:"window.__sootsimRecorder.stop()"})}catch{}finally{_(),n.close()}console.log(" recording cancelled")}async function Me(e,t){let o=E();o||(console.error(" no recording in progress. start one with `sootsim record start`."),process.exit(1));let i=v(e,{port:t.port,stripBooleanFlags:["--open"],stripValueFlags:["--output"]});J(i.simId,o);let r=o.simId??i.simId??void 0,n=e.includes("--open"),s=y({...i,simId:r,commandTimeoutMs:6e4});try{if(o.mode==="live"||o.mode==="combined"){await ie(s);let g=await se(s);_(),ae(g,n,o.mode);return}let c=u(e,"--output"),a=B(c,`sootsim-${O()}.${o.format}`);k(P(a),{recursive:!0});let l=await s.send({type:"evaluate",code:"window.__sootsimRecorder.stop()"});l.ok||(console.error(` stop failed: ${l.error??"unknown error"}`),_(),process.exit(1)),l.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),_(),process.exit(1)),await Y(s,a),_(),console.log(` saved: ${a} (${D(l.size)})`)}finally{s.close()}}async function oe(e){await z(e,'typeof window.SootSim?.bridges?.startRecording === "function" && typeof window.SootSim?.bridges?.stopRecording === "function"')||(console.error(" SootSim.bridges.startRecording missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function te(e,t){await z(e,`(() => {
26
+ const fn = window.__sootsimCaptureBundle
27
+ if (typeof fn !== 'function') return false
28
+ const snap = fn()
29
+ return !!(snap && snap.bundleUrl)
30
+ })()`)||(console.error(` --mode ${t} needs a guest app bundle to upload to /preview/<id>,
31
+ but this sim has no bundle loaded (a built-in shell screen like
32
+ photos/settings/home has none). open a metro/guest app first, or
33
+ use \`--mode video\` for a local screen recording with no upload.`),process.exit(1))}async function re(e){let t=K();if(!t)return;let o=t.kind==="api-key"?t.secret:t.token;await e.send({type:"evaluate",code:`(() => {
34
+ const set = window.SootSim && window.SootSim.bridges && window.SootSim.bridges.setSession
35
+ if (typeof set !== 'function') return false
36
+ set({ token: ${JSON.stringify(o)}, user: null })
37
+ return true
38
+ })()`})||(console.error(" SootSim.bridges.setSession missing \u2014 this sim is running an engine\n build without CLI-injected preview auth. reload the sim or open a\n fresh one (`sootsim open --new`); if it persists, update sootsim."),process.exit(1))}async function ne(e,t,o){return await e.send({type:"evaluate",code:`window.SootSim.bridges.startRecording(${JSON.stringify(t)}${o?`, ${JSON.stringify(o)}`:""})`})===!0}async function ie(e){await e.send({type:"evaluate",code:"void window.SootSim.bridges.stopRecording()"})}async function se(e){let t=Date.now()+X;for(;Date.now()<t;){let o=await e.send({type:"evaluate",code:"(() => { const s = window.SootSim?.bridges?.getRecordingState?.(); return s ? { state: s.state, lastUpload: s.lastUpload, uploadError: s.uploadError } : null })()"});if(o&&o.state==="idle"){if(o.uploadError)return{uploadError:o.uploadError};if(o.lastUpload?.previewUrl)return{previewUrl:o.lastUpload.previewUrl,eventCount:o.lastUpload.eventCount}}await new Promise(i=>setTimeout(i,300))}return{uploadError:`upload did not settle within ${X/1e3}s`}}function ae(e,t,o){e.uploadError&&(console.error(` upload failed: ${e.uploadError}`),process.exit(1)),e.previewUrl||(console.error(" upload returned no preview URL"),process.exit(1)),console.log(` preview: ${e.previewUrl}`),console.log(` note: this URL is content-addressed \u2014 re-recording the same bundle
39
+ replaces this capture at the same /preview/<id>.`),(o==="live"||o==="combined")&&typeof e.eventCount=="number"&&console.log(` captured ${e.eventCount} event${e.eventCount===1?"":"s"}`),(o==="live"||o==="combined")&&e.eventCount===0&&console.log(o==="combined"?` note: this combined recording captured no events \u2014 the Live tab has
40
+ nothing to replay, and the Video tab may stall with no events to drive it.`:` note: this live recording captured no events \u2014 the preview has nothing
41
+ to replay and will boot a fresh interactive session instead.`),t&&G(e.previewUrl)}export{Se as extToFormat,Re as resolveFormat,Pe as runRecord,u as valueOf};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-PZJSYDQ7.js";import"./chunk-MBH3NFBC.js";import"./chunk-CTEXZ7BE.js";import"./chunk-DSJ7PGU3.js";import"./chunk-UXE5BFPK.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.js";export{a as runRuntime};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-CLSZB5BN.js";import"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.js";export{a as DEFAULT_RUNTIME_CDN_ORIGIN,b as RUNTIME_CDN_ORIGIN_ENV,c as RUNTIME_CHANNEL_ENV,l as checkRuntimeUpToDate,h as fetchRuntimeManifest,j as installRuntime,d as resolveRuntimeCdnOrigin,e as resolveRuntimeChannel,i as resolveRuntimeVersion,f as runtimeManifestUrl,g as runtimeTarballUrl,k as updateRuntimeToLatest};
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-UXE5BFPK.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.js";export{a as DEFAULT_RUNTIME_CDN_ORIGIN,b as RUNTIME_CDN_ORIGIN_ENV,c as RUNTIME_CHANNEL_ENV,l as checkRuntimeUpToDate,h as fetchRuntimeManifest,j as installRuntime,d as resolveRuntimeCdnOrigin,e as resolveRuntimeChannel,i as resolveRuntimeVersion,f as runtimeManifestUrl,g as runtimeTarballUrl,k as updateRuntimeToLatest};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-PTW5KT4I.js";import"./chunk-3HO4Q25D.js";import{a as x}from"./chunk-XWHWPFBE.js";import"./chunk-VR2UDTSA.js";import"./chunk-45XEBYVX.js";import{f as m}from"./chunk-67AZW4HJ.js";import{c as h,d as g,e as w,h as y}from"./chunk-BKXH674Z.js";import"./chunk-5PKYORP6.js";import"./chunk-ACQXOAQI.js";import"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.js";import{mkdirSync as R,writeFileSync as v}from"fs";import{dirname as _,resolve as $}from"path";async function W(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-4TSGUAV3.js";import"./chunk-ULHAQFCE.js";import{a as x}from"./chunk-EXQJSXDF.js";import"./chunk-USGUHWUJ.js";import"./chunk-GNQSOQXZ.js";import{f as m}from"./chunk-Q2424XB2.js";import{c as h,d as g,e as w,h as y}from"./chunk-MBH3NFBC.js";import"./chunk-CTEXZ7BE.js";import"./chunk-DSJ7PGU3.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.js";import{mkdirSync as R,writeFileSync as v}from"fs";import{dirname as _,resolve as $}from"path";async function W(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim screenshot \u2014 capture the canvas as a PNG
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as o}from"./chunk-JZ65NOXB.js";import"./chunk-BKXH674Z.js";import"./chunk-5PKYORP6.js";import"./chunk-ACQXOAQI.js";import"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.js";async function n(e,s){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-2QNHBNWB.js";import"./chunk-MBH3NFBC.js";import"./chunk-CTEXZ7BE.js";import"./chunk-DSJ7PGU3.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.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.51 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as Y}from"./chunk-ET5NKJVL.js";import"./chunk-AWQGGSDW.js";import{b as j}from"./chunk-PTW5KT4I.js";import"./chunk-3HO4Q25D.js";import"./chunk-IEYPDVW2.js";import{b as O}from"./chunk-SPMHQKNI.js";import"./chunk-ZT7672XM.js";import"./chunk-SLAAAEUZ.js";import"./chunk-LMINUIAR.js";import"./chunk-265YGINI.js";import"./chunk-DBYZF6KL.js";import"./chunk-VDUWPVZT.js";import"./chunk-FUHHRW7G.js";import"./chunk-IENPCJTB.js";import"./chunk-6NR6NFDC.js";import"./chunk-EWSS4C2R.js";import"./chunk-BGZRRNK4.js";import"./chunk-VR2UDTSA.js";import"./chunk-4D7Z64YQ.js";import"./chunk-45XEBYVX.js";import{a as w,b as D,c as k,d as z,e as x,f as T}from"./chunk-67AZW4HJ.js";import"./chunk-BKXH674Z.js";import"./chunk-5PKYORP6.js";import"./chunk-VXLRXQER.js";import"./chunk-P2IC3VRD.js";import"./chunk-ACQXOAQI.js";import"./chunk-FSTOUA6L.js";import"./chunk-3BUWCNVX.js";import{mkdirSync as B,readFileSync as pe,writeFileSync as G}from"fs";import{tmpdir as je}from"os";import C from"path";import{mkdirSync as I,readFileSync as Q,writeFileSync as H}from"fs";import F from"path";function _(e){return e.replace(/\\/g,"/").replace(/\.png$/i,"").trim().split("/").filter(Boolean).join("--").replace(/[^A-Za-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"slide"}function v(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}function ee(e){let t=e.trim();return/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function M(e,t){let o=ee(e),i=Math.max(0,Math.min(1,t)),n=o.match(/^#([0-9a-f]{6})$/i);if(n){let s=n[1],r=Number.parseInt(s.slice(0,2),16),a=Number.parseInt(s.slice(2,4),16),u=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${u}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function te(e){if(e.type==="solid")return e.color||"#000000";let t=e.direction??180,o=e.stops?.map(i=>`${i.color} ${i.offset}%`).join(", ")||"#000000 0%, #111111 100%";return`linear-gradient(${t}deg, ${o})`}function re(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${M(t,.46)} 0%, ${M(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function A(e){switch(e){case"tilted-left":return"perspective(2400px) rotateY(10deg) rotateZ(-2deg)";case"tilted-right":return"perspective(2400px) rotateY(-10deg) rotateZ(2deg)";case"cut-bottom":return"translateY(10%) scale(1.08)";case"cut-top":return"translateY(-16%) scale(1.08)";default:return"none"}}function L(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function E(e){let t=M(e.color,e.opacity),o=M(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function R(e,t){return!t.glow||e.color&&e.color!==w.color?e:{...e,color:t.glow}}function oe(e,t){if(e==="editorial-left"){let n=Math.round(t.height*.056),s=Math.round(t.height*.022);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.12)}px`,`left:${Math.round(t.width*.085)}px`,`width:${Math.round(t.width*.42)}px`,"text-align:left","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.92;`,subStyle:`font-size:${s}px;line-height:1.36;max-width:${Math.round(t.width*.36)}px;`,eyebrowStyle:"align-items:flex-start;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),c=a.pose||r.pose||"tilted-right",m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.18)+l}px`,`left:${Math.round(t.width*.56)}px`,`width:${p}px`,"transform-origin:center center",`transform:${A(c)}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}if(e==="minimal-bottom"){let n=Math.round(t.height*.041),s=Math.round(t.height*.019);return{copyStyle:["position:absolute",`left:${Math.round(t.width*.12)}px`,`right:${Math.round(t.width*.12)}px`,`bottom:${Math.round(t.height*.085)}px`,"text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.96;`,subStyle:`font-size:${s}px;line-height:1.34;max-width:${Math.round(t.width*.56)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),c=a.pose||r.pose,m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${L("translateX(-50%)",A(c))}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}let o=Math.round(t.height*.04),i=Math.round(t.height*.019);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.084)}px`,"left:50%",`width:${Math.round(t.width*.88)}px`,"transform:translateX(-50%)","text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${o}px;line-height:0.92;`,subStyle:`font-size:${i}px;line-height:1.34;max-width:${Math.round(t.width*.6)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(n,s,r)=>{let a=t.name==="ipad-13"?.54:.64,u=Math.round(t.width*a*(s.scale??n.scale)),p=Math.round(t.height*(n.offsetY+(s.offsetY??0))),l=s.pose||n.pose,c=R(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*(t.name==="ipad-13"?.25:.28))+p}px`,"left:50%",`width:${u}px`,"transform-origin:center top",`transform:${L("translateX(-50%)",A(l))}`,`filter:${E(c)}`,"z-index:2"].join(";")}}}function ne({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=oe(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),u=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${v(o.headline)}</div>`:"",p=o.subheadline?`<div style="margin-top:${Math.round(e.height*.018)}px;color:${t.text.subColor};white-space:pre-line;text-wrap:balance;${s.subStyle}">${v(o.subheadline)}</div>`:"",l=o.eyebrow?`<div style="display:flex;${s.eyebrowStyle}margin-bottom:${Math.round(e.height*.016)}px;"><div style="font-size:${Math.round(e.height*.014)}px;font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:${t.text.eyebrowColor};">${v(o.eyebrow)}</div></div>`:"";return`<!doctype html>
1
+ /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as Y}from"./chunk-UCCSXQ2P.js";import"./chunk-T6RAXKVI.js";import{b as j}from"./chunk-4TSGUAV3.js";import"./chunk-ULHAQFCE.js";import"./chunk-MWGIKDXO.js";import"./chunk-IXITVIJV.js";import"./chunk-BF7F45CZ.js";import{b as O}from"./chunk-FPIJBBYW.js";import"./chunk-ABEYZDD7.js";import"./chunk-3MIWVHCX.js";import"./chunk-HRIQRZX3.js";import"./chunk-H4G7IRXG.js";import"./chunk-I5WEW3ES.js";import"./chunk-YVGHAT6Q.js";import"./chunk-EQPRFEHH.js";import"./chunk-MTE3DEWY.js";import"./chunk-JPX7OS7B.js";import"./chunk-USGUHWUJ.js";import"./chunk-KVQWMXDV.js";import"./chunk-7Y3FYPJH.js";import"./chunk-DNKB2V2W.js";import"./chunk-GNQSOQXZ.js";import{a as w,b as D,c as k,d as z,e as x,f as T}from"./chunk-Q2424XB2.js";import"./chunk-MBH3NFBC.js";import"./chunk-CTEXZ7BE.js";import"./chunk-DSJ7PGU3.js";import"./chunk-JPLTR6JM.js";import"./chunk-6QDFLMJL.js";import{mkdirSync as B,readFileSync as pe,writeFileSync as G}from"fs";import{tmpdir as je}from"os";import C from"path";import{mkdirSync as I,readFileSync as Q,writeFileSync as H}from"fs";import F from"path";function _(e){return e.replace(/\\/g,"/").replace(/\.png$/i,"").trim().split("/").filter(Boolean).join("--").replace(/[^A-Za-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"slide"}function v(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}function ee(e){let t=e.trim();return/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function M(e,t){let o=ee(e),i=Math.max(0,Math.min(1,t)),n=o.match(/^#([0-9a-f]{6})$/i);if(n){let s=n[1],r=Number.parseInt(s.slice(0,2),16),a=Number.parseInt(s.slice(2,4),16),u=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${u}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function te(e){if(e.type==="solid")return e.color||"#000000";let t=e.direction??180,o=e.stops?.map(i=>`${i.color} ${i.offset}%`).join(", ")||"#000000 0%, #111111 100%";return`linear-gradient(${t}deg, ${o})`}function re(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${M(t,.46)} 0%, ${M(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function A(e){switch(e){case"tilted-left":return"perspective(2400px) rotateY(10deg) rotateZ(-2deg)";case"tilted-right":return"perspective(2400px) rotateY(-10deg) rotateZ(2deg)";case"cut-bottom":return"translateY(10%) scale(1.08)";case"cut-top":return"translateY(-16%) scale(1.08)";default:return"none"}}function L(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function E(e){let t=M(e.color,e.opacity),o=M(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function R(e,t){return!t.glow||e.color&&e.color!==w.color?e:{...e,color:t.glow}}function oe(e,t){if(e==="editorial-left"){let n=Math.round(t.height*.056),s=Math.round(t.height*.022);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.12)}px`,`left:${Math.round(t.width*.085)}px`,`width:${Math.round(t.width*.42)}px`,"text-align:left","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.92;`,subStyle:`font-size:${s}px;line-height:1.36;max-width:${Math.round(t.width*.36)}px;`,eyebrowStyle:"align-items:flex-start;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),c=a.pose||r.pose||"tilted-right",m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.18)+l}px`,`left:${Math.round(t.width*.56)}px`,`width:${p}px`,"transform-origin:center center",`transform:${A(c)}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}if(e==="minimal-bottom"){let n=Math.round(t.height*.041),s=Math.round(t.height*.019);return{copyStyle:["position:absolute",`left:${Math.round(t.width*.12)}px`,`right:${Math.round(t.width*.12)}px`,`bottom:${Math.round(t.height*.085)}px`,"text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.96;`,subStyle:`font-size:${s}px;line-height:1.34;max-width:${Math.round(t.width*.56)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),c=a.pose||r.pose,m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${L("translateX(-50%)",A(c))}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}let o=Math.round(t.height*.04),i=Math.round(t.height*.019);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.084)}px`,"left:50%",`width:${Math.round(t.width*.88)}px`,"transform:translateX(-50%)","text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${o}px;line-height:0.92;`,subStyle:`font-size:${i}px;line-height:1.34;max-width:${Math.round(t.width*.6)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(n,s,r)=>{let a=t.name==="ipad-13"?.54:.64,u=Math.round(t.width*a*(s.scale??n.scale)),p=Math.round(t.height*(n.offsetY+(s.offsetY??0))),l=s.pose||n.pose,c=R(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*(t.name==="ipad-13"?.25:.28))+p}px`,"left:50%",`width:${u}px`,"transform-origin:center top",`transform:${L("translateX(-50%)",A(l))}`,`filter:${E(c)}`,"z-index:2"].join(";")}}}function ne({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=oe(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),u=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${v(o.headline)}</div>`:"",p=o.subheadline?`<div style="margin-top:${Math.round(e.height*.018)}px;color:${t.text.subColor};white-space:pre-line;text-wrap:balance;${s.subStyle}">${v(o.subheadline)}</div>`:"",l=o.eyebrow?`<div style="display:flex;${s.eyebrowStyle}margin-bottom:${Math.round(e.height*.016)}px;"><div style="font-size:${Math.round(e.height*.014)}px;font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:${t.text.eyebrowColor};">${v(o.eyebrow)}</div></div>`:"";return`<!doctype html>
3
3
  <html>
4
4
  <head>
5
5
  <meta charset="utf-8" />