sootsim 0.1.84 → 0.1.85

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 (144) hide show
  1. package/detox/element-types.ts +36 -0
  2. package/detox/expectations.ts +1 -1
  3. package/detox/index.ts +2 -35
  4. package/dist-cli/bin.js +3 -3
  5. package/dist-cli/chunks/{agent-2CWD6W6P.js → agent-T3DUH5YJ.js} +2 -2
  6. package/dist-cli/chunks/{agent-wrapper-5W3LOX6S.js → agent-wrapper-NSBF4THI.js} +2 -2
  7. package/dist-cli/chunks/{assert-ZOMAMKRT.js → assert-X3F7TRCZ.js} +2 -2
  8. package/dist-cli/chunks/auto-bootstrap-47RN2V5G.js +2 -0
  9. package/dist-cli/chunks/beta-BRCGAF2N.js +2 -0
  10. package/dist-cli/chunks/chunk-36RPD6JI.js +2 -0
  11. package/dist-cli/chunks/{chunk-5XCXOLG2.js → chunk-3WGHC7JN.js} +2 -2
  12. package/dist-cli/chunks/chunk-4DBPNLGI.js +1 -0
  13. package/dist-cli/chunks/{chunk-RF4R2U46.js → chunk-4EVSIUNB.js} +2 -2
  14. package/dist-cli/chunks/{chunk-TK3OJSEO.js → chunk-4QZHZ6BC.js} +2 -2
  15. package/dist-cli/chunks/{chunk-DUUSJDES.js → chunk-5DIGWOY7.js} +1 -1
  16. package/dist-cli/chunks/{chunk-4OWVPRZV.js → chunk-5N3V7OCG.js} +2 -2
  17. package/dist-cli/chunks/{chunk-KU6MSPAH.js → chunk-5S6D7K4L.js} +2 -2
  18. package/dist-cli/chunks/{chunk-QMSJR5R2.js → chunk-7LKUN46F.js} +2 -2
  19. package/dist-cli/chunks/{chunk-SV7FOGJ3.js → chunk-AC6QGW22.js} +2 -2
  20. package/dist-cli/chunks/{chunk-C3DPQZ4J.js → chunk-AFNDVS4E.js} +2 -2
  21. package/dist-cli/chunks/{chunk-PPKKA5VW.js → chunk-BESAZ2HA.js} +2 -2
  22. package/dist-cli/chunks/{chunk-73UZXB4B.js → chunk-BHZJ6RIH.js} +2 -2
  23. package/dist-cli/chunks/{chunk-ELJLF4SG.js → chunk-BZL6D4TV.js} +3 -3
  24. package/dist-cli/chunks/{chunk-YCIA4BHJ.js → chunk-CF2LPRXD.js} +2 -2
  25. package/dist-cli/chunks/{chunk-3HXQ7MJK.js → chunk-DWTLRPEN.js} +2 -2
  26. package/dist-cli/chunks/{chunk-BCBNVJVG.js → chunk-E2QE5FFP.js} +1 -1
  27. package/dist-cli/chunks/{chunk-WNVNU2OW.js → chunk-EBEL6TTJ.js} +2 -2
  28. package/dist-cli/chunks/{chunk-OOOR7NT2.js → chunk-EFM53PZ5.js} +1 -1
  29. package/dist-cli/chunks/{chunk-XQ2OBHBE.js → chunk-EKXK3SWK.js} +2 -2
  30. package/dist-cli/chunks/{chunk-4K7BH2D4.js → chunk-G7CIZ5S3.js} +3 -3
  31. package/dist-cli/chunks/{chunk-AJVTY6KY.js → chunk-GTAD6IUV.js} +1 -1
  32. package/dist-cli/chunks/{chunk-BKBL6K2G.js → chunk-H44IQHKZ.js} +1 -1
  33. package/dist-cli/chunks/{chunk-VH7F45CN.js → chunk-HQDJ5BOF.js} +1 -1
  34. package/dist-cli/chunks/{chunk-7NWNTUJF.js → chunk-KUSQ4NNJ.js} +1 -1
  35. package/dist-cli/chunks/{chunk-P7WDNKOS.js → chunk-MAO7F5PH.js} +3 -3
  36. package/dist-cli/chunks/{chunk-SQX5CAYG.js → chunk-NVTL3JQG.js} +1 -1
  37. package/dist-cli/chunks/{chunk-V2GQ4WXJ.js → chunk-O6N2CEET.js} +2 -2
  38. package/dist-cli/chunks/{chunk-EQCKGC4B.js → chunk-OISHLFON.js} +1 -1
  39. package/dist-cli/chunks/{chunk-SFGUPL2X.js → chunk-OUNLJM56.js} +2 -2
  40. package/dist-cli/chunks/{chunk-AWSQUOAS.js → chunk-OXOARRKR.js} +2 -2
  41. package/dist-cli/chunks/{chunk-SQZAC7C4.js → chunk-PHPXGLME.js} +1 -1
  42. package/dist-cli/chunks/{chunk-PS2G44GT.js → chunk-PQFFUJR6.js} +2 -2
  43. package/dist-cli/chunks/{chunk-TL7SIZ7S.js → chunk-QLJNSOS7.js} +1 -1
  44. package/dist-cli/chunks/chunk-QQAECG5B.js +2 -0
  45. package/dist-cli/chunks/{chunk-4OPRODFA.js → chunk-RZHREO3M.js} +2 -2
  46. package/dist-cli/chunks/{chunk-HYPJW65U.js → chunk-SBGOUA6F.js} +2 -2
  47. package/dist-cli/chunks/chunk-SSCA2AEA.js +1 -0
  48. package/dist-cli/chunks/{chunk-7YHDJLO2.js → chunk-UYRGCJ4N.js} +1 -1
  49. package/dist-cli/chunks/{chunk-D4HUVLZR.js → chunk-WGDL5V6C.js} +1 -1
  50. package/dist-cli/chunks/{chunk-RIXUH3NK.js → chunk-Y5PLPEEU.js} +2 -2
  51. package/dist-cli/chunks/chunk-ZFAM4N5B.js +1 -0
  52. package/dist-cli/chunks/{chunk-EQ7TFQ2F.js → chunk-ZO3VHP6W.js} +1 -1
  53. package/dist-cli/chunks/cli-version-WPFDM2A6.js +2 -0
  54. package/dist-cli/chunks/{compat-FWSEEGEH.js → compat-PCXGGZBZ.js} +3 -3
  55. package/dist-cli/chunks/{config-CYI2WAGP.js → config-LULEVEYL.js} +2 -2
  56. package/dist-cli/chunks/{control-UXY7YQVX.js → control-6P6HY7UF.js} +2 -2
  57. package/dist-cli/chunks/{cpu-profile-IKAE3KTY.js → cpu-profile-NOK73ZYW.js} +2 -2
  58. package/dist-cli/chunks/{daemon-ZUMF53YB.js → daemon-4A3DMUYL.js} +2 -2
  59. package/dist-cli/chunks/{debug-P6KULKKS.js → debug-74BWB2ZG.js} +3 -3
  60. package/dist-cli/chunks/{detox-SPWAZCYG.js → detox-HEOMINSC.js} +2 -2
  61. package/dist-cli/chunks/{device-JWEPK6I2.js → device-TTXXBJFZ.js} +2 -2
  62. package/dist-cli/chunks/{diagnose-IZODTXV2.js → diagnose-QZ3GOHSE.js} +2 -2
  63. package/dist-cli/chunks/drivers-QRPWNOIT.js +2 -0
  64. package/dist-cli/chunks/{electron-R5GP6RVB.js → electron-QVOWV44R.js} +3 -3
  65. package/dist-cli/chunks/flow-QMA7GVN6.js +2 -0
  66. package/dist-cli/chunks/{hints-DYDNYX7N.js → hints-YKWRNMJC.js} +2 -2
  67. package/dist-cli/chunks/{home-paths-GLMX5OKL.js → home-paths-SFADSTJM.js} +2 -2
  68. package/dist-cli/chunks/{inspect-FJOPCTY2.js → inspect-LEWGQCIU.js} +3 -3
  69. package/dist-cli/chunks/install-7N2N7Q32.js +2 -0
  70. package/dist-cli/chunks/{install-desktop-YPJZMZM5.js → install-desktop-22HYQZ2G.js} +3 -3
  71. package/dist-cli/chunks/{keys-GSYPHWNY.js → keys-3ZT3MICU.js} +2 -2
  72. package/dist-cli/chunks/{launch-4G2PKW5X.js → launch-ZXW2NFLG.js} +3 -3
  73. package/dist-cli/chunks/{login-KJQGHA64.js → login-NJKJ7GZO.js} +4 -4
  74. package/dist-cli/chunks/{logout-XM2SYH5C.js → logout-VMMQL7CB.js} +2 -2
  75. package/dist-cli/chunks/{maestro-EOWGI7DG.js → maestro-OJY4MTI7.js} +2 -2
  76. package/dist-cli/chunks/{preview-F73TKK37.js → preview-QU2GXTEV.js} +2 -2
  77. package/dist-cli/chunks/{profile-22FDKBUO.js → profile-7APWK47T.js} +2 -2
  78. package/dist-cli/chunks/{react-5L6VPFUP.js → react-RSVO5JZZ.js} +2 -2
  79. package/dist-cli/chunks/{record-JZXCQ4IN.js → record-UWH4MDEO.js} +2 -2
  80. package/dist-cli/chunks/runtime-3FUENRHM.js +2 -0
  81. package/dist-cli/chunks/{runtime-delivery-LXUM3R4A.js → runtime-delivery-QMKGRV7N.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-HDRRG33Q.js → screenshot-43M27ALE.js} +2 -2
  83. package/dist-cli/chunks/{screenshot-mode-WY63LZIX.js → screenshot-mode-EBYYN6TY.js} +2 -2
  84. package/dist-cli/chunks/{screenshots-MPV2ENL5.js → screenshots-7TQZL6Z6.js} +2 -2
  85. package/dist-cli/chunks/{server-5LBMCJ3G.js → server-VCFM25Z6.js} +2 -2
  86. package/dist-cli/chunks/setup-repo-HFH4VKJQ.js +2 -0
  87. package/dist-cli/chunks/{skills-BQ73YOBF.js → skills-RQA6EJQL.js} +2 -2
  88. package/dist-cli/chunks/{start-2WU4W6ZU.js → start-ZT6MBYND.js} +4 -4
  89. package/dist-cli/chunks/store-BJBTDSZE.js +2 -0
  90. package/dist-cli/chunks/telemetry-ZZZKTILZ.js +2 -0
  91. package/dist-cli/chunks/{test-OVO4CQTG.js → test-RNRX5SWV.js} +3 -3
  92. package/dist-cli/chunks/{three-mode-BKM3KFM7.js → three-mode-TQZH25ZO.js} +2 -2
  93. package/dist-cli/chunks/{timeline-MDXGEDQL.js → timeline-GGN3AY6P.js} +2 -2
  94. package/dist-cli/chunks/{upgrade-JGQABWVF.js → upgrade-XT22D67C.js} +2 -2
  95. package/dist-cli/chunks/upload-NC2AYLC5.js +2 -0
  96. package/dist-cli/chunks/{web-WYFAYQ72.js → web-KEHVF5MB.js} +2 -2
  97. package/dist-cli/chunks/{what-happened-PZW2KW6A.js → what-happened-PATQRJ5T.js} +2 -2
  98. package/dist-cli/chunks/{whoami-7ATWJQS6.js → whoami-CXVY26VV.js} +2 -2
  99. package/dist-lib/agent-daemon-client.cjs +1 -1
  100. package/dist-lib/agent-events.cjs +1 -1
  101. package/dist-lib/agent-sessions.cjs +1 -1
  102. package/dist-lib/attached-projects.cjs +1 -1
  103. package/dist-lib/auth/shared-session.cjs +1 -1
  104. package/dist-lib/backend-origin.cjs +1 -1
  105. package/dist-lib/beta.cjs +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/index.cjs +136 -138
  116. package/dist-lib/metro.cjs +31 -26
  117. package/dist-lib/profiles.cjs +1 -1
  118. package/dist-lib/render-mode.cjs +1 -1
  119. package/dist-lib/scripts/demo-app-registry.cjs +1 -1
  120. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  121. package/dist-lib/skills.cjs +9448 -4
  122. package/dist-lib/vite.cjs +129 -39
  123. package/package.json +2 -6
  124. package/src/metro-plugin.ts +9 -77
  125. package/src/runtime-assets.ts +84 -0
  126. package/src/skills/builtin/compat-check.ts +1 -1
  127. package/src/vite-plugin-one.ts +60 -58
  128. package/dist-cli/chunks/auto-bootstrap-NYYSMTIM.js +0 -2
  129. package/dist-cli/chunks/beta-4K2SQACK.js +0 -2
  130. package/dist-cli/chunks/chunk-67ZZ2CM5.js +0 -1
  131. package/dist-cli/chunks/chunk-D3ZSBIIY.js +0 -2
  132. package/dist-cli/chunks/chunk-FUCGLWNN.js +0 -1
  133. package/dist-cli/chunks/chunk-IILJQCZA.js +0 -2
  134. package/dist-cli/chunks/chunk-ZSMMJMPA.js +0 -1
  135. package/dist-cli/chunks/cli-version-QB4VH24H.js +0 -2
  136. package/dist-cli/chunks/drivers-MK6WJKBC.js +0 -2
  137. package/dist-cli/chunks/flow-6O4GEOPJ.js +0 -2
  138. package/dist-cli/chunks/install-A3TUGGHN.js +0 -2
  139. package/dist-cli/chunks/runtime-EEBX7CFV.js +0 -2
  140. package/dist-cli/chunks/setup-repo-SZSYNKNI.js +0 -2
  141. package/dist-cli/chunks/store-RE45SUBF.js +0 -2
  142. package/dist-cli/chunks/telemetry-DG6GJLCP.js +0 -2
  143. package/dist-cli/chunks/upload-UJNUA4ZV.js +0 -2
  144. package/dist-lib/vite-base.cjs +0 -6937
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as y,L as x,y as F,z as T}from"./chunk-EQ7TFQ2F.js";import{c as S,e as N}from"./chunk-XQ2OBHBE.js";import{b as k}from"./chunk-EQCKGC4B.js";import"./chunk-IILJQCZA.js";import"./chunk-D4HUVLZR.js";import"./chunk-BKBL6K2G.js";function _(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 s=n[t+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let a=Number(l[1]),m=l[2]??"ms",$=m==="s"?a*1e3:m==="m"?a*6e4:a;return{since:Date.now()-$,consumed:e}}let o=Number(s);if(Number.isFinite(o)&&o>1e12)return{since:o,consumed:e}}return{consumed:e}}function K(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(s=>s.trim()).filter(Boolean),consumed:e};return{consumed:e}}function O(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 s=Number(n[t+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:e}}return{consumed:e}}function j(n,e){if(e===null)return new Date(n).toLocaleTimeString();let t=(n-e)/1e3;return`${t>=0?"+":""}${t.toFixed(2)}s`}function B(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"layout":return`${e.kind??"?"} ${e.testID??e.type??""}${e.skipped?` skipped:${e.reason??"unknown"}`:""}`;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 A(n,e){let t=j(n.t,e).padStart(8),s=n.context.padEnd(6),l=`[${n.kind}]`.padEnd(15),o="",a=n.data;return a&&typeof a=="object"&&(o=B(n.kind,a)),` ${t} ${s} ${l} ${o}`}function M(n){let e=[],t={label:"initial state",events:[],startedAt:n[0]?.t??null};e.push(t);for(let s of n)if(t.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,o=l?.phase;if(!o||o==="enter"||o==="appear"||o==="active"){let a=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;e.length===1&&t.events.length===1?t.label=`${s.kind}: ${a}`:(t={label:`${s.kind}: ${a}`,events:[],startedAt:s.t},e.push(t))}}return e}async function J(n,e){let t=S(n,{port:e.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.85 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A as y,L as x,y as F,z as T}from"./chunk-ZO3VHP6W.js";import{c as S,e as N}from"./chunk-EKXK3SWK.js";import{b as k}from"./chunk-OISHLFON.js";import"./chunk-QQAECG5B.js";import"./chunk-WGDL5V6C.js";import"./chunk-H44IQHKZ.js";function _(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 s=n[t+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let a=Number(l[1]),m=l[2]??"ms",$=m==="s"?a*1e3:m==="m"?a*6e4:a;return{since:Date.now()-$,consumed:e}}let o=Number(s);if(Number.isFinite(o)&&o>1e12)return{since:o,consumed:e}}return{consumed:e}}function K(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(s=>s.trim()).filter(Boolean),consumed:e};return{consumed:e}}function O(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 s=Number(n[t+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:e}}return{consumed:e}}function j(n,e){if(e===null)return new Date(n).toLocaleTimeString();let t=(n-e)/1e3;return`${t>=0?"+":""}${t.toFixed(2)}s`}function B(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"layout":return`${e.kind??"?"} ${e.testID??e.type??""}${e.skipped?` skipped:${e.reason??"unknown"}`:""}`;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 A(n,e){let t=j(n.t,e).padStart(8),s=n.context.padEnd(6),l=`[${n.kind}]`.padEnd(15),o="",a=n.data;return a&&typeof a=="object"&&(o=B(n.kind,a)),` ${t} ${s} ${l} ${o}`}function M(n){let e=[],t={label:"initial state",events:[],startedAt:n[0]?.t??null};e.push(t);for(let s of n)if(t.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,o=l?.phase;if(!o||o==="enter"||o==="appear"||o==="active"){let a=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;e.length===1&&t.events.length===1?t.label=`${s.kind}: ${a}`:(t={label:`${s.kind}: ${a}`,events:[],startedAt:s.t},e.push(t))}}return e}async function J(n,e){let t=S(n,{port:e.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as i}from"./chunk-4OWVPRZV.js";import{d as n}from"./chunk-SFGUPL2X.js";import"./chunk-D4HUVLZR.js";import"./chunk-BKBL6K2G.js";async function u(){let o=i();if(o||(console.log(" not signed in"),console.log(" set SOOTSIM_API_KEY=sk_sootsim_\u2026 or run `sootsim login`"),process.exit(1)),o.kind==="api-key"){let r=`${o.secret.slice(0,14)}\u2026`,t=o.source==="env"?"SOOTSIM_API_KEY env var":"saved key (~/.config/sootsim/credentials.json)";console.log(` api key ${r}`),console.log(` source: ${t}`);return}if(o.kind==="github"){console.log(` github token (${o.source})`),console.log(` repo: ${o.repoId}`);return}let e=await n(),s=e?.user;console.log(` ${s?.email||s?.name||s?.id||"signed in"}`),console.log(` origin: ${e?.origin??o.origin}`),e?.updatedAt&&console.log(` updated: ${e.updatedAt}`)}export{u as runWhoami};
1
+ /*! sootsim v0.1.85 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as i}from"./chunk-5N3V7OCG.js";import{d as n}from"./chunk-OUNLJM56.js";import"./chunk-WGDL5V6C.js";import"./chunk-H44IQHKZ.js";async function u(){let o=i();if(o||(console.log(" not signed in"),console.log(" set SOOTSIM_API_KEY=sk_sootsim_\u2026 or run `sootsim login`"),process.exit(1)),o.kind==="api-key"){let r=`${o.secret.slice(0,14)}\u2026`,t=o.source==="env"?"SOOTSIM_API_KEY env var":"saved key (~/.config/sootsim/credentials.json)";console.log(` api key ${r}`),console.log(` source: ${t}`);return}if(o.kind==="github"){console.log(` github token (${o.source})`),console.log(` repo: ${o.repoId}`);return}let e=await n(),s=e?.user;console.log(` ${s?.email||s?.name||s?.id||"signed in"}`),console.log(` origin: ${e?.origin??o.origin}`),e?.updatedAt&&console.log(` updated: ${e.updatedAt}`)}export{u as runWhoami};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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;
@@ -40,11 +40,45 @@ __export(src_exports, {
40
40
  module.exports = __toCommonJS(src_exports);
41
41
 
42
42
  // src/vite-plugin-one.ts
43
+ var import_fs2 = __toESM(require("fs"), 1);
44
+ var import_path2 = __toESM(require("path"), 1);
45
+
46
+ // src/runtime-assets.ts
43
47
  var import_fs = __toESM(require("fs"), 1);
44
48
  var import_path = __toESM(require("path"), 1);
45
- var sootsimRoot = import_path.default.resolve(import_path.default.dirname(new URL(__sootsim_import_meta_url).pathname), "..");
46
- var distDir = import_path.default.join(sootsimRoot, "dist-plugin");
47
- var publicDir = import_path.default.join(sootsimRoot, "public");
49
+
50
+ // src/home-paths.ts
51
+ var import_node_fs = __toESM(require("node:fs"), 1);
52
+ var import_node_os = require("node:os");
53
+ var import_node_path = __toESM(require("node:path"), 1);
54
+ var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
55
+ var ACTIVE_RUNTIME_FILE = "active";
56
+ function sootsimHomeDir() {
57
+ const override = process.env[SOOTSIM_HOME_ENV];
58
+ if (override && override.length > 0) return import_node_path.default.resolve(override);
59
+ return import_node_path.default.join((0, import_node_os.homedir)(), ".sootsim");
60
+ }
61
+ function runtimesDir() {
62
+ return import_node_path.default.join(sootsimHomeDir(), "runtimes");
63
+ }
64
+ function runtimeDir(version) {
65
+ return import_node_path.default.join(runtimesDir(), version);
66
+ }
67
+ function activeRuntimeFile() {
68
+ return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
69
+ }
70
+ function readActiveRuntime() {
71
+ try {
72
+ const value = import_node_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
73
+ return value.length > 0 ? value : null;
74
+ } catch {
75
+ return null;
76
+ }
77
+ }
78
+ var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
79
+
80
+ // src/runtime-assets.ts
81
+ var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[sootsim] no engine runtime installed \u2014 run `sootsim setup-repo` in your project, or `sootsim runtime install`";
48
82
  var MIME_TYPES = {
49
83
  ".js": "application/javascript",
50
84
  ".mjs": "application/javascript",
@@ -52,17 +86,64 @@ var MIME_TYPES = {
52
86
  ".html": "text/html",
53
87
  ".wasm": "application/wasm",
54
88
  ".json": "application/json",
89
+ ".jpg": "image/jpeg",
90
+ ".jpeg": "image/jpeg",
55
91
  ".png": "image/png",
56
92
  ".svg": "image/svg+xml",
93
+ ".webp": "image/webp",
94
+ ".glb": "model/gltf-binary",
57
95
  ".ttf": "font/ttf",
58
96
  ".otf": "font/otf",
59
97
  ".woff": "font/woff",
60
98
  ".woff2": "font/woff2",
61
99
  ".mp3": "audio/mpeg",
62
- ".wav": "audio/wav",
63
- ".jpg": "image/jpeg",
64
- ".webp": "image/webp"
100
+ ".wav": "audio/wav"
65
101
  };
102
+ var ROOT_RUNTIME_PATHS = [
103
+ "/assets/",
104
+ "/engine/",
105
+ "/engine-tenant/",
106
+ "/photos/",
107
+ "/three-mode/",
108
+ "/canvaskit.wasm",
109
+ "/fonts/",
110
+ "/icons/",
111
+ "/sounds/",
112
+ "/spike/",
113
+ "/test-wallpaper.jpg",
114
+ "/preview-sw.js"
115
+ ];
116
+ function resolveActiveRuntimeRoot() {
117
+ const active = readActiveRuntime();
118
+ if (!active) return null;
119
+ const dir = runtimeDir(active);
120
+ if (!import_fs.default.existsSync(import_path.default.join(dir, "index.html"))) return null;
121
+ return dir;
122
+ }
123
+ function isRootRuntimeAssetPath(pathname) {
124
+ return ROOT_RUNTIME_PATHS.some((p) => pathname === p || pathname.startsWith(p));
125
+ }
126
+ function resolveRuntimeFilePath(runtimeRoot, pathname) {
127
+ if (!pathname.startsWith("/")) return null;
128
+ if (pathname.includes("\0") || pathname.includes("\\")) return null;
129
+ for (const segment of pathname.split("/")) {
130
+ if (segment === "..") return null;
131
+ }
132
+ const fullPath = import_path.default.resolve(runtimeRoot, pathname.replace(/^\/+/, ""));
133
+ const rootWithSep = runtimeRoot.endsWith(import_path.default.sep) ? runtimeRoot : runtimeRoot + import_path.default.sep;
134
+ if (!fullPath.startsWith(rootWithSep) && fullPath !== runtimeRoot) return null;
135
+ if (!import_fs.default.existsSync(fullPath) || !import_fs.default.statSync(fullPath).isFile()) return null;
136
+ return fullPath;
137
+ }
138
+ function serveRuntimeFile(res, fullPath) {
139
+ const ext = import_path.default.extname(fullPath);
140
+ res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
141
+ res.setHeader("cache-control", "max-age=31536000,immutable");
142
+ import_fs.default.createReadStream(fullPath).pipe(res);
143
+ }
144
+
145
+ // src/vite-plugin-one.ts
146
+ var sootsimRoot = import_path2.default.resolve(import_path2.default.dirname(new URL(__sootsim_import_meta_url).pathname), "..");
66
147
  function sootsimPlugin(options = {}) {
67
148
  if (options.enabled === false) return [];
68
149
  const prefix2 = options.prefix || "/__soot";
@@ -89,14 +170,27 @@ function sootsimPlugin(options = {}) {
89
170
  });
90
171
  server.middlewares.use((req, res, next) => {
91
172
  const url = req.url || "";
92
- if (url === prefix2 || url === prefix2 + "/" || url.startsWith(prefix2 + "/?")) {
93
- const htmlPath = import_path.default.join(distDir, "index.html");
94
- if (!import_fs.default.existsSync(htmlPath)) {
173
+ const pathname = url.split("?")[0];
174
+ const runtimeRoot = resolveActiveRuntimeRoot();
175
+ if (!runtimeRoot) {
176
+ if (pathname === prefix2 || pathname === prefix2 + "/" || pathname.startsWith(prefix2 + "/")) {
95
177
  res.statusCode = 500;
96
- res.end("[sootsim] dist-plugin not built. run: bun scripts/build-plugin.ts");
178
+ res.end(SOOTSIM_RUNTIME_MISSING_MESSAGE);
97
179
  return;
98
180
  }
99
- let html = import_fs.default.readFileSync(htmlPath, "utf8");
181
+ next();
182
+ return;
183
+ }
184
+ if (isRootRuntimeAssetPath(pathname)) {
185
+ const fullPath = resolveRuntimeFilePath(runtimeRoot, pathname);
186
+ if (fullPath) {
187
+ serveRuntimeFile(res, fullPath);
188
+ return;
189
+ }
190
+ }
191
+ if (pathname === prefix2 || pathname === prefix2 + "/") {
192
+ const htmlPath = import_path2.default.join(runtimeRoot, "index.html");
193
+ let html = import_fs2.default.readFileSync(htmlPath, "utf8");
100
194
  html = html.replace(
101
195
  "</head>",
102
196
  `<script>history.replaceState(null,'','${prefix2}/?bundle=${encodeURIComponent(bundleUrl)}')</script></head>`
@@ -105,31 +199,25 @@ function sootsimPlugin(options = {}) {
105
199
  res.end(html);
106
200
  return;
107
201
  }
108
- if (url.startsWith(prefix2 + "/")) {
109
- const filePath = url.slice(prefix2.length).split("?")[0];
110
- const fullPath = import_path.default.join(distDir, filePath);
111
- if (import_fs.default.existsSync(fullPath) && import_fs.default.statSync(fullPath).isFile()) {
112
- const ext = import_path.default.extname(fullPath);
113
- res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
114
- res.setHeader("cache-control", "max-age=31536000,immutable");
115
- import_fs.default.createReadStream(fullPath).pipe(res);
116
- return;
117
- }
118
- const publicPath = import_path.default.join(publicDir, filePath);
119
- if (import_fs.default.existsSync(publicPath) && import_fs.default.statSync(publicPath).isFile()) {
120
- const ext = import_path.default.extname(publicPath);
121
- res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
122
- import_fs.default.createReadStream(publicPath).pipe(res);
202
+ if (pathname.startsWith(prefix2 + "/")) {
203
+ const fullPath = resolveRuntimeFilePath(
204
+ runtimeRoot,
205
+ pathname.slice(prefix2.length)
206
+ );
207
+ if (fullPath) {
208
+ serveRuntimeFile(res, fullPath);
123
209
  return;
124
210
  }
125
- }
126
- const staticRoots = ["/canvaskit.wasm", "/fonts/", "/icons/", "/sounds/"];
127
- if (staticRoots.some((p) => url.startsWith(p))) {
128
- const fullPath = import_path.default.join(publicDir, url.split("?")[0]);
129
- if (import_fs.default.existsSync(fullPath) && import_fs.default.statSync(fullPath).isFile()) {
130
- const ext = import_path.default.extname(fullPath);
131
- res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
132
- import_fs.default.createReadStream(fullPath).pipe(res);
211
+ const ext = import_path2.default.extname(pathname);
212
+ if (!ext) {
213
+ const htmlPath = import_path2.default.join(runtimeRoot, "index.html");
214
+ let html = import_fs2.default.readFileSync(htmlPath, "utf8");
215
+ html = html.replace(
216
+ "</head>",
217
+ `<script>history.replaceState(null,'','${prefix2}/?bundle=${encodeURIComponent(bundleUrl)}')</script></head>`
218
+ );
219
+ res.setHeader("content-type", "text/html");
220
+ res.end(html);
133
221
  return;
134
222
  }
135
223
  }
@@ -138,7 +226,9 @@ function sootsimPlugin(options = {}) {
138
226
  const port = server.config.server.port || 8081;
139
227
  const sootsimUrl = `http://localhost:${port}${prefix2}/`;
140
228
  console.log(`[sootsim] serving at ${sootsimUrl}`);
141
- openElectronApp(sootsimUrl);
229
+ if (options.open !== false) {
230
+ openElectronApp(sootsimUrl);
231
+ }
142
232
  }
143
233
  }
144
234
  ];
@@ -154,10 +244,10 @@ async function openElectronApp(sootsimUrl) {
154
244
  }
155
245
  const candidates = [
156
246
  "/Applications/sootsim.app",
157
- import_path.default.join(process.env.HOME || "", "Applications/sootsim.app"),
158
- import_path.default.join(sootsimRoot, "release/mac-arm64/sootsim.app")
247
+ import_path2.default.join(process.env.HOME || "", "Applications/sootsim.app"),
248
+ import_path2.default.join(sootsimRoot, "release/mac-arm64/sootsim.app")
159
249
  ];
160
- let appPath = candidates.find((p) => import_fs.default.existsSync(p));
250
+ let appPath = candidates.find((p) => import_fs2.default.existsSync(p));
161
251
  if (!appPath) {
162
252
  try {
163
253
  const found = execSync(
@@ -177,95 +267,9 @@ async function openElectronApp(sootsimUrl) {
177
267
  }
178
268
 
179
269
  // src/metro-plugin.ts
180
- var import_fs2 = __toESM(require("fs"), 1);
181
- var import_path2 = __toESM(require("path"), 1);
182
-
183
- // src/home-paths.ts
184
- var import_node_fs = __toESM(require("node:fs"), 1);
185
- var import_node_os = require("node:os");
186
- var import_node_path = __toESM(require("node:path"), 1);
187
- var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
188
- var ACTIVE_RUNTIME_FILE = "active";
189
- function sootsimHomeDir() {
190
- const override = process.env[SOOTSIM_HOME_ENV];
191
- if (override && override.length > 0) return import_node_path.default.resolve(override);
192
- return import_node_path.default.join((0, import_node_os.homedir)(), ".sootsim");
193
- }
194
- function runtimesDir() {
195
- return import_node_path.default.join(sootsimHomeDir(), "runtimes");
196
- }
197
- function runtimeDir(version) {
198
- return import_node_path.default.join(runtimesDir(), version);
199
- }
200
- function activeRuntimeFile() {
201
- return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
202
- }
203
- function readActiveRuntime() {
204
- try {
205
- const value = import_node_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
206
- return value.length > 0 ? value : null;
207
- } catch {
208
- return null;
209
- }
210
- }
211
- var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
212
-
213
- // src/metro-plugin.ts
270
+ var import_fs3 = __toESM(require("fs"), 1);
271
+ var import_path3 = __toESM(require("path"), 1);
214
272
  var prefix = "/__soot";
215
- function resolveRuntimeRoot() {
216
- const active = readActiveRuntime();
217
- if (!active) return null;
218
- const dir = runtimeDir(active);
219
- if (!import_fs2.default.existsSync(import_path2.default.join(dir, "index.html"))) return null;
220
- return dir;
221
- }
222
- var RUNTIME_MISSING_MESSAGE = "[sootsim] no engine runtime installed \u2014 run `sootsim setup-repo` in your project, or `sootsim runtime install`";
223
- var MIME_TYPES2 = {
224
- ".js": "application/javascript",
225
- ".css": "text/css",
226
- ".html": "text/html",
227
- ".wasm": "application/wasm",
228
- ".json": "application/json",
229
- ".jpg": "image/jpeg",
230
- ".jpeg": "image/jpeg",
231
- ".png": "image/png",
232
- ".svg": "image/svg+xml",
233
- ".webp": "image/webp",
234
- ".glb": "model/gltf-binary",
235
- ".ttf": "font/ttf",
236
- ".otf": "font/otf",
237
- ".mp3": "audio/mpeg",
238
- ".wav": "audio/wav"
239
- };
240
- var ROOT_RUNTIME_PATHS = [
241
- "/assets/",
242
- "/engine/",
243
- "/engine-tenant/",
244
- "/photos/",
245
- "/three-mode/",
246
- "/canvaskit.wasm",
247
- "/fonts/",
248
- "/icons/",
249
- "/sounds/",
250
- "/spike/",
251
- "/test-wallpaper.jpg",
252
- "/preview-sw.js"
253
- ];
254
- function isRootRuntimeAssetPath(pathname) {
255
- return ROOT_RUNTIME_PATHS.some((p) => pathname === p || pathname.startsWith(p));
256
- }
257
- function resolveRuntimeFilePath(runtimeRoot, pathname) {
258
- if (!pathname.startsWith("/")) return null;
259
- if (pathname.includes("\0") || pathname.includes("\\")) return null;
260
- for (const segment of pathname.split("/")) {
261
- if (segment === "..") return null;
262
- }
263
- const fullPath = import_path2.default.resolve(runtimeRoot, pathname.replace(/^\/+/, ""));
264
- const rootWithSep = runtimeRoot.endsWith(import_path2.default.sep) ? runtimeRoot : runtimeRoot + import_path2.default.sep;
265
- if (!fullPath.startsWith(rootWithSep) && fullPath !== runtimeRoot) return null;
266
- if (!import_fs2.default.existsSync(fullPath) || !import_fs2.default.statSync(fullPath).isFile()) return null;
267
- return fullPath;
268
- }
269
273
  function withSootsim(config, options = {}) {
270
274
  if (options.enabled === false) return config;
271
275
  const bundleUrl = options.bundleUrl || "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
@@ -289,11 +293,11 @@ function withSootsim(config, options = {}) {
289
293
  server.use((req, res, next) => {
290
294
  const url = req.url || "";
291
295
  const pathname = url.split("?")[0];
292
- const runtimeRoot = resolveRuntimeRoot();
296
+ const runtimeRoot = resolveActiveRuntimeRoot();
293
297
  if (!runtimeRoot) {
294
298
  if (pathname === prefix || pathname === prefix + "/") {
295
299
  res.statusCode = 500;
296
- res.end(RUNTIME_MISSING_MESSAGE);
300
+ res.end(SOOTSIM_RUNTIME_MISSING_MESSAGE);
297
301
  return;
298
302
  }
299
303
  next();
@@ -317,10 +321,10 @@ function withSootsim(config, options = {}) {
317
321
  }
318
322
  }
319
323
  if (pathname === prefix || pathname === prefix + "/" || pathname.startsWith(prefix + "/")) {
320
- const ext = import_path2.default.extname(pathname);
324
+ const ext = import_path3.default.extname(pathname);
321
325
  if (!ext) {
322
- const htmlPath = import_path2.default.join(runtimeRoot, "index.html");
323
- let html = import_fs2.default.readFileSync(htmlPath, "utf8");
326
+ const htmlPath = import_path3.default.join(runtimeRoot, "index.html");
327
+ let html = import_fs3.default.readFileSync(htmlPath, "utf8");
324
328
  html = html.replace(
325
329
  "</head>",
326
330
  `<script>history.replaceState(null,'','${prefix}/?bundle=${encodeURIComponent(bundleUrl)}')</script></head>`
@@ -340,12 +344,6 @@ function withSootsim(config, options = {}) {
340
344
  return { ...config, server: serverConfig };
341
345
  }
342
346
  var metro_plugin_default = withSootsim;
343
- function serveRuntimeFile(res, fullPath) {
344
- const ext = import_path2.default.extname(fullPath);
345
- res.setHeader("content-type", MIME_TYPES2[ext] || "application/octet-stream");
346
- res.setHeader("cache-control", "max-age=31536000,immutable");
347
- import_fs2.default.createReadStream(fullPath).pipe(res);
348
- }
349
347
 
350
348
  // src/bridge-constants.ts
351
349
  var DEFAULT_SOOTSIM_BRIDGE_PORT = 7668;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.84 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.85 | (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;
@@ -33,11 +33,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
33
33
  var metro_plugin_exports = {};
34
34
  __export(metro_plugin_exports, {
35
35
  default: () => metro_plugin_default,
36
- isRootRuntimeAssetPath: () => isRootRuntimeAssetPath,
37
- resolveRuntimeFilePath: () => resolveRuntimeFilePath,
38
36
  withSootsim: () => withSootsim
39
37
  });
40
38
  module.exports = __toCommonJS(metro_plugin_exports);
39
+ var import_fs2 = __toESM(require("fs"), 1);
40
+ var import_path2 = __toESM(require("path"), 1);
41
+
42
+ // src/runtime-assets.ts
41
43
  var import_fs = __toESM(require("fs"), 1);
42
44
  var import_path = __toESM(require("path"), 1);
43
45
 
@@ -71,18 +73,11 @@ function readActiveRuntime() {
71
73
  }
72
74
  var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
73
75
 
74
- // src/metro-plugin.ts
75
- var prefix = "/__soot";
76
- function resolveRuntimeRoot() {
77
- const active = readActiveRuntime();
78
- if (!active) return null;
79
- const dir = runtimeDir(active);
80
- if (!import_fs.default.existsSync(import_path.default.join(dir, "index.html"))) return null;
81
- return dir;
82
- }
83
- var RUNTIME_MISSING_MESSAGE = "[sootsim] no engine runtime installed \u2014 run `sootsim setup-repo` in your project, or `sootsim runtime install`";
76
+ // src/runtime-assets.ts
77
+ var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[sootsim] no engine runtime installed \u2014 run `sootsim setup-repo` in your project, or `sootsim runtime install`";
84
78
  var MIME_TYPES = {
85
79
  ".js": "application/javascript",
80
+ ".mjs": "application/javascript",
86
81
  ".css": "text/css",
87
82
  ".html": "text/html",
88
83
  ".wasm": "application/wasm",
@@ -95,6 +90,8 @@ var MIME_TYPES = {
95
90
  ".glb": "model/gltf-binary",
96
91
  ".ttf": "font/ttf",
97
92
  ".otf": "font/otf",
93
+ ".woff": "font/woff",
94
+ ".woff2": "font/woff2",
98
95
  ".mp3": "audio/mpeg",
99
96
  ".wav": "audio/wav"
100
97
  };
@@ -112,6 +109,13 @@ var ROOT_RUNTIME_PATHS = [
112
109
  "/test-wallpaper.jpg",
113
110
  "/preview-sw.js"
114
111
  ];
112
+ function resolveActiveRuntimeRoot() {
113
+ const active = readActiveRuntime();
114
+ if (!active) return null;
115
+ const dir = runtimeDir(active);
116
+ if (!import_fs.default.existsSync(import_path.default.join(dir, "index.html"))) return null;
117
+ return dir;
118
+ }
115
119
  function isRootRuntimeAssetPath(pathname) {
116
120
  return ROOT_RUNTIME_PATHS.some((p) => pathname === p || pathname.startsWith(p));
117
121
  }
@@ -127,6 +131,15 @@ function resolveRuntimeFilePath(runtimeRoot, pathname) {
127
131
  if (!import_fs.default.existsSync(fullPath) || !import_fs.default.statSync(fullPath).isFile()) return null;
128
132
  return fullPath;
129
133
  }
134
+ function serveRuntimeFile(res, fullPath) {
135
+ const ext = import_path.default.extname(fullPath);
136
+ res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
137
+ res.setHeader("cache-control", "max-age=31536000,immutable");
138
+ import_fs.default.createReadStream(fullPath).pipe(res);
139
+ }
140
+
141
+ // src/metro-plugin.ts
142
+ var prefix = "/__soot";
130
143
  function withSootsim(config, options = {}) {
131
144
  if (options.enabled === false) return config;
132
145
  const bundleUrl = options.bundleUrl || "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
@@ -150,11 +163,11 @@ function withSootsim(config, options = {}) {
150
163
  server.use((req, res, next) => {
151
164
  const url = req.url || "";
152
165
  const pathname = url.split("?")[0];
153
- const runtimeRoot = resolveRuntimeRoot();
166
+ const runtimeRoot = resolveActiveRuntimeRoot();
154
167
  if (!runtimeRoot) {
155
168
  if (pathname === prefix || pathname === prefix + "/") {
156
169
  res.statusCode = 500;
157
- res.end(RUNTIME_MISSING_MESSAGE);
170
+ res.end(SOOTSIM_RUNTIME_MISSING_MESSAGE);
158
171
  return;
159
172
  }
160
173
  next();
@@ -178,10 +191,10 @@ function withSootsim(config, options = {}) {
178
191
  }
179
192
  }
180
193
  if (pathname === prefix || pathname === prefix + "/" || pathname.startsWith(prefix + "/")) {
181
- const ext = import_path.default.extname(pathname);
194
+ const ext = import_path2.default.extname(pathname);
182
195
  if (!ext) {
183
- const htmlPath = import_path.default.join(runtimeRoot, "index.html");
184
- let html = import_fs.default.readFileSync(htmlPath, "utf8");
196
+ const htmlPath = import_path2.default.join(runtimeRoot, "index.html");
197
+ let html = import_fs2.default.readFileSync(htmlPath, "utf8");
185
198
  html = html.replace(
186
199
  "</head>",
187
200
  `<script>history.replaceState(null,'','${prefix}/?bundle=${encodeURIComponent(bundleUrl)}')</script></head>`
@@ -201,15 +214,7 @@ function withSootsim(config, options = {}) {
201
214
  return { ...config, server: serverConfig };
202
215
  }
203
216
  var metro_plugin_default = withSootsim;
204
- function serveRuntimeFile(res, fullPath) {
205
- const ext = import_path.default.extname(fullPath);
206
- res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
207
- res.setHeader("cache-control", "max-age=31536000,immutable");
208
- import_fs.default.createReadStream(fullPath).pipe(res);
209
- }
210
217
  // Annotate the CommonJS export names for ESM import in node:
211
218
  0 && (module.exports = {
212
- isRootRuntimeAssetPath,
213
- resolveRuntimeFilePath,
214
219
  withSootsim
215
220
  });