sootsim 0.1.213 → 0.1.215

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 (140) hide show
  1. package/dist-cli/bin.js +4 -4
  2. package/dist-cli/chunks/{agent-PXBOBQCI.js → agent-63EE3N4N.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-PJWCDUES.js → agent-wrapper-GIXQ4UC3.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-5BFK3BPJ.js → app-fonts-T24PVENP.js} +2 -2
  5. package/dist-cli/chunks/{assert-ZQBH2FHK.js → assert-C2EJWQW3.js} +2 -2
  6. package/dist-cli/chunks/{auth-6VN3LBWW.js → auth-HYWSF7FV.js} +2 -2
  7. package/dist-cli/chunks/beta-YMHG327W.js +2 -0
  8. package/dist-cli/chunks/{camera-3EVST4X2.js → camera-TUULMDLJ.js} +2 -2
  9. package/dist-cli/chunks/{chunk-KWPTKVOD.js → chunk-2FEGONIZ.js} +1 -1
  10. package/dist-cli/chunks/{chunk-YIRGMOQC.js → chunk-5GU7LW64.js} +1 -1
  11. package/dist-cli/chunks/{chunk-MBTZ72OK.js → chunk-5MUXEXEW.js} +6 -6
  12. package/dist-cli/chunks/{chunk-R3Z6QS26.js → chunk-6NQYBCWC.js} +1 -1
  13. package/dist-cli/chunks/{chunk-GGNU6KXJ.js → chunk-6USQVYW2.js} +2 -2
  14. package/dist-cli/chunks/{chunk-34ZLNSTB.js → chunk-7COBEK2I.js} +2 -2
  15. package/dist-cli/chunks/chunk-A3LHGXZW.js +1 -0
  16. package/dist-cli/chunks/{chunk-A5PGH6GU.js → chunk-AHG7WAP6.js} +2 -2
  17. package/dist-cli/chunks/chunk-AHWQZXFB.js +119 -0
  18. package/dist-cli/chunks/{chunk-DL5UW643.js → chunk-AKNZ6QBL.js} +1 -1
  19. package/dist-cli/chunks/{chunk-BBHSIDL7.js → chunk-BU7V5UGD.js} +2 -2
  20. package/dist-cli/chunks/{chunk-L6CUBNOP.js → chunk-CKCDJCPZ.js} +1 -1
  21. package/dist-cli/chunks/{chunk-E3UTRL4K.js → chunk-CSJUJIRP.js} +2 -2
  22. package/dist-cli/chunks/{chunk-W77R37C6.js → chunk-DVJZUBQB.js} +1 -1
  23. package/dist-cli/chunks/{chunk-SNDRRWLJ.js → chunk-E6YKEDDM.js} +1 -1
  24. package/dist-cli/chunks/{chunk-A5W26KZ2.js → chunk-EB4FLAAE.js} +2 -2
  25. package/dist-cli/chunks/{chunk-6GF7AYWF.js → chunk-EGCQXWLS.js} +2 -2
  26. package/dist-cli/chunks/{chunk-VCU23PAS.js → chunk-EWYTZ7FV.js} +4 -4
  27. package/dist-cli/chunks/{chunk-PMZU2MXQ.js → chunk-FEFLFVIU.js} +1 -1
  28. package/dist-cli/chunks/{chunk-SAJDH6T4.js → chunk-FWUGH36K.js} +2 -2
  29. package/dist-cli/chunks/{chunk-CK5W32IL.js → chunk-HKEH2UOD.js} +1 -1
  30. package/dist-cli/chunks/chunk-K7OZYJKD.js +2 -0
  31. package/dist-cli/chunks/{chunk-345SCUPN.js → chunk-KG6V4NCI.js} +2 -2
  32. package/dist-cli/chunks/{chunk-M6QAVNUD.js → chunk-KGSLGXWW.js} +1 -1
  33. package/dist-cli/chunks/{chunk-7ETH4QC5.js → chunk-LIFR6X36.js} +2 -2
  34. package/dist-cli/chunks/chunk-NJPDAYWO.js +1 -0
  35. package/dist-cli/chunks/{chunk-PQRTN7R3.js → chunk-OHQOMV2J.js} +2 -2
  36. package/dist-cli/chunks/{chunk-XKYWN32Q.js → chunk-OUB7WT7Q.js} +1 -1
  37. package/dist-cli/chunks/{chunk-B4ZHF6HX.js → chunk-QGFTJYVC.js} +1 -1
  38. package/dist-cli/chunks/{chunk-XRTETVLA.js → chunk-QXJPLKP7.js} +1 -1
  39. package/dist-cli/chunks/{chunk-W7XLNK6M.js → chunk-RFJMDMLK.js} +2 -2
  40. package/dist-cli/chunks/{chunk-DCNE55YI.js → chunk-RIAS4TMS.js} +3 -3
  41. package/dist-cli/chunks/{chunk-MHZUULXC.js → chunk-SADP73NH.js} +2 -2
  42. package/dist-cli/chunks/{chunk-6A64BUDU.js → chunk-T4EGFOSE.js} +4 -4
  43. package/dist-cli/chunks/{chunk-34R2XUUH.js → chunk-UJZFS2JM.js} +2 -2
  44. package/dist-cli/chunks/{chunk-MF7JDUE4.js → chunk-VD2SYCCY.js} +2 -2
  45. package/dist-cli/chunks/{chunk-QYAABDHA.js → chunk-VIXY7DGW.js} +2 -2
  46. package/dist-cli/chunks/{chunk-IV5EGT4L.js → chunk-VMYBUPRT.js} +4 -4
  47. package/dist-cli/chunks/{chunk-URSWUWMB.js → chunk-X7VZ7D6Y.js} +3 -3
  48. package/dist-cli/chunks/{chunk-ZMCH7LNI.js → chunk-XVYCMZMB.js} +2 -2
  49. package/dist-cli/chunks/{chunk-WWCLVFFT.js → chunk-YTQ5RCVB.js} +1 -1
  50. package/dist-cli/chunks/{chunk-RRMXW3OZ.js → chunk-ZT7M27FX.js} +2 -2
  51. package/dist-cli/chunks/cli-version-DPI32W6E.js +2 -0
  52. package/dist-cli/chunks/{compat-2EYTY3H2.js → compat-EL7PRWER.js} +3 -3
  53. package/dist-cli/chunks/{config-RE5F2ANP.js → config-IZZQIOI5.js} +2 -2
  54. package/dist-cli/chunks/{control-XATEDZ5J.js → control-FHQBCUP6.js} +2 -2
  55. package/dist-cli/chunks/daemon-GF5QBYWN.js +2 -0
  56. package/dist-cli/chunks/{debug-YBWZ46PB.js → debug-6CB5QEGF.js} +3 -3
  57. package/dist-cli/chunks/{desktop-Q7I2G5LT.js → desktop-DLU2VTNC.js} +3 -3
  58. package/dist-cli/chunks/{detox-RIAPIQLU.js → detox-N2D2AY7S.js} +2 -2
  59. package/dist-cli/chunks/{device-PPHHQL47.js → device-FGZWPD26.js} +2 -2
  60. package/dist-cli/chunks/{diagnose-FAMYDGKH.js → diagnose-ICQE2EWG.js} +2 -2
  61. package/dist-cli/chunks/drivers-J4BHBZXD.js +2 -0
  62. package/dist-cli/chunks/flow-LTUM776G.js +2 -0
  63. package/dist-cli/chunks/help-LBG75ITV.js +2 -0
  64. package/dist-cli/chunks/{home-paths-H34FDUJS.js → home-paths-VWN4PHJ3.js} +2 -2
  65. package/dist-cli/chunks/inspect-XAEZTCMI.js +2 -0
  66. package/dist-cli/chunks/install-desktop-2CSEI2MD.js +2 -0
  67. package/dist-cli/chunks/{login-DVCETH23.js → login-FO2R5CSL.js} +4 -4
  68. package/dist-cli/chunks/{logout-MJ5323X4.js → logout-L5R3GRIG.js} +2 -2
  69. package/dist-cli/chunks/{maestro-Y6GUYLSM.js → maestro-K57OH6RI.js} +3 -3
  70. package/dist-cli/chunks/{maestro-generate-22RWS4QX.js → maestro-generate-7VVSWXKH.js} +3 -3
  71. package/dist-cli/chunks/mode-VPVEZ652.js +111 -0
  72. package/dist-cli/chunks/optional-demo-registry-D47EWM4J.js +2 -0
  73. package/dist-cli/chunks/{perf-UXEZYT3O.js → perf-AA66N7ML.js} +2 -2
  74. package/dist-cli/chunks/{record-VS4A3B4Y.js → record-HVK5TWAF.js} +3 -3
  75. package/dist-cli/chunks/runtime-EV7TFPWL.js +2 -0
  76. package/dist-cli/chunks/{screenshot-command-4X3ERV33.js → screenshot-command-TPVAQ6FC.js} +3 -3
  77. package/dist-cli/chunks/{screenshots-capture-NJTPWWPZ.js → screenshots-capture-OT5KMPQQ.js} +9 -9
  78. package/dist-cli/chunks/{serve-Q3AHVMOA.js → serve-3CTBVM5S.js} +2 -2
  79. package/dist-cli/chunks/{setup-4I2YQGRE.js → setup-JCJJQJKU.js} +3 -3
  80. package/dist-cli/chunks/{skills-HR56BS2S.js → skills-HTH527W2.js} +2 -2
  81. package/dist-cli/chunks/{storage-2CG4U25V.js → storage-O6RNOFWM.js} +2 -2
  82. package/dist-cli/chunks/store-ANJJMDLX.js +2 -0
  83. package/dist-cli/chunks/telemetry-GZK77NUU.js +2 -0
  84. package/dist-cli/chunks/{timeline-YCT2GPZU.js → timeline-RQHPAEK6.js} +2 -2
  85. package/dist-cli/chunks/{upgrade-WBNIAFCB.js → upgrade-OKNBSSBF.js} +2 -2
  86. package/dist-cli/chunks/upload-KAY6K5ML.js +2 -0
  87. package/dist-cli/chunks/{version-PDUFTOM7.js → version-EY4PANXP.js} +2 -2
  88. package/dist-cli/chunks/{web-DQQDPOON.js → web-PI2BL42A.js} +2 -2
  89. package/dist-cli/chunks/{what-happened-CGNTKFOU.js → what-happened-MC5PTHCG.js} +2 -2
  90. package/dist-lib/agent-daemon-client.cjs +1 -1
  91. package/dist-lib/agent-events.cjs +1 -1
  92. package/dist-lib/agent-identity.cjs +1 -1
  93. package/dist-lib/agent-sessions.cjs +1 -1
  94. package/dist-lib/attached-projects.cjs +1 -1
  95. package/dist-lib/auth/shared-session.cjs +1 -1
  96. package/dist-lib/backend-origin.cjs +1 -1
  97. package/dist-lib/beta.cjs +1 -1
  98. package/dist-lib/beta.mjs +1 -1
  99. package/dist-lib/bridge-constants.cjs +1 -1
  100. package/dist-lib/cli-constants.cjs +1 -1
  101. package/dist-lib/config.cjs +1 -1
  102. package/dist-lib/detox/index.cjs +1 -1
  103. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  104. package/dist-lib/home-paths.cjs +1 -1
  105. package/dist-lib/host/bridge-host.cjs +1 -1
  106. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  107. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  108. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  109. package/dist-lib/host/websocket-proxy.cjs +1 -1
  110. package/dist-lib/index.cjs +1 -1
  111. package/dist-lib/jump-to-source-babel.cjs +1 -1
  112. package/dist-lib/menu.cjs +1 -1
  113. package/dist-lib/menu.mjs +1 -1
  114. package/dist-lib/metro.cjs +1 -1
  115. package/dist-lib/profiles.cjs +1 -1
  116. package/dist-lib/render-mode.cjs +1 -1
  117. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  118. package/dist-lib/sdk.cjs +11 -3
  119. package/dist-lib/sdk.mjs +11 -3
  120. package/dist-lib/skills.cjs +20 -2
  121. package/dist-lib/vite.cjs +1 -1
  122. package/package.json +1 -1
  123. package/dist-cli/chunks/beta-ICE6G2X3.js +0 -2
  124. package/dist-cli/chunks/chunk-NYBRCPXY.js +0 -119
  125. package/dist-cli/chunks/chunk-YBSLFZF2.js +0 -1
  126. package/dist-cli/chunks/chunk-YKTGO7GR.js +0 -1
  127. package/dist-cli/chunks/chunk-ZCIJF6TG.js +0 -2
  128. package/dist-cli/chunks/cli-version-X6SBWYZR.js +0 -2
  129. package/dist-cli/chunks/daemon-JLQHIAJB.js +0 -2
  130. package/dist-cli/chunks/drivers-DUQEV3GT.js +0 -2
  131. package/dist-cli/chunks/flow-BKVP4VKL.js +0 -2
  132. package/dist-cli/chunks/help-KDPPO3QK.js +0 -2
  133. package/dist-cli/chunks/inspect-BASDWZYD.js +0 -2
  134. package/dist-cli/chunks/install-desktop-RMAWV6JZ.js +0 -2
  135. package/dist-cli/chunks/mode-OLGFFUSY.js +0 -95
  136. package/dist-cli/chunks/optional-demo-registry-OYI5WQN4.js +0 -2
  137. package/dist-cli/chunks/runtime-IYN3SKFL.js +0 -2
  138. package/dist-cli/chunks/store-YITXNLYN.js +0 -2
  139. package/dist-cli/chunks/telemetry-XQHZBPJE.js +0 -2
  140. package/dist-cli/chunks/upload-QG3WB6P6.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-DL5UW643.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.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-AKNZ6QBL.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-DQQDPOON.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-DQQDPOON.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-PI2BL42A.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-PI2BL42A.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.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as i,C as s,x as t}from"./chunk-PMZU2MXQ.js";import"./chunk-DL5UW643.js";function l(){let e=i();console.log(` telemetry is ${e?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function r(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${t()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A as i,C as s,x as t}from"./chunk-FEFLFVIU.js";import"./chunk-AKNZ6QBL.js";function l(){let e=i();console.log(` telemetry is ${e?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function r(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${t()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
3
3
  sootsim config \u2014 manage local CLI preferences
4
4
 
5
5
  usage:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-A5PGH6GU.js";import"./chunk-GGNU6KXJ.js";import"./chunk-YKTGO7GR.js";import"./chunk-YIRGMOQC.js";import"./chunk-CK5W32IL.js";import"./chunk-XRTETVLA.js";import"./chunk-SAJDH6T4.js";import"./chunk-6A64BUDU.js";import"./chunk-MBTZ72OK.js";import"./chunk-A5W26KZ2.js";import"./chunk-W77R37C6.js";import"./chunk-KWPTKVOD.js";import"./chunk-6GF7AYWF.js";import"./chunk-ZMCH7LNI.js";import"./chunk-XKYWN32Q.js";import"./chunk-WWCLVFFT.js";import"./chunk-PMZU2MXQ.js";import"./chunk-ZCIJF6TG.js";import"./chunk-DL5UW643.js";export{f as buildOpenUrl,e as buildShellUrl,s as closeSimsBulk,b as normalizeDeepLinkTarget,t as planBulkCloseTargets,k as playwrightHostPidForSim,h as printConnectedSims,c as resolveBundleTarget,d as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,r as runClaimCommand,u as runCloseCommand,q as runFocusCommand,n as runLinkCommand,o as runOpenCommand,p as runUseCommand,l as signalDriverLaunchConnected,g as summarizeSimUrl,m as terminatePlaywrightHostsForSims,i as waitForSimMatch,j as waitForSimMatchOrHostExit};
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-AHG7WAP6.js";import"./chunk-6USQVYW2.js";import"./chunk-A3LHGXZW.js";import"./chunk-5GU7LW64.js";import"./chunk-HKEH2UOD.js";import"./chunk-QXJPLKP7.js";import"./chunk-FWUGH36K.js";import"./chunk-T4EGFOSE.js";import"./chunk-5MUXEXEW.js";import"./chunk-EB4FLAAE.js";import"./chunk-DVJZUBQB.js";import"./chunk-2FEGONIZ.js";import"./chunk-EGCQXWLS.js";import"./chunk-XVYCMZMB.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-K7OZYJKD.js";import"./chunk-AKNZ6QBL.js";export{f as buildOpenUrl,e as buildShellUrl,s as closeSimsBulk,b as normalizeDeepLinkTarget,t as planBulkCloseTargets,k as playwrightHostPidForSim,h as printConnectedSims,c as resolveBundleTarget,d as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,r as runClaimCommand,u as runCloseCommand,q as runFocusCommand,n as runLinkCommand,o as runOpenCommand,p as runUseCommand,l as signalDriverLaunchConnected,g as summarizeSimUrl,m as terminatePlaywrightHostsForSims,i as waitForSimMatch,j as waitForSimMatchOrHostExit};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e}from"./chunk-RFJMDMLK.js";import"./chunk-LIFR6X36.js";import"./chunk-BU7V5UGD.js";import"./chunk-VD2SYCCY.js";import"./chunk-CSJUJIRP.js";import"./chunk-AHWQZXFB.js";import"./chunk-XVYCMZMB.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-QGFTJYVC.js";import"./chunk-6NQYBCWC.js";import"./chunk-K7OZYJKD.js";import"./chunk-AKNZ6QBL.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{f,m as T}from"./chunk-SAJDH6T4.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-6A64BUDU.js";import{g as D,i as O,k as x}from"./chunk-MBTZ72OK.js";import"./chunk-XKYWN32Q.js";import"./chunk-WWCLVFFT.js";import"./chunk-PMZU2MXQ.js";import"./chunk-DL5UW643.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{f,m as T}from"./chunk-FWUGH36K.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-T4EGFOSE.js";import{g as D,i as O,k as x}from"./chunk-5MUXEXEW.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-AKNZ6QBL.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:
@@ -170,7 +170,7 @@ examples:
170
170
  } : null,
171
171
  samples,
172
172
  }
173
- })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-BASDWZYD.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
173
+ })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-XAEZTCMI.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
174
174
  known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
175
175
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
176
176
  if (!d) return null;
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-URSWUWMB.js";import{a as v,h as k}from"./chunk-A5PGH6GU.js";import"./chunk-GGNU6KXJ.js";import"./chunk-YKTGO7GR.js";import"./chunk-YIRGMOQC.js";import"./chunk-CK5W32IL.js";import"./chunk-XRTETVLA.js";import{a as u}from"./chunk-SNDRRWLJ.js";import"./chunk-SAJDH6T4.js";import"./chunk-6A64BUDU.js";import"./chunk-MBTZ72OK.js";import"./chunk-YBSLFZF2.js";import{b as m,g as f,l as h}from"./chunk-A5W26KZ2.js";import{a as c}from"./chunk-W77R37C6.js";import"./chunk-KWPTKVOD.js";import"./chunk-6GF7AYWF.js";import"./chunk-ZMCH7LNI.js";import"./chunk-XKYWN32Q.js";import"./chunk-WWCLVFFT.js";import"./chunk-PMZU2MXQ.js";import"./chunk-ZCIJF6TG.js";import"./chunk-DL5UW643.js";function I(e){let i=e.indexOf("--port");if(i<0)return;let o=e[i+1],t=o?Number(o):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),t}async function O(e,i){let o=I(e)??i.port;return o?k(String(o)):void 0}async function w(e,i){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-X7VZ7D6Y.js";import{a as v,h as k}from"./chunk-AHG7WAP6.js";import"./chunk-6USQVYW2.js";import"./chunk-A3LHGXZW.js";import"./chunk-5GU7LW64.js";import"./chunk-HKEH2UOD.js";import"./chunk-QXJPLKP7.js";import{a as u}from"./chunk-E6YKEDDM.js";import"./chunk-FWUGH36K.js";import"./chunk-T4EGFOSE.js";import"./chunk-5MUXEXEW.js";import"./chunk-NJPDAYWO.js";import{b as m,g as f,l as h}from"./chunk-EB4FLAAE.js";import{a as c}from"./chunk-DVJZUBQB.js";import"./chunk-2FEGONIZ.js";import"./chunk-EGCQXWLS.js";import"./chunk-XVYCMZMB.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-K7OZYJKD.js";import"./chunk-AKNZ6QBL.js";function I(e){let i=e.indexOf("--port");if(i<0)return;let o=e[i+1],t=o?Number(o):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),t}async function O(e,i){let o=I(e)??i.port;return o?k(String(o)):void 0}async function w(e,i){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim desktop \u2014 launch the desktop companion
4
4
 
5
5
  usage:
@@ -16,7 +16,7 @@ examples:
16
16
  sootsim desktop --port 5173
17
17
  sootsim desktop --profile qa
18
18
  sootsim desktop --driver system
19
- `),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-RMAWV6JZ.js");await D(["--yes"]),r=c()}r||process.exit(1)}console.log(` launching ${r.path}`)}let b=await O(e,i),p=await l.launch({url:b,device:i.device,profileId:x,ephemeralProfile:d});p.launched||(console.error(` ${p.message}`),process.exit(1)),console.log(` ${p.message}`)}function y(){console.log(`
19
+ `),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-2CSEI2MD.js");await D(["--yes"]),r=c()}r||process.exit(1)}console.log(` launching ${r.path}`)}let b=await O(e,i),p=await l.launch({url:b,device:i.device,profileId:x,ephemeralProfile:d});p.launched||(console.error(` ${p.message}`),process.exit(1)),console.log(` ${p.message}`)}function y(){console.log(`
20
20
  sootsim desktop \u2014 launch or install the desktop companion
21
21
 
22
22
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{e as P}from"./chunk-VCU23PAS.js";import"./chunk-IV5EGT4L.js";import{b as _,c as I}from"./chunk-MHZUULXC.js";import"./chunk-345SCUPN.js";import"./chunk-PQRTN7R3.js";import{a as D}from"./chunk-QYAABDHA.js";import{a as b}from"./chunk-34ZLNSTB.js";import"./chunk-A5PGH6GU.js";import"./chunk-GGNU6KXJ.js";import"./chunk-YKTGO7GR.js";import"./chunk-YIRGMOQC.js";import"./chunk-CK5W32IL.js";import"./chunk-XRTETVLA.js";import"./chunk-SAJDH6T4.js";import"./chunk-6A64BUDU.js";import"./chunk-MBTZ72OK.js";import"./chunk-A5W26KZ2.js";import"./chunk-W77R37C6.js";import"./chunk-KWPTKVOD.js";import"./chunk-M6QAVNUD.js";import"./chunk-6GF7AYWF.js";import"./chunk-7ETH4QC5.js";import"./chunk-BBHSIDL7.js";import"./chunk-NYBRCPXY.js";import"./chunk-ZMCH7LNI.js";import"./chunk-XKYWN32Q.js";import"./chunk-WWCLVFFT.js";import"./chunk-PMZU2MXQ.js";import"./chunk-ZCIJF6TG.js";import"./chunk-DL5UW643.js";import{spawn as N}from"child_process";import{existsSync as x,mkdirSync as k,readFileSync as A,writeFileSync as w,unlinkSync as M}from"fs";import{tmpdir as F}from"os";import{dirname as L,resolve as l,join as R,relative as C}from"path";function W(){try{let e=import.meta.resolve("sootsim/detox");return L(e.startsWith("file://")?e.slice(7):e)}catch{return l(import.meta.dirname,"..","..","detox")}}var B=`
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{e as P}from"./chunk-EWYTZ7FV.js";import"./chunk-VMYBUPRT.js";import{b as _,c as I}from"./chunk-SADP73NH.js";import"./chunk-KG6V4NCI.js";import"./chunk-OHQOMV2J.js";import{a as D}from"./chunk-VIXY7DGW.js";import{a as b}from"./chunk-7COBEK2I.js";import"./chunk-AHG7WAP6.js";import"./chunk-6USQVYW2.js";import"./chunk-A3LHGXZW.js";import"./chunk-5GU7LW64.js";import"./chunk-HKEH2UOD.js";import"./chunk-QXJPLKP7.js";import"./chunk-FWUGH36K.js";import"./chunk-T4EGFOSE.js";import"./chunk-5MUXEXEW.js";import"./chunk-EB4FLAAE.js";import"./chunk-DVJZUBQB.js";import"./chunk-2FEGONIZ.js";import"./chunk-KGSLGXWW.js";import"./chunk-EGCQXWLS.js";import"./chunk-LIFR6X36.js";import"./chunk-BU7V5UGD.js";import"./chunk-AHWQZXFB.js";import"./chunk-XVYCMZMB.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-K7OZYJKD.js";import"./chunk-AKNZ6QBL.js";import{spawn as N}from"child_process";import{existsSync as x,mkdirSync as k,readFileSync as A,writeFileSync as w,unlinkSync as M}from"fs";import{tmpdir as F}from"os";import{dirname as L,resolve as l,join as R,relative as C}from"path";function W(){try{let e=import.meta.resolve("sootsim/detox");return L(e.startsWith("file://")?e.slice(7):e)}catch{return l(import.meta.dirname,"..","..","detox")}}var B=`
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.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-YKTGO7GR.js";import{g as d,i as l,l as a}from"./chunk-MBTZ72OK.js";import"./chunk-6GF7AYWF.js";import"./chunk-ZMCH7LNI.js";import"./chunk-XKYWN32Q.js";import"./chunk-WWCLVFFT.js";import"./chunk-PMZU2MXQ.js";import{g as c,h as r,i as g}from"./chunk-ZCIJF6TG.js";import"./chunk-DL5UW643.js";function h(){console.log(`
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-A3LHGXZW.js";import{g as d,i as l,l as a}from"./chunk-5MUXEXEW.js";import"./chunk-EGCQXWLS.js";import"./chunk-XVYCMZMB.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import{g as c,h as r,i as g}from"./chunk-K7OZYJKD.js";import"./chunk-AKNZ6QBL.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.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as E,i as R,l as b}from"./chunk-MBTZ72OK.js";import"./chunk-XKYWN32Q.js";import{b as v}from"./chunk-WWCLVFFT.js";import"./chunk-PMZU2MXQ.js";import"./chunk-DL5UW643.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.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as E,i as R,l as b}from"./chunk-5MUXEXEW.js";import"./chunk-OUB7WT7Q.js";import{b as v}from"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-AKNZ6QBL.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 get diagnosis \u2014 compact "what just went wrong?" report
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-NJPDAYWO.js";import{f as a,g as b,h as c,i as d,j as e,k as f,l as g,m as h,n as i}from"./chunk-EB4FLAAE.js";import"./chunk-DVJZUBQB.js";import"./chunk-2FEGONIZ.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-AKNZ6QBL.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};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c,d,e,f,g,h}from"./chunk-EWYTZ7FV.js";import{c as a,d as b}from"./chunk-VMYBUPRT.js";import"./chunk-KG6V4NCI.js";import"./chunk-OHQOMV2J.js";import"./chunk-VIXY7DGW.js";import"./chunk-7COBEK2I.js";import"./chunk-AHG7WAP6.js";import"./chunk-6USQVYW2.js";import"./chunk-A3LHGXZW.js";import"./chunk-5GU7LW64.js";import"./chunk-HKEH2UOD.js";import"./chunk-QXJPLKP7.js";import"./chunk-FWUGH36K.js";import"./chunk-T4EGFOSE.js";import"./chunk-5MUXEXEW.js";import"./chunk-EB4FLAAE.js";import"./chunk-DVJZUBQB.js";import"./chunk-2FEGONIZ.js";import"./chunk-KGSLGXWW.js";import"./chunk-EGCQXWLS.js";import"./chunk-LIFR6X36.js";import"./chunk-BU7V5UGD.js";import"./chunk-AHWQZXFB.js";import"./chunk-XVYCMZMB.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-K7OZYJKD.js";import"./chunk-AKNZ6QBL.js";export{e as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,d as getLastFlowTraceSteps,g as hoistLeadingSimFlag,a as parseFlowFile,f as runFlowPlayback,h as runMaestroAuthoring,b as validateFlowFile};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-VD2SYCCY.js";import"./chunk-CSJUJIRP.js";import"./chunk-AHWQZXFB.js";import"./chunk-XVYCMZMB.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-QGFTJYVC.js";import"./chunk-6NQYBCWC.js";import"./chunk-K7OZYJKD.js";import"./chunk-AKNZ6QBL.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,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-PMZU2MXQ.js";import"./chunk-DL5UW643.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,L as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,S as claimDaemonLockfile,K as compareSemver,x as configFilePath,F as consumeRuntimeUpgradeNotice,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,G as ensureSootsimHome,O as isDaemonLockfileFresh,P as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,J as listInstalledRuntimes,q as profilesDir,H as readActiveRuntime,M as readDaemonLockfile,N as readDevBridgeLockfile,B as readOrCreateAnonymousId,y as readSharedConfig,A as readTelemetryEnabled,T as removeDaemonLockfile,U as removeDevBridgeLockfile,l as runtimeDir,D as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,I as writeActiveRuntime,Q as writeDaemonLockfile,R as writeDevBridgeLockfile,E as writeRuntimeUpgradeNotice,z as writeSharedConfig,C as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,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-FEFLFVIU.js";import"./chunk-AKNZ6QBL.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,L as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,S as claimDaemonLockfile,K as compareSemver,x as configFilePath,F as consumeRuntimeUpgradeNotice,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,G as ensureSootsimHome,O as isDaemonLockfileFresh,P as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,J as listInstalledRuntimes,q as profilesDir,H as readActiveRuntime,M as readDaemonLockfile,N as readDevBridgeLockfile,B as readOrCreateAnonymousId,y as readSharedConfig,A as readTelemetryEnabled,T as removeDaemonLockfile,U as removeDevBridgeLockfile,l as runtimeDir,D as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,I as writeActiveRuntime,Q as writeDaemonLockfile,R as writeDevBridgeLockfile,E as writeRuntimeUpgradeNotice,z as writeSharedConfig,C as writeTelemetryEnabled};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{j as a,k as b}from"./chunk-VMYBUPRT.js";import"./chunk-KG6V4NCI.js";import"./chunk-AHG7WAP6.js";import"./chunk-6USQVYW2.js";import"./chunk-A3LHGXZW.js";import"./chunk-5GU7LW64.js";import"./chunk-HKEH2UOD.js";import"./chunk-QXJPLKP7.js";import"./chunk-FWUGH36K.js";import"./chunk-T4EGFOSE.js";import"./chunk-5MUXEXEW.js";import"./chunk-EB4FLAAE.js";import"./chunk-DVJZUBQB.js";import"./chunk-2FEGONIZ.js";import"./chunk-KGSLGXWW.js";import"./chunk-EGCQXWLS.js";import"./chunk-AHWQZXFB.js";import"./chunk-XVYCMZMB.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-K7OZYJKD.js";import"./chunk-AKNZ6QBL.js";export{a as printShellPerfReport,b as runInspect};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-X7VZ7D6Y.js";import"./chunk-E6YKEDDM.js";import"./chunk-DVJZUBQB.js";import"./chunk-AKNZ6QBL.js";export{a as runInstallDesktop};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as k,d as v}from"./chunk-BBHSIDL7.js";import"./chunk-PMZU2MXQ.js";import"./chunk-DL5UW643.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import x from"node:http";var b=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",w="http://localhost:3000";async function P(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return b}function A(){console.log(`
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as k,d as v}from"./chunk-BU7V5UGD.js";import"./chunk-FEFLFVIU.js";import"./chunk-AKNZ6QBL.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import x from"node:http";var b=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",w="http://localhost:3000";async function P(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return b}function A(){console.log(`
3
3
  sootsim login \u2014 sign in so uploads can attach to your account
4
4
 
5
5
  usage:
@@ -21,6 +21,6 @@ options:
21
21
  <p style="color:#ccc">${r}</p>
22
22
  </div>
23
23
  </body>
24
- </html>`}async function E(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function G(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function z(r){(r.includes("--help")||r.includes("-h"))&&(A(),process.exit(0));let e=[...r],t=await P(C(e,"--origin"));if(G(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await E(t);if(o.ok){k({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let i=await v(t),d=i?.user?.email||o.email||i?.user?.id||o.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-XQHZBPJE.js");a({event:"cli_login_succeeded",identity:{userId:o.userId??i?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-XQHZBPJE.js");o({event:"cli_login_started",properties:{origin:t}}),await i()}let m=300*1e3,s=await new Promise(o=>{let i,d=!1,a=c=>{d||(d=!0,clearTimeout(i),o(c),f.close())},f=x.createServer((c,n)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),_=l.searchParams.get("state"),y=l.searchParams.get("token"),$=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(_!==u){n.statusCode=404,n.end("not found");return}if(n.setHeader("content-type","text/html; charset=utf-8"),p){n.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){n.end(g("missing token. close this tab and retry `sootsim login`.")),a({ok:!1,error:"missing token"});return}n.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:$,userId:T})}catch(l){n.statusCode=500,n.end(g("sign-in callback failed. retry `sootsim login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});i=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `sootsim login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",u),n.searchParams.set("port",String(c.port)),n.searchParams.set("sootbean",t),console.log(" opening browser for sootsim login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
24
+ </html>`}async function E(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function G(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function z(r){(r.includes("--help")||r.includes("-h"))&&(A(),process.exit(0));let e=[...r],t=await P(C(e,"--origin"));if(G(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await E(t);if(o.ok){k({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let i=await v(t),d=i?.user?.email||o.email||i?.user?.id||o.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-GZK77NUU.js");a({event:"cli_login_succeeded",identity:{userId:o.userId??i?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-GZK77NUU.js");o({event:"cli_login_started",properties:{origin:t}}),await i()}let m=300*1e3,s=await new Promise(o=>{let i,d=!1,a=c=>{d||(d=!0,clearTimeout(i),o(c),f.close())},f=x.createServer((c,n)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),_=l.searchParams.get("state"),y=l.searchParams.get("token"),$=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(_!==u){n.statusCode=404,n.end("not found");return}if(n.setHeader("content-type","text/html; charset=utf-8"),p){n.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){n.end(g("missing token. close this tab and retry `sootsim login`.")),a({ok:!1,error:"missing token"});return}n.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:$,userId:T})}catch(l){n.statusCode=500,n.end(g("sign-in callback failed. retry `sootsim login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});i=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `sootsim login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",u),n.searchParams.set("port",String(c.port)),n.searchParams.set("sootbean",t),console.log(" opening browser for sootsim login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
25
25
  ${n.toString()}
26
- `),U(n.toString())})});if(!s.ok){let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-XQHZBPJE.js");o({event:"cli_login_failed",properties:{origin:t,error:s.error}}),await i(),console.error(` login failed: ${s.error}`),process.exit(1)}k({token:s.token,user:s.userId?{id:s.userId,email:s.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||s.email||h?.user?.id||s.userId,{trackCliEvent:O,flushCliTelemetry:S}=await import("./telemetry-XQHZBPJE.js");O({event:"cli_login_succeeded",identity:{userId:s.userId??h?.user?.id??null},properties:{origin:t}}),await S(),console.log(` signed in${I?` as ${I}`:""}`)}export{z as runLogin};
26
+ `),U(n.toString())})});if(!s.ok){let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-GZK77NUU.js");o({event:"cli_login_failed",properties:{origin:t,error:s.error}}),await i(),console.error(` login failed: ${s.error}`),process.exit(1)}k({token:s.token,user:s.userId?{id:s.userId,email:s.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||s.email||h?.user?.id||s.userId,{trackCliEvent:O,flushCliTelemetry:S}=await import("./telemetry-GZK77NUU.js");O({event:"cli_login_succeeded",identity:{userId:s.userId??h?.user?.id??null},properties:{origin:t}}),await S(),console.log(` signed in${I?` as ${I}`:""}`)}export{z as runLogin};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r,b as i}from"./chunk-7ETH4QC5.js";import{a as t,c as o}from"./chunk-BBHSIDL7.js";import"./chunk-PMZU2MXQ.js";import"./chunk-DL5UW643.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r,b as i}from"./chunk-LIFR6X36.js";import{a as t,c as o}from"./chunk-BU7V5UGD.js";import"./chunk-FEFLFVIU.js";import"./chunk-AKNZ6QBL.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as M,d as E,f as O,g as L,h as R}from"./chunk-VCU23PAS.js";import{c as S}from"./chunk-IV5EGT4L.js";import{a as A,b as $,c as F}from"./chunk-MHZUULXC.js";import{a as x}from"./chunk-345SCUPN.js";import"./chunk-PQRTN7R3.js";import{a as T}from"./chunk-QYAABDHA.js";import{a as k}from"./chunk-34ZLNSTB.js";import"./chunk-A5PGH6GU.js";import"./chunk-GGNU6KXJ.js";import"./chunk-YKTGO7GR.js";import"./chunk-YIRGMOQC.js";import"./chunk-CK5W32IL.js";import"./chunk-XRTETVLA.js";import"./chunk-SAJDH6T4.js";import"./chunk-6A64BUDU.js";import"./chunk-MBTZ72OK.js";import"./chunk-A5W26KZ2.js";import"./chunk-W77R37C6.js";import"./chunk-KWPTKVOD.js";import"./chunk-M6QAVNUD.js";import"./chunk-6GF7AYWF.js";import"./chunk-7ETH4QC5.js";import"./chunk-BBHSIDL7.js";import"./chunk-NYBRCPXY.js";import"./chunk-ZMCH7LNI.js";import"./chunk-XKYWN32Q.js";import"./chunk-WWCLVFFT.js";import"./chunk-PMZU2MXQ.js";import"./chunk-ZCIJF6TG.js";import"./chunk-DL5UW643.js";import*as s from"fs";import*as a from"path";var I=[".maestro","maestro"];function P(){console.log(`
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as M,d as E,f as O,g as L,h as R}from"./chunk-EWYTZ7FV.js";import{c as S}from"./chunk-VMYBUPRT.js";import{a as A,b as $,c as F}from"./chunk-SADP73NH.js";import{a as x}from"./chunk-KG6V4NCI.js";import"./chunk-OHQOMV2J.js";import{a as T}from"./chunk-VIXY7DGW.js";import{a as k}from"./chunk-7COBEK2I.js";import"./chunk-AHG7WAP6.js";import"./chunk-6USQVYW2.js";import"./chunk-A3LHGXZW.js";import"./chunk-5GU7LW64.js";import"./chunk-HKEH2UOD.js";import"./chunk-QXJPLKP7.js";import"./chunk-FWUGH36K.js";import"./chunk-T4EGFOSE.js";import"./chunk-5MUXEXEW.js";import"./chunk-EB4FLAAE.js";import"./chunk-DVJZUBQB.js";import"./chunk-2FEGONIZ.js";import"./chunk-KGSLGXWW.js";import"./chunk-EGCQXWLS.js";import"./chunk-LIFR6X36.js";import"./chunk-BU7V5UGD.js";import"./chunk-AHWQZXFB.js";import"./chunk-XVYCMZMB.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-K7OZYJKD.js";import"./chunk-AKNZ6QBL.js";import*as s from"fs";import*as a from"path";var I=[".maestro","maestro"];function P(){console.log(`
3
3
  sootsim maestro \u2014 author and run Maestro YAML flows against sootsim
4
4
 
5
5
  usage:
@@ -89,7 +89,7 @@ appId: com.example.app
89
89
  - inputText: "secret123"
90
90
  - tapOn: "Sign in"
91
91
  - assertVisible: "Welcome"
92
- `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function z(o,n={}){if(o.includes("--help")||o.includes("-h"))return P(),0;if(o.includes("--list-compat"))return W(),0;let e;try{e=D(o)}catch(r){return console.error(` error: ${r.message}`),1}e=L(e);let t=process.cwd(),i=e[0];if(i==="init")return N(t);if(i==="generate"){let{runMaestroGenerate:r}=await import("./maestro-generate-22RWS4QX.js");return r(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return R(e);e=Y(e);let u=null,p;if(i==="test"){let r=e.slice(1).find(f=>!U(f));r?(u=a.resolve(t,r),p=e.slice(1).filter(f=>f!==r)):(u=j(t),p=e.slice(1))}else i&&!U(i)?(u=a.resolve(t,i),p=e.slice(1)):(u=j(t),p=e);if(!u)return console.error(`
92
+ `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function z(o,n={}){if(o.includes("--help")||o.includes("-h"))return P(),0;if(o.includes("--list-compat"))return W(),0;let e;try{e=D(o)}catch(r){return console.error(` error: ${r.message}`),1}e=L(e);let t=process.cwd(),i=e[0];if(i==="init")return N(t);if(i==="generate"){let{runMaestroGenerate:r}=await import("./maestro-generate-7VVSWXKH.js");return r(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return R(e);e=Y(e);let u=null,p;if(i==="test"){let r=e.slice(1).find(f=>!U(f));r?(u=a.resolve(t,r),p=e.slice(1).filter(f=>f!==r)):(u=j(t),p=e.slice(1))}else i&&!U(i)?(u=a.resolve(t,i),p=e.slice(1)):(u=j(t),p=e);if(!u)return console.error(`
93
93
  error: no maestro flows found.
94
94
  expected one of: ${I.map(r=>`./${r}/`).join(", ")}
95
95
  or pass a flow explicitly: sootsim maestro test path/to/flow.yaml
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as O,c as k}from"./chunk-MHZUULXC.js";import{a as x}from"./chunk-345SCUPN.js";import{a as A}from"./chunk-QYAABDHA.js";import{a as v,b as T}from"./chunk-34ZLNSTB.js";import"./chunk-YIRGMOQC.js";import"./chunk-CK5W32IL.js";import{f as y}from"./chunk-6A64BUDU.js";import{g as b,i as S}from"./chunk-MBTZ72OK.js";import"./chunk-KWPTKVOD.js";import"./chunk-7ETH4QC5.js";import"./chunk-BBHSIDL7.js";import"./chunk-XKYWN32Q.js";import"./chunk-WWCLVFFT.js";import"./chunk-PMZU2MXQ.js";import"./chunk-DL5UW643.js";import{mkdtempSync as j,writeFileSync as N}from"fs";import{tmpdir as C}from"os";import{join as E}from"path";var J=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",_=18e3,V=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function G(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var F=new Set(["--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function H(e){for(let t=0;t<e.length;t++){let r=e[t];if(r){if(F.has(r)){t+=1;continue}if(!r.startsWith("-"))return{prompt:r,index:t}}}return null}function Y(e,t){return e.filter((r,o)=>o!==t)}async function K(e,t){let r=Y(e,t),o=b(r,{stripBooleanFlags:["--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...F]}),i=S(o);try{let s=await y(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),a=[s.shell?`shell: ${JSON.stringify(s.shell)}`:"",s.keyboard?`keyboard: ${JSON.stringify(s.keyboard)}`:"",typeof s.nodeCount=="number"?`nodes: ${s.nodeCount}`:"",s.tree||""].filter(Boolean).join(`
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as O,c as k}from"./chunk-SADP73NH.js";import{a as x}from"./chunk-KG6V4NCI.js";import{a as A}from"./chunk-VIXY7DGW.js";import{a as v,b as T}from"./chunk-7COBEK2I.js";import"./chunk-5GU7LW64.js";import"./chunk-HKEH2UOD.js";import{f as y}from"./chunk-T4EGFOSE.js";import{g as b,i as S}from"./chunk-5MUXEXEW.js";import"./chunk-2FEGONIZ.js";import"./chunk-LIFR6X36.js";import"./chunk-BU7V5UGD.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-AKNZ6QBL.js";import{mkdtempSync as j,writeFileSync as N}from"fs";import{tmpdir as C}from"os";import{join as E}from"path";var J=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",_=18e3,V=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function G(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var F=new Set(["--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function H(e){for(let t=0;t<e.length;t++){let r=e[t];if(r){if(F.has(r)){t+=1;continue}if(!r.startsWith("-"))return{prompt:r,index:t}}}return null}function Y(e,t){return e.filter((r,o)=>o!==t)}async function K(e,t){let r=Y(e,t),o=b(r,{stripBooleanFlags:["--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...F]}),i=S(o);try{let s=await y(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),a=[s.shell?`shell: ${JSON.stringify(s.shell)}`:"",s.keyboard?`keyboard: ${JSON.stringify(s.keyboard)}`:"",typeof s.nodeCount=="number"?`nodes: ${s.nodeCount}`:"",s.tree||""].filter(Boolean).join(`
3
3
  `);return a.length>_?a.slice(0,_)+`
4
4
  [tree truncated]`:a}finally{i.close()}}var z=`
5
5
  You write Maestro-compatible SootSim YAML flows from a user's plain-language test goal.
@@ -30,5 +30,5 @@ ${t||"[no tree available]"}
30
30
 
31
31
  Generate the shortest replayable flow that verifies the goal from this current state.
32
32
  `.trim()}function M(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>t&&typeof t=="object"&&t.type==="text"?String(t.text??""):"").join(""):""}async function X(e){let t=await fetch(`${e.origin.replace(/\/$/,"")}/api/llm`,{method:"POST",headers:{"content-type":"application/json",authorization:e.authHeader},body:JSON.stringify({modelId:J,context:{systemPrompt:z,messages:[{role:"user",content:W(e.prompt,e.describe),timestamp:Date.now()}]},options:{maxTokens:1800,temperature:.2},threadId:null}),signal:AbortSignal.timeout(V)});if(!t.ok||!t.body){let c=await t.text().catch(()=>"");throw new Error(`/api/llm ${t.status}${c?`: ${c}`:""}`)}let r=t.body.getReader(),o=new TextDecoder,i=[],s="",l="",a=c=>{let d=c.trim();if(!d)return;let n=JSON.parse(d);if(n.type==="text_delta"&&n.delta)i.push(n.delta);else if(n.type==="text_end"&&n.content)s=n.content;else if(n.type==="done")s=M(n.message?.content);else if(n.type==="error")throw new Error(n.error?.errorMessage||M(n.error?.content)||"llm error")};for(;;){let{value:c,done:d}=await r.read();if(d)break;l+=o.decode(c,{stream:!0});let n;for(;(n=l.indexOf(`
33
- `))>=0;)a(l.slice(0,n)),l=l.slice(n+1)}l+=o.decode(),l.trim()&&a(l);let u=(s||i.join("")).trim();if(!u)throw new Error("llm returned an empty test flow");return u}function q(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function P(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function Q(e){let t=q(e);if(!P(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"SootSim generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((s,l)=>{if(!P(s))throw new Error(`flow step ${l+1} is not an object`);return s});return{summary:r,steps:i,yamlText:x.stringify(i)}}function Z(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],s=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),l=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let a=0;a<e.length;a++){if(a===t)continue;let u=e[a];if(u==="--origin"||u==="--preview-origin"){a+=1;continue}if(u==="--public-origin"){let c=e[a+1];c&&i.push("--preview-public-origin",c),a+=1;continue}if(s.has(u)){let c=e[a+1];c&&i.push(u,c),a+=1;continue}l.has(u)&&i.push(u)}return i}async function ce(e){let t=H(e);if(!t)return console.error(' usage: sootsim maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=v();if(!i||i.kind==="github")return console.error(' sootsim maestro generate "<goal>" needs a login or SOOTSIM_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let s=T(i),l=await A(G(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let a=await K(e,o);console.log(" generating Maestro flow\u2026");let u=await X({prompt:r,describe:a,origin:l,authHeader:s}),c=Q(u),d=j(E(C(),"sootsim-maestro-generate-")),n=E(d,"flow.yaml");N(n,c.yamlText),console.log(` flow: ${n}`);let I=Date.now(),{runFlowPlayback:$,getLastFlowPreviewUploadResult:D,getLastFlowTraceSteps:L}=await import("./flow-BKVP4VKL.js"),U=Z(e,o,n,l),w=await $(U),p=D(),h=L(),B=h.find(R=>R.status==="failure"),g=w===0?"passed":"failed",m=await k({origin:l,kind:"maestro",prompt:r,summary:c.summary,status:g,failureMessage:g==="failed"?B?.error??"flow playback failed":null,previewShareId:p?.shareId??null,owner:f(e,"--owner")??null,repo:f(e,"--repo")??null,durationMs:Date.now()-I,flowYamlSizeBytes:Buffer.byteLength(c.yamlText,"utf8"),...O(h),auth:i});return console.log(`
33
+ `))>=0;)a(l.slice(0,n)),l=l.slice(n+1)}l+=o.decode(),l.trim()&&a(l);let u=(s||i.join("")).trim();if(!u)throw new Error("llm returned an empty test flow");return u}function q(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function P(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function Q(e){let t=q(e);if(!P(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"SootSim generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((s,l)=>{if(!P(s))throw new Error(`flow step ${l+1} is not an object`);return s});return{summary:r,steps:i,yamlText:x.stringify(i)}}function Z(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],s=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),l=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let a=0;a<e.length;a++){if(a===t)continue;let u=e[a];if(u==="--origin"||u==="--preview-origin"){a+=1;continue}if(u==="--public-origin"){let c=e[a+1];c&&i.push("--preview-public-origin",c),a+=1;continue}if(s.has(u)){let c=e[a+1];c&&i.push(u,c),a+=1;continue}l.has(u)&&i.push(u)}return i}async function ce(e){let t=H(e);if(!t)return console.error(' usage: sootsim maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=v();if(!i||i.kind==="github")return console.error(' sootsim maestro generate "<goal>" needs a login or SOOTSIM_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let s=T(i),l=await A(G(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let a=await K(e,o);console.log(" generating Maestro flow\u2026");let u=await X({prompt:r,describe:a,origin:l,authHeader:s}),c=Q(u),d=j(E(C(),"sootsim-maestro-generate-")),n=E(d,"flow.yaml");N(n,c.yamlText),console.log(` flow: ${n}`);let I=Date.now(),{runFlowPlayback:$,getLastFlowPreviewUploadResult:D,getLastFlowTraceSteps:L}=await import("./flow-LTUM776G.js"),U=Z(e,o,n,l),w=await $(U),p=D(),h=L(),B=h.find(R=>R.status==="failure"),g=w===0?"passed":"failed",m=await k({origin:l,kind:"maestro",prompt:r,summary:c.summary,status:g,failureMessage:g==="failed"?B?.error??"flow playback failed":null,previewShareId:p?.shareId??null,owner:f(e,"--owner")??null,repo:f(e,"--repo")??null,durationMs:Date.now()-I,flowYamlSizeBytes:Buffer.byteLength(c.yamlText,"utf8"),...O(h),auth:i});return console.log(`
34
34
  result: ${g}`),m&&console.log(` run: ${m.id}`),p?.previewUrl&&console.log(` preview: ${p.previewUrl}`),m?.traceUrl&&console.log(` replay: ${m.traceUrl}`),w}export{ce as runMaestroGenerate};
@@ -0,0 +1,111 @@
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as x,i as k,l as D,m as v}from"./chunk-5MUXEXEW.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-AKNZ6QBL.js";function q(e){let o=e[0]?.toLowerCase()??"toggle";return o!=="on"&&o!=="off"&&o!=="toggle"&&(console.error(` unknown argument: "${o}" (expected on | off | toggle)`),process.exit(1)),o}async function R(e,o,t){let n=x(e,{port:o.port}),r=q(n.positional),d=k({...n,commandTimeoutMs:5e3});try{let l=!!(await D(d,"SootSim.bridges.settings.get"))?.[t.modeKey],m=r==="on"?!0:r==="off"?!1:!l;if(l===m)return console.log(` ${t.displayName}: already ${m?"on":"off"}`),{current:l,target:m,changed:!1};if(!await d.send({type:"evaluate",acquireLock:!0,code:`(async () => {
3
+ const modeKey = ${JSON.stringify(t.modeKey)}
4
+ const target = ${JSON.stringify(m)}
5
+ window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
6
+ detail: { type: 'fire-action', id: ${JSON.stringify(t.actionId)} },
7
+ }))
8
+ const deadline = Date.now() + 1200
9
+ while (Date.now() < deadline) {
10
+ if (Boolean(window.SootSim?.bridges?.settings?.get?.()?.[modeKey]) === target) {
11
+ return true
12
+ }
13
+ await new Promise((resolve) => setTimeout(resolve, 40))
14
+ }
15
+ return false
16
+ })()`}))throw new Error(`${t.displayName} did not change to ${m?"on":"off"}; the live shell may not support this mode`);return console.log(` ${t.displayName}: ${l?"on":"off"} -> ${m?"on":"off"}`),{current:l,target:m,changed:!0}}finally{d.close()}}async function z(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
17
+ sootsim mode screenshot \u2014 toggle the screenshot-mode chrome overlay
18
+
19
+ usage:
20
+ sootsim mode screenshot [on|off|toggle]
21
+
22
+ arguments:
23
+ on enable screenshot mode (enables showFrame if needed)
24
+ off disable screenshot mode
25
+ toggle flip the current state (default)
26
+
27
+ examples:
28
+ sootsim mode screenshot
29
+ sootsim mode screenshot on
30
+ sootsim mode screenshot off
31
+ `),process.exit(0)),await R(e,o,{modeKey:"screenshotMode",displayName:"screenshot-mode",actionId:"toggle-screenshot-mode"})}import{createHash as Y}from"node:crypto";import{mkdirSync as Q,readFileSync as K,readdirSync as X,unlinkSync as Z,writeFileSync as U}from"node:fs";import{dirname as ee,extname as oe,resolve as T}from"node:path";var C=12e3,te=18e4,ne=new Set(["load","seek","play","pause","render"]);async function L(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
32
+ sootsim mode three \u2014 toggle the 3d device stage
33
+
34
+ usage:
35
+ sootsim mode three [on|off|toggle]
36
+ sootsim mode three configure [options]
37
+ sootsim mode three load <timeline.json>
38
+ sootsim mode three seek <time-ms>
39
+ sootsim mode three play|pause
40
+ sootsim mode three render <timeline.json> --output <dir> [options]
41
+
42
+ arguments:
43
+ on enable 3d mode
44
+ off disable 3d mode
45
+ toggle flip the current state (default)
46
+
47
+ configure options:
48
+ --background <id> set the 3d background
49
+ --gradient <stops> custom gradient bg: comma-separated css hex stops,
50
+ e.g. "#0a0e1a,#16243f,#05080f" (overrides --background;
51
+ evenly spaced, or use "color@offset" for explicit %)
52
+ --gradient-angle <deg> custom gradient angle (default 180 = top\u2192bottom)
53
+ --colorway <id> set the phone colorway
54
+ --script <id> apply a camera preset pose
55
+ --progress <0..1> script progress to sample (default: 1)
56
+ --animate run the script instead of sampling one frame
57
+ --slow run the script slowly when --animate is set
58
+ --environment on|off enable or disable environment objects
59
+ --env-shape <id> orb | pill | diamond | pane
60
+ --env-spread <id> tight | medium | wide
61
+ --env-size <id> small | medium | large
62
+ --env-color <id> peach | gold | mint | sky | violet
63
+ --env-glow on|off enable or disable environment glow
64
+ --env-plastic on|off enable or disable environment plastic material
65
+ --setting <id> none | room | white-backdrop
66
+ --focus on|off enable or disable Focus depth of field
67
+ --focus-amount <id> subtle | medium | strong | dramatic
68
+ --focus-range <id> tight | balanced | wide
69
+ --reset-pose return to the default hero pose before other changes
70
+
71
+ render options:
72
+ --output <dir> write frame-%05d.png + timeline-render.json
73
+ --fps <number> frames per second (default: 30)
74
+ --width <px> exact output width (default: 1920)
75
+ --height <px> exact output height (default: 1080)
76
+ --from <ms> first timeline time (default: 0)
77
+ --to <ms> exclusive end time (default: timeline duration)
78
+ --overwrite replace this command's existing frames in the dir
79
+
80
+ examples:
81
+ sootsim mode three
82
+ sootsim mode three on
83
+ sootsim mode three configure --script hero-arc --background gradient-neon
84
+ sootsim mode three configure --environment on --env-shape pane --setting room
85
+ sootsim mode three render ./cinematic.json --output ./frames --fps 30
86
+ sootsim mode three off
87
+ `),process.exit(0));let t=ae(e);if(t){await me(t,e,o);return}if(re(e)){await ie(e,o);return}(await R(e,o,{modeKey:"threeMode",displayName:"three-mode",actionId:"toggle-three-mode"})).target&&await se(e,o)}function re(e){return e[0]==="configure"||e.some(o=>["--background","--gradient","--gradient-angle","--colorway","--script","--progress","--animate","--slow","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--setting","--focus","--focus-amount","--focus-range","--reset-pose"].includes(o))}async function ie(e,o){let t=x(e,{port:o.port,stripBooleanFlags:["--animate","--slow","--reset-pose"],stripValueFlags:["--background","--gradient","--gradient-angle","--colorway","--script","--progress","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--setting","--focus","--focus-amount","--focus-range"]}),n=ue(e),r=k({...t,commandTimeoutMs:C+1e3});try{await I(r);let d=await v(r,"SootSim.bridges.threeMode.configure",n);console.log(` three-mode: configured (${fe(d)})`)}finally{r.close()}}async function se(e,o){let t=x(e,{port:o.port}),n=k({...t,commandTimeoutMs:C+1e3});try{await I(n)}finally{n.close()}}async function I(e){let o=await e.send({type:"evaluate",code:`(async () => {
88
+ const deadline = Date.now() + ${C}
89
+ while (Date.now() < deadline) {
90
+ const settings = window.SootSim?.bridges?.settings?.get?.()
91
+ if (settings && settings.threeMode !== true) {
92
+ return { ready: false, disabled: true }
93
+ }
94
+ const bridge = window.SootSim?.bridges?.threeMode
95
+ const state = typeof bridge?.getState === 'function' ? bridge.getState() : null
96
+ if (state?.ready === true) return state
97
+ await new Promise((resolve) => setTimeout(resolve, 50))
98
+ }
99
+ const bridge = window.SootSim?.bridges?.threeMode
100
+ const state = typeof bridge?.getState === 'function' ? bridge.getState() : null
101
+ return state || { ready: false }
102
+ })()`});if(o?.ready===!0)return o;throw o?.disabled?new Error("3d mode is off; run `sootsim mode three on` before configure"):new Error("3d mode runtime did not become ready")}function ae(e){for(let o=0;o<e.length;o+=1){let t=e[o];if(t==="--sim"||t==="--port"||t==="-p"){o+=1;continue}if(!t.startsWith("-"))return ne.has(t)?t:null}return null}function V(e,o){let t=e.indexOf(o);return t>=0?e[t+1]:void 0}function F(e,o,t,n=0){let r=V(e,o);if(r===void 0)return t;let d=Number.parseFloat(r);if(!Number.isFinite(d)||d<n)throw new Error(`${o} expects a number greater than or equal to ${n}`);return d}function J(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function de(e,o){let t=oe(e).toLowerCase();return o==="recording"?t===".mp4"||t===".m4v"?"video/mp4":"video/webm":t===".jpg"||t===".jpeg"?"image/jpeg":t===".webp"?"image/webp":"image/png"}function j(e,o){if(Array.isArray(e))return e.map(n=>j(n,o));if(!J(e))return e;let t={};for(let[n,r]of Object.entries(e))t[n]=j(r,o);if((t.type==="recording"||t.type==="screenshot")&&typeof t.src=="string"&&!/^(?:blob:|data:|https?:)/i.test(t.src)){let n=T(o,t.src),r=K(n);t.src=`data:${de(n,t.type)};base64,${r.toString("base64")}`}return t}function le(e){let o=T(e),t=JSON.parse(K(o,"utf8"));return{absolutePath:o,timeline:j(t,ee(o))}}async function ce(e){await v(e,"SootSim.bridges.settings.set","threeMode",!0),await I(e)}async function me(e,o,t){let n=x(o,{port:t.port,commandTimeoutMs:te,stripBooleanFlags:["--overwrite"],stripValueFlags:["--output","--fps","--width","--height","--from","--to"]}),r=k(n);try{if(await ce(r),e==="seek"){let i=n.positional[1],u=i===void 0?Number.NaN:Number.parseFloat(i);if(!Number.isFinite(u))throw new Error("three-mode seek expects time in ms");let f=await v(r,"SootSim.bridges.threeMode.seek",u);console.log(` three-mode: ${Math.round(f.timeMs)}ms / ${Math.round(f.durationMs)}ms (${f.shotId??"no shot"})`);return}if(e==="play"||e==="pause"){let i=await v(r,`SootSim.bridges.threeMode.${e}`),u=J(i.timeline)?i.timeline:{};console.log(` three-mode: ${e} (${Math.round(Number(u.timeMs??0))}ms)`);return}let d=n.positional[1];if(!d)throw new Error(`three-mode ${e} expects a timeline JSON path`);let g=le(d),l=await v(r,"SootSim.bridges.threeMode.loadTimeline",g.timeline);if(e==="load"){console.log(` three-mode: loaded ${g.absolutePath} (${Math.round(l.durationMs)}ms)`);return}let m=V(o,"--output");if(!m)throw new Error("three-mode render requires --output <dir>");let p=T(m),w=F(o,"--fps",30,.001),b=Math.round(F(o,"--width",1920,1)),B=Math.round(F(o,"--height",1080,1)),y=F(o,"--from",0,0),h=F(o,"--to",l.durationMs,0);if(h<=y||h>l.durationMs)throw new Error(`--to must be greater than --from and at most ${l.durationMs}`);let s=1e3/w,a=Math.ceil((h-y)/s);Q(p,{recursive:!0});let c=X(p).filter(i=>/^frame-\d{5}\.png$/.test(i)||i==="timeline-render.json");if(c.length>0&&!o.includes("--overwrite"))throw new Error(`${p} already has timeline frames; pass --overwrite to replace them`);for(let i of c)Z(T(p,i));let M=[],$=4;for(let i=0;i<a;i+=$){let u=Math.min($,a-i),f=y+i*s,G=Math.min(h,f+u*s),N=await v(r,"SootSim.bridges.threeMode.renderFrames",{fps:w,from:f,to:G,width:b,height:B,count:u});if(N.frames.length!==u)throw new Error(`3d renderer returned ${N.frames.length} frames for a ${u}-frame batch`);for(let S of N.frames){let H=i+S.index,_=`frame-${String(H).padStart(5,"0")}.png`,A=S.dataUrl.indexOf(",");if(A<0||!S.dataUrl.slice(0,A).includes("image/png;base64"))throw new Error(`3d renderer returned a non-PNG frame at ${S.timeMs}ms`);let P=Buffer.from(S.dataUrl.slice(A+1),"base64");U(T(p,_),P),M.push({file:_,timeMs:S.timeMs,sha256:Y("sha256").update(P).digest("hex"),alpha:S.alpha})}process.stderr.write(`\r three-mode: rendered ${Math.min(i+u,a)}/${a}`)}process.stderr.write(`
103
+ `);let O={version:1,timeline:g.absolutePath,fps:w,from:y,to:h,width:b,height:B,frameCount:a,transparent:M.every(i=>i.alpha.transparentPixels>0),frames:M};U(T(p,"timeline-render.json"),`${JSON.stringify(O,null,2)}
104
+ `),console.log(` three-mode: wrote ${a} deterministic RGBA frames to ${p}`)}finally{r.close()}}function ue(e){let o=s=>e.find((a,c)=>e[c-1]===s),t={},n=o("--colorway");n&&(t.colorway=n);let r=o("--background");r&&(t.background=r);let d=o("--gradient");if(d){let s=d.split(",").map($=>$.trim()).filter(Boolean),a=s.map(($,O)=>{let[i,u]=$.split("@"),f=u!==void 0?Number.parseFloat(u):s.length>1?O/(s.length-1):0;return f>1&&(f=f/100),Number.isFinite(f)||(f=s.length>1?O/(s.length-1):0),{color:i.trim(),offset:f}}),c=o("--gradient-angle"),M=c===void 0?void 0:Number.parseFloat(c);if(c!==void 0&&!Number.isFinite(M))throw new Error(`--gradient-angle expects a number, got "${c}"`);t.customGradient={stops:a,...M!==void 0?{angleDeg:M}:{}}}let g=o("--setting");if(g){if(g!=="none"&&g!=="room"&&g!=="white-backdrop")throw new Error(`--setting expects none, room, or white-backdrop, got "${g}"`);t.setting=g}let l={},m=E(o("--focus"),"--focus");m!==void 0&&(l.enabled=m);for(let[s,a]of[["--focus-amount","amount"],["--focus-range","range"]]){let c=o(s);c&&(l[a]=c)}Object.keys(l).length>0&&(t.focus=l),e.includes("--reset-pose")&&(t.resetPose=!0);let p=E(o("--environment"),"--environment"),w={},b={};for(let[s,a]of[["--env-shape","shape"],["--env-spread","spread"],["--env-size","size"],["--env-color","color"]]){let c=o(s);c&&(w[a]=c)}let B=E(o("--env-glow"),"--env-glow");B!==void 0&&(b.glow=B);let y=E(o("--env-plastic"),"--env-plastic");y!==void 0&&(b.plastic=y),(p!==void 0||Object.keys(w).length>0||Object.keys(b).length>0)&&(t.environment=p===!1?!1:{pins:w,effects:b});let h=o("--script");if(h){let s=o("--progress"),a=s===void 0?1:Number.parseFloat(s);if(!Number.isFinite(a))throw new Error(`--progress expects a number from 0 to 1, got "${s}"`);t.script={id:h,progress:a,animate:e.includes("--animate"),slow:e.includes("--slow")}}return t}function E(e,o){if(e===void 0)return;let t=e.toLowerCase();if(["on","true","yes","1"].includes(t))return!0;if(["off","false","no","0"].includes(t))return!1;throw new Error(`${o} expects on or off, got "${e}"`)}function fe(e){return[`ready=${!!e.ready}`,`background=${String(e.background??"unknown")}`,`colorway=${String(e.colorway??"unknown")}`,`environment=${e.environmentActive?"on":"off"}`,`setting=${String(e.setting??"none")}`,`focus=${e.focus&&typeof e.focus=="object"&&e.focus.enabled?"on":"off"}`].join(", ")}var ge=new Set(["--sim","--port","-p"]),pe=new Set(["screenshot","three"]);function he(e){for(let o=0;o<e.length;o++){let t=e[o];if(t.startsWith("-")){ge.has(t)&&o++;continue}return pe.has(t)?{name:t,index:o}:null}return null}function we(e,o){return[...e.slice(0,o),...e.slice(o+1)]}function W(){console.log(`
105
+ sootsim mode \u2014 toggle live display modes
106
+
107
+ usage:
108
+ sootsim mode screenshot [on|off|toggle]
109
+ sootsim mode three [on|off|toggle]
110
+ sootsim mode three configure [options]
111
+ `)}async function Re(e,o){if(e.includes("--help")||e.includes("-h")){W();return}let t=he(e);t||(W(),process.exit(1));let n=we(e,t.index);if(t.name==="screenshot"){await z(n,o);return}await L(n,o)}export{Re as runMode};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b}from"./chunk-QXJPLKP7.js";import"./chunk-AKNZ6QBL.js";export{a as loadOptionalDemoApps,b as optionalDemoAppsSync};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{k as x}from"./chunk-IV5EGT4L.js";import"./chunk-345SCUPN.js";import"./chunk-A5PGH6GU.js";import"./chunk-GGNU6KXJ.js";import"./chunk-YKTGO7GR.js";import"./chunk-YIRGMOQC.js";import"./chunk-CK5W32IL.js";import"./chunk-XRTETVLA.js";import"./chunk-SAJDH6T4.js";import"./chunk-6A64BUDU.js";import{g as R,i as N,l as d,m as S}from"./chunk-MBTZ72OK.js";import"./chunk-A5W26KZ2.js";import"./chunk-W77R37C6.js";import"./chunk-KWPTKVOD.js";import"./chunk-M6QAVNUD.js";import"./chunk-6GF7AYWF.js";import"./chunk-NYBRCPXY.js";import"./chunk-ZMCH7LNI.js";import"./chunk-XKYWN32Q.js";import"./chunk-WWCLVFFT.js";import"./chunk-PMZU2MXQ.js";import"./chunk-ZCIJF6TG.js";import"./chunk-DL5UW643.js";import{mkdirSync as W,writeFileSync as A}from"fs";import{dirname as J,resolve as B}from"path";import{WebSocket as E}from"ws";var C=e=>new Promise(o=>setTimeout(o,e)),v=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(o){this.ws=new E(o,{maxPayload:1<<28}),this.ready=new Promise((r,t)=>{this.ws.once("open",()=>r()),this.ws.once("error",t)}),this.ws.on("message",r=>{let t=JSON.parse(r.toString());if(t.id&&this.pending.has(t.id)){let{res:n,rej:s}=this.pending.get(t.id);this.pending.delete(t.id),t.error?s(new Error(JSON.stringify(t.error))):n(t.result)}else if(t.method)for(let n of this.listeners)n(t.method,t.params)})}waitOpen(){return this.ready}on(o){this.listeners.add(o)}send(o,r={},t){let n=this.nextId++;return new Promise((s,l)=>{this.pending.set(n,{res:s,rej:l}),this.ws.send(JSON.stringify({id:n,method:o,params:r,...t?{sessionId:t}:{}}))})}close(){try{this.ws.close()}catch{}}};async function O(e,o){let r=Number(w(e,"--duration")??"5");if(!Number.isFinite(r)||r<=0)return console.error(" --duration must be a positive number (seconds)"),1;let t=Number(w(e,"--sample-interval")??"0.1"),n=Number(w(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=w(e,"--match")??"/rn/",l=w(e,"--output")??w(e,"-o"),i=B(process.cwd(),l??"/tmp/sootsim.cpuprofile"),a=[];try{a=await(await fetch(`http://localhost:${n}/json/list`)).json()}catch{return U(n),1}let f=a.find(m=>m.type==="page"&&m.url.includes(s));if(!f)return console.error(` no page target matching "${s}" on CDP :${n}`),console.error(` open targets: ${a.map(m=>m.url).join(", ")||"(none)"}`),1;let u=new v(f.webSocketDebuggerUrl);await u.waitOpen();try{let m=new Map;if(u.on((c,p)=>{c==="Target.attachedToTarget"&&p.targetInfo?.type==="worker"&&m.set(p.sessionId,p.targetInfo.url),c==="Target.detachedFromTarget"&&m.delete(p.sessionId)}),await u.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await C(500),m.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let c of m.keys())await u.send("Profiler.enable",{},c),await u.send("Profiler.setSamplingInterval",{interval:t*1e3},c),await u.send("Profiler.start",{},c);console.log(` recording ${r}s across ${m.size} worker(s) \u2014 interact now\u2026`),await C(r*1e3);let b=[];for(let[c,p]of m){let{profile:y}=await u.send("Profiler.stop",{},c);b.push({url:p,profile:y})}return b.sort((c,p)=>p.profile.samples.length-c.profile.samples.length),W(J(i),{recursive:!0}),b.forEach((c,p)=>{let y=p===0?i:i.replace(/(\.[^.]+)?$/,`.worker${p}$1`);if(A(y,JSON.stringify(c.profile)),console.log(` ${P(c.url)}: ${c.profile.samples.length} samples \u2192 ${y}`),o.verbose&&c.profile.samples.length>0)for(let $ of _(c.profile,12))console.log(` ${$.pct.toFixed(1).padStart(5)}% ${$.name} ${$.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{u.close()}}function U(e){console.error(` perf cpu needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim perf cpu --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox \\"),console.error(" --use-gl=angle --use-angle=metal \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function P(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function _(e,o){let r=e.samples.length||1,t=new Map;for(let n of e.nodes){let s=n.callFrame,l=`${s.functionName||"(anonymous)"}@${P(s.url)}:${s.lineNumber}`,i=t.get(l)??{self:0,name:s.functionName||"(anonymous)",url:`${P(s.url)}:${s.lineNumber}`};i.self+=n.hitCount??0,t.set(l,i)}return[...t.values()].map(n=>({...n,pct:n.self/r*100})).sort((n,s)=>s.self-n.self).slice(0,o)}function w(e,o){let r=e.indexOf(o);if(!(r<0||r===e.length-1))return e[r+1]}function j(){console.log(`
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{k as x}from"./chunk-VMYBUPRT.js";import"./chunk-KG6V4NCI.js";import"./chunk-AHG7WAP6.js";import"./chunk-6USQVYW2.js";import"./chunk-A3LHGXZW.js";import"./chunk-5GU7LW64.js";import"./chunk-HKEH2UOD.js";import"./chunk-QXJPLKP7.js";import"./chunk-FWUGH36K.js";import"./chunk-T4EGFOSE.js";import{g as R,i as N,l as d,m as S}from"./chunk-5MUXEXEW.js";import"./chunk-EB4FLAAE.js";import"./chunk-DVJZUBQB.js";import"./chunk-2FEGONIZ.js";import"./chunk-KGSLGXWW.js";import"./chunk-EGCQXWLS.js";import"./chunk-AHWQZXFB.js";import"./chunk-XVYCMZMB.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-K7OZYJKD.js";import"./chunk-AKNZ6QBL.js";import{mkdirSync as W,writeFileSync as A}from"fs";import{dirname as J,resolve as B}from"path";import{WebSocket as E}from"ws";var C=e=>new Promise(o=>setTimeout(o,e)),v=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(o){this.ws=new E(o,{maxPayload:1<<28}),this.ready=new Promise((r,t)=>{this.ws.once("open",()=>r()),this.ws.once("error",t)}),this.ws.on("message",r=>{let t=JSON.parse(r.toString());if(t.id&&this.pending.has(t.id)){let{res:n,rej:s}=this.pending.get(t.id);this.pending.delete(t.id),t.error?s(new Error(JSON.stringify(t.error))):n(t.result)}else if(t.method)for(let n of this.listeners)n(t.method,t.params)})}waitOpen(){return this.ready}on(o){this.listeners.add(o)}send(o,r={},t){let n=this.nextId++;return new Promise((s,l)=>{this.pending.set(n,{res:s,rej:l}),this.ws.send(JSON.stringify({id:n,method:o,params:r,...t?{sessionId:t}:{}}))})}close(){try{this.ws.close()}catch{}}};async function O(e,o){let r=Number(w(e,"--duration")??"5");if(!Number.isFinite(r)||r<=0)return console.error(" --duration must be a positive number (seconds)"),1;let t=Number(w(e,"--sample-interval")??"0.1"),n=Number(w(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=w(e,"--match")??"/rn/",l=w(e,"--output")??w(e,"-o"),i=B(process.cwd(),l??"/tmp/sootsim.cpuprofile"),a=[];try{a=await(await fetch(`http://localhost:${n}/json/list`)).json()}catch{return U(n),1}let f=a.find(m=>m.type==="page"&&m.url.includes(s));if(!f)return console.error(` no page target matching "${s}" on CDP :${n}`),console.error(` open targets: ${a.map(m=>m.url).join(", ")||"(none)"}`),1;let u=new v(f.webSocketDebuggerUrl);await u.waitOpen();try{let m=new Map;if(u.on((c,p)=>{c==="Target.attachedToTarget"&&p.targetInfo?.type==="worker"&&m.set(p.sessionId,p.targetInfo.url),c==="Target.detachedFromTarget"&&m.delete(p.sessionId)}),await u.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await C(500),m.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let c of m.keys())await u.send("Profiler.enable",{},c),await u.send("Profiler.setSamplingInterval",{interval:t*1e3},c),await u.send("Profiler.start",{},c);console.log(` recording ${r}s across ${m.size} worker(s) \u2014 interact now\u2026`),await C(r*1e3);let b=[];for(let[c,p]of m){let{profile:y}=await u.send("Profiler.stop",{},c);b.push({url:p,profile:y})}return b.sort((c,p)=>p.profile.samples.length-c.profile.samples.length),W(J(i),{recursive:!0}),b.forEach((c,p)=>{let y=p===0?i:i.replace(/(\.[^.]+)?$/,`.worker${p}$1`);if(A(y,JSON.stringify(c.profile)),console.log(` ${P(c.url)}: ${c.profile.samples.length} samples \u2192 ${y}`),o.verbose&&c.profile.samples.length>0)for(let $ of _(c.profile,12))console.log(` ${$.pct.toFixed(1).padStart(5)}% ${$.name} ${$.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{u.close()}}function U(e){console.error(` perf cpu needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim perf cpu --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox \\"),console.error(" --use-gl=angle --use-angle=metal \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function P(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function _(e,o){let r=e.samples.length||1,t=new Map;for(let n of e.nodes){let s=n.callFrame,l=`${s.functionName||"(anonymous)"}@${P(s.url)}:${s.lineNumber}`,i=t.get(l)??{self:0,name:s.functionName||"(anonymous)",url:`${P(s.url)}:${s.lineNumber}`};i.self+=n.hitCount??0,t.set(l,i)}return[...t.values()].map(n=>({...n,pct:n.self/r*100})).sort((n,s)=>s.self-n.self).slice(0,o)}function w(e,o){let r=e.indexOf(o);if(!(r<0||r===e.length-1))return e[r+1]}function j(){console.log(`
3
3
  sootsim perf react \u2014 inspect React component render cost in the tenant worker
4
4
 
5
5
  usage:
@@ -1,10 +1,10 @@
1
- /*! sootsim v0.1.213 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P}from"./chunk-PQRTN7R3.js";import"./chunk-QYAABDHA.js";import{a as Z,c as ee}from"./chunk-34ZLNSTB.js";import"./chunk-YIRGMOQC.js";import"./chunk-CK5W32IL.js";import{g as b,i as v,j as Q}from"./chunk-MBTZ72OK.js";import{d as Y}from"./chunk-KWPTKVOD.js";import"./chunk-7ETH4QC5.js";import"./chunk-BBHSIDL7.js";import"./chunk-XKYWN32Q.js";import{b as X}from"./chunk-WWCLVFFT.js";import"./chunk-PMZU2MXQ.js";import"./chunk-DL5UW643.js";import{existsSync as we,mkdirSync as E,readdirSync as he,readFileSync as be,rmSync as J,writeFileSync as I}from"fs";import{homedir as ve,tmpdir as ye}from"os";import{dirname as W,extname as oe,join as N,resolve as Se}from"path";var z=24e4,Re=9e4,$e=3e4;async function D(e,r,o,i){let t=Math.max(2e4,i+$e);try{return await e.send({type:"evaluate",code:r},{timeoutMs:t})}catch(n){let s=n instanceof Error?n.message:String(n);/^command timed out after \d+s$/.test(s)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(t/1e3)}s; it is likely contended or wedged.
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P}from"./chunk-OHQOMV2J.js";import"./chunk-VIXY7DGW.js";import{a as Z,c as ee}from"./chunk-7COBEK2I.js";import"./chunk-5GU7LW64.js";import"./chunk-HKEH2UOD.js";import{g as b,i as v,j as Q}from"./chunk-5MUXEXEW.js";import{d as Y}from"./chunk-2FEGONIZ.js";import"./chunk-LIFR6X36.js";import"./chunk-BU7V5UGD.js";import"./chunk-OUB7WT7Q.js";import{b as X}from"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-AKNZ6QBL.js";import{existsSync as we,mkdirSync as E,readdirSync as he,readFileSync as be,rmSync as J,writeFileSync as I}from"fs";import{homedir as ve,tmpdir as ye}from"os";import{dirname as W,extname as oe,join as N,resolve as Se}from"path";var z=24e4,Re=9e4,$e=3e4;async function D(e,r,o,i){let t=Math.max(2e4,i+$e);try{return await e.send({type:"evaluate",code:r},{timeoutMs:t})}catch(n){let s=n instanceof Error?n.message:String(n);/^command timed out after \d+s$/.test(s)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(t/1e3)}s; it is likely contended or wedged.
3
3
  the capture lock auto-releases, so simply retry the recording.
4
4
  if it persists, recover the sim with \`sootsim close --sim <id>\`.`),process.exit(1)),/render host not available|already streaming|already recording|lock already held/i.test(s)&&(console.error(` ${o} failed: ${s}
5
5
  a prior recording was abandoned and its capture is still
6
6
  releasing. the lock self-heals in ~${Math.round((i+2e4)/1e3)}s \u2014 retry then, or recover now with
7
- \`sootsim close --sim <id>\` and reopen the sim.`),process.exit(1)),console.error(` ${o} failed: ${s}`),process.exit(1)}}var _e=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin","--owner","--repo"]),xe=new Set(["start","stop","cancel","status","prelude-start","upload"]);function Oe(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){_e.has(o)&&r++;continue}return xe.has(o)?{name:o,index:r}:null}return null}function ke(){let e=process.env,r=(e.SOOT_BRANCH||e.GITHUB_HEAD_REF||e.GITHUB_REF_NAME||"").trim(),o=(e.SOOT_SHA||e.GITHUB_SHA||"").trim(),i=(e.SOOT_PR_NUMBER||"").trim(),t=i?Number.parseInt(i,10):Number.NaN,n=(e.SOOT_PR_TITLE||"").trim();return{branch:r||void 0,commitSha:o||void 0,pullRequestNumber:Number.isFinite(t)&&t>0?t:void 0,pullRequestTitle:n||void 0}}function re(e){let r=l(e,"--owner")?.trim(),o=l(e,"--repo")?.trim();return(r&&!o||!r&&o)&&(console.error(" --owner and --repo must be provided together"),process.exit(1)),r&&o?{owner:r,repo:o}:null}async function qe(e,r){let o=Oe(e);if(o){let d=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await Ie(d,r);return}if(o.name==="prelude-start"){await Ne(d,r);return}if(o.name==="upload"){let{runUpload:y}=await import("./upload-QG3WB6P6.js");await y(d,r);return}if(o.name==="stop"){await Pe(d,r);return}if(o.name==="cancel"){await Fe(d,r);return}await Ae(d,r);return}let i=b(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin","--owner","--repo"]}),t=ie(l(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=l(e,"--format");s&&!["webm","mp4","gif","png"].includes(s)&&(console.error(` invalid --format "${s}" \u2014 expected webm | mp4 | gif | png`),process.exit(1));let c=l(e,"--output"),a=Number(l(e,"--duration")??"10");(!Number.isFinite(a)||a<=0)&&(console.error(` invalid --duration "${l(e,"--duration")}" \u2014 expected a positive number of seconds`),process.exit(1));let m=600;a>m&&(console.error(` invalid --duration "${l(e,"--duration")}" \u2014 exceeds the ${m}s (10m) maximum`),process.exit(1));let u=Number(l(e,"--fps")??"30"),p=l(e,"--frames");if(p!==void 0){let d=Number(p);(!Number.isInteger(d)||d<=0)&&(console.error(` invalid --frames "${p}" \u2014 expected a positive integer count`),process.exit(1))}let x=e.includes("--open"),j=l(e,"--max-width")?Number(l(e,"--max-width")):void 0,g=Math.max(100,Math.round(a*1e3)),K=l(e,"--origin"),pe=re(e);if(t==="live"||t==="combined"){c&&console.log(` note: --output is ignored for --mode ${t} \u2014 the recording uploads to /preview/<id>`),n&&t==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await P("record",{originOverride:K,allowGitHubAuth:!0});let d=v({...i,commandTimeoutMs:6e4});try{await q(d),await ae(d,t),t==="combined"&&await B(d),await de(d,K,pe);let y=await ce(d,t,t==="combined"?n:void 0);y.ok||(console.error(` start failed: recording store refused to start (${t})`+(y.error?`: ${y.error}`:"")),process.exit(1)),console.log(` recording ${t} for ${a}s`),await new Promise(_=>setTimeout(_,g)),await le(d);let O=await ue(d);me(O,x,t)}finally{d.close()}return}let C=p?Number(p):null,R=Te(s,c,C);x&&console.log(" note: --open is ignored for local-file capture \u2014 it applies to --mode live/combined");let h=v({...i,commandTimeoutMs:6e4});try{if(await te(h),await B(h),R==="png"){let $=C??10,w=U(c,`sootsim-frames-${M()}`);c&&oe(c)&&console.log(` note: --frames writes multiple pngs, so --output "${c}" is a directory \u2014 frame-NNN.png files land inside it`),E(w,{recursive:!0});for(let f of he(w))/^frame-\d+\.png$/.test(f)&&J(N(w,f),{force:!0});console.log(` sampling ${$} frames over ${a}s \u2192 ${w}`);let S=await h.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${$}, durationMs: ${g}${n?`, layers: ${JSON.stringify(n)}`:""} })`});(!S.ok||!S.requestId)&&(console.error(` frame capture start failed: ${S.error??"unknown error"}`),process.exit(1)),await new Promise(f=>setTimeout(f,g));let fe=Date.now()+Math.max(5e3,g),A=null;for(;;){let f=await h.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${S.requestId})`});if(f||(console.error(" frame capture result missing"),process.exit(1)),f.done){f.ok||(console.error(` frame capture failed: ${f.error??"unknown error"}`),process.exit(1)),A=f.frames??[];break}Date.now()>=fe&&(console.error(" frame capture timed out"),process.exit(1)),await new Promise(F=>setTimeout(F,100))}A.forEach((f,F)=>{let ge=`${w}/frame-${String(F+1).padStart(3,"0")}.png`;I(ge,Buffer.from(f.data,"base64"))}),console.log(` saved ${A.length} frames`);return}if(R==="gif"){let $=C??Math.max(10,Math.round(a*u/3)),w=U(c,`sootsim-${M()}.gif`);E(W(w),{recursive:!0}),console.log(` encoding gif: ${$} frames over ${a}s \u2192 ${w}`);let S=await D(h,`window.__sootsimRecorder.captureGif({ frames: ${$}, durationMs: ${g}${j?`, maxWidth: ${j}`:""}${n?`, layers: ${JSON.stringify(n)}`:""} })`,"gif encode",g);S||(console.error(" gif capture returned no frames"),process.exit(1)),I(w,Buffer.from(S.data,"base64")),console.log(` saved: ${w} (${G(S.size)})`);return}let d=U(c,`sootsim-${M()}.${R}`);E(W(d),{recursive:!0});let y={format:R,fps:u,durationMs:g};n&&(y.layers=n);let O=await D(h,`window.__sootsimRecorder.start(${JSON.stringify(y)})`,`${R} start`,g);O.ok||(console.error(` start failed: ${O.error??"unknown error"}`),/render host not available|already streaming|already recording|lock already held/i.test(O.error??"")&&console.error(" a prior recording was abandoned and its capture is still\n releasing. retry in ~20s, or recover now with\n `sootsim close --sim <id>` then reopen the sim."),process.exit(1)),console.log(` recording ${R} for ${a}s \u2192 ${d}`),await new Promise($=>setTimeout($,g));let _=await D(h,"window.__sootsimRecorder.stop()",`${R} encode/flush`,g);_.ok||(console.error(` stop failed: ${_.error??"unknown error"}`),process.exit(1)),_.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),process.exit(1)),await ne(h,d),console.log(` saved: ${d} (${G(_.size)})`)}finally{h.close()}}var Ee=6e3;async function L(e,r){try{return await e.send({type:"evaluate",code:r},{timeoutMs:Ee})}catch(o){let i=o instanceof Error?o.message:String(o);throw/^command timed out after \d+s$/.test(i)&&(console.error(" sim did not respond \u2014 it is connected to the bridge but has not\n loaded an app (or its page is unresponsive). run `sootsim list`\n and target a sim with a loaded app via --sim <id>."),process.exit(1)),o}}async function te(e){await L(e,'typeof window.__sootsimRecorder !== "undefined"')||(console.error(" window.__sootsimRecorder missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function B(e){let{hidden:r}=await Q(e);r&&(console.error(` refusing to record: the sootsim tab is hidden, so frame capture
7
+ \`sootsim close --sim <id>\` and reopen the sim.`),process.exit(1)),console.error(` ${o} failed: ${s}`),process.exit(1)}}var _e=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin","--owner","--repo"]),xe=new Set(["start","stop","cancel","status","prelude-start","upload"]);function Oe(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){_e.has(o)&&r++;continue}return xe.has(o)?{name:o,index:r}:null}return null}function ke(){let e=process.env,r=(e.SOOT_BRANCH||e.GITHUB_HEAD_REF||e.GITHUB_REF_NAME||"").trim(),o=(e.SOOT_SHA||e.GITHUB_SHA||"").trim(),i=(e.SOOT_PR_NUMBER||"").trim(),t=i?Number.parseInt(i,10):Number.NaN,n=(e.SOOT_PR_TITLE||"").trim();return{branch:r||void 0,commitSha:o||void 0,pullRequestNumber:Number.isFinite(t)&&t>0?t:void 0,pullRequestTitle:n||void 0}}function re(e){let r=l(e,"--owner")?.trim(),o=l(e,"--repo")?.trim();return(r&&!o||!r&&o)&&(console.error(" --owner and --repo must be provided together"),process.exit(1)),r&&o?{owner:r,repo:o}:null}async function qe(e,r){let o=Oe(e);if(o){let d=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await Ie(d,r);return}if(o.name==="prelude-start"){await Ne(d,r);return}if(o.name==="upload"){let{runUpload:y}=await import("./upload-KAY6K5ML.js");await y(d,r);return}if(o.name==="stop"){await Pe(d,r);return}if(o.name==="cancel"){await Fe(d,r);return}await Ae(d,r);return}let i=b(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin","--owner","--repo"]}),t=ie(l(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=l(e,"--format");s&&!["webm","mp4","gif","png"].includes(s)&&(console.error(` invalid --format "${s}" \u2014 expected webm | mp4 | gif | png`),process.exit(1));let c=l(e,"--output"),a=Number(l(e,"--duration")??"10");(!Number.isFinite(a)||a<=0)&&(console.error(` invalid --duration "${l(e,"--duration")}" \u2014 expected a positive number of seconds`),process.exit(1));let m=600;a>m&&(console.error(` invalid --duration "${l(e,"--duration")}" \u2014 exceeds the ${m}s (10m) maximum`),process.exit(1));let u=Number(l(e,"--fps")??"30"),p=l(e,"--frames");if(p!==void 0){let d=Number(p);(!Number.isInteger(d)||d<=0)&&(console.error(` invalid --frames "${p}" \u2014 expected a positive integer count`),process.exit(1))}let x=e.includes("--open"),j=l(e,"--max-width")?Number(l(e,"--max-width")):void 0,g=Math.max(100,Math.round(a*1e3)),K=l(e,"--origin"),pe=re(e);if(t==="live"||t==="combined"){c&&console.log(` note: --output is ignored for --mode ${t} \u2014 the recording uploads to /preview/<id>`),n&&t==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await P("record",{originOverride:K,allowGitHubAuth:!0});let d=v({...i,commandTimeoutMs:6e4});try{await q(d),await ae(d,t),t==="combined"&&await B(d),await de(d,K,pe);let y=await ce(d,t,t==="combined"?n:void 0);y.ok||(console.error(` start failed: recording store refused to start (${t})`+(y.error?`: ${y.error}`:"")),process.exit(1)),console.log(` recording ${t} for ${a}s`),await new Promise(_=>setTimeout(_,g)),await le(d);let O=await ue(d);me(O,x,t)}finally{d.close()}return}let C=p?Number(p):null,R=Te(s,c,C);x&&console.log(" note: --open is ignored for local-file capture \u2014 it applies to --mode live/combined");let h=v({...i,commandTimeoutMs:6e4});try{if(await te(h),await B(h),R==="png"){let $=C??10,w=U(c,`sootsim-frames-${M()}`);c&&oe(c)&&console.log(` note: --frames writes multiple pngs, so --output "${c}" is a directory \u2014 frame-NNN.png files land inside it`),E(w,{recursive:!0});for(let f of he(w))/^frame-\d+\.png$/.test(f)&&J(N(w,f),{force:!0});console.log(` sampling ${$} frames over ${a}s \u2192 ${w}`);let S=await h.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${$}, durationMs: ${g}${n?`, layers: ${JSON.stringify(n)}`:""} })`});(!S.ok||!S.requestId)&&(console.error(` frame capture start failed: ${S.error??"unknown error"}`),process.exit(1)),await new Promise(f=>setTimeout(f,g));let fe=Date.now()+Math.max(5e3,g),A=null;for(;;){let f=await h.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${S.requestId})`});if(f||(console.error(" frame capture result missing"),process.exit(1)),f.done){f.ok||(console.error(` frame capture failed: ${f.error??"unknown error"}`),process.exit(1)),A=f.frames??[];break}Date.now()>=fe&&(console.error(" frame capture timed out"),process.exit(1)),await new Promise(F=>setTimeout(F,100))}A.forEach((f,F)=>{let ge=`${w}/frame-${String(F+1).padStart(3,"0")}.png`;I(ge,Buffer.from(f.data,"base64"))}),console.log(` saved ${A.length} frames`);return}if(R==="gif"){let $=C??Math.max(10,Math.round(a*u/3)),w=U(c,`sootsim-${M()}.gif`);E(W(w),{recursive:!0}),console.log(` encoding gif: ${$} frames over ${a}s \u2192 ${w}`);let S=await D(h,`window.__sootsimRecorder.captureGif({ frames: ${$}, durationMs: ${g}${j?`, maxWidth: ${j}`:""}${n?`, layers: ${JSON.stringify(n)}`:""} })`,"gif encode",g);S||(console.error(" gif capture returned no frames"),process.exit(1)),I(w,Buffer.from(S.data,"base64")),console.log(` saved: ${w} (${G(S.size)})`);return}let d=U(c,`sootsim-${M()}.${R}`);E(W(d),{recursive:!0});let y={format:R,fps:u,durationMs:g};n&&(y.layers=n);let O=await D(h,`window.__sootsimRecorder.start(${JSON.stringify(y)})`,`${R} start`,g);O.ok||(console.error(` start failed: ${O.error??"unknown error"}`),/render host not available|already streaming|already recording|lock already held/i.test(O.error??"")&&console.error(" a prior recording was abandoned and its capture is still\n releasing. retry in ~20s, or recover now with\n `sootsim close --sim <id>` then reopen the sim."),process.exit(1)),console.log(` recording ${R} for ${a}s \u2192 ${d}`),await new Promise($=>setTimeout($,g));let _=await D(h,"window.__sootsimRecorder.stop()",`${R} encode/flush`,g);_.ok||(console.error(` stop failed: ${_.error??"unknown error"}`),process.exit(1)),_.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),process.exit(1)),await ne(h,d),console.log(` saved: ${d} (${G(_.size)})`)}finally{h.close()}}var Ee=6e3;async function L(e,r){try{return await e.send({type:"evaluate",code:r},{timeoutMs:Ee})}catch(o){let i=o instanceof Error?o.message:String(o);throw/^command timed out after \d+s$/.test(i)&&(console.error(" sim did not respond \u2014 it is connected to the bridge but has not\n loaded an app (or its page is unresponsive). run `sootsim list`\n and target a sim with a loaded app via --sim <id>."),process.exit(1)),o}}async function te(e){await L(e,'typeof window.__sootsimRecorder !== "undefined"')||(console.error(" window.__sootsimRecorder missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function B(e){let{hidden:r}=await Q(e);r&&(console.error(` refusing to record: the sootsim tab is hidden, so frame capture
8
8
  would be throttled to ~1fps and produce a frozen-looking file.
9
9
  bring the chrome window to the foreground (un-minimize / switch to
10
10
  its tab) or run the recording in headless playwright, then retry.`),process.exit(1))}async function ne(e,r){let o=[],i=0;for(;;){let t=await e.send({type:"evaluate",code:`window.__sootsimRecorder.getBlobBase64({ offset: ${i}, chunk: 2097152 })`});if(!t)throw new Error("no blob available on recorder");if(o.push(Buffer.from(t.data,"base64")),i=t.offset,t.done)break}I(r,Buffer.concat(o))}function l(e,r){let o=e.indexOf(r);if(!(o<0||o===e.length-1))return e[o+1]}function Be(e){if(!e)return;let r=oe(e).toLowerCase().replace(/^\./,"");if(r==="webm"||r==="mp4"||r==="gif")return r;if(r==="png")return"png"}function Te(e,r,o){return e||(o!=null?"png":Be(r)??"webm")}function M(){return new Date().toISOString().replace(/[:T]/g,"-").replace(/\..+/,"")}function Me(){let e=N(ve(),".sootsim","recordings");return E(e,{recursive:!0}),e}function U(e,r){return e?Se(process.cwd(),e):N(Me(),r)}function G(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function ie(e){if(!e)return"video";if(e==="video"||e==="live"||e==="combined")return e;console.error(` invalid --mode "${e}" \u2014 expected video | live | combined`),process.exit(1)}function H(){return N(ye(),`sootsim-recording-${X()}.json`)}function T(){let e=H();if(!we(e))return null;try{return{mode:"video",...JSON.parse(be(e,"utf8"))}}catch{return J(e,{force:!0}),null}}function Ue(e){I(H(),JSON.stringify(e,null,2))}function k(){J(H(),{force:!0})}function V(e,r){e&&r.simId&&e!==r.simId&&console.log(` note: the tracked recording session is on sim ${r.simId}, not the
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.215 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-RIAS4TMS.js";import"./chunk-UJZFS2JM.js";import"./chunk-5MUXEXEW.js";import"./chunk-OUB7WT7Q.js";import"./chunk-YTQ5RCVB.js";import"./chunk-FEFLFVIU.js";import"./chunk-AKNZ6QBL.js";export{a as runRuntime};