sootsim 0.1.37 → 0.1.38

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 (129) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-EQRQGSBL.js → agent-CGQWOOOL.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-AWKZ67GN.js → agent-wrapper-M6P53GJ2.js} +2 -2
  4. package/dist-cli/chunks/{assert-ZVGELUZB.js → assert-O7N2SYJZ.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-DF4KYGPS.js +2 -0
  6. package/dist-cli/chunks/beta-AK25X3AU.js +2 -0
  7. package/dist-cli/chunks/chunk-23YMXBQ2.js +1 -0
  8. package/dist-cli/chunks/{chunk-PERKPZ7T.js → chunk-2ABGQIW7.js} +1 -1
  9. package/dist-cli/chunks/{chunk-H2HSOHXN.js → chunk-5HNZO5AI.js} +3 -3
  10. package/dist-cli/chunks/{chunk-WLIVBPPY.js → chunk-5XI3AB4I.js} +2 -2
  11. package/dist-cli/chunks/{chunk-S74RCIVB.js → chunk-67K3WAEZ.js} +2 -2
  12. package/dist-cli/chunks/{chunk-PN6FWLD4.js → chunk-6UJXRT7F.js} +1 -1
  13. package/dist-cli/chunks/{chunk-5FLDI6CV.js → chunk-ARH3T5NK.js} +2 -2
  14. package/dist-cli/chunks/{chunk-QXMZNJV5.js → chunk-B4VH67D3.js} +1 -1
  15. package/dist-cli/chunks/{chunk-WFXYY3DU.js → chunk-BEY2QVU5.js} +2 -2
  16. package/dist-cli/chunks/chunk-CB4PUMI2.js +1 -0
  17. package/dist-cli/chunks/chunk-CHMHTTI7.js +11 -0
  18. package/dist-cli/chunks/chunk-E473YTRQ.js +2 -0
  19. package/dist-cli/chunks/{chunk-RLNIKWFO.js → chunk-FCOCFEBU.js} +2 -2
  20. package/dist-cli/chunks/chunk-FRE5TY3C.js +1 -0
  21. package/dist-cli/chunks/chunk-FX3PPKSJ.js +2 -0
  22. package/dist-cli/chunks/{chunk-BGAPLYMS.js → chunk-FXY5FWVY.js} +2 -2
  23. package/dist-cli/chunks/{chunk-4IO3D5XG.js → chunk-G23GIRBM.js} +1 -1
  24. package/dist-cli/chunks/chunk-G62Q2MQI.js +1 -0
  25. package/dist-cli/chunks/{chunk-RX6RHGSI.js → chunk-GWQUPWVO.js} +2 -2
  26. package/dist-cli/chunks/{chunk-WHLHA5R5.js → chunk-H6CG42HE.js} +2 -2
  27. package/dist-cli/chunks/{chunk-URSEYCC5.js → chunk-HNAGYNWN.js} +2 -2
  28. package/dist-cli/chunks/{chunk-UIQ3536J.js → chunk-IE2WYVJF.js} +1 -1
  29. package/dist-cli/chunks/{chunk-EDBFYOQB.js → chunk-IKVIHHWE.js} +1 -1
  30. package/dist-cli/chunks/{chunk-HYYMBXIX.js → chunk-JJVZMGRM.js} +2 -2
  31. package/dist-cli/chunks/{chunk-DSTV2VJT.js → chunk-LNRBXCUI.js} +2 -2
  32. package/dist-cli/chunks/{chunk-X6BP5JFC.js → chunk-MTPWS4JK.js} +2 -2
  33. package/dist-cli/chunks/{chunk-LDWXH43L.js → chunk-NKYTISAN.js} +2 -2
  34. package/dist-cli/chunks/{chunk-L4F4JRKJ.js → chunk-NSZBULGG.js} +3 -3
  35. package/dist-cli/chunks/{chunk-R77F5J3X.js → chunk-P32FCOS3.js} +2 -2
  36. package/dist-cli/chunks/{chunk-JMGDVXAV.js → chunk-P722XCFT.js} +2 -2
  37. package/dist-cli/chunks/{chunk-FCQLQ7NA.js → chunk-PFRPXFSL.js} +1 -1
  38. package/dist-cli/chunks/chunk-QD22CQLH.js +5 -0
  39. package/dist-cli/chunks/{chunk-YFXTO4QX.js → chunk-QI4VLQ3A.js} +1 -1
  40. package/dist-cli/chunks/{chunk-Z5X3PITK.js → chunk-SKNHJDYO.js} +1 -1
  41. package/dist-cli/chunks/{chunk-T5L73GJB.js → chunk-T442FYM5.js} +1 -1
  42. package/dist-cli/chunks/{chunk-ZERYEI3L.js → chunk-TR554AIH.js} +2 -2
  43. package/dist-cli/chunks/{chunk-CX3ZIPD3.js → chunk-UD5ILFN5.js} +2 -2
  44. package/dist-cli/chunks/{chunk-B3RAGRK6.js → chunk-VIEK76DX.js} +1 -1
  45. package/dist-cli/chunks/{chunk-QD7YIVPS.js → chunk-VVUEWU2P.js} +2 -2
  46. package/dist-cli/chunks/{chunk-Z5SVSAZO.js → chunk-Z2PBRNJP.js} +2 -2
  47. package/dist-cli/chunks/{chunk-56BIMCDH.js → chunk-ZEVZN3S4.js} +1 -1
  48. package/dist-cli/chunks/{compat-QQ3OJDBI.js → compat-DNQWSPFQ.js} +2 -2
  49. package/dist-cli/chunks/{config-LT27SC25.js → config-ABR5BGUO.js} +2 -2
  50. package/dist-cli/chunks/control-DEHRU4XZ.js +2 -0
  51. package/dist-cli/chunks/{cpu-profile-XEO3JCVB.js → cpu-profile-Y5YDH6X2.js} +2 -2
  52. package/dist-cli/chunks/{daemon-3J2SAVQZ.js → daemon-2Z4DAJT6.js} +2 -2
  53. package/dist-cli/chunks/{debug-OGQLIH4U.js → debug-R36UPOJP.js} +3 -3
  54. package/dist-cli/chunks/demo-app-registry-DMMWYL7G.js +2 -0
  55. package/dist-cli/chunks/{detox-Z2OSCIQU.js → detox-FQJWEWLT.js} +2 -2
  56. package/dist-cli/chunks/{device-RPTVD25S.js → device-SXKLDZEC.js} +2 -2
  57. package/dist-cli/chunks/{diagnose-LAEXBNOQ.js → diagnose-M7RKNI2H.js} +2 -2
  58. package/dist-cli/chunks/drivers-NSCX5CRA.js +2 -0
  59. package/dist-cli/chunks/{electron-S2463O3P.js → electron-YUAKGT4H.js} +3 -3
  60. package/dist-cli/chunks/flow-UQSRNEZD.js +2 -0
  61. package/dist-cli/chunks/{hints-E5PXPWFT.js → hints-SDD7L3VS.js} +2 -2
  62. package/dist-cli/chunks/{home-paths-F5SGBTRZ.js → home-paths-QMCX2227.js} +2 -2
  63. package/dist-cli/chunks/{inspect-EVGMEZ3G.js → inspect-6FPPW7GS.js} +3 -3
  64. package/dist-cli/chunks/install-TTH3PM3B.js +2 -0
  65. package/dist-cli/chunks/{install-desktop-ZNWYKTWQ.js → install-desktop-EKMYRDQH.js} +3 -3
  66. package/dist-cli/chunks/{keys-5ETF6DYO.js → keys-ODG3TDUP.js} +2 -2
  67. package/dist-cli/chunks/{launch-DHUCNFX6.js → launch-7HUL745I.js} +3 -3
  68. package/dist-cli/chunks/{login-KDR34JIP.js → login-BJKQMJYT.js} +4 -4
  69. package/dist-cli/chunks/{logout-R6WIJYCW.js → logout-7NG3KGJD.js} +2 -2
  70. package/dist-cli/chunks/{maestro-ZOOJ2YVH.js → maestro-VFEUWV3Q.js} +2 -2
  71. package/dist-cli/chunks/{preview-YFADHNBD.js → preview-WZ6XNOBC.js} +2 -2
  72. package/dist-cli/chunks/{profile-CQSC32HB.js → profile-DXFEZOHB.js} +2 -2
  73. package/dist-cli/chunks/{react-QSQD6CJE.js → react-QP7PL5CZ.js} +2 -2
  74. package/dist-cli/chunks/{record-IWLEYATN.js → record-AFE25EMH.js} +2 -2
  75. package/dist-cli/chunks/{runtime-WKMNKYTN.js → runtime-GFWS3QLZ.js} +3 -3
  76. package/dist-cli/chunks/{screenshot-VJXHV57I.js → screenshot-U6VFOVFW.js} +2 -2
  77. package/dist-cli/chunks/{screenshot-mode-FA4VQ76K.js → screenshot-mode-HNGV3AFC.js} +2 -2
  78. package/dist-cli/chunks/{screenshots-U4FQXHVK.js → screenshots-GYMRDUJR.js} +2 -2
  79. package/dist-cli/chunks/{server-7WZLM5NQ.js → server-3Q22YYM6.js} +2 -2
  80. package/dist-cli/chunks/setup-repo-NNDWIGZR.js +2 -0
  81. package/dist-cli/chunks/{skills-KO7RCY24.js → skills-FT76ZVAV.js} +2 -2
  82. package/dist-cli/chunks/{start-EBD7T2GW.js → start-N573LFCF.js} +3 -3
  83. package/dist-cli/chunks/store-6NTDGLPH.js +2 -0
  84. package/dist-cli/chunks/telemetry-SNZBIRGL.js +2 -0
  85. package/dist-cli/chunks/{test-OSVUG54G.js → test-AJPY2Q6W.js} +3 -3
  86. package/dist-cli/chunks/{three-mode-MDBXZQG4.js → three-mode-JZZVOMTG.js} +2 -2
  87. package/dist-cli/chunks/{timeline-UJOKZKQR.js → timeline-GTSCF5P6.js} +2 -2
  88. package/dist-cli/chunks/upload-UHTVCGGR.js +2 -0
  89. package/dist-cli/chunks/{what-happened-LFWH74FR.js → what-happened-N3AQ6I7O.js} +2 -2
  90. package/dist-cli/chunks/{whoami-CUF56TLP.js → whoami-FOIMN6UC.js} +2 -2
  91. package/dist-lib/agent-daemon-client.cjs +1 -1
  92. package/dist-lib/agent-events.cjs +1 -1
  93. package/dist-lib/agent-sessions.cjs +1 -1
  94. package/dist-lib/attached-projects.cjs +1 -1
  95. package/dist-lib/auth/shared-session.cjs +1 -1
  96. package/dist-lib/backend-origin.cjs +1 -1
  97. package/dist-lib/bridge-constants.cjs +1 -1
  98. package/dist-lib/cli-constants.cjs +1 -1
  99. package/dist-lib/config.cjs +1 -1
  100. package/dist-lib/dev-bundle-resolution.cjs +1 -30
  101. package/dist-lib/home-paths.cjs +1 -1
  102. package/dist-lib/host/bridge-host.cjs +41 -25
  103. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  104. package/dist-lib/index.cjs +1 -1
  105. package/dist-lib/metro.cjs +1 -1
  106. package/dist-lib/profiles.cjs +1 -1
  107. package/dist-lib/render-mode.cjs +1 -1
  108. package/dist-lib/vite-base.cjs +41 -25
  109. package/dist-lib/vite.cjs +1 -1
  110. package/package.json +1 -1
  111. package/dist-cli/chunks/auto-bootstrap-UEOLNAWJ.js +0 -2
  112. package/dist-cli/chunks/beta-4MD7WSI4.js +0 -2
  113. package/dist-cli/chunks/chunk-2ZPJHSIJ.js +0 -11
  114. package/dist-cli/chunks/chunk-4OHVCGMF.js +0 -2
  115. package/dist-cli/chunks/chunk-ERLA3F77.js +0 -1
  116. package/dist-cli/chunks/chunk-JMU5IGIU.js +0 -1
  117. package/dist-cli/chunks/chunk-KA5JJCWL.js +0 -1
  118. package/dist-cli/chunks/chunk-QWKO62QM.js +0 -2
  119. package/dist-cli/chunks/chunk-SK4SOISL.js +0 -1
  120. package/dist-cli/chunks/chunk-ZBOIGEGO.js +0 -5
  121. package/dist-cli/chunks/control-3BO54QMO.js +0 -2
  122. package/dist-cli/chunks/demo-app-registry-5RZCXLWB.js +0 -2
  123. package/dist-cli/chunks/drivers-PSQUUAYC.js +0 -2
  124. package/dist-cli/chunks/flow-34YCVQDB.js +0 -2
  125. package/dist-cli/chunks/install-AM5PTJT3.js +0 -2
  126. package/dist-cli/chunks/setup-repo-3BXLAX5E.js +0 -2
  127. package/dist-cli/chunks/store-ONX3EBS4.js +0 -2
  128. package/dist-cli/chunks/telemetry-MFR7TUW7.js +0 -2
  129. package/dist-cli/chunks/upload-H2SMWP6T.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-B3RAGRK6.js";import{spawn as m}from"child_process";import{existsSync as h,readdirSync as w}from"fs";import{resolve as u,dirname as x}from"path";import{fileURLToPath as y}from"url";var d=x(y(import.meta.resolve("sootsim-engine/package.json")));async function v(t,r){let l=t.includes("--flows"),f=t.includes("--detox"),c=t.includes("--parallel"),i=t.includes("--watch"),a=t.find((e,o)=>t[o-1]==="--reporter")||"console";if((t.includes("--help")||t.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-VIEK76DX.js";import{spawn as m}from"child_process";import{existsSync as h,readdirSync as w}from"fs";import{resolve as u,dirname as x}from"path";import{fileURLToPath as y}from"url";var d=x(y(import.meta.resolve("sootsim-engine/package.json")));async function v(t,r){let l=t.includes("--flows"),f=t.includes("--detox"),c=t.includes("--parallel"),i=t.includes("--watch"),a=t.find((e,o)=>t[o-1]==="--reporter")||"console";if((t.includes("--help")||t.includes("-h"))&&(console.log(`
3
3
  sootsim test \u2014 run tests against sootsim
4
4
 
5
5
  usage:
@@ -26,6 +26,6 @@ examples:
26
26
  notes:
27
27
  playwright is best for smoke and package-local debugging
28
28
  --detox is the preferred parity lane for behavior that should match real RN
29
- `),process.exit(0)),l)await b(t,r,c,a);else if(f){let{runDetox:e}=await import("./detox-Z2OSCIQU.js");await e(t.filter(o=>o!=="--detox"),r)}else await g(t,r)}async function g(t,r){let l=["playwright","test"],f=t.find((e,o)=>t[o-1]==="-t")||t.find((e,o)=>t[o-1]==="--testNamePattern")||t.find((e,o)=>t[o-1]==="--grep");f&&l.push("-g",f),t.includes("--watch")&&l.push("--ui");let c=new Set(["--flows","--detox","--parallel","--watch","--reporter","-t","--testNamePattern","--grep"]);for(let e=0;e<t.length;e++){if(c.has(t[e])){(t[e]==="-t"||t[e]==="--testNamePattern"||t[e]==="--grep"||t[e]==="--reporter")&&e++;continue}l.push(t[e])}console.log(` running: npx ${l.join(" ")}`);let i=m("npx",l,{cwd:d,stdio:"inherit",env:{...process.env}}),a=await new Promise(e=>{i.on("exit",o=>e(o||0))});process.exit(a)}async function b(t,r,l,f){let c=["flows","test/flows","e2e/flows",".maestro","maestro"],i=[];for(let o of c){let s=u(d,o);if(h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}for(let o of c){let s=u(process.cwd(),o);if(!s.startsWith(d)&&h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}i.length===0&&(console.log(" no flow files found in flows/, test/flows/, or e2e/flows/"),process.exit(0)),console.log(` found ${i.length} flow(s)`);let a=0,e=0;for(let o of i)try{let{runFlowPlayback:s}=await import("./flow-34YCVQDB.js"),p=r.port?`http://localhost:${r.port}`:"http://localhost:5173";if(await s([o,"--url",p,"--new"])!==0){e++;continue}a++}catch{e++}console.log(`
29
+ `),process.exit(0)),l)await b(t,r,c,a);else if(f){let{runDetox:e}=await import("./detox-FQJWEWLT.js");await e(t.filter(o=>o!=="--detox"),r)}else await g(t,r)}async function g(t,r){let l=["playwright","test"],f=t.find((e,o)=>t[o-1]==="-t")||t.find((e,o)=>t[o-1]==="--testNamePattern")||t.find((e,o)=>t[o-1]==="--grep");f&&l.push("-g",f),t.includes("--watch")&&l.push("--ui");let c=new Set(["--flows","--detox","--parallel","--watch","--reporter","-t","--testNamePattern","--grep"]);for(let e=0;e<t.length;e++){if(c.has(t[e])){(t[e]==="-t"||t[e]==="--testNamePattern"||t[e]==="--grep"||t[e]==="--reporter")&&e++;continue}l.push(t[e])}console.log(` running: npx ${l.join(" ")}`);let i=m("npx",l,{cwd:d,stdio:"inherit",env:{...process.env}}),a=await new Promise(e=>{i.on("exit",o=>e(o||0))});process.exit(a)}async function b(t,r,l,f){let c=["flows","test/flows","e2e/flows",".maestro","maestro"],i=[];for(let o of c){let s=u(d,o);if(h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}for(let o of c){let s=u(process.cwd(),o);if(!s.startsWith(d)&&h(s)){let p=w(s).filter(n=>n.endsWith(".yaml")||n.endsWith(".yml"));for(let n of p)i.push(u(s,n))}}i.length===0&&(console.log(" no flow files found in flows/, test/flows/, or e2e/flows/"),process.exit(0)),console.log(` found ${i.length} flow(s)`);let a=0,e=0;for(let o of i)try{let{runFlowPlayback:s}=await import("./flow-UQSRNEZD.js"),p=r.port?`http://localhost:${r.port}`:"http://localhost:5173";if(await s([o,"--url",p,"--new"])!==0){e++;continue}a++}catch{e++}console.log(`
30
30
  results: ${a} passed, ${e} failed (${i.length} total)
31
31
  `),process.exit(e>0?1:0)}export{v as runTest};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as k}from"./chunk-URSEYCC5.js";import{c as b,e as v,i as w}from"./chunk-ZERYEI3L.js";import"./chunk-PERKPZ7T.js";import"./chunk-ERLA3F77.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";async function z(e,o){if((e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as k}from"./chunk-HNAGYNWN.js";import{c as b,e as v,i as w}from"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";async function z(e,o){if((e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim three-mode \u2014 toggle the 3d device stage
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as m,e as d,h as s}from"./chunk-ZERYEI3L.js";import"./chunk-PERKPZ7T.js";import"./chunk-ERLA3F77.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";import{writeFileSync as g}from"fs";function u(){console.log(`
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as m,e as d,h as s}from"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";import{writeFileSync as g}from"fs";function u(){console.log(`
3
3
  sootsim timeline \u2014 control the semantic event timeline
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-ARH3T5NK.js";import"./chunk-UD5ILFN5.js";import"./chunk-FRE5TY3C.js";import"./chunk-67K3WAEZ.js";import"./chunk-BEY2QVU5.js";import"./chunk-G23GIRBM.js";import"./chunk-TR554AIH.js";import"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as w,e as b,h as d}from"./chunk-ZERYEI3L.js";import{b as S}from"./chunk-PERKPZ7T.js";import"./chunk-ERLA3F77.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";function T(n){let e=[];for(let t=0;t<n.length;t++)if(n[t]==="--since"&&t+1<n.length){e.push(t,t+1);let o=n[t+1].trim(),i=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(o);if(i){let l=Number(i[1]),u=i[2]??"ms",r=u==="s"?l*1e3:u==="m"?l*6e4:l;return{since:Date.now()-r,consumed:e}}let s=Number(o);if(Number.isFinite(s)&&s>1e12)return{since:s,consumed:e}}return{consumed:e}}function x(n){let e=[];for(let t=0;t<n.length;t++)if(n[t]==="--kinds"&&t+1<n.length)return e.push(t,t+1),{kinds:n[t+1].split(",").map(o=>o.trim()).filter(Boolean),consumed:e};return{consumed:e}}function A(n){let e=[];for(let t=0;t<n.length;t++)if(n[t]==="--limit"&&t+1<n.length){e.push(t,t+1);let o=Number(n[t+1]);if(Number.isFinite(o)&&o>0)return{limit:o,consumed:e}}return{consumed:e}}function M(n,e){if(e===null)return new Date(n).toLocaleTimeString();let t=(n-e)/1e3;return`${t>=0?"+":""}${t.toFixed(2)}s`}function E(n,e){switch(n){case"app-launch":return e.phase==="launch"?`launch ${e.appName??e.toAppId??""}`:`dismiss ${e.appName??e.fromAppId??""} \u2192 ${e.toAppId??""}`;case"toast":return`"${e.text??""}"${e.durationMs?` (${e.durationMs}ms)`:""}`;case"keyboard":return`${e.phase??"?"}${e.heightPx?` h=${e.heightPx}`:""}${e.mode?` ${e.mode}`:""}`;case"screen":return`${e.phase??"?"} ${e.name??e.activeName??""}`;case"route":return`${e.phase??"?"} ${e.path??e.pathname??""}`;case"alert":case"actionsheet":case"picker":return`${e.phase??"?"} ${e.title??e.message??""}`;case"notification":return`${e.title??""}${e.body?` \u2014 ${e.body}`:""}`;case"fetch":return`${e.method??"GET"} ${e.url??""}${e.status?` -> ${e.status}`:""}`;case"console":return`${e.level??"log"}: ${(e.message??"").toString().slice(0,120)}`;case"shell":return`${e.event??e.type??e.phase??""}`;case"scroll":return`${e.phase??"?"} ${e.target??""}`;case"gesture":return`${e.phase??"?"} ${e.type??""}`;case"text-input":return`${e.phase??"?"}${e.value!==void 0?` "${String(e.value).slice(0,40)}"`:""}`;case"react-commit":{let t=e.slowest;return`${e.fiberCount??"?"} fibers ${e.durationMs??"?"}ms${t?.displayName?` \xB7 ${t.displayName} ${t.durationMs??"?"}ms`:""}`}case"reanimated":case"animation":return`${e.kind??""} ${e.target??""}${e.durationMs?` ${e.durationMs}ms`:""}`}}function y(n,e){let t=M(n.t,e).padStart(8),o=n.context.padEnd(6),i=`[${n.kind}]`.padEnd(15),s="",l=n.data;return l&&typeof l=="object"&&(s=E(n.kind,l)),` ${t} ${o} ${i} ${s}`}function k(n){let e=[],t={label:"initial state",events:[],startedAt:n[0]?.t??null};e.push(t);for(let o of n)if(t.events.push(o),o.kind==="screen"||o.kind==="route"){let i=o.data,s=i?.phase;if(!s||s==="enter"||s==="appear"||s==="active"){let l=i?.name||i?.activeName||i?.path||i?.pathname||o.kind;e.length===1&&t.events.length===1?t.label=`${o.kind}: ${l}`:(t={label:`${o.kind}: ${l}`,events:[],startedAt:o.t},e.push(t))}}return e}function R(n){if(n.total===0)return"nothing recorded";let e=[],t=["error","warning","console","fetch","toast","alert","actionsheet","picker","notification","screen","route","keyboard","app-launch","shell","scroll","gesture","text-input","react-commit","animation","reanimated"],o=new Set;for(let i of t){let s=n.byKind[i];s&&(e.push(`${s} ${i}${s===1?"":"s"}`),o.add(i))}for(let[i,s]of Object.entries(n.byKind))!o.has(i)&&s&&e.push(`${s} ${i}${s===1?"":"s"}`);return e.join(" \xB7 ")}async function B(n,e){let t=w(n,{port:e.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as w,e as b,h as d}from"./chunk-TR554AIH.js";import{b as S}from"./chunk-2ABGQIW7.js";import"./chunk-23YMXBQ2.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";function T(n){let e=[];for(let t=0;t<n.length;t++)if(n[t]==="--since"&&t+1<n.length){e.push(t,t+1);let o=n[t+1].trim(),i=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(o);if(i){let l=Number(i[1]),u=i[2]??"ms",r=u==="s"?l*1e3:u==="m"?l*6e4:l;return{since:Date.now()-r,consumed:e}}let s=Number(o);if(Number.isFinite(s)&&s>1e12)return{since:s,consumed:e}}return{consumed:e}}function x(n){let e=[];for(let t=0;t<n.length;t++)if(n[t]==="--kinds"&&t+1<n.length)return e.push(t,t+1),{kinds:n[t+1].split(",").map(o=>o.trim()).filter(Boolean),consumed:e};return{consumed:e}}function A(n){let e=[];for(let t=0;t<n.length;t++)if(n[t]==="--limit"&&t+1<n.length){e.push(t,t+1);let o=Number(n[t+1]);if(Number.isFinite(o)&&o>0)return{limit:o,consumed:e}}return{consumed:e}}function M(n,e){if(e===null)return new Date(n).toLocaleTimeString();let t=(n-e)/1e3;return`${t>=0?"+":""}${t.toFixed(2)}s`}function E(n,e){switch(n){case"app-launch":return e.phase==="launch"?`launch ${e.appName??e.toAppId??""}`:`dismiss ${e.appName??e.fromAppId??""} \u2192 ${e.toAppId??""}`;case"toast":return`"${e.text??""}"${e.durationMs?` (${e.durationMs}ms)`:""}`;case"keyboard":return`${e.phase??"?"}${e.heightPx?` h=${e.heightPx}`:""}${e.mode?` ${e.mode}`:""}`;case"screen":return`${e.phase??"?"} ${e.name??e.activeName??""}`;case"route":return`${e.phase??"?"} ${e.path??e.pathname??""}`;case"alert":case"actionsheet":case"picker":return`${e.phase??"?"} ${e.title??e.message??""}`;case"notification":return`${e.title??""}${e.body?` \u2014 ${e.body}`:""}`;case"fetch":return`${e.method??"GET"} ${e.url??""}${e.status?` -> ${e.status}`:""}`;case"console":return`${e.level??"log"}: ${(e.message??"").toString().slice(0,120)}`;case"shell":return`${e.event??e.type??e.phase??""}`;case"scroll":return`${e.phase??"?"} ${e.target??""}`;case"gesture":return`${e.phase??"?"} ${e.type??""}`;case"text-input":return`${e.phase??"?"}${e.value!==void 0?` "${String(e.value).slice(0,40)}"`:""}`;case"react-commit":{let t=e.slowest;return`${e.fiberCount??"?"} fibers ${e.durationMs??"?"}ms${t?.displayName?` \xB7 ${t.displayName} ${t.durationMs??"?"}ms`:""}`}case"reanimated":case"animation":return`${e.kind??""} ${e.target??""}${e.durationMs?` ${e.durationMs}ms`:""}`}}function y(n,e){let t=M(n.t,e).padStart(8),o=n.context.padEnd(6),i=`[${n.kind}]`.padEnd(15),s="",l=n.data;return l&&typeof l=="object"&&(s=E(n.kind,l)),` ${t} ${o} ${i} ${s}`}function k(n){let e=[],t={label:"initial state",events:[],startedAt:n[0]?.t??null};e.push(t);for(let o of n)if(t.events.push(o),o.kind==="screen"||o.kind==="route"){let i=o.data,s=i?.phase;if(!s||s==="enter"||s==="appear"||s==="active"){let l=i?.name||i?.activeName||i?.path||i?.pathname||o.kind;e.length===1&&t.events.length===1?t.label=`${o.kind}: ${l}`:(t={label:`${o.kind}: ${l}`,events:[],startedAt:o.t},e.push(t))}}return e}function R(n){if(n.total===0)return"nothing recorded";let e=[],t=["error","warning","console","fetch","toast","alert","actionsheet","picker","notification","screen","route","keyboard","app-launch","shell","scroll","gesture","text-input","react-commit","animation","reanimated"],o=new Set;for(let i of t){let s=n.byKind[i];s&&(e.push(`${s} ${i}${s===1?"":"s"}`),o.add(i))}for(let[i,s]of Object.entries(n.byKind))!o.has(i)&&s&&e.push(`${s} ${i}${s===1?"":"s"}`);return e.join(" \xB7 ")}async function B(n,e){let t=w(n,{port:e.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
3
3
  sootsim what-happened \u2014 show recent events from the semantic timeline
4
4
 
5
5
  usage:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as n}from"./chunk-WFXYY3DU.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";async function s(){let o=await n();o?.token||(console.log(" not signed in"),process.exit(1));let e=o.user;console.log(` ${e?.email||e?.name||e?.id||"signed in"}`),console.log(` origin: ${o.origin}`),console.log(` updated: ${o.updatedAt}`)}export{s as runWhoami};
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as n}from"./chunk-BEY2QVU5.js";import"./chunk-6UJXRT7F.js";import"./chunk-VIEK76DX.js";async function s(){let o=await n();o?.token||(console.log(" not signed in"),process.exit(1));let e=o.user;console.log(` ${e?.email||e?.name||e?.id||"signed in"}`),console.log(` origin: ${o.origin}`),console.log(` updated: ${o.updatedAt}`)}export{s as runWhoami};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -137,35 +137,6 @@ async function probeBaseUrlBundle(baseUrl, port) {
137
137
  }
138
138
  } catch {
139
139
  }
140
- try {
141
- const oneRes = await fetchDevProbe(`${normalizedBaseUrl}${ONE_BUNDLE_PATH}`, {
142
- method: "HEAD"
143
- });
144
- if (oneRes.ok) {
145
- return {
146
- bundleUrl: `${normalizedBaseUrl}${ONE_BUNDLE_PATH}`,
147
- port,
148
- framework: "one"
149
- };
150
- }
151
- } catch {
152
- }
153
- try {
154
- const metroBundleRes = await fetchDevProbe(
155
- `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`,
156
- {
157
- method: "HEAD"
158
- }
159
- );
160
- if (metroBundleRes.ok) {
161
- return {
162
- bundleUrl: `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`,
163
- port,
164
- framework: "metro"
165
- };
166
- }
167
- } catch {
168
- }
169
140
  try {
170
141
  const statusRes = await fetchDevProbe(`${normalizedBaseUrl}/status`);
171
142
  if (statusRes.ok) {
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -881,7 +881,16 @@ function httpGet(port, path7, method = "GET", timeout = TIMEOUT_MS, headers = {}
881
881
  (res) => {
882
882
  let body = "";
883
883
  res.on("data", (c) => body += c.toString());
884
- res.on("end", () => resolve2({ statusCode: res.statusCode || 0, body }));
884
+ const contentType = (() => {
885
+ const raw = res.headers["content-type"];
886
+ if (typeof raw === "string") return raw;
887
+ if (Array.isArray(raw)) return raw[0];
888
+ return void 0;
889
+ })();
890
+ res.on(
891
+ "end",
892
+ () => resolve2({ statusCode: res.statusCode || 0, body, contentType })
893
+ );
885
894
  }
886
895
  );
887
896
  req.on("error", () => resolve2(null));
@@ -1002,6 +1011,14 @@ function withRuntimeConfig(port, bundleUrl) {
1002
1011
  function isDirectOneBundleUrl(bundleUrl) {
1003
1012
  return bundleUrl.includes("/node_modules/one/metro-entry.bundle");
1004
1013
  }
1014
+ function safeParseManifest(body) {
1015
+ try {
1016
+ const parsed = JSON.parse(body);
1017
+ return parsed && typeof parsed === "object" ? parsed : null;
1018
+ } catch {
1019
+ return null;
1020
+ }
1021
+ }
1005
1022
  function applyManifest(result, manifestRes, buildIconProxyUrl) {
1006
1023
  if (!manifestRes) return result;
1007
1024
  try {
@@ -1052,7 +1069,28 @@ async function probePort(port, buildIconProxyUrl) {
1052
1069
  } else if (!knownNonExpo.has(port)) {
1053
1070
  knownNonExpo.add(port);
1054
1071
  }
1055
- if (oneRes && oneRes.statusCode > 0 && oneRes.statusCode < 400) {
1072
+ const manifestParsed = manifestRes ? safeParseManifest(manifestRes.body) : null;
1073
+ const manifestLaunchUrl = typeof manifestParsed?.launchAsset?.url === "string" ? manifestParsed.launchAsset.url : null;
1074
+ const manifestClient = manifestParsed?.extra?.expoClient || manifestParsed?.extra || {};
1075
+ if (manifestParsed && (manifestLaunchUrl || typeof manifestClient.name === "string")) {
1076
+ knownNonPatched.add(port);
1077
+ const launchUrl2 = manifestLaunchUrl || `http://localhost:${port}/index.bundle?platform=ios&dev=true&hot=true&minify=false`;
1078
+ const framework = launchUrl2.includes(
1079
+ "/one/metro-entry.bundle"
1080
+ ) ? "one" : "expo";
1081
+ return applyManifest(
1082
+ {
1083
+ port,
1084
+ framework,
1085
+ bundleUrl: withRuntimeConfig(port, launchUrl2),
1086
+ hmrUrl: `ws://localhost:${port}/hot`,
1087
+ lastSeen: Date.now()
1088
+ },
1089
+ manifestRes,
1090
+ buildIconProxyUrl
1091
+ );
1092
+ }
1093
+ if (oneRes && oneRes.statusCode > 0 && oneRes.statusCode < 400 && /application\/javascript/i.test(oneRes.contentType || "")) {
1056
1094
  knownNonPatched.add(port);
1057
1095
  knownOne.add(port);
1058
1096
  return applyManifest(
@@ -1078,28 +1116,6 @@ async function probePort(port, buildIconProxyUrl) {
1078
1116
  buildIconProxyUrl
1079
1117
  );
1080
1118
  }
1081
- if (manifestRes) {
1082
- try {
1083
- const manifest = JSON.parse(manifestRes.body);
1084
- const client = manifest?.extra?.expoClient || {};
1085
- if (client.name) {
1086
- const launchUrl2 = manifest?.launchAsset?.url || `http://localhost:${port}/index.bundle?platform=ios&dev=true&hot=true&minify=false`;
1087
- knownNonPatched.add(port);
1088
- return applyManifest(
1089
- {
1090
- port,
1091
- framework: "one",
1092
- bundleUrl: withRuntimeConfig(port, launchUrl2),
1093
- hmrUrl: `ws://localhost:${port}/hot`,
1094
- lastSeen: Date.now()
1095
- },
1096
- manifestRes,
1097
- buildIconProxyUrl
1098
- );
1099
- }
1100
- } catch {
1101
- }
1102
- }
1103
1119
  if (sootsimRes && sootsimRes.statusCode === 200 && sootsimRes.body.includes("sootsim-patched")) {
1104
1120
  knownNonPatched.delete(port);
1105
1121
  return applyManifest(
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -889,7 +889,16 @@ function httpGet(port, path10, method = "GET", timeout = TIMEOUT_MS, headers = {
889
889
  (res) => {
890
890
  let body = "";
891
891
  res.on("data", (c) => body += c.toString());
892
- res.on("end", () => resolve2({ statusCode: res.statusCode || 0, body }));
892
+ const contentType = (() => {
893
+ const raw = res.headers["content-type"];
894
+ if (typeof raw === "string") return raw;
895
+ if (Array.isArray(raw)) return raw[0];
896
+ return void 0;
897
+ })();
898
+ res.on(
899
+ "end",
900
+ () => resolve2({ statusCode: res.statusCode || 0, body, contentType })
901
+ );
893
902
  }
894
903
  );
895
904
  req.on("error", () => resolve2(null));
@@ -998,6 +1007,14 @@ function withRuntimeConfig(port, bundleUrl) {
998
1007
  function isDirectOneBundleUrl(bundleUrl) {
999
1008
  return bundleUrl.includes("/node_modules/one/metro-entry.bundle");
1000
1009
  }
1010
+ function safeParseManifest(body) {
1011
+ try {
1012
+ const parsed = JSON.parse(body);
1013
+ return parsed && typeof parsed === "object" ? parsed : null;
1014
+ } catch {
1015
+ return null;
1016
+ }
1017
+ }
1001
1018
  function applyManifest(result, manifestRes, buildIconProxyUrl) {
1002
1019
  if (!manifestRes) return result;
1003
1020
  try {
@@ -1045,7 +1062,28 @@ async function probePort(port, buildIconProxyUrl) {
1045
1062
  } else if (!knownNonExpo.has(port)) {
1046
1063
  knownNonExpo.add(port);
1047
1064
  }
1048
- if (oneRes && oneRes.statusCode > 0 && oneRes.statusCode < 400) {
1065
+ const manifestParsed = manifestRes ? safeParseManifest(manifestRes.body) : null;
1066
+ const manifestLaunchUrl = typeof manifestParsed?.launchAsset?.url === "string" ? manifestParsed.launchAsset.url : null;
1067
+ const manifestClient = manifestParsed?.extra?.expoClient || manifestParsed?.extra || {};
1068
+ if (manifestParsed && (manifestLaunchUrl || typeof manifestClient.name === "string")) {
1069
+ knownNonPatched.add(port);
1070
+ const launchUrl2 = manifestLaunchUrl || `http://localhost:${port}/index.bundle?platform=ios&dev=true&hot=true&minify=false`;
1071
+ const framework = launchUrl2.includes(
1072
+ "/one/metro-entry.bundle"
1073
+ ) ? "one" : "expo";
1074
+ return applyManifest(
1075
+ {
1076
+ port,
1077
+ framework,
1078
+ bundleUrl: withRuntimeConfig(port, launchUrl2),
1079
+ hmrUrl: `ws://localhost:${port}/hot`,
1080
+ lastSeen: Date.now()
1081
+ },
1082
+ manifestRes,
1083
+ buildIconProxyUrl
1084
+ );
1085
+ }
1086
+ if (oneRes && oneRes.statusCode > 0 && oneRes.statusCode < 400 && /application\/javascript/i.test(oneRes.contentType || "")) {
1049
1087
  knownNonPatched.add(port);
1050
1088
  knownOne.add(port);
1051
1089
  return applyManifest(
@@ -1071,28 +1109,6 @@ async function probePort(port, buildIconProxyUrl) {
1071
1109
  buildIconProxyUrl
1072
1110
  );
1073
1111
  }
1074
- if (manifestRes) {
1075
- try {
1076
- const manifest = JSON.parse(manifestRes.body);
1077
- const client = manifest?.extra?.expoClient || {};
1078
- if (client.name) {
1079
- const launchUrl2 = manifest?.launchAsset?.url || `http://localhost:${port}/index.bundle?platform=ios&dev=true&hot=true&minify=false`;
1080
- knownNonPatched.add(port);
1081
- return applyManifest(
1082
- {
1083
- port,
1084
- framework: "one",
1085
- bundleUrl: withRuntimeConfig(port, launchUrl2),
1086
- hmrUrl: `ws://localhost:${port}/hot`,
1087
- lastSeen: Date.now()
1088
- },
1089
- manifestRes,
1090
- buildIconProxyUrl
1091
- );
1092
- }
1093
- } catch {
1094
- }
1095
- }
1096
1112
  if (sootsimRes && sootsimRes.statusCode === 200 && sootsimRes.body.includes("sootsim-patched")) {
1097
1113
  knownNonPatched.delete(port);
1098
1114
  return applyManifest(
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.38 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sootsim",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "sootsim CLI + vite/metro plugins + skills registry. bridge client for driving the proprietary sootsim-engine over WebSocket.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "MIT",
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d}from"./chunk-H2HSOHXN.js";import"./chunk-ZERYEI3L.js";import"./chunk-PERKPZ7T.js";import"./chunk-ERLA3F77.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d,e}from"./chunk-EDBFYOQB.js";import"./chunk-B3RAGRK6.js";export{e as BETA_ASK_HEADLINE,c as BETA_LABEL,d as BETA_TAGLINE,b as BETA_VERSION_TARGET,a as IS_BETA};
@@ -1,11 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as R,b as q,c as x,d as se}from"./chunk-QWKO62QM.js";import{b as B}from"./chunk-Z5X3PITK.js";import{g as ae}from"./chunk-HYYMBXIX.js";import{a as C,b as j}from"./chunk-YFXTO4QX.js";import{c as ie}from"./chunk-WLIVBPPY.js";import{a as ee}from"./chunk-4OHVCGMF.js";import{d as ne}from"./chunk-4IO3D5XG.js";import{b as re,c as $,d as w,e as S}from"./chunk-ZERYEI3L.js";import{c as F,d as g,e as z}from"./chunk-PERKPZ7T.js";import{E as te,F as oe}from"./chunk-PN6FWLD4.js";import xe from"node:fs";import Ce from"node:os";import G from"node:path";function we(t){return t.replace(/^\[|\]$/g,"").toLowerCase()}function _(t){let o=we(t);return o==="localhost"||o.endsWith(".localhost")||o==="0.0.0.0"||o==="::1"||/^127(?:\.\d{1,3}){3}$/.test(o)}function ce(t){return new Error(`could not resolve a native bundle for ${t}. pass an explicit bundle URL or open Connect and choose the app there.`)}function be(t,o){return t?.includes("/one/metro-entry.bundle")?"one":typeof o=="string"&&o?"expo":"unknown"}function le(t,o,e){return`${t}//${o}:${e}`}function ye(t){if(typeof window>"u")return!1;try{let o=new URL(t);return _(o.hostname)&&_(window.location.hostname)&&o.origin!==window.location.origin}catch{return!1}}async function O(t,o){let e={...o,cache:o?.cache??"no-store"};return ye(t)?fetch(`/__fetch-proxy?url=${encodeURIComponent(t)}`,e):fetch(t,e)}function $e(t){return t==="https:"?443:80}function Se(t){let o=t.pathname||"/";return(o==="/"||o==="")&&!t.search&&!t.hash}async function me(t,o){let e=t.replace(/\/+$/,"");try{let n=await O(`${e}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),i=r?.extra?.expoClient||r?.extra||{},s=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(s||i.name)return{bundleUrl:se(s||`${e}${x}`),port:o,framework:be(s,i.sdkVersion),projectName:i.name}}}catch{}try{if((await O(`${e}${q}`,{method:"HEAD"})).ok)return{bundleUrl:`${e}${q}`,port:o,framework:"one"}}catch{}try{if((await O(`${e}${x}`,{method:"HEAD"})).ok)return{bundleUrl:`${e}${x}`,port:o,framework:"metro"}}catch{}try{let n=await O(`${e}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${e}${x}`,port:o,framework:"metro"}}catch{}return null}async function ve(t){return me(le("http:","localhost",t),t)}async function W(t){let o=t.trim();if(/^\d+$/.test(o)){let a=parseInt(o,10),l=await ve(a);if(l)return l;throw ce(`localhost:${a}`)}let e=o.startsWith("http")?o:`http://${o}`,n;try{n=new URL(e)}catch{throw new Error(`could not parse "${t}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",i=n.port?parseInt(n.port,10):$e(r),s=le(r,n.hostname,i);if(_(n.hostname)&&Se(n)){let a=await me(s,i);if(a)return a;throw ce(s)}return{bundleUrl:n.toString(),port:i,framework:"unknown"}}function qe(){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 de(t){let o=C();if(console.log(` note: no sootsim bridge detected on port ${t}`),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 je(t){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${t}.`),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")}var Pe={rn:"/rn",connectrn:"/rn","connect-rn":"/rn",clock:"/app/clock","native-ui":"/app/native-ui",tamagui:"/app/tamagui",settings:"/app/settings",photos:"/app/photos",camera:"/app/camera"};function I(t){return new Promise(o=>setTimeout(o,t))}function J(t){return t.trim()}function Q(t){try{let o=new URL(t),e=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")||e==="/sootsim"||o.pathname==="/__soot"||o.pathname==="/__soot/"||e==="/rn"||/^\/rn\/[^/]+$/i.test(e)||/^\/app\/[^/]+$/i.test(e)||e==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(e)||/^\/__soot\/app\/[^/]+$/i.test(e)}catch{return!1}}async function at(t){let o=J(t);return(await W(o)).bundleUrl}function K(t){let o=t.replace(/\/+$/,"")||"/";return o==="/__soot"||o.startsWith("/__soot/")?"/__soot":""}function ke(t,o){let e=J(t),n=new URL(o),r=K(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(e)?n.pathname=`${r}/rn/${e}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",e)),n.toString()}function Ie(t){let o=J(t);return/^\d+$/.test(o)||/^https?:\/\//i.test(o)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(o)}async function Ue(t,o){let e=await W(t),n=new URL(o),r=K(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",e.bundleUrl),n.toString()}function Me(t){return t.startsWith("~/")?G.join(Ce.homedir(),t.slice(2)):G.isAbsolute(t)?t:G.resolve(process.cwd(),t)}function Te(t){let o={};for(let e=0;e<t.length;e++){if(t[e]!=="--replace")continue;let n=t[e+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 i=n.slice(0,r).trim(),s=Me(n.slice(r+1).trim());xe.existsSync(s)||(console.error(` sootsim open: replacement file not found: ${s}`),process.exit(1)),o[i]={file:s},e++}return Object.keys(o).length>0?{modules:o}:void 0}function pe(){let t=te();return oe(t)&&t.runtimePort>0?`http://localhost:${t.runtimePort}/`:ee}async function L(t,o=pe()){if(!t)return new URL(o).toString();if(Q(t))return new URL(t).toString();let e=Pe[t.toLowerCase()];if(e){let n=new URL(o),r=K(n.pathname);return n.pathname=`${r}${e}`,n.toString()}return Ie(t)?Ue(t,o):ke(t,o)}function ue(t,o){let e=t?.url||t?.origin||o;try{let n=new URL(e);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 Be(t,o,e){let n=new URL(await L(t,o));return n.searchParams.set("inspectOpen",e),n.toString()}async function Re(t,o,e,n={}){let r=n.attempts??30,i=n.intervalMs??500,s=n.minNodeCount??10;for(let a=0;a<r;a++){let l=w(t,{commandTimeoutMs:o,simId:e,simIdSource:"flag"});try{let m=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof m=="number"&&m>s)return{bridge:l,count:m}}catch{}l.close(),await I(i)}return null}function _e(t){if(!t)return null;try{let o=new URL(t);if(o.searchParams.has("bundle")){let e=o.searchParams.get("bundle")||"";try{let n=new URL(e),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 Oe(t,o){if(t.length===0){console.log(" no sims connected");return}console.log(` connected sims (${t.length}):
3
- `);for(let e of t){let n=e.lockedBy&&e.lockExpiresAt?`locked by ${e.lockedBy} (${Math.max(0,Math.round((e.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[e.isPrimary?"primary":"",e.id===o?"selected":"",e.readyState,e.attachedCliCount&&e.attachedCliCount>0?"in use":"",e.userFocused?"focused":"",n].filter(Boolean);console.log(` ${e.id}${r.length?` [${r.join(", ")}]`:""}`);let i=_e(e.url);if(i&&console.log(` loaded: ${i}`),e.url?console.log(` url: ${e.url}`):e.origin&&console.log(` origin: ${e.origin}`),e.title&&console.log(` title: ${e.title}`),console.log(` connected: ${new Date(e.connectedAt).toISOString()}`),e.lastActiveAt&&e.lastActiveAt>0){let s=Math.round((Date.now()-e.lastActiveAt)/1e3),a=s<60?`${s}s ago`:s<3600?`${Math.round(s/60)}m ago`:`${Math.round(s/3600)}h ago`;console.log(` last active: ${a}`)}}}async function E(t,o,e,n={}){let r=n.attempts??30,i=n.intervalMs??500;for(let s=0;s<r;s++){let a=w(t,{commandTimeoutMs:o});try{let m=(await a.listSims()).find(e);if(m)return m}catch{}finally{a.close()}await I(i)}return null}async function Ee(t,o,e,n={}){let r=n.attempts??20,i=n.intervalMs??250;for(let s=0;s<r;s++){let a=w(t,{commandTimeoutMs:o});try{let m=(await a.listSims()).find(b=>b.id===e);if(!m||m.readyState!=="open")return!0}catch{return!0}finally{a.close()}await I(i)}return!1}function D(t,o){if(o){let r=o.trim(),i=t.find(s=>s.id===r);if(!i)throw new Error(`no sim connected with id ${r}`);return i}let e=t.find(r=>r.isPrimary&&r.readyState==="open");if(e)return e;let n=t.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function P(t,o,e){console.log(` ${e==="current sim"?"loaded":"opened"}: ${t} [${e}]`),console.log(` current sim: ${o.id}`),console.log(JSON.stringify({simId:o.id,url:o.url},null,2))}async function k(t,o,e){if(e.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await Le(t,o,{stableMs:150,maxMs:400});let r=w(t,{commandTimeoutMs:3e3,simId:o,cliLabel:"open --describe",simIdSource:"flag"});try{let s=`(async () => {
4
- const t = window.__sootsimTest
5
- const ms = window.SootSim?.bridges?.mainShell
6
- if (!t) return null
7
- let shell = null
8
- try { shell = ms?.getState ? await ms.getState() : null } catch {}
9
- const tree = await t.dumpTree(12, ${JSON.stringify({describe:!0,verbose:!1,filter:""})})
10
- return { tree, shell }
11
- })()`,a=await r.send({type:"evaluate",code:s});if(!a?.tree)return;if(console.log(""),a.shell?.state){let l=[`state=${a.shell.state}`,a.shell.activeApp?`app=${a.shell.activeApp}`:null].filter(Boolean);console.log(` shell: ${l.join(" ")}`)}console.log(a.tree)}finally{r.close()}}catch{}finally{n===void 0?delete process.env.SOOTSIM_QUIET_TARGET_NOTICE:process.env.SOOTSIM_QUIET_TARGET_NOTICE=n}}async function Le(t,o,e){let n=Date.now()+e.maxMs,r="(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()",i=w(t,{commandTimeoutMs:2e3,simId:o,simIdSource:"flag"});try{let s=-1,a=0;for(;Date.now()<n;){let l=-1;try{let m=await i.send({type:"evaluate",code:r});typeof m=="number"&&(l=m)}catch{}if(l>=0&&l===s){if(Date.now()-a>=e.stableMs)return}else s=l,a=Date.now();await I(50)}}finally{i.close()}}async function ct(t,o={}){let e=$(t,{port:o.port,commandTimeoutMs:o.timeoutMs}),n=S(e);try{let r=await n.listSims();Oe(r,e.simId)}finally{n.close()}}async function lt(t,o={}){let e=$(t,{port:o.port,commandTimeoutMs:o.timeoutMs,stripBooleanFlags:["--new","--headless","--ephemeral"],stripValueFlags:["--base-url","--replace","--driver","--profile"]}),n=t.find((c,d)=>t[d-1]==="--profile"),r=t.includes("--ephemeral");n&&r&&(console.error(" sootsim open: --profile cannot be combined with --ephemeral"),process.exit(1));let i=n?ie(n).id:void 0,s=!!i||r,a=t.includes("--new")||s,l=Te(t);a&&e.simIdSource==="flag"&&(console.error(" sootsim open: --new, --profile, and --ephemeral cannot be combined with --sim"),process.exit(1));let m=e.positional[0]||"",b=t.find((c,d)=>t[d-1]==="--driver")||"",he=t.includes("--headless"),v=t.find((c,d)=>t[d-1]==="--base-url")||pe(),V=t.includes("--base-url"),X=F();if(!a&&(e.simIdSource==="flag"||e.simIdSource==="saved"&&!!X)){let c=S(e),d=e.simId?` --sim ${e.simId}`:"",u=!1;try{let p=null;try{let h=await c.listSims();if(e.simIdSource==="saved"?(p=h.find(y=>y.id===X&&y.readyState==="open")??null,p||z()):p=D(h,e.simId),!p)if(e.simIdSource==="saved")u=!0;else throw new Error("no sim connected");if(!u&&p){let y=V||Q(m)?v:ue(p,v),T=await L(m,R(y,l));c.send({type:"evaluate",simId:p.id,code:`window.location.href = ${JSON.stringify(T)}`}).catch(()=>{})}}catch(h){console.error(` open failed: ${h instanceof Error?h.message:String(h)}`),await B(c,{errorsCommand:`sootsim get errors 5${d}`,warningsCommand:`sootsim get warnings 5${d}`,requestsCommand:`sootsim get requests 5${d}`}),process.exit(1)}if(!u&&p){await I(1500);let h=await Re(e.wsPort,e.commandTimeoutMs,p.id);h||(console.error(" timed out waiting for current sim to load target"),process.exit(1)),h.bridge.close(),g(p.id);let y=V||Q(m)?v:ue(p,v),T=await L(m,R(y,l));P(T,{...p,url:T},"current sim"),await k(e.wsPort,p.id,t);return}}finally{c.close()}}let Y=R(v,l),ge=await L(m,Y),Z=`cli-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,f=await Be(m,Y,Z),A={newWindow:!0},U=c=>c.url?.includes(`inspectOpen=${Z}`)??!1;if(b){let c=ae(b);c||(console.error(` unknown driver "${b}" \u2014 run \`sootsim list --drivers\``),process.exit(1));let d=await c.launch({url:f,headless:he,newWindow:A.newWindow,profileId:i,ephemeralProfile:r});d.launched||(console.error(` ${c.name} driver: ${d.message}`),process.exit(1));let u=await E(e.wsPort,e.commandTimeoutMs,U,{attempts:60,intervalMs:500});u||(console.error(" timed out waiting for opened sim to connect"),process.exit(1)),g(u.id),P(f,u,`${c.name} driver`),await k(e.wsPort,u.id,t);return}if(s){let c=C();c||(console.error(" profiles require electron or playwright; install the desktop companion or use `--driver playwright`"),process.exit(1));try{(await j(f,c,{profileId:i,ephemeralProfile:r})).launched||(console.error(" desktop companion failed to start"),process.exit(1))}catch(u){console.error(` desktop companion failed: ${u instanceof Error?u.message:String(u)}`),process.exit(1)}let d=await E(e.wsPort,e.commandTimeoutMs,U,{attempts:40,intervalMs:500});d||(console.error(" timed out waiting for profiled sim to connect"),process.exit(1)),g(d.id),P(f,d,"desktop companion"),await k(e.wsPort,d.id,t);return}let N=!1,H=!1;try{let c=w(e.wsPort,{commandTimeoutMs:2e3});try{await c.listSims(),N=!0}finally{c.close()}}catch{}if(N)try{let c=w(e.wsPort,{commandTimeoutMs:3e3});try{await c.openUrl(f,A),H=!0}finally{c.close()}}catch{}if(!H){let c=C();if(c)try{if((await j(f,c)).launched){let u=await E(e.wsPort,e.commandTimeoutMs,U,{attempts:20,intervalMs:500});if(u){g(u.id),P(f,u,"desktop companion"),await k(e.wsPort,u.id,t);return}}}catch{}if(await ne(f,A),!N){console.log(` opened: ${ge}`),de(e.wsPort);return}}let M=await E(e.wsPort,e.commandTimeoutMs,U,{attempts:30,intervalMs:500});M||(console.error(" timed out waiting for opened sim to connect"),process.exit(1)),g(M.id),P(f,M,H?"bridge":"direct shell open"),await k(e.wsPort,M.id,t)}async function fe(t,o={}){let e=$(t,{port:o.port,commandTimeoutMs:o.timeoutMs}),n=S(e),r=e.simId?` --sim ${e.simId}`:"";try{try{let i=await n.listSims(),s=D(i,e.positional[0]||e.simId);await n.focusSim(s.id),g(s.id),console.log(` using: ${s.id}`)}catch(i){console.error(` use failed: ${i instanceof Error?i.message:String(i)}`),await B(n,{errorsCommand:`sootsim get errors 5${r}`,warningsCommand:`sootsim get warnings 5${r}`,requestsCommand:`sootsim get requests 5${r}`}),process.exit(1)}}finally{n.close()}}async function mt(t,o={}){await fe(t,o)}async function dt(t,o={}){await fe(t,o)}async function ut(t,o={}){let e=$(t,{port:o.port,commandTimeoutMs:o.timeoutMs,stripBooleanFlags:["--force"]}),n=t.includes("--force"),r=S(e);try{try{let i=await r.listSims(),s=D(i,e.positional[0]||e.simId),a=n&&s.lockedBy&&s.lockedByKind!=="user-active"?s.lockedBy:null,l=await r.claim(s.id,{force:n});g(s.id);let m=Math.max(0,Math.round((l.lockExpiresAt-Date.now())/1e3)),b=l.bootedCount>0?` (booted ${l.bootedCount})`:"";console.log(` claimed: ${l.simId} [${m}s]${b}`),a&&console.log(` took over from: ${a}`)}catch(i){if(i instanceof re){let s=Math.max(0,Math.round(i.lock.expiresInMs/1e3));console.error(` claim failed: locked by ${i.lock.by} for ${s}s more`),console.error(" use --force to take it, or `sootsim open --new` for a fresh sim"),process.exit(1)}console.error(` claim failed: ${i instanceof Error?i.message:String(i)}`),process.exit(1)}}finally{r.close()}}async function pt(t,o={}){let e=$(t,{port:o.port,commandTimeoutMs:o.timeoutMs}),n=S(e),r=e.simId?` --sim ${e.simId}`:"";try{try{let i=await n.listSims(),s=D(i,e.positional[0]||e.simId),a=i.find(m=>m.id!==s.id&&m.readyState==="open");if(await n.closeSim(s.id),!await Ee(e.wsPort,e.commandTimeoutMs,s.id)){console.log(` close requested: ${s.id} (still connected)`);return}F()===s.id&&(a?g(a.id):z()),console.log(` closed: ${s.id}`)}catch(i){console.error(` close failed: ${i instanceof Error?i.message:String(i)}`),await B(n,{errorsCommand:`sootsim get errors 5${r}`,warningsCommand:`sootsim get warnings 5${r}`,requestsCommand:`sootsim get requests 5${r}`}),process.exit(1)}}finally{n.close()}}export{qe as a,je as b,at as c,pe as d,L as e,Be as f,_e as g,Oe as h,E as i,ct as j,lt as k,mt as l,dt as m,ut as n,pt as o};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- var t="http://localhost:5173/";export{t as a};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- var i="sootsimConfig";function e(n){return!!n&&Object.keys(n).length>0}function s(n){return n?e(n.modules)||e(n.turboModules)||e(n.nativeModules)||e(n.env)||e(n.settings)||e(n.initialState):!1}function u(n,o){let t=new URL(n);return s(o)?t.searchParams.set(i,JSON.stringify(o)):t.searchParams.delete(i),t.toString()}var g="/node_modules/one/metro-entry.bundle?platform=ios&dev=true&minify=false",l="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function r(n){return/^https?:\/\//i.test(n)}function a(n){return n.endsWith(".bundle")}function S(n){try{let o=r(n),t=new URL(n,"http://soot.local");return t.pathname=t.pathname.replace(/\.\.bundle$/,".bundle"),a(t.pathname)?(t.searchParams.delete("transform.bytecode"),o?t.toString():`${t.pathname}${t.search}${t.hash}`):n}catch{return n}}export{u as a,g as b,l as c,S as d};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,5 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as C,d as x}from"./chunk-QWKO62QM.js";import{a as y}from"./chunk-QD7YIVPS.js";import{exec as D}from"child_process";import _ from"http";import k from"net";import{promisify as E}from"util";var v=E(D),U=250,T=120;function A(e,o=T){return new Promise(s=>{let n=new k.Socket,r=!1,i=c=>{r||(r=!0,n.destroy(),s(c))};n.setTimeout(o),n.once("connect",()=>i(!0)),n.once("timeout",()=>i(!1)),n.once("error",()=>i(!1)),n.connect(e,"localhost")})}function m(e,o,s="GET",n=U,r={}){return new Promise(i=>{let c=_.request({hostname:"localhost",port:e,path:o,method:s,timeout:n,headers:r},t=>{let a="";t.on("data",l=>a+=l.toString()),t.on("end",()=>i({statusCode:t.statusCode||0,body:a}))});c.on("error",()=>i(null)),c.setTimeout(n,()=>{c.destroy(),i(null)}),c.end()})}var M=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0}));function S(e,o){return!(e<=0||e>=2e4||o.has(e)||e>=5170&&e<=5200)}async function N(e=[]){let o=new Set(e);try{let{stdout:s}=await v("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",{encoding:"utf8",timeout:2e3});if(s.trim()){let n=new Map;for(let r of s.trim().split(`
3
- `)){let i=r.trim().split(/\s+/);if(i.length<9)continue;let c=Number(i[1]),a=i[8].match(/:(\d+)$/);if(!a)continue;let l=Number(a[1]);S(l,o)&&(n.has(l)||n.set(l,c))}if(n.size>0)return[...n.entries()].map(([r,i])=>({port:r,pid:i}))}}catch{}try{let{stdout:s}=await v(`ss -tlnp 2>/dev/null | grep -E '"(node|bun)"'`,{encoding:"utf8",timeout:2e3});if(s.trim()){let n=new Map;for(let r of s.trim().split(`
4
- `)){let i=r.match(/:(\d+)\s/),c=r.match(/pid=(\d+)/);if(!i)continue;let t=Number(i[1]),a=c?Number(c[1]):0;S(t,o)&&(n.has(t)||n.set(t,a))}if(n.size>0)return[...n.entries()].map(([r,i])=>({port:r,pid:i}))}}catch{}return M.filter(s=>S(s.port,o))}var w=new Map;async function R(e){if(e<=0)return null;let o=w.get(e);if(o)return o;try{let{stdout:s}=await v(`lsof -p ${e} -a -d cwd -Fn 2>/dev/null`,{encoding:"utf8",timeout:1500});for(let n of s.split(`
5
- `))if(n.startsWith("n")&&n.length>1){let r=n.slice(1).trim();if(r)return w.set(e,r),r}}catch{}return null}function $(e,o){return{port:e,framework:o,bundleUrl:f(e,`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()}}function f(e,o){let s=y.find(r=>r.preferredPort===e),n=s?.runtimeConfig?C(o,s.runtimeConfig):o;return x(n)}function L(e){return e.includes("/node_modules/one/metro-entry.bundle")}function h(e,o,s){if(!o)return e;try{let n=JSON.parse(o.body),r=n?.extra?.expoClient||n?.extra||{};r.name&&(e.projectName=r.name),r.ios?.bundleIdentifier&&(e.bundleId=r.ios.bundleIdentifier),e.framework==="metro"&&r.sdkVersion&&(e.framework="expo");let i=n?.launchAsset?.url;i&&!e.patched&&!L(e.bundleUrl)&&(e.bundleUrl=f(e.port,i));let c=r.iconUrl||r.ios?.iconUrl||r.icon||r.ios?.icon;if(c)if(e.iconPath=c,s)if(c.startsWith("http"))e.iconUrl=s(c);else{let t=c.replace(/^\.\//,"");e.iconUrl=s(`http://localhost:${e.port}/assets/${t}`)}else e.iconUrl=c.startsWith("http")?c:`http://localhost:${e.port}/assets/${c.replace(/^\.\//,"")}`}catch{}return e}var u=new Set,d=new Set,p=new Set;async function I(e,o){if(!await A(e))return null;let s="/node_modules/one/metro-entry.bundle?platform=ios&dev=true",[n,r,i,c,t]=await Promise.all([u.has(e)?Promise.resolve(null):m(e,"/__soot/"),m(e,"/status"),m(e,s,"HEAD"),p.has(e)?Promise.resolve(null):m(e,"/","GET",U,{"expo-platform":"ios"}),d.has(e)?Promise.resolve(null):m(e,"/_expo/status")]);if(t&&t.statusCode===200?d.delete(e):d.has(e)||d.add(e),i&&i.statusCode>0&&i.statusCode<400)return u.add(e),p.add(e),h({port:e,framework:"one",bundleUrl:f(e,`http://localhost:${e}${s}&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},c,o);if(r&&r.body.includes("packager-status:running"))return u.add(e),h($(e,t&&t.statusCode===200?"expo":"metro"),c,o);if(c)try{let a=JSON.parse(c.body);if((a?.extra?.expoClient||{}).name){let g=a?.launchAsset?.url||`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`;return u.add(e),h({port:e,framework:"one",bundleUrl:f(e,g),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},c,o)}}catch{}return n&&n.statusCode===200&&n.body.includes("sootsim-patched")?(u.delete(e),h({port:e,framework:"one",bundleUrl:f(e,`http://localhost:${e}/__soot/bundle.js`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now(),patched:!0},c,o)):(u.add(e),null)}function O(e){let o=e.projectName?.trim().toLowerCase();return!!(o==="soot"||o==="sootsim"||e.bundleId?.trim().toLowerCase()?.startsWith("dev.soot"))}var b=new Map,H=3e4,B=1500;function G(e){return!e||e.framework==="metro"||e.framework==="unknown"}function W(e){return e?f(e.port,e.bundleUrl)===e.bundleUrl:!0}function j(e,o,s=Date.now()){if(o===0||e.pid!==o||!W(e.result))return!1;let n=s-e.cachedAt;return!(e.result===null&&n>=H||G(e.result)&&n>=B)}async function X(e={}){let o=await N(e.excludePorts),s=new Set(o.map(t=>t.port));for(let t of[...b.keys()])s.has(t)||b.delete(t);for(let t of[...u])s.has(t)||u.delete(t);for(let t of[...d])s.has(t)||d.delete(t);for(let t of[...p])s.has(t)||p.delete(t);let n=[],r=[];for(let{port:t,pid:a}of o){let l=b.get(t);if(l&&j(l,a)){l.result&&n.push(l.result);continue}l&&l.pid!==a&&(u.delete(t),d.delete(t),p.delete(t)),r.push({port:t,pid:a})}r.length>0&&(await Promise.all(r.map(a=>I(a.port,e.buildIconProxyUrl)))).forEach((a,l)=>{let{port:g,pid:P}=r[l];P!==0&&b.set(g,{pid:P,result:a,cachedAt:Date.now()}),a&&n.push(a)});let i=new Map;for(let{port:t,pid:a}of o)a>0&&i.set(t,a);await Promise.all(n.map(async t=>{let a=i.get(t.port);if(!a)return;t.pid=a;let l=await R(a);l&&(t.cwd=l)}));let c=new Set(i.values());for(let t of[...w.keys()])c.has(t)||w.delete(t);return n.filter(t=>!O(t))}export{X as a};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m}from"./chunk-2ZPJHSIJ.js";import"./chunk-QWKO62QM.js";import"./chunk-Z5X3PITK.js";import"./chunk-HYYMBXIX.js";import"./chunk-YFXTO4QX.js";import"./chunk-WLIVBPPY.js";import"./chunk-JMU5IGIU.js";import"./chunk-4OHVCGMF.js";import"./chunk-4IO3D5XG.js";import"./chunk-ZERYEI3L.js";import"./chunk-PERKPZ7T.js";import"./chunk-ERLA3F77.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";export{d as buildOpenUrl,c as buildShellUrl,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,l as runClaimCommand,m as runCloseCommand,k as runFocusCommand,h as runListCommand,i as runOpenCommand,j as runUseCommand,e as summarizeSimUrl,g as waitForSimMatch};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-QD7YIVPS.js";import"./chunk-B3RAGRK6.js";export{a as APPS};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-KA5JJCWL.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-HYYMBXIX.js";import"./chunk-YFXTO4QX.js";import"./chunk-WLIVBPPY.js";import"./chunk-JMU5IGIU.js";import"./chunk-4IO3D5XG.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d}from"./chunk-L4F4JRKJ.js";import"./chunk-ZBOIGEGO.js";import"./chunk-WHLHA5R5.js";import"./chunk-SK4SOISL.js";import"./chunk-RLNIKWFO.js";import"./chunk-DSTV2VJT.js";import"./chunk-2ZPJHSIJ.js";import"./chunk-QWKO62QM.js";import"./chunk-Z5X3PITK.js";import"./chunk-HYYMBXIX.js";import"./chunk-YFXTO4QX.js";import"./chunk-WLIVBPPY.js";import"./chunk-QD7YIVPS.js";import"./chunk-5FLDI6CV.js";import"./chunk-CX3ZIPD3.js";import"./chunk-JMU5IGIU.js";import"./chunk-Z5SVSAZO.js";import"./chunk-4OHVCGMF.js";import"./chunk-RX6RHGSI.js";import"./chunk-56BIMCDH.js";import"./chunk-S74RCIVB.js";import"./chunk-WFXYY3DU.js";import"./chunk-4IO3D5XG.js";import"./chunk-ZERYEI3L.js";import"./chunk-PERKPZ7T.js";import"./chunk-ERLA3F77.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";export{b as discoverSootsimUrl,a as parseFlowFile,d as runFlow,c as runFlowPlayback};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as o}from"./chunk-BGAPLYMS.js";import"./chunk-QXMZNJV5.js";import"./chunk-H2HSOHXN.js";import"./chunk-S74RCIVB.js";import"./chunk-WFXYY3DU.js";import"./chunk-ZERYEI3L.js";import"./chunk-PERKPZ7T.js";import"./chunk-ERLA3F77.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-BGAPLYMS.js";import"./chunk-QXMZNJV5.js";import"./chunk-H2HSOHXN.js";import"./chunk-S74RCIVB.js";import"./chunk-WFXYY3DU.js";import"./chunk-ZERYEI3L.js";import"./chunk-PERKPZ7T.js";import"./chunk-ERLA3F77.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";export{a as runSetupRepo};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-RX6RHGSI.js";import"./chunk-56BIMCDH.js";import"./chunk-B3RAGRK6.js";export{a as settingsStore};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b}from"./chunk-S74RCIVB.js";import"./chunk-WFXYY3DU.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";export{b as flushCliTelemetry,a as trackCliEvent};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c}from"./chunk-5FLDI6CV.js";import"./chunk-CX3ZIPD3.js";import"./chunk-JMU5IGIU.js";import"./chunk-S74RCIVB.js";import"./chunk-WFXYY3DU.js";import"./chunk-4IO3D5XG.js";import"./chunk-ZERYEI3L.js";import"./chunk-PERKPZ7T.js";import"./chunk-ERLA3F77.js";import"./chunk-PN6FWLD4.js";import"./chunk-B3RAGRK6.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};