sootsim 0.1.182 → 0.1.184

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 (155) hide show
  1. package/README.md +23 -18
  2. package/dist-cli/bin.js +6 -6
  3. package/dist-cli/chunks/{agent-JVF4KRD5.js → agent-KSX5D27X.js} +2 -2
  4. package/dist-cli/chunks/{agent-wrapper-4ZCPWILQ.js → agent-wrapper-MS6TJF5Y.js} +2 -2
  5. package/dist-cli/chunks/{app-fonts-7MTZNQJN.js → app-fonts-HHN6X2VJ.js} +2 -2
  6. package/dist-cli/chunks/{assert-QUII5KZD.js → assert-XHVSQZOE.js} +2 -2
  7. package/dist-cli/chunks/beta-JS4JTDFC.js +2 -0
  8. package/dist-cli/chunks/{camera-6OPDZY3P.js → camera-7L7D4XUO.js} +2 -2
  9. package/dist-cli/chunks/chunk-3KK3YZQ3.js +62 -0
  10. package/dist-cli/chunks/{chunk-6UEE5SGS.js → chunk-3S5BOWO5.js} +1 -1
  11. package/dist-cli/chunks/{chunk-NAZ6A4UL.js → chunk-53KKDNCU.js} +1 -1
  12. package/dist-cli/chunks/{chunk-PP7PACYK.js → chunk-6GC57KRY.js} +2 -2
  13. package/dist-cli/chunks/{chunk-UPXGNI3W.js → chunk-6MPD3QXA.js} +1 -1
  14. package/dist-cli/chunks/{chunk-TM22UZS6.js → chunk-7C6RC3BU.js} +2 -2
  15. package/dist-cli/chunks/{chunk-RYITW4MR.js → chunk-7DHLNDOA.js} +1 -1
  16. package/dist-cli/chunks/{chunk-RQO5HYDO.js → chunk-7DKGX746.js} +2 -2
  17. package/dist-cli/chunks/{chunk-E7COXON3.js → chunk-AKQWG57K.js} +2 -2
  18. package/dist-cli/chunks/chunk-BB432MX4.js +1 -0
  19. package/dist-cli/chunks/{chunk-KTBP6IDE.js → chunk-C3WRMMUM.js} +2 -2
  20. package/dist-cli/chunks/{chunk-S2RJCI3F.js → chunk-FAB5CDE7.js} +3 -3
  21. package/dist-cli/chunks/{chunk-7VU3YG3I.js → chunk-FD4BKULK.js} +2 -2
  22. package/dist-cli/chunks/{chunk-6BSBIS6H.js → chunk-ID25RWPE.js} +1 -1
  23. package/dist-cli/chunks/{chunk-QOOBQ6HM.js → chunk-IG7F7DTQ.js} +1 -1
  24. package/dist-cli/chunks/{chunk-UNQ4TTPS.js → chunk-IHH3JCV5.js} +1 -1
  25. package/dist-cli/chunks/{chunk-K5XREVFN.js → chunk-IZMNFZXZ.js} +1 -1
  26. package/dist-cli/chunks/{chunk-4J2BNSK5.js → chunk-JFCJIRX6.js} +1 -1
  27. package/dist-cli/chunks/{chunk-DHALDKJR.js → chunk-M6RZYHFK.js} +2 -2
  28. package/dist-cli/chunks/chunk-MFL73VJG.js +2 -0
  29. package/dist-cli/chunks/{chunk-KNMWUV5H.js → chunk-MXXD5U6B.js} +2 -2
  30. package/dist-cli/chunks/{chunk-Q75UTFKH.js → chunk-N5LA5G7V.js} +2 -2
  31. package/dist-cli/chunks/{chunk-Q663VZYT.js → chunk-NBF2SXAH.js} +4 -4
  32. package/dist-cli/chunks/{chunk-2CLPGOAC.js → chunk-NWNFGZSI.js} +2 -2
  33. package/dist-cli/chunks/{chunk-U3O67O6Z.js → chunk-OGLOOKK6.js} +1 -1
  34. package/dist-cli/chunks/{chunk-RCRWF4N5.js → chunk-Q2S6VBXK.js} +1 -1
  35. package/dist-cli/chunks/{chunk-GGIATYOM.js → chunk-Q6EHTP4Q.js} +1 -1
  36. package/dist-cli/chunks/{chunk-NIWZJV5W.js → chunk-QQ4JDVR6.js} +2 -2
  37. package/dist-cli/chunks/{chunk-XHHL3CXD.js → chunk-QZW44BMW.js} +1 -1
  38. package/dist-cli/chunks/{chunk-ZOPFNFMP.js → chunk-S5XWFD5C.js} +2 -2
  39. package/dist-cli/chunks/{chunk-LSVJ3NND.js → chunk-T4XAQ7VQ.js} +2 -2
  40. package/dist-cli/chunks/{chunk-YOV2FYD5.js → chunk-T5YWTSGG.js} +2 -2
  41. package/dist-cli/chunks/{chunk-ENBC2CBL.js → chunk-U636Z2JZ.js} +2 -2
  42. package/dist-cli/chunks/{chunk-BI3LQWFJ.js → chunk-V36X7TNR.js} +1 -1
  43. package/dist-cli/chunks/chunk-VGTPGXKM.js +1 -0
  44. package/dist-cli/chunks/chunk-VVACMCCE.js +118 -0
  45. package/dist-cli/chunks/{chunk-5NWXOIKZ.js → chunk-WAZCQ5UO.js} +3 -3
  46. package/dist-cli/chunks/{chunk-QE5SNIDX.js → chunk-WDMIABUY.js} +30 -30
  47. package/dist-cli/chunks/chunk-WLDAMCQK.js +13 -0
  48. package/dist-cli/chunks/{chunk-LMP3GS2H.js → chunk-WMLFWLD7.js} +1 -1
  49. package/dist-cli/chunks/{chunk-USRV336W.js → chunk-WNUF6LJX.js} +2 -2
  50. package/dist-cli/chunks/{chunk-HVCUXVTL.js → chunk-WSN7MF4E.js} +2 -2
  51. package/dist-cli/chunks/{chunk-MWREISAE.js → chunk-XSWATK6S.js} +2 -2
  52. package/dist-cli/chunks/{chunk-J4G763OR.js → chunk-YQNX7JK6.js} +2 -2
  53. package/dist-cli/chunks/{chunk-YBJAGDCL.js → chunk-YYS2ITHH.js} +1 -1
  54. package/dist-cli/chunks/cli-version-L6NDSEVW.js +2 -0
  55. package/dist-cli/chunks/{compat-X3LHC4W2.js → compat-EGXOXW5F.js} +3 -3
  56. package/dist-cli/chunks/control-LUH3EQQG.js +2 -0
  57. package/dist-cli/chunks/{cpu-profile-LIQOLCAT.js → cpu-profile-7LF5VVWE.js} +2 -2
  58. package/dist-cli/chunks/daemon-NGDXMG6R.js +2 -0
  59. package/dist-cli/chunks/{debug-QHYRAXS7.js → debug-3J74TASS.js} +3 -3
  60. package/dist-cli/chunks/{detox-46I6X6WF.js → detox-PHLGST7G.js} +2 -2
  61. package/dist-cli/chunks/{device-OBGFMETI.js → device-CBGLBSS6.js} +2 -2
  62. package/dist-cli/chunks/{diagnose-2LVRWQTE.js → diagnose-BXUHKEVI.js} +2 -2
  63. package/dist-cli/chunks/drivers-QX77DPCG.js +2 -0
  64. package/dist-cli/chunks/{electron-6XS5Z44T.js → electron-UYJPUPAG.js} +4 -3
  65. package/dist-cli/chunks/flow-KDVDRUEN.js +2 -0
  66. package/dist-cli/chunks/help-4L6UVSAZ.js +2 -0
  67. package/dist-cli/chunks/{hints-JPD3DTKW.js → hints-7A4UIZZL.js} +2 -2
  68. package/dist-cli/chunks/{home-paths-64XGV6LX.js → home-paths-THYEF54Y.js} +2 -2
  69. package/dist-cli/chunks/{inspect-AFCVLO3G.js → inspect-QULPTQ5V.js} +13 -13
  70. package/dist-cli/chunks/{install-desktop-PVTWRZ2P.js → install-desktop-X7G7VTBV.js} +4 -4
  71. package/dist-cli/chunks/{keys-LHFQNKA4.js → keys-JLP4YC4T.js} +2 -2
  72. package/dist-cli/chunks/{login-442SXS7W.js → login-VB4HG5WR.js} +4 -4
  73. package/dist-cli/chunks/{logout-QRS2CU5B.js → logout-TIVYUTTD.js} +2 -2
  74. package/dist-cli/chunks/{maestro-33I2FVO2.js → maestro-C2WVLDFM.js} +2 -2
  75. package/dist-cli/chunks/optional-demo-registry-WV2BZJ5T.js +2 -0
  76. package/dist-cli/chunks/{preview-Y4NIE6DT.js → preview-YBV54B2S.js} +2 -2
  77. package/dist-cli/chunks/{profile-6B63XSO4.js → profile-67C256LQ.js} +2 -2
  78. package/dist-cli/chunks/{react-CTZDC5J4.js → react-HJ3WPDNO.js} +2 -2
  79. package/dist-cli/chunks/{record-FCX5NSPY.js → record-FD4QYCBW.js} +2 -2
  80. package/dist-cli/chunks/runtime-BY3EB4G7.js +2 -0
  81. package/dist-cli/chunks/{screenshot-MZU3WMZX.js → screenshot-UTVYF7F4.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-mode-IFIJCGY4.js → screenshot-mode-WPSK6REL.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-DLBGZB3H.js → screenshots-OXRAQXWN.js} +2 -2
  84. package/dist-cli/chunks/{screenshots-capture-XDIENEIZ.js → screenshots-capture-KDNNRKDL.js} +2 -2
  85. package/dist-cli/chunks/{serve-EQROWG7B.js → serve-ZKEXM2U5.js} +2 -2
  86. package/dist-cli/chunks/setup-A5RLMR3I.js +97 -0
  87. package/dist-cli/chunks/{skills-HIYKCNT5.js → skills-FSJFEKNP.js} +2 -2
  88. package/dist-cli/chunks/{slides-YCSSVMRF.js → slides-UU3DFZDY.js} +2 -2
  89. package/dist-cli/chunks/store-TZH6LKFH.js +2 -0
  90. package/dist-cli/chunks/telemetry-AHIQ3SS5.js +2 -0
  91. package/dist-cli/chunks/{telemetry-QYQZR3XG.js → telemetry-TOTJDY6O.js} +2 -2
  92. package/dist-cli/chunks/{test-EA5OUQZJ.js → test-D6T7Z4XS.js} +3 -3
  93. package/dist-cli/chunks/{three-mode-PNIMEW5B.js → three-mode-CAKEPRJQ.js} +2 -2
  94. package/dist-cli/chunks/{timeline-FJRCFCJG.js → timeline-D6NKNKNS.js} +2 -2
  95. package/dist-cli/chunks/upgrade-DBT6E6DD.js +4 -0
  96. package/dist-cli/chunks/upload-JR2B3YT7.js +2 -0
  97. package/dist-cli/chunks/{version-UIBJN43T.js → version-4PLJ73Q3.js} +2 -2
  98. package/dist-cli/chunks/{web-5QNTEXZD.js → web-O6QWIX3V.js} +2 -2
  99. package/dist-cli/chunks/{what-happened-XNHLVLK2.js → what-happened-67DBMM4S.js} +2 -2
  100. package/dist-cli/chunks/{whoami-YSWN3MZU.js → whoami-PSQRCMUL.js} +2 -2
  101. package/dist-lib/agent-daemon-client.cjs +1 -1
  102. package/dist-lib/agent-events.cjs +1 -1
  103. package/dist-lib/agent-sessions.cjs +1 -1
  104. package/dist-lib/attached-projects.cjs +1 -1
  105. package/dist-lib/auth/shared-session.cjs +1 -1
  106. package/dist-lib/backend-origin.cjs +1 -1
  107. package/dist-lib/beta.cjs +1 -1
  108. package/dist-lib/beta.mjs +1 -1
  109. package/dist-lib/bridge-constants.cjs +1 -1
  110. package/dist-lib/cli-constants.cjs +1 -1
  111. package/dist-lib/config.cjs +1 -1
  112. package/dist-lib/detox/index.cjs +1 -1
  113. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  114. package/dist-lib/home-paths.cjs +1 -1
  115. package/dist-lib/host/bridge-host.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  117. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  118. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  119. package/dist-lib/host/websocket-proxy.cjs +1 -1
  120. package/dist-lib/index.cjs +1 -1
  121. package/dist-lib/jump-to-source-babel.cjs +1 -1
  122. package/dist-lib/menu.cjs +1 -1
  123. package/dist-lib/menu.mjs +1 -1
  124. package/dist-lib/metro.cjs +1 -1
  125. package/dist-lib/profiles.cjs +1 -1
  126. package/dist-lib/render-mode.cjs +1 -1
  127. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  128. package/dist-lib/sdk.cjs +1 -1
  129. package/dist-lib/sdk.mjs +1 -1
  130. package/dist-lib/skills.cjs +29 -7
  131. package/dist-lib/vite.cjs +1 -1
  132. package/package.json +1 -1
  133. package/scripts/postinstall.cjs +1 -1
  134. package/skills/soot.md +3 -2
  135. package/skills/sootsim-setup.md +7 -6
  136. package/dist-cli/chunks/beta-DSVWVBUT.js +0 -2
  137. package/dist-cli/chunks/chunk-5TEBVNSH.js +0 -62
  138. package/dist-cli/chunks/chunk-CWUQZGDS.js +0 -118
  139. package/dist-cli/chunks/chunk-EPYUJWRX.js +0 -13
  140. package/dist-cli/chunks/chunk-GOXGNGTF.js +0 -1
  141. package/dist-cli/chunks/chunk-IKIHQ4RB.js +0 -1
  142. package/dist-cli/chunks/chunk-WTKLDWWH.js +0 -2
  143. package/dist-cli/chunks/cli-version-IHTGZWXG.js +0 -2
  144. package/dist-cli/chunks/control-JO3KISFJ.js +0 -2
  145. package/dist-cli/chunks/daemon-72F26UYR.js +0 -2
  146. package/dist-cli/chunks/drivers-2SW6KTMT.js +0 -2
  147. package/dist-cli/chunks/flow-DYLR2KXX.js +0 -2
  148. package/dist-cli/chunks/help-KHTYNHBI.js +0 -2
  149. package/dist-cli/chunks/optional-demo-registry-674KCCRU.js +0 -2
  150. package/dist-cli/chunks/runtime-OQSESXYD.js +0 -2
  151. package/dist-cli/chunks/setup-4VOKFGMB.js +0 -77
  152. package/dist-cli/chunks/store-MVQYU3TC.js +0 -2
  153. package/dist-cli/chunks/telemetry-RUW7S4RI.js +0 -2
  154. package/dist-cli/chunks/upgrade-52W5H3YL.js +0 -4
  155. package/dist-cli/chunks/upload-BWIBZC7S.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-UNQ4TTPS.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-IHH3JCV5.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-5QNTEXZD.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-5QNTEXZD.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-O6QWIX3V.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-O6QWIX3V.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
 
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u,y as v}from"./chunk-WLDAMCQK.js";import"./chunk-FD4BKULK.js";import"./chunk-7DKGX746.js";import"./chunk-7DHLNDOA.js";import"./chunk-WMLFWLD7.js";import"./chunk-ID25RWPE.js";import"./chunk-YYS2ITHH.js";import"./chunk-7C6RC3BU.js";import"./chunk-AKQWG57K.js";import"./chunk-JFCJIRX6.js";import"./chunk-IZMNFZXZ.js";import"./chunk-WNUF6LJX.js";import"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";export{f as buildOpenUrl,e as buildShellUrl,t as closeSimsBulk,b as normalizeDeepLinkTarget,u as planBulkCloseTargets,k as playwrightHostPidForSim,h as printConnectedSims,c as resolveBundleTarget,d as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,s as runClaimCommand,v as runCloseCommand,r as runFocusCommand,o as runLinkCommand,n as runListCommand,p as runOpenCommand,q as runUseCommand,l as signalDriverLaunchConnected,g as summarizeSimUrl,m as terminatePlaywrightHostsForSims,i as waitForSimMatch,j as waitForSimMatchOrHostExit};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-UNQ4TTPS.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-IHH3JCV5.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};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e}from"./chunk-3KK3YZQ3.js";import"./chunk-YQNX7JK6.js";import"./chunk-N5LA5G7V.js";import"./chunk-NWNFGZSI.js";import"./chunk-S5XWFD5C.js";import"./chunk-T4XAQ7VQ.js";import"./chunk-VVACMCCE.js";import"./chunk-WAZCQ5UO.js";import"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-6MPD3QXA.js";import"./chunk-QZW44BMW.js";import"./chunk-OGLOOKK6.js";import"./chunk-IHH3JCV5.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{f,m as T}from"./chunk-RQO5HYDO.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-RYITW4MR.js";import{c as D,e as O,g as x}from"./chunk-TM22UZS6.js";import"./chunk-RCRWF4N5.js";import"./chunk-BI3LQWFJ.js";import"./chunk-NAZ6A4UL.js";import"./chunk-UNQ4TTPS.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{f,m as T}from"./chunk-7DKGX746.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-7DHLNDOA.js";import{c as D,e as O,g as x}from"./chunk-7C6RC3BU.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.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 x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-AFCVLO3G.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
170
+ })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-QULPTQ5V.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
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 S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
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.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-QE5SNIDX.js";import"./chunk-KTBP6IDE.js";import"./chunk-GOXGNGTF.js";import"./chunk-KNMWUV5H.js";import"./chunk-YOV2FYD5.js";import"./chunk-EPYUJWRX.js";import"./chunk-7VU3YG3I.js";import"./chunk-RQO5HYDO.js";import"./chunk-RYITW4MR.js";import"./chunk-YBJAGDCL.js";import"./chunk-E7COXON3.js";import"./chunk-4J2BNSK5.js";import"./chunk-USRV336W.js";import"./chunk-Q663VZYT.js";import"./chunk-PP7PACYK.js";import"./chunk-LMP3GS2H.js";import"./chunk-6BSBIS6H.js";import"./chunk-TM22UZS6.js";import"./chunk-K5XREVFN.js";import"./chunk-J4G763OR.js";import"./chunk-Q75UTFKH.js";import"./chunk-LSVJ3NND.js";import"./chunk-WTKLDWWH.js";import"./chunk-RCRWF4N5.js";import"./chunk-BI3LQWFJ.js";import"./chunk-NAZ6A4UL.js";import"./chunk-HVCUXVTL.js";import"./chunk-U3O67O6Z.js";import"./chunk-UNQ4TTPS.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-WDMIABUY.js";import"./chunk-C3WRMMUM.js";import"./chunk-VGTPGXKM.js";import"./chunk-MXXD5U6B.js";import"./chunk-NBF2SXAH.js";import"./chunk-6GC57KRY.js";import"./chunk-T5YWTSGG.js";import"./chunk-WLDAMCQK.js";import"./chunk-FD4BKULK.js";import"./chunk-7DKGX746.js";import"./chunk-7DHLNDOA.js";import"./chunk-WMLFWLD7.js";import"./chunk-ID25RWPE.js";import"./chunk-YYS2ITHH.js";import"./chunk-7C6RC3BU.js";import"./chunk-AKQWG57K.js";import"./chunk-JFCJIRX6.js";import"./chunk-IZMNFZXZ.js";import"./chunk-WNUF6LJX.js";import"./chunk-WSN7MF4E.js";import"./chunk-YQNX7JK6.js";import"./chunk-N5LA5G7V.js";import"./chunk-T4XAQ7VQ.js";import"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-OGLOOKK6.js";import"./chunk-IHH3JCV5.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.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-GOXGNGTF.js";import{c as d,e as l,h as a}from"./chunk-TM22UZS6.js";import"./chunk-LSVJ3NND.js";import"./chunk-RCRWF4N5.js";import"./chunk-BI3LQWFJ.js";import"./chunk-NAZ6A4UL.js";import"./chunk-HVCUXVTL.js";import{g as c,h as r,i as g}from"./chunk-U3O67O6Z.js";import"./chunk-UNQ4TTPS.js";function h(){console.log(`
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-VGTPGXKM.js";import{c as d,e as l,h as a}from"./chunk-7C6RC3BU.js";import"./chunk-WSN7MF4E.js";import"./chunk-T4XAQ7VQ.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import{g as c,h as r,i as g}from"./chunk-OGLOOKK6.js";import"./chunk-IHH3JCV5.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.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as E,e as R,h as b}from"./chunk-TM22UZS6.js";import"./chunk-RCRWF4N5.js";import{b as v}from"./chunk-BI3LQWFJ.js";import"./chunk-NAZ6A4UL.js";import"./chunk-UNQ4TTPS.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as E,e as R,h as b}from"./chunk-7C6RC3BU.js";import"./chunk-Q2S6VBXK.js";import{b as v}from"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-BB432MX4.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-AKQWG57K.js";import"./chunk-JFCJIRX6.js";import"./chunk-IZMNFZXZ.js";import"./chunk-WNUF6LJX.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.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.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-QOOBQ6HM.js";import"./chunk-IKIHQ4RB.js";import{a as v,g as h}from"./chunk-EPYUJWRX.js";import"./chunk-7VU3YG3I.js";import"./chunk-RQO5HYDO.js";import"./chunk-RYITW4MR.js";import"./chunk-YBJAGDCL.js";import{b as f,g as u}from"./chunk-E7COXON3.js";import{a as p}from"./chunk-4J2BNSK5.js";import{c as m}from"./chunk-USRV336W.js";import"./chunk-LMP3GS2H.js";import"./chunk-6BSBIS6H.js";import"./chunk-TM22UZS6.js";import"./chunk-K5XREVFN.js";import"./chunk-WTKLDWWH.js";import"./chunk-RCRWF4N5.js";import"./chunk-BI3LQWFJ.js";import"./chunk-NAZ6A4UL.js";import"./chunk-UNQ4TTPS.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as m}from"./chunk-IG7F7DTQ.js";import"./chunk-BB432MX4.js";import{a as h,h as g}from"./chunk-WLDAMCQK.js";import"./chunk-FD4BKULK.js";import"./chunk-7DKGX746.js";import"./chunk-7DHLNDOA.js";import"./chunk-WMLFWLD7.js";import"./chunk-ID25RWPE.js";import"./chunk-YYS2ITHH.js";import"./chunk-7C6RC3BU.js";import{b as u,g as v}from"./chunk-AKQWG57K.js";import{a as p}from"./chunk-JFCJIRX6.js";import"./chunk-IZMNFZXZ.js";import{c as f}from"./chunk-WNUF6LJX.js";import"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.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?g(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,5 @@ 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-PVTWRZ2P.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
+ sootsim electron --driver system
19
+ `),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?f(t).id:void 0,s=i||r.driver,l=u;if(s){let n=v(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(h(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await m("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-X7G7VTBV.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as d,c as e,d as f}from"./chunk-WDMIABUY.js";import"./chunk-C3WRMMUM.js";import"./chunk-VGTPGXKM.js";import"./chunk-MXXD5U6B.js";import"./chunk-NBF2SXAH.js";import"./chunk-6GC57KRY.js";import{c as a,d as b}from"./chunk-T5YWTSGG.js";import"./chunk-WLDAMCQK.js";import"./chunk-FD4BKULK.js";import"./chunk-7DKGX746.js";import"./chunk-7DHLNDOA.js";import"./chunk-WMLFWLD7.js";import"./chunk-ID25RWPE.js";import"./chunk-YYS2ITHH.js";import"./chunk-7C6RC3BU.js";import"./chunk-AKQWG57K.js";import"./chunk-JFCJIRX6.js";import"./chunk-IZMNFZXZ.js";import"./chunk-WNUF6LJX.js";import"./chunk-WSN7MF4E.js";import"./chunk-YQNX7JK6.js";import"./chunk-N5LA5G7V.js";import"./chunk-T4XAQ7VQ.js";import"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-OGLOOKK6.js";import"./chunk-IHH3JCV5.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-NWNFGZSI.js";import"./chunk-S5XWFD5C.js";import"./chunk-T4XAQ7VQ.js";import"./chunk-VVACMCCE.js";import"./chunk-WAZCQ5UO.js";import"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-6MPD3QXA.js";import"./chunk-QZW44BMW.js";import"./chunk-OGLOOKK6.js";import"./chunk-IHH3JCV5.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-5NWXOIKZ.js";import"./chunk-BI3LQWFJ.js";import"./chunk-UNQ4TTPS.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.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-WAZCQ5UO.js";import"./chunk-V36X7TNR.js";import"./chunk-IHH3JCV5.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.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,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-NAZ6A4UL.js";import"./chunk-UNQ4TTPS.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,H as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,O as claimDaemonLockfile,G as compareSemver,x as configFilePath,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,C as ensureSootsimHome,K as isDaemonLockfileFresh,L as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,F as listInstalledRuntimes,q as profilesDir,D as readActiveRuntime,I as readDaemonLockfile,J as readDevBridgeLockfile,y as readSharedConfig,A as readTelemetryEnabled,P as removeDaemonLockfile,Q as removeDevBridgeLockfile,l as runtimeDir,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,E as writeActiveRuntime,M as writeDaemonLockfile,N as writeDevBridgeLockfile,z as writeSharedConfig,B as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,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-53KKDNCU.js";import"./chunk-IHH3JCV5.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,H as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,O as claimDaemonLockfile,G as compareSemver,x as configFilePath,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,C as ensureSootsimHome,K as isDaemonLockfileFresh,L as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,F as listInstalledRuntimes,q as profilesDir,D as readActiveRuntime,I as readDaemonLockfile,J as readDevBridgeLockfile,y as readSharedConfig,A as readTelemetryEnabled,P as removeDaemonLockfile,Q as removeDevBridgeLockfile,l as runtimeDir,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,E as writeActiveRuntime,M as writeDaemonLockfile,N as writeDevBridgeLockfile,z as writeSharedConfig,B as writeTelemetryEnabled};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as Mt,b as It}from"./chunk-GGIATYOM.js";import{a as Re,g as Ie,j as oe}from"./chunk-YOV2FYD5.js";import{b as Nt,c as Ft,j as _t}from"./chunk-EPYUJWRX.js";import"./chunk-7VU3YG3I.js";import{a as te,b as A,c as E,d as Le,e as ae,f as Y,g as ue,h as ge,i as vt,j as kt,k as Me,l as Tt}from"./chunk-RQO5HYDO.js";import{A as pt,B as ft,E as gt,G as yt,I as de,J as bt,P as ht,a as ve,b as Qe,c as Ze,d as et,e as tt,f as ot,g as st,h as nt,i as rt,j as it,k as De,l as Ce,q as Be,r as at,s as lt,t as fe,u as ct,v as ke,w as je,x as dt,y as ut,z as mt}from"./chunk-RYITW4MR.js";import"./chunk-YBJAGDCL.js";import"./chunk-E7COXON3.js";import"./chunk-4J2BNSK5.js";import"./chunk-USRV336W.js";import"./chunk-LMP3GS2H.js";import"./chunk-6BSBIS6H.js";import{c as wt,e as xt,f as $t,g as St,h as Te}from"./chunk-TM22UZS6.js";import"./chunk-K5XREVFN.js";import{a as Ye}from"./chunk-DHALDKJR.js";import{a as Ee,c as Pe}from"./chunk-CWUQZGDS.js";import{a as X}from"./chunk-5NWXOIKZ.js";import{a as Xe}from"./chunk-WTKLDWWH.js";import"./chunk-RCRWF4N5.js";import{b as Ve}from"./chunk-BI3LQWFJ.js";import"./chunk-NAZ6A4UL.js";import"./chunk-UNQ4TTPS.js";import{existsSync as ho,mkdirSync as wo,readFileSync as xo,rmSync as Ot,writeFileSync as $o}from"fs";import{tmpdir as So}from"os";import{dirname as vo,join as ko,resolve as To}from"path";var ye=1,Mo="SOOTSIM_INSPECT_NOTICE_PATH",Io=300*1e3,No=15e3;function At(){return To(process.env[Mo]||ko(So(),"sootsim-inspect-notice-state.json"))}function Fo(e,a){return Object.fromEntries(Object.entries(e).filter(([,r])=>typeof r?.signature=="string"&&Number.isFinite(r?.updatedAt)&&a-r.updatedAt<=Io))}function _o(e){let a=At();if(!ho(a))return{version:ye,entries:{}};try{let r=JSON.parse(xo(a,"utf8"));return r.version!==ye||!r.entries||typeof r.entries!="object"?(Ot(a,{force:!0}),{version:ye,entries:{}}):{version:ye,entries:Fo(r.entries,e)}}catch{return Ot(a,{force:!0}),{version:ye,entries:{}}}}function Oo(e){let a=At();wo(vo(a),{recursive:!0}),$o(a,JSON.stringify(e,null,2)+`
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as Ft,b as _t}from"./chunk-Q6EHTP4Q.js";import{a as Le,g as Ie,j as oe}from"./chunk-T5YWTSGG.js";import{b as Mt,c as It,k as Nt}from"./chunk-WLDAMCQK.js";import"./chunk-FD4BKULK.js";import{a as te,b as A,c as E,d as je,e as ae,f as Y,g as ue,h as ge,i as vt,j as kt,k as Me,l as Tt}from"./chunk-7DKGX746.js";import{A as pt,B as ft,E as gt,G as yt,I as de,J as bt,P as ht,a as ve,b as Qe,c as Ze,d as et,e as tt,f as ot,g as st,h as nt,i as rt,j as it,k as Re,l as De,q as Ce,r as at,s as lt,t as fe,u as ct,v as ke,w as Be,x as dt,y as ut,z as mt}from"./chunk-7DHLNDOA.js";import"./chunk-WMLFWLD7.js";import"./chunk-ID25RWPE.js";import"./chunk-YYS2ITHH.js";import{c as wt,e as xt,f as $t,g as St,h as Te}from"./chunk-7C6RC3BU.js";import"./chunk-AKQWG57K.js";import"./chunk-JFCJIRX6.js";import"./chunk-IZMNFZXZ.js";import"./chunk-WNUF6LJX.js";import{a as Ye}from"./chunk-M6RZYHFK.js";import{a as Ee,c as Pe}from"./chunk-VVACMCCE.js";import{a as X}from"./chunk-WAZCQ5UO.js";import{a as Xe}from"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import{b as Ve}from"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";import{existsSync as ho,mkdirSync as wo,readFileSync as xo,rmSync as Ot,writeFileSync as $o}from"fs";import{tmpdir as So}from"os";import{dirname as vo,join as ko,resolve as To}from"path";var ye=1,Mo="SOOTSIM_INSPECT_NOTICE_PATH",Io=300*1e3,No=15e3;function At(){return To(process.env[Mo]||ko(So(),"sootsim-inspect-notice-state.json"))}function Fo(e,a){return Object.fromEntries(Object.entries(e).filter(([,r])=>typeof r?.signature=="string"&&Number.isFinite(r?.updatedAt)&&a-r.updatedAt<=Io))}function _o(e){let a=At();if(!ho(a))return{version:ye,entries:{}};try{let r=JSON.parse(xo(a,"utf8"));return r.version!==ye||!r.entries||typeof r.entries!="object"?(Ot(a,{force:!0}),{version:ye,entries:{}}):{version:ye,entries:Fo(r.entries,e)}}catch{return Ot(a,{force:!0}),{version:ye,entries:{}}}}function Oo(e){let a=At();wo(vo(a),{recursive:!0}),$o(a,JSON.stringify(e,null,2)+`
3
3
  `)}function Ao(e,a){let r=a.trim()||"default";return`${e}:${r}`}function Je(e,a,r,l={}){let m=l.nowMs??Date.now(),i=l.cooldownMs??No,g=_o(m),y=Ao(e,a),M=g.entries[y];return M&&M.signature===r&&m-M.updatedAt<i?!1:(g.entries[y]={signature:r,updatedAt:m},Oo(g),!0)}var Eo={initialWaitMs:3e3,deadlineMs:5e3,retryWaitMs:700},Po={initialWaitMs:1200,deadlineMs:2500,retryWaitMs:700};function Ro(e,a={}){return{...e?Eo:Po,...a}}function me(e){return!(!e||e.hit===!1||e.ok===!1||e.pointerTapHandled===!1&&!e.keyboardOpened&&!e.isTextInput)}function Do(e,a){return{id:e.target?.id??e.match?.id??e.node?.id??null,testID:e.target?.testID??e.match?.testID??e.node?.testID??null,text:e.target?.text??e.target?.accessibilityLabel??e.match?.text??e.match?.accessibilityLabel??e.node?.text??a??null,type:e.target?.type??e.match?.type??e.node?.type??null}}async function be(e,a){let r=Ro(!!a.agent,a.timing),l=0,m=null,i=null;try{await oe({bridge:e,maxMs:r.initialWaitMs,pollMs:32,stablePolls:2})}catch{}let g=Date.now()+r.deadlineMs;for(;Date.now()<=g||l===0;){l++;let y=await a.resolve();if(m=y,y?.error==="bridge-not-ready"||y?.ambiguous||y?.nthOutOfRange)return{payload:y,result:null,attempts:l,failure:"special"};if(y&&typeof y.cx=="number"&&typeof y.cy=="number"){let I=await e.send({type:"tap",x:y.cx,y:y.cy,target:Do(y,a.textFallback)});if(i=I,me(I))return{payload:y,result:I,attempts:l}}let M=g-Date.now();if(M<=0)break;try{await oe({bridge:e,maxMs:Math.min(M,r.retryWaitMs),pollMs:32,stablePolls:2})}catch{await new Promise(I=>setTimeout(I,Math.min(120,M)))}}return{payload:m,result:i,attempts:l,failure:m&&typeof m.cx=="number"?"missed":"not-found"}}async function Et(e,a,r,l){return e.send({type:"tap",x:a,y:r,...l?{target:l}:{}})}async function Pt(e,a,r={}){let l=JSON.stringify(a);return be(e,{agent:r.agent,timing:r.timing,resolve:()=>e.send({type:"evaluate",code:`(async () => {
4
4
  const t = window.__sootsimTest
5
5
  if (!t) return null
@@ -202,11 +202,11 @@ import{a as Mt,b as It}from"./chunk-GGIATYOM.js";import{a as Re,g as Ie,j as oe}
202
202
  `)}console.log(Q),ee>0&&console.log(` ${ee} clipped row(s) hidden (omit --no-clipped to see)`);let ie=j||N||B||L;if((j||N||B)&&!y&&X("describe-filter-context"),!ie&&!y&&F.split(`
203
203
  `).length>=80&&X("describe-use-filters"),q&&q.visible){let C=q.spec,ce=[C?.keyboardType?`type=${C.keyboardType}`:null,C?.returnKeyType&&C.returnKeyType!=="default"?`return=${C.returnKeyType}`:null,q.mode!=="letters"?`mode=${q.mode}`:null,q.shifted?"shift":null,q.capsLock?"caps":null,C?.autoCapitalize&&C.autoCapitalize!=="sentences"?`autoCap=${C.autoCapitalize}`:null,q.accessoryBarId?`accessory=${q.accessoryBarId}`:null].filter(Boolean);console.log(`
204
204
  keyboard: ${ce.join(" ")||"visible"}`)}};if(y)for(console.log(` watching... (Ctrl+C to stop)
205
- `);;)console.clear(),await Z(),await te(M);else await Z()}var Co=["SOOTSIM_AGENT","AGENTBUS_SESSION","CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","CURSOR_TRACE_ID","AIDER_MODEL"];function pe(){if(process.env.SOOTSIM_AGENT==="0")return!1;for(let e of Co){let a=process.env[e];if(a&&a.trim()&&a!=="0")return!0}return!1}async function jt(e){let{bridge:a,args:r,effectiveArgs:l,positional:m,inspectUsage:i}=e,g=v=>{let F=l.indexOf(v);return F>=0&&F+1<l.length?l[F+1]:null},y=v=>l.includes(v),M=g("--testid")||g("--test-id"),I=g("--role"),b=g("--type"),T=g("--text"),O=y("--pressable"),N=y("--visible"),P=y("--interactive-targets")||y("--actions"),L=!M&&!I&&!b&&!T&&!O&&!N&&!P?m[1]:null,d=T??L,G=await it(a,{testId:M,role:I,type:b,text:d,pressable:O,visible:N,interactive:P});G||(console.error(i("find","<text> | --text <t> | --testid <id> | --role <r> | --type <t> | --pressable | --visible | --interactive-targets")),process.exit(1));let{mode:j,result:B}=G,Z=A(r),se=r.includes("--verbose")||r.includes("--dump");if(Z)j==="interactive-targets"&&Array.isArray(B)?E(De(B).map(v=>({...v,tap:Ce(v)}))):E(B??null);else if(Array.isArray(B))if(B.length===0){console.log(` no ${j} nodes found`);let v=await a.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()"});typeof v=="number"&&v<10&&X("app-still-loading",v)}else if(j==="interactive-targets"){let v=De(B);console.log(` found ${v.length} interactive target${v.length===1?"":"s"} (sorted by score):`);for(let F of v.slice(0,20)){let W=F.absolutePosition?`@(${Math.round(F.absolutePosition.x)},${Math.round(F.absolutePosition.y)})`:"",q=F.layout?`${Math.round(F.layout.width)}x${Math.round(F.layout.height)}`:"?x?",Q=F.text?` "${F.text.slice(0,30)}"`:"",ee=F.testID?` #${F.testID}`:"",ie=F.accessibilityLabel?` \u24D8"${String(F.accessibilityLabel).slice(0,24)}"`:"",xe=F.accessibilityRole?`[${F.accessibilityRole}]`:F.type,C=Ce(F);console.log(` ${xe}${Q}${ie}${ee} ${q} ${W}`),console.log(` \u2192 ${C}`),se&&console.log(qe(JSON.stringify(F,null,2)," "))}v.length>20&&console.log(` ... and ${v.length-20} more`)}else{console.log(` found ${B.length} node${B.length===1?"":"s"} (${j}):`);for(let v of B.slice(0,20)){let F=v.absolutePosition?`@(${Math.round(v.absolutePosition.x)},${Math.round(v.absolutePosition.y)})`:"",W=v.layout?`${Math.round(v.layout.width)}x${Math.round(v.layout.height)}`:"?x?",q=v.text?` "${v.text.slice(0,30)}"`:"",Q=v.testID?` #${v.testID}`:"",ee=v.pressable?" (tap)":"",ie=v.accessibilityRole?`[${v.accessibilityRole}]`:v.type;console.log(` ${ie}${q}${Q} ${W} ${F}${ee}`),se&&console.log(qe(JSON.stringify(v,null,2)," "))}B.length>20&&console.log(` ... and ${B.length-20} more`)}else if(B==null)console.log(` not found: ${d||M||I||b||""||j}`),M&&X("wait-selector-for-missing-testid",M);else{let v=B;if(v.type&&v.absolutePosition){let F=`@(${Math.round(v.absolutePosition.x)},${Math.round(v.absolutePosition.y)})`,W=v.layout?`${Math.round(v.layout.width)}x${Math.round(v.layout.height)}`:"?x?",q=v.text?` "${v.text.slice(0,40)}"`:"",Q=v.testID?` #${v.testID}`:"",ee=v.pressable?" (tap)":"",ie=v.accessibilityRole?`[${v.accessibilityRole}]`:v.type;console.log(` ${ie}${q}${Q} ${W} ${F}${ee}`),se&&console.log(qe(JSON.stringify(v,null,2)," "))}else console.log(JSON.stringify(B,null,2))}}function qe(e,a){return e.split(`
205
+ `);;)console.clear(),await Z(),await te(M);else await Z()}var Co=["SOOTSIM_AGENT","AGENTBUS_SESSION","CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","CURSOR_TRACE_ID","AIDER_MODEL"];function pe(){if(process.env.SOOTSIM_AGENT==="0")return!1;for(let e of Co){let a=process.env[e];if(a&&a.trim()&&a!=="0")return!0}return!1}async function jt(e){let{bridge:a,args:r,effectiveArgs:l,positional:m,inspectUsage:i}=e,g=v=>{let F=l.indexOf(v);return F>=0&&F+1<l.length?l[F+1]:null},y=v=>l.includes(v),M=g("--testid")||g("--test-id"),I=g("--role"),b=g("--type"),T=g("--text"),O=y("--pressable"),N=y("--visible"),P=y("--interactive-targets")||y("--actions"),L=!M&&!I&&!b&&!T&&!O&&!N&&!P?m[1]:null,d=T??L,G=await it(a,{testId:M,role:I,type:b,text:d,pressable:O,visible:N,interactive:P});G||(console.error(i("find","<text> | --text <t> | --testid <id> | --role <r> | --type <t> | --pressable | --visible | --interactive-targets")),process.exit(1));let{mode:j,result:B}=G,Z=A(r),se=r.includes("--verbose")||r.includes("--dump");if(Z)j==="interactive-targets"&&Array.isArray(B)?E(Re(B).map(v=>({...v,tap:De(v)}))):E(B??null);else if(Array.isArray(B))if(B.length===0){console.log(` no ${j} nodes found`);let v=await a.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()"});typeof v=="number"&&v<10&&X("app-still-loading",v)}else if(j==="interactive-targets"){let v=Re(B);console.log(` found ${v.length} interactive target${v.length===1?"":"s"} (sorted by score):`);for(let F of v.slice(0,20)){let W=F.absolutePosition?`@(${Math.round(F.absolutePosition.x)},${Math.round(F.absolutePosition.y)})`:"",q=F.layout?`${Math.round(F.layout.width)}x${Math.round(F.layout.height)}`:"?x?",Q=F.text?` "${F.text.slice(0,30)}"`:"",ee=F.testID?` #${F.testID}`:"",ie=F.accessibilityLabel?` \u24D8"${String(F.accessibilityLabel).slice(0,24)}"`:"",xe=F.accessibilityRole?`[${F.accessibilityRole}]`:F.type,C=De(F);console.log(` ${xe}${Q}${ie}${ee} ${q} ${W}`),console.log(` \u2192 ${C}`),se&&console.log(qe(JSON.stringify(F,null,2)," "))}v.length>20&&console.log(` ... and ${v.length-20} more`)}else{console.log(` found ${B.length} node${B.length===1?"":"s"} (${j}):`);for(let v of B.slice(0,20)){let F=v.absolutePosition?`@(${Math.round(v.absolutePosition.x)},${Math.round(v.absolutePosition.y)})`:"",W=v.layout?`${Math.round(v.layout.width)}x${Math.round(v.layout.height)}`:"?x?",q=v.text?` "${v.text.slice(0,30)}"`:"",Q=v.testID?` #${v.testID}`:"",ee=v.pressable?" (tap)":"",ie=v.accessibilityRole?`[${v.accessibilityRole}]`:v.type;console.log(` ${ie}${q}${Q} ${W} ${F}${ee}`),se&&console.log(qe(JSON.stringify(v,null,2)," "))}B.length>20&&console.log(` ... and ${B.length-20} more`)}else if(B==null)console.log(` not found: ${d||M||I||b||""||j}`),M&&X("wait-selector-for-missing-testid",M);else{let v=B;if(v.type&&v.absolutePosition){let F=`@(${Math.round(v.absolutePosition.x)},${Math.round(v.absolutePosition.y)})`,W=v.layout?`${Math.round(v.layout.width)}x${Math.round(v.layout.height)}`:"?x?",q=v.text?` "${v.text.slice(0,40)}"`:"",Q=v.testID?` #${v.testID}`:"",ee=v.pressable?" (tap)":"",ie=v.accessibilityRole?`[${v.accessibilityRole}]`:v.type;console.log(` ${ie}${q}${Q} ${W} ${F}${ee}`),se&&console.log(qe(JSON.stringify(v,null,2)," "))}else console.log(JSON.stringify(B,null,2))}}function qe(e,a){return e.split(`
206
206
  `).map(r=>a+r).join(`
207
207
  `)}async function Lt(e){let{bridge:a,args:r}=e,l=A(r);await ue(a,{verbose:!l});let m=r.includes("--styling"),i=await st(a,{styling:m});if(l){E({count:i.length,elements:i});return}console.log(` layout (${i.length} element${i.length===1?"":"s"}):
208
208
  `),console.log(nt(i,{styling:m}))}async function Jt(e,a={}){let r=await yt(e);if("error"in r&&(console.error(r.error),process.exit(1)),a.json){console.log(JSON.stringify(r,null,2));return}let{visible:l,spec:m,mode:i,shifted:g,capsLock:y,accessoryBarId:M}=r,I=[];I.push(`keyboard: ${l?"visible":"hidden"}`),m?(I.push(` type: ${m.keyboardType}`),I.push(` returnKey: ${m.returnKeyType}`),I.push(` autoCap: ${m.autoCapitalize}`),I.push(` autoCorrect: ${m.autoCorrect?"on":"off"}`),I.push(` appearance: ${m.keyboardAppearance}`),m.secureTextEntry&&I.push(" secureTextEntry: true"),m.enablesReturnKeyAutomatically&&I.push(` return: ${m.currentTextIsEmpty?"disabled (empty)":"enabled"}`)):I.push(" spec: <none> (shown via dev-tools with no TextInput)"),I.push(` mode: ${i}${g?" (shifted)":""}${y?" (caps)":""}`),M&&I.push(` accessoryBar: ${M}`),console.log(I.join(`
209
- `))}async function Wt(e){let a=await e.bridge.listSims(),r=e.args.includes("--all"),l=e.args.find((y,M)=>e.args[M-1]==="--bundle"),m=e.args.find((y,M)=>e.args[M-1]==="--app-port"),i=e.args.includes("--primary"),g=a.filter(y=>!(i&&!y.isPrimary||l&&!(y.url??"").includes(l)||m&&!(y.url??"").includes(`/rn/${m}`)||!r&&!l&&!m&&!i&&!(y.url&&(y.url.includes("bundle=")||y.url.includes("/index.bundle")))&&y.id!==e.simId));if(A(e.args)){E(g.map(y=>({...y,active:y.id===e.simId})));return}_t(g,e.simId),g.length<a.length&&!A(e.args)&&console.log(` (${a.length-g.length} more hidden \u2014 pass --all to show)`)}function le(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`}function Ne(e,a){return a<=0?"?":`${(e/a*100).toFixed(0)}%`}async function qt(e,a={args:[]}){let r=await ht(e);if(A(a.args)){E(r);return}if(console.log(" memory:"),r.imageLoader){let l=r.imageLoader;console.log(" image-loader cache"),console.log(` entries: ${l.cacheEntries} / ${l.cacheMaxEntries} (${Ne(l.cacheEntries,l.cacheMaxEntries)})`),console.log(` pixel bytes: ${le(l.cachePixelBytes)} / ${le(l.cachePixelBudget)} (${Ne(l.cachePixelBytes,l.cachePixelBudget)})`),console.log(` pending: ${l.pendingFetches} fetches, ${l.pendingBytes} bytes`),console.log(` failed uris: ${l.failedUris}`),console.log(` snapshots: ${l.snapshots}`),console.log(` live frames: ${l.liveFrames}`)}else console.log(" image-loader cache: not available (engine pre-rebuild?)");if(r.workerHeap){let l=r.workerHeap;console.log(" worker heap (chrome only)"),console.log(` used: ${le(l.usedJSHeapSize)} / ${le(l.jsHeapSizeLimit)} (${Ne(l.usedJSHeapSize,l.jsHeapSizeLimit)})`),console.log(` total: ${le(l.totalJSHeapSize)}`)}if(r.hostHeap){let l=r.hostHeap;console.log(" host heap (chrome only)"),console.log(` used: ${le(l.usedJSHeapSize)} / ${le(l.jsHeapSizeLimit)} (${Ne(l.usedJSHeapSize,l.jsHeapSizeLimit)})`),console.log(` total: ${le(l.totalJSHeapSize)}`)}}var V="<redacted secure text>";function he(e){let a=e?.layout?.spec??e?.spec??null;return!!a?.secureTextEntry&&a.keyboardType!=="visible-password"}function He(e,a){return he(a)?V:e}function Ke(e){if(!e||!he(e))return e;let a=e.focusedInput;return!a||typeof a!="object"?e:{...e,focusedInput:{...a,secureTextEntry:!0,text:typeof a.text=="string"?V:a.text}}}function we(e){let a=e.indexOf("--testid");if(a>=0&&e[a+1])return{mode:"testid",value:e[a+1]};let r=e.indexOf("--test-id");if(r>=0&&e[r+1])return{mode:"testid",value:e[r+1]};let l=e.indexOf("--text");return l>=0&&e[l+1]?{mode:"text",value:e[l+1]}:null}async function Fe(e,a){let r=JSON.stringify(a.value),l=a.mode==="testid"?`(await t.findByTestId(${r})) || (await t.findById(${r}))`:`await t.findByText(${r})`;return await e.send({type:"evaluate",code:`(async () => {
209
+ `))}async function Wt(e){let a=await e.bridge.listSims(),r=e.args.includes("--all"),l=e.args.find((y,M)=>e.args[M-1]==="--bundle"),m=e.args.find((y,M)=>e.args[M-1]==="--app-port"),i=e.args.includes("--primary"),g=a.filter(y=>!(i&&!y.isPrimary||l&&!(y.url??"").includes(l)||m&&!(y.url??"").includes(`/rn/${m}`)||!r&&!l&&!m&&!i&&!(y.url&&(y.url.includes("bundle=")||y.url.includes("/index.bundle")))&&y.id!==e.simId));if(A(e.args)){E(g.map(y=>({...y,active:y.id===e.simId})));return}Nt(g,e.simId),g.length<a.length&&!A(e.args)&&console.log(` (${a.length-g.length} more hidden \u2014 pass --all to show)`)}function le(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`}function Ne(e,a){return a<=0?"?":`${(e/a*100).toFixed(0)}%`}async function qt(e,a={args:[]}){let r=await ht(e);if(A(a.args)){E(r);return}if(console.log(" memory:"),r.imageLoader){let l=r.imageLoader;console.log(" image-loader cache"),console.log(` entries: ${l.cacheEntries} / ${l.cacheMaxEntries} (${Ne(l.cacheEntries,l.cacheMaxEntries)})`),console.log(` pixel bytes: ${le(l.cachePixelBytes)} / ${le(l.cachePixelBudget)} (${Ne(l.cachePixelBytes,l.cachePixelBudget)})`),console.log(` pending: ${l.pendingFetches} fetches, ${l.pendingBytes} bytes`),console.log(` failed uris: ${l.failedUris}`),console.log(` snapshots: ${l.snapshots}`),console.log(` live frames: ${l.liveFrames}`)}else console.log(" image-loader cache: not available (engine pre-rebuild?)");if(r.workerHeap){let l=r.workerHeap;console.log(" worker heap (chrome only)"),console.log(` used: ${le(l.usedJSHeapSize)} / ${le(l.jsHeapSizeLimit)} (${Ne(l.usedJSHeapSize,l.jsHeapSizeLimit)})`),console.log(` total: ${le(l.totalJSHeapSize)}`)}if(r.hostHeap){let l=r.hostHeap;console.log(" host heap (chrome only)"),console.log(` used: ${le(l.usedJSHeapSize)} / ${le(l.jsHeapSizeLimit)} (${Ne(l.usedJSHeapSize,l.jsHeapSizeLimit)})`),console.log(` total: ${le(l.totalJSHeapSize)}`)}}var V="<redacted secure text>";function he(e){let a=e?.layout?.spec??e?.spec??null;return!!a?.secureTextEntry&&a.keyboardType!=="visible-password"}function He(e,a){return he(a)?V:e}function Ke(e){if(!e||!he(e))return e;let a=e.focusedInput;return!a||typeof a!="object"?e:{...e,focusedInput:{...a,secureTextEntry:!0,text:typeof a.text=="string"?V:a.text}}}function we(e){let a=e.indexOf("--testid");if(a>=0&&e[a+1])return{mode:"testid",value:e[a+1]};let r=e.indexOf("--test-id");if(r>=0&&e[r+1])return{mode:"testid",value:e[r+1]};let l=e.indexOf("--text");return l>=0&&e[l+1]?{mode:"text",value:e[l+1]}:null}async function Fe(e,a){let r=JSON.stringify(a.value),l=a.mode==="testid"?`(await t.findByTestId(${r})) || (await t.findById(${r}))`:`await t.findByText(${r})`;return await e.send({type:"evaluate",code:`(async () => {
210
210
  const t = window.__sootsimTest
211
211
  if (!t) return null
212
212
  const n = ${l}
@@ -236,7 +236,7 @@ import{a as Mt,b as It}from"./chunk-GGIATYOM.js";import{a as Re,g as Ie,j as oe}
236
236
  const t = window.SootSim?.bridges?.timeline
237
237
  if (!t) return { ok: false, error: 'timeline bridge missing' }
238
238
  return { ok: true, result: await t.recent(${JSON.stringify(G)}) }
239
- })()`});(!j||!j.ok)&&(console.error(` could not query timeline: ${j&&"error"in j?j.error:"unknown"}`),process.exit(1));let B=j.result.events??[];for(let Z of B)if(Bo(Z,{filter:M,equals:I})){let se=Date.now()-O;console.log(T?JSON.stringify({found:!0,elapsedMs:se,event:Z}):` ${i} event after ${se}ms${M?` (filter: ${M})`:""}${I?` (equals: ${I})`:""}`);return}j.result.watermark&&j.result.watermark>L&&(L=j.result.watermark),await new Promise(Z=>setTimeout(Z,P))}let d=Date.now()-O;T?console.log(JSON.stringify({found:!1,elapsedMs:d,kind:i,filter:M,equals:I})):console.error(` \u26A0 wait event ${i} timed out after ${d}ms${M?` (filter: ${M})`:""}${I?` (equals: ${I})`:""}`),process.exit(1)}async function Qt(e){let{bridge:a,args:r}=e,l=r.includes("--strict"),m=ve(r,3e3),{elapsed:i,settled:g}=await oe({bridge:a,maxMs:m,strict:l});g?console.log(` idle in ${i}ms`):(console.error(` \u26A0 wait idle timed out after ${i}ms (may still be animating)`),process.exit(1))}async function Zt(e){let{bridge:a,args:r}=e,l=ve(r,2e4),{ready:m,elapsedMs:i,nodes:g,targets:y,flag:M,loadingText:I,externalReady:b,externalError:T,errors:O}=await at(a,l,{onProgress(P){console.error(` still waiting after ${P.elapsedMs}ms \u2014 ${Be(P)} (nodes: ${P.nodes}, targets: ${P.targets}, errors: ${P.errors})`)}});if(m){let P=l-i,L=Math.max(100,Math.min(1e4,P)),d=await oe({bridge:a,maxMs:L,pollMs:32,stablePolls:2});d.settled||(console.error(` \u26A0 wait ready timed out after ${i+d.elapsed}ms \u2014 app mounted but did not settle (nodes: ${g}, targets: ${y})`),process.exit(1)),console.log(` ready in ${i+d.elapsed}ms: ${g} nodes, ${y} targets`);return}let N=Be({externalError:T,loadingText:I,externalReady:b,flag:M,targets:y});console.error(` \u26A0 wait ready timed out after ${i}ms \u2014 ${N} (nodes: ${g}, targets: ${y}, errors: ${O})`),process.exit(1)}async function eo(e){let{bridge:a,args:r,positional:l,inspectUsage:m}=e,i=l[1];i||(console.error(m("wait selector","<testid> [--max-ms 5000] [--gone]")),process.exit(1));let g=r.indexOf("--max-ms"),y=g>=0&&r[g+1]?Math.max(100,Number(r[g+1])):5e3,M=r.includes("--gone"),{found:I,node:b,elapsed:T}=await lt(a,i,y,{gone:M});if(M){I?console.log(` #${i} gone after ${T}ms`):(console.error(` \u26A0 wait selector #${i} --gone timed out after ${T??y}ms (still present)`),process.exit(1));return}if(I&&b){let O=b.absolutePosition?`@(${Math.round(b.absolutePosition.x)},${Math.round(b.absolutePosition.y)})`:"",N=b.layout?`${Math.round(b.layout.width)}x${Math.round(b.layout.height)}`:"?x?";console.log(` found #${i} in ${T}ms ${N} ${O}`)}else console.error(` \u26A0 wait selector #${i} timed out after ${T??y}ms`),process.exit(1)}function co(e){return e==null?"\u2014":e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}K`:`${(e/1024/1024).toFixed(1)}M`}function uo(e){return e==null?" \u2026":e<1e3?`${e}ms`.padStart(5):`${(e/1e3).toFixed(2)}s`.padStart(5)}function to(){process.stderr.write(` the sim is not responding. recover it with:
239
+ })()`});(!j||!j.ok)&&(console.error(` could not query timeline: ${j&&"error"in j?j.error:"unknown"}`),process.exit(1));let B=j.result.events??[];for(let Z of B)if(Bo(Z,{filter:M,equals:I})){let se=Date.now()-O;console.log(T?JSON.stringify({found:!0,elapsedMs:se,event:Z}):` ${i} event after ${se}ms${M?` (filter: ${M})`:""}${I?` (equals: ${I})`:""}`);return}j.result.watermark&&j.result.watermark>L&&(L=j.result.watermark),await new Promise(Z=>setTimeout(Z,P))}let d=Date.now()-O;T?console.log(JSON.stringify({found:!1,elapsedMs:d,kind:i,filter:M,equals:I})):console.error(` \u26A0 wait event ${i} timed out after ${d}ms${M?` (filter: ${M})`:""}${I?` (equals: ${I})`:""}`),process.exit(1)}async function Qt(e){let{bridge:a,args:r}=e,l=r.includes("--strict"),m=ve(r,3e3),{elapsed:i,settled:g}=await oe({bridge:a,maxMs:m,strict:l});g?console.log(` idle in ${i}ms`):(console.error(` \u26A0 wait idle timed out after ${i}ms (may still be animating)`),process.exit(1))}async function Zt(e){let{bridge:a,args:r}=e,l=ve(r,2e4),{ready:m,elapsedMs:i,nodes:g,targets:y,flag:M,loadingText:I,externalReady:b,externalError:T,errors:O}=await at(a,l,{onProgress(P){console.error(` still waiting after ${P.elapsedMs}ms \u2014 ${Ce(P)} (nodes: ${P.nodes}, targets: ${P.targets}, errors: ${P.errors})`)}});if(m){let P=l-i,L=Math.max(100,Math.min(1e4,P)),d=await oe({bridge:a,maxMs:L,pollMs:32,stablePolls:2});d.settled||(console.error(` \u26A0 wait ready timed out after ${i+d.elapsed}ms \u2014 app mounted but did not settle (nodes: ${g}, targets: ${y})`),process.exit(1)),console.log(` ready in ${i+d.elapsed}ms: ${g} nodes, ${y} targets`);return}let N=Ce({externalError:T,loadingText:I,externalReady:b,flag:M,targets:y});console.error(` \u26A0 wait ready timed out after ${i}ms \u2014 ${N} (nodes: ${g}, targets: ${y}, errors: ${O})`),process.exit(1)}async function eo(e){let{bridge:a,args:r,positional:l,inspectUsage:m}=e,i=l[1];i||(console.error(m("wait selector","<testid> [--max-ms 5000] [--gone]")),process.exit(1));let g=r.indexOf("--max-ms"),y=g>=0&&r[g+1]?Math.max(100,Number(r[g+1])):5e3,M=r.includes("--gone"),{found:I,node:b,elapsed:T}=await lt(a,i,y,{gone:M});if(M){I?console.log(` #${i} gone after ${T}ms`):(console.error(` \u26A0 wait selector #${i} --gone timed out after ${T??y}ms (still present)`),process.exit(1));return}if(I&&b){let O=b.absolutePosition?`@(${Math.round(b.absolutePosition.x)},${Math.round(b.absolutePosition.y)})`:"",N=b.layout?`${Math.round(b.layout.width)}x${Math.round(b.layout.height)}`:"?x?";console.log(` found #${i} in ${T}ms ${N} ${O}`)}else console.error(` \u26A0 wait selector #${i} timed out after ${T??y}ms`),process.exit(1)}function co(e){return e==null?"\u2014":e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}K`:`${(e/1024/1024).toFixed(1)}M`}function uo(e){return e==null?" \u2026":e<1e3?`${e}ms`.padStart(5):`${(e/1e3).toFixed(2)}s`.padStart(5)}function to(){process.stderr.write(` the sim is not responding. recover it with:
240
240
  sootsim close --sim <id> # force-close the wedged sim
241
241
  sootsim list # confirm it's gone
242
242
  `)}async function Lo(e){try{return await e.send({type:"evaluate",code:"1"},{timeoutMs:3e3}),!0}catch{return!1}}async function Jo(e,a){try{let r=await e.send({type:"evaluate",code:`(async () => {
@@ -259,7 +259,7 @@ import{a as Mt,b as It}from"./chunk-GGIATYOM.js";import{a as Re,g as Ie,j as oe}
259
259
  return []
260
260
  }
261
261
  })()`});if(!Array.isArray(r)||r.length===0)return;let l=a.toLowerCase(),m=r.map(i=>({id:i,score:Wo(l,i.toLowerCase())})).filter(i=>i.score<l.length+4).sort((i,g)=>i.score-g.score).slice(0,5);if(m.length===0)return;console.error(" similar testIDs:");for(let i of m)console.error(` ${i.id}`)}catch{}}function Wo(e,a){if(a===e)return 0;if(a.includes(e))return 1;if(e.includes(a))return 2;let r=0;for(;r<e.length&&r<a.length&&e[r]===a[r];)r+=1;return qo(e,a)-r}function qo(e,a){if(e===a)return 0;if(!e.length)return a.length;if(!a.length)return e.length;let r=new Array(a.length+1),l=new Array(a.length+1);for(let m=0;m<=a.length;m++)r[m]=m;for(let m=1;m<=e.length;m++){l[0]=m;for(let g=1;g<=a.length;g++)l[g]=Math.min(r[g]+1,l[g-1]+1,r[g-1]+(e[m-1]===a[g-1]?0:1));let i=r;r=l,l=i}return r[a.length]}function Ho(e){return e.error?"err":e.status==null?" \u2026 ":String(e.status)}function oo(e){return e.externalError?`guest app errored: ${e.externalError}`:e.loadingText?`still showing "${e.loadingText}"`:e.externalReady===!1?"guest app is still loading":e.flag!==!0?"guest app has not emitted sootsim:externalAppReady":e.targets<=0?"ready flag emitted but no visible app content is inspectable yet":"node tree is still changing"}function so(e){let a=ae(e.startTs),r=Ho(e).padEnd(3),l=e.method.padEnd(5),m=co(e.size).padStart(6),i=uo(e.durationMs);console.log(` [${a}] ${r} ${l} ${m} ${i} ${e.displayUrl}`),e.error&&console.log(` error: ${e.error}`)}function Ko(e){let a=[["id",e.id],["source",e.source],["kind",e.kind],["method",e.method],["status",e.error?`error: ${e.error}`:`${e.status??"\u2014"} ${e.statusText??""}`.trim()],["url",e.url],["started",ae(e.startTs)],["duration",uo(e.durationMs).trim()],["size",co(e.size)],["content-type",e.type??"\u2014"]];for(let[r,l]of a)console.log(` ${r.padEnd(13)} ${l}`)}var Uo={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[35m",log:"\x1B[37m"},no="\x1B[0m",zo="\x1B[2m";function ro(e,a){let r=ae(e.ts),l=e.level.toUpperCase().padEnd(5),m=e.args.join(" ");if(a){let i=Uo[e.level];console.log(` ${zo}[${r}]${no} ${i}${l}${no} ${m}`)}else console.log(` [${r}] ${l} ${m}`);if(e.stack&&e.level==="error"){let i=e.stack.split(`
262
- `).slice(0,5);for(let g of i)console.log(` ${g.trim()}`)}}var re="__sootsimCliPerf",Go=120;async function io(e,a){let r=e.find((O,N)=>e[N-1]==="--id"),l=e.find((O,N)=>e[N-1]==="--text");if(r||l){let O=await a.send({type:"evaluate",code:Mt({id:r,text:l})});if(!O)throw new Error(r?`no node with id "${r}"`:`no node matching text "${l}"`);let{x:N,y:P,w:L,h:d}=O;return{x:N,y:P,w:L,h:d}}let m=e.find((O,N)=>e[N-1]==="--area");if(m){let O=m.split(",").map(G=>Number(G.trim()));if(O.length!==4||O.some(G=>!Number.isFinite(G)))throw new Error(`--area expects x,y,w,h (got "${m}")`);let[N,P,L,d]=O;return{x:N,y:P,w:L,h:d}}let i=O=>{let N=e.find((L,d)=>e[d-1]===O);if(N==null)return null;let P=Number(N);return Number.isFinite(P)?P:null},g=i("--x"),y=i("--y"),M=i("--w"),I=i("--h");if(g!=null||y!=null||M!=null||I!=null)return{x:g??0,y:y??0,w:M??1,h:I??1};let T=e.filter((O,N)=>N>0&&!O.startsWith("-")&&e[N-1]!=="--output"&&e[N-1]!=="--area"&&e[N-1]!=="--id"&&e[N-1]!=="--text"&&e[N-1]!=="--x"&&e[N-1]!=="--y"&&e[N-1]!=="--w"&&e[N-1]!=="--h").map(Number).filter(O=>Number.isFinite(O));if(T.length>=2){let[O,N,P=1,L=1]=T;return{x:O,y:N,w:P,h:L}}return null}function Ue(e){let a={"<8":0,"8-12":0,"12-16":0,"16-20":0,"20-33":0,">33":0};for(let r of e)r<8?a["<8"]++:r<12?a["8-12"]++:r<16?a["12-16"]++:r<20?a["16-20"]++:r<33?a["20-33"]++:a[">33"]++;console.log(" histogram:");for(let[r,l]of Object.entries(a)){let m="\u2588".repeat(Math.ceil(l/e.length*40));console.log(` ${r.padEnd(6)} ${m} ${l}`)}}async function Oe(e,a,r){let l=Date.now()+a,m=await de(e,a);for(;;){if(r(m))return{settled:!0,state:m};if(Date.now()>=l)return{settled:!1,state:m};await te(16),m=await de(e)}}async function Ge(e){return e.send({type:"evaluate",code:`(async () => {
262
+ `).slice(0,5);for(let g of i)console.log(` ${g.trim()}`)}}var re="__sootsimCliPerf",Go=120;async function io(e,a){let r=e.find((O,N)=>e[N-1]==="--id"),l=e.find((O,N)=>e[N-1]==="--text");if(r||l){let O=await a.send({type:"evaluate",code:Ft({id:r,text:l})});if(!O)throw new Error(r?`no node with id "${r}"`:`no node matching text "${l}"`);let{x:N,y:P,w:L,h:d}=O;return{x:N,y:P,w:L,h:d}}let m=e.find((O,N)=>e[N-1]==="--area");if(m){let O=m.split(",").map(G=>Number(G.trim()));if(O.length!==4||O.some(G=>!Number.isFinite(G)))throw new Error(`--area expects x,y,w,h (got "${m}")`);let[N,P,L,d]=O;return{x:N,y:P,w:L,h:d}}let i=O=>{let N=e.find((L,d)=>e[d-1]===O);if(N==null)return null;let P=Number(N);return Number.isFinite(P)?P:null},g=i("--x"),y=i("--y"),M=i("--w"),I=i("--h");if(g!=null||y!=null||M!=null||I!=null)return{x:g??0,y:y??0,w:M??1,h:I??1};let T=e.filter((O,N)=>N>0&&!O.startsWith("-")&&e[N-1]!=="--output"&&e[N-1]!=="--area"&&e[N-1]!=="--id"&&e[N-1]!=="--text"&&e[N-1]!=="--x"&&e[N-1]!=="--y"&&e[N-1]!=="--w"&&e[N-1]!=="--h").map(Number).filter(O=>Number.isFinite(O));if(T.length>=2){let[O,N,P=1,L=1]=T;return{x:O,y:N,w:P,h:L}}return null}function Ue(e){let a={"<8":0,"8-12":0,"12-16":0,"16-20":0,"20-33":0,">33":0};for(let r of e)r<8?a["<8"]++:r<12?a["8-12"]++:r<16?a["12-16"]++:r<20?a["16-20"]++:r<33?a["20-33"]++:a[">33"]++;console.log(" histogram:");for(let[r,l]of Object.entries(a)){let m="\u2588".repeat(Math.ceil(l/e.length*40));console.log(` ${r.padEnd(6)} ${m} ${l}`)}}async function Oe(e,a,r){let l=Date.now()+a,m=await de(e,a);for(;;){if(r(m))return{settled:!0,state:m};if(Date.now()>=l)return{settled:!1,state:m};await te(16),m=await de(e)}}async function Ge(e){return e.send({type:"evaluate",code:`(async () => {
263
263
  const kb = window.__sootsimKeyboard
264
264
  const test = window.__sootsimTest
265
265
  if (!kb) return { error: 'keyboard bridge not available' }
@@ -326,7 +326,7 @@ import{a as Mt,b as It}from"./chunk-GGIATYOM.js";import{a as Re,g as Ie,j as oe}
326
326
  `);console.log(`${o??""}
327
327
 
328
328
  ${t}
329
- `),process.exit(0)}let O=m.wsPort,N=m.simId,P=m.simIdSource,L=m.commandTimeoutMs;if(g==="list"&&l.some($=>$==="--drivers"||$==="-D")){let{buildDriverListRows:$}=await import("./drivers-2SW6KTMT.js"),o=$();console.log(` available drivers (${o.length}):
329
+ `),process.exit(0)}let O=m.wsPort,N=m.simId,P=m.simIdSource,L=m.commandTimeoutMs;if(g==="list"&&l.some($=>$==="--drivers"||$==="-D")){let{buildDriverListRows:$}=await import("./drivers-QX77DPCG.js"),o=$();console.log(` available drivers (${o.length}):
330
330
  `);let t=Math.max(...o.map(n=>n.id.length),6),s=Math.max(...o.map(n=>n.kind.length),4);for(let n of o){let c=n.available?"\u2713":"\u2717",u=n.id.padEnd(t),p=n.kind.padEnd(s);console.log(` ${c} ${u} ${p} ${n.description}`),n.available&&n.detail?console.log(` ${n.detail}`):!n.available&&n.reason&&console.log(` unavailable: ${n.reason}`)}return}let d=xt(m),G=N||"default",j=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","storage-clear","list","wait","sleep"]),B=200;function Z($){let o=$.replace(/\s+/g," ").trim();if(!o)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(o)){let s=/<title[^>]*>([^<]+)<\/title>/i.exec($)?.[1]?.trim(),n=/<body[^>]*>([\s\S]*?)<\//i.exec($)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),c=s||n||"html error page";return`<html ${$.length}B> "${c}" (body elided \u2014 add --json for the full payload)`}return o.length<=B?o:`${o.slice(0,B)}\u2026 (+${o.length-B} more bytes)`}function se($){let o=$.displayUrl||$.url;return $.status!=null?`${$.method} ${o} -> ${$.status}${$.statusText?` ${$.statusText}`:""}`:$.error?`${$.method} ${o} -> ${$.error}`:`${$.method} ${o}`}async function v($){let o=pe()?5e3:1500;try{let{settled:t,elapsed:s}=await oe({bridge:$,maxMs:o,pollMs:32,stablePolls:2});t||process.stderr.write(` \u26A0 auto-wait timed out after ${s??o}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
331
331
  `)}catch{}}function F($,o){console.error(` tap failed: ${$} stayed visible but did not receive a hittable press after ${o.attempts} attempt${o.attempts===1?"":"s"}`),o.result&&console.error(` last result: ${JSON.stringify(o.result)}`)}async function W(){try{return await d.send({type:"evaluate",code:`(() => ({
332
332
  console: ${ke},
@@ -356,7 +356,7 @@ ${t}
356
356
  return summary ? { summary, consoleSplit } : null
357
357
  })()`)}catch{return}if(!t||!t.summary||!t.summary.total)return;let s=t.summary.byKind??{},n=[],c=new Set;for(let u of ie){let p=s[u];if(p)if(c.add(u),u==="console"&&t.consoleSplit){let{error:h,warn:f}=t.consoleSplit;h>0&&n.push(`${h} error${h===1?"":"s"}`),f>0&&n.push(`${f} warning${f===1?"":"s"}`)}else n.push(`${p} ${u}${p===1?"":"s"}`)}for(let[u,p]of Object.entries(s))!c.has(u)&&p&&n.push(`${p} ${u}${p===1?"":"s"}`);if(n.length!==0&&(console.log(`
358
358
  since last: ${n.join(" \xB7 ")} \u2014 sootsim what-happened`),t.summary.lastAt))try{await Te($,"SootSim.bridges.timeline.cursorAdvance",o,t.summary.lastAt)}catch{}}let C=new Set(["tap","double-tap","tap-text","tap-id","type","type-into","key","key-sequence","keycode","drag","swipe","long-press","touch","gesture","pinch","scroll","shell","storage-clear"]),ce=new Set(["a11y","capture","count","double-tap","drag","find","gesture","layout","long-press","node","pinch","sample-color","scroll","screenshot","swipe","tap","tap-id","tap-text","touch","tree","type-into"]),$e=(e.includes("--verbose")||e.includes("-v"))&&!e.includes("--json");y==="do"&&g==="shell"&&(console.error(" `sootsim do shell` was removed. use `sootsim shell ...` instead."),process.exit(1)),C.has(g)&&await $t(d),ce.has(g)&&await ue(d,{verbose:$e});try{let $=C.has(g)&&!A(l)?await gt(d):[];switch(g){case"list":{await Wt({bridge:d,simId:N,args:l});break}case"tree":{await zt({bridge:d,args:l,positional:i});break}case"a11y":{let o=await rt(d);if(!Array.isArray(o)||o.length===0){console.log(" no accessible nodes found");break}if(e.includes("--json"))console.log(JSON.stringify(o,null,2));else{console.log(` accessibility tree (${o.length} nodes):
359
- `);for(let t of o){let s=[];if(s.push(`[${t.role}]`),t.label){let n=t.label.length>50?t.label.slice(0,47)+"...":t.label;s.push(`"${n}"`)}if(t.hint&&s.push(`(hint: "${t.hint}")`),t.testID&&s.push(`#${t.testID}`),t.state){let n=[];t.state.disabled&&n.push("disabled"),t.state.selected&&n.push("selected"),t.state.checked===!0&&n.push("checked"),t.state.checked==="mixed"&&n.push("mixed"),t.state.busy&&n.push("busy"),t.state.expanded===!0&&n.push("expanded"),t.state.expanded===!1&&n.push("collapsed"),n.length&&s.push(`{${n.join(", ")}}`)}t.position&&s.push(`@(${t.position.x},${t.position.y})`),t.size&&s.push(`${t.size.w}x${t.size.h}`),console.log(" "+s.join(" "))}}break}case"find":{await jt({bridge:d,args:e,effectiveArgs:l,positional:i,inspectUsage:T});break}case"count":{await Ct(d,{args:l});break}case"keyboard":{await Jt(d,{json:e.includes("--json")});break}case"screens":{await Ht(d,{json:e.includes("--json")});break}case"memory":{await qt(d,{args:l});break}case"wait":{await Yt({wsPort:O,commandTimeoutMs:L,simId:N,simIdSource:P,positional:i});break}case"sleep":{await Ut({positional:i,inspectUsage:T});break}case"settle":{await Kt({bridge:d,args:e,positional:i});break}case"ready":{await Zt({bridge:d,args:e});break}case"idle":{await Qt({bridge:d,args:e,positional:i});break}case"selector":{await eo({bridge:d,args:e,positional:i,inspectUsage:T});break}case"event":{await Vt({bridge:d,args:e,positional:i,inspectUsage:T});break}case"layout":{let o=i[1];if(!o){await Lt({bridge:d,args:l});break}let t=await d.send({type:"evaluate",code:`(async () => await window.__sootsimTest.getLayout(${JSON.stringify(o)}))()`});console.log(JSON.stringify(t,null,2));break}case"capture":case"screenshot":{let t=e.find((h,f)=>e[f-1]==="--output")||"/tmp/sootsim-inspect.png",s=await io(e,d),n={type:"screenshot"};s&&(n.crop=s);let u=(await d.send(n)).replace(/^data:image\/png;base64,/,"");s&&console.log(` area: x=${s.x} y=${s.y} w=${s.w} h=${s.h}`),(await import("fs")).writeFileSync(t,Buffer.from(u,"base64")),console.log(` saved: ${t}`);break}case"sample-color":{let o=await io(e,d);o||(console.error(T("sample-color","<x> <y> [w] [h] | --id <testID> | --text <text>")),console.error(" samples an averaged color from the canvas. coords are logical sootsim units."),process.exit(1));let t=await d.send({type:"evaluate",code:It(o)});if(e.includes("--json"))console.log(JSON.stringify(t,null,2));else{let{r:s,g:n,b:c,a:u,hex:p,samples:h}=t,f=o.w===1&&o.h===1?`@(${o.x},${o.y})`:`@(${o.x},${o.y}) ${o.w}x${o.h}`;console.log(` ${p} rgba(${s}, ${n}, ${c}, ${u}) ${f} ${h} samples`)}break}case"node":{let o=i[1];o||(console.error(T("node","<matcher>")),console.error(" resolves testID, id, then text \u2014 dumps full node info as JSON"),process.exit(1));let t=await d.send({type:"evaluate",code:`(async () => {
359
+ `);for(let t of o){let s=[];if(s.push(`[${t.role}]`),t.label){let n=t.label.length>50?t.label.slice(0,47)+"...":t.label;s.push(`"${n}"`)}if(t.hint&&s.push(`(hint: "${t.hint}")`),t.testID&&s.push(`#${t.testID}`),t.state){let n=[];t.state.disabled&&n.push("disabled"),t.state.selected&&n.push("selected"),t.state.checked===!0&&n.push("checked"),t.state.checked==="mixed"&&n.push("mixed"),t.state.busy&&n.push("busy"),t.state.expanded===!0&&n.push("expanded"),t.state.expanded===!1&&n.push("collapsed"),n.length&&s.push(`{${n.join(", ")}}`)}t.position&&s.push(`@(${t.position.x},${t.position.y})`),t.size&&s.push(`${t.size.w}x${t.size.h}`),console.log(" "+s.join(" "))}}break}case"find":{await jt({bridge:d,args:e,effectiveArgs:l,positional:i,inspectUsage:T});break}case"count":{await Ct(d,{args:l});break}case"keyboard":{await Jt(d,{json:e.includes("--json")});break}case"screens":{await Ht(d,{json:e.includes("--json")});break}case"memory":{await qt(d,{args:l});break}case"wait":{await Yt({wsPort:O,commandTimeoutMs:L,simId:N,simIdSource:P,positional:i});break}case"sleep":{await Ut({positional:i,inspectUsage:T});break}case"settle":{await Kt({bridge:d,args:e,positional:i});break}case"ready":{await Zt({bridge:d,args:e});break}case"idle":{await Qt({bridge:d,args:e,positional:i});break}case"selector":{await eo({bridge:d,args:e,positional:i,inspectUsage:T});break}case"event":{await Vt({bridge:d,args:e,positional:i,inspectUsage:T});break}case"layout":{let o=i[1];if(!o){await Lt({bridge:d,args:l});break}let t=await d.send({type:"evaluate",code:`(async () => await window.__sootsimTest.getLayout(${JSON.stringify(o)}))()`});console.log(JSON.stringify(t,null,2));break}case"capture":case"screenshot":{let t=e.find((h,f)=>e[f-1]==="--output")||"/tmp/sootsim-inspect.png",s=await io(e,d),n={type:"screenshot"};s&&(n.crop=s);let u=(await d.send(n)).replace(/^data:image\/png;base64,/,"");s&&console.log(` area: x=${s.x} y=${s.y} w=${s.w} h=${s.h}`),(await import("fs")).writeFileSync(t,Buffer.from(u,"base64")),console.log(` saved: ${t}`);break}case"sample-color":{let o=await io(e,d);o||(console.error(T("sample-color","<x> <y> [w] [h] | --id <testID> | --text <text>")),console.error(" samples an averaged color from the canvas. coords are logical sootsim units."),process.exit(1));let t=await d.send({type:"evaluate",code:_t(o)});if(e.includes("--json"))console.log(JSON.stringify(t,null,2));else{let{r:s,g:n,b:c,a:u,hex:p,samples:h}=t,f=o.w===1&&o.h===1?`@(${o.x},${o.y})`:`@(${o.x},${o.y}) ${o.w}x${o.h}`;console.log(` ${p} rgba(${s}, ${n}, ${c}, ${u}) ${f} ${h} samples`)}break}case"node":{let o=i[1];o||(console.error(T("node","<matcher>")),console.error(" resolves testID, id, then text \u2014 dumps full node info as JSON"),process.exit(1));let t=await d.send({type:"evaluate",code:`(async () => {
360
360
  const t = window.__sootsimTest
361
361
  const q = ${JSON.stringify(o)}
362
362
  let node = null
@@ -571,7 +571,7 @@ ${t}
571
571
  ${b("shell")} open-card clock 800
572
572
  ${b("shell")} appearance dark
573
573
  ${b("shell")} lock
574
- `);break}let t=o==="launch"||o==="open-card"||o==="home"||o==="switcher",s=o==="launch"||o==="open-card"?i[3]:i[2],n=s?Number(s):350;t&&(!Number.isFinite(n)||n<0)&&(console.error(T("shell",o==="launch"||o==="open-card"?"<launch|open-card> <appId> [settleMs]":"<home|switcher> [settleMs]")),process.exit(1));let c=!1,u=!1,p=null,h=e.includes("--clear-state");if(o==="launch"){let f=i[2];f||(console.error(T("shell","launch <appId> [settleMs] [--clear-state]")),process.exit(1)),h&&await d.send({type:"evaluate",code:Re(!0)}),c=!!await ge(d,"launchApp",n,f),{settled:u,state:p}=await Oe(d,Math.round(n),x=>!!x&&x.state==="app"&&x.activeApp===f&&x.showSwitcher===!1&&x.switcherPhase==="idle"&&typeof x.launchProgress=="number"&&x.launchProgress>=.98),c&&await J("inspect shell launch",h?{launchApp:{clearState:!0}}:{launchApp:{}},h?"launch app (clear state)":"launch app")}else if(o==="home")c=!!await ge(d,"goHome",n),{settled:u,state:p}=await Oe(d,Math.round(n),f=>!!f&&f.state==="home"&&f.activeApp==null&&f.showSwitcher===!1&&f.switcherPhase==="idle"&&typeof f.launchProgress=="number"&&f.launchProgress>=.98);else if(o==="switcher")c=!!await ge(d,"openSwitcher",n),{settled:u,state:p}=await Oe(d,Math.round(n),f=>!!f&&f.state==="app"&&f.showSwitcher===!0&&f.switcherPhase==="idle"&&typeof f.zoomLevel=="number"&&Math.abs(f.zoomLevel)<=.02&&typeof f.horizontalZoom=="number"&&Math.abs(f.horizontalZoom)<=.02),u&&(await te(Go),p=await de(d));else if(o==="open-card"){let f=i[2];f||(console.error(T("shell","open-card <appId> [settleMs]")),process.exit(1)),c=!!await ge(d,"openSwitcherCard",n,f),{settled:u,state:p}=await Oe(d,Math.round(n),x=>!!x&&x.state==="app"&&x.activeApp===f&&x.showSwitcher===!1&&x.switcherPhase==="idle"&&typeof x.zoomLevel=="number"&&x.zoomLevel>=.98&&typeof x.horizontalZoom=="number"&&x.horizontalZoom>=.98),c&&await J("inspect shell open-card",{openSwitcherCard:{appId:f}},`open switcher card ${f}`)}else if(o==="appearance"){let f=i[2];(!f||!["light","dark","auto","toggle"].includes(f))&&(console.error(T("shell","appearance <light|dark|auto|toggle>")),process.exit(1));let x=await ao(d,"appearance",f);if(c=!!x?.ok,p={appearance:x},c){let R=x?.applied??f;console.log(` appearance: ${R}`)}}else if(o==="lock"||o==="shake"){let f=await ao(d,o);c=!!f?.ok,p={[o]:f}}else console.error(` unknown shell subcommand: ${o}`),process.exit(1);console.log(JSON.stringify({ok:c,settled:u,state:p},null,2));break}case"url":{await Gt(d,{args:l});break}case"reload":{let s=!1,n=!1;try{await d.send({type:"evaluate",code:"window.__sootsimConsole?.clear()"});let p=await d.send({type:"evaluate",code:`;(() => {
574
+ `);break}let t=o==="launch"||o==="open-card"||o==="home"||o==="switcher",s=o==="launch"||o==="open-card"?i[3]:i[2],n=s?Number(s):350;t&&(!Number.isFinite(n)||n<0)&&(console.error(T("shell",o==="launch"||o==="open-card"?"<launch|open-card> <appId> [settleMs]":"<home|switcher> [settleMs]")),process.exit(1));let c=!1,u=!1,p=null,h=e.includes("--clear-state");if(o==="launch"){let f=i[2];f||(console.error(T("shell","launch <appId> [settleMs] [--clear-state]")),process.exit(1)),h&&await d.send({type:"evaluate",code:Le(!0)}),c=!!await ge(d,"launchApp",n,f),{settled:u,state:p}=await Oe(d,Math.round(n),x=>!!x&&x.state==="app"&&x.activeApp===f&&x.showSwitcher===!1&&x.switcherPhase==="idle"&&typeof x.launchProgress=="number"&&x.launchProgress>=.98),c&&await J("inspect shell launch",h?{launchApp:{clearState:!0}}:{launchApp:{}},h?"launch app (clear state)":"launch app")}else if(o==="home")c=!!await ge(d,"goHome",n),{settled:u,state:p}=await Oe(d,Math.round(n),f=>!!f&&f.state==="home"&&f.activeApp==null&&f.showSwitcher===!1&&f.switcherPhase==="idle"&&typeof f.launchProgress=="number"&&f.launchProgress>=.98);else if(o==="switcher")c=!!await ge(d,"openSwitcher",n),{settled:u,state:p}=await Oe(d,Math.round(n),f=>!!f&&f.state==="app"&&f.showSwitcher===!0&&f.switcherPhase==="idle"&&typeof f.zoomLevel=="number"&&Math.abs(f.zoomLevel)<=.02&&typeof f.horizontalZoom=="number"&&Math.abs(f.horizontalZoom)<=.02),u&&(await te(Go),p=await de(d));else if(o==="open-card"){let f=i[2];f||(console.error(T("shell","open-card <appId> [settleMs]")),process.exit(1)),c=!!await ge(d,"openSwitcherCard",n,f),{settled:u,state:p}=await Oe(d,Math.round(n),x=>!!x&&x.state==="app"&&x.activeApp===f&&x.showSwitcher===!1&&x.switcherPhase==="idle"&&typeof x.zoomLevel=="number"&&x.zoomLevel>=.98&&typeof x.horizontalZoom=="number"&&x.horizontalZoom>=.98),c&&await J("inspect shell open-card",{openSwitcherCard:{appId:f}},`open switcher card ${f}`)}else if(o==="appearance"){let f=i[2];(!f||!["light","dark","auto","toggle"].includes(f))&&(console.error(T("shell","appearance <light|dark|auto|toggle>")),process.exit(1));let x=await ao(d,"appearance",f);if(c=!!x?.ok,p={appearance:x},c){let R=x?.applied??f;console.log(` appearance: ${R}`)}}else if(o==="lock"||o==="shake"){let f=await ao(d,o);c=!!f?.ok,p={[o]:f}}else console.error(` unknown shell subcommand: ${o}`),process.exit(1);console.log(JSON.stringify({ok:c,settled:u,state:p},null,2));break}case"url":{await Gt(d,{args:l});break}case"reload":{let s=!1,n=!1;try{await d.send({type:"evaluate",code:"window.__sootsimConsole?.clear()"});let p=await d.send({type:"evaluate",code:`;(() => {
575
575
  const reloadExternalApp = window.SootSim?.bridges?.hotRemount?.reloadExternalApp
576
576
  if (typeof reloadExternalApp === 'function') {
577
577
  reloadExternalApp()
@@ -582,7 +582,7 @@ ${t}
582
582
  })()`});n=!!p&&p.kind==="external-app",s=!0}catch{}console.log(" reloading...");let c=d,u=null;if(n)u=await Me(d,{timeoutMs:1e4,errorGraceMs:3e3});else{s&&await te(300);let p=await kt(O,L,N,{timeoutMs:1e4,simIdSource:P});p?(c=p,u=await Me(p,{timeoutMs:1e4,errorGraceMs:3e3})):(console.log(" \u26A0 reload: bridge never reconnected within 10000ms"),c=null)}if(u)if(u.ready){let p=u.source==="nodes-fallback"?" (no ready signal, node-count fallback)":"";console.log(` ready in ${u.elapsedMs}ms: ${u.nodes} nodes${p}`)}else if(u.source==="error-bail")console.log(` \u26A0 reload bailed after ${u.elapsedMs}ms: ${u.errors} console error(s), ready signal never fired`);else{let p=oo(u);console.log(` \u26A0 reload timed out after ${u.elapsedMs}ms \u2014 ${p} (nodes: ${u.nodes}, targets: ${u.targets}, errors: ${u.errors})`)}if(c)try{let p=await fe(c,10);if(c!==d&&c.close(),Array.isArray(p)&&p.length>0){console.log(`
583
583
  \u26A0 ${p.length} error(s) during mount:
584
584
  `);for(let h of p){let f=h.args.map(x=>typeof x=="object"?JSON.stringify(x):x).join(" ");if(console.log(` ${f}`),h.stack){let x=h.stack.split(`
585
- `).slice(0,2);for(let R of x)console.log(` ${R.trim()}`)}}}}catch{}u&&!u.ready&&(process.exitCode=1);break}case"storage-clear":{if(await je(d),await d.send({type:"evaluate",code:Re(!0)})!==!0){A(l)?E({cleared:!1,ready:!1,error:"external app reload bridge is unavailable"}):console.error(" storage clear failed: external app reload bridge is unavailable"),process.exitCode=1;break}let n=await Me(d,{timeoutMs:1e4,errorGraceMs:3e3});if(A(l)){E({cleared:!0,ready:n.ready,reload:n}),n.ready||(process.exitCode=1);break}if(n.ready){let c=n.source==="nodes-fallback"?" (no ready signal, node-count fallback)":"";console.log(` cleared tenant storage; ready in ${n.elapsedMs}ms: ${n.nodes} nodes${c}`)}else if(n.source==="error-bail")console.log(` \u26A0 storage clear reloaded but bailed after ${n.elapsedMs}ms: ${n.errors} console error(s), ready signal never fired`);else{let c=oo(n);console.log(` \u26A0 storage clear reloaded but timed out after ${n.elapsedMs}ms \u2014 ${c} (nodes: ${n.nodes}, targets: ${n.targets}, errors: ${n.errors})`)}try{let c=await fe(d,10);if(Array.isArray(c)&&c.length>0){console.log(`
585
+ `).slice(0,2);for(let R of x)console.log(` ${R.trim()}`)}}}}catch{}u&&!u.ready&&(process.exitCode=1);break}case"storage-clear":{if(await Be(d),await d.send({type:"evaluate",code:Le(!0)})!==!0){A(l)?E({cleared:!1,ready:!1,error:"external app reload bridge is unavailable"}):console.error(" storage clear failed: external app reload bridge is unavailable"),process.exitCode=1;break}let n=await Me(d,{timeoutMs:1e4,errorGraceMs:3e3});if(A(l)){E({cleared:!0,ready:n.ready,reload:n}),n.ready||(process.exitCode=1);break}if(n.ready){let c=n.source==="nodes-fallback"?" (no ready signal, node-count fallback)":"";console.log(` cleared tenant storage; ready in ${n.elapsedMs}ms: ${n.nodes} nodes${c}`)}else if(n.source==="error-bail")console.log(` \u26A0 storage clear reloaded but bailed after ${n.elapsedMs}ms: ${n.errors} console error(s), ready signal never fired`);else{let c=oo(n);console.log(` \u26A0 storage clear reloaded but timed out after ${n.elapsedMs}ms \u2014 ${c} (nodes: ${n.nodes}, targets: ${n.targets}, errors: ${n.errors})`)}try{let c=await fe(d,10);if(Array.isArray(c)&&c.length>0){console.log(`
586
586
  \u26A0 ${c.length} error(s) during mount:
587
587
  `);for(let u of c){let p=u.args.map(h=>typeof h=="object"?JSON.stringify(h):h).join(" ");if(console.log(` ${p}`),u.stack){let h=u.stack.split(`
588
588
  `).slice(0,2);for(let f of h)console.log(` ${f.trim()}`)}}}}catch{}n.ready||(process.exitCode=1);break}case"eval":case"js":{let o=i.slice(1).join(" ");o||(console.error(T("js","<javascript>")),console.error(""),console.error(" runs the snippet in the engine realm. SootSim is the"),console.error(" canonical state surface \u2014 reach into it directly."),console.error(""),console.error(" examples:"),console.error(` ${b("js")} SootSim.bridges.test.findByText("Sign in")`),console.error(` ${b("js")} SootSim.bridges.debug.snapshot("before")`),console.error(` ${b("js")} SootSim.bridges.keyboard.type("hello")`),console.error(` ${b("js")} SootSim.state.root.children.length`),process.exit(1));let t=o;t.startsWith("(async")||(t=`(async () => ${t})()`);let s=await d.send({type:"evaluate",code:t});console.log(JSON.stringify(s,null,2));let n=o.toLowerCase(),c=[];(n.includes("sootsim:gohome")||n.includes("gohome"))&&c.push("sootsim shell home"),(n.includes("sootsim:appswitcher")||n.includes("appswitcher"))&&c.push("sootsim shell switcher"),(n.includes("keyboard.isvisible")||n.includes("keyboard.getmode"))&&c.push("sootsim debug state keyboard"),n.includes("interact.tap")&&c.push("sootsim do tap <x> <y>"),n.includes("keyboard.type")&&c.push("sootsim do type <text>"),(n.includes("keyboard.press")||n.includes("keyboard.dispatchkey"))&&c.push("sootsim do key <name>"),n.includes("keyboard.dismiss")&&c.push("sootsim do dismiss"),n.includes("dumptree")&&c.push("sootsim get tree"),n.includes("dumpaccessibilitytree")&&c.push("sootsim get a11y"),n.includes("getnodecount")&&c.push("sootsim get count"),n.includes("findbytext")&&c.push("sootsim find <text>"),(n.includes("findbytestid")||n.includes("findbyid"))&&c.push("sootsim find --testid <id>"),n.includes("document.hidden")&&c.push("sootsim debug state keyboard (includes tab health)"),c.length>0&&X("prefer-cli-over-eval",c);break}case"globals":{let o=await d.send({type:"evaluate",code:`(async () => {
@@ -882,7 +882,7 @@ ${t}
882
882
  examples:
883
883
  ${b("perf")} transition goHome --timeout 10000
884
884
  ${b("perf")} transition appSwitcher
885
- `);break}let n=`sootsim:${t}`;Le(` profiling ${t} transition...`),Le(" (use --timeout 10000 if this times out)");let c=await d.send({type:"evaluate",code:`(async () => {
885
+ `);break}let n=`sootsim:${t}`;je(` profiling ${t} transition...`),je(" (use --timeout 10000 if this times out)");let c=await d.send({type:"evaluate",code:`(async () => {
886
886
  // only supported in render-worker mode
887
887
  if (!window.__sootsimRenderHost) {
888
888
  return { error: 'transition profiling requires render-worker mode' }
@@ -959,7 +959,7 @@ ${t}
959
959
  p50: ${c.p50.toFixed(2)}ms
960
960
  p95: ${c.p95.toFixed(2)}ms
961
961
  p99: ${c.p99.toFixed(2)}ms
962
- jank: ${c.jankFrames} frames (${p}%) >16.67ms`),Array.isArray(c.samples)&&c.samples.length>0&&(console.log(""),Ue(c.samples.map(h=>h[1])));break}default:console.error(` unknown perf subcommand: ${o}`),console.error(" valid: stats, start, stop, frames, worst, transition"),/^--?reset$/.test(o)&&console.error(" note: 'perf start' already clears prior frames \u2014 no reset needed"),process.exit(1)}break}case"errors":{let o=i[1];if(o==="clear"){await je(d),A(l)?E({cleared:!0}):console.log(" error buffer cleared");break}let t=o?Number(o):20,s=await fe(d,t);if(A(l)){E(s);break}if(s.length===0){console.log(" no errors captured");break}console.log(` ${s.length} error(s):
962
+ jank: ${c.jankFrames} frames (${p}%) >16.67ms`),Array.isArray(c.samples)&&c.samples.length>0&&(console.log(""),Ue(c.samples.map(h=>h[1])));break}default:console.error(` unknown perf subcommand: ${o}`),console.error(" valid: stats, start, stop, frames, worst, transition"),/^--?reset$/.test(o)&&console.error(" note: 'perf start' already clears prior frames \u2014 no reset needed"),process.exit(1)}break}case"errors":{let o=i[1];if(o==="clear"){await Be(d),A(l)?E({cleared:!0}):console.log(" error buffer cleared");break}let t=o?Number(o):20,s=await fe(d,t);if(A(l)){E(s);break}if(s.length===0){console.log(" no errors captured");break}console.log(` ${s.length} error(s):
963
963
  `);for(let n of s){let c=ae(n.timestamp),u=n.args.map(p=>typeof p=="object"?JSON.stringify(p):p).join(" ");if(console.log(` [${c}] ${u}`),n.stack){let p=n.stack.split(`
964
964
  `).slice(0,3);for(let h of p)console.log(` ${h.trim()}`)}}break}case"warnings":{let o=i[1]?Number(i[1]):20,t=await ct(d,o);if(A(l)){E(t);break}if(t.length===0){console.log(" no warnings captured");break}console.log(` ${t.length} warning(s):
965
965
  `);for(let s of t){let n=ae(s.timestamp),c=s.args.map(u=>typeof u=="object"?JSON.stringify(u):u).join(" ");console.log(` [${n}] ${c}`)}break}case"animations":{let o=await Y(d,"listAnimations")??[];if(e.includes("--json")){console.log(JSON.stringify(o,null,2));break}if(o.length===0){console.log(" no active animations");break}console.log(` ${o.length} active animation(s):
@@ -979,7 +979,7 @@ ${t}
979
979
  `);let H=new Set,K=!0,U=()=>{K=!1};process.on("SIGINT",U);try{for(;K;){let _=await x(),w=R(_);for(let S of w)S.durationMs!=null&&(H.has(S.id)||(H.add(S.id),h?console.log(JSON.stringify(S)):so(S)));await te(250)}}finally{process.off("SIGINT",U)}break}case"logs":{let o=i[1],t=null,s=null,n=null,c=!1,u=!1,p=!1;for(let w=0;w<l.length;w++){let S=l[w];if(S==="--filter")t=l[w+1]??null,w++;else if(S==="--limit"){let k=Number(l[w+1]);Number.isFinite(k)&&(s=k),w++}else S==="--level"?(n=l[w+1]??null,w++):S==="--tail"||S==="-f"?c=!0:S==="--json"?u=!0:(S==="--internal"||S==="--all")&&(p=!0)}let h=n?new Set(n.split(",").map(w=>w.trim()).filter(w=>w==="log"||w==="info"||w==="warn"||w==="error"||w==="debug")):null;if(o==="clear"){await pt(d),console.log(" log buffer cleared");break}let f=!u&&process.stdout.isTTY===!0,x=s??(c?500:o?Number(o):50);Number.isFinite(x)||(console.error(` invalid limit: ${o} \u2014 \`logs\` takes a numeric count (e.g. ${b("logs")} 100).
980
980
  to target a specific sim, use \`--sim ${o}\` instead.`),process.exit(1));let R=()=>mt(d),H=w=>ft(w,{level:h,filter:t,showInternal:p});if(!c){let w=await R(),S=H(w).slice(-x);if(u){console.log(JSON.stringify(S,null,2));break}if(S.length===0){console.log(w.length===0?" no logs captured":" no matching logs");break}console.log(` ${S.length} log(s):
981
981
  `);for(let k of S)ro(k,f);break}console.log(` tailing logs (ctrl-c to stop)...
982
- `);let K=new Set,U=!0,_=()=>{U=!1};process.on("SIGINT",_);try{for(;U;){let w=await R(),S=H(w);for(let k of S)K.has(k.id)||(K.add(k.id),u?console.log(JSON.stringify(k)):ro(k,f));await te(250)}}finally{process.off("SIGINT",_)}break}default:console.error(` unknown subcommand: ${g}`),process.exit(1)}if(C.has(g)&&!e.includes("--no-wait")&&process.env.SOOTSIM_NO_AUTO_WAIT!=="1"&&!await Qe(d,g)&&await v(d),$.length>0&&Q($),!j.has(g)&&!A(l))try{await xe(d)}catch{}}catch($){let o=$ instanceof Error?$.message:String($);console.error(` ${g??"inspect"} failed: ${o}`);let t=/^no sim connected with id (.+)$/.exec(o),s=/^command timed out after (\d+)s$/.exec(o),n=o.startsWith("sim disconnected:")||o.startsWith("bridge never reconnected")||o.startsWith("could not connect to ws://");if(t)await Ft(d,O,t[1]);else if(/^no sim connected$/.test(o))Nt(O);else if(s)if(await Lo(d)){let u=g??"describe";process.stderr.write(` the sim is still responsive \u2014 '${u}' just exceeded the ${s[1]}s command budget.
982
+ `);let K=new Set,U=!0,_=()=>{U=!1};process.on("SIGINT",_);try{for(;U;){let w=await R(),S=H(w);for(let k of S)K.has(k.id)||(K.add(k.id),u?console.log(JSON.stringify(k)):ro(k,f));await te(250)}}finally{process.off("SIGINT",_)}break}default:console.error(` unknown subcommand: ${g}`),process.exit(1)}if(C.has(g)&&!e.includes("--no-wait")&&process.env.SOOTSIM_NO_AUTO_WAIT!=="1"&&!await Qe(d,g)&&await v(d),$.length>0&&Q($),!j.has(g)&&!A(l))try{await xe(d)}catch{}}catch($){let o=$ instanceof Error?$.message:String($);console.error(` ${g??"inspect"} failed: ${o}`);let t=/^no sim connected with id (.+)$/.exec(o),s=/^command timed out after (\d+)s$/.exec(o),n=o.startsWith("sim disconnected:")||o.startsWith("bridge never reconnected")||o.startsWith("could not connect to ws://");if(t)await It(d,O,t[1]);else if(/^no sim connected$/.test(o))Mt(O);else if(s)if(await Lo(d)){let u=g??"describe";process.stderr.write(` the sim is still responsive \u2014 '${u}' just exceeded the ${s[1]}s command budget.
983
983
  the screen's node tree is large; narrow the query or raise the budget:
984
984
  sootsim ${u} --testid <id> # scope to one subtree
985
985
  sootsim find --testid <id> # targeted single-node lookup
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as k}from"./chunk-QOOBQ6HM.js";import{a as x}from"./chunk-4J2BNSK5.js";import"./chunk-UNQ4TTPS.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as b}from"path";var h="https://sootbean.com/api/electron-release";function O(){let n=process.arch;if(process.platform==="darwin"){let o=n==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=n==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function I({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error(`empty response body (${n})`);y(A(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(r=>r?p(r):l())})}}function _(n,o){let e=(n/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(n/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${e} / ${t} MB`}async function L(n){let o=u("hdiutil",["attach","-nobrowse","-readonly",n],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as x}from"./chunk-IG7F7DTQ.js";import{a as k}from"./chunk-JFCJIRX6.js";import"./chunk-IHH3JCV5.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as b}from"path";var h="https://sootbean.com/api/electron-release";function O(){let n=process.arch;if(process.platform==="darwin"){let o=n==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=n==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function I({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error(`empty response body (${n})`);y(A(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(r=>r?p(r):l())})}}function _(n,o){let e=(n/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(n/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${e} / ${t} MB`}async function L(n){let o=u("hdiutil",["attach","-nobrowse","-readonly",n],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
3
3
  `),t=e[e.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=b(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),r=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return r.status!==0&&console.warn(` warning: failed to unmount ${t} (${r.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function C(n){let o=b(process.env.HOME||"","Applications");y(o,{recursive:!0});let e=f(o,"sootsim.AppImage");return w(e)&&g(e,{force:!0}),T(n,e),D(n),S(e,493),e}async function B(n){return await new Promise((o,e)=>{let s=v("cmd",["/c","start",'""',"/wait",n],{stdio:"inherit"});s.once("error",e),s.once("exit",t=>{t===0?o():e(new Error(`installer exited with code ${t}`))})}),n}async function q(n){(n.includes("--help")||n.includes("-h"))&&(console.log(`
4
4
  sootsim install-desktop \u2014 download and install the optional desktop GUI
5
5
 
@@ -17,7 +17,7 @@ options:
17
17
  examples:
18
18
  sootsim install-desktop
19
19
  sootsim install-desktop --yes
20
- `),process.exit(0));let o=n.includes("--yes")||n.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,e=n.includes("--force"),s=x();if(s&&!e){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=O();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await k("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(M(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
20
+ `),process.exit(0));let o=n.includes("--yes")||n.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,e=n.includes("--force"),s=k();if(s&&!e){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=O();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, linux-arm64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await x("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(M(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
21
21
  `);try{await I({url:t.url,dest:i,onProgress:(r,m)=>{let $=Date.now();$-d<100&&r<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${_(r,m)}`))}})}catch(r){g(a,{recursive:!0,force:!0});let m=r instanceof Error?r.message:String(r);console.error(`
22
22
  download failed: ${m}`),console.error(` the ${t.platform} desktop build may not be published yet, or your`),console.error(" network blocked the request. check your connection and try again later;"),console.error(" the CLI + daemon work without the desktop app (run: sootsim --help)."),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
23
- `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-RUW7S4RI.js");try{let r=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${r}`)}catch(r){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:r instanceof Error?r.message:String(r)}}),await p(),console.error(` install failed: ${r instanceof Error?r.message:String(r)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{q as runInstallDesktop};
23
+ `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-AHIQ3SS5.js");try{let r=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${r}`)}catch(r){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:r instanceof Error?r.message:String(r)}}),await p(),console.error(` install failed: ${r instanceof Error?r.message:String(r)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{q as runInstallDesktop};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as l,b as d,c as k,d as y,e as g}from"./chunk-PP7PACYK.js";import{d as c}from"./chunk-Q75UTFKH.js";import"./chunk-NAZ6A4UL.js";import"./chunk-UNQ4TTPS.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as l,b as d,c as k,d as y,e as g}from"./chunk-6GC57KRY.js";import{d as c}from"./chunk-N5LA5G7V.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
3
3
  created: ${t.record.label} (${t.record.keyPrefix}\u2026)`),console.log(` scopes: ${t.record.scopes.join(",")}`),console.log(`
4
4
  secret: ${t.secret}
5
5
  `),console.log(` copy this now \u2014 we can't show it again.
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as g,d as m}from"./chunk-Q75UTFKH.js";import"./chunk-NAZ6A4UL.js";import"./chunk-UNQ4TTPS.js";import{exec as O}from"node:child_process";import{randomBytes as S}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function L(){console.log(`
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as g,d as m}from"./chunk-N5LA5G7V.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";import{exec as O}from"node:child_process";import{randomBytes as S}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function L(){console.log(`
3
3
  sootsim login \u2014 sign in so desktop uploads can attach to your account
4
4
 
5
5
  usage:
@@ -21,6 +21,6 @@ options:
21
21
  <p style="color:#ccc">${r}</p>
22
22
  </div>
23
23
  </body>
24
- </html>`}async function P(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let c=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${c}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function A(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function G(r){(r.includes("--help")||r.includes("-h"))&&(L(),process.exit(0));let e=[...r],t=await x(R(e,"--origin"));if(A(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await P(t);if(o.ok){g({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let s=await m(t),l=s?.user?.email||o.email||s?.user?.id||o.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-RUW7S4RI.js");n({event:"cli_login_succeeded",identity:{userId:o.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let c=S(16).toString("hex"),i=await new Promise(o=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,$=a.searchParams.get("userId")||void 0,f=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),f){n.end(u(`sign-in failed: ${f}`)),o({ok:!1,error:f}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),o({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),o({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),o({ok:!0,token:k,email:b,userId:$}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),o({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){o({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",t),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
24
+ </html>`}async function P(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let c=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${c}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function A(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function G(r){(r.includes("--help")||r.includes("-h"))&&(L(),process.exit(0));let e=[...r],t=await x(R(e,"--origin"));if(A(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await P(t);if(o.ok){g({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let s=await m(t),l=s?.user?.email||o.email||s?.user?.id||o.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-AHIQ3SS5.js");n({event:"cli_login_succeeded",identity:{userId:o.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let c=S(16).toString("hex"),i=await new Promise(o=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,$=a.searchParams.get("userId")||void 0,f=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),f){n.end(u(`sign-in failed: ${f}`)),o({ok:!1,error:f}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),o({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),o({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),o({ok:!0,token:k,email:b,userId:$}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),o({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){o({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",t),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
25
25
  ${n.toString()}
26
- `),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-RUW7S4RI.js");o({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}g({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let d=await m(t),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-RUW7S4RI.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:t}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
26
+ `),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-AHIQ3SS5.js");o({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}g({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let d=await m(t),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-AHIQ3SS5.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:t}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r,b as i}from"./chunk-J4G763OR.js";import{a as t,c as o}from"./chunk-Q75UTFKH.js";import"./chunk-NAZ6A4UL.js";import"./chunk-UNQ4TTPS.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r,b as i}from"./chunk-YQNX7JK6.js";import{a as t,c as o}from"./chunk-N5LA5G7V.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as y,c as v}from"./chunk-QE5SNIDX.js";import"./chunk-KTBP6IDE.js";import"./chunk-GOXGNGTF.js";import"./chunk-KNMWUV5H.js";import{b as h,c as w}from"./chunk-YOV2FYD5.js";import"./chunk-EPYUJWRX.js";import"./chunk-7VU3YG3I.js";import"./chunk-RQO5HYDO.js";import"./chunk-RYITW4MR.js";import"./chunk-YBJAGDCL.js";import"./chunk-E7COXON3.js";import"./chunk-4J2BNSK5.js";import"./chunk-USRV336W.js";import"./chunk-Q663VZYT.js";import"./chunk-PP7PACYK.js";import"./chunk-LMP3GS2H.js";import"./chunk-6BSBIS6H.js";import"./chunk-TM22UZS6.js";import"./chunk-K5XREVFN.js";import"./chunk-J4G763OR.js";import"./chunk-Q75UTFKH.js";import"./chunk-LSVJ3NND.js";import"./chunk-WTKLDWWH.js";import"./chunk-RCRWF4N5.js";import"./chunk-BI3LQWFJ.js";import"./chunk-NAZ6A4UL.js";import"./chunk-HVCUXVTL.js";import"./chunk-U3O67O6Z.js";import"./chunk-UNQ4TTPS.js";import*as n from"fs";import*as a from"path";var S=[".maestro","maestro"];function k(){console.log(`
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as y,c as v}from"./chunk-WDMIABUY.js";import"./chunk-C3WRMMUM.js";import"./chunk-VGTPGXKM.js";import"./chunk-MXXD5U6B.js";import"./chunk-NBF2SXAH.js";import"./chunk-6GC57KRY.js";import{b as h,c as w}from"./chunk-T5YWTSGG.js";import"./chunk-WLDAMCQK.js";import"./chunk-FD4BKULK.js";import"./chunk-7DKGX746.js";import"./chunk-7DHLNDOA.js";import"./chunk-WMLFWLD7.js";import"./chunk-ID25RWPE.js";import"./chunk-YYS2ITHH.js";import"./chunk-7C6RC3BU.js";import"./chunk-AKQWG57K.js";import"./chunk-JFCJIRX6.js";import"./chunk-IZMNFZXZ.js";import"./chunk-WNUF6LJX.js";import"./chunk-WSN7MF4E.js";import"./chunk-YQNX7JK6.js";import"./chunk-N5LA5G7V.js";import"./chunk-T4XAQ7VQ.js";import"./chunk-MFL73VJG.js";import"./chunk-Q2S6VBXK.js";import"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-OGLOOKK6.js";import"./chunk-IHH3JCV5.js";import*as n from"fs";import*as a from"path";var S=[".maestro","maestro"];function k(){console.log(`
3
3
  sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b}from"./chunk-YYS2ITHH.js";import"./chunk-IHH3JCV5.js";export{a as loadOptionalDemoApps,b as optionalDemoAppsSync};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-UNQ4TTPS.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-IHH3JCV5.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
3
3
  sootsim preview \u2014 production-like preview
4
4
 
5
5
  usage: