@langwatch/server 3.8.0 → 3.9.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 (1330) hide show
  1. package/README.md +3 -3
  2. package/feature-map.json +4 -2
  3. package/langevals/evaluators/langevals/langevals_langevals/select_best_compare.py +165 -5
  4. package/langevals/evaluators/langevals/tests/test_select_best_compare.py +471 -9
  5. package/langevals/ts-integration/evaluators.generated.ts +83 -63
  6. package/langwatch/.env.example +7 -0
  7. package/langwatch/biome.jsonc +23 -0
  8. package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-DKvtbwGG.js +2 -0
  9. package/langwatch/dist/client/assets/AddDatasetRecordDrawer-D1vOO9OS.js +6 -0
  10. package/langwatch/dist/client/assets/AddOrEditAnnotationScore-zxFsPi_K.js +2 -0
  11. package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-soYSKpT_.js +2 -0
  12. package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-BHJmgYGv.js +3 -0
  13. package/langwatch/dist/client/assets/AddParticipants-z6X3xaWh.js +2 -0
  14. package/langwatch/dist/client/assets/AgentHistoryDrawer-kb5K4X01.js +2 -0
  15. package/langwatch/dist/client/assets/AgentHttpEditorDrawer-Cf-aA1pn.js +5 -0
  16. package/langwatch/dist/client/assets/AgentListDrawer-z4OL5IVm.js +2 -0
  17. package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-Ky7GOYHj.js +2 -0
  18. package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-CAszeo8y.js +2 -0
  19. package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-DWrxkhIq.js +2 -0
  20. package/langwatch/dist/client/assets/AiGatewayLayout-BqznP5T2.js +2 -0
  21. package/langwatch/dist/client/assets/AnnotationsTable-C9n949u_.js +2 -0
  22. package/langwatch/dist/client/assets/AreaChart-PNFZHqkl.js +2 -0
  23. package/langwatch/dist/client/assets/AuthCard-D14g-b3Y.js +2 -0
  24. package/langwatch/dist/client/assets/AutomationDrawer-Cjo9egay.js +112 -0
  25. package/langwatch/dist/client/assets/BarChart-B23ShI5J.js +4 -0
  26. package/langwatch/dist/client/assets/BatchEvaluationSummary-CmkigWIn.js +2 -0
  27. package/langwatch/dist/client/assets/BudgetEditDrawer-nkQpQiY0.js +2 -0
  28. package/langwatch/dist/client/assets/CartesianChart-Ci1mTvgb.js +54 -0
  29. package/langwatch/dist/client/assets/CascadeArchiveDialog-BPqLe1Ai.js +2 -0
  30. package/langwatch/dist/client/assets/ChartTooltip-BMGa2HEK.js +2 -0
  31. package/langwatch/dist/client/assets/ChatWindow-BBsct-iS.js +5 -0
  32. package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-DOqtlBKU.js +9 -0
  33. package/langwatch/dist/client/assets/CodexCodingDefaultsAsk--UfSQyVR.js +2 -0
  34. package/langwatch/dist/client/assets/ColorfulBlockIcons-zwwbjL9F.js +6 -0
  35. package/langwatch/dist/client/assets/ColumnTypeIcon-CZZ6Esh0.js +2 -0
  36. package/langwatch/dist/client/assets/ComparisonLeaderboardDrawer-ChH7KNaX.js +4 -0
  37. package/langwatch/dist/client/assets/ConfirmDialog-CWzCY4sN.js +2 -0
  38. package/langwatch/dist/client/assets/ContactSalesBlock-B3w2lKdE.js +2 -0
  39. package/langwatch/dist/client/assets/Conversation-BhvQmXJ-.js +2 -0
  40. package/langwatch/dist/client/assets/CopyInput-Qeb_2bgP.js +2 -0
  41. package/langwatch/dist/client/assets/CopyableInputWithPrefix-Bp04WBtM.js +2 -0
  42. package/langwatch/dist/client/assets/CreateProjectDrawer-Dg_yrbka.js +2 -0
  43. package/langwatch/dist/client/assets/CreateTeamDrawer-CLJnKmFE.js +2 -0
  44. package/langwatch/dist/client/assets/CustomGraph-C6j6slUs.js +2 -0
  45. package/langwatch/dist/client/assets/DashboardLayout-Cn5-9Ye2.js +96 -0
  46. package/langwatch/dist/client/assets/DashboardNameDrawer-BvGn3rsq.js +2 -0
  47. package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-Wx7PJ_9S.js +2 -0
  48. package/langwatch/dist/client/assets/DatasetEditorTable-Ca3bmQrl.js +2 -0
  49. package/langwatch/dist/client/assets/DatasetPickerList-RZLjPQ2S.js +2 -0
  50. package/langwatch/dist/client/assets/DatasetPreviewTable-Ck22Wy4h.js +2 -0
  51. package/langwatch/dist/client/assets/DatasetSelector-BxeSHSDD.js +2 -0
  52. package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-ncleLyuX.js +2 -0
  53. package/langwatch/dist/client/assets/DeleteConfirmationDialog-Br5m12kp.js +2 -0
  54. package/langwatch/dist/client/assets/DocsLinks-D-I122gH.js +2 -0
  55. package/langwatch/dist/client/assets/DynamicZodForm-BUbQBluG.js +2 -0
  56. package/langwatch/dist/client/assets/EditAutomationFilterDrawer-Bci7dGy6.js +3 -0
  57. package/langwatch/dist/client/assets/EditModelProviderDrawer-CdUQa5qQ.js +4 -0
  58. package/langwatch/dist/client/assets/EditProjectDrawer-DDMa3VNp.js +2 -0
  59. package/langwatch/dist/client/assets/EmojiPickerModal-BLskXRKS.js +3 -0
  60. package/langwatch/dist/client/assets/EnterpriseLockedSurface-CGy3NpuC.js +2 -0
  61. package/langwatch/dist/client/assets/ErrorBarContext-CUuF6tzC.js +2 -0
  62. package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-Dw6JMkKa.js +107 -0
  63. package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-F1nHh-cP.js +2 -0
  64. package/langwatch/dist/client/assets/EvaluatorEditorDrawer-eotRSQPT.js +2 -0
  65. package/langwatch/dist/client/assets/EvaluatorEditorShared-BLZXXMFD.js +43 -0
  66. package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-Bx_uZmkb.js +2 -0
  67. package/langwatch/dist/client/assets/EvaluatorListDrawer--2JYBA1w.js +2 -0
  68. package/langwatch/dist/client/assets/EvaluatorMappingsSection-DCqvgq8G.js +2 -0
  69. package/langwatch/dist/client/assets/EvaluatorSelection-BTMe6CCC.js +2 -0
  70. package/langwatch/dist/client/assets/EvaluatorSelectionBox-CDxYA37_.js +2 -0
  71. package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-BDgiQ_Gu.js +2 -0
  72. package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-D4HFeq77.js +2 -0
  73. package/langwatch/dist/client/assets/ExecutionState-xp8LG59p.js +2 -0
  74. package/langwatch/dist/client/assets/FeatureFlagsDrawer-DIplgYQy.js +2 -0
  75. package/langwatch/dist/client/assets/FieldInfoTooltip-C_hEtQpK.js +2 -0
  76. package/langwatch/dist/client/assets/FieldsFilters-Ci5mVooQ.js +2 -0
  77. package/langwatch/dist/client/assets/FilterDisplay-BKjP30tt.js +2 -0
  78. package/langwatch/dist/client/assets/FilterSidebar-Cgxbpfi7.js +2 -0
  79. package/langwatch/dist/client/assets/FormatMoney-LZE9c_pf.js +2 -0
  80. package/langwatch/dist/client/assets/FoundryDrawer-DjVyu6Ww.js +2 -0
  81. package/langwatch/dist/client/assets/FullLogo-DRBt8v39.js +2 -0
  82. package/langwatch/dist/client/assets/GovernanceLayout-Baar1Fc8.js +2 -0
  83. package/langwatch/dist/client/assets/GraphsLayout-RNsRoPhs.js +2 -0
  84. package/langwatch/dist/client/assets/GroupBindingInputRow-BxvXd1EU.js +2 -0
  85. package/langwatch/dist/client/assets/GuardrailsDrawer-BtsfIXzD.js +91 -0
  86. package/langwatch/dist/client/assets/History-B3CO9rUC.js +17 -0
  87. package/langwatch/dist/client/assets/HorizontalFormControl-CpxShF8O.js +2 -0
  88. package/langwatch/dist/client/assets/HoverableBigText-BMBnTTnr.js +2 -0
  89. package/langwatch/dist/client/assets/InstallCliCard-DO5HE9Zk.js +2 -0
  90. package/langwatch/dist/client/assets/IntegratePaneShell-Bc7i3AU3.js +8 -0
  91. package/langwatch/dist/client/assets/InviteMemberDrawer-CiQbGDVl.js +2 -0
  92. package/langwatch/dist/client/assets/IsolatedErrorBoundary-QK1gsCee.js +2 -0
  93. package/langwatch/dist/client/assets/LLMModelCostDrawer-K4uPc99h.js +2 -0
  94. package/langwatch/dist/client/assets/LangyContextTarget-Dxr919ue.js +2 -0
  95. package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-CnBBcfON.js +2 -0
  96. package/langwatch/dist/client/assets/Legend-C-o-ebW-.js +6 -0
  97. package/langwatch/dist/client/assets/Line-CbuF_DU9.js +2 -0
  98. package/langwatch/dist/client/assets/LineChart-CjG7MhLF.js +2 -0
  99. package/langwatch/dist/client/assets/ListTable-Dq11zhPy.js +2 -0
  100. package/langwatch/dist/client/assets/LoadingScreen-BRa1kl7f.js +2 -0
  101. package/langwatch/dist/client/assets/Markdown-Cip8Rj5C.js +35 -0
  102. package/langwatch/dist/client/assets/MenuLink-CEEzPpsg.js +2 -0
  103. package/langwatch/dist/client/assets/MessageCard-Nbu21sIo.js +2 -0
  104. package/langwatch/dist/client/assets/MetadataTag-CQmOL4su.js +5 -0
  105. package/langwatch/dist/client/assets/ModelProviderCustomModelInput-s8Z1JIfQ.js +2 -0
  106. package/langwatch/dist/client/assets/ModelProviderScreen-BkZVsCiO.js +2 -0
  107. package/langwatch/dist/client/assets/ModelSelector-BjEx9IlF.js +2 -0
  108. package/langwatch/dist/client/assets/MyLayout-Dr6t6Ogu.js +2 -0
  109. package/langwatch/dist/client/assets/NavigationFooter-GfOzirbT.js +2 -0
  110. package/langwatch/dist/client/assets/NewWorkflowForm-uqnhwRpZ.js +2 -0
  111. package/langwatch/dist/client/assets/NoDataInfoBlock-Busjhz63.js +2 -0
  112. package/langwatch/dist/client/assets/OnboardingContainer-BGhio01s.js +2 -0
  113. package/langwatch/dist/client/assets/OnlineEvaluationDrawer-DyCVUUmz.js +2 -0
  114. package/langwatch/dist/client/assets/OpsPageShell-GqOT9Ezv.js +2 -0
  115. package/langwatch/dist/client/assets/OttlEditor-BYyg1quG.js +3 -0
  116. package/langwatch/dist/client/assets/OverflownText-q6WIx911.js +2 -0
  117. package/langwatch/dist/client/assets/ProjectAvatar-B0tbfKzY.js +43 -0
  118. package/langwatch/dist/client/assets/ProjectLangyLayout-Du3nxtBV.js +82 -0
  119. package/langwatch/dist/client/assets/PromptEditorDrawer-DeL8XgdG.js +2 -0
  120. package/langwatch/dist/client/assets/PromptListDrawer-y4bmNt4t.js +2 -0
  121. package/langwatch/dist/client/assets/PropertySectionTitle-CK55WvKi.js +37 -0
  122. package/langwatch/dist/client/assets/ProviderModelSelector-B-0vpQ2t.js +2 -0
  123. package/langwatch/dist/client/assets/ProviderScopeChips-DN3rtvAE.js +2 -0
  124. package/langwatch/dist/client/assets/PushToCopiesDialog-Ry_M3FuH.js +2 -0
  125. package/langwatch/dist/client/assets/ReferenceDot-DrNtDSrg.js +2 -0
  126. package/langwatch/dist/client/assets/RenderInputOutput-DqsCnspr.js +261 -0
  127. package/langwatch/dist/client/assets/ScatterChart-jarSkvrF.js +2 -0
  128. package/langwatch/dist/client/assets/ScenarioFormDrawer-DvJcYmkQ.js +2 -0
  129. package/langwatch/dist/client/assets/ScenarioInputMappingSection-BewVLFCZ.js +2 -0
  130. package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-BAPna8ym.js +3 -0
  131. package/langwatch/dist/client/assets/ScopeChipPicker-pQ061i-c.js +2 -0
  132. package/langwatch/dist/client/assets/SearchInput-DH_qIhwi.js +2 -0
  133. package/langwatch/dist/client/assets/SectionNavigationLayout-DwPBnqYj.js +2 -0
  134. package/langwatch/dist/client/assets/SelectDatasetDrawer-8MPCEZID.js +2 -0
  135. package/langwatch/dist/client/assets/SelectionActionBar-C2SOsiow.js +2 -0
  136. package/langwatch/dist/client/assets/SeriesFilterDrawer-d5DYEKTZ.js +2 -0
  137. package/langwatch/dist/client/assets/SettingsLayout-ZI47ZjuT.js +2 -0
  138. package/langwatch/dist/client/assets/SetupWithAgentButton-CNTb3Avj.js +4 -0
  139. package/langwatch/dist/client/assets/ShikiCommandBox-u0WEsz_9.js +5 -0
  140. package/langwatch/dist/client/assets/SpanDetails-L_YT0nxH.js +3 -0
  141. package/langwatch/dist/client/assets/SubscriptionPage-CaUbKJjG.js +2 -0
  142. package/langwatch/dist/client/assets/SuiteFormDrawer-BjUQdKq8.js +2 -0
  143. package/langwatch/dist/client/assets/Symbols-R6sphPWl.js +2 -0
  144. package/langwatch/dist/client/assets/TabButton-8Oc9UYh8.js +3 -0
  145. package/langwatch/dist/client/assets/TableCell-Ci8ylzki.js +2 -0
  146. package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-DSKFRtdD.js +2 -0
  147. package/langwatch/dist/client/assets/TeamForm-CL9ycvq0.js +2 -0
  148. package/langwatch/dist/client/assets/TeamUserRoleField-D0ZTlKiH.js +2 -0
  149. package/langwatch/dist/client/assets/TraceDetails-JolY6sXJ.js +9 -0
  150. package/langwatch/dist/client/assets/TraceDetailsDrawer-lgPzHJ3L.js +2 -0
  151. package/langwatch/dist/client/assets/TraceIdPeek-DDi0ChdF.js +2 -0
  152. package/langwatch/dist/client/assets/TracesMapping-BPXT_-h4.js +2 -0
  153. package/langwatch/dist/client/assets/UpgradeModalContent-DmGd0n65.js +2 -0
  154. package/langwatch/dist/client/assets/UploadCSVDrawer-haYFZH65.js +3 -0
  155. package/langwatch/dist/client/assets/VariablesSection-DW_-pHw8.js +2 -0
  156. package/langwatch/dist/client/assets/VersionBadge-BrsZ4NP1.js +2 -0
  157. package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-B9tl6d9Q.js +1161 -0
  158. package/langwatch/dist/client/assets/ViewAutomationDrawer-DliGiKaC.js +2 -0
  159. package/langwatch/dist/client/assets/VirtualKeySecretReveal-B9QMNIxJ.js +54 -0
  160. package/langwatch/dist/client/assets/WelcomeLayout-DZ1ue0he.js +2 -0
  161. package/langwatch/dist/client/assets/WithFeatureFlagGuard-CgkIIt3_.js +2 -0
  162. package/langwatch/dist/client/assets/WithPermissionGuard-Da_hdEdq.js +2 -0
  163. package/langwatch/dist/client/assets/WorkflowCard-C_ClnTV_.js +2 -0
  164. package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-DozYRazW.js +2 -0
  165. package/langwatch/dist/client/assets/_...path_-Da4obdgF.js +2 -0
  166. package/langwatch/dist/client/assets/_Uint8Array-BKsS4AYJ.js +2 -0
  167. package/langwatch/dist/client/assets/__...path__-hjRUlcmj.js +22 -0
  168. package/langwatch/dist/client/assets/_baseAssignValue-B0IP5NGP.js +2 -0
  169. package/langwatch/dist/client/assets/_baseClone-DWP1OuEe.js +2 -0
  170. package/langwatch/dist/client/assets/_baseEach-Bv6waMUN.js +2 -0
  171. package/langwatch/dist/client/assets/_baseFor-K5aTWdeA.js +2 -0
  172. package/langwatch/dist/client/assets/_experiment_-Cv2h4AYK.js +2 -0
  173. package/langwatch/dist/client/assets/_id_-BoubOQoS.js +2 -0
  174. package/langwatch/dist/client/assets/_id_-BuzJEIUf.js +2 -0
  175. package/langwatch/dist/client/assets/_id_-BzLlrR7z.js +2 -0
  176. package/langwatch/dist/client/assets/_id_-DAzjJ7AY.js +2 -0
  177. package/langwatch/dist/client/assets/_id_-Dc2UAWAO.js +2 -0
  178. package/langwatch/dist/client/assets/_id_-DwutdLKk.js +2 -0
  179. package/langwatch/dist/client/assets/_id_-H7-5DI5r.js +2 -0
  180. package/langwatch/dist/client/assets/_project_-DTuunSJZ.js +8 -0
  181. package/langwatch/dist/client/assets/_runId_-BGhwmwQj.js +7 -0
  182. package/langwatch/dist/client/assets/_shell-ChQAHWWX.js +2 -0
  183. package/langwatch/dist/client/assets/_slug_-D6Y2wsW5.js +2 -0
  184. package/langwatch/dist/client/assets/_slug_-DLKkXVG8.js +2 -0
  185. package/langwatch/dist/client/assets/_slug_-yLo6E4BE.js +17 -0
  186. package/langwatch/dist/client/assets/_team_-TUptH6wK.js +2 -0
  187. package/langwatch/dist/client/assets/_workflow_-B_flNNON.js +3 -0
  188. package/langwatch/dist/client/assets/_workflow_-DUyBeEF1.js +25 -0
  189. package/langwatch/dist/client/assets/accept-BtE8pbrP.js +2 -0
  190. package/langwatch/dist/client/assets/activity-BDNvBEBL.js +1 -0
  191. package/langwatch/dist/client/assets/agents-CZnWSlhu.js +2 -0
  192. package/langwatch/dist/client/assets/alerts-BDNvBEBL.js +1 -0
  193. package/langwatch/dist/client/assets/all-in7z_yGY.js +2 -0
  194. package/langwatch/dist/client/assets/analytics-C8m2qboV.js +2 -0
  195. package/langwatch/dist/client/assets/annotation-scores-hmT53w46.js +2 -0
  196. package/langwatch/dist/client/assets/annotations-DwouO48Z.js +2 -0
  197. package/langwatch/dist/client/assets/anomaly-rules-DoJdIoCt.js +2 -0
  198. package/langwatch/dist/client/assets/api-keys-CykxAxvG.js +4 -0
  199. package/langwatch/dist/client/assets/asaplangy-D3J00Q-Z.js +5 -0
  200. package/langwatch/dist/client/assets/audit-log-Dy4vcEeJ.js +2 -0
  201. package/langwatch/dist/client/assets/auth-IqMSC5k1.js +2 -0
  202. package/langwatch/dist/client/assets/authentication-BqVl7Fh-.js +2 -0
  203. package/langwatch/dist/client/assets/authorize-BGMc1Gzv.js +2 -0
  204. package/langwatch/dist/client/assets/authorize-DhHzBVUd.js +2 -0
  205. package/langwatch/dist/client/assets/automations-BDNvBEBL.js +1 -0
  206. package/langwatch/dist/client/assets/automations-BhzNESFp.js +2 -0
  207. package/langwatch/dist/client/assets/billing-plans-D_IT1cHz.js +2 -0
  208. package/langwatch/dist/client/assets/blank-Ct2wtHyX.js +2 -0
  209. package/langwatch/dist/client/assets/blobs-Dwi1OImQ.js +2 -0
  210. package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3-CnAsMlS_.js +133 -0
  211. package/langwatch/dist/client/assets/budgets-Cn5gXQK_.js +3 -0
  212. package/langwatch/dist/client/assets/bug-reports-feRha8NA.js +2 -0
  213. package/langwatch/dist/client/assets/cache-rules-T0g7jfVv.js +2 -0
  214. package/langwatch/dist/client/assets/choose-D7SJAjkq.js +2 -0
  215. package/langwatch/dist/client/assets/chunk-EX3LRPZG-DkekrL-i.js +232 -0
  216. package/langwatch/dist/client/assets/chunk-FWX5IMBZ-2uc49Oqf.js +3 -0
  217. package/langwatch/dist/client/assets/chunk-PUDLZKDR-CdFvlX4m.js +157 -0
  218. package/langwatch/dist/client/assets/chunk-RYQCIY6F-BLUBc3em.js +2 -0
  219. package/langwatch/dist/client/assets/chunk-V7JOEXUC-daLm26hJ.js +207 -0
  220. package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-CDA8LHAw.js +2 -0
  221. package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-CDA8LHAw.js +2 -0
  222. package/langwatch/dist/client/assets/clsx-CjueKrWZ.js +2 -0
  223. package/langwatch/dist/client/assets/codeAgentConfig-BGKq9uCt.js +7 -0
  224. package/langwatch/dist/client/assets/codingDefaultSync-BHSxIX3Y.js +2 -0
  225. package/langwatch/dist/client/assets/configure-CrBmyV7I.js +4 -0
  226. package/langwatch/dist/client/assets/constants-CDt5HyiB.js +2 -0
  227. package/langwatch/dist/client/assets/custom-wRFdLdR4.js +12 -0
  228. package/langwatch/dist/client/assets/custom_evaluator-C4ikBFuX.js +31 -0
  229. package/langwatch/dist/client/assets/dagre-VKFMJZFB-BElJnuGp.js +5 -0
  230. package/langwatch/dist/client/assets/dagre-VMur7wh6.js +2 -0
  231. package/langwatch/dist/client/assets/data-privacy-DAIYO4AS.js +2 -0
  232. package/langwatch/dist/client/assets/data-retention-6spK_HnV.js +2 -0
  233. package/langwatch/dist/client/assets/datasets-_6-oF4ZW.js +2 -0
  234. package/langwatch/dist/client/assets/debounce-CS9Z04io.js +2 -0
  235. package/langwatch/dist/client/assets/defaultModelState-B2tL23ua.js +2 -0
  236. package/langwatch/dist/client/assets/dejaview-Cde-wWV4.js +2 -0
  237. package/langwatch/dist/client/assets/departments-Cm-0ZxEt.js +2 -0
  238. package/langwatch/dist/client/assets/devices-DmiWzGY2.js +2 -0
  239. package/langwatch/dist/client/assets/dist-C4xeXVRv.js +6 -0
  240. package/langwatch/dist/client/assets/drawerFromUrl-CKr5SifD.js +2 -0
  241. package/langwatch/dist/client/assets/edit-CLmkWTOM.js +62 -0
  242. package/langwatch/dist/client/assets/email-suppressions-cqwH0a9N.js +2 -0
  243. package/langwatch/dist/client/assets/erDiagram-Q63AITRT-Byy32QYy.js +86 -0
  244. package/langwatch/dist/client/assets/error-D8QCVS4R.js +2 -0
  245. package/langwatch/dist/client/assets/errors-mlatPkMI.js +2 -0
  246. package/langwatch/dist/client/assets/evaluations-BBoYdpZy.js +2 -0
  247. package/langwatch/dist/client/assets/evaluations-DhzXchFj.js +2 -0
  248. package/langwatch/dist/client/assets/evaluators-BtHslgaT.js +2 -0
  249. package/langwatch/dist/client/assets/evaluators-_EDCn-tQ.js +148 -0
  250. package/langwatch/dist/client/assets/experiments-CffarahA.js +1 -0
  251. package/langwatch/dist/client/assets/feature-flags-mcBTRF0E.js +2 -0
  252. package/langwatch/dist/client/assets/fetchSSE-CnJPAkno.js +3 -0
  253. package/langwatch/dist/client/assets/fieldset-kmG3NTVs.js +2 -0
  254. package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-CY9NG0NN.js +1 -0
  255. package/langwatch/dist/client/assets/forgot-password-wo5Sna-0.js +2 -0
  256. package/langwatch/dist/client/assets/formatMoney-ClmqgvaY.js +2 -0
  257. package/langwatch/dist/client/assets/formatTargetOutput-DXvqMkYJ.js +2 -0
  258. package/langwatch/dist/client/assets/foundry-CfvGgfP0.js +477 -0
  259. package/langwatch/dist/client/assets/gateway-Be0EsD57.js +2 -0
  260. package/langwatch/dist/client/assets/getEvaluator-D2EjIa3G.js +2 -0
  261. package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-D2oUP3Tn.js +2 -0
  262. package/langwatch/dist/client/assets/governance-YZL-Q4Vy.js +2 -0
  263. package/langwatch/dist/client/assets/graphlib-DsLTzvlk.js +2 -0
  264. package/langwatch/dist/client/assets/grid-MxZhegzw.js +2 -0
  265. package/langwatch/dist/client/assets/groups-BmusUt3C.js +2 -0
  266. package/langwatch/dist/client/assets/guardrails-DAx8mDop.js +2 -0
  267. package/langwatch/dist/client/assets/handled-error-DbmvFmFF.js +2 -0
  268. package/langwatch/dist/client/assets/http-C64lOZI7.js +7 -0
  269. package/langwatch/dist/client/assets/identifierUtils-C2FgAR6z.js +2 -0
  270. package/langwatch/dist/client/assets/immer-DImI3Uq2.js +14 -0
  271. package/langwatch/dist/client/assets/index-8SbDirJv.js +68 -0
  272. package/langwatch/dist/client/assets/ingestion-source-detail-PQbeRniA.js +19 -0
  273. package/langwatch/dist/client/assets/ingestion-sources-CCyiAKHP.js +12 -0
  274. package/langwatch/dist/client/assets/integrations-WSl7N8v9.js +2 -0
  275. package/langwatch/dist/client/assets/isArrayLikeObject-DQ6J5Gh8.js +2 -0
  276. package/langwatch/dist/client/assets/isSymbol-DQQCRrSw.js +2 -0
  277. package/langwatch/dist/client/assets/langyHomeSuggestions-czH603Eu.js +2 -0
  278. package/langwatch/dist/client/assets/license-BXfbZQgG.js +2 -0
  279. package/langwatch/dist/client/assets/licenseStatusUtils-CeEgqpQ1.js +2 -0
  280. package/langwatch/dist/client/assets/lu-BSZWBZXU.js +2 -0
  281. package/langwatch/dist/client/assets/map-DUpZ7PrO.js +2 -0
  282. package/langwatch/dist/client/assets/mappingValidation-C7knTdfD.js +2 -0
  283. package/langwatch/dist/client/assets/me-DbCM2fI8.js +7 -0
  284. package/langwatch/dist/client/assets/me-DgXzEkaD.js +2 -0
  285. package/langwatch/dist/client/assets/members-CNILhgB4.js +2 -0
  286. package/langwatch/dist/client/assets/mermaid.core-1LNrQSiZ.js +12 -0
  287. package/langwatch/dist/client/assets/messages-CIoUj-2S.js +2 -0
  288. package/langwatch/dist/client/assets/metrics-Ba4ghWyR.js +2 -0
  289. package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-BsK9qdX4.js +97 -0
  290. package/langwatch/dist/client/assets/model-costs-Cmo-7iNN.js +2 -0
  291. package/langwatch/dist/client/assets/model-providers-DNeQW-T1.js +2 -0
  292. package/langwatch/dist/client/assets/modelProviderHelpers-BgYFTBND.js +2 -0
  293. package/langwatch/dist/client/assets/my-queue-DAyfQ6lp.js +2 -0
  294. package/langwatch/dist/client/assets/normalizeComparison-QGQpERT7.js +2 -0
  295. package/langwatch/dist/client/assets/not-found-BFkr8OS7.js +2 -0
  296. package/langwatch/dist/client/assets/now-BWCCq_PO.js +2 -0
  297. package/langwatch/dist/client/assets/onboarding-DAAoh3gE.js +2 -0
  298. package/langwatch/dist/client/assets/online-evaluations-DbC0C3ct.js +2 -0
  299. package/langwatch/dist/client/assets/ops-BnGgY3gP.js +2 -0
  300. package/langwatch/dist/client/assets/organizations-D-hWxeYL.js +2 -0
  301. package/langwatch/dist/client/assets/pages-BthWVZpr.js +2 -0
  302. package/langwatch/dist/client/assets/persistence-NkzSPIBC.js +2 -0
  303. package/langwatch/dist/client/assets/personalProject-C9vU_vdl.js +2 -0
  304. package/langwatch/dist/client/assets/plans-B_rx4bLE.js +2 -0
  305. package/langwatch/dist/client/assets/preconditionFieldUtils-ryKgG9T1.js +2 -0
  306. package/langwatch/dist/client/assets/product-BuY5Xwg3.js +2 -0
  307. package/langwatch/dist/client/assets/project-C2NjfKL8.js +2 -0
  308. package/langwatch/dist/client/assets/projections-rLpLV9w3.js +2 -0
  309. package/langwatch/dist/client/assets/projects-BF0LrAID.js +2 -0
  310. package/langwatch/dist/client/assets/promptHandle-BT-5THDj.js +2 -0
  311. package/langwatch/dist/client/assets/prompts-BHe5aLJx.js +8 -0
  312. package/langwatch/dist/client/assets/radio-group-BPt-WSZX.js +2 -0
  313. package/langwatch/dist/client/assets/registry-olFQKglt.js +2 -0
  314. package/langwatch/dist/client/assets/reports-BLYN6Q1s.js +2 -0
  315. package/langwatch/dist/client/assets/request-DFzKYavU.js +2 -0
  316. package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-CRtGWC_J.js +85 -0
  317. package/langwatch/dist/client/assets/reset-password-DYZspdMQ.js +2 -0
  318. package/langwatch/dist/client/assets/role-bindings-FmulBsng.js +2 -0
  319. package/langwatch/dist/client/assets/roles-RLhR-aqL.js +2 -0
  320. package/langwatch/dist/client/assets/routing-policies-ljceihkc.js +5 -0
  321. package/langwatch/dist/client/assets/scenarios-BQqYDDZG.js +2 -0
  322. package/langwatch/dist/client/assets/scheduler-BFnKJjAw.js +2 -0
  323. package/langwatch/dist/client/assets/schedules-BDNvBEBL.js +1 -0
  324. package/langwatch/dist/client/assets/scim-Bmka9JwE.js +2 -0
  325. package/langwatch/dist/client/assets/seatTypeCopy-fhsCX-T3.js +2 -0
  326. package/langwatch/dist/client/assets/secrets-Cwr6m0Ec.js +2 -0
  327. package/langwatch/dist/client/assets/segment-group-BktqF-NE.js +2 -0
  328. package/langwatch/dist/client/assets/segmented-control-Dux7mG6V.js +2 -0
  329. package/langwatch/dist/client/assets/select-BvA110t-.js +2 -0
  330. package/langwatch/dist/client/assets/send-KqbwnHm5.js +2 -0
  331. package/langwatch/dist/client/assets/sequenceView-CXTCS8lF.js +5 -0
  332. package/langwatch/dist/client/assets/seriesOptions-B04NlY20.js +1015 -0
  333. package/langwatch/dist/client/assets/settings-U355L_I1.js +2 -0
  334. package/langwatch/dist/client/assets/setup-BlSoABYV.js +2 -0
  335. package/langwatch/dist/client/assets/shikiAdapter-Ctbe7cQu.js +3 -0
  336. package/langwatch/dist/client/assets/showSuiteRunError-D2fez5Ub.js +2 -0
  337. package/langwatch/dist/client/assets/signin-DyT1qLoq.js +2 -0
  338. package/langwatch/dist/client/assets/signup-D8m3PZ3b.js +2 -0
  339. package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-iaTfadDT.js +2 -0
  340. package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-DH-TUWs1.js +2 -0
  341. package/langwatch/dist/client/assets/subscription-_ypR9RT2.js +3 -0
  342. package/langwatch/dist/client/assets/subscriptions-BRPlrnsz.js +2 -0
  343. package/langwatch/dist/client/assets/suggestionUI-BvF9IL3n.js +106 -0
  344. package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-DT3qutmi.js +3 -0
  345. package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-Chcqm6v8.js +9 -0
  346. package/langwatch/dist/client/assets/switch-BZp2DIfW.js +2 -0
  347. package/langwatch/dist/client/assets/switch-C1DNHB2v.js +2 -0
  348. package/langwatch/dist/client/assets/tabs-B6CQXTUQ.js +2 -0
  349. package/langwatch/dist/client/assets/teams-B3Yc0LtS.js +2 -0
  350. package/langwatch/dist/client/assets/teams-Df3DGQGZ.js +2 -0
  351. package/langwatch/dist/client/assets/tool-catalog-CpVqJ_Dp.js +7 -0
  352. package/langwatch/dist/client/assets/toolIcons-CwYXl2Eu.js +2 -0
  353. package/langwatch/dist/client/assets/tooltip-CM-lMDNU.js +2 -0
  354. package/langwatch/dist/client/assets/topic-clustering-DEtDEXOU.js +2 -0
  355. package/langwatch/dist/client/assets/topics-BGSBPvH8.js +2 -0
  356. package/langwatch/dist/client/assets/traceStore-C-SeEWpA.js +55 -0
  357. package/langwatch/dist/client/assets/traces-hMC5nfWE.js +289 -0
  358. package/langwatch/dist/client/assets/tracesMapping-CJhNJ9Ej.js +3 -0
  359. package/langwatch/dist/client/assets/tracking-in5OR8uP.js +2 -0
  360. package/langwatch/dist/client/assets/types-DNh2n8ZE.js +2 -0
  361. package/langwatch/dist/client/assets/types-OZJZgbcd.js +2 -0
  362. package/langwatch/dist/client/assets/types-nw9Z9F-v.js +2 -0
  363. package/langwatch/dist/client/assets/undo-2-CYjzz3Fj.js +2 -0
  364. package/langwatch/dist/client/assets/usage-BMXYHJUH.js +2 -0
  365. package/langwatch/dist/client/assets/usage-Da6wBDdP.js +2 -0
  366. package/langwatch/dist/client/assets/use-generic-onboarding-flow-eie3NRF5.js +2 -0
  367. package/langwatch/dist/client/assets/useActivePlan-Dsa3BYxd.js +2 -0
  368. package/langwatch/dist/client/assets/useAllPromptsForProject-BS-h_uSZ.js +2 -0
  369. package/langwatch/dist/client/assets/useAnnotationQueues-BMo2kZ_n.js +2 -0
  370. package/langwatch/dist/client/assets/useAvailableEvaluators-DkZ2Yt1F.js +2 -0
  371. package/langwatch/dist/client/assets/useCyclingVerb-BTWaxKR2.js +2 -0
  372. package/langwatch/dist/client/assets/useDepartmentColumn-xoZ52lPP.js +2 -0
  373. package/langwatch/dist/client/assets/useEvaluationsV3Store-CjI63SqB.js +2 -0
  374. package/langwatch/dist/client/assets/useExportTraces-kA2TFkjy.js +2 -0
  375. package/langwatch/dist/client/assets/useFeatureFlag-BjAcqOFH.js +2 -0
  376. package/langwatch/dist/client/assets/usePersonalContext-BGjy_Vrg.js +2 -0
  377. package/langwatch/dist/client/assets/useProjectSpanNames-DV-N8Iqc.js +2 -0
  378. package/langwatch/dist/client/assets/useProjectsForCopy-C63wLMNr.js +2 -0
  379. package/langwatch/dist/client/assets/useRunViaApiTabs-DMsq4RV1.js +50 -0
  380. package/langwatch/dist/client/assets/useShowLangy-C1pPUZqz.js +2 -0
  381. package/langwatch/dist/client/assets/useSimulationUpdateListener-ufWGuGhO.js +2 -0
  382. package/langwatch/dist/client/assets/useTargetName-DRCsNovZ.js +2 -0
  383. package/langwatch/dist/client/assets/useTargetNameMap-2sQCSyzN.js +2 -0
  384. package/langwatch/dist/client/assets/useTraceDetailsDrawer-CWSKPTh_.js +2 -0
  385. package/langwatch/dist/client/assets/useTraceUpdateListener-DqLF7KuU.js +2 -0
  386. package/langwatch/dist/client/assets/useUrlScopeFilter-BmRsU3rU.js +2 -0
  387. package/langwatch/dist/client/assets/useVariantMetrics-CK9aOmIb.js +2 -0
  388. package/langwatch/dist/client/assets/useWorkflowStore-CWWkoMW1.js +8 -0
  389. package/langwatch/dist/client/assets/users-B9jauEWz.js +2 -0
  390. package/langwatch/dist/client/assets/users-C8IaWy9-.js +2 -0
  391. package/langwatch/dist/client/assets/users-DIbzKO8Q.js +2 -0
  392. package/langwatch/dist/client/assets/v3-C9Ud_O3k.js +2 -0
  393. package/langwatch/dist/client/assets/variables-Dox25KUK.js +396 -0
  394. package/langwatch/dist/client/assets/viewStore-BCIvcW8n.js +2 -0
  395. package/langwatch/dist/client/assets/virtual-keys-D-qkAFBv.js +2 -0
  396. package/langwatch/dist/client/assets/welcome-CnjW7kg3.js +16 -0
  397. package/langwatch/dist/client/assets/wizard-CUCaNag_.js +2 -0
  398. package/langwatch/dist/client/assets/workbench-N1DutXtL.js +2 -0
  399. package/langwatch/dist/client/assets/workflows-D2XRYWpS.js +3 -0
  400. package/langwatch/dist/client/assets/wrap-D_XqGHIU.js +2 -0
  401. package/langwatch/dist/client/index.html +4 -4
  402. package/langwatch/dist/scenario-child-process.js +7 -0
  403. package/langwatch/e2e/auth-regression/better-auth-sso-smoketest.ts +72 -0
  404. package/langwatch/ee/LICENSE.md +52 -18
  405. package/langwatch/ee/README.md +15 -6
  406. package/langwatch/ee/admin/routes/__tests__/admin.integration.test.ts +1 -1
  407. package/langwatch/ee/admin/routes/admin.ts +1 -1
  408. package/langwatch/ee/audit-log/auditLog.ts +51 -0
  409. package/langwatch/ee/billing/__tests__/planLimits.unit.test.ts +6 -6
  410. package/langwatch/ee/billing/__tests__/planProvider.unit.test.ts +21 -33
  411. package/langwatch/ee/billing/__tests__/subscription.service.unit.test.ts +1 -0
  412. package/langwatch/ee/billing/__tests__/usage-limit.service.unit.test.ts +17 -17
  413. package/langwatch/ee/billing/planLimits.ts +1 -37
  414. package/langwatch/ee/billing/planProvider.ts +0 -13
  415. package/langwatch/ee/governance/reactors/__tests__/gatewayBudgetSync.reactor.unit.test.ts +39 -0
  416. package/langwatch/ee/governance/reactors/__tests__/governanceKpisSync.reactor.unit.test.ts +33 -0
  417. package/langwatch/ee/governance/reactors/__tests__/governanceOcsfEventsSync.reactor.unit.test.ts +33 -0
  418. package/langwatch/ee/governance/reactors/__tests__/governanceReactorsPreEnqueueGate.unit.test.ts +243 -0
  419. package/langwatch/ee/governance/reactors/gatewayBudgetSync.reactor.ts +391 -185
  420. package/langwatch/ee/governance/reactors/governanceKpisSync.reactor.ts +14 -7
  421. package/langwatch/ee/governance/reactors/governanceOcsfEventsSync.reactor.ts +97 -81
  422. package/langwatch/ee/governance/services/governanceAttributeKeys.ts +17 -0
  423. package/langwatch/ee/licensing/__tests__/constants.unit.test.ts +4 -6
  424. package/langwatch/ee/licensing/__tests__/defaults.unit.test.ts +63 -86
  425. package/langwatch/ee/licensing/__tests__/fixtures/testLicenses.ts +18 -0
  426. package/langwatch/ee/licensing/__tests__/licenseGenerationService.unit.test.ts +52 -16
  427. package/langwatch/ee/licensing/__tests__/licenseHandler.integration.test.ts +199 -15
  428. package/langwatch/ee/licensing/__tests__/mintedPlan.unit.test.ts +110 -0
  429. package/langwatch/ee/licensing/__tests__/planMapping.unit.test.ts +4 -29
  430. package/langwatch/ee/licensing/__tests__/planTemplates.unit.test.ts +0 -61
  431. package/langwatch/ee/licensing/__tests__/validation.unit.test.ts +69 -0
  432. package/langwatch/ee/licensing/constants.ts +11 -59
  433. package/langwatch/ee/licensing/defaults.ts +20 -32
  434. package/langwatch/ee/licensing/licenseGenerationService.ts +6 -19
  435. package/langwatch/ee/licensing/licenseHandler.ts +109 -92
  436. package/langwatch/ee/licensing/mintedPlan.ts +57 -0
  437. package/langwatch/ee/licensing/ossBaselineFloor.ts +45 -0
  438. package/langwatch/ee/licensing/planInfo.ts +0 -13
  439. package/langwatch/ee/licensing/planMapping.ts +0 -13
  440. package/langwatch/ee/licensing/planTemplates.ts +8 -42
  441. package/langwatch/ee/licensing/types.ts +24 -29
  442. package/langwatch/ee/licensing/validation.ts +13 -1
  443. package/langwatch/ee/scim/__tests__/scim-token.service.unit.test.ts +110 -0
  444. package/langwatch/ee/scim/__tests__/scim.costCenter.integration.test.ts +171 -0
  445. package/langwatch/ee/scim/__tests__/scim.service.unit.test.ts +415 -0
  446. package/langwatch/ee/scim/routes.ts +585 -0
  447. package/langwatch/ee/scim/scim-group.service.ts +465 -0
  448. package/langwatch/ee/scim/scim-role-resolver.ts +48 -0
  449. package/langwatch/ee/scim/scim-role-resolver.unit.test.ts +93 -0
  450. package/langwatch/ee/scim/scim-token.service.ts +71 -0
  451. package/langwatch/ee/scim/scim.service.ts +554 -0
  452. package/langwatch/ee/scim/scim.types.ts +149 -0
  453. package/langwatch/ee/scim/webhooks.ts +170 -0
  454. package/langwatch/ee/sso/__tests__/fallbackName.test.ts +142 -0
  455. package/langwatch/ee/sso/__tests__/matching.test.ts +126 -0
  456. package/langwatch/ee/sso/__tests__/parseIssuerUrl.test.ts +59 -0
  457. package/langwatch/ee/sso/__tests__/sso-gate.test.ts +459 -0
  458. package/langwatch/ee/sso/__tests__/sso-license.repository.test.ts +53 -0
  459. package/langwatch/ee/sso/__tests__/ssoPathGate.test.ts +182 -0
  460. package/langwatch/ee/sso/__tests__/ssoRouteTableCanary.test.ts +186 -0
  461. package/langwatch/ee/sso/matching.ts +48 -0
  462. package/langwatch/ee/sso/providers.ts +271 -0
  463. package/langwatch/ee/sso/sso-gate.ts +294 -0
  464. package/langwatch/ee/sso/sso-license.repository.ts +47 -0
  465. package/langwatch/ee/sso/ssoPathGate.ts +127 -0
  466. package/langwatch/package.json +1 -1
  467. package/langwatch/prisma/migrations/20260802120000_organization_user_disabled_at/migration.sql +7 -0
  468. package/langwatch/prisma/schema.prisma +8 -0
  469. package/langwatch/scripts/check-feature-parity.ts +0 -4
  470. package/langwatch/src/__tests__/noBinarySourceFiles.unit.test.ts +56 -0
  471. package/langwatch/src/app/api/agents/[[...route]]/app.ts +0 -2
  472. package/langwatch/src/app/api/agents/__tests__/agents-rest-api.integration.test.ts +0 -22
  473. package/langwatch/src/app/api/dashboards/[[...route]]/app.ts +0 -2
  474. package/langwatch/src/app/api/dashboards/__tests__/dashboard-rest-api.integration.test.ts +0 -18
  475. package/langwatch/src/app/api/dataset/[[...route]]/app.ts +0 -33
  476. package/langwatch/src/app/api/dataset/__tests__/dataset-rest-api.integration.test.ts +0 -24
  477. package/langwatch/src/app/api/dataset/__tests__/dataset-upload-api.integration.test.ts +0 -25
  478. package/langwatch/src/app/api/evaluators/[[...route]]/app.v1.ts +0 -2
  479. package/langwatch/src/app/api/export/scenario-runs/[[...route]]/app.ts +250 -0
  480. package/langwatch/src/app/api/export/scenario-runs/__tests__/scenario-run-export-route.integration.test.ts +336 -0
  481. package/langwatch/src/app/api/graphs/[[...route]]/app.ts +0 -2
  482. package/langwatch/src/app/api/middleware/__tests__/error-handler.unit.test.ts +4 -4
  483. package/langwatch/src/app/api/middleware/index.ts +0 -1
  484. package/langwatch/src/app/api/monitors/[[...route]]/app.ts +0 -2
  485. package/langwatch/src/app/api/projects/[[...route]]/app.ts +28 -8
  486. package/langwatch/src/app/api/prompts/[[...route]]/app.v1.ts +0 -2
  487. package/langwatch/src/app/api/scenario-events/[[...route]]/app.ts +0 -5
  488. package/langwatch/src/app/api/scenarios/[[...route]]/app.v1.ts +0 -2
  489. package/langwatch/src/app/api/shared/errors.ts +14 -0
  490. package/langwatch/src/app/api/simulation-runs/__tests__/simulation-run-platform-url.integration.test.ts +6 -3
  491. package/langwatch/src/app/api/suites/[[...route]]/app.ts +0 -2
  492. package/langwatch/src/app/api/teams/[[...route]]/app.ts +22 -1
  493. package/langwatch/src/app/api/teams/__tests__/teams-rest-api.integration.test.ts +146 -0
  494. package/langwatch/src/app/api/traces/[[...route]]/app.v1.ts +114 -0
  495. package/langwatch/src/app/api/triggers/[[...route]]/app.ts +0 -2
  496. package/langwatch/src/components/AddMembersForm.tsx +25 -5
  497. package/langwatch/src/components/AddOrEditDatasetDrawer.tsx +1 -9
  498. package/langwatch/src/components/ComparisonLeaderboardDrawer.tsx +496 -0
  499. package/langwatch/src/components/LicenseStatus.tsx +14 -16
  500. package/langwatch/src/components/__tests__/ComparisonLeaderboardDrawer.gate.integration.test.tsx +146 -0
  501. package/langwatch/src/components/__tests__/LicenseStatus.integration.test.tsx +129 -0
  502. package/langwatch/src/components/__tests__/UpgradeModal.integration.test.tsx +358 -68
  503. package/langwatch/src/components/agents/AgentCodeEditorDrawer.tsx +7 -14
  504. package/langwatch/src/components/agents/AgentHttpEditorDrawer.tsx +7 -14
  505. package/langwatch/src/components/agents/WorkflowSelectorDrawer.tsx +1 -15
  506. package/langwatch/src/components/analytics/DashboardNameDrawer.tsx +20 -26
  507. package/langwatch/src/components/auth/AuthCard.tsx +41 -0
  508. package/langwatch/src/components/batch-evaluation-results/BatchEvaluationResults.tsx +72 -0
  509. package/langwatch/src/components/batch-evaluation-results/BatchEvaluationResultsTable.tsx +109 -2
  510. package/langwatch/src/components/batch-evaluation-results/ComparisonCharts.tsx +241 -77
  511. package/langwatch/src/components/batch-evaluation-results/ComparisonLeaderboardChart.tsx +355 -0
  512. package/langwatch/src/components/batch-evaluation-results/ComparisonTable.tsx +437 -75
  513. package/langwatch/src/components/batch-evaluation-results/LeaderboardStep.tsx +105 -0
  514. package/langwatch/src/components/batch-evaluation-results/LeaderboardTrustPanel.tsx +464 -0
  515. package/langwatch/src/components/batch-evaluation-results/LeaderboardVerdictPanel.tsx +354 -0
  516. package/langwatch/src/components/batch-evaluation-results/PairwiseLeaderboard.tsx +553 -0
  517. package/langwatch/src/components/batch-evaluation-results/ParetoScatterChart.tsx +512 -0
  518. package/langwatch/src/components/batch-evaluation-results/TradeoffSummaryLine.tsx +58 -0
  519. package/langwatch/src/components/batch-evaluation-results/WinRateChart.tsx +12 -4
  520. package/langwatch/src/components/batch-evaluation-results/__tests__/ComparisonCharts.filter-overflow.integration.test.tsx +8 -1
  521. package/langwatch/src/components/batch-evaluation-results/__tests__/ComparisonCharts.leaderboard-gate.integration.test.tsx +192 -0
  522. package/langwatch/src/components/batch-evaluation-results/__tests__/ComparisonCharts.test.tsx +8 -1
  523. package/langwatch/src/components/batch-evaluation-results/__tests__/ComparisonTable.group-by-metadata.integration.test.tsx +352 -0
  524. package/langwatch/src/components/batch-evaluation-results/__tests__/bootstrapMeanCI.unit.test.ts +98 -0
  525. package/langwatch/src/components/batch-evaluation-results/__tests__/buildAxisLabels.unit.test.ts +134 -0
  526. package/langwatch/src/components/batch-evaluation-results/__tests__/buildPairwiseComparisons.test.ts +95 -0
  527. package/langwatch/src/components/batch-evaluation-results/__tests__/buildTrustChecks.unit.test.ts +551 -0
  528. package/langwatch/src/components/batch-evaluation-results/__tests__/computeBTLeaderboard.test.ts +428 -0
  529. package/langwatch/src/components/batch-evaluation-results/__tests__/computeBandClipping.unit.test.ts +125 -0
  530. package/langwatch/src/components/batch-evaluation-results/__tests__/computeComparability.unit.test.ts +208 -0
  531. package/langwatch/src/components/batch-evaluation-results/__tests__/computeJudgeBiasChecks.unit.test.ts +186 -0
  532. package/langwatch/src/components/batch-evaluation-results/__tests__/computeLeaderboardVerdict.test.ts +288 -0
  533. package/langwatch/src/components/batch-evaluation-results/__tests__/computeParetoDominance.unit.test.ts +599 -0
  534. package/langwatch/src/components/batch-evaluation-results/__tests__/computeSampleAdequacy.unit.test.ts +212 -0
  535. package/langwatch/src/components/batch-evaluation-results/__tests__/computeScoreBarScale.unit.test.ts +104 -0
  536. package/langwatch/src/components/batch-evaluation-results/__tests__/computeVariantMetrics.test.ts +99 -0
  537. package/langwatch/src/components/batch-evaluation-results/__tests__/detectComparisonColumns.test.ts +133 -0
  538. package/langwatch/src/components/batch-evaluation-results/__tests__/formatLeaderboardHeadline.unit.test.ts +252 -0
  539. package/langwatch/src/components/batch-evaluation-results/__tests__/formatTradeoffSummary.unit.test.ts +219 -0
  540. package/langwatch/src/components/batch-evaluation-results/__tests__/leaderboardCache.unit.test.ts +128 -0
  541. package/langwatch/src/components/batch-evaluation-results/__tests__/panelAgreement.unit.test.ts +165 -0
  542. package/langwatch/src/components/batch-evaluation-results/__tests__/paretoScatterPoints.unit.test.ts +95 -0
  543. package/langwatch/src/components/batch-evaluation-results/__tests__/scoreSeparation.unit.test.ts +314 -0
  544. package/langwatch/src/components/batch-evaluation-results/__tests__/variantMetricsSymmetry.unit.test.ts +129 -0
  545. package/langwatch/src/components/batch-evaluation-results/__tests__/verdictSafety.unit.test.ts +438 -0
  546. package/langwatch/src/components/batch-evaluation-results/__tests__/winMatrixHasPairwiseDetail.unit.test.ts +126 -0
  547. package/langwatch/src/components/batch-evaluation-results/bootstrapMeanCI.ts +78 -0
  548. package/langwatch/src/components/batch-evaluation-results/buildPairwiseComparisons.ts +30 -0
  549. package/langwatch/src/components/batch-evaluation-results/chartAxisLabels.ts +98 -0
  550. package/langwatch/src/components/batch-evaluation-results/computeBTLeaderboard.ts +814 -0
  551. package/langwatch/src/components/batch-evaluation-results/computeComparability.ts +305 -0
  552. package/langwatch/src/components/batch-evaluation-results/computeJudgeBiasChecks.ts +175 -0
  553. package/langwatch/src/components/batch-evaluation-results/computeLeaderboardVerdict.ts +277 -0
  554. package/langwatch/src/components/batch-evaluation-results/computeParetoDominance.ts +283 -0
  555. package/langwatch/src/components/batch-evaluation-results/computeSampleAdequacy.ts +91 -0
  556. package/langwatch/src/components/batch-evaluation-results/computeVariantMetrics.ts +236 -0
  557. package/langwatch/src/components/batch-evaluation-results/computeWinMatrixShape.ts +61 -0
  558. package/langwatch/src/components/batch-evaluation-results/formatLeaderboardHeadline.ts +139 -0
  559. package/langwatch/src/components/batch-evaluation-results/formatTradeoffSummary.ts +126 -0
  560. package/langwatch/src/components/batch-evaluation-results/mulberry32.ts +19 -0
  561. package/langwatch/src/components/batch-evaluation-results/scoreSeparation.ts +102 -0
  562. package/langwatch/src/components/batch-evaluation-results/types.ts +82 -9
  563. package/langwatch/src/components/batch-evaluation-results/useBTLeaderboard.ts +137 -0
  564. package/langwatch/src/components/batch-evaluation-results/usePairwiseSort.ts +78 -0
  565. package/langwatch/src/components/batch-evaluation-results/useResultsGrouping.ts +119 -0
  566. package/langwatch/src/components/batch-evaluation-results/useShowComparisonLeaderboard.ts +43 -0
  567. package/langwatch/src/components/batch-evaluation-results/useVariantMetrics.ts +106 -0
  568. package/langwatch/src/components/checks/DynamicZodForm.tsx +9 -0
  569. package/langwatch/src/components/drawerRegistry.ts +5 -0
  570. package/langwatch/src/components/evaluations/OnlineEvaluationDrawer.tsx +13 -20
  571. package/langwatch/src/components/evaluators/EvaluatorEditorShared.tsx +16 -20
  572. package/langwatch/src/components/evaluators/WorkflowSelectorForEvaluatorDrawer.tsx +1 -15
  573. package/langwatch/src/components/experiments/CreateExperimentButton.tsx +13 -17
  574. package/langwatch/src/components/license/LicenseDetailsCard.tsx +72 -23
  575. package/langwatch/src/components/license/LicenseGeneratorForm.tsx +0 -60
  576. package/langwatch/src/components/license/LicenseLoadError.tsx +23 -0
  577. package/langwatch/src/components/license/OverSeatsCallout.tsx +68 -0
  578. package/langwatch/src/components/license/ResourceLimitsDisplay.tsx +0 -74
  579. package/langwatch/src/components/license/__tests__/OverSeatsCallout.integration.test.tsx +56 -0
  580. package/langwatch/src/components/license/__tests__/ResourceLimitsDisplay.unit.test.ts +8 -135
  581. package/langwatch/src/components/license/__tests__/licenseStatusUtils.unit.test.ts +68 -13
  582. package/langwatch/src/components/license/__tests__/planFormDefaults.unit.test.ts +11 -11
  583. package/langwatch/src/components/license/__tests__/useLicenseActions.integration.test.ts +185 -0
  584. package/langwatch/src/components/license/licenseStatusUtils.ts +21 -17
  585. package/langwatch/src/components/license/planFormDefaults.ts +3 -18
  586. package/langwatch/src/components/license/useLicenseActions.ts +26 -3
  587. package/langwatch/src/components/me/PersonalRecentTracesTable.tsx +4 -0
  588. package/langwatch/src/components/ops/projections/BulkReplayWizard.tsx +23 -1
  589. package/langwatch/src/components/plans/PlansComparisonPage.tsx +18 -0
  590. package/langwatch/src/components/plans/__tests__/PlansComparisonPage.integration.test.tsx +17 -0
  591. package/langwatch/src/components/plans/__tests__/planCurrentResolver.unit.test.ts +19 -0
  592. package/langwatch/src/components/plans/planCurrentResolver.ts +13 -0
  593. package/langwatch/src/components/projects/CreateProjectDrawer.tsx +36 -40
  594. package/langwatch/src/components/prompts/PromptEditorDrawer.tsx +9 -15
  595. package/langwatch/src/components/prompts/__tests__/PromptEditorDrawer.test.tsx +0 -1
  596. package/langwatch/src/components/scenarios/ScenarioCreateModal.tsx +3 -5
  597. package/langwatch/src/components/scenarios/ScenarioFormDrawer.tsx +2 -32
  598. package/langwatch/src/components/settings/CreateTeamDrawer.tsx +31 -35
  599. package/langwatch/src/components/settings/EnterpriseCapabilitiesSection.tsx +236 -0
  600. package/langwatch/src/components/settings/InfoWithoutSelecting.tsx +25 -0
  601. package/langwatch/src/components/settings/OrganizationUserRoleField.tsx +21 -2
  602. package/langwatch/src/components/settings/__tests__/EnterpriseCapabilitiesSection.integration.test.tsx +173 -0
  603. package/langwatch/src/components/settings/__tests__/seatTypeCopy.unit.test.ts +94 -0
  604. package/langwatch/src/components/settings/__tests__/seatTypeExplanation.integration.test.tsx +126 -0
  605. package/langwatch/src/components/settings/seatTypeCopy.ts +29 -0
  606. package/langwatch/src/components/subscription/SubscriptionPage.tsx +0 -1
  607. package/langwatch/src/components/subscription/__tests__/subscription-test-setup.ts +0 -13
  608. package/langwatch/src/components/subscription/billing-plans.ts +3 -12
  609. package/langwatch/src/components/suites/RunHistoryFilters.tsx +55 -3
  610. package/langwatch/src/components/suites/RunHistoryPanel.tsx +44 -0
  611. package/langwatch/src/components/suites/ScenarioRunExportDialog.tsx +92 -0
  612. package/langwatch/src/components/suites/SuiteFormDrawer.tsx +4 -20
  613. package/langwatch/src/components/suites/__tests__/AllRunsPanel.integration.test.tsx +3 -0
  614. package/langwatch/src/components/suites/__tests__/RunHistoryEmptyState.integration.test.tsx +45 -0
  615. package/langwatch/src/components/suites/__tests__/RunHistoryLiveWindow.integration.test.tsx +135 -0
  616. package/langwatch/src/components/suites/__tests__/ScenarioRunExportUi.integration.test.tsx +227 -0
  617. package/langwatch/src/components/suites/__tests__/SuiteDetailPanel.integration.test.tsx +3 -0
  618. package/langwatch/src/components/suites/run-history-transforms.ts +1 -28
  619. package/langwatch/src/components/suites/useExportScenarioRuns.ts +333 -0
  620. package/langwatch/src/components/suites/useRunHistoryPagination.ts +14 -0
  621. package/langwatch/src/components/upgrade-modal/LimitContent.tsx +3 -154
  622. package/langwatch/src/env-create.mjs +4 -0
  623. package/langwatch/src/features/errors/logic/codes.ts +2 -1
  624. package/langwatch/src/features/errors/logic/presentation.ts +8 -3
  625. package/langwatch/src/features/langy/__tests__/presentLangyToolError.unit.test.ts +1 -1
  626. package/langwatch/src/features/langy/logic/langyToolFailure.ts +4 -7
  627. package/langwatch/src/features/traces-v2/components/TraceDrawer/conversationView/TurnSteps.tsx +1 -1
  628. package/langwatch/src/features/traces-v2/components/TraceDrawer/drawerHeader/DrawerHeader.tsx +34 -0
  629. package/langwatch/src/features/traces-v2/components/TraceDrawer/drawerHeader/__tests__/utils.unit.test.ts +74 -0
  630. package/langwatch/src/features/traces-v2/components/TraceDrawer/terminalView/TerminalView.tsx +57 -3
  631. package/langwatch/src/features/traces-v2/components/TraceDrawer/terminalView/__tests__/TerminalView.integration.test.tsx +43 -3
  632. package/langwatch/src/features/traces-v2/components/TraceTable/columns.ts +7 -0
  633. package/langwatch/src/features/traces-v2/components/TraceTable/registry/cells/trace/ContextSizeCell.tsx +48 -0
  634. package/langwatch/src/features/traces-v2/components/TraceTable/registry/cells/trace/__tests__/ContextSizeCell.integration.test.tsx +57 -0
  635. package/langwatch/src/features/traces-v2/components/TraceTable/registry/cells/trace/index.ts +2 -0
  636. package/langwatch/src/features/traces-v2/components/shared/TokenBreakdownTooltip.tsx +22 -0
  637. package/langwatch/src/features/traces-v2/lens/capabilities.ts +2 -0
  638. package/langwatch/src/features/traces-v2/types/trace.ts +2 -0
  639. package/langwatch/src/hooks/__tests__/useLicenseEnforcement.unit.test.tsx +18 -30
  640. package/langwatch/src/hooks/__tests__/useOrganizationTeamProject.personal-workspace.integration.test.tsx +30 -0
  641. package/langwatch/src/hooks/__tests__/usePostHogIdentify.unit.test.ts +3 -3
  642. package/langwatch/src/hooks/useMemberDisableAction.ts +53 -0
  643. package/langwatch/src/hooks/useOrganizationTeamProject.ts +8 -7
  644. package/langwatch/src/optimization_studio/components/Evaluate.tsx +39 -46
  645. package/langwatch/src/optimization_studio/components/workflow/NewWorkflowForm.tsx +22 -30
  646. package/langwatch/src/pages/[project]/analytics/custom/index.tsx +1 -6
  647. package/langwatch/src/pages/api/experiment/__tests__/init.unit.test.ts +2 -87
  648. package/langwatch/src/pages/api/experiment/init.ts +7 -60
  649. package/langwatch/src/pages/auth/__tests__/forgot-password.integration.test.tsx +38 -3
  650. package/langwatch/src/pages/auth/forgot-password.tsx +19 -23
  651. package/langwatch/src/pages/auth/reset-password.tsx +2 -23
  652. package/langwatch/src/pages/settings/__tests__/authentication.integration.test.tsx +7 -0
  653. package/langwatch/src/pages/settings/__tests__/team-settings.refused-save.integration.test.tsx +253 -0
  654. package/langwatch/src/pages/settings/authentication.tsx +7 -2
  655. package/langwatch/src/pages/settings/license.tsx +4 -3
  656. package/langwatch/src/pages/settings/members.tsx +126 -34
  657. package/langwatch/src/pages/settings/teams/[team].tsx +73 -20
  658. package/langwatch/src/pages/settings/usage.tsx +7 -8
  659. package/langwatch/src/prompts/prompt-playground/components/sidebar/AddPromptButton.tsx +3 -8
  660. package/langwatch/src/server/api/routers/__tests__/annotation.tenant-references.unit.test.ts +1 -1
  661. package/langwatch/src/server/api/routers/__tests__/apiKey.myBindings.unit.test.ts +1 -1
  662. package/langwatch/src/server/api/routers/__tests__/apiKey.nameById.unit.test.ts +1 -1
  663. package/langwatch/src/server/api/routers/__tests__/apiKey.restricted-permissions.unit.test.ts +4 -1
  664. package/langwatch/src/server/api/routers/__tests__/automations.router.integration.test.ts +1 -1
  665. package/langwatch/src/server/api/routers/__tests__/bugReports.gating.unit.test.ts +1 -1
  666. package/langwatch/src/server/api/routers/__tests__/enterprise-guards.integration.test.ts +0 -4
  667. package/langwatch/src/server/api/routers/__tests__/evaluators.tenant-workflow.unit.test.ts +1 -1
  668. package/langwatch/src/server/api/routers/__tests__/graphs.tenant-dashboard.unit.test.ts +1 -1
  669. package/langwatch/src/server/api/routers/__tests__/langy.turnErrors.unit.test.ts +1 -1
  670. package/langwatch/src/server/api/routers/__tests__/langyGithub.access-order.unit.test.ts +1 -1
  671. package/langwatch/src/server/api/routers/__tests__/license.integration.test.ts +1 -17
  672. package/langwatch/src/server/api/routers/__tests__/licenseEnforcement.reportLimitBlocked.unit.test.ts +1 -1
  673. package/langwatch/src/server/api/routers/__tests__/monitors.copy.integration.test.ts +1 -11
  674. package/langwatch/src/server/api/routers/__tests__/organization.acceptInvite.unit.test.ts +1 -1
  675. package/langwatch/src/server/api/routers/__tests__/organization.setMemberDisabled.integration.test.ts +306 -0
  676. package/langwatch/src/server/api/routers/__tests__/personal-workspace-invariants.integration.test.ts +794 -0
  677. package/langwatch/src/server/api/routers/__tests__/plan.getActivePlan.integration.test.ts +0 -1
  678. package/langwatch/src/server/api/routers/__tests__/project.getHasFirstMessage.unit.test.ts +1 -1
  679. package/langwatch/src/server/api/routers/__tests__/project.regenerateApiKey.unit.test.ts +2 -2
  680. package/langwatch/src/server/api/routers/__tests__/prompts.copy.integration.test.ts +0 -58
  681. package/langwatch/src/server/api/routers/__tests__/prompts.duplicate.integration.test.ts +0 -54
  682. package/langwatch/src/server/api/routers/__tests__/publicEnv.test.ts +60 -0
  683. package/langwatch/src/server/api/routers/__tests__/secrets.reserved-names.unit.test.ts +1 -1
  684. package/langwatch/src/server/api/routers/__tests__/team.update.multi-binding.unit.test.ts +1 -1
  685. package/langwatch/src/server/api/routers/__tests__/traces.4991-full-resolution.unit.test.ts +1 -1
  686. package/langwatch/src/server/api/routers/__tests__/tracesV2.transcript-read.unit.test.ts +121 -0
  687. package/langwatch/src/server/api/routers/__tests__/translate.unit.test.ts +1 -1
  688. package/langwatch/src/server/api/routers/__tests__/user.changePassword.unit.test.ts +105 -0
  689. package/langwatch/src/server/api/routers/__tests__/user.deactivation.unit.test.ts +1 -1
  690. package/langwatch/src/server/api/routers/__tests__/user.register.unit.test.ts +67 -5
  691. package/langwatch/src/server/api/routers/__tests__/workflows.generateCommitMessage.unit.test.ts +1 -1
  692. package/langwatch/src/server/api/routers/agents.ts +0 -6
  693. package/langwatch/src/server/api/routers/analytics/__tests__/dataForFilter.unit.test.ts +1 -1
  694. package/langwatch/src/server/api/routers/apiKey.ts +1 -1
  695. package/langwatch/src/server/api/routers/automations.ts +0 -4
  696. package/langwatch/src/server/api/routers/bugReports.ts +1 -1
  697. package/langwatch/src/server/api/routers/copyEvaluatorToProject.ts +2 -5
  698. package/langwatch/src/server/api/routers/dashboards.ts +0 -2
  699. package/langwatch/src/server/api/routers/dataset.ts +0 -9
  700. package/langwatch/src/server/api/routers/emailSuppression.ts +1 -1
  701. package/langwatch/src/server/api/routers/evaluators.ts +0 -4
  702. package/langwatch/src/server/api/routers/experiments.ts +0 -14
  703. package/langwatch/src/server/api/routers/export.ts +65 -24
  704. package/langwatch/src/server/api/routers/graphs.ts +0 -2
  705. package/langwatch/src/server/api/routers/group.ts +6 -0
  706. package/langwatch/src/server/api/routers/langyEgress.ts +1 -1
  707. package/langwatch/src/server/api/routers/langyGithub.ts +1 -1
  708. package/langwatch/src/server/api/routers/license.ts +44 -36
  709. package/langwatch/src/server/api/routers/licenseEnforcement.ts +0 -21
  710. package/langwatch/src/server/api/routers/modelProviders.ts +1 -1
  711. package/langwatch/src/server/api/routers/monitors.ts +0 -6
  712. package/langwatch/src/server/api/routers/onboarding/__tests__/onboarding.personal-workspace.integration.test.ts +8 -15
  713. package/langwatch/src/server/api/routers/onboarding/onboarding.router.unit.test.ts +1 -1
  714. package/langwatch/src/server/api/routers/onboarding/setProductInterest.integration.test.ts +1 -1
  715. package/langwatch/src/server/api/routers/ops.ts +2 -0
  716. package/langwatch/src/server/api/routers/organization.ts +67 -1
  717. package/langwatch/src/server/api/routers/project.ts +74 -36
  718. package/langwatch/src/server/api/routers/prompts/prompts.trpc-router.ts +0 -10
  719. package/langwatch/src/server/api/routers/publicEnv.ts +7 -3
  720. package/langwatch/src/server/api/routers/scenarios/__tests__/simulation-runner.router.unit.test.ts +1 -1
  721. package/langwatch/src/server/api/routers/scenarios/scenario-crud.router.ts +0 -4
  722. package/langwatch/src/server/api/routers/scimToken.ts +1 -1
  723. package/langwatch/src/server/api/routers/suites/suite.router.ts +0 -3
  724. package/langwatch/src/server/api/routers/team.ts +48 -39
  725. package/langwatch/src/server/api/routers/tracesV2.schemas.ts +2 -0
  726. package/langwatch/src/server/api/routers/tracesV2.ts +76 -20
  727. package/langwatch/src/server/api/routers/user.ts +16 -6
  728. package/langwatch/src/server/api/routers/workflows.ts +0 -7
  729. package/langwatch/src/server/api/trpc.ts +1 -1
  730. package/langwatch/src/server/api-key/__tests__/api-key.service.legacy-ceiling.unit.test.ts +379 -0
  731. package/langwatch/src/server/api-key/__tests__/api-key.service.safety.unit.test.ts +3 -0
  732. package/langwatch/src/server/api-key/__tests__/api-key.service.unit.test.ts +3 -0
  733. package/langwatch/src/server/api-key/api-key.service.ts +63 -22
  734. package/langwatch/src/server/api-router.ts +5 -3
  735. package/langwatch/src/server/app-layer/__tests__/tracing.unit.test.ts +142 -0
  736. package/langwatch/src/server/app-layer/clients/clickhouse/__tests__/cold-scan-detector.coverage.unit.test.ts +2 -0
  737. package/langwatch/src/server/app-layer/clients/clickhouse/windowed-read.ts +15 -0
  738. package/langwatch/src/server/app-layer/dependencies.ts +8 -0
  739. package/langwatch/src/server/app-layer/evaluations/repositories/__tests__/evaluation-run.resolver-window.unit.test.ts +103 -0
  740. package/langwatch/src/server/app-layer/evaluations/repositories/evaluation-run.clickhouse.repository.ts +35 -1
  741. package/langwatch/src/server/app-layer/groups/group.service.ts +37 -0
  742. package/langwatch/src/server/app-layer/groups/repositories/group.prisma.repository.ts +9 -0
  743. package/langwatch/src/server/app-layer/groups/repositories/group.repository.ts +8 -0
  744. package/langwatch/src/server/app-layer/langy/__tests__/langyConversationMemory.unit.test.ts +1 -1
  745. package/langwatch/src/server/app-layer/langy/__tests__/langyTurnContext.unit.test.ts +0 -0
  746. package/langwatch/src/server/app-layer/langy/langyConversationMemory.ts +1 -1
  747. package/langwatch/src/server/app-layer/logs/repositories/__tests__/canonical-log-record.clickhouse.repository.unit.test.ts +54 -0
  748. package/langwatch/src/server/app-layer/logs/repositories/canonical-log-record.clickhouse.repository.ts +29 -12
  749. package/langwatch/src/server/app-layer/ops/__tests__/integration/pending-counter-reconcile.integration.test.ts +240 -0
  750. package/langwatch/src/server/app-layer/ops/__tests__/integration/replay-full-rebuild.integration.test.ts +390 -0
  751. package/langwatch/src/server/app-layer/ops/__tests__/replay.service.unit.test.ts +105 -1
  752. package/langwatch/src/server/app-layer/ops/replay.service.ts +47 -0
  753. package/langwatch/src/server/app-layer/ops/repositories/__tests__/queue.redis.repository.reconcile-pending.unit.test.ts +752 -0
  754. package/langwatch/src/server/app-layer/ops/repositories/queue.redis.repository.ts +597 -48
  755. package/langwatch/src/server/app-layer/organizations/__tests__/organization.service.unit.test.ts +1 -0
  756. package/langwatch/src/server/app-layer/organizations/organization.service.ts +16 -0
  757. package/langwatch/src/server/app-layer/organizations/repositories/organization.prisma.repository.ts +63 -2
  758. package/langwatch/src/server/app-layer/organizations/repositories/organization.repository.ts +15 -0
  759. package/langwatch/src/server/app-layer/presets.ts +27 -13
  760. package/langwatch/src/server/app-layer/projects/__tests__/project-service-update.unit.test.ts +100 -0
  761. package/langwatch/src/server/app-layer/projects/project.service.ts +145 -6
  762. package/langwatch/src/server/app-layer/projects/repositories/project.prisma.repository.ts +2 -16
  763. package/langwatch/src/server/app-layer/projects/repositories/project.repository.ts +2 -13
  764. package/langwatch/src/server/app-layer/simulations/__tests__/scenario-run-export-sweep.integration.test.ts +370 -0
  765. package/langwatch/src/server/app-layer/simulations/repositories/simulation.clickhouse.repository.ts +302 -7
  766. package/langwatch/src/server/app-layer/simulations/repositories/simulation.repository.ts +62 -0
  767. package/langwatch/src/server/app-layer/subscription/__tests__/composite-plan-provider.unit.test.ts +2 -28
  768. package/langwatch/src/server/app-layer/subscription/__tests__/self-hosted-plan-provider.unit.test.ts +101 -0
  769. package/langwatch/src/server/app-layer/subscription/self-hosted-plan-provider.ts +34 -0
  770. package/langwatch/src/server/app-layer/teams/team.service.ts +27 -0
  771. package/langwatch/src/server/app-layer/traces/__tests__/claude-code-span-enrichment.unit.test.ts +179 -0
  772. package/langwatch/src/server/app-layer/traces/__tests__/coding-agent-span-filter.unit.test.ts +50 -0
  773. package/langwatch/src/server/app-layer/traces/__tests__/coding-agent-transcript.derivation.unit.test.ts +331 -0
  774. package/langwatch/src/server/app-layer/traces/__tests__/trace-io-extraction.service.unit.test.ts +20 -0
  775. package/langwatch/src/server/app-layer/traces/canonicalisation/__tests__/structuredIO.test.ts +22 -1
  776. package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/__tests__/claudeCode.unit.test.ts +217 -0
  777. package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/__tests__/codex.unit.test.ts +133 -0
  778. package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/__tests__/vercel.unit.test.ts +79 -0
  779. package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/_constants.ts +9 -0
  780. package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/claudeCode.ts +429 -6
  781. package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/codex.ts +158 -70
  782. package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/vercel.ts +26 -8
  783. package/langwatch/src/server/app-layer/traces/claude-code-span-enrichment.ts +89 -1
  784. package/langwatch/src/server/app-layer/traces/coding-agent-span-filter.ts +23 -1
  785. package/langwatch/src/server/app-layer/traces/coding-agent-transcript.derivation.ts +330 -75
  786. package/langwatch/src/server/app-layer/traces/repositories/__tests__/span-storage.resolver-window.unit.test.ts +108 -0
  787. package/langwatch/src/server/app-layer/traces/repositories/__tests__/trace-list.clickhouse.repository.integration.test.ts +31 -2
  788. package/langwatch/src/server/app-layer/traces/repositories/span-storage.clickhouse.repository.ts +36 -1
  789. package/langwatch/src/server/app-layer/traces/repositories/trace-list.clickhouse.repository.ts +7 -0
  790. package/langwatch/src/server/app-layer/traces/trace-io-extraction.service.ts +8 -1
  791. package/langwatch/src/server/app-layer/traces/trace-list.service.ts +10 -0
  792. package/langwatch/src/server/app-layer/tracing.ts +47 -0
  793. package/langwatch/src/server/app-layer/usage/usage.service.ts +0 -80
  794. package/langwatch/src/server/better-auth/__tests__/hooks.test.ts +72 -0
  795. package/langwatch/src/server/better-auth/__tests__/index.test.ts +31 -9
  796. package/langwatch/src/server/better-auth/__tests__/resetRecoversOauthUser.test.ts +128 -0
  797. package/langwatch/src/server/better-auth/__tests__/ssoGate.hook.test.ts +321 -0
  798. package/langwatch/src/server/better-auth/hooks.ts +46 -1
  799. package/langwatch/src/server/better-auth/index.ts +123 -284
  800. package/langwatch/src/server/clickhouse/__tests__/replicatedEngineGuard.unit.test.ts +301 -0
  801. package/langwatch/src/server/clickhouse/goose.ts +8 -0
  802. package/langwatch/src/server/clickhouse/migrations/00064_replicate_gateway_budget_scope_totals.sql +291 -0
  803. package/langwatch/src/server/clickhouse/migrations/00065_replicate_trace_analytics_rollup.sql +143 -0
  804. package/langwatch/src/server/clickhouse/migrations/00066_replicate_evaluation_analytics_rollup.sql +115 -0
  805. package/langwatch/src/server/datasets/__tests__/dataset-chunking.unit.test.ts +0 -0
  806. package/langwatch/src/server/evaluations/evaluators.generated.ts +83 -63
  807. package/langwatch/src/server/event-sourcing/pipeline/__tests__/staticBuilder.validations.unit.test.ts +46 -0
  808. package/langwatch/src/server/event-sourcing/pipeline/processManagerDefinition.ts +14 -0
  809. package/langwatch/src/server/event-sourcing/pipeline/staticBuilder.ts +8 -0
  810. package/langwatch/src/server/event-sourcing/pipelines/automations/subscribers/__tests__/graphTriggerActivity.groupKey.unit.test.ts +55 -0
  811. package/langwatch/src/server/event-sourcing/pipelines/automations/subscribers/graphTriggerActivity.subscriber.ts +23 -0
  812. package/langwatch/src/server/event-sourcing/pipelines/blob-maintenance/process-manager/blobCleanup.process.ts +6 -4
  813. package/langwatch/src/server/event-sourcing/pipelines/coding-agent-processing/schemas/constants.ts +6 -4
  814. package/langwatch/src/server/event-sourcing/pipelines/evaluation-processing/pipeline.ts +9 -1
  815. package/langwatch/src/server/event-sourcing/pipelines/log-processing/__tests__/logCommandCoalescing.unit.test.ts +174 -0
  816. package/langwatch/src/server/event-sourcing/pipelines/log-processing/pipeline.ts +7 -0
  817. package/langwatch/src/server/event-sourcing/pipelines/log-processing/schemas/constants.ts +19 -0
  818. package/langwatch/src/server/event-sourcing/pipelines/metric-processing/__tests__/metricCommandCoalescing.unit.test.ts +137 -0
  819. package/langwatch/src/server/event-sourcing/pipelines/metric-processing/pipeline.ts +7 -0
  820. package/langwatch/src/server/event-sourcing/pipelines/metric-processing/schemas/constants.ts +19 -0
  821. package/langwatch/src/server/event-sourcing/pipelines/trace-processing/__tests__/aiSdkStructuredOutput.integration.test.ts +199 -0
  822. package/langwatch/src/server/event-sourcing/pipelines/trace-processing/pipeline.ts +9 -1
  823. package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/__tests__/spanStorageGroupKey.unit.test.ts +98 -0
  824. package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/__tests__/traceSummaryClaudeCodeLift.unit.test.ts +187 -1
  825. package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/spanStorage.mapProjection.ts +10 -1
  826. package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/spanStorageGroupKey.ts +63 -0
  827. package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/traceSummary.foldProjection.ts +85 -18
  828. package/langwatch/src/server/event-sourcing/pipelines/trace-processing/reactors/__tests__/projectMetadata.groupKey.unit.test.ts +140 -0
  829. package/langwatch/src/server/event-sourcing/pipelines/trace-processing/reactors/projectMetadata.reactor.ts +23 -0
  830. package/langwatch/src/server/event-sourcing/projections/__tests__/projectionRouter.mapReactorCollapse.unit.test.ts +260 -0
  831. package/langwatch/src/server/event-sourcing/projections/foldProjection.types.ts +6 -3
  832. package/langwatch/src/server/event-sourcing/projections/global/__tests__/billingMeterDispatch.groupKey.unit.test.ts +139 -0
  833. package/langwatch/src/server/event-sourcing/projections/global/billingMeterDispatch.reactor.ts +27 -1
  834. package/langwatch/src/server/event-sourcing/projections/projectionRouter.ts +58 -41
  835. package/langwatch/src/server/event-sourcing/queues/groupQueue/__tests__/blobSweeper.integration.test.ts +149 -0
  836. package/langwatch/src/server/event-sourcing/queues/groupQueue/__tests__/groupQueue.decodeDrop.integration.test.ts +12 -1
  837. package/langwatch/src/server/event-sourcing/queues/groupQueue/__tests__/groupQueue.integration.test.ts +45 -0
  838. package/langwatch/src/server/event-sourcing/queues/groupQueue/blobSweeper.ts +130 -22
  839. package/langwatch/src/server/event-sourcing/queues/groupQueue/scripts.ts +46 -0
  840. package/langwatch/src/server/event-sourcing/replay/__tests__/traceAnalyticsRollupReplay.integration.test.ts +356 -0
  841. package/langwatch/src/server/event-sourcing/replay/replayService.ts +7 -0
  842. package/langwatch/src/server/event-sourcing/services/queues/__tests__/queueManager.commandGroupKey.test.ts +114 -2
  843. package/langwatch/src/server/event-sourcing/services/queues/queueManager.ts +13 -9
  844. package/langwatch/src/server/experiments-v3/execution/__tests__/buildTargetMetadata.unit.test.ts +93 -0
  845. package/langwatch/src/server/experiments-v3/execution/__tests__/orchestratorStorageDispatch.unit.test.ts +57 -0
  846. package/langwatch/src/server/experiments-v3/execution/__tests__/resultMapper.test.ts +180 -13
  847. package/langwatch/src/server/experiments-v3/execution/orchestrator.ts +40 -8
  848. package/langwatch/src/server/experiments-v3/execution/resultMapper.ts +81 -22
  849. package/langwatch/src/server/experiments-v3/execution/types.ts +8 -0
  850. package/langwatch/src/server/export/scenario-runs/__tests__/csv-serializer.unit.test.ts +732 -0
  851. package/langwatch/src/server/export/scenario-runs/__tests__/scenario-run-export.service.unit.test.ts +303 -0
  852. package/langwatch/src/server/export/scenario-runs/csv-serializer.ts +383 -0
  853. package/langwatch/src/server/export/scenario-runs/errors.ts +44 -0
  854. package/langwatch/src/server/export/scenario-runs/scenario-run-export.service.ts +200 -0
  855. package/langwatch/src/server/export/scenario-runs/types.ts +64 -0
  856. package/langwatch/src/server/featureFlag/frontendFeatureFlags.ts +4 -0
  857. package/langwatch/src/server/featureFlag/registry.ts +7 -0
  858. package/langwatch/src/server/gateway/virtualKey.service.ts +2 -2
  859. package/langwatch/src/server/license-enforcement/__tests__/constants.unit.test.ts +2 -10
  860. package/langwatch/src/server/license-enforcement/__tests__/license-enforcement.repository.integration.test.ts +17 -194
  861. package/langwatch/src/server/license-enforcement/__tests__/license-enforcement.repository.unit.test.ts +3 -301
  862. package/langwatch/src/server/license-enforcement/__tests__/license-enforcement.service.unit.test.ts +51 -137
  863. package/langwatch/src/server/license-enforcement/__tests__/license-limit-guard.unit.test.ts +46 -13
  864. package/langwatch/src/server/license-enforcement/__tests__/usage-stats.service.unit.test.ts +1 -3
  865. package/langwatch/src/server/license-enforcement/constants.ts +0 -26
  866. package/langwatch/src/server/license-enforcement/index.ts +0 -5
  867. package/langwatch/src/server/license-enforcement/license-enforcement.repository.ts +4 -227
  868. package/langwatch/src/server/license-enforcement/license-enforcement.service.ts +0 -52
  869. package/langwatch/src/server/license-enforcement/types.ts +8 -17
  870. package/langwatch/src/server/license-enforcement/usage-stats.service.ts +0 -32
  871. package/langwatch/src/server/modelProviders/__tests__/governanceSignup.providerScope.integration.test.ts +1 -1
  872. package/langwatch/src/server/rbac/__tests__/apiKeyCeilingStaleness.unit.test.ts +5 -0
  873. package/langwatch/src/server/rbac/__tests__/role-binding-resolver.ceiling.unit.test.ts +108 -3
  874. package/langwatch/src/server/rbac/role-binding-resolver.ts +147 -1
  875. package/langwatch/src/server/role/__tests__/role-service-rolebinding.unit.test.ts +2 -0
  876. package/langwatch/src/server/role/role.service.ts +15 -1
  877. package/langwatch/src/server/role-bindings/__tests__/role-binding.service.tenant.unit.test.ts +2 -0
  878. package/langwatch/src/server/role-bindings/personal-team-scope.ts +105 -0
  879. package/langwatch/src/server/role-bindings/role-binding.service.ts +10 -2
  880. package/langwatch/src/server/routes/__tests__/github-langy-install.integration.test.ts +1 -1
  881. package/langwatch/src/server/routes/auth.ts +6 -1
  882. package/langwatch/src/server/routes/github-langy.ts +1 -1
  883. package/langwatch/src/server/scenarios/__tests__/scenario-archive.integration.test.ts +11 -15
  884. package/langwatch/src/server/scenarios/scenario-run-category.ts +48 -0
  885. package/langwatch/src/server/stored-objects/__tests__/coerce-content-to-array.unit.test.ts +0 -0
  886. package/langwatch/src/server/stored-objects/__tests__/scenario-events-ingest.integration.test.ts +2 -6
  887. package/langwatch/src/server/teams/team.service.ts +14 -1
  888. package/langwatch/src/server/tracer/types.ts +3 -0
  889. package/langwatch/src/server/traces/__tests__/trace-service-claude-enrichment.unit.test.ts +85 -0
  890. package/langwatch/src/server/traces/mappers/__tests__/trace-summary.mapper.test.ts +106 -0
  891. package/langwatch/src/server/traces/mappers/trace-summary.mapper.ts +59 -0
  892. package/langwatch/src/server/traces/projection/catalog.ts +3 -0
  893. package/langwatch/src/server/traces/trace.service.ts +21 -1
  894. package/langwatch/src/server/workers/__tests__/livenessThread.unit.test.ts +133 -0
  895. package/langwatch/src/server/workers/startWorkers.ts +250 -29
  896. package/langwatch/src/utils/__tests__/api.unit.test.ts +15 -15
  897. package/langwatch/src/utils/constants.ts +1 -0
  898. package/langwatch/src/utils/lambdaFetch.ts +0 -0
  899. package/langwatch/test-setup.ts +9 -0
  900. package/mcp-server/dist/chunk-FMQIE5DL.js +2328 -0
  901. package/mcp-server/dist/create-mcp-server.js +1 -1
  902. package/mcp-server/dist/discover-evaluator-schema-HYPFWGNN.js +2191 -0
  903. package/mcp-server/dist/http-server-UBX7YFXE.js +24466 -0
  904. package/mcp-server/dist/index.js +49 -33
  905. package/package.json +1 -1
  906. package/packages/server/dist/cli.cjs +1 -1
  907. package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-BeOD83jA.js +0 -2
  908. package/langwatch/dist/client/assets/AddDatasetRecordDrawer-jHTYLVuB.js +0 -6
  909. package/langwatch/dist/client/assets/AddOrEditAnnotationScore-DW5VXwj8.js +0 -2
  910. package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-6ycw-4n0.js +0 -2
  911. package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-DKQT3n1Q.js +0 -3
  912. package/langwatch/dist/client/assets/AddParticipants-7HKlJHjI.js +0 -2
  913. package/langwatch/dist/client/assets/AgentHistoryDrawer-B1kjJyfj.js +0 -2
  914. package/langwatch/dist/client/assets/AgentHttpEditorDrawer-Dkex2eS8.js +0 -5
  915. package/langwatch/dist/client/assets/AgentListDrawer-B-ab-fJ_.js +0 -2
  916. package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-CBUwY7Q0.js +0 -2
  917. package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-DZr-iX29.js +0 -2
  918. package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-C1AYXbvP.js +0 -2
  919. package/langwatch/dist/client/assets/AiGatewayLayout-BFUOyL-l.js +0 -2
  920. package/langwatch/dist/client/assets/AnnotationsTable-CnwGxhJg.js +0 -2
  921. package/langwatch/dist/client/assets/AreaChart-BZjKjRMD.js +0 -2
  922. package/langwatch/dist/client/assets/AutomationDrawer-BTtX7UXo.js +0 -112
  923. package/langwatch/dist/client/assets/BatchEvaluationSummary-CFBL50E9.js +0 -2
  924. package/langwatch/dist/client/assets/BudgetEditDrawer-DhNs7V2e.js +0 -2
  925. package/langwatch/dist/client/assets/CartesianChart-CgGSWzzH.js +0 -54
  926. package/langwatch/dist/client/assets/CascadeArchiveDialog-BOcl2osO.js +0 -2
  927. package/langwatch/dist/client/assets/ChartTooltip-BKs8as3o.js +0 -4
  928. package/langwatch/dist/client/assets/ChatWindow-B-UHoZDM.js +0 -5
  929. package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-jdmrD4H5.js +0 -9
  930. package/langwatch/dist/client/assets/CodexCodingDefaultsAsk-CKLyE8Ty.js +0 -2
  931. package/langwatch/dist/client/assets/ColorfulBlockIcons-Ctm_Gy50.js +0 -6
  932. package/langwatch/dist/client/assets/ColumnTypeIcon-Bh1MI0_N.js +0 -2
  933. package/langwatch/dist/client/assets/ConfirmDialog-CbyD4lof.js +0 -2
  934. package/langwatch/dist/client/assets/ContactSalesBlock-3LFiXNMY.js +0 -2
  935. package/langwatch/dist/client/assets/Conversation-C27uRW0p.js +0 -2
  936. package/langwatch/dist/client/assets/CopyInput-BJ8UDgiW.js +0 -2
  937. package/langwatch/dist/client/assets/CopyableInputWithPrefix-DhfQEE7R.js +0 -2
  938. package/langwatch/dist/client/assets/CreateProjectDrawer-f6ESIihF.js +0 -2
  939. package/langwatch/dist/client/assets/CreateTeamDrawer-CsScDzr3.js +0 -2
  940. package/langwatch/dist/client/assets/CustomGraph-DOp8hQmM.js +0 -2
  941. package/langwatch/dist/client/assets/DashboardLayout-BhHe0vIT.js +0 -96
  942. package/langwatch/dist/client/assets/DashboardNameDrawer-WriiQpWZ.js +0 -2
  943. package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-BWcEQSs7.js +0 -2
  944. package/langwatch/dist/client/assets/DatasetEditorTable-BLbB_Sn-.js +0 -2
  945. package/langwatch/dist/client/assets/DatasetPickerList-CDIBTAQW.js +0 -2
  946. package/langwatch/dist/client/assets/DatasetPreviewTable-UuBrd6hv.js +0 -2
  947. package/langwatch/dist/client/assets/DatasetSelector-DJI4ZOko.js +0 -2
  948. package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-DfGbPivl.js +0 -2
  949. package/langwatch/dist/client/assets/DeleteConfirmationDialog-w7WZ7lHP.js +0 -2
  950. package/langwatch/dist/client/assets/DocsLinks-vsvIA7dY.js +0 -2
  951. package/langwatch/dist/client/assets/DynamicZodForm-lW0sHL84.js +0 -2
  952. package/langwatch/dist/client/assets/EditAutomationFilterDrawer-UZGlf7Jf.js +0 -3
  953. package/langwatch/dist/client/assets/EditModelProviderDrawer-FxE8Cjfj.js +0 -4
  954. package/langwatch/dist/client/assets/EditProjectDrawer-DvGgMwQg.js +0 -2
  955. package/langwatch/dist/client/assets/EmojiPickerModal-DOTbYgFl.js +0 -3
  956. package/langwatch/dist/client/assets/EnterpriseLockedSurface-CM8Sj7hf.js +0 -2
  957. package/langwatch/dist/client/assets/ErrorBarContext-Bpz3-JDH.js +0 -2
  958. package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-Bnv6z6m_.js +0 -107
  959. package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-DPt4B9Ey.js +0 -2
  960. package/langwatch/dist/client/assets/EvaluatorEditorDrawer-C1OQ89no.js +0 -2
  961. package/langwatch/dist/client/assets/EvaluatorEditorShared-Dlnmyfw9.js +0 -43
  962. package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-BFqreRNY.js +0 -2
  963. package/langwatch/dist/client/assets/EvaluatorListDrawer-B5GkvEER.js +0 -2
  964. package/langwatch/dist/client/assets/EvaluatorMappingsSection-uZ95zEz_.js +0 -2
  965. package/langwatch/dist/client/assets/EvaluatorSelection-CLClnlPT.js +0 -2
  966. package/langwatch/dist/client/assets/EvaluatorSelectionBox-VWh5DBap.js +0 -2
  967. package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-BTrBItgE.js +0 -2
  968. package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-0T-zwQQZ.js +0 -2
  969. package/langwatch/dist/client/assets/ExecutionState-BPNxLkdI.js +0 -2
  970. package/langwatch/dist/client/assets/FeatureFlagsDrawer-CpSauosT.js +0 -2
  971. package/langwatch/dist/client/assets/FieldInfoTooltip-BlO6fteF.js +0 -2
  972. package/langwatch/dist/client/assets/FieldsFilters-B46wbf2n.js +0 -2
  973. package/langwatch/dist/client/assets/FilterDisplay-BzhnJIar.js +0 -2
  974. package/langwatch/dist/client/assets/FilterSidebar-CbZF27X2.js +0 -2
  975. package/langwatch/dist/client/assets/FormatMoney-vCZvmGG1.js +0 -2
  976. package/langwatch/dist/client/assets/FoundryDrawer-DskBXiS5.js +0 -2
  977. package/langwatch/dist/client/assets/FullLogo-Db9M_uOO.js +0 -2
  978. package/langwatch/dist/client/assets/GovernanceLayout-DiDbO74a.js +0 -2
  979. package/langwatch/dist/client/assets/GraphsLayout-BCvqg3RK.js +0 -2
  980. package/langwatch/dist/client/assets/GroupBindingInputRow-DQP7aETW.js +0 -2
  981. package/langwatch/dist/client/assets/GuardrailsDrawer-CHV6LBxp.js +0 -91
  982. package/langwatch/dist/client/assets/History-hXXVv0A2.js +0 -17
  983. package/langwatch/dist/client/assets/HorizontalFormControl-lYiaIlzD.js +0 -2
  984. package/langwatch/dist/client/assets/HoverableBigText-CIhevUVt.js +0 -2
  985. package/langwatch/dist/client/assets/InstallCliCard-CJKSPLJ_.js +0 -2
  986. package/langwatch/dist/client/assets/IntegratePaneShell-BpcA5j4P.js +0 -8
  987. package/langwatch/dist/client/assets/InviteMemberDrawer-DiuPqGoS.js +0 -2
  988. package/langwatch/dist/client/assets/IsolatedErrorBoundary-CZ4MnYEN.js +0 -2
  989. package/langwatch/dist/client/assets/LLMModelCostDrawer-D1G0lU1N.js +0 -2
  990. package/langwatch/dist/client/assets/LangyContextTarget-CIlp_Zew.js +0 -2
  991. package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-Cd0jbm0t.js +0 -2
  992. package/langwatch/dist/client/assets/Legend-DY68SncN.js +0 -6
  993. package/langwatch/dist/client/assets/Line-B2wakHWw.js +0 -2
  994. package/langwatch/dist/client/assets/LineChart-Bb84FSVR.js +0 -2
  995. package/langwatch/dist/client/assets/ListTable-8idtTXBY.js +0 -2
  996. package/langwatch/dist/client/assets/LoadingScreen-DQ62wqSN.js +0 -2
  997. package/langwatch/dist/client/assets/Markdown-C9extmbX.js +0 -35
  998. package/langwatch/dist/client/assets/MenuLink-CVzOs3K8.js +0 -2
  999. package/langwatch/dist/client/assets/MessageCard--GCYkR2M.js +0 -2
  1000. package/langwatch/dist/client/assets/MetadataTag-CSCPlbDN.js +0 -5
  1001. package/langwatch/dist/client/assets/ModelProviderCustomModelInput-DUwvNeux.js +0 -2
  1002. package/langwatch/dist/client/assets/ModelProviderScreen-BVBKstQm.js +0 -2
  1003. package/langwatch/dist/client/assets/ModelSelector-4R-dc-Ny.js +0 -2
  1004. package/langwatch/dist/client/assets/MyLayout-DCMYTSgX.js +0 -2
  1005. package/langwatch/dist/client/assets/NavigationFooter-1VNOUoV6.js +0 -2
  1006. package/langwatch/dist/client/assets/NewWorkflowForm-CsYSc1Vr.js +0 -2
  1007. package/langwatch/dist/client/assets/NoDataInfoBlock-C8x5bzL0.js +0 -2
  1008. package/langwatch/dist/client/assets/OnboardingContainer-e4kVlnyx.js +0 -2
  1009. package/langwatch/dist/client/assets/OnlineEvaluationDrawer-D2jYsSON.js +0 -2
  1010. package/langwatch/dist/client/assets/OpsPageShell-Ch1rtwuD.js +0 -2
  1011. package/langwatch/dist/client/assets/OttlEditor-baChQv3o.js +0 -3
  1012. package/langwatch/dist/client/assets/OverflownText-CY4Y__oL.js +0 -2
  1013. package/langwatch/dist/client/assets/ProjectAvatar-DtI9dT1f.js +0 -43
  1014. package/langwatch/dist/client/assets/ProjectLangyLayout-Cl7GB9zi.js +0 -82
  1015. package/langwatch/dist/client/assets/PromptEditorDrawer-BLIu4fKV.js +0 -2
  1016. package/langwatch/dist/client/assets/PromptListDrawer-BHC9jUMJ.js +0 -2
  1017. package/langwatch/dist/client/assets/PropertySectionTitle-Da2IdhM3.js +0 -37
  1018. package/langwatch/dist/client/assets/ProviderModelSelector-Cg5Lbc1U.js +0 -2
  1019. package/langwatch/dist/client/assets/ProviderScopeChips-D7HJW6Ht.js +0 -2
  1020. package/langwatch/dist/client/assets/PushToCopiesDialog-B_hvn6aW.js +0 -2
  1021. package/langwatch/dist/client/assets/ReferenceDot-DbjBc6Dh.js +0 -2
  1022. package/langwatch/dist/client/assets/RenderInputOutput-BntIB-Ae.js +0 -261
  1023. package/langwatch/dist/client/assets/ScenarioFormDrawer-BORe6ffA.js +0 -2
  1024. package/langwatch/dist/client/assets/ScenarioInputMappingSection-DVpK_-Qh.js +0 -2
  1025. package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-MJhw77cs.js +0 -3
  1026. package/langwatch/dist/client/assets/ScopeChipPicker-B3xHf0Ii.js +0 -2
  1027. package/langwatch/dist/client/assets/SearchInput-C7YbWRUQ.js +0 -2
  1028. package/langwatch/dist/client/assets/SectionNavigationLayout-CIP_2Nxf.js +0 -2
  1029. package/langwatch/dist/client/assets/SelectDatasetDrawer-D_nCx9JT.js +0 -2
  1030. package/langwatch/dist/client/assets/SelectionActionBar-fxhOYCmO.js +0 -2
  1031. package/langwatch/dist/client/assets/SeriesFilterDrawer-zoWjjTxC.js +0 -2
  1032. package/langwatch/dist/client/assets/SettingsLayout-sixsNIX_.js +0 -2
  1033. package/langwatch/dist/client/assets/SetupWithAgentButton-Bhxb1yOj.js +0 -4
  1034. package/langwatch/dist/client/assets/ShikiCommandBox-CN1W-H2m.js +0 -5
  1035. package/langwatch/dist/client/assets/SpanDetails-DavcMtlr.js +0 -3
  1036. package/langwatch/dist/client/assets/SubscriptionPage-gPKGn08f.js +0 -2
  1037. package/langwatch/dist/client/assets/SuiteFormDrawer-C_5urLUY.js +0 -2
  1038. package/langwatch/dist/client/assets/TabButton-Cp8UA45p.js +0 -3
  1039. package/langwatch/dist/client/assets/TableCell-Cbtwk2YR.js +0 -2
  1040. package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-B0xHR5hC.js +0 -2
  1041. package/langwatch/dist/client/assets/TeamForm-DvN0gccP.js +0 -2
  1042. package/langwatch/dist/client/assets/TeamUserRoleField-DD6lt16j.js +0 -2
  1043. package/langwatch/dist/client/assets/TraceDetails-DZtIKcmo.js +0 -9
  1044. package/langwatch/dist/client/assets/TraceDetailsDrawer-DKgyPTw5.js +0 -2
  1045. package/langwatch/dist/client/assets/TraceIdPeek-7T88rBev.js +0 -2
  1046. package/langwatch/dist/client/assets/TracesMapping-CYIUxk62.js +0 -2
  1047. package/langwatch/dist/client/assets/UpgradeModalContent-eXy8pG4-.js +0 -2
  1048. package/langwatch/dist/client/assets/UploadCSVDrawer-BTttuVHZ.js +0 -3
  1049. package/langwatch/dist/client/assets/VariablesSection-hjZ5pmeK.js +0 -2
  1050. package/langwatch/dist/client/assets/VersionBadge-BPxGh4w7.js +0 -2
  1051. package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-B9EYtw_g.js +0 -1161
  1052. package/langwatch/dist/client/assets/ViewAutomationDrawer-H_lJU8lG.js +0 -2
  1053. package/langwatch/dist/client/assets/VirtualKeySecretReveal-5GeVsP9d.js +0 -54
  1054. package/langwatch/dist/client/assets/WelcomeLayout-CDTLOa4d.js +0 -2
  1055. package/langwatch/dist/client/assets/WithFeatureFlagGuard-OePuXWRG.js +0 -2
  1056. package/langwatch/dist/client/assets/WithPermissionGuard-Cr6Aljmy.js +0 -2
  1057. package/langwatch/dist/client/assets/WorkflowCard-SFB2TN6O.js +0 -2
  1058. package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-C9JwDruB.js +0 -2
  1059. package/langwatch/dist/client/assets/_...path_-Cgdgmf5W.js +0 -2
  1060. package/langwatch/dist/client/assets/_Uint8Array-DZ50H-2q.js +0 -2
  1061. package/langwatch/dist/client/assets/__...path__-CwRP2Csi.js +0 -22
  1062. package/langwatch/dist/client/assets/_baseAssignValue-BqKt0w0a.js +0 -2
  1063. package/langwatch/dist/client/assets/_baseClone-DCKy3Vq2.js +0 -2
  1064. package/langwatch/dist/client/assets/_baseEach-BGeacxUS.js +0 -2
  1065. package/langwatch/dist/client/assets/_baseFor-BQgMStOx.js +0 -2
  1066. package/langwatch/dist/client/assets/_experiment_-UwR3aJGK.js +0 -2
  1067. package/langwatch/dist/client/assets/_id_-7nn1sxUS.js +0 -2
  1068. package/langwatch/dist/client/assets/_id_-BGN_cxTM.js +0 -2
  1069. package/langwatch/dist/client/assets/_id_-C39KWPCF.js +0 -2
  1070. package/langwatch/dist/client/assets/_id_-CLpZ89Xl.js +0 -2
  1071. package/langwatch/dist/client/assets/_id_-CYndCW2V.js +0 -2
  1072. package/langwatch/dist/client/assets/_id_-CfWpUbg4.js +0 -2
  1073. package/langwatch/dist/client/assets/_id_-npXkLrUc.js +0 -2
  1074. package/langwatch/dist/client/assets/_project_-B7G8spwK.js +0 -8
  1075. package/langwatch/dist/client/assets/_runId_-BSik_ZD4.js +0 -7
  1076. package/langwatch/dist/client/assets/_shell-BGaZUKLi.js +0 -2
  1077. package/langwatch/dist/client/assets/_slug_-BN6BJfW8.js +0 -17
  1078. package/langwatch/dist/client/assets/_slug_-C7DGk6aN.js +0 -2
  1079. package/langwatch/dist/client/assets/_slug_-DOlOZ10W.js +0 -2
  1080. package/langwatch/dist/client/assets/_team_-B9rXOt0D.js +0 -2
  1081. package/langwatch/dist/client/assets/_workflow_-BJIdrL-L.js +0 -25
  1082. package/langwatch/dist/client/assets/_workflow_-BKcndaRn.js +0 -3
  1083. package/langwatch/dist/client/assets/accept-CSdmIcux.js +0 -2
  1084. package/langwatch/dist/client/assets/activity-QICCt22J.js +0 -1
  1085. package/langwatch/dist/client/assets/agents--fK5G7M5.js +0 -2
  1086. package/langwatch/dist/client/assets/alerts-QICCt22J.js +0 -1
  1087. package/langwatch/dist/client/assets/all-yOqzcthm.js +0 -2
  1088. package/langwatch/dist/client/assets/analytics-CjMLTwIY.js +0 -2
  1089. package/langwatch/dist/client/assets/annotation-scores-sPTr7fKF.js +0 -2
  1090. package/langwatch/dist/client/assets/annotations-Ye3ttmrc.js +0 -2
  1091. package/langwatch/dist/client/assets/anomaly-rules-DwSc-85q.js +0 -2
  1092. package/langwatch/dist/client/assets/api-keys-CKyHUAXs.js +0 -4
  1093. package/langwatch/dist/client/assets/asaplangy-6A4CIIRR.js +0 -5
  1094. package/langwatch/dist/client/assets/audit-log-DQ9_D13G.js +0 -2
  1095. package/langwatch/dist/client/assets/auth-CHp-bSLm.js +0 -2
  1096. package/langwatch/dist/client/assets/authentication-CktawfTg.js +0 -2
  1097. package/langwatch/dist/client/assets/authorize-BSFPddoX.js +0 -2
  1098. package/langwatch/dist/client/assets/authorize-YWRIgnuS.js +0 -2
  1099. package/langwatch/dist/client/assets/automations-CI-QD_zf.js +0 -2
  1100. package/langwatch/dist/client/assets/automations-QICCt22J.js +0 -1
  1101. package/langwatch/dist/client/assets/billing-plans-DUVLJ_Sk.js +0 -2
  1102. package/langwatch/dist/client/assets/blank-CqHTkVM2.js +0 -2
  1103. package/langwatch/dist/client/assets/blobs-B_lHV3eu.js +0 -2
  1104. package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3-CQSMftlX.js +0 -133
  1105. package/langwatch/dist/client/assets/budgets-D0yk2zkk.js +0 -3
  1106. package/langwatch/dist/client/assets/bug-reports-D48JQaYJ.js +0 -2
  1107. package/langwatch/dist/client/assets/cache-rules-BLbEe56I.js +0 -2
  1108. package/langwatch/dist/client/assets/choose-CR8H5_AF.js +0 -2
  1109. package/langwatch/dist/client/assets/chunk-EX3LRPZG-CULySKMF.js +0 -232
  1110. package/langwatch/dist/client/assets/chunk-FWX5IMBZ-vsHlz4qh.js +0 -3
  1111. package/langwatch/dist/client/assets/chunk-PUDLZKDR-ByJfzd90.js +0 -157
  1112. package/langwatch/dist/client/assets/chunk-RYQCIY6F-DW5yDiZP.js +0 -2
  1113. package/langwatch/dist/client/assets/chunk-V7JOEXUC-rGVlZXkP.js +0 -207
  1114. package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-DjpCOWYp.js +0 -2
  1115. package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-DjpCOWYp.js +0 -2
  1116. package/langwatch/dist/client/assets/codeAgentConfig-DlJOMg8p.js +0 -7
  1117. package/langwatch/dist/client/assets/codingDefaultSync-C3S2VHmn.js +0 -2
  1118. package/langwatch/dist/client/assets/configure-BPQgl6jf.js +0 -4
  1119. package/langwatch/dist/client/assets/constants-Bb5Vi_Bd.js +0 -2
  1120. package/langwatch/dist/client/assets/custom-D79e_fnJ.js +0 -12
  1121. package/langwatch/dist/client/assets/custom_evaluator-DgcItmbH.js +0 -31
  1122. package/langwatch/dist/client/assets/dagre-BqI7WPId.js +0 -2
  1123. package/langwatch/dist/client/assets/dagre-VKFMJZFB-BJj7ndf9.js +0 -5
  1124. package/langwatch/dist/client/assets/data-privacy-BuolZ3DI.js +0 -2
  1125. package/langwatch/dist/client/assets/data-retention-yWQxxUQF.js +0 -2
  1126. package/langwatch/dist/client/assets/datasets-u_OgZHiv.js +0 -2
  1127. package/langwatch/dist/client/assets/debounce-BJsF8wQY.js +0 -2
  1128. package/langwatch/dist/client/assets/defaultModelState-DY_b79Yj.js +0 -2
  1129. package/langwatch/dist/client/assets/dejaview-DSjI4vi2.js +0 -2
  1130. package/langwatch/dist/client/assets/departments-C3oaBPyA.js +0 -2
  1131. package/langwatch/dist/client/assets/devices-O_ZVZdxA.js +0 -2
  1132. package/langwatch/dist/client/assets/dist-Dd3SzC15.js +0 -6
  1133. package/langwatch/dist/client/assets/drawerFromUrl-DaNSDEzf.js +0 -2
  1134. package/langwatch/dist/client/assets/edit-CswmqyLU.js +0 -62
  1135. package/langwatch/dist/client/assets/email-suppressions-B8AuxWio.js +0 -2
  1136. package/langwatch/dist/client/assets/erDiagram-Q63AITRT-DIiR5G9i.js +0 -86
  1137. package/langwatch/dist/client/assets/error-nKFTkytv.js +0 -2
  1138. package/langwatch/dist/client/assets/errors-e711UMq7.js +0 -2
  1139. package/langwatch/dist/client/assets/evaluations-Cg9PywKJ.js +0 -2
  1140. package/langwatch/dist/client/assets/evaluations-xuA_g6-G.js +0 -2
  1141. package/langwatch/dist/client/assets/evaluators-6oHFfk5m.js +0 -146
  1142. package/langwatch/dist/client/assets/evaluators-CBPI9nP9.js +0 -2
  1143. package/langwatch/dist/client/assets/experiments-DHsdWtPG.js +0 -1
  1144. package/langwatch/dist/client/assets/feature-flags-e-cVnxOK.js +0 -2
  1145. package/langwatch/dist/client/assets/fetchSSE-5rVPow_l.js +0 -3
  1146. package/langwatch/dist/client/assets/fieldset-BNLAUiqD.js +0 -2
  1147. package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-DlrfK-aL.js +0 -1
  1148. package/langwatch/dist/client/assets/forgot-password-B_FXHTn9.js +0 -2
  1149. package/langwatch/dist/client/assets/formatMoney-DRwvOSzZ.js +0 -2
  1150. package/langwatch/dist/client/assets/formatTargetOutput-CkKef3lk.js +0 -2
  1151. package/langwatch/dist/client/assets/foundry-U39hnXil.js +0 -477
  1152. package/langwatch/dist/client/assets/gateway-DZnsUBnP.js +0 -2
  1153. package/langwatch/dist/client/assets/getEvaluator-irVFciCL.js +0 -2
  1154. package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-BFtcAGI_.js +0 -2
  1155. package/langwatch/dist/client/assets/governance-BBQIXSQ_.js +0 -2
  1156. package/langwatch/dist/client/assets/graphlib-Bg9XziCe.js +0 -2
  1157. package/langwatch/dist/client/assets/grid-DVy6ELOp.js +0 -2
  1158. package/langwatch/dist/client/assets/groups-DYnJ4U2W.js +0 -2
  1159. package/langwatch/dist/client/assets/guardrails-DdKPd-Zs.js +0 -2
  1160. package/langwatch/dist/client/assets/handled-error-CI7XXA3n.js +0 -2
  1161. package/langwatch/dist/client/assets/http-DSF_1QKT.js +0 -7
  1162. package/langwatch/dist/client/assets/identifierUtils-B50FmQLB.js +0 -2
  1163. package/langwatch/dist/client/assets/immer-CFru3D02.js +0 -14
  1164. package/langwatch/dist/client/assets/index-CPtTUYLD.js +0 -68
  1165. package/langwatch/dist/client/assets/ingestion-source-detail-BLfzu5Yv.js +0 -19
  1166. package/langwatch/dist/client/assets/ingestion-sources-BcwE_tRu.js +0 -12
  1167. package/langwatch/dist/client/assets/integrations-D220c59Q.js +0 -2
  1168. package/langwatch/dist/client/assets/isArrayLikeObject-DUy1V36n.js +0 -2
  1169. package/langwatch/dist/client/assets/isSymbol-COuSxi_J.js +0 -2
  1170. package/langwatch/dist/client/assets/langyHomeSuggestions-6NtCcdnH.js +0 -2
  1171. package/langwatch/dist/client/assets/license-Be6bs3wD.js +0 -2
  1172. package/langwatch/dist/client/assets/licenseStatusUtils-YSS0xL-G.js +0 -2
  1173. package/langwatch/dist/client/assets/lu-DlSq9Be4.js +0 -2
  1174. package/langwatch/dist/client/assets/map-7tkBBrDN.js +0 -2
  1175. package/langwatch/dist/client/assets/mappingValidation-C-AT88B0.js +0 -2
  1176. package/langwatch/dist/client/assets/me-BHRwGQAJ.js +0 -7
  1177. package/langwatch/dist/client/assets/me-DyaTjlbw.js +0 -2
  1178. package/langwatch/dist/client/assets/members-Dn5oJBlv.js +0 -2
  1179. package/langwatch/dist/client/assets/mermaid.core-krP_t-L5.js +0 -12
  1180. package/langwatch/dist/client/assets/messages-CN1bd906.js +0 -2
  1181. package/langwatch/dist/client/assets/metrics-Do8QhcIC.js +0 -2
  1182. package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-DBef2D4I.js +0 -97
  1183. package/langwatch/dist/client/assets/model-costs-D6eiVgIz.js +0 -2
  1184. package/langwatch/dist/client/assets/model-providers-CiSkvGtd.js +0 -2
  1185. package/langwatch/dist/client/assets/modelProviderHelpers-P2Cogc-H.js +0 -2
  1186. package/langwatch/dist/client/assets/my-queue-D1aRcnMh.js +0 -2
  1187. package/langwatch/dist/client/assets/normalizeComparison-BY-r_dYf.js +0 -2
  1188. package/langwatch/dist/client/assets/not-found-BiyummjJ.js +0 -2
  1189. package/langwatch/dist/client/assets/now-flOUcolU.js +0 -2
  1190. package/langwatch/dist/client/assets/onboarding-D3dMDvS6.js +0 -2
  1191. package/langwatch/dist/client/assets/online-evaluations-Dk2ygUi2.js +0 -2
  1192. package/langwatch/dist/client/assets/ops-Djcw5_lX.js +0 -2
  1193. package/langwatch/dist/client/assets/organizations-F6Q6gYJ3.js +0 -2
  1194. package/langwatch/dist/client/assets/pages-BXwixFEM.js +0 -2
  1195. package/langwatch/dist/client/assets/persistence-DZOtzFnQ.js +0 -2
  1196. package/langwatch/dist/client/assets/personalProject-DMRX2-SI.js +0 -2
  1197. package/langwatch/dist/client/assets/plans-C_VYB2VX.js +0 -2
  1198. package/langwatch/dist/client/assets/preconditionFieldUtils-B7QfymK4.js +0 -2
  1199. package/langwatch/dist/client/assets/product-D0RNZ3Ls.js +0 -2
  1200. package/langwatch/dist/client/assets/project-ZTQzA2gY.js +0 -2
  1201. package/langwatch/dist/client/assets/projections-DocSauqq.js +0 -2
  1202. package/langwatch/dist/client/assets/projects-ClyGKBO9.js +0 -2
  1203. package/langwatch/dist/client/assets/promptHandle-Cen_6YRW.js +0 -2
  1204. package/langwatch/dist/client/assets/prompts-CLb2R5Fd.js +0 -8
  1205. package/langwatch/dist/client/assets/radio-group-CWz2nJi3.js +0 -2
  1206. package/langwatch/dist/client/assets/registry-B64xvGV5.js +0 -2
  1207. package/langwatch/dist/client/assets/reports-C-XbHSdJ.js +0 -2
  1208. package/langwatch/dist/client/assets/request-C3Wgq2B3.js +0 -2
  1209. package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-9g84jNsR.js +0 -85
  1210. package/langwatch/dist/client/assets/reset-password-ohopJtIH.js +0 -2
  1211. package/langwatch/dist/client/assets/role-bindings-BQ31P1EO.js +0 -2
  1212. package/langwatch/dist/client/assets/roles-CQDx2TP6.js +0 -2
  1213. package/langwatch/dist/client/assets/routing-policies-uvNo9gfx.js +0 -5
  1214. package/langwatch/dist/client/assets/scenarios-CpA_eExG.js +0 -2
  1215. package/langwatch/dist/client/assets/scheduler-CgzNzJjP.js +0 -2
  1216. package/langwatch/dist/client/assets/schedules-QICCt22J.js +0 -1
  1217. package/langwatch/dist/client/assets/scim-BivWilDe.js +0 -2
  1218. package/langwatch/dist/client/assets/secrets-Dp2ang1r.js +0 -2
  1219. package/langwatch/dist/client/assets/segment-group-DQ4SkpwM.js +0 -2
  1220. package/langwatch/dist/client/assets/segmented-control-BNxU6DEN.js +0 -2
  1221. package/langwatch/dist/client/assets/select-D17PWjH9.js +0 -2
  1222. package/langwatch/dist/client/assets/send-Dd5105kW.js +0 -2
  1223. package/langwatch/dist/client/assets/sequenceView-FFm7w152.js +0 -5
  1224. package/langwatch/dist/client/assets/seriesOptions-CDRg_FIS.js +0 -1015
  1225. package/langwatch/dist/client/assets/settings-aFAaBCpo.js +0 -2
  1226. package/langwatch/dist/client/assets/setup-BqCpBMpq.js +0 -2
  1227. package/langwatch/dist/client/assets/shikiAdapter-CbWAxLvq.js +0 -3
  1228. package/langwatch/dist/client/assets/showSuiteRunError-B2iiQdeh.js +0 -2
  1229. package/langwatch/dist/client/assets/signin-C6AzSXTw.js +0 -2
  1230. package/langwatch/dist/client/assets/signup-Co9SguQP.js +0 -2
  1231. package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-CDfCuyr-.js +0 -2
  1232. package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-mNUL4OCz.js +0 -2
  1233. package/langwatch/dist/client/assets/subscription-BYrIJoC0.js +0 -3
  1234. package/langwatch/dist/client/assets/subscriptions-CrupW2oH.js +0 -2
  1235. package/langwatch/dist/client/assets/suggestionUI-0NFK2m-V.js +0 -106
  1236. package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-aY42sUsR.js +0 -3
  1237. package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-BQgl3Mwz.js +0 -9
  1238. package/langwatch/dist/client/assets/switch-DGatWO8v.js +0 -2
  1239. package/langwatch/dist/client/assets/switch-mtnuJtgJ.js +0 -2
  1240. package/langwatch/dist/client/assets/tabs-U8n5D55_.js +0 -2
  1241. package/langwatch/dist/client/assets/teams-CMzKSSEB.js +0 -2
  1242. package/langwatch/dist/client/assets/teams-DBNLpvFi.js +0 -2
  1243. package/langwatch/dist/client/assets/tool-catalog-DgWWHys3.js +0 -7
  1244. package/langwatch/dist/client/assets/toolIcons-DmISNQ_S.js +0 -2
  1245. package/langwatch/dist/client/assets/tooltip-gjZ4s2dt.js +0 -2
  1246. package/langwatch/dist/client/assets/topic-clustering-wc06nKYO.js +0 -2
  1247. package/langwatch/dist/client/assets/topics-DbjuJKH7.js +0 -2
  1248. package/langwatch/dist/client/assets/traceStore-By6b3pBZ.js +0 -55
  1249. package/langwatch/dist/client/assets/traces-DjQaBgiE.js +0 -289
  1250. package/langwatch/dist/client/assets/tracesMapping-DpjIOyAg.js +0 -3
  1251. package/langwatch/dist/client/assets/tracking-D4oUOPlm.js +0 -2
  1252. package/langwatch/dist/client/assets/types-CCALFpCT.js +0 -2
  1253. package/langwatch/dist/client/assets/types-DfJmP3wn.js +0 -2
  1254. package/langwatch/dist/client/assets/types-X7bcC-zw.js +0 -2
  1255. package/langwatch/dist/client/assets/usage-B3fH-bNu.js +0 -2
  1256. package/langwatch/dist/client/assets/usage-YeRzOlEs.js +0 -2
  1257. package/langwatch/dist/client/assets/use-generic-onboarding-flow-DZY28ya2.js +0 -2
  1258. package/langwatch/dist/client/assets/useActivePlan-fRQ_etI2.js +0 -2
  1259. package/langwatch/dist/client/assets/useAllPromptsForProject-DCZJ0_-p.js +0 -2
  1260. package/langwatch/dist/client/assets/useAnnotationQueues-ByLqaEs6.js +0 -2
  1261. package/langwatch/dist/client/assets/useAvailableEvaluators-BKFN_L8t.js +0 -2
  1262. package/langwatch/dist/client/assets/useCompoundLicenseCheck-BqNF-zzC.js +0 -2
  1263. package/langwatch/dist/client/assets/useCyclingVerb-DSHVFfHS.js +0 -2
  1264. package/langwatch/dist/client/assets/useDepartmentColumn-D1DF_PiG.js +0 -2
  1265. package/langwatch/dist/client/assets/useEvaluationsV3Store-Bc6Q5CKo.js +0 -2
  1266. package/langwatch/dist/client/assets/useExportTraces-BqLmfd8N.js +0 -2
  1267. package/langwatch/dist/client/assets/useFeatureFlag-Do1Ecu3l.js +0 -2
  1268. package/langwatch/dist/client/assets/useInviteActions-DwPlKWmS.js +0 -2
  1269. package/langwatch/dist/client/assets/useLicenseEnforcement-DOI0dcqD.js +0 -2
  1270. package/langwatch/dist/client/assets/usePersonalContext-CggG6KVI.js +0 -2
  1271. package/langwatch/dist/client/assets/useProjectSpanNames-jFO9A6Re.js +0 -2
  1272. package/langwatch/dist/client/assets/useProjectsForCopy-B8F_BY79.js +0 -2
  1273. package/langwatch/dist/client/assets/useRunViaApiTabs-Cr0_nbbp.js +0 -50
  1274. package/langwatch/dist/client/assets/useShowLangy-kmjRxLHs.js +0 -2
  1275. package/langwatch/dist/client/assets/useSimulationUpdateListener-BQB61L8b.js +0 -2
  1276. package/langwatch/dist/client/assets/useTargetName-nPyk8kf-.js +0 -2
  1277. package/langwatch/dist/client/assets/useTargetNameMap-C2bPHyhD.js +0 -2
  1278. package/langwatch/dist/client/assets/useTraceDetailsDrawer-CL82mHNA.js +0 -2
  1279. package/langwatch/dist/client/assets/useTraceUpdateListener-r6BQdcuk.js +0 -2
  1280. package/langwatch/dist/client/assets/useUrlScopeFilter-DFlXMn0U.js +0 -2
  1281. package/langwatch/dist/client/assets/useWorkflowStore-DGHQA8ai.js +0 -8
  1282. package/langwatch/dist/client/assets/users-D5W8Qjjj.js +0 -2
  1283. package/langwatch/dist/client/assets/users-DFyHT5UO.js +0 -2
  1284. package/langwatch/dist/client/assets/users-rKylpyh9.js +0 -2
  1285. package/langwatch/dist/client/assets/v3-NB4P-Pc3.js +0 -2
  1286. package/langwatch/dist/client/assets/variables-DF2_abiB.js +0 -396
  1287. package/langwatch/dist/client/assets/viewStore-DtvCfAUF.js +0 -2
  1288. package/langwatch/dist/client/assets/virtual-keys-DW1kPrjW.js +0 -2
  1289. package/langwatch/dist/client/assets/welcome-DJsfSWej.js +0 -16
  1290. package/langwatch/dist/client/assets/wizard-D2X_QMNx.js +0 -2
  1291. package/langwatch/dist/client/assets/workbench-fZ1KK4fN.js +0 -2
  1292. package/langwatch/dist/client/assets/workflows-CY65pvqY.js +0 -3
  1293. package/langwatch/dist/client/assets/wrap-DlWOPhPw.js +0 -2
  1294. package/langwatch/src/app/api/middleware/__tests__/resource-limit-enforcement.integration.test.ts +0 -278
  1295. package/langwatch/src/app/api/middleware/__tests__/resource-limit.unit.test.ts +0 -299
  1296. package/langwatch/src/app/api/middleware/resource-limit.ts +0 -147
  1297. package/langwatch/src/app/api/scenario-events/[[...route]]/scenario-set-limit.ts +0 -54
  1298. package/langwatch/src/app/api/scenario-events/__tests__/scenario-set-limit.unit.test.ts +0 -195
  1299. package/langwatch/src/app/api/scenario-events/scenario-set-limit.stress.test.ts +0 -216
  1300. package/langwatch/src/components/__tests__/UpgradeModal.unit.test.tsx +0 -103
  1301. package/langwatch/src/hooks/useCompoundLicenseCheck.ts +0 -41
  1302. package/langwatch/src/pages/api/experiment/init.stress.test.ts +0 -130
  1303. package/langwatch/src/server/api/routers/__tests__/project.create.planLimit.integration.test.ts +0 -370
  1304. package/langwatch/src/server/api/routers/__tests__/team.createTeamWithMembers.planLimit.integration.test.ts +0 -251
  1305. package/langwatch/src/server/app-layer/usage/__tests__/usage-service-checkScenarioSetLimit.unit.test.ts +0 -322
  1306. package/langwatch/src/server/app-layer/usage/errors.ts +0 -24
  1307. package/langwatch/src/server/auditLog.ts +0 -49
  1308. package/langwatch/src/server/better-auth/__tests__/fallbackName.test.ts +0 -141
  1309. package/langwatch/src/server/better-auth/__tests__/parseIssuerUrl.test.ts +0 -58
  1310. package/langwatch/src/server/better-auth/__tests__/sso.test.ts +0 -125
  1311. package/langwatch/src/server/better-auth/sso.ts +0 -47
  1312. package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/__tests__/traceSummary.coalesce.unit.test.ts +0 -33
  1313. package/langwatch/src/server/license-enforcement/__tests__/limit-breakdown.unit.test.ts +0 -101
  1314. package/langwatch/src/server/license-enforcement/__tests__/personal-workspaces-excluded.integration.test.ts +0 -391
  1315. package/langwatch/src/server/license-enforcement/enforcement.middleware.ts +0 -103
  1316. package/langwatch/src/server/license-enforcement/limit-breakdown.ts +0 -96
  1317. package/langwatch/src/server/routes/scim.ts +0 -583
  1318. package/langwatch/src/server/routes/webhooks.ts +0 -168
  1319. package/langwatch/src/server/scim/__tests__/scim-token.service.unit.test.ts +0 -109
  1320. package/langwatch/src/server/scim/__tests__/scim.costCenter.integration.test.ts +0 -170
  1321. package/langwatch/src/server/scim/__tests__/scim.service.unit.test.ts +0 -414
  1322. package/langwatch/src/server/scim/scim-group.service.ts +0 -464
  1323. package/langwatch/src/server/scim/scim-role-resolver.ts +0 -47
  1324. package/langwatch/src/server/scim/scim-role-resolver.unit.test.ts +0 -92
  1325. package/langwatch/src/server/scim/scim-token.service.ts +0 -70
  1326. package/langwatch/src/server/scim/scim.service.ts +0 -553
  1327. package/langwatch/src/server/scim/scim.types.ts +0 -148
  1328. package/mcp-server/dist/chunk-DSB77X63.js +0 -2328
  1329. package/mcp-server/dist/discover-evaluator-schema-OFEADIJY.js +0 -2175
  1330. package/mcp-server/dist/http-server-YVM4PRTC.js +0 -24466
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{a as n,dn as r,i,n as a}from"./portal-Sdfvrza9.js";import{t as o}from"./jsx-runtime-CFwixLRt.js";import{t as s}from"./skeleton-0JSrjbwm.js";import{t as c}from"./heading-C0sACr0w.js";import{n as l,t as u}from"./v-stack-hkuSkmCA.js";import{Sn as d,gn as f,mn as p,tr as m}from"./ProjectAvatar-B0tbfKzY.js";import{t as h}from"./tooltip-CM-lMDNU.js";import{$ as g,J as _,Q as v,X as y,Y as b,Z as x,tt as S}from"./Markdown-Cip8Rj5C.js";import{t as C}from"./icon-D6xQEiPb.js";import{a as w}from"./field-BadoNaN5.js";import{t as T}from"./DashboardLayout-Cn5-9Ye2.js";import{a as E,i as D,n as O,r as k}from"./alert-CPsXih3K.js";import{n as ee,r as A,t as j}from"./card-By_Mbslh.js";import{t as te}from"./container-Cxi_AjD-.js";import{r as ne}from"./errors-mlatPkMI.js";import{t as M}from"./spacer-C38e7o6r.js";import{i as re,o as N,r as ie,t as P}from"./tabs-B6CQXTUQ.js";import{n as F}from"./api-l6Cnm0vQ.js";import{s as ae}from"./trpcError-CFsR-0nB.js";import{c as oe,n as I,o as se}from"./History-B3CO9rUC.js";import{r as L}from"./next-router-CWLrMXvP.js";import{D as ce,Mt as R,Pr as le,St as z,Vt as ue,t as B,zn as de}from"./index-8SbDirJv.js";import{i as V}from"./ColorfulBlockIcons-zwwbjL9F.js";import{t as H}from"./chevron-up-BwsNE1zV.js";import{t as fe}from"./download-CuvC-TAo.js";import{i as U}from"./stringCasing-Cx6SsTTf.js";import{d as pe,rt as me,tt as he,u as ge,xn as _e,y as ve}from"./CartesianChart-Ci1mTvgb.js";import{t as ye}from"./switch-BZp2DIfW.js";import{t as W}from"./ReferenceDot-DrNtDSrg.js";import{t as be}from"./Line-CbuF_DU9.js";import{t as xe}from"./LineChart-CjG7MhLF.js";import{t as G}from"./RenderInputOutput-DqsCnspr.js";import{t as K}from"./MetadataTag-CQmOL4su.js";import{t as Se}from"./papaparse.min-cQwnxGCG.js";import{t as q}from"./formatMoney-ClmqgvaY.js";import{t as Ce}from"./ChartTooltip-BMGa2HEK.js";import{t as we}from"./FormatMoney-LZE9c_pf.js";var J=de(),Y=e(d()),Te=e(Se()),X=o();function Ee({project:e,experiment:t}){let n=F.batchRecord.getAllByexperimentSlug.useQuery({projectId:e.id??``,experimentSlug:t.slug??``}),o=()=>{let e=[`Dataset`,`Evaluation`,`Input`,`Output`,`Expected Output`,`Passed`,`Status`,`Details`,`Score`,`Label`,`Cost`,`Created at`],r=[];n.data?.forEach(e=>{let t=e?.data?.input,n=e?.data?.output,i=e?.data?.expected_output;r.push([e.datasetSlug,e.evaluation,t,n,i,e.passed?`True`:`False`,e.status,e.details,e.score,e.label??``,e.cost,new Date(e.createdAt).toLocaleString()])});let i=Te.default.unparse({fields:e,data:r}),a=window.URL.createObjectURL(new Blob([i])),o=document.createElement(`a`);o.href=a;let s=`${t?.slug}.csv`;o.setAttribute(`download`,s),document.body.appendChild(o),o.click(),o.remove()},d=n.data?.reduce((e,t)=>e+t.cost,0),f=n.data?.reduce((e,t)=>!e||new Date(t.createdAt)<new Date(e.createdAt)?t:e,void 0),p=n.data?.reduce((e,t)=>!e||new Date(t.createdAt)>new Date(e.createdAt)?t:e,void 0),m=p&&f?new Date(p.createdAt).getTime()-new Date(f.createdAt).getTime():0,S=n.data?.reduce((e,t)=>(e[t.evaluation]||(e[t.evaluation]={all:[],processed:[],error:[],skipped:[],unknown:[]}),e[t.evaluation].all.push(t),e[t.evaluation][t.status===`processed`?`processed`:t.status===`error`?`error`:t.status===`skipped`?`skipped`:`unknown`].push(t),e),{}),w=Object.fromEntries(Object.entries(S??{}).map(([e,t])=>[e,t.processed.some(e=>e.score)?`score`:`passed`])),T=Object.fromEntries(Object.entries(S??{}).map(([e,t])=>w[e]===`score`?[e,t.processed.reduce((e,t)=>e+t.score,0)/t.processed.length]:[e,t.processed.filter(e=>e.passed).length/t.processed.length]));return(0,X.jsxs)(r,{background:`bg.surface`,width:`full`,height:`full`,paddingTop:14,children:[(0,X.jsx)(te,{maxW:`calc(100vw - 200px)`,children:(0,X.jsxs)(a,{width:`full`,verticalAlign:`middle`,paddingBottom:6,children:[(0,X.jsxs)(u,{align:`start`,children:[(0,X.jsx)(c,{as:`h1`,size:`lg`,children:t.name??t.slug}),(0,X.jsxs)(l,{children:[`Dataset: `,n.data?.[0]?.dataset.name??``]})]}),(0,X.jsx)(M,{}),(0,X.jsxs)(i,{colorPalette:`black`,minWidth:`fit-content`,variant:`ghost`,onClick:()=>n.data&&o(),children:[`Download Results CSV`,` `,(0,X.jsx)(C,{marginLeft:2,children:(0,X.jsx)(fe,{})})]})]})}),(0,X.jsxs)(a,{align:`center`,alignItems:`stretch`,justify:`center`,background:`gray.50`,padding:6,gap:6,children:[Object.entries(T).map(([e,t])=>(0,X.jsx)(A,{children:(0,X.jsx)(j,{children:(0,X.jsxs)(u,{align:`start`,justify:`center`,height:`full`,gap:2,children:[(0,X.jsx)(l,{color:`fg`,fontSize:`15px`,fontWeight:`500`,children:e}),(0,X.jsxs)(a,{align:`end`,color:t<.5?`red.500`:`green.500`,children:[(0,X.jsx)(l,{fontSize:`26px`,fontWeight:`300`,children:typeof t==`number`?(0,Y.default)(t).format(w[e]===`score`?`0.00`:`0%`):t}),(0,X.jsx)(l,{fontSize:`13px`,fontWeight:`500`,marginBottom:`4px`,opacity:.8,children:w[e]===`score`?`avg score`:`pass rate`})]}),(0,X.jsxs)(a,{fontSize:`11px`,textTransform:`uppercase`,fontWeight:`600`,color:`fg.muted`,children:[S?.[e]?.skipped.length&&(0,X.jsxs)(l,{children:[(0,X.jsx)(r,{display:`inline-block`,background:`yellow.400`,borderRadius:`100%`,width:2,height:2,marginRight:1}),S?.[e]?.skipped.length,` `,`skipped`]}),S?.[e]?.error.length&&(0,X.jsxs)(l,{children:[(0,X.jsx)(r,{display:`inline-block`,background:`red.400`,borderRadius:`100%`,width:2,height:2,marginRight:1}),S?.[e]?.error.length,` error`]})]})]})})},e)),(0,X.jsx)(A,{children:(0,X.jsx)(j,{children:(0,X.jsxs)(u,{align:`start`,justify:`center`,height:`full`,gap:2,children:[(0,X.jsx)(l,{color:`fg`,fontSize:`15px`,fontWeight:`500`,children:`Evaluations Cost`}),(0,X.jsx)(l,{fontSize:`26px`,fontWeight:`300`,children:d?q({amount:d,currency:`USD`}):`-`})]})})}),(0,X.jsx)(A,{children:(0,X.jsx)(j,{children:(0,X.jsxs)(u,{align:`start`,justify:`center`,height:`full`,gap:2,children:[(0,X.jsx)(l,{color:`fg`,fontSize:`15px`,fontWeight:`500`,children:`Runtime`}),(0,X.jsx)(l,{fontSize:`26px`,fontWeight:`300`,children:m?(0,Y.default)(m/1e3).format(`00:00:00`):`-`})]})})})]}),(0,X.jsx)(r,{width:`full`,paddingBottom:12,display:`flex`,justifyContent:`center`,overflowX:`auto`,paddingX:6,children:(0,X.jsx)(u,{align:`start`,minWidth:`0`,children:n.isLoading?(0,X.jsx)(r,{children:(0,X.jsx)(v,{variant:`line`,borderWidth:`1px`,borderColor:`border`,children:(0,X.jsx)(_,{children:Array.from({length:3}).map((e,t)=>(0,X.jsx)(g,{children:Array.from({length:4}).map((e,t)=>(0,X.jsx)(b,{children:(0,X.jsx)(s,{height:`20px`})},t))},t))})})}):n.data&&n.data.length==0?(0,X.jsx)(l,{children:`No data found`}):Object.entries(S??{}).map(([e,t])=>{let n=t.all.some(e=>e.data?.expected_output),i=t.all.some(e=>e.details);return(0,X.jsxs)(u,{align:`start`,gap:8,paddingTop:12,children:[(0,X.jsx)(c,{as:`h2`,size:`md`,children:e}),(0,X.jsx)(r,{children:(0,X.jsxs)(v,{variant:`line`,borderWidth:`1px`,borderColor:`border`,children:[(0,X.jsx)(x,{children:(0,X.jsxs)(g,{children:[(0,X.jsx)(y,{children:`Input`}),(0,X.jsx)(y,{children:`Output`}),n&&(0,X.jsx)(y,{children:`Expected Output`}),(0,X.jsx)(y,{children:`Status`}),(0,X.jsx)(y,{minWidth:120,textAlign:`center`,children:w[e]===`score`?`Score`:`Passed`}),i&&(0,X.jsx)(y,{children:`Details`}),(0,X.jsx)(y,{children:`Cost`}),(0,X.jsx)(y,{children:`Created`})]})}),(0,X.jsx)(_,{children:t.all.map((t,r)=>{let a=t?.data?.input??``,o=t?.data?.output??``,s=t?.data?.expected_output??``;return(0,X.jsxs)(g,{children:[(0,X.jsx)(b,{children:(0,X.jsx)(h,{content:a,children:(0,X.jsx)(l,{lineClamp:2,display:`block`,maxWidth:230,children:a})})}),(0,X.jsx)(b,{children:(0,X.jsx)(h,{content:o,children:(0,X.jsx)(l,{lineClamp:2,display:`block`,maxWidth:230,children:o})})}),n&&(0,X.jsx)(b,{children:(0,X.jsx)(h,{content:s,children:(0,X.jsx)(l,{lineClamp:2,display:`block`,maxWidth:230,children:s})})}),(0,X.jsx)(b,{color:t.status===`skipped`?`yellow.700`:t.status===`error`?`red.700`:void 0,children:t.status}),t.status===`processed`?(0,X.jsx)(b,{textAlign:`center`,fontWeight:`500`,color:w[e]===`score`?t.score<.5?`red.500`:`green.500`:t.passed?`green.500`:`red.500`,children:w[e]===`score`?(0,Y.default)(t.score).format(`0.00`):t.passed?`True`:`False`}):(0,X.jsx)(b,{textAlign:`center`,children:`-`}),i&&(0,X.jsx)(b,{maxWidth:300,color:t.status===`skipped`?`yellow.700`:t.status===`error`?`red.700`:void 0,children:(0,X.jsx)(h,{content:t.details,children:(0,X.jsx)(l,{lineClamp:1,wordBreak:`break-all`,display:`block`,children:t.details})})}),(0,X.jsx)(b,{children:t.cost?q({amount:t.cost,currency:`USD`}):`-`}),(0,X.jsx)(b,{children:new Date(t.createdAt).toLocaleString()})]},r)})})]})})]},e)})})})]})}var Z=e(t());function De({fill:e=`#5865f2`}){return(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 127.14 96.36`,width:`32`,height:`32`,children:(0,X.jsx)(`path`,{fill:e,d:`M107.7 8.07A105.15 105.15 0 0081.47 0a72.06 72.06 0 00-3.36 6.83 97.68 97.68 0 00-29.11 0A72.37 72.37 0 0045.64 0a105.89 105.89 0 00-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0032.17 16.15 77.7 77.7 0 006.89-11.11 68.42 68.42 0 01-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.57 75.57 0 0064.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 01-10.87 5.19 77 77 0 006.89 11.1 105.25 105.25 0 0032.19-16.14c2.64-27.38-4.51-51.11-18.9-72.15zM42.45 65.69C36.18 65.69 31 60 31 53s5-12.74 11.43-12.74S54 46 53.89 53s-5.05 12.69-11.44 12.69zm42.24 0C78.41 65.69 73.25 60 73.25 53s5-12.74 11.44-12.74S96.23 46 96.12 53s-5.04 12.69-11.43 12.69z`})})}function Oe(){return(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 98 96`,width:`32`,height:`32`,children:(0,X.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0112.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z`,clipRule:`evenodd`})})}function Q(){let{open:e,onOpen:t,setOpen:n}=m();return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(z.Root,{open:e,onOpenChange:({open:e})=>n(e),children:(0,X.jsxs)(z.Content,{bg:`bg`,children:[(0,X.jsx)(z.Header,{children:(0,X.jsx)(z.Title,{children:`Feedback on LangWatch`})}),(0,X.jsx)(z.CloseTrigger,{}),(0,X.jsx)(z.Body,{children:(0,X.jsxs)(u,{align:`start`,paddingBottom:4,children:[(0,X.jsx)(l,{paddingBottom:4,children:`Join our Discord community or open a Github Issue for any issues, questions or ideas.`}),(0,X.jsx)(B,{href:`https://discord.gg/kT4PhDS2gH`,isExternal:!0,children:(0,X.jsxs)(i,{variant:`plain`,children:[(0,X.jsx)(De,{}),` Discord`]})}),(0,X.jsx)(B,{href:`https://github.com/langwatch/langwatch`,isExternal:!0,children:(0,X.jsxs)(i,{variant:`plain`,children:[(0,X.jsx)(Oe,{}),` Github`]})})]})})]})}),(0,X.jsx)(i,{variant:`plain`,onClick:t,fontWeight:`normal`,color:`fg`,children:`Give Feedback`})]})}function ke({project:e,experiment:t}){let{dspyRuns:n,selectedRuns:i,setSelectedRuns:o,highlightedRun:d,setHighlightedRun:f,selectedPoint:p,setSelectedPoint:m,dspyRunsPlusIncoming:h,stepToDisplay:g,optimizerNames:_,labelNames:v,runsById:y}=$({project:e,experiment:t});return(0,X.jsxs)(a,{align:`start`,width:`full`,height:`full`,gap:0,children:[(0,X.jsx)(Ae,{dspyRuns:n,selectedRuns:i,setSelectedRuns:o,setHighlightedRun:f,dspyRunsPlusIncoming:h}),(0,X.jsxs)(r,{width:`calc(100vw - 391px)`,height:`full`,position:`relative`,children:[(0,X.jsxs)(u,{align:`start`,width:`100%`,maxWidth:`1200px`,height:`full`,gap:8,padding:6,children:[(0,X.jsxs)(a,{width:`full`,align:`end`,children:[(0,X.jsx)(c,{as:`h1`,size:`lg`,children:t.name??t.slug}),(0,X.jsx)(M,{}),(0,X.jsx)(Q,{})]}),n.isLoading?(0,X.jsx)(s,{width:`100%`,height:`30px`}):n.error?(0,X.jsxs)(D,{children:[(0,X.jsx)(k,{}),`Error loading experiment runs`]}):n.data?.length===0?(0,X.jsx)(l,{children:`Waiting for the first completed step to arrive...`}):n.data&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(A,{width:`100%`,children:[(0,X.jsx)(ee,{children:(0,X.jsx)(c,{as:`h2`,size:`md`,children:_.length==1?_[0]:_.length>1?`Multiple Optimizers`:`Waiting for the first completed step to arrive...`})}),(0,X.jsx)(j,{children:(0,X.jsx)(Ne,{dspyRuns:n.data,selectedPoint:p,setSelectedPoint:m,highlightedRun:d,selectedRuns:i,stepToDisplay:g,labelNames:v})})]}),g&&(!d||d===g.run_id)&&(0,X.jsx)(A,{width:`100%`,children:(0,X.jsx)(j,{padding:0,children:(0,X.jsx)(je,{project:e,experiment:t,dspyStepSummary:g,workflowVersion:y?.[g.run_id]?.workflow_version})})})]})]}),y&&i?.length===1&&(0,X.jsx)(Pe,{project:e,experiment:t,run:y[i[0]]})]})]})}var $=({project:e,experiment:t,selectedRuns:n,setSelectedRuns:r,incomingRunIds:i=[]})=>{let a=F.experiments.getExperimentDSPyRuns.useQuery({projectId:e.id,experimentSlug:t.slug},{refetchInterval:3e3,refetchOnMount:!1}),o=L(),[s,c]=(0,Z.useState)(null),l=(0,Z.useMemo)(()=>{let e=n??(typeof o.query.runIds==`string`?o.query.runIds.split(`,`):null);return(!e||e.length===0)&&(e=a.data?.[0]?.runId?[a.data[0].runId]:[]),e},[a.data,o.query.runIds,n]),u=(0,Z.useCallback)(e=>{if(r)r(e);else{let t={...o.query,runIds:e.join(`,`)};t.runIds||delete t.runIds,o.push({query:t})}},[o,r]),[d,f]=(0,Z.useState)(null);(0,Z.useEffect)(()=>{d&&!l.includes(d.runId)&&f(null)},[l]);let p=a.data&&l?a.data.filter(e=>l.includes(e.runId)):a.data,m=p?.[0];(0,Z.useEffect)(()=>{if(!m||d!==null)return;let e=m.steps[m.steps.length-1];e&&f({runId:m.runId,index:e.index})},[m,d]);let h=(0,Z.useMemo)(()=>a.data?.reduce((e,t)=>(e[t.runId]=t,e),{}),[a.data]),g=a.data&&(d&&h?.[d.runId])?.steps.find(e=>e.index===d.index),_=Array.from(new Set(p?.flatMap(e=>e.steps.map(e=>e.optimizer.name))??[])),v=Array.from(new Set(p?.flatMap(e=>e.steps.map(e=>e.label))??[])),y=Array.from(new Set([...l,...i])).filter(e=>!a.data?.some(t=>t.runId===e));return{dspyRuns:a,selectedRuns:l,setSelectedRuns:u,highlightedRun:s,setHighlightedRun:c,dspyRunsPlusIncoming:y.length>0?[{runId:y[0]},...a.data??[]]:a.data,stepToDisplay:g,optimizerNames:_,labelNames:v,selectedPoint:d,setSelectedPoint:f,runsById:h}};function Ae({dspyRuns:e,selectedRuns:t,setSelectedRuns:i,setHighlightedRun:o,dspyRunsPlusIncoming:d,size:p=`md`,incomingRunIds:m=[]}){let h=d?.some(e=>e.workflow_version),g=(0,Z.useMemo)(()=>new Map((e.data??[]).map((e,t)=>[e.runId,t])),[e.data]);return(0,X.jsxs)(u,{align:`start`,background:`bg.surface`,paddingY:p===`sm`?0:4,borderRightWidth:`1px`,borderColor:`border.emphasized`,fontSize:`14px`,minWidth:p===`sm`?`250px`:`300px`,maxWidth:p===`sm`?`250px`:`300px`,height:`full`,gap:0,overflowY:`auto`,children:[p!==`sm`&&(0,X.jsx)(c,{as:`h2`,size:`md`,paddingX:6,paddingY:4,children:`DSPy Optimizer Runs`}),e.isLoading?(0,X.jsx)(X.Fragment,{children:Array.from({length:3}).map((e,t)=>(0,X.jsx)(a,{paddingX:6,paddingY:2,width:`100%`,children:(0,X.jsx)(s,{width:`100%`,height:`30px`})},t))}):e.error?(0,X.jsxs)(D,{children:[(0,X.jsx)(k,{}),`Error loading experiment runs`]}):e.data?.length===0?(0,X.jsx)(l,{paddingX:6,paddingY:4,children:`Waiting for runs...`}):d?.slice(0,21).map(c=>{let d=c.steps?.map(e=>e.llm_calls_summary.total_cost).reduce((e,t)=>e+t,0),_=oe({commitMessage:c.workflow_version?.commitMessage,index:g.get(c.runId)??0});return(0,X.jsx)(a,{paddingX:p===`sm`?2:6,paddingY:p===`sm`?2:4,width:`100%`,cursor:`pointer`,role:`button`,opacity:!t||t.includes(c.runId)?1:.5,background:t?.includes(c.runId)?`gray.200`:`none`,_hover:{background:t?.includes(c.runId)?`gray.200`:`gray.100`},onClick:e=>{e.stopPropagation(),e.preventDefault();let n=e.shiftKey;n&&document.getSelection()?.removeAllRanges(),i?.(t?.includes(c.runId)?t.filter(e=>e!==c.runId):n?[...t??[],c.runId]:[c.runId]),o(null)},gap:3,children:e.data?.find(e=>e.runId===c.runId)?(0,X.jsxs)(X.Fragment,{children:[c.workflow_version?(0,X.jsx)(I,{version:c.workflow_version,minWidth:h?`48px`:`0`}):(0,X.jsx)(r,{width:`24px`,height:`24px`,minWidth:`24px`,minHeight:`24px`,background:`gray.300`,borderRadius:`100%`,backgroundColor:f(`colors`,c.runId).color}),(0,X.jsxs)(u,{width:`full`,align:`start`,gap:0,paddingRight:2,children:[(0,X.jsxs)(a,{width:`full`,children:[c.workflow_version&&(0,X.jsx)(r,{width:`12px`,height:`12px`,minWidth:`12px`,minHeight:`12px`,background:`gray.300`,borderRadius:`100%`,backgroundColor:f(`colors`,c.runId).color}),(0,X.jsx)(l,{fontSize:p===`sm`?`13px`:`14px`,children:_}),(m??[]).includes(c.runId)&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(M,{}),(0,X.jsx)(n,{size:`xs`})]})]}),(0,X.jsxs)(a,{color:`fg.subtle`,fontSize:p===`sm`?`12px`:`13px`,children:[(0,X.jsx)(l,{children:c.created_at?ce(c.created_at,`yyyy-MM-dd HH:mm`,5):`Waiting for steps...`}),d&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(l,{children:`·`}),(0,X.jsx)(l,{children:q({amount:d,currency:`USD`},`$0.00[0]`)})]})]})]})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(I,{minWidth:h?`48px`:`0`}),(0,X.jsxs)(u,{align:`start`,gap:2,width:`100%`,paddingRight:2,children:[(0,X.jsxs)(a,{width:`100%`,children:[(0,X.jsx)(s,{height:`12px`,background:`gray.400`,flexGrow:1}),(0,X.jsx)(n,{size:`xs`,flexShrink:0})]}),(0,X.jsx)(s,{width:`100%`,height:`12px`,background:`gray.400`})]})]})},c?.runId??`new`)})]})}var je=Z.memo(function({project:e,experiment:t,dspyStepSummary:n,workflowVersion:i,size:o=`md`}){let d=F.experiments.getExperimentDSPyStep.useQuery({projectId:e.id,experimentSlug:t.slug,runId:n?.run_id??``,index:n?.index??``},{enabled:!!n}),[p,m]=(0,Z.useState)(0),[h,C]=(0,Z.useState)(!1),T=d.data?.examples.some(e=>e.trace),E=i?.commitMessage??n.run_id;return(0,X.jsxs)(u,{width:`full`,height:`full`,gap:0,minWidth:`0`,children:[o!==`sm`&&(0,X.jsxs)(a,{width:`full`,gap:8,padding:4,children:[(0,X.jsxs)(a,{gap:3,children:[i?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(I,{version:i}),(0,X.jsx)(r,{width:`18px`,height:`18px`,background:`gray.300`,borderRadius:`100%`,backgroundColor:f(`colors`,n.run_id).color})]}):(0,X.jsx)(r,{width:`24px`,height:`24px`,borderRadius:`100%`,background:f(`colors`,n.run_id).color}),(0,X.jsxs)(c,{as:`h2`,size:`md`,marginTop:`-1px`,children:[E,` (step `,n.index,`)`]})]}),(0,X.jsx)(M,{}),(0,X.jsxs)(a,{children:[(0,X.jsx)(K,{label:`Step Cost`,value:q({amount:n.llm_calls_summary.total_cost,currency:`USD`},`$0.00[00]`)}),(0,X.jsx)(K,{label:`Step Tokens`,value:(0,Y.default)(n.llm_calls_summary.total_tokens).format(`0a`)}),(0,X.jsx)(K,{label:n.label===`score`?`Step `+U(n.label):U(n.label),value:(0,Y.default)(n.score).format(`0.[00]`)})]})]}),(0,X.jsxs)(re,{value:p.toString(),onValueChange:e=>m(parseInt(e.value)),size:o,width:`full`,height:`full`,display:`flex`,flexDirection:`column`,minWidth:`0`,colorPalette:`blue`,lazyMount:!0,unmountOnExit:!0,children:[(0,X.jsxs)(ie,{position:`relative`,overflowX:`auto`,overflowY:`hidden`,whiteSpace:`nowrap`,children:[o===`sm`&&(0,X.jsx)(le,{minHeight:`31px`,marginBottom:`-2px`,paddingX:4,fontWeight:500,color:`fg.muted`,background:`gray.100`,children:(0,X.jsxs)(l,{children:[`Step `,n.index]})}),p===0&&o!==`sm`&&(0,X.jsx)(r,{position:`absolute`,top:0,right:4,children:(0,X.jsxs)(a,{children:[(0,X.jsx)(l,{children:`Raw`}),(0,X.jsx)(w,{children:(0,X.jsx)(ye,{checked:h,onCheckedChange:()=>C(!h)})})]})}),(0,X.jsxs)(N,{value:`0`,children:[`Predictors`,` `,d.data&&`(${d.data.predictors.length})`]}),(0,X.jsxs)(N,{value:`1`,children:[`Evaluations`,` `,d.data&&`(${d.data.examples.length})`]}),(0,X.jsxs)(N,{value:`2`,children:[`LLM Calls `,d.data&&`(${d.data.llm_calls.length})`]}),o===`sm`&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(M,{}),(0,X.jsxs)(a,{paddingX:4,color:`fg.muted`,fontSize:`12px`,textTransform:`uppercase`,children:[(0,X.jsxs)(l,{children:[`Step Cost:`,` `,q({amount:n.llm_calls_summary.total_cost,currency:`USD`},`$0.00[00]`)]}),(0,X.jsx)(S,{orientation:`vertical`}),(0,X.jsxs)(l,{children:[`Step Tokens:`,` `,(0,Y.default)(n.llm_calls_summary.total_tokens).format(`0a`)]}),(0,X.jsx)(S,{orientation:`vertical`}),(0,X.jsxs)(l,{children:[n.label===`score`?`Step `+n.label:n.label,`: `,(0,Y.default)(n.score).format(`0.[00]`)]})]})]})]}),(0,X.jsx)(P,{value:`0`,width:`full`,height:`full`,minWidth:`0`,overflowX:`auto`,display:`flex`,padding:0,paddingTop:h?4:0,children:d.isLoading?(0,X.jsx)(s,{width:`100%`,height:`30px`}):d.error?(0,X.jsxs)(D,{children:[(0,X.jsx)(k,{}),`Error loading step data`]}):d.data&&h?(0,X.jsx)(G,{value:JSON.stringify(d.data?.predictors),collapseStringsAfterLength:140}):d.data?(0,X.jsxs)(v,{height:`fit-content`,size:o===`sm`?`xs`:`sm`,variant:`grid`,children:[(0,X.jsx)(x,{children:(0,X.jsxs)(g,{children:[(0,X.jsx)(y,{minWidth:`15px`,maxWidth:`15px`,paddingY:3}),(0,X.jsx)(y,{width:`10%`,paddingY:3,children:`Name`}),(0,X.jsx)(y,{width:`25%`,paddingY:3,children:`Instructions`}),(0,X.jsx)(y,{width:`25%`,paddingY:3,children:`Signature`}),(0,X.jsx)(y,{width:`40%`,paddingY:3,children:`Demonstrations`})]})}),(0,X.jsx)(_,{children:d.isLoading?Array.from({length:3}).map((e,t)=>(0,X.jsxs)(g,{children:[(0,X.jsx)(b,{background:`gray.50`,children:`\xA0`}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})})]},t)):d.error?(0,X.jsx)(g,{children:(0,X.jsx)(b,{colSpan:5,color:`red.600`,children:`Error loading step data`})}):d.data.predictors.length===0?(0,X.jsx)(g,{children:(0,X.jsx)(b,{colSpan:5,children:`No entries`})}):d.data?d.data.predictors.map(({name:e,predictor:t},n)=>{let r=t?.extended_signature??t?.signature;return(0,X.jsxs)(g,{children:[(0,X.jsx)(b,{background:`gray.50`,textAlign:`center`,children:n+1}),(0,X.jsx)(b,{children:e}),(0,X.jsx)(b,{whiteSpace:`pre-wrap`,children:r?.instructions??`-`}),(0,X.jsx)(b,{children:(0,X.jsx)(Me,{signature:r})}),(0,X.jsx)(b,{children:t?.demos?(0,X.jsx)(G,{value:JSON.stringify(t.demos.map(e=>e._store?e._store:e)),collapseStringsAfterLength:140,shouldCollapse:e=>e.type===`array`,displayObjectSize:!0}):`-`})]},n)}):null})]}):null}),(0,X.jsx)(P,{value:`1`,width:`full`,height:`full`,minWidth:`0`,overflowX:`auto`,display:`flex`,padding:0,children:p===1&&(0,X.jsxs)(v,{height:`fit-content`,size:o===`sm`?`xs`:`sm`,variant:`grid`,children:[(0,X.jsx)(x,{children:(0,X.jsxs)(g,{children:[(0,X.jsx)(y,{minWidth:`15px`,maxWidth:`15px`,paddingY:3}),(0,X.jsx)(y,{width:`30%`,paddingY:3,children:`Example`}),(0,X.jsx)(y,{width:`50%`,paddingY:3,children:`Prediction`}),(0,X.jsx)(y,{width:`20%`,paddingY:3,children:`Score`}),T&&(0,X.jsx)(y,{minWidth:`200px`,paddingY:3,children:`Trace`})]})}),(0,X.jsx)(_,{children:d.isLoading?Array.from({length:3}).map((e,t)=>(0,X.jsxs)(g,{children:[(0,X.jsx)(b,{background:`gray.50`,children:`\xA0`}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})})]},t)):d.error?(0,X.jsx)(g,{children:(0,X.jsx)(b,{colSpan:4,color:`red.600`,children:`Error loading step data`})}):d.data.examples.length===0?(0,X.jsx)(g,{children:(0,X.jsx)(b,{colSpan:4,children:`No entries`})}):d.data?d.data.examples.map((e,t)=>(0,X.jsxs)(g,{children:[(0,X.jsx)(b,{background:`gray.50`,textAlign:`center`,children:t+1}),(0,X.jsx)(b,{children:(0,X.jsx)(G,{value:JSON.stringify(e.example),collapseStringsAfterLength:140})}),(0,X.jsx)(b,{children:(0,X.jsx)(G,{value:JSON.stringify(e.pred),collapseStringsAfterLength:140})}),(0,X.jsx)(b,{children:e.score}),T&&(0,X.jsx)(b,{children:(0,X.jsx)(G,{value:JSON.stringify(e.trace),collapseStringsAfterLength:140,collapsed:!0})})]},t)):null})]})}),(0,X.jsx)(P,{value:`2`,width:`full`,height:`full`,minWidth:`0`,overflowX:`auto`,display:`flex`,padding:0,children:(0,X.jsxs)(v,{height:`fit-content`,size:o===`sm`?`xs`:`sm`,variant:`grid`,children:[(0,X.jsx)(x,{children:(0,X.jsxs)(g,{children:[(0,X.jsx)(y,{minWidth:`15px`,maxWidth:`15px`,paddingY:3}),(0,X.jsx)(y,{width:`20%`,paddingY:3,children:`Model`}),(0,X.jsx)(y,{width:`25%`,paddingY:3,children:`Messages`}),(0,X.jsx)(y,{width:`45%`,paddingY:3,children:`Response`}),(0,X.jsx)(y,{width:`10%`,paddingY:3,children:`Cost`})]})}),(0,X.jsx)(_,{children:d.isLoading?Array.from({length:3}).map((e,t)=>(0,X.jsxs)(g,{children:[(0,X.jsx)(b,{background:`gray.50`,children:`\xA0`}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})}),(0,X.jsx)(b,{children:(0,X.jsx)(s,{width:`100%`,height:`30px`})})]},t)):d.error?(0,X.jsx)(g,{children:(0,X.jsx)(b,{colSpan:6,color:`red.600`,children:`Error loading step data`})}):d.data.llm_calls.length===0?(0,X.jsx)(g,{children:(0,X.jsx)(b,{colSpan:6,children:`No entries`})}):d.data?d.data.llm_calls.map((e,t)=>{let n=e.response?.choices?.[0]?.message?.content??e.response?.output;return(0,X.jsxs)(g,{children:[(0,X.jsx)(b,{background:`gray.50`,textAlign:`center`,children:t+1}),(0,X.jsx)(b,{children:e.model}),(0,X.jsx)(b,{children:(0,X.jsx)(G,{value:JSON.stringify(e.response?.prompt??e.response?.messages),collapseStringsAfterLength:140,collapsed:!0})}),(0,X.jsx)(b,{children:n||(0,X.jsx)(G,{value:JSON.stringify(e.response),collapseStringsAfterLength:140,collapsed:!0})}),(0,X.jsx)(b,{children:e.cost?q({amount:e.cost,currency:`USD`},`$0.00[0000]`):e.response.cached?(0,X.jsxs)(a,{align:`start`,children:[(0,X.jsx)(l,{children:`$0.00`}),(0,X.jsx)(l,{color:`fg.subtle`,children:`(cached)`})]}):`-`})]},t)}):null})]})})]})]})},(e,t)=>e.project.id===t.project.id&&e.experiment.slug===t.experiment.slug&&e.dspyStepSummary?.run_id===t.dspyStepSummary?.run_id&&e.dspyStepSummary?.index===t.dspyStepSummary?.index);function Me({signature:e}){let[t,n]=(0,Z.useState)(!1);return(0,X.jsxs)(u,{children:[(0,X.jsx)(a,{children:(0,X.jsxs)(i,{size:`sm`,fontSize:`14px`,fontWeight:`normal`,variant:`ghost`,onClick:()=>n(!t),children:[e?.signature??`-`,t?(0,X.jsx)(H,{width:`12px`}):(0,X.jsx)(p,{width:`12px`})]})}),t&&e?.fields?(0,X.jsx)(G,{value:JSON.stringify(Object.fromEntries(Object.entries(e.fields).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).filter(([e])=>e!==`__class__`))]))),collapseStringsAfterLength:140,collapsed:!1}):null]})}function Ne({dspyRuns:e,selectedPoint:t,setSelectedPoint:n,highlightedRun:i,selectedRuns:a,stepToDisplay:o,labelNames:s}){let c=e=>!a&&!i||!!i&&i===e||!i&&!!a&&a.includes(e),l=e.reduce((e,t)=>(c(t.runId)&&t.steps.forEach(n=>{e[n.index]={...e[n.index]??{},index:n.index,[t.runId]:n.score,[`${t.runId}_label`]:n.label,[`${t.runId}_version`]:t.workflow_version?.version}}),e),{}),u=Object.values(l).sort((e,t)=>{let n=e.index.split(`.`).map(Number),r=t.index.split(`.`).map(Number);for(let e=0;e<3;e++){let t=n[e]??0,i=r[e]??0;if(t<i)return-1;if(t>i)return 1}return 0}),d=e=>{let[t,n]=f(`colors`,e).color.split(`.`);return R(!t||!n?`gray.300`:`${t}.${n}`)},[p,m]=(0,Z.useState)(null),h=a?.[0],g=(0,Z.useMemo)(()=>u.reduce((e,t)=>{let n=t[h??``];return n===void 0?e:n>e.score?{score:n,index:t.index}:e},{score:-1/0,index:``}),[u,h]);return(0,X.jsxs)(r,{width:`100%`,position:`relative`,children:[u.length===0&&(0,X.jsxs)(r,{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,children:[`It can take up to 5 minutes for the first steps to arrive,`,(0,X.jsx)(`br`,{}),`check the logs for progress meanwhile`]}),(0,X.jsx)(_e,{height:300,children:(0,X.jsxs)(xe,{data:u,margin:{top:28,right:30,left:20,bottom:15},style:{cursor:p?`pointer`:`default`},onClick:()=>{p&&(p.runId!==t?.runId||p.index!==t?.index)?n(p):n(null)},onMouseMove:e=>{if(e.isTooltipActive&&e.activeIndex!==void 0){let t=u[e.activeIndex]?.runId,n=e.activeLabel;m(t&&n!==void 0?{runId:t.toString(),index:n.toString()}:null)}else m(null)},children:[(0,X.jsx)(ve,{strokeDasharray:`3 3`}),(0,X.jsx)(pe,{dataKey:`index`,name:`Step`,label:{value:`Step`,position:`insideBottomRight`,offset:-10}}),(0,X.jsx)(ge,{type:`number`,name:s.length==1?s[0]:`Score`,label:{value:s.length==1?s[0]:`Score`,angle:-90,position:`insideLeft`,offset:-5,style:{textAnchor:`middle`}}}),(0,X.jsx)(me,{content:(0,X.jsx)(Ce,{}),labelFormatter:e=>`Step ${e}`,formatter:(e,t,n)=>{let r=n.payload[`${t}_label`],i=n.payload[`${t}_version`];return[(0,Y.default)(e).format(`0.[00]`),[i?`[${i}]`:t,r].filter(e=>e).join(` `)]}}),g.index&&(0,X.jsx)(W,{x:g.index,y:g.score,r:8,fill:`gold`,stroke:`none`,children:(0,X.jsx)(he,{value:`Best`,position:`top`,offset:10,fill:R(`gray.700`),fontSize:`12px`})}),e.map(({runId:e})=>c(e)?(0,X.jsx)(be,{type:`monotone`,dataKey:e,stroke:d(e),name:e,dot:{r:5,fill:d(e)},isAnimationActive:!1},e):null),o&&(!i||i===o.run_id)&&(0,X.jsx)(W,{x:o.index,y:l[o.index]?.[o.run_id],stroke:d(o.run_id),fill:d(o.run_id)})]})})]})}function Pe({project:e,experiment:t,run:n,onApply:r,onViewLogs:o}){let{selectedPoint:s}=$({project:e,experiment:t}),{totalCost:c,bestScore:d,bestScoreStepSummary:f,bestScoreLabel:p}=(0,Z.useMemo)(()=>{let e=n?.steps?.map(e=>e.llm_calls_summary.total_cost).reduce((e,t)=>e+t,0),t=n?.steps?.map(e=>e.score).reduce((e,t)=>t>e?t:e,0),r=n?.steps?.find(e=>e.score===t);return{totalCost:e,bestScore:t,bestScoreStepSummary:r,bestScoreLabel:r?.label}},[n]),m=F.experiments.getExperimentDSPyStep.useQuery({projectId:e.id,experimentSlug:t.slug,runId:f?.run_id??``,index:f?.index??``},{enabled:!!f&&!!r}),h=F.experiments.getExperimentDSPyStep.useQuery({projectId:e.id,experimentSlug:t.slug,runId:s?.runId??``,index:s?.index??``},{enabled:!!s}),g=e=>{let t=e.map(e=>({id:e.name,instructions:e.predictor.extended_signature?.instructions??e.predictor.signature?.instructions,fields:Object.entries(e.predictor.signature?.fields??{}).map(([e,t])=>({identifier:e,field_type:t.field_type??`input`,prefix:t.prefix,desc:t.desc})),demonstrations:e.predictor.demos?.map(e=>e._store??e).filter(Boolean)}));r&&r(t)};return(0,X.jsxs)(a,{position:`sticky`,left:0,bottom:0,width:`100%`,background:`bg.surface`,borderTop:`1px solid`,borderColor:`border`,paddingY:4,paddingX:6,gap:5,children:[(0,X.jsxs)(u,{align:`start`,gap:1,children:[(0,X.jsx)(l,{fontWeight:`500`,lineClamp:1,children:!p||p===`score`?`Best Score`:U(p)}),(0,X.jsx)(l,{lineClamp:1,whiteSpace:`nowrap`,children:(0,Y.default)(d).format(`0.[00]`)})]}),(0,X.jsx)(S,{orientation:`vertical`,height:`48px`}),(0,X.jsxs)(u,{align:`start`,gap:1,children:[(0,X.jsx)(l,{fontWeight:`500`,lineClamp:1,children:`Total Cost`}),(0,X.jsx)(l,{lineClamp:1,whiteSpace:`nowrap`,children:n&&c?(0,X.jsx)(we,{amount:c,currency:`USD`,format:`$0.00[00]`}):`-`})]}),(0,X.jsx)(M,{}),o&&(0,X.jsx)(i,{size:`sm`,onClick:o,variant:`ghost`,children:`View Logs`}),s&&r&&(0,X.jsx)(i,{size:`md`,variant:`ghost`,onClick:()=>{!s||!h.data||g(h.data.predictors)},children:`Apply Selected Step`}),m.data&&r&&(0,X.jsxs)(i,{size:`md`,colorPalette:`green`,onClick:()=>{m.data&&g(m.data.predictors)},children:[(0,X.jsx)(V,{}),` Apply Best Optimization`]})]})}function Fe(){let e=L(),{project:t}=ue(),{experiment:n}=e.query,i=F.experiments.getExperimentBySlugOrId.useQuery({projectId:t?.id??``,experimentSlug:n},{enabled:!!t&&typeof n==`string`}),a=ae(i.error),o=i.isError&&!a;return a?(0,X.jsx)(T,{children:(0,X.jsx)(r,{padding:6,children:(0,X.jsxs)(D,{status:`warning`,children:[(0,X.jsx)(k,{}),(0,X.jsx)(E,{children:`Experiment not found`}),(0,X.jsx)(O,{children:`The experiment you're looking for doesn't exist or you don't have access to it.`})]})})}):o?(0,X.jsx)(T,{children:(0,X.jsx)(r,{padding:6,children:(0,X.jsx)(ne,{error:i.error,fallbackTitle:`Couldn't load this experiment`})})}):(0,X.jsx)(T,{children:t&&i.data?.type===J.ExperimentType.DSPY?(0,X.jsx)(ke,{project:t,experiment:i.data}):t&&i.data?.type===J.ExperimentType.BATCH_EVALUATION?(0,X.jsx)(Ee,{project:t,experiment:i.data}):!t||i.data===void 0||i.data.type===J.ExperimentType.BATCH_EVALUATION_V2||i.data.type===J.ExperimentType.EVALUATIONS_V3?(0,X.jsx)(se,{project:t,experiment:i.data}):(0,X.jsx)(r,{padding:6,children:(0,X.jsxs)(D,{status:`warning`,children:[(0,X.jsx)(k,{}),(0,X.jsx)(E,{children:`Unknown experiment type`}),(0,X.jsxs)(O,{children:[`This experiment has an unrecognized type: `,i.data.type]})]})})})}export{Fe as default};
2
+ //# sourceMappingURL=_experiment_-Cv2h4AYK.js.map
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{a as n,dn as r,i}from"./portal-Sdfvrza9.js";import{t as a}from"./jsx-runtime-CFwixLRt.js";import{n as o,t as s}from"./v-stack-hkuSkmCA.js";import{d as c}from"./toaster-BsYkODqs.js";import{tt as l}from"./Markdown-Cip8Rj5C.js";import{Bt as u,V as d,bt as f,dt as p,t as m,xt as h}from"./DashboardLayout-Cn5-9Ye2.js";import{i as g,n as _,r as v,t as y}from"./alert-CPsXih3K.js";import{n as b}from"./errors-mlatPkMI.js";import{n as x}from"./api-l6Cnm0vQ.js";import{r as S}from"./next-router-CWLrMXvP.js";import{Pr as C,t as w}from"./index-8SbDirJv.js";var T=c(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),E=e(t()),D=a(),O=()=>void 0;function k(){let e=h(),t=u(e=>e.selectedSpanId),n=e?.header??null,i=e?.spanTree??[],a=(0,E.useMemo)(()=>t?i.find(e=>e.spanId===t)??null:null,[t,i]);return n?(0,D.jsxs)(r,{flex:1,minHeight:0,width:`full`,display:`flex`,flexDirection:`column`,overflow:`hidden`,position:`relative`,children:[e?.isSpanDetailTruncated&&(0,D.jsx)(r,{paddingX:4,paddingTop:3,children:(0,D.jsxs)(g,{status:`info`,size:`sm`,variant:`subtle`,width:`full`,children:[(0,D.jsx)(v,{}),(0,D.jsx)(y,{children:(0,D.jsxs)(_,{fontSize:`sm`,children:[`This is a large trace. The timeline below is complete, but step-by-step detail is only shown for the first`,` `,e.spansFull.length.toLocaleString(),` steps.`]})})]})}),(0,D.jsx)(d,{traceId:n.traceId,trace:n,spanTree:i,selectedSpan:a,isLoading:!1,isSpansLoading:!1,onClose:O,readOnly:!0})]}):(0,D.jsx)(C,{flex:1,padding:8,children:(0,D.jsx)(o,{color:`fg.muted`,children:`This shared trace didn't load. Refresh the page, or ask whoever shared it for a new link.`})})}function A(){return(0,D.jsxs)(s,{gap:3,width:`full`,paddingTop:2,children:[(0,D.jsx)(l,{}),(0,D.jsx)(o,{fontSize:`14px`,color:`fg.muted`,maxWidth:`420px`,children:`LangWatch shows you what your AI agents actually did — every call, its cost, and where it went wrong.`}),(0,D.jsxs)(s,{gap:2,children:[(0,D.jsx)(w,{href:`/auth/signup`,children:(0,D.jsx)(i,{colorPalette:`orange`,children:`Create a free account`})}),(0,D.jsx)(w,{href:`/auth/signin`,children:(0,D.jsx)(o,{fontSize:`13px`,color:`fg.muted`,textDecoration:`underline`,children:`Already have an account?`})})]})]})}function j(){let e=S(),t=typeof e.query.id==`string`?e.query.id:``,r=x.sharedTrace.get.useQuery({token:t},{enabled:!!t,staleTime:1/0,retry:!1,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1});return r.isError?(0,D.jsx)(b,{error:r.error,fallbackTitle:`This share link isn't available`,icon:(0,D.jsx)(T,{size:44,strokeWidth:1.5}),children:(0,D.jsx)(A,{})}):r.isSuccess?(0,D.jsx)(m,{publicPage:!0,children:(0,D.jsx)(f,{value:r.data,children:(0,D.jsx)(p,{traceId:r.data.header.traceId,isReadOnly:!0,children:(0,D.jsx)(k,{})})})}):(0,D.jsx)(C,{height:`100vh`,padding:8,children:(0,D.jsx)(n,{size:`lg`})})}export{j as default};
2
+ //# sourceMappingURL=_id_-BoubOQoS.js.map
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{a as t,dn as n,n as r}from"./portal-Sdfvrza9.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./heading-C0sACr0w.js";import{n as o,t as s}from"./v-stack-hkuSkmCA.js";import{Nn as c,Sn as l,vn as u}from"./ProjectAvatar-B0tbfKzY.js";import{n as d}from"./api-l6Cnm0vQ.js";import{t as f}from"./GovernanceLayout-Baar1Fc8.js";import{r as p}from"./next-router-CWLrMXvP.js";import{Vt as m,t as h}from"./index-8SbDirJv.js";import{t as g}from"./WithFeatureFlagGuard-CgkIIt3_.js";import{t as _}from"./WithPermissionGuard-Da_hdEdq.js";var v=e(l()),y=i(),b=e=>e===0?`$0.00`:(0,v.default)(e).format(`$0,0.00`),x=e=>{if(!e)return`—`;let t=typeof e==`string`?new Date(e):e;if(Number.isNaN(t.getTime()))return`—`;let n=Date.now()-t.getTime();if(n<0)return`just now`;let r=Math.floor(n/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`};function S(){let e=p(),i=typeof e.query.id==`string`?e.query.id:null,{organization:l,organizations:g}=m({redirectToOnboarding:!1}),_=l?.id??``,S=g?.flatMap(e=>e.teams??[]).find(e=>e.id===i)?.projects?.[0]?.slug??null,w=d.activityMonitor.spendByTeam.useQuery({organizationId:_,windowDays:30,limit:500},{enabled:!!_,refetchOnWindowFocus:!1}),T=(w.data??[]).find(e=>e.teamId===i);return(0,y.jsx)(f,{pageTitle:T?`${T.teamName} · AI Governance · LangWatch`:`Team · AI Governance · LangWatch`,children:(0,y.jsxs)(s,{align:`stretch`,gap:4,width:`full`,maxW:`container.xl`,children:[(0,y.jsxs)(s,{align:`start`,gap:1,children:[(0,y.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[(0,y.jsx)(h,{href:`/settings/governance`,color:`blue.600`,children:`← AI Governance`}),` `,`·`,` `,(0,y.jsx)(h,{href:`/settings/governance/teams`,color:`blue.600`,children:`All teams`})]}),(0,y.jsxs)(r,{gap:2,children:[(0,y.jsx)(n,{width:`14px`,height:`14px`,borderRadius:`full`,backgroundColor:T?u(T.teamName):`fg.muted`}),(0,y.jsx)(a,{size:`md`,children:T?.teamName??`Team not found`})]})]}),w.isLoading?(0,y.jsx)(t,{}):T?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(c,{columns:{base:1,md:4},gap:3,children:[(0,y.jsx)(C,{label:`Spend (30 d)`,value:b(T.spendUsd)}),(0,y.jsx)(C,{label:`Requests`,value:(0,v.default)(T.requestCount).format(`0,0`)}),(0,y.jsx)(C,{label:`Last active`,value:x(T.lastActivityIso)}),(0,y.jsx)(C,{label:`Sources`,value:`${T.sourceCount} ${T.sourceCount===1?`source`:`sources`}`})]}),(0,y.jsxs)(n,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:4,children:[(0,y.jsx)(o,{fontSize:`sm`,fontWeight:`medium`,marginBottom:1,children:`Detail metrics`}),(0,y.jsx)(o,{fontSize:`xs`,color:`fg.muted`,marginBottom:3,children:`Per-day spend, per-user breakdown, and model mix for this team will land here in a follow-up.`}),S&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(h,{href:`/${S}/traces`,color:`blue.600`,fontSize:`sm`,fontWeight:`medium`,children:`View this team's workspace traces →`}),(0,y.jsx)(o,{fontSize:`xs`,color:`fg.subtle`,marginTop:1,marginBottom:3,children:`The trace explorer opens with the team's data. A 'Viewing as admin' banner stays present + the access is logged to /settings/audit-log.`})]}),(0,y.jsx)(h,{href:`/settings/governance`,color:`blue.600`,fontSize:`sm`,fontWeight:`medium`,children:`See this team in the bird's-eye chart →`}),(0,y.jsxs)(o,{fontSize:`xs`,color:`fg.subtle`,marginTop:1,children:[`The chart's `,`'By Team'`,` toggle exercises the same data through one orthogonal lens until the dedicated drilldown ships.`]})]})]}):(0,y.jsx)(n,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:5,children:(0,y.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`No spend data for this team in the last 30 days. The team may not have any associated ingestion sources reporting activity yet.`})})]})})}function C({label:e,value:t}){return(0,y.jsxs)(n,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:3,children:[(0,y.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`wider`,children:e}),(0,y.jsx)(a,{as:`span`,size:`sm`,marginTop:1,children:t})]})}var w=g(`release_ui_ai_governance_enabled`,{bypassOnboardingRedirect:!0})(_(`organization:manage`,{bypassOnboardingRedirect:!0})(S));export{w as default};
2
+ //# sourceMappingURL=_id_-BuzJEIUf.js.map
@@ -0,0 +1,2 @@
1
+ import{dn as e}from"./portal-Sdfvrza9.js";import{t}from"./jsx-runtime-CFwixLRt.js";import{n,t as r}from"./v-stack-hkuSkmCA.js";import{n as i}from"./api-l6Cnm0vQ.js";import{r as a}from"./next-router-CWLrMXvP.js";import{Vt as o}from"./index-8SbDirJv.js";import s from"./custom-wRFdLdR4.js";var c=t();function l(){let t=a().query.id,{project:l}=o(),u=i.graphs.getById.useQuery({projectId:l?.id??``,id:t??``},{enabled:!!l?.id&&!!t,retry:!1}),d=u.data?.graph,f=u.data?.name,p=u.data?.alert,m=p!=null&&p.type!=null&&(p.action===`SEND_EMAIL`||p.action===`SEND_SLACK_MESSAGE`)?p:void 0;return u.error?(0,c.jsxs)(r,{align:`start`,p:8,gap:2,children:[(0,c.jsx)(n,{fontSize:`xl`,fontWeight:`bold`,children:`Graph not found`}),(0,c.jsx)(n,{color:`gray.600`,children:`The graph you are looking for does not exist or you do not have access to it.`})]}):u.isLoading?(0,c.jsx)(e,{p:8,children:`Loading…`}):d?(0,c.jsx)(s,{customId:t,graph:d,name:f??``,filters:u.data?.filters,alert:m}):null}export{l as default};
2
+ //# sourceMappingURL=_id_-BzLlrR7z.js.map
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{a as n,dn as r,i,n as a}from"./portal-Sdfvrza9.js";import{t as o}from"./jsx-runtime-CFwixLRt.js";import{t as s}from"./heading-C0sACr0w.js";import{n as c,t as l}from"./v-stack-hkuSkmCA.js";import{Yn as u}from"./ProjectAvatar-B0tbfKzY.js";import{t as d}from"./badge-Cpc3eA-C.js";import{t as f}from"./tooltip-CM-lMDNU.js";import{a as p,n as m}from"./toaster-BsYkODqs.js";import{$ as h,D as g,G as _,J as v,Q as y,X as b,Y as x,Z as S,r as C,tt as w}from"./Markdown-Cip8Rj5C.js";import{L as ee}from"./DashboardLayout-Cn5-9Ye2.js";import{t as T}from"./errors-mlatPkMI.js";import{t as te}from"./spacer-C38e7o6r.js";import{s as E}from"./immer-DImI3Uq2.js";import{n as D}from"./api-l6Cnm0vQ.js";import{t as O}from"./AiGatewayLayout-BqznP5T2.js";import{n as ne}from"./log-out-CUZz1cYc.js";import{t as re}from"./file-clock-BzjyK-8R.js";import{r as ie}from"./next-router-CWLrMXvP.js";import{D as k,Vt as ae,Zn as oe,nr as se,t as A}from"./index-8SbDirJv.js";import{t as j}from"./WithPermissionGuard-Da_hdEdq.js";import{d as M,rt as N,u as P,xn as F,y as I}from"./CartesianChart-Ci1mTvgb.js";import{n as L,t as R}from"./AreaChart-PNFZHqkl.js";import{t as ce}from"./FieldInfoTooltip-C_hEtQpK.js";import{t as z}from"./ProviderScopeChips-DN3rtvAE.js";import{t as le}from"./useRollingWindow-DiOB7anQ.js";import{C as B,S as ue,n as de,r as fe,t as pe,x as V}from"./VirtualKeySecretReveal-B9QMNIxJ.js";var H=e(t()),U=o();function W(e,t){switch(e.scopeType){case`ORGANIZATION`:return t.organizationName;case`TEAM`:return t.teamNames.get(e.scopeId);case`PROJECT`:return t.projectNames.get(e.scopeId)}}function G(e,t){let n=e.map(e=>W(e,t)??e.scopeId);return n.length<=1?n[0]??``:`${n.slice(0,-1).join(`, `)} and ${n[n.length-1]}`}function me({scopes:e,organizationId:t,organizationName:i,availableTeams:o,availableProjects:s,isLoading:u,providers:d,selectedModel:f,onSelectProviderModel:p}){let m=(0,H.useMemo)(()=>V(s,t),[s,t]),h=(0,H.useMemo)(()=>({organizationName:i,teamNames:new Map(o.map(e=>[e.id,e.name])),projectNames:new Map(s.map(e=>{let t=e.name.split(` · `)[0]??e.name;return[e.id,t]}))}),[o,s,i]),g=(0,H.useMemo)(()=>B(e,d,m),[e,d,m]);if(e.length===0)return(0,U.jsx)(c,{fontSize:`xs`,color:`fg.muted`,children:`Pick a scope above to preview the routable models.`});if(u)return(0,U.jsxs)(a,{gap:2,children:[(0,U.jsx)(n,{size:`xs`}),(0,U.jsx)(c,{fontSize:`xs`,color:`fg.muted`,children:`Resolving eligible model providers…`})]});if(g.length===0)return(0,U.jsxs)(l,{align:`stretch`,gap:2,borderWidth:`1px`,borderColor:`orange.200`,borderRadius:`md`,background:`orange.50`,padding:3,children:[(0,U.jsx)(c,{fontSize:`sm`,fontWeight:`medium`,children:`No model providers visible at this scope.`}),(0,U.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[`Ask an admin to add one at`,` `,(0,U.jsx)(c,{as:`span`,fontFamily:`mono`,children:`/settings/model-providers`}),`. The key cannot route requests until at least one provider is in scope.`]})]});let _=!!p;return(0,U.jsx)(l,{align:`stretch`,gap:1,children:g.map(e=>{let t=e.provider in E?E[e.provider]:null,n=f===e.defaultModel;return(0,U.jsxs)(a,{borderWidth:`1px`,borderColor:n?`blue.400`:`border.subtle`,borderRadius:`md`,paddingX:2,paddingY:1.5,gap:2,cursor:_?`pointer`:`default`,background:n?`blue.50`:void 0,_hover:_?{background:n?`blue.50`:`bg.subtle`}:void 0,onClick:_?()=>p?.(e.defaultModel):void 0,title:_?`Use ${e.defaultModel} in the snippet above`:void 0,children:[(0,U.jsx)(r,{width:`16px`,height:`16px`,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,css:{"& > svg":{width:`100%`,height:`100%`}},children:t}),(0,U.jsx)(c,{fontSize:`sm`,fontWeight:`medium`,children:e.label}),e.modelCount>0&&(0,U.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[`· `,e.modelCount,` `,e.modelCount===1?`model`:`models`]}),_&&(0,U.jsx)(c,{fontSize:`2xs`,color:`fg.muted`,fontFamily:`mono`,children:e.defaultModel}),(0,U.jsx)(r,{flex:1}),(0,U.jsx)(z,{size:`xs`,scopes:[{scopeType:e.definedAt.scopeType,scopeId:e.definedAt.scopeId,name:W(e.definedAt,h)}]})]},e.id)})})}function he({scopes:e,organizationId:t,organizationName:n,availableTeams:r,availableProjects:i,isLoading:a,providers:o}){let s=(0,H.useMemo)(()=>V(i,t),[i,t]),l=(0,H.useMemo)(()=>({organizationName:n,teamNames:new Map(r.map(e=>[e.id,e.name])),projectNames:new Map(i.map(e=>{let t=e.name.split(` · `)[0]??e.name;return[e.id,t]}))}),[r,i,n]),u=(0,H.useMemo)(()=>B(e,o,s),[e,o,s]);if(e.length===0||a||u.length===0)return null;let d=G(e,l),f=u.reduce((e,t)=>e+t.modelCount,0);return(0,U.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[`This key works in `,d,` and can route to`,` `,u.length===1?`1 provider`:`${u.length} providers`,f>0?` (${f} ${f===1?`model`:`models`})`:``,`.`]})}function ge({scopes:e}){return(0,U.jsx)(A,{href:(0,H.useMemo)(()=>{if(e.length===0)return`/settings/model-providers`;let t=new URLSearchParams;for(let n of e)t.append(`scope`,`${n.scopeType}:${n.scopeId}`);return`/settings/model-providers?${t.toString()}`},[e]),target:`_blank`,rel:`noopener noreferrer`,color:`blue.600`,fontSize:`xs`,children:(0,U.jsxs)(a,{gap:1,alignItems:`center`,children:[(0,U.jsx)(c,{as:`span`,children:`Configure`}),(0,U.jsx)(p,{size:11})]})})}var K=[`PRE`,`POST`,`STREAM_CHUNK`],q={PRE:{wire:`pre`,label:`Pre-request`,hint:`Runs on the inbound prompt before it reaches the provider.`},POST:{wire:`post`,label:`Post-response`,hint:`Runs on the full completion before it returns to the caller.`},STREAM_CHUNK:{wire:`stream_chunk`,label:`Stream chunk`,hint:`Runs on each streamed chunk as it passes through.`}};function J(e){let t=new Set;for(let n of e)for(let e of n.guardrailIds)t.add(e);return t}function _e({organizationId:e,vkId:t,projectId:o,projectSlug:s,attachments:u,canAttach:f,onSaved:p}){let h=(0,H.useMemo)(()=>J(u),[u]),[_,v]=(0,H.useState)(h);(0,H.useEffect)(()=>{v(new Set(h))},[h]);let y=D.gatewayGuardrails.list.useQuery({projectId:o??``},{enabled:!!o}),b=D.virtualKeys.update.useMutation({onSuccess:()=>{m.create({title:`Guardrails updated`,type:`success`}),p()},onError:e=>{T({error:e,fallbackTitle:`Couldn't update the guardrails`})}});if(!o)return(0,U.jsx)(Y,{children:(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`Guardrails are project-scoped. Scope this key to a single project to attach the project's guardrails.`})});if(y.isLoading)return(0,U.jsx)(Y,{children:(0,U.jsx)(n,{size:`sm`})});let x=y.data??[];if(x.length===0)return(0,U.jsx)(Y,{children:(0,U.jsxs)(c,{fontSize:`sm`,color:`fg.muted`,children:[`No guardrails defined in this project yet.`,` `,s?(0,U.jsx)(A,{href:`/settings/gateway/guardrails`,color:`blue.500`,fontWeight:`medium`,children:`Create one`}):`Create one from the Guardrails admin page`,` `,`to attach it here.`]})});let S=K.map(e=>({dir:e,meta:q[e],rows:x.filter(t=>t.direction===e)})).filter(e=>e.rows.length>0),C=_.size!==h.size||[..._].some(e=>!h.has(e)),w=e=>{v(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,U.jsx)(Y,{children:(0,U.jsxs)(l,{align:`stretch`,gap:4,children:[S.map(({dir:e,meta:t,rows:n})=>(0,U.jsxs)(r,{children:[(0,U.jsxs)(a,{gap:2,mb:1,children:[(0,U.jsx)(c,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:t.label}),(0,U.jsx)(c,{fontSize:`xs`,color:`fg.subtle`,children:t.hint})]}),(0,U.jsx)(l,{align:`stretch`,gap:1.5,children:n.map(e=>(0,U.jsx)(g,{checked:_.has(e.id),disabled:!f,onCheckedChange:()=>w(e.id),children:(0,U.jsxs)(a,{gap:2,children:[(0,U.jsx)(c,{fontSize:`sm`,children:e.name}),e.failureMode===`FAIL_CLOSED`?(0,U.jsx)(d,{size:`sm`,colorPalette:`red`,variant:`subtle`,children:`fail closed`}):(0,U.jsx)(d,{size:`sm`,colorPalette:`gray`,variant:`subtle`,children:`fail open`})]})},e.id))})]},e)),!f&&(0,U.jsx)(c,{fontSize:`xs`,color:`fg.subtle`,children:`You need the gatewayGuardrails:attach permission in this project to change attachments.`}),(0,U.jsx)(a,{justifyContent:`flex-end`,children:(0,U.jsx)(i,{size:`sm`,colorPalette:`blue`,disabled:!f||!C,loading:b.isPending,onClick:()=>{let n=new Map;for(let e of x){if(!_.has(e.id))continue;let t=q[e.direction].wire,r=n.get(t)??[];r.push(e.id),n.set(t,r)}let r=[...n.entries()].map(([e,t])=>({direction:e,guardrailIds:t})).filter(e=>e.guardrailIds.length>0);b.mutate({organizationId:e,id:t,config:{guardrailAttachments:r}})},children:`Save guardrails`})})]})})}function Y({children:e}){return(0,U.jsxs)(r,{children:[(0,U.jsx)(c,{fontSize:`sm`,fontWeight:`semibold`,mb:2,children:`Guardrails`}),(0,U.jsx)(w,{mb:3}),e]})}function X(){let{organization:e,hasPermission:t}=ae(),o=ie(),s=typeof o.query.id==`string`?o.query.id:``,p=e?.id??``,m=D.virtualKeys.get.useQuery({organizationId:p,id:s},{enabled:!!p&&!!s}),h=D.modelProvider.listAllForOrganizationForFrontend.useQuery({organizationId:p},{enabled:!!p}),g=(0,H.useMemo)(()=>e?.teams?.map(e=>({id:e.id,name:e.name}))??[],[e?.teams]),v=(0,H.useMemo)(()=>e?.teams?.flatMap(e=>e.projects.map(t=>({id:t.id,name:`${t.name} · ${e.name}`,teamId:e.id})))??[],[e?.teams]),y=(0,H.useMemo)(()=>{let t=new Map;for(let n of e?.teams??[])t.set(n.id,n.name);return t},[e?.teams]),b=(0,H.useMemo)(()=>{let t=new Map;for(let n of e?.teams??[])for(let e of n.projects)t.set(e.id,e.name);return t},[e?.teams]),x=le(30),S=D.gatewayUsage.summaryForVirtualKey.useQuery({organizationId:p,virtualKeyId:s,fromDate:x.fromIso,toDate:x.toIso},{enabled:!!p&&!!s}),w=D.useContext(),E=D.virtualKeys.rotate.useMutation({onSuccess:()=>w.virtualKeys.get.invalidate({organizationId:p,id:s})}),j=D.virtualKeys.revoke.useMutation({onSuccess:()=>w.virtualKeys.get.invalidate({organizationId:p,id:s})}),[M,N]=(0,H.useState)(!1),[P,F]=(0,H.useState)(!1),[I,L]=(0,H.useState)(!1),[R,B]=(0,H.useState)(null),[V,W]=(0,H.useState)(null),G=t(`virtualKeys:update`),K=t(`virtualKeys:rotate`),q=t(`gatewayGuardrails:attach`),J=m.data,Y=(0,H.useMemo)(()=>ue({scopes:J?.scopes??[],providers:h.data?.providers??[],availableProjects:v,organizationId:p}),[J?.scopes,h.data?.providers,v,p]),X=V??Y??`gpt-5-mini`,$=(0,H.useMemo)(()=>{let t=(J?.scopes??[]).filter(e=>e.scopeType===`PROJECT`);if(t.length!==1)return null;let n=t[0].scopeId;for(let t of e?.teams??[]){let e=t.projects.find(e=>e.id===n);if(e)return{id:e.id,slug:e.slug}}return{id:n,slug:null}},[J?.scopes,e?.teams]),ye=(0,H.useMemo)(()=>J?.config?.guardrailAttachments??[],[J?.config]);return(0,U.jsxs)(O,{children:[(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(ee.Header,{children:[(0,U.jsx)(a,{children:(0,U.jsx)(A,{href:`/settings/gateway/virtual-keys`,color:`fg.muted`,fontSize:`sm`,children:(0,U.jsxs)(a,{gap:1,children:[(0,U.jsx)(ne,{size:14}),` Virtual Keys`]})})}),(0,U.jsx)(ee.Heading,{children:J?.name??`Virtual key`}),(0,U.jsx)(te,{}),J&&(0,U.jsxs)(a,{children:[(0,U.jsx)(A,{href:`/settings/audit-log?targetKind=virtual_key&targetId=${J.id}`,children:(0,U.jsxs)(i,{variant:`outline`,size:`sm`,children:[(0,U.jsx)(re,{size:14}),` Audit history`]})}),J.status===`active`&&G&&(0,U.jsxs)(i,{variant:`outline`,size:`sm`,onClick:()=>N(!0),children:[(0,U.jsx)(se,{size:14}),` Edit`]}),J.status===`active`&&K&&(0,U.jsxs)(i,{variant:`outline`,size:`sm`,onClick:()=>F(!0),children:[(0,U.jsx)(oe,{size:14}),` Rotate`]}),J.status===`active`&&G&&(0,U.jsxs)(i,{colorPalette:`red`,variant:`outline`,size:`sm`,onClick:()=>L(!0),children:[(0,U.jsx)(_,{size:14}),` Revoke`]})]})]}),(0,U.jsx)(r,{padding:6,width:`full`,maxWidth:`1600px`,marginX:`auto`,children:m.isLoading?(0,U.jsx)(n,{}):J?(0,U.jsxs)(l,{align:`stretch`,gap:6,maxWidth:`900px`,children:[(0,U.jsxs)(Z,{title:`Identity`,children:[(0,U.jsx)(Q,{label:`Prefix`,children:(0,U.jsxs)(a,{gap:1,children:[(0,U.jsxs)(u,{fontSize:`xs`,children:[J.displayPrefix,`…`]}),(0,U.jsx)(ce,{description:`First chars of the secret. The full secret is shown only once at create or rotate — if it's lost, rotate the key to mint a fresh one.`})]})}),(0,U.jsx)(Q,{label:`Status`,children:(0,U.jsx)(d,{colorPalette:J.status===`active`?`green`:`red`,children:J.status})}),J.description&&(0,U.jsx)(Q,{label:`Description`,children:(0,U.jsx)(c,{fontSize:`sm`,children:J.description})})]}),(0,U.jsxs)(Z,{title:`Activity`,children:[(0,U.jsx)(Q,{label:`Last used`,children:J.lastUsedAt?(0,U.jsx)(f,{content:new Date(J.lastUsedAt).toLocaleString(),children:(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:k(new Date(J.lastUsedAt).getTime())})}):(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`never`})}),(0,U.jsx)(Q,{label:`Created`,children:(0,U.jsx)(f,{content:new Date(J.createdAt).toLocaleString(),children:(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:k(new Date(J.createdAt).getTime())})})}),(0,U.jsx)(Q,{label:`Revision`,children:(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:J.revision})})]}),(0,U.jsx)(Z,{title:`How to use`,children:(0,U.jsx)(de,{model:X})}),(0,U.jsx)(Z,{title:`Scope & routing`,children:(0,U.jsxs)(l,{align:`stretch`,gap:3,children:[(0,U.jsx)(z,{scopes:(J.scopes??[]).map(t=>({scopeType:t.scopeType,scopeId:t.scopeId,name:t.scopeType===`ORGANIZATION`?e?.name:t.scopeType===`TEAM`?y.get(t.scopeId):b.get(t.scopeId)})),principal:J.principalUserId&&J.principalUser?{name:J.principalUser.name,email:J.principalUser.email}:void 0}),(0,U.jsxs)(a,{children:[(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`Routing policy:`}),J.routingPolicyId?(0,U.jsx)(u,{fontSize:`xs`,children:J.routingPolicyId}):(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`default cascade — all eligible providers in priority order`})]}),(0,U.jsx)(he,{scopes:J.scopes??[],organizationId:p,organizationName:e?.name,availableTeams:g,availableProjects:v,isLoading:h.isLoading,providers:h.data?.providers??[]}),(0,U.jsxs)(r,{children:[(0,U.jsxs)(a,{mb:1.5,alignItems:`center`,gap:2,justifyContent:`space-between`,children:[(0,U.jsx)(c,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Eligible model providers`}),(0,U.jsx)(ge,{scopes:J.scopes??[]})]}),(0,U.jsx)(me,{scopes:J.scopes??[],organizationId:p,organizationName:e?.name,availableTeams:g,availableProjects:v,isLoading:h.isLoading,providers:h.data?.providers??[],selectedModel:X,onSelectProviderModel:W})]})]})}),(0,U.jsx)(_e,{organizationId:p,vkId:J.id,projectId:$?.id??null,projectSlug:$?.slug??null,attachments:ye,canAttach:q,onSaved:()=>void m.refetch()}),(0,U.jsx)(xe,{config:J.config}),(0,U.jsx)(ve,{data:S.data??null})]}):(0,U.jsx)(c,{color:`fg.muted`,children:`Virtual key not found.`})})]}),p&&J&&(0,U.jsx)(fe,{organizationId:p,vk:M?J:null,onOpenChange:e=>{e||N(!1)},onSaved:()=>{N(!1),m.refetch()}}),(0,U.jsx)(C,{open:P,onOpenChange:F,title:`Rotate ${J?.name??`virtual key`}?`,message:`A fresh secret will be minted and shown once. The current secret keeps working for 24h (grace window) so clients can roll over.`,confirmLabel:`Rotate secret`,tone:`warning`,loading:E.isPending,onConfirm:async()=>{if(!(!J||!p))try{let e=await E.mutateAsync({organizationId:p,id:J.id});B({name:J.name,secret:e.secret}),F(!1)}catch(e){T({error:e,fallbackTitle:`Couldn't rotate the key`})}}}),(0,U.jsx)(C,{open:I,onOpenChange:L,title:`Revoke ${J?.name??`virtual key`}?`,message:`Clients using this key start receiving 401s within ~60 seconds. This cannot be undone — revoked keys are never reactivated.`,confirmLabel:`Revoke key`,tone:`danger`,loading:j.isPending,onConfirm:async()=>{if(!(!J||!p))try{await j.mutateAsync({organizationId:p,id:J.id}),L(!1)}catch(e){T({error:e,fallbackTitle:`Couldn't revoke the key`})}}}),(0,U.jsx)(pe,{open:!!R,onClose:()=>B(null),keyName:R?.name??``,secret:R?.secret??``,model:X,kind:`rotate`})]})}function Z({title:e,children:t}){return(0,U.jsxs)(r,{children:[(0,U.jsx)(s,{size:`sm`,mb:2,children:e}),(0,U.jsx)(w,{mb:3}),(0,U.jsx)(l,{align:`stretch`,gap:2,children:t})]})}function Q({label:e,children:t}){return(0,U.jsxs)(a,{gap:4,align:`flex-start`,children:[(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,minWidth:`140px`,children:e}),t]})}function ve({data:e}){if(!e)return(0,U.jsx)(Z,{title:`Usage (last 30 days)`,children:(0,U.jsx)(n,{size:`sm`})});if(e.totalRequests===0)return(0,U.jsx)(Z,{title:`Usage (last 30 days)`,children:(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`No usage in the last 30 days. Send a request through this virtual key and it'll show up here.`})});let t=e.byDay.map(e=>({day:e.day,spendUsd:Number(e.totalUsd),requests:e.requests}));return(0,U.jsx)(Z,{title:`Usage (last 30 days)`,children:(0,U.jsxs)(l,{align:`stretch`,gap:4,children:[(0,U.jsxs)(a,{gap:6,wrap:`wrap`,children:[(0,U.jsx)($,{label:`Total spend`,value:`$${Number(e.totalUsd).toFixed(2)}`}),(0,U.jsx)($,{label:`Requests`,value:e.totalRequests.toLocaleString()}),(0,U.jsx)($,{label:`Avg $/request`,value:ye(e.avgUsdPerRequest)}),e.blockedRequests>0&&(0,U.jsx)($,{label:`Blocked`,value:e.blockedRequests.toLocaleString(),tone:`red`})]}),t.length>=2&&(0,U.jsx)(r,{borderWidth:`1px`,borderColor:`border.subtle`,borderRadius:`lg`,padding:3,height:`180px`,children:(0,U.jsx)(F,{width:`100%`,height:`100%`,children:(0,U.jsxs)(R,{data:t,margin:{top:8,right:8,bottom:0,left:0},children:[(0,U.jsx)(`defs`,{children:(0,U.jsxs)(`linearGradient`,{id:`vkSpendFill`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,U.jsx)(`stop`,{offset:`0%`,stopColor:`#f97316`,stopOpacity:.35}),(0,U.jsx)(`stop`,{offset:`100%`,stopColor:`#f97316`,stopOpacity:0})]})}),(0,U.jsx)(I,{strokeDasharray:`3 3`,stroke:`#e2e8f0`,vertical:!1}),(0,U.jsx)(M,{dataKey:`day`,tick:{fontSize:11,fill:`#64748b`},tickFormatter:e=>e.slice(5),minTickGap:24}),(0,U.jsx)(P,{tick:{fontSize:11,fill:`#64748b`},tickFormatter:e=>`$${e.toFixed(2)}`,width:56}),(0,U.jsx)(N,{formatter:(e,t)=>t===`spendUsd`?[`$${Number(e).toFixed(4)}`,`Spend`]:[e,t],labelFormatter:e=>String(e??``),contentStyle:{fontSize:12}}),(0,U.jsx)(L,{type:`monotone`,dataKey:`spendUsd`,stroke:`#f97316`,strokeWidth:2,fill:`url(#vkSpendFill)`})]})})}),e.byModel.length>0&&(0,U.jsxs)(l,{align:`stretch`,gap:1,children:[(0,U.jsx)(c,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Spend by model`}),(0,U.jsx)(a,{gap:2,flexWrap:`wrap`,children:e.byModel.map(e=>(0,U.jsxs)(d,{variant:`outline`,fontSize:`2xs`,children:[e.model,` · $`,Number(e.totalUsd).toFixed(2),` · `,e.requests]},e.model))})]}),e.recentDebits.length>0&&(0,U.jsxs)(l,{align:`stretch`,gap:1,children:[(0,U.jsx)(c,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Recent activity`}),(0,U.jsxs)(y,{size:`sm`,variant:`line`,children:[(0,U.jsx)(S,{children:(0,U.jsxs)(h,{children:[(0,U.jsx)(b,{children:`When`}),(0,U.jsx)(b,{children:`Model`}),(0,U.jsx)(b,{children:`Tokens`}),(0,U.jsx)(b,{children:`Amount`}),(0,U.jsx)(b,{children:`Latency`})]})}),(0,U.jsx)(v,{children:e.recentDebits.slice(0,10).map(e=>(0,U.jsxs)(h,{children:[(0,U.jsx)(x,{children:(0,U.jsx)(f,{content:new Date(e.occurredAt).toLocaleString(),children:(0,U.jsx)(c,{fontSize:`xs`,color:`fg.muted`,children:k(new Date(e.occurredAt).getTime())})})}),(0,U.jsx)(x,{children:(0,U.jsx)(u,{fontSize:`xs`,children:e.model})}),(0,U.jsx)(x,{children:(0,U.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[e.tokensInput.toLocaleString(),` →`,` `,e.tokensOutput.toLocaleString()]})}),(0,U.jsx)(x,{children:(0,U.jsx)(c,{fontSize:`xs`,children:be(e.amountUsd)})}),(0,U.jsx)(x,{children:(0,U.jsx)(c,{fontSize:`xs`,color:`fg.muted`,children:e.durationMs===null?`—`:`${e.durationMs}ms`})})]},e.id))})]})]})]})})}function $({label:e,value:t,tone:n}){return(0,U.jsxs)(l,{align:`start`,gap:0,children:[(0,U.jsx)(c,{fontSize:`2xs`,color:`fg.muted`,textTransform:`uppercase`,children:e}),(0,U.jsx)(c,{fontSize:`xl`,fontWeight:`semibold`,color:n===`red`?`red.600`:void 0,children:t})]})}function ye(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t>=1?`$${t.toFixed(4)}`:t>=.01?`$${t.toFixed(5)}`:`$${t.toFixed(6)}`:`—`}function be(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t>=1?`$${t.toFixed(4)}`:t>=.01?`$${t.toFixed(5)}`:`$${t.toFixed(6)}`:`—`}function xe({config:e}){if(!e)return null;let t=e.metadata?.tags??[],n=e.cache?.mode??`respect`,r=e.rateLimits?.rpm??null,i=e.rateLimits?.rpd??null,o=Object.keys(e.modelAliases??{}).length,s=[`tools`,`mcp`,`urls`,`models`].reduce((t,n)=>t+((e.policyRules?.[n])?.deny?.length??0),0),f=(e.guardrails?.pre?.length??0)+(e.guardrails?.post?.length??0)+(e.guardrails?.streamChunk?.length??0),p=n===`force`?`orange`:n===`disable`?`red`:`green`;return(0,U.jsxs)(Z,{title:`Configuration`,children:[t.length>0&&(0,U.jsx)(Q,{label:`Tags`,children:(0,U.jsx)(a,{gap:1,flexWrap:`wrap`,children:t.map(e=>(0,U.jsx)(d,{variant:`subtle`,colorPalette:`gray`,fontSize:`2xs`,children:e},e))})}),(0,U.jsx)(Q,{label:`Cache mode`,children:(0,U.jsxs)(a,{gap:1,children:[(0,U.jsx)(d,{colorPalette:p,children:n}),n===`force`&&(0,U.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[`ttl `,e.cache?.ttlS??3600,`s`]})]})}),(0,U.jsx)(Q,{label:`Rate limits`,children:(0,U.jsxs)(a,{gap:1,flexWrap:`wrap`,children:[(0,U.jsxs)(d,{variant:`outline`,fontSize:`2xs`,children:[`rpm `,r??`∞`]}),(0,U.jsxs)(d,{variant:`outline`,fontSize:`2xs`,children:[`rpd `,i??`∞`]})]})}),(0,U.jsx)(Q,{label:`Model aliases`,children:o===0?(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`—`}):(0,U.jsxs)(l,{align:`start`,gap:1,children:[Object.entries(e.modelAliases??{}).slice(0,5).map(([e,t])=>(0,U.jsxs)(a,{gap:1,fontSize:`xs`,children:[(0,U.jsx)(u,{fontSize:`xs`,children:e}),(0,U.jsx)(c,{color:`fg.muted`,children:`→`}),(0,U.jsx)(u,{fontSize:`xs`,children:t})]},e)),o>5&&(0,U.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[`+ `,o-5,` more (see Edit drawer)`]})]})}),(0,U.jsx)(Q,{label:`Policy rules`,children:s===0?(0,U.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`—`}):(0,U.jsx)(l,{align:`start`,gap:1,children:[`tools`,`mcp`,`urls`,`models`].map(t=>{let n=e.policyRules?.[t]?.deny??[];return n.length===0?null:(0,U.jsxs)(a,{gap:1,flexWrap:`wrap`,fontSize:`xs`,children:[(0,U.jsxs)(c,{fontWeight:`medium`,minWidth:`48px`,children:[t,`:`]}),n.slice(0,4).map(e=>(0,U.jsx)(u,{fontSize:`2xs`,colorPalette:`red`,children:e},e)),n.length>4&&(0,U.jsxs)(c,{color:`fg.muted`,children:[`+ `,n.length-4,` more`]})]},t)})})}),(0,U.jsx)(Q,{label:`Guardrails`,children:(0,U.jsx)(c,{fontSize:`sm`,color:f>0?void 0:`fg.muted`,children:f>0?`${f} monitor${f>1?`s`:``} attached (pre/post/stream_chunk)`:`—`})})]})}var Se=j(`virtualKeys:view`,{layoutComponent:O})(X);export{Se as default};
2
+ //# sourceMappingURL=_id_-DAzjJ7AY.js.map
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{a as t,dn as n,n as r}from"./portal-Sdfvrza9.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./heading-C0sACr0w.js";import{n as o,t as s}from"./v-stack-hkuSkmCA.js";import{Nn as c,Sn as l,vn as u}from"./ProjectAvatar-B0tbfKzY.js";import{n as d}from"./api-l6Cnm0vQ.js";import{t as f}from"./GovernanceLayout-Baar1Fc8.js";import{r as p}from"./next-router-CWLrMXvP.js";import{Vt as m,t as h}from"./index-8SbDirJv.js";import{t as g}from"./WithFeatureFlagGuard-CgkIIt3_.js";import{t as _}from"./WithPermissionGuard-Da_hdEdq.js";var v=e(l()),y=i(),b=e=>e===0?`$0.00`:(0,v.default)(e).format(`$0,0.00`),x=e=>{if(!e)return`—`;let t=typeof e==`string`?new Date(e):e;if(Number.isNaN(t.getTime()))return`—`;let n=Date.now()-t.getTime();if(n<0)return`just now`;let r=Math.floor(n/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`};function S(){let e=p(),i=typeof e.query.id==`string`?decodeURIComponent(e.query.id):null,{organization:l}=m({redirectToOnboarding:!1}),g=l?.id??``,_=d.activityMonitor.spendByUser.useQuery({organizationId:g,windowDays:30,limit:500},{enabled:!!g,refetchOnWindowFocus:!1}),S=d.governance.resolveActorPersonalProject.useQuery({organizationId:g,actor:i??``},{enabled:!!g&&!!i,refetchOnWindowFocus:!1}).data,w=(_.data??[]).find(e=>e.actor===i);return(0,y.jsx)(f,{pageTitle:w?`${w.actor} · AI Governance · LangWatch`:`User · AI Governance · LangWatch`,children:(0,y.jsxs)(s,{align:`stretch`,gap:4,width:`full`,maxW:`container.xl`,children:[(0,y.jsxs)(s,{align:`start`,gap:1,children:[(0,y.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[(0,y.jsx)(h,{href:`/settings/governance`,color:`blue.600`,children:`← AI Governance`}),` `,`·`,` `,(0,y.jsx)(h,{href:`/settings/governance/users`,color:`blue.600`,children:`All users`})]}),(0,y.jsxs)(r,{gap:2,children:[(0,y.jsx)(n,{width:`14px`,height:`14px`,borderRadius:`full`,backgroundColor:i?u(i):`fg.muted`}),(0,y.jsx)(a,{size:`md`,children:w?.actor??i??`User not found`})]})]}),_.isLoading?(0,y.jsx)(t,{}):w?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(c,{columns:{base:1,md:4},gap:3,children:[(0,y.jsx)(C,{label:`Spend (30 d)`,value:b(w.spendUsd)}),(0,y.jsx)(C,{label:`Requests`,value:(0,v.default)(w.requests).format(`0,0`)}),(0,y.jsx)(C,{label:`Last active`,value:x(w.lastActivityIso)}),(0,y.jsx)(C,{label:`Most-used`,value:w.mostUsedTarget??`—`})]}),(0,y.jsxs)(n,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:4,children:[(0,y.jsx)(o,{fontSize:`sm`,fontWeight:`medium`,marginBottom:1,children:`Detail metrics`}),(0,y.jsx)(o,{fontSize:`xs`,color:`fg.muted`,marginBottom:3,children:`Per-day spend trend and per-model breakdown for this user will land here in a follow-up.`}),S&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(h,{href:`/${S.projectSlug}/traces`,color:`blue.600`,fontSize:`sm`,fontWeight:`medium`,children:[`View `,S.displayName,`'s personal workspace →`]}),(0,y.jsx)(o,{fontSize:`xs`,color:`fg.subtle`,marginTop:1,marginBottom:3,children:`Opens their trace explorer with a 'Viewing as admin' banner. Each access is recorded at /settings/audit-log.`})]}),(0,y.jsx)(h,{href:`/settings/governance`,color:`blue.600`,fontSize:`sm`,fontWeight:`medium`,children:`See this user in the bird's-eye chart →`}),(0,y.jsxs)(o,{fontSize:`xs`,color:`fg.subtle`,marginTop:1,children:[`The chart's `,`'By User'`,` toggle exercises the same data through one orthogonal lens until the dedicated drilldown ships.`]})]})]}):(0,y.jsx)(n,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:5,children:(0,y.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`No spend data for this user in the last 30 days.`})})]})})}function C({label:e,value:t}){return(0,y.jsxs)(n,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:3,children:[(0,y.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`wider`,children:e}),(0,y.jsx)(a,{as:`span`,size:`sm`,marginTop:1,children:t})]})}var w=g(`release_ui_ai_governance_enabled`,{bypassOnboardingRedirect:!0})(_(`organization:manage`,{bypassOnboardingRedirect:!0})(S));export{w as default};
2
+ //# sourceMappingURL=_id_-Dc2UAWAO.js.map
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{a as n,dn as r,i,n as a}from"./portal-Sdfvrza9.js";import{t as o}from"./jsx-runtime-CFwixLRt.js";import{t as s}from"./heading-C0sACr0w.js";import{n as c,t as l}from"./v-stack-hkuSkmCA.js";import{Yn as u}from"./ProjectAvatar-B0tbfKzY.js";import{t as d}from"./badge-Cpc3eA-C.js";import{t as f}from"./tooltip-CM-lMDNU.js";import{d as p}from"./toaster-BsYkODqs.js";import{$ as m,J as h,Q as ee,X as g,Y as _,Z as te,r as ne,tt as v}from"./Markdown-Cip8Rj5C.js";import{Jt as re,Kt as ie,L as y,qt as ae}from"./DashboardLayout-Cn5-9Ye2.js";import{a as b,i as x,n as S,r as C,t as w}from"./alert-CPsXih3K.js";import{a as oe,i as T,n as E,r as D,t as O}from"./empty-state-T8EYr5NF.js";import{t as se}from"./errors-mlatPkMI.js";import{t as k}from"./spacer-C38e7o6r.js";import{n as A}from"./api-l6Cnm0vQ.js";import{t as j}from"./AiGatewayLayout-BqznP5T2.js";import{t as ce}from"./archive-CIpRF4hE.js";import{n as le}from"./log-out-CUZz1cYc.js";import{t as ue}from"./file-clock-BzjyK-8R.js";import{r as de}from"./next-router-CWLrMXvP.js";import{D as M,Vt as N,nr as P,t as F}from"./index-8SbDirJv.js";import{t as I}from"./WithPermissionGuard-Da_hdEdq.js";import{t as L}from"./formatBudgetUsd-BYb25IkY.js";import{t as R}from"./BudgetEditDrawer-nkQpQiY0.js";var z=p(`receipt`,[[`path`,{d:`M12 17V7`,key:`pyj7ub`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`,key:`1elt7d`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`,key:`ycz6yz`}]]),B=e(t()),V=o();function H(){let{organization:e,project:t,hasPermission:o}=N(),s=de(),p=typeof s.query.id==`string`?s.query.id:``,v=A.gatewayBudgets.get.useQuery({organizationId:e?.id??``,id:p},{enabled:!!e?.id&&!!p}),I=A.useContext(),H=A.gatewayBudgets.archive.useMutation({onSuccess:async()=>{e?.id&&(await I.gatewayBudgets.list.invalidate({organizationId:e.id}),await I.gatewayBudgets.get.invalidate({organizationId:e.id,id:p}))}}),[G,K]=(0,B.useState)(!1),[q,J]=(0,B.useState)(!1),he=o(`gatewayBudgets:update`),ge=o(`gatewayBudgets:delete`),Y=v.data,_e=async()=>{if(!(!Y||!e))try{await H.mutateAsync({organizationId:e.id,id:Y.id}),J(!1)}catch(e){se({error:e,fallbackTitle:`Couldn't archive the budget`})}},X=Y?Number.parseFloat(Y.spentUsd):0,Z=Y?Number.parseFloat(Y.limitUsd):0,Q=Z>0?Math.min(100,X/Z*100):0,$=!!Y?.archivedAt;return(0,V.jsxs)(j,{children:[(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(y.Header,{children:[(0,V.jsx)(a,{children:(0,V.jsx)(F,{href:`/settings/gateway/budgets`,color:`fg.muted`,fontSize:`sm`,children:(0,V.jsxs)(a,{gap:1,children:[(0,V.jsx)(le,{size:14}),` Budgets`]})})}),(0,V.jsxs)(y.Heading,{children:[Y?.name??`Budget`,$&&(0,V.jsx)(d,{colorPalette:`gray`,ml:2,children:`archived`})]}),(0,V.jsx)(k,{}),Y&&(0,V.jsxs)(a,{children:[(0,V.jsx)(F,{href:`/settings/audit-log?targetKind=budget&targetId=${Y.id}`,children:(0,V.jsxs)(i,{variant:`outline`,size:`sm`,children:[(0,V.jsx)(ue,{size:14}),` Audit history`]})}),!$&&he&&(0,V.jsxs)(i,{variant:`outline`,size:`sm`,onClick:()=>K(!0),children:[(0,V.jsx)(P,{size:14}),` Edit`]}),!$&&ge&&(0,V.jsxs)(i,{colorPalette:`red`,variant:`outline`,size:`sm`,onClick:()=>J(!0),children:[(0,V.jsx)(ce,{size:14}),` Archive`]})]})]}),(0,V.jsx)(r,{padding:6,width:`full`,maxWidth:`1600px`,marginX:`auto`,children:v.isLoading?(0,V.jsx)(n,{}):Y?(0,V.jsxs)(l,{align:`stretch`,gap:6,maxWidth:`960px`,children:[!Y.spendAvailable&&(0,V.jsxs)(x,{status:`warning`,"data-testid":`budget-spend-unavailable`,children:[(0,V.jsx)(C,{}),(0,V.jsxs)(w,{children:[(0,V.jsx)(b,{children:`Spend figures are unavailable`}),(0,V.jsx)(S,{children:`Spend cannot be totalled right now, so this budget is not stopping or warning about anything.`})]})]}),Y.unreachableByAnyKey&&(0,V.jsxs)(x,{status:`warning`,"data-testid":`budget-unreachable-alert`,children:[(0,V.jsx)(C,{}),(0,V.jsxs)(w,{children:[(0,V.jsx)(b,{children:`No key sends traffic here`}),(0,V.jsx)(S,{children:`Traffic is attributed to the project a key is scoped to. No active key is scoped so that its traffic reaches this budget, so it will stay at zero and never stop a request.`})]})]}),(0,V.jsx)(U,{title:`Utilization`,children:(0,V.jsxs)(l,{align:`stretch`,gap:2,children:[Y.spendAvailable?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(a,{children:[(0,V.jsx)(c,{fontWeight:`medium`,fontSize:`2xl`,children:L(X)}),(0,V.jsxs)(c,{color:`fg.muted`,children:[`/ `,L(Z)]}),(0,V.jsx)(k,{}),(0,V.jsxs)(d,{colorPalette:Q>=100?`red`:Q>=80?`orange`:`green`,children:[Q.toFixed(1),`% used`]})]}),(0,V.jsx)(ae,{value:Q,size:`sm`,colorPalette:Q>=100?`red`:Q>=80?`orange`:`green`,children:(0,V.jsx)(re,{children:(0,V.jsx)(ie,{})})})]}):(0,V.jsxs)(a,{children:[(0,V.jsx)(c,{fontWeight:`medium`,fontSize:`2xl`,color:`fg.muted`,children:`Unavailable`}),(0,V.jsxs)(c,{color:`fg.muted`,children:[`/ `,L(Z)]})]}),(0,V.jsxs)(a,{fontSize:`xs`,color:`fg.muted`,children:[(0,V.jsxs)(c,{children:[`Window: `,(0,V.jsx)(`strong`,{children:Y.window.toLowerCase()})]}),(0,V.jsx)(c,{children:`·`}),(0,V.jsxs)(c,{children:[`Resets:`,` `,(0,V.jsx)(`strong`,{children:Y.window===`TOTAL`?`never`:(0,V.jsx)(f,{content:new Date(Y.resetsAt).toLocaleString(),children:(0,V.jsx)(`span`,{children:M(new Date(Y.resetsAt).getTime())})})})]}),(0,V.jsx)(c,{children:`·`}),(0,V.jsxs)(c,{children:[`On breach:`,` `,(0,V.jsx)(`strong`,{children:Y.onBreach.toLowerCase()})]})]})]})}),(0,V.jsxs)(U,{title:`Identity`,children:[(0,V.jsx)(W,{label:`ID`,children:(0,V.jsx)(u,{fontSize:`xs`,children:Y.id})}),Y.description&&(0,V.jsx)(W,{label:`Description`,children:(0,V.jsx)(c,{fontSize:`sm`,children:Y.description})}),(0,V.jsx)(W,{label:`Scope`,children:(0,V.jsx)(fe,{target:Y.scopeTarget,projectSlug:t?.slug??null})}),(0,V.jsx)(W,{label:`Created`,children:(0,V.jsx)(f,{content:new Date(Y.createdAt).toLocaleString(),children:(0,V.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:M(new Date(Y.createdAt).getTime())})})}),Y.lastResetAt&&(0,V.jsx)(W,{label:`Last reset`,children:(0,V.jsx)(f,{content:new Date(Y.lastResetAt).toLocaleString(),children:(0,V.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:M(new Date(Y.lastResetAt).getTime())})})}),Y.timezone&&(0,V.jsx)(W,{label:`Timezone`,children:(0,V.jsx)(u,{fontSize:`xs`,children:Y.timezone})})]}),(0,V.jsxs)(U,{title:`Recent activity`,children:[Y.recentLedger.length===0?(0,V.jsx)(T,{size:`sm`,children:(0,V.jsxs)(O,{children:[(0,V.jsx)(D,{children:(0,V.jsx)(z,{size:24})}),(0,V.jsx)(oe,{children:`No usage yet`}),(0,V.jsx)(E,{children:`Activity shows up here after the first completed request against a virtual key in this scope.`})]})}):(0,V.jsxs)(ee,{size:`sm`,children:[(0,V.jsx)(te,{children:(0,V.jsxs)(m,{children:[(0,V.jsx)(g,{children:`When`}),(0,V.jsx)(g,{children:`Virtual key`}),(0,V.jsx)(g,{children:`Model`}),(0,V.jsx)(g,{children:`Amount`}),(0,V.jsx)(g,{children:`Status`})]})}),(0,V.jsx)(h,{children:Y.recentLedger.map(e=>(0,V.jsxs)(m,{children:[(0,V.jsx)(_,{children:(0,V.jsx)(f,{content:new Date(e.occurredAt).toLocaleString(),children:(0,V.jsx)(c,{fontSize:`xs`,color:`fg.muted`,children:M(new Date(e.occurredAt).getTime())})})}),(0,V.jsx)(_,{children:(0,V.jsx)(F,{href:`/settings/gateway/virtual-keys/${e.virtualKeyId}`,color:`orange.600`,children:(0,V.jsx)(c,{fontSize:`sm`,children:e.virtualKeyName})})}),(0,V.jsx)(_,{children:(0,V.jsx)(u,{fontSize:`xs`,children:e.model})}),(0,V.jsx)(_,{children:me(e.amountUsd)}),(0,V.jsx)(_,{children:(0,V.jsx)(pe,{status:e.status})})]},e.id))})]}),(0,V.jsx)(c,{fontSize:`xs`,color:`fg.muted`,mt:1,children:`Most recent 20 requests. See Usage for aggregates over the full history.`})]})]}):(0,V.jsx)(c,{color:`fg.muted`,children:`Budget not found.`})})]}),(0,V.jsx)(R,{budget:G&&Y?Y:null,onOpenChange:e=>{e||K(!1)},onSaved:()=>{K(!1),v.refetch()}}),(0,V.jsx)(ne,{open:q,onOpenChange:J,title:`Archive ${Y?.name??`budget`}?`,message:`Debits against this budget stop counting. The historical ledger is preserved but new requests route as if the budget didn't exist.`,confirmLabel:`Archive`,tone:`warning`,loading:H.isPending,onConfirm:_e})]})}function U({title:e,children:t}){return(0,V.jsxs)(r,{children:[(0,V.jsx)(s,{size:`sm`,mb:2,children:e}),(0,V.jsx)(v,{mb:3}),(0,V.jsx)(l,{align:`stretch`,gap:2,children:t})]})}function W({label:e,children:t}){return(0,V.jsxs)(a,{gap:4,align:`flex-start`,children:[(0,V.jsx)(c,{fontSize:`sm`,color:`fg.muted`,minWidth:`140px`,children:e}),t]})}function fe({target:e,projectSlug:t}){let n=e.kind.toLowerCase().replace(`_`,` `),r=e.kind===`VIRTUAL_KEY`?`/settings/gateway/virtual-keys/${e.id}`:null;return(0,V.jsxs)(a,{gap:2,align:`baseline`,children:[(0,V.jsx)(d,{colorPalette:`gray`,children:n}),r?(0,V.jsx)(F,{href:r,color:`orange.600`,children:(0,V.jsx)(c,{fontSize:`sm`,fontWeight:`medium`,children:e.name})}):(0,V.jsx)(c,{fontSize:`sm`,fontWeight:`medium`,children:e.name}),e.secondary&&(0,V.jsx)(u,{fontSize:`xs`,color:`fg.muted`,children:e.secondary}),e.kind===`GROUP`&&(0,V.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[e.memberCount===1?`1 member`:`${e.memberCount} members`,`, each with their own allowance`]})]})}function pe({status:e}){return(0,V.jsx)(d,{colorPalette:e===`SUCCESS`?`green`:e===`BLOCKED_BY_GUARDRAIL`?`red`:e===`PROVIDER_ERROR`?`orange`:`gray`,children:e.toLowerCase()})}function me(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t>=1?`$${t.toFixed(4)}`:t>=.01?`$${t.toFixed(5)}`:`$${t.toFixed(6)}`:`—`}var G=I(`gatewayBudgets:view`,{layoutComponent:j})(H);export{G as default};
2
+ //# sourceMappingURL=_id_-DwutdLKk.js.map
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{a as n,dn as r,i}from"./portal-Sdfvrza9.js";import{t as a}from"./jsx-runtime-CFwixLRt.js";import{n as o}from"./v-stack-hkuSkmCA.js";import{t as s}from"./DashboardLayout-Cn5-9Ye2.js";import{a as c,i as l,n as u,r as d,t as f}from"./alert-CPsXih3K.js";import{t as p}from"./errors-mlatPkMI.js";import{n as m}from"./api-l6Cnm0vQ.js";import{l as h}from"./parseHeaderColumns-DehG4gCn.js";import{r as g}from"./next-router-CWLrMXvP.js";import{Vt as _,pr as v}from"./index-8SbDirJv.js";import{t as y}from"./DatasetEditorTable-Ca3bmQrl.js";var b=e(t()),x=a();function S(){let e=g(),t=e.query.id,{project:a,hasPermission:S}=_(),[C,w]=(0,b.useState)(!1),T=m.dataset.getById.useQuery({projectId:a?.id??``,datasetId:t},{enabled:!!a&&!!t,refetchInterval:e=>e?.status===`processing`||e?.status===`uploading`?3e3:!1}),E=T.data?.status,D=T.isSuccess&&T.data==null,O=T.isSuccess&&T.data!=null&&(E===`ready`||E==null),k=()=>{e.push({pathname:`/${a?.slug}/experiments/workbench`,query:{datasetId:t}})},A=async()=>{if(a){w(!0);try{await h({projectId:a.id,datasetId:t}),await T.refetch()}catch(e){p({error:e,fallbackTitle:`Couldn't retry preparing this dataset`})}finally{w(!1)}}};return(0,x.jsx)(s,{children:(0,x.jsxs)(r,{width:`full`,paddingX:6,paddingY:6,children:[(E===`uploading`||E===`processing`)&&(0,x.jsxs)(l,{status:`info`,marginBottom:4,children:[(0,x.jsx)(d,{children:(0,x.jsx)(n,{size:`sm`})}),(0,x.jsx)(f,{children:(0,x.jsx)(c,{children:`Preparing your dataset, this can take a few minutes`})})]}),E===`failed`&&(0,x.jsxs)(l,{status:`error`,marginBottom:4,children:[(0,x.jsx)(d,{}),(0,x.jsxs)(f,{children:[(0,x.jsx)(c,{children:`We could not prepare your dataset`}),(0,x.jsx)(u,{children:T.data?.statusError??`Something went wrong while processing your file. You can retry.`})]}),(0,x.jsx)(i,{size:`sm`,colorPalette:`red`,variant:`outline`,loading:C,onClick:()=>void A(),children:`Retry`})]}),D&&(0,x.jsx)(o,{color:`fg.muted`,children:`This dataset is no longer available.`}),O?(0,x.jsx)(y,{datasetId:t,readEnabled:O,floatingSelectionBar:!0,headerActions:S(`evaluations:manage`)?(0,x.jsxs)(i,{size:`sm`,colorPalette:`blue`,"data-testid":`run-experiment-from-dataset`,onClick:k,children:[(0,x.jsx)(v,{size:14}),` Run experiment`]}):void 0}):E!==`failed`&&!D&&(0,x.jsx)(o,{color:`fg.muted`,children:`Your dataset will appear here once it is ready.`})]})})}export{S as default};
2
+ //# sourceMappingURL=_id_-H7-5DI5r.js.map
@@ -0,0 +1,8 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{dn as n,fn as r,i,n as a}from"./portal-Sdfvrza9.js";import{t as o}from"./jsx-runtime-CFwixLRt.js";import{t as s}from"./skeleton-0JSrjbwm.js";import{t as c}from"./heading-C0sACr0w.js";import{n as l,t as u}from"./v-stack-hkuSkmCA.js";import{Jn as d,Kn as f,V as p,c as m,qn as ee}from"./ProjectAvatar-B0tbfKzY.js";import{f as h,n as g}from"./toaster-BsYkODqs.js";import{I as _}from"./Markdown-Cip8Rj5C.js";import{t as v}from"./grid-MxZhegzw.js";import{t as y}from"./icon-D6xQEiPb.js";import{Jt as b,Kt as x,qt as S,t as C}from"./DashboardLayout-Cn5-9Ye2.js";import{r as w,t as T}from"./card-By_Mbslh.js";import{t as te}from"./icon-button-Wlb_dGXL.js";import{t as E}from"./container-Cxi_AjD-.js";import{t as D}from"./spacer-C38e7o6r.js";import{et as O}from"./immer-DImI3Uq2.js";import{n as k}from"./api-l6Cnm0vQ.js";import{i as ne,o as A,r as re,t as ie}from"./langyHomeSuggestions-czH603Eu.js";import{c as j}from"./auth-client-MjRW2PVA.js";import{r as M}from"./next-router-CWLrMXvP.js";import{At as N,F as P,K as F,L as ae,Mt as I,Nn as L,On as oe,Q as R,S as z,T as B,Xt as se,a as ce,c as le,ct as V,d as ue,en as H,fn as de,hn as fe,in as pe,kn as me,mt as he,q as ge,r as _e,u as ve,v as ye,vn as be,w as xe}from"./lu-BSZWBZXU.js";import{A as Se,Ar as Ce,D as we,Er as Te,M as Ee,Pt as De,Q as U,Vt as W,bt as Oe,h as ke,jr as Ae,k as je,kr as Me,n as Ne,st as Pe,t as Fe,v as Ie,xt as Le}from"./index-8SbDirJv.js";import{l as Re,r as ze,t as G,u as Be}from"./react-B5vhk-dA.js";import{n as Ve}from"./useFeatureFlag-BjAcqOFH.js";import{a as He,t as Ue}from"./CustomGraph-C6j6slUs.js";import{t as We}from"./formatMilliseconds-P4cwJ3go.js";import{a as Ge,n as Ke}from"./asaplangy-D3J00Q-Z.js";import{n as qe,t as Je}from"./useShowLangy-C1pPUZqz.js";import{t as Ye}from"./formatMoney-ClmqgvaY.js";import{t as Xe}from"./getSafeReturnToPath-DhtoOW7y.js";import{t as Ze}from"./mesh-gradient-DbHQhAbD.js";var K=e(t(),1);function Qe(e){let t=(0,K.useRef)(0),{isStatic:n}=(0,K.useContext)(ze);(0,K.useEffect)(()=>{if(n)return;let r=({timestamp:n,delta:r})=>{t.current||=n,e(n-t.current,r)};return Be.update(r,!0),()=>Re(r)},[e])}var q=(e,t,n,r)=>({id:e,label:t,status:n,fillPct:r,statLabel:n===`pass`?`pass`:`failing`}),$e=[{label:`p50 latency`,value:`4.3s`,tone:`vanity`},{label:`Cost / 24h`,value:`$0.0257`,tone:`vanity`},{label:`Traces · threads`,value:`15 · 5`,tone:`vanity`}],et={none:{label:`No scenarios`,headline:`Here's where you left off, and what's moved since.`,cells:[]},empty:{label:`Brand-new`,headline:`Your project is quiet. Send a trace and I'll start watching for what changes.`,cells:[]},traces:{label:`Traces, no scenarios`,headline:`50 traces since yesterday. A couple worth a look, the rest healthy.`,cells:[{label:`Traces`,value:`50`,tone:`neutral`},{label:`Errors`,value:`2`,tone:`bad`},{label:`Crash-free`,value:`5 days`,tone:`good`},{label:`p50 latency`,value:`8.4s`,tone:`vanity`},{label:`Cost / 24h`,value:`$0.166`,tone:`vanity`},{label:`Tokens`,value:`252.7k`,tone:`vanity`}]},passing:{label:`All passing`,headline:`All 32 scenarios passing. Nothing needs you right now.`,pills:[{label:`3 scenario sets`}],scenariosLabel:`Last run · 32 concurrent`,bars:[q(`a`,`refund · within policy`,`pass`,98),q(`b`,`refund · outside policy`,`pass`,96),q(`c`,`partial refund · negotiation`,`pass`,94)],judge:{pass:32,regressions:0,note:`rubric audited`},sessionHref:`#`,cells:[{label:`Pass rate`,value:`100%`,tone:`good`,link:`#`},{label:`Regressions`,value:`0`,tone:`good`},{label:`Failing evals`,value:`0`,tone:`good`},...$e]},mixed:{label:`Mostly passing`,headline:`28 of 32 scenarios passing. A few need a look.`,pills:[{label:`simulator · UserSimulatorAgent`},{label:`32 scenarios · DE / FR / NL`},{label:`rubric · 4 criteria`}],scenariosLabel:`Last run · 32 concurrent · 6 to 9 turns each`,bars:[q(`a`,`refund · within policy`,`pass`,97),q(`b`,`refund · outside policy`,`pass`,94),q(`c`,`angry escalation (DE)`,`fail`,100),q(`d`,`partial refund · negotiation`,`pass`,92)],judge:{pass:28,regressions:4,note:`rubric audited`},sessionHref:`#`,cells:[{label:`Pass rate`,value:`87.5%`,tone:`good`,link:`#`},{label:`Regressions`,value:`4`,tone:`bad`},{label:`Failing evals`,value:`4`,tone:`bad`},...$e]},failing:{label:`Several failing`,headline:`5 of 18 scenarios failing after the latest deploy.`,pills:[{label:`2 scenario sets`}],scenariosLabel:`Last run · 18 concurrent`,bars:[q(`a`,`checkout · happy path`,`pass`,95),q(`b`,`checkout · declined card`,`fail`,100),q(`c`,`address · ambiguous`,`fail`,100),q(`d`,`refund · partial`,`pass`,90)],judge:{pass:13,regressions:5,note:`rubric audited`},sessionHref:`#`,cells:[{label:`Pass rate`,value:`72%`,tone:`bad`,link:`#`},{label:`Regressions`,value:`5`,tone:`bad`},{label:`Failing evals`,value:`5`,tone:`bad`},...$e]}},J=(e,t)=>({link:{label:`Open traces`,href:`#${encodeURIComponent(e)}`},context:{id:e,label:t,query:e},askPrompt:`Investigate ${t}. Separate evidence from hypotheses.`}),tt={none:void 0,errors:[{id:`errors`,severity:`error`,subject:`New error shape`,detail:`“Provider rate limit” on 4 traces.`,metric:{text:`new`,tone:`up`},...J(`errorMessage:"Provider rate limit"`,`New error shape: Provider rate limit`)}],latency:[{id:`latency-regression`,severity:`attention`,subject:`Latency regressed`,detail:`p50 is 38% slower than the prior 30 days.`,metric:{text:`8.4s`,tone:`up`},...J(`duration:>8400`,`Latency regression: p50 8.4s`)}],shared:[{id:`shared-refund-agent`,severity:`attention`,subject:`Shared error signal`,detail:`6 errored traces share “refund-agent”. Correlation, not a confirmed cause.`,...J(`status:error AND traceName:"refund-agent"`,`Shared error signal: refund-agent`)}],repeated:[{id:`repeated-timeout`,severity:`error`,subject:`Repeated error shape`,detail:`“Upstream request timed out” on 7 traces.`,...J(`errorMessage:"Upstream request timed out"`,`Repeated error shape: Upstream request timed out`)}],full:[{id:`errors`,severity:`error`,subject:`New error shape`,detail:`“Provider rate limit” on 4 traces.`,metric:{text:`new`,tone:`up`},...J(`errorMessage:"Provider rate limit"`,`New error shape: Provider rate limit`)},{id:`shared-refund-agent`,severity:`attention`,subject:`Shared error signal`,detail:`6 errored traces share “refund-agent”. Correlation, not a confirmed cause.`,...J(`status:error AND traceName:"refund-agent"`,`Shared error signal: refund-agent`)},{id:`latency-regression`,severity:`attention`,subject:`Latency regressed`,detail:`p50 is 38% slower than the prior 30 days.`,metric:{text:`8.4s`,tone:`up`},...J(`duration:>8400`,`Latency regression: p50 8.4s`)}]},nt={title:`fix: tighten refund-policy prompt for DE escalations`,meta:`drafted by Langy · 4 failing scenarios attached`,added:12,removed:4,href:`#`},rt={none:void 0,empty:void 0,traces:`"what are my slowest traces?"`,passing:`"anything worth watching this week?"`,mixed:`"why did DE start failing?"`,failing:`"which checkout scenarios broke?"`},it=[`mixed`,`failing`,`traces`,`passing`,`none`,`empty`],at=[`full`,`errors`,`latency`,`shared`,`repeated`,`none`];function ot(){let e=[];for(let t of it){let n=et[t];for(let r of at){let i=tt[r];if(!((t===`none`||t===`empty`)&&r!==`none`&&t===`empty`))for(let a of[!0,!1]){if(a&&t!==`mixed`&&t!==`failing`)continue;let o=`${t}_${r}${a?`_pr`:``}`,s=[n.label];r!==`none`&&s.push(`+ ${r}`),a&&s.push(`+ fix`),e.push({key:o,group:n.label,label:s.join(` `),data:{since:`since yesterday`,loop:n.bars?`median goal to PR · 14 min`:void 0,headline:n.headline,quiet:t===`empty`,receiptsLabel:i?`Needs a look`:void 0,receipts:i,pills:n.pills,scenariosLabel:n.scenariosLabel,bars:n.bars,barsMore:t===`mixed`?`28 more. Faithfulness on angry escalation (DE) dropped 0.91 to 0.62 after this morning's prompt change.`:void 0,judge:n.judge,draftedPr:a?nt:void 0,askHint:rt[t],sessionHref:n.sessionHref},statusCells:n.cells})}}}return e}var st=ot();function ct(e){return st.find(t=>t.key===e)}var lt=`langwatch:dev:briefing-mock`,ut=()=>!1,dt=new Set;function ft(){if(typeof window>`u`||!ut())return null;try{let e=localStorage.getItem(lt);return e&&ct(e)?e:null}catch{return null}}function pt(e){if(!(typeof window>`u`)){try{e===null?localStorage.removeItem(lt):localStorage.setItem(lt,e)}catch{}dt.forEach(e=>e())}}function mt(){let[e,t]=(0,K.useState)(null);return(0,K.useEffect)(()=>{t(ft());let e=()=>t(ft());return dt.add(e),window.addEventListener(`storage`,e),()=>{dt.delete(e),window.removeEventListener(`storage`,e)}},[]),e}var Y=o();function ht(){let e=mt();return ut()?(0,Y.jsxs)(r.select,{value:e??``,onChange:e=>{pt(e.target.value||null)},"aria-label":`Preview briefing data (dev only)`,fontFamily:`mono`,fontSize:`11px`,color:`fg.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`lg`,background:`bg.panel/60`,backdropFilter:`blur(8px)`,paddingX:2,paddingY:1.5,maxWidth:`220px`,cursor:`pointer`,_hover:{color:`fg`,borderColor:`border.emphasized`},children:[(0,Y.jsx)(`option`,{value:``,children:`Live data`}),st.map(e=>(0,Y.jsx)(`option`,{value:e.key,children:e.label},e.key))]}):null}function gt(e,t){let n=e.aggregation===`terms`?`cardinality`:e.aggregation;return e.pipeline?`${t}/${e.metric}/${n}/${e.pipeline.field}/${e.pipeline.aggregation}`:e.key?`${t}/${e.metric}/${n}/${e.key}`:`${t}/${e.metric}/${n}`}var _t=4,vt=2,yt=1.5,bt=2,xt=2,St=1.25,Ct=250;function wt(e){return e.trim().replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\b/gi,`<id>`).replace(/\b(?:req|run|trace|span|job|task)_[a-z0-9_-]{8,}\b/gi,`<id>`).replace(/\b[0-9a-f]{16,}\b/gi,`<id>`).replace(/\b\d{4}-\d{2}-\d{2}t\d{2}:\d{2}:\d{2}(?:\.\d+)?z\b/gi,`<time>`).replace(/\b\d{6,}\b/g,`<number>`).replace(/\s+/g,` `).toLowerCase()}function Tt(e,t=92){let n=e.trim().replace(/\s+/g,` `);return n.length<=t?n:`${n.slice(0,t-1)}…`}function Et(e){let t=new Map;for(let n of e){if(!n.value.trim()||n.count<=0)continue;let e=wt(n.value);if(!e)continue;let r=t.get(e);r?(r.count+=n.count,r.values.push(n.value.trim().replace(/\s+/g,` `))):t.set(e,{key:e,values:[n.value.trim().replace(/\s+/g,` `)],count:n.count})}return[...t.values()].sort((e,t)=>t.count-e.count)}function Dt(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function Ot(e,t){if(e)return`/${e}/traces#all-traces?${new URLSearchParams({q:t,preset:`30d`}).toString()}`}function kt({id:e,label:t,query:n,meta:r}){return{context:{id:n,label:t,query:n,...r?{meta:{receiptId:e,...r}}:{}},link:{label:`Open traces`,href:Ot(void 0,n)??`#`}}}function At(e,t){return!e.link||!e.context?e:{...e,link:{...e.link,href:Ot(t,e.context.query)??`#`}}}function jt(e){let t=Et(e.currentErrorShapes??[]),n=Et(e.previousErrorShapes??[]),r=new Map(n.map(e=>[e.key,e.count])),i=e.previousErrorShapes!==void 0,a=e.previousErrorShapesComplete===!0,o=[];for(let n of t.slice(0,vt)){let t=r.get(n.key)??0,s=a&&t===0,c=t>0&&n.count>=t+bt&&n.count/t>=yt,l=n.count>=xt,u=s?`new`:c?`regressed`:l?`repeated`:`observed`,d=Tt(n.values[0]),f=n.values.map(e=>`errorMessage:${Dt(e)}`),p=f.length===1?f[0]:`(${f.join(` OR `)})`,m=`${u===`observed`?`Error`:`${u} error shape`}: ${d}`,ee=kt({id:`error-shape:${n.key}`,label:m,query:p,meta:{kind:`error-shape`,status:u,count:n.count,...i?{previousCount:t}:{}}});o.push({priority:s?0:c?1:l?4:6,receipt:At({id:`error-shape:${n.key}`,severity:`error`,subject:s?`New error shape`:c?`Error shape regressed`:l?`Repeated error shape`:`Error shape observed`,detail:`“${d}” on ${n.count} ${n.count===1?`trace`:`traces`}.`,metric:c?{text:`${n.count} vs ${t}`,tone:`up`}:void 0,...ee,askPrompt:`Investigate the ${u} error shape “${d}” across the matching traces. Show the shared evidence and do not claim a root cause unless the traces prove it.`},e.slug)})}let s=[...e.sharedTraceNames??[]].filter(e=>e.value.trim()&&e.count>=xt).sort((e,t)=>t.count-e.count)[0];if(s){let t=Tt(s.value,60),n=`status:error AND traceName:${Dt(t)}`,r=kt({id:`shared-trace-name:${wt(t)}`,label:`Shared error signal: ${t}`,query:n,meta:{kind:`shared-signal`,signal:`trace-name`,count:s.count}});o.push({priority:2,receipt:At({id:`shared-trace-name:${wt(t)}`,severity:`attention`,subject:`Shared error signal`,detail:`${s.count} errored traces share “${t}”. Correlation, not a confirmed cause.`,...r,askPrompt:`Investigate why ${s.count} errored traces share the trace name “${t}”. Treat it as a correlation, not a confirmed cause, and cite the supporting traces.`},e.slug)})}let c=e.p50Latency,l=e.previousP50Latency;if(c!==void 0&&c>0&&l!==void 0&&l>0){let t=c/l,n=c-l;if(t>=St&&n>=Ct){let n=Math.round((t-1)*100),r=`duration:>${Math.round(c)}`,i=kt({id:`latency-regression`,label:`Latency regression: p50 ${We(c)}`,query:r,meta:{kind:`latency-regression`,currentMs:c,previousMs:l}});o.push({priority:3,receipt:At({id:`latency-regression`,severity:`attention`,subject:`Latency regressed`,detail:`p50 is ${n}% slower than the prior 30 days.`,metric:{text:We(c),tone:`up`},...i,askPrompt:`Explain the ${n}% p50 latency regression versus the prior 30 days. Compare the matching slow traces and separate evidence from hypotheses.`},e.slug)})}}if(!o.some(({receipt:e})=>e.id.startsWith(`error-shape:`))&&(e.errorTraces??0)>0){let t=e.errorTraces,n=kt({id:`errors-unclassified`,label:`${t} errored traces need triage`,query:`status:error`,meta:{kind:`errors-unclassified`,count:t}});o.push({priority:5,receipt:At({id:`errors-unclassified`,severity:`error`,subject:`${t} errored ${t===1?`trace`:`traces`}`,detail:`This read cannot prove a shared error shape or cause yet; start with the matching traces.`,...n,askPrompt:`Triage the errored traces in this briefing. Cluster only what the trace evidence supports and say explicitly when a shared cause cannot be proven.`},e.slug)})}return o.sort((e,t)=>e.priority-t.priority).slice(0,_t).map(({receipt:e})=>e)}var Mt=4,Nt=6e4,Pt=3e4,Ft=10*6e4,It=jt;function Lt({buckets:e,series:t,metric:n,aggregation:r}){if(!e)return;let i=t.findIndex(e=>e.metric===n&&e.aggregation===r);if(i<0)return;let a=gt(t[i],i),o=0,s=!1;for(let t of e){let e=t[a];typeof e==`number`&&(o+=e,s=!0)}return s?o:void 0}function Rt({buckets:e,series:t,groupBy:n,metric:r,aggregation:i}){if(!e)return;let a=t.findIndex(e=>e.metric===r&&e.aggregation===i);if(a<0)return;let o=gt(t[a],a),s=new Map,c=!1;for(let t of e){let e=t[n];if(!(!e||typeof e!=`object`)){c=!0;for(let[t,n]of Object.entries(e)){let e=n[o];typeof e==`number`&&s.set(t,(s.get(t)??0)+e)}}}if(c)return[...s.entries()].map(([e,t])=>({value:e,count:t})).sort((e,t)=>t.count-e.count)}function zt(){let{project:e,hasPermission:t}=W(),n=t(`cost:view`),r=t(`analytics:view`),i=t(`traces:view`),a=mt(),o=k.scenarios.getExternalSetSummaries.useQuery({projectId:e?.id??``},{enabled:!!e?.id&&!a,staleTime:Nt,cacheTime:Ft,refetchInterval:Pt,keepPreviousData:!0}),s=k.home.getRecentItems.useQuery({projectId:e?.id??``,limit:12},{enabled:!!e?.id&&!a,staleTime:Nt,cacheTime:Ft,keepPreviousData:!0}),c=(0,K.useMemo)(()=>{let e=Date.now();return{startDate:e-720*60*60*1e3,endDate:e,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}},[]),l=(0,K.useMemo)(()=>{let e=[{metric:`metadata.trace_id`,aggregation:`cardinality`},{metric:`metadata.thread_id`,aggregation:`cardinality`},{metric:`metadata.user_id`,aggregation:`cardinality`},{metric:`performance.total_tokens`,aggregation:`sum`}];return n&&e.push({metric:`performance.total_cost`,aggregation:`sum`}),e.push({metric:`performance.completion_time`,aggregation:`median`}),e},[n]),u=k.analytics.getTimeseries.useQuery({projectId:e?.id??``,startDate:c.startDate,endDate:c.endDate,filters:{},timeZone:c.timeZone,timeScale:`full`,series:l},{enabled:!!e?.id&&!a&&r,staleTime:Nt,cacheTime:Ft,refetchInterval:Pt,keepPreviousData:!0}),d=(0,K.useMemo)(()=>[{metric:`metadata.trace_id`,aggregation:`cardinality`}],[]),f=k.analytics.getTimeseries.useQuery({projectId:e?.id??``,startDate:c.startDate,endDate:c.endDate,filters:{"traces.error":[`true`]},timeZone:c.timeZone,timeScale:`full`,series:d,groupBy:`traces.trace_name`},{enabled:!!e?.id&&!a&&r,staleTime:Nt,cacheTime:Ft,refetchInterval:Pt,keepPreviousData:!0}),p=k.tracesV2.facetValues.useQuery({projectId:e?.id??``,timeRange:{from:c.startDate,to:c.endDate},facetKey:`errorMessage`,limit:50,offset:0},{enabled:!!e?.id&&!a&&i,staleTime:Nt,cacheTime:Ft,refetchInterval:Pt,keepPreviousData:!0}),m=k.tracesV2.facetValues.useQuery({projectId:e?.id??``,timeRange:{from:c.startDate-(c.endDate-c.startDate),to:c.startDate},facetKey:`errorMessage`,limit:50,offset:0},{enabled:!!e?.id&&!a&&i,staleTime:Nt,cacheTime:Ft,keepPreviousData:!0});return(0,K.useMemo)(()=>{if(a){let e=ct(a);if(e)return{data:e.data,statusCells:e.statusCells,recentItems:[],isLoading:!1,isAnalyticsLoading:!1,isRefreshing:!1}}let t=e?.slug,c=o.data??[],ee=s.data??[],h=o.isLoading&&!o.data,g=r&&u.isLoading&&!u.data,_=r&&f.isLoading&&!f.data||i&&(p.isLoading&&!p.data||m.isLoading&&!m.data),v=!h&&!g&&!_&&(o.isFetching||s.isFetching||u.isFetching||f.isFetching||p.isFetching||m.isFetching),y=c.reduce((e,t)=>({passed:e.passed+t.passedCount,failed:e.failed+t.failedCount,total:e.total+t.totalCount}),{passed:0,failed:0,total:0}),b=y.total>0,x=s.data?.length??0,S=u.data?.currentPeriod,C=(e,t)=>Lt({buckets:S,series:l,metric:e,aggregation:t}),w=C(`metadata.trace_id`,`cardinality`),T=C(`metadata.thread_id`,`cardinality`),te=C(`metadata.user_id`,`cardinality`),E=C(`performance.total_tokens`,`sum`),D=n?C(`performance.total_cost`,`sum`):void 0,O=C(`performance.completion_time`,`median`),k=w!==void 0&&w>0,ne=(e,t)=>Lt({buckets:u.data?.previousPeriod,series:l,metric:e,aggregation:t}),A=ne(`performance.completion_time`,`median`),re=n?ne(`performance.total_cost`,`sum`):void 0,ie=ne(`metadata.trace_id`,`cardinality`),j=ne(`metadata.user_id`,`cardinality`),M=ne(`performance.total_tokens`,`sum`),N=(e,t)=>{if(e===void 0||t===void 0||t<=0)return;let n=(e-t)/t*100;if(!Number.isFinite(n)||Math.abs(n)<.5)return;let r=Math.abs(n)>=10?Math.round(Math.abs(n)):Math.round(Math.abs(n)*10)/10;return`${n>0?`+`:`−`}${r}%`},P=e=>e===void 0?void 0:e.startsWith(`+`)?`bad`:`good`,F=Rt({buckets:f.data?.currentPeriod,series:d,groupBy:`traces.trace_name`,metric:`metadata.trace_id`,aggregation:`cardinality`}),ae=F?.reduce((e,t)=>e+t.count,0),I=It({slug:t,currentErrorShapes:p.data?.values,previousErrorShapes:m.data?.values,previousErrorShapesComplete:m.data?m.data.totalDistinct<=m.data.values.length:void 0,sharedTraceNames:F,errorTraces:ae,p50Latency:O,previousP50Latency:A}),L,oe=!1;I.length>0?L=`${I.length} ${I.length===1?`signal needs`:`signals need`} attention. Changed errors and repeated evidence are prioritized first.`:_||g?L=`Comparing error shapes and latency with the prior 30 days…`:b&&y.failed>0?L=`${y.passed} of ${y.total} scenarios passing. ${y.failed} need a look.`:b?L=`No supported error or latency change is asking for attention. Recent scenarios are passing.`:k?L=r||i?`No supported error or latency change is asking for attention right now.`:`Trace activity is available, but this view cannot compare errors or latency with your current access.`:x>0?L=`Here's where you left off, and what's moved since.`:(L=`Your project is quiet. Send a trace and I'll start watching for what changes.`,oe=!0);let R=[...c].sort((e,t)=>(t.lastRunTimestamp??0)-(e.lastRunTimestamp??0)).slice(0,Mt).map(e=>{let t=e.failedCount>0;return{id:e.scenarioSetId,label:e.scenarioSetId,status:t?`fail`:`pass`,fillPct:e.totalCount>0?e.passedCount/e.totalCount*100:0,statLabel:`${e.passedCount}/${e.totalCount} pass`}}),z=b?[{label:`Pass rate`,value:`${Math.round(y.passed/y.total*100)}%`,tone:y.failed>0?`bad`:`good`,link:t?`/${t}/simulations`:void 0},{label:`Passing`,value:String(y.passed),tone:`neutral`},{label:`Failing`,value:String(y.failed),tone:y.failed>0?`bad`:`good`},{label:`Scenario sets`,value:String(c.length),tone:`vanity`}]:[],B=[];if(O!==void 0&&O>0){let e=N(O,A)??void 0;B.push({label:`p50 latency`,value:We(O),tone:`vanity`,delta:e,deltaTone:P(e)})}if(D!==void 0&&D>0){let e=N(D,re)??void 0;B.push({label:`Cost / 24h`,value:Ye({amount:D,currency:`USD`}),tone:`vanity`,delta:e,deltaTone:P(e)})}w!==void 0&&w>0&&B.push({label:`Traces · threads`,value:`${Math.round(w)} · ${Math.round(T??0)}`,tone:`vanity`,delta:N(w,ie)??void 0,deltaTone:`neutral`}),te!==void 0&&te>0&&B.push({label:`Users`,value:String(Math.round(te)),tone:`vanity`,delta:N(te,j)??void 0,deltaTone:`neutral`}),E!==void 0&&E>0&&B.push({label:`Total tokens`,value:new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:1}).format(E),tone:`vanity`,delta:N(E,M)??void 0,deltaTone:`neutral`});let se=[...z,...B];return{data:{since:b?`since yesterday`:k?`last 30 days`:`last 24 hours`,headline:L,quiet:oe,receiptsLabel:I.length>0?`Anomalies`:void 0,receipts:I.length>0?I:void 0,pills:b?[{label:`${c.length} scenario ${c.length===1?`set`:`sets`}`}]:void 0,scenariosLabel:b?`Recent scenario runs`:void 0,bars:R.length>0?R:void 0,judge:b?{pass:y.passed,regressions:y.failed,note:`across ${c.length} ${c.length===1?`set`:`sets`}`}:void 0,askHint:b?`"what changed this week?"`:k?`"what changed in my errors?"`:void 0,suggestions:[...I.length>0?[`What changed in my errors?`]:[],...O!==void 0&&O>0?[`Why is p50 latency ${We(O)}?`]:[],...b&&y.failed>0?[`Why are ${y.failed} scenarios failing?`]:[],...D!==void 0&&D>0?[`Where is my cost going?`]:[]].slice(0,3),sessionHref:b&&t?`/${t}/simulations`:void 0},statusCells:se,recentItems:ee,isLoading:h,isAnalyticsLoading:g,isRefreshing:v}},[a,e?.slug,o.data,o.isLoading,o.isFetching,s.data,s.isLoading,s.isFetching,u.data,u.isLoading,u.isFetching,f.data,f.isLoading,f.isFetching,p.data,p.isLoading,p.isFetching,m.data,m.isLoading,m.isFetching,d,l,r,n,i])}var Bt=`var(--langy-font-serif, "Sentient", "Charter", "Source Serif Pro", Georgia, serif)`;function Vt({cells:e,title:t=`Traces overview`,rangeLabel:n,dashboardsHref:i,isLoading:o=!1,refreshing:c=!1,bare:d=!1}){let f=M();if(e.length===0&&!o)return null;let p=(0,Y.jsxs)(u,{align:`stretch`,gap:d?3.5:5,children:[(0,Y.jsxs)(a,{justify:`space-between`,align:`baseline`,gap:3,wrap:`wrap`,children:[(0,Y.jsxs)(a,{gap:2.5,align:`baseline`,children:[d?(0,Y.jsxs)(l,{fontFamily:`mono`,fontSize:`10px`,fontWeight:`500`,letterSpacing:`0.03em`,textTransform:`uppercase`,color:`fg.muted`,children:[t,n?` · ${n}`:null]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(l,{fontFamily:Bt,fontSize:`18px`,fontWeight:`500`,letterSpacing:`-0.01em`,color:`fg`,children:t}),n?(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`11px`,letterSpacing:`0.02em`,color:`fg.subtle`,children:n}):null]}),c||o?(0,Y.jsx)(G.span,{"aria-hidden":!0,animate:{opacity:[.25,1,.25]},transition:{duration:1.4,repeat:1/0,ease:`easeInOut`},style:{display:`inline-block`,width:`6px`,height:`6px`,borderRadius:`9999px`,background:`#ED8926`}}):null]}),i?(0,Y.jsx)(r.a,{href:i,onClick:e=>{i&&(e.preventDefault(),f.push(i))},fontFamily:`mono`,fontSize:`12px`,color:`orange.fg`,whiteSpace:`nowrap`,borderBottomWidth:`1px`,borderColor:`transparent`,paddingBottom:`1px`,cursor:`pointer`,transition:`border-color 130ms ease`,_hover:{borderColor:`orange.fg`},children:`Agent analytics →`}):null]}),(0,Y.jsx)(v,{templateColumns:{base:`repeat(2, 1fr)`,md:`repeat(3, 1fr)`,lg:`repeat(auto-fit, minmax(150px, 1fr))`},columnGap:6,rowGap:5,children:e.length===0&&o?Array.from({length:6},(e,t)=>(0,Y.jsxs)(u,{align:`start`,gap:2.5,children:[(0,Y.jsx)(s,{height:`11px`,width:`72px`}),(0,Y.jsx)(s,{height:`24px`,width:`88px`})]},t)):e.map(e=>(0,Y.jsx)(Wt,{cell:e},e.label))})]});return d?p:(0,Y.jsx)(Ke,{padding:{base:4,md:5},children:p})}var Ht=900,Ut=5e3;function Wt({cell:e}){let t=Le(),r=(0,K.useRef)(e.value),i=(0,K.useRef)(0),[o,s]=(0,K.useState)(0);(0,K.useEffect)(()=>{if(r.current===e.value)return;r.current=e.value;let t=Date.now();t-i.current<Ut||(i.current=t,s(e=>e+1))},[e.value]);let c=e.tone===`vanity`,d=e.tone===`good`?`green.solid`:e.tone===`bad`?`red.solid`:void 0,f=e.tone===`good`?`green.fg`:e.tone===`bad`?`red.fg`:`fg`;return(0,Y.jsxs)(u,{align:`start`,gap:2.5,children:[(0,Y.jsxs)(a,{gap:1.5,align:`center`,children:[d?(0,Y.jsx)(n,{width:`6px`,height:`6px`,borderRadius:`full`,background:d,flexShrink:0}):null,(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`11.5px`,letterSpacing:`0.02em`,color:`fg.muted`,children:e.label})]}),(0,Y.jsxs)(a,{gap:1.5,align:`baseline`,children:[(0,Y.jsx)(G.span,{style:{display:`inline-block`},animate:o>0&&!t?{scale:[1,1.045,1],textShadow:[`0 0 0px rgba(237, 137, 38, 0)`,`0 0 16px rgba(237, 137, 38, 0.55)`,`0 0 0px rgba(237, 137, 38, 0)`]}:void 0,transition:{duration:Ht/1e3,ease:`easeOut`},children:(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:c?`20px`:`26px`,fontWeight:c?`400`:`500`,letterSpacing:`-0.02em`,lineHeight:`1`,fontVariantNumeric:`tabular-nums`,color:f,children:e.value})},o),e.delta?(0,Y.jsxs)(l,{fontFamily:`mono`,fontSize:`11px`,fontWeight:`600`,fontVariantNumeric:`tabular-nums`,whiteSpace:`nowrap`,color:e.deltaTone===`bad`?`red.fg`:e.deltaTone===`good`?`green.fg`:`fg.muted`,children:[e.delta.startsWith(`+`)?`▲`:`▼`,` `,e.delta]}):null]})]})}var Gt=`var(--langy-font-serif, "Sentient", "Charter", "Source Serif Pro", Georgia, serif)`,Kt=e=>`/${e}/traces`,qt=`How do I send my first trace to LangWatch? Walk me through the quickest integration for my stack.`,Jt=[{phrase:`Generate a dataset`,href:e=>`/${e}/datasets`,ask:`Help me generate my first dataset, what can I build it from, and what makes a good one?`},{phrase:`Run an experiment`,href:e=>`/${e}/experiments`,ask:`How do I run my first experiment here, what should I evaluate first?`},{phrase:`Create a simulation`,href:e=>`/${e}/simulations`,ask:`Help me create my first agent simulation.`}],Yt=55,Xt=28,Zt=2400,Qt=400;function $t(){let e=Le(),t=M(),{project:n}=W(),i=U(e=>e.askLangy),o=Pe(),[s,c]=(0,K.useState)({index:0,length:0,deleting:!1});(0,K.useEffect)(()=>{if(e)return;let t=Jt[s.index%Jt.length].phrase,n,r;s.deleting?s.length>0?(n=Xt,r={...s,length:s.length-1}):(n=Qt,r={index:(s.index+1)%Jt.length,length:0,deleting:!1}):s.length<t.length?(n=Yt,r={...s,length:s.length+1}):(n=Zt,r={...s,deleting:!0});let i=setTimeout(()=>c(r),n);return()=>clearTimeout(i)},[s,e]);let u=Jt[s.index%Jt.length],d=e?u.phrase:u.phrase.slice(0,s.length),f=e=>e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return(0,Y.jsxs)(r.div,{children:[(0,Y.jsx)(l,{fontFamily:Gt,fontWeight:`400`,fontSize:{base:`16px`,md:`18px`},lineHeight:`1.3`,letterSpacing:`-0.01em`,color:`fg`,maxWidth:`60ch`,children:`Your project is quiet. Send a trace and the watch begins.`}),(0,Y.jsxs)(a,{gap:2.5,marginTop:3,wrap:`wrap`,align:`center`,children:[(0,Y.jsxs)(r.a,{href:n?Kt(n.slug):void 0,onClick:e=>{!n||!f(e)||(e.preventDefault(),t.push(Kt(n.slug)))},"aria-label":`Send your first trace`,display:`inline-flex`,alignItems:`center`,gap:1.5,fontFamily:`mono`,fontSize:`12.5px`,fontWeight:`600`,whiteSpace:`nowrap`,color:`white`,background:`orange.solid`,borderRadius:`8px`,paddingX:3.5,paddingY:`7px`,cursor:`pointer`,boxShadow:`0 1px 2px rgba(0,0,0,0.12)`,transition:`opacity 130ms ease, transform 130ms ease`,_hover:{opacity:.92,transform:`translateY(-1px)`},_active:{transform:`translateY(0)`},children:[(0,Y.jsx)(L,{size:13}),`Send your first trace`,(0,Y.jsx)(ce,{size:13})]}),o?(0,Y.jsx)(en,{label:`Walk me through it`,ariaLabel:`Ask Langy how to send your first trace`,onClick:()=>i(qt)}):null]}),(0,Y.jsxs)(a,{gap:1.5,marginTop:3.5,align:`baseline`,wrap:`wrap`,children:[(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,children:`Or`}),(0,Y.jsx)(r.button,{type:`button`,onClick:()=>{o?i(u.ask):n&&t.push(u.href(n.slug))},"aria-label":o?`Ask Langy: ${u.phrase}`:`Learn more: ${u.phrase}`,fontFamily:`mono`,fontSize:`12px`,color:`orange.fg`,cursor:`pointer`,textAlign:`left`,borderBottomWidth:`1px`,borderBottomStyle:`dashed`,borderColor:`orange.emphasized`,transition:`border-color 130ms ease`,_hover:{borderColor:`orange.fg`},children:d}),e?null:(0,Y.jsx)(G.span,{"aria-hidden":!0,animate:{opacity:[1,1,0,0]},transition:{duration:1,repeat:1/0,ease:`linear`},style:{display:`inline-block`,marginLeft:`1px`},children:`▍`}),(0,Y.jsx)(r.a,{href:n?u.href(n.slug):void 0,onClick:e=>{!n||!f(e)||(e.preventDefault(),t.push(u.href(n.slug)))},fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,cursor:`pointer`,whiteSpace:`nowrap`,marginLeft:1,borderBottomWidth:`1px`,borderColor:`transparent`,transition:`color 130ms ease, border-color 130ms ease`,_hover:{color:`fg`,borderColor:`fg.muted`},children:`Learn more →`}),o?(0,Y.jsx)(en,{label:`Do it with Langy`,onClick:()=>i(u.ask)}):null]})]})}function en({label:e,ariaLabel:t,onClick:n}){return(0,Y.jsxs)(r.button,{type:`button`,onClick:n,"aria-label":t,display:`inline-flex`,alignItems:`center`,gap:1,fontFamily:`mono`,fontSize:`12px`,color:`orange.fg`,cursor:`pointer`,whiteSpace:`nowrap`,borderBottomWidth:`1px`,borderColor:`transparent`,transition:`border-color 130ms ease`,_hover:{borderColor:`orange.fg`},children:[(0,Y.jsx)(Te,{size:12}),e]})}var tn=`var(--langy-font-serif, "Sentient", "Charter", "Source Serif Pro", Georgia, serif)`,nn={pass:`green.solid`,regression:`red.solid`,fail:`red.solid`},rn={pass:`green.fg`,regression:`red.fg`,fail:`red.fg`},an={error:`red.solid`,attention:`#c98a2f`,steady:`green.solid`},on={down:`red.fg`,up:`#c98a2f`,ok:`green.fg`};function sn({data:e,onAsk:t,onInvestigateReceipt:i,onAskSubmit:o,onFeedback:s,status:c}){return(0,Y.jsx)(Ke,{accent:!0,fill:!0,borderRadius:`14px`,padding:{base:4,md:4},children:(0,Y.jsxs)(u,{align:`stretch`,gap:3,flex:1,minHeight:0,children:[(0,Y.jsxs)(a,{justify:`space-between`,align:`center`,gap:3,wrap:`wrap`,children:[(0,Y.jsxs)(l,{fontFamily:`mono`,fontSize:`11px`,fontWeight:`500`,letterSpacing:`0.04em`,textTransform:`uppercase`,color:`orange.fg`,children:[`Agentic signals · `,e.since]}),e.loop?(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`11.5px`,color:`fg.muted`,children:e.loop}):null]}),e.quiet?(0,Y.jsx)($t,{}):(0,Y.jsx)(l,{fontFamily:tn,fontWeight:`400`,fontSize:{base:`16px`,md:`18px`},lineHeight:`1.3`,letterSpacing:`-0.01em`,color:`fg`,children:e.headline}),e.receipts&&e.receipts.length>0?(0,Y.jsxs)(u,{align:`stretch`,gap:2,children:[e.receiptsLabel?(0,Y.jsxs)(a,{justify:`space-between`,align:`center`,gap:3,children:[(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`10px`,fontWeight:`500`,letterSpacing:`0.03em`,textTransform:`uppercase`,color:`fg.muted`,children:e.receiptsLabel}),s?(0,Y.jsx)(r.button,{type:`button`,onClick:s,fontFamily:`mono`,fontSize:`10.5px`,color:`fg.subtle`,cursor:`pointer`,transition:`color 130ms ease`,_hover:{color:`fg.muted`},children:`Missing a signal? Tell us`}):null]}):null,(0,Y.jsx)(u,{align:`stretch`,gap:`1px`,background:`border.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`10px`,overflow:`hidden`,children:e.receipts.map(e=>(0,Y.jsx)(cn,{receipt:e,onInvestigate:i},e.id))})]}):null,e.pills&&e.pills.length>0?(0,Y.jsx)(a,{gap:2,wrap:`wrap`,children:e.pills.map(e=>(0,Y.jsx)(p,{value:e.label,maxValueWidth:`none`},e.label))}):null,e.bars&&e.bars.length>0?(0,Y.jsxs)(u,{align:`stretch`,gap:2,children:[e.scenariosLabel?(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`10px`,fontWeight:`500`,letterSpacing:`0.03em`,textTransform:`uppercase`,color:`fg.muted`,children:e.scenariosLabel}):null,e.bars.map(e=>(0,Y.jsx)(ln,{bar:e},e.id)),e.barsMore?(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,children:e.barsMore}):null]}):null,e.judge?(0,Y.jsxs)(a,{justify:`space-between`,align:`center`,gap:3,wrap:`wrap`,paddingX:3,paddingY:2,borderWidth:`1px`,borderColor:`border.emphasized`,borderRadius:`10px`,background:`bg.panel`,children:[(0,Y.jsxs)(l,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,children:[`JudgeAgent ·`,` `,(0,Y.jsxs)(l,{as:`span`,color:`green.fg`,children:[e.judge.pass,` pass`]}),e.judge.regressions>0?(0,Y.jsxs)(Y.Fragment,{children:[` · `,(0,Y.jsxs)(l,{as:`span`,color:`red.fg`,children:[e.judge.regressions,` failing`]})]}):null]}),e.judge.note?(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`10px`,fontWeight:`500`,letterSpacing:`0.03em`,textTransform:`uppercase`,color:`fg.muted`,children:e.judge.note}):null]}):null,e.draftedPr?(0,Y.jsxs)(a,{gap:3,align:`center`,padding:3,borderWidth:`1px`,borderColor:`border.emphasized`,borderRadius:`10px`,background:`bg.panel`,children:[(0,Y.jsx)(n,{color:`orange.fg`,flexShrink:0,children:(0,Y.jsx)(A,{size:15})}),(0,Y.jsxs)(u,{align:`start`,gap:.5,flex:1,minWidth:0,children:[(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`13px`,color:`fg`,lineClamp:1,children:e.draftedPr.title}),(0,Y.jsxs)(l,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,children:[e.draftedPr.meta,e.draftedPr.added==null?null:(0,Y.jsxs)(Y.Fragment,{children:[` · `,(0,Y.jsxs)(l,{as:`span`,color:`green.fg`,children:[`+`,e.draftedPr.added]}),` `,(0,Y.jsxs)(l,{as:`span`,color:`red.fg`,children:[`−`,e.draftedPr.removed??0]})]})]})]}),(0,Y.jsx)(un,{label:`Review`,href:e.draftedPr.href,solid:!0})]}):null,c?(0,Y.jsxs)(u,{align:`stretch`,gap:3,paddingTop:1,children:[(0,Y.jsx)(n,{borderTopWidth:`1px`,borderColor:`border.muted`}),c]}):null,t||o&&e.suggestions?.length||e.sessionHref?(0,Y.jsxs)(a,{justify:`space-between`,align:`center`,gap:3,wrap:`wrap`,marginTop:`auto`,paddingTop:2,children:[(0,Y.jsxs)(a,{gap:2,wrap:`wrap`,align:`center`,minWidth:0,children:[t?(0,Y.jsxs)(r.button,{type:`button`,onClick:t,display:`inline-flex`,alignItems:`center`,gap:2,fontFamily:`mono`,fontSize:`12.5px`,color:`fg.muted`,cursor:`pointer`,_hover:{color:`fg`},transition:`color 130ms ease`,children:[`Investigate`,(0,Y.jsx)(n,{as:`kbd`,borderWidth:`1px`,borderColor:`border.emphasized`,borderRadius:`6px`,paddingX:`6px`,paddingY:`1px`,fontSize:`10.5px`,color:`fg.subtle`,children:`⌘I`})]}):null,o?e.suggestions?.map(e=>(0,Y.jsx)(r.button,{type:`button`,onClick:()=>o(e),fontFamily:`mono`,fontSize:`11.5px`,color:`fg.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`full`,paddingX:2.5,paddingY:`3px`,cursor:`pointer`,whiteSpace:`nowrap`,transition:`color 130ms ease, border-color 130ms ease`,_hover:{color:`orange.fg`,borderColor:`orange.emphasized`},children:e},e)):null]}),e.sessionHref?(0,Y.jsx)(un,{label:`Open session`,href:e.sessionHref}):null]}):null]})})}function cn({receipt:e,onInvestigate:t}){let i=M(),o=e.link?.href,s=o?/^https?:\/\//.test(o):!1,c=e.subject??`this signal`,u=e=>{!o||s||(e.preventDefault(),i.push(o))};return(0,Y.jsxs)(n,{position:`relative`,background:`bg.surface`,transition:`background 130ms ease`,_hover:o?{background:`bg.muted`}:void 0,css:{"&:hover .receipt-chevron":{opacity:1,transform:`translateX(0)`}},children:[o?(0,Y.jsx)(r.a,{href:o,...s?{target:`_blank`,rel:`noreferrer`}:{},onClick:u,"aria-label":`Open traces for ${c}`,position:`absolute`,inset:0,zIndex:0,_focusVisible:{outline:`2px solid`,outlineColor:`orange.focusRing`,outlineOffset:`-2px`}}):null,(0,Y.jsxs)(a,{position:`relative`,zIndex:1,pointerEvents:o?`none`:void 0,gap:2.5,align:`center`,paddingX:3,paddingY:2.5,children:[(0,Y.jsx)(n,{width:`7px`,height:`7px`,borderRadius:`full`,flexShrink:0,alignSelf:`center`,marginTop:`-1px`,background:an[e.severity]}),(0,Y.jsxs)(l,{fontSize:`13px`,color:`fg.muted`,flex:1,minWidth:0,lineHeight:`1.5`,children:[e.subject?(0,Y.jsxs)(l,{as:`span`,fontFamily:`mono`,fontSize:`12.5px`,fontWeight:`600`,color:`fg`,children:[e.subject,` `]}):null,e.detail]}),(0,Y.jsxs)(a,{gap:2.5,flexShrink:0,align:`center`,children:[e.metric?(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`12px`,whiteSpace:`nowrap`,color:on[e.metric.tone],fontVariantNumeric:`tabular-nums`,children:e.metric.text}):null,o?(0,Y.jsx)(l,{className:`receipt-chevron`,as:`span`,color:`fg.muted`,fontFamily:`mono`,fontSize:`11px`,whiteSpace:`nowrap`,textDecoration:`underline`,textUnderlineOffset:`3px`,textDecorationColor:`border.emphasized`,opacity:0,transform:`translateX(-3px)`,transition:`opacity 130ms ease, transform 130ms ease`,"aria-hidden":!0,children:e.link?.label??`Open traces`}):null,e.context&&t?(0,Y.jsx)(n,{pointerEvents:`auto`,children:(0,Y.jsxs)(r.button,{type:`button`,"aria-label":`Investigate ${c} in Langy`,display:`inline-flex`,alignItems:`center`,gap:1,fontFamily:`mono`,fontSize:`11px`,color:`orange.fg`,borderWidth:`1px`,borderColor:`orange.emphasized`,borderRadius:`7px`,paddingX:2,paddingY:`3px`,cursor:`pointer`,transition:`border-color 130ms ease, background 130ms ease`,_hover:{borderColor:`orange.fg`,background:`bg.panel`},onClick:n=>{n.stopPropagation(),t(e)},children:[(0,Y.jsx)(Te,{size:11}),`Investigate`]})}):null]})]})]})}function ln({bar:e}){return(0,Y.jsxs)(a,{gap:{base:2.5,md:3.5},align:`center`,display:`grid`,gridTemplateColumns:{base:`1fr`,md:`minmax(0, 200px) 1fr 92px`},children:[(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,lineClamp:1,minWidth:0,children:e.label}),(0,Y.jsx)(n,{height:`8px`,borderRadius:`5px`,background:`langy.barTrack`,overflow:`hidden`,children:(0,Y.jsx)(n,{height:`full`,width:`${Math.max(4,Math.min(100,e.fillPct))}%`,borderRadius:`6px`,background:nn[e.status]})}),(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`12px`,textAlign:{base:`left`,md:`right`},color:rn[e.status],fontVariantNumeric:`tabular-nums`,children:e.statLabel})]})}function un({label:e,href:t,solid:n=!1}){let i=M(),a=/^https?:\/\//.test(t)?{href:t,target:`_blank`,rel:`noreferrer`}:{href:t,onClick:e=>{e.preventDefault(),i.push(t)}};return n?(0,Y.jsxs)(r.a,{...a,flexShrink:0,fontFamily:`mono`,fontSize:`12.5px`,whiteSpace:`nowrap`,cursor:`pointer`,color:`fg`,borderWidth:`1px`,borderColor:`border.emphasized`,borderRadius:`9px`,paddingX:3.5,paddingY:`7px`,background:`bg.emphasized`,transition:`border-color 130ms ease, color 130ms ease`,_hover:{borderColor:`orange.emphasized`,color:`orange.fg`},children:[e,` →`]}):(0,Y.jsxs)(r.a,{...a,flexShrink:0,fontFamily:`mono`,fontSize:`12.5px`,whiteSpace:`nowrap`,cursor:`pointer`,color:`orange.fg`,borderBottomWidth:`1px`,borderColor:`transparent`,paddingBottom:`1px`,transition:`border-color 130ms ease`,_hover:{borderColor:`orange.fg`},children:[e,` →`]})}function dn(){let{data:e,statusCells:t,isLoading:n,isAnalyticsLoading:r,isRefreshing:i}=zt(),{project:a}=W(),o=qe(),s=Pe(),c=U(e=>e.openPanel),l=U(e=>e.askLangy),u=U(e=>e.attachContext),d=U(e=>e.setDraft);return!n&&!e?null:n||!e?(0,Y.jsx)(fn,{}):(0,Y.jsx)(sn,{data:e,onAsk:o?c:void 0,onAskSubmit:s?t=>{l(t);for(let t of e?.receipts??[])t.context&&u({type:`filter`,id:t.context.id,label:t.context.label,meta:{query:t.context.query,severity:t.severity,...t.context.meta??{}}})}:void 0,onFeedback:o?()=>{d(`Feedback on the anomalies feed: the signal I'm missing is `),c()}:void 0,onInvestigateReceipt:s?e=>{if(!e.context)return;let t=e.subject??e.context.label;l(e.askPrompt??`Investigate the "${t}" signal — what changed, what's the likely cause, and what should I look at first?`),u({type:`filter`,id:e.context.id,label:e.context.label,meta:{query:e.context.query,severity:e.severity,...e.context.meta??{}}})}:void 0,status:(0,Y.jsx)(Vt,{bare:!0,cells:t,rangeLabel:`Last 30 days`,isLoading:r,refreshing:i,dashboardsHref:a?`/${a.slug}/analytics`:void 0})})}function fn(){return(0,Y.jsx)(Ke,{accent:!0,fill:!0,borderRadius:`14px`,padding:{base:4,md:4},children:(0,Y.jsxs)(u,{align:`stretch`,gap:3,flex:1,minHeight:0,children:[(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`11px`,fontWeight:`500`,letterSpacing:`0.04em`,textTransform:`uppercase`,color:`orange.fg`,opacity:.7,children:`Agentic signals`}),(0,Y.jsxs)(u,{align:`stretch`,gap:2,children:[(0,Y.jsx)(s,{height:`18px`,width:{base:`92%`,md:`72%`}}),(0,Y.jsx)(s,{height:`18px`,width:{base:`68%`,md:`44%`}})]}),(0,Y.jsx)(u,{align:`stretch`,gap:`1px`,background:`border.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`10px`,overflow:`hidden`,children:[0,1].map(e=>(0,Y.jsxs)(a,{gap:2.5,align:`center`,paddingX:3,paddingY:2.5,background:`bg.surface`,children:[(0,Y.jsx)(s,{width:`7px`,height:`7px`,borderRadius:`full`}),(0,Y.jsx)(s,{height:`12px`,flex:1,width:e===0?`70%`:`56%`}),(0,Y.jsx)(s,{height:`12px`,width:`34px`})]},e))}),(0,Y.jsxs)(u,{align:`stretch`,gap:3,paddingTop:1,children:[(0,Y.jsx)(n,{borderTopWidth:`1px`,borderColor:`border.muted`}),(0,Y.jsx)(s,{height:`10px`,width:`164px`}),(0,Y.jsx)(a,{gap:6,children:[0,1,2].map(e=>(0,Y.jsxs)(u,{align:`start`,gap:2.5,children:[(0,Y.jsx)(s,{height:`11px`,width:`72px`}),(0,Y.jsx)(s,{height:`24px`,width:`88px`})]},e))})]}),(0,Y.jsxs)(a,{marginTop:`auto`,justify:`space-between`,gap:3,children:[(0,Y.jsx)(s,{height:`13px`,width:`96px`}),(0,Y.jsx)(s,{height:`13px`,width:`72px`})]})]})})}function X(e){return(0,Y.jsx)(w,{bg:`bg.surface/50`,backdropBlur:`md`,borderWidth:`1px`,borderColor:`border`,borderRadius:`14px`,boxShadow:`none`,_hover:{boxShadow:`0px 2px 4px 0px rgba(0, 0, 0, 0.08)`},...e,children:(0,Y.jsx)(T,{padding:0,gap:2,children:e.children})})}function pn({title:e,qualifier:t,children:n}){return(0,Y.jsxs)(a,{width:`full`,gap:2.5,align:`center`,wrap:`wrap`,children:[(0,Y.jsx)(c,{as:`h2`,fontWeight:`600`,fontSize:`15px`,letterSpacing:`-0.01em`,color:`fg`,lineHeight:`1.3`,children:e}),t?(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`11px`,color:`fg.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`full`,paddingX:2,whiteSpace:`nowrap`,children:t}):null,n?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(D,{}),n]}):null]})}var mn={createProject:z,syncFirstMessage:N,inviteTeamMembers:oe,setupModelProviders:he,createPrompt:pe,createSimulation:se,setupEvaluation:V,createWorkflow:me,createDataset:F},hn=e=>{switch(e){case`createProject`:return(0,Y.jsx)(z,{size:12});case`syncFirstMessage`:return(0,Y.jsx)(N,{size:12});case`inviteTeamMembers`:return(0,Y.jsx)(oe,{size:12});case`setupModelProviders`:return(0,Y.jsx)(he,{size:12});case`createPrompt`:return(0,Y.jsx)(pe,{size:12});case`createWorkflow`:return(0,Y.jsx)(me,{size:12});case`createSimulation`:return(0,Y.jsx)(se,{size:12});case`setupEvaluation`:return(0,Y.jsx)(V,{size:12});case`createDataset`:return(0,Y.jsx)(F,{size:12});default:return(0,Y.jsx)(z,{size:12})}},gn=(e,t)=>[{key:`createProject`,title:`Create your new project`,href:`/settings/teams`,complete:!0},{key:`syncFirstMessage`,title:`Sync your first message`,href:`/${t}/traces`,complete:e.firstMessage},{key:`inviteTeamMembers`,title:`Invite team members`,href:`/settings/members`,complete:(e.teamMembers??0)>1},{key:`setupModelProviders`,title:`Setup your model providers`,href:`/settings/model-providers`,complete:(e.modelProviders??0)>0},{key:`createPrompt`,title:`Create your first versioned prompt`,href:`/${t}/prompts`,complete:(e.prompts??0)>0},{key:`createSimulation`,title:`Create your first agent simulation`,href:`/${t}/simulations`,complete:(e.simulations??0)>0},{key:`setupEvaluation`,title:`Set up your first online evaluation`,href:`/${t}/online-evaluations`,complete:(e.onlineEvaluations??0)>0},{key:`createWorkflow`,title:`Create your first workflow`,href:`/${t}/workflows`,complete:(e.workflows??0)>0},{key:`createDataset`,title:`Create a dataset from the messages`,href:`/${t}/datasets`,complete:(e.datasets??0)>0}],_n=e=>{let t=e.filter(e=>e.complete).length;return Math.round(t/e.length*100)};function vn({step:e,onClick:t}){return(0,Y.jsxs)(a,{gap:2,paddingY:1,paddingX:1,borderRadius:`md`,cursor:e.complete?`default`:`pointer`,onClick:e.complete?void 0:t,_hover:e.complete?{}:{background:`bg.muted`},transition:`all 0.15s`,children:[(0,Y.jsx)(n,{padding:1,borderRadius:`full`,background:e.complete?`green.subtle`:`bg.muted`,color:e.complete?`green.solid`:`fg.muted`,children:e.complete?(0,Y.jsx)(z,{size:10}):hn(e.key)}),(0,Y.jsx)(l,{fontSize:`13px`,color:e.complete?`fg.muted`:`fg`,textDecoration:e.complete?`line-through`:`none`,children:e.title})]})}function yn(){let e=M(),{project:t}=W(),{emit:r}=Me(),{data:i,isLoading:a}=k.integrationsChecks.getCheckStatus.useQuery({projectId:t?.id??``},{enabled:!!t?.id});if((0,K.useEffect)(()=>{if(a||!i||!t?.id)return;let e=gn(i,t.slug),n=e.filter(e=>e.complete),o=_n(e);r(`viewed`,`onboarding_progress`,{project_id:t.id,completion_percentage:o,completed_tasks_count:n.length,total_tasks_count:e.length,all_complete:o===100,has_first_message:i.firstMessage,has_team_members:(i.teamMembers??0)>1,has_model_providers:(i.modelProviders??0)>0,has_prompts:(i.prompts??0)>0,has_simulations:(i.simulations??0)>0,has_online_evaluations:(i.onlineEvaluations??0)>0,has_workflows:(i.workflows??0)>0,has_datasets:(i.datasets??0)>0,count_team_members:i.teamMembers??0,count_model_providers:i.modelProviders??0,count_prompts:i.prompts??0,count_simulations:i.simulations??0,count_online_evaluations:i.onlineEvaluations??0,count_workflows:i.workflows??0,count_datasets:i.datasets??0})},[a]),a||!i||!t)return null;let o=gn(i,t.slug),s=_n(o);if(s===100)return null;let c=n=>{r(`clicked`,`onboarding_step`,{project_id:t.id,step_key:n.key,step_title:n.title,step_complete:n.complete}),e.push(n.href)},l=[];for(let e=0;e<o.length;e+=3)l.push(o.slice(e,e+3));return(0,Y.jsxs)(X,{cursor:`default`,width:`full`,padding:4,gap:3,_hover:{boxShadow:`xs`},children:[(0,Y.jsx)(pn,{title:`Get started with LangWatch`,qualifier:`${s}% done`,children:(0,Y.jsx)(n,{width:`80px`,children:(0,Y.jsx)(S,{value:s,colorPalette:`orange`,size:`sm`,children:(0,Y.jsx)(b,{borderRadius:`full`,children:(0,Y.jsx)(x,{})})})})}),(0,Y.jsx)(v,{templateColumns:{base:`1fr`,md:`repeat(${l.length}, 1fr)`},gap:2,width:`full`,children:l.map((e,t)=>(0,Y.jsx)(u,{align:`stretch`,gap:0,children:e.map(e=>(0,Y.jsx)(vn,{step:e,onClick:()=>c(e)},e.key))},t))})]})}function bn(){let e=M(),{project:t}=W(),[r,i]=(0,K.useState)(!0),{data:o}=k.integrationsChecks.getCheckStatus.useQuery({projectId:t?.id??``},{enabled:!!t?.id});if(!t||!o)return null;let s=gn(o,t.slug),c=s.filter(e=>e.complete).length,p=_n(s);if(p===100)return null;let m=s.filter(e=>!e.complete);return(0,Y.jsx)(n,{width:`full`,children:(0,Y.jsx)(ee,{open:r,onOpenChange:e=>i(e.open),children:(0,Y.jsxs)(n,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`14px`,background:`bg.surface`,overflow:`hidden`,children:[(0,Y.jsx)(d,{asChild:!0,children:(0,Y.jsxs)(a,{as:`button`,width:`full`,gap:3,paddingX:4,paddingY:2.5,cursor:`pointer`,_hover:{background:`bg.muted`},transition:`background 130ms ease`,children:[(0,Y.jsx)(n,{width:`96px`,height:`5px`,borderRadius:`full`,background:`border.emphasized`,overflow:`hidden`,flexShrink:0,children:(0,Y.jsx)(n,{height:`full`,width:`${p}%`,background:`orange.solid`})}),(0,Y.jsxs)(l,{fontFamily:`mono`,fontSize:`12.5px`,color:`fg.muted`,children:[`Setup · `,c,` of `,s.length,` done`]}),(0,Y.jsx)(l,{marginLeft:`auto`,fontFamily:`mono`,fontSize:`12.5px`,color:`orange.fg`,children:r?`Hide`:`Finish setup`}),(0,Y.jsx)(n,{color:`fg.subtle`,transform:r?`rotate(180deg)`:void 0,transition:`transform 150ms ease`,children:(0,Y.jsx)(O,{size:14})})]})}),(0,Y.jsx)(f,{children:(0,Y.jsxs)(u,{align:`stretch`,gap:0,paddingX:2,paddingTop:1.5,paddingBottom:2,borderTopWidth:`1px`,borderColor:`border.muted`,children:[(0,Y.jsx)(v,{templateColumns:`1fr`,columnGap:2,children:m.map(t=>(0,Y.jsx)(xn,{stepKey:t.key,title:t.title,onOpen:()=>void e.push(t.href)},t.key))}),c>0?(0,Y.jsxs)(a,{gap:2,paddingX:2,paddingY:1.5,color:`fg.subtle`,children:[(0,Y.jsx)(z,{size:12}),(0,Y.jsxs)(l,{fontSize:`12px`,children:[c,` already done`]})]}):null]})})]})})})}function xn({stepKey:e,title:t,onOpen:i}){let a=mn[e];return(0,Y.jsxs)(r.button,{type:`button`,onClick:i,position:`relative`,display:`flex`,alignItems:`center`,gap:3,width:`full`,textAlign:`left`,paddingX:2.5,paddingY:`7px`,borderRadius:`8px`,cursor:`pointer`,transition:`background 130ms ease`,_hover:{background:`bg.subtle`},css:{"&:hover .step-check":{borderColor:`var(--chakra-colors-fg-muted)`,color:`var(--chakra-colors-fg)`}},children:[(0,Y.jsx)(n,{className:`step-check`,position:`relative`,flexShrink:0,width:`20px`,height:`20px`,borderRadius:`full`,borderWidth:`1px`,borderColor:`border.emphasized`,display:`grid`,placeItems:`center`,color:`fg.subtle`,transition:`border-color 130ms ease, color 130ms ease`,children:(0,Y.jsx)(a,{size:11})}),(0,Y.jsx)(l,{position:`relative`,fontSize:`13px`,color:`fg`,flex:1,children:t})]})}var Sn=[{icon:H,family:`orange`,title:`Quickstart`,blurb:`Set sail — send your first trace`,href:`https://docs.langwatch.ai/integration/overview`},{icon:fe,family:`blue`,title:`SDK guides`,blurb:`Chart the course — Python & TypeScript`,href:`https://docs.langwatch.ai/integration/python/guide`},{icon:R,family:`purple`,title:`Evaluations`,blurb:`Face the Cyclops — judge every answer`,href:`https://docs.langwatch.ai/evaluations/online-evaluation/overview`},{icon:ve,family:`green`,title:`Datasets`,blurb:`Stock the ship — sets from real traffic`,href:`https://docs.langwatch.ai/datasets/overview`},{icon:P,family:`red`,title:`Videos`,blurb:`Hear the Sirens — watch and learn`,href:`https://www.youtube.com/@LangWatch/videos`},{icon:pe,family:`teal`,title:`All docs`,blurb:`The full epic, unabridged`,href:`https://docs.langwatch.ai`}];function Cn(){return(0,Y.jsx)(X,{cursor:`default`,padding:4,height:`full`,width:`full`,children:(0,Y.jsxs)(u,{align:`stretch`,gap:3,width:`full`,children:[(0,Y.jsx)(pn,{title:`Docs and guides`}),(0,Y.jsx)(v,{templateColumns:{base:`1fr`,sm:`1fr 1fr`},gap:1,children:Sn.map(e=>(0,Y.jsx)(wn,{guide:e},e.title))})]})})}function wn({guide:e}){let t=e.icon;return(0,Y.jsxs)(a,{as:`a`,href:e.href,target:`_blank`,rel:`noreferrer`,gap:2.5,align:`center`,paddingX:2.5,paddingY:2,borderRadius:`10px`,cursor:`pointer`,transition:`background 130ms ease`,_hover:{background:`bg.muted`},css:{"&:hover .guide-arrow":{opacity:1,transform:`translate(0, 0)`}},children:[(0,Y.jsx)(n,{flexShrink:0,padding:1.5,borderRadius:`md`,background:`bg.muted`,color:`${e.family}.solid`,display:`grid`,placeItems:`center`,children:(0,Y.jsx)(t,{size:14})}),(0,Y.jsxs)(u,{align:`start`,gap:0,flex:1,minWidth:0,children:[(0,Y.jsx)(l,{fontSize:`13px`,color:`fg`,lineHeight:`1.3`,children:e.title}),(0,Y.jsx)(l,{fontSize:`11.5px`,color:`fg.muted`,lineClamp:1,children:e.blurb})]}),(0,Y.jsx)(n,{className:`guide-arrow`,color:`fg.subtle`,opacity:0,transform:`translate(-2px, 2px)`,transition:`opacity 130ms ease, transform 130ms ease`,"aria-hidden":!0,children:(0,Y.jsx)(le,{size:14})})]})}var Tn=[{key:`empty`,label:`New project (no data)`},{key:`populated`,label:`Project with data`},{key:`read-only`,label:`Read-only access`},{key:`morph`,label:`Mid-send (held)`},{key:`docked`,label:`Panel docked`},{key:`floating`,label:`Panel floating`},{key:`after-turn`,label:`After the first turn`},{key:`reduced-motion`,label:`Reduced motion`},{key:`stalled`,label:`Stalled turn`},{key:`chart-strip`,label:`Figures: strip (chart on click)`},{key:`chart-trend`,label:`Figures: strip + trend`},{key:`chart-full`,label:`Figures: full chart`}],En=`strip`;function Dn(e){switch(e){case`chart-trend`:return`trend`;case`chart-full`:return`full`;case`chart-strip`:return`strip`;default:return En}}var On=`langwatch:dev:home-state`,kn=()=>!1,An=e=>Tn.some(t=>t.key===e),jn=new Set;function Mn(){if(typeof window>`u`||!kn())return null;try{let e=localStorage.getItem(On);return e&&An(e)?e:null}catch{return null}}function Nn(e){if(!(typeof window>`u`||!kn())){try{e===null?localStorage.removeItem(On):localStorage.setItem(On,e)}catch{}jn.forEach(e=>e())}}function Pn(){let[e,t]=(0,K.useState)(null);return(0,K.useEffect)(()=>{if(!kn())return;t(Mn());let e=()=>t(Mn());return jn.add(e),window.addEventListener(`storage`,e),()=>{jn.delete(e),window.removeEventListener(`storage`,e)}},[]),e}function Fn(){let e=Pn();return kn()?(0,Y.jsxs)(r.select,{value:e??``,onChange:e=>{Nn(e.target.value||null)},"aria-label":`Preview home state (dev only)`,fontFamily:`mono`,fontSize:`11px`,color:`fg.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`lg`,background:`bg.panel/60`,backdropFilter:`blur(8px)`,paddingX:2,paddingY:1.5,maxWidth:`220px`,cursor:`pointer`,_hover:{color:`fg`,borderColor:`border.emphasized`},children:[(0,Y.jsx)(`option`,{value:``,children:`Live home`}),Tn.map(e=>(0,Y.jsx)(`option`,{value:e.key,children:e.label},e.key))]}):null}var In=[`⌘K opens the command bar — everything is four keystrokes away.`,`⌘I asks Langy. It has read your traces, and it has opinions.`,`p50 is a feeling. p99 is the truth.`,`An eval you didn't write is a bug you scheduled.`,`Every trace tells a story. Some of them are horror.`,`Temperature 0 is a personality too.`,`Name your scenarios well — future you is a stranger.`,`The dashboard is calm. Suspiciously calm.`];function Ln(){let e=Le(),[t,n]=(0,K.useState)(()=>Math.floor(Math.random()*In.length));return(0,Y.jsx)(X,{cursor:`default`,padding:4,height:`full`,width:`full`,children:(0,Y.jsxs)(u,{align:`stretch`,gap:2,width:`full`,height:`full`,children:[(0,Y.jsxs)(a,{justify:`space-between`,align:`center`,gap:3,children:[(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`10.5px`,letterSpacing:`0.1em`,textTransform:`uppercase`,color:`fg.subtle`,children:`Fortune`}),(0,Y.jsx)(r.button,{type:`button`,onClick:()=>n(e=>{if(In.length<2)return e;let t=e;for(;t===e;)t=Math.floor(Math.random()*In.length);return t}),"aria-label":`Another fortune`,display:`grid`,placeItems:`center`,color:`fg.subtle`,cursor:`pointer`,borderRadius:`md`,padding:1,transition:`color 130ms ease, background 130ms ease`,_hover:{color:`fg`,background:`bg.muted`},children:(0,Y.jsx)(G.span,{initial:e?!1:{rotate:-120,scale:.7},animate:{rotate:0,scale:1},transition:{type:`spring`,stiffness:320,damping:16},style:{display:`grid`,placeItems:`center`},children:(0,Y.jsx)(ge,{size:13})},t)})]}),(0,Y.jsx)(G.div,{initial:e?!1:{opacity:0,y:6,filter:`blur(4px)`},animate:{opacity:1,y:0,filter:`blur(0px)`},transition:{duration:.35,ease:`easeOut`},children:(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,lineHeight:`1.6`,children:In[t]})},t)]})})}var Rn=[`#f56b1a`,`#ffb380`,`#6e57d2`],zn=[`#a8480d`,`#f56b1a`,`#5b41c2`],Bn=`langy-homebar-mark-grad`;function Vn(){return(0,Y.jsxs)(n,{display:`inline-flex`,alignItems:`center`,children:[(0,Y.jsx)(`svg`,{width:`0`,height:`0`,"aria-hidden":!0,style:{position:`absolute`,pointerEvents:`none`},children:(0,Y.jsx)(`defs`,{children:(0,Y.jsxs)(`linearGradient`,{id:Bn,x1:`0%`,y1:`100%`,x2:`100%`,y2:`0%`,children:[(0,Y.jsx)(`stop`,{offset:`0%`,stopColor:`var(--chakra-colors-fg-muted)`}),(0,Y.jsx)(`stop`,{offset:`100%`,stopColor:`var(--chakra-colors-fg-muted)`})]})})}),(0,Y.jsx)(Ee,{size:14,gradientId:Bn})]})}var Hn={id:`langy-ships-the-fix`,storagePrefix:`langwatch:langy-home-banner-dismissed:v1:`,colorsLight:[`#f56b1a`,`#ffb380`,`#6e57d2`,`#fff7ed`],colorsDark:[`#a8480d`,`#f56b1a`,`#5b41c2`,`#140b06`],mesh:{distortion:.9,swirl:.7,scale:1.15,offsetX:-.12,offsetY:.16,rotation:42},iconNode:(0,Y.jsx)(Vn,{}),heading:`Langy can ship the fix, not just find it`,badge:`New`,subtitle:(0,Y.jsx)(Y.Fragment,{children:`Ask about a failing trace and Langy digs through your data, explains what broke, and opens a pull request with the change.`}),ctaLabel:`Ask Langy to investigate`,legacyCtaColor:`orange.700`,posthogEvent:`langy_banner_click`,navigate:({askLangy:e})=>e?.(`Investigate the most important problem in this project from the last 24 hours, explain what changed, and show me the affected traces.`)},Un=9e3,Wn=750,Gn=Wn/1e3,Kn=[.42,0,.58,1],qn=.32,Jn=1500,Yn=1500,Xn=28,Zn=[{id:`automations`,storagePrefix:`langwatch:automations-home-banner-dismissed:v1:`,colorsLight:[`#b45309`,`#ea580c`,`#e11d48`,`#fff7ed`],colorsDark:[`#7c2d12`,`#9a3412`,`#881337`,`#1a0f0a`],mesh:{distortion:.92,swirl:.5,scale:1.25,offsetX:-.22,offsetY:.14,rotation:68},Icon:L,heading:`React the moment it matters`,badge:`New`,subtitle:(0,Y.jsxs)(Y.Fragment,{children:[`React to traces, alert on metrics, or get reports of anything.`,(0,Y.jsx)(`br`,{}),`Delivered to Slack or email, on the schedule you choose.`]}),ctaLabel:`Explore automations`,legacyCtaColor:`orange.700`,posthogEvent:`automations_banner_click`,navigate:({router:e,projectSlug:t})=>void e.push(`/${t}/automations`)},{id:`voice-agents`,storagePrefix:`langwatch:voice-agents-home-banner-dismissed:v1:`,colorsLight:[`#0f766e`,`#06b6d4`,`#6366f1`,`#ecfeff`],colorsDark:[`#134e4a`,`#0e7490`,`#312e81`,`#0a1424`],mesh:{distortion:.85,swirl:.62,scale:1.2,offsetX:.2,offsetY:-.18,rotation:108},Icon:I,heading:`Voice agent simulations are here`,badge:`New`,subtitle:(0,Y.jsx)(Y.Fragment,{children:`Real voices, real audio, plain-English judges. Works with ElevenLabs, OpenAI Realtime, Vapi, and more.`}),ctaLabel:`Try voice agent testing`,legacyCtaColor:`teal.700`,posthogEvent:`voice_agents_banner_click`,navigate:()=>window.open(`https://langwatch.ai/scenario/voice/getting-started`,`_blank`,`noopener,noreferrer`)}];function Qn(e,{includeLangy:t}){return(0,K.useMemo)(()=>t?[Hn,...Zn]:Zn,[t])}var $n=e=>Math.max(0,Math.min(1,e)),Z=(e,t,n)=>e+(t-e)*n,er=e=>e<.5?2*e*e:1-(-2*e+2)**2/2;function tr(e){let t=e.replace(`#`,``),n=t.length===3?t.split(``).map(e=>e+e).join(``):t,r=parseInt(n,16);return[r>>16&255,r>>8&255,r&255]}function nr(e){return`#`+e.map(e=>Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,`0`)).join(``)}function rr(e,t,n){let r=tr(e),i=tr(t);return nr([Z(r[0],i[0],n),Z(r[1],i[1],n),Z(r[2],i[2],n)])}function ir(e,t,n){return e.map((e,r)=>rr(e,t[r]??e,n))}function ar(e,t,n){return{distortion:Z(e.distortion,t.distortion,n),swirl:Z(e.swirl,t.swirl,n),scale:Z(e.scale,t.scale,n),offsetX:Z(e.offsetX,t.offsetX,n),offsetY:Z(e.offsetY,t.offsetY,n),rotation:Z(e.rotation,t.rotation,n)}}function or({variant:e=`briefing`,children:t}){let{project:o}=W({redirectToOnboarding:!1,redirectToProjectOnboarding:!1}),s=o?.id,d=o?.slug,f=M(),p=Le(),m=De(!1,!0),ee=Qn(s,{includeLangy:e===`lantern`}),h=U(e=>e.askLangy),[g,_]=(0,K.useState)(!1),[v,b]=(0,K.useState)(0);(0,K.useEffect)(()=>{_(!0)},[]);let x=ee,S=x.length>0?v%x.length:0,C=x[S],w=(0,K.useMemo)(()=>C?m?C.colorsDark:C.colorsLight:[],[C,m]),T=C?.mesh,[E,D]=(0,K.useState)(w),[O,k]=(0,K.useState)(T??Zn[0].mesh),[A,re]=(0,K.useState)(!1),ie=p||A,j=ne(0),N=(0,K.useRef)(!1),P=(0,K.useRef)(0),F=(0,K.useRef)(x.length),ae=(0,K.useRef)(p),I=(0,K.useRef)(ie),L=(0,K.useRef)(w),oe=(0,K.useRef)(T),R=(0,K.useRef)(E),z=(0,K.useRef)(O),B=(0,K.useRef)(null),se=(0,K.useRef)({start:null,frames:0,done:!1});if(F.current=x.length,ae.current=p,I.current=ie,L.current=w,oe.current=T,(0,K.useEffect)(()=>{if(C){if(ie){B.current=null,R.current=w,T&&(z.current=T),D(w),T&&k(T),j.set(0);return}B.current={from:R.current.length?R.current:w,fromMesh:z.current,start:null},j.set(0),P.current=0}},[C?.id,m,ie]),Qe((t,n)=>{if(F.current===0)return;let r=n/1e3,i=se.current;if(!i.done&&!I.current&&t>=Jn)if(i.start===null)i.start=t;else{i.frames++;let e=t-i.start;e>=Yn&&(i.done=!0,i.frames/e*1e3<Xn&&re(!0))}let a=+((e===`lantern`||!N.current)&&!ae.current&&F.current>1);if(P.current+=(a-P.current)*(1-Math.exp(-r/qn)),F.current>1){let e=j.get()+n/Un*P.current;e>=1?(j.set(0),b(e=>e+1)):j.set(e)}let o=B.current;if(o&&!I.current){o.start===null&&(o.start=t);let e=$n((t-o.start)/Wn),n=er(e),r=L.current,i=oe.current??o.fromMesh,a=r.length?ir(o.from,r,n):o.from,s=ar(o.fromMesh,i,n);R.current=a,z.current=s,D(a),k(s),e>=1&&(B.current=null)}}),!g||!s||e!==`lantern`&&(x.length===0||!C))return null;let le=e=>{Ce.capture(e.posthogEvent,{surface:`home_banner`,projectId:s}),e.navigate({router:f,projectSlug:d,askLangy:h})},V=E.length?E:w,ue=V.length>=3?V:m?zn:Rn,H=x.length>1,de=e=>{b((e+x.length)%x.length),j.set(0)},fe=ie?{duration:0}:{duration:Gn,ease:Kn};return e===`lantern`?(0,Y.jsxs)(n,{position:`relative`,width:`full`,onMouseEnter:()=>N.current=!0,onMouseLeave:()=>N.current=!1,children:[(0,Y.jsx)(n,{"aria-hidden":!0,position:`absolute`,insetInline:{base:`-8%`,md:`-14%`},insetBlock:{base:`-30%`,md:`-45%`},pointerEvents:`none`,opacity:{base:.3,_dark:.45},filter:{base:`blur(15px)`,_dark:`blur(5px)`},css:{maskImage:`radial-gradient(58% 62% at 50% 46%, #000 12%, transparent 72%)`,WebkitMaskImage:`radial-gradient(58% 62% at 50% 46%, #000 12%, transparent 72%)`},children:A?(0,Y.jsx)(n,{position:`absolute`,inset:0,style:{background:`linear-gradient(120deg, ${ue[0]}, ${ue[1]} 45%, ${ue[2]})`}}):(0,Y.jsx)(n,{position:`absolute`,inset:0,children:(0,Y.jsx)(Ze,{colors:ue,distortion:O.distortion,swirl:O.swirl,offsetX:O.offsetX,offsetY:O.offsetY,rotation:O.rotation,grainMixer:.12,grainOverlay:.12,speed:p?0:C?.speed??.45,scale:O.scale,style:{width:`100%`,height:`100%`}})})}),(0,Y.jsx)(n,{"aria-hidden":!0,position:`absolute`,insetInline:{base:`-8%`,md:`-14%`},insetBlock:{base:`-30%`,md:`-45%`},pointerEvents:`none`,display:{base:`block`,_dark:`none`},background:`radial-gradient(62% 64% at 50% 28%, var(--chakra-colors-bg) 0%, var(--chakra-colors-bg) 52%, transparent 78%)`}),(0,Y.jsxs)(u,{position:`relative`,zIndex:1,align:`center`,gap:9,paddingX:{base:4,md:5},paddingY:{base:8,md:12},children:[t,(0,Y.jsx)(u,{gap:1,children:C?(0,Y.jsxs)(u,{gap:`7px`,width:`min(520px, 100%)`,align:`stretch`,children:[(0,Y.jsxs)(r.button,{type:`button`,onClick:()=>le(C),"aria-label":C.ctaLabel,display:`flex`,alignItems:`center`,gap:2.5,width:`full`,minHeight:`20px`,background:`transparent`,borderWidth:0,padding:0,cursor:`pointer`,textAlign:`left`,css:{"&:hover .langy-ticker-arrow":{transform:`translateX(3px)`,color:`var(--chakra-colors-orange-fg)`}},children:[(0,Y.jsx)(n,{flexShrink:0,color:`fg.muted`,display:`grid`,children:C.iconNode??(C.Icon?(0,Y.jsx)(C.Icon,{size:14}):null)}),C.badge?(0,Y.jsx)(r.span,{flexShrink:0,fontSize:`11px`,fontWeight:`600`,color:{base:`orange.700`,_dark:`orange.fg`},children:C.badge}):null,(0,Y.jsx)(l,{fontSize:`12.5px`,color:`fg.muted`,truncate:!0,minWidth:0,flex:`1`,children:C.heading}),(0,Y.jsx)(r.span,{className:`langy-ticker-arrow`,"aria-hidden":!0,flexShrink:0,color:`fg.subtle`,fontSize:`12px`,lineHeight:`1`,transition:`transform 130ms ease, color 130ms ease`,children:`→`})]}),H?(0,Y.jsx)(a,{gap:`5px`,width:`full`,height:`16px`,marginTop:`-7px`,marginBottom:`-7px`,children:x.map((e,t)=>(0,Y.jsx)(n,{as:`button`,"aria-label":`Show announcement ${t+1} of ${x.length}`,"aria-current":t===S?`true`:void 0,onClick:()=>de(t),flex:`1`,height:`full`,display:`flex`,alignItems:`center`,background:`transparent`,cursor:`pointer`,css:{"&:hover .langy-ticker-segment":{background:`var(--chakra-colors-fg-muted)`}},children:(0,Y.jsx)(n,{className:`langy-ticker-segment`,width:`full`,height:`2px`,borderRadius:`full`,overflow:`hidden`,background:t===S?`fg.muted/40`:`fg.muted/15`,transition:`background 200ms ease`,css:{"--ticker-accent":`var(--chakra-colors-orange-700)`,_dark:{"--ticker-accent":`var(--chakra-colors-orange-fg)`}},children:t===S?(0,Y.jsx)(G.div,{style:{height:`100%`,background:`var(--ticker-accent)`,scaleX:j,transformOrigin:`left`}}):null})},t))}):null]}):null})]})]}):C?e===`legacy`?(0,Y.jsxs)(n,{position:`relative`,width:`full`,borderRadius:`xl`,overflow:`hidden`,color:`white`,boxShadow:`0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.18)`,minHeight:{base:`160px`,md:`172px`},onMouseEnter:()=>N.current=!0,onMouseLeave:()=>N.current=!1,"data-banner-variant":`legacy`,children:[(0,Y.jsx)(n,{position:`absolute`,inset:0,pointerEvents:`none`,style:{background:`linear-gradient(120deg, ${V[0]??`#333`}, ${V[1]??V[0]??`#333`} 45%, ${V[2]??V[0]??`#333`})`}}),A?null:(0,Y.jsx)(n,{position:`absolute`,inset:0,pointerEvents:`none`,children:(0,Y.jsx)(Ze,{colors:V,distortion:O.distortion,swirl:O.swirl,offsetX:O.offsetX,offsetY:O.offsetY,rotation:O.rotation,grainMixer:.15,grainOverlay:.18,speed:p?0:.45,scale:O.scale,style:{width:`100%`,height:`100%`}})}),(0,Y.jsx)(n,{position:`absolute`,inset:0,pointerEvents:`none`,backgroundImage:`linear-gradient(120deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.05) 55%, rgba(0,0,0,0) 100%)`}),(0,Y.jsx)(n,{display:`grid`,position:`relative`,zIndex:1,width:`full`,children:x.map(e=>{let t=e.id===C.id;return(0,Y.jsx)(G.div,{inert:!t,initial:!1,animate:{opacity:+!!t,y:t?0:8},transition:fe,style:{gridArea:`1 / 1`,zIndex:+!!t,pointerEvents:t?`auto`:`none`,willChange:`opacity, transform`},children:(0,Y.jsxs)(a,{align:`center`,gap:{base:4,md:6},paddingLeft:{base:5,md:7},paddingRight:{base:5,md:7},paddingY:{base:5,md:6},width:`full`,height:`full`,children:[(0,Y.jsx)(n,{flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,boxSize:`44px`,borderRadius:`full`,bg:`white/20`,boxShadow:`inset 0 0 0 1px rgba(255,255,255,0.35)`,children:e.Icon?(0,Y.jsx)(y,{as:e.Icon,boxSize:5,color:`white`}):e.iconNode}),(0,Y.jsxs)(u,{align:`start`,gap:1.5,flex:1,minWidth:0,children:[(0,Y.jsxs)(a,{gap:2,minWidth:0,children:[(0,Y.jsx)(c,{as:`h2`,size:`md`,fontWeight:`600`,color:`white/95`,letterSpacing:`-0.01em`,lineHeight:1.25,children:e.heading}),e.badge?(0,Y.jsx)(n,{paddingX:2,paddingY:`2px`,borderRadius:`full`,bg:`white/30`,flexShrink:0,children:(0,Y.jsx)(l,{textStyle:`2xs`,fontWeight:`700`,color:`white`,letterSpacing:`0.08em`,textTransform:`uppercase`,lineHeight:1.2,children:e.badge})}):null]}),(0,Y.jsx)(l,{textStyle:`sm`,color:`white/80`,lineHeight:1.6,maxWidth:{base:`full`,md:`560px`},children:e.subtitle}),(0,Y.jsx)(a,{gap:2,marginTop:1.5,children:(0,Y.jsxs)(i,{size:`sm`,bg:`white`,color:e.legacyCtaColor,fontWeight:`600`,paddingX:4,boxShadow:`0 1px 2px rgba(0,0,0,0.12)`,_hover:{bg:`white/90`,transform:`translateY(-1px)`},_active:{bg:`white/80`,transform:`translateY(0)`},transition:`background-color 0.12s ease, transform 0.12s ease`,onClick:()=>le(e),"aria-label":e.ctaLabel,children:[e.ctaLabel,(0,Y.jsx)(y,{as:ce,boxSize:3.5,marginLeft:1})]})})]})]})},e.id)})}),H?(0,Y.jsx)(n,{position:`absolute`,bottom:2.5,right:3,zIndex:2,children:(0,Y.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,"aria-hidden":!0,children:[(0,Y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`rgba(255,255,255,0.28)`,strokeWidth:`2.5`}),(0,Y.jsx)(`g`,{transform:`rotate(-90 12 12)`,children:(0,Y.jsx)(G.circle,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`white`,strokeWidth:`2.5`,strokeLinecap:`round`,style:{pathLength:j}})})]})}):null,H?(0,Y.jsx)(a,{gap:2,justify:`center`,position:`absolute`,bottom:3,left:0,right:0,zIndex:2,children:x.map((e,t)=>(0,Y.jsx)(n,{as:`button`,"aria-label":`Show announcement ${t+1} of ${x.length}`,onClick:()=>b(t),width:t===S?`18px`:`7px`,height:`7px`,borderRadius:`full`,bg:t===S?`white`:`whiteAlpha.500`,transition:`width 0.2s ease, background-color 0.2s ease`,cursor:`pointer`,_hover:{bg:t===S?`white`:`whiteAlpha.700`}},e.id))}):null]}):(0,Y.jsx)(n,{position:`relative`,width:`full`,isolation:`isolate`,children:(0,Y.jsxs)(n,{position:`relative`,width:`full`,borderRadius:`14px`,borderWidth:`1px`,borderColor:`border.muted`,background:`bg.surface`,overflow:`hidden`,onMouseEnter:()=>N.current=!0,onMouseLeave:()=>N.current=!1,children:[(0,Y.jsx)(n,{"aria-hidden":!0,position:`absolute`,inset:0,borderRadius:`inherit`,pointerEvents:`none`,zIndex:2,opacity:.45,style:{boxShadow:[`inset 0 10px 18px -14px ${V[0]??`#333`}`,`inset 0 -10px 18px -14px ${V[2]??V[0]??`#333`}`,`inset 10px 0 18px -14px ${V[1]??V[0]??`#333`}`,`inset -10px 0 18px -14px ${V[1]??V[0]??`#333`}`].join(`, `)}}),(0,Y.jsxs)(n,{position:`absolute`,inset:0,pointerEvents:`none`,opacity:{base:.09,_dark:.14},children:[(0,Y.jsx)(n,{position:`absolute`,inset:0,style:{background:`linear-gradient(120deg, ${V[0]??`#333`}, ${V[1]??V[0]??`#333`} 45%, ${V[2]??V[0]??`#333`})`}}),A?null:(0,Y.jsx)(n,{position:`absolute`,inset:0,children:(0,Y.jsx)(Ze,{colors:V,distortion:O.distortion,swirl:O.swirl,offsetX:O.offsetX,offsetY:O.offsetY,rotation:O.rotation,grainMixer:.12,grainOverlay:.12,speed:p?0:C.speed??.45,scale:O.scale,style:{width:`100%`,height:`100%`}})})]}),(0,Y.jsxs)(a,{position:`relative`,zIndex:1,align:`center`,gap:{base:3,md:4},paddingX:{base:4,md:5},paddingTop:4,paddingBottom:H?`22px`:4,width:`full`,height:`full`,children:[(0,Y.jsxs)(n,{position:`relative`,flexShrink:0,boxSize:`44px`,borderRadius:`11px`,overflow:`hidden`,boxShadow:`inset 0 0 0 1px rgba(255,255,255,0.14)`,children:[(0,Y.jsx)(n,{position:`absolute`,inset:0,pointerEvents:`none`,style:{background:`linear-gradient(120deg, ${V[0]??`#333`}, ${V[1]??V[0]??`#333`} 45%, ${V[2]??V[0]??`#333`})`}}),(0,Y.jsx)(n,{display:`grid`,position:`relative`,width:`full`,height:`full`,children:x.map(e=>(0,Y.jsx)(G.div,{initial:!1,animate:{opacity:+(e.id===C.id)},transition:fe,style:{gridArea:`1 / 1`,display:`grid`,placeItems:`center`},children:e.iconNode??(e.Icon?(0,Y.jsx)(y,{as:e.Icon,boxSize:5,color:`white`}):null)},e.id))})]}),(0,Y.jsx)(n,{display:`grid`,flex:1,minWidth:0,children:x.map(e=>{let t=e.id===C.id;return(0,Y.jsx)(G.div,{inert:!t,initial:!1,animate:{opacity:+!!t,y:t?0:6},transition:fe,style:{gridArea:`1 / 1`,zIndex:+!!t,pointerEvents:t?`auto`:`none`,willChange:`opacity, transform`},children:(0,Y.jsxs)(u,{align:`start`,gap:1,width:`full`,minWidth:0,children:[(0,Y.jsxs)(a,{gap:2,minWidth:0,children:[(0,Y.jsx)(c,{as:`h2`,fontFamily:Ge,fontWeight:`500`,fontSize:`15px`,letterSpacing:`-0.01em`,lineHeight:1.3,color:`fg`,children:e.heading}),e.badge?(0,Y.jsx)(n,{paddingX:`7px`,borderRadius:`full`,borderWidth:`1px`,borderColor:`orange.emphasized`,flexShrink:0,children:(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`9.5px`,fontWeight:`600`,color:`orange.fg`,letterSpacing:`0.08em`,textTransform:`uppercase`,lineHeight:1.6,children:e.badge})}):null]}),(0,Y.jsx)(l,{fontSize:`12.5px`,color:`fg.muted`,lineHeight:1.5,children:e.subtitle}),e.extra?(0,Y.jsx)(n,{width:`full`,minWidth:0,children:e.extra}):null,(0,Y.jsxs)(r.button,{type:`button`,onClick:()=>le(e),"aria-label":e.ctaLabel,flexShrink:0,display:`inline-flex`,alignItems:`center`,gap:1,marginTop:1.5,fontFamily:`mono`,fontSize:`11.5px`,whiteSpace:`nowrap`,cursor:`pointer`,color:`orange.fg`,borderWidth:`1px`,borderColor:`orange.emphasized`,borderRadius:`8px`,paddingX:2.5,paddingY:`4px`,background:`orange.subtle`,transition:`background-color 130ms ease, border-color 130ms ease`,_hover:{background:`orange.muted`,borderColor:`orange.solid`},children:[e.ctaLabel,e.showCtaKbd?(0,Y.jsx)(Ae,{fontSize:`0.6875rem`,children:ke()?`⌘I`:`Ctrl+I`}):(0,Y.jsx)(y,{as:ce,boxSize:3.5})]})]})},e.id)})})]}),H?(0,Y.jsx)(n,{position:`absolute`,bottom:2,right:2.5,zIndex:2,children:(0,Y.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,"aria-hidden":!0,children:[(0,Y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`var(--chakra-colors-border-emphasized)`,strokeWidth:`2.5`}),(0,Y.jsx)(`g`,{transform:`rotate(-90 12 12)`,children:(0,Y.jsx)(G.circle,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`var(--chakra-colors-fg-muted)`,strokeWidth:`2.5`,strokeLinecap:`round`,style:{pathLength:j}})})]})}):null,H?(0,Y.jsxs)(a,{gap:1,justify:`center`,position:`absolute`,bottom:`0px`,left:0,right:0,zIndex:2,children:[(0,Y.jsx)(te,{size:`2xs`,variant:`ghost`,"aria-label":`Previous announcement`,onClick:()=>de(S-1),children:(0,Y.jsx)(_e,{})}),(0,Y.jsx)(a,{gap:0,children:x.map((e,t)=>(0,Y.jsx)(n,{as:`button`,"aria-label":`Show announcement ${t+1} of ${x.length}`,"aria-current":t===S?`true`:void 0,onClick:()=>de(t),display:`flex`,alignItems:`center`,justifyContent:`center`,paddingX:`6px`,paddingY:`8px`,cursor:`pointer`,css:{"&:hover .banner-dot":{background:`var(--chakra-colors-fg-muted)`}},children:(0,Y.jsx)(n,{className:`banner-dot`,width:t===S?`16px`:`6px`,height:`6px`,borderRadius:`full`,background:t===S?`fg.muted`:`border.emphasized`,transition:`width 0.2s ease, background-color 0.2s ease`})},e.id))}),(0,Y.jsx)(te,{size:`2xs`,variant:`ghost`,"aria-label":`Next announcement`,onClick:()=>de(S+1),children:(0,Y.jsx)(ce,{})})]}):null,H?(0,Y.jsx)(n,{position:`absolute`,bottom:0,left:0,right:0,height:`2px`,background:`border.muted`,zIndex:1,pointerEvents:`none`,children:(0,Y.jsx)(G.div,{style:{height:`100%`,background:`var(--chakra-colors-fg-muted)`,scaleX:j,transformOrigin:`left`}})}):null]})}):null}var sr=`https://docs.langwatch.ai/integration/overview`,cr=`Instrument this codebase with LangWatch so I can see my agent's traces.
2
+
3
+ Read the integration guide at ${sr} and pick the SDK that matches this project. Then:
4
+ 1. Add the dependency and initialise it where the app starts.
5
+ 2. Read the API key from the environment, never hardcode it.
6
+ 3. Instrument the main agent or LLM call path so a request produces one trace.
7
+ 4. Tell me what you changed and how to verify a trace arrives.`;function lr({onAskLangy:e,prominent:t=!1}={}){return(0,Y.jsxs)(_.Root,{positioning:{placement:`bottom-end`,gutter:6},children:[(0,Y.jsx)(_.Trigger,{asChild:!0,children:(0,Y.jsxs)(r.button,{type:`button`,"aria-haspopup":`menu`,display:`inline-flex`,alignItems:`center`,gap:2,whiteSpace:`nowrap`,borderWidth:`1px`,borderColor:t?`orange.emphasized`:`border.emphasized`,borderRadius:`full`,background:t?`orange.subtle`:`bg.muted`,paddingLeft:t?4:3,paddingRight:`4px`,paddingY:t?`5px`:`3px`,boxShadow:t?`xs`:`2xs`,cursor:`pointer`,transition:`border-color 130ms ease, background 130ms ease`,_hover:{borderColor:t?`orange.solid`:`border.emphasized`,background:t?`orange.muted`:`bg.emphasized`},children:[(0,Y.jsx)(r.span,{fontSize:t?`13px`:`12px`,fontWeight:t?`medium`:void 0,color:t?`orange.fg`:`fg`,children:t?`Send your first trace`:`Onboard your agent`}),(0,Y.jsx)(a,{gap:`3px`,children:[{Glyph:ue,color:`fg.muted`},{Glyph:be,color:`fg.muted`},{Glyph:de,color:`orange.fg`}].map(({Glyph:e,color:t},r)=>(0,Y.jsx)(n,{boxSize:`18px`,borderRadius:`5px`,background:`bg.surface`,borderWidth:`1px`,borderColor:`border.muted`,display:`grid`,placeItems:`center`,color:t,children:(0,Y.jsx)(e,{size:10})},r))}),(0,Y.jsx)(n,{"aria-hidden":!0,display:`grid`,color:`fg.subtle`,paddingRight:`3px`,flexShrink:0,children:(0,Y.jsx)(xe,{size:13})})]})}),(0,Y.jsxs)(_.Content,{minWidth:`280px`,padding:1,children:[e?(0,Y.jsx)(_.Item,{value:`ask-langy`,paddingY:2,onClick:()=>e(`Walk me through sending my first trace to this project. Ask me what my agent is built with, then give me the exact steps.`),children:(0,Y.jsx)(ur,{icon:de,accent:!0,label:`Walk me through it`,hint:`Langy asks what you are building, then gives you the steps`})}):null,(0,Y.jsx)(_.Item,{value:`copy-prompt`,paddingY:2,onClick:()=>{navigator.clipboard?.writeText(cr).then(()=>g.create({type:`success`,title:`Prompt copied — paste it to your coding agent`}),()=>g.create({type:`error`,title:`Couldn't copy the prompt`}))},children:(0,Y.jsx)(ur,{icon:be,label:`Copy a prompt for your coding agent`,hint:`Paste it into Claude Code, Cursor, or whatever you use`})}),(0,Y.jsx)(_.Item,{value:`docs`,paddingY:2,asChild:!0,children:(0,Y.jsx)(r.a,{href:sr,target:`_blank`,rel:`noreferrer`,children:(0,Y.jsx)(ur,{icon:ue,label:`Read the integration guide`,hint:`Every SDK, and what each one instruments`})})})]})]})}function ur({icon:e,label:t,hint:r,accent:i=!1}){return(0,Y.jsxs)(a,{gap:2.5,width:`full`,align:`start`,children:[(0,Y.jsx)(n,{color:i?`orange.fg`:`fg.subtle`,display:`grid`,paddingTop:`2px`,children:(0,Y.jsx)(e,{size:13})}),(0,Y.jsxs)(n,{minWidth:0,flex:1,children:[(0,Y.jsx)(l,{textStyle:`xs`,fontWeight:`medium`,children:t}),(0,Y.jsx)(l,{textStyle:`2xs`,color:`fg.subtle`,lineClamp:2,children:r})]})]})}var dr=e=>{if(!e?.trim())return null;let t=e.trim();return t.includes(`@`)?null:t.split(` `)[0]??null},fr=e=>e<12?`morning`:e<18?`afternoon`:`evening`,pr={morning:{named:`Good morning, `,anonymous:`Good morning`},afternoon:{named:`Good afternoon, `,anonymous:`Good afternoon`},evening:{named:`Good evening, `,anonymous:`Good evening`}},mr=({timeOfDay:e,name:t})=>{let{named:n,anonymous:r}=pr[e];return t?`${n}${t}`:r};function hr(){let[e,t]=(0,K.useState)(`morning`);return(0,K.useEffect)(()=>{t(fr(new Date().getHours()))},[]),e}function gr(){let{data:e}=j(),t=dr(e?.user?.name);return(0,Y.jsx)(c,{as:`h1`,fontFamily:Ge,fontWeight:`500`,fontSize:`26px`,letterSpacing:`-0.01em`,lineHeight:`1.2`,children:mr({timeOfDay:hr(),name:t})})}var _r=`680px`,vr=`26px`;function yr(){let e=Pn(),{registerInlinePalette:t}=Oe(),r=Pe(),i=e===`read-only`?!1:r,o=re(),s=e===`empty`?!0:e===`populated`?!1:o.isNewProject,c=e===`empty`||e===`populated`||!o.isLoading,d=c&&s,f=c?ie({reach:e===`empty`?{hasTraces:!1,hasEvaluations:!1,hasExperiments:!1}:e===`populated`?{hasTraces:!0,hasEvaluations:!0,hasExperiments:!0}:o}):[],p=U(e=>e.askLangy),[m,ee]=(0,K.useState)(``),[h,g]=(0,K.useState)(!1),_=(0,K.useRef)(null),v=(0,K.useRef)(null),y=(0,K.useCallback)(()=>{_.current?.focus(),_.current?.select()},[]);(0,K.useEffect)(()=>t(y),[t,y]);let b=(0,K.useCallback)(()=>{window.setTimeout(()=>{v.current?.contains(document.activeElement)||g(!1)},0)},[]),x=(0,K.useCallback)(()=>{ee(``),g(!1),_.current?.blur()},[]);return(0,Y.jsxs)(u,{align:`center`,gap:{base:5,md:6},width:`full`,children:[(0,Y.jsx)(n,{className:`langy-home-greeting`,children:(0,Y.jsx)(gr,{})}),(0,Y.jsxs)(u,{align:`center`,gap:3,width:`full`,maxWidth:_r,children:[(0,Y.jsx)(n,{ref:v,width:`full`,position:`relative`,background:`bg.panel/60`,borderWidth:`1px`,borderColor:h?{base:`border.emphasized`,_dark:`border`}:{base:`border`,_dark:`border.muted`},borderRadius:`16px`,boxShadow:h?`0 2px 8px rgba(20, 20, 23, 0.08), 0 24px 70px -20px rgba(20, 20, 23, 0.35)`:`0 1px 2px rgba(20, 20, 23, 0.04), 0 12px 30px -22px rgba(20, 20, 23, 0.5)`,transition:`border-color 130ms ease, box-shadow 130ms ease`,onKeyDown:e=>{e.key===`Escape`&&x()},children:(0,Y.jsx)(Ie,{surface:`inline`,active:h,query:m,setQuery:ee,onDone:x,inputRef:_,onFocus:()=>g(!0),onBlur:b,placeholder:i?s?`Ask Langy how to get started, or search`:`Ask Langy, search, or jump to anything`:`Search, or jump to anything`})}),(0,Y.jsxs)(u,{width:`full`,gap:2.5,align:`center`,children:[d?(0,Y.jsx)(lr,{prominent:!0,onAskLangy:i?p:void 0}):null,(0,Y.jsx)(n,{width:`full`,minHeight:vr,display:`flex`,alignItems:`center`,justifyContent:`center`,children:(0,Y.jsx)(a,{gap:2,flexWrap:`wrap`,justify:`center`,children:i?f.map(e=>(0,Y.jsx)(br,{icon:(0,Y.jsx)(e.icon,{size:12}),label:e.label,onClick:()=>p(e.prompt)},e.label)):null})}),!d&&c?(0,Y.jsx)(lr,{onAskLangy:i?p:void 0}):null]}),i?null:(0,Y.jsx)(l,{fontSize:`12px`,color:`fg.subtle`,textAlign:`center`,children:`You can read Langy conversations here. To start one, ask whoever manages your account for access.`})]})]})}function br({icon:e,label:t,onClick:n}){return(0,Y.jsxs)(r.button,{type:`button`,onClick:n,display:`inline-flex`,alignItems:`center`,gap:1.5,fontSize:`12px`,color:`fg.muted`,background:`bg.panel/90`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`full`,paddingX:3,paddingY:`4px`,cursor:`pointer`,whiteSpace:`nowrap`,transition:`color 130ms ease, border-color 130ms ease, background 130ms ease`,_hover:{color:`orange.fg`,borderColor:`orange.emphasized`,background:`bg.panel`},children:[(0,Y.jsx)(r.span,{display:`grid`,color:`fg.subtle`,children:e}),t]})}function xr({trailing:e}){return(0,Y.jsx)(u,{width:`full`,align:`stretch`,gap:3,paddingTop:4,borderTopWidth:`1px`,borderTopColor:`border.muted`,children:(0,Y.jsxs)(a,{gap:2,flexWrap:`wrap`,fontFamily:`mono`,fontSize:`10.5px`,children:[(0,Y.jsxs)(Sr,{children:[`LangWatch © `,new Date().getFullYear()]}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://docs.langwatch.ai/integration/python/guide`,children:`Python SDK`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://docs.langwatch.ai/integration/typescript/guide`,children:`TypeScript SDK`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://docs.langwatch.ai/integration/go/guide`,children:`Go SDK`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://scenario.langwatch.ai`,children:`Scenario`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://docs.langwatch.ai/integration/rest-api`,children:`REST API`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://github.com/langwatch/langwatch`,children:`GitHub`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://status.langwatch.ai`,children:`Status`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://langwatch.ai/legal`,children:`Legal`}),(0,Y.jsx)(D,{}),e]})})}function Sr({children:e}){return(0,Y.jsx)(l,{as:`span`,fontFamily:`mono`,fontSize:`10.5px`,color:`fg.subtle`,children:e})}function Q(){return(0,Y.jsx)(l,{as:`span`,color:`fg.subtle`,"aria-hidden":!0,children:`·`})}function $({href:e,children:t}){return(0,Y.jsx)(Fe,{href:e,isExternal:!0,fontFamily:`mono`,fontSize:`10.5px`,color:`fg.subtle`,_hover:{color:`orange.500`},children:t})}var Cr=e=>{let t=Se[e],n=t?je[t]:null;return n?(0,Y.jsx)(y,{as:n.icon,width:`14px`,height:`14px`,display:`block`}):(0,Y.jsx)(y,{as:je.home.icon,width:`14px`,height:`14px`,display:`block`})},wr=e=>{let t=Se[e],n=(t?je[t]:null)?.label??`Item`;return n.endsWith(`s`)?n.slice(0,-1):n},Tr=8;function Er({item:e}){let t=we(e.updatedAt.getTime());return(0,Y.jsx)(h,{asChild:!0,_hover:{textDecoration:`none`},width:`full`,display:`block`,children:(0,Y.jsx)(Ne,{href:e.href,children:(0,Y.jsxs)(a,{gap:2.5,align:`center`,paddingX:2.5,paddingY:`7px`,borderRadius:`10px`,transition:`background 130ms ease`,_hover:{background:`bg.muted`},children:[(0,Y.jsx)(n,{flexShrink:0,padding:1.5,borderRadius:`md`,background:`bg.muted`,color:`fg.muted`,display:`grid`,placeItems:`center`,children:Cr(e.type)}),(0,Y.jsx)(l,{fontSize:`13px`,color:`fg`,flex:1,minWidth:0,lineClamp:1,title:e.name,children:e.name}),(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`11px`,color:`fg.subtle`,flexShrink:0,children:wr(e.type)}),t?(0,Y.jsx)(l,{fontFamily:`mono`,fontSize:`11px`,color:`fg.subtle`,flexShrink:0,minWidth:`56px`,textAlign:`right`,children:t}):null]})})})}function Dr(){return(0,Y.jsx)(X,{cursor:`default`,padding:2,children:(0,Y.jsx)(u,{align:`stretch`,gap:1,width:`full`,children:Array.from({length:4}).map((e,t)=>(0,Y.jsxs)(a,{gap:2.5,paddingX:2.5,paddingY:`7px`,children:[(0,Y.jsx)(s,{width:`28px`,height:`28px`,borderRadius:`md`}),(0,Y.jsx)(s,{height:`13px`,flex:1,maxWidth:`45%`}),(0,Y.jsx)(s,{height:`11px`,width:`56px`})]},t))})})}function Or({priorityTypes:e}={}){let{project:t}=W(),{data:r,isLoading:i,error:a,refetch:o}=k.home.getRecentItems.useQuery({projectId:t?.id??``,limit:12},{enabled:!!t?.id,staleTime:6e4,cacheTime:10*6e4,keepPreviousData:!0}),s=r&&e?.length?[...r.filter(t=>e.includes(t.type)),...r.filter(t=>!e.includes(t.type))]:r;return!i&&!a&&s?.length===0?null:(0,Y.jsxs)(u,{align:`stretch`,gap:3,width:`full`,children:[(0,Y.jsx)(pn,{title:`Jump right back`}),i&&!!t?.id&&(0,Y.jsx)(Dr,{}),a&&(0,Y.jsx)(X,{cursor:`default`,padding:6,children:(0,Y.jsxs)(u,{gap:2,width:`full`,children:[(0,Y.jsx)(n,{color:`red.500`,children:(0,Y.jsx)(ae,{size:24})}),(0,Y.jsx)(l,{fontSize:`sm`,color:`fg.muted`,children:`Failed to load recent items`}),(0,Y.jsx)(l,{fontSize:`xs`,color:`blue.500`,cursor:`pointer`,_hover:{textDecoration:`underline`},onClick:()=>void o(),children:`Retry`})]})}),!i&&!a&&s&&s.length>0&&(0,Y.jsx)(X,{cursor:`default`,padding:2,children:(0,Y.jsx)(u,{align:`stretch`,gap:.5,width:`full`,children:s.slice(0,Tr).map(e=>(0,Y.jsx)(Er,{item:e},`${e.type}-${e.id}`))})})]})}var kr=[{label:`Connect tracing`,description:`See your first live trace`,path:`traces`},{label:`Create a prompt`,description:`Version and test a prompt`,path:`prompts`},{label:`Run a simulation`,description:`Test an agent journey`,path:`simulations`}];function Ar({projectSlug:e}){return(0,Y.jsxs)(u,{align:`stretch`,gap:3,paddingY:3,width:`full`,children:[(0,Y.jsxs)(a,{align:{base:`start`,md:`center`},justify:`space-between`,flexDirection:{base:`column`,md:`row`},gap:1,children:[(0,Y.jsx)(l,{fontSize:`sm`,fontWeight:`medium`,color:`fg`,children:`Nothing here yet — pick a quick start`}),(0,Y.jsx)(l,{fontSize:`xs`,color:`fg.muted`,children:`These are good first ways to explore LangWatch.`})]}),(0,Y.jsx)(v,{templateColumns:{base:`1fr`,sm:`repeat(3, minmax(0, 1fr))`},gap:2,children:kr.map(t=>(0,Y.jsx)(Fe,{href:`/${e}/${t.path}`,display:`block`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`lg`,paddingX:3,paddingY:2.5,color:`fg`,textDecoration:`none`,transition:`border-color 130ms ease, background 130ms ease`,_hover:{borderColor:`orange.emphasized`,background:`bg.subtle`,textDecoration:`none`},children:(0,Y.jsxs)(a,{justify:`space-between`,gap:2,children:[(0,Y.jsxs)(u,{align:`start`,gap:0,minWidth:0,children:[(0,Y.jsx)(l,{fontSize:`xs`,fontWeight:`semibold`,children:t.label}),(0,Y.jsx)(l,{fontSize:`2xs`,color:`fg.muted`,lineClamp:1,children:t.description})]}),(0,Y.jsx)(ce,{size:13,"aria-hidden":!0})]})},t.path))})]})}var jr=4,Mr={key:`30d`,label:`Last 30 days`},Nr=160;function Pr({variant:e=`full`}){let{project:t,hasPermission:i}=W(),o=i(`cost:view`),{daysDifference:s,setRelativePeriod:c}=m(),[u,d]=(0,K.useState)(!1),f=e!==`full`,p=s===1?`Last day`:`Last ${s} days`,ee=s===1?`the last day`:`the last ${s} days`,h=s>=jr,g=h&&(e===`trend`||e===`strip`&&u),_={graphId:`tracesOverview`,graphType:`summary`,series:[{name:`Traces`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:He.metadata.trace_id.colorSet},{name:`Threads`,metric:`metadata.thread_id`,aggregation:`cardinality`,colorSet:He.metadata.thread_id.colorSet},{name:`Users`,metric:`metadata.user_id`,aggregation:`cardinality`,colorSet:He.metadata.user_id.colorSet},{name:`Total Tokens`,metric:`performance.total_tokens`,aggregation:`sum`,colorSet:He.performance.total_tokens.colorSet},...o?[{name:`LLM Cost`,metric:`performance.total_cost`,aggregation:`sum`,colorSet:He.performance.total_cost.colorSet}]:[],{name:`Mean Completion Time`,metric:`performance.completion_time`,aggregation:`avg`,colorSet:He.performance.completion_time.colorSet}],includePrevious:!0,timeScale:`full`};return t?(0,Y.jsxs)(X,{width:`full`,padding:4,_hover:{boxShadow:`2xs`},children:[(0,Y.jsx)(pn,{title:`Traces overview`,qualifier:p,children:(0,Y.jsx)(a,{gap:2,align:`center`,children:(0,Y.jsxs)(Fe,{href:`/${t.slug}/analytics`,fontSize:`xs`,color:`fg.muted`,_hover:{color:`orange.500`},children:[`View dashboards `,(0,Y.jsx)(ce,{size:12})]})})}),(0,Y.jsx)(Ue,{input:_,emptyState:(0,Y.jsx)(Ar,{projectSlug:t.slug})}),f?(0,Y.jsxs)(a,{gap:3,flexWrap:`wrap`,width:`full`,align:`center`,children:[(0,Y.jsx)(l,{fontSize:`xs`,color:`fg.subtle`,children:`Each figure is compared with the period before it.`}),(0,Y.jsx)(D,{}),h?e===`strip`?(0,Y.jsxs)(r.button,{type:`button`,onClick:()=>d(e=>!e),"aria-expanded":u,display:`inline-flex`,alignItems:`center`,gap:1,fontSize:`xs`,color:`fg.muted`,background:`transparent`,borderWidth:0,cursor:`pointer`,_hover:{color:`fg`},children:[u?(0,Y.jsx)(xe,{size:12}):(0,Y.jsx)(B,{size:12}),u?`Hide the trend`:`Show the trend over ${ee}`]}):null:(0,Y.jsxs)(r.button,{type:`button`,onClick:()=>c(Mr.key),fontSize:`xs`,color:`fg.muted`,background:`transparent`,borderWidth:0,cursor:`pointer`,textDecoration:`underline`,textUnderlineOffset:`3px`,_hover:{color:`orange.fg`},children:[`See `,Mr.label.toLowerCase()]})]}):null,g?(0,Y.jsx)(n,{width:`full`,children:(0,Y.jsx)(Ue,{input:{..._,graphType:`line`,timeScale:1,includePrevious:!1,height:Nr},titleProps:{fontSize:`xs`,color:`fg.muted`}})}):null]}):null}var Fr=`release_ui_home_signal_focused_enabled`;function Ir(){let{project:e,organization:t,isLoading:n}=W({redirectToOnboarding:!1,redirectToProjectOnboarding:!1}),{enabled:r,isLoading:i}=Ve(Fr,{projectId:e?.id,organizationId:t?.id,enabled:!!e});return{show:r,isResolving:n||!!e&&i}}function Lr({showSignalFocusedHome:e,showLangy:t,signalFocusedResolving:n=!1,langyResolving:r=!1}){return n?`undecided`:e?`signal-focused`:r?`undecided`:t?`langy`:`classic`}function Rr(){let e=Ir(),t=Je();return Lr({showSignalFocusedHome:e.show,showLangy:t.show,signalFocusedResolving:e.isResolving,langyResolving:t.isResolving})}function zr(){let e=Rr();return(0,Y.jsx)(C,{children:(0,Y.jsx)(n,{width:`full`,position:`relative`,overflowX:`clip`,children:(0,Y.jsx)(E,{maxW:`7xl`,padding:5,position:`relative`,zIndex:1,children:(0,Y.jsxs)(u,{gap:4,width:`full`,align:`start`,children:[(0,Y.jsxs)(a,{width:`full`,align:`center`,gap:2,position:`relative`,zIndex:2,children:[e===`langy`?null:(0,Y.jsx)(gr,{}),(0,Y.jsx)(D,{}),(0,Y.jsx)(Br,{})]}),e===`undecided`?(0,Y.jsx)(Vr,{}):e===`signal-focused`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(dn,{}),(0,Y.jsxs)(v,{templateColumns:{base:`1fr`,lg:`1fr 1fr`},gap:4,width:`full`,alignItems:`stretch`,children:[(0,Y.jsxs)(u,{gap:4,align:`stretch`,minWidth:0,children:[(0,Y.jsx)(or,{}),(0,Y.jsx)(n,{flex:`1`,display:`flex`,minHeight:`120px`,children:(0,Y.jsx)(Cn,{})})]}),(0,Y.jsxs)(u,{gap:4,align:`stretch`,minWidth:0,children:[(0,Y.jsx)(bn,{}),(0,Y.jsx)(n,{flex:`1`,display:`flex`,minHeight:`100px`,children:(0,Y.jsx)(Ln,{})})]})]}),(0,Y.jsx)(Or,{})]}):e===`langy`?(0,Y.jsx)(Hr,{}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(or,{variant:`legacy`}),(0,Y.jsx)(Pr,{}),(0,Y.jsx)(Or,{}),(0,Y.jsx)(yn,{})]}),(0,Y.jsx)(xr,{trailing:(0,Y.jsxs)(a,{gap:2,children:[(0,Y.jsx)(ht,{}),(0,Y.jsx)(Fn,{})]})})]})})})})}function Br(){let{organization:e}=W({redirectToOnboarding:!1,redirectToProjectOnboarding:!1});return k.plan.getActivePlan.useQuery({organizationId:e?.id??``},{enabled:!!e,refetchOnWindowFocus:!1,refetchOnMount:!1}).data?.free===!0?(0,Y.jsxs)(a,{gap:2.5,align:`center`,children:[(0,Y.jsx)(r.span,{fontSize:`12px`,color:`fg.subtle`,whiteSpace:`nowrap`,display:{base:`none`,md:`inline`},children:`Considering LangWatch for your team?`}),(0,Y.jsxs)(r.a,{href:`https://langwatch.ai/get-a-demo`,target:`_blank`,rel:`noreferrer`,display:`inline-flex`,alignItems:`center`,gap:1.5,fontFamily:`mono`,fontSize:`11.5px`,whiteSpace:`nowrap`,color:`fg.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`full`,paddingX:2.5,paddingY:`4px`,transition:`color 130ms ease, border-color 130ms ease`,_hover:{color:`orange.fg`,borderColor:`orange.emphasized`},children:[(0,Y.jsx)(ye,{size:12}),`Request a demo`]})]}):null}function Vr(){return(0,Y.jsxs)(u,{gap:4,width:`full`,align:`stretch`,"aria-busy":`true`,"aria-label":`Loading your home`,children:[(0,Y.jsx)(s,{height:`180px`,borderRadius:`xl`}),(0,Y.jsx)(s,{height:`96px`,borderRadius:`lg`}),(0,Y.jsxs)(v,{templateColumns:{base:`1fr`,lg:`1fr 1fr`},gap:4,children:[(0,Y.jsx)(s,{height:`120px`,borderRadius:`lg`}),(0,Y.jsx)(s,{height:`120px`,borderRadius:`lg`})]})]})}function Hr(){let{isNewProject:e}=re(),t=Pn();return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(or,{variant:`lantern`,children:(0,Y.jsx)(yr,{})}),t===`empty`||t!==`populated`&&e?(0,Y.jsx)(yn,{}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Pr,{variant:Dn(t)}),(0,Y.jsx)(Or,{}),(0,Y.jsx)(yn,{})]}),(0,Y.jsx)(Cn,{})]})}function Ur(){return(0,Y.jsx)(Wr,{})}function Wr(){let e=M(),t=e.query.return_to,n=Xe(t),r=!!(n&&typeof window<`u`);return(0,K.useEffect)(()=>{r&&n&&e.push(n)},[e,n,r]),r?null:(0,Y.jsx)(zr,{})}export{Ur as default};
8
+ //# sourceMappingURL=_project_-DTuunSJZ.js.map
@@ -0,0 +1,7 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{a as n,dn as r,i,n as a}from"./portal-Sdfvrza9.js";import{t as o}from"./jsx-runtime-CFwixLRt.js";import{n as s,t as c}from"./v-stack-hkuSkmCA.js";import{Nn as l}from"./ProjectAvatar-B0tbfKzY.js";import{t as u}from"./badge-Cpc3eA-C.js";import{Jt as d,Kt as f,L as p,qt as m,t as h}from"./DashboardLayout-Cn5-9Ye2.js";import{r as g,t as _}from"./card-By_Mbslh.js";import{n as v,r as y,t as b}from"./stat-CsyT0AnR.js";import{i as x,n as S,r as C,t as w}from"./ReplayStateBadge-CTtWh9Ih.js";import{n as T}from"./api-l6Cnm0vQ.js";import{n as E}from"./log-out-CUZz1cYc.js";import{r as D}from"./next-router-CWLrMXvP.js";import{Pr as O,S as k,t as A}from"./index-8SbDirJv.js";import{r as j}from"./formatters-BDO3Inyr.js";import{t as M}from"./OpsPageShell-GqOT9Ezv.js";import{i as N,r as P}from"./PhaseTimeline-BXHqjiZI.js";var F=e(t()),I=o();function L(){let e=(...e)=>{let t=``,n=0;for(let[r,i]of e)r>n&&(t+=` `.repeat(r-n)),t+=i,n=r+i.length;return t},t=`/|═=`,n=`=═|\\`,r=`· · · ·`,i=e=>`─`.repeat(e);return[[e([5,`O`],[13,r],[33,`O`]),e([4,`/|\\`],[32,`/|\\`]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,`/|\\`],[18,`°`],[32,`/|\\`]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,t],[13,r],[32,`/|\\`]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,t],[8,i(11)+`▶`],[32,`/|\\`]),e([4,`/ \\`],[15,`pew!`],[32,`/ \\`])],[e([5,`O`],[32,`*`],[33,`O`]),e([4,t],[8,`· · · · ·`],[32,`/|\\`]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[32,`\\O`]),e([4,t],[8,`· · ·`],[33,`|`]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,`/|\\`],[13,r],[31,n]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,`/|\\`],[7,`◀`+i(11)],[31,n]),e([4,`/ \\`],[20,`!wep`],[32,`/ \\`])],[e([6,`*`],[5,`O`],[33,`O`]),e([4,`/|\\`],[7,`· · · · ·`],[31,n]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O/`],[33,`O`]),e([5,`|`],[7,`· · ·`],[31,n]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[19,`·`],[33,`O`]),e([4,t],[13,r],[31,n]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,t],[8,i(4)+`▶`],[18,`✶`],[20,`◀`+i(4)],[31,n]),e([4,`/ \\`],[13,`pew! !wep`],[32,`/ \\`])],[e([5,`O`],[15,`\\`],[17,`*`],[19,`|`],[21,`*`],[23,`/`],[33,`O`]),e([4,t],[13,i(2)],[16,`★`],[18,`★`],[20,`★`],[23,i(2)],[31,n]),e([4,`/ \\`],[15,`/`],[17,`*`],[19,`|`],[21,`*`],[23,`\\`],[32,`/ \\`])],[e([5,`O`],[12,`~ ~ ~ ~ ~`],[33,`O`]),e([4,`/|\\`],[11,`~ ~ ~ ~ ~ ~`],[32,`/|\\`]),e([4,`/ \\`],[12,`~ ~ ~ ~ ~`],[32,`/ \\`])]]}var R=L();function z(e,t){if(e===`replay`){let e=[3,4,5,6,7,8,9,10,11];return R[e[Math.floor(t/3)%e.length]]}if(e===`write`){let e=[11,12,12,13,13];return R[e[Math.floor(t/3)%e.length]]}if(e===`drain`){let e=[0,0,1,0,0];return R[e[Math.floor(t/4)%e.length]]}if(e===`cutoff`){let e=[0,2,6,10];return R[e[Math.floor(t/4)%e.length]]}return R[0]}function B({phase:e}){let[t,n]=(0,F.useState)(0),i=(0,F.useRef)(t);return i.current=t,(0,F.useEffect)(()=>{let e=setInterval(()=>{n(e=>e+1)},200);return()=>clearInterval(e)},[]),(0,I.jsx)(r,{fontFamily:`mono`,fontSize:`14px`,lineHeight:`1.3`,whiteSpace:`pre`,textAlign:`center`,color:`orange.400`,userSelect:`none`,children:z(e,t).map((e,t)=>(0,I.jsx)(r,{children:e},t))})}var V=`
2
+ @keyframes meshPulse {
3
+ 0%, 100% { background-position: 0% 50%; }
4
+ 50% { background-position: 100% 50%; }
5
+ }
6
+ `;function H({runId:e}){let t=S(),o=T.ops.getReplayRun.useQuery({runId:e},{refetchInterval:!1}),l=T.ops.cancelReplay.useMutation({onSuccess:()=>{t.refetch()}}),{hasAccess:u}=k(),d=t.data,f=o.data,p=d?.runId===e&&d.state!==`idle`,m=p&&d?.state===`running`,h=w(p?d?.state??`idle`:f?.state??`idle`),g=p&&d&&d.aggregatesTotal>0?Math.round(d.aggregatesProcessed/d.aggregatesTotal*100):0,_=m?{background:`linear-gradient(135deg, rgba(251,146,60,0.05) 0%, rgba(251,146,60,0.12) 25%, rgba(234,88,12,0.08) 50%, rgba(251,146,60,0.12) 75%, rgba(251,146,60,0.05) 100%)`,backgroundSize:`200% 200%`,animation:`meshPulse 4s ease infinite`}:{},v=t.isLoading||o.isLoading,y=p||f;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`style`,{children:V}),(0,I.jsxs)(r,{style:_,borderRadius:`lg`,padding:4,children:[(0,I.jsx)(a,{marginBottom:4,children:(0,I.jsx)(A,{href:`/ops/projections`,_hover:{textDecoration:`none`},children:(0,I.jsxs)(a,{gap:1,color:`fg.muted`,_hover:{color:`fg`},children:[(0,I.jsx)(E,{size:14}),(0,I.jsx)(s,{textStyle:`xs`,children:`Back to Projections`})]})})}),v&&(0,I.jsx)(O,{paddingY:20,children:(0,I.jsx)(n,{size:`lg`})}),!v&&!y&&(0,I.jsx)(O,{paddingY:20,children:(0,I.jsxs)(c,{gap:2,children:[(0,I.jsx)(s,{textStyle:`sm`,color:`fg.muted`,children:`No replay found for this run ID.`}),(0,I.jsx)(A,{href:`/ops/projections`,children:(0,I.jsx)(i,{size:`sm`,variant:`outline`,children:`Back to Projections`})})]})}),y&&p&&d&&(0,I.jsx)(U,{status:d,stateColor:h,progressPercent:g,isRunning:!!m,hasAccess:u,cancelMutation:l}),y&&!p&&f&&(0,I.jsx)(W,{entry:f,stateColor:h})]})]})}function U({status:e,stateColor:t,progressPercent:n,isRunning:o,hasAccess:p,cancelMutation:h}){let S=(0,F.useMemo)(()=>{if(!e.startedAt||!e.eventsProcessed)return null;let t=((e.completedAt?new Date(e.completedAt).getTime():Date.now())-new Date(e.startedAt).getTime())/1e3;return t<1?null:Math.round(e.eventsProcessed/t)},[e.startedAt,e.completedAt,e.eventsProcessed]),w=(0,F.useMemo)(()=>N(e.currentProjection),[e.currentProjection]),T=(0,F.useMemo)(()=>new Set(w),[w]);return(0,I.jsxs)(c,{align:`stretch`,gap:4,children:[(0,I.jsx)(P,{currentPhase:e.currentPhase,completedState:o?null:e.state}),(0,I.jsxs)(l,{columns:4,gap:1,children:[(0,I.jsxs)(v,{children:[(0,I.jsx)(b,{children:`Aggregates`}),(0,I.jsxs)(y,{textStyle:`lg`,children:[e.aggregatesProcessed,e.aggregatesTotal>0&&` / ${e.aggregatesTotal}`]})]}),(0,I.jsxs)(v,{children:[(0,I.jsx)(b,{children:`Events`}),(0,I.jsx)(y,{textStyle:`lg`,children:e.eventsProcessed.toLocaleString()})]}),(0,I.jsxs)(v,{children:[(0,I.jsx)(b,{children:`Rate`}),(0,I.jsx)(y,{textStyle:`lg`,children:S===null?`—`:`${S.toLocaleString()}/s`})]}),(0,I.jsxs)(v,{children:[(0,I.jsx)(b,{children:`Elapsed`}),(0,I.jsx)(y,{textStyle:`lg`,children:e.startedAt?j(e.startedAt,e.completedAt):`—`})]})]}),o&&e.aggregatesTotal>0&&(0,I.jsxs)(c,{align:`stretch`,gap:1,children:[(0,I.jsx)(m,{size:`sm`,value:n,colorPalette:`orange`,children:(0,I.jsx)(d,{children:(0,I.jsx)(f,{})})}),(0,I.jsxs)(s,{textStyle:`xs`,color:`fg.muted`,textAlign:`end`,children:[n,`%`]})]}),(0,I.jsx)(g,{children:(0,I.jsx)(_,{padding:4,children:(0,I.jsxs)(c,{align:`stretch`,gap:3,children:[(0,I.jsxs)(a,{justify:`space-between`,children:[(0,I.jsxs)(a,{gap:2,children:[(0,I.jsx)(x,{colorPalette:t,children:(0,I.jsx)(C,{})}),(0,I.jsxs)(s,{textStyle:`sm`,fontWeight:`semibold`,children:[`Replay`,` `,e.state===`running`?`in progress`:e.state]}),w.length>0&&o&&(0,I.jsx)(u,{size:`sm`,variant:`subtle`,children:w.length===1?w[0]:`${w.length} projections`})]}),o&&p&&(0,I.jsx)(i,{size:`xs`,colorPalette:`red`,variant:`outline`,loading:h.isPending,onClick:()=>h.mutate(),children:`Cancel Replay`})]}),e.description&&(0,I.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:e.description}),e.state===`failed`&&e.error&&(0,I.jsx)(r,{bg:`red.subtle`,padding:3,borderRadius:`md`,children:(0,I.jsx)(s,{textStyle:`xs`,color:`red.500`,children:e.error})}),e.startedAt&&e.userName&&(0,I.jsxs)(s,{textStyle:`xs`,color:`fg.muted`,children:[`Started by `,e.userName]}),(0,I.jsx)(a,{gap:2,flexWrap:`wrap`,children:e.projectionNames.map(e=>(0,I.jsx)(u,{size:`sm`,variant:o&&T.has(e)?`solid`:`subtle`,colorPalette:o&&T.has(e)?`orange`:`gray`,children:e},e))}),o&&(0,I.jsx)(O,{overflow:`hidden`,maxHeight:`60px`,children:(0,I.jsx)(r,{transform:`scale(0.75)`,transformOrigin:`center`,children:(0,I.jsx)(B,{phase:e.currentPhase})})})]})})})]})}function W({entry:e,stateColor:t}){return(0,I.jsxs)(c,{align:`stretch`,gap:4,children:[(0,I.jsx)(P,{currentPhase:null,completedState:e.state}),(0,I.jsx)(g,{children:(0,I.jsx)(_,{padding:4,children:(0,I.jsxs)(c,{align:`stretch`,gap:3,children:[(0,I.jsxs)(a,{gap:2,children:[(0,I.jsx)(x,{colorPalette:t,children:(0,I.jsx)(C,{})}),(0,I.jsxs)(s,{textStyle:`sm`,fontWeight:`semibold`,children:[`Replay `,e.state]})]}),e.description&&(0,I.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:e.description}),(0,I.jsxs)(a,{gap:4,flexWrap:`wrap`,children:[(0,I.jsxs)(s,{textStyle:`xs`,color:`fg.muted`,children:[e.aggregatesProcessed.toLocaleString(),` aggregates`]}),(0,I.jsxs)(s,{textStyle:`xs`,color:`fg.muted`,children:[e.eventsProcessed.toLocaleString(),` events`]}),(0,I.jsxs)(s,{textStyle:`xs`,color:`fg.muted`,children:[`Duration: `,j(e.startedAt,e.completedAt)]}),e.completedAt&&(0,I.jsxs)(s,{textStyle:`xs`,color:`fg.muted`,children:[e.state===`completed`?`Completed`:`Ended`,` at`,` `,new Date(e.completedAt).toLocaleString()]}),e.userName&&(0,I.jsxs)(s,{textStyle:`xs`,color:`fg.muted`,children:[`Started by `,e.userName]})]}),e.state===`failed`&&e.error&&(0,I.jsxs)(r,{bg:`red.subtle`,padding:3,borderRadius:`md`,borderWidth:`1px`,borderColor:`red.200`,children:[(0,I.jsx)(s,{textStyle:`xs`,fontWeight:`medium`,color:`red.500`,marginBottom:1,children:`Error`}),(0,I.jsx)(s,{textStyle:`xs`,color:`red.500`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:e.error})]}),(0,I.jsx)(a,{gap:2,flexWrap:`wrap`,children:e.projectionNames.map(e=>(0,I.jsx)(u,{size:`sm`,variant:`subtle`,children:e},e))}),e.tenantIds.length>0&&(0,I.jsxs)(c,{align:`stretch`,gap:1,children:[(0,I.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Tenants`}),(0,I.jsx)(a,{gap:1,flexWrap:`wrap`,children:e.tenantIds.map(e=>(0,I.jsx)(u,{size:`xs`,variant:`outline`,children:e},e))})]})]})})})]})}function G(){let e=D().query.runId;return(0,I.jsx)(M,{children:(0,I.jsxs)(h,{children:[(0,I.jsx)(p.Header,{children:(0,I.jsx)(p.Heading,{children:`Replay Progress`})}),(0,I.jsx)(p.Container,{children:(0,I.jsx)(H,{runId:e})})]})})}export{G as default};
7
+ //# sourceMappingURL=_runId_-BGhwmwQj.js.map
@@ -0,0 +1,2 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{a as n,dn as r,i,n as a}from"./portal-Sdfvrza9.js";import{t as o}from"./jsx-runtime-CFwixLRt.js";import{t as s}from"./heading-C0sACr0w.js";import{n as c,t as l}from"./v-stack-hkuSkmCA.js";import{L as u}from"./DashboardLayout-Cn5-9Ye2.js";import{r as d,t as f}from"./card-By_Mbslh.js";import{r as p}from"./errors-mlatPkMI.js";import{t as m}from"./spacer-C38e7o6r.js";import{$ as h}from"./immer-DImI3Uq2.js";import{n as g}from"./api-l6Cnm0vQ.js";import{t as _}from"./chevron-left-pgPj05-N.js";import{r as v}from"./next-router-CWLrMXvP.js";import{Pr as y,Qn as b}from"./index-8SbDirJv.js";import{t as x}from"./SettingsLayout-ZI47ZjuT.js";import{t as S}from"./SearchInput-DH_qIhwi.js";var C=o();function w({title:e,searchValue:t,onSearchChange:i,searchPlaceholder:o=`Search`,pagination:c,isLoading:h,isFetching:g,error:_,onCreate:v,createLabel:y=`Create`,children:x}){return(0,C.jsxs)(l,{gap:6,width:`full`,align:`start`,children:[(0,C.jsxs)(a,{width:`full`,children:[(0,C.jsx)(s,{children:e}),(0,C.jsx)(m,{}),v&&(0,C.jsxs)(u.HeaderButton,{onClick:v,children:[(0,C.jsx)(b,{size:20}),y]})]}),(0,C.jsx)(S,{value:t,onChange:e=>i(e.target.value),placeholder:o,width:`full`,maxWidth:`480px`}),(0,C.jsx)(d,{width:`full`,overflow:`hidden`,children:(0,C.jsx)(f,{paddingY:0,paddingX:0,children:_?(0,C.jsx)(r,{paddingY:10,paddingX:4,children:(0,C.jsx)(p,{error:_,fallbackTitle:`Couldn't load ${e.toLowerCase()}`})}):h?(0,C.jsx)(r,{paddingY:10,textAlign:`center`,children:(0,C.jsx)(n,{size:`md`})}):(0,C.jsxs)(r,{position:`relative`,width:`full`,overflow:`auto`,children:[g&&(0,C.jsx)(r,{position:`absolute`,top:2,right:2,zIndex:1,color:`fg.muted`,children:(0,C.jsx)(n,{size:`xs`})}),x]})})}),c&&c.total>0&&(0,C.jsx)(T,{...c})]})}function T({page:e,perPage:t,total:n,onPageChange:r}){let o=Math.max(1,Math.ceil(n/t)),s=e>1,l=e<o;return(0,C.jsxs)(a,{width:`full`,justify:`end`,gap:4,children:[(0,C.jsxs)(c,{fontSize:`sm`,color:`fg.muted`,children:[n===0?0:(e-1)*t+1,`–`,Math.min(n,e*t),` of `,n]}),(0,C.jsxs)(a,{gap:1,children:[(0,C.jsx)(i,{size:`sm`,variant:`outline`,disabled:!s,onClick:()=>r(e-1),children:(0,C.jsx)(_,{size:14})}),(0,C.jsx)(i,{size:`sm`,variant:`outline`,disabled:!l,onClick:()=>r(e+1),children:(0,C.jsx)(h,{size:14})})]})]})}function E({children:e}){return(0,C.jsx)(c,{color:`fg.muted`,fontSize:`sm`,children:e??`—`})}function D(e){if(!e)return`—`;let t=typeof e==`string`?new Date(e):e;return Number.isNaN(t.getTime())?`—`:t.toLocaleDateString()}function O(e){if(!e)return`—`;let t=typeof e==`string`?new Date(e):e;return Number.isNaN(t.getTime())?`—`:`${t.toLocaleDateString()} ${t.toLocaleTimeString()}`}function k(e){if(!e)return null;let t=e.split(`-`).map(Number);if(t.length!==3||t.some(e=>Number.isNaN(e)))return null;let[n,r,i]=t;return new Date(n,r-1,i,12,0,0,0).toISOString()}var A=e(t());function j({children:e}){let t=v(),r=g.user.isAdmin.useQuery({},{retry:!1,refetchOnWindowFocus:!1}),i=r.data?.isAdmin===!0,a=r.isSuccess&&!i||r.isError;return(0,A.useEffect)(()=>{a&&t.push(`/`)},[a,t]),i?(0,C.jsx)(x,{children:e}):(0,C.jsx)(x,{children:(0,C.jsx)(y,{paddingY:20,children:(0,C.jsxs)(l,{gap:3,children:[!a&&(0,C.jsx)(n,{size:`lg`}),(0,C.jsx)(c,{color:`fg.muted`,fontSize:`sm`,children:a?`Access denied`:`Loading Backoffice…`})]})})})}export{D as a,k as i,w as n,O as o,E as r,j as t};
2
+ //# sourceMappingURL=_shell-ChQAHWWX.js.map
@@ -0,0 +1,2 @@
1
+ import{dn as e,n as t}from"./portal-Sdfvrza9.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{t as r}from"./heading-C0sACr0w.js";import{n as i,t as a}from"./v-stack-hkuSkmCA.js";import{$ as o}from"./ProjectAvatar-B0tbfKzY.js";import{t as s}from"./tooltip-CM-lMDNU.js";import{t as c}from"./container-Cxi_AjD-.js";import{n as l}from"./api-l6Cnm0vQ.js";import{r as u}from"./next-router-CWLrMXvP.js";import{Vt as d}from"./index-8SbDirJv.js";import{n as f}from"./useAnnotationQueues-BMo2kZ_n.js";import{t as p}from"./AnnotationsTable-C9n949u_.js";var m=n();function h(){let n=u(),{project:h}=d(),{slug:g}=n.query,_=l.annotation.getQueueBySlugOrId.useQuery({projectId:h?.id??``,slug:g},{enabled:!!h?.id&&typeof g==`string`&&!!g}),v=_.data?.members?.map(e=>e.user);return(0,m.jsx)(f,{children:(0,m.jsx)(c,{maxWidth:`calc(100vw - 330px)`,padding:0,margin:0,children:(0,m.jsx)(p,{noDataTitle:`No queued annotations for this queue`,noDataDescription:`Add a message to this queue to get started.`,tableHeader:(0,m.jsx)(()=>_.data?(0,m.jsxs)(a,{width:`full`,align:`start`,children:[(0,m.jsx)(r,{size:`lg`,children:_.data?.name}),(0,m.jsxs)(t,{children:[(0,m.jsx)(i,{fontSize:`sm`,children:`Members: `}),v?.map(t=>(0,m.jsx)(s,{content:t.name,children:(0,m.jsx)(e,{display:`inline-flex`,children:(0,m.jsx)(o,{size:`xs`,name:t.name??``,image:t.image})})},t.id))]})]}):null,{}),queueId:_.data?.id??``})})})}export{h as default};
2
+ //# sourceMappingURL=_slug_-D6Y2wsW5.js.map
@@ -0,0 +1,2 @@
1
+ import e from"./wizard-CUCaNag_.js";var t=e;export{t as default};
2
+ //# sourceMappingURL=_slug_-DLKkXVG8.js.map