@langwatch/server 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1120) hide show
  1. package/feature-map.json +1279 -0
  2. package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-C2BpUHmD.js +2 -0
  3. package/langwatch/dist/client/assets/AddDatasetRecordDrawer-MGG9OkL5.js +6 -0
  4. package/langwatch/dist/client/assets/AddOrEditAnnotationScore-DT7Wwgex.js +2 -0
  5. package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-B_bvSihT.js +2 -0
  6. package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-DTTe34qt.js +3 -0
  7. package/langwatch/dist/client/assets/AddParticipants-Cu80BF8F.js +2 -0
  8. package/langwatch/dist/client/assets/AgentHistoryDrawer-Dv3a7Uw1.js +2 -0
  9. package/langwatch/dist/client/assets/AgentHttpEditorDrawer-BsTydMou.js +5 -0
  10. package/langwatch/dist/client/assets/AgentListDrawer-CkuGaFHx.js +2 -0
  11. package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-K0PUyG8U.js +2 -0
  12. package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-CMHvyQPV.js +2 -0
  13. package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-B18KFX98.js +2 -0
  14. package/langwatch/dist/client/assets/AiGatewayLayout-DL7at8rW.js +2 -0
  15. package/langwatch/dist/client/assets/AnnotationsTable-CrX2ZAvY.js +2 -0
  16. package/langwatch/dist/client/assets/AreaChart-BYqCBYVe.js +2 -0
  17. package/langwatch/dist/client/assets/AutomationDrawer-gr9nl_bx.js +112 -0
  18. package/langwatch/dist/client/assets/BatchEvaluationSummary-DJGlsFFE.js +2 -0
  19. package/langwatch/dist/client/assets/BudgetEditDrawer-DA_Za9Jh.js +2 -0
  20. package/langwatch/dist/client/assets/CartesianChart-BvVgDMpj.js +54 -0
  21. package/langwatch/dist/client/assets/CascadeArchiveDialog-CRcsYqD3.js +2 -0
  22. package/langwatch/dist/client/assets/ChartCard-C-6jgIhJ.js +2 -0
  23. package/langwatch/dist/client/assets/ChartTooltip-DDBarZKG.js +4 -0
  24. package/langwatch/dist/client/assets/ChatWindow-DgNy40Dm.js +5 -0
  25. package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-N8k4omh5.js +9 -0
  26. package/langwatch/dist/client/assets/CodexCodingDefaultsAsk-B-0KIS0U.js +2 -0
  27. package/langwatch/dist/client/assets/ColorfulBlockIcons-DntRdsrM.js +6 -0
  28. package/langwatch/dist/client/assets/ColumnTypeIcon-DHpZtj81.js +2 -0
  29. package/langwatch/dist/client/assets/ConfirmDialog-Bv_GbZtR.js +2 -0
  30. package/langwatch/dist/client/assets/ContactSalesBlock-BKfDeTTe.js +2 -0
  31. package/langwatch/dist/client/assets/Conversation-BLw2XAh1.js +2 -0
  32. package/langwatch/dist/client/assets/CopyInput-D4OHtSik.js +2 -0
  33. package/langwatch/dist/client/assets/CopyableInputWithPrefix-CqmK9rdo.js +2 -0
  34. package/langwatch/dist/client/assets/CreateProjectDrawer-z3akmVmk.js +2 -0
  35. package/langwatch/dist/client/assets/CreateTeamDrawer-Cq0VeHPU.js +2 -0
  36. package/langwatch/dist/client/assets/CustomGraph-D1JcOEDG.js +2 -0
  37. package/langwatch/dist/client/assets/DashboardLayout-cHFbN-Gk.js +6 -0
  38. package/langwatch/dist/client/assets/DashboardNameDrawer-Gox6uoUt.js +2 -0
  39. package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-jE8I0jR2.js +2 -0
  40. package/langwatch/dist/client/assets/DatasetEditorTable-DKIy0xQj.js +2 -0
  41. package/langwatch/dist/client/assets/DatasetPickerList-DxrvRALJ.js +2 -0
  42. package/langwatch/dist/client/assets/DatasetPreviewTable-BtNFthdy.js +2 -0
  43. package/langwatch/dist/client/assets/DatasetSelector-DnwaHRnP.js +2 -0
  44. package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-CdUN3LnJ.js +2 -0
  45. package/langwatch/dist/client/assets/DeleteConfirmationDialog-DuCAmpDY.js +2 -0
  46. package/langwatch/dist/client/assets/DocsLinks-CIoxiusp.js +2 -0
  47. package/langwatch/dist/client/assets/DynamicZodForm-g1UNpH1b.js +2 -0
  48. package/langwatch/dist/client/assets/EditAutomationFilterDrawer-BTKzOnMx.js +3 -0
  49. package/langwatch/dist/client/assets/EditModelProviderDrawer-CRJeagvH.js +4 -0
  50. package/langwatch/dist/client/assets/EditProjectDrawer-B6CJf6nC.js +2 -0
  51. package/langwatch/dist/client/assets/EmojiPickerModal-DT_Uj7SU.js +3 -0
  52. package/langwatch/dist/client/assets/EnterpriseLockedSurface-BjKgoqAx.js +2 -0
  53. package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-BnIwWX8t.js +107 -0
  54. package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-BMpitetN.js +2 -0
  55. package/langwatch/dist/client/assets/EvaluatorEditorDrawer-8SJeJRen.js +2 -0
  56. package/langwatch/dist/client/assets/EvaluatorEditorShared-BJefmSxm.js +43 -0
  57. package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-D9r7pDt9.js +2 -0
  58. package/langwatch/dist/client/assets/EvaluatorListDrawer-J_BFDGv3.js +2 -0
  59. package/langwatch/dist/client/assets/EvaluatorMappingsSection-DZFvYqNu.js +2 -0
  60. package/langwatch/dist/client/assets/EvaluatorSelection-DLWkQLtb.js +2 -0
  61. package/langwatch/dist/client/assets/EvaluatorSelectionBox-CPndz_g-.js +2 -0
  62. package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-B1g5DjJ7.js +2 -0
  63. package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-KKfZF0P-.js +2 -0
  64. package/langwatch/dist/client/assets/ExecutionState-Dh8lIhIP.js +2 -0
  65. package/langwatch/dist/client/assets/ExternalImage-As_YKOAz.js +34 -0
  66. package/langwatch/dist/client/assets/FeatureFlagsDrawer-ClPIMzIj.js +2 -0
  67. package/langwatch/dist/client/assets/FieldInfoTooltip-s2rM7SM0.js +2 -0
  68. package/langwatch/dist/client/assets/FieldsFilters-DePzLbr2.js +2 -0
  69. package/langwatch/dist/client/assets/FilterDisplay-ClLW19sO.js +2 -0
  70. package/langwatch/dist/client/assets/FilterSidebar-_ppaUjTr.js +2 -0
  71. package/langwatch/dist/client/assets/FormatMoney-CGjDIju_.js +2 -0
  72. package/langwatch/dist/client/assets/FoundryDrawer-DGKNXqmH.js +2 -0
  73. package/langwatch/dist/client/assets/FullLogo-itaa7fj-.js +2 -0
  74. package/langwatch/dist/client/assets/GovernanceLayout-DO9JArUM.js +2 -0
  75. package/langwatch/dist/client/assets/GraphsLayout-CjPYn5X3.js +2 -0
  76. package/langwatch/dist/client/assets/GroupBindingInputRow-zL2daQIU.js +2 -0
  77. package/langwatch/dist/client/assets/GuardrailsDrawer-Cf49144Z.js +91 -0
  78. package/langwatch/dist/client/assets/History-Cyg2gtXB.js +17 -0
  79. package/langwatch/dist/client/assets/HorizontalFormControl-COLSSPyK.js +2 -0
  80. package/langwatch/dist/client/assets/HoverableBigText-BLoq2yxD.js +2 -0
  81. package/langwatch/dist/client/assets/InstallCliCard-DvH3ygIs.js +2 -0
  82. package/langwatch/dist/client/assets/IntegratePaneShell-DmBxXblY.js +8 -0
  83. package/langwatch/dist/client/assets/InviteMemberDrawer-BPyf9yg9.js +2 -0
  84. package/langwatch/dist/client/assets/LLMModelCostDrawer-Ddduogw2.js +2 -0
  85. package/langwatch/dist/client/assets/LangyContextTarget-C6xwYVGg.js +2 -0
  86. package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-BYKcrVD_.js +2 -0
  87. package/langwatch/dist/client/assets/Legend-DoNXU8yt.js +6 -0
  88. package/langwatch/dist/client/assets/Line-DVmhil3S.js +2 -0
  89. package/langwatch/dist/client/assets/LineChart-JT5Tcp_D.js +2 -0
  90. package/langwatch/dist/client/assets/ListTable-sDgRCJ9e.js +2 -0
  91. package/langwatch/dist/client/assets/LoadingScreen-XWYCoKBN.js +2 -0
  92. package/langwatch/dist/client/assets/Markdown-CjWZDaeK.js +3 -0
  93. package/langwatch/dist/client/assets/MenuLink-CCPiKN-n.js +2 -0
  94. package/langwatch/dist/client/assets/MessageCard-CbSQoH1U.js +2 -0
  95. package/langwatch/dist/client/assets/MetadataTag-B1XwJcdK.js +5 -0
  96. package/langwatch/dist/client/assets/ModelProviderCustomModelInput-DKgydORR.js +2 -0
  97. package/langwatch/dist/client/assets/ModelProviderScreen-CoHgPhxe.js +2 -0
  98. package/langwatch/dist/client/assets/ModelSelector-dbR6V8hR.js +2 -0
  99. package/langwatch/dist/client/assets/MyLayout-BCFIoFGU.js +2 -0
  100. package/langwatch/dist/client/assets/NavigationFooter-BV-y1Ccf.js +2 -0
  101. package/langwatch/dist/client/assets/NewWorkflowForm-DgYkTq45.js +2 -0
  102. package/langwatch/dist/client/assets/NoDataInfoBlock-CqSD7i-D.js +2 -0
  103. package/langwatch/dist/client/assets/OnboardingContainer-jXD3w576.js +2 -0
  104. package/langwatch/dist/client/assets/OnlineEvaluationDrawer-3RfgPXAt.js +2 -0
  105. package/langwatch/dist/client/assets/OpsPageShell-BOi49ML9.js +2 -0
  106. package/langwatch/dist/client/assets/OttlEditor-7MOJI6SZ.js +3 -0
  107. package/langwatch/dist/client/assets/OverflownText-DITOBs56.js +2 -0
  108. package/langwatch/dist/client/assets/ProjectAvatar-BOH7ULC-.js +2 -0
  109. package/langwatch/dist/client/assets/ProjectLangyLayout-D6uI0rgc.js +82 -0
  110. package/langwatch/dist/client/assets/PromptEditorDrawer-CawpMwv2.js +2 -0
  111. package/langwatch/dist/client/assets/PromptListDrawer-mJuEu6sl.js +2 -0
  112. package/langwatch/dist/client/assets/PropertySectionTitle-DM-QD_X7.js +37 -0
  113. package/langwatch/dist/client/assets/ProviderModelSelector-bu_UnJgn.js +2 -0
  114. package/langwatch/dist/client/assets/ProviderScopeChips-DAith1M3.js +2 -0
  115. package/langwatch/dist/client/assets/PushToCopiesDialog-ZhJKOmpB.js +2 -0
  116. package/langwatch/dist/client/assets/RandomColorAvatar-D4Pjdi5E.js +2 -0
  117. package/langwatch/dist/client/assets/ReferenceDot-BNL3mb_4.js +2 -0
  118. package/langwatch/dist/client/assets/RenderInputOutput-B6SIoJEE.js +261 -0
  119. package/langwatch/dist/client/assets/ScenarioFormDrawer-BreFWAEL.js +2 -0
  120. package/langwatch/dist/client/assets/ScenarioInputMappingSection-BO7xuz3Q.js +2 -0
  121. package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-B7tqZUtg.js +3 -0
  122. package/langwatch/dist/client/assets/ScopeChipPicker-DW0UYA9z.js +2 -0
  123. package/langwatch/dist/client/assets/SearchInput-Q-TBf_3C.js +2 -0
  124. package/langwatch/dist/client/assets/SectionNavigationLayout-DELi2l8C.js +2 -0
  125. package/langwatch/dist/client/assets/SelectDatasetDrawer-z00GrHUJ.js +2 -0
  126. package/langwatch/dist/client/assets/SelectionActionBar-CmpsxKus.js +2 -0
  127. package/langwatch/dist/client/assets/SeriesFilterDrawer-DBl29Nft.js +2 -0
  128. package/langwatch/dist/client/assets/SettingsLayout-TFI-annu.js +2 -0
  129. package/langwatch/dist/client/assets/SetupWithAgentButton-ChiBWonD.js +4 -0
  130. package/langwatch/dist/client/assets/ShikiCommandBox-CvJJv-UK.js +5 -0
  131. package/langwatch/dist/client/assets/SpanDetails-Bf9G4Q7r.js +3 -0
  132. package/langwatch/dist/client/assets/SubscriptionPage-DojUae0-.js +2 -0
  133. package/langwatch/dist/client/assets/SuiteFormDrawer-BkSwohnS.js +2 -0
  134. package/langwatch/dist/client/assets/TabButton-IdHwwJvZ.js +3 -0
  135. package/langwatch/dist/client/assets/TableCell-BOc9hDdP.js +2 -0
  136. package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-BkACL4B0.js +2 -0
  137. package/langwatch/dist/client/assets/TeamForm-CoGCbaXE.js +2 -0
  138. package/langwatch/dist/client/assets/TeamUserRoleField-DaCIsPr0.js +2 -0
  139. package/langwatch/dist/client/assets/TraceDetails-D_HPr1ii.js +9 -0
  140. package/langwatch/dist/client/assets/TraceDetailsDrawer-CFMdgFO6.js +2 -0
  141. package/langwatch/dist/client/assets/TraceIdPeek-DmsxeUlT.js +2 -0
  142. package/langwatch/dist/client/assets/TracesMapping-qL9_JqHU.js +2 -0
  143. package/langwatch/dist/client/assets/UpgradeModal-DaVSEBO2.js +92 -0
  144. package/langwatch/dist/client/assets/UpgradeModalContent-DUimbawj.js +2 -0
  145. package/langwatch/dist/client/assets/UploadCSVDrawer-2fH0dmmN.js +3 -0
  146. package/langwatch/dist/client/assets/VariablesSection-BOZytTct.js +2 -0
  147. package/langwatch/dist/client/assets/VersionBadge-BNwXa8K1.js +2 -0
  148. package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-BvCK6x4i.js +1161 -0
  149. package/langwatch/dist/client/assets/ViewAutomationDrawer-CBoDRCfF.js +2 -0
  150. package/langwatch/dist/client/assets/VirtualKeySecretReveal-z9OhRCRq.js +54 -0
  151. package/langwatch/dist/client/assets/WelcomeLayout-veH9XP9n.js +2 -0
  152. package/langwatch/dist/client/assets/WithFeatureFlagGuard-D09SSCsN.js +2 -0
  153. package/langwatch/dist/client/assets/WithPermissionGuard-BBKTBlhW.js +2 -0
  154. package/langwatch/dist/client/assets/WorkflowCard-CUUg0Jb9.js +2 -0
  155. package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-DQPMmz5y.js +2 -0
  156. package/langwatch/dist/client/assets/_...path_-Dl2wM_Co.js +2 -0
  157. package/langwatch/dist/client/assets/_Uint8Array-CVdXk-9j.js +2 -0
  158. package/langwatch/dist/client/assets/__...path__-dvuiwbR8.js +22 -0
  159. package/langwatch/dist/client/assets/_baseAssignValue-D1riHssy.js +2 -0
  160. package/langwatch/dist/client/assets/_baseClone-Btuu3kUN.js +2 -0
  161. package/langwatch/dist/client/assets/_baseEach-D42E_cYN.js +2 -0
  162. package/langwatch/dist/client/assets/_baseFor-DjY96g6R.js +2 -0
  163. package/langwatch/dist/client/assets/_experiment_-C41VDj2_.js +2 -0
  164. package/langwatch/dist/client/assets/_id_-6sd4MNOz.js +2 -0
  165. package/langwatch/dist/client/assets/_id_-7yHuXZsv.js +2 -0
  166. package/langwatch/dist/client/assets/_id_-BiJsS6cZ.js +2 -0
  167. package/langwatch/dist/client/assets/_id_-BxNfkyzv.js +2 -0
  168. package/langwatch/dist/client/assets/_id_-DjvwAa9I.js +2 -0
  169. package/langwatch/dist/client/assets/_id_-Dv1Ha5td.js +2 -0
  170. package/langwatch/dist/client/assets/_id_-qIAmzXj9.js +2 -0
  171. package/langwatch/dist/client/assets/_project_-WrF4swO9.js +8 -0
  172. package/langwatch/dist/client/assets/_runId_-uzKEhtNe.js +7 -0
  173. package/langwatch/dist/client/assets/_shell-CBKyngpn.js +2 -0
  174. package/langwatch/dist/client/assets/_slug_-B7rGjVou.js +17 -0
  175. package/langwatch/dist/client/assets/_slug_-BM065qSQ.js +2 -0
  176. package/langwatch/dist/client/assets/_slug_-DTN4hRRD.js +2 -0
  177. package/langwatch/dist/client/assets/_team_-DFCS7cLC.js +2 -0
  178. package/langwatch/dist/client/assets/_workflow_-Dm-v5D1q.js +25 -0
  179. package/langwatch/dist/client/assets/_workflow_-Od6Ld1fG.js +3 -0
  180. package/langwatch/dist/client/assets/accept-DfhUN0Qn.js +2 -0
  181. package/langwatch/dist/client/assets/activity-ikjk_AlK.js +1 -0
  182. package/langwatch/dist/client/assets/agents-BbtJ377u.js +2 -0
  183. package/langwatch/dist/client/assets/alerts-ikjk_AlK.js +1 -0
  184. package/langwatch/dist/client/assets/all-Ba9m0fkb.js +2 -0
  185. package/langwatch/dist/client/assets/analytics-BfdI38ZC.js +2 -0
  186. package/langwatch/dist/client/assets/annotation-scores-BY75kcBF.js +2 -0
  187. package/langwatch/dist/client/assets/annotations-DIwdkHHY.js +2 -0
  188. package/langwatch/dist/client/assets/anomaly-rules-BmEX38RD.js +2 -0
  189. package/langwatch/dist/client/assets/api-keys-BPifPObL.js +4 -0
  190. package/langwatch/dist/client/assets/asaplangy-BjnuNv4L.js +5 -0
  191. package/langwatch/dist/client/assets/audit-log-2z_Ec4XU.js +2 -0
  192. package/langwatch/dist/client/assets/auth-BJm09Odd.js +2 -0
  193. package/langwatch/dist/client/assets/authentication-D4a-VSlX.js +2 -0
  194. package/langwatch/dist/client/assets/authorize-BBjJ2zjw.js +2 -0
  195. package/langwatch/dist/client/assets/authorize-CHqAf3Jd.js +2 -0
  196. package/langwatch/dist/client/assets/automations-Bds5nLI_.js +2 -0
  197. package/langwatch/dist/client/assets/automations-ikjk_AlK.js +1 -0
  198. package/langwatch/dist/client/assets/billing-plans-K7xawVCS.js +2 -0
  199. package/langwatch/dist/client/assets/blank-DsMQ71pJ.js +2 -0
  200. package/langwatch/dist/client/assets/blobs-Dc7nKnmO.js +2 -0
  201. package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3-57B2W0rq.js +133 -0
  202. package/langwatch/dist/client/assets/budgets-dKK-wYyg.js +3 -0
  203. package/langwatch/dist/client/assets/bug-reports-BxCDdVoL.js +2 -0
  204. package/langwatch/dist/client/assets/cache-rules-Ds14kJAt.js +2 -0
  205. package/langwatch/dist/client/assets/choose-X7Hyqyyu.js +2 -0
  206. package/langwatch/dist/client/assets/chunk-EX3LRPZG-DF3ACR9i.js +232 -0
  207. package/langwatch/dist/client/assets/chunk-FWX5IMBZ-CIlmcu0O.js +3 -0
  208. package/langwatch/dist/client/assets/chunk-PUDLZKDR-Dj_zAVVr.js +157 -0
  209. package/langwatch/dist/client/assets/chunk-RYQCIY6F-CjWAFgxP.js +2 -0
  210. package/langwatch/dist/client/assets/chunk-V7JOEXUC-BgVcuIhi.js +207 -0
  211. package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-Cw7PXCaC.js +2 -0
  212. package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-Cw7PXCaC.js +2 -0
  213. package/langwatch/dist/client/assets/codeAgentConfig-B0NzDmlQ.js +7 -0
  214. package/langwatch/dist/client/assets/codingDefaultSync-ebaLPfnN.js +2 -0
  215. package/langwatch/dist/client/assets/configure-CrbOTC5S.js +4 -0
  216. package/langwatch/dist/client/assets/custom-D8Emd7w-.js +12 -0
  217. package/langwatch/dist/client/assets/custom_evaluator-BtYta_Dj.js +31 -0
  218. package/langwatch/dist/client/assets/dagre-ClO7SEns.js +2 -0
  219. package/langwatch/dist/client/assets/dagre-VKFMJZFB-evqDS8UW.js +5 -0
  220. package/langwatch/dist/client/assets/data-privacy-GCArtTFq.js +2 -0
  221. package/langwatch/dist/client/assets/data-retention-BtLi9M98.js +2 -0
  222. package/langwatch/dist/client/assets/datasets-DeNG9KNJ.js +2 -0
  223. package/langwatch/dist/client/assets/debounce-r-8TPIqh.js +2 -0
  224. package/langwatch/dist/client/assets/defaultModelState-ByR0bEhZ.js +2 -0
  225. package/langwatch/dist/client/assets/dejaview-BF8VqQGI.js +2 -0
  226. package/langwatch/dist/client/assets/departments-D2L92_Qa.js +2 -0
  227. package/langwatch/dist/client/assets/devices-C8e0So_K.js +2 -0
  228. package/langwatch/dist/client/assets/dist-B1XMO10X.js +6 -0
  229. package/langwatch/dist/client/assets/drawerFromUrl-BZIwwDLm.js +2 -0
  230. package/langwatch/dist/client/assets/edit-pIB-bQM_.js +62 -0
  231. package/langwatch/dist/client/assets/email-suppressions-Bq0lhfwG.js +2 -0
  232. package/langwatch/dist/client/assets/erDiagram-Q63AITRT-BqEHcyA0.js +86 -0
  233. package/langwatch/dist/client/assets/error-2TTx9xpE.js +2 -0
  234. package/langwatch/dist/client/assets/evaluations-0Nc6rWP8.js +2 -0
  235. package/langwatch/dist/client/assets/evaluations-DHmE-YCm.js +2 -0
  236. package/langwatch/dist/client/assets/evaluators-DKbY-ajr.js +146 -0
  237. package/langwatch/dist/client/assets/evaluators-v4CDfsOE.js +2 -0
  238. package/langwatch/dist/client/assets/experiments-BRN0rGL9.js +1 -0
  239. package/langwatch/dist/client/assets/external-link-CtHzR85H.js +2 -0
  240. package/langwatch/dist/client/assets/feature-flags-BDyiuat4.js +2 -0
  241. package/langwatch/dist/client/assets/fetchSSE-GcVBzE9n.js +3 -0
  242. package/langwatch/dist/client/assets/fieldset-CIGh0Uxg.js +2 -0
  243. package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-BOl-6oqO.js +1 -0
  244. package/langwatch/dist/client/assets/forgot-password-DjvudMXW.js +2 -0
  245. package/langwatch/dist/client/assets/formatMoney-ByqR-Rrd.js +2 -0
  246. package/langwatch/dist/client/assets/foundry-Co_CpgKb.js +477 -0
  247. package/langwatch/dist/client/assets/gateway-B0y3Tz7G.js +2 -0
  248. package/langwatch/dist/client/assets/getEvaluator-pJF3ehUx.js +2 -0
  249. package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-Bbj-WQTj.js +2 -0
  250. package/langwatch/dist/client/assets/governance-BtuwwuRw.js +2 -0
  251. package/langwatch/dist/client/assets/graphlib-CwcejmA1.js +2 -0
  252. package/langwatch/dist/client/assets/groups-DTVa4dcS.js +2 -0
  253. package/langwatch/dist/client/assets/guardrails-BnCJsF0m.js +2 -0
  254. package/langwatch/dist/client/assets/http-BIG04f8c.js +7 -0
  255. package/langwatch/dist/client/assets/identifierUtils-B1LGnOD5.js +2 -0
  256. package/langwatch/dist/client/assets/immer-BdlOHsfO.js +14 -0
  257. package/langwatch/dist/client/assets/index-DtiounXP.js +68 -0
  258. package/langwatch/dist/client/assets/ingestion-source-detail-hmCupOG1.js +19 -0
  259. package/langwatch/dist/client/assets/ingestion-sources-sv7eDiMD.js +12 -0
  260. package/langwatch/dist/client/assets/integrations-CM7dYrOG.js +2 -0
  261. package/langwatch/dist/client/assets/isArrayLikeObject-6lUBvOUd.js +2 -0
  262. package/langwatch/dist/client/assets/isSymbol-n0ARt1yC.js +2 -0
  263. package/langwatch/dist/client/assets/langyHomeSuggestions-Oyh_vavj.js +2 -0
  264. package/langwatch/dist/client/assets/latestAliases-D_86OOcA.js +2 -0
  265. package/langwatch/dist/client/assets/license-CYtxniam.js +2 -0
  266. package/langwatch/dist/client/assets/loadModelCatalog-31-xT4W4.js +2 -0
  267. package/langwatch/dist/client/assets/map-BCpZm9Sc.js +2 -0
  268. package/langwatch/dist/client/assets/mappingValidation-DPNnGAuO.js +2 -0
  269. package/langwatch/dist/client/assets/me-1nxAV6zO.js +2 -0
  270. package/langwatch/dist/client/assets/me-wWuZrajs.js +7 -0
  271. package/langwatch/dist/client/assets/members-Bau-5CPK.js +2 -0
  272. package/langwatch/dist/client/assets/mermaid.core-oQEgcWXd.js +12 -0
  273. package/langwatch/dist/client/assets/messages-kTp5NaSm.js +2 -0
  274. package/langwatch/dist/client/assets/metrics-Cpovzjg4.js +2 -0
  275. package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-OcYZSGuC.js +97 -0
  276. package/langwatch/dist/client/assets/model-costs-DiRpmy-H.js +2 -0
  277. package/langwatch/dist/client/assets/model-providers-DRq5Q7er.js +2 -0
  278. package/langwatch/dist/client/assets/modelProviderHelpers-STUAbD02.js +2 -0
  279. package/langwatch/dist/client/assets/my-queue-veenWZWf.js +2 -0
  280. package/langwatch/dist/client/assets/normalizeComparison-CDNTbMdZ.js +2 -0
  281. package/langwatch/dist/client/assets/not-found-Nu1odKyD.js +2 -0
  282. package/langwatch/dist/client/assets/now-BQGidI_5.js +2 -0
  283. package/langwatch/dist/client/assets/onboarding-BWJ038z8.js +2 -0
  284. package/langwatch/dist/client/assets/online-evaluations-k-WwH1ML.js +2 -0
  285. package/langwatch/dist/client/assets/ops-D9am3MEi.js +2 -0
  286. package/langwatch/dist/client/assets/organizations-CMTT_97U.js +2 -0
  287. package/langwatch/dist/client/assets/pages-D5p_o0LC.js +2 -0
  288. package/langwatch/dist/client/assets/persistence-jLMreGhL.js +2 -0
  289. package/langwatch/dist/client/assets/plans-v8LBcXa9.js +2 -0
  290. package/langwatch/dist/client/assets/product-CAja-R4_.js +2 -0
  291. package/langwatch/dist/client/assets/project-DbS0dYGR.js +2 -0
  292. package/langwatch/dist/client/assets/projections-B4mXJEvc.js +2 -0
  293. package/langwatch/dist/client/assets/projects-DnYaZW6w.js +2 -0
  294. package/langwatch/dist/client/assets/promptHandle-CQ_zUeRB.js +2 -0
  295. package/langwatch/dist/client/assets/prompts-BAxWZhm5.js +8 -0
  296. package/langwatch/dist/client/assets/radio-group-y_PtCP6q.js +2 -0
  297. package/langwatch/dist/client/assets/registry-KCPOxhx0.js +2 -0
  298. package/langwatch/dist/client/assets/reports-B_Y4pHYs.js +2 -0
  299. package/langwatch/dist/client/assets/request-bU99z82H.js +2 -0
  300. package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-BYId9zaF.js +85 -0
  301. package/langwatch/dist/client/assets/reset-password-zMr6-23y.js +2 -0
  302. package/langwatch/dist/client/assets/role-bindings-BvPzAUj1.js +2 -0
  303. package/langwatch/dist/client/assets/roles-CjwqOKoo.js +2 -0
  304. package/langwatch/dist/client/assets/routing-policies-C7yjQJuY.js +5 -0
  305. package/langwatch/dist/client/assets/scenarios-CdrzuCtM.js +2 -0
  306. package/langwatch/dist/client/assets/scheduler-CfXVwiOa.js +2 -0
  307. package/langwatch/dist/client/assets/schedules-ikjk_AlK.js +1 -0
  308. package/langwatch/dist/client/assets/scim-CGJ8MwNu.js +2 -0
  309. package/langwatch/dist/client/assets/secrets-DZef0jTb.js +2 -0
  310. package/langwatch/dist/client/assets/segment-group-EW0AyNd-.js +2 -0
  311. package/langwatch/dist/client/assets/segmented-control-SS4Yq_Ti.js +2 -0
  312. package/langwatch/dist/client/assets/select-C5JAM7Gf.js +2 -0
  313. package/langwatch/dist/client/assets/send-TZcuPW9Z.js +2 -0
  314. package/langwatch/dist/client/assets/sequenceView-vubFe0e7.js +5 -0
  315. package/langwatch/dist/client/assets/seriesOptions-0YtTiTzZ.js +1011 -0
  316. package/langwatch/dist/client/assets/settings-CfAtn_PH.js +2 -0
  317. package/langwatch/dist/client/assets/setup-In6OXn3a.js +2 -0
  318. package/langwatch/dist/client/assets/shikiAdapter-lZp3oxvk.js +3 -0
  319. package/langwatch/dist/client/assets/signin-CMU_rlgk.js +2 -0
  320. package/langwatch/dist/client/assets/signup-CYKtIfrB.js +2 -0
  321. package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-CKO-9021.js +2 -0
  322. package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-BnXuBsJr.js +2 -0
  323. package/langwatch/dist/client/assets/subscription-CBiotOK9.js +3 -0
  324. package/langwatch/dist/client/assets/subscriptions-D55paZaw.js +2 -0
  325. package/langwatch/dist/client/assets/suggestionUI-KPD1is36.js +106 -0
  326. package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-B0ptAIsf.js +3 -0
  327. package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-DzqdWH4x.js +9 -0
  328. package/langwatch/dist/client/assets/switch-BOt3Np6s.js +2 -0
  329. package/langwatch/dist/client/assets/switch-BnyTlP1L.js +2 -0
  330. package/langwatch/dist/client/assets/tabs-D8PJtlU3.js +2 -0
  331. package/langwatch/dist/client/assets/teams-CE3UCC84.js +2 -0
  332. package/langwatch/dist/client/assets/teams-CxmVu0zp.js +2 -0
  333. package/langwatch/dist/client/assets/tool-catalog-DTTKCxyF.js +7 -0
  334. package/langwatch/dist/client/assets/toolIcons-n2K5OHKw.js +2 -0
  335. package/langwatch/dist/client/assets/tooltip-CYWvZEOf.js +2 -0
  336. package/langwatch/dist/client/assets/topic-clustering-C37AbBFy.js +2 -0
  337. package/langwatch/dist/client/assets/topics-rviNSdYR.js +2 -0
  338. package/langwatch/dist/client/assets/traceExecutor-DQlsNg6N.js +55 -0
  339. package/langwatch/dist/client/assets/traces-DnlS2lMP.js +289 -0
  340. package/langwatch/dist/client/assets/tracesMapping-DJvqZsfB.js +3 -0
  341. package/langwatch/dist/client/assets/tracking-6s9dX1_R.js +2 -0
  342. package/langwatch/dist/client/assets/types-BeNupKna.js +2 -0
  343. package/langwatch/dist/client/assets/types-ChBnYRcc.js +2 -0
  344. package/langwatch/dist/client/assets/types-DXVP3BA7.js +2 -0
  345. package/langwatch/dist/client/assets/types-atzk7phf.js +2 -0
  346. package/langwatch/dist/client/assets/unsubscribe-uUCCImkQ.js +2 -0
  347. package/langwatch/dist/client/assets/usage-DBjFOkD3.js +2 -0
  348. package/langwatch/dist/client/assets/usage-De8DbhVE.js +2 -0
  349. package/langwatch/dist/client/assets/use-breakpoint-BdbDgj6J.js +2 -0
  350. package/langwatch/dist/client/assets/use-generic-onboarding-flow-CQjNkSYf.js +2 -0
  351. package/langwatch/dist/client/assets/useActivePlan-DZotDN7k.js +2 -0
  352. package/langwatch/dist/client/assets/useAllPromptsForProject-yZtsv1kJ.js +2 -0
  353. package/langwatch/dist/client/assets/useAnnotationQueues-BJ8Vb6SZ.js +2 -0
  354. package/langwatch/dist/client/assets/useAvailableEvaluators-C6cl3TSs.js +2 -0
  355. package/langwatch/dist/client/assets/useCyclingVerb-CMPh6fkl.js +2 -0
  356. package/langwatch/dist/client/assets/useDepartmentColumn-C4l1_4BR.js +2 -0
  357. package/langwatch/dist/client/assets/useEvaluationsV3Store-CMnxA8pt.js +2 -0
  358. package/langwatch/dist/client/assets/useExportTraces-DzTqFSlc.js +2 -0
  359. package/langwatch/dist/client/assets/useFeatureFlag-CKFU9lsX.js +2 -0
  360. package/langwatch/dist/client/assets/useInviteActions-CNRL7usw.js +2 -0
  361. package/langwatch/dist/client/assets/useLicenseEnforcement-BIiCopDI.js +2 -0
  362. package/langwatch/dist/client/assets/useLiteMemberGuard-ChV0lUs4.js +43 -0
  363. package/langwatch/dist/client/assets/usePersonalContext-D-HsFKQo.js +2 -0
  364. package/langwatch/dist/client/assets/useProjectSpanNames-BKMm-yLN.js +2 -0
  365. package/langwatch/dist/client/assets/useProjectsForCopy-BPGjhWUl.js +2 -0
  366. package/langwatch/dist/client/assets/useRunViaApiTabs-BGv2kygX.js +50 -0
  367. package/langwatch/dist/client/assets/useSavedViews-DH6Poufh.js +2 -0
  368. package/langwatch/dist/client/assets/useShowLangy-DvcJ7z1U.js +2 -0
  369. package/langwatch/dist/client/assets/useSimulationUpdateListener-CcqEq03v.js +2 -0
  370. package/langwatch/dist/client/assets/useTargetName-CByKsdU-.js +2 -0
  371. package/langwatch/dist/client/assets/useTargetNameMap-C8kjUxhY.js +2 -0
  372. package/langwatch/dist/client/assets/useTraceDetailsDrawer-BgcNOady.js +2 -0
  373. package/langwatch/dist/client/assets/useTraceUpdateListener-D5UNLNbd.js +2 -0
  374. package/langwatch/dist/client/assets/useUrlScopeFilter-D0HZ-mkj.js +2 -0
  375. package/langwatch/dist/client/assets/useWorkflowStore-CVvg8K0Q.js +8 -0
  376. package/langwatch/dist/client/assets/users-802bPAIG.js +2 -0
  377. package/langwatch/dist/client/assets/users-CWkRn-Tl.js +2 -0
  378. package/langwatch/dist/client/assets/users-DhJ0ZUHi.js +2 -0
  379. package/langwatch/dist/client/assets/v3-D65ySaeM.js +2 -0
  380. package/langwatch/dist/client/assets/variables-BpyyIkKh.js +396 -0
  381. package/langwatch/dist/client/assets/viewStore-Bq2Jqc8R.js +2 -0
  382. package/langwatch/dist/client/assets/virtual-keys-Cbeg9TQU.js +2 -0
  383. package/langwatch/dist/client/assets/welcome-Bh4D-qW7.js +16 -0
  384. package/langwatch/dist/client/assets/wizard-spBSxei8.js +2 -0
  385. package/langwatch/dist/client/assets/workbench-Bid7wYk7.js +2 -0
  386. package/langwatch/dist/client/assets/workflows-1TodsGOO.js +3 -0
  387. package/langwatch/dist/client/assets/wrap-noqflF_F.js +2 -0
  388. package/langwatch/dist/client/index.html +1 -1
  389. package/langwatch/package.json +1 -1
  390. package/langwatch/packages/api/README.md +283 -0
  391. package/langwatch/packages/api/node_modules/.bin/tsc +21 -0
  392. package/langwatch/packages/api/node_modules/.bin/tsserver +21 -0
  393. package/langwatch/packages/api/node_modules/.bin/vitest +21 -0
  394. package/langwatch/packages/api/package.json +39 -0
  395. package/langwatch/packages/api/src/__tests__/builder.unit.test.ts +1135 -0
  396. package/langwatch/packages/api/src/__tests__/errorLogging.integration.test.ts +130 -0
  397. package/langwatch/packages/api/src/__tests__/errors.unit.test.ts +331 -0
  398. package/langwatch/packages/api/src/__tests__/sse.unit.test.ts +247 -0
  399. package/langwatch/packages/api/src/__tests__/versioning.unit.test.ts +379 -0
  400. package/langwatch/packages/api/src/builder.ts +163 -0
  401. package/langwatch/packages/api/src/errors.ts +255 -0
  402. package/langwatch/packages/api/src/index.ts +41 -0
  403. package/langwatch/packages/api/src/middleware.ts +227 -0
  404. package/langwatch/packages/api/src/pipeline.ts +254 -0
  405. package/langwatch/packages/api/src/response.ts +38 -0
  406. package/langwatch/packages/api/src/route-mounting.ts +140 -0
  407. package/langwatch/packages/api/src/sse.ts +179 -0
  408. package/langwatch/packages/api/src/types.ts +217 -0
  409. package/langwatch/packages/api/src/version-builder.ts +131 -0
  410. package/langwatch/packages/api/src/versioning.ts +221 -0
  411. package/langwatch/packages/api/tsconfig.json +16 -0
  412. package/langwatch/packages/api/vitest.config.ts +8 -0
  413. package/langwatch/packages/automations/README.md +17 -0
  414. package/langwatch/packages/automations/node_modules/.bin/liquid +21 -0
  415. package/langwatch/packages/automations/node_modules/.bin/liquidjs +21 -0
  416. package/langwatch/packages/automations/node_modules/.bin/marked +21 -0
  417. package/langwatch/packages/automations/node_modules/.bin/tsc +21 -0
  418. package/langwatch/packages/automations/node_modules/.bin/tsserver +21 -0
  419. package/langwatch/packages/automations/node_modules/.bin/vitest +21 -0
  420. package/langwatch/packages/automations/package.json +43 -0
  421. package/langwatch/packages/automations/src/cadences.ts +50 -0
  422. package/langwatch/packages/automations/src/enums.ts +24 -0
  423. package/langwatch/packages/automations/src/index.ts +26 -0
  424. package/langwatch/packages/automations/src/providers/__tests__/webhook.unit.test.ts +147 -0
  425. package/langwatch/packages/automations/src/providers/annotationQueue.ts +26 -0
  426. package/langwatch/packages/automations/src/providers/dataset.ts +43 -0
  427. package/langwatch/packages/automations/src/providers/email.ts +36 -0
  428. package/langwatch/packages/automations/src/providers/slack.ts +96 -0
  429. package/langwatch/packages/automations/src/providers/types.ts +84 -0
  430. package/langwatch/packages/automations/src/providers/webhook.ts +137 -0
  431. package/langwatch/packages/automations/src/templating/__tests__/alertDefaultsRender.unit.test.ts +133 -0
  432. package/langwatch/packages/automations/src/templating/__tests__/blockKitAllowlist.unit.test.ts +723 -0
  433. package/langwatch/packages/automations/src/templating/__tests__/engine.unit.test.ts +106 -0
  434. package/langwatch/packages/automations/src/templating/__tests__/exampleContext.unit.test.ts +39 -0
  435. package/langwatch/packages/automations/src/templating/__tests__/fixtures.ts +42 -0
  436. package/langwatch/packages/automations/src/templating/__tests__/graphAlertTemplateContext.unit.test.ts +260 -0
  437. package/langwatch/packages/automations/src/templating/__tests__/markdown.unit.test.ts +71 -0
  438. package/langwatch/packages/automations/src/templating/__tests__/renderEmail.unit.test.ts +183 -0
  439. package/langwatch/packages/automations/src/templating/__tests__/renderSlack.unit.test.ts +233 -0
  440. package/langwatch/packages/automations/src/templating/__tests__/renderWebhookBody.unit.test.ts +145 -0
  441. package/langwatch/packages/automations/src/templating/__tests__/reportDefaultsRender.unit.test.ts +148 -0
  442. package/langwatch/packages/automations/src/templating/__tests__/templateContext.unit.test.ts +137 -0
  443. package/langwatch/packages/automations/src/templating/__tests__/validate.unit.test.ts +28 -0
  444. package/langwatch/packages/automations/src/templating/banner.ts +29 -0
  445. package/langwatch/packages/automations/src/templating/blockKitAllowlist.ts +662 -0
  446. package/langwatch/packages/automations/src/templating/defaults.ts +400 -0
  447. package/langwatch/packages/automations/src/templating/emailLayout.ts +59 -0
  448. package/langwatch/packages/automations/src/templating/engine.ts +255 -0
  449. package/langwatch/packages/automations/src/templating/exampleContext.ts +171 -0
  450. package/langwatch/packages/automations/src/templating/markdown.ts +61 -0
  451. package/langwatch/packages/automations/src/templating/renderEmail.ts +112 -0
  452. package/langwatch/packages/automations/src/templating/renderSlack.ts +184 -0
  453. package/langwatch/packages/automations/src/templating/renderWebhookBody.ts +105 -0
  454. package/langwatch/packages/automations/src/templating/renderWithFallback.ts +54 -0
  455. package/langwatch/packages/automations/src/templating/templateContext.ts +812 -0
  456. package/langwatch/packages/automations/src/templating/validate.ts +24 -0
  457. package/langwatch/packages/automations/tsconfig.json +18 -0
  458. package/langwatch/packages/automations/vitest.config.ts +8 -0
  459. package/langwatch/packages/observability/README.md +86 -0
  460. package/langwatch/packages/observability/node_modules/.bin/esbuild +18 -0
  461. package/langwatch/packages/observability/node_modules/.bin/pino +21 -0
  462. package/langwatch/packages/observability/node_modules/.bin/pino-pretty +21 -0
  463. package/langwatch/packages/observability/node_modules/.bin/tsc +21 -0
  464. package/langwatch/packages/observability/node_modules/.bin/tsserver +21 -0
  465. package/langwatch/packages/observability/node_modules/.bin/vitest +21 -0
  466. package/langwatch/packages/observability/package.json +44 -0
  467. package/langwatch/packages/observability/src/__tests__/browserSafety.unit.test.ts +14 -0
  468. package/langwatch/packages/observability/src/__tests__/context.unit.test.ts +228 -0
  469. package/langwatch/packages/observability/src/__tests__/logger.unit.test.ts +227 -0
  470. package/langwatch/packages/observability/src/__tests__/requestLogging.unit.test.ts +252 -0
  471. package/langwatch/packages/observability/src/__tests__/runtimeSafety.unit.test.ts +96 -0
  472. package/langwatch/packages/observability/src/__tests__/traceContext.unit.test.ts +108 -0
  473. package/langwatch/packages/observability/src/constants.ts +46 -0
  474. package/langwatch/packages/observability/src/context/core.ts +124 -0
  475. package/langwatch/packages/observability/src/context/index.ts +19 -0
  476. package/langwatch/packages/observability/src/context/logging.ts +24 -0
  477. package/langwatch/packages/observability/src/index.ts +32 -0
  478. package/langwatch/packages/observability/src/logger.ts +280 -0
  479. package/langwatch/packages/observability/src/request/requestLogging.ts +131 -0
  480. package/langwatch/packages/observability/src/trace/traceContext.ts +56 -0
  481. package/langwatch/packages/observability/tsconfig.json +16 -0
  482. package/langwatch/packages/observability/vitest.config.ts +8 -0
  483. package/langwatch/packages/react-rum/node_modules/.bin/tsc +21 -0
  484. package/langwatch/packages/react-rum/node_modules/.bin/tsserver +21 -0
  485. package/langwatch/packages/react-rum/node_modules/.bin/vitest +21 -0
  486. package/langwatch/packages/react-rum/package.json +43 -0
  487. package/langwatch/packages/react-rum/src/browserTracing.ts +130 -0
  488. package/langwatch/packages/react-rum/src/constants.ts +67 -0
  489. package/langwatch/packages/react-rum/src/index.ts +34 -0
  490. package/langwatch/packages/react-rum/src/navigation.test.ts +188 -0
  491. package/langwatch/packages/react-rum/src/navigation.ts +189 -0
  492. package/langwatch/packages/react-rum/src/navigationContextManager.ts +71 -0
  493. package/langwatch/packages/react-rum/src/sampling.test.ts +182 -0
  494. package/langwatch/packages/react-rum/src/sampling.ts +124 -0
  495. package/langwatch/packages/react-rum/src/session.test.ts +85 -0
  496. package/langwatch/packages/react-rum/src/session.ts +62 -0
  497. package/langwatch/packages/react-rum/src/sessionSpanProcessor.ts +34 -0
  498. package/langwatch/packages/react-rum/tsconfig.json +18 -0
  499. package/langwatch/packages/react-rum/vitest.config.ts +8 -0
  500. package/langwatch/packages/redaction/node_modules/.bin/tsc +21 -0
  501. package/langwatch/packages/redaction/node_modules/.bin/tsserver +21 -0
  502. package/langwatch/packages/redaction/node_modules/.bin/vitest +21 -0
  503. package/langwatch/packages/redaction/package.json +29 -0
  504. package/langwatch/packages/redaction/src/__tests__/secrets.unit.test.ts +226 -0
  505. package/langwatch/packages/redaction/src/__tests__/sessionReport.unit.test.ts +239 -0
  506. package/langwatch/packages/redaction/src/index.ts +29 -0
  507. package/langwatch/packages/redaction/src/markers.ts +101 -0
  508. package/langwatch/packages/redaction/src/secrets.ts +286 -0
  509. package/langwatch/packages/redaction/src/sessionReport.ts +356 -0
  510. package/langwatch/packages/redaction/tsconfig.json +18 -0
  511. package/langwatch/packages/ssrf/node_modules/.bin/tsc +21 -0
  512. package/langwatch/packages/ssrf/node_modules/.bin/tsserver +21 -0
  513. package/langwatch/packages/ssrf/node_modules/.bin/vitest +21 -0
  514. package/langwatch/packages/ssrf/package.json +29 -0
  515. package/langwatch/packages/ssrf/src/index.test.ts +72 -0
  516. package/langwatch/packages/ssrf/src/index.ts +320 -0
  517. package/langwatch/packages/ssrf/tsconfig.json +18 -0
  518. package/langwatch/packages/ssrf/vitest.config.ts +8 -0
  519. package/langwatch/scripts/__tests__/bug-report-discovery.unit.test.ts +37 -0
  520. package/langwatch/scripts/build-mcp-server.sh +15 -0
  521. package/langwatch/scripts/generate-langy-skills.ts +10 -0
  522. package/langwatch/scripts/update-matrix-provider-keys.ts +1 -1
  523. package/langwatch/src/components/EditModelProviderDrawer.tsx +7 -1
  524. package/langwatch/src/components/settings/ModelProviderCredentialsSection.tsx +13 -21
  525. package/langwatch/src/components/settings/ModelProviderForm.tsx +32 -3
  526. package/langwatch/src/components/settings/__tests__/ModelProviderForm.credential-preservation.integration.test.tsx +277 -0
  527. package/langwatch/src/components/settings/__tests__/ModelProviderForm.credential-requiredness.integration.test.tsx +260 -0
  528. package/langwatch/src/components/settings/__tests__/modelProviderDrawerHarness.tsx +152 -0
  529. package/langwatch/src/features/onboarding/components/sections/model-provider/ModelProviderSetup.tsx +7 -3
  530. package/langwatch/src/hooks/__tests__/useProviderFormSubmit.integration.test.tsx +7 -1
  531. package/langwatch/src/hooks/useModelProviderApiKeyValidation.ts +25 -4
  532. package/langwatch/src/hooks/useModelProviderFields.ts +45 -37
  533. package/langwatch/src/hooks/useModelProviderForm.ts +2 -0
  534. package/langwatch/src/hooks/useProviderFormSubmit.ts +27 -19
  535. package/langwatch/src/hooks/useRequiredCredentialKeys.ts +38 -0
  536. package/langwatch/src/pages/settings/__tests__/model-providers.no-project.integration.test.tsx +508 -0
  537. package/langwatch/src/pages/settings/model-providers.tsx +19 -97
  538. package/langwatch/src/server/api/routers/__tests__/prepareEnvKeys.unit.test.ts +56 -0
  539. package/langwatch/src/server/api/routers/modelProviders.ts +146 -15
  540. package/langwatch/src/server/api/routers/modelProviders.utils.ts +1 -10
  541. package/langwatch/src/server/app-layer/traces/__tests__/audio-model-cost.unit.test.ts +133 -0
  542. package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/_constants.ts +6 -0
  543. package/langwatch/src/server/app-layer/traces/model-cost-matching.ts +17 -1
  544. package/langwatch/src/server/app-layer/traces/repositories/__tests__/span-storage.clickhouse.repository.unit.test.ts +6 -0
  545. package/langwatch/src/server/app-layer/traces/repositories/span-storage.clickhouse.repository.ts +6 -0
  546. package/langwatch/src/server/gateway/__tests__/config.materialiser.integration.test.ts +132 -3
  547. package/langwatch/src/server/gateway/config.materialiser.ts +11 -9
  548. package/langwatch/src/server/modelProviders/__tests__/modelProvider.credentialPreservation.integration.test.ts +206 -0
  549. package/langwatch/src/server/modelProviders/__tests__/modelProvider.deleteScope.integration.test.ts +0 -4
  550. package/langwatch/src/server/modelProviders/__tests__/modelProvider.noProject.integration.test.ts +748 -0
  551. package/langwatch/src/server/modelProviders/__tests__/modelProvider.repository.integration.test.ts +3 -3
  552. package/langwatch/src/server/modelProviders/__tests__/modelProvider.repository.unit.test.ts +7 -8
  553. package/langwatch/src/server/modelProviders/__tests__/modelProvider.service.extraHeaders.unit.test.ts +0 -5
  554. package/langwatch/src/server/modelProviders/__tests__/modelProvider.service.unit.test.ts +5 -1
  555. package/langwatch/src/server/modelProviders/__tests__/registry.unit.test.ts +31 -0
  556. package/langwatch/src/server/modelProviders/llmModelCost.tsx +20 -2
  557. package/langwatch/src/server/modelProviders/llmModels.json +736 -209
  558. package/langwatch/src/server/modelProviders/llmModels.overlay.json +149 -2
  559. package/langwatch/src/server/modelProviders/llmModels.types.ts +9 -2
  560. package/langwatch/src/server/modelProviders/modelProvider.repository.ts +10 -12
  561. package/langwatch/src/server/modelProviders/modelProvider.service.ts +142 -34
  562. package/langwatch/src/server/modelProviders/registry.ts +45 -15
  563. package/langwatch/src/server/tracer/collector/cost.ts +15 -2
  564. package/langwatch/src/utils/__tests__/modelProviderCredentialRules.unit.test.ts +259 -0
  565. package/langwatch/src/utils/__tests__/modelProviderHelpers.unit.test.ts +12 -0
  566. package/langwatch/src/utils/modelProviderHelpers.ts +207 -16
  567. package/package.json +5 -1
  568. package/packages/handled-error/node_modules/.bin/tsc +21 -0
  569. package/packages/handled-error/node_modules/.bin/tsserver +21 -0
  570. package/packages/handled-error/node_modules/.bin/vitest +21 -0
  571. package/packages/handled-error/package.json +31 -0
  572. package/packages/handled-error/src/handled-error.test.ts +305 -0
  573. package/packages/handled-error/src/handled-error.ts +431 -0
  574. package/packages/handled-error/src/index.ts +16 -0
  575. package/packages/handled-error/tsconfig.json +22 -0
  576. package/packages/langy/node_modules/.bin/tsc +21 -0
  577. package/packages/langy/node_modules/.bin/tsserver +21 -0
  578. package/packages/langy/node_modules/.bin/vitest +21 -0
  579. package/packages/langy/package.json +40 -0
  580. package/packages/langy/src/cards/cliJson.ts +95 -0
  581. package/packages/langy/src/cards/cliJson.unit.test.ts +80 -0
  582. package/packages/langy/src/cards/created-resource.unit.test.ts +137 -0
  583. package/packages/langy/src/cards/derived-safe.ts +265 -0
  584. package/packages/langy/src/cards/derived-safe.unit.test.ts +283 -0
  585. package/packages/langy/src/cards/digest.ts +247 -0
  586. package/packages/langy/src/cards/digest.unit.test.ts +230 -0
  587. package/packages/langy/src/cards/handled-error.ts +697 -0
  588. package/packages/langy/src/cards/handled-error.unit.test.ts +795 -0
  589. package/packages/langy/src/cards/index.ts +51 -0
  590. package/packages/langy/src/cards/primitives.ts +113 -0
  591. package/packages/langy/src/cards/promotion.unit.test.ts +253 -0
  592. package/packages/langy/src/cards/registry.ts +450 -0
  593. package/packages/langy/src/cards/registry.unit.test.ts +141 -0
  594. package/packages/langy/src/cards/schemas.ts +561 -0
  595. package/packages/langy/src/cards/tool-result.ts +151 -0
  596. package/packages/langy/src/cards/tool-result.unit.test.ts +37 -0
  597. package/packages/langy/src/constants.ts +253 -0
  598. package/packages/langy/src/event-sourcing/contracts/cursor.ts +46 -0
  599. package/packages/langy/src/event-sourcing/contracts/cursor.unit.test.ts +66 -0
  600. package/packages/langy/src/event-sourcing/contracts/events.ts +345 -0
  601. package/packages/langy/src/event-sourcing/contracts/turnWire.ts +81 -0
  602. package/packages/langy/src/event-sourcing/folds/conversationFold.ts +413 -0
  603. package/packages/langy/src/event-sourcing/folds/messageMap.ts +71 -0
  604. package/packages/langy/src/event-sourcing/folds/turnFold.ts +372 -0
  605. package/packages/langy/src/event-sourcing/folds/turnFold.unit.test.ts +217 -0
  606. package/packages/langy/src/event-sourcing/turnPhase.ts +124 -0
  607. package/packages/langy/src/event-sourcing/turnPhase.unit.test.ts +110 -0
  608. package/packages/langy/src/event-sourcing/turnProjection.ts +120 -0
  609. package/packages/langy/src/event-sourcing/turnProjection.unit.test.ts +207 -0
  610. package/packages/langy/src/index.ts +16 -0
  611. package/packages/langy/src/inline-channel/choices.ts +136 -0
  612. package/packages/langy/src/inline-channel/choices.unit.test.ts +213 -0
  613. package/packages/langy/src/inline-channel/fence.ts +125 -0
  614. package/packages/langy/src/inline-channel/fence.unit.test.ts +112 -0
  615. package/packages/langy/src/inline-channel/parts.ts +85 -0
  616. package/packages/langy/src/inline-channel/parts.unit.test.ts +100 -0
  617. package/packages/langy/src/inline-channel/preview.ts +68 -0
  618. package/packages/langy/src/inline-channel/preview.unit.test.ts +116 -0
  619. package/packages/langy/src/inline-channel/salvage.ts +260 -0
  620. package/packages/langy/src/inline-channel/salvage.unit.test.ts +135 -0
  621. package/packages/langy/src/json.ts +47 -0
  622. package/packages/langy/tsconfig.json +22 -0
  623. package/packages/server/dist/cli.cjs +11045 -10616
  624. package/python-sdk/src/langwatch/openai.py +107 -28
  625. package/skills/.env.example +1 -0
  626. package/skills/.release-please-shim +1 -0
  627. package/skills/CHANGELOG.md +158 -0
  628. package/skills/README.md +99 -0
  629. package/skills/_compiled/README.md +43 -0
  630. package/skills/_compiled/generate.sh +31 -0
  631. package/skills/_compiled/native/agent-best-practices/SKILL.md +91 -0
  632. package/skills/_compiled/native/agent-improve/SKILL.md +133 -0
  633. package/skills/_compiled/native/agent-performance/SKILL.md +125 -0
  634. package/skills/_compiled/native/datasets/SKILL.md +437 -0
  635. package/skills/_compiled/native/debug-instrumentation/SKILL.md +104 -0
  636. package/skills/_compiled/native/debug-with-langwatch/SKILL.md +109 -0
  637. package/skills/_compiled/native/eval-triage/SKILL.md +87 -0
  638. package/skills/_compiled/native/evaluate-multimodal/SKILL.md +121 -0
  639. package/skills/_compiled/native/evaluations/SKILL.md +58 -0
  640. package/skills/_compiled/native/experiments/SKILL.md +191 -0
  641. package/skills/_compiled/native/generate-rag-dataset/SKILL.md +123 -0
  642. package/skills/_compiled/native/github/SKILL.md +107 -0
  643. package/skills/_compiled/native/level-up/SKILL.md +149 -0
  644. package/skills/_compiled/native/online-evaluations/SKILL.md +179 -0
  645. package/skills/_compiled/native/prompts/SKILL.md +187 -0
  646. package/skills/_compiled/native/scenarios/SKILL.md +924 -0
  647. package/skills/_compiled/native/setup-lw/SKILL.md +82 -0
  648. package/skills/_compiled/native/test-cli-usability/SKILL.md +109 -0
  649. package/skills/_compiled/native/test-compliance/SKILL.md +160 -0
  650. package/skills/_compiled/native/tracing/SKILL.md +115 -0
  651. package/skills/_compiler/compile.ts +181 -0
  652. package/skills/_compiler/native.ts +74 -0
  653. package/skills/_lib/feature-skills.ts +66 -0
  654. package/skills/_lib/frontmatter.ts +21 -0
  655. package/skills/_lib/mdx-inline.ts +148 -0
  656. package/skills/_publish/sync.ts +73 -0
  657. package/skills/_shared/api-key-setup.mdx +1 -0
  658. package/skills/_shared/cli-install.mdx +1 -0
  659. package/skills/_shared/cli-setup.mdx +15 -0
  660. package/skills/_shared/consultant-mode.mdx +9 -0
  661. package/skills/_shared/plan-limits.mdx +8 -0
  662. package/skills/_shared/projects-and-api-keys.mdx +13 -0
  663. package/skills/_tests/README.md +47 -0
  664. package/skills/_tests/agent-best-practices.scenario.test.ts +79 -0
  665. package/skills/_tests/agent-improve.scenario.test.ts +90 -0
  666. package/skills/_tests/agent-performance.scenario.test.ts +110 -0
  667. package/skills/_tests/claude-code-adapter.test.ts +70 -0
  668. package/skills/_tests/cli-auth.scenario.test.ts +171 -0
  669. package/skills/_tests/cli-comprehensive.scenario.test.ts +171 -0
  670. package/skills/_tests/cli-crud.scenario.test.ts +245 -0
  671. package/skills/_tests/cli-gateway-coding-agents.scenario.test.ts +597 -0
  672. package/skills/_tests/cli-gateway.scenario.test.ts +254 -0
  673. package/skills/_tests/cli-projects-api-keys.scenario.test.ts +182 -0
  674. package/skills/_tests/cli-suites.scenario.test.ts +234 -0
  675. package/skills/_tests/datasets.scenario.test.ts +586 -0
  676. package/skills/_tests/docs-skills-pages.test.ts +206 -0
  677. package/skills/_tests/evaluation-skill-boundaries.test.ts +84 -0
  678. package/skills/_tests/experiments-faithfulness.scenario.test.ts +80 -0
  679. package/skills/_tests/experiments-python-langgraph.scenario.test.ts +80 -0
  680. package/skills/_tests/experiments-python-openai.scenario.test.ts +110 -0
  681. package/skills/_tests/experiments-rag.scenario.test.ts +88 -0
  682. package/skills/_tests/experiments-typescript-vercel.scenario.test.ts +80 -0
  683. package/skills/_tests/fixtures/cli-prompts/python-with-prompts/main.py +24 -0
  684. package/skills/_tests/fixtures/python-agno/main.py +14 -0
  685. package/skills/_tests/fixtures/python-google-adk/main.py +28 -0
  686. package/skills/_tests/fixtures/python-health-agent/main.py +32 -0
  687. package/skills/_tests/fixtures/python-langgraph/main.py +35 -0
  688. package/skills/_tests/fixtures/python-openai/main.py +36 -0
  689. package/skills/_tests/fixtures/python-rag-agent/main.py +53 -0
  690. package/skills/_tests/fixtures/typescript-mastra/index.ts +11 -0
  691. package/skills/_tests/fixtures/typescript-vercel/index.ts +16 -0
  692. package/skills/_tests/fixtures/typescript-voice/index.ts +18 -0
  693. package/skills/_tests/helpers/claude-code-adapter.ts +387 -0
  694. package/skills/_tests/helpers/experiments-scenario.ts +197 -0
  695. package/skills/_tests/helpers/judge-model.ts +12 -0
  696. package/skills/_tests/level-up.scenario.test.ts +236 -0
  697. package/skills/_tests/native-skills.test.ts +191 -0
  698. package/skills/_tests/online-evaluations.scenario.test.ts +257 -0
  699. package/skills/_tests/prompts-cli.scenario.test.ts +330 -0
  700. package/skills/_tests/prompts.scenario.test.ts +434 -0
  701. package/skills/_tests/publish-sync.test.ts +119 -0
  702. package/skills/_tests/recipes.scenario.test.ts +343 -0
  703. package/skills/_tests/scenarios.scenario.test.ts +884 -0
  704. package/skills/_tests/tracing.scenario.test.ts +472 -0
  705. package/skills/_tests/voice-factories.test.ts +60 -0
  706. package/skills/agent-improve/SKILL.mdx +100 -0
  707. package/skills/agent-performance/SKILL.mdx +102 -0
  708. package/skills/datasets/SKILL.mdx +416 -0
  709. package/skills/evaluations/SKILL.mdx +57 -0
  710. package/skills/experiments/SKILL.mdx +155 -0
  711. package/skills/github/SKILL.mdx +107 -0
  712. package/skills/initial-prompt.md +66 -0
  713. package/skills/level-up/SKILL.mdx +112 -0
  714. package/skills/online-evaluations/SKILL.mdx +150 -0
  715. package/skills/package.json +53 -0
  716. package/skills/pnpm-lock.yaml +4862 -0
  717. package/skills/pnpm-workspace.yaml +2 -0
  718. package/skills/prompts/SKILL.mdx +151 -0
  719. package/skills/recipes/README.md +30 -0
  720. package/skills/recipes/agent-best-practices/SKILL.mdx +84 -0
  721. package/skills/recipes/debug-instrumentation/SKILL.mdx +88 -0
  722. package/skills/recipes/debug-with-langwatch/SKILL.mdx +97 -0
  723. package/skills/recipes/eval-triage/SKILL.mdx +75 -0
  724. package/skills/recipes/evaluate-multimodal/SKILL.mdx +110 -0
  725. package/skills/recipes/generate-rag-dataset/SKILL.mdx +105 -0
  726. package/skills/recipes/setup-lw/SKILL.mdx +71 -0
  727. package/skills/recipes/test-cli-usability/SKILL.mdx +106 -0
  728. package/skills/recipes/test-compliance/SKILL.mdx +149 -0
  729. package/skills/scenarios/SKILL.mdx +874 -0
  730. package/skills/tracing/SKILL.mdx +88 -0
  731. package/skills/tsconfig.json +15 -0
  732. package/skills/version.txt +1 -0
  733. package/skills/vitest.config.ts +7 -0
  734. package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-BQSucfOX.js +0 -2
  735. package/langwatch/dist/client/assets/AddDatasetRecordDrawer-DAsTHYTP.js +0 -6
  736. package/langwatch/dist/client/assets/AddOrEditAnnotationScore-B5Ck48cm.js +0 -2
  737. package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-C8HFvayF.js +0 -2
  738. package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-BRzya-3u.js +0 -3
  739. package/langwatch/dist/client/assets/AddParticipants-DGPUGXt7.js +0 -2
  740. package/langwatch/dist/client/assets/AgentHistoryDrawer-D13d_z7X.js +0 -2
  741. package/langwatch/dist/client/assets/AgentHttpEditorDrawer-CuT-fXSu.js +0 -5
  742. package/langwatch/dist/client/assets/AgentListDrawer-CWtvhmue.js +0 -2
  743. package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-BRHSlvwQ.js +0 -2
  744. package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-CylJD3xL.js +0 -2
  745. package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-CaoZTrdq.js +0 -2
  746. package/langwatch/dist/client/assets/AiGatewayLayout-B5Q-EfZV.js +0 -2
  747. package/langwatch/dist/client/assets/AnnotationsTable-DoO83AX9.js +0 -2
  748. package/langwatch/dist/client/assets/AreaChart-CXmFZ9PN.js +0 -2
  749. package/langwatch/dist/client/assets/AutomationDrawer-Bv4nX8y6.js +0 -112
  750. package/langwatch/dist/client/assets/BatchEvaluationSummary-uqdSLrh7.js +0 -2
  751. package/langwatch/dist/client/assets/BudgetEditDrawer-CGUdeHXR.js +0 -2
  752. package/langwatch/dist/client/assets/CartesianChart-D35vYym3.js +0 -54
  753. package/langwatch/dist/client/assets/CascadeArchiveDialog-DSo9Fwed.js +0 -2
  754. package/langwatch/dist/client/assets/ChartCard-DgQ4fTGc.js +0 -2
  755. package/langwatch/dist/client/assets/ChartTooltip-Cf8ESsQ9.js +0 -4
  756. package/langwatch/dist/client/assets/ChatWindow-DplHBlw_.js +0 -5
  757. package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-CPxNogVm.js +0 -9
  758. package/langwatch/dist/client/assets/CodexCodingDefaultsAsk-BdUx3xAP.js +0 -2
  759. package/langwatch/dist/client/assets/ColorfulBlockIcons-CUrsa--K.js +0 -6
  760. package/langwatch/dist/client/assets/ColumnTypeIcon-DNzTCt_2.js +0 -2
  761. package/langwatch/dist/client/assets/ConfirmDialog-DTpkLGhm.js +0 -2
  762. package/langwatch/dist/client/assets/ContactSalesBlock-BaXLliHv.js +0 -2
  763. package/langwatch/dist/client/assets/Conversation-DZIYz2Vp.js +0 -2
  764. package/langwatch/dist/client/assets/CopyInput-Csb1U32e.js +0 -2
  765. package/langwatch/dist/client/assets/CopyableInputWithPrefix-C3PRtdkW.js +0 -2
  766. package/langwatch/dist/client/assets/CreateProjectDrawer-32NvkFfD.js +0 -2
  767. package/langwatch/dist/client/assets/CreateTeamDrawer-DtGf5dkO.js +0 -2
  768. package/langwatch/dist/client/assets/CustomGraph-C3a1gzo6.js +0 -2
  769. package/langwatch/dist/client/assets/DashboardLayout-RHGL-98_.js +0 -6
  770. package/langwatch/dist/client/assets/DashboardNameDrawer-DD8bwnCt.js +0 -2
  771. package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-DiY-VkTs.js +0 -2
  772. package/langwatch/dist/client/assets/DatasetEditorTable-CwI345qA.js +0 -2
  773. package/langwatch/dist/client/assets/DatasetPickerList-CpHDt0t8.js +0 -2
  774. package/langwatch/dist/client/assets/DatasetPreviewTable-v8OUUAB3.js +0 -2
  775. package/langwatch/dist/client/assets/DatasetSelector-isPOzukH.js +0 -2
  776. package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-BI7NSI6A.js +0 -2
  777. package/langwatch/dist/client/assets/DeleteConfirmationDialog-7K0S0Qdq.js +0 -2
  778. package/langwatch/dist/client/assets/DocsLinks-NNRxMwQU.js +0 -2
  779. package/langwatch/dist/client/assets/DynamicZodForm-3XwhQhOl.js +0 -2
  780. package/langwatch/dist/client/assets/EditAutomationFilterDrawer-MYW_WiO2.js +0 -3
  781. package/langwatch/dist/client/assets/EditModelProviderDrawer-Isp2BSHG.js +0 -4
  782. package/langwatch/dist/client/assets/EditProjectDrawer-Dj2lYKdO.js +0 -2
  783. package/langwatch/dist/client/assets/EmojiPickerModal-DdZxZuTV.js +0 -3
  784. package/langwatch/dist/client/assets/EnterpriseLockedSurface-CxLn8Im_.js +0 -2
  785. package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-DIFGzOw4.js +0 -107
  786. package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-Cm114u5E.js +0 -2
  787. package/langwatch/dist/client/assets/EvaluatorEditorDrawer-aCxccvFM.js +0 -2
  788. package/langwatch/dist/client/assets/EvaluatorEditorShared-DiLlkD4v.js +0 -43
  789. package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-Bv3sLSRP.js +0 -2
  790. package/langwatch/dist/client/assets/EvaluatorListDrawer-eUbPJehC.js +0 -2
  791. package/langwatch/dist/client/assets/EvaluatorMappingsSection-DvSTsuT8.js +0 -2
  792. package/langwatch/dist/client/assets/EvaluatorSelection-Bi_Ud8sy.js +0 -2
  793. package/langwatch/dist/client/assets/EvaluatorSelectionBox-v8iA4p4D.js +0 -2
  794. package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-DlwvjPGU.js +0 -2
  795. package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-ul5Ud4lG.js +0 -2
  796. package/langwatch/dist/client/assets/ExecutionState-DKBVAVTm.js +0 -2
  797. package/langwatch/dist/client/assets/ExternalImage-DbtOSrKl.js +0 -34
  798. package/langwatch/dist/client/assets/FeatureFlagsDrawer-YiildcJp.js +0 -2
  799. package/langwatch/dist/client/assets/FieldInfoTooltip-CXhYVsTQ.js +0 -2
  800. package/langwatch/dist/client/assets/FieldsFilters-CrGJyKXz.js +0 -2
  801. package/langwatch/dist/client/assets/FilterDisplay-BT6B5ZoZ.js +0 -2
  802. package/langwatch/dist/client/assets/FilterSidebar-0UgGuTeu.js +0 -2
  803. package/langwatch/dist/client/assets/FormatMoney-CEzwUDkl.js +0 -2
  804. package/langwatch/dist/client/assets/FoundryDrawer-BIy5SFvr.js +0 -2
  805. package/langwatch/dist/client/assets/FullLogo-EwD3nY0N.js +0 -2
  806. package/langwatch/dist/client/assets/GovernanceLayout-COAapH9g.js +0 -2
  807. package/langwatch/dist/client/assets/GraphsLayout-ygWQTw_g.js +0 -2
  808. package/langwatch/dist/client/assets/GroupBindingInputRow-DF_WY6iQ.js +0 -2
  809. package/langwatch/dist/client/assets/GuardrailsDrawer-BIq6RhSh.js +0 -91
  810. package/langwatch/dist/client/assets/History-V1jF0Epn.js +0 -17
  811. package/langwatch/dist/client/assets/HorizontalFormControl-CLz9xuFM.js +0 -2
  812. package/langwatch/dist/client/assets/HoverableBigText-CxXucdYS.js +0 -2
  813. package/langwatch/dist/client/assets/InstallCliCard-SGRlvABl.js +0 -2
  814. package/langwatch/dist/client/assets/IntegratePaneShell--xX7Q_FZ.js +0 -8
  815. package/langwatch/dist/client/assets/InviteMemberDrawer-BgkE2My_.js +0 -2
  816. package/langwatch/dist/client/assets/LLMModelCostDrawer-Be2PXHIC.js +0 -2
  817. package/langwatch/dist/client/assets/LangyContextTarget-DUSindiC.js +0 -2
  818. package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-C1PAs5gE.js +0 -2
  819. package/langwatch/dist/client/assets/Legend-UkJ5OBun.js +0 -6
  820. package/langwatch/dist/client/assets/Line-Bq29STZQ.js +0 -2
  821. package/langwatch/dist/client/assets/LineChart-DjFD6yv4.js +0 -2
  822. package/langwatch/dist/client/assets/ListTable-CSs4ttpJ.js +0 -2
  823. package/langwatch/dist/client/assets/LoadingScreen-D0JSh0Q2.js +0 -2
  824. package/langwatch/dist/client/assets/Markdown-Dm0jXfOR.js +0 -3
  825. package/langwatch/dist/client/assets/MenuLink-CCRiOtxz.js +0 -2
  826. package/langwatch/dist/client/assets/MessageCard-DqgrJCJ6.js +0 -2
  827. package/langwatch/dist/client/assets/MetadataTag-W5I0CKzN.js +0 -5
  828. package/langwatch/dist/client/assets/ModelProviderCustomModelInput-XgGjvYky.js +0 -2
  829. package/langwatch/dist/client/assets/ModelProviderScreen-BtASYmAL.js +0 -2
  830. package/langwatch/dist/client/assets/ModelSelector-BBb1wHS_.js +0 -2
  831. package/langwatch/dist/client/assets/MyLayout-DX7ntheK.js +0 -2
  832. package/langwatch/dist/client/assets/NavigationFooter-CJaT-F50.js +0 -2
  833. package/langwatch/dist/client/assets/NewWorkflowForm-BrvVQJNY.js +0 -2
  834. package/langwatch/dist/client/assets/NoDataInfoBlock-B3c1WwDO.js +0 -2
  835. package/langwatch/dist/client/assets/OnboardingContainer-DRrQV_9c.js +0 -2
  836. package/langwatch/dist/client/assets/OnlineEvaluationDrawer-DHbPXgEV.js +0 -2
  837. package/langwatch/dist/client/assets/OpsPageShell-BamkwuvB.js +0 -2
  838. package/langwatch/dist/client/assets/OttlEditor-BhsdMVM9.js +0 -3
  839. package/langwatch/dist/client/assets/OverflownText-DhbWrtC6.js +0 -2
  840. package/langwatch/dist/client/assets/ProjectAvatar--gOpUll9.js +0 -2
  841. package/langwatch/dist/client/assets/ProjectLangyLayout-C7WNak1h.js +0 -82
  842. package/langwatch/dist/client/assets/PromptEditorDrawer-k_dFbREL.js +0 -2
  843. package/langwatch/dist/client/assets/PromptListDrawer-B-C4Cl6I.js +0 -2
  844. package/langwatch/dist/client/assets/PropertySectionTitle-CK67qoQ9.js +0 -37
  845. package/langwatch/dist/client/assets/ProviderModelSelector-Cm89XYO8.js +0 -2
  846. package/langwatch/dist/client/assets/ProviderScopeChips-S0Ctqbwg.js +0 -2
  847. package/langwatch/dist/client/assets/PushToCopiesDialog-C3eBpZ9F.js +0 -2
  848. package/langwatch/dist/client/assets/RandomColorAvatar-CTya_4BQ.js +0 -2
  849. package/langwatch/dist/client/assets/ReferenceDot-St9tkyoA.js +0 -2
  850. package/langwatch/dist/client/assets/RenderInputOutput-DOVNZVJ2.js +0 -261
  851. package/langwatch/dist/client/assets/ScenarioFormDrawer-9224CX_d.js +0 -2
  852. package/langwatch/dist/client/assets/ScenarioInputMappingSection-Sqtj3HwL.js +0 -2
  853. package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-fzMzXl1A.js +0 -3
  854. package/langwatch/dist/client/assets/ScopeChipPicker-B6r27G3S.js +0 -2
  855. package/langwatch/dist/client/assets/SearchInput-C_AroTij.js +0 -2
  856. package/langwatch/dist/client/assets/SectionNavigationLayout-DNvKM1pq.js +0 -2
  857. package/langwatch/dist/client/assets/SelectDatasetDrawer-CeZvw0Rl.js +0 -2
  858. package/langwatch/dist/client/assets/SelectionActionBar-5j-e3Y3p.js +0 -2
  859. package/langwatch/dist/client/assets/SeriesFilterDrawer-C2Io5BkG.js +0 -2
  860. package/langwatch/dist/client/assets/SettingsLayout-CYtjUobV.js +0 -2
  861. package/langwatch/dist/client/assets/SetupWithAgentButton-BKWI-UTU.js +0 -4
  862. package/langwatch/dist/client/assets/ShikiCommandBox-D_TBnZxW.js +0 -5
  863. package/langwatch/dist/client/assets/SpanDetails-xl9OjARI.js +0 -3
  864. package/langwatch/dist/client/assets/SubscriptionPage-85dxt08g.js +0 -2
  865. package/langwatch/dist/client/assets/SuiteFormDrawer-BYdeRl8R.js +0 -2
  866. package/langwatch/dist/client/assets/TabButton-BY-_E4cy.js +0 -3
  867. package/langwatch/dist/client/assets/TableCell-B6fYjFy7.js +0 -2
  868. package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-CTaJP17t.js +0 -2
  869. package/langwatch/dist/client/assets/TeamForm-DQIdGXFE.js +0 -2
  870. package/langwatch/dist/client/assets/TeamUserRoleField-UXHlsd5l.js +0 -2
  871. package/langwatch/dist/client/assets/TraceDetails-Bm1Ufstq.js +0 -9
  872. package/langwatch/dist/client/assets/TraceDetailsDrawer-BlZH_mba.js +0 -2
  873. package/langwatch/dist/client/assets/TraceIdPeek-By6CFB9R.js +0 -2
  874. package/langwatch/dist/client/assets/TracesMapping-QHyuw6AD.js +0 -2
  875. package/langwatch/dist/client/assets/UpgradeModal-BmLw5ONS.js +0 -92
  876. package/langwatch/dist/client/assets/UpgradeModalContent-C_lXaZaj.js +0 -2
  877. package/langwatch/dist/client/assets/UploadCSVDrawer-BKntPqbk.js +0 -3
  878. package/langwatch/dist/client/assets/VariablesSection-DnkttoMe.js +0 -2
  879. package/langwatch/dist/client/assets/VersionBadge-8Mh0h6z8.js +0 -2
  880. package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-fQIOpGM1.js +0 -1161
  881. package/langwatch/dist/client/assets/ViewAutomationDrawer-CPoifrwV.js +0 -2
  882. package/langwatch/dist/client/assets/VirtualKeySecretReveal-CKCq8oBA.js +0 -54
  883. package/langwatch/dist/client/assets/WelcomeLayout-B_rw1HA0.js +0 -2
  884. package/langwatch/dist/client/assets/WithFeatureFlagGuard-DwfApI3b.js +0 -2
  885. package/langwatch/dist/client/assets/WithPermissionGuard-BP1dFkpM.js +0 -2
  886. package/langwatch/dist/client/assets/WorkflowCard-B_SYXPpi.js +0 -2
  887. package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-D_fcHR54.js +0 -2
  888. package/langwatch/dist/client/assets/_...path_-Ipy6q2Lm.js +0 -2
  889. package/langwatch/dist/client/assets/_Uint8Array-B8b3z1r6.js +0 -2
  890. package/langwatch/dist/client/assets/__...path__-3xWAWxQ-.js +0 -22
  891. package/langwatch/dist/client/assets/_baseAssignValue-D7YNnh37.js +0 -2
  892. package/langwatch/dist/client/assets/_baseClone-o3pPcmbM.js +0 -2
  893. package/langwatch/dist/client/assets/_baseEach-CJ0DbEY4.js +0 -2
  894. package/langwatch/dist/client/assets/_baseFor-C04Mk-th.js +0 -2
  895. package/langwatch/dist/client/assets/_experiment_-DYMW8ia6.js +0 -2
  896. package/langwatch/dist/client/assets/_id_-B8SzykYR.js +0 -2
  897. package/langwatch/dist/client/assets/_id_-BT8l3_4N.js +0 -2
  898. package/langwatch/dist/client/assets/_id_-BTgcDKRo.js +0 -2
  899. package/langwatch/dist/client/assets/_id_-BrxUqiAK.js +0 -2
  900. package/langwatch/dist/client/assets/_id_-Cke69ccV.js +0 -2
  901. package/langwatch/dist/client/assets/_id_-CxtJm9qq.js +0 -2
  902. package/langwatch/dist/client/assets/_id_-DGNS0pL2.js +0 -2
  903. package/langwatch/dist/client/assets/_project_-CPYgRSe0.js +0 -8
  904. package/langwatch/dist/client/assets/_runId_-CnJnzVCf.js +0 -7
  905. package/langwatch/dist/client/assets/_shell-JRkk6wPs.js +0 -2
  906. package/langwatch/dist/client/assets/_slug_-D3cx1Thv.js +0 -17
  907. package/langwatch/dist/client/assets/_slug_-Dx0M4BvX.js +0 -2
  908. package/langwatch/dist/client/assets/_slug_-cRMpdOOA.js +0 -2
  909. package/langwatch/dist/client/assets/_team_-BW8SVrk-.js +0 -2
  910. package/langwatch/dist/client/assets/_workflow_-C35QPIPs.js +0 -25
  911. package/langwatch/dist/client/assets/_workflow_-DowL6naf.js +0 -3
  912. package/langwatch/dist/client/assets/accept-D3cDvj0y.js +0 -2
  913. package/langwatch/dist/client/assets/activity-CrGqZpWa.js +0 -1
  914. package/langwatch/dist/client/assets/agents-BNeoLDoj.js +0 -2
  915. package/langwatch/dist/client/assets/alerts-CrGqZpWa.js +0 -1
  916. package/langwatch/dist/client/assets/all-BHRNPEIX.js +0 -2
  917. package/langwatch/dist/client/assets/analytics-CZuaBlXL.js +0 -2
  918. package/langwatch/dist/client/assets/annotation-scores-CeAaT6zF.js +0 -2
  919. package/langwatch/dist/client/assets/annotations-CpkTmTvn.js +0 -2
  920. package/langwatch/dist/client/assets/anomaly-rules-BOLIh6OR.js +0 -2
  921. package/langwatch/dist/client/assets/api-keys-mK1aqQaM.js +0 -4
  922. package/langwatch/dist/client/assets/asaplangy-D_DeMaDk.js +0 -5
  923. package/langwatch/dist/client/assets/audit-log-CL6iYEbl.js +0 -2
  924. package/langwatch/dist/client/assets/auth-DWhhuKxO.js +0 -2
  925. package/langwatch/dist/client/assets/authentication-CvPvvVW6.js +0 -2
  926. package/langwatch/dist/client/assets/authorize-C1bDXq-Z.js +0 -2
  927. package/langwatch/dist/client/assets/authorize-xZkU_nXs.js +0 -2
  928. package/langwatch/dist/client/assets/automations-ChfL33YS.js +0 -2
  929. package/langwatch/dist/client/assets/automations-CrGqZpWa.js +0 -1
  930. package/langwatch/dist/client/assets/billing-plans-CXxmUM3Y.js +0 -2
  931. package/langwatch/dist/client/assets/blank-DFMnaDEJ.js +0 -2
  932. package/langwatch/dist/client/assets/blobs-D-pozzQX.js +0 -2
  933. package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3--iqoZYgE.js +0 -133
  934. package/langwatch/dist/client/assets/budgets-BAJ1tdYz.js +0 -3
  935. package/langwatch/dist/client/assets/bug-reports-DOqvPuTB.js +0 -2
  936. package/langwatch/dist/client/assets/cache-rules-DbITxirX.js +0 -2
  937. package/langwatch/dist/client/assets/choose-BSGQGAYS.js +0 -2
  938. package/langwatch/dist/client/assets/chunk-EX3LRPZG-B7fiWf8z.js +0 -232
  939. package/langwatch/dist/client/assets/chunk-FWX5IMBZ-CiS2XotT.js +0 -3
  940. package/langwatch/dist/client/assets/chunk-PUDLZKDR-_aske-8B.js +0 -157
  941. package/langwatch/dist/client/assets/chunk-RYQCIY6F-Bzb9D1UT.js +0 -2
  942. package/langwatch/dist/client/assets/chunk-V7JOEXUC-BNxgutMB.js +0 -207
  943. package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-GwNDfT24.js +0 -2
  944. package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-GwNDfT24.js +0 -2
  945. package/langwatch/dist/client/assets/codeAgentConfig-DWx3pMLC.js +0 -7
  946. package/langwatch/dist/client/assets/codingDefaultSync-C9Lev3y1.js +0 -2
  947. package/langwatch/dist/client/assets/configure-Coe_YM3c.js +0 -4
  948. package/langwatch/dist/client/assets/custom-Dpn85JW8.js +0 -12
  949. package/langwatch/dist/client/assets/custom_evaluator-DGAwXo2Z.js +0 -31
  950. package/langwatch/dist/client/assets/dagre-D7MBpcKV.js +0 -2
  951. package/langwatch/dist/client/assets/dagre-VKFMJZFB-COHUH3Np.js +0 -5
  952. package/langwatch/dist/client/assets/data-privacy-CtKFJ8SN.js +0 -2
  953. package/langwatch/dist/client/assets/data-retention-e5nryGvV.js +0 -2
  954. package/langwatch/dist/client/assets/datasets-JEoBpoYL.js +0 -2
  955. package/langwatch/dist/client/assets/debounce-KKoMEqvq.js +0 -2
  956. package/langwatch/dist/client/assets/defaultModelState-C4_m_XBI.js +0 -2
  957. package/langwatch/dist/client/assets/dejaview-BV4oU0up.js +0 -2
  958. package/langwatch/dist/client/assets/departments-BjNbKZtW.js +0 -2
  959. package/langwatch/dist/client/assets/devices-CaLokczo.js +0 -2
  960. package/langwatch/dist/client/assets/dist-BToT9Gni.js +0 -6
  961. package/langwatch/dist/client/assets/drawerFromUrl-Cpd3NvN0.js +0 -2
  962. package/langwatch/dist/client/assets/edit-BW6g7_XC.js +0 -62
  963. package/langwatch/dist/client/assets/email-suppressions-DYhLkUjt.js +0 -2
  964. package/langwatch/dist/client/assets/erDiagram-Q63AITRT-CBcweIHJ.js +0 -86
  965. package/langwatch/dist/client/assets/error-CmmaHju0.js +0 -2
  966. package/langwatch/dist/client/assets/evaluations-BX71jpba.js +0 -2
  967. package/langwatch/dist/client/assets/evaluations-C82dwzqH.js +0 -2
  968. package/langwatch/dist/client/assets/evaluators-CKOs_qOx.js +0 -146
  969. package/langwatch/dist/client/assets/evaluators-Cnp4esT5.js +0 -2
  970. package/langwatch/dist/client/assets/experiments-CzhcDWnc.js +0 -1
  971. package/langwatch/dist/client/assets/external-link-BzETHrAG.js +0 -2
  972. package/langwatch/dist/client/assets/feature-flags-Cl5NHQrK.js +0 -2
  973. package/langwatch/dist/client/assets/fetchSSE-DWKCnoHV.js +0 -3
  974. package/langwatch/dist/client/assets/fieldset-CE_IDQSv.js +0 -2
  975. package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-B2EV4X5b.js +0 -1
  976. package/langwatch/dist/client/assets/forgot-password-Bdtjps2K.js +0 -2
  977. package/langwatch/dist/client/assets/formatMoney-CI_YqDED.js +0 -2
  978. package/langwatch/dist/client/assets/foundry-DdJynGEa.js +0 -477
  979. package/langwatch/dist/client/assets/gateway-BvjtD98W.js +0 -2
  980. package/langwatch/dist/client/assets/getEvaluator-OH0w_5fd.js +0 -2
  981. package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-BB5SvhT3.js +0 -2
  982. package/langwatch/dist/client/assets/governance-DUSWlZID.js +0 -2
  983. package/langwatch/dist/client/assets/graphlib-Dn160vFe.js +0 -2
  984. package/langwatch/dist/client/assets/groups--YQRJnbz.js +0 -2
  985. package/langwatch/dist/client/assets/guardrails-_Jb3oZg3.js +0 -2
  986. package/langwatch/dist/client/assets/http-7YWbWWla.js +0 -7
  987. package/langwatch/dist/client/assets/identifierUtils-BuQJ50Jl.js +0 -2
  988. package/langwatch/dist/client/assets/immer-tl_oI9yy.js +0 -14
  989. package/langwatch/dist/client/assets/index-CUhcyBp3.js +0 -68
  990. package/langwatch/dist/client/assets/ingestion-source-detail-E-alCDhM.js +0 -19
  991. package/langwatch/dist/client/assets/ingestion-sources-APi2TUL6.js +0 -12
  992. package/langwatch/dist/client/assets/integrations-osNA42lv.js +0 -2
  993. package/langwatch/dist/client/assets/isArrayLikeObject-CJZEoMj_.js +0 -2
  994. package/langwatch/dist/client/assets/isSymbol-IFJb2-6T.js +0 -2
  995. package/langwatch/dist/client/assets/langyHomeSuggestions-B0_Fr3Q2.js +0 -2
  996. package/langwatch/dist/client/assets/latestAliases-BG98QtLZ.js +0 -2
  997. package/langwatch/dist/client/assets/license-Dbjlsvq9.js +0 -2
  998. package/langwatch/dist/client/assets/loadModelCatalog-CtqlQvVB.js +0 -2
  999. package/langwatch/dist/client/assets/map-DH6XyRvi.js +0 -2
  1000. package/langwatch/dist/client/assets/mappingValidation-oCsaOwz3.js +0 -2
  1001. package/langwatch/dist/client/assets/me-Bqm1rCwb.js +0 -2
  1002. package/langwatch/dist/client/assets/me-BxYTDdYk.js +0 -7
  1003. package/langwatch/dist/client/assets/members-C-RYfdOt.js +0 -2
  1004. package/langwatch/dist/client/assets/mermaid.core-CIOVe75m.js +0 -12
  1005. package/langwatch/dist/client/assets/messages-DSB9EzQc.js +0 -2
  1006. package/langwatch/dist/client/assets/metrics-C_DWHPhN.js +0 -2
  1007. package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-D9FhjenJ.js +0 -97
  1008. package/langwatch/dist/client/assets/model-costs-DHTDEPq7.js +0 -2
  1009. package/langwatch/dist/client/assets/model-providers-B5lYdYGB.js +0 -2
  1010. package/langwatch/dist/client/assets/modelProviderHelpers-DDoNJl7J.js +0 -2
  1011. package/langwatch/dist/client/assets/my-queue-DBUdNObC.js +0 -2
  1012. package/langwatch/dist/client/assets/normalizeComparison-CCZ-bOPv.js +0 -2
  1013. package/langwatch/dist/client/assets/not-found-1cA6pijP.js +0 -2
  1014. package/langwatch/dist/client/assets/now-Sx_cFlpx.js +0 -2
  1015. package/langwatch/dist/client/assets/onboarding-Brb1FAS4.js +0 -2
  1016. package/langwatch/dist/client/assets/online-evaluations-Di78dvHe.js +0 -2
  1017. package/langwatch/dist/client/assets/ops-BDrWqQb1.js +0 -2
  1018. package/langwatch/dist/client/assets/organizations-I7_fQcGq.js +0 -2
  1019. package/langwatch/dist/client/assets/pages-BowufdCe.js +0 -2
  1020. package/langwatch/dist/client/assets/persistence-ChzYQRy2.js +0 -2
  1021. package/langwatch/dist/client/assets/plans-DUiB6dWS.js +0 -2
  1022. package/langwatch/dist/client/assets/product-CLC45PiC.js +0 -2
  1023. package/langwatch/dist/client/assets/project-CO0U6_JZ.js +0 -2
  1024. package/langwatch/dist/client/assets/projections-yljzVGg_.js +0 -2
  1025. package/langwatch/dist/client/assets/projects-DbpxS5ex.js +0 -2
  1026. package/langwatch/dist/client/assets/promptHandle-BwdZsauS.js +0 -2
  1027. package/langwatch/dist/client/assets/prompts-DUxsvuSh.js +0 -8
  1028. package/langwatch/dist/client/assets/radio-group-DJFHT54R.js +0 -2
  1029. package/langwatch/dist/client/assets/registry-C3oFDiqP.js +0 -2
  1030. package/langwatch/dist/client/assets/reports-BQKkyGFY.js +0 -2
  1031. package/langwatch/dist/client/assets/request-CmAXw9Uw.js +0 -2
  1032. package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-D1dMWBTG.js +0 -85
  1033. package/langwatch/dist/client/assets/reset-password-CTK4_mwV.js +0 -2
  1034. package/langwatch/dist/client/assets/role-bindings-C6ZsuMgm.js +0 -2
  1035. package/langwatch/dist/client/assets/roles-BCVxn7jA.js +0 -2
  1036. package/langwatch/dist/client/assets/routing-policies-CRBbtcKU.js +0 -5
  1037. package/langwatch/dist/client/assets/scenarios-t3nGDwOk.js +0 -2
  1038. package/langwatch/dist/client/assets/scheduler-BLbmBCjU.js +0 -2
  1039. package/langwatch/dist/client/assets/schedules-CrGqZpWa.js +0 -1
  1040. package/langwatch/dist/client/assets/scim-Db5_4cCw.js +0 -2
  1041. package/langwatch/dist/client/assets/secrets-w56NYZDd.js +0 -2
  1042. package/langwatch/dist/client/assets/segment-group-BZ45xnHN.js +0 -2
  1043. package/langwatch/dist/client/assets/segmented-control-DD0HLoke.js +0 -2
  1044. package/langwatch/dist/client/assets/select-BVcV39WT.js +0 -2
  1045. package/langwatch/dist/client/assets/send-C4QAmSdY.js +0 -2
  1046. package/langwatch/dist/client/assets/sequenceView-BjWvujkI.js +0 -5
  1047. package/langwatch/dist/client/assets/seriesOptions-BYBEdexs.js +0 -1011
  1048. package/langwatch/dist/client/assets/settings-BLUJDHk_.js +0 -2
  1049. package/langwatch/dist/client/assets/setup-DZUDYG7y.js +0 -2
  1050. package/langwatch/dist/client/assets/shikiAdapter-S_u9TjIh.js +0 -3
  1051. package/langwatch/dist/client/assets/signin-DIBdy2xA.js +0 -2
  1052. package/langwatch/dist/client/assets/signup-CNRmYZe8.js +0 -2
  1053. package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-CvKHJ3lm.js +0 -2
  1054. package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-DAiJnxt-.js +0 -2
  1055. package/langwatch/dist/client/assets/subscription-DCXG9i3Z.js +0 -3
  1056. package/langwatch/dist/client/assets/subscriptions-vembyNSC.js +0 -2
  1057. package/langwatch/dist/client/assets/suggestionUI-CKer7JjV.js +0 -106
  1058. package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-BSx4-zBB.js +0 -3
  1059. package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-CiuP6lw7.js +0 -9
  1060. package/langwatch/dist/client/assets/switch-COTwlCOb.js +0 -2
  1061. package/langwatch/dist/client/assets/switch-vUOdjiD1.js +0 -2
  1062. package/langwatch/dist/client/assets/tabs-DdHsJkYS.js +0 -2
  1063. package/langwatch/dist/client/assets/teams-CNWyUErs.js +0 -2
  1064. package/langwatch/dist/client/assets/teams-DfkeiBlG.js +0 -2
  1065. package/langwatch/dist/client/assets/tool-catalog-Fz2CTXGX.js +0 -7
  1066. package/langwatch/dist/client/assets/toolIcons-8yYANIzS.js +0 -2
  1067. package/langwatch/dist/client/assets/tooltip-Croc0I6e.js +0 -2
  1068. package/langwatch/dist/client/assets/topic-clustering-BUhCtd-n.js +0 -2
  1069. package/langwatch/dist/client/assets/topics-DTHKQBbG.js +0 -2
  1070. package/langwatch/dist/client/assets/traceExecutor-apa7WEzU.js +0 -55
  1071. package/langwatch/dist/client/assets/traces-DHbPO8-r.js +0 -289
  1072. package/langwatch/dist/client/assets/tracesMapping-AU2q390i.js +0 -3
  1073. package/langwatch/dist/client/assets/tracking-2cJI_Hu7.js +0 -2
  1074. package/langwatch/dist/client/assets/types-CQ-IJ_jx.js +0 -2
  1075. package/langwatch/dist/client/assets/types-DV4H6wK9.js +0 -2
  1076. package/langwatch/dist/client/assets/types-PSz4yYPE.js +0 -2
  1077. package/langwatch/dist/client/assets/types-Qc1U0Lzq.js +0 -2
  1078. package/langwatch/dist/client/assets/unsubscribe-B7-aB2wW.js +0 -2
  1079. package/langwatch/dist/client/assets/usage-B56MHHfN.js +0 -2
  1080. package/langwatch/dist/client/assets/usage-BrFpMBrn.js +0 -2
  1081. package/langwatch/dist/client/assets/use-breakpoint-BTtibx4n.js +0 -2
  1082. package/langwatch/dist/client/assets/use-generic-onboarding-flow-eiutgTpm.js +0 -2
  1083. package/langwatch/dist/client/assets/useActivePlan-DZDUm8JK.js +0 -2
  1084. package/langwatch/dist/client/assets/useAllPromptsForProject-BY-Cnuhg.js +0 -2
  1085. package/langwatch/dist/client/assets/useAnnotationQueues-BWrpwDYN.js +0 -2
  1086. package/langwatch/dist/client/assets/useAvailableEvaluators-D7TbKINw.js +0 -2
  1087. package/langwatch/dist/client/assets/useCyclingVerb-Bp3m8dQc.js +0 -2
  1088. package/langwatch/dist/client/assets/useDepartmentColumn-DTsM9Nhy.js +0 -2
  1089. package/langwatch/dist/client/assets/useEvaluationsV3Store-KPEU27UA.js +0 -2
  1090. package/langwatch/dist/client/assets/useExportTraces-DK-tRqPq.js +0 -2
  1091. package/langwatch/dist/client/assets/useFeatureFlag-D9ikgDaE.js +0 -2
  1092. package/langwatch/dist/client/assets/useInviteActions-DyYvQrlw.js +0 -2
  1093. package/langwatch/dist/client/assets/useLicenseEnforcement-DRk7-NQ0.js +0 -2
  1094. package/langwatch/dist/client/assets/useLiteMemberGuard-klZnweA7.js +0 -43
  1095. package/langwatch/dist/client/assets/usePersonalContext-CrhmQYta.js +0 -2
  1096. package/langwatch/dist/client/assets/useProjectSpanNames-w6NW0Ct5.js +0 -2
  1097. package/langwatch/dist/client/assets/useProjectsForCopy-DxbxCEv5.js +0 -2
  1098. package/langwatch/dist/client/assets/useRunViaApiTabs-WzgJSfv2.js +0 -50
  1099. package/langwatch/dist/client/assets/useSavedViews-CNmeuzC3.js +0 -2
  1100. package/langwatch/dist/client/assets/useShowLangy-BvJ39ifH.js +0 -2
  1101. package/langwatch/dist/client/assets/useSimulationUpdateListener-Bu7hXXtv.js +0 -2
  1102. package/langwatch/dist/client/assets/useTargetName-VjbhYyp5.js +0 -2
  1103. package/langwatch/dist/client/assets/useTargetNameMap-CB8rbgsw.js +0 -2
  1104. package/langwatch/dist/client/assets/useTraceDetailsDrawer-BQRQYAwh.js +0 -2
  1105. package/langwatch/dist/client/assets/useTraceUpdateListener-DvzIDKvr.js +0 -2
  1106. package/langwatch/dist/client/assets/useUrlScopeFilter-u6ryUPSP.js +0 -2
  1107. package/langwatch/dist/client/assets/useWorkflowStore-PvyqdAIQ.js +0 -8
  1108. package/langwatch/dist/client/assets/users-B6_uecCc.js +0 -2
  1109. package/langwatch/dist/client/assets/users-BKSIVGOV.js +0 -2
  1110. package/langwatch/dist/client/assets/users-Cvlw527b.js +0 -2
  1111. package/langwatch/dist/client/assets/v3-D_vxEDZB.js +0 -2
  1112. package/langwatch/dist/client/assets/variables-fv0lgY95.js +0 -396
  1113. package/langwatch/dist/client/assets/viewStore-149qmWlN.js +0 -2
  1114. package/langwatch/dist/client/assets/virtual-keys-BrPMP91L.js +0 -2
  1115. package/langwatch/dist/client/assets/welcome-CvpidJSe.js +0 -16
  1116. package/langwatch/dist/client/assets/wizard-D3LrFT3o.js +0 -2
  1117. package/langwatch/dist/client/assets/workbench-YhI9hb4n.js +0 -2
  1118. package/langwatch/dist/client/assets/workflows-D66JEP8o.js +0 -3
  1119. package/langwatch/dist/client/assets/wrap-C4rzJqks.js +0 -2
  1120. package/langwatch/src/pages/settings/__tests__/model-providers.first-project.integration.test.tsx +0 -426
@@ -0,0 +1,1011 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-WNeJk3KQ.js","assets/rolldown-runtime-DAXXjFlN.js","assets/react-BUD3sqOU.js"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{d as n,en as r,i,n as a,r as o,t as s}from"./portal-FJIui2Z2.js";import{S as c}from"./shiki-CS25xJLQ.js";import{t as l}from"./jsx-runtime-CFwixLRt.js";import{t as u}from"./box-Ck5lef6C.js";import{t as d}from"./text-A3qvcMyN.js";import{Hn as f,Nn as p,Un as m,Vn as h,Wn as g,ir as _,nr as ee,rr as te,tr as v}from"./useLiteMemberGuard-ChV0lUs4.js";import{s as y,t as b}from"./select-C5JAM7Gf.js";import{n as x,t as ne}from"./info-CtYT35g4.js";import{t as re}from"./tooltip-CYWvZEOf.js";import{a as ie,d as ae,f as oe,i as se,m as ce,n as le,o as ue,p as de,r as fe,s as pe,t as me,u as he}from"./send-TZcuPW9Z.js";import{G as ge}from"./ExternalImage-As_YKOAz.js";import{t as _e}from"./external-link-CtHzR85H.js";import{t as ve}from"./icon-CkSWK_vf.js";import{a as S}from"./split-presence-props-lKjSaAa-.js";import{t as ye}from"./icon-button-Ce2kwA7j.js";import{a as C,n as be,r as w,t as xe}from"./field-Dz4Xmo3X.js";import{v as Se}from"./fetchSSE-GcVBzE9n.js";import{t as T}from"./h-stack-CMPhqSp5.js";import{n as Ce,r as we}from"./list-B9tuDjf4.js";import{nt as Te,rt as Ee,tt as De}from"./immer-BdlOHsfO.js";import{t as E}from"./v-stack-ClAMS101.js";import{t as Oe}from"./createLucideIcon-WbxVGt4j.js";import{t as ke}from"./mail-DbwjHsAx.js";import{t as Ae}from"./webhook-C2cYxZrt.js";import{n as je}from"./api-BK6L1im2.js";import{An as Me}from"./lu-DlSq9Be4.js";import{Ar as D,Cn as Ne,En as Pe,Qn as Fe,Tn as Ie,Un as Le,Vn as Re,_n as O,an as ze,bn as Be,fn as k,gn as Ve,in as A,jt as He,ln as Ue,t as We,un as j,wn as Ge,xn as M}from"./index-DtiounXP.js";import{t as Ke}from"./Markdown-CjWZDaeK.js";import{t as qe}from"./DatasetSelector-DnwaHRnP.js";import{t as Je}from"./next-dynamic-DcKsrHUa.js";import{t as Ye}from"./AddParticipants-Cu80BF8F.js";import{t as Xe}from"./segmented-control-SS4Yq_Ti.js";import{t as Ze}from"./seriesIdentifier-nW7BcYaa.js";function Qe(e){let t=new Map;return function(n,r){let i=n+(r?Object.entries(r).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(t.has(i))return t.get(i);let a=new e(n,r);return t.set(i,a),a}}var $e=Qe(Intl.Collator);function et(e){let{locale:t,...n}=e||{},r=$e(t||`en-US`,{usage:`search`,...n});function i(e){return e=e.normalize(`NFC`),r.resolvedOptions().ignorePunctuation&&(e=e.replace(/\p{P}/gu,``)),e}function a(e,t){return t.length===0?!0:(e=i(e),t=i(t),r.compare(e.slice(0,t.length),t)===0)}function o(e,t){return t.length===0?!0:(e=i(e),t=i(t),r.compare(e.slice(-t.length),t)===0)}function s(e,t){if(t.length===0)return!0;e=i(e),t=i(t);let n=0,a=t.length;for(;n+a<=e.length;n++){let i=e.slice(n,n+a);if(r.compare(t,i)===0)return!0}return!1}return{startsWith:a,endsWith:o,contains:s}}var N=e(t(),1);function tt(e){let t=n(),r=e.locale??t.locale;return(0,N.useMemo)(()=>et({...e,locale:r}),[r,e])}function nt(e){let{initialItems:t=[],filter:n,limit:r,...i}=e,[a,o]=(0,N.useState)(t),[s,c]=(0,N.useState)(``),l=S(e=>{o(e),c(``)}),u=(0,N.useRef)(i);u.current=i;let d=(0,N.useCallback)(e=>y({...u.current,items:e}),[]);return{collection:(0,N.useMemo)(()=>{let e=a;s&&n&&(e=d(a).filter((e,t,r)=>n(e,s,r)).items);let t=r==null?e:e.slice(0,r);return y({...u.current,items:t})},[a,s,n,r,d]),filter:S(e=>{c(e||``)}),set:S(e=>{l(e)}),reset:S(()=>{l(t)}),clear:S(()=>{l([])}),insert:S((e,...t)=>{let n=d(a).insert(e,...t).items;l(n)}),insertBefore:S((e,...t)=>{let n=d(a).insertBefore(e,...t).items;l(n)}),insertAfter:S((e,...t)=>{let n=d(a).insertAfter(e,...t).items;l(n)}),remove:S((...e)=>{let t=d(a).remove(...e).items;l(t)}),move:S((e,t)=>{let n=d(a).move(e,t).items;l(n)}),moveBefore:S((e,...t)=>{let n=d(a).moveBefore(e,...t).items;l(n)}),moveAfter:S((e,...t)=>{let n=d(a).moveAfter(e,...t).items;l(n)}),reorder:S((e,t)=>{let n=d(a).reorder(e,t).items;l(n)}),append:S((...e)=>{let t=d(a).append(...e).items;l(t)}),upsert:S((e,t,n=`append`)=>{let r=d(a).upsert(e,t,n).items;l(r)}),prepend:S((...e)=>{let t=d(a).prepend(...e).items;l(t)}),update:S((e,t)=>{let n=d(a).update(e,t).items;l(n)})}}var rt=Oe(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),it=[`immediate`,`5min_digest`,`15min_digest`,`hourly_digest`],at={immediate:`Immediate`,"5min_digest":`Every 5 minutes`,"15min_digest":`Every 15 minutes`,hourly_digest:`Every hour`},ot={immediate:0,"5min_digest":300*1e3,"15min_digest":900*1e3,hourly_digest:3600*1e3},st=3e4,ct=600*1e3,P=Pe(),F=l();function lt(){return{annotators:[]}}function ut(e){return e.annotators.length>0}function dt(e,t){let n=t.name||`(unnamed)`,r=e.annotators.length;return`${n} → ${r} annotator${r===1?``:`s`}`}function ft(e){let t=e.actionParams??{};return{annotators:Array.isArray(t.annotators)?t.annotators:[]}}function pt(e){return{annotators:e.annotators}}function mt({slice:e,onChange:t}){return(0,F.jsx)(Ye,{annotators:e.annotators,setAnnotators:n=>t({...e,annotators:typeof n==`function`?n(e.annotators):n}),queueDrawerOpen:{onOpen:()=>{},onClose:()=>{}},isTrigger:!0})}var ht={Icon:Le,initialSlice:lt,isComplete:ut,summary:dt,fromTriggerRow:ft,toActionParams:pt,ConfigForm:mt},I={SEND_EMAIL:`SEND_EMAIL`,ADD_TO_DATASET:`ADD_TO_DATASET`,ADD_TO_ANNOTATION_QUEUE:`ADD_TO_ANNOTATION_QUEUE`,SEND_SLACK_MESSAGE:`SEND_SLACK_MESSAGE`,SEND_WEBHOOK:`SEND_WEBHOOK`},gt=O({annotators:A(O({id:M(),name:M()})).min(1,`Add at least one annotator.`)}),_t={action:I.ADD_TO_ANNOTATION_QUEUE,category:`action`,label:`Add to annotation queue`,description:`Queue matched traces for a human to label.`,actionParamsSchema:gt},vt={mapping:{},expansions:[]},yt={trace_id:`trace_id`,timestamp:`timestamp`,input:`input`,question:`input`,user_input:`input`,output:`output`,answer:`output`,response:`output`,result:`output`,expected_output:`output`,total_cost:`metrics.total_cost`,contexts:`contexts.string_list`,spans:`spans`};function bt(e){let t=yt[e.toLowerCase()];return t?{source:t,key:``,subkey:``}:{source:`metadata`,key:e,subkey:``}}function xt(e){return{mapping:Object.fromEntries(e.map(e=>[e.name,bt(e.name)])),expansions:[]}}function St(e){if(!e)return[];let t=Se.safeParse(e.columnTypes);return t.success?t.data:[]}function Ct(e){return Object.keys(e.mapping).length>0}function wt(){return{datasetId:``,mapping:vt}}function Tt(e){return e.datasetId.length>0&&Ct(e.mapping)}function Et(e,t){return`${t.name||`(unnamed)`} → dataset ${e.datasetId||`(not chosen)`}`}function Dt(e){let t=e.actionParams??{};return{datasetId:typeof t.datasetId==`string`?t.datasetId:``,mapping:t.datasetMapping&&typeof t.datasetMapping==`object`&&`mapping`in t.datasetMapping?t.datasetMapping:vt}}function Ot(e){return{datasetId:e.datasetId,datasetMapping:e.mapping}}function kt({slice:e,onChange:t,ctx:n}){let r=je.dataset.getAll.useQuery({projectId:n.projectId},{enabled:!!n.projectId,refetchOnWindowFocus:!1}),i=n=>{let i=r.data?.find(e=>e.id===n);t({...e,datasetId:n,mapping:xt(St(i))})};return(0,N.useEffect)(()=>{if(!e.datasetId||Ct(e.mapping))return;let n=r.data?.find(t=>t.id===e.datasetId);if(!n)return;let i=xt(St(n));Ct(i)&&t({...e,mapping:i})},[e.datasetId,e.mapping,r.data]),(0,F.jsxs)(E,{align:`stretch`,gap:3,children:[(0,F.jsx)(qe,{datasets:r.data,localStorageDatasetId:e.datasetId,errors:{},setValue:(e,t)=>i(t),onCreateNew:()=>{}}),(0,F.jsx)(d,{color:`fg.muted`,textStyle:`xs`,children:`Columns map to the matching trace fields automatically; refine the mapping from the dataset view after creating.`})]})}var At={Icon:De,initialSlice:wt,isComplete:Tt,summary:Et,fromTriggerRow:Dt,toActionParams:Ot,ConfigForm:kt},jt=O({mapping:Be(O({source:M(),key:M().optional(),subkey:M().optional(),selectedFields:A(M()).optional()})),expansions:A(M()).default([])}),Mt=O({datasetId:M().min(1,`Pick a dataset to append matched traces to.`),datasetMapping:jt}),Nt={action:I.ADD_TO_DATASET,category:`action`,label:`Add to dataset`,description:`Append matched traces to a dataset for later evaluation.`,actionParamsSchema:Mt};function L({variables:e}){return(0,F.jsxs)(m,{openDelay:150,closeDelay:120,children:[(0,F.jsx)(g,{asChild:!0,children:(0,F.jsx)(r.button,{type:`button`,"aria-label":`Show available variables`,color:`fg.muted`,cursor:`help`,display:`inline-flex`,alignItems:`center`,bg:`transparent`,border:`none`,p:0,_hover:{color:`fg`},children:(0,F.jsx)(ne,{size:13})})}),(0,F.jsx)(s,{children:(0,F.jsx)(f,{children:(0,F.jsx)(h,{width:`340px`,padding:3,borderRadius:`lg`,background:`bg.panel`,boxShadow:`lg`,children:(0,F.jsxs)(E,{align:`stretch`,gap:2,maxHeight:`360px`,overflowY:`auto`,children:[(0,F.jsx)(d,{textStyle:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Available variables`}),e.map(e=>(0,F.jsxs)(u,{children:[(0,F.jsxs)(T,{gap:2,align:`baseline`,children:[(0,F.jsx)(d,{textStyle:`xs`,fontFamily:`mono`,fontWeight:`semibold`,children:e.path}),(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:e.type})]}),e.description?(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:e.description}):null]},e.path))]})})})})]})}function Pt(e){return Me({tag:`svg`,attr:{viewBox:`0 0 448 512`},child:[{tag:`path`,attr:{d:`M94.12 315.1c0 25.9-21.16 47.06-47.06 47.06S0 341 0 315.1c0-25.9 21.16-47.06 47.06-47.06h47.06v47.06zm23.72 0c0-25.9 21.16-47.06 47.06-47.06s47.06 21.16 47.06 47.06v117.84c0 25.9-21.16 47.06-47.06 47.06s-47.06-21.16-47.06-47.06V315.1zm47.06-188.98c-25.9 0-47.06-21.16-47.06-47.06S139 32 164.9 32s47.06 21.16 47.06 47.06v47.06H164.9zm0 23.72c25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06H47.06C21.16 243.96 0 222.8 0 196.9s21.16-47.06 47.06-47.06H164.9zm188.98 47.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06h-47.06V196.9zm-23.72 0c0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06V79.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06V196.9zM283.1 385.88c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06v-47.06h47.06zm0-23.72c-25.9 0-47.06-21.16-47.06-47.06 0-25.9 21.16-47.06 47.06-47.06h117.84c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06H283.1z`},child:[]}]})(e)}function R(e,t){let n=``;for(let r of e)n+=r===`
3
+ `?`
4
+ `:t;return n}function Ft(e,t){let n=!1,r=0;for(;r<t;){let t=e.charCodeAt(r);if(t===92&&n){r+=2;continue}t===34&&(n=!n),r++}return n}var It={capture:`endcapture`,comment:`endcomment`},Lt=RegExp(`^\\{%-?\\s*(${Object.keys(It).join(`|`)})\\b`);function Rt(e,t,n){let r=RegExp(`\\{%-?\\s*${n}\\s*-?%\\}`).exec(e.slice(t));return r?t+r.index+r[0].length:-1}function zt(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e.indexOf(`{{`,r),a=e.indexOf(`{%`,r),o=i===-1?a:a===-1?i:Math.min(i,a);if(o===-1){n+=e.slice(r);break}n+=e.slice(r,o);let s=o===i,c=s?`}}`:`%}`,l=e.indexOf(c,o+2);if(l===-1){n+=e.slice(o);break}let u=l+2,d=e.slice(o,u),f=u-o,p=s?null:Lt.exec(d);if(p){let i=It[p[1]],a=Rt(e,u,i);if(a!==-1){let i=e.slice(o,a);n+=R(i,` `),t.push({start:o,end:a,kind:`tag`}),r=a;continue}}let m;m=s?Ft(e,o)?R(d,`_`):f>=2&&!d.includes(`
5
+ `)?`"${`_`.repeat(f-2)}"`:R(d,` `):R(d,` `),n+=m,t.push({start:o,end:u,kind:s?`output`:`tag`}),r=u}return{substituted:n,liquidRanges:t}}var Bt={$schema:`http://json-schema.org/draft-07/schema#`,title:`Slack Block Kit (allowlisted subset)`,type:`array`,items:{oneOf:[{title:`section`,type:`object`,required:[`type`],additionalProperties:!1,properties:{type:{const:`section`},block_id:{type:`string`},text:{type:`object`,required:[`type`,`text`],properties:{type:{enum:[`mrkdwn`,`plain_text`]},text:{type:`string`},emoji:{type:`boolean`}}},fields:{type:`array`,items:{type:`object`,required:[`type`,`text`],properties:{type:{enum:[`mrkdwn`,`plain_text`]},text:{type:`string`}}}}}},{title:`divider`,type:`object`,required:[`type`],additionalProperties:!1,properties:{type:{const:`divider`},block_id:{type:`string`}}},{title:`context`,type:`object`,required:[`type`,`elements`],additionalProperties:!1,properties:{type:{const:`context`},block_id:{type:`string`},elements:{type:`array`,items:{type:`object`,required:[`type`,`text`],properties:{type:{enum:[`mrkdwn`,`plain_text`]},text:{type:`string`}}}}}},{title:`header`,type:`object`,required:[`type`,`text`],additionalProperties:!1,properties:{type:{const:`header`},block_id:{type:`string`},text:{type:`object`,required:[`type`,`text`],properties:{type:{const:`plain_text`},text:{type:`string`},emoji:{type:`boolean`}}}}},{title:`markdown`,type:`object`,required:[`type`,`text`],additionalProperties:!1,properties:{type:{const:`markdown`},block_id:{type:`string`},text:{type:`string`}}}]}},Vt=new Map;function Ht(e,t,n,r=[t]){Vt.set(t,{schema:n,fileMatch:r}),e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,allowComments:!1,schemas:Array.from(Vt.entries()).map(([e,t])=>({uri:`inmemory://schemas/${encodeURIComponent(e)}.schema.json`,fileMatch:t.fileMatch,schema:t.schema}))})}var z=`liquid`,B=`liquid-json`,Ut=`liquid-variables`,Wt=new Set([`true`,`false`,`nil`,`null`,`empty`,`blank`,`and`,`or`,`not`,`contains`,`if`,`unless`,`else`,`elsif`,`endif`,`endunless`,`for`,`endfor`,`in`,`assign`,`capture`,`endcapture`,`forloop`]),Gt=new Map,Kt=!1,qt=!1;function Jt(e){return e.split(/[.[]/)[0]??e}function Yt(e,t){Gt.set(e.uri.toString(),t)}function Xt(e){Gt.delete(e.uri.toString())}function Zt(e){return Gt.get(e.uri.toString())??[]}function Qt(e){if(Kt||=(e.languages.register({id:z}),e.languages.setMonarchTokensProvider(z,{tokenizer:{root:[[/\{\{/,{token:`delimiter.liquid`,next:`@output`}],[/\{%/,{token:`delimiter.liquid`,next:`@tag`}],[/[^{]+/,``],[/\{/,``]],output:[[/\}\}/,{token:`delimiter.liquid`,next:`@pop`}],[/\|/,`operator.liquid`],[/[a-zA-Z_][\w.]*/,`variable.liquid`],[/[^}]/,``]],tag:[[/%\}/,{token:`delimiter.liquid`,next:`@pop`}],[/\b(if|elsif|else|endif|unless|endunless|for|endfor|in|assign|capture|endcapture)\b/,`keyword.liquid`],[/[a-zA-Z_][\w.]*/,`variable.liquid`],[/[^%]/,``]]}}),e.languages.register({id:B}),e.languages.setLanguageConfiguration(B,{brackets:[[`{`,`}`],[`[`,`]`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`"`,close:`"`},{open:`{{`,close:` }}`},{open:`{%`,close:` %}`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`"`,close:`"`}]}),e.languages.setMonarchTokensProvider(B,{defaultToken:``,tokenPostfix:`.liquid-json`,keywords:[`true`,`false`,`null`],tokenizer:{root:[[/\{\{/,{token:`delimiter.liquid`,next:`@liquidOutput`}],[/\{%/,{token:`delimiter.liquid`,next:`@liquidTag`}],[/[{}\[\]]/,`@brackets`],[/[,:]/,`delimiter`],[/"/,{token:`string.quote`,next:`@string`}],[/-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+\-]?\d+)?/,`number`],[/[a-zA-Z_]\w*/,{cases:{"@keywords":`keyword`,"@default":``}}],[/\s+/,`white`]],string:[[/\{\{/,{token:`delimiter.liquid`,next:`@liquidOutput`}],[/\{%/,{token:`delimiter.liquid`,next:`@liquidTag`}],[/[^"\\{]+/,`string`],[/\\(?:[\\"/bfnrt]|u[0-9A-Fa-f]{4})/,`string.escape`],[/\\/,`string`],[/\{/,`string`],[/"/,{token:`string.quote`,next:`@pop`}]],liquidOutput:[[/\}\}/,{token:`delimiter.liquid`,next:`@pop`}],[/\|/,`operator.liquid`],[/[a-zA-Z_][\w.]*/,`variable.liquid`],[/[^}]/,``]],liquidTag:[[/%\}/,{token:`delimiter.liquid`,next:`@pop`}],[/\b(if|elsif|else|endif|unless|endunless|for|endfor|in|assign|capture|endcapture)\b/,`keyword.liquid`],[/[a-zA-Z_][\w.]*/,`variable.liquid`],[/[^%]/,``]]}}),!0),!qt){let t={triggerCharacters:[`.`,` `,`{`,`%`],provideCompletionItems:(t,n)=>{if(t.getLanguageId()===`liquid-json`){let e=t.getOffsetAt(n);if(!sn(t.getValue(),e))return null}let r=t.getLineContent(n.lineNumber).slice(0,n.column-1),i=/[\w.[\]]*$/.exec(r)?.[0]??``,a={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:n.column-i.length,endColumn:n.column},o=Zt(t).map(t=>({label:t.path,kind:e.languages.CompletionItemKind.Variable,insertText:t.path,range:a,detail:t.type,documentation:t.description?{value:t.description}:void 0})),s=[{label:`for m in matches`,kind:e.languages.CompletionItemKind.Snippet,insertText:`{% for m in matches %}
6
+ $0
7
+ {% endfor %}`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:a,detail:`Iterate matched traces`},{label:`if`,kind:e.languages.CompletionItemKind.Snippet,insertText:`{% if $1 %}
8
+ $0
9
+ {% endif %}`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:a,detail:`Conditional block`}];return{suggestions:[...o,...s]}}},n={provideHover:(e,t)=>{if(e.getLanguageId()===`liquid-json`){let n=e.getOffsetAt(t);if(!sn(e.getValue(),n))return null}let n=e.getWordAtPosition(t);if(!n)return null;let r=Zt(e).find(e=>Jt(e.path)===n.word);return r?{contents:[{value:`**${r.path}** — \`${r.type}\``},...r.description?[{value:r.description}]:[]]}:null}};for(let r of[z,B])e.languages.registerCompletionItemProvider(r,t),e.languages.registerHoverProvider(r,n);qt=!0}}function $t(e,t){for(let n of[/\{%-?\s*for\s+(\w+)\s+in\b/g,/\{%-?\s*assign\s+(\w+)\s*=/g,/\{%-?\s*capture\s+(\w+)\s*-?%\}/g]){let r;for(;(r=n.exec(e))!==null;)r[1]&&t.add(r[1])}}function en(e,t){let n=new Set(t.map(e=>Jt(e.path)));n.add(`forloop`),n.add(`matches`),$t(e,n);let r=[...n].sort(),i=[],a=/\{\{-?([\s\S]*?)-?\}\}/g,o;for(;(o=a.exec(e))!==null;){let e=o[1]??``,t=e.split(`|`)[0]?.trim()??``,a=/^[a-zA-Z_][\w]*(?:\.[\w]+|\[\d+\])*/.exec(t);if(!a)continue;let s=a[0],c=Jt(s);if(Wt.has(s)||Wt.has(c)||n.has(c))continue;let l=o[0].indexOf(e)+e.indexOf(t)+t.indexOf(s);i.push({root:c,token:s,index:o.index+l,knownRoots:r})}return i}function tn(e,t,n){let r=en(t.getValue(),n).map(n=>{let r=t.getPositionAt(n.index),i=t.getPositionAt(n.index+n.token.length);return{severity:e.MarkerSeverity.Warning,message:`Unknown variable "${n.root}". Known roots: ${n.knownRoots.join(`, `)}`,startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:i.lineNumber,endColumn:i.column}});e.editor.setModelMarkers(t,Ut,r)}function nn(e,t){e.editor.setModelMarkers(t,Ut,[])}var rn=`liquid-json-schema`;function an(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}var V=new Map,on=!1;function sn(e,t){let n=e.lastIndexOf(`{{`,t-1),r=e.lastIndexOf(`{%`,t-1),i=Math.max(n,r);if(i===-1)return!1;let a=i===n?`}}`:`%}`,o=e.indexOf(a,i+2);return o===-1||o>=t}var cn=[`"`,`:`,`,`,` `,`[`,`{`];function ln(e,t){let n=e.languages.CompletionItemKind;switch(t){case 6:return n.Variable;case 10:return n.Property;case 12:return n.Value;case 14:return n.Keyword;case 15:return n.Snippet;default:return n.Value}}function un(e){if(e)return typeof e==`string`?e:{value:e.value}}function dn(e){on||(on=!0,e.languages.registerCompletionItemProvider(B,{triggerCharacters:cn,provideCompletionItems:async(t,n)=>{let r=t.getOffsetAt(n);if(sn(t.getValue(),r))return null;let i=V.get(t.uri.toString());if(!i)return null;let a=e.Uri.parse(i);if(!e.editor.getModel(a))return null;let o=await(await e.languages.json.getWorker())(a);if(!o.doComplete)return null;let s=await o.doComplete(a.toString(),{line:n.lineNumber-1,character:n.column-1});if(!s?.items)return{suggestions:[]};let c=t.getWordUntilPosition(n),l={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:c.startColumn,endColumn:c.endColumn};return{suggestions:s.items.map(t=>{let n=t.textEdit?.range?{startLineNumber:t.textEdit.range.start.line+1,startColumn:t.textEdit.range.start.character+1,endLineNumber:t.textEdit.range.end.line+1,endColumn:t.textEdit.range.end.character+1}:l;return{label:t.label,kind:ln(e,t.kind),insertText:t.insertText??t.textEdit?.newText??t.label,insertTextRules:t.insertTextFormat===2?e.languages.CompletionItemInsertTextRule.InsertAsSnippet:void 0,sortText:t.sortText,filterText:t.filterText,detail:t.detail,documentation:un(t.documentation),range:n}})}}}),e.languages.registerHoverProvider(B,{provideHover:async(t,n)=>{let r=t.getOffsetAt(n);if(sn(t.getValue(),r))return null;let i=V.get(t.uri.toString());if(!i)return null;let a=e.Uri.parse(i),o=await(await e.languages.json.getWorker())(a);if(!o.doHover)return null;let s=await o.doHover(a.toString(),{line:n.lineNumber-1,character:n.column-1});return s?{contents:(Array.isArray(s.contents)?s.contents:[s.contents]).map(e=>e?typeof e==`string`?{value:e}:typeof e==`object`&&`value`in e?{value:String(e.value)}:null:null).filter(e=>e!==null)}:null}}))}function fn(e){let{monaco:t,realModel:n,schema:r,shadowUri:i}=e;Ht(t,i,r,[`**/${an(i)}`]);let a=t.Uri.parse(i),o=t.editor.getModel(a);o&&o.dispose();let s=zt(n.getValue()),c=t.editor.createModel(s.substituted,`json`,a);V.set(n.uri.toString(),i),dn(t);let l=()=>{let e=t.editor.getModelMarkers({resource:a}).map(e=>({severity:e.severity,message:e.message,startLineNumber:e.startLineNumber,startColumn:e.startColumn,endLineNumber:e.endLineNumber,endColumn:e.endColumn}));t.editor.setModelMarkers(n,rn,e)},u=t.editor.onDidChangeMarkers(e=>{e.some(e=>e.toString()===a.toString())&&l()}),d=n.onDidChangeContent(()=>{let e=zt(n.getValue());c.setValue(e.substituted)});return l(),{dispose:()=>{d.dispose(),u.dispose(),t.editor.setModelMarkers(n,rn,[]),V.delete(n.uri.toString()),c.isDisposed()||c.dispose()}}}var pn=`#1e1e1e`;function mn(e){return e===`vs-dark`?pn:`white`}function hn(e){let t=e.getDomNode();t&&t.addEventListener(`keydown`,e=>{e.key===`Escape`&&e.stopPropagation()},{capture:!0})}function gn(){let{colorMode:e}=He();return e===`dark`?`vs-dark`:`vs`}var _n=Je(()=>c(()=>import(`./dist-WNeJk3KQ.js`),__vite__mapDeps([0,1,2])),{ssr:!1,loading:()=>(0,F.jsx)(u,{padding:4,color:`fg.muted`,children:`Loading editor...`})});function vn({label:e,usingDefault:t,onReset:n,trailing:r}){return(0,F.jsxs)(T,{gap:2,children:[(0,F.jsx)(d,{textStyle:`sm`,fontWeight:`semibold`,children:e}),r,t?(0,F.jsx)(x,{size:`sm`,colorPalette:`gray`,children:`Using default`}):(0,F.jsx)(o,{size:`xs`,variant:`ghost`,onClick:n,children:`Reset to default`})]})}function yn({triggerLabel:e,hint:t,open:n,onToggle:i,children:a}){return(0,F.jsxs)(E,{align:`stretch`,gap:0,children:[(0,F.jsxs)(r.button,{type:`button`,onClick:i,"aria-expanded":n,display:`inline-flex`,alignItems:`center`,gap:1,width:`fit-content`,bg:`transparent`,border:`none`,cursor:`pointer`,color:`fg.muted`,_hover:{color:`fg`},children:[n?(0,F.jsx)(Ee,{size:14}):(0,F.jsx)(Te,{size:14}),(0,F.jsx)(d,{textStyle:`sm`,fontWeight:`medium`,children:e})]}),n?(0,F.jsxs)(E,{align:`stretch`,gap:2,pt:2,children:[t?(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:t}):null,a]}):null]})}var bn={minimap:{enabled:!1},fontSize:13,wordWrap:`on`,automaticLayout:!0,scrollBeyondLastLine:!1,lineNumbers:`off`,tabSize:2,padding:{top:12}};function H({value:e,onChange:t,variables:n,language:r=z,height:i=`200px`,jsonSchema:a,jsonSchemaShadowUri:o}){let s=r===`liquid`||r===`liquid-json`,c=gn(),l=(0,N.useRef)(null),d=(0,N.useRef)(null),f=(0,N.useRef)(null),p=(0,N.useRef)(null),[m,h]=N.useState(!1);return(0,N.useEffect)(()=>()=>{f.current?.dispose(),p.current?.dispose(),d.current&&Xt(d.current),l.current&&d.current&&nn(l.current,d.current)},[]),(0,N.useEffect)(()=>{p.current?.dispose(),p.current=null;let e=l.current,t=d.current;if(!(!m||!e||!t)&&!(!a||!o))return p.current=fn({monaco:e,realModel:t,schema:a,shadowUri:o}),()=>{p.current?.dispose(),p.current=null}},[m,a,o]),(0,F.jsx)(u,{border:`1px solid`,borderColor:`border`,borderRadius:`md`,overflow:`hidden`,height:i,background:mn(c),children:(0,F.jsx)(_n,{height:`100%`,language:r,value:e,theme:c,beforeMount:e=>{Qt(e)},onMount:(e,t)=>{l.current=t;let r=e.getModel();d.current=r,r&&Yt(r,n),s&&r&&tn(t,r,n),s&&(f.current=e.onDidChangeModelContent(()=>{let r=e.getModel();r&&tn(t,r,n)})),hn(e),h(!0)},onChange:e=>t(e??``),options:bn})})}function xn({subject:e,html:t,previewHeight:n=`220px`}){return(0,F.jsxs)(E,{align:`stretch`,gap:1,children:[(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`Subject`}),(0,F.jsx)(d,{fontWeight:`medium`,textStyle:`sm`,children:e}),(0,F.jsx)(u,{border:`1px solid`,borderColor:`border`,borderRadius:`md`,overflow:`hidden`,height:n,minHeight:`120px`,bg:`white`,css:{resize:`vertical`},children:(0,F.jsx)(`iframe`,{srcDoc:t,sandbox:``,title:`Email preview`,style:{width:`100%`,height:`100%`,border:`none`}})})]})}var Sn=`lwBlockKitBuilder`;function Cn({payload:e}){let t=(0,N.useMemo)(()=>{if(!(`blocks`in e))return null;let t=JSON.stringify({blocks:e.blocks});return`https://app.slack.com/block-kit-builder#${encodeURIComponent(t)}`},[e]),n=(0,N.useRef)(null);(0,N.useEffect)(()=>{if(!t)return;let e=n.current;if(e){if(e.closed){n.current=null;return}try{e.location.replace(t)}catch{}}},[t]);let r=()=>{t&&window.open(t,`_blank`,`noopener,noreferrer`)},i=()=>{if(!t)return;let e=n.current;if(e&&!e.closed){try{e.location.replace(t)}catch{}e.focus();return}let r=window.open(t,Sn,`width=1200,height=900`);if(r)try{r.opener=null}catch{}n.current=r};if(`text`in e)return(0,F.jsx)(wn,{text:e.text});let a=e.blocks.length;return(0,F.jsx)(u,{bg:`bg.subtle`,borderRadius:`md`,padding:4,border:`1px solid`,borderColor:`border`,children:(0,F.jsxs)(E,{align:`stretch`,gap:3,children:[(0,F.jsxs)(E,{align:`stretch`,gap:1,children:[(0,F.jsx)(d,{textStyle:`sm`,fontWeight:`semibold`,children:`Preview in Slack's Block Kit Builder`}),(0,F.jsxs)(d,{textStyle:`xs`,color:`fg.muted`,children:[a===1?`1 block ready to preview.`:`${a} blocks ready to preview.`,` `,`Block Kit renders differently than plain text, so preview where it will run.`]})]}),(0,F.jsxs)(T,{gap:2,align:`center`,flexWrap:`wrap`,children:[(0,F.jsx)(re,{content:`Preview your blocks in Slack's Block Kit Builder. Opens once in a new tab.`,positioning:{placement:`top`},children:(0,F.jsxs)(o,{size:`sm`,colorPalette:`orange`,variant:`outline`,onClick:r,children:[(0,F.jsx)(_e,{size:14}),` Open in Block Kit Builder`]})}),(0,F.jsx)(re,{content:`Live preview in Slack's Block Kit Builder. Updates as you edit.`,positioning:{placement:`top`},children:(0,F.jsxs)(o,{size:`sm`,colorPalette:`orange`,variant:`solid`,onClick:i,children:[(0,F.jsx)(rt,{size:14}),` Open synced Block Kit Builder`]})})]})]})})}function wn({text:e}){let t=(0,N.useMemo)(()=>Tn(e),[e]);return(0,F.jsxs)(u,{borderWidth:`1px`,borderColor:`border`,borderRadius:`lg`,overflow:`hidden`,bg:`bg.panel`,children:[(0,F.jsxs)(T,{gap:2,align:`center`,paddingX:3,paddingY:2,borderBottomWidth:`1px`,borderColor:`border`,bg:`bg.subtle`,children:[(0,F.jsx)(u,{color:`fg.muted`,children:(0,F.jsx)(Pt,{size:12})}),(0,F.jsx)(d,{textStyle:`xs`,fontWeight:`semibold`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`wide`,children:`Preview`}),(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`— how this message will appear in Slack`})]}),(0,F.jsx)(u,{padding:4,children:(0,F.jsx)(Ke,{children:t})})]})}function Tn(e){return e.replace(/<(https?:\/\/[^>|\s]+)\|([^>]+)>/g,(e,t,n)=>`[${n.trim()}](${t})`).replace(/(^|[^*\w])\*([^*\n][^*\n]*?[^*\n\s])\*(?=[^*\w]|$)/g,(e,t,n)=>`${t}**${n}**`).replace(/(^|[^*\w])\*([^*\s])\*(?=[^*\w]|$)/g,(e,t,n)=>`${t}**${n}**`).replace(/(^|[^~\w])~([^~\n][^~\n]*?[^~\n\s])~(?=[^~\w]|$)/g,(e,t,n)=>`${t}~~${n}~~`).replace(/([^\n])\n(?!\n)/g,`$1
10
+ `)}var En=`{% if trigger.alertType %}({{ trigger.alertType }}) {% endif %}Trigger - {{ trigger.name }}`,Dn=`# {% if trigger.alertType %}({{ trigger.alertType }}) {% endif %}{{ trigger.name }}
11
+
12
+ This automation fired against {% if matches.size == 1 %}a matching trace{% else %}{{ matches.size }} matching traces{% endif %}.
13
+ {% for m in matches %}{% if m.evaluation and m.evaluation.evaluatorName %}
14
+
15
+ **{{ m.evaluation.evaluatorName }}**{% if m.evaluation.score != null %} — score {{ m.evaluation.score }}{% endif %}{% if m.evaluation.label %} ({{ m.evaluation.label }}){% endif %}{% if m.evaluation.passed == false %} — **failed**{% endif %}
16
+ {% endif %}
17
+
18
+ **Input**
19
+ > {{ m.trace.input | truncate: 400 }}
20
+
21
+ **Output**
22
+ > {{ m.trace.output | truncate: 400 }}
23
+
24
+ [View matched trace ↗]({{ m.trace.url }})
25
+ {% endfor %}`,On=`{% if trigger.alertType == 'INFO' %}ℹ️{% elsif trigger.alertType == 'WARNING' %}⚠️{% elsif trigger.alertType == 'CRITICAL' %}🔴{% else %}🔔{% endif %} *{{ trigger.name }}*{% if trigger.alertType %} _({{ trigger.alertType }})_{% endif %}
26
+ {% for m in matches %}*Input:* {{ m.trace.input | truncate: 200 | mrkdwn_escape }}
27
+ *Output:* {{ m.trace.output | truncate: 200 | mrkdwn_escape }}{% if m.evaluation and m.evaluation.evaluatorName %}
28
+ *{{ m.evaluation.evaluatorName }}:*{% if m.evaluation.score != null %} {{ m.evaluation.score }}{% endif %}{% if m.evaluation.label %} ({{ m.evaluation.label | mrkdwn_escape }}){% endif %}{% endif %}
29
+ <{{ m.trace.url }}|View trace>{% unless forloop.last %}
30
+ {% endunless %}{% endfor %}`,kn=`[Alert] {{ trigger.name }} — {{ metric.label }} {{ condition.operatorLabel }} {{ condition.threshold }}`,An=`# [Alert] {{ trigger.name }}
31
+
32
+ **{{ metric.label }}** {{ condition.operatorLabel }} **{{ condition.threshold }}** over the {{ condition.timePeriodLabel }}.
33
+ {% if reason == "heartbeat-absence" %}
34
+ No qualifying data was seen in the window.
35
+ {% endif %}
36
+ Current value: **{{ currentValue }}**{% if previousValue != nil %} (was {{ previousValue }}){% endif %} — threshold: {{ condition.operatorLabel }} {{ condition.threshold }}.
37
+ {% if sparkline != "" %}
38
+ Trend: \`{{ sparkline }}\`
39
+ {% endif %}
40
+ [Open dashboard ↗]({{ graph.url }})`,jn=`:rotating_light: *{{ trigger.name | mrkdwn_escape }}*{% if trigger.alertType %} _({{ trigger.alertType }})_{% endif %}
41
+ *{{ metric.label | mrkdwn_escape }}* {{ condition.operatorLabel }} *{{ condition.threshold }}* over the {{ condition.timePeriodLabel }}.{% if reason == "heartbeat-absence" %}
42
+ No qualifying data was seen in the window.{% endif %}
43
+ Current value: *{{ currentValue }}*{% if previousValue != nil %} (was {{ previousValue }}){% endif %} — threshold: {{ condition.operatorLabel }} {{ condition.threshold }}.{% if sparkline != "" %}
44
+ Trend: \`{{ sparkline }}\`{% endif %}
45
+ <{{ graph.url }}|Open dashboard>`,Mn=`[
46
+ {
47
+ "type": "header",
48
+ "text": {
49
+ "type": "plain_text",
50
+ "text": {{ trigger.name | prepend: ":rotating_light: " | json }},
51
+ "emoji": true
52
+ }
53
+ },
54
+ {% if trigger.alertType %}
55
+ {
56
+ "type": "context",
57
+ "elements": [
58
+ { "type": "mrkdwn", "text": {{ trigger.alertType | prepend: "*Alert type:* " | json }} }
59
+ ]
60
+ },
61
+ {% endif %}
62
+ {%- capture _metric_line -%}*{{ metric.label | mrkdwn_escape }}* {{ condition.operatorLabel }} *{{ condition.threshold }}* over the {{ condition.timePeriodLabel }}.{%- endcapture -%}
63
+ {
64
+ "type": "section",
65
+ "text": { "type": "mrkdwn", "text": {{ _metric_line | json }} }
66
+ },
67
+ {%- capture _value_line -%}Current value: *{{ currentValue }}*{% if previousValue != nil %} (was {{ previousValue }}){% endif %} — threshold: {{ condition.operatorLabel }} {{ condition.threshold }}.{%- endcapture -%}
68
+ {
69
+ "type": "section",
70
+ "text": { "type": "mrkdwn", "text": {{ _value_line | json }} }
71
+ },
72
+ {% if sparkline != "" %}
73
+ {%- capture _trend_line -%}Trend: \`{{ sparkline }}\`{%- endcapture -%}
74
+ {
75
+ "type": "context",
76
+ "elements": [
77
+ { "type": "mrkdwn", "text": {{ _trend_line | json }} }
78
+ ]
79
+ },
80
+ {% endif %}
81
+ {%- capture _link -%}<{{ graph.url }}|Open dashboard>{%- endcapture -%}
82
+ {
83
+ "type": "context",
84
+ "elements": [
85
+ { "type": "mrkdwn", "text": {{ _link | json }} }
86
+ ]
87
+ },
88
+ {
89
+ "type": "divider"
90
+ },
91
+ {%- capture _footer_text -%}<{{ trigger.editUrl }}|Edit alert>{%- endcapture -%}
92
+ {
93
+ "type": "context",
94
+ "elements": [
95
+ { "type": "mrkdwn", "text": {{ _footer_text | json }} }
96
+ ]
97
+ }
98
+ ]`,Nn=`{
99
+ "event": "trigger.matched",
100
+ "trigger": { "id": {{ trigger.id | json }}, "name": {{ trigger.name | json }}{% if trigger.alertType %}, "alertType": {{ trigger.alertType | json }}{% endif %} },
101
+ "project": { "name": {{ project.name | json }}, "slug": {{ project.slug | json }} },
102
+ "digest": { "count": {{ digest.count | json }} },
103
+ "matches": [{% for m in matches %}
104
+ { "traceId": {{ m.trace.id | json }}, "url": {{ m.trace.url | json }},
105
+ "input": {{ m.trace.input | json }}, "output": {{ m.trace.output | json }} }{% unless forloop.last %},{% endunless %}{% endfor %}
106
+ ]
107
+ }`,Pn=`{
108
+ "event": "alert.fired",
109
+ "trigger": { "id": {{ trigger.id | json }}, "name": {{ trigger.name | json }}{% if trigger.alertType %}, "alertType": {{ trigger.alertType | json }}{% endif %} },
110
+ "project": { "name": {{ project.name | json }}, "slug": {{ project.slug | json }} },
111
+ "graph": { "name": {{ graph.name | json }}, "url": {{ graph.url | json }} },
112
+ "metric": { "label": {{ metric.label | json }} },
113
+ "condition": { "operator": {{ condition.operatorLabel | json }}, "threshold": {{ condition.threshold | json }}, "window": {{ condition.timePeriodLabel | json }} },
114
+ "currentValue": {{ currentValue | json }}{% if previousValue != nil %},
115
+ "previousValue": {{ previousValue | json }}{% endif %}
116
+ }`,Fn=`{
117
+ "event": "report.scheduled",
118
+ "trigger": { "id": {{ trigger.id | json }}, "name": {{ trigger.name | json }} },
119
+ "project": { "name": {{ project.name | json }}, "slug": {{ project.slug | json }} },
120
+ "report": { "source": {{ report.sourceLabel | json }}, "schedule": {{ report.scheduleLabel | json }}, "isEmpty": {{ report.isEmpty | json }} },
121
+ "traces": [{% for t in traces %}
122
+ { "traceId": {{ t.traceId | json }}, "url": {{ t.url | json }}, "input": {{ t.input | json }} }{% unless forloop.last %},{% endunless %}{% endfor %}
123
+ ],
124
+ "charts": [{% for chart in charts %}
125
+ { "title": {{ chart.title | json }}{% unless chart.isEmpty %}, "total": {{ chart.total | json }}{% endunless %} }{% unless forloop.last %},{% endunless %}{% endfor %}
126
+ ],
127
+ "viewUrl": {{ viewUrl | json }}
128
+ }`,In={emailSubject:kn,emailBody:An,slackString:jn,slackBlockKit:Mn,webhookBody:Pn},Ln=`[
129
+ {
130
+ "type": "header",
131
+ {%- capture _header_prefix -%}{% if trigger.alertType == 'INFO' %}ℹ️{% elsif trigger.alertType == 'WARNING' %}⚠️{% elsif trigger.alertType == 'CRITICAL' %}🔴{% else %}🔔{% endif %} {%- endcapture -%}
132
+ "text": {
133
+ "type": "plain_text",
134
+ "text": {{ trigger.name | prepend: _header_prefix | json }},
135
+ "emoji": true
136
+ }
137
+ },
138
+ {% if trigger.alertType %}
139
+ {
140
+ "type": "context",
141
+ "elements": [
142
+ { "type": "mrkdwn", "text": {{ trigger.alertType | prepend: "*Alert type:* " | json }} }
143
+ ]
144
+ },
145
+ {% endif %}
146
+ {% for m in matches %}
147
+ {
148
+ "type": "section",
149
+ "text": { "type": "mrkdwn", "text": {{ m.trace.input | truncate: 300 | mrkdwn_escape | prepend: "*Input:* " | json }} }
150
+ },
151
+ {
152
+ "type": "section",
153
+ "text": { "type": "mrkdwn", "text": {{ m.trace.output | truncate: 300 | mrkdwn_escape | prepend: "*Output:* " | json }} }
154
+ },
155
+ {% if m.evaluation and m.evaluation.evaluatorName %}
156
+ {
157
+ "type": "context",
158
+ "elements": [
159
+ { "type": "mrkdwn", "text": {{ m.evaluation.evaluatorName | prepend: "*" | append: "*" | json }} }{% if m.evaluation.score != null %},
160
+ { "type": "mrkdwn", "text": "score {{ m.evaluation.score }}" }{% endif %}{% if m.evaluation.label %},
161
+ { "type": "mrkdwn", "text": {{ m.evaluation.label | mrkdwn_escape | json }} }{% endif %}
162
+ ]
163
+ },
164
+ {% endif %}
165
+ {%- capture _trace_link -%}<{{ m.trace.url }}|View trace>{%- endcapture -%}
166
+ {
167
+ "type": "context",
168
+ "elements": [
169
+ { "type": "mrkdwn", "text": {{ _trace_link | json }} }
170
+ ]
171
+ },
172
+ {% endfor %}
173
+ {
174
+ "type": "divider"
175
+ },
176
+ {%- capture _footer_text -%}<{{ trigger.editUrl }}|Edit automation>{%- endcapture -%}
177
+ {
178
+ "type": "context",
179
+ "elements": [
180
+ { "type": "mrkdwn", "text": {{ _footer_text | json }} }
181
+ ]
182
+ }
183
+ ]`,Rn={emailSubject:En,emailBody:Dn,slackString:On,slackBlockKit:Ln,webhookBody:Nn},zn=`[Report] {{ trigger.name }} — {{ report.scheduleLabel }}`,Bn=`# {{ trigger.name }}
184
+
185
+ {{ report.sourceLabel }} · {{ report.scheduleLabel }}.
186
+ {% if report.isEmpty %}
187
+ Nothing to show for this period.
188
+ {% else %}{% for t in traces %}- [{{ t.traceId }}]({{ t.url }}) — {{ t.input }} _({{ t.model }} · \${{ t.costUsd | round: 4 }} · {{ t.durationMs | round: 0 }} ms)_
189
+ {% endfor %}{% for chart in charts %}- **{{ chart.title }}** — {% if chart.isEmpty %}no data{% else %}{{ chart.total | round: 2 }}{% endif %}
190
+ {% endfor %}{% endif %}
191
+ [View in LangWatch ↗]({{ viewUrl }})`,U=10,Vn={emailSubject:zn,emailBody:Bn,slackString:`:bar_chart: *{{ trigger.name | mrkdwn_escape }}*
192
+ {{ report.sourceLabel | mrkdwn_escape }} · {{ report.scheduleLabel }}{% if report.isEmpty %}
193
+ _Nothing to show for this period._{% else %}
194
+ {% for t in traces limit: ${U} %}• <{{ t.url }}|{{ t.traceId }}> {{ t.input | mrkdwn_escape }}
195
+ {% endfor %}{% if traces.size > ${U} %}_…and {{ traces.size | minus: ${U} }} more_
196
+ {% endif %}{% for chart in charts limit: ${U} %}• *{{ chart.title | mrkdwn_escape }}* — {% if chart.isEmpty %}_no data_{% else %}{{ chart.total | round: 2 }}{% endif %}
197
+ {% endfor %}{% if charts.size > ${U} %}_…and {{ charts.size | minus: ${U} }} more_
198
+ {% endif %}{% endif %}
199
+ <{{ viewUrl }}|View in LangWatch>`,slackBlockKit:`[
200
+ {
201
+ "type": "header",
202
+ "text": { "type": "plain_text", "text": {{ trigger.name | prepend: ":bar_chart: " | json }}, "emoji": true }
203
+ },
204
+ {%- capture _sub -%}{{ report.sourceLabel }} · {{ report.scheduleLabel }}{%- endcapture -%}
205
+ {
206
+ "type": "section",
207
+ "text": { "type": "mrkdwn", "text": {{ _sub | json }} }
208
+ },
209
+ {%- if report.isEmpty -%}
210
+ {
211
+ "type": "section",
212
+ "text": { "type": "mrkdwn", "text": "_Nothing to show for this period._" }
213
+ },
214
+ {%- else -%}
215
+ {%- capture _rows -%}{% for t in traces limit: ${U} %}• <{{ t.url }}|{{ t.traceId }}> {{ t.input | mrkdwn_escape }}
216
+ {% endfor %}{% if traces.size > ${U} %}_…and {{ traces.size | minus: ${U} }} more_
217
+ {% endif %}{% for chart in charts limit: ${U} %}• *{{ chart.title | mrkdwn_escape }}* — {% if chart.isEmpty %}_no data_{% else %}{{ chart.total | round: 2 }}{% endif %}
218
+ {% endfor %}{% if charts.size > ${U} %}_…and {{ charts.size | minus: ${U} }} more_
219
+ {% endif %}{%- endcapture -%}
220
+ {
221
+ "type": "section",
222
+ "text": { "type": "mrkdwn", "text": {{ _rows | json }} }
223
+ },
224
+ {%- endif -%}
225
+ {
226
+ "type": "context",
227
+ "elements": [{ "type": "mrkdwn", "text": {{ viewUrl | prepend: "<" | append: "|View in LangWatch>" | json }} }]
228
+ }
229
+ ]`,webhookBody:Fn};function Hn(e){switch(e){case`graphAlert`:return In;case`report`:return Vn;case`trace`:return Rn}}var Un=[{traceId:`trace_2x9fK3aQ`,input:`What is the capital of France?`,output:`The capital of France is Paris.`,metadata:{customer_id:`cust_123`,topic:`geography`},evaluation:{score:.92,passed:!0,label:`relevant`,evaluatorName:`Answer Relevancy`}}],Wn=[{path:`trigger.id`,type:`string`,description:`Stable identifier of the automation.`},{path:`trigger.name`,type:`string`,description:`The automation's configured name.`},{path:`trigger.alertType`,type:`'INFO' | 'WARNING' | 'CRITICAL' | null`,description:`Severity label, or null if unset.`},{path:`trigger.editUrl`,type:`string`,description:`Deep link to this automation's edit page.`},{path:`project.name`,type:`string`,description:`Human-readable project name.`},{path:`project.slug`,type:`string`,description:`URL-safe project slug.`},{path:`project.url`,type:`string`,description:`Absolute URL to the project home.`},{path:`digest.count`,type:`number`,description:`1 for immediate cadence; N for a digest.`},{path:`digest.windowStart`,type:`string | null`,description:`ISO-8601 — only set for digest cadences.`},{path:`digest.windowEnd`,type:`string | null`,description:`ISO-8601 — only set for digest cadences.`},{path:`matches`,type:`TemplateMatchVars[]`,description:"Canonical iteration surface. Immediate dispatch has length 1, a digest has N — iterate with `{% for m in matches %}` and the same template handles both."},{path:`match.trace.id`,type:`string | null`,description:`Trace ID that matched the conditions.`},{path:`match.trace.input`,type:`string`,description:`Captured input of the matched trace.`},{path:`match.trace.output`,type:`string`,description:`Captured output of the matched trace.`},{path:`match.trace.url`,type:`string`,description:`Deep link to the matched trace.`},{path:`match.trace.metadata`,type:`object`,description:`Trace metadata as a key/value object.`},{path:`match.evaluation.score`,type:`number | null`,description:`Evaluation score, when the trigger is evaluation-bound.`},{path:`match.evaluation.passed`,type:`boolean | null`,description:`Evaluation passed/failed verdict.`},{path:`match.evaluation.label`,type:`string | null`,description:`Optional evaluation label.`},{path:`match.evaluation.evaluatorName`,type:`string | null`,description:`Display name of the evaluator that ran.`}];function Gn(e,t){return t===`digest`?e:e.filter(e=>e.path!==`digest.windowStart`&&e.path!==`digest.windowEnd`)}function Kn({onTestFire:e,loading:t,disabled:n,hint:r}){return e?(0,F.jsxs)(T,{gap:2,children:[(0,F.jsxs)(o,{size:`xs`,variant:`outline`,width:`fit-content`,loading:t,disabled:n,onClick:e,children:[(0,F.jsx)(ve,{boxSize:3,children:(0,F.jsx)(me,{})}),`Send a test`]}),r?(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:r}):null]}):null}var qn=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Jn=O({members:A(M().regex(qn,`Invalid email address`)).min(1,`Add at least one recipient.`)}),Yn={action:I.SEND_EMAIL,category:`notify`,label:`Email`,description:`Send an email to one or more team members or external recipients.`,actionParamsSchema:Jn},Xn={value:``,usingDefault:!0};function Zn(){return{members:[],subject:Xn,body:Xn}}function Qn(e){return e.members.length>0}function $n(e,t){let n=t.name||`(unnamed)`,r=e.members.length;return`${n} → email to ${r} recipient${r===1?``:`s`}`}function er(e){let t=e.actionParams??{};return{members:Array.isArray(t.members)?t.members:[],subject:{value:e.emailSubjectTemplate??``,usingDefault:e.emailSubjectTemplate==null},body:{value:e.emailBodyTemplate??``,usingDefault:e.emailBodyTemplate==null}}}function tr(e){return{members:e.members}}function nr(e){return{webhook:null}}function rr(e){return{emailSubjectTemplate:e.subject.usingDefault?null:e.subject.value,emailBodyTemplate:e.body.usingDefault?null:e.body.value,slackTemplate:null,slackTemplateType:null}}function ir({slice:e,onChange:t,ctx:n}){let r=je.team.getTeamWithMembers.useQuery({slug:n.teamSlug??``,organizationId:n.organizationId??``},{enabled:!!n.teamSlug&&!!n.organizationId}),i=(0,N.useMemo)(()=>(r.data?.members??[]).map(e=>e.user.email).filter(e=>typeof e==`string`),[r.data]),a=(0,N.useMemo)(()=>new Set(i),[i]),s=(0,N.useMemo)(()=>e.members.filter(e=>!a.has(e)),[e.members,a]),[c,l]=(0,N.useState)(``),[f,p]=(0,N.useState)(null),m=(n,r)=>{let i=r?[...e.members,n]:e.members.filter(e=>e!==n);t({...e,members:i})},h=()=>{let n=c.trim();if(n){if(!qn.test(n)){p(`That doesn't look like a valid email address.`);return}if(e.members.includes(n)){p(`Already on the recipient list.`);return}t({...e,members:[...e.members,n]}),l(``),p(null)}},g=n=>{t({...e,members:e.members.filter(e=>e!==n)})},_=Hn(n.sourceKind),ee=e.subject.usingDefault?_.emailSubject:e.subject.value,te=e.body.usingDefault?_.emailBody:e.body.value,v=n.preview,y=(0,N.useMemo)(()=>Gn(n.variables,n.cadenceMode),[n.variables,n.cadenceMode]),[b,ne]=(0,N.useState)(!e.subject.usingDefault||!e.body.usingDefault);return(0,F.jsxs)(E,{align:`stretch`,gap:4,children:[(0,F.jsxs)(C,{children:[(0,F.jsx)(w,{children:`Recipients`}),(0,F.jsx)(E,{align:`stretch`,gap:1,children:i.length===0?(0,F.jsx)(d,{color:`fg.muted`,textStyle:`sm`,children:`No team members found.`}):i.map(t=>(0,F.jsxs)(T,{as:`label`,cursor:`pointer`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:e.members.includes(t),onChange:e=>m(t,e.target.checked),"aria-label":`Send to ${t}`}),(0,F.jsx)(d,{children:t})]},t))})]}),(0,F.jsxs)(u,{children:[(0,F.jsx)(d,{textStyle:`xs`,fontWeight:`semibold`,color:`fg.muted`,mb:2,children:`External recipients`}),s.length===0?(0,F.jsx)(d,{textStyle:`sm`,color:`fg.muted`,mb:2,children:`None yet.`}):(0,F.jsx)(E,{align:`stretch`,gap:1,mb:2,children:s.map(e=>(0,F.jsxs)(T,{children:[(0,F.jsx)(d,{flex:`1`,minWidth:`0`,children:e}),(0,F.jsx)(x,{size:`sm`,colorPalette:`orange`,title:`This address is outside your team. The trigger payload — trace input, output, metadata — will leave your org.`,children:`External`}),(0,F.jsx)(o,{size:`xs`,variant:`ghost`,onClick:()=>g(e),"aria-label":`Remove ${e}`,children:(0,F.jsx)(Re,{size:14})})]},e))}),(0,F.jsxs)(T,{children:[(0,F.jsx)(D,{value:c,placeholder:`alerts@partner.com`,onChange:e=>{l(e.target.value),p(null)},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),h())}}),(0,F.jsx)(o,{variant:`outline`,onClick:h,disabled:!c.trim(),children:`Add email`})]}),f?(0,F.jsx)(d,{textStyle:`xs`,color:`fg.error`,mt:1,children:f}):null]}),(0,F.jsx)(Kn,{onTestFire:n.onTestFire,loading:n.testFireLoading,disabled:!Qn(e),hint:Qn(e)?void 0:`Add a recipient first`}),(0,F.jsxs)(E,{align:`stretch`,gap:2,children:[(0,F.jsx)(d,{textStyle:`sm`,fontWeight:`semibold`,children:`Message`}),(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`We send a ready-made summary email. Customize the wording to change the subject or body.`}),(0,F.jsxs)(yn,{triggerLabel:`Customize wording`,open:b,onToggle:()=>ne(e=>!e),children:[(0,F.jsx)(vn,{label:`Subject`,usingDefault:e.subject.usingDefault,onReset:()=>t({...e,subject:Xn}),trailing:(0,F.jsx)(L,{variables:y})}),(0,F.jsx)(u,{"data-testid":`email-subject-editor`,children:(0,F.jsx)(H,{variables:y,height:`56px`,value:ee,onChange:n=>t({...e,subject:{value:n,usingDefault:!1}})})}),(0,F.jsx)(vn,{label:`Body (Markdown + Liquid)`,usingDefault:e.body.usingDefault,onReset:()=>t({...e,body:Xn}),trailing:(0,F.jsx)(L,{variables:y})}),(0,F.jsx)(u,{"data-testid":`email-body-editor`,children:(0,F.jsx)(H,{variables:y,height:`520px`,value:te,onChange:n=>t({...e,body:{value:n,usingDefault:!1}})})})]})]}),v?(0,F.jsx)(xn,{subject:v.subject,html:v.html,previewHeight:`520px`}):null]})}var ar={Icon:ke,channel:`email`,initialSlice:Zn,isComplete:Qn,summary:$n,fromTriggerRow:er,toActionParams:tr,testFireTarget:nr,templatesFromSlice:rr,ConfigForm:ir};j([`string`,`block_kit`]);var or=j([`webhook`,`bot`]),sr=`__kept__`,cr=O({slackDelivery:or.optional(),slackWebhook:M().optional(),slackBotToken:M().optional(),slackChannelId:M().optional(),slackBotTokenSet:ze().optional()}).superRefine((e,t)=>{if((e.slackDelivery??`webhook`)===`webhook`){let n=e.slackWebhook?.trim();n?n.startsWith(`https://hooks.slack.com/`)||t.addIssue({code:`custom`,message:`Expected a Slack incoming webhook URL (https://hooks.slack.com/…).`,path:[`slackWebhook`]}):t.addIssue({code:`custom`,message:`A Slack incoming webhook URL is required.`,path:[`slackWebhook`]})}else e.slackChannelId?.trim()||t.addIssue({code:`custom`,message:`A Slack channel is required for a bot connection.`,path:[`slackChannelId`]})});function lr(e){return e.slackDelivery??`webhook`}var ur={action:I.SEND_SLACK_MESSAGE,category:`notify`,label:`Slack`,description:`Post a message to a Slack webhook when a trace matches.`,alertDescription:`Post a message to a Slack webhook when the alert fires.`,actionParamsSchema:cr},dr=`{%- capture _see_all_url -%}
230
+ {{ project.url }}/messages?startDate={{ digest.windowStart | url_encode }}&endDate={{ digest.windowEnd | url_encode }}
231
+ {%- endcapture -%}
232
+ {%- capture _window_label -%}
233
+ {%- if digest.windowStart -%}{{ digest.windowStart | date: "%H:%M" }}–{{ digest.windowEnd | date: "%H:%M %Z" }}{%- endif -%}
234
+ {%- endcapture -%}
235
+ {%- capture _summary -%}
236
+ *{{ digest.count }}* match{% if digest.count != 1 %}es{% endif %}{% if _window_label != "" %} · {{ _window_label }}{% endif %}
237
+ {%- endcapture -%}
238
+ [
239
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | prepend: "📊 " | truncate: 140 | json }}, "emoji": true } },
240
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _summary | json }} }] },
241
+ { "type": "divider" }
242
+ {%- for m in matches limit: 10 -%}
243
+ {%- capture _row -%}
244
+ {%- if m.evaluation %}\`{{ m.evaluation.score | default: "—" }}\` *{{ m.evaluation.evaluatorName | default: "eval" | mrkdwn_escape }}* · {% endif -%}
245
+ _{{ m.trace.input | truncate: 120 | mrkdwn_escape }}_ · <{{ m.trace.url }}|↗>
246
+ {%- endcapture -%}
247
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": {{ _row | json }} } }
248
+ {%- endfor -%}
249
+ {%- capture _more_label -%}
250
+ {%- if digest.count > 10 %}See all {{ digest.count }} matches in LangWatch ↗{%- else -%}View these matches in LangWatch ↗{%- endif -%}
251
+ {%- endcapture -%}
252
+ {%- capture _more -%}
253
+ <{{ _see_all_url }}|{{ _more_label }}>
254
+ {%- endcapture -%}
255
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _more | json }} }] }
256
+ ]
257
+ `,fr=`{%- capture _see_all_url -%}
258
+ {{ project.url }}/messages?startDate={{ digest.windowStart | url_encode }}&endDate={{ digest.windowEnd | url_encode }}
259
+ {%- endcapture -%}
260
+ {%- capture _window_label -%}
261
+ {%- if digest.windowStart -%}{{ digest.windowStart | date: "%H:%M" }}–{{ digest.windowEnd | date: "%H:%M %Z" }}{%- endif -%}
262
+ {%- endcapture -%}
263
+ {%- capture _summary -%}
264
+ *{{ digest.count }}* match{% if digest.count != 1 %}es{% endif %}{% if _window_label != "" %} · {{ _window_label }}{% endif %}
265
+ {%- endcapture -%}
266
+ {%- assign _groups = matches | group_by: "evaluation.evaluatorName" -%}
267
+ {%- capture _segments -%}
268
+ {%- for g in _groups limit: 12 -%}
269
+ {% unless forloop.first %},{% endunless %}{ "label": {{ g.name | default: "Other" | truncate: 20 | json }}, "value": {{ g.items.size }} }
270
+ {%- endfor -%}
271
+ {%- endcapture -%}
272
+ [
273
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | prepend: "📈 " | truncate: 140 | json }}, "emoji": true } },
274
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _summary | json }} }] }
275
+ {%- if _groups.size > 0 -%}
276
+ ,{ "type": "data_visualization", "block_id": "matches_by_evaluator", "title": "Matches by evaluator", "chart": { "type": "pie", "segments": [ {{ _segments }} ] } }
277
+ {%- endif -%}
278
+ ,{ "type": "divider" }
279
+ {%- for g in _groups -%}
280
+ {%- capture _row -%}
281
+ *{{ g.name | default: "Other matches" | mrkdwn_escape }}* — {{ g.items.size }} match{% if g.items.size != 1 %}es{% endif %}
282
+ {%- endcapture -%}
283
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": {{ _row | json }} } }
284
+ {%- endfor -%}
285
+ {%- capture _more -%}
286
+ <{{ _see_all_url }}|See all {{ digest.count }} matches in LangWatch ↗>
287
+ {%- endcapture -%}
288
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _more | json }} }] }
289
+ ]
290
+ `,pr=`{%- capture _see_all_url -%}
291
+ {{ project.url }}/messages?startDate={{ digest.windowStart | url_encode }}&endDate={{ digest.windowEnd | url_encode }}
292
+ {%- endcapture -%}
293
+ {%- capture _window_label -%}
294
+ {%- if digest.windowStart -%}{{ digest.windowStart | date: "%H:%M" }}–{{ digest.windowEnd | date: "%H:%M %Z" }}{%- endif -%}
295
+ {%- endcapture -%}
296
+ {%- capture _summary -%}
297
+ *{{ digest.count }}* match{% if digest.count != 1 %}es{% endif %}{% if _window_label != "" %} · {{ _window_label }}{% endif %}
298
+ {%- endcapture -%}
299
+ {%- assign _sliced = matches | slice: 0, 6 -%}
300
+ {%- assign _groups = _sliced | group_by: "evaluation.evaluatorName" -%}
301
+ [
302
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | prepend: "📊 " | truncate: 140 | json }}, "emoji": true } },
303
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _summary | json }} }] }
304
+ {%- for g in _groups -%}
305
+ ,{ "type": "divider" }
306
+ {%- capture _grp -%}
307
+ *{{ g.name | default: "Other" | mrkdwn_escape }}* · {{ g.items.size }} match{% if g.items.size != 1 %}es{% endif %}
308
+ {%- endcapture -%}
309
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _grp | json }} }] }
310
+ {%- for m in g.items -%}
311
+ {%- capture _title -%}
312
+ {% if m.evaluation.score != null %}\`{{ m.evaluation.score }}\` {% endif %}*{{ m.trace.metadata.model | default: "trace" | mrkdwn_escape }}* · <{{ m.trace.url }}|\`{{ m.trace.id | truncate: 12 }}\` ↗>
313
+ {%- endcapture -%}
314
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": {{ _title | json }} } }
315
+ {%- assign _i = m.trace.input | truncate: 600 -%}
316
+ {%- assign _o = m.trace.output | truncate: 600 -%}
317
+ {%- capture _rt -%}
318
+ {%- if _i != "" -%}
319
+ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Input", "style": { "bold": true } }] },
320
+ { "type": "rich_text_quote", "elements": [{ "type": "text", "text": {{ _i | json }} }] }
321
+ {%- endif -%}
322
+ {%- if _i != "" and _o != "" -%},{%- endif -%}
323
+ {%- if _o != "" -%}
324
+ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Output", "style": { "bold": true } }] },
325
+ { "type": "rich_text_quote", "elements": [{ "type": "text", "text": {{ _o | json }} }] }
326
+ {%- endif -%}
327
+ {%- endcapture -%}
328
+ {%- if _rt != "" -%}
329
+ ,{ "type": "rich_text", "elements": [ {{ _rt }} ] }
330
+ {%- endif -%}
331
+ {%- endfor -%}
332
+ {%- endfor -%}
333
+ {%- if digest.count > 6 -%}
334
+ ,{ "type": "divider" }
335
+ {%- capture _more -%}
336
+ <{{ _see_all_url }}|See all {{ digest.count }} matches in LangWatch ↗>
337
+ {%- endcapture -%}
338
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _more | json }} }] }
339
+ {%- endif -%}
340
+ ]
341
+ `,mr=`{%- capture _summary -%}
342
+ {{ digest.count }} match{% if digest.count != 1 %}es{% endif %}{% if digest.windowStart %} · window {{ digest.windowStart | date: "%H:%M" }}–{{ digest.windowEnd | date: "%H:%M" }}{% endif %}
343
+ {%- endcapture -%}
344
+ {%- capture _seeall -%}
345
+ <{{ project.url }}/messages|See all {{ digest.count }} in LangWatch ↗>
346
+ {%- endcapture -%}
347
+ {%- capture _rows -%}
348
+ {%- for m in matches limit: 20 -%}
349
+ ,[
350
+ { "type": "raw_text", "text": {{ m.evaluation.score | default: "—" | append: "" | json }} },
351
+ { "type": "raw_text", "text": {{ m.evaluation.evaluatorName | default: "—" | append: "" | json }} },
352
+ { "type": "raw_text", "text": {{ m.trace.input | truncate: 80 | default: "—" | append: "" | json }} },
353
+ { "type": "rich_text", "elements": [{ "type": "rich_text_section", "elements": [{ "type": "link", "url": {{ m.trace.url | json }}, "text": "View" }] }] }
354
+ ]
355
+ {%- endfor -%}
356
+ {%- endcapture -%}
357
+ {%- capture _list -%}
358
+ {%- for m in matches limit: 10 -%}
359
+ {% if m.evaluation %}\`{{ m.evaluation.score | default: "—" }}\` *{{ m.evaluation.evaluatorName | default: "eval" | mrkdwn_escape }}* · {% endif %}_{{ m.trace.input | truncate: 80 | mrkdwn_escape }}_ · <{{ m.trace.url }}|↗>{% unless forloop.last %}
360
+ {% endunless %}
361
+ {%- endfor -%}
362
+ {%- endcapture -%}
363
+ [
364
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | truncate: 140 | json }}, "emoji": true } },
365
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _summary | json }} }] },
366
+ { "type": "data_table", "caption": {{ _summary | json }}, "rows": [
367
+ [
368
+ { "type": "raw_text", "text": "Score" },
369
+ { "type": "raw_text", "text": "Evaluator" },
370
+ { "type": "raw_text", "text": "Input" },
371
+ { "type": "raw_text", "text": "Link" }
372
+ ]
373
+ {{ _rows }}
374
+ ] },
375
+ { "type": "section", "text": { "type": "mrkdwn", "text": {{ _list | json }} } },
376
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _seeall | json }} }] }
377
+ ]
378
+ `,hr=`{%- capture _header_text -%}
379
+ {% if match.evaluation.passed == false %}🛑 {% else %}🔔 {% endif %}{{ trigger.name }}
380
+ {%- endcapture -%}
381
+ {%- capture _ctx_eval -%}
382
+ {%- if match.evaluation %}*{{ match.evaluation.evaluatorName | default: "Evaluation" | mrkdwn_escape }}* \`{{ match.evaluation.score | default: "—" }}\`{% if match.evaluation.label %} · {{ match.evaluation.label | mrkdwn_escape }}{% endif %}{% if match.evaluation.passed == false %} · *failed*{% elsif match.evaluation.passed == true %} · *passed*{% endif %}{%- endif -%}
383
+ {%- if match.evaluation and trigger.alertType %} · {% endif -%}
384
+ {%- if trigger.alertType %}_{{ trigger.alertType }}_{%- endif -%}
385
+ {%- endcapture -%}
386
+ {%- capture _footer -%}
387
+ \`{{ match.trace.id | truncate: 12 }}\`{% if match.trace.metadata.model %} · {{ match.trace.metadata.model | mrkdwn_escape }}{% endif %}{% if match.trace.metadata.duration_ms %} · {{ match.trace.metadata.duration_ms }}ms{% endif %}{% if match.trace.metadata.cost %} · \${{ match.trace.metadata.cost }}{% endif %} · <{{ match.trace.url }}|View in LangWatch ↗>
388
+ {%- endcapture -%}
389
+ {%- assign _input = match.trace.input | truncate: 1500 -%}
390
+ {%- assign _output = match.trace.output | truncate: 1500 -%}
391
+ {%- assign _out_first = match.trace.output | strip | slice: 0 -%}
392
+ {%- capture _rt_body -%}
393
+ {%- if _input != "" -%}
394
+ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Input", "style": { "bold": true } }] },
395
+ { "type": "rich_text_quote", "elements": [{ "type": "text", "text": {{ _input | json }} }] }
396
+ {%- endif -%}
397
+ {%- if _input != "" and _output != "" -%},{%- endif -%}
398
+ {%- if _output != "" -%}
399
+ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Output", "style": { "bold": true } }] },
400
+ {%- if _out_first == "{" or _out_first == "[" -%}
401
+ { "type": "rich_text_preformatted", "elements": [{ "type": "text", "text": {{ _output | json }} }] }
402
+ {%- else -%}
403
+ { "type": "rich_text_quote", "elements": [{ "type": "text", "text": {{ _output | json }} }] }
404
+ {%- endif -%}
405
+ {%- endif -%}
406
+ {%- endcapture -%}
407
+ [
408
+ { "type": "header", "text": { "type": "plain_text", "text": {{ _header_text | truncate: 140 | json }}, "emoji": true } }
409
+ {%- if _ctx_eval != "" -%}
410
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _ctx_eval | json }} }] }
411
+ {%- endif -%}
412
+ ,{ "type": "divider" }
413
+ {%- if _rt_body != "" -%}
414
+ ,{ "type": "rich_text", "elements": [ {{ _rt_body }} ] }
415
+ {%- endif -%}
416
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _footer | json }} }] }
417
+ ]
418
+ `,gr=`{%- capture _level -%}
419
+ {%- if match.evaluation.passed == false -%}error{%- elsif match.evaluation.passed == true -%}success{%- else -%}warning{%- endif -%}
420
+ {%- endcapture -%}
421
+ {%- capture _alert_text -%}
422
+ {%- if match.evaluation -%}*{{ match.evaluation.evaluatorName | default: "Evaluation" | mrkdwn_escape }}*{% if match.evaluation.passed == false %} failed{% elsif match.evaluation.passed == true %} passed{% endif %}{% if match.evaluation.score != null %} · score {{ match.evaluation.score }}{% endif %}{% if match.evaluation.label %} · {{ match.evaluation.label | mrkdwn_escape }}{% endif %}{%- else -%}Evaluation result for {{ trigger.name | mrkdwn_escape }}{%- endif -%}
423
+ {%- endcapture -%}
424
+ {%- capture _header_text -%}
425
+ {% if match.evaluation.passed == false %}🛑 {% else %}🔔 {% endif %}{{ trigger.name }}
426
+ {%- endcapture -%}
427
+ {%- capture _ctx_eval -%}
428
+ {%- if match.evaluation %}*{{ match.evaluation.evaluatorName | default: "Evaluation" | mrkdwn_escape }}* \`{{ match.evaluation.score | default: "—" }}\`{% if match.evaluation.passed == false %} · *failed*{% elsif match.evaluation.passed == true %} · *passed*{% endif %}{%- endif -%}
429
+ {%- if trigger.alertType %} · _{{ trigger.alertType }}_{% endif -%}
430
+ {%- endcapture -%}
431
+ {%- capture _footer -%}
432
+ \`{{ match.trace.id | truncate: 12 }}\` · <{{ match.trace.url }}|View trace ↗>
433
+ {%- endcapture -%}
434
+ {%- assign _input = match.trace.input | truncate: 1500 -%}
435
+ {%- assign _output = match.trace.output | truncate: 1500 -%}
436
+ {%- assign _out_first = match.trace.output | strip | slice: 0 -%}
437
+ {%- capture _rt_body -%}
438
+ {%- if _input != "" -%}
439
+ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Input", "style": { "bold": true } }] },
440
+ { "type": "rich_text_quote", "elements": [{ "type": "text", "text": {{ _input | json }} }] }
441
+ {%- endif -%}
442
+ {%- if _input != "" and _output != "" -%},{%- endif -%}
443
+ {%- if _output != "" -%}
444
+ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Output", "style": { "bold": true } }] },
445
+ {%- if _out_first == "{" or _out_first == "[" -%}
446
+ { "type": "rich_text_preformatted", "elements": [{ "type": "text", "text": {{ _output | json }} }] }
447
+ {%- else -%}
448
+ { "type": "rich_text_quote", "elements": [{ "type": "text", "text": {{ _output | json }} }] }
449
+ {%- endif -%}
450
+ {%- endif -%}
451
+ {%- endcapture -%}
452
+ [
453
+ { "type": "alert", "level": {{ _level | json }}, "text": { "type": "mrkdwn", "text": {{ _alert_text | truncate: 190 | json }} } },
454
+ { "type": "header", "text": { "type": "plain_text", "text": {{ _header_text | truncate: 140 | json }}, "emoji": true } }
455
+ {%- if _ctx_eval != "" -%}
456
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _ctx_eval | json }} }] }
457
+ {%- endif -%}
458
+ ,{ "type": "divider" }
459
+ {%- if _rt_body != "" -%}
460
+ ,{ "type": "rich_text", "elements": [ {{ _rt_body }} ] }
461
+ {%- endif -%}
462
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _footer | json }} }] }
463
+ ]
464
+ `,_r=`{%- capture _emoji -%}{% if trigger.alertType == 'INFO' %}ℹ️{% elsif trigger.alertType == 'CRITICAL' %}🔴{% else %}🚨{% endif %}{%- endcapture -%}
465
+ {%- capture _metric_field -%}
466
+ *Metric*
467
+ {{ metric.label | mrkdwn_escape }}
468
+ {%- endcapture -%}
469
+ {%- capture _condition_field -%}
470
+ *Condition*
471
+ {{ condition.operatorLabel }} {{ condition.threshold }} over the {{ condition.timePeriodLabel }}
472
+ {%- endcapture -%}
473
+ {%- capture _value_field -%}
474
+ *Current value*
475
+ {{ currentValue }}{% if previousValue != nil %} (was {{ previousValue }}){% endif %}
476
+ {%- endcapture -%}
477
+ {%- capture _links -%}
478
+ <{{ graph.url }}|Open dashboard ↗> · <{{ trigger.editUrl }}|Edit alert>
479
+ {%- endcapture -%}
480
+ [
481
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | truncate: 140 | prepend: " " | prepend: _emoji | json }}, "emoji": true } },
482
+ { "type": "section", "fields": [
483
+ { "type": "mrkdwn", "text": {{ _metric_field | json }} },
484
+ { "type": "mrkdwn", "text": {{ _condition_field | json }} },
485
+ { "type": "mrkdwn", "text": {{ _value_field | json }} }
486
+ ] }
487
+ {%- if sparkline != "" -%}
488
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ sparkline | prepend: "Trend: \`" | append: "\`" | json }} }] }
489
+ {%- endif -%}
490
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _links | json }} }] }
491
+ ]
492
+ `,vr=`{%- capture _emoji -%}{% if trigger.alertType == 'INFO' %}ℹ️{% elsif trigger.alertType == 'CRITICAL' %}🔴{% else %}🚨{% endif %}{%- endcapture -%}
493
+ {%- capture _metric_field -%}
494
+ *Metric*
495
+ {{ metric.label | mrkdwn_escape }}
496
+ {%- endcapture -%}
497
+ {%- capture _condition_field -%}
498
+ *Condition*
499
+ {{ condition.operatorLabel }} {{ condition.threshold }} over the {{ condition.timePeriodLabel }}
500
+ {%- endcapture -%}
501
+ {%- capture _value_field -%}
502
+ *Current value*
503
+ {{ currentValue }}{% if previousValue != nil %} (was {{ previousValue }}){% endif %}
504
+ {%- endcapture -%}
505
+ {%- comment -%}
506
+ \`history\` runs oldest-first and can hold far more points than the chart shows.
507
+ A plain \`limit: 20\` would plot the OLDEST 20 buckets — the breach that fired the
508
+ alert would be missing from its own chart. So skip ahead to the last 20 buckets
509
+ with an offset, keeping the series chronological for the x-axis.
510
+ {%- endcomment -%}
511
+ {%- assign _history_size = history | size -%}
512
+ {%- assign _chart_offset = _history_size | minus: 20 -%}
513
+ {%- if _chart_offset < 0 -%}{%- assign _chart_offset = 0 -%}{%- endif -%}
514
+ {%- capture _points -%}
515
+ {%- for point in history offset: _chart_offset limit: 20 -%}
516
+ {% unless forloop.first %},{% endunless %}{ "label": {{ point.timestamp | date: "%H:%M" | json }}, "value": {{ point.value }} }
517
+ {%- endfor -%}
518
+ {%- endcapture -%}
519
+ {%- capture _categories -%}
520
+ {%- for point in history offset: _chart_offset limit: 20 -%}
521
+ {% unless forloop.first %},{% endunless %}{{ point.timestamp | date: "%H:%M" | json }}
522
+ {%- endfor -%}
523
+ {%- endcapture -%}
524
+ {%- assign _newest_first = history | reverse -%}
525
+ {%- capture _recent -%}
526
+ Recent: {% for point in _newest_first limit: 8 %}\`{{ point.timestamp | date: "%H:%M" }}\` {{ point.value }}{% unless forloop.last %} · {% endunless %}{% endfor %}
527
+ {%- endcapture -%}
528
+ {%- capture _links -%}
529
+ <{{ graph.url }}|Open dashboard ↗> · <{{ trigger.editUrl }}|Edit alert>
530
+ {%- endcapture -%}
531
+ [
532
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | truncate: 140 | prepend: " " | prepend: _emoji | json }}, "emoji": true } },
533
+ { "type": "section", "fields": [
534
+ { "type": "mrkdwn", "text": {{ _metric_field | json }} },
535
+ { "type": "mrkdwn", "text": {{ _condition_field | json }} },
536
+ { "type": "mrkdwn", "text": {{ _value_field | json }} }
537
+ ] }
538
+ {%- if reason == "heartbeat-absence" -%}
539
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": "_No qualifying data was seen in the window._" } }
540
+ {%- endif -%}
541
+ {%- if history != empty -%}
542
+ ,{ "type": "data_visualization", "block_id": "metric_trend", "title": {{ metric.label | truncate: 50 | json }}, "chart": { "type": "area", "series": [{ "name": {{ metric.label | truncate: 20 | json }}, "data": [ {{ _points }} ] }], "axis_config": { "categories": [ {{ _categories }} ], "x_label": "Time", "y_label": {{ metric.label | truncate: 50 | json }} } } }
543
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _recent | json }} }] }
544
+ {%- endif -%}
545
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _links | json }} }] }
546
+ ]
547
+ `,yr=`{%- capture _emoji -%}{% if trigger.alertType == 'INFO' %}ℹ️{% elsif trigger.alertType == 'CRITICAL' %}🔴{% else %}🚨{% endif %}{%- endcapture -%}
548
+ {%- capture _metric_field -%}
549
+ *Metric*
550
+ {{ metric.label | mrkdwn_escape }}
551
+ {%- endcapture -%}
552
+ {%- capture _condition_field -%}
553
+ *Condition*
554
+ {{ condition.operatorLabel }} {{ condition.threshold }} over the {{ condition.timePeriodLabel }}
555
+ {%- endcapture -%}
556
+ {%- capture _value_field -%}
557
+ *Current value*
558
+ {{ currentValue }}{% if previousValue != nil %} (was {{ previousValue }}){% endif %}
559
+ {%- endcapture -%}
560
+ {%- comment -%}
561
+ \`history\` runs oldest-first and can hold far more points than a message should
562
+ carry, so reverse it FIRST and take from the newest end. \`limit\` applies before
563
+ \`reversed\` in a Liquid for-tag, so \`for point in history reversed limit: 20\`
564
+ would take the OLDEST 20 and show them under a "Recent values" caption — the
565
+ breach that fired the alert would not appear in its own message.
566
+ {%- endcomment -%}
567
+ {%- assign _newest_first = history | reverse -%}
568
+ {%- capture _rows -%}
569
+ {%- for point in _newest_first limit: 20 -%}
570
+ ,[
571
+ { "type": "raw_text", "text": {{ point.timestamp | date: "%H:%M" | json }} },
572
+ { "type": "raw_number", "value": {{ point.value }}, "text": {{ point.value | append: "" | json }} }
573
+ ]
574
+ {%- endfor -%}
575
+ {%- endcapture -%}
576
+ {%- capture _recent -%}
577
+ Recent: {% for point in _newest_first limit: 8 %}\`{{ point.timestamp | date: "%H:%M" }}\` {{ point.value }}{% unless forloop.last %} · {% endunless %}{% endfor %}
578
+ {%- endcapture -%}
579
+ {%- capture _links -%}
580
+ <{{ graph.url }}|Open dashboard ↗> · <{{ trigger.editUrl }}|Edit alert>
581
+ {%- endcapture -%}
582
+ [
583
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | truncate: 140 | prepend: " " | prepend: _emoji | json }}, "emoji": true } },
584
+ { "type": "section", "fields": [
585
+ { "type": "mrkdwn", "text": {{ _metric_field | json }} },
586
+ { "type": "mrkdwn", "text": {{ _condition_field | json }} },
587
+ { "type": "mrkdwn", "text": {{ _value_field | json }} }
588
+ ] }
589
+ {%- if history != empty -%}
590
+ ,{ "type": "data_table", "caption": {{ metric.label | truncate: 60 | prepend: "Recent values — " | json }}, "rows": [
591
+ [
592
+ { "type": "raw_text", "text": "Time" },
593
+ { "type": "raw_text", "text": "Value" }
594
+ ]
595
+ {{ _rows }}
596
+ ] }
597
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _recent | json }} }] }
598
+ {%- endif -%}
599
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _links | json }} }] }
600
+ ]
601
+ `,br=`{%- capture _level -%}
602
+ {%- if reason == "heartbeat-absence" -%}warning{%- elsif reason == "heartbeat-resolve" -%}success{%- else -%}error{%- endif -%}
603
+ {%- endcapture -%}
604
+ {%- capture _header -%}
605
+ {% if reason == "heartbeat-absence" %}🔇 No data: {{ trigger.name }}{% elsif reason == "heartbeat-resolve" %}✅ Recovered: {{ trigger.name }}{% else %}🚨 {{ trigger.name }}{% endif %}
606
+ {%- endcapture -%}
607
+ {%- capture _lead -%}
608
+ {% if reason == "heartbeat-absence" %}No qualifying data was seen for *{{ metric.label | mrkdwn_escape }}* in the {{ condition.timePeriodLabel }}.{% elsif reason == "heartbeat-resolve" %}*{{ metric.label | mrkdwn_escape }}* is reporting again and back within threshold.{% else %}*{{ metric.label | mrkdwn_escape }}* {{ condition.operatorLabel }} {{ condition.threshold }} over the {{ condition.timePeriodLabel }}.{% endif %}
609
+ {%- endcapture -%}
610
+ {%- capture _detail -%}
611
+ Expected *{{ metric.label | mrkdwn_escape }}* {{ condition.operatorLabel }} {{ condition.threshold }} · checked {{ occurredAt | date: "%b %d, %H:%M" }}
612
+ {%- endcapture -%}
613
+ {%- capture _links -%}
614
+ <{{ graph.url }}|Open dashboard ↗> · <{{ trigger.editUrl }}|Edit alert>
615
+ {%- endcapture -%}
616
+ [
617
+ { "type": "alert", "level": {{ _level | json }}, "text": { "type": "mrkdwn", "text": {{ _lead | truncate: 190 | json }} } },
618
+ { "type": "header", "text": { "type": "plain_text", "text": {{ _header | truncate: 140 | json }}, "emoji": true } },
619
+ { "type": "section", "text": { "type": "mrkdwn", "text": {{ _lead | json }} } },
620
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _detail | json }} }] },
621
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _links | json }} }] }
622
+ ]
623
+ `,xr=`{%- capture _emoji -%}{% if trigger.alertType == 'INFO' %}ℹ️{% elsif trigger.alertType == 'CRITICAL' %}🔴{% else %}🚨{% endif %}{%- endcapture -%}
624
+ {%- capture _line -%}
625
+ {{ _emoji }} *{{ trigger.name | mrkdwn_escape }}* · {{ metric.label | mrkdwn_escape }} {{ condition.operatorLabel }} {{ condition.threshold }} — now {{ currentValue }} · <{{ graph.url }}|Open dashboard ↗>
626
+ {%- endcapture -%}
627
+ [
628
+ { "type": "section", "text": { "type": "mrkdwn", "text": {{ _line | json }} } }
629
+ ]
630
+ `,Sr=`{%- capture _level -%}
631
+ {%- if reason == "heartbeat-resolve" -%}success{%- elsif reason == "heartbeat-absence" -%}warning{%- else -%}error{%- endif -%}
632
+ {%- endcapture -%}
633
+ {%- capture _header -%}
634
+ {% if reason == "heartbeat-resolve" %}✅ Recovered: {{ trigger.name }}{% elsif reason == "heartbeat-absence" %}🔇 No data: {{ trigger.name }}{% else %}🚨 {{ trigger.name }}{% endif %}
635
+ {%- endcapture -%}
636
+ {%- capture _lead -%}
637
+ {% if reason == "heartbeat-resolve" %}*{{ metric.label | mrkdwn_escape }}* is back within threshold ({{ condition.operatorLabel }} {{ condition.threshold }} over the {{ condition.timePeriodLabel }}).{% elsif reason == "heartbeat-absence" %}No qualifying data was seen for *{{ metric.label | mrkdwn_escape }}* in the {{ condition.timePeriodLabel }}.{% else %}*{{ metric.label | mrkdwn_escape }}* {{ condition.operatorLabel }} {{ condition.threshold }} over the {{ condition.timePeriodLabel }}.{% endif %}
638
+ {%- endcapture -%}
639
+ {%- capture _was_field -%}
640
+ *Was*
641
+ {{ previousValue | default: "—" }}
642
+ {%- endcapture -%}
643
+ {%- capture _now_field -%}
644
+ *Now*
645
+ {{ currentValue }}
646
+ {%- endcapture -%}
647
+ {%- capture _when -%}
648
+ {{ occurredAt | date: "%b %d, %H:%M" }}
649
+ {%- endcapture -%}
650
+ {%- capture _links -%}
651
+ <{{ graph.url }}|Open dashboard ↗> · <{{ trigger.editUrl }}|Edit alert>
652
+ {%- endcapture -%}
653
+ [
654
+ { "type": "alert", "level": {{ _level | json }}, "text": { "type": "mrkdwn", "text": {{ _lead | truncate: 190 | json }} } },
655
+ { "type": "header", "text": { "type": "plain_text", "text": {{ _header | truncate: 140 | json }}, "emoji": true } },
656
+ { "type": "section", "text": { "type": "mrkdwn", "text": {{ _lead | json }} } },
657
+ { "type": "section", "fields": [
658
+ { "type": "mrkdwn", "text": {{ _was_field | json }} },
659
+ { "type": "mrkdwn", "text": {{ _now_field | json }} }
660
+ ] },
661
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _when | json }} }] },
662
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _links | json }} }] }
663
+ ]
664
+ `,Cr=`{%- assign chart = charts | first -%}
665
+ {%- capture _sub -%}
666
+ {{ chart.title | default: report.sourceLabel | mrkdwn_escape }} · {{ report.scheduleLabel }}
667
+ {%- endcapture -%}
668
+ {%- comment -%}
669
+ Slack plots at most 20 points per series. A \`limit: 20\` would chart only the
670
+ FIRST 20 buckets — a week-long report would show its first few hours and call it
671
+ the week. So take every Nth bucket instead: the chart still spans the whole
672
+ period, at a coarser resolution.
673
+ {%- endcomment -%}
674
+ {%- assign _bucket_count = chart.categories | size -%}
675
+ {%- assign _stride = _bucket_count | divided_by: 20.0 | ceil -%}
676
+ {%- if _stride < 1 -%}{%- assign _stride = 1 -%}{%- endif -%}
677
+ {%- capture _chart_json -%}
678
+ {%- if chart.type == "pie" -%}
679
+ { "type": "pie", "segments": [
680
+ {%- for seg in chart.segments limit: 8 -%}
681
+ {% unless forloop.first %},{% endunless %}{ "label": {{ seg.label | truncate: 40 | json }}, "value": {{ seg.value }} }
682
+ {%- endfor -%}
683
+ ] }
684
+ {%- else -%}
685
+ { "type": {{ chart.type | json }}, "series": [
686
+ {%- for s in chart.series limit: 5 -%}
687
+ {% unless forloop.first %},{% endunless %}{ "name": {{ s.name | truncate: 20 | json }}, "data": [
688
+ {%- for p in s.data -%}
689
+ {%- assign _keep = forloop.index0 | modulo: _stride -%}
690
+ {%- if _keep == 0 -%}{% unless forloop.first %},{% endunless %}{ "label": {{ p.label | json }}, "value": {{ p.value }} }{%- endif -%}
691
+ {%- endfor -%}
692
+ ] }
693
+ {%- endfor -%}
694
+ ], "axis_config": { "categories": [
695
+ {%- for c in chart.categories -%}
696
+ {%- assign _keep = forloop.index0 | modulo: _stride -%}
697
+ {%- if _keep == 0 -%}{% unless forloop.first %},{% endunless %}{{ c | json }}{%- endif -%}
698
+ {%- endfor -%}
699
+ ], "x_label": "Time", "y_label": {{ chart.title | truncate: 50 | json }} } }
700
+ {%- endif -%}
701
+ {%- endcapture -%}
702
+ {%- assign _series_count = chart.series | size -%}
703
+ {%- capture _headline -%}
704
+ *{{ chart.total | round: 2 }}* over this period{% if _series_count > 1 %} · {{ _series_count }} series{% endif %}
705
+ {%- endcapture -%}
706
+ {%- capture _view -%}
707
+ <{{ viewUrl }}|Open in LangWatch ↗> · {{ occurredAt | date: "%b %d, %H:%M" }}
708
+ {%- endcapture -%}
709
+ [
710
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | prepend: "📈 " | truncate: 140 | json }}, "emoji": true } },
711
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _sub | json }} }] }
712
+ {%- if report.isEmpty -%}
713
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": "_No data for this period._" } }
714
+ {%- else -%}
715
+ ,{ "type": "data_visualization", "block_id": "report_chart", "title": {{ chart.title | truncate: 50 | json }}, "chart": {{ _chart_json }} }
716
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": {{ _headline | json }} } }
717
+ {%- endif -%}
718
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _view | json }} }] }
719
+ ]
720
+ `,wr=`{%- assign chart = charts | first -%}
721
+ {%- capture _sub -%}
722
+ {{ report.scheduleLabel }}
723
+ {%- endcapture -%}
724
+ {%- capture _body -%}
725
+ {%- if report.isEmpty -%}
726
+ No data for this period.
727
+ {%- else -%}
728
+ *{{ chart.total | round: 2 }}* · {{ chart.title | truncate: 60 | mrkdwn_escape }}
729
+ {%- endif -%}
730
+ {%- endcapture -%}
731
+ {%- comment -%}
732
+ Slack plots at most 20 points per series. A \`limit: 20\` would chart only the
733
+ FIRST 20 buckets of the period, so take every Nth bucket instead — the chart
734
+ still spans the whole period, at a coarser resolution.
735
+ {%- endcomment -%}
736
+ {%- assign _bucket_count = chart.categories | size -%}
737
+ {%- assign _stride = _bucket_count | divided_by: 20.0 | ceil -%}
738
+ {%- if _stride < 1 -%}{%- assign _stride = 1 -%}{%- endif -%}
739
+ {%- capture _chart_json -%}
740
+ {%- if chart.type == "pie" -%}
741
+ { "type": "pie", "segments": [
742
+ {%- for seg in chart.segments limit: 8 -%}
743
+ {% unless forloop.first %},{% endunless %}{ "label": {{ seg.label | truncate: 40 | json }}, "value": {{ seg.value }} }
744
+ {%- endfor -%}
745
+ ] }
746
+ {%- else -%}
747
+ { "type": {{ chart.type | json }}, "series": [
748
+ {%- for s in chart.series limit: 5 -%}
749
+ {% unless forloop.first %},{% endunless %}{ "name": {{ s.name | truncate: 20 | json }}, "data": [
750
+ {%- for p in s.data -%}
751
+ {%- assign _keep = forloop.index0 | modulo: _stride -%}
752
+ {%- if _keep == 0 -%}{% unless forloop.first %},{% endunless %}{ "label": {{ p.label | json }}, "value": {{ p.value }} }{%- endif -%}
753
+ {%- endfor -%}
754
+ ] }
755
+ {%- endfor -%}
756
+ ], "axis_config": { "categories": [
757
+ {%- for c in chart.categories -%}
758
+ {%- assign _keep = forloop.index0 | modulo: _stride -%}
759
+ {%- if _keep == 0 -%}{% unless forloop.first %},{% endunless %}{{ c | json }}{%- endif -%}
760
+ {%- endfor -%}
761
+ ], "x_label": "Time", "y_label": {{ chart.title | truncate: 50 | json }} } }
762
+ {%- endif -%}
763
+ {%- endcapture -%}
764
+ {%- capture _view -%}
765
+ <{{ viewUrl }}|Open in LangWatch ↗> · {{ occurredAt | date: "%b %d, %H:%M" }}
766
+ {%- endcapture -%}
767
+ [
768
+ { "type": "card",
769
+ "title": { "type": "mrkdwn", "text": {{ trigger.name | prepend: "📈 " | truncate: 150 | json }} },
770
+ "subtitle": { "type": "mrkdwn", "text": {{ _sub | truncate: 150 | json }} },
771
+ "body": { "type": "mrkdwn", "text": {{ _body | json }} }
772
+ }
773
+ {%- unless report.isEmpty -%}
774
+ ,{ "type": "data_visualization", "block_id": "report_chart", "title": {{ chart.title | truncate: 50 | json }}, "chart": {{ _chart_json }} }
775
+ {%- endunless -%}
776
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _view | json }} }] }
777
+ ]
778
+ `,Tr=`{%- capture _sub -%}
779
+ {{ report.sourceLabel | mrkdwn_escape }} · {{ report.scheduleLabel }}
780
+ {%- endcapture -%}
781
+ {%- comment -%}
782
+ Slack plots at most 20 points per series. A \`limit: 20\` would chart only the
783
+ FIRST 20 buckets of the period, so each panel takes every Nth bucket instead —
784
+ the chart still spans the whole period, at a coarser resolution.
785
+ {%- endcomment -%}
786
+ {%- capture _panels -%}
787
+ {%- for chart in charts limit: 8 -%}
788
+ {%- if chart.isEmpty -%}{%- continue -%}{%- endif -%}
789
+ {%- assign _bucket_count = chart.categories | size -%}
790
+ {%- assign _stride = _bucket_count | divided_by: 20.0 | ceil -%}
791
+ {%- if _stride < 1 -%}{%- assign _stride = 1 -%}{%- endif -%}
792
+ {%- capture _chart_json -%}
793
+ {%- if chart.type == "pie" -%}
794
+ { "type": "pie", "segments": [
795
+ {%- for seg in chart.segments limit: 8 -%}
796
+ {% unless forloop.first %},{% endunless %}{ "label": {{ seg.label | truncate: 40 | json }}, "value": {{ seg.value }} }
797
+ {%- endfor -%}
798
+ ] }
799
+ {%- else -%}
800
+ { "type": {{ chart.type | json }}, "series": [
801
+ {%- for s in chart.series limit: 5 -%}
802
+ {% unless forloop.first %},{% endunless %}{ "name": {{ s.name | truncate: 20 | json }}, "data": [
803
+ {%- for p in s.data -%}
804
+ {%- assign _keep = forloop.index0 | modulo: _stride -%}
805
+ {%- if _keep == 0 -%}{% unless forloop.first %},{% endunless %}{ "label": {{ p.label | json }}, "value": {{ p.value }} }{%- endif -%}
806
+ {%- endfor -%}
807
+ ] }
808
+ {%- endfor -%}
809
+ ], "axis_config": { "categories": [
810
+ {%- for c in chart.categories -%}
811
+ {%- assign _keep = forloop.index0 | modulo: _stride -%}
812
+ {%- if _keep == 0 -%}{% unless forloop.first %},{% endunless %}{{ c | json }}{%- endif -%}
813
+ {%- endfor -%}
814
+ ], "x_label": "Time", "y_label": {{ chart.title | truncate: 50 | json }} } }
815
+ {%- endif -%}
816
+ {%- endcapture -%}
817
+ ,{ "type": "data_visualization", "block_id": {{ chart.id | prepend: "panel_" | json }}, "title": {{ chart.title | truncate: 50 | json }}, "chart": {{ _chart_json }} }
818
+ {%- endfor -%}
819
+ {%- endcapture -%}
820
+ {%- capture _headlines -%}
821
+ {% for chart in charts limit: 8 %}• *{{ chart.title | truncate: 50 | mrkdwn_escape }}* — {% if chart.isEmpty %}_no data_{% else %}{{ chart.total | round: 2 }}{% endif %}{% unless forloop.last %}
822
+ {% endunless %}{% endfor %}
823
+ {%- endcapture -%}
824
+ {%- capture _view -%}
825
+ <{{ viewUrl }}|Open dashboard ↗> · {{ occurredAt | date: "%b %d, %H:%M" }}
826
+ {%- endcapture -%}
827
+ [
828
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | prepend: "📊 " | truncate: 140 | json }}, "emoji": true } },
829
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _sub | json }} }] }
830
+ {%- if report.isEmpty -%}
831
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": "_No data for this period._" } }
832
+ {%- else -%}
833
+ {{ _panels }}
834
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": {{ _headlines | json }} } }
835
+ {%- endif -%}
836
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _view | json }} }] }
837
+ ]
838
+ `,Er=`{%- capture _sub -%}
839
+ {{ report.sourceLabel | mrkdwn_escape }} · {{ report.scheduleLabel }}
840
+ {%- endcapture -%}
841
+ {%- capture _rows_md -%}
842
+ {% for t in traces limit: 20 %}• <{{ t.url }}|\`{{ t.traceId | truncate: 10 }}\`> {{ t.input | truncate: 90 | mrkdwn_escape }}
843
+ _{{ t.model | default: "unknown model" }} · \${{ t.costUsd | round: 4 }} · {{ t.durationMs | round: 0 }} ms_{% unless forloop.last %}
844
+ {% endunless %}{% endfor %}
845
+ {%- endcapture -%}
846
+ {%- capture _view -%}
847
+ <{{ viewUrl }}|View in LangWatch ↗> · {{ occurredAt | date: "%b %d, %H:%M" }}
848
+ {%- endcapture -%}
849
+ [
850
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | prepend: "📊 " | truncate: 140 | json }}, "emoji": true } },
851
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _sub | json }} }] }
852
+ {%- if report.isEmpty -%}
853
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": "_Nothing matched in this window._" } }
854
+ {%- else -%}
855
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": {{ _rows_md | json }} } }
856
+ {%- endif -%}
857
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _view | json }} }] }
858
+ ]
859
+ `,Dr=`{%- capture _sub -%}
860
+ {{ report.sourceLabel | mrkdwn_escape }} · {{ report.scheduleLabel }}
861
+ {%- endcapture -%}
862
+ {%- assign _count = traces | size -%}
863
+ {%- assign _total_cost = 0 -%}
864
+ {%- for t in traces -%}{%- assign _total_cost = _total_cost | plus: t.costUsd -%}{%- endfor -%}
865
+ {%- capture _body -%}
866
+ {%- if report.isEmpty -%}
867
+ Nothing matched in this window.
868
+ {%- else -%}
869
+ *{{ _count }}* {% if _count == 1 %}trace{% else %}traces{% endif %} · \${{ _total_cost | round: 4 }} total
870
+ {%- endif -%}
871
+ {%- endcapture -%}
872
+ {%- capture _rows_md -%}
873
+ {% for t in traces limit: 10 %}• <{{ t.url }}|\`{{ t.traceId | truncate: 10 }}\`> {{ t.input | truncate: 80 | mrkdwn_escape }}{% unless forloop.last %}
874
+ {% endunless %}{% endfor %}
875
+ {%- endcapture -%}
876
+ {%- capture _view -%}
877
+ <{{ viewUrl }}|View in LangWatch ↗> · {{ occurredAt | date: "%b %d, %H:%M" }}
878
+ {%- endcapture -%}
879
+ [
880
+ { "type": "card",
881
+ "title": { "type": "mrkdwn", "text": {{ trigger.name | prepend: "📊 " | truncate: 150 | json }} },
882
+ "subtitle": { "type": "mrkdwn", "text": {{ _sub | truncate: 150 | json }} },
883
+ "body": { "type": "mrkdwn", "text": {{ _body | json }} }
884
+ }
885
+ {%- unless report.isEmpty -%}
886
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": {{ _rows_md | json }} } }
887
+ {%- endunless -%}
888
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _view | json }} }] }
889
+ ]
890
+ `,Or=`{%- capture _sub -%}
891
+ {{ report.sourceLabel | mrkdwn_escape }} · {{ report.scheduleLabel }}
892
+ {%- endcapture -%}
893
+ {%- capture _table_rows -%}
894
+ {%- for t in traces limit: 30 -%}
895
+ {%- capture _cost -%}\${{ t.costUsd | round: 4 }}{%- endcapture -%}
896
+ {%- capture _dur -%}{{ t.durationMs | round: 0 }} ms{%- endcapture -%}
897
+ {%- capture _what -%}{{ t.input | default: t.traceId }}{%- endcapture -%}
898
+ ,[ { "type": "raw_text", "text": {{ _what | truncate: 80 | json }} }, { "type": "raw_text", "text": {{ t.model | default: "—" | truncate: 28 | json }} }, { "type": "raw_number", "value": {{ t.costUsd }}, "text": {{ _cost | json }} }, { "type": "raw_number", "value": {{ t.durationMs }}, "text": {{ _dur | json }} } ]
899
+ {%- endfor -%}
900
+ {%- endcapture -%}
901
+ {%- capture _fallback -%}
902
+ {% for t in traces limit: 10 %}• <{{ t.url }}|\`{{ t.traceId | truncate: 10 }}\`> {{ t.input | truncate: 70 | mrkdwn_escape }}{% unless forloop.last %}
903
+ {% endunless %}{% endfor %}
904
+ {%- endcapture -%}
905
+ {%- capture _view -%}
906
+ <{{ viewUrl }}|View in LangWatch ↗> · {{ occurredAt | date: "%b %d, %H:%M" }}
907
+ {%- endcapture -%}
908
+ [
909
+ { "type": "header", "text": { "type": "plain_text", "text": {{ trigger.name | prepend: "📊 " | truncate: 140 | json }}, "emoji": true } },
910
+ { "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _sub | json }} }] }
911
+ {%- if report.isEmpty -%}
912
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": "_Nothing matched in this window._" } }
913
+ {%- else -%}
914
+ ,{ "type": "data_table", "caption": {{ report.sourceLabel | truncate: 120 | json }}, "rows": [
915
+ [ { "type": "raw_text", "text": "Trace" }, { "type": "raw_text", "text": "Model" }, { "type": "raw_text", "text": "Cost" }, { "type": "raw_text", "text": "Duration" } ]
916
+ {{ _table_rows }}
917
+ ] }
918
+ ,{ "type": "section", "text": { "type": "mrkdwn", "text": {{ _fallback | json }} } }
919
+ {%- endif -%}
920
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _view | json }} }] }
921
+ ]
922
+ `,kr=`{%- capture _header_text -%}
923
+ {% if trigger.alertType == 'INFO' %}ℹ️ {% elsif trigger.alertType == 'CRITICAL' %}🔴 {% elsif trigger.alertType == 'WARNING' %}⚠️ {% else %}🔔 {% endif %}{{ trigger.name }}
924
+ {%- endcapture -%}
925
+ {%- capture _ctx_eval -%}
926
+ {%- if match.evaluation %}*{{ match.evaluation.evaluatorName | default: "Evaluation" | mrkdwn_escape }}*{% if match.evaluation.score != null %} \`{{ match.evaluation.score }}\`{% endif %}{% if match.evaluation.label %} · {{ match.evaluation.label | mrkdwn_escape }}{% endif %}{%- endif -%}
927
+ {%- if match.evaluation and trigger.alertType %} · {% endif -%}
928
+ {%- if trigger.alertType %}_{{ trigger.alertType }}_{%- endif -%}
929
+ {%- endcapture -%}
930
+ {%- capture _footer -%}
931
+ \`{{ match.trace.id | truncate: 12 }}\`{% if match.trace.metadata.model %} · {{ match.trace.metadata.model | mrkdwn_escape }}{% endif %}{% if match.trace.metadata.duration_ms %} · {{ match.trace.metadata.duration_ms }}ms{% endif %}{% if match.trace.metadata.cost %} · \${{ match.trace.metadata.cost }}{% endif %} · <{{ match.trace.url }}|View in LangWatch ↗>
932
+ {%- endcapture -%}
933
+ {%- assign _input = match.trace.input | truncate: 1500 -%}
934
+ {%- assign _output = match.trace.output | truncate: 1500 -%}
935
+ {%- capture _rt_body -%}
936
+ {%- if _input != "" -%}
937
+ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Input", "style": { "bold": true } }] },
938
+ { "type": "rich_text_quote", "elements": [{ "type": "text", "text": {{ _input | json }} }] }
939
+ {%- endif -%}
940
+ {%- if _input != "" and _output != "" -%},{%- endif -%}
941
+ {%- if _output != "" -%}
942
+ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Output", "style": { "bold": true } }] },
943
+ { "type": "rich_text_quote", "elements": [{ "type": "text", "text": {{ _output | json }} }] }
944
+ {%- endif -%}
945
+ {%- endcapture -%}
946
+ [
947
+ { "type": "header", "text": { "type": "plain_text", "text": {{ _header_text | truncate: 140 | json }}, "emoji": true } }
948
+ {%- if _ctx_eval != "" -%}
949
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _ctx_eval | json }} }] }
950
+ {%- endif -%}
951
+ {%- if _rt_body != "" -%}
952
+ ,{ "type": "rich_text", "elements": [ {{ _rt_body }} ] }
953
+ {%- endif -%}
954
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _footer | json }} }] }
955
+ ]
956
+ `,Ar=`{%- capture _line -%}
957
+ {% if trigger.alertType == 'INFO' %}ℹ️{% elsif trigger.alertType == 'CRITICAL' %}🔴{% elsif trigger.alertType == 'WARNING' %}⚠️{% else %}🔔{% endif %} *{{ trigger.name | mrkdwn_escape }}*{% if match.evaluation %} · {{ match.evaluation.evaluatorName | default: "eval" | mrkdwn_escape }} \`{{ match.evaluation.score | default: "—" }}\`{% endif %} · _{{ match.trace.input | truncate: 140 | mrkdwn_escape }}_ · <{{ match.trace.url }}|View ↗>
958
+ {%- endcapture -%}
959
+ [
960
+ { "type": "section", "text": { "type": "mrkdwn", "text": {{ _line | json }} } }
961
+ ]
962
+ `,jr=`{%- capture _title -%}
963
+ {% if match.evaluation.passed == false %}🛑 {% else %}🔔 {% endif %}{{ trigger.name | mrkdwn_escape }}
964
+ {%- endcapture -%}
965
+ {%- capture _subtitle -%}
966
+ {%- if match.evaluation %}*{{ match.evaluation.evaluatorName | default: "Evaluation" | mrkdwn_escape }}*{% if match.evaluation.score != null %} \`{{ match.evaluation.score }}\`{% endif %}{% if match.evaluation.passed == false %} · failed{% elsif match.evaluation.passed == true %} · passed{% endif %}{%- else -%}Matched trace{%- endif -%}
967
+ {%- if trigger.alertType %} · {{ trigger.alertType }}{% endif -%}
968
+ {%- endcapture -%}
969
+ {%- assign _snippet_src = match.trace.input | default: match.trace.output -%}
970
+ {%- capture _card_body -%}
971
+ {{ _snippet_src | truncate: 190 | mrkdwn_escape }}
972
+ {%- endcapture -%}
973
+ {%- capture _footer -%}
974
+ \`{{ match.trace.id | truncate: 12 }}\`{% if match.trace.metadata.model %} · {{ match.trace.metadata.model | mrkdwn_escape }}{% endif %}{% if match.trace.metadata.duration_ms %} · {{ match.trace.metadata.duration_ms }}ms{% endif %}{% if match.trace.metadata.cost %} · \${{ match.trace.metadata.cost }}{% endif %} · <{{ match.trace.url }}|View trace ↗>
975
+ {%- endcapture -%}
976
+ {%- assign _input = match.trace.input | truncate: 1500 -%}
977
+ {%- assign _output = match.trace.output | truncate: 1500 -%}
978
+ {%- capture _rt_body -%}
979
+ {%- if _input != "" -%}
980
+ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Input", "style": { "bold": true } }] },
981
+ { "type": "rich_text_quote", "elements": [{ "type": "text", "text": {{ _input | json }} }] }
982
+ {%- endif -%}
983
+ {%- if _input != "" and _output != "" -%},{%- endif -%}
984
+ {%- if _output != "" -%}
985
+ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Output", "style": { "bold": true } }] },
986
+ { "type": "rich_text_quote", "elements": [{ "type": "text", "text": {{ _output | json }} }] }
987
+ {%- endif -%}
988
+ {%- endcapture -%}
989
+ [
990
+ { "type": "card",
991
+ "title": { "type": "mrkdwn", "text": {{ _title | truncate: 150 | json }} },
992
+ "subtitle": { "type": "mrkdwn", "text": {{ _subtitle | truncate: 150 | json }} }
993
+ {%- if _card_body != "" -%}
994
+ ,"body": { "type": "mrkdwn", "text": {{ _card_body | json }} }
995
+ {%- endif -%}
996
+ }
997
+ {%- if _rt_body != "" -%}
998
+ ,{ "type": "rich_text", "elements": [ {{ _rt_body }} ] }
999
+ {%- endif -%}
1000
+ ,{ "type": "context", "elements": [{ "type": "mrkdwn", "text": {{ _footer | json }} }] }
1001
+ ]
1002
+ `,Mr=[`1.5`,`1`,`2`,`1.5`,`2.5`,`2`,`3`],Nr=[`1`,`1.5`,`1.5`,`2`,`2.5`,`3`,`3.5`];function Pr({palette:e}){return(0,F.jsx)(u,{bg:`${e}.subtle`,borderLeftWidth:`3px`,borderLeftColor:`${e}.solid`,borderRadius:`xs`,px:`1.5`,py:`1`,children:(0,F.jsx)(u,{h:`2`,bg:`${e}.fg`,borderRadius:`xs`,w:`70%`,opacity:.7})})}function Fr({kind:e}){switch(e){case`header`:return(0,F.jsx)(u,{h:`3`,bg:`fg`,borderRadius:`xs`,w:`80%`});case`context`:return(0,F.jsx)(u,{h:`1.5`,bg:`fg.muted`,borderRadius:`xs`,w:`60%`});case`section`:return(0,F.jsx)(u,{h:`2.5`,bg:`fg.muted`,borderRadius:`xs`,w:`90%`});case`bullet`:return(0,F.jsxs)(T,{gap:`1.5`,w:`full`,children:[(0,F.jsx)(u,{h:`1.5`,w:`1.5`,bg:`fg.muted`,borderRadius:`full`,flexShrink:0}),(0,F.jsx)(u,{h:`2`,bg:`fg.muted`,borderRadius:`xs`,flex:`1`})]});case`md`:return(0,F.jsx)(u,{h:`4`,bg:`blue.subtle`,borderLeftWidth:`2px`,borderLeftColor:`blue.fg`,borderRadius:`xs`,w:`full`});case`fields`:return(0,F.jsxs)(T,{gap:`2`,w:`full`,children:[(0,F.jsx)(u,{h:`2.5`,bg:`fg.muted`,borderRadius:`xs`,flex:`1`}),(0,F.jsx)(u,{h:`2.5`,bg:`fg.muted`,borderRadius:`xs`,flex:`1`})]});case`spark`:return(0,F.jsx)(T,{gap:`0.5`,alignItems:`flex-end`,h:`3`,children:Mr.map((e,t)=>(0,F.jsx)(u,{w:`1`,h:e,bg:`fg.muted`,borderRadius:`xs`},t))});case`quote`:return(0,F.jsx)(u,{borderLeftWidth:`2px`,borderLeftColor:`border.emphasized`,pl:`1.5`,w:`full`,children:(0,F.jsx)(u,{h:`3`,bg:`fg.muted`,borderRadius:`xs`,w:`85%`})});case`table`:return(0,F.jsx)(a,{gap:`0.5`,w:`full`,children:[0,1,2].map(e=>(0,F.jsx)(T,{gap:`0.5`,w:`full`,children:[0,1,2].map(t=>(0,F.jsx)(u,{h:`1.5`,flex:`1`,bg:e===0?`fg.muted`:`border`,borderRadius:`xs`},t))},e))});case`card`:return(0,F.jsxs)(u,{borderWidth:`1px`,borderColor:`border.emphasized`,borderRadius:`sm`,bg:`bg.subtle`,p:`1.5`,children:[(0,F.jsxs)(T,{gap:`1.5`,align:`start`,children:[(0,F.jsx)(u,{h:`5`,w:`5`,bg:`bg.emphasized`,borderRadius:`xs`,flexShrink:0}),(0,F.jsxs)(a,{gap:`1`,flex:`1`,children:[(0,F.jsx)(u,{h:`2.5`,bg:`fg`,borderRadius:`xs`,w:`70%`}),(0,F.jsx)(u,{h:`1.5`,bg:`fg.muted`,borderRadius:`xs`,w:`50%`})]})]}),(0,F.jsx)(u,{h:`1.5`,bg:`fg.muted`,borderRadius:`xs`,w:`90%`,mt:`1.5`})]});case`chart`:return(0,F.jsx)(u,{borderBottomWidth:`1px`,borderBottomColor:`border`,pb:`0.5`,children:(0,F.jsx)(T,{gap:`0.5`,alignItems:`flex-end`,h:`8`,w:`full`,children:Nr.map((e,t)=>(0,F.jsx)(u,{flex:`1`,h:e,bg:`blue.solid`,borderRadius:`xs`},t))})});case`pie`:return(0,F.jsx)(T,{justify:`center`,w:`full`,children:(0,F.jsx)(u,{h:`10`,w:`10`,borderRadius:`full`,borderWidth:`4px`,borderTopColor:`blue.solid`,borderRightColor:`green.solid`,borderBottomColor:`orange.solid`,borderLeftColor:`purple.solid`})});case`alertSuccess`:return(0,F.jsx)(Pr,{palette:`green`});case`alertWarning`:return(0,F.jsx)(Pr,{palette:`orange`});case`alertError`:return(0,F.jsx)(Pr,{palette:`red`});case`divider`:return(0,F.jsx)(u,{h:`px`,bg:`border`,w:`full`,my:`1`})}}function W({rows:e}){return(0,F.jsx)(a,{gap:`1.5`,align:`stretch`,children:e.map((e,t)=>(0,F.jsx)(Fr,{kind:e},t))})}function Ir(){return(0,F.jsx)(W,{rows:[`header`,`context`,`quote`,`quote`,`context`]})}function Lr(){return(0,F.jsx)(W,{rows:[`section`]})}function Rr(){return(0,F.jsx)(W,{rows:[`header`,`context`,`divider`,`quote`,`quote`,`context`]})}function zr(){return(0,F.jsx)(W,{rows:[`card`,`quote`,`quote`,`context`]})}function Br(){return(0,F.jsx)(W,{rows:[`alertError`,`context`,`divider`,`quote`,`quote`,`context`]})}function Vr(){return(0,F.jsx)(W,{rows:[`header`,`context`,`divider`,`bullet`,`bullet`,`bullet`,`bullet`,`context`]})}function Hr(){return(0,F.jsx)(W,{rows:[`header`,`context`,`pie`,`bullet`,`bullet`,`context`]})}function Ur(){return(0,F.jsx)(W,{rows:[`header`,`context`,`divider`,`bullet`,`quote`,`quote`,`divider`,`bullet`,`quote`,`quote`]})}function Wr(){return(0,F.jsx)(W,{rows:[`header`,`context`,`table`,`context`]})}function Gr(){return(0,F.jsx)(W,{rows:[`header`,`fields`,`fields`,`spark`,`context`]})}function Kr(){return(0,F.jsx)(W,{rows:[`header`,`fields`,`chart`,`context`,`context`]})}function qr(){return(0,F.jsx)(W,{rows:[`section`]})}function Jr(){return(0,F.jsx)(W,{rows:[`alertSuccess`,`section`,`fields`,`context`]})}function Yr(){return(0,F.jsx)(W,{rows:[`alertWarning`,`section`,`context`]})}function Xr(){return(0,F.jsx)(W,{rows:[`header`,`fields`,`table`,`context`]})}function Zr(){return(0,F.jsx)(W,{rows:[`header`,`context`,`bullet`,`bullet`,`context`]})}function Qr(){return(0,F.jsx)(W,{rows:[`card`,`section`,`bullet`,`context`]})}function $r(){return(0,F.jsx)(W,{rows:[`header`,`context`,`table`,`context`]})}function ei(){return(0,F.jsx)(W,{rows:[`header`,`context`,`chart`,`section`,`context`]})}function ti(){return(0,F.jsx)(W,{rows:[`card`,`chart`,`context`]})}function ni(){return(0,F.jsx)(W,{rows:[`header`,`context`,`chart`,`chart`,`section`,`context`]})}var ri=[{id:`trace_alert_compact`,displayName:`Compact alert`,emoji:`🔔`,tagline:`Header and evaluation, then the trace's input and output as quoted text.`,deliveryNote:`1 message per trace`,cadenceFit:`immediate`,kind:`trace`,source:kr,Wireframe:Ir},{id:`trace_alert_one_liner`,displayName:`One-liner`,emoji:`💬`,tagline:`A single line: automation name, score, input snippet, link. Minimal noise.`,deliveryNote:`1 message per trace`,cadenceFit:`immediate`,kind:`trace`,source:Ar,Wireframe:Lr},{id:`eval_failure_detailed`,displayName:`Eval failure detail`,emoji:`🛑`,tagline:`Names the failing evaluator, then quotes the trace's input and output.`,deliveryNote:`1 message per trace`,cadenceFit:`immediate`,kind:`trace`,recommendedForEvaluationFilter:!0,source:hr,Wireframe:Rr},{id:`trace_card_rich`,displayName:`Rich trace card`,emoji:`🗂️`,tagline:`A summary card with the evaluation and input, then the full input and output.`,deliveryNote:`1 message per trace`,cadenceFit:`immediate`,kind:`trace`,source:jr,Wireframe:zr},{id:`eval_failure_rich`,displayName:`Eval failure banner`,emoji:`🛑`,tagline:`A colour-coded banner for the verdict, then quoted input and output.`,deliveryNote:`1 message per trace`,cadenceFit:`immediate`,kind:`trace`,recommendedForEvaluationFilter:!0,gatedBlock:`alert`,source:gr,Wireframe:Br},{id:`digest_compact`,displayName:`Digest — compact`,emoji:`📊`,tagline:`One line per matched trace. Best for hourly windows or busy channels.`,deliveryNote:`all matches, 1 message`,cadenceFit:`digest`,kind:`trace`,source:dr,Wireframe:Vr},{id:`digest_evaluator_rollup`,displayName:`Digest — evaluator chart`,emoji:`🥧`,tagline:`A pie chart of matches by evaluator, with the counts listed. No trace content.`,deliveryNote:`all matches, 1 message`,cadenceFit:`digest`,kind:`trace`,gatedBlock:`data_visualization`,source:fr,Wireframe:Hr},{id:`digest_inline_rich`,displayName:`Digest — inline rich`,emoji:`📇`,tagline:`Full input and output for every matched trace, grouped by evaluator. Suits 5-15 min windows.`,deliveryNote:`all matches, 1 message`,cadenceFit:`digest`,kind:`trace`,source:pr,Wireframe:Ur},{id:`digest_table`,displayName:`Digest — table`,emoji:`🧮`,tagline:`Every matched trace as a row in a grid: score, evaluator, input, link.`,deliveryNote:`all matches, 1 message`,cadenceFit:`digest`,kind:`trace`,gatedBlock:`data_table`,source:mr,Wireframe:Wr},{id:`graph_alert_compact`,displayName:`Alert — compact`,emoji:`🚨`,tagline:`Metric, condition, and current value as fields, with a trend line.`,deliveryNote:`1 message per alert`,cadenceFit:`immediate`,kind:`graphAlert`,source:_r,Wireframe:Gr},{id:`graph_alert_detailed`,displayName:`Alert — detailed`,emoji:`📈`,tagline:`A chart of the metric's recent values with the breach in context.`,deliveryNote:`1 message per alert`,cadenceFit:`immediate`,kind:`graphAlert`,gatedBlock:`data_visualization`,source:vr,Wireframe:Kr},{id:`graph_alert_one_liner`,displayName:`One-liner`,emoji:`⚡`,tagline:`A single line: severity, metric, threshold, current value, link.`,deliveryNote:`1 message per alert`,cadenceFit:`immediate`,kind:`graphAlert`,source:xr,Wireframe:qr},{id:`graph_alert_resolved`,displayName:`Recovered / resolved`,emoji:`✅`,tagline:`A recovery banner when the metric is back within threshold, with a was to now value.`,deliveryNote:`1 message per alert`,cadenceFit:`immediate`,kind:`graphAlert`,gatedBlock:`alert`,source:Sr,Wireframe:Jr},{id:`graph_alert_no_data`,displayName:`No-data heartbeat`,emoji:`🔇`,tagline:`A no-data banner for heartbeat monitors, framing a silent metric as missing data.`,deliveryNote:`1 message per alert`,cadenceFit:`immediate`,kind:`graphAlert`,gatedBlock:`alert`,source:br,Wireframe:Yr},{id:`graph_alert_history_table`,displayName:`History table`,emoji:`🗓️`,tagline:`The metric's recent values as a Time and Value grid instead of a sparkline.`,deliveryNote:`1 message per alert`,cadenceFit:`immediate`,kind:`graphAlert`,gatedBlock:`data_table`,source:yr,Wireframe:Xr},{id:`report_table`,displayName:`Table of traces`,emoji:`🧮`,tagline:`Every matching trace as a row: input, model, cost, and duration.`,deliveryNote:`1 message per report`,cadenceFit:`both`,kind:`report`,reportSources:[`traceQuery`],gatedBlock:`data_table`,source:Or,Wireframe:$r},{id:`report_digest`,displayName:`List of traces`,emoji:`📊`,tagline:`One line per matching trace, with its model, cost, and duration beneath.`,deliveryNote:`1 message per report`,cadenceFit:`both`,kind:`report`,reportSources:[`traceQuery`],source:Er,Wireframe:Zr},{id:`report_summary_card`,displayName:`Summary card`,emoji:`🗂️`,tagline:`A card with the trace count and total cost, then the traces listed.`,deliveryNote:`1 message per report`,cadenceFit:`both`,kind:`report`,reportSources:[`traceQuery`],source:Dr,Wireframe:Qr},{id:`report_chart`,displayName:`Chart`,emoji:`📈`,tagline:`The graph plotted over the period, with its headline value.`,deliveryNote:`1 message per report`,cadenceFit:`both`,kind:`report`,reportSources:[`customGraph`],gatedBlock:`data_visualization`,source:Cr,Wireframe:ei},{id:`report_chart_card`,displayName:`Chart card`,emoji:`🗂️`,tagline:`A card leading with the headline value, then the chart.`,deliveryNote:`1 message per report`,cadenceFit:`both`,kind:`report`,reportSources:[`customGraph`],gatedBlock:`data_visualization`,source:wr,Wireframe:ti},{id:`report_dashboard`,displayName:`Dashboard panels`,emoji:`🧭`,tagline:`Every panel on the dashboard, each as its own chart.`,deliveryNote:`1 message per report`,cadenceFit:`both`,kind:`report`,reportSources:[`dashboard`],autoFor:`dashboard`,gatedBlock:`data_visualization`,source:Tr,Wireframe:ni}];function ii({cadence:e,hasEvaluationFilter:t,kind:n,reportSource:r}){return n===`report`?r===`dashboard`?`report_dashboard`:r===`customGraph`?`report_chart`:`report_table`:n===`graphAlert`?`graph_alert_compact`:e===`digest`?`digest_inline_rich`:t?`eval_failure_detailed`:`trace_alert_compact`}function ai(e){return ri.some(t=>t.autoFor!==void 0&&t.autoFor===e)}function oi({cadence:e,kind:t,reportSource:n}){return ri.filter(r=>r.kind!==t||r.cadenceFit!==`both`&&r.cadenceFit!==e?!1:t===`report`?r.autoFor===void 0?n===void 0?!0:(r.reportSources??[]).includes(n):!1:!0)}function si(e){return ri.find(t=>t.source===e)}var ci=`Needs a Slack app connection`;function li({kind:e,cadence:t,reportSource:n}){return e===`report`?n===`customGraph`?`Your report sends a graph, so every layout plots it. The thumbnail shows structure, not the final look.`:`Your report sends the traces that match, so every layout lists them. The thumbnail shows structure, not the final look.`:e===`graphAlert`?`Each layout sends one message when the alert fires. The thumbnail shows structure, not the final look.`:t===`digest`?`Your cadence bundles every trace matched in the window into one digest message. Pick a starting layout — the thumbnail shows structure, not the final look.`:`Each matching trace sends its own message. Pick a starting layout — the thumbnail shows structure, not the final look.`}function ui({cadence:e,kind:t,reportSource:n,deliveryMethod:r,hasEvaluationFilter:i,currentSource:o,onSelect:s,onSelectOtherCadence:c}){let l=oi({cadence:e,kind:t,reportSource:n}),u=e===`digest`?`immediate`:`digest`,f=oi({cadence:u,kind:t,reportSource:n}).filter(e=>e.cadenceFit!==`both`),[m,h]=(0,N.useState)(!1),g=ii({cadence:e,hasEvaluationFilter:i,kind:t,reportSource:n});return(0,F.jsxs)(a,{gap:2,align:`stretch`,children:[(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:li({kind:t,cadence:e,reportSource:n})}),(0,F.jsx)(p,{columns:{base:2,md:Math.min(l.length,3)},gap:3,alignItems:`stretch`,children:l.map(e=>(0,F.jsx)(di,{option:e,isSelected:e.source===o,isDefault:e.id===g,locked:r===`webhook`&&!!e.gatedBlock,lockedNote:ci,onClick:()=>s(e)},e.id))}),t!==`graphAlert`&&f.length>0?(0,F.jsxs)(ee,{open:m,onOpenChange:e=>h(e.open),children:[(0,F.jsx)(te,{asChild:!0,children:(0,F.jsxs)(T,{cursor:`pointer`,gap:1,color:`fg.muted`,width:`fit-content`,children:[m?(0,F.jsx)(Ee,{size:14}):(0,F.jsx)(Te,{size:14}),(0,F.jsx)(d,{textStyle:`xs`,children:u===`digest`?`${f.length} more layouts for digest cadences`:`${f.length} more layouts for the Immediate cadence`})]})}),(0,F.jsx)(v,{children:(0,F.jsxs)(a,{gap:2,align:`stretch`,pt:2,children:[(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:u===`digest`?`These layouts bundle every match in a window into one message. Picking one switches this automation's cadence to a 5-minute digest — you can adjust the window in the Cadence section.`:`These layouts send one message per matching trace. Picking one switches this automation's cadence to Immediate.`}),(0,F.jsx)(p,{columns:{base:2,md:Math.min(f.length,3)},gap:3,alignItems:`stretch`,children:f.map(e=>(0,F.jsx)(di,{option:e,isSelected:e.source===o,isDefault:!1,locked:r===`webhook`&&!!e.gatedBlock,lockedNote:ci,onClick:()=>c(e)},e.id))})]})})]}):null]})}function di({option:e,isSelected:t,isDefault:n,locked:r,lockedNote:i,onClick:o}){let{Wireframe:s}=e;return(0,F.jsx)(`button`,{type:`button`,onClick:o,disabled:r,"aria-pressed":t,"aria-label":`Use ${e.displayName} template`,style:{textAlign:`left`,width:`100%`,height:`100%`,cursor:r?`not-allowed`:void 0},children:(0,F.jsx)(u,{height:`full`,borderWidth:t?`2px`:`1px`,borderColor:t?`border.emphasized`:`border`,borderRadius:`md`,bg:`bg.panel/60`,padding:3,opacity:r?.6:1,transition:`border-color 120ms ease`,_hover:r?void 0:{borderColor:`border.emphasized`},children:(0,F.jsxs)(a,{gap:2,align:`stretch`,height:`full`,children:[(0,F.jsxs)(T,{gap:2,children:[(0,F.jsx)(d,{textStyle:`md`,children:e.emoji}),(0,F.jsx)(d,{textStyle:`sm`,fontWeight:`medium`,children:e.displayName}),n?(0,F.jsx)(x,{size:`sm`,colorPalette:`orange`,variant:`subtle`,children:`Default`}):null]}),(0,F.jsx)(u,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`sm`,padding:2,bg:`bg.subtle`,height:`120px`,overflow:`hidden`,flexShrink:0,children:(0,F.jsx)(s,{})}),r&&i?(0,F.jsx)(x,{size:`xs`,variant:`subtle`,colorPalette:`gray`,alignSelf:`start`,children:i}):(0,F.jsx)(x,{size:`xs`,variant:`surface`,alignSelf:`start`,children:e.deliveryNote}),(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,lineClamp:2,children:e.tagline})]})})})}var G={value:``,usingDefault:!0};function fi(){return{deliveryMethod:`bot`,webhook:``,botToken:``,channelId:``,botTokenAlreadySet:!1,isLegacyWebhook:!1,templateType:`block_kit`,template:G}}function pi(e){return e.deliveryMethod===`bot`?e.channelId.trim().length>0&&(e.botToken.trim().length>0||e.botTokenAlreadySet):e.webhook.trim().length>0}function mi(e,t){let n=t.name||`(unnamed)`;if(e.deliveryMethod===`bot`){let t=e.channelId.trim();return`${n} → Slack app${t?` ${t}`:` (channel not set)`}`}return`${n} → Slack webhook${e.webhook?` set`:` (not set)`}`}function hi(e){let t=e.actionParams??{},n=lr(t);return{deliveryMethod:n,isLegacyWebhook:n===`webhook`,webhook:typeof t.slackWebhook==`string`?t.slackWebhook:``,botToken:``,channelId:typeof t.slackChannelId==`string`?t.slackChannelId:``,botTokenAlreadySet:t.slackBotTokenSet===!0,templateType:e.slackTemplateType===`block_kit`?`block_kit`:`string`,template:{value:e.slackTemplate??``,usingDefault:e.slackTemplate==null}}}function gi(e){if(e.deliveryMethod===`bot`){let t=e.botToken.trim(),n=t.length>0?t:e.botTokenAlreadySet?sr:``;return{slackDelivery:`bot`,slackChannelId:e.channelId,slackBotToken:n}}return{slackDelivery:`webhook`,slackWebhook:e.webhook}}function _i(e){return e.deliveryMethod===`bot`?{webhook:null,botDestination:{channelId:e.channelId,botToken:e.botToken.trim()||null}}:{webhook:e.webhook||null,botDestination:null}}var vi=[{value:`webhook`,label:`Incoming webhook`},{value:`bot`,label:`Slack app (bot)`}],yi=`display_information:
1003
+ name: LangWatch
1004
+ oauth_config:
1005
+ scopes:
1006
+ bot:
1007
+ - chat:write
1008
+ - chat:write.public
1009
+ - channels:read
1010
+ - groups:read`;function bi({onUpgrade:e}){return(0,F.jsx)(u,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,bg:`bg.subtle`,padding:3,children:(0,F.jsxs)(T,{justify:`space-between`,gap:3,align:`center`,children:[(0,F.jsxs)(E,{align:`start`,gap:0,children:[(0,F.jsx)(d,{textStyle:`xs`,fontWeight:`medium`,color:`fg`,children:`Get charts, tables, and alert banners`}),(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`Move this automation to a Slack app to unlock the richer templates.`})]}),(0,F.jsx)(o,{size:`xs`,variant:`outline`,flexShrink:0,onClick:e,children:`Switch to a Slack app`})]})})}function xi({projectId:e,automationId:t,slice:n,onChange:r}){let a=je.automation.listSlackChannels.useMutation(),c=n.botToken.trim(),l=a.data?.channels,u=l??[],f=n=>{m.current=n,a.mutate({projectId:e,botToken:c||null,automationId:t},{onError:e=>console.error(`[slack] listSlackChannels failed`,e)})},p=c?/^xoxb-/.test(c)?`typed:${c}`:null:n.botTokenAlreadySet||t?`stored`:null,m=(0,N.useRef)(null);(0,N.useEffect)(()=>{if(!p||m.current===p)return;let e=p.startsWith(`typed:`)?600:0,t=setTimeout(()=>f(p),e);return()=>clearTimeout(t)},[p]);let{contains:h}=tt({sensitivity:`base`}),{collection:g,filter:_,set:ee}=nt({initialItems:[],filter:h});(0,N.useEffect)(()=>{ee((l??[]).map(e=>({value:e.id,label:`${e.isPrivate?`🔒 `:`#`}${e.name}`})))},[l]);let te=c.length>0||n.botTokenAlreadySet||!!t,v=a.data?.error&&a.data.error!==`no_token`?a.data.error:null,y=a.isError?`Couldn't load channels: ${a.error?.message??`request failed`}. You can still type the channel above.`:v===`missing_scope`?`Add the channels:read scope to your app and reinstall it to pick from a list — you can still type the channel above.`:v?`Couldn't load channels from Slack. Check the token, or type the channel above.`:null;return(0,F.jsxs)(C,{children:[(0,F.jsxs)(T,{justify:`space-between`,align:`center`,width:`full`,children:[(0,F.jsx)(w,{children:`Channel`}),te?(0,F.jsx)(o,{variant:`plain`,size:`xs`,height:`auto`,paddingX:0,color:`fg.muted`,_hover:{color:`fg`},disabled:a.isPending,onClick:()=>f(p??`manual:${Date.now()}`),children:a.isPending?`Loading…`:`Reload`}):null]}),(0,F.jsxs)(de,{collection:g,size:`sm`,width:`full`,allowCustomValue:!0,openOnClick:!0,value:n.channelId?[n.channelId]:[],onValueChange:e=>r({...n,channelId:e.value[0]??``}),onInputValueChange:e=>{_(e.inputValue),e.reason===`input-change`&&r({...n,channelId:e.inputValue})},onOpenChange:e=>{e.open&&_(``)},children:[(0,F.jsxs)(fe,{children:[(0,F.jsx)(ue,{placeholder:a.isPending?`Loading channels…`:`#alerts or C0123…`}),(0,F.jsxs)(ie,{children:[a.isPending?(0,F.jsx)(i,{size:`xs`}):null,(0,F.jsx)(ce,{})]})]}),(0,F.jsx)(s,{children:(0,F.jsx)(oe,{zIndex:`max`,children:(0,F.jsxs)(le,{children:[(0,F.jsx)(se,{children:a.isPending?`Loading channels…`:u.length===0?`Type a channel name or ID`:`No match — press Enter to use what you typed`}),g.items.map(e=>(0,F.jsxs)(pe,{item:e,children:[(0,F.jsx)(ae,{children:e.label}),(0,F.jsx)(he,{})]},e.value))]})})})]}),y?(0,F.jsx)(d,{textStyle:`xs`,color:a.isError?`fg.error`:`fg.muted`,pt:1,children:y}):null]})}function Si(e){return{emailSubjectTemplate:null,emailBodyTemplate:null,slackTemplate:e.template.value.trim().length>0?e.template.value:null,slackTemplateType:e.templateType}}function Ci(e){return{allowGatedBlocks:e.deliveryMethod===`bot`}}function wi({slice:e,onChange:t,ctx:n}){let r=e.templateType===`block_kit`,i=n.sourceKind===`report`,a=i&&ai(n.reportSourceKind),s=Hn(n.sourceKind),c=r?s.slackBlockKit:s.slackString,l=e.template.value||c,f=n.preview,p=(0,N.useMemo)(()=>Gn(n.variables,n.cadenceMode),[n.variables,n.cadenceMode]),[m,h]=(0,N.useState)(r&&!e.template.usingDefault&&!si(e.template.value)?`code`:`template`);return(0,N.useEffect)(()=>{let r=si(e.template.value);if(!r)return;let i=r.cadenceFit!==`both`&&r.cadenceFit!==n.cadenceMode,a=r.kind!==n.sourceKind,o=r.kind===`report`&&n.reportSourceKind!==void 0&&!(r.reportSources??[]).includes(n.reportSourceKind);!i&&!a&&!o||t({...e,template:G})},[n.cadenceMode,n.sourceKind,n.reportSourceKind]),(0,N.useEffect)(()=>{if(!i||!r||!e.template.usingDefault)return;let a=ii({cadence:n.cadenceMode,hasEvaluationFilter:n.hasEvaluationFilter,kind:`report`,reportSource:n.reportSourceKind}),o=ri.find(e=>e.id===a);!o||e.template.value===o.source||t({...e,template:{value:o.source,usingDefault:!0}})},[i,r,e.template.usingDefault,n.reportSourceKind,n.cadenceMode]),(0,F.jsxs)(E,{align:`stretch`,gap:4,children:[e.isLegacyWebhook?(0,F.jsxs)(C,{children:[(0,F.jsx)(w,{children:`Connection`}),(0,F.jsx)(Xe,{size:`sm`,value:e.deliveryMethod,onValueChange:({value:n})=>{n&&t({...e,deliveryMethod:n})},items:vi}),(0,F.jsx)(be,{children:e.deliveryMethod===`webhook`?`This automation uses a webhook. Move it to a Slack app for charts, tables, and alert banners.`:`Renders charts, tables, and alert banners.`})]}):null,e.deliveryMethod===`bot`?(0,F.jsx)(Ti,{slice:e,onChange:t,projectId:n.projectId,automationId:n.automationId}):(0,F.jsxs)(E,{align:`stretch`,gap:3,children:[(0,F.jsx)(bi,{onUpgrade:()=>t({...e,deliveryMethod:`bot`})}),(0,F.jsxs)(C,{children:[(0,F.jsx)(w,{children:`Slack webhook URL`}),(0,F.jsx)(D,{value:e.webhook,onChange:n=>t({...e,webhook:n.target.value}),placeholder:`https://hooks.slack.com/services/...`}),(0,F.jsx)(Ei,{projectId:n.projectId,currentWebhook:e.webhook,onPick:n=>t({...e,webhook:n})})]})]}),(0,F.jsx)(Kn,{onTestFire:n.onTestFire,loading:n.testFireLoading,disabled:!pi(e),hint:pi(e)?void 0:e.deliveryMethod===`bot`?`Add a token and channel first`:`Add a webhook URL first`}),(0,F.jsx)(vn,{label:`Message`,usingDefault:e.template.usingDefault,onReset:()=>t({...e,template:G}),trailing:(0,F.jsx)(L,{variables:p})}),r?(0,F.jsxs)(E,{align:`stretch`,gap:3,children:[(0,F.jsx)(Xe,{size:`sm`,alignSelf:`start`,value:m,onValueChange:({value:e})=>{e&&h(e)},items:[{value:`template`,label:`Template`},{value:`code`,label:`Code`}]}),m===`template`?a?(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`Every panel on the dashboard is sent as its own chart. There's nothing to lay out; switch to Code to edit the message yourself.`}):(0,F.jsx)(ui,{cadence:n.cadenceMode,kind:n.sourceKind,reportSource:n.reportSourceKind,deliveryMethod:e.deliveryMethod,hasEvaluationFilter:n.hasEvaluationFilter,currentSource:l,onSelect:n=>t({...e,template:{value:n.source,usingDefault:!1}}),onSelectOtherCadence:r=>{n.setNotificationCadence(r.cadenceFit===`digest`?`5min_digest`:`immediate`),t({...e,template:{value:r.source,usingDefault:!1}})}}):(0,F.jsxs)(E,{align:`stretch`,gap:2,children:[(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`Write the layout yourself in Block Kit. Values in braces fill in from your trace or alert when the message sends.`}),(0,F.jsx)(u,{"data-testid":`slack-code-editor`,children:(0,F.jsx)(H,{variables:p,height:`320px`,language:B,value:l,onChange:n=>t({...e,template:{value:n,usingDefault:!1}}),jsonSchema:Bt,jsonSchemaShadowUri:`file:///automation/slack-block-kit-shadow.json`})})]}),f?(0,F.jsx)(Cn,{payload:f.payload}):null,(0,F.jsx)(o,{variant:`plain`,size:`xs`,width:`fit-content`,paddingX:0,color:`fg.muted`,_hover:{color:`fg`},onClick:()=>t({...e,templateType:`string`,template:G}),children:`Write the message as plain text instead`})]}):(0,F.jsxs)(E,{align:`stretch`,gap:3,children:[(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`Write the message Slack will post. Markdown and variables are supported.`}),(0,F.jsx)(u,{"data-testid":`slack-text-editor`,children:(0,F.jsx)(H,{variables:p,height:`200px`,value:l,onChange:n=>t({...e,template:{value:n,usingDefault:!1}})})}),f?(0,F.jsx)(Cn,{payload:f.payload}):null,(0,F.jsx)(o,{variant:`plain`,size:`xs`,width:`fit-content`,paddingX:0,color:`fg.muted`,_hover:{color:`fg`},onClick:()=>t({...e,templateType:`block_kit`,template:G}),children:`Use a guided template instead`})]})]})}function Ti({slice:e,onChange:t,projectId:n,automationId:r}){let i=(0,N.useRef)(null),[a,s]=(0,N.useState)(!1),[c,l]=(0,N.useState)(!1),f=e.botTokenAlreadySet&&e.botToken.length===0;return(0,F.jsxs)(E,{align:`stretch`,gap:3,children:[(0,F.jsx)(u,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,bg:`bg.subtle`,padding:3,children:(0,F.jsxs)(E,{align:`stretch`,gap:2,children:[(0,F.jsx)(d,{textStyle:`xs`,color:`fg`,children:`Post to your Slack workspace with a bot token. Create a Slack app, then paste its token below.`}),(0,F.jsxs)(T,{gap:3,children:[(0,F.jsxs)(We,{href:`https://api.slack.com/apps`,isExternal:!0,textStyle:`xs`,fontWeight:`medium`,display:`inline-flex`,alignItems:`center`,gap:1,children:[`Create a Slack app `,(0,F.jsx)(_e,{size:12})]}),(0,F.jsx)(o,{variant:`plain`,size:`xs`,height:`auto`,paddingX:0,color:`fg.muted`,_hover:{color:`fg`},onClick:()=>{navigator.clipboard?.writeText(yi),l(!0),setTimeout(()=>l(!1),1500)},children:c?`Manifest copied`:`Copy app manifest`})]}),(0,F.jsx)(yn,{triggerLabel:`Setup steps`,open:a,onToggle:()=>s(e=>!e),children:(0,F.jsxs)(we,{as:`ol`,gap:1,paddingLeft:4,children:[(0,F.jsx)(Ce,{children:(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`Create the app with “From a manifest” and paste the copied manifest — it sets the permissions for you.`})}),(0,F.jsx)(Ce,{children:(0,F.jsxs)(d,{textStyle:`xs`,color:`fg.muted`,children:[`Install it to your workspace and copy the Bot User OAuth Token (`,(0,F.jsx)(_,{size:`sm`,children:`xoxb-`}),`).`]})}),(0,F.jsx)(Ce,{children:(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`Invite the bot to the channel you post to.`})})]})})]})}),(0,F.jsxs)(C,{children:[(0,F.jsx)(w,{children:`Bot User OAuth Token`}),(0,F.jsx)(D,{ref:i,type:`password`,autoComplete:`off`,value:e.botToken,onChange:n=>t({...e,botToken:n.target.value}),placeholder:e.botTokenAlreadySet?`•••••••• (unchanged, leave blank to keep)`:`xoxb-…`}),f?(0,F.jsxs)(T,{gap:1,pt:1,children:[(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`A token is already saved.`}),(0,F.jsx)(o,{variant:`plain`,size:`xs`,height:`auto`,paddingX:0,color:`fg.muted`,_hover:{color:`fg`},onClick:()=>i.current?.focus(),children:`Replace token`})]}):null]}),(0,F.jsx)(xi,{projectId:n,automationId:r,slice:e,onChange:t})]})}function Ei({projectId:e,currentWebhook:t,onPick:n}){let r=je.automation.getTriggers.useQuery({projectId:e},{enabled:!!e,refetchOnWindowFocus:!1}),i=(0,N.useMemo)(()=>{let e=new Set,n=[];for(let i of r.data??[]){if(i.action!==`SEND_SLACK_MESSAGE`)continue;let r=(i.actionParams??{}).slackWebhook;r&&r!==t&&(e.has(r)||(e.add(r),n.push({value:r,label:i.name})))}return n},[r.data,t]),a=(0,N.useMemo)(()=>y({items:i}),[i]);return r.isLoading||i.length===0?null:(0,F.jsxs)(b.Root,{collection:a,value:[],onValueChange:({value:e})=>{let t=e[0];t&&n(t)},mt:2,children:[(0,F.jsx)(b.Trigger,{children:(0,F.jsx)(b.ValueText,{placeholder:`Reuse webhook from another automation…`})}),(0,F.jsx)(b.Content,{children:i.map(e=>(0,F.jsx)(b.Item,{item:e,children:(0,F.jsx)(d,{children:e.label})},e.value))})]})}var Di={Icon:Pt,channel:`slack`,initialSlice:fi,isComplete:pi,summary:mi,fromTriggerRow:hi,toActionParams:gi,testFireTarget:_i,templatesFromSlice:Si,previewOptions:Ci,ConfigForm:wi},Oi=[`POST`,`PUT`,`PATCH`],ki=`__kept__`,Ai=j(Oi),ji=new Set([`host`,`content-length`,`content-type`,`transfer-encoding`,`connection`]),Mi=`x-langwatch-`;function Ni(e){let t=e.trim().toLowerCase();return ji.has(t)||t.startsWith(Mi)}var Pi=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Fi(e){let t={};for(let[n,r]of Object.entries(e)){let e=n.trim();if(!e||!Pi.test(e)||Ni(e))continue;let i=r.replace(/[\r\n\0]+/g,` `).trim();i&&(t[e]=i)}return t}function Ii(e){let t;try{t=new URL(e)}catch{return`Enter a valid URL.`}return t.protocol===`https:`?t.hostname?t.port!==``&&t.port!==`443`?`Only the default https port (443) is allowed.`:t.username||t.password?`The webhook URL cannot carry credentials.`:null:`The webhook URL needs a host.`:`The webhook URL must use https.`}var Li=O({url:M().trim().min(1,`A webhook URL is required.`).superRefine((e,t)=>{let n=Ii(e);n&&t.addIssue({code:`custom`,message:n})}),method:Ai.default(`POST`),headers:Be(M(),M()).default({}).transform(Fi),bodyTemplate:M().nullable().default(null)}),Ri={action:I.SEND_WEBHOOK,category:`notify`,label:`Webhook`,description:`Send a JSON payload to your own endpoint when a trace matches.`,alertDescription:`Send a JSON payload to your own endpoint when the alert fires.`,actionParamsSchema:Li},zi=0;function Bi(e){return zi+=1,{id:`hdr_${zi}`,name:``,value:``,kept:!1,...e}}var Vi={value:``,usingDefault:!0};function Hi(){return{url:``,method:`POST`,headers:[],template:Vi}}function Ui(e){return Ii(e.url.trim())===null}function Wi(e,t){let n=t.name||`(unnamed)`,r=(()=>{try{return new URL(e.url).hostname}catch{return null}})();return`${n} → ${e.method} ${r??`(URL not set)`}`}function Gi(e){let t=e.actionParams??{},n=Object.entries(t.headers??{}).map(([e,t])=>Bi(t===`__kept__`?{name:e,kept:!0}:{name:e,value:t}));return{url:typeof t.url==`string`?t.url:``,method:Oi.includes(t.method)?t.method:`POST`,headers:n,template:{value:t.bodyTemplate??``,usingDefault:t.bodyTemplate==null}}}function Ki(e){let t={};for(let n of e){let e=n.name.trim();e&&(t[e]=n.kept?ki:n.value)}return t}function qi(e){return e.template.value.trim().length>0?e.template.value:null}function Ji(e){return{url:e.url.trim(),method:e.method,headers:Ki(e.headers),bodyTemplate:qi(e)}}function Yi(e){return{webhook:null,webhookDestination:{url:e.url.trim(),method:e.method,headers:Ki(e.headers),bodyTemplate:qi(e)}}}function Xi(e){return{emailSubjectTemplate:null,emailBodyTemplate:null,slackTemplate:null,slackTemplateType:null}}function Zi({attempt:e}){let t=e?.channel===`webhook`?e:null;return t?t.status===`success`?(0,F.jsxs)(d,{textStyle:`xs`,color:`fg.success`,"data-testid":`webhook-test-result`,children:[`Delivered`,t.httpStatus?` — HTTP ${t.httpStatus}`:``,`.`]}):(0,F.jsxs)(E,{align:`start`,gap:0,"data-testid":`webhook-test-result`,children:[(0,F.jsx)(d,{textStyle:`xs`,color:`fg.error`,fontWeight:`medium`,children:t.errorTitle??`Test request failed`}),t.errorDetail?(0,F.jsx)(d,{textStyle:`xs`,color:`fg.error`,children:t.errorDetail}):null]}):null}function Qi({slice:e,onChange:t}){let n=(n,r)=>{let i=e.headers.map((e,t)=>t===n?r:e);t({...e,headers:i})},r=n=>t({...e,headers:e.headers.filter((e,t)=>t!==n)});return(0,F.jsxs)(C,{children:[(0,F.jsx)(w,{children:`Headers`}),(0,F.jsxs)(E,{align:`stretch`,gap:2,width:`full`,children:[e.headers.map((e,t)=>{let i=e.name.trim()!==``&&Ni(e.name);return(0,F.jsxs)(E,{align:`stretch`,gap:1,children:[(0,F.jsxs)(T,{gap:2,children:[(0,F.jsx)(D,{size:`sm`,flex:`1`,value:e.name,placeholder:`Authorization`,onChange:r=>n(t,{...e,name:r.target.value,kept:!1})}),(0,F.jsx)(D,{size:`sm`,flex:`2`,value:e.value,placeholder:e.kept?`•••••• (saved)`:`Bearer …`,onChange:r=>n(t,{...e,value:r.target.value,kept:!1})}),(0,F.jsx)(ye,{size:`sm`,variant:`ghost`,"aria-label":`Remove header`,onClick:()=>r(t),children:(0,F.jsx)(ge,{size:14})})]}),i?(0,F.jsx)(d,{textStyle:`xs`,color:`fg.error`,children:`This header is set by LangWatch and will be ignored.`}):null]},e.id)}),(0,F.jsxs)(o,{size:`xs`,variant:`outline`,width:`fit-content`,onClick:()=>t({...e,headers:[...e.headers,Bi()]}),children:[(0,F.jsx)(Fe,{size:13}),` Add header`]})]}),(0,F.jsx)(be,{children:`Sent with every request — for example an Authorization header your endpoint expects. Values are stored encrypted and never shown again.`})]})}var $i=Oi.map(e=>({value:e,label:e}));function ea({slice:e,onChange:t,ctx:n}){let r=e.url.trim()===``?null:Ii(e.url.trim()),i=Hn(n.sourceKind),a=e.template.value||i.webhookBody,o=(0,N.useMemo)(()=>Gn(n.variables,n.cadenceMode),[n.variables,n.cadenceMode]),s=n.preview;return(0,F.jsxs)(E,{align:`stretch`,gap:4,children:[(0,F.jsxs)(C,{invalid:!!r,children:[(0,F.jsx)(w,{children:`Endpoint URL`}),(0,F.jsx)(D,{value:e.url,onChange:n=>t({...e,url:n.target.value}),placeholder:`https://example.com/hooks/langwatch`}),r?(0,F.jsx)(xe,{children:r}):(0,F.jsx)(be,{children:`An https endpoint you control. The request body is JSON.`})]}),(0,F.jsxs)(C,{children:[(0,F.jsx)(w,{children:`Method`}),(0,F.jsx)(Xe,{size:`sm`,value:e.method,onValueChange:({value:n})=>{n&&t({...e,method:n})},items:$i})]}),(0,F.jsx)(Qi,{slice:e,onChange:t}),(0,F.jsxs)(E,{align:`start`,gap:2,children:[(0,F.jsx)(Kn,{onTestFire:n.onTestFire,loading:n.testFireLoading,disabled:!Ui(e),hint:Ui(e)?void 0:`Add a valid https URL first`}),(0,F.jsx)(Zi,{attempt:n.lastTestAttempt})]}),(0,F.jsx)(vn,{label:`JSON body`,usingDefault:e.template.usingDefault,onReset:()=>t({...e,template:Vi}),trailing:(0,F.jsx)(L,{variables:o})}),(0,F.jsxs)(E,{align:`stretch`,gap:2,children:[(0,F.jsx)(d,{textStyle:`xs`,color:`fg.muted`,children:`Write the JSON your endpoint receives. Values in braces fill in from your trace or alert when the request sends.`}),(0,F.jsx)(u,{"data-testid":`webhook-body-editor`,children:(0,F.jsx)(H,{variables:o,height:`280px`,language:B,value:a,onChange:n=>t({...e,template:{value:n,usingDefault:!1}})})}),s?(0,F.jsxs)(u,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,bg:`bg.subtle`,padding:3,"data-testid":`webhook-preview`,children:[(0,F.jsxs)(d,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,mb:1,children:[s.payload.method,` `,s.payload.url||`(no URL yet)`]}),(0,F.jsx)(d,{as:`pre`,textStyle:`xs`,fontFamily:`mono`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:ta(s.payload.body)}),s.errors.length>0?(0,F.jsxs)(d,{textStyle:`xs`,color:`fg.error`,mt:1,children:[s.errors[0],` — the default body will be sent instead.`]}):null]}):null]})]})}function ta(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}var na={Icon:Ae,channel:`webhook`,initialSlice:Hi,isComplete:Ui,summary:Wi,fromTriggerRow:Gi,toActionParams:Ji,testFireTarget:Yi,templatesFromSlice:Xi,ConfigForm:ea};function K(e){return e.shared.category===`notify`}var q={[P.TriggerAction.SEND_EMAIL]:{shared:Yn,client:ar},[P.TriggerAction.SEND_SLACK_MESSAGE]:{shared:ur,client:Di},[P.TriggerAction.SEND_WEBHOOK]:{shared:Ri,client:na},[P.TriggerAction.ADD_TO_DATASET]:{shared:Nt,client:At},[P.TriggerAction.ADD_TO_ANNOTATION_QUEUE]:{shared:_t,client:ht}};Object.values(q).filter(e=>K(e)),Object.values(q).filter(e=>e.shared.category===`action`);function ra(){return{[P.TriggerAction.SEND_EMAIL]:ar.initialSlice(),[P.TriggerAction.SEND_SLACK_MESSAGE]:Di.initialSlice(),[P.TriggerAction.SEND_WEBHOOK]:na.initialSlice(),[P.TriggerAction.ADD_TO_DATASET]:At.initialSlice(),[P.TriggerAction.ADD_TO_ANNOTATION_QUEUE]:ht.initialSlice()}}var ia=[`gt`,`lt`,`gte`,`lte`,`eq`],aa=[1,5,15,30,60,1440],oa=j(ia),sa=Ne([k(1),k(5),k(15),k(30),k(60),k(1440)]),ca=O({threshold:Ve().finite(),operator:oa,timePeriod:sa,seriesName:M().min(1,`Pick a series to monitor.`)});function la(e){if(typeof e!=`object`||!e)return null;let t=ca.safeParse(e);return t.success?{...e,...t.data}:null}function J(e){return Date.UTC(e.y,e.m-1,e.d,e.h,e.i,e.s)}function ua(e,t){return e.y===t.y&&e.m===t.m&&e.d===t.d&&e.h===t.h&&e.i===t.i&&e.s===t.s}function da(e,t){let n=new Date(Date.parse(e));if(isNaN(n))throw Error(`Invalid ISO8601 passed to timezone parser.`);let r=e.substring(9);return r.includes(`Z`)||r.includes(`+`)||r.includes(`-`)?ma(n.getUTCFullYear(),n.getUTCMonth()+1,n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),`Etc/UTC`):ma(n.getFullYear(),n.getMonth()+1,n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),t)}function fa(e,t,n){return pa(da(e,t),n)}function pa(e,t){let n=new Date(J(e)),r=Y(n,e.tz),i=J(e)-J(r),a=new Date(n.getTime()+i),o=Y(a,e.tz);if(ua(o,e)){let t=new Date(a.getTime()-36e5);return ua(Y(t,e.tz),e)?t:a}let s=new Date(a.getTime()+J(e)-J(o));if(ua(Y(s,e.tz),e))return s;if(t)throw Error(`Invalid date passed to fromTZ()`);return a.getTime()>s.getTime()?a:s}function Y(e,t){let n,r;try{n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`,hour12:!1}),r=n.formatToParts(e)}catch(e){let n=e instanceof Error?e.message:String(e);throw RangeError(`toTZ: Invalid timezone '${t}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${n}`)}let i={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let e of r)(e.type===`year`||e.type===`month`||e.type===`day`||e.type===`hour`||e.type===`minute`||e.type===`second`)&&(i[e.type]=parseInt(e.value,10));if(isNaN(i.year)||isNaN(i.month)||isNaN(i.day)||isNaN(i.hour)||isNaN(i.minute)||isNaN(i.second))throw Error(`toTZ: Failed to parse all date components from timezone '${t}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(i)}`);return i.hour===24&&(i.hour=0),{y:i.year,m:i.month,d:i.day,h:i.hour,i:i.minute,s:i.second,tz:t}}function ma(e,t,n,r,i,a,o){return{y:e,m:t,d:n,h:r,i,s:a,tz:o}}var ha=[1,2,4,8,16],ga=class{pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor(e,t,n){this.pattern=e,this.timezone=t,this.mode=n?.mode??`auto`,this.alternativeWeekdays=n?.alternativeWeekdays??!1,this.sloppyRanges=n?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!(typeof this.pattern==`string`||this.pattern instanceof String))throw TypeError(`CronPattern: Pattern has to be of type string.`);this.pattern.indexOf(`@`)>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let e=this.pattern.match(/\S+/g)||[``],t=e.length;if(e.length<5||e.length>7)throw TypeError(`CronPattern: invalid configuration format ('`+this.pattern+`'), exactly five, six, or seven space separated parts are required.`);if(this.mode!==`auto`){let e;switch(this.mode){case`5-part`:e=5;break;case`6-part`:e=6;break;case`7-part`:e=7;break;case`5-or-6-parts`:e=[5,6];break;case`6-or-7-parts`:e=[6,7];break;default:e=0}if(!(Array.isArray(e)?e.includes(t):t===e)){let n=Array.isArray(e)?e.join(` or `):e.toString();throw TypeError(`CronPattern: mode '${this.mode}' requires exactly ${n} parts, but pattern '${this.pattern}' has ${t} parts.`)}}if(e.length===5&&e.unshift(`0`),e.length===6&&e.push(`*`),e[3].toUpperCase()===`LW`?(this.lastWeekday=!0,e[3]=``):e[3].toUpperCase().indexOf(`L`)>=0&&(e[3]=e[3].replace(/L/gi,``),this.lastDayOfMonth=!0),e[3]==`*`&&(this.starDOM=!0),e[6]==`*`&&(this.starYear=!0),e[4].length>=3&&(e[4]=this.replaceAlphaMonths(e[4])),e[5].length>=3&&(e[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz(e[5]):this.replaceAlphaDays(e[5])),e[5].startsWith(`+`)&&(this.useAndLogic=!0,e[5]=e[5].substring(1),e[5]===``))throw TypeError(`CronPattern: Day-of-week field cannot be empty after '+' modifier.`);switch(e[5]==`*`&&(this.starDOW=!0),this.pattern.indexOf(`?`)>=0&&(e[0]=e[0].replace(/\?/g,`*`),e[1]=e[1].replace(/\?/g,`*`),e[2]=e[2].replace(/\?/g,`*`),e[3]=e[3].replace(/\?/g,`*`),e[4]=e[4].replace(/\?/g,`*`),e[5]=e[5].replace(/\?/g,`*`),e[6]&&=e[6].replace(/\?/g,`*`)),this.mode){case`5-part`:e[0]=`0`,e[6]=`*`;break;case`6-part`:e[6]=`*`;break;case`5-or-6-parts`:e[6]=`*`;break;case`6-or-7-parts`:break;case`7-part`:case`auto`:break}this.throwAtIllegalCharacters(e),this.partToArray(`second`,e[0],0,1),this.partToArray(`minute`,e[1],0,1),this.partToArray(`hour`,e[2],0,1),this.partToArray(`day`,e[3],-1,1),this.partToArray(`month`,e[4],-1,1);let n=this.alternativeWeekdays?-1:0;this.partToArray(`dayOfWeek`,e[5],n,63),this.partToArray(`year`,e[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(e,t,n,r){let i=this[e],a=e===`day`&&this.lastDayOfMonth,o=e===`day`&&this.lastWeekday;if(t===``&&!a&&!o)throw TypeError(`CronPattern: configuration entry `+e+` (`+t+`) is empty, check for trailing spaces.`);if(t===`*`)return i.fill(r);let s=t.split(`,`);if(s.length>1)for(let t=0;t<s.length;t++)this.partToArray(e,s[t],n,r);else t.indexOf(`-`)!==-1&&t.indexOf(`/`)!==-1?this.handleRangeWithStepping(t,e,n,r):t.indexOf(`-`)===-1?t.indexOf(`/`)===-1?t!==``&&this.handleNumber(t,e,n,r):this.handleStepping(t,e,n,r):this.handleRange(t,e,n,r)}throwAtIllegalCharacters(e){for(let t=0;t<e.length;t++)if((t===3?/[^/*0-9,\-WwLl]+/:t===5?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test(e[t]))throw TypeError(`CronPattern: configuration entry `+t+` (`+e[t]+`) contains illegal characters.`)}handleNumber(e,t,n,r){let i=this.extractNth(e,t),a=e.toUpperCase().includes(`W`);if(t!==`day`&&a)throw TypeError(`CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.`);a&&(t=`nearestWeekdays`);let o=parseInt(i[0],10)+n;if(isNaN(o))throw TypeError(`CronPattern: `+t+` is not a number: '`+e+`'`);this.setPart(t,o,i[1]||r)}setPart(e,t,n){if(!Object.prototype.hasOwnProperty.call(this,e))throw TypeError(`CronPattern: Invalid part specified: `+e);if(e===`dayOfWeek`){if(t===7&&(t=0),t<0||t>6)throw RangeError(`CronPattern: Invalid value for dayOfWeek: `+t);this.setNthWeekdayOfMonth(t,n);return}if(e===`second`||e===`minute`){if(t<0||t>=60)throw RangeError(`CronPattern: Invalid value for `+e+`: `+t)}else if(e===`hour`){if(t<0||t>=24)throw RangeError(`CronPattern: Invalid value for `+e+`: `+t)}else if(e===`day`||e===`nearestWeekdays`){if(t<0||t>=31)throw RangeError(`CronPattern: Invalid value for `+e+`: `+t)}else if(e===`month`){if(t<0||t>=12)throw RangeError(`CronPattern: Invalid value for `+e+`: `+t)}else if(e===`year`&&(t<1||t>=1e4))throw RangeError(`CronPattern: Invalid value for `+e+`: `+t+` (supported range: 1-9999)`);this[e][t]=n}validateNotNaN(e,t){if(isNaN(e))throw TypeError(t)}validateRange(e,t,n,r,i){if(e>t)throw TypeError(`CronPattern: From value is larger than to value: '`+i+`'`);if(n!==void 0){if(n===0)throw TypeError(`CronPattern: Syntax error, illegal stepping: 0`);if(n>this[r].length)throw TypeError(`CronPattern: Syntax error, steps cannot be greater than maximum value of part (`+this[r].length+`)`)}}handleRangeWithStepping(e,t,n,r){if(e.toUpperCase().includes(`W`))throw TypeError(`CronPattern: Syntax error, W is not allowed in ranges with stepping.`);let i=this.extractNth(e,t),a=i[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(a===null)throw TypeError(`CronPattern: Syntax error, illegal range with stepping: '`+e+`'`);let[,o,s,c]=a,l=parseInt(o,10)+n,u=parseInt(s,10)+n,d=parseInt(c,10);this.validateNotNaN(l,`CronPattern: Syntax error, illegal lower range (NaN)`),this.validateNotNaN(u,`CronPattern: Syntax error, illegal upper range (NaN)`),this.validateNotNaN(d,`CronPattern: Syntax error, illegal stepping: (NaN)`),this.validateRange(l,u,d,t,e);for(let e=l;e<=u;e+=d)this.setPart(t,e,i[1]||r)}extractNth(e,t){let n=e,r;if(n.includes(`#`)){if(t!==`dayOfWeek`)throw Error(`CronPattern: nth (#) only allowed in day-of-week field`);r=n.split(`#`)[1],n=n.split(`#`)[0]}else if(n.toUpperCase().endsWith(`L`)){if(t!==`dayOfWeek`)throw Error(`CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)`);r=`L`,n=n.slice(0,-1)}return[n,r]}handleRange(e,t,n,r){if(e.toUpperCase().includes(`W`))throw TypeError(`CronPattern: Syntax error, W is not allowed in a range.`);let i=this.extractNth(e,t),a=i[0].split(`-`);if(a.length!==2)throw TypeError(`CronPattern: Syntax error, illegal range: '`+e+`'`);let o=parseInt(a[0],10)+n,s=parseInt(a[1],10)+n;this.validateNotNaN(o,`CronPattern: Syntax error, illegal lower range (NaN)`),this.validateNotNaN(s,`CronPattern: Syntax error, illegal upper range (NaN)`),this.validateRange(o,s,void 0,t,e);for(let e=o;e<=s;e++)this.setPart(t,e,i[1]||r)}handleStepping(e,t,n,r){if(e.toUpperCase().includes(`W`))throw TypeError(`CronPattern: Syntax error, W is not allowed in parts with stepping.`);let i=this.extractNth(e,t),a=i[0].split(`/`);if(a.length!==2)throw TypeError(`CronPattern: Syntax error, illegal stepping: '`+e+`'`);if(this.sloppyRanges)a[0]===``&&(a[0]=`*`);else{if(a[0]===``)throw TypeError(`CronPattern: Syntax error, stepping with missing prefix ('`+e+`') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.`);if(a[0]!==`*`)throw TypeError(`CronPattern: Syntax error, stepping with numeric prefix ('`+e+`') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.`)}let o=0;a[0]!==`*`&&(o=parseInt(a[0],10)+n);let s=parseInt(a[1],10);this.validateNotNaN(s,`CronPattern: Syntax error, illegal stepping: (NaN)`),this.validateRange(0,this[t].length-1,s,t,e);for(let e=o;e<this[t].length;e+=s)this.setPart(t,e,i[1]||r)}replaceAlphaDays(e){return e.replace(/-sun/gi,`-7`).replace(/sun/gi,`0`).replace(/mon/gi,`1`).replace(/tue/gi,`2`).replace(/wed/gi,`3`).replace(/thu/gi,`4`).replace(/fri/gi,`5`).replace(/sat/gi,`6`)}replaceAlphaDaysQuartz(e){return e.replace(/sun/gi,`1`).replace(/mon/gi,`2`).replace(/tue/gi,`3`).replace(/wed/gi,`4`).replace(/thu/gi,`5`).replace(/fri/gi,`6`).replace(/sat/gi,`7`)}replaceAlphaMonths(e){return e.replace(/jan/gi,`1`).replace(/feb/gi,`2`).replace(/mar/gi,`3`).replace(/apr/gi,`4`).replace(/may/gi,`5`).replace(/jun/gi,`6`).replace(/jul/gi,`7`).replace(/aug/gi,`8`).replace(/sep/gi,`9`).replace(/oct/gi,`10`).replace(/nov/gi,`11`).replace(/dec/gi,`12`)}handleNicknames(e){let t=e.trim().toLowerCase();if(t===`@yearly`||t===`@annually`)return`0 0 1 1 *`;if(t===`@monthly`)return`0 0 1 * *`;if(t===`@weekly`)return`0 0 * * 0`;if(t===`@daily`||t===`@midnight`)return`0 0 * * *`;if(t===`@hourly`)return`0 * * * *`;if(t===`@reboot`)throw TypeError(`CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.`);return e}setNthWeekdayOfMonth(e,t){if(typeof t!=`number`&&t.toUpperCase()===`L`)this.dayOfWeek[e]=this.dayOfWeek[e]|32;else if(t===63)this.dayOfWeek[e]=63;else if(t<6&&t>0)this.dayOfWeek[e]=this.dayOfWeek[e]|ha[t-1];else throw TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${t}, Type: ${typeof t}`)}},_a=[31,28,31,30,31,30,31,31,30,31,30,31],X=[[`month`,`year`,0],[`day`,`month`,-1],[`hour`,`day`,0],[`minute`,`hour`,0],[`second`,`minute`,0]],Z=class e{tz;ms;second;minute;hour;day;month;year;constructor(t,n){if(this.tz=n,t&&t instanceof Date)if(!isNaN(t))this.fromDate(t);else throw TypeError(`CronDate: Invalid date passed to CronDate constructor`);else if(t==null)this.fromDate(new Date);else if(t&&typeof t==`string`)this.fromString(t);else if(t instanceof e)this.fromCronDate(t);else throw TypeError(`CronDate: Invalid type (`+typeof t+`) passed to CronDate constructor`)}getLastDayOfMonth(e,t){return t===1?new Date(Date.UTC(e,t+1,0)).getUTCDate():_a[t]}getLastWeekday(e,t){let n=this.getLastDayOfMonth(e,t),r=new Date(Date.UTC(e,t,n)).getUTCDay();return r===0?n-2:r===6?n-1:n}getNearestWeekday(e,t,n){let r=this.getLastDayOfMonth(e,t);if(n>r)return-1;let i=new Date(Date.UTC(e,t,n)).getUTCDay();return i===0?n===r?n-2:n+1:i===6?n===1?n+2:n-1:n}isNthWeekdayOfMonth(e,t,n,r){let i=new Date(Date.UTC(e,t,n)).getUTCDay(),a=0;for(let r=1;r<=n;r++)new Date(Date.UTC(e,t,r)).getUTCDay()===i&&a++;if(r&63&&ha[a-1]&r)return!0;if(r&32){let r=this.getLastDayOfMonth(e,t);for(let a=n+1;a<=r;a++)if(new Date(Date.UTC(e,t,a)).getUTCDay()===i)return!1;return!0}return!1}fromDate(e){if(this.tz!==void 0)if(typeof this.tz==`number`)this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes()+this.tz,this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply();else try{let t=Y(e,this.tz);this.ms=e.getMilliseconds(),this.second=t.s,this.minute=t.i,this.hour=t.h,this.day=t.d,this.month=t.m-1,this.year=t.y}catch(e){let t=e instanceof Error?e.message:String(e);throw TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${t}`)}else this.ms=e.getMilliseconds(),this.second=e.getSeconds(),this.minute=e.getMinutes(),this.hour=e.getHours(),this.day=e.getDate(),this.month=e.getMonth(),this.year=e.getFullYear()}fromCronDate(e){this.tz=e.tz,this.year=e.year,this.month=e.month,this.day=e.day,this.hour=e.hour,this.minute=e.minute,this.second=e.second,this.ms=e.ms}apply(){if(this.month>11||this.month<0||this.day>_a[this.month]||this.day<1||this.hour>59||this.minute>59||this.second>59||this.hour<0||this.minute<0||this.second<0){let e=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),!0}else return!1}fromString(e){if(typeof this.tz==`number`){let t=fa(e);this.ms=t.getUTCMilliseconds(),this.second=t.getUTCSeconds(),this.minute=t.getUTCMinutes(),this.hour=t.getUTCHours(),this.day=t.getUTCDate(),this.month=t.getUTCMonth(),this.year=t.getUTCFullYear(),this.apply()}else return this.fromDate(fa(e,this.tz))}findNext(e,t,n,r){return this._findMatch(e,t,n,r,1)}_findMatch(e,t,n,r,i){let a=this[t],o;n.lastDayOfMonth&&(o=this.getLastDayOfMonth(this.year,this.month));let s=!n.starDOW&&t==`day`?new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay():void 0,c=this[t]+r,l=i===1?e=>e<n[t].length:e=>e>=0;for(let u=c;l(u);u+=i){let i=n[t][u];if(t===`day`&&!i){for(let e=0;e<n.nearestWeekdays.length;e++)if(n.nearestWeekdays[e]){let t=this.getNearestWeekday(this.year,this.month,e-r);if(t===-1)continue;if(t===u-r){i=1;break}}}if(t===`day`&&n.lastWeekday){let e=this.getLastWeekday(this.year,this.month);u-r===e&&(i=1)}if(t===`day`&&n.lastDayOfMonth&&u-r==o&&(i=1),t===`day`&&!n.starDOW){let t=n.dayOfWeek[(s+(u-r-1))%7];if(t&&t&63)t=+!!this.isNthWeekdayOfMonth(this.year,this.month,u-r,t);else if(t)throw Error(`CronDate: Invalid value for dayOfWeek encountered. ${t}`);n.useAndLogic?i&&=t:!e.domAndDow&&!n.starDOM?i||=t:i&&=t}if(i)return this[t]=u-r,a===this[t]?1:2}return 3}recurse(e,t,n){if(n===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let t=-1;for(let n=this.year+1;n<e.year.length&&n<1e4;n++)if(e.year[n]===1){t=n;break}if(t===-1)return null;this.year=t,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let r=this.findNext(t,X[n][0],e,X[n][2]);if(r>1){let i=n+1;for(;i<X.length;)this[X[i][0]]=-X[i][2],i++;if(r===3){if(this[X[n][1]]++,this[X[n][0]]=-X[n][2],this.apply(),n===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=e.year.length)return null}return this.recurse(e,t,0)}else if(this.apply())return this.recurse(e,t,n-1)}return n+=1,n>=X.length?this:(e.starYear?this.year>=3e3:this.year>=1e4)?null:this.recurse(e,t,n)}increment(e,t,n){return this.second+=t.interval!==void 0&&t.interval>1&&n?t.interval:1,this.ms=0,this.apply(),this.recurse(e,t,0)}decrement(e,t){return this.second-=t.interval!==void 0&&t.interval>1?t.interval:1,this.ms=0,this.apply(),this.recurseBackward(e,t,0,0)}recurseBackward(e,t,n,r=0){if(r>1e4)return null;if(n===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let t=-1;for(let n=this.year-1;n>=0;n--)if(e.year[n]===1){t=n;break}if(t===-1)return null;this.year=t,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let i=this.findPrevious(t,X[n][0],e,X[n][2]);if(i>1){let a=n+1;for(;a<X.length;){let t=X[a][0],n=X[a][2],r=this.getMaxPatternValue(t,e,n);this[t]=r,a++}if(i===3){if(this[X[n][1]]--,n===0){let e=this.getLastDayOfMonth(this.year,this.month);this.day>e&&(this.day=e)}if(n===1)if(this.day<=0)this.day=1;else{let e=this.year,t=this.month;for(;t<0;)t+=12,e--;for(;t>11;)t-=12,e++;let n=t===1?new Date(Date.UTC(e,t+1,0)).getUTCDate():_a[t];this.day>n&&(this.day=n)}this.apply();let i=X[n][0],a=X[n][2],o=this.getMaxPatternValue(i,e,a);if(i===`day`){let e=this.getLastDayOfMonth(this.year,this.month);this[i]=Math.min(o,e)}else this[i]=o;if(this.apply(),n===0){let t=X[1][2],n=this.getMaxPatternValue(`day`,e,t),r=this.getLastDayOfMonth(this.year,this.month),i=Math.min(n,r);i!==this.day&&(this.day=i,this.hour=this.getMaxPatternValue(`hour`,e,X[2][2]),this.minute=this.getMaxPatternValue(`minute`,e,X[3][2]),this.second=this.getMaxPatternValue(`second`,e,X[4][2]))}if(n===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0;)this.year--;if(this.year<0)return null}return this.recurseBackward(e,t,0,r+1)}else if(this.apply())return this.recurseBackward(e,t,n-1,r+1)}return n+=1,n>=X.length?this:this.year<0?null:this.recurseBackward(e,t,n,r+1)}getMaxPatternValue(e,t,n){if(e===`day`&&t.lastDayOfMonth||e===`day`&&!t.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let r=t[e].length-1;r>=0;r--)if(t[e][r])return r-n;return t[e].length-1-n}findPrevious(e,t,n,r){return this._findMatch(e,t,n,r,-1)}getDate(e){return e||this.tz===void 0?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):typeof this.tz==`number`?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):pa(ma(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(e,t){if(!e.starYear&&(this.year<0||this.year>=e.year.length||e.year[this.year]===0))return!1;for(let n=0;n<X.length;n++){let r=X[n][0],i=X[n][2],a=this[r];if(a+i<0||a+i>=e[r].length)return!1;let o=e[r][a+i];if(r===`day`){if(!o){for(let t=0;t<e.nearestWeekdays.length;t++)if(e.nearestWeekdays[t]){let e=this.getNearestWeekday(this.year,this.month,t-i);if(e!==-1&&e===a){o=1;break}}}if(e.lastWeekday&&a===this.getLastWeekday(this.year,this.month)&&(o=1),e.lastDayOfMonth&&a===this.getLastDayOfMonth(this.year,this.month)&&(o=1),!e.starDOW){let n=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),r=e.dayOfWeek[(n+(a-1))%7];r&&r&63&&(r=+!!this.isNthWeekdayOfMonth(this.year,this.month,a,r)),e.useAndLogic?o&&=r:!t.domAndDow&&!e.starDOM?o||=r:o&&=r}}if(!o)return!1}return!0}};function va(e){if(e===void 0&&(e={}),delete e.name,e.legacyMode!==void 0&&e.domAndDow===void 0?e.domAndDow=!e.legacyMode:e.domAndDow===void 0&&(e.domAndDow=!1),e.legacyMode=!e.domAndDow,e.paused=e.paused===void 0?!1:e.paused,e.maxRuns=e.maxRuns===void 0?1/0:e.maxRuns,e.catch=e.catch===void 0?!1:e.catch,e.interval=e.interval===void 0?0:parseInt(e.interval.toString(),10),e.utcOffset=e.utcOffset===void 0?void 0:parseInt(e.utcOffset.toString(),10),e.dayOffset=e.dayOffset===void 0?0:parseInt(e.dayOffset.toString(),10),e.unref=e.unref===void 0?!1:e.unref,e.mode=e.mode===void 0?`auto`:e.mode,e.alternativeWeekdays=e.alternativeWeekdays===void 0?!1:e.alternativeWeekdays,e.sloppyRanges=e.sloppyRanges===void 0?!1:e.sloppyRanges,![`auto`,`5-part`,`6-part`,`7-part`,`5-or-6-parts`,`6-or-7-parts`].includes(e.mode))throw Error(`CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.`);if(e.startAt&&=new Z(e.startAt,e.timezone),e.stopAt&&=new Z(e.stopAt,e.timezone),e.interval!==null){if(isNaN(e.interval))throw Error(`CronOptions: Supplied value for interval is not a number`);if(e.interval<0)throw Error(`CronOptions: Supplied value for interval can not be negative`)}if(e.utcOffset!==void 0){if(isNaN(e.utcOffset))throw Error(`CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.`);if(e.utcOffset<-870||e.utcOffset>870)throw Error(`CronOptions: utcOffset out of bounds.`);if(e.utcOffset!==void 0&&e.timezone)throw Error(`CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.`)}if(e.unref!==!0&&e.unref!==!1)throw Error(`CronOptions: Unref should be either true, false or undefined(false).`);if(e.dayOffset!==void 0&&e.dayOffset!==0&&isNaN(e.dayOffset))throw Error(`CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.`);return e}function Q(e){return Object.prototype.toString.call(e)===`[object Function]`||typeof e==`function`||e instanceof Function}function ya(e){return Q(e)}function ba(e){typeof Deno<`u`&&typeof Deno.unrefTimer<`u`?Deno.unrefTimer(e):e&&typeof e.unref<`u`&&e.unref()}var xa=30*1e3,Sa=[],Ca=class{name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset(e){if(this.options.dayOffset!==void 0&&this.options.dayOffset!==0){let t=this.options.dayOffset*24*60*60*1e3;return new Date(e.getTime()+t)}return e}constructor(e,t,n){let r,i;if(Q(t))i=t;else if(typeof t==`object`)r=t;else if(t!==void 0)throw Error(`Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).`);if(Q(n))i=n;else if(typeof n==`object`)r=n;else if(n!==void 0)throw Error(`Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).`);if(this.name=r?.name,this.options=va(r),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:r?r.maxRuns:void 0,paused:r?r.paused:!1,pattern:new ga(`* * * * *`,void 0,{mode:`auto`})},e&&(e instanceof Date||typeof e==`string`&&e.indexOf(`:`)>0)?this._states.once=new Z(e,this.getTz()):this._states.pattern=new ga(e,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(Sa.find(e=>e.name===this.name))throw Error(`Cron: Tried to initialize new named job '`+this.name+`', but name already taken.`);Sa.push(this)}return i!==void 0&&ya(i)&&(this.fn=i,this.schedule()),this}nextRun(e){let t=this._next(e);return t?this.applyDayOffset(t.getDate(!1)):null}nextRuns(e,t){this._states.maxRuns!==void 0&&e>this._states.maxRuns&&(e=this._states.maxRuns);let n=t||this._states.currentRun||void 0;return this._enumerateRuns(e,n,`next`)}previousRuns(e,t){return this._enumerateRuns(e,t||void 0,`previous`)}_enumerateRuns(e,t,n){let r=[],i=t?new Z(t,this.getTz()):null,a=n===`next`?this._next:this._previous;for(;e--;){let e=a.call(this,i);if(!e)break;let t=e.getDate(!1);r.push(this.applyDayOffset(t)),i=e}return r}match(e){if(this._states.once){let t=new Z(e,this.getTz());t.ms=0;let n=new Z(this._states.once,this.getTz());return n.ms=0,t.getTime()===n.getTime()}let t=new Z(e,this.getTz());return t.ms=0,t.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let e=this.nextRun(this._states.currentRun),t=!this._states.paused,n=this.fn!==void 0,r=!this._states.kill;return t&&n&&r&&e!==null}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(e){let t=this._next(e);return t?e instanceof Z||e instanceof Date?t.getTime()-e.getTime():t.getTime()-new Z(e).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let e=Sa.indexOf(this);e>=0&&Sa.splice(e,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(e){if(e&&this.fn)throw Error(`Cron: It is not allowed to schedule two functions using the same Croner instance.`);e&&(this.fn=e);let t=this.msToNext(),n=this.nextRun(this._states.currentRun);return t==null||isNaN(t)||n===null?this:(t>xa&&(t=xa),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(n),t),this._states.currentTimeout&&this.options.unref&&ba(this._states.currentTimeout),this)}async _trigger(e){this._states.blocking=!0,this._states.currentRun=new Z(void 0,this.getTz());try{if(this.options.catch)try{this.fn!==void 0&&await this.fn(this,this.options.context)}catch(e){if(Q(this.options.catch))try{this.options.catch(e,this)}catch{}}else this.fn!==void 0&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new Z(e,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(e){let t=new Date,n=!this._states.paused&&t.getTime()>=e.getTime(),r=this._states.blocking&&this.options.protect;n&&!r?(this._states.maxRuns!==void 0&&this._states.maxRuns--,this._trigger()):n&&r&&Q(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next(e){let t=!!(e||this._states.currentRun),n=!1;!e&&this.options.startAt&&this.options.interval&&([e,t]=this._calculatePreviousRun(e,t),n=!e),e=new Z(e,this.getTz()),this.options.startAt&&e&&e.getTime()<this.options.startAt.getTime()&&(e=this.options.startAt);let r=this._states.once||new Z(e,this.getTz());return!n&&r!==this._states.once&&(r=r.increment(this._states.pattern,this.options,t)),this._states.once&&this._states.once.getTime()<=e.getTime()||r===null||this._states.maxRuns!==void 0&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&r.getTime()>=this.options.stopAt.getTime()?null:r}_previous(e){let t=new Z(e,this.getTz());this.options.stopAt&&t.getTime()>this.options.stopAt.getTime()&&(t=this.options.stopAt);let n=new Z(t,this.getTz());return this._states.once?this._states.once.getTime()<t.getTime()?this._states.once:null:(n=n.decrement(this._states.pattern,this.options),n===null||this.options.startAt&&n.getTime()<this.options.startAt.getTime()?null:n)}_calculatePreviousRun(e,t){let n=new Z(void 0,this.getTz()),r=e;if(this.options.startAt.getTime()<=n.getTime()){r=this.options.startAt;let e=r.getTime()+this.options.interval*1e3;for(;e<=n.getTime();)r=new Z(r,this.getTz()).increment(this._states.pattern,this.options,!0),e=r.getTime()+this.options.interval*1e3;t=!0}return r===null&&(r=void 0),[r,t]}},wa=M().min(1).max(64),Ta=M().min(1).max(120),Ea=900*1e3,Da=5,Oa=5,ka=O({cron:Ta,timezone:wa}).superRefine(({cron:e,timezone:t},n)=>{let r=(e,t)=>{n.addIssue({code:Ie.custom,path:[e],message:t})};try{new Intl.DateTimeFormat(`en-US`,{timeZone:t})}catch{r(`timezone`,`"${t}" is not a known timezone. Pick an IANA zone such as "Europe/Amsterdam" or "UTC".`);return}if(e.trim().split(/\s+/).length!==Oa){r(`cron`,`A report schedule is a 5-field cron expression (minute hour day-of-month month day-of-week), for example "0 9 * * 1".`);return}let i;try{i=new Ca(e,{timezone:t}).nextRuns(Da,new Date)}catch{r(`cron`,`"${e}" is not a valid cron expression.`);return}if(i.length<2){r(`cron`,`"${e}" does not run on a repeating schedule. Pick a schedule that comes due more than once.`);return}Math.min(...i.slice(1).map((e,t)=>e.getTime()-i[t].getTime()))<9e5&&r(`cron`,`A report can send at most every ${Ea/6e4} minutes. This schedule sends more often than that.`)}),Aa=Ue(`kind`,[O({kind:k(`dashboard`),dashboardId:M().min(1)}),O({kind:k(`customGraph`),customGraphId:M().min(1)}),O({kind:k(`traceQuery`),filters:Be(M(),Ge()).default({}),metric:M().optional(),topN:Ve().int().min(1).max(100).default(5)})]);O({source:Aa,schedule:ka,compareToPrevious:ze().default(!1)});function ja({cron:e,timezone:t}){if(e.trim()===``)return`Enter a cron schedule.`;let n=ka.safeParse({cron:e,timezone:t.trim()||`UTC`});return n.success?null:n.error.issues[0]?.message??`This schedule can't be saved.`}function Ma({cron:e,timezone:t}){return ja({cron:e,timezone:t})===null}var Na={frequency:`weekly`,hour:9,minute:0,dayOfWeek:1,dayOfMonth:1},Pa=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],Fa=[{value:1,short:`Mon`,long:`Monday`},{value:2,short:`Tue`,long:`Tuesday`},{value:3,short:`Wed`,long:`Wednesday`},{value:4,short:`Thu`,long:`Thursday`},{value:5,short:`Fri`,long:`Friday`},{value:6,short:`Sat`,long:`Saturday`},{value:0,short:`Sun`,long:`Sunday`}],Ia={daily:`Daily`,weekly:`Weekly`,monthly:`Monthly`};function La(e){let t=e%100;if(t>=11&&t<=13)return`${e}th`;switch(e%10){case 1:return`${e}st`;case 2:return`${e}nd`;case 3:return`${e}rd`;default:return`${e}th`}}var Ra=e=>String(e).padStart(2,`0`);function za(e){return`${Ra(e.hour)}:${Ra(e.minute)}`}function Ba(e){let{minute:t,hour:n}=e;switch(e.frequency){case`daily`:return`${t} ${n} * * *`;case`weekly`:return`${t} ${n} * * ${e.dayOfWeek}`;case`monthly`:return`${t} ${n} ${e.dayOfMonth} * *`}}function Va(e,t,n){if(!/^\d+$/.test(e))return null;let r=Number(e);return r>=t&&r<=n?r:null}function Ha(e){let t=e.trim().split(/\s+/);if(t.length!==5)return null;let[n,r,i,a,o]=t,s=Va(n??``,0,59),c=Va(r??``,0,23);if(s===null||c===null||a!==`*`)return null;let l={hour:c,minute:s,dayOfWeek:1,dayOfMonth:1};if(i===`*`&&o===`*`)return{...l,frequency:`daily`};if(i===`*`&&o!==`*`){let e=Va(o??``,0,6);return e===null?null:{...l,frequency:`weekly`,dayOfWeek:e}}if(i!==`*`&&o===`*`){let e=Va(i??``,1,31);return e===null?null:{...l,frequency:`monthly`,dayOfMonth:e}}return null}function Ua(e,t){let n=za(e),r=t.trim()||`UTC`;switch(e.frequency){case`daily`:return`Sends every day at ${n} (${r})`;case`weekly`:return`Sends every ${Pa[e.dayOfWeek]??`day`} at ${n} (${r})`;case`monthly`:return`Sends on the ${La(e.dayOfMonth)} of each month at ${n} (${r})`}}function Wa(e,t){let n=Ha(e);return n?Ua(n,t):`${e.trim()} (${t.trim()||`UTC`})`}function Ga(){try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return e&&e.length>0?e:`UTC`}catch{return`UTC`}}var Ka=[`UTC`,`America/Los_Angeles`,`America/Denver`,`America/Chicago`,`America/New_York`,`America/Sao_Paulo`,`Europe/London`,`Europe/Amsterdam`,`Europe/Berlin`,`Europe/Paris`,`Europe/Madrid`,`Europe/Moscow`,`Africa/Johannesburg`,`Asia/Dubai`,`Asia/Kolkata`,`Asia/Singapore`,`Asia/Shanghai`,`Asia/Tokyo`,`Australia/Sydney`,`Pacific/Auckland`];function qa(){try{if(typeof Intl.supportedValuesOf==`function`){let e=Intl.supportedValuesOf(`timeZone`);if(e.length>0)return e}}catch{}return Ka}function Ja(e){let t=new Map;for(let n of e){let e=n.indexOf(`/`),r=e===-1?`General`:n.slice(0,e),i=t.get(r)??[];i.push(n),t.set(r,i)}return[...t.entries()].sort(([e],[t])=>e===`General`?-1:t===`General`?1:e.localeCompare(t)).map(([e,t])=>({region:e,zones:t.sort()}))}var $={sourceKind:`traceQuery`,customGraphId:null,dashboardId:null,topN:5,cron:`0 9 * * 1`,timezone:`UTC`},Ya={seriesName:``,operator:`gt`,threshold:0,timePeriod:60},Xa={action:null,name:``,alertType:null,source:`trace`,filters:{},filterQuery:null,customGraphId:null,graphAlert:Ya,report:$,notificationCadence:`5min_digest`,traceDebounceMs:st,cadenceConfirmed:!1,slices:ra()};function Za(e,t){switch(t.type){case`HYDRATE`:return t.value;case`SET_ACTION`:return{...e,action:t.value};case`SET_NAME`:return{...e,name:t.value};case`SET_ALERT_TYPE`:return{...e,alertType:t.value};case`SET_SOURCE`:return t.value===`customGraph`?{...e,source:`customGraph`,filters:{},filterQuery:null,action:e.action===`SEND_EMAIL`||e.action===`SEND_SLACK_MESSAGE`?e.action:null}:t.value===`report`?{...e,source:`report`,filters:{},customGraphId:null,alertType:null,action:e.action===`SEND_EMAIL`||e.action===`SEND_SLACK_MESSAGE`?e.action:null}:{...e,source:`trace`,customGraphId:null,alertType:null};case`SET_CUSTOM_GRAPH_ID`:return{...e,customGraphId:t.value};case`SET_FILTERS`:return{...e,filters:t.value};case`SET_FILTER_QUERY`:return{...e,filterQuery:t.value};case`SET_GRAPH_ALERT`:return{...e,graphAlert:t.value};case`SET_REPORT`:return{...e,report:t.value};case`SET_CADENCE`:return{...e,notificationCadence:t.value,cadenceConfirmed:!0};case`SET_TRACE_DEBOUNCE_MS`:return{...e,traceDebounceMs:t.value,cadenceConfirmed:!0};case`CONFIRM_CADENCE`:return e.cadenceConfirmed?e:{...e,cadenceConfirmed:!0};case`SET_SLICE`:return{...e,slices:{...e.slices,[t.action]:t.slice}}}}function Qa(e,t){switch(e){case`customGraph`:return{title:t?`Edit alert`:`New alert`,saveButton:t?`Save alert`:`Create alert`,createdToast:`Alert created`,updatedToast:`Alert updated`,noun:`alert`};case`report`:return{title:t?`Edit schedule`:`New schedule`,saveButton:t?`Save schedule`:`Create schedule`,createdToast:`Schedule created`,updatedToast:`Schedule updated`,noun:`schedule`};case`trace`:return{title:t?`Edit automation`:`Add automation`,saveButton:t?`Save changes`:`Create automation`,createdToast:`Automation created`,updatedToast:`Automation updated`,noun:`automation`}}}function $a(e){if(!e.action)return null;let t=q[e.action];return K(t)?t.client.channel:null}var eo={emailSubjectTemplate:null,emailBodyTemplate:null,slackTemplate:null,slackTemplateType:null};function to(e){if(!e.action)return eo;let t=q[e.action];return K(t)?t.client.templatesFromSlice(e.slices[e.action]):eo}function no({draft:e,projectId:t,channel:n,webhook:r,botDestination:i,webhookDestination:a,automationId:o,graphName:s,seriesLabel:c}){let l=e.source===`customGraph`,u=e.source===`report`;return{projectId:t,channel:n,trigger:{name:e.name||`Your automation`,alertType:e.alertType},draft:to(e),webhook:r,botDestination:i??null,webhookDestination:a??null,...o?{automationId:o}:{},graphAlert:l?{graphName:s??void 0,metricLabel:c??void 0,operator:e.graphAlert.operator,threshold:e.graphAlert.threshold,timePeriodMinutes:e.graphAlert.timePeriod}:null,report:u?{sourceKind:e.report.sourceKind,scheduleLabel:Wa(e.report.cron,e.report.timezone)}:null}}function ro(e){return e.action?q[e.action].client.toActionParams(e.slices[e.action]):{}}function io(e){return Object.values(e).some(e=>e&&(Array.isArray(e)?e.length>0:Object.keys(e).length>0))}function ao(e){if(e.source===`customGraph`)return e.customGraphId!==null&&e.graphAlert.seriesName.length>0;if(e.source===`report`){let t=e.report;return t.sourceKind===`traceQuery`||t.sourceKind===`customGraph`&&t.customGraphId!==null||t.sourceKind===`dashboard`&&t.dashboardId!==null}return oo(e.filterQuery)||io(e.filters)}function oo(e){return(e??``).trim().length>0}function so(e){return e.source===`customGraph`?Number.isFinite(e.graphAlert.threshold):e.source===`report`?Ma({cron:e.report.cron,timezone:e.report.timezone}):!0}function co(e){return!ao(e)||!so(e)?!1:e.source===`customGraph`?e.alertType!==null:!0}function lo(e){return e.action?q[e.action].client.isComplete(e.slices[e.action]):!1}var uo={gt:`greater than`,lt:`less than`,gte:`greater than or equal`,lte:`less than or equal`,eq:`equal to`},fo={1:`1 minute`,5:`5 minutes`,15:`15 minutes`,30:`30 minutes`,60:`1 hour`,1440:`1 day`};function po(e){return e.action?q[e.action].client.summary(e.slices[e.action],{name:e.name}):`Choose a type first`}function mo(e){return e.action?K(q[e.action]):!1}function ho(e){let t=la(e);return t?{operator:t.operator,timePeriod:t.timePeriod,threshold:t.threshold,seriesName:t.seriesName}:Ya}function go(e){if(typeof e!=`object`||!e)return $;let{source:t,schedule:n}=e,r={...$,cron:typeof n?.cron==`string`?n.cron:$.cron,timezone:typeof n?.timezone==`string`&&n.timezone.trim()!==``?n.timezone:$.timezone},i=Aa.safeParse(t);if(!i.success)return r;let a=i.data;return{...r,sourceKind:a.kind,customGraphId:a.kind===`customGraph`?a.customGraphId:null,dashboardId:a.kind===`dashboard`?a.dashboardId:null,topN:a.kind===`traceQuery`?a.topN:$.topN}}function _o(e){let t={cron:e.cron,timezone:e.timezone};return e.sourceKind===`customGraph`?{source:{kind:`customGraph`,customGraphId:e.customGraphId??``},schedule:t,compareToPrevious:!1}:e.sourceKind===`dashboard`?{source:{kind:`dashboard`,dashboardId:e.dashboardId??``},schedule:t,compareToPrevious:!1}:{source:{kind:`traceQuery`,filters:{},topN:e.topN},schedule:t,compareToPrevious:!1}}function vo(e){if(!e||typeof e!=`object`)return[];let t=e.series;return Array.isArray(t)?t.map((t,n)=>{let r=Ze(e,n);if(!r)return null;let i=t??{},a=r.split(`/`).slice(1).join(` / `);return{key:r,label:(typeof i.name==`string`&&i.name.length>0?i.name:null)??`Series ${n+1}: ${a}`}}).filter(e=>e!==null):[]}function yo(e,t){return t?vo(e).find(e=>e.key===t)?.label??null:null}export{Ja as A,Wn as B,Na as C,ja as D,Ba as E,za as F,Nn as G,En as H,aa as I,ot as J,Hn as K,q as L,Ha as M,Ua as N,Ga as O,qa as P,K as R,to as S,Fa as T,Ln as U,Dn as V,On as W,ct as X,st as Y,it as Z,$a as _,fo as a,_o as b,so as c,po as d,ho as f,mo as g,io as h,uo as i,La as j,Wa as k,co as l,oo as m,yo as n,ro as o,go as p,at as q,Xa as r,no as s,vo as t,lo as u,Qa as v,Ia as w,ao as x,Za as y,Un as z};
1011
+ //# sourceMappingURL=seriesOptions-0YtTiTzZ.js.map