@capagents/forgeqe 2.4.7 → 2.4.8

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 (60) hide show
  1. package/HOW_TO_USE.md +5 -5
  2. package/dist/docs-site/docs/search.js +1 -1
  3. package/dist/docs-site/docs/web-app/index.html +20 -5
  4. package/dist/forgeqe.js +951 -951
  5. package/dist/web/assets/Agent-COwqDXqG.js +1 -0
  6. package/dist/web/assets/ApiTests-DXDWCYVP.js +2 -0
  7. package/dist/web/assets/Chat-D4j0iiCT.js +3 -0
  8. package/dist/web/assets/Data-CLQGBqYO.js +4 -0
  9. package/dist/web/assets/Features-DiA3wnqN.js +1 -0
  10. package/dist/web/assets/Jobs--r4q8NVv.js +3 -0
  11. package/dist/web/assets/Quality-Drs9CXKj.js +1 -0
  12. package/dist/web/assets/Record-d9QKksv8.js +1 -0
  13. package/dist/web/assets/Regression-DOqZepZc.js +2 -0
  14. package/dist/web/assets/Reports-Ba9lfMyQ.js +2 -0
  15. package/dist/web/assets/Response-BfwCLngt.js +8 -0
  16. package/dist/web/assets/Runs-CjPA01Rn.js +2 -0
  17. package/dist/web/assets/accessibility-BSaq_4Me.svg +1 -0
  18. package/dist/web/assets/architecture-DqdNWeJP.svg +1 -0
  19. package/dist/web/assets/{circle-dashed-CQKCycSk.js → circle-dashed-Beydn7Cq.js} +1 -1
  20. package/dist/web/assets/code-DP_IMakF.svg +1 -0
  21. package/dist/web/assets/container-BlSeU5Ng.svg +1 -0
  22. package/dist/web/assets/desktop-D9wpHyJe.svg +1 -0
  23. package/dist/web/assets/download-DnYUCinL.svg +1 -0
  24. package/dist/web/assets/{external-link-B45wnQ3R.js → external-link-BXwuemHF.js} +1 -1
  25. package/dist/web/assets/{file-chart-column-increasing-9rCBQxTk.js → file-chart-column-increasing-Cojvoj1H.js} +1 -1
  26. package/dist/web/assets/frame-9YY74_9h.js +3 -0
  27. package/dist/web/assets/index-DeACZos_.css +2 -0
  28. package/dist/web/assets/index-bN_xd12c.js +26 -0
  29. package/dist/web/assets/{markdown-BPBR6Fva.js → markdown-DWLq2XDl.js} +8 -8
  30. package/dist/web/assets/message-square-Bc8pM79i.js +1 -0
  31. package/dist/web/assets/mobile-CRD8AKgU.svg +1 -0
  32. package/dist/web/assets/plug-CWV9WI7K.svg +1 -0
  33. package/dist/web/assets/screenshot-DgZ3n28O.svg +1 -0
  34. package/dist/web/assets/shield-DrGhJtUn.svg +1 -0
  35. package/dist/web/assets/{sticky-note-D_lJfPYH.js → sticky-note-DJiszrzE.js} +1 -1
  36. package/dist/web/assets/stories-qti4IEm9.svg +1 -0
  37. package/dist/web/assets/terminal-BwR_yOmJ.js +1 -0
  38. package/dist/web/assets/terminal-CJd2e68O.svg +1 -0
  39. package/dist/web/assets/{trending-up-Bypj2D7Z.js → trending-up-5byphiAi.js} +1 -1
  40. package/dist/web/assets/visual-F39z3SE0.svg +1 -0
  41. package/dist/web/assets/wikis-B3RB0wBj.svg +1 -0
  42. package/dist/web/index.html +3 -3
  43. package/docs/WEB_APP.md +22 -5
  44. package/forgeqe.example.yaml +2 -0
  45. package/package.json +1 -1
  46. package/dist/web/assets/ApiTests-D5YLst-t.js +0 -2
  47. package/dist/web/assets/Chat-DUZawyA0.js +0 -3
  48. package/dist/web/assets/Data-BOu8BrmB.js +0 -4
  49. package/dist/web/assets/Features-BCBzUoB7.js +0 -1
  50. package/dist/web/assets/Jobs-C-Tqj504.js +0 -3
  51. package/dist/web/assets/Quality-CzCArgrj.js +0 -1
  52. package/dist/web/assets/Record-CcHMCfs6.js +0 -1
  53. package/dist/web/assets/Regression-CgiNh2hj.js +0 -2
  54. package/dist/web/assets/Reports-CXRY0udx.js +0 -2
  55. package/dist/web/assets/Response-VUbDhVeF.js +0 -8
  56. package/dist/web/assets/Runs-kghxBY8X.js +0 -2
  57. package/dist/web/assets/frame-CHQgOaj6.js +0 -3
  58. package/dist/web/assets/index-CwX6YH3i.css +0 -2
  59. package/dist/web/assets/index-Hd8gmpz5.js +0 -26
  60. package/dist/web/assets/terminal-BZSHVR9y.js +0 -1
@@ -0,0 +1 @@
1
+ import{_n as e}from"./frame-9YY74_9h.js";var t={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};t.node;var n=e(t);export{n as t};
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56 76" width="112" height="152" role="img" aria-label="mobile"><g><rect x="1" y="65" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><path d="M21 65L25 61L25 71L21 75Z" fill="#8e84ad"/><rect x="11" y="65" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="31" y="65" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><path d="M51 65L55 61L55 71L51 75Z" fill="#8e84ad"/><rect x="41" y="65" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="1" y="55" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="11" y="55" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="21" y="55" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="31" y="55" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><path d="M51 55L55 51L55 61L51 65Z" fill="#8e84ad"/><rect x="41" y="55" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="1" y="45" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="11" y="45" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><rect x="21" y="45" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><rect x="31" y="45" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><path d="M51 45L55 41L55 51L51 55Z" fill="#8e84ad"/><rect x="41" y="45" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="1" y="35" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="11" y="35" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><rect x="21" y="35" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><rect x="31" y="35" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><path d="M51 35L55 31L55 41L51 45Z" fill="#8e84ad"/><rect x="41" y="35" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="1" y="25" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="11" y="25" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><rect x="21" y="25" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><rect x="31" y="25" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><path d="M51 25L55 21L55 31L51 35Z" fill="#8e84ad"/><rect x="41" y="25" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="1" y="15" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><rect x="11" y="15" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><rect x="21" y="15" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><rect x="31" y="15" width="10" height="10" fill="#6a3fd6" stroke="#653ccb" stroke-width=".25"/></g><g><path d="M51 15L55 11L55 21L51 25Z" fill="#8e84ad"/><rect x="41" y="15" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><path d="M1 5L5 1L15 1L11 5Z" fill="#ddd4fa"/><rect x="1" y="5" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><path d="M11 5L15 1L25 1L21 5Z" fill="#ddd4fa"/><rect x="11" y="5" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><path d="M21 5L25 1L35 1L31 5Z" fill="#ddd4fa"/><rect x="21" y="5" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><path d="M31 5L35 1L45 1L41 5Z" fill="#ddd4fa"/><rect x="31" y="5" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g><g><path d="M41 5L45 1L55 1L51 5Z" fill="#ddd4fa"/><path d="M51 5L55 1L55 11L51 15Z" fill="#8e84ad"/><rect x="41" y="5" width="10" height="10" fill="#cbbdf7" stroke="#c1b4eb" stroke-width=".25"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 86" width="152" height="172" role="img" aria-label="plug"><g><path d="M41 75L45 71L45 81L41 85Z" fill="#ac8964"/><rect x="31" y="75" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M41 65L45 61L45 71L41 75Z" fill="#ac8964"/><rect x="31" y="65" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><rect x="11" y="55" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><rect x="21" y="55" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><rect x="31" y="55" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><rect x="41" y="55" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M61 55L65 51L65 61L61 65Z" fill="#ac8964"/><rect x="51" y="55" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><rect x="1" y="45" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><rect x="11" y="45" width="10" height="10" fill="#c9742a" stroke="#bf6e28" stroke-width=".25"/></g><g><rect x="21" y="45" width="10" height="10" fill="#c9742a" stroke="#bf6e28" stroke-width=".25"/></g><g><rect x="31" y="45" width="10" height="10" fill="#c9742a" stroke="#bf6e28" stroke-width=".25"/></g><g><rect x="41" y="45" width="10" height="10" fill="#c9742a" stroke="#bf6e28" stroke-width=".25"/></g><g><rect x="51" y="45" width="10" height="10" fill="#c9742a" stroke="#bf6e28" stroke-width=".25"/></g><g><path d="M71 45L75 41L75 51L71 55Z" fill="#ac8964"/><rect x="61" y="45" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><rect x="1" y="35" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><rect x="11" y="35" width="10" height="10" fill="#c9742a" stroke="#bf6e28" stroke-width=".25"/></g><g><rect x="21" y="35" width="10" height="10" fill="#c9742a" stroke="#bf6e28" stroke-width=".25"/></g><g><rect x="31" y="35" width="10" height="10" fill="#c9742a" stroke="#bf6e28" stroke-width=".25"/></g><g><rect x="41" y="35" width="10" height="10" fill="#c9742a" stroke="#bf6e28" stroke-width=".25"/></g><g><rect x="51" y="35" width="10" height="10" fill="#c9742a" stroke="#bf6e28" stroke-width=".25"/></g><g><path d="M71 35L75 31L75 41L71 45Z" fill="#ac8964"/><rect x="61" y="35" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M1 25L5 21L15 21L11 25Z" fill="#f9d9b6"/><rect x="1" y="25" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M11 25L15 21L25 21L21 25Z" fill="#f9d9b6"/><rect x="11" y="25" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><rect x="21" y="25" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M31 25L35 21L45 21L41 25Z" fill="#f9d9b6"/><rect x="31" y="25" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><rect x="41" y="25" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M51 25L55 21L65 21L61 25Z" fill="#f9d9b6"/><rect x="51" y="25" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M61 25L65 21L75 21L71 25Z" fill="#f9d9b6"/><path d="M71 25L75 21L75 31L71 35Z" fill="#ac8964"/><rect x="61" y="25" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M31 15L35 11L35 21L31 25Z" fill="#ac8964"/><rect x="21" y="15" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M51 15L55 11L55 21L51 25Z" fill="#ac8964"/><rect x="41" y="15" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M21 5L25 1L35 1L31 5Z" fill="#f9d9b6"/><path d="M31 5L35 1L35 11L31 15Z" fill="#ac8964"/><rect x="21" y="5" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g><g><path d="M41 5L45 1L55 1L51 5Z" fill="#f9d9b6"/><path d="M51 5L55 1L55 11L51 15Z" fill="#ac8964"/><rect x="41" y="5" width="10" height="10" fill="#f6c48f" stroke="#eaba88" stroke-width=".25"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 66" width="152" height="132" role="img" aria-label="screenshot"><g><rect x="1" y="55" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M11 55L15 51L25 51L21 55Z" fill="#bde6f3"/><rect x="11" y="55" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><rect x="21" y="55" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><rect x="31" y="55" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><rect x="41" y="55" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M51 55L55 51L65 51L61 55Z" fill="#bde6f3"/><rect x="51" y="55" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M71 55L75 51L75 61L71 65Z" fill="#6c98a5"/><rect x="61" y="55" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M11 45L15 41L15 51L11 55Z" fill="#6c98a5"/><rect x="1" y="45" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><rect x="21" y="45" width="10" height="10" fill="#1c8fb2" stroke="#1b88a9" stroke-width=".25"/></g><g><rect x="31" y="45" width="10" height="10" fill="#1c8fb2" stroke="#1b88a9" stroke-width=".25"/></g><g><path d="M51 45L55 41L55 51L51 55Z" fill="#14647d"/><rect x="41" y="45" width="10" height="10" fill="#1c8fb2" stroke="#1b88a9" stroke-width=".25"/></g><g><path d="M71 45L75 41L75 51L71 55Z" fill="#6c98a5"/><rect x="61" y="45" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M11 35L15 31L15 41L11 45Z" fill="#6c98a5"/><rect x="1" y="35" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><rect x="21" y="35" width="10" height="10" fill="#1c8fb2" stroke="#1b88a9" stroke-width=".25"/></g><g><rect x="31" y="35" width="10" height="10" fill="#1c8fb2" stroke="#1b88a9" stroke-width=".25"/></g><g><path d="M51 35L55 31L55 41L51 45Z" fill="#14647d"/><rect x="41" y="35" width="10" height="10" fill="#1c8fb2" stroke="#1b88a9" stroke-width=".25"/></g><g><path d="M71 35L75 31L75 41L71 45Z" fill="#6c98a5"/><rect x="61" y="35" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M11 25L15 21L15 31L11 35Z" fill="#6c98a5"/><rect x="1" y="25" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><rect x="21" y="25" width="10" height="10" fill="#1c8fb2" stroke="#1b88a9" stroke-width=".25"/></g><g><rect x="31" y="25" width="10" height="10" fill="#1c8fb2" stroke="#1b88a9" stroke-width=".25"/></g><g><path d="M51 25L55 21L55 31L51 35Z" fill="#14647d"/><rect x="41" y="25" width="10" height="10" fill="#1c8fb2" stroke="#1b88a9" stroke-width=".25"/></g><g><path d="M71 25L75 21L75 31L71 35Z" fill="#6c98a5"/><rect x="61" y="25" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M1 15L5 11L15 11L11 15Z" fill="#bde6f3"/><rect x="1" y="15" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M11 15L15 11L25 11L21 15Z" fill="#bde6f3"/><rect x="11" y="15" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><rect x="21" y="15" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M31 15L35 11L45 11L41 15Z" fill="#bde6f3"/><rect x="31" y="15" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M41 15L45 11L55 11L51 15Z" fill="#bde6f3"/><rect x="41" y="15" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M51 15L55 11L65 11L61 15Z" fill="#bde6f3"/><rect x="51" y="15" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M61 15L65 11L75 11L71 15Z" fill="#bde6f3"/><path d="M71 15L75 11L75 21L71 25Z" fill="#6c98a5"/><rect x="61" y="15" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g><g><path d="M21 5L25 1L35 1L31 5Z" fill="#bde6f3"/><path d="M31 5L35 1L35 11L31 15Z" fill="#6c98a5"/><rect x="21" y="5" width="10" height="10" fill="#9ad9ec" stroke="#92cee0" stroke-width=".25"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 76" width="152" height="152" role="img" aria-label="shield"><g><path d="M41 65L45 61L45 71L41 75Z" fill="#647fac"/><rect x="31" y="65" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><rect x="21" y="55" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><rect x="31" y="55" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M51 55L55 51L55 61L51 65Z" fill="#647fac"/><rect x="41" y="55" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><rect x="11" y="45" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><rect x="21" y="45" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="31" y="45" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="41" y="45" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M61 45L65 41L65 51L61 55Z" fill="#647fac"/><rect x="51" y="45" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><rect x="1" y="35" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><rect x="11" y="35" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="21" y="35" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="31" y="35" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="41" y="35" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="51" y="35" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M71 35L75 31L75 41L71 45Z" fill="#647fac"/><rect x="61" y="35" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><rect x="1" y="25" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><rect x="11" y="25" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="21" y="25" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="31" y="25" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="41" y="25" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="51" y="25" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M71 25L75 21L75 31L71 35Z" fill="#647fac"/><rect x="61" y="25" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><rect x="1" y="15" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><rect x="11" y="15" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="21" y="15" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="31" y="15" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="41" y="15" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="51" y="15" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M71 15L75 11L75 21L71 25Z" fill="#647fac"/><rect x="61" y="15" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><path d="M1 5L5 1L15 1L11 5Z" fill="#b6d0f8"/><rect x="1" y="5" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><path d="M11 5L15 1L25 1L21 5Z" fill="#b6d0f8"/><rect x="11" y="5" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><path d="M21 5L25 1L35 1L31 5Z" fill="#b6d0f8"/><rect x="21" y="5" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><path d="M31 5L35 1L45 1L41 5Z" fill="#b6d0f8"/><rect x="31" y="5" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><path d="M41 5L45 1L55 1L51 5Z" fill="#b6d0f8"/><rect x="41" y="5" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><path d="M51 5L55 1L65 1L61 5Z" fill="#b6d0f8"/><rect x="51" y="5" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g><g><path d="M61 5L65 1L75 1L71 5Z" fill="#b6d0f8"/><path d="M71 5L75 1L75 11L71 15Z" fill="#647fac"/><rect x="61" y="5" width="10" height="10" fill="#8fb6f5" stroke="#88ade9" stroke-width=".25"/></g></svg>
@@ -1 +1 @@
1
- import{_n as e}from"./frame-CHQgOaj6.js";var t={name:`sticky-note`,size:24,node:[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]};t.node;var n=e(t);export{n as t};
1
+ import{_n as e}from"./frame-9YY74_9h.js";var t={name:`sticky-note`,size:24,node:[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]};t.node;var n=e(t);export{n as t};
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 66 76" width="132" height="152" role="img" aria-label="stories"><g><rect x="1" y="65" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M11 65L15 61L25 61L21 65Z" fill="#d2e1f9"/><rect x="11" y="65" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M21 65L25 61L35 61L31 65Z" fill="#d2e1f9"/><rect x="21" y="65" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M31 65L35 61L45 61L41 65Z" fill="#d2e1f9"/><rect x="31" y="65" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M41 65L45 61L55 61L51 65Z" fill="#d2e1f9"/><rect x="41" y="65" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M61 65L65 61L65 71L61 75Z" fill="#8292ac"/><rect x="51" y="65" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M11 55L15 51L15 61L11 65Z" fill="#8292ac"/><rect x="1" y="55" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M61 55L65 51L65 61L61 65Z" fill="#8292ac"/><rect x="51" y="55" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><rect x="1" y="45" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M11 45L15 41L25 41L21 45Z" fill="#7fa6e0"/><rect x="11" y="45" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M21 45L25 41L35 41L31 45Z" fill="#7fa6e0"/><rect x="21" y="45" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M31 45L35 41L45 41L41 45Z" fill="#7fa6e0"/><rect x="31" y="45" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="41" y="45" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M61 45L65 41L65 51L61 55Z" fill="#8292ac"/><rect x="51" y="45" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M11 35L15 31L15 41L11 45Z" fill="#8292ac"/><rect x="1" y="35" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><rect x="41" y="35" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M61 35L65 31L65 41L61 45Z" fill="#8292ac"/><rect x="51" y="35" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><rect x="1" y="25" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><rect x="11" y="25" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="21" y="25" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="31" y="25" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="41" y="25" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M61 25L65 21L65 31L61 35Z" fill="#8292ac"/><rect x="51" y="25" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><rect x="1" y="15" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><rect x="11" y="15" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="21" y="15" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="31" y="15" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><rect x="41" y="15" width="10" height="10" fill="#3a76d0" stroke="#3770c6" stroke-width=".25"/></g><g><path d="M61 15L65 11L65 21L61 25Z" fill="#8292ac"/><rect x="51" y="15" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M1 5L5 1L15 1L11 5Z" fill="#d2e1f9"/><rect x="1" y="5" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M11 5L15 1L25 1L21 5Z" fill="#d2e1f9"/><rect x="11" y="5" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M21 5L25 1L35 1L31 5Z" fill="#d2e1f9"/><rect x="21" y="5" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M31 5L35 1L45 1L41 5Z" fill="#d2e1f9"/><rect x="31" y="5" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M41 5L45 1L55 1L51 5Z" fill="#d2e1f9"/><rect x="41" y="5" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g><g><path d="M51 5L55 1L65 1L61 5Z" fill="#d2e1f9"/><path d="M61 5L65 1L65 11L61 15Z" fill="#8292ac"/><rect x="51" y="5" width="10" height="10" fill="#b9d1f6" stroke="#b0c7ea" stroke-width=".25"/></g></svg>
@@ -0,0 +1 @@
1
+ import{_n as e}from"./frame-9YY74_9h.js";var t={name:`calendar-clock`,size:24,node:[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]};t.node;var n=e(t),r={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};r.node;var i=e(r);export{n,i as t};
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 76" width="192" height="152" role="img" aria-label="terminal"><g><rect x="1" y="65" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M11 65L15 61L25 61L21 65Z" fill="#79a9f6"/><rect x="11" y="65" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M21 65L25 61L35 61L31 65Z" fill="#79a9f6"/><rect x="21" y="65" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M31 65L35 61L45 61L41 65Z" fill="#79a9f6"/><rect x="31" y="65" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M41 65L45 61L55 61L51 65Z" fill="#79a9f6"/><rect x="41" y="65" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M51 65L55 61L65 61L61 65Z" fill="#79a9f6"/><rect x="51" y="65" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M61 65L65 61L75 61L71 65Z" fill="#79a9f6"/><rect x="61" y="65" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M71 65L75 61L85 61L81 65Z" fill="#79a9f6"/><rect x="71" y="65" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M91 65L95 61L95 71L91 75Z" fill="#5d7295"/><rect x="81" y="65" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M11 55L15 51L15 61L11 65Z" fill="#5d7295"/><rect x="1" y="55" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M91 55L95 51L95 61L91 65Z" fill="#5d7295"/><rect x="81" y="55" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M11 45L15 41L15 51L11 55Z" fill="#5d7295"/><rect x="1" y="45" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M21 45L25 41L35 41L31 45Z" fill="#79a9f6"/><path d="M31 45L35 41L35 51L31 55Z" fill="#5d7295"/><rect x="21" y="45" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M51 45L55 41L65 41L61 45Z" fill="#79a9f6"/><rect x="51" y="45" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M61 45L65 41L75 41L71 45Z" fill="#79a9f6"/><path d="M71 45L75 41L75 51L71 55Z" fill="#5d7295"/><rect x="61" y="45" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M91 45L95 41L95 51L91 55Z" fill="#5d7295"/><rect x="81" y="45" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M11 35L15 31L15 41L11 45Z" fill="#5d7295"/><rect x="1" y="35" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M31 35L35 31L45 31L41 35Z" fill="#79a9f6"/><path d="M41 35L45 31L45 41L41 45Z" fill="#5d7295"/><rect x="31" y="35" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M91 35L95 31L95 41L91 45Z" fill="#5d7295"/><rect x="81" y="35" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M11 25L15 21L15 31L11 35Z" fill="#5d7295"/><rect x="1" y="25" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M31 25L35 21L35 31L31 35Z" fill="#5d7295"/><rect x="21" y="25" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M91 25L95 21L95 31L91 35Z" fill="#5d7295"/><rect x="81" y="25" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><rect x="1" y="15" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><rect x="11" y="15" width="10" height="10" fill="#1f5bb6" stroke="#2358a7" stroke-width=".25"/></g><g><rect x="21" y="15" width="10" height="10" fill="#1f5bb6" stroke="#2358a7" stroke-width=".25"/></g><g><rect x="31" y="15" width="10" height="10" fill="#1f5bb6" stroke="#2358a7" stroke-width=".25"/></g><g><rect x="41" y="15" width="10" height="10" fill="#1f5bb6" stroke="#2358a7" stroke-width=".25"/></g><g><rect x="51" y="15" width="10" height="10" fill="#1f5bb6" stroke="#2358a7" stroke-width=".25"/></g><g><rect x="61" y="15" width="10" height="10" fill="#1f5bb6" stroke="#2358a7" stroke-width=".25"/></g><g><rect x="71" y="15" width="10" height="10" fill="#1f5bb6" stroke="#2358a7" stroke-width=".25"/></g><g><path d="M91 15L95 11L95 21L91 25Z" fill="#5d7295"/><rect x="81" y="15" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M1 5L5 1L15 1L11 5Z" fill="#79a9f6"/><rect x="1" y="5" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M11 5L15 1L25 1L21 5Z" fill="#79a9f6"/><rect x="11" y="5" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M21 5L25 1L35 1L31 5Z" fill="#79a9f6"/><rect x="21" y="5" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M31 5L35 1L45 1L41 5Z" fill="#79a9f6"/><rect x="31" y="5" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M41 5L45 1L55 1L51 5Z" fill="#79a9f6"/><rect x="41" y="5" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M51 5L55 1L65 1L61 5Z" fill="#79a9f6"/><rect x="51" y="5" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M61 5L65 1L75 1L71 5Z" fill="#79a9f6"/><rect x="61" y="5" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M71 5L75 1L85 1L81 5Z" fill="#79a9f6"/><rect x="71" y="5" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g><g><path d="M81 5L85 1L95 1L91 5Z" fill="#79a9f6"/><path d="M91 5L95 1L95 11L91 15Z" fill="#5d7295"/><rect x="81" y="5" width="10" height="10" fill="#639df6" stroke="#6797e1" stroke-width=".25"/></g></svg>
@@ -1 +1 @@
1
- import{_n as e}from"./frame-CHQgOaj6.js";var t={name:`trending-down`,size:24,node:[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]};t.node;var n=e(t),r={name:`trending-up`,size:24,node:[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]};r.node;var i=e(r);export{n,i as t};
1
+ import{_n as e}from"./frame-9YY74_9h.js";var t={name:`trending-down`,size:24,node:[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]};t.node;var n=e(t),r={name:`trending-up`,size:24,node:[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]};r.node;var i=e(r);export{n,i as t};
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 76" width="152" height="152" role="img" aria-label="visual"><g><rect x="21" y="65" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="31" y="65" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><path d="M51 65L55 61L55 71L51 75Z" fill="#a36c93"/><rect x="41" y="65" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="11" y="55" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="21" y="55" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="31" y="55" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="41" y="55" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><path d="M61 55L65 51L65 61L61 65Z" fill="#a36c93"/><rect x="51" y="55" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="1" y="45" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="11" y="45" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="21" y="45" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="31" y="45" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="41" y="45" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="51" y="45" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><path d="M71 45L75 41L75 51L71 55Z" fill="#a36c93"/><rect x="61" y="45" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="1" y="35" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="11" y="35" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="21" y="35" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="31" y="35" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="41" y="35" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="51" y="35" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><path d="M71 35L75 31L75 41L71 45Z" fill="#a36c93"/><rect x="61" y="35" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><path d="M1 25L5 21L15 21L11 25Z" fill="#f1bde2"/><rect x="1" y="25" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="11" y="25" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="21" y="25" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="31" y="25" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="41" y="25" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="51" y="25" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><path d="M61 25L65 21L75 21L71 25Z" fill="#f1bde2"/><path d="M71 25L75 21L75 31L71 35Z" fill="#a36c93"/><rect x="61" y="25" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><path d="M11 15L15 11L25 11L21 15Z" fill="#f1bde2"/><rect x="11" y="15" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="21" y="15" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><rect x="31" y="15" width="10" height="10" fill="#a8287d" stroke="#a02677" stroke-width=".25"/></g><g><rect x="41" y="15" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><path d="M51 15L55 11L65 11L61 15Z" fill="#f1bde2"/><path d="M61 15L65 11L65 21L61 25Z" fill="#a36c93"/><rect x="51" y="15" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><path d="M21 5L25 1L35 1L31 5Z" fill="#f1bde2"/><rect x="21" y="5" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><path d="M31 5L35 1L45 1L41 5Z" fill="#f1bde2"/><rect x="31" y="5" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g><g><path d="M41 5L45 1L55 1L51 5Z" fill="#f1bde2"/><path d="M51 5L55 1L55 11L51 15Z" fill="#a36c93"/><rect x="41" y="5" width="10" height="10" fill="#e99ad2" stroke="#dd92c8" stroke-width=".25"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 76" width="152" height="152" role="img" aria-label="wikis"><g><rect x="1" y="65" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><path d="M21 65L25 61L25 71L21 75Z" fill="#a2916d"/><rect x="11" y="65" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="51" y="65" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><path d="M71 65L75 61L75 71L71 75Z" fill="#a2916d"/><rect x="61" y="65" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="1" y="55" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="11" y="55" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><rect x="21" y="55" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="31" y="55" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><rect x="41" y="55" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="51" y="55" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><path d="M71 55L75 51L75 61L71 65Z" fill="#a2916d"/><rect x="61" y="55" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="1" y="45" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="11" y="45" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><rect x="21" y="45" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="31" y="45" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><rect x="41" y="45" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="51" y="45" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><path d="M71 45L75 41L75 51L71 55Z" fill="#a2916d"/><rect x="61" y="45" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="1" y="35" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="11" y="35" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><rect x="21" y="35" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="31" y="35" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><rect x="41" y="35" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="51" y="35" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><path d="M71 35L75 31L75 41L71 45Z" fill="#a2916d"/><rect x="61" y="35" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="1" y="25" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="11" y="25" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><rect x="21" y="25" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="31" y="25" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><rect x="41" y="25" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="51" y="25" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><path d="M71 25L75 21L75 31L71 35Z" fill="#a2916d"/><rect x="61" y="25" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="1" y="15" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="11" y="15" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><path d="M21 15L25 11L35 11L31 15Z" fill="#f0e0bf"/><rect x="21" y="15" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><path d="M31 15L35 11L45 11L41 15Z" fill="#d9b375"/><rect x="31" y="15" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><path d="M41 15L45 11L55 11L51 15Z" fill="#f0e0bf"/><rect x="41" y="15" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><rect x="51" y="15" width="10" height="10" fill="#c48a2a" stroke="#ba8328" stroke-width=".25"/></g><g><path d="M71 15L75 11L75 21L71 25Z" fill="#a2916d"/><rect x="61" y="15" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><path d="M1 5L5 1L15 1L11 5Z" fill="#f0e0bf"/><rect x="1" y="5" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><path d="M11 5L15 1L25 1L21 5Z" fill="#f0e0bf"/><path d="M21 5L25 1L25 11L21 15Z" fill="#a2916d"/><rect x="11" y="5" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><path d="M51 5L55 1L65 1L61 5Z" fill="#f0e0bf"/><rect x="51" y="5" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g><g><path d="M61 5L65 1L75 1L71 5Z" fill="#f0e0bf"/><path d="M71 5L75 1L75 11L71 15Z" fill="#a2916d"/><rect x="61" y="5" width="10" height="10" fill="#e8cf9c" stroke="#dcc594" stroke-width=".25"/></g></svg>
@@ -5,9 +5,9 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta name="referrer" content="no-referrer" />
7
7
  <title>ForgeQE</title>
8
- <script type="module" crossorigin src="/assets/index-Hd8gmpz5.js"></script>
9
- <link rel="modulepreload" crossorigin href="/assets/frame-CHQgOaj6.js">
10
- <link rel="stylesheet" crossorigin href="/assets/index-CwX6YH3i.css">
8
+ <script type="module" crossorigin src="/assets/index-bN_xd12c.js"></script>
9
+ <link rel="modulepreload" crossorigin href="/assets/frame-9YY74_9h.js">
10
+ <link rel="stylesheet" crossorigin href="/assets/index-DeACZos_.css">
11
11
  </head>
12
12
  <body>
13
13
  <div id="root"></div>
package/docs/WEB_APP.md CHANGED
@@ -48,9 +48,12 @@ files: each person's are in their own credential store.
48
48
 
49
49
  ## The layout
50
50
 
51
- - **The sidebar, on the left.** New chat; **Work**: Home, Record, Regression, API tests, Quality, Data, Runs, Reports,
52
- Jobs; **Agents**: Knowledge, Memory, Guardrails, Skills, Prompts, What's ready; the recent chats with All chats; Help
53
- (the docs, the same pages as forgeqe.github.io/docs/ with the architecture map, served by ForgeQE itself, so they work
51
+ - **The sidebar, on the left.** New chat (opens Home, where a chat starts; earlier chats are in Runs); **Test**: Record, Regression, API tests, Quality, Data; **Agents**:
52
+ a page for each of ForgeQE's agents (Orchestrator, Browser, Exploration, Planning, Coding, Search, Healing, API, API
53
+ planning, Review, PR review, Root-cause, Refine, Evaluation, Model-rating, and the Research and Helper agents the
54
+ others call), in categories that fold on their own: Lead, Browser, Test code, API, Review and diagnosis, Support; **Results**: Runs, Reports, Jobs; **Context** (what the agents know and follow):
55
+ Knowledge, Memory, Guardrails, Skills, Prompts. Each group folds from its title (Agents starts folded), and the
56
+ group of the page you are on stays open; and at the bottom What's ready, Help (the docs, the same pages as forgeqe.github.io/docs/ with the architecture map, served by ForgeQE itself, so they work
54
57
  offline) and Settings. It closes to a narrow rail of its icons (each named when you point at it), with the small logo
55
58
  on top, to give the page the width; on a phone it is a drawer.
56
59
  - **The workspace panel, on the right.** The project, its repository and branch, and the test environment; the context
@@ -65,6 +68,20 @@ files: each person's are in their own credential store.
65
68
  Home is one box: say what to test, in your words. Under it, suggestions (Run test cases, Explore a journey, Write a
66
69
  test, Review requirements) fill the box with an example; they do not send.
67
70
 
71
+ **An agent's page** (Agents, in the sidebar) is the same box with the agent's icon, its name and what it does on
72
+ top, suggestions of its own, **Tools it can use** (its own tools with what its permissions take away, and each tool
73
+ server its session gets: the live browser, the code map, databases, ForgeQE's tools, and for the Orchestrator agent
74
+ every capability and your systems' MCP servers; a group it cannot use here says why), **Connected to** (the test
75
+ repository, databases, test environments and systems it reaches), its instructions (the prompt it starts from,
76
+ changed in Prompts) and its recent runs. A request sent from there goes to the Orchestrator agent with the agent's
77
+ name before it, so it is handed on.
78
+
79
+ Every page and agent in the sidebar has one kind of icon, ForgeQE's 3D pixel icons; a page's is never an agent's.
80
+ **Sidebar icons** in Appearance says how they sit on the sidebar's colour: **Auto** measures every icon against it
81
+ and keeps them as they are when each stands out (2:1), or puts them all on tiles in a tint of the sidebar when the
82
+ colour hides any; or a brand chooses one look: Plain, On tiles, Outlined, or One colour (the icons' shapes in the
83
+ sidebar's text colour). The row previews the look and names the icons that fade.
84
+
68
85
  In the box:
69
86
 
70
87
  - **Tools**: whether this chat writes the test into the repository and shows the browser, and what comes from the
@@ -77,7 +94,7 @@ In the box:
77
94
  A reply shows the work as it happens:
78
95
 
79
96
  - **The plan** as a chain: what is done (a tick), what is being worked on now, and what is next.
80
- - **The agents**: each step under the agent doing it (ForgeQE's agent, the browser agent, Scribe), and each handoff
97
+ - **The agents**: each step under the agent doing it (the Orchestrator agent, the Browser agent, the Coding agent), and each handoff
81
98
  from one to another.
82
99
  - **The latest activity**, live, with the full log a click away.
83
100
  - **The result**: each test with its status, file and the command to run it; reports as links; every file changed with
@@ -88,7 +105,7 @@ A reply shows the work as it happens:
88
105
  **Stop** ends the work in progress. While the agent works the page follows the latest step; scroll up and it stops
89
106
  following, and **Latest activity** takes you back.
90
107
 
91
- **All chats** lists every chat since `forgeqe web` started, newest first, grouped by day: Working, Needs you, Your turn
108
+ **All chats** (`#/chats`, and each web chat from Runs) lists every chat since `forgeqe web` started, newest first, grouped by day: Working, Needs you, Your turn
92
109
  and Ended as filters, a search, and 50 at a time.
93
110
 
94
111
  ## The pages
@@ -150,6 +150,8 @@ prompts:
150
150
  # logo: ./brand/logo.svg # PNG, JPEG, WebP or SVG in the project, at most 512 KB
151
151
  # logo_mark: ./brand/mark.svg # a square or round logo for the narrow sidebar; else a square logo, or the first letter
152
152
  # logo_frame: plain # plain (as it is) | rounded | circle | tile (on a white tile, for a dark logo)
153
+ # icon_style: auto # auto | plain | tiles | outline | mono: the sidebar's icons on its colour; auto
154
+ # # measures them and puts them on tiles when the colour hides one
153
155
  # logo_size: standard # standard | large (a wide logo across the sidebar's top, for one with small words)
154
156
  # primary: "#0b1f3a" # the sidebar; its text turns white on a dark colour
155
157
  # gradient: "#1d4ed8" # a second sidebar colour it fades into, top to bottom
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capagents/forgeqe",
3
- "version": "2.4.7",
3
+ "version": "2.4.8",
4
4
  "description": "ForgeQE: a browser agent CLI that runs goals and test cases in local Chrome or Chromium, or BrowserStack and TestMu AI/LambdaTest when configured, and turns passing runs into tests in your repo",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -1,2 +0,0 @@
1
- import{Cn as e,Dt as t,G as n,Gn as r,H as i,Hn as a,K as o,Sn as s,U as c,at as l,ct as u,ft as d,ht as f,it as p,lt as m,nn as h,nt as g,q as _,r as v,rt as y,st as b,t as x,tt as S}from"./frame-CHQgOaj6.js";import{t as C}from"./circle-dashed-CQKCycSk.js";import"./markdown-BPBR6Fva.js";import{D as w,O as T,_ as E,g as D,j as O,n as k,r as A,s as j,t as M}from"./index-Hd8gmpz5.js";import{t as N}from"./when-CHnpLdYw.js";var P=r(a(),1),F=b(),I={passed:`pass`,failed:`fail`,error:`fail`,skipped:`neutral`},L={GET:`text-pass`,POST:`text-accent-fg`,PUT:`text-warn`,PATCH:`text-warn`,DELETE:`text-fail`},ee={run:`a browser run's calls`,openapi:`OpenAPI`,swagger:`Swagger`,wsdl:`WSDL`,graphql:`GraphQL`,proto:`.proto`,case:`a test case`,text:`a description`},R=e=>new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function z({job:e,onStop:t}){let n=(0,P.useRef)(null);(0,P.useEffect)(()=>{n.current&&(n.current.scrollTop=n.current.scrollHeight)},[e.lines.length]);let[r,i]={contracts:[`Making contracts`,`Made contracts`],run:[`Running the contracts`,`Ran the contracts`],scenarios:[`Making scenarios`,`Made scenarios`],"run-scenarios":[`Running the scenarios`,`Ran the scenarios`]}[e.kind]??[`Working`,`Done`],a=(e.kind===`run`||e.kind===`run-scenarios`)&&e.exitCode===1;return(0,F.jsxs)(`section`,{"aria-label":e.running?r:i,className:`flex flex-col gap-2 rounded-[14px] border border-line-soft p-4`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,F.jsx)(`span`,{className:`flex-1 font-medium`,children:e.running?r:i}),(0,F.jsx)(j,{orb:e.kind===`contracts`?`handing`:e.kind===`scenarios`?`writing`:`working`,tone:e.running?`running`:e.exitCode===0?`pass`:a?`warn`:`fail`,children:e.running?`Working`:e.exitCode===0?`Done`:a?`Some failed`:`Did not finish`}),e.running&&(0,F.jsxs)(l,{onClick:t,className:`border-fail text-fail hover:bg-fail-soft`,children:[(0,F.jsx)(f,{size:14,fill:`currentColor`,"aria-hidden":`true`}),`Stop`]})]}),(0,F.jsx)(`code`,{className:`font-mono text-[12px] text-muted [overflow-wrap:anywhere]`,children:e.command}),(0,F.jsxs)(`details`,{open:e.running,children:[(0,F.jsxs)(`summary`,{className:`cursor-pointer text-sm text-muted`,children:[`Output (`,e.lines.length,` lines)`]}),(0,F.jsx)(`pre`,{ref:n,className:`mt-2 max-h-[300px] overflow-auto rounded-[10px] bg-surface-muted p-3 font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-ink-2`,children:e.lines.join(`
2
- `)||`Starting…`})]})]})}var B=({m:e})=>(0,F.jsx)(`span`,{className:u(`w-[58px] flex-none font-mono text-[12px] font-semibold`,L[e.toUpperCase()]||`text-ink-2`),children:e.toUpperCase()});function te({c:e,r:t}){let n=Array.isArray(e.expect.status)?e.expect.status.join(` or `):e.expect.status,r=t&&t.status!==`passed`?[t.reason,...t.checks.filter(e=>!e.ok).map(e=>`${e.name}${e.detail?`: ${e.detail}`:``}`)].filter(Boolean).join(` · `):``;return(0,F.jsxs)(`li`,{className:`grid min-h-11 grid-cols-[58px_minmax(0,1fr)_auto] items-center gap-x-3 rounded-[10px] px-3 py-1.5 hover:bg-surface-muted @3xl:grid-cols-[58px_minmax(0,1fr)_200px_auto]`,children:[(0,F.jsx)(B,{m:e.method}),(0,F.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,F.jsx)(`span`,{className:`truncate font-mono text-[13px]`,title:e.protocol===`rest`?e.path:e.name,children:e.protocol===`rest`?e.path:e.name}),r?(0,F.jsx)(`span`,{className:u(`truncate text-[12px]`,t?.status===`skipped`?`text-muted`:`text-fail`),title:r,children:r}):(e.writes||e.needsData?.length)&&(0,F.jsx)(`span`,{className:`truncate text-[12px] text-warn`,children:[e.writes?`Changes data`:``,e.needsData?.length?`Needs real ${e.needsData.join(`, `)}`:``].filter(Boolean).join(` · `)})]}),(0,F.jsx)(`span`,{className:`hidden truncate text-[12px] text-muted @3xl:block`,children:[n?`expects ${n}`:``,e.expect.contentType,e.auth?`${e.auth.type} auth`:``].filter(Boolean).join(` · `)}),(0,F.jsx)(`span`,{className:`flex justify-end`,children:t?(0,F.jsx)(j,{tone:I[t.status],children:t.status===`skipped`?`Skipped`:t.httpStatus?`${t.httpStatus}`:t.status}):(0,F.jsx)(`span`,{className:`text-[12px] text-muted`,children:`Not run`})})]})}function ne({s:e,r:t}){let[n,r]=(0,P.useState)(!1);return(0,F.jsxs)(`li`,{className:`border-t border-line-soft first:border-t-0`,children:[(0,F.jsxs)(`button`,{type:`button`,"aria-expanded":n,onClick:()=>r(!n),className:`flex min-h-[52px] w-full cursor-pointer items-center gap-3 border-0 bg-transparent px-1 py-2 text-left text-ink hover:bg-surface-muted`,children:[(0,F.jsx)(D,{size:16,"aria-hidden":`true`,className:`flex-none text-muted`}),(0,F.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,F.jsx)(`span`,{className:`text-sm [overflow-wrap:anywhere]`,children:e.name}),(0,F.jsxs)(`span`,{className:`truncate text-[12px] text-muted`,children:[e.kind,` · `,e.steps.length,` step`,e.steps.length===1?``:`s`,e.cleanup?.length?` · ${e.cleanup.length} cleanup`:``,e.caseId?` · ${e.caseId}`:``]})]}),e.writes&&(0,F.jsx)(j,{tone:`warn`,children:`Changes data`}),t&&(0,F.jsx)(j,{tone:I[t.status],children:t.status.charAt(0).toUpperCase()+t.status.slice(1)})]}),(0,F.jsx)(y,{open:n,children:(0,F.jsxs)(`ol`,{className:`m-0 mb-3 ml-8 flex list-none flex-col gap-1 border-l border-line pl-3 text-sm`,children:[e.steps.map((e,n)=>{let r=t?.steps[n];return(0,F.jsxs)(`li`,{className:`flex flex-col`,children:[(0,F.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,F.jsx)(B,{m:e.method}),(0,F.jsx)(`span`,{className:`min-w-0 flex-1 font-mono text-[12px] [overflow-wrap:anywhere]`,children:e.path}),r&&(0,F.jsx)(j,{tone:I[r.status],children:r.httpStatus?String(r.httpStatus):r.status})]}),(0,F.jsxs)(`span`,{className:`pl-[66px] text-[12px] text-muted`,children:[e.name,e.save&&Object.keys(e.save).length?` · keeps ${Object.keys(e.save).join(`, `)}`:``,e.noAuth?` · without credentials`:``]}),r&&r.checks.some(e=>!e.ok)&&(0,F.jsx)(`span`,{className:`pl-[66px] text-[12px] text-fail`,children:r.checks.filter(e=>!e.ok).map(e=>`${e.name}${e.detail?`: ${e.detail}`:``}`).join(` · `)})]},n)}),e.cleanup?.map((e,t)=>(0,F.jsxs)(`li`,{className:`flex items-center gap-2 text-muted`,children:[(0,F.jsx)(B,{m:e.method}),(0,F.jsx)(`span`,{className:`font-mono text-[12px]`,children:e.path}),(0,F.jsx)(`span`,{className:`text-[12px]`,children:`cleanup`})]},`c${t}`)),t?.reason&&(0,F.jsx)(`li`,{className:`text-[12px] text-fail [overflow-wrap:anywhere]`,children:t.reason})]})})]})}function V({what:e,writes:n,defaultUrl:r,onRun:a,onCancel:o,needsData:s}){let[c,u]=(0,P.useState)(r),[d,f]=(0,P.useState)(!1),[p,m]=(0,P.useState)(!1);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-[12px] border border-accent-line bg-accent-soft p-4`,children:[(0,F.jsx)(`span`,{className:`font-medium`,children:e}),(0,F.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm`,children:[`Against`,(0,F.jsx)(i,{value:c,spellCheck:!1,placeholder:`https://qa.example.com/api`,onChange:e=>u(e.target.value),className:`max-w-[480px] bg-bg`})]}),n>0&&(0,F.jsxs)(`span`,{className:`flex items-start gap-3 text-sm`,children:[(0,F.jsx)(S,{checked:d,onChange:f,label:`Also run the calls that change data`}),(0,F.jsxs)(`span`,{className:`flex flex-col`,children:[`Also run the `,n,` call`,n===1?``:`s`,` that change data`,(0,F.jsx)(`span`,{className:`text-[13px] text-warn`,children:`Only on a test environment: they create, change or delete data there.`})]})]}),s?(0,F.jsxs)(`span`,{className:`flex items-center gap-3 text-sm`,children:[(0,F.jsx)(S,{checked:p,onChange:m,label:`Also run calls with made-up values`}),`Also run the `,s,` call`,s===1?``:`s`,` whose values were made up`]}):null,(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,F.jsxs)(l,{variant:`primary`,onClick:()=>a({...c.trim()?{baseUrl:c.trim()}:{},allowWrites:d,includeNeedsData:p}),children:[(0,F.jsx)(t,{size:16,"aria-hidden":`true`}),`Run`]}),(0,F.jsx)(l,{onClick:o,children:`Don't run`})]})]})}function re({open:e,onClose:t,view:r,set:a,onMake:o,busy:s}){let[d,f]=(0,P.useState)(`spec`),[p,h]=(0,P.useState)(``),[g,_]=(0,P.useState)(``),[v,y]=(0,P.useState)(``),[b,x]=(0,P.useState)(!0);(0,P.useEffect)(()=>{e&&(f(a.source.kind===`run`?`run`:`spec`),h(a.source.kind===`run`?``:r.runs[0]?.id??``))},[e,a.source.kind,r.runs]);let C=(e,t,n)=>(0,F.jsxs)(`label`,{className:u(`flex cursor-pointer items-start gap-3 rounded-[12px] border px-3 py-2.5`,d===e?`border-accent bg-accent-soft`:`border-line-soft hover:bg-surface-muted`),children:[(0,F.jsx)(`input`,{type:`radio`,name:`sc-from`,checked:d===e,onChange:()=>f(e),className:`mt-1 size-4 accent-accent`}),(0,F.jsxs)(`span`,{className:`flex flex-col`,children:[(0,F.jsx)(`span`,{className:`text-sm font-medium`,children:t}),(0,F.jsx)(`span`,{className:`text-[13px] text-muted`,children:n})]})]});return(0,F.jsx)(n,{open:e,onClose:t,title:`Make scenarios`,description:`API calls in order, where later calls use values earlier answers gave, added to ${a.name}. Nothing runs until you run them.`,footer:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(l,{onClick:t,children:`Cancel`}),(0,F.jsx)(l,{variant:`primary`,disabled:s||d===`cases`&&!g.trim()||d===`text`&&!v.trim(),onClick:()=>o({from:d,...d===`run`&&p?{run:p}:{},...d===`cases`?{cases:g}:{},...d===`text`?{text:v}:{},...d===`spec`?{negative:b}:{}}),children:`Make scenarios`})]}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 pt-3`,children:[C(`spec`,`From the API description`,`Each resource's lifecycle, browsing, the description's links, and negative cases (no model)`),d===`spec`&&(0,F.jsxs)(`span`,{className:`flex items-center gap-2 pl-10 text-sm`,children:[(0,F.jsx)(S,{checked:b,onChange:x,label:`Negative cases`}),` Negative cases: an id that does not exist, no credentials, an empty body`]}),C(`run`,`From a browser run`,`The calls the application made, in order, with the values passed on (no model)`),d===`run`&&(0,F.jsxs)(c,{"aria-label":`Browser run`,value:p,onChange:e=>h(e.target.value),className:`ml-10 max-w-[440px]`,children:[(0,F.jsx)(`option`,{value:``,children:`The latest run`}),r.runs.map(e=>(0,F.jsxs)(`option`,{value:e.id,children:[e.goal,` · `,m(e.calls,`call`),` · `,R(e.at)]},e.id))]}),C(`cases`,`From test cases`,`One scenario per case, planned by the model against the set's operations`),d===`cases`&&(0,F.jsx)(i,{"aria-label":`Test cases`,value:g,spellCheck:!1,placeholder:`ado:2238, jira:SHOP-12`,onChange:e=>_(e.target.value),className:`ml-10 max-w-[440px]`}),C(`text`,`From a description`,`In plain words, planned by the model; a step no operation does is listed, never invented`),d===`text`&&(0,F.jsx)(i,{"aria-label":`The scenario`,value:v,maxLength:1e3,placeholder:`Create a user, log in, add two items, check out, the total is the sum`,onChange:e=>y(e.target.value),className:`ml-10`})]})})}function H({open:e,onClose:t,view:r,onMake:a,busy:o}){let[s,u]=(0,P.useState)(`spec`),[d,f]=(0,P.useState)(``),[p,h]=(0,P.useState)(``),[g,_]=(0,P.useState)(``),[v,y]=(0,P.useState)(``);return(0,P.useEffect)(()=>{e&&(f(r.specs[0]??``),h(``),_(``),y(r.baseUrl??``),u(r.specs.length||!r.runs.length?`spec`:`run`))},[e,r]),(0,F.jsx)(n,{open:e,onClose:t,title:`New contract set`,description:`One contract per operation: an example call and what its answer must have (status, content type, schema, key fields). Making them runs nothing.`,footer:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(l,{onClick:t,children:`Cancel`}),(0,F.jsx)(l,{variant:`primary`,disabled:o||s===`spec`&&!d.trim(),onClick:()=>a({from:s,...s===`spec`?{spec:d.trim()}:p?{run:p}:{},...g.trim()?{name:g.trim()}:{},...v.trim()?{baseUrl:v.trim()}:{}}),children:`Make contracts`})]}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 pt-3`,children:[(0,F.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2 border-0 p-0`,children:[(0,F.jsx)(`legend`,{className:`mb-1.5 text-sm font-medium`,children:`From`}),(0,F.jsxs)(`label`,{className:`flex min-h-9 cursor-pointer items-center gap-2 text-sm`,children:[(0,F.jsx)(`input`,{type:`radio`,name:`set-from`,checked:s===`spec`,onChange:()=>u(`spec`),className:`size-4 accent-accent`}),`An API description: OpenAPI or Swagger, WSDL, GraphQL, .proto, or grpc://`]}),s===`spec`&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5 pl-6`,children:[(0,F.jsx)(i,{"aria-label":`API description`,value:d,spellCheck:!1,list:`spec-files`,placeholder:`https://shop.test/openapi.json, or a file in the project`,onChange:e=>f(e.target.value)}),(0,F.jsx)(`datalist`,{id:`spec-files`,children:r.specs.map(e=>(0,F.jsx)(`option`,{value:e},e))}),r.specs.length>0&&(0,F.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[`In this project: `,r.specs.slice(0,6).join(`, `)]})]}),(0,F.jsxs)(`label`,{className:`flex min-h-9 cursor-pointer items-center gap-2 text-sm`,children:[(0,F.jsx)(`input`,{type:`radio`,name:`set-from`,checked:s===`run`,onChange:()=>u(`run`),className:`size-4 accent-accent`}),`The calls a browser run saw the application make`]}),s===`run`&&(0,F.jsxs)(c,{"aria-label":`Browser run`,value:p,onChange:e=>h(e.target.value),className:`ml-6 max-w-[440px]`,children:[(0,F.jsx)(`option`,{value:``,children:`The latest run`}),r.runs.map(e=>(0,F.jsxs)(`option`,{value:e.id,children:[e.goal,` · `,m(e.calls,`call`),` · `,R(e.at)]},e.id))]})]}),(0,F.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm font-medium`,children:[`Name`,(0,F.jsx)(i,{value:g,maxLength:120,placeholder:`Petstore`,onChange:e=>_(e.target.value)})]}),(0,F.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm font-medium`,children:[`Base URL`,(0,F.jsx)(i,{value:v,spellCheck:!1,placeholder:`https://qa.shop.test/api`,onChange:e=>y(e.target.value)}),(0,F.jsxs)(`span`,{className:`text-[13px] font-normal text-muted`,children:[`Where the contracts run when not where they were recorded or described.`,r.headers.length?` Each call sends ${r.headers.join(`, `)} from api.headers in forgeqe.yaml.`:` Credentials go in api.headers in forgeqe.yaml, as references to environment variables.`]})]})]})})}var U=50,ie=e=>e.length>48?`…/${e.split(/[\\/]/).filter(Boolean).slice(-2).join(`/`)}`:e;function W({label:e,last:t,onOpen:n}){if(!t)return(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[13px] text-muted`,children:[(0,F.jsx)(C,{size:14,"aria-hidden":`true`}),e,`: not run yet`]});let r=t.counts.failed+t.counts.error,i=t.counts.passed+r;return(0,F.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-x-1.5 text-[13px] text-ink-2`,children:[r?(0,F.jsx)(h,{size:14,"aria-label":`Failures`,className:`text-fail`}):(0,F.jsx)(O,{size:14,"aria-label":`Passed`,className:`text-pass`}),e,`:`,` `,(0,F.jsxs)(`b`,{className:u(`tabular-nums`,r?`text-fail`:`text-ink`),children:[t.counts.passed,`/`,i,` passed`]}),t.counts.skipped?(0,F.jsxs)(`span`,{className:`text-muted`,children:[`· `,t.counts.skipped,` skipped`]}):null,(0,F.jsxs)(`span`,{className:`text-muted`,children:[`· `,N(t.at)]}),t.report&&(0,F.jsx)(`button`,{type:`button`,onClick:()=>n(t.report),className:`cursor-pointer border-0 bg-transparent p-0 text-[13px] text-accent-fg hover:underline`,children:`· Report`})]})}function G({id:n,view:r,busy:i,act:a,version:c}){let[d,f]=(0,P.useState)(null),[p,h]=(0,P.useState)(``),[g,v]=(0,P.useState)(null),[y,b]=(0,P.useState)(!1),[x,S]=(0,P.useState)(``),[C,T]=(0,P.useState)(`contracts`),[D,O]=(0,P.useState)(``),[j,N]=(0,P.useState)(`all`),[I,L]=(0,P.useState)(0);(0,P.useEffect)(()=>{let e=!1;return s.set(n).then(t=>!e&&(f(t),h(``)),t=>!e&&h(t.message)),()=>{e=!0}},[n,c]),(0,P.useEffect)(()=>{v(null),T(`contracts`),O(``),N(`all`)},[n]),(0,P.useEffect)(()=>L(0),[n,C,D,j]);let z=(0,P.useMemo)(()=>new Map((d?.last.contracts?.results??[]).map(e=>[e.id,e])),[d]),B=(0,P.useMemo)(()=>new Map((d?.last.scenarios?.results??[]).map(e=>[e.id,e])),[d]);if(p)return(0,F.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:p});if(!d)return(0,F.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Loading…`});let H=d.contracts.filter(e=>e.writes).length,G=d.contracts.filter(e=>e.needsData?.length).length,K=d.scenarios??[],q=d.last.contracts,ae=d.last.scenarios,J=r.baseUrl||d.baseUrl||``,Y=async e=>S(await o(e)),oe=async t=>{try{let{id:n}=await e.start(`Write the API contracts${t?` and scenarios`:``} of set ${d.id} as tests in the repository: call write_api_tests with set_id ${d.id}${t?` and scenarios ["all"]`:``}. Show me the plan before you write.`,{});location.hash=_(`chats`,n)}catch(e){S(e.message)}},X=e=>{let t=z.get(e.id);return!!t&&(t.status===`failed`||t.status===`error`)},Z=D.toLowerCase().split(/\s+/).filter(Boolean),Q=d.contracts.filter(e=>Z.every(t=>`${e.method} ${e.path} ${e.name}`.toLowerCase().includes(t))),se=[{id:`all`,label:`All`,n:Q.length},{id:`failed`,label:`Failed`,n:Q.filter(X).length,alert:!0},...H?[{id:`writes`,label:`Changes data`,n:Q.filter(e=>e.writes).length}]:[],...q?[{id:`unrun`,label:`Not run`,n:Q.filter(e=>!z.has(e.id)).length}]:[]],$=[...Q.filter(e=>j===`failed`?X(e):j===`writes`?e.writes:j!==`unrun`||!z.has(e.id))].sort((e,t)=>Number(X(t))-Number(X(e))),ce=K.filter(e=>Z.every(t=>e.name.toLowerCase().includes(t)));return(0,F.jsxs)(`section`,{"aria-labelledby":`set-h`,className:`flex min-w-0 flex-1 flex-col gap-4`,children:[(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,F.jsx)(`h2`,{id:`set-h`,className:`m-0 text-[22px] font-semibold tracking-[-0.01em] [overflow-wrap:anywhere]`,children:d.name}),(0,F.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 text-[13px] text-muted`,children:[(0,F.jsxs)(`span`,{children:[`From `,ee[d.source.kind]||d.source.kind,` `,(0,F.jsx)(`span`,{className:`font-mono text-[12px]`,title:d.source.ref,children:ie(d.source.ref)})]}),`· `,(0,F.jsx)(`span`,{children:R(d.createdAt)}),d.baseUrl&&(0,F.jsxs)(F.Fragment,{children:[`· `,(0,F.jsx)(`span`,{className:`font-mono text-[12px] [overflow-wrap:anywhere]`,children:d.baseUrl})]})]})]}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsxs)(l,{variant:`primary`,size:`sm`,disabled:i||!d.contracts.length,onClick:()=>v(`contracts`),children:[(0,F.jsx)(t,{size:15,"aria-hidden":`true`}),`Run contracts`]}),(0,F.jsxs)(l,{size:`sm`,disabled:i||!K.length,onClick:()=>v(`scenarios`),children:[(0,F.jsx)(t,{size:15,"aria-hidden":`true`}),`Run scenarios`]}),(0,F.jsxs)(l,{size:`sm`,disabled:i,onClick:()=>b(!0),children:[(0,F.jsx)(w,{size:15,"aria-hidden":`true`}),`Make scenarios`]}),(0,F.jsxs)(l,{size:`sm`,variant:`ghost`,onClick:()=>void oe(K.length>0),children:[(0,F.jsx)(E,{size:15,"aria-hidden":`true`}),`Write them as tests`]})]}),x&&(0,F.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:x}),g===`contracts`&&(0,F.jsx)(V,{what:`Run ${d.contracts.length} contract${d.contracts.length===1?``:`s`}`,writes:H,needsData:G,defaultUrl:J,onCancel:()=>v(null),onRun:e=>{v(null),a(()=>s.run(d.id,e))}}),g===`scenarios`&&(0,F.jsx)(V,{what:`Run ${K.length} scenario${K.length===1?``:`s`}`,writes:K.filter(e=>e.writes).length,defaultUrl:J,onCancel:()=>v(null),onRun:e=>{v(null),a(()=>s.runScenarios(d.id,{...e.baseUrl?{baseUrl:e.baseUrl}:{},allowWrites:e.allowWrites}))}}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5 rounded-[12px] bg-surface-muted px-4 py-2.5`,children:[(0,F.jsx)(W,{label:`Contracts`,last:q,onOpen:e=>void Y(e)}),K.length>0&&(0,F.jsx)(W,{label:`Scenarios`,last:ae,onOpen:e=>void Y(e)})]}),(0,F.jsxs)(`div`,{className:`flex min-w-0 flex-col rounded-[14px] border border-line-soft bg-bg`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-line-soft px-3 py-2.5`,children:[(0,F.jsx)(`div`,{role:`tablist`,"aria-label":`In this set`,className:`flex gap-1 rounded-[10px] bg-surface-strong p-1`,children:[[`contracts`,`Contracts`,d.contracts.length],[`scenarios`,`Scenarios`,K.length]].map(([e,t,n])=>(0,F.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":C===e,onClick:()=>T(e),className:u(`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[7px] border-0 px-3 text-sm font-medium`,C===e?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:[t,(0,F.jsx)(`span`,{className:`text-[12px] text-muted tabular-nums`,children:n})]},e))}),(0,F.jsx)(A,{id:`api-search`,label:C===`contracts`?`Find a call`:`Find a scenario`,placeholder:C===`contracts`?`Find a call by its path`:`Find a scenario`,value:D,onChange:O})]}),C===`contracts`?(0,F.jsxs)(F.Fragment,{children:[se.length>1&&(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5 px-3 pt-2.5`,children:(0,F.jsx)(M,{items:se,value:j,onChange:N})}),(0,F.jsxs)(`ul`,{"aria-label":`Contracts`,className:`@container m-0 flex list-none flex-col p-1.5`,children:[$.length===0&&(0,F.jsx)(`li`,{className:`px-3 py-4 text-sm text-muted`,children:d.contracts.length?`Nothing matches.`:`This set has no contracts.`}),$.slice(I*U,I*U+U).map(e=>(0,F.jsx)(te,{c:e,r:z.get(e.id)},e.id))]}),(0,F.jsx)(k,{page:I,size:U,total:$.length,onPage:L,label:`Pages of contracts`,children:d.skipped?.length?(0,F.jsxs)(`span`,{title:d.skipped.join(`; `),children:[` · `,m(d.skipped.length,`operation`),` left out`]}):null})]}):K.length?(0,F.jsxs)(`ul`,{"aria-label":`Scenarios`,className:`m-0 flex list-none flex-col px-3 py-1.5`,children:[ce.length===0&&(0,F.jsx)(`li`,{className:`py-4 text-sm text-muted`,children:`Nothing matches.`}),ce.map(e=>(0,F.jsx)(ne,{s:e,r:B.get(e.id)},e.id))]}):(0,F.jsxs)(`div`,{className:`flex flex-col items-start gap-2 px-4 py-5`,children:[(0,F.jsx)(`span`,{className:`text-sm text-muted`,children:`No scenarios yet. A scenario chains calls end to end, each using what the one before answered.`}),(0,F.jsxs)(l,{size:`sm`,disabled:i,onClick:()=>b(!0),children:[(0,F.jsx)(w,{size:15,"aria-hidden":`true`}),`Make scenarios`]})]})]}),(0,F.jsx)(re,{open:y,onClose:()=>b(!1),view:r,set:d,busy:i,onMake:e=>{b(!1),a(()=>s.scenarios(d.id,e))}})]})}function K({sub:e}){let[t,n]=(0,P.useState)(null),[r,i]=(0,P.useState)(``),[a,o]=(0,P.useState)(!1),[c,f]=(0,P.useState)(!1),y=(0,P.useCallback)(()=>{s.view().then(e=>{n(e),i(``)},e=>i(e.message))},[]);(0,P.useEffect)(y,[y]);let b=!!t?.job?.running;(0,P.useEffect)(()=>{if(!b)return;let e=setInterval(y,1500);return()=>clearInterval(e)},[b,y]);let S=async e=>{o(!0),i(``);try{await e(),y()}catch(e){i(e.message)}finally{o(!1)}},E=e?decodeURIComponent(e):``,D=t?.sets.find(e=>e.id===E)||t?.sets[0],k=`${t?.job?.endedAt??``}|${D?.at??``}`,[j,M]=(0,P.useState)(``),I=(t?.sets??[]).filter(e=>j.toLowerCase().split(/\s+/).filter(Boolean).every(t=>e.name.toLowerCase().includes(t)));return(0,F.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,F.jsx)(v,{}),(0,F.jsxs)(`main`,{className:u(x,`@container flex-auto gap-4`),children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,F.jsx)(g,{icon:d,size:`lg`}),(0,F.jsx)(`h1`,{className:`m-0 flex-1 text-[26px] font-semibold tracking-[-0.01em]`,children:`API tests`}),(0,F.jsxs)(l,{variant:`primary`,disabled:!t||b,onClick:()=>f(!0),children:[(0,F.jsx)(w,{size:16,"aria-hidden":`true`}),`New contract set`]})]}),(0,F.jsx)(`p`,{className:`m-0 max-w-[74ch] text-sm leading-relaxed text-muted`,children:`REST, GraphQL, SOAP and gRPC, tested straight against the API with no browser and no model. A contract is one call and what its answer must have; a scenario chains calls end to end.`}),r&&(0,F.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:r}),!t&&!r&&(0,F.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`}),t?.job&&(0,F.jsx)(z,{job:t.job,onStop:()=>S(()=>s.stop())}),t&&(t.sets.length?(0,F.jsxs)(`div`,{className:`flex flex-col gap-6 @2xl:flex-row @2xl:items-start @2xl:gap-8`,children:[(0,F.jsxs)(`nav`,{"aria-label":`Contract sets`,className:`flex min-w-0 flex-col gap-2 @2xl:sticky @2xl:top-6 @2xl:w-[280px] @2xl:flex-none`,children:[(0,F.jsxs)(`span`,{className:`px-1 text-[13px] font-medium text-muted`,children:[`Contract sets (`,t.sets.length,`)`]}),t.sets.length>6&&(0,F.jsx)(A,{id:`set-search`,label:`Find a set`,value:j,onChange:M,className:`flex-none`}),(0,F.jsxs)(`ul`,{className:`m-0 flex max-h-[60vh] list-none flex-col overflow-y-auto p-0 @2xl:max-h-[calc(100vh-240px)]`,children:[I.length===0&&(0,F.jsx)(`li`,{className:`px-3 py-3 text-sm text-muted`,children:`Nothing matches.`}),I.map(e=>{let n=e.last?.contracts,r=!!n&&n.counts.failed+n.counts.error>0;return(0,F.jsx)(`li`,{children:(0,F.jsxs)(`a`,{href:_(`api-tests`,encodeURIComponent(e.id)),"aria-current":D?.id===e.id?`page`:void 0,className:u(`flex min-h-12 items-center gap-2.5 rounded-[10px] px-3 py-1.5 text-ink no-underline`,D?.id===e.id?`bg-surface-strong hover:text-ink`:`hover:bg-surface-muted hover:text-ink`),children:[t?.job?.running&&t.job.target===e.id?(0,F.jsx)(p,{state:`working`,label:`Working on it`,px:16}):n?r?(0,F.jsx)(h,{size:16,"aria-label":`Failures`,className:`flex-none text-fail`}):(0,F.jsx)(O,{size:16,"aria-label":`Passed`,className:`flex-none text-pass`}):(0,F.jsx)(C,{size:16,"aria-label":`Not run`,className:`flex-none text-muted`}),(0,F.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,F.jsx)(`span`,{className:`truncate text-[14px] font-medium`,children:e.name}),(0,F.jsxs)(`span`,{className:`truncate text-[12px] text-muted`,children:[m(e.contracts,`contract`),e.scenarios?` · ${m(e.scenarios,`scenario`)}`:``,n?` · ${n.counts.passed}/${n.counts.passed+n.counts.failed+n.counts.error} passed`:``]})]}),(0,F.jsx)(`span`,{className:`flex-none text-[12px] text-muted tabular-nums`,children:N(e.at)})]})},e.id)})]})]}),D&&(0,F.jsx)(G,{id:D.id,view:t,busy:a||b,act:S,version:k})]}):(0,F.jsxs)(`div`,{className:`flex flex-col items-start gap-3 rounded-[18px] border border-line p-6`,children:[(0,F.jsx)(T,{size:24,"aria-hidden":`true`,className:`text-muted`}),(0,F.jsxs)(`p`,{className:`m-0 max-w-[62ch] leading-relaxed text-ink-2`,children:[`No API contracts yet. Make a set from your OpenAPI, Swagger, WSDL, GraphQL or .proto description`,t.runs.length?`, or from the ${m(t.runs[0].calls,`call`)} the run "${t.runs[0].goal}" saw`:``,`.`]}),(0,F.jsx)(l,{onClick:()=>f(!0),children:`New contract set`})]}))]}),t&&(0,F.jsx)(H,{open:c,onClose:()=>f(!1),view:t,busy:a||b,onMake:e=>S(async()=>{await s.contracts(e),f(!1)})})]})}export{K as ApiTests};
@@ -1,3 +0,0 @@
1
- import{At as e,Cn as t,Gn as n,H as r,Hn as i,_n as a,a as o,at as s,ct as c,gt as l,lt as u,n as d,nt as f,ot as p,q as m,r as h,st as g,t as _,xn as v}from"./frame-CHQgOaj6.js";import{n as y,r as b}from"./Response-VUbDhVeF.js";import{S as x,c as S,d as C,f as w,h as ee,l as te,m as ne,p as re,s as T,u as E,w as D,x as O}from"./index-Hd8gmpz5.js";import{n as k,t as A}from"./when-CHnpLdYw.js";var j={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};j.node;var M=a(j),N=n(i(),1),P=g();function F({id:e}){let[n,r]=(0,N.useState)([]),[i,a]=(0,N.useState)(null),[l,u]=(0,N.useState)(``),[f,h]=(0,N.useState)(``),[g,_]=(0,N.useState)(!1),T=(0,N.useRef)(null),D=(0,N.useRef)(null),k=(0,N.useRef)(!0),[A,j]=(0,N.useState)(!0);(0,N.useEffect)(()=>{let n=!1,i=0;return r([]),a(null),u(``),(async()=>{for(;!n;)try{let o=await t.events(e,i,i>0);if(n||(u(``),a({title:o.title,state:o.state,profile:o.profile}),o.events.length&&(i=o.events[o.events.length-1].n,r(e=>[...e,...o.events])),(o.state===`closed`||o.state===`failed`)&&!o.events.length))return}catch(e){if(n||(u(e.message),e.status===404))return;await new Promise(e=>setTimeout(e,2e3))}})(),()=>{n=!0}},[e]);let F=(0,N.useMemo)(()=>b(n),[n]),I=(0,N.useMemo)(()=>{let e=new Map;for(let t of F.turns.flatMap(e=>e.changes)){let n=e.get(t.path);e.set(t.path,n?{...n,added:n.added+t.added,removed:n.removed+t.removed}:{path:t.path,added:t.added,removed:t.removed})}return[...e.values()]},[F]),L=(0,N.useMemo)(()=>{let e=[];for(let t of F.turns){for(let n of t.tests)n.testFile&&e.push({label:n.ok?`Test`:`Test (failed)`,path:n.testFile,kind:`test`});for(let n of t.reports)e.push({label:/\.html?$/i.test(n.path)?`Report`:`Run report`,path:n.path,kind:`report`})}return e.filter((t,n)=>e.findIndex(e=>e.path===t.path)===n)},[F]),R=(0,N.useRef)(()=>{});o(F.context||F.usage||I.length||L.length?{context:F.context,usage:F.usage,model:F.model?.name,changes:I,outputs:L,busy:i?.state===`busy`||i?.state===`starting`,...I.length?{onCreatePr:()=>R.current()}:{}}:null);let z=i?.state,B=z===`busy`||z===`starting`,V=z===`closed`||z===`failed`,H=F.turns.at(-1),U=!!H&&!H.outcome&&(H.asks.some(e=>e.answer===void 0)||H.waits.some(e=>e.answer===void 0));(0,N.useEffect)(()=>{let e=document.documentElement,t=()=>window.innerHeight+window.scrollY>=e.scrollHeight-48,n=e=>{k.current=e,j(e)},r=window.scrollY,i=()=>{t()?n(!0):window.scrollY<r-2&&n(!1),r=window.scrollY},a=new ResizeObserver(()=>{k.current&&!t()&&window.scrollTo({top:e.scrollHeight,behavior:`instant`})});return T.current&&a.observe(T.current),D.current&&a.observe(D.current),window.addEventListener(`scroll`,i,{passive:!0}),()=>{a.disconnect(),window.removeEventListener(`scroll`,i)}},[]);let ie=()=>{k.current=!0,j(!0),window.scrollTo({top:document.documentElement.scrollHeight,behavior:`smooth`})},[W,G]=(0,N.useState)(null);(0,N.useEffect)(()=>void v.settings().then(G,()=>{}),[]);let[K,q]=(0,N.useState)(!1),[J,Y]=(0,N.useState)({});(0,N.useEffect)(()=>Y({}),[F.headed,F.writeTests]);let X={...te(W),headed:J.headed??F.headed??!1,code:J.code??F.writeTests??!0},Z=(0,N.useCallback)(async e=>{try{await e()}catch(e){u(e.message)}},[]),Q=re(`chat-${e}`.replace(/[^\w-]/g,``).slice(0,80),e=>{h(e),w(`reply`)}),$=async n=>{if(n.trim()&&!g){_(!0),k.current=!0,j(!0);try{await t.send(e,n.trim()),h(``),u(``),Q.close()}catch(e){u(e.message)}finally{_(!1)}}};return R.current=()=>{if(i?.state===`busy`||i?.state===`starting`||g)return;let e=I.map(e=>`- ${e.path}`).join(`
2
- `);$(`Open a pull request with the changes you made in this chat:\n${e}\n\nUse a new branch, a clear title and description, and tell me its link.`)},(0,P.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,P.jsxs)(`header`,{className:`sticky top-0 z-20 flex items-center gap-1 border-b border-line-soft bg-bg py-3 pr-16 pl-5 md:pr-5`,children:[(0,P.jsx)(d,{}),(0,P.jsx)(`h1`,{className:`m-0 ml-2 min-w-0 flex-1 truncate text-base font-semibold`,children:i?.title||`Chat`}),F.model&&(0,P.jsxs)(`span`,{className:`hidden min-h-9 items-center gap-1.5 rounded-lg px-2 text-sm text-ink-2 sm:inline-flex`,title:`The model this chat uses`,children:[(0,P.jsx)(O,{size:14,fill:`currentColor`,"aria-hidden":`true`,className:`text-accent-fg`}),F.model.name]})]}),(0,P.jsxs)(`main`,{ref:T,className:`mx-auto box-border flex w-full max-w-[960px] flex-auto flex-col gap-8 px-6 pt-8 pb-6`,children:[!i&&!l&&(0,P.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Opening the chat…`}),F.turns.map((n,r)=>(0,P.jsxs)(`section`,{"aria-label":`Message ${r+1}`,className:`flex flex-col gap-5`,children:[(0,P.jsx)(`div`,{className:`ml-auto max-w-[min(85%,640px)] rounded-[18px] bg-surface-strong px-4 py-2.5 text-[15px] leading-relaxed whitespace-pre-wrap text-ink [overflow-wrap:anywhere]`,children:n.user}),(0,P.jsx)(y,{turn:n,live:r===F.turns.length-1&&!V,onAnswer:(n,r)=>Z(()=>t.answer(e,n,r)),onProceed:(n,r)=>Z(()=>t.proceed(e,n,r))})]},n.id)),H?.outcome===`done`&&H.next.length>0&&!B&&!V&&(0,P.jsx)(`div`,{className:`flex flex-wrap gap-2 pl-12`,children:H.next.map(e=>(0,P.jsx)(`button`,{type:`button`,title:e.request===e.label?void 0:e.request,onClick:()=>void $(e.request),className:`inline-flex min-h-10 cursor-pointer items-center rounded-[8px] border-0 bg-surface-strong px-4 text-sm font-medium text-ink-2 hover:bg-line hover:text-ink`,children:e.label},e.label))}),(F.fatal||V&&F.ended)&&(0,P.jsxs)(`div`,{role:`alert`,className:c(`flex flex-col gap-2 rounded-[14px] px-4 py-3 text-sm leading-relaxed`,F.fatal||z===`failed`?`bg-fail-soft text-fail`:`bg-surface-muted text-ink-2`),children:[(0,P.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:F.fatal||F.ended?.message||(z===`failed`?`ForgeQE stopped unexpectedly.`:`This chat has ended.`)}),F.ended?.stderr&&(0,P.jsx)(`pre`,{className:`m-0 max-h-[200px] overflow-auto rounded-lg bg-bg/60 px-3 py-2 font-mono text-[12px] whitespace-pre-wrap text-ink-2 [overflow-wrap:anywhere]`,children:F.ended.stderr.join(`
3
- `)}),(0,P.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[(0,P.jsx)(`a`,{className:p({size:`sm`}),href:m(),children:`Start a new chat`}),F.fatal&&/model|key|sign/i.test(F.fatal)&&(0,P.jsx)(`a`,{className:p({size:`sm`}),href:m(`settings`,`models`),children:`Models`}),F.fatal&&/runtime|engine|setup/i.test(F.fatal)&&(0,P.jsx)(`a`,{className:p({size:`sm`}),href:m(`settings`,`setup`),children:`Set up`})]})]}),F.notes.map((e,t)=>(0,P.jsx)(`p`,{className:`m-0 text-sm text-muted [overflow-wrap:anywhere]`,children:e},t))]}),(0,P.jsx)(`div`,{ref:D,className:`sticky bottom-0 z-10 bg-gradient-to-t from-bg from-70% to-transparent px-6 pt-4 pb-5`,children:(0,P.jsxs)(`div`,{className:`relative mx-auto flex w-full max-w-[880px] flex-col gap-2`,children:[!A&&B&&(0,P.jsxs)(`button`,{type:`button`,onClick:ie,className:`absolute -top-11 left-1/2 inline-flex min-h-8 -translate-x-1/2 cursor-pointer items-center gap-1.5 rounded-[8px] border-0 bg-surface-strong px-3 text-[13px] font-medium text-ink-2 shadow-sm hover:bg-line hover:text-ink`,children:[(0,P.jsx)(M,{size:14,"aria-hidden":`true`}),`Latest activity`]}),(0,P.jsx)(`div`,{"aria-live":`polite`,children:l&&(0,P.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:l})}),(0,P.jsx)(ne,{id:`reply`,label:`Reply to ForgeQE`,rows:1,value:f,onChange:h,onSend:()=>void $(f),onStop:()=>Z(()=>t.stop(e)),busy:B&&!U,disabled:V||g||U||Q.running,top:Q.state&&(0,P.jsx)(C,{state:Q.state,onStop:()=>void Q.stop(),onUndo:Q.undo,onClose:Q.close}),left:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`relative`,children:[(0,P.jsxs)(s,{variant:`ghost`,className:`px-2.5 text-[15px]`,disabled:V,"aria-expanded":K,"aria-haspopup":`dialog`,onClick:()=>q(!K),children:[(0,P.jsx)(x,{size:18,strokeWidth:1.8,"aria-hidden":`true`}),`Tools`,(X.headed||!X.code)&&(0,P.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 rounded-full bg-accent`})]}),(0,P.jsx)(ee,{open:K,onClose:()=>q(!1),label:`Tools for this chat`,role:`dialog`,side:`auto`,className:`left-0 w-[min(380px,calc(100vw-48px))]`,children:(0,P.jsx)(S,{tools:X,chat:{model:F.model?.name,provider:F.model?.provider},onChange:n=>{let r={};n.headed!==X.headed&&(r.headed=n.headed),n.code!==X.code&&(r.writeTests=n.code),Object.keys(r).length&&(Y({headed:n.headed,code:n.code}),Z(()=>t.settings(e,r)))}})})]}),(0,P.jsx)(E,{running:Q.running,disabled:!f.trim()||V||g||U,onClick:()=>void Q.start(f)})]}),placeholder:V?`This chat has ended`:U?`Answer above to go on`:B?`ForgeQE is working…`:`Reply to ForgeQE…`})]})})]})}function I(e){return e.waiting||e.state===`ready`&&e.outcome===`needs_input`?`waiting`:e.state===`busy`||e.state===`starting`?`working`:e.state===`closed`||e.state===`failed`?`ended`:`done`}var L={working:{label:`Working`,tone:`running`},waiting:{label:`Needs you`,tone:`warn`},done:{label:`Your turn`,tone:`pass`},ended:{label:`Ended`,tone:`neutral`}},R=[{id:`all`,label:`All`},{id:`working`,label:`Working`},{id:`waiting`,label:`Needs you`},{id:`done`,label:`Your turn`},{id:`ended`,label:`Ended`}];function z({c:e}){let t=I(e),n=L[t];return(0,P.jsxs)(`a`,{href:m(`chats`,e.id),className:`group grid min-h-14 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 rounded-[10px] px-3 py-2 text-ink no-underline hover:bg-surface-muted hover:text-ink @3xl:grid-cols-[minmax(0,1fr)_120px_90px_150px_96px]`,children:[(0,P.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,P.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[t===`waiting`&&(0,P.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 flex-none rounded-full bg-warn`}),(0,P.jsx)(`span`,{className:`truncate text-[14px] font-medium`,children:e.title})]}),(0,P.jsx)(`span`,{className:c(`truncate text-[12.5px]`,e.lastReply?`text-muted`:`text-muted italic`),children:e.lastReply||(t===`working`?`Working on the first answer…`:`No answer yet`)})]}),(0,P.jsx)(`span`,{className:`justify-self-end @3xl:justify-self-start`,children:(0,P.jsx)(T,{tone:n.tone,orb:e.state===`starting`?`waiting`:`working`,children:n.label})}),(0,P.jsx)(`span`,{className:`hidden text-[13px] text-muted tabular-nums @3xl:block`,children:e.turns?u(e.turns,`message`):`—`}),(0,P.jsx)(`span`,{className:`hidden min-w-0 items-center gap-1 truncate text-[13px] text-muted @3xl:flex`,children:e.profile?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(O,{size:11,fill:`currentColor`,"aria-hidden":`true`,className:`flex-none text-accent-fg`}),(0,P.jsx)(`span`,{className:`truncate`,children:e.profile})]}):`Default model`}),(0,P.jsx)(`span`,{className:`hidden text-right text-[13px] text-muted tabular-nums @3xl:block`,children:A(e.lastAt||e.started)})]})}var B=50;function V(){let[n,i]=(0,N.useState)(null),[a,o]=(0,N.useState)(``),[u,d]=(0,N.useState)(`all`),[g,v]=(0,N.useState)(``),[y,b]=(0,N.useState)(B);(0,N.useEffect)(()=>b(B),[u,g]),(0,N.useEffect)(()=>{let e=!1,n=()=>t.list().then(t=>!e&&i(t.chats),t=>!e&&o(t.message));n();let r=setInterval(n,5e3);return()=>{e=!0,clearInterval(r)}},[]);let x=(0,N.useMemo)(()=>{let e={all:0,working:0,waiting:0,done:0,ended:0};for(let t of n||[])e.all++,e[I(t)]++;return e},[n]),S=(0,N.useMemo)(()=>{let e=g.toLowerCase().split(/\s+/).filter(Boolean),t=e=>Date.parse(e.lastAt||e.started)||0;return(n||[]).filter(t=>(u===`all`||I(t)===u)&&e.every(e=>`${t.title} ${t.lastReply||``} ${t.profile||``}`.toLowerCase().includes(e))).sort((e,n)=>t(n)-t(e))},[n,u,g]),C=(0,N.useMemo)(()=>{let e=[];for(let t of S.slice(0,y)){let n=k(t.lastAt||t.started),r=e.find(e=>e.day===n);r?r.chats.push(t):e.push({day:n,chats:[t]})}return e},[S,y]);return(0,P.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,P.jsx)(h,{}),(0,P.jsxs)(`main`,{className:c(_,`gap-5`),children:[(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,P.jsx)(f,{icon:e,size:`lg`}),(0,P.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,P.jsx)(`h1`,{className:`m-0 text-[26px] font-semibold tracking-[-0.01em]`,children:`Chats`}),(0,P.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Each one is its own ForgeQE agent in your project folder, for as long as forgeqe web runs.`})]}),(0,P.jsxs)(`a`,{className:c(p({variant:`primary`}),`gap-2`),href:m(),children:[(0,P.jsx)(l,{size:16,"aria-hidden":`true`}),`New chat`]})]}),n&&n.length>0&&(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,P.jsx)(`div`,{role:`radiogroup`,"aria-label":`Show`,className:`flex flex-wrap gap-1 rounded-[10px] bg-surface-strong p-1`,children:R.map(e=>(0,P.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":u===e.id,onClick:()=>d(e.id),className:c(`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-[7px] border-0 px-3 text-sm font-medium`,u===e.id?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:[e.label,(0,P.jsx)(`span`,{className:c(`tabular-nums text-[12px]`,e.id===`waiting`&&x.waiting?`text-warn`:`text-muted`),children:x[e.id]})]},e.id))}),(0,P.jsxs)(`div`,{className:`relative min-w-0 flex-[1_1_240px]`,children:[(0,P.jsx)(D,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted`}),(0,P.jsx)(r,{type:`search`,"aria-label":`Find a chat`,value:g,placeholder:`Find a chat`,onChange:e=>v(e.target.value),className:`pl-9`})]})]}),a&&(0,P.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:a}),!n&&!a&&(0,P.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Loading…`}),n&&n.length===0&&(0,P.jsxs)(`div`,{className:`flex flex-col items-center gap-4 rounded-[18px] border border-dashed border-line px-6 py-14 text-center`,children:[(0,P.jsx)(f,{icon:e,size:`lg`}),(0,P.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,P.jsx)(`span`,{className:`text-lg font-semibold`,children:`No chats yet`}),(0,P.jsx)(`span`,{className:`max-w-[48ch] text-sm text-muted`,children:`Ask ForgeQE to run test cases, explore a journey, write a test or review requirements. Each chat shows up here while forgeqe web runs.`})]}),(0,P.jsx)(`a`,{className:p({variant:`primary`}),href:m(),children:`Start a chat`})]}),n&&n.length>0&&S.length===0&&(0,P.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`No chat matches.`}),S.length>0&&(0,P.jsxs)(`div`,{className:`@container rounded-[14px] border border-line-soft bg-bg`,children:[(0,P.jsxs)(`div`,{"aria-hidden":`true`,className:`hidden grid-cols-[minmax(0,1fr)_120px_90px_150px_96px] gap-x-4 border-b border-line-soft px-6 py-2 text-[12px] font-medium text-muted @3xl:grid`,children:[(0,P.jsx)(`span`,{children:`Chat`}),(0,P.jsx)(`span`,{children:`Status`}),(0,P.jsx)(`span`,{children:`Messages`}),(0,P.jsx)(`span`,{children:`Model`}),(0,P.jsx)(`span`,{className:`text-right`,children:`Last activity`})]}),C.map(e=>(0,P.jsxs)(`section`,{"aria-labelledby":`day-${e.day}`,children:[(0,P.jsxs)(`h2`,{id:`day-${e.day}`,className:`sticky top-0 z-[1] m-0 border-b border-line-soft bg-surface-muted/95 px-6 py-1.5 text-[12px] font-semibold tracking-wide text-muted uppercase backdrop-blur`,children:[e.day,` `,(0,P.jsxs)(`span`,{className:`font-normal tabular-nums`,children:[`· `,e.chats.length]})]}),(0,P.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-1.5`,children:e.chats.map(e=>(0,P.jsx)(`li`,{children:(0,P.jsx)(z,{c:e})},e.id))})]},e.day)),S.length>y&&(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-t border-line-soft px-6 py-3 text-[13px] text-muted`,children:[(0,P.jsxs)(`span`,{children:[`Showing `,y,` of `,S.length]}),(0,P.jsxs)(s,{size:`sm`,onClick:()=>b(y+B),children:[`Show `,Math.min(B,S.length-y),` more`]})]})]})]})]})}export{F as Chat,V as Chats};
@@ -1,4 +0,0 @@
1
- import{At as e,C as t,Cn as n,Ct as r,Dt as i,Gn as a,H as o,Hn as s,K as c,U as l,Ut as u,W as d,Yt as f,_n as p,at as m,ct as h,ht as g,lt as _,mt as v,nt as y,q as b,r as x,st as S,t as C,wn as w}from"./frame-CHQgOaj6.js";import"./markdown-BPBR6Fva.js";import{t as T}from"./file-chart-column-increasing-9rCBQxTk.js";import{j as E,s as D,w as O,y as k}from"./index-Hd8gmpz5.js";var A={name:`plug-zap`,size:24,node:[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]],aliases:[`plug-zap-2`]};A.node;var j=p(A),M={name:`sprout`,size:24,node:[[`path`,{d:`M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3`,key:`139s4v`}],[`path`,{d:`M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4`,key:`1dlkgp`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]};M.node;var N=p(M),P={name:`waypoints`,size:24,node:[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]};P.node;var F=p(P),I=a(s(),1),L=S(),R=[`databases`,`testdata`,`flows`],z={test:`databases`,tables:`databases`,query:`databases`,gen:`testdata`,files:`testdata`,insert:`testdata`,batches:`testdata`,clean:`testdata`,check:`flows`,trace:`flows`},B={test:[`Testing the connection`,`Tested the connection`,`waiting`],tables:[`Reading the tables`,`Read the tables`,`searching`],query:[`Running the query`,`Ran the query`,`working`],gen:[`Making a preview`,`Made a preview`,`writing`],files:[`Writing the files`,`Wrote the files`,`writing`],insert:[`Inserting test data`,`Inserted test data`,`working`],batches:[`Listing the batches`,`Listed the batches`,`searching`],clean:[`Removing a batch`,`Removed a batch`,`working`],check:[`Checking the flows`,`Checked the flows`,`working`],trace:[`Following the record`,`Followed the record`,`searching`]},V=e=>e==null?`NULL`:typeof e==`object`?JSON.stringify(e):String(e),H=e=>(e?.keys||[]).map(e=>typeof e==`object`&&e?`${e.key}×${e.times}`:String(e)).join(`, `);function U({job:e,onStop:t}){let[n,r,i]=B[e.kind]??[`Working`,`Done`,`working`],a=(0,I.useRef)(null);(0,I.useEffect)(()=>{a.current&&(a.current.scrollTop=a.current.scrollHeight)},[e.lines.length]);let o=e.exitCode===0,s=!o&&(e.kind===`check`||e.kind===`trace`)&&e.result!==void 0&&!e.result.error;return(0,L.jsxs)(`section`,{"aria-label":e.running?n:r,className:`flex flex-col gap-2 rounded-[14px] border border-line-soft p-4`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,L.jsxs)(`span`,{className:`min-w-0 flex-1 font-medium [overflow-wrap:anywhere]`,children:[e.running?n:r,e.target?(0,L.jsxs)(`span`,{className:`font-normal text-muted`,children:[` · `,e.target]}):null]}),(0,L.jsx)(D,{tone:e.running?`running`:o?`pass`:e.exitCode===2||s?`warn`:`fail`,orb:i,children:e.running?`Working`:o?`Done`:s?`Some broken`:e.exitCode===2?`Not done`:`Failed`}),e.running&&(0,L.jsxs)(m,{onClick:t,className:`border-fail text-fail hover:bg-fail-soft`,children:[(0,L.jsx)(g,{size:14,fill:`currentColor`,"aria-hidden":`true`}),`Stop`]})]}),(0,L.jsxs)(`details`,{open:e.running||!o&&!e.result,children:[(0,L.jsxs)(`summary`,{className:`cursor-pointer text-sm text-muted`,children:[`Output (`,_(e.lines.length,`line`),`)`]}),(0,L.jsx)(`code`,{className:`mt-2 block font-mono text-[12px] text-muted [overflow-wrap:anywhere]`,children:e.command}),(0,L.jsx)(`pre`,{ref:a,className:`mt-2 max-h-[240px] overflow-auto rounded-[10px] bg-surface-muted p-3 font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-ink-2`,children:e.lines.join(`
2
- `)||`Starting…`})]})]})}function W({text:e}){return(0,L.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:e})}function G({columns:e,rows:t}){return(0,L.jsx)(`div`,{className:`max-h-[420px] overflow-auto rounded-[12px] border border-line-soft`,children:(0,L.jsxs)(`table`,{className:`w-full border-collapse text-[13px]`,children:[(0,L.jsx)(`thead`,{className:`sticky top-0 bg-surface-muted`,children:(0,L.jsx)(`tr`,{children:e.map(e=>(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium whitespace-nowrap text-muted`,children:e},e))})}),(0,L.jsx)(`tbody`,{children:t.map((e,t)=>(0,L.jsx)(`tr`,{className:`border-t border-line-soft`,children:e.map((e,t)=>(0,L.jsx)(`td`,{className:h(`max-w-[320px] px-3 py-1.5 align-top font-mono text-[12px] [overflow-wrap:anywhere]`,e===null&&`text-muted`),children:V(e)},t))},t))})]})})}function K({db:t,job:r,busy:a,act:s}){let[c,u]=(0,I.useState)(``),[f,p]=(0,I.useState)(``),[h,g]=(0,I.useState)(`200`),[y,x]=(0,I.useState)(``),[S,C]=(0,I.useState)(``),w=r&&!r.running&&r.target===t.name?r:null,T=w?.kind===`query`?w.result:void 0,O=async()=>{try{let{id:e}=await n.start(`On the ${t.name} database: ${y.trim()} Read the schema first, check the SQL with run_sql dry_run: true, then run it and show the rows. End with the final SQL in one sql code block.`,{});location.hash=b(`chats`,e)}catch(e){C(e.message)}};return(0,L.jsxs)(`section`,{"aria-labelledby":`db-h`,className:`flex min-w-0 flex-1 flex-col gap-5`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-start gap-3`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_240px] flex-col gap-1`,children:[(0,L.jsx)(`h2`,{id:`db-h`,className:`m-0 text-[22px] font-semibold tracking-[-0.01em]`,children:t.name}),(0,L.jsx)(`span`,{className:`text-sm text-muted [overflow-wrap:anywhere]`,children:[t.engine||`from its connection string`,t.where,t.auth===`password`?``:t.auth].filter(Boolean).join(` · `)}),t.description&&(0,L.jsx)(`span`,{className:`text-sm text-ink-2`,children:t.description})]}),(0,L.jsx)(D,{tone:t.writable?`warn`:`neutral`,icon:t.writable,children:t.writable?`Writable, after asking`:`Read only`})]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsxs)(m,{disabled:a,onClick:()=>s(`test`,{db:t.name}),children:[(0,L.jsx)(j,{size:16,"aria-hidden":`true`}),`Test the connection`]}),(0,L.jsxs)(`form`,{className:`flex min-w-0 flex-[1_1_280px] items-center gap-2`,onSubmit:e=>{e.preventDefault(),s(`tables`,{db:t.name,...c.trim()?{search:c.trim()}:{}})},children:[(0,L.jsx)(o,{"aria-label":`Tables matching`,value:c,placeholder:`Tables matching…`,onChange:e=>u(e.target.value),className:`min-w-0 flex-1`}),(0,L.jsxs)(m,{type:`submit`,disabled:a,children:[(0,L.jsx)(v,{size:16,"aria-hidden":`true`}),`Show tables`]})]})]}),w&&(w.kind===`test`||w.kind===`tables`)&&(0,L.jsx)(`pre`,{className:`m-0 max-h-[320px] overflow-auto rounded-[12px] bg-surface-muted p-3 font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-ink-2`,children:w.lines.filter(e=>!/^args |^token /.test(e)).join(`
3
- `)}),(0,L.jsxs)(`section`,{"aria-labelledby":`query-h`,className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h3`,{id:`query-h`,className:`m-0 text-base font-semibold`,children:`Query`}),(0,L.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`One read. A change to the data goes through a chat, which asks before it writes.`}),(0,L.jsx)(`label`,{className:`sr-only`,htmlFor:`sql`,children:`SQL`}),(0,L.jsx)(d,{id:`sql`,rows:5,value:f,spellCheck:!1,placeholder:t.engine===`mongodb`?`{"find": "orders", "filter": {"status": "open"}}`:`select * from orders where created_at > now() - interval '1 day'`,onChange:e=>p(e.target.value),className:`font-mono text-[13px]`}),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsxs)(m,{variant:`primary`,disabled:a||!f.trim(),onClick:()=>s(`query`,{db:t.name,sql:f,maxRows:Number(h)}),children:[(0,L.jsx)(i,{size:16,"aria-hidden":`true`}),`Run`]}),(0,L.jsxs)(m,{disabled:a||!f.trim(),onClick:()=>s(`query`,{db:t.name,sql:f,dryRun:!0}),children:[(0,L.jsx)(E,{size:16,"aria-hidden":`true`}),`Check only`]}),(0,L.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted`,children:[`Rows`,(0,L.jsx)(l,{value:h,onChange:e=>g(e.target.value),className:`w-[96px]`,children:[`50`,`200`,`1000`].map(e=>(0,L.jsx)(`option`,{children:e},e))})]})]}),T&&!T.ok&&(0,L.jsx)(W,{text:T.needs_confirmation?`Only reads run here. Ask in a chat to change data: it shows the statement and asks first.`:T.error||`The query failed.`}),T?.ok&&T.dry_run&&(0,L.jsxs)(`p`,{className:`m-0 rounded-[12px] bg-pass-soft px-3 py-2 text-sm text-pass`,children:[T.note||`The database accepts it.`,T.columns?.length?` Columns: ${T.columns.join(`, `)}`:``]}),T?.ok&&!T.dry_run&&T.columns&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(G,{columns:T.columns,rows:T.rows||[]}),(0,L.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[_(T.row_count??T.rows?.length??0,`row`),T.truncated?` (more not shown)`:``,T.ms===void 0?``:` in ${T.ms} ms`]})]})]}),(0,L.jsxs)(`section`,{"aria-labelledby":`ask-h`,className:`flex flex-col gap-2`,children:[(0,L.jsx)(`h3`,{id:`ask-h`,className:`m-0 text-base font-semibold`,children:`Ask in your words`}),(0,L.jsxs)(`form`,{className:`flex flex-wrap items-center gap-2`,onSubmit:e=>{e.preventDefault(),y.trim()&&O()},children:[(0,L.jsx)(o,{"aria-label":`Your question`,value:y,maxLength:500,placeholder:`Which customers ordered more than twice last week?`,onChange:e=>x(e.target.value),className:`min-w-0 flex-[1_1_280px]`}),(0,L.jsxs)(m,{type:`submit`,disabled:!y.trim(),children:[(0,L.jsx)(e,{size:16,"aria-hidden":`true`}),`Ask in a chat`]})]}),S&&(0,L.jsx)(W,{text:S})]})]})}function q({view:e,job:t,busy:n,act:r,sub:i}){let a=e.databases.find(e=>e.name===i)||e.databases[0];return e.databases.length?(0,L.jsxs)(`div`,{className:`flex flex-col gap-6 @2xl:flex-row @2xl:items-start @2xl:gap-8`,children:[(0,L.jsxs)(`nav`,{"aria-label":`Databases`,className:`flex min-w-0 flex-col gap-1 @2xl:sticky @2xl:top-6 @2xl:w-[250px] @2xl:flex-none`,children:[(0,L.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:e.databases.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsxs)(`a`,{href:b(`data`,`databases/${encodeURIComponent(e.name)}`),"aria-current":a?.name===e.name?`page`:void 0,className:h(`flex min-h-[60px] items-center gap-3 rounded-[12px] px-3 py-2 text-ink no-underline`,a?.name===e.name?`bg-surface-strong hover:text-ink`:`hover:bg-surface-muted hover:text-ink`),children:[(0,L.jsx)(f,{size:18,"aria-hidden":`true`,className:`flex-none text-muted`}),(0,L.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,L.jsx)(`span`,{className:`truncate text-[15px] font-medium`,children:e.name}),(0,L.jsx)(`span`,{className:`truncate text-[13px] text-muted`,children:[e.engine||`connection string`,e.writable?`writable`:`read only`].join(` · `)})]})]})},e.name))}),(0,L.jsx)(`a`,{href:b(`settings`,`databases`),className:`px-3 pt-1 text-[13px]`,children:`Add or change in Settings`})]}),a&&(0,L.jsx)(K,{db:a,job:t,busy:n,act:r},a.name)]}):(0,L.jsxs)(`div`,{className:`flex flex-col items-start gap-3 rounded-[18px] border border-line p-6`,children:[(0,L.jsx)(f,{size:24,"aria-hidden":`true`,className:`text-muted`}),(0,L.jsx)(`p`,{className:`m-0 max-w-[62ch] leading-relaxed text-ink-2`,children:`No databases yet. Add one in Settings: a connection string, or its host, user and password, kept in your credential store.`}),(0,L.jsx)(`a`,{href:b(`settings`,`databases`),className:`text-sm font-medium`,children:`Settings, Databases`})]})}function J({r:e}){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(e.order||[]).map(t=>{let n=e.preview?.[t],r=n?.sample||[],i=r.length?Object.keys(r[0]):[];return(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsxs)(`span`,{className:`text-sm`,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:t}),` · `,_(e.rows?.[t]??0,`row`),n?.database_fills?.length?(0,L.jsxs)(`span`,{className:`text-muted`,children:[` · the database fills `,n.database_fills.join(`, `)]}):null,e.masked?.[t]?.length?(0,L.jsxs)(`span`,{className:`text-muted`,children:[` · masked `,e.masked[t].join(`, `)]}):null]}),i.length>0&&(0,L.jsx)(G,{columns:i,rows:r.slice(0,3).map(e=>i.map(t=>e[t]))})]},t)}),(e.warnings||[]).map((e,t)=>(0,L.jsx)(`p`,{className:`m-0 text-[13px] text-warn`,children:e},t))]})}function Y({view:t,job:r,busy:i,act:a}){let s=t.databases.filter(e=>e.writable),[d,f]=(0,I.useState)(t.specs[0]??``),[p,h]=(0,I.useState)(``),[g,_]=(0,I.useState)(``),[v,y]=(0,I.useState)(`csv`),[x,S]=(0,I.useState)(!1),[C,w]=(0,I.useState)(s[0]?.name??``),[T,E]=(0,I.useState)(``),[D,O]=(0,I.useState)(``),A={spec:d,...p?{db:p}:{},...g?{seed:g}:{}},j=r&&!r.running?r:null,M=j&&[`gen`,`files`,`insert`].includes(j.kind)&&j.target===d?j.result:void 0,P=j?.kind===`batches`?(Array.isArray(j.result)?j.result.flatMap(e=>e.batches||[]):j.result?.batches)??[]:null,F=t.databases.find(e=>e.name===p),R=async()=>{try{let{id:e}=await n.start(`Write a test data spec for this project (a YAML file with tables: under test-data/), from the database's schema. Show me the spec and a preview before you save it.`,{});location.hash=b(`chats`,e)}catch(e){O(e.message)}};return(0,L.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,L.jsxs)(`section`,{"aria-labelledby":`spec-h`,className:`flex flex-col gap-4`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2`,children:[(0,L.jsx)(`h2`,{id:`spec-h`,className:`m-0 flex-1 text-lg font-semibold`,children:`Make test data`}),(0,L.jsxs)(m,{variant:`ghost`,onClick:()=>void R(),children:[(0,L.jsx)(e,{size:16,"aria-hidden":`true`}),`Write a spec in a chat`]})]}),(0,L.jsx)(`p`,{className:`m-0 max-w-[70ch] text-sm leading-relaxed text-muted`,children:`A spec is a YAML file with tables: and what goes in each column. The same spec and seed make the same data again, so a test or a pipeline can rely on it. No model is used.`}),D&&(0,L.jsx)(W,{text:D}),t.specs.length===0?(0,L.jsx)(`p`,{className:`m-0 rounded-[12px] border border-line-soft px-4 py-3 text-sm text-muted`,children:`No specs in this project yet: a YAML file with tables: in test-data/, data/ or specs/. Write one in a chat, from a database's schema.`}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-[14px] border border-line-soft p-4`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,L.jsxs)(`label`,{className:`flex min-w-0 flex-[2_1_260px] flex-col gap-1.5 text-sm font-medium`,children:[`Spec`,(0,L.jsx)(l,{value:d,onChange:e=>f(e.target.value),children:t.specs.map(e=>(0,L.jsx)(`option`,{children:e},e))})]}),(0,L.jsxs)(`label`,{className:`flex min-w-0 flex-[1_1_180px] flex-col gap-1.5 text-sm font-medium`,children:[`Database`,(0,L.jsxs)(l,{value:p,onChange:e=>h(e.target.value),children:[(0,L.jsx)(`option`,{value:``,children:`The spec's own`}),t.databases.map(e=>(0,L.jsxs)(`option`,{value:e.name,children:[e.name,e.writable?``:` (read only)`]},e.name))]})]}),(0,L.jsxs)(`label`,{className:`flex w-[120px] flex-col gap-1.5 text-sm font-medium`,children:[`Seed`,(0,L.jsx)(o,{value:g,inputMode:`numeric`,placeholder:`Random`,onChange:e=>_(e.target.value.replace(/\D/g,``).slice(0,9))})]})]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsxs)(m,{variant:`primary`,disabled:i||!d,onClick:()=>a(`gen`,A),children:[(0,L.jsx)(u,{size:16,"aria-hidden":`true`}),`Preview`]}),(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,L.jsx)(m,{disabled:i||!d,onClick:()=>a(`gen`,{...A,mode:`files`,format:v}),children:`Write files`}),(0,L.jsx)(l,{"aria-label":`File format`,value:v,onChange:e=>y(e.target.value),className:`w-[88px]`,children:[`csv`,`json`,`sql`].map(e=>(0,L.jsx)(`option`,{children:e},e))})]}),(0,L.jsxs)(m,{disabled:i||!d||!F?.writable,title:F?.writable?void 0:`Pick a writable database to insert into`,onClick:()=>S(!0),children:[(0,L.jsx)(N,{size:16,"aria-hidden":`true`}),`Insert into `,F?.writable?F.name:`a database`]})]}),x&&F&&(0,L.jsxs)(`div`,{role:`alertdialog`,"aria-label":`Insert test data`,className:`flex flex-col gap-3 rounded-[12px] border border-warn bg-warn-soft p-4`,children:[(0,L.jsxs)(`span`,{className:`font-medium`,children:[`Insert the rows of `,d,` into `,F.name,`?`]}),(0,L.jsx)(`span`,{className:`text-sm text-ink-2`,children:`They go in as one batch, which you can remove again below. Only on a test database.`}),(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,L.jsx)(m,{variant:`primary`,onClick:()=>{S(!1),a(`gen`,{...A,mode:`insert`,confirmed:!0})},children:`Insert`}),(0,L.jsx)(m,{onClick:()=>S(!1),children:`Don't insert`})]})]}),M&&!M.ok&&(0,L.jsx)(W,{text:M.error||`It did not make the data.`}),M?.ok&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[M.batch&&(0,L.jsxs)(`p`,{className:`m-0 rounded-[12px] bg-pass-soft px-3 py-2 text-sm text-pass`,children:[`Inserted as batch `,(0,L.jsx)(`span`,{className:`font-mono text-[13px]`,children:M.batch}),`.`]}),M.files?.length?(0,L.jsxs)(`p`,{className:`m-0 flex flex-wrap items-center gap-2 text-sm`,children:[`Wrote`,M.files.map(e=>(0,L.jsx)(`button`,{type:`button`,onClick:async()=>O(await c(e)),className:`cursor-pointer rounded-md border border-line-soft bg-surface-muted px-1.5 py-0.5 font-mono text-[12px] text-ink-2 hover:bg-surface-strong`,children:e},e))]}):null,(0,L.jsx)(J,{r:M})]})]})]}),(0,L.jsxs)(`section`,{"aria-labelledby":`batch-h`,className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h2`,{id:`batch-h`,className:`m-0 text-lg font-semibold`,children:`Inserted batches`}),s.length===0?(0,L.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`No writable database: test data is inserted only into one marked writable in Settings, Databases.`}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsx)(l,{"aria-label":`Database`,value:C,onChange:e=>w(e.target.value),className:`w-[220px]`,children:s.map(e=>(0,L.jsx)(`option`,{children:e.name},e.name))}),(0,L.jsx)(m,{disabled:i||!C,onClick:()=>a(`batches`,{db:C}),children:`List batches`})]}),P&&P.length===0&&(0,L.jsxs)(`p`,{className:`m-0 text-sm text-muted`,children:[`No batches in `,j?.target,`.`]}),P&&P.length>0&&(0,L.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:P.map(e=>(0,L.jsxs)(`li`,{className:`flex flex-wrap items-center gap-3 border-t border-line-soft py-2.5 text-sm first:border-t-0`,children:[(0,L.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_240px] flex-col gap-0.5`,children:[(0,L.jsx)(`span`,{className:`font-mono text-[13px]`,children:e.batch}),(0,L.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[new Date(e.created).toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),e.spec?` · ${e.spec}`:``,` ·`,` `,Object.entries(e.rows).map(([e,t])=>`${e} ${t}`).join(`, `)]})]}),T===e.batch?(0,L.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,L.jsxs)(`span`,{className:`text-[13px] text-warn`,children:[`Remove its rows from `,j?.target,`?`]}),(0,L.jsx)(m,{size:`sm`,className:`border-fail text-fail hover:bg-fail-soft`,onClick:()=>{E(``),a(`clean`,{db:j?.target,batch:e.batch,confirmed:!0})},children:`Remove`}),(0,L.jsx)(m,{size:`sm`,onClick:()=>E(``),children:`Keep`})]}):(0,L.jsxs)(m,{size:`sm`,disabled:i,onClick:()=>E(e.batch),children:[(0,L.jsx)(k,{size:14,"aria-hidden":`true`}),`Remove`]})]},e.batch))}),j?.kind===`clean`&&j.result?.ok&&(0,L.jsxs)(`p`,{className:`m-0 rounded-[12px] bg-pass-soft px-3 py-2 text-sm text-pass`,children:[`Removed:`,` `,Object.entries(j.result.removed||{}).map(([e,t])=>`${e} ${t}`).join(`, `)]})]})]})]})}function X({c:e}){let t=e=>e?.count??0;return(0,L.jsxs)(`li`,{className:`flex flex-col gap-1 border-t border-line-soft py-3 text-sm first:border-t-0`,children:[(0,L.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsx)(D,{tone:e.ok?`pass`:`fail`,children:e.ok?`Holds`:`Broken`}),(0,L.jsx)(`span`,{className:`font-medium`,children:e.flow}),(0,L.jsxs)(`span`,{className:`font-mono text-[12px] text-muted [overflow-wrap:anywhere]`,children:[e.from,` → `,e.to]})]}),e.error?(0,L.jsx)(`span`,{className:`text-fail [overflow-wrap:anywhere]`,children:e.error}):(0,L.jsxs)(`span`,{className:`text-ink-2`,children:[e.matched??0,` of `,e.source_rows??0,` arrived · `,e.late?`${t(e.late)} late (${t(e.in_flight)} in flight)`:`${t(e.missing)} missing`,` · `,e.wrong?.rows??0,` wrong · `,t(e.duplicates),` duplicated`,e.extra?` · ${t(e.extra)} with no source`:``]}),e.note&&(0,L.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.note}),H(e.late??e.missing)&&(0,L.jsxs)(`span`,{className:`text-[13px] text-fail [overflow-wrap:anywhere]`,children:[`Missing: `,H(e.late??e.missing)]}),(e.wrong?.examples||[]).map((e,t)=>(0,L.jsxs)(`span`,{className:`font-mono text-[12px] text-fail [overflow-wrap:anywhere]`,children:[String(e.key),`: `,e.column,` expected `,V(e.expected),`, found `,V(e.target)]},t))]})}function Z({view:t,job:i,busy:a,act:s}){let[u,d]=(0,I.useState)([]),f=(0,I.useMemo)(()=>[...new Set(t.flows.map(e=>e.from).filter(e=>!e.startsWith(`api:`)))],[t.flows]),[p,h]=(0,I.useState)(f[0]??t.flows[0]?.name??``),[g,v]=(0,I.useState)(``),[y,x]=(0,I.useState)(``),[S,C]=(0,I.useState)(``),[k,A]=(0,I.useState)(null),[j,M]=(0,I.useState)(``),N=i&&!i.running?i:null,P=N?.kind===`check`?N.result??null:null,R=N?.kind===`trace`?N.result??null:null;return t.flowsError?(0,L.jsx)(W,{text:`${t.flowsFile} does not read: ${t.flowsError}`}):t.flows.length?(0,L.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,L.jsxs)(`section`,{"aria-labelledby":`flows-h`,className:`flex flex-col gap-3`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsxs)(`h2`,{id:`flows-h`,className:`m-0 flex-1 text-lg font-semibold`,children:[`Flows `,(0,L.jsxs)(`span`,{className:`text-sm font-normal text-muted`,children:[`(`,t.flowsFile,`)`]})]}),(0,L.jsxs)(m,{variant:`primary`,disabled:a,onClick:()=>s(`check`,{flows:u}),children:[(0,L.jsx)(E,{size:16,"aria-hidden":`true`}),u.length?`Check ${_(u.length,`flow`)}`:`Check all`]}),N?.report&&(N.kind===`check`||N.kind===`trace`)&&(0,L.jsxs)(m,{onClick:async()=>M(await c(N.report)),children:[(0,L.jsx)(T,{size:16,"aria-hidden":`true`}),`Report`]})]}),(0,L.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`Each hop: did every record arrive, complete, correct, on time.`}),j&&(0,L.jsx)(W,{text:j}),(0,L.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:t.flows.map(e=>(0,L.jsxs)(`li`,{className:`flex items-start gap-3 border-t border-line-soft py-2.5 first:border-t-0`,children:[(0,L.jsx)(`input`,{type:`checkbox`,"aria-label":`Check ${e.name}`,checked:u.includes(e.name),onChange:t=>d(t.target.checked?[...u,e.name]:u.filter(t=>t!==e.name)),className:`mt-1 size-5 flex-none accent-accent`}),(0,L.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5 text-sm`,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:e.name}),(0,L.jsxs)(`span`,{className:`font-mono text-[12px] text-ink-2 [overflow-wrap:anywhere]`,children:[e.from,` → `,e.to]}),(0,L.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[[e.mode,e.sla?`SLA ${e.sla}`:``,_(e.columns,`column`)].filter(Boolean).join(` · `),e.description?` · ${e.description}`:``]})]})]},e.name))}),P?.error&&(0,L.jsx)(W,{text:P.error}),P?.flows&&(0,L.jsx)(`ul`,{"aria-label":`Check results`,className:`m-0 flex list-none flex-col rounded-[14px] border border-line-soft px-4 py-1`,children:P.flows.map(e=>(0,L.jsx)(X,{c:e},e.flow))})]}),(0,L.jsxs)(`section`,{"aria-labelledby":`trace-h`,className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h2`,{id:`trace-h`,className:`m-0 text-lg font-semibold`,children:`Follow one record`}),(0,L.jsxs)(`form`,{className:`flex flex-wrap items-end gap-3`,onSubmit:e=>{e.preventDefault(),p&&g.trim()&&s(`trace`,{start:p,key:g.trim(),...y?{wait:Number(y)}:{}})},children:[(0,L.jsxs)(`label`,{className:`flex min-w-0 flex-[1_1_220px] flex-col gap-1.5 text-sm font-medium`,children:[`From`,(0,L.jsxs)(l,{value:p,onChange:e=>h(e.target.value),children:[(0,L.jsx)(`optgroup`,{label:`A table`,children:f.map(e=>(0,L.jsx)(`option`,{children:e},e))}),(0,L.jsx)(`optgroup`,{label:`A flow`,children:t.flows.map(e=>(0,L.jsx)(`option`,{children:e.name},e.name))})]})]}),(0,L.jsxs)(`label`,{className:`flex w-[160px] flex-col gap-1.5 text-sm font-medium`,children:[`Its key`,(0,L.jsx)(o,{value:g,maxLength:200,placeholder:`1042`,onChange:e=>v(e.target.value)})]}),(0,L.jsxs)(`label`,{className:`flex w-[130px] flex-col gap-1.5 text-sm font-medium`,children:[`Wait up to (s)`,(0,L.jsx)(o,{value:y,inputMode:`numeric`,placeholder:`0`,onChange:e=>x(e.target.value.replace(/\D/g,``).slice(0,3))})]}),(0,L.jsxs)(m,{type:`submit`,disabled:a||!p||!g.trim(),children:[(0,L.jsx)(r,{size:16,"aria-hidden":`true`}),`Follow it`]})]}),R?.error&&(0,L.jsx)(W,{text:R.error}),R?.hops&&(0,L.jsx)(`ol`,{className:`m-0 flex list-none flex-col gap-2 border-l border-line pl-4`,children:R.hops.map((e,t)=>(0,L.jsxs)(`li`,{className:`flex flex-col gap-0.5 text-sm`,children:[(0,L.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,L.jsx)(D,{tone:e.ok?`pass`:`fail`,children:e.ok?`Arrived`:e.found_in_source===!1?`Not in the source`:e.arrived===!1?`Did not arrive`:`Differs`}),(0,L.jsx)(`span`,{className:`font-medium`,children:e.flow}),(0,L.jsxs)(`span`,{className:`font-mono text-[12px] text-muted`,children:[e.from,` → `,e.to,` · key `,V(e.key)]})]}),(e.differences||[]).map((e,t)=>(0,L.jsxs)(`span`,{className:`font-mono text-[12px] text-fail [overflow-wrap:anywhere]`,children:[e.column,`: expected `,V(e.expected),`, found `,V(e.target)]},t)),Number(e.copies)>1&&(0,L.jsxs)(`span`,{className:`text-[13px] text-warn`,children:[e.copies,` copies`]})]},t))})]}),(0,L.jsxs)(`section`,{"aria-labelledby":`impact-h`,className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h2`,{id:`impact-h`,className:`m-0 text-lg font-semibold`,children:`What a change reaches`}),(0,L.jsxs)(`form`,{className:`flex flex-wrap items-center gap-2`,onSubmit:async e=>{e.preventDefault();try{A(await w.impact(S.trim())),M(``)}catch(e){M(e.message)}},children:[(0,L.jsx)(o,{"aria-label":`A table or column`,value:S,spellCheck:!1,placeholder:`shop.orders.total`,onChange:e=>C(e.target.value),className:`min-w-0 flex-[1_1_260px] font-mono text-[13px]`}),(0,L.jsxs)(m,{type:`submit`,disabled:!S.trim(),children:[(0,L.jsx)(O,{size:16,"aria-hidden":`true`}),`Show what reads it`]})]}),k&&k.length===0&&(0,L.jsxs)(`p`,{className:`m-0 text-sm text-muted`,children:[`Nothing in the flows reads `,S,`.`]}),k&&k.length>0&&(0,L.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0`,children:k.map((e,t)=>(0,L.jsxs)(`li`,{className:`font-mono text-[12px] text-ink-2 [overflow-wrap:anywhere]`,style:{paddingLeft:`${(e.depth-1)*16}px`},children:[e.from,` → `,e.to,e.columns.length?` (${e.columns.join(`, `)})`:``,` `,(0,L.jsxs)(`span`,{className:`text-muted`,children:[`[`,e.flow,`]`]})]},t))}),t.map.length>0&&(0,L.jsxs)(`details`,{children:[(0,L.jsx)(`summary`,{className:`cursor-pointer text-sm text-muted`,children:`The whole map`}),(0,L.jsx)(`pre`,{className:`mt-2 overflow-auto rounded-[12px] bg-surface-muted p-3 font-mono text-[12px] leading-relaxed text-ink-2`,children:t.map.join(`
4
- `)})]})]})]}):(0,L.jsxs)(`div`,{className:`flex flex-col items-start gap-3 rounded-[18px] border border-line p-6`,children:[(0,L.jsx)(F,{size:24,"aria-hidden":`true`,className:`text-muted`}),(0,L.jsxs)(`p`,{className:`m-0 max-w-[62ch] leading-relaxed text-ink-2`,children:[`No data flows yet. A flow says how records move from one system to another (a table, a topic or an API), by which key, and what each column becomes; `,(0,L.jsx)(`span`,{className:`font-mono text-[13px]`,children:t.flowsFile}),` holds them. ForgeQE can write them from your mapping documents.`]}),(0,L.jsxs)(m,{onClick:async()=>{try{let{id:e}=await n.start(`Write the data flows of this project into flows.yaml from our mapping documents and the databases' schemas. Show me each flow before you save it.`,{});location.hash=b(`chats`,e)}catch(e){M(e.message)}},children:[(0,L.jsx)(e,{size:16,"aria-hidden":`true`}),`Write flows in a chat`]}),j&&(0,L.jsx)(W,{text:j})]})}function Q({sub:e}){let[n,r]=(0,I.useState)(null),[i,a]=(0,I.useState)(``),[o,s]=(0,I.useState)(!1),[c,...l]=(e||``).split(`/`),u=R.includes(c)?c:`databases`,d=(0,I.useCallback)(()=>{w.view().then(e=>{r(e),a(``)},e=>a(e.message))},[]);(0,I.useEffect)(d,[d]);let p=!!n?.job?.running;(0,I.useEffect)(()=>{if(!p)return;let e=setInterval(d,1e3);return()=>clearInterval(e)},[p,d]);let m=async(e,t)=>{s(!0),a(``);try{await w.run(e,t),d()}catch(e){a(e.message)}finally{s(!1)}},g=n?.job??null,_={databases:`Databases${n?` (${n.databases.length})`:``}`,testdata:`Test data${n?` (${n.specs.length})`:``}`,flows:`Data flows${n?` (${n.flows.length})`:``}`};return(0,L.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,L.jsx)(x,{}),(0,L.jsxs)(`main`,{className:h(C,`@container flex-auto gap-4`),children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,L.jsx)(y,{icon:f,size:`lg`}),(0,L.jsx)(`h1`,{className:`m-0 flex-1 text-[26px] font-semibold tracking-[-0.01em]`,children:`Data`})]}),(0,L.jsx)(`p`,{className:`m-0 max-w-[74ch] text-sm leading-relaxed text-muted`,children:`The databases the agents may read, test data made from specs and inserted as batches you can remove again, and the data flows between systems: did every record arrive, complete and correct.`}),i&&(0,L.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:i}),!n&&!i&&(0,L.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`}),n&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(t,{label:`Data`,current:u,onPick:e=>location.hash=b(`data`,e),tabs:R.map(e=>({id:e,label:_[e]}))}),g&&(g.running||z[g.kind]===u)&&(0,L.jsx)(U,{job:g,onStop:()=>void w.stop().then(d)}),(0,L.jsxs)(`div`,{role:`tabpanel`,id:`panel-${u}`,"aria-labelledby":`tab-${u}`,children:[u===`databases`&&(0,L.jsx)(q,{view:n,job:g,busy:o||p,act:m,sub:l[0]?decodeURIComponent(l[0]):void 0}),u===`testdata`&&(0,L.jsx)(Y,{view:n,job:g,busy:o||p,act:m}),u===`flows`&&(0,L.jsx)(Z,{view:n,job:g,busy:o||p,act:m})]})]})]})]})}export{Q as Data};
@@ -1 +0,0 @@
1
- import{A as e,At as t,Cn as n,En as r,Gn as i,H as a,Hn as o,S as s,U as c,at as l,ct as u,lt as d,mn as f,nt as p,q as m,r as h,rn as g,st as _,t as v}from"./frame-CHQgOaj6.js";import{t as y}from"./circle-dashed-CQKCycSk.js";import{n as b}from"./markdown-BPBR6Fva.js";import{C as x,s as S,w as C}from"./index-Hd8gmpz5.js";var w=i(o(),1),T=_(),E={ready:{label:`Ready`,tone:`pass`},partial:{label:`Ready, some parts need setup`,tone:`warn`},needs_setup:{label:`Needs setup`,tone:`neutral`}},D={models:`Models`,integrations:`Integrations`,monitor:`Monitor`,notifications:`Notifications`,agents:`Agents`,environments:`Environments`,containers:`Containers`,databases:`Databases`};async function O(e,t){try{let{id:t}=await n.start(e,{});location.hash=m(`chats`,t)}catch(e){t(e.message)}}function k({f:e,onScope:n,busy:i}){let[a,o]=(0,w.useState)(null),[s,f]=(0,w.useState)(``),[p,h]=(0,w.useState)(``);(0,w.useEffect)(()=>{r.detail(e.id).then(o,e=>f(e.message))},[e.id]);let g=e.gaps.filter(e=>!e.optional),_=e.gaps.filter(e=>e.optional);return(0,T.jsxs)(`div`,{className:`flex flex-col gap-4 py-4`,children:[[[g,`Needs`],[_,`Would do more with`]].map(([e,t])=>e.length?(0,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,T.jsx)(`span`,{className:`text-sm font-medium`,children:t}),(0,T.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-2 p-0`,children:e.map((e,n)=>(0,T.jsxs)(`li`,{className:`flex flex-col gap-0.5 rounded-[10px] bg-bg px-3 py-2 text-sm`,children:[(0,T.jsx)(`span`,{className:u(t===`Needs`?`text-ink`:`text-ink-2`),children:e.missing}),(0,T.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.fix}),e.settings&&(0,T.jsxs)(`a`,{href:m(`settings`,e.settings),className:`inline-flex items-center gap-1 self-start text-[13px] font-medium`,children:[(0,T.jsx)(x,{size:13,"aria-hidden":`true`}),`Set it up in Settings, `,D[e.settings]||e.settings]})]},n))})]},t):null),e.inputs.length>0&&(0,T.jsxs)(`p`,{className:`m-0 text-sm text-ink-2`,children:[`From your request: `,e.inputs.join(`; `),`.`]}),s&&(0,T.jsx)(`p`,{className:`m-0 text-sm text-fail`,children:s}),a&&(0,T.jsxs)(T.Fragment,{children:[a.examples.length>0&&(0,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,T.jsx)(`span`,{className:`text-sm font-medium`,children:`Ask for it like this`}),(0,T.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:a.examples.slice(0,4).map(n=>(0,T.jsxs)(l,{size:`sm`,disabled:e.state===`needs_setup`,title:e.state===`needs_setup`?`Set it up first`:`Start a chat with this request`,onClick:()=>void O(n,h),className:`h-auto min-h-8 max-w-full py-1.5 text-left whitespace-normal`,children:[(0,T.jsx)(t,{size:14,"aria-hidden":`true`,className:`flex-none`}),n]},n))}),p&&(0,T.jsx)(`span`,{className:`text-[13px] text-fail`,children:p})]}),a.limits.length>0&&(0,T.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,T.jsx)(`span`,{className:`text-sm font-medium`,children:`What it does not do`}),(0,T.jsx)(`ul`,{className:`m-0 list-disc pl-5 text-sm text-ink-2`,children:a.limits.map(e=>(0,T.jsx)(`li`,{children:e},e))})]}),a.docs.length>0&&(0,T.jsxs)(`details`,{children:[(0,T.jsxs)(`summary`,{className:`cursor-pointer text-sm font-medium`,children:[`How it works (`,d(a.docs.length,`section`),`)`]}),(0,T.jsx)(`div`,{className:`mt-2 flex flex-col gap-4`,children:a.docs.map(e=>(0,T.jsxs)(`section`,{className:`rounded-[12px] bg-bg px-4 py-3`,children:[(0,T.jsx)(`h4`,{className:`m-0 mb-1 text-sm font-semibold`,children:e.heading}),(0,T.jsx)(b,{text:e.text,className:`text-sm`})]},e.heading))})]}),(0,T.jsxs)(`span`,{className:`font-mono text-[11.5px] text-muted [overflow-wrap:anywhere]`,children:[`Tools: `,a.tools.join(`, `)]})]}),(0,T.jsxs)(`label`,{className:`flex flex-wrap items-center gap-3 border-t border-line-soft pt-3 text-sm`,children:[(0,T.jsxs)(`span`,{className:`flex-[1_1_240px]`,children:[`The agent gets its tools`,(0,T.jsx)(`span`,{className:`block text-[13px] text-muted`,children:`agent.capabilities in forgeqe.yaml`})]}),(0,T.jsxs)(c,{value:e.scope,disabled:i,onChange:e=>n(e.target.value),className:`w-[240px]`,children:[(0,T.jsx)(`option`,{value:`auto`,children:`When a request is about it`}),(0,T.jsx)(`option`,{value:`always`,children:`Always`}),(0,T.jsx)(`option`,{value:`off`,children:`Never, in this project`})]})]})]})}function A(){let[t,n]=(0,w.useState)(null),[i,o]=(0,w.useState)(``),[c,l]=(0,w.useState)(``),[d,m]=(0,w.useState)(`all`),[_,b]=(0,w.useState)(``),[x,D]=(0,w.useState)(!1),O=(0,w.useCallback)(()=>r.view().then(n,e=>o(e.message)),[]);(0,w.useEffect)(()=>void O(),[O]);let A=(0,w.useMemo)(()=>{let e=_.toLowerCase().split(/\s+/).filter(Boolean);return(t?.areas||[]).map(t=>({...t,features:t.features.filter(n=>(d===`all`||(d===`ready`?n.state!==`needs_setup`:n.state!==`ready`))&&e.every(e=>`${n.title} ${n.summary} ${t.area}`.toLowerCase().includes(e)))})).filter(e=>e.features.length)},[t,d,_]),j=async(e,t)=>{D(!0);try{n(await r.scope(e,t)),o(``)}catch(e){o(e.message)}finally{D(!1)}},M=t?.counts;return(0,T.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,T.jsx)(h,{}),(0,T.jsxs)(`main`,{className:u(v,`flex-auto gap-5`),children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,T.jsx)(p,{icon:f,size:`lg`}),(0,T.jsx)(`h1`,{className:`m-0 flex-1 text-[26px] font-semibold tracking-[-0.01em]`,children:`What's ready`})]}),(0,T.jsx)(`p`,{className:`m-0 max-w-[70ch] text-sm leading-relaxed text-muted`,children:`Everything ForgeQE can do, and whether it works here: in this project, with these settings, on this machine. Each one says what it still needs and where to set it up, and how to ask for it.`}),i&&(0,T.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:i}),!t&&!i&&(0,T.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`}),t&&M&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,T.jsx)(s,{icon:f,label:`Ready`,value:String(M.ready)}),(0,T.jsx)(s,{icon:g,label:`Some parts need setup`,value:String(M.partial)}),(0,T.jsx)(s,{icon:y,label:`Need setup`,value:String(M.needs_setup)})]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsx)(`div`,{role:`radiogroup`,"aria-label":`Show`,className:`flex gap-1 rounded-[10px] bg-surface-strong p-1`,children:[[`all`,`All`],[`needs`,`Needs setup`],[`ready`,`Ready`]].map(([e,t])=>(0,T.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":d===e,onClick:()=>m(e),className:u(`min-h-8 cursor-pointer rounded-[7px] border-0 px-3.5 text-sm font-medium`,d===e?`bg-bg text-ink shadow-sm`:`bg-transparent text-muted hover:text-ink`),children:t},e))}),(0,T.jsxs)(`div`,{className:`relative min-w-0 flex-[1_1_220px]`,children:[(0,T.jsx)(C,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted`}),(0,T.jsx)(a,{type:`search`,"aria-label":`Find a feature`,value:_,placeholder:`Find a feature`,onChange:e=>b(e.target.value),className:`pl-9`})]})]}),A.length===0&&(0,T.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Nothing matches.`}),A.map(t=>(0,T.jsxs)(`section`,{"aria-labelledby":`area-${t.area}`,children:[(0,T.jsx)(`h2`,{id:`area-${t.area}`,className:`m-0 mb-1 text-base font-semibold`,children:t.area}),t.features.map(t=>(0,T.jsx)(e,{title:t.title,meta:(0,T.jsx)(`span`,{className:u(c!==t.id&&`line-clamp-2`),children:t.summary}),open:c===t.id,onToggle:()=>l(c===t.id?``:t.id),state:(0,T.jsxs)(`span`,{className:`flex flex-wrap items-center justify-end gap-1.5`,children:[t.scope!==`auto`&&(0,T.jsx)(S,{tone:`neutral`,icon:!1,children:t.scope===`always`?`Always given`:`Off here`}),(0,T.jsx)(S,{tone:E[t.state].tone,icon:t.state!==`needs_setup`,children:E[t.state].label})]}),children:(0,T.jsx)(k,{f:t,busy:x,onScope:e=>void j(t.id,e)})},t.id))]},t.area)),t.outOfScope.length>0&&(0,T.jsxs)(`section`,{"aria-labelledby":`oos-h`,className:`flex flex-col gap-2 rounded-[14px] border border-line-soft px-4 py-3`,children:[(0,T.jsx)(`h2`,{id:`oos-h`,className:`m-0 text-base font-semibold`,children:`Not what ForgeQE does`}),(0,T.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0 text-sm`,children:t.outOfScope.map(e=>(0,T.jsxs)(`li`,{children:[e.what,e.instead?(0,T.jsxs)(`span`,{className:`text-muted`,children:[`; instead: `,e.instead]}):null]},e.what))})]})]})]})]})}export{A as Features};
@@ -1,3 +0,0 @@
1
- import{Dt as e,Et as t,Fn as n,G as r,Gn as i,H as a,Hn as o,K as s,Nt as c,S as l,U as u,Vt as d,_n as f,at as p,ct as m,fn as h,ht as g,it as _,kn as v,nt as y,pn as b,q as x,r as S,rt as C,sn as w,st as T,t as E,tt as D,wt as O,xt as k}from"./frame-CHQgOaj6.js";import{n as A,t as j}from"./markdown-BPBR6Fva.js";import{t as M}from"./external-link-B45wnQ3R.js";import{t as ee}from"./terminal-BZSHVR9y.js";import{D as N,j as P,k as F,s as I,y as L}from"./index-Hd8gmpz5.js";var R={name:`calendar-plus`,size:24,node:[[`path`,{d:`M16 18h6`,key:`987eiv`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M19 15v6`,key:`10aioa`}],[`path`,{d:`M21 11.5V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h8.3`,key:`jgwkxf`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}]]};R.node;var z=f(R),B={name:`power`,size:24,node:[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]};B.node;var V=f(B),H={name:`search-check`,size:24,node:[[`path`,{d:`m8 11 2 2 4-4`,key:`1sed1v`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]};H.node;var U=f(H),W={name:`timer-off`,size:24,node:[[`path`,{d:`M10 2h4`,key:`n1abiw`}],[`path`,{d:`M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7`,key:`10he05`}],[`path`,{d:`M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2`,key:`15f7sh`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M12 12v-2`,key:`fwoke6`}]]};W.node;var G=f(W),K=i(o(),1),q=T(),J={monitor:`Monitor`,suite:`Suite`,run:`Browser run`,heal:`Heal`,"pr-tests":`PR tests`,pack:`Pack`,pipeline:`Pipeline watch`},Y={running:{label:`Running`,tone:`running`},passed:{label:`Passed`,tone:`pass`},failed:{label:`Failed`,tone:`fail`},stopped:{label:`Stopped`,tone:`neutral`},timed_out:{label:`Timed out`,tone:`fail`},interrupted:{label:`Interrupted`,tone:`warn`}},X=e=>{if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString([],{month:`short`,day:`numeric`,...t.getFullYear()===new Date().getFullYear()?{}:{year:`numeric`},hour:`numeric`,minute:`2-digit`})},Z=e=>{if(!e.endedAt)return``;let t=Math.max(0,Math.round((Date.parse(e.endedAt)-Date.parse(e.startedAt))/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`};function Q(e){return e.running?Y.running:e.enabled?e.last?Y[e.last.status]:{label:`Not run yet`,tone:`neutral`}:{label:`Disabled`,tone:`neutral`}}var te={pass:`bg-pass`,fail:`bg-fail`,warn:`bg-warn`,running:`bg-accent`,neutral:`bg-line`};function $({label:e,icon:t,children:n}){return(0,q.jsxs)(`div`,{className:`flex min-h-[48px] flex-wrap items-baseline gap-x-4 gap-y-1 border-t border-line-soft py-2.5`,children:[(0,q.jsxs)(`span`,{className:`flex w-[170px] flex-none items-center gap-2 text-sm text-muted`,children:[t&&(0,q.jsx)(t,{size:16,"aria-hidden":`true`,className:`flex-none`}),e]}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 text-sm [overflow-wrap:anywhere]`,children:n})]})}function ne({m:e,rounds:n}){let[r,i]=(0,K.useState)(``);return(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsxs)(`h3`,{className:`m-0 mb-1 flex items-center gap-2 text-base font-semibold`,children:[(0,q.jsx)(F,{size:18,"aria-hidden":`true`,className:`text-accent-fg`}),`Monitor`]}),(0,q.jsx)($,{icon:c,label:`Checks`,children:e.checks.length?(0,q.jsx)(A,{text:e.checks.map(e=>`\`${e.replace(/`/g,``)}\``).join(`, `),className:`text-sm [&_p]:my-0`}):`The checks in forgeqe.yaml (monitor.checks)`}),(0,q.jsxs)($,{icon:b,label:`Alerts after`,children:[e.failAfter,` failing round`,e.failAfter===1?``:`s`,` in a row`,e.remind?`, again every ${e.remind} while it keeps failing`:``]}),(0,q.jsx)($,{icon:k,label:`Alerts go to`,children:e.alerts.length?e.alerts.join(` and `):`Nowhere yet: add Teams or email in Settings, Monitor`}),(0,q.jsxs)($,{icon:t,label:`Each round`,children:[e.parallel,` check`,e.parallel===1?``:`s`,` at once; a recorded run `,e.replay===`trust`?`is trusted`:e.replay===`off`?`is not replayed`:`is verified with one model call`]}),(0,q.jsx)($,{icon:d,label:`Rounds kept in`,children:(0,q.jsx)(j,{path:e.outDir})}),(0,q.jsx)(`p`,{className:`m-0 border-t border-line-soft py-2.5 text-sm`,children:(0,q.jsx)(`a`,{href:x(`settings`,`monitor`),children:`Change the monitor in Settings`})}),(0,q.jsx)(`h4`,{className:`m-0 mt-3 mb-1 text-sm font-semibold`,children:`Latest rounds`}),r&&(0,q.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:r}),n.length===0?(0,q.jsx)(`p`,{className:`m-0 border-t border-line-soft py-3 text-sm text-muted`,children:`No rounds yet.`}):(0,q.jsx)(`ul`,{className:`m-0 list-none p-0`,children:n.slice(0,8).map(e=>(0,q.jsxs)(`li`,{className:`flex min-h-[48px] items-center gap-3 border-t border-line-soft py-2`,children:[(0,q.jsxs)(I,{tone:e.counts.failed?`fail`:`pass`,children:[e.counts.passed,`/`,e.counts.total,` passed`]}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:X(e.startedAt)}),e.report?(0,q.jsxs)(p,{size:`sm`,"aria-label":`Open the report of the round of ${X(e.startedAt)} in a new tab`,onClick:async()=>i(await s(e.report)),children:[(0,q.jsx)(M,{size:14,"aria-hidden":`true`}),`Open report`]}):(0,q.jsx)(j,{path:e.folder})]},e.key))})]})}function re({jobId:e,run:t}){let[n,r]=(0,K.useState)(null),[i,a]=(0,K.useState)(``);(0,K.useEffect)(()=>{let n=!1;r(null);let i=()=>v.log(e,t.id).then(e=>!n&&r(e.lines),e=>!n&&a(e.message));i();let o=t.status===`running`?setInterval(i,2e3):void 0;return()=>{n=!0,o&&clearInterval(o)}},[e,t.id,t.status]);let o=Math.max(2,...(n||[]).map(e=>Math.max(0,...(e.match(/`+/g)||[]).map(e=>e.length)))),s="`".repeat(o+1),c=[`**${Y[t.status].label}**${t.endedAt?` after ${Z(t)}`:``}${t.exitCode!==void 0&&t.exitCode!==null?`, exit ${t.exitCode}`:``}. Started ${X(t.startedAt)}, ${t.reason===`asked`?`asked for`:`on schedule`}.`,...t.investigating?[``,`_Its failures are being investigated._`]:[],...t.findings?.length?[``,`**Investigated:**`,...t.findings.map(e=>`- ${e.verdict}: ${e.tests.map(e=>`\`${e.replace(/`/g,``)}\``).join(`, `)}${e.branch?` on branch \`${e.branch.replace(/`/g,``)}\``:``}`)]:[],...t.investigationNote?[``,t.investigationNote]:[],``,`${s}text`,...n||[],s].join(`
2
- `);return(0,q.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-[12px] border border-line-soft bg-surface-muted px-4 py-3`,children:[i&&(0,q.jsx)(`p`,{className:`m-0 text-sm text-fail`,children:i}),!n&&!i?(0,q.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Reading its output…`}):(0,q.jsx)(A,{text:c,className:`text-sm [&_pre]:max-h-[320px] [&_pre]:overflow-auto`})]})}function ie({job:t,rounds:n,busy:r,act:i}){let[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(null),[u,d]=(0,K.useState)(!1),f=`${t.running?.id}|${t.last?.id}|${t.last?.status}`;(0,K.useEffect)(()=>{let e=!1;return v.detail(t.id).then(t=>{e||(o(t.runs),c(e=>e??t.runs[0]?.id??null))},()=>{}),()=>{e=!0}},[t.id,f]),(0,K.useEffect)(()=>{c(null),d(!1)},[t.id]);let m=Q(t),_=a?.filter(e=>e.status===`passed`).length??0,y=a?.filter(e=>e.status!==`running`).length??0;return(0,q.jsxs)(`section`,{"aria-labelledby":`job-h`,className:`flex min-w-0 flex-1 flex-col gap-5`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-start gap-x-3 gap-y-3`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-1`,children:[(0,q.jsx)(`h2`,{id:`job-h`,className:`m-0 text-[22px] font-semibold tracking-[-0.01em] [overflow-wrap:anywhere]`,children:t.name}),(0,q.jsxs)(`span`,{className:`text-sm text-muted`,children:[J[t.kind]||t.kind,` · `,t.schedule]})]}),(0,q.jsx)(I,{tone:m.tone,children:m.label}),t.running?(0,q.jsxs)(p,{disabled:r,onClick:()=>i(`stop`),children:[(0,q.jsx)(g,{size:14,fill:`currentColor`,"aria-hidden":`true`}),`Stop`]}):(0,q.jsxs)(p,{variant:`primary`,disabled:r,onClick:()=>i(`run`),children:[(0,q.jsx)(e,{size:16,"aria-hidden":`true`}),`Run now`]})]}),(0,q.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,q.jsx)(l,{icon:O,label:`Runs kept`,value:String(a?.length??`–`)}),(0,q.jsx)(l,{icon:P,label:`Passed`,value:y?`${Math.round(_/y*100)}%`:`–`,note:y?`${_} of ${y}`:void 0}),(0,q.jsx)(l,{icon:w,label:`Next run`,value:t.nextAt?new Date(t.nextAt).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`}):`–`,note:t.nextAt?X(t.nextAt):t.enabled?void 0:`Disabled`})]}),(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,q.jsx)($,{icon:ee,label:`Runs`,children:(0,q.jsx)(A,{text:`\`${t.command.replace(/`/g,``)}\``,className:`text-sm [&_p]:my-0`})}),(0,q.jsx)($,{icon:w,label:`When`,children:t.schedule}),(0,q.jsx)($,{icon:V,label:`Enabled`,children:(0,q.jsx)(D,{checked:t.enabled,disabled:r,onChange:e=>i(e?`enable`:`disable`),label:`${t.name} enabled`})}),(0,q.jsxs)($,{icon:G,label:`Stopped after`,children:[t.timeoutMs?t.timeoutMs%36e5==0?`${t.timeoutMs/36e5} hour${t.timeoutMs===36e5?``:`s`}`:`${Math.round(t.timeoutMs/6e4)} minutes`:`the service's default`,` of running`]}),(0,q.jsx)($,{icon:h,label:`Tells the team`,children:t.notify?`When it fails, recovers or ends (the notify channels that take job events)`:t.kind===`monitor`?`The monitor sends its own alerts`:`No`}),(0,q.jsx)($,{icon:U,label:`Investigates failures`,children:t.investigate?`Yes, on branches of their own`:`No`}),(0,q.jsxs)($,{icon:z,label:`Added`,children:[X(t.createdAt),` `,t.by===`agent`?`by ForgeQE's agent, after you agreed`:`from the command line or here`]})]}),t.monitor&&(0,q.jsx)(ne,{m:t.monitor,rounds:n}),(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`h3`,{className:`m-0 mb-1 text-base font-semibold`,children:`Runs`}),a?a.length===0?(0,q.jsx)(`p`,{className:`m-0 border-t border-line-soft py-3 text-sm text-muted`,children:`No runs yet. Run now starts one.`}):(0,q.jsx)(`ul`,{className:`m-0 list-none p-0`,children:a.map(e=>(0,q.jsxs)(`li`,{className:`border-t border-line-soft`,children:[(0,q.jsxs)(`button`,{type:`button`,"aria-expanded":s===e.id,onClick:()=>c(s===e.id?null:e.id),className:`flex min-h-[52px] w-full cursor-pointer items-center gap-3 border-0 bg-transparent px-1 py-2 text-left text-ink hover:bg-surface-muted`,children:[(0,q.jsx)(I,{tone:Y[e.status].tone,children:Y[e.status].label}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:[X(e.startedAt),(0,q.jsxs)(`span`,{className:`text-muted`,children:[` `,`· `,e.reason===`asked`?`asked for`:`scheduled`,Z(e)?` · ${Z(e)}`:``]})]}),e.summary?.length?(0,q.jsx)(`span`,{className:`hidden max-w-[40%] truncate text-[13px] text-muted sm:inline`,children:e.summary.at(-1)}):null]}),(0,q.jsx)(C,{open:s===e.id,children:(0,q.jsx)(`div`,{className:`pb-3`,children:(0,q.jsx)(re,{jobId:t.id,run:e})})})]},e.id))}):(0,q.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Loading…`})]}),(0,q.jsx)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-line-soft pt-4`,children:u?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`span`,{className:`text-sm text-ink-2`,children:[`Remove `,t.name,`? Its runs and logs go with it.`]}),(0,q.jsx)(p,{disabled:r,onClick:()=>i(`remove`),className:`border-fail text-fail hover:bg-fail-soft`,children:`Remove`}),(0,q.jsx)(p,{onClick:()=>d(!1),children:`Keep it`})]}):(0,q.jsxs)(p,{variant:`ghost`,onClick:()=>d(!0),className:`text-fail`,children:[(0,q.jsx)(L,{size:16,"aria-hidden":`true`}),`Remove this job`]})})]})}function ae({open:e,onClose:t,commands:n,initial:i,onAdded:o}){let[s,c]=(0,K.useState)(``),[l,d]=(0,K.useState)(`suite`),[f,m]=(0,K.useState)(``),[h,g]=(0,K.useState)(`every`),[_,y]=(0,K.useState)(`30m`),[b,x]=(0,K.useState)(`0 2 * * 1-5`),[S,C]=(0,K.useState)(!0),[w,T]=(0,K.useState)(``),[E,O]=(0,K.useState)(!1);(0,K.useEffect)(()=>{e&&(c(i?.name??``),d(i?.command??`suite`),m(i?.args??``),g(`every`),y(i?.every??`30m`),C(i?.command!==`monitor`),T(``))},[e,i]);let k=async()=>{O(!0),T(``);try{o(await v.add({name:s.trim(),command:l,args:f,...h===`every`?{every:_}:h===`cron`?{cron:b}:{now:!0},notify:S}),s.trim())}catch(e){T(e.message)}finally{O(!1)}},A=`flex flex-col gap-1.5 py-3`;return(0,q.jsx)(r,{open:e,onClose:t,title:`Add a job`,description:`A ForgeQE command the jobs service runs on a schedule, or once now, in a process of its own; it keeps going with this page closed.`,footer:(0,q.jsxs)(q.Fragment,{children:[w&&(0,q.jsx)(`span`,{role:`alert`,className:`mr-auto self-center text-sm text-fail [overflow-wrap:anywhere]`,children:w}),(0,q.jsx)(p,{onClick:t,children:`Cancel`}),(0,q.jsx)(p,{variant:`primary`,disabled:E||!s.trim(),onClick:()=>void k(),children:E?`Adding…`:`Add job`})]}),children:(0,q.jsxs)(`div`,{className:`flex flex-col pt-3`,children:[(0,q.jsxs)(`div`,{className:A,children:[(0,q.jsx)(`label`,{htmlFor:`job-name`,className:`font-medium`,children:`Name`}),(0,q.jsx)(a,{id:`job-name`,value:s,spellCheck:!1,placeholder:`nightly-smoke`,onChange:e=>c(e.target.value)}),(0,q.jsx)(`span`,{className:`text-sm text-muted`,children:`Letters, digits and dashes.`})]}),(0,q.jsxs)(`div`,{className:A,children:[(0,q.jsx)(`label`,{htmlFor:`job-command`,className:`font-medium`,children:`Runs`}),(0,q.jsx)(u,{id:`job-command`,value:l,onChange:e=>d(e.target.value),children:n.map(e=>(0,q.jsxs)(`option`,{value:e,children:[`forgeqe `,e]},e))})]}),(0,q.jsxs)(`div`,{className:A,children:[(0,q.jsx)(`label`,{htmlFor:`job-args`,className:`font-medium`,children:`With`}),(0,q.jsx)(a,{id:`job-args`,value:f,spellCheck:!1,placeholder:l===`monitor`?`Empty: the checks in forgeqe.yaml`:`checks/smoke.yaml --parallel 2`,onChange:e=>m(e.target.value),className:`font-mono text-[13px]`}),(0,q.jsx)(`span`,{className:`text-sm text-muted`,children:`Test case sources and flags, as you would type them after the command. "…" keeps spaces in one. Nothing goes through a shell.`})]}),(0,q.jsxs)(`fieldset`,{className:`m-0 flex flex-col gap-2 border-0 p-0 py-3`,children:[(0,q.jsx)(`legend`,{className:`mb-1 font-medium`,children:`When`}),[[`every`,`Every`],[`cron`,`On a schedule (cron, this machine's time)`],[`once`,`Once, now`]].map(([e,t])=>(0,q.jsxs)(`label`,{className:`flex min-h-10 cursor-pointer items-center gap-3`,children:[(0,q.jsx)(`input`,{type:`radio`,name:`job-when`,checked:h===e,onChange:()=>g(e),className:`size-4 accent-accent`}),(0,q.jsx)(`span`,{className:`flex-none`,children:t}),e===`every`&&h===`every`&&(0,q.jsx)(a,{"aria-label":`Every`,value:_,onChange:e=>y(e.target.value),placeholder:`30m`,className:`max-w-[120px] font-mono text-[13px]`}),e===`cron`&&h===`cron`&&(0,q.jsx)(a,{"aria-label":`Cron schedule`,value:b,onChange:e=>x(e.target.value),className:`max-w-[180px] font-mono text-[13px]`})]},e))]}),(0,q.jsxs)(`div`,{className:`flex items-center gap-4 py-3`,children:[(0,q.jsxs)(`span`,{className:`flex flex-1 flex-col gap-0.5`,children:[(0,q.jsx)(`span`,{className:`font-medium`,children:`Tell the team`}),(0,q.jsx)(`span`,{className:`text-sm text-muted`,children:`When it fails, recovers or ends, on the notify channels that take job events. A monitor sends its own alerts.`})]}),(0,q.jsx)(D,{checked:S,onChange:C,label:`Tell the team`})]})]})})}function oe({sub:e}){let[t,r]=(0,K.useState)(null),[i,a]=(0,K.useState)([]),[o,s]=(0,K.useState)(``),[c,l]=(0,K.useState)(!1),[u,d]=(0,K.useState)(null),f=(0,K.useCallback)(()=>{v.list().then(e=>{r(e),s(``)},e=>s(e.message))},[]);(0,K.useEffect)(f,[f]),(0,K.useEffect)(()=>{n.list().then(e=>a(e.rows.filter(e=>e.scope===`monitor`)),()=>{})},[t?.jobs.map(e=>e.last?.id).join()]);let h=t?.jobs.some(e=>e.running);(0,K.useEffect)(()=>{let e=setInterval(f,h?3e3:2e4);return()=>clearInterval(e)},[f,h]);let g=e?decodeURIComponent(e):``,b=t?.jobs.find(e=>e.id===g)||t?.jobs[0],C=(0,K.useMemo)(()=>t?.jobs.filter(e=>e.kind===`monitor`)??[],[t]),T=(0,K.useMemo)(()=>t?.jobs.filter(e=>e.kind!==`monitor`)??[],[t]),D=async e=>{if(b){l(!0),s(``);try{r(e===`remove`?await v.remove(b.id):await v.act(b.id,e)),e===`remove`&&(location.hash=x(`jobs`))}catch(e){s(e.message)}finally{l(!1)}}},O=e=>{let t=Q(e),n=b?.id===e.id;return(0,q.jsx)(`li`,{children:(0,q.jsxs)(`a`,{href:x(`jobs`,encodeURIComponent(e.id)),"aria-current":n?`page`:void 0,className:m(`flex min-h-[60px] items-center gap-3 rounded-[12px] px-3 py-2 text-ink no-underline`,n?`bg-surface-strong hover:text-ink`:`hover:bg-surface-muted hover:text-ink`),children:[e.running?(0,q.jsx)(_,{label:t.label,px:16}):(0,q.jsx)(`span`,{"aria-label":t.label,className:m(`size-2.5 flex-none rounded-full`,te[t.tone])}),(0,q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,q.jsx)(`span`,{className:`truncate text-[15px] font-medium`,children:e.name}),(0,q.jsx)(`span`,{className:`truncate text-[13px] text-muted`,children:[t.label,e.schedule,e.nextAt&&e.enabled?`next ${X(e.nextAt)}`:``].filter(Boolean).join(` · `)})]})]})},e.id)};return(0,q.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,q.jsx)(S,{}),(0,q.jsxs)(`main`,{className:m(E,`@container flex-auto gap-4`),children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,children:[(0,q.jsx)(y,{icon:w,size:`lg`}),(0,q.jsx)(`h1`,{className:`m-0 text-[26px] font-semibold tracking-[-0.01em]`,children:`Jobs`}),t&&(0,q.jsx)(I,{tone:t.service.running?`pass`:`neutral`,children:t.service.running?`Service running since ${X(t.service.startedAt)}`:`Service stopped: jobs wait until it starts`}),(0,q.jsx)(`div`,{className:`flex-auto`}),(0,q.jsxs)(p,{variant:`primary`,disabled:!t,onClick:()=>d({}),children:[(0,q.jsx)(N,{size:16,"aria-hidden":`true`}),`Add a job`]})]}),(0,q.jsx)(`p`,{className:`m-0 max-w-[70ch] text-sm leading-relaxed text-muted`,children:`ForgeQE commands that run on a schedule, or once, in a service of their own, so they keep going while you work on something else or with this page closed: monitors, suites, packs and pipeline watches.`}),o&&(0,q.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:o}),!t&&!o&&(0,q.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`}),t?.monitor&&!t.monitor.scheduled&&(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-3 rounded-[14px] border border-accent-line bg-accent-soft px-4 py-3`,children:[(0,q.jsx)(F,{size:20,"aria-hidden":`true`,className:`flex-none text-accent-fg`}),(0,q.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_300px] flex-col gap-0.5 text-sm`,children:[(0,q.jsx)(`span`,{className:`font-medium`,children:`The monitor in forgeqe.yaml is not scheduled`}),(0,q.jsxs)(`span`,{className:`text-ink-2`,children:[t.monitor.checks.length,` check`,t.monitor.checks.length===1?``:`s`,`, every `,t.monitor.every,`. As a job it runs a round each time, with this page closed.`]})]}),(0,q.jsx)(p,{onClick:()=>d({name:`monitor`,command:`monitor`,args:``,every:t.monitor.every}),children:`Schedule it`})]}),t&&(0,q.jsxs)(`div`,{className:`flex flex-col gap-6 @2xl:flex-row @2xl:items-start @2xl:gap-8`,children:[(0,q.jsxs)(`nav`,{"aria-label":`Jobs`,className:`flex min-w-0 flex-col gap-4 @2xl:sticky @2xl:top-6 @2xl:w-[250px] @2xl:flex-none`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsxs)(`span`,{className:`flex items-center gap-2 px-3 text-[13px] font-medium text-muted`,children:[(0,q.jsx)(F,{size:14,"aria-hidden":`true`}),`Monitoring (`,C.length,`)`]}),C.length?(0,q.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:C.map(O)}):(0,q.jsx)(`p`,{className:`m-0 px-3 py-2 text-sm text-muted`,children:`No monitor jobs.`})]}),(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsxs)(`span`,{className:`flex items-center gap-2 px-3 text-[13px] font-medium text-muted`,children:[(0,q.jsx)(w,{size:14,"aria-hidden":`true`}),`Other jobs (`,T.length,`)`]}),T.length?(0,q.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:T.map(O)}):(0,q.jsx)(`p`,{className:`m-0 px-3 py-2 text-sm text-muted`,children:`None.`})]}),t.events.length>0&&(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`px-3 text-[13px] font-medium text-muted`,children:`Recent activity`}),(0,q.jsx)(A,{text:t.events.slice(0,12).map(e=>`- \`${X(e.at)}\` ${e.text.replace(/([\\`*_[\]<>#|~!])/g,`\\$1`)}`).join(`
3
- `),className:`px-3 text-[13px] text-ink-2 [&_li]:my-1 [&_ul]:my-0 [&_ul]:pl-4`})]})]}),b?(0,q.jsx)(ie,{job:b,rounds:i,busy:c,act:D}):(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col items-start gap-3 rounded-[18px] border border-line p-6`,children:[(0,q.jsx)(w,{size:24,"aria-hidden":`true`,className:`text-muted`}),(0,q.jsx)(`p`,{className:`m-0 max-w-[60ch] leading-relaxed text-ink-2`,children:`No jobs yet. Add one to run a suite every night, a monitor every 15 minutes, or watch a CI pipeline.`}),(0,q.jsx)(p,{onClick:()=>d({}),children:`Add a job`})]})]})]}),(0,q.jsx)(ae,{open:!!u,onClose:()=>d(null),commands:t?.commands??[],initial:u??void 0,onAdded:(e,t)=>{r(e),d(null);let n=e.jobs.find(e=>e.name===t);n&&(location.hash=x(`jobs`,encodeURIComponent(n.id)))}})]})}export{oe as Jobs};