sootsim 0.1.103 → 0.1.104

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 (141) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-3SWQP2VQ.js → agent-VVOGXPON.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-XYLYE5XJ.js → agent-wrapper-XPEGA24X.js} +2 -2
  4. package/dist-cli/chunks/{assert-43ONRTKY.js → assert-YKFEKX54.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-TEFYLCIZ.js +2 -0
  6. package/dist-cli/chunks/beta-LYX5Q66M.js +2 -0
  7. package/dist-cli/chunks/{chunk-XJWCY2VG.js → chunk-2FWXRIFE.js} +2 -2
  8. package/dist-cli/chunks/{chunk-3GEEUD6C.js → chunk-2LNSP3DP.js} +2 -2
  9. package/dist-cli/chunks/{chunk-ZCHLHHF4.js → chunk-2WV4ZOVO.js} +1 -1
  10. package/dist-cli/chunks/{chunk-WXRLUZ3R.js → chunk-3EJHPOKU.js} +3 -3
  11. package/dist-cli/chunks/{chunk-HVRWQ7PU.js → chunk-44YS62BC.js} +1 -1
  12. package/dist-cli/chunks/{chunk-NTLBFT24.js → chunk-72OHZ4K4.js} +1 -1
  13. package/dist-cli/chunks/{chunk-VCVQY2BG.js → chunk-77GYHQSO.js} +1 -1
  14. package/dist-cli/chunks/chunk-7TQLDYHF.js +2 -0
  15. package/dist-cli/chunks/{chunk-4FXAHESN.js → chunk-AQ4LICCZ.js} +2 -2
  16. package/dist-cli/chunks/{chunk-3G4PLGXR.js → chunk-AZONU3RG.js} +2 -2
  17. package/dist-cli/chunks/{chunk-GWPUGRAO.js → chunk-BEYGGLL7.js} +2 -2
  18. package/dist-cli/chunks/{chunk-ZVVHEFJE.js → chunk-CGWV56SN.js} +3 -3
  19. package/dist-cli/chunks/{chunk-GO5HKLXT.js → chunk-CKYNLYKK.js} +2 -2
  20. package/dist-cli/chunks/{chunk-TUWMBTXX.js → chunk-EIW7AUAT.js} +1 -1
  21. package/dist-cli/chunks/{chunk-PQTOK44U.js → chunk-FCSLS7ZF.js} +2 -2
  22. package/dist-cli/chunks/{chunk-BTVLP3P7.js → chunk-FWMUFX7A.js} +8 -6
  23. package/dist-cli/chunks/{chunk-U6LFRHPS.js → chunk-G7HDI2XA.js} +2 -2
  24. package/dist-cli/chunks/{chunk-7RGOOC3I.js → chunk-GGNGXQL4.js} +1 -1
  25. package/dist-cli/chunks/{chunk-3BO5UITG.js → chunk-GHCIPI7O.js} +2 -2
  26. package/dist-cli/chunks/chunk-GKZQXNNV.js +1 -0
  27. package/dist-cli/chunks/{chunk-O5AMPKTL.js → chunk-GUV6Y4T6.js} +2 -2
  28. package/dist-cli/chunks/chunk-HCNHNG6Y.js +1 -0
  29. package/dist-cli/chunks/{chunk-7NOW5YJS.js → chunk-HNOCTYUV.js} +2 -2
  30. package/dist-cli/chunks/{chunk-BVYNDRIZ.js → chunk-IWZZ3WNJ.js} +3 -3
  31. package/dist-cli/chunks/{chunk-O4ZEIWOS.js → chunk-K4XHRPXC.js} +1 -1
  32. package/dist-cli/chunks/{chunk-KQP35HQA.js → chunk-KFE2ZIT5.js} +1 -1
  33. package/dist-cli/chunks/{chunk-QG747T64.js → chunk-LCINF3EO.js} +1 -1
  34. package/dist-cli/chunks/{chunk-NSBXU7DZ.js → chunk-LQH3LXLE.js} +2 -2
  35. package/dist-cli/chunks/{chunk-KWQPGLJX.js → chunk-N5CBDVBC.js} +2 -2
  36. package/dist-cli/chunks/{chunk-6U5VATXU.js → chunk-P6JIUAJU.js} +1 -1
  37. package/dist-cli/chunks/{chunk-MYIECDHD.js → chunk-PJDJTUPP.js} +1 -1
  38. package/dist-cli/chunks/{chunk-ICRBDZ47.js → chunk-QNK7V7BJ.js} +1 -1
  39. package/dist-cli/chunks/chunk-RH3M5CKE.js +1 -0
  40. package/dist-cli/chunks/{chunk-NMTLZZZW.js → chunk-RSBOSFLX.js} +1 -1
  41. package/dist-cli/chunks/{chunk-4CAMQESR.js → chunk-S237JR3F.js} +2 -2
  42. package/dist-cli/chunks/{chunk-BNSZ4VR7.js → chunk-TJGYDVGW.js} +2 -2
  43. package/dist-cli/chunks/{chunk-6HNSCIVX.js → chunk-TRJV4FTF.js} +2 -2
  44. package/dist-cli/chunks/{chunk-VROOOPBO.js → chunk-UM73C576.js} +2 -2
  45. package/dist-cli/chunks/{chunk-TVK2VJYL.js → chunk-VW4JRT7N.js} +1 -1
  46. package/dist-cli/chunks/{chunk-M6PSWXLZ.js → chunk-WAWSYREW.js} +1 -1
  47. package/dist-cli/chunks/{chunk-K3L4WCZX.js → chunk-WZBFMJ3S.js} +2 -2
  48. package/dist-cli/chunks/{chunk-5A45ZHOH.js → chunk-Y3HVBG7J.js} +2 -2
  49. package/dist-cli/chunks/{chunk-ZJPVQZ52.js → chunk-ZA7Z3H2E.js} +2 -2
  50. package/dist-cli/chunks/{chunk-3OKJSDPK.js → chunk-ZDJGK2LP.js} +2 -2
  51. package/dist-cli/chunks/cli-version-VOSOXIKI.js +2 -0
  52. package/dist-cli/chunks/{compat-527HQDG7.js → compat-E4JFL64N.js} +3 -3
  53. package/dist-cli/chunks/{config-GC6SE55V.js → config-UO7IMICT.js} +2 -2
  54. package/dist-cli/chunks/{control-T5XPYBBM.js → control-7BBXYRKP.js} +2 -2
  55. package/dist-cli/chunks/{cpu-profile-BEH3K4I3.js → cpu-profile-VOTSB2YB.js} +2 -2
  56. package/dist-cli/chunks/{daemon-ULY622FV.js → daemon-PWHCVTZ3.js} +2 -2
  57. package/dist-cli/chunks/{debug-KKYI7ZHQ.js → debug-LRWV62WH.js} +3 -3
  58. package/dist-cli/chunks/{detox-2LF5C4HN.js → detox-WOKRYSKW.js} +2 -2
  59. package/dist-cli/chunks/{device-6QJRKOJW.js → device-2SHSUURQ.js} +2 -2
  60. package/dist-cli/chunks/{diagnose-VJNNS4DK.js → diagnose-ERNUAPHA.js} +2 -2
  61. package/dist-cli/chunks/drivers-LO2QI4OJ.js +2 -0
  62. package/dist-cli/chunks/{electron-KIOLUYYS.js → electron-RZSH4XX3.js} +3 -3
  63. package/dist-cli/chunks/flow-XTJHMWUM.js +2 -0
  64. package/dist-cli/chunks/help-O3ZYVDVC.js +2 -0
  65. package/dist-cli/chunks/{hints-SVJNBETJ.js → hints-PR6Z52OE.js} +2 -2
  66. package/dist-cli/chunks/{home-paths-SQJQV3U3.js → home-paths-A4FOAY3L.js} +2 -2
  67. package/dist-cli/chunks/{inspect-5TSZEINZ.js → inspect-KHVB4AO2.js} +3 -3
  68. package/dist-cli/chunks/install-EVGJCT47.js +2 -0
  69. package/dist-cli/chunks/{install-desktop-T4QPLMKW.js → install-desktop-TM76VEVA.js} +3 -3
  70. package/dist-cli/chunks/{keys-PSHVPVGM.js → keys-BTFQDMHU.js} +2 -2
  71. package/dist-cli/chunks/{launch-SKPDJID6.js → launch-OBHZBENO.js} +3 -3
  72. package/dist-cli/chunks/{login-2672TCEH.js → login-2ISPCBA2.js} +4 -4
  73. package/dist-cli/chunks/{logout-RPO44JNA.js → logout-7IWIVMBR.js} +2 -2
  74. package/dist-cli/chunks/{maestro-UEOIHO7Y.js → maestro-YEUNOWKT.js} +2 -2
  75. package/dist-cli/chunks/{preview-FADH4WVQ.js → preview-L6GFYD32.js} +2 -2
  76. package/dist-cli/chunks/{profile-3FYADBKD.js → profile-ZYL26KMP.js} +2 -2
  77. package/dist-cli/chunks/{react-KYFMX6PP.js → react-CBGVMAFT.js} +2 -2
  78. package/dist-cli/chunks/{record-NXNFM7UR.js → record-3MGPD2TD.js} +2 -2
  79. package/dist-cli/chunks/runtime-FJITOAIR.js +2 -0
  80. package/dist-cli/chunks/{runtime-delivery-E4MIJEW2.js → runtime-delivery-SK2KJMWL.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-DUU2BKDW.js → screenshot-QDSR4ELW.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-mode-ZRX4DNG7.js → screenshot-mode-D7X27L3S.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-HSBTBMJL.js → screenshots-NJSLDMVH.js} +2 -2
  84. package/dist-cli/chunks/{server-PAF67NAN.js → server-NDZD7IA4.js} +2 -2
  85. package/dist-cli/chunks/setup-repo-TRDRKJ4N.js +2 -0
  86. package/dist-cli/chunks/{skills-7PD7UO53.js → skills-MQ3MEE5O.js} +2 -2
  87. package/dist-cli/chunks/{start-U5LG6637.js → start-P2QW4UJJ.js} +4 -4
  88. package/dist-cli/chunks/store-LT3WCVFB.js +2 -0
  89. package/dist-cli/chunks/telemetry-6BBF4TX3.js +2 -0
  90. package/dist-cli/chunks/{test-GLDMXGAI.js → test-OVRFWWZ4.js} +3 -3
  91. package/dist-cli/chunks/{three-mode-7LGRCHSM.js → three-mode-LUKP7PN7.js} +2 -2
  92. package/dist-cli/chunks/{timeline-GKSU6YFF.js → timeline-ZSZGXH3K.js} +2 -2
  93. package/dist-cli/chunks/{upgrade-CQTB3IL6.js → upgrade-2YXQ2V6O.js} +2 -2
  94. package/dist-cli/chunks/upload-NVUEPQHV.js +2 -0
  95. package/dist-cli/chunks/{web-3VBUNLWW.js → web-IZKE4IXL.js} +2 -2
  96. package/dist-cli/chunks/{what-happened-WDSZW2WD.js → what-happened-BW75PTSO.js} +2 -2
  97. package/dist-cli/chunks/{whoami-SFZKBGLL.js → whoami-V4BQORO2.js} +2 -2
  98. package/dist-lib/agent-daemon-client.cjs +1 -1
  99. package/dist-lib/agent-events.cjs +1 -1
  100. package/dist-lib/agent-sessions.cjs +1 -1
  101. package/dist-lib/attached-projects.cjs +1 -1
  102. package/dist-lib/auth/shared-session.cjs +1 -1
  103. package/dist-lib/backend-origin.cjs +1 -1
  104. package/dist-lib/beta.cjs +1 -1
  105. package/dist-lib/beta.mjs +1 -1
  106. package/dist-lib/bridge-constants.cjs +1 -1
  107. package/dist-lib/cli-constants.cjs +1 -1
  108. package/dist-lib/config.cjs +1 -1
  109. package/dist-lib/detox/index.cjs +1 -1
  110. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  111. package/dist-lib/home-paths.cjs +1 -1
  112. package/dist-lib/host/bridge-host.cjs +1 -1
  113. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  114. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  116. package/dist-lib/host/websocket-proxy.cjs +1 -1
  117. package/dist-lib/index.cjs +1 -1
  118. package/dist-lib/metro.cjs +1 -1
  119. package/dist-lib/profiles.cjs +1 -1
  120. package/dist-lib/render-mode.cjs +1 -1
  121. package/dist-lib/scripts/demo-app-registry.cjs +1 -1
  122. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  123. package/dist-lib/skills.cjs +1 -1
  124. package/dist-lib/vite.cjs +1 -1
  125. package/package.json +1 -1
  126. package/dist-cli/chunks/auto-bootstrap-YJIVWBJW.js +0 -2
  127. package/dist-cli/chunks/beta-C63UELSM.js +0 -2
  128. package/dist-cli/chunks/chunk-6UENYO6F.js +0 -1
  129. package/dist-cli/chunks/chunk-D5BRABJ6.js +0 -1
  130. package/dist-cli/chunks/chunk-GCLTPF36.js +0 -1
  131. package/dist-cli/chunks/chunk-WK4IZ3YX.js +0 -2
  132. package/dist-cli/chunks/cli-version-PAQ53YJO.js +0 -2
  133. package/dist-cli/chunks/drivers-52QYW4AB.js +0 -2
  134. package/dist-cli/chunks/flow-I43RGDTR.js +0 -2
  135. package/dist-cli/chunks/help-5LLF5KLO.js +0 -2
  136. package/dist-cli/chunks/install-6ZAA5PUJ.js +0 -2
  137. package/dist-cli/chunks/runtime-5MJRZM6Y.js +0 -2
  138. package/dist-cli/chunks/setup-repo-ISX4WDVN.js +0 -2
  139. package/dist-cli/chunks/store-L4MRPF4I.js +0 -2
  140. package/dist-cli/chunks/telemetry-N6WYGNCG.js +0 -2
  141. package/dist-cli/chunks/upload-NNVFLK6A.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as x}from"./chunk-M6PSWXLZ.js";var J="sootsimConfig";function h(e){return!!e&&Object.keys(e).length>0}function de(e){return e?h(e.modules)||h(e.turboModules)||h(e.nativeModules)||h(e.env)||h(e.settings)||h(e.initialState):!1}function V(e,t){let n=new URL(e);return de(t)?n.searchParams.set(J,JSON.stringify(t)):n.searchParams.delete(J),n.toString()}import{existsSync as d,readFileSync as R,writeFileSync as g}from"node:fs";import{homedir as le}from"node:os";import{dirname as fe,join as c,resolve as y}from"node:path";var _=le();function me(e){let t=e;for(;;){if(d(c(t,"pnpm-workspace.yaml"))||d(c(t,"turbo.json"))||d(c(t,"nx.json"))||d(c(t,"lerna.json")))return t;let n=c(t,"package.json");if(d(n))try{if(JSON.parse(R(n,"utf8")).workspaces)return t}catch{}let r=fe(t);if(r===t)return null;t=r}}function O(e,t){let n=me(process.cwd()),r=[n?y(n,e):null,y(process.cwd(),e),y(process.cwd(),t)].filter(o=>!!o);for(let o of r)if(d(o))return o;return r[0]??y(process.cwd(),e)}var pe=()=>O("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),_e=()=>O("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),ge=()=>O("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),Re=()=>O("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),W=()=>O("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),Ee=()=>O("packages/sootsim-engine/scripts/mattermost-preview-server.ts","scripts/mattermost-preview-server.ts"),B={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},Se=c(_,"github/mattermost-mobile"),N=c(_,"github/uniswap-interface"),Ae=c(N,"apps/mobile"),C=c(N,".env.defaults.local"),he="stored-in-.env.local",q="# sootsim demo env overrides",Pe=c(N,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),Oe=c(N,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),Q="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function X(e){if(!d(e))return{};let t={},n=R(e,"utf8");for(let r of n.split(/\r?\n/)){let o=r.trim();if(!o||o.startsWith("#"))continue;let a=o.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!a)continue;let i=a[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[a[1]]=i}return t}function $(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(he)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function z(e,t){for(let n of e)for(let r of t){let o=n[r];if($(o))return o.trim()}}function oe(){let e=X(C),t=X(c(N,"apps/web/.env")),n=[process.env,e,t],r={},o=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,s]of o){let u=z(n,[i,...s]);if(u){r[i]=u;for(let l of s)r[l]=u}}if(!($(r.TRADING_API_KEY)&&$(r.UNISWAP_API_KEY))){let i=z(n,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";r.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",r.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",r.GRAPHQL_URL_OVERRIDE=i,r.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",r.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return r}function Te(){let e=d(C)?R(C,"utf8"):"";if(e&&!e.includes(q))return;let t=oe(),n=[q];for(let[r,o]of Object.entries(t).sort(([a],[i])=>a.localeCompare(i)))n.push(`${r}=${JSON.stringify(o)}`);n.push(""),g(C,`${n.join(`
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as x}from"./chunk-WAWSYREW.js";var J="sootsimConfig";function h(e){return!!e&&Object.keys(e).length>0}function de(e){return e?h(e.modules)||h(e.turboModules)||h(e.nativeModules)||h(e.env)||h(e.settings)||h(e.initialState):!1}function V(e,t){let n=new URL(e);return de(t)?n.searchParams.set(J,JSON.stringify(t)):n.searchParams.delete(J),n.toString()}import{existsSync as d,readFileSync as R,writeFileSync as g}from"node:fs";import{homedir as le}from"node:os";import{dirname as fe,join as c,resolve as y}from"node:path";var _=le();function me(e){let t=e;for(;;){if(d(c(t,"pnpm-workspace.yaml"))||d(c(t,"turbo.json"))||d(c(t,"nx.json"))||d(c(t,"lerna.json")))return t;let n=c(t,"package.json");if(d(n))try{if(JSON.parse(R(n,"utf8")).workspaces)return t}catch{}let r=fe(t);if(r===t)return null;t=r}}function O(e,t){let n=me(process.cwd()),r=[n?y(n,e):null,y(process.cwd(),e),y(process.cwd(),t)].filter(o=>!!o);for(let o of r)if(d(o))return o;return r[0]??y(process.cwd(),e)}var pe=()=>O("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),_e=()=>O("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),ge=()=>O("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),Re=()=>O("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),W=()=>O("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),Ee=()=>O("packages/sootsim-engine/scripts/mattermost-preview-server.ts","scripts/mattermost-preview-server.ts"),B={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},Se=c(_,"github/mattermost-mobile"),N=c(_,"github/uniswap-interface"),Ae=c(N,"apps/mobile"),C=c(N,".env.defaults.local"),he="stored-in-.env.local",q="# sootsim demo env overrides",Pe=c(N,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),Oe=c(N,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),Q="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function X(e){if(!d(e))return{};let t={},n=R(e,"utf8");for(let r of n.split(/\r?\n/)){let o=r.trim();if(!o||o.startsWith("#"))continue;let a=o.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!a)continue;let i=a[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[a[1]]=i}return t}function $(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(he)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function z(e,t){for(let n of e)for(let r of t){let o=n[r];if($(o))return o.trim()}}function oe(){let e=X(C),t=X(c(N,"apps/web/.env")),n=[process.env,e,t],r={},o=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,s]of o){let u=z(n,[i,...s]);if(u){r[i]=u;for(let l of s)r[l]=u}}if(!($(r.TRADING_API_KEY)&&$(r.UNISWAP_API_KEY))){let i=z(n,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";r.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",r.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",r.GRAPHQL_URL_OVERRIDE=i,r.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",r.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return r}function Te(){let e=d(C)?R(C,"utf8"):"";if(e&&!e.includes(q))return;let t=oe(),n=[q];for(let[r,o]of Object.entries(t).sort(([a],[i])=>a.localeCompare(i)))n.push(`${r}=${JSON.stringify(o)}`);n.push(""),g(C,`${n.join(`
3
3
  `)}
4
4
  `)}function ve(){let e=`export function useForceUpgradeStatus(): ForceUpgradeStatus {
5
5
  `,t=` // sootsim demo: bypass the force-upgrade gate during local engine demos.
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as u,b as f}from"./chunk-NTLBFT24.js";import{a as h,c as p}from"./chunk-PQTOK44U.js";import{a as c,b as d,c as m}from"./chunk-7RGOOC3I.js";function T(){let e=c();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function O(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=c();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await m(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:T,launch:O};function I(){let e=u();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function _(e){let r=u();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await f(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var w={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:I,launch:_};import{spawn as x}from"child_process";import{closeSync as M,mkdtempSync as A,openSync as C,readFileSync as E}from"fs";import{createRequire as L}from"module";import{tmpdir as g}from"os";import{join as y}from"path";var R=`
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as u,b as f}from"./chunk-72OHZ4K4.js";import{a as h,c as p}from"./chunk-FCSLS7ZF.js";import{a as c,b as d,c as m}from"./chunk-GGNGXQL4.js";function T(){let e=c();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function O(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=c();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await m(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:T,launch:O};function I(){let e=u();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function _(e){let r=u();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await f(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var w={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:I,launch:_};import{spawn as x}from"child_process";import{closeSync as M,mkdtempSync as A,openSync as C,readFileSync as E}from"fs";import{createRequire as L}from"module";import{tmpdir as g}from"os";import{join as y}from"path";var R=`
3
3
  const modulePath = process.env.SOOTSIM_PW_MODULE;
4
4
  const url = process.env.SOOTSIM_PW_URL;
5
5
  const headless = process.env.SOOTSIM_PW_HEADLESS === '1';
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as _,b as W,c as de,e as me}from"./chunk-5A45ZHOH.js";import{m as O}from"./chunk-BNSZ4VR7.js";import{k as ae,l as le,n as ce}from"./chunk-BTVLP3P7.js";import{a as pe,b as fe}from"./chunk-MYIECDHD.js";import{b as ie,c as I,d as S,e as x}from"./chunk-GO5HKLXT.js";import{c as k,d as w,e as C}from"./chunk-TUWMBTXX.js";import{g as G}from"./chunk-ZJPVQZ52.js";import{a as B,b as q}from"./chunk-NTLBFT24.js";import{c as ue}from"./chunk-PQTOK44U.js";import{d as j}from"./chunk-7RGOOC3I.js";import{a as se}from"./chunk-WK4IZ3YX.js";import{E as ne,F as re}from"./chunk-6U5VATXU.js";import Pe from"node:fs";import Le from"node:os";import J from"node:path";function Ue(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function V(e){let o=Ue(e);return o==="localhost"||o.endsWith(".localhost")||o==="0.0.0.0"||o==="::1"||/^127(?:\.\d{1,3}){3}$/.test(o)}function ge(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 Me(e,o){return e?.includes("/one/metro-entry.bundle")?"one":typeof o=="string"&&o?"expo":"unknown"}function be(e,o,t){return`${e}//${o}:${t}`}function Re(e){if(typeof window>"u")return!1;try{let o=new URL(e);return V(o.hostname)&&V(window.location.hostname)&&o.origin!==window.location.origin}catch{return!1}}async function he(e,o){let t={...o,cache:o?.cache??"no-store"};return Re(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,t):fetch(e,t)}function Ee(e){return e==="https:"?443:80}function Oe(e){let o=e.pathname||"/";return(o==="/"||o==="")&&!e.search&&!e.hash}async function ye(e,o){let t=e.replace(/\/+$/,"");try{let n=await he(`${t}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},a=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(a||s.name)return{bundleUrl:de(a||`${t}${W}`),port:o,framework:Me(a,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await he(`${t}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${t}${W}`,port:o,framework:"metro"}}catch{}return null}async function we(e){return ye(be("http:","localhost",e),e)}async function Se(e){let o=e.trim();if(/^\d+$/.test(o)){let i=parseInt(o,10),l=await we(i);if(l)return l;let c=3;for(let d=1;d<=c;d++){let m=await we(i+d);if(m)return m}throw ge(`localhost:${i} (also scanned +1..+${c})`)}let t=o.startsWith("http")?o:`http://${o}`,n;try{n=new URL(t)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):Ee(r),a=be(r,n.hostname,s);if(Oe(n)){let i=await ye(a,s);if(i)return i;throw ge(a)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function dt(){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 ve(e){let o=B();if(console.log(` note: no sootsim bridge detected on port ${e}`),o){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function _e(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 mt(e,o,t){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){_e(o);return}console.error(` no sim with id "${t}" is connected to the bridge on port ${o}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState,r.userVisible===!1?"hidden":r.userVisible===!0?"visible":null,r.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var De={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 v(e){return new Promise(o=>setTimeout(o,e))}function A(e){return e.trim()}function Y(e){try{let o=new URL(e),t=o.pathname.replace(/\/+$/,"")||"/";return o.searchParams.has("open")||o.searchParams.has("port")||o.searchParams.has("bundle")||o.searchParams.has("demo")||o.pathname.includes("/sootsim/index.html")||t==="/sootsim"||o.pathname==="/__soot"||o.pathname==="/__soot/"||t==="/rn"||/^\/rn\/[^/]+$/i.test(t)||/^\/app\/[^/]+$/i.test(t)||t==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(t)||/^\/__soot\/app\/[^/]+$/i.test(t)}catch{return!1}}function Ae(e){try{let o=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(o)||/^\/build\/.+/.test(o)}catch{return!1}}async function Mt(e){let o=A(e);return(await ke(o)).bundleUrl}function Fe(e){try{let o=new URL(e.startsWith("http")?e:`http://${e}`),t=o.pathname||"/";if(t!=="/"&&t!==""||o.search||o.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(o.hostname))return null;let n=o.port?Number(o.port):o.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function ke(e){let o=A(e),t=/^\d+$/.test(o)?Number(o):Fe(o);if(t&&t>0){let n=await me(t);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return Se(o)}function X(e){let o=e.replace(/\/+$/,"")||"/";return o==="/__soot"||o.startsWith("/__soot/")?"/__soot":""}function Ne(e,o){let t=A(e),n=new URL(o),r=X(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(t)?n.pathname=`${r}/rn/${t}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",t)),n.toString()}function He(e){let o=A(e);return/^\d+$/.test(o)||/^https?:\/\//i.test(o)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(o)}async function Ke(e,o){let t=await ke(e),n=new URL(o),r=X(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.set("bundle",t.bundleUrl),n.toString()}function ze(e){return e.startsWith("~/")?J.join(Le.homedir(),e.slice(2)):J.isAbsolute(e)?e:J.resolve(process.cwd(),e)}function je(e){let o={};for(let t=0;t<e.length;t++){if(e[t]!=="--replace")continue;let n=e[t+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let s=n.slice(0,r).trim(),a=ze(n.slice(r+1).trim());Pe.existsSync(a)||(console.error(` sootsim open: replacement file not found: ${a}`),process.exit(1)),o[s]={file:a},t++}return Object.keys(o).length>0?{modules:o}:void 0}function Ce(){let e=ne();return re(e)&&e.runtimePort>0?`http://localhost:${e.runtimePort}/`:se}function We(e){try{let o=new URL(e),t=o.searchParams.get("bundle")||"",n=fe(pe({bundleUrl:t}));return n?(o.searchParams.set("appFonts",n),o.toString()):e}catch{return e}}async function qe(e,o){if(!e)return new URL(o).toString();if(Y(e))return new URL(e).toString();let t=De[e.toLowerCase()];if(t){let n=new URL(o),r=X(n.pathname);return n.pathname=`${r}${t}`,n.toString()}return He(e)?Ke(e,o):Ne(e,o)}async function D(e,o=Ce()){return We(await qe(e,o))}function $e(e,o){let t=e?.url||e?.origin||o;try{let n=new URL(t);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.toString()}catch{return o}}async function Ge(e,o,t){let n=new URL(await D(e,o));return n.searchParams.set("inspectOpen",t),n.toString()}async function Ve(e,o,t,n={}){let r=n.attempts??30,s=n.intervalMs??500,a=n.minNodeCount??10;for(let i=0;i<r;i++){let l=S(e,{commandTimeoutMs:o,simId:t,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>a)return{bridge:l,count:c}}catch{}l.close(),await v(s)}return null}function Je(e){if(!e)return null;try{let o=new URL(e);if(o.searchParams.has("bundle")){let t=o.searchParams.get("bundle")||"";try{let n=new URL(t),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return o.searchParams.has("port")?`connect :${o.searchParams.get("port")||""}`:o.searchParams.has("open")?`connect ${o.searchParams.get("open")||""}`:o.searchParams.has("demo")?`demo ${o.searchParams.get("demo")||"default"}`:o.pathname.includes("/sootsim/index.html")||o.pathname==="/sootsim/"||o.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function Qe(e,o){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as _,b as W,c as de,e as me}from"./chunk-Y3HVBG7J.js";import{m as O}from"./chunk-TJGYDVGW.js";import{k as ae,l as le,n as ce}from"./chunk-FWMUFX7A.js";import{a as pe,b as fe}from"./chunk-PJDJTUPP.js";import{b as ie,c as I,d as S,e as x}from"./chunk-CKYNLYKK.js";import{c as k,d as w,e as C}from"./chunk-EIW7AUAT.js";import{g as G}from"./chunk-ZA7Z3H2E.js";import{a as B,b as q}from"./chunk-72OHZ4K4.js";import{c as ue}from"./chunk-FCSLS7ZF.js";import{d as j}from"./chunk-GGNGXQL4.js";import{a as se}from"./chunk-7TQLDYHF.js";import{E as ne,F as re}from"./chunk-P6JIUAJU.js";import Pe from"node:fs";import Le from"node:os";import J from"node:path";function Ue(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function V(e){let o=Ue(e);return o==="localhost"||o.endsWith(".localhost")||o==="0.0.0.0"||o==="::1"||/^127(?:\.\d{1,3}){3}$/.test(o)}function ge(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 Me(e,o){return e?.includes("/one/metro-entry.bundle")?"one":typeof o=="string"&&o?"expo":"unknown"}function be(e,o,t){return`${e}//${o}:${t}`}function Re(e){if(typeof window>"u")return!1;try{let o=new URL(e);return V(o.hostname)&&V(window.location.hostname)&&o.origin!==window.location.origin}catch{return!1}}async function he(e,o){let t={...o,cache:o?.cache??"no-store"};return Re(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,t):fetch(e,t)}function Ee(e){return e==="https:"?443:80}function Oe(e){let o=e.pathname||"/";return(o==="/"||o==="")&&!e.search&&!e.hash}async function ye(e,o){let t=e.replace(/\/+$/,"");try{let n=await he(`${t}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},a=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(a||s.name)return{bundleUrl:de(a||`${t}${W}`),port:o,framework:Me(a,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await he(`${t}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${t}${W}`,port:o,framework:"metro"}}catch{}return null}async function we(e){return ye(be("http:","localhost",e),e)}async function Se(e){let o=e.trim();if(/^\d+$/.test(o)){let i=parseInt(o,10),l=await we(i);if(l)return l;let c=3;for(let d=1;d<=c;d++){let m=await we(i+d);if(m)return m}throw ge(`localhost:${i} (also scanned +1..+${c})`)}let t=o.startsWith("http")?o:`http://${o}`,n;try{n=new URL(t)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):Ee(r),a=be(r,n.hostname,s);if(Oe(n)){let i=await ye(a,s);if(i)return i;throw ge(a)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function dt(){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 ve(e){let o=B();if(console.log(` note: no sootsim bridge detected on port ${e}`),o){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function _e(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 mt(e,o,t){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){_e(o);return}console.error(` no sim with id "${t}" is connected to the bridge on port ${o}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState,r.userVisible===!1?"hidden":r.userVisible===!0?"visible":null,r.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var De={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 v(e){return new Promise(o=>setTimeout(o,e))}function A(e){return e.trim()}function Y(e){try{let o=new URL(e),t=o.pathname.replace(/\/+$/,"")||"/";return o.searchParams.has("open")||o.searchParams.has("port")||o.searchParams.has("bundle")||o.searchParams.has("demo")||o.pathname.includes("/sootsim/index.html")||t==="/sootsim"||o.pathname==="/__soot"||o.pathname==="/__soot/"||t==="/rn"||/^\/rn\/[^/]+$/i.test(t)||/^\/app\/[^/]+$/i.test(t)||t==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(t)||/^\/__soot\/app\/[^/]+$/i.test(t)}catch{return!1}}function Ae(e){try{let o=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(o)||/^\/build\/.+/.test(o)}catch{return!1}}async function Mt(e){let o=A(e);return(await ke(o)).bundleUrl}function Fe(e){try{let o=new URL(e.startsWith("http")?e:`http://${e}`),t=o.pathname||"/";if(t!=="/"&&t!==""||o.search||o.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(o.hostname))return null;let n=o.port?Number(o.port):o.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function ke(e){let o=A(e),t=/^\d+$/.test(o)?Number(o):Fe(o);if(t&&t>0){let n=await me(t);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return Se(o)}function X(e){let o=e.replace(/\/+$/,"")||"/";return o==="/__soot"||o.startsWith("/__soot/")?"/__soot":""}function Ne(e,o){let t=A(e),n=new URL(o),r=X(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(t)?n.pathname=`${r}/rn/${t}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",t)),n.toString()}function He(e){let o=A(e);return/^\d+$/.test(o)||/^https?:\/\//i.test(o)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(o)}async function Ke(e,o){let t=await ke(e),n=new URL(o),r=X(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.set("bundle",t.bundleUrl),n.toString()}function ze(e){return e.startsWith("~/")?J.join(Le.homedir(),e.slice(2)):J.isAbsolute(e)?e:J.resolve(process.cwd(),e)}function je(e){let o={};for(let t=0;t<e.length;t++){if(e[t]!=="--replace")continue;let n=e[t+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let s=n.slice(0,r).trim(),a=ze(n.slice(r+1).trim());Pe.existsSync(a)||(console.error(` sootsim open: replacement file not found: ${a}`),process.exit(1)),o[s]={file:a},t++}return Object.keys(o).length>0?{modules:o}:void 0}function Ce(){let e=ne();return re(e)&&e.runtimePort>0?`http://localhost:${e.runtimePort}/`:se}function We(e){try{let o=new URL(e),t=o.searchParams.get("bundle")||"",n=fe(pe({bundleUrl:t}));return n?(o.searchParams.set("appFonts",n),o.toString()):e}catch{return e}}async function qe(e,o){if(!e)return new URL(o).toString();if(Y(e))return new URL(e).toString();let t=De[e.toLowerCase()];if(t){let n=new URL(o),r=X(n.pathname);return n.pathname=`${r}${t}`,n.toString()}return He(e)?Ke(e,o):Ne(e,o)}async function D(e,o=Ce()){return We(await qe(e,o))}function $e(e,o){let t=e?.url||e?.origin||o;try{let n=new URL(t);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.toString()}catch{return o}}async function Ge(e,o,t){let n=new URL(await D(e,o));return n.searchParams.set("inspectOpen",t),n.toString()}async function Ve(e,o,t,n={}){let r=n.attempts??30,s=n.intervalMs??500,a=n.minNodeCount??10;for(let i=0;i<r;i++){let l=S(e,{commandTimeoutMs:o,simId:t,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>a)return{bridge:l,count:c}}catch{}l.close(),await v(s)}return null}function Je(e){if(!e)return null;try{let o=new URL(e);if(o.searchParams.has("bundle")){let t=o.searchParams.get("bundle")||"";try{let n=new URL(t),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return o.searchParams.has("port")?`connect :${o.searchParams.get("port")||""}`:o.searchParams.has("open")?`connect ${o.searchParams.get("open")||""}`:o.searchParams.has("demo")?`demo ${o.searchParams.get("demo")||"default"}`:o.pathname.includes("/sootsim/index.html")||o.pathname==="/sootsim/"||o.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function Qe(e,o){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
3
3
  `);for(let t of e){let n=t.lockedBy&&t.lockExpiresAt?`locked by ${t.lockedBy} (${Math.max(0,Math.round((t.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[t.isPrimary?"primary":"",t.id===o?"selected":"",t.readyState,t.userVisible===!1?"hidden":t.userVisible===!0?"visible":"",t.attachedCliCount&&t.attachedCliCount>0?"in use":"",t.userFocused?"focused":"",n].filter(Boolean);console.log(` ${t.id}${r.length?` [${r.join(", ")}]`:""}`);let s=Je(t.url);if(s)console.log(` loaded: ${s}`);else if(t.url){let a=t.url.length>96?`${t.url.slice(0,93)}\u2026`:t.url;console.log(` url: ${a}`)}else t.origin&&console.log(` origin: ${t.origin}`);t.title&&console.log(` title: ${t.title}`),t.visibilityState&&t.visibilityState!=="visible"&&console.log(` visibility: ${t.visibilityState}`),console.log(` connected: ${Ie(Date.now()-t.connectedAt)}`),t.lastActiveAt&&t.lastActiveAt>0&&console.log(` last active: ${Ie(Date.now()-t.lastActiveAt)}`)}}function Ie(e){let o=Math.max(0,Math.round(e/1e3));return o<60?`${o}s ago`:o<3600?`${Math.round(o/60)}m ago`:o<86400?`${Math.round(o/3600)}h ago`:`${Math.round(o/86400)}d ago`}async function L(e,o,t,n={}){let r=n.attempts??30,s=n.intervalMs??500;for(let a=0;a<r;a++){let i=S(e,{commandTimeoutMs:o});try{let c=(await i.listSims()).find(t);if(c)return c}catch{}finally{i.close()}await v(s)}return null}async function Ye(e,o,t,n={}){let r=n.attempts??20,s=n.intervalMs??250;for(let a=0;a<r;a++){let i=S(e,{commandTimeoutMs:o});try{let c=(await i.listSims()).find(d=>d.id===t);if(!c||c.readyState!=="open")return!0}catch{return!0}finally{i.close()}await v(s)}return!1}function Xe(e){let o=e.meta;if(!o||o.sootsimHostDriver!=="playwright")return null;let t=Number(o.sootsimHostPid);return!Number.isInteger(t)||t<=1||t===process.pid?null:t}function Ze(e){if(!e.connectAckFile)return!1;try{return Pe.writeFileSync(e.connectAckFile,`${JSON.stringify({connectedAt:Date.now(),pid:e.pid??null})}
4
4
  `,{flag:"w"}),!0}catch{return!1}}function xe(e){try{return process.kill(e,0),!0}catch(o){return o?.code==="EPERM"}}async function et(e,o=2500){let t=Date.now()+o;for(;Date.now()<t;){if(!xe(e))return!0;await v(100)}return!xe(e)}async function Q(e,o){let t=new Set(o),n=new Set;for(let r of e){if(!t.has(r.id))continue;let s=Xe(r);s&&n.add(s)}for(let r of n){try{process.kill(r,"SIGTERM")}catch{}if(await et(r)){console.log(` closed playwright host process ${r}`);continue}try{process.kill(r,"SIGKILL"),console.log(` force-closed playwright host process ${r}`)}catch{}}}function F(e,o){if(o){let r=o.trim(),s=e.find(a=>a.id===r);if(!s)throw new Error(`no sim connected with id ${r}`);return s}let t=e.find(r=>r.isPrimary&&r.readyState==="open");if(t)return t;let n=e.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function T(e,o,t){console.log(` ${t==="current sim"?"loaded":"opened"}: ${e} [${t}]`),console.log(` current sim: ${o.id}`),console.log(JSON.stringify({simId:o.id,url:o.url},null,2))}async function U(e,o,t){if(t.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await tt(e,o,{stableMs:150,maxMs:400});let r=S(e,{commandTimeoutMs:3e3,simId:o,cliLabel:"open --describe",simIdSource:"flag"});try{let s=null;try{s=await r.send({type:"evaluate",code:ae})}catch{}if(s&&!(s.flag===!0&&!s.loadingText&&s.nodes>=le&&ce(s))){let d=s.loadingText?`still showing "${s.loadingText}"`:s.flag!==!0?"guest ready event has not fired":s.targets<=0?"no visible app content is inspectable yet":"app tree is still stabilizing";console.log(` app still loading: ${d} (nodes: ${s.nodes}, targets: ${s.targets})`),console.log(" before interacting, run: sootsim wait ready --max-ms 120000")}let i=`(async () => {
5
5
  const t = window.__sootsimTest
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-77GYHQSO.js";import"./chunk-WAWSYREW.js";export{a as getCliVersion};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-M6PSWXLZ.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-WAWSYREW.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-3VBUNLWW.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-3VBUNLWW.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-IZKE4IXL.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-IZKE4IXL.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
24
24
  sootsim compatibility report
25
25
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
26
26
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-M6PSWXLZ.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-WAWSYREW.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim config \u2014 manage sootsim configuration
4
4
 
5
5
  usage:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r}from"./chunk-3OKJSDPK.js";import"./chunk-5A45ZHOH.js";import"./chunk-BNSZ4VR7.js";import"./chunk-BTVLP3P7.js";import"./chunk-MYIECDHD.js";import"./chunk-GO5HKLXT.js";import"./chunk-TUWMBTXX.js";import"./chunk-ZJPVQZ52.js";import"./chunk-NTLBFT24.js";import"./chunk-GCLTPF36.js";import"./chunk-PQTOK44U.js";import"./chunk-7RGOOC3I.js";import"./chunk-WK4IZ3YX.js";import"./chunk-KQP35HQA.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.js";export{d as buildOpenUrl,c as buildShellUrl,p as closeSimsBulk,q as planBulkCloseTargets,h as playwrightHostPidForSim,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,o as runClaimCommand,r as runCloseCommand,n as runFocusCommand,k as runListCommand,l as runOpenCommand,m as runUseCommand,i as signalDriverLaunchConnected,e as summarizeSimUrl,j as terminatePlaywrightHostsForSims,g as waitForSimMatch};
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r}from"./chunk-ZDJGK2LP.js";import"./chunk-Y3HVBG7J.js";import"./chunk-TJGYDVGW.js";import"./chunk-FWMUFX7A.js";import"./chunk-PJDJTUPP.js";import"./chunk-CKYNLYKK.js";import"./chunk-EIW7AUAT.js";import"./chunk-ZA7Z3H2E.js";import"./chunk-72OHZ4K4.js";import"./chunk-RH3M5CKE.js";import"./chunk-FCSLS7ZF.js";import"./chunk-GGNGXQL4.js";import"./chunk-7TQLDYHF.js";import"./chunk-KFE2ZIT5.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";export{d as buildOpenUrl,c as buildShellUrl,p as closeSimsBulk,q as planBulkCloseTargets,h as playwrightHostPidForSim,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,o as runClaimCommand,r as runCloseCommand,n as runFocusCommand,k as runListCommand,l as runOpenCommand,m as runUseCommand,i as signalDriverLaunchConnected,e as summarizeSimUrl,j as terminatePlaywrightHostsForSims,g as waitForSimMatch};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-M6PSWXLZ.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-WAWSYREW.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as T,b as N}from"./chunk-NSBXU7DZ.js";import"./chunk-O5AMPKTL.js";import{c as O}from"./chunk-VROOOPBO.js";import"./chunk-3G4PLGXR.js";import"./chunk-QG747T64.js";import"./chunk-WK4IZ3YX.js";import"./chunk-KQP35HQA.js";import"./chunk-VCVQY2BG.js";import"./chunk-O4ZEIWOS.js";import"./chunk-NMTLZZZW.js";import{g as I,o as C,p as w,q as B}from"./chunk-6U5VATXU.js";import{a as W}from"./chunk-M6PSWXLZ.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as E,rmSync as X,writeFileSync as L}from"fs";import{dirname as D}from"path";var Q="dev.sootsim.daemon",_="SootSim Daemon",R="0.1.36";function F(t,e,r){let o=w(),n=B(),a=D(D(n)),y=D(n),u=`${a}/Resources`;X(o,{recursive:!0,force:!0}),E(C(),{recursive:!0}),E(y,{recursive:!0}),E(u,{recursive:!0}),L(`${a}/Info.plist`,z()),L(`${a}/PkgInfo`,"APPL????"),L(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${d}
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as T,b as N}from"./chunk-LQH3LXLE.js";import"./chunk-GUV6Y4T6.js";import{c as O}from"./chunk-UM73C576.js";import"./chunk-AZONU3RG.js";import"./chunk-LCINF3EO.js";import"./chunk-7TQLDYHF.js";import"./chunk-KFE2ZIT5.js";import"./chunk-77GYHQSO.js";import"./chunk-K4XHRPXC.js";import"./chunk-RSBOSFLX.js";import{g as I,o as C,p as w,q as B}from"./chunk-P6JIUAJU.js";import{a as W}from"./chunk-WAWSYREW.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as E,rmSync as X,writeFileSync as L}from"fs";import{dirname as D}from"path";var Q="dev.sootsim.daemon",_="SootSim Daemon",R="0.1.36";function F(t,e,r){let o=w(),n=B(),a=D(D(n)),y=D(n),u=`${a}/Resources`;X(o,{recursive:!0,force:!0}),E(C(),{recursive:!0}),E(y,{recursive:!0}),E(u,{recursive:!0}),L(`${a}/Info.plist`,z()),L(`${a}/PkgInfo`,"APPL????"),L(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${d}
3
3
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:n}}function z(){return`<?xml version="1.0" encoding="UTF-8"?>
4
4
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5
5
  <plist version="1.0">
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{f,m as T}from"./chunk-BNSZ4VR7.js";import{G as A,H as D,I as O,J as x,K as v}from"./chunk-BTVLP3P7.js";import{c as S,e as $,g as N}from"./chunk-GO5HKLXT.js";import"./chunk-TUWMBTXX.js";import"./chunk-KQP35HQA.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{f,m as T}from"./chunk-TJGYDVGW.js";import{G as A,H as D,I as O,J as x,K as v}from"./chunk-FWMUFX7A.js";import{c as S,e as $,g as N}from"./chunk-CKYNLYKK.js";import"./chunk-EIW7AUAT.js";import"./chunk-KFE2ZIT5.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
3
3
  sootsim debug \u2014 drive __sootsimDebug from the terminal
4
4
 
5
5
  usage:
@@ -167,7 +167,7 @@ examples:
167
167
  } : null,
168
168
  samples,
169
169
  }
170
- })()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-5TSZEINZ.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
170
+ })()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-KHVB4AO2.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
171
171
  known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await A(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await D(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
172
172
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
173
173
  if (!d) return null;
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-BVYNDRIZ.js";import"./chunk-GWPUGRAO.js";import"./chunk-6UENYO6F.js";import"./chunk-4FXAHESN.js";import"./chunk-6HNSCIVX.js";import"./chunk-7NOW5YJS.js";import"./chunk-U6LFRHPS.js";import"./chunk-3OKJSDPK.js";import"./chunk-5A45ZHOH.js";import"./chunk-BNSZ4VR7.js";import"./chunk-BTVLP3P7.js";import"./chunk-MYIECDHD.js";import"./chunk-GO5HKLXT.js";import"./chunk-TUWMBTXX.js";import"./chunk-ZJPVQZ52.js";import"./chunk-NTLBFT24.js";import"./chunk-GCLTPF36.js";import"./chunk-PQTOK44U.js";import"./chunk-7RGOOC3I.js";import"./chunk-NSBXU7DZ.js";import"./chunk-O5AMPKTL.js";import"./chunk-3G4PLGXR.js";import"./chunk-WK4IZ3YX.js";import"./chunk-KQP35HQA.js";import"./chunk-KWQPGLJX.js";import"./chunk-NMTLZZZW.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-IWZZ3WNJ.js";import"./chunk-BEYGGLL7.js";import"./chunk-GKZQXNNV.js";import"./chunk-AQ4LICCZ.js";import"./chunk-TRJV4FTF.js";import"./chunk-HNOCTYUV.js";import"./chunk-G7HDI2XA.js";import"./chunk-ZDJGK2LP.js";import"./chunk-Y3HVBG7J.js";import"./chunk-TJGYDVGW.js";import"./chunk-FWMUFX7A.js";import"./chunk-PJDJTUPP.js";import"./chunk-CKYNLYKK.js";import"./chunk-EIW7AUAT.js";import"./chunk-ZA7Z3H2E.js";import"./chunk-72OHZ4K4.js";import"./chunk-RH3M5CKE.js";import"./chunk-FCSLS7ZF.js";import"./chunk-GGNGXQL4.js";import"./chunk-LQH3LXLE.js";import"./chunk-GUV6Y4T6.js";import"./chunk-AZONU3RG.js";import"./chunk-7TQLDYHF.js";import"./chunk-KFE2ZIT5.js";import"./chunk-N5CBDVBC.js";import"./chunk-RSBOSFLX.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.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.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-6UENYO6F.js";import{c as d,e as l,h as a}from"./chunk-GO5HKLXT.js";import"./chunk-TUWMBTXX.js";import"./chunk-3G4PLGXR.js";import"./chunk-KQP35HQA.js";import"./chunk-KWQPGLJX.js";import{f as c,g as r,h as g}from"./chunk-NMTLZZZW.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.js";function h(){console.log(`
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-GKZQXNNV.js";import{c as d,e as l,h as a}from"./chunk-CKYNLYKK.js";import"./chunk-EIW7AUAT.js";import"./chunk-AZONU3RG.js";import"./chunk-KFE2ZIT5.js";import"./chunk-N5CBDVBC.js";import{f as c,g as r,h as g}from"./chunk-RSBOSFLX.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.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.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as E,e as R,h as b}from"./chunk-GO5HKLXT.js";import{b as v}from"./chunk-TUWMBTXX.js";import"./chunk-KQP35HQA.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as E,e as R,h as b}from"./chunk-CKYNLYKK.js";import{b as v}from"./chunk-EIW7AUAT.js";import"./chunk-KFE2ZIT5.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-HCNHNG6Y.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-ZA7Z3H2E.js";import"./chunk-72OHZ4K4.js";import"./chunk-RH3M5CKE.js";import"./chunk-FCSLS7ZF.js";import"./chunk-GGNGXQL4.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.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.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-TVK2VJYL.js";import"./chunk-D5BRABJ6.js";import{a as v,f as h}from"./chunk-3OKJSDPK.js";import"./chunk-5A45ZHOH.js";import"./chunk-BNSZ4VR7.js";import"./chunk-BTVLP3P7.js";import"./chunk-MYIECDHD.js";import"./chunk-GO5HKLXT.js";import"./chunk-TUWMBTXX.js";import{b as f,g as u}from"./chunk-ZJPVQZ52.js";import{a as p}from"./chunk-NTLBFT24.js";import"./chunk-GCLTPF36.js";import{c as m}from"./chunk-PQTOK44U.js";import"./chunk-7RGOOC3I.js";import"./chunk-WK4IZ3YX.js";import"./chunk-KQP35HQA.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-VW4JRT7N.js";import"./chunk-HCNHNG6Y.js";import{a as v,f as h}from"./chunk-ZDJGK2LP.js";import"./chunk-Y3HVBG7J.js";import"./chunk-TJGYDVGW.js";import"./chunk-FWMUFX7A.js";import"./chunk-PJDJTUPP.js";import"./chunk-CKYNLYKK.js";import"./chunk-EIW7AUAT.js";import{b as f,g as u}from"./chunk-ZA7Z3H2E.js";import{a as p}from"./chunk-72OHZ4K4.js";import"./chunk-RH3M5CKE.js";import{c as m}from"./chunk-FCSLS7ZF.js";import"./chunk-GGNGXQL4.js";import"./chunk-7TQLDYHF.js";import"./chunk-KFE2ZIT5.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim electron \u2014 launch the desktop companion
4
4
 
5
5
  usage:
@@ -15,4 +15,4 @@ examples:
15
15
  sootsim electron
16
16
  sootsim electron --port 5173
17
17
  sootsim electron --profile qa
18
- `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-T4QPLMKW.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
18
+ `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-TM76VEVA.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as d,c as e,d as f}from"./chunk-IWZZ3WNJ.js";import"./chunk-BEYGGLL7.js";import"./chunk-GKZQXNNV.js";import"./chunk-AQ4LICCZ.js";import"./chunk-TRJV4FTF.js";import"./chunk-HNOCTYUV.js";import{d as a,e as b}from"./chunk-G7HDI2XA.js";import"./chunk-ZDJGK2LP.js";import"./chunk-Y3HVBG7J.js";import"./chunk-TJGYDVGW.js";import"./chunk-FWMUFX7A.js";import"./chunk-PJDJTUPP.js";import"./chunk-CKYNLYKK.js";import"./chunk-EIW7AUAT.js";import"./chunk-ZA7Z3H2E.js";import"./chunk-72OHZ4K4.js";import"./chunk-RH3M5CKE.js";import"./chunk-FCSLS7ZF.js";import"./chunk-GGNGXQL4.js";import"./chunk-LQH3LXLE.js";import"./chunk-GUV6Y4T6.js";import"./chunk-AZONU3RG.js";import"./chunk-7TQLDYHF.js";import"./chunk-KFE2ZIT5.js";import"./chunk-N5CBDVBC.js";import"./chunk-RSBOSFLX.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-UM73C576.js";import"./chunk-AZONU3RG.js";import"./chunk-LCINF3EO.js";import"./chunk-7TQLDYHF.js";import"./chunk-KFE2ZIT5.js";import"./chunk-77GYHQSO.js";import"./chunk-K4XHRPXC.js";import"./chunk-RSBOSFLX.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-3GEEUD6C.js";import"./chunk-TUWMBTXX.js";import"./chunk-M6PSWXLZ.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-2LNSP3DP.js";import"./chunk-EIW7AUAT.js";import"./chunk-WAWSYREW.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.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as V}from"./chunk-3GEEUD6C.js";import{a as gt,b as yt}from"./chunk-ICRBDZ47.js";import{a as Ue,h as he,k as oe}from"./chunk-U6LFRHPS.js";import{b as ht,c as bt,i as wt}from"./chunk-3OKJSDPK.js";import"./chunk-5A45ZHOH.js";import{a as Q,b as E,c as C,d as _e,e as re,f as X,g as ye,h as ue,i as mt,j as pt,k as Ae,l as ft}from"./chunk-BNSZ4VR7.js";import{C as ct,E as le,F as dt,L as ut,a as ge,b as Ke,c as ze,d as Ye,e as Ge,f as Xe,g as Ve,h as Qe,i as Ie,j as Ne,o as Fe,p as Ze,q as et,r as tt,s as ot,t as st,u as nt,v as rt,w as it,x as at,y as lt}from"./chunk-BTVLP3P7.js";import"./chunk-MYIECDHD.js";import{c as Le,e as qe,f as We,g as He,h as Me}from"./chunk-GO5HKLXT.js";import{b as Je}from"./chunk-TUWMBTXX.js";import"./chunk-ZJPVQZ52.js";import"./chunk-NTLBFT24.js";import"./chunk-GCLTPF36.js";import"./chunk-PQTOK44U.js";import"./chunk-7RGOOC3I.js";import{a as Be}from"./chunk-HVRWQ7PU.js";import{a as ke,c as Te}from"./chunk-QG747T64.js";import{a as je}from"./chunk-WK4IZ3YX.js";import"./chunk-KQP35HQA.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.js";import{existsSync as so,mkdirSync as no,readFileSync as ro,rmSync as xt,writeFileSync as io}from"fs";import{tmpdir as ao}from"os";import{dirname as lo,join as co,resolve as uo}from"path";var me=1,mo="SOOTSIM_INSPECT_NOTICE_PATH",po=300*1e3,fo=15e3;function $t(){return uo(process.env[mo]||co(ao(),"sootsim-inspect-notice-state.json"))}function go(o,c){return Object.fromEntries(Object.entries(o).filter(([,i])=>typeof i?.signature=="string"&&Number.isFinite(i?.updatedAt)&&c-i.updatedAt<=po))}function yo(o){let c=$t();if(!so(c))return{version:me,entries:{}};try{let i=JSON.parse(ro(c,"utf8"));return i.version!==me||!i.entries||typeof i.entries!="object"?(xt(c,{force:!0}),{version:me,entries:{}}):{version:me,entries:go(i.entries,o)}}catch{return xt(c,{force:!0}),{version:me,entries:{}}}}function ho(o){let c=$t();no(lo(c),{recursive:!0}),io(c,JSON.stringify(o,null,2)+`
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as V}from"./chunk-2LNSP3DP.js";import{a as gt,b as yt}from"./chunk-QNK7V7BJ.js";import{a as Ue,h as he,k as oe}from"./chunk-G7HDI2XA.js";import{b as ht,c as bt,i as wt}from"./chunk-ZDJGK2LP.js";import"./chunk-Y3HVBG7J.js";import{a as Q,b as E,c as C,d as _e,e as re,f as X,g as ye,h as ue,i as mt,j as pt,k as Ae,l as ft}from"./chunk-TJGYDVGW.js";import{C as ct,E as le,F as dt,L as ut,a as ge,b as Ke,c as ze,d as Ye,e as Ge,f as Xe,g as Ve,h as Qe,i as Ie,j as Ne,o as Fe,p as Ze,q as et,r as tt,s as ot,t as st,u as nt,v as rt,w as it,x as at,y as lt}from"./chunk-FWMUFX7A.js";import"./chunk-PJDJTUPP.js";import{c as Le,e as qe,f as We,g as He,h as Me}from"./chunk-CKYNLYKK.js";import{b as Je}from"./chunk-EIW7AUAT.js";import"./chunk-ZA7Z3H2E.js";import"./chunk-72OHZ4K4.js";import"./chunk-RH3M5CKE.js";import"./chunk-FCSLS7ZF.js";import"./chunk-GGNGXQL4.js";import{a as Be}from"./chunk-44YS62BC.js";import{a as ke,c as Te}from"./chunk-LCINF3EO.js";import{a as je}from"./chunk-7TQLDYHF.js";import"./chunk-KFE2ZIT5.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";import{existsSync as so,mkdirSync as no,readFileSync as ro,rmSync as xt,writeFileSync as io}from"fs";import{tmpdir as ao}from"os";import{dirname as lo,join as co,resolve as uo}from"path";var me=1,mo="SOOTSIM_INSPECT_NOTICE_PATH",po=300*1e3,fo=15e3;function $t(){return uo(process.env[mo]||co(ao(),"sootsim-inspect-notice-state.json"))}function go(o,c){return Object.fromEntries(Object.entries(o).filter(([,i])=>typeof i?.signature=="string"&&Number.isFinite(i?.updatedAt)&&c-i.updatedAt<=po))}function yo(o){let c=$t();if(!so(c))return{version:me,entries:{}};try{let i=JSON.parse(ro(c,"utf8"));return i.version!==me||!i.entries||typeof i.entries!="object"?(xt(c,{force:!0}),{version:me,entries:{}}):{version:me,entries:go(i.entries,o)}}catch{return xt(c,{force:!0}),{version:me,entries:{}}}}function ho(o){let c=$t();no(lo(c),{recursive:!0}),io(c,JSON.stringify(o,null,2)+`
3
3
  `)}function bo(o,c){let i=c.trim()||"default";return`${o}:${i}`}function Pe(o,c,i,l={}){let f=l.nowMs??Date.now(),a=l.cooldownMs??fo,g=yo(f),b=bo(o,c),k=g.entries[b];return k&&k.signature===i&&f-k.updatedAt<a?!1:(g.entries[b]={signature:i,updatedAt:f},ho(g),!0)}async function vt(o,c={args:[]}){let i=await ze(o);if(E(c.args)){C(i);return}console.log(` nodes: ${i.nodes}`)}function Oe(o,c){let i=o.indexOf(c);return i>=0&&i+1<o.length?o[i+1]:null}async function St(o){let{bridge:c,args:i,positional:l}=o,f=i.includes("--verbose")||i.includes("-v"),a=E(i),g=f&&!a,b=i.includes("--watch")||i.includes("-w"),k=1e3,M=i.includes("--compact"),h=i.includes("--no-xy"),S=i.includes("--no-clipped"),_=i.includes("--include-occluded"),T=Oe(i,"--testid-like"),R=Oe(i,"--only"),J=Oe(i,"--subtree"),u=l[1]&&!l[1].startsWith("-")?l[1]:void 0,Y=u?/[*?]/.test(u):!1,j=!Y&&!R?u:void 0,D=R??(Y?u:void 0),Z=async()=>{await ye(c,{verbose:g});let $=await Xe(c,{describe:!0,verbose:f,filter:j||"",testIdLike:T||void 0,onlyGlob:D||void 0,subtreeRoot:J||void 0,compact:M,hideXy:h,includeOccluded:_}),I=$?.tree,W=$?.shell,L=$?.keyboard;if(a){C({shell:W,tree:I??"",keyboard:L});return}if(W&&typeof W=="object"){let B=[W.state?`state=${W.state}`:null,W.activeApp?`app=${W.activeApp}`:null,W.showSwitcher?"switcher":null,W.switcherPhase&&W.switcherPhase!=="idle"?`phase=${W.switcherPhase}`:null].filter(Boolean);B.length>0&&console.log(` shell: ${B.join(" ")}`)}if(typeof I=="string"&&I.startsWith("__SUBTREE_NOT_FOUND__:")){let B=I.slice(22);console.log(` subtree root not found: ${B}`),V("subtree-root-not-found",B);return}if(!I){let B=$?.nodeCount??0;console.log(" no matching nodes found"),!(j||T||D||J)&&B<10&&V("app-still-loading",B);return}let z=I,te=0;if(S&&typeof z=="string"){let B=z.split(`
4
4
  `),ae=[];for(let ce of B){if(ce.includes("(clipped:")){te+=1;continue}ae.push(ce)}z=ae.join(`
5
5
  `)}console.log(z),te>0&&console.log(` ${te} clipped row(s) hidden (omit --no-clipped to see)`);let ne=j||T||D||J;if((j||T||D)&&!b&&V("describe-filter-context"),!ne&&!b&&I.split(`
@@ -117,7 +117,7 @@ import{a as V}from"./chunk-3GEEUD6C.js";import{a as gt,b as yt}from"./chunk-ICRB
117
117
  `);console.log(`${t??""}
118
118
 
119
119
  ${n}
120
- `),process.exit(0)}let _=f.wsPort,T=f.simId,R=f.simIdSource,J=f.commandTimeoutMs;if(g==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-52QYW4AB.js"),t=e();console.log(` available drivers (${t.length}):
120
+ `),process.exit(0)}let _=f.wsPort,T=f.simId,R=f.simIdSource,J=f.commandTimeoutMs;if(g==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-LO2QI4OJ.js"),t=e();console.log(` available drivers (${t.length}):
121
121
  `);let n=Math.max(...t.map(s=>s.id.length),6),r=Math.max(...t.map(s=>s.kind.length),4);for(let s of t){let d=s.available?"\u2713":"\u2717",m=s.id.padEnd(n),y=s.kind.padEnd(r);console.log(` ${d} ${m} ${y} ${s.description}`),s.available&&s.detail?console.log(` ${s.detail}`):!s.available&&s.reason&&console.log(` unavailable: ${s.reason}`)}return}let u=qe(f),Y=T||"default",j=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]),D=200;function Z(e){let t=e.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let r=/<title[^>]*>([^<]+)<\/title>/i.exec(e)?.[1]?.trim(),s=/<body[^>]*>([\s\S]*?)<\//i.exec(e)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),d=r||s||"html error page";return`<html ${e.length}B> "${d}" (body elided \u2014 add --json for the full payload)`}return t.length<=D?t:`${t.slice(0,D)}\u2026 (+${t.length-D} more bytes)`}function ee(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function $(e){let t=be()?5e3:1500;try{let{settled:n,elapsed:r}=await oe({bridge:e,maxMs:t,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
122
122
  `)}catch{}}function I(e){return!(!e||e.hit===!1||e.ok===!1||e.pointerTapHandled===!1&&!e.keyboardOpened&&!e.isTextInput)}function W(e,t){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??t??null,type:e.target?.type??e.match?.type??e.node?.type??null}}async function L(e){let t=0,n=null,r=null;try{await oe({bridge:u,maxMs:be()?3e3:1200,pollMs:32,stablePolls:2})}catch{}let s=Date.now()+(be()?5e3:2500);for(;Date.now()<=s||t===0;){t++;let d=await e.resolve();if(n=d,d?.error==="bridge-not-ready"||d?.ambiguous||d?.nthOutOfRange)return{payload:d,result:null,attempts:t,failure:"special"};if(d&&typeof d.cx=="number"&&typeof d.cy=="number"){let y=await u.send({type:"tap",x:d.cx,y:d.cy,target:W(d,e.textFallback)});if(r=y,I(y))return{payload:d,result:y,attempts:t}}let m=s-Date.now();if(m<=0)break;try{await oe({bridge:u,maxMs:Math.min(m,700),pollMs:32,stablePolls:2})}catch{await Q(Math.min(120,m))}}return{payload:n,result:r,attempts:t,failure:n&&typeof n.cx=="number"?"missed":"not-found"}}function z(e,t){console.error(` tap failed: ${e} stayed visible but did not receive a hittable press after ${t.attempts} attempt${t.attempts===1?"":"s"}`),t.result&&console.error(` last result: ${JSON.stringify(t.result)}`)}async function te(){try{return await u.send({type:"evaluate",code:`(() => ({
123
123
  console: window.__sootsimConsole?.count?.() || null,
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-GHCIPI7O.js";import"./chunk-VW4JRT7N.js";import"./chunk-3EJHPOKU.js";import"./chunk-CKYNLYKK.js";import"./chunk-EIW7AUAT.js";import"./chunk-LQH3LXLE.js";import"./chunk-GUV6Y4T6.js";import"./chunk-KFE2ZIT5.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.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,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as b}from"./chunk-TVK2VJYL.js";import{a as x}from"./chunk-NTLBFT24.js";import"./chunk-M6PSWXLZ.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 k}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 _({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");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 I(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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as b}from"./chunk-VW4JRT7N.js";import{a as x}from"./chunk-72OHZ4K4.js";import"./chunk-WAWSYREW.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 k}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 _({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");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 I(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=k(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=k(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 G(n){(n.includes("--help")||n.includes("-h"))&&(console.log(`
4
4
  sootsim install-desktop \u2014 download and install the optional desktop GUI
5
5
 
@@ -20,4 +20,4 @@ examples:
20
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 b("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 _({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${I(r,m)}`))}})}catch(r){g(a,{recursive:!0,force:!0}),console.error(`
22
22
  download failed: ${r instanceof Error?r.message:String(r)}`),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-N6WYGNCG.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{G 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-6BBF4TX3.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{G as runInstallDesktop};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (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-7NOW5YJS.js";import{d as c}from"./chunk-O5AMPKTL.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.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.104 | (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-HNOCTYUV.js";import{d as c}from"./chunk-GUV6Y4T6.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.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.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-D5BRABJ6.js";import{b as m}from"./chunk-ZJPVQZ52.js";import{a as u}from"./chunk-NTLBFT24.js";import"./chunk-GCLTPF36.js";import"./chunk-PQTOK44U.js";import"./chunk-7RGOOC3I.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-HCNHNG6Y.js";import{b as m}from"./chunk-ZA7Z3H2E.js";import{a as u}from"./chunk-72OHZ4K4.js";import"./chunk-RH3M5CKE.js";import"./chunk-FCSLS7ZF.js";import"./chunk-GGNGXQL4.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
3
3
  sootsim launch \u2014 one-shot: install runtime if needed, start daemon, open app
4
4
 
5
5
  usage:
@@ -13,4 +13,4 @@ options:
13
13
  examples:
14
14
  sootsim launch
15
15
  sootsim launch --version 1.2.3
16
- `);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-5MJRZM6Y.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
16
+ `);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-FJITOAIR.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as g,d as m}from"./chunk-O5AMPKTL.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.js";import{exec as S}from"node:child_process";import{randomBytes as $}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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as g,d as m}from"./chunk-GUV6Y4T6.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";import{exec as S}from"node:child_process";import{randomBytes as $}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")}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-N6WYGNCG.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=$(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,O=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:O}),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")}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-6BBF4TX3.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=$(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,O=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:O}),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-N6WYGNCG.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-N6WYGNCG.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-6BBF4TX3.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-6BBF4TX3.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.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r,b as i}from"./chunk-NSBXU7DZ.js";import{a as t,c as o}from"./chunk-O5AMPKTL.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r,b as i}from"./chunk-LQH3LXLE.js";import{a as t,c as o}from"./chunk-GUV6Y4T6.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.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.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as h,c as w}from"./chunk-BVYNDRIZ.js";import"./chunk-GWPUGRAO.js";import"./chunk-6UENYO6F.js";import"./chunk-4FXAHESN.js";import"./chunk-6HNSCIVX.js";import"./chunk-7NOW5YJS.js";import"./chunk-U6LFRHPS.js";import"./chunk-3OKJSDPK.js";import"./chunk-5A45ZHOH.js";import"./chunk-BNSZ4VR7.js";import"./chunk-BTVLP3P7.js";import"./chunk-MYIECDHD.js";import"./chunk-GO5HKLXT.js";import"./chunk-TUWMBTXX.js";import"./chunk-ZJPVQZ52.js";import"./chunk-NTLBFT24.js";import"./chunk-GCLTPF36.js";import"./chunk-PQTOK44U.js";import"./chunk-7RGOOC3I.js";import"./chunk-NSBXU7DZ.js";import"./chunk-O5AMPKTL.js";import"./chunk-3G4PLGXR.js";import"./chunk-WK4IZ3YX.js";import"./chunk-KQP35HQA.js";import"./chunk-KWQPGLJX.js";import"./chunk-NMTLZZZW.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.js";import*as i from"fs";import*as l from"path";var v=[".maestro","maestro"];function x(){console.log(`
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as h,c as w}from"./chunk-IWZZ3WNJ.js";import"./chunk-BEYGGLL7.js";import"./chunk-GKZQXNNV.js";import"./chunk-AQ4LICCZ.js";import"./chunk-TRJV4FTF.js";import"./chunk-HNOCTYUV.js";import"./chunk-G7HDI2XA.js";import"./chunk-ZDJGK2LP.js";import"./chunk-Y3HVBG7J.js";import"./chunk-TJGYDVGW.js";import"./chunk-FWMUFX7A.js";import"./chunk-PJDJTUPP.js";import"./chunk-CKYNLYKK.js";import"./chunk-EIW7AUAT.js";import"./chunk-ZA7Z3H2E.js";import"./chunk-72OHZ4K4.js";import"./chunk-RH3M5CKE.js";import"./chunk-FCSLS7ZF.js";import"./chunk-GGNGXQL4.js";import"./chunk-LQH3LXLE.js";import"./chunk-GUV6Y4T6.js";import"./chunk-AZONU3RG.js";import"./chunk-7TQLDYHF.js";import"./chunk-KFE2ZIT5.js";import"./chunk-N5CBDVBC.js";import"./chunk-RSBOSFLX.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";import*as i from"fs";import*as l from"path";var v=[".maestro","maestro"];function x(){console.log(`
3
3
  sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-M6PSWXLZ.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.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-WAWSYREW.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:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as s,c as i,d as t,e as n,f as c}from"./chunk-PQTOK44U.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.js";function f(){console.log(`
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as s,c as i,d as t,e as n,f as c}from"./chunk-FCSLS7ZF.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";function f(){console.log(`
3
3
  sootsim profile \u2014 manage isolated storage profiles
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.103 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as w,e as b,h as m,i as f}from"./chunk-GO5HKLXT.js";import"./chunk-TUWMBTXX.js";import"./chunk-KQP35HQA.js";import"./chunk-6U5VATXU.js";import"./chunk-M6PSWXLZ.js";function h(){console.log(`
1
+ /*! sootsim v0.1.104 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as w,e as b,h as m,i as f}from"./chunk-CKYNLYKK.js";import"./chunk-EIW7AUAT.js";import"./chunk-KFE2ZIT5.js";import"./chunk-P6JIUAJU.js";import"./chunk-WAWSYREW.js";function h(){console.log(`
3
3
  sootsim react \u2014 inspect React component render cost in the tenant worker
4
4
 
5
5
  usage: