sootsim 0.1.121 → 0.1.122

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 (150) hide show
  1. package/dist-cli/bin.js +4 -4
  2. package/dist-cli/chunks/{agent-NZ4A6JKO.js → agent-LICWL6DE.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-CYQ5L2YH.js → agent-wrapper-KK5TEI3F.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-2DF4NW5D.js → app-fonts-UZXW5FWC.js} +2 -2
  5. package/dist-cli/chunks/{assert-PASM5PLL.js → assert-UZGKOSWO.js} +2 -2
  6. package/dist-cli/chunks/auto-bootstrap-GCRCFYH5.js +2 -0
  7. package/dist-cli/chunks/beta-6BJEGCY4.js +2 -0
  8. package/dist-cli/chunks/{chunk-7CA63OS4.js → chunk-2KKPINU2.js} +1 -1
  9. package/dist-cli/chunks/{chunk-MSU27JEW.js → chunk-2XDZ42A6.js} +2 -2
  10. package/dist-cli/chunks/{chunk-SF6W3FRS.js → chunk-366ZIBQX.js} +1 -1
  11. package/dist-cli/chunks/{chunk-LT2X5ISU.js → chunk-36BDR3DE.js} +2 -2
  12. package/dist-cli/chunks/{chunk-OBYYAT4F.js → chunk-3BCXNVBN.js} +2 -2
  13. package/dist-cli/chunks/{chunk-3WDN2S2A.js → chunk-3JHF4F55.js} +2 -2
  14. package/dist-cli/chunks/{chunk-W3FBNBTX.js → chunk-3MKNANBV.js} +2 -2
  15. package/dist-cli/chunks/chunk-3P4C6X6M.js +1 -0
  16. package/dist-cli/chunks/{chunk-7RXO4KKF.js → chunk-5GQJWYO7.js} +1 -1
  17. package/dist-cli/chunks/{chunk-PMAKUYYK.js → chunk-6NW6PC3P.js} +2 -2
  18. package/dist-cli/chunks/{chunk-X4LYRBLZ.js → chunk-6PKYLQ36.js} +1 -1
  19. package/dist-cli/chunks/{chunk-OEV7EOMC.js → chunk-7AXDJ2RV.js} +2 -2
  20. package/dist-cli/chunks/chunk-7OVVG4L6.js +4 -0
  21. package/dist-cli/chunks/{chunk-CGB6KRKN.js → chunk-AK2PW7XZ.js} +5 -5
  22. package/dist-cli/chunks/{chunk-KTE2VIXH.js → chunk-BII2H2BR.js} +3 -3
  23. package/dist-cli/chunks/{chunk-Y7ZMV3PG.js → chunk-D5VB3SJP.js} +1 -1
  24. package/dist-cli/chunks/chunk-EGFZLSP4.js +1 -0
  25. package/dist-cli/chunks/{chunk-I26R4PE2.js → chunk-ESUDARF7.js} +1 -1
  26. package/dist-cli/chunks/{chunk-2U4CGOD6.js → chunk-FFMAP2HL.js} +2 -2
  27. package/dist-cli/chunks/{chunk-QNQO5VHO.js → chunk-G6Z5E4KX.js} +2 -2
  28. package/dist-cli/chunks/{chunk-DORQQNP4.js → chunk-GLVNMGFD.js} +2 -2
  29. package/dist-cli/chunks/{chunk-3DDNLPIH.js → chunk-GNWVN4MO.js} +2 -2
  30. package/dist-cli/chunks/{chunk-VSKLWCFM.js → chunk-GX2FFJV6.js} +2 -2
  31. package/dist-cli/chunks/{chunk-SRA2TVCG.js → chunk-IBEQOTJK.js} +1 -1
  32. package/dist-cli/chunks/{chunk-VSRV5LFU.js → chunk-IRSVHE5W.js} +1 -1
  33. package/dist-cli/chunks/{chunk-MUTDER75.js → chunk-ITGWJM6W.js} +2 -2
  34. package/dist-cli/chunks/{chunk-NQ4EDJV4.js → chunk-J27RHTWH.js} +6 -6
  35. package/dist-cli/chunks/chunk-KWXV47VS.js +2 -0
  36. package/dist-cli/chunks/{chunk-GU3MWKJY.js → chunk-LKSAMFVM.js} +1 -1
  37. package/dist-cli/chunks/chunk-LYZ3GSCB.js +1 -0
  38. package/dist-cli/chunks/{chunk-VX5CAWLC.js → chunk-M6ML3LBZ.js} +2 -2
  39. package/dist-cli/chunks/{chunk-3A7SRWSQ.js → chunk-NIL4WJUK.js} +2 -2
  40. package/dist-cli/chunks/{chunk-5OA35LZX.js → chunk-QD5YATLL.js} +2 -2
  41. package/dist-cli/chunks/{chunk-WHL7FMLG.js → chunk-RBWDMEWN.js} +1 -1
  42. package/dist-cli/chunks/{chunk-Z47GWZMZ.js → chunk-RH3GHGRZ.js} +3 -3
  43. package/dist-cli/chunks/{chunk-VALW4SKE.js → chunk-S2RR2IZC.js} +1 -1
  44. package/dist-cli/chunks/{chunk-B77PWTHR.js → chunk-S5KZH7JJ.js} +2 -2
  45. package/dist-cli/chunks/{chunk-4UQMPWDA.js → chunk-SUQAFFJO.js} +2 -2
  46. package/dist-cli/chunks/{chunk-4BXESMZ7.js → chunk-T2YYBRII.js} +1 -1
  47. package/dist-cli/chunks/chunk-TZLLRML5.js +33 -0
  48. package/dist-cli/chunks/{chunk-KY6NY6WN.js → chunk-UQHBJ2L2.js} +1 -1
  49. package/dist-cli/chunks/{chunk-RVWJ3TAE.js → chunk-V4OEITZA.js} +2 -2
  50. package/dist-cli/chunks/{chunk-SA5RP334.js → chunk-VHPYIZ3U.js} +2 -2
  51. package/dist-cli/chunks/{chunk-IQNZPHGD.js → chunk-X6PIQ3OM.js} +2 -2
  52. package/dist-cli/chunks/cli-version-4BVXR3IU.js +2 -0
  53. package/dist-cli/chunks/{compat-FMBQL2CX.js → compat-QFC2IVZI.js} +3 -3
  54. package/dist-cli/chunks/{config-JD23SW7N.js → config-LU3HYSGJ.js} +2 -2
  55. package/dist-cli/chunks/control-L4C43O4N.js +2 -0
  56. package/dist-cli/chunks/{cpu-profile-2Z4KGCAE.js → cpu-profile-SJV2ERLS.js} +2 -2
  57. package/dist-cli/chunks/{daemon-NDO6JPDH.js → daemon-TMW3WV27.js} +2 -2
  58. package/dist-cli/chunks/{debug-RBVMEH33.js → debug-PBM4L52R.js} +3 -3
  59. package/dist-cli/chunks/{detox-TBJAZEBB.js → detox-VANQVBBM.js} +2 -2
  60. package/dist-cli/chunks/{device-26YM4HM7.js → device-VIMOCLKX.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-PW7FGUOI.js → diagnose-CRCRKGLQ.js} +2 -2
  62. package/dist-cli/chunks/drivers-OUO3WJ3H.js +2 -0
  63. package/dist-cli/chunks/{electron-TBMZ3C5I.js → electron-SWTX2DO7.js} +3 -3
  64. package/dist-cli/chunks/flow-RGF7ZOD4.js +2 -0
  65. package/dist-cli/chunks/help-OTY4AGCS.js +2 -0
  66. package/dist-cli/chunks/{hints-Q3I4PXMT.js → hints-KM6DYEYZ.js} +2 -2
  67. package/dist-cli/chunks/{home-paths-P5GMZADH.js → home-paths-VON247XB.js} +2 -2
  68. package/dist-cli/chunks/{inspect-UTHL2UK4.js → inspect-Z3KYGCZ4.js} +3 -3
  69. package/dist-cli/chunks/install-HHP7GSJ4.js +2 -0
  70. package/dist-cli/chunks/{install-desktop-XQYE3QYC.js → install-desktop-XDZLXMC2.js} +3 -3
  71. package/dist-cli/chunks/{keys-75OBQ7OF.js → keys-KEPNUBCA.js} +2 -2
  72. package/dist-cli/chunks/{launch-TFE3CZZ3.js → launch-S2H6FBFG.js} +3 -3
  73. package/dist-cli/chunks/{login-EIL5PLK4.js → login-RDMQ4LGI.js} +4 -4
  74. package/dist-cli/chunks/{logout-2DXPOPWE.js → logout-HDPMIRMV.js} +2 -2
  75. package/dist-cli/chunks/{maestro-Q27CNJGT.js → maestro-A3QGVBQW.js} +2 -2
  76. package/dist-cli/chunks/{preview-ZGVCXKQZ.js → preview-HXMXXPPF.js} +2 -2
  77. package/dist-cli/chunks/{profile-TCX6GYV5.js → profile-CXIPWQLZ.js} +2 -2
  78. package/dist-cli/chunks/{react-24D26RLU.js → react-PNVZTDPA.js} +2 -2
  79. package/dist-cli/chunks/{record-3MODR5RQ.js → record-LALIKJN2.js} +2 -2
  80. package/dist-cli/chunks/runtime-OQQOJSTS.js +2 -0
  81. package/dist-cli/chunks/runtime-delivery-IU6INVF7.js +2 -0
  82. package/dist-cli/chunks/{screenshot-4A6JTLUV.js → screenshot-RITJ6BZH.js} +2 -2
  83. package/dist-cli/chunks/{screenshot-mode-KVMXLFJ4.js → screenshot-mode-4ZMTOYNG.js} +2 -2
  84. package/dist-cli/chunks/{screenshots-XGG6PNXW.js → screenshots-LDJZ4CFO.js} +2 -2
  85. package/dist-cli/chunks/{server-MRLLYDV7.js → server-2Q6HJBRG.js} +3 -3
  86. package/dist-cli/chunks/setup-repo-3JXYJESB.js +2 -0
  87. package/dist-cli/chunks/{skills-COR2GQRN.js → skills-7HSB6DOQ.js} +2 -2
  88. package/dist-cli/chunks/{start-SD27AJ7E.js → start-MM3GHFNB.js} +4 -4
  89. package/dist-cli/chunks/store-EOS7PN7Y.js +2 -0
  90. package/dist-cli/chunks/telemetry-MJ2ZVNZG.js +2 -0
  91. package/dist-cli/chunks/{test-4N6K3C5R.js → test-JVZONK7Z.js} +3 -3
  92. package/dist-cli/chunks/{three-mode-PJQGXIP4.js → three-mode-5LHS72VD.js} +2 -2
  93. package/dist-cli/chunks/{timeline-C7JSMHCV.js → timeline-AN3WAGXK.js} +2 -2
  94. package/dist-cli/chunks/{upgrade-SFUV6KPW.js → upgrade-LES72FX4.js} +2 -2
  95. package/dist-cli/chunks/upload-JE2ORZSH.js +2 -0
  96. package/dist-cli/chunks/version-SKCJLX5C.js +4 -0
  97. package/dist-cli/chunks/{web-GK27H4NM.js → web-AWRFEEZU.js} +2 -2
  98. package/dist-cli/chunks/{what-happened-GAY54LBV.js → what-happened-JNCZGYUL.js} +2 -2
  99. package/dist-cli/chunks/{whoami-C2WULTLS.js → whoami-HYV4EQ5D.js} +2 -2
  100. package/dist-lib/agent-daemon-client.cjs +1 -1
  101. package/dist-lib/agent-events.cjs +1 -1
  102. package/dist-lib/agent-sessions.cjs +1 -1
  103. package/dist-lib/attached-projects.cjs +1 -1
  104. package/dist-lib/auth/shared-session.cjs +1 -1
  105. package/dist-lib/backend-origin.cjs +1 -1
  106. package/dist-lib/beta.cjs +1 -1
  107. package/dist-lib/beta.mjs +1 -1
  108. package/dist-lib/bridge-constants.cjs +1 -1
  109. package/dist-lib/cli-constants.cjs +1 -1
  110. package/dist-lib/config.cjs +1 -1
  111. package/dist-lib/detox/index.cjs +1 -1
  112. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  113. package/dist-lib/home-paths.cjs +1 -1
  114. package/dist-lib/host/bridge-host.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  117. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  118. package/dist-lib/host/websocket-proxy.cjs +1 -1
  119. package/dist-lib/index.cjs +1 -1
  120. package/dist-lib/metro.cjs +1 -1
  121. package/dist-lib/profiles.cjs +1 -1
  122. package/dist-lib/render-mode.cjs +1 -1
  123. package/dist-lib/scripts/demo-app-registry.cjs +1 -1
  124. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  125. package/dist-lib/sdk.cjs +1 -1
  126. package/dist-lib/sdk.mjs +1 -1
  127. package/dist-lib/skills.cjs +1 -1
  128. package/dist-lib/vite.cjs +1 -1
  129. package/package.json +1 -1
  130. package/src/runtime-delivery.ts +100 -0
  131. package/dist-cli/chunks/auto-bootstrap-IPNK6GF7.js +0 -2
  132. package/dist-cli/chunks/beta-RG7JT6HD.js +0 -2
  133. package/dist-cli/chunks/chunk-2FTVPI7F.js +0 -2
  134. package/dist-cli/chunks/chunk-BTWXWUDB.js +0 -1
  135. package/dist-cli/chunks/chunk-KXLYXKMA.js +0 -1
  136. package/dist-cli/chunks/chunk-QUEATUWT.js +0 -1
  137. package/dist-cli/chunks/chunk-VJPN6DQU.js +0 -4
  138. package/dist-cli/chunks/chunk-YQIFU3PB.js +0 -25
  139. package/dist-cli/chunks/cli-version-DPV7EKFK.js +0 -2
  140. package/dist-cli/chunks/control-IAHPU5HD.js +0 -2
  141. package/dist-cli/chunks/drivers-L6UY2JC6.js +0 -2
  142. package/dist-cli/chunks/flow-QSDMMKNZ.js +0 -2
  143. package/dist-cli/chunks/help-OC7HYZ5F.js +0 -2
  144. package/dist-cli/chunks/install-3UWGXX6F.js +0 -2
  145. package/dist-cli/chunks/runtime-5MJPHLRZ.js +0 -2
  146. package/dist-cli/chunks/runtime-delivery-NWSDCFAI.js +0 -2
  147. package/dist-cli/chunks/setup-repo-OUMNEC36.js +0 -2
  148. package/dist-cli/chunks/store-JVV7G7VY.js +0 -2
  149. package/dist-cli/chunks/telemetry-BMJNBZT6.js +0 -2
  150. package/dist-cli/chunks/upload-XQLVCUKI.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P,b as v}from"./chunk-I26R4PE2.js";import{d as j}from"./chunk-Z47GWZMZ.js";import{a as b}from"./chunk-OBYYAT4F.js";import{execSync as A}from"child_process";import{existsSync as w,readFileSync as _,writeFileSync as x}from"fs";import{relative as B,resolve as d}from"path";import{existsSync as p,readFileSync as k,readdirSync as O,statSync as R}from"fs";import{basename as L,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(k(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(k(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function y(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(k(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||L(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=k(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P,b as v}from"./chunk-ESUDARF7.js";import{d as j}from"./chunk-RH3GHGRZ.js";import{a as b}from"./chunk-3BCXNVBN.js";import{execSync as A}from"child_process";import{existsSync as w,readFileSync as _,writeFileSync as x}from"fs";import{relative as B,resolve as d}from"path";import{existsSync as p,readFileSync as k,readdirSync as O,statSync as R}from"fs";import{basename as L,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(k(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(k(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function y(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(k(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||L(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=k(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
3
3
  `).filter(Boolean);for(let n of c){let g=n.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");g&&o.push(...S(e,g))}}return o}let r=a(e,"package.json");if(p(r))try{let s=JSON.parse(k(r,"utf8")),t=Array.isArray(s.workspaces)?s.workspaces:s.workspaces?.packages||[];for(let c of t)o.push(...S(e,c))}catch{}return o}function S(e,o){let i=o.replace(/\/\*\*?$/,"").replace(/\*$/,""),r=a(e,i);if(!p(r))return[];try{return O(r).map(t=>a(r,t)).filter(t=>{try{return R(t).isDirectory()&&p(a(t,"package.json"))}catch{return!1}})}catch{return[]}}function M(e){let o=J(e),i=W(e);if(o==="single"){let c=y(e);return{root:e,type:o,packageManager:i,apps:c?[c]:[]}}let r=V(e),s=[],t=y(e);t&&s.push(t);for(let c of r){if(c===e)continue;let n=y(c);n&&s.push(n)}return{root:e,type:o,packageManager:i,apps:s}}function $(e){switch(e){case"bun":return"bun add -d sootsim";case"pnpm":return"pnpm add -D sootsim";case"yarn":return"yarn add -D sootsim";case"npm":return"npm install -D sootsim"}}async function ce(e){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
4
  sootsim setup-repo \u2014 set up sootsim in your project
5
5
 
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as R}from"./chunk-7CA63OS4.js";import{l as D}from"./chunk-4BXESMZ7.js";import{a as T}from"./chunk-SRA2TVCG.js";function Y(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function I(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return Y(r)?r:null}catch{return null}}import{randomBytes as G,createHash as q}from"node:crypto";import m from"node:fs";import y from"node:path";var N=null;function _(){if(N)return N;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||D()}function h(){return _()}function U(){return y.join(_(),"attached-projects.json")}function $(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=m.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return $();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{m.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return $()}}function X(e){let t=U();m.mkdirSync(y.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=m.openSync(r,"w",384);try{m.writeFileSync(n,JSON.stringify(e,null,2)),m.fsyncSync(n)}finally{m.closeSync(n)}m.renameSync(r,t)}function w(e){let t=S();return e(t),X(t),t}function B(e){return q("sha256").update(y.resolve(e)).digest("hex").slice(0,16)}function K(){return`s_${G(10).toString("hex")}`}function ge(e){let t=y.resolve(e.cwd),r=B(t),n;return w(o=>{let s=o.attachedProjects.find(c=>c.id===r);if(s){let c={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=c,n=c;return}let a=Date.now(),d={id:r,name:e.name??y.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:a,updatedAt:a};o.attachedProjects.push(d),n=d}),n}function F(e){return S().attachedProjects.find(t=>t.id===e)??null}function ye(){return S().attachedProjects}var Q=336*60*60*1e3;function he(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],a=o-Q,d=s.filter(c=>c.ts>=a);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Se(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function we(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function M(e){let t;return w(r=>{if(e.id){let a=r.agentSessions.find(d=>d.id===e.id);if(a){let d={...a,...e,lastSeenAt:Date.now()},c=r.agentSessions.indexOf(a);r.agentSessions[c]=d,t=d;return}}let n=r.attachedProjects.find(a=>a.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??K(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function C(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function v(e,t){w(r=>{let n=r.agentSessions.find(s=>s.id===e);if(!n)return;let o=r.agentSessions.indexOf(n);r.agentSessions[o]={...n,...t,id:n.id,projectId:n.projectId,createdAt:n.createdAt,lastSeenAt:Date.now()}})}async function ve(){if(S().attachedProjects.length>0)return;let t;try{t=(await import("sootsim/scripts/demo-app-registry")).APPS}catch(n){console.warn("[sootsim] seedFromDemoAppRegistry: could not load demo registry:",n.message);return}if(!Array.isArray(t))return;let r=t;w(n=>{for(let o of r){if(!m.existsSync(o.dir))continue;let s=y.resolve(o.dir),a=B(s);if(n.attachedProjects.some(c=>c.id===a))continue;let d=Date.now();n.attachedProjects.push({id:a,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as V,spawnSync as z}from"node:child_process";import{randomUUID as Z}from"node:crypto";import i,{constants as f}from"node:fs";import u from"node:path";import ee from"node:readline";function j(e){return u.join(h(),"sessions",e)}function W(e){return u.join(j(e),"prompt.in")}function J(e){return u.join(j(e),"events.out")}function te(e){return u.join(h(),"transcripts",`${e}.log`)}function O(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(j(t)))}function re(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ne();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("sootsim CLI not found. set SOOTSIM_BIN to the path of the sootsim binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ne(){try{let e=se();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli` (watch:cli:binary builds dist-bin/ instead).")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function se(){try{let r=T.resolve("sootsim/package.json");return u.dirname(r)}catch{}let e=oe();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name==="sootsim")return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function oe(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function ie(e,t,r){let n=u.join(h(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,a=null;for(;a===null;)try{a=i.openSync(o,f.O_WRONLY|f.O_CREAT|f.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let c=Number(i.readFileSync(o,"utf8").trim());if(c&&!ce(c)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(c=>setTimeout(c,50))}try{return i.writeFileSync(a,String(process.pid)),await r()}finally{try{i.closeSync(a)}catch{}try{i.unlinkSync(o)}catch{}}}function ce(e){try{return process.kill(e,0),!0}catch{return!1}}function L(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=z("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function Te(e){let t=F(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return ie(t.id,r,async()=>{let n=C(t.id).find(p=>p.provider===r&&p.status!=="ended"&&O(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`sootsim agent end <sessionId>\`.`);let o=r==="claude"?Z():void 0,s=M({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),a=W(s.id),d=J(s.id),c=te(s.id);L(a),L(d);let g=u.dirname(c);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:H}=re(),P=[...H,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",a,"--events-out",d,"--transcript",c];e.codexBin&&P.push("--codex-bin",e.codexBin),e.claudeBin&&P.push("--claude-bin",e.claudeBin),e.freshThread&&P.push("--fresh-thread"),o&&P.push("--claude-session-uuid",o);let x=V(A,P,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:h()}});x.unref();let E=e.readyTimeoutMs??6e3,b=await ae(d,p=>p.type==="ready"||p.type==="error",E);if(!b||b.type==="error"){if(x.pid)try{process.kill(x.pid,"SIGTERM")}catch{}try{i.rmSync(j(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=b&&b.type==="error"?b.message:`no ready event within ${E}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:x.pid,status:"idle"}),{session:k(s.id),wrapperPid:x.pid}})}async function De(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!O(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=W(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,f.O_WRONLY);try{let s=R(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as R}from"./chunk-2KKPINU2.js";import{l as D}from"./chunk-T2YYBRII.js";import{a as T}from"./chunk-IBEQOTJK.js";function Y(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function I(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return Y(r)?r:null}catch{return null}}import{randomBytes as G,createHash as q}from"node:crypto";import m from"node:fs";import y from"node:path";var N=null;function _(){if(N)return N;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||D()}function h(){return _()}function U(){return y.join(_(),"attached-projects.json")}function $(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=m.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return $();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{m.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return $()}}function X(e){let t=U();m.mkdirSync(y.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=m.openSync(r,"w",384);try{m.writeFileSync(n,JSON.stringify(e,null,2)),m.fsyncSync(n)}finally{m.closeSync(n)}m.renameSync(r,t)}function w(e){let t=S();return e(t),X(t),t}function B(e){return q("sha256").update(y.resolve(e)).digest("hex").slice(0,16)}function K(){return`s_${G(10).toString("hex")}`}function ge(e){let t=y.resolve(e.cwd),r=B(t),n;return w(o=>{let s=o.attachedProjects.find(c=>c.id===r);if(s){let c={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=c,n=c;return}let a=Date.now(),d={id:r,name:e.name??y.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:a,updatedAt:a};o.attachedProjects.push(d),n=d}),n}function F(e){return S().attachedProjects.find(t=>t.id===e)??null}function ye(){return S().attachedProjects}var Q=336*60*60*1e3;function he(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],a=o-Q,d=s.filter(c=>c.ts>=a);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Se(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function we(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function M(e){let t;return w(r=>{if(e.id){let a=r.agentSessions.find(d=>d.id===e.id);if(a){let d={...a,...e,lastSeenAt:Date.now()},c=r.agentSessions.indexOf(a);r.agentSessions[c]=d,t=d;return}}let n=r.attachedProjects.find(a=>a.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??K(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function C(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function v(e,t){w(r=>{let n=r.agentSessions.find(s=>s.id===e);if(!n)return;let o=r.agentSessions.indexOf(n);r.agentSessions[o]={...n,...t,id:n.id,projectId:n.projectId,createdAt:n.createdAt,lastSeenAt:Date.now()}})}async function ve(){if(S().attachedProjects.length>0)return;let t;try{t=(await import("sootsim/scripts/demo-app-registry")).APPS}catch(n){console.warn("[sootsim] seedFromDemoAppRegistry: could not load demo registry:",n.message);return}if(!Array.isArray(t))return;let r=t;w(n=>{for(let o of r){if(!m.existsSync(o.dir))continue;let s=y.resolve(o.dir),a=B(s);if(n.attachedProjects.some(c=>c.id===a))continue;let d=Date.now();n.attachedProjects.push({id:a,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as V,spawnSync as z}from"node:child_process";import{randomUUID as Z}from"node:crypto";import i,{constants as f}from"node:fs";import u from"node:path";import ee from"node:readline";function j(e){return u.join(h(),"sessions",e)}function W(e){return u.join(j(e),"prompt.in")}function J(e){return u.join(j(e),"events.out")}function te(e){return u.join(h(),"transcripts",`${e}.log`)}function O(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(j(t)))}function re(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ne();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("sootsim CLI not found. set SOOTSIM_BIN to the path of the sootsim binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ne(){try{let e=se();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[sootsim] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli` (watch:cli:binary builds dist-bin/ instead).")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function se(){try{let r=T.resolve("sootsim/package.json");return u.dirname(r)}catch{}let e=oe();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name==="sootsim")return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function oe(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function ie(e,t,r){let n=u.join(h(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,a=null;for(;a===null;)try{a=i.openSync(o,f.O_WRONLY|f.O_CREAT|f.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let c=Number(i.readFileSync(o,"utf8").trim());if(c&&!ce(c)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(c=>setTimeout(c,50))}try{return i.writeFileSync(a,String(process.pid)),await r()}finally{try{i.closeSync(a)}catch{}try{i.unlinkSync(o)}catch{}}}function ce(e){try{return process.kill(e,0),!0}catch{return!1}}function L(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=z("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function Te(e){let t=F(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return ie(t.id,r,async()=>{let n=C(t.id).find(p=>p.provider===r&&p.status!=="ended"&&O(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`sootsim agent end <sessionId>\`.`);let o=r==="claude"?Z():void 0,s=M({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),a=W(s.id),d=J(s.id),c=te(s.id);L(a),L(d);let g=u.dirname(c);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:H}=re(),P=[...H,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",a,"--events-out",d,"--transcript",c];e.codexBin&&P.push("--codex-bin",e.codexBin),e.claudeBin&&P.push("--claude-bin",e.claudeBin),e.freshThread&&P.push("--fresh-thread"),o&&P.push("--claude-session-uuid",o);let x=V(A,P,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:h()}});x.unref();let E=e.readyTimeoutMs??6e3,b=await ae(d,p=>p.type==="ready"||p.type==="error",E);if(!b||b.type==="error"){if(x.pid)try{process.kill(x.pid,"SIGTERM")}catch{}try{i.rmSync(j(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=b&&b.type==="error"?b.message:`no ready event within ${E}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:x.pid,status:"idle"}),{session:k(s.id),wrapperPid:x.pid}})}async function De(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!O(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=W(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,f.O_WRONLY);try{let s=R(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
3
3
  `)}finally{i.closeSync(o)}v(e,{lastPrompt:t.displayText??t.text,status:"working"})}async function Re(e){let t=k(e);if(!t)throw new l("NO_SESSION",`no session with id=${e}`);if(O(t.wrapperPid,e))try{process.kill(t.wrapperPid,"SIGTERM")}catch{}let r=j(e),n=h();if(r.startsWith(n))try{i.rmSync(r,{recursive:!0,force:!0})}catch{}v(e,{status:"ended",wrapperPid:void 0})}function Ne(e,t){let r=J(e);if(!i.existsSync(r))throw new l("NO_FIFO",`events FIFO missing: ${r}`);let n=i.openSync(r,f.O_RDWR),o=i.createReadStream("",{fd:n,autoClose:!0}),s=ee.createInterface({input:o,crlfDelay:1/0});s.on("line",d=>{let c=I(d);c&&t(c)});let a=!1;return()=>{if(!a){a=!0;try{s.close()}catch{}try{o.destroy()}catch{}}}}async function ae(e,t,r){let n=i.openSync(e,f.O_RDWR|f.O_NONBLOCK),o=Buffer.alloc(8192),s="",a=Date.now()+r;try{for(;Date.now()<a;){let d=0;try{d=i.readSync(n,o,0,o.length,null)}catch(c){if(c.code!=="EAGAIN")throw c;d=0}if(d>0){s+=o.subarray(0,d).toString("utf8");let c;for(;(c=s.indexOf(`
4
4
  `))>=0;){let g=s.slice(0,c);s=s.slice(c+1);let A=I(g);if(A&&t(A))return A}}else await new Promise(c=>setTimeout(c,30))}return null}finally{i.closeSync(n)}}export{I as a,h as b,ge as c,F as d,ye as e,he as f,Se as g,we as h,k as i,C as j,v as k,ve as l,j as m,W as n,J as o,te as p,O as q,re as r,l as s,Te as t,De as u,Re as v,Ne as w};
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as y}from"./chunk-SF6W3FRS.js";import{existsSync as S,mkdirSync as h,readFileSync as b,writeFileSync as H,rmSync as p}from"fs";import{tmpdir as m}from"os";import{dirname as v,join as w}from"path";var d=new Map;function s(e,r){d.set(e,r)}var c=1;function i(){return w(m(),`sootsim-cli-hints-${y()}.json`)}function l(){return w(m(),"sootsim-cli-hints-global.json")}function u(e){if(!S(e))return{version:c,shown:{}};try{let r=JSON.parse(b(e,"utf8"));return r?.version!==c||!r?.shown?{version:c,shown:{}}:r}catch{return{version:c,shown:{}}}}function f(e,r){try{h(v(e),{recursive:!0}),H(e,JSON.stringify(r)+`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as y}from"./chunk-366ZIBQX.js";import{existsSync as S,mkdirSync as h,readFileSync as b,writeFileSync as H,rmSync as p}from"fs";import{tmpdir as m}from"os";import{dirname as v,join as w}from"path";var d=new Map;function s(e,r){d.set(e,r)}var c=1;function i(){return w(m(),`sootsim-cli-hints-${y()}.json`)}function l(){return w(m(),"sootsim-cli-hints-global.json")}function u(e){if(!S(e))return{version:c,shown:{}};try{let r=JSON.parse(b(e,"utf8"));return r?.version!==c||!r?.shown?{version:c,shown:{}}:r}catch{return{version:c,shown:{}}}}function f(e,r){try{h(v(e),{recursive:!0}),H(e,JSON.stringify(r)+`
3
3
  `)}catch{}}function F(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function x(e,r){let o=F();if(o==="off")return!1;if(o==="always"||r==="always")return!0;let n=Date.now();if(r==="once-per-identity"){let t=u(i());return t.shown[e]?!1:(t.shown[e]=n,f(i(),t),!0)}if(r==="once-ever"){let t=u(l());return t.shown[e]?!1:(t.shown[e]=n,f(l(),t),!0)}if(typeof r=="object"&&"cooldownMs"in r){let t=u(i()),a=t.shown[e]??0;return n-a<r.cooldownMs?!1:(t.shown[e]=n,f(i(),t),!0)}return!0}function k(e,...r){let o=d.get(e);if(!o)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!x(e,o.frequency))return!1;let n=o.render(...r);if(n==null)return!1;let t=Array.isArray(n)?n:[n],a=o.stream==="error"?console.error:console.log;for(let g of t)a(` hint: ${g}`);return!0}function M(){p(i(),{force:!0})}function O(){p(l(),{force:!0})}function T(){return Array.from(d.entries()).map(([e,r])=>({id:e,frequency:r.frequency}))}s("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`sootsim wait ready\` first.`});s("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`sootsim wait selector ${e}`,stream:"error"});s("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(r=>` ${r}`)]:null,stream:"error"});s("describe-use-filters",{frequency:"once-per-identity",render:()=>["describe output is long. narrow it with:"," sootsim describe --only '*Bottom Sheet*'"," sootsim describe --testid-like 'swap-*'"," sootsim describe --subtree <testID>"]});s("describe-filter-context",{frequency:"once-per-identity",render:()=>["filtered describe is search output, not current-route proof.","run `sootsim describe` without filters after navigation; clipped nodes are marked `(clipped:...)`."]});s("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`sootsim find --testid ${e}\` to discover available ids.`,stream:"error"});export{k as a,M as b,O as c,T as d};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{execFileSync as p,spawn as l}from"child_process";import{existsSync as s}from"fs";import{homedir as u}from"os";import{join as d}from"path";var g=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","~/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","~/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","~/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","~/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Arc.app/Contents/MacOS/Arc","~/Applications/Arc.app/Contents/MacOS/Arc"],f=["/usr/bin/google-chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/microsoft-edge","/usr/bin/brave-browser","/snap/bin/chromium"],h=["C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe","C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"],C=["google-chrome","chromium","chromium-browser","microsoft-edge","brave-browser"],O=["chrome","msedge","brave"];function w(r){return r.startsWith("~/")?d(u(),r.slice(2)):r}function a(r){for(let n of r){let o=w(n);if(s(o))return o}return null}function U(r,n){try{let e=p(n==="win32"?"where":"which",[r],{encoding:"utf8",timeout:1500,stdio:["ignore","pipe","ignore"]}).trim();return e?e.split(/\r?\n/)[0]:null}catch{return null}}function M(r=process.platform){let n=process.env.CHROME_PATH||process.env.CHROMIUM_PATH;if(n&&s(n))return n;let o=a(r==="darwin"?g:r==="win32"?h:f);if(o)return o;let e=r==="win32"?O:C;for(let t of e){let i=U(t,r);if(i)return i}return null}function A(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform;return n.newWindow?c(r,{...n,platform:o,newWindow:!0}):o==="darwin"?{command:"open",args:n.background===!1?[r]:["-g",r],via:"system"}:o==="win32"?{command:"cmd",args:["/c","start","",r],via:"system"}:{command:"xdg-open",args:[r],via:"system"}}function c(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform,e="chromiumBinary"in n?n.chromiumBinary:M(o);if(!e)throw new Error("browser launch requires Chrome, Chromium, Edge, Brave, or Arc");let t=[];return n.newWindow!==!1&&t.push("--new-window"),t.push(r),{command:e,args:t,via:"chromium",target:e}}async function m(r,n,o){return new Promise((e,t)=>{let i=l(r,n,{detached:o,stdio:"ignore"});i.once("error",t),i.once("spawn",()=>{o&&i.unref(),e(i.pid)})})}async function x(r,n={}){let o=A(r,n),e=await m(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function y(r,n={}){let o=c(r,n),e=await m(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function E(r,n={}){await x(r,n)}export{M as a,x as b,y as c,E as d};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as p}from"./chunk-5OA35LZX.js";import{d as c,e as l}from"./chunk-OEV7EOMC.js";import{a}from"./chunk-SA5RP334.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as p}from"./chunk-QD5YATLL.js";import{d as c,e as l}from"./chunk-7AXDJ2RV.js";import{a}from"./chunk-VHPYIZ3U.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
3
3
  sootsim ${e} needs auth before it can check recording access.
4
4
 
5
5
  pick one:
@@ -1,12 +1,12 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as k,d as T,f as C}from"./chunk-SF6W3FRS.js";import{E as v,F as P}from"./chunk-4BXESMZ7.js";import{WebSocket as I}from"ws";function x(){let e=v();return e&&P(e)?e.bridgePort:7668}var w=class extends Error{lock;constructor(r,i){super(r),this.name="BridgeSimLockedError",this.lock=i}};function $(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function R(e,r={}){let i=new Set,a=r.port??x(),l=r.commandTimeoutMs??15e3,t,m="none",p=new Set(r.stripBooleanFlags??[]),b=new Set(r.stripValueFlags??[]);for(let n=0;n<e.length;n++){let d=e[n];if(d==="--port"||d==="-p"){i.add(n),n+1<e.length&&(i.add(n+1),a=Number(e[n+1])),n++;continue}if(d.startsWith("--port=")){i.add(n),a=Number(d.slice(7));continue}if(d==="--timeout"){i.add(n),n+1<e.length&&(i.add(n+1),l=Number(e[n+1])),n++;continue}if(d==="--sim"||d==="--session"||d==="--tab"){i.add(n),n+1<e.length&&(i.add(n+1),t=e[n+1]?.trim()||void 0,m="flag"),n++;continue}let s=d.startsWith("--sim=")?d.slice(6):d.startsWith("--session=")?d.slice(10):d.startsWith("--tab=")?d.slice(6):void 0;if(s!==void 0){i.add(n),t=s.trim()||void 0,m="flag";continue}if(p.has(d)){i.add(n);continue}b.has(d)&&(i.add(n),n+1<e.length&&i.add(n+1),n++)}if(!t){let n=T();n&&(t=n.trim()||void 0,m="saved")}return{positional:e.filter((n,d)=>!i.has(d)),wsPort:a,simId:t,simIdSource:m,commandTimeoutMs:l}}function E(e,r={}){let i=1,a=r.commandTimeoutMs??15e3,l=new Map,t=new I(`ws://localhost:${e}`),m=k(),p=new Promise((s,o)=>{t.on("open",()=>{try{t.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:m.key,cliIdentitySource:m.source,cliLabel:r.cliLabel}))}catch{}s()}),t.on("error",c=>{let g=c.message?`: ${c.message}`:"";o(new Error(`could not connect to ws://localhost:${e}${g}`))})}),b=!1,n=!1;function d(s,o){if(n||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||s.startsWith("bridge:")||s==="focus"||s==="close")return;n=!0;let c=o??"primary",g=$(o?r.simIdSource:"none");process.stderr.write(` \u2192 ${c} (${g})
3
- `)}return t.on("message",s=>{let o;try{o=JSON.parse(s.toString())}catch{return}if(o.id===0)return;let c=l.get(o.id);c&&(l.delete(o.id),o.i>0&&!b&&(b=!0,process.stderr.write(`
4
- \u26A0 ${o.i} other CLI identity/identities are driving this sim
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P,d as T,f as C}from"./chunk-366ZIBQX.js";import{E as k,F as v}from"./chunk-T2YYBRII.js";import{WebSocket as I}from"ws";function x(){let e=k();return e&&v(e)?e.bridgePort:7668}var w=class extends Error{lock;constructor(r,i){super(r),this.name="BridgeSimLockedError",this.lock=i}};function $(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function N(e,r={}){let i=new Set,a=r.port??x(),l=r.commandTimeoutMs??15e3,t,m="none",h=new Set(r.stripBooleanFlags??[]),b=new Set(r.stripValueFlags??[]);for(let n=0;n<e.length;n++){let d=e[n];if(d==="--port"||d==="-p"){i.add(n),n+1<e.length&&(i.add(n+1),a=Number(e[n+1])),n++;continue}if(d.startsWith("--port=")){i.add(n),a=Number(d.slice(7));continue}if(d==="--timeout"){i.add(n),n+1<e.length&&(i.add(n+1),l=Number(e[n+1])),n++;continue}if(d==="--sim"||d==="--session"||d==="--tab"){i.add(n),n+1<e.length&&(i.add(n+1),t=e[n+1]?.trim()||void 0,m="flag"),n++;continue}let s=d.startsWith("--sim=")?d.slice(6):d.startsWith("--session=")?d.slice(10):d.startsWith("--tab=")?d.slice(6):void 0;if(s!==void 0){i.add(n),t=s.trim()||void 0,m="flag";continue}if(h.has(d)){i.add(n);continue}b.has(d)&&(i.add(n),n+1<e.length&&i.add(n+1),n++)}if(!t){let n=T();n&&(t=n.trim()||void 0,m="saved")}return{positional:e.filter((n,d)=>!i.has(d)),wsPort:a,simId:t,simIdSource:m,commandTimeoutMs:l}}function E(e,r={}){let i=1,a=r.commandTimeoutMs??15e3,l=new Map,t=new I(`ws://localhost:${e}`),m=P(),h=new Promise((s,o)=>{t.on("open",()=>{try{t.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:m.key,cliIdentitySource:m.source,cliLabel:r.cliLabel}))}catch{}s()}),t.on("error",c=>{let g=c.message?`: ${c.message}`:"";o(new Error(`could not connect to ws://localhost:${e}${g}`))})}),b=!1,n=!1;function d(s,o){if(n||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||s.startsWith("bridge:")||s==="focus"||s==="close")return;n=!0;let c=o??"primary",g=$(o?r.simIdSource:"none");process.stderr.write(` \u2192 ${c} (${g})
3
+ `)}return t.on("message",s=>{let o;try{o=JSON.parse(s.toString())}catch{return}if(o.id===0)return;let c=l.get(o.id);c&&(l.delete(o.id),o._otherCliCount>0&&!b&&(b=!0,process.stderr.write(`
4
+ \u26A0 ${o._otherCliCount} other CLI identity/identities are driving this sim
5
5
  taps, scrolls, and keyboard input from multiple agents will collide on
6
6
  the same screen state (this is not a bridge throughput limit).
7
7
  use \`sootsim open --new\` for an isolated sim per agent.
8
8
 
9
- `)),o.error?o.o?c.reject(new w(o.error,o.o)):c.reject(new Error(o.error)):c.resolve(o.result))}),t.on("close",(s,o)=>{let c=o?.toString()||"connection closed";for(let[g,u]of l)l.delete(g),u.reject(new Error(`sim disconnected: ${c} (code ${s})`))}),{async send(s,o){let c=o?.timeoutMs??a,g=async u=>{await p;let f=i++;return new Promise((A,S)=>{let B=setTimeout(()=>{l.delete(f),S(new Error(`command timed out after ${Math.round(c/1e3)}s`))},c);l.set(f,{resolve:h=>{clearTimeout(B),A(h)},reject:h=>{clearTimeout(B),S(h)}});let y={...s,id:f};y.simId===void 0&&u&&(y.simId=u),d(s.type??"",y.simId),t.send(JSON.stringify(y))})};try{return await g(r.simId)}catch(u){let f=u instanceof Error?u.message:String(u);throw r.simIdSource==="saved"&&r.simId&&s.simId===void 0&&f===`no sim connected with id ${r.simId}`?(C(),new Error(`saved sim ${r.simId} is gone; run \`sootsim list\` and \`sootsim use <sim>\`, or open a fresh sim`)):u}},async listSims(){let s=await this.send({type:"bridge:list-sims"});return Array.isArray(s)?s:[]},async openUrl(s,o={}){return this.send({type:"bridge:open",url:s,newWindow:o.newWindow===!0})},async focusSim(s){return this.send({type:"focus",simId:s})},async closeSim(s){return this.send({type:"close",simId:s})},async claim(s,o={}){return await this.send({type:"bridge:claim",simId:s,force:o.force===!0})},close(){try{t.readyState===I.OPEN&&t.send(JSON.stringify({type:"bridge:bye",id:0}))}catch{}t.close();let s=setTimeout(()=>{t.readyState!==I.CLOSED&&t.terminate()},250)}}}function V(e){return E(e.wsPort,{commandTimeoutMs:e.commandTimeoutMs,simId:e.simId,simIdSource:e.simIdSource})}function F(e,r){let i=e.filter(t=>t.readyState==="open"&&t.id!==r),a=i.find(t=>t.userFocused)??i.find(t=>t.userVisible===!0&&t.isPrimary)??i.find(t=>t.userVisible===!0)??i.find(t=>t.isPrimary);if(!a)return null;let l=[a.isPrimary?"primary":null,a.userVisible===!1?"hidden":a.userVisible===!0?"visible":null,a.userFocused?"focused":null].filter(Boolean);return`${a.id}${l.length?` [${l.join(", ")}]`:""}`}async function _(e){try{let r=await e.send({type:"evaluate",code:`(() => ({
9
+ `)),o.error?o._locked?c.reject(new w(o.error,o._locked)):c.reject(new Error(o.error)):c.resolve(o.result))}),t.on("close",(s,o)=>{let c=o?.toString()||"connection closed";for(let[g,u]of l)l.delete(g),u.reject(new Error(`sim disconnected: ${c} (code ${s})`))}),{async send(s,o){let c=o?.timeoutMs??a,g=async u=>{await h;let f=i++;return new Promise((A,S)=>{let B=setTimeout(()=>{l.delete(f),S(new Error(`command timed out after ${Math.round(c/1e3)}s`))},c);l.set(f,{resolve:p=>{clearTimeout(B),A(p)},reject:p=>{clearTimeout(B),S(p)}});let y={...s,id:f};y.simId===void 0&&u&&(y.simId=u),d(s.type??"",y.simId),t.send(JSON.stringify(y))})};try{return await g(r.simId)}catch(u){let f=u instanceof Error?u.message:String(u);throw r.simIdSource==="saved"&&r.simId&&s.simId===void 0&&f===`no sim connected with id ${r.simId}`?(C(),new Error(`saved sim ${r.simId} is gone; run \`sootsim list\` and \`sootsim use <sim>\`, or open a fresh sim`)):u}},async listSims(){let s=await this.send({type:"bridge:list-sims"});return Array.isArray(s)?s:[]},async openUrl(s,o={}){return this.send({type:"bridge:open",url:s,newWindow:o.newWindow===!0})},async focusSim(s){return this.send({type:"focus",simId:s})},async closeSim(s){return this.send({type:"close",simId:s})},async claim(s,o={}){return await this.send({type:"bridge:claim",simId:s,force:o.force===!0})},close(){try{t.readyState===I.OPEN&&t.send(JSON.stringify({type:"bridge:bye",id:0}))}catch{}t.close();let s=setTimeout(()=>{t.readyState!==I.CLOSED&&t.terminate()},250)}}}function R(e){return E(e.wsPort,{commandTimeoutMs:e.commandTimeoutMs,simId:e.simId,simIdSource:e.simIdSource})}function F(e,r){let i=e.filter(t=>t.readyState==="open"&&t.id!==r),a=i.find(t=>t.userFocused)??i.find(t=>t.userVisible===!0&&t.isPrimary)??i.find(t=>t.userVisible===!0)??i.find(t=>t.isPrimary);if(!a)return null;let l=[a.isPrimary?"primary":null,a.userVisible===!1?"hidden":a.userVisible===!0?"visible":null,a.userFocused?"focused":null].filter(Boolean);return`${a.id}${l.length?` [${l.join(", ")}]`:""}`}async function V(e){try{let r=await e.send({type:"evaluate",code:`(() => ({
10
10
  hidden: document.hidden,
11
11
  visibilityState: document.visibilityState,
12
12
  hasFocus: typeof document.hasFocus === 'function' ? document.hasFocus() : null,
@@ -20,4 +20,4 @@ import{a as k,d as T,f as C}from"./chunk-SF6W3FRS.js";import{E as v,F as P}from"
20
20
  `+(l?` another open sim looks usable: ${l}; target it with --sim.
21
21
  `:" run `sootsim list` to find the visible sim and target it with --sim.\n")+` page-level window.focus() cannot unhide a browser tab.
22
22
 
23
- `),{hidden:!0,warned:!0,simId:i.simId}}return{hidden:!1,warned:!1,simId:i.simId}}catch{return{hidden:!1,warned:!1}}}async function j(e,r,i={}){let a={type:"evaluate",code:r};return i.acquireLock&&(a.acquireLock=!0),e.send(a)}async function D(e,r,...i){return e.send({type:"call",path:r,args:i})}async function q(e,r,...i){return e.send({type:"call",path:r,args:i,acquireLock:!0})}export{x as a,w as b,R as c,E as d,V as e,_ as f,j as g,D as h,q as i};
23
+ `),{hidden:!0,warned:!0,simId:i.simId}}return{hidden:!1,warned:!1,simId:i.simId}}catch{return{hidden:!1,warned:!1}}}async function j(e,r,i={}){let a={type:"evaluate",code:r};return i.acquireLock&&(a.acquireLock=!0),e.send(a)}async function D(e,r,...i){return e.send({type:"call",path:r,args:i})}async function q(e,r,...i){return e.send({type:"call",path:r,args:i,acquireLock:!0})}export{x as a,w as b,N as c,E as d,R as e,V as f,j as g,D as h,q as i};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ var t="http://localhost:5173/";export{t as a};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{readFileSync as i}from"node:fs";import{fileURLToPath as e}from"node:url";var r=null;function l(){if(r!=null)return r;let o=[()=>e(import.meta.resolve("sootsim/package.json")),()=>e(new URL("../package.json",import.meta.url))];for(let n of o)try{let t=JSON.parse(i(n(),"utf8")).version;if(typeof t=="string"&&t)return r=t,r}catch{}return r="0.0.0",r}export{l as a};
@@ -0,0 +1 @@
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as u}from"./chunk-X4LYRBLZ.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+28,d=o?t.height+h+x:t.height+28,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:14),B=o?h:14,H=o?S:t.cornerRadius+14,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as u}from"./chunk-6PKYLQ36.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+28,d=o?t.height+h+x:t.height+28,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:14),B=o?h:14,H=o?S:t.cornerRadius+14,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
3
3
  <div
4
4
  aria-hidden="true"
5
5
  style="
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{l as P,n as a,y as m}from"./chunk-4BXESMZ7.js";import l from"fs";import c from"path";var s="default",S="profiles.json",i=1;function o(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function d(){return c.join(a(),S)}function I(e){return`sootsim-profile-${o(e)}`}function h(e){return c.join(P(),"Partitions",I(e))}function A(e){return c.join(a(),"playwright",o(e))}function u(){try{let e=JSON.parse(l.readFileSync(d(),"utf8"));if(!e||e.version!==i)return{version:i,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:o(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:i,profiles:r}}catch{return{version:i,profiles:[]}}}function x(e){return[...e].sort((r,t)=>r.id===s?-1:t.id===s?1:r.id.localeCompare(t.id))}function p(e){if(e.profiles.some(t=>t.id===s))return{...e,profiles:x(e.profiles)};let r=new Date().toISOString();return{version:i,profiles:x([{id:s,createdAt:r,updatedAt:r},...e.profiles])}}function g(e){m();let r=p(e),t=`${d()}.tmp`;return l.writeFileSync(t,`${JSON.stringify(r,null,2)}
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{l as P,n as a,y as m}from"./chunk-T2YYBRII.js";import l from"fs";import c from"path";var s="default",S="profiles.json",i=1;function o(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function d(){return c.join(a(),S)}function I(e){return`sootsim-profile-${o(e)}`}function h(e){return c.join(P(),"Partitions",I(e))}function A(e){return c.join(a(),"playwright",o(e))}function u(){try{let e=JSON.parse(l.readFileSync(d(),"utf8"));if(!e||e.version!==i)return{version:i,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:o(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:i,profiles:r}}catch{return{version:i,profiles:[]}}}function x(e){return[...e].sort((r,t)=>r.id===s?-1:t.id===s?1:r.id.localeCompare(t.id))}function p(e){if(e.profiles.some(t=>t.id===s))return{...e,profiles:x(e.profiles)};let r=new Date().toISOString();return{version:i,profiles:x([{id:s,createdAt:r,updatedAt:r},...e.profiles])}}function g(e){m();let r=p(e),t=`${d()}.tmp`;return l.writeFileSync(t,`${JSON.stringify(r,null,2)}
3
3
  `,"utf8"),l.renameSync(t,d()),r}function y(){return g(u()).profiles}function E(e){let r=o(e);return y().find(t=>t.id===r)??null}function _(e=s){let r=o(e),t=E(r);return t||D(r)}function D(e){let r=o(e),t=p(u());if(t.profiles.some(w=>w.id===r))throw new Error(`profile already exists: ${r}`);let f=new Date().toISOString(),n={id:r,createdAt:f,updatedAt:f};return g({version:i,profiles:[...t.profiles,n]}),n}function F(e){let r=o(e);if(r===s)throw new Error("the default profile cannot be deleted; clear it instead");let t=p(u()),f=t.profiles.find(n=>n.id===r);if(!f)throw new Error(`profile not found: ${r}`);return g({version:i,profiles:t.profiles.filter(n=>n.id!==r)}),v(r),f}function v(e){let r=o(e);for(let t of[h(r),A(r)])try{l.rmSync(t,{recursive:!0,force:!0})}catch{}}export{A as a,y as b,_ as c,D as d,F as e,v as f};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as ue,e as de,f as pe}from"./chunk-OEV7EOMC.js";import{d as ce}from"./chunk-4UQMPWDA.js";import{c as ae,e as le,g as P}from"./chunk-NQ4EDJV4.js";import{d as ie}from"./chunk-VSRV5LFU.js";import{a as se,b as T}from"./chunk-OBYYAT4F.js";import{a as oe}from"./chunk-SA5RP334.js";import{createHash as He}from"crypto";import{readFileSync as K}from"fs";import{gzipSync as Ce}from"zlib";function fe(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}import{brotliCompressSync as Le,constants as Ee}from"node:zlib";var ke=9;function ge(e){return Le(e,{params:{[Ee.BROTLI_PARAM_QUALITY]:ke}})}function G(e,t){let r=new AbortController,o=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(o)}}async function Ae(e){let t=G(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let o=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${o.slice(0,200)}`)}}async function Fe(e,t=8,r){let o=0,i=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;o<a;){let c=e[o++];await Ae(c),i++,r?.(i,a)}}))}function ze(e,t,r,o){let i=[];i.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let a of e.files){let c=r.get(a.urlhash);c&&i.push({url:a.putUrl,contentType:a.contentType,bytes:c})}e.events&&o?.eventsBytes&&i.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:o.eventsBytes}),e.flowVideo&&o?.videoBytes&&i.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:o.videoBytes}),e.storage&&o?.storageBytes&&i.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:o.storageBytes});for(let a of e.snapshots??[]){let c=o?.snapshotBytes?.get(a.id);c&&i.push({url:a.putUrl,contentType:a.contentType,bytes:c})}return i}function Me(e){return e.replace(/\/+$/,"")}var F=class extends Error{constructor(r,o,i,a=""){super(r);this.status=o;this.phase=i;this.responseText=a;this.name="PresignedUploadError"}};async function he(e){let t=Me(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let o=G(3e4,"init"),i;try{i=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:o.signal})}finally{o.cancel()}if(!i.ok){let p=await i.text().catch(()=>"");throw new F(`init failed: ${i.status} ${p.slice(0,200)}`,i.status,"init",p)}let a=await i.json(),c=ze(a,e.bundleBytes,e.filesByHash,e.extras);await Fe(c,e.concurrency??8,e.onPutProgress);let y=G(3e4,"finalize"),u;try{u=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:y.signal})}finally{y.cancel()}if(!u.ok){let p=await u.text().catch(()=>"");throw new F(`finalize failed: ${u.status} ${p.slice(0,200)}`,u.status,"finalize",p)}let S=await u.json();return{init:a,finalize:S}}function Ne(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}var be=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",ve=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",J="http://localhost:3000",We=2e3;async function qe(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${J}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(We)});if(t.ok||t.status===204||t.status===405)return J}catch{}return be}function x(e){return e.replace(/\/$/,"")}function De(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function Ve(e){try{let t=new URL(e).hostname.toLowerCase();return t==="sootbean.com"||t.endsWith(".sootbean.com")}catch{return!1}}function Ge(e,t){return t?x(t):process.env.SOOTSIM_PREVIEW_ORIGIN?x(process.env.SOOTSIM_PREVIEW_ORIGIN):De(e)?x(e):Ve(e)?x(ve):x(e)}function Ke(){console.log(`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as ue,e as de,f as pe}from"./chunk-7AXDJ2RV.js";import{d as ce}from"./chunk-SUQAFFJO.js";import{c as ae,e as le,g as P}from"./chunk-J27RHTWH.js";import{d as ie}from"./chunk-IRSVHE5W.js";import{a as se,b as T}from"./chunk-3BCXNVBN.js";import{a as oe}from"./chunk-VHPYIZ3U.js";import{createHash as He}from"crypto";import{readFileSync as K}from"fs";import{gzipSync as Ce}from"zlib";function fe(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}import{brotliCompressSync as Le,constants as Ee}from"node:zlib";var ke=9;function ge(e){return Le(e,{params:{[Ee.BROTLI_PARAM_QUALITY]:ke}})}function G(e,t){let r=new AbortController,o=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(o)}}async function Ae(e){let t=G(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let o=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${o.slice(0,200)}`)}}async function Fe(e,t=8,r){let o=0,i=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;o<a;){let c=e[o++];await Ae(c),i++,r?.(i,a)}}))}function ze(e,t,r,o){let i=[];i.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let a of e.files){let c=r.get(a.urlhash);c&&i.push({url:a.putUrl,contentType:a.contentType,bytes:c})}e.events&&o?.eventsBytes&&i.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:o.eventsBytes}),e.flowVideo&&o?.videoBytes&&i.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:o.videoBytes}),e.storage&&o?.storageBytes&&i.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:o.storageBytes});for(let a of e.snapshots??[]){let c=o?.snapshotBytes?.get(a.id);c&&i.push({url:a.putUrl,contentType:a.contentType,bytes:c})}return i}function Me(e){return e.replace(/\/+$/,"")}var F=class extends Error{constructor(r,o,i,a=""){super(r);this.status=o;this.phase=i;this.responseText=a;this.name="PresignedUploadError"}};async function he(e){let t=Me(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let o=G(3e4,"init"),i;try{i=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:o.signal})}finally{o.cancel()}if(!i.ok){let p=await i.text().catch(()=>"");throw new F(`init failed: ${i.status} ${p.slice(0,200)}`,i.status,"init",p)}let a=await i.json(),c=ze(a,e.bundleBytes,e.filesByHash,e.extras);await Fe(c,e.concurrency??8,e.onPutProgress);let y=G(3e4,"finalize"),u;try{u=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:y.signal})}finally{y.cancel()}if(!u.ok){let p=await u.text().catch(()=>"");throw new F(`finalize failed: ${u.status} ${p.slice(0,200)}`,u.status,"finalize",p)}let S=await u.json();return{init:a,finalize:S}}function Ne(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}var be=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",ve=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",J="http://localhost:3000",We=2e3;async function qe(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${J}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(We)});if(t.ok||t.status===204||t.status===405)return J}catch{}return be}function x(e){return e.replace(/\/$/,"")}function De(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function Ve(e){try{let t=new URL(e).hostname.toLowerCase();return t==="sootbean.com"||t.endsWith(".sootbean.com")}catch{return!1}}function Ge(e,t){return t?x(t):process.env.SOOTSIM_PREVIEW_ORIGIN?x(process.env.SOOTSIM_PREVIEW_ORIGIN):De(e)?x(e):Ve(e)?x(ve):x(e)}function Ke(){console.log(`
3
3
  sootsim upload \u2014 publish the current recorded bundle as a /preview/<id> link
4
4
 
5
5
  usage:
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  function N(t,e){let n=["--max-ms","--maxMs","--maxms","--max_ms"];for(let r of n){let s=t.indexOf(r);if(s>=0&&t[s+1]){let o=Number(t[s+1]);if(Number.isFinite(o))return Math.max(100,o)}}return e}var f=new Set(["tap","double-tap","tap-text","tap-id","long-press","touch"]);function h(t){return typeof t=="string"&&f.has(t)}async function w(t){return await t.send({type:"evaluate",code:"window.__sootsimEngineState?.inspectActive === true"})===!0}async function D(t,e){if(!h(e))return!1;try{return await w(t)}catch{return!1}}async function M(t){let e=await t.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof e=="number"?e:0}}async function H(t,e=5){let n=await t.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${e}))()`});return{depth:e,tree:n}}async function O(t){let e=await t.send({type:"evaluate",code:"window.location.href"});return{url:typeof e=="string"?e:""}}async function B(t,e){let n=`(async () => {
3
3
  const t = window.__sootsimTest
4
4
  const mainShell = window.SootSim?.bridges?.mainShell
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as l}from"./chunk-NQ4EDJV4.js";import{E as c,F as m,g as p,i as h,z as w}from"./chunk-4BXESMZ7.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-5MJPHLRZ.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await u(t,250)||await u(t,1500))return;let n=c();if(n&&m(n)){if(n.bootstrapping===!0&&(await b(e),await u(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as l}from"./chunk-J27RHTWH.js";import{E as c,F as m,g as p,i as h,z as w}from"./chunk-T2YYBRII.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-OQQOJSTS.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await u(t,250)||await u(t,1500))return;let n=c();if(n&&m(n)){if(n.bootstrapping===!0&&(await b(e),await u(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
3
3
  dev checkouts skip the auto-install of the persistent launchd / systemd
4
4
  agent. start the daemon manually in another shell with:
5
5
  bun sootsim server
6
- (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-NDO6JPDH.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
6
+ (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-TMW3WV27.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
7
7
  if this keeps failing, run \`sootsim daemon uninstall\` and retry, or run \`sootsim server\` in a persistent shell as a workaround.`)}console.log(" waiting for runtime to come online...");let i=process.platform==="darwin"?B():null;try{await b(e);let r=Date.now()+5e3;for(;Date.now()<r;){if(await u(t,500))return;await new Promise(s=>setTimeout(s,200))}throw new Error(`daemon registered but the bridge never bound on port ${t} \u2014 see ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}finally{i?.stop()}}async function C(t=l()){await L(),await $(t)}function x(t){for(let e=0;e<t.length;e++){let n=t[e];if((n==="--port"||n==="-p")&&t[e+1]){let o=Number(t[e+1]);return Number.isFinite(o)?o:void 0}if(n.startsWith("--port=")){let o=Number(n.slice(7));return Number.isFinite(o)?o:void 0}}}function u(t,e){return new Promise(n=>{let o=new D(`ws://127.0.0.1:${t}`,{handshakeTimeout:e}),i=!1,r=s=>{if(!i){i=!0;try{o.close()}catch{}n(s)}};o.once("open",()=>r(!0)),o.once("error",()=>r(!1)),setTimeout(()=>r(!1),e)})}async function b(t){let e=Date.now()+t,n;for(;Date.now()<e;){let o=c();if(o&&m(o)){if(o.bootstrapping!==!0)return;o.bootstrapping!==n&&(n=o.bootstrapping)}await new Promise(i=>setTimeout(i,250))}throw new Error(`daemon did not finish bootstrapping within ${Math.round(t/1e3)}s \u2014 check ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}function d(){return T(k(),"Library/Logs/sootsim/server.err.log")}function B(){let t=d(),e=0;try{f(t)&&(e=g(t).size)}catch{}let n=!1,o=()=>{if(!n){try{if(f(t)){let i=g(t).size;if(i>e){let r=Buffer.alloc(i-e),s=P(t,"r");try{S(s,r,0,r.length,e)}finally{v(s)}e=i;for(let y of r.toString("utf8").split(/\r?\n/)){let a=y.trim();a&&(a.startsWith("sootsim:")||a.startsWith("sootsim "))&&console.log(` ${a}`)}}else i<e&&(e=i)}}catch{}setTimeout(o,250)}};return o(),{stop:()=>{n=!0}}}export{L as a,I as b,$ as c,C as d};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{execFileSync as h,spawn as g}from"child_process";import{existsSync as s,readdirSync as k}from"fs";import{dirname as m,join as l,resolve as a}from"path";import{fileURLToPath as v}from"url";var c;function p(){if(c!==void 0)return c;try{c=m(v(import.meta.resolve("sootsim-engine/package.json")))}catch{c=null}return c}var I="dev.sootsim.simulator";function x(){let n=p();if(!n)return null;let e=l(n,"dist-electron/main.cjs");if(!s(e))return null;let i=D(n);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:n}:null}function b(){let n=p();return n?s(l(n,"src-electron/main.ts")):!1}function D(n){let e=n;for(let i=0;i<6;i++){let t=l(e,"node_modules/.bin/electron");if(s(t))return t;let r=m(e);if(r===e)break;e=r}return null}function C(){let n=p(),i=["/Applications/sootsim.app",a(process.env.HOME||"","Applications/sootsim.app"),...n?[a(n,"app/sootsim.app")]:[]].find(t=>s(t));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let t=h("mdfind",[`kMDItemCFBundleIdentifier == "${I}"`],{encoding:"utf8",timeout:3e3}).trim();if(t)return{path:t.split(`
3
3
  `)[0],platform:"darwin",kind:"mac-app"}}catch{}return null}function f(n){if(!s(n))return null;let e=k(n).filter(i=>i.startsWith("sootsim")&&i.endsWith(".AppImage")).sort().reverse()[0];return e?l(n,e):null}function w(){let n=p(),i=[a(process.env.HOME||"","Applications/sootsim.AppImage"),a(process.env.HOME||"",".local/bin/sootsim.AppImage"),"/opt/sootsim/sootsim.AppImage","/opt/sootsim/sootsim",...n?[a(n,"app/sootsim.AppImage"),a(n,"release/linux-unpacked/sootsim")]:[]].find(r=>s(r));if(i)return{path:i,platform:"linux",kind:i.endsWith(".AppImage")?"linux-appimage":"linux-binary"};let t=n?f(a(n,"app"))||f(a(n,"release")):null;return t?{path:t,platform:"linux",kind:"linux-appimage"}:null}function A(){let n=x();if(n)return n;if(b()){let e=p(),i=l(e,"dist-electron/main.cjs");return s(i)?console.error(` no node_modules/.bin/electron found near ${e}. run \`bun install\`.`):console.error(` dist-electron/main.cjs missing in ${e}.
4
4
  run: bun run --cwd packages/sootsim-engine build:electron-main
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as i,e as d,h as c}from"./chunk-NQ4EDJV4.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as i,e as d,h as c}from"./chunk-J27RHTWH.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
3
3
  const modeKey = ${JSON.stringify(t.modeKey)}
4
4
  const target = ${JSON.stringify(o)}
5
5
  window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{createHash as F}from"node:crypto";import y from"node:fs";import{createRequire as j}from"node:module";import l from"node:path";var w=j(import.meta.url);function A(n){try{let t=new URL(n),e=t.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(e==="localhost"||e.endsWith(".localhost")||e==="0.0.0.0"||e==="::1"||/^127(?:\.\d{1,3}){3}$/.test(e))return t.origin}catch{}return null}var R=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"];function x(n){for(let t of R)try{if(y.statSync(l.join(n,t)).isFile())return!0}catch{}return!1}var k=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","examples","example"]);function b(n,t){x(n)&&t.push(n);let e;try{e=y.readdirSync(n,{withFileTypes:!0})}catch{return}for(let o of e)o.isDirectory()&&(o.name.startsWith(".")||k.has(o.name)||b(l.join(n,o.name),t))}function S(n){try{return y.statSync(l.join(n,"package.json")).isFile()}catch{return!1}}function _(n,t,e){if(!t||typeof t!="object")return;let o=t[e];if(!o||typeof o!="object")return;let r=o.fonts;if(Array.isArray(r))for(let i of r){if(typeof i=="string"){n.push(i);continue}if(!i||typeof i!="object")continue;let f=i.fontDefinitions;if(Array.isArray(f))for(let c of f){if(!c||typeof c!="object")continue;let u=c.path;typeof u=="string"&&n.push(u)}}}function T(n){let t=A(n.bundleUrl);if(!t)return[];let e=n.repoDir||process.env.SOOT_REPO_DIR,o=e?l.resolve(e):process.cwd();if(!e&&!S(o))return[];let r=[];if(e)b(o,r),r.includes(o)||r.push(o);else{if(!x(o))return[];r.push(o)}if(r.length===0)return[];let i=(n.platform||process.env.SOOT_PLATFORM||"ios").toLowerCase(),f=null;try{let a=w.resolve("@expo/config",{paths:[...r,o]}),s=w(a);typeof s.getConfig=="function"&&(f=s.getConfig)}catch{}if(!f)return[];let c;for(let a of r)try{let s=f(a,{skipSDKVersionRequirement:!0});if(s?.exp&&typeof s.exp=="object"){let p=s.exp.plugins;if(Array.isArray(p)){c=s.exp;break}}}catch{}if(!c||typeof c!="object")return[];let u=c.plugins;if(!Array.isArray(u))return[];let g=[];for(let a of u){let s=Array.isArray(a)?a[0]:a;if(typeof s!="string"||!/(^|\/)expo-font$/.test(s))continue;let p=Array.isArray(a)?a[1]||{}:{};if(!p||typeof p!="object")continue;let m=p.fonts;Array.isArray(m)&&g.push(...m.filter(C=>typeof C=="string")),_(g,p,i)}let h=new Set,d=[];for(let a of g){let s=a.replace(/^\.\//,"").replace(/^\/+/,"");!s||h.has(s)||(h.add(s),/\.(ttf|otf|woff|woff2)$/i.test(s)&&d.push({family:l.basename(s).replace(/\.(ttf|otf|woff|woff2)$/i,""),url:`${t}/assets/${s}`}))}return d}async function U(n,t){let e=A(n);if(!e)return null;let o=new AbortController,r=setTimeout(()=>o.abort(),t?.timeoutMs??1500);try{let i=await fetch(`${e}/`,{headers:{"expo-platform":"ios",Accept:"application/json"},signal:o.signal});if(!i.ok)return null;let c=(await i.json())?.extra?.expoClient?.c?.projectRoot;return typeof c=="string"&&c.length>0?c:null}catch{return null}finally{clearTimeout(r)}}function L(n){return n.map(t=>`${encodeURIComponent(t.url)}::${encodeURIComponent(t.family)}`).join(",")}function D(n){let t=[];for(let e of n.split(",")){let o=e.trim();if(!o)continue;let r=o.indexOf("::"),i=r===-1?o:o.slice(0,r);try{t.push(decodeURIComponent(i))}catch{t.push(i)}}return t.filter(Boolean)}function P(n){let t=(n.split("?")[0].split(".").pop()||"").toLowerCase();return t==="ttf"?"font/ttf":t==="otf"?"font/otf":t==="woff"?"font/woff":t==="woff2"?"font/woff2":"application/octet-stream"}async function I(n,t){let e=[],o=new Set;for(let r of D(n)){let i=F("sha256").update(r).digest("hex");if(!o.has(i)){o.add(i);try{let f=await fetch(r);if(!f.ok){t?.onError?.(r,new Error(`${f.status} ${f.statusText}`));continue}let c=new Uint8Array(await f.arrayBuffer());e.push({url:r,urlhash:i,contentType:P(r),bytes:c}),t?.onStaged?.({url:r,byteLength:c.byteLength})}catch(f){t?.onError?.(r,f)}}}return e}export{T as a,U as b,L as c,I as d};
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{createHash as F}from"node:crypto";import y from"node:fs";import{createRequire as j}from"node:module";import l from"node:path";var w=j(import.meta.url);function A(n){try{let t=new URL(n),e=t.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(e==="localhost"||e.endsWith(".localhost")||e==="0.0.0.0"||e==="::1"||/^127(?:\.\d{1,3}){3}$/.test(e))return t.origin}catch{}return null}var R=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"];function x(n){for(let t of R)try{if(y.statSync(l.join(n,t)).isFile())return!0}catch{}return!1}var k=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","examples","example"]);function b(n,t){x(n)&&t.push(n);let e;try{e=y.readdirSync(n,{withFileTypes:!0})}catch{return}for(let o of e)o.isDirectory()&&(o.name.startsWith(".")||k.has(o.name)||b(l.join(n,o.name),t))}function S(n){try{return y.statSync(l.join(n,"package.json")).isFile()}catch{return!1}}function _(n,t,e){if(!t||typeof t!="object")return;let o=t[e];if(!o||typeof o!="object")return;let r=o.fonts;if(Array.isArray(r))for(let i of r){if(typeof i=="string"){n.push(i);continue}if(!i||typeof i!="object")continue;let f=i.fontDefinitions;if(Array.isArray(f))for(let c of f){if(!c||typeof c!="object")continue;let u=c.path;typeof u=="string"&&n.push(u)}}}function T(n){let t=A(n.bundleUrl);if(!t)return[];let e=n.repoDir||process.env.SOOT_REPO_DIR,o=e?l.resolve(e):process.cwd();if(!e&&!S(o))return[];let r=[];if(e)b(o,r),r.includes(o)||r.push(o);else{if(!x(o))return[];r.push(o)}if(r.length===0)return[];let i=(n.platform||process.env.SOOT_PLATFORM||"ios").toLowerCase(),f=null;try{let a=w.resolve("@expo/config",{paths:[...r,o]}),s=w(a);typeof s.getConfig=="function"&&(f=s.getConfig)}catch{}if(!f)return[];let c;for(let a of r)try{let s=f(a,{skipSDKVersionRequirement:!0});if(s?.exp&&typeof s.exp=="object"){let p=s.exp.plugins;if(Array.isArray(p)){c=s.exp;break}}}catch{}if(!c||typeof c!="object")return[];let u=c.plugins;if(!Array.isArray(u))return[];let g=[];for(let a of u){let s=Array.isArray(a)?a[0]:a;if(typeof s!="string"||!/(^|\/)expo-font$/.test(s))continue;let p=Array.isArray(a)?a[1]||{}:{};if(!p||typeof p!="object")continue;let m=p.fonts;Array.isArray(m)&&g.push(...m.filter(C=>typeof C=="string")),_(g,p,i)}let h=new Set,d=[];for(let a of g){let s=a.replace(/^\.\//,"").replace(/^\/+/,"");!s||h.has(s)||(h.add(s),/\.(ttf|otf|woff|woff2)$/i.test(s)&&d.push({family:l.basename(s).replace(/\.(ttf|otf|woff|woff2)$/i,""),url:`${t}/assets/${s}`}))}return d}async function U(n,t){let e=A(n);if(!e)return null;let o=new AbortController,r=setTimeout(()=>o.abort(),t?.timeoutMs??1500);try{let i=await fetch(`${e}/`,{headers:{"expo-platform":"ios",Accept:"application/json"},signal:o.signal});if(!i.ok)return null;let c=(await i.json())?.extra?.expoClient?._internal?.projectRoot;return typeof c=="string"&&c.length>0?c:null}catch{return null}finally{clearTimeout(r)}}function L(n){return n.map(t=>`${encodeURIComponent(t.url)}::${encodeURIComponent(t.family)}`).join(",")}function D(n){let t=[];for(let e of n.split(",")){let o=e.trim();if(!o)continue;let r=o.indexOf("::"),i=r===-1?o:o.slice(0,r);try{t.push(decodeURIComponent(i))}catch{t.push(i)}}return t.filter(Boolean)}function P(n){let t=(n.split("?")[0].split(".").pop()||"").toLowerCase();return t==="ttf"?"font/ttf":t==="otf"?"font/otf":t==="woff"?"font/woff":t==="woff2"?"font/woff2":"application/octet-stream"}async function I(n,t){let e=[],o=new Set;for(let r of D(n)){let i=F("sha256").update(r).digest("hex");if(!o.has(i)){o.add(i);try{let f=await fetch(r);if(!f.ok){t?.onError?.(r,new Error(`${f.status} ${f.statusText}`));continue}let c=new Uint8Array(await f.arrayBuffer());e.push({url:r,urlhash:i,contentType:P(r),bytes:c}),t?.onStaged?.({url:r,byteLength:c.byteLength})}catch(f){t?.onError?.(r,f)}}}return e}export{T as a,U as b,L as c,I as d};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import r from"node:fs";import{homedir as O}from"node:os";import n from"node:path";var L="SOOTSIM_HOME",E="active",A="daemon.json",j="config.json",I=3e4;function c(){let e=process.env[L];return e&&e.length>0?n.resolve(e):n.join(O(),".sootsim")}function K(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return r.realpathSync(t).includes(`${n.sep}packages${n.sep}sootsim${n.sep}`)}catch{return!1}}function f(){return n.join(c(),"runtimes")}function _(e){return n.join(f(),e)}function D(){return n.join(f(),E)}function S(){return n.join(c(),"electron")}function U(){return n.join(S(),"userData")}function Y(e){return n.join(S(),e)}function N(){return n.join(c(),"profiles")}function F(){return n.join(c(),"daemon-app")}function T(){return n.join(F(),"SootSim Daemon.app")}function G(){return n.join(T(),"Contents","MacOS","sootsim-daemon")}function C(){return n.join(c(),"cache")}function p(){return n.join(c(),A)}function d(){return n.join(c(),j)}function v(){try{let e=r.readFileSync(d(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function M(e){y();let t=v(),s={...t,...e};e.settings&&typeof e.settings=="object"&&(s.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let u=`${d()}.tmp`;return r.writeFileSync(u,`${JSON.stringify(s,null,2)}
3
3
  `,"utf8"),r.renameSync(u,d()),s}function X(){return v().telemetry!==!1}function q(e){M({telemetry:e})}function y(){r.mkdirSync(c(),{recursive:!0}),r.mkdirSync(f(),{recursive:!0}),r.mkdirSync(S(),{recursive:!0}),r.mkdirSync(N(),{recursive:!0}),r.mkdirSync(C(),{recursive:!0})}function w(){try{let e=r.readFileSync(D(),"utf8").trim();return e.length>0?e:null}catch{return null}}function z(e){r.mkdirSync(f(),{recursive:!0}),r.writeFileSync(D(),`${e}
4
4
  `,"utf8")}function Q(){try{return r.readdirSync(f(),{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).sort(P)}catch{return[]}}function P(e,t){let s=i=>{let a=i.indexOf("-"),l=a>=0?i.slice(0,a):i,k=a>=0?i.slice(a+1):"",b=l.split(".").map(g=>Number.parseInt(g,10));return b.some(g=>!Number.isFinite(g))?[[Number.POSITIVE_INFINITY],i]:[b,k]},[u,o]=s(e),[x,m]=s(t);for(let i=0;i<Math.max(u.length,x.length);i++){let a=u[i]??0,l=x[i]??0;if(a!==l)return a-l}return o===m?0:o?m?o<m?-1:1:-1:1}function W(){let e=w();if(!e)return null;let t=_(e);try{if(r.statSync(t).isDirectory())return t}catch{}return null}var h=16*1024;function R(){try{let e=r.openSync(p(),"r");try{let t=Buffer.alloc(h),s=r.readSync(e,t,0,h,0),u=t.subarray(0,s).toString("utf8"),o=JSON.parse(u);return o&&o.schema===1&&typeof o.pid=="number"&&typeof o.bridgePort=="number"&&typeof o.runtimePort=="number"&&typeof o.startedAt=="number"&&typeof o.heartbeatAt=="number"?o:null}finally{r.closeSync(e)}}catch{return null}}function $(e,t=Date.now()){if(!e||t-e.heartbeatAt>I)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function H(e){y();let t=`${p()}.tmp`;r.writeFileSync(t,`${JSON.stringify(e,null,2)}
@@ -0,0 +1,33 @@
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as $}from"./chunk-J27RHTWH.js";import{a as w,d as y,h as R,j as b,l as k}from"./chunk-7OVVG4L6.js";import{A as p,B as g,i as d,y as h,z as u}from"./chunk-T2YYBRII.js";import x from"fs";import{WebSocket as D}from"ws";async function G(e,t={}){let[s,...n]=e;if(!s||s==="--help"||s==="-h"){A();return}switch(s){case"install":return O(n,t);case"list":case"ls":return N(n);case"use":return S(n);case"remove":case"rm":return T(n);case"which":case"active":return F();case"notes":case"changelog":return _(n);default:console.error(` unknown runtime subcommand: ${s}`),A(),process.exit(1)}}function A(){console.log(`
3
+ sootsim runtime \u2014 manage engine runtimes under ~/.sootsim/runtimes/
4
+
5
+ usage:
6
+ sootsim runtime install [version] install a version (default: channel latest)
7
+ sootsim runtime list show installed + available versions
8
+ sootsim runtime use <version> switch active runtime
9
+ sootsim runtime remove <version> delete an installed runtime
10
+ sootsim runtime which print active runtime version
11
+ sootsim runtime notes [version] show release notes (default: active runtime)
12
+
13
+ flags:
14
+ --channel <name> channel to resolve 'latest' from (default: stable)
15
+ --force reinstall even if the version is already on disk
16
+ --set-active=false do not switch active runtime after install
17
+
18
+ environment:
19
+ SOOTSIM_CDN_ORIGIN override the CDN base URL (default: ${w})
20
+
21
+ examples:
22
+ sootsim runtime install
23
+ sootsim runtime install 1.2.3
24
+ sootsim runtime install --channel beta
25
+ sootsim runtime use 1.2.3
26
+ sootsim runtime notes
27
+ sootsim runtime notes 1.2.3
28
+ sootsim runtime notes --all
29
+ `)}async function O(e,t){let{version:s,flags:n}=C(e),i=n.channel??t.channel??"stable",l=n.force===!0,r=n.setActive!==!1;h(),console.log("sootsim runtime install"),console.log(` cdn: ${y()}`);try{let o=await k({version:s,channel:i,force:l,setActive:r});console.log(` version: ${o.version} (channel: ${o.channel})`),o.installed?console.log(` installed ${o.version}`):console.log(` already installed at ${o.runtimeDir}`),r&&await I(o.version)}catch(o){console.error(` ${v(o)}`),process.exit(1)}}async function I(e){p(e),console.log(` active: ${e}`),await E(e)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${e})`)}async function E(e){let{isDaemonLockfileFresh:t,readDaemonLockfile:s}=await import("./home-paths-VON247XB.js"),n=s();if(!t(n))return!1;let i=$();return new Promise(l=>{let r=!1,o=!1,a=f=>{r||(r=!0,l(f))},c=new D(`ws://127.0.0.1:${i}`,{handshakeTimeout:800}),m=setTimeout(()=>{try{c.close()}catch{}a(o)},1500);c.on("open",()=>{try{c.send(JSON.stringify({type:"runtime:use",version:e,id:0})),o=!0}catch{}setTimeout(()=>{try{c.close()}catch{}},100)}),c.on("close",()=>{clearTimeout(m),a(o)}),c.on("error",()=>{clearTimeout(m),a(!1)})})}async function N(e){h();let t=g(),s=u();if(console.log("installed:"),t.length===0)console.log(" (none)");else for(let n of t)console.log(` ${n===s?"*":" "} ${n}`);try{let n=await R();console.log("available (latest per channel):");for(let[i,l]of Object.entries(n.channels))console.log(` ${i.padEnd(8)} ${l.latest}`)}catch(n){console.log(`available: (could not fetch manifest: ${v(n)})`)}}async function S(e){let t=e[0];t||(console.error(" usage: sootsim runtime use <version>"),process.exit(1));let s=g();s.includes(t)||(console.error(` version ${t} is not installed`),console.error(` installed: ${s.join(", ")||"(none)"}`),console.error(` run \`sootsim runtime install ${t}\` first`),process.exit(1)),await I(t)}async function T(e){let t=e[0];t||(console.error(" usage: sootsim runtime remove <version>"),process.exit(1)),u()===t&&(console.error(` cannot remove active runtime ${t}`),console.error(" switch with `sootsim runtime use <other>` first, or install another version"),process.exit(1));let n=d(t);if(!x.existsSync(n)){console.error(` ${t} is not installed`);return}x.rmSync(n,{recursive:!0,force:!0}),console.log(` removed ${t}`)}async function F(){let e=u();if(!e){console.log(" no active runtime");return}console.log(e)}async function _(e){let t=e.includes("--all"),s=e.find(o=>!o.startsWith("-"))||null,n;try{n=await b()}catch(o){console.error(` could not fetch release notes: ${v(o)}`),process.exit(1)}if(n.length===0){console.log(" no release notes published yet");return}if(t){console.log(`sootsim runtime releases:
30
+ `);for(let o of n){let a=o.date.slice(0,10),c=o.sections.reduce((m,f)=>m+f.items.length,0);console.log(` v${o.version} ${a} (${o.channel}, ${c} change${c===1?"":"s"})`)}console.log(`
31
+ see one release: sootsim runtime notes <version>`);return}let i=u(),l=s||i||n[0]?.version,r=n.find(o=>o.version===l);r||(console.error(` no release notes for ${l}`),console.error(` published: ${n.map(o=>o.version).slice(0,10).join(", ")}`),console.error(" list all: sootsim runtime notes --all"),process.exit(1)),console.log(j(r,{active:i}))}function j(e,t={}){let s=[],n=e.date.slice(0,10),i=t.active===e.version?" (active)":"";if(s.push(`sootsim runtime v${e.version} \xB7 ${e.channel} \xB7 ${n}${i}`),e.sections.length===0)return s.push(" no notable changes"),s.join(`
32
+ `);for(let l of e.sections){s.push(""),s.push(` ${l.title}`);for(let r of l.items){let o=r.scope?`(${r.scope}) `:"",a=r.breaking?"\u26A0 ":"";s.push(` \u2022 ${a}${o}${r.summary} ${r.hash}`)}}return s.join(`
33
+ `)}function C(e){let t={},s=[];for(let n=0;n<e.length;n++){let i=e[n];if(i==="--channel"&&n+1<e.length){t.channel=e[n+1],n++;continue}if(i.startsWith("--channel=")){t.channel=i.slice(10);continue}if(i==="--force"){t.force=!0;continue}if(i==="--set-active=false"||i==="--no-set-active"){t.setActive=!1;continue}s.push(i)}return{version:s[0]??null,flags:t}}function v(e){return e instanceof Error?e.message:String(e)}export{G as a,j as b};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var t=4001,n="sootsim close";export{t as a,n as b};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as x}from"./chunk-SRA2TVCG.js";var J="sootsimConfig";function h(e){return!!e&&Object.keys(e).length>0}function de(e){return e?h(e.modules)||h(e.turboModules)||h(e.nativeModules)||h(e.env)||h(e.settings)||h(e.initialState):!1}function V(e,t){let n=new URL(e);return de(t)?n.searchParams.set(J,JSON.stringify(t)):n.searchParams.delete(J),n.toString()}import{existsSync as d,readFileSync as R,writeFileSync as g}from"node:fs";import{homedir as le}from"node:os";import{dirname as fe,join as c,resolve as y}from"node:path";var _=le();function me(e){let t=e;for(;;){if(d(c(t,"pnpm-workspace.yaml"))||d(c(t,"turbo.json"))||d(c(t,"nx.json"))||d(c(t,"lerna.json")))return t;let n=c(t,"package.json");if(d(n))try{if(JSON.parse(R(n,"utf8")).workspaces)return t}catch{}let r=fe(t);if(r===t)return null;t=r}}function O(e,t){let n=me(process.cwd()),r=[n?y(n,e):null,y(process.cwd(),e),y(process.cwd(),t)].filter(o=>!!o);for(let o of r)if(d(o))return o;return r[0]??y(process.cwd(),e)}var pe=()=>O("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),_e=()=>O("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),ge=()=>O("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),Re=()=>O("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),W=()=>O("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),Ee=()=>O("packages/sootsim-engine/scripts/mattermost-preview-server.ts","scripts/mattermost-preview-server.ts"),B={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},Se=c(_,"github/mattermost-mobile"),N=c(_,"github/uniswap-interface"),Ae=c(N,"apps/mobile"),C=c(N,".env.defaults.local"),he="stored-in-.env.local",q="# sootsim demo env overrides",Pe=c(N,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),Oe=c(N,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),Q="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function X(e){if(!d(e))return{};let t={},n=R(e,"utf8");for(let r of n.split(/\r?\n/)){let o=r.trim();if(!o||o.startsWith("#"))continue;let a=o.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!a)continue;let i=a[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[a[1]]=i}return t}function $(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(he)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function z(e,t){for(let n of e)for(let r of t){let o=n[r];if($(o))return o.trim()}}function oe(){let e=X(C),t=X(c(N,"apps/web/.env")),n=[process.env,e,t],r={},o=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,s]of o){let u=z(n,[i,...s]);if(u){r[i]=u;for(let l of s)r[l]=u}}if(!($(r.TRADING_API_KEY)&&$(r.UNISWAP_API_KEY))){let i=z(n,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";r.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",r.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",r.GRAPHQL_URL_OVERRIDE=i,r.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",r.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return r}function Te(){let e=d(C)?R(C,"utf8"):"";if(e&&!e.includes(q))return;let t=oe(),n=[q];for(let[r,o]of Object.entries(t).sort(([a],[i])=>a.localeCompare(i)))n.push(`${r}=${JSON.stringify(o)}`);n.push(""),g(C,`${n.join(`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as x}from"./chunk-IBEQOTJK.js";var J="sootsimConfig";function h(e){return!!e&&Object.keys(e).length>0}function de(e){return e?h(e.modules)||h(e.turboModules)||h(e.nativeModules)||h(e.env)||h(e.settings)||h(e.initialState):!1}function V(e,t){let n=new URL(e);return de(t)?n.searchParams.set(J,JSON.stringify(t)):n.searchParams.delete(J),n.toString()}import{existsSync as d,readFileSync as R,writeFileSync as g}from"node:fs";import{homedir as le}from"node:os";import{dirname as fe,join as c,resolve as y}from"node:path";var _=le();function me(e){let t=e;for(;;){if(d(c(t,"pnpm-workspace.yaml"))||d(c(t,"turbo.json"))||d(c(t,"nx.json"))||d(c(t,"lerna.json")))return t;let n=c(t,"package.json");if(d(n))try{if(JSON.parse(R(n,"utf8")).workspaces)return t}catch{}let r=fe(t);if(r===t)return null;t=r}}function O(e,t){let n=me(process.cwd()),r=[n?y(n,e):null,y(process.cwd(),e),y(process.cwd(),t)].filter(o=>!!o);for(let o of r)if(d(o))return o;return r[0]??y(process.cwd(),e)}var pe=()=>O("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),_e=()=>O("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),ge=()=>O("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),Re=()=>O("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),W=()=>O("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),Ee=()=>O("packages/sootsim-engine/scripts/mattermost-preview-server.ts","scripts/mattermost-preview-server.ts"),B={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},Se=c(_,"github/mattermost-mobile"),N=c(_,"github/uniswap-interface"),Ae=c(N,"apps/mobile"),C=c(N,".env.defaults.local"),he="stored-in-.env.local",q="# sootsim demo env overrides",Pe=c(N,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),Oe=c(N,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),Q="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function X(e){if(!d(e))return{};let t={},n=R(e,"utf8");for(let r of n.split(/\r?\n/)){let o=r.trim();if(!o||o.startsWith("#"))continue;let a=o.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!a)continue;let i=a[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[a[1]]=i}return t}function $(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(he)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function z(e,t){for(let n of e)for(let r of t){let o=n[r];if($(o))return o.trim()}}function oe(){let e=X(C),t=X(c(N,"apps/web/.env")),n=[process.env,e,t],r={},o=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,s]of o){let u=z(n,[i,...s]);if(u){r[i]=u;for(let l of s)r[l]=u}}if(!($(r.TRADING_API_KEY)&&$(r.UNISWAP_API_KEY))){let i=z(n,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";r.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",r.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",r.GRAPHQL_URL_OVERRIDE=i,r.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",r.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return r}function Te(){let e=d(C)?R(C,"utf8"):"";if(e&&!e.includes(q))return;let t=oe(),n=[q];for(let[r,o]of Object.entries(t).sort(([a],[i])=>a.localeCompare(i)))n.push(`${r}=${JSON.stringify(o)}`);n.push(""),g(C,`${n.join(`
3
3
  `)}
4
4
  `)}function ve(){let e=`export function useForceUpgradeStatus(): ForceUpgradeStatus {
5
5
  `,t=` // sootsim demo: bypass the force-upgrade gate during local engine demos.
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{l as d}from"./chunk-4BXESMZ7.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function O(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{l as d}from"./chunk-T2YYBRII.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function O(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
3
3
  `);try{S(e,384)}catch{}return r}function l(){i(a(),{force:!0})}async function E(t){let e=b();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let o=await n.json();return o.user?.id?O({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{b as a,O as b,l as c,E as d};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as t}from"./chunk-W3FBNBTX.js";import{a as p,b as m,c as a}from"./chunk-2U4CGOD6.js";import{a as r}from"./chunk-2FTVPI7F.js";import{a as l}from"./chunk-GU3MWKJY.js";import{a as u,d}from"./chunk-Y7ZMV3PG.js";import{z as i}from"./chunk-4BXESMZ7.js";function c(){let o=i();return`sootsim CLI v${l()} \xB7 runtime ${o?`v${o}`:"not installed"}`}function S(){let o=m({bridgePort:7668,defaultShellUrl:r},t()),e=`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as t}from"./chunk-3MKNANBV.js";import{a as p,b as m,c as a}from"./chunk-FFMAP2HL.js";import{a as r}from"./chunk-KWXV47VS.js";import{a as l}from"./chunk-LKSAMFVM.js";import{a as u,d}from"./chunk-D5VB3SJP.js";import{z as i}from"./chunk-T2YYBRII.js";function c(){let o=i();return`sootsim CLI v${l()} \xB7 runtime ${o?`v${o}`:"not installed"}`}function S(){let o=m({bridgePort:7668,defaultShellUrl:r},t()),e=`
3
3
  ${d}
4
4
  `;console.log(`${c()}
5
5
  ${e}${o}
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-LKSAMFVM.js";import"./chunk-IBEQOTJK.js";export{a as getCliVersion};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-SRA2TVCG.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-IBEQOTJK.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim compat \u2014 check package compatibility
4
4
 
5
5
  usage:
@@ -20,7 +20,7 @@ examples:
20
20
  sootsim compat react-native-reanimated
21
21
  sootsim compat --json
22
22
  sootsim compat --brief
23
- `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-GK27H4NM.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-GK27H4NM.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
23
+ `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-AWRFEEZU.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-AWRFEEZU.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
24
24
  sootsim compatibility report
25
25
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
26
26
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-SRA2TVCG.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-IBEQOTJK.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim config \u2014 manage sootsim configuration
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s}from"./chunk-2XDZ42A6.js";import"./chunk-V4OEITZA.js";import"./chunk-G6Z5E4KX.js";import"./chunk-RBWDMEWN.js";import"./chunk-SUQAFFJO.js";import"./chunk-J27RHTWH.js";import"./chunk-36BDR3DE.js";import"./chunk-S2RR2IZC.js";import"./chunk-LYZ3GSCB.js";import"./chunk-NIL4WJUK.js";import"./chunk-IRSVHE5W.js";import"./chunk-366ZIBQX.js";import"./chunk-KWXV47VS.js";import"./chunk-UQHBJ2L2.js";import"./chunk-T2YYBRII.js";import"./chunk-IBEQOTJK.js";export{e as buildOpenUrl,d as buildShellUrl,q as closeSimsBulk,r as planBulkCloseTargets,i as playwrightHostPidForSim,g as printConnectedSims,b as resolveBundleTarget,c as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,p as runClaimCommand,s as runCloseCommand,o as runFocusCommand,l as runListCommand,m as runOpenCommand,n as runUseCommand,j as signalDriverLaunchConnected,f as summarizeSimUrl,k as terminatePlaywrightHostsForSims,h as waitForSimMatch};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-SRA2TVCG.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-IBEQOTJK.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.121 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as T,b as N}from"./chunk-OBYYAT4F.js";import"./chunk-SA5RP334.js";import{c as O}from"./chunk-IQNZPHGD.js";import"./chunk-W3FBNBTX.js";import"./chunk-2U4CGOD6.js";import"./chunk-2FTVPI7F.js";import"./chunk-KY6NY6WN.js";import"./chunk-GU3MWKJY.js";import"./chunk-Y7ZMV3PG.js";import"./chunk-X4LYRBLZ.js";import{g as I,o as C,p as w,q as B}from"./chunk-4BXESMZ7.js";import{a as W}from"./chunk-SRA2TVCG.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as E,rmSync as X,writeFileSync as L}from"fs";import{dirname as D}from"path";var Q="dev.sootsim.daemon",_="SootSim Daemon",R="0.1.36";function F(t,e,r){let o=w(),n=B(),a=D(D(n)),y=D(n),u=`${a}/Resources`;X(o,{recursive:!0,force:!0}),E(C(),{recursive:!0}),E(y,{recursive:!0}),E(u,{recursive:!0}),L(`${a}/Info.plist`,z()),L(`${a}/PkgInfo`,"APPL????"),L(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${d}
1
+ /*! sootsim v0.1.122 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as T,b as N}from"./chunk-3BCXNVBN.js";import"./chunk-VHPYIZ3U.js";import{c as O}from"./chunk-X6PIQ3OM.js";import"./chunk-3MKNANBV.js";import"./chunk-FFMAP2HL.js";import"./chunk-KWXV47VS.js";import"./chunk-UQHBJ2L2.js";import"./chunk-LKSAMFVM.js";import"./chunk-D5VB3SJP.js";import"./chunk-6PKYLQ36.js";import{g as I,o as C,p as w,q as B}from"./chunk-T2YYBRII.js";import{a as W}from"./chunk-IBEQOTJK.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as E,rmSync as X,writeFileSync as L}from"fs";import{dirname as D}from"path";var Q="dev.sootsim.daemon",_="SootSim Daemon",R="0.1.36";function F(t,e,r){let o=w(),n=B(),a=D(D(n)),y=D(n),u=`${a}/Resources`;X(o,{recursive:!0,force:!0}),E(C(),{recursive:!0}),E(y,{recursive:!0}),E(u,{recursive:!0}),L(`${a}/Info.plist`,z()),L(`${a}/PkgInfo`,"APPL????"),L(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${d}
3
3
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:n}}function z(){return`<?xml version="1.0" encoding="UTF-8"?>
4
4
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5
5
  <plist version="1.0">