sootsim 0.1.124 → 0.1.126

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 (146) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-3VAW5LZD.js → agent-XQDT2A2E.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-YCNCH7CG.js → agent-wrapper-ZIBULEDW.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-BKHY7U6N.js → app-fonts-J772RW3P.js} +2 -2
  5. package/dist-cli/chunks/{assert-IJP5E6DT.js → assert-LQ7RLUYW.js} +2 -2
  6. package/dist-cli/chunks/auto-bootstrap-5ORFQ7N7.js +2 -0
  7. package/dist-cli/chunks/beta-PECTKFDT.js +2 -0
  8. package/dist-cli/chunks/{chunk-TUZCEXOT.js → chunk-27SE7NM3.js} +2 -2
  9. package/dist-cli/chunks/{chunk-G6G5LYD3.js → chunk-2MMSLN4J.js} +2 -2
  10. package/dist-cli/chunks/{chunk-TJUPANGE.js → chunk-2OLYZLVT.js} +75 -13
  11. package/dist-cli/chunks/chunk-2YI3QEGS.js +1 -0
  12. package/dist-cli/chunks/{chunk-AUR7DDPB.js → chunk-46ALP2DD.js} +3 -3
  13. package/dist-cli/chunks/{chunk-IA347TKV.js → chunk-4F2WVZZP.js} +1 -1
  14. package/dist-cli/chunks/{chunk-ZL7STHLD.js → chunk-4HITITPE.js} +1 -1
  15. package/dist-cli/chunks/{chunk-GYK5RCAC.js → chunk-5X6X5LES.js} +1 -1
  16. package/dist-cli/chunks/{chunk-ZV3W66US.js → chunk-AK7USIKQ.js} +2 -2
  17. package/dist-cli/chunks/{chunk-A5O2QWEB.js → chunk-BBIGYURM.js} +1 -1
  18. package/dist-cli/chunks/{chunk-TJLVKZJQ.js → chunk-CQCMQFKK.js} +2 -2
  19. package/dist-cli/chunks/{chunk-4YSKSJI3.js → chunk-DA2PKV6Q.js} +2 -2
  20. package/dist-cli/chunks/{chunk-QTHELIAB.js → chunk-DDK42V36.js} +2 -2
  21. package/dist-cli/chunks/{chunk-R7R5HWAT.js → chunk-E2BIG4B3.js} +2 -2
  22. package/dist-cli/chunks/{chunk-PP5QI5FB.js → chunk-E2X36IZI.js} +1 -1
  23. package/dist-cli/chunks/{chunk-Q5YWPKAG.js → chunk-EGWYXC2Z.js} +2 -2
  24. package/dist-cli/chunks/{chunk-DCZGWL5K.js → chunk-G6DP2CFJ.js} +1 -1
  25. package/dist-cli/chunks/{chunk-WH3M4U2P.js → chunk-GLBMBO3X.js} +1 -1
  26. package/dist-cli/chunks/{chunk-CA7DYUFF.js → chunk-I2VAJ6SU.js} +3 -3
  27. package/dist-cli/chunks/{chunk-JOEOYLTY.js → chunk-IV4WDF54.js} +1 -1
  28. package/dist-cli/chunks/{chunk-OPWN5ZM7.js → chunk-JQZUUDUN.js} +2 -2
  29. package/dist-cli/chunks/{chunk-DGQN4QFL.js → chunk-JWU65JVV.js} +1 -1
  30. package/dist-cli/chunks/{chunk-EESOIR2B.js → chunk-KRLC6R5H.js} +2 -2
  31. package/dist-cli/chunks/{chunk-LTHY7I3V.js → chunk-LHXYIEZM.js} +1 -1
  32. package/dist-cli/chunks/chunk-LIICOU6Q.js +1 -0
  33. package/dist-cli/chunks/{chunk-5GVG37QH.js → chunk-MJH6XTIY.js} +2 -2
  34. package/dist-cli/chunks/{chunk-2IT7O7KQ.js → chunk-N3F5BP3M.js} +2 -2
  35. package/dist-cli/chunks/{chunk-NQZCZVNZ.js → chunk-NJ3435S4.js} +16 -5
  36. package/dist-cli/chunks/{chunk-YFCC2KKG.js → chunk-NONHFWQS.js} +2 -2
  37. package/dist-cli/chunks/chunk-NQJEALRY.js +1 -0
  38. package/dist-cli/chunks/{chunk-KTRDHNPZ.js → chunk-OTSWADHN.js} +1 -1
  39. package/dist-cli/chunks/chunk-OXWCMDNR.js +2 -0
  40. package/dist-cli/chunks/{chunk-E7GET25R.js → chunk-OZSRMPSC.js} +2 -2
  41. package/dist-cli/chunks/{chunk-KXSJQP6J.js → chunk-QMPDHXRG.js} +2 -2
  42. package/dist-cli/chunks/{chunk-I4F7AUP2.js → chunk-R5DF7ZN7.js} +2 -2
  43. package/dist-cli/chunks/{chunk-2JTGXU4D.js → chunk-R677VUUU.js} +1 -1
  44. package/dist-cli/chunks/{chunk-F4W6VKRG.js → chunk-RA3KPNRU.js} +2 -2
  45. package/dist-cli/chunks/{chunk-RMDVV4YS.js → chunk-TWAHJXNZ.js} +1 -1
  46. package/dist-cli/chunks/{chunk-HQ5JZI67.js → chunk-W2RSCYDO.js} +1 -1
  47. package/dist-cli/chunks/{chunk-FPHJY2YU.js → chunk-W77EWJQA.js} +1 -1
  48. package/dist-cli/chunks/{chunk-PQZNX54H.js → chunk-WTSJ25RM.js} +2 -2
  49. package/dist-cli/chunks/{chunk-J67NC7MV.js → chunk-XXNPMLXX.js} +3 -3
  50. package/dist-cli/chunks/{chunk-QG4GIDXL.js → chunk-Z72KJG4K.js} +2 -2
  51. package/dist-cli/chunks/{chunk-KBFPZMXJ.js → chunk-ZHJP6ENB.js} +2 -2
  52. package/dist-cli/chunks/cli-version-W4R5JOIM.js +2 -0
  53. package/dist-cli/chunks/{compat-AKOAVN2G.js → compat-KIIVGF6J.js} +3 -3
  54. package/dist-cli/chunks/{config-GYQK6ZKQ.js → config-JFMHR2HE.js} +2 -2
  55. package/dist-cli/chunks/control-RNZSJAPQ.js +2 -0
  56. package/dist-cli/chunks/{cpu-profile-TX4QMZZA.js → cpu-profile-3665LRD7.js} +2 -2
  57. package/dist-cli/chunks/{daemon-6BDWMPND.js → daemon-MDO3JYOH.js} +2 -2
  58. package/dist-cli/chunks/{debug-3EFC6N6J.js → debug-ARJ47K5P.js} +3 -3
  59. package/dist-cli/chunks/{detox-BDBX3YVO.js → detox-72O6RLWW.js} +2 -2
  60. package/dist-cli/chunks/{device-CHHYWWPG.js → device-JARX3ONX.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-EAXEHFIG.js → diagnose-ABHCJXCR.js} +2 -2
  62. package/dist-cli/chunks/drivers-6GTIP5QQ.js +2 -0
  63. package/dist-cli/chunks/{electron-MHB2W6ZP.js → electron-G45U77TI.js} +3 -3
  64. package/dist-cli/chunks/flow-NLXHSQKP.js +2 -0
  65. package/dist-cli/chunks/help-BPIZ5CUD.js +2 -0
  66. package/dist-cli/chunks/{hints-QAKIPTMF.js → hints-HM2ZYYIF.js} +2 -2
  67. package/dist-cli/chunks/{home-paths-OD73ST5G.js → home-paths-232EBQYF.js} +2 -2
  68. package/dist-cli/chunks/{inspect-4SGHZLMG.js → inspect-YAG4RCQP.js} +3 -3
  69. package/dist-cli/chunks/install-PGEVZLOP.js +2 -0
  70. package/dist-cli/chunks/{install-desktop-SFPJHT2D.js → install-desktop-2PS3QFFK.js} +3 -3
  71. package/dist-cli/chunks/{keys-XQZGTVEZ.js → keys-RRLRCDVB.js} +2 -2
  72. package/dist-cli/chunks/{launch-KG2GSCQV.js → launch-65QAKBP6.js} +3 -3
  73. package/dist-cli/chunks/{login-KYT67KEA.js → login-VIYE4EAD.js} +4 -4
  74. package/dist-cli/chunks/{logout-IBMVZBNN.js → logout-ZI5LAJSV.js} +2 -2
  75. package/dist-cli/chunks/{maestro-YA62KLKO.js → maestro-QD3LGRO7.js} +2 -2
  76. package/dist-cli/chunks/{preview-CXH6NIVN.js → preview-6CDC72XL.js} +2 -2
  77. package/dist-cli/chunks/{profile-UVB3AVOS.js → profile-4AYZP2AY.js} +2 -2
  78. package/dist-cli/chunks/{react-M2CHY2TY.js → react-FWQNHHU4.js} +2 -2
  79. package/dist-cli/chunks/{record-SZORC67L.js → record-WNBQGMEW.js} +2 -2
  80. package/dist-cli/chunks/runtime-G23B2OOP.js +2 -0
  81. package/dist-cli/chunks/{runtime-delivery-NBQRZ65J.js → runtime-delivery-QCPOLACM.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-I34CN2NI.js → screenshot-YDRH5NYM.js} +2 -2
  83. package/dist-cli/chunks/{screenshot-mode-NQNLKD67.js → screenshot-mode-MWOV4YH5.js} +2 -2
  84. package/dist-cli/chunks/{screenshots-NHQSKU5V.js → screenshots-IVCQ4UP3.js} +2 -2
  85. package/dist-cli/chunks/{server-L3UP7BR6.js → server-NOUN6O5W.js} +3 -3
  86. package/dist-cli/chunks/setup-repo-UKUBUILR.js +2 -0
  87. package/dist-cli/chunks/{skills-ULNZRVS3.js → skills-ITSSQ57N.js} +2 -2
  88. package/dist-cli/chunks/{start-G56BRWEF.js → start-MTBOHVZB.js} +4 -4
  89. package/dist-cli/chunks/store-3J3EUL4Z.js +2 -0
  90. package/dist-cli/chunks/telemetry-HVCJILV6.js +2 -0
  91. package/dist-cli/chunks/{test-RVKY4RKI.js → test-GDUXGV4Z.js} +3 -3
  92. package/dist-cli/chunks/{three-mode-MORULFUD.js → three-mode-U24VQDZC.js} +2 -2
  93. package/dist-cli/chunks/{timeline-PNE7JILB.js → timeline-JSHRI4CQ.js} +2 -2
  94. package/dist-cli/chunks/{upgrade-XAVE44HP.js → upgrade-V4VYWIRP.js} +2 -2
  95. package/dist-cli/chunks/upload-P7IGFL7I.js +2 -0
  96. package/dist-cli/chunks/{version-CXEJDONA.js → version-FDCSFJWE.js} +2 -2
  97. package/dist-cli/chunks/{web-HJUVVLLW.js → web-SMWZNE4P.js} +2 -2
  98. package/dist-cli/chunks/{what-happened-JP3M2RDF.js → what-happened-T74NXSMP.js} +2 -2
  99. package/dist-cli/chunks/{whoami-BCGVUSDW.js → whoami-ZVUNQW67.js} +2 -2
  100. package/dist-lib/agent-daemon-client.cjs +1 -1
  101. package/dist-lib/agent-events.cjs +1 -1
  102. package/dist-lib/agent-sessions.cjs +1 -1
  103. package/dist-lib/attached-projects.cjs +1 -1
  104. package/dist-lib/auth/shared-session.cjs +1 -1
  105. package/dist-lib/backend-origin.cjs +1 -1
  106. package/dist-lib/beta.cjs +1 -1
  107. package/dist-lib/beta.mjs +1 -1
  108. package/dist-lib/bridge-constants.cjs +1 -1
  109. package/dist-lib/cli-constants.cjs +1 -1
  110. package/dist-lib/config.cjs +1 -1
  111. package/dist-lib/detox/index.cjs +1 -1
  112. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  113. package/dist-lib/home-paths.cjs +1 -1
  114. package/dist-lib/host/bridge-host.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  117. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  118. package/dist-lib/host/websocket-proxy.cjs +1 -1
  119. package/dist-lib/index.cjs +1 -1
  120. package/dist-lib/metro.cjs +1 -1
  121. package/dist-lib/profiles.cjs +1 -1
  122. package/dist-lib/render-mode.cjs +1 -1
  123. package/dist-lib/scripts/demo-app-registry.cjs +1 -1
  124. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  125. package/dist-lib/sdk.cjs +64 -2
  126. package/dist-lib/sdk.mjs +64 -2
  127. package/dist-lib/skills.cjs +1 -1
  128. package/dist-lib/vite.cjs +1 -1
  129. package/package.json +1 -1
  130. package/dist-cli/chunks/auto-bootstrap-EKA34I25.js +0 -2
  131. package/dist-cli/chunks/beta-DPPCI2ZU.js +0 -2
  132. package/dist-cli/chunks/chunk-66ETIVOD.js +0 -1
  133. package/dist-cli/chunks/chunk-JUX2JKSR.js +0 -2
  134. package/dist-cli/chunks/chunk-VXRIUP2K.js +0 -1
  135. package/dist-cli/chunks/chunk-X5LIH464.js +0 -1
  136. package/dist-cli/chunks/cli-version-RTYBGBXB.js +0 -2
  137. package/dist-cli/chunks/control-HNK3OF2T.js +0 -2
  138. package/dist-cli/chunks/drivers-B4PIARZR.js +0 -2
  139. package/dist-cli/chunks/flow-HWDVF2M3.js +0 -2
  140. package/dist-cli/chunks/help-7FMLHEKH.js +0 -2
  141. package/dist-cli/chunks/install-WZK6LXM6.js +0 -2
  142. package/dist-cli/chunks/runtime-PO4BMP3J.js +0 -2
  143. package/dist-cli/chunks/setup-repo-GUPYQ2J5.js +0 -2
  144. package/dist-cli/chunks/store-WW7XXZNM.js +0 -2
  145. package/dist-cli/chunks/telemetry-3FW6INA6.js +0 -2
  146. package/dist-cli/chunks/upload-T6JS6GQQ.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as d,b as v}from"./chunk-A5O2QWEB.js";import{a as f,c as w}from"./chunk-R7R5HWAT.js";import{a as u,b as h,c as m}from"./chunk-DCZGWL5K.js";import{c as p}from"./chunk-GYK5RCAC.js";function _(){let e=u();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function M(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=u();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 g={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:_,launch:M};function I(){let e=d();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=d();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await v(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 y={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:I,launch:x};import{spawn as E}from"child_process";import{closeSync as C,mkdtempSync as A,openSync as L,readFileSync as W}from"fs";import{createRequire as R}from"module";import{tmpdir as b}from"os";import{join as P}from"path";var N=`
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as d,b as v}from"./chunk-BBIGYURM.js";import{a as f,c as w}from"./chunk-E2BIG4B3.js";import{a as u,b as h,c as m}from"./chunk-G6DP2CFJ.js";import{c as p}from"./chunk-5X6X5LES.js";function _(){let e=u();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function M(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=u();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 g={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:_,launch:M};function I(){let e=d();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=d();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await v(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 y={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:I,launch:x};import{spawn as C}from"child_process";import{closeSync as E,mkdtempSync as A,openSync as L,readFileSync as W}from"fs";import{createRequire as R}from"module";import{tmpdir as b}from"os";import{join as P}from"path";var N=`
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';
@@ -166,7 +166,18 @@ const { existsSync, unlinkSync } = require('fs');
166
166
  : ['chrome', null]; // null = bundled chromium
167
167
  const launchWith = async (channel) => {
168
168
  const opts = channel ? { headless, channel } : { headless };
169
- if (cdpPort) opts.args = ['--remote-debugging-port=' + cdpPort];
169
+ // headless chromium backgrounds/occludes the renderer and throttles rAF +
170
+ // timers to ~1fps, which silently starves combined/video frame capture
171
+ // (was 47 frames over 63s -> frozen-looking mp4). keep the render loop at
172
+ // full rate so the recorder captures real motion. document.hidden stays
173
+ // false in headless, so assertTabVisibleForCapture never caught this \u2014 it
174
+ // has to be fixed at the launch flags.
175
+ opts.args = [
176
+ '--disable-background-timer-throttling',
177
+ '--disable-backgrounding-occluded-windows',
178
+ '--disable-renderer-backgrounding',
179
+ ];
180
+ if (cdpPort) opts.args.push('--remote-debugging-port=' + cdpPort);
170
181
  if (userDataDir) {
171
182
  return { kind: 'persistent', value: await pw.chromium.launchPersistentContext(userDataDir, opts) };
172
183
  }
@@ -258,5 +269,5 @@ const { existsSync, unlinkSync } = require('fs');
258
269
  process.stderr.write(String((err && err.stack) || err) + '\\n');
259
270
  process.exit(1);
260
271
  });
261
- `;function D(){let e=[process.cwd()+"/"];try{process.argv[1]&&e.push(process.argv[1])}catch{}for(let r of e)try{let t=R(r);for(let n of["playwright","playwright-chromium","playwright-core"])try{return{spec:n,modulePath:t.resolve(n)}}catch{}}catch{}return null}function $(){let e=D();return e?{available:!0,reason:null,detail:`resolved via ${e.spec}`}:{available:!1,reason:"playwright not installed in the current workspace"}}function U(e){return e.profileId?f(w(e.profileId).id):e.ephemeralProfile?A(P(b(),"sootsim-playwright-profile-")):""}async function F(e){let r=D();if(!r)return{launched:!1,message:"playwright not installed \u2014 run `bun add -D playwright` first"};if(!e.url)return{launched:!1,message:"playwright driver requires a target url"};let t=P(b(),`sootsim-playwright-host-${Date.now().toString(36)}-${process.pid}.log`),n=`${t}.connected`,a=L(t,"a");try{let o=p(),l=E(process.execPath,["-e",N],{detached:!0,stdio:["ignore","ignore",a],env:{...process.env,SOOTSIM_PW_MODULE:r.modulePath,SOOTSIM_PW_URL:e.url,SOOTSIM_PW_HEADLESS:e.headless??!0?"1":"0",SOOTSIM_PW_USERDATADIR:U(e),SOOTSIM_PW_CDP_PORT:e.cdpPort?String(e.cdpPort):"",SOOTSIM_PW_CONNECTED_ACK_FILE:n,SOOTSIM_PW_CONNECT_TIMEOUT_MS:String(e.connectTimeoutMs??12e4),SOOTSIM_PW_OWNER_PID:o&&o>1?String(o):""}});l.unref();let c=await new Promise(i=>{let T=setTimeout(()=>i(null),4e3);l.once("exit",k=>{clearTimeout(T),i(k??0)})});if(c!==null&&c!==0){let i=W(t,"utf8").trim();return{launched:!1,message:`playwright host exited early (code ${c}) \u2014 host log ${t}${i?`:
262
- ${i}`:""}`}}return{launched:!0,message:`playwright chrome launched \u2192 ${e.url}`,pid:l.pid,target:r.spec,attachUrl:e.url,connectAckFile:n,diagnosticLogPath:t}}catch(o){return{launched:!1,message:`playwright launch failed: ${o instanceof Error?o.message:String(o)}`}}finally{C(a)}}var S={id:"playwright",name:"playwright",description:"programmatic chromium via the playwright package \u2014 headless default",kind:"automation",availability:$,launch:F};function H(){return process.platform!=="darwin"&&process.platform!=="linux"&&process.platform!=="win32"?{available:!1,reason:`unsupported platform: ${process.platform}`}:{available:!0,reason:null,detail:process.platform==="darwin"?"open(1)":process.platform==="win32"?"cmd /c start":"xdg-open(1)"}}async function q(e){if(e.headless)return{launched:!1,message:"system driver does not support --headless; use chromium or playwright"};if(!e.url)return{launched:!1,message:"system driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current browser profile"};try{let r=await h(e.url,{detached:e.detached??!0,newWindow:e.newWindow});return{launched:!0,message:`${r.via} launch \u2192 ${e.url}`,pid:r.pid,target:r.target,attachUrl:e.url}}catch(r){return{launched:!1,message:`system launch failed: ${r instanceof Error?r.message:String(r)}`}}}var O={id:"system",name:"system",description:"shared browser launcher \u2014 system default or chromium window",kind:"delegate",availability:H,launch:q};var s=[g,y,S,O];function ae(){return s}function le(e){return s.find(r=>r.id===e)??null}function ce(e,r){if(e)return s.find(n=>n.id===e)??null;for(let t of r){let n=s.find(a=>a.id===t);if(n&&n.availability().available)return n}return null}function ue(){return s.map(e=>{let r=e.availability();return{id:e.id,name:e.name,kind:e.kind,description:e.description,available:r.available,reason:r.reason,detail:r.detail??null}})}export{g as a,y as b,S as c,O as d,s as e,ae as f,le as g,ce as h,ue as i};
272
+ `;function D(){let e=[process.cwd()+"/"];try{process.argv[1]&&e.push(process.argv[1])}catch{}for(let r of e)try{let t=R(r);for(let n of["playwright","playwright-chromium","playwright-core"])try{return{spec:n,modulePath:t.resolve(n)}}catch{}}catch{}return null}function $(){let e=D();return e?{available:!0,reason:null,detail:`resolved via ${e.spec}`}:{available:!1,reason:"playwright not installed in the current workspace"}}function F(e){return e.profileId?f(w(e.profileId).id):e.ephemeralProfile?A(P(b(),"sootsim-playwright-profile-")):""}async function U(e){let r=D();if(!r)return{launched:!1,message:"playwright not installed \u2014 run `bun add -D playwright` first"};if(!e.url)return{launched:!1,message:"playwright driver requires a target url"};let t=P(b(),`sootsim-playwright-host-${Date.now().toString(36)}-${process.pid}.log`),n=`${t}.connected`,a=L(t,"a");try{let o=p(),l=C(process.execPath,["-e",N],{detached:!0,stdio:["ignore","ignore",a],env:{...process.env,SOOTSIM_PW_MODULE:r.modulePath,SOOTSIM_PW_URL:e.url,SOOTSIM_PW_HEADLESS:e.headless??!0?"1":"0",SOOTSIM_PW_USERDATADIR:F(e),SOOTSIM_PW_CDP_PORT:e.cdpPort?String(e.cdpPort):"",SOOTSIM_PW_CONNECTED_ACK_FILE:n,SOOTSIM_PW_CONNECT_TIMEOUT_MS:String(e.connectTimeoutMs??12e4),SOOTSIM_PW_OWNER_PID:o&&o>1?String(o):""}});l.unref();let c=await new Promise(i=>{let k=setTimeout(()=>i(null),4e3);l.once("exit",T=>{clearTimeout(k),i(T??0)})});if(c!==null&&c!==0){let i=W(t,"utf8").trim();return{launched:!1,message:`playwright host exited early (code ${c}) \u2014 host log ${t}${i?`:
273
+ ${i}`:""}`}}return{launched:!0,message:`playwright chrome launched \u2192 ${e.url}`,pid:l.pid,target:r.spec,attachUrl:e.url,connectAckFile:n,diagnosticLogPath:t}}catch(o){return{launched:!1,message:`playwright launch failed: ${o instanceof Error?o.message:String(o)}`}}finally{E(a)}}var S={id:"playwright",name:"playwright",description:"programmatic chromium via the playwright package \u2014 headless default",kind:"automation",availability:$,launch:U};function H(){return process.platform!=="darwin"&&process.platform!=="linux"&&process.platform!=="win32"?{available:!1,reason:`unsupported platform: ${process.platform}`}:{available:!0,reason:null,detail:process.platform==="darwin"?"open(1)":process.platform==="win32"?"cmd /c start":"xdg-open(1)"}}async function q(e){if(e.headless)return{launched:!1,message:"system driver does not support --headless; use chromium or playwright"};if(!e.url)return{launched:!1,message:"system driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current browser profile"};try{let r=await h(e.url,{detached:e.detached??!0,newWindow:e.newWindow});return{launched:!0,message:`${r.via} launch \u2192 ${e.url}`,pid:r.pid,target:r.target,attachUrl:e.url}}catch(r){return{launched:!1,message:`system launch failed: ${r instanceof Error?r.message:String(r)}`}}}var O={id:"system",name:"system",description:"shared browser launcher \u2014 system default or chromium window",kind:"delegate",availability:H,launch:q};var s=[g,y,S,O];function ae(){return s}function le(e){return s.find(r=>r.id===e)??null}function ce(e,r){if(e)return s.find(n=>n.id===e)??null;for(let t of r){let n=s.find(a=>a.id===t);if(n&&n.availability().available)return n}return null}function ue(){return s.map(e=>{let r=e.availability();return{id:e.id,name:e.name,kind:e.kind,description:e.description,available:r.available,reason:r.reason,detail:r.detail??null}})}export{g as a,y as b,S as c,O as d,s as e,ae as f,le as g,ce as h,ue as i};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as s}from"./chunk-KXSJQP6J.js";import{y as o}from"./chunk-2JTGXU4D.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as s}from"./chunk-QMPDHXRG.js";import{y as o}from"./chunk-R677VUUU.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
@@ -0,0 +1 @@
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ var t="http://localhost:5173/";export{t as a};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as i,e as d,h as c}from"./chunk-ZV3W66US.js";function g(r){let e=r[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(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as i,e as d,h as c}from"./chunk-AK7USIKQ.js";function g(r){let e=r[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(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
3
3
  const modeKey = ${JSON.stringify(t.modeKey)}
4
4
  const target = ${JSON.stringify(o)}
5
5
  window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{n as d}from"./chunk-2JTGXU4D.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://sootbean.com";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 b(){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 O(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{n as d}from"./chunk-R677VUUU.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://sootbean.com";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 b(){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 O(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
3
3
  `);try{S(e,384)}catch{}return r}function l(){i(a(),{force:!0})}async function E(t){let e=b();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?O({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{b as a,O as b,l as c,E as d};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as Ns}from"./chunk-KTRDHNPZ.js";var ui=`(async () => {
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as Ns}from"./chunk-OTSWADHN.js";var ui=`(async () => {
3
3
  try { localStorage.clear() } catch {}
4
4
  try { sessionStorage.clear() } catch {}
5
5
  try {
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import n from"node:fs";import{homedir as k}from"node:os";import r from"node:path";var L="SOOTSIM_HOME",E="active",A="daemon.json",_="config.json",I=3e4;function c(){let e=process.env[L];return e&&e.length>0?r.resolve(e):r.join(k(),".sootsim")}function N(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return n.realpathSync(t).includes(`${r.sep}packages${r.sep}sootsim${r.sep}`)}catch{return!1}}function j(){return process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1"?!1:process.env.IS_TAMAGUI_DEV==="1"}function K(){return N()||j()}function f(){return r.join(c(),"runtimes")}function T(e){return r.join(f(),e)}function h(){return r.join(f(),E)}function S(){return r.join(c(),"electron")}function Y(){return r.join(S(),"userData")}function W(e){return r.join(S(),e)}function F(){return r.join(c(),"profiles")}function M(){return r.join(c(),"daemon-app")}function C(){return r.join(M(),"SootSim Daemon.app")}function X(){return r.join(C(),"Contents","MacOS","sootsim-daemon")}function w(){return r.join(c(),"cache")}function p(){return r.join(c(),A)}function d(){return r.join(c(),_)}function v(){try{let e=n.readFileSync(d(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function P(e){y();let t=v(),s={...t,...e};e.settings&&typeof e.settings=="object"&&(s.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let u=`${d()}.tmp`;return n.writeFileSync(u,`${JSON.stringify(s,null,2)}
3
3
  `,"utf8"),n.renameSync(u,d()),s}function q(){return v().telemetry!==!1}function z(e){P({telemetry:e})}function y(){n.mkdirSync(c(),{recursive:!0}),n.mkdirSync(f(),{recursive:!0}),n.mkdirSync(S(),{recursive:!0}),n.mkdirSync(F(),{recursive:!0}),n.mkdirSync(w(),{recursive:!0})}function R(){try{let e=n.readFileSync(h(),"utf8").trim();return e.length>0?e:null}catch{return null}}function Q(e){n.mkdirSync(f(),{recursive:!0}),n.writeFileSync(h(),`${e}
4
4
  `,"utf8")}function Z(){try{return n.readdirSync(f(),{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).sort($)}catch{return[]}}function $(e,t){let s=i=>{let a=i.indexOf("-"),l=a>=0?i.slice(0,a):i,O=a>=0?i.slice(a+1):"",b=l.split(".").map(g=>Number.parseInt(g,10));return b.some(g=>!Number.isFinite(g))?[[Number.POSITIVE_INFINITY],i]:[b,O]},[u,o]=s(e),[x,m]=s(t);for(let i=0;i<Math.max(u.length,x.length);i++){let a=u[i]??0,l=x[i]??0;if(a!==l)return a-l}return o===m?0:o?m?o<m?-1:1:-1:1}function ee(){let e=R();if(!e)return null;let t=T(e);try{if(n.statSync(t).isDirectory())return t}catch{}return null}var D=16*1024;function V(){try{let e=n.openSync(p(),"r");try{let t=Buffer.alloc(D),s=n.readSync(e,t,0,D,0),u=t.subarray(0,s).toString("utf8"),o=JSON.parse(u);return o&&o.schema===1&&typeof o.pid=="number"&&typeof o.bridgePort=="number"&&typeof o.runtimePort=="number"&&typeof o.startedAt=="number"&&typeof o.heartbeatAt=="number"?o:null}finally{n.closeSync(e)}}catch{return null}}function H(e,t=Date.now()){if(!e||t-e.heartbeatAt>I)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function J(e){y();let t=`${p()}.tmp`;n.writeFileSync(t,`${JSON.stringify(e,null,2)}
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as R,B as g,C as v,E as w,k as p,t as b,v as S}from"./chunk-2JTGXU4D.js";import{spawn as I}from"child_process";import P from"crypto";import s from"fs";import l from"path";import{Readable as k}from"stream";import{pipeline as E}from"stream/promises";var M="https://sootbean.com",C="SOOTSIM_CDN_ORIGIN",N="SOOTSIM_RUNTIME_CHANNEL";function $(){try{let e=JSON.parse(s.readFileSync(S(),"utf8"));return e&&typeof e=="object"?e:{}}catch{return{}}}function m(e){let t=$();return(e||process.env[C]||t.cdnOrigin||M).replace(/\/+$/,"")}function x(e){let t=$();return e||process.env[N]||t.runtimeChannel||"stable"}function T(e){let t=new URL(`${m(e)}/runtimes/manifest.json`);return t.searchParams.set("t",String(Date.now())),t.toString()}function D(e,t){return`${m(t)}/runtimes/sootsim-runtime-${e}.tar.gz`}async function y(e){let t=T(e),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function U(e,t){let r=new URL(`${m(t)}/api/changelog/sootsim`);return r.searchParams.set("page",String(e)),r.searchParams.set("t",String(Date.now())),r.toString()}async function V(e,t){let r=U(e,t),n=await fetch(r,{headers:{Accept:"application/json"}});if(n.status===404)return{product:"sootsim",updatedThrough:null,page:e,pageSize:0,total:0,totalPages:0,hasMore:!1,entries:[]};if(!n.ok)throw new Error(`releases fetch failed: ${n.status} ${n.statusText} (${r})`);return await n.json()}async function K(e){let t=[],r=1;for(let n=0;n<1e3;n++){let i=await V(r,e);if(Array.isArray(i.entries)&&t.push(...i.entries),!i.hasMore||i.entries.length===0)break;r++}return t}function A(e,t={}){let r=x(t.channel),n=t.version||e.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=e.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(e.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function j(e={}){R();let t=m(e.cdnOrigin),r=await y(t),{version:n,channel:i,entry:o}=A(r,e),a=p(n),c=e.setActive!==!1;if(!e.force&&s.existsSync(l.join(a,"index.html")))return c&&v(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!1,activated:c,manifest:r};let d=o.tarball||D(n,t),f=l.join(b(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A as R,B as g,C as v,E as w,k as p,t as b,v as S}from"./chunk-R677VUUU.js";import{spawn as I}from"child_process";import P from"crypto";import s from"fs";import l from"path";import{Readable as k}from"stream";import{pipeline as E}from"stream/promises";var M="https://sootbean.com",C="SOOTSIM_CDN_ORIGIN",N="SOOTSIM_RUNTIME_CHANNEL";function $(){try{let e=JSON.parse(s.readFileSync(S(),"utf8"));return e&&typeof e=="object"?e:{}}catch{return{}}}function m(e){let t=$();return(e||process.env[C]||t.cdnOrigin||M).replace(/\/+$/,"")}function x(e){let t=$();return e||process.env[N]||t.runtimeChannel||"stable"}function T(e){let t=new URL(`${m(e)}/runtimes/manifest.json`);return t.searchParams.set("t",String(Date.now())),t.toString()}function D(e,t){return`${m(t)}/runtimes/sootsim-runtime-${e}.tar.gz`}async function y(e){let t=T(e),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function U(e,t){let r=new URL(`${m(t)}/api/changelog/sootsim`);return r.searchParams.set("page",String(e)),r.searchParams.set("t",String(Date.now())),r.toString()}async function V(e,t){let r=U(e,t),n=await fetch(r,{headers:{Accept:"application/json"}});if(n.status===404)return{product:"sootsim",updatedThrough:null,page:e,pageSize:0,total:0,totalPages:0,hasMore:!1,entries:[]};if(!n.ok)throw new Error(`releases fetch failed: ${n.status} ${n.statusText} (${r})`);return await n.json()}async function K(e){let t=[],r=1;for(let n=0;n<1e3;n++){let i=await V(r,e);if(Array.isArray(i.entries)&&t.push(...i.entries),!i.hasMore||i.entries.length===0)break;r++}return t}function A(e,t={}){let r=x(t.channel),n=t.version||e.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=e.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(e.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function j(e={}){R();let t=m(e.cdnOrigin),r=await y(t),{version:n,channel:i,entry:o}=A(r,e),a=p(n),c=e.setActive!==!1;if(!e.force&&s.existsSync(l.join(a,"index.html")))return c&&v(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!1,activated:c,manifest:r};let d=o.tarball||D(n,t),f=l.join(b(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
3
3
  `),await _(d,f),process.stderr.write(`sootsim: extracting runtime ${n}\u2026
4
4
  `);let h=await z(f);if(h!==o.sha256)throw s.rmSync(f,{force:!0}),new Error(`sha256 mismatch for runtime ${n}: expected ${o.sha256}, actual ${h}`);let u=l.join(l.dirname(a),`.installing-${n}-${process.pid}`);s.rmSync(u,{recursive:!0,force:!0}),s.mkdirSync(u,{recursive:!0});try{if(await L(f,u),!s.existsSync(l.join(u,"index.html")))throw new Error(`extracted tarball for runtime ${n} is missing index.html`);s.rmSync(a,{recursive:!0,force:!0}),s.renameSync(u,a)}catch(O){throw s.rmSync(u,{recursive:!0,force:!0}),O}return c&&v(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!0,activated:c,manifest:r}}async function Q(e={}){R();let t=m(e.cdnOrigin),r=x(e.channel),n=await y(t),i=n.channels[r]?.latest;if(!i)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:g()};if(!n.versions[i])return{checked:!0,updated:!1,reason:`manifest is missing version ${i}`,activeVersion:g(),latestVersion:i};let a=g(),c=a?p(a):null,d=c?s.existsSync(l.join(c,"index.html")):!1;if(!(!a||!d||w(i,a)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:a,latestVersion:i};let h=await j({version:i,channel:r,cdnOrigin:t,setActive:!1});return{checked:!0,updated:!0,activeVersion:i,latestVersion:i,install:h}}async function X(e={}){let t=g();try{let r=await y(m(e.cdnOrigin)),n=x(e.channel),i=r.channels[n]?.latest??null,o=!!(i&&(!t||w(i,t)>0));return{active:t,latest:i,outdated:o}}catch{return{active:t,latest:null,outdated:!1}}}async function _(e,t){let r=await fetch(e);if(!r.ok||!r.body)throw new Error(`download failed: ${r.status} ${r.statusText} (${e})`);s.mkdirSync(l.dirname(t),{recursive:!0});let n=`${t}.partial`;try{await E(k.fromWeb(r.body),s.createWriteStream(n)),s.renameSync(n,t)}catch(i){try{s.unlinkSync(n)}catch{}throw i}}function z(e){return new Promise((t,r)=>{let n=P.createHash("sha256"),i=s.createReadStream(e);i.on("data",o=>n.update(o)),i.on("error",r),i.on("end",()=>t(n.digest("hex")))})}function L(e,t){return new Promise((r,n)=>{let i=I("tar",["-xzf",e,"-C",t],{stdio:["ignore","inherit","inherit"]});i.on("error",n),i.on("exit",o=>{o===0?r():n(new Error(`tar exited with code ${o}`))})})}export{M as a,C as b,N as c,m as d,x as e,T as f,D as g,y as h,U as i,K as j,A as k,j as l,Q as m,X as n};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var c="sootsim-agent-prompt-v1";function r(n){return typeof n=="string"?n.trim():""}function m(n){let e=r(n.text);if(!e)return"";let t=r(n.displayText),s=r(n.inspectSummary),o=r(n.inspectTrace);return!!s||!!o||/[\r\n]/.test(e)||!!t&&t!==e?JSON.stringify({__sootsimAgentPrompt:c,text:e,displayText:t,inspectSummary:s,inspectTrace:o}):e}function u(n){let e=r(n);if(!e)return null;try{let t=JSON.parse(e);if(t.__sootsimAgentPrompt!==c)return{text:e};let s=r(typeof t.text=="string"?t.text:void 0);if(!s)return null;let o=r(typeof t.displayText=="string"?t.displayText:void 0),i=r(typeof t.inspectSummary=="string"?t.inspectSummary:void 0),p=r(typeof t.inspectTrace=="string"?t.inspectTrace:void 0);return{text:s,...o?{displayText:o}:{},...i?{inspectSummary:i}:{},...p?{inspectTrace:p}:{}}}catch{return{text:e}}}export{m as a,u as b};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  function t(_){return`(async () => {
3
3
  const __t = window.__sootsimTest
4
4
  if (!__t) throw new Error('__sootsimTest not available')
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.126 | (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};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as t}from"./chunk-EESOIR2B.js";import{a as p,b as m,c as a}from"./chunk-JOEOYLTY.js";import{a as r}from"./chunk-JUX2JKSR.js";import{a as l}from"./chunk-IA347TKV.js";import{a as u,d}from"./chunk-FPHJY2YU.js";import{B as i}from"./chunk-2JTGXU4D.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.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as t}from"./chunk-KRLC6R5H.js";import{a as p,b as m,c as a}from"./chunk-IV4WDF54.js";import{a as r}from"./chunk-OXWCMDNR.js";import{a as l}from"./chunk-4F2WVZZP.js";import{a as u,d}from"./chunk-W77EWJQA.js";import{B as i}from"./chunk-R677VUUU.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.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as Ae}from"./chunk-Q5YWPKAG.js";import{a as _e}from"./chunk-QG4GIDXL.js";import{a as Ee}from"./chunk-OPWN5ZM7.js";import{a as V,b as ye,c as be,d as Z,e as ee,f as ve,g as te,i as re,j as Se,k as xe}from"./chunk-I4F7AUP2.js";import{g as ke,n as Me,p as Ie,t as Pe}from"./chunk-KBFPZMXJ.js";import{d as Te,f as Fe}from"./chunk-TUZCEXOT.js";import{m as ge}from"./chunk-G6G5LYD3.js";import{c as X,d as Q,e as he}from"./chunk-ZV3W66US.js";import{a as $e}from"./chunk-A5O2QWEB.js";import{d as Y}from"./chunk-GYK5RCAC.js";import{a as pe,b as G}from"./chunk-YFCC2KKG.js";import{f as we}from"./chunk-WH3M4U2P.js";import*as A from"fs";import{tmpdir as Re}from"os";import*as y from"path";import*as g from"fs";import*as w from"path";var L=1e4,B=393,C=852,Ce="__sootsimCliPerf",He="maestroCopiedText",De=new Map;function f(o){return new Promise(e=>setTimeout(e,o))}function qe(o){return o?w.basename(o)===".maestro"?w.dirname(o):o:process.cwd()}function ze(o,e,t){let r=e.endsWith(".png")?e:`${e}.png`;if(w.isAbsolute(r))return r;if(t.mode==="flow"&&/[\\/]/.test(r)){let i=r.startsWith("./")||r.startsWith("../")?t.flowDir??process.cwd():qe(t.flowDir);return w.resolve(i,r)}return w.join(o,r)}function Ge(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 ie(o){let[e,t]=o.split(",").map(i=>i.trim()),r=(i,n)=>i.endsWith("%")?Number.parseFloat(i)/100*n:Number.parseFloat(i);return{x:r(e,B),y:r(t,C)}}function Ye(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,r=be(ye.parse(t),De);return Array.isArray(r)?r:[]}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 r=t.searchParams.toString();return`${t.origin}${t.pathname}${r?`?${r}`:""}`}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 i=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!i)return;let n=e.find(a=>a.isPrimary&&a.readyState==="open"),s=e.find(a=>a.readyState==="open"),l=i??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,r=Date.now(),i=null,n=0,s=0;for(;Date.now()<t;){try{let a=await this.evaluate(`(async () => {
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as Ae}from"./chunk-EGWYXC2Z.js";import{a as _e}from"./chunk-Z72KJG4K.js";import{a as Ee}from"./chunk-JQZUUDUN.js";import{a as V,b as ye,c as be,d as Z,e as ee,f as ve,g as te,i as re,j as Se,k as xe}from"./chunk-R5DF7ZN7.js";import{g as ke,n as Me,p as Ie,t as Pe}from"./chunk-ZHJP6ENB.js";import{d as Te,f as Fe}from"./chunk-27SE7NM3.js";import{m as ge}from"./chunk-2MMSLN4J.js";import{c as X,d as Q,e as he}from"./chunk-AK7USIKQ.js";import{a as $e}from"./chunk-BBIGYURM.js";import{d as Y}from"./chunk-5X6X5LES.js";import{a as pe,b as G}from"./chunk-NONHFWQS.js";import{f as we}from"./chunk-GLBMBO3X.js";import*as A from"fs";import{tmpdir as Re}from"os";import*as y from"path";import*as g from"fs";import*as w from"path";var L=1e4,B=393,C=852,Ce="__sootsimCliPerf",He="maestroCopiedText",De=new Map;function f(o){return new Promise(e=>setTimeout(e,o))}function qe(o){return o?w.basename(o)===".maestro"?w.dirname(o):o:process.cwd()}function ze(o,e,t){let r=e.endsWith(".png")?e:`${e}.png`;if(w.isAbsolute(r))return r;if(t.mode==="flow"&&/[\\/]/.test(r)){let i=r.startsWith("./")||r.startsWith("../")?t.flowDir??process.cwd():qe(t.flowDir);return w.resolve(i,r)}return w.join(o,r)}function Ge(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 ie(o){let[e,t]=o.split(",").map(i=>i.trim()),r=(i,n)=>i.endsWith("%")?Number.parseFloat(i)/100*n:Number.parseFloat(i);return{x:r(e,B),y:r(t,C)}}function Ye(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,r=be(ye.parse(t),De);return Array.isArray(r)?r:[]}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 r=t.searchParams.toString();return`${t.origin}${t.pathname}${r?`?${r}`:""}`}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 i=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!i)return;let n=e.find(a=>a.isPrimary&&a.readyState==="open"),s=e.find(a=>a.readyState==="open"),l=i??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,r=Date.now(),i=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
@@ -372,7 +372,7 @@ flow extension:
372
372
  + completed (${M.length} steps)`),c>0&&console.log(` screenshots: ${c} \u2192 ${s}`),I&&Oe(I),S&&console.log(` video: ${S}`),console.log()}catch(u){if(r&&!I)try{I=await d.stopProfile()}catch{}if(T&&!S)try{S=await d.stopRecording(),_=d.getLastRecordingDurationMs()}catch(c){console.warn(` recording stop failed: ${c?.message||String(c)}`)}console.error(`
373
373
  x failed: ${u.message}
374
374
  `),I&&(console.log(" partial profile:"),Oe(I)),S&&console.log(` partial video: ${S}`);try{let c=d.lastFailedStep,h=c?`step-${String(c.index+1).padStart(2,"0")}-${c.kind}`:"unstaged",R=y.join(s,h);await d.captureFailureBundle(R,{error:u,stepIndex:c?.index,stepKind:c?.kind,stepTarget:c?.target}),console.log(` failure bundle: ${R}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(c){try{let h=y.join(s,"error.png");await d.captureFailureScreenshot(h),console.log(` error screenshot: ${h}`)}catch{}console.log(` (failure bundle capture failed: ${c instanceof Error?c.message:String(c)})`)}await ge($,{errorsCommand:`sootsim get errors 5${d.simId?` --sim ${d.simId}`:""}`,warningsCommand:`sootsim get warnings 5${d.simId?` --sim ${d.simId}`:""}`,requestsCommand:`sootsim get requests 5${d.simId?` --sim ${d.simId}`:""}`}),O=1}finally{$.close()}if(O===0&&v)try{let u=await et(z??[]),c=["--origin",U,"--events",u];oe&&c.push("--public-origin",oe),S&&c.push("--video",S),S&&_&&Number.isFinite(_)&&c.push("--video-duration-ms",String(Math.round(_))),d.simId&&c.push("--sim",d.simId),Ve&&c.push("--open"),se&&c.push("--owner",se),ne&&c.push("--repo",ne),console.log(`
375
- preparing preview upload\u2026`);let{runUpload:h}=await import("./upload-T6JS6GQQ.js");await h(c,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),O=1}return J&&(d.simId&&H.add(d.simId),await Ze(b.wsPort,b.commandTimeoutMs,[...H])),await G(),O}async function Ze(o,e,t){let r=[...new Set(t.filter(Boolean))];if(r.length===0)return;let i=Q(o,{commandTimeoutMs:e});try{let n=await i.listSims(),s=r.filter(a=>n.some(m=>m.id===a&&m.readyState==="open"));if(s.length===0)return;let l=await Pe(i,o,e,s);await Me(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{i.close()}}async function et(o){let{gzipSync:e}=await import("zlib"),t=o.map(n=>JSON.stringify(n)).join(`
375
+ preparing preview upload\u2026`);let{runUpload:h}=await import("./upload-P7IGFL7I.js");await h(c,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),O=1}return J&&(d.simId&&H.add(d.simId),await Ze(b.wsPort,b.commandTimeoutMs,[...H])),await G(),O}async function Ze(o,e,t){let r=[...new Set(t.filter(Boolean))];if(r.length===0)return;let i=Q(o,{commandTimeoutMs:e});try{let n=await i.listSims(),s=r.filter(a=>n.some(m=>m.id===a&&m.readyState==="open"));if(s.length===0)return;let l=await Pe(i,o,e,s);await Me(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{i.close()}}async function et(o){let{gzipSync:e}=await import("zlib"),t=o.map(n=>JSON.stringify(n)).join(`
376
376
  `)+(o.length?`
377
377
  `:""),r=e(Buffer.from(t,"utf8")),i=y.join(Re(),`sootsim-events-${Date.now()}.jsonl.gz`);return A.writeFileSync(i,r),console.log(` events: ${o.length} written to ${i} (${r.length} bytes gz)`),i}async function tt(o){let e=o[0],t=r=>o.find((i,n)=>o[n-1]===r);switch(e){case"start":{let{path:r,state:i}=ve();console.log(" flow draft started"),console.log(` session: ${r}`),console.log(` steps: ${i.steps.length}`);return}case"keep":case"good":{let r=re();if(r.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!r.kept){console.log(" no pending action to keep");return}console.log(` kept: ${r.candidate.summary}`),console.log(` steps: ${r.stepCount}`);return}case"end":{let r=t("--output")||(o[1]&&!o[1].startsWith("-")?o[1]:void 0),i=o.includes("--validate")||o.includes("--video"),n=o.includes("--video"),s=re();s.active&&s.kept&&console.log(` auto-kept trailing action: ${s.candidate.summary}`);let l=Se(r||(i?it():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(i){let a=ot(o,l.outputPath),m=await Ne(a);if(m!==0){console.error(`
378
378
  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 r=o[1];(!r||r.startsWith("-"))&&(console.error(" usage: sootsim flow validate <path>"),process.exit(1));let i=ee(r);if(i.length>0){console.error(` x ${r} failed validation:`);for(let n of i)console.error(` - ${n}`);process.exit(1)}console.log(` + ${r} looks valid`);return}}}function rt(o){return o[0]==="--sim"&&o.length>=2?[...o.slice(2),"--sim",o[1]]:o}async function kt(o){let e=rt(o),t=e[0];if(t==="start"||t==="keep"||t==="good"||t==="end"||t==="validate")return await tt(e),0;let r=await Ne(e);return r!==0&&(process.exitCode=r),r}function Oe(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,5 +1,5 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as p}from"./chunk-OPWN5ZM7.js";import{d as c,e as l}from"./chunk-2IT7O7KQ.js";import{a}from"./chunk-KXSJQP6J.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as p}from"./chunk-JQZUUDUN.js";import{d as c,e as l}from"./chunk-N3F5BP3M.js";import{a}from"./chunk-QMPDHXRG.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
3
3
  sootsim ${e} needs auth before it can check recording access.
4
4
 
5
5
  pick one:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as D,b as q,c as de,e as me}from"./chunk-TUZCEXOT.js";import{m as B}from"./chunk-G6G5LYD3.js";import{m as le,o as ce}from"./chunk-TJUPANGE.js";import{a as pe,b as fe,c as ge}from"./chunk-LTHY7I3V.js";import{b as ae,c as I,d as v,e as x}from"./chunk-ZV3W66US.js";import{g as G}from"./chunk-NQZCZVNZ.js";import{a as M,b as V}from"./chunk-A5O2QWEB.js";import{c as ue}from"./chunk-R7R5HWAT.js";import{d as j}from"./chunk-DCZGWL5K.js";import{d as k,e as w,f as T}from"./chunk-GYK5RCAC.js";import{a as ie}from"./chunk-JUX2JKSR.js";import{G as re,H as se}from"./chunk-2JTGXU4D.js";import Y from"node:fs";import Ae from"node:os";import P from"node:path";function Re(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function J(e){let o=Re(e);return o==="localhost"||o.endsWith(".localhost")||o==="0.0.0.0"||o==="::1"||/^127(?:\.\d{1,3}){3}$/.test(o)}function he(e){return new Error(`could not resolve a native bundle for ${e}. pass an explicit bundle URL or open Connect and choose the app there.`)}function Oe(e,o){return e?.includes("/one/metro-entry.bundle")?"one":typeof o=="string"&&o?"expo":"unknown"}function ye(e,o,t){return`${e}//${o}:${t}`}function Ue(e){if(typeof window>"u")return!1;try{let o=new URL(e);return J(o.hostname)&&J(window.location.hostname)&&o.origin!==window.location.origin}catch{return!1}}async function we(e,o){let t={...o,cache:o?.cache??"no-store"};return Ue(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,t):fetch(e,t)}function Be(e){return e==="https:"?443:80}function De(e){let o=e.pathname||"/";return(o==="/"||o==="")&&!e.search&&!e.hash}async function ve(e,o){let t=e.replace(/\/+$/,"");try{let n=await we(`${t}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},a=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(a||s.name)return{bundleUrl:de(a||`${t}${q}`),port:o,framework:Oe(a,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await we(`${t}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${t}${q}`,port:o,framework:"metro"}}catch{}return null}async function be(e){return ve(ye("http:","localhost",e),e)}async function Se(e){let o=e.trim();if(/^\d+$/.test(o)){let i=parseInt(o,10),l=await be(i);if(l)return l;let c=3;for(let d=1;d<=c;d++){let m=await be(i+d);if(m)return m}throw he(`localhost:${i} (also scanned +1..+${c})`)}let t=o.startsWith("http")?o:`http://${o}`,n;try{n=new URL(t)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):Be(r),a=ye(r,n.hostname,s);if(De(n)){let i=await ve(a,s);if(i)return i;throw he(a)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function vt(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim install-desktop"),console.error(""),console.error(" or wire sootsim into your own project so your dev server hosts the bridge:"),console.error(" sootsim setup-repo"),console.error("")}function $e(e){let o=M();if(console.log(` note: no sootsim bridge detected on port ${e}`),o){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function Le(e){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${e}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function St(e,o,t){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){Le(o);return}console.error(` no sim with id "${t}" is connected to the bridge on port ${o}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState,r.userVisible===!1?"hidden":r.userVisible===!0?"visible":null,r.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var Ne=12e4,Ie=500,Fe=5e3,He={rn:"/rn",connectrn:"/rn","connect-rn":"/rn",clock:"/app/clock","native-ui":"/app/native-ui",tamagui:"/app/tamagui",settings:"/app/settings",photos:"/app/photos",camera:"/app/camera"};function S(e){return new Promise(o=>setTimeout(o,e))}function xe(e){let o=process.env[e]?.trim();if(!o)return null;let t=Number(o);return Number.isInteger(t)&&t>0?t:null}function Ke(){let e=xe("SOOTSIM_DRIVER_CONNECT_TIMEOUT_MS")??xe("SOOTSIM_PW_CONNECT_TIMEOUT_MS")??Ne;return{timeoutMs:e,hostTimeoutMs:e+Fe,intervalMs:Ie,attempts:Math.max(1,Math.ceil(e/Ie))}}function We(e){return e==="chromium"||e==="electron"||e==="playwright"||e==="system"}function N(e){return e.trim()}function X(e){try{let o=new URL(e),t=o.pathname.replace(/\/+$/,"")||"/";return o.searchParams.has("open")||o.searchParams.has("port")||o.searchParams.has("bundle")||o.searchParams.has("demo")||o.pathname.includes("/sootsim/index.html")||t==="/sootsim"||o.pathname==="/__soot"||o.pathname==="/__soot/"||t==="/rn"||/^\/rn\/[^/]+$/i.test(t)||/^\/app\/[^/]+$/i.test(t)||t==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(t)||/^\/__soot\/app\/[^/]+$/i.test(t)}catch{return!1}}function ze(e){try{let o=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(o)||/^\/build\/.+/.test(o)}catch{return!1}}async function Ht(e){let o=N(e);return(await Te(o)).bundleUrl}function je(e){try{let o=new URL(e.startsWith("http")?e:`http://${e}`),t=o.pathname||"/";if(t!=="/"&&t!==""||o.search||o.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(o.hostname))return null;let n=o.port?Number(o.port):o.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function Te(e){let o=N(e),t=/^\d+$/.test(o)?Number(o):je(o);if(t&&t>0){let n=await me(t);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return Se(o)}function Z(e){let o=e.replace(/\/+$/,"")||"/";return o==="/__soot"||o.startsWith("/__soot/")?"/__soot":""}function qe(e,o){let t=N(e),n=new URL(o),r=Z(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(t)?n.pathname=`${r}/rn/${t}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",t)),n.toString()}function Ve(e){let o=N(e);return/^\d+$/.test(o)||/^https?:\/\//i.test(o)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(o)}async function Ge(e,o){let t=await Te(e),n=new URL(o),r=Z(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.set("bundle",t.bundleUrl),n.toString()}function Je(e){return e.startsWith("~/")?P.join(Ae.homedir(),e.slice(2)):P.isAbsolute(e)?e:P.resolve(process.cwd(),e)}function Qe(e){let o={};for(let t=0;t<e.length;t++){if(e[t]!=="--replace")continue;let n=e[t+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let s=n.slice(0,r).trim(),a=Je(n.slice(r+1).trim());Y.existsSync(a)||(console.error(` sootsim open: replacement file not found: ${a}`),process.exit(1)),o[s]={file:a},t++}return Object.keys(o).length>0?{modules:o}:void 0}function Me(){let e=re();return se(e)&&e.runtimePort>0?`http://localhost:${e.runtimePort}/`:ie}async function Xe(e){try{let o=new URL(e),t=o.searchParams.get("bundle")||"";if(!t)return e;let n=process.env.SOOT_REPO_DIR||await fe(t)||void 0,r=pe({bundleUrl:t,repoDir:n});if(r.length===0)return e;let s=await Ye(r);return s.length===0?e:(o.searchParams.set("appFonts",ge(s)),o.toString())}catch{return e}}async function Ye(e){let o=await Promise.all(e.map(async n=>{let r=new AbortController,s=setTimeout(()=>r.abort(),1500);try{let a=await fetch(n.url,{method:"HEAD",signal:r.signal});return a.status>=200&&a.status<400?n:null}catch{return null}finally{clearTimeout(s)}})),t=[];for(let n of o)n!==null&&t.push(n);return t}async function Ze(e,o){if(!e)return new URL(o).toString();if(X(e))return new URL(e).toString();let t=He[e.toLowerCase()];if(t){let n=new URL(o),r=Z(n.pathname);return n.pathname=`${r}${t}`,n.toString()}return Ve(e)?Ge(e,o):qe(e,o)}async function A(e,o=Me()){let t=await Ze(e,o);return Xe(t)}function Pe(e,o){let t=e?.url||e?.origin||o;try{let n=new URL(t);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.searchParams.delete("appFonts"),n.toString()}catch{return o}}async function et(e,o,t){let n=new URL(await A(e,o));return n.searchParams.set("inspectOpen",t),n.toString()}async function tt(e,o,t,n={}){let r=n.attempts??30,s=n.intervalMs??500,a=n.minNodeCount??10;for(let i=0;i<r;i++){let l=v(e,{commandTimeoutMs:o,simId:t,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>a)return{bridge:l,count:c}}catch{}l.close(),await S(s)}return null}function ot(e){if(!e)return null;try{let o=new URL(e);if(o.searchParams.has("bundle")){let t=o.searchParams.get("bundle")||"";try{let n=new URL(t),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return o.searchParams.has("port")?`connect :${o.searchParams.get("port")||""}`:o.searchParams.has("open")?`connect ${o.searchParams.get("open")||""}`:o.searchParams.has("demo")?`demo ${o.searchParams.get("demo")||"default"}`:o.pathname.includes("/sootsim/index.html")||o.pathname==="/sootsim/"||o.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function nt(e){let o=e.indexOf(":");if(o<=0)return e.length>24?`${e.slice(0,21)}\u2026`:e;let t=e.slice(0,o),n=e.slice(o+1),r=n.length>12?`${n.slice(0,8)}\u2026`:n;return t==="CLAUDE_CODE_SESSION_ID"||t==="CODEX_THREAD_ID"?`agent ${r}`:`${t} ${r}`}function rt(e,o){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as D,b as q,c as de,e as me}from"./chunk-27SE7NM3.js";import{m as B}from"./chunk-2MMSLN4J.js";import{m as le,o as ce}from"./chunk-2OLYZLVT.js";import{a as pe,b as fe,c as ge}from"./chunk-LHXYIEZM.js";import{b as ae,c as I,d as v,e as x}from"./chunk-AK7USIKQ.js";import{g as G}from"./chunk-NJ3435S4.js";import{a as M,b as V}from"./chunk-BBIGYURM.js";import{c as ue}from"./chunk-E2BIG4B3.js";import{d as j}from"./chunk-G6DP2CFJ.js";import{d as k,e as w,f as T}from"./chunk-5X6X5LES.js";import{a as ie}from"./chunk-OXWCMDNR.js";import{G as re,H as se}from"./chunk-R677VUUU.js";import Y from"node:fs";import Ae from"node:os";import P from"node:path";function Re(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function J(e){let o=Re(e);return o==="localhost"||o.endsWith(".localhost")||o==="0.0.0.0"||o==="::1"||/^127(?:\.\d{1,3}){3}$/.test(o)}function he(e){return new Error(`could not resolve a native bundle for ${e}. pass an explicit bundle URL or open Connect and choose the app there.`)}function Oe(e,o){return e?.includes("/one/metro-entry.bundle")?"one":typeof o=="string"&&o?"expo":"unknown"}function ye(e,o,t){return`${e}//${o}:${t}`}function Ue(e){if(typeof window>"u")return!1;try{let o=new URL(e);return J(o.hostname)&&J(window.location.hostname)&&o.origin!==window.location.origin}catch{return!1}}async function we(e,o){let t={...o,cache:o?.cache??"no-store"};return Ue(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,t):fetch(e,t)}function Be(e){return e==="https:"?443:80}function De(e){let o=e.pathname||"/";return(o==="/"||o==="")&&!e.search&&!e.hash}async function ve(e,o){let t=e.replace(/\/+$/,"");try{let n=await we(`${t}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},a=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(a||s.name)return{bundleUrl:de(a||`${t}${q}`),port:o,framework:Oe(a,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await we(`${t}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${t}${q}`,port:o,framework:"metro"}}catch{}return null}async function be(e){return ve(ye("http:","localhost",e),e)}async function Se(e){let o=e.trim();if(/^\d+$/.test(o)){let i=parseInt(o,10),l=await be(i);if(l)return l;let c=3;for(let d=1;d<=c;d++){let m=await be(i+d);if(m)return m}throw he(`localhost:${i} (also scanned +1..+${c})`)}let t=o.startsWith("http")?o:`http://${o}`,n;try{n=new URL(t)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):Be(r),a=ye(r,n.hostname,s);if(De(n)){let i=await ve(a,s);if(i)return i;throw he(a)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function vt(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim install-desktop"),console.error(""),console.error(" or wire sootsim into your own project so your dev server hosts the bridge:"),console.error(" sootsim setup-repo"),console.error("")}function $e(e){let o=M();if(console.log(` note: no sootsim bridge detected on port ${e}`),o){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function Le(e){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${e}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function St(e,o,t){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){Le(o);return}console.error(` no sim with id "${t}" is connected to the bridge on port ${o}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState,r.userVisible===!1?"hidden":r.userVisible===!0?"visible":null,r.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var Ne=12e4,Ie=500,Fe=5e3,He={rn:"/rn",connectrn:"/rn","connect-rn":"/rn",clock:"/app/clock","native-ui":"/app/native-ui",tamagui:"/app/tamagui",settings:"/app/settings",photos:"/app/photos",camera:"/app/camera"};function S(e){return new Promise(o=>setTimeout(o,e))}function xe(e){let o=process.env[e]?.trim();if(!o)return null;let t=Number(o);return Number.isInteger(t)&&t>0?t:null}function Ke(){let e=xe("SOOTSIM_DRIVER_CONNECT_TIMEOUT_MS")??xe("SOOTSIM_PW_CONNECT_TIMEOUT_MS")??Ne;return{timeoutMs:e,hostTimeoutMs:e+Fe,intervalMs:Ie,attempts:Math.max(1,Math.ceil(e/Ie))}}function We(e){return e==="chromium"||e==="electron"||e==="playwright"||e==="system"}function N(e){return e.trim()}function X(e){try{let o=new URL(e),t=o.pathname.replace(/\/+$/,"")||"/";return o.searchParams.has("open")||o.searchParams.has("port")||o.searchParams.has("bundle")||o.searchParams.has("demo")||o.pathname.includes("/sootsim/index.html")||t==="/sootsim"||o.pathname==="/__soot"||o.pathname==="/__soot/"||t==="/rn"||/^\/rn\/[^/]+$/i.test(t)||/^\/app\/[^/]+$/i.test(t)||t==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(t)||/^\/__soot\/app\/[^/]+$/i.test(t)}catch{return!1}}function ze(e){try{let o=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(o)||/^\/build\/.+/.test(o)}catch{return!1}}async function Ht(e){let o=N(e);return(await Te(o)).bundleUrl}function je(e){try{let o=new URL(e.startsWith("http")?e:`http://${e}`),t=o.pathname||"/";if(t!=="/"&&t!==""||o.search||o.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(o.hostname))return null;let n=o.port?Number(o.port):o.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function Te(e){let o=N(e),t=/^\d+$/.test(o)?Number(o):je(o);if(t&&t>0){let n=await me(t);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return Se(o)}function Z(e){let o=e.replace(/\/+$/,"")||"/";return o==="/__soot"||o.startsWith("/__soot/")?"/__soot":""}function qe(e,o){let t=N(e),n=new URL(o),r=Z(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(t)?n.pathname=`${r}/rn/${t}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",t)),n.toString()}function Ve(e){let o=N(e);return/^\d+$/.test(o)||/^https?:\/\//i.test(o)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(o)}async function Ge(e,o){let t=await Te(e),n=new URL(o),r=Z(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.set("bundle",t.bundleUrl),n.toString()}function Je(e){return e.startsWith("~/")?P.join(Ae.homedir(),e.slice(2)):P.isAbsolute(e)?e:P.resolve(process.cwd(),e)}function Qe(e){let o={};for(let t=0;t<e.length;t++){if(e[t]!=="--replace")continue;let n=e[t+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let s=n.slice(0,r).trim(),a=Je(n.slice(r+1).trim());Y.existsSync(a)||(console.error(` sootsim open: replacement file not found: ${a}`),process.exit(1)),o[s]={file:a},t++}return Object.keys(o).length>0?{modules:o}:void 0}function Me(){let e=re();return se(e)&&e.runtimePort>0?`http://localhost:${e.runtimePort}/`:ie}async function Xe(e){try{let o=new URL(e),t=o.searchParams.get("bundle")||"";if(!t)return e;let n=process.env.SOOT_REPO_DIR||await fe(t)||void 0,r=pe({bundleUrl:t,repoDir:n});if(r.length===0)return e;let s=await Ye(r);return s.length===0?e:(o.searchParams.set("appFonts",ge(s)),o.toString())}catch{return e}}async function Ye(e){let o=await Promise.all(e.map(async n=>{let r=new AbortController,s=setTimeout(()=>r.abort(),1500);try{let a=await fetch(n.url,{method:"HEAD",signal:r.signal});return a.status>=200&&a.status<400?n:null}catch{return null}finally{clearTimeout(s)}})),t=[];for(let n of o)n!==null&&t.push(n);return t}async function Ze(e,o){if(!e)return new URL(o).toString();if(X(e))return new URL(e).toString();let t=He[e.toLowerCase()];if(t){let n=new URL(o),r=Z(n.pathname);return n.pathname=`${r}${t}`,n.toString()}return Ve(e)?Ge(e,o):qe(e,o)}async function A(e,o=Me()){let t=await Ze(e,o);return Xe(t)}function Pe(e,o){let t=e?.url||e?.origin||o;try{let n=new URL(t);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.searchParams.delete("appFonts"),n.toString()}catch{return o}}async function et(e,o,t){let n=new URL(await A(e,o));return n.searchParams.set("inspectOpen",t),n.toString()}async function tt(e,o,t,n={}){let r=n.attempts??30,s=n.intervalMs??500,a=n.minNodeCount??10;for(let i=0;i<r;i++){let l=v(e,{commandTimeoutMs:o,simId:t,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>a)return{bridge:l,count:c}}catch{}l.close(),await S(s)}return null}function ot(e){if(!e)return null;try{let o=new URL(e);if(o.searchParams.has("bundle")){let t=o.searchParams.get("bundle")||"";try{let n=new URL(t),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return o.searchParams.has("port")?`connect :${o.searchParams.get("port")||""}`:o.searchParams.has("open")?`connect ${o.searchParams.get("open")||""}`:o.searchParams.has("demo")?`demo ${o.searchParams.get("demo")||"default"}`:o.pathname.includes("/sootsim/index.html")||o.pathname==="/sootsim/"||o.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function nt(e){let o=e.indexOf(":");if(o<=0)return e.length>24?`${e.slice(0,21)}\u2026`:e;let t=e.slice(0,o),n=e.slice(o+1),r=n.length>12?`${n.slice(0,8)}\u2026`:n;return t==="CLAUDE_CODE_SESSION_ID"||t==="CODEX_THREAD_ID"?`agent ${r}`:`${t} ${r}`}function rt(e,o){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
3
3
  `);for(let t of e){let n=t.lockedBy&&t.lockExpiresAt?`locked by ${nt(t.lockedBy)} (${Math.max(0,Math.round((t.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[t.isPrimary?"primary":"",t.id===o?"selected":"",t.readyState,t.userVisible===!1?"hidden":t.userVisible===!0?"visible":"",t.attachedCliCount&&t.attachedCliCount>0?"in use":"",t.userFocused?"focused":"",n].filter(Boolean);console.log(` ${t.id}${r.length?` [${r.join(", ")}]`:""}`);let s=ot(t.url);if(s)console.log(` loaded: ${s}`);else if(t.url){let i=t.url.length>96?`${t.url.slice(0,93)}\u2026`:t.url;console.log(` url: ${i}`)}else t.origin&&console.log(` origin: ${t.origin}`);let a=st(t);a&&console.log(` engine: ${a}`),t.title&&console.log(` title: ${t.title}`),t.visibilityState&&t.visibilityState!=="visible"&&console.log(` visibility: ${t.visibilityState}`),console.log(` connected: ${Ce(Date.now()-t.connectedAt)}`),t.lastActiveAt&&t.lastActiveAt>0&&console.log(` last active: ${Ce(Date.now()-t.lastActiveAt)}`)}}function st(e){let o=e.url||e.origin||"";if(!o)return null;try{let t=new URL(o).port;return t==="5173"?"dev \u2014 local source (:5173)":t==="3000"?"soot app embedded (:3000)":`runtime \u2014 published engine (:${t||"?"})`}catch{return null}}function Ce(e){let o=Math.max(0,Math.round(e/1e3));return o<60?`${o}s ago`:o<3600?`${Math.round(o/60)}m ago`:o<86400?`${Math.round(o/3600)}h ago`:`${Math.round(o/86400)}d ago`}async function L(e,o,t,n={}){let r=n.attempts??30,s=n.intervalMs??500;for(let a=0;a<r;a++){let i=v(e,{commandTimeoutMs:o});try{let c=(await i.listSims()).find(t);if(c)return c}catch{}finally{i.close()}await S(s)}return null}async function it(e,o,t,n={}){let r=n.attempts??20,s=n.intervalMs??250;for(let a=0;a<r;a++){let i=v(e,{commandTimeoutMs:o});try{let c=(await i.listSims()).find(d=>d.id===t);if(!c||c.readyState!=="open")return!0}catch{return!0}finally{i.close()}await S(s)}return!1}function at(e){let o=e.meta;if(!o||o.sootsimHostDriver!=="playwright")return null;let t=Number(o.sootsimHostPid);return!Number.isInteger(t)||t<=1||t===process.pid?null:t}function lt(e){if(!e.connectAckFile)return!1;try{return Y.writeFileSync(e.connectAckFile,`${JSON.stringify({connectedAt:Date.now(),pid:e.pid??null})}
4
4
  `,{flag:"w"}),!0}catch{return!1}}function ct(e){if(e.diagnosticLogPath)try{let o=Y.readFileSync(e.diagnosticLogPath,"utf8").trim();if(!o){console.error(` ${P.basename(e.diagnosticLogPath)} was empty`);return}let t=o.length>4e3?`\u2026
5
5
  ${o.slice(-4e3)}`:o;console.error(` ${P.basename(e.diagnosticLogPath)}:`),console.error(t)}catch(o){let t=o instanceof Error?o.message:String(o);console.error(` failed to read ${P.basename(e.diagnosticLogPath)}: ${t}`)}}function ke(e){try{return process.kill(e,0),!0}catch(o){return o?.code==="EPERM"}}async function dt(e,o=2500){let t=Date.now()+o;for(;Date.now()<t;){if(!ke(e))return!0;await S(100)}return!ke(e)}async function Q(e,o){let t=new Set(o),n=new Set;for(let r of e){if(!t.has(r.id))continue;let s=at(r);s&&n.add(s)}for(let r of n){try{process.kill(r,"SIGTERM")}catch{}if(await dt(r)){console.log(` closed playwright host process ${r}`);continue}try{process.kill(r,"SIGKILL"),console.log(` force-closed playwright host process ${r}`)}catch{}}}function F(e,o){if(o){let r=o.trim(),s=e.find(a=>a.id===r);if(!s)throw new Error(`no sim connected with id ${r}`);return s}let t=e.find(r=>r.isPrimary&&r.readyState==="open");if(t)return t;let n=e.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function _(e,o,t){console.log(` ${t==="current sim"?"loaded":"opened"}: ${e} [${t}]`),console.log(` current sim: ${o.id}`),console.log(JSON.stringify({simId:o.id,url:o.url},null,2))}async function E(e,o,t){if(t.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await mt(e,o,{stableMs:150,maxMs:400});let r=v(e,{commandTimeoutMs:3e3,simId:o,cliLabel:"open --describe",simIdSource:"flag"});try{let s=null;try{s=await r.send({type:"evaluate",code:le})}catch{}if(s&&!(s.flag===!0&&!s.loadingText&&ce(s))){let d=s.loadingText?`still showing "${s.loadingText}"`:s.flag!==!0?"guest ready event has not fired":s.targets<=0?"no visible app content is inspectable yet":"app tree is still stabilizing";console.log(` app still loading: ${d} (nodes: ${s.nodes}, targets: ${s.targets})`),console.log(" before interacting, run: sootsim wait ready --max-ms 120000")}let i=`(async () => {
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-4F2WVZZP.js";import"./chunk-OTSWADHN.js";export{a as getCliVersion};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-KTRDHNPZ.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.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-OTSWADHN.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-HJUVVLLW.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-HJUVVLLW.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-SMWZNE4P.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-SMWZNE4P.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.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-KTRDHNPZ.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.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-OTSWADHN.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:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s}from"./chunk-ZHJP6ENB.js";import"./chunk-27SE7NM3.js";import"./chunk-2MMSLN4J.js";import"./chunk-2OLYZLVT.js";import"./chunk-LHXYIEZM.js";import"./chunk-AK7USIKQ.js";import"./chunk-NJ3435S4.js";import"./chunk-BBIGYURM.js";import"./chunk-NQJEALRY.js";import"./chunk-E2BIG4B3.js";import"./chunk-G6DP2CFJ.js";import"./chunk-5X6X5LES.js";import"./chunk-OXWCMDNR.js";import"./chunk-4HITITPE.js";import"./chunk-R677VUUU.js";import"./chunk-OTSWADHN.js";export{e as buildOpenUrl,d as buildShellUrl,q as closeSimsBulk,r as planBulkCloseTargets,i as playwrightHostPidForSim,g as printConnectedSims,b as resolveBundleTarget,c as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,p as runClaimCommand,s as runCloseCommand,o as runFocusCommand,l as runListCommand,m as runOpenCommand,n as runUseCommand,j as signalDriverLaunchConnected,f as summarizeSimUrl,k as terminatePlaywrightHostsForSims,h as waitForSimMatch};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-KTRDHNPZ.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}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 C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=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:${o}/json/list`)).json()}catch{return T(o),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 :${o}`),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 ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*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),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(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 k(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 T(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 the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),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 k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.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+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-OTSWADHN.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}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 C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=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:${o}/json/list`)).json()}catch{return T(o),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 :${o}`),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 ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*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),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(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 k(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 T(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 the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),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 k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.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+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as _,b as N}from"./chunk-YFCC2KKG.js";import"./chunk-KXSJQP6J.js";import{c as O}from"./chunk-PQZNX54H.js";import"./chunk-EESOIR2B.js";import"./chunk-JOEOYLTY.js";import"./chunk-JUX2JKSR.js";import"./chunk-ZL7STHLD.js";import"./chunk-IA347TKV.js";import"./chunk-FPHJY2YU.js";import"./chunk-WH3M4U2P.js";import{h as I,i as C,q as T,r as w,s as B}from"./chunk-2JTGXU4D.js";import{a as Y}from"./chunk-KTRDHNPZ.js";import{execFileSync as rt,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as S,readFileSync as ot,rmSync as v,writeFileSync as M}from"fs";import{homedir as $}from"os";import{dirname as V,resolve as m}from"path";import{execFileSync as K}from"child_process";import{chmodSync as X,mkdirSync as D,rmSync as Q,writeFileSync as E}from"fs";import{dirname as L}from"path";var z="dev.sootsim.daemon",R="SootSim Daemon",F="0.1.36";function U(t,e,o){let r=w(),n=B(),a=L(L(n)),y=L(n),u=`${a}/Resources`;Q(r,{recursive:!0,force:!0}),D(T(),{recursive:!0}),D(y,{recursive:!0}),D(u,{recursive:!0}),E(`${a}/Info.plist`,J()),E(`${a}/PkgInfo`,"APPL????"),E(n,Z(t,e,o)),X(n,493);try{K("codesign",["--force","--sign","-","--deep",r],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${r} failed: ${d}
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as _,b as N}from"./chunk-NONHFWQS.js";import"./chunk-QMPDHXRG.js";import{c as O}from"./chunk-WTSJ25RM.js";import"./chunk-KRLC6R5H.js";import"./chunk-IV4WDF54.js";import"./chunk-OXWCMDNR.js";import"./chunk-4HITITPE.js";import"./chunk-4F2WVZZP.js";import"./chunk-W77EWJQA.js";import"./chunk-GLBMBO3X.js";import{h as I,i as C,q as T,r as w,s as B}from"./chunk-R677VUUU.js";import{a as Y}from"./chunk-OTSWADHN.js";import{execFileSync as rt,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as S,readFileSync as ot,rmSync as v,writeFileSync as M}from"fs";import{homedir as $}from"os";import{dirname as V,resolve as m}from"path";import{execFileSync as K}from"child_process";import{chmodSync as X,mkdirSync as D,rmSync as Q,writeFileSync as E}from"fs";import{dirname as L}from"path";var z="dev.sootsim.daemon",R="SootSim Daemon",F="0.1.36";function U(t,e,o){let r=w(),n=B(),a=L(L(n)),y=L(n),u=`${a}/Resources`;Q(r,{recursive:!0,force:!0}),D(T(),{recursive:!0}),D(y,{recursive:!0}),D(u,{recursive:!0}),E(`${a}/Info.plist`,J()),E(`${a}/PkgInfo`,"APPL????"),E(n,Z(t,e,o)),X(n,493);try{K("codesign",["--force","--sign","-","--deep",r],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${r} failed: ${d}
3
3
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:r,launcherPath:n}}function J(){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.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{f,m as T}from"./chunk-G6G5LYD3.js";import{I as A,J as D,K as O,L as x,M as v}from"./chunk-TJUPANGE.js";import{c as S,e as $,g as N}from"./chunk-ZV3W66US.js";import"./chunk-GYK5RCAC.js";import"./chunk-ZL7STHLD.js";import"./chunk-2JTGXU4D.js";import"./chunk-KTRDHNPZ.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{f,m as T}from"./chunk-2MMSLN4J.js";import{I as A,J as D,K as O,L as x,M as v}from"./chunk-2OLYZLVT.js";import{c as S,e as $,g as N}from"./chunk-AK7USIKQ.js";import"./chunk-5X6X5LES.js";import"./chunk-4HITITPE.js";import"./chunk-R677VUUU.js";import"./chunk-OTSWADHN.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-4SGHZLMG.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-YAG4RCQP.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.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-J67NC7MV.js";import"./chunk-Q5YWPKAG.js";import"./chunk-X5LIH464.js";import"./chunk-QG4GIDXL.js";import"./chunk-OPWN5ZM7.js";import"./chunk-2IT7O7KQ.js";import"./chunk-I4F7AUP2.js";import"./chunk-KBFPZMXJ.js";import"./chunk-TUZCEXOT.js";import"./chunk-G6G5LYD3.js";import"./chunk-TJUPANGE.js";import"./chunk-LTHY7I3V.js";import"./chunk-ZV3W66US.js";import"./chunk-NQZCZVNZ.js";import"./chunk-A5O2QWEB.js";import"./chunk-66ETIVOD.js";import"./chunk-R7R5HWAT.js";import"./chunk-DCZGWL5K.js";import"./chunk-GYK5RCAC.js";import"./chunk-YFCC2KKG.js";import"./chunk-KXSJQP6J.js";import"./chunk-EESOIR2B.js";import"./chunk-JUX2JKSR.js";import"./chunk-ZL7STHLD.js";import"./chunk-TJLVKZJQ.js";import"./chunk-WH3M4U2P.js";import"./chunk-2JTGXU4D.js";import"./chunk-KTRDHNPZ.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.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-XXNPMLXX.js";import"./chunk-EGWYXC2Z.js";import"./chunk-2YI3QEGS.js";import"./chunk-Z72KJG4K.js";import"./chunk-JQZUUDUN.js";import"./chunk-N3F5BP3M.js";import"./chunk-R5DF7ZN7.js";import"./chunk-ZHJP6ENB.js";import"./chunk-27SE7NM3.js";import"./chunk-2MMSLN4J.js";import"./chunk-2OLYZLVT.js";import"./chunk-LHXYIEZM.js";import"./chunk-AK7USIKQ.js";import"./chunk-NJ3435S4.js";import"./chunk-BBIGYURM.js";import"./chunk-NQJEALRY.js";import"./chunk-E2BIG4B3.js";import"./chunk-G6DP2CFJ.js";import"./chunk-5X6X5LES.js";import"./chunk-NONHFWQS.js";import"./chunk-QMPDHXRG.js";import"./chunk-KRLC6R5H.js";import"./chunk-OXWCMDNR.js";import"./chunk-4HITITPE.js";import"./chunk-CQCMQFKK.js";import"./chunk-GLBMBO3X.js";import"./chunk-R677VUUU.js";import"./chunk-OTSWADHN.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.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-X5LIH464.js";import{c as d,e as l,h as a}from"./chunk-ZV3W66US.js";import"./chunk-GYK5RCAC.js";import"./chunk-EESOIR2B.js";import"./chunk-ZL7STHLD.js";import"./chunk-TJLVKZJQ.js";import{f as c,g as r,h as g}from"./chunk-WH3M4U2P.js";import"./chunk-2JTGXU4D.js";import"./chunk-KTRDHNPZ.js";function h(){console.log(`
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-2YI3QEGS.js";import{c as d,e as l,h as a}from"./chunk-AK7USIKQ.js";import"./chunk-5X6X5LES.js";import"./chunk-KRLC6R5H.js";import"./chunk-4HITITPE.js";import"./chunk-CQCMQFKK.js";import{f as c,g as r,h as g}from"./chunk-GLBMBO3X.js";import"./chunk-R677VUUU.js";import"./chunk-OTSWADHN.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.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as E,e as R,h as b}from"./chunk-ZV3W66US.js";import{b as v}from"./chunk-GYK5RCAC.js";import"./chunk-ZL7STHLD.js";import"./chunk-2JTGXU4D.js";import"./chunk-KTRDHNPZ.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.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as E,e as R,h as b}from"./chunk-AK7USIKQ.js";import{b as v}from"./chunk-5X6X5LES.js";import"./chunk-4HITITPE.js";import"./chunk-R677VUUU.js";import"./chunk-OTSWADHN.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.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-LIICOU6Q.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-NJ3435S4.js";import"./chunk-BBIGYURM.js";import"./chunk-NQJEALRY.js";import"./chunk-E2BIG4B3.js";import"./chunk-G6DP2CFJ.js";import"./chunk-5X6X5LES.js";import"./chunk-R677VUUU.js";import"./chunk-OTSWADHN.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.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-DGQN4QFL.js";import"./chunk-VXRIUP2K.js";import{a as v,g as h}from"./chunk-KBFPZMXJ.js";import"./chunk-TUZCEXOT.js";import"./chunk-G6G5LYD3.js";import"./chunk-TJUPANGE.js";import"./chunk-LTHY7I3V.js";import"./chunk-ZV3W66US.js";import{b as f,g as u}from"./chunk-NQZCZVNZ.js";import{a as p}from"./chunk-A5O2QWEB.js";import"./chunk-66ETIVOD.js";import{c as m}from"./chunk-R7R5HWAT.js";import"./chunk-DCZGWL5K.js";import"./chunk-GYK5RCAC.js";import"./chunk-JUX2JKSR.js";import"./chunk-ZL7STHLD.js";import"./chunk-2JTGXU4D.js";import"./chunk-KTRDHNPZ.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.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-JWU65JVV.js";import"./chunk-LIICOU6Q.js";import{a as v,g as h}from"./chunk-ZHJP6ENB.js";import"./chunk-27SE7NM3.js";import"./chunk-2MMSLN4J.js";import"./chunk-2OLYZLVT.js";import"./chunk-LHXYIEZM.js";import"./chunk-AK7USIKQ.js";import{b as f,g as u}from"./chunk-NJ3435S4.js";import{a as p}from"./chunk-BBIGYURM.js";import"./chunk-NQJEALRY.js";import{c as m}from"./chunk-E2BIG4B3.js";import"./chunk-G6DP2CFJ.js";import"./chunk-5X6X5LES.js";import"./chunk-OXWCMDNR.js";import"./chunk-4HITITPE.js";import"./chunk-R677VUUU.js";import"./chunk-OTSWADHN.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-SFPJHT2D.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-2PS3QFFK.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.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as d,c as e,d as f}from"./chunk-XXNPMLXX.js";import"./chunk-EGWYXC2Z.js";import"./chunk-2YI3QEGS.js";import"./chunk-Z72KJG4K.js";import"./chunk-JQZUUDUN.js";import"./chunk-N3F5BP3M.js";import{d as a,e as b}from"./chunk-R5DF7ZN7.js";import"./chunk-ZHJP6ENB.js";import"./chunk-27SE7NM3.js";import"./chunk-2MMSLN4J.js";import"./chunk-2OLYZLVT.js";import"./chunk-LHXYIEZM.js";import"./chunk-AK7USIKQ.js";import"./chunk-NJ3435S4.js";import"./chunk-BBIGYURM.js";import"./chunk-NQJEALRY.js";import"./chunk-E2BIG4B3.js";import"./chunk-G6DP2CFJ.js";import"./chunk-5X6X5LES.js";import"./chunk-NONHFWQS.js";import"./chunk-QMPDHXRG.js";import"./chunk-KRLC6R5H.js";import"./chunk-OXWCMDNR.js";import"./chunk-4HITITPE.js";import"./chunk-CQCMQFKK.js";import"./chunk-GLBMBO3X.js";import"./chunk-R677VUUU.js";import"./chunk-OTSWADHN.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.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-WTSJ25RM.js";import"./chunk-KRLC6R5H.js";import"./chunk-IV4WDF54.js";import"./chunk-OXWCMDNR.js";import"./chunk-4HITITPE.js";import"./chunk-4F2WVZZP.js";import"./chunk-W77EWJQA.js";import"./chunk-GLBMBO3X.js";import"./chunk-R677VUUU.js";import"./chunk-OTSWADHN.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-5GVG37QH.js";import"./chunk-GYK5RCAC.js";import"./chunk-KTRDHNPZ.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.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-MJH6XTIY.js";import"./chunk-5X6X5LES.js";import"./chunk-OTSWADHN.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.124 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,J,K,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-2JTGXU4D.js";import"./chunk-KTRDHNPZ.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,F as activeRuntimeDir,l as activeRuntimeFile,t as cacheDir,J as claimDaemonLockfile,E as compareSemver,v as configFilePath,r as daemonAppBundlePath,q as daemonAppDir,s as daemonAppLauncherPath,u as daemonLockfilePath,m as electronDir,n as electronUserDataDir,o as electronVersionDir,A as ensureSootsimHome,H as isDaemonLockfileFresh,h as isDevWorkstation,g as isSootsimDevCheckout,D as listInstalledRuntimes,p as profilesDir,B as readActiveRuntime,G as readDaemonLockfile,w as readSharedConfig,y as readTelemetryEnabled,K as removeDaemonLockfile,k as runtimeDir,j as runtimesDir,i as shouldSkipPersistentDaemon,f as sootsimHomeDir,C as writeActiveRuntime,I as writeDaemonLockfile,x as writeSharedConfig,z as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.126 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,J,K,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-R677VUUU.js";import"./chunk-OTSWADHN.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,F as activeRuntimeDir,l as activeRuntimeFile,t as cacheDir,J as claimDaemonLockfile,E as compareSemver,v as configFilePath,r as daemonAppBundlePath,q as daemonAppDir,s as daemonAppLauncherPath,u as daemonLockfilePath,m as electronDir,n as electronUserDataDir,o as electronVersionDir,A as ensureSootsimHome,H as isDaemonLockfileFresh,h as isDevWorkstation,g as isSootsimDevCheckout,D as listInstalledRuntimes,p as profilesDir,B as readActiveRuntime,G as readDaemonLockfile,w as readSharedConfig,y as readTelemetryEnabled,K as removeDaemonLockfile,k as runtimeDir,j as runtimesDir,i as shouldSkipPersistentDaemon,f as sootsimHomeDir,C as writeActiveRuntime,I as writeDaemonLockfile,x as writeSharedConfig,z as writeTelemetryEnabled};