sootsim 0.1.88 → 0.1.89

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 (144) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-ZI2Y3H3Y.js → agent-OMQOBVTN.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-YSBDQL6H.js → agent-wrapper-2KXBGMGM.js} +2 -2
  4. package/dist-cli/chunks/{assert-KKVJVH7K.js → assert-KVPE3WA7.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-NSSS6RYN.js +2 -0
  6. package/dist-cli/chunks/beta-6RNNGY7M.js +2 -0
  7. package/dist-cli/chunks/{chunk-FYK7GIM7.js → chunk-2V2FWDAF.js} +1 -1
  8. package/dist-cli/chunks/{chunk-7GIE3OPK.js → chunk-3EOBQIPI.js} +2 -2
  9. package/dist-cli/chunks/{chunk-2QNNBZLX.js → chunk-3WTHDJJG.js} +2 -2
  10. package/dist-cli/chunks/{chunk-MMNQO2HZ.js → chunk-4FHMNPCF.js} +2 -2
  11. package/dist-cli/chunks/{chunk-VLX4A5H7.js → chunk-4FOEYBND.js} +1 -1
  12. package/dist-cli/chunks/chunk-5ATB3BNQ.js +12 -0
  13. package/dist-cli/chunks/{chunk-YMAPZJC5.js → chunk-6GC4TL3O.js} +2 -2
  14. package/dist-cli/chunks/chunk-6GITV57W.js +1 -0
  15. package/dist-cli/chunks/{chunk-WV4XAMMB.js → chunk-7GNTDMT5.js} +1 -1
  16. package/dist-cli/chunks/{chunk-HFUOM2TC.js → chunk-CPVZ46IS.js} +1 -1
  17. package/dist-cli/chunks/{chunk-JWR47SLY.js → chunk-DRZRPFKM.js} +1 -1
  18. package/dist-cli/chunks/{chunk-QSZW3XPY.js → chunk-DUGUYL7H.js} +1 -1
  19. package/dist-cli/chunks/{chunk-XCFMLRSZ.js → chunk-ETWRACG5.js} +2 -2
  20. package/dist-cli/chunks/chunk-EXHZED5X.js +2 -0
  21. package/dist-cli/chunks/{chunk-UKQFKONV.js → chunk-EYHJPH7C.js} +2 -2
  22. package/dist-cli/chunks/{chunk-4QXF57UL.js → chunk-HBQGKYCA.js} +2 -2
  23. package/dist-cli/chunks/{chunk-JDKTIGQG.js → chunk-HG5VVLD6.js} +2 -2
  24. package/dist-cli/chunks/{chunk-IPRXAXSY.js → chunk-HM762PMQ.js} +2 -2
  25. package/dist-cli/chunks/{chunk-J6U3467L.js → chunk-I5WPAK2A.js} +1 -1
  26. package/dist-cli/chunks/{chunk-YII7ZDGB.js → chunk-IVRX3TEH.js} +2 -2
  27. package/dist-cli/chunks/{chunk-MR7YARGW.js → chunk-K5LC4CBM.js} +3 -3
  28. package/dist-cli/chunks/{chunk-LDBQP5NY.js → chunk-KPSFSCKG.js} +2 -2
  29. package/dist-cli/chunks/chunk-L54TZZAI.js +119 -0
  30. package/dist-cli/chunks/{chunk-DPOLCAFU.js → chunk-LJXW33TJ.js} +2 -2
  31. package/dist-cli/chunks/chunk-MHT2T5KD.js +1 -0
  32. package/dist-cli/chunks/{chunk-ICPLDWHO.js → chunk-NCUPGVD4.js} +2 -2
  33. package/dist-cli/chunks/{chunk-5GY5KZ33.js → chunk-OHEIXPMP.js} +2 -2
  34. package/dist-cli/chunks/{chunk-GZUD44W5.js → chunk-OWU7TBIS.js} +1 -1
  35. package/dist-cli/chunks/{chunk-UOADFPJR.js → chunk-PIRJFIZF.js} +1 -1
  36. package/dist-cli/chunks/{chunk-LYBRU6QS.js → chunk-Q57ZMHYI.js} +2 -2
  37. package/dist-cli/chunks/{chunk-ZJ7REGNA.js → chunk-QG3METGX.js} +1 -1
  38. package/dist-cli/chunks/chunk-QSLG7VVY.js +1 -0
  39. package/dist-cli/chunks/{chunk-W6XDYKEI.js → chunk-RX3LQRCU.js} +2 -2
  40. package/dist-cli/chunks/{chunk-RKII4C6H.js → chunk-SHJOEOUO.js} +2 -2
  41. package/dist-cli/chunks/{chunk-DA3PPE4Y.js → chunk-SITJ5S5B.js} +1 -1
  42. package/dist-cli/chunks/chunk-TRTHHT4P.js +2 -0
  43. package/dist-cli/chunks/{chunk-I63MGIRV.js → chunk-TVMYLEWA.js} +1 -1
  44. package/dist-cli/chunks/{chunk-5ITY4LBR.js → chunk-W5CC6JIX.js} +2 -2
  45. package/dist-cli/chunks/{chunk-CAJ6QHMM.js → chunk-WJVBMLUZ.js} +5 -4
  46. package/dist-cli/chunks/{chunk-QOTYEI7J.js → chunk-WSPJ3KNV.js} +1 -1
  47. package/dist-cli/chunks/{chunk-JJPIAFVR.js → chunk-YSORRTVM.js} +2 -2
  48. package/dist-cli/chunks/{chunk-NFOZL6H3.js → chunk-ZV62LZGY.js} +3 -3
  49. package/dist-cli/chunks/{chunk-PQJTZ2Q2.js → chunk-ZVNQENKL.js} +3 -3
  50. package/dist-cli/chunks/cli-version-YILQNPVD.js +2 -0
  51. package/dist-cli/chunks/{compat-MVJ4SLW6.js → compat-PLXA5SK3.js} +3 -3
  52. package/dist-cli/chunks/{config-YRXKPGDD.js → config-TAK6HN7F.js} +2 -2
  53. package/dist-cli/chunks/{control-5VL7ZZ7H.js → control-CL6MOJ6C.js} +2 -2
  54. package/dist-cli/chunks/cpu-profile-RZR7QUYN.js +2 -0
  55. package/dist-cli/chunks/{daemon-EAT4F6GF.js → daemon-M36WKR5U.js} +2 -2
  56. package/dist-cli/chunks/{debug-BZQK7KMK.js → debug-DVITFXQJ.js} +3 -3
  57. package/dist-cli/chunks/{detox-4WPDF7PV.js → detox-NV2TRX24.js} +2 -2
  58. package/dist-cli/chunks/{device-KNKIQ3IS.js → device-VW7O4447.js} +2 -2
  59. package/dist-cli/chunks/{diagnose-OCOEEXIA.js → diagnose-46BV5GDH.js} +2 -2
  60. package/dist-cli/chunks/drivers-K7GBED3K.js +2 -0
  61. package/dist-cli/chunks/{electron-F4OGNAMN.js → electron-OEHJRNA7.js} +3 -3
  62. package/dist-cli/chunks/flow-4OKAL4KU.js +2 -0
  63. package/dist-cli/chunks/help-P2ZPKY2O.js +2 -0
  64. package/dist-cli/chunks/{hints-PI7V27DL.js → hints-ERI46BDJ.js} +2 -2
  65. package/dist-cli/chunks/{home-paths-FQDBE3DP.js → home-paths-AYPEAQXA.js} +2 -2
  66. package/dist-cli/chunks/{inspect-7WG5VC3M.js → inspect-G72QMXPL.js} +64 -54
  67. package/dist-cli/chunks/install-WAKFTJUK.js +2 -0
  68. package/dist-cli/chunks/{install-desktop-DTHVNNX7.js → install-desktop-KAMMVODZ.js} +3 -3
  69. package/dist-cli/chunks/{keys-CWPKHEL2.js → keys-QY7KAAYQ.js} +2 -2
  70. package/dist-cli/chunks/{launch-EXF3NWKL.js → launch-ZNXRIQDN.js} +3 -3
  71. package/dist-cli/chunks/{login-RF5HX4YK.js → login-UHQ25HGD.js} +4 -4
  72. package/dist-cli/chunks/{logout-NSIQDJTY.js → logout-TFVBF3HC.js} +2 -2
  73. package/dist-cli/chunks/{maestro-U3AWFYNR.js → maestro-UFAPY6T6.js} +2 -2
  74. package/dist-cli/chunks/{preview-HBWH34VL.js → preview-TLVWJA45.js} +2 -2
  75. package/dist-cli/chunks/{profile-B5DQIC27.js → profile-JSHBEXKJ.js} +2 -2
  76. package/dist-cli/chunks/{react-XJM4CQDU.js → react-CFK5WWST.js} +2 -2
  77. package/dist-cli/chunks/{record-MWURHSDY.js → record-YWLFSTDG.js} +2 -2
  78. package/dist-cli/chunks/runtime-73OCON3C.js +2 -0
  79. package/dist-cli/chunks/{runtime-delivery-MFASKX5N.js → runtime-delivery-BFTTQ7QC.js} +2 -2
  80. package/dist-cli/chunks/{screenshot-G3B6PTD2.js → screenshot-PGVRESEV.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-F27AGWOL.js → screenshot-mode-LDJLLQ3D.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-HCDJ3V5T.js → screenshots-7PL4PYGS.js} +2 -2
  83. package/dist-cli/chunks/{server-ZI7V4MJW.js → server-6IGCTIJN.js} +2 -2
  84. package/dist-cli/chunks/setup-repo-PUBU6CFG.js +2 -0
  85. package/dist-cli/chunks/{skills-KT2MHBGR.js → skills-VHQGU7GE.js} +2 -2
  86. package/dist-cli/chunks/{start-AYOMCDKK.js → start-CAYFJPJF.js} +4 -4
  87. package/dist-cli/chunks/store-R53SRYMZ.js +2 -0
  88. package/dist-cli/chunks/telemetry-JTRSVBLT.js +2 -0
  89. package/dist-cli/chunks/{test-6KILPMZ4.js → test-GKUWJJKZ.js} +3 -3
  90. package/dist-cli/chunks/{three-mode-MATEVUJA.js → three-mode-2VQX6IIB.js} +2 -2
  91. package/dist-cli/chunks/{timeline-XTURFCUR.js → timeline-IBWWDCOC.js} +2 -2
  92. package/dist-cli/chunks/{upgrade-5OPHZEOL.js → upgrade-SFR57VWD.js} +2 -2
  93. package/dist-cli/chunks/upload-UWFOTY2Q.js +2 -0
  94. package/dist-cli/chunks/{web-UWZTDXS3.js → web-Y3TQSZKE.js} +2 -2
  95. package/dist-cli/chunks/{what-happened-E4QWSIJN.js → what-happened-OOWZOYJ5.js} +2 -2
  96. package/dist-cli/chunks/{whoami-PINWMH4V.js → whoami-YCS5L53Z.js} +2 -2
  97. package/dist-lib/agent-daemon-client.cjs +1 -1
  98. package/dist-lib/agent-events.cjs +1 -1
  99. package/dist-lib/agent-sessions.cjs +1 -1
  100. package/dist-lib/attached-projects.cjs +1 -1
  101. package/dist-lib/auth/shared-session.cjs +1 -1
  102. package/dist-lib/backend-origin.cjs +1 -1
  103. package/dist-lib/beta.cjs +1 -1
  104. package/dist-lib/beta.mjs +1 -1
  105. package/dist-lib/bridge-constants.cjs +1 -1
  106. package/dist-lib/cli-constants.cjs +1 -1
  107. package/dist-lib/config.cjs +1 -1
  108. package/dist-lib/detox/index.cjs +1 -1
  109. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  110. package/dist-lib/home-paths.cjs +1 -1
  111. package/dist-lib/host/bridge-host.cjs +1 -1
  112. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  113. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  114. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  115. package/dist-lib/host/websocket-proxy.cjs +1 -1
  116. package/dist-lib/index.cjs +1 -1
  117. package/dist-lib/metro.cjs +1 -1
  118. package/dist-lib/profiles.cjs +1 -1
  119. package/dist-lib/render-mode.cjs +1 -1
  120. package/dist-lib/scripts/demo-app-registry.cjs +1 -1
  121. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  122. package/dist-lib/skills.cjs +1 -1
  123. package/dist-lib/vite.cjs +1 -1
  124. package/package.json +1 -1
  125. package/dist-cli/chunks/auto-bootstrap-2DEJ2DPE.js +0 -2
  126. package/dist-cli/chunks/beta-FXDJPPHT.js +0 -2
  127. package/dist-cli/chunks/chunk-2XLZKDMI.js +0 -1
  128. package/dist-cli/chunks/chunk-4TRU5DGK.js +0 -1
  129. package/dist-cli/chunks/chunk-ACDG2MSQ.js +0 -2
  130. package/dist-cli/chunks/chunk-QCEJKIV5.js +0 -2
  131. package/dist-cli/chunks/chunk-QO3BBIOT.js +0 -12
  132. package/dist-cli/chunks/chunk-RC77QMAW.js +0 -1
  133. package/dist-cli/chunks/chunk-RICUSEFS.js +0 -119
  134. package/dist-cli/chunks/cli-version-3L7QYH7O.js +0 -2
  135. package/dist-cli/chunks/cpu-profile-TI4YCPG7.js +0 -2
  136. package/dist-cli/chunks/drivers-OP2GUBTA.js +0 -2
  137. package/dist-cli/chunks/flow-5E5RFKRC.js +0 -2
  138. package/dist-cli/chunks/help-PSZ4URF3.js +0 -2
  139. package/dist-cli/chunks/install-7LDS6J3P.js +0 -2
  140. package/dist-cli/chunks/runtime-N7O7ZZW3.js +0 -2
  141. package/dist-cli/chunks/setup-repo-NEBHRCOI.js +0 -2
  142. package/dist-cli/chunks/store-3HPKFGMD.js +0 -2
  143. package/dist-cli/chunks/telemetry-FAMOGMOZ.js +0 -2
  144. package/dist-cli/chunks/upload-ZKE2F7SV.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as u,b as f}from"./chunk-ZJ7REGNA.js";import{a as h,c as p}from"./chunk-7GIE3OPK.js";import{a as c,b as d,c as m}from"./chunk-UOADFPJR.js";function P(){let e=c();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function O(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=c();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await m(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:P,launch:O};function I(){let e=u();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function x(e){let r=u();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await f(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var w={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:I,launch:x};import{spawn as A}from"child_process";import{closeSync as M,mkdtempSync as _,openSync as E,readFileSync as C}from"fs";import{createRequire as L}from"module";import{tmpdir as g}from"os";import{join as y}from"path";var R=`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as u,b as f}from"./chunk-QG3METGX.js";import{a as h,c as p}from"./chunk-3EOBQIPI.js";import{a as c,b as d,c as m}from"./chunk-PIRJFIZF.js";function P(){let e=c();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function O(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=c();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await m(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:P,launch:O};function I(){let e=u();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function x(e){let r=u();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await f(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var w={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:I,launch:x};import{spawn as A}from"child_process";import{closeSync as M,mkdtempSync as _,openSync as E,readFileSync as C}from"fs";import{createRequire as L}from"module";import{tmpdir as g}from"os";import{join as y}from"path";var R=`
3
3
  const modulePath = process.env.SOOTSIM_PW_MODULE;
4
4
  const url = process.env.SOOTSIM_PW_URL;
5
5
  const headless = process.env.SOOTSIM_PW_HEADLESS === '1';
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var t=!0,e="1.0.0",o="public beta",n=`${o} \xB7 free until ${e}`,r="free for everyone until 1.0 \u2014 we send anonymous error and dependency data while you use it";export{t as a,e as b,o as c,n as d,r as e};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ var t="http://localhost:5173/";export{t as a};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{l as d}from"./chunk-VLX4A5H7.js";import{chmodSync as f,existsSync as g,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as p}from"node:path";var s=1,m="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function w(){let t=process.env[m];return t?.trim()?c(p(t)):d()}function a(){let t=process.env[m];return t?.trim()?p(t):D(w(),"desktop-auth.json")}function S(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,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:S(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!g(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?S(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{l as d}from"./chunk-4FOEYBND.js";import{chmodSync as f,existsSync as g,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as p}from"node:path";var s=1,m="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function w(){let t=process.env[m];return t?.trim()?c(p(t)):d()}function a(){let t=process.env[m];return t?.trim()?p(t):D(w(),"desktop-auth.json")}function S(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,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:S(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!g(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?S(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
3
3
  `);try{f(e,384)}catch{}return r}function l(){i(a(),{force:!0})}async function U(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,U as d};
@@ -1,6 +1,7 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{C as A,j as _,k as h,l as v,m as S}from"./chunk-QOTYEI7J.js";import{d as y,h as B,i as E}from"./chunk-YII7ZDGB.js";var W={timeoutMs:1800,settleMs:48,startWindowMs:64};function p(e){return new Promise(t=>setTimeout(t,e))}function J(e){return e.includes("--json")}function Y(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
3
- `)}function $(e,t=Date.now()){let r=new Date(e),n=`${b(r.getHours())}:${b(r.getMinutes())}:${b(r.getSeconds())}`,s=t-e;if(s<0)return n;let o=Math.round(s/1e3);return o<60?`${n} +${o}s`:o<3600?`${n} +${Math.round(o/60)}m`:o<86400?`${n} +${Math.round(o/3600)}h`:`${n} +${Math.round(o/86400)}d`}function b(e){return e<10?`0${e}`:String(e)}async function D(e,t,...r){return B(e,`__sootsimTest.${t}`,...r)}async function q(e,t,...r){return E(e,`SootSim.bridges.mainShell.${t}`,...r)}async function U(e,t={}){try{let r=await D(e,"waitForScreenTransitions",W);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function z(e,t,r,...n){let s=Date.now()+Math.max(0,r);for(;;)try{return await q(e,t,...n)}catch(o){if(!A(o)||Date.now()>=s)throw o;await p(50)}}async function K(e,t,r,n={}){let s=n.attempts??30,o=n.intervalMs??500,l=n.minNodeCount??10;for(let a=0;a<s;a++){let u=y(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let c=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>l)return{bridge:u,count:c}}catch{}u.close(),await p(o)}return null}async function Q(e,t,r,n={}){let s=n.timeoutMs??8e3,o=n.intervalMs??250,l=Date.now()+s;for(;Date.now()<l;){let a=y(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await a.send({type:"evaluate",code:"1"}),a}catch{a.close()}await p(o)}return null}async function V(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,s=t.pollIntervalMs??200,o=Date.now(),l=o+r,a=-1,u=o,c=null,m=!1,d={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,flag:void 0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",errors:0};for(;Date.now()<l;){try{let i=await e.send({type:"evaluate",code:_}),f=Date.now()-o,g=Number(i?.nodes)||0,x=Number(i?.targets)||0,C=Number(i?.errors)||0,T=i?.flag===!0,w=i?.externalReady,P=typeof i?.loadingText=="string"?i.loadingText.trim():"",N=typeof i?.externalStatus=="string"?i.externalStatus.trim():"",R=typeof i?.externalError=="string"?i.externalError.trim():"",M=typeof i?.externalError=="string"&&R.length>0;if(c=w,m=M,g!==a&&(a=g,u=f),d={ready:!1,source:"timeout",elapsedMs:f,nodes:g,targets:x,flag:i?.flag,loadingText:P,externalReady:typeof w=="boolean"?w:null,externalStatus:N,externalError:R,errors:C},T&&w!==!1&&!M&&g>=h&&S({nodes:g,targets:x})&&f-u>=v)return{...d,ready:!0,source:"flag"};if(f>=n&&C>0&&!T)return{...d,ready:!1,source:"error-bail"}}catch{}await p(s)}return c!==!1&&!m&&d.nodes>=h&&S(d)?{...d,ready:!0,source:"nodes-fallback"}:{...d,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}function k(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function I(e,t,...r){return e.send({type:"call",path:`__sootsimTest.${t}`,args:r})}async function O(e,t={}){let r=await e.send({type:"evaluate",code:"window.__sootsimConsole?.count?.() || { errors: 0, warnings: 0, total: 0 }"});if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.errors)||0),s=Math.max(0,Number(r.warnings)||0);if(n===0&&s===0)return;let o=[];if(n>0&&o.push(`${n} console error${n===1?"":"s"}`),s>0&&o.push(`${s} console warning${s===1?"":"s"}`),console.log(`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{C as A,j as _,k as h,l as v,m as S}from"./chunk-WSPJ3KNV.js";import{d as y,h as B,i as E}from"./chunk-IVRX3TEH.js";var W={timeoutMs:1800,settleMs:48,startWindowMs:64};function p(e){return new Promise(t=>setTimeout(t,e))}function J(e){return e.includes("--json")}function Y(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
3
+ `)}function U(e){process.stderr.write(`${e}
4
+ `)}function $(e,t=Date.now()){let r=new Date(e),n=`${b(r.getHours())}:${b(r.getMinutes())}:${b(r.getSeconds())}`,s=t-e;if(s<0)return n;let o=Math.round(s/1e3);return o<60?`${n} +${o}s`:o<3600?`${n} +${Math.round(o/60)}m`:o<86400?`${n} +${Math.round(o/3600)}h`:`${n} +${Math.round(o/86400)}d`}function b(e){return e<10?`0${e}`:String(e)}async function D(e,t,...r){return B(e,`__sootsimTest.${t}`,...r)}async function q(e,t,...r){return E(e,`SootSim.bridges.mainShell.${t}`,...r)}async function z(e,t={}){try{let r=await D(e,"waitForScreenTransitions",W);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function K(e,t,r,...n){let s=Date.now()+Math.max(0,r);for(;;)try{return await q(e,t,...n)}catch(o){if(!A(o)||Date.now()>=s)throw o;await p(50)}}async function Q(e,t,r,n={}){let s=n.attempts??30,o=n.intervalMs??500,l=n.minNodeCount??10;for(let a=0;a<s;a++){let u=y(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let c=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>l)return{bridge:u,count:c}}catch{}u.close(),await p(o)}return null}async function V(e,t,r,n={}){let s=n.timeoutMs??8e3,o=n.intervalMs??250,l=Date.now()+s;for(;Date.now()<l;){let a=y(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await a.send({type:"evaluate",code:"1"}),a}catch{a.close()}await p(o)}return null}async function X(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,s=t.pollIntervalMs??200,o=Date.now(),l=o+r,a=-1,u=o,c=null,m=!1,d={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,flag:void 0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",errors:0};for(;Date.now()<l;){try{let i=await e.send({type:"evaluate",code:_}),f=Date.now()-o,g=Number(i?.nodes)||0,x=Number(i?.targets)||0,C=Number(i?.errors)||0,T=i?.flag===!0,w=i?.externalReady,P=typeof i?.loadingText=="string"?i.loadingText.trim():"",N=typeof i?.externalStatus=="string"?i.externalStatus.trim():"",R=typeof i?.externalError=="string"?i.externalError.trim():"",M=typeof i?.externalError=="string"&&R.length>0;if(c=w,m=M,g!==a&&(a=g,u=f),d={ready:!1,source:"timeout",elapsedMs:f,nodes:g,targets:x,flag:i?.flag,loadingText:P,externalReady:typeof w=="boolean"?w:null,externalStatus:N,externalError:R,errors:C},T&&w!==!1&&!M&&g>=h&&S({nodes:g,targets:x})&&f-u>=v)return{...d,ready:!0,source:"flag"};if(f>=n&&C>0&&!T)return{...d,ready:!1,source:"error-bail"}}catch{}await p(s)}return c!==!1&&!m&&d.nodes>=h&&S(d)?{...d,ready:!0,source:"nodes-fallback"}:{...d,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}function k(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function I(e,t,...r){return e.send({type:"call",path:`__sootsimTest.${t}`,args:r})}async function O(e,t={}){let r=await e.send({type:"evaluate",code:"window.__sootsimConsole?.count?.() || { errors: 0, warnings: 0, total: 0 }"});if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.errors)||0),s=Math.max(0,Number(r.warnings)||0);if(n===0&&s===0)return;let o=[];if(n>0&&o.push(`${n} console error${n===1?"":"s"}`),s>0&&o.push(`${s} console warning${s===1?"":"s"}`),console.log(`
4
5
  console: ${o.join(", ")}`),t.errorsCommand&&console.log(` inspect: ${t.errorsCommand}`),s>0&&t.warningsCommand&&console.log(` inspect: ${t.warningsCommand}`),!t.includeTail||n===0)return;let l=await e.send({type:"evaluate",code:"window.__sootsimConsole?.getErrors?.(5) || []"});if(!(!Array.isArray(l)||l.length===0)){console.log(`
5
6
  recent console errors:
6
7
  `);for(let a of l){let u=$(a.timestamp),c=Array.isArray(a.args)?a.args.map(m=>typeof m=="object"?JSON.stringify(m):String(m)).join(" "):String(a);console.log(` [${u}] ${c}`)}}}async function F(e,t={}){let r=await I(e,"getRequestCounts");if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.failed)||0);if(n===0||(console.log(`
@@ -32,4 +33,4 @@ import{C as A,j as _,k as h,l as v,m as S}from"./chunk-QOTYEI7J.js";import{d as
32
33
  : null,
33
34
  }
34
35
  })()`});if(!t||typeof t!="object")return;console.log(`
35
- state:`),t.simId&&console.log(` sim: ${t.simId}`),t.url&&console.log(` url: ${t.url}`),t.mode&&console.log(` mode: ${t.mode}`);let r=Number(t.nodeCount)||0;console.log(` nodes: ${r}${r>10?" (ready)":" (not ready)"}`);let n=t.shell;if(n&&typeof n=="object"){let s=[n.state?`state=${n.state}`:null,n.activeApp?`app=${n.activeApp}`:null,n.showSwitcher?"switcher=open":null,n.switcherPhase?`phase=${n.switcherPhase}`:null].filter(Boolean);s.length>0&&console.log(` shell: ${s.join(" ")}`)}}async function ee(e,t={}){try{await j(e)}catch{}try{await O(e,{includeTail:!0,errorsCommand:t.errorsCommand,warningsCommand:t.warningsCommand})}catch{}try{await F(e,{includeTail:!0,requestsCommand:t.requestsCommand})}catch{}}export{p as a,J as b,Y as c,$ as d,D as e,U as f,z as g,K as h,Q as i,V as j,j as k,ee as l};
36
+ state:`),t.simId&&console.log(` sim: ${t.simId}`),t.url&&console.log(` url: ${t.url}`),t.mode&&console.log(` mode: ${t.mode}`);let r=Number(t.nodeCount)||0;console.log(` nodes: ${r}${r>10?" (ready)":" (not ready)"}`);let n=t.shell;if(n&&typeof n=="object"){let s=[n.state?`state=${n.state}`:null,n.activeApp?`app=${n.activeApp}`:null,n.showSwitcher?"switcher=open":null,n.switcherPhase?`phase=${n.switcherPhase}`:null].filter(Boolean);s.length>0&&console.log(` shell: ${s.join(" ")}`)}}async function te(e,t={}){try{await j(e)}catch{}try{await O(e,{includeTail:!0,errorsCommand:t.errorsCommand,warningsCommand:t.warningsCommand})}catch{}try{await F(e,{includeTail:!0,requestsCommand:t.requestsCommand})}catch{}}export{p as a,J as b,Y as c,U as d,$ as e,D as f,z as g,K as h,Q as i,V as j,X as k,j as l,te as m};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  function k(e,t){let n=["--max-ms","--maxMs","--maxms","--max_ms"];for(let r of n){let s=e.indexOf(r);if(s>=0&&e[s+1]){let a=Number(e[s+1]);if(Number.isFinite(a))return Math.max(100,a)}}return t}async function E(e){let t=await e.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof t=="number"?t:0}}async function P(e,t=5){let n=await e.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${t}))()`});return{depth:t,tree:n}}async function A(e){let t=await e.send({type:"evaluate",code:"window.location.href"});return{url:typeof t=="string"?t:""}}async function L(e,t){let n=`(async () => {
3
3
  const t = window.__sootsimTest
4
4
  const mainShell = window.SootSim?.bridges?.mainShell
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as t}from"./chunk-XCFMLRSZ.js";import{a as p,b as m,c as a}from"./chunk-RICUSEFS.js";import{a as r}from"./chunk-ACDG2MSQ.js";import{a as l}from"./chunk-J6U3467L.js";import{a as u,d}from"./chunk-DA3PPE4Y.js";import{z as i}from"./chunk-VLX4A5H7.js";function c(){let o=i();return`sootsim CLI v${l()} \xB7 runtime ${o?`v${o}`:"not installed"}`}function S(){let o=m({bridgePort:7668,defaultShellUrl:r},t()),e=`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as t}from"./chunk-ETWRACG5.js";import{a as p,b as m,c as a}from"./chunk-L54TZZAI.js";import{a as r}from"./chunk-TRTHHT4P.js";import{a as l}from"./chunk-I5WPAK2A.js";import{a as u,d}from"./chunk-SITJ5S5B.js";import{z as i}from"./chunk-4FOEYBND.js";function c(){let o=i();return`sootsim CLI v${l()} \xB7 runtime ${o?`v${o}`:"not installed"}`}function S(){let o=m({bridgePort:7668,defaultShellUrl:r},t()),e=`
3
3
  ${d}
4
4
  `;console.log(`${c()}
5
5
  ${e}${o}
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as Ie}from"./chunk-IPRXAXSY.js";import{a as Ae}from"./chunk-UKQFKONV.js";import{a as Pe}from"./chunk-YMAPZJC5.js";import{a as V,b as he,c as ge,d as Z,e as ee,f as ye,g as te,i as ie,j as be,k as Me}from"./chunk-W6XDYKEI.js";import{f as Te,m as Fe,o as $e,s as ke}from"./chunk-QO3BBIOT.js";import{d as ve,f as Se}from"./chunk-JDKTIGQG.js";import{l as we}from"./chunk-CAJ6QHMM.js";import{c as X,d as Q,e as pe}from"./chunk-YII7ZDGB.js";import{c as Y}from"./chunk-WV4XAMMB.js";import{a as xe}from"./chunk-ZJ7REGNA.js";import{a as me,b as G}from"./chunk-DPOLCAFU.js";import{f as fe}from"./chunk-FYK7GIM7.js";import*as A from"fs";import{tmpdir as De}from"os";import*as y from"path";import*as g from"fs";import*as w from"path";var L=1e4,B=393,C=852,Ee="__sootsimCliPerf",Ke="maestroCopiedText",_e=new Map;function f(o){return new Promise(e=>setTimeout(e,o))}function Je(o){return o?w.basename(o)===".maestro"?w.dirname(o):o:process.cwd()}function He(o,e,t){let i=e.endsWith(".png")?e:`${e}.png`;if(w.isAbsolute(i))return i;if(t.mode==="flow"&&/[\\/]/.test(i)){let r=i.startsWith("./")||i.startsWith("../")?t.flowDir??process.cwd():Je(t.flowDir);return w.resolve(r,i)}return w.join(o,i)}function qe(o){if(typeof o=="string")return{path:o,withFrame:!1};let e=o.path?.trim()||o.name?.trim();if(!e)throw new Error("takeScreenshot object form requires path or name");return{path:e,withFrame:o.withFrame===!0,layers:o.layers}}function re(o){let[e,t]=o.split(",").map(r=>r.trim()),i=(r,n)=>r.endsWith("%")?Number.parseFloat(r)/100*n:Number.parseFloat(r);return{x:i(e,B),y:i(t,C)}}function ze(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,i=ge(he.parse(t),_e);return Array.isArray(i)?i:[]}var W=class{constructor(e,t){this.bridge=e;this.opts=t}stepDelay=0;firstLaunchDone=!1;profilingEnabled=!1;recordingEnabled=!1;recordingAccessChecked=!1;recordingStartedAtMs=null;lastRecordingDurationMs=null;simRouteHint=null;lastFailedStep=null;get simId(){return this.opts.simId}setSimRouteHint(e){this.simRouteHint=this.normalizeSimRoute(e)}normalizeSimRoute(e){if(!e)return null;try{let t=new URL(e);t.searchParams.delete("inspectOpen");let i=t.searchParams.toString();return`${t.origin}${t.pathname}${i?`?${i}`:""}`}catch{return e}}async refreshSimId(){if(this.opts.simId)try{let e=await this.bridge.listSims(),t=e.find(a=>a.id===this.opts.simId);if(t&&(this.simRouteHint=this.normalizeSimRoute(t.url||t.origin)),e.find(a=>a.id===this.opts.simId&&a.readyState==="open")||!this.simRouteHint)return;let r=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!r)return;let n=e.find(a=>a.isPrimary&&a.readyState==="open"),s=e.find(a=>a.readyState==="open"),l=r??n??s;l&&(this.opts.simId=l.id,console.log(` [flow] sim rotated to ${l.id}`))}catch{}}async evaluate(e,t){return this.bridge.send({type:"evaluate",simId:this.opts.simId,code:e},t?{timeoutMs:t}:void 0)}async callTest(e,...t){return this.bridge.send({type:"call",simId:this.opts.simId,path:`__sootsimTest.${e}`,args:t})}async waitForTree(e=L){let t=Date.now()+e,i=Date.now(),r=null,n=0,s=0;for(;Date.now()<t;){try{let a=await this.evaluate(`(async () => {
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as Ie}from"./chunk-HM762PMQ.js";import{a as Ae}from"./chunk-EYHJPH7C.js";import{a as Pe}from"./chunk-6GC4TL3O.js";import{a as V,b as he,c as ge,d as Z,e as ee,f as ye,g as te,i as ie,j as be,k as Me}from"./chunk-RX3LQRCU.js";import{f as Te,m as Fe,o as $e,s as ke}from"./chunk-5ATB3BNQ.js";import{d as ve,f as Se}from"./chunk-HG5VVLD6.js";import{m as we}from"./chunk-WJVBMLUZ.js";import{c as X,d as Q,e as pe}from"./chunk-IVRX3TEH.js";import{c as Y}from"./chunk-7GNTDMT5.js";import{a as xe}from"./chunk-QG3METGX.js";import{a as me,b as G}from"./chunk-LJXW33TJ.js";import{f as fe}from"./chunk-2V2FWDAF.js";import*as A from"fs";import{tmpdir as De}from"os";import*as y from"path";import*as g from"fs";import*as w from"path";var L=1e4,B=393,C=852,Ee="__sootsimCliPerf",Ke="maestroCopiedText",_e=new Map;function f(o){return new Promise(e=>setTimeout(e,o))}function Je(o){return o?w.basename(o)===".maestro"?w.dirname(o):o:process.cwd()}function He(o,e,t){let i=e.endsWith(".png")?e:`${e}.png`;if(w.isAbsolute(i))return i;if(t.mode==="flow"&&/[\\/]/.test(i)){let r=i.startsWith("./")||i.startsWith("../")?t.flowDir??process.cwd():Je(t.flowDir);return w.resolve(r,i)}return w.join(o,i)}function qe(o){if(typeof o=="string")return{path:o,withFrame:!1};let e=o.path?.trim()||o.name?.trim();if(!e)throw new Error("takeScreenshot object form requires path or name");return{path:e,withFrame:o.withFrame===!0,layers:o.layers}}function re(o){let[e,t]=o.split(",").map(r=>r.trim()),i=(r,n)=>r.endsWith("%")?Number.parseFloat(r)/100*n:Number.parseFloat(r);return{x:i(e,B),y:i(t,C)}}function ze(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,i=ge(he.parse(t),_e);return Array.isArray(i)?i:[]}var W=class{constructor(e,t){this.bridge=e;this.opts=t}stepDelay=0;firstLaunchDone=!1;profilingEnabled=!1;recordingEnabled=!1;recordingAccessChecked=!1;recordingStartedAtMs=null;lastRecordingDurationMs=null;simRouteHint=null;lastFailedStep=null;get simId(){return this.opts.simId}setSimRouteHint(e){this.simRouteHint=this.normalizeSimRoute(e)}normalizeSimRoute(e){if(!e)return null;try{let t=new URL(e);t.searchParams.delete("inspectOpen");let i=t.searchParams.toString();return`${t.origin}${t.pathname}${i?`?${i}`:""}`}catch{return e}}async refreshSimId(){if(this.opts.simId)try{let e=await this.bridge.listSims(),t=e.find(a=>a.id===this.opts.simId);if(t&&(this.simRouteHint=this.normalizeSimRoute(t.url||t.origin)),e.find(a=>a.id===this.opts.simId&&a.readyState==="open")||!this.simRouteHint)return;let r=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!r)return;let n=e.find(a=>a.isPrimary&&a.readyState==="open"),s=e.find(a=>a.readyState==="open"),l=r??n??s;l&&(this.opts.simId=l.id,console.log(` [flow] sim rotated to ${l.id}`))}catch{}}async evaluate(e,t){return this.bridge.send({type:"evaluate",simId:this.opts.simId,code:e},t?{timeoutMs:t}:void 0)}async callTest(e,...t){return this.bridge.send({type:"call",simId:this.opts.simId,path:`__sootsimTest.${e}`,args:t})}async waitForTree(e=L){let t=Date.now()+e,i=Date.now(),r=null,n=0,s=0;for(;Date.now()<t;){try{let a=await this.evaluate(`(async () => {
3
3
  const test = window.__sootsimTest
4
4
  if (!test) return { count: 0, loading: true }
5
5
  const count = (await test.getNodeCount?.()) || 0
@@ -370,7 +370,7 @@ flow extension:
370
370
  + completed (${M.length} steps)`),d>0&&console.log(` screenshots: ${d} \u2192 ${s}`),I&&Ce(I),S&&console.log(` video: ${S}`),console.log()}catch(u){if(i&&!I)try{I=await c.stopProfile()}catch{}if(T&&!S)try{S=await c.stopRecording(),_=c.getLastRecordingDurationMs()}catch(d){console.warn(` recording stop failed: ${d?.message||String(d)}`)}console.error(`
371
371
  x failed: ${u.message}
372
372
  `),I&&(console.log(" partial profile:"),Ce(I)),S&&console.log(` partial video: ${S}`);try{let d=c.lastFailedStep,h=d?`step-${String(d.index+1).padStart(2,"0")}-${d.kind}`:"unstaged",R=y.join(s,h);await c.captureFailureBundle(R,{error:u,stepIndex:d?.index,stepKind:d?.kind,stepTarget:d?.target}),console.log(` failure bundle: ${R}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(d){try{let h=y.join(s,"error.png");await c.captureFailureScreenshot(h),console.log(` error screenshot: ${h}`)}catch{}console.log(` (failure bundle capture failed: ${d instanceof Error?d.message:String(d)})`)}await we($,{errorsCommand:`sootsim get errors 5${c.simId?` --sim ${c.simId}`:""}`,warningsCommand:`sootsim get warnings 5${c.simId?` --sim ${c.simId}`:""}`,requestsCommand:`sootsim get requests 5${c.simId?` --sim ${c.simId}`:""}`}),O=1}finally{$.close()}if(O===0&&v)try{let u=await Qe(z??[]),d=["--origin",U,"--events",u];oe&&d.push("--public-origin",oe),S&&d.push("--video",S),S&&_&&Number.isFinite(_)&&d.push("--video-duration-ms",String(Math.round(_))),c.simId&&d.push("--sim",c.simId),Re&&d.push("--open"),console.log(`
373
- preparing preview upload\u2026`);let{runUpload:h}=await import("./upload-ZKE2F7SV.js");await h(d,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),O=1}return J&&(c.simId&&H.add(c.simId),await Xe(b.wsPort,b.commandTimeoutMs,[...H])),await G(),O}async function Xe(o,e,t){let i=[...new Set(t.filter(Boolean))];if(i.length===0)return;let r=Q(o,{commandTimeoutMs:e});try{let n=await r.listSims(),s=i.filter(a=>n.some(m=>m.id===a&&m.readyState==="open"));if(s.length===0)return;let l=await ke(r,o,e,s);await Fe(n,s),l.closed.length>0&&console.log(` closed flow sim(s): ${l.closed.join(", ")}`),l.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${l.remaining.join(", ")}`)}catch(n){console.warn(` warn: failed to close flow sim(s): ${n instanceof Error?n.message:String(n)}`)}finally{r.close()}}async function Qe(o){let{gzipSync:e}=await import("zlib"),t=o.map(n=>JSON.stringify(n)).join(`
373
+ preparing preview upload\u2026`);let{runUpload:h}=await import("./upload-UWFOTY2Q.js");await h(d,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),O=1}return J&&(c.simId&&H.add(c.simId),await Xe(b.wsPort,b.commandTimeoutMs,[...H])),await G(),O}async function Xe(o,e,t){let i=[...new Set(t.filter(Boolean))];if(i.length===0)return;let r=Q(o,{commandTimeoutMs:e});try{let n=await r.listSims(),s=i.filter(a=>n.some(m=>m.id===a&&m.readyState==="open"));if(s.length===0)return;let l=await ke(r,o,e,s);await Fe(n,s),l.closed.length>0&&console.log(` closed flow sim(s): ${l.closed.join(", ")}`),l.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${l.remaining.join(", ")}`)}catch(n){console.warn(` warn: failed to close flow sim(s): ${n instanceof Error?n.message:String(n)}`)}finally{r.close()}}async function Qe(o){let{gzipSync:e}=await import("zlib"),t=o.map(n=>JSON.stringify(n)).join(`
374
374
  `)+(o.length?`
375
375
  `:""),i=e(Buffer.from(t,"utf8")),r=y.join(De(),`sootsim-events-${Date.now()}.jsonl.gz`);return A.writeFileSync(r,i),console.log(` events: ${o.length} written to ${r} (${i.length} bytes gz)`),r}async function Ze(o){let e=o[0],t=i=>o.find((r,n)=>o[n-1]===i);switch(e){case"start":{let{path:i,state:r}=ye();console.log(" flow draft started"),console.log(` session: ${i}`),console.log(` steps: ${r.steps.length}`);return}case"keep":case"good":{let i=ie();if(i.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!i.kept){console.log(" no pending action to keep");return}console.log(` kept: ${i.candidate.summary}`),console.log(` steps: ${i.stepCount}`);return}case"end":{let i=t("--output")||(o[1]&&!o[1].startsWith("-")?o[1]:void 0),r=o.includes("--validate")||o.includes("--video"),n=o.includes("--video"),s=ie();s.active&&s.kept&&console.log(` auto-kept trailing action: ${s.candidate.summary}`);let l=be(i||(r?tt():void 0));if(l.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!l.valid){console.error(" flow draft is not valid:");for(let a of l.issues)console.error(` - ${a}`);console.error(" draft preserved \u2014 keep at least one real interaction or run `sootsim flow start` to reset"),process.exit(1)}if(r){let a=it(o,l.outputPath),m=await Oe(a);if(m!==0){console.error(`
376
376
  validation failed \u2014 draft preserved so you can keep iterating`),process.exitCode=m;return}te(),console.log(` flow draft validated (${l.stepCount} step${l.stepCount===1?"":"s"})`),l.outputPath&&console.log(` saved: ${l.outputPath}`),n&&console.log(" video: recorded during validation run");return}if(te(),console.log(` flow draft ended (${l.stepCount} step${l.stepCount===1?"":"s"})`),l.outputPath){console.log(` saved: ${l.outputPath}`),console.log(` next: sootsim flow ${l.outputPath} --record`);return}console.log(""),process.stdout.write(l.yaml);return}case"validate":{let i=o[1];(!i||i.startsWith("-"))&&(console.error(" usage: sootsim flow validate <path>"),process.exit(1));let r=ee(i);if(r.length>0){console.error(` x ${i} failed validation:`);for(let n of r)console.error(` - ${n}`);process.exit(1)}console.log(` + ${i} looks valid`);return}}}function et(o){return o[0]==="--sim"&&o.length>=2?[...o.slice(2),"--sim",o[1]]:o}async function Ft(o){let e=et(o),t=e[0];if(t==="start"||t==="keep"||t==="good"||t==="end"||t==="validate")return await Ze(e),0;let i=await Oe(e);return i!==0&&(process.exitCode=i),i}function Ce(o){let e=o.avgMs>0?(1e3/o.avgMs).toFixed(1):"?",t=o.sampleCount>0?(o.jankFrames/o.sampleCount*100).toFixed(1):"0";console.log(`
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as l}from"./chunk-YII7ZDGB.js";import{E as c,F as m,g as p,i as h,z as w}from"./chunk-VLX4A5H7.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-N7O7ZZW3.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await u(t,250)||await u(t,1500))return;let n=c();if(n&&m(n)){if(n.bootstrapping===!0&&(await b(e),await u(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as l}from"./chunk-IVRX3TEH.js";import{E as c,F as m,g as p,i as h,z as w}from"./chunk-4FOEYBND.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-73OCON3C.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await u(t,250)||await u(t,1500))return;let n=c();if(n&&m(n)){if(n.bootstrapping===!0&&(await b(e),await u(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
3
3
  dev checkouts skip the auto-install of the persistent launchd / systemd
4
4
  agent. start the daemon manually in another shell with:
5
5
  bun sootsim server
6
- (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-EAT4F6GF.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
6
+ (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-M36WKR5U.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
7
7
  if this keeps failing, run \`sootsim daemon uninstall\` and retry, or run \`sootsim server\` in a persistent shell as a workaround.`)}console.log(" waiting for runtime to come online...");let i=process.platform==="darwin"?B():null;try{await b(e);let r=Date.now()+5e3;for(;Date.now()<r;){if(await u(t,500))return;await new Promise(s=>setTimeout(s,200))}throw new Error(`daemon registered but the bridge never bound on port ${t} \u2014 see ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}finally{i?.stop()}}async function C(t=l()){await L(),await $(t)}function x(t){for(let e=0;e<t.length;e++){let n=t[e];if((n==="--port"||n==="-p")&&t[e+1]){let o=Number(t[e+1]);return Number.isFinite(o)?o:void 0}if(n.startsWith("--port=")){let o=Number(n.slice(7));return Number.isFinite(o)?o:void 0}}}function u(t,e){return new Promise(n=>{let o=new D(`ws://127.0.0.1:${t}`,{handshakeTimeout:e}),i=!1,r=s=>{if(!i){i=!0;try{o.close()}catch{}n(s)}};o.once("open",()=>r(!0)),o.once("error",()=>r(!1)),setTimeout(()=>r(!1),e)})}async function b(t){let e=Date.now()+t,n;for(;Date.now()<e;){let o=c();if(o&&m(o)){if(o.bootstrapping!==!0)return;o.bootstrapping!==n&&(n=o.bootstrapping)}await new Promise(i=>setTimeout(i,250))}throw new Error(`daemon did not finish bootstrapping within ${Math.round(t/1e3)}s \u2014 check ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}function d(){return T(k(),"Library/Logs/sootsim/server.err.log")}function B(){let t=d(),e=0;try{f(t)&&(e=g(t).size)}catch{}let n=!1,o=()=>{if(!n){try{if(f(t)){let i=g(t).size;if(i>e){let r=Buffer.alloc(i-e),s=P(t,"r");try{S(s,r,0,r.length,e)}finally{v(s)}e=i;for(let y of r.toString("utf8").split(/\r?\n/)){let a=y.trim();a&&(a.startsWith("sootsim:")||a.startsWith("sootsim "))&&console.log(` ${a}`)}}else i<e&&(e=i)}}catch{}setTimeout(o,250)}};return o(),{stop:()=>{n=!0}}}export{L as a,I as b,$ as c,C as d};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-I5WPAK2A.js";import"./chunk-TVMYLEWA.js";export{a as getCliVersion};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-I63MGIRV.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-TVMYLEWA.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim compat \u2014 check package compatibility
4
4
 
5
5
  usage:
@@ -20,7 +20,7 @@ examples:
20
20
  sootsim compat react-native-reanimated
21
21
  sootsim compat --json
22
22
  sootsim compat --brief
23
- `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-UWZTDXS3.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-UWZTDXS3.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
23
+ `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-Y3TQSZKE.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-Y3TQSZKE.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
24
24
  sootsim compatibility report
25
25
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
26
26
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-I63MGIRV.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-TVMYLEWA.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim config \u2014 manage sootsim configuration
4
4
 
5
5
  usage:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r}from"./chunk-QO3BBIOT.js";import"./chunk-JDKTIGQG.js";import"./chunk-CAJ6QHMM.js";import"./chunk-QOTYEI7J.js";import"./chunk-YII7ZDGB.js";import"./chunk-WV4XAMMB.js";import"./chunk-RKII4C6H.js";import"./chunk-ZJ7REGNA.js";import"./chunk-4TRU5DGK.js";import"./chunk-7GIE3OPK.js";import"./chunk-UOADFPJR.js";import"./chunk-ACDG2MSQ.js";import"./chunk-QCEJKIV5.js";import"./chunk-VLX4A5H7.js";import"./chunk-I63MGIRV.js";export{d as buildOpenUrl,c as buildShellUrl,p as closeSimsBulk,q as planBulkCloseTargets,h as playwrightHostPidForSim,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,o as runClaimCommand,r as runCloseCommand,n as runFocusCommand,k as runListCommand,l as runOpenCommand,m as runUseCommand,i as signalDriverLaunchConnected,e as summarizeSimUrl,j as terminatePlaywrightHostsForSims,g as waitForSimMatch};
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r}from"./chunk-5ATB3BNQ.js";import"./chunk-HG5VVLD6.js";import"./chunk-WJVBMLUZ.js";import"./chunk-WSPJ3KNV.js";import"./chunk-IVRX3TEH.js";import"./chunk-7GNTDMT5.js";import"./chunk-SHJOEOUO.js";import"./chunk-QG3METGX.js";import"./chunk-QSLG7VVY.js";import"./chunk-3EOBQIPI.js";import"./chunk-PIRJFIZF.js";import"./chunk-TRTHHT4P.js";import"./chunk-EXHZED5X.js";import"./chunk-4FOEYBND.js";import"./chunk-TVMYLEWA.js";export{d as buildOpenUrl,c as buildShellUrl,p as closeSimsBulk,q as planBulkCloseTargets,h as playwrightHostPidForSim,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,o as runClaimCommand,r as runCloseCommand,n as runFocusCommand,k as runListCommand,l as runOpenCommand,m as runUseCommand,i as signalDriverLaunchConnected,e as summarizeSimUrl,j as terminatePlaywrightHostsForSims,g as waitForSimMatch};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-TVMYLEWA.js";import{mkdirSync as P,writeFileSync as $}from"fs";import{dirname as S,resolve as O}from"path";import T from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new T(i,{maxPayload:1<<28}),this.ready=new Promise((o,r)=>{this.ws.once("open",()=>o()),this.ws.once("error",r)}),this.ws.on("message",o=>{let r=JSON.parse(o.toString());if(r.id&&this.pending.has(r.id)){let{res:t,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):t(r.result)}else if(r.method)for(let t of this.listeners)t(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,o={},r){let t=this.nextId++;return new Promise((s,p)=>{this.pending.set(t,{res:s,rej:p}),this.ws.send(JSON.stringify({id:t,method:i,params:o,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function F(e,i){let o=Number(d(e,"--duration")??"5");if(!Number.isFinite(o)||o<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),t=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${t}/json/list`)).json()}catch{return k(t),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${t}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${o}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(o*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),P(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if($(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of C(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function k(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so run sootsim in Chrome with remote debugging, then retry:"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function C(e,i){let o=e.samples.length||1,r=new Map;for(let t of e.nodes){let s=t.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=t.hitCount??0,r.set(p,u)}return[...r.values()].map(t=>({...t,pct:t.self/o*100})).sort((t,s)=>s.self-t.self).slice(0,i)}function d(e,i){let o=e.indexOf(i);if(!(o<0||o===e.length-1))return e[o+1]}export{F as runCpuProfile};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as T,b as N}from"./chunk-DPOLCAFU.js";import"./chunk-5ITY4LBR.js";import{c as O}from"./chunk-JJPIAFVR.js";import"./chunk-XCFMLRSZ.js";import"./chunk-RICUSEFS.js";import"./chunk-ACDG2MSQ.js";import"./chunk-QCEJKIV5.js";import"./chunk-J6U3467L.js";import"./chunk-DA3PPE4Y.js";import"./chunk-FYK7GIM7.js";import{g as I,o as C,p as w,q as B}from"./chunk-VLX4A5H7.js";import{a as W}from"./chunk-I63MGIRV.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as E,rmSync as X,writeFileSync as L}from"fs";import{dirname as D}from"path";var Q="dev.sootsim.daemon",_="SootSim Daemon",R="0.1.36";function F(t,e,r){let o=w(),n=B(),a=D(D(n)),y=D(n),u=`${a}/Resources`;X(o,{recursive:!0,force:!0}),E(C(),{recursive:!0}),E(y,{recursive:!0}),E(u,{recursive:!0}),L(`${a}/Info.plist`,z()),L(`${a}/PkgInfo`,"APPL????"),L(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${d}
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as T,b as N}from"./chunk-LJXW33TJ.js";import"./chunk-W5CC6JIX.js";import{c as O}from"./chunk-YSORRTVM.js";import"./chunk-ETWRACG5.js";import"./chunk-L54TZZAI.js";import"./chunk-TRTHHT4P.js";import"./chunk-EXHZED5X.js";import"./chunk-I5WPAK2A.js";import"./chunk-SITJ5S5B.js";import"./chunk-2V2FWDAF.js";import{g as I,o as C,p as w,q as B}from"./chunk-4FOEYBND.js";import{a as W}from"./chunk-TVMYLEWA.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as E,rmSync as X,writeFileSync as L}from"fs";import{dirname as D}from"path";var Q="dev.sootsim.daemon",_="SootSim Daemon",R="0.1.36";function F(t,e,r){let o=w(),n=B(),a=D(D(n)),y=D(n),u=`${a}/Resources`;X(o,{recursive:!0,force:!0}),E(C(),{recursive:!0}),E(y,{recursive:!0}),E(u,{recursive:!0}),L(`${a}/Info.plist`,z()),L(`${a}/PkgInfo`,"APPL????"),L(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${d}
3
3
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:n}}function z(){return`<?xml version="1.0" encoding="UTF-8"?>
4
4
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5
5
  <plist version="1.0">
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{e as f,l as T}from"./chunk-CAJ6QHMM.js";import{F as A,G as D,H as O,I as x,J as v}from"./chunk-QOTYEI7J.js";import{c as S,e as $,g as N}from"./chunk-YII7ZDGB.js";import"./chunk-WV4XAMMB.js";import"./chunk-QCEJKIV5.js";import"./chunk-VLX4A5H7.js";import"./chunk-I63MGIRV.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{f,m as T}from"./chunk-WJVBMLUZ.js";import{F as A,G as D,H as O,I as x,J as v}from"./chunk-WSPJ3KNV.js";import{c as S,e as $,g as N}from"./chunk-IVRX3TEH.js";import"./chunk-7GNTDMT5.js";import"./chunk-EXHZED5X.js";import"./chunk-4FOEYBND.js";import"./chunk-TVMYLEWA.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
3
3
  sootsim debug \u2014 drive __sootsimDebug from the terminal
4
4
 
5
5
  usage:
@@ -167,7 +167,7 @@ examples:
167
167
  } : null,
168
168
  samples,
169
169
  }
170
- })()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(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","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-7WG5VC3M.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
170
+ })()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(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","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-G72QMXPL.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
171
171
  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 A(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 D(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=`(() => {
172
172
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
173
173
  if (!d) return null;
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-NFOZL6H3.js";import"./chunk-IPRXAXSY.js";import"./chunk-2XLZKDMI.js";import"./chunk-UKQFKONV.js";import"./chunk-YMAPZJC5.js";import"./chunk-5GY5KZ33.js";import"./chunk-W6XDYKEI.js";import"./chunk-QO3BBIOT.js";import"./chunk-JDKTIGQG.js";import"./chunk-CAJ6QHMM.js";import"./chunk-QOTYEI7J.js";import"./chunk-YII7ZDGB.js";import"./chunk-WV4XAMMB.js";import"./chunk-RKII4C6H.js";import"./chunk-ZJ7REGNA.js";import"./chunk-4TRU5DGK.js";import"./chunk-7GIE3OPK.js";import"./chunk-UOADFPJR.js";import"./chunk-DPOLCAFU.js";import"./chunk-5ITY4LBR.js";import"./chunk-XCFMLRSZ.js";import"./chunk-ACDG2MSQ.js";import"./chunk-QCEJKIV5.js";import"./chunk-MMNQO2HZ.js";import"./chunk-FYK7GIM7.js";import"./chunk-VLX4A5H7.js";import"./chunk-I63MGIRV.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-ZV62LZGY.js";import"./chunk-HM762PMQ.js";import"./chunk-6GITV57W.js";import"./chunk-EYHJPH7C.js";import"./chunk-6GC4TL3O.js";import"./chunk-OHEIXPMP.js";import"./chunk-RX3LQRCU.js";import"./chunk-5ATB3BNQ.js";import"./chunk-HG5VVLD6.js";import"./chunk-WJVBMLUZ.js";import"./chunk-WSPJ3KNV.js";import"./chunk-IVRX3TEH.js";import"./chunk-7GNTDMT5.js";import"./chunk-SHJOEOUO.js";import"./chunk-QG3METGX.js";import"./chunk-QSLG7VVY.js";import"./chunk-3EOBQIPI.js";import"./chunk-PIRJFIZF.js";import"./chunk-LJXW33TJ.js";import"./chunk-W5CC6JIX.js";import"./chunk-ETWRACG5.js";import"./chunk-TRTHHT4P.js";import"./chunk-EXHZED5X.js";import"./chunk-4FHMNPCF.js";import"./chunk-2V2FWDAF.js";import"./chunk-4FOEYBND.js";import"./chunk-TVMYLEWA.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
3
3
  sootsim detox \u2014 run detox-style tests against a sootsim shell
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-2XLZKDMI.js";import{c as d,e as l,h as a}from"./chunk-YII7ZDGB.js";import"./chunk-WV4XAMMB.js";import"./chunk-XCFMLRSZ.js";import"./chunk-QCEJKIV5.js";import"./chunk-MMNQO2HZ.js";import{f as c,g as r,h as g}from"./chunk-FYK7GIM7.js";import"./chunk-VLX4A5H7.js";import"./chunk-I63MGIRV.js";function h(){console.log(`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-6GITV57W.js";import{c as d,e as l,h as a}from"./chunk-IVRX3TEH.js";import"./chunk-7GNTDMT5.js";import"./chunk-ETWRACG5.js";import"./chunk-EXHZED5X.js";import"./chunk-4FHMNPCF.js";import{f as c,g as r,h as g}from"./chunk-2V2FWDAF.js";import"./chunk-4FOEYBND.js";import"./chunk-TVMYLEWA.js";function h(){console.log(`
3
3
  sootsim device \u2014 inspect or change the live device preset for a sim
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as E,e as R,h as b}from"./chunk-YII7ZDGB.js";import{b as v}from"./chunk-WV4XAMMB.js";import"./chunk-QCEJKIV5.js";import"./chunk-VLX4A5H7.js";import"./chunk-I63MGIRV.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(`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as E,e as R,h as b}from"./chunk-IVRX3TEH.js";import{b as v}from"./chunk-7GNTDMT5.js";import"./chunk-EXHZED5X.js";import"./chunk-4FOEYBND.js";import"./chunk-TVMYLEWA.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(`
3
3
  sootsim diagnose \u2014 compact "what just went wrong?" report
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-MHT2T5KD.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-SHJOEOUO.js";import"./chunk-QG3METGX.js";import"./chunk-QSLG7VVY.js";import"./chunk-3EOBQIPI.js";import"./chunk-PIRJFIZF.js";import"./chunk-4FOEYBND.js";import"./chunk-TVMYLEWA.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-GZUD44W5.js";import"./chunk-RC77QMAW.js";import{a as v,f as h}from"./chunk-QO3BBIOT.js";import"./chunk-JDKTIGQG.js";import"./chunk-CAJ6QHMM.js";import"./chunk-QOTYEI7J.js";import"./chunk-YII7ZDGB.js";import"./chunk-WV4XAMMB.js";import{b as f,g as u}from"./chunk-RKII4C6H.js";import{a as p}from"./chunk-ZJ7REGNA.js";import"./chunk-4TRU5DGK.js";import{c as m}from"./chunk-7GIE3OPK.js";import"./chunk-UOADFPJR.js";import"./chunk-ACDG2MSQ.js";import"./chunk-QCEJKIV5.js";import"./chunk-VLX4A5H7.js";import"./chunk-I63MGIRV.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-OWU7TBIS.js";import"./chunk-MHT2T5KD.js";import{a as v,f as h}from"./chunk-5ATB3BNQ.js";import"./chunk-HG5VVLD6.js";import"./chunk-WJVBMLUZ.js";import"./chunk-WSPJ3KNV.js";import"./chunk-IVRX3TEH.js";import"./chunk-7GNTDMT5.js";import{b as f,g as u}from"./chunk-SHJOEOUO.js";import{a as p}from"./chunk-QG3METGX.js";import"./chunk-QSLG7VVY.js";import{c as m}from"./chunk-3EOBQIPI.js";import"./chunk-PIRJFIZF.js";import"./chunk-TRTHHT4P.js";import"./chunk-EXHZED5X.js";import"./chunk-4FOEYBND.js";import"./chunk-TVMYLEWA.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim electron \u2014 launch the desktop companion
4
4
 
5
5
  usage:
@@ -15,4 +15,4 @@ examples:
15
15
  sootsim electron
16
16
  sootsim electron --port 5173
17
17
  sootsim electron --profile qa
18
- `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-DTHVNNX7.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
18
+ `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-KAMMVODZ.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as d,c as e,d as f}from"./chunk-ZV62LZGY.js";import"./chunk-HM762PMQ.js";import"./chunk-6GITV57W.js";import"./chunk-EYHJPH7C.js";import"./chunk-6GC4TL3O.js";import"./chunk-OHEIXPMP.js";import{d as a,e as b}from"./chunk-RX3LQRCU.js";import"./chunk-5ATB3BNQ.js";import"./chunk-HG5VVLD6.js";import"./chunk-WJVBMLUZ.js";import"./chunk-WSPJ3KNV.js";import"./chunk-IVRX3TEH.js";import"./chunk-7GNTDMT5.js";import"./chunk-SHJOEOUO.js";import"./chunk-QG3METGX.js";import"./chunk-QSLG7VVY.js";import"./chunk-3EOBQIPI.js";import"./chunk-PIRJFIZF.js";import"./chunk-LJXW33TJ.js";import"./chunk-W5CC6JIX.js";import"./chunk-ETWRACG5.js";import"./chunk-TRTHHT4P.js";import"./chunk-EXHZED5X.js";import"./chunk-4FHMNPCF.js";import"./chunk-2V2FWDAF.js";import"./chunk-4FOEYBND.js";import"./chunk-TVMYLEWA.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-YSORRTVM.js";import"./chunk-ETWRACG5.js";import"./chunk-L54TZZAI.js";import"./chunk-TRTHHT4P.js";import"./chunk-EXHZED5X.js";import"./chunk-I5WPAK2A.js";import"./chunk-SITJ5S5B.js";import"./chunk-2V2FWDAF.js";import"./chunk-4FOEYBND.js";import"./chunk-TVMYLEWA.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-2QNNBZLX.js";import"./chunk-WV4XAMMB.js";import"./chunk-I63MGIRV.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-3WTHDJJG.js";import"./chunk-7GNTDMT5.js";import"./chunk-TVMYLEWA.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.88 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,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-VLX4A5H7.js";import"./chunk-I63MGIRV.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.89 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,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-4FOEYBND.js";import"./chunk-TVMYLEWA.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};