dirigent-server 0.21.0__tar.gz → 0.23.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.
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/PKG-INFO +5 -5
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/THIRD_PARTY_NOTICES.md +1 -1
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/pyproject.toml +5 -5
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/pyproject.toml.orig +5 -5
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/app.py +12 -11
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/health.py +2 -1
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/messages.py +4 -5
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/__init__.py +3 -0
- dirigent_server-0.23.0/src/dirigent_server/routes/labels.py +16 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/runs.py +29 -9
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/schemas.py +53 -16
- dirigent_server-0.23.0/src/dirigent_server/static/assets/AdminOnly-CdJ1ded0.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Alerting-B5sI7bkS.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Blocks-Bv1m2JIH.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Breadcrumb-w3EMx9zM.js +1 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/CodeEditor-B9sClhqO.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/CodeEditor-DsxK1EAQ.js +2 -2
- dirigent_server-0.23.0/src/dirigent_server/static/assets/ConnectionFields-HTVyzXLM.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Connections-Cy5CmtxJ.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Dashboard-DQpEKL7c.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Description-C-byz7P3.js +2 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/ExamplePanel-Bk9Am0Hf.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Examples-D_j1Eck8.js +2 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Instant-mr1E5jAK.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/Instant-CihfxyJ1.js +1 -1
- dirigent_server-0.23.0/src/dirigent_server/static/assets/JsonBlock-BRHbezyM.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/ListTable-A_dkU0ci.js +1 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Markdown-roa7jpVu.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/Markdown-D4x5xD_I.js +1 -1
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Overview-BD118wP-.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/PageState-CuZbHz6s.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Panel-COl_eBj1.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Picker-BUMFpPCz.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/PipelineEditor-B3ym720q.js +2 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/PipelineGraph-BZhB7E7N.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/PipelinePreview-C4b75dOj.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/PipelineTab-CICtEZUo.js +105 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/ProgramReference-BEfxZwxT.js +1 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Refusal-B8-kOQlC.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/Refusal-3GHMZOnu.js +1 -1
- dirigent_server-0.23.0/src/dirigent_server/static/assets/RunDetail-nkC4jwxI.js +3 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/RunGraph-B-FMnqWE.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/SchemaForm-ByfDLufz.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Schemas-PtKVK80Z.js +10 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/SettingsDialog-CdQvlI8u.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/StarterPicker-Bsc3wsmp.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/StepPorts-CBb-ntoM.js +7 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/TileCard-g50S83Uu.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Triggers-C23ermTW.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Users-BKibVm5A.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/WindowedPane-B5QHXRJT.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/Workers-CDXpyuHv.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/WorkersTable-LugQKhcG.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/api-B9HrzKUX.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/auth-QgZsjd0d.js +1 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/badge-BovCxjd1.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/badge-CzFHv2r3.js +1 -1
- dirigent_server-0.23.0/src/dirigent_server/static/assets/blocks-DCUqC697.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/chevron-down-CxU_G9N3.js +1 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/chunk-OB3PAWPO-DOp4K52_.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/chunk-OB3PAWPO-m4Sckj1b.js +1 -1
- dirigent_server-0.23.0/src/dirigent_server/static/assets/connections-ENTr1Nsd.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/copy-BXKuMpY5.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/dist-CvOdB3Md.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/dropdown-menu-BHh5eZwx.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/examples-NA2YGKLT.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/file-braces-CTPaWRnZ.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/format-D2kQLRJs.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/glyphs-CaFpiNjJ.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/index-DZ7D7u3R.css +2 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/index-DcrUT8O1.js +53 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/input-sbz1EN8t.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-cyrillic-600-normal-8K4wrrwR.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-cyrillic-600-normal-EVf6-Yzo.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-greek-600-normal-H7WoG9Et.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-greek-600-normal-mc2nkWzM.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-latin-ext-600-normal-DObL3zCW.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/jetbrains-mono-vietnamese-600-normal-OWROknRo.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/jsonMode-C2rhmYxE.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/jsonMode-DzxZa00C.js +1 -1
- dirigent_server-0.23.0/src/dirigent_server/static/assets/labels-Dp8H1wzG.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/nav-kCAjFkWN.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/paging-C4feZMNQ.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/panels-D1Fnei43.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/pipelines-Da2DZJX0.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/play-BEK7f0g4.js +1 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/preferences-CEibwN5K.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/preferences-SNZNX5Se.js +1 -1
- dirigent_server-0.23.0/src/dirigent_server/static/assets/resolveAriaLabelledBy-oo0FwAnY.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/schemas-BJXljAsa.js +1 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/starters-CgC7I45V.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/starters-DexsdOaG.js +2 -2
- dirigent_server-0.23.0/src/dirigent_server/static/assets/status-PejJT5B-.js +1 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/react-CQOZoUwg.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/store-D-5yFBN1.js +1 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/textarea-ljIbN_md.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/textarea-D86x5ut1.js +1 -1
- dirigent_server-0.23.0/src/dirigent_server/static/assets/tooltip-Bas36yZU.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/triggers-DD6LKQNg.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/use-heartbeat-C3WWagro.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/use-store-CZcp6jmY.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/users-CgBtM5Vf.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/workers-D21cApnc.js +1 -0
- dirigent_server-0.23.0/src/dirigent_server/static/assets/x-C07Lrlf8.js +1 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/yaml-CLSOANGG.js → dirigent_server-0.23.0/src/dirigent_server/static/assets/yaml-D-Hjyunz.js +1 -1
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/index.html +27 -27
- dirigent_server-0.21.0/src/dirigent_server/static/assets/AdminOnly-CWzFAkRQ.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Alerting-D3KAVTv0.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Blocks-B_BEIvwW.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Breadcrumb-x6p00HyX.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Connections-CmN2b7Dw.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Dashboard-DTmnXmfY.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Description-MmXUnb-9.js +0 -2
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ExamplePanel-B-ZuMODN.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Examples-CbmS9l2a.js +0 -2
- dirigent_server-0.21.0/src/dirigent_server/static/assets/JsonBlock-DwIVIGWh.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ListTable-D-mI8v9Y.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Overview-BpjDksB7.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/PageState-BLuobMye.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Panel-CqrOYByl.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Picker-jTaWHWGB.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/PipelineEditor-DLGzheqJ.js +0 -2
- dirigent_server-0.21.0/src/dirigent_server/static/assets/PipelineGraph-Dn18zCoZ.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/PipelinePreview-BPyUvdOo.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/PipelineTab-BYrALqeE.js +0 -105
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ProgramReference-DF37mMAT.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/RunDetail-B_q6JL9s.js +0 -3
- dirigent_server-0.21.0/src/dirigent_server/static/assets/RunGraph-BGK0Xv2D.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/SchemaForm-DLj4I7id.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Schemas-cuyuiN7C.js +0 -10
- dirigent_server-0.21.0/src/dirigent_server/static/assets/SettingsDialog-3fpnWZxX.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/StarterPicker-DZ-cG3dS.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/StepPorts-Tn2lFNQr.js +0 -7
- dirigent_server-0.21.0/src/dirigent_server/static/assets/TileCard-CGUQmmKn.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Triggers-Bv1YP__i.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Users-Cbz-vtKl.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/WindowedPane-li0CnoR2.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/Workers-B8-mU9eH.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/WorkersTable-DUHvNQ1T.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/api-Bm1JZLuC.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/auth-CHgfcdt9.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/blocks-CclbVd8c.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/chevron-down-DAO3SUWv.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/connections-Cp5WCruj.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/copy-BeBwg8IR.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/dist-DD8kpv1W.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/dropdown-menu-B-6CcHKw.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/examples-DB467CTN.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/file-braces-Ep8AP5Yq.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/format-B5YbYOY-.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/glyphs-C1sjljkh.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
- dirigent_server-0.21.0/src/dirigent_server/static/assets/index-CgkcXl1G.css +0 -2
- dirigent_server-0.21.0/src/dirigent_server/static/assets/index-Dpu5aiIb.js +0 -53
- dirigent_server-0.21.0/src/dirigent_server/static/assets/input-1fShkFXn.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/nav-i7bJ0lrA.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/paging-CpRIkEky.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/pipelines-BXPe0IzI.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/play-CPVSEWx6.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/resolveAriaLabelledBy-ClHvyYLK.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/schemas-7KY_7aIc.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/select-Ck-1BZPw.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/status-Ctx8x8Mf.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/store-C2zgoyrT.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/tooltip-D7_KwbOU.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/triggers-Dim48dZY.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/use-heartbeat-CBT8848s.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/use-store-CfRquqZF.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/users-CTGHiHMA.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/with-selector-BXYKoaOE.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/workers-BH2Za19E.js +0 -1
- dirigent_server-0.21.0/src/dirigent_server/static/assets/x-Dltw6Vbs.js +0 -1
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/LICENSE +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/README.md +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/__init__.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/dependencies.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/errors.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/logging.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/pagination.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/py.typed +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/alerts.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/auth.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/blocks.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/connections.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/examples.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/hooks.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/pipelines.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/playground.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/schema.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/system.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/trigger_documents.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/triggers.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/users.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/routes/workers.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/security.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/.gitkeep +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/CodeEditor-C4OnjBMt.css +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/KindChip-CwU_Xxdy.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/Mark-DQR2php6.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/Segmented-KaDiGiyr.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/codicon-DCmgc-ay.ttf +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/docs-CCoB3shg.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/editor.worker-CIvRzd4O.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/elk-engine-Bm7I_NRI.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/elk-worker.min-DfmSo98M.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2 +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2 +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2 +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2 +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/identity-BNZxCf_y.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/idle-DnO3aHK7.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/json.worker-fczZDBja.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/preload-helper-BZ1Pz5am.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/rolldown-runtime-Dd_uD5pT.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/shell-CC2rA5mh.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/sql-NEE52Syq.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/twig-De2hgUGE.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/utils-CT7ZGLfR.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/assets/yaml.worker-B2SaT_wA.js +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/favicon-32.png +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/static/logo.png +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/transactions.py +0 -0
- {dirigent_server-0.21.0 → dirigent_server-0.23.0}/src/dirigent_server/ui.py +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dirigent-server
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.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
|
|
7
7
|
License-File: THIRD_PARTY_NOTICES.md
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.13
|
|
10
|
-
Requires-Dist: dirigent-client==0.
|
|
11
|
-
Requires-Dist: dirigent-common==0.
|
|
12
|
-
Requires-Dist: dirigent-core==0.
|
|
13
|
-
Requires-Dist: dirigent-examples==0.
|
|
10
|
+
Requires-Dist: dirigent-client==0.23.0
|
|
11
|
+
Requires-Dist: dirigent-common==0.23.0
|
|
12
|
+
Requires-Dist: dirigent-core==0.23.0
|
|
13
|
+
Requires-Dist: dirigent-examples==0.23.0
|
|
14
14
|
Requires-Dist: fastapi>=0.141.1
|
|
15
15
|
Requires-Python: >=3.13
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
@@ -540,7 +540,7 @@ in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License
|
|
|
540
540
|
## SIL Open Font License 1.1
|
|
541
541
|
|
|
542
542
|
- `@fontsource-variable/ibm-plex-sans` -- IBM Plex Sans, Copyright 2019 IBM Corp. All rights reserved.
|
|
543
|
-
- `@fontsource/
|
|
543
|
+
- `@fontsource/jetbrains-mono` -- JetBrains Mono, Copyright 2020 The JetBrains Mono Project Authors, SIL Open Font License 1.1.
|
|
544
544
|
|
|
545
545
|
```
|
|
546
546
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dirigent-server"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.23.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"
|
|
@@ -14,10 +14,10 @@ classifiers = [
|
|
|
14
14
|
"Programming Language :: Python :: 3.13",
|
|
15
15
|
]
|
|
16
16
|
dependencies = [
|
|
17
|
-
"dirigent-client==0.
|
|
18
|
-
"dirigent-common==0.
|
|
19
|
-
"dirigent-core==0.
|
|
20
|
-
"dirigent-examples==0.
|
|
17
|
+
"dirigent-client==0.23.0",
|
|
18
|
+
"dirigent-common==0.23.0",
|
|
19
|
+
"dirigent-core==0.23.0",
|
|
20
|
+
"dirigent-examples==0.23.0",
|
|
21
21
|
"fastapi>=0.141.1",
|
|
22
22
|
]
|
|
23
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dirigent-server"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.23.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"
|
|
@@ -11,10 +11,10 @@ classifiers = [
|
|
|
11
11
|
"Programming Language :: Python :: 3.13",
|
|
12
12
|
]
|
|
13
13
|
dependencies = [
|
|
14
|
-
"dirigent-client==0.
|
|
15
|
-
"dirigent-common==0.
|
|
16
|
-
"dirigent-core==0.
|
|
17
|
-
"dirigent-examples==0.
|
|
14
|
+
"dirigent-client==0.23.0",
|
|
15
|
+
"dirigent-common==0.23.0",
|
|
16
|
+
"dirigent-core==0.23.0",
|
|
17
|
+
"dirigent-examples==0.23.0",
|
|
18
18
|
"fastapi>=0.141.1",
|
|
19
19
|
]
|
|
20
20
|
|
|
@@ -7,7 +7,7 @@ from contextlib import asynccontextmanager
|
|
|
7
7
|
|
|
8
8
|
from fastapi import FastAPI
|
|
9
9
|
|
|
10
|
-
from dirigent_core import __version__
|
|
10
|
+
from dirigent_core import __version__, wakeups
|
|
11
11
|
from dirigent_core.auth import BOOTSTRAP_PASSWORD_ENV, bootstrap_admin
|
|
12
12
|
from dirigent_core.config import Settings, get_settings
|
|
13
13
|
from dirigent_core.database import create_engine, create_session_factory, session_scope
|
|
@@ -73,16 +73,17 @@ def create_app(
|
|
|
73
73
|
app.state.scheduler = None
|
|
74
74
|
clock: asyncio.Task[None] | None = None
|
|
75
75
|
try:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
async with wakeups.listening(resolved.database_url):
|
|
77
|
+
await _bootstrap(app)
|
|
78
|
+
await _apply_startup_directory(app)
|
|
79
|
+
clock = await _start_scheduler(app, embed=embed)
|
|
80
|
+
_logger.info(
|
|
81
|
+
"server starting",
|
|
82
|
+
database="sqlite" if resolved.is_sqlite else "postgresql",
|
|
83
|
+
blocks=len(app.state.services.host.block_ids),
|
|
84
|
+
scheduler=embed,
|
|
85
|
+
)
|
|
86
|
+
yield
|
|
86
87
|
finally:
|
|
87
88
|
await _stop_scheduler(app, clock)
|
|
88
89
|
await engine.dispose()
|
|
@@ -9,6 +9,7 @@ from fastapi import APIRouter, Request, Response, status
|
|
|
9
9
|
from sqlalchemy.ext.asyncio import AsyncEngine
|
|
10
10
|
|
|
11
11
|
from dirigent_client.schemas import CheckResult, CheckStatus, Health, Readiness
|
|
12
|
+
from dirigent_common import raised_detail
|
|
12
13
|
from dirigent_core.database import ping
|
|
13
14
|
|
|
14
15
|
router = APIRouter(tags=["health"])
|
|
@@ -73,7 +74,7 @@ async def run_checks(registry: HealthCheckRegistry) -> dict[str, CheckResult]:
|
|
|
73
74
|
try:
|
|
74
75
|
return await check.check()
|
|
75
76
|
except Exception as error:
|
|
76
|
-
return CheckResult(status=CheckStatus.UNHEALTHY, detail=
|
|
77
|
+
return CheckResult(status=CheckStatus.UNHEALTHY, detail=raised_detail(error))
|
|
77
78
|
|
|
78
79
|
names = list(registry)
|
|
79
80
|
results = await asyncio.gather(*(run(registry[name]) for name in names))
|
|
@@ -102,18 +102,17 @@ PLAYGROUND_BAD_KNOB = SERVER.define("playground_bad_knob", "{detail}")
|
|
|
102
102
|
|
|
103
103
|
PLAYGROUND_HEADER_REFUSED = SERVER.define(
|
|
104
104
|
"playground_header_refused",
|
|
105
|
-
"the playground will not set {header} on itself:
|
|
106
|
-
"this origin to another site, or weakens what a browser enforces here
|
|
105
|
+
"the playground will not set {header} on itself: it sets no header that plants a cookie, "
|
|
106
|
+
"opens this origin to another site, or weakens what a browser enforces here",
|
|
107
107
|
)
|
|
108
108
|
|
|
109
109
|
PLAYGROUND_OFF_INSTANCE = SERVER.define(
|
|
110
110
|
"playground_off_instance",
|
|
111
|
-
"{to} is not a path on this instance
|
|
112
|
-
"open redirect is a phishing tool wearing this instance's own domain",
|
|
111
|
+
"{to} is not a path on this instance: the playground redirects only to paths on this instance",
|
|
113
112
|
)
|
|
114
113
|
|
|
115
114
|
PLAYGROUND_UNAUTHENTICATED = SERVER.define(
|
|
116
115
|
"playground_unauthenticated",
|
|
117
116
|
"this route wants a credential: the basic pair {username}/{username}, or the documented "
|
|
118
|
-
"bearer token. Both are public constants
|
|
117
|
+
"bearer token. Both are public constants",
|
|
119
118
|
)
|
|
@@ -15,6 +15,7 @@ from dirigent_server.routes import (
|
|
|
15
15
|
connections,
|
|
16
16
|
examples,
|
|
17
17
|
hooks,
|
|
18
|
+
labels,
|
|
18
19
|
pipelines,
|
|
19
20
|
playground,
|
|
20
21
|
runs,
|
|
@@ -38,6 +39,7 @@ TAGS: list[dict[str, str]] = [
|
|
|
38
39
|
{"name": "hooks", "description": "Webhook intake, authenticated by its own token."},
|
|
39
40
|
{"name": "connections", "description": "Named credential records of contributed kinds."},
|
|
40
41
|
{"name": "blocks", "description": "The catalog every plugin contributes to."},
|
|
42
|
+
{"name": "labels", "description": "The wording every installed pack refuses in."},
|
|
41
43
|
{"name": "examples", "description": "The documents every installed plugin ships."},
|
|
42
44
|
{"name": "schema", "description": "The shape a document is written against."},
|
|
43
45
|
{"name": "schemas", "description": "Named JSON Schemas the instance holds."},
|
|
@@ -72,6 +74,7 @@ def build_router(settings: Settings | None = None) -> APIRouter:
|
|
|
72
74
|
alerts,
|
|
73
75
|
connections,
|
|
74
76
|
blocks,
|
|
77
|
+
labels,
|
|
75
78
|
examples,
|
|
76
79
|
schema,
|
|
77
80
|
schemas,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""The wording every installed pack refuses in, for a surface that renders its own sentences."""
|
|
2
|
+
|
|
3
|
+
from fastapi import APIRouter
|
|
4
|
+
|
|
5
|
+
from dirigent_client.schemas import Labels
|
|
6
|
+
from dirigent_server.dependencies import ServicesDep
|
|
7
|
+
from dirigent_server.security import PrincipalDep
|
|
8
|
+
from dirigent_server.transactions import Transactional
|
|
9
|
+
|
|
10
|
+
router = APIRouter(route_class=Transactional, tags=["labels"])
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@router.get("/labels", operation_id="getLabels", summary="Contributed refusal wording", response_model=Labels)
|
|
14
|
+
async def get_labels(services: ServicesDep, principal: PrincipalDep) -> Labels:
|
|
15
|
+
"""Serve every code an installed pack can refuse under, with the template it renders from."""
|
|
16
|
+
return Labels(templates={code: message.text for code, message in services.host.labels.items()})
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Runs: the list, the detail with its DAG view model, cancellation, retry, logs, events, and a report."""
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
|
+
import time
|
|
4
5
|
from collections.abc import AsyncGenerator, Generator, Mapping, Sequence
|
|
5
6
|
from contextlib import contextmanager
|
|
6
7
|
from datetime import UTC, datetime, timedelta
|
|
@@ -12,7 +13,7 @@ from fastapi import APIRouter, Header, Query, Request, Response, status
|
|
|
12
13
|
from fastapi.responses import PlainTextResponse, StreamingResponse
|
|
13
14
|
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker
|
|
14
15
|
|
|
15
|
-
from dirigent_client.enums import AttemptStatus, LogLevel, RunItemStatus, RunStatus
|
|
16
|
+
from dirigent_client.enums import AttemptStatus, LogLevel, RunItemStatus, RunStatus, TriggerKind
|
|
16
17
|
from dirigent_client.schemas import (
|
|
17
18
|
TERMINAL_RUN_STATUSES,
|
|
18
19
|
ArtifactOut,
|
|
@@ -29,12 +30,13 @@ from dirigent_client.schemas import (
|
|
|
29
30
|
StepReport,
|
|
30
31
|
)
|
|
31
32
|
from dirigent_common.durations import DurationError, parse_duration
|
|
32
|
-
from dirigent_core import telemetry
|
|
33
|
+
from dirigent_core import telemetry, wakeups
|
|
33
34
|
from dirigent_core.artifacts import JSON_CONTENT_TYPE, TEXT_KEY, canonical_json, open_artifact
|
|
34
35
|
from dirigent_core.database import session_scope
|
|
35
36
|
from dirigent_core.engine.definition import PipelineDefinition, load_definition
|
|
36
37
|
from dirigent_core.engine.runs import cancel_run, retry_step
|
|
37
38
|
from dirigent_core.engine.state import StepCounts, attempt_counts, item_counts, step_states
|
|
39
|
+
from dirigent_core.messages import CANCELLED_BY
|
|
38
40
|
from dirigent_core.models import (
|
|
39
41
|
ArtifactRef,
|
|
40
42
|
LogEntry,
|
|
@@ -119,10 +121,12 @@ def _render_run(run: Run, pipeline: Pipeline, version: PipelineVersion, failed:
|
|
|
119
121
|
priority=run.priority,
|
|
120
122
|
params=dict(run.params),
|
|
121
123
|
triggered_by_kind=run.triggered_by_kind,
|
|
124
|
+
parent_run_id=run.triggered_by_id if run.triggered_by_kind is TriggerKind.PIPELINE else None,
|
|
122
125
|
triggered_by_label=run.triggered_by_label,
|
|
123
126
|
trace_id=telemetry.trace_id_of(run.traceparent),
|
|
124
127
|
error=run.error or (failed.error if failed is not None else None),
|
|
125
128
|
error_code=run.error_code or (failed.code if failed is not None else None),
|
|
129
|
+
error_params=run.error_params or (failed.params if failed is not None else None),
|
|
126
130
|
failed_step=failed.step if failed is not None else None,
|
|
127
131
|
started_at=run.started_at,
|
|
128
132
|
finished_at=run.finished_at,
|
|
@@ -161,6 +165,7 @@ def _dag(
|
|
|
161
165
|
depends_on=list(step.depends_on),
|
|
162
166
|
rule=step.rule.value,
|
|
163
167
|
fan_out=step.is_fan_out,
|
|
168
|
+
grid_source=definition.grid_source(name),
|
|
164
169
|
items_total=sum(of_step.values()),
|
|
165
170
|
items_failed=of_step.get(RunItemStatus.FAILED, 0),
|
|
166
171
|
attempts=attempts[name].total if name in attempts else 0,
|
|
@@ -387,7 +392,7 @@ async def cancel(run_id: UUID, session: SessionDep, services: ServicesDep, princ
|
|
|
387
392
|
async def cancel_once() -> RunOut:
|
|
388
393
|
run = await _run_row(session, run_id)
|
|
389
394
|
pipeline, version, _ = await _context(session, run)
|
|
390
|
-
await cancel_run(session, services, run,
|
|
395
|
+
await cancel_run(session, services, run, CANCELLED_BY, principal=principal.label)
|
|
391
396
|
return _render_run(run, pipeline, version)
|
|
392
397
|
|
|
393
398
|
return await retried_on_deadlock(session, cancel_once)
|
|
@@ -484,6 +489,19 @@ def next_interval(current: float) -> float:
|
|
|
484
489
|
return min(current * FOLLOW_BACKOFF, FOLLOW_MAX_INTERVAL_SECONDS)
|
|
485
490
|
|
|
486
491
|
|
|
492
|
+
async def quiet_wait(mark: wakeups.Mark, waited: float, interval: float) -> tuple[float, float]:
|
|
493
|
+
"""Wait out one quiet interval, or less when the run moves, and say how long and what next.
|
|
494
|
+
|
|
495
|
+
A run that moved sends the stream back to its shortest interval.
|
|
496
|
+
"""
|
|
497
|
+
started = time.monotonic()
|
|
498
|
+
moved = await wakeups.wait_settled(mark, timeout=interval)
|
|
499
|
+
elapsed = time.monotonic() - started
|
|
500
|
+
if moved:
|
|
501
|
+
return waited + elapsed, FOLLOW_INTERVAL_SECONDS
|
|
502
|
+
return waited + elapsed, next_interval(interval)
|
|
503
|
+
|
|
504
|
+
|
|
487
505
|
def _claim(user_id: UUID) -> str:
|
|
488
506
|
"""Name the principal a stream is opened by, refusing one that already holds the cap.
|
|
489
507
|
|
|
@@ -551,6 +569,7 @@ async def _tail(
|
|
|
551
569
|
waited = 0.0
|
|
552
570
|
interval = FOLLOW_INTERVAL_SECONDS
|
|
553
571
|
while waited < FOLLOW_MAX_SECONDS:
|
|
572
|
+
moved = wakeups.settled_mark(run_id)
|
|
554
573
|
page, settled = await asyncio.shield(_tail_read(sessions, run_id, cursor, step))
|
|
555
574
|
for entry in page.items:
|
|
556
575
|
yield f"id: {entry.id}\nevent: log\ndata: {entry.model_dump_json()}\n\n"
|
|
@@ -561,9 +580,7 @@ async def _tail(
|
|
|
561
580
|
if settled:
|
|
562
581
|
yield "event: end\ndata: {}\n\n"
|
|
563
582
|
return
|
|
564
|
-
await
|
|
565
|
-
waited += interval
|
|
566
|
-
interval = next_interval(interval)
|
|
583
|
+
waited, interval = await quiet_wait(moved, waited, interval)
|
|
567
584
|
yield "event: expired\ndata: {}\n\n"
|
|
568
585
|
|
|
569
586
|
|
|
@@ -739,6 +756,7 @@ async def _story(
|
|
|
739
756
|
waited = 0.0
|
|
740
757
|
interval = FOLLOW_INTERVAL_SECONDS
|
|
741
758
|
while waited < FOLLOW_MAX_SECONDS:
|
|
759
|
+
changed = wakeups.settled_mark(run_id)
|
|
742
760
|
# Shielded for the same reason _tail_read is: a disconnect lands between polls,
|
|
743
761
|
# never inside a driver await holding the pooled connection.
|
|
744
762
|
attempts, spilled, page, rendered, read_labels = await asyncio.shield(
|
|
@@ -782,9 +800,7 @@ async def _story(
|
|
|
782
800
|
return
|
|
783
801
|
drained = True
|
|
784
802
|
continue
|
|
785
|
-
await
|
|
786
|
-
waited += interval
|
|
787
|
-
interval = next_interval(interval)
|
|
803
|
+
waited, interval = await quiet_wait(changed, waited, interval)
|
|
788
804
|
yield "event: expired\ndata: {}\n\n"
|
|
789
805
|
|
|
790
806
|
|
|
@@ -818,10 +834,14 @@ async def report(run_id: UUID, session: SessionDep, principal: PrincipalDep) ->
|
|
|
818
834
|
warnings=step.warnings,
|
|
819
835
|
duration_ms=step.duration_ms,
|
|
820
836
|
error=step.error,
|
|
837
|
+
error_code=step.error_code,
|
|
838
|
+
error_params=step.error_params,
|
|
821
839
|
)
|
|
822
840
|
for step in facts.steps
|
|
823
841
|
],
|
|
824
842
|
items_total=facts.items_total,
|
|
825
843
|
items_failed=facts.items_failed,
|
|
826
844
|
error=run.error,
|
|
845
|
+
error_code=run.error_code,
|
|
846
|
+
error_params=run.error_params,
|
|
827
847
|
)
|
|
@@ -7,16 +7,25 @@ read from its own keywords -- ``$id`` for the code, ``title`` for the name, ``de
|
|
|
7
7
|
for the description -- when a write does not give one, so what is stored is a portable
|
|
8
8
|
schema rather than a wrapper around one. A stored body is checked to be a valid JSON Schema
|
|
9
9
|
(Draft 2020-12) before anything lands.
|
|
10
|
+
|
|
11
|
+
A stored schema is named from inside a pipeline document's JSON -- under ``requires.schemas``,
|
|
12
|
+
and in every step config field its block declares as a schema reference -- so there is no row
|
|
13
|
+
to hang a foreign key on. The pipelines naming a code are read from each stored pipeline's
|
|
14
|
+
current version and ride on every response as ``used_by``. Removing a schema that has any is
|
|
15
|
+
refused; changing one is not, and the answer carries them so the caller decides with them in
|
|
16
|
+
view.
|
|
10
17
|
"""
|
|
11
18
|
|
|
19
|
+
from collections.abc import Sequence
|
|
20
|
+
|
|
12
21
|
import sqlalchemy as sa
|
|
13
22
|
from fastapi import APIRouter, Response, status
|
|
14
23
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
15
24
|
|
|
16
25
|
from dirigent_client.schemas import Page, SchemaIn, SchemaOut, SchemaUpdate
|
|
17
26
|
from dirigent_core.models import Schema
|
|
18
|
-
from dirigent_core.schemas import check_valid_schema, resolve_identity
|
|
19
|
-
from dirigent_server.dependencies import SessionDep
|
|
27
|
+
from dirigent_core.schemas import SchemaInUse, check_valid_schema, resolve_identity, schema_users
|
|
28
|
+
from dirigent_server.dependencies import ServicesDep, SessionDep
|
|
20
29
|
from dirigent_server.errors import Refusal
|
|
21
30
|
from dirigent_server.messages import NO_SCHEMA, SCHEMA_EXISTS
|
|
22
31
|
from dirigent_server.pagination import DEFAULT_PAGE, AfterParam, LimitParam, clip
|
|
@@ -26,8 +35,8 @@ from dirigent_server.transactions import Transactional
|
|
|
26
35
|
router = APIRouter(route_class=Transactional, tags=["schemas"])
|
|
27
36
|
|
|
28
37
|
|
|
29
|
-
def render(row: Schema) -> SchemaOut:
|
|
30
|
-
"""Render a stored schema for a response."""
|
|
38
|
+
def render(row: Schema, used_by: Sequence[str] = ()) -> SchemaOut:
|
|
39
|
+
"""Render a stored schema for a response, with the pipelines that name it."""
|
|
31
40
|
return SchemaOut(
|
|
32
41
|
id=row.id,
|
|
33
42
|
code=row.code,
|
|
@@ -36,6 +45,7 @@ def render(row: Schema) -> SchemaOut:
|
|
|
36
45
|
body=row.body,
|
|
37
46
|
created_at=row.created_at,
|
|
38
47
|
updated_at=row.updated_at,
|
|
48
|
+
used_by=list(used_by),
|
|
39
49
|
)
|
|
40
50
|
|
|
41
51
|
|
|
@@ -50,16 +60,18 @@ async def find(session: AsyncSession, code: str) -> Schema:
|
|
|
50
60
|
@router.get("/schemas", operation_id="listSchemas", summary="List schemas", response_model=Page[SchemaOut])
|
|
51
61
|
async def list_schemas(
|
|
52
62
|
session: SessionDep,
|
|
63
|
+
services: ServicesDep,
|
|
53
64
|
principal: PrincipalDep,
|
|
54
65
|
after: AfterParam = None,
|
|
55
66
|
limit: LimitParam = DEFAULT_PAGE,
|
|
56
67
|
) -> Page[SchemaOut]:
|
|
57
|
-
"""List every schema the instance holds."""
|
|
68
|
+
"""List every schema the instance holds, each with the pipelines that name it."""
|
|
58
69
|
statement = sa.select(Schema).order_by(Schema.code).limit(limit + 1)
|
|
59
70
|
if after is not None:
|
|
60
71
|
statement = statement.where(Schema.code > after)
|
|
61
72
|
rows = await session.execute(statement)
|
|
62
|
-
|
|
73
|
+
users = await schema_users(session, services.host.catalog())
|
|
74
|
+
found = [render(row, users.get(row.code, ())) for row in rows.scalars()]
|
|
63
75
|
items, following = clip(found, limit, lambda row: row.code)
|
|
64
76
|
return Page(items=items, next=following)
|
|
65
77
|
|
|
@@ -71,7 +83,9 @@ async def list_schemas(
|
|
|
71
83
|
response_model=SchemaOut,
|
|
72
84
|
status_code=status.HTTP_201_CREATED,
|
|
73
85
|
)
|
|
74
|
-
async def create_schema(
|
|
86
|
+
async def create_schema(
|
|
87
|
+
payload: SchemaIn, session: SessionDep, services: ServicesDep, principal: AdminDep
|
|
88
|
+
) -> SchemaOut:
|
|
75
89
|
"""Store a JSON Schema, taking its identity from its own keywords when the write gives none."""
|
|
76
90
|
check_valid_schema(payload.body)
|
|
77
91
|
code, name, description = resolve_identity(
|
|
@@ -83,21 +97,32 @@ async def create_schema(payload: SchemaIn, session: SessionDep, principal: Admin
|
|
|
83
97
|
row = Schema(code=code, name=name, description=description, body=payload.body)
|
|
84
98
|
session.add(row)
|
|
85
99
|
await session.flush()
|
|
86
|
-
|
|
100
|
+
users = await schema_users(session, services.host.catalog())
|
|
101
|
+
return render(row, users.get(row.code, ()))
|
|
87
102
|
|
|
88
103
|
|
|
89
104
|
@router.get("/schemas/{code}", operation_id="getSchema", summary="Read a schema", response_model=SchemaOut)
|
|
90
|
-
async def get_schema(code: str, session: SessionDep, principal: PrincipalDep) -> SchemaOut:
|
|
91
|
-
"""Read one schema by its code."""
|
|
92
|
-
|
|
105
|
+
async def get_schema(code: str, session: SessionDep, services: ServicesDep, principal: PrincipalDep) -> SchemaOut:
|
|
106
|
+
"""Read one schema by its code, with the pipelines that name it."""
|
|
107
|
+
row = await find(session, code)
|
|
108
|
+
users = await schema_users(session, services.host.catalog())
|
|
109
|
+
return render(row, users.get(code, ()))
|
|
93
110
|
|
|
94
111
|
|
|
95
112
|
@router.patch("/schemas/{code}", operation_id="updateSchema", summary="Update a schema", response_model=SchemaOut)
|
|
96
|
-
async def update_schema(
|
|
113
|
+
async def update_schema(
|
|
114
|
+
code: str, payload: SchemaUpdate, session: SessionDep, services: ServicesDep, principal: AdminDep
|
|
115
|
+
) -> SchemaOut:
|
|
97
116
|
"""Replace a schema's body or its labels; the code is fixed once minted.
|
|
98
117
|
|
|
99
118
|
A field left out is left alone; a name or description sent as null is cleared. A body
|
|
100
119
|
sent replaces the stored schema and is checked the same way a create's is.
|
|
120
|
+
|
|
121
|
+
An edit is never refused for being depended on. Correcting a shape every pipeline should
|
|
122
|
+
now validate against is what editing a stored schema is for, the code cannot be changed,
|
|
123
|
+
and whether a new body still admits what a dependent pipeline sends is not a question a
|
|
124
|
+
schema can be asked. So the answer carries the pipelines that name it and the caller
|
|
125
|
+
decides; what is refused is removing the shape from under them, not changing it.
|
|
101
126
|
"""
|
|
102
127
|
row = await find(session, code)
|
|
103
128
|
if payload.changing("name"):
|
|
@@ -108,7 +133,8 @@ async def update_schema(code: str, payload: SchemaUpdate, session: SessionDep, p
|
|
|
108
133
|
check_valid_schema(payload.body)
|
|
109
134
|
row.body = payload.body
|
|
110
135
|
await session.flush()
|
|
111
|
-
|
|
136
|
+
users = await schema_users(session, services.host.catalog())
|
|
137
|
+
return render(row, users.get(code, ()))
|
|
112
138
|
|
|
113
139
|
|
|
114
140
|
@router.delete(
|
|
@@ -117,7 +143,18 @@ async def update_schema(code: str, payload: SchemaUpdate, session: SessionDep, p
|
|
|
117
143
|
summary="Delete a schema",
|
|
118
144
|
status_code=status.HTTP_204_NO_CONTENT,
|
|
119
145
|
)
|
|
120
|
-
async def delete_schema(code: str, session: SessionDep, principal: AdminDep) -> Response:
|
|
121
|
-
"""Remove a schema.
|
|
122
|
-
|
|
146
|
+
async def delete_schema(code: str, session: SessionDep, services: ServicesDep, principal: AdminDep) -> Response:
|
|
147
|
+
"""Remove a schema, refusing one a stored pipeline still names.
|
|
148
|
+
|
|
149
|
+
Applying a document that names a schema the instance does not hold is already refused, so
|
|
150
|
+
a delete that went through here would leave behind exactly the state no apply is allowed
|
|
151
|
+
to create -- and the next apply of an untouched pipeline, or the next attempt of a run in
|
|
152
|
+
flight, would be what discovered it. No foreign key can say so: a schema is named from
|
|
153
|
+
inside a document's JSON, not by a row.
|
|
154
|
+
"""
|
|
155
|
+
row = await find(session, code)
|
|
156
|
+
named = (await schema_users(session, services.host.catalog())).get(code, [])
|
|
157
|
+
if named:
|
|
158
|
+
raise SchemaInUse(code, named)
|
|
159
|
+
await session.delete(row)
|
|
123
160
|
return Response(status_code=status.HTTP_204_NO_CONTENT)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./labels-Dp8H1wzG.js";import{n as t}from"./PageState-CuZbHz6s.js";import{r as n}from"./utils-CT7ZGLfR.js";import{t as r}from"./use-store-CZcp6jmY.js";import{n as i,t as a}from"./auth-QgZsjd0d.js";var o=n(),s={status:403,title:e.refusal.admin_only,code:`server.forbidden`,params:{},detail:e.refusal.shut,problems:[],instance:null};function c({children:e}){let n=r(a);return i(n)?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)(t,{loading:!1,problem:s,empty:!1,children:null})}export{c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t}from"./store-D-5yFBN1.js";import{a as n,n as r,t as i}from"./labels-Dp8H1wzG.js";import{n as a}from"./chunk-OB3PAWPO-m4Sckj1b.js";import{i as o,r as s}from"./api-B9HrzKUX.js";import{N as c}from"./dropdown-menu-BHh5eZwx.js";import{r as l}from"./glyphs-CaFpiNjJ.js";import{l as u,n as d,t as f,u as p}from"./PageState-CuZbHz6s.js";import{i as m,t as h}from"./ListTable-A_dkU0ci.js";import{t as g}from"./WindowedPane-B5QHXRJT.js";import{r as _,t as v}from"./utils-CT7ZGLfR.js";import{i as y,n as b,t as x}from"./tooltip-Bas36yZU.js";import{d as S,h as C}from"./paging-C4feZMNQ.js";import{t as w}from"./input-sbz1EN8t.js";import{a as ee,o as T,r as te}from"./panels-D1Fnei43.js";import{l as E}from"./format-D2kQLRJs.js";import{t as D}from"./identity-BNZxCf_y.js";import{r as O,t as k,u as A}from"./pipelines-Da2DZJX0.js";import{A as j,At as ne,E as M,Ft as re,It as N,Lt as P,Mt as ie,Nt as F,Pt as ae,S as oe,b as I,ct as L,ft as R,gt as z,it as se,jt as ce,rt as le,v as ue,x as B}from"./index-DcrUT8O1.js";import{t as de}from"./Description-C-byz7P3.js";import{c as fe,f as pe,n as me,o as he}from"./connections-ENTr1Nsd.js";import{n as V,t as H}from"./Refusal-3GHMZOnu.js";import{t as U}from"./Instant-CihfxyJ1.js";import{t as W}from"./Segmented-KaDiGiyr.js";import{t as G}from"./Mark-DQR2php6.js";import{t as ge}from"./ProgramReference-BEfxZwxT.js";import{t as _e}from"./Picker-BUMFpPCz.js";import{t as ve}from"./AdminOnly-CdJ1ded0.js";var ye={name:`bell-plus`,size:24,node:[[`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`}]]};ye.node;var be=n(ye),xe={name:`send`,size:24,node:[[`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`}]]};xe.node;var Se=n(xe),K=e(t(),1),Ce=[`run_failed`,`run_completed_with_errors`,`run_succeeded`,`run_stuck`],we=[`pending`,`sending`,`sent`,`failed`],Te=`0s`;function Ee(e){return e===Te?i.word.none:e}function De(e){return e.scope===`pipeline`&&e.pipeline!==null?e.pipeline:i.alerting.every_pipeline}function Oe(e){return e===null?null:i.alerting.importance_floor(e)}function ke(e){return e.active&&!e.paused}function Ae(e){return e===`sent`||e===`failed`}function je(e,t=50){let n=new URLSearchParams({limit:String(t)});return e!==null&&n.set(`after`,e),`/alert-rules?${n.toString()}`}function Me(e){return s(je(e))}function Ne(e){return o(`/alert-rules`,`POST`,e)}function Pe(e,t){return o(`/alert-rules/${encodeURIComponent(e)}`,`PATCH`,t)}function Fe(e,t){return Pe(e,{paused:t})}function Ie(e){return s(`/alert-rules/${encodeURIComponent(e)}`,{method:`DELETE`})}var Le={status:``,notifier:``};function Re(e){return e.status!==``||e.notifier!==``}function ze(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 Be(e,t){return s(ze(e,t))}function Ve(e){return s(`/notifications/${encodeURIComponent(e)}`)}function He(e){return o(`/notifications/${encodeURIComponent(e)}/$retry`,`POST`,{})}function Ue(e){return o(`/alert-rules/$test`,`POST`,e)}async function We(){return(await s(`/blocks`)).notifiers.map(e=>e.id)}function Ge(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 Ye(n)}function Ke(e){return e.connection??e.notifier}function qe(e){return e.connection===null?e.notifier===`log`?null:fe(e.notifier):me(e.connection)}function q(e){if(e.notifier===`log`)return{tone:`good`,label:i.alerting.channel.ready,detail:null};if(!e.reachable)return{tone:`quiet`,label:i.alerting.channel.not_set_up,detail:null};let t=he(e);return{tone:t.tone??`quiet`,label:t.label,detail:t.detail}}var Je={good:0,critical:1,quiet:2};function Ye(e){return e.toSorted((e,t)=>{let n=Je[q(e).tone]-Je[q(t).tone];if(n!==0)return n;let r=e.notifier.localeCompare(t.notifier);return r===0?(e.connection??``).localeCompare(t.connection??``):r})}var Xe=/^[a-z0-9]+(?:[-_][a-z0-9]+)*$/u,Ze=/^(?:\d+(?:ms|s|m|h|d|w))+$/u,Qe=i.alerting.subject_references,$e=i.alerting.subject_hint(Qe),et=i.alerting.body_hint,J=`text/x-jinja`;function Y(e){let t=e.trim();return t===``?null:t}var tt=[{value:`global`,label:i.alerting.scope.global},{value:`pipeline`,label:i.alerting.scope.pipeline}],nt=[{value:``,label:i.alerting.importance_any},...k.map(e=>({value:e,label:e[0].toUpperCase()+e.slice(1)}))];function rt(e){return e===``?null:e}function it(e){return e===``?null:e}var at=i.alerting.log_target;function ot(e,t){let n=t.filter(t=>t.kind!==`log`&&e.includes(t.kind)).map(e=>({row:e,heading:D(e)})).toSorted((e,t)=>e.row.kind.localeCompare(t.row.kind)||e.heading.title.localeCompare(t.heading.title));return[{value:``,label:at,aside:``,mark:l(`log`)},...n.map(({row:e,heading:t})=>({value:e.code,label:`${t.title} · ${e.kind}`,aside:t.code??``,mark:l(e.kind)}))]}function st(e){if(e.code.trim()===``)return i.alerting.unready.code_missing;if(!Xe.test(e.code.trim()))return i.alerting.unready.code_shape;if(e.scope===`pipeline`&&e.pipeline===``)return i.alerting.unready.pipeline_missing;if(!Ze.test(e.throttle.trim()))return i.alerting.unready.throttle_shape}var X=_();function ct({rule:e,onChanged:t,onDeleted:n,onTest:r}){let[a,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(null),l=s===e.code,d=B(),f=Oe(e.importance),p=(0,K.useCallback)(e=>Be(Le,e),[]),{state:m}=I(p,dt),h=m.rows.filter(t=>t.rule===e.code);return(0,X.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,X.jsxs)(gt,{thing:e,children:[e.paused&&(0,X.jsx)(ht,{children:i.state.armed.paused}),!e.active&&(0,X.jsx)(ht,{children:i.state.armed.off})]}),(0,X.jsx)(de,{text:e.description}),(0,X.jsxs)(`dl`,{className:`space-y-1.5`,children:[(0,X.jsx)(Z,{label:i.word.event,children:i.alerting.event[e.event]}),(0,X.jsx)(Z,{label:i.word.scope,children:(0,X.jsxs)(`span`,{className:`flex flex-wrap items-baseline gap-x-1.5`,children:[De(e),f!==null&&(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:f})]})}),(0,X.jsx)(Z,{label:i.word.delivers_through,children:(0,X.jsx)(ft,{notifier:e.notifier,connection:e.connection})}),(0,X.jsx)(Z,{label:i.word.throttle,children:Ee(e.throttle)}),l?(0,X.jsx)(lt,{rule:e,onDone:()=>{c(null)},onSaved:e=>{t(e),c(null)}},e.code):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Z,{label:i.word.subject,children:(0,X.jsxs)(`span`,{className:`flex flex-wrap items-baseline gap-2`,children:[e.template===null?(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:i.word.none}):(0,X.jsx)(`span`,{className:`font-mono text-xs break-all`,children:e.template}),(0,X.jsx)(u,{why:d.why,children:(0,X.jsx)(C,{variant:`ghost`,size:`xs`,disabled:!d.may,title:d.why,onClick:()=>{c(e.code)},children:i.action.edit})})]})}),e.body!==null&&(0,X.jsx)(Z,{label:i.word.body,children:(0,X.jsx)(`span`,{className:`line-clamp-3 font-mono text-xs break-words whitespace-pre-wrap`,children:e.body})})]}),(0,X.jsx)(Z,{label:i.alerting.last_sent,children:e.last_sent_at===null?(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:i.word.never}):(0,X.jsx)(U,{at:e.last_sent_at})})]}),(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,X.jsx)(u,{why:d.why,children:(0,X.jsx)(C,{variant:`outline`,size:`sm`,disabled:a||!d.may,title:d.why,onClick:()=>{o(!0),Fe(e.code,!e.paused).then(t,V).finally(()=>{o(!1)})},children:e.paused?i.action.resume:i.action.pause})}),(0,X.jsx)(u,{why:d.why,children:(0,X.jsx)(C,{variant:`outline`,size:`sm`,disabled:!d.may,title:d.why,onClick:r,children:i.action.send_test})}),(0,X.jsx)(u,{why:d.why,children:(0,X.jsx)(C,{variant:`outline`,size:`sm`,className:`destructive-action ml-auto`,disabled:a||!d.may,title:d.why,onClick:()=>{o(!0),Ie(e.code).then(n,V).finally(()=>{o(!1)})},children:i.action.delete.verb})})]}),(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i.alerting.recent_deliveries}),!m.read&&(0,X.jsx)(`p`,{className:`text-xs text-faint`,children:i.shell.reading}),m.read&&h.length===0&&(0,X.jsx)(`p`,{className:`text-xs text-faint`,children:i.alerting.deliveries_empty}),(0,X.jsx)(`ul`,{className:`divide-y divide-border`,children:h.map(e=>(0,X.jsxs)(`li`,{className:`row-hover -mx-4 flex items-center gap-2 px-4 py-2`,children:[(0,X.jsx)(M,{status:e.status}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs`,children:e.subject}),(0,X.jsx)(U,{className:`shrink-0 text-xs text-faint`,at:e.created_at})]},e.id))})]})]})}function lt({rule:e,onDone:t,onSaved:n}){let[r,a]=(0,K.useState)(e.template??``),[o,s]=(0,K.useState)(e.body??``),[c,l]=(0,K.useState)(null),[u,d]=(0,K.useState)(!1),f=`alert-rule/${e.code}/body`,p=`rule-${e.code}-subject`;return(0,X.jsxs)(`div`,{className:`space-y-3 rounded-lg border border-border bg-secondary/30 p-3`,children:[(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(j,{htmlFor:p,children:i.word.subject}),(0,X.jsx)(w,{id:p,className:`font-mono`,spellCheck:!1,autoComplete:`off`,value:r,placeholder:i.alerting.subject_placeholder,onChange:e=>{a(e.target.value)}}),(0,X.jsx)(`p`,{className:`text-xs text-faint`,children:$e})]}),(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(j,{children:i.word.body}),(0,X.jsx)(`p`,{className:`text-xs text-faint`,children:et}),(0,X.jsx)(g,{name:i.alerting.body_pane,className:`overflow-hidden rounded-md border border-border bg-background`,aside:(0,X.jsx)(ge,{mediaType:J}),windowed:(0,X.jsx)(L,{value:o,mediaType:J,path:f,label:i.alerting.body_pane_windowed(i.alerting.body_pane),className:`min-h-0 flex-1`,onChange:s}),children:(0,X.jsx)(L,{value:o,mediaType:J,path:f,label:i.alerting.body_pane,placeholder:i.alerting.body_placeholder,className:`h-40 min-h-32`,onChange:s})})]}),c!==null&&(0,X.jsx)(H,{problem:c}),(0,X.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,X.jsx)(C,{variant:`ghost`,size:`sm`,onClick:t,children:i.action.cancel}),(0,X.jsx)(C,{size:`sm`,disabled:u,onClick:()=>{let i={};if(Y(r)!==e.template&&(i.template=Y(r)),Y(o)!==e.body&&(i.body=Y(o)),Object.keys(i).length===0){t();return}d(!0),l(null),Pe(e.code,i).then(n,e=>{l(S(e))}).finally(()=>{d(!1)})},children:u?i.action.save.busy:i.action.save.verb})]})]})}function ut({notification:e,onChanged:t}){let[n,r]=(0,K.useState)(!1),o=B();return(0,X.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,X.jsx)(`div`,{className:`space-y-1`,children:(0,X.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2`,children:[(0,X.jsx)(M,{status:e.status}),(0,X.jsx)(`span`,{className:`text-sm font-semibold`,children:e.subject})]})}),(0,X.jsxs)(`dl`,{className:`space-y-1.5`,children:[e.rule===null?(0,X.jsx)(Z,{label:i.alerting.raised_by,children:(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:i.alerting.raised_by_test})}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Z,{label:i.word.event,children:i.alerting.event[e.event]}),(0,X.jsx)(Z,{label:i.word.rule.label,children:(0,X.jsx)(`span`,{className:`font-mono text-xs`,children:e.rule})})]}),(0,X.jsx)(Z,{label:i.word.delivers_through,children:(0,X.jsx)(pt,{notifier:e.notifier,connection:e.connection})}),(0,X.jsx)(Z,{label:i.word.run.label,children:(0,X.jsx)(mt,{notification:e})}),(0,X.jsx)(Z,{label:i.alerting.queued_at,children:(0,X.jsx)(U,{at:e.created_at})}),e.status===`sent`?(0,X.jsx)(Z,{label:i.alerting.sent_at,children:(0,X.jsx)(U,{at:e.sent_at})}):(0,X.jsx)(Z,{label:i.alerting.next_try,children:(0,X.jsx)(U,{at:e.available_at})}),(0,X.jsx)(Z,{label:i.word.attempt.heading,children:i.alerting.attempts_of.bare(e.attempt,e.max_attempts)})]}),e.error!==null&&(0,X.jsxs)(`div`,{className:`space-y-1`,children:[(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i.alerting.channel_said}),(0,X.jsx)(`p`,{className:`text-xs break-words text-critical`,children:e.error}),(0,X.jsx)(`p`,{className:`text-xs text-faint`,children:i.alerting.latest_refusal_only})]}),(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,X.jsx)(u,{why:o.why,children:(0,X.jsx)(C,{variant:`outline`,size:`sm`,disabled:n||!o.may,title:o.why,onClick:()=>{r(!0),He(e.id).then(t,V).finally(()=>{r(!1)})},children:i.action.retry_now})}),e.run_id!==null&&(0,X.jsx)(C,{variant:`outline`,size:`sm`,render:(0,X.jsx)(a,{to:`/runs/${e.run_id}`}),children:i.alerting.open_run})]})]})}var dt=e=>e.id;function ft({notifier:e,connection:t}){return(0,X.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,X.jsx)(G,{glyph:l(e)}),(0,X.jsx)(`span`,{className:t===null?`text-sm`:`font-mono text-xs`,children:t??e})]})}function pt({notifier:e,connection:t}){return(0,X.jsxs)(`span`,{className:`flex flex-wrap items-baseline gap-1.5`,children:[(0,X.jsx)(`span`,{className:`text-sm`,children:e}),t!==null&&(0,X.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:t})]})}function mt({notification:e}){if(e.run_id===null)return(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:i.alerting.no_run});let t=e.run_pipeline??i.alerting.a_run;return(0,X.jsxs)(a,{className:`text-primary-ink hover:underline`,to:`/runs/${e.run_id}`,children:[(0,X.jsx)(`span`,{className:`text-sm`,children:t}),e.run_started_at!==null&&(0,X.jsx)(U,{className:`ml-1.5 text-xs text-muted-foreground`,at:e.run_started_at})]})}function ht({children:e}){return(0,X.jsx)(`span`,{className:`rounded-sm border border-border px-1.5 text-xs text-muted-foreground`,children:e})}function gt({thing:e,children:t}){let n=D(e);return(0,X.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2`,children:[(0,X.jsx)(`span`,{className:n.named?`text-sm font-semibold`:`font-mono text-sm font-semibold`,children:n.title}),t,n.code!==null&&(0,X.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:n.code})]})}function Z({label:e,children:t}){return(0,X.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2`,children:[(0,X.jsx)(`dt`,{className:`w-32 shrink-0 text-xs text-muted-foreground`,children:e}),(0,X.jsx)(`dd`,{className:`min-w-0 text-sm`,children:t})]})}var _t={good:`var(--good)`,critical:`var(--critical)`,quiet:`var(--faint)`},vt=`flex min-h-9 items-center gap-2 rounded-full border border-border bg-card py-1 pr-3 pl-2.5 transition-colors`,Q=`hover:bg-muted focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`;function yt({channels:e,read:t}){let n=p(),r=bt(e.length,t);return n?(0,X.jsx)(Ct,{channels:e,note:r}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold`,children:i.alerting.channels_heading}),r===null?(0,X.jsx)(`ul`,{className:`flex flex-wrap gap-2`,children:e.map(e=>(0,X.jsx)(`li`,{className:`flex`,children:(0,X.jsx)(xt,{channel:e})},e.id))}):(0,X.jsx)(`p`,{className:r.tone,children:r.text})]})}function bt(e,t){return t?e===0?{text:i.alerting.channels_none,tone:`text-sm text-muted-foreground`}:null:{text:i.shell.reading,tone:`text-sm text-faint`}}function xt({channel:e}){let t=q(e),n=qe(e),r=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(G,{glyph:l(e.notifier)}),(0,X.jsx)(`span`,{className:`truncate font-mono text-xs font-semibold`,children:Ke(e)}),(0,X.jsx)(Tt,{tone:t.tone})]}),i=n===null?(0,X.jsx)(`button`,{type:`button`,className:v(vt,Q),children:r}):(0,X.jsx)(a,{to:n,className:v(vt,Q),children:r});return(0,X.jsxs)(x,{children:[(0,X.jsx)(y,{render:i}),(0,X.jsx)(b,{className:`flex-col items-start gap-1`,side:`bottom`,children:(0,X.jsx)(St,{channel:e,view:t})})]})}function St({channel:e,view:t}){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`span`,{className:`font-medium`,children:[e.notifier,` · `,t.label,e.last_check_at!==null&&(0,X.jsxs)(`span`,{className:`font-normal opacity-70`,children:[` `,E(e.last_check_at)]})]}),e.connection!==null&&(0,X.jsx)(`span`,{className:`font-mono`,children:e.connection}),t.detail!==null&&(0,X.jsx)(`span`,{className:`opacity-70`,children:t.detail})]})}function Ct({channels:e,note:t}){let[n,r]=(0,K.useState)(!1);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`button`,{type:`button`,"aria-expanded":n,onClick:()=>{r(!n)},className:v(`flex min-h-finger w-full items-center gap-2.5 border-b border-border px-1 text-left`,Q),children:[(0,X.jsx)(c,{className:v(`size-4 shrink-0 text-muted-foreground`,n&&`rotate-90`),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`text-sm font-semibold`,children:i.alerting.channels_heading}),(0,X.jsx)(`span`,{className:`ml-auto flex items-center gap-1.5`,"aria-hidden":!0,children:e.map(e=>(0,X.jsx)(Tt,{tone:q(e).tone},e.id))})]}),n&&(t===null?(0,X.jsx)(`table`,{className:`w-full text-sm`,children:(0,X.jsx)(`tbody`,{children:e.map(e=>(0,X.jsx)(wt,{channel:e},e.id))})}):(0,X.jsx)(`p`,{className:t.tone,children:t.text}))]})}function wt({channel:e}){let t=q(e),n=qe(e),r=(0,X.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,X.jsx)(G,{glyph:l(e.notifier)}),(0,X.jsx)(`span`,{className:`truncate font-mono text-xs font-semibold`,children:Ke(e)})]});return(0,X.jsxs)(`tr`,{className:`border-b border-border last:border-b-0`,children:[(0,X.jsx)(`td`,{className:`w-0 py-2 pr-2 align-middle`,children:(0,X.jsx)(Tt,{tone:t.tone})}),(0,X.jsx)(`td`,{className:`min-w-0 py-2 align-middle`,children:e.connection===null||n===null?r:(0,X.jsx)(a,{to:n,className:v(`control-link flex items-center rounded-md px-1`,Q),children:r})}),(0,X.jsx)(`td`,{className:`w-0 py-2 pl-2 text-right align-middle whitespace-nowrap`,children:t.label===i.alerting.channel.not_set_up&&n!==null?(0,X.jsx)(a,{to:n,className:v(`control-link inline-flex items-center rounded-md text-xs text-primary-ink`,Q),children:i.alerting.set_up_channel(e.notifier)}):e.last_check_at!==null&&(0,X.jsx)(`span`,{className:`text-xs text-faint`,children:E(e.last_check_at)})})]})}function Tt({tone:e}){return(0,X.jsx)(`span`,{className:`status-dot`,style:{"--chip":_t[e]}})}function $({id:e,label:t,value:n,onChange:r,placeholder:i,mono:a,hint:o}){return(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(j,{htmlFor:e,children:t}),(0,X.jsx)(w,{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,X.jsx)(`p`,{className:`text-xs text-faint`,children:o})]})}function Et({id:e,options:t,value:n,onChange:r}){return(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(j,{htmlFor:e,children:i.word.delivers_through}),(0,X.jsx)(_e,{id:e,label:i.word.delivers_through,value:n,options:t,placeholder:i.alerting.target_search,onChange:r})]})}var Dt=`0s`,Ot=`alert-rule/new/body`,kt=i.alerting.body_pane;function At({open:e,onOpenChange:t,notifiers:n,connections:r,onCreated:a}){let[o,s]=(0,K.useState)(``),[c,l]=(0,K.useState)(``),[d,f]=(0,K.useState)(``),[p,m]=(0,K.useState)(`run_failed`),[h,_]=(0,K.useState)(`global`),[v,y]=(0,K.useState)(``),[b,x]=(0,K.useState)(``),[w,ee]=(0,K.useState)(``),[T,te]=(0,K.useState)(``),[E,D]=(0,K.useState)(``),[O,k]=(0,K.useState)(Dt),[A,M]=(0,K.useState)(null),[P,F]=(0,K.useState)(!1),I=jt(e),R=B(),z=oe(R.why,st({code:o,scope:h,pipeline:v,throttle:O}));return(0,X.jsx)(ne,{open:e,onOpenChange:t,children:(0,X.jsxs)(ie,{className:`flex max-h-[calc(100vh-4rem)] flex-col sm:max-w-3xl`,showCloseButton:!1,children:[(0,X.jsx)(re,{children:(0,X.jsx)(N,{children:i.alerting.new_rule.button})}),(0,X.jsxs)(`div`,{className:`-mx-1 min-h-0 flex-1 space-y-4 overflow-y-auto px-1`,children:[(0,X.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,X.jsx)($,{id:`rule-code`,label:i.word.code,value:o,onChange:s,placeholder:i.alerting.code_placeholder,mono:!0}),(0,X.jsx)($,{id:`rule-name`,label:i.word.name.label,value:c,onChange:l,placeholder:i.alerting.name_placeholder})]}),(0,X.jsx)($,{id:`rule-description`,label:i.word.description,value:d,onChange:f,placeholder:i.alerting.description_placeholder}),(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(j,{children:i.word.event}),(0,X.jsx)(W,{label:i.word.event,size:`md`,value:p,options:Ce.map(e=>({value:e,label:i.alerting.event[e]})),onChoose:m})]}),(0,X.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(j,{children:i.word.scope}),(0,X.jsx)(W,{label:i.word.scope,size:`md`,value:h,options:tt,onChoose:_})]}),h===`pipeline`&&(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(j,{htmlFor:`rule-pipeline`,children:i.word.pipeline.label}),(0,X.jsx)(_e,{id:`rule-pipeline`,label:i.word.pipeline.label,value:v,options:I,placeholder:i.alerting.pipeline_search,onChange:y})]})]}),(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(j,{children:i.word.importance}),(0,X.jsx)(`p`,{className:`text-xs text-faint`,children:i.alerting.importance_hint}),(0,X.jsx)(W,{label:i.word.importance,size:`md`,value:b,options:nt,onChoose:x})]}),(0,X.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:(0,X.jsx)(Et,{id:`rule-connection`,options:ot(n,r),value:w,onChange:ee})}),(0,X.jsx)($,{id:`rule-subject`,label:i.word.subject,value:T,onChange:te,placeholder:i.alerting.subject_placeholder,mono:!0,hint:$e}),(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(j,{children:i.word.body}),(0,X.jsx)(`p`,{className:`text-xs text-faint`,children:et}),(0,X.jsx)(g,{name:kt,className:`overflow-hidden rounded-md border border-border bg-background`,aside:(0,X.jsx)(ge,{mediaType:J}),windowed:(0,X.jsx)(L,{value:E,mediaType:J,path:Ot,label:i.alerting.body_pane_windowed(kt),className:`min-h-0 flex-1`,onChange:D}),children:(0,X.jsx)(L,{value:E,mediaType:J,path:Ot,label:kt,placeholder:i.alerting.body_placeholder,className:`h-40 min-h-32`,onChange:D})})]}),(0,X.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:(0,X.jsx)($,{id:`rule-throttle`,label:i.word.throttle,value:O,onChange:k,placeholder:i.alerting.throttle_placeholder,mono:!0})})]}),A!==null&&(0,X.jsx)(H,{problem:A}),(0,X.jsxs)(ae,{children:[(0,X.jsx)(`p`,{className:`mr-auto self-center text-xs text-muted-foreground`,children:i.alerting.declare_only}),(0,X.jsx)(ce,{render:(0,X.jsx)(C,{variant:`ghost`}),children:i.action.close}),(0,X.jsx)(u,{why:z,children:(0,X.jsx)(C,{disabled:P||z!==void 0,title:z,onClick:()=>{F(!0),M(null),Ne({code:o.trim(),name:Y(c),description:Y(d),event:p,scope:h,pipeline:h===`pipeline`?v:null,importance:rt(b),connection:it(w),template:Y(T),body:Y(E),throttle:O.trim()}).then(()=>{a(),s(``),l(``),f(``),te(``),D(``),t(!1)},e=>{M(S(e))}).finally(()=>{F(!1)})},children:P?i.action.create.busy:i.action.create.verb})})]})]})})}function jt(e){let[t,n]=(0,K.useState)([]);return(0,K.useEffect)(()=>{if(!e)return;let t=!0;return A().then(e=>{t&&n(e.toSorted(O).map(e=>{let t=D(e);return{value:e.code,label:t.title,aside:t.code??``}}))},()=>{t&&n([])}),()=>{t=!1}},[e]),t}var Mt=1e3,Nt=6e4,Pt={connection:``,subject:``};function Ft({open:e,draft:t,onOpenChange:n,notifiers:r,connections:a,onQueued:o,onOpenQueue:s}){let[c,l]=(0,K.useState)(t.connection),[d,f]=(0,K.useState)(t.subject),[p,m]=(0,K.useState)(null),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(!1),y=Lt(p),b=B(),x=y!==null&&Ae(y.status)?y.id:null;(0,K.useEffect)(()=>{x!==null&&o()},[x]);let w=b.why;return(0,X.jsx)(ne,{open:e,onOpenChange:n,children:(0,X.jsxs)(ie,{className:`sm:max-w-lg`,showCloseButton:!1,children:[(0,X.jsxs)(re,{children:[(0,X.jsx)(N,{children:i.action.send_test}),(0,X.jsx)(F,{children:i.alerting.test_explained})]}),(0,X.jsx)(Et,{id:`test-connection`,options:ot(r,a),value:c,onChange:l}),(0,X.jsx)($,{id:`test-subject`,label:i.word.subject,value:d,onChange:f,placeholder:i.alerting.test_subject}),h!==null&&(0,X.jsx)(H,{problem:h}),y!==null&&(0,X.jsx)(It,{row:y}),(0,X.jsxs)(ae,{children:[(0,X.jsx)(ce,{render:(0,X.jsx)(C,{variant:`ghost`}),children:i.action.close}),p!==null&&(0,X.jsx)(C,{variant:`outline`,onClick:()=>{s(p)},children:i.alerting.open_in_queue}),(0,X.jsx)(u,{why:w,children:(0,X.jsx)(C,{disabled:_||w!==void 0,title:w,onClick:()=>{v(!0),g(null),m(null),Ue({connection:it(c),subject:d.trim()===``?i.alerting.test_subject:d.trim()}).then(e=>{m(e.notification_id),o()},e=>{g(S(e))}).finally(()=>{v(!1)})},children:p===null?i.alerting.send:i.alerting.send_again})})]})]})})}function It({row:e}){return(0,X.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,X.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2`,children:[(0,X.jsx)(M,{status:e.status}),(0,X.jsx)(`span`,{className:`text-sm`,children:e.subject})]}),(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.status===`sent`?(0,X.jsxs)(X.Fragment,{children:[i.alerting.delivered,` `,(0,X.jsx)(U,{at:e.sent_at}),`.`]}):e.status===`failed`?r(e.max_attempts,i.alerting.delivery_stopped)(e.attempt,e.max_attempts):e.attempt===0?i.alerting.queued_for_worker:(0,X.jsxs)(X.Fragment,{children:[i.alerting.attempt_of(e.attempt,e.max_attempts),` `,(0,X.jsx)(U,{at:e.available_at}),`.`]})}),e.error!==null&&(0,X.jsx)(`p`,{className:`text-xs break-words text-critical`,children:e.error})]})}function Lt(e){let[t,n]=(0,K.useState)(null);return(0,K.useEffect)(()=>{if(e===null)return;let t=!0,r,i=Date.now()+Nt,a=()=>{Ve(e).then(o=>{t&&(n({id:e,row:o}),!(Ae(o.status)||Date.now()>i)&&(r=setTimeout(a,Mt)))},()=>{})};return a(),()=>{t=!1,r!==void 0&&clearTimeout(r)}},[e]),t!==null&&t.id===e?t.row:null}var Rt=e=>e.id,zt=e=>e.id;function Bt(){return(0,X.jsx)(ve,{children:(0,X.jsx)(Vt,{})})}function Vt(){let[e,t]=(0,K.useState)(!1),[n,r]=(0,K.useState)(null),[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)({status:``,notifier:``}),[p,g]=(0,K.useState)({}),[_,v]=(0,K.useState)({}),y=I((0,K.useCallback)(e=>Me(e),[]),Rt),b=I((0,K.useCallback)(e=>Be(l,e),[l]),zt),x=Wt(),{reload:S}=y,{reload:C}=b,w=(0,K.useMemo)(()=>y.state.rows.map(e=>p[e.id]??e),[p,y.state.rows]),E=(0,K.useMemo)(()=>b.state.rows.map(e=>_[e.id]??e),[_,b.state.rows]),D=w.find(e=>e.id===a)??null,O=E.find(e=>e.id===s)??null,k=(0,K.useCallback)(e=>{r(t=>({draft:e,opened:(t?.opened??0)+1}))},[]);(0,K.useEffect)(()=>(se({note:null,tone:`quiet`,identifier:null}),le),[]),(0,K.useEffect)(()=>{if(D!==null){let e=D;return ee([{id:`rule`,label:i.word.rule.label,render:()=>(0,X.jsx)(ct,{rule:e,onChanged:e=>{g(t=>({...t,[e.id]:e}))},onDeleted:()=>{o(null),S()},onTest:()=>{k({connection:e.connection??``,subject:``})}})}],{screen:`alerting`})}if(O!==null){let e=O;return ee([{id:`notification`,label:i.word.notification.label,render:()=>(0,X.jsx)(ut,{notification:e,onChanged:e=>{v(t=>({...t,[e.id]:e}))}})}],{screen:`alerting`})}},[O,D,k,S]);let A=B(`admin`),j=A.may;(0,K.useEffect)(()=>z([...j?[{id:`alerting:rule`,title:i.alerting.new_rule.palette,group:R,screen:!0,icon:be,keywords:[`alert`,`event`,`create`],run:()=>{t(!0)}},{id:`alerting:test`,title:i.alerting.palette.send_test,group:R,screen:!0,icon:Se,keywords:[`alert`,`notification`,`try`],run:()=>{k(Pt)}}]:[],{id:`alerting:reload`,title:i.alerting.palette.reload,group:R,screen:!0,icon:P,keywords:[`refresh`,`reload`],run:()=>{S(),C()}}]),[j,k,C,S]);let ne=e=>{c(null),o(e.id),T()},re=e=>{o(null),c(e.id),T()},N=()=>{o(null),c(null),te()};return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(f,{title:i.screen.alerting.name,aside:(0,X.jsx)(m,{tag:`alerts`}),actions:[{id:`test`,label:i.action.send_test,icon:Se,variant:`outline`,disabled:!A.may,why:A.why,onClick:()=>{k(Pt)}},{id:`rule`,label:i.alerting.new_rule.button,icon:be,disabled:!A.may,why:A.why,onClick:()=>{t(!0)}}]}),(0,X.jsx)(`section`,{className:`mb-6 space-y-2`,children:(0,X.jsx)(yt,{channels:x.rows,read:x.read})}),(0,X.jsxs)(`section`,{className:`space-y-2`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold`,children:i.word.rule.heading}),(0,X.jsx)(d,{loading:!y.state.read,problem:y.state.problem,empty:w.length===0,emptyMessage:i.alerting.rules_empty,children:(0,X.jsx)(h,{columns:Kt,rows:w,rowKey:Rt,rowClassName:e=>ke(e)?void 0:`opacity-60`,reading:y.state.reading,next:y.state.next,onMore:y.more,noun:i.word.rule.count,onSelect:ne,selected:e=>e.id===a,onClose:N})})]}),(0,X.jsxs)(`section`,{className:`mt-8 space-y-2`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold`,children:i.word.notification.heading}),(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,X.jsx)(ue,{label:i.word.status,value:l.status,anything:i.alerting.any_status,options:we.map(e=>({value:e,label:e,mark:(0,X.jsx)(M,{status:e})})),onChange:e=>{u(t=>({...t,status:e}))}}),(0,X.jsx)(ue,{label:i.alerting.notifier,value:l.notifier,anything:i.alerting.any_notifier,options:Ut(x.rows),onChange:e=>{u(t=>({...t,notifier:e}))}})]})]}),(0,X.jsx)(d,{loading:!b.state.read,problem:b.state.problem,empty:E.length===0,emptyMessage:Re(l)?i.alerting.notifications_empty_filtered:i.alerting.notifications_empty,children:(0,X.jsx)(h,{columns:qt,rows:E,rowKey:zt,reading:b.state.reading,next:b.state.next,onMore:b.more,noun:i.word.notification.count,onSelect:re,selected:e=>e.id===s,onClose:N})})]}),(0,X.jsx)(At,{open:e,onOpenChange:t,notifiers:Ht(x.rows),connections:x.connections,onCreated:S}),(0,X.jsx)(Ft,{open:n!==null,draft:n?.draft??Pt,onOpenChange:e=>{e||r(null)},notifiers:Ht(x.rows),connections:x.connections,onQueued:C,onOpenQueue:e=>{r(null),o(null),c(e),C(),T()}},n?.opened??0)]})}function Ht(e){return[...new Set(e.map(e=>e.notifier))]}function Ut(e){return Ht(e).map(e=>({value:e,label:e}))}function Wt(){let[e,t]=(0,K.useState)(null),[n,r]=(0,K.useState)(null);return(0,K.useEffect)(()=>{let e=!0;return We().then(n=>{e&&t(n)},()=>{e&&t([])}),pe().then(t=>{e&&r(t.items)},()=>{e&&r([])}),()=>{e=!1}},[]),{rows:(0,K.useMemo)(()=>Ge(e??[],n??[]),[n,e]),connections:n??[],read:e!==null&&n!==null}}function Gt({rule:e}){let t=Oe(e.importance);return(0,X.jsxs)(`span`,{className:`flex flex-wrap items-baseline gap-x-1.5`,children:[(0,X.jsx)(`span`,{className:e.scope===`pipeline`?`font-mono text-xs`:`text-sm`,children:De(e)}),t!==null&&(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t})]})}var Kt=[{id:`rule`,header:i.word.rule.label,kind:`title`,cell:e=>{let t=D(e);return(0,X.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,X.jsx)(`span`,{className:v(`truncate`,t.named?`text-sm font-medium`:`font-mono text-sm font-medium`),title:t.title,children:t.title}),t.code!==null&&(0,X.jsx)(`span`,{className:`truncate font-mono text-xs text-muted-foreground`,title:t.code,children:t.code})]})}},{id:`event`,header:i.word.event,cell:e=>(0,X.jsx)(`span`,{className:`text-sm`,children:i.alerting.event[e.event]})},{id:`scope`,header:i.word.scope,cell:e=>(0,X.jsx)(Gt,{rule:e})},{id:`delivers`,header:i.word.delivers_through,cell:e=>(0,X.jsx)(ft,{notifier:e.notifier,connection:e.connection})},{id:`throttle`,header:i.word.throttle,className:`font-mono text-xs`,cell:e=>(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:Ee(e.throttle)})},{id:`sent`,header:i.alerting.last_sent,className:`text-xs`,cell:e=>e.last_sent_at===null?(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:i.word.never}):(0,X.jsx)(U,{className:`text-muted-foreground`,at:e.last_sent_at})},{id:`live`,header:i.word.state,cell:e=>e.paused?(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:i.state.armed.paused}):e.active?(0,X.jsx)(`span`,{className:`text-xs text-good`,children:i.state.armed.active}):(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:i.state.armed.off})}],qt=[{id:`status`,header:i.word.status,cell:e=>(0,X.jsx)(M,{status:e.status})},{id:`subject`,header:i.word.subject,kind:`prose`,cell:e=>(0,X.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,X.jsx)(`span`,{className:`truncate text-sm`,title:e.subject,children:e.subject}),e.error!==null&&(0,X.jsx)(`span`,{className:`truncate text-xs text-critical`,title:e.error,children:e.error})]})},{id:`delivers`,header:i.word.delivers_through,cell:e=>(0,X.jsx)(pt,{notifier:e.notifier,connection:e.connection})},{id:`run`,header:i.word.run.label,cell:e=>(0,X.jsx)(mt,{notification:e})},{id:`queued`,header:i.alerting.queued_at,className:`text-xs`,cell:e=>(0,X.jsx)(U,{className:`text-muted-foreground`,at:e.created_at})},{id:`sent`,header:i.alerting.sent_at,className:`text-xs`,cell:e=>e.status===`sent`?(0,X.jsx)(U,{className:`text-muted-foreground`,at:e.sent_at}):e.attempt>0?(0,X.jsx)(`span`,{className:`text-faint`,children:r(e.max_attempts,i.alerting.attempts_of.counted)(e.attempt,e.max_attempts)}):null}];export{Bt as AdminAlerting};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t}from"./store-D-5yFBN1.js";import{n,t as r}from"./labels-Dp8H1wzG.js";import{n as i}from"./chunk-OB3PAWPO-m4Sckj1b.js";import{n as a,t as o}from"./PageState-CuZbHz6s.js";import{i as s,t as c}from"./ListTable-A_dkU0ci.js";import{r as l}from"./utils-CT7ZGLfR.js";import{a as u,o as d,r as f}from"./panels-D1Fnei43.js";import{T as p,it as m,rt as h,y as g}from"./index-DcrUT8O1.js";import{t as _}from"./Markdown-D4x5xD_I.js";import{n as v,r as y}from"./Panel-COl_eBj1.js";import{i as b,l as x,o as S,r as C,s as w,t as T,u as E}from"./blocks-DCUqC697.js";import{b as D}from"./connections-ENTr1Nsd.js";import{l as O,r as k}from"./examples-NA2YGKLT.js";import{t as A}from"./KindChip-CwU_Xxdy.js";var j=e(t(),1),M=l(),N=e=>e.id,P=[{key:`scheme`,title:r.blocks.registry.scheme.title,noun:r.blocks.registry.scheme.noun},{key:`notifier`,title:r.blocks.registry.notifier.title,noun:r.blocks.registry.notifier.noun},{key:`connection`,title:r.blocks.registry.connection.title,noun:r.blocks.registry.connection.noun}],F=e=>t=>`${e}:${t.id}`,I=()=>{};function L(){let[e,t]=(0,j.useState)(``),[n,i]=(0,j.useState)(null),{value:l,problem:_,read:v}=g(x),y=g(O),b=(0,j.useMemo)(()=>k(y.value??[]),[y.value]),C=(0,j.useMemo)(()=>l?.blocks??[],[l]),E=(0,j.useMemo)(()=>S(C,e),[C,e]),D=(0,j.useMemo)(()=>T(E),[E]),A=(0,j.useMemo)(()=>w(l?.storage_schemes??[],e),[l,e]),L=(0,j.useMemo)(()=>w(l?.notifiers??[],e),[l,e]),z=(0,j.useMemo)(()=>w(l?.connection_kinds??[],e),[l,e]),U=(0,j.useMemo)(()=>R(b),[b]),W=C.find(e=>`block:${e.id}`===n)??null,G={scheme:A,notifier:L,connection:z},K=P.flatMap(e=>G[e.key].map(t=>({registry:e,entry:t}))).find(({registry:e,entry:t})=>F(e.key)(t)===n)??null;(0,j.useEffect)(()=>{if(v)return m({note:null,tone:`quiet`,identifier:null}),h},[C,v,l]),(0,j.useEffect)(()=>{if(W!==null)return u([{id:`block`,label:r.word.block.label,render:()=>(0,M.jsx)(H,{entry:W})}],{screen:`blocks`});if(K!==null){let{registry:e,entry:t}=K;return u([{id:`entry`,label:e.title,render:()=>(0,M.jsx)(V,{entry:t})}],{screen:`blocks`})}},[W,K]);let q=(0,j.useCallback)(e=>{i(`block:${e.id}`),d()},[]),J=(0,j.useCallback)(()=>{i(null),f()},[]);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o,{title:r.screen.blocks.name,aside:(0,M.jsx)(s,{tag:`blocks`})}),(0,M.jsx)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:(0,M.jsx)(p,{value:e,label:r.blocks.search,onChange:t})}),(0,M.jsx)(a,{loading:!v,problem:_,empty:E.length===0&&A.length===0&&L.length===0&&z.length===0,emptyMessage:C.length===0?r.blocks.empty:r.blocks.empty_filtered,children:(0,M.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[D.map(([e,t])=>(0,M.jsxs)(`section`,{children:[(0,M.jsx)(`h2`,{className:`mb-1.5 font-mono text-xs font-semibold tracking-wide text-faint uppercase`,children:e}),(0,M.jsx)(c,{chrome:{footer:!1},columns:U,rows:t,rowKey:N,reading:!1,next:null,onMore:I,noun:r.word.block.count,onSelect:q,selected:e=>`block:${e.id}`===n,onClose:J})]},e)),P.map(e=>{let t=G[e.key];return t.length===0?null:(0,M.jsxs)(`section`,{children:[(0,M.jsx)(`h2`,{className:`mb-1.5 font-mono text-xs font-semibold tracking-wide text-faint uppercase`,children:e.title}),(0,M.jsx)(c,{chrome:{footer:!1},columns:B(e.key),rows:t,rowKey:F(e.key),reading:!1,next:null,onMore:I,noun:e.noun,onSelect:t=>{i(F(e.key)(t)),d()},selected:t=>F(e.key)(t)===n,onClose:J})]},e.key)})]})})]})}function R(e){return[{id:`block`,header:r.word.block.label,kind:`title`,cell:e=>(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsx)(`span`,{className:`font-mono text-sm font-semibold`,children:e.id}),(0,M.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:e.summary,children:e.summary})]})},{id:`kind`,header:r.word.kind.label,className:`min-w-32 whitespace-nowrap`,cell:e=>(0,M.jsx)(A,{kind:e.kind})},{id:`examples`,header:r.word.example.heading,className:`min-w-28 whitespace-nowrap`,cell:t=>(0,M.jsx)(z,{id:t.id,many:e.get(t.id)??0})},{id:`plugin`,header:r.word.plugin.label,className:`min-w-36 font-mono text-xs whitespace-nowrap`,cell:e=>(0,M.jsx)(`span`,{className:`text-muted-foreground`,children:e.plugin})}]}function z({id:e,many:t}){if(t===0)return(0,M.jsx)(`span`,{className:`text-xs text-faint`,children:r.word.none});let a=n(t,r.blocks.example_count)(String(t));return(0,M.jsx)(i,{className:`text-xs text-primary-ink hover:underline`,to:`/examples?block=${encodeURIComponent(e)}`,title:r.blocks.example_link(e),onClick:e=>{e.stopPropagation()},children:a})}function B(e){let t=e===`scheme`?`storage`:e;return[{id:`entry`,header:r.blocks.entry_header,kind:`title`,cell:e=>{let t=typeof e.config_schema.description==`string`?e.config_schema.description:``;return(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsx)(`span`,{className:`font-mono text-sm font-semibold`,children:e.id}),(0,M.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:t,children:t})]})}},{id:`kind`,header:r.word.kind.label,className:`min-w-32 whitespace-nowrap`,cell:()=>(0,M.jsx)(A,{kind:t})},{id:`plugin`,header:r.word.plugin.label,className:`min-w-36 font-mono text-xs whitespace-nowrap`,cell:e=>(0,M.jsx)(`span`,{className:`text-muted-foreground`,children:e.plugin})}]}function V({entry:e}){let t=(0,j.useMemo)(()=>D(e.config_schema),[e]),n=typeof e.config_schema.description==`string`?e.config_schema.description:null;return(0,M.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsx)(`h2`,{className:`font-mono text-sm font-semibold`,children:e.id}),n!==null&&(0,M.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n}),(0,M.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:(0,M.jsx)(v,{term:r.blocks.fact.term.plugin,detail:e.plugin})})]}),(0,M.jsx)(y,{title:r.word.config,children:t.length===0?(0,M.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r.form.no_configuration}):(0,M.jsx)(`div`,{className:`flex flex-col gap-4`,children:t.map(e=>(0,M.jsx)(U,{field:e},e.name))})})]})}function H({entry:e}){let t=(0,j.useMemo)(()=>D(e.config_schema),[e]),n=b(e);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsx)(`h2`,{className:`font-mono text-sm font-semibold`,children:e.id}),(0,M.jsx)(`p`,{children:(0,M.jsx)(A,{kind:e.kind})}),(0,M.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.summary})]}),(0,M.jsx)(y,{title:r.blocks.facts_section,children:(0,M.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:n.map(e=>(0,M.jsx)(v,{term:e.term,detail:e.detail},e.term))})}),(0,M.jsx)(y,{title:r.word.config,children:t.length===0?(0,M.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r.form.no_configuration}):(0,M.jsx)(`div`,{className:`flex flex-col gap-4`,children:t.map(e=>(0,M.jsx)(U,{field:e},e.name))})})]})}function U({field:e}){let t=C(e);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2`,children:[(0,M.jsx)(`span`,{className:`font-mono text-sm font-medium`,children:e.name}),(0,M.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:E(e)}),e.required&&(0,M.jsx)(`span`,{className:`text-xs text-primary-ink`,children:r.blocks.field_required}),e.hint!==null&&(0,M.jsx)(`span`,{className:`text-xs text-faint`,children:e.hint}),t!==null&&(0,M.jsxs)(`span`,{className:`text-xs text-faint`,children:[r.blocks.field_default,` `,t]})]}),e.options.length>0&&(0,M.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:e.options.map(e=>e.label).join(` · `)}),e.help!==null&&(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,M.jsx)(_,{text:e.help})})]})}export{L as Blocks};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t}from"./store-D-5yFBN1.js";import{t as n}from"./labels-Dp8H1wzG.js";import{n as r}from"./chunk-OB3PAWPO-m4Sckj1b.js";import{r as i,t as a}from"./utils-CT7ZGLfR.js";var o=e(t(),1),s=i();function c({trail:e,code:t}){return(0,s.jsxs)(`nav`,{className:`flex min-w-0 items-center gap-1.5 text-sm`,"aria-label":n.shell.breadcrumb,title:e.map(e=>e.label).join(` / `),children:[e.map((t,n)=>{let i=n===e.length-1,c=i||t.keep===!0,l=e.slice(0,n).some(e=>e.keep===!0);return(0,s.jsxs)(o.Fragment,{children:[n>0&&(0,s.jsx)(`span`,{className:a(`text-faint`,!(c&&l)&&`hidden md:inline`),"aria-hidden":!0,children:`/`}),t.to===void 0?(0,s.jsx)(`span`,{title:t.title,className:a(`min-w-0 truncate`,i&&`font-medium`,t.mono===!0&&`font-mono`,!c&&`hidden md:inline`),children:t.label}):(0,s.jsx)(r,{to:t.to,title:t.title,className:a(`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(n)}`)}),t!=null&&(0,s.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs text-muted-foreground`,children:t})]})}export{c as t};
|