sootsim 0.1.63 → 0.1.65

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 (138) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-Z7M6NMR6.js → agent-44BHCTZA.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-C7OMZWTX.js → agent-wrapper-BEP5WHZR.js} +2 -2
  4. package/dist-cli/chunks/{assert-OB4RMGU6.js → assert-SKDEGGRD.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-SMQMN7WS.js +2 -0
  6. package/dist-cli/chunks/beta-DEQZ2J7G.js +2 -0
  7. package/dist-cli/chunks/{chunk-GW77VHPI.js → chunk-2EBGZC4A.js} +2 -2
  8. package/dist-cli/chunks/chunk-3HC3F7CO.js +3 -0
  9. package/dist-cli/chunks/{chunk-XILD5NPV.js → chunk-46OKLW3Z.js} +1 -1
  10. package/dist-cli/chunks/{chunk-LJ7SH2KY.js → chunk-5MMRIGC3.js} +2 -2
  11. package/dist-cli/chunks/chunk-5MRRLWSD.js +1 -0
  12. package/dist-cli/chunks/{chunk-B3644N6L.js → chunk-5ZB5ZN5Z.js} +47 -10
  13. package/dist-cli/chunks/{chunk-AMZB6WUA.js → chunk-6GZS5TCL.js} +2 -2
  14. package/dist-cli/chunks/chunk-B32KMMQV.js +2 -0
  15. package/dist-cli/chunks/chunk-CBRKFAOD.js +1 -0
  16. package/dist-cli/chunks/chunk-DLSOZVYM.js +1 -0
  17. package/dist-cli/chunks/chunk-E6CRWOWO.js +2 -0
  18. package/dist-cli/chunks/{chunk-EIKREDI4.js → chunk-ELZHT3LB.js} +2 -2
  19. package/dist-cli/chunks/{chunk-GICJIXEH.js → chunk-FPOQPEGK.js} +4 -4
  20. package/dist-cli/chunks/{chunk-PDMITY2P.js → chunk-FRANP4PR.js} +1 -1
  21. package/dist-cli/chunks/{chunk-IKFKEII6.js → chunk-FU33BTPL.js} +1 -1
  22. package/dist-cli/chunks/{chunk-76MTBJ24.js → chunk-GHFA4O5B.js} +1 -1
  23. package/dist-cli/chunks/{chunk-KX3FO4N4.js → chunk-GHTXP5R7.js} +3 -3
  24. package/dist-cli/chunks/{chunk-ENACZPKI.js → chunk-GZCZ4GCS.js} +2 -2
  25. package/dist-cli/chunks/{chunk-MTTIJQ64.js → chunk-HNXQ2JP6.js} +2 -2
  26. package/dist-cli/chunks/{chunk-VV265FEE.js → chunk-JC5L5ZJX.js} +2 -2
  27. package/dist-cli/chunks/{chunk-INXMOS35.js → chunk-KKOOZPQP.js} +1 -1
  28. package/dist-cli/chunks/{chunk-HPVO7FJA.js → chunk-L2SDB6G5.js} +2 -2
  29. package/dist-cli/chunks/{chunk-FEZCATWN.js → chunk-M4HI2THN.js} +2 -2
  30. package/dist-cli/chunks/{chunk-PX7QNGSM.js → chunk-MLPLYQGK.js} +3 -3
  31. package/dist-cli/chunks/{chunk-5OZ7M24R.js → chunk-MSBMGQJE.js} +2 -2
  32. package/dist-cli/chunks/{chunk-E2EPTSHO.js → chunk-NJ2ACA36.js} +2 -2
  33. package/dist-cli/chunks/{chunk-AUMMYIP5.js → chunk-NTEZEQSB.js} +2 -2
  34. package/dist-cli/chunks/{chunk-C6UT7L2J.js → chunk-O56DABNK.js} +2 -2
  35. package/dist-cli/chunks/{chunk-KRRNCL56.js → chunk-OTWUZRFZ.js} +2 -2
  36. package/dist-cli/chunks/{chunk-DYUOXUBI.js → chunk-P2C3JX3D.js} +1 -1
  37. package/dist-cli/chunks/{chunk-FSSJVHNV.js → chunk-PTUCXL7Y.js} +3 -3
  38. package/dist-cli/chunks/{chunk-4232ZQOX.js → chunk-R2QEABGZ.js} +44 -44
  39. package/dist-cli/chunks/{chunk-DFRQMFUV.js → chunk-S46M5JZP.js} +1 -1
  40. package/dist-cli/chunks/{chunk-PY25FDGX.js → chunk-TRHZBTPF.js} +1 -1
  41. package/dist-cli/chunks/{chunk-QW6P2JE2.js → chunk-TWKWXGN5.js} +1 -1
  42. package/dist-cli/chunks/{chunk-AYJGGZA4.js → chunk-U5EQ5RWL.js} +2 -2
  43. package/dist-cli/chunks/{chunk-A3UFHDMY.js → chunk-UH4H5HXN.js} +1 -1
  44. package/dist-cli/chunks/{chunk-NWHQG4PG.js → chunk-UHYZO26V.js} +2 -2
  45. package/dist-cli/chunks/chunk-UXFF7AEE.js +73 -0
  46. package/dist-cli/chunks/{chunk-SSTMIACF.js → chunk-VGQXIMEX.js} +1 -1
  47. package/dist-cli/chunks/{chunk-2TVSYU32.js → chunk-X2IIAIAP.js} +2 -2
  48. package/dist-cli/chunks/{chunk-T7H7BKA7.js → chunk-X75XFMI4.js} +2 -2
  49. package/dist-cli/chunks/{chunk-4OW4EPBS.js → chunk-ZW3HKMLQ.js} +2 -2
  50. package/dist-cli/chunks/cli-version-HH7DAYBK.js +2 -0
  51. package/dist-cli/chunks/{compat-2AFC4MFV.js → compat-MDZTV64M.js} +3 -3
  52. package/dist-cli/chunks/{config-KEEXBCOM.js → config-DRGNQOYL.js} +2 -2
  53. package/dist-cli/chunks/control-NCUWAXPH.js +2 -0
  54. package/dist-cli/chunks/{cpu-profile-RPSEEWCO.js → cpu-profile-JQAGHLDS.js} +2 -2
  55. package/dist-cli/chunks/{daemon-FCQLYFNH.js → daemon-3RT7EABW.js} +2 -2
  56. package/dist-cli/chunks/{debug-QSYUF4WZ.js → debug-CYINYNWV.js} +3 -3
  57. package/dist-cli/chunks/demo-app-registry-JGIZ7NN7.js +2 -0
  58. package/dist-cli/chunks/{detox-6PJOIC7Z.js → detox-DUABQYC6.js} +2 -2
  59. package/dist-cli/chunks/{device-H7GVARBE.js → device-KSSSQOQC.js} +2 -2
  60. package/dist-cli/chunks/{diagnose-H47FC64H.js → diagnose-NUDACXIR.js} +2 -2
  61. package/dist-cli/chunks/drivers-CKGMOVM4.js +2 -0
  62. package/dist-cli/chunks/{electron-54ZCOKJE.js → electron-LC3Y74FA.js} +3 -3
  63. package/dist-cli/chunks/flow-3AHNNHF7.js +2 -0
  64. package/dist-cli/chunks/{hints-V4VBWK3W.js → hints-EOARRVNB.js} +2 -2
  65. package/dist-cli/chunks/{home-paths-GUUGF76T.js → home-paths-HOBR3K3B.js} +2 -2
  66. package/dist-cli/chunks/{inspect-NDLLEBJK.js → inspect-QCZVODE6.js} +98 -98
  67. package/dist-cli/chunks/install-747G2O4S.js +2 -0
  68. package/dist-cli/chunks/{install-desktop-FBK4PRA3.js → install-desktop-W2OOILJG.js} +3 -3
  69. package/dist-cli/chunks/{keys-IWDHA2GT.js → keys-RR43E2O3.js} +2 -2
  70. package/dist-cli/chunks/{launch-MQEJM5XD.js → launch-GAPSA5HQ.js} +3 -3
  71. package/dist-cli/chunks/{login-FFLXNWYQ.js → login-IADXSJEW.js} +4 -4
  72. package/dist-cli/chunks/{logout-X4NH4PZG.js → logout-AT33MGA7.js} +2 -2
  73. package/dist-cli/chunks/{maestro-V3GTFFX6.js → maestro-G36ATKHQ.js} +2 -2
  74. package/dist-cli/chunks/{preview-YHY7IHFE.js → preview-BJUMMDBL.js} +2 -2
  75. package/dist-cli/chunks/{profile-CFYRAH3J.js → profile-CEQNS53P.js} +2 -2
  76. package/dist-cli/chunks/{react-L7NP2D6J.js → react-BPEDK3TN.js} +2 -2
  77. package/dist-cli/chunks/record-73CGQ3EP.js +50 -0
  78. package/dist-cli/chunks/runtime-QR5IHGKJ.js +2 -0
  79. package/dist-cli/chunks/{runtime-delivery-CWSGC6RY.js → runtime-delivery-IYK2HNPG.js} +2 -2
  80. package/dist-cli/chunks/{screenshot-FAPUEO63.js → screenshot-GUM2U2PN.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-QB7FVHYI.js → screenshot-mode-VUBCO7T2.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-XAB5UKQB.js → screenshots-JENURQSV.js} +2 -2
  83. package/dist-cli/chunks/{server-NLNCGLAT.js → server-PVAO3OA2.js} +2 -2
  84. package/dist-cli/chunks/setup-repo-ECVECJZQ.js +2 -0
  85. package/dist-cli/chunks/{skills-WBR5NZHN.js → skills-4JI327YS.js} +2 -2
  86. package/dist-cli/chunks/{start-3I5VJI3S.js → start-7YB4I5V5.js} +4 -4
  87. package/dist-cli/chunks/store-2MXXL4QE.js +2 -0
  88. package/dist-cli/chunks/telemetry-GIA7FIKW.js +2 -0
  89. package/dist-cli/chunks/{test-LD2RIFI2.js → test-5C6NYF62.js} +3 -3
  90. package/dist-cli/chunks/{three-mode-5GPHB6BR.js → three-mode-C6TE63VR.js} +2 -2
  91. package/dist-cli/chunks/{timeline-AOVC2P3F.js → timeline-NFYS6IPO.js} +2 -2
  92. package/dist-cli/chunks/{upgrade-CU3DMD2C.js → upgrade-KROEHYG2.js} +2 -2
  93. package/dist-cli/chunks/upload-OS3J5ZOS.js +2 -0
  94. package/dist-cli/chunks/{web-RNUV6WCK.js → web-UTOZ7MRF.js} +2 -2
  95. package/dist-cli/chunks/{what-happened-BSRVVJPQ.js → what-happened-FCP2U43H.js} +2 -2
  96. package/dist-cli/chunks/{whoami-ZAVHKQPY.js → whoami-O6XVOJBF.js} +2 -2
  97. package/dist-lib/agent-daemon-client.cjs +1 -1
  98. package/dist-lib/agent-events.cjs +1 -1
  99. package/dist-lib/agent-sessions.cjs +1 -1
  100. package/dist-lib/attached-projects.cjs +1 -1
  101. package/dist-lib/auth/shared-session.cjs +1 -1
  102. package/dist-lib/backend-origin.cjs +1 -1
  103. package/dist-lib/bridge-constants.cjs +1 -1
  104. package/dist-lib/cli-constants.cjs +1 -1
  105. package/dist-lib/config.cjs +1 -1
  106. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  107. package/dist-lib/home-paths.cjs +1 -1
  108. package/dist-lib/host/bridge-host.cjs +1 -1
  109. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  110. package/dist-lib/host/fetch-proxy-overrides.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 +1 -1
  116. package/dist-lib/vite.cjs +1 -1
  117. package/package.json +1 -1
  118. package/dist-cli/chunks/auto-bootstrap-JF7VEKGP.js +0 -2
  119. package/dist-cli/chunks/beta-SZGXUHPX.js +0 -2
  120. package/dist-cli/chunks/chunk-4H3UC4KB.js +0 -3
  121. package/dist-cli/chunks/chunk-7RZWW5VK.js +0 -66
  122. package/dist-cli/chunks/chunk-CAFGDFEU.js +0 -1
  123. package/dist-cli/chunks/chunk-DAO2KA4O.js +0 -1
  124. package/dist-cli/chunks/chunk-SOKY5FGT.js +0 -1
  125. package/dist-cli/chunks/chunk-U42HSSAI.js +0 -2
  126. package/dist-cli/chunks/chunk-WCMYVXHS.js +0 -2
  127. package/dist-cli/chunks/cli-version-BB3PGPZA.js +0 -2
  128. package/dist-cli/chunks/control-PI6FRLTV.js +0 -2
  129. package/dist-cli/chunks/demo-app-registry-SDP4RWXB.js +0 -2
  130. package/dist-cli/chunks/drivers-BFET7Y5U.js +0 -2
  131. package/dist-cli/chunks/flow-JC7BTILV.js +0 -2
  132. package/dist-cli/chunks/install-AXZ4MKSG.js +0 -2
  133. package/dist-cli/chunks/record-36R7J2BU.js +0 -45
  134. package/dist-cli/chunks/runtime-L2E4XOOB.js +0 -2
  135. package/dist-cli/chunks/setup-repo-XGSB77UN.js +0 -2
  136. package/dist-cli/chunks/store-3LACO57B.js +0 -2
  137. package/dist-cli/chunks/telemetry-6QW73WDZ.js +0 -2
  138. package/dist-cli/chunks/upload-32RTWBK5.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{J as F,w as S,x as k,y as g}from"./chunk-B3644N6L.js";import{c as b,e as y}from"./chunk-4OW4EPBS.js";import{b as w}from"./chunk-SSTMIACF.js";import"./chunk-U42HSSAI.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";function M(t){let e=[];for(let n=0;n<t.length;n++)if(t[n]==="--since"&&n+1<t.length){e.push(n,n+1);let s=t[n+1].trim(),a=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(a){let l=Number(a[1]),u=a[2]??"ms",r=u==="s"?l*1e3:u==="m"?l*6e4:l;return{since:Date.now()-r,consumed:e}}let o=Number(s);if(Number.isFinite(o)&&o>1e12)return{since:o,consumed:e}}return{consumed:e}}function E(t){let e=[];for(let n=0;n<t.length;n++)if(t[n]==="--kinds"&&n+1<t.length)return e.push(n,n+1),{kinds:t[n+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:e};return{consumed:e}}function C(t){let e=[];for(let n=0;n<t.length;n++)if(t[n]==="--limit"&&n+1<t.length){e.push(n,n+1);let s=Number(t[n+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:e}}return{consumed:e}}function _(t,e){if(e===null)return new Date(t).toLocaleTimeString();let n=(t-e)/1e3;return`${n>=0?"+":""}${n.toFixed(2)}s`}function j(t,e){switch(t){case"app-launch":return e.phase==="launch"?`launch ${e.appName??e.toAppId??""}`:`dismiss ${e.appName??e.fromAppId??""} \u2192 ${e.toAppId??""}`;case"toast":return`"${e.text??""}"${e.durationMs?` (${e.durationMs}ms)`:""}`;case"keyboard":return`${e.phase??"?"}${e.heightPx?` h=${e.heightPx}`:""}${e.mode?` ${e.mode}`:""}`;case"screen":return`${e.phase??"?"} ${e.name??e.activeName??""}`;case"route":return`${e.phase??"?"} ${e.path??e.pathname??""}`;case"alert":case"actionsheet":case"picker":return`${e.phase??"?"} ${e.title??e.message??""}`;case"notification":return`${e.title??""}${e.body?` \u2014 ${e.body}`:""}`;case"fetch":return`${e.method??"GET"} ${e.url??""}${e.status?` -> ${e.status}`:""}`;case"console":return`${e.level??"log"}: ${(e.message??"").toString().slice(0,120)}`;case"shell":return`${e.event??e.type??e.phase??""}`;case"scroll":return`${e.phase??"?"} ${e.target??""}`;case"gesture":return`${e.phase??"?"} ${e.type??""}`;case"text-input":return`${e.phase??"?"}${e.value!==void 0?` "${String(e.value).slice(0,40)}"`:""}`;case"react-commit":{let n=e.slowest;return`${e.fiberCount??"?"} fibers ${e.durationMs??"?"}ms${n?.displayName?` \xB7 ${n.displayName} ${n.durationMs??"?"}ms`:""}`}case"reanimated":case"animation":return`${e.kind??""} ${e.target??""}${e.durationMs?` ${e.durationMs}ms`:""}`}}function N(t,e){let n=_(t.t,e).padStart(8),s=t.context.padEnd(6),a=`[${t.kind}]`.padEnd(15),o="",l=t.data;return l&&typeof l=="object"&&(o=j(t.kind,l)),` ${n} ${s} ${a} ${o}`}function T(t){let e=[],n={label:"initial state",events:[],startedAt:t[0]?.t??null};e.push(n);for(let s of t)if(n.events.push(s),s.kind==="screen"||s.kind==="route"){let a=s.data,o=a?.phase;if(!o||o==="enter"||o==="appear"||o==="active"){let l=a?.name||a?.activeName||a?.path||a?.pathname||s.kind;e.length===1&&n.events.length===1?n.label=`${s.kind}: ${l}`:(n={label:`${s.kind}: ${l}`,events:[],startedAt:s.t},e.push(n))}}return e}async function O(t,e){let n=b(t,{port:e.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow"],stripValueFlags:["--since","--kinds","--limit"]});(t.includes("--help")||t.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{K as F,x as S,y as k,z as g}from"./chunk-5ZB5ZN5Z.js";import{c as b,e as y}from"./chunk-ZW3HKMLQ.js";import{b as w}from"./chunk-VGQXIMEX.js";import"./chunk-E6CRWOWO.js";import"./chunk-TWKWXGN5.js";import"./chunk-KKOOZPQP.js";function M(t){let e=[];for(let n=0;n<t.length;n++)if(t[n]==="--since"&&n+1<t.length){e.push(n,n+1);let s=t[n+1].trim(),a=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(a){let l=Number(a[1]),u=a[2]??"ms",r=u==="s"?l*1e3:u==="m"?l*6e4:l;return{since:Date.now()-r,consumed:e}}let o=Number(s);if(Number.isFinite(o)&&o>1e12)return{since:o,consumed:e}}return{consumed:e}}function E(t){let e=[];for(let n=0;n<t.length;n++)if(t[n]==="--kinds"&&n+1<t.length)return e.push(n,n+1),{kinds:t[n+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:e};return{consumed:e}}function C(t){let e=[];for(let n=0;n<t.length;n++)if(t[n]==="--limit"&&n+1<t.length){e.push(n,n+1);let s=Number(t[n+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:e}}return{consumed:e}}function _(t,e){if(e===null)return new Date(t).toLocaleTimeString();let n=(t-e)/1e3;return`${n>=0?"+":""}${n.toFixed(2)}s`}function j(t,e){switch(t){case"app-launch":return e.phase==="launch"?`launch ${e.appName??e.toAppId??""}`:`dismiss ${e.appName??e.fromAppId??""} \u2192 ${e.toAppId??""}`;case"toast":return`"${e.text??""}"${e.durationMs?` (${e.durationMs}ms)`:""}`;case"keyboard":return`${e.phase??"?"}${e.heightPx?` h=${e.heightPx}`:""}${e.mode?` ${e.mode}`:""}`;case"screen":return`${e.phase??"?"} ${e.name??e.activeName??""}`;case"route":return`${e.phase??"?"} ${e.path??e.pathname??""}`;case"alert":case"actionsheet":case"picker":return`${e.phase??"?"} ${e.title??e.message??""}`;case"notification":return`${e.title??""}${e.body?` \u2014 ${e.body}`:""}`;case"fetch":return`${e.method??"GET"} ${e.url??""}${e.status?` -> ${e.status}`:""}`;case"console":return`${e.level??"log"}: ${(e.message??"").toString().slice(0,120)}`;case"shell":return`${e.event??e.type??e.phase??""}`;case"scroll":return`${e.phase??"?"} ${e.target??""}`;case"gesture":return`${e.phase??"?"} ${e.type??""}`;case"text-input":return`${e.phase??"?"}${e.value!==void 0?` "${String(e.value).slice(0,40)}"`:""}`;case"react-commit":{let n=e.slowest;return`${e.fiberCount??"?"} fibers ${e.durationMs??"?"}ms${n?.displayName?` \xB7 ${n.displayName} ${n.durationMs??"?"}ms`:""}`}case"reanimated":case"animation":return`${e.kind??""} ${e.target??""}${e.durationMs?` ${e.durationMs}ms`:""}`}}function N(t,e){let n=_(t.t,e).padStart(8),s=t.context.padEnd(6),a=`[${t.kind}]`.padEnd(15),o="",l=t.data;return l&&typeof l=="object"&&(o=j(t.kind,l)),` ${n} ${s} ${a} ${o}`}function T(t){let e=[],n={label:"initial state",events:[],startedAt:t[0]?.t??null};e.push(n);for(let s of t)if(n.events.push(s),s.kind==="screen"||s.kind==="route"){let a=s.data,o=a?.phase;if(!o||o==="enter"||o==="appear"||o==="active"){let l=a?.name||a?.activeName||a?.path||a?.pathname||s.kind;e.length===1&&n.events.length===1?n.label=`${s.kind}: ${l}`:(n={label:`${s.kind}: ${l}`,events:[],startedAt:s.t},e.push(n))}}return e}async function O(t,e){let n=b(t,{port:e.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow"],stripValueFlags:["--since","--kinds","--limit"]});(t.includes("--help")||t.includes("-h"))&&(console.log(`
3
3
  sootsim what-happened \u2014 show recent events from the semantic timeline
4
4
 
5
5
  usage:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as i}from"./chunk-NWHQG4PG.js";import{d as n}from"./chunk-GW77VHPI.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";async function u(){let o=i();if(o||(console.log(" not signed in"),console.log(" set SOOTSIM_API_KEY=sk_sootsim_\u2026 or run `sootsim login`"),process.exit(1)),o.kind==="api-key"){let r=`${o.secret.slice(0,14)}\u2026`,t=o.source==="env"?"SOOTSIM_API_KEY env var":"saved key (~/.config/sootsim/credentials.json)";console.log(` api key ${r}`),console.log(` source: ${t}`);return}if(o.kind==="github"){console.log(` github token (${o.source})`),console.log(` repo: ${o.repoId}`);return}let e=await n(),s=e?.user;console.log(` ${s?.email||s?.name||s?.id||"signed in"}`),console.log(` origin: ${e?.origin??o.origin}`),e?.updatedAt&&console.log(` updated: ${e.updatedAt}`)}export{u as runWhoami};
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as i}from"./chunk-UHYZO26V.js";import{d as n}from"./chunk-2EBGZC4A.js";import"./chunk-TWKWXGN5.js";import"./chunk-KKOOZPQP.js";async function u(){let o=i();if(o||(console.log(" not signed in"),console.log(" set SOOTSIM_API_KEY=sk_sootsim_\u2026 or run `sootsim login`"),process.exit(1)),o.kind==="api-key"){let r=`${o.secret.slice(0,14)}\u2026`,t=o.source==="env"?"SOOTSIM_API_KEY env var":"saved key (~/.config/sootsim/credentials.json)";console.log(` api key ${r}`),console.log(` source: ${t}`);return}if(o.kind==="github"){console.log(` github token (${o.source})`),console.log(` repo: ${o.repoId}`);return}let e=await n(),s=e?.user;console.log(` ${s?.email||s?.name||s?.id||"signed in"}`),console.log(` origin: ${e?.origin??o.origin}`),e?.updatedAt&&console.log(` updated: ${e.updatedAt}`)}export{u as runWhoami};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.65 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sootsim",
3
- "version": "0.1.63",
3
+ "version": "0.1.65",
4
4
  "description": "sootsim CLI + vite/metro plugins + skills registry. bridge client for driving the proprietary sootsim-engine over WebSocket.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "MIT",
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d}from"./chunk-FSSJVHNV.js";import"./chunk-4OW4EPBS.js";import"./chunk-SSTMIACF.js";import"./chunk-U42HSSAI.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d,e}from"./chunk-XILD5NPV.js";import"./chunk-INXMOS35.js";export{e as BETA_ASK_HEADLINE,c as BETA_LABEL,d as BETA_TAGLINE,b as BETA_VERSION_TARGET,a as IS_BETA};
@@ -1,3 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as v,i as h,j as b,k as T,l as y}from"./chunk-B3644N6L.js";import{d as f,h as M,i as R}from"./chunk-4OW4EPBS.js";var B={timeoutMs:1800,settleMs:48,startWindowMs:64};function p(e){return new Promise(t=>setTimeout(t,e))}function k(e){return e.includes("--json")}function D(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
3
- `)}async function I(e,t,...r){return M(e,`__sootsimTest.${t}`,...r)}async function x(e,t,...r){return R(e,`SootSim.bridges.mainShell.${t}`,...r)}async function _(e,t={}){try{let r=await I(e,"waitForScreenTransitions",B);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function P(e,t,r,...n){let i=Date.now()+Math.max(0,r);for(;;)try{return await x(e,t,...n)}catch(o){if(!v(o)||Date.now()>=i)throw o;await p(50)}}async function A(e,t,r,n={}){let i=n.attempts??30,o=n.intervalMs??500,d=n.minNodeCount??10;for(let s=0;s<i;s++){let u=f(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let a=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof a=="number"&&a>d)return{bridge:u,count:a}}catch{}u.close(),await p(o)}return null}async function E(e,t,r,n={}){let i=n.timeoutMs??8e3,o=n.intervalMs??250,d=Date.now()+i;for(;Date.now()<d;){let s=f(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await s.send({type:"evaluate",code:"1"}),s}catch{s.close()}await p(o)}return null}async function F(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,i=t.pollIntervalMs??200,o=Date.now(),d=o+r,s=-1,u=o,a={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,errors:0};for(;Date.now()<d;){try{let m=await e.send({type:"evaluate",code:h}),c=Date.now()-o,l=Number(m?.nodes)||0,w=Number(m?.targets)||0,g=Number(m?.errors)||0,S=m?.flag===!0;if(l!==s&&(s=l,u=c),a={ready:!1,source:"timeout",elapsedMs:c,nodes:l,targets:w,errors:g},S&&l>=b&&y({nodes:l,targets:w})&&c-u>=T)return{ready:!0,source:"flag",elapsedMs:c,nodes:l,targets:w,errors:g};if(c>=n&&g>0&&!S)return{ready:!1,source:"error-bail",elapsedMs:c,nodes:l,targets:w,errors:g}}catch{}await p(i)}return a.nodes>=b&&y(a)?{...a,ready:!0,source:"nodes-fallback"}:{...a,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}export{p as a,k as b,D as c,I as d,_ as e,P as f,A as g,E as h,F as i};
@@ -1,66 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as Q,e as X}from"./chunk-NWHQG4PG.js";import{d as K}from"./chunk-A3UFHDMY.js";import{a as J,b as m}from"./chunk-VV265FEE.js";import{a as D}from"./chunk-GW77VHPI.js";import{c as q,e as Y,g as v}from"./chunk-4OW4EPBS.js";import{createHash as Te}from"crypto";import{readFileSync as te}from"fs";import{gzipSync as ne}from"zlib";function Z(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}function H(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function be(e){let t=H(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${r.status}: ${s.slice(0,200)}`)}}async function we(e,t=8,r){let s=0,o=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;s<a;){let u=e[s++];await be(u),o++,r?.(o,a)}}))}function ve(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let a of e.files){let u=r.get(a.urlhash);u&&o.push({url:a.putUrl,contentType:a.contentType,bytes:u})}return e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.flowVideo&&s?.videoBytes&&o.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&o.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),o}function Be(e){return e.replace(/\/+$/,"")}var _=class extends Error{constructor(r,s,o,a=""){super(r);this.status=s;this.phase=o;this.responseText=a;this.name="PresignedUploadError"}};async function ee(e){let t=Be(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let s=H(3e4,"init"),o;try{o=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!o.ok){let h=await o.text().catch(()=>"");throw new _(`init failed: ${o.status} ${h.slice(0,200)}`,o.status,"init",h)}let a=await o.json(),u=ve(a,e.bundleBytes,e.filesByHash,e.extras);await we(u,e.concurrency??8,e.onPutProgress);let b=H(3e4,"finalize"),p;try{p=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:b.signal})}finally{b.cancel()}if(!p.ok){let h=await p.text().catch(()=>"");throw new _(`finalize failed: ${p.status} ${h.slice(0,200)}`,p.status,"finalize",h)}let P=await p.json();return{init:a,finalize:P}}function Ie(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}var ie=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",ae=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",M="http://localhost:3000";async function Ue(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${M}/api/preview/upload/init`,{method:"OPTIONS"});if(t.ok||t.status===204||t.status===405)return M}catch{}return ie}function B(e){return e.replace(/\/$/,"")}function Pe(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function xe(e){try{let t=new URL(e).hostname.toLowerCase();return t==="sootbean.com"||t.endsWith(".sootbean.com")}catch{return!1}}function Se(e,t){return t?B(t):process.env.SOOTSIM_PREVIEW_ORIGIN?B(process.env.SOOTSIM_PREVIEW_ORIGIN):Pe(e)?B(e):xe(e)?B(ae):B(e)}function Oe(){console.log(`
3
- sootsim upload \u2014 publish the current bundle as a /preview/<id> link
4
-
5
- usage:
6
- sootsim upload [--origin <url>] [--public-origin <url>] [--events <path>] [--sim <sim>] [--open] [--assets-only]
7
-
8
- options:
9
- --origin <url> upload target (default: auto)
10
- prefers ${M} when available, otherwise
11
- falls back to ${ie}
12
- override with SOOTSIM_UPLOAD_ORIGIN env var
13
- --public-origin <url>
14
- public /preview link origin (default: ${ae}
15
- for prod uploads, upload origin for localhost/custom origins).
16
- override with SOOTSIM_PREVIEW_ORIGIN env var
17
- --events <path> path to a gzipped events .jsonl.gz file to attach
18
- --video <path> path to a webm/mp4/gif flow recording. embedded inline
19
- in the pr sticky comment served at
20
- /api/preview/flow-video?id=<share-id>
21
- --video-duration-ms <ms>
22
- duration hint for attached flow video
23
- --sim <sim> target a specific sim (see: sootsim list)
24
- --open open the resulting /preview/<id> url in the browser
25
- --assets-only drop API/JSON/HTML records before upload; keep images,
26
- fonts, css, js, and binary blobs. live-data demos hit
27
- the real network at replay time instead of serving
28
- recorded API snapshots
29
- -h, --help
30
-
31
- examples:
32
- sootsim upload
33
- sootsim upload --origin http://localhost:3000 --open
34
- sootsim upload --events ./my-session.jsonl.gz
35
- sootsim upload --video /tmp/soot-flow.webm
36
- `)}function U(e,t){let r=e.findIndex(o=>o===t);if(r<0)return;let s=e[r+1];return e.splice(r,2),s}function re(e,t){let r=e.findIndex(s=>s===t);return r<0?!1:(e.splice(r,1),!0)}function se(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!!(t.startsWith("image/")||t.startsWith("font/")||t.startsWith("video/")||t.startsWith("audio/")||t.startsWith("model/")||t==="text/css"||t==="application/javascript"||t==="text/javascript"||t==="application/wasm"||t==="application/font-woff"||t==="application/font-woff2"||t==="application/octet-stream"):!1}async function oe(e){let t=await fetch(e);if(!t.ok)throw new Error(`fetch ${e} -> ${t.status} ${t.statusText}`);return new Uint8Array(await t.arrayBuffer())}function $e(e){return/\.bundle($|\?)/.test(e)||/\.js($|\?)/.test(e)?"application/javascript":/\.zip($|\?)/.test(e)?"application/zip":"application/javascript"}function Re(e){try{let t=new URL(e);return t.searchParams.get("lazy")==="true"?(t.searchParams.set("lazy","false"),t.toString()):e}catch{return e}}async function _e(e,t){let s=[];for(let o=0;o<t;o+=15e5){let a=Math.min(o+15e5,t),u=await v(e,`(window.__sootsimLastTransformedBundle?.text || "").slice(${o}, ${a})`);if(typeof u!="string")return null;s.push(u)}return s.join("")}async function Ve(e,t){(e.includes("--help")||e.includes("-h"))&&(Oe(),process.exit(0));let r=[...e],s=await Ue(U(r,"--origin")),o=Se(s,U(r,"--public-origin")),a=U(r,"--events"),u=U(r,"--video"),b=U(r,"--video-duration-ms"),p=re(r,"--open"),P=re(r,"--assets-only"),h=q(r,{stripBooleanFlags:[],stripValueFlags:[]}),w=Y(h),l,C=[],g=[],z=null;try{if(l=await v(w,'(typeof window.__sootsimCaptureBundle === "function") ? window.__sootsimCaptureBundle() : null'),l?.bundleUrl){let n=new URL(l.bundleUrl).origin;C=(await v(w,`(window.__sootsimPreviewRecorder?.list?.(${JSON.stringify(n)}) || [])`)).filter(T=>{try{return!new URL(T.url).pathname.startsWith("/api/")}catch{return!0}});let i=await v(w,`(() => {
37
- const rec = window.__sootsimPreviewRecorder
38
- if (!rec?.list) return null
39
- const all = rec.list()
40
- const cross = all.filter((e) => {
41
- try { return new URL(e.url).origin !== ${JSON.stringify(n)} } catch { return false }
42
- })
43
- return {
44
- count: cross.length,
45
- totalBytes: cross.reduce((n, e) => n + (e.size || 0), 0),
46
- }
47
- })()`);if(i&&i.count>0&&(console.log(` ${i.count} recorded cross-origin responses (${(i.totalBytes/1024).toFixed(1)} KiB)`),g=await v(w,`(() => {
48
- const rec = window.__sootsimPreviewRecorder
49
- if (!rec?.dump) return []
50
- const bundleUrl = ${JSON.stringify(l.bundleUrl)}
51
- return rec.dump().filter((r) => {
52
- try {
53
- const u = new URL(r.url)
54
- if (u.origin !== ${JSON.stringify(n)}) return true
55
- // bundle-origin api responses came from the rewritten
56
- // /__app-api proxy at record time (re-keyed by the
57
- // recorder's unwrap step). they need bodies attached the
58
- // same way as cross-origin records \u2014 direct re-fetch from
59
- // the dev server lacks the bundle's session cookies.
60
- if (r.url !== bundleUrl && u.pathname.startsWith('/api/')) return true
61
- return false
62
- } catch { return false }
63
- })
64
- })()`),P)){let T=g.length;g=g.filter(I=>se(I.contentType));let F=i.totalBytes-g.reduce((I,R)=>I+(R.size||0),0);console.log(` --assets-only: kept ${g.length}/${T} records (dropped ${(F/1024).toFixed(1)} KiB of API responses)`)}}l?.transformedBundle&&(z=await _e(w,l.transformedBundle.byteLength))}finally{w.close()}l||(console.error(" could not read bundle snapshot \u2014 is sootsim running and is the bundle loaded?"),process.exit(2)),l.bundleUrl||(console.error(` no ?bundle= URL on the current sootsim tab.
65
- open the app you want to share first (e.g. sootsim open 8082), then run upload.`),process.exit(2));let d,A=!1;if(z!==null)d=new TextEncoder().encode(z),A=!0,console.log(` using post-transform bundle: ${(d.byteLength/1024).toFixed(1)} KiB`);else{let n=Re(l.bundleUrl);n!==l.bundleUrl&&console.log(" forcing lazy=false for self-contained bundle"),console.log(` capturing: ${n}`),d=await oe(n),console.log(` main bundle: ${(d.byteLength/1024).toFixed(1)} KiB`)}let x=C.filter(n=>n.url!==l.bundleUrl);P&&(x=x.filter(n=>se(n.contentType))),console.log(` fetching ${x.length} extra files\u2026`);let S=(await Promise.all(x.map(async n=>{try{let i=await oe(n.url);return{...n,bytes:i}}catch(i){return console.error(` warning: failed to re-fetch ${n.url}: ${i instanceof Error?i.message:i}`),null}}))).filter(n=>!!n),le=S.reduce((n,i)=>n+i.bytes.byteLength,0);console.log(` ${S.length} extra files: ${(le/1024).toFixed(1)} KiB`);let y;a&&(y=te(a));let f,O,N;if(u){if(f=te(u),O=u.endsWith(".mp4")?"video/mp4":u.endsWith(".gif")?"image/gif":"video/webm",b){let n=Number(b);(!Number.isFinite(n)||n<=0)&&(console.error(` invalid --video-duration-ms: ${b}`),await m(),process.exit(1)),N=Math.round(n)}console.log(` attaching flow video: ${(f.byteLength/1024).toFixed(1)} KiB (${O})`)}let c=Q(),ue=D();J({event:"preview_upload_started",identity:{userId:c?.kind==="session"?ue?.user?.id??null:null,repoId:c?.kind==="github"?c.repoId:null,installationId:c?.kind==="github"?c.installationId??null:null},properties:{origin:s,hasAuth:!!c,authMode:c?.kind??"none",bundleBytes:d.byteLength,isTransformed:A,extraFiles:S.length,recordedFetches:g.length,hasEvents:!!y,hasVideo:!!f}}),c||(console.error(" preview uploads need auth."),console.error(" set SOOTSIM_API_KEY=sk_sootsim_..., run `sootsim login`, or use the soot github runner."),await m(),process.exit(1));let ce=X(c),de=(()=>{try{return new URL(l.bundleUrl).origin}catch{return null}})(),W=(n,i,T,F,I,R,ye)=>{let V=Z(R),me=V?ne(n):n;return{url:i,urlhash:T,method:F,bodyHash:I,contentType:R,responseHeaders:ye,bytes:me,encoding:V?"gzip":void 0}},E=[...S.map(n=>W(n.bytes,n.url,n.urlhash,"GET","-",n.contentType,n.responseHeaders)),...g.map(n=>W(Buffer.from(n.bodyBase64,"base64"),n.url,n.urlhash,n.method||"GET",n.bodyHash||"-",n.contentType,n.responseHeaders))],L=ne(d),pe=Te("sha256").update(d).digest("hex");console.log(` bundle raw=${(d.byteLength/1024).toFixed(1)} KiB gz=${(L.byteLength/1024).toFixed(1)} KiB`);let ge={contentHash:pe,bundleSizeBytes:d.byteLength,bundleContentType:$e(l.bundleUrl),bundleEncoding:"gzip",bundleOrigin:de,entry:l.entry,isTransformed:A,deviceSpec:l.deviceSpec,installationId:c.kind==="github"?c.installationId??void 0:void 0,repoId:c.kind==="github"?c.repoId:void 0,files:E.map(n=>({url:n.url,urlhash:n.urlhash,method:n.method,bodyHash:n.bodyHash,contentType:n.contentType,responseHeaders:n.responseHeaders,encoding:n.encoding,sizeBytes:n.bytes.byteLength})),events:y?{sizeBytes:y.byteLength}:void 0,flowVideo:f&&O?{sizeBytes:f.byteLength,contentType:O,durationMs:N}:void 0},j=new Map;for(let n of E)j.set(n.urlhash,n.bytes);let fe=Date.now(),$=L.byteLength;for(let n of E)$+=n.bytes.byteLength;y&&($+=y.byteLength),f&&($+=f.byteLength);let he=`${B(s)}/api/preview/upload/init`;console.log(` init: ${he}`);let k;try{let n=await ee({originBase:s,initBody:ge,bundleBytes:L,filesByHash:j,extras:{eventsBytes:y,videoBytes:f},authHeader:ce,concurrency:16});k=n.finalize;let i=1+n.init.files.length+(n.init.events?1:0)+(n.init.flowVideo?1:0);console.log(` PUT ${i} objects in ${Date.now()-fe}ms (${($/1024).toFixed(1)} KiB)`)}catch(n){let i=n;i.phase==="init"&&i.status===401&&(console.error(" preview upload requires a valid login."),console.error(" run `sootsim login` and retry."),await m(),process.exit(1)),i.status===402&&(console.error(` ${Ie(i.responseText)??"preview uploads require Personal, Team, or an active trial \u2014 upgrade from the billing dialog."}`),await m(),process.exit(1)),console.error(` ${i.message??`${i.phase??"upload"} failed: ${String(n)}`}`),await m(),process.exit(1)}let G=`${o}${k.url}`;console.log(`
66
- stored ${k.filesStored??0} extra files`),console.log(` preview: ${G}`),p&&await K(G),await m()}export{Ue as a,Se as b,Ve as c};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- var O="sootsim close";export{O as a};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- var t="http://localhost:5173/";export{t as a};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-DYUOXUBI.js";import"./chunk-INXMOS35.js";export{a as getCliVersion};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o}from"./chunk-GICJIXEH.js";import"./chunk-C6UT7L2J.js";import"./chunk-PY25FDGX.js";import"./chunk-B3644N6L.js";import"./chunk-AMZB6WUA.js";import"./chunk-AUMMYIP5.js";import"./chunk-IKFKEII6.js";import"./chunk-CAFGDFEU.js";import"./chunk-EIKREDI4.js";import"./chunk-A3UFHDMY.js";import"./chunk-WCMYVXHS.js";import"./chunk-4OW4EPBS.js";import"./chunk-SSTMIACF.js";import"./chunk-U42HSSAI.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";export{d as buildOpenUrl,c as buildShellUrl,n as planBulkCloseTargets,h as playwrightHostPidForSim,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,m as runClaimCommand,o as runCloseCommand,l as runFocusCommand,i as runListCommand,j as runOpenCommand,k as runUseCommand,e as summarizeSimUrl,g as waitForSimMatch};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-AMZB6WUA.js";import"./chunk-INXMOS35.js";export{a as APPS};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-DAO2KA4O.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-AUMMYIP5.js";import"./chunk-IKFKEII6.js";import"./chunk-CAFGDFEU.js";import"./chunk-EIKREDI4.js";import"./chunk-A3UFHDMY.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as c,b as d,c as e,d as f}from"./chunk-KX3FO4N4.js";import"./chunk-FEZCATWN.js";import"./chunk-SOKY5FGT.js";import"./chunk-MTTIJQ64.js";import"./chunk-7RZWW5VK.js";import"./chunk-NWHQG4PG.js";import{d as a,e as b}from"./chunk-5OZ7M24R.js";import"./chunk-GICJIXEH.js";import"./chunk-C6UT7L2J.js";import"./chunk-PY25FDGX.js";import"./chunk-B3644N6L.js";import"./chunk-AMZB6WUA.js";import"./chunk-AUMMYIP5.js";import"./chunk-IKFKEII6.js";import"./chunk-CAFGDFEU.js";import"./chunk-EIKREDI4.js";import"./chunk-A3UFHDMY.js";import"./chunk-ENACZPKI.js";import"./chunk-WCMYVXHS.js";import"./chunk-VV265FEE.js";import"./chunk-GW77VHPI.js";import"./chunk-KRRNCL56.js";import"./chunk-AYJGGZA4.js";import"./chunk-4OW4EPBS.js";import"./chunk-SSTMIACF.js";import"./chunk-U42HSSAI.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as o}from"./chunk-HPVO7FJA.js";import"./chunk-PDMITY2P.js";import"./chunk-FSSJVHNV.js";import"./chunk-VV265FEE.js";import"./chunk-GW77VHPI.js";import"./chunk-4OW4EPBS.js";import"./chunk-SSTMIACF.js";import"./chunk-U42HSSAI.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.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,45 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as C}from"./chunk-MTTIJQ64.js";import"./chunk-7RZWW5VK.js";import{d as K}from"./chunk-NWHQG4PG.js";import"./chunk-CAFGDFEU.js";import{d as q}from"./chunk-A3UFHDMY.js";import"./chunk-VV265FEE.js";import"./chunk-GW77VHPI.js";import{c as g,e as w}from"./chunk-4OW4EPBS.js";import{b as H}from"./chunk-SSTMIACF.js";import"./chunk-U42HSSAI.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";import{existsSync as ue,mkdirSync as k,readdirSync as me,readFileSync as fe,rmSync as W,writeFileSync as U}from"fs";import{homedir as pe,tmpdir as ge}from"os";import{dirname as P,extname as Q,join as I,resolve as we}from"path";var X=6e4,he=3e4;async function N(e,r,o,i){let t=Math.max(2e4,i+he);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
- 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","prelude-start"]);function ye(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){be.has(o)&&r++;continue}return ve.has(o)?{name:o,index:r}:null}return null}async function De(e,r){let o=ye(e);if(o){let a=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await ke(a,r);return}if(o.name==="prelude-start"){await Oe(a,r);return}if(o.name==="stop"){await Ue(a,r);return}if(o.name==="cancel"){await Me(a,r);return}await Be(a,r);return}let i=g(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin"]}),t=ee(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"),d=Number(u(e,"--duration")??"10");(!Number.isFinite(d)||d<=0)&&(console.error(` invalid --duration "${u(e,"--duration")}" \u2014 expected a positive number of seconds`),process.exit(1));let l=1800;d>l&&(console.error(` invalid --duration "${u(e,"--duration")}" \u2014 exceeds the ${l}s (30m) maximum`),process.exit(1));let h=Number(u(e,"--fps")??"30"),b=u(e,"--frames");if(b!==void 0){let a=Number(b);(!Number.isInteger(a)||a<=0)&&(console.error(` invalid --frames "${b}" \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(d*1e3)),de=u(e,"--origin");if(t==="live"||t==="combined"){c&&console.log(` note: --output is ignored for --mode ${t} \u2014 the recording uploads to /preview/<id>`),n&&t==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await C("record",{originOverride:de,allowGitHubAuth:!0});let a=w({...i,commandTimeoutMs:6e4});try{await G(a),await re(a,t),await te(a),await ne(a,t,t==="combined"?n:void 0)||(console.error(` start failed: recording store refused to start (${t})`),process.exit(1)),console.log(` recording ${t} for ${d}s`),await new Promise(R=>setTimeout(R,f)),await ie(a);let x=await se(a);ae(x,V,t)}finally{a.close()}return}let E=b?Number(b):null,$=Re(s,c,E);V&&console.log(" note: --open is ignored for local-file capture \u2014 it applies to --mode live/combined");let v=w({...i,commandTimeoutMs:6e4});try{if(await Y(v),$==="png"){let S=E??10,p=M(c,`sootsim-frames-${B()}`);c&&Q(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(I(p,m),{force:!0});console.log(` sampling ${S} frames over ${d}s \u2192 ${p}`);let y=await v.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${S}, durationMs: ${f}${n?`, layers: ${JSON.stringify(n)}`:""} })`});(!y.ok||!y.requestId)&&(console.error(` frame capture start failed: ${y.error??"unknown error"}`),process.exit(1)),await new Promise(m=>setTimeout(m,f));let ce=Date.now()+Math.max(5e3,f),F=null;for(;;){let m=await v.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${y.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)),F=m.frames??[];break}Date.now()>=ce&&(console.error(" frame capture timed out"),process.exit(1)),await new Promise(T=>setTimeout(T,100))}F.forEach((m,T)=>{let le=`${p}/frame-${String(T+1).padStart(3,"0")}.png`;U(le,Buffer.from(m.data,"base64"))}),console.log(` saved ${F.length} frames`);return}if($==="gif"){let S=E??Math.max(10,Math.round(d*h/3)),p=M(c,`sootsim-${B()}.gif`);k(P(p),{recursive:!0}),console.log(` encoding gif: ${S} frames over ${d}s \u2192 ${p}`);let y=await N(v,`window.__sootsimRecorder.captureGif({ frames: ${S}, durationMs: ${f}${j?`, maxWidth: ${j}`:""}${n?`, layers: ${JSON.stringify(n)}`:""} })`,"gif encode",f);y||(console.error(" gif capture returned no frames"),process.exit(1)),U(p,Buffer.from(y.data,"base64")),console.log(` saved: ${p} (${D(y.size)})`);return}let a=M(c,`sootsim-${B()}.${$}`);k(P(a),{recursive:!0});let A={format:$,fps:h,durationMs:f};n&&(A.layers=n);let x=await N(v,`window.__sootsimRecorder.start(${JSON.stringify(A)})`,`${$} 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 ${d}s \u2192 ${a}`),await new Promise(S=>setTimeout(S,f));let R=await N(v,"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 Z(v,a),console.log(` saved: ${a} (${D(R.size)})`)}finally{v.close()}}var $e=6e3;async function z(e,r){try{return await e.send({type:"evaluate",code:r},{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 Y(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 Z(e,r){let o=[],i=0;for(;;){let t=await e.send({type:"evaluate",code:`window.__sootsimRecorder.getBlobBase64({ offset: ${i}, chunk: 2097152 })`});if(!t)throw new Error("no blob available on recorder");if(o.push(Buffer.from(t.data,"base64")),i=t.offset,t.done)break}U(r,Buffer.concat(o))}function u(e,r){let o=e.indexOf(r);if(!(o<0||o===e.length-1))return e[o+1]}function Se(e){if(!e)return;let r=Q(e).toLowerCase().replace(/^\./,"");if(r==="webm"||r==="mp4"||r==="gif")return r;if(r==="png")return"png"}function Re(e,r,o){return e||(o!=null?"png":Se(r)??"webm")}function B(){return new Date().toISOString().replace(/[:T]/g,"-").replace(/\..+/,"")}function xe(){let e=I(pe(),".sootsim","recordings");return k(e,{recursive:!0}),e}function M(e,r){return e?we(process.cwd(),e):I(xe(),r)}function D(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function ee(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 I(ge(),`sootsim-recording-${H()}.json`)}function O(){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){U(L(),JSON.stringify(e,null,2))}function _(){W(L(),{force:!0})}function J(e,r){e&&r.simId&&e!==r.simId&&console.log(` note: the tracked recording session is on sim ${r.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,r){let o=O();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=g(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only"],stripValueFlags:["--mode","--fps","--format","--max-width","--origin"]}),t=ee(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 d=Number(u(e,"--fps")??"30"),l=w({...i,commandTimeoutMs:15e3});try{if(t==="live"||t==="combined")n&&t==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await C("record",{originOverride:u(e,"--origin"),allowGitHubAuth:!0}),await G(l),await re(l,t),await te(l),await ne(l,t,t==="combined"?n:void 0)||(console.error(` start failed: recording store refused to start (${t})`),process.exit(1));else{await Y(l);let h={format:c,fps:d};n&&(h.layers=n);let b=await l.send({type:"evaluate",code:`window.__sootsimRecorder.start(${JSON.stringify(h)})`});b.ok||(console.error(` start failed: ${b.error??"unknown error"}`),process.exit(1))}_e({simId:i.simId??null,mode:t,format:c,fps:d,layers:n,startedAt:new Date().toISOString()}),console.log(t==="video"?` recording ${c} @ ${d}fps${n?` (${n})`:""} \u2014 run \`sootsim record stop --output <path>\` when done`:` recording ${t} \u2014 run \`sootsim record stop\` when done (add --open to launch the preview URL)`)}finally{l.close()}}async function Oe(e,r){let o=O();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=g(e,{port:r.port,stripBooleanFlags:[],stripValueFlags:["--origin"]}),t=w({...i,commandTimeoutMs:15e3});try{await G(t),await t.send({type:"evaluate",code:`(() => {
10
- const start = window.SootSim?.bridges?.startRecordingPrelude
11
- if (typeof start !== 'function') return false
12
- return Promise.resolve(start()).then((value) => value === true)
13
- })()`})||(console.error(" prelude start failed: recording store refused to start"),process.exit(1)),console.log(" recording preview prelude \u2014 run `sootsim record start --mode combined` when the visible proof segment is ready")}finally{t.close()}}async function oe(e){try{let r=await e.send({type:"evaluate",code:`(() => {
14
- const store = window.SootSim?.bridges?.getRecordingState?.();
15
- const headless = window.__sootsimRecorder?.state?.();
16
- return { store: store ? store.state : undefined, headless };
17
- })()`});return r?r.store==="recording"||r.headless==="recording"?"recording":r.store==="processing"?"processing":r.store==="idle"||r.headless==="idle"?"idle":null:null}catch{return null}}async function Be(e,r){let o=O();if(o){J(g(e,{port:r.port}).simId,o),o.mode==="video"?console.log(` recording ${o.mode} (${o.format} @ ${o.fps}fps) on sim ${o.simId??"?"} since ${o.startedAt}`):console.log(` recording ${o.mode} on sim ${o.simId??"?"} since ${o.startedAt}`);return}let i=g(e,{port:r.port}),t=w({...i,commandTimeoutMs:8e3});try{let n=await oe(t);console.log(n==="recording"||n==="processing"?` a recording is in progress (engine state: ${n}), but not via
18
- \`record start\` \u2014 it was started by an atomic \`record --duration\`
19
- run or the in-browser record button, which own their own lifecycle.
20
- if that controlling run is still alive it will finish on its own
21
- (atomic \`--mode video/gif/png\` writes a local file from that
22
- process; live/combined upload to /preview/<id>). if the run was
23
- killed, the recording is abandoned and will NOT finish \u2014 reclaim
24
- it now with \`sootsim record cancel\`, or it auto-reclaims when the
25
- abandoned capture's deadline lapses.`:" no recording in progress")}finally{t.close()}}async function Me(e,r){let o=O();if(!o){let s=g(e,{port:r.port}),c=w({...s,commandTimeoutMs:8e3});try{let d=await oe(c);if(d==="recording"||d==="processing"){let l=await c.send({type:"evaluate",code:`(async () => {
26
- const r = window.__sootsimRecorder;
27
- if (r && typeof r.forceRelease === 'function') return await r.forceRelease();
28
- return false;
29
- })()`}).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=g(e,{port:r.port});J(i.simId,o);let t=o.simId??i.simId??void 0,n=w({...i,simId:t,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 Ue(e,r){let o=O();o||(console.error(" no recording in progress. start one with `sootsim record start`."),process.exit(1));let i=g(e,{port:r.port,stripBooleanFlags:["--open"],stripValueFlags:["--output"]});J(i.simId,o);let t=o.simId??i.simId??void 0,n=e.includes("--open"),s=w({...i,simId:t,commandTimeoutMs:6e4});try{if(o.mode==="live"||o.mode==="combined"){await ie(s);let h=await se(s);_(),ae(h,n,o.mode);return}let c=u(e,"--output"),d=M(c,`sootsim-${B()}.${o.format}`);k(P(d),{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 Z(s,d),_(),console.log(` saved: ${d} (${D(l.size)})`)}finally{s.close()}}async function G(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 re(e,r){await z(e,`(() => {
30
- const fn = window.__sootsimCaptureBundle
31
- if (typeof fn !== 'function') return false
32
- const snap = fn()
33
- return !!(snap && snap.bundleUrl)
34
- })()`)||(console.error(` --mode ${r} needs a guest app bundle to upload to /preview/<id>,
35
- but this sim has no bundle loaded (a built-in shell screen like
36
- photos/settings/home has none). open a metro/guest app first, or
37
- use \`--mode video\` for a local screen recording with no upload.`),process.exit(1))}async function te(e){let r=K();if(!r)return;let o=r.kind==="api-key"?r.secret:r.token;await e.send({type:"evaluate",code:`(() => {
38
- const set = window.SootSim && window.SootSim.bridges && window.SootSim.bridges.setSession
39
- if (typeof set !== 'function') return false
40
- set({ token: ${JSON.stringify(o)}, user: null })
41
- return true
42
- })()`})||(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,r,o){return await e.send({type:"evaluate",code:`window.SootSim.bridges.startRecording(${JSON.stringify(r)}${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 r=Date.now()+X;for(;Date.now()<r;){let o=await e.send({type:"evaluate",code:"(() => { const s = window.SootSim?.bridges?.getRecordingState?.(); return s ? { state: s.state, lastUpload: s.lastUpload, uploadError: s.uploadError } : null })()"});if(o&&o.state==="idle"){if(o.uploadError)return{uploadError:o.uploadError};if(o.lastUpload?.previewUrl)return{previewUrl:o.lastUpload.previewUrl,eventCount:o.lastUpload.eventCount}}await new Promise(i=>setTimeout(i,300))}return{uploadError:`upload did not settle within ${X/1e3}s`}}function ae(e,r,o){e.uploadError&&(console.error(` upload failed: ${e.uploadError}`),process.exit(1)),e.previewUrl||(console.error(" upload returned no preview URL"),process.exit(1)),console.log(` preview: ${e.previewUrl}`),console.log(` note: this URL is content-addressed \u2014 re-recording the same bundle
43
- 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
44
- 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
45
- to replay and will boot a fresh interactive session instead.`),r&&q(e.previewUrl)}export{Se as extToFormat,Re as resolveFormat,De as runRecord,u as valueOf};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-PX7QNGSM.js";import"./chunk-4OW4EPBS.js";import"./chunk-SSTMIACF.js";import"./chunk-U42HSSAI.js";import"./chunk-LJ7SH2KY.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";export{a as runRuntime};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-HPVO7FJA.js";import"./chunk-PDMITY2P.js";import"./chunk-FSSJVHNV.js";import"./chunk-VV265FEE.js";import"./chunk-GW77VHPI.js";import"./chunk-4OW4EPBS.js";import"./chunk-SSTMIACF.js";import"./chunk-U42HSSAI.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";export{a as runSetupRepo};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-KRRNCL56.js";import"./chunk-AYJGGZA4.js";import"./chunk-INXMOS35.js";export{a as settingsStore};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b}from"./chunk-VV265FEE.js";import"./chunk-GW77VHPI.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";export{b as flushCliTelemetry,a as trackCliEvent};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.63 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c}from"./chunk-7RZWW5VK.js";import"./chunk-NWHQG4PG.js";import"./chunk-CAFGDFEU.js";import"./chunk-A3UFHDMY.js";import"./chunk-VV265FEE.js";import"./chunk-GW77VHPI.js";import"./chunk-4OW4EPBS.js";import"./chunk-SSTMIACF.js";import"./chunk-U42HSSAI.js";import"./chunk-QW6P2JE2.js";import"./chunk-INXMOS35.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};