sootsim 0.1.45 → 0.1.46

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 (135) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-NSVMKP3P.js → agent-4SFE3DNP.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-HREUS3JR.js → agent-wrapper-BCXD55HW.js} +2 -2
  4. package/dist-cli/chunks/{assert-N7KX2APG.js → assert-ILRVN6CB.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-A4ML6QTW.js +2 -0
  6. package/dist-cli/chunks/beta-34TOAZFI.js +2 -0
  7. package/dist-cli/chunks/{chunk-AFBOAQAV.js → chunk-4OPZYTVB.js} +1 -1
  8. package/dist-cli/chunks/{chunk-QJMUNN2V.js → chunk-7CZ5VL7E.js} +1 -1
  9. package/dist-cli/chunks/{chunk-EHJMKPJP.js → chunk-BVXZZOBA.js} +2 -2
  10. package/dist-cli/chunks/{chunk-N4KSVDAU.js → chunk-DGAHFMAU.js} +2 -2
  11. package/dist-cli/chunks/{chunk-HZ5W4PIP.js → chunk-FCFKR7EM.js} +4 -4
  12. package/dist-cli/chunks/{chunk-2V4ALWOZ.js → chunk-FLJAN5PS.js} +2 -2
  13. package/dist-cli/chunks/{chunk-2WW7WJHA.js → chunk-GWOV6KFE.js} +1 -1
  14. package/dist-cli/chunks/{chunk-PPY2OTIR.js → chunk-H46ZLTT5.js} +1 -1
  15. package/dist-cli/chunks/{chunk-FNXGAYHN.js → chunk-K3I6VLF3.js} +1 -1
  16. package/dist-cli/chunks/{chunk-CBMFBTB3.js → chunk-KETYRULQ.js} +2 -2
  17. package/dist-cli/chunks/chunk-KV7XS7WL.js +1 -0
  18. package/dist-cli/chunks/{chunk-PNEIZ2DY.js → chunk-M5HZVUQQ.js} +1 -1
  19. package/dist-cli/chunks/{chunk-WUZSBXWF.js → chunk-MDSET24U.js} +2 -2
  20. package/dist-cli/chunks/chunk-MGEB3WEI.js +117 -0
  21. package/dist-cli/chunks/{chunk-QAL3T64I.js → chunk-MJD6C3BG.js} +2 -2
  22. package/dist-cli/chunks/{chunk-HNOQEJK3.js → chunk-N7DDQ5ZB.js} +2 -2
  23. package/dist-cli/chunks/{chunk-4RG3RPXB.js → chunk-OHI4DJSD.js} +1 -1
  24. package/dist-cli/chunks/{chunk-CFY2ELQ4.js → chunk-OMPAUB4V.js} +3 -3
  25. package/dist-cli/chunks/{chunk-ECI22OZU.js → chunk-OZICEBUA.js} +2 -2
  26. package/dist-cli/chunks/{chunk-CPCM75G3.js → chunk-PAOOYAVI.js} +2 -2
  27. package/dist-cli/chunks/{chunk-CVMSXDFO.js → chunk-PEXPACO5.js} +1 -1
  28. package/dist-cli/chunks/{chunk-3K4GAAOE.js → chunk-PG6FUKZX.js} +2 -2
  29. package/dist-cli/chunks/{chunk-WI72PADL.js → chunk-PKVNCXQD.js} +2 -2
  30. package/dist-cli/chunks/{chunk-65Q34YMN.js → chunk-PRRVFNFG.js} +2 -2
  31. package/dist-cli/chunks/{chunk-JKG66FDZ.js → chunk-QXJR74QV.js} +1 -1
  32. package/dist-cli/chunks/chunk-RSMU24BE.js +1 -0
  33. package/dist-cli/chunks/{chunk-25K4SXL3.js → chunk-S4OSFQIC.js} +2 -2
  34. package/dist-cli/chunks/{chunk-FGLQTXGF.js → chunk-SG7ICXM2.js} +3 -3
  35. package/dist-cli/chunks/chunk-T4H37KU7.js +2 -0
  36. package/dist-cli/chunks/chunk-UH5PKJXT.js +1 -0
  37. package/dist-cli/chunks/chunk-VWJ4O366.js +1 -0
  38. package/dist-cli/chunks/{chunk-ZSDPMO6R.js → chunk-W52DGZNV.js} +1 -1
  39. package/dist-cli/chunks/{chunk-VLWCOUVW.js → chunk-WD36PEEJ.js} +2 -2
  40. package/dist-cli/chunks/{chunk-R2VBXQYS.js → chunk-WRNSX5RR.js} +2 -2
  41. package/dist-cli/chunks/{chunk-ZR2EL6AG.js → chunk-WWEMLI77.js} +1 -1
  42. package/dist-cli/chunks/{chunk-TIE6ENCX.js → chunk-X7P3CGPY.js} +3 -3
  43. package/dist-cli/chunks/{chunk-YU2F5Y7A.js → chunk-XKNZR4BB.js} +2 -2
  44. package/dist-cli/chunks/{chunk-OSFZQ7NV.js → chunk-XSJ4SU63.js} +31 -31
  45. package/dist-cli/chunks/{chunk-T3PYVAO7.js → chunk-XT36ZR2H.js} +1 -1
  46. package/dist-cli/chunks/{chunk-BARR77SV.js → chunk-XU27QCRX.js} +1 -1
  47. package/dist-cli/chunks/{chunk-KJLLZQJO.js → chunk-YZ7BSNJJ.js} +2 -2
  48. package/dist-cli/chunks/{chunk-BVLKRIBN.js → chunk-Z6BJVYOU.js} +1 -1
  49. package/dist-cli/chunks/{chunk-FBKOSZKD.js → chunk-Z7J6LG53.js} +2 -2
  50. package/dist-cli/chunks/chunk-ZM4JL3VP.js +11 -0
  51. package/dist-cli/chunks/{compat-WZHG6K4B.js → compat-IC7P6QWF.js} +3 -3
  52. package/dist-cli/chunks/{config-E4ENAYVL.js → config-WVL2Y7UU.js} +2 -2
  53. package/dist-cli/chunks/control-7VDRDQXQ.js +2 -0
  54. package/dist-cli/chunks/{cpu-profile-5VX6YXR5.js → cpu-profile-FJIMZKXF.js} +2 -2
  55. package/dist-cli/chunks/{daemon-L4IR5GKS.js → daemon-TH7B22C4.js} +2 -2
  56. package/dist-cli/chunks/{debug-RPLWF66R.js → debug-MN6RXRJO.js} +3 -3
  57. package/dist-cli/chunks/demo-app-registry-ISNBFJTI.js +2 -0
  58. package/dist-cli/chunks/{detox-F4I7XDUZ.js → detox-BUJ3IOIB.js} +2 -2
  59. package/dist-cli/chunks/{device-DAHI737I.js → device-MUCGW2TT.js} +2 -2
  60. package/dist-cli/chunks/{diagnose-YR7GNYPN.js → diagnose-5NADXMRL.js} +2 -2
  61. package/dist-cli/chunks/drivers-RXVSKXUD.js +2 -0
  62. package/dist-cli/chunks/{electron-GC7AQHGS.js → electron-ON6434HQ.js} +3 -3
  63. package/dist-cli/chunks/flow-WI5MN76X.js +2 -0
  64. package/dist-cli/chunks/{hints-FPPTZ5A4.js → hints-23C3BW62.js} +2 -2
  65. package/dist-cli/chunks/{home-paths-6KKZMFRE.js → home-paths-DAI3XZLG.js} +2 -2
  66. package/dist-cli/chunks/{inspect-RDGBV7FC.js → inspect-UVS4UIJF.js} +91 -91
  67. package/dist-cli/chunks/install-QKH2JQGE.js +2 -0
  68. package/dist-cli/chunks/{install-desktop-NVXLOF4C.js → install-desktop-6BT3VL2C.js} +3 -3
  69. package/dist-cli/chunks/{keys-WUPEDL27.js → keys-4OT37H4C.js} +2 -2
  70. package/dist-cli/chunks/{launch-KIVZVX45.js → launch-2C3YGABQ.js} +3 -3
  71. package/dist-cli/chunks/{login-6VWSRHCZ.js → login-NWY5ENAT.js} +4 -4
  72. package/dist-cli/chunks/{logout-JASQH22U.js → logout-6BHGSVMN.js} +2 -2
  73. package/dist-cli/chunks/{maestro-UINOO5ZB.js → maestro-V7WIYUNE.js} +2 -2
  74. package/dist-cli/chunks/{preview-7QA7XGF4.js → preview-H2ACZ26A.js} +2 -2
  75. package/dist-cli/chunks/{profile-L43GQNI7.js → profile-ZLDFCIZA.js} +2 -2
  76. package/dist-cli/chunks/{react-4WDCAK7S.js → react-PEM4I7YB.js} +2 -2
  77. package/dist-cli/chunks/{record-VJGGKQBY.js → record-KVBDN3GC.js} +8 -7
  78. package/dist-cli/chunks/runtime-LLWAHSVR.js +2 -0
  79. package/dist-cli/chunks/{runtime-delivery-XQBDABU4.js → runtime-delivery-ECDTRILR.js} +2 -2
  80. package/dist-cli/chunks/{screenshot-N67LQOUY.js → screenshot-PJEMMFQO.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-EWTPX4XH.js → screenshot-mode-DKPHJONC.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-WY27EWBW.js → screenshots-5UQ36N7Q.js} +2 -2
  83. package/dist-cli/chunks/{server-57MUO65L.js → server-LADTO7OS.js} +2 -2
  84. package/dist-cli/chunks/setup-repo-TXI7Q6F6.js +2 -0
  85. package/dist-cli/chunks/{skills-TDFRPGQ2.js → skills-FUN6M66H.js} +2 -2
  86. package/dist-cli/chunks/{start-TNY3DBAJ.js → start-A6FDAXGU.js} +4 -4
  87. package/dist-cli/chunks/store-KTDAA7SP.js +2 -0
  88. package/dist-cli/chunks/telemetry-VPFS3BGR.js +2 -0
  89. package/dist-cli/chunks/{test-N4RCDGFL.js → test-HPXQTADO.js} +3 -3
  90. package/dist-cli/chunks/{three-mode-YWFPU7KR.js → three-mode-2APCW2N7.js} +2 -2
  91. package/dist-cli/chunks/{timeline-OAZXNDFK.js → timeline-6D6V6LRX.js} +2 -2
  92. package/dist-cli/chunks/{upgrade-QUS553XV.js → upgrade-KZIO3ZJH.js} +2 -2
  93. package/dist-cli/chunks/upload-LDL3FZKD.js +2 -0
  94. package/dist-cli/chunks/{web-UR3EWC7V.js → web-MR4EQWCC.js} +2 -2
  95. package/dist-cli/chunks/{what-happened-6UNRX4BP.js → what-happened-FHQD42JV.js} +2 -2
  96. package/dist-cli/chunks/{whoami-I5VW66LS.js → whoami-GHNFMMK4.js} +2 -2
  97. package/dist-lib/agent-daemon-client.cjs +1 -1
  98. package/dist-lib/agent-events.cjs +1 -1
  99. package/dist-lib/agent-sessions.cjs +1 -1
  100. package/dist-lib/attached-projects.cjs +1 -1
  101. package/dist-lib/auth/shared-session.cjs +1 -1
  102. package/dist-lib/backend-origin.cjs +1 -1
  103. package/dist-lib/bridge-constants.cjs +1 -1
  104. package/dist-lib/cli-constants.cjs +1 -1
  105. package/dist-lib/config.cjs +1 -1
  106. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  107. package/dist-lib/home-paths.cjs +1 -1
  108. package/dist-lib/host/bridge-host.cjs +1 -1
  109. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  110. package/dist-lib/index.cjs +1 -1
  111. package/dist-lib/metro.cjs +1 -1
  112. package/dist-lib/profiles.cjs +1 -1
  113. package/dist-lib/render-mode.cjs +1 -1
  114. package/dist-lib/vite-base.cjs +1 -1
  115. package/dist-lib/vite.cjs +1 -1
  116. package/package.json +1 -1
  117. package/dist-cli/chunks/auto-bootstrap-YCOWYMVV.js +0 -2
  118. package/dist-cli/chunks/beta-UF2ITPYH.js +0 -2
  119. package/dist-cli/chunks/chunk-5IJS7CFG.js +0 -117
  120. package/dist-cli/chunks/chunk-72GGPCB2.js +0 -2
  121. package/dist-cli/chunks/chunk-7VSW2XVU.js +0 -1
  122. package/dist-cli/chunks/chunk-A5EZYWAO.js +0 -1
  123. package/dist-cli/chunks/chunk-LRE73CBG.js +0 -1
  124. package/dist-cli/chunks/chunk-MDT2KSFY.js +0 -11
  125. package/dist-cli/chunks/chunk-PLTKWJ7M.js +0 -1
  126. package/dist-cli/chunks/control-USODFZCF.js +0 -2
  127. package/dist-cli/chunks/demo-app-registry-3SDEOEC4.js +0 -2
  128. package/dist-cli/chunks/drivers-FYOQW4OZ.js +0 -2
  129. package/dist-cli/chunks/flow-65752NAO.js +0 -2
  130. package/dist-cli/chunks/install-PA5K5XJ6.js +0 -2
  131. package/dist-cli/chunks/runtime-JM4WL6FX.js +0 -2
  132. package/dist-cli/chunks/setup-repo-6PKR67R6.js +0 -2
  133. package/dist-cli/chunks/store-LMNSJWN7.js +0 -2
  134. package/dist-cli/chunks/telemetry-7TOFRDK5.js +0 -2
  135. package/dist-cli/chunks/upload-OT5RQ4QV.js +0 -2
@@ -1,11 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as B,b as H,c as ne}from"./chunk-4RG3RPXB.js";import{b as T}from"./chunk-CVMSXDFO.js";import{g as se}from"./chunk-HZ5W4PIP.js";import{a as x,b as z}from"./chunk-BARR77SV.js";import{c as re}from"./chunk-YU2F5Y7A.js";import{d as oe}from"./chunk-AFBOAQAV.js";import{a as Y}from"./chunk-72GGPCB2.js";import{b as te,c as S,d as w,e as $}from"./chunk-N4KSVDAU.js";import{c as N,d as g,e as F}from"./chunk-ZR2EL6AG.js";import{E as Z,F as ee}from"./chunk-PNEIZ2DY.js";import xe from"node:fs";import Ce from"node:os";import j from"node:path";function ge(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function _(e){let t=ge(e);return t==="localhost"||t.endsWith(".localhost")||t==="0.0.0.0"||t==="::1"||/^127(?:\.\d{1,3}){3}$/.test(t)}function ie(e){return new Error(`could not resolve a native bundle for ${e}. pass an explicit bundle URL or open Connect and choose the app there.`)}function we(e,t){return e?.includes("/one/metro-entry.bundle")?"one":typeof t=="string"&&t?"expo":"unknown"}function ce(e,t,o){return`${e}//${t}:${o}`}function be(e){if(typeof window>"u")return!1;try{let t=new URL(e);return _(t.hostname)&&_(window.location.hostname)&&t.origin!==window.location.origin}catch{return!1}}async function ae(e,t){let o={...t,cache:t?.cache??"no-store"};return be(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,o):fetch(e,o)}function ye(e){return e==="https:"?443:80}function Se(e){let t=e.pathname||"/";return(t==="/"||t==="")&&!e.search&&!e.hash}async function le(e,t){let o=e.replace(/\/+$/,"");try{let n=await ae(`${o}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},i=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(i||s.name)return{bundleUrl:ne(i||`${o}${H}`),port:t,framework:we(i,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await ae(`${o}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${o}${H}`,port:t,framework:"metro"}}catch{}return null}async function $e(e){return le(ce("http:","localhost",e),e)}async function q(e){let t=e.trim();if(/^\d+$/.test(t)){let a=parseInt(t,10),l=await $e(a);if(l)return l;throw ie(`localhost:${a}`)}let o=t.startsWith("http")?t:`http://${t}`,n;try{n=new URL(o)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):ye(r),i=ce(r,n.hostname,s);if(_(n.hostname)&&Se(n)){let a=await le(i,s);if(a)return a;throw ie(i)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function je(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim install-desktop"),console.error(""),console.error(" or wire sootsim into your own project so your dev server hosts the bridge:"),console.error(" sootsim setup-repo"),console.error("")}function me(e){let t=x();if(console.log(` note: no sootsim bridge detected on port ${e}`),t){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function ve(e){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${e}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function We(e,t,o){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){ve(t);return}console.error(` no sim with id "${o}" is connected to the bridge on port ${t}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var Pe={rn:"/rn",connectrn:"/rn","connect-rn":"/rn",clock:"/app/clock","native-ui":"/app/native-ui",tamagui:"/app/tamagui",settings:"/app/settings",photos:"/app/photos",camera:"/app/camera"};function I(e){return new Promise(t=>setTimeout(t,e))}function G(e){return e.trim()}function W(e){try{let t=new URL(e),o=t.pathname.replace(/\/+$/,"")||"/";return t.searchParams.has("open")||t.searchParams.has("port")||t.searchParams.has("bundle")||t.searchParams.has("demo")||t.pathname.includes("/sootsim/index.html")||o==="/sootsim"||t.pathname==="/__soot"||t.pathname==="/__soot/"||o==="/rn"||/^\/rn\/[^/]+$/i.test(o)||/^\/app\/[^/]+$/i.test(o)||o==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(o)||/^\/__soot\/app\/[^/]+$/i.test(o)}catch{return!1}}async function co(e){let t=G(e);return(await q(t)).bundleUrl}function Q(e){let t=e.replace(/\/+$/,"")||"/";return t==="/__soot"||t.startsWith("/__soot/")?"/__soot":""}function Ie(e,t){let o=G(e),n=new URL(t),r=Q(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(o)?n.pathname=`${r}/rn/${o}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",o)),n.toString()}function Ue(e){let t=G(e);return/^\d+$/.test(t)||/^https?:\/\//i.test(t)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(t)}async function ke(e,t){let o=await q(e),n=new URL(t),r=Q(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.set("bundle",o.bundleUrl),n.toString()}function Me(e){return e.startsWith("~/")?j.join(Ce.homedir(),e.slice(2)):j.isAbsolute(e)?e:j.resolve(process.cwd(),e)}function Te(e){let t={};for(let o=0;o<e.length;o++){if(e[o]!=="--replace")continue;let n=e[o+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let s=n.slice(0,r).trim(),i=Me(n.slice(r+1).trim());xe.existsSync(i)||(console.error(` sootsim open: replacement file not found: ${i}`),process.exit(1)),t[s]={file:i},o++}return Object.keys(t).length>0?{modules:t}:void 0}function ue(){let e=Z();return ee(e)&&e.runtimePort>0?`http://localhost:${e.runtimePort}/`:Y}async function R(e,t=ue()){if(!e)return new URL(t).toString();if(W(e))return new URL(e).toString();let o=Pe[e.toLowerCase()];if(o){let n=new URL(t),r=Q(n.pathname);return n.pathname=`${r}${o}`,n.toString()}return Ue(e)?ke(e,t):Ie(e,t)}function de(e,t){let o=e?.url||e?.origin||t;try{let n=new URL(o);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.toString()}catch{return t}}async function Be(e,t,o){let n=new URL(await R(e,t));return n.searchParams.set("inspectOpen",o),n.toString()}async function _e(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500,i=n.minNodeCount??10;for(let a=0;a<r;a++){let l=w(e,{commandTimeoutMs:t,simId:o,simIdSource:"flag"});try{let m=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof m=="number"&&m>i)return{bridge:l,count:m}}catch{}l.close(),await I(s)}return null}function Oe(e){if(!e)return null;try{let t=new URL(e);if(t.searchParams.has("bundle")){let o=t.searchParams.get("bundle")||"";try{let n=new URL(o),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return t.searchParams.has("port")?`connect :${t.searchParams.get("port")||""}`:t.searchParams.has("open")?`connect ${t.searchParams.get("open")||""}`:t.searchParams.has("demo")?`demo ${t.searchParams.get("demo")||"default"}`:t.pathname.includes("/sootsim/index.html")||t.pathname==="/sootsim/"||t.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function Re(e,t){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
3
- `);for(let o of e){let n=o.lockedBy&&o.lockExpiresAt?`locked by ${o.lockedBy} (${Math.max(0,Math.round((o.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[o.isPrimary?"primary":"",o.id===t?"selected":"",o.readyState,o.attachedCliCount&&o.attachedCliCount>0?"in use":"",o.userFocused?"focused":"",n].filter(Boolean);console.log(` ${o.id}${r.length?` [${r.join(", ")}]`:""}`);let s=Oe(o.url);if(s&&console.log(` loaded: ${s}`),o.url?console.log(` url: ${o.url}`):o.origin&&console.log(` origin: ${o.origin}`),o.title&&console.log(` title: ${o.title}`),console.log(` connected: ${new Date(o.connectedAt).toISOString()}`),o.lastActiveAt&&o.lastActiveAt>0){let i=Math.round((Date.now()-o.lastActiveAt)/1e3),a=i<60?`${i}s ago`:i<3600?`${Math.round(i/60)}m ago`:`${Math.round(i/3600)}h ago`;console.log(` last active: ${a}`)}}}async function O(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500;for(let i=0;i<r;i++){let a=w(e,{commandTimeoutMs:t});try{let m=(await a.listSims()).find(o);if(m)return m}catch{}finally{a.close()}await I(s)}return null}async function Le(e,t,o,n={}){let r=n.attempts??20,s=n.intervalMs??250;for(let i=0;i<r;i++){let a=w(e,{commandTimeoutMs:t});try{let m=(await a.listSims()).find(b=>b.id===o);if(!m||m.readyState!=="open")return!0}catch{return!0}finally{a.close()}await I(s)}return!1}function L(e,t){if(t){let r=t.trim(),s=e.find(i=>i.id===r);if(!s)throw new Error(`no sim connected with id ${r}`);return s}let o=e.find(r=>r.isPrimary&&r.readyState==="open");if(o)return o;let n=e.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function C(e,t,o){console.log(` ${o==="current sim"?"loaded":"opened"}: ${e} [${o}]`),console.log(` current sim: ${t.id}`),console.log(JSON.stringify({simId:t.id,url:t.url},null,2))}async function P(e,t,o){if(o.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await Ee(e,t,{stableMs:150,maxMs:400});let r=w(e,{commandTimeoutMs:3e3,simId:t,cliLabel:"open --describe",simIdSource:"flag"});try{let i=`(async () => {
4
- const t = window.__sootsimTest
5
- const ms = window.SootSim?.bridges?.mainShell
6
- if (!t) return null
7
- let shell = null
8
- try { shell = ms?.getState ? await ms.getState() : null } catch {}
9
- const tree = await t.dumpTree(12, ${JSON.stringify({describe:!0,verbose:!1,filter:""})})
10
- return { tree, shell }
11
- })()`,a=await r.send({type:"evaluate",code:i});if(!a?.tree)return;if(console.log(""),a.shell?.state){let l=[`state=${a.shell.state}`,a.shell.activeApp?`app=${a.shell.activeApp}`:null].filter(Boolean);console.log(` shell: ${l.join(" ")}`)}console.log(a.tree)}finally{r.close()}}catch{}finally{n===void 0?delete process.env.SOOTSIM_QUIET_TARGET_NOTICE:process.env.SOOTSIM_QUIET_TARGET_NOTICE=n}}async function Ee(e,t,o){let n=Date.now()+o.maxMs,r="(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()",s=w(e,{commandTimeoutMs:2e3,simId:t,simIdSource:"flag"});try{let i=-1,a=0;for(;Date.now()<n;){let l=-1;try{let m=await s.send({type:"evaluate",code:r});typeof m=="number"&&(l=m)}catch{}if(l>=0&&l===i){if(Date.now()-a>=o.stableMs)return}else i=l,a=Date.now();await I(50)}}finally{s.close()}}async function lo(e,t={}){let o=S(e,{port:t.port,commandTimeoutMs:t.timeoutMs}),n=$(o);try{let r=await n.listSims();Re(r,o.simId)}finally{n.close()}}async function mo(e,t={}){let o=S(e,{port:t.port,commandTimeoutMs:t.timeoutMs,stripBooleanFlags:["--new","--headless","--ephemeral"],stripValueFlags:["--base-url","--replace","--driver","--profile"]}),n=e.find((c,d)=>e[d-1]==="--profile"),r=e.includes("--ephemeral");n&&r&&(console.error(" sootsim open: --profile cannot be combined with --ephemeral"),process.exit(1));let s=n?re(n).id:void 0,i=!!s||r,a=e.includes("--new")||i,l=Te(e);a&&o.simIdSource==="flag"&&(console.error(" sootsim open: --new, --profile, and --ephemeral cannot be combined with --sim"),process.exit(1));let m=o.positional[0]||"",b=e.find((c,d)=>e[d-1]==="--driver")||"",fe=e.includes("--headless"),v=e.find((c,d)=>e[d-1]==="--base-url")||ue(),J=e.includes("--base-url"),K=N();if(!a&&(o.simIdSource==="flag"||o.simIdSource==="saved"&&!!K)){let c=$(o),d=o.simId?` --sim ${o.simId}`:"",u=!1;try{let p=null;try{let h=await c.listSims();if(o.simIdSource==="saved"?(p=h.find(y=>y.id===K&&y.readyState==="open")??null,p||F()):p=L(h,o.simId),!p)if(o.simIdSource==="saved")u=!0;else throw new Error("no sim connected");if(!u&&p){let y=J||W(m)?v:de(p,v),M=await R(m,B(y,l));c.send({type:"evaluate",simId:p.id,code:`window.location.href = ${JSON.stringify(M)}`}).catch(()=>{})}}catch(h){console.error(` open failed: ${h instanceof Error?h.message:String(h)}`),await T(c,{errorsCommand:`sootsim get errors 5${d}`,warningsCommand:`sootsim get warnings 5${d}`,requestsCommand:`sootsim get requests 5${d}`}),process.exit(1)}if(!u&&p){await I(1500);let h=await _e(o.wsPort,o.commandTimeoutMs,p.id);h||(console.error(" timed out waiting for current sim to load target"),process.exit(1)),h.bridge.close(),g(p.id);let y=J||W(m)?v:de(p,v),M=await R(m,B(y,l));C(M,{...p,url:M},"current sim"),await P(o.wsPort,p.id,e);return}}finally{c.close()}}let V=B(v,l),he=await R(m,V),X=`cli-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,f=await Be(m,V,X),E={newWindow:!0},U=c=>c.url?.includes(`inspectOpen=${X}`)??!1;if(b){let c=se(b);c||(console.error(` unknown driver "${b}" \u2014 run \`sootsim list --drivers\``),process.exit(1));let d=await c.launch({url:f,headless:fe,newWindow:E.newWindow,profileId:s,ephemeralProfile:r});d.launched||(console.error(` ${c.name} driver: ${d.message}`),process.exit(1));let u=await O(o.wsPort,o.commandTimeoutMs,U,{attempts:60,intervalMs:500});u||(console.error(" timed out waiting for opened sim to connect"),process.exit(1)),g(u.id),C(f,u,`${c.name} driver`),await P(o.wsPort,u.id,e);return}if(i){let c=x();c||(console.error(" profiles require electron or playwright; install the desktop companion or use `--driver playwright`"),process.exit(1));try{(await z(f,c,{profileId:s,ephemeralProfile:r})).launched||(console.error(" desktop companion failed to start"),process.exit(1))}catch(u){console.error(` desktop companion failed: ${u instanceof Error?u.message:String(u)}`),process.exit(1)}let d=await O(o.wsPort,o.commandTimeoutMs,U,{attempts:40,intervalMs:500});d||(console.error(" timed out waiting for profiled sim to connect"),process.exit(1)),g(d.id),C(f,d,"desktop companion"),await P(o.wsPort,d.id,e);return}let D=!1,A=!1;try{let c=w(o.wsPort,{commandTimeoutMs:2e3});try{await c.listSims(),D=!0}finally{c.close()}}catch{}if(D)try{let c=w(o.wsPort,{commandTimeoutMs:3e3});try{await c.openUrl(f,E),A=!0}finally{c.close()}}catch{}if(!A){let c=x();if(c)try{if((await z(f,c)).launched){let u=await O(o.wsPort,o.commandTimeoutMs,U,{attempts:20,intervalMs:500});if(u){g(u.id),C(f,u,"desktop companion"),await P(o.wsPort,u.id,e);return}}}catch{}if(await oe(f,E),!D){console.log(` opened: ${he}`),me(o.wsPort);return}}let k=await O(o.wsPort,o.commandTimeoutMs,U,{attempts:30,intervalMs:500});k||(console.error(" timed out waiting for opened sim to connect"),process.exit(1)),g(k.id),C(f,k,A?"bridge":"direct shell open"),await P(o.wsPort,k.id,e)}async function pe(e,t={}){let o=S(e,{port:t.port,commandTimeoutMs:t.timeoutMs}),n=$(o),r=o.simId?` --sim ${o.simId}`:"";try{try{let s=await n.listSims(),i=L(s,o.positional[0]||o.simId);await n.focusSim(i.id),g(i.id),console.log(` using: ${i.id}`)}catch(s){console.error(` use failed: ${s instanceof Error?s.message:String(s)}`),await T(n,{errorsCommand:`sootsim get errors 5${r}`,warningsCommand:`sootsim get warnings 5${r}`,requestsCommand:`sootsim get requests 5${r}`}),process.exit(1)}}finally{n.close()}}async function uo(e,t={}){await pe(e,t)}async function po(e,t={}){await pe(e,t)}async function fo(e,t={}){let o=S(e,{port:t.port,commandTimeoutMs:t.timeoutMs,stripBooleanFlags:["--force"]}),n=e.includes("--force"),r=$(o);try{try{let s=await r.listSims(),i=L(s,o.positional[0]||o.simId),a=n&&i.lockedBy&&i.lockedByKind!=="user-active"?i.lockedBy:null,l=await r.claim(i.id,{force:n});g(i.id);let m=Math.max(0,Math.round((l.lockExpiresAt-Date.now())/1e3)),b=l.bootedCount>0?` (booted ${l.bootedCount})`:"";console.log(` claimed: ${l.simId} [${m}s]${b}`),a&&console.log(` took over from: ${a}`)}catch(s){if(s instanceof te){let i=Math.max(0,Math.round(s.lock.expiresInMs/1e3));console.error(` claim failed: locked by ${s.lock.by} for ${i}s more`),console.error(" use --force to take it, or `sootsim open --new` for a fresh sim"),process.exit(1)}console.error(` claim failed: ${s instanceof Error?s.message:String(s)}`),process.exit(1)}}finally{r.close()}}async function ho(e,t={}){let o=S(e,{port:t.port,commandTimeoutMs:t.timeoutMs}),n=$(o),r=o.simId?` --sim ${o.simId}`:"";try{try{let s=await n.listSims(),i=L(s,o.positional[0]||o.simId),a=s.find(m=>m.id!==i.id&&m.readyState==="open");if(await n.closeSim(i.id),!await Le(o.wsPort,o.commandTimeoutMs,i.id)){console.log(` close requested: ${i.id} (still connected)`);return}N()===i.id&&(a?g(a.id):F()),console.log(` closed: ${i.id}`)}catch(s){console.error(` close failed: ${s instanceof Error?s.message:String(s)}`),await T(n,{errorsCommand:`sootsim get errors 5${r}`,warningsCommand:`sootsim get warnings 5${r}`,requestsCommand:`sootsim get requests 5${r}`}),process.exit(1)}}finally{n.close()}}export{je as a,ve as b,We as c,co as d,ue as e,R as f,Be as g,Oe as h,Re as i,O as j,lo as k,mo as l,uo as m,po as n,fo as o,ho as p};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.45 | (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}from"./chunk-MDT2KSFY.js";import"./chunk-4RG3RPXB.js";import"./chunk-CVMSXDFO.js";import"./chunk-HZ5W4PIP.js";import"./chunk-BARR77SV.js";import"./chunk-YU2F5Y7A.js";import"./chunk-7VSW2XVU.js";import"./chunk-AFBOAQAV.js";import"./chunk-72GGPCB2.js";import"./chunk-N4KSVDAU.js";import"./chunk-ZR2EL6AG.js";import"./chunk-LRE73CBG.js";import"./chunk-PNEIZ2DY.js";import"./chunk-2WW7WJHA.js";export{d as buildOpenUrl,c as buildShellUrl,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,l as runClaimCommand,m as runCloseCommand,k as runFocusCommand,h as runListCommand,i as runOpenCommand,j as runUseCommand,e as summarizeSimUrl,g as waitForSimMatch};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-3K4GAAOE.js";import"./chunk-2WW7WJHA.js";export{a as APPS};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-A5EZYWAO.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-HZ5W4PIP.js";import"./chunk-BARR77SV.js";import"./chunk-YU2F5Y7A.js";import"./chunk-7VSW2XVU.js";import"./chunk-AFBOAQAV.js";import"./chunk-PNEIZ2DY.js";import"./chunk-2WW7WJHA.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,2 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d}from"./chunk-OSFZQ7NV.js";import"./chunk-ECI22OZU.js";import"./chunk-2V4ALWOZ.js";import"./chunk-PLTKWJ7M.js";import"./chunk-FBKOSZKD.js";import"./chunk-FGLQTXGF.js";import"./chunk-MDT2KSFY.js";import"./chunk-4RG3RPXB.js";import"./chunk-CVMSXDFO.js";import"./chunk-HZ5W4PIP.js";import"./chunk-BARR77SV.js";import"./chunk-YU2F5Y7A.js";import"./chunk-3K4GAAOE.js";import"./chunk-WI72PADL.js";import"./chunk-CBMFBTB3.js";import"./chunk-7VSW2XVU.js";import"./chunk-AFBOAQAV.js";import"./chunk-QAL3T64I.js";import"./chunk-72GGPCB2.js";import"./chunk-WUZSBXWF.js";import"./chunk-JKG66FDZ.js";import"./chunk-N4KSVDAU.js";import"./chunk-ZR2EL6AG.js";import"./chunk-CPCM75G3.js";import"./chunk-R2VBXQYS.js";import"./chunk-LRE73CBG.js";import"./chunk-PNEIZ2DY.js";import"./chunk-2WW7WJHA.js";export{b as discoverSootsimUrl,a as parseFlowFile,d as runFlow,c as runFlowPlayback};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as o}from"./chunk-25K4SXL3.js";import"./chunk-PPY2OTIR.js";import"./chunk-TIE6ENCX.js";import"./chunk-N4KSVDAU.js";import"./chunk-ZR2EL6AG.js";import"./chunk-CPCM75G3.js";import"./chunk-R2VBXQYS.js";import"./chunk-LRE73CBG.js";import"./chunk-PNEIZ2DY.js";import"./chunk-2WW7WJHA.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-CFY2ELQ4.js";import"./chunk-N4KSVDAU.js";import"./chunk-ZR2EL6AG.js";import"./chunk-HNOQEJK3.js";import"./chunk-LRE73CBG.js";import"./chunk-PNEIZ2DY.js";import"./chunk-2WW7WJHA.js";export{a as runRuntime};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-25K4SXL3.js";import"./chunk-PPY2OTIR.js";import"./chunk-TIE6ENCX.js";import"./chunk-N4KSVDAU.js";import"./chunk-ZR2EL6AG.js";import"./chunk-CPCM75G3.js";import"./chunk-R2VBXQYS.js";import"./chunk-LRE73CBG.js";import"./chunk-PNEIZ2DY.js";import"./chunk-2WW7WJHA.js";export{a as runSetupRepo};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-WUZSBXWF.js";import"./chunk-JKG66FDZ.js";import"./chunk-2WW7WJHA.js";export{a as settingsStore};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b}from"./chunk-CPCM75G3.js";import"./chunk-R2VBXQYS.js";import"./chunk-PNEIZ2DY.js";import"./chunk-2WW7WJHA.js";export{b as flushCliTelemetry,a as trackCliEvent};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.45 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c}from"./chunk-WI72PADL.js";import"./chunk-CBMFBTB3.js";import"./chunk-7VSW2XVU.js";import"./chunk-AFBOAQAV.js";import"./chunk-N4KSVDAU.js";import"./chunk-ZR2EL6AG.js";import"./chunk-CPCM75G3.js";import"./chunk-R2VBXQYS.js";import"./chunk-LRE73CBG.js";import"./chunk-PNEIZ2DY.js";import"./chunk-2WW7WJHA.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};