sootsim 0.1.274 → 0.1.276

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 (143) hide show
  1. package/dist-cli/bin.js +4 -4
  2. package/dist-cli/chunks/{agent-SP2IDNK3.js → agent-RAELE5TZ.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-HENTSNUE.js → agent-wrapper-KRWIZKMW.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-WBECQ2EZ.js → app-fonts-VEY2BVN5.js} +2 -2
  5. package/dist-cli/chunks/{assert-WYWHND2A.js → assert-HD2EXPUZ.js} +2 -2
  6. package/dist-cli/chunks/{auth-E35CVJU7.js → auth-ZAVWJYZM.js} +2 -2
  7. package/dist-cli/chunks/beta-CG2ZGM5U.js +2 -0
  8. package/dist-cli/chunks/{camera-F2VZVVXR.js → camera-R7UHFQUT.js} +2 -2
  9. package/dist-cli/chunks/{chunk-7TXMXDJ2.js → chunk-2ETQKNV4.js} +1 -1
  10. package/dist-cli/chunks/{chunk-L2GEJDHZ.js → chunk-2GCDUSVS.js} +2 -2
  11. package/dist-cli/chunks/{chunk-WZMS7IWF.js → chunk-6LBOVFQU.js} +2 -2
  12. package/dist-cli/chunks/{chunk-OFFUC2RN.js → chunk-7Y7P6WMH.js} +2 -2
  13. package/dist-cli/chunks/{chunk-MBKNWJ7A.js → chunk-ABZUI7QS.js} +2 -2
  14. package/dist-cli/chunks/{chunk-TUQ2MLNE.js → chunk-CBKFJFPO.js} +1 -1
  15. package/dist-cli/chunks/{chunk-R3RWCHTI.js → chunk-E2DC3YKM.js} +1 -1
  16. package/dist-cli/chunks/{chunk-WY54NKD3.js → chunk-EORIWLQB.js} +2 -2
  17. package/dist-cli/chunks/chunk-EZECGPHY.js +105 -0
  18. package/dist-cli/chunks/{chunk-FIF4VGJQ.js → chunk-F25XSUJT.js} +2 -2
  19. package/dist-cli/chunks/{chunk-HXB72OSS.js → chunk-GD2UJ4TP.js} +3 -3
  20. package/dist-cli/chunks/{chunk-L6QRHE42.js → chunk-GEPFPSAX.js} +3 -3
  21. package/dist-cli/chunks/{chunk-6NURRM7A.js → chunk-HBTJOIZL.js} +2 -2
  22. package/dist-cli/chunks/{chunk-MRPAMQ5L.js → chunk-HJRCNPTN.js} +2 -2
  23. package/dist-cli/chunks/{chunk-QPSTRUBX.js → chunk-ICZP3M2L.js} +2 -2
  24. package/dist-cli/chunks/{chunk-LEM5AZSM.js → chunk-JDKOSL6H.js} +1 -1
  25. package/dist-cli/chunks/{chunk-7GSQVLU3.js → chunk-JIV7WORK.js} +2 -2
  26. package/dist-cli/chunks/{chunk-FIDZ4L7T.js → chunk-L5CFA4HR.js} +37 -37
  27. package/dist-cli/chunks/{chunk-JXEHP3A7.js → chunk-NER6TUN4.js} +1 -1
  28. package/dist-cli/chunks/chunk-OHERA54U.js +3 -0
  29. package/dist-cli/chunks/{chunk-OSWJRU2A.js → chunk-OLMN2GHX.js} +1 -1
  30. package/dist-cli/chunks/{chunk-CJ6GJTYB.js → chunk-OXNFCTZ6.js} +1 -1
  31. package/dist-cli/chunks/{chunk-DMQV5GMM.js → chunk-OZHD4X6Q.js} +2 -2
  32. package/dist-cli/chunks/{chunk-GRWG6LIS.js → chunk-P5BV3QAM.js} +2 -2
  33. package/dist-cli/chunks/{chunk-PMP3DTAI.js → chunk-PGJCWB2V.js} +1 -1
  34. package/dist-cli/chunks/{chunk-DNX4UAKZ.js → chunk-PQO27576.js} +1 -1
  35. package/dist-cli/chunks/{chunk-3Y24AVG3.js → chunk-QEQ67G3J.js} +2 -2
  36. package/dist-cli/chunks/{chunk-C2333EA4.js → chunk-QWGA52NX.js} +2 -2
  37. package/dist-cli/chunks/{chunk-VHJIZG4X.js → chunk-RIJHEW47.js} +2 -2
  38. package/dist-cli/chunks/{chunk-FPRVB576.js → chunk-RYQJHPDW.js} +1 -1
  39. package/dist-cli/chunks/{chunk-THEG5IYF.js → chunk-S4QRFVHK.js} +1 -1
  40. package/dist-cli/chunks/{chunk-UMC7L3M5.js → chunk-TDMIZDJH.js} +1 -1
  41. package/dist-cli/chunks/{chunk-IUAQ4QCN.js → chunk-TRCVKKJV.js} +2 -2
  42. package/dist-cli/chunks/{chunk-MVUUNF4D.js → chunk-UKIH77PO.js} +1 -1
  43. package/dist-cli/chunks/{chunk-CKRGQNNG.js → chunk-UO6WYITC.js} +2 -2
  44. package/dist-cli/chunks/{chunk-JEHRDCRK.js → chunk-VJEV42CS.js} +1 -1
  45. package/dist-cli/chunks/{chunk-QKGEDIT7.js → chunk-WXM7V4QG.js} +1 -1
  46. package/dist-cli/chunks/{chunk-LOQKCRYG.js → chunk-XJQHO2S3.js} +1 -1
  47. package/dist-cli/chunks/chunk-XWA3QJHM.js +1 -0
  48. package/dist-cli/chunks/{chunk-H2TR6GOZ.js → chunk-YDWU5JGQ.js} +1 -1
  49. package/dist-cli/chunks/{chunk-Z3UMX3ES.js → chunk-YKB4PERM.js} +3 -3
  50. package/dist-cli/chunks/{chunk-QZDFPHFP.js → chunk-YWLMNNUX.js} +1 -1
  51. package/dist-cli/chunks/{chunk-NJCPGGEI.js → chunk-ZGAQ4YP2.js} +2 -2
  52. package/dist-cli/chunks/{chunk-UMKOBO3D.js → chunk-ZLY4RFOK.js} +2 -2
  53. package/dist-cli/chunks/cli-version-ITHARKQX.js +2 -0
  54. package/dist-cli/chunks/{compat-6BWZSXO2.js → compat-PJZ2MKYA.js} +3 -3
  55. package/dist-cli/chunks/{config-ALQ3XICK.js → config-HBLTVMGG.js} +2 -2
  56. package/dist-cli/chunks/{control-LKKK6POM.js → control-VSBI7EV5.js} +2 -2
  57. package/dist-cli/chunks/daemon-XBG3JVMV.js +2 -0
  58. package/dist-cli/chunks/{debug-UW2CYUZV.js → debug-X6MTBOW6.js} +3 -3
  59. package/dist-cli/chunks/{desktop-OVDRE6S6.js → desktop-OD334RRJ.js} +3 -3
  60. package/dist-cli/chunks/{detox-ECZVK6PR.js → detox-VO4Y4TZT.js} +2 -2
  61. package/dist-cli/chunks/{device-NGOMSILD.js → device-POBZXX36.js} +2 -2
  62. package/dist-cli/chunks/{diagnose-GHK6MRNR.js → diagnose-RG4DNSJH.js} +2 -2
  63. package/dist-cli/chunks/drivers-CFKAYGVB.js +2 -0
  64. package/dist-cli/chunks/{film-VS2A3IX4.js → film-EEZ7JYCH.js} +3 -3
  65. package/dist-cli/chunks/flow-CBGYY2BU.js +2 -0
  66. package/dist-cli/chunks/help-IIN4OPJP.js +2 -0
  67. package/dist-cli/chunks/{hidden-runtime-alias-UQ5ZKE3I.js → hidden-runtime-alias-PSZERNEQ.js} +2 -2
  68. package/dist-cli/chunks/{home-paths-Z35ISOAG.js → home-paths-WYWJBN76.js} +2 -2
  69. package/dist-cli/chunks/inspect-A2K6PWQD.js +2 -0
  70. package/dist-cli/chunks/install-desktop-MUTTJ4Q3.js +2 -0
  71. package/dist-cli/chunks/{login-G2EXBMDC.js → login-4GZCGFO2.js} +4 -4
  72. package/dist-cli/chunks/{logout-S44PJUTK.js → logout-TBV4TM3J.js} +2 -2
  73. package/dist-cli/chunks/{maestro-RG4FSUYB.js → maestro-EV2ODFPS.js} +3 -3
  74. package/dist-cli/chunks/{maestro-generate-6GVTSEPX.js → maestro-generate-63NOYKMO.js} +3 -3
  75. package/dist-cli/chunks/{mode-7DATSPWV.js → mode-HJQKDZ7B.js} +2 -2
  76. package/dist-cli/chunks/optional-demo-registry-ABGMHWRG.js +2 -0
  77. package/dist-cli/chunks/{perf-BB3LPJZ3.js → perf-G4VVBRKR.js} +2 -2
  78. package/dist-cli/chunks/{record-7GVPZEJ2.js → record-WG2DQJ6R.js} +3 -3
  79. package/dist-cli/chunks/runtime-6QRYIWT5.js +2 -0
  80. package/dist-cli/chunks/{screenshot-command-QLKJO7M5.js → screenshot-command-UKF4PJZH.js} +3 -3
  81. package/dist-cli/chunks/{screenshots-capture-2ETYLZHU.js → screenshots-capture-KYRY5KBQ.js} +2 -2
  82. package/dist-cli/chunks/{serve-A2C5JGRI.js → serve-TOAVNB2L.js} +2 -2
  83. package/dist-cli/chunks/{setup-UKGMCHYN.js → setup-7EXPBGBK.js} +3 -3
  84. package/dist-cli/chunks/{skills-Y47YKPFD.js → skills-5NA6SOSL.js} +2 -2
  85. package/dist-cli/chunks/{storage-QMCQTD5O.js → storage-DA56E2TD.js} +2 -2
  86. package/dist-cli/chunks/store-OSBVI7NZ.js +2 -0
  87. package/dist-cli/chunks/telemetry-PHVNG3BD.js +2 -0
  88. package/dist-cli/chunks/{timeline-4MGE7I7C.js → timeline-TVLJIWWM.js} +2 -2
  89. package/dist-cli/chunks/{upgrade-GAJLZNIL.js → upgrade-2MFUXAXX.js} +2 -2
  90. package/dist-cli/chunks/upload-ENBO3NJF.js +2 -0
  91. package/dist-cli/chunks/{version-L7M7G6VK.js → version-FJ46CD5W.js} +2 -2
  92. package/dist-cli/chunks/{web-47UBIUQN.js → web-OZBUVPLL.js} +2 -2
  93. package/dist-cli/chunks/{what-happened-77MDGLU6.js → what-happened-X6UC5ESR.js} +2 -2
  94. package/dist-lib/agent-daemon-client.cjs +1 -1
  95. package/dist-lib/agent-events.cjs +1 -1
  96. package/dist-lib/agent-identity.cjs +1 -1
  97. package/dist-lib/agent-sessions.cjs +1 -1
  98. package/dist-lib/attached-projects.cjs +1 -1
  99. package/dist-lib/auth/shared-session.cjs +1 -1
  100. package/dist-lib/backend-origin.cjs +1 -1
  101. package/dist-lib/beta.cjs +1 -1
  102. package/dist-lib/beta.mjs +1 -1
  103. package/dist-lib/bridge-constants.cjs +1 -1
  104. package/dist-lib/cli-constants.cjs +1 -1
  105. package/dist-lib/config.cjs +1 -1
  106. package/dist-lib/detox/index.cjs +1 -1
  107. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  108. package/dist-lib/home-paths.cjs +1 -1
  109. package/dist-lib/host/bridge-host.cjs +1 -1
  110. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  111. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  112. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  113. package/dist-lib/host/websocket-proxy.cjs +1 -1
  114. package/dist-lib/index.cjs +1 -1
  115. package/dist-lib/jump-to-source-babel.cjs +1 -1
  116. package/dist-lib/menu.cjs +1 -1
  117. package/dist-lib/menu.mjs +1 -1
  118. package/dist-lib/metro.cjs +1 -1
  119. package/dist-lib/profiles.cjs +1 -1
  120. package/dist-lib/render-mode.cjs +1 -1
  121. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  122. package/dist-lib/sdk.cjs +1 -1
  123. package/dist-lib/sdk.mjs +1 -1
  124. package/dist-lib/skills.cjs +1 -1
  125. package/dist-lib/vite.cjs +1 -1
  126. package/package.json +1 -1
  127. package/skills/sootsim-perf/SKILL.md +35 -0
  128. package/dist-cli/chunks/beta-VEDB5GJL.js +0 -2
  129. package/dist-cli/chunks/chunk-7YNWXKYB.js +0 -103
  130. package/dist-cli/chunks/chunk-HV6Q52AU.js +0 -3
  131. package/dist-cli/chunks/chunk-XUJD4ISB.js +0 -1
  132. package/dist-cli/chunks/cli-version-VVHXBGLH.js +0 -2
  133. package/dist-cli/chunks/daemon-SFPSHCZR.js +0 -2
  134. package/dist-cli/chunks/drivers-KFWTZIPO.js +0 -2
  135. package/dist-cli/chunks/flow-4PKUMGBJ.js +0 -2
  136. package/dist-cli/chunks/help-5WC5TRXH.js +0 -2
  137. package/dist-cli/chunks/inspect-V36VCI64.js +0 -2
  138. package/dist-cli/chunks/install-desktop-IMGSNS4F.js +0 -2
  139. package/dist-cli/chunks/optional-demo-registry-IWDV37HI.js +0 -2
  140. package/dist-cli/chunks/runtime-MDHCEARQ.js +0 -2
  141. package/dist-cli/chunks/store-IYLZAEQR.js +0 -2
  142. package/dist-cli/chunks/telemetry-GA3I3ZUS.js +0 -2
  143. package/dist-cli/chunks/upload-BP7QWZ5F.js +0 -2
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.274 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.276 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{execFileSync as b,execSync as A}from"node:child_process";var p=new WeakMap,u=new Set,y=!1;function d(){return{platform:process.platform,env:process.env}}function g(e=d()){return e.platform==="linux"&&e.env.GITHUB_ACTIONS==="true"&&e.env.RUNNER_OS==="Linux"}function I(e){let r=String(e);return/^--disable-gpu(?:=.*)?$/i.test(r)||/^--enable-unsafe-swiftshader(?:=.*)?$/i.test(r)||/^--use-angle=(?:swiftshader|swiftshader-webgl)$/i.test(r)||/^--use-gl=swiftshader$/i.test(r)}function E(e){return e.match(/(?:^|\s)(--disable-gpu(?:=[^\s]+)?|--enable-unsafe-swiftshader(?:=[^\s]+)?|--use-angle=(?:swiftshader|swiftshader-webgl)|--use-gl=swiftshader)(?=\s|$)/i)?.[1]??null}function v(e){return e==="darwin"?"metal":e==="linux"?"vulkan":"default"}function P(e,r=d()){if(g(r))return;let n=E(e);if(n)throw new Error(`[reap-browser] refused software-rendering Chrome process argument ${n}`);let o=v(r.platform),s=e.split(/\s+/);if(!s.includes(`--use-angle=${o}`)||!s.includes("--enable-gpu"))throw new Error(`[reap-browser] Chrome process did not retain the required ${o} GPU arguments`);if(r.platform==="darwin"&&e.includes("/Applications/Google Chrome.app/"))throw new Error("[reap-browser] refused the user's installed Google Chrome; use Playwright channel chromium")}function G(e){if(!e||typeof e!="object")return[];let n=e.gpu;if(!n||typeof n!="object")return[];let o=n,s=[],a=o.auxAttributes;if(a&&typeof a=="object")for(let t of Object.values(a))typeof t=="string"&&s.push(t);let i=o.devices;if(Array.isArray(i)){for(let t of i)if(!(!t||typeof t!="object"))for(let c of Object.values(t))typeof c=="string"&&s.push(c)}return s}function C(e){if(!e||typeof e!="object")return null;let r=e;if(!Array.isArray(r.processInfo))return null;for(let n of r.processInfo){if(!n||typeof n!="object")continue;let o=n;if(o.type==="browser"&&typeof o.id=="number"&&Number.isInteger(o.id)&&o.id>0)return o.id}return null}function L(e,r=d()){if(g(r))return;let o=G(e).join(" | ");if(!o||/swiftshader|llvmpipe|software rasterizer/i.test(o))throw new Error(`[reap-browser] Chrome reported a software renderer${o?`: ${o}`:""}`);if(r.platform==="darwin"&&!/metal/i.test(o))throw new Error(`[reap-browser] Chrome did not report an ANGLE Metal renderer: ${o}`)}function w(e){if(e&&typeof e=="object"){let n=p.get(e);if(n!==void 0)return n}let r=e;if(r&&typeof r.process=="function")try{let n=r.process();if(n&&typeof n.pid=="number"&&n.pid>0)return n.pid}catch{}if(r&&typeof r.browser=="function")try{let n=r.browser();if(n)return w(n)}catch{}return null}function h(e){let r=[];try{r=A(`pgrep -P ${e} || true`).toString().split(`
3
3
  `).filter(Boolean)}catch{}for(let n of r)h(Number(n));try{process.kill(e,"SIGKILL")}catch{}}function f(e){let r=e;if(!r||typeof r!="object")return null;if(typeof r.newBrowserCDPSession=="function"||typeof r.process=="function")return r;if(typeof r.browser!="function")return null;try{let n=r.browser();return n?f(n):null}catch{return null}}function m(e,r,n){e&&typeof e=="object"&&p.set(e,n),p.set(r,n),u.add(n),B()}async function N(e){let r=w(e);if(r!==null)return r;let n=f(e);if(!n||typeof n.newBrowserCDPSession!="function")return null;let o=await n.newBrowserCDPSession();try{let s=C(await o.send("SystemInfo.getProcessInfo"));return s===null?null:(m(e,n,s),s)}finally{await o.detach?.()}}async function j(e){let r=w(e);if(r!==null){u.delete(r),h(r);return}let n=e;if(n&&typeof n.close=="function")try{await n.close()}catch{}}async function T(e,r,n){if(g(r))return;let o=w(e),s=f(e);if(o!==null&&s&&m(e,s,o),o!==null&&(r.platform==="darwin"||r.platform==="linux")){let t=b("ps",["-p",String(o),"-o","command="],{encoding:"utf8"}).trim();P(t,r)}let a=n?await n(e):e,i=f(a);if(i&&typeof i.newBrowserCDPSession=="function"){let t=await i.newBrowserCDPSession();try{let c=C(await t.send("SystemInfo.getProcessInfo"));if(c===null)throw new Error("[reap-browser] Chrome did not report its browser process id");if(m(e,i,c),a&&typeof a=="object"&&p.set(a,c),r.platform==="darwin"||r.platform==="linux"){let l=b("ps",["-p",String(c),"-o","command="],{encoding:"utf8"}).trim();P(l,r)}L(await t.send("SystemInfo.getInfo"),r);return}finally{await t.detach?.()}}throw new Error("[reap-browser] could not validate the launched Chrome GPU renderer")}var $=!1;function B(){if(y)return;y=!0;let e=()=>{for(let r of u)h(r)};$||(process.on("SIGTERM",()=>{e(),process.exit(0)}),process.on("SIGINT",()=>{e(),process.exit(0)})),process.on("exit",e)}async function R(e){let r=await e(),n=w(r);if(n===null)try{n=await N(r)}catch{n=null}let o=new Set;n!=null&&(o.add(n),u.add(n),B());let s=f(r)??r;if(typeof s.on=="function"){let i=typeof s.newBrowserCDPSession=="function"?"disconnected":"close";s.on(i,()=>{for(let t of o)u.delete(t)})}return{browser:r,reapNow:()=>{for(let i of o)h(i),u.delete(i);o.clear()}}}async function D(e){let{browser:r}=await R(e);return r}var k=!1;function W(e=process.platform){return[`--use-angle=${v(e)}`,"--enable-gpu","--enable-gpu-rasterization","--enable-zero-copy","--ignore-gpu-blocklist"]}function O(e={},r=d()){let n=Array.isArray(e.args)?e.args:[],o=n.find(I);if(o!==void 0)throw new Error(`[reap-browser] refused software-rendering Chrome launch argument ${String(o)}`);if(e.executablePath!==void 0)throw new Error("[reap-browser] executablePath bypasses Playwright Chrome for Testing and is not allowed");if(e.ignoreDefaultArgs===!0)throw new Error("[reap-browser] ignoreDefaultArgs=true bypasses required Chrome launch defaults");let s=new Set(["--enable-gpu","--enable-gpu-rasterization","--enable-zero-copy","--ignore-gpu-blocklist"]),a=n.filter(c=>{let l=String(c);return!s.has(l)&&!l.startsWith("--use-angle=")}),i=Array.isArray(e.ignoreDefaultArgs)?e.ignoreDefaultArgs:[],t=[...new Set([...i,"--disable-gpu","--enable-unsafe-swiftshader"])];return{...e,channel:"chromium",args:[...a,...W(r.platform)],ignoreDefaultArgs:t}}function x(e,r,n){return async()=>{let o=d(),s=g(o),a=O(r,o);if(!k){let i;try{i=await e(a)}catch(t){let c=t instanceof Error?t.message:String(t);if(!/not found at|not installed|Chromium distribution|Executable doesn't exist|No such file/i.test(c))throw t;if(!s)throw new Error("[reap-browser] Playwright Chrome for Testing is required for local GPU browser work; chromium_headless_shell fallback is disabled. Run `bunx playwright install chromium`.",{cause:t});return k=!0,console.warn("[reap-browser] GitHub Actions Linux Chrome for Testing not found, falling back to chromium_headless_shell software rendering."),e(S(r))}try{await T(i,o,n)}catch(t){throw await j(i),t}return i}return e(S(r))}}function S(e){let r={...e};return delete r.channel,delete r.executablePath,r}async function z(e,r={},n){return D(x(e,r,n))}async function U(e,r={},n){return R(x(e,r,n))}export{z as a,U as b};
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.274 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{k as n}from"./chunk-TUQ2MLNE.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
1
+ /*! sootsim v0.1.276 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{k as n}from"./chunk-CBKFJFPO.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
3
3
  `)}export{g as a};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.274 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as K,b as V,c as Ne}from"./chunk-QPSTRUBX.js";import{c as Pe}from"./chunk-THEG5IYF.js";import{d as _e}from"./chunk-OSWJRU2A.js";import{d as Oe}from"./chunk-LEM5AZSM.js";import{g as $e,i as Fe,k as B}from"./chunk-CKRGQNNG.js";import{a as Ue,b as E}from"./chunk-GRWG6LIS.js";import{a as Ae}from"./chunk-WY54NKD3.js";import{createHash as St}from"crypto";import{readFileSync as M}from"fs";import je from"path";import{gzipSync as ge,gunzipSync as vt}from"zlib";function Ce(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}import{brotliCompressSync as ut,constants as ct}from"node:zlib";var dt=9;function Le(e){return ut(e,{params:{[ct.BROTLI_PARAM_QUALITY]:dt}})}function ce(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function pt(e){let t=ce(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function mt(e,t=8,r){let s=0,o=0,i=e.length;await Promise.all(Array.from({length:Math.min(t,i)},async()=>{for(;s<i;){let l=e[s++];await pt(l),o++,r?.(o,i)}}))}function ft(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let i of e.files){let l=r.get(i.urlhash);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&o.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&o.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&o.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&o.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let i of e.snapshots??[]){let l=s?.snapshotBytes?.get(i.id);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}return o}function gt(e){return e.replace(/\/+$/,"")}var W=class extends Error{constructor(r,s,o,i=""){super(r);this.status=s;this.phase=o;this.responseText=i;this.name="PresignedUploadError"}};async function ze(e){let t=gt(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-contrast-admin-upload-bypass"]=e.adminBypassToken);let s=ce(3e4,"init"),o;try{o=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!o.ok){let T=await o.text().catch(()=>"");throw new W(`init failed: ${o.status} ${T.slice(0,200)}`,o.status,"init",T)}let i=await o.json(),l=ft(i,e.bundleBytes,e.filesByHash,e.extras);await mt(l,e.concurrency??8,e.onPutProgress);let m=ce(3e4,"finalize"),c;try{c=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:i.token}),signal:m.signal})}finally{m.cancel()}if(!c.ok){let T=await c.text().catch(()=>"");throw new W(`finalize failed: ${c.status} ${T.slice(0,200)}`,c.status,"finalize",T)}let h=await c.json();return{init:i,finalize:h}}function ht(e){return e!==null&&typeof e=="object"?e:null}function De(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function de(e){let t=ht(e);return t?t.schemaVersion===1&&De(t.t)!==void 0&&De(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function yt(e,t){let r=[];for(let s of e.split(`
1
+ /*! sootsim v0.1.276 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as K,b as V,c as Ne}from"./chunk-ICZP3M2L.js";import{c as Pe}from"./chunk-S4QRFVHK.js";import{d as _e}from"./chunk-OLMN2GHX.js";import{d as Oe}from"./chunk-JDKOSL6H.js";import{g as $e,i as Fe,k as B}from"./chunk-UO6WYITC.js";import{a as Ue,b as E}from"./chunk-P5BV3QAM.js";import{a as Ae}from"./chunk-EORIWLQB.js";import{createHash as St}from"crypto";import{readFileSync as M}from"fs";import je from"path";import{gzipSync as ge,gunzipSync as vt}from"zlib";function Ce(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}import{brotliCompressSync as ut,constants as ct}from"node:zlib";var dt=9;function Le(e){return ut(e,{params:{[ct.BROTLI_PARAM_QUALITY]:dt}})}function ce(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function pt(e){let t=ce(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function mt(e,t=8,r){let s=0,o=0,i=e.length;await Promise.all(Array.from({length:Math.min(t,i)},async()=>{for(;s<i;){let l=e[s++];await pt(l),o++,r?.(o,i)}}))}function ft(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let i of e.files){let l=r.get(i.urlhash);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&o.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&o.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&o.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&o.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let i of e.snapshots??[]){let l=s?.snapshotBytes?.get(i.id);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}return o}function gt(e){return e.replace(/\/+$/,"")}var W=class extends Error{constructor(r,s,o,i=""){super(r);this.status=s;this.phase=o;this.responseText=i;this.name="PresignedUploadError"}};async function ze(e){let t=gt(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-contrast-admin-upload-bypass"]=e.adminBypassToken);let s=ce(3e4,"init"),o;try{o=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!o.ok){let T=await o.text().catch(()=>"");throw new W(`init failed: ${o.status} ${T.slice(0,200)}`,o.status,"init",T)}let i=await o.json(),l=ft(i,e.bundleBytes,e.filesByHash,e.extras);await mt(l,e.concurrency??8,e.onPutProgress);let m=ce(3e4,"finalize"),c;try{c=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:i.token}),signal:m.signal})}finally{m.cancel()}if(!c.ok){let T=await c.text().catch(()=>"");throw new W(`finalize failed: ${c.status} ${T.slice(0,200)}`,c.status,"finalize",T)}let h=await c.json();return{init:i,finalize:h}}function ht(e){return e!==null&&typeof e=="object"?e:null}function De(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function de(e){let t=ht(e);return t?t.schemaVersion===1&&De(t.t)!==void 0&&De(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function yt(e,t){let r=[];for(let s of e.split(`
3
3
  `)){let o=s.trim();if(o)try{let i=JSON.parse(o);t(i)&&r.push(i)}catch{}}return r}function He(e){return yt(e,de)}import{execSync as bt}from"child_process";function me(e){try{return bt(e,{stdio:["ignore","pipe","ignore"],timeout:3e3,encoding:"utf8"}).trim()||null}catch{return null}}function pe(e){let t=e?.trim();return!t||!/^\d+$/.test(t)?null:Number(t)}function wt(){let e=me("git remote get-url origin");if(!e)return null;let t=e.match(/github\.com[/:]([^/\s]+)\/([^/\s]+?)(?:\.git)?\/?$/i);return t?{owner:t[1],repo:t[2]}:null}function fe(){let e=process.env.GITHUB_ACTIONS==="true",t=process.env.CONTRAST_BRANCH?.trim()||null,r=process.env.CONTRAST_SHA?.trim()||null,s=process.env.CONTRAST_PR_TITLE?.trim()||null,o=(process.env.CONTRAST_REPO||process.env.GITHUB_REPOSITORY||"").trim(),[i,l]=o.includes("/")?o.split("/",2):[null,null];if(e){let h=process.env.GITHUB_REF?.match(/^refs\/pull\/(\d+)\//)?.[1];return{owner:i,repo:l,branch:t||process.env.GITHUB_HEAD_REF?.trim()||process.env.GITHUB_REF_NAME?.trim()||null,commitSha:r||process.env.GITHUB_SHA?.trim()||null,githubUsername:process.env.GITHUB_ACTOR?.trim()||null,pullRequestNumber:pe(process.env.CONTRAST_PR_NUMBER)??pe(h),pullRequestTitle:s,githubRunId:process.env.GITHUB_RUN_ID?.trim()||null,source:"ci"}}let m=t??me("git rev-parse --abbrev-ref HEAD"),c=i?null:wt();return{owner:i??c?.owner??null,repo:l??c?.repo??null,branch:m==="HEAD"?null:m,commitSha:r??me("git rev-parse HEAD"),githubUsername:null,pullRequestNumber:pe(process.env.CONTRAST_PR_NUMBER),pullRequestTitle:s,githubRunId:null,source:"cli"}}function Yt(e){if(e.length===0)return{stepCount:null,failedStepIndex:null};let t=e.find(r=>r.status==="failure");return{stepCount:e.length,failedStepIndex:t?t.stepIndex:null}}function Qt(e){return e.auth?e.uploadedShare?!0:e.auth.kind==="github"||process.env.GITHUB_ACTIONS==="true":!1}async function Xt(e){let t=e.auth??K();if(!t)return null;let r=fe(),s=e.owner??(t.kind==="github"?t.owner:null)??r.owner,o=e.repo??(t.kind==="github"?t.repo:null)??r.repo;try{let i=await fetch(`${e.origin.replace(/\/$/,"")}/api/sootsim/test-runs`,{method:"POST",headers:{"content-type":"application/json",authorization:V(t)},body:JSON.stringify({kind:e.kind,source:r.source,name:e.name??void 0,prompt:e.prompt??void 0,summary:e.summary??void 0,status:e.status,failureMessage:e.failureMessage??void 0,previewShareId:e.previewShareId??void 0,owner:s??void 0,repo:o??void 0,branch:r.branch??void 0,commitSha:r.commitSha??void 0,githubUsername:r.githubUsername??void 0,pullRequestNumber:r.pullRequestNumber??void 0,githubRunId:r.githubRunId??void 0,stepCount:e.stepCount??void 0,failedStepIndex:e.failedStepIndex??void 0,durationMs:e.durationMs??void 0,flowYamlSizeBytes:e.flowYamlSizeBytes??void 0})});if(!i.ok){let m=await i.text().catch(()=>"");return console.warn(` warn: run registration failed: /api/sootsim/test-runs ${i.status}${m?`: ${m.slice(0,200)}`:""}`),null}let l=await i.json();return l.run?.id?{id:l.run.id,previewUrl:l.run.previewUrl??null,traceUrl:l.run.traceUrl??null}:(console.warn(" warn: run registration returned no id"),null)}catch(i){return console.warn(` warn: run registration failed: ${i instanceof Error?i.message:String(i)}`),null}}function Rt(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}function xt(e){let t=JSON.parse(M(e,"utf8"));if(!Array.isArray(t))throw new Error("snapshot manifest must be an array");let r=new Set;return t.map((s,o)=>{if(s===null||typeof s!="object")throw new Error(`snapshot manifest entry ${o} must be an object`);let i=Reflect.get(s,"id"),l=Reflect.get(s,"label"),m=Reflect.get(s,"path"),c=Reflect.get(s,"t");if(typeof i!="string"||!i||r.has(i))throw new Error(`snapshot manifest entry ${o} has an invalid or duplicate id`);if(typeof m!="string"||!m)throw new Error(`snapshot manifest entry ${o} has no PNG path`);if(typeof c!="number"||!Number.isFinite(c)||c<0)throw new Error(`snapshot manifest entry ${o} has an invalid capture time`);r.add(i);let h=M(m);return{meta:{id:i,label:typeof l=="string"&&l?l:i,kind:"interaction",t:Math.round(c),contentType:"image/png",sizeBytes:h.byteLength},bytes:h}})}var Ve=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://contrast.dev",We=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",ye="https://contrast.localhost:3000",kt=2e3;async function Et(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${ye}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(kt)});if(t.ok||t.status===204||t.status===405)return ye}catch{}return Ve}function N(e){return e.replace(/\/$/,"")}function Bt(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function It(e){try{let t=new URL(e).hostname.toLowerCase();return t==="contrast.dev"||t.endsWith(".contrast.dev")}catch{return!1}}function At(e,t){return t?N(t):process.env.SOOTSIM_PREVIEW_ORIGIN?N(process.env.SOOTSIM_PREVIEW_ORIGIN):Bt(e)?N(e):It(e)?N(We):N(e)}function Ut(){console.log(`
4
4
  sootsim record upload \u2014 publish the current recorded bundle as a /preview/<id> link
5
5