sootsim 0.1.177 → 0.1.178

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 (145) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-3BCITLIZ.js → agent-FPRPN42P.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-26RIZVGD.js → agent-wrapper-KABXHSDP.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-JVDHATQE.js → app-fonts-GEL63MTY.js} +2 -2
  5. package/dist-cli/chunks/{assert-IT2OXM4Y.js → assert-T55K3RFP.js} +2 -2
  6. package/dist-cli/chunks/beta-74JMB2XJ.js +2 -0
  7. package/dist-cli/chunks/{camera-ZYVEUCIO.js → camera-RPYSAI2K.js} +2 -2
  8. package/dist-cli/chunks/{chunk-C5QOGCVN.js → chunk-2IYQJHNS.js} +2 -2
  9. package/dist-cli/chunks/{chunk-D2BBJUEY.js → chunk-2SM7WWDI.js} +1 -1
  10. package/dist-cli/chunks/{chunk-A3VHHWLU.js → chunk-3DSTCWVF.js} +2 -2
  11. package/dist-cli/chunks/{chunk-UBJQDMDG.js → chunk-42SYOZVV.js} +2 -2
  12. package/dist-cli/chunks/{chunk-JFLNZGDS.js → chunk-64VAJYXX.js} +2 -2
  13. package/dist-cli/chunks/{chunk-IBSEFPPL.js → chunk-7BHPGH6Q.js} +1 -1
  14. package/dist-cli/chunks/{chunk-ATVKVVHZ.js → chunk-7KFBB76L.js} +2 -2
  15. package/dist-cli/chunks/{chunk-65ZBQDQM.js → chunk-B2Z36B4N.js} +2 -2
  16. package/dist-cli/chunks/{chunk-JS7SSYDG.js → chunk-B5KTNMPL.js} +2 -2
  17. package/dist-cli/chunks/{chunk-QWZFOMCI.js → chunk-B77YOZBY.js} +2 -2
  18. package/dist-cli/chunks/{chunk-Z4IMGLHM.js → chunk-CJV7PX2Y.js} +2 -2
  19. package/dist-cli/chunks/{chunk-UJN3FMEX.js → chunk-CVBCNRKC.js} +2 -2
  20. package/dist-cli/chunks/chunk-DVBRRNWE.js +2 -0
  21. package/dist-cli/chunks/{chunk-Y2637KG7.js → chunk-EHKLQO7I.js} +1 -1
  22. package/dist-cli/chunks/{chunk-JHYLPDCC.js → chunk-EUIPNUT4.js} +2 -2
  23. package/dist-cli/chunks/{chunk-WRHJEI7Y.js → chunk-EY3XEEE4.js} +1 -1
  24. package/dist-cli/chunks/{chunk-NYGESF6F.js → chunk-H26BCZLV.js} +1 -1
  25. package/dist-cli/chunks/{chunk-YVDSGGOT.js → chunk-IFJU3COY.js} +1 -1
  26. package/dist-cli/chunks/{chunk-WKG5J4RD.js → chunk-ITOXSEMN.js} +1 -1
  27. package/dist-cli/chunks/{chunk-4JESO36F.js → chunk-JFQFJLTV.js} +2 -2
  28. package/dist-cli/chunks/{chunk-LTZPVG65.js → chunk-K66BWMVS.js} +1 -1
  29. package/dist-cli/chunks/{chunk-ZUTVEJVA.js → chunk-LJ2DIDX3.js} +3 -3
  30. package/dist-cli/chunks/{chunk-64QAFSY7.js → chunk-M7MO47BR.js} +1 -1
  31. package/dist-cli/chunks/{chunk-SU3JJ7ER.js → chunk-NE55HRAU.js} +2 -2
  32. package/dist-cli/chunks/{chunk-JXO6UPGI.js → chunk-O5SQ2RZE.js} +1 -1
  33. package/dist-cli/chunks/{chunk-PL3ALTWB.js → chunk-OK22FXGF.js} +2 -2
  34. package/dist-cli/chunks/{chunk-WUEKKZ7Z.js → chunk-PG42I7UQ.js} +2 -2
  35. package/dist-cli/chunks/{chunk-TVFHGWTW.js → chunk-PHLMZYE4.js} +2 -2
  36. package/dist-cli/chunks/chunk-PNFYOQ4N.js +1 -0
  37. package/dist-cli/chunks/{chunk-CH3MWM5W.js → chunk-PQLLJLSM.js} +1 -1
  38. package/dist-cli/chunks/{chunk-NZWTC6K6.js → chunk-PTBJZ3IO.js} +1 -1
  39. package/dist-cli/chunks/{chunk-PAU64XFG.js → chunk-Q4PUVMFU.js} +1 -1
  40. package/dist-cli/chunks/{chunk-NOLQYF76.js → chunk-RVVFK6CF.js} +1 -1
  41. package/dist-cli/chunks/{chunk-BTTZN2SN.js → chunk-TBWJVJXW.js} +2 -2
  42. package/dist-cli/chunks/{chunk-AN4DM7IB.js → chunk-UYKA44Y4.js} +2 -2
  43. package/dist-cli/chunks/{chunk-4INGTBO7.js → chunk-V3N55LMK.js} +1 -1
  44. package/dist-cli/chunks/{chunk-52O56BTW.js → chunk-WY3B2Y5J.js} +2 -2
  45. package/dist-cli/chunks/{chunk-CUO7F2JE.js → chunk-XGU672KO.js} +1 -1
  46. package/dist-cli/chunks/{chunk-JS3NH2SJ.js → chunk-YD3CNK36.js} +1 -1
  47. package/dist-cli/chunks/chunk-YFLYSJL6.js +1 -0
  48. package/dist-cli/chunks/{chunk-SNLUVL3H.js → chunk-YKV52CQX.js} +2 -2
  49. package/dist-cli/chunks/{chunk-3L6I2M2Z.js → chunk-YLQE2RO4.js} +3 -3
  50. package/dist-cli/chunks/{chunk-4YNKFN2A.js → chunk-YXBC4N6Z.js} +2 -2
  51. package/dist-cli/chunks/{chunk-CHTYIQLE.js → chunk-ZKGEGXVG.js} +2 -2
  52. package/dist-cli/chunks/{chunk-A2WASN2L.js → chunk-ZVZMM2RT.js} +1 -1
  53. package/dist-cli/chunks/cli-version-PVBTBN2X.js +2 -0
  54. package/dist-cli/chunks/{compat-MNTQH57R.js → compat-VDOLM4JY.js} +3 -3
  55. package/dist-cli/chunks/{control-WQ7XEPCI.js → control-N6IWKWQ7.js} +2 -2
  56. package/dist-cli/chunks/{cpu-profile-P27HBXOI.js → cpu-profile-CR4EKOPN.js} +2 -2
  57. package/dist-cli/chunks/daemon-HORAEEZR.js +2 -0
  58. package/dist-cli/chunks/{debug-ES4A3SZQ.js → debug-4FCBFVDX.js} +3 -3
  59. package/dist-cli/chunks/{detox-Q36B2553.js → detox-TP77ADA2.js} +2 -2
  60. package/dist-cli/chunks/{device-NA7TB4E6.js → device-YRU6RDD2.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-DKW5WI3X.js → diagnose-ZU4XLIKW.js} +2 -2
  62. package/dist-cli/chunks/drivers-BSP2USRT.js +2 -0
  63. package/dist-cli/chunks/{electron-6C2VDAZW.js → electron-UWTORKRO.js} +3 -3
  64. package/dist-cli/chunks/flow-ZXUEU6WL.js +2 -0
  65. package/dist-cli/chunks/help-6OSM7CI4.js +2 -0
  66. package/dist-cli/chunks/{hints-W7ZZ6KZE.js → hints-X5YLALUQ.js} +2 -2
  67. package/dist-cli/chunks/{home-paths-K4347S7C.js → home-paths-LMEDDTAQ.js} +2 -2
  68. package/dist-cli/chunks/{inspect-ZPHNFMEX.js → inspect-IFCVFMIW.js} +3 -3
  69. package/dist-cli/chunks/{install-desktop-ZCCPJMOF.js → install-desktop-VVQIBZRU.js} +3 -3
  70. package/dist-cli/chunks/{keys-XM67H4SM.js → keys-GDX235ZQ.js} +2 -2
  71. package/dist-cli/chunks/{login-O4OGJKYL.js → login-MUIJHNM7.js} +4 -4
  72. package/dist-cli/chunks/{logout-DWCBRMLM.js → logout-GV3H23TK.js} +2 -2
  73. package/dist-cli/chunks/{maestro-MEWENIGQ.js → maestro-IFTHFVUR.js} +2 -2
  74. package/dist-cli/chunks/optional-demo-registry-26DVI7SE.js +2 -0
  75. package/dist-cli/chunks/{preview-VPWG4462.js → preview-COYJHGIY.js} +2 -2
  76. package/dist-cli/chunks/{profile-R4CSGXYJ.js → profile-726ZBBXY.js} +2 -2
  77. package/dist-cli/chunks/{react-5LFUOYV5.js → react-LLN5L6NM.js} +2 -2
  78. package/dist-cli/chunks/{record-MHAAYOWF.js → record-TMJG2SMU.js} +2 -2
  79. package/dist-cli/chunks/runtime-3NQVPRES.js +2 -0
  80. package/dist-cli/chunks/{screenshot-XAEO7EBF.js → screenshot-UFKR5MDO.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-QNR5ESKN.js → screenshot-mode-3ZGQR45L.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-Z6OSENKY.js → screenshots-JXS7HP2B.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-capture-3DJPYJUD.js → screenshots-capture-ZBUHYPJJ.js} +2 -2
  84. package/dist-cli/chunks/{serve-IVTQFOFI.js → serve-ZG3KCDUO.js} +2 -2
  85. package/dist-cli/chunks/{setup-AMRSL4IK.js → setup-2XT4LRR5.js} +2 -2
  86. package/dist-cli/chunks/{skills-K4DG2CIH.js → skills-3I7UWGIB.js} +2 -2
  87. package/dist-cli/chunks/{slides-UIH7KXFR.js → slides-SCGGLDQQ.js} +2 -2
  88. package/dist-cli/chunks/store-7LKGHVAR.js +2 -0
  89. package/dist-cli/chunks/telemetry-SQRPQEGO.js +2 -0
  90. package/dist-cli/chunks/{test-XUJ2V5ZX.js → test-ZRWZBUMK.js} +3 -3
  91. package/dist-cli/chunks/{three-mode-P6HSLJMD.js → three-mode-LJHDX4PK.js} +2 -2
  92. package/dist-cli/chunks/{timeline-YSUY4PHV.js → timeline-5OFJISEU.js} +2 -2
  93. package/dist-cli/chunks/{upgrade-YZMDFQIH.js → upgrade-M7HFPN57.js} +2 -2
  94. package/dist-cli/chunks/upload-OOTFDONE.js +2 -0
  95. package/dist-cli/chunks/{version-5QAMZ5CK.js → version-DHZQAZ66.js} +2 -2
  96. package/dist-cli/chunks/{web-LM3JSBQF.js → web-43QEU5SE.js} +2 -2
  97. package/dist-cli/chunks/{what-happened-NYVQ7KER.js → what-happened-RNVAVGKL.js} +2 -2
  98. package/dist-cli/chunks/{whoami-AAHH72FM.js → whoami-F5EYWJCY.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/beta.mjs +1 -1
  107. package/dist-lib/bridge-constants.cjs +1 -1
  108. package/dist-lib/cli-constants.cjs +1 -1
  109. package/dist-lib/config.cjs +1 -1
  110. package/dist-lib/detox/index.cjs +1 -1
  111. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  112. package/dist-lib/home-paths.cjs +1 -1
  113. package/dist-lib/host/bridge-host.cjs +1 -1
  114. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  117. package/dist-lib/host/websocket-proxy.cjs +1 -1
  118. package/dist-lib/index.cjs +64 -21
  119. package/dist-lib/jump-to-source-babel.cjs +1 -1
  120. package/dist-lib/menu.cjs +1 -1
  121. package/dist-lib/menu.mjs +1 -1
  122. package/dist-lib/metro.cjs +1 -1
  123. package/dist-lib/profiles.cjs +1 -1
  124. package/dist-lib/render-mode.cjs +1 -1
  125. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  126. package/dist-lib/sdk.cjs +1 -1
  127. package/dist-lib/sdk.mjs +1 -1
  128. package/dist-lib/skills.cjs +14 -1
  129. package/dist-lib/vite.cjs +64 -18
  130. package/package.json +1 -1
  131. package/src/vite-plugin-one.ts +63 -16
  132. package/dist-cli/chunks/beta-SPH73CAA.js +0 -2
  133. package/dist-cli/chunks/chunk-B6GISAUX.js +0 -1
  134. package/dist-cli/chunks/chunk-DGDBEXXQ.js +0 -1
  135. package/dist-cli/chunks/chunk-YU6CNUJD.js +0 -2
  136. package/dist-cli/chunks/cli-version-HENS6BZI.js +0 -2
  137. package/dist-cli/chunks/daemon-WUAZELEI.js +0 -2
  138. package/dist-cli/chunks/drivers-RFOOGIRC.js +0 -2
  139. package/dist-cli/chunks/flow-GSHP52QS.js +0 -2
  140. package/dist-cli/chunks/help-J6PF4PZX.js +0 -2
  141. package/dist-cli/chunks/optional-demo-registry-O3XS3WXJ.js +0 -2
  142. package/dist-cli/chunks/runtime-R2PRKIZM.js +0 -2
  143. package/dist-cli/chunks/store-2JY2VLVA.js +0 -2
  144. package/dist-cli/chunks/telemetry-KNKROOT5.js +0 -2
  145. package/dist-cli/chunks/upload-TIH2LID6.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{C as N,D as F,F as y,Q as T,R as b,S}from"./chunk-D2BBJUEY.js";import{c as A,e as _}from"./chunk-65ZBQDQM.js";import"./chunk-WKG5J4RD.js";import{b as k}from"./chunk-4INGTBO7.js";import"./chunk-IBSEFPPL.js";import"./chunk-64QAFSY7.js";function O(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let r=Number(l[1]),u=l[2]??"ms",v=u==="s"?r*1e3:u==="m"?r*6e4:r;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function x(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let r=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${r}`:(e={label:`${s.kind}: ${r}`,events:[],startedAt:s.t},t.push(e))}}return t}async function J(n,t){let e=A(n,{port:t.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.178 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{C as N,D as F,F as y,Q as T,R as b,S}from"./chunk-2SM7WWDI.js";import{c as A,e as _}from"./chunk-B2Z36B4N.js";import"./chunk-ITOXSEMN.js";import{b as k}from"./chunk-V3N55LMK.js";import"./chunk-7BHPGH6Q.js";import"./chunk-M7MO47BR.js";function O(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let r=Number(l[1]),u=l[2]??"ms",v=u==="s"?r*1e3:u==="m"?r*6e4:r;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function x(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let r=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${r}`:(e={label:`${s.kind}: ${r}`,events:[],startedAt:s.t},t.push(e))}}return t}async function J(n,t){let e=A(n,{port:t.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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as i}from"./chunk-52O56BTW.js";import{d as n}from"./chunk-UBJQDMDG.js";import"./chunk-IBSEFPPL.js";import"./chunk-64QAFSY7.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.178 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as i}from"./chunk-WY3B2Y5J.js";import{d as n}from"./chunk-42SYOZVV.js";import"./chunk-7BHPGH6Q.js";import"./chunk-M7MO47BR.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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/beta.ts
4
4
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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;
@@ -44,9 +44,8 @@ module.exports = __toCommonJS(src_exports);
44
44
  var import_fs2 = __toESM(require("fs"), 1);
45
45
  var import_path2 = __toESM(require("path"), 1);
46
46
 
47
- // src/runtime-assets.ts
48
- var import_fs = __toESM(require("fs"), 1);
49
- var import_path = __toESM(require("path"), 1);
47
+ // src/bridge-constants.ts
48
+ var DEFAULT_SOOTSIM_BRIDGE_PORT = 7668;
50
49
 
51
50
  // src/home-paths.ts
52
51
  var import_node_fs = __toESM(require("node:fs"), 1);
@@ -54,6 +53,8 @@ var import_node_os = require("node:os");
54
53
  var import_node_path = __toESM(require("node:path"), 1);
55
54
  var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
56
55
  var ACTIVE_RUNTIME_FILE = "active";
56
+ var DAEMON_LOCKFILE = "daemon.json";
57
+ var DAEMON_HEARTBEAT_STALE_MS = 3e4;
57
58
  function sootsimHomeDir() {
58
59
  const override = process.env[SOOTSIM_HOME_ENV];
59
60
  if (override && override.length > 0) return import_node_path.default.resolve(override);
@@ -68,6 +69,9 @@ function runtimeDir(version) {
68
69
  function activeRuntimeFile() {
69
70
  return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
70
71
  }
72
+ function daemonLockfilePath() {
73
+ return import_node_path.default.join(sootsimHomeDir(), DAEMON_LOCKFILE);
74
+ }
71
75
  function readActiveRuntime() {
72
76
  try {
73
77
  const value = import_node_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
@@ -77,8 +81,39 @@ function readActiveRuntime() {
77
81
  }
78
82
  }
79
83
  var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
84
+ function readDaemonLockfile() {
85
+ try {
86
+ const fd = import_node_fs.default.openSync(daemonLockfilePath(), "r");
87
+ try {
88
+ const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
89
+ const bytesRead = import_node_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
90
+ const raw = buf.subarray(0, bytesRead).toString("utf8");
91
+ const parsed = JSON.parse(raw);
92
+ if (parsed && parsed.schema === 1 && typeof parsed.pid === "number" && typeof parsed.bridgePort === "number" && typeof parsed.runtimePort === "number" && typeof parsed.startedAt === "number" && typeof parsed.heartbeatAt === "number") {
93
+ return parsed;
94
+ }
95
+ return null;
96
+ } finally {
97
+ import_node_fs.default.closeSync(fd);
98
+ }
99
+ } catch {
100
+ return null;
101
+ }
102
+ }
103
+ function isDaemonLockfileFresh(lock, now = Date.now()) {
104
+ if (!lock) return false;
105
+ if (now - lock.heartbeatAt > DAEMON_HEARTBEAT_STALE_MS) return false;
106
+ try {
107
+ process.kill(lock.pid, 0);
108
+ return true;
109
+ } catch {
110
+ return false;
111
+ }
112
+ }
80
113
 
81
114
  // src/runtime-assets.ts
115
+ var import_fs = __toESM(require("fs"), 1);
116
+ var import_path = __toESM(require("path"), 1);
82
117
  var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[sootsim] no engine runtime installed \u2014 run `sootsim setup`, or `sootsim runtime install`";
83
118
  var MIME_TYPES = {
84
119
  ".js": "application/javascript",
@@ -153,6 +188,13 @@ function sootsimPlugin(options = {}) {
153
188
  name: "sootsim-one",
154
189
  configureServer(server) {
155
190
  const bundleUrl = options.bundleUrl || "/node_modules/one/metro-entry.bundle?platform=ios&dev=true&minify=false";
191
+ const buildShellHtml = (runtimeRoot) => {
192
+ const html = import_fs2.default.readFileSync(import_path2.default.join(runtimeRoot, "index.html"), "utf8");
193
+ const lock = readDaemonLockfile();
194
+ const bridgePort = lock && isDaemonLockfileFresh(lock) && lock.bridgePort > 0 ? lock.bridgePort : DEFAULT_SOOTSIM_BRIDGE_PORT;
195
+ const inject = `<script>(function(){var u=new URL(location.href);if(!u.searchParams.has('bundle'))u.searchParams.set('bundle',${JSON.stringify(bundleUrl)});window.__sootsimBridgePort=${bridgePort};history.replaceState(null,'','${prefix2}/'+u.search)})()</script>`;
196
+ return html.replace("</head>", inject + "</head>");
197
+ };
156
198
  server.middlewares.use((req, res, next) => {
157
199
  const origWriteHead = res.writeHead.bind(res);
158
200
  res.writeHead = function(statusCode, ...args) {
@@ -169,6 +211,22 @@ function sootsimPlugin(options = {}) {
169
211
  };
170
212
  next();
171
213
  });
214
+ server.middlewares.use((req, res, next) => {
215
+ if ((req.url || "").split("?")[0] !== "/__server-scan") return next();
216
+ const scanPort = server.config.server.port || 8081;
217
+ const absoluteBundleUrl = bundleUrl.startsWith("http") ? bundleUrl : `http://localhost:${scanPort}${bundleUrl}`;
218
+ res.setHeader("content-type", "application/json");
219
+ res.end(
220
+ JSON.stringify([
221
+ {
222
+ port: scanPort,
223
+ framework: "one",
224
+ bundleUrl: absoluteBundleUrl,
225
+ lastSeen: Date.now()
226
+ }
227
+ ])
228
+ );
229
+ });
172
230
  server.middlewares.use((req, res, next) => {
173
231
  const url = req.url || "";
174
232
  const pathname = url.split("?")[0];
@@ -190,14 +248,8 @@ function sootsimPlugin(options = {}) {
190
248
  }
191
249
  }
192
250
  if (pathname === prefix2 || pathname === prefix2 + "/") {
193
- const htmlPath = import_path2.default.join(runtimeRoot, "index.html");
194
- let html = import_fs2.default.readFileSync(htmlPath, "utf8");
195
- html = html.replace(
196
- "</head>",
197
- `<script>history.replaceState(null,'','${prefix2}/?bundle=${encodeURIComponent(bundleUrl)}')</script></head>`
198
- );
199
251
  res.setHeader("content-type", "text/html");
200
- res.end(html);
252
+ res.end(buildShellHtml(runtimeRoot));
201
253
  return;
202
254
  }
203
255
  if (pathname.startsWith(prefix2 + "/")) {
@@ -211,14 +263,8 @@ function sootsimPlugin(options = {}) {
211
263
  }
212
264
  const ext = import_path2.default.extname(pathname);
213
265
  if (!ext) {
214
- const htmlPath = import_path2.default.join(runtimeRoot, "index.html");
215
- let html = import_fs2.default.readFileSync(htmlPath, "utf8");
216
- html = html.replace(
217
- "</head>",
218
- `<script>history.replaceState(null,'','${prefix2}/?bundle=${encodeURIComponent(bundleUrl)}')</script></head>`
219
- );
220
266
  res.setHeader("content-type", "text/html");
221
- res.end(html);
267
+ res.end(buildShellHtml(runtimeRoot));
222
268
  return;
223
269
  }
224
270
  }
@@ -409,9 +455,6 @@ function sootsimJumpToSourceBabelPlugin(api, options = {}) {
409
455
  };
410
456
  }
411
457
 
412
- // src/bridge-constants.ts
413
- var DEFAULT_SOOTSIM_BRIDGE_PORT = 7668;
414
-
415
458
  // src/cli-constants.ts
416
459
  var DEFAULT_SOOTSIM_SHELL_URL = "http://localhost:5173/";
417
460
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/menu.ts
4
4
  var SOOTSIM_ENGINE_EVENT_NAME = "sootsim:engine-event";
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // cli/commands/inspect/core.ts
4
4
  function resolveMaxMsFlag(args, fallbackMs) {
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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;
@@ -3497,6 +3497,19 @@ var init_registry = __esm({
3497
3497
  }
3498
3498
  ]
3499
3499
  },
3500
+ "@bottom-tabs/react-navigation": {
3501
+ category: "Navigation",
3502
+ stubType: "works",
3503
+ versions: [
3504
+ {
3505
+ range: ">=1.0.0",
3506
+ coverage: 0.95,
3507
+ note: "pure JS React Navigation adapter over react-native-bottom-tabs; native tab rendering flows through the bottom-tabs seam",
3508
+ working: "createNativeBottomTabNavigator, Navigator, Screen options for title/label/icon/badge/lazy/freeze/testID/role, and TabView-level translucent/labeled/haptic/scroll-edge props via react-native-bottom-tabs",
3509
+ missing: "fidelity is bounded by the react-native-bottom-tabs native seam; no separate web tab implementation is provided by this adapter"
3510
+ }
3511
+ ]
3512
+ },
3500
3513
  "@react-navigation/stack": {
3501
3514
  category: "Navigation",
3502
3515
  stubType: "works",
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.178 | (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;
@@ -39,9 +39,8 @@ module.exports = __toCommonJS(vite_plugin_one_exports);
39
39
  var import_fs2 = __toESM(require("fs"), 1);
40
40
  var import_path2 = __toESM(require("path"), 1);
41
41
 
42
- // src/runtime-assets.ts
43
- var import_fs = __toESM(require("fs"), 1);
44
- var import_path = __toESM(require("path"), 1);
42
+ // src/bridge-constants.ts
43
+ var DEFAULT_SOOTSIM_BRIDGE_PORT = 7668;
45
44
 
46
45
  // src/home-paths.ts
47
46
  var import_node_fs = __toESM(require("node:fs"), 1);
@@ -49,6 +48,8 @@ var import_node_os = require("node:os");
49
48
  var import_node_path = __toESM(require("node:path"), 1);
50
49
  var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
51
50
  var ACTIVE_RUNTIME_FILE = "active";
51
+ var DAEMON_LOCKFILE = "daemon.json";
52
+ var DAEMON_HEARTBEAT_STALE_MS = 3e4;
52
53
  function sootsimHomeDir() {
53
54
  const override = process.env[SOOTSIM_HOME_ENV];
54
55
  if (override && override.length > 0) return import_node_path.default.resolve(override);
@@ -63,6 +64,9 @@ function runtimeDir(version) {
63
64
  function activeRuntimeFile() {
64
65
  return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
65
66
  }
67
+ function daemonLockfilePath() {
68
+ return import_node_path.default.join(sootsimHomeDir(), DAEMON_LOCKFILE);
69
+ }
66
70
  function readActiveRuntime() {
67
71
  try {
68
72
  const value = import_node_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
@@ -72,8 +76,39 @@ function readActiveRuntime() {
72
76
  }
73
77
  }
74
78
  var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
79
+ function readDaemonLockfile() {
80
+ try {
81
+ const fd = import_node_fs.default.openSync(daemonLockfilePath(), "r");
82
+ try {
83
+ const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
84
+ const bytesRead = import_node_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
85
+ const raw = buf.subarray(0, bytesRead).toString("utf8");
86
+ const parsed = JSON.parse(raw);
87
+ if (parsed && parsed.schema === 1 && typeof parsed.pid === "number" && typeof parsed.bridgePort === "number" && typeof parsed.runtimePort === "number" && typeof parsed.startedAt === "number" && typeof parsed.heartbeatAt === "number") {
88
+ return parsed;
89
+ }
90
+ return null;
91
+ } finally {
92
+ import_node_fs.default.closeSync(fd);
93
+ }
94
+ } catch {
95
+ return null;
96
+ }
97
+ }
98
+ function isDaemonLockfileFresh(lock, now = Date.now()) {
99
+ if (!lock) return false;
100
+ if (now - lock.heartbeatAt > DAEMON_HEARTBEAT_STALE_MS) return false;
101
+ try {
102
+ process.kill(lock.pid, 0);
103
+ return true;
104
+ } catch {
105
+ return false;
106
+ }
107
+ }
75
108
 
76
109
  // src/runtime-assets.ts
110
+ var import_fs = __toESM(require("fs"), 1);
111
+ var import_path = __toESM(require("path"), 1);
77
112
  var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[sootsim] no engine runtime installed \u2014 run `sootsim setup`, or `sootsim runtime install`";
78
113
  var MIME_TYPES = {
79
114
  ".js": "application/javascript",
@@ -148,6 +183,13 @@ function sootsimPlugin(options = {}) {
148
183
  name: "sootsim-one",
149
184
  configureServer(server) {
150
185
  const bundleUrl = options.bundleUrl || "/node_modules/one/metro-entry.bundle?platform=ios&dev=true&minify=false";
186
+ const buildShellHtml = (runtimeRoot) => {
187
+ const html = import_fs2.default.readFileSync(import_path2.default.join(runtimeRoot, "index.html"), "utf8");
188
+ const lock = readDaemonLockfile();
189
+ const bridgePort = lock && isDaemonLockfileFresh(lock) && lock.bridgePort > 0 ? lock.bridgePort : DEFAULT_SOOTSIM_BRIDGE_PORT;
190
+ const inject = `<script>(function(){var u=new URL(location.href);if(!u.searchParams.has('bundle'))u.searchParams.set('bundle',${JSON.stringify(bundleUrl)});window.__sootsimBridgePort=${bridgePort};history.replaceState(null,'','${prefix}/'+u.search)})()</script>`;
191
+ return html.replace("</head>", inject + "</head>");
192
+ };
151
193
  server.middlewares.use((req, res, next) => {
152
194
  const origWriteHead = res.writeHead.bind(res);
153
195
  res.writeHead = function(statusCode, ...args) {
@@ -164,6 +206,22 @@ function sootsimPlugin(options = {}) {
164
206
  };
165
207
  next();
166
208
  });
209
+ server.middlewares.use((req, res, next) => {
210
+ if ((req.url || "").split("?")[0] !== "/__server-scan") return next();
211
+ const scanPort = server.config.server.port || 8081;
212
+ const absoluteBundleUrl = bundleUrl.startsWith("http") ? bundleUrl : `http://localhost:${scanPort}${bundleUrl}`;
213
+ res.setHeader("content-type", "application/json");
214
+ res.end(
215
+ JSON.stringify([
216
+ {
217
+ port: scanPort,
218
+ framework: "one",
219
+ bundleUrl: absoluteBundleUrl,
220
+ lastSeen: Date.now()
221
+ }
222
+ ])
223
+ );
224
+ });
167
225
  server.middlewares.use((req, res, next) => {
168
226
  const url = req.url || "";
169
227
  const pathname = url.split("?")[0];
@@ -185,14 +243,8 @@ function sootsimPlugin(options = {}) {
185
243
  }
186
244
  }
187
245
  if (pathname === prefix || pathname === prefix + "/") {
188
- const htmlPath = import_path2.default.join(runtimeRoot, "index.html");
189
- let html = import_fs2.default.readFileSync(htmlPath, "utf8");
190
- html = html.replace(
191
- "</head>",
192
- `<script>history.replaceState(null,'','${prefix}/?bundle=${encodeURIComponent(bundleUrl)}')</script></head>`
193
- );
194
246
  res.setHeader("content-type", "text/html");
195
- res.end(html);
247
+ res.end(buildShellHtml(runtimeRoot));
196
248
  return;
197
249
  }
198
250
  if (pathname.startsWith(prefix + "/")) {
@@ -206,14 +258,8 @@ function sootsimPlugin(options = {}) {
206
258
  }
207
259
  const ext = import_path2.default.extname(pathname);
208
260
  if (!ext) {
209
- const htmlPath = import_path2.default.join(runtimeRoot, "index.html");
210
- let html = import_fs2.default.readFileSync(htmlPath, "utf8");
211
- html = html.replace(
212
- "</head>",
213
- `<script>history.replaceState(null,'','${prefix}/?bundle=${encodeURIComponent(bundleUrl)}')</script></head>`
214
- );
215
261
  res.setHeader("content-type", "text/html");
216
- res.end(html);
262
+ res.end(buildShellHtml(runtimeRoot));
217
263
  return;
218
264
  }
219
265
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sootsim",
3
- "version": "0.1.177",
3
+ "version": "0.1.178",
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",