dirigent-server 0.12.0__tar.gz → 0.13.0__tar.gz

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 (164) hide show
  1. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/PKG-INFO +1 -1
  2. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/pyproject.toml +1 -1
  3. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/pyproject.toml.orig +1 -1
  4. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/alerts.py +11 -5
  5. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/runs.py +79 -87
  6. dirigent_server-0.12.0/src/dirigent_server/static/assets/AdminOnly-DaihxNZC.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/AdminOnly-ChPFWSCk.js +1 -1
  7. dirigent_server-0.13.0/src/dirigent_server/static/assets/Alerting-DH5lSFHB.js +1 -0
  8. dirigent_server-0.12.0/src/dirigent_server/static/assets/Blocks-DAo8_PG9.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/Blocks-CBpLFYQo.js +1 -1
  9. dirigent_server-0.12.0/src/dirigent_server/static/assets/Breadcrumb-C8mERKVl.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/Breadcrumb-KS3i4O6Q.js +1 -1
  10. dirigent_server-0.12.0/src/dirigent_server/static/assets/CodeEditor-CeCQ17xS.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/CodeEditor-cfjDMRpA.js +1 -1
  11. dirigent_server-0.13.0/src/dirigent_server/static/assets/Connections-CHOMJC7y.js +1 -0
  12. dirigent_server-0.13.0/src/dirigent_server/static/assets/Dashboard-Dbc7eWnn.js +1 -0
  13. dirigent_server-0.13.0/src/dirigent_server/static/assets/Description-DVFPKyRO.js +2 -0
  14. dirigent_server-0.12.0/src/dirigent_server/static/assets/JsonBlock-CE3Z9rOk.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/JsonBlock-CJ30Zb39.js +1 -1
  15. dirigent_server-0.12.0/src/dirigent_server/static/assets/Markdown-CttJCcht.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/Markdown-B6er3LhH.js +1 -1
  16. dirigent_server-0.12.0/src/dirigent_server/static/assets/Overview-D25nQ1mY.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/Overview-DOWTLAA0.js +1 -1
  17. dirigent_server-0.12.0/src/dirigent_server/static/assets/PageState-CvfT4nGl.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/PageState-CTB50fRO.js +1 -1
  18. dirigent_server-0.12.0/src/dirigent_server/static/assets/Panel-Cb5LtMYX.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/Panel-Bk3CoJZ6.js +1 -1
  19. dirigent_server-0.13.0/src/dirigent_server/static/assets/Picker-DiLS0eON.js +1 -0
  20. dirigent_server-0.13.0/src/dirigent_server/static/assets/PipelineEditor-6pcE1OrR.js +2 -0
  21. dirigent_server-0.12.0/src/dirigent_server/static/assets/PipelineGraph-VDlVb6oE.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/PipelineGraph-HaxpLDYk.js +1 -1
  22. dirigent_server-0.12.0/src/dirigent_server/static/assets/PipelinePreview-XjwlgU-a.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/PipelinePreview-ChkpwVTd.js +1 -1
  23. dirigent_server-0.12.0/src/dirigent_server/static/assets/PipelineTab-DkpDNs3l.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/PipelineTab-B_LAnOAD.js +2 -2
  24. dirigent_server-0.13.0/src/dirigent_server/static/assets/Refusal-BJLvb6gD.js +1 -0
  25. dirigent_server-0.13.0/src/dirigent_server/static/assets/RunDetail-CMC8TCo_.js +3 -0
  26. dirigent_server-0.12.0/src/dirigent_server/static/assets/RunGraph-iHPOD_w8.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/RunGraph-sL3fQFFh.js +1 -1
  27. dirigent_server-0.13.0/src/dirigent_server/static/assets/SchemaForm-BpeJKHjN.js +1 -0
  28. dirigent_server-0.12.0/src/dirigent_server/static/assets/Schemas-B4DAs5a7.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/Schemas-THJMNYrJ.js +2 -2
  29. dirigent_server-0.13.0/src/dirigent_server/static/assets/Segmented-DvCzioEn.js +1 -0
  30. dirigent_server-0.13.0/src/dirigent_server/static/assets/SettingsDialog-DFHCelV4.js +1 -0
  31. dirigent_server-0.12.0/src/dirigent_server/static/assets/TileCard-D1sr4_Pk.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/TileCard-C9t5bFGN.js +1 -1
  32. dirigent_server-0.13.0/src/dirigent_server/static/assets/Triggers-C1ZYm8vx.js +1 -0
  33. dirigent_server-0.12.0/src/dirigent_server/static/assets/Users-D0Ha-Dwb.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/Users-CLFcgtBa.js +1 -1
  34. dirigent_server-0.13.0/src/dirigent_server/static/assets/WindowedPane-CSN_GUHP.js +1 -0
  35. dirigent_server-0.13.0/src/dirigent_server/static/assets/Workers-CHN6ph0B.js +1 -0
  36. dirigent_server-0.12.0/src/dirigent_server/static/assets/WorkersTable-C_fx8dTx.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/WorkersTable-CVzqLA-a.js +1 -1
  37. dirigent_server-0.12.0/src/dirigent_server/static/assets/auth-tGoFbaSP.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/auth-DZcJKVvz.js +1 -1
  38. dirigent_server-0.12.0/src/dirigent_server/static/assets/badge-DJ6MGkEI.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/badge-LkJ4rIEc.js +1 -1
  39. dirigent_server-0.12.0/src/dirigent_server/static/assets/blocks-DkD_WaQ6.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/blocks-CPJMNxIu.js +1 -1
  40. dirigent_server-0.12.0/src/dirigent_server/static/assets/connections-DORVdX7a.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/connections-BNOH5aGu.js +1 -1
  41. dirigent_server-0.12.0/src/dirigent_server/static/assets/dropdown-menu-DTSgujsZ.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/dropdown-menu-B9iU0HGD.js +1 -1
  42. dirigent_server-0.13.0/src/dirigent_server/static/assets/index-CeUoyQJy.js +53 -0
  43. dirigent_server-0.13.0/src/dirigent_server/static/assets/index-Cnw-C6y9.css +2 -0
  44. dirigent_server-0.13.0/src/dirigent_server/static/assets/input-7d4ZlAGD.js +1 -0
  45. dirigent_server-0.12.0/src/dirigent_server/static/assets/jsonMode-CrarWqyF.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/jsonMode-DC1hnmsD.js +1 -1
  46. dirigent_server-0.12.0/src/dirigent_server/static/assets/paging-MGEIXfCZ.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/paging-CZR9Tg8m.js +1 -1
  47. dirigent_server-0.12.0/src/dirigent_server/static/assets/pipelines-C9zjqLmS.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/pipelines-D_CSKLu-.js +1 -1
  48. dirigent_server-0.12.0/src/dirigent_server/static/assets/resolveAriaLabelledBy-BSPxlOXj.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/resolveAriaLabelledBy-CtPQ1em7.js +1 -1
  49. dirigent_server-0.13.0/src/dirigent_server/static/assets/sql-NEE52Syq.js +1 -0
  50. dirigent_server-0.12.0/src/dirigent_server/static/assets/triggers-Bk6judIf.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/triggers-DwUJXGxD.js +1 -1
  51. dirigent_server-0.13.0/src/dirigent_server/static/assets/twig-De2hgUGE.js +1 -0
  52. dirigent_server-0.12.0/src/dirigent_server/static/assets/users-xhJLEYNg.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/users-wbUmMgn8.js +1 -1
  53. dirigent_server-0.12.0/src/dirigent_server/static/assets/workers-D2C0PSb8.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/workers-Bforr_yR.js +1 -1
  54. dirigent_server-0.12.0/src/dirigent_server/static/assets/yaml-B8bSwfJE.js → dirigent_server-0.13.0/src/dirigent_server/static/assets/yaml-Vu_1GF43.js +1 -1
  55. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/index.html +8 -8
  56. dirigent_server-0.12.0/src/dirigent_server/static/assets/Alerting-BIhNmOxf.js +0 -1
  57. dirigent_server-0.12.0/src/dirigent_server/static/assets/Connections-DsnMTiIk.js +0 -1
  58. dirigent_server-0.12.0/src/dirigent_server/static/assets/Dashboard-BqRQb7Y9.js +0 -1
  59. dirigent_server-0.12.0/src/dirigent_server/static/assets/Description-BP4Ga-RV.js +0 -2
  60. dirigent_server-0.12.0/src/dirigent_server/static/assets/Picker-BWWGdN86.js +0 -1
  61. dirigent_server-0.12.0/src/dirigent_server/static/assets/PipelineEditor-CGYiQ_RS.js +0 -2
  62. dirigent_server-0.12.0/src/dirigent_server/static/assets/Refusal-JlhK6Mh_.js +0 -1
  63. dirigent_server-0.12.0/src/dirigent_server/static/assets/RunDetail-DG3dbzT_.js +0 -3
  64. dirigent_server-0.12.0/src/dirigent_server/static/assets/SchemaForm-DDpXEjh5.js +0 -1
  65. dirigent_server-0.12.0/src/dirigent_server/static/assets/Segmented-CR-Iqv1r.js +0 -1
  66. dirigent_server-0.12.0/src/dirigent_server/static/assets/SettingsDialog-BhV4tAsN.js +0 -1
  67. dirigent_server-0.12.0/src/dirigent_server/static/assets/Triggers-_p64iSNi.js +0 -1
  68. dirigent_server-0.12.0/src/dirigent_server/static/assets/Workers-B_pwpd3E.js +0 -1
  69. dirigent_server-0.12.0/src/dirigent_server/static/assets/index-a02YzA4l.css +0 -2
  70. dirigent_server-0.12.0/src/dirigent_server/static/assets/index-jhYU37cm.js +0 -53
  71. dirigent_server-0.12.0/src/dirigent_server/static/assets/input-o9l61NKa.js +0 -1
  72. dirigent_server-0.12.0/src/dirigent_server/static/assets/select-CKTm9cc4.js +0 -1
  73. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/LICENSE +0 -0
  74. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/README.md +0 -0
  75. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/THIRD_PARTY_NOTICES.md +0 -0
  76. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/__init__.py +0 -0
  77. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/app.py +0 -0
  78. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/dependencies.py +0 -0
  79. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/errors.py +0 -0
  80. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/health.py +0 -0
  81. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/logging.py +0 -0
  82. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/pagination.py +0 -0
  83. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/py.typed +0 -0
  84. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/__init__.py +0 -0
  85. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/auth.py +0 -0
  86. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/blocks.py +0 -0
  87. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/connections.py +0 -0
  88. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/hooks.py +0 -0
  89. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/pipelines.py +0 -0
  90. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/schema.py +0 -0
  91. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/schemas.py +0 -0
  92. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/system.py +0 -0
  93. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/trigger_documents.py +0 -0
  94. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/triggers.py +0 -0
  95. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/users.py +0 -0
  96. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/routes/workers.py +0 -0
  97. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/security.py +0 -0
  98. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/.gitkeep +0 -0
  99. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/CodeEditor-B55U_qvj.css +0 -0
  100. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/Instant-C9TZFyg5.js +0 -0
  101. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/KindChip-CuBFi3X9.js +0 -0
  102. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/StepPorts-CtcvnIvJ.js +0 -0
  103. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/chevron-down-CrkpqUMs.js +0 -0
  104. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/chunk-BV7QT456-Bfa1dvOx.js +0 -0
  105. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/copy-r6NpGwbU.js +0 -0
  106. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/dist-BWSEJlfk.js +0 -0
  107. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/editor.worker-BaAK1IVA.js +0 -0
  108. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/format-CR2ze2LO.js +0 -0
  109. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  110. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  111. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  112. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  113. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  114. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  115. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  116. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  117. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  118. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  119. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  120. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  121. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  122. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  123. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  124. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  125. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  126. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  127. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  128. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  129. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  130. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  131. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  132. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  133. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  134. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  135. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  136. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  137. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  138. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  139. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2 +0 -0
  140. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2 +0 -0
  141. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2 +0 -0
  142. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
  143. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
  144. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2 +0 -0
  145. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/identity-BNZxCf_y.js +0 -0
  146. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/json.worker-C-kBQgxp.js +0 -0
  147. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/maximize-2-B2tdtoC6.js +0 -0
  148. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/preferences-Cl9nlEI4.js +0 -0
  149. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/preload-helper-Czpn1I53.js +0 -0
  150. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/react-BatatxyT.js +0 -0
  151. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/rolldown-runtime-Dd_uD5pT.js +0 -0
  152. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/schema-form-FkbdR3oI.js +0 -0
  153. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/shell-CC2rA5mh.js +0 -0
  154. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/status-Ctx8x8Mf.js +0 -0
  155. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/store-CVrCnru0.js +0 -0
  156. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/textarea-XMYmRm72.js +0 -0
  157. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/use-heartbeat-ByRKom_T.js +0 -0
  158. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/use-store-CgWwefFs.js +0 -0
  159. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/utils-CRMSf51M.js +0 -0
  160. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/assets/yaml.worker-D2mqiKN-.js +0 -0
  161. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/favicon-32.png +0 -0
  162. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/static/logo.png +0 -0
  163. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/transactions.py +0 -0
  164. {dirigent_server-0.12.0 → dirigent_server-0.13.0}/src/dirigent_server/ui.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dirigent-server
3
- Version: 0.12.0
3
+ Version: 0.13.0
4
4
  Summary: Dirigent FastAPI server: the REST API, its authentication, and the health probes.
5
5
  License-Expression: LicenseRef-Proprietary
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dirigent-server"
3
- version = "0.12.0"
3
+ version = "0.13.0"
4
4
  description = "Dirigent FastAPI server: the REST API, its authentication, and the health probes."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dirigent-server"
3
- version = "0.12.0"
3
+ version = "0.13.0"
4
4
  description = "Dirigent FastAPI server: the REST API, its authentication, and the health probes."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -28,7 +28,7 @@ from dirigent_core.alerting import (
28
28
  list_rules,
29
29
  queue_test_message,
30
30
  retry_notification,
31
- set_paused,
31
+ update_rule,
32
32
  )
33
33
  from dirigent_core.models import AlertRule, Connection, Notification, Pipeline, Run
34
34
  from dirigent_server.dependencies import ServicesDep, SessionDep
@@ -52,6 +52,7 @@ def render(rule: AlertRule, pipeline: str | None, connection: str | None = None)
52
52
  notifier=rule.notifier,
53
53
  connection=connection,
54
54
  template=rule.template,
55
+ body=rule.body,
55
56
  throttle=format_duration(timedelta(seconds=rule.throttle_seconds)),
56
57
  active=rule.active,
57
58
  paused=rule.paused,
@@ -107,6 +108,7 @@ async def add_rule(
107
108
  pipeline=payload.pipeline,
108
109
  connection=payload.connection,
109
110
  template=payload.template,
111
+ body=payload.body,
110
112
  throttle=payload.throttle,
111
113
  ),
112
114
  )
@@ -118,17 +120,21 @@ async def add_rule(
118
120
  @router.patch(
119
121
  "/alert-rules/{code}",
120
122
  operation_id="updateAlertRule",
121
- summary="Pause or resume an alert rule",
123
+ summary="Change an alert rule",
122
124
  response_model=AlertRuleOut,
123
125
  )
124
126
  async def change_rule(code: str, payload: AlertRuleUpdate, session: SessionDep, principal: OperatorDep) -> AlertRuleOut:
125
- """Hold a rule's deliveries, or let them resume.
127
+ """Hold a rule's deliveries, let them resume, or rewrite what it says.
126
128
 
127
129
  Pausing is instance state on the row rather than something the rule declares, so a rule an
128
- operator held keeps holding when the document that declared it is applied again.
130
+ operator held keeps holding when the document that declared it is applied again. A field
131
+ the caller left out is left as it was.
129
132
  """
130
133
  rule = await _rule_or_404(session, code)
131
- await set_paused(session, rule, paused=payload.paused)
134
+ try:
135
+ await update_rule(session, rule, payload.model_dump(exclude_unset=True))
136
+ except AlertError as error:
137
+ raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, detail=str(error)) from error
132
138
  return render(rule, await _pipeline_code(session, rule), await _connection_code(session, rule.connection_id))
133
139
 
134
140
 
@@ -8,13 +8,14 @@ from typing import Annotated
8
8
  from uuid import UUID
9
9
 
10
10
  import sqlalchemy as sa
11
- from fastapi import APIRouter, Header, HTTPException, Query, Request, status
12
- from fastapi.responses import StreamingResponse
11
+ from fastapi import APIRouter, Header, HTTPException, Query, Request, Response, status
12
+ from fastapi.responses import PlainTextResponse, StreamingResponse
13
13
  from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker
14
14
 
15
15
  from dirigent_client.enums import AttemptStatus, LogLevel, RunItemStatus, RunStatus
16
16
  from dirigent_client.schemas import (
17
17
  TERMINAL_RUN_STATUSES,
18
+ ArtifactOut,
18
19
  AttemptEvent,
19
20
  AttemptOut,
20
21
  DagNode,
@@ -29,17 +30,11 @@ from dirigent_client.schemas import (
29
30
  )
30
31
  from dirigent_common.durations import DurationError, parse_duration
31
32
  from dirigent_core import telemetry
33
+ from dirigent_core.artifacts import JSON_CONTENT_TYPE, TEXT_KEY, canonical_json
32
34
  from dirigent_core.database import session_scope
33
35
  from dirigent_core.engine.definition import PipelineDefinition, load_definition
34
36
  from dirigent_core.engine.runs import RunCreationError, cancel_run, retry_step
35
- from dirigent_core.engine.state import (
36
- StepCounts,
37
- attempt_counts,
38
- build_step_states,
39
- in_execution_order,
40
- item_counts,
41
- step_states,
42
- )
37
+ from dirigent_core.engine.state import StepCounts, attempt_counts, item_counts, step_states
43
38
  from dirigent_core.models import (
44
39
  ArtifactRef,
45
40
  LogEntry,
@@ -52,6 +47,7 @@ from dirigent_core.models import (
52
47
  )
53
48
  from dirigent_core.pipelines import UNWELL, carries_tag, failing_steps
54
49
  from dirigent_core.registry import unmet_worker_tags
50
+ from dirigent_core.reporting import duration_ms, items_in_order, run_facts
55
51
  from dirigent_server.dependencies import ServicesDep, SessionDep, get_sessions
56
52
  from dirigent_server.pagination import DEFAULT_PAGE, AfterParam, LimitParam, clip, int_cursor, uuid_cursor
57
53
  from dirigent_server.security import OperatorDep, PrincipalDep
@@ -122,46 +118,6 @@ def _render_run(run: Run, pipeline: Pipeline, version: PipelineVersion, failed_s
122
118
  )
123
119
 
124
120
 
125
- async def _attempts(session: AsyncSession, run_id: UUID, step_order: Sequence[str] = ()) -> list[StepAttempt]:
126
- """Read every attempt of a run, in the order they ran."""
127
- rows = await session.execute(
128
- sa.select(StepAttempt, RunItem.item_index)
129
- .outerjoin(RunItem, RunItem.id == StepAttempt.run_item_id)
130
- .where(StepAttempt.run_id == run_id)
131
- )
132
- found = rows.all()
133
- indexes = {attempt.id: index for attempt, index in found if index is not None}
134
- return in_execution_order([attempt for attempt, _ in found], indexes, step_order)
135
-
136
-
137
- async def _warnings(session: AsyncSession, run_id: UUID) -> dict[str, int]:
138
- """Count the warnings and errors each step logged, which a succeeded step can still have."""
139
- rows = await session.execute(
140
- sa.select(LogEntry.step_name, sa.func.count())
141
- .where(LogEntry.run_id == run_id, LogEntry.level.in_((LogLevel.WARNING, LogLevel.ERROR)))
142
- .group_by(LogEntry.step_name)
143
- )
144
- return {name: count for name, count in rows.all() if name is not None}
145
-
146
-
147
- async def _items(session: AsyncSession, run_id: UUID) -> list[RunItem]:
148
- """Read a run's fan-out items, in grid order."""
149
- rows = await session.execute(
150
- sa.select(RunItem).where(RunItem.run_id == run_id).order_by(RunItem.step_name, RunItem.item_index)
151
- )
152
- return list(rows.scalars())
153
-
154
-
155
- def _human_order(definition: PipelineDefinition, ran: Sequence[str]) -> list[str]:
156
- """Name a run's steps the way a person watched them: as they ran, then as they were written.
157
-
158
- The steps that ran arrive in execution order, which already carries the written order for
159
- the steps that have not, so following them says both things at once.
160
- """
161
- seen = list(dict.fromkeys(ran))
162
- return [name for name in seen if name in definition.steps] + [name for name in definition.steps if name not in seen]
163
-
164
-
165
121
  def _dag(
166
122
  definition: PipelineDefinition,
167
123
  attempts: Mapping[str, StepCounts],
@@ -329,6 +285,59 @@ async def list_attempts(
329
285
  return Page(items=items, next=following)
330
286
 
331
287
 
288
+ @router.get(
289
+ "/runs/{run_id}/artifacts",
290
+ operation_id="listRunArtifacts",
291
+ summary="List a run's artifacts",
292
+ response_model=Page[ArtifactOut],
293
+ )
294
+ async def list_artifacts(
295
+ run_id: UUID,
296
+ session: SessionDep,
297
+ principal: PrincipalDep,
298
+ after: AfterParam = None,
299
+ limit: LimitParam = DEFAULT_PAGE,
300
+ ) -> Page[ArtifactOut]:
301
+ """List what a run wrote down: each step's stored output, and the run's report document."""
302
+ await _run_row(session, run_id)
303
+ statement = sa.select(ArtifactRef).where(ArtifactRef.run_id == run_id).order_by(ArtifactRef.id).limit(limit + 1)
304
+ cursor = uuid_cursor(after)
305
+ if cursor is not None:
306
+ statement = statement.where(ArtifactRef.id > cursor)
307
+ rows = list((await session.execute(statement)).scalars())
308
+ found = [ArtifactOut.model_validate(row, from_attributes=True) for row in rows]
309
+ items, following = clip(found, limit, lambda row: row.id)
310
+ return Page(items=items, next=following)
311
+
312
+
313
+ @router.get(
314
+ "/artifacts/{artifact_id}",
315
+ operation_id="readArtifact",
316
+ summary="Read an artifact's content",
317
+ response_class=Response,
318
+ )
319
+ async def read_artifact(
320
+ artifact_id: UUID, session: SessionDep, services: ServicesDep, principal: PrincipalDep
321
+ ) -> Response:
322
+ """Answer with an artifact's own content, in the content type it was stored as.
323
+
324
+ A document that inlined is answered from the row; one that went to storage is streamed
325
+ back out of it, so a large output never passes through the server whole.
326
+ """
327
+ reference = await session.get(ArtifactRef, artifact_id)
328
+ if reference is None:
329
+ raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"no artifact {artifact_id}")
330
+ content_type = reference.content_type or JSON_CONTENT_TYPE
331
+ if reference.inline_value is not None:
332
+ inlined = reference.inline_value.get(TEXT_KEY)
333
+ if isinstance(inlined, str):
334
+ return PlainTextResponse(inlined, media_type=content_type)
335
+ return Response(canonical_json(reference.inline_value), media_type=JSON_CONTENT_TYPE)
336
+ if reference.uri is None:
337
+ raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"artifact {artifact_id} holds no content")
338
+ return StreamingResponse(services.storage.open_read(reference.uri), media_type=content_type)
339
+
340
+
332
341
  async def _spilled(
333
342
  session: AsyncSession, run_id: UUID, only: Sequence[UUID] | None = None
334
343
  ) -> dict[UUID, tuple[str, int | None]]:
@@ -639,7 +648,7 @@ async def _story_read(
639
648
  if want_labels:
640
649
  read_labels = {
641
650
  item.id: (item.item_key.strip() or str(item.item_index), item.item_index)
642
- for item in await _items(session, run_id)
651
+ for item in await items_in_order(session, run_id)
643
652
  }
644
653
  attempts = await _attempt_rows(session, run_id)
645
654
  spilled = await _spilled(session, run_id)
@@ -772,47 +781,30 @@ async def report(run_id: UUID, session: SessionDep, principal: PrincipalDep) ->
772
781
  """Summarise a run: what each step amounted to, and how long the whole thing took."""
773
782
  run = await _run_row(session, run_id)
774
783
  pipeline, version, definition = await _context(session, run)
775
- attempts = await _attempts(session, run_id, version.step_order)
776
- items = await _items(session, run_id)
777
- states = build_step_states(definition, attempts)
778
- warned = await _warnings(session, run_id)
779
- steps = [
780
- StepReport(
781
- step=name,
782
- block=definition.steps[name].block,
783
- outcome=states[name].outcome.value,
784
- attempts=sum(1 for attempt in attempts if attempt.step_name == name),
785
- depends_on=list(definition.steps[name].depends_on),
786
- warnings=warned.get(name, 0),
787
- duration_ms=_duration_ms(
788
- min((a.started_at for a in attempts if a.step_name == name and a.started_at), default=None),
789
- max((a.finished_at for a in attempts if a.step_name == name and a.finished_at), default=None),
790
- ),
791
- error=next(
792
- (a.error for a in attempts if a.step_name == name and a.status is AttemptStatus.FAILED and a.error),
793
- None,
794
- ),
795
- )
796
- for name in _human_order(definition, [attempt.step_name for attempt in attempts])
797
- ]
784
+ facts = await run_facts(session, run, pipeline, version, definition, base_url=None, rendered_at=utcnow())
798
785
  return RunReport(
799
786
  run_id=run.id,
800
- pipeline=pipeline.code,
801
- pipeline_version=version.version,
787
+ pipeline=facts.pipeline.code,
788
+ pipeline_version=facts.pipeline.version,
802
789
  status=run.status,
803
790
  triggered_by=run.triggered_by_label,
804
791
  started_at=run.started_at,
805
792
  finished_at=run.finished_at,
806
- duration_ms=_duration_ms(run.started_at, run.finished_at),
807
- steps=steps,
808
- items_total=len(items),
809
- items_failed=sum(1 for item in items if item.status is RunItemStatus.FAILED),
793
+ duration_ms=duration_ms(run.started_at, run.finished_at),
794
+ steps=[
795
+ StepReport(
796
+ step=step.step,
797
+ block=step.block,
798
+ outcome=step.outcome,
799
+ attempts=step.attempts,
800
+ depends_on=list(step.depends_on),
801
+ warnings=step.warnings,
802
+ duration_ms=step.duration_ms,
803
+ error=step.error,
804
+ )
805
+ for step in facts.steps
806
+ ],
807
+ items_total=facts.items_total,
808
+ items_failed=facts.items_failed,
810
809
  error=run.error,
811
810
  )
812
-
813
-
814
- def _duration_ms(started: datetime | None, finished: datetime | None) -> int | None:
815
- """Report how long something took, or nothing when it has not finished."""
816
- if started is None or finished is None:
817
- return None
818
- return round((finished - started).total_seconds() * 1000)
@@ -1 +1 @@
1
- import{n as e}from"./PageState-CvfT4nGl.js";import{r as t}from"./utils-CRMSf51M.js";import{t as n}from"./use-store-CgWwefFs.js";import{n as r,t as i}from"./auth-tGoFbaSP.js";var a=t(),o={status:403,title:`Forbidden`,detail:`This screen is an admin's. Operators may define, run and observe pipelines; managing accounts, tokens and connections is an admin's.`,problems:[],instance:null};function s({children:t}){let s=n(i);return r(s)?(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)(e,{loading:!1,problem:o,empty:!1,children:null})}export{s as t};
1
+ import{n as e}from"./PageState-CTB50fRO.js";import{r as t}from"./utils-CRMSf51M.js";import{t as n}from"./use-store-CgWwefFs.js";import{n as r,t as i}from"./auth-DZcJKVvz.js";var a=t(),o={status:403,title:`Forbidden`,detail:`This screen is an admin's. Operators may define, run and observe pipelines; managing accounts, tokens and connections is an admin's.`,problems:[],instance:null};function s({children:t}){let s=n(i);return r(s)?(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)(e,{loading:!1,problem:o,empty:!1,children:null})}export{s as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-BatatxyT.js";import{i as n}from"./store-CVrCnru0.js";import{n as r}from"./chunk-BV7QT456-Bfa1dvOx.js";import{b as i,y as a}from"./dropdown-menu-B9iU0HGD.js";import{n as o,o as s,t as c}from"./PageState-CTB50fRO.js";import{r as l}from"./utils-CRMSf51M.js";import{d as u,f as d}from"./paging-CZR9Tg8m.js";import{t as f}from"./input-7d4ZlAGD.js";import{t as p}from"./identity-BNZxCf_y.js";import{n as m,s as h}from"./pipelines-D_CSKLu-.js";import{At as g,Dt as _,Et as v,It as y,Ot as b,T as x,Tt as S,_t as C,b as w,g as T,k as E,kt as D,lt as O,mt as k,nt as A,rt as j,ut as M,v as N,w as P,wt as F,x as I,y as L}from"./index-CeUoyQJy.js";import{t as R}from"./Description-DVFPKyRO.js";import{t as z}from"./Instant-C9TZFyg5.js";import{l as B}from"./connections-BNOH5aGu.js";import{n as V,t as ee}from"./Refusal-BJLvb6gD.js";import{t as te}from"./Segmented-DvCzioEn.js";import{t as H}from"./Picker-DiLS0eON.js";import{t as U}from"./AdminOnly-ChPFWSCk.js";var ne=n(`bell-plus`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M15 8h6`,key:`8ybuxh`}],[`path`,{d:`M18 5v6`,key:`g5ayrv`}],[`path`,{d:`M20.002 14.464a9 9 0 0 0 .738.863A1 1 0 0 1 20 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 8.75-5.332`,key:`1abcvy`}]]),re=n(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),W=e(t(),1),ie=[`run_failed`,`run_completed_with_errors`,`run_succeeded`,`run_stuck`],ae=[`pending`,`sending`,`sent`,`failed`],oe=`0s`;function se(e){return e===oe?`none`:e}function ce(e){return e.replaceAll(`_`,` `)}function G(e){return e.scope===`pipeline`&&e.pipeline!==null?e.pipeline:`every pipeline`}function le(e){return e.active&&!e.paused}function ue(e){return e===`sent`||e===`failed`}function de(e,t=50){let n=new URLSearchParams({limit:String(t)});return e!==null&&n.set(`after`,e),`/alert-rules?${n.toString()}`}function fe(e){return a(de(e))}function pe(e){return i(`/alert-rules`,`POST`,e)}function me(e,t){return i(`/alert-rules/${encodeURIComponent(e)}`,`PATCH`,{paused:t})}function he(e){return a(`/alert-rules/${encodeURIComponent(e)}`,{method:`DELETE`})}var ge={status:``,notifier:``};function _e(e,t,n=50){let r=new URLSearchParams({limit:String(n)});return e.status!==``&&r.set(`status`,e.status),e.notifier!==``&&r.set(`notifier`,e.notifier),t!==null&&r.set(`after`,t),`/notifications?${r.toString()}`}function ve(e,t){return a(_e(e,t))}function ye(e){return a(`/notifications/${encodeURIComponent(e)}`)}function be(e){return i(`/notifications/${encodeURIComponent(e)}/$retry`,`POST`,{})}function xe(e){return i(`/alert-rules/$test`,`POST`,e)}async function Se(){return(await a(`/blocks`)).notifiers.map(e=>e.id)}function Ce(e,t){let n=[];for(let r of e){if(r===`log`){n.push({id:r,notifier:r,connection:null,reachable:!0,last_check_at:null,last_check_healthy:null,last_check_detail:null});continue}let e=t.filter(e=>e.kind===r);if(e.length===0){n.push({id:r,notifier:r,connection:null,reachable:!1,last_check_at:null,last_check_healthy:null,last_check_detail:null});continue}for(let t of e)n.push({id:`${r}:${t.code}`,notifier:r,connection:t.code,reachable:!0,last_check_at:t.last_check_at,last_check_healthy:t.last_check_healthy,last_check_detail:t.last_check_detail})}return n}function we(e){return e.notifier===`log`?{tone:`good`,label:`built in`,detail:null}:e.reachable?e.last_check_at===null?{tone:`quiet`,label:`never checked`,detail:null}:{tone:e.last_check_healthy===!0?`good`:`critical`,label:e.last_check_healthy===!0?`checked`:`failing`,detail:e.last_check_detail}:{tone:`quiet`,label:`no connection`,detail:`Nothing delivers through this channel yet.`}}var K=l();function Te({rule:e,onChanged:t,onDeleted:n,onTest:r}){let[i,a]=(0,W.useState)(!1),o=L(),c=(0,W.useCallback)(e=>ve(ge,e),[]),{state:l}=N(c,De),u=l.rows.filter(t=>t.rule===e.code);return(0,K.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,K.jsxs)(Ae,{thing:e,children:[e.paused&&(0,K.jsx)(ke,{children:`paused`}),!e.active&&(0,K.jsx)(ke,{children:`off`})]}),(0,K.jsx)(R,{text:e.description}),(0,K.jsxs)(`dl`,{className:`space-y-1.5`,children:[(0,K.jsx)(J,{label:`Event`,children:ce(e.event)}),(0,K.jsx)(J,{label:`Scope`,children:G(e)}),(0,K.jsx)(J,{label:`Delivers through`,children:(0,K.jsx)(q,{notifier:e.notifier,connection:e.connection})}),(0,K.jsx)(J,{label:`Throttle`,children:se(e.throttle)}),e.template!==null&&(0,K.jsx)(J,{label:`Subject`,children:(0,K.jsx)(`span`,{className:`font-mono text-xs break-all`,children:e.template})}),(0,K.jsx)(J,{label:`Last sent`,children:e.last_sent_at===null?(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`never`}):(0,K.jsx)(z,{at:e.last_sent_at})})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsx)(s,{why:o.why,children:(0,K.jsx)(d,{variant:`outline`,size:`sm`,disabled:i||!o.may,title:o.why,onClick:()=>{a(!0),me(e.code,!e.paused).then(t,V).finally(()=>{a(!1)})},children:e.paused?`Resume`:`Pause`})}),(0,K.jsx)(s,{why:o.why,children:(0,K.jsx)(d,{variant:`outline`,size:`sm`,disabled:!o.may,title:o.why,onClick:r,children:`Send a test`})}),(0,K.jsx)(s,{why:o.why,children:(0,K.jsx)(d,{variant:`outline`,size:`sm`,className:`destructive-action ml-auto`,disabled:i||!o.may,title:o.why,onClick:()=>{a(!0),he(e.code).then(n,V).finally(()=>{a(!1)})},children:`Delete`})})]}),(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Recent deliveries`}),!l.read&&(0,K.jsx)(`p`,{className:`text-xs text-faint`,children:`Reading from the server`}),l.read&&u.length===0&&(0,K.jsx)(`p`,{className:`text-xs text-faint`,children:`Nothing sent.`}),(0,K.jsx)(`ul`,{className:`divide-y divide-border`,children:u.map(e=>(0,K.jsxs)(`li`,{className:`row-hover -mx-4 flex items-center gap-2 px-4 py-2`,children:[(0,K.jsx)(I,{status:e.status}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs`,children:e.subject}),(0,K.jsx)(z,{className:`shrink-0 text-xs text-faint`,at:e.created_at})]},e.id))})]})]})}function Ee({notification:e,onChanged:t}){let[n,i]=(0,W.useState)(!1),a=L();return(0,K.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,K.jsx)(`div`,{className:`space-y-1`,children:(0,K.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(I,{status:e.status}),(0,K.jsx)(`span`,{className:`text-sm font-semibold`,children:e.subject})]})}),(0,K.jsxs)(`dl`,{className:`space-y-1.5`,children:[e.rule===null?(0,K.jsx)(J,{label:`Raised by`,children:(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`a test, not a rule`})}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(J,{label:`Event`,children:ce(e.event)}),(0,K.jsx)(J,{label:`Rule`,children:(0,K.jsx)(`span`,{className:`font-mono text-xs`,children:e.rule})})]}),(0,K.jsx)(J,{label:`Delivers through`,children:(0,K.jsx)(q,{notifier:e.notifier,connection:e.connection})}),(0,K.jsx)(J,{label:`Run`,children:(0,K.jsx)(Oe,{notification:e})}),(0,K.jsx)(J,{label:`Queued`,children:(0,K.jsx)(z,{at:e.created_at})}),e.status===`sent`?(0,K.jsx)(J,{label:`Sent`,children:(0,K.jsx)(z,{at:e.sent_at})}):(0,K.jsx)(J,{label:`Next try`,children:(0,K.jsx)(z,{at:e.available_at})}),(0,K.jsxs)(J,{label:`Attempts`,children:[e.attempt,` of `,e.max_attempts]})]}),e.error!==null&&(0,K.jsxs)(`div`,{className:`space-y-1`,children:[(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`What the channel said`}),(0,K.jsx)(`p`,{className:`text-xs break-words text-critical`,children:e.error}),(0,K.jsx)(`p`,{className:`text-xs text-faint`,children:`Only the latest refusal is kept. Earlier attempts are counted, not stored.`})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsx)(s,{why:a.why,children:(0,K.jsx)(d,{variant:`outline`,size:`sm`,disabled:n||!a.may,title:a.why,onClick:()=>{i(!0),be(e.id).then(t,V).finally(()=>{i(!1)})},children:`Retry now`})}),e.run_id!==null&&(0,K.jsx)(d,{variant:`outline`,size:`sm`,render:(0,K.jsx)(r,{to:`/runs/${e.run_id}`}),children:`Open the run`})]})]})}var De=e=>e.id;function q({notifier:e,connection:t}){return(0,K.jsxs)(`span`,{className:`flex flex-wrap items-baseline gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-sm`,children:e}),t!==null&&(0,K.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:t})]})}function Oe({notification:e}){if(e.run_id===null)return(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`no run`});let t=e.run_pipeline??`a run`;return(0,K.jsxs)(r,{className:`text-primary hover:underline`,to:`/runs/${e.run_id}`,children:[(0,K.jsx)(`span`,{className:`text-sm`,children:t}),e.run_started_at!==null&&(0,K.jsx)(z,{className:`ml-1.5 text-xs text-muted-foreground`,at:e.run_started_at})]})}function ke({children:e}){return(0,K.jsx)(`span`,{className:`rounded-sm border border-border px-1.5 text-xs text-muted-foreground`,children:e})}function Ae({thing:e,children:t}){let n=p(e);return(0,K.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`span`,{className:n.named?`text-sm font-semibold`:`font-mono text-sm font-semibold`,children:n.title}),t,n.code!==null&&(0,K.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:n.code})]})}function J({label:e,children:t}){return(0,K.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2`,children:[(0,K.jsx)(`dt`,{className:`w-32 shrink-0 text-xs text-muted-foreground`,children:e}),(0,K.jsx)(`dd`,{className:`min-w-0 text-sm`,children:t})]})}var je={good:`var(--good)`,critical:`var(--critical)`,quiet:`var(--faint)`};function Me({channels:e}){return(0,K.jsx)(`ul`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4`,children:e.map(e=>(0,K.jsx)(Ne,{channel:e},e.id))})}function Ne({channel:e}){let t=we(e);return(0,K.jsxs)(`li`,{className:`flex items-start justify-between gap-3 rounded-lg border border-border bg-card p-3`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,title:e.connection===null?e.notifier:`${e.notifier} ${e.connection}`,children:[(0,K.jsx)(`span`,{className:`status-dot shrink-0`,style:{"--chip":je[t.tone]}}),(0,K.jsx)(`span`,{className:`shrink-0 text-sm font-medium`,children:e.notifier}),e.connection!==null&&(0,K.jsx)(`span`,{className:`truncate font-mono text-xs text-muted-foreground`,children:e.connection})]}),(0,K.jsxs)(`span`,{className:`flex shrink-0 flex-col items-end`,children:[(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t.label}),e.last_check_at!==null&&(0,K.jsx)(z,{className:`text-xs text-faint`,at:e.last_check_at}),t.detail!==null&&(0,K.jsx)(`span`,{className:`max-w-48 truncate text-xs text-faint`,title:t.detail,children:t.detail})]})]})}function Y({id:e,label:t,value:n,onChange:r,placeholder:i,mono:a,hint:o}){return(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(E,{htmlFor:e,children:t}),(0,K.jsx)(f,{id:e,className:a===!0?`font-mono`:void 0,spellCheck:!1,autoComplete:`off`,value:n,placeholder:i,onChange:e=>{r(e.target.value)}}),o!==void 0&&(0,K.jsx)(`p`,{className:`text-xs text-faint`,children:o})]})}function Pe({id:e,notifiers:t,value:n,onChange:r}){return(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(E,{htmlFor:e,children:`Notifier`}),(0,K.jsx)(H,{id:e,label:`Notifier`,value:n,options:t.map(e=>({value:e,label:e,aside:``})),placeholder:`Search the installed channels`,onChange:r})]})}function Fe({id:e,kind:t,value:n,onChange:r}){let i=Ie(t);return(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(E,{htmlFor:e,children:`Connection`}),(0,K.jsx)(H,{id:e,label:`Connection`,value:n,options:i,placeholder:i.length===0?`No ${t} connection yet`:`Search by name or code`,onChange:r})]})}function Ie(e){let[t,n]=(0,W.useState)([]);return(0,W.useEffect)(()=>{if(e===``||e===`log`)return;let t=!0;return B().then(e=>{t&&n(e.items)},()=>{t&&n([])}),()=>{t=!1}},[e]),t.filter(t=>t.kind===e).map(e=>{let t=p(e);return{value:e.code,label:t.title,aside:t.code??``}})}var Le=/^[a-z0-9]+(?:[-_][a-z0-9]+)*$/u,Re=/^(?:\d+(?:ms|s|m|h|d|w))+$/u,ze=`A Jinja template: {{ run.* }} reads the run's pipeline, status, id, error, trigger, duration_ms and url.`,Be=[{value:`global`,label:`Every pipeline`},{value:`pipeline`,label:`One pipeline`}],Ve={run_failed:`Failed`,run_completed_with_errors:`Completed with errors`,run_succeeded:`Succeeded`,run_stuck:`Stuck`};function X(e){return e!==``&&e!==`log`}function He(e){if(e.code.trim()===``)return`A rule is addressed by its code, and this one has none.`;if(!Le.test(e.code.trim()))return`A code is lowercase words joined by - or _.`;if(e.scope===`pipeline`&&e.pipeline===``)return`A rule watching one pipeline names that pipeline, and this one names none.`;if(e.notifier===``)return`A rule delivers through a channel, and this one names none.`;if(X(e.notifier)&&e.connection===``)return`The ${e.notifier} channel delivers through a connection, and this one names none.`;if(!Re.test(e.throttle.trim()))return`A throttle is a duration, such as 15m.`}function Ue(e,t){if(e===``)return`A test goes through a channel, and this one names none.`;if(X(e)&&t===``)return`The ${e} channel delivers through a connection, and this one names none.`}var We=`0s`;function Ge({open:e,onOpenChange:t,notifiers:n,onCreated:r}){let[i,a]=(0,W.useState)(``),[o,c]=(0,W.useState)(``),[l,f]=(0,W.useState)(``),[p,m]=(0,W.useState)(`run_failed`),[h,_]=(0,W.useState)(`global`),[y,x]=(0,W.useState)(``),[C,T]=(0,W.useState)(``),[O,k]=(0,W.useState)(``),[A,j]=(0,W.useState)(``),[M,N]=(0,W.useState)(We),[P,I]=(0,W.useState)(null),[R,z]=(0,W.useState)(!1),B=Ke(e),V=L(),U=w(V.why,He({code:i,scope:h,pipeline:y,notifier:C,connection:O,throttle:M}));return(0,K.jsx)(F,{open:e,onOpenChange:t,children:(0,K.jsxs)(v,{className:`sm:max-w-xl`,showCloseButton:!1,children:[(0,K.jsx)(D,{children:(0,K.jsx)(g,{children:`New rule`})}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,K.jsx)(Y,{id:`rule-code`,label:`Code`,value:i,onChange:a,placeholder:`ops-slack-failed`,mono:!0}),(0,K.jsx)(Y,{id:`rule-name`,label:`Name`,value:o,onChange:c,placeholder:`Tell the ops channel`})]}),(0,K.jsx)(Y,{id:`rule-description`,label:`Description`,value:l,onChange:f,placeholder:`What this rule is for`}),(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(E,{children:`Event`}),(0,K.jsx)(te,{label:`Event`,size:`md`,value:p,options:ie.map(e=>({value:e,label:Ve[e]})),onChoose:m})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(E,{children:`Scope`}),(0,K.jsx)(te,{label:`Scope`,size:`md`,value:h,options:Be,onChoose:_})]}),h===`pipeline`&&(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(E,{htmlFor:`rule-pipeline`,children:`Pipeline`}),(0,K.jsx)(H,{id:`rule-pipeline`,label:`Pipeline`,value:y,options:B,placeholder:`Search by name or code`,onChange:x})]})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,K.jsx)(Pe,{id:`rule-notifier`,notifiers:n,value:C,onChange:e=>{T(e),k(``)}}),X(C)&&(0,K.jsx)(Fe,{id:`rule-connection`,kind:C,value:O,onChange:k})]}),(0,K.jsx)(Y,{id:`rule-subject`,label:`Subject`,value:A,onChange:j,placeholder:`{{ run.pipeline }} run {{ run.status }}`,mono:!0,hint:ze}),(0,K.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:(0,K.jsx)(Y,{id:`rule-throttle`,label:`Throttle`,value:M,onChange:N,placeholder:`15m`,mono:!0})}),P!==null&&(0,K.jsx)(ee,{problem:P}),(0,K.jsxs)(b,{children:[(0,K.jsx)(`p`,{className:`mr-auto self-center text-xs text-muted-foreground`,children:`A rule fires when a run settles. Nothing is sent now.`}),(0,K.jsx)(S,{render:(0,K.jsx)(d,{variant:`ghost`}),children:`Close`}),(0,K.jsx)(s,{why:U,children:(0,K.jsx)(d,{disabled:R||U!==void 0,title:U,onClick:()=>{z(!0),I(null),pe({code:i.trim(),name:Z(o),description:Z(l),event:p,notifier:C,scope:h,pipeline:h===`pipeline`?y:null,connection:X(C)?O:null,template:Z(A),body:null,throttle:M.trim()}).then(()=>{r(),a(``),c(``),f(``),j(``),t(!1)},e=>{I(u(e))}).finally(()=>{z(!1)})},children:R?`Creating`:`Create`})})]})]})})}function Z(e){let t=e.trim();return t===``?null:t}function Ke(e){let[t,n]=(0,W.useState)([]);return(0,W.useEffect)(()=>{if(!e)return;let t=!0;return h().then(e=>{t&&n(e.toSorted(m).map(e=>{let t=p(e);return{value:e.code,label:t.title,aside:t.code??``}}))},()=>{t&&n([])}),()=>{t=!1}},[e]),t}var qe=1e3,Je=6e4,Ye=`dirigent test alert`,Q={notifier:``,connection:``,subject:``};function Xe({open:e,draft:t,onOpenChange:n,notifiers:r,onQueued:i,onOpenQueue:a}){let[o,c]=(0,W.useState)(t.notifier),[l,f]=(0,W.useState)(t.connection),[p,m]=(0,W.useState)(t.subject),[h,y]=(0,W.useState)(null),[x,C]=(0,W.useState)(null),[T,E]=(0,W.useState)(!1),O=Qe(h),k=L(),A=O!==null&&ue(O.status)?O.id:null;(0,W.useEffect)(()=>{A!==null&&i()},[A]);let j=w(k.why,Ue(o,l));return(0,K.jsx)(F,{open:e,onOpenChange:n,children:(0,K.jsxs)(v,{className:`sm:max-w-lg`,showCloseButton:!1,children:[(0,K.jsxs)(D,{children:[(0,K.jsx)(g,{children:`Send a test`}),(0,K.jsx)(_,{children:`The message goes through the same queue a real alert does, and a worker delivers it.`})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,K.jsx)(Pe,{id:`test-notifier`,notifiers:r,value:o,onChange:e=>{c(e),f(``)}}),X(o)&&(0,K.jsx)(Fe,{id:`test-connection`,kind:o,value:l,onChange:f})]}),(0,K.jsx)(Y,{id:`test-subject`,label:`Subject`,value:p,onChange:m,placeholder:Ye}),x!==null&&(0,K.jsx)(ee,{problem:x}),O!==null&&(0,K.jsx)(Ze,{row:O}),(0,K.jsxs)(b,{children:[(0,K.jsx)(S,{render:(0,K.jsx)(d,{variant:`ghost`}),children:`Close`}),h!==null&&(0,K.jsx)(d,{variant:`outline`,onClick:()=>{a(h)},children:`Open in the queue`}),(0,K.jsx)(s,{why:j,children:(0,K.jsx)(d,{disabled:T||j!==void 0,title:j,onClick:()=>{E(!0),C(null),y(null),xe({notifier:o,connection:X(o)?l:null,...p.trim()===``?{}:{subject:p.trim()}}).then(e=>{y(e.notification_id),i()},e=>{C(u(e))}).finally(()=>{E(!1)})},children:h===null?`Send`:`Send again`})})]})]})})}function Ze({row:e}){return(0,K.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-border bg-secondary/40 p-3`,"data-testid":`test-delivery`,"aria-live":`polite`,children:[(0,K.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(I,{status:e.status}),(0,K.jsx)(`span`,{className:`text-sm`,children:e.subject})]}),(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.status===`sent`?(0,K.jsxs)(K.Fragment,{children:[`Delivered `,(0,K.jsx)(z,{at:e.sent_at}),`.`]}):e.status===`failed`?(0,K.jsxs)(K.Fragment,{children:[`Given up after `,e.attempt,` of `,e.max_attempts,` attempts.`]}):e.attempt===0?`Queued for the next worker pass.`:(0,K.jsxs)(K.Fragment,{children:[`Attempt `,e.attempt,` of `,e.max_attempts,`, next try`,` `,(0,K.jsx)(z,{at:e.available_at}),`.`]})}),e.error!==null&&(0,K.jsx)(`p`,{className:`text-xs break-words text-critical`,children:e.error})]})}function Qe(e){let[t,n]=(0,W.useState)(null);return(0,W.useEffect)(()=>{if(e===null)return;let t=!0,r,i=Date.now()+Je,a=()=>{ye(e).then(o=>{t&&(n({id:e,row:o}),!(ue(o.status)||Date.now()>i)&&(r=setTimeout(a,qe)))},()=>{})};return a(),()=>{t=!1,r!==void 0&&clearTimeout(r)}},[e]),t!==null&&t.id===e?t.row:null}var $e=e=>e.id,et=e=>e.id;function tt(){return(0,K.jsx)(U,{children:(0,K.jsx)(nt,{})})}function nt(){let[e,t]=(0,W.useState)(!1),[n,r]=(0,W.useState)(null),[i,a]=(0,W.useState)(null),[s,l]=(0,W.useState)(null),[u,d]=(0,W.useState)({status:``,notifier:``}),[f,p]=(0,W.useState)({}),[m,h]=(0,W.useState)({}),g=N((0,W.useCallback)(e=>fe(e),[]),$e),_=N((0,W.useCallback)(e=>ve(u,e),[u]),et),v=it(),{reload:b}=g,{reload:S}=_,w=(0,W.useMemo)(()=>g.state.rows.map(e=>f[e.id]??e),[f,g.state.rows]),E=(0,W.useMemo)(()=>_.state.rows.map(e=>m[e.id]??e),[m,_.state.rows]),D=w.find(e=>e.id===i)??null,F=E.find(e=>e.id===s)??null,R=(0,W.useCallback)(e=>{r(t=>({draft:e,opened:(t?.opened??0)+1}))},[]);(0,W.useEffect)(()=>(j({note:null,tone:`quiet`,identifier:null}),A),[]),(0,W.useEffect)(()=>{if(D!==null){let e=D;return O([{id:`rule`,label:`Rule`,render:()=>(0,K.jsx)(Te,{rule:e,onChanged:e=>{p(t=>({...t,[e.id]:e}))},onDeleted:()=>{a(null),b()},onTest:()=>{R({notifier:e.notifier,connection:e.connection??``,subject:``})}})}],{screen:`alerting`})}if(F!==null){let e=F;return O([{id:`notification`,label:`Notification`,render:()=>(0,K.jsx)(Ee,{notification:e,onChanged:e=>{h(t=>({...t,[e.id]:e}))}})}],{screen:`alerting`})}},[F,D,R,b]);let z=L(`admin`),B=z.may;return(0,W.useEffect)(()=>C([...B?[{id:`alerting:rule`,title:`New alert rule`,group:k,screen:!0,icon:ne,keywords:[`alert`,`event`,`create`],run:()=>{t(!0)}},{id:`alerting:test`,title:`Send a test through a channel`,group:k,screen:!0,icon:re,keywords:[`alert`,`notification`,`try`],run:()=>{R(Q)}}]:[],{id:`alerting:reload`,title:`Read the alert rules again`,group:k,screen:!0,icon:y,keywords:[`refresh`,`reload`],run:()=>{b(),S()}}]),[B,R,S,b]),(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(c,{title:`Alerting`,aside:(0,K.jsx)(x,{tag:`alerts`}),actions:[{id:`test`,label:`Send a test`,icon:re,variant:`outline`,disabled:!z.may,why:z.why,onClick:()=>{R(Q)}},{id:`rule`,label:`New rule`,icon:ne,disabled:!z.may,why:z.why,onClick:()=>{t(!0)}}]}),(0,K.jsxs)(`section`,{className:`mb-6 space-y-2`,children:[(0,K.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Channels`}),v.read?v.rows.length===0?(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No channel is installed.`}):(0,K.jsx)(Me,{channels:v.rows}):(0,K.jsx)(`p`,{className:`text-sm text-faint`,children:`Reading from the server`})]}),(0,K.jsxs)(`section`,{className:`space-y-2`,children:[(0,K.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Rules`}),(0,K.jsx)(o,{loading:!g.state.read,problem:g.state.problem,empty:w.length===0,emptyMessage:`No rules.`,children:(0,K.jsx)(P,{columns:at,rows:w,rowKey:$e,rowClassName:e=>le(e)?void 0:`opacity-60`,reading:g.state.reading,next:g.state.next,onMore:g.more,noun:`rules`,onSelect:e=>{l(null),a(e.id),M()},selected:e=>e.id===i})})]}),(0,K.jsxs)(`section`,{className:`mt-8 space-y-2`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,K.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Notifications`}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsx)(T,{label:`Status`,value:u.status,anything:`Any status`,options:ae.map(e=>({value:e,label:e,mark:(0,K.jsx)(I,{status:e})})),onChange:e=>{d(t=>({...t,status:e}))}}),(0,K.jsx)(T,{label:`Notifier`,value:u.notifier,anything:`Any notifier`,options:rt(v.rows),onChange:e=>{d(t=>({...t,notifier:e}))}})]})]}),(0,K.jsx)(o,{loading:!_.state.read,problem:_.state.problem,empty:E.length===0,emptyMessage:`Nothing queued.`,children:(0,K.jsx)(P,{columns:ot,rows:E,rowKey:et,reading:_.state.reading,next:_.state.next,onMore:_.more,noun:`notifications`,onSelect:e=>{a(null),l(e.id),M()},selected:e=>e.id===s})})]}),(0,K.jsx)(Ge,{open:e,onOpenChange:t,notifiers:$(v.rows),onCreated:b}),(0,K.jsx)(Xe,{open:n!==null,draft:n?.draft??Q,onOpenChange:e=>{e||r(null)},notifiers:$(v.rows),onQueued:S,onOpenQueue:e=>{r(null),a(null),l(e),S(),M()}},n?.opened??0)]})}function $(e){return[...new Set(e.map(e=>e.notifier))]}function rt(e){return $(e).map(e=>({value:e,label:e}))}function it(){let[e,t]=(0,W.useState)(null),[n,r]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let e=!0;return Se().then(n=>{e&&t(n)},()=>{e&&t([])}),B().then(t=>{e&&r(t.items)},()=>{e&&r([])}),()=>{e=!1}},[]),{rows:(0,W.useMemo)(()=>Ce(e??[],n??[]),[n,e]),read:e!==null&&n!==null}}var at=[{id:`rule`,header:`Rule`,cell:e=>{let t=p(e);return(0,K.jsxs)(`span`,{className:`flex flex-wrap items-baseline gap-2`,children:[(0,K.jsx)(`span`,{className:t.named?`text-sm font-medium`:`font-mono text-sm font-medium`,children:t.title}),t.code!==null&&(0,K.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:t.code})]})}},{id:`event`,header:`Event`,cell:e=>(0,K.jsx)(`span`,{className:`text-sm`,children:Ve[e.event]})},{id:`scope`,header:`Scope`,cell:e=>(0,K.jsx)(`span`,{className:e.scope===`pipeline`?`font-mono text-xs`:`text-sm`,children:G(e)})},{id:`delivers`,header:`Delivers through`,cell:e=>(0,K.jsx)(q,{notifier:e.notifier,connection:e.connection})},{id:`throttle`,header:`Throttle`,className:`font-mono text-xs`,cell:e=>(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:se(e.throttle)})},{id:`sent`,header:`Last sent`,className:`text-xs`,cell:e=>e.last_sent_at===null?(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`never`}):(0,K.jsx)(z,{className:`text-muted-foreground`,at:e.last_sent_at})},{id:`live`,header:`State`,cell:e=>e.paused?(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`paused`}):e.active?(0,K.jsx)(`span`,{className:`text-xs text-good`,children:`active`}):(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`off`})}],ot=[{id:`status`,header:`Status`,cell:e=>(0,K.jsx)(I,{status:e.status})},{id:`subject`,header:`Subject`,cell:e=>(0,K.jsxs)(`span`,{className:`flex flex-col`,children:[(0,K.jsx)(`span`,{className:`text-sm`,children:e.subject}),e.error!==null&&(0,K.jsx)(`span`,{className:`max-w-96 truncate text-xs text-critical`,title:e.error,children:e.error})]})},{id:`delivers`,header:`Delivers through`,cell:e=>(0,K.jsx)(q,{notifier:e.notifier,connection:e.connection})},{id:`run`,header:`Run`,cell:e=>(0,K.jsx)(Oe,{notification:e})},{id:`queued`,header:`Queued`,className:`text-xs`,cell:e=>(0,K.jsx)(z,{className:`text-muted-foreground`,at:e.created_at})},{id:`sent`,header:`Sent`,className:`text-xs`,cell:e=>e.status===`sent`?(0,K.jsx)(z,{className:`text-muted-foreground`,at:e.sent_at}):e.attempt>0?(0,K.jsxs)(`span`,{className:`text-faint`,children:[e.attempt,` of `,e.max_attempts,` attempts`]}):null}];export{tt as AdminAlerting};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-BatatxyT.js";import{n,t as r}from"./PageState-CvfT4nGl.js";import{r as i}from"./utils-CRMSf51M.js";import{t as a}from"./input-o9l61NKa.js";import{T as o,_ as s,ct as c,lt as l,nt as u,tt as d,w as f}from"./index-jhYU37cm.js";import{t as p}from"./Markdown-CttJCcht.js";import{t as m}from"./KindChip-CuBFi3X9.js";import{a as h,c as g,l as _,n as v,o as y,r as b,t as x}from"./blocks-DkD_WaQ6.js";import{n as S,r as C}from"./Panel-Cb5LtMYX.js";import{r as w}from"./schema-form-FkbdR3oI.js";var T=e(t(),1),E=i(),D=e=>e.id,O=[{key:`scheme`,title:`Storage schemes`,noun:`schemes`},{key:`notifier`,title:`Notifiers`,noun:`notifiers`},{key:`connection`,title:`Connection kinds`,noun:`connection kinds`}],k=e=>t=>`${e}:${t.id}`,A=()=>{};function j(){let[e,t]=(0,T.useState)(``),[i,p]=(0,T.useState)(null),{value:m,problem:_,read:v}=s(g),b=(0,T.useMemo)(()=>m?.blocks??[],[m]),S=(0,T.useMemo)(()=>h(b,e),[b,e]),C=(0,T.useMemo)(()=>x(S),[S]),w=(0,T.useMemo)(()=>y(m?.storage_schemes??[],e),[m,e]),j=(0,T.useMemo)(()=>y(m?.notifiers??[],e),[m,e]),I=(0,T.useMemo)(()=>y(m?.connection_kinds??[],e),[m,e]),L=b.find(e=>`block:${e.id}`===i)??null,R={scheme:w,notifier:j,connection:I},z=O.flatMap(e=>R[e.key].map(t=>({registry:e,entry:t}))).find(({registry:e,entry:t})=>k(e.key)(t)===i)??null;(0,T.useEffect)(()=>{if(v)return u({note:null,tone:`quiet`,identifier:null}),d},[b,v,m]),(0,T.useEffect)(()=>{if(L!==null)return c([{id:`block`,label:`Block`,render:()=>(0,E.jsx)(F,{entry:L})}],{screen:`blocks`});if(z!==null){let{registry:e,entry:t}=z;return c([{id:`entry`,label:e.title,render:()=>(0,E.jsx)(P,{entry:t})}],{screen:`blocks`})}},[L,z]);let B=(0,T.useCallback)(e=>{p(`block:${e.id}`),l()},[]);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r,{title:`Blocks`,aside:(0,E.jsx)(o,{tag:`blocks`})}),(0,E.jsx)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:(0,E.jsx)(a,{className:`w-56`,value:e,onChange:e=>{t(e.target.value)},placeholder:`Search blocks`,"aria-label":`Search blocks by id or summary`})}),(0,E.jsx)(n,{loading:!v,problem:_,empty:S.length===0&&w.length===0&&j.length===0&&I.length===0,emptyMessage:b.length===0?`No blocks installed — plugins contribute them.`:`Nothing in the catalog matches that.`,children:(0,E.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[C.map(([e,t])=>(0,E.jsxs)(`section`,{children:[(0,E.jsx)(`h2`,{className:`text-faint mb-1.5 font-mono text-xs font-semibold tracking-wide uppercase`,children:e}),(0,E.jsx)(f,{chrome:{footer:!1},fixed:!0,columns:M,rows:t,rowKey:D,reading:!1,next:null,onMore:A,noun:`blocks`,onSelect:B,selected:e=>`block:${e.id}`===i})]},e)),O.map(e=>{let t=R[e.key];return t.length===0?null:(0,E.jsxs)(`section`,{children:[(0,E.jsx)(`h2`,{className:`text-faint mb-1.5 font-mono text-xs font-semibold tracking-wide uppercase`,children:e.title}),(0,E.jsx)(f,{chrome:{footer:!1},fixed:!0,columns:N(e.key),rows:t,rowKey:k(e.key),reading:!1,next:null,onMore:A,noun:e.noun,onSelect:t=>{p(k(e.key)(t)),l()},selected:t=>k(e.key)(t)===i})]},e.key)})]})})]})}var M=[{id:`block`,header:`Block`,className:`w-full max-w-0`,cell:e=>(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsx)(`span`,{className:`font-mono text-sm font-semibold`,children:e.id}),(0,E.jsx)(`p`,{className:`text-muted-foreground truncate text-xs`,title:e.summary,children:e.summary})]})},{id:`kind`,header:`Kind`,className:`w-32 whitespace-nowrap`,cell:e=>(0,E.jsx)(m,{kind:e.kind})},{id:`plugin`,header:`Plugin`,className:`w-36 font-mono text-xs whitespace-nowrap`,cell:e=>(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:e.plugin})}];function N(e){let t=e===`scheme`?`storage`:e;return[{id:`entry`,header:`Entry`,className:`w-full max-w-0`,cell:e=>{let t=typeof e.config_schema.description==`string`?e.config_schema.description:``;return(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsx)(`span`,{className:`font-mono text-sm font-semibold`,children:e.id}),(0,E.jsx)(`p`,{className:`text-muted-foreground truncate text-xs`,title:t,children:t})]})}},{id:`kind`,header:`Kind`,className:`w-32 whitespace-nowrap`,cell:()=>(0,E.jsx)(m,{kind:t})},{id:`plugin`,header:`Plugin`,className:`w-36 font-mono text-xs whitespace-nowrap`,cell:e=>(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:e.plugin})}]}function P({entry:e}){let t=(0,T.useMemo)(()=>w(e.config_schema),[e]),n=typeof e.config_schema.description==`string`?e.config_schema.description:null;return(0,E.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,E.jsxs)(`div`,{className:`space-y-1`,children:[(0,E.jsx)(`h2`,{className:`font-mono text-sm font-semibold`,children:e.id}),n!==null&&(0,E.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:n}),(0,E.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:(0,E.jsx)(S,{term:`plugin`,detail:e.plugin})})]}),(0,E.jsx)(C,{title:`Config`,children:t.length===0?(0,E.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`This takes no configuration.`}):(0,E.jsx)(`div`,{className:`flex flex-col gap-4`,children:t.map(e=>(0,E.jsx)(I,{field:e},e.name))})})]})}function F({entry:e}){let t=(0,T.useMemo)(()=>w(e.config_schema),[e]),n=b(e);return(0,E.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,E.jsxs)(`div`,{className:`space-y-1`,children:[(0,E.jsx)(`h2`,{className:`font-mono text-sm font-semibold`,children:e.id}),(0,E.jsx)(`p`,{children:(0,E.jsx)(m,{kind:e.kind})}),(0,E.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e.summary})]}),(0,E.jsx)(C,{title:`Facts`,children:(0,E.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:n.map(e=>(0,E.jsx)(S,{term:e.term,detail:e.detail},e.term))})}),(0,E.jsx)(C,{title:`Config`,children:t.length===0?(0,E.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`This block takes no configuration.`}):(0,E.jsx)(`div`,{className:`flex flex-col gap-4`,children:t.map(e=>(0,E.jsx)(I,{field:e},e.name))})})]})}function I({field:e}){let t=v(e);return(0,E.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2`,children:[(0,E.jsx)(`span`,{className:`font-mono text-sm font-medium`,children:e.name}),(0,E.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:_(e)}),e.required&&(0,E.jsx)(`span`,{className:`text-primary text-xs`,children:`required`}),e.hint!==null&&(0,E.jsx)(`span`,{className:`text-faint text-xs`,children:e.hint}),t!==null&&(0,E.jsxs)(`span`,{className:`text-faint text-xs`,children:[`default `,t]})]}),e.options.length>0&&(0,E.jsx)(`p`,{className:`text-muted-foreground font-mono text-xs`,children:e.options.map(e=>e.label).join(` · `)}),e.help!==null&&(0,E.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:(0,E.jsx)(p,{text:e.help})})]})}export{j as Blocks};
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-BatatxyT.js";import{n,t as r}from"./PageState-CTB50fRO.js";import{r as i}from"./utils-CRMSf51M.js";import{t as a}from"./input-7d4ZlAGD.js";import{T as o,_ as s,lt as c,nt as l,rt as u,ut as d,w as f}from"./index-CeUoyQJy.js";import{t as p}from"./Markdown-B6er3LhH.js";import{t as m}from"./KindChip-CuBFi3X9.js";import{a as h,c as g,l as _,n as v,o as y,r as b,t as x}from"./blocks-CPJMNxIu.js";import{n as S,r as C}from"./Panel-Bk3CoJZ6.js";import{r as w}from"./schema-form-FkbdR3oI.js";var T=e(t(),1),E=i(),D=e=>e.id,O=[{key:`scheme`,title:`Storage schemes`,noun:`schemes`},{key:`notifier`,title:`Notifiers`,noun:`notifiers`},{key:`connection`,title:`Connection kinds`,noun:`connection kinds`}],k=e=>t=>`${e}:${t.id}`,A=()=>{};function j(){let[e,t]=(0,T.useState)(``),[i,p]=(0,T.useState)(null),{value:m,problem:_,read:v}=s(g),b=(0,T.useMemo)(()=>m?.blocks??[],[m]),S=(0,T.useMemo)(()=>h(b,e),[b,e]),C=(0,T.useMemo)(()=>x(S),[S]),w=(0,T.useMemo)(()=>y(m?.storage_schemes??[],e),[m,e]),j=(0,T.useMemo)(()=>y(m?.notifiers??[],e),[m,e]),I=(0,T.useMemo)(()=>y(m?.connection_kinds??[],e),[m,e]),L=b.find(e=>`block:${e.id}`===i)??null,R={scheme:w,notifier:j,connection:I},z=O.flatMap(e=>R[e.key].map(t=>({registry:e,entry:t}))).find(({registry:e,entry:t})=>k(e.key)(t)===i)??null;(0,T.useEffect)(()=>{if(v)return u({note:null,tone:`quiet`,identifier:null}),l},[b,v,m]),(0,T.useEffect)(()=>{if(L!==null)return c([{id:`block`,label:`Block`,render:()=>(0,E.jsx)(F,{entry:L})}],{screen:`blocks`});if(z!==null){let{registry:e,entry:t}=z;return c([{id:`entry`,label:e.title,render:()=>(0,E.jsx)(P,{entry:t})}],{screen:`blocks`})}},[L,z]);let B=(0,T.useCallback)(e=>{p(`block:${e.id}`),d()},[]);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r,{title:`Blocks`,aside:(0,E.jsx)(o,{tag:`blocks`})}),(0,E.jsx)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:(0,E.jsx)(a,{className:`w-56`,value:e,onChange:e=>{t(e.target.value)},placeholder:`Search blocks`,"aria-label":`Search blocks by id or summary`})}),(0,E.jsx)(n,{loading:!v,problem:_,empty:S.length===0&&w.length===0&&j.length===0&&I.length===0,emptyMessage:b.length===0?`No blocks installed — plugins contribute them.`:`Nothing in the catalog matches that.`,children:(0,E.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[C.map(([e,t])=>(0,E.jsxs)(`section`,{children:[(0,E.jsx)(`h2`,{className:`mb-1.5 font-mono text-xs font-semibold tracking-wide text-faint uppercase`,children:e}),(0,E.jsx)(f,{chrome:{footer:!1},fixed:!0,columns:M,rows:t,rowKey:D,reading:!1,next:null,onMore:A,noun:`blocks`,onSelect:B,selected:e=>`block:${e.id}`===i})]},e)),O.map(e=>{let t=R[e.key];return t.length===0?null:(0,E.jsxs)(`section`,{children:[(0,E.jsx)(`h2`,{className:`mb-1.5 font-mono text-xs font-semibold tracking-wide text-faint uppercase`,children:e.title}),(0,E.jsx)(f,{chrome:{footer:!1},fixed:!0,columns:N(e.key),rows:t,rowKey:k(e.key),reading:!1,next:null,onMore:A,noun:e.noun,onSelect:t=>{p(k(e.key)(t)),d()},selected:t=>k(e.key)(t)===i})]},e.key)})]})})]})}var M=[{id:`block`,header:`Block`,className:`w-full max-w-0`,cell:e=>(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsx)(`span`,{className:`font-mono text-sm font-semibold`,children:e.id}),(0,E.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:e.summary,children:e.summary})]})},{id:`kind`,header:`Kind`,className:`w-32 whitespace-nowrap`,cell:e=>(0,E.jsx)(m,{kind:e.kind})},{id:`plugin`,header:`Plugin`,className:`w-36 font-mono text-xs whitespace-nowrap`,cell:e=>(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:e.plugin})}];function N(e){let t=e===`scheme`?`storage`:e;return[{id:`entry`,header:`Entry`,className:`w-full max-w-0`,cell:e=>{let t=typeof e.config_schema.description==`string`?e.config_schema.description:``;return(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsx)(`span`,{className:`font-mono text-sm font-semibold`,children:e.id}),(0,E.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:t,children:t})]})}},{id:`kind`,header:`Kind`,className:`w-32 whitespace-nowrap`,cell:()=>(0,E.jsx)(m,{kind:t})},{id:`plugin`,header:`Plugin`,className:`w-36 font-mono text-xs whitespace-nowrap`,cell:e=>(0,E.jsx)(`span`,{className:`text-muted-foreground`,children:e.plugin})}]}function P({entry:e}){let t=(0,T.useMemo)(()=>w(e.config_schema),[e]),n=typeof e.config_schema.description==`string`?e.config_schema.description:null;return(0,E.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,E.jsxs)(`div`,{className:`space-y-1`,children:[(0,E.jsx)(`h2`,{className:`font-mono text-sm font-semibold`,children:e.id}),n!==null&&(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n}),(0,E.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:(0,E.jsx)(S,{term:`plugin`,detail:e.plugin})})]}),(0,E.jsx)(C,{title:`Config`,children:t.length===0?(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This takes no configuration.`}):(0,E.jsx)(`div`,{className:`flex flex-col gap-4`,children:t.map(e=>(0,E.jsx)(I,{field:e},e.name))})})]})}function F({entry:e}){let t=(0,T.useMemo)(()=>w(e.config_schema),[e]),n=b(e);return(0,E.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,E.jsxs)(`div`,{className:`space-y-1`,children:[(0,E.jsx)(`h2`,{className:`font-mono text-sm font-semibold`,children:e.id}),(0,E.jsx)(`p`,{children:(0,E.jsx)(m,{kind:e.kind})}),(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.summary})]}),(0,E.jsx)(C,{title:`Facts`,children:(0,E.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:n.map(e=>(0,E.jsx)(S,{term:e.term,detail:e.detail},e.term))})}),(0,E.jsx)(C,{title:`Config`,children:t.length===0?(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This block takes no configuration.`}):(0,E.jsx)(`div`,{className:`flex flex-col gap-4`,children:t.map(e=>(0,E.jsx)(I,{field:e},e.name))})})]})}function I({field:e}){let t=v(e);return(0,E.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2`,children:[(0,E.jsx)(`span`,{className:`font-mono text-sm font-medium`,children:e.name}),(0,E.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:_(e)}),e.required&&(0,E.jsx)(`span`,{className:`text-xs text-primary`,children:`required`}),e.hint!==null&&(0,E.jsx)(`span`,{className:`text-xs text-faint`,children:e.hint}),t!==null&&(0,E.jsxs)(`span`,{className:`text-xs text-faint`,children:[`default `,t]})]}),e.options.length>0&&(0,E.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:e.options.map(e=>e.label).join(` · `)}),e.help!==null&&(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,E.jsx)(p,{text:e.help})})]})}export{j as Blocks};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-BatatxyT.js";import{n}from"./chunk-BV7QT456-Bfa1dvOx.js";import{r,t as i}from"./utils-CRMSf51M.js";var a=e(t(),1),o=r();function s({trail:e,code:t}){return(0,o.jsxs)(`nav`,{className:`flex min-w-0 items-center gap-1.5 text-sm`,"aria-label":`Breadcrumb`,title:e.map(e=>e.label).join(` / `),children:[e.map((t,r)=>{let s=r===e.length-1,c=s||t.keep===!0,l=e.slice(0,r).some(e=>e.keep===!0);return(0,o.jsxs)(a.Fragment,{children:[r>0&&(0,o.jsx)(`span`,{className:i(`text-faint`,!(c&&l)&&`hidden md:inline`),"aria-hidden":!0,children:`/`}),t.to===void 0?(0,o.jsx)(`span`,{title:t.title,className:i(`min-w-0 truncate`,s&&`font-medium`,t.mono===!0&&`font-mono`,!c&&`hidden md:inline`),children:t.label}):(0,o.jsx)(n,{to:t.to,title:t.title,className:i(`text-muted-foreground hover:text-foreground min-w-0 truncate`,t.mono===!0&&`font-mono`,!c&&`hidden md:inline`),children:t.label})]},`${t.label}-${String(r)}`)}),t!=null&&(0,o.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate font-mono text-xs`,children:t})]})}export{s as t};
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-BatatxyT.js";import{n}from"./chunk-BV7QT456-Bfa1dvOx.js";import{r,t as i}from"./utils-CRMSf51M.js";var a=e(t(),1),o=r();function s({trail:e,code:t}){return(0,o.jsxs)(`nav`,{className:`flex min-w-0 items-center gap-1.5 text-sm`,"aria-label":`Breadcrumb`,title:e.map(e=>e.label).join(` / `),children:[e.map((t,r)=>{let s=r===e.length-1,c=s||t.keep===!0,l=e.slice(0,r).some(e=>e.keep===!0);return(0,o.jsxs)(a.Fragment,{children:[r>0&&(0,o.jsx)(`span`,{className:i(`text-faint`,!(c&&l)&&`hidden md:inline`),"aria-hidden":!0,children:`/`}),t.to===void 0?(0,o.jsx)(`span`,{title:t.title,className:i(`min-w-0 truncate`,s&&`font-medium`,t.mono===!0&&`font-mono`,!c&&`hidden md:inline`),children:t.label}):(0,o.jsx)(n,{to:t.to,title:t.title,className:i(`min-w-0 truncate text-muted-foreground hover:text-foreground`,t.mono===!0&&`font-mono`,!c&&`hidden md:inline`),children:t.label})]},`${t.label}-${String(r)}`)}),t!=null&&(0,o.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs text-muted-foreground`,children:t})]})}export{s as t};