sootsim 0.1.305 → 0.1.307

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 (172) hide show
  1. package/README.md +10 -4
  2. package/dist-cli/bin.js +5 -5
  3. package/dist-cli/chunks/{agent-OJP4VF2K.js → agent-BQ3KAQAU.js} +2 -2
  4. package/dist-cli/chunks/{agent-wrapper-HMVFZKH3.js → agent-wrapper-DS6FBIAI.js} +2 -2
  5. package/dist-cli/chunks/{app-fonts-INFYQMIN.js → app-fonts-VTLZYBCH.js} +2 -2
  6. package/dist-cli/chunks/{assert-YSFBCP5P.js → assert-MPQ4CDNH.js} +2 -2
  7. package/dist-cli/chunks/{auth-M7RKDYQV.js → auth-O3PQ5WAK.js} +2 -2
  8. package/dist-cli/chunks/{beta-4NRMM37T.js → beta-CHK46VAX.js} +2 -2
  9. package/dist-cli/chunks/{camera-MHLM35MB.js → camera-YOO6XYC5.js} +2 -2
  10. package/dist-cli/chunks/{chunk-6EXIYEOQ.js → chunk-2ODPPVQC.js} +2 -2
  11. package/dist-cli/chunks/{chunk-2UKSI3VX.js → chunk-2P5OBO7Z.js} +1 -1
  12. package/dist-cli/chunks/{chunk-R5TBMYGH.js → chunk-3JLFWHOZ.js} +1 -1
  13. package/dist-cli/chunks/{chunk-CWDEDUOZ.js → chunk-3S57XWPX.js} +1 -1
  14. package/dist-cli/chunks/{chunk-JKIPNRAK.js → chunk-4BZ6SM53.js} +24 -25
  15. package/dist-cli/chunks/{chunk-H5D6E3DR.js → chunk-4QCKHLRV.js} +2 -2
  16. package/dist-cli/chunks/{chunk-UUKUKTV3.js → chunk-537ULSCX.js} +11 -11
  17. package/dist-cli/chunks/chunk-5MN7CUQB.js +6 -0
  18. package/dist-cli/chunks/{chunk-XI6CPN53.js → chunk-6Q3FIZGP.js} +1 -1
  19. package/dist-cli/chunks/{chunk-TRV5K6D2.js → chunk-746PZ7ND.js} +1 -1
  20. package/dist-cli/chunks/{chunk-B65RMI7A.js → chunk-7HPBPICZ.js} +1 -1
  21. package/dist-cli/chunks/{chunk-2D7NF3XK.js → chunk-7T5WCLEU.js} +2 -2
  22. package/dist-cli/chunks/{chunk-KG2WUKD2.js → chunk-AD2J3Y5G.js} +2 -2
  23. package/dist-cli/chunks/chunk-BO2XSJJA.js +5 -0
  24. package/dist-cli/chunks/{chunk-IJ64Z77P.js → chunk-CKLXK3SU.js} +2 -2
  25. package/dist-cli/chunks/{chunk-DHDSGBZB.js → chunk-E2AY5MPI.js} +1 -1
  26. package/dist-cli/chunks/chunk-EWSHWBPU.js +4 -0
  27. package/dist-cli/chunks/chunk-EY5RFXHC.js +125 -0
  28. package/dist-cli/chunks/{chunk-6YE25EJB.js → chunk-FRTR2EUL.js} +3 -3
  29. package/dist-cli/chunks/{chunk-SWBTXTEO.js → chunk-IBM36KUP.js} +2 -2
  30. package/dist-cli/chunks/{chunk-WQYUHDBU.js → chunk-J52NXD2T.js} +2 -2
  31. package/dist-cli/chunks/chunk-KCRDI5B2.js +5 -0
  32. package/dist-cli/chunks/{chunk-JQRRJIMT.js → chunk-KPDYFXBD.js} +1 -1
  33. package/dist-cli/chunks/{chunk-NNR3BU5O.js → chunk-LL76B22R.js} +7 -7
  34. package/dist-cli/chunks/{chunk-4Q42Y64Y.js → chunk-LTS6OYSK.js} +2 -2
  35. package/dist-cli/chunks/{chunk-HKPJYMJC.js → chunk-NK72QUBY.js} +15 -12
  36. package/dist-cli/chunks/chunk-NLE5PR7V.js +15 -0
  37. package/dist-cli/chunks/{chunk-EWVEUNRO.js → chunk-NWOGE4YS.js} +81 -37
  38. package/dist-cli/chunks/{chunk-DTHOMSAA.js → chunk-OQ6KN4TP.js} +2 -2
  39. package/dist-cli/chunks/{chunk-W3M4676V.js → chunk-Q32TOAPX.js} +3 -3
  40. package/dist-cli/chunks/{chunk-54AINFEF.js → chunk-Q35WXZFI.js} +2 -2
  41. package/dist-cli/chunks/{chunk-BDNZULU7.js → chunk-QJ7B6FFD.js} +2 -2
  42. package/dist-cli/chunks/chunk-RCLJQZQR.js +4 -0
  43. package/dist-cli/chunks/chunk-S5QHC5LD.js +4 -0
  44. package/dist-cli/chunks/{chunk-VKBCGFOU.js → chunk-SKMVVRFI.js} +2 -2
  45. package/dist-cli/chunks/{chunk-EBCXFB3K.js → chunk-SLEKK2UU.js} +1 -1
  46. package/dist-cli/chunks/chunk-SZDXEZ2I.js +4 -0
  47. package/dist-cli/chunks/{chunk-43SNLCXR.js → chunk-SZX2PHDS.js} +1 -1
  48. package/dist-cli/chunks/{chunk-AJCL7DHI.js → chunk-UKKB52JO.js} +2 -2
  49. package/dist-cli/chunks/{chunk-R6MBDR56.js → chunk-UURKPOZU.js} +1 -1
  50. package/dist-cli/chunks/{chunk-3PREBGTH.js → chunk-WE6WXVYB.js} +2 -2
  51. package/dist-cli/chunks/{chunk-EPZG2F4I.js → chunk-WPVMW3I5.js} +1 -1
  52. package/dist-cli/chunks/{chunk-J653UMCU.js → chunk-WTWGQFNU.js} +2 -2
  53. package/dist-cli/chunks/{chunk-SLCYXISJ.js → chunk-XRUSCWIH.js} +2 -2
  54. package/dist-cli/chunks/{chunk-LOF3WUKB.js → chunk-XVQ2YGCI.js} +1 -1
  55. package/dist-cli/chunks/{chunk-HMOYEM6V.js → chunk-YIKFWG22.js} +2 -2
  56. package/dist-cli/chunks/{chunk-KVLXMWV5.js → chunk-YPKDDYIE.js} +2 -2
  57. package/dist-cli/chunks/{chunk-HHLH4TWF.js → chunk-Z772XMEF.js} +1 -1
  58. package/dist-cli/chunks/{chunk-KSZRLJPA.js → chunk-ZJR2AKLU.js} +2 -2
  59. package/dist-cli/chunks/{chunk-POIK3AHY.js → chunk-ZZBMQEEE.js} +2 -2
  60. package/dist-cli/chunks/{cleanup-ZJ7FQKED.js → cleanup-RT2PX5NP.js} +2 -2
  61. package/dist-cli/chunks/{cli-version-5LGCFOAC.js → cli-version-W3D5LXK5.js} +2 -2
  62. package/dist-cli/chunks/{compat-EQACACVP.js → compat-LGAXCMPJ.js} +2 -2
  63. package/dist-cli/chunks/{config-ADGNCDG5.js → config-3MQYRCSB.js} +2 -2
  64. package/dist-cli/chunks/control-MDWGTCXV.js +4 -0
  65. package/dist-cli/chunks/daemon-4FHSWZSV.js +4 -0
  66. package/dist-cli/chunks/{debug-PU73W33T.js → debug-UKOFTGI3.js} +3 -3
  67. package/dist-cli/chunks/desktop-N6TEZAIJ.js +31 -0
  68. package/dist-cli/chunks/{detox-SHVVEPPX.js → detox-T2Y4HE44.js} +2 -2
  69. package/dist-cli/chunks/{device-NMRUACB4.js → device-ZE2WSDJN.js} +2 -2
  70. package/dist-cli/chunks/{diagnose-S2AVGABT.js → diagnose-WFEFBH6U.js} +2 -2
  71. package/dist-cli/chunks/disk-cleanup-YXC3JGG5.js +4 -0
  72. package/dist-cli/chunks/drivers-62L33HHX.js +4 -0
  73. package/dist-cli/chunks/{film-UB7N4EKB.js → film-THTAWD5P.js} +3 -3
  74. package/dist-cli/chunks/flow-3HCUMLZL.js +4 -0
  75. package/dist-cli/chunks/help-KEXQPE2I.js +4 -0
  76. package/dist-cli/chunks/{hidden-runtime-alias-M44SGZLM.js → hidden-runtime-alias-SNP5LSQD.js} +2 -2
  77. package/dist-cli/chunks/{home-paths-ZTEBHBUO.js → home-paths-WUCC72RE.js} +2 -2
  78. package/dist-cli/chunks/inspect-2SR5AEEA.js +4 -0
  79. package/dist-cli/chunks/install-desktop-KE5ZPY6L.js +4 -0
  80. package/dist-cli/chunks/{login-YQ3HRPPS.js → login-ZEB4WSVZ.js} +4 -4
  81. package/dist-cli/chunks/{logout-XGBDWO4J.js → logout-P6PV2WRO.js} +2 -2
  82. package/dist-cli/chunks/{maestro-CESBE2SF.js → maestro-TUA7YURM.js} +3 -3
  83. package/dist-cli/chunks/{maestro-generate-4IHISKJL.js → maestro-generate-HI4UM47Q.js} +3 -3
  84. package/dist-cli/chunks/{mode-BQGGZ737.js → mode-ILLUAGCG.js} +2 -2
  85. package/dist-cli/chunks/optional-demo-registry-R7UFXPBP.js +4 -0
  86. package/dist-cli/chunks/{perf-TUR22UTE.js → perf-4CE5R2TN.js} +2 -2
  87. package/dist-cli/chunks/{permissions-POJIVSRV.js → permissions-NQCKUHGU.js} +2 -2
  88. package/dist-cli/chunks/{record-Q55SGXLU.js → record-5JRY7R54.js} +3 -3
  89. package/dist-cli/chunks/{report-issue-LRRX7VJV.js → report-issue-PFE7RDDV.js} +2 -2
  90. package/dist-cli/chunks/runtime-MP2QVB2X.js +4 -0
  91. package/dist-cli/chunks/{screenshot-command-C7EU43J3.js → screenshot-command-R3MPUAQI.js} +3 -3
  92. package/dist-cli/chunks/{screenshot-layers-NYVOJYUU.js → screenshot-layers-TKLUUDFA.js} +2 -2
  93. package/dist-cli/chunks/{screenshots-capture-AYKJKBLR.js → screenshots-capture-6UT2EVTR.js} +2 -2
  94. package/dist-cli/chunks/{serve-EN3ZPJSA.js → serve-L5GFNPAX.js} +3 -3
  95. package/dist-cli/chunks/{setup-KKMKLJZE.js → setup-IZQ7IXYW.js} +2 -2
  96. package/dist-cli/chunks/{skills-DR5DG2SK.js → skills-2CY6YIL7.js} +2 -2
  97. package/dist-cli/chunks/{storage-GMDBVTQ5.js → storage-EPY4VXCY.js} +2 -2
  98. package/dist-cli/chunks/store-F5RQZH7P.js +4 -0
  99. package/dist-cli/chunks/telemetry-MZKLKJAS.js +4 -0
  100. package/dist-cli/chunks/{timeline-VY3444AZ.js → timeline-LK5IA74W.js} +2 -2
  101. package/dist-cli/chunks/{upgrade-EUYCW55F.js → upgrade-ZK6YJMUA.js} +2 -2
  102. package/dist-cli/chunks/upload-LP6UOKRF.js +4 -0
  103. package/dist-cli/chunks/{version-TEGM4WRU.js → version-SRC2HVYI.js} +2 -2
  104. package/dist-cli/chunks/{web-QF7LF4VB.js → web-SVNHYKX5.js} +2 -2
  105. package/dist-cli/chunks/{what-happened-HDTJGNND.js → what-happened-URW3Q7QP.js} +2 -2
  106. package/dist-lib/agent-daemon-client.cjs +1 -1
  107. package/dist-lib/agent-events.cjs +1 -1
  108. package/dist-lib/agent-identity.cjs +1 -1
  109. package/dist-lib/agent-sessions.cjs +1 -1
  110. package/dist-lib/attached-projects.cjs +43 -21
  111. package/dist-lib/auth/shared-session.cjs +1 -1
  112. package/dist-lib/backend-origin.cjs +1 -1
  113. package/dist-lib/beta.cjs +1 -1
  114. package/dist-lib/beta.mjs +1 -1
  115. package/dist-lib/bridge-constants.cjs +8 -1
  116. package/dist-lib/cli-constants.cjs +1 -1
  117. package/dist-lib/config.cjs +1 -1
  118. package/dist-lib/detox/index.cjs +51 -41
  119. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  120. package/dist-lib/home-paths.cjs +1 -1
  121. package/dist-lib/host/bridge-host.cjs +222 -302
  122. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  123. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  124. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  125. package/dist-lib/host/websocket-proxy.cjs +1 -1
  126. package/dist-lib/index.cjs +1 -1
  127. package/dist-lib/jump-to-source-babel.cjs +1 -1
  128. package/dist-lib/menu.cjs +1 -1
  129. package/dist-lib/menu.mjs +1 -1
  130. package/dist-lib/metro.cjs +1 -1
  131. package/dist-lib/profiles.cjs +1 -1
  132. package/dist-lib/render-mode.cjs +1 -1
  133. package/dist-lib/scripts/dev-server-scanner.cjs +43 -13
  134. package/dist-lib/sdk.cjs +47 -10
  135. package/dist-lib/sdk.mjs +47 -10
  136. package/dist-lib/skills.cjs +11364 -6863
  137. package/dist-lib/vite.cjs +1 -1
  138. package/package.json +1 -1
  139. package/scripts/dev-server-scanner.ts +9 -15
  140. package/scripts/optional-demo-registry.ts +52 -10
  141. package/skills/sootsim-debug/SKILL.md +4 -5
  142. package/skills/sootsim-setup/SKILL.md +29 -49
  143. package/src/bridge-constants.ts +15 -0
  144. package/src/host/bridge-host.ts +0 -16
  145. package/src/host/open-url.ts +2 -147
  146. package/src/plist.ts +27 -0
  147. package/src/settings-bundle.ts +2 -23
  148. package/src/skills/builtin/maestro-test.ts +4 -1
  149. package/src/vite-plugin.ts +2 -1
  150. package/dist-cli/chunks/chunk-COD6QGS2.js +0 -125
  151. package/dist-cli/chunks/chunk-KVOY4Z2X.js +0 -4
  152. package/dist-cli/chunks/chunk-OCRL2VU4.js +0 -4
  153. package/dist-cli/chunks/chunk-PELXRGDN.js +0 -4
  154. package/dist-cli/chunks/chunk-QJUKXBH5.js +0 -15
  155. package/dist-cli/chunks/chunk-QVH276LI.js +0 -5
  156. package/dist-cli/chunks/chunk-WIRBJTTU.js +0 -7
  157. package/dist-cli/chunks/chunk-XWMTLVCE.js +0 -4
  158. package/dist-cli/chunks/chunk-ZRQFYMTL.js +0 -4
  159. package/dist-cli/chunks/control-Y3E5IIMO.js +0 -4
  160. package/dist-cli/chunks/daemon-A6CWUYMR.js +0 -4
  161. package/dist-cli/chunks/desktop-V675PYF4.js +0 -34
  162. package/dist-cli/chunks/disk-cleanup-EJEZIIT4.js +0 -4
  163. package/dist-cli/chunks/drivers-PM4PVYHY.js +0 -4
  164. package/dist-cli/chunks/flow-XJRNL25V.js +0 -4
  165. package/dist-cli/chunks/help-2ZJHCVUZ.js +0 -4
  166. package/dist-cli/chunks/inspect-L76RUF62.js +0 -4
  167. package/dist-cli/chunks/install-desktop-UIXKNXKF.js +0 -4
  168. package/dist-cli/chunks/optional-demo-registry-LWYRXVIE.js +0 -4
  169. package/dist-cli/chunks/runtime-NHDHZJJN.js +0 -4
  170. package/dist-cli/chunks/store-QZEMKQDC.js +0 -4
  171. package/dist-cli/chunks/telemetry-TNX72J2B.js +0 -4
  172. package/dist-cli/chunks/upload-D43U7RGT.js +0 -4
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  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 w}from"url";var c;function p(){if(c!==void 0)return c;try{c=m(w(import.meta.resolve("sootsim-engine/package.json")))}catch{c=null}return c}var v="dev.sootsim.simulator";function I(){let e=p();if(!e)return null;let n=l(e,"dist-electron/main.cjs");if(!s(n))return null;let i=P(e);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:e}:null}function x(){let e=p();return e?s(l(e,"src-electron/main.ts")):!1}function P(e){let n=e;for(let i=0;i<6;i++){let t=l(n,"node_modules/.bin/electron");if(s(t))return t;let r=m(n);if(r===n)break;n=r}return null}function b(){let e=p(),i=["/Applications/sootsim.app",a(process.env.HOME||"","Applications/sootsim.app"),...e?[a(e,"app/sootsim.app")]:[]].find(t=>s(t));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let t=h("mdfind",[`kMDItemCFBundleIdentifier == "${v}"`],{encoding:"utf8",timeout:3e3}).trim();if(t)return{path:t.split(`
@@ -1,6 +1,6 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as C}from"./chunk-XI6CPN53.js";import{f as h}from"./chunk-SWBTXTEO.js";import{G as B,O as b,g as S}from"./chunk-EBCXFB3K.js";import a from"node:fs";import c from"node:path";var g=1,k=`automatic-cleanup-v${g}.json`,A=`automatic-cleanup-v${g}.lock`,P=360*60*1e3;function w(){let i=c.join(S(),k);try{return JSON.parse(a.readFileSync(i,"utf8")).generation===g}catch{return!1}}function N(i){if(i<1024)return`${i} B`;let e=["KiB","MiB","GiB","TiB"],n=i/1024,s=e[0];for(let r=1;r<e.length&&n>=1024;r++)n/=1024,s=e[r];return`${n.toFixed(n>=10?1:2)} ${s}`}function p(i){let e;try{e=a.lstatSync(i)}catch{return 0}let n=e.blocks>0?e.blocks*512:e.size;if(!e.isDirectory()||e.isSymbolicLink())return n;let s=n;try{for(let r of a.readdirSync(i))s+=p(c.join(i,r))}catch{}return s}function E(i){for(let e of["SingletonLock","SingletonSocket","lockfile"])try{if(a.lstatSync(c.join(i,e)))return!0}catch{}return!1}function v(i,e){let n;try{n=a.readdirSync(i,{withFileTypes:!0})}catch{return[]}let s=E(e),r=[];for(let t of n){if(!t.isDirectory()||t.isSymbolicLink())continue;let o=c.join(i,t.name);if(C(t.name)){r.push({path:o,bytes:p(o),kind:"browser-cache",state:s?"in-use":"safe",selected:!s,detail:s?"browser profile is open; close it before cleanup":"disposable browser HTTP, bytecode, or GPU cache"});continue}r.push(...v(o,e))}return r}function L(i){let e=c.join(i,"profiles","playwright"),n;try{n=a.readdirSync(e,{withFileTypes:!0})}catch{return[]}return n.flatMap(s=>{if(!s.isDirectory()||s.isSymbolicLink())return[];let r=c.join(e,s.name);return v(r,r)})}function R(i){let e=c.join(i,"electron","userData");return v(e,e)}function U(i,e){let n=c.join(i,"recordings"),s;try{s=a.readdirSync(n,{withFileTypes:!0})}catch{return[]}return s.map(r=>{let t=c.join(n,r.name);return{path:t,bytes:p(t),kind:"recording",state:"aggressive",selected:e,detail:"user-created recording or captured-frame output"}})}function x(i){let e=new Set(b()),n=[...e],s=h.planLocalRetention({retainVersions:2,protectVersions:n}),r=h.planLocalRetention({retainVersions:1,protectVersions:n}),t=new Set(s.removeVersions),o=new Set(r.removeVersions),l=new Set([...s.keepVersions,...s.removeVersions,...r.keepVersions,...r.removeVersions]),m=[];for(let u of[...l].sort()){let d=h.product.runtimeDir(u),y="retained",f="retained runtime";e.has(u)&&u!==s.activeVersion?(y="in-use",f="runtime is serving a connected simulator"):t.has(u)?(y="safe",f="inactive runtime outside the two-version rollback window"):o.has(u)?(y="aggressive",f="most recent rollback runtime"):u===s.activeVersion&&(f="active runtime; always protected"),m.push({path:d,bytes:p(d),kind:"runtime-version",state:y,selected:y==="safe"||y==="aggressive"&&i,detail:f})}for(let u of s.removeCacheFiles)m.push({path:u,bytes:p(u),kind:"runtime-archive",state:"safe",selected:!0,detail:"downloaded archive is unnecessary after successful extraction"});return{activeRuntime:s.activeVersion,entries:m}}function T(i={}){let e=i.aggressive===!0,n=S(),s=x(e),r=[...s.entries,...L(n),...R(n),...U(n,e)].sort((t,o)=>o.bytes-t.bytes||t.path.localeCompare(o.path));return{home:n,activeRuntime:s.activeRuntime,entries:r,reclaimableBytes:r.reduce((t,o)=>t+(o.selected?o.bytes:0),0),protectedBytes:r.reduce((t,o)=>t+(o.selected?0:o.bytes),0),totalBytes:p(n)}}function D(i,e){let n=c.relative(i,e);if(!n||n.startsWith("..")||c.isAbsolute(n))throw new Error(`refusing cleanup target outside the SootSim home: ${e}`)}function I(i={}){let e=T(i),n=i.aggressive===!0?1:2;h.pruneLocalRetention({retainVersions:n,protectVersions:b()});for(let t of e.entries)if(t.selected&&!(t.kind==="runtime-archive"||t.kind==="runtime-version")){if(t.kind==="browser-cache"){let l=c.relative(e.home,t.path).split(c.sep),m=l[0]==="profiles"&&l[1]==="playwright"&&l[2]?c.join(e.home,"profiles","playwright",l[2]):l[0]==="electron"&&l[1]==="userData"?c.join(e.home,"electron","userData"):null;if(m&&E(m)){t.state="in-use",t.selected=!1,t.detail="browser profile opened while cleanup was starting";continue}}D(e.home,t.path),a.rmSync(t.path,{recursive:!0,force:!0})}let s=e.entries.filter(t=>t.selected&&!a.existsSync(t.path)).map(t=>t.path),r=p(e.home);return{...e,removedPaths:s,reclaimedBytes:Math.max(0,e.totalBytes-r),remainingBytes:r}}function $(){B();let i=S(),e=c.join(i,k),n=c.join(i,A);if(w())return{status:"already-complete",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};let s=null;for(let r=0;r<2&&s===null;r++)try{let t=a.openSync(n,"wx");try{a.writeFileSync(t,`${JSON.stringify({pid:process.pid,startedAt:Date.now()})}
4
+ import{b as C}from"./chunk-6Q3FIZGP.js";import{f as h}from"./chunk-IBM36KUP.js";import{G as B,O as b,g as S}from"./chunk-SLEKK2UU.js";import a from"node:fs";import c from"node:path";var g=1,k=`automatic-cleanup-v${g}.json`,A=`automatic-cleanup-v${g}.lock`,P=360*60*1e3;function w(){let i=c.join(S(),k);try{return JSON.parse(a.readFileSync(i,"utf8")).generation===g}catch{return!1}}function N(i){if(i<1024)return`${i} B`;let e=["KiB","MiB","GiB","TiB"],n=i/1024,s=e[0];for(let r=1;r<e.length&&n>=1024;r++)n/=1024,s=e[r];return`${n.toFixed(n>=10?1:2)} ${s}`}function p(i){let e;try{e=a.lstatSync(i)}catch{return 0}let n=e.blocks>0?e.blocks*512:e.size;if(!e.isDirectory()||e.isSymbolicLink())return n;let s=n;try{for(let r of a.readdirSync(i))s+=p(c.join(i,r))}catch{}return s}function E(i){for(let e of["SingletonLock","SingletonSocket","lockfile"])try{if(a.lstatSync(c.join(i,e)))return!0}catch{}return!1}function v(i,e){let n;try{n=a.readdirSync(i,{withFileTypes:!0})}catch{return[]}let s=E(e),r=[];for(let t of n){if(!t.isDirectory()||t.isSymbolicLink())continue;let o=c.join(i,t.name);if(C(t.name)){r.push({path:o,bytes:p(o),kind:"browser-cache",state:s?"in-use":"safe",selected:!s,detail:s?"browser profile is open; close it before cleanup":"disposable browser HTTP, bytecode, or GPU cache"});continue}r.push(...v(o,e))}return r}function L(i){let e=c.join(i,"profiles","playwright"),n;try{n=a.readdirSync(e,{withFileTypes:!0})}catch{return[]}return n.flatMap(s=>{if(!s.isDirectory()||s.isSymbolicLink())return[];let r=c.join(e,s.name);return v(r,r)})}function R(i){let e=c.join(i,"electron","userData");return v(e,e)}function U(i,e){let n=c.join(i,"recordings"),s;try{s=a.readdirSync(n,{withFileTypes:!0})}catch{return[]}return s.map(r=>{let t=c.join(n,r.name);return{path:t,bytes:p(t),kind:"recording",state:"aggressive",selected:e,detail:"user-created recording or captured-frame output"}})}function x(i){let e=new Set(b()),n=[...e],s=h.planLocalRetention({retainVersions:2,protectVersions:n}),r=h.planLocalRetention({retainVersions:1,protectVersions:n}),t=new Set(s.removeVersions),o=new Set(r.removeVersions),l=new Set([...s.keepVersions,...s.removeVersions,...r.keepVersions,...r.removeVersions]),m=[];for(let u of[...l].sort()){let d=h.product.runtimeDir(u),y="retained",f="retained runtime";e.has(u)&&u!==s.activeVersion?(y="in-use",f="runtime is serving a connected simulator"):t.has(u)?(y="safe",f="inactive runtime outside the two-version rollback window"):o.has(u)?(y="aggressive",f="most recent rollback runtime"):u===s.activeVersion&&(f="active runtime; always protected"),m.push({path:d,bytes:p(d),kind:"runtime-version",state:y,selected:y==="safe"||y==="aggressive"&&i,detail:f})}for(let u of s.removeCacheFiles)m.push({path:u,bytes:p(u),kind:"runtime-archive",state:"safe",selected:!0,detail:"downloaded archive is unnecessary after successful extraction"});return{activeRuntime:s.activeVersion,entries:m}}function T(i={}){let e=i.aggressive===!0,n=S(),s=x(e),r=[...s.entries,...L(n),...R(n),...U(n,e)].sort((t,o)=>o.bytes-t.bytes||t.path.localeCompare(o.path));return{home:n,activeRuntime:s.activeRuntime,entries:r,reclaimableBytes:r.reduce((t,o)=>t+(o.selected?o.bytes:0),0),protectedBytes:r.reduce((t,o)=>t+(o.selected?0:o.bytes),0),totalBytes:p(n)}}function D(i,e){let n=c.relative(i,e);if(!n||n.startsWith("..")||c.isAbsolute(n))throw new Error(`refusing cleanup target outside the SootSim home: ${e}`)}function I(i={}){let e=T(i),n=i.aggressive===!0?1:2;h.pruneLocalRetention({retainVersions:n,protectVersions:b()});for(let t of e.entries)if(t.selected&&!(t.kind==="runtime-archive"||t.kind==="runtime-version")){if(t.kind==="browser-cache"){let l=c.relative(e.home,t.path).split(c.sep),m=l[0]==="profiles"&&l[1]==="playwright"&&l[2]?c.join(e.home,"profiles","playwright",l[2]):l[0]==="electron"&&l[1]==="userData"?c.join(e.home,"electron","userData"):null;if(m&&E(m)){t.state="in-use",t.selected=!1,t.detail="browser profile opened while cleanup was starting";continue}}D(e.home,t.path),a.rmSync(t.path,{recursive:!0,force:!0})}let s=e.entries.filter(t=>t.selected&&!a.existsSync(t.path)).map(t=>t.path),r=p(e.home);return{...e,removedPaths:s,reclaimedBytes:Math.max(0,e.totalBytes-r),remainingBytes:r}}function $(){B();let i=S(),e=c.join(i,k),n=c.join(i,A);if(w())return{status:"already-complete",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};let s=null;for(let r=0;r<2&&s===null;r++)try{let t=a.openSync(n,"wx");try{a.writeFileSync(t,`${JSON.stringify({pid:process.pid,startedAt:Date.now()})}
5
5
  `,"utf8"),s=t}catch(o){a.closeSync(t);try{a.unlinkSync(n)}catch{}throw o}}catch(t){if((t instanceof Error&&"code"in t?t.code:null)!=="EEXIST")throw t;let l=0,m=0,u=null;try{u=a.lstatSync(n);let d=JSON.parse(a.readFileSync(n,"utf8"));l=typeof d.pid=="number"?d.pid:0,m=typeof d.startedAt=="number"?d.startedAt:0}catch{}if(l>0&&m>0&&Date.now()-m<P)try{return process.kill(l,0),{status:"busy",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0}}catch{}if(!u)continue;try{let d=a.lstatSync(n);if(d.dev!==u.dev||d.ino!==u.ino)return{status:"busy",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};a.unlinkSync(n)}catch{}}if(s===null)return{status:"busy",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};try{if(w())return{status:"already-complete",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};let r=I(),t=r.entries.reduce((l,m)=>l+(m.state==="in-use"?m.bytes:0),0);if(t>0)return{status:"deferred",reclaimedBytes:r.reclaimedBytes,remainingBytes:r.remainingBytes,deferredInUseBytes:t};let o=`${e}.${process.pid}.tmp`;return a.writeFileSync(o,`${JSON.stringify({generation:g,completedAt:Date.now(),reclaimedBytes:r.reclaimedBytes})}
6
6
  `,"utf8"),a.renameSync(o,e),{status:"complete",reclaimedBytes:r.reclaimedBytes,remainingBytes:r.remainingBytes,deferredInUseBytes:0}}finally{a.closeSync(s);try{a.unlinkSync(n)}catch{}}}export{w as a,N as b,T as c,I as d,$ as e};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  function Q(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r){let o=t.indexOf(n);if(o>=0&&t[o+1]){let s=Number(t[o+1]);if(Number.isFinite(s))return Math.max(100,s)}}return e}var N=new Set(["tap","double-tap","tap-text","tap-id","long-press","touch"]);function P(t){return typeof t=="string"&&N.has(t)}async function M(t){return await t.send({type:"evaluate",code:"window.__sootsimEngineState?.inspectActive === true"})===!0}async function X(t,e){if(!P(e))return!1;try{return await M(t)}catch{return!1}}async function Z(t){let e=await t.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof e=="number"?e:0}}async function ee(t,e=5,r){let n=r?.format?`, ${JSON.stringify(r)}`:"",o=await t.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${e}${n}))()`});if(r?.format==="boxes"&&typeof o=="string")try{return{depth:e,tree:JSON.parse(o)}}catch{return{depth:e,tree:o}}return{depth:e,tree:o}}async function te(t){let e=await t.send({type:"evaluate",code:"window.location.href"});return{url:typeof e=="string"?e:""}}async function ne(t,e){let r=`(async () => {
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a}from"./chunk-KVLXMWV5.js";import{A as l,C as u}from"./chunk-EBCXFB3K.js";var c=/^[A-Za-z0-9._:-]{1,160}$/;function T(e){if(!e?.startsWith("TM_SESSION:"))return null;let n=e.slice(11).trim();return c.test(n)?n:null}function p(e){return c.test(e)}function f(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!l().productAnalytics}function m(){if(f())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let n=process.env.CONTRAST_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:n.replace(/\/+$/,"")}}function d(){try{return u()}catch{return"anonymous-cli"}}function S(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:d():d()}function h(e){let n=e.identity??{},o=process.env.TM_SESSION,s=o&&p(o)?"team-machine":process.env.CI==="1"||process.env.CI==="true"||process.env.GITHUB_ACTIONS==="true"?"ci":null,t={$lib:"sootsim-cli",source:n.source??"cli",...e.properties,traffic_type:s?"automated":"human",is_automated:s!==null,...s?{automation_source:s}:{}};return n.userId&&(t.userId=n.userId),n.repoId&&(t.repoId=n.repoId),n.installationId!=null&&(t.installationId=String(n.installationId)),n.shareId&&(t.shareId=n.shareId),n.plan&&(t.plan=n.plan),{event:e.event,distinct_id:S(n),properties:t,timestamp:new Date().toISOString()}}var r=[],I=!1;async function i(){if(r.length===0)return;let e=m();if(!e){r.length=0;return}let n=r.splice(0,r.length).map(h);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:n}),signal:AbortSignal.timeout(2e3)})}catch{}}function g(){I||(I=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function C(e){if(f())return;g();let n=null;try{n=a()?.user?.id??null}catch{n=null}r.push({...e,identity:{source:"cli",userId:n,...e.identity}})}async function E(){await i()}export{T as a,p as b,C as c,E as d};
4
+ import{a}from"./chunk-YPKDDYIE.js";import{A as l,C as u}from"./chunk-SLEKK2UU.js";var c=/^[A-Za-z0-9._:-]{1,160}$/;function T(e){if(!e?.startsWith("TM_SESSION:"))return null;let n=e.slice(11).trim();return c.test(n)?n:null}function p(e){return c.test(e)}function f(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!l().productAnalytics}function m(){if(f())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let n=process.env.CONTRAST_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:n.replace(/\/+$/,"")}}function d(){try{return u()}catch{return"anonymous-cli"}}function S(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:d():d()}function h(e){let n=e.identity??{},o=process.env.TM_SESSION,s=o&&p(o)?"team-machine":process.env.CI==="1"||process.env.CI==="true"||process.env.GITHUB_ACTIONS==="true"?"ci":null,t={$lib:"sootsim-cli",source:n.source??"cli",...e.properties,traffic_type:s?"automated":"human",is_automated:s!==null,...s?{automation_source:s}:{}};return n.userId&&(t.userId=n.userId),n.repoId&&(t.repoId=n.repoId),n.installationId!=null&&(t.installationId=String(n.installationId)),n.shareId&&(t.shareId=n.shareId),n.plan&&(t.plan=n.plan),{event:e.event,distinct_id:S(n),properties:t,timestamp:new Date().toISOString()}}var r=[],I=!1;async function i(){if(r.length===0)return;let e=m();if(!e){r.length=0;return}let n=r.splice(0,r.length).map(h);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:n}),signal:AbortSignal.timeout(2e3)})}catch{}}function g(){I||(I=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function C(e){if(f())return;g();let n=null;try{n=a()?.user?.id??null}catch{n=null}r.push({...e,identity:{source:"cli",userId:n,...e.identity}})}async function E(){await i()}export{T as a,p as b,C as c,E as d};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  var t=Object.freeze({id:"ios",displayName:"iOS",isIOS:!0,isAndroid:!1,select:e=>e.ios}),r=Object.freeze({id:"android",displayName:"Android",isIOS:!1,isAndroid:!0,select:e=>e.android}),i=Object.freeze({ios:t,android:r});
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as c}from"./chunk-4Q42Y64Y.js";import{a}from"./chunk-POIK3AHY.js";import{a as e}from"./chunk-KG2WUKD2.js";import{a as n}from"./chunk-OCRL2VU4.js";import{c as i,d as m,e as p}from"./chunk-COD6QGS2.js";import{a as u}from"./chunk-CWDEDUOZ.js";import{a as f,c as s}from"./chunk-DHDSGBZB.js";function g(){return`sootsim CLI v${u()} \xB7 ${c().primary}`}function _(){let r=m({bridgePort:7668,defaultShellUrl:n},e()),o=`
4
+ import{a as c}from"./chunk-LTS6OYSK.js";import{a}from"./chunk-ZZBMQEEE.js";import{a as e}from"./chunk-AD2J3Y5G.js";import{a as n}from"./chunk-KCRDI5B2.js";import{c as i,d as m,e as p}from"./chunk-EY5RFXHC.js";import{a as u}from"./chunk-3S57XWPX.js";import{a as f,c as s}from"./chunk-E2AY5MPI.js";function g(){return`sootsim CLI v${u()} \xB7 ${c().primary}`}function _(){let r=m({bridgePort:7668,defaultShellUrl:n},e()),o=`
5
5
  ${s}
6
6
  `;console.log(`${g()}
7
7
  ${o}${r}
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as j,d as H}from"./chunk-3PREBGTH.js";import{c as Y}from"./chunk-J653UMCU.js";import{K as F,M,g as R,j as E,r as O,s as x,t as U}from"./chunk-EBCXFB3K.js";import{a as V}from"./chunk-CWDEDUOZ.js";import{execFileSync as Z,spawnSync as c}from"child_process";import{existsSync as n,mkdirSync as L,readFileSync as le,realpathSync as ue,rmSync as h,writeFileSync as K}from"fs";import{homedir as v}from"os";import{basename as pe,dirname as C,resolve as u,sep as X}from"path";import{execFileSync as re}from"child_process";import{chmodSync as oe,mkdirSync as A,rmSync as se,writeFileSync as I}from"fs";import{dirname as T}from"path";var ne="dev.sootsim.daemon",G="SootSim Daemon",q="0.1.36";function W(e,t,r){let s=x(),o=U(),a=T(T(o)),l=T(o),p=`${a}/Resources`;se(s,{recursive:!0,force:!0}),A(O(),{recursive:!0}),A(l,{recursive:!0}),A(p,{recursive:!0}),I(`${a}/Info.plist`,ie()),I(`${a}/PkgInfo`,"APPL????"),I(o,ae(e,t,r)),oe(o,493);try{re("codesign",["--force","--sign","-","--deep",s],{stdio:"pipe"})}catch(i){let f=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${s} failed: ${f}
4
+ import{c as j,d as H}from"./chunk-WE6WXVYB.js";import{c as Y}from"./chunk-WTWGQFNU.js";import{K as F,M,g as R,j as E,r as O,s as x,t as U}from"./chunk-SLEKK2UU.js";import{a as V}from"./chunk-3S57XWPX.js";import{execFileSync as Z,spawnSync as c}from"child_process";import{existsSync as n,mkdirSync as L,readFileSync as le,realpathSync as ue,rmSync as h,writeFileSync as K}from"fs";import{homedir as v}from"os";import{basename as pe,dirname as C,resolve as u,sep as X}from"path";import{execFileSync as re}from"child_process";import{chmodSync as oe,mkdirSync as A,rmSync as se,writeFileSync as I}from"fs";import{dirname as T}from"path";var ne="dev.sootsim.daemon",G="SootSim Daemon",q="0.1.36";function W(e,t,r){let s=x(),o=U(),a=T(T(o)),l=T(o),p=`${a}/Resources`;se(s,{recursive:!0,force:!0}),A(O(),{recursive:!0}),A(l,{recursive:!0}),A(p,{recursive:!0}),I(`${a}/Info.plist`,ie()),I(`${a}/PkgInfo`,"APPL????"),I(o,ae(e,t,r)),oe(o,493);try{re("codesign",["--force","--sign","-","--deep",s],{stdio:"pipe"})}catch(i){let f=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${s} failed: ${f}
5
5
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:s,launcherPath:o}}function ie(){return`<?xml version="1.0" encoding="UTF-8"?>
6
6
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
7
7
  <plist version="1.0">
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{h as j,j as A,m as K,n as v}from"./chunk-NNR3BU5O.js";import{createHash as Y}from"node:crypto";import{mkdirSync as L,readFileSync as W,readdirSync as Q,unlinkSync as X,writeFileSync as D}from"node:fs";import{dirname as q,extname as Z,resolve as B}from"node:path";function H(t){let e=t[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function U(t,e,o){let n=j(t,{port:e.port}),i=H(n.positional),m=A({...n,commandTimeoutMs:5e3});try{let a=!!(await K(m,"SootSim.bridges.settings.get"))?.[o.modeKey],u=i==="on"?!0:i==="off"?!1:!a;if(a===u)return console.log(` ${o.displayName}: already ${u?"on":"off"}`),{current:a,target:u,changed:!1};if(!await m.send({type:"evaluate",acquireLock:!0,code:`(async () => {
4
+ import{h as j,j as A,m as K,n as v}from"./chunk-LL76B22R.js";import{createHash as Y}from"node:crypto";import{mkdirSync as L,readFileSync as W,readdirSync as Q,unlinkSync as X,writeFileSync as D}from"node:fs";import{dirname as q,extname as Z,resolve as B}from"node:path";function H(t){let e=t[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function U(t,e,o){let n=j(t,{port:e.port}),i=H(n.positional),m=A({...n,commandTimeoutMs:5e3});try{let a=!!(await K(m,"SootSim.bridges.settings.get"))?.[o.modeKey],u=i==="on"?!0:i==="off"?!1:!a;if(a===u)return console.log(` ${o.displayName}: already ${u?"on":"off"}`),{current:a,target:u,changed:!1};if(!await m.send({type:"evaluate",acquireLock:!0,code:`(async () => {
5
5
  const modeKey = ${JSON.stringify(o.modeKey)}
6
6
  const target = ${JSON.stringify(u)}
7
7
  window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{o as d}from"./chunk-EBCXFB3K.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)+`
4
+ import{o as d}from"./chunk-SLEKK2UU.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)+`
5
5
  `);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,4 +1,4 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  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,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as K,b as V,c as Ne}from"./chunk-WQYUHDBU.js";import{c as Fe}from"./chunk-PELXRGDN.js";import{k as $e}from"./chunk-UUKUKTV3.js";import{d as Oe}from"./chunk-ZRQFYMTL.js";import{h as _e,j as Pe,l as B}from"./chunk-NNR3BU5O.js";import{c as Ue,d as E}from"./chunk-3PREBGTH.js";import{a as Ae}from"./chunk-KVLXMWV5.js";import{createHash as St}from"crypto";import{readFileSync as M}from"fs";import je from"path";import{gzipSync as ge,gunzipSync as vt}from"zlib";function Ce(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 ut,constants as ct}from"node:zlib";var dt=9;function Le(e){return ut(e,{params:{[ct.BROTLI_PARAM_QUALITY]:dt}})}function ce(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 pt(e){let t=ce(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 mt(e,t=8,r){let s=0,o=0,i=e.length;await Promise.all(Array.from({length:Math.min(t,i)},async()=>{for(;s<i;){let l=e[s++];await pt(l),o++,r?.(o,i)}}))}function ft(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let i of e.files){let l=r.get(i.urlhash);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&o.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&o.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&o.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&o.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let i of e.snapshots??[]){let l=s?.snapshotBytes?.get(i.id);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}return o}function gt(e){return e.replace(/\/+$/,"")}var W=class extends Error{constructor(r,s,o,i=""){super(r);this.status=s;this.phase=o;this.responseText=i;this.name="PresignedUploadError"}};async function ze(e){let t=gt(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=ce(3e4,"init"),o;try{o=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!o.ok){let T=await o.text().catch(()=>"");throw new W(`init failed: ${o.status} ${T.slice(0,200)}`,o.status,"init",T)}let i=await o.json(),l=ft(i,e.bundleBytes,e.filesByHash,e.extras);await mt(l,e.concurrency??8,e.onPutProgress);let m=ce(3e4,"finalize"),c;try{c=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:i.token}),signal:m.signal})}finally{m.cancel()}if(!c.ok){let T=await c.text().catch(()=>"");throw new W(`finalize failed: ${c.status} ${T.slice(0,200)}`,c.status,"finalize",T)}let h=await c.json();return{init:i,finalize:h}}function ht(e){return e!==null&&typeof e=="object"?e:null}function De(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function de(e){let t=ht(e);return t?t.schemaVersion===1&&De(t.t)!==void 0&&De(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function yt(e,t){let r=[];for(let s of e.split(`
4
+ import{a as K,b as V,c as Ne}from"./chunk-J52NXD2T.js";import{c as Fe,d as Oe}from"./chunk-RCLJQZQR.js";import{k as $e}from"./chunk-537ULSCX.js";import{h as _e,j as Pe,l as B}from"./chunk-LL76B22R.js";import{c as Ue,d as E}from"./chunk-WE6WXVYB.js";import{a as Ae}from"./chunk-YPKDDYIE.js";import{createHash as St}from"crypto";import{readFileSync as M}from"fs";import je from"path";import{gzipSync as ge,gunzipSync as vt}from"zlib";function Ce(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 ut,constants as ct}from"node:zlib";var dt=9;function Le(e){return ut(e,{params:{[ct.BROTLI_PARAM_QUALITY]:dt}})}function ce(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 pt(e){let t=ce(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 mt(e,t=8,r){let s=0,o=0,i=e.length;await Promise.all(Array.from({length:Math.min(t,i)},async()=>{for(;s<i;){let l=e[s++];await pt(l),o++,r?.(o,i)}}))}function ft(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let i of e.files){let l=r.get(i.urlhash);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&o.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&o.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&o.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&o.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let i of e.snapshots??[]){let l=s?.snapshotBytes?.get(i.id);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}return o}function gt(e){return e.replace(/\/+$/,"")}var W=class extends Error{constructor(r,s,o,i=""){super(r);this.status=s;this.phase=o;this.responseText=i;this.name="PresignedUploadError"}};async function ze(e){let t=gt(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=ce(3e4,"init"),o;try{o=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!o.ok){let T=await o.text().catch(()=>"");throw new W(`init failed: ${o.status} ${T.slice(0,200)}`,o.status,"init",T)}let i=await o.json(),l=ft(i,e.bundleBytes,e.filesByHash,e.extras);await mt(l,e.concurrency??8,e.onPutProgress);let m=ce(3e4,"finalize"),c;try{c=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:i.token}),signal:m.signal})}finally{m.cancel()}if(!c.ok){let T=await c.text().catch(()=>"");throw new W(`finalize failed: ${c.status} ${T.slice(0,200)}`,c.status,"finalize",T)}let h=await c.json();return{init:i,finalize:h}}function ht(e){return e!==null&&typeof e=="object"?e:null}function De(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function de(e){let t=ht(e);return t?t.schemaVersion===1&&De(t.t)!==void 0&&De(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function yt(e,t){let r=[];for(let s of e.split(`
5
5
  `)){let o=s.trim();if(o)try{let i=JSON.parse(o);t(i)&&r.push(i)}catch{}}return r}function He(e){return yt(e,de)}import{execSync as bt}from"child_process";function me(e){try{return bt(e,{stdio:["ignore","pipe","ignore"],timeout:3e3,encoding:"utf8"}).trim()||null}catch{return null}}function pe(e){let t=e?.trim();return!t||!/^\d+$/.test(t)?null:Number(t)}function wt(){let e=me("git remote get-url origin");if(!e)return null;let t=e.match(/github\.com[/:]([^/\s]+)\/([^/\s]+?)(?:\.git)?\/?$/i);return t?{owner:t[1],repo:t[2]}:null}function fe(){let e=process.env.GITHUB_ACTIONS==="true",t=process.env.CONTRAST_BRANCH?.trim()||null,r=process.env.CONTRAST_SHA?.trim()||null,s=process.env.CONTRAST_PR_TITLE?.trim()||null,o=(process.env.CONTRAST_REPO||process.env.GITHUB_REPOSITORY||"").trim(),[i,l]=o.includes("/")?o.split("/",2):[null,null];if(e){let h=process.env.GITHUB_REF?.match(/^refs\/pull\/(\d+)\//)?.[1];return{owner:i,repo:l,branch:t||process.env.GITHUB_HEAD_REF?.trim()||process.env.GITHUB_REF_NAME?.trim()||null,commitSha:r||process.env.GITHUB_SHA?.trim()||null,githubUsername:process.env.GITHUB_ACTOR?.trim()||null,pullRequestNumber:pe(process.env.CONTRAST_PR_NUMBER)??pe(h),pullRequestTitle:s,githubRunId:process.env.GITHUB_RUN_ID?.trim()||null,source:"ci"}}let m=t??me("git rev-parse --abbrev-ref HEAD"),c=i?null:wt();return{owner:i??c?.owner??null,repo:l??c?.repo??null,branch:m==="HEAD"?null:m,commitSha:r??me("git rev-parse HEAD"),githubUsername:null,pullRequestNumber:pe(process.env.CONTRAST_PR_NUMBER),pullRequestTitle:s,githubRunId:null,source:"cli"}}function Yt(e){if(e.length===0)return{stepCount:null,failedStepIndex:null};let t=e.find(r=>r.status==="failure");return{stepCount:e.length,failedStepIndex:t?t.stepIndex:null}}function Qt(e){return e.auth?e.uploadedShare?!0:e.auth.kind==="github"||process.env.GITHUB_ACTIONS==="true":!1}async function Xt(e){let t=e.auth??K();if(!t)return null;let r=fe(),s=e.owner??(t.kind==="github"?t.owner:null)??r.owner,o=e.repo??(t.kind==="github"?t.repo:null)??r.repo;try{let i=await fetch(`${e.origin.replace(/\/$/,"")}/api/sootsim/test-runs`,{method:"POST",headers:{"content-type":"application/json",authorization:V(t)},body:JSON.stringify({kind:e.kind,source:r.source,name:e.name??void 0,prompt:e.prompt??void 0,summary:e.summary??void 0,status:e.status,failureMessage:e.failureMessage??void 0,previewShareId:e.previewShareId??void 0,owner:s??void 0,repo:o??void 0,branch:r.branch??void 0,commitSha:r.commitSha??void 0,githubUsername:r.githubUsername??void 0,pullRequestNumber:r.pullRequestNumber??void 0,githubRunId:r.githubRunId??void 0,stepCount:e.stepCount??void 0,failedStepIndex:e.failedStepIndex??void 0,durationMs:e.durationMs??void 0,flowYamlSizeBytes:e.flowYamlSizeBytes??void 0})});if(!i.ok){let m=await i.text().catch(()=>"");return console.warn(` warn: run registration failed: /api/sootsim/test-runs ${i.status}${m?`: ${m.slice(0,200)}`:""}`),null}let l=await i.json();return l.run?.id?{id:l.run.id,previewUrl:l.run.previewUrl??null,traceUrl:l.run.traceUrl??null}:(console.warn(" warn: run registration returned no id"),null)}catch(i){return console.warn(` warn: run registration failed: ${i instanceof Error?i.message:String(i)}`),null}}function Rt(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 xt(e){let t=JSON.parse(M(e,"utf8"));if(!Array.isArray(t))throw new Error("snapshot manifest must be an array");let r=new Set;return t.map((s,o)=>{if(s===null||typeof s!="object")throw new Error(`snapshot manifest entry ${o} must be an object`);let i=Reflect.get(s,"id"),l=Reflect.get(s,"label"),m=Reflect.get(s,"path"),c=Reflect.get(s,"t");if(typeof i!="string"||!i||r.has(i))throw new Error(`snapshot manifest entry ${o} has an invalid or duplicate id`);if(typeof m!="string"||!m)throw new Error(`snapshot manifest entry ${o} has no PNG path`);if(typeof c!="number"||!Number.isFinite(c)||c<0)throw new Error(`snapshot manifest entry ${o} has an invalid capture time`);r.add(i);let h=M(m);return{meta:{id:i,label:typeof l=="string"&&l?l:i,kind:"interaction",t:Math.round(c),contentType:"image/png",sizeBytes:h.byteLength},bytes:h}})}var Ve=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://contrast.dev",We=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",ye="https://contrast.localhost:3000",kt=2e3;async function Et(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${ye}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(kt)});if(t.ok||t.status===204||t.status===405)return ye}catch{}return Ve}function N(e){return e.replace(/\/$/,"")}function Bt(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function It(e){try{let t=new URL(e).hostname.toLowerCase();return t==="contrast.dev"||t.endsWith(".contrast.dev")}catch{return!1}}function At(e,t){return t?N(t):process.env.SOOTSIM_PREVIEW_ORIGIN?N(process.env.SOOTSIM_PREVIEW_ORIGIN):Bt(e)?N(e):It(e)?N(We):N(e)}function Ut(){console.log(`
6
6
  sootsim record upload \u2014 publish the current recorded bundle as a /preview/<id> link
7
7
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as f}from"./chunk-WIRBJTTU.js";import{existsSync as w,mkdirSync as g,readFileSync as h,writeFileSync as S,rmSync as q}from"fs";import{tmpdir as y}from"os";import{dirname as b,join as p}from"path";var m=new Map;function o(e,t){m.set(e,t)}var s=1;function a(){return p(y(),`sootsim-cli-hints-${f()}.json`)}function d(){return p(y(),"sootsim-cli-hints-global.json")}function u(e){if(!w(e))return{version:s,shown:{}};try{let t=JSON.parse(h(e,"utf8"));return t?.version!==s||!t?.shown?{version:s,shown:{}}:t}catch{return{version:s,shown:{}}}}function l(e,t){try{g(b(e),{recursive:!0}),S(e,JSON.stringify(t)+`
4
+ import{f}from"./chunk-KCRDI5B2.js";import{existsSync as w,mkdirSync as g,readFileSync as h,writeFileSync as S,rmSync as q}from"fs";import{tmpdir as y}from"os";import{dirname as b,join as p}from"path";var m=new Map;function o(e,t){m.set(e,t)}var s=1;function a(){return p(y(),`sootsim-cli-hints-${f()}.json`)}function d(){return p(y(),"sootsim-cli-hints-global.json")}function u(e){if(!w(e))return{version:s,shown:{}};try{let t=JSON.parse(h(e,"utf8"));return t?.version!==s||!t?.shown?{version:s,shown:{}}:t}catch{return{version:s,shown:{}}}}function l(e,t){try{g(b(e),{recursive:!0}),S(e,JSON.stringify(t)+`
5
5
  `)}catch{}}function v(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function H(e,t){let i=v();if(i==="off")return!1;if(i==="always"||t==="always")return!0;let r=Date.now();if(t==="once-per-identity"){let n=u(a());return n.shown[e]?!1:(n.shown[e]=r,l(a(),n),!0)}if(t==="once-ever"){let n=u(d());return n.shown[e]?!1:(n.shown[e]=r,l(d(),n),!0)}if(typeof t=="object"&&"cooldownMs"in t){let n=u(a()),c=n.shown[e]??0;return r-c<t.cooldownMs?!1:(n.shown[e]=r,l(a(),n),!0)}return!0}function A(e,...t){let i=m.get(e);if(!i)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!H(e,i.frequency))return!1;let r=i.render(...t);if(r==null)return!1;let n=Array.isArray(r)?r:[r];for(let c of n)console.error(` hint: ${c}`);return!0}o("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`sootsim wait ready\` first.`});o("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`sootsim wait selector ${e}`});o("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(t=>` ${t}`)]:null});o("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>"]});o("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:...)`."]});o("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`sootsim find --testid ${e}\` to discover available ids.`});o("clean-uninstall",{frequency:"once-ever",render:()=>["to remove the background daemon and all ~/.sootsim data, run `sootsim daemon uninstall`.","the optional desktop app and its macOS preference plist are separate from the daemon."]});export{A as a};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as s,c as g,d as f,e as v}from"./chunk-AJCL7DHI.js";import"./chunk-XI6CPN53.js";import"./chunk-SWBTXTEO.js";import"./chunk-EBCXFB3K.js";import"./chunk-LOF3WUKB.js";var b={"browser-cache":"browser caches",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(r){let i=new Map;for(let t of r){let o=i.get(t.kind)??{bytes:0,count:0};o.bytes+=t.bytes,o.count++,i.set(t.kind,o)}return[...i].sort((t,o)=>o[1].bytes-t[1].bytes).map(([t,o])=>` ${b[t]}: ${s(o.bytes)} (${o.count} ${o.count===1?"item":"items"})`)}function h(){console.log(`
4
+ import{b as s,c as g,d as f,e as v}from"./chunk-UKKB52JO.js";import"./chunk-6Q3FIZGP.js";import"./chunk-IBM36KUP.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";var b={"browser-cache":"browser caches",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(r){let i=new Map;for(let t of r){let o=i.get(t.kind)??{bytes:0,count:0};o.bytes+=t.bytes,o.count++,i.set(t.kind,o)}return[...i].sort((t,o)=>o[1].bytes-t[1].bytes).map(([t,o])=>` ${b[t]}: ${s(o.bytes)} (${o.count} ${o.count===1?"item":"items"})`)}function h(){console.log(`
5
5
  sootsim cleanup \u2014 inspect and reclaim local SootSim disk usage
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a}from"./chunk-CWDEDUOZ.js";import"./chunk-LOF3WUKB.js";export{a as getCliVersion};
4
+ import{a}from"./chunk-3S57XWPX.js";import"./chunk-XVQ2YGCI.js";export{a as getCliVersion};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{d as i,g as a,i as d,j as r}from"./chunk-KVOY4Z2X.js";import"./chunk-LOF3WUKB.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function $(e){if(e.includes("--help")||e.includes("-h")){console.log(`
4
+ import{d as i,g as a,i as d,j as r}from"./chunk-SZDXEZ2I.js";import"./chunk-XVQ2YGCI.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function $(e){if(e.includes("--help")||e.includes("-h")){console.log(`
5
5
  sootsim compat \u2014 check package compatibility
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{A as s,B as r,x as t}from"./chunk-EBCXFB3K.js";import"./chunk-LOF3WUKB.js";function l(){let e=s();console.log(` product analytics are ${e.productAnalytics?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function i(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":r({...s(),productAnalytics:!0}),console.log(" product analytics ON"),console.log(` config: ${t()}`);return;case"off":case"disable":r({...s(),productAnalytics:!1}),console.log(" product analytics OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
4
+ import{A as s,B as r,x as t}from"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";function l(){let e=s();console.log(` product analytics are ${e.productAnalytics?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function i(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":r({...s(),productAnalytics:!0}),console.log(" product analytics ON"),console.log(` config: ${t()}`);return;case"off":case"disable":r({...s(),productAnalytics:!1}),console.log(" product analytics OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
5
5
  sootsim config \u2014 manage local CLI preferences
6
6
 
7
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"./chunk-NLE5PR7V.js";import"./chunk-4QCKHLRV.js";import"./chunk-WPVMW3I5.js";import"./chunk-CKLXK3SU.js";import"./chunk-UURKPOZU.js";import"./chunk-NK72QUBY.js";import"./chunk-SZX2PHDS.js";import"./chunk-RCLJQZQR.js";import"./chunk-537ULSCX.js";import"./chunk-OQ6KN4TP.js";import"./chunk-EWSHWBPU.js";import"./chunk-SKMVVRFI.js";import"./chunk-746PZ7ND.js";import"./chunk-LL76B22R.js";import"./chunk-6Q3FIZGP.js";import"./chunk-IBM36KUP.js";import"./chunk-AD2J3Y5G.js";import"./chunk-2ODPPVQC.js";import"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";export{d as applyConfiguredRuntimeOrigin,h as buildOpenUrl,g as buildShellUrl,u as closeSimsBulk,b as normalizeDeepLinkTarget,v as planBulkCloseTargets,m as playwrightHostPidForSim,j as printConnectedSims,c as resolveBundleTarget,e as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,f as resolveShellBaseUrlForBridgePort,t as runClaimCommand,w as runCloseCommand,s as runFocusCommand,p as runLinkCommand,q as runOpenCommand,r as runUseCommand,n as signalDriverLaunchConnected,i as summarizeSimUrl,o as terminatePlaywrightHostsForSims,k as waitForSimMatch,l as waitForSimMatchOrHostExit};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d,e,f}from"./chunk-XRUSCWIH.js";import"./chunk-WE6WXVYB.js";import"./chunk-YPKDDYIE.js";import"./chunk-WTWGQFNU.js";import"./chunk-LTS6OYSK.js";import"./chunk-ZZBMQEEE.js";import"./chunk-AD2J3Y5G.js";import"./chunk-2ODPPVQC.js";import"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-EY5RFXHC.js";import"./chunk-SLEKK2UU.js";import"./chunk-3S57XWPX.js";import"./chunk-E2AY5MPI.js";import"./chunk-XVQ2YGCI.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,e as teardownDaemonService,d as teardownLegacyMacDaemonArtifacts,f as teardownSootsimHome};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{f,m as T}from"./chunk-IJ64Z77P.js";import{L as S,M as $,N,O as A,P as v}from"./chunk-R6MBDR56.js";import{h as D,j as O,l as x}from"./chunk-NNR3BU5O.js";import"./chunk-OCRL2VU4.js";import"./chunk-WIRBJTTU.js";import"./chunk-EBCXFB3K.js";import"./chunk-LOF3WUKB.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
4
+ import{f,m as T}from"./chunk-CKLXK3SU.js";import{L as S,M as $,N,O as A,P as v}from"./chunk-UURKPOZU.js";import{h as D,j as O,l as x}from"./chunk-LL76B22R.js";import"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
5
5
  sootsim debug \u2014 drive __sootsimDebug from the terminal
6
6
 
7
7
  usage:
@@ -172,7 +172,7 @@ examples:
172
172
  } : null,
173
173
  samples,
174
174
  }
175
- })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-L76RUF62.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
175
+ })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-2SR5AEEA.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
176
176
  known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
177
177
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
178
178
  if (!d) return null;
@@ -0,0 +1,31 @@
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a as d}from"./chunk-FRTR2EUL.js";import"./chunk-KPDYFXBD.js";import{a as u}from"./chunk-S5QHC5LD.js";import{a as l}from"./chunk-2P5OBO7Z.js";import{g as m}from"./chunk-NLE5PR7V.js";import"./chunk-4QCKHLRV.js";import"./chunk-WPVMW3I5.js";import"./chunk-CKLXK3SU.js";import"./chunk-UURKPOZU.js";import{b as c,f as a}from"./chunk-NK72QUBY.js";import{a as p}from"./chunk-SZX2PHDS.js";import"./chunk-RCLJQZQR.js";import"./chunk-537ULSCX.js";import"./chunk-OQ6KN4TP.js";import"./chunk-EWSHWBPU.js";import"./chunk-SKMVVRFI.js";import"./chunk-746PZ7ND.js";import"./chunk-LL76B22R.js";import"./chunk-6Q3FIZGP.js";import"./chunk-IBM36KUP.js";import"./chunk-AD2J3Y5G.js";import"./chunk-2ODPPVQC.js";import"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";function v(o){let n=o.indexOf("--port");if(n<0)return;let e=o[n+1],t=e?Number(e):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${e||"(missing)"}`),process.exit(1)),t}async function w(o,n){let e=v(o)??n.port;return e?m(String(e)):void 0}async function f(o,n){(o.includes("--help")||o.includes("-h"))&&(console.log(`
5
+ sootsim desktop \u2014 launch the desktop companion
6
+
7
+ usage:
8
+ sootsim desktop [options]
9
+
10
+ options:
11
+ --port <number> connect to running dev server on this port
12
+ --profile <id> launch with an isolated persistent storage profile
13
+ --ephemeral launch with a temporary isolated storage profile
14
+
15
+ examples:
16
+ sootsim desktop
17
+ sootsim desktop --port 5173
18
+ sootsim desktop --profile qa
19
+ `),process.exit(0));let e=o.find((k,s)=>o[s-1]==="--profile"),t=o.includes("--ephemeral");e&&t&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let h=e?c(e).id:void 0,i=p();if(!i){if(u(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await l("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:s}=await import("./install-desktop-KE5ZPY6L.js");await s(["--yes"]),i=p()}i||process.exit(1)}console.log(` launching ${i.path}`);let g=await w(o,n),r=await a.launch({url:g,device:n.device,profileId:h,ephemeralProfile:t});r.launched||(console.error(` ${r.message}`),process.exit(1)),console.log(` ${r.message}`)}function x(){console.log(`
20
+ sootsim desktop \u2014 launch or install the desktop companion
21
+
22
+ usage:
23
+ sootsim desktop [options]
24
+ sootsim desktop install [options]
25
+
26
+ options:
27
+ --port <number> connect to a running dev server on this port
28
+ --profile <id> launch with an isolated persistent storage profile
29
+ --ephemeral launch with a temporary isolated storage profile
30
+ -y, --yes install without prompting
31
+ `)}async function T(o,n){if(o.includes("--help")||o.includes("-h")){x();return}let e=o.find(t=>!t.startsWith("-"));if(e==="install"){let t=o.indexOf(e);await d([...o.slice(0,t),...o.slice(t+1)]);return}await f(o,n)}export{T as runDesktop};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{e as $}from"./chunk-JKIPNRAK.js";import"./chunk-2D7NF3XK.js";import"./chunk-QVH276LI.js";import"./chunk-EWVEUNRO.js";import"./chunk-BDNZULU7.js";import"./chunk-B65RMI7A.js";import{c as F,d as M,e as E}from"./chunk-KSZRLJPA.js";import{a as P}from"./chunk-WQYUHDBU.js";import"./chunk-QJUKXBH5.js";import"./chunk-H5D6E3DR.js";import"./chunk-EPZG2F4I.js";import"./chunk-IJ64Z77P.js";import"./chunk-R6MBDR56.js";import"./chunk-HKPJYMJC.js";import"./chunk-43SNLCXR.js";import"./chunk-PELXRGDN.js";import"./chunk-UUKUKTV3.js";import"./chunk-ZRQFYMTL.js";import"./chunk-DTHOMSAA.js";import"./chunk-XWMTLVCE.js";import"./chunk-VKBCGFOU.js";import"./chunk-TRV5K6D2.js";import"./chunk-NNR3BU5O.js";import"./chunk-R5TBMYGH.js";import"./chunk-3PREBGTH.js";import"./chunk-KVLXMWV5.js";import"./chunk-XI6CPN53.js";import"./chunk-SWBTXTEO.js";import"./chunk-POIK3AHY.js";import"./chunk-KG2WUKD2.js";import"./chunk-6EXIYEOQ.js";import"./chunk-OCRL2VU4.js";import"./chunk-WIRBJTTU.js";import"./chunk-COD6QGS2.js";import"./chunk-EBCXFB3K.js";import"./chunk-LOF3WUKB.js";import{spawn as G}from"child_process";import{existsSync as x,mkdirSync as W,readFileSync as B,writeFileSync as y,unlinkSync as U}from"fs";import{tmpdir as N}from"os";import{dirname as C,resolve as c,join as J,relative as q}from"path";function H(){try{let t=import.meta.resolve("sootsim/detox");return C(t.startsWith("file://")?t.slice(7):t)}catch{return c(import.meta.dirname,"..","..","detox")}}var V=`
4
+ import{e as $}from"./chunk-4BZ6SM53.js";import"./chunk-7T5WCLEU.js";import"./chunk-BO2XSJJA.js";import"./chunk-NWOGE4YS.js";import"./chunk-S5QHC5LD.js";import"./chunk-QJ7B6FFD.js";import"./chunk-7HPBPICZ.js";import{c as F,d as M,e as E}from"./chunk-ZJR2AKLU.js";import{a as P}from"./chunk-J52NXD2T.js";import"./chunk-NLE5PR7V.js";import"./chunk-4QCKHLRV.js";import"./chunk-WPVMW3I5.js";import"./chunk-CKLXK3SU.js";import"./chunk-UURKPOZU.js";import"./chunk-NK72QUBY.js";import"./chunk-SZX2PHDS.js";import"./chunk-RCLJQZQR.js";import"./chunk-537ULSCX.js";import"./chunk-OQ6KN4TP.js";import"./chunk-EWSHWBPU.js";import"./chunk-SKMVVRFI.js";import"./chunk-746PZ7ND.js";import"./chunk-LL76B22R.js";import"./chunk-3JLFWHOZ.js";import"./chunk-WE6WXVYB.js";import"./chunk-YPKDDYIE.js";import"./chunk-6Q3FIZGP.js";import"./chunk-IBM36KUP.js";import"./chunk-ZZBMQEEE.js";import"./chunk-AD2J3Y5G.js";import"./chunk-2ODPPVQC.js";import"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-EY5RFXHC.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";import{spawn as G}from"child_process";import{existsSync as x,mkdirSync as W,readFileSync as B,writeFileSync as y,unlinkSync as U}from"fs";import{tmpdir as N}from"os";import{dirname as C,resolve as c,join as J,relative as q}from"path";function H(){try{let t=import.meta.resolve("sootsim/detox");return C(t.startsWith("file://")?t.slice(7):t)}catch{return c(import.meta.dirname,"..","..","detox")}}var V=`
5
5
  sootsim detox \u2014 run detox-style tests against a sootsim shell
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import"./chunk-EPZG2F4I.js";import"./chunk-DTHOMSAA.js";import{h as d,j as l,m as a}from"./chunk-NNR3BU5O.js";import"./chunk-KG2WUKD2.js";import{b as c,c as r,d as g}from"./chunk-6EXIYEOQ.js";import"./chunk-OCRL2VU4.js";import"./chunk-WIRBJTTU.js";import"./chunk-EBCXFB3K.js";import"./chunk-LOF3WUKB.js";function h(){console.log(`
4
+ import"./chunk-WPVMW3I5.js";import"./chunk-OQ6KN4TP.js";import{h as d,j as l,m as a}from"./chunk-LL76B22R.js";import"./chunk-AD2J3Y5G.js";import{b as c,c as r,d as g}from"./chunk-2ODPPVQC.js";import"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";function h(){console.log(`
5
5
  sootsim device \u2014 inspect or change the live device preset for a sim
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{h as E,j as R,m as b}from"./chunk-NNR3BU5O.js";import"./chunk-OCRL2VU4.js";import{c as v}from"./chunk-WIRBJTTU.js";import"./chunk-EBCXFB3K.js";import"./chunk-LOF3WUKB.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
4
+ import{h as E,j as R,m as b}from"./chunk-LL76B22R.js";import{f as v}from"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
5
5
  sootsim get diagnosis \u2014 compact "what just went wrong?" report
6
6
 
7
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d,e}from"./chunk-UKKB52JO.js";import"./chunk-6Q3FIZGP.js";import"./chunk-IBM36KUP.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";export{e as applyAutomaticSootsimCleanup,d as applySootsimCleanup,b as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,c as planSootsimCleanup};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import"./chunk-KPDYFXBD.js";import{f as a,g as b,h as c,i as d,j as e,k as f,l as g}from"./chunk-NK72QUBY.js";import"./chunk-SZX2PHDS.js";import"./chunk-6Q3FIZGP.js";import"./chunk-5MN7CUQB.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";export{c as ALL_DRIVERS,g as buildDriverListRows,a as electronDriver,d as getAllDrivers,e as getDriver,b as playwrightDriver,f as resolveDriver};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as L,d as T}from"./chunk-HMOYEM6V.js";import{h as A,j as R,n as b}from"./chunk-NNR3BU5O.js";import"./chunk-OCRL2VU4.js";import"./chunk-WIRBJTTU.js";import"./chunk-EBCXFB3K.js";import"./chunk-LOF3WUKB.js";import{spawnSync as x}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
4
+ import{c as L,d as T}from"./chunk-YIKFWG22.js";import{h as A,j as R,n as b}from"./chunk-LL76B22R.js";import"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";import{spawnSync as x}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
5
5
  sootsim film \u2014 record a flow flat, replay it on the 3d stage, save a clip
6
6
 
7
7
  usage:
@@ -35,7 +35,7 @@ examples:
35
35
  sootsim film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
36
36
  sootsim film flows/login.yaml --colorway deep-blue --environment on --env-shape pane --room on
37
37
  `),0;let s=e.find(d=>!d.startsWith("--")&&/\.ya?ml$/.test(d));if(!s||!V(I(s)))return console.error(` film: flow file not found: ${s??"(none given)"}`),1;let P=Number.parseInt(c(e,"--fps")??"30",10),h=c(e,"--script")??"hero-arc",z=e.includes("--keep-three"),v=s.replace(/^.*\//,"").replace(/\.ya?ml$/,""),O=c(e,"--out"),l=I(O??K(j(),"Desktop","sootsim-films",`${v}.webm`)),S=H(l).toLowerCase()===".mp4";if(S&&x("ffmpeg",["-version"]).status!==0)return console.error(" film: --out ends in .mp4 but ffmpeg is not installed"),console.error(" install ffmpeg or use a .webm output path"),1;let C=A(e,{port:a.port,stripValueFlags:[...X,...Q],stripBooleanFlags:J}),t=R({...C,commandTimeoutMs:6e4});try{let d=await r(t,`(() => { const s = window.SootSim?.bridges?.settings?.get?.() || {}
38
- return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-XJRNL25V.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
38
+ return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-3HCUMLZL.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
39
39
  return { state: s?.state, hasBlob: !!s?.lastVideoBlob } })()`);if(i?.state==="idle"&&i.hasBlob){F=!0;break}}if(!F)return console.error(" film: flow recording never produced a video blob"),1;console.log(` film: flow captured (${(u/1e3).toFixed(1)}s)`),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeMode', true)"),await L(t),await n(1400),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', true)");let _=!1;for(let o=0;o<60;o++)if(await n(250),await r(t,`(() => { const rs = window.SootSim?.replayStore
40
40
  return rs?.value?.preview?.surface === 'video' && !!rs?.value?.preview?.flowVideoUrl })()`)){_=!0;break}if(!_)return console.error(" film: recording editor did not seed the replay store"),1;let p=T(e);delete p.script,p.resetPose=!0,await b(t,"SootSim.bridges.threeMode.configure",p),await n(2400),console.log(` film: filming the 3d stage (script: ${h})`);let M=await r(t,`(() => {
41
41
  const c = window.SootSim?.bridges?.threeMode?.getCanvas?.()
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{c,d,e,f,g,h}from"./chunk-4BZ6SM53.js";import"./chunk-7T5WCLEU.js";import"./chunk-BO2XSJJA.js";import{b as a,c as b}from"./chunk-NWOGE4YS.js";import"./chunk-S5QHC5LD.js";import"./chunk-QJ7B6FFD.js";import"./chunk-7HPBPICZ.js";import"./chunk-ZJR2AKLU.js";import"./chunk-J52NXD2T.js";import"./chunk-NLE5PR7V.js";import"./chunk-4QCKHLRV.js";import"./chunk-WPVMW3I5.js";import"./chunk-CKLXK3SU.js";import"./chunk-UURKPOZU.js";import"./chunk-NK72QUBY.js";import"./chunk-SZX2PHDS.js";import"./chunk-RCLJQZQR.js";import"./chunk-537ULSCX.js";import"./chunk-OQ6KN4TP.js";import"./chunk-EWSHWBPU.js";import"./chunk-SKMVVRFI.js";import"./chunk-746PZ7ND.js";import"./chunk-LL76B22R.js";import"./chunk-3JLFWHOZ.js";import"./chunk-WE6WXVYB.js";import"./chunk-YPKDDYIE.js";import"./chunk-6Q3FIZGP.js";import"./chunk-IBM36KUP.js";import"./chunk-ZZBMQEEE.js";import"./chunk-AD2J3Y5G.js";import"./chunk-2ODPPVQC.js";import"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-EY5RFXHC.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";export{e as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,d as getLastFlowTraceSteps,g as hoistLeadingSimFlag,a as parseFlowFile,f as runFlowPlayback,h as runMaestroAuthoring,b as validateFlowFile};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c}from"./chunk-WTWGQFNU.js";import"./chunk-LTS6OYSK.js";import"./chunk-ZZBMQEEE.js";import"./chunk-AD2J3Y5G.js";import"./chunk-2ODPPVQC.js";import"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-EY5RFXHC.js";import"./chunk-SLEKK2UU.js";import"./chunk-3S57XWPX.js";import"./chunk-E2AY5MPI.js";import"./chunk-XVQ2YGCI.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as e,b as s}from"./chunk-COD6QGS2.js";import"./chunk-LOF3WUKB.js";var n=[{title:"Overview",route:"/docs/sootsim/cli"},...e.slice().sort((o,t)=>o.order-t.order).map(o=>({title:o.navTitle,route:`/docs/sootsim/cli/${o.slug}`}))];var i=["do","get"];function g(o){if(o.command)return o;let t=o.commandArgs.find(r=>!r.startsWith("-"));if(!t)return o;for(let r of i)if(s(r,t))return{...o,command:r};return o}export{g as resolveHiddenRuntimeAlias};
4
+ import{a as e,b as s}from"./chunk-EY5RFXHC.js";import"./chunk-XVQ2YGCI.js";var n=[{title:"Overview",route:"/docs/sootsim/cli"},...e.slice().sort((o,t)=>o.order-t.order).map(o=>({title:o.navTitle,route:`/docs/sootsim/cli/${o.slug}`}))];var i=["do","get"];function g(o){if(o.command)return o;let t=o.commandArgs.find(r=>!r.startsWith("-"));if(!t)return o;for(let r of i)if(s(r,t))return{...o,command:r};return o}export{g as resolveHiddenRuntimeAlias};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-EBCXFB3K.js";import"./chunk-LOF3WUKB.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,J as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,R as claimDaemonLockfile,x as configFilePath,F as consumeRuntimeUpgradeNotice,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,G as ensureSootsimHome,M as isDaemonLockfileFresh,N as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,H as readActiveRuntime,K as readDaemonLockfile,L as readDevBridgeLockfile,O as readLiveRuntimeVersions,C as readOrCreateAnonymousId,A as readPrivacyPreferences,y as readSharedConfig,S as removeDaemonLockfile,T as removeDevBridgeLockfile,l as runtimeDir,D as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,I as writeActiveRuntime,P as writeDaemonLockfile,Q as writeDevBridgeLockfile,B as writePrivacyPreferences,E as writeRuntimeUpgradeNotice,z as writeSharedConfig};
4
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,J as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,R as claimDaemonLockfile,x as configFilePath,F as consumeRuntimeUpgradeNotice,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,G as ensureSootsimHome,M as isDaemonLockfileFresh,N as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,H as readActiveRuntime,K as readDaemonLockfile,L as readDevBridgeLockfile,O as readLiveRuntimeVersions,C as readOrCreateAnonymousId,A as readPrivacyPreferences,y as readSharedConfig,S as removeDaemonLockfile,T as removeDevBridgeLockfile,l as runtimeDir,D as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,I as writeActiveRuntime,P as writeDaemonLockfile,Q as writeDevBridgeLockfile,B as writePrivacyPreferences,E as writeRuntimeUpgradeNotice,z as writeSharedConfig};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{i as a,j as b}from"./chunk-NWOGE4YS.js";import"./chunk-S5QHC5LD.js";import"./chunk-QJ7B6FFD.js";import"./chunk-7HPBPICZ.js";import"./chunk-NLE5PR7V.js";import"./chunk-4QCKHLRV.js";import"./chunk-WPVMW3I5.js";import"./chunk-CKLXK3SU.js";import"./chunk-UURKPOZU.js";import"./chunk-NK72QUBY.js";import"./chunk-SZX2PHDS.js";import"./chunk-RCLJQZQR.js";import"./chunk-537ULSCX.js";import"./chunk-OQ6KN4TP.js";import"./chunk-EWSHWBPU.js";import"./chunk-SKMVVRFI.js";import"./chunk-746PZ7ND.js";import"./chunk-LL76B22R.js";import"./chunk-3JLFWHOZ.js";import"./chunk-6Q3FIZGP.js";import"./chunk-IBM36KUP.js";import"./chunk-ZZBMQEEE.js";import"./chunk-AD2J3Y5G.js";import"./chunk-2ODPPVQC.js";import"./chunk-KCRDI5B2.js";import"./chunk-5MN7CUQB.js";import"./chunk-EY5RFXHC.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";export{a as printShellPerfReport,b as runInspect};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a}from"./chunk-FRTR2EUL.js";import"./chunk-2P5OBO7Z.js";import"./chunk-SZX2PHDS.js";import"./chunk-XVQ2YGCI.js";export{a as runInstallDesktop};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as k,d as v}from"./chunk-KVLXMWV5.js";import"./chunk-EBCXFB3K.js";import"./chunk-LOF3WUKB.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import x from"node:http";var b=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev",w="https://contrast.localhost:3000";async function P(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return b}function A(){console.log(`
4
+ import{b as k,d as v}from"./chunk-YPKDDYIE.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import x from"node:http";var b=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev",w="https://contrast.localhost:3000";async function P(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return b}function A(){console.log(`
5
5
  sootsim login \u2014 sign in so uploads can attach to your account
6
6
 
7
7
  usage:
@@ -23,6 +23,6 @@ options:
23
23
  <p style="color:#ccc">${r}</p>
24
24
  </div>
25
25
  </body>
26
- </html>`}async function E(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"local dev-login unavailable"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function G(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function z(r){(r.includes("--help")||r.includes("-h"))&&(A(),process.exit(0));let e=[...r],t=await P(C(e,"--origin"));if(G(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await E(t);if(o.ok){k({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let i=await v(t),d=i?.user?.email||o.email||i?.user?.id||o.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-TNX72J2B.js");a({event:"cli_login_succeeded",identity:{userId:o.userId??i?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-TNX72J2B.js");o({event:"cli_login_started",properties:{origin:t}}),await i()}let m=300*1e3,s=await new Promise(o=>{let i,d=!1,a=c=>{d||(d=!0,clearTimeout(i),o(c),f.close())},f=x.createServer((c,n)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),_=l.searchParams.get("state"),y=l.searchParams.get("token"),$=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(_!==u){n.statusCode=404,n.end("not found");return}if(n.setHeader("content-type","text/html; charset=utf-8"),p){n.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){n.end(g("missing token. close this tab and retry `sootsim login`.")),a({ok:!1,error:"missing token"});return}n.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:$,userId:T})}catch(l){n.statusCode=500,n.end(g("sign-in callback failed. retry `sootsim login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});i=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `sootsim login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",u),n.searchParams.set("port",String(c.port)),n.searchParams.set("contrast",t),console.log(" opening browser for sootsim login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
26
+ </html>`}async function E(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"local dev-login unavailable"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function G(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function z(r){(r.includes("--help")||r.includes("-h"))&&(A(),process.exit(0));let e=[...r],t=await P(C(e,"--origin"));if(G(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await E(t);if(o.ok){k({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let i=await v(t),d=i?.user?.email||o.email||i?.user?.id||o.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-MZKLKJAS.js");a({event:"cli_login_succeeded",identity:{userId:o.userId??i?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-MZKLKJAS.js");o({event:"cli_login_started",properties:{origin:t}}),await i()}let m=300*1e3,s=await new Promise(o=>{let i,d=!1,a=c=>{d||(d=!0,clearTimeout(i),o(c),f.close())},f=x.createServer((c,n)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),_=l.searchParams.get("state"),y=l.searchParams.get("token"),$=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(_!==u){n.statusCode=404,n.end("not found");return}if(n.setHeader("content-type","text/html; charset=utf-8"),p){n.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){n.end(g("missing token. close this tab and retry `sootsim login`.")),a({ok:!1,error:"missing token"});return}n.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:$,userId:T})}catch(l){n.statusCode=500,n.end(g("sign-in callback failed. retry `sootsim login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});i=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `sootsim login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",u),n.searchParams.set("port",String(c.port)),n.searchParams.set("contrast",t),console.log(" opening browser for sootsim login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
27
27
  ${n.toString()}
28
- `),U(n.toString())})});if(!s.ok){let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-TNX72J2B.js");o({event:"cli_login_failed",properties:{origin:t,error:s.error}}),await i(),console.error(` login failed: ${s.error}`),process.exit(1)}k({token:s.token,user:s.userId?{id:s.userId,email:s.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||s.email||h?.user?.id||s.userId,{trackCliEvent:O,flushCliTelemetry:S}=await import("./telemetry-TNX72J2B.js");O({event:"cli_login_succeeded",identity:{userId:s.userId??h?.user?.id??null},properties:{origin:t}}),await S(),console.log(` signed in${I?` as ${I}`:""}`)}export{z as runLogin};
28
+ `),U(n.toString())})});if(!s.ok){let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-MZKLKJAS.js");o({event:"cli_login_failed",properties:{origin:t,error:s.error}}),await i(),console.error(` login failed: ${s.error}`),process.exit(1)}k({token:s.token,user:s.userId?{id:s.userId,email:s.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||s.email||h?.user?.id||s.userId,{trackCliEvent:O,flushCliTelemetry:S}=await import("./telemetry-MZKLKJAS.js");O({event:"cli_login_succeeded",identity:{userId:s.userId??h?.user?.id??null},properties:{origin:t}}),await S(),console.log(` signed in${I?` as ${I}`:""}`)}export{z as runLogin};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.305 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.307 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as r,d as i}from"./chunk-3PREBGTH.js";import{a as t,c as o}from"./chunk-KVLXMWV5.js";import"./chunk-EBCXFB3K.js";import"./chunk-LOF3WUKB.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
4
+ import{c as r,d as i}from"./chunk-WE6WXVYB.js";import{a as t,c as o}from"./chunk-YPKDDYIE.js";import"./chunk-SLEKK2UU.js";import"./chunk-XVQ2YGCI.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};