@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
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{n as i}from"./toaster-CRP22oRW.js";import{a,i as o,n as s,r as c,t as l}from"./alert-C5hocQt_.js";import{t as u}from"./h-stack-CMPhqSp5.js";import{t as d}from"./v-stack-ClAMS101.js";import{r as f}from"./next-router-Bn5Y8Iek.js";import{n as p}from"./api-BK6L1im2.js";import{t as m}from"./SetupLayout-DQ1mB1du.js";import{s as h}from"./auth-client-4OIM4EvK.js";import{Fn as g,Pn as _,zt as v}from"./index-CUhcyBp3.js";import{t as y}from"./LoadingScreen-D0JSh0Q2.js";var b=e(t());function x(e){window.location.href=e}var S=new Set,C=new Map,w=new Set;function T(e,t){C.set(e,t);for(let e of w)e()}function E(e){return w.add(e),()=>w.delete(e)}function D({inviteCode:e,enabled:t}){let n=p.organization.acceptInvite.useMutation({onSuccess:(e,t)=>{T(t.inviteCode,{status:`success`,errorMessage:null}),i.create({title:`Invite Accepted`,description:`You have successfully accepted the invite for ${e.invite.organization.name}.`,type:`success`,meta:{closable:!0},duration:5e3}),x(e.project?.slug?`/${e.project.slug}`:`/`)},onError:(e,t)=>{if(e.message===`Invite was already accepted`){T(t.inviteCode,{status:`already-accepted`,errorMessage:null}),x(`/`);return}T(t.inviteCode,{status:`error`,errorMessage:e.message}),_(g(e),{tags:{source:`useAcceptInviteOnce`}})}}),{mutate:r}=n,a=t&&typeof e==`string`,o=(0,b.useSyncExternalStore)(E,()=>typeof e==`string`?C.get(e):void 0);return(0,b.useEffect)(()=>{a&&typeof e==`string`&&(S.has(e)||(S.add(e),r({inviteCode:e})))},[a,e,r]),{status:O(n,a,o),errorMessage:n.error?.message??o?.errorMessage??null}}function O(e,t,n){return t?e.isSuccess?`success`:e.isError?e.error?.message===`Invite was already accepted`?`already-accepted`:`error`:n?n.status:`loading`:`idle`}var k=r();function A(){let{inviteCode:e}=f().query,{data:t}=v(),{status:r,errorMessage:i}=D({inviteCode:typeof e==`string`?e:void 0,enabled:!!t});return r===`idle`||r===`loading`||r===`success`||r===`already-accepted`?(0,k.jsx)(y,{}):(0,k.jsx)(m,{children:(0,k.jsxs)(d,{gap:4,children:[(0,k.jsxs)(o,{status:`error`,children:[(0,k.jsx)(c,{}),(0,k.jsxs)(l,{children:[(0,k.jsx)(a,{children:`An error occurred while accepting the invite.`}),(0,k.jsx)(s,{children:i})]})]}),(0,k.jsxs)(u,{gap:3,children:[(0,k.jsx)(n,{colorPalette:`orange`,onClick:()=>x(`/`),children:`Go to Dashboard`}),(0,k.jsx)(n,{variant:`outline`,onClick:()=>void h(),children:`Log Out and Try Again`})]})]})})}export{A as default};
2
- //# sourceMappingURL=accept-D3cDvj0y.js.map
@@ -1 +0,0 @@
1
- import e from"./automations-ChfL33YS.js";export{e as default};
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{t as r}from"./box-Ck5lef6C.js";import{t as i}from"./skeleton-YwQIu7Tp.js";import{t as a}from"./text-A3qvcMyN.js";import{s as o}from"./shikiAdapter-S_u9TjIh.js";import{An as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c}from"./toaster-CRP22oRW.js";import{I as l,q as u}from"./ExternalImage-DbtOSrKl.js";import{r as d,t as f}from"./external-link-BzETHrAG.js";import{r as p}from"./UpgradeModal-BmLw5ONS.js";import{r as m,t as h}from"./card-54_vstoB.js";import{a as g,i as _,n as v,r as y,t as b}from"./empty-state-Al7XUd1I.js";import{t as x}from"./h-stack-CMPhqSp5.js";import{t as S}from"./spacer-CbmCSsJg.js";import{O as C}from"./immer-tl_oI9yy.js";import{t as w}from"./v-stack-ClAMS101.js";import{t as T}from"./DashboardLayout-RHGL-98_.js";import{t as E}from"./arrow-up-DVKoLGAx.js";import{t as D}from"./code-RXLqs93S.js";import{t as O}from"./globe-DJqSMfhQ.js";import{t as k}from"./refresh-cw-BNkF8mW1.js";import{r as A}from"./next-router-Bn5Y8Iek.js";import{n as j,u as M}from"./api-BK6L1im2.js";import{t as N}from"./src-RcSZrN9Q.js";import{L as P,Wt as F,_n as I}from"./lu-DlSq9Be4.js";import{Hn as L,Mr as R,Qn as z,Rt as B,V as ee,w as V,yr as H}from"./index-CUhcyBp3.js";import{t as U}from"./WithPermissionGuard-BP1dFkpM.js";import{t as W}from"./CascadeArchiveDialog-DSo9Fwed.js";import{n as G,t as K}from"./useProjectsForCopy-DxbxCEv5.js";import{t as q}from"./PushToCopiesDialog-C3eBpZ9F.js";import{t as J}from"./LangyContextTarget-DUSindiC.js";var Y=e(t()),X=n(),Z={signature:o,code:D,http:O,workflow:L},Q={signature:`Prompt`,code:`Code`,http:`HTTP`,workflow:`Workflow`};function te({agent:e,onClick:t,onEdit:n,onDelete:i,onOpenWorkflow:o,onReplicate:c,onPushToCopies:d,onSyncFromSource:p,onViewHistory:g}){let _=Z[e.type]??H,v=Q[e.type]??e.type,y=!!e.copiedFromAgentId,b=(e._count?.copiedAgents??0)>0;return(0,X.jsx)(J,{target:C({agentId:e.id,name:e.name}),children:(0,X.jsx)(m,{variant:`elevated`,onClick:e=>{e.target.closest(`.js-inner-menu`)||t?.()},cursor:`pointer`,height:`142px`,transition:`all 0.2s ease-in-out`,"data-testid":`agent-card-${e.id}`,children:(0,X.jsx)(h,{padding:4,children:(0,X.jsxs)(w,{align:`start`,gap:2,height:`full`,children:[(0,X.jsxs)(x,{width:`full`,children:[(0,X.jsx)(r,{bg:`blue.subtle`,padding:1,borderRadius:`md`,children:(0,X.jsx)(_,{size:18,color:`var(--chakra-colors-blue-fg)`})}),(0,X.jsx)(S,{}),(n||i)&&(0,X.jsxs)(l.Root,{children:[(0,X.jsx)(l.Trigger,{className:`js-inner-menu`,onClick:e=>e.stopPropagation(),children:(0,X.jsx)(s,{size:16})}),(0,X.jsxs)(l.Content,{className:`js-inner-menu`,portalled:!1,children:[n&&(0,X.jsxs)(l.Item,{value:`edit`,onClick:e=>{e.stopPropagation(),n()},children:[(0,X.jsx)(F,{size:14}),`Edit`]}),e.type===`workflow`&&o&&(0,X.jsxs)(l.Item,{value:`open-workflow`,onClick:e=>{e.stopPropagation(),o()},"data-testid":`agent-open-workflow-${e.id}`,children:[(0,X.jsx)(f,{size:14}),`Open Workflow`]}),y&&p&&(0,X.jsxs)(l.Item,{value:`sync`,onClick:e=>{e.stopPropagation(),p()},children:[(0,X.jsx)(k,{size:14}),` Update from source`]}),b&&d&&(0,X.jsxs)(l.Item,{value:`push`,onClick:e=>{e.stopPropagation(),d()},children:[(0,X.jsx)(E,{size:14}),` Push to replicas`]}),c&&(0,X.jsxs)(l.Item,{value:`replicate`,onClick:e=>{e.stopPropagation(),c()},children:[(0,X.jsx)(u,{size:14}),` Replicate to another project`]}),g&&(0,X.jsxs)(l.Item,{value:`view-history`,onClick:e=>{e.stopPropagation(),g()},children:[(0,X.jsx)(P,{size:14}),`View history`]}),i&&(0,X.jsxs)(l.Item,{value:`delete`,color:`red.500`,onClick:e=>{e.stopPropagation(),i()},children:[(0,X.jsx)(I,{size:14}),`Delete`]})]})]})]}),(0,X.jsx)(S,{}),(0,X.jsx)(a,{color:`fg.muted`,fontSize:`sm`,fontWeight:500,children:e.name}),(0,X.jsxs)(a,{color:`fg.subtle`,fontSize:`12px`,children:[v,` • `,V(new Date(e.updatedAt).getTime())]})]})})})})}function ne(e){switch(e){case`code`:return`agentCodeEditor`;case`http`:return`agentHttpEditor`;case`workflow`:return`agentWorkflowEditor`;case`signature`:throw Error(`Unhandled agent type: ${e} — signature agents have no editor drawer`);default:throw Error(`Unhandled agent type: ${e}`)}}var $=N(`CopyAgentDialog`),re=({open:e,onClose:t,onSuccess:n,agentId:r,agentName:i})=>{let{project:a}=B(),o=j.agents.copy.useMutation(),s=K(`evaluations:manage`);return a?(0,X.jsx)(G,{open:e,onClose:t,onSuccess:n,title:`Replicate Agent`,entityLabel:`Agent`,sourceName:i,sourceId:r,sourceProjectId:a.id,projects:s,onCopy:async({projectId:e,sourceProjectId:t})=>{await o.mutateAsync({agentId:r,projectId:e,sourceProjectId:t})},isLoading:o.isLoading,logError:$.error.bind($)}):null};function ie(){let e=j.useContext();return j.agents.pushToCopies.useMutation({onSuccess:(t,n)=>{e.agents.getAll.invalidate({projectId:n.projectId})}})}var ae=({open:e,onClose:t,agentId:n,agentName:r})=>{let{project:i}=B(),a=ie(),[o,s]=(0,Y.useState)(new Set),{data:c,isLoading:l,error:u}=j.agents.getCopies.useQuery({projectId:i?.id??``,agentId:n},{enabled:e&&!!i?.id&&!!n}),[d,f]=(0,Y.useState)([]);return(0,Y.useEffect)(()=>{c&&(f(c),s(new Set(c.map(e=>e.id))))},[c]),(0,X.jsx)(q,{open:e,onClose:t,entityLabel:`Agent`,sourceName:r,copies:d,isLoading:l,error:u?{message:u.message}:null,selectedCopyIds:o,onToggleCopy:e=>{let t=new Set(o);t.has(e)?t.delete(e):t.add(e),s(t)},onPush:async()=>a.mutateAsync({agentId:n,projectId:i.id,copyIds:Array.from(o)}),pushLoading:a.isLoading,onSuccess:()=>s(new Set)})};function oe(){let{project:e,hasPermission:t}=B(),{openDrawer:n}=ee(),r=j.useContext(),a=A(),[o,s]=(0,Y.useState)(null),[l,u]=(0,Y.useState)(null),[f,m]=(0,Y.useState)(null),h=j.agents.syncFromSource.useMutation({onSuccess:(e,t)=>{r.agents.getAll.invalidate({projectId:t.projectId}),c.create({title:`Agent updated`,description:`Agent has been updated from source.`,type:`success`,meta:{closable:!0}})},onError:e=>{M(e)||c.create({title:`Error updating agent`,description:e.message??`Please try again later.`,type:`error`})}}),x=(0,Y.useCallback)(t=>{e?.id&&h.mutate({projectId:e.id,agentId:t})},[e?.id,h]),C=j.agents.getAll.useQuery({projectId:e?.id??``},{enabled:!!e}),E=j.agents.getRelatedEntities.useQuery({id:o?.id??``,projectId:e?.id??``},{enabled:!!o&&!!e?.id}),D=j.agents.delete.useMutation({onSuccess:()=>{r.agents.getAll.invalidate({projectId:e?.id??``}),r.licenseEnforcement.checkLimit.invalidate()}}),O=j.agents.cascadeArchive.useMutation({onSuccess:t=>{s(null),r.agents.getAll.invalidate({projectId:e?.id??``}),r.licenseEnforcement.checkLimit.invalidate(),c.create({title:`Agent deleted`,description:t.archivedWorkflow?`Also deleted: 1 workflow`:void 0,type:`success`,meta:{closable:!0}})},onError:()=>{c.create({title:`Error deleting agent`,description:`Please try again later.`,type:`error`})}}),k=e=>{n(ne(e.type),{urlParams:{agentId:e.id}})},N=e=>{s(e)},P=()=>{!o||!e||(E.data?.workflow?O.mutate({id:o.id,projectId:e.id}):D.mutate({id:o.id,projectId:e.id},{onSuccess:()=>{s(null),c.create({title:`Agent deleted`,type:`success`,meta:{closable:!0}})},onError:()=>{c.create({title:`Error deleting agent`,description:`Please try again later.`,type:`error`})}}))},F=t=>{t.workflowId&&e?.slug&&a.push(`/${e.slug}/studio/${t.workflowId}`)},I=C.data&&C.data.length>0,L=!C.isLoading&&!I;return(0,X.jsxs)(T,{children:[(0,X.jsxs)(p.Header,{children:[(0,X.jsx)(p.Heading,{children:`Agents`}),(0,X.jsx)(S,{}),(0,X.jsxs)(p.HeaderButton,{onClick:()=>n(`agentTypeSelector`),children:[(0,X.jsx)(z,{size:16}),` New Agent`]})]}),L?(0,X.jsx)(R,{flex:1,padding:6,children:(0,X.jsx)(_,{children:(0,X.jsxs)(b,{children:[(0,X.jsx)(y,{children:(0,X.jsx)(H,{size:32})}),(0,X.jsx)(g,{children:`No agents yet`}),(0,X.jsx)(v,{children:`Create reusable agents for your evaluations.`}),(0,X.jsxs)(p.HeaderButton,{onClick:()=>n(`agentTypeSelector`),children:[(0,X.jsx)(z,{size:16}),` Create your first agent`]})]})})}):(0,X.jsx)(w,{gap:6,width:`full`,align:`start`,padding:6,children:(0,X.jsxs)(d,{templateColumns:`repeat(auto-fill, minmax(300px, 1fr))`,gap:4,width:`full`,children:[C.isLoading&&Array.from({length:3}).map((e,t)=>(0,X.jsx)(i,{height:`100px`,borderRadius:`md`},t)),C.data?.map(e=>(0,X.jsx)(te,{agent:e,onClick:()=>k(e),onEdit:()=>k(e),onDelete:()=>N(e),onOpenWorkflow:e.type===`workflow`?()=>F(e):void 0,onReplicate:()=>u({id:e.id,name:e.name}),onPushToCopies:()=>m({id:e.id,name:e.name}),onSyncFromSource:()=>x(e.id),onViewHistory:()=>n(`agentHistory`,{urlParams:{agentId:e.id,agentName:e.name}})},e.id))]})}),(0,X.jsx)(W,{open:!!o,onClose:()=>s(null),onConfirm:P,isLoading:O.isPending||D.isPending,isLoadingRelated:E.isLoading,entityType:`agent`,entityName:o?.name??``,relatedEntities:{workflows:E.data?.workflow?[E.data.workflow]:[]}}),(0,X.jsx)(re,{open:!!l,onClose:()=>u(null),onSuccess:()=>void r.agents.getAll.invalidate({projectId:e?.id??``}),agentId:l?.id??``,agentName:l?.name??``}),(0,X.jsx)(ae,{open:!!f,onClose:()=>m(null),agentId:f?.id??``,agentName:f?.name??``})]})}var se=U(`evaluations:view`,{layoutComponent:T})(oe);export{se as default};
2
- //# sourceMappingURL=agents-BNeoLDoj.js.map
@@ -1 +0,0 @@
1
- import e from"./automations-ChfL33YS.js";export{e as default};
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{r as t}from"./portal-FJIui2Z2.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{qt as r}from"./useLiteMemberGuard-klZnweA7.js";import{t as i}from"./container-CAygaZzW.js";import{t as a}from"./h-stack-CMPhqSp5.js";import{t as o}from"./spacer-CbmCSsJg.js";import{r as s}from"./next-router-Bn5Y8Iek.js";import{n as c}from"./api-BK6L1im2.js";import{t as l}from"./download-CyGwCZjE.js";import{n as u}from"./useAnnotationQueues-BWrpwDYN.js";import{Rt as d,ni as f}from"./index-CUhcyBp3.js";import{a as p,o as m,r as h}from"./useSavedViews-CNmeuzC3.js";import{t as g}from"./papaparse.min-cQwnxGCG.js";import{t as _}from"./AnnotationsTable-DoO83AX9.js";import{t as v}from"./getSingleQueryParam-DMm5MD-J.js";var y=e(g()),b=n();function x(){let{project:e}=d(),n=s(),{filterParams:g,queryOpts:x,nonEmptyFilters:S}=h(),C=Object.keys(S).length>0,w=c.traces.getAllForProject.useQuery({...g,query:v(n.query.query),groupBy:`none`,pageOffset:0,pageSize:1e4,sortBy:v(n.query.sortBy),sortDirection:v(n.query.orderBy)},x),{period:{startDate:T,endDate:E},mode:D,setPeriod:O,setRelativePeriod:k}=m(),A=w.data?.groups.flatMap(e=>e.map(e=>e.trace_id))??[],j=r({projectId:e?.id??``,traceIds:A,enabled:C&&e?.id!==void 0}),M=c.annotation.getAll.useQuery({projectId:e?.id??``,startDate:T,endDate:E},{enabled:!C&&!!e}),N=C?j:M,P=C?w.isLoading||j.isLoading:M.isLoading,F=N.data?.map(e=>e.traceId),I=c.traces.getTracesWithSpans.useQuery({projectId:e?.id??``,traceIds:F??[]},{enabled:!!e?.id,refetchOnWindowFocus:!1}),L=(e=>{let t=e.reduce((e,t)=>{e[t.traceId]||(e[t.traceId]={traceId:t.traceId,annotations:[],trace:I.data?.find(e=>e.trace_id===t.traceId)});let n={...t,user:t.user},r=e[t.traceId];return r&&r.annotations.push(n),e},{});return Object.values(t)})(N.data??[]),R=()=>{let e=[`User`,`Input`,`Output`,`Expected Output`,`Comment`,`Trace ID`,`Rating`,`Scoring`,`Created At`],t=N?.data?.map(e=>{let t=I.data?.find(t=>t.trace_id===e.traceId);return[e.user?.name??``,t?.input?.value??``,t?.output?.value??``,e.expectedOutput??``,e.comment??``,e.traceId??``,e.isThumbsUp?`Thumbs Up`:`Thumbs Down`,JSON.stringify(e.scoreOptions??{}),e.createdAt?.toLocaleString()??``]})??[],n=y.default.unparse({fields:e,data:t}),r=window.URL.createObjectURL(new Blob([n])),i=document.createElement(`a`);i.href=r;let a=`Traces - ${new Date().toISOString().split(`T`)[0]}.csv`;i.setAttribute(`download`,a),document.body.appendChild(i),i.click(),i.remove()},z=(0,b.jsxs)(a,{width:`full`,align:`top`,children:[(0,b.jsx)(f,{as:`h1`,size:`lg`,paddingTop:1,children:`All Annotations`}),(0,b.jsx)(o,{}),(0,b.jsxs)(t,{minWidth:`fit-content`,variant:`ghost`,onClick:()=>R(),children:[`Export all `,(0,b.jsx)(l,{style:{marginLeft:`8px`}})]}),(0,b.jsx)(p,{period:{startDate:T,endDate:E},mode:D,setPeriod:O,setRelativePeriod:k})]});return(0,b.jsx)(u,{children:(0,b.jsx)(i,{maxW:`calc(100vw - 330px)`,padding:0,margin:0,children:(0,b.jsx)(_,{groupedAnnotations:L,allAnnotationsLoading:P||I.isLoading,heading:`Annotations`,isDone:!0,tableHeader:z,noDataTitle:`No recent annotations yet, change the date range to see more or annotate your messages`,noDataDescription:`Annotate your messages to add more context and improve your analysis.`})})})}export{x as default};
2
- //# sourceMappingURL=all-BHRNPEIX.js.map
@@ -1,2 +0,0 @@
1
- import{r as e}from"./portal-FJIui2Z2.js";import{t}from"./jsx-runtime-CFwixLRt.js";import{t as n}from"./box-Ck5lef6C.js";import{t as r}from"./text-A3qvcMyN.js";import{t as i}from"./tooltip-Croc0I6e.js";import{$ as a,J as o,Q as s,X as c,Y as l,Z as u,et as d}from"./ExternalImage-DbtOSrKl.js";import{r as f}from"./external-link-BzETHrAG.js";import{a as p,i as m,n as h,r as g,t as _}from"./alert-C5hocQt_.js";import{n as v,r as y,t as b}from"./card-54_vstoB.js";import{t as x}from"./icon-button-Ce2kwA7j.js";import{a as S,i as C,n as ee,t as w}from"./empty-state-Al7XUd1I.js";import{T}from"./fetchSSE-DWKCnoHV.js";import{t as E}from"./grid-item-BDl8eynK.js";import{t as D}from"./h-stack-CMPhqSp5.js";import{i as O,n as k,o as A,r as j,t as M}from"./tabs-DdHsJkYS.js";import{j as te}from"./immer-tl_oI9yy.js";import{t as N}from"./v-stack-ClAMS101.js";import{t as ne}from"./DashboardLayout-RHGL-98_.js";import{n as P}from"./api-BK6L1im2.js";import{a as F,r as I,t as L}from"./CustomGraph-C3a1gzo6.js";import{t as R}from"./bar-chart-2-Dfx5UwSl.js";import{Qn as z,Rt as B,ni as V,t as H}from"./index-CUhcyBp3.js";import{r as U}from"./useSavedViews-CNmeuzC3.js";import{t as W}from"./WithPermissionGuard-BP1dFkpM.js";import{t as G}from"./LangyContextTarget-DUSindiC.js";import{n as K,t as q}from"./FilterSidebar-0UgGuTeu.js";import{t as J}from"./GraphsLayout-ygWQTw_g.js";var Y=t(),X=()=>{let{filterParams:e,queryOpts:t}=U(),o=P.analytics.topUsedDocuments.useQuery(e,t);return o.isLoading?(0,Y.jsx)(n,{children:`Loading...`}):o.error?(0,Y.jsx)(n,{children:`An error occurred`}):(0,Y.jsxs)(N,{align:`start`,gap:4,children:[(0,Y.jsx)(r,{fontSize:``,paddingTop:4,fontWeight:600,children:`Top 10 most used documents`}),(0,Y.jsxs)(a,{variant:`line`,padding:0,margin:0,children:[(0,Y.jsx)(s,{children:(0,Y.jsxs)(d,{children:[(0,Y.jsx)(u,{paddingLeft:0,children:`Document ID`}),(0,Y.jsx)(u,{children:`Snippet`}),(0,Y.jsx)(u,{children:`Usage Count`})]})}),(0,Y.jsxs)(l,{children:[o.data?.topDocuments.length===0&&(0,Y.jsx)(d,{children:(0,Y.jsx)(c,{colSpan:2,children:`No documents found`})}),o.data?.topDocuments.map(e=>(0,Y.jsxs)(d,{children:[(0,Y.jsx)(c,{paddingLeft:0,children:(0,Y.jsx)(i,{content:e.documentId,children:(0,Y.jsx)(r,{lineClamp:1,wordBreak:`break-all`,display:`block`,children:e.documentId})})}),(0,Y.jsx)(c,{children:(0,Y.jsx)(i,{content:e.content,children:(0,Y.jsx)(r,{lineClamp:1,wordBreak:`break-all`,display:`block`,children:e.content?e.content.substring(0,255)+(e.content.length>255?`...`:``):``})})}),(0,Y.jsx)(c,{children:e.count})]},e.documentId))]})]})]})},re=()=>{let{filterParams:e,queryOpts:t}=U(),n=P.analytics.topUsedDocuments.useQuery(e,t).data?.totalUniqueDocuments;return(0,Y.jsx)(I,{current:n})},Z=1440,ie={graphId:`threadMetrics`,graphType:`summary`,series:[{name:`Threads count`,colorSet:`greenTones`,metric:`metadata.thread_id`,aggregation:`cardinality`},{name:`Avg messages per thread`,colorSet:`orangeTones`,metric:`metadata.trace_id`,aggregation:`cardinality`,pipeline:{field:`thread_id`,aggregation:`avg`}},{name:`Avg thread duration`,colorSet:`purpleTones`,metric:`threads.average_duration_per_thread`,aggregation:`avg`}],includePrevious:!1,timeScale:Z,height:300},ae=(0,Y.jsx)(C,{size:`sm`,paddingY:10,children:(0,Y.jsx)(w,{children:(0,Y.jsxs)(N,{textAlign:`center`,children:[(0,Y.jsx)(S,{textStyle:`sm`,children:`No user data yet`}),(0,Y.jsxs)(ee,{textStyle:`xs`,children:[`Start tracking users to see metrics here.`,` `,(0,Y.jsx)(`a`,{href:`https://langwatch.ai/docs/integration/metadata-and-labels`,target:`_blank`,rel:`noopener noreferrer`,style:{textDecoration:`underline`},children:`Learn how to set up`})]})]})})});function oe(){let e={graphId:`messagesCountGraph`,graphType:`line`,series:[{name:`Traces`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:F.metadata.trace_id.colorSet}],groupBy:void 0,includePrevious:!0,timeScale:Z},t={graphId:`threadsCountGraph`,graphType:`line`,series:[{name:`Threads`,metric:`metadata.thread_id`,aggregation:`cardinality`,colorSet:F.metadata.thread_id.colorSet}],groupBy:void 0,includePrevious:!0,timeScale:Z},n={graphId:`usersCountGraph`,graphType:`line`,series:[{name:`Users`,metric:`metadata.user_id`,aggregation:`cardinality`,colorSet:F.metadata.user_id.colorSet,noDataUrl:`https://langwatch.ai/docs/integration/metadata-and-labels`}],groupBy:void 0,includePrevious:!0,timeScale:Z};return(0,Y.jsxs)(f,{width:`full`,templateColumns:[`minmax(350px, 1fr)`,`minmax(350px, 1fr)`,`minmax(350px, 1fr)`,`minmax(350px, 2fr) minmax(250px, 1fr)`],gap:6,children:[(0,Y.jsx)(E,{children:(0,Y.jsx)(y,{border:`1px solid`,borderColor:`border.emphasized`,children:(0,Y.jsx)(b,{paddingTop:2,children:(0,Y.jsxs)(O,{variant:`plain`,defaultValue:`messages`,children:[(0,Y.jsxs)(j,{gap:8,children:[(0,Y.jsx)(A,{value:`messages`,paddingX:0,paddingBottom:0,height:`fit-content`,children:(0,Y.jsx)(L,{input:{...e,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,Y.jsx)(A,{value:`threads`,paddingX:0,paddingBottom:0,height:`fit-content`,children:(0,Y.jsx)(L,{input:{...t,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,Y.jsx)(A,{value:`users`,paddingX:0,paddingBottom:0,height:`fit-content`,children:(0,Y.jsx)(L,{input:{...n,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,Y.jsx)(k,{mt:`-1.5px`,height:`4px`,bg:`orange.400`,borderRadius:`1px`,bottom:0})]}),(0,Y.jsx)(M,{value:`messages`,children:(0,Y.jsx)(L,{input:e})}),(0,Y.jsx)(M,{value:`threads`,children:(0,Y.jsx)(L,{input:t})}),(0,Y.jsx)(M,{value:`users`,children:(0,Y.jsx)(L,{input:n,emptyState:ae})})]})})})}),(0,Y.jsx)(E,{rowSpan:2,children:(0,Y.jsxs)(y,{width:`100%`,height:`100%`,children:[(0,Y.jsx)(v,{paddingBottom:4,children:(0,Y.jsx)(V,{size:`sm`,children:`Top Topics`})}),(0,Y.jsx)(b,{overflowY:`auto`,children:(0,Y.jsx)(K,{showTitle:!1})})]})}),(0,Y.jsx)(E,{children:(0,Y.jsxs)(y,{overflow:`auto`,children:[(0,Y.jsx)(v,{children:(0,Y.jsx)(V,{size:`sm`,children:`Thread Metrics`})}),(0,Y.jsx)(b,{children:(0,Y.jsx)(L,{input:ie})})]})})]})}var se=()=>{let{hasPermission:e,project:t}=B(),n={graphId:`llmSummary`,graphType:`summary`,series:[{name:`Mean Tokens per Message`,metric:`performance.total_tokens`,aggregation:`avg`,colorSet:F.performance.total_tokens.colorSet},...e(`cost:view`)?[{name:`Mean Cost per Message`,metric:`performance.total_cost`,aggregation:`avg`,colorSet:F.performance.total_cost.colorSet}]:[],{name:`90th Percentile Time to First Token`,metric:`performance.first_token`,aggregation:`p90`,colorSet:F.performance.first_token.colorSet},{name:`90th Percentile Completion Time`,metric:`performance.completion_time`,aggregation:`p90`,colorSet:F.performance.completion_time.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:`full`};return(0,Y.jsxs)(y,{children:[(0,Y.jsx)(v,{children:(0,Y.jsxs)(D,{gap:1,children:[(0,Y.jsx)(V,{size:`sm`,children:`Summary`}),t?.slug&&(0,Y.jsx)(i,{content:`View LLM Metrics`,children:(0,Y.jsx)(H,{href:`/${t.slug}/analytics/metrics`,children:(0,Y.jsx)(x,{"aria-label":`View LLM Metrics`,variant:`ghost`,size:`2xs`,color:`fg.subtle`,children:(0,Y.jsx)(o,{size:14})})})})]})}),(0,Y.jsx)(b,{children:(0,Y.jsx)(L,{input:n})})]})},Q=1440;function ce(){let{hasPermission:e,project:t}=B(),n={graphId:`llmCallsGraph`,graphType:`area`,series:[{name:`LLM Calls`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:`colors`}],groupBy:`metadata.model`,includePrevious:!1,timeScale:Q},r={graphId:`totalCostGraph`,graphType:`line`,series:[{name:F.performance.total_cost.label,metric:`performance.total_cost`,aggregation:`sum`,colorSet:F.performance.total_cost.colorSet}],groupBy:void 0,includePrevious:!0,timeScale:Q},a={graphId:`totalTokensSummary`,graphType:`summary`,series:[{name:`Tokens`,metric:`performance.total_tokens`,aggregation:`sum`,colorSet:F.performance.total_tokens.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:`full`},s={graphId:`tokensGraph`,graphType:`stacked_bar`,series:[{name:F.performance.prompt_tokens.label,metric:`performance.prompt_tokens`,aggregation:`sum`,colorSet:F.performance.prompt_tokens.colorSet},{name:F.performance.completion_tokens.label,metric:`performance.completion_tokens`,aggregation:`sum`,colorSet:F.performance.completion_tokens.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:Q},c={graphId:`evaluationsSummary`,graphType:`summary`,series:[{name:`Evaluation execution count`,metric:`evaluations.evaluation_runs`,aggregation:`cardinality`,key:``,colorSet:`colors`}],groupBy:`evaluations.evaluation_passed`,includePrevious:!1,timeScale:`full`},l={graphId:`overviewErrorTrend`,graphType:`stacked_bar`,series:[{name:`Traces`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:`positiveNegativeNeutral`}],groupBy:`error.has_error`,includePrevious:!1,timeScale:Q},u={graphId:`overviewLatencyTrend`,graphType:`line`,series:[{name:F.performance.completion_time.label,metric:`performance.completion_time`,aggregation:`median`,colorSet:F.performance.completion_time.colorSet},{name:F.performance.first_token.label,metric:`performance.first_token`,aggregation:`median`,colorSet:F.performance.first_token.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:Q};return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(D,{paddingTop:6,paddingBottom:2,children:[(0,Y.jsx)(V,{as:`h2`,size:`md`,children:`LLM Metrics`}),(0,Y.jsx)(i,{content:`View LLM Metrics dashboard`,children:(0,Y.jsx)(H,{href:`/${t?.slug}/analytics/metrics`,children:(0,Y.jsx)(x,{"aria-label":`View LLM Metrics`,variant:`ghost`,size:`xs`,color:`fg.subtle`,children:(0,Y.jsx)(o,{size:14})})})})]}),(0,Y.jsxs)(f,{width:`100%`,templateColumns:`1fr 0.5fr`,gap:6,children:[(0,Y.jsx)(E,{colSpan:2,children:(0,Y.jsx)(y,{children:(0,Y.jsx)(b,{children:(0,Y.jsxs)(O,{variant:`plain`,defaultValue:`llmCallsGraph`,children:[(0,Y.jsxs)(j,{gap:12,children:[(0,Y.jsx)(A,{value:`llmCallsGraph`,paddingX:0,paddingBottom:4,children:(0,Y.jsx)(L,{input:{...n,graphType:`summary`,groupBy:void 0},titleProps:{textStyle:`sm`,color:`fg`}})}),e(`cost:view`)&&(0,Y.jsx)(A,{value:`totalCostGraph`,paddingX:0,paddingBottom:4,children:(0,Y.jsx)(L,{input:{...r,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,Y.jsx)(A,{value:`tokensGraph`,paddingX:0,paddingBottom:4,children:(0,Y.jsx)(L,{input:a,titleProps:{textStyle:`sm`,color:`fg`}})}),(0,Y.jsx)(k,{mt:`-1.5px`,height:`4px`,bg:`orange.400`,borderRadius:`1px`,bottom:0})]}),(0,Y.jsx)(M,{value:`llmCallsGraph`,children:(0,Y.jsx)(L,{input:n})}),e(`cost:view`)&&(0,Y.jsx)(M,{value:`totalCostGraph`,children:(0,Y.jsx)(L,{input:r})}),(0,Y.jsx)(M,{value:`tokensGraph`,children:(0,Y.jsx)(L,{input:s})})]})})})}),(0,Y.jsx)(E,{children:(0,Y.jsx)(se,{})}),(0,Y.jsx)(E,{children:(0,Y.jsxs)(y,{height:`full`,children:[(0,Y.jsx)(v,{children:(0,Y.jsxs)(D,{gap:1,children:[(0,Y.jsx)(V,{size:`sm`,children:`Evaluations Summary`}),(0,Y.jsx)(i,{content:`View Online Evaluations`,children:(0,Y.jsx)(H,{href:`/${t?.slug}/analytics/evaluations`,children:(0,Y.jsx)(x,{"aria-label":`View Evaluations`,variant:`ghost`,size:`2xs`,color:`fg.subtle`,children:(0,Y.jsx)(o,{size:14})})})})]})}),(0,Y.jsx)(b,{children:(0,Y.jsx)(L,{input:{...c,graphType:`summary`}})})]})}),(0,Y.jsx)(E,{children:(0,Y.jsxs)(y,{height:`full`,children:[(0,Y.jsx)(v,{children:(0,Y.jsx)(V,{size:`sm`,children:`Error Trend`})}),(0,Y.jsx)(b,{children:(0,Y.jsx)(L,{input:l})})]})}),(0,Y.jsx)(E,{children:(0,Y.jsxs)(y,{height:`full`,children:[(0,Y.jsx)(v,{children:(0,Y.jsx)(V,{size:`sm`,children:`Latency Trend`})}),(0,Y.jsx)(b,{children:(0,Y.jsx)(L,{input:u})})]})})]})]})}function le(){let{project:e}=B();return(0,Y.jsxs)(J,{title:`Analytics`,children:[e&&!e.firstMessage&&(0,Y.jsxs)(m,{status:`warning`,marginBottom:6,children:[(0,Y.jsx)(g,{}),(0,Y.jsxs)(_,{children:[(0,Y.jsx)(p,{children:`No traces received yet`}),(0,Y.jsxs)(h,{children:[(0,Y.jsx)(r,{as:`span`,children:`Tracing is not integrated yet, so there's no data to display. Go to the `}),(0,Y.jsx)(H,{textDecoration:`underline`,href:`/${e.slug}/traces`,children:`setup`}),(0,Y.jsx)(r,{as:`span`,children:` page to get started.`})]})]})]}),(0,Y.jsxs)(D,{align:`start`,width:`full`,gap:8,children:[(0,Y.jsxs)(N,{align:`start`,width:`full`,children:[(0,Y.jsx)(oe,{}),(0,Y.jsx)(ce,{}),(0,Y.jsx)($,{}),e&&(0,Y.jsx)(ue,{slug:e.slug})]}),(0,Y.jsx)(q,{hideTopics:!0})]})]})}function $(){let{filterParams:e,queryOpts:t}=U(),i=P.analytics.topUsedDocuments.useQuery(e,t).data?.totalUniqueDocuments;return!i||i===0?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(D,{width:`full`,align:`top`,children:(0,Y.jsx)(V,{as:`h2`,size:`md`,paddingTop:6,paddingBottom:2,children:`Documents`})}),(0,Y.jsx)(y,{width:`full`,children:(0,Y.jsx)(b,{children:(0,Y.jsxs)(O,{variant:`plain`,defaultValue:`total-documents`,children:[(0,Y.jsxs)(j,{gap:12,children:[(0,Y.jsx)(A,{value:`total-documents`,paddingX:0,paddingBottom:4,children:(0,Y.jsxs)(N,{align:`start`,children:[(0,Y.jsx)(r,{color:`fg`,children:`Total documents`}),(0,Y.jsx)(n,{textStyle:`2xl`,color:`fg`,fontWeight:`bold`,children:(0,Y.jsx)(re,{})})]})}),(0,Y.jsx)(k,{mt:`-1.5px`,height:`4px`,bg:`orange.400`,borderRadius:`1px`,bottom:0})]}),(0,Y.jsx)(M,{value:`total-documents`,children:(0,Y.jsx)(X,{})})]})})})]})}function ue({slug:t}){let{project:i}=B(),a=P.dashboards.getAll.useQuery({projectId:i?.id??``},{enabled:!!i?.id}),s=a.data??[];return s.length===0&&!a.isLoading?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(V,{as:`h2`,size:`md`,paddingTop:6,paddingBottom:2,children:`Custom Dashboards`}),(0,Y.jsx)(y,{borderStyle:`dashed`,children:(0,Y.jsx)(b,{padding:5,children:(0,Y.jsxs)(D,{gap:4,children:[(0,Y.jsx)(n,{color:`fg.subtle`,children:(0,Y.jsx)(R,{size:20})}),(0,Y.jsxs)(N,{align:`start`,gap:1,flex:1,children:[(0,Y.jsx)(r,{textStyle:`sm`,fontWeight:`500`,children:`Build your own dashboard`}),(0,Y.jsx)(r,{textStyle:`xs`,color:`fg.muted`,children:`Drag and drop charts to track the metrics that matter most to your team.`})]}),(0,Y.jsx)(H,{href:`/${t}/analytics/reports`,_hover:{textDecoration:`none`},children:(0,Y.jsxs)(e,{size:`sm`,variant:`outline`,children:[(0,Y.jsx)(z,{size:14}),` Create`]})})]})})})]}):s.length===0?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(V,{as:`h2`,size:`md`,paddingTop:6,paddingBottom:2,children:`Custom Dashboards`}),(0,Y.jsx)(f,{width:`full`,gap:3,gridTemplateColumns:`repeat(auto-fill, minmax(250px, 1fr))`,children:s.map(e=>(0,Y.jsx)(G,{target:te({dashboardId:e.id,name:e.name}),children:(0,Y.jsx)(H,{href:`/${t}/analytics/reports?dashboard=${e.id}`,_hover:{textDecoration:`none`},children:(0,Y.jsx)(y,{width:`full`,cursor:`pointer`,borderColor:`border`,_hover:{borderColor:`orange.400`,shadow:`sm`},transition:`all 0.15s ease`,children:(0,Y.jsx)(b,{paddingX:4,paddingY:3,children:(0,Y.jsxs)(T,{gap:3,alignItems:`center`,children:[(0,Y.jsx)(n,{padding:2,borderRadius:`md`,bg:`orange.subtle`,color:`orange.fg`,children:(0,Y.jsx)(R,{size:16})}),(0,Y.jsxs)(N,{align:`start`,gap:0,flex:1,children:[(0,Y.jsx)(r,{fontWeight:`500`,textStyle:`sm`,children:e.name}),(0,Y.jsx)(r,{textStyle:`xs`,color:`fg.muted`,children:`Custom Dashboard`})]}),(0,Y.jsx)(n,{color:`fg.subtle`,marginLeft:`auto`,children:(0,Y.jsx)(o,{size:14})})]})})})})},e.id))})]})}var de=W(`analytics:view`,{layoutComponent:ne})(le);export{de as default};
2
- //# sourceMappingURL=analytics-CZuaBlXL.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./skeleton-YwQIu7Tp.js";import{t as o}from"./text-A3qvcMyN.js";import{t as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c}from"./info-CtYT35g4.js";import"./tooltip-Croc0I6e.js";import{n as l}from"./toaster-CRP22oRW.js";import{$ as u,I as d,Q as f,X as p,Y as m,Z as h,et as g}from"./ExternalImage-DbtOSrKl.js";import{r as _}from"./UpgradeModal-BmLw5ONS.js";import{t as v}from"./h-stack-CMPhqSp5.js";import{t as y}from"./spacer-CbmCSsJg.js";import{t as b}from"./v-stack-ClAMS101.js";import{n as x,u as S}from"./api-BK6L1im2.js";import{t as C}from"./edit-CnLe7SsJ.js";import{t as w}from"./more-vertical-_6MEkDJl.js";import{t as T}from"./plus-B6aIX-yZ.js";import{t as E}from"./thumbs-up-BjywzniF.js";import{t as D}from"./trash-C9sv_Lb0.js";import{En as O,Rt as k,V as A,ni as j,t as M}from"./index-CUhcyBp3.js";import{t as N}from"./WithPermissionGuard-BP1dFkpM.js";import{t as P}from"./switch-vUOdjiD1.js";import{t as F}from"./DeleteConfirmationDialog-7K0S0Qdq.js";import{t as I}from"./SettingsLayout-CYtjUobV.js";import{t as L}from"./NoDataInfoBlock-B3c1WwDO.js";var R=O(),z=e(t()),B=r();function V(){let{project:e}=k(),{isLiteMember:t}=s(),r=!t,{openDrawer:c,drawerOpen:O,closeDrawer:N}=A(),V=x.annotationScore.getAll.useQuery({projectId:e?.id??``},{enabled:!!e}),H=x.annotationScore.toggle.useMutation(),W=O(`addOrEditAnnotationScore`),[G,K]=(0,z.useState)(!1),[q,J]=(0,z.useState)(null),Y=x.annotationScore.delete.useMutation();(0,z.useEffect)(()=>{V.refetch()},[W]);let X=(t,n)=>{H.mutate({scoreId:t,active:n,projectId:e?.id??``},{onSuccess:()=>{V.refetch()},onError:e=>{S(e)||l.create({title:`Update score`,type:`error`,description:`Failed to update score`,duration:6e3,meta:{closable:!0}})}})},Z=e=>{J(e),K(!0)};return(0,B.jsxs)(I,{children:[(0,B.jsxs)(b,{gap:6,width:`full`,align:`start`,children:[(0,B.jsxs)(v,{width:`full`,marginTop:2,children:[(0,B.jsx)(j,{as:`h2`,children:`Annotation Scoring`}),(0,B.jsx)(y,{}),r&&(0,B.jsxs)(_.HeaderButton,{onClick:()=>c(`addOrEditAnnotationScore`),children:[(0,B.jsx)(T,{}),` Add new score metric`]})]}),V.data&&V.data.length==0?(0,B.jsx)(L,{title:`No scoring setup yet`,description:`Add new scoring metrics for your annotations.`,docsInfo:(0,B.jsxs)(o,{children:[`To learn more about scores and how to use them, please visit our`,` `,(0,B.jsx)(M,{color:`orange.400`,href:`https://docs.langwatch.ai/features/annotations#annotation-scoring`,isExternal:!0,children:`documentation`}),`.`]}),icon:(0,B.jsx)(E,{})}):(0,B.jsx)(i,{width:`full`,overflowX:`auto`,children:(0,B.jsxs)(u,{variant:`line`,width:`full`,children:[(0,B.jsx)(f,{children:(0,B.jsxs)(g,{children:[(0,B.jsx)(h,{children:`Name`}),(0,B.jsx)(h,{children:`Description`}),(0,B.jsx)(h,{children:`Score Type`}),(0,B.jsx)(h,{children:`Score Options`}),(0,B.jsx)(h,{children:`Enabled`}),r&&(0,B.jsx)(h,{children:`Actions`})]})}),(0,B.jsx)(m,{children:V.isLoading?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(g,{children:(0,B.jsx)(p,{colSpan:r?6:5,children:(0,B.jsx)(a,{height:`20px`})})}),(0,B.jsx)(g,{children:(0,B.jsx)(p,{colSpan:r?6:5,children:(0,B.jsx)(a,{height:`20px`})})}),(0,B.jsx)(g,{children:(0,B.jsx)(p,{colSpan:r?6:5,children:(0,B.jsx)(a,{height:`20px`})})})]}):V.data?.map(e=>(0,B.jsxs)(g,{children:[(0,B.jsx)(p,{children:e.name}),(0,B.jsx)(p,{children:e.description}),(0,B.jsx)(p,{width:`20%`,children:(0,B.jsx)(o,{lineClamp:1,children:e.dataType===R.AnnotationScoreDataType.CHECKBOX?`Checkbox`:`Multiple choice`})}),(0,B.jsx)(p,{children:(0,B.jsx)(U,{options:Array.isArray(e.options)?e.options:[],dataType:e.dataType??``})}),(0,B.jsx)(p,{textAlign:`center`,children:(0,B.jsx)(P,{checked:e.active,disabled:!r,onCheckedChange:()=>{X(e.id,!e.active)}})}),r&&(0,B.jsx)(p,{children:(0,B.jsxs)(d.Root,{children:[(0,B.jsx)(d.Trigger,{asChild:!0,children:(0,B.jsx)(n,{variant:`ghost`,children:(0,B.jsx)(w,{})})}),(0,B.jsxs)(d.Content,{children:[(0,B.jsx)(d.Item,{value:`edit`,onClick:t=>{t.stopPropagation(),c(`addOrEditAnnotationScore`,{annotationScoreId:e.id,onClose:()=>N()})},children:(0,B.jsxs)(i,{display:`flex`,alignItems:`center`,gap:2,children:[(0,B.jsx)(C,{size:14}),`Edit`]})}),(0,B.jsx)(d.Item,{value:`delete`,onClick:t=>{t.stopPropagation(),Z(e.id)},children:(0,B.jsxs)(i,{display:`flex`,alignItems:`center`,gap:2,color:`red.600`,children:[(0,B.jsx)(D,{size:14}),`Delete`]})})]})]})})]},e.id))})]})})]}),(0,B.jsx)(F,{open:G,onClose:()=>K(!1),onConfirm:()=>{q&&Y.mutate({scoreId:q,projectId:e?.id??``},{onSuccess:()=>{V.refetch(),l.create({title:`Delete score`,type:`success`,description:`Score deleted successfully`,duration:6e3,meta:{closable:!0}})},onError:e=>{S(e)||l.create({title:`Delete score`,type:`error`,description:`Failed to delete score`,duration:6e3,meta:{closable:!0}})}}),K(!1)}})]})}var H=N(`annotations:view`,{layoutComponent:I})(V),U=({options:e,dataType:t})=>(0,B.jsx)(B.Fragment,{children:(0,B.jsx)(v,{children:(0,B.jsx)(v,{flexWrap:`wrap`,gap:4,children:e.map(e=>(0,B.jsx)(c,{children:e.label},e.value))})})});export{H as default};
2
- //# sourceMappingURL=annotation-scores-CeAaT6zF.js.map
@@ -1,2 +0,0 @@
1
- import{t as e}from"./jsx-runtime-CFwixLRt.js";import{t}from"./box-Ck5lef6C.js";import{t as n}from"./DashboardLayout-RHGL-98_.js";import{n as r}from"./useAnnotationQueues-BWrpwDYN.js";import{t as i}from"./WithPermissionGuard-BP1dFkpM.js";import{t as a}from"./AnnotationsTable-DoO83AX9.js";var o=e();function s(){return(0,o.jsx)(r,{children:(0,o.jsx)(t,{width:`full`,overflowX:`auto`,children:(0,o.jsx)(a,{showQueueAndUser:!0,heading:`Inbox`,noDataTitle:`Your inbox is empty`,noDataDescription:`Send messages to your annotation queue to get started.`})})})}var c=i(`annotations:view`,{layoutComponent:n})(s);export{c as default};
2
- //# sourceMappingURL=annotations-CpkTmTvn.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./text-A3qvcMyN.js";import{cn as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c,t as l}from"./info-CtYT35g4.js";import{n as u}from"./toaster-CRP22oRW.js";import{G as d}from"./ExternalImage-DbtOSrKl.js";import{t as f}from"./h-stack-CMPhqSp5.js";import{t as p}from"./spacer-CbmCSsJg.js";import{it as m}from"./immer-tl_oI9yy.js";import{t as h}from"./v-stack-ClAMS101.js";import{t as g}from"./GovernanceLayout-COAapH9g.js";import{n as _}from"./api-BK6L1im2.js";import{Ar as v,Qn as y,Rt as b,ni as x,nr as S,t as C}from"./index-CUhcyBp3.js";import{t as w}from"./EnterpriseLockedSurface-CxLn8Im_.js";import{t as T}from"./WithFeatureFlagGuard-DwfApI3b.js";import{t as E}from"./WithPermissionGuard-BP1dFkpM.js";import{t as D}from"./docsUrl-AJ4sHLyi.js";var O=e(t()),k=i(),A=[{value:`critical`,label:`Critical`,tone:`red`},{value:`warning`,label:`Warning`,tone:`orange`},{value:`info`,label:`Info`,tone:`blue`}],j=[{value:`organization`,label:`Organization`},{value:`source_type`,label:`Ingestion source type`},{value:`source`,label:`Specific ingestion source`}],M=[`spend_spike`],N=JSON.stringify({windowSec:86400,ratioVsBaseline:2,minBaselineUsd:1,baselineOffsetSec:604800},null,2);function P(e,t){if(e!==`spend_spike`){if(t.trim()!==``&&t.trim()!==`{}`)try{JSON.parse(t)}catch(e){return{kind:`error`,message:`Invalid JSON: ${e instanceof Error?e.message:`parse failed`}`}}return{kind:`unsupported`,english:`\`${e}\` is in preview — the rule will save but no detector runs against it yet. \`spend_spike\` is the only type evaluated today; the others (\`rate_limit\`, \`after_hours\`, \`model_drift\`, \`error_rate\`) ship as detectors land.`}}if(t.trim()===``||t.trim()===`{}`)return{kind:`error`,message:`Empty config — fill in the rule-type-specific fields below or click the rule type to load the template.`};let n;try{n=JSON.parse(t)}catch(e){return{kind:`error`,message:`Invalid JSON: ${e instanceof Error?e.message:`parse failed`}`}}let r=n.windowSec,i=n.ratioVsBaseline,a=n.minBaselineUsd,o=n.baselineOffsetSec;if(typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||typeof o!=`number`)return{kind:`error`,message:"spend_spike requires numeric `windowSec`, `ratioVsBaseline`, `minBaselineUsd`, and `baselineOffsetSec`."};let s=e=>e>=86400?`${Math.round(e/86400*10)/10} day${e===86400?``:`s`}`:e>=3600?`${Math.round(e/3600*10)/10} hour${e===3600?``:`s`}`:e>=60?`${Math.round(e/60*10)/10} minute${e===60?``:`s`}`:`${e} second${e===1?``:`s`}`;return{kind:`ok`,english:`Fires when spend in the last ${s(r)} is at least ${i}× the spend in the equivalent ${s(r)} window from ${s(o)} ago, AND that baseline is at least $${a}. Otherwise the baseline is too noisy and the rule stays quiet.`}}var F=()=>({name:``,description:``,severity:`warning`,ruleType:`spend_spike`,scope:`organization`,scopeId:``,thresholdConfig:N,destinationConfig:`{}`});function I(){let{organization:e}=b({redirectToOnboarding:!1}),t=e?.id??``,i=_.anomalyRules.list.useQuery({organizationId:t},{enabled:!!t,refetchOnWindowFocus:!1}),s=_.useUtils(),l=()=>s.anomalyRules.list.invalidate({organizationId:t}),[d,m]=(0,O.useState)(null),v=_.anomalyRules.create.useMutation({onSuccess:()=>{l(),m(null),u.create({title:`Rule created`,type:`success`})},onError:e=>u.create({title:`Failed to create rule`,description:e.message,type:`error`})}),S=_.anomalyRules.update.useMutation({onSuccess:()=>{l(),m(null),u.create({title:`Rule updated`,type:`success`})},onError:e=>u.create({title:`Failed to update rule`,description:e.message,type:`error`})}),T=_.anomalyRules.archive.useMutation({onSuccess:()=>{l(),u.create({title:`Rule archived`,type:`success`})},onError:e=>u.create({title:`Failed to archive`,description:e.message,type:`error`})}),E=(0,O.useMemo)(()=>{let e={critical:[],warning:[],info:[]};for(let t of i.data??[])e[t.severity]?.push(t);return e},[i.data]),D=e=>m({id:e.id,name:e.name,description:e.description??``,severity:e.severity,ruleType:e.ruleType,scope:e.scope,scopeId:e.scopeId,thresholdConfig:JSON.stringify(e.thresholdConfig??{},null,2),destinationConfig:JSON.stringify(e.destinationConfig??{},null,2)}),j=()=>{if(!d||!d.name.trim()||!d.scopeId.trim()&&d.scope!==`organization`)return;let e,n;try{e=JSON.parse(d.thresholdConfig||`{}`),n=JSON.parse(d.destinationConfig||`{}`)}catch(e){u.create({title:`Invalid JSON in config field`,description:e.message,type:`error`});return}let r=d.scope===`organization`?t:d.scopeId.trim();d.id?S.mutate({id:d.id,organizationId:t,name:d.name.trim(),description:d.description.trim()||null,severity:d.severity,ruleType:d.ruleType,scope:d.scope,scopeId:r,thresholdConfig:e,destinationConfig:n}):v.mutate({organizationId:t,name:d.name.trim(),description:d.description.trim()||null,severity:d.severity,ruleType:d.ruleType,scope:d.scope,scopeId:r,thresholdConfig:e,destinationConfig:n})},M=v.isPending||S.isPending;return(0,k.jsx)(g,{pageTitle:`Anomaly Rules · Governance · LangWatch`,children:(0,k.jsx)(w,{featureName:`Anomaly Rules`,description:`Anomaly Rules let your governance team define thresholds that page on-call when ingestion drifts. Available on Enterprise plans.`,children:(0,k.jsxs)(h,{align:`stretch`,gap:6,width:`full`,maxW:`container.xl`,children:[(0,k.jsxs)(f,{alignItems:`end`,children:[(0,k.jsxs)(h,{align:`start`,gap:1,children:[(0,k.jsxs)(f,{gap:2,children:[(0,k.jsx)(x,{size:`md`,children:`Anomaly Rules`}),(0,k.jsx)(c,{colorPalette:`purple`,size:`sm`,variant:`surface`,children:`Preview`})]}),(0,k.jsxs)(o,{color:`fg.muted`,fontSize:`sm`,maxW:`3xl`,children:[`Define thresholds that page on-call when activity drifts. Rules surface on the`,` `,(0,k.jsx)(C,{href:`/governance`,color:`blue.600`,children:`governance overview`}),` `,`once they fire.`]})]}),(0,k.jsx)(p,{})]}),d&&(0,k.jsx)(z,{composer:d,setComposer:m,onSubmit:j,onCancel:()=>m(null),isPending:M,orgId:t}),i.isLoading&&(0,k.jsx)(n,{size:`sm`}),[`critical`,`warning`,`info`].map(e=>{let n=A.find(t=>t.value===e);return(0,k.jsxs)(a,{as:`section`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:4,children:[(0,k.jsxs)(f,{alignItems:`start`,marginBottom:3,children:[(0,k.jsx)(h,{align:`start`,gap:0,children:(0,k.jsxs)(f,{gap:2,children:[(0,k.jsx)(o,{fontSize:`sm`,fontWeight:`semibold`,children:n.label}),(0,k.jsx)(c,{size:`sm`,variant:`surface`,children:E[e].length})]})}),(0,k.jsx)(p,{}),(0,k.jsxs)(r,{size:`sm`,variant:`outline`,onClick:()=>{let t=F();t.severity=e,m(t)},disabled:!!d,children:[(0,k.jsx)(y,{size:14}),` New rule`]})]}),(0,k.jsxs)(h,{align:`stretch`,gap:2,children:[E[e].length===0&&(0,k.jsxs)(o,{fontSize:`sm`,color:`fg.muted`,children:[`No `,n.label.toLowerCase(),` rules.`]}),E[e].map(e=>(0,k.jsx)(L,{rule:e,onEdit:()=>D(e),onArchive:()=>T.mutate({id:e.id,organizationId:t}),isArchiving:T.isPending&&T.variables?.id===e.id},e.id))]})]},e)})]})})})}function L({rule:e,onEdit:t,onArchive:n,isArchiving:i}){return(0,k.jsxs)(f,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`sm`,padding:3,gap:3,opacity:e.status===`disabled`?.55:1,children:[(0,k.jsxs)(h,{align:`start`,gap:0,flex:1,minWidth:0,children:[(0,k.jsxs)(f,{gap:2,wrap:`wrap`,children:[(0,k.jsx)(o,{fontSize:`sm`,fontWeight:`medium`,children:e.name}),(0,k.jsx)(c,{size:`sm`,variant:`surface`,children:e.ruleType}),e.status===`disabled`&&(0,k.jsx)(c,{size:`sm`,variant:`surface`,colorPalette:`gray`,children:`Disabled`})]}),e.description&&(0,k.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:e.description}),(0,k.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[`scope: `,e.scope,e.scope!==`organization`&&e.scopeId?` · ${e.scopeId}`:``]})]}),(0,k.jsxs)(r,{size:`sm`,variant:`ghost`,onClick:t,children:[(0,k.jsx)(S,{size:14}),` Edit`]}),(0,k.jsx)(r,{size:`sm`,variant:`ghost`,colorPalette:`red`,onClick:n,loading:i,title:`Archive rule`,children:(0,k.jsx)(d,{size:14})})]})}var R=[{value:`otel_generic`,label:`Generic OTel (otel_generic)`},{value:`claude_cowork`,label:`Claude Cowork (claude_cowork)`},{value:`workato`,label:`Workato (workato)`},{value:`copilot_studio`,label:`Copilot Studio (copilot_studio)`},{value:`openai_compliance`,label:`OpenAI Compliance (openai_compliance)`},{value:`claude_compliance`,label:`Claude Compliance (claude_compliance)`},{value:`s3_custom`,label:`S3 Custom (s3_custom)`}];function z({composer:e,setComposer:t,onSubmit:n,onCancel:i,isPending:c,orgId:u}){let[d,g]=(0,O.useState)(`picker`),y=_.ingestionSources.list.useQuery({organizationId:u},{enabled:e.scope===`source`&&!!u,refetchOnWindowFocus:!1}),b=!!e.id;return(0,k.jsx)(s.Root,{open:!0,placement:`end`,size:`lg`,onOpenChange:({open:e})=>{e||i()},children:(0,k.jsxs)(s.Content,{children:[(0,k.jsxs)(s.Header,{children:[(0,k.jsx)(s.CloseTrigger,{}),(0,k.jsx)(x,{as:`h2`,size:`md`,children:b?`Edit anomaly rule`:`New anomaly rule`})]}),(0,k.jsx)(s.Body,{children:(0,k.jsxs)(h,{align:`stretch`,gap:3,children:[(0,k.jsxs)(f,{gap:3,children:[(0,k.jsxs)(h,{align:`stretch`,gap:1,flex:2,children:[(0,k.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Name`}),(0,k.jsx)(v,{size:`sm`,backgroundColor:`white`,value:e.name,onChange:n=>t({...e,name:n.target.value}),placeholder:`Display name for this rule`})]}),(0,k.jsxs)(h,{align:`stretch`,gap:1,flex:1,children:[(0,k.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Severity`}),(0,k.jsx)(`select`,{value:e.severity,onChange:n=>t({...e,severity:n.target.value}),style:B,children:A.map(e=>(0,k.jsx)(`option`,{value:e.value,children:e.label},e.value))})]})]}),(0,k.jsxs)(h,{align:`stretch`,gap:1,children:[(0,k.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Description (optional)`}),(0,k.jsx)(m,{size:`sm`,backgroundColor:`white`,rows:2,value:e.description,onChange:n=>t({...e,description:n.target.value}),placeholder:`What this rule guards against and who owns it`})]}),(0,k.jsxs)(f,{gap:3,children:[(0,k.jsxs)(h,{align:`stretch`,gap:1,flex:1,children:[(0,k.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Rule type`}),(0,k.jsx)(v,{size:`sm`,backgroundColor:`white`,list:`rule-type-suggestions`,value:e.ruleType,onChange:n=>{let r=n.target.value;t({...e,ruleType:r,thresholdConfig:r===`spend_spike`&&(e.thresholdConfig.trim()===``||e.thresholdConfig.trim()===`{}`)?N:e.thresholdConfig})},placeholder:`spend_spike`}),(0,k.jsx)(`datalist`,{id:`rule-type-suggestions`,children:M.map(e=>(0,k.jsx)(`option`,{value:e},e))}),(0,k.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[`Only `,(0,k.jsx)(`code`,{children:`spend_spike`}),` is evaluated by the anomaly reactor today. Other rule types (`,(0,k.jsx)(`code`,{children:`rate_limit`}),`,`,(0,k.jsx)(`code`,{children:`after_hours`}),`, …) are`,` `,(0,k.jsx)(C,{href:`/ai-gateway/governance/anomaly-rules`,color:`blue.600`,children:`preview`}),` `,`— persisted as active but not yet detected.`]})]}),(0,k.jsxs)(h,{align:`stretch`,gap:1,flex:1,children:[(0,k.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Scope`}),(0,k.jsx)(`select`,{value:e.scope,onChange:n=>t({...e,scope:n.target.value}),style:B,children:j.map(e=>(0,k.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),e.scope!==`organization`&&(0,k.jsxs)(h,{align:`stretch`,gap:1,flex:1,children:[(0,k.jsxs)(f,{gap:2,alignItems:`center`,children:[(0,k.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:e.scope===`source`?`Ingestion source`:e.scope===`source_type`?`Source type`:`Scope ID`}),(0,k.jsx)(p,{}),(0,k.jsx)(r,{size:`xs`,variant:`ghost`,fontSize:`xs`,color:`blue.600`,onClick:()=>g(e=>e===`picker`?`custom`:`picker`),children:d===`picker`?`type a custom ID`:`use picker`})]}),d===`picker`&&e.scope===`source`?(0,k.jsxs)(`select`,{value:e.scopeId,onChange:n=>t({...e,scopeId:n.target.value}),style:B,disabled:y.isLoading,children:[(0,k.jsx)(`option`,{value:``,children:y.isLoading?`Loading sources…`:`— select an ingestion source —`}),(y.data??[]).map(e=>(0,k.jsxs)(`option`,{value:e.id,children:[e.name,` (`,e.sourceType,`)`]},e.id))]}):d===`picker`&&e.scope===`source_type`?(0,k.jsxs)(`select`,{value:e.scopeId,onChange:n=>t({...e,scopeId:n.target.value}),style:B,children:[(0,k.jsx)(`option`,{value:``,children:`— select a source type —`}),R.map(e=>(0,k.jsx)(`option`,{value:e.value,children:e.label},e.value))]}):(0,k.jsx)(v,{size:`sm`,backgroundColor:`white`,value:e.scopeId,onChange:n=>t({...e,scopeId:n.target.value}),placeholder:e.scope===`source_type`?`otel_generic, workato, ...`:e.scope===`source`?`ingestion source ID`:`${e.scope} ID`})]})]}),(0,k.jsxs)(h,{align:`stretch`,gap:1,children:[(0,k.jsxs)(f,{gap:2,alignItems:`center`,children:[(0,k.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Threshold config (rule-type-specific JSON)`}),(0,k.jsx)(p,{}),(0,k.jsx)(C,{href:D(`/ai-governance/anomaly-rules#threshold-config`),isExternal:!0,color:`blue.600`,fontSize:`xs`,fontWeight:`medium`,children:(0,k.jsxs)(f,{gap:1,alignItems:`center`,children:[(0,k.jsx)(l,{size:12}),(0,k.jsx)(o,{as:`span`,children:`Schema reference`})]})})]}),(0,k.jsx)(m,{size:`sm`,backgroundColor:`white`,rows:4,fontFamily:`mono`,value:e.thresholdConfig,onChange:n=>t({...e,thresholdConfig:n.target.value}),placeholder:`{}`}),(0,k.jsx)(V,{ruleType:e.ruleType,raw:e.thresholdConfig})]}),(0,k.jsx)(a,{borderWidth:`1px`,borderColor:`purple.300`,backgroundColor:`purple.50`,padding:3,borderRadius:`sm`,children:(0,k.jsxs)(o,{fontSize:`xs`,color:`purple.900`,children:[(0,k.jsx)(`strong`,{children:`Alert destinations:`}),` alerts surface on the`,` `,(0,k.jsx)(C,{href:`/governance`,color:`blue.600`,children:`governance dashboard`}),` `,`today. Slack, PagerDuty, webhook, and email destinations ship in a follow-up release — the composer will gain structured destination fields then. (See`,` `,(0,k.jsx)(C,{href:`/ai-gateway/governance/anomaly-rules`,color:`blue.600`,children:`anomaly rules docs`}),` `,`for the dispatch coverage table.)`]})})]})}),(0,k.jsx)(s.Footer,{children:(0,k.jsxs)(f,{gap:3,width:`full`,children:[(0,k.jsx)(p,{}),(0,k.jsx)(r,{size:`sm`,variant:`ghost`,onClick:i,children:`Cancel`}),(0,k.jsx)(r,{size:`sm`,colorPalette:`blue`,onClick:n,loading:c,disabled:!e.name.trim()||e.scope!==`organization`&&!e.scopeId.trim(),children:b?`Save changes`:`Create rule`})]})})]})})}var B={padding:`8px`,border:`1px solid var(--chakra-colors-border-muted)`,borderRadius:`var(--chakra-radii-sm)`,background:`white`,fontSize:`14px`};function V({ruleType:e,raw:t}){let n=P(e,t),r=n.kind===`ok`?{bg:`blue.50`,border:`blue.300`,fg:`blue.900`,label:`Preview`}:n.kind===`unsupported`?{bg:`orange.50`,border:`orange.300`,fg:`orange.900`,label:`Won't fire`}:{bg:`red.50`,border:`red.300`,fg:`red.900`,label:`Invalid`};return(0,k.jsx)(a,{borderWidth:`1px`,borderColor:r.border,backgroundColor:r.bg,padding:2,borderRadius:`sm`,marginTop:1,children:(0,k.jsxs)(f,{alignItems:`start`,gap:2,children:[(0,k.jsx)(c,{colorPalette:r.label===`Won't fire`?`orange`:r.label===`Invalid`?`red`:`blue`,size:`xs`,variant:`subtle`,children:r.label}),(0,k.jsx)(o,{fontSize:`xs`,color:r.fg,flex:1,children:n.kind===`error`?n.message:n.english})]})})}var H=T(`release_ui_ai_governance_enabled`,{bypassOnboardingRedirect:!0})(E(`organization:manage`,{bypassOnboardingRedirect:!0})(I));export{H as default};
2
- //# sourceMappingURL=anomaly-rules-BOLIh6OR.js.map
@@ -1,4 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ShikiCommandBox-D_TBnZxW.js","assets/rolldown-runtime-DAXXjFlN.js","assets/react-BUD3sqOU.js","assets/portal-FJIui2Z2.js","assets/jsx-runtime-CFwixLRt.js","assets/box-Ck5lef6C.js","assets/shikiAdapter-S_u9TjIh.js","assets/shiki-CS25xJLQ.js","assets/IsolatedErrorBoundary-OupgoYEt.js","assets/text-A3qvcMyN.js","assets/dismissable-layer-B-YbfJzk.js","assets/initial-focus-C3M_2NS-.js","assets/icon-CkSWK_vf.js","assets/dialog.anatomy-DHRPVAsV.js","assets/split-presence-props-lKjSaAa-.js","assets/h-stack-CMPhqSp5.js","assets/v-stack-ClAMS101.js","assets/createLucideIcon-WbxVGt4j.js","assets/close-button-RGOW3hmk.js","assets/icon-button-Ce2kwA7j.js","assets/lu-DlSq9Be4.js","assets/info-CtYT35g4.js","assets/resize-observer-DVkbZnNT.js","assets/toaster-CRP22oRW.js","assets/icons-DbK9WJNH.js","assets/info-Bii0i81f.js","assets/visually-hidden-Bv77dNd2.js","assets/index-CUhcyBp3.js","assets/components-CxJbXUhe.js","assets/lib-C55MVODY.js","assets/skeleton-YwQIu7Tp.js","assets/field-AkuX7DGP.js","assets/use-field-context-Ct2EZR3u.js","assets/next-router-Bn5Y8Iek.js","assets/trace-api-Bb6hR6FO.js","assets/api-BK6L1im2.js","assets/src-RcSZrN9Q.js","assets/usePublicEnv-CATGNgPr.js","assets/auth-client-4OIM4EvK.js","assets/defaultOptions-DTVx3qsT.js","assets/index-BmwDapuG.css","assets/ExternalImage-DbtOSrKl.js","assets/tooltip-Croc0I6e.js","assets/dist-B6lQ-KU0.js","assets/external-link-BzETHrAG.js","assets/spacer-CbmCSsJg.js","assets/loadModelCatalog-CtqlQvVB.js","assets/clipboard-dsAFRv1E.js","assets/eye-off-DqjXgeXB.js","assets/TabButton-BY-_E4cy.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{S as r}from"./shiki-CS25xJLQ.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./text-A3qvcMyN.js";import{En as s,cn as c,lr as l,wn as u}from"./useLiteMemberGuard-klZnweA7.js";import{s as d,t as f}from"./select-BVcV39WT.js";import{n as p}from"./info-CtYT35g4.js";import{t as m}from"./tooltip-Croc0I6e.js";import{n as h}from"./toaster-CRP22oRW.js";import{$ as g,G as _,I as v,Q as y,X as b,Y as x,Z as S,et as C}from"./ExternalImage-DbtOSrKl.js";import{r as w}from"./UpgradeModal-BmLw5ONS.js";import{a as ee,i as T,n as E,r as D,t as O}from"./segment-group-BZ45xnHN.js";import{a as k,i as A,n as j,r as M,t as N}from"./alert-C5hocQt_.js";import{r as P,t as F}from"./card-54_vstoB.js";import{t as I}from"./h-stack-CMPhqSp5.js";import{t as te}from"./spacer-CbmCSsJg.js";import{it as ne}from"./immer-tl_oI9yy.js";import{t as L}from"./v-stack-ClAMS101.js";import{t as R}from"./createLucideIcon-WbxVGt4j.js";import{t as re}from"./ScopeChipPicker-B6r27G3S.js";import{t as z}from"./clipboard-dsAFRv1E.js";import{n as B}from"./api-BK6L1im2.js";import{t as ie}from"./usePublicEnv-CATGNgPr.js";import{c as ae}from"./auth-client-4OIM4EvK.js";import{Ar as V,En as H,Ht as U,Qn as oe,Rt as se,Ut as W,Zn as G,cr as ce,ni as le,nr as ue,w as de,yt as K}from"./index-CUhcyBp3.js";import{t as fe}from"./next-dynamic-DcKsrHUa.js";import{t as pe}from"./ProviderScopeChips-S0Ctqbwg.js";import{a as me,c as q,n as he,o as ge,r as J,s as _e,t as Y}from"./TabButton-BY-_E4cy.js";import{t as ve}from"./SettingsLayout-CYtjUobV.js";import{n as ye,t as be}from"./useUrlScopeFilter-u6ryUPSP.js";import{i as xe,t as Se}from"./filterProvidersByScope-loQHtcFs.js";var Ce=R(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),X=e(t()),Z=i();function we({open:e,onClose:t,onConfirm:r,isLoading:i=!1}){return(0,Z.jsx)(K.Root,{open:e,onOpenChange:({open:e})=>!e&&t(),placement:`center`,children:e&&(0,Z.jsxs)(K.Content,{bg:`bg`,children:[(0,Z.jsx)(K.CloseTrigger,{}),(0,Z.jsx)(K.Header,{children:(0,Z.jsx)(K.Title,{children:`Regenerate API Key?`})}),(0,Z.jsx)(K.Body,{children:(0,Z.jsxs)(L,{align:`start`,gap:4,children:[(0,Z.jsx)(o,{children:`This will invalidate your current API key immediately. Any applications or services using the old key will stop working.`}),(0,Z.jsxs)(A,{status:`error`,borderRadius:`md`,children:[(0,Z.jsx)(M,{}),(0,Z.jsxs)(N,{children:[(0,Z.jsx)(k,{children:`This action cannot be undone`}),(0,Z.jsx)(j,{children:`You'll need to update all applications using this API key.`})]})]})]})}),(0,Z.jsxs)(K.Footer,{children:[(0,Z.jsx)(n,{variant:`outline`,onClick:t,children:`Cancel`}),(0,Z.jsx)(n,{colorPalette:`red`,onClick:r,loading:i,children:`Regenerate Key`})]})]})})}var Q=[{key:`traces`,label:`Traces`,accessLevels:[`read`,`write`],readPermissions:[`traces:view`],writePermissions:[`traces:view`,`traces:create`,`traces:update`,`traces:share`]},{key:`cost`,label:`Cost`,accessLevels:[`read`],readPermissions:[`cost:view`],writePermissions:[]},{key:`scenarios`,label:`Scenarios`,accessLevels:[`read`,`write`],readPermissions:[`scenarios:view`],writePermissions:[`scenarios:view`,`scenarios:manage`]},{key:`annotations`,label:`Annotations`,accessLevels:[`read`,`write`],readPermissions:[`annotations:view`],writePermissions:[`annotations:view`,`annotations:manage`]},{key:`analytics`,label:`Analytics`,accessLevels:[`read`,`write`],readPermissions:[`analytics:view`],writePermissions:[`analytics:view`,`analytics:manage`]},{key:`evaluations`,label:`Evaluations`,accessLevels:[`read`,`write`],readPermissions:[`evaluations:view`],writePermissions:[`evaluations:view`,`evaluations:manage`]},{key:`langy`,label:`Langy`,accessLevels:[`read`,`write`],readPermissions:[`langy:view`],writePermissions:[`langy:view`,`langy:create`,`langy:update`,`langy:delete`]},{key:`datasets`,label:`Datasets`,accessLevels:[`read`,`write`],readPermissions:[`datasets:view`],writePermissions:[`datasets:view`,`datasets:manage`]},{key:`triggers`,label:`Triggers`,accessLevels:[`read`,`write`],readPermissions:[`triggers:view`],writePermissions:[`triggers:view`,`triggers:manage`]},{key:`workflows`,label:`Workflows`,accessLevels:[`read`,`write`],readPermissions:[`workflows:view`],writePermissions:[`workflows:view`,`workflows:manage`]},{key:`experiments`,label:`Experiments`,accessLevels:[`read`,`write`],readPermissions:[`experiments:view`],writePermissions:[`experiments:view`,`experiments:manage`]},{key:`prompts`,label:`Prompts`,accessLevels:[`read`,`write`],readPermissions:[`prompts:view`],writePermissions:[`prompts:view`,`prompts:manage`]},{key:`secrets`,label:`Secrets`,accessLevels:[`read`,`write`],readPermissions:[`secrets:view`],writePermissions:[`secrets:view`,`secrets:manage`]},{key:`auditLog`,label:`Audit Log`,accessLevels:[`read`],readPermissions:[`auditLog:view`],writePermissions:[]},{key:`team`,label:`Team`,accessLevels:[`read`,`write`],readPermissions:[`team:view`],writePermissions:[`team:view`,`team:manage`]},{key:`project`,label:`Project`,accessLevels:[`read`,`write`],readPermissions:[`project:view`],writePermissions:[`project:view`,`project:create`,`project:update`,`project:delete`,`project:manage`]}];function Te({key:e,level:t}){let n=Q.find(t=>t.key===e);return n?t===`write`?n.writePermissions:n.readPermissions:[]}function Ee(e){let t=new Set;for(let[n,r]of Object.entries(e))if(r!==`none`)for(let e of Te({key:n,level:r}))t.add(e);return[...t].sort()}function De(e){let t={};for(let n of Q){let r=n.writePermissions.length>0&&n.writePermissions.every(t=>e.includes(t)),i=n.readPermissions.every(t=>e.includes(t));r?t[n.key]=`write`:i&&(t[n.key]=`read`)}return t}function Oe({count:e}){return(0,Z.jsxs)(I,{gap:1.5,children:[(0,Z.jsx)(u,{size:13,color:`var(--chakra-colors-fg-muted)`}),(0,Z.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[e,` selected permission`,e===1?``:`s`]})]})}var $={none:`None`,read:`Read`,write:`Write`};function ke({category:e,value:t,userPermissions:n,onChange:r}){let i=e.readPermissions.every(e=>W(n,e)),c=e.writePermissions.length>0&&e.writePermissions.every(e=>W(n,e)),l=!i,d=t!==`none`,f=[];i&&f.push({value:`read`,label:`Read`}),c&&e.accessLevels.includes(`write`)&&f.push({value:`write`,label:`Write`}),f.push({value:`none`,label:`None`});let p=(0,Z.jsxs)(I,{gap:.5,cursor:l?`not-allowed`:`pointer`,opacity:l?.4:1,_hover:l?void 0:{opacity:.7},children:[(0,Z.jsx)(o,{fontSize:`sm`,color:d?`fg`:`fg.muted`,fontWeight:d?`500`:`400`,children:$[t]}),(0,Z.jsx)(s,{size:12,color:`var(--chakra-colors-fg-subtle)`})]});return l?(0,Z.jsxs)(I,{justify:`space-between`,paddingY:3,children:[(0,Z.jsxs)(I,{gap:1.5,children:[(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:e.label}),(0,Z.jsx)(m,{content:`Your role does not include access to ${e.label.toLowerCase()}`,children:(0,Z.jsx)(a,{color:`fg.subtle`,cursor:`help`,children:(0,Z.jsx)(u,{size:12})})})]}),p]}):(0,Z.jsxs)(I,{justify:`space-between`,paddingY:3,children:[(0,Z.jsx)(o,{fontSize:`sm`,children:e.label}),(0,Z.jsxs)(v.Root,{children:[(0,Z.jsx)(v.Trigger,{asChild:!0,children:(0,Z.jsx)(a,{children:p})}),(0,Z.jsx)(v.Content,{minWidth:`120px`,children:f.map(e=>(0,Z.jsx)(v.Item,{value:e.value,onClick:()=>r(e.value),children:e.label},e.value))})]})]})}function Ae({selections:e,userPermissions:t,onChange:n}){return(0,Z.jsx)(a,{width:`full`,borderWidth:`1px`,borderColor:`border`,borderRadius:`lg`,paddingX:4,children:Q.map((r,i)=>(0,Z.jsx)(a,{borderBottomWidth:i<Q.length-1?`1px`:0,borderColor:`border.muted`,children:(0,Z.jsx)(ke,{category:r,value:e[r.key]??`none`,userPermissions:t,onChange:t=>{n({...e,[r.key]:t})}})},r.key))})}var je=[{label:`No expiration`,value:``},{label:`7 days`,value:`7`},{label:`30 days`,value:`30`},{label:`60 days`,value:`60`},{label:`90 days`,value:`90`},{label:`Custom...`,value:`custom`}],Me=d({items:je});function Ne(e){return e.length<=8?`********`:`${e.slice(0,4)}${`*`.repeat(Math.min(e.length-8,32))}${e.slice(-4)}`}function Pe(e){return e.map(({key:e,value:t,mask:n})=>`${e}="${n?Ne(t):t}"`).join(`
3
- `)}function Fe({bindings:e,scopeType:t,scopeId:n,organizationId:r,orgProjects:i}){if(!e)return;let a=(t,n)=>e.find(e=>e.scopeType===t&&e.scopeId===n);return a(t,n)??(t===`PROJECT`?a(`TEAM`,i.find(e=>e.id===n)?.teamId??``):void 0)??(t===`ORGANIZATION`?void 0:a(`ORGANIZATION`,r))}function Ie({permissionMode:e,scopeType:t,scopeId:n,myBindings:r,organizationId:i,orgProjects:a,isServiceKey:o}){return e===`all`?o?`ADMIN`:r?Fe({bindings:r,scopeType:t,scopeId:n,organizationId:i,orgProjects:a})?.role??`VIEWER`:`VIEWER`:`CUSTOM`}function Le(e){return e.map(e=>({scopeType:e.scopeType,scopeId:e.scopeId}))}function Re(e){let t=e.permissionMode;return t===`readonly`||t===`restricted`||e.roleBindings.length===1&&e.roleBindings[0].role===`CUSTOM`?`restricted`:`all`}function ze(e,t){if(e.permissionMode===`readonly`){let e={};for(let n of t.permissionCategories)e[n.key]=`read`;return e}let n=e.roleBindings[0];if(!n)return{};if(n.role===`CUSTOM`&&n.customRoleId){let e=n.customRolePermissions;if(Array.isArray(e))return t.selectionsFromPermissions(e)}if(n.role===`VIEWER`){let e={};for(let n of t.permissionCategories)e[n.key]=`read`;return e}if(n.role===`MEMBER`)return t.selectionsFromPermissions(t.getTeamRolePermissions(`MEMBER`));let r={};for(let e of t.permissionCategories)r[e.key]=e.accessLevels.includes(`write`)?`write`:`read`;return r}function Be({myBindings:e,scopeType:t,scopeId:n,organizationId:r,orgProjects:i,isServiceKey:a,getTeamRolePermissions:o}){if(a)return o(`ADMIN`);let s=Fe({bindings:e,scopeType:t,scopeId:n,organizationId:r,orgProjects:i});return s?o(s.role):[]}function Ve({isOpen:e,isCreating:t,myBindings:r,orgProjects:i,orgTeams:a,organizationId:s,organizationName:l,currentTeamId:u,currentProjectId:p,onClose:m,onCreate:h}){let g=ae().data?.user?.id??``,[_,v]=(0,X.useState)(``),[y,b]=(0,X.useState)(``),[x,S]=(0,X.useState)(``),[C,w]=(0,X.useState)(``),[k,A]=(0,X.useState)([]),[j,M]=(0,X.useState)(`all`),[N,P]=(0,X.useState)({}),[F,te]=(0,X.useState)(`personal`),[R,z]=(0,X.useState)(``),ie=B.apiKey.orgMembers.useQuery({organizationId:s},{enabled:e}),H=(ie.data?.length??0)>0,oe=(0,X.useMemo)(()=>{let e=new Date;return e.setDate(e.getDate()+1),`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`},[]),se=(0,X.useMemo)(()=>d({items:(ie.data??[]).map(e=>({label:e.name??e.email??e.id,value:e.id}))}),[ie.data]),W=k[0]??{scopeType:`PROJECT`,scopeId:p??``},G=(0,X.useMemo)(()=>Be({myBindings:r.data,scopeType:W.scopeType,scopeId:W.scopeId,organizationId:s,orgProjects:i,isServiceKey:F===`service`,getTeamRolePermissions:e=>U(e)}),[r.data,W.scopeType,W.scopeId,s,i,F]),ce=()=>{v(``),b(``),S(``),w(``),A(p?[{scopeType:`PROJECT`,scopeId:p}]:[]),M(`all`),P({}),te(`personal`),z(g)};(0,X.useEffect)(()=>{e&&ce()},[e,g]);let ue=()=>{let e;if(x===`custom`&&C)e=new Date(C);else if(x&&x!==`custom`){let t=parseInt(x,10);e=new Date(Date.now()+t*24*60*60*1e3)}let t=j===`restricted`?Ee(N):void 0,n=F===`service`,a=k.map(e=>({role:Ie({permissionMode:j,scopeType:e.scopeType,scopeId:e.scopeId,myBindings:r.data,organizationId:s,orgProjects:i,isServiceKey:n}),scopeType:e.scopeType,scopeId:e.scopeId}));h({name:_,description:y,expiresAt:e,permissionMode:j,keyType:F,assignedToUserId:H&&R&&R!==g?R:void 0,scopeType:W.scopeType,scopeId:W.scopeId,permissions:t,bindings:a})},de=j===`all`||Object.values(N).some(e=>e!==`none`),K=_.trim()&&!t&&!r.isLoading&&de&&(k.length>0||!!p);return(0,Z.jsx)(c.Root,{placement:`end`,size:`lg`,open:e,onOpenChange:({open:e})=>{e||(m(),ce())},children:(0,Z.jsxs)(c.Content,{bg:`bg`,children:[(0,Z.jsxs)(c.Header,{children:[(0,Z.jsx)(le,{size:`md`,children:`Create new secret key`}),(0,Z.jsx)(c.CloseTrigger,{})]}),(0,Z.jsx)(c.Body,{children:(0,Z.jsxs)(L,{gap:5,align:`start`,children:[H&&(0,Z.jsxs)(L,{gap:2,align:`start`,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`600`,fontSize:`sm`,children:`Key type`}),(0,Z.jsxs)(ee,{size:`sm`,value:F,onValueChange:e=>te(e.value),children:[(0,Z.jsx)(O,{}),(0,Z.jsxs)(E,{value:`personal`,children:[(0,Z.jsx)(T,{children:`Personal`}),(0,Z.jsx)(D,{})]}),(0,Z.jsxs)(E,{value:`service`,children:[(0,Z.jsx)(T,{children:`Service`}),(0,Z.jsx)(D,{})]})]}),F===`personal`&&(0,Z.jsxs)(L,{gap:2,align:`start`,width:`full`,children:[(0,Z.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:`Tied to a user. If the user is removed from the organization, this key will be disabled.`}),(0,Z.jsxs)(f.Root,{collection:se,value:R?[R]:[],onValueChange:e=>{z(e.value[0]??``)},children:[(0,Z.jsx)(f.Trigger,{width:`full`,background:`bg`,children:(0,Z.jsx)(f.ValueText,{placeholder:`Select user`})}),(0,Z.jsx)(f.Content,{children:se.items.map(e=>(0,Z.jsx)(f.Item,{item:e,children:e.label},e.value))})]})]}),F===`service`&&(0,Z.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:`Not tied to any user. Cannot be revoked when a user leaves. Set permissions below.`})]}),(0,Z.jsxs)(L,{gap:1,align:`start`,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`600`,fontSize:`sm`,children:`Name`}),(0,Z.jsx)(V,{placeholder:`e.g., CI Pipeline, Local Dev`,value:_,onChange:e=>v(e.target.value)})]}),(0,Z.jsxs)(L,{gap:1,align:`start`,width:`full`,children:[(0,Z.jsxs)(o,{fontWeight:`600`,fontSize:`sm`,children:[`Description`,` `,(0,Z.jsx)(o,{as:`span`,color:`fg.muted`,fontWeight:`400`,children:`(optional)`})]}),(0,Z.jsx)(ne,{placeholder:`What is this key used for?`,value:y,onChange:e=>b(e.target.value),maxLength:500,rows:3,resize:`vertical`})]}),(0,Z.jsxs)(L,{gap:1.5,align:`start`,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`600`,fontSize:`sm`,children:`Scope`}),(0,Z.jsx)(re,{value:k,onChange:e=>{A(e),P({})},organizationId:s,organizationName:l,availableTeams:a,availableProjects:i,label:``,showQuickPicks:!0,currentOrganizationId:s,currentTeamId:u,currentProjectId:p})]}),(0,Z.jsxs)(L,{gap:2,align:`start`,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`600`,fontSize:`sm`,children:`Permissions`}),(0,Z.jsxs)(I,{justify:`space-between`,width:`full`,children:[(0,Z.jsxs)(ee,{size:`sm`,value:j,onValueChange:e=>{let t=e.value;M(t),t===`all`&&P({})},children:[(0,Z.jsx)(O,{}),(0,Z.jsxs)(E,{value:`all`,children:[(0,Z.jsx)(T,{children:`All`}),(0,Z.jsx)(D,{})]}),(0,Z.jsxs)(E,{value:`restricted`,children:[(0,Z.jsx)(T,{children:`Restricted`}),(0,Z.jsx)(D,{})]})]}),j===`restricted`&&(0,Z.jsx)(Oe,{count:Object.values(N).filter(e=>e&&e!==`none`).length})]}),j===`all`&&(0,Z.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:`Full access within the selected scope, bounded by your role.`}),j===`restricted`&&(0,Z.jsx)(Ae,{selections:N,userPermissions:G,onChange:P})]}),(0,Z.jsxs)(L,{gap:1,align:`start`,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`600`,fontSize:`sm`,children:`Expiration`}),(0,Z.jsxs)(f.Root,{collection:Me,value:[x],onValueChange:e=>{let t=e.value[0]??``;S(t),t!==`custom`&&w(``)},children:[(0,Z.jsx)(f.Trigger,{width:`full`,background:`bg`,children:(0,Z.jsx)(f.ValueText,{placeholder:`No expiration`})}),(0,Z.jsx)(f.Content,{width:`300px`,paddingY:2,children:je.map(e=>(0,Z.jsx)(f.Item,{item:e,children:e.label},e.value))})]}),x===`custom`&&(0,Z.jsx)(V,{type:`date`,value:C,min:oe,onChange:e=>w(e.target.value)})]})]})}),(0,Z.jsx)(c.Footer,{children:(0,Z.jsxs)(I,{width:`full`,justify:`end`,gap:2,children:[(0,Z.jsx)(n,{variant:`outline`,onClick:m,children:`Cancel`}),(0,Z.jsx)(n,{colorPalette:`blue`,onClick:ue,disabled:!K,children:`Create secret key`})]})})]})})}var He=H();function Ue({apiKey:e,isUpdating:t,myBindings:r,orgProjects:i,orgTeams:a,organizationId:s,organizationName:l,currentTeamId:u,currentProjectId:d,onClose:f,onSave:p}){let[m,h]=(0,X.useState)(``),[g,_]=(0,X.useState)(``),[v,y]=(0,X.useState)([]),[b,x]=(0,X.useState)(`all`),[S,C]=(0,X.useState)({}),w=e?!e.userId:!1,k=v[0]??{scopeType:`PROJECT`,scopeId:d??``},A=(0,X.useMemo)(()=>{if(w)return U(He.TeamUserRole.ADMIN);if(!r.data)return[];let e=Fe({bindings:r.data,scopeType:k.scopeType,scopeId:k.scopeId,organizationId:s,orgProjects:i});return e?U(e.role):[]},[r.data,k.scopeType,k.scopeId,s,i,w]);(0,X.useEffect)(()=>{if(e){h(e.name),_(e.description??``);let t=Re(e);x(t),y(Le(e.roleBindings)),C(t===`restricted`?ze(e,{permissionCategories:Q,selectionsFromPermissions:De,getTeamRolePermissions:e=>U(e)}):{})}},[e,s,u,d]);let j=e=>{if(x(e),e===`restricted`&&Object.values(S).every(e=>!e||e===`none`)){let e={};for(let t of Q){let n=t.readPermissions.every(e=>W(A,e)),r=t.accessLevels.includes(`write`)&&t.writePermissions.every(e=>W(A,e));e[t.key]=r?`write`:n?`read`:`none`}C(e)}},M=()=>{if(!e)return;let t=b===`restricted`?Ee(S):void 0,n=v.map(e=>({role:Ie({permissionMode:b,scopeType:e.scopeType,scopeId:e.scopeId,myBindings:r.data,organizationId:s,orgProjects:i,isServiceKey:w}),scopeType:e.scopeType,scopeId:e.scopeId}));p({apiKeyId:e.id,name:m===e.name?void 0:m,description:g===(e.description??``)?void 0:g||null,permissionMode:b,scopeType:k.scopeType,scopeId:k.scopeId,permissions:t,bindings:n})},N=b===`all`||Object.values(S).some(e=>e!==`none`),P=m.trim()&&!t&&N;return(0,Z.jsx)(c.Root,{placement:`end`,size:`lg`,open:!!e,onOpenChange:({open:e})=>{e||f()},children:(0,Z.jsxs)(c.Content,{bg:`bg`,children:[(0,Z.jsxs)(c.Header,{children:[(0,Z.jsx)(le,{size:`md`,children:`Edit API key`}),(0,Z.jsx)(c.CloseTrigger,{})]}),(0,Z.jsx)(c.Body,{children:(0,Z.jsxs)(L,{gap:5,align:`start`,children:[(0,Z.jsxs)(L,{gap:1,align:`start`,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`600`,fontSize:`sm`,children:`Name`}),(0,Z.jsx)(V,{value:m,onChange:e=>h(e.target.value)})]}),(0,Z.jsxs)(L,{gap:1,align:`start`,width:`full`,children:[(0,Z.jsxs)(o,{fontWeight:`600`,fontSize:`sm`,children:[`Description`,` `,(0,Z.jsx)(o,{as:`span`,color:`fg.muted`,fontWeight:`400`,children:`(optional)`})]}),(0,Z.jsx)(ne,{value:g,onChange:e=>_(e.target.value),maxLength:500,rows:3,resize:`vertical`})]}),(0,Z.jsxs)(L,{gap:1.5,align:`start`,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`600`,fontSize:`sm`,children:`Scope`}),(0,Z.jsx)(re,{value:v,onChange:e=>{y(e),C({})},organizationId:s,organizationName:l,availableTeams:a,availableProjects:i,label:``,showQuickPicks:!0,currentOrganizationId:s,currentTeamId:u,currentProjectId:d})]}),(0,Z.jsxs)(L,{gap:2,align:`start`,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`600`,fontSize:`sm`,children:`Permissions`}),(0,Z.jsxs)(I,{justify:`space-between`,width:`full`,children:[(0,Z.jsxs)(ee,{size:`sm`,value:b,onValueChange:e=>j(e.value),children:[(0,Z.jsx)(O,{}),(0,Z.jsxs)(E,{value:`all`,children:[(0,Z.jsx)(T,{children:`All`}),(0,Z.jsx)(D,{})]}),(0,Z.jsxs)(E,{value:`restricted`,children:[(0,Z.jsx)(T,{children:`Restricted`}),(0,Z.jsx)(D,{})]})]}),b===`restricted`&&(0,Z.jsx)(Oe,{count:Object.values(S).filter(e=>e&&e!==`none`).length})]}),b===`restricted`&&(0,Z.jsx)(Ae,{selections:S,userPermissions:A,onChange:C})]})]})}),(0,Z.jsx)(c.Footer,{children:(0,Z.jsxs)(I,{width:`full`,justify:`end`,gap:2,children:[(0,Z.jsx)(n,{variant:`outline`,onClick:f,children:`Cancel`}),(0,Z.jsx)(n,{colorPalette:`blue`,onClick:M,disabled:!P,children:`Save`})]})})]})})}function We(e){return!!(e.expiresAt&&new Date(e.expiresAt)<new Date)}function Ge({keys:e,isAdmin:t,onRevoke:r}){return e.length===0?null:(0,Z.jsxs)(L,{gap:4,width:`full`,align:`start`,children:[(0,Z.jsxs)(L,{gap:1,align:`start`,children:[(0,Z.jsx)(le,{size:`md`,children:`Ingestion keys`}),(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Write-only keys scoped to one project that only ingest traces. The langwatch CLI mints these when you connect a tool.`})]}),(0,Z.jsx)(P,{width:`full`,overflow:`hidden`,children:(0,Z.jsx)(F,{paddingY:0,paddingX:0,overflowX:`auto`,children:(0,Z.jsxs)(g,{variant:`line`,size:`md`,width:`full`,children:[(0,Z.jsx)(y,{children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(S,{children:`Name`}),(0,Z.jsx)(S,{children:`Status`}),(0,Z.jsx)(S,{children:`Secret Key`}),(0,Z.jsx)(S,{children:`Created`}),(0,Z.jsx)(S,{children:`Last Used`}),(0,Z.jsx)(S,{children:`Source`}),(0,Z.jsx)(S,{children:`Created from`}),(0,Z.jsx)(S,{width:`100px`})]})}),(0,Z.jsx)(x,{children:e.map(e=>(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{children:(0,Z.jsxs)(I,{align:`start`,children:[(0,Z.jsx)(a,{paddingTop:1,children:(0,Z.jsx)(Ce,{size:14})}),(0,Z.jsxs)(L,{align:`start`,gap:0,children:[(0,Z.jsx)(o,{children:e.name}),e.description&&(0,Z.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:e.description})]})]})}),(0,Z.jsx)(b,{children:We(e)?(0,Z.jsx)(p,{size:`sm`,colorPalette:`red`,children:`Expired`}):(0,Z.jsx)(p,{size:`sm`,colorPalette:`green`,children:`Active`})}),(0,Z.jsx)(b,{children:(0,Z.jsxs)(o,{fontSize:`xs`,fontFamily:`monospace`,color:`fg.muted`,children:[`ik-lw-`,e.lookupIdPrefix,`…`]})}),(0,Z.jsx)(b,{children:new Date(e.createdAt).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}),(0,Z.jsx)(b,{children:e.lastUsedAt?(0,Z.jsx)(m,{content:new Date(e.lastUsedAt).toISOString(),children:(0,Z.jsx)(o,{cursor:`help`,tabIndex:0,"aria-label":`Last used at ${new Date(e.lastUsedAt).toISOString()}`,children:de(new Date(e.lastUsedAt).getTime())})}):(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Never`})}),(0,Z.jsx)(b,{children:(0,Z.jsx)(p,{size:`sm`,colorPalette:`blue`,children:e.ingestSourceType})}),(0,Z.jsx)(b,{children:e.createdByDeviceLabel?(0,Z.jsx)(o,{fontSize:`sm`,children:e.createdByDeviceLabel}):(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Unknown device`})}),(0,Z.jsx)(b,{children:t&&(0,Z.jsx)(n,{size:`xs`,variant:`ghost`,colorPalette:`red`,"aria-label":`Revoke ingestion key ${e.name}`,onClick:()=>r(e.id),children:(0,Z.jsx)(_,{size:14,"aria-hidden":`true`})})})]},e.id))})]})})})]})}function Ke({apiKeyId:e,isRevoking:t,onCancel:r,onConfirm:i}){return(0,Z.jsx)(K.Root,{size:`lg`,open:!!e,onOpenChange:({open:e})=>{e||r()},children:(0,Z.jsxs)(K.Content,{bg:`bg`,children:[(0,Z.jsx)(K.Header,{children:(0,Z.jsx)(K.Title,{children:`Revoke API Key`})}),(0,Z.jsx)(K.CloseTrigger,{}),(0,Z.jsx)(K.Body,{paddingBottom:6,children:(0,Z.jsxs)(L,{gap:4,align:`start`,children:[(0,Z.jsx)(o,{children:`Are you sure you want to revoke this API key? Any integration using it will stop working immediately.`}),(0,Z.jsxs)(I,{width:`full`,justify:`end`,gap:2,children:[(0,Z.jsx)(n,{variant:`outline`,onClick:r,children:`Cancel`}),(0,Z.jsx)(n,{colorPalette:`red`,onClick:()=>e&&i(e),disabled:t,children:`Revoke`})]})]})})]})})}var qe=fe(()=>r(()=>import(`./ShikiCommandBox-D_TBnZxW.js`).then(e=>e.ShikiCommandBox),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49])),{ssr:!1}),Je=[{editor:`Claude Code`,path:`.claude/settings.json`},{editor:`Cursor`,path:`.cursor/mcp.json`},{editor:`Copilot`,path:`.vscode/mcp.json`},{editor:`Windsurf`,path:`~/.codeium/windsurf/mcp_config.json`},{editor:`Claude Desktop`,path:`~/Library/Application Support/Claude/claude_desktop_config.json`}];function Ye({newToken:e,projectId:t,endpoint:n,orgProjects:r,onClose:i}){let[s,c]=(0,X.useState)(`claude-code`),[l,u]=(0,X.useState)(`env`),[p,m]=(0,X.useState)(t??``),h=p||t,g=_e(e??``),_=(0,X.useMemo)(()=>d({items:r.map(e=>({label:e.name,value:e.id}))}),[r]),v=n&&n!==`https://app.langwatch.ai`,y=v?` --endpoint ${n}`:``,b=h?` --env LANGWATCH_PROJECT_ID=${h}`:``,x=h?` --env LANGWATCH_PROJECT_ID=${h}`:``,S=(0,X.useMemo)(()=>me({apiKey:e??``,endpoint:n,projectId:h}),[e,n,h]),C=(0,X.useMemo)(()=>me({apiKey:g,endpoint:n,projectId:h}),[g,n,h]),w=(0,X.useMemo)(()=>Pe([{key:`LANGWATCH_API_KEY`,value:e??``,mask:!0},{key:`LANGWATCH_PROJECT_ID`,value:h??`<your-project-id>`},{key:`LANGWATCH_ENDPOINT`,value:n}]),[e,h,n]),ee=(0,X.useMemo)(()=>Pe([{key:`LANGWATCH_API_KEY`,value:e??``},{key:`LANGWATCH_PROJECT_ID`,value:h??`<your-project-id>`},{key:`LANGWATCH_ENDPOINT`,value:n}]),[e,h,n]),T=e?`Authorization: Bearer ${Ne(e)}\nX-Project-Id: ${h??`<your-project-id>`}`:``,E=`Authorization: Bearer ${e??``}\nX-Project-Id: ${h??`<your-project-id>`}`,D=e&&h?`Authorization: Basic ${btoa(`${h}:${e}`)}`:``,O=`Authorization: Basic base64(${h??`<your-project-id>`}:pat-lw-...)`,j=`claude mcp add langwatch${b} -- npx -y @langwatch/mcp-server --api-key ${e??``}${y}`,N=`claude mcp add langwatch${b} -- npx -y @langwatch/mcp-server --api-key ${g}${y}`,P=`codex mcp add langwatch --env LANGWATCH_API_KEY=${e??``}${x}${v?` --env LANGWATCH_ENDPOINT=${n}`:``} -- npx -y @langwatch/mcp-server`,F=`codex mcp add langwatch --env LANGWATCH_API_KEY=${g}${x}${v?` --env LANGWATCH_ENDPOINT=${n}`:``} -- npx -y @langwatch/mcp-server`;return(0,Z.jsx)(K.Root,{size:`xl`,open:!!e,onOpenChange:({open:e})=>{e||i()},children:(0,Z.jsxs)(K.Content,{bg:`bg`,children:[(0,Z.jsx)(K.Header,{children:(0,Z.jsx)(K.Title,{children:`Token Created`})}),(0,Z.jsx)(K.CloseTrigger,{}),(0,Z.jsx)(K.Body,{paddingBottom:6,children:(0,Z.jsxs)(L,{gap:6,align:`stretch`,children:[(0,Z.jsxs)(L,{gap:3,align:`stretch`,children:[(0,Z.jsxs)(I,{gap:4,align:`start`,children:[(0,Z.jsxs)(L,{gap:2,align:`start`,flex:1,children:[(0,Z.jsx)(o,{fontWeight:`700`,fontSize:`sm`,children:`Use in Code`}),(0,Z.jsxs)(I,{gap:1,px:1.5,py:1.5,borderRadius:`xl`,border:`1px solid`,borderColor:`border.subtle`,bg:`bg.panel/70`,boxShadow:`sm`,width:`fit-content`,children:[(0,Z.jsx)(Y,{label:`.env`,active:l===`env`,onClick:()=>u(`env`)}),(0,Z.jsx)(Y,{label:`Bearer`,active:l===`bearer`,onClick:()=>u(`bearer`)}),(0,Z.jsx)(Y,{label:`Basic Auth`,active:l===`basic`,onClick:()=>u(`basic`)})]})]}),r.length>1&&(0,Z.jsxs)(L,{gap:2,align:`start`,width:`200px`,flexShrink:0,children:[(0,Z.jsx)(o,{fontWeight:`700`,fontSize:`sm`,children:`Project`}),(0,Z.jsxs)(f.Root,{collection:_,value:h?[h]:[],onValueChange:e=>{m(e.value[0]??``)},size:`sm`,width:`full`,children:[(0,Z.jsx)(f.Trigger,{background:`bg`,borderRadius:`lg`,children:(0,Z.jsx)(f.ValueText,{placeholder:`Select project`})}),(0,Z.jsx)(f.Content,{children:_.items.map(e=>(0,Z.jsx)(f.Item,{item:e,children:e.label},e.value))})]})]})]}),l===`env`&&e&&(0,Z.jsx)(qe,{command:ee,maskedCommand:w,lang:`ini`,copyLabel:`.env`}),l===`bearer`&&(0,Z.jsxs)(L,{gap:1,align:`stretch`,children:[(0,Z.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[`Use the `,(0,Z.jsx)(`code`,{children:`Authorization`}),` header plus`,` `,(0,Z.jsx)(`code`,{children:`X-Project-Id`}),`:`]}),(0,Z.jsx)(qe,{command:E,maskedCommand:T,lang:`shellscript`,copyLabel:`Bearer headers`})]}),l===`basic`&&(0,Z.jsxs)(L,{gap:1,align:`stretch`,children:[(0,Z.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[`Encode the project ID and token as`,` `,(0,Z.jsx)(`code`,{children:`base64(projectId:token)`}),`:`]}),(0,Z.jsx)(qe,{command:D,maskedCommand:O,lang:`shellscript`,copyLabel:`Basic Auth header`})]})]}),(0,Z.jsxs)(A,{status:`warning`,variant:`subtle`,opacity:.8,children:[(0,Z.jsx)(M,{}),(0,Z.jsx)(k,{fontSize:`xs`,children:`Copy this token now. You won't be able to see it again.`})]}),(0,Z.jsxs)(L,{gap:3,align:`stretch`,children:[(0,Z.jsx)(o,{fontWeight:`700`,fontSize:`sm`,children:`Use with Code Assistants`}),(0,Z.jsxs)(I,{gap:1,px:1.5,py:1.5,borderRadius:`xl`,border:`1px solid`,borderColor:`border.subtle`,bg:`bg.panel/70`,boxShadow:`sm`,width:`fit-content`,children:[(0,Z.jsx)(Y,{label:`Claude Code`,active:s===`claude-code`,onClick:()=>c(`claude-code`)}),(0,Z.jsx)(Y,{label:`Codex`,active:s===`codex`,onClick:()=>c(`codex`)})]}),s===`claude-code`&&e&&(0,Z.jsxs)(L,{align:`stretch`,gap:3,children:[(0,Z.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Run in your terminal`}),(0,Z.jsx)(qe,{command:j,maskedCommand:N,lang:`bash`,showPrompt:!0,copyLabel:`Claude Code command`})]}),s===`codex`&&e&&(0,Z.jsxs)(L,{align:`stretch`,gap:3,children:[(0,Z.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Run in your terminal`}),(0,Z.jsx)(qe,{command:P,maskedCommand:F,lang:`bash`,showPrompt:!0,copyLabel:`Codex command`})]}),e&&(0,Z.jsxs)(L,{align:`stretch`,gap:2,children:[(0,Z.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Or paste into your config file`}),(0,Z.jsxs)(a,{position:`relative`,borderRadius:`xl`,overflow:`hidden`,border:`1px solid`,borderColor:`border.subtle`,bg:`bg.panel/70`,boxShadow:`xs`,transition:`all 0.17s ease`,_hover:{borderColor:`orange.emphasized`,boxShadow:`md`},children:[(0,Z.jsx)(he,{code:C,highlightLines:ge(C)}),(0,Z.jsx)(a,{position:`absolute`,top:2.5,right:2.5,children:(0,Z.jsx)(J,{text:S,label:`Config`})})]}),(0,Z.jsxs)(I,{gap:2,flexWrap:`wrap`,align:`center`,children:[(0,Z.jsx)(o,{fontSize:`xs`,color:`fg.muted`,flexShrink:0,children:`Config path:`}),Je.map(e=>(0,Z.jsx)(I,{asChild:!0,gap:1,px:2,py:.5,borderRadius:`md`,bg:`bg.panel/60`,border:`1px solid`,borderColor:`border.subtle`,cursor:`pointer`,transition:`all 0.15s ease`,_hover:{borderColor:`orange.emphasized`,bg:`bg.panel`},onClick:()=>{q({text:e.path,successMessage:`${e.editor} config path copied`})},children:(0,Z.jsx)(`button`,{type:`button`,"aria-label":`Copy ${e.editor} config path`,children:(0,Z.jsx)(o,{fontSize:`2xs`,fontWeight:`medium`,color:`fg`,children:e.editor})})},e.editor))]})]})]})]})})]})})}function Xe({apiKey:e,canManage:t,onRotate:r}){return(0,Z.jsxs)(I,{gap:1,children:[(0,Z.jsx)(n,{size:`xs`,variant:`ghost`,"aria-label":`Copy secret key`,onClick:()=>{navigator.clipboard.writeText(e),h.create({title:`API key copied to clipboard`,type:`success`,duration:2e3,meta:{closable:!0}})},children:(0,Z.jsx)(z,{size:14})}),t&&(0,Z.jsx)(m,{content:`Rotate this key`,children:(0,Z.jsx)(n,{size:`xs`,variant:`ghost`,"aria-label":`Rotate Project API Key`,onClick:r,children:(0,Z.jsx)(G,{size:14,"aria-hidden":`true`})})})]})}function Ze({organizationId:e,projectId:t}){let r=ae().data?.user?.id??``,i=ie(),{project:s,team:c,organization:u,hasPermission:d}=se(),f=i.data?.BASE_HOST??`https://app.langwatch.ai`,v=d(`project:manage`),ee=B.apiKey.list.useQuery({organizationId:e}),T=B.apiKey.myBindings.useQuery({organizationId:e}),E=B.apiKey.orgProjects.useQuery({organizationId:e}),D=B.apiKey.orgTeams.useQuery({organizationId:e}),O=(B.apiKey.orgMembers.useQuery({organizationId:e}).data?.length??0)>0,k=B.apiKey.create.useMutation(),A=B.apiKey.update.useMutation(),j=B.apiKey.revoke.useMutation(),M=B.project.regenerateApiKey.useMutation(),N=B.useContext(),{open:ne,onOpen:R,onClose:re}=l(),[z,V]=(0,X.useState)(null),[H,U]=(0,X.useState)(null),[W,G]=(0,X.useState)(null),[K,fe]=(0,X.useState)(null),[me,q]=(0,X.useState)(!1),he=xe(u),{hierarchy:ge}=he,[J,_e]=be({filterAvailable:he,teamId:c?.id,projectId:s?.id}),Y=ee.data??[],ve=(0,X.useMemo)(()=>Y.filter(e=>e.ingestSourceType!=null),[Y]),Ce=(0,X.useMemo)(()=>Y.filter(e=>e.ingestSourceType==null),[Y]),Q=(0,X.useMemo)(()=>Se(Ce.map(e=>({...e,scopes:e.roleBindings.map(e=>({scopeType:e.scopeType,scopeId:e.scopeId}))})),J,{hierarchy:ge,currentTeamId:c?.id,currentProjectId:s?.id}),[Ce,J,ge,c?.id,s?.id]),Te=t=>{if(t.permissionMode===`restricted`&&t.bindings.length===0){h.create({title:`No scopes selected`,description:`Select at least one scope for a restricted key.`,type:`error`,duration:5e3,meta:{closable:!0}});return}if(t.keyType===`personal`&&t.permissionMode!==`restricted`&&t.bindings.length===0){h.create({title:`No permissions to grant`,description:`You have no role bindings in this organization, so there is nothing to grant to a key.`,type:`error`,duration:5e3,meta:{closable:!0}});return}k.mutate({organizationId:e,name:t.name,description:t.description.trim()?t.description.trim():void 0,expiresAt:t.expiresAt,permissionMode:t.permissionMode,keyType:t.keyType,assignedToUserId:t.assignedToUserId,permissions:t.permissions,bindings:t.bindings},{onSuccess:e=>{V(e.token),U(t),N.apiKey.list.invalidate()},onError:e=>{h.create({title:`Failed to create API key`,description:e.message,type:`error`,duration:5e3,meta:{closable:!0}})}})},Ee=t=>{A.mutate({organizationId:e,apiKeyId:t.apiKeyId,name:t.name,description:t.description,permissionMode:t.permissionMode,permissions:t.permissions,bindings:t.bindings},{onSuccess:()=>{fe(null),h.create({title:`API key updated`,type:`success`,duration:3e3,meta:{closable:!0}}),N.apiKey.list.invalidate()},onError:e=>{h.create({title:`Failed to update API key`,description:e.message,type:`error`,duration:5e3,meta:{closable:!0}})}})},De=t=>{j.mutate({organizationId:e,apiKeyId:t},{onSuccess:()=>{G(null),h.create({title:`API key revoked`,type:`success`,duration:3e3,meta:{closable:!0}}),N.apiKey.list.invalidate()},onError:e=>{h.create({title:`Failed to revoke API key`,description:e.message,type:`error`,duration:5e3,meta:{closable:!0}})}})},Oe=()=>{s?.id&&M.mutate({projectId:s.id},{onSuccess:e=>{q(!1),V(e.apiKey),N.organization.getAll.invalidate(),h.create({title:`Project API key rotated`,description:`The previous key no longer works. Update your integrations.`,type:`warning`,duration:6e3,meta:{closable:!0}})},onError:e=>{q(!1),h.create({title:`Failed to rotate project API key`,description:e.message,type:`error`,duration:5e3,meta:{closable:!0}})}})},$=s?.apiKey,ke=(0,X.useMemo)(()=>!$||!s?.id?!1:Se([{scopes:[{scopeType:`PROJECT`,scopeId:s.id}]}],J,{hierarchy:ge,currentTeamId:c?.id,currentProjectId:s?.id}).length>0,[$,s?.id,J,ge,c?.id]),Ae=e=>e.expiresAt&&new Date(e.expiresAt)<new Date?`Expired`:`Active`,je=e=>e.permissionMode===`all`?(0,Z.jsx)(p,{size:`sm`,colorPalette:`green`,children:`All`}):(0,Z.jsx)(p,{size:`sm`,colorPalette:`orange`,children:`Restricted`}),Me=e=>(0,Z.jsx)(pe,{size:`xs`,scopes:e.roleBindings.map(e=>({scopeType:e.scopeType,scopeId:e.scopeId,name:e.scopeName??void 0}))});return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(L,{gap:8,width:`full`,align:`stretch`,children:[(0,Z.jsxs)(L,{gap:4,width:`full`,align:`start`,children:[ve.length>0&&(0,Z.jsxs)(L,{gap:1,align:`start`,children:[(0,Z.jsx)(le,{size:`md`,children:`API keys`}),(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Keys scoped to a user or service that honor your role bindings and can be revoked individually.`})]}),(0,Z.jsxs)(I,{width:`full`,flexWrap:`wrap`,gap:2,children:[(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Do not share your API keys or expose them in the browser or other client-side code.`}),(0,Z.jsx)(te,{}),(0,Z.jsx)(ye,{value:J,onChange:_e,available:he,currentTeamId:c?.id,currentProjectId:s?.id}),(0,Z.jsxs)(w.HeaderButton,{onClick:R,children:[(0,Z.jsx)(oe,{size:16}),`Create new secret key`]})]}),(0,Z.jsx)(P,{width:`full`,overflow:`hidden`,children:(0,Z.jsx)(F,{paddingY:0,paddingX:0,overflowX:`auto`,children:(0,Z.jsxs)(g,{variant:`line`,size:`md`,width:`full`,children:[(0,Z.jsx)(y,{children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(S,{children:`Name`}),(0,Z.jsx)(S,{children:`Status`}),(0,Z.jsx)(S,{children:`Secret Key`}),(0,Z.jsx)(S,{children:`Created`}),(0,Z.jsx)(S,{children:`Last Used`}),(0,Z.jsx)(S,{children:`Type`}),(0,Z.jsx)(S,{children:`Scope`}),(0,Z.jsx)(S,{children:`Permissions`}),(0,Z.jsx)(S,{width:`100px`})]})}),(0,Z.jsxs)(x,{children:[ke&&$&&(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{children:(0,Z.jsxs)(I,{align:`center`,children:[(0,Z.jsx)(ce,{size:14}),(0,Z.jsx)(o,{children:`Project API Key`})]})}),(0,Z.jsx)(b,{children:(0,Z.jsx)(p,{size:`sm`,colorPalette:`green`,children:`Active`})}),(0,Z.jsx)(b,{children:(0,Z.jsxs)(o,{fontSize:`xs`,fontFamily:`monospace`,color:`fg.muted`,children:[`sk-…`,$.slice(-4)]})}),(0,Z.jsx)(b,{children:(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`—`})}),(0,Z.jsx)(b,{children:(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`—`})}),(0,Z.jsx)(b,{children:(0,Z.jsx)(p,{size:`sm`,colorPalette:`purple`,children:`Service`})}),(0,Z.jsx)(b,{children:(0,Z.jsx)(pe,{size:`xs`,scopes:[{scopeType:`PROJECT`,scopeId:s?.id??``,name:s?.name}]})}),(0,Z.jsx)(b,{children:(0,Z.jsx)(p,{size:`sm`,colorPalette:`green`,children:`All`})}),(0,Z.jsx)(b,{children:(0,Z.jsx)(Xe,{apiKey:$,canManage:v,onRotate:()=>q(!0)})})]}),Q.map(e=>(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{children:(0,Z.jsxs)(I,{align:`start`,children:[(0,Z.jsx)(a,{paddingTop:1,children:(0,Z.jsx)(ce,{size:14})}),(0,Z.jsxs)(L,{align:`start`,gap:0,children:[(0,Z.jsx)(o,{children:e.name}),e.description&&(0,Z.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:e.description})]})]})}),(0,Z.jsx)(b,{children:Ae(e)===`Expired`?(0,Z.jsx)(p,{size:`sm`,colorPalette:`red`,children:`Expired`}):(0,Z.jsx)(p,{size:`sm`,colorPalette:`green`,children:`Active`})}),(0,Z.jsx)(b,{children:(0,Z.jsxs)(o,{fontSize:`xs`,fontFamily:`monospace`,color:`fg.muted`,children:[`sk-lw-`,e.lookupIdPrefix,`…`]})}),(0,Z.jsx)(b,{children:new Date(e.createdAt).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}),(0,Z.jsx)(b,{children:e.lastUsedAt?(0,Z.jsx)(m,{content:new Date(e.lastUsedAt).toISOString(),children:(0,Z.jsx)(o,{cursor:`help`,tabIndex:0,"aria-label":`Last used at ${new Date(e.lastUsedAt).toISOString()}`,children:de(new Date(e.lastUsedAt).getTime())})}):(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Never`})}),(0,Z.jsx)(b,{children:e.userId?(0,Z.jsx)(p,{size:`sm`,variant:`outline`,children:e.userEmail??e.userName??`—`}):(0,Z.jsx)(p,{size:`sm`,colorPalette:`purple`,children:`Service`})}),(0,Z.jsx)(b,{children:Me(e)}),(0,Z.jsx)(b,{children:je(e)}),(0,Z.jsx)(b,{children:(O||e.userId===r)&&(0,Z.jsxs)(I,{gap:1,children:[(0,Z.jsx)(n,{size:`xs`,variant:`ghost`,"aria-label":`Edit API key ${e.name}`,onClick:()=>fe(e),children:(0,Z.jsx)(ue,{size:14})}),(0,Z.jsx)(n,{size:`xs`,variant:`ghost`,colorPalette:`red`,"aria-label":`Revoke API key ${e.name}`,onClick:()=>G(e.id),children:(0,Z.jsx)(_,{size:14,"aria-hidden":`true`})})]})})]},e.id)),Q.length===0&&!ke&&J.kind===`all`&&(0,Z.jsx)(C,{children:(0,Z.jsx)(b,{colSpan:9,children:(0,Z.jsx)(o,{color:`fg.muted`,textAlign:`center`,paddingY:4,children:`No API keys. Create one to get started.`})})}),Q.length===0&&!ke&&J.kind!==`all`&&(0,Z.jsx)(C,{children:(0,Z.jsx)(b,{colSpan:9,children:(0,Z.jsx)(o,{color:`fg.muted`,textAlign:`center`,paddingY:4,children:`No keys match the current scope. Change the filter above to see other keys.`})})})]})]})})})]}),(0,Z.jsx)(Ge,{keys:ve,isAdmin:O,onRevoke:G})]}),(0,Z.jsx)(Ve,{isOpen:ne&&!z,isCreating:k.isLoading,myBindings:T,orgProjects:E.data??[],orgTeams:D.data??[],organizationId:e,organizationName:u?.name,currentTeamId:c?.id,currentProjectId:s?.id,onClose:re,onCreate:Te}),(0,Z.jsx)(Ue,{apiKey:K,isUpdating:A.isLoading,myBindings:T,orgProjects:E.data??[],orgTeams:D.data??[],organizationId:e,organizationName:u?.name,currentTeamId:c?.id,currentProjectId:s?.id,onClose:()=>fe(null),onSave:Ee}),(0,Z.jsx)(Ye,{newToken:z,projectId:t,endpoint:f,orgProjects:(E.data??[]).filter(e=>!H||H.keyType===`service`||H.permissionMode!==`restricted`?!0:H.bindings.some(t=>t.scopeId===e.id)),onClose:()=>{V(null),U(null),re()}}),(0,Z.jsx)(Ke,{apiKeyId:W,isRevoking:j.isLoading,onCancel:()=>G(null),onConfirm:De}),(0,Z.jsx)(we,{open:me,isLoading:M.isLoading,onClose:()=>q(!1),onConfirm:Oe})]})}function Qe(){let{organization:e,project:t}=se();return e?(0,Z.jsx)(ve,{children:(0,Z.jsxs)(L,{gap:4,width:`full`,maxWidth:`1200px`,align:`stretch`,children:[(0,Z.jsxs)(L,{gap:1,align:`start`,children:[(0,Z.jsx)(le,{size:`lg`,children:`API Keys`}),(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Manage credentials used to authenticate with the LangWatch API.`})]}),(0,Z.jsx)(Ze,{organizationId:e.id,projectId:t?.id})]})}):(0,Z.jsx)(ve,{})}export{Qe as default};
4
- //# sourceMappingURL=api-keys-mK1aqQaM.js.map
@@ -1,5 +0,0 @@
1
- import{mn as e}from"./portal-FJIui2Z2.js";import{t}from"./jsx-runtime-CFwixLRt.js";import{t as n}from"./box-Ck5lef6C.js";import{t as r}from"./text-A3qvcMyN.js";import{t as i}from"./h-stack-CMPhqSp5.js";import{t as a}from"./v-stack-ClAMS101.js";import{vt as o}from"./index-CUhcyBp3.js";import{t as s}from"./react-FE7US63s.js";var c=`var(--langy-font-serif, "Sentient", "Charter", "Source Serif Pro", Georgia, serif)`,l={radius:`14px`,padding:{base:4,md:5},borderWidth:`1px`,border:`border.muted`,accentBorder:`color-mix(in srgb, var(--chakra-colors-orange-solid) 16%, var(--chakra-colors-border-muted))`,bg:`bg.surface`,accentWash:`radial-gradient(130% 120% at 96% 0%, color-mix(in srgb, var(--chakra-colors-orange-solid) 6%, transparent), transparent 54%)`},u={good:`green.solid`,bad:`red.solid`,attention:`#c98a2f`},d={good:`green.fg`,bad:`red.fg`,attention:`#c98a2f`,neutral:`fg`,muted:`fg.muted`,subtle:`fg.subtle`},f=`orange.fg`,p={eyebrow:{fontFamily:`mono`,fontSize:`11px`,letterSpacing:`0.1em`,textTransform:`uppercase`},sectionLabel:{fontFamily:`mono`,fontSize:`10.5px`,letterSpacing:`0.1em`,textTransform:`uppercase`,color:d.subtle},headline:{fontFamily:c,fontWeight:`400`,fontSize:{base:`16px`,md:`18px`},lineHeight:`1.3`,letterSpacing:`-0.01em`},cardTitle:{fontFamily:c,fontWeight:`500`,fontSize:`18px`,letterSpacing:`-0.01em`},label:{fontFamily:`mono`,fontSize:`11.5px`,letterSpacing:`0.02em`},body:{fontSize:`12.5px`,lineHeight:`1.4`},mono:{fontFamily:`mono`,fontSize:`12px`},value:{fontFamily:`mono`,fontVariantNumeric:`tabular-nums`,letterSpacing:`-0.02em`,lineHeight:`1`}},m={activity:{weight:1,inline:!0,padding:{x:`0`,y:`0`},surface:`transparent`,border:`transparent`,radius:`0`,accent:!1,panelMaterial:!1,dot:d.muted,titleWeight:`500`,serifTitle:!1},progress:{weight:2,inline:!1,padding:{x:`13px`,y:`10px`},surface:`bg.subtle`,border:l.border,radius:`langyCard`,accent:!1,panelMaterial:!1,dot:u.attention,titleWeight:`600`,serifTitle:!1},change:{weight:3,inline:!1,padding:{x:`15px`,y:`12px`},surface:`bg.subtle`,border:l.border,radius:`langyCard`,accent:!1,panelMaterial:!1,dot:u.good,titleWeight:`640`,serifTitle:!1},ask:{weight:4,inline:!1,padding:{x:`15px`,y:`14px`},surface:`bg.subtle`,border:l.accentBorder,radius:`langyCard`,accent:!0,panelMaterial:!1,dot:u.attention,titleWeight:`640`,serifTitle:!1},spotlight:{weight:5,inline:!1,padding:{x:`18px`,y:`16px`},surface:`bg.surface`,border:l.accentBorder,radius:`langyCard`,accent:!0,panelMaterial:!0,dot:u.attention,titleWeight:`500`,serifTitle:!0}};l.accentWash;var h=t(),g=s.create(n);function _({children:e,accent:t=!1,fill:r=!1,...i}){let a=o(),s=r?{flex:`1`,minHeight:0,display:`flex`,flexDirection:`column`}:{};return(0,h.jsx)(n,{className:`langy-root`,width:`full`,...s,children:(0,h.jsxs)(n,{position:`relative`,overflow:`hidden`,borderRadius:l.radius,borderWidth:l.borderWidth,borderColor:l.border,background:l.bg,...s,...i,children:[(0,h.jsx)(n,{className:`langy-signal-grid`,"aria-hidden":!0}),(0,h.jsx)(n,{className:`langy-panel-glow`,"aria-hidden":!0}),t?(0,h.jsx)(g,{className:`langy-accent-wash langy-panel-accent-ring`,"aria-hidden":!0,position:`absolute`,inset:`0`,pointerEvents:`none`,borderRadius:`inherit`,initial:!1,animate:a?{opacity:.55}:{opacity:[.4,.72,.4]},transition:a?{duration:0}:{duration:7,repeat:1/0,ease:`easeInOut`}}):null,(0,h.jsx)(n,{position:`relative`,zIndex:1,...s,children:e})]})})}var v=e`
2
- 0%, 100% { opacity: 1; transform: scale(1); }
3
- 50% { opacity: 0.4; transform: scale(0.72); }
4
- `;function y({intent:e,overline:t,title:s,dot:l,showDot:u,pulseDot:d=!1,actions:f,children:g,role:y,"aria-label":x}){let S=o(),C=m[e],w=l??C.dot,T=u??(!C.inline&&e!==`spotlight`&&!!t)?(0,h.jsx)(n,{width:`6px`,height:`6px`,borderRadius:`full`,flexShrink:0,background:w,css:d&&!S?{animation:`${v} 1.4s ease-in-out infinite`}:void 0}):null;if(C.inline)return(0,h.jsxs)(i,{gap:2,align:`center`,alignSelf:`flex-start`,role:y??`status`,"aria-label":x,color:`fg.muted`,children:[u??!0?b(w,d,S):null,t?(0,h.jsx)(r,{as:`span`,...p.sectionLabel,color:`fg.subtle`,children:t}):null,typeof s==`string`?(0,h.jsx)(r,{as:`span`,textStyle:`xs`,color:`fg.muted`,children:s}):s,g]});let E=e===`progress`||e===`change`?w:`fg.subtle`,D=(0,h.jsxs)(a,{align:`stretch`,gap:2,children:[t?(0,h.jsxs)(i,{gap:1.5,align:`center`,...p.sectionLabel,color:E,children:[T,(0,h.jsx)(n,{as:`span`,children:t})]}):null,s==null?null:typeof s==`string`?(0,h.jsx)(r,{color:`fg`,lineHeight:`1.3`,fontWeight:C.titleWeight,fontFamily:C.serifTitle?c:void 0,fontSize:C.serifTitle?`18px`:`13px`,letterSpacing:C.serifTitle?`-0.01em`:void 0,children:s}):s,g,f?(0,h.jsx)(n,{children:f}):null]});return C.panelMaterial?(0,h.jsx)(_,{accent:!0,paddingX:C.padding.x,paddingY:C.padding.y,role:y??`group`,"aria-label":x,children:D}):(0,h.jsxs)(n,{className:C.accent?`langy-accent-ring`:void 0,position:`relative`,overflow:`hidden`,borderWidth:`1px`,borderStyle:`solid`,borderColor:C.border,borderRadius:C.radius,background:C.surface,boxShadow:`langyCard`,paddingX:C.padding.x,paddingY:C.padding.y,role:y??`group`,"aria-label":x,children:[C.accent?(0,h.jsx)(n,{className:`langy-accent-wash`,"aria-hidden":!0,position:`absolute`,inset:`0`,borderRadius:`inherit`,pointerEvents:`none`}):null,(0,h.jsx)(n,{position:`relative`,zIndex:1,children:D})]})}function b(e,t,r){return(0,h.jsx)(n,{width:`5px`,height:`5px`,borderRadius:`full`,flexShrink:0,background:e,css:t&&!r?{animation:`${v} 1.4s ease-in-out infinite`}:void 0})}export{c as a,l as i,_ as n,f as r,y as t};
5
- //# sourceMappingURL=asaplangy-D_DeMaDk.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./text-A3qvcMyN.js";import{n as o}from"./info-CtYT35g4.js";import{$ as s,Q as c,X as l,Y as u,Z as d,et as f}from"./ExternalImage-DbtOSrKl.js";import{r as ee}from"./UpgradeModal-BmLw5ONS.js";import{a as p,i as te,n as ne,r as re,t as ie}from"./alert-C5hocQt_.js";import{t as m}from"./h-stack-CMPhqSp5.js";import{n as h,r as g,t as _}from"./native-select-Bj4m9rSh.js";import{t as v}from"./spacer-CbmCSsJg.js";import{t as y}from"./v-stack-ClAMS101.js";import{n as b}from"./DashboardLayout-RHGL-98_.js";import{t as x}from"./arrow-left-BWMkb3Ih.js";import{t as ae}from"./download-CJ4Kw00S.js";import{r as oe}from"./next-router-Bn5Y8Iek.js";import{n as S}from"./api-BK6L1im2.js";import{Ar as C,Rt as se,Yn as ce,ni as le,ot as ue,t as de}from"./index-CUhcyBp3.js";import{a as fe,o as pe}from"./useSavedViews-CNmeuzC3.js";import{t as me}from"./useActivePlan-DZDUm8JK.js";import{t as w}from"./WithPermissionGuard-BP1dFkpM.js";import{t as he}from"./input-group-D5-60Bl4.js";import{t as T}from"./papaparse.min-cQwnxGCG.js";import{t as E}from"./SettingsLayout-CYtjUobV.js";import{t as ge}from"./ContactSalesBlock-BaXLliHv.js";import{t as _e}from"./NavigationFooter-CJaT-F50.js";var D=e(t()),O=e(T());function k(e,t){let n={};for(let t of e)n[t.label]=(n[t.label]??0)+1;return e.map(e=>({...e,displayLabel:(n[e.label]??0)>1?`${e.label} · ${t(e)}`:e.label}))}var A=r(),j=4096;function M(e){if(e==null)return``;let t=JSON.stringify(e);return t.length<=j?t:`${t.slice(0,j)}…[truncated ${t.length-j} chars]`}function N(){let{organization:e,project:t,organizations:r}=se(),{isEnterprise:w,isLoading:T}=me(),j=oe(),{period:{startDate:N,endDate:P},mode:F}=pe(30),I=(e,t)=>{if(!e)return t;let n=Number(e);return isNaN(n)?t:n},L=I(j.query.pageOffset,0),R=I(j.query.pageSize,25),[z,ve]=(0,D.useState)(j.query.userSearch??``),[B,ye]=(0,D.useState)(j.query.actionFilter??``),V=typeof j.query.targetKind==`string`?j.query.targetKind:``,H=typeof j.query.targetId==`string`?j.query.targetId:``,[U,be]=(0,D.useState)(t?.id??null),[xe,W]=(0,D.useState)(!1),G=e?.id??``,K=S.useContext(),{data:Se}=S.organization.getOrganizationWithMembersAndTheirTeams.useQuery({organizationId:G},{enabled:!!e}),q=z?Se?.members.find(e=>{let t=z.toLowerCase(),n=e.user.name?.toLowerCase().includes(t)??!1,r=e.user.email?.toLowerCase().includes(t)??!1;return n||r})?.userId:void 0,{data:J,isLoading:Ce}=S.organization.getAuditLogs.useQuery({organizationId:G,projectId:U??void 0,userId:q,pageOffset:L,pageSize:R,action:B||void 0,startDate:N.getTime(),endDate:P.getTime(),targetKind:V||void 0,targetId:H||void 0},{enabled:!!e&&w});if(!e||T)return(0,A.jsx)(E,{children:(0,A.jsx)(y,{align:`center`,justify:`center`,width:`full`,height:`200px`,children:(0,A.jsx)(n,{})})});if(!w)return(0,A.jsx)(E,{children:(0,A.jsxs)(y,{gap:6,width:`full`,align:`start`,children:[(0,A.jsxs)(te,{status:`info`,children:[(0,A.jsx)(re,{}),(0,A.jsxs)(ie,{children:[(0,A.jsx)(p,{children:`Enterprise Feature`}),(0,A.jsx)(ne,{children:`Organisation-wide audit logs — including AI Gateway events (virtual-key / budget / provider / cache-rule mutations) alongside logins, member changes, settings, RBAC, and billing — are available on Enterprise plans. Contact sales to upgrade.`})]})]}),(0,A.jsx)(i,{width:`full`,children:(0,A.jsx)(ge,{})})]})});let Y=e=>{j.push({pathname:j.pathname,query:{...j.query,...e,pageOffset:0}})},we=e=>{ve(e),Y({userSearch:e})},Te=e=>{ye(e),Y({actionFilter:e})},Ee=e=>{be(e),Y({projectId:e??``})},X=()=>{let e=L+R;j.push({pathname:j.pathname,query:{...j.query,pageOffset:e.toString()}})},De=()=>{if(L>0){let e=L-R;j.push({pathname:j.pathname,query:{...j.query,pageOffset:e.toString()}})}},Oe=e=>{j.push({pathname:j.pathname,query:{...j.query,pageSize:e.toString(),pageOffset:`0`}})},Z=J?.totalCount??0,Q=J?.auditLogs??[],ke=async()=>{if(e){W(!0);try{let t=[],n=0,r=5e3,i=0,a={organizationId:e.id,projectId:U??void 0,userId:q,action:B||void 0,startDate:N.getTime(),endDate:P.getTime(),targetKind:V||void 0,targetId:H||void 0},o=await K.organization.getAuditLogs.fetch({...a,pageOffset:0,pageSize:r});for(t.push(...o.auditLogs??[]),i=o.totalCount,n=r;n<i;){let e=await K.organization.getAuditLogs.fetch({...a,pageOffset:n,pageSize:r});if(!e.auditLogs||e.auditLogs.length===0)break;t.push(...e.auditLogs),n+=r}let s=[`Timestamp`,`Source`,`User Name`,`User Email`,`Action`,`Target Kind`,`Target Id`,`Project`,`IP Address`,`User Agent`,`Error`,`Args`,`Before`,`After`],c=t.map(e=>[new Date(e.createdAt).toISOString(),e.source??`platform`,e.user?.name??``,e.user?.email??``,e.action,e.targetKind??``,e.targetId??``,e.project?.name??e.projectId??``,e.ipAddress??``,e.userAgent??``,e.error??``,M(e.args),M(e.before),M(e.after)]),l=O.default.unparse({fields:s,data:c}),u=window.URL.createObjectURL(new Blob([l])),d=document.createElement(`a`);d.href=u;let f=`audit_logs_${new Date().toISOString().split(`T`)[0]}.csv`;d.setAttribute(`download`,f),document.body.appendChild(d),d.click(),d.remove(),window.URL.revokeObjectURL(u)}catch(e){console.error(`Failed to export audit logs:`,e)}finally{W(!1)}}},Ae=()=>{let{targetKind:e,targetId:t,...n}=j.query;j.replace({pathname:j.pathname,query:n})},$=(()=>{if(!V||!H||!t?.slug)return null;let e={virtual_key:{path:`gateway/virtual-keys`,label:`Virtual key`},budget:{path:`gateway/budgets`,label:`Budget`}}[V];return e?{href:`/${t.slug}/${e.path}/${H}`,label:e.label}:null})();return(0,A.jsx)(E,{children:(0,A.jsxs)(y,{gap:6,width:`full`,align:`start`,children:[(0,A.jsxs)(m,{width:`full`,marginTop:2,children:[(0,A.jsxs)(y,{align:`start`,gap:1,children:[$&&(0,A.jsx)(de,{href:$.href,color:`fg.muted`,fontSize:`sm`,children:(0,A.jsxs)(m,{gap:1,children:[(0,A.jsx)(x,{size:14}),` `,$.label]})}),(0,A.jsx)(le,{as:`h2`,children:`Audit Log`}),(0,A.jsx)(a,{color:`fg.muted`,children:`View all audit logs for your organization. Filter by project, user, action type, or date range.`}),V&&H&&(0,A.jsxs)(o,{colorPalette:`orange`,variant:`surface`,gap:1,cursor:`pointer`,onClick:Ae,title:`Clear target filter`,children:[V,` = `,H.slice(0,24),`… ×`]})]}),(0,A.jsx)(v,{}),r&&t&&(0,A.jsx)(b,{organizations:r,project:t})]}),(0,A.jsxs)(m,{gap:4,width:`full`,flexWrap:`wrap`,align:`end`,children:[(0,A.jsxs)(y,{align:`start`,gap:1,flex:`1`,minWidth:`200px`,maxWidth:`300px`,children:[(0,A.jsx)(a,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Search by User`}),(0,A.jsx)(he,{startElement:(0,A.jsx)(ce,{size:16}),width:`full`,children:(0,A.jsx)(C,{placeholder:`Search by name or email...`,value:z,onChange:e=>we(e.target.value),width:`full`})})]}),(0,A.jsxs)(y,{align:`start`,gap:1,flex:`1`,minWidth:`200px`,maxWidth:`300px`,children:[(0,A.jsx)(a,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Filter by Action`}),(0,A.jsx)(C,{placeholder:`Filter by action type...`,value:B,onChange:e=>Te(e.target.value),width:`full`})]}),(0,A.jsxs)(y,{align:`start`,gap:1,flex:`1`,minWidth:`150px`,maxWidth:`200px`,children:[(0,A.jsx)(a,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Project`}),(0,A.jsxs)(g,{size:`sm`,width:`full`,children:[(0,A.jsxs)(_,{value:U??`all`,onChange:e=>Ee(e.target.value===`all`?null:e.target.value),children:[(0,A.jsx)(`option`,{value:`all`,children:`All Projects`}),k(e.teams.flatMap(e=>e.projects.map(t=>({id:t.id,label:t.name,teamName:e.name}))),e=>e.teamName).map(e=>(0,A.jsx)(`option`,{value:e.id,children:e.displayLabel},e.id))]}),(0,A.jsx)(h,{})]})]}),(0,A.jsxs)(y,{align:`start`,gap:1,flex:`1`,minWidth:`200px`,maxWidth:`300px`,children:[(0,A.jsx)(a,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Select Date`}),(0,A.jsx)(fe,{period:{startDate:N,endDate:P},mode:F,setPeriod:(e,t)=>{let{period:n,...r}=j.query;j.push({pathname:j.pathname,query:{...r,startDate:e.toISOString(),endDate:t.toISOString(),pageOffset:0}})},setRelativePeriod:e=>{let{startDate:t,endDate:n,...r}=j.query;j.push({pathname:j.pathname,query:{...r,period:e,pageOffset:0}})}})]}),(0,A.jsxs)(ee.HeaderButton,{onClick:()=>void ke(),disabled:xe,children:[(0,A.jsx)(ae,{}),`Export CSV`]})]}),Ce?(0,A.jsxs)(y,{padding:8,children:[(0,A.jsx)(n,{}),(0,A.jsx)(a,{children:`Loading audit logs...`})]}):Q.length===0?(0,A.jsx)(y,{padding:8,children:(0,A.jsx)(a,{color:`fg.muted`,children:`No audit logs found`})}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(i,{width:`full`,overflowX:`auto`,children:(0,A.jsxs)(s,{variant:`line`,width:`full`,children:[(0,A.jsx)(c,{children:(0,A.jsxs)(f,{children:[(0,A.jsx)(d,{children:`Timestamp`}),(0,A.jsx)(d,{children:`Source`}),(0,A.jsx)(d,{children:`User`}),(0,A.jsx)(d,{children:`Action`}),(0,A.jsx)(d,{children:`Target`}),(0,A.jsx)(d,{children:`Project`}),(0,A.jsx)(d,{children:`IP Address`}),(0,A.jsx)(d,{children:`Error`})]})}),(0,A.jsx)(u,{children:Q.map(t=>(0,A.jsxs)(f,{children:[(0,A.jsx)(l,{children:(0,A.jsxs)(y,{align:`start`,gap:0,children:[(0,A.jsx)(a,{fontSize:`sm`,children:new Date(t.createdAt).toLocaleString()}),(0,A.jsx)(a,{fontSize:`xs`,color:`fg.muted`,children:ue(new Date(t.createdAt),{addSuffix:!0})})]})}),(0,A.jsx)(l,{children:(0,A.jsx)(o,{size:`sm`,variant:`subtle`,colorPalette:t.source===`gateway`?`purple`:`gray`,children:t.source===`gateway`?`Gateway`:`Platform`})}),(0,A.jsx)(l,{children:t.user?(0,A.jsxs)(y,{align:`start`,gap:0,children:[(0,A.jsx)(a,{fontSize:`sm`,fontWeight:`medium`,children:t.user.name??`Unknown`}),(0,A.jsx)(a,{fontSize:`xs`,color:`fg.muted`,children:t.user.email})]}):(0,A.jsx)(a,{fontSize:`sm`,color:`fg.subtle`,children:`User not found`})}),(0,A.jsx)(l,{children:(0,A.jsx)(a,{fontSize:`sm`,fontFamily:`mono`,children:t.action})}),(0,A.jsx)(l,{children:t.targetKind&&t.targetId?(0,A.jsxs)(y,{align:`start`,gap:0,children:[(0,A.jsx)(a,{fontSize:`xs`,color:`fg.muted`,children:t.targetKind}),(0,A.jsxs)(a,{fontSize:`xs`,fontFamily:`mono`,children:[t.targetId.slice(0,16),`…`]})]}):(0,A.jsx)(a,{fontSize:`sm`,color:`fg.subtle`,children:`—`})}),(0,A.jsx)(l,{children:t.projectId?(0,A.jsx)(a,{fontSize:`sm`,children:e.teams.flatMap(e=>e.projects).find(e=>e.id===t.projectId)?.name??t.projectId}):(0,A.jsx)(a,{fontSize:`sm`,color:`fg.subtle`,children:`—`})}),(0,A.jsx)(l,{children:t.ipAddress?(0,A.jsx)(a,{fontSize:`sm`,fontFamily:`mono`,children:t.ipAddress}):(0,A.jsx)(a,{fontSize:`sm`,color:`fg.subtle`,children:`—`})}),(0,A.jsx)(l,{children:t.error?(0,A.jsx)(a,{fontSize:`sm`,color:`red.600`,children:t.error}):(0,A.jsx)(a,{fontSize:`sm`,color:`fg.subtle`,children:`—`})})]},t.id))})]})}),Z>0&&(0,A.jsx)(_e,{totalHits:Z,pageOffset:L,pageSize:R,nextPage:X,prevPage:De,changePageSize:Oe})]})]})})}var P=w(`organization:manage`,{layoutComponent:E})(N);export{P as default};
2
- //# sourceMappingURL=audit-log-CL6iYEbl.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,n as r,r as i}from"./portal-FJIui2Z2.js";import{t as a}from"./jsx-runtime-CFwixLRt.js";import{t as o}from"./box-Ck5lef6C.js";import{t as s}from"./text-A3qvcMyN.js";import{t as c}from"./info-CtYT35g4.js";import{t as l}from"./icon-CkSWK_vf.js";import{t as u}from"./h-stack-CMPhqSp5.js";import{t as d}from"./v-stack-ClAMS101.js";import{t as f}from"./circle-alert-CIuvyhhX.js";import{t as p}from"./circle-check-gT80KFsf.js";import{n as m}from"./close-button-RGOW3hmk.js";import{t as h}from"./ScopeChipPicker-B6r27G3S.js";import{t as g}from"./clock-3-sY6P4CYx.js";import{r as _}from"./next-router-Bn5Y8Iek.js";import{c as v}from"./auth-client-4OIM4EvK.js";import{Rt as y,u as b}from"./index-CUhcyBp3.js";import{t as x}from"./next-head-B6Im7q_p.js";import{t as S}from"./OnboardingContainer-DRrQV_9c.js";var C=e(t());function w(e){let t=(e.teams??[]).flatMap(e=>(e.projects??[]).filter(e=>!e.isPersonal&&e.kind!==`internal_governance`).map(t=>({id:t.id,name:t.name,slug:t.slug,teamId:e.id,teamName:e.name}))),n=new Set(t.map(e=>e.teamId));return{projects:t,teams:(e.teams??[]).filter(e=>n.has(e.id)).map(e=>({id:e.id,name:e.name})),defaultProjectId:(e.lastProjectSlug?t.find(t=>t.slug===e.lastProjectSlug):void 0)?.id??(t.length===1?t[0].id:null)}}var T=a();function E({palette:e,icon:t,title:n,children:r}){return(0,T.jsx)(o,{role:e===`red`||e===`orange`?`alert`:`status`,borderWidth:`1px`,borderColor:`${e}.muted`,borderRadius:`lg`,bg:`${e}.subtle`,paddingX:5,paddingY:4,children:(0,T.jsxs)(u,{align:`flex-start`,gap:3,children:[(0,T.jsx)(l,{as:t,boxSize:5,color:`${e}.fg`,flexShrink:0,marginTop:.5}),(0,T.jsxs)(d,{align:`stretch`,gap:1,flex:1,children:[(0,T.jsx)(s,{textStyle:`sm`,fontWeight:`semibold`,color:`fg`,lineHeight:`snug`,children:n}),(0,T.jsx)(s,{textStyle:`xs`,color:`fg.muted`,lineHeight:`tall`,children:r})]})]})})}function D(){let e=_(),{data:t,status:a}=v(),{organizations:l,project:D}=y({redirectToOnboarding:!1}),k=e.query.user_code,A=typeof k==`string`?k:Array.isArray(k)?k[0]??``:``,[j,M]=(0,C.useState)({kind:`loading`}),[N,P]=(0,C.useState)({kind:`idle`}),[F,I]=(0,C.useState)(null),[L,R]=(0,C.useState)(null);(0,C.useEffect)(()=>{l&&l.length>0&&!F&&I(l[0].id)},[l,F]),(0,C.useEffect)(()=>{b(`leadSource`,`cli`)},[]),(0,C.useEffect)(()=>{if(!(!t||!l)&&l.length===0&&A){let t=encodeURIComponent(`/cli/auth?user_code=${encodeURIComponent(A)}`);e.replace(`/onboarding/welcome?return_to=${t}`)}},[t,l,A,e]);let z=D?.slug??null,{projects:B,teams:V,defaultProjectId:H}=(0,C.useMemo)(()=>{let e=l?.find(e=>e.id===F);return w({teams:e?.teams,lastProjectSlug:z})},[l,F,z]);(0,C.useEffect)(()=>{R(null)},[F]),(0,C.useEffect)(()=>{H&&!L&&R(H)},[H,L]),(0,C.useEffect)(()=>{if(a!==`loading`&&!t&&A){let t=`/cli/auth?user_code=${encodeURIComponent(A)}`;e.replace(`/auth/signin?callbackUrl=${encodeURIComponent(t)}`)}},[t,a,A,e]),(0,C.useEffect)(()=>{if(!t||!A)return;let e=!1;return(async()=>{try{let t=await fetch(`/api/auth/cli/lookup?user_code=${encodeURIComponent(A)}`);if(e)return;if(t.status===410){M({kind:`expired`});return}if(t.status===404){M({kind:`error`,message:`Code "${A}" was not recognised. It may have expired or already been used.`});return}if(!t.ok){M({kind:`error`,message:(await t.json().catch(()=>({}))).error_description??`Lookup failed (${t.status})`});return}let n=await t.json(),r=n.credential_type===`project_api_key`||n.credential_type===`device_session`?n.credential_type:`device_session`;M({kind:`ready`,userCode:n.user_code,status:n.status,expiresAt:n.expires_at,credentialType:r})}catch(t){if(e)return;M({kind:`error`,message:t instanceof Error?t.message:`Network error`})}})(),()=>{e=!0}},[t,A]);let U=j.kind===`ready`?j.credentialType:`device_session`,W=U===`project_api_key`,G=async()=>{if(!(!F||!A)&&!(W&&!L)){P({kind:`submitting`});try{let e=await fetch(`/api/auth/cli/approve`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({user_code:A,organization_id:F,...W&&L?{project_id:L}:{}})}),t=await e.json().catch(()=>({}));if(!e.ok){P({kind:`error`,message:t.message??t.error_description??`Approval failed (${e.status})`});return}let n=l?.find(e=>e.id===F)?.name??`your organization`,r=W?B.find(e=>e.id===L)?.name:void 0;P({kind:`success`,vkLabel:t.personal_vk_label??`default`,organizationName:n,credentialType:U,projectName:r})}catch(e){P({kind:`error`,message:e instanceof Error?e.message:`Network error`})}}},K=async()=>{if(A){P({kind:`submitting`});try{await fetch(`/api/auth/cli/deny`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({user_code:A})}),P({kind:`denied`})}catch{P({kind:`denied`})}}},q=(0,C.useMemo)(()=>{if(j.kind!==`ready`)return null;let e=Math.max(0,Math.round((j.expiresAt-Date.now())/1e3)),t=Math.floor(e/60);return t>0?`Expires in ~${t} min`:`Expires in ${e}s`},[j]);return a===`loading`||!t&&A?(0,T.jsx)(O,{}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(x,{children:(0,T.jsx)(`title`,{children:`Authorize CLI · LangWatch`})}),(0,T.jsx)(S,{title:W?`Generate an SDK key`:`Authorize the LangWatch CLI`,subTitle:W?`The CLI is requesting a project SDK API key`:`Signs in this device for AI-tool wrappers and governance commands`,showBackButton:!1,isLogoInside:!0,children:(0,T.jsxs)(d,{align:`stretch`,gap:6,children:[!A&&(0,T.jsxs)(E,{palette:`orange`,icon:f,title:`No code provided`,children:[`Run `,(0,T.jsx)(`code`,{children:`langwatch login`}),` in your terminal, it will print a link with your code embedded.`]}),A&&j.kind===`loading`&&(0,T.jsxs)(u,{children:[(0,T.jsx)(n,{size:`sm`}),(0,T.jsx)(s,{textStyle:`sm`,color:`fg.muted`,children:`Looking up code…`})]}),j.kind===`expired`&&(0,T.jsx)(T.Fragment,{children:(0,T.jsxs)(E,{palette:`orange`,icon:g,title:`Code expired`,children:[`Restart `,(0,T.jsx)(`code`,{children:`langwatch login`}),` in your terminal to get a new code.`]})}),j.kind===`error`&&(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(E,{palette:`red`,icon:m,title:`Something went wrong`,children:j.message})}),j.kind===`ready`&&N.kind!==`success`&&N.kind!==`denied`&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(s,{textStyle:`sm`,color:`fg.muted`,lineHeight:`tall`,children:W?`Pick the project to mint a key for; the key will flow back to your terminal automatically, with no copy-paste.`:`Approving signs in this device for AI-tool wrappers (Claude, Codex, etc.) and governance commands.`}),(0,T.jsx)(o,{bg:`bg.subtle`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`lg`,p:4,fontFamily:`mono`,fontSize:`2xl`,fontWeight:`bold`,textAlign:`center`,letterSpacing:`0.2em`,color:`fg`,children:j.userCode}),(0,T.jsxs)(s,{textStyle:`xs`,color:`fg.muted`,textAlign:`center`,children:[`Confirm this matches the code shown in your terminal.`,q?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`br`,{}),q,`.`]}):null]}),l&&l.length>1&&(0,T.jsxs)(o,{children:[(0,T.jsx)(s,{textStyle:`sm`,fontWeight:`semibold`,color:`fg`,mb:2,children:`Organization`}),(0,T.jsx)(d,{align:`stretch`,gap:2,children:l.map(e=>(0,T.jsx)(i,{size:`sm`,colorPalette:F===e.id?`orange`:`gray`,variant:F===e.id?`surface`:`outline`,onClick:()=>I(e.id),justifyContent:`flex-start`,children:e.name},e.id))})]}),W&&(0,T.jsxs)(o,{children:[(0,T.jsx)(s,{textStyle:`sm`,fontWeight:`semibold`,color:`fg`,mb:2,children:`Project`}),B.length===0?(0,T.jsxs)(E,{palette:`orange`,icon:f,title:`No shared projects yet`,children:[`Create a team project in this organization first (personal projects can't back an SDK key), then re-run `,(0,T.jsx)(`code`,{children:`langwatch login`}),` in your terminal.`]}):(0,T.jsx)(h,{variant:`single-select`,label:``,placeholder:`Select a project`,allowedScopeTypes:[`PROJECT`],organizationId:F??void 0,availableProjects:B,availableTeams:V,value:L?[{scopeType:`PROJECT`,scopeId:L}]:[],onChange:e=>R(e[0]?.scopeId??null),showSummary:!1})]}),N.kind===`error`&&(0,T.jsx)(E,{palette:`red`,icon:m,title:`Approval failed`,children:N.message}),(0,T.jsxs)(r,{direction:{base:`column`,sm:`row`},gap:3,children:[(0,T.jsx)(i,{colorPalette:`orange`,flex:1,onClick:G,loading:N.kind===`submitting`,disabled:!F||W&&!L,children:W?`Generate API key`:`Approve`}),(0,T.jsx)(i,{variant:`outline`,color:`fg.muted`,borderColor:`border.emphasized`,onClick:K,loading:N.kind===`submitting`,children:`Deny`})]})]}),N.kind===`success`&&(0,T.jsx)(T.Fragment,{children:N.credentialType===`project_api_key`?(0,T.jsxs)(E,{palette:`green`,icon:p,title:`API key generated!`,children:[`A fresh project API key has been minted for`,` `,(0,T.jsx)(`strong`,{children:N.projectName??`your project`}),` (`,N.organizationName,`). The key flowed back to your terminal automatically, and your `,(0,T.jsx)(`code`,{children:`.env`}),` is updated. You can close this tab.`]}):(0,T.jsxs)(E,{palette:`green`,icon:p,title:`You're signed in!`,children:[`LangWatch CLI is now authorized for`,` `,(0,T.jsx)(`strong`,{children:N.organizationName}),` using the`,` `,(0,T.jsx)(`code`,{children:N.vkLabel}),` personal key. You can close this tab and return to your terminal.`]})}),N.kind===`denied`&&(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(E,{palette:`blue`,icon:c,title:`Authorization denied`,children:`The CLI session has been rejected. You can close this tab.`})})]})})]})}function O(){return(0,T.jsx)(S,{title:`Authorize the LangWatch CLI`,loading:!0,isLogoInside:!0,children:null})}export{D as default};
2
- //# sourceMappingURL=auth-DWhhuKxO.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,n as r,r as i}from"./portal-FJIui2Z2.js";import{t as a}from"./jsx-runtime-CFwixLRt.js";import{t as o}from"./box-Ck5lef6C.js";import{t as s}from"./text-A3qvcMyN.js";import{n as c}from"./toaster-CRP22oRW.js";import{t as l}from"./icon-button-Ce2kwA7j.js";import{a as u,r as d,t as f}from"./field-Dz4Xmo3X.js";import{t as p}from"./h-stack-CMPhqSp5.js";import{t as m}from"./spacer-CbmCSsJg.js";import{t as h}from"./v-stack-ClAMS101.js";import{n as g}from"./api-BK6L1im2.js";import{t as _}from"./usePublicEnv-CATGNgPr.js";import{c as v,i as y}from"./auth-client-4OIM4EvK.js";import{On as b,ft as x}from"./lu-DlSq9Be4.js";import{Ar as S,Rt as C,_n as w,ni as T,xn as E,yt as D}from"./index-CUhcyBp3.js";import{s as O}from"./index.esm-C0ipNBTK.js";import{t as k}from"./zod-BGMkf8aO.js";import{i as A}from"./stringCasing-Cx6SsTTf.js";import{t as j}from"./SettingsLayout-CYtjUobV.js";var M=e(t()),N=a(),P=w({currentPassword:E().min(1,`Current password is required`),newPassword:E().min(8,`Password must be at least 8 characters`),confirmPassword:E().min(8,`Password must be at least 8 characters`)}).refine(e=>e.newPassword===e.confirmPassword,{message:`Passwords don't match`,path:[`confirmPassword`]});function F({open:e,onClose:t}){let n=g.user.changePassword.useMutation(),a=O({resolver:k(P),defaultValues:{currentPassword:``,newPassword:``,confirmPassword:``}});return(0,M.useEffect)(()=>{e&&a.reset({currentPassword:``,newPassword:``,confirmPassword:``})},[e,a]),(0,N.jsx)(D.Root,{open:e,onOpenChange:e=>{e.open||t()},placement:`center`,children:(0,N.jsxs)(D.Content,{bg:`bg`,children:[(0,N.jsx)(D.CloseTrigger,{}),(0,N.jsx)(D.Header,{children:(0,N.jsx)(D.Title,{fontSize:`md`,fontWeight:`500`,children:`Change Password`})}),(0,N.jsxs)(`form`,{onSubmit:a.handleSubmit(async e=>{try{await n.mutateAsync({currentPassword:e.currentPassword,newPassword:e.newPassword}),c.create({title:`Password changed successfully`,type:`success`,meta:{closable:!0}}),t()}catch(e){c.create({title:`Failed to change password`,description:e instanceof Error?e.message:`Please try again`,type:`error`,meta:{closable:!0}})}}),children:[(0,N.jsx)(D.Body,{children:(0,N.jsxs)(r,{gap:4,children:[(0,N.jsx)(s,{fontSize:`sm`,color:`fg.muted`,children:`Password must be at least 8 characters long.`}),(0,N.jsxs)(u,{invalid:!!a.formState.errors.currentPassword,children:[(0,N.jsx)(d,{children:`Current Password`}),(0,N.jsx)(S,{type:`password`,autoComplete:`current-password`,...a.register(`currentPassword`)}),a.formState.errors.currentPassword&&(0,N.jsx)(f,{children:a.formState.errors.currentPassword.message})]}),(0,N.jsxs)(u,{invalid:!!a.formState.errors.newPassword,children:[(0,N.jsx)(d,{children:`New Password`}),(0,N.jsx)(S,{type:`password`,autoComplete:`new-password`,...a.register(`newPassword`)}),a.formState.errors.newPassword&&(0,N.jsx)(f,{children:a.formState.errors.newPassword.message})]}),(0,N.jsxs)(u,{invalid:!!a.formState.errors.confirmPassword,children:[(0,N.jsx)(d,{children:`Confirm New Password`}),(0,N.jsx)(S,{type:`password`,autoComplete:`new-password`,...a.register(`confirmPassword`)}),a.formState.errors.confirmPassword&&(0,N.jsx)(f,{children:a.formState.errors.confirmPassword.message})]})]})}),(0,N.jsx)(D.Footer,{children:(0,N.jsxs)(p,{gap:3,justify:`end`,width:`full`,children:[(0,N.jsx)(i,{variant:`outline`,onClick:t,disabled:n.isPending,children:`Cancel`}),(0,N.jsx)(i,{type:`submit`,colorPalette:`orange`,disabled:n.isPending,loading:n.isPending,children:`Change Password`})]})})]})]})})}var I=(e,t)=>{if(e===`auth0`){let[e]=t.split(`|`);return{auth0:`Email/Password`,"google-oauth2":`Google`,windowslive:`Microsoft`,github:`GitHub`}[e??``]??A(e??`unknown`)}return A(e)},L=e=>{if(e.provider===`credential`)return!0;if(e.provider===`auth0`){let[t]=e.providerAccountId.split(`|`);return t===`auth0`}return!1};function R(){let{data:e,isLoading:t}=g.user.getLinkedAccounts.useQuery({}),r=g.user.unlinkAccount.useMutation(),{organization:a}=C(),u=_().data?.NEXTAUTH_PROVIDER,d=g.useContext(),[f,v]=(0,M.useState)(!1),S=!!a?.ssoProvider;if(!u)return(0,N.jsx)(s,{fontSize:`sm`,color:`fg.muted`,children:`Sign-in management is unavailable in this environment.`});let w=u===`email`||u===`auth0`,T=u===`email`,E=()=>{u&&(async()=>{let e=await y(u,{callbackUrl:window.location.href});e.error&&c.create({title:`Failed to link sign-in method`,description:e.error,type:`error`,meta:{closable:!0}})})()},D=async e=>{try{await r.mutateAsync({accountId:e}),await d.user.getLinkedAccounts.invalidate(),c.create({title:`Sign-in method removed`,type:`success`,meta:{closable:!0}})}catch(e){c.create({title:`Failed to remove sign-in method`,description:e instanceof Error?e.message:`Please try again`,type:`error`,meta:{closable:!0}})}};if(T)return(0,N.jsxs)(p,{width:`full`,children:[(0,N.jsxs)(h,{align:`start`,gap:0,children:[(0,N.jsx)(s,{fontSize:`sm`,children:`Email + password`}),(0,N.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:`Update the password used to sign in to LangWatch.`})]}),(0,N.jsx)(m,{}),(0,N.jsx)(i,{size:`sm`,colorPalette:`orange`,onClick:()=>v(!0),children:`Change Password`}),(0,N.jsx)(F,{open:f,onClose:()=>v(!1)})]});if(t)return(0,N.jsx)(n,{size:`sm`});let O=!S;return(0,N.jsxs)(h,{align:`stretch`,gap:3,children:[S&&(0,N.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:`You sign in via your company's SSO provider. Additional sign-in methods can't be linked.`}),(0,N.jsx)(h,{align:`stretch`,gap:1,children:e?.map(t=>{let n=L(t),a=!S&&(e?.length??0)>1;return(0,N.jsxs)(p,{width:`full`,gap:2,children:[(0,N.jsx)(x,{}),(0,N.jsx)(s,{fontSize:`sm`,children:I(t.provider,t.providerAccountId)}),(0,N.jsx)(m,{}),n&&w&&(0,N.jsx)(i,{size:`xs`,variant:`ghost`,colorPalette:`orange`,onClick:()=>v(!0),children:`Change Password`}),a&&(0,N.jsx)(l,{"aria-label":`Remove sign-in method`,variant:`ghost`,size:`xs`,onClick:()=>void D(t.id),disabled:r.isLoading,children:(0,N.jsx)(b,{})})]},t.id)})}),O&&(0,N.jsx)(o,{children:(0,N.jsx)(i,{size:`sm`,variant:`outline`,onClick:E,children:`Link another sign-in method`})}),w&&(0,N.jsx)(F,{open:f,onClose:()=>v(!1)})]})}function z(){let{data:e}=v();return(0,N.jsx)(j,{children:(0,N.jsxs)(h,{gap:6,width:`full`,align:`start`,children:[(0,N.jsxs)(h,{align:`start`,gap:1,children:[(0,N.jsx)(T,{as:`h2`,children:`Sign-in Methods`}),e?.user?.email&&(0,N.jsxs)(s,{color:`fg.muted`,children:[`(`,e.user.email,`)`]})]}),(0,N.jsx)(R,{})]})})}export{z as default};
2
- //# sourceMappingURL=authentication-CvPvvVW6.js.map
@@ -1,2 +0,0 @@
1
- import{t as e}from"./jsx-runtime-CFwixLRt.js";import{t}from"./text-A3qvcMyN.js";import{n,r,t as i}from"./card-54_vstoB.js";import{t as a}from"./container-CAygaZzW.js";import{t as o}from"./h-stack-CMPhqSp5.js";import{t as s}from"./spacer-CbmCSsJg.js";import{t as c}from"./v-stack-ClAMS101.js";import{n as l,t as u}from"./DashboardLayout-RHGL-98_.js";import{Rt as d,ni as f}from"./index-CUhcyBp3.js";import{t as p}from"./tracking-2cJI_Hu7.js";import{t as m}from"./CopyInput-Csb1U32e.js";var h=e();function g(){let{organizations:e,project:p}=d();return(0,h.jsx)(u,{children:(0,h.jsx)(a,{maxWidth:`600px`,paddingTop:`200px`,children:(0,h.jsxs)(r,{children:[(0,h.jsx)(n,{children:(0,h.jsxs)(o,{width:`full`,align:`center`,children:[(0,h.jsx)(f,{as:`h1`,size:`md`,children:`Authorize`}),(0,h.jsx)(s,{}),e&&p&&(0,h.jsx)(l,{organizations:e,project:p})]})}),(0,h.jsx)(i,{children:(0,h.jsxs)(c,{align:`start`,gap:6,children:[(0,h.jsx)(t,{children:`Copy your LangWatch API key below and paste it into your command line or notebook to authorize it.`}),(0,h.jsx)(_,{})]})})]})})})}function _(){let{project:e}=d();return(0,h.jsx)(m,{value:e?.apiKey??``,label:`API key`,onClick:()=>p(`api_key_copy`,{project_id:e?.id})})}export{_ as APIKeyCopyInput,g as default};
2
- //# sourceMappingURL=authorize-C1bDXq-Z.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./text-A3qvcMyN.js";import{n as a}from"./toaster-CRP22oRW.js";import{n as o,r as s,t as c}from"./card-54_vstoB.js";import{t as l}from"./container-CAygaZzW.js";import{t as u}from"./h-stack-CMPhqSp5.js";import{t as d}from"./spacer-CbmCSsJg.js";import{t as f}from"./v-stack-ClAMS101.js";import{n as p,t as m}from"./DashboardLayout-RHGL-98_.js";import{r as h}from"./next-router-Bn5Y8Iek.js";import{c as g}from"./auth-client-4OIM4EvK.js";import{Rt as _,ni as v}from"./index-CUhcyBp3.js";var y=e(t()),b=r();function x(){let e=h(),{data:t,status:r}=g(),x={response_type:e.query.response_type??``,client_id:e.query.client_id??``,redirect_uri:e.query.redirect_uri??``,state:e.query.state??``,code_challenge:e.query.code_challenge??``,code_challenge_method:e.query.code_challenge_method??``,scope:e.query.scope??``},{organizations:S,project:C}=_(),[w,T]=(0,y.useState)(!1);if((0,y.useEffect)(()=>{if(r!==`loading`&&!t){let t=new URLSearchParams;for(let[e,n]of Object.entries(x))n&&t.set(e,n);let n=`/mcp/authorize?${t.toString()}`;e.replace(`/auth/signin?callbackUrl=${encodeURIComponent(n)}`)}},[t,r]),r===`loading`||!t)return null;let E=e=>{a.create({title:`Authorization failed`,description:e,type:`error`,meta:{closable:!0}}),T(!1)},D=async()=>{if(C){T(!0);try{let e=await fetch(`/api/mcp/authorize`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({projectId:C.id,redirect_uri:x.redirect_uri,state:x.state,code_challenge:x.code_challenge,code_challenge_method:x.code_challenge_method,client_id:x.client_id})}),t=await e.json();if(!e.ok){E(t.error??`Unknown error`);return}t.redirect?window.location.href=t.redirect:E(`No redirect URL received from server`)}catch(e){E(e instanceof Error?e.message:`Network error`)}}},O=()=>{if(x.redirect_uri){let t=new URL(x.redirect_uri);if(t.protocol===`javascript:`||t.protocol===`data:`||t.protocol===`vbscript:`){e.push(`/`);return}t.searchParams.set(`error`,`access_denied`),x.state&&t.searchParams.set(`state`,x.state),window.location.href=t.toString()}else e.push(`/`)},k=x.scope||`mcp:tools`;return(0,b.jsx)(m,{children:(0,b.jsx)(l,{maxWidth:`600px`,paddingTop:`200px`,children:(0,b.jsxs)(s,{children:[(0,b.jsx)(o,{children:(0,b.jsxs)(u,{width:`full`,align:`center`,children:[(0,b.jsx)(v,{as:`h1`,size:`md`,children:`Authorize MCP Connection`}),(0,b.jsx)(d,{}),S&&C&&(0,b.jsx)(p,{organizations:S,project:C})]})}),(0,b.jsx)(c,{children:(0,b.jsxs)(f,{align:`start`,gap:6,children:[(0,b.jsx)(i,{children:`Allow this application to access your LangWatch project tools and data?`}),(0,b.jsxs)(i,{fontSize:`sm`,color:`fg.muted`,children:[`Scopes: `,k]}),(0,b.jsxs)(u,{width:`full`,gap:2,children:[(0,b.jsx)(n,{colorScheme:`blue`,onClick:D,disabled:!C||w,loading:w,children:`Allow`}),(0,b.jsx)(n,{variant:`outline`,onClick:O,children:`Deny`})]})]})})]})})})}export{x as default};
2
- //# sourceMappingURL=authorize-xZkU_nXs.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./text-A3qvcMyN.js";import{Nn as s,ir as c,xn as l}from"./useLiteMemberGuard-klZnweA7.js";import{n as u}from"./info-CtYT35g4.js";import{t as d}from"./tooltip-Croc0I6e.js";import{n as f}from"./toaster-CRP22oRW.js";import{$ as p,I as m,Q as h,X as g,Y as _,Z as v,et as y}from"./ExternalImage-DbtOSrKl.js";import{r as ee}from"./UpgradeModal-BmLw5ONS.js";import{t as b}from"./h-stack-CMPhqSp5.js";import{J as x,L as te,a as S,i as C,n as w,q as ne}from"./seriesOptions-BYBEdexs.js";import{A as T}from"./immer-tl_oI9yy.js";import{t as E}from"./v-stack-ClAMS101.js";import{t as D}from"./circle-check-big-4_LKo4PU.js";import{t as O}from"./DashboardLayout-RHGL-98_.js";import{n as k}from"./close-button-RGOW3hmk.js";import{r as re}from"./next-router-Bn5Y8Iek.js";import{n as A}from"./api-BK6L1im2.js";import{n as j}from"./info-Bii0i81f.js";import{t as ie}from"./alert-triangle-CKCOpxkL.js";import{t as ae}from"./calendar-52syEei0.js";import{t as oe}from"./database-CBNPj89e.js";import{t as se}from"./edit-2-DAQF-l9b.js";import{n as ce,t as le}from"./FilterDisplay-BT6B5ZoZ.js";import{t as ue}from"./flag-BDPYYHJQ.js";import{t as M}from"./help-circle-DidtVhlp.js";import{t as de}from"./more-vertical-_6MEkDJl.js";import{t as fe}from"./plus-B6aIX-yZ.js";import{t as pe}from"./trash-C9sv_Lb0.js";import{t as me}from"./trending-up-CH4aNR9y.js";import{Bn as he,Rt as ge,V as _e,gr as ve,ni as ye,t as be,w as N}from"./index-CUhcyBp3.js";import{t as xe}from"./SectionNavigationLayout-DNvKM1pq.js";import{t as Se}from"./WithPermissionGuard-BP1dFkpM.js";import{t as Ce}from"./switch-vUOdjiD1.js";import{n as we}from"./HoverableBigText-CxXucdYS.js";import{t as P}from"./LangyContextTarget-DUSindiC.js";var F=e(t()),I=e(j());function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function Te(e,t){if(e==null)return{};var n=R(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function R(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var z=(0,F.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Te(e,[`color`,`size`]);return F.createElement(`svg`,L({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),F.createElement(`line`,{x1:`12`,y1:`1`,x2:`12`,y2:`23`}),F.createElement(`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}))});z.propTypes={color:I.default.string,size:I.default.oneOfType([I.default.string,I.default.number])},z.displayName=`DollarSign`;function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(this,arguments)}function Ee(e,t){if(e==null)return{};var n=De(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function De(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var V=(0,F.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=Ee(e,[`color`,`size`]);return F.createElement(`svg`,B({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),F.createElement(`path`,{d:`M12 20h9`}),F.createElement(`path`,{d:`M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z`}))});V.propTypes={color:I.default.string,size:I.default.oneOfType([I.default.string,I.default.number])},V.displayName=`Edit3`;function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H.apply(this,arguments)}function U(e,t){if(e==null)return{};var n=Oe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Oe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var W=(0,F.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=U(e,[`color`,`size`]);return F.createElement(`svg`,H({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),F.createElement(`polyline`,{points:`23 18 13.5 8.5 8.5 13.5 1 6`}),F.createElement(`polyline`,{points:`17 18 23 18 23 12`}))});W.propTypes={color:I.default.string,size:I.default.oneOfType([I.default.string,I.default.number])},W.displayName=`TrendingDown`;function G(){return G=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G.apply(this,arguments)}function ke(e,t){if(e==null)return{};var n=Ae(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ae(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var K=(0,F.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=ke(e,[`color`,`size`]);return F.createElement(`svg`,G({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),F.createElement(`polygon`,{points:`13 2 3 14 12 14 11 22 21 10 12 10 13 2`}))});K.propTypes={color:I.default.string,size:I.default.oneOfType([I.default.string,I.default.number])},K.displayName=`Zap`;var q=i(),je=JSON.stringify({"traces.error":[`true`]}),Me={alert:[{title:`Error spike`,description:`Notify Slack when errors exceed a threshold.`,icon:ie,prefill:{initialSource:`customGraph`,initialName:`Error spike alert`,initialAction:`SEND_SLACK_MESSAGE`}},{title:`Traffic drop`,description:`Know when traces stop arriving.`,icon:W,prefill:{initialSource:`customGraph`,initialName:`Traffic drop alert`,initialAction:`SEND_EMAIL`}},{title:`Cost spike`,description:`Watch spend on a cost graph.`,icon:z,prefill:{initialSource:`customGraph`,initialName:`Cost spike alert`,initialAction:`SEND_EMAIL`}}],automation:[{title:`Flag failing evaluations`,description:`Get a Slack message for every failure.`,icon:ue,prefill:{initialName:`Failing evaluations`,initialAction:`SEND_SLACK_MESSAGE`}},{title:`Build a dataset from errors`,description:`Collect errored traces into a dataset.`,icon:oe,prefill:{initialName:`Error dataset`,initialAction:`ADD_TO_DATASET`,initialFilters:je}},{title:`Queue for review`,description:`Send errored traces to your annotators.`,icon:V,prefill:{initialName:`Review queue`,initialAction:`ADD_TO_ANNOTATION_QUEUE`,initialFilters:je}}]};function Ne({useCase:e,onOpen:t}){let n=e.icon;return(0,q.jsxs)(E,{as:`button`,align:`start`,gap:1,padding:3,borderWidth:`1px`,borderColor:`border`,borderRadius:`lg`,bg:`bg.panel`,cursor:`pointer`,textAlign:`left`,_hover:{bg:`bg.muted`,borderColor:`border.emphasized`},onClick:()=>t(e.prefill),children:[(0,q.jsxs)(o,{textStyle:`sm`,fontWeight:`semibold`,display:`inline-flex`,alignItems:`center`,gap:2,children:[(0,q.jsx)(n,{size:14}),e.title]}),(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:e.description})]})}function J({kind:e,onOpen:t,showLabel:n=!0}){return(0,q.jsxs)(E,{align:`stretch`,gap:2,children:[n&&(0,q.jsx)(o,{textStyle:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Popular uses`}),(0,q.jsx)(s,{columns:{base:1,md:3},gap:3,children:Me[e].map(e=>(0,q.jsx)(Ne,{useCase:e,onOpen:t},e.title))})]})}var Pe={fired:{label:`Matched`,icon:he,palette:`blue`},alertOpened:{label:`Started firing`,icon:k,palette:`red`},alertRecovered:{label:`Recovered`,icon:D,palette:`green`},reportSent:{label:`Sent`,icon:ve,palette:`purple`}};function Y(e){return e.toLocaleDateString(void 0,{year:`numeric`,month:`2-digit`,day:`2-digit`})}function Fe(e){let t=new Date,n=new Date(t.getTime()-1440*60*1e3);return Y(e)===Y(t)?`Today`:Y(e)===Y(n)?`Yesterday`:e.toLocaleDateString(void 0,{weekday:`short`,month:`short`,day:`numeric`})}function Ie({fires:e,triggersById:t}){let n=[];for(let r of e){let e=t.get(r.triggerId),i=e?.name??`Deleted automation`,a=r.customGraphId!==null,o=e?.triggerKind===`REPORT`;n.push({id:r.id,triggerId:r.triggerId,name:i,kind:a?`alertOpened`:o?`reportSent`:`fired`,at:new Date(r.createdAt)}),a&&r.resolvedAt&&n.push({id:`${r.id}:resolved`,triggerId:r.triggerId,name:i,kind:`alertRecovered`,at:new Date(r.resolvedAt)})}return n.sort((e,t)=>t.at.getTime()-e.at.getTime())}function Le({fires:e,triggers:t,isLoading:r,onOpenAutomation:i}){let s=(0,F.useMemo)(()=>new Map(t.map(e=>[e.id,e])),[t]),c=(0,F.useMemo)(()=>{let t=Ie({fires:e,triggersById:s}),n=new Map;for(let e of t){let t=Y(e.at),r=n.get(t);r?r.push(e):n.set(t,[e])}return[...n.values()]},[e,s]);return r?(0,q.jsxs)(b,{gap:2,color:`fg.muted`,padding:4,children:[(0,q.jsx)(n,{size:`xs`}),(0,q.jsx)(o,{textStyle:`sm`,children:`Loading activity…`})]}):c.length===0?(0,q.jsx)(a,{borderWidth:`1px`,borderStyle:`dashed`,borderColor:`border`,borderRadius:`lg`,padding:8,textAlign:`center`,children:(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`Nothing has fired yet. When your automations, alerts, and reports run, you'll see what they did here.`})}):(0,q.jsx)(E,{align:`stretch`,gap:6,children:c.map(e=>(0,q.jsxs)(E,{align:`stretch`,gap:0,children:[(0,q.jsx)(o,{textStyle:`xs`,fontWeight:`semibold`,color:`fg.muted`,paddingBottom:2,children:Fe(e[0].at)}),(0,q.jsx)(E,{align:`stretch`,gap:0,borderWidth:`1px`,borderColor:`border.emphasized`,borderRadius:`md`,overflow:`hidden`,separator:(0,q.jsx)(a,{height:`1px`,bg:`border.muted`}),children:e.map(e=>(0,q.jsx)(Re,{entry:e,onOpen:()=>i(e.triggerId)},e.id))})]},Y(e[0].at)))})}function Re({entry:e,onOpen:t}){let n=Pe[e.kind],r=n.icon;return(0,q.jsxs)(b,{gap:3,paddingX:4,paddingY:2.5,cursor:`pointer`,_hover:{bg:`bg.muted`},onClick:t,children:[(0,q.jsx)(a,{color:`${n.palette}.fg`,display:`inline-flex`,flexShrink:0,children:(0,q.jsx)(r,{size:14})}),(0,q.jsx)(o,{textStyle:`sm`,fontWeight:`medium`,flexShrink:0,children:e.name}),(0,q.jsx)(u,{size:`sm`,colorPalette:n.palette,variant:`subtle`,children:n.label}),(0,q.jsx)(a,{flex:`1`}),(0,q.jsx)(o,{textStyle:`xs`,color:`fg.muted`,flexShrink:0,title:e.at.toLocaleString(),children:N(e.at.getTime())})]})}function X({label:e,help:t}){return(0,q.jsxs)(b,{gap:1,children:[(0,q.jsx)(o,{as:`span`,children:e}),(0,q.jsx)(d,{content:t,children:(0,q.jsx)(a,{color:`fg.muted`,display:`inline-flex`,cursor:`help`,children:(0,q.jsx)(M,{size:12})})})]})}function ze({active:e,cadence:t,lastFiredAt:n}){let r=x[t]??0;if(!e||r<=0)return null;let i=n?new Date(n).getTime()+r:null,a=Date.now();return(0,q.jsx)(d,{content:`New matches are bundled into one message on this schedule.`,children:(0,q.jsx)(o,{textStyle:`xs`,color:`fg.muted`,cursor:`help`,children:i&&i>a?`Next digest due in ~${Math.max(1,Math.ceil((i-a)/6e4))}m`:`Digest: ${ne[t]?.toLowerCase()??t}`})})}function Be({trigger:e,stats:t}){return(0,q.jsxs)(E,{align:`start`,gap:.5,children:[t?.lastFiredAt?(0,q.jsx)(o,{as:`span`,children:N(new Date(t.lastFiredAt).getTime())}):(0,q.jsx)(o,{as:`span`,color:`fg.muted`,children:`—`}),(0,q.jsx)(ze,{active:e.active,cadence:e.notificationCadence,lastFiredAt:t?.lastFiredAt??null})]})}function Ve({firing:e}){return e?(0,q.jsxs)(b,{gap:1.5,children:[(0,q.jsx)(a,{width:`8px`,height:`8px`,borderRadius:`full`,bg:`red.solid`}),(0,q.jsx)(o,{as:`span`,textStyle:`sm`,color:`red.fg`,children:`Firing`})]}):(0,q.jsx)(o,{as:`span`,textStyle:`sm`,color:`fg.muted`,children:`OK`})}function Z({icon:e,accent:t,title:n,count:i,summary:s,details:c,addLabel:l,onAdd:f}){return(0,q.jsxs)(b,{width:`full`,align:`center`,gap:3,children:[(0,q.jsx)(a,{colorPalette:t,bg:`colorPalette.subtle`,color:`colorPalette.fg`,borderRadius:`lg`,padding:2,display:`flex`,flexShrink:0,children:e}),(0,q.jsxs)(E,{align:`start`,gap:.5,flex:1,minWidth:0,children:[(0,q.jsxs)(b,{gap:2,align:`center`,children:[(0,q.jsx)(ye,{size:`md`,children:n}),(0,q.jsx)(u,{colorPalette:t,variant:`subtle`,borderRadius:`full`,children:i}),(0,q.jsx)(d,{content:c,children:(0,q.jsx)(a,{color:`fg.muted`,display:`inline-flex`,cursor:`help`,children:(0,q.jsx)(M,{size:13})})})]}),(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:s})]}),(0,q.jsxs)(r,{size:`sm`,variant:`outline`,colorPalette:t,onClick:f,flexShrink:0,children:[(0,q.jsx)(fe,{size:14}),` `,l]})]})}function He({schedule:e,loading:t}){return t?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(g,{children:(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`…`})}),(0,q.jsx)(g,{children:(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`…`})})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(g,{whiteSpace:`nowrap`,children:e?.nextRunAt?(0,q.jsx)(d,{content:new Date(e.nextRunAt).toLocaleString(),children:(0,q.jsx)(o,{textStyle:`sm`,cursor:`help`,children:N(new Date(e.nextRunAt).getTime())})}):(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:e?`Paused`:`Not scheduled`})}),(0,q.jsx)(g,{whiteSpace:`nowrap`,children:e?.lastRunAt?(0,q.jsx)(d,{content:new Date(e.lastRunAt).toLocaleString(),children:(0,q.jsx)(o,{textStyle:`sm`,cursor:`help`,children:N(new Date(e.lastRunAt).getTime())})}):(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`Not yet`})})]})}function Q({children:e}){return(0,q.jsx)(a,{border:`1px solid`,borderColor:`border`,borderRadius:`lg`,overflow:`hidden`,bg:`bg.panel`,children:(0,q.jsx)(a,{overflowX:`auto`,css:{"& thead th":{backgroundColor:`var(--chakra-colors-bg-subtle)`,fontSize:`11px`,fontWeight:600,textTransform:`uppercase`,letterSpacing:`0.04em`,color:`var(--chakra-colors-fg-muted)`,whiteSpace:`nowrap`,paddingTop:`0.6rem`,paddingBottom:`0.6rem`,borderBottomColor:`var(--chakra-colors-border)`},"& tbody td":{paddingTop:`0.85rem`,paddingBottom:`0.85rem`,verticalAlign:`middle`,borderColor:`var(--chakra-colors-border-muted)`},"& tbody tr:last-of-type td":{borderBottom:`none`}},children:e})})}function Ue({children:e}){return(0,q.jsx)(a,{border:`1px dashed`,borderColor:`border`,borderRadius:`lg`,padding:6,textAlign:`center`,children:(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:e})})}function We({graphName:e,graph:t,seriesName:n}){let r=n?w(t,n)??n:null;return(0,q.jsxs)(E,{align:`start`,gap:0,children:[e?(0,q.jsx)(o,{textStyle:`sm`,fontWeight:`medium`,lineClamp:1,children:e}):(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`Graph deleted`}),r?(0,q.jsx)(o,{textStyle:`xs`,color:`fg.muted`,lineClamp:1,children:r}):null]})}function Ge({actionParams:e}){let t=e.operator?C[e.operator]:null,n=e.timePeriod?S[e.timePeriod]:null;return!t&&e.threshold===void 0?(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`—`}):(0,q.jsxs)(o,{textStyle:`sm`,children:[t?`${t} `:``,e.threshold===void 0?``:e.threshold,n?` · over ${n}`:``]})}function Ke({actionParams:e,graphNameById:t}){let n=e.source;if(n?.kind===`customGraph`){let e=n.customGraphId?t.get(n.customGraphId):void 0;return(0,q.jsxs)(E,{align:`start`,gap:0,children:[(0,q.jsx)(o,{textStyle:`sm`,fontWeight:`medium`,children:`Custom graph`}),(0,q.jsx)(o,{textStyle:`xs`,color:`fg.muted`,lineClamp:1,children:e??`graph`})]})}return n?.kind===`dashboard`?(0,q.jsx)(o,{textStyle:`sm`,fontWeight:`medium`,children:`Analytics dashboard`}):(0,q.jsxs)(E,{align:`start`,gap:0,children:[(0,q.jsxs)(o,{textStyle:`sm`,fontWeight:`medium`,children:[`Top `,n?.topN??5,` traces`]}),(0,q.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`matching your filters`})]})}var qe=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`];function Je(e,t){let n=e.trim().split(/\s+/);if(n.length!==5)return`${e} (${t})`;let[r,i,a,,o]=n,s=`${String(i).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`;return a===`*`&&o!==`*`?`Weekly · ${qe[Number(o)%7]??`day ${o}`} ${s} ${t}`:a===`*`&&o===`*`?`Daily · ${s} ${t}`:a!==`*`&&o===`*`?`Monthly · day ${a} ${s} ${t}`:`${e} (${t})`}var Ye={overview:{title:`Overview`,description:`See what is firing, what is scheduled next, and recent automation activity.`},automations:{title:`Automations`,description:`Act on every incoming trace that matches your filters.`},alerts:{title:`Alerts`,description:`Get told when a metric crosses a threshold and when it recovers.`},schedules:{title:`Schedules`,description:`Send a dashboard, graph, or trace table on a recurring cadence.`}},Xe=e=>e.includes(`/automations/automations`)?`automations`:e.includes(`/automations/alerts`)?`alerts`:e.includes(`/automations/schedules`)?`schedules`:`overview`;function Ze(){let{project:e}=ge(),{openDrawer:t}=_e(),n=Xe(re().pathname),i=Ye[n],u=e?`/${e.slug}/automations`:`/auth/signin`,x=A.automation.getTriggers.useQuery({projectId:e?.id??``},{enabled:!!e?.id}),S=A.automation.getTriggerStats.useQuery({projectId:e?.id??``},{enabled:!!e?.id}),C=(0,F.useMemo)(()=>new Map((S.data??[]).map(e=>[e.triggerId,e])),[S.data]),w=A.automation.getReportSchedules.useQuery({projectId:e?.id??``},{enabled:!!e?.id}),ne=(0,F.useMemo)(()=>new Map((w.data??[]).map(e=>[e.triggerId,e])),[w.data]),D=A.automation.getRecentActivity.useQuery({projectId:e?.id??``},{enabled:!!e?.id}),O=(0,F.useMemo)(()=>(x.data??[]).filter(e=>!!e.customGraphId),[x.data]),k=(0,F.useMemo)(()=>(x.data??[]).filter(e=>e.triggerKind===`REPORT`),[x.data]),j=(0,F.useMemo)(()=>(x.data??[]).filter(e=>!e.customGraphId&&e.triggerKind!==`REPORT`),[x.data]),ie=(x.data??[]).some(e=>e.action===`ADD_TO_DATASET`),oe=A.dataset.getAll.useQuery({projectId:e?.id??``},{enabled:!!e?.id&&ie}),ue=(0,F.useMemo)(()=>k.some(e=>e.actionParams?.source?.kind===`customGraph`),[k]),M=A.graphs.getAll.useQuery({projectId:e?.id??``},{enabled:!!e?.id&&(O.length>0||ue),retry:!1}),fe=(0,F.useMemo)(()=>new Map((M.data??[]).map(e=>[e.id,e.graph])),[M.data]),he=(0,F.useMemo)(()=>new Map((M.data??[]).map(e=>[e.id,e.name??`graph`])),[M.data]),ve=A.automation.toggleTrigger.useMutation(),ye=A.automation.deleteById.useMutation(),Se=(t,n)=>{ve.mutate({triggerId:t,active:n,projectId:e?.id??``},{onSuccess:()=>{x.refetch()},onError:()=>{f.create({title:`Update automation`,type:`error`,description:`Failed to update automation`,meta:{closable:!0}})}})},I=t=>t.datasetId?(0,q.jsx)(be,{href:`/${e?.slug}/datasets/${t.datasetId}`,children:oe.data?.find(e=>e.id===t.datasetId)?.name}):``,L=t=>{ye.mutate({triggerId:t,projectId:e?.id??``},{onSuccess:()=>{f.create({title:`Delete automation`,type:`success`,description:`Automation deleted`,meta:{closable:!0}}),x.refetch()},onError:()=>{f.create({title:`Delete automation`,type:`error`,description:`Failed to delete automation`,meta:{closable:!0}})}})},Te=e=>te[e]?.shared.label??e,R=(e,t)=>{switch(e){case`SEND_SLACK_MESSAGE`:return(0,q.jsx)(d,{content:t.slackWebhook,children:(0,q.jsx)(o,{lineClamp:1,display:`block`,children:`Webhook`})});case`SEND_EMAIL`:return t.members?.join(`, `);case`ADD_TO_DATASET`:return I(t)??``}},z=({children:e,fontSize:t=`sm`})=>(0,q.jsxs)(b,{border:`1px solid`,borderColor:`border`,borderRadius:`4px`,fontSize:t,width:`100%`,gap:2,paddingX:2,paddingY:1,children:[(0,q.jsx)(a,{color:`fg.muted`,children:(0,q.jsx)(ce,{width:16,style:{minWidth:16}})}),e]}),B=({children:e})=>(0,q.jsx)(a,{padding:1,fontWeight:`500`,textTransform:`capitalize`,color:`fg.muted`,children:String(e).split(`.`).filter((e,t)=>t!==0||e.toLowerCase()===`evaluations`).join(` `).replace(`_`,` `)}),Ee=({children:e})=>(0,q.jsx)(a,{padding:1,borderRightRadius:`md`,children:(0,q.jsx)(we,{lineClamp:1,expandable:!1,children:e})}),De=e=>!e||e.length===0?null:(0,q.jsxs)(z,{fontSize:`sm`,children:[(0,q.jsx)(B,{children:`Evaluations`}),(0,q.jsx)(Ee,{children:e.map(e=>e?.name).join(`, `)})]}),V=e=>(0,q.jsxs)(m.Root,{children:[(0,q.jsx)(m.Trigger,{asChild:!0,children:(0,q.jsx)(r,{variant:`ghost`,"aria-label":`Actions for ${e.name}`,onClick:e=>{e.stopPropagation()},children:(0,q.jsx)(de,{})})}),(0,q.jsxs)(m.Content,{children:[(0,q.jsx)(m.Item,{value:`view`,onClick:n=>{n.stopPropagation(),t(`viewAutomation`,{automationId:e.id})},children:(0,q.jsxs)(a,{display:`flex`,alignItems:`center`,gap:2,children:[(0,q.jsx)(l,{size:14}),`View`]})}),(0,q.jsx)(m.Item,{value:`edit`,onClick:n=>{n.stopPropagation(),t(`automation`,{automationId:e.id})},children:(0,q.jsxs)(a,{display:`flex`,alignItems:`center`,gap:2,children:[(0,q.jsx)(se,{size:14}),`Edit`]})}),(0,q.jsx)(m.Item,{value:`delete`,onClick:t=>{t.stopPropagation(),L(e.id)},children:(0,q.jsxs)(a,{display:`flex`,alignItems:`center`,gap:2,color:`red.fg`,children:[(0,q.jsx)(pe,{size:14}),`Delete`]})})]})]}),H=e=>({"data-trigger-id":e.id,cursor:`pointer`,_hover:{bg:`bg.muted`},onClick:()=>t(`viewAutomation`,{automationId:e.id})}),U=e=>(0,q.jsx)(g,{textAlign:`center`,onClick:e=>{e.stopPropagation()},children:(0,q.jsx)(Ce,{checked:e.active,onCheckedChange:({checked:t})=>{Se(e.id,t)}})}),Oe=x.isLoading,W=(0,F.useMemo)(()=>{let e=[...C.values()],t=e.filter(e=>e.currentlyFiring).length,n=e.reduce((e,t)=>e+(t.recentFireCount??0),0),r=(w.data??[]).filter(e=>e.nextRunAt).map(e=>({at:new Date(e.nextRunAt).getTime(),triggerId:e.triggerId})).sort((e,t)=>e.at-t.at)[0];return{firingNow:t,fired30d:n,next:r,nextName:r?(x.data??[]).find(e=>e.id===r.triggerId)?.name??null:null}},[w.data,C,x.data]);return(0,q.jsxs)(xe,{sectionLabel:`Automations`,navigationItems:[{label:`Overview`,href:u,icon:(0,q.jsx)(l,{size:14})},{label:`Automations`,href:`${u}/automations`,icon:(0,q.jsx)(K,{size:14})},{label:`Alerts`,href:`${u}/alerts`,icon:(0,q.jsx)(me,{size:14})},{label:`Schedules`,href:`${u}/schedules`,icon:(0,q.jsx)(ae,{size:14})}],children:[(0,q.jsx)(ee.Header,{children:(0,q.jsx)(ee.Heading,{children:i.title})}),(0,q.jsx)(a,{padding:6,width:`full`,children:(0,q.jsxs)(E,{align:`stretch`,gap:6,width:`full`,children:[(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:i.description}),Oe?(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`Loading...`}):(0,q.jsxs)(q.Fragment,{children:[n===`alerts`&&(0,q.jsxs)(E,{align:`stretch`,gap:4,children:[(0,q.jsx)(Z,{icon:(0,q.jsx)(me,{size:18}),accent:`orange`,title:`Alerts`,count:O.length,summary:`Get told when a metric crosses a threshold, and again when it recovers.`,details:`An alert watches one series on an analytics graph. When the value crosses your threshold it notifies your channel; when it returns to normal it sends a recovery notice.`,addLabel:`New alert`,onAdd:()=>t(`automation`,{initialSource:`customGraph`})}),O.length===0?(0,q.jsx)(J,{kind:`alert`,onOpen:e=>t(`automation`,e)}):(0,q.jsx)(Q,{children:(0,q.jsxs)(p,{variant:`line`,width:`full`,children:[(0,q.jsx)(h,{children:(0,q.jsxs)(y,{children:[(0,q.jsx)(v,{children:`Name`}),(0,q.jsx)(v,{children:`Watches`}),(0,q.jsx)(v,{whiteSpace:`nowrap`,children:`Fires when`}),(0,q.jsx)(v,{children:`Notifies`}),(0,q.jsx)(v,{whiteSpace:`nowrap`,children:(0,q.jsx)(X,{label:`Last fired`,help:`When this alert last crossed its threshold and notified you.`})}),(0,q.jsx)(v,{whiteSpace:`nowrap`,children:(0,q.jsx)(X,{label:`Status`,help:`Firing while the metric is past its threshold, back to OK when it recovers.`})}),(0,q.jsx)(v,{children:`Active`}),(0,q.jsx)(v,{})]})}),(0,q.jsx)(_,{children:O.map(e=>{let t=e.actionParams,n=C.get(e.id);return(0,q.jsx)(P,{target:T({automationId:e.id,name:e.name}),children:(0,q.jsxs)(y,{...H(e),children:[(0,q.jsx)(g,{fontWeight:`medium`,children:e.name}),(0,q.jsx)(g,{maxWidth:`260px`,children:(0,q.jsx)(We,{graphName:e.customGraph?.name??null,graph:fe.get(e.customGraphId??``),seriesName:t.seriesName})}),(0,q.jsx)(g,{whiteSpace:`nowrap`,children:(0,q.jsx)(Ge,{actionParams:t})}),(0,q.jsx)(g,{children:R(e.action,t)}),(0,q.jsx)(g,{whiteSpace:`nowrap`,children:(0,q.jsx)(Be,{trigger:e,stats:n})}),(0,q.jsx)(g,{whiteSpace:`nowrap`,children:(0,q.jsx)(Ve,{firing:!!n?.currentlyFiring})}),U(e),(0,q.jsx)(g,{children:V(e)})]})},e.id)})})]})})]}),n===`overview`&&(0,q.jsxs)(E,{align:`stretch`,gap:8,width:`full`,children:[(0,q.jsxs)(s,{columns:{base:1,md:3},gap:4,children:[(0,q.jsx)($,{label:`Firing now`,value:W.firingNow,sub:W.firingNow>0?`alerts over their threshold`:`all clear`,alert:W.firingNow>0}),(0,q.jsx)($,{label:`Fired (30 days)`,value:W.fired30d.toLocaleString(),sub:`across every automation`}),(0,q.jsx)($,{label:`Next scheduled`,value:W.next?N(W.next.at)??`—`:`—`,sub:W.nextName??`no schedules queued`})]}),(0,q.jsxs)(E,{align:`stretch`,gap:3,width:`full`,children:[(0,q.jsx)(Qe,{title:`Recent activity`,summary:`See what alerts, schedules, and automations have done recently.`}),(0,q.jsx)(Le,{fires:D.data??[],triggers:x.data??[],isLoading:D.isLoading,onOpenAutomation:e=>t(`viewAutomation`,{automationId:e})})]}),(0,q.jsxs)(E,{align:`stretch`,gap:4,width:`full`,children:[(0,q.jsx)(Qe,{title:`Popular uses`,summary:`Start from a common workflow and tailor it to your project.`}),(0,q.jsxs)(E,{align:`stretch`,gap:2,children:[(0,q.jsx)(o,{textStyle:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Alerts`}),(0,q.jsx)(J,{kind:`alert`,showLabel:!1,onOpen:e=>t(`automation`,e)})]}),(0,q.jsxs)(E,{align:`stretch`,gap:2,children:[(0,q.jsx)(o,{textStyle:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Automations`}),(0,q.jsx)(J,{kind:`automation`,showLabel:!1,onOpen:e=>t(`automation`,e)})]})]})]}),n===`schedules`&&(0,q.jsxs)(E,{align:`stretch`,gap:4,children:[(0,q.jsx)(Z,{icon:(0,q.jsx)(ae,{size:18}),accent:`purple`,title:`Schedules`,count:k.length,summary:`Send a dashboard, a graph, or a table of traces on a recurring schedule.`,details:`A schedule bundles a dashboard, a single graph, or a top-N trace table into a Slack or email digest on the schedule you set.`,addLabel:`New schedule`,onAdd:()=>t(`automation`,{initialSource:`report`})}),k.length===0?(0,q.jsx)(Ue,{children:`No schedules yet. Create one for a recurring Slack or email digest.`}):(0,q.jsx)(Q,{children:(0,q.jsxs)(p,{variant:`line`,width:`full`,children:[(0,q.jsx)(h,{children:(0,q.jsxs)(y,{children:[(0,q.jsx)(v,{children:`Name`}),(0,q.jsx)(v,{children:`Sends`}),(0,q.jsx)(v,{whiteSpace:`nowrap`,children:`Schedule`}),(0,q.jsx)(v,{whiteSpace:`nowrap`,children:(0,q.jsx)(X,{label:`Next run`,help:`When this next goes out, straight from the scheduler. A paused schedule has no next run.`})}),(0,q.jsx)(v,{whiteSpace:`nowrap`,children:(0,q.jsx)(X,{label:`Last run`,help:`The last time this was sent.`})}),(0,q.jsx)(v,{children:`Delivery`}),(0,q.jsx)(v,{children:`Active`}),(0,q.jsx)(v,{})]})}),(0,q.jsx)(_,{children:k.map(e=>{let n=e.actionParams,r=n.schedule;return(0,q.jsx)(P,{target:T({automationId:e.id,name:e.name}),children:(0,q.jsxs)(y,{"data-trigger-id":e.id,cursor:`pointer`,_hover:{bg:`bg.muted`},onClick:()=>t(`automation`,{automationId:e.id}),children:[(0,q.jsx)(g,{fontWeight:`medium`,children:e.name}),(0,q.jsx)(g,{children:(0,q.jsx)(Ke,{actionParams:n,graphNameById:he})}),(0,q.jsx)(g,{whiteSpace:`nowrap`,children:(0,q.jsx)(o,{textStyle:`sm`,children:r?.cron?Je(r.cron,r.timezone??`UTC`):`Not set`})}),(0,q.jsx)(He,{schedule:ne.get(e.id),loading:w.isLoading}),(0,q.jsx)(g,{children:e.action===`SEND_SLACK_MESSAGE`?`Slack`:`Email`}),U(e),(0,q.jsx)(g,{children:V(e)})]})},e.id)})})]})})]}),n===`automations`&&(0,q.jsxs)(E,{align:`stretch`,gap:4,children:[(0,q.jsx)(Z,{icon:(0,q.jsx)(K,{size:18}),accent:`blue`,title:`Automations`,count:j.length,summary:`Act on every incoming trace that matches your filters.`,details:`An automation runs on each trace matching your filters: post to Slack or email, add rows to a dataset, or queue traces for annotation.`,addLabel:`New automation`,onAdd:()=>t(`automation`,{})}),j.length===0?(0,q.jsx)(J,{kind:`automation`,onOpen:e=>t(`automation`,e)}):(0,q.jsx)(Q,{children:(0,q.jsxs)(p,{variant:`line`,width:`full`,children:[(0,q.jsx)(h,{children:(0,q.jsxs)(y,{children:[(0,q.jsx)(v,{children:`Name`}),(0,q.jsx)(v,{children:`Acts on`}),(0,q.jsx)(v,{children:`Then`}),(0,q.jsx)(v,{whiteSpace:`nowrap`,children:(0,q.jsx)(X,{label:`Last fired`,help:`When this automation last matched a trace and ran its action. Automations on a digest schedule also show when the next bundled send is due.`})}),(0,q.jsx)(v,{whiteSpace:`nowrap`,children:(0,q.jsx)(X,{label:`Fires (30d)`,help:`Times this automation fired in the last 30 days.`})}),(0,q.jsx)(v,{children:`Active`}),(0,q.jsx)(v,{})]})}),(0,q.jsx)(_,{children:j.map(e=>{let t=e.actionParams,n=C.get(e.id);return(0,q.jsx)(P,{target:T({automationId:e.id,name:e.name}),children:(0,q.jsxs)(y,{...H(e),children:[(0,q.jsx)(g,{fontWeight:`medium`,children:e.name}),(0,q.jsx)(g,{maxWidth:`360px`,children:(0,q.jsxs)(E,{gap:2,align:`stretch`,children:[De(e.checks?.filter(e=>!!e)??[]),e.filterQuery?(0,q.jsx)(c,{size:`sm`,variant:`surface`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:e.filterQuery}):e.filters&&typeof e.filters==`string`&&e.filters!==`{}`?(0,q.jsx)(le,{filters:e.filters,hasBorder:!0}):null]})}),(0,q.jsx)(g,{children:(0,q.jsxs)(E,{align:`start`,gap:0,children:[(0,q.jsx)(o,{textStyle:`sm`,fontWeight:`medium`,children:Te(e.action)}),(0,q.jsx)(a,{textStyle:`xs`,color:`fg.muted`,children:R(e.action,t)})]})}),(0,q.jsx)(g,{whiteSpace:`nowrap`,children:(0,q.jsx)(Be,{trigger:e,stats:n})}),(0,q.jsx)(g,{children:(0,q.jsx)(o,{as:`span`,color:`fg.muted`,children:n?.recentFireCount??0})}),U(e),(0,q.jsx)(g,{children:V(e)})]})},e.id)})})]})})]})]})]})})]})}function Qe({title:e,summary:t}){return(0,q.jsxs)(E,{align:`start`,gap:.5,children:[(0,q.jsx)(o,{fontSize:`lg`,fontWeight:`semibold`,children:e}),(0,q.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:t})]})}function $({label:e,value:t,sub:n,alert:r=!1}){return(0,q.jsxs)(a,{borderWidth:`1px`,borderColor:r?`red.solid`:`border`,borderRadius:`lg`,padding:4,bg:`bg.panel`,children:[(0,q.jsx)(o,{textStyle:`2xs`,textTransform:`uppercase`,letterSpacing:`0.04em`,fontWeight:`600`,color:r?`red.fg`:`fg.muted`,children:e}),(0,q.jsx)(o,{fontSize:`2xl`,fontWeight:`semibold`,lineHeight:`1.2`,marginTop:1,color:r?`red.fg`:`fg`,children:t}),(0,q.jsx)(o,{textStyle:`xs`,color:`fg.muted`,marginTop:.5,lineClamp:1,children:n})]})}var $e=Se(`triggers:view`,{layoutComponent:O})(Ze);export{$e as default};
2
- //# sourceMappingURL=automations-ChfL33YS.js.map
@@ -1 +0,0 @@
1
- import e from"./automations-ChfL33YS.js";export{e as default};
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{yn as t}from"./useLiteMemberGuard-klZnweA7.js";import{E as n,T as r}from"./DashboardLayout-RHGL-98_.js";import{En as i}from"./index-CUhcyBp3.js";var a=i(),o=e(t());function s(e,t=`0,0`){return(0,o.default)(e).format(t)}function c(e){let t=r[e],i=n.prices[t];if(!i?.unitAmount)throw Error(`No unitAmount for ${e}`);return i.unitAmount}function l(){return{[a.Currency.EUR]:{monthly:c(`GROWTH_SEAT_EUR_MONTHLY`),annual:c(`GROWTH_SEAT_EUR_ANNUAL`)},[a.Currency.USD]:{monthly:c(`GROWTH_SEAT_USD_MONTHLY`),annual:c(`GROWTH_SEAT_USD_ANNUAL`)}}}function u(e){let t=l();return Math.round((1-t[e].annual/(t[e].monthly*12))*100)}function d({cents:e,currency:t}){let n=e/100;return new Intl.NumberFormat(t===a.Currency.EUR?`en-IE`:`en-US`,{style:`currency`,currency:t,minimumFractionDigits:Number.isInteger(n)?0:2,maximumFractionDigits:2}).format(n)}var f={[a.Currency.EUR]:`€`,[a.Currency.USD]:`$`},p=e=>e===a.Currency.EUR?`€5 per additional 100,000 events`:`$6 per additional 100,000 events`,m=e=>[`Up to 20 core users`,`200,000 events included`,p(e),`Unlimited lite users`,`30 days retention`,`Unlimited evals`,`Private Slack support`],h=[`All platform features`,`50,000 events included`,`14 days data retention`,`2 users`,`3 scenarios`,`3 simulations`,`3 custom evaluations`,`Community support`],g=e=>[`Everything in Free`,`200,000 events included`,p(e),`30 days retention (+ custom at $3/GB)`,`Up to 20 core users (volume discount available)`,`Unlimited lite users`,`Unlimited evals, simulations and prompts`,`Slack support`],_=[`Alternative hosting options`,`Custom data retention`,`Custom SSO / RBAC`,`Audit logs`,`Uptime & Support SLA`,`Compliance and legal reviews`,`Custom terms and DPA`,`Dedicated Solution Engineer`,`Slack / Teams support`,`AWS/Azure/GCP Marketplace`,`ISO27001 / SOC2 reports`];function v({maxMembers:e,maxMessagesPerMonth:t,maxProjects:n,maxMembersLite:r}){return[e>0?`Up to ${s(e)} core users`:`Custom core user limits`,t>=999999999?`Unlimited events`:t>0?`${s(t)} events included`:`Custom event limits`,n>=9999?`Unlimited projects`:n>0?`Up to ${s(n)} projects`:`Custom project limits`,r>=9999?`Unlimited lite users`:r>0?`Up to ${s(r)} lite users`:`Custom lite user limits`]}export{m as a,u as c,f as i,l,h as n,g as o,v as r,d as s,_ as t};
2
- //# sourceMappingURL=billing-plans-CXxmUM3Y.js.map
@@ -1,2 +0,0 @@
1
- import"./fetchSSE-DWKCnoHV.js";var e={spec_version:`1.5`,name:`Blank Template`,icon:`🧩`,description:`Start a new workflow from scratch`,version:`1.0`,template_adapter:`default`,workflow_type:`workflow`,enable_tracing:!0,nodes:[{id:`entry`,type:`entry`,position:{x:0,y:0},deletable:!1,data:{name:`Entry point`,outputs:[{identifier:`input`,type:`str`}],entry_selection:`random`,train_size:.8,test_size:.2,seed:42,dataset:{name:`Draft Dataset`,inline:{records:{input:[`Hello world`]},columnTypes:[{name:`input`,type:`string`}]}}}},{id:`llm_call`,type:`signature`,position:{x:300,y:0},data:{name:`LLM Call`,parameters:[{identifier:`llm`,type:`llm`,value:void 0},{identifier:`prompting_technique`,type:`prompting_technique`,value:void 0},{identifier:`instructions`,type:`str`,value:`You are a helpful assistant.`},{identifier:`messages`,type:`chat_messages`,value:[{role:`user`,content:`{{input}}`}]},{identifier:`demonstrations`,type:`dataset`,value:void 0}],inputs:[{identifier:`input`,type:`str`}],outputs:[{identifier:`output`,type:`str`}]}},{id:`end`,type:`end`,position:{x:600,y:30},deletable:!1,data:{name:`End`,inputs:[{identifier:`output`,type:`str`}]}}],edges:[{id:`e0-1`,source:`entry`,sourceHandle:`outputs.input`,target:`llm_call`,targetHandle:`inputs.input`,type:`default`},{id:`e1-2`,source:`llm_call`,sourceHandle:`outputs.output`,target:`end`,targetHandle:`inputs.output`,type:`default`}],state:{}};export{e as t};
2
- //# sourceMappingURL=blank-DFMnaDEJ.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./text-A3qvcMyN.js";import{An as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c}from"./info-CtYT35g4.js";import{n as l}from"./toaster-CRP22oRW.js";import{$ as u,I as d,Q as f,X as p,Y as ee,Z as m,et as h}from"./ExternalImage-DbtOSrKl.js";import{r as g}from"./UpgradeModal-BmLw5ONS.js";import{a as _,i as v,n as y,r as b,t as x}from"./empty-state-Al7XUd1I.js";import{T as S}from"./fetchSSE-DWKCnoHV.js";import{t as C}from"./h-stack-CMPhqSp5.js";import{n as w,r as T,t as E}from"./native-select-Bj4m9rSh.js";import{t as D}from"./spacer-CbmCSsJg.js";import{tt as O}from"./immer-tl_oI9yy.js";import{t as te}from"./DashboardLayout-RHGL-98_.js";import{n as k}from"./api-BK6L1im2.js";import{Ar as A,Mr as j,g as M}from"./index-CUhcyBp3.js";import{o as N,t as P}from"./formatters-BDO3Inyr.js";import{t as F}from"./ConfirmDialog-DTpkLGhm.js";import{t as I}from"./OpsPageShell-BamkwuvB.js";var L=e(t()),R={leased:{label:`In use`,palette:`green`},repaired:{label:`Will shorten`,palette:`orange`},reclaimed:{label:`Will delete`,palette:`red`},bookkeeping:{label:`Leftover keys`,palette:`gray`},pending:{label:`Expiring`,palette:`yellow`}},z={label:`Unknown`,palette:`gray`};function B(e){return R[e]??z}function V(e){return e===null?`No expiry`:e<60?`${e}s`:e<3600?`${Math.round(e/60)}m`:e<86400?`${Math.round(e/3600)}h`:`${Math.round(e/86400)}d`}function H(e){return e===null?`None`:e>=Date.now()?`Live`:N(e)}var U=i();function W({blob:e,canManage:t,onDelete:n}){let i=B(e.sweepOutcome);return(0,U.jsxs)(h,{children:[(0,U.jsx)(p,{children:(0,U.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,children:e.projectId})}),(0,U.jsx)(p,{children:(0,U.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,children:e.hash})}),(0,U.jsx)(p,{children:P(e.sizeBytes)}),(0,U.jsx)(p,{children:V(e.ttlSeconds)}),(0,U.jsx)(p,{children:e.liveLeases>0?(0,U.jsxs)(c,{colorPalette:`green`,variant:`subtle`,children:[e.liveLeases,` job`,e.liveLeases===1?``:`s`]}):(0,U.jsx)(c,{colorPalette:`gray`,variant:`subtle`,children:`Nothing`})}),(0,U.jsx)(p,{children:(0,U.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:H(e.earliestLeaseDeadlineMs)})}),(0,U.jsx)(p,{children:(0,U.jsx)(c,{colorPalette:i.palette,variant:`subtle`,children:i.label})}),(0,U.jsx)(p,{children:t&&(0,U.jsxs)(d.Root,{children:[(0,U.jsx)(d.Trigger,{asChild:!0,children:(0,U.jsx)(r,{variant:`ghost`,size:`2xs`,"aria-label":`Actions for payload ${e.hash}`,children:(0,U.jsx)(s,{size:14})})}),(0,U.jsx)(d.Content,{children:(0,U.jsx)(d.Item,{value:`delete`,color:`red.500`,onClick:()=>n(e),children:`Delete payload`})})]})})]})}function G({blobs:e,canManage:t,onDelete:n}){return(0,U.jsx)(a,{overflowX:`auto`,children:(0,U.jsxs)(u,{variant:`line`,size:`sm`,children:[(0,U.jsx)(f,{children:(0,U.jsxs)(h,{children:[(0,U.jsx)(m,{children:`Project`}),(0,U.jsx)(m,{children:`Payload`}),(0,U.jsx)(m,{children:`Size`}),(0,U.jsx)(m,{children:`Expires in`}),(0,U.jsx)(m,{children:`Referenced by`}),(0,U.jsx)(m,{children:`Holder stopped`}),(0,U.jsx)(m,{children:`Next cleanup`}),(0,U.jsx)(m,{})]})}),(0,U.jsx)(ee,{children:e.map(e=>(0,U.jsx)(W,{blob:e,canManage:t,onDelete:n},`${e.projectId}/${e.hash}`))})]})})}function K({isLoading:e,blobs:t,canManage:i,onDelete:a,hasMore:o,onLoadMore:s,isLoadingMore:c}){return e?(0,U.jsx)(j,{paddingY:20,children:(0,U.jsx)(v,{children:(0,U.jsxs)(x,{children:[(0,U.jsx)(b,{children:(0,U.jsx)(n,{size:`lg`})}),(0,U.jsx)(_,{children:`Loading payloads`})]})})}):t.length===0?(0,U.jsx)(j,{paddingY:20,children:(0,U.jsx)(v,{children:(0,U.jsxs)(x,{children:[(0,U.jsx)(b,{children:(0,U.jsx)(O,{})}),(0,U.jsx)(_,{children:`No stored payloads`}),(0,U.jsx)(y,{children:`Nothing is being held for this queue.`})]})})}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(G,{blobs:t,canManage:i,onDelete:a}),o&&(0,U.jsx)(S,{justify:`center`,paddingY:4,children:(0,U.jsx)(r,{size:`sm`,variant:`outline`,loading:c,onClick:s,children:`Load more`})})]})}var q={largest:`Largest first`,unreferenced:`Nothing referencing them`,stalest:`Longest untouched`,oldest_lapsed_lease:`Longest since a holder stopped`,scan:`Storage order`},J=[`largest`,`unreferenced`,`stalest`,`oldest_lapsed_lease`,`scan`];function Y(e){return e in q}function X({queueNames:e,selectedQueue:t,onQueueChange:n,sort:r,onSortChange:i}){return(0,U.jsxs)(C,{gap:3,children:[(0,U.jsxs)(T,{size:`sm`,width:`260px`,children:[(0,U.jsx)(E,{"aria-label":`Queue`,value:t??``,onChange:e=>n(e.currentTarget.value),children:e.map(e=>(0,U.jsx)(`option`,{value:e,children:e},e))}),(0,U.jsx)(w,{})]}),(0,U.jsxs)(T,{size:`sm`,width:`280px`,children:[(0,U.jsx)(E,{"aria-label":`Order`,value:r,onChange:e=>{let t=e.currentTarget.value;Y(t)&&i(t)},children:J.map(e=>(0,U.jsx)(`option`,{value:e,children:q[e]},e))}),(0,U.jsx)(w,{})]})]})}function Z({queueNames:e,selectedQueue:t,onQueueChange:n,sort:i,onSortChange:a,canManage:o,onPreviewCleanup:s,onRunCleanup:c,previewLoading:l}){return(0,U.jsxs)(C,{marginBottom:4,gap:3,children:[(0,U.jsx)(X,{queueNames:e,selectedQueue:t,onQueueChange:n,sort:i,onSortChange:a}),(0,U.jsx)(D,{}),o&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(r,{size:`2xs`,variant:`outline`,loading:l,onClick:s,children:`Preview cleanup`}),(0,U.jsx)(r,{size:`2xs`,variant:`outline`,colorPalette:`red`,onClick:c,children:`Run cleanup`})]})]})}function Q({target:e,onClose:t,onConfirm:n,isLoading:r}){return(0,U.jsx)(F,{open:!!e,onClose:t,onConfirm:()=>{e&&n(e)},title:`Delete this payload`,description:`The job that referenced it will finish without running. This cannot be undone, and it will be refused if anything still references it.`,isLoading:r})}var $=`RECLAIM`;function ne({value:e,onChange:t,onClose:n,onConfirm:r,isLoading:i}){let a=e===$;return(0,U.jsx)(F,{open:e!==null,onClose:n,onConfirm:()=>{a&&r()},title:`Run cleanup`,description:`Payloads nothing references will be deleted. Type ${$} to confirm.`,isLoading:i,confirmDisabled:!a,children:(0,U.jsx)(A,{size:`sm`,"aria-label":`Type ${$} to confirm`,placeholder:$,value:e??``,onChange:e=>t(e.currentTarget.value)})})}var re=100;function ie(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(`largest`),i=k.ops.listBlobQueues.useQuery(void 0,{refetchInterval:6e4}),a=e??i.data?.[0]??null,o=k.ops.listBlobs.useInfiniteQuery({queueName:a??``,sort:n,limit:re},{enabled:!!a,refetchInterval:3e4,keepPreviousData:!0,getNextPageParam:e=>e.nextCursor??void 0}),s=o.data?.pages[0];return{queueNames:i.data??[],selectedQueue:a,setQueueName:t,sort:n,setSort:r,blobs:o.data?.pages.flatMap(e=>e.blobs)??[],rankedFromSample:s?.rankedFromSample??!1,sampled:s?.sampled??0,isLoading:o.isInitialLoading||i.isLoading,hasMore:o.hasNextPage??!1,loadMore:()=>void o.fetchNextPage(),isLoadingMore:o.isFetchingNextPage}}function ae({onCleanupSuccess:e,onDeleteSuccess:t}){let n=k.useContext();return{cleanup:k.ops.runBlobCleanup.useMutation({onSuccess:(t,r)=>{l.create({title:t.dryRun?`Preview: ${t.totals.reclaimed} would be deleted`:`Reclaimed ${t.totals.reclaimed}, shortened ${t.totals.repaired}`,type:`success`}),e(r),n.ops.invalidate()},onError:e=>{l.create({title:`Cleanup failed`,description:e.message,type:`error`})}}),deleteBlob:k.ops.deleteBlob.useMutation({onSuccess:(e,r)=>{l.create({title:e.deleted?`Payload deleted`:`Not deleted, something still references it`,type:e.deleted?`success`:`warning`}),t(r),n.ops.invalidate()},onError:e=>{l.create({title:`Delete failed`,description:e.message,type:`error`})}})}}function oe(){let{hasAccess:e}=M(),t=ie(),[n,r]=(0,L.useState)(null),[i,a]=(0,L.useState)(null),{cleanup:s,deleteBlob:c}=ae({onCleanupSuccess:e=>{e.dryRun===!1&&a(null)},onDeleteSuccess:e=>{r(t=>t?.queueName===e.queueName&&t?.projectId===e.projectId&&t?.hash===e.hash?null:t)}});return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(o,{textStyle:`sm`,color:`fg.muted`,marginBottom:4,children:`Stored job payloads, what still references them, and what the next cleanup would do with each. Payload contents are never shown.`}),(0,U.jsx)(Z,{queueNames:t.queueNames,selectedQueue:t.selectedQueue,onQueueChange:t.setQueueName,sort:t.sort,onSortChange:t.setSort,canManage:e,onPreviewCleanup:()=>s.mutate({dryRun:!0}),onRunCleanup:()=>a(``),previewLoading:s.isPending&&s.variables?.dryRun===!0}),t.rankedFromSample&&(0,U.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,marginBottom:3,children:[`Ordered from a sample of `,t.sampled,` payloads, not the whole store. Use storage order to walk everything.`]}),(0,U.jsx)(K,{isLoading:t.isLoading,blobs:t.blobs,canManage:e,onDelete:r,hasMore:t.hasMore,onLoadMore:t.loadMore,isLoadingMore:t.isLoadingMore}),(0,U.jsx)(Q,{target:n,onClose:()=>r(null),onConfirm:e=>c.mutate({queueName:e.queueName,projectId:e.projectId,hash:e.hash,confirm:`DELETE`}),isLoading:c.isPending}),(0,U.jsx)(ne,{value:i,onChange:a,onClose:()=>a(null),onConfirm:()=>s.mutate({dryRun:!1,confirm:`RECLAIM`}),isLoading:s.isPending})]})}function se(){return(0,U.jsx)(I,{children:(0,U.jsxs)(te,{children:[(0,U.jsx)(g.Header,{children:(0,U.jsx)(g.Heading,{children:`Payload store`})}),(0,U.jsx)(g.Container,{children:(0,U.jsx)(oe,{})})]})})}export{se as default};
2
- //# sourceMappingURL=blobs-D-pozzQX.js.map