sootsim 0.1.90 → 0.1.91

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 (142) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-KD75M5AD.js → agent-RDJ5OOIL.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-Q3R2VGWQ.js → agent-wrapper-K2XIYABM.js} +2 -2
  4. package/dist-cli/chunks/{assert-TH3EF5UK.js → assert-MOH6CTD2.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-24A5RRBQ.js +2 -0
  6. package/dist-cli/chunks/beta-IGE75E4B.js +2 -0
  7. package/dist-cli/chunks/{chunk-7CA35CG7.js → chunk-2Q32WWKY.js} +1 -1
  8. package/dist-cli/chunks/{chunk-SDQLAKCM.js → chunk-3EQCMOTV.js} +3 -3
  9. package/dist-cli/chunks/{chunk-J6RB33XR.js → chunk-3FMTRV2A.js} +2 -2
  10. package/dist-cli/chunks/{chunk-4SJS4UO3.js → chunk-3IUIN356.js} +1 -1
  11. package/dist-cli/chunks/{chunk-5JMOVKGM.js → chunk-4DTA5UKZ.js} +2 -2
  12. package/dist-cli/chunks/chunk-4WUXZXWE.js +1 -0
  13. package/dist-cli/chunks/{chunk-RRDHCABJ.js → chunk-54EVAG4O.js} +1 -1
  14. package/dist-cli/chunks/{chunk-F3XCNXOY.js → chunk-5DYLJJRL.js} +2 -2
  15. package/dist-cli/chunks/{chunk-4INIBCYZ.js → chunk-63E34ET7.js} +2 -2
  16. package/dist-cli/chunks/{chunk-J64TT3CL.js → chunk-6R3S7M66.js} +2 -2
  17. package/dist-cli/chunks/{chunk-J6Y3O6KO.js → chunk-7HFHTCKD.js} +2 -2
  18. package/dist-cli/chunks/{chunk-VFIXAYS5.js → chunk-7WLL6LH4.js} +2 -2
  19. package/dist-cli/chunks/{chunk-L2TEJXVI.js → chunk-ACWM3RKN.js} +2 -2
  20. package/dist-cli/chunks/{chunk-6UFYAXFV.js → chunk-APQYD7HL.js} +2 -2
  21. package/dist-cli/chunks/{chunk-GPYYSXEX.js → chunk-AWEEXX2S.js} +5 -5
  22. package/dist-cli/chunks/{chunk-WLBHB55Z.js → chunk-B6NQHHMB.js} +2 -2
  23. package/dist-cli/chunks/chunk-D3J6G7JL.js +2 -0
  24. package/dist-cli/chunks/{chunk-5YAADNTI.js → chunk-DFDRE6OB.js} +1 -1
  25. package/dist-cli/chunks/{chunk-PAK43NT5.js → chunk-DUPGSOQC.js} +1 -1
  26. package/dist-cli/chunks/{chunk-YR3LVC5V.js → chunk-HUUC3TYH.js} +1 -1
  27. package/dist-cli/chunks/{chunk-DLT5ZB63.js → chunk-J6GWUBW3.js} +2 -2
  28. package/dist-cli/chunks/{chunk-EXBBXVB3.js → chunk-KRZU6LRW.js} +2 -2
  29. package/dist-cli/chunks/{chunk-5KOQJGIB.js → chunk-LQQUA6BP.js} +2 -2
  30. package/dist-cli/chunks/{chunk-YNAHQ7QZ.js → chunk-MERAEG54.js} +1 -1
  31. package/dist-cli/chunks/{chunk-ZCTYC33O.js → chunk-NAB63JVH.js} +1 -1
  32. package/dist-cli/chunks/chunk-OT7LR5RE.js +1 -0
  33. package/dist-cli/chunks/{chunk-PKLG3XOP.js → chunk-QWYIMQHF.js} +1 -1
  34. package/dist-cli/chunks/{chunk-6TCGDWMB.js → chunk-QX6G6HA2.js} +1 -1
  35. package/dist-cli/chunks/{chunk-NOGTBNWP.js → chunk-RL7P7EQA.js} +2 -2
  36. package/dist-cli/chunks/{chunk-AR3LYAV5.js → chunk-SISOWHRQ.js} +3 -3
  37. package/dist-cli/chunks/{chunk-CLPPEWVH.js → chunk-T3CUB2ZH.js} +2 -2
  38. package/dist-cli/chunks/{chunk-CM27M3L2.js → chunk-T77FN74G.js} +2 -2
  39. package/dist-cli/chunks/{chunk-DMGC4JSN.js → chunk-TBIILRLW.js} +3 -3
  40. package/dist-cli/chunks/chunk-TVRQ3SOL.js +79 -0
  41. package/dist-cli/chunks/{chunk-UQ4PTAAN.js → chunk-UBF3TGKU.js} +2 -2
  42. package/dist-cli/chunks/{chunk-5QE7QJZ5.js → chunk-VFFWR44I.js} +1 -1
  43. package/dist-cli/chunks/{chunk-STC3XOWJ.js → chunk-VQSP53OC.js} +2 -2
  44. package/dist-cli/chunks/{chunk-426P5244.js → chunk-W3AG5PFE.js} +2 -2
  45. package/dist-cli/chunks/{chunk-L2JE65ES.js → chunk-W7I7OUOK.js} +1 -1
  46. package/dist-cli/chunks/chunk-WQQQQZUL.js +2 -0
  47. package/dist-cli/chunks/chunk-XVHJZCMT.js +1 -0
  48. package/dist-cli/chunks/{chunk-O33KUMYB.js → chunk-Y53I2KD4.js} +1 -1
  49. package/dist-cli/chunks/{chunk-6HC2ZXG5.js → chunk-YK4I75GA.js} +1 -1
  50. package/dist-cli/chunks/cli-version-B7YMJ7C3.js +2 -0
  51. package/dist-cli/chunks/{compat-77GP6QPI.js → compat-XMDCTR7Q.js} +3 -3
  52. package/dist-cli/chunks/{config-J3NXEG6L.js → config-6EJMWP2Q.js} +2 -2
  53. package/dist-cli/chunks/{control-OSUGPLYY.js → control-OQTVATE3.js} +2 -2
  54. package/dist-cli/chunks/{cpu-profile-H2OKMLRW.js → cpu-profile-3K4EHQGQ.js} +2 -2
  55. package/dist-cli/chunks/{daemon-2GFPR7I2.js → daemon-OIVJUCY4.js} +2 -2
  56. package/dist-cli/chunks/{debug-RFR6G6MI.js → debug-EUROZ7TJ.js} +3 -3
  57. package/dist-cli/chunks/{detox-2TZ5KWG5.js → detox-H2BVWCR3.js} +2 -2
  58. package/dist-cli/chunks/{device-YCVGUSQX.js → device-GIPGWDDE.js} +2 -2
  59. package/dist-cli/chunks/{diagnose-F2QUL24I.js → diagnose-AM5HDCQZ.js} +2 -2
  60. package/dist-cli/chunks/drivers-FHFWDATI.js +2 -0
  61. package/dist-cli/chunks/{electron-M67IM3CU.js → electron-QUB2SALE.js} +3 -3
  62. package/dist-cli/chunks/flow-M7CBSQZU.js +2 -0
  63. package/dist-cli/chunks/help-YQ6FPCDR.js +2 -0
  64. package/dist-cli/chunks/{hints-MHQ2TYMZ.js → hints-6CRRYE4S.js} +2 -2
  65. package/dist-cli/chunks/{home-paths-BSHVFKLZ.js → home-paths-GRVUKYNB.js} +2 -2
  66. package/dist-cli/chunks/{inspect-6GEJLBYU.js → inspect-EOMNE3FJ.js} +3 -3
  67. package/dist-cli/chunks/install-LQPKZ4RZ.js +2 -0
  68. package/dist-cli/chunks/{install-desktop-DBBE3NZ7.js → install-desktop-XZWIGLQT.js} +3 -3
  69. package/dist-cli/chunks/{keys-UHEFYJ7F.js → keys-IY6T6KCR.js} +2 -2
  70. package/dist-cli/chunks/{launch-WRAOCKFK.js → launch-BAZXORER.js} +3 -3
  71. package/dist-cli/chunks/{login-DA6A6G3P.js → login-VOJRQBIA.js} +4 -4
  72. package/dist-cli/chunks/{logout-4P7VYC6H.js → logout-VO3X64AP.js} +2 -2
  73. package/dist-cli/chunks/{maestro-2VGZWS74.js → maestro-FSBGGAAM.js} +2 -2
  74. package/dist-cli/chunks/{preview-FYPJ7LBC.js → preview-27HTOBLN.js} +2 -2
  75. package/dist-cli/chunks/{profile-LMDMTRS3.js → profile-MQJB6RE7.js} +2 -2
  76. package/dist-cli/chunks/{react-TQCFRFTZ.js → react-6M6SL4E4.js} +2 -2
  77. package/dist-cli/chunks/{record-7NOURJWW.js → record-6T6IEYQU.js} +2 -2
  78. package/dist-cli/chunks/runtime-PFOAMDWK.js +2 -0
  79. package/dist-cli/chunks/{runtime-delivery-QYMC2O4K.js → runtime-delivery-O27SF4YJ.js} +2 -2
  80. package/dist-cli/chunks/{screenshot-2D5ARVGS.js → screenshot-S4XVNQWB.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-7UAZLCAI.js → screenshot-mode-NRJVIBSH.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-QRQZ5TKT.js → screenshots-6DEGG6X3.js} +2 -2
  83. package/dist-cli/chunks/{server-7NUNZUAU.js → server-VZC2QSL7.js} +2 -2
  84. package/dist-cli/chunks/setup-repo-WGDJ6VJ2.js +2 -0
  85. package/dist-cli/chunks/{skills-QTHZLE2W.js → skills-FWHY4IXO.js} +2 -2
  86. package/dist-cli/chunks/{start-67SRUSA3.js → start-AEQJJVJX.js} +4 -4
  87. package/dist-cli/chunks/store-G3Z5MP57.js +2 -0
  88. package/dist-cli/chunks/telemetry-74YV3IF3.js +2 -0
  89. package/dist-cli/chunks/{test-S5JPM6FI.js → test-OKNHRAIV.js} +3 -3
  90. package/dist-cli/chunks/{three-mode-D2FJPWAP.js → three-mode-GDBEW2PB.js} +2 -2
  91. package/dist-cli/chunks/{timeline-7TK34VYF.js → timeline-YIZEXSB3.js} +2 -2
  92. package/dist-cli/chunks/{upgrade-IXQVUL3N.js → upgrade-XJTQY36G.js} +2 -2
  93. package/dist-cli/chunks/upload-6VFUC5HN.js +2 -0
  94. package/dist-cli/chunks/{web-ZRY3Z6Z2.js → web-MOMUT4FJ.js} +2 -2
  95. package/dist-cli/chunks/{what-happened-2APFGIJF.js → what-happened-W2YJQSUS.js} +2 -2
  96. package/dist-cli/chunks/{whoami-SRIIDCZR.js → whoami-GRP3K4G3.js} +2 -2
  97. package/dist-lib/agent-daemon-client.cjs +1 -1
  98. package/dist-lib/agent-events.cjs +1 -1
  99. package/dist-lib/agent-sessions.cjs +1 -1
  100. package/dist-lib/attached-projects.cjs +1 -1
  101. package/dist-lib/auth/shared-session.cjs +1 -1
  102. package/dist-lib/backend-origin.cjs +1 -1
  103. package/dist-lib/beta.cjs +1 -1
  104. package/dist-lib/beta.mjs +1 -1
  105. package/dist-lib/bridge-constants.cjs +1 -1
  106. package/dist-lib/cli-constants.cjs +1 -1
  107. package/dist-lib/config.cjs +1 -1
  108. package/dist-lib/detox/index.cjs +1 -1
  109. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  110. package/dist-lib/home-paths.cjs +1 -1
  111. package/dist-lib/host/bridge-host.cjs +1 -1
  112. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  113. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  114. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  115. package/dist-lib/host/websocket-proxy.cjs +1 -1
  116. package/dist-lib/index.cjs +1 -1
  117. package/dist-lib/metro.cjs +1 -1
  118. package/dist-lib/profiles.cjs +1 -1
  119. package/dist-lib/render-mode.cjs +1 -1
  120. package/dist-lib/scripts/demo-app-registry.cjs +1 -1
  121. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  122. package/dist-lib/skills.cjs +1 -1
  123. package/dist-lib/vite.cjs +1 -1
  124. package/package.json +1 -1
  125. package/dist-cli/chunks/auto-bootstrap-SX2UKCBF.js +0 -2
  126. package/dist-cli/chunks/beta-62D6UWKF.js +0 -2
  127. package/dist-cli/chunks/chunk-MKESTT4L.js +0 -2
  128. package/dist-cli/chunks/chunk-PE3O45IA.js +0 -1
  129. package/dist-cli/chunks/chunk-U7DSWHLT.js +0 -79
  130. package/dist-cli/chunks/chunk-YT4EDHZS.js +0 -1
  131. package/dist-cli/chunks/chunk-Z4YIG3WU.js +0 -2
  132. package/dist-cli/chunks/chunk-ZQTCNGCU.js +0 -1
  133. package/dist-cli/chunks/cli-version-Q5NCSSZM.js +0 -2
  134. package/dist-cli/chunks/drivers-I4VYF6F4.js +0 -2
  135. package/dist-cli/chunks/flow-5RHNQDZL.js +0 -2
  136. package/dist-cli/chunks/help-QWUUBYOH.js +0 -2
  137. package/dist-cli/chunks/install-EJE5JRX5.js +0 -2
  138. package/dist-cli/chunks/runtime-W3PIKRLN.js +0 -2
  139. package/dist-cli/chunks/setup-repo-OQC6ITL2.js +0 -2
  140. package/dist-cli/chunks/store-PTOBLYPI.js +0 -2
  141. package/dist-cli/chunks/telemetry-BYEGQXDF.js +0 -2
  142. package/dist-cli/chunks/upload-KMIK2ZLD.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as Ie}from"./chunk-EXBBXVB3.js";import{a as Ae}from"./chunk-J6RB33XR.js";import{a as Pe}from"./chunk-U7DSWHLT.js";import{a as V,b as he,c as ge,d as Z,e as ee,f as ye,g as te,i as ie,j as be,k as Me}from"./chunk-5JMOVKGM.js";import{f as Te,m as Fe,o as $e,s as ke}from"./chunk-GPYYSXEX.js";import{d as ve,f as Se}from"./chunk-L2TEJXVI.js";import{m as we}from"./chunk-J64TT3CL.js";import{c as X,d as Q,e as pe}from"./chunk-CLPPEWVH.js";import{c as Y}from"./chunk-PKLG3XOP.js";import{a as xe}from"./chunk-ZCTYC33O.js";import{a as me,b as G}from"./chunk-4INIBCYZ.js";import{f as fe}from"./chunk-O33KUMYB.js";import*as A from"fs";import{tmpdir as De}from"os";import*as y from"path";import*as g from"fs";import*as w from"path";var L=1e4,B=393,C=852,Ee="__sootsimCliPerf",Ke="maestroCopiedText",_e=new Map;function f(o){return new Promise(e=>setTimeout(e,o))}function Je(o){return o?w.basename(o)===".maestro"?w.dirname(o):o:process.cwd()}function He(o,e,t){let i=e.endsWith(".png")?e:`${e}.png`;if(w.isAbsolute(i))return i;if(t.mode==="flow"&&/[\\/]/.test(i)){let r=i.startsWith("./")||i.startsWith("../")?t.flowDir??process.cwd():Je(t.flowDir);return w.resolve(r,i)}return w.join(o,i)}function qe(o){if(typeof o=="string")return{path:o,withFrame:!1};let e=o.path?.trim()||o.name?.trim();if(!e)throw new Error("takeScreenshot object form requires path or name");return{path:e,withFrame:o.withFrame===!0,layers:o.layers}}function re(o){let[e,t]=o.split(",").map(r=>r.trim()),i=(r,n)=>r.endsWith("%")?Number.parseFloat(r)/100*n:Number.parseFloat(r);return{x:i(e,B),y:i(t,C)}}function ze(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,i=ge(he.parse(t),_e);return Array.isArray(i)?i:[]}var W=class{constructor(e,t){this.bridge=e;this.opts=t}stepDelay=0;firstLaunchDone=!1;profilingEnabled=!1;recordingEnabled=!1;recordingAccessChecked=!1;recordingStartedAtMs=null;lastRecordingDurationMs=null;simRouteHint=null;lastFailedStep=null;get simId(){return this.opts.simId}setSimRouteHint(e){this.simRouteHint=this.normalizeSimRoute(e)}normalizeSimRoute(e){if(!e)return null;try{let t=new URL(e);t.searchParams.delete("inspectOpen");let i=t.searchParams.toString();return`${t.origin}${t.pathname}${i?`?${i}`:""}`}catch{return e}}async refreshSimId(){if(this.opts.simId)try{let e=await this.bridge.listSims(),t=e.find(a=>a.id===this.opts.simId);if(t&&(this.simRouteHint=this.normalizeSimRoute(t.url||t.origin)),e.find(a=>a.id===this.opts.simId&&a.readyState==="open")||!this.simRouteHint)return;let r=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!r)return;let n=e.find(a=>a.isPrimary&&a.readyState==="open"),s=e.find(a=>a.readyState==="open"),l=r??n??s;l&&(this.opts.simId=l.id,console.log(` [flow] sim rotated to ${l.id}`))}catch{}}async evaluate(e,t){return this.bridge.send({type:"evaluate",simId:this.opts.simId,code:e},t?{timeoutMs:t}:void 0)}async callTest(e,...t){return this.bridge.send({type:"call",simId:this.opts.simId,path:`__sootsimTest.${e}`,args:t})}async waitForTree(e=L){let t=Date.now()+e,i=Date.now(),r=null,n=0,s=0;for(;Date.now()<t;){try{let a=await this.evaluate(`(async () => {
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as Ie}from"./chunk-KRZU6LRW.js";import{a as Ae}from"./chunk-3FMTRV2A.js";import{a as Pe}from"./chunk-TVRQ3SOL.js";import{a as V,b as he,c as ge,d as Z,e as ee,f as ye,g as te,i as ie,j as be,k as Me}from"./chunk-4DTA5UKZ.js";import{f as Te,m as Fe,o as $e,s as ke}from"./chunk-AWEEXX2S.js";import{d as ve,f as Se}from"./chunk-ACWM3RKN.js";import{m as we}from"./chunk-6R3S7M66.js";import{c as X,d as Q,e as pe}from"./chunk-T3CUB2ZH.js";import{c as Y}from"./chunk-QWYIMQHF.js";import{a as xe}from"./chunk-NAB63JVH.js";import{a as me,b as G}from"./chunk-63E34ET7.js";import{f as fe}from"./chunk-Y53I2KD4.js";import*as A from"fs";import{tmpdir as De}from"os";import*as y from"path";import*as g from"fs";import*as w from"path";var L=1e4,B=393,C=852,Ee="__sootsimCliPerf",Ke="maestroCopiedText",_e=new Map;function f(o){return new Promise(e=>setTimeout(e,o))}function Je(o){return o?w.basename(o)===".maestro"?w.dirname(o):o:process.cwd()}function He(o,e,t){let i=e.endsWith(".png")?e:`${e}.png`;if(w.isAbsolute(i))return i;if(t.mode==="flow"&&/[\\/]/.test(i)){let r=i.startsWith("./")||i.startsWith("../")?t.flowDir??process.cwd():Je(t.flowDir);return w.resolve(r,i)}return w.join(o,i)}function qe(o){if(typeof o=="string")return{path:o,withFrame:!1};let e=o.path?.trim()||o.name?.trim();if(!e)throw new Error("takeScreenshot object form requires path or name");return{path:e,withFrame:o.withFrame===!0,layers:o.layers}}function re(o){let[e,t]=o.split(",").map(r=>r.trim()),i=(r,n)=>r.endsWith("%")?Number.parseFloat(r)/100*n:Number.parseFloat(r);return{x:i(e,B),y:i(t,C)}}function ze(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,i=ge(he.parse(t),_e);return Array.isArray(i)?i:[]}var W=class{constructor(e,t){this.bridge=e;this.opts=t}stepDelay=0;firstLaunchDone=!1;profilingEnabled=!1;recordingEnabled=!1;recordingAccessChecked=!1;recordingStartedAtMs=null;lastRecordingDurationMs=null;simRouteHint=null;lastFailedStep=null;get simId(){return this.opts.simId}setSimRouteHint(e){this.simRouteHint=this.normalizeSimRoute(e)}normalizeSimRoute(e){if(!e)return null;try{let t=new URL(e);t.searchParams.delete("inspectOpen");let i=t.searchParams.toString();return`${t.origin}${t.pathname}${i?`?${i}`:""}`}catch{return e}}async refreshSimId(){if(this.opts.simId)try{let e=await this.bridge.listSims(),t=e.find(a=>a.id===this.opts.simId);if(t&&(this.simRouteHint=this.normalizeSimRoute(t.url||t.origin)),e.find(a=>a.id===this.opts.simId&&a.readyState==="open")||!this.simRouteHint)return;let r=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!r)return;let n=e.find(a=>a.isPrimary&&a.readyState==="open"),s=e.find(a=>a.readyState==="open"),l=r??n??s;l&&(this.opts.simId=l.id,console.log(` [flow] sim rotated to ${l.id}`))}catch{}}async evaluate(e,t){return this.bridge.send({type:"evaluate",simId:this.opts.simId,code:e},t?{timeoutMs:t}:void 0)}async callTest(e,...t){return this.bridge.send({type:"call",simId:this.opts.simId,path:`__sootsimTest.${e}`,args:t})}async waitForTree(e=L){let t=Date.now()+e,i=Date.now(),r=null,n=0,s=0;for(;Date.now()<t;){try{let a=await this.evaluate(`(async () => {
3
3
  const test = window.__sootsimTest
4
4
  if (!test) return { count: 0, loading: true }
5
5
  const count = (await test.getNodeCount?.()) || 0
@@ -370,7 +370,7 @@ flow extension:
370
370
  + completed (${M.length} steps)`),d>0&&console.log(` screenshots: ${d} \u2192 ${s}`),I&&Ce(I),S&&console.log(` video: ${S}`),console.log()}catch(u){if(i&&!I)try{I=await c.stopProfile()}catch{}if(T&&!S)try{S=await c.stopRecording(),_=c.getLastRecordingDurationMs()}catch(d){console.warn(` recording stop failed: ${d?.message||String(d)}`)}console.error(`
371
371
  x failed: ${u.message}
372
372
  `),I&&(console.log(" partial profile:"),Ce(I)),S&&console.log(` partial video: ${S}`);try{let d=c.lastFailedStep,h=d?`step-${String(d.index+1).padStart(2,"0")}-${d.kind}`:"unstaged",R=y.join(s,h);await c.captureFailureBundle(R,{error:u,stepIndex:d?.index,stepKind:d?.kind,stepTarget:d?.target}),console.log(` failure bundle: ${R}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(d){try{let h=y.join(s,"error.png");await c.captureFailureScreenshot(h),console.log(` error screenshot: ${h}`)}catch{}console.log(` (failure bundle capture failed: ${d instanceof Error?d.message:String(d)})`)}await we($,{errorsCommand:`sootsim get errors 5${c.simId?` --sim ${c.simId}`:""}`,warningsCommand:`sootsim get warnings 5${c.simId?` --sim ${c.simId}`:""}`,requestsCommand:`sootsim get requests 5${c.simId?` --sim ${c.simId}`:""}`}),O=1}finally{$.close()}if(O===0&&v)try{let u=await Qe(z??[]),d=["--origin",U,"--events",u];oe&&d.push("--public-origin",oe),S&&d.push("--video",S),S&&_&&Number.isFinite(_)&&d.push("--video-duration-ms",String(Math.round(_))),c.simId&&d.push("--sim",c.simId),Re&&d.push("--open"),console.log(`
373
- preparing preview upload\u2026`);let{runUpload:h}=await import("./upload-KMIK2ZLD.js");await h(d,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),O=1}return J&&(c.simId&&H.add(c.simId),await Xe(b.wsPort,b.commandTimeoutMs,[...H])),await G(),O}async function Xe(o,e,t){let i=[...new Set(t.filter(Boolean))];if(i.length===0)return;let r=Q(o,{commandTimeoutMs:e});try{let n=await r.listSims(),s=i.filter(a=>n.some(m=>m.id===a&&m.readyState==="open"));if(s.length===0)return;let l=await ke(r,o,e,s);await Fe(n,s),l.closed.length>0&&console.log(` closed flow sim(s): ${l.closed.join(", ")}`),l.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${l.remaining.join(", ")}`)}catch(n){console.warn(` warn: failed to close flow sim(s): ${n instanceof Error?n.message:String(n)}`)}finally{r.close()}}async function Qe(o){let{gzipSync:e}=await import("zlib"),t=o.map(n=>JSON.stringify(n)).join(`
373
+ preparing preview upload\u2026`);let{runUpload:h}=await import("./upload-6VFUC5HN.js");await h(d,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),O=1}return J&&(c.simId&&H.add(c.simId),await Xe(b.wsPort,b.commandTimeoutMs,[...H])),await G(),O}async function Xe(o,e,t){let i=[...new Set(t.filter(Boolean))];if(i.length===0)return;let r=Q(o,{commandTimeoutMs:e});try{let n=await r.listSims(),s=i.filter(a=>n.some(m=>m.id===a&&m.readyState==="open"));if(s.length===0)return;let l=await ke(r,o,e,s);await Fe(n,s),l.closed.length>0&&console.log(` closed flow sim(s): ${l.closed.join(", ")}`),l.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${l.remaining.join(", ")}`)}catch(n){console.warn(` warn: failed to close flow sim(s): ${n instanceof Error?n.message:String(n)}`)}finally{r.close()}}async function Qe(o){let{gzipSync:e}=await import("zlib"),t=o.map(n=>JSON.stringify(n)).join(`
374
374
  `)+(o.length?`
375
375
  `:""),i=e(Buffer.from(t,"utf8")),r=y.join(De(),`sootsim-events-${Date.now()}.jsonl.gz`);return A.writeFileSync(r,i),console.log(` events: ${o.length} written to ${r} (${i.length} bytes gz)`),r}async function Ze(o){let e=o[0],t=i=>o.find((r,n)=>o[n-1]===i);switch(e){case"start":{let{path:i,state:r}=ye();console.log(" flow draft started"),console.log(` session: ${i}`),console.log(` steps: ${r.steps.length}`);return}case"keep":case"good":{let i=ie();if(i.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!i.kept){console.log(" no pending action to keep");return}console.log(` kept: ${i.candidate.summary}`),console.log(` steps: ${i.stepCount}`);return}case"end":{let i=t("--output")||(o[1]&&!o[1].startsWith("-")?o[1]:void 0),r=o.includes("--validate")||o.includes("--video"),n=o.includes("--video"),s=ie();s.active&&s.kept&&console.log(` auto-kept trailing action: ${s.candidate.summary}`);let l=be(i||(r?tt():void 0));if(l.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!l.valid){console.error(" flow draft is not valid:");for(let a of l.issues)console.error(` - ${a}`);console.error(" draft preserved \u2014 keep at least one real interaction or run `sootsim flow start` to reset"),process.exit(1)}if(r){let a=it(o,l.outputPath),m=await Oe(a);if(m!==0){console.error(`
376
376
  validation failed \u2014 draft preserved so you can keep iterating`),process.exitCode=m;return}te(),console.log(` flow draft validated (${l.stepCount} step${l.stepCount===1?"":"s"})`),l.outputPath&&console.log(` saved: ${l.outputPath}`),n&&console.log(" video: recorded during validation run");return}if(te(),console.log(` flow draft ended (${l.stepCount} step${l.stepCount===1?"":"s"})`),l.outputPath){console.log(` saved: ${l.outputPath}`),console.log(` next: sootsim flow ${l.outputPath} --record`);return}console.log(""),process.stdout.write(l.yaml);return}case"validate":{let i=o[1];(!i||i.startsWith("-"))&&(console.error(" usage: sootsim flow validate <path>"),process.exit(1));let r=ee(i);if(r.length>0){console.error(` x ${i} failed validation:`);for(let n of r)console.error(` - ${n}`);process.exit(1)}console.log(` + ${i} looks valid`);return}}}function et(o){return o[0]==="--sim"&&o.length>=2?[...o.slice(2),"--sim",o[1]]:o}async function Ft(o){let e=et(o),t=e[0];if(t==="start"||t==="keep"||t==="good"||t==="end"||t==="validate")return await Ze(e),0;let i=await Oe(e);return i!==0&&(process.exitCode=i),i}function Ce(o){let e=o.avgMs>0?(1e3/o.avgMs).toFixed(1):"?",t=o.sampleCount>0?(o.jankFrames/o.sampleCount*100).toFixed(1):"0";console.log(`
@@ -0,0 +1,79 @@
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as ue,e as de,f as pe}from"./chunk-LQQUA6BP.js";import{c as le,e as ce,g as I}from"./chunk-T3CUB2ZH.js";import{d as ae}from"./chunk-DUPGSOQC.js";import{a as ie,b as P}from"./chunk-63E34ET7.js";import{a as se}from"./chunk-J6GWUBW3.js";import{createHash as he}from"crypto";import{readFileSync as G}from"fs";import{gzipSync as ye}from"zlib";function fe(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}function D(e,t){let r=new AbortController,o=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(o)}}async function ke(e){let t=D(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let o=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${o.slice(0,200)}`)}}async function Ee(e,t=8,r){let o=0,s=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;o<a;){let l=e[o++];await ke(l),s++,r?.(s,a)}}))}function Fe(e,t,r,o){let s=[];s.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let a of e.files){let l=r.get(a.urlhash);l&&s.push({url:a.putUrl,contentType:a.contentType,bytes:l})}e.events&&o?.eventsBytes&&s.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:o.eventsBytes}),e.flowVideo&&o?.videoBytes&&s.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:o.videoBytes}),e.storage&&o?.storageBytes&&s.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:o.storageBytes});for(let a of e.snapshots??[]){let l=o?.snapshotBytes?.get(a.id);l&&s.push({url:a.putUrl,contentType:a.contentType,bytes:l})}return s}function Le(e){return e.replace(/\/+$/,"")}var A=class extends Error{constructor(r,o,s,a=""){super(r);this.status=o;this.phase=s;this.responseText=a;this.name="PresignedUploadError"}};async function ge(e){let t=Le(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let o=D(3e4,"init"),s;try{s=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:o.signal})}finally{o.cancel()}if(!s.ok){let f=await s.text().catch(()=>"");throw new A(`init failed: ${s.status} ${f.slice(0,200)}`,s.status,"init",f)}let a=await s.json(),l=Fe(a,e.bundleBytes,e.filesByHash,e.extras);await Ee(l,e.concurrency??8,e.onPutProgress);let y=D(3e4,"finalize"),d;try{d=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:y.signal})}finally{y.cancel()}if(!d.ok){let f=await d.text().catch(()=>"");throw new A(`finalize failed: ${d.status} ${f.slice(0,200)}`,d.status,"finalize",f)}let $=await d.json();return{init:a,finalize:$}}function Ae(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}var be=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",ve=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",J="http://localhost:3000";async function ze(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${J}/api/preview/upload/init`,{method:"OPTIONS"});if(t.ok||t.status===204||t.status===405)return J}catch{}return be}function _(e){return e.replace(/\/$/,"")}function He(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function Me(e){try{let t=new URL(e).hostname.toLowerCase();return t==="sootbean.com"||t.endsWith(".sootbean.com")}catch{return!1}}function Ce(e,t){return t?_(t):process.env.SOOTSIM_PREVIEW_ORIGIN?_(process.env.SOOTSIM_PREVIEW_ORIGIN):He(e)?_(e):Me(e)?_(ve):_(e)}function Ne(){console.log(`
3
+ sootsim upload \u2014 publish the current recorded bundle as a /preview/<id> link
4
+
5
+ usage:
6
+ sootsim upload [--origin <url>] [--public-origin <url>] (--events <path> | --video <path>) [--screenshot <path>] [--owner <org> --repo <repo>] [--sim <sim>] [--open] [--assets-only]
7
+
8
+ options:
9
+ --origin <url> upload target (default: auto)
10
+ prefers ${J} when available, otherwise
11
+ falls back to ${be}
12
+ override with SOOTSIM_UPLOAD_ORIGIN env var
13
+ --public-origin <url>
14
+ public /preview link origin (default: ${ve}
15
+ for prod uploads, upload origin for localhost/custom origins).
16
+ override with SOOTSIM_PREVIEW_ORIGIN env var
17
+ --events <path> path to a gzipped events .jsonl.gz file to attach
18
+ required unless --video is present; previews must
19
+ have replay or recording playback data
20
+ --screenshot <path>
21
+ path to a PNG thumbnail to attach to the share
22
+ --video <path> path to a webm/mp4/gif flow recording. embedded inline
23
+ in the pr sticky comment served at
24
+ /api/preview/flow-video?id=<share-id>
25
+ --video-duration-ms <ms>
26
+ duration hint for attached flow video
27
+ --owner <org> associate a session upload with a linked org repo
28
+ --repo <repo> repo name for --owner; the signed-in user must belong
29
+ to the local/org team that owns the link
30
+ --sim <sim> target a specific sim (see: sootsim list)
31
+ --open open the resulting /preview/<id> url in the browser
32
+ --assets-only drop API/JSON/HTML records before upload; keep images,
33
+ fonts, css, js, and binary blobs. live-data demos hit
34
+ the real network at replay time instead of serving
35
+ recorded API snapshots
36
+ -h, --help
37
+
38
+ examples:
39
+ sootsim upload --events ./my-session.jsonl.gz
40
+ sootsim upload --origin http://localhost:3000 --events ./my-session.jsonl.gz --open
41
+ sootsim upload --video /tmp/soot-flow.webm --video-duration-ms 12000
42
+ `)}function b(e,t){let r=e.findIndex(s=>s===t);if(r<0)return;let o=e[r+1];return e.splice(r,2),o}function me(e,t){let r=e.findIndex(o=>o===t);return r<0?!1:(e.splice(r,1),!0)}function we(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!!(t.startsWith("image/")||t.startsWith("font/")||t.startsWith("video/")||t.startsWith("audio/")||t.startsWith("model/")||t==="text/css"||t==="application/javascript"||t==="text/javascript"||t==="application/wasm"||t==="application/font-woff"||t==="application/font-woff2"||t==="application/octet-stream"):!1}async function K(e){let t=await fetch(e);if(!t.ok)throw new Error(`fetch ${e} -> ${t.status} ${t.statusText}`);return new Uint8Array(await t.arrayBuffer())}function We(e){return/\.bundle($|\?)/.test(e)||/\.js($|\?)/.test(e)?"application/javascript":/\.zip($|\?)/.test(e)?"application/zip":"application/javascript"}function qe(e){let t=(e.split("?")[0].split(".").pop()||"").toLowerCase();return t==="ttf"?"font/ttf":t==="otf"?"font/otf":t==="woff"?"font/woff":t==="woff2"?"font/woff2":"application/octet-stream"}function Ve(e){let t=[];for(let r of e.split(",")){let o=r.trim();if(!o)continue;let s=o.indexOf("::"),a=s===-1?o:o.slice(0,s),l;try{l=decodeURIComponent(a)}catch{l=a}l&&t.push(l)}return t}function De(e){try{let t=new URL(e);return t.searchParams.get("lazy")==="true"?(t.searchParams.set("lazy","false"),t.toString()):e}catch{return e}}async function Ge(e,t){let o=[];for(let s=0;s<t;s+=15e5){let a=Math.min(s+15e5,t),l=await I(e,`(window.__sootsimLastTransformedBundle?.text || "").slice(${s}, ${a})`);if(typeof l!="string")return null;o.push(l)}return o.join("")}function j(e){let t=new Map;for(let r of e)t.set(r.urlhash||r.url,r);return Array.from(t.values())}async function it(e,t){(e.includes("--help")||e.includes("-h"))&&(Ne(),process.exit(0));let r=[...e],o=await ze(b(r,"--origin")),s=Ce(o,b(r,"--public-origin")),a=b(r,"--events"),l=b(r,"--screenshot"),y=b(r,"--video"),d=b(r,"--video-duration-ms"),$=b(r,"--owner"),f=b(r,"--repo"),Ue=me(r,"--open");($&&!f||!$&&f)&&(console.error(" --owner and --repo must be provided together"),process.exit(1)),!a&&!y&&(console.error(" preview uploads require playback data: pass --events or --video.\n for a normal local preview, use `sootsim record --mode combined --open`\n or `sootsim flow --preview` instead of uploading a bundle-only snapshot."),process.exit(1));let Y=me(r,"--assets-only"),Te=le(r,{stripBooleanFlags:[],stripValueFlags:[]}),v=ce(Te),c,Q=[],m=[],z=null;try{if(c=await I(v,'(typeof window.__sootsimCaptureBundle === "function") ? window.__sootsimCaptureBundle() : null'),c?.bundleUrl){let n=new URL(c.bundleUrl).origin,[i,T]=await Promise.all([I(v,`(window.__sootsimPreviewRecorder?.list?.(${JSON.stringify(n)}) || [])`),I(v,`(async () => {
43
+ const list = window.__sootsimListWorkerFetchRecorder
44
+ return typeof list === 'function'
45
+ ? await list(${JSON.stringify(n)})
46
+ : []
47
+ })()`)]);Q=j([...i,...T]).filter(p=>{try{return!new URL(p.url).pathname.startsWith("/api/")}catch{return!0}});let u=await I(v,`(async () => {
48
+ const rec = window.__sootsimPreviewRecorder
49
+ const workerList = window.__sootsimListWorkerFetchRecorder
50
+ return {
51
+ main: rec?.list ? rec.list() : [],
52
+ worker: typeof workerList === 'function' ? await workerList() : [],
53
+ }
54
+ })()`),x=(u?j([...u.main,...u.worker]):[]).filter(p=>{try{return new URL(p.url).origin!==n}catch{return!1}}),B=x.length>0?{count:x.length,totalBytes:x.reduce((p,S)=>p+(S.size||0),0)}:null;if(B&&B.count>0){console.log(` ${B.count} recorded cross-origin responses (${(B.totalBytes/1024).toFixed(1)} KiB)`);let p=await I(v,`(async () => {
55
+ const rec = window.__sootsimPreviewRecorder
56
+ const workerDump = window.__sootsimDumpWorkerFetchRecorder
57
+ const bundleUrl = ${JSON.stringify(c.bundleUrl)}
58
+ const keep = (r) => {
59
+ try {
60
+ const u = new URL(r.url)
61
+ if (u.origin !== ${JSON.stringify(n)}) return true
62
+ // bundle-origin api responses came from the rewritten
63
+ // /__app-api proxy at record time (re-keyed by the
64
+ // recorder's unwrap step). they need bodies attached the
65
+ // same way as cross-origin records \u2014 direct re-fetch from
66
+ // the dev server lacks the bundle's session cookies.
67
+ if (r.url !== bundleUrl && u.pathname.startsWith('/api/')) return true
68
+ return false
69
+ } catch { return false }
70
+ }
71
+ return {
72
+ main: rec?.dump ? rec.dump().filter(keep) : [],
73
+ worker: typeof workerDump === 'function'
74
+ ? (await workerDump()).filter(keep)
75
+ : [],
76
+ }
77
+ })()`);if(m=j([...p.main,...p.worker]),Y){let S=m.length;m=m.filter(V=>we(V.contentType));let q=B.totalBytes-m.reduce((V,$e)=>V+($e.size||0),0);console.log(` --assets-only: kept ${m.length}/${S} records (dropped ${(q/1024).toFixed(1)} KiB of API responses)`)}}}c?.transformedBundle&&(z=await Ge(v,c.transformedBundle.byteLength))}finally{v.close()}c||(console.error(" could not read bundle snapshot \u2014 is sootsim running and is the bundle loaded?"),process.exit(2)),c.bundleUrl||(console.error(` no ?bundle= URL on the current sootsim tab.
78
+ open the app you want to share first (e.g. sootsim open 8082), then run upload.`),process.exit(2));let g,H=!1;if(z!==null)g=new TextEncoder().encode(z),H=!0,console.log(` using post-transform bundle: ${(g.byteLength/1024).toFixed(1)} KiB`);else{let n=De(c.bundleUrl);n!==c.bundleUrl&&console.log(" forcing lazy=false for self-contained bundle"),console.log(` capturing: ${n}`),g=await K(n),console.log(` main bundle: ${(g.byteLength/1024).toFixed(1)} KiB`)}let E=Q.filter(n=>n.url!==c.bundleUrl);Y&&(E=E.filter(n=>we(n.contentType))),console.log(` fetching ${E.length} extra files\u2026`);let F=(await Promise.all(E.map(async n=>{try{let i=await K(n.url);return{...n,bytes:i}}catch(i){return console.error(` warning: failed to re-fetch ${n.url}: ${i instanceof Error?i.message:i}`),null}}))).filter(n=>!!n),Be=F.reduce((n,i)=>n+i.bytes.byteLength,0);console.log(` ${F.length} extra files: ${(Be/1024).toFixed(1)} KiB`);let U;a&&(U=G(a));let h;l&&(h=G(l),console.log(` attaching screenshot: ${(h.byteLength/1024).toFixed(1)} KiB`));let w,L,X;if(y){if(w=G(y),L=y.endsWith(".mp4")?"video/mp4":y.endsWith(".gif")?"image/gif":"video/webm",d){let n=Number(d);(!Number.isFinite(n)||n<=0)&&(console.error(` invalid --video-duration-ms: ${d}`),await P(),process.exit(1)),X=Math.round(n)}console.log(` attaching flow video: ${(w.byteLength/1024).toFixed(1)} KiB (${L})`)}let R=ue(),O=pe(R),Pe=se();ie({event:"preview_upload_started",identity:{userId:R?.kind==="session"?Pe?.user?.id??null:null,repoId:O?.repoId??null,installationId:O?.installationId??null},properties:{origin:o,hasAuth:!!R,authMode:R?.kind??"none",bundleBytes:g.byteLength,isTransformed:H,extraFiles:F.length,recordedFetches:m.length,hasEvents:!!U,hasScreenshot:!!h,hasVideo:!!w}}),R||(console.error(" preview uploads need auth."),console.error(" set SOOTSIM_API_KEY=sk_sootsim_..., run `sootsim login`, or use the soot github runner."),await P(),process.exit(1));let Ie=de(R),Re=(()=>{try{return new URL(c.bundleUrl).origin}catch{return null}})(),M=(n,i,T,u,oe,x,B,p)=>{let S=fe(x),q=S?ye(n):n;return{url:i,urlhash:T,method:u,bodyHash:oe,requestVaryHash:p,contentType:x,responseHeaders:B,bytes:q,encoding:S?"gzip":void 0}},Z=[],ee=process.env.SOOT_APP_FONTS||"";if(ee){let n=new Set;for(let i of Ve(ee)){let T=he("sha256").update(i).digest("hex");if(!n.has(T)){n.add(T);try{let u=await K(i);Z.push(M(u,i,T,"GET","-",qe(i))),console.log(` staged app font: ${i} (${(u.byteLength/1024).toFixed(1)} KiB)`)}catch(u){console.error(` warning: failed to fetch app font ${i}: ${u instanceof Error?u.message:u}`)}}}}let C=[...F.map(n=>M(n.bytes,n.url,n.urlhash,"GET","-",n.contentType,n.responseHeaders,n.requestVaryHash)),...m.map(n=>M(Buffer.from(n.bodyBase64,"base64"),n.url,n.urlhash,n.method||"GET",n.bodyHash||"-",n.contentType,n.responseHeaders,n.requestVaryHash)),...Z],N=ye(g),Oe=he("sha256").update(g).digest("hex");console.log(` bundle raw=${(g.byteLength/1024).toFixed(1)} KiB gz=${(N.byteLength/1024).toFixed(1)} KiB`);let xe={contentHash:Oe,bundleSizeBytes:g.byteLength,bundleContentType:We(c.bundleUrl),bundleEncoding:"gzip",bundleOrigin:Re,appFonts:process.env.SOOT_APP_FONTS||void 0,entry:c.entry,isTransformed:H,deviceSpec:c.deviceSpec,installationId:O?.installationId??void 0,repoId:O?.repoId,owner:$??O?.owner,repo:f??O?.repo,files:C.map(n=>({url:n.url,urlhash:n.urlhash,method:n.method,bodyHash:n.bodyHash,contentType:n.contentType,responseHeaders:n.responseHeaders,requestVaryHash:n.requestVaryHash,encoding:n.encoding,sizeBytes:n.bytes.byteLength})),events:U?{sizeBytes:U.byteLength}:void 0,snapshots:h?[{id:"landing",label:"Landing",kind:"landing",t:0,contentType:"image/png",sizeBytes:h.byteLength}]:void 0,flowVideo:w&&L?{sizeBytes:w.byteLength,contentType:L,durationMs:X}:void 0},te=new Map;for(let n of C)te.set(n.urlhash,n.bytes);let ne=new Map;h&&ne.set("landing",h);let Se=Date.now(),k=N.byteLength;for(let n of C)k+=n.bytes.byteLength;U&&(k+=U.byteLength),h&&(k+=h.byteLength),w&&(k+=w.byteLength);let _e=`${_(o)}/api/preview/upload/init`;console.log(` init: ${_e}`);let W;try{let n=await ge({originBase:o,initBody:xe,bundleBytes:N,filesByHash:te,extras:{eventsBytes:U,videoBytes:w,snapshotBytes:ne},authHeader:Ie,concurrency:16});W=n.finalize;let i=1+n.init.files.length+(n.init.events?1:0)+n.init.snapshots.length+(n.init.flowVideo?1:0);console.log(` PUT ${i} objects in ${Date.now()-Se}ms (${(k/1024).toFixed(1)} KiB)`)}catch(n){let i=n;i.phase==="init"&&i.status===401&&(console.error(" preview upload requires a valid login."),console.error(" run `sootsim login` and retry."),await P(),process.exit(1)),i.status===402&&(console.error(` ${Ae(i.responseText)??"preview uploads require Personal, Team, or an active trial \u2014 upgrade from the billing dialog."}`),await P(),process.exit(1)),console.error(` ${i.message??`${i.phase??"upload"} failed: ${String(n)}`}`),await P(),process.exit(1)}let re=`${s}${W.url}`;console.log(`
79
+ stored ${W.filesStored??0} extra files`),console.log(` preview: ${re}`),Ue&&await ae(re),await P()}export{ze as a,Ce as b,it as c};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as w,i as u,j as m,k as l}from"./chunk-O33KUMYB.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as w,i as u,j as m,k as l}from"./chunk-Y53I2KD4.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{readFileSync as i}from"node:fs";import{fileURLToPath as e}from"node:url";var r=null;function l(){if(r!=null)return r;let o=[()=>e(import.meta.resolve("sootsim/package.json")),()=>e(new URL("../package.json",import.meta.url))];for(let n of o)try{let t=JSON.parse(i(n(),"utf8")).version;if(typeof t=="string"&&t)return r=t,r}catch{}return r="0.0.0",r}export{l as a};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as u,b as f}from"./chunk-ZCTYC33O.js";import{a as h,c as p}from"./chunk-6UFYAXFV.js";import{a as c,b as d,c as m}from"./chunk-PAK43NT5.js";function T(){let e=c();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function O(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=c();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await m(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:T,launch:O};function I(){let e=u();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function _(e){let r=u();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await f(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var w={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:I,launch:_};import{spawn as x}from"child_process";import{closeSync as M,mkdtempSync as A,openSync as C,readFileSync as E}from"fs";import{createRequire as L}from"module";import{tmpdir as g}from"os";import{join as y}from"path";var R=`
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as u,b as f}from"./chunk-NAB63JVH.js";import{a as h,c as p}from"./chunk-APQYD7HL.js";import{a as c,b as d,c as m}from"./chunk-DUPGSOQC.js";function T(){let e=c();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function O(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=c();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await m(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var v={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:T,launch:O};function I(){let e=u();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function _(e){let r=u();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await f(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var w={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:I,launch:_};import{spawn as x}from"child_process";import{closeSync as M,mkdtempSync as A,openSync as C,readFileSync as E}from"fs";import{createRequire as L}from"module";import{tmpdir as g}from"os";import{join as y}from"path";var R=`
3
3
  const modulePath = process.env.SOOTSIM_PW_MODULE;
4
4
  const url = process.env.SOOTSIM_PW_URL;
5
5
  const headless = process.env.SOOTSIM_PW_HEADLESS === '1';
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P,b as v}from"./chunk-YNAHQ7QZ.js";import{d as j}from"./chunk-AR3LYAV5.js";import{a as b}from"./chunk-4INIBCYZ.js";import{execSync as A}from"child_process";import{existsSync as w,readFileSync as _,writeFileSync as x}from"fs";import{relative as B,resolve as d}from"path";import{existsSync as p,readFileSync as k,readdirSync as O,statSync as R}from"fs";import{basename as L,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(k(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(k(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function y(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(k(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||L(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=k(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P,b as v}from"./chunk-MERAEG54.js";import{d as j}from"./chunk-SISOWHRQ.js";import{a as b}from"./chunk-63E34ET7.js";import{execSync as A}from"child_process";import{existsSync as w,readFileSync as _,writeFileSync as x}from"fs";import{relative as B,resolve as d}from"path";import{existsSync as p,readFileSync as k,readdirSync as O,statSync as R}from"fs";import{basename as L,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(k(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(k(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function y(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(k(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||L(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=k(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
3
3
  `).filter(Boolean);for(let n of c){let g=n.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");g&&o.push(...S(e,g))}}return o}let r=a(e,"package.json");if(p(r))try{let s=JSON.parse(k(r,"utf8")),t=Array.isArray(s.workspaces)?s.workspaces:s.workspaces?.packages||[];for(let c of t)o.push(...S(e,c))}catch{}return o}function S(e,o){let i=o.replace(/\/\*\*?$/,"").replace(/\*$/,""),r=a(e,i);if(!p(r))return[];try{return O(r).map(t=>a(r,t)).filter(t=>{try{return R(t).isDirectory()&&p(a(t,"package.json"))}catch{return!1}})}catch{return[]}}function M(e){let o=J(e),i=W(e);if(o==="single"){let c=y(e);return{root:e,type:o,packageManager:i,apps:c?[c]:[]}}let r=V(e),s=[],t=y(e);t&&s.push(t);for(let c of r){if(c===e)continue;let n=y(c);n&&s.push(n)}return{root:e,type:o,packageManager:i,apps:s}}function $(e){switch(e){case"bun":return"bun add -d sootsim";case"pnpm":return"pnpm add -D sootsim";case"yarn":return"yarn add -D sootsim";case"npm":return"npm install -D sootsim"}}async function ce(e){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
4
  sootsim setup-repo \u2014 set up sootsim in your project
5
5
 
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var t=!0,e="1.0.0",o="public beta",n=`${o} \xB7 free until ${e}`,r="free for everyone until 1.0 \u2014 we send anonymous error and dependency data while you use it";export{t as a,e as b,o as c,n as d,r as e};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ var O="sootsim close";export{O as a};
@@ -0,0 +1 @@
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var o={width:3,lock:{top:253,height:103},ringToggle:{top:152,height:32},volumeUp:{top:214,height:61},volumeDown:{top:290,height:61}},m={width:2.5,lock:{top:130,height:78},ringToggle:{top:94,height:22},volumeUp:{top:126,height:48},volumeDown:{top:188,height:48}},c={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},p={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},r=48;function t(e){return{...e,platform:"ios",navigationBarHeight:0,navigationBarMode:e.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:e.dynamicIsland?e.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:e.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:e.name}}var h={"iphone-se":t({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:m}),"iphone-14":t({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:55,dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15":t({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-plus":t({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro":t({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro-max":t({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-16":t({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-plus":t({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro":t({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro-max":t({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17":t({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-air":t({name:"iPhone 17 Air",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro":t({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro-max":t({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"ipad-pro-13":t({name:'iPad Pro 13"',width:1032,height:1376,scale:2,statusBarHeight:24,homeIndicatorHeight:20,cornerRadius:18,dynamicIsland:null,safeAreaInsets:{top:24,bottom:20,left:0,right:0},iosVersion:"18.2",physicalPPI:264,hardwareButtons:o}),"pixel-8":{platform:"android",name:"Pixel 8",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:c},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:48,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:c},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:c},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:p},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:p}},u="iphone-17-pro";function S(e){return h[e]}function g(){return Object.keys(h)}var i={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"ipad-13":{name:"ipad-13",label:'iPad 13"',width:2064,height:2752,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},s={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},P={color:"#25c3ec",blur:120,spread:52,opacity:.34},v="iphone-17-pro";var f=[{name:"white",value:"#ffffff"},{name:"gray-light",value:"#d1d5db"},{name:"gray",value:"#6b7280"},{name:"gray-dark",value:"#3b4350"},{name:"slate",value:"#2a3644"},{name:"black",value:"#000000"},{name:"cyan",value:"#25c3ec"},{name:"blue",value:"#3f7cff"},{name:"teal",value:"#1fc7b4"},{name:"green",value:"#42c95d"},{name:"lime",value:"#92d21b"},{name:"gold",value:"#f5c518"},{name:"orange",value:"#ff912e"},{name:"coral",value:"#ff6f5b"},{name:"red",value:"#ff4f6f"},{name:"berry",value:"#d054ff"},{name:"magenta",value:"#ff4eb8"}],x=Object.fromEntries(f.map(e=>[e.name,e.value]));function B(e){return Object.prototype.hasOwnProperty.call(i,e)?i[e]:null}function b(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(n=>({...n}))}}function I(e){return Object.prototype.hasOwnProperty.call(s,e)?b(s[e]):null}var d={deviceModel:{type:"enum",default:u,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:g(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:e=>e>=.5&&e<=2},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showTopBar:{type:"boolean",default:!0,description:"show simulator top bar",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(i),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(s),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},errorReporting:{type:"boolean",default:!1,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"},onboardingComplete:{type:"boolean",default:!1,description:"first-run onboarding completed",group:"beta"},betaConsentVersion:{type:"number",default:0,description:"last accepted beta telemetry policy version",group:"beta"},detailedTelemetry:{type:"boolean",default:!0,description:"send detailed usage telemetry (sessions, perf samples)",group:"beta"}};function y(){if(typeof window>"u")return{};let e={};try{let n=new URLSearchParams(window.location.search),a=n.get("device");a&&d.deviceModel.options?.includes(a)&&(e.deviceModel=a);let l=n.get("colorScheme")??n.get("theme");l&&d.colorScheme.options?.includes(l)&&(e.colorScheme=l)}catch{}return e}function R(){let e={};for(let[n,a]of Object.entries(d))e[n]=a.default;return Object.assign(e,y()),e}export{P as a,v as b,B as c,b as d,I as e,h as f,S as g,g as h,d as i,y as j,R as k};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-VFFWR44I.js";import"./chunk-YK4I75GA.js";export{a as getCliVersion};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-6HC2ZXG5.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-YK4I75GA.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim compat \u2014 check package compatibility
4
4
 
5
5
  usage:
@@ -20,7 +20,7 @@ examples:
20
20
  sootsim compat react-native-reanimated
21
21
  sootsim compat --json
22
22
  sootsim compat --brief
23
- `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-ZRY3Z6Z2.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-ZRY3Z6Z2.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
23
+ `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-MOMUT4FJ.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-MOMUT4FJ.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
24
24
  sootsim compatibility report
25
25
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
26
26
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-6HC2ZXG5.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-YK4I75GA.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim config \u2014 manage sootsim configuration
4
4
 
5
5
  usage:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r}from"./chunk-GPYYSXEX.js";import"./chunk-L2TEJXVI.js";import"./chunk-J64TT3CL.js";import"./chunk-YR3LVC5V.js";import"./chunk-CLPPEWVH.js";import"./chunk-PKLG3XOP.js";import"./chunk-STC3XOWJ.js";import"./chunk-ZCTYC33O.js";import"./chunk-YT4EDHZS.js";import"./chunk-6UFYAXFV.js";import"./chunk-PAK43NT5.js";import"./chunk-MKESTT4L.js";import"./chunk-Z4YIG3WU.js";import"./chunk-7CA35CG7.js";import"./chunk-6HC2ZXG5.js";export{d as buildOpenUrl,c as buildShellUrl,p as closeSimsBulk,q as planBulkCloseTargets,h as playwrightHostPidForSim,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,o as runClaimCommand,r as runCloseCommand,n as runFocusCommand,k as runListCommand,l as runOpenCommand,m as runUseCommand,i as signalDriverLaunchConnected,e as summarizeSimUrl,j as terminatePlaywrightHostsForSims,g as waitForSimMatch};
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r}from"./chunk-AWEEXX2S.js";import"./chunk-ACWM3RKN.js";import"./chunk-6R3S7M66.js";import"./chunk-HUUC3TYH.js";import"./chunk-T3CUB2ZH.js";import"./chunk-QWYIMQHF.js";import"./chunk-VQSP53OC.js";import"./chunk-NAB63JVH.js";import"./chunk-4WUXZXWE.js";import"./chunk-APQYD7HL.js";import"./chunk-DUPGSOQC.js";import"./chunk-D3J6G7JL.js";import"./chunk-WQQQQZUL.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.js";export{d as buildOpenUrl,c as buildShellUrl,p as closeSimsBulk,q as planBulkCloseTargets,h as playwrightHostPidForSim,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,o as runClaimCommand,r as runCloseCommand,n as runFocusCommand,k as runListCommand,l as runOpenCommand,m as runUseCommand,i as signalDriverLaunchConnected,e as summarizeSimUrl,j as terminatePlaywrightHostsForSims,g as waitForSimMatch};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-6HC2ZXG5.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import C from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-YK4I75GA.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import C from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as T,b as N}from"./chunk-4INIBCYZ.js";import"./chunk-DLT5ZB63.js";import{c as O}from"./chunk-NOGTBNWP.js";import"./chunk-CM27M3L2.js";import"./chunk-RRDHCABJ.js";import"./chunk-MKESTT4L.js";import"./chunk-Z4YIG3WU.js";import"./chunk-5QE7QJZ5.js";import"./chunk-L2JE65ES.js";import"./chunk-O33KUMYB.js";import{g as I,o as C,p as w,q as B}from"./chunk-7CA35CG7.js";import{a as W}from"./chunk-6HC2ZXG5.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as E,rmSync as X,writeFileSync as L}from"fs";import{dirname as D}from"path";var Q="dev.sootsim.daemon",_="SootSim Daemon",R="0.1.36";function F(t,e,r){let o=w(),n=B(),a=D(D(n)),y=D(n),u=`${a}/Resources`;X(o,{recursive:!0,force:!0}),E(C(),{recursive:!0}),E(y,{recursive:!0}),E(u,{recursive:!0}),L(`${a}/Info.plist`,z()),L(`${a}/PkgInfo`,"APPL????"),L(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${d}
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as T,b as N}from"./chunk-63E34ET7.js";import"./chunk-J6GWUBW3.js";import{c as O}from"./chunk-RL7P7EQA.js";import"./chunk-T77FN74G.js";import"./chunk-54EVAG4O.js";import"./chunk-D3J6G7JL.js";import"./chunk-WQQQQZUL.js";import"./chunk-VFFWR44I.js";import"./chunk-W7I7OUOK.js";import"./chunk-Y53I2KD4.js";import{g as I,o as C,p as w,q as B}from"./chunk-2Q32WWKY.js";import{a as W}from"./chunk-YK4I75GA.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as E,rmSync as X,writeFileSync as L}from"fs";import{dirname as D}from"path";var Q="dev.sootsim.daemon",_="SootSim Daemon",R="0.1.36";function F(t,e,r){let o=w(),n=B(),a=D(D(n)),y=D(n),u=`${a}/Resources`;X(o,{recursive:!0,force:!0}),E(C(),{recursive:!0}),E(y,{recursive:!0}),E(u,{recursive:!0}),L(`${a}/Info.plist`,z()),L(`${a}/PkgInfo`,"APPL????"),L(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let d=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${d}
3
3
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:n}}function z(){return`<?xml version="1.0" encoding="UTF-8"?>
4
4
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5
5
  <plist version="1.0">
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{f,m as T}from"./chunk-J64TT3CL.js";import{F as A,G as D,H as O,I as x,J as v}from"./chunk-YR3LVC5V.js";import{c as S,e as $,g as N}from"./chunk-CLPPEWVH.js";import"./chunk-PKLG3XOP.js";import"./chunk-Z4YIG3WU.js";import"./chunk-7CA35CG7.js";import"./chunk-6HC2ZXG5.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{f,m as T}from"./chunk-6R3S7M66.js";import{F as A,G as D,H as O,I as x,J as v}from"./chunk-HUUC3TYH.js";import{c as S,e as $,g as N}from"./chunk-T3CUB2ZH.js";import"./chunk-QWYIMQHF.js";import"./chunk-WQQQQZUL.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
3
3
  sootsim debug \u2014 drive __sootsimDebug from the terminal
4
4
 
5
5
  usage:
@@ -167,7 +167,7 @@ examples:
167
167
  } : null,
168
168
  samples,
169
169
  }
170
- })()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(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","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-6GEJLBYU.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
170
+ })()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(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","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-EOMNE3FJ.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
171
171
  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 A(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 D(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=`(() => {
172
172
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
173
173
  if (!d) return null;
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-DMGC4JSN.js";import"./chunk-EXBBXVB3.js";import"./chunk-ZQTCNGCU.js";import"./chunk-J6RB33XR.js";import"./chunk-U7DSWHLT.js";import"./chunk-5KOQJGIB.js";import"./chunk-5JMOVKGM.js";import"./chunk-GPYYSXEX.js";import"./chunk-L2TEJXVI.js";import"./chunk-J64TT3CL.js";import"./chunk-YR3LVC5V.js";import"./chunk-CLPPEWVH.js";import"./chunk-PKLG3XOP.js";import"./chunk-STC3XOWJ.js";import"./chunk-ZCTYC33O.js";import"./chunk-YT4EDHZS.js";import"./chunk-6UFYAXFV.js";import"./chunk-PAK43NT5.js";import"./chunk-4INIBCYZ.js";import"./chunk-DLT5ZB63.js";import"./chunk-CM27M3L2.js";import"./chunk-MKESTT4L.js";import"./chunk-Z4YIG3WU.js";import"./chunk-UQ4PTAAN.js";import"./chunk-O33KUMYB.js";import"./chunk-7CA35CG7.js";import"./chunk-6HC2ZXG5.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-TBIILRLW.js";import"./chunk-KRZU6LRW.js";import"./chunk-XVHJZCMT.js";import"./chunk-3FMTRV2A.js";import"./chunk-TVRQ3SOL.js";import"./chunk-LQQUA6BP.js";import"./chunk-4DTA5UKZ.js";import"./chunk-AWEEXX2S.js";import"./chunk-ACWM3RKN.js";import"./chunk-6R3S7M66.js";import"./chunk-HUUC3TYH.js";import"./chunk-T3CUB2ZH.js";import"./chunk-QWYIMQHF.js";import"./chunk-VQSP53OC.js";import"./chunk-NAB63JVH.js";import"./chunk-4WUXZXWE.js";import"./chunk-APQYD7HL.js";import"./chunk-DUPGSOQC.js";import"./chunk-63E34ET7.js";import"./chunk-J6GWUBW3.js";import"./chunk-T77FN74G.js";import"./chunk-D3J6G7JL.js";import"./chunk-WQQQQZUL.js";import"./chunk-UBF3TGKU.js";import"./chunk-Y53I2KD4.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
3
3
  sootsim detox \u2014 run detox-style tests against a sootsim shell
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-ZQTCNGCU.js";import{c as d,e as l,h as a}from"./chunk-CLPPEWVH.js";import"./chunk-PKLG3XOP.js";import"./chunk-CM27M3L2.js";import"./chunk-Z4YIG3WU.js";import"./chunk-UQ4PTAAN.js";import{f as c,g as r,h as g}from"./chunk-O33KUMYB.js";import"./chunk-7CA35CG7.js";import"./chunk-6HC2ZXG5.js";function h(){console.log(`
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-XVHJZCMT.js";import{c as d,e as l,h as a}from"./chunk-T3CUB2ZH.js";import"./chunk-QWYIMQHF.js";import"./chunk-T77FN74G.js";import"./chunk-WQQQQZUL.js";import"./chunk-UBF3TGKU.js";import{f as c,g as r,h as g}from"./chunk-Y53I2KD4.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.js";function h(){console.log(`
3
3
  sootsim device \u2014 inspect or change the live device preset for a sim
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as E,e as R,h as b}from"./chunk-CLPPEWVH.js";import{b as v}from"./chunk-PKLG3XOP.js";import"./chunk-Z4YIG3WU.js";import"./chunk-7CA35CG7.js";import"./chunk-6HC2ZXG5.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(`
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as E,e as R,h as b}from"./chunk-T3CUB2ZH.js";import{b as v}from"./chunk-QWYIMQHF.js";import"./chunk-WQQQQZUL.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.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(`
3
3
  sootsim diagnose \u2014 compact "what just went wrong?" report
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-OT7LR5RE.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-VQSP53OC.js";import"./chunk-NAB63JVH.js";import"./chunk-4WUXZXWE.js";import"./chunk-APQYD7HL.js";import"./chunk-DUPGSOQC.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-YNAHQ7QZ.js";import"./chunk-PE3O45IA.js";import{a as v,f as h}from"./chunk-GPYYSXEX.js";import"./chunk-L2TEJXVI.js";import"./chunk-J64TT3CL.js";import"./chunk-YR3LVC5V.js";import"./chunk-CLPPEWVH.js";import"./chunk-PKLG3XOP.js";import{b as f,g as u}from"./chunk-STC3XOWJ.js";import{a as p}from"./chunk-ZCTYC33O.js";import"./chunk-YT4EDHZS.js";import{c as m}from"./chunk-6UFYAXFV.js";import"./chunk-PAK43NT5.js";import"./chunk-MKESTT4L.js";import"./chunk-Z4YIG3WU.js";import"./chunk-7CA35CG7.js";import"./chunk-6HC2ZXG5.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-MERAEG54.js";import"./chunk-OT7LR5RE.js";import{a as v,f as h}from"./chunk-AWEEXX2S.js";import"./chunk-ACWM3RKN.js";import"./chunk-6R3S7M66.js";import"./chunk-HUUC3TYH.js";import"./chunk-T3CUB2ZH.js";import"./chunk-QWYIMQHF.js";import{b as f,g as u}from"./chunk-VQSP53OC.js";import{a as p}from"./chunk-NAB63JVH.js";import"./chunk-4WUXZXWE.js";import{c as m}from"./chunk-APQYD7HL.js";import"./chunk-DUPGSOQC.js";import"./chunk-D3J6G7JL.js";import"./chunk-WQQQQZUL.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim electron \u2014 launch the desktop companion
4
4
 
5
5
  usage:
@@ -15,4 +15,4 @@ examples:
15
15
  sootsim electron
16
16
  sootsim electron --port 5173
17
17
  sootsim electron --profile qa
18
- `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-DBBE3NZ7.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
18
+ `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-XZWIGLQT.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as d,c as e,d as f}from"./chunk-TBIILRLW.js";import"./chunk-KRZU6LRW.js";import"./chunk-XVHJZCMT.js";import"./chunk-3FMTRV2A.js";import"./chunk-TVRQ3SOL.js";import"./chunk-LQQUA6BP.js";import{d as a,e as b}from"./chunk-4DTA5UKZ.js";import"./chunk-AWEEXX2S.js";import"./chunk-ACWM3RKN.js";import"./chunk-6R3S7M66.js";import"./chunk-HUUC3TYH.js";import"./chunk-T3CUB2ZH.js";import"./chunk-QWYIMQHF.js";import"./chunk-VQSP53OC.js";import"./chunk-NAB63JVH.js";import"./chunk-4WUXZXWE.js";import"./chunk-APQYD7HL.js";import"./chunk-DUPGSOQC.js";import"./chunk-63E34ET7.js";import"./chunk-J6GWUBW3.js";import"./chunk-T77FN74G.js";import"./chunk-D3J6G7JL.js";import"./chunk-WQQQQZUL.js";import"./chunk-UBF3TGKU.js";import"./chunk-Y53I2KD4.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-RL7P7EQA.js";import"./chunk-T77FN74G.js";import"./chunk-54EVAG4O.js";import"./chunk-D3J6G7JL.js";import"./chunk-WQQQQZUL.js";import"./chunk-VFFWR44I.js";import"./chunk-W7I7OUOK.js";import"./chunk-Y53I2KD4.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-VFIXAYS5.js";import"./chunk-PKLG3XOP.js";import"./chunk-6HC2ZXG5.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-7WLL6LH4.js";import"./chunk-QWYIMQHF.js";import"./chunk-YK4I75GA.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,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-7CA35CG7.js";import"./chunk-6HC2ZXG5.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,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-2Q32WWKY.js";import"./chunk-YK4I75GA.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.90 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as V}from"./chunk-VFIXAYS5.js";import{a as ft,b as gt}from"./chunk-5YAADNTI.js";import{a as Ue,h as he,k as oe}from"./chunk-5JMOVKGM.js";import{b as yt,c as ht,i as bt}from"./chunk-GPYYSXEX.js";import"./chunk-L2TEJXVI.js";import{a as Q,b as E,c as C,d as Fe,e as re,f as X,g as ye,h as ue,i as ut,j as mt,k as Ae,l as pt}from"./chunk-J64TT3CL.js";import{B as lt,D as le,E as ct,K as dt,a as ge,b as Ke,c as ze,d as Ye,e as Ge,f as Xe,g as Ve,h as Ie,i as Ne,n as _e,o as Qe,p as Ze,q as et,r as tt,s as ot,t as st,u as nt,v as rt,w as it,x as at}from"./chunk-YR3LVC5V.js";import{c as Le,e as qe,f as We,g as He,h as Me}from"./chunk-CLPPEWVH.js";import{b as Je}from"./chunk-PKLG3XOP.js";import"./chunk-STC3XOWJ.js";import"./chunk-ZCTYC33O.js";import"./chunk-YT4EDHZS.js";import"./chunk-6UFYAXFV.js";import"./chunk-PAK43NT5.js";import{a as Be}from"./chunk-6TCGDWMB.js";import{a as ke,c as Te}from"./chunk-RRDHCABJ.js";import{a as je}from"./chunk-MKESTT4L.js";import"./chunk-Z4YIG3WU.js";import"./chunk-7CA35CG7.js";import"./chunk-6HC2ZXG5.js";import{existsSync as oo,mkdirSync as so,readFileSync as no,rmSync as wt,writeFileSync as ro}from"fs";import{tmpdir as io}from"os";import{dirname as ao,join as lo,resolve as co}from"path";var me=1,uo="SOOTSIM_INSPECT_NOTICE_PATH",mo=300*1e3,po=15e3;function xt(){return co(process.env[uo]||lo(io(),"sootsim-inspect-notice-state.json"))}function fo(o,c){return Object.fromEntries(Object.entries(o).filter(([,i])=>typeof i?.signature=="string"&&Number.isFinite(i?.updatedAt)&&c-i.updatedAt<=mo))}function go(o){let c=xt();if(!oo(c))return{version:me,entries:{}};try{let i=JSON.parse(no(c,"utf8"));return i.version!==me||!i.entries||typeof i.entries!="object"?(wt(c,{force:!0}),{version:me,entries:{}}):{version:me,entries:fo(i.entries,o)}}catch{return wt(c,{force:!0}),{version:me,entries:{}}}}function yo(o){let c=xt();so(ao(c),{recursive:!0}),ro(c,JSON.stringify(o,null,2)+`
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as V}from"./chunk-7WLL6LH4.js";import{a as ft,b as gt}from"./chunk-DFDRE6OB.js";import{a as Ue,h as he,k as oe}from"./chunk-4DTA5UKZ.js";import{b as yt,c as ht,i as bt}from"./chunk-AWEEXX2S.js";import"./chunk-ACWM3RKN.js";import{a as Q,b as E,c as C,d as Fe,e as re,f as X,g as ye,h as ue,i as ut,j as mt,k as Ae,l as pt}from"./chunk-6R3S7M66.js";import{B as lt,D as le,E as ct,K as dt,a as ge,b as Ke,c as ze,d as Ye,e as Ge,f as Xe,g as Ve,h as Ie,i as Ne,n as _e,o as Qe,p as Ze,q as et,r as tt,s as ot,t as st,u as nt,v as rt,w as it,x as at}from"./chunk-HUUC3TYH.js";import{c as Le,e as qe,f as We,g as He,h as Me}from"./chunk-T3CUB2ZH.js";import{b as Je}from"./chunk-QWYIMQHF.js";import"./chunk-VQSP53OC.js";import"./chunk-NAB63JVH.js";import"./chunk-4WUXZXWE.js";import"./chunk-APQYD7HL.js";import"./chunk-DUPGSOQC.js";import{a as Be}from"./chunk-QX6G6HA2.js";import{a as ke,c as Te}from"./chunk-54EVAG4O.js";import{a as je}from"./chunk-D3J6G7JL.js";import"./chunk-WQQQQZUL.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.js";import{existsSync as oo,mkdirSync as so,readFileSync as no,rmSync as wt,writeFileSync as ro}from"fs";import{tmpdir as io}from"os";import{dirname as ao,join as lo,resolve as co}from"path";var me=1,uo="SOOTSIM_INSPECT_NOTICE_PATH",mo=300*1e3,po=15e3;function xt(){return co(process.env[uo]||lo(io(),"sootsim-inspect-notice-state.json"))}function fo(o,c){return Object.fromEntries(Object.entries(o).filter(([,i])=>typeof i?.signature=="string"&&Number.isFinite(i?.updatedAt)&&c-i.updatedAt<=mo))}function go(o){let c=xt();if(!oo(c))return{version:me,entries:{}};try{let i=JSON.parse(no(c,"utf8"));return i.version!==me||!i.entries||typeof i.entries!="object"?(wt(c,{force:!0}),{version:me,entries:{}}):{version:me,entries:fo(i.entries,o)}}catch{return wt(c,{force:!0}),{version:me,entries:{}}}}function yo(o){let c=xt();so(ao(c),{recursive:!0}),ro(c,JSON.stringify(o,null,2)+`
3
3
  `)}function ho(o,c){let i=c.trim()||"default";return`${o}:${i}`}function Pe(o,c,i,l={}){let f=l.nowMs??Date.now(),a=l.cooldownMs??po,g=go(f),b=ho(o,c),k=g.entries[b];return k&&k.signature===i&&f-k.updatedAt<a?!1:(g.entries[b]={signature:i,updatedAt:f},yo(g),!0)}async function $t(o,c={args:[]}){let i=await Ke(o);if(E(c.args)){C(i);return}console.log(` nodes: ${i.nodes}`)}function Oe(o,c){let i=o.indexOf(c);return i>=0&&i+1<o.length?o[i+1]:null}async function vt(o){let{bridge:c,args:i,positional:l}=o,f=i.includes("--verbose")||i.includes("-v"),a=E(i),g=f&&!a,b=i.includes("--watch")||i.includes("-w"),k=1e3,M=i.includes("--compact"),h=i.includes("--no-xy"),S=i.includes("--no-clipped"),F=i.includes("--include-occluded"),T=Oe(i,"--testid-like"),R=Oe(i,"--only"),J=Oe(i,"--subtree"),u=l[1]&&!l[1].startsWith("-")?l[1]:void 0,Y=u?/[*?]/.test(u):!1,j=!Y&&!R?u:void 0,D=R??(Y?u:void 0),Z=async()=>{await ye(c,{verbose:g});let $=await Ge(c,{describe:!0,verbose:f,filter:j||"",testIdLike:T||void 0,onlyGlob:D||void 0,subtreeRoot:J||void 0,compact:M,hideXy:h,includeOccluded:F}),I=$?.tree,W=$?.shell,L=$?.keyboard;if(a){C({shell:W,tree:I??"",keyboard:L});return}if(W&&typeof W=="object"){let B=[W.state?`state=${W.state}`:null,W.activeApp?`app=${W.activeApp}`:null,W.showSwitcher?"switcher":null,W.switcherPhase&&W.switcherPhase!=="idle"?`phase=${W.switcherPhase}`:null].filter(Boolean);B.length>0&&console.log(` shell: ${B.join(" ")}`)}if(typeof I=="string"&&I.startsWith("__SUBTREE_NOT_FOUND__:")){let B=I.slice(22);console.log(` subtree root not found: ${B}`),V("subtree-root-not-found",B);return}if(!I){let B=$?.nodeCount??0;console.log(" no matching nodes found"),!(j||T||D||J)&&B<10&&V("app-still-loading",B);return}let z=I,te=0;if(S&&typeof z=="string"){let B=z.split(`
4
4
  `),ae=[];for(let ce of B){if(ce.includes("(clipped:")){te+=1;continue}ae.push(ce)}z=ae.join(`
5
5
  `)}console.log(z),te>0&&console.log(` ${te} clipped row(s) hidden (omit --no-clipped to see)`);let ne=j||T||D||J;if((j||T||D)&&!b&&V("describe-filter-context"),!ne&&!b&&I.split(`
@@ -117,7 +117,7 @@ import{a as V}from"./chunk-VFIXAYS5.js";import{a as ft,b as gt}from"./chunk-5YAA
117
117
  `);console.log(`${t??""}
118
118
 
119
119
  ${n}
120
- `),process.exit(0)}let F=f.wsPort,T=f.simId,R=f.simIdSource,J=f.commandTimeoutMs;if(g==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-I4VYF6F4.js"),t=e();console.log(` available drivers (${t.length}):
120
+ `),process.exit(0)}let F=f.wsPort,T=f.simId,R=f.simIdSource,J=f.commandTimeoutMs;if(g==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-FHFWDATI.js"),t=e();console.log(` available drivers (${t.length}):
121
121
  `);let n=Math.max(...t.map(s=>s.id.length),6),r=Math.max(...t.map(s=>s.kind.length),4);for(let s of t){let d=s.available?"\u2713":"\u2717",m=s.id.padEnd(n),y=s.kind.padEnd(r);console.log(` ${d} ${m} ${y} ${s.description}`),s.available&&s.detail?console.log(` ${s.detail}`):!s.available&&s.reason&&console.log(` unavailable: ${s.reason}`)}return}let u=qe(f),Y=T||"default",j=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]),D=200;function Z(e){let t=e.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let r=/<title[^>]*>([^<]+)<\/title>/i.exec(e)?.[1]?.trim(),s=/<body[^>]*>([\s\S]*?)<\//i.exec(e)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),d=r||s||"html error page";return`<html ${e.length}B> "${d}" (body elided \u2014 add --json for the full payload)`}return t.length<=D?t:`${t.slice(0,D)}\u2026 (+${t.length-D} more bytes)`}function ee(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){let t=be()?5e3:1500;try{let{settled:n,elapsed:r}=await oe({bridge:e,maxMs:t,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
122
122
  `)}catch{}}function I(e){return!(!e||e.hit===!1||e.ok===!1||e.pointerTapHandled===!1&&!e.keyboardOpened&&!e.isTextInput)}function W(e,t){return{id:e.target?.id??e.match?.id??e.node?.id??null,testID:e.target?.testID??e.match?.testID??e.node?.testID??null,text:e.target?.text??e.target?.accessibilityLabel??e.match?.text??e.match?.accessibilityLabel??e.node?.text??t??null,type:e.target?.type??e.match?.type??e.node?.type??null}}async function L(e){let t=0,n=null,r=null;try{await oe({bridge:u,maxMs:be()?3e3:1200,pollMs:32,stablePolls:2})}catch{}let s=Date.now()+(be()?5e3:2500);for(;Date.now()<=s||t===0;){t++;let d=await e.resolve();if(n=d,d?.error==="bridge-not-ready"||d?.ambiguous||d?.nthOutOfRange)return{payload:d,result:null,attempts:t,failure:"special"};if(d&&typeof d.cx=="number"&&typeof d.cy=="number"){let y=await u.send({type:"tap",x:d.cx,y:d.cy,target:W(d,e.textFallback)});if(r=y,I(y))return{payload:d,result:y,attempts:t}}let m=s-Date.now();if(m<=0)break;try{await oe({bridge:u,maxMs:Math.min(m,700),pollMs:32,stablePolls:2})}catch{await Q(Math.min(120,m))}}return{payload:n,result:r,attempts:t,failure:n&&typeof n.cx=="number"?"missed":"not-found"}}function z(e,t){console.error(` tap failed: ${e} stayed visible but did not receive a hittable press after ${t.attempts} attempt${t.attempts===1?"":"s"}`),t.result&&console.error(` last result: ${JSON.stringify(t.result)}`)}async function te(){try{return await u.send({type:"evaluate",code:`(() => ({
123
123
  console: window.__sootsimConsole?.count?.() || null,
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.91 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-W3AG5PFE.js";import"./chunk-MERAEG54.js";import"./chunk-SISOWHRQ.js";import"./chunk-T3CUB2ZH.js";import"./chunk-QWYIMQHF.js";import"./chunk-63E34ET7.js";import"./chunk-J6GWUBW3.js";import"./chunk-WQQQQZUL.js";import"./chunk-2Q32WWKY.js";import"./chunk-YK4I75GA.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};