sootsim 0.1.201 → 0.1.203

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 (151) hide show
  1. package/dist-cli/bin.js +5 -4
  2. package/dist-cli/chunks/{agent-SHGFOKZN.js → agent-PWM4XT5H.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-3O4ZW24C.js → agent-wrapper-V2BSTANB.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-KZOBGGZQ.js → app-fonts-7M4PTF6W.js} +2 -2
  5. package/dist-cli/chunks/{assert-RZCBKONA.js → assert-SEW5OJL3.js} +2 -2
  6. package/dist-cli/chunks/{auth-PBD7GLXL.js → auth-3YY55NBL.js} +2 -2
  7. package/dist-cli/chunks/beta-Y4ZJUKAM.js +2 -0
  8. package/dist-cli/chunks/{camera-5OOLGGLN.js → camera-CYXCASB3.js} +2 -2
  9. package/dist-cli/chunks/{chunk-HVSDT56M.js → chunk-4NHPXU3X.js} +1 -1
  10. package/dist-cli/chunks/{chunk-423YVBZK.js → chunk-62AKBZTO.js} +1 -1
  11. package/dist-cli/chunks/{chunk-WJ7YQAKC.js → chunk-6DN4BD7O.js} +38 -38
  12. package/dist-cli/chunks/{chunk-FITJFYBO.js → chunk-6M56UHEY.js} +2 -2
  13. package/dist-cli/chunks/{chunk-T6WXCSWP.js → chunk-A3FIOG7U.js} +2 -2
  14. package/dist-cli/chunks/{chunk-7672K2JN.js → chunk-B7VBDZ3U.js} +1 -1
  15. package/dist-cli/chunks/{chunk-63EDUOKZ.js → chunk-BBOFH45Q.js} +2 -2
  16. package/dist-cli/chunks/{chunk-SKGV3OSH.js → chunk-BJJXNQHO.js} +2 -2
  17. package/dist-cli/chunks/{chunk-7GG4TZ4L.js → chunk-BL67OSVN.js} +2 -2
  18. package/dist-cli/chunks/{chunk-EVCOHQPK.js → chunk-EBH65V62.js} +3 -3
  19. package/dist-cli/chunks/{chunk-NYNAI5PO.js → chunk-FF3C57T5.js} +2 -2
  20. package/dist-cli/chunks/{chunk-JEJV3UHZ.js → chunk-FUC7C5HS.js} +2 -2
  21. package/dist-cli/chunks/{chunk-XAFLM5JS.js → chunk-G5GRLVYA.js} +2 -2
  22. package/dist-cli/chunks/chunk-G5VOIXM7.js +1 -0
  23. package/dist-cli/chunks/{chunk-D6CTB275.js → chunk-GMVAXDHH.js} +1 -1
  24. package/dist-cli/chunks/{chunk-S2AQ4WGX.js → chunk-GTBF3M2H.js} +1 -1
  25. package/dist-cli/chunks/{chunk-RN662UDP.js → chunk-GYTATFQA.js} +2 -2
  26. package/dist-cli/chunks/{chunk-AHJ2WJST.js → chunk-JLOAWSX6.js} +1 -1
  27. package/dist-cli/chunks/{chunk-ENY46QHT.js → chunk-K3CRSIGS.js} +2 -2
  28. package/dist-cli/chunks/{chunk-SVM25PDV.js → chunk-LKJ5LA6K.js} +6 -6
  29. package/dist-cli/chunks/{chunk-SZVYOFMB.js → chunk-LTRNOX6N.js} +2 -2
  30. package/dist-cli/chunks/{chunk-3RAGDMGM.js → chunk-MQHSWXDS.js} +1 -1
  31. package/dist-cli/chunks/{chunk-SQXH3XGO.js → chunk-NHSO4473.js} +2 -2
  32. package/dist-cli/chunks/chunk-ODW7RHSD.js +97 -0
  33. package/dist-cli/chunks/{chunk-FPRZHFV2.js → chunk-OK7QEDHD.js} +2 -2
  34. package/dist-cli/chunks/{chunk-CHVGDYQJ.js → chunk-OXQOPTTB.js} +1 -1
  35. package/dist-cli/chunks/{chunk-F5TOTCUW.js → chunk-P4GJL7OH.js} +2 -2
  36. package/dist-cli/chunks/chunk-PELEQURX.js +4 -0
  37. package/dist-cli/chunks/chunk-QKDII5UB.js +1 -0
  38. package/dist-cli/chunks/chunk-R7GIVBTY.js +2 -0
  39. package/dist-cli/chunks/{chunk-GBUUYMPP.js → chunk-RVOF6RIE.js} +1 -1
  40. package/dist-cli/chunks/chunk-RZU5TDPJ.js +29 -0
  41. package/dist-cli/chunks/{chunk-HIWE4YYN.js → chunk-U6OCMLMU.js} +2 -2
  42. package/dist-cli/chunks/{chunk-MQEEYPOK.js → chunk-UJ64GJSZ.js} +1 -1
  43. package/dist-cli/chunks/{chunk-YOPEO6SA.js → chunk-UZGLGCLM.js} +1 -1
  44. package/dist-cli/chunks/{chunk-QTI33DV5.js → chunk-WSOZGPIX.js} +2 -2
  45. package/dist-cli/chunks/{chunk-CPVTNQAS.js → chunk-WVF2EDZF.js} +1 -1
  46. package/dist-cli/chunks/{chunk-ZSWQLDDQ.js → chunk-XYMOH3HP.js} +1 -1
  47. package/dist-cli/chunks/{chunk-WHNPGZX4.js → chunk-YJNJ5GVC.js} +3 -3
  48. package/dist-cli/chunks/{chunk-USGQNFAM.js → chunk-YP3NIRTK.js} +1 -1
  49. package/dist-cli/chunks/chunk-ZGM7N2AV.js +7 -0
  50. package/dist-cli/chunks/{chunk-NIDV74L2.js → chunk-ZRWVLKFL.js} +1 -1
  51. package/dist-cli/chunks/cli-version-N2RKZ2CU.js +2 -0
  52. package/dist-cli/chunks/{compat-NNM7DTTO.js → compat-FK5MP535.js} +3 -3
  53. package/dist-cli/chunks/{config-LBGQRC2P.js → config-T3W2HI67.js} +2 -2
  54. package/dist-cli/chunks/{control-5DHHQZ26.js → control-ONFLGDEC.js} +2 -2
  55. package/dist-cli/chunks/daemon-FDI5YYZN.js +2 -0
  56. package/dist-cli/chunks/{debug-PILWFGN3.js → debug-Z6NG4KY2.js} +3 -3
  57. package/dist-cli/chunks/{desktop-CZ43IZFV.js → desktop-BIWB2UYC.js} +3 -3
  58. package/dist-cli/chunks/detox-6K7WFLQO.js +50 -0
  59. package/dist-cli/chunks/{device-M26JCUHY.js → device-TPD5WAP2.js} +2 -2
  60. package/dist-cli/chunks/{diagnose-HZZMVPQZ.js → diagnose-NACPOTYX.js} +2 -2
  61. package/dist-cli/chunks/drivers-G2YZR6G6.js +2 -0
  62. package/dist-cli/chunks/flow-OAW2MZCD.js +2 -0
  63. package/dist-cli/chunks/help-MY2CBECX.js +2 -0
  64. package/dist-cli/chunks/home-paths-WWFDX6YU.js +2 -0
  65. package/dist-cli/chunks/inspect-ZPVPUSAK.js +2 -0
  66. package/dist-cli/chunks/install-desktop-QZWSSGJV.js +2 -0
  67. package/dist-cli/chunks/{login-VBCYZKJ6.js → login-WGCO2V4S.js} +4 -4
  68. package/dist-cli/chunks/{logout-J22GLKHX.js → logout-VWSSNYF5.js} +2 -2
  69. package/dist-cli/chunks/maestro-YED424Y6.js +96 -0
  70. package/dist-cli/chunks/{mode-XN46XIMK.js → mode-QCOM4UM4.js} +2 -2
  71. package/dist-cli/chunks/optional-demo-registry-3KZFUZZD.js +2 -0
  72. package/dist-cli/chunks/{perf-ZIYESQRA.js → perf-FZHCFAID.js} +2 -2
  73. package/dist-cli/chunks/{record-L74E3HCL.js → record-NF3PKBSW.js} +3 -3
  74. package/dist-cli/chunks/runtime-ETELTKFT.js +2 -0
  75. package/dist-cli/chunks/screenshot-command-KLPOA5TW.js +151 -0
  76. package/dist-cli/chunks/screenshots-capture-MCTZSXLE.js +41 -0
  77. package/dist-cli/chunks/{serve-CNDRR7XN.js → serve-XBWYWHMC.js} +18 -18
  78. package/dist-cli/chunks/{setup-XZDN7XMI.js → setup-W7EROACZ.js} +3 -3
  79. package/dist-cli/chunks/{skills-KJK67CVB.js → skills-RBGNF7GS.js} +2 -2
  80. package/dist-cli/chunks/{storage-UOLMRHLQ.js → storage-3SFE2DUE.js} +2 -2
  81. package/dist-cli/chunks/store-Z3CHVRR3.js +2 -0
  82. package/dist-cli/chunks/telemetry-SWFOAVWP.js +2 -0
  83. package/dist-cli/chunks/test-UP6VTFKE.js +69 -0
  84. package/dist-cli/chunks/{timeline-UJFIJ2GT.js → timeline-A54JB74A.js} +2 -2
  85. package/dist-cli/chunks/upgrade-H7XE3N76.js +4 -0
  86. package/dist-cli/chunks/upload-X2BRKPBJ.js +2 -0
  87. package/dist-cli/chunks/version-4JV7HX23.js +4 -0
  88. package/dist-cli/chunks/{web-QP4KDHR6.js → web-5OLZXKVF.js} +2 -2
  89. package/dist-cli/chunks/{what-happened-VW274SXG.js → what-happened-Q4L6SI4I.js} +2 -2
  90. package/dist-lib/agent-daemon-client.cjs +1 -1
  91. package/dist-lib/agent-events.cjs +1 -1
  92. package/dist-lib/agent-identity.cjs +1 -1
  93. package/dist-lib/agent-sessions.cjs +1 -1
  94. package/dist-lib/attached-projects.cjs +1 -1
  95. package/dist-lib/auth/shared-session.cjs +1 -1
  96. package/dist-lib/backend-origin.cjs +1 -1
  97. package/dist-lib/beta.cjs +1 -1
  98. package/dist-lib/beta.mjs +1 -1
  99. package/dist-lib/bridge-constants.cjs +1 -1
  100. package/dist-lib/cli-constants.cjs +1 -1
  101. package/dist-lib/config.cjs +1 -1
  102. package/dist-lib/detox/index.cjs +1 -1
  103. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  104. package/dist-lib/home-paths.cjs +32 -1
  105. package/dist-lib/host/bridge-host.cjs +51 -2
  106. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  107. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  108. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  109. package/dist-lib/host/websocket-proxy.cjs +1 -1
  110. package/dist-lib/index.cjs +1 -1
  111. package/dist-lib/jump-to-source-babel.cjs +1 -1
  112. package/dist-lib/menu.cjs +1 -1
  113. package/dist-lib/menu.mjs +1 -1
  114. package/dist-lib/metro.cjs +1 -1
  115. package/dist-lib/profiles.cjs +1 -1
  116. package/dist-lib/render-mode.cjs +1 -1
  117. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  118. package/dist-lib/sdk.cjs +1 -1
  119. package/dist-lib/sdk.mjs +1 -1
  120. package/dist-lib/skills.cjs +104 -19
  121. package/dist-lib/vite.cjs +1 -1
  122. package/package.json +1 -1
  123. package/src/home-paths.ts +48 -1
  124. package/src/host/bridge-host.ts +12 -0
  125. package/src/runtime-delivery.ts +59 -9
  126. package/dist-cli/chunks/beta-EJBRLRKG.js +0 -2
  127. package/dist-cli/chunks/chunk-3W273A5J.js +0 -4
  128. package/dist-cli/chunks/chunk-5GICTRK5.js +0 -1
  129. package/dist-cli/chunks/chunk-AGSCFR4P.js +0 -27
  130. package/dist-cli/chunks/chunk-O56GZV3H.js +0 -1
  131. package/dist-cli/chunks/chunk-ORIISY22.js +0 -6
  132. package/dist-cli/chunks/chunk-PMPQ57UY.js +0 -92
  133. package/dist-cli/chunks/cli-version-WTA2LUDV.js +0 -2
  134. package/dist-cli/chunks/daemon-3KGXTPXJ.js +0 -2
  135. package/dist-cli/chunks/detox-D6XW7Y4V.js +0 -49
  136. package/dist-cli/chunks/drivers-7ZM3KW22.js +0 -2
  137. package/dist-cli/chunks/flow-DDDWJ4KD.js +0 -2
  138. package/dist-cli/chunks/help-23GXSWP3.js +0 -2
  139. package/dist-cli/chunks/home-paths-746ZDH2I.js +0 -2
  140. package/dist-cli/chunks/inspect-T37ALZRL.js +0 -2
  141. package/dist-cli/chunks/install-desktop-FSY2ND5S.js +0 -2
  142. package/dist-cli/chunks/maestro-5LWJ2S6K.js +0 -96
  143. package/dist-cli/chunks/optional-demo-registry-YF4W5LPU.js +0 -2
  144. package/dist-cli/chunks/runtime-7WSR27U6.js +0 -2
  145. package/dist-cli/chunks/screenshot-command-ZCI5QE4T.js +0 -190
  146. package/dist-cli/chunks/store-FGCNPJBA.js +0 -2
  147. package/dist-cli/chunks/telemetry-QEO7INJC.js +0 -2
  148. package/dist-cli/chunks/test-5DK2XCRU.js +0 -69
  149. package/dist-cli/chunks/upgrade-CXZFJIH7.js +0 -4
  150. package/dist-cli/chunks/upload-ZFINR6K3.js +0 -2
  151. package/dist-cli/chunks/version-XMSYOSAX.js +0 -4
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as p}from"./chunk-PMPQ57UY.js";import{a as c,b as l}from"./chunk-FPRZHFV2.js";import{a}from"./chunk-FITJFYBO.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as p}from"./chunk-ODW7RHSD.js";import{a as c,b as l}from"./chunk-OK7QEDHD.js";import{a}from"./chunk-6M56UHEY.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
3
3
  sootsim ${e} needs auth before it can check recording access.
4
4
 
5
5
  pick one:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{readFileSync as i}from"node:fs";import{fileURLToPath as e}from"node:url";var r=null;function l(){if(r!=null)return r;let o=[()=>e(import.meta.resolve("sootsim/package.json")),()=>e(new URL("../package.json",import.meta.url))];for(let n of o)try{let t=JSON.parse(i(n(),"utf8")).version;if(typeof t=="string"&&t)return r=t,r}catch{}return r="0.0.0",r}export{l as a};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as R,b as U}from"./chunk-QTI33DV5.js";import{c as F}from"./chunk-SKGV3OSH.js";import{g as N,j as E,r as _,s as v,t as B}from"./chunk-ORIISY22.js";import{a as O}from"./chunk-3RAGDMGM.js";import{execFileSync as W,spawnSync as s}from"child_process";import{existsSync as a,mkdirSync as x,readFileSync as nt,realpathSync as ot,rmSync as $,writeFileSync as H}from"fs";import{homedir as P}from"os";import{basename as st,dirname as T,resolve as f,sep as Y}from"path";import{execFileSync as X}from"child_process";import{chmodSync as Q,mkdirSync as I,rmSync as z,writeFileSync as A}from"fs";import{dirname as L}from"path";var J="dev.sootsim.daemon",j="SootSim Daemon",M="0.1.36";function V(t,e,r){let n=v(),o=B(),c=L(L(o)),l=L(o),u=`${c}/Resources`;z(n,{recursive:!0,force:!0}),I(_(),{recursive:!0}),I(l,{recursive:!0}),I(u,{recursive:!0}),A(`${c}/Info.plist`,Z()),A(`${c}/PkgInfo`,"APPL????"),A(o,tt(t,e,r)),Q(o,493);try{X("codesign",["--force","--sign","-","--deep",n],{stdio:"pipe"})}catch(i){let p=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${n} failed: ${p}
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as R,b as U}from"./chunk-WSOZGPIX.js";import{c as F}from"./chunk-BJJXNQHO.js";import{g as N,j as E,r as _,s as v,t as B}from"./chunk-ZGM7N2AV.js";import{a as O}from"./chunk-MQHSWXDS.js";import{execFileSync as W,spawnSync as s}from"child_process";import{existsSync as a,mkdirSync as x,readFileSync as nt,realpathSync as ot,rmSync as $,writeFileSync as H}from"fs";import{homedir as P}from"os";import{basename as st,dirname as T,resolve as f,sep as Y}from"path";import{execFileSync as X}from"child_process";import{chmodSync as Q,mkdirSync as I,rmSync as z,writeFileSync as A}from"fs";import{dirname as L}from"path";var J="dev.sootsim.daemon",j="SootSim Daemon",M="0.1.36";function V(t,e,r){let n=v(),o=B(),c=L(L(o)),l=L(o),u=`${c}/Resources`;z(n,{recursive:!0,force:!0}),I(_(),{recursive:!0}),I(l,{recursive:!0}),I(u,{recursive:!0}),A(`${c}/Info.plist`,Z()),A(`${c}/PkgInfo`,"APPL????"),A(o,tt(t,e,r)),Q(o,493);try{X("codesign",["--force","--sign","-","--deep",n],{stdio:"pipe"})}catch(i){let p=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${n} failed: ${p}
3
3
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:n,launcherPath:o}}function Z(){return`<?xml version="1.0" encoding="UTF-8"?>
4
4
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5
5
  <plist version="1.0">
@@ -0,0 +1,97 @@
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as Ie,b as Ae,c as Ue}from"./chunk-OK7QEDHD.js";import{c as ke}from"./chunk-GMVAXDHH.js";import{d as xe}from"./chunk-GTBF3M2H.js";import{g as Be,i as Ee,k as B}from"./chunk-U6OCMLMU.js";import{d as Re}from"./chunk-UZGLGCLM.js";import{a as ve,b as k}from"./chunk-WSOZGPIX.js";import{a as Se}from"./chunk-6M56UHEY.js";import{createHash as ft}from"crypto";import{readFileSync as U}from"fs";import Oe from"path";import{gzipSync as ae,gunzipSync as mt}from"zlib";function _e(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}import{brotliCompressSync as nt,constants as rt}from"node:zlib";var st=9;function Pe(e){return nt(e,{params:{[rt.BROTLI_PARAM_QUALITY]:st}})}function oe(e,t){let r=new AbortController,o=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(o)}}async function ot(e){let t=oe(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 o=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${o.slice(0,200)}`)}}async function it(e,t=8,r){let o=0,i=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;o<a;){let u=e[o++];await ot(u),i++,r?.(i,a)}}))}function at(e,t,r,o){let i=[];i.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let a of e.files){let u=r.get(a.urlhash);u&&i.push({url:a.putUrl,contentType:a.contentType,bytes:u})}e.events&&o?.eventsBytes&&i.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:o.eventsBytes}),e.timeline&&o?.timelineBytes&&i.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:o.timelineBytes}),e.flowVideo&&o?.videoBytes&&i.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:o.videoBytes}),e.storage&&o?.storageBytes&&i.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:o.storageBytes}),e.failureBundle&&o?.failureBundleBytes&&i.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:o.failureBundleBytes});for(let a of e.snapshots??[]){let u=o?.snapshotBytes?.get(a.id);u&&i.push({url:a.putUrl,contentType:a.contentType,bytes:u})}return i}function lt(e){return e.replace(/\/+$/,"")}var J=class extends Error{constructor(r,o,i,a=""){super(r);this.status=o;this.phase=i;this.responseText=a;this.name="PresignedUploadError"}};async function Le(e){let t=lt(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let o=oe(3e4,"init"),i;try{i=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:o.signal})}finally{o.cancel()}if(!i.ok){let g=await i.text().catch(()=>"");throw new J(`init failed: ${i.status} ${g.slice(0,200)}`,i.status,"init",g)}let a=await i.json(),u=at(a,e.bundleBytes,e.filesByHash,e.extras);await it(u,e.concurrency??8,e.onPutProgress);let b=oe(3e4,"finalize"),m;try{m=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:b.signal})}finally{b.cancel()}if(!m.ok){let g=await m.text().catch(()=>"");throw new J(`finalize failed: ${m.status} ${g.slice(0,200)}`,m.status,"finalize",g)}let C=await m.json();return{init:a,finalize:C}}function ut(e){return e!==null&&typeof e=="object"?e:null}function Fe(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function ie(e){let t=ut(e);return t?t.schemaVersion===1&&Fe(t.t)!==void 0&&Fe(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function ct(e,t){let r=[];for(let o of e.split(`
3
+ `)){let i=o.trim();if(i)try{let a=JSON.parse(i);t(a)&&r.push(a)}catch{}}return r}function $e(e){return ct(e,ie)}function gt(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 je=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",He=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",ue="http://localhost:3000",ht=2e3;async function yt(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${ue}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(ht)});if(t.ok||t.status===204||t.status===405)return ue}catch{}return je}function F(e){return e.replace(/\/$/,"")}function bt(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 Mt(e){try{let t=new URL(e).hostname.toLowerCase();return t==="sootbean.com"||t.endsWith(".sootbean.com")}catch{return!1}}function wt(e,t){return t?F(t):process.env.SOOTSIM_PREVIEW_ORIGIN?F(process.env.SOOTSIM_PREVIEW_ORIGIN):bt(e)?F(e):Mt(e)?F(He):F(e)}function Tt(){console.log(`
4
+ sootsim record upload \u2014 publish the current recorded bundle as a /preview/<id> link
5
+
6
+ usage:
7
+ sootsim record upload [--origin <url>] [--public-origin <url>] (--events <path> | --video <path>) [--screenshot <path>] [--owner <org> --repo <repo>] [--sim <sim>] [--open] [--assets-only]
8
+
9
+ options:
10
+ --origin <url> upload target (default: auto)
11
+ prefers ${ue} when available, otherwise
12
+ falls back to ${je}
13
+ override with SOOTSIM_UPLOAD_ORIGIN env var
14
+ --public-origin <url>
15
+ public /preview link origin (default: ${He}
16
+ for prod uploads, upload origin for localhost/custom origins).
17
+ override with SOOTSIM_PREVIEW_ORIGIN env var
18
+ --events <path> path to a gzipped events .jsonl.gz file to attach
19
+ required unless --video is present; previews must
20
+ have replay or recording playback data
21
+ --screenshot <path>
22
+ path to a PNG thumbnail to attach to the share
23
+ --video <path> path to a mp4/gif flow recording. embedded inline
24
+ in the pr sticky comment served at
25
+ /api/preview/flow-video?id=<share-id>
26
+ --video-duration-ms <ms>
27
+ duration hint for attached flow video
28
+ --timeline-events <path>
29
+ extra trace timeline rows, JSONL or JSONL gz
30
+ --trace-frame-stats <path>
31
+ frame stats JSON returned by the recorder bridge
32
+ --failure-bundle <dir>
33
+ per-failure debug bundle dir written by the flow runner
34
+ (error.json, describe.json, a11y.txt, tree.txt,
35
+ console.json, screenshot.png). uploaded with the share
36
+ so failed CI runs are debuggable from the dashboard
37
+ --owner <org> associate a session upload with a linked org repo
38
+ --repo <repo> repo name for --owner; the signed-in user must belong
39
+ to the local/org team that owns the link
40
+ --billing-kind test_run
41
+ meter this upload as a natural-language test run
42
+ --sim <sim> target a specific sim (see: sootsim list)
43
+ --open open the resulting /preview/<id> url in the browser
44
+ --assets-only drop API/JSON/HTML records before upload; keep images,
45
+ fonts, css, js, and binary blobs. live-data demos hit
46
+ the real network at replay time instead of serving
47
+ recorded API snapshots
48
+ -h, --help
49
+
50
+ examples:
51
+ sootsim record upload --events ./my-session.jsonl.gz
52
+ sootsim record upload --origin http://localhost:3000 --events ./my-session.jsonl.gz --open
53
+ sootsim record upload --video /tmp/soot-flow.mp4 --video-duration-ms 12000
54
+ `)}function d(e,t){let r=e.findIndex(i=>i===t);if(r<0)return;let o=e[r+1];return e.splice(r,2),o}function Ce(e,t){let r=e.findIndex(o=>o===t);return r<0?!1:(e.splice(r,1),!0)}function Ne(e,t){if(!e)return;let r=Number(e);return(!Number.isFinite(r)||r<=0)&&(console.error(` invalid ${t}: ${e}`),process.exit(1)),Math.round(r)}function ze(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 De(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 St(e){return/\.bundle($|\?)/.test(e)||/\.js($|\?)/.test(e)?"application/javascript":/\.zip($|\?)/.test(e)?"application/zip":"application/javascript"}function vt(e){try{return new URL(e).searchParams.get("appFonts")||""}catch{return""}}function xt(e){try{return new URL(e).searchParams.get("appSplash")||""}catch{return""}}function kt(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 Bt(e,t){let o=[];for(let i=0;i<t;i+=15e5){let a=Math.min(i+15e5,t),u=await B(e,`(window.__sootsimLastTransformedBundle?.text || "").slice(${i}, ${a})`);if(typeof u!="string")return null;o.push(u)}return o.join("")}function Et(e){return e.recordedDurationMs&&e.recordingStartedAtMs?{since:e.recordingStartedAtMs-1e4,until:e.recordingStartedAtMs+e.recordedDurationMs+5e3,limit:2e3}:{limit:2e3}}function Rt(e){let t=U(e),o=(t[0]===31&&t[1]===139?mt(t):t).toString("utf8");return $e(o)}function It(e){return JSON.parse(U(e,"utf8"))}function At(e){if(e===null||typeof e!="object")return[];let t=e,r=typeof t.startedAtEpochMs=="number"&&t.startedAtEpochMs>0?t.startedAtEpochMs:null;if(r===null||!Array.isArray(t.samples))return[];let o=[];for(let i of t.samples){if(!Array.isArray(i)||typeof i[0]!="number")continue;let a=u=>typeof u=="number"&&Number.isFinite(u)?Math.round(u*100)/100:0;o.push({schemaVersion:1,t:r+Math.round(i[0]),seq:o.length+1,context:"tenant",kind:"frame",data:{totalMs:a(i[1]),layoutMs:a(i[2]),renderMs:a(i[3]),copyMs:a(i[4])}})}return o}function Ut(e){if(e===null||typeof e!="object")return e;let{samples:t,...r}=e;return r}function le(e){let t=new Map;for(let r of e)t.set(r.urlhash||r.url,r);return Array.from(t.values())}async function Zt(e,t){(e.includes("--help")||e.includes("-h"))&&(Tt(),process.exit(0));let r=[...e],o=await yt(d(r,"--origin")),i=wt(o,d(r,"--public-origin")),a=d(r,"--events"),u=d(r,"--screenshot"),b=d(r,"--video"),m=d(r,"--timeline-events"),C=d(r,"--trace-frame-stats"),g=d(r,"--failure-bundle"),K=d(r,"--video-duration-ms"),ce=Ne(d(r,"--recorded-duration-ms"),"--recorded-duration-ms"),de=Ne(d(r,"--recording-started-at-ms"),"--recording-started-at-ms"),q=d(r,"--owner"),V=d(r,"--repo"),N=d(r,"--billing-kind"),Je=Ce(r,"--open");(q&&!V||!q&&V)&&(console.error(" --owner and --repo must be provided together"),process.exit(1)),N&&N!=="test_run"&&(console.error(` invalid --billing-kind: ${N}`),process.exit(1)),!a&&!b&&(console.error(" preview uploads require playback data: pass --events or --video.\n for a normal local preview, use `sootsim record --mode combined --open`\n or `sootsim flow --preview` instead of uploading a bundle-only snapshot."),process.exit(1));let pe=Ce(r,"--assets-only"),Ke=Be(r,{stripBooleanFlags:[],stripValueFlags:[]}),M=Ee(Ke),c,fe=[],w=[],T=m?Rt(m):[],me=C?It(C):null;T.push(...At(me));let ge=T.length,W=null;try{if(c=await B(M,'(typeof window.__sootsimCaptureBundle === "function") ? window.__sootsimCaptureBundle() : null'),c?.bundleUrl){let l=new URL(c.bundleUrl).origin,[p,A]=await Promise.all([B(M,`(window.__sootsimPreviewRecorder?.list?.(${JSON.stringify(l)}) || [])`),B(M,`(async () => {
55
+ const list = window.__sootsimListWorkerFetchRecorder
56
+ return typeof list === 'function'
57
+ ? await list(${JSON.stringify(l)})
58
+ : []
59
+ })()`)]);fe=le([...p,...A]).filter(f=>{try{return!new URL(f.url).pathname.startsWith("/api/")}catch{return!0}});let L=await B(M,`(async () => {
60
+ const rec = window.__sootsimPreviewRecorder
61
+ const workerList = window.__sootsimListWorkerFetchRecorder
62
+ return {
63
+ main: rec?.list ? rec.list() : [],
64
+ worker: typeof workerList === 'function' ? await workerList() : [],
65
+ }
66
+ })()`),O=(L?le([...L.main,...L.worker]):[]).filter(f=>{try{return new URL(f.url).origin!==l}catch{return!1}}),x=O.length>0?{count:O.length,totalBytes:O.reduce((f,re)=>f+(re.size||0),0)}:null;if(x&&x.count>0){console.log(` ${x.count} recorded cross-origin responses (${(x.totalBytes/1024).toFixed(1)} KiB)`);let f=await B(M,`(async () => {
67
+ const rec = window.__sootsimPreviewRecorder
68
+ const workerDump = window.__sootsimDumpWorkerFetchRecorder
69
+ const bundleUrl = ${JSON.stringify(c.bundleUrl)}
70
+ const keep = (r) => {
71
+ try {
72
+ const u = new URL(r.url)
73
+ if (u.origin !== ${JSON.stringify(l)}) return true
74
+ // bundle-origin api responses came from the rewritten
75
+ // /__app-api proxy at record time (re-keyed by the
76
+ // recorder's unwrap step). they need bodies attached the
77
+ // same way as cross-origin records \u2014 direct re-fetch from
78
+ // the dev server lacks the bundle's session cookies.
79
+ if (r.url !== bundleUrl && u.pathname.startsWith('/api/')) return true
80
+ return false
81
+ } catch { return false }
82
+ }
83
+ return {
84
+ main: rec?.dump ? rec.dump().filter(keep) : [],
85
+ worker: typeof workerDump === 'function'
86
+ ? (await workerDump()).filter(keep)
87
+ : [],
88
+ }
89
+ })()`);if(w=le([...f.main,...f.worker]),pe){let re=w.length;w=w.filter(se=>ze(se.contentType));let et=x.totalBytes-w.reduce((se,tt)=>se+(tt.size||0),0);console.log(` --assets-only: kept ${w.length}/${re} records (dropped ${(et/1024).toFixed(1)} KiB of API responses)`)}}}c?.transformedBundle&&(W=await Bt(M,c.transformedBundle.byteLength));let n=await B(M,`(() => {
90
+ const bridge = window.SootSim?.bridges?.timeline ?? window.__sootsimTimeline
91
+ if (!bridge || typeof bridge.recent !== 'function') return null
92
+ return bridge.recent(${JSON.stringify(Et({recordedDurationMs:ce,recordingStartedAtMs:de}))})
93
+ })()`).catch(l=>(console.warn(` warning: failed to capture trace timeline: ${l instanceof Error?l.message:String(l)}`),null)),s=Array.isArray(n?.events)?n.events:[];T=[...T,...s.filter(ie)].sort((l,p)=>l.t-p.t||l.seq-p.seq)}finally{M.close()}c||(console.error(" could not read bundle snapshot \u2014 is sootsim running and is the bundle loaded?"),process.exit(2)),c.bundleUrl||(console.error(` no ?bundle= URL on the current sootsim tab.
94
+ open the app you want to share first (e.g. sootsim open 8082), then run upload.`),process.exit(2));let h,G=!1;if(W!==null)h=new TextEncoder().encode(W),G=!0,console.log(` using post-transform bundle: ${(h.byteLength/1024).toFixed(1)} KiB`);else{let n=kt(c.bundleUrl);n!==c.bundleUrl&&console.log(" forcing lazy=false for self-contained bundle"),console.log(` capturing: ${n}`),h=await De(n),console.log(` main bundle: ${(h.byteLength/1024).toFixed(1)} KiB`)}let z=fe.filter(n=>n.url!==c.bundleUrl);pe&&(z=z.filter(n=>ze(n.contentType))),console.log(` fetching ${z.length} extra files\u2026`);let D=(await Promise.all(z.map(async n=>{try{let s=await De(n.url);return{...n,bytes:s}}catch(s){return console.error(` warning: failed to re-fetch ${n.url}: ${s instanceof Error?s.message:s}`),null}}))).filter(n=>!!n),qe=D.reduce((n,s)=>n+s.bytes.byteLength,0);console.log(` ${D.length} extra files: ${(qe/1024).toFixed(1)} KiB`);let E;a&&(E=U(a)),T.sort((n,s)=>n.t-s.t||n.seq-s.seq);let he=T.map(n=>JSON.stringify(n)).join(`
95
+ `),Y=ae(he?`${he}
96
+ `:"");console.log(` trace timeline: ${T.length} events${ge?` (${ge} from runner sidecars)`:""}`);let y;u&&(y=U(u),console.log(` attaching screenshot: ${(y.byteLength/1024).toFixed(1)} KiB`));let R,I;if(g){let n=p=>{try{return U(Oe.join(g,p),"utf8")}catch{return null}},s=p=>{let A=n(p);if(A===null)return null;try{return JSON.parse(A)}catch{return A}},l={error:s("error.json"),describe:s("describe.json"),console:s("console.json"),a11y:n("a11y.txt"),tree:n("tree.txt")};Object.values(l).some(p=>p!==null)&&(R=ae(JSON.stringify(l)),console.log(` attaching failure bundle: ${(R.byteLength/1024).toFixed(1)} KiB gz`));try{I=U(Oe.join(g,"screenshot.png"))}catch{}}let S,$,ye;if(b){if(S=U(b),$=b.endsWith(".mp4")?"video/mp4":b.endsWith(".gif")?"image/gif":void 0,$||(console.error(" preview flow videos must be mp4 or gif"),await k(),process.exit(1)),K){let n=Number(K);(!Number.isFinite(n)||n<=0)&&(console.error(` invalid --video-duration-ms: ${K}`),await k(),process.exit(1)),ye=Math.round(n)}console.log(` attaching flow video: ${(S.byteLength/1024).toFixed(1)} KiB (${$})`)}let _=Ie(),P=Ue(_),Ve=Se();ve({event:"preview_upload_started",identity:{userId:_?.kind==="session"?Ve?.user?.id??null:null,repoId:P?.repoId??null,installationId:P?.installationId??null},properties:{origin:o,hasAuth:!!_,authMode:_?.kind??"none",bundleBytes:h.byteLength,isTransformed:G,extraFiles:D.length,recordedFetches:w.length,hasEvents:!!E,traceTimelineEvents:T.length,hasScreenshot:!!y,hasVideo:!!S}}),_||(console.error(" preview uploads need auth."),console.error(" set SOOTSIM_API_KEY=sk_sootsim_..., run `sootsim login`, or use the soot github runner."),await k(),process.exit(1));let We=Ae(_),Ge=(()=>{try{return new URL(c.bundleUrl).origin}catch{return null}})(),j=(n,s,l,p,A,L,Te,O)=>{let x=_e(L),f=x?ae(n):n;return{url:s,urlhash:l,method:p,bodyHash:A,requestVaryHash:O,contentType:L,responseHeaders:Te,bytes:f,encoding:x?"gzip":void 0}},be=[],Q=vt(c.pageHref)||"";if(Q){let n=await xe(Q,{onStaged:({url:s,byteLength:l})=>console.log(` staged app font: ${s} (${(l/1024).toFixed(1)} KiB)`),onError:(s,l)=>console.error(` warning: failed to fetch app font ${s}: ${l instanceof Error?l.message:l}`)});for(let s of n)be.push(j(Buffer.from(s.bytes),s.url,s.urlhash,"GET","-",s.contentType))}let Me=[],X=xt(c.pageHref)||"";if(X){let n=await ke(X,{onStaged:({url:s,byteLength:l})=>console.log(` staged splash image: ${s} (${(l/1024).toFixed(1)} KiB)`),onError:(s,l)=>console.error(` warning: failed to fetch splash image ${s}: ${l instanceof Error?l.message:l}`)});for(let s of n)Me.push(j(Buffer.from(s.bytes),s.url,s.urlhash,"GET","-",s.contentType))}let Z=[...D.map(n=>j(n.bytes,n.url,n.urlhash,"GET","-",n.contentType,n.responseHeaders,n.requestVaryHash)),...w.map(n=>j(Buffer.from(n.bodyBase64,"base64"),n.url,n.urlhash,n.method||"GET",n.bodyHash||"-",n.contentType,n.responseHeaders,n.requestVaryHash)),...be,...Me],ee=Pe(h),Ye=ft("sha256").update(h).digest("hex");console.log(` bundle raw=${(h.byteLength/1024).toFixed(1)} KiB br=${(ee.byteLength/1024).toFixed(1)} KiB`);let Qe={contentHash:Ye,bundleSizeBytes:h.byteLength,bundleContentType:St(c.bundleUrl),bundleEncoding:"br",bundleOrigin:Ge,runtimeVersion:c.runtimeVersion??void 0,appFonts:Q||void 0,appSplash:X||void 0,entry:c.entry,isTransformed:G,deviceSpec:c.deviceSpec,installationId:P?.installationId??void 0,repoId:P?.repoId,owner:q??P?.owner,repo:V??P?.repo,billingKind:N==="test_run"?"test_run":void 0,files:Z.map(n=>({url:n.url,urlhash:n.urlhash,method:n.method,bodyHash:n.bodyHash,contentType:n.contentType,responseHeaders:n.responseHeaders,requestVaryHash:n.requestVaryHash,encoding:n.encoding,sizeBytes:n.bytes.byteLength})),events:E?{sizeBytes:E.byteLength}:void 0,timeline:{sizeBytes:Y.byteLength,encoding:"gzip"},traceFrameStats:Ut(me),recordedDurationMs:ce,recordingStartedAtMs:de,failureBundle:R?{sizeBytes:R.byteLength,encoding:"gzip"}:void 0,snapshots:(()=>{let n=[];return y&&n.push({id:"landing",label:"Landing",kind:"landing",t:0,contentType:"image/png",sizeBytes:y.byteLength}),I&&n.push({id:"failure",label:"Failure",kind:"failure",contentType:"image/png",sizeBytes:I.byteLength}),n.length>0?n:void 0})(),flowVideo:S&&$?{sizeBytes:S.byteLength,contentType:$,durationMs:ye}:void 0},we=new Map;for(let n of Z)we.set(n.urlhash,n.bytes);let te=new Map;y&&te.set("landing",y),I&&te.set("failure",I);let Xe=Date.now(),v=ee.byteLength;for(let n of Z)v+=n.bytes.byteLength;E&&(v+=E.byteLength),v+=Y.byteLength,y&&(v+=y.byteLength),I&&(v+=I.byteLength),R&&(v+=R.byteLength),S&&(v+=S.byteLength);let Ze=`${F(o)}/api/preview/upload/init`;console.log(` init: ${Ze}`);let H;try{let n=await Le({originBase:o,initBody:Qe,bundleBytes:ee,filesByHash:we,extras:{eventsBytes:E,timelineBytes:Y,videoBytes:S,failureBundleBytes:R,snapshotBytes:te},authHeader:We,concurrency:16});H=n.finalize;let s=1+n.init.files.length+(n.init.events?1:0)+(n.init.timeline?1:0)+n.init.snapshots.length+(n.init.flowVideo?1:0)+(n.init.failureBundle?1:0);console.log(` PUT ${s} objects in ${Date.now()-Xe}ms (${(v/1024).toFixed(1)} KiB)`)}catch(n){let s=n;s.phase==="init"&&s.status===401&&(console.error(" preview upload requires a valid login."),console.error(" run `sootsim login` and retry."),await k(),process.exit(1)),s.status===402&&(console.error(` ${gt(s.responseText)??"preview uploads require Personal, Team, or an active trial \u2014 upgrade from the billing dialog."}`),await k(),process.exit(1)),console.error(` ${s.message??`${s.phase??"upload"} failed: ${String(n)}`}`),await k(),process.exit(1)}let ne=`${i}${H.url}`;return console.log(`
97
+ stored ${H.filesStored??0} extra files`),console.log(` preview: ${ne}`),Je&&await Re(ne),await k(),{previewUrl:ne,shareId:H.id}}export{yt as a,wt as b,Zt as c};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r}from"./chunk-FITJFYBO.js";var c=["ghs_","ghp_","gho_","ghu_","github_pat_"];function d(n){return!!(n&&n.length>=20&&c.some(t=>n.startsWith(t)))}function p(){let n=process.env.SOOT_INSTALLATION_TOKEN?.trim(),t=process.env.GITHUB_TOKEN?.trim(),e=n||t;if(!d(e))return null;let o=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!o)return null;let[i,s]=o.includes("/")?o.split("/",2):[null,null],u=(process.env.SOOT_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),l=(process.env.SOOT_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:e,repoId:o,repositoryId:u||null,owner:i||null,repo:s||null,installationId:l||null,source:n?"soot-runner":"github-actions"}}function g(){let n=process.env.SOOTSIM_API_KEY?.trim();if(n&&n.startsWith("sk_sootsim_"))return{kind:"api-key",secret:n,source:"env"};let t=p();if(t)return t;let e=r();return e?.token?{kind:"session",token:e.token,origin:e.origin}:null}function a(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function _(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{g as a,a as b,_ as c};
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r}from"./chunk-6M56UHEY.js";var c=["ghs_","ghp_","gho_","ghu_","github_pat_"];function d(n){return!!(n&&n.length>=20&&c.some(t=>n.startsWith(t)))}function p(){let n=process.env.SOOT_INSTALLATION_TOKEN?.trim(),t=process.env.GITHUB_TOKEN?.trim(),e=n||t;if(!d(e))return null;let o=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!o)return null;let[i,s]=o.includes("/")?o.split("/",2):[null,null],u=(process.env.SOOT_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),l=(process.env.SOOT_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:e,repoId:o,repositoryId:u||null,owner:i||null,repo:s||null,installationId:l||null,source:n?"soot-runner":"github-actions"}}function g(){let n=process.env.SOOTSIM_API_KEY?.trim();if(n&&n.startsWith("sk_sootsim_"))return{kind:"api-key",secret:n,source:"env"};let t=p();if(t)return t;let e=r();return e?.token?{kind:"session",token:e.token,origin:e.origin}:null}function a(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function _(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{g as a,a as b,_ as c};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{existsSync as A,mkdirSync as v,readFileSync as M,rmSync as f,writeFileSync as h}from"fs";import{tmpdir as w}from"os";import{dirname as B,join as U,resolve as V}from"path";import{execFileSync as b}from"child_process";import{readFileSync as _}from"fs";import{createRequire as y}from"module";var c=null,p=null;function m(r){c||(c=O());try{return c(r)}catch{return null}}function C(r){p||(p=T());try{return p(r)}catch{return null}}function T(){if(process.platform==="linux")return r=>{try{return _(`/proc/${r}/comm`,"utf8").trim()||null}catch{return null}};if(process.platform==="darwin"){let r=x();return r||F()}return()=>null}function O(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return D();if(process.platform==="darwin"){let n=R();return n||k()}return()=>null}function D(){return r=>{try{let n=_(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let e=n.slice(t+1).trim().split(/\s+/),i=Number(e[1]);return Number.isFinite(i)&&i>0?i:null}catch{return null}}}var E=3,l=216,P=16,S=48,L=16;function R(){if(!process.versions?.bun)return null;try{let r=y(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),e=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),i=Buffer.alloc(l);return o=>{if(Number(e.symbols.proc_pidinfo(o,E,0n,i,l))<=0)return null;let u=i.readUInt32LE(P);return u>0?u:null}}catch{return null}}function x(){if(!process.versions?.bun)return null;try{let r=y(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),e=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),i=Buffer.alloc(l);return o=>{if(Number(e.symbols.proc_pidinfo(o,E,0n,i,l))<=0)return null;let u=i.subarray(S,S+L),I=u.indexOf(0);return u.subarray(0,I<0?u.length:I).toString("utf8")||null}}catch{return null}}function F(){return r=>{try{let t=b("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
3
3
  `)[1];return t&&t.trim().split(/\s+/)[0]||null}catch{return null}}}function k(){return r=>{try{let t=b("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
4
4
  `)[1];if(!t)return null;let e=t.trim().split(/\s+/),i=Number(e[2]);return Number.isFinite(i)&&i>1?i:null}catch{return null}}}var d=1,N="SOOTSIM_CLI_CURRENT_SIM_PATH",W=["SOOTSIM_CLI_IDENTITY","AGENTBUS_SESSION","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"],$=/^(tmux|screen)/i;function g(r,n=20){let t=r,e=m(r);if(!e||e<=1)return null;for(let i=0;i<n;i++){let o=C(e);if(o&&$.test(o))return t;let s=m(e);if(!s||s<=1)return e;t=e,e=s}return e}function Y(){for(let n of W){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=g(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function H(){return Y().key}function tr(){return g(process.ppid)}function a(){if(process.env[N])return V(process.env[N]);let r=H();return U(w(),`sootsim-current-sim-${r}.json`)}function J(){let r=a();if(!A(r))return null;try{let n=JSON.parse(M(r,"utf8"));return n.version!==d||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(f(r,{force:!0}),null):{version:d,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return f(r,{force:!0}),null}}function nr(){return J()?.simId||null}function er(r){let n=r.trim();if(!n)return;let t=a();v(B(t),{recursive:!0}),h(t,JSON.stringify({version:d,simId:n,updatedAt:new Date().toISOString()},null,2)+`
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{H as I,m as B,n as E,o as y,t as v,v as A}from"./chunk-ZSWQLDDQ.js";import{h,l as N,m as P}from"./chunk-HIWE4YYN.js";var q={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function U(e){return e.includes("--json")}function Y(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{H as I,m as B,n as E,o as y,t as v,v as A}from"./chunk-XYMOH3HP.js";import{h,l as N,m as P}from"./chunk-U6OCMLMU.js";var q={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function U(e){return e.includes("--json")}function Y(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
3
3
  `)}function V(e){process.stderr.write(`${e}
4
4
  `)}function b(e,t=Date.now()){let r=new Date(e),n=`${S(r.getHours())}:${S(r.getMinutes())}:${S(r.getSeconds())}`,s=t-e;if(s<0)return n;let o=Math.round(s/1e3);return o<60?`${n} +${o}s`:o<3600?`${n} +${Math.round(o/60)}m`:o<86400?`${n} +${Math.round(o/3600)}h`:`${n} +${Math.round(o/86400)}d`}function S(e){return e<10?`0${e}`:String(e)}async function D(e,t,...r){return N(e,`__sootsimTest.${t}`,...r)}async function k(e,t,...r){return P(e,`SootSim.bridges.mainShell.${t}`,...r)}async function z(e,t={}){try{let r=await D(e,"waitForScreenTransitions",q);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 K(e,t,r,...n){let s=Date.now()+Math.max(0,r);for(;;)try{return await k(e,t,...n)}catch(o){if(!I(o)||Date.now()>=s)throw o;await w(50)}}async function Q(e,t,r,n={}){let s=n.attempts??30,o=n.intervalMs??500,l=n.minNodeCount??10;for(let a=0;a<s;a++){let u=h(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let c=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>l)return{bridge:u,count:c}}catch{}u.close(),await w(o)}return null}async function X(e,t,r,n={}){let s=n.timeoutMs??8e3,o=n.intervalMs??250,l=Date.now()+s;for(;Date.now()<l;){let a=h(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await a.send({type:"evaluate",code:"1"}),a}catch{a.close()}await w(o)}return null}async function Z(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,s=t.pollIntervalMs??200,o=Date.now(),l=o+r,a=-1,u=o,c=null,d=!1,m={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,flag:void 0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",errors:0};for(;Date.now()<l;){try{let i=await e.send({type:"evaluate",code:B}),g=Date.now()-o,f=Number(i?.nodes)||0,$=Number(i?.targets)||0,x=Number(i?.errors)||0,C=i?.flag===!0,p=i?.externalReady,T=typeof i?.loadingText=="string"?i.loadingText.trim():"",W=typeof i?.externalStatus=="string"?i.externalStatus.trim():"",M=typeof i?.externalError=="string"?i.externalError.trim():"",R=typeof i?.externalError=="string"&&M.length>0;if(c=p,d=R,f!==a&&(a=f,u=g),m={ready:!1,source:"timeout",elapsedMs:g,nodes:f,targets:$,flag:i?.flag,loadingText:T,externalReady:typeof p=="boolean"?p:null,externalStatus:W,externalError:M,errors:x},C&&p!==!1&&!R&&!T&&y({nodes:f,targets:$})&&g-u>=E)return{...m,ready:!0,source:"flag"};if(g>=n&&x>0&&!C)return{...m,ready:!1,source:"error-bail"}}catch{}await w(s)}return c!==!1&&!d&&!m.loadingText&&y(m)?{...m,ready:!0,source:"nodes-fallback"}:{...m,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}function O(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function _(e,t,...r){return e.send({type:"call",path:`__sootsimTest.${t}`,args:r})}async function F(e,t={}){let r=await e.send({type:"evaluate",code:A});if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.errors)||0),s=Math.max(0,Number(r.warnings)||0);if(n===0&&s===0)return;let o=[];if(n>0&&o.push(`${n} console error${n===1?"":"s"}`),s>0&&o.push(`${s} console warning${s===1?"":"s"}`),console.log(`
5
5
  console: ${o.join(", ")}`),t.errorsCommand&&console.log(` inspect: ${t.errorsCommand}`),s>0&&t.warningsCommand&&console.log(` inspect: ${t.warningsCommand}`),!t.includeTail||n===0)return;let l=await v(e,5);if(!(!Array.isArray(l)||l.length===0)){console.log(`
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{G as R,H as f,I as x,K as w,l as g,u as $,x as b}from"./chunk-ZGM7N2AV.js";import{spawn as E}from"child_process";import k from"crypto";import o from"fs";import u from"path";import{Readable as C}from"stream";import{pipeline as T}from"stream/promises";var _="https://sootbean.com",U="SOOTSIM_CDN_ORIGIN",D="SOOTSIM_RUNTIME_CHANNEL",P="SOOTSIM_RUNTIME_VERSION",X="https://sootsim.com/changelog";function y(){try{let e=JSON.parse(o.readFileSync(b(),"utf8"));return e&&typeof e=="object"?e:{}}catch{return{}}}function d(e){let n=y();return(e||process.env[U]||n.cdnOrigin||_).replace(/\/+$/,"")}function S(e){let n=y();return e||process.env[D]||n.runtimeChannel||"stable"}function O(){let e=process.env[P];if(e&&e.trim())return e.trim();let n=y();return typeof n.runtimeVersion=="string"&&n.runtimeVersion.trim()?n.runtimeVersion.trim():null}function A(e){let n=new URL(`${d(e)}/runtimes/manifest.json`);return n.searchParams.set("t",String(Date.now())),n.toString()}function j(e,n){return`${d(n)}/runtimes/sootsim-runtime-${e}.tar.gz`}async function I(e){let n=A(e),i=await fetch(n,{headers:{Accept:"application/json"}});if(!i.ok)throw new Error(`manifest fetch failed: ${i.status} ${i.statusText} (${n})`);return await i.json()}function L(e,n={}){let i=S(n.channel),t=n.version||O()||e.channels[i]?.latest;if(!t)throw new Error(`no version specified and channel '${i}' has no latest entry in the manifest`);let s=e.versions[t];if(!s)throw new Error(`version ${t} not found in manifest; available: ${Object.keys(e.versions).slice(-10).join(", ")||"(none)"}`);return{version:t,channel:i,entry:s}}async function N(e={}){R();let n=d(e.cdnOrigin),i=await I(n),{version:t,channel:s,entry:r}=L(i,e),c=g(t),a=e.setActive!==!1;if(!e.force&&o.existsSync(u.join(c,"index.html")))return a&&x(t),{version:t,channel:s,cdnOrigin:n,runtimeDir:c,installed:!1,activated:a,manifest:i};let h=r.tarball||j(t,n),m=u.join($(),`sootsim-runtime-${t}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${t}\u2026
3
+ `),await F(h,m),process.stderr.write(`sootsim: extracting runtime ${t}\u2026
4
+ `);let v=await G(m);if(v!==r.sha256)throw o.rmSync(m,{force:!0}),new Error(`sha256 mismatch for runtime ${t}: expected ${r.sha256}, actual ${v}`);let l=u.join(u.dirname(c),`.installing-${t}-${process.pid}`);o.rmSync(l,{recursive:!0,force:!0}),o.mkdirSync(l,{recursive:!0});try{if(await H(m,l),!o.existsSync(u.join(l,"index.html")))throw new Error(`extracted tarball for runtime ${t} is missing index.html`);o.rmSync(c,{recursive:!0,force:!0}),o.renameSync(l,c)}catch(p){throw o.rmSync(l,{recursive:!0,force:!0}),p}return a&&x(t),{version:t,channel:s,cdnOrigin:n,runtimeDir:c,installed:!0,activated:a,manifest:i}}async function Y(e={}){R();let n=d(e.cdnOrigin),i=S(e.channel),t=O();if(t){let p=f(),V=o.existsSync(u.join(g(t),"index.html"));if(p===t&&V)return{checked:!0,updated:!1,reason:`runtime is pinned to ${t}`,activeVersion:p,latestVersion:t};let M=await N({version:t,channel:i,cdnOrigin:n,setActive:!1});return{checked:!0,updated:!0,reason:`runtime is pinned to ${t}`,activeVersion:t,latestVersion:t,install:M}}let s=await I(n),r=s.channels[i]?.latest;if(!r)return{checked:!0,updated:!1,reason:`channel '${i}' has no latest runtime`,activeVersion:f()};if(!s.versions[r])return{checked:!0,updated:!1,reason:`manifest is missing version ${r}`,activeVersion:f(),latestVersion:r};let a=f(),h=a?g(a):null,m=h?o.existsSync(u.join(h,"index.html")):!1;if(!(!a||!m||w(r,a)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:a,latestVersion:r};let l=await N({version:r,channel:i,cdnOrigin:n,setActive:!1});return{checked:!0,updated:!0,activeVersion:r,latestVersion:r,install:l}}async function Z(e={}){let n=f(),i=O();if(i)return{active:n,latest:i,pinned:i,outdated:n!==i};try{let t=await I(d(e.cdnOrigin)),s=S(e.channel),r=t.channels[s]?.latest??null,c=!!(r&&(!n||w(r,n)>0));return{active:n,latest:r,pinned:null,outdated:c}}catch{return{active:n,latest:null,pinned:null,outdated:!1}}}async function F(e,n){let i=await fetch(e);if(!i.ok||!i.body)throw new Error(`download failed: ${i.status} ${i.statusText} (${e})`);o.mkdirSync(u.dirname(n),{recursive:!0});let t=`${n}.partial`;try{await T(C.fromWeb(i.body),o.createWriteStream(t)),o.renameSync(t,n)}catch(s){try{o.unlinkSync(t)}catch{}throw s}}function G(e){return new Promise((n,i)=>{let t=k.createHash("sha256"),s=o.createReadStream(e);s.on("data",r=>t.update(r)),s.on("error",i),s.on("end",()=>n(t.digest("hex")))})}function H(e,n){return new Promise((i,t)=>{let s=E("tar",["-xzf",e,"-C",n],{stdio:["ignore","inherit","inherit"]});s.on("error",t),s.on("exit",r=>{r===0?i():t(new Error(`tar exited with code ${r}`))})})}export{_ as a,X as b,d as c,S as d,O as e,I as f,N as g,Y as h,Z as i};
@@ -0,0 +1 @@
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b as d}from"./chunk-OK7QEDHD.js";import{execSync as c}from"child_process";function p(e){try{return c(e,{stdio:["ignore","pipe","ignore"],timeout:3e3,encoding:"utf8"}).trim()||null}catch{return null}}function o(e){let n=e?.trim();return!n||!/^\d+$/.test(n)?null:Number(n)}function m(){let e=process.env.GITHUB_ACTIONS==="true",n=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim(),[r,u]=n.includes("/")?n.split("/",2):[null,null];if(e){let t=process.env.GITHUB_REF?.match(/^refs\/pull\/(\d+)\//)?.[1];return{owner:r,repo:u,branch:process.env.GITHUB_HEAD_REF?.trim()||process.env.GITHUB_REF_NAME?.trim()||null,commitSha:process.env.GITHUB_SHA?.trim()||null,githubUsername:process.env.GITHUB_ACTOR?.trim()||null,pullRequestNumber:o(process.env.SOOT_PR_NUMBER)??o(t),githubRunId:process.env.GITHUB_RUN_ID?.trim()||null,source:"ci"}}let i=p("git rev-parse --abbrev-ref HEAD");return{owner:r,repo:u,branch:i==="HEAD"?null:i,commitSha:p("git rev-parse HEAD"),githubUsername:null,pullRequestNumber:o(process.env.SOOT_PR_NUMBER),githubRunId:null,source:"cli"}}function g(e){if(e.length===0)return{stepCount:null,failedStepIndex:null};let n=e.find(r=>r.status==="failure");return{stepCount:e.length,failedStepIndex:n?n.stepIndex:null}}function b(e){return e.auth?e.uploadedShare?!0:e.auth.kind==="github"||process.env.GITHUB_ACTIONS==="true":!1}async function R(e){let n=e.auth??a();if(!n)return null;let r=m(),u=e.owner??(n.kind==="github"?n.owner:null)??r.owner,i=e.repo??(n.kind==="github"?n.repo:null)??r.repo;try{let t=await fetch(`${e.origin.replace(/\/$/,"")}/api/sootsim/test-runs`,{method:"POST",headers:{"content-type":"application/json",authorization:d(n)},body:JSON.stringify({kind:e.kind,source:r.source,name:e.name??void 0,prompt:e.prompt??void 0,summary:e.summary??void 0,status:e.status,failureMessage:e.failureMessage??void 0,previewShareId:e.previewShareId??void 0,owner:u??void 0,repo:i??void 0,branch:r.branch??void 0,commitSha:r.commitSha??void 0,githubUsername:r.githubUsername??void 0,pullRequestNumber:r.pullRequestNumber??void 0,githubRunId:r.githubRunId??void 0,stepCount:e.stepCount??void 0,failedStepIndex:e.failedStepIndex??void 0,durationMs:e.durationMs??void 0,flowYamlSizeBytes:e.flowYamlSizeBytes??void 0})});if(!t.ok){let s=await t.text().catch(()=>"");return console.warn(` warn: run registration failed: /api/sootsim/test-runs ${t.status}${s?`: ${s.slice(0,200)}`:""}`),null}let l=await t.json();return l.run?.id?{id:l.run.id,previewUrl:l.run.previewUrl??null,traceUrl:l.run.traceUrl??null}:(console.warn(" warn: run registration returned no id"),null)}catch(t){return console.warn(` warn: run registration failed: ${t instanceof Error?t.message:String(t)}`),null}}export{g as a,b,R as c};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var m={"--help":{type:"boolean",short:"-h"},"--version":{type:"boolean",short:"-V"},"--verbose":{type:"boolean",short:"-v"},"--port":{type:"number",short:"-p"},"--device":{type:"string",short:"-d"},"--theme":{type:"string",short:"-t"},"--headless":{type:"boolean"},"--driver":{type:"string"},"--sim":{type:"string"},"--session":{type:"string"},"--tab":{type:"string"}},p=new Set(["list","describe","find","get","do","wait","network","logs","shell"]),b=new Set(["do","get","wait","shell","debug"]),d=new Set(["test","detox","maestro","flow","record","storage","perf","screenshot","mode","inspect","debug","timeline","what-happened","shell","assert","device","open","list","use","claim","close","compat","desktop","login","logout","auth","setup","serve","daemon","runtime","upgrade","version","skill","config","app-fonts","agent-wrapper","agent",...p]);function h(c){let r=c.slice(2),e={command:null,commandArgs:[],globalFlags:{},help:!1,version:!1,verbose:!1},s=0;for(;s<r.length;){let o=r[s];if(o==="--"){e.commandArgs.push(...r.slice(s+1));break}let i=Object.entries(m).find(([l,t])=>l===o||t.short===o);if(i){let[l,t]=i,a=l.replace(/^--/,"");if(t.type==="boolean")e.globalFlags[a]=!0,s++;else{let n=r[s+1];if(n===void 0||n.startsWith("-")){console.error(` warning: ${o} requires a value`),s++;continue}if(t.type==="number"){let g=Number(n);if(Number.isNaN(g)){console.error(` warning: ${o} requires a number, got "${n}"`),s+=2;continue}e.globalFlags[a]=g}else e.globalFlags[a]=n;s+=2}continue}if(!e.command&&!o.startsWith("-")){let l=o.indexOf("-");if(l>0){let t=o.slice(0,l),a=o.slice(l+1);if(b.has(t)&&a.length>0){e.command=t;let n=r.slice(s+1);e.commandArgs=[a,...n[0]==="--"?n.slice(1):n];break}}if(d.has(o)){e.command=o;let t=r.slice(s+1);e.commandArgs=t[0]==="--"?t.slice(1):t;break}e.commandArgs=r.slice(s);break}e.commandArgs.push(o),s++}return e.help=!!e.globalFlags.help,e.version=!!e.globalFlags.version,e.verbose=!!e.globalFlags.verbose,e}export{p as a,h as b};
@@ -0,0 +1,29 @@
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as k,b as O,c as x,e as m,f as I,g as h}from"./chunk-PELEQURX.js";import{d as R}from"./chunk-U6OCMLMU.js";import{G as v,H as a,I as y,J as u,K as b,l as w,z as d}from"./chunk-ZGM7N2AV.js";import S from"fs";import{WebSocket as N}from"ws";async function J(t,e={}){let[s,...n]=t;if(!s||s==="--help"||s==="-h"){A();return}switch(s){case"install":return T(n,e);case"list":case"ls":return _(n);case"use":return C(n);case"remove":case"rm":return U(n);case"which":case"active":return E();case"pin":return F(n);case"unpin":return P();case"notes":case"changelog":return G(n);default:console.error(` unknown runtime subcommand: ${s}`),A(),process.exit(1)}}function A(){console.log(`
3
+ sootsim runtime \u2014 manage engine runtimes under ~/.sootsim/runtimes/
4
+
5
+ usage:
6
+ sootsim runtime install [version] install a version (default: pin or channel latest)
7
+ sootsim runtime list show installed + available versions
8
+ sootsim runtime use <version> switch active runtime
9
+ sootsim runtime pin [version] pin the runtime (stops background updates moving it)
10
+ sootsim runtime unpin clear the pin and follow channel latest again
11
+ sootsim runtime remove <version> delete an installed runtime
12
+ sootsim runtime which print active runtime version
13
+ sootsim runtime notes print hosted release notes URL
14
+
15
+ flags:
16
+ --channel <name> channel to resolve 'latest' from (default: stable)
17
+ --force reinstall even if the version is already on disk
18
+ --set-active=false do not switch active runtime after install
19
+
20
+ environment:
21
+ SOOTSIM_CDN_ORIGIN override the CDN base URL (default: ${k})
22
+
23
+ examples:
24
+ sootsim runtime install
25
+ sootsim runtime install 1.2.3
26
+ sootsim runtime install --channel beta
27
+ sootsim runtime use 1.2.3
28
+ sootsim runtime notes
29
+ `)}async function T(t,e){let{version:s,flags:n}=M(t),o=n.channel??e.channel??"stable",l=n.force===!0,r=n.setActive!==!1;v(),console.log("sootsim runtime install"),console.log(` cdn: ${x()}`);try{let i=await h({version:s,channel:o,force:l,setActive:r});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),r&&await f(i.version)}catch(i){console.error(` ${p(i)}`),process.exit(1)}}async function f(t){y(t),console.log(` active: ${t}`),await L(t)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${t})`)}async function L(t){let{isDaemonLockfileFresh:e,readDaemonLockfile:s}=await import("./home-paths-WWFDX6YU.js"),n=s();if(!e(n))return!1;let o=R();return new Promise(l=>{let r=!1,i=!1,g=D=>{r||(r=!0,l(D))},c=new N(`ws://127.0.0.1:${o}`,{handshakeTimeout:800}),$=setTimeout(()=>{try{c.close()}catch{}g(i)},1500);c.on("open",()=>{try{c.send(JSON.stringify({type:"runtime:use",version:t,id:0})),i=!0}catch{}setTimeout(()=>{try{c.close()}catch{}},100)}),c.on("close",()=>{clearTimeout($),g(i)}),c.on("error",()=>{clearTimeout($),g(!1)})})}async function _(t){v();let e=u(),s=a(),n=m();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let o of e)console.log(` ${o===s?"*":" "} ${o}${o===n?" (pinned)":""}`);n&&!e.includes(n)&&console.log(`pinned: ${n} (not installed \u2014 run \`sootsim runtime install\`)`);try{let o=await I();console.log("available (latest per channel):");for(let[r,i]of Object.entries(o.channels))console.log(` ${r.padEnd(8)} ${i.latest}`);let l=Object.keys(o.versions).sort(b).reverse();if(l.length>1){console.log("hosted versions:");for(let r of l)console.log(` ${r}`)}}catch(o){console.log(`available: (could not fetch manifest: ${p(o)})`)}}async function C(t){let e=t[0];e||(console.error(" usage: sootsim runtime use <version>"),process.exit(1));let s=u();s.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${s.join(", ")||"(none)"}`),console.error(` run \`sootsim runtime install ${e}\` first`),process.exit(1)),await f(e)}async function U(t){let e=t[0];e||(console.error(" usage: sootsim runtime remove <version>"),process.exit(1)),a()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `sootsim runtime use <other>` first, or install another version"),process.exit(1));let n=w(e);if(!S.existsSync(n)){console.error(` ${e} is not installed`);return}S.rmSync(n,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function E(){let t=a();if(!t){console.log(" no active runtime");return}console.log(t)}async function F(t){let e=t[0];if(!e){let n=m();n?console.log(` runtime pinned to ${n}`):(console.log(" no pin \u2014 runtime follows channel latest"),console.log(" usage: sootsim runtime pin <version>"));return}if(d({runtimeVersion:e}),console.log(` pinned runtime to ${e}`),u().includes(e)){a()!==e&&await f(e);return}try{let n=await h({version:e,setActive:!1});console.log(n.installed?` installed ${n.version}`:` already installed at ${n.runtimeDir}`),await f(e)}catch(n){console.error(` ${p(n)}`),console.error(` pin saved, but ${e} could not be installed \u2014 check \`sootsim runtime list\` for hosted versions`),process.exit(1)}}async function P(){let t=m();if(!t){console.log(" no pin set");return}d({runtimeVersion:void 0}),console.log(` unpinned (was ${t}) \u2014 runtime follows channel latest again`),console.log(" run `sootsim upgrade` to move to the latest now")}async function G(t){t.length>0&&(console.error(" usage: sootsim runtime notes"),process.exit(1));let e=a();e&&console.log(` active runtime: v${e}`),console.log(` release notes: ${O}`)}function M(t){let e={},s=[];for(let n=0;n<t.length;n++){let o=t[n];if(o==="--channel"&&n+1<t.length){e.channel=t[n+1],n++;continue}if(o.startsWith("--channel=")){e.channel=o.slice(10);continue}if(o==="--force"){e.force=!0;continue}if(o==="--set-active=false"||o==="--no-set-active"){e.setActive=!1;continue}s.push(o)}return{version:s[0]??null,flags:e}}function p(t){return t instanceof Error?t.message:String(t)}export{J as a};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as f}from"./chunk-AHJ2WJST.js";import{a as C,d as W,f as x}from"./chunk-CHVGDYQJ.js";import{J as y,K as w,L as I,M as S}from"./chunk-ORIISY22.js";import{WebSocket as v}from"ws";function L(){let i=w();if(i&&S(i))return{source:"dev-bridge",bridgePort:i.bridgePort,shellBaseUrl:i.shellPort?`http://localhost:${i.shellPort}/`:f};let r=y();return r&&I(r)?{source:"daemon",bridgePort:r.bridgePort,shellBaseUrl:r.runtimePort>0?`http://localhost:${r.runtimePort}/`:f}:{source:"default",bridgePort:7668,shellBaseUrl:f}}function E(i){let r=w();if(r&&S(r)&&r.bridgePort===i)return{source:"dev-bridge",shellBaseUrl:r.shellPort?`http://localhost:${r.shellPort}/`:f};let e=y();return e&&I(e)&&e.bridgePort===i?{source:"daemon",shellBaseUrl:e.runtimePort>0?`http://localhost:${e.runtimePort}/`:f}:null}function q(i){let r;try{let l=new URL(i);r=l.port?Number(l.port):l.protocol==="https:"?443:80}catch{return null}if(!Number.isFinite(r)||r<=0)return null;let e=w();if(e&&S(e)&&(e.shellPort===r||e.runtimePort===r||e.bridgePort===r))return e.bridgePort;let d=y();return d&&I(d)&&(d.runtimePort===r||d.bridgePort===r)?d.bridgePort:null}function O(){return L().bridgePort}function H(i,r){let e=E(i),d=e?.source==="dev-bridge"?"dev bridge":e?.source==="daemon"?"daemon bridge":"bridge",l=e?`${e.source}.json`:"no lockfile",t=r??e?.shellBaseUrl;process.stderr.write(` \u2192 ${d} :${i} (${t?`shell ${t}, `:""}${l})
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as f}from"./chunk-JLOAWSX6.js";import{a as C,d as W,f as x}from"./chunk-OXQOPTTB.js";import{M as y,N as w,O as I,P as S}from"./chunk-ZGM7N2AV.js";import{WebSocket as v}from"ws";function L(){let i=w();if(i&&S(i))return{source:"dev-bridge",bridgePort:i.bridgePort,shellBaseUrl:i.shellPort?`http://localhost:${i.shellPort}/`:f};let r=y();return r&&I(r)?{source:"daemon",bridgePort:r.bridgePort,shellBaseUrl:r.runtimePort>0?`http://localhost:${r.runtimePort}/`:f}:{source:"default",bridgePort:7668,shellBaseUrl:f}}function E(i){let r=w();if(r&&S(r)&&r.bridgePort===i)return{source:"dev-bridge",shellBaseUrl:r.shellPort?`http://localhost:${r.shellPort}/`:f};let e=y();return e&&I(e)&&e.bridgePort===i?{source:"daemon",shellBaseUrl:e.runtimePort>0?`http://localhost:${e.runtimePort}/`:f}:null}function q(i){let r;try{let l=new URL(i);r=l.port?Number(l.port):l.protocol==="https:"?443:80}catch{return null}if(!Number.isFinite(r)||r<=0)return null;let e=w();if(e&&S(e)&&(e.shellPort===r||e.runtimePort===r||e.bridgePort===r))return e.bridgePort;let d=y();return d&&I(d)&&(d.runtimePort===r||d.bridgePort===r)?d.bridgePort:null}function O(){return L().bridgePort}function H(i,r){let e=E(i),d=e?.source==="dev-bridge"?"dev bridge":e?.source==="daemon"?"daemon bridge":"bridge",l=e?`${e.source}.json`:"no lockfile",t=r??e?.shellBaseUrl;process.stderr.write(` \u2192 ${d} :${i} (${t?`shell ${t}, `:""}${l})
3
3
  `)}var k=class extends Error{lock;constructor(r,e){super(r),this.name="BridgeSimLockedError",this.lock=e}};function M(i){return i==="flag"?"via --sim":i==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function J(i,r={}){let e=new Set,d=r.port??O(),l=r.commandTimeoutMs??15e3,t,m="none",B=new Set(r.stripBooleanFlags??[]),h=new Set(r.stripValueFlags??[]);for(let n=0;n<i.length;n++){let a=i[n];if(a==="--port"||a==="-p"){e.add(n),n+1<i.length&&(e.add(n+1),d=Number(i[n+1])),n++;continue}if(a.startsWith("--port=")){e.add(n),d=Number(a.slice(7));continue}if(a==="--timeout"){e.add(n),n+1<i.length&&(e.add(n+1),l=Number(i[n+1])),n++;continue}if(a==="--sim"||a==="--session"||a==="--tab"){e.add(n),n+1<i.length&&(e.add(n+1),t=i[n+1]?.trim()||void 0,m="flag"),n++;continue}let s=a.startsWith("--sim=")?a.slice(6):a.startsWith("--session=")?a.slice(10):a.startsWith("--tab=")?a.slice(6):void 0;if(s!==void 0){e.add(n),t=s.trim()||void 0,m="flag";continue}if(B.has(a)){e.add(n);continue}h.has(a)&&(e.add(n),n+1<i.length&&e.add(n+1),n++)}if(!t){let n=W();n&&(t=n.trim()||void 0,m="saved")}return{positional:i.filter((n,a)=>!e.has(a)),wsPort:d,simId:t,simIdSource:m,commandTimeoutMs:l}}function U(i,r={}){let e=1,d=r.commandTimeoutMs??15e3,l=new Map,t=new v(`ws://localhost:${i}`),m=C(),B=new Promise((s,o)=>{t.on("open",()=>{try{t.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:m.key,cliIdentitySource:m.source,cliLabel:r.cliLabel}))}catch{}s()}),t.on("error",c=>{let g=c.message?`: ${c.message}`:"";o(new Error(`could not connect to ws://localhost:${i}${g}`))})}),h=!1,n=!1;function a(s,o){if(n||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||s.startsWith("bridge:")||s==="focus"||s==="close")return;n=!0;let c=o??"primary",g=M(o?r.simIdSource:"none");process.stderr.write(` \u2192 ${c} (${g})
4
4
  `)}return t.on("message",s=>{let o;try{o=JSON.parse(s.toString())}catch{return}if(o.id===0)return;let c=l.get(o.id);c&&(l.delete(o.id),o._otherCliCount>0&&!h&&(h=!0,process.stderr.write(`
5
5
  \u26A0 ${o._otherCliCount} other CLI identity/identities are driving this sim
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var o=!0,e="public beta",t=e,n="we send anonymous error and dependency data while you use it";export{o as a,e as b,t as c,n as d};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{execFileSync as d,spawn as g}from"child_process";import{existsSync as m}from"fs";import{homedir as h}from"os";import{join as C}from"path";var f=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","~/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","~/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","~/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","~/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Arc.app/Contents/MacOS/Arc","~/Applications/Arc.app/Contents/MacOS/Arc"],O=["/usr/bin/google-chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/microsoft-edge","/usr/bin/brave-browser","/snap/bin/chromium"],w=["C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe","C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"],U=["google-chrome","chromium","chromium-browser","microsoft-edge","brave-browser"],M=["chrome","msedge","brave"];function A(r){return r.startsWith("~/")?C(h(),r.slice(2)):r}function a(r){for(let n of r){let o=A(n);if(m(o))return o}return null}function x(r,n){try{let e=d(n==="win32"?"where":"which",[r],{encoding:"utf8",timeout:1500,stdio:["ignore","pipe","ignore"]}).trim();return e?e.split(/\r?\n/)[0]:null}catch{return null}}function c(r=process.platform){let n=process.env.CHROME_PATH||process.env.CHROMIUM_PATH;if(n&&m(n))return n;let o=a(r==="darwin"?f:r==="win32"?w:O);if(o)return o;let e=r==="win32"?M:U;for(let t of e){let i=x(t,r);if(i)return i}return null}function p(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform;return n.newWindow?s(r,{...n,platform:o,newWindow:!0}):o==="darwin"?{command:"open",args:n.background===!1?[r]:["-g",r],via:"system"}:o==="win32"?{command:"cmd",args:["/c","start","",r],via:"system"}:{command:"xdg-open",args:[r],via:"system"}}function s(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform,e="chromiumBinary"in n?n.chromiumBinary:c(o);if(!e)throw new Error("browser launch requires Chrome, Chromium, Edge, Brave, or Arc");let t=[];return n.newWindow!==!1&&t.push("--new-window"),t.push(r),{command:e,args:t,via:"chromium",target:e}}async function l(r,n,o){return new Promise((e,t)=>{let i=g(r,n,{detached:o,stdio:"ignore"});i.once("error",t),i.once("spawn",()=>{o&&i.unref(),e(i.pid)})})}async function u(r,n={}){let o=p(r,n),e=await l(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function b(r,n={}){let o=s(r,n),e=await l(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function v(r,n={}){await u(r,n)}export{c as a,u as b,b as c,v as d};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as l}from"./chunk-FITJFYBO.js";import{A as o,B as s}from"./chunk-ORIISY22.js";function c(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function p(){if(c())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function u(){try{return s()}catch{return"anonymous-cli"}}function d(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:u():u()}function f(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:d(t),properties:n,timestamp:new Date().toISOString()}}var r=[],a=!1;async function i(){if(r.length===0)return;let e=p();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(f);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function I(){a||(a=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function y(e){if(c())return;I();let t=null;try{t=l()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function m(){await i()}export{y as a,m as b};
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as l}from"./chunk-6M56UHEY.js";import{A as o,B as s}from"./chunk-ZGM7N2AV.js";function c(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function p(){if(c())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function u(){try{return s()}catch{return"anonymous-cli"}}function d(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:u():u()}function f(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:d(t),properties:n,timestamp:new Date().toISOString()}}var r=[],a=!1;async function i(){if(r.length===0)return;let e=p();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(f);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function I(){a||(a=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function y(e){if(c())return;I();let t=null;try{t=l()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function m(){await i()}export{y as a,m as b};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{execFileSync as h,spawn as g}from"child_process";import{existsSync as s,readdirSync as k}from"fs";import{dirname as m,join as l,resolve as a}from"path";import{fileURLToPath as v}from"url";var c;function p(){if(c!==void 0)return c;try{c=m(v(import.meta.resolve("sootsim-engine/package.json")))}catch{c=null}return c}var I="dev.sootsim.simulator";function x(){let n=p();if(!n)return null;let e=l(n,"dist-electron/main.cjs");if(!s(e))return null;let i=D(n);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:n}:null}function b(){let n=p();return n?s(l(n,"src-electron/main.ts")):!1}function D(n){let e=n;for(let i=0;i<6;i++){let t=l(e,"node_modules/.bin/electron");if(s(t))return t;let r=m(e);if(r===e)break;e=r}return null}function C(){let n=p(),i=["/Applications/sootsim.app",a(process.env.HOME||"","Applications/sootsim.app"),...n?[a(n,"app/sootsim.app")]:[]].find(t=>s(t));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let t=h("mdfind",[`kMDItemCFBundleIdentifier == "${I}"`],{encoding:"utf8",timeout:3e3}).trim();if(t)return{path:t.split(`
3
3
  `)[0],platform:"darwin",kind:"mac-app"}}catch{}return null}function f(n){if(!s(n))return null;let e=k(n).filter(i=>i.startsWith("sootsim")&&i.endsWith(".AppImage")).sort().reverse()[0];return e?l(n,e):null}function w(){let n=p(),i=[a(process.env.HOME||"","Applications/sootsim.AppImage"),a(process.env.HOME||"",".local/bin/sootsim.AppImage"),"/opt/sootsim/sootsim.AppImage","/opt/sootsim/sootsim",...n?[a(n,"app/sootsim.AppImage"),a(n,"release/linux-unpacked/sootsim")]:[]].find(r=>s(r));if(i)return{path:i,platform:"linux",kind:i.endsWith(".AppImage")?"linux-appimage":"linux-binary"};let t=n?f(a(n,"app"))||f(a(n,"release")):null;return t?{path:t,platform:"linux",kind:"linux-appimage"}:null}function A(){let n=x();if(n)return n;if(b()){let e=p(),i=l(e,"dist-electron/main.cjs");return s(i)?console.error(` no node_modules/.bin/electron found near ${e}. run \`bun install\`.`):console.error(` dist-electron/main.cjs missing in ${e}.
4
4
  run: bun run --cwd packages/sootsim-engine build:electron-main
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  function C(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r){let s=t.indexOf(n);if(s>=0&&t[s+1]){let o=Number(t[s+1]);if(Number.isFinite(o))return Math.max(100,o)}}return e}var x=new Set(["tap","double-tap","tap-text","tap-id","long-press","touch"]);function S(t){return typeof t=="string"&&x.has(t)}async function v(t){return await t.send({type:"evaluate",code:"window.__sootsimEngineState?.inspectActive === true"})===!0}async function H(t,e){if(!S(e))return!1;try{return await v(t)}catch{return!1}}async function W(t){let e=await t.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof e=="number"?e:0}}async function B(t,e=5){let r=await t.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${e}))()`});return{depth:e,tree:r}}async function F(t){let e=await t.send({type:"evaluate",code:"window.location.href"});return{url:typeof e=="string"?e:""}}async function j(t,e){let r=`(async () => {
3
3
  const t = window.__sootsimTest
4
4
  const mainShell = window.SootSim?.bridges?.mainShell
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as ce}from"./chunk-XAFLM5JS.js";import{b as Rt,c as Et,k as Pt}from"./chunk-ENY46QHT.js";import{a as oe,b as P,c as D,d as Ie,e as ie,f as V,g as de,h as ge,i as Mt,j as Ft,k as Te,l as Ot}from"./chunk-F5TOTCUW.js";import{A as wt,B as xt,E as $t,G as St,I as ue,J as vt,P as We,a as ve,b as nt,c as rt,d as it,e as at,f as lt,g as ct,h as ut,i as dt,j as pt,k as Be,l as Ce,q as je,r as mt,s as ft,t as fe,u as gt,v as ke,w as Le,x as yt,y as ht,z as bt}from"./chunk-ZSWQLDDQ.js";import{e as kt,g as _t,i as It,j as Tt,k as Nt,l as _e}from"./chunk-HIWE4YYN.js";import{a as tt}from"./chunk-GBUUYMPP.js";import{a as Ae,c as De,d as Q}from"./chunk-SVM25PDV.js";import{c as ot}from"./chunk-AHJ2WJST.js";import{b as st}from"./chunk-CHVGDYQJ.js";function qe(e){return`(async () => {
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as ce}from"./chunk-G5GRLVYA.js";import{b as Rt,c as Et,k as Pt}from"./chunk-K3CRSIGS.js";import{a as oe,b as P,c as D,d as Ie,e as ie,f as V,g as de,h as ge,i as Mt,j as Ft,k as Te,l as Ot}from"./chunk-P4GJL7OH.js";import{A as wt,B as xt,E as $t,G as St,I as ue,J as vt,P as We,a as ve,b as nt,c as rt,d as it,e as at,f as lt,g as ct,h as ut,i as dt,j as pt,k as Be,l as Ce,q as je,r as mt,s as ft,t as fe,u as gt,v as ke,w as Le,x as yt,y as ht,z as bt}from"./chunk-XYMOH3HP.js";import{e as kt,g as _t,i as It,j as Tt,k as Nt,l as _e}from"./chunk-U6OCMLMU.js";import{a as tt}from"./chunk-RVOF6RIE.js";import{a as Ae,c as De,d as Q}from"./chunk-LKJ5LA6K.js";import{c as ot}from"./chunk-JLOAWSX6.js";import{b as st}from"./chunk-OXQOPTTB.js";function qe(e){return`(async () => {
3
3
  const bridge = globalThis.SootSim && globalThis.SootSim.bridges && globalThis.SootSim.bridges.hotRemount
4
4
  if (!bridge || typeof bridge.reloadExternalApp !== 'function') return false
5
5
  await bridge.reloadExternalApp({ resetStorage: ${e?"true":"false"} })
@@ -519,7 +519,7 @@ import{a as ce}from"./chunk-XAFLM5JS.js";import{b as Rt,c as Et,k as Pt}from"./c
519
519
  `);console.log(`${t??""}
520
520
 
521
521
  ${n}
522
- `),process.exit(0)}let F=c.wsPort,N=c.simId,L=c.simIdSource,M=c.commandTimeoutMs;if(f==="get"&&p==="diagnosis"){let x=a.indexOf("diagnosis"),t=x>=0?[...a.slice(0,x),...a.slice(x+1)]:a,{runDiagnose:n}=await import("./diagnose-HZZMVPQZ.js"),r=await n(["recent",...t],o);process.exitCode=r;return}if(f==="do"&&p==="scan"){let{runCamera:x}=await import("./camera-5OOLGGLN.js");await x(a,{port:o.port});return}if(p==="list"&&a.some(x=>x==="--drivers"||x==="-D")){let{buildDriverListRows:x}=await import("./drivers-7ZM3KW22.js"),t=x();console.log(` available drivers (${t.length}):
522
+ `),process.exit(0)}let F=c.wsPort,N=c.simId,L=c.simIdSource,M=c.commandTimeoutMs;if(f==="get"&&p==="diagnosis"){let x=a.indexOf("diagnosis"),t=x>=0?[...a.slice(0,x),...a.slice(x+1)]:a,{runDiagnose:n}=await import("./diagnose-NACPOTYX.js"),r=await n(["recent",...t],o);process.exitCode=r;return}if(f==="do"&&p==="scan"){let{runCamera:x}=await import("./camera-CYXCASB3.js");await x(a,{port:o.port});return}if(p==="list"&&a.some(x=>x==="--drivers"||x==="-D")){let{buildDriverListRows:x}=await import("./drivers-G2YZR6G6.js"),t=x();console.log(` available drivers (${t.length}):
523
523
  `);let n=Math.max(...t.map(i=>i.id.length),6),r=Math.max(...t.map(i=>i.kind.length),4);for(let i of t){let d=i.available?"\u2713":"\u2717",m=i.id.padEnd(n),g=i.kind.padEnd(r);console.log(` ${d} ${m} ${g} ${i.description}`),i.available&&i.detail?console.log(` ${i.detail}`):!i.available&&i.reason&&console.log(` unavailable: ${i.reason}`)}return}let u=It(c),j=N||"default",A=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","storage-clear","list","wait","sleep"]),E=200;function H(x){let t=x.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let r=/<title[^>]*>([^<]+)<\/title>/i.exec(x)?.[1]?.trim(),i=/<body[^>]*>([\s\S]*?)<\//i.exec(x)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),d=r||i||"html error page";return`<html ${x.length}B> "${d}" (body elided \u2014 add --json for the full payload)`}return t.length<=E?t:`${t.slice(0,E)}\u2026 (+${t.length-E} more bytes)`}function U(x){let t=x.displayUrl||x.url;return x.status!=null?`${x.method} ${t} -> ${x.status}${x.statusText?` ${x.statusText}`:""}`:x.error?`${x.method} ${t} -> ${x.error}`:`${x.method} ${t}`}async function S(x){let t=me()?400:200;try{let{settled:n,elapsed:r}=await se({bridge:x,maxMs:t,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
524
524
  `)}catch{}}function O(x,t){console.error(` tap failed: ${x} stayed visible but did not receive a hittable press after ${t.attempts} attempt${t.attempts===1?"":"s"}`),t.result&&console.error(` last result: ${JSON.stringify(t.result)}`)}async function J(){try{return await u.send({type:"evaluate",code:`(() => ({
525
525
  console: ${ke},
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{createInterface as i}from"readline";var c=()=>i({input:process.stdin,output:process.stdout});function s(o){return new Promise(n=>{let r=c();r.question(o,t=>{r.close(),n(t.trim())})})}async function u(o,n=!0){let r=n?"[Y/n]":"[y/N]";if(!process.stdin.isTTY)return console.log(` ${o} ${r} ${n?"y":"n"} (non-interactive)`),n;let t=await s(` ${o} ${r} `);return t===""?n:t.toLowerCase().startsWith("y")}async function a(o,n){console.log(`
3
3
  ${o}
4
4
  `);for(let e=0;e<n.length;e++)console.log(` ${e+1}. ${n[e]}`);if(console.log(),!process.stdin.isTTY)return console.log(` choose [1-${n.length}]: 1 (non-interactive)`),0;let r=await s(` choose [1-${n.length}]: `),t=parseInt(r,10);return t>=1&&t<=n.length?t-1:0}export{u as a,a as b};
@@ -0,0 +1,7 @@
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{randomUUID as I}from"node:crypto";import r from"node:fs";import{homedir as E}from"node:os";import o from"node:path";var _="SOOTSIM_HOME",P="active",j="daemon.json",F="dev-bridge.json",w="config.json",L=3e4;function u(){let e=process.env[_];return e&&e.length>0?o.resolve(e):o.join(E(),".sootsim")}function R(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return r.realpathSync(t).includes(`${o.sep}packages${o.sep}sootsim${o.sep}`)}catch{return!1}}function T(){return process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1"?!1:process.env.IS_TAMAGUI_DEV==="1"}function z(){return R()||T()}function f(){return o.join(u(),"runtimes")}function B(e){return o.join(f(),e)}function O(){return o.join(f(),P)}function D(){return o.join(u(),"electron")}function Q(){return o.join(D(),"userData")}function Z(e){return o.join(D(),e)}function C(){return o.join(u(),"profiles")}function M(){return o.join(u(),"daemon-app")}function $(){return o.join(M(),"SootSim Daemon.app")}function ee(){return o.join($(),"Contents","MacOS","sootsim-daemon")}function U(){return o.join(u(),"cache")}function m(){return o.join(u(),j)}function d(){return o.join(u(),F)}function x(){return o.join(u(),w)}function h(){try{let e=r.readFileSync(x(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function N(e){l();let t=h(),i={...t,...e};e.settings&&typeof e.settings=="object"&&(i.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let c=`${x()}.tmp`;return r.writeFileSync(c,`${JSON.stringify(i,null,2)}
3
+ `,"utf8"),r.renameSync(c,x()),i}function te(){return h().telemetry!==!1}function re(){let e=h().anonymousId;if(typeof e=="string"&&e.trim())return e;let t=`anon-cli-${I()}`;return N({anonymousId:t}),t}function ne(e){N({telemetry:e})}function g(){return o.join(u(),"runtime-upgraded.json")}function oe(e){l();let t=`${g()}.tmp`;r.writeFileSync(t,`${JSON.stringify(e)}
4
+ `,"utf8"),r.renameSync(t,g())}function ie(){try{let e=r.readFileSync(g(),"utf8");r.unlinkSync(g());let t=JSON.parse(e);return typeof t?.to!="string"||!t.to?null:{from:typeof t.from=="string"?t.from:null,to:t.to,at:typeof t.at=="number"?t.at:0}}catch{return null}}function l(){r.mkdirSync(u(),{recursive:!0}),r.mkdirSync(f(),{recursive:!0}),r.mkdirSync(D(),{recursive:!0}),r.mkdirSync(C(),{recursive:!0}),r.mkdirSync(U(),{recursive:!0})}function J(){try{let e=r.readFileSync(O(),"utf8").trim();return e.length>0?e:null}catch{return null}}function se(e){r.mkdirSync(f(),{recursive:!0}),r.writeFileSync(O(),`${e}
5
+ `,"utf8")}function ue(){try{return r.readdirSync(f(),{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).sort(V)}catch{return[]}}function V(e,t){let i=s=>{let a=s.indexOf("-"),p=a>=0?s.slice(0,a):s,A=a>=0?s.slice(a+1):"",k=p.split(".").map(b=>Number.parseInt(b,10));return k.some(b=>!Number.isFinite(b))?[[Number.POSITIVE_INFINITY],s]:[k,A]},[c,n]=i(e),[v,S]=i(t);for(let s=0;s<Math.max(c.length,v.length);s++){let a=c[s]??0,p=v[s]??0;if(a!==p)return a-p}return n===S?0:n?S?n<S?-1:1:-1:1}function ce(){let e=J();if(!e)return null;let t=B(e);try{if(r.statSync(t).isDirectory())return t}catch{}return null}var y=16*1024;function H(){try{let e=r.openSync(m(),"r");try{let t=Buffer.alloc(y),i=r.readSync(e,t,0,y,0),c=t.subarray(0,i).toString("utf8"),n=JSON.parse(c);return n&&n.schema===1&&typeof n.pid=="number"&&typeof n.bridgePort=="number"&&typeof n.runtimePort=="number"&&typeof n.startedAt=="number"&&typeof n.heartbeatAt=="number"?n:null}finally{r.closeSync(e)}}catch{return null}}function ae(){try{let e=r.openSync(d(),"r");try{let t=Buffer.alloc(y),i=r.readSync(e,t,0,y,0),c=t.subarray(0,i).toString("utf8"),n=JSON.parse(c);return n&&n.schema===1&&n.source==="vite-dev"&&typeof n.pid=="number"&&typeof n.bridgePort=="number"&&typeof n.runtimePort=="number"&&typeof n.cwd=="string"&&typeof n.startedAt=="number"&&typeof n.heartbeatAt=="number"&&(n.shellPort===void 0||typeof n.shellPort=="number")?n:null}finally{r.closeSync(e)}}catch{return null}}function G(e,t=Date.now()){if(!e||t-e.heartbeatAt>L)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function fe(e,t=Date.now()){if(!e||t-e.heartbeatAt>L)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function K(e){l();let t=`${m()}.tmp`;r.writeFileSync(t,`${JSON.stringify(e,null,2)}
6
+ `,"utf8"),r.renameSync(t,m())}function le(e){l();let t=`${d()}.tmp`;r.writeFileSync(t,`${JSON.stringify(e,null,2)}
7
+ `,"utf8"),r.renameSync(t,d())}function pe(e){l();let t=H();return t&&G(t)&&t.pid!==e.pid?!1:(K(e),!0)}function me(){try{r.unlinkSync(m())}catch{}}function de(){try{r.unlinkSync(d())}catch{}}export{_ as a,P as b,j as c,F as d,w as e,L as f,u as g,R as h,T as i,z as j,f as k,B as l,O as m,D as n,Q as o,Z as p,C as q,M as r,$ as s,ee as t,U as u,m as v,d as w,x,h as y,N as z,te as A,re as B,ne as C,g as D,oe as E,ie as F,l as G,J as H,se as I,ue as J,V as K,ce as L,H as M,ae as N,G as O,fe as P,K as Q,le as R,pe as S,me as T,de as U};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-MQHSWXDS.js";import"./chunk-ZRWVLKFL.js";export{a as getCliVersion};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-NIDV74L2.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-ZRWVLKFL.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim compat \u2014 check package compatibility
4
4
 
5
5
  usage:
@@ -20,7 +20,7 @@ examples:
20
20
  sootsim compat react-native-reanimated
21
21
  sootsim compat --json
22
22
  sootsim compat --brief
23
- `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-QP4KDHR6.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-QP4KDHR6.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
23
+ `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-5OLZXKVF.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-5OLZXKVF.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
24
24
  sootsim compatibility report
25
25
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
26
26
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as i,C as s,x as t}from"./chunk-ORIISY22.js";import"./chunk-NIDV74L2.js";function l(){let e=i();console.log(` telemetry is ${e?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function r(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${t()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A as i,C as s,x as t}from"./chunk-ZGM7N2AV.js";import"./chunk-ZRWVLKFL.js";function l(){let e=i();console.log(` telemetry is ${e?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function r(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${t()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
3
3
  sootsim config \u2014 manage local CLI preferences
4
4
 
5
5
  usage:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.201 | (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,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-ENY46QHT.js";import"./chunk-63EDUOKZ.js";import"./chunk-O56GZV3H.js";import"./chunk-D6CTB275.js";import"./chunk-S2AQ4WGX.js";import"./chunk-HVSDT56M.js";import"./chunk-F5TOTCUW.js";import"./chunk-ZSWQLDDQ.js";import"./chunk-HIWE4YYN.js";import"./chunk-7GG4TZ4L.js";import"./chunk-CPVTNQAS.js";import"./chunk-YOPEO6SA.js";import"./chunk-NYNAI5PO.js";import"./chunk-T6WXCSWP.js";import"./chunk-AHJ2WJST.js";import"./chunk-CHVGDYQJ.js";import"./chunk-ORIISY22.js";import"./chunk-423YVBZK.js";import"./chunk-NIDV74L2.js";export{f as buildOpenUrl,e as buildShellUrl,s as closeSimsBulk,b as normalizeDeepLinkTarget,t as planBulkCloseTargets,k as playwrightHostPidForSim,h as printConnectedSims,c as resolveBundleTarget,d as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,r as runClaimCommand,u as runCloseCommand,q as runFocusCommand,n as runLinkCommand,o as runOpenCommand,p as runUseCommand,l as signalDriverLaunchConnected,g as summarizeSimUrl,m as terminatePlaywrightHostsForSims,i as waitForSimMatch,j as waitForSimMatchOrHostExit};
1
+ /*! sootsim v0.1.203 | (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,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-K3CRSIGS.js";import"./chunk-BBOFH45Q.js";import"./chunk-QKDII5UB.js";import"./chunk-GMVAXDHH.js";import"./chunk-GTBF3M2H.js";import"./chunk-4NHPXU3X.js";import"./chunk-P4GJL7OH.js";import"./chunk-XYMOH3HP.js";import"./chunk-U6OCMLMU.js";import"./chunk-BL67OSVN.js";import"./chunk-WVF2EDZF.js";import"./chunk-UZGLGCLM.js";import"./chunk-FF3C57T5.js";import"./chunk-A3FIOG7U.js";import"./chunk-JLOAWSX6.js";import"./chunk-OXQOPTTB.js";import"./chunk-ZGM7N2AV.js";import"./chunk-62AKBZTO.js";import"./chunk-ZRWVLKFL.js";export{f as buildOpenUrl,e as buildShellUrl,s as closeSimsBulk,b as normalizeDeepLinkTarget,t as planBulkCloseTargets,k as playwrightHostPidForSim,h as printConnectedSims,c as resolveBundleTarget,d as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,r as runClaimCommand,u as runCloseCommand,q as runFocusCommand,n as runLinkCommand,o as runOpenCommand,p as runUseCommand,l as signalDriverLaunchConnected,g as summarizeSimUrl,m as terminatePlaywrightHostsForSims,i as waitForSimMatch,j as waitForSimMatchOrHostExit};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e}from"./chunk-NHSO4473.js";import"./chunk-WSOZGPIX.js";import"./chunk-6M56UHEY.js";import"./chunk-BJJXNQHO.js";import"./chunk-GYTATFQA.js";import"./chunk-LKJ5LA6K.js";import"./chunk-A3FIOG7U.js";import"./chunk-JLOAWSX6.js";import"./chunk-OXQOPTTB.js";import"./chunk-ZGM7N2AV.js";import"./chunk-MQHSWXDS.js";import"./chunk-UJ64GJSZ.js";import"./chunk-62AKBZTO.js";import"./chunk-ZRWVLKFL.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{f,m as T}from"./chunk-F5TOTCUW.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-ZSWQLDDQ.js";import{g as D,i as O,k as x}from"./chunk-HIWE4YYN.js";import"./chunk-AHJ2WJST.js";import"./chunk-CHVGDYQJ.js";import"./chunk-ORIISY22.js";import"./chunk-NIDV74L2.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{f,m as T}from"./chunk-P4GJL7OH.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-XYMOH3HP.js";import{g as D,i as O,k as x}from"./chunk-U6OCMLMU.js";import"./chunk-JLOAWSX6.js";import"./chunk-OXQOPTTB.js";import"./chunk-ZGM7N2AV.js";import"./chunk-ZRWVLKFL.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
3
3
  sootsim debug \u2014 drive __sootsimDebug from the terminal
4
4
 
5
5
  usage:
@@ -170,7 +170,7 @@ examples:
170
170
  } : null,
171
171
  samples,
172
172
  }
173
- })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-T37ALZRL.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
173
+ })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-ZPVPUSAK.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
174
174
  known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
175
175
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
176
176
  if (!d) return null;
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.201 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-EVCOHQPK.js";import{a as v,h as k}from"./chunk-ENY46QHT.js";import"./chunk-63EDUOKZ.js";import"./chunk-O56GZV3H.js";import"./chunk-D6CTB275.js";import"./chunk-S2AQ4WGX.js";import"./chunk-HVSDT56M.js";import{a as u}from"./chunk-USGQNFAM.js";import"./chunk-F5TOTCUW.js";import"./chunk-ZSWQLDDQ.js";import"./chunk-HIWE4YYN.js";import"./chunk-5GICTRK5.js";import{b as m,g as f,l as h}from"./chunk-7GG4TZ4L.js";import{a as c}from"./chunk-CPVTNQAS.js";import"./chunk-YOPEO6SA.js";import"./chunk-NYNAI5PO.js";import"./chunk-T6WXCSWP.js";import"./chunk-AHJ2WJST.js";import"./chunk-CHVGDYQJ.js";import"./chunk-ORIISY22.js";import"./chunk-423YVBZK.js";import"./chunk-NIDV74L2.js";function I(e){let i=e.indexOf("--port");if(i<0)return;let o=e[i+1],t=o?Number(o):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),t}async function O(e,i){let o=I(e)??i.port;return o?k(String(o)):void 0}async function w(e,i){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-EBH65V62.js";import{a as v,h as k}from"./chunk-K3CRSIGS.js";import"./chunk-BBOFH45Q.js";import"./chunk-QKDII5UB.js";import"./chunk-GMVAXDHH.js";import"./chunk-GTBF3M2H.js";import"./chunk-4NHPXU3X.js";import{a as u}from"./chunk-YP3NIRTK.js";import"./chunk-P4GJL7OH.js";import"./chunk-XYMOH3HP.js";import"./chunk-U6OCMLMU.js";import"./chunk-G5VOIXM7.js";import{b as m,g as f,l as h}from"./chunk-BL67OSVN.js";import{a as c}from"./chunk-WVF2EDZF.js";import"./chunk-UZGLGCLM.js";import"./chunk-FF3C57T5.js";import"./chunk-A3FIOG7U.js";import"./chunk-JLOAWSX6.js";import"./chunk-OXQOPTTB.js";import"./chunk-ZGM7N2AV.js";import"./chunk-62AKBZTO.js";import"./chunk-ZRWVLKFL.js";function I(e){let i=e.indexOf("--port");if(i<0)return;let o=e[i+1],t=o?Number(o):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),t}async function O(e,i){let o=I(e)??i.port;return o?k(String(o)):void 0}async function w(e,i){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim desktop \u2014 launch the desktop companion
4
4
 
5
5
  usage:
@@ -16,7 +16,7 @@ examples:
16
16
  sootsim desktop --port 5173
17
17
  sootsim desktop --profile qa
18
18
  sootsim desktop --driver system
19
- `),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-FSY2ND5S.js");await D(["--yes"]),r=c()}r||process.exit(1)}console.log(` launching ${r.path}`)}let b=await O(e,i),p=await l.launch({url:b,device:i.device,profileId:x,ephemeralProfile:d});p.launched||(console.error(` ${p.message}`),process.exit(1)),console.log(` ${p.message}`)}function y(){console.log(`
19
+ `),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-QZWSSGJV.js");await D(["--yes"]),r=c()}r||process.exit(1)}console.log(` launching ${r.path}`)}let b=await O(e,i),p=await l.launch({url:b,device:i.device,profileId:x,ephemeralProfile:d});p.launched||(console.error(` ${p.message}`),process.exit(1)),console.log(` ${p.message}`)}function y(){console.log(`
20
20
  sootsim desktop \u2014 launch or install the desktop companion
21
21
 
22
22
  usage: