sootsim 0.1.231 → 0.1.232

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 (143) hide show
  1. package/dist-cli/bin.js +4 -4
  2. package/dist-cli/chunks/{agent-AH5KSX6R.js → agent-ZYXBVBKV.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-6KEN4XWE.js → agent-wrapper-T674ITPJ.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-6KSWFR34.js → app-fonts-K7SXZISI.js} +2 -2
  5. package/dist-cli/chunks/{assert-VK3ZNVOE.js → assert-VLBPPU53.js} +2 -2
  6. package/dist-cli/chunks/{auth-K5TSJU4G.js → auth-N2YSIJWG.js} +2 -2
  7. package/dist-cli/chunks/beta-BNWNKZVD.js +2 -0
  8. package/dist-cli/chunks/{camera-V4FPK26J.js → camera-2HISM2VC.js} +2 -2
  9. package/dist-cli/chunks/{chunk-YCAL6N7R.js → chunk-2M62WMJ4.js} +2 -2
  10. package/dist-cli/chunks/{chunk-76NRK5LH.js → chunk-2QLL7ZTJ.js} +2 -2
  11. package/dist-cli/chunks/{chunk-TDEFREVM.js → chunk-3BQN6WRJ.js} +2 -2
  12. package/dist-cli/chunks/{chunk-SHSYOZSW.js → chunk-3LAVER6S.js} +3 -3
  13. package/dist-cli/chunks/{chunk-N5J3NQIA.js → chunk-4URI2MGG.js} +1 -1
  14. package/dist-cli/chunks/{chunk-PYYTNSGW.js → chunk-576MFPKR.js} +2 -2
  15. package/dist-cli/chunks/{chunk-HGXZ5LTS.js → chunk-7BCDBZOP.js} +2 -2
  16. package/dist-cli/chunks/{chunk-NQASQSKK.js → chunk-7VV57LAC.js} +1 -1
  17. package/dist-cli/chunks/chunk-A7RXUZTR.js +1 -0
  18. package/dist-cli/chunks/{chunk-MC32IMHX.js → chunk-AJCLM5JM.js} +1 -1
  19. package/dist-cli/chunks/{chunk-WAUO3ED2.js → chunk-APDLWZH7.js} +3 -3
  20. package/dist-cli/chunks/{chunk-OE6VL4ZA.js → chunk-DEPM3RAJ.js} +2 -2
  21. package/dist-cli/chunks/chunk-DQ3UVIWC.js +1 -0
  22. package/dist-cli/chunks/{chunk-VRTTFRVD.js → chunk-E5KVZJLZ.js} +2 -2
  23. package/dist-cli/chunks/{chunk-SB7INNHS.js → chunk-FVAYMAX3.js} +3 -3
  24. package/dist-cli/chunks/{chunk-P4X4M3ZU.js → chunk-GR3HSBBW.js} +2 -2
  25. package/dist-cli/chunks/{chunk-I3NLVJO7.js → chunk-GSM3KOU7.js} +1 -1
  26. package/dist-cli/chunks/{chunk-FAMEC3A3.js → chunk-H4U7AD3S.js} +2 -2
  27. package/dist-cli/chunks/{chunk-5GMZJIXF.js → chunk-HORIFBHS.js} +2 -2
  28. package/dist-cli/chunks/{chunk-V3TEFUGE.js → chunk-I6PFJTSC.js} +1 -1
  29. package/dist-cli/chunks/{chunk-R6X7MBYT.js → chunk-IQ4GXAZH.js} +3 -3
  30. package/dist-cli/chunks/{chunk-ZVHAYHJO.js → chunk-ITX76FQB.js} +1 -1
  31. package/dist-cli/chunks/{chunk-4XMWRLHS.js → chunk-JLFLM25R.js} +1 -1
  32. package/dist-cli/chunks/{chunk-ADT2LUD2.js → chunk-JSNKI3AX.js} +1 -1
  33. package/dist-cli/chunks/{chunk-HGP47PYK.js → chunk-K26I444J.js} +2 -2
  34. package/dist-cli/chunks/{chunk-SCVX5MDD.js → chunk-K3QNZFXE.js} +1 -1
  35. package/dist-cli/chunks/{chunk-BUQ4OVPF.js → chunk-LL2KRCXL.js} +1 -1
  36. package/dist-cli/chunks/{chunk-AE3BELZM.js → chunk-LUDBC2J3.js} +1 -1
  37. package/dist-cli/chunks/{chunk-NWTNH63K.js → chunk-LZK6NZLU.js} +2 -2
  38. package/dist-cli/chunks/{chunk-2D6RUG3E.js → chunk-M6UUHHFL.js} +2 -2
  39. package/dist-cli/chunks/{chunk-NPCX4IAQ.js → chunk-MXKSDA7J.js} +3 -3
  40. package/dist-cli/chunks/{chunk-4GWETXII.js → chunk-N37Q2X3Z.js} +2 -2
  41. package/dist-cli/chunks/{chunk-7JZVKKSL.js → chunk-NGTUX4OS.js} +2 -2
  42. package/dist-cli/chunks/{chunk-D3ZEKF5O.js → chunk-NQJ6EHGW.js} +2 -2
  43. package/dist-cli/chunks/{chunk-L7STWTUD.js → chunk-QCVNJSEN.js} +1 -1
  44. package/dist-cli/chunks/{chunk-BCUTZMYU.js → chunk-RMVUXVHN.js} +1 -1
  45. package/dist-cli/chunks/{chunk-EYBZL4LO.js → chunk-SBDYAXSF.js} +2 -2
  46. package/dist-cli/chunks/{chunk-77PV2FU7.js → chunk-SJCQEGF4.js} +1 -1
  47. package/dist-cli/chunks/{chunk-75XS6H6B.js → chunk-TA3JNI7A.js} +1 -1
  48. package/dist-cli/chunks/{chunk-V7J6D2DS.js → chunk-UPVCNKFF.js} +2 -2
  49. package/dist-cli/chunks/{chunk-DATFU5M3.js → chunk-UQWDGKY7.js} +1 -1
  50. package/dist-cli/chunks/{chunk-2WAYJJIL.js → chunk-W7BAZFHN.js} +2 -2
  51. package/dist-cli/chunks/{chunk-VPMLXKVQ.js → chunk-XHHT4CMD.js} +2 -2
  52. package/dist-cli/chunks/{chunk-NNXM4S37.js → chunk-Z3VIVTZS.js} +1 -1
  53. package/dist-cli/chunks/{chunk-DVQS7XW4.js → chunk-ZEFNMBSK.js} +1 -1
  54. package/dist-cli/chunks/cli-version-7VDEZHWX.js +2 -0
  55. package/dist-cli/chunks/{compat-3ZU42KR4.js → compat-2K4KZ6YB.js} +3 -3
  56. package/dist-cli/chunks/{config-2M6LE7GM.js → config-QXPCZYU7.js} +2 -2
  57. package/dist-cli/chunks/{control-D7OTV6TJ.js → control-JFUKBGDB.js} +2 -2
  58. package/dist-cli/chunks/daemon-5HXDKPKX.js +2 -0
  59. package/dist-cli/chunks/{debug-JMJNOHJD.js → debug-6CCPBFAD.js} +3 -3
  60. package/dist-cli/chunks/{desktop-KB2WRU2C.js → desktop-3N7MIW4A.js} +3 -3
  61. package/dist-cli/chunks/{detox-EKPVQJDG.js → detox-QWVPGFZB.js} +2 -2
  62. package/dist-cli/chunks/{device-KWIWZRFU.js → device-KIB4TN52.js} +2 -2
  63. package/dist-cli/chunks/{diagnose-GAZMES24.js → diagnose-M6MNCYNQ.js} +2 -2
  64. package/dist-cli/chunks/drivers-W2PMIOIX.js +2 -0
  65. package/dist-cli/chunks/{film-BZWIEUKD.js → film-SEJDGF7B.js} +3 -3
  66. package/dist-cli/chunks/flow-M2S2LX67.js +2 -0
  67. package/dist-cli/chunks/help-YH2Q2TSP.js +2 -0
  68. package/dist-cli/chunks/{hidden-runtime-alias-Z2W6KIXU.js → hidden-runtime-alias-X3ZNKKZX.js} +2 -2
  69. package/dist-cli/chunks/{home-paths-SEZOWRM2.js → home-paths-HEIXYMSP.js} +2 -2
  70. package/dist-cli/chunks/inspect-H3PXV6CS.js +2 -0
  71. package/dist-cli/chunks/install-desktop-QVUU3MYS.js +2 -0
  72. package/dist-cli/chunks/{login-PSX27F6J.js → login-PM66V7R2.js} +4 -4
  73. package/dist-cli/chunks/{logout-NI5E3G7P.js → logout-F5QZ4ZGB.js} +2 -2
  74. package/dist-cli/chunks/{maestro-PPFQ5C56.js → maestro-FD7BPFRS.js} +3 -3
  75. package/dist-cli/chunks/{maestro-generate-6VJUC7Y2.js → maestro-generate-DBQRAIL5.js} +3 -3
  76. package/dist-cli/chunks/{mode-7K2ZK3L3.js → mode-6P7F24QX.js} +2 -2
  77. package/dist-cli/chunks/optional-demo-registry-3R4ERASC.js +2 -0
  78. package/dist-cli/chunks/{perf-RBYOKWVM.js → perf-WJH3CUPE.js} +2 -2
  79. package/dist-cli/chunks/{record-LHANNPUS.js → record-5LYWSKDK.js} +3 -3
  80. package/dist-cli/chunks/runtime-7NRBQTTI.js +2 -0
  81. package/dist-cli/chunks/{screenshot-command-RUDD2TRH.js → screenshot-command-7KLNMCZY.js} +3 -3
  82. package/dist-cli/chunks/{screenshots-capture-VVZYN5RO.js → screenshots-capture-7L4TFISK.js} +2 -2
  83. package/dist-cli/chunks/{serve-AE4VMFKM.js → serve-HTFVXDL2.js} +3 -3
  84. package/dist-cli/chunks/{setup-W6FVHUX5.js → setup-NZNQPY6O.js} +3 -3
  85. package/dist-cli/chunks/{skills-T4R4SJEB.js → skills-6BNHSBOU.js} +2 -2
  86. package/dist-cli/chunks/{storage-63GA4N7U.js → storage-L2RXZZFJ.js} +2 -2
  87. package/dist-cli/chunks/store-GUBFOLLP.js +2 -0
  88. package/dist-cli/chunks/telemetry-KUIS2R6S.js +2 -0
  89. package/dist-cli/chunks/{timeline-BA6UP4YU.js → timeline-KQS4WCD2.js} +2 -2
  90. package/dist-cli/chunks/{upgrade-FF3QGMPI.js → upgrade-RSSNHKBP.js} +2 -2
  91. package/dist-cli/chunks/upload-BGBBPPQA.js +2 -0
  92. package/dist-cli/chunks/{version-C4LNO3QB.js → version-KIRBZT2R.js} +2 -2
  93. package/dist-cli/chunks/{web-43QRKPAU.js → web-7L2S4STL.js} +2 -2
  94. package/dist-cli/chunks/{what-happened-43KTITUH.js → what-happened-RGVPA3IL.js} +2 -2
  95. package/dist-lib/agent-daemon-client.cjs +1 -1
  96. package/dist-lib/agent-events.cjs +1 -1
  97. package/dist-lib/agent-identity.cjs +1 -1
  98. package/dist-lib/agent-sessions.cjs +1 -1
  99. package/dist-lib/attached-projects.cjs +1 -1
  100. package/dist-lib/auth/shared-session.cjs +1 -1
  101. package/dist-lib/backend-origin.cjs +1 -1
  102. package/dist-lib/beta.cjs +1 -1
  103. package/dist-lib/beta.mjs +1 -1
  104. package/dist-lib/bridge-constants.cjs +1 -1
  105. package/dist-lib/cli-constants.cjs +1 -1
  106. package/dist-lib/config.cjs +1 -1
  107. package/dist-lib/detox/index.cjs +1 -1
  108. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  109. package/dist-lib/home-paths.cjs +1 -1
  110. package/dist-lib/host/bridge-host.cjs +9 -1
  111. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  112. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  113. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  114. package/dist-lib/host/websocket-proxy.cjs +1 -1
  115. package/dist-lib/index.cjs +1 -1
  116. package/dist-lib/jump-to-source-babel.cjs +1 -1
  117. package/dist-lib/menu.cjs +1 -1
  118. package/dist-lib/menu.mjs +1 -1
  119. package/dist-lib/metro.cjs +1 -1
  120. package/dist-lib/profiles.cjs +1 -1
  121. package/dist-lib/render-mode.cjs +1 -1
  122. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  123. package/dist-lib/sdk.cjs +1 -1
  124. package/dist-lib/sdk.mjs +1 -1
  125. package/dist-lib/skills.cjs +9 -1
  126. package/dist-lib/vite.cjs +1 -1
  127. package/package.json +1 -1
  128. package/src/host/bridge-host.ts +12 -0
  129. package/dist-cli/chunks/beta-GG4SKXJH.js +0 -2
  130. package/dist-cli/chunks/chunk-J3U5NHJ6.js +0 -1
  131. package/dist-cli/chunks/chunk-XE4BKSAN.js +0 -1
  132. package/dist-cli/chunks/cli-version-JHTQTAP7.js +0 -2
  133. package/dist-cli/chunks/daemon-PBEEDQBA.js +0 -2
  134. package/dist-cli/chunks/drivers-SQSCB6TD.js +0 -2
  135. package/dist-cli/chunks/flow-RWWESFRX.js +0 -2
  136. package/dist-cli/chunks/help-77N2EWKA.js +0 -2
  137. package/dist-cli/chunks/inspect-DFW3SSR2.js +0 -2
  138. package/dist-cli/chunks/install-desktop-X4PMZYLV.js +0 -2
  139. package/dist-cli/chunks/optional-demo-registry-IFCUM2NS.js +0 -2
  140. package/dist-cli/chunks/runtime-QX5QTV2U.js +0 -2
  141. package/dist-cli/chunks/store-RRGC4ZGZ.js +0 -2
  142. package/dist-cli/chunks/telemetry-FABN6VZA.js +0 -2
  143. package/dist-cli/chunks/upload-GPOYAPIE.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as Ue,b as _e,c as Pe}from"./chunk-TDEFREVM.js";import{c as Be}from"./chunk-AE3BELZM.js";import{d as Ee}from"./chunk-SCVX5MDD.js";import{d as Ae}from"./chunk-4XMWRLHS.js";import{g as Re,i as Ie,k as B}from"./chunk-FAMEC3A3.js";import{a as ke,b as E}from"./chunk-VRTTFRVD.js";import{a as xe}from"./chunk-2D6RUG3E.js";import{createHash as ht}from"crypto";import{readFileSync as w}from"fs";import Ne from"path";import{gzipSync as ue,gunzipSync as yt}from"zlib";function Le(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 ot,constants as it}from"node:zlib";var at=9;function $e(e){return ot(e,{params:{[it.BROTLI_PARAM_QUALITY]:at}})}function ae(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function lt(e){let t=ae(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function ut(e,t=8,r){let s=0,i=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;s<a;){let u=e[s++];await lt(u),i++,r?.(i,a)}}))}function ct(e,t,r,s){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&&s?.eventsBytes&&i.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&i.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&i.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&i.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&i.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let a of e.snapshots??[]){let u=s?.snapshotBytes?.get(a.id);u&&i.push({url:a.putUrl,contentType:a.contentType,bytes:u})}return i}function dt(e){return e.replace(/\/+$/,"")}var K=class extends Error{constructor(r,s,i,a=""){super(r);this.status=s;this.phase=i;this.responseText=a;this.name="PresignedUploadError"}};async function Fe(e){let t=dt(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-contrast-admin-upload-bypass"]=e.adminBypassToken);let s=ae(3e4,"init"),i;try{i=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!i.ok){let M=await i.text().catch(()=>"");throw new K(`init failed: ${i.status} ${M.slice(0,200)}`,i.status,"init",M)}let a=await i.json(),u=ct(a,e.bundleBytes,e.filesByHash,e.extras);await ut(u,e.concurrency??8,e.onPutProgress);let g=ae(3e4,"finalize"),d;try{d=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:g.signal})}finally{g.cancel()}if(!d.ok){let M=await d.text().catch(()=>"");throw new K(`finalize failed: ${d.status} ${M.slice(0,200)}`,d.status,"finalize",M)}let R=await d.json();return{init:a,finalize:R}}function pt(e){return e!==null&&typeof e=="object"?e:null}function Oe(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function le(e){let t=pt(e);return t?t.schemaVersion===1&&Oe(t.t)!==void 0&&Oe(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function ft(e,t){let r=[];for(let s of e.split(`
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as Ue,b as _e,c as Pe}from"./chunk-3BQN6WRJ.js";import{c as Be}from"./chunk-LUDBC2J3.js";import{d as Ee}from"./chunk-K3QNZFXE.js";import{d as Ae}from"./chunk-JLFLM25R.js";import{g as Re,i as Ie,k as B}from"./chunk-H4U7AD3S.js";import{a as ke,b as E}from"./chunk-E5KVZJLZ.js";import{a as xe}from"./chunk-M6UUHHFL.js";import{createHash as ht}from"crypto";import{readFileSync as w}from"fs";import Ne from"path";import{gzipSync as ue,gunzipSync as yt}from"zlib";function Le(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 ot,constants as it}from"node:zlib";var at=9;function $e(e){return ot(e,{params:{[it.BROTLI_PARAM_QUALITY]:at}})}function ae(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function lt(e){let t=ae(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function ut(e,t=8,r){let s=0,i=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;s<a;){let u=e[s++];await lt(u),i++,r?.(i,a)}}))}function ct(e,t,r,s){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&&s?.eventsBytes&&i.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&i.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&i.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&i.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&i.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let a of e.snapshots??[]){let u=s?.snapshotBytes?.get(a.id);u&&i.push({url:a.putUrl,contentType:a.contentType,bytes:u})}return i}function dt(e){return e.replace(/\/+$/,"")}var K=class extends Error{constructor(r,s,i,a=""){super(r);this.status=s;this.phase=i;this.responseText=a;this.name="PresignedUploadError"}};async function Fe(e){let t=dt(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-contrast-admin-upload-bypass"]=e.adminBypassToken);let s=ae(3e4,"init"),i;try{i=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!i.ok){let M=await i.text().catch(()=>"");throw new K(`init failed: ${i.status} ${M.slice(0,200)}`,i.status,"init",M)}let a=await i.json(),u=ct(a,e.bundleBytes,e.filesByHash,e.extras);await ut(u,e.concurrency??8,e.onPutProgress);let g=ae(3e4,"finalize"),d;try{d=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:g.signal})}finally{g.cancel()}if(!d.ok){let M=await d.text().catch(()=>"");throw new K(`finalize failed: ${d.status} ${M.slice(0,200)}`,d.status,"finalize",M)}let R=await d.json();return{init:a,finalize:R}}function pt(e){return e!==null&&typeof e=="object"?e:null}function Oe(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function le(e){let t=pt(e);return t?t.schemaVersion===1&&Oe(t.t)!==void 0&&Oe(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function ft(e,t){let r=[];for(let s of e.split(`
3
3
  `)){let i=s.trim();if(i)try{let a=JSON.parse(i);t(a)&&r.push(a)}catch{}}return r}function Ce(e){return ft(e,le)}function bt(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}function wt(e){let t=JSON.parse(w(e,"utf8"));if(!Array.isArray(t))throw new Error("snapshot manifest must be an array");let r=new Set;return t.map((s,i)=>{if(s===null||typeof s!="object")throw new Error(`snapshot manifest entry ${i} must be an object`);let a=Reflect.get(s,"id"),u=Reflect.get(s,"label"),g=Reflect.get(s,"path"),d=Reflect.get(s,"t");if(typeof a!="string"||!a||r.has(a))throw new Error(`snapshot manifest entry ${i} has an invalid or duplicate id`);if(typeof g!="string"||!g)throw new Error(`snapshot manifest entry ${i} has no PNG path`);if(typeof d!="number"||!Number.isFinite(d)||d<0)throw new Error(`snapshot manifest entry ${i} has an invalid capture time`);r.add(a);let R=w(g);return{meta:{id:a,label:typeof u=="string"&&u?u:a,kind:"interaction",t:Math.round(d),contentType:"image/png",sizeBytes:R.byteLength},bytes:R}})}var Je=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://contrast.dev",qe=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",de="http://localhost:3000",Mt=2e3;async function Tt(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${de}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(Mt)});if(t.ok||t.status===204||t.status===405)return de}catch{}return Je}function F(e){return e.replace(/\/$/,"")}function St(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 vt(e){try{let t=new URL(e).hostname.toLowerCase();return t==="contrast.dev"||t.endsWith(".contrast.dev")}catch{return!1}}function xt(e,t){return t?F(t):process.env.SOOTSIM_PREVIEW_ORIGIN?F(process.env.SOOTSIM_PREVIEW_ORIGIN):St(e)?F(e):vt(e)?F(qe):F(e)}function kt(){console.log(`
4
4
  sootsim record upload \u2014 publish the current recorded bundle as a /preview/<id> link
5
5
 
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.232 | (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,5 +1,5 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as b}from"./chunk-L7STWTUD.js";import{b as F,e as T,g as A}from"./chunk-DATFU5M3.js";import{M as w,N as S,O as I,P as B}from"./chunk-V3TEFUGE.js";import{WebSocket as W}from"ws";var P=null;function O(){return P||(P=M(),P)}function M(){let i=S();if(i&&B(i))return{source:"dev-bridge",bridgePort:i.bridgePort,shellBaseUrl:i.shellPort?`http://localhost:${i.shellPort}/`:b};let r=w();return r&&I(r)?{source:"daemon",bridgePort:r.bridgePort,shellBaseUrl:r.runtimePort>0?`http://localhost:${r.runtimePort}/`:b}:{source:"default",bridgePort:7668,shellBaseUrl:b}}function U(i){let r=S();if(r&&B(r)&&r.bridgePort===i)return{source:"dev-bridge",shellBaseUrl:r.shellPort?`http://localhost:${r.shellPort}/`:b};let e=w();return e&&I(e)&&e.bridgePort===i?{source:"daemon",shellBaseUrl:e.runtimePort>0?`http://localhost:${e.runtimePort}/`:b}:null}function G(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=S();if(e&&B(e)&&(e.shellPort===r||e.runtimePort===r||e.bridgePort===r))return e.bridgePort;let d=w();return d&&I(d)&&(d.runtimePort===r||d.bridgePort===r)?d.bridgePort:null}function _(){return O().bridgePort}function K(i,r){let e=U(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.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as b}from"./chunk-QCVNJSEN.js";import{b as F,e as T,g as A}from"./chunk-UQWDGKY7.js";import{M as w,N as S,O as I,P as B}from"./chunk-I6PFJTSC.js";import{WebSocket as W}from"ws";var P=null;function O(){return P||(P=M(),P)}function M(){let i=S();if(i&&B(i))return{source:"dev-bridge",bridgePort:i.bridgePort,shellBaseUrl:i.shellPort?`http://localhost:${i.shellPort}/`:b};let r=w();return r&&I(r)?{source:"daemon",bridgePort:r.bridgePort,shellBaseUrl:r.runtimePort>0?`http://localhost:${r.runtimePort}/`:b}:{source:"default",bridgePort:7668,shellBaseUrl:b}}function U(i){let r=S();if(r&&B(r)&&r.bridgePort===i)return{source:"dev-bridge",shellBaseUrl:r.shellPort?`http://localhost:${r.shellPort}/`:b};let e=w();return e&&I(e)&&e.bridgePort===i?{source:"daemon",shellBaseUrl:e.runtimePort>0?`http://localhost:${e.runtimePort}/`:b}:null}function G(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=S();if(e&&B(e)&&(e.shellPort===r||e.runtimePort===r||e.bridgePort===r))return e.bridgePort;let d=w();return d&&I(d)&&(d.runtimePort===r||d.bridgePort===r)?d.bridgePort:null}function _(){return O().bridgePort}function K(i,r){let e=U(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 $=class extends Error{lock;constructor(r,e){super(r),this.name="BridgeSimLockedError",this.lock=e}};function N(i){return i==="flag"?"via --sim":i==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function Q(i,r={}){let e=new Set,d=r.port??_(),l=r.commandTimeoutMs??15e3,t,u="none",v=new Set(r.stripBooleanFlags??[]),p=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,u="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,u="flag";continue}if(v.has(a)){e.add(n);continue}p.has(a)&&(e.add(n),n+1<i.length&&e.add(n+1),n++)}if(!t){let n=T();n&&(t=n.trim()||void 0,u="saved")}return{positional:i.filter((n,a)=>!e.has(a)),wsPort:d,simId:t,simIdSource:u,commandTimeoutMs:l}}function R(i,r={}){let e=1,d=r.commandTimeoutMs??15e3,l=new Map,t=new W(`ws://localhost:${i}`),u=F(),v=new Promise((s,o)=>{t.on("open",()=>{try{t.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:u.key,cliIdentitySource:u.source,cliLabel:r.cliLabel}))}catch{}s()}),t.on("error",c=>{let m=c.message?`: ${c.message}`:"";o(new Error(`could not connect to ws://localhost:${i}${m}`))})}),p=!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",m=N(o?r.simIdSource:"none");process.stderr.write(` \u2192 ${c} (${m})
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&&!p&&(p=!0,process.stderr.write(`
5
5
  \u26A0 ${o._otherCliCount} other CLI identity/identities are driving this sim
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as p}from"./chunk-P4X4M3ZU.js";import{a as c,b as l}from"./chunk-TDEFREVM.js";import{a}from"./chunk-2D6RUG3E.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.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as p}from"./chunk-GR3HSBBW.js";import{a as c,b as l}from"./chunk-3BQN6WRJ.js";import{a}from"./chunk-M6UUHHFL.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,4 +1,4 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
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
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
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}
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as ce}from"./chunk-2WAYJJIL.js";import{b as Et,c as Rt,k as Pt}from"./chunk-76NRK5LH.js";import{a as oe,b as A,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-D3ZEKF5O.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-75XS6H6B.js";import{e as kt,g as _t,i as It,j as Tt,k as Nt,l as _e}from"./chunk-FAMEC3A3.js";import{a as tt}from"./chunk-MC32IMHX.js";import{a as Q}from"./chunk-NWTNH63K.js";import{c as ot}from"./chunk-L7STWTUD.js";import{c as st}from"./chunk-DATFU5M3.js";import{c as Ae,e as De}from"./chunk-BCUTZMYU.js";function qe(e){return`(async () => {
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as ce}from"./chunk-W7BAZFHN.js";import{b as Et,c as Rt,k as Pt}from"./chunk-2QLL7ZTJ.js";import{a as oe,b as A,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-NQJ6EHGW.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-TA3JNI7A.js";import{e as kt,g as _t,i as It,j as Tt,k as Nt,l as _e}from"./chunk-H4U7AD3S.js";import{a as tt}from"./chunk-AJCLM5JM.js";import{a as Q}from"./chunk-LZK6NZLU.js";import{c as ot}from"./chunk-QCVNJSEN.js";import{c as st}from"./chunk-UQWDGKY7.js";import{c as Ae,e as De}from"./chunk-RMVUXVHN.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"} })
@@ -547,7 +547,7 @@ import{a as ce}from"./chunk-2WAYJJIL.js";import{b as Et,c as Rt,k as Pt}from"./c
547
547
  `);console.log(`${t??""}
548
548
 
549
549
  ${n}
550
- `),process.exit(0)}let M=c.wsPort,N=c.simId,j=c.simIdSource,O=c.commandTimeoutMs;if(y==="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-GAZMES24.js"),r=await n(["recent",...t],o);process.exitCode=r;return}if(y==="do"&&p==="scan"){let{runCamera:x}=await import("./camera-V4FPK26J.js");await x(a,{port:o.port});return}if(p==="list"&&a.some(x=>x==="--drivers"||x==="-D")){let{buildDriverListRows:x}=await import("./drivers-SQSCB6TD.js"),t=x();console.log(` available drivers (${t.length}):
550
+ `),process.exit(0)}let M=c.wsPort,N=c.simId,j=c.simIdSource,O=c.commandTimeoutMs;if(y==="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-M6MNCYNQ.js"),r=await n(["recent",...t],o);process.exitCode=r;return}if(y==="do"&&p==="scan"){let{runCamera:x}=await import("./camera-2HISM2VC.js");await x(a,{port:o.port});return}if(p==="list"&&a.some(x=>x==="--drivers"||x==="-D")){let{buildDriverListRows:x}=await import("./drivers-W2PMIOIX.js"),t=x();console.log(` available drivers (${t.length}):
551
551
  `);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),f=i.kind.padEnd(r);console.log(` ${d} ${m} ${f} ${i.description}`),i.available&&i.detail?console.log(` ${i.detail}`):!i.available&&i.reason&&console.log(` unavailable: ${i.reason}`)}return}let u=It(c),L=N||"default",P=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","storage-clear","list","wait","sleep"]),R=200;function K(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<=R?t:`${t.slice(0,R)}\u2026 (+${t.length-R} 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 v(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.
552
552
  `)}catch{}}function F(x,t){if(t.result?.reason==="offscreen"){let{x:n,y:r,screen:i}=t.result;console.error(` tap failed: ${x} resolved to (${Math.round(n)},${Math.round(r)}), outside the ${i?.width}x${i?.height} screen`),console.error(" the node exists but is scrolled out of view \u2014 scroll it on-screen first (sootsim do scroll / swipe), then tap.");return}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:`(() => ({
553
553
  console: ${ke},
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.232 | (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.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.232 | (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.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  function o(e,n,r,a){return{width:3,ringToggle:{top:e[0],height:e[1]},volumeUp:{top:n[0],height:n[1]},volumeDown:{top:r[0],height:r[1]},lock:{top:a[0],height:a[1]}}}var b={width:2.5,lock:{top:188.7,height:68.1},ringToggle:{top:113.2,height:36},volumeUp:{top:188.2,height:68.1},volumeDown:{top:269,height:68.1}},d={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},g={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},i=48;function t(e){return{...e,platform:"ios",navigationBarHeight:0,navigationBarMode:e.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:e.dynamicIsland?e.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:e.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:e.name}}var u={"canvas-workspace":t({name:"Canvas Workspace",width:1440,height:900,scale:1,statusBarHeight:0,homeIndicatorHeight:0,cornerRadius:0,continuousCornerRadius:0,bezelWidth:16,dynamicIsland:null,safeAreaInsets:{top:0,bottom:0,left:0,right:0},iosVersion:"26.4",physicalPPI:110,hardwareButtons:o([185.8,41.7],[258.2,67.6],[344,67.6],[281.5,106.9]),experimental:!0}),"iphone-se":t({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,continuousCornerRadius:0,bezelWidth:28.7,dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:b}),"iphone-14":t({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:46.2,continuousCornerRadius:67.462,bezelWidth:19.5,dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o([141.7,29.7],[205.9,69.6],[289.5,69.6],[228.9,114.5])}),"iphone-15":t({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,bezelWidth:18.2,dynamicIsland:{width:126,height:37.3,top:14.1},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o([171.7,32],[235.8,65.3],[320.5,65.3],[280.6,105.2])}),"iphone-15-plus":t({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,bezelWidth:17.3,dynamicIsland:{width:126,height:37.3,top:11.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o([172.1,33],[236.1,66.6],[321.2,66.6],[281,106.8])}),"iphone-15-pro":t({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,bezelWidth:15.3,dynamicIsland:{width:126,height:38,top:13.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-15-pro-max":t({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,bezelWidth:15.3,dynamicIsland:{width:126,height:38,top:13.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16":t({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,bezelWidth:15.3,dynamicIsland:{width:126,height:37.3,top:11},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-plus":t({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,bezelWidth:15.3,dynamicIsland:{width:126,height:37.3,top:11.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16-pro":t({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,bezelWidth:15.3,dynamicIsland:{width:126,height:38,top:13.5},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-pro-max":t({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61.3,continuousCornerRadius:85.163,bezelWidth:15.4,dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17":t({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,bezelWidth:15.3,dynamicIsland:{width:126,height:37.3,top:14},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-air":t({name:"iPhone Air",width:420,height:912,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:64.6,continuousCornerRadius:88.313,bezelWidth:15.4,dynamicIsland:{width:126,height:38,top:20},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17-pro":t({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,bezelWidth:15.3,dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-pro-max":t({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61.3,continuousCornerRadius:85.163,bezelWidth:15.4,dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"pixel-8":{platform:"android",name:"Pixel 8",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:i,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,continuousCornerRadius:39,bezelWidth:13,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:i,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:d},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,continuousCornerRadius:39,bezelWidth:13,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:48,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:d},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:i,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,continuousCornerRadius:41,bezelWidth:12,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:i,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:d},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:i,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,continuousCornerRadius:36,bezelWidth:8,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:i,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:g},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:i,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,continuousCornerRadius:24,bezelWidth:9,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:i,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:g}},m="iphone-17-pro";function P(e){return u[e]}function p(){return Object.keys(u)}function x(){return p().filter(e=>!u[e].experimental)}var l={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},c={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},R={color:"#25c3ec",blur:120,spread:52,opacity:.34},B="iphone-17-pro";var y=[{name:"white",value:"#ffffff"},{name:"gray-light",value:"#d1d5db"},{name:"gray",value:"#6b7280"},{name:"gray-dark",value:"#3b4350"},{name:"slate",value:"#2a3644"},{name:"black",value:"#000000"},{name:"cyan",value:"#25c3ec"},{name:"blue",value:"#3f7cff"},{name:"teal",value:"#1fc7b4"},{name:"green",value:"#42c95d"},{name:"lime",value:"#92d21b"},{name:"gold",value:"#f5c518"},{name:"orange",value:"#ff912e"},{name:"coral",value:"#ff6f5b"},{name:"red",value:"#ff4f6f"},{name:"berry",value:"#d054ff"},{name:"magenta",value:"#ff4eb8"}],f=Object.fromEntries(y.map(e=>[e.name,e.value]));function C(e){return f[e]??f.gray}function I(e){return Object.prototype.hasOwnProperty.call(l,e)?l[e]:null}function S(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(n=>({...n}))}}function T(e){return Object.prototype.hasOwnProperty.call(c,e)?S(c[e]):null}var h={deviceModel:{type:"enum",default:m,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:p(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:e=>e>=.5&&e<=2},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showTopBar:{type:"boolean",default:!0,description:"show simulator top bar",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(l),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(c),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},alwaysShowLiveWebViews:{type:"boolean",default:!1,description:"always render WebViews as live browser views",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},errorReporting:{type:"boolean",default:!1,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"},onboardingComplete:{type:"boolean",default:!1,description:"first-run onboarding completed",group:"beta"},betaConsentVersion:{type:"number",default:0,description:"last accepted beta telemetry policy version",group:"beta"},detailedTelemetry:{type:"boolean",default:!0,description:"send detailed usage telemetry (sessions, perf samples)",group:"beta"}};function w(){if(typeof window>"u")return{};let e={};try{let n=new URLSearchParams(window.location.search),r=n.get("device");r&&h.deviceModel.options?.includes(r)&&(e.deviceModel=r),n.get("ssMode")==="1"&&(e.screenshotMode=!0);let a=n.get("colorScheme")??n.get("theme");a&&h.colorScheme.options?.includes(a)&&(e.colorScheme=a);let s=n.get("alwaysShowLiveWebViews");s==="1"||s==="true"?e.alwaysShowLiveWebViews=!0:(s==="0"||s==="false")&&(e.alwaysShowLiveWebViews=!1)}catch{}return e}function H(){let e={};for(let[n,r]of Object.entries(h))e[n]=r.default;return Object.assign(e,w()),e}export{R as a,B as b,C as c,I as d,S as e,T as f,u as g,P as h,x as i,h as j,w as k,H as l};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as R,b as U}from"./chunk-VRTTFRVD.js";import{c as F}from"./chunk-V7J6D2DS.js";import{g as N,j as E,r as _,s as v,t as B}from"./chunk-V3TEFUGE.js";import{a as O}from"./chunk-NQASQSKK.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.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as R,b as U}from"./chunk-E5KVZJLZ.js";import{c as F}from"./chunk-UPVCNKFF.js";import{g as N,j as E,r as _,s as v,t as B}from"./chunk-I6PFJTSC.js";import{a as O}from"./chunk-7VV57LAC.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">
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{createHash as b}from"node:crypto";import g from"node:fs";import{createRequire as R}from"node:module";import u from"node:path";var y=/\.(ttf|otf|woff|woff2)$/i;function P(t,n,r){if(!t||typeof t!="object")return;let o=t.fonts;if(Array.isArray(o))for(let i of o)typeof i=="string"&&r.push(i);let e=t[n];if(!e||typeof e!="object")return;let s=e.fonts;if(Array.isArray(s))for(let i of s){if(typeof i=="string"){r.push(i);continue}if(!i||typeof i!="object")continue;let c=i.fontDefinitions;if(Array.isArray(c))for(let a of c){if(!a||typeof a!="object")continue;let p=a.path;typeof p=="string"&&r.push(p)}}}function m(t,n){if(!Array.isArray(t))return[];let r=[];for(let o of t){let e=Array.isArray(o)?o[0]:o;if(typeof e!="string"||!/(^|\/)expo-font$/.test(e))continue;let s=Array.isArray(o)?o[1]??{}:{};P(s,n,r)}return r}function C(t){return t.slice(t.lastIndexOf("/")+1).replace(y,"")}function h(t,n){let r=n.replace(/\/+$/,""),o=new Set,e=[];for(let s of t){let i=s.replace(/^\.\//,"").replace(/^\/+/,"");!i||o.has(i)||(o.add(i),y.test(i)&&e.push({family:C(i),url:`${r}/assets/${i}`}))}return e}var d=R(import.meta.url);function x(t){try{let n=new URL(t),r=n.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return n.origin}catch{}return null}var S=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"];function w(t){for(let n of S)try{if(g.statSync(u.join(t,n)).isFile())return!0}catch{}return!1}var j=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","examples","example"]);function A(t,n){w(t)&&n.push(t);let r;try{r=g.readdirSync(t,{withFileTypes:!0})}catch{return}for(let o of r)o.isDirectory()&&(o.name.startsWith(".")||j.has(o.name)||A(u.join(t,o.name),n))}function _(t){try{return g.statSync(u.join(t,"package.json")).isFile()}catch{return!1}}function I(t){let n=x(t.bundleUrl);if(!n)return[];let r=t.repoDir||process.env.CONTRAST_REPO_DIR,o=r?u.resolve(r):process.cwd();if(!r&&!_(o))return[];let e=[];if(r)A(o,e),e.includes(o)||e.push(o);else{if(!w(o))return[];e.push(o)}if(e.length===0)return[];let s=(t.platform||process.env.CONTRAST_PLATFORM||"ios").toLowerCase(),i=null;try{let l=d.resolve("@expo/config",{paths:[...e,o]}),f=d(l);typeof f.getConfig=="function"&&(i=f.getConfig)}catch{}if(!i)return[];let c;for(let l of e)try{let f=i(l,{skipSDKVersionRequirement:!0});if(f?.exp&&typeof f.exp=="object"){let F=f.exp.plugins;if(Array.isArray(F)){c=f.exp;break}}}catch{}if(!c||typeof c!="object")return[];let a=c.plugins;if(!Array.isArray(a))return[];let p=m(a,s==="android"?"android":"ios");return h(p,n)}async function L(t,n){let r=x(t);if(!r)return null;let o=new AbortController,e=setTimeout(()=>o.abort(),n?.timeoutMs??1500);try{let s=await fetch(`${r}/`,{headers:{"expo-platform":"ios",Accept:"application/json"},signal:o.signal});if(!s.ok)return null;let c=(await s.json())?.extra?.expoClient?._internal?.projectRoot;return typeof c=="string"&&c.length>0?c:null}catch{return null}finally{clearTimeout(e)}}function M(t){return t.map(n=>`${encodeURIComponent(n.url)}::${encodeURIComponent(n.family)}`).join(",")}function k(t){let n=[];for(let r of t.split(",")){let o=r.trim();if(!o)continue;let e=o.indexOf("::"),s=e===-1?o:o.slice(0,e);try{n.push(decodeURIComponent(s))}catch{n.push(s)}}return n.filter(Boolean)}function D(t){let n=(t.split("?")[0].split(".").pop()||"").toLowerCase();return n==="ttf"?"font/ttf":n==="otf"?"font/otf":n==="woff"?"font/woff":n==="woff2"?"font/woff2":"application/octet-stream"}async function N(t,n){let r=[],o=new Set;for(let e of k(t)){let s=b("sha256").update(e).digest("hex");if(!o.has(s)){o.add(s);try{let i=await fetch(e);if(!i.ok){n?.onError?.(e,new Error(`${i.status} ${i.statusText}`));continue}let c=new Uint8Array(await i.arrayBuffer());r.push({url:e,urlhash:s,contentType:D(e),bytes:c}),n?.onStaged?.({url:e,byteLength:c.byteLength})}catch(i){n?.onError?.(e,i)}}}return r}export{I as a,L as b,M as c,N as d};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var c="sootsim-agent-prompt-v1";function r(n){return typeof n=="string"?n.trim():""}function m(n){let e=r(n.text);if(!e)return"";let t=r(n.displayText),s=r(n.inspectSummary),o=r(n.inspectTrace);return!!s||!!o||/[\r\n]/.test(e)||!!t&&t!==e?JSON.stringify({__sootsimAgentPrompt:c,text:e,displayText:t,inspectSummary:s,inspectTrace:o}):e}function u(n){let e=r(n);if(!e)return null;try{let t=JSON.parse(e);if(t.__sootsimAgentPrompt!==c)return{text:e};let s=r(typeof t.text=="string"?t.text:void 0);if(!s)return null;let o=r(typeof t.displayText=="string"?t.displayText:void 0),i=r(typeof t.inspectSummary=="string"?t.inspectSummary:void 0),p=r(typeof t.inspectTrace=="string"?t.inspectTrace:void 0);return{text:s,...o?{displayText:o}:{},...i?{inspectSummary:i}:{},...p?{inspectTrace:p}:{}}}catch{return{text:e}}}export{m as a,u as b};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{createHash as D}from"node:crypto";import y from"node:fs";import{createRequire as I}from"node:module";import h from"node:path";var w=/(^|\/)expo-splash-screen$/,R=/(^|\/)react-native-bootsplash$/;function U(n,e){let r=e.replace(/\/+$/,""),o=n.replace(/^\.\//,"").replace(/^\/+/,"");if(o)return`${r}/assets/${o}`}function d(n,e,r){return r?r(n):U(n,e)}function C(n){if(n==="cover")return"cover";if(n==="contain"||n==="native")return"contain"}function p(n){return typeof n=="string"&&n.length>0?n:void 0}function k(n){return typeof n=="number"&&Number.isFinite(n)?n:void 0}function v(n,e,r){if(!n||typeof n!="object")return null;let o=n,s={source:"expo-splash-screen",backgroundColor:p(o.backgroundColor)??"#ffffff"},l=p(o.image);l&&(s.imageUrl=d(l,e,r));let t=k(o.imageWidth);t!=null&&(s.imageWidthPx=t);let c=C(o.resizeMode);c&&(s.resizeMode=c);let i=o.dark;if(i&&typeof i=="object"){let g=i,u=p(g.backgroundColor),f=p(g.image);(u||f)&&(s.dark={},u&&(s.dark.backgroundColor=u),f&&(s.dark.imageUrl=d(f,e,r)))}return s}function j(n,e,r,o){let a=n[e],s=a&&typeof a=="object"?a.splash:void 0,l=n.splash,t=s&&typeof s=="object"?s:l;if(!t||typeof t!="object")return null;let i={source:"expo-legacy",backgroundColor:p(t.backgroundColor)??"#ffffff",imageWidthPx:k(t.imageWidth)??200,resizeMode:C(t.resizeMode)??"contain"},g=p(t.image);g&&(i.imageUrl=d(g,r,o));let u=t.dark;if(u&&typeof u=="object"){let f=u,S=p(f.backgroundColor),m=p(f.image);(S||m)&&(i.dark={},S&&(i.dark.backgroundColor=S),m&&(i.dark.imageUrl=d(m,r,o)))}return i}function _(n,e,r){if(!n||typeof n!="object")return null;let o=n,a=p(o.logo);if(!a)return null;let s={source:"react-native-bootsplash",backgroundColor:p(o.background)??"#fff",imageUrl:d(a,e,r),imageWidthPx:k(o.logoWidth)??100,resizeMode:"contain"},l=p(o.darkBackground),t=p(o.darkLogo);return(l||t)&&(s.dark={},l&&(s.dark.backgroundColor=l),t&&(s.dark.imageUrl=d(t,e,r))),s}function b(n,e,r,o={}){if(!n||typeof n!="object")return null;let a=n,s=a.plugins,l=null,t=null;if(Array.isArray(s))for(let i of s){let g=Array.isArray(i)?i[0]:i;if(typeof g!="string")continue;let u=Array.isArray(i)?i[1]??{}:{};!l&&w.test(g)?l=v(u,r,o.resolveAssetUrl):!t&&R.test(g)&&(t=_(u,r,o.resolveAssetUrl))}if(l)return l;let c=j(a,e,r,o.resolveAssetUrl);return c||t}var x=I(import.meta.url);function E(n){try{let e=new URL(n),r=e.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return e.origin}catch{}return null}var L=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"];function P(n){for(let e of L)try{if(y.statSync(h.join(n,e)).isFile())return!0}catch{}return!1}var F=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","examples","example"]);function A(n,e){P(n)&&e.push(n);let r;try{r=y.readdirSync(n,{withFileTypes:!0})}catch{return}for(let o of r)o.isDirectory()&&(o.name.startsWith(".")||F.has(o.name)||A(h.join(n,o.name),e))}function M(n){try{return y.statSync(h.join(n,"package.json")).isFile()}catch{return!1}}function H(n){let e=E(n.bundleUrl);if(!e)return null;let r=n.repoDir||process.env.CONTRAST_REPO_DIR,o=r?h.resolve(r):process.cwd();if(!r&&!M(o))return null;let a=[];if(r)A(o,a),a.includes(o)||a.push(o);else{if(!P(o))return null;a.push(o)}if(a.length===0)return null;let s=(n.platform||process.env.CONTRAST_PLATFORM||"ios").toLowerCase(),l=null;try{let c=x.resolve("@expo/config",{paths:[...a,o]}),i=x(c);typeof i.getConfig=="function"&&(l=i.getConfig)}catch{}if(!l)return null;let t;for(let c of a)try{let i=l(c,{skipSDKVersionRequirement:!0});if(i?.exp&&typeof i.exp=="object"){t=i.exp;break}}catch{}return!t||typeof t!="object"?null:b(t,s==="android"?"android":"ios",e)}function J(n){return encodeURIComponent(JSON.stringify(n))}function z(n){if(!n)return null;try{let e=JSON.parse(decodeURIComponent(n));if(!e||typeof e!="object")return null;let r=e;return r.source!=="expo-splash-screen"&&r.source!=="expo-legacy"&&r.source!=="react-native-bootsplash"||typeof r.backgroundColor!="string"?null:e}catch{return null}}function W(n){let e=new Set;return n.imageUrl&&e.add(n.imageUrl),n.dark?.imageUrl&&e.add(n.dark.imageUrl),[...e]}function N(n){let e=(n.split("?")[0].split(".").pop()||"").toLowerCase();return e==="png"?"image/png":e==="jpg"||e==="jpeg"?"image/jpeg":e==="webp"?"image/webp":e==="gif"?"image/gif":e==="svg"?"image/svg+xml":"application/octet-stream"}async function K(n,e){let r=z(n);if(!r)return[];let o=[],a=new Set;for(let s of W(r)){let l=D("sha256").update(s).digest("hex");if(!a.has(l)){a.add(l);try{let t=await fetch(s);if(!t.ok){e?.onError?.(s,new Error(`${t.status} ${t.statusText}`));continue}let c=new Uint8Array(await t.arrayBuffer());o.push({url:s,urlhash:l,contentType:N(s),bytes:c}),e?.onStaged?.({url:s,byteLength:c.byteLength})}catch(t){e?.onError?.(s,t)}}}return o}export{H as a,J as b,K as c};
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as f}from"./chunk-DATFU5M3.js";import{existsSync as g,mkdirSync as h,readFileSync as S,writeFileSync as b,rmSync as x}from"fs";import{tmpdir as y}from"os";import{dirname as v,join as m}from"path";var p=new Map;function s(e,t){p.set(e,t)}var i=1;function a(){return m(y(),`sootsim-cli-hints-${f()}.json`)}function d(){return m(y(),"sootsim-cli-hints-global.json")}function u(e){if(!g(e))return{version:i,shown:{}};try{let t=JSON.parse(S(e,"utf8"));return t?.version!==i||!t?.shown?{version:i,shown:{}}:t}catch{return{version:i,shown:{}}}}function l(e,t){try{h(v(e),{recursive:!0}),b(e,JSON.stringify(t)+`
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as f}from"./chunk-UQWDGKY7.js";import{existsSync as g,mkdirSync as h,readFileSync as S,writeFileSync as b,rmSync as x}from"fs";import{tmpdir as y}from"os";import{dirname as v,join as m}from"path";var p=new Map;function s(e,t){p.set(e,t)}var i=1;function a(){return m(y(),`sootsim-cli-hints-${f()}.json`)}function d(){return m(y(),"sootsim-cli-hints-global.json")}function u(e){if(!g(e))return{version:i,shown:{}};try{let t=JSON.parse(S(e,"utf8"));return t?.version!==i||!t?.shown?{version:i,shown:{}}:t}catch{return{version:i,shown:{}}}}function l(e,t){try{h(v(e),{recursive:!0}),b(e,JSON.stringify(t)+`
3
3
  `)}catch{}}function H(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function F(e,t){let o=H();if(o==="off")return!1;if(o==="always"||t==="always")return!0;let n=Date.now();if(t==="once-per-identity"){let r=u(a());return r.shown[e]?!1:(r.shown[e]=n,l(a(),r),!0)}if(t==="once-ever"){let r=u(d());return r.shown[e]?!1:(r.shown[e]=n,l(d(),r),!0)}if(typeof t=="object"&&"cooldownMs"in t){let r=u(a()),c=r.shown[e]??0;return n-c<t.cooldownMs?!1:(r.shown[e]=n,l(a(),r),!0)}return!0}function $(e,...t){let o=p.get(e);if(!o)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!F(e,o.frequency))return!1;let n=o.render(...t);if(n==null)return!1;let r=Array.isArray(n)?n:[n],c=o.stream==="error"?console.error:console.log;for(let w of r)c(` hint: ${w}`);return!0}s("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`sootsim wait ready\` first.`});s("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`sootsim wait selector ${e}`,stream:"error"});s("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(t=>` ${t}`)]:null,stream:"error"});s("describe-use-filters",{frequency:"once-per-identity",render:()=>["describe output is long. narrow it with:"," sootsim describe --only '*Bottom Sheet*'"," sootsim describe --testid-like 'swap-*'"," sootsim describe --subtree <testID>"]});s("describe-filter-context",{frequency:"once-per-identity",render:()=>["filtered describe is search output, not current-route proof.","run `sootsim describe` without filters after navigation; clipped nodes are marked `(clipped:...)`."]});s("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`sootsim find --testid ${e}\` to discover available ids.`,stream:"error"});s("clean-uninstall",{frequency:"once-ever",render:()=>["to uninstall sootsim completely, run `sootsim daemon uninstall`.","it removes the launchd / systemd agent and the ~/.sootsim cache (~80MB)."]});export{$ as a};
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{o as d}from"./chunk-V3TEFUGE.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function b(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{o as d}from"./chunk-I6PFJTSC.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function b(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
3
3
  `);try{S(e,384)}catch{}return r}function l(){i(a(),{force:!0})}async function E(t){let e=O();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let o=await n.json();return o.user?.id?b({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{O as a,b,l as c,E as d};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as ot}from"./chunk-5GMZJIXF.js";import{a as nt}from"./chunk-N5J3NQIA.js";import{a as ge,c as we,d as be,e as et,f as ye,g as Se,h as tt,i as ve,j as it}from"./chunk-R6X7MBYT.js";import{a as Qe}from"./chunk-2WAYJJIL.js";import{a as rt}from"./chunk-P4X4M3ZU.js";import{h as qe,p as Ye,r as Ze,v as Xe}from"./chunk-76NRK5LH.js";import{f as We}from"./chunk-PYYTNSGW.js";import{a as Ke}from"./chunk-I3NLVJO7.js";import{a as He}from"./chunk-NNXM4S37.js";import{h as me,m as ze}from"./chunk-D3ZEKF5O.js";import{I as J,m as Ue,n as je,o as Ve,p as Je}from"./chunk-75XS6H6B.js";import{g as he,h as fe,i as Ge}from"./chunk-FAMEC3A3.js";import{a as Be,b as ue}from"./chunk-VRTTFRVD.js";import{e as pe,f as Ne}from"./chunk-DATFU5M3.js";import{g as Le,h as Ce}from"./chunk-ADT2LUD2.js";import*as $ from"fs";import{createHash as Gt,randomUUID as zt}from"node:crypto";import{tmpdir as q}from"os";import*as w from"path";import*as v from"fs";import*as S from"path";var $t="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",at=1;function Pt(r){let e=Ce(r),t=e.scale,i=e.statusBarHeight>0&&!e.dynamicIsland&&e.homeIndicatorHeight===0&&e.cornerRadius===0,n=e.width,o=e.height,a=i?e.width+58:e.width+e.bezelWidth*2,s=i?e.height+111+111:e.height+e.bezelWidth*2,l=9.5,p=at,u=a+l*2,m=s+at*2,b=l+(i?29:e.bezelWidth),g=i?111:e.bezelWidth,P=i?52:e.cornerRadius+e.bezelWidth,k=[{side:"right",top:e.hardwareButtons.lock.top,height:e.hardwareButtons.lock.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.ringToggle.top,height:e.hardwareButtons.ringToggle.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.volumeUp.top,height:e.hardwareButtons.volumeUp.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.volumeDown.top,height:e.hardwareButtons.volumeDown.height,width:e.hardwareButtons.width}];return{model:r,renderScale:t,outerWidth:Math.round(u*t),outerHeight:Math.round(m*t),logicalOuterWidth:u,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:s,logicalFrameLeft:l,logicalFrameTop:p,logicalScreenWidth:n,logicalScreenHeight:o,logicalScreenLeft:b,logicalScreenTop:g,logicalScreenRadius:i?0:e.cornerRadius,logicalFrameRadius:P,frameBackground:i?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:i?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:i?null:$t,buttons:k,legacyHomeButton:i?{top:111+e.height+47/2,left:e.width/2-64/2+29,size:64,ring:1.5}:null,showHomeIndicator:e.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:e.homeIndicatorHeight}}function kt(r){let e=r.side==="right",t=e?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as ot}from"./chunk-HORIFBHS.js";import{a as nt}from"./chunk-4URI2MGG.js";import{a as ge,c as we,d as be,e as et,f as ye,g as Se,h as tt,i as ve,j as it}from"./chunk-IQ4GXAZH.js";import{a as Qe}from"./chunk-W7BAZFHN.js";import{a as rt}from"./chunk-GR3HSBBW.js";import{h as qe,p as Ye,r as Ze,v as Xe}from"./chunk-2QLL7ZTJ.js";import{f as We}from"./chunk-576MFPKR.js";import{a as Ke}from"./chunk-GSM3KOU7.js";import{a as He}from"./chunk-Z3VIVTZS.js";import{h as me,m as ze}from"./chunk-NQJ6EHGW.js";import{I as J,m as Ue,n as je,o as Ve,p as Je}from"./chunk-TA3JNI7A.js";import{g as he,h as fe,i as Ge}from"./chunk-H4U7AD3S.js";import{a as Be,b as ue}from"./chunk-E5KVZJLZ.js";import{e as pe,f as Ne}from"./chunk-UQWDGKY7.js";import{g as Le,h as Ce}from"./chunk-JSNKI3AX.js";import*as $ from"fs";import{createHash as Gt,randomUUID as zt}from"node:crypto";import{tmpdir as q}from"os";import*as w from"path";import*as v from"fs";import*as S from"path";var $t="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",at=1;function Pt(r){let e=Ce(r),t=e.scale,i=e.statusBarHeight>0&&!e.dynamicIsland&&e.homeIndicatorHeight===0&&e.cornerRadius===0,n=e.width,o=e.height,a=i?e.width+58:e.width+e.bezelWidth*2,s=i?e.height+111+111:e.height+e.bezelWidth*2,l=9.5,p=at,u=a+l*2,m=s+at*2,b=l+(i?29:e.bezelWidth),g=i?111:e.bezelWidth,P=i?52:e.cornerRadius+e.bezelWidth,k=[{side:"right",top:e.hardwareButtons.lock.top,height:e.hardwareButtons.lock.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.ringToggle.top,height:e.hardwareButtons.ringToggle.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.volumeUp.top,height:e.hardwareButtons.volumeUp.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.volumeDown.top,height:e.hardwareButtons.volumeDown.height,width:e.hardwareButtons.width}];return{model:r,renderScale:t,outerWidth:Math.round(u*t),outerHeight:Math.round(m*t),logicalOuterWidth:u,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:s,logicalFrameLeft:l,logicalFrameTop:p,logicalScreenWidth:n,logicalScreenHeight:o,logicalScreenLeft:b,logicalScreenTop:g,logicalScreenRadius:i?0:e.cornerRadius,logicalFrameRadius:P,frameBackground:i?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:i?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:i?null:$t,buttons:k,legacyHomeButton:i?{top:111+e.height+47/2,left:e.width/2-64/2+29,size:64,ring:1.5}:null,showHomeIndicator:e.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:e.homeIndicatorHeight}}function kt(r){let e=r.side==="right",t=e?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
3
3
  <div
4
4
  aria-hidden="true"
5
5
  style="
@@ -559,7 +559,7 @@ flow extension:
559
559
  })()`}),console.log(` captured ${_.length} partial replay events`)}catch(c){console.warn(` event recorder stop failed: ${c?.message||String(c)}`)}console.error(`
560
560
  x failed: ${h.message}
561
561
  `),O&&(console.log(" partial profile:"),pt(O)),I&&console.log(` partial video: ${I}`);try{let c=d.lastFailedStep,y=c?`step-${String(c.index+1).padStart(2,"0")}-${c.kind}`:"unstaged",F=w.join(s,y);await d.captureFailureBundle(F,{error:h,stepIndex:c?.index,stepKind:c?.kind,stepTarget:c?.target}),de=F,console.log(` failure bundle: ${F}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(c){try{let y=w.join(s,"error.png");await d.captureScreenshot(y),console.log(` error screenshot: ${y}`)}catch{}console.log(` (failure bundle capture failed: ${c instanceof Error?c.message:String(c)})`)}await ze(E,{errorsCommand:`sootsim get errors 5${d.simId?` --sim ${d.simId}`:""}`,warningsCommand:`sootsim get warnings 5${d.simId?` --sim ${d.simId}`:""}`,requestsCommand:`sootsim get requests 5${d.simId?` --sim ${d.simId}`:""}`}),j=1}if(await d.liveStatus?.end(j===0?"passed":"failed"),g&&(j===0||I||_))try{let h=await Zt(_??[]),c=["--origin",P,"--events",h];k&&c.push("--public-origin",k),I&&c.push("--video",I),U&&c.push("--screenshot",U),I&&L&&Number.isFinite(L)&&(c.push("--video-duration-ms",String(Math.round(L))),c.push("--recorded-duration-ms",String(Math.round(L))));let y=d.getLastRecordingStartedAtMs();y&&Number.isFinite(y)&&c.push("--recording-started-at-ms",String(Math.round(y))),x.wsPort&&c.push("--port",String(x.wsPort)),d.simId&&c.push("--sim",d.simId),oe&&c.push("--open"),Pe&&c.push("--owner",Pe),ke&&c.push("--repo",ke),c.push("--run-scope",ft),H&&c.push("--billing-kind",H),console.log(`
562
- preparing preview upload\u2026`);let F=d.getFlowTraceSteps();F.length>0&&c.push("--timeline-events",await Xt(F));let V=await Qt(F,y);V&&c.push("--snapshot-manifest",V),de&&c.push("--failure-bundle",de);let D=d.getLastRecordingFrameStats();D&&c.push("--trace-frame-stats",await ei(D));let{runUpload:Tt}=await import("./upload-GPOYAPIE.js");Fe=await Tt(c,{})}catch(h){console.error(` preview upload failed: ${h?.message||h}`),j=1}return $e=d.getFlowTraceSteps(),E.close(),le?(d.simId&&ce.add(d.simId),await Yt(x.wsPort,x.commandTimeoutMs,[...ce])):d.simId&&d.simId!==Z&&Ne(d.simId),await ue(),j}async function Yt(r,e,t){let i=[...new Set(t.filter(Boolean))];if(i.length===0)return;let n=fe(r,{commandTimeoutMs:e});try{let o=await n.listSims(),a=i.filter(l=>o.some(p=>p.id===l&&p.readyState==="open"));if(a.length===0)return;let s=await Xe(n,r,e,a);await Ye(o,a),s.closed.length>0&&console.log(` closed flow sim(s): ${s.closed.join(", ")}`),s.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${s.remaining.join(", ")}`)}catch(o){console.warn(` warn: failed to close flow sim(s): ${o instanceof Error?o.message:String(o)}`)}finally{n.close()}}async function Zt(r){let{gzipSync:e}=await import("zlib"),t=r.map(o=>JSON.stringify(o)).join(`
562
+ preparing preview upload\u2026`);let F=d.getFlowTraceSteps();F.length>0&&c.push("--timeline-events",await Xt(F));let V=await Qt(F,y);V&&c.push("--snapshot-manifest",V),de&&c.push("--failure-bundle",de);let D=d.getLastRecordingFrameStats();D&&c.push("--trace-frame-stats",await ei(D));let{runUpload:Tt}=await import("./upload-BGBBPPQA.js");Fe=await Tt(c,{})}catch(h){console.error(` preview upload failed: ${h?.message||h}`),j=1}return $e=d.getFlowTraceSteps(),E.close(),le?(d.simId&&ce.add(d.simId),await Yt(x.wsPort,x.commandTimeoutMs,[...ce])):d.simId&&d.simId!==Z&&Ne(d.simId),await ue(),j}async function Yt(r,e,t){let i=[...new Set(t.filter(Boolean))];if(i.length===0)return;let n=fe(r,{commandTimeoutMs:e});try{let o=await n.listSims(),a=i.filter(l=>o.some(p=>p.id===l&&p.readyState==="open"));if(a.length===0)return;let s=await Xe(n,r,e,a);await Ye(o,a),s.closed.length>0&&console.log(` closed flow sim(s): ${s.closed.join(", ")}`),s.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${s.remaining.join(", ")}`)}catch(o){console.warn(` warn: failed to close flow sim(s): ${o instanceof Error?o.message:String(o)}`)}finally{n.close()}}async function Zt(r){let{gzipSync:e}=await import("zlib"),t=r.map(o=>JSON.stringify(o)).join(`
563
563
  `)+(r.length?`
564
564
  `:""),i=e(Buffer.from(t,"utf8")),n=w.join(q(),`sootsim-events-${Date.now()}.jsonl.gz`);return $.writeFileSync(n,i),console.log(` events: ${r.length} written to ${n} (${i.length} bytes gz)`),n}async function Xt(r){let{gzipSync:e}=await import("zlib"),t=r.map((a,s)=>({schemaVersion:1,t:a.endedAtMs,seq:1e6+s,context:"host",kind:"flow-step",id:`flow-step-${a.stepIndex}`,data:{stepIndex:a.stepIndex,stepNumber:a.stepIndex+1,stepName:a.stepName,...a.targetLabel?{targetLabel:a.targetLabel}:{},status:a.status,durationMs:a.durationMs,startedAtMs:a.startedAtMs,endedAtMs:a.endedAtMs,...a.error?{error:a.error}:{}}})),i=t.map(a=>JSON.stringify(a)).join(`
565
565
  `)+`
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{j as n}from"./chunk-ADT2LUD2.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{j as n}from"./chunk-JSNKI3AX.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
3
3
  `)}export{g as a};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{G as R,H as d,I as x,K as w,l as g,u as $,x as b}from"./chunk-V3TEFUGE.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://contrast.dev",U="SOOTSIM_CDN_ORIGIN",D="SOOTSIM_RUNTIME_CHANNEL",P="SOOTSIM_RUNTIME_VERSION",X="https://sootsim.com/changelog";function y(){try{let t=JSON.parse(o.readFileSync(b(),"utf8"));return t&&typeof t=="object"?t:{}}catch{return{}}}function f(t){let n=y();return(t||process.env[U]||n.cdnOrigin||_).replace(/\/+$/,"")}function S(t){let n=y();return t||process.env[D]||n.runtimeChannel||"stable"}function O(){let t=process.env[P];if(t&&t.trim())return t.trim();let n=y();return typeof n.runtimeVersion=="string"&&n.runtimeVersion.trim()?n.runtimeVersion.trim():null}function A(t){let n=new URL(`${f(t)}/runtimes/manifest.json`);return n.searchParams.set("t",String(Date.now())),n.toString()}function j(t,n){return`${f(n)}/runtimes/sootsim-runtime-${t}.tar.gz`}async function I(t){let n=A(t),r=await fetch(n,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${n})`);return await r.json()}function L(t,n={}){let r=S(n.channel),e=n.version||O()||t.channels[r]?.latest;if(!e)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let s=t.versions[e];if(!s)throw new Error(`version ${e} not found in manifest; available: ${Object.keys(t.versions).slice(-10).join(", ")||"(none)"}`);return{version:e,channel:r,entry:s}}async function N(t={}){R();let n=f(t.cdnOrigin),r=await I(n),{version:e,channel:s,entry:i}=L(r,t),c=g(e),a=t.setActive!==!1;if(!t.force&&o.existsSync(u.join(c,"index.html")))return a&&x(e),{version:e,channel:s,cdnOrigin:n,runtimeDir:c,installed:!1,activated:a,manifest:r};let h=i.tarball||j(e,n),m=u.join($(),`sootsim-runtime-${e}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${e}\u2026
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{G as R,H as d,I as x,K as w,l as g,u as $,x as b}from"./chunk-I6PFJTSC.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://contrast.dev",U="SOOTSIM_CDN_ORIGIN",D="SOOTSIM_RUNTIME_CHANNEL",P="SOOTSIM_RUNTIME_VERSION",X="https://sootsim.com/changelog";function y(){try{let t=JSON.parse(o.readFileSync(b(),"utf8"));return t&&typeof t=="object"?t:{}}catch{return{}}}function f(t){let n=y();return(t||process.env[U]||n.cdnOrigin||_).replace(/\/+$/,"")}function S(t){let n=y();return t||process.env[D]||n.runtimeChannel||"stable"}function O(){let t=process.env[P];if(t&&t.trim())return t.trim();let n=y();return typeof n.runtimeVersion=="string"&&n.runtimeVersion.trim()?n.runtimeVersion.trim():null}function A(t){let n=new URL(`${f(t)}/runtimes/manifest.json`);return n.searchParams.set("t",String(Date.now())),n.toString()}function j(t,n){return`${f(n)}/runtimes/sootsim-runtime-${t}.tar.gz`}async function I(t){let n=A(t),r=await fetch(n,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${n})`);return await r.json()}function L(t,n={}){let r=S(n.channel),e=n.version||O()||t.channels[r]?.latest;if(!e)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let s=t.versions[e];if(!s)throw new Error(`version ${e} not found in manifest; available: ${Object.keys(t.versions).slice(-10).join(", ")||"(none)"}`);return{version:e,channel:r,entry:s}}async function N(t={}){R();let n=f(t.cdnOrigin),r=await I(n),{version:e,channel:s,entry:i}=L(r,t),c=g(e),a=t.setActive!==!1;if(!t.force&&o.existsSync(u.join(c,"index.html")))return a&&x(e),{version:e,channel:s,cdnOrigin:n,runtimeDir:c,installed:!1,activated:a,manifest:r};let h=i.tarball||j(e,n),m=u.join($(),`sootsim-runtime-${e}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${e}\u2026
3
3
  `),await F(h,m),process.stderr.write(`sootsim: extracting runtime ${e}\u2026
4
4
  `);let v=await G(m);if(v!==i.sha256)throw o.rmSync(m,{force:!0}),new Error(`sha256 mismatch for runtime ${e}: expected ${i.sha256}, actual ${v}`);let l=u.join(u.dirname(c),`.installing-${e}-${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 ${e} 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(e),{version:e,channel:s,cdnOrigin:n,runtimeDir:c,installed:!0,activated:a,manifest:r}}async function Y(t={}){R();let n=f(t.cdnOrigin),r=S(t.channel),e=O();if(e){let p=d(),V=o.existsSync(u.join(g(e),"index.html"));if(p===e&&V)return{checked:!0,updated:!1,reason:`runtime is pinned to ${e}`,activeVersion:p,latestVersion:e};let M=await N({version:e,channel:r,cdnOrigin:n,setActive:!1});return{checked:!0,updated:!0,reason:`runtime is pinned to ${e}`,activeVersion:e,latestVersion:e,install:M}}let s=await I(n),i=s.channels[r]?.latest;if(!i)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:d()};if(!s.versions[i])return{checked:!0,updated:!1,reason:`manifest is missing version ${i}`,activeVersion:d(),latestVersion:i};let a=d(),h=a?g(a):null,m=h?o.existsSync(u.join(h,"index.html")):!1;if(!(!a||!m||w(i,a)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:a,latestVersion:i};let l=await N({version:i,channel:r,cdnOrigin:n,setActive:!1});return{checked:!0,updated:!0,activeVersion:i,latestVersion:i,install:l}}async function Z(t={}){let n=d(),r=O();if(r)return{active:n,latest:r,pinned:r,outdated:n!==r};try{let e=await I(f(t.cdnOrigin)),s=S(t.channel),i=e.channels[s]?.latest??null,c=!!(i&&(!n||w(i,n)>0));return{active:n,latest:i,pinned:null,outdated:c}}catch{return{active:n,latest:null,pinned:null,outdated:!1}}}async function F(t,n){let r=await fetch(t);if(!r.ok||!r.body)throw new Error(`download failed: ${r.status} ${r.statusText} (${t})`);o.mkdirSync(u.dirname(n),{recursive:!0});let e=`${n}.partial`;try{await T(C.fromWeb(r.body),o.createWriteStream(e)),o.renameSync(e,n)}catch(s){try{o.unlinkSync(e)}catch{}throw s}}function G(t){return new Promise((n,r)=>{let e=k.createHash("sha256"),s=o.createReadStream(t);s.on("data",i=>e.update(i)),s.on("error",r),s.on("end",()=>n(e.digest("hex")))})}function H(t,n){return new Promise((r,e)=>{let s=E("tar",["-xzf",t,"-C",n],{stdio:["ignore","inherit","inherit"]});s.on("error",e),s.on("exit",i=>{i===0?r():e(new Error(`tar exited with code ${i}`))})})}export{_ as a,X as b,f as c,S as d,O as e,I as f,N as g,Y as h,Z as i};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.231 | (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-75XS6H6B.js";import{h,l as N,m as P}from"./chunk-FAMEC3A3.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.232 | (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-TA3JNI7A.js";import{h,l as N,m as P}from"./chunk-H4U7AD3S.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(`
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.231 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.232 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var t=4001,r="sootsim close";var o="http://localhost:5173/";export{t as a,r as b,o as c};