sootsim 0.1.310 → 0.1.311

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 (151) hide show
  1. package/dist-cli/bin.js +5 -5
  2. package/dist-cli/chunks/{agent-CPD4GIXP.js → agent-KOPVOZ7G.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-JZTNUUZE.js → agent-wrapper-KVAIIK7K.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-CFIBFEVF.js → app-fonts-5ZX2IRBS.js} +2 -2
  5. package/dist-cli/chunks/{assert-C5WAWJ6I.js → assert-NRKM4ZIK.js} +2 -2
  6. package/dist-cli/chunks/{auth-UY7RPLPH.js → auth-MSLDV5HR.js} +2 -2
  7. package/dist-cli/chunks/{beta-NM7T7MDN.js → beta-L5QKFHWI.js} +2 -2
  8. package/dist-cli/chunks/{camera-4YUYYYJI.js → camera-5JUNQPSI.js} +2 -2
  9. package/dist-cli/chunks/{chunk-RYPPRVBM.js → chunk-3Y6476ZM.js} +2 -2
  10. package/dist-cli/chunks/{chunk-GQVBLBUJ.js → chunk-5V5MOREL.js} +2 -2
  11. package/dist-cli/chunks/{chunk-FT2XATWO.js → chunk-6JYTKF5O.js} +1 -1
  12. package/dist-cli/chunks/{chunk-LKAAQBT6.js → chunk-6QZY6YO2.js} +1 -1
  13. package/dist-cli/chunks/{chunk-TAQV44LZ.js → chunk-6SICKWPQ.js} +3 -3
  14. package/dist-cli/chunks/{chunk-Z6H5FR3U.js → chunk-75KNNHMR.js} +2 -2
  15. package/dist-cli/chunks/{chunk-YRRUK3EK.js → chunk-75YOUNTE.js} +1 -1
  16. package/dist-cli/chunks/chunk-7PHOEBKV.js +4 -0
  17. package/dist-cli/chunks/{chunk-S7WXPIOY.js → chunk-7W63IKAP.js} +2 -2
  18. package/dist-cli/chunks/chunk-CJKSD5BZ.js +5 -0
  19. package/dist-cli/chunks/{chunk-SY7E43UY.js → chunk-CKMQ2YXQ.js} +3 -3
  20. package/dist-cli/chunks/{chunk-QPZVGHRV.js → chunk-CUVLXG63.js} +1 -1
  21. package/dist-cli/chunks/{chunk-7RJEULWN.js → chunk-EHBHUE6S.js} +2 -2
  22. package/dist-cli/chunks/{chunk-NLTJE335.js → chunk-F2WH6XM7.js} +2 -2
  23. package/dist-cli/chunks/{chunk-63JWRDM6.js → chunk-GEUU2WIL.js} +2 -2
  24. package/dist-cli/chunks/{chunk-ZNK3ZAA5.js → chunk-GFKP5JIA.js} +2 -2
  25. package/dist-cli/chunks/{chunk-6UXXOG6P.js → chunk-GLECQIGB.js} +2 -2
  26. package/dist-cli/chunks/{chunk-3S7UEXZW.js → chunk-HI5MWY32.js} +1 -1
  27. package/dist-cli/chunks/{chunk-GH2OE6F6.js → chunk-J6ZKDIRN.js} +2 -2
  28. package/dist-cli/chunks/{chunk-PJKCYUT3.js → chunk-JGFIT5X5.js} +2 -2
  29. package/dist-cli/chunks/{chunk-3EO5JEG7.js → chunk-KGIXNUUM.js} +2 -2
  30. package/dist-cli/chunks/{chunk-BFNAFH27.js → chunk-KKXSWEYS.js} +1 -1
  31. package/dist-cli/chunks/{chunk-EPMLSKSB.js → chunk-NBNEISXX.js} +2 -2
  32. package/dist-cli/chunks/{chunk-EWRPLFYI.js → chunk-P7MI3VFY.js} +1 -1
  33. package/dist-cli/chunks/{chunk-YIJFCR5T.js → chunk-PHFRI2QF.js} +1 -1
  34. package/dist-cli/chunks/{chunk-RMIKUUCO.js → chunk-PJ27D3WO.js} +1 -1
  35. package/dist-cli/chunks/{chunk-MUQDPJUP.js → chunk-QCEMDWL4.js} +1 -1
  36. package/dist-cli/chunks/{chunk-2TRPGEZE.js → chunk-QILKSUH6.js} +2 -2
  37. package/dist-cli/chunks/{chunk-WWIQEYHT.js → chunk-QMHUIADD.js} +1 -1
  38. package/dist-cli/chunks/{chunk-66Z2ADUQ.js → chunk-QUAY5AZB.js} +2 -2
  39. package/dist-cli/chunks/{chunk-C3GMSIRT.js → chunk-RATCQLQA.js} +2 -2
  40. package/dist-cli/chunks/{chunk-C3O6UUPY.js → chunk-RHGVZJIY.js} +3 -3
  41. package/dist-cli/chunks/{chunk-BMIIHY6K.js → chunk-RIT4KI4Y.js} +3 -3
  42. package/dist-cli/chunks/{chunk-4XMPRQGE.js → chunk-S5U22PVL.js} +1 -1
  43. package/dist-cli/chunks/{chunk-XBBNRESY.js → chunk-SKGITCWL.js} +1 -1
  44. package/dist-cli/chunks/{chunk-RX4CFOVV.js → chunk-ULJT3HDO.js} +1 -1
  45. package/dist-cli/chunks/{chunk-XMOULANJ.js → chunk-VAFDFOE6.js} +2 -2
  46. package/dist-cli/chunks/{chunk-M2LP2VYQ.js → chunk-VJMY2MX6.js} +2 -2
  47. package/dist-cli/chunks/{chunk-IS5OOCN5.js → chunk-VNS6KYRJ.js} +1 -1
  48. package/dist-cli/chunks/{chunk-R7AS52NA.js → chunk-W4S7GGPG.js} +3 -3
  49. package/dist-cli/chunks/{chunk-YMD6WWI7.js → chunk-WIYIQQQS.js} +2 -2
  50. package/dist-cli/chunks/{chunk-VAGUPECL.js → chunk-WTNKX7QD.js} +2 -2
  51. package/dist-cli/chunks/{chunk-STWCCIBA.js → chunk-Y5O5GK2Q.js} +11 -11
  52. package/dist-cli/chunks/{chunk-YZPSUNTO.js → chunk-Y7RQGSZD.js} +2 -2
  53. package/dist-cli/chunks/{chunk-XKAXZ4DS.js → chunk-YOIHAHR5.js} +1 -1
  54. package/dist-cli/chunks/{chunk-ZS7OXPHR.js → chunk-YS7YDOGW.js} +1 -1
  55. package/dist-cli/chunks/{chunk-CORSX7M5.js → chunk-YTP5VCDL.js} +1 -1
  56. package/dist-cli/chunks/{chunk-2KSLGBIU.js → chunk-ZB3UAYJ4.js} +2 -2
  57. package/dist-cli/chunks/{chunk-EPZUFQMX.js → chunk-ZDQO6TJQ.js} +2 -2
  58. package/dist-cli/chunks/{chunk-C4O4VRN5.js → chunk-ZHPLBK34.js} +2 -2
  59. package/dist-cli/chunks/{cleanup-2ZM4QSDV.js → cleanup-436GW67Y.js} +2 -2
  60. package/dist-cli/chunks/{cli-version-WXOEWZDA.js → cli-version-BY3A3SBN.js} +2 -2
  61. package/dist-cli/chunks/{compat-MGY3FZSI.js → compat-DDJSQ3WI.js} +2 -2
  62. package/dist-cli/chunks/{config-3W5VNME6.js → config-XFLK4XZN.js} +2 -2
  63. package/dist-cli/chunks/{control-7LNRM2BK.js → control-W6KUVHYU.js} +2 -2
  64. package/dist-cli/chunks/daemon-E5MGIR55.js +4 -0
  65. package/dist-cli/chunks/{debug-4CMFC2CO.js → debug-PHSYXSNH.js} +3 -3
  66. package/dist-cli/chunks/{desktop-Q6CZSS4R.js → desktop-6V5ALYCZ.js} +3 -3
  67. package/dist-cli/chunks/{detox-2AF4MXXN.js → detox-SA27XGTO.js} +2 -2
  68. package/dist-cli/chunks/{device-E2WCI2N2.js → device-XURVFXBT.js} +2 -2
  69. package/dist-cli/chunks/{diagnose-CZGCKNVY.js → diagnose-HMUQWQOK.js} +2 -2
  70. package/dist-cli/chunks/disk-cleanup-KYAFCV6S.js +4 -0
  71. package/dist-cli/chunks/drivers-INII4IWR.js +4 -0
  72. package/dist-cli/chunks/{film-UDSAJZXL.js → film-3UM6EUYF.js} +3 -3
  73. package/dist-cli/chunks/flow-RP4UVYUA.js +4 -0
  74. package/dist-cli/chunks/help-STHBZD6I.js +4 -0
  75. package/dist-cli/chunks/{hidden-runtime-alias-CHAB56GM.js → hidden-runtime-alias-DVVAGM4I.js} +2 -2
  76. package/dist-cli/chunks/{home-paths-WFCI5ORX.js → home-paths-LVGGR4AJ.js} +2 -2
  77. package/dist-cli/chunks/inspect-5W52ZHKD.js +4 -0
  78. package/dist-cli/chunks/install-desktop-H4HLLT7K.js +4 -0
  79. package/dist-cli/chunks/{login-57UP2EKB.js → login-2QTBTTGJ.js} +4 -4
  80. package/dist-cli/chunks/{logout-UYNCJTOC.js → logout-PUBLDHVY.js} +2 -2
  81. package/dist-cli/chunks/{maestro-QMAPXPZ7.js → maestro-2UJ27MKD.js} +3 -3
  82. package/dist-cli/chunks/{maestro-generate-N2BJXJDH.js → maestro-generate-P4MDFYMV.js} +3 -3
  83. package/dist-cli/chunks/{mode-SY5G7WQD.js → mode-RRHPX23W.js} +2 -2
  84. package/dist-cli/chunks/{optional-demo-registry-DH3L6FFX.js → optional-demo-registry-5IRF7M7Z.js} +2 -2
  85. package/dist-cli/chunks/{perf-NZ6VEDLA.js → perf-BOLWOAKV.js} +2 -2
  86. package/dist-cli/chunks/{permissions-EMH2K5LX.js → permissions-ZIOTIBPV.js} +2 -2
  87. package/dist-cli/chunks/{record-44PMWGYY.js → record-DU2IKPFK.js} +3 -3
  88. package/dist-cli/chunks/{report-issue-PLGMRWXG.js → report-issue-4CQDUWT2.js} +2 -2
  89. package/dist-cli/chunks/runtime-QWPQ3M7H.js +4 -0
  90. package/dist-cli/chunks/{screenshot-command-GJT5XS7P.js → screenshot-command-XEN26NJV.js} +3 -3
  91. package/dist-cli/chunks/{screenshot-layers-4JSTS5VY.js → screenshot-layers-CRCQ4CEF.js} +2 -2
  92. package/dist-cli/chunks/{screenshots-capture-AQQISSQD.js → screenshots-capture-XGQFYINL.js} +2 -2
  93. package/dist-cli/chunks/{serve-TJMO4KGX.js → serve-UBSRDYA3.js} +2 -2
  94. package/dist-cli/chunks/{setup-7ZSYCUX6.js → setup-AKYIOBVO.js} +2 -2
  95. package/dist-cli/chunks/{skills-GRQPAAD5.js → skills-V5WV4LWH.js} +2 -2
  96. package/dist-cli/chunks/{storage-GWRZNBAU.js → storage-3PJPIHNM.js} +2 -2
  97. package/dist-cli/chunks/store-A27JYIGF.js +4 -0
  98. package/dist-cli/chunks/telemetry-LLD24AVX.js +4 -0
  99. package/dist-cli/chunks/{timeline-2FXM7HEU.js → timeline-OHQNHG52.js} +2 -2
  100. package/dist-cli/chunks/{upgrade-AV7UOK2X.js → upgrade-Q2TYYVIX.js} +2 -2
  101. package/dist-cli/chunks/upload-57FIDO2B.js +4 -0
  102. package/dist-cli/chunks/{version-C72O2LMS.js → version-SW6VCJVI.js} +2 -2
  103. package/dist-cli/chunks/{web-4V3YGWNC.js → web-BXVM3HJ3.js} +2 -2
  104. package/dist-cli/chunks/{what-happened-RGD2DOQI.js → what-happened-H62ASSI5.js} +2 -2
  105. package/dist-lib/agent-daemon-client.cjs +1 -1
  106. package/dist-lib/agent-events.cjs +1 -1
  107. package/dist-lib/agent-identity.cjs +1 -1
  108. package/dist-lib/agent-sessions.cjs +1 -1
  109. package/dist-lib/attached-projects.cjs +1 -1
  110. package/dist-lib/auth/shared-session.cjs +1 -1
  111. package/dist-lib/backend-origin.cjs +1 -1
  112. package/dist-lib/beta.cjs +1 -1
  113. package/dist-lib/beta.mjs +1 -1
  114. package/dist-lib/bridge-constants.cjs +1 -1
  115. package/dist-lib/cli-constants.cjs +1 -1
  116. package/dist-lib/config.cjs +1 -1
  117. package/dist-lib/detox/index.cjs +20 -16
  118. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  119. package/dist-lib/home-paths.cjs +1 -1
  120. package/dist-lib/host/bridge-host.cjs +164 -102
  121. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  122. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  123. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  124. package/dist-lib/host/websocket-proxy.cjs +1 -1
  125. package/dist-lib/index.cjs +1 -1
  126. package/dist-lib/jump-to-source-babel.cjs +1 -1
  127. package/dist-lib/menu.cjs +1 -1
  128. package/dist-lib/menu.mjs +1 -1
  129. package/dist-lib/metro.cjs +1 -1
  130. package/dist-lib/profiles.cjs +1 -1
  131. package/dist-lib/render-mode.cjs +1 -1
  132. package/dist-lib/scripts/dev-server-scanner.cjs +43 -23
  133. package/dist-lib/sdk.cjs +1 -1
  134. package/dist-lib/sdk.mjs +1 -1
  135. package/dist-lib/skills.cjs +277 -206
  136. package/dist-lib/vite.cjs +1 -1
  137. package/package.json +1 -1
  138. package/scripts/dev-server-scanner.ts +34 -8
  139. package/dist-cli/chunks/chunk-63EKEKDF.js +0 -4
  140. package/dist-cli/chunks/chunk-OQO3HU4Y.js +0 -5
  141. package/dist-cli/chunks/daemon-ZNCVHOWJ.js +0 -4
  142. package/dist-cli/chunks/disk-cleanup-4T6MDZBA.js +0 -4
  143. package/dist-cli/chunks/drivers-NEB27ZKQ.js +0 -4
  144. package/dist-cli/chunks/flow-GXXVEHEW.js +0 -4
  145. package/dist-cli/chunks/help-3RVUJUAN.js +0 -4
  146. package/dist-cli/chunks/inspect-4H4VNQJ4.js +0 -4
  147. package/dist-cli/chunks/install-desktop-RGCBPM4J.js +0 -4
  148. package/dist-cli/chunks/runtime-CUSKTS2J.js +0 -4
  149. package/dist-cli/chunks/store-MLODFZBM.js +0 -4
  150. package/dist-cli/chunks/telemetry-XL3UDJSE.js +0 -4
  151. package/dist-cli/chunks/upload-6DXF4DAQ.js +0 -4
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{I as F,m as B,n as A,p as h,u as E,w as P}from"./chunk-4XMPRQGE.js";import{i as y,m as N,n as I}from"./chunk-7RJEULWN.js";var k={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function z(e){return e.includes("--json")}function K(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
4
+ import{I as F,m as B,n as A,p as h,u as E,w as P}from"./chunk-S5U22PVL.js";import{i as y,m as N,n as I}from"./chunk-EHBHUE6S.js";var k={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function z(e){return e.includes("--json")}function K(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
5
5
  `)}function Q(e){process.stderr.write(`${e}
6
6
  `)}function b(e,t=Date.now()){let r=new Date(e),n=`${S(r.getHours())}:${S(r.getMinutes())}:${S(r.getSeconds())}`,s=t-e;if(s<0)return n;let o=Math.round(s/1e3);return o<60?`${n} +${o}s`:o<3600?`${n} +${Math.round(o/60)}m`:o<86400?`${n} +${Math.round(o/3600)}h`:`${n} +${Math.round(o/86400)}d`}function S(e){return e<10?`0${e}`:String(e)}async function O(e,t,...r){return N(e,`__sootsimTest.${t}`,...r)}async function j(e,t,...r){return I(e,`SootSim.bridges.mainShell.${t}`,...r)}async function X(e,t={}){try{let r=await O(e,"waitForScreenTransitions",k);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function Z(e,t,r,...n){let s=Date.now()+Math.max(0,r);for(;;)try{return await j(e,t,...n)}catch(o){if(!F(o)||Date.now()>=s)throw o;await w(50)}}async function ee(e,t,r,n={}){let s=n.attempts??30,o=n.intervalMs??500,l=n.minNodeCount??10;for(let i=0;i<s;i++){let u=y(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let c=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>l)return{bridge:u,count:c}}catch{}u.close(),await w(o)}return null}async function te(e,t,r,n={}){let s=n.timeoutMs??8e3,o=n.intervalMs??250,l=Date.now()+s;for(;Date.now()<l;){let i=y(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await i.send({type:"evaluate",code:"1"}),i}catch{i.close()}await w(o)}return null}async function ne(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,s=t.pollIntervalMs??200,o=Date.now(),l=o+r,i=-1,u=o,c=null,d=!1,m={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,liveFrameActive:!1,liveFrameChannels:0,liveFramePublishes:0,flag:void 0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",errors:0};for(;Date.now()<l;){try{let a=await e.send({type:"evaluate",code:B}),g=Date.now()-o,f=Number(a?.nodes)||0,$=Number(a?.targets)||0,C=a?.liveFrameActive===!0,W=Number(a?.liveFrameChannels)||0,q=Number(a?.liveFramePublishes)||0,x=Number(a?.errors)||0,T=a?.flag===!0,p=a?.externalReady,M=typeof a?.loadingText=="string"?a.loadingText.trim():"",D=typeof a?.externalStatus=="string"?a.externalStatus.trim():"",R=typeof a?.externalError=="string"?a.externalError.trim():"",v=typeof a?.externalError=="string"&&R.length>0;if(c=p,d=v,f!==i&&(i=f,u=g),m={ready:!1,source:"timeout",elapsedMs:g,nodes:f,targets:$,liveFrameActive:C,liveFrameChannels:W,liveFramePublishes:q,flag:a?.flag,loadingText:M,externalReady:typeof p=="boolean"?p:null,externalStatus:D,externalError:R,errors:x},T&&p!==!1&&!v&&!M&&h({liveFrameActive:C,nodes:f,targets:$})&&g-u>=A)return{...m,ready:!0,source:"flag"};if(g>=n&&x>0&&!T)return{...m,ready:!1,source:"error-bail"}}catch{}await w(s)}return c!==!1&&!d&&!m.loadingText&&h(m)?{...m,ready:!0,source:"nodes-fallback"}:{...m,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}function H(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function _(e,t,...r){return e.send({type:"call",path:`__sootsimTest.${t}`,args:r})}async function L(e,t={}){let r=await e.send({type:"evaluate",code:P});if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.errors)||0),s=Math.max(0,Number(r.warnings)||0);if(n===0&&s===0)return;let o=[];if(n>0&&o.push(`${n} console error${n===1?"":"s"}`),s>0&&o.push(`${s} console warning${s===1?"":"s"}`),console.log(`
7
7
  console: ${o.join(", ")}`),t.errorsCommand&&console.log(` inspect: ${t.errorsCommand}`),s>0&&t.warningsCommand&&console.log(` inspect: ${t.warningsCommand}`),!t.includeTail||n===0)return;let l=await E(e,5);if(!(!Array.isArray(l)||l.length===0)){console.log(`
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(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 n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  var p={"--help":{type:"boolean",short:"-h"},"--version":{type:"boolean",short:"-V"},"--verbose":{type:"boolean",short:"-v"},"--port":{type:"number",short:"-p"},"--device":{type:"string",short:"-d"},"--theme":{type:"string",short:"-t"},"--headless":{type:"boolean"},"--driver":{type:"string"},"--sim":{type:"string"},"--session":{type:"string"},"--tab":{type:"string"}},m=new Set(["list","describe","find","get","do","wait","network","logs","shell"]),d=new Set(["do","get","wait","shell","debug"]),b=new Set(["detox","maestro","record","film","storage","permissions","perf","screenshot","mode","inspect","debug","timeline","what-happened","shell","assert","device","open","list","use","claim","close","compat","report-issue","desktop","login","logout","auth","setup","serve","daemon","runtime","upgrade","update","version","skill","config","cleanup","app-fonts","agent-wrapper","agent",...m]);function u(c){let r=c.slice(2),e={command:null,commandArgs:[],globalFlags:{},help:!1,version:!1,verbose:!1},s=0;for(;s<r.length;){let o=r[s];if(o==="--"){e.commandArgs.push(...r.slice(s+1));break}let i=Object.entries(p).find(([a,t])=>a===o||t.short===o);if(i){let[a,t]=i,l=a.replace(/^--/,"");if(t.type==="boolean")e.globalFlags[l]=!0,s++;else{let n=r[s+1];if(n===void 0||n.startsWith("-")){console.error(` warning: ${o} requires a value`),s++;continue}if(t.type==="number"){let g=Number(n);if(Number.isNaN(g)){console.error(` warning: ${o} requires a number, got "${n}"`),s+=2;continue}e.globalFlags[l]=g}else e.globalFlags[l]=n;s+=2}continue}if(!e.command&&!o.startsWith("-")){let a=o.indexOf("-");if(a>0){let t=o.slice(0,a),l=o.slice(a+1);if(d.has(t)&&l.length>0){e.command=t;let n=r.slice(s+1);e.commandArgs=[l,...n[0]==="--"?n.slice(1):n];break}}if(b.has(o)){e.command=o;let t=r.slice(s+1);e.commandArgs=t[0]==="--"?t.slice(1):t;break}e.commandArgs=r.slice(s);break}e.commandArgs.push(o),s++}return e.help=!!e.globalFlags.help,e.version=!!e.globalFlags.version,e.verbose=!!e.globalFlags.verbose,e}export{m as a,u as b};
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{o as d}from"./chunk-XBBNRESY.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://contrast.dev";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 O(){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 b(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)+`
4
+ import{o as d}from"./chunk-SKGITCWL.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://contrast.dev";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 O(){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 b(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)+`
5
5
  `);try{S(e,384)}catch{}return r}function l(){i(a(),{force:!0})}async function E(t){let e=O();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?b({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{O as a,b,l as c,E as d};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{l as n}from"./chunk-GH2OE6F6.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
4
+ import{l as n}from"./chunk-J6ZKDIRN.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
5
5
  `)}export{g as a};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as o}from"./chunk-2KSLGBIU.js";var c=["ghs_","ghp_","gho_","ghu_","github_pat_"];function d(n){return!!(n&&n.length>=20&&c.some(t=>n.startsWith(t)))}function p(){let n=process.env.CONTRAST_INSTALLATION_TOKEN?.trim(),t=process.env.GITHUB_TOKEN?.trim(),e=n||t;if(!d(e))return null;let r=(process.env.CONTRAST_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!r)return null;let[i,s]=r.includes("/")?r.split("/",2):[null,null],u=(process.env.CONTRAST_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),l=(process.env.CONTRAST_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:e,repoId:r,repositoryId:u||null,owner:i||null,repo:s||null,installationId:l||null,source:n?"contrast-runner":"github-actions"}}function a(){let n=process.env.SOOTSIM_API_KEY?.trim();if(n&&n.startsWith("sk_sootsim_"))return{kind:"api-key",secret:n,source:"env"};let t=p();if(t)return t;let e=o();return e?.token?{kind:"session",token:e.token,origin:e.origin}:null}function g(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function _(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{a,g as b,_ as c};
4
+ import{a as o}from"./chunk-ZB3UAYJ4.js";var c=["ghs_","ghp_","gho_","ghu_","github_pat_"];function d(n){return!!(n&&n.length>=20&&c.some(t=>n.startsWith(t)))}function p(){let n=process.env.CONTRAST_INSTALLATION_TOKEN?.trim(),t=process.env.GITHUB_TOKEN?.trim(),e=n||t;if(!d(e))return null;let r=(process.env.CONTRAST_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!r)return null;let[i,s]=r.includes("/")?r.split("/",2):[null,null],u=(process.env.CONTRAST_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),l=(process.env.CONTRAST_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:e,repoId:r,repositoryId:u||null,owner:i||null,repo:s||null,installationId:l||null,source:n?"contrast-runner":"github-actions"}}function a(){let n=process.env.SOOTSIM_API_KEY?.trim();if(n&&n.startsWith("sk_sootsim_"))return{kind:"api-key",secret:n,source:"env"};let t=p();if(t)return t;let e=o();return e?.token?{kind:"session",token:e.token,origin:e.origin}:null}function g(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function _(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{a,g as b,_ as c};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as s,c as g,d as f,e as v}from"./chunk-YMD6WWI7.js";import"./chunk-RMIKUUCO.js";import"./chunk-R7AS52NA.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";var b={"browser-cache":"browser caches",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(r){let i=new Map;for(let t of r){let o=i.get(t.kind)??{bytes:0,count:0};o.bytes+=t.bytes,o.count++,i.set(t.kind,o)}return[...i].sort((t,o)=>o[1].bytes-t[1].bytes).map(([t,o])=>` ${b[t]}: ${s(o.bytes)} (${o.count} ${o.count===1?"item":"items"})`)}function h(){console.log(`
4
+ import{b as s,c as g,d as f,e as v}from"./chunk-WIYIQQQS.js";import"./chunk-PJ27D3WO.js";import"./chunk-W4S7GGPG.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";var b={"browser-cache":"browser caches",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(r){let i=new Map;for(let t of r){let o=i.get(t.kind)??{bytes:0,count:0};o.bytes+=t.bytes,o.count++,i.set(t.kind,o)}return[...i].sort((t,o)=>o[1].bytes-t[1].bytes).map(([t,o])=>` ${b[t]}: ${s(o.bytes)} (${o.count} ${o.count===1?"item":"items"})`)}function h(){console.log(`
5
5
  sootsim cleanup \u2014 inspect and reclaim local SootSim disk usage
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a}from"./chunk-3S7UEXZW.js";import"./chunk-XKAXZ4DS.js";export{a as getCliVersion};
4
+ import{a}from"./chunk-HI5MWY32.js";import"./chunk-YOIHAHR5.js";export{a as getCliVersion};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{d as i,g as a,i as d,j as r}from"./chunk-63EKEKDF.js";import"./chunk-XKAXZ4DS.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function $(e){if(e.includes("--help")||e.includes("-h")){console.log(`
4
+ import{d as i,g as a,i as d,j as r}from"./chunk-7PHOEBKV.js";import"./chunk-YOIHAHR5.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function $(e){if(e.includes("--help")||e.includes("-h")){console.log(`
5
5
  sootsim compat \u2014 check package compatibility
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{A as s,B as r,x as t}from"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";function l(){let e=s();console.log(` product analytics are ${e.productAnalytics?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function i(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":r({...s(),productAnalytics:!0}),console.log(" product analytics ON"),console.log(` config: ${t()}`);return;case"off":case"disable":r({...s(),productAnalytics:!1}),console.log(" product analytics OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
4
+ import{A as s,B as r,x as t}from"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";function l(){let e=s();console.log(` product analytics are ${e.productAnalytics?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function i(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":r({...s(),productAnalytics:!0}),console.log(" product analytics ON"),console.log(` config: ${t()}`);return;case"off":case"disable":r({...s(),productAnalytics:!1}),console.log(" product analytics OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
5
5
  sootsim config \u2014 manage local CLI preferences
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"./chunk-S7WXPIOY.js";import"./chunk-3EO5JEG7.js";import"./chunk-MUQDPJUP.js";import"./chunk-YZPSUNTO.js";import"./chunk-4XMPRQGE.js";import"./chunk-XMOULANJ.js";import"./chunk-RX4CFOVV.js";import"./chunk-VAGUPECL.js";import"./chunk-STWCCIBA.js";import"./chunk-Z6H5FR3U.js";import"./chunk-BFNAFH27.js";import"./chunk-66Z2ADUQ.js";import"./chunk-YIJFCR5T.js";import"./chunk-7RJEULWN.js";import"./chunk-RMIKUUCO.js";import"./chunk-R7AS52NA.js";import"./chunk-EPZUFQMX.js";import"./chunk-GH2OE6F6.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";export{d as applyConfiguredRuntimeOrigin,h as buildOpenUrl,g as buildShellUrl,u as closeSimsBulk,b as normalizeDeepLinkTarget,v as planBulkCloseTargets,m as playwrightHostPidForSim,j as printConnectedSims,c as resolveBundleTarget,e as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,f as resolveShellBaseUrlForBridgePort,t as runClaimCommand,w as runCloseCommand,s as runFocusCommand,p as runLinkCommand,q as runOpenCommand,r as runUseCommand,n as signalDriverLaunchConnected,i as summarizeSimUrl,o as terminatePlaywrightHostsForSims,k as waitForSimMatch,l as waitForSimMatchOrHostExit};
4
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"./chunk-7W63IKAP.js";import"./chunk-KGIXNUUM.js";import"./chunk-QCEMDWL4.js";import"./chunk-Y7RQGSZD.js";import"./chunk-S5U22PVL.js";import"./chunk-VAFDFOE6.js";import"./chunk-ULJT3HDO.js";import"./chunk-WTNKX7QD.js";import"./chunk-Y5O5GK2Q.js";import"./chunk-75KNNHMR.js";import"./chunk-KKXSWEYS.js";import"./chunk-QUAY5AZB.js";import"./chunk-PHFRI2QF.js";import"./chunk-EHBHUE6S.js";import"./chunk-PJ27D3WO.js";import"./chunk-W4S7GGPG.js";import"./chunk-ZDQO6TJQ.js";import"./chunk-J6ZKDIRN.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";export{d as applyConfiguredRuntimeOrigin,h as buildOpenUrl,g as buildShellUrl,u as closeSimsBulk,b as normalizeDeepLinkTarget,v as planBulkCloseTargets,m as playwrightHostPidForSim,j as printConnectedSims,c as resolveBundleTarget,e as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,f as resolveShellBaseUrlForBridgePort,t as runClaimCommand,w as runCloseCommand,s as runFocusCommand,p as runLinkCommand,q as runOpenCommand,r as runUseCommand,n as signalDriverLaunchConnected,i as summarizeSimUrl,o as terminatePlaywrightHostsForSims,k as waitForSimMatch,l as waitForSimMatchOrHostExit};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d,e,f}from"./chunk-3Y6476ZM.js";import"./chunk-RATCQLQA.js";import"./chunk-ZB3UAYJ4.js";import"./chunk-QILKSUH6.js";import"./chunk-GFKP5JIA.js";import"./chunk-VJMY2MX6.js";import"./chunk-ZDQO6TJQ.js";import"./chunk-J6ZKDIRN.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-6QZY6YO2.js";import"./chunk-SKGITCWL.js";import"./chunk-HI5MWY32.js";import"./chunk-P7MI3VFY.js";import"./chunk-YOIHAHR5.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,e as teardownDaemonService,d as teardownLegacyMacDaemonArtifacts,f as teardownSootsimHome};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{f,m as T}from"./chunk-YZPSUNTO.js";import{L as S,M as $,N,O as A,P as v}from"./chunk-4XMPRQGE.js";import{h as D,j as O,l as x}from"./chunk-7RJEULWN.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
4
+ import{f,m as T}from"./chunk-Y7RQGSZD.js";import{L as S,M as $,N,O as A,P as v}from"./chunk-S5U22PVL.js";import{h as D,j as O,l as x}from"./chunk-EHBHUE6S.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
5
5
  sootsim debug \u2014 drive __sootsimDebug from the terminal
6
6
 
7
7
  usage:
@@ -172,7 +172,7 @@ examples:
172
172
  } : null,
173
173
  samples,
174
174
  }
175
- })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-4H4VNQJ4.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
175
+ })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-5W52ZHKD.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
176
176
  known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
177
177
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
178
178
  if (!d) return null;
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as d}from"./chunk-BMIIHY6K.js";import"./chunk-CORSX7M5.js";import{a as u}from"./chunk-QPZVGHRV.js";import{a as l}from"./chunk-FT2XATWO.js";import{g as m}from"./chunk-S7WXPIOY.js";import"./chunk-3EO5JEG7.js";import"./chunk-MUQDPJUP.js";import"./chunk-YZPSUNTO.js";import"./chunk-4XMPRQGE.js";import{b as c,f as a}from"./chunk-XMOULANJ.js";import{a as p}from"./chunk-RX4CFOVV.js";import"./chunk-VAGUPECL.js";import"./chunk-STWCCIBA.js";import"./chunk-Z6H5FR3U.js";import"./chunk-BFNAFH27.js";import"./chunk-66Z2ADUQ.js";import"./chunk-YIJFCR5T.js";import"./chunk-7RJEULWN.js";import"./chunk-RMIKUUCO.js";import"./chunk-R7AS52NA.js";import"./chunk-EPZUFQMX.js";import"./chunk-GH2OE6F6.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";function v(o){let n=o.indexOf("--port");if(n<0)return;let e=o[n+1],t=e?Number(e):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${e||"(missing)"}`),process.exit(1)),t}async function w(o,n){let e=v(o)??n.port;return e?m(String(e)):void 0}async function f(o,n){(o.includes("--help")||o.includes("-h"))&&(console.log(`
4
+ import{a as d}from"./chunk-RIT4KI4Y.js";import"./chunk-YTP5VCDL.js";import{a as u}from"./chunk-CUVLXG63.js";import{a as l}from"./chunk-6JYTKF5O.js";import{g as m}from"./chunk-7W63IKAP.js";import"./chunk-KGIXNUUM.js";import"./chunk-QCEMDWL4.js";import"./chunk-Y7RQGSZD.js";import"./chunk-S5U22PVL.js";import{b as c,f as a}from"./chunk-VAFDFOE6.js";import{a as p}from"./chunk-ULJT3HDO.js";import"./chunk-WTNKX7QD.js";import"./chunk-Y5O5GK2Q.js";import"./chunk-75KNNHMR.js";import"./chunk-KKXSWEYS.js";import"./chunk-QUAY5AZB.js";import"./chunk-PHFRI2QF.js";import"./chunk-EHBHUE6S.js";import"./chunk-PJ27D3WO.js";import"./chunk-W4S7GGPG.js";import"./chunk-ZDQO6TJQ.js";import"./chunk-J6ZKDIRN.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";function v(o){let n=o.indexOf("--port");if(n<0)return;let e=o[n+1],t=e?Number(e):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${e||"(missing)"}`),process.exit(1)),t}async function w(o,n){let e=v(o)??n.port;return e?m(String(e)):void 0}async function f(o,n){(o.includes("--help")||o.includes("-h"))&&(console.log(`
5
5
  sootsim desktop \u2014 launch the desktop companion
6
6
 
7
7
  usage:
@@ -16,7 +16,7 @@ examples:
16
16
  sootsim desktop
17
17
  sootsim desktop --port 5173
18
18
  sootsim desktop --profile qa
19
- `),process.exit(0));let e=o.find((k,s)=>o[s-1]==="--profile"),t=o.includes("--ephemeral");e&&t&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let h=e?c(e).id:void 0,i=p();if(!i){if(u(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await l("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:s}=await import("./install-desktop-RGCBPM4J.js");await s(["--yes"]),i=p()}i||process.exit(1)}console.log(` launching ${i.path}`);let g=await w(o,n),r=await a.launch({url:g,device:n.device,profileId:h,ephemeralProfile:t});r.launched||(console.error(` ${r.message}`),process.exit(1)),console.log(` ${r.message}`)}function x(){console.log(`
19
+ `),process.exit(0));let e=o.find((k,s)=>o[s-1]==="--profile"),t=o.includes("--ephemeral");e&&t&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let h=e?c(e).id:void 0,i=p();if(!i){if(u(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await l("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:s}=await import("./install-desktop-H4HLLT7K.js");await s(["--yes"]),i=p()}i||process.exit(1)}console.log(` launching ${i.path}`);let g=await w(o,n),r=await a.launch({url:g,device:n.device,profileId:h,ephemeralProfile:t});r.launched||(console.error(` ${r.message}`),process.exit(1)),console.log(` ${r.message}`)}function x(){console.log(`
20
20
  sootsim desktop \u2014 launch or install the desktop companion
21
21
 
22
22
  usage:
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{e as $}from"./chunk-C3O6UUPY.js";import"./chunk-6UXXOG6P.js";import"./chunk-OQO3HU4Y.js";import"./chunk-SY7E43UY.js";import"./chunk-QPZVGHRV.js";import"./chunk-63JWRDM6.js";import"./chunk-YRRUK3EK.js";import{c as F,d as M,e as E}from"./chunk-GQVBLBUJ.js";import{a as P}from"./chunk-C4O4VRN5.js";import"./chunk-S7WXPIOY.js";import"./chunk-3EO5JEG7.js";import"./chunk-MUQDPJUP.js";import"./chunk-YZPSUNTO.js";import"./chunk-4XMPRQGE.js";import"./chunk-XMOULANJ.js";import"./chunk-RX4CFOVV.js";import"./chunk-VAGUPECL.js";import"./chunk-STWCCIBA.js";import"./chunk-Z6H5FR3U.js";import"./chunk-BFNAFH27.js";import"./chunk-66Z2ADUQ.js";import"./chunk-YIJFCR5T.js";import"./chunk-7RJEULWN.js";import"./chunk-ZS7OXPHR.js";import"./chunk-C3GMSIRT.js";import"./chunk-2KSLGBIU.js";import"./chunk-RMIKUUCO.js";import"./chunk-R7AS52NA.js";import"./chunk-M2LP2VYQ.js";import"./chunk-EPZUFQMX.js";import"./chunk-GH2OE6F6.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-LKAAQBT6.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";import{spawn as G}from"child_process";import{existsSync as x,mkdirSync as W,readFileSync as B,writeFileSync as y,unlinkSync as U}from"fs";import{tmpdir as N}from"os";import{dirname as C,resolve as c,join as J,relative as q}from"path";function H(){try{let t=import.meta.resolve("sootsim/detox");return C(t.startsWith("file://")?t.slice(7):t)}catch{return c(import.meta.dirname,"..","..","detox")}}var V=`
4
+ import{e as $}from"./chunk-RHGVZJIY.js";import"./chunk-GLECQIGB.js";import"./chunk-CJKSD5BZ.js";import"./chunk-CKMQ2YXQ.js";import"./chunk-CUVLXG63.js";import"./chunk-GEUU2WIL.js";import"./chunk-75YOUNTE.js";import{c as F,d as M,e as E}from"./chunk-5V5MOREL.js";import{a as P}from"./chunk-ZHPLBK34.js";import"./chunk-7W63IKAP.js";import"./chunk-KGIXNUUM.js";import"./chunk-QCEMDWL4.js";import"./chunk-Y7RQGSZD.js";import"./chunk-S5U22PVL.js";import"./chunk-VAFDFOE6.js";import"./chunk-ULJT3HDO.js";import"./chunk-WTNKX7QD.js";import"./chunk-Y5O5GK2Q.js";import"./chunk-75KNNHMR.js";import"./chunk-KKXSWEYS.js";import"./chunk-QUAY5AZB.js";import"./chunk-PHFRI2QF.js";import"./chunk-EHBHUE6S.js";import"./chunk-YS7YDOGW.js";import"./chunk-RATCQLQA.js";import"./chunk-ZB3UAYJ4.js";import"./chunk-PJ27D3WO.js";import"./chunk-W4S7GGPG.js";import"./chunk-VJMY2MX6.js";import"./chunk-ZDQO6TJQ.js";import"./chunk-J6ZKDIRN.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-6QZY6YO2.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";import{spawn as G}from"child_process";import{existsSync as x,mkdirSync as W,readFileSync as B,writeFileSync as y,unlinkSync as U}from"fs";import{tmpdir as N}from"os";import{dirname as C,resolve as c,join as J,relative as q}from"path";function H(){try{let t=import.meta.resolve("sootsim/detox");return C(t.startsWith("file://")?t.slice(7):t)}catch{return c(import.meta.dirname,"..","..","detox")}}var V=`
5
5
  sootsim detox \u2014 run detox-style tests against a sootsim shell
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import"./chunk-MUQDPJUP.js";import"./chunk-Z6H5FR3U.js";import{h as d,j as l,m as a}from"./chunk-7RJEULWN.js";import"./chunk-EPZUFQMX.js";import{b as c,c as r,d as g}from"./chunk-GH2OE6F6.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";function h(){console.log(`
4
+ import"./chunk-QCEMDWL4.js";import"./chunk-75KNNHMR.js";import{h as d,j as l,m as a}from"./chunk-EHBHUE6S.js";import"./chunk-ZDQO6TJQ.js";import{b as c,c as r,d as g}from"./chunk-J6ZKDIRN.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";function h(){console.log(`
5
5
  sootsim device \u2014 inspect or change the live device preset for a sim
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{h as E,j as R,m as b}from"./chunk-7RJEULWN.js";import{f as v}from"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
4
+ import{h as E,j as R,m as b}from"./chunk-EHBHUE6S.js";import{f as v}from"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
5
5
  sootsim get diagnosis \u2014 compact "what just went wrong?" report
6
6
 
7
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d,e}from"./chunk-WIYIQQQS.js";import"./chunk-PJ27D3WO.js";import"./chunk-W4S7GGPG.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";export{e as applyAutomaticSootsimCleanup,d as applySootsimCleanup,b as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,c as planSootsimCleanup};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import"./chunk-YTP5VCDL.js";import{f as a,g as b,h as c,i as d,j as e,k as f,l as g}from"./chunk-VAFDFOE6.js";import"./chunk-ULJT3HDO.js";import"./chunk-PJ27D3WO.js";import"./chunk-VNS6KYRJ.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";export{c as ALL_DRIVERS,g as buildDriverListRows,a as electronDriver,d as getAllDrivers,e as getDriver,b as playwrightDriver,f as resolveDriver};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as L,d as T}from"./chunk-EPMLSKSB.js";import{h as A,j as R,n as b}from"./chunk-7RJEULWN.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";import{spawnSync as x}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
4
+ import{c as L,d as T}from"./chunk-NBNEISXX.js";import{h as A,j as R,n as b}from"./chunk-EHBHUE6S.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";import{spawnSync as x}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
5
5
  sootsim film \u2014 record a flow flat, replay it on the 3d stage, save a clip
6
6
 
7
7
  usage:
@@ -35,7 +35,7 @@ examples:
35
35
  sootsim film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
36
36
  sootsim film flows/login.yaml --colorway deep-blue --environment on --env-shape pane --room on
37
37
  `),0;let s=e.find(d=>!d.startsWith("--")&&/\.ya?ml$/.test(d));if(!s||!V(I(s)))return console.error(` film: flow file not found: ${s??"(none given)"}`),1;let P=Number.parseInt(c(e,"--fps")??"30",10),h=c(e,"--script")??"hero-arc",z=e.includes("--keep-three"),v=s.replace(/^.*\//,"").replace(/\.ya?ml$/,""),O=c(e,"--out"),l=I(O??K(j(),"Desktop","sootsim-films",`${v}.webm`)),S=H(l).toLowerCase()===".mp4";if(S&&x("ffmpeg",["-version"]).status!==0)return console.error(" film: --out ends in .mp4 but ffmpeg is not installed"),console.error(" install ffmpeg or use a .webm output path"),1;let C=A(e,{port:a.port,stripValueFlags:[...X,...Q],stripBooleanFlags:J}),t=R({...C,commandTimeoutMs:6e4});try{let d=await r(t,`(() => { const s = window.SootSim?.bridges?.settings?.get?.() || {}
38
- return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-GXXVEHEW.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
38
+ return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-RP4UVYUA.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
39
39
  return { state: s?.state, hasBlob: !!s?.lastVideoBlob } })()`);if(i?.state==="idle"&&i.hasBlob){F=!0;break}}if(!F)return console.error(" film: flow recording never produced a video blob"),1;console.log(` film: flow captured (${(u/1e3).toFixed(1)}s)`),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeMode', true)"),await L(t),await n(1400),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', true)");let _=!1;for(let o=0;o<60;o++)if(await n(250),await r(t,`(() => { const rs = window.SootSim?.replayStore
40
40
  return rs?.value?.preview?.surface === 'video' && !!rs?.value?.preview?.flowVideoUrl })()`)){_=!0;break}if(!_)return console.error(" film: recording editor did not seed the replay store"),1;let p=T(e);delete p.script,p.resetPose=!0,await b(t,"SootSim.bridges.threeMode.configure",p),await n(2400),console.log(` film: filming the 3d stage (script: ${h})`);let M=await r(t,`(() => {
41
41
  const c = window.SootSim?.bridges?.threeMode?.getCanvas?.()
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{c,d,e,f,g,h}from"./chunk-RHGVZJIY.js";import"./chunk-GLECQIGB.js";import"./chunk-CJKSD5BZ.js";import{b as a,c as b}from"./chunk-CKMQ2YXQ.js";import"./chunk-CUVLXG63.js";import"./chunk-GEUU2WIL.js";import"./chunk-75YOUNTE.js";import"./chunk-5V5MOREL.js";import"./chunk-ZHPLBK34.js";import"./chunk-7W63IKAP.js";import"./chunk-KGIXNUUM.js";import"./chunk-QCEMDWL4.js";import"./chunk-Y7RQGSZD.js";import"./chunk-S5U22PVL.js";import"./chunk-VAFDFOE6.js";import"./chunk-ULJT3HDO.js";import"./chunk-WTNKX7QD.js";import"./chunk-Y5O5GK2Q.js";import"./chunk-75KNNHMR.js";import"./chunk-KKXSWEYS.js";import"./chunk-QUAY5AZB.js";import"./chunk-PHFRI2QF.js";import"./chunk-EHBHUE6S.js";import"./chunk-YS7YDOGW.js";import"./chunk-RATCQLQA.js";import"./chunk-ZB3UAYJ4.js";import"./chunk-PJ27D3WO.js";import"./chunk-W4S7GGPG.js";import"./chunk-VJMY2MX6.js";import"./chunk-ZDQO6TJQ.js";import"./chunk-J6ZKDIRN.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-6QZY6YO2.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";export{e as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,d as getLastFlowTraceSteps,g as hoistLeadingSimFlag,a as parseFlowFile,f as runFlowPlayback,h as runMaestroAuthoring,b as validateFlowFile};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c}from"./chunk-QILKSUH6.js";import"./chunk-GFKP5JIA.js";import"./chunk-VJMY2MX6.js";import"./chunk-ZDQO6TJQ.js";import"./chunk-J6ZKDIRN.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-6QZY6YO2.js";import"./chunk-SKGITCWL.js";import"./chunk-HI5MWY32.js";import"./chunk-P7MI3VFY.js";import"./chunk-YOIHAHR5.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as e,b as s}from"./chunk-LKAAQBT6.js";import"./chunk-XKAXZ4DS.js";var n=[{title:"Overview",route:"/docs/sootsim/cli"},...e.slice().sort((o,t)=>o.order-t.order).map(o=>({title:o.navTitle,route:`/docs/sootsim/cli/${o.slug}`}))];var i=["do","get"];function g(o){if(o.command)return o;let t=o.commandArgs.find(r=>!r.startsWith("-"));if(!t)return o;for(let r of i)if(s(r,t))return{...o,command:r};return o}export{g as resolveHiddenRuntimeAlias};
4
+ import{a as e,b as s}from"./chunk-6QZY6YO2.js";import"./chunk-YOIHAHR5.js";var n=[{title:"Overview",route:"/docs/sootsim/cli"},...e.slice().sort((o,t)=>o.order-t.order).map(o=>({title:o.navTitle,route:`/docs/sootsim/cli/${o.slug}`}))];var i=["do","get"];function g(o){if(o.command)return o;let t=o.commandArgs.find(r=>!r.startsWith("-"));if(!t)return o;for(let r of i)if(s(r,t))return{...o,command:r};return o}export{g as resolveHiddenRuntimeAlias};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,J as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,R as claimDaemonLockfile,x as configFilePath,F as consumeRuntimeUpgradeNotice,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,G as ensureSootsimHome,M as isDaemonLockfileFresh,N as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,H as readActiveRuntime,K as readDaemonLockfile,L as readDevBridgeLockfile,O as readLiveRuntimeVersions,C as readOrCreateAnonymousId,A as readPrivacyPreferences,y as readSharedConfig,S as removeDaemonLockfile,T as removeDevBridgeLockfile,l as runtimeDir,D as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,I as writeActiveRuntime,P as writeDaemonLockfile,Q as writeDevBridgeLockfile,B as writePrivacyPreferences,E as writeRuntimeUpgradeNotice,z as writeSharedConfig};
4
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,J as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,R as claimDaemonLockfile,x as configFilePath,F as consumeRuntimeUpgradeNotice,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,G as ensureSootsimHome,M as isDaemonLockfileFresh,N as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,H as readActiveRuntime,K as readDaemonLockfile,L as readDevBridgeLockfile,O as readLiveRuntimeVersions,C as readOrCreateAnonymousId,A as readPrivacyPreferences,y as readSharedConfig,S as removeDaemonLockfile,T as removeDevBridgeLockfile,l as runtimeDir,D as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,I as writeActiveRuntime,P as writeDaemonLockfile,Q as writeDevBridgeLockfile,B as writePrivacyPreferences,E as writeRuntimeUpgradeNotice,z as writeSharedConfig};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{i as a,j as b}from"./chunk-CKMQ2YXQ.js";import"./chunk-CUVLXG63.js";import"./chunk-GEUU2WIL.js";import"./chunk-75YOUNTE.js";import"./chunk-7W63IKAP.js";import"./chunk-KGIXNUUM.js";import"./chunk-QCEMDWL4.js";import"./chunk-Y7RQGSZD.js";import"./chunk-S5U22PVL.js";import"./chunk-VAFDFOE6.js";import"./chunk-ULJT3HDO.js";import"./chunk-WTNKX7QD.js";import"./chunk-Y5O5GK2Q.js";import"./chunk-75KNNHMR.js";import"./chunk-KKXSWEYS.js";import"./chunk-QUAY5AZB.js";import"./chunk-PHFRI2QF.js";import"./chunk-EHBHUE6S.js";import"./chunk-YS7YDOGW.js";import"./chunk-PJ27D3WO.js";import"./chunk-W4S7GGPG.js";import"./chunk-VJMY2MX6.js";import"./chunk-ZDQO6TJQ.js";import"./chunk-J6ZKDIRN.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-6QZY6YO2.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";export{a as printShellPerfReport,b as runInspect};
@@ -0,0 +1,4 @@
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a}from"./chunk-RIT4KI4Y.js";import"./chunk-6JYTKF5O.js";import"./chunk-ULJT3HDO.js";import"./chunk-YOIHAHR5.js";export{a as runInstallDesktop};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as k,d as v}from"./chunk-2KSLGBIU.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import x from"node:http";var b=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev",w="https://contrast.localhost:3000";async function P(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return b}function A(){console.log(`
4
+ import{b as k,d as v}from"./chunk-ZB3UAYJ4.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import x from"node:http";var b=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev",w="https://contrast.localhost:3000";async function P(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return b}function A(){console.log(`
5
5
  sootsim login \u2014 sign in so uploads can attach to your account
6
6
 
7
7
  usage:
@@ -23,6 +23,6 @@ options:
23
23
  <p style="color:#ccc">${r}</p>
24
24
  </div>
25
25
  </body>
26
- </html>`}async function E(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"local dev-login unavailable"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function G(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function z(r){(r.includes("--help")||r.includes("-h"))&&(A(),process.exit(0));let e=[...r],t=await P(C(e,"--origin"));if(G(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await E(t);if(o.ok){k({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let i=await v(t),d=i?.user?.email||o.email||i?.user?.id||o.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-XL3UDJSE.js");a({event:"cli_login_succeeded",identity:{userId:o.userId??i?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-XL3UDJSE.js");o({event:"cli_login_started",properties:{origin:t}}),await i()}let m=300*1e3,s=await new Promise(o=>{let i,d=!1,a=c=>{d||(d=!0,clearTimeout(i),o(c),f.close())},f=x.createServer((c,n)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),_=l.searchParams.get("state"),y=l.searchParams.get("token"),$=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(_!==u){n.statusCode=404,n.end("not found");return}if(n.setHeader("content-type","text/html; charset=utf-8"),p){n.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){n.end(g("missing token. close this tab and retry `sootsim login`.")),a({ok:!1,error:"missing token"});return}n.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:$,userId:T})}catch(l){n.statusCode=500,n.end(g("sign-in callback failed. retry `sootsim login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});i=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `sootsim login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",u),n.searchParams.set("port",String(c.port)),n.searchParams.set("contrast",t),console.log(" opening browser for sootsim login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
26
+ </html>`}async function E(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"local dev-login unavailable"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function G(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function z(r){(r.includes("--help")||r.includes("-h"))&&(A(),process.exit(0));let e=[...r],t=await P(C(e,"--origin"));if(G(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await E(t);if(o.ok){k({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let i=await v(t),d=i?.user?.email||o.email||i?.user?.id||o.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-LLD24AVX.js");a({event:"cli_login_succeeded",identity:{userId:o.userId??i?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-LLD24AVX.js");o({event:"cli_login_started",properties:{origin:t}}),await i()}let m=300*1e3,s=await new Promise(o=>{let i,d=!1,a=c=>{d||(d=!0,clearTimeout(i),o(c),f.close())},f=x.createServer((c,n)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),_=l.searchParams.get("state"),y=l.searchParams.get("token"),$=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(_!==u){n.statusCode=404,n.end("not found");return}if(n.setHeader("content-type","text/html; charset=utf-8"),p){n.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){n.end(g("missing token. close this tab and retry `sootsim login`.")),a({ok:!1,error:"missing token"});return}n.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:$,userId:T})}catch(l){n.statusCode=500,n.end(g("sign-in callback failed. retry `sootsim login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});i=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `sootsim login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",u),n.searchParams.set("port",String(c.port)),n.searchParams.set("contrast",t),console.log(" opening browser for sootsim login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
27
27
  ${n.toString()}
28
- `),U(n.toString())})});if(!s.ok){let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-XL3UDJSE.js");o({event:"cli_login_failed",properties:{origin:t,error:s.error}}),await i(),console.error(` login failed: ${s.error}`),process.exit(1)}k({token:s.token,user:s.userId?{id:s.userId,email:s.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||s.email||h?.user?.id||s.userId,{trackCliEvent:O,flushCliTelemetry:S}=await import("./telemetry-XL3UDJSE.js");O({event:"cli_login_succeeded",identity:{userId:s.userId??h?.user?.id??null},properties:{origin:t}}),await S(),console.log(` signed in${I?` as ${I}`:""}`)}export{z as runLogin};
28
+ `),U(n.toString())})});if(!s.ok){let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-LLD24AVX.js");o({event:"cli_login_failed",properties:{origin:t,error:s.error}}),await i(),console.error(` login failed: ${s.error}`),process.exit(1)}k({token:s.token,user:s.userId?{id:s.userId,email:s.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||s.email||h?.user?.id||s.userId,{trackCliEvent:O,flushCliTelemetry:S}=await import("./telemetry-LLD24AVX.js");O({event:"cli_login_succeeded",identity:{userId:s.userId??h?.user?.id??null},properties:{origin:t}}),await S(),console.log(` signed in${I?` as ${I}`:""}`)}export{z as runLogin};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as r,d as i}from"./chunk-C3GMSIRT.js";import{a as t,c as o}from"./chunk-2KSLGBIU.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
4
+ import{c as r,d as i}from"./chunk-RATCQLQA.js";import{a as t,c as o}from"./chunk-ZB3UAYJ4.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as E,d as O,f as L,g as R,h as P}from"./chunk-C3O6UUPY.js";import"./chunk-6UXXOG6P.js";import"./chunk-OQO3HU4Y.js";import{b as k}from"./chunk-SY7E43UY.js";import"./chunk-QPZVGHRV.js";import{a as S}from"./chunk-63JWRDM6.js";import"./chunk-YRRUK3EK.js";import{b as $,c as F,d as T,e as M}from"./chunk-GQVBLBUJ.js";import{a as A}from"./chunk-C4O4VRN5.js";import"./chunk-S7WXPIOY.js";import"./chunk-3EO5JEG7.js";import"./chunk-MUQDPJUP.js";import"./chunk-YZPSUNTO.js";import"./chunk-4XMPRQGE.js";import"./chunk-XMOULANJ.js";import"./chunk-RX4CFOVV.js";import"./chunk-VAGUPECL.js";import"./chunk-STWCCIBA.js";import"./chunk-Z6H5FR3U.js";import"./chunk-BFNAFH27.js";import"./chunk-66Z2ADUQ.js";import"./chunk-YIJFCR5T.js";import"./chunk-7RJEULWN.js";import"./chunk-ZS7OXPHR.js";import"./chunk-C3GMSIRT.js";import"./chunk-2KSLGBIU.js";import"./chunk-RMIKUUCO.js";import"./chunk-R7AS52NA.js";import"./chunk-M2LP2VYQ.js";import"./chunk-EPZUFQMX.js";import"./chunk-GH2OE6F6.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-LKAAQBT6.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";import*as s from"fs";import*as a from"path";var I=[".maestro","maestro"];function W(){console.log(`
4
+ import{c as E,d as O,f as L,g as R,h as P}from"./chunk-RHGVZJIY.js";import"./chunk-GLECQIGB.js";import"./chunk-CJKSD5BZ.js";import{b as k}from"./chunk-CKMQ2YXQ.js";import"./chunk-CUVLXG63.js";import{a as S}from"./chunk-GEUU2WIL.js";import"./chunk-75YOUNTE.js";import{b as $,c as F,d as T,e as M}from"./chunk-5V5MOREL.js";import{a as A}from"./chunk-ZHPLBK34.js";import"./chunk-7W63IKAP.js";import"./chunk-KGIXNUUM.js";import"./chunk-QCEMDWL4.js";import"./chunk-Y7RQGSZD.js";import"./chunk-S5U22PVL.js";import"./chunk-VAFDFOE6.js";import"./chunk-ULJT3HDO.js";import"./chunk-WTNKX7QD.js";import"./chunk-Y5O5GK2Q.js";import"./chunk-75KNNHMR.js";import"./chunk-KKXSWEYS.js";import"./chunk-QUAY5AZB.js";import"./chunk-PHFRI2QF.js";import"./chunk-EHBHUE6S.js";import"./chunk-YS7YDOGW.js";import"./chunk-RATCQLQA.js";import"./chunk-ZB3UAYJ4.js";import"./chunk-PJ27D3WO.js";import"./chunk-W4S7GGPG.js";import"./chunk-VJMY2MX6.js";import"./chunk-ZDQO6TJQ.js";import"./chunk-J6ZKDIRN.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-6QZY6YO2.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";import*as s from"fs";import*as a from"path";var I=[".maestro","maestro"];function W(){console.log(`
5
5
  sootsim maestro \u2014 author and run Maestro YAML flows against sootsim
6
6
 
7
7
  usage:
@@ -91,7 +91,7 @@ appId: com.example.app
91
91
  - inputText: "secret123"
92
92
  - tapOn: "Sign in"
93
93
  - assertVisible: "Welcome"
94
- `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function Q(o,n={}){if(o.includes("--help")||o.includes("-h"))return W(),0;if(o.includes("--list-compat"))return D(),0;let e;try{e=Y(o)}catch(r){return console.error(` error: ${r.message}`),1}e=R(e);let t=process.cwd(),i=e[0];if(i==="init")return _(t);if(i==="generate"){let{runMaestroGenerate:r}=await import("./maestro-generate-N2BJXJDH.js");return r(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return P(e);e=J(e);let c=null,u;if(i==="test"){let r=e.slice(1).find(f=>!U(f));r?(c=a.resolve(t,r),u=e.slice(1).filter(f=>f!==r)):(c=j(t),u=e.slice(1))}else i&&!U(i)?(c=a.resolve(t,i),u=e.slice(1)):(c=j(t),u=e);if(!c)return console.error(`
94
+ `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function Q(o,n={}){if(o.includes("--help")||o.includes("-h"))return W(),0;if(o.includes("--list-compat"))return D(),0;let e;try{e=Y(o)}catch(r){return console.error(` error: ${r.message}`),1}e=R(e);let t=process.cwd(),i=e[0];if(i==="init")return _(t);if(i==="generate"){let{runMaestroGenerate:r}=await import("./maestro-generate-P4MDFYMV.js");return r(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return P(e);e=J(e);let c=null,u;if(i==="test"){let r=e.slice(1).find(f=>!U(f));r?(c=a.resolve(t,r),u=e.slice(1).filter(f=>f!==r)):(c=j(t),u=e.slice(1))}else i&&!U(i)?(c=a.resolve(t,i),u=e.slice(1)):(c=j(t),u=e);if(!c)return console.error(`
95
95
  error: no maestro flows found.
96
96
  expected one of: ${I.map(r=>`./${r}/`).join(", ")}
97
97
  or pass a flow explicitly: sootsim maestro test path/to/flow.yaml
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as v}from"./chunk-63JWRDM6.js";import{b as O,d as A,e as E}from"./chunk-GQVBLBUJ.js";import{a as x,b as T}from"./chunk-C4O4VRN5.js";import{f as y}from"./chunk-4XMPRQGE.js";import"./chunk-VAGUPECL.js";import"./chunk-STWCCIBA.js";import"./chunk-BFNAFH27.js";import"./chunk-YIJFCR5T.js";import{h as b,j as S}from"./chunk-7RJEULWN.js";import"./chunk-C3GMSIRT.js";import"./chunk-2KSLGBIU.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";import{mkdtempSync as R,writeFileSync as N}from"fs";import{tmpdir as C}from"os";import{join as k}from"path";var J=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",_=18e3,j=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function V(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var P=new Set(["--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function G(e){for(let t=0;t<e.length;t++){let r=e[t];if(r){if(P.has(r)){t+=1;continue}if(!r.startsWith("-"))return{prompt:r,index:t}}}return null}function H(e,t){return e.filter((r,o)=>o!==t)}async function Y(e,t){let r=H(e,t),o=b(r,{stripBooleanFlags:["--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...P]}),i=S(o);try{let n=await y(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),s=[n.shell?`shell: ${JSON.stringify(n.shell)}`:"",n.keyboard?`keyboard: ${JSON.stringify(n.keyboard)}`:"",typeof n.nodeCount=="number"?`nodes: ${n.nodeCount}`:"",n.tree||""].filter(Boolean).join(`
4
+ import{a as v}from"./chunk-GEUU2WIL.js";import{b as O,d as A,e as E}from"./chunk-5V5MOREL.js";import{a as x,b as T}from"./chunk-ZHPLBK34.js";import{f as y}from"./chunk-S5U22PVL.js";import"./chunk-WTNKX7QD.js";import"./chunk-Y5O5GK2Q.js";import"./chunk-KKXSWEYS.js";import"./chunk-PHFRI2QF.js";import{h as b,j as S}from"./chunk-EHBHUE6S.js";import"./chunk-RATCQLQA.js";import"./chunk-ZB3UAYJ4.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";import{mkdtempSync as R,writeFileSync as N}from"fs";import{tmpdir as C}from"os";import{join as k}from"path";var J=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",_=18e3,j=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function V(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var P=new Set(["--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function G(e){for(let t=0;t<e.length;t++){let r=e[t];if(r){if(P.has(r)){t+=1;continue}if(!r.startsWith("-"))return{prompt:r,index:t}}}return null}function H(e,t){return e.filter((r,o)=>o!==t)}async function Y(e,t){let r=H(e,t),o=b(r,{stripBooleanFlags:["--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...P]}),i=S(o);try{let n=await y(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),s=[n.shell?`shell: ${JSON.stringify(n.shell)}`:"",n.keyboard?`keyboard: ${JSON.stringify(n.keyboard)}`:"",typeof n.nodeCount=="number"?`nodes: ${n.nodeCount}`:"",n.tree||""].filter(Boolean).join(`
5
5
  `);return s.length>_?s.slice(0,_)+`
6
6
  [tree truncated]`:s}finally{i.close()}}var K=`
7
7
  You write Maestro-compatible SootSim YAML flows from a user's plain-language test goal.
@@ -32,5 +32,5 @@ ${t||"[no tree available]"}
32
32
 
33
33
  Generate the shortest replayable flow that verifies the goal from this current state.
34
34
  `.trim()}async function W(e){let t=await fetch(`${e.origin.replace(/\/$/,"")}/api/llm`,{method:"POST",headers:{"content-type":"application/json",authorization:e.authHeader},body:JSON.stringify({modelId:J,context:{systemPrompt:K,messages:[{role:"user",content:z(e.prompt,e.describe),timestamp:Date.now()}]},options:{maxTokens:1800,temperature:.2},threadId:null}),signal:AbortSignal.timeout(j)});if(!t.ok||!t.body){let a=await t.text().catch(()=>"");throw new Error(`/api/llm ${t.status}${a?`: ${a}`:""}`)}let r=t.body.getReader(),o=new TextDecoder,i=[],n="",c=a=>{let l=a.trim();if(!l)return;let u=JSON.parse(l);if(u.type==="text_delta"&&u.delta)i.push(u.delta);else if(u.type==="error")throw new Error(u.errorMessage||"llm error")};for(;;){let{value:a,done:l}=await r.read();if(l)break;n+=o.decode(a,{stream:!0});let u;for(;(u=n.indexOf(`
35
- `))>=0;)c(n.slice(0,u)),n=n.slice(u+1)}n+=o.decode(),n.trim()&&c(n);let s=i.join("").trim();if(!s)throw new Error("llm returned an empty test flow");return s}function X(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function M(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function q(e){let t=X(e);if(!M(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"SootSim generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((n,c)=>{if(!M(n))throw new Error(`flow step ${c+1} is not an object`);return n});return{summary:r,steps:i,yamlText:v.stringify(i)}}function Q(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],n=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),c=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let s=0;s<e.length;s++){if(s===t)continue;let a=e[s];if(a==="--origin"||a==="--preview-origin"){s+=1;continue}if(a==="--public-origin"){let l=e[s+1];l&&i.push("--preview-public-origin",l),s+=1;continue}if(n.has(a)){let l=e[s+1];l&&i.push(a,l),s+=1;continue}c.has(a)&&i.push(a)}return i}async function le(e){let t=G(e);if(!t)return console.error(' usage: sootsim maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=x();if(!i||i.kind==="github")return console.error(' sootsim maestro generate "<goal>" needs a login or SOOTSIM_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let n=T(i),c=await E(V(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let s=await Y(e,o);console.log(" generating Maestro flow\u2026");let a=await W({prompt:r,describe:s,origin:c,authHeader:n}),l=q(a),u=R(k(C(),"sootsim-maestro-generate-")),m=k(u,"flow.yaml");N(m,l.yamlText),console.log(` flow: ${m}`);let F=Date.now(),{runFlowPlayback:I,getLastFlowPreviewUploadResult:$,getLastFlowTraceSteps:D}=await import("./flow-GXXVEHEW.js"),L=Q(e,o,m,c),w=await I(L),p=$(),h=D(),U=h.find(B=>B.status==="failure"),g=w===0?"passed":"failed",d=await A({origin:c,kind:"maestro",prompt:r,summary:l.summary,status:g,failureMessage:g==="failed"?U?.error??"flow playback failed":null,previewShareId:p?.shareId??null,owner:f(e,"--owner")??null,repo:f(e,"--repo")??null,durationMs:Date.now()-F,flowYamlSizeBytes:Buffer.byteLength(l.yamlText,"utf8"),...O(h),auth:i});return console.log(`
35
+ `))>=0;)c(n.slice(0,u)),n=n.slice(u+1)}n+=o.decode(),n.trim()&&c(n);let s=i.join("").trim();if(!s)throw new Error("llm returned an empty test flow");return s}function X(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function M(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function q(e){let t=X(e);if(!M(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"SootSim generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((n,c)=>{if(!M(n))throw new Error(`flow step ${c+1} is not an object`);return n});return{summary:r,steps:i,yamlText:v.stringify(i)}}function Q(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],n=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),c=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let s=0;s<e.length;s++){if(s===t)continue;let a=e[s];if(a==="--origin"||a==="--preview-origin"){s+=1;continue}if(a==="--public-origin"){let l=e[s+1];l&&i.push("--preview-public-origin",l),s+=1;continue}if(n.has(a)){let l=e[s+1];l&&i.push(a,l),s+=1;continue}c.has(a)&&i.push(a)}return i}async function le(e){let t=G(e);if(!t)return console.error(' usage: sootsim maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=x();if(!i||i.kind==="github")return console.error(' sootsim maestro generate "<goal>" needs a login or SOOTSIM_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let n=T(i),c=await E(V(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let s=await Y(e,o);console.log(" generating Maestro flow\u2026");let a=await W({prompt:r,describe:s,origin:c,authHeader:n}),l=q(a),u=R(k(C(),"sootsim-maestro-generate-")),m=k(u,"flow.yaml");N(m,l.yamlText),console.log(` flow: ${m}`);let F=Date.now(),{runFlowPlayback:I,getLastFlowPreviewUploadResult:$,getLastFlowTraceSteps:D}=await import("./flow-RP4UVYUA.js"),L=Q(e,o,m,c),w=await I(L),p=$(),h=D(),U=h.find(B=>B.status==="failure"),g=w===0?"passed":"failed",d=await A({origin:c,kind:"maestro",prompt:r,summary:l.summary,status:g,failureMessage:g==="failed"?U?.error??"flow playback failed":null,previewShareId:p?.shareId??null,owner:f(e,"--owner")??null,repo:f(e,"--repo")??null,durationMs:Date.now()-F,flowYamlSizeBytes:Buffer.byteLength(l.yamlText,"utf8"),...O(h),auth:i});return console.log(`
36
36
  result: ${g}`),d&&console.log(` run: ${d.id}`),p?.previewUrl&&console.log(` preview: ${p.previewUrl}`),d?.traceUrl&&console.log(` replay: ${d.traceUrl}`),w}export{le as runMaestroGenerate};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as s,b as i}from"./chunk-EPMLSKSB.js";import"./chunk-7RJEULWN.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";async function r(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
+ import{a as s,b as i}from"./chunk-NBNEISXX.js";import"./chunk-EHBHUE6S.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";async function r(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
5
5
  sootsim mode screenshot \u2014 toggle the screenshot-mode chrome overlay
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d}from"./chunk-BFNAFH27.js";import"./chunk-XKAXZ4DS.js";export{d as __withOptionalDemoAppsForTests,a as findInternalDemoRegistry,b as loadOptionalDemoApps,c as optionalDemoAppsSync};
4
+ import{a,b,c,d}from"./chunk-KKXSWEYS.js";import"./chunk-YOIHAHR5.js";export{d as __withOptionalDemoAppsForTests,a as findInternalDemoRegistry,b as loadOptionalDemoApps,c as optionalDemoAppsSync};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{j as x}from"./chunk-SY7E43UY.js";import"./chunk-QPZVGHRV.js";import"./chunk-63JWRDM6.js";import"./chunk-YRRUK3EK.js";import"./chunk-S7WXPIOY.js";import"./chunk-3EO5JEG7.js";import"./chunk-MUQDPJUP.js";import"./chunk-YZPSUNTO.js";import"./chunk-4XMPRQGE.js";import"./chunk-XMOULANJ.js";import"./chunk-RX4CFOVV.js";import"./chunk-VAGUPECL.js";import"./chunk-STWCCIBA.js";import"./chunk-Z6H5FR3U.js";import"./chunk-BFNAFH27.js";import"./chunk-66Z2ADUQ.js";import"./chunk-YIJFCR5T.js";import{h as R,j as N,m as d,n as S}from"./chunk-7RJEULWN.js";import"./chunk-ZS7OXPHR.js";import"./chunk-RMIKUUCO.js";import"./chunk-R7AS52NA.js";import"./chunk-M2LP2VYQ.js";import"./chunk-EPZUFQMX.js";import"./chunk-GH2OE6F6.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-LKAAQBT6.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";import{mkdirSync as D,writeFileSync as W}from"fs";import{dirname as A,resolve as J}from"path";import{WebSocket as B}from"ws";var C=e=>new Promise(o=>setTimeout(o,e)),v=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(o){this.ws=new B(o,{maxPayload:1<<28}),this.ready=new Promise((r,t)=>{this.ws.once("open",()=>r()),this.ws.once("error",t)}),this.ws.on("message",r=>{let t=JSON.parse(r.toString());if(t.id&&this.pending.has(t.id)){let{res:n,rej:s}=this.pending.get(t.id);this.pending.delete(t.id),t.error?s(new Error(JSON.stringify(t.error))):n(t.result)}else if(t.method)for(let n of this.listeners)n(t.method,t.params)})}waitOpen(){return this.ready}on(o){this.listeners.add(o)}send(o,r={},t){let n=this.nextId++;return new Promise((s,a)=>{this.pending.set(n,{res:s,rej:a}),this.ws.send(JSON.stringify({id:n,method:o,params:r,...t?{sessionId:t}:{}}))})}close(){try{this.ws.close()}catch{}}};async function O(e,o){let r=Number(h(e,"--duration")??"5");if(!Number.isFinite(r)||r<=0)return console.error(" --duration must be a positive number (seconds)"),1;let t=Number(h(e,"--sample-interval")??"0.1"),n=Number(h(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=h(e,"--match")??"/rn/",a=h(e,"--output")??h(e,"-o"),i=J(process.cwd(),a??"/tmp/sootsim.cpuprofile"),l=[];try{l=await(await fetch(`http://localhost:${n}/json/list`)).json()}catch{return E(n),1}let f=l.find(m=>m.type==="page"&&m.url.includes(s));if(!f)return console.error(` no page target matching "${s}" on CDP :${n}`),console.error(` open targets: ${l.map(m=>m.url).join(", ")||"(none)"}`),1;let u=new v(f.webSocketDebuggerUrl);await u.waitOpen();try{let m=new Map;if(u.on((c,p)=>{c==="Target.attachedToTarget"&&p.targetInfo?.type==="worker"&&m.set(p.sessionId,p.targetInfo.url),c==="Target.detachedFromTarget"&&m.delete(p.sessionId)}),await u.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await C(500),m.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let c of m.keys())await u.send("Profiler.enable",{},c),await u.send("Profiler.setSamplingInterval",{interval:t*1e3},c),await u.send("Profiler.start",{},c);console.log(` recording ${r}s across ${m.size} worker(s) \u2014 interact now\u2026`),await C(r*1e3);let b=[];for(let[c,p]of m){let{profile:y}=await u.send("Profiler.stop",{},c);b.push({url:p,profile:y})}return b.sort((c,p)=>p.profile.samples.length-c.profile.samples.length),D(A(i),{recursive:!0}),b.forEach((c,p)=>{let y=p===0?i:i.replace(/(\.[^.]+)?$/,`.worker${p}$1`);if(W(y,JSON.stringify(c.profile)),console.log(` ${P(c.url)}: ${c.profile.samples.length} samples \u2192 ${y}`),o.verbose&&c.profile.samples.length>0)for(let $ of U(c.profile,12))console.log(` ${$.pct.toFixed(1).padStart(5)}% ${$.name} ${$.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{u.close()}}function E(e){console.error(` perf cpu 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 perf cpu --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 \\"),console.error(" --use-gl=angle --use-angle=metal \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function P(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function U(e,o){let r=e.samples.length||1,t=new Map;for(let n of e.nodes){let s=n.callFrame,a=`${s.functionName||"(anonymous)"}@${P(s.url)}:${s.lineNumber}`,i=t.get(a)??{self:0,name:s.functionName||"(anonymous)",url:`${P(s.url)}:${s.lineNumber}`};i.self+=n.hitCount??0,t.set(a,i)}return[...t.values()].map(n=>({...n,pct:n.self/r*100})).sort((n,s)=>s.self-n.self).slice(0,o)}function h(e,o){let r=e.indexOf(o);if(!(r<0||r===e.length-1))return e[r+1]}function j(){console.log(`
4
+ import{j as x}from"./chunk-CKMQ2YXQ.js";import"./chunk-CUVLXG63.js";import"./chunk-GEUU2WIL.js";import"./chunk-75YOUNTE.js";import"./chunk-7W63IKAP.js";import"./chunk-KGIXNUUM.js";import"./chunk-QCEMDWL4.js";import"./chunk-Y7RQGSZD.js";import"./chunk-S5U22PVL.js";import"./chunk-VAFDFOE6.js";import"./chunk-ULJT3HDO.js";import"./chunk-WTNKX7QD.js";import"./chunk-Y5O5GK2Q.js";import"./chunk-75KNNHMR.js";import"./chunk-KKXSWEYS.js";import"./chunk-QUAY5AZB.js";import"./chunk-PHFRI2QF.js";import{h as R,j as N,m as d,n as S}from"./chunk-EHBHUE6S.js";import"./chunk-YS7YDOGW.js";import"./chunk-PJ27D3WO.js";import"./chunk-W4S7GGPG.js";import"./chunk-VJMY2MX6.js";import"./chunk-ZDQO6TJQ.js";import"./chunk-J6ZKDIRN.js";import"./chunk-F2WH6XM7.js";import"./chunk-VNS6KYRJ.js";import"./chunk-6QZY6YO2.js";import"./chunk-SKGITCWL.js";import"./chunk-YOIHAHR5.js";import{mkdirSync as D,writeFileSync as W}from"fs";import{dirname as A,resolve as J}from"path";import{WebSocket as B}from"ws";var C=e=>new Promise(o=>setTimeout(o,e)),v=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(o){this.ws=new B(o,{maxPayload:1<<28}),this.ready=new Promise((r,t)=>{this.ws.once("open",()=>r()),this.ws.once("error",t)}),this.ws.on("message",r=>{let t=JSON.parse(r.toString());if(t.id&&this.pending.has(t.id)){let{res:n,rej:s}=this.pending.get(t.id);this.pending.delete(t.id),t.error?s(new Error(JSON.stringify(t.error))):n(t.result)}else if(t.method)for(let n of this.listeners)n(t.method,t.params)})}waitOpen(){return this.ready}on(o){this.listeners.add(o)}send(o,r={},t){let n=this.nextId++;return new Promise((s,a)=>{this.pending.set(n,{res:s,rej:a}),this.ws.send(JSON.stringify({id:n,method:o,params:r,...t?{sessionId:t}:{}}))})}close(){try{this.ws.close()}catch{}}};async function O(e,o){let r=Number(h(e,"--duration")??"5");if(!Number.isFinite(r)||r<=0)return console.error(" --duration must be a positive number (seconds)"),1;let t=Number(h(e,"--sample-interval")??"0.1"),n=Number(h(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=h(e,"--match")??"/rn/",a=h(e,"--output")??h(e,"-o"),i=J(process.cwd(),a??"/tmp/sootsim.cpuprofile"),l=[];try{l=await(await fetch(`http://localhost:${n}/json/list`)).json()}catch{return E(n),1}let f=l.find(m=>m.type==="page"&&m.url.includes(s));if(!f)return console.error(` no page target matching "${s}" on CDP :${n}`),console.error(` open targets: ${l.map(m=>m.url).join(", ")||"(none)"}`),1;let u=new v(f.webSocketDebuggerUrl);await u.waitOpen();try{let m=new Map;if(u.on((c,p)=>{c==="Target.attachedToTarget"&&p.targetInfo?.type==="worker"&&m.set(p.sessionId,p.targetInfo.url),c==="Target.detachedFromTarget"&&m.delete(p.sessionId)}),await u.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await C(500),m.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let c of m.keys())await u.send("Profiler.enable",{},c),await u.send("Profiler.setSamplingInterval",{interval:t*1e3},c),await u.send("Profiler.start",{},c);console.log(` recording ${r}s across ${m.size} worker(s) \u2014 interact now\u2026`),await C(r*1e3);let b=[];for(let[c,p]of m){let{profile:y}=await u.send("Profiler.stop",{},c);b.push({url:p,profile:y})}return b.sort((c,p)=>p.profile.samples.length-c.profile.samples.length),D(A(i),{recursive:!0}),b.forEach((c,p)=>{let y=p===0?i:i.replace(/(\.[^.]+)?$/,`.worker${p}$1`);if(W(y,JSON.stringify(c.profile)),console.log(` ${P(c.url)}: ${c.profile.samples.length} samples \u2192 ${y}`),o.verbose&&c.profile.samples.length>0)for(let $ of U(c.profile,12))console.log(` ${$.pct.toFixed(1).padStart(5)}% ${$.name} ${$.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{u.close()}}function E(e){console.error(` perf cpu 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 perf cpu --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 \\"),console.error(" --use-gl=angle --use-angle=metal \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function P(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function U(e,o){let r=e.samples.length||1,t=new Map;for(let n of e.nodes){let s=n.callFrame,a=`${s.functionName||"(anonymous)"}@${P(s.url)}:${s.lineNumber}`,i=t.get(a)??{self:0,name:s.functionName||"(anonymous)",url:`${P(s.url)}:${s.lineNumber}`};i.self+=n.hitCount??0,t.set(a,i)}return[...t.values()].map(n=>({...n,pct:n.self/r*100})).sort((n,s)=>s.self-n.self).slice(0,o)}function h(e,o){let r=e.indexOf(o);if(!(r<0||r===e.length-1))return e[r+1]}function j(){console.log(`
5
5
  sootsim perf react \u2014 inspect React component render cost in the tenant worker
6
6
 
7
7
  usage: