@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.
- package/README.md +3 -3
- package/feature-map.json +4 -2
- package/langevals/evaluators/langevals/langevals_langevals/select_best_compare.py +165 -5
- package/langevals/evaluators/langevals/tests/test_select_best_compare.py +471 -9
- package/langevals/ts-integration/evaluators.generated.ts +83 -63
- package/langwatch/.env.example +7 -0
- package/langwatch/biome.jsonc +23 -0
- package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-DKvtbwGG.js +2 -0
- package/langwatch/dist/client/assets/AddDatasetRecordDrawer-D1vOO9OS.js +6 -0
- package/langwatch/dist/client/assets/AddOrEditAnnotationScore-zxFsPi_K.js +2 -0
- package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-soYSKpT_.js +2 -0
- package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-BHJmgYGv.js +3 -0
- package/langwatch/dist/client/assets/AddParticipants-z6X3xaWh.js +2 -0
- package/langwatch/dist/client/assets/AgentHistoryDrawer-kb5K4X01.js +2 -0
- package/langwatch/dist/client/assets/AgentHttpEditorDrawer-Cf-aA1pn.js +5 -0
- package/langwatch/dist/client/assets/AgentListDrawer-z4OL5IVm.js +2 -0
- package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-Ky7GOYHj.js +2 -0
- package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-CAszeo8y.js +2 -0
- package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-DWrxkhIq.js +2 -0
- package/langwatch/dist/client/assets/AiGatewayLayout-BqznP5T2.js +2 -0
- package/langwatch/dist/client/assets/AnnotationsTable-C9n949u_.js +2 -0
- package/langwatch/dist/client/assets/AreaChart-PNFZHqkl.js +2 -0
- package/langwatch/dist/client/assets/AuthCard-D14g-b3Y.js +2 -0
- package/langwatch/dist/client/assets/AutomationDrawer-Cjo9egay.js +112 -0
- package/langwatch/dist/client/assets/BarChart-B23ShI5J.js +4 -0
- package/langwatch/dist/client/assets/BatchEvaluationSummary-CmkigWIn.js +2 -0
- package/langwatch/dist/client/assets/BudgetEditDrawer-nkQpQiY0.js +2 -0
- package/langwatch/dist/client/assets/CartesianChart-Ci1mTvgb.js +54 -0
- package/langwatch/dist/client/assets/CascadeArchiveDialog-BPqLe1Ai.js +2 -0
- package/langwatch/dist/client/assets/ChartTooltip-BMGa2HEK.js +2 -0
- package/langwatch/dist/client/assets/ChatWindow-BBsct-iS.js +5 -0
- package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-DOqtlBKU.js +9 -0
- package/langwatch/dist/client/assets/CodexCodingDefaultsAsk--UfSQyVR.js +2 -0
- package/langwatch/dist/client/assets/ColorfulBlockIcons-zwwbjL9F.js +6 -0
- package/langwatch/dist/client/assets/ColumnTypeIcon-CZZ6Esh0.js +2 -0
- package/langwatch/dist/client/assets/ComparisonLeaderboardDrawer-ChH7KNaX.js +4 -0
- package/langwatch/dist/client/assets/ConfirmDialog-CWzCY4sN.js +2 -0
- package/langwatch/dist/client/assets/ContactSalesBlock-B3w2lKdE.js +2 -0
- package/langwatch/dist/client/assets/Conversation-BhvQmXJ-.js +2 -0
- package/langwatch/dist/client/assets/CopyInput-Qeb_2bgP.js +2 -0
- package/langwatch/dist/client/assets/CopyableInputWithPrefix-Bp04WBtM.js +2 -0
- package/langwatch/dist/client/assets/CreateProjectDrawer-Dg_yrbka.js +2 -0
- package/langwatch/dist/client/assets/CreateTeamDrawer-CLJnKmFE.js +2 -0
- package/langwatch/dist/client/assets/CustomGraph-C6j6slUs.js +2 -0
- package/langwatch/dist/client/assets/DashboardLayout-Cn5-9Ye2.js +96 -0
- package/langwatch/dist/client/assets/DashboardNameDrawer-BvGn3rsq.js +2 -0
- package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-Wx7PJ_9S.js +2 -0
- package/langwatch/dist/client/assets/DatasetEditorTable-Ca3bmQrl.js +2 -0
- package/langwatch/dist/client/assets/DatasetPickerList-RZLjPQ2S.js +2 -0
- package/langwatch/dist/client/assets/DatasetPreviewTable-Ck22Wy4h.js +2 -0
- package/langwatch/dist/client/assets/DatasetSelector-BxeSHSDD.js +2 -0
- package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-ncleLyuX.js +2 -0
- package/langwatch/dist/client/assets/DeleteConfirmationDialog-Br5m12kp.js +2 -0
- package/langwatch/dist/client/assets/DocsLinks-D-I122gH.js +2 -0
- package/langwatch/dist/client/assets/DynamicZodForm-BUbQBluG.js +2 -0
- package/langwatch/dist/client/assets/EditAutomationFilterDrawer-Bci7dGy6.js +3 -0
- package/langwatch/dist/client/assets/EditModelProviderDrawer-CdUQa5qQ.js +4 -0
- package/langwatch/dist/client/assets/EditProjectDrawer-DDMa3VNp.js +2 -0
- package/langwatch/dist/client/assets/EmojiPickerModal-BLskXRKS.js +3 -0
- package/langwatch/dist/client/assets/EnterpriseLockedSurface-CGy3NpuC.js +2 -0
- package/langwatch/dist/client/assets/ErrorBarContext-CUuF6tzC.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-Dw6JMkKa.js +107 -0
- package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-F1nHh-cP.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorEditorDrawer-eotRSQPT.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorEditorShared-BLZXXMFD.js +43 -0
- package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-Bx_uZmkb.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorListDrawer--2JYBA1w.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorMappingsSection-DCqvgq8G.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorSelection-BTMe6CCC.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorSelectionBox-CDxYA37_.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-BDgiQ_Gu.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-D4HFeq77.js +2 -0
- package/langwatch/dist/client/assets/ExecutionState-xp8LG59p.js +2 -0
- package/langwatch/dist/client/assets/FeatureFlagsDrawer-DIplgYQy.js +2 -0
- package/langwatch/dist/client/assets/FieldInfoTooltip-C_hEtQpK.js +2 -0
- package/langwatch/dist/client/assets/FieldsFilters-Ci5mVooQ.js +2 -0
- package/langwatch/dist/client/assets/FilterDisplay-BKjP30tt.js +2 -0
- package/langwatch/dist/client/assets/FilterSidebar-Cgxbpfi7.js +2 -0
- package/langwatch/dist/client/assets/FormatMoney-LZE9c_pf.js +2 -0
- package/langwatch/dist/client/assets/FoundryDrawer-DjVyu6Ww.js +2 -0
- package/langwatch/dist/client/assets/FullLogo-DRBt8v39.js +2 -0
- package/langwatch/dist/client/assets/GovernanceLayout-Baar1Fc8.js +2 -0
- package/langwatch/dist/client/assets/GraphsLayout-RNsRoPhs.js +2 -0
- package/langwatch/dist/client/assets/GroupBindingInputRow-BxvXd1EU.js +2 -0
- package/langwatch/dist/client/assets/GuardrailsDrawer-BtsfIXzD.js +91 -0
- package/langwatch/dist/client/assets/History-B3CO9rUC.js +17 -0
- package/langwatch/dist/client/assets/HorizontalFormControl-CpxShF8O.js +2 -0
- package/langwatch/dist/client/assets/HoverableBigText-BMBnTTnr.js +2 -0
- package/langwatch/dist/client/assets/InstallCliCard-DO5HE9Zk.js +2 -0
- package/langwatch/dist/client/assets/IntegratePaneShell-Bc7i3AU3.js +8 -0
- package/langwatch/dist/client/assets/InviteMemberDrawer-CiQbGDVl.js +2 -0
- package/langwatch/dist/client/assets/IsolatedErrorBoundary-QK1gsCee.js +2 -0
- package/langwatch/dist/client/assets/LLMModelCostDrawer-K4uPc99h.js +2 -0
- package/langwatch/dist/client/assets/LangyContextTarget-Dxr919ue.js +2 -0
- package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-CnBBcfON.js +2 -0
- package/langwatch/dist/client/assets/Legend-C-o-ebW-.js +6 -0
- package/langwatch/dist/client/assets/Line-CbuF_DU9.js +2 -0
- package/langwatch/dist/client/assets/LineChart-CjG7MhLF.js +2 -0
- package/langwatch/dist/client/assets/ListTable-Dq11zhPy.js +2 -0
- package/langwatch/dist/client/assets/LoadingScreen-BRa1kl7f.js +2 -0
- package/langwatch/dist/client/assets/Markdown-Cip8Rj5C.js +35 -0
- package/langwatch/dist/client/assets/MenuLink-CEEzPpsg.js +2 -0
- package/langwatch/dist/client/assets/MessageCard-Nbu21sIo.js +2 -0
- package/langwatch/dist/client/assets/MetadataTag-CQmOL4su.js +5 -0
- package/langwatch/dist/client/assets/ModelProviderCustomModelInput-s8Z1JIfQ.js +2 -0
- package/langwatch/dist/client/assets/ModelProviderScreen-BkZVsCiO.js +2 -0
- package/langwatch/dist/client/assets/ModelSelector-BjEx9IlF.js +2 -0
- package/langwatch/dist/client/assets/MyLayout-Dr6t6Ogu.js +2 -0
- package/langwatch/dist/client/assets/NavigationFooter-GfOzirbT.js +2 -0
- package/langwatch/dist/client/assets/NewWorkflowForm-uqnhwRpZ.js +2 -0
- package/langwatch/dist/client/assets/NoDataInfoBlock-Busjhz63.js +2 -0
- package/langwatch/dist/client/assets/OnboardingContainer-BGhio01s.js +2 -0
- package/langwatch/dist/client/assets/OnlineEvaluationDrawer-DyCVUUmz.js +2 -0
- package/langwatch/dist/client/assets/OpsPageShell-GqOT9Ezv.js +2 -0
- package/langwatch/dist/client/assets/OttlEditor-BYyg1quG.js +3 -0
- package/langwatch/dist/client/assets/OverflownText-q6WIx911.js +2 -0
- package/langwatch/dist/client/assets/ProjectAvatar-B0tbfKzY.js +43 -0
- package/langwatch/dist/client/assets/ProjectLangyLayout-Du3nxtBV.js +82 -0
- package/langwatch/dist/client/assets/PromptEditorDrawer-DeL8XgdG.js +2 -0
- package/langwatch/dist/client/assets/PromptListDrawer-y4bmNt4t.js +2 -0
- package/langwatch/dist/client/assets/PropertySectionTitle-CK55WvKi.js +37 -0
- package/langwatch/dist/client/assets/ProviderModelSelector-B-0vpQ2t.js +2 -0
- package/langwatch/dist/client/assets/ProviderScopeChips-DN3rtvAE.js +2 -0
- package/langwatch/dist/client/assets/PushToCopiesDialog-Ry_M3FuH.js +2 -0
- package/langwatch/dist/client/assets/ReferenceDot-DrNtDSrg.js +2 -0
- package/langwatch/dist/client/assets/RenderInputOutput-DqsCnspr.js +261 -0
- package/langwatch/dist/client/assets/ScatterChart-jarSkvrF.js +2 -0
- package/langwatch/dist/client/assets/ScenarioFormDrawer-DvJcYmkQ.js +2 -0
- package/langwatch/dist/client/assets/ScenarioInputMappingSection-BewVLFCZ.js +2 -0
- package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-BAPna8ym.js +3 -0
- package/langwatch/dist/client/assets/ScopeChipPicker-pQ061i-c.js +2 -0
- package/langwatch/dist/client/assets/SearchInput-DH_qIhwi.js +2 -0
- package/langwatch/dist/client/assets/SectionNavigationLayout-DwPBnqYj.js +2 -0
- package/langwatch/dist/client/assets/SelectDatasetDrawer-8MPCEZID.js +2 -0
- package/langwatch/dist/client/assets/SelectionActionBar-C2SOsiow.js +2 -0
- package/langwatch/dist/client/assets/SeriesFilterDrawer-d5DYEKTZ.js +2 -0
- package/langwatch/dist/client/assets/SettingsLayout-ZI47ZjuT.js +2 -0
- package/langwatch/dist/client/assets/SetupWithAgentButton-CNTb3Avj.js +4 -0
- package/langwatch/dist/client/assets/ShikiCommandBox-u0WEsz_9.js +5 -0
- package/langwatch/dist/client/assets/SpanDetails-L_YT0nxH.js +3 -0
- package/langwatch/dist/client/assets/SubscriptionPage-CaUbKJjG.js +2 -0
- package/langwatch/dist/client/assets/SuiteFormDrawer-BjUQdKq8.js +2 -0
- package/langwatch/dist/client/assets/Symbols-R6sphPWl.js +2 -0
- package/langwatch/dist/client/assets/TabButton-8Oc9UYh8.js +3 -0
- package/langwatch/dist/client/assets/TableCell-Ci8ylzki.js +2 -0
- package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-DSKFRtdD.js +2 -0
- package/langwatch/dist/client/assets/TeamForm-CL9ycvq0.js +2 -0
- package/langwatch/dist/client/assets/TeamUserRoleField-D0ZTlKiH.js +2 -0
- package/langwatch/dist/client/assets/TraceDetails-JolY6sXJ.js +9 -0
- package/langwatch/dist/client/assets/TraceDetailsDrawer-lgPzHJ3L.js +2 -0
- package/langwatch/dist/client/assets/TraceIdPeek-DDi0ChdF.js +2 -0
- package/langwatch/dist/client/assets/TracesMapping-BPXT_-h4.js +2 -0
- package/langwatch/dist/client/assets/UpgradeModalContent-DmGd0n65.js +2 -0
- package/langwatch/dist/client/assets/UploadCSVDrawer-haYFZH65.js +3 -0
- package/langwatch/dist/client/assets/VariablesSection-DW_-pHw8.js +2 -0
- package/langwatch/dist/client/assets/VersionBadge-BrsZ4NP1.js +2 -0
- package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-B9tl6d9Q.js +1161 -0
- package/langwatch/dist/client/assets/ViewAutomationDrawer-DliGiKaC.js +2 -0
- package/langwatch/dist/client/assets/VirtualKeySecretReveal-B9QMNIxJ.js +54 -0
- package/langwatch/dist/client/assets/WelcomeLayout-DZ1ue0he.js +2 -0
- package/langwatch/dist/client/assets/WithFeatureFlagGuard-CgkIIt3_.js +2 -0
- package/langwatch/dist/client/assets/WithPermissionGuard-Da_hdEdq.js +2 -0
- package/langwatch/dist/client/assets/WorkflowCard-C_ClnTV_.js +2 -0
- package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-DozYRazW.js +2 -0
- package/langwatch/dist/client/assets/_...path_-Da4obdgF.js +2 -0
- package/langwatch/dist/client/assets/_Uint8Array-BKsS4AYJ.js +2 -0
- package/langwatch/dist/client/assets/__...path__-hjRUlcmj.js +22 -0
- package/langwatch/dist/client/assets/_baseAssignValue-B0IP5NGP.js +2 -0
- package/langwatch/dist/client/assets/_baseClone-DWP1OuEe.js +2 -0
- package/langwatch/dist/client/assets/_baseEach-Bv6waMUN.js +2 -0
- package/langwatch/dist/client/assets/_baseFor-K5aTWdeA.js +2 -0
- package/langwatch/dist/client/assets/_experiment_-Cv2h4AYK.js +2 -0
- package/langwatch/dist/client/assets/_id_-BoubOQoS.js +2 -0
- package/langwatch/dist/client/assets/_id_-BuzJEIUf.js +2 -0
- package/langwatch/dist/client/assets/_id_-BzLlrR7z.js +2 -0
- package/langwatch/dist/client/assets/_id_-DAzjJ7AY.js +2 -0
- package/langwatch/dist/client/assets/_id_-Dc2UAWAO.js +2 -0
- package/langwatch/dist/client/assets/_id_-DwutdLKk.js +2 -0
- package/langwatch/dist/client/assets/_id_-H7-5DI5r.js +2 -0
- package/langwatch/dist/client/assets/_project_-DTuunSJZ.js +8 -0
- package/langwatch/dist/client/assets/_runId_-BGhwmwQj.js +7 -0
- package/langwatch/dist/client/assets/_shell-ChQAHWWX.js +2 -0
- package/langwatch/dist/client/assets/_slug_-D6Y2wsW5.js +2 -0
- package/langwatch/dist/client/assets/_slug_-DLKkXVG8.js +2 -0
- package/langwatch/dist/client/assets/_slug_-yLo6E4BE.js +17 -0
- package/langwatch/dist/client/assets/_team_-TUptH6wK.js +2 -0
- package/langwatch/dist/client/assets/_workflow_-B_flNNON.js +3 -0
- package/langwatch/dist/client/assets/_workflow_-DUyBeEF1.js +25 -0
- package/langwatch/dist/client/assets/accept-BtE8pbrP.js +2 -0
- package/langwatch/dist/client/assets/activity-BDNvBEBL.js +1 -0
- package/langwatch/dist/client/assets/agents-CZnWSlhu.js +2 -0
- package/langwatch/dist/client/assets/alerts-BDNvBEBL.js +1 -0
- package/langwatch/dist/client/assets/all-in7z_yGY.js +2 -0
- package/langwatch/dist/client/assets/analytics-C8m2qboV.js +2 -0
- package/langwatch/dist/client/assets/annotation-scores-hmT53w46.js +2 -0
- package/langwatch/dist/client/assets/annotations-DwouO48Z.js +2 -0
- package/langwatch/dist/client/assets/anomaly-rules-DoJdIoCt.js +2 -0
- package/langwatch/dist/client/assets/api-keys-CykxAxvG.js +4 -0
- package/langwatch/dist/client/assets/asaplangy-D3J00Q-Z.js +5 -0
- package/langwatch/dist/client/assets/audit-log-Dy4vcEeJ.js +2 -0
- package/langwatch/dist/client/assets/auth-IqMSC5k1.js +2 -0
- package/langwatch/dist/client/assets/authentication-BqVl7Fh-.js +2 -0
- package/langwatch/dist/client/assets/authorize-BGMc1Gzv.js +2 -0
- package/langwatch/dist/client/assets/authorize-DhHzBVUd.js +2 -0
- package/langwatch/dist/client/assets/automations-BDNvBEBL.js +1 -0
- package/langwatch/dist/client/assets/automations-BhzNESFp.js +2 -0
- package/langwatch/dist/client/assets/billing-plans-D_IT1cHz.js +2 -0
- package/langwatch/dist/client/assets/blank-Ct2wtHyX.js +2 -0
- package/langwatch/dist/client/assets/blobs-Dwi1OImQ.js +2 -0
- package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3-CnAsMlS_.js +133 -0
- package/langwatch/dist/client/assets/budgets-Cn5gXQK_.js +3 -0
- package/langwatch/dist/client/assets/bug-reports-feRha8NA.js +2 -0
- package/langwatch/dist/client/assets/cache-rules-T0g7jfVv.js +2 -0
- package/langwatch/dist/client/assets/choose-D7SJAjkq.js +2 -0
- package/langwatch/dist/client/assets/chunk-EX3LRPZG-DkekrL-i.js +232 -0
- package/langwatch/dist/client/assets/chunk-FWX5IMBZ-2uc49Oqf.js +3 -0
- package/langwatch/dist/client/assets/chunk-PUDLZKDR-CdFvlX4m.js +157 -0
- package/langwatch/dist/client/assets/chunk-RYQCIY6F-BLUBc3em.js +2 -0
- package/langwatch/dist/client/assets/chunk-V7JOEXUC-daLm26hJ.js +207 -0
- package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-CDA8LHAw.js +2 -0
- package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-CDA8LHAw.js +2 -0
- package/langwatch/dist/client/assets/clsx-CjueKrWZ.js +2 -0
- package/langwatch/dist/client/assets/codeAgentConfig-BGKq9uCt.js +7 -0
- package/langwatch/dist/client/assets/codingDefaultSync-BHSxIX3Y.js +2 -0
- package/langwatch/dist/client/assets/configure-CrBmyV7I.js +4 -0
- package/langwatch/dist/client/assets/constants-CDt5HyiB.js +2 -0
- package/langwatch/dist/client/assets/custom-wRFdLdR4.js +12 -0
- package/langwatch/dist/client/assets/custom_evaluator-C4ikBFuX.js +31 -0
- package/langwatch/dist/client/assets/dagre-VKFMJZFB-BElJnuGp.js +5 -0
- package/langwatch/dist/client/assets/dagre-VMur7wh6.js +2 -0
- package/langwatch/dist/client/assets/data-privacy-DAIYO4AS.js +2 -0
- package/langwatch/dist/client/assets/data-retention-6spK_HnV.js +2 -0
- package/langwatch/dist/client/assets/datasets-_6-oF4ZW.js +2 -0
- package/langwatch/dist/client/assets/debounce-CS9Z04io.js +2 -0
- package/langwatch/dist/client/assets/defaultModelState-B2tL23ua.js +2 -0
- package/langwatch/dist/client/assets/dejaview-Cde-wWV4.js +2 -0
- package/langwatch/dist/client/assets/departments-Cm-0ZxEt.js +2 -0
- package/langwatch/dist/client/assets/devices-DmiWzGY2.js +2 -0
- package/langwatch/dist/client/assets/dist-C4xeXVRv.js +6 -0
- package/langwatch/dist/client/assets/drawerFromUrl-CKr5SifD.js +2 -0
- package/langwatch/dist/client/assets/edit-CLmkWTOM.js +62 -0
- package/langwatch/dist/client/assets/email-suppressions-cqwH0a9N.js +2 -0
- package/langwatch/dist/client/assets/erDiagram-Q63AITRT-Byy32QYy.js +86 -0
- package/langwatch/dist/client/assets/error-D8QCVS4R.js +2 -0
- package/langwatch/dist/client/assets/errors-mlatPkMI.js +2 -0
- package/langwatch/dist/client/assets/evaluations-BBoYdpZy.js +2 -0
- package/langwatch/dist/client/assets/evaluations-DhzXchFj.js +2 -0
- package/langwatch/dist/client/assets/evaluators-BtHslgaT.js +2 -0
- package/langwatch/dist/client/assets/evaluators-_EDCn-tQ.js +148 -0
- package/langwatch/dist/client/assets/experiments-CffarahA.js +1 -0
- package/langwatch/dist/client/assets/feature-flags-mcBTRF0E.js +2 -0
- package/langwatch/dist/client/assets/fetchSSE-CnJPAkno.js +3 -0
- package/langwatch/dist/client/assets/fieldset-kmG3NTVs.js +2 -0
- package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-CY9NG0NN.js +1 -0
- package/langwatch/dist/client/assets/forgot-password-wo5Sna-0.js +2 -0
- package/langwatch/dist/client/assets/formatMoney-ClmqgvaY.js +2 -0
- package/langwatch/dist/client/assets/formatTargetOutput-DXvqMkYJ.js +2 -0
- package/langwatch/dist/client/assets/foundry-CfvGgfP0.js +477 -0
- package/langwatch/dist/client/assets/gateway-Be0EsD57.js +2 -0
- package/langwatch/dist/client/assets/getEvaluator-D2EjIa3G.js +2 -0
- package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-D2oUP3Tn.js +2 -0
- package/langwatch/dist/client/assets/governance-YZL-Q4Vy.js +2 -0
- package/langwatch/dist/client/assets/graphlib-DsLTzvlk.js +2 -0
- package/langwatch/dist/client/assets/grid-MxZhegzw.js +2 -0
- package/langwatch/dist/client/assets/groups-BmusUt3C.js +2 -0
- package/langwatch/dist/client/assets/guardrails-DAx8mDop.js +2 -0
- package/langwatch/dist/client/assets/handled-error-DbmvFmFF.js +2 -0
- package/langwatch/dist/client/assets/http-C64lOZI7.js +7 -0
- package/langwatch/dist/client/assets/identifierUtils-C2FgAR6z.js +2 -0
- package/langwatch/dist/client/assets/immer-DImI3Uq2.js +14 -0
- package/langwatch/dist/client/assets/index-8SbDirJv.js +68 -0
- package/langwatch/dist/client/assets/ingestion-source-detail-PQbeRniA.js +19 -0
- package/langwatch/dist/client/assets/ingestion-sources-CCyiAKHP.js +12 -0
- package/langwatch/dist/client/assets/integrations-WSl7N8v9.js +2 -0
- package/langwatch/dist/client/assets/isArrayLikeObject-DQ6J5Gh8.js +2 -0
- package/langwatch/dist/client/assets/isSymbol-DQQCRrSw.js +2 -0
- package/langwatch/dist/client/assets/langyHomeSuggestions-czH603Eu.js +2 -0
- package/langwatch/dist/client/assets/license-BXfbZQgG.js +2 -0
- package/langwatch/dist/client/assets/licenseStatusUtils-CeEgqpQ1.js +2 -0
- package/langwatch/dist/client/assets/lu-BSZWBZXU.js +2 -0
- package/langwatch/dist/client/assets/map-DUpZ7PrO.js +2 -0
- package/langwatch/dist/client/assets/mappingValidation-C7knTdfD.js +2 -0
- package/langwatch/dist/client/assets/me-DbCM2fI8.js +7 -0
- package/langwatch/dist/client/assets/me-DgXzEkaD.js +2 -0
- package/langwatch/dist/client/assets/members-CNILhgB4.js +2 -0
- package/langwatch/dist/client/assets/mermaid.core-1LNrQSiZ.js +12 -0
- package/langwatch/dist/client/assets/messages-CIoUj-2S.js +2 -0
- package/langwatch/dist/client/assets/metrics-Ba4ghWyR.js +2 -0
- package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-BsK9qdX4.js +97 -0
- package/langwatch/dist/client/assets/model-costs-Cmo-7iNN.js +2 -0
- package/langwatch/dist/client/assets/model-providers-DNeQW-T1.js +2 -0
- package/langwatch/dist/client/assets/modelProviderHelpers-BgYFTBND.js +2 -0
- package/langwatch/dist/client/assets/my-queue-DAyfQ6lp.js +2 -0
- package/langwatch/dist/client/assets/normalizeComparison-QGQpERT7.js +2 -0
- package/langwatch/dist/client/assets/not-found-BFkr8OS7.js +2 -0
- package/langwatch/dist/client/assets/now-BWCCq_PO.js +2 -0
- package/langwatch/dist/client/assets/onboarding-DAAoh3gE.js +2 -0
- package/langwatch/dist/client/assets/online-evaluations-DbC0C3ct.js +2 -0
- package/langwatch/dist/client/assets/ops-BnGgY3gP.js +2 -0
- package/langwatch/dist/client/assets/organizations-D-hWxeYL.js +2 -0
- package/langwatch/dist/client/assets/pages-BthWVZpr.js +2 -0
- package/langwatch/dist/client/assets/persistence-NkzSPIBC.js +2 -0
- package/langwatch/dist/client/assets/personalProject-C9vU_vdl.js +2 -0
- package/langwatch/dist/client/assets/plans-B_rx4bLE.js +2 -0
- package/langwatch/dist/client/assets/preconditionFieldUtils-ryKgG9T1.js +2 -0
- package/langwatch/dist/client/assets/product-BuY5Xwg3.js +2 -0
- package/langwatch/dist/client/assets/project-C2NjfKL8.js +2 -0
- package/langwatch/dist/client/assets/projections-rLpLV9w3.js +2 -0
- package/langwatch/dist/client/assets/projects-BF0LrAID.js +2 -0
- package/langwatch/dist/client/assets/promptHandle-BT-5THDj.js +2 -0
- package/langwatch/dist/client/assets/prompts-BHe5aLJx.js +8 -0
- package/langwatch/dist/client/assets/radio-group-BPt-WSZX.js +2 -0
- package/langwatch/dist/client/assets/registry-olFQKglt.js +2 -0
- package/langwatch/dist/client/assets/reports-BLYN6Q1s.js +2 -0
- package/langwatch/dist/client/assets/request-DFzKYavU.js +2 -0
- package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-CRtGWC_J.js +85 -0
- package/langwatch/dist/client/assets/reset-password-DYZspdMQ.js +2 -0
- package/langwatch/dist/client/assets/role-bindings-FmulBsng.js +2 -0
- package/langwatch/dist/client/assets/roles-RLhR-aqL.js +2 -0
- package/langwatch/dist/client/assets/routing-policies-ljceihkc.js +5 -0
- package/langwatch/dist/client/assets/scenarios-BQqYDDZG.js +2 -0
- package/langwatch/dist/client/assets/scheduler-BFnKJjAw.js +2 -0
- package/langwatch/dist/client/assets/schedules-BDNvBEBL.js +1 -0
- package/langwatch/dist/client/assets/scim-Bmka9JwE.js +2 -0
- package/langwatch/dist/client/assets/seatTypeCopy-fhsCX-T3.js +2 -0
- package/langwatch/dist/client/assets/secrets-Cwr6m0Ec.js +2 -0
- package/langwatch/dist/client/assets/segment-group-BktqF-NE.js +2 -0
- package/langwatch/dist/client/assets/segmented-control-Dux7mG6V.js +2 -0
- package/langwatch/dist/client/assets/select-BvA110t-.js +2 -0
- package/langwatch/dist/client/assets/send-KqbwnHm5.js +2 -0
- package/langwatch/dist/client/assets/sequenceView-CXTCS8lF.js +5 -0
- package/langwatch/dist/client/assets/seriesOptions-B04NlY20.js +1015 -0
- package/langwatch/dist/client/assets/settings-U355L_I1.js +2 -0
- package/langwatch/dist/client/assets/setup-BlSoABYV.js +2 -0
- package/langwatch/dist/client/assets/shikiAdapter-Ctbe7cQu.js +3 -0
- package/langwatch/dist/client/assets/showSuiteRunError-D2fez5Ub.js +2 -0
- package/langwatch/dist/client/assets/signin-DyT1qLoq.js +2 -0
- package/langwatch/dist/client/assets/signup-D8m3PZ3b.js +2 -0
- package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-iaTfadDT.js +2 -0
- package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-DH-TUWs1.js +2 -0
- package/langwatch/dist/client/assets/subscription-_ypR9RT2.js +3 -0
- package/langwatch/dist/client/assets/subscriptions-BRPlrnsz.js +2 -0
- package/langwatch/dist/client/assets/suggestionUI-BvF9IL3n.js +106 -0
- package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-DT3qutmi.js +3 -0
- package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-Chcqm6v8.js +9 -0
- package/langwatch/dist/client/assets/switch-BZp2DIfW.js +2 -0
- package/langwatch/dist/client/assets/switch-C1DNHB2v.js +2 -0
- package/langwatch/dist/client/assets/tabs-B6CQXTUQ.js +2 -0
- package/langwatch/dist/client/assets/teams-B3Yc0LtS.js +2 -0
- package/langwatch/dist/client/assets/teams-Df3DGQGZ.js +2 -0
- package/langwatch/dist/client/assets/tool-catalog-CpVqJ_Dp.js +7 -0
- package/langwatch/dist/client/assets/toolIcons-CwYXl2Eu.js +2 -0
- package/langwatch/dist/client/assets/tooltip-CM-lMDNU.js +2 -0
- package/langwatch/dist/client/assets/topic-clustering-DEtDEXOU.js +2 -0
- package/langwatch/dist/client/assets/topics-BGSBPvH8.js +2 -0
- package/langwatch/dist/client/assets/traceStore-C-SeEWpA.js +55 -0
- package/langwatch/dist/client/assets/traces-hMC5nfWE.js +289 -0
- package/langwatch/dist/client/assets/tracesMapping-CJhNJ9Ej.js +3 -0
- package/langwatch/dist/client/assets/tracking-in5OR8uP.js +2 -0
- package/langwatch/dist/client/assets/types-DNh2n8ZE.js +2 -0
- package/langwatch/dist/client/assets/types-OZJZgbcd.js +2 -0
- package/langwatch/dist/client/assets/types-nw9Z9F-v.js +2 -0
- package/langwatch/dist/client/assets/undo-2-CYjzz3Fj.js +2 -0
- package/langwatch/dist/client/assets/usage-BMXYHJUH.js +2 -0
- package/langwatch/dist/client/assets/usage-Da6wBDdP.js +2 -0
- package/langwatch/dist/client/assets/use-generic-onboarding-flow-eie3NRF5.js +2 -0
- package/langwatch/dist/client/assets/useActivePlan-Dsa3BYxd.js +2 -0
- package/langwatch/dist/client/assets/useAllPromptsForProject-BS-h_uSZ.js +2 -0
- package/langwatch/dist/client/assets/useAnnotationQueues-BMo2kZ_n.js +2 -0
- package/langwatch/dist/client/assets/useAvailableEvaluators-DkZ2Yt1F.js +2 -0
- package/langwatch/dist/client/assets/useCyclingVerb-BTWaxKR2.js +2 -0
- package/langwatch/dist/client/assets/useDepartmentColumn-xoZ52lPP.js +2 -0
- package/langwatch/dist/client/assets/useEvaluationsV3Store-CjI63SqB.js +2 -0
- package/langwatch/dist/client/assets/useExportTraces-kA2TFkjy.js +2 -0
- package/langwatch/dist/client/assets/useFeatureFlag-BjAcqOFH.js +2 -0
- package/langwatch/dist/client/assets/usePersonalContext-BGjy_Vrg.js +2 -0
- package/langwatch/dist/client/assets/useProjectSpanNames-DV-N8Iqc.js +2 -0
- package/langwatch/dist/client/assets/useProjectsForCopy-C63wLMNr.js +2 -0
- package/langwatch/dist/client/assets/useRunViaApiTabs-DMsq4RV1.js +50 -0
- package/langwatch/dist/client/assets/useShowLangy-C1pPUZqz.js +2 -0
- package/langwatch/dist/client/assets/useSimulationUpdateListener-ufWGuGhO.js +2 -0
- package/langwatch/dist/client/assets/useTargetName-DRCsNovZ.js +2 -0
- package/langwatch/dist/client/assets/useTargetNameMap-2sQCSyzN.js +2 -0
- package/langwatch/dist/client/assets/useTraceDetailsDrawer-CWSKPTh_.js +2 -0
- package/langwatch/dist/client/assets/useTraceUpdateListener-DqLF7KuU.js +2 -0
- package/langwatch/dist/client/assets/useUrlScopeFilter-BmRsU3rU.js +2 -0
- package/langwatch/dist/client/assets/useVariantMetrics-CK9aOmIb.js +2 -0
- package/langwatch/dist/client/assets/useWorkflowStore-CWWkoMW1.js +8 -0
- package/langwatch/dist/client/assets/users-B9jauEWz.js +2 -0
- package/langwatch/dist/client/assets/users-C8IaWy9-.js +2 -0
- package/langwatch/dist/client/assets/users-DIbzKO8Q.js +2 -0
- package/langwatch/dist/client/assets/v3-C9Ud_O3k.js +2 -0
- package/langwatch/dist/client/assets/variables-Dox25KUK.js +396 -0
- package/langwatch/dist/client/assets/viewStore-BCIvcW8n.js +2 -0
- package/langwatch/dist/client/assets/virtual-keys-D-qkAFBv.js +2 -0
- package/langwatch/dist/client/assets/welcome-CnjW7kg3.js +16 -0
- package/langwatch/dist/client/assets/wizard-CUCaNag_.js +2 -0
- package/langwatch/dist/client/assets/workbench-N1DutXtL.js +2 -0
- package/langwatch/dist/client/assets/workflows-D2XRYWpS.js +3 -0
- package/langwatch/dist/client/assets/wrap-D_XqGHIU.js +2 -0
- package/langwatch/dist/client/index.html +4 -4
- package/langwatch/dist/scenario-child-process.js +7 -0
- package/langwatch/e2e/auth-regression/better-auth-sso-smoketest.ts +72 -0
- package/langwatch/ee/LICENSE.md +52 -18
- package/langwatch/ee/README.md +15 -6
- package/langwatch/ee/admin/routes/__tests__/admin.integration.test.ts +1 -1
- package/langwatch/ee/admin/routes/admin.ts +1 -1
- package/langwatch/ee/audit-log/auditLog.ts +51 -0
- package/langwatch/ee/billing/__tests__/planLimits.unit.test.ts +6 -6
- package/langwatch/ee/billing/__tests__/planProvider.unit.test.ts +21 -33
- package/langwatch/ee/billing/__tests__/subscription.service.unit.test.ts +1 -0
- package/langwatch/ee/billing/__tests__/usage-limit.service.unit.test.ts +17 -17
- package/langwatch/ee/billing/planLimits.ts +1 -37
- package/langwatch/ee/billing/planProvider.ts +0 -13
- package/langwatch/ee/governance/reactors/__tests__/gatewayBudgetSync.reactor.unit.test.ts +39 -0
- package/langwatch/ee/governance/reactors/__tests__/governanceKpisSync.reactor.unit.test.ts +33 -0
- package/langwatch/ee/governance/reactors/__tests__/governanceOcsfEventsSync.reactor.unit.test.ts +33 -0
- package/langwatch/ee/governance/reactors/__tests__/governanceReactorsPreEnqueueGate.unit.test.ts +243 -0
- package/langwatch/ee/governance/reactors/gatewayBudgetSync.reactor.ts +391 -185
- package/langwatch/ee/governance/reactors/governanceKpisSync.reactor.ts +14 -7
- package/langwatch/ee/governance/reactors/governanceOcsfEventsSync.reactor.ts +97 -81
- package/langwatch/ee/governance/services/governanceAttributeKeys.ts +17 -0
- package/langwatch/ee/licensing/__tests__/constants.unit.test.ts +4 -6
- package/langwatch/ee/licensing/__tests__/defaults.unit.test.ts +63 -86
- package/langwatch/ee/licensing/__tests__/fixtures/testLicenses.ts +18 -0
- package/langwatch/ee/licensing/__tests__/licenseGenerationService.unit.test.ts +52 -16
- package/langwatch/ee/licensing/__tests__/licenseHandler.integration.test.ts +199 -15
- package/langwatch/ee/licensing/__tests__/mintedPlan.unit.test.ts +110 -0
- package/langwatch/ee/licensing/__tests__/planMapping.unit.test.ts +4 -29
- package/langwatch/ee/licensing/__tests__/planTemplates.unit.test.ts +0 -61
- package/langwatch/ee/licensing/__tests__/validation.unit.test.ts +69 -0
- package/langwatch/ee/licensing/constants.ts +11 -59
- package/langwatch/ee/licensing/defaults.ts +20 -32
- package/langwatch/ee/licensing/licenseGenerationService.ts +6 -19
- package/langwatch/ee/licensing/licenseHandler.ts +109 -92
- package/langwatch/ee/licensing/mintedPlan.ts +57 -0
- package/langwatch/ee/licensing/ossBaselineFloor.ts +45 -0
- package/langwatch/ee/licensing/planInfo.ts +0 -13
- package/langwatch/ee/licensing/planMapping.ts +0 -13
- package/langwatch/ee/licensing/planTemplates.ts +8 -42
- package/langwatch/ee/licensing/types.ts +24 -29
- package/langwatch/ee/licensing/validation.ts +13 -1
- package/langwatch/ee/scim/__tests__/scim-token.service.unit.test.ts +110 -0
- package/langwatch/ee/scim/__tests__/scim.costCenter.integration.test.ts +171 -0
- package/langwatch/ee/scim/__tests__/scim.service.unit.test.ts +415 -0
- package/langwatch/ee/scim/routes.ts +585 -0
- package/langwatch/ee/scim/scim-group.service.ts +465 -0
- package/langwatch/ee/scim/scim-role-resolver.ts +48 -0
- package/langwatch/ee/scim/scim-role-resolver.unit.test.ts +93 -0
- package/langwatch/ee/scim/scim-token.service.ts +71 -0
- package/langwatch/ee/scim/scim.service.ts +554 -0
- package/langwatch/ee/scim/scim.types.ts +149 -0
- package/langwatch/ee/scim/webhooks.ts +170 -0
- package/langwatch/ee/sso/__tests__/fallbackName.test.ts +142 -0
- package/langwatch/ee/sso/__tests__/matching.test.ts +126 -0
- package/langwatch/ee/sso/__tests__/parseIssuerUrl.test.ts +59 -0
- package/langwatch/ee/sso/__tests__/sso-gate.test.ts +459 -0
- package/langwatch/ee/sso/__tests__/sso-license.repository.test.ts +53 -0
- package/langwatch/ee/sso/__tests__/ssoPathGate.test.ts +182 -0
- package/langwatch/ee/sso/__tests__/ssoRouteTableCanary.test.ts +186 -0
- package/langwatch/ee/sso/matching.ts +48 -0
- package/langwatch/ee/sso/providers.ts +271 -0
- package/langwatch/ee/sso/sso-gate.ts +294 -0
- package/langwatch/ee/sso/sso-license.repository.ts +47 -0
- package/langwatch/ee/sso/ssoPathGate.ts +127 -0
- package/langwatch/package.json +1 -1
- package/langwatch/prisma/migrations/20260802120000_organization_user_disabled_at/migration.sql +7 -0
- package/langwatch/prisma/schema.prisma +8 -0
- package/langwatch/scripts/check-feature-parity.ts +0 -4
- package/langwatch/src/__tests__/noBinarySourceFiles.unit.test.ts +56 -0
- package/langwatch/src/app/api/agents/[[...route]]/app.ts +0 -2
- package/langwatch/src/app/api/agents/__tests__/agents-rest-api.integration.test.ts +0 -22
- package/langwatch/src/app/api/dashboards/[[...route]]/app.ts +0 -2
- package/langwatch/src/app/api/dashboards/__tests__/dashboard-rest-api.integration.test.ts +0 -18
- package/langwatch/src/app/api/dataset/[[...route]]/app.ts +0 -33
- package/langwatch/src/app/api/dataset/__tests__/dataset-rest-api.integration.test.ts +0 -24
- package/langwatch/src/app/api/dataset/__tests__/dataset-upload-api.integration.test.ts +0 -25
- package/langwatch/src/app/api/evaluators/[[...route]]/app.v1.ts +0 -2
- package/langwatch/src/app/api/export/scenario-runs/[[...route]]/app.ts +250 -0
- package/langwatch/src/app/api/export/scenario-runs/__tests__/scenario-run-export-route.integration.test.ts +336 -0
- package/langwatch/src/app/api/graphs/[[...route]]/app.ts +0 -2
- package/langwatch/src/app/api/middleware/__tests__/error-handler.unit.test.ts +4 -4
- package/langwatch/src/app/api/middleware/index.ts +0 -1
- package/langwatch/src/app/api/monitors/[[...route]]/app.ts +0 -2
- package/langwatch/src/app/api/projects/[[...route]]/app.ts +28 -8
- package/langwatch/src/app/api/prompts/[[...route]]/app.v1.ts +0 -2
- package/langwatch/src/app/api/scenario-events/[[...route]]/app.ts +0 -5
- package/langwatch/src/app/api/scenarios/[[...route]]/app.v1.ts +0 -2
- package/langwatch/src/app/api/shared/errors.ts +14 -0
- package/langwatch/src/app/api/simulation-runs/__tests__/simulation-run-platform-url.integration.test.ts +6 -3
- package/langwatch/src/app/api/suites/[[...route]]/app.ts +0 -2
- package/langwatch/src/app/api/teams/[[...route]]/app.ts +22 -1
- package/langwatch/src/app/api/teams/__tests__/teams-rest-api.integration.test.ts +146 -0
- package/langwatch/src/app/api/traces/[[...route]]/app.v1.ts +114 -0
- package/langwatch/src/app/api/triggers/[[...route]]/app.ts +0 -2
- package/langwatch/src/components/AddMembersForm.tsx +25 -5
- package/langwatch/src/components/AddOrEditDatasetDrawer.tsx +1 -9
- package/langwatch/src/components/ComparisonLeaderboardDrawer.tsx +496 -0
- package/langwatch/src/components/LicenseStatus.tsx +14 -16
- package/langwatch/src/components/__tests__/ComparisonLeaderboardDrawer.gate.integration.test.tsx +146 -0
- package/langwatch/src/components/__tests__/LicenseStatus.integration.test.tsx +129 -0
- package/langwatch/src/components/__tests__/UpgradeModal.integration.test.tsx +358 -68
- package/langwatch/src/components/agents/AgentCodeEditorDrawer.tsx +7 -14
- package/langwatch/src/components/agents/AgentHttpEditorDrawer.tsx +7 -14
- package/langwatch/src/components/agents/WorkflowSelectorDrawer.tsx +1 -15
- package/langwatch/src/components/analytics/DashboardNameDrawer.tsx +20 -26
- package/langwatch/src/components/auth/AuthCard.tsx +41 -0
- package/langwatch/src/components/batch-evaluation-results/BatchEvaluationResults.tsx +72 -0
- package/langwatch/src/components/batch-evaluation-results/BatchEvaluationResultsTable.tsx +109 -2
- package/langwatch/src/components/batch-evaluation-results/ComparisonCharts.tsx +241 -77
- package/langwatch/src/components/batch-evaluation-results/ComparisonLeaderboardChart.tsx +355 -0
- package/langwatch/src/components/batch-evaluation-results/ComparisonTable.tsx +437 -75
- package/langwatch/src/components/batch-evaluation-results/LeaderboardStep.tsx +105 -0
- package/langwatch/src/components/batch-evaluation-results/LeaderboardTrustPanel.tsx +464 -0
- package/langwatch/src/components/batch-evaluation-results/LeaderboardVerdictPanel.tsx +354 -0
- package/langwatch/src/components/batch-evaluation-results/PairwiseLeaderboard.tsx +553 -0
- package/langwatch/src/components/batch-evaluation-results/ParetoScatterChart.tsx +512 -0
- package/langwatch/src/components/batch-evaluation-results/TradeoffSummaryLine.tsx +58 -0
- package/langwatch/src/components/batch-evaluation-results/WinRateChart.tsx +12 -4
- package/langwatch/src/components/batch-evaluation-results/__tests__/ComparisonCharts.filter-overflow.integration.test.tsx +8 -1
- package/langwatch/src/components/batch-evaluation-results/__tests__/ComparisonCharts.leaderboard-gate.integration.test.tsx +192 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/ComparisonCharts.test.tsx +8 -1
- package/langwatch/src/components/batch-evaluation-results/__tests__/ComparisonTable.group-by-metadata.integration.test.tsx +352 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/bootstrapMeanCI.unit.test.ts +98 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/buildAxisLabels.unit.test.ts +134 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/buildPairwiseComparisons.test.ts +95 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/buildTrustChecks.unit.test.ts +551 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/computeBTLeaderboard.test.ts +428 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/computeBandClipping.unit.test.ts +125 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/computeComparability.unit.test.ts +208 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/computeJudgeBiasChecks.unit.test.ts +186 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/computeLeaderboardVerdict.test.ts +288 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/computeParetoDominance.unit.test.ts +599 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/computeSampleAdequacy.unit.test.ts +212 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/computeScoreBarScale.unit.test.ts +104 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/computeVariantMetrics.test.ts +99 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/detectComparisonColumns.test.ts +133 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/formatLeaderboardHeadline.unit.test.ts +252 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/formatTradeoffSummary.unit.test.ts +219 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/leaderboardCache.unit.test.ts +128 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/panelAgreement.unit.test.ts +165 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/paretoScatterPoints.unit.test.ts +95 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/scoreSeparation.unit.test.ts +314 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/variantMetricsSymmetry.unit.test.ts +129 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/verdictSafety.unit.test.ts +438 -0
- package/langwatch/src/components/batch-evaluation-results/__tests__/winMatrixHasPairwiseDetail.unit.test.ts +126 -0
- package/langwatch/src/components/batch-evaluation-results/bootstrapMeanCI.ts +78 -0
- package/langwatch/src/components/batch-evaluation-results/buildPairwiseComparisons.ts +30 -0
- package/langwatch/src/components/batch-evaluation-results/chartAxisLabels.ts +98 -0
- package/langwatch/src/components/batch-evaluation-results/computeBTLeaderboard.ts +814 -0
- package/langwatch/src/components/batch-evaluation-results/computeComparability.ts +305 -0
- package/langwatch/src/components/batch-evaluation-results/computeJudgeBiasChecks.ts +175 -0
- package/langwatch/src/components/batch-evaluation-results/computeLeaderboardVerdict.ts +277 -0
- package/langwatch/src/components/batch-evaluation-results/computeParetoDominance.ts +283 -0
- package/langwatch/src/components/batch-evaluation-results/computeSampleAdequacy.ts +91 -0
- package/langwatch/src/components/batch-evaluation-results/computeVariantMetrics.ts +236 -0
- package/langwatch/src/components/batch-evaluation-results/computeWinMatrixShape.ts +61 -0
- package/langwatch/src/components/batch-evaluation-results/formatLeaderboardHeadline.ts +139 -0
- package/langwatch/src/components/batch-evaluation-results/formatTradeoffSummary.ts +126 -0
- package/langwatch/src/components/batch-evaluation-results/mulberry32.ts +19 -0
- package/langwatch/src/components/batch-evaluation-results/scoreSeparation.ts +102 -0
- package/langwatch/src/components/batch-evaluation-results/types.ts +82 -9
- package/langwatch/src/components/batch-evaluation-results/useBTLeaderboard.ts +137 -0
- package/langwatch/src/components/batch-evaluation-results/usePairwiseSort.ts +78 -0
- package/langwatch/src/components/batch-evaluation-results/useResultsGrouping.ts +119 -0
- package/langwatch/src/components/batch-evaluation-results/useShowComparisonLeaderboard.ts +43 -0
- package/langwatch/src/components/batch-evaluation-results/useVariantMetrics.ts +106 -0
- package/langwatch/src/components/checks/DynamicZodForm.tsx +9 -0
- package/langwatch/src/components/drawerRegistry.ts +5 -0
- package/langwatch/src/components/evaluations/OnlineEvaluationDrawer.tsx +13 -20
- package/langwatch/src/components/evaluators/EvaluatorEditorShared.tsx +16 -20
- package/langwatch/src/components/evaluators/WorkflowSelectorForEvaluatorDrawer.tsx +1 -15
- package/langwatch/src/components/experiments/CreateExperimentButton.tsx +13 -17
- package/langwatch/src/components/license/LicenseDetailsCard.tsx +72 -23
- package/langwatch/src/components/license/LicenseGeneratorForm.tsx +0 -60
- package/langwatch/src/components/license/LicenseLoadError.tsx +23 -0
- package/langwatch/src/components/license/OverSeatsCallout.tsx +68 -0
- package/langwatch/src/components/license/ResourceLimitsDisplay.tsx +0 -74
- package/langwatch/src/components/license/__tests__/OverSeatsCallout.integration.test.tsx +56 -0
- package/langwatch/src/components/license/__tests__/ResourceLimitsDisplay.unit.test.ts +8 -135
- package/langwatch/src/components/license/__tests__/licenseStatusUtils.unit.test.ts +68 -13
- package/langwatch/src/components/license/__tests__/planFormDefaults.unit.test.ts +11 -11
- package/langwatch/src/components/license/__tests__/useLicenseActions.integration.test.ts +185 -0
- package/langwatch/src/components/license/licenseStatusUtils.ts +21 -17
- package/langwatch/src/components/license/planFormDefaults.ts +3 -18
- package/langwatch/src/components/license/useLicenseActions.ts +26 -3
- package/langwatch/src/components/me/PersonalRecentTracesTable.tsx +4 -0
- package/langwatch/src/components/ops/projections/BulkReplayWizard.tsx +23 -1
- package/langwatch/src/components/plans/PlansComparisonPage.tsx +18 -0
- package/langwatch/src/components/plans/__tests__/PlansComparisonPage.integration.test.tsx +17 -0
- package/langwatch/src/components/plans/__tests__/planCurrentResolver.unit.test.ts +19 -0
- package/langwatch/src/components/plans/planCurrentResolver.ts +13 -0
- package/langwatch/src/components/projects/CreateProjectDrawer.tsx +36 -40
- package/langwatch/src/components/prompts/PromptEditorDrawer.tsx +9 -15
- package/langwatch/src/components/prompts/__tests__/PromptEditorDrawer.test.tsx +0 -1
- package/langwatch/src/components/scenarios/ScenarioCreateModal.tsx +3 -5
- package/langwatch/src/components/scenarios/ScenarioFormDrawer.tsx +2 -32
- package/langwatch/src/components/settings/CreateTeamDrawer.tsx +31 -35
- package/langwatch/src/components/settings/EnterpriseCapabilitiesSection.tsx +236 -0
- package/langwatch/src/components/settings/InfoWithoutSelecting.tsx +25 -0
- package/langwatch/src/components/settings/OrganizationUserRoleField.tsx +21 -2
- package/langwatch/src/components/settings/__tests__/EnterpriseCapabilitiesSection.integration.test.tsx +173 -0
- package/langwatch/src/components/settings/__tests__/seatTypeCopy.unit.test.ts +94 -0
- package/langwatch/src/components/settings/__tests__/seatTypeExplanation.integration.test.tsx +126 -0
- package/langwatch/src/components/settings/seatTypeCopy.ts +29 -0
- package/langwatch/src/components/subscription/SubscriptionPage.tsx +0 -1
- package/langwatch/src/components/subscription/__tests__/subscription-test-setup.ts +0 -13
- package/langwatch/src/components/subscription/billing-plans.ts +3 -12
- package/langwatch/src/components/suites/RunHistoryFilters.tsx +55 -3
- package/langwatch/src/components/suites/RunHistoryPanel.tsx +44 -0
- package/langwatch/src/components/suites/ScenarioRunExportDialog.tsx +92 -0
- package/langwatch/src/components/suites/SuiteFormDrawer.tsx +4 -20
- package/langwatch/src/components/suites/__tests__/AllRunsPanel.integration.test.tsx +3 -0
- package/langwatch/src/components/suites/__tests__/RunHistoryEmptyState.integration.test.tsx +45 -0
- package/langwatch/src/components/suites/__tests__/RunHistoryLiveWindow.integration.test.tsx +135 -0
- package/langwatch/src/components/suites/__tests__/ScenarioRunExportUi.integration.test.tsx +227 -0
- package/langwatch/src/components/suites/__tests__/SuiteDetailPanel.integration.test.tsx +3 -0
- package/langwatch/src/components/suites/run-history-transforms.ts +1 -28
- package/langwatch/src/components/suites/useExportScenarioRuns.ts +333 -0
- package/langwatch/src/components/suites/useRunHistoryPagination.ts +14 -0
- package/langwatch/src/components/upgrade-modal/LimitContent.tsx +3 -154
- package/langwatch/src/env-create.mjs +4 -0
- package/langwatch/src/features/errors/logic/codes.ts +2 -1
- package/langwatch/src/features/errors/logic/presentation.ts +8 -3
- package/langwatch/src/features/langy/__tests__/presentLangyToolError.unit.test.ts +1 -1
- package/langwatch/src/features/langy/logic/langyToolFailure.ts +4 -7
- package/langwatch/src/features/traces-v2/components/TraceDrawer/conversationView/TurnSteps.tsx +1 -1
- package/langwatch/src/features/traces-v2/components/TraceDrawer/drawerHeader/DrawerHeader.tsx +34 -0
- package/langwatch/src/features/traces-v2/components/TraceDrawer/drawerHeader/__tests__/utils.unit.test.ts +74 -0
- package/langwatch/src/features/traces-v2/components/TraceDrawer/terminalView/TerminalView.tsx +57 -3
- package/langwatch/src/features/traces-v2/components/TraceDrawer/terminalView/__tests__/TerminalView.integration.test.tsx +43 -3
- package/langwatch/src/features/traces-v2/components/TraceTable/columns.ts +7 -0
- package/langwatch/src/features/traces-v2/components/TraceTable/registry/cells/trace/ContextSizeCell.tsx +48 -0
- package/langwatch/src/features/traces-v2/components/TraceTable/registry/cells/trace/__tests__/ContextSizeCell.integration.test.tsx +57 -0
- package/langwatch/src/features/traces-v2/components/TraceTable/registry/cells/trace/index.ts +2 -0
- package/langwatch/src/features/traces-v2/components/shared/TokenBreakdownTooltip.tsx +22 -0
- package/langwatch/src/features/traces-v2/lens/capabilities.ts +2 -0
- package/langwatch/src/features/traces-v2/types/trace.ts +2 -0
- package/langwatch/src/hooks/__tests__/useLicenseEnforcement.unit.test.tsx +18 -30
- package/langwatch/src/hooks/__tests__/useOrganizationTeamProject.personal-workspace.integration.test.tsx +30 -0
- package/langwatch/src/hooks/__tests__/usePostHogIdentify.unit.test.ts +3 -3
- package/langwatch/src/hooks/useMemberDisableAction.ts +53 -0
- package/langwatch/src/hooks/useOrganizationTeamProject.ts +8 -7
- package/langwatch/src/optimization_studio/components/Evaluate.tsx +39 -46
- package/langwatch/src/optimization_studio/components/workflow/NewWorkflowForm.tsx +22 -30
- package/langwatch/src/pages/[project]/analytics/custom/index.tsx +1 -6
- package/langwatch/src/pages/api/experiment/__tests__/init.unit.test.ts +2 -87
- package/langwatch/src/pages/api/experiment/init.ts +7 -60
- package/langwatch/src/pages/auth/__tests__/forgot-password.integration.test.tsx +38 -3
- package/langwatch/src/pages/auth/forgot-password.tsx +19 -23
- package/langwatch/src/pages/auth/reset-password.tsx +2 -23
- package/langwatch/src/pages/settings/__tests__/authentication.integration.test.tsx +7 -0
- package/langwatch/src/pages/settings/__tests__/team-settings.refused-save.integration.test.tsx +253 -0
- package/langwatch/src/pages/settings/authentication.tsx +7 -2
- package/langwatch/src/pages/settings/license.tsx +4 -3
- package/langwatch/src/pages/settings/members.tsx +126 -34
- package/langwatch/src/pages/settings/teams/[team].tsx +73 -20
- package/langwatch/src/pages/settings/usage.tsx +7 -8
- package/langwatch/src/prompts/prompt-playground/components/sidebar/AddPromptButton.tsx +3 -8
- package/langwatch/src/server/api/routers/__tests__/annotation.tenant-references.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/apiKey.myBindings.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/apiKey.nameById.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/apiKey.restricted-permissions.unit.test.ts +4 -1
- package/langwatch/src/server/api/routers/__tests__/automations.router.integration.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/bugReports.gating.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/enterprise-guards.integration.test.ts +0 -4
- package/langwatch/src/server/api/routers/__tests__/evaluators.tenant-workflow.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/graphs.tenant-dashboard.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/langy.turnErrors.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/langyGithub.access-order.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/license.integration.test.ts +1 -17
- package/langwatch/src/server/api/routers/__tests__/licenseEnforcement.reportLimitBlocked.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/monitors.copy.integration.test.ts +1 -11
- package/langwatch/src/server/api/routers/__tests__/organization.acceptInvite.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/organization.setMemberDisabled.integration.test.ts +306 -0
- package/langwatch/src/server/api/routers/__tests__/personal-workspace-invariants.integration.test.ts +794 -0
- package/langwatch/src/server/api/routers/__tests__/plan.getActivePlan.integration.test.ts +0 -1
- package/langwatch/src/server/api/routers/__tests__/project.getHasFirstMessage.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/project.regenerateApiKey.unit.test.ts +2 -2
- package/langwatch/src/server/api/routers/__tests__/prompts.copy.integration.test.ts +0 -58
- package/langwatch/src/server/api/routers/__tests__/prompts.duplicate.integration.test.ts +0 -54
- package/langwatch/src/server/api/routers/__tests__/publicEnv.test.ts +60 -0
- package/langwatch/src/server/api/routers/__tests__/secrets.reserved-names.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/team.update.multi-binding.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/traces.4991-full-resolution.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/tracesV2.transcript-read.unit.test.ts +121 -0
- package/langwatch/src/server/api/routers/__tests__/translate.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/user.changePassword.unit.test.ts +105 -0
- package/langwatch/src/server/api/routers/__tests__/user.deactivation.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/__tests__/user.register.unit.test.ts +67 -5
- package/langwatch/src/server/api/routers/__tests__/workflows.generateCommitMessage.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/agents.ts +0 -6
- package/langwatch/src/server/api/routers/analytics/__tests__/dataForFilter.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/apiKey.ts +1 -1
- package/langwatch/src/server/api/routers/automations.ts +0 -4
- package/langwatch/src/server/api/routers/bugReports.ts +1 -1
- package/langwatch/src/server/api/routers/copyEvaluatorToProject.ts +2 -5
- package/langwatch/src/server/api/routers/dashboards.ts +0 -2
- package/langwatch/src/server/api/routers/dataset.ts +0 -9
- package/langwatch/src/server/api/routers/emailSuppression.ts +1 -1
- package/langwatch/src/server/api/routers/evaluators.ts +0 -4
- package/langwatch/src/server/api/routers/experiments.ts +0 -14
- package/langwatch/src/server/api/routers/export.ts +65 -24
- package/langwatch/src/server/api/routers/graphs.ts +0 -2
- package/langwatch/src/server/api/routers/group.ts +6 -0
- package/langwatch/src/server/api/routers/langyEgress.ts +1 -1
- package/langwatch/src/server/api/routers/langyGithub.ts +1 -1
- package/langwatch/src/server/api/routers/license.ts +44 -36
- package/langwatch/src/server/api/routers/licenseEnforcement.ts +0 -21
- package/langwatch/src/server/api/routers/modelProviders.ts +1 -1
- package/langwatch/src/server/api/routers/monitors.ts +0 -6
- package/langwatch/src/server/api/routers/onboarding/__tests__/onboarding.personal-workspace.integration.test.ts +8 -15
- package/langwatch/src/server/api/routers/onboarding/onboarding.router.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/onboarding/setProductInterest.integration.test.ts +1 -1
- package/langwatch/src/server/api/routers/ops.ts +2 -0
- package/langwatch/src/server/api/routers/organization.ts +67 -1
- package/langwatch/src/server/api/routers/project.ts +74 -36
- package/langwatch/src/server/api/routers/prompts/prompts.trpc-router.ts +0 -10
- package/langwatch/src/server/api/routers/publicEnv.ts +7 -3
- package/langwatch/src/server/api/routers/scenarios/__tests__/simulation-runner.router.unit.test.ts +1 -1
- package/langwatch/src/server/api/routers/scenarios/scenario-crud.router.ts +0 -4
- package/langwatch/src/server/api/routers/scimToken.ts +1 -1
- package/langwatch/src/server/api/routers/suites/suite.router.ts +0 -3
- package/langwatch/src/server/api/routers/team.ts +48 -39
- package/langwatch/src/server/api/routers/tracesV2.schemas.ts +2 -0
- package/langwatch/src/server/api/routers/tracesV2.ts +76 -20
- package/langwatch/src/server/api/routers/user.ts +16 -6
- package/langwatch/src/server/api/routers/workflows.ts +0 -7
- package/langwatch/src/server/api/trpc.ts +1 -1
- package/langwatch/src/server/api-key/__tests__/api-key.service.legacy-ceiling.unit.test.ts +379 -0
- package/langwatch/src/server/api-key/__tests__/api-key.service.safety.unit.test.ts +3 -0
- package/langwatch/src/server/api-key/__tests__/api-key.service.unit.test.ts +3 -0
- package/langwatch/src/server/api-key/api-key.service.ts +63 -22
- package/langwatch/src/server/api-router.ts +5 -3
- package/langwatch/src/server/app-layer/__tests__/tracing.unit.test.ts +142 -0
- package/langwatch/src/server/app-layer/clients/clickhouse/__tests__/cold-scan-detector.coverage.unit.test.ts +2 -0
- package/langwatch/src/server/app-layer/clients/clickhouse/windowed-read.ts +15 -0
- package/langwatch/src/server/app-layer/dependencies.ts +8 -0
- package/langwatch/src/server/app-layer/evaluations/repositories/__tests__/evaluation-run.resolver-window.unit.test.ts +103 -0
- package/langwatch/src/server/app-layer/evaluations/repositories/evaluation-run.clickhouse.repository.ts +35 -1
- package/langwatch/src/server/app-layer/groups/group.service.ts +37 -0
- package/langwatch/src/server/app-layer/groups/repositories/group.prisma.repository.ts +9 -0
- package/langwatch/src/server/app-layer/groups/repositories/group.repository.ts +8 -0
- package/langwatch/src/server/app-layer/langy/__tests__/langyConversationMemory.unit.test.ts +1 -1
- package/langwatch/src/server/app-layer/langy/__tests__/langyTurnContext.unit.test.ts +0 -0
- package/langwatch/src/server/app-layer/langy/langyConversationMemory.ts +1 -1
- package/langwatch/src/server/app-layer/logs/repositories/__tests__/canonical-log-record.clickhouse.repository.unit.test.ts +54 -0
- package/langwatch/src/server/app-layer/logs/repositories/canonical-log-record.clickhouse.repository.ts +29 -12
- package/langwatch/src/server/app-layer/ops/__tests__/integration/pending-counter-reconcile.integration.test.ts +240 -0
- package/langwatch/src/server/app-layer/ops/__tests__/integration/replay-full-rebuild.integration.test.ts +390 -0
- package/langwatch/src/server/app-layer/ops/__tests__/replay.service.unit.test.ts +105 -1
- package/langwatch/src/server/app-layer/ops/replay.service.ts +47 -0
- package/langwatch/src/server/app-layer/ops/repositories/__tests__/queue.redis.repository.reconcile-pending.unit.test.ts +752 -0
- package/langwatch/src/server/app-layer/ops/repositories/queue.redis.repository.ts +597 -48
- package/langwatch/src/server/app-layer/organizations/__tests__/organization.service.unit.test.ts +1 -0
- package/langwatch/src/server/app-layer/organizations/organization.service.ts +16 -0
- package/langwatch/src/server/app-layer/organizations/repositories/organization.prisma.repository.ts +63 -2
- package/langwatch/src/server/app-layer/organizations/repositories/organization.repository.ts +15 -0
- package/langwatch/src/server/app-layer/presets.ts +27 -13
- package/langwatch/src/server/app-layer/projects/__tests__/project-service-update.unit.test.ts +100 -0
- package/langwatch/src/server/app-layer/projects/project.service.ts +145 -6
- package/langwatch/src/server/app-layer/projects/repositories/project.prisma.repository.ts +2 -16
- package/langwatch/src/server/app-layer/projects/repositories/project.repository.ts +2 -13
- package/langwatch/src/server/app-layer/simulations/__tests__/scenario-run-export-sweep.integration.test.ts +370 -0
- package/langwatch/src/server/app-layer/simulations/repositories/simulation.clickhouse.repository.ts +302 -7
- package/langwatch/src/server/app-layer/simulations/repositories/simulation.repository.ts +62 -0
- package/langwatch/src/server/app-layer/subscription/__tests__/composite-plan-provider.unit.test.ts +2 -28
- package/langwatch/src/server/app-layer/subscription/__tests__/self-hosted-plan-provider.unit.test.ts +101 -0
- package/langwatch/src/server/app-layer/subscription/self-hosted-plan-provider.ts +34 -0
- package/langwatch/src/server/app-layer/teams/team.service.ts +27 -0
- package/langwatch/src/server/app-layer/traces/__tests__/claude-code-span-enrichment.unit.test.ts +179 -0
- package/langwatch/src/server/app-layer/traces/__tests__/coding-agent-span-filter.unit.test.ts +50 -0
- package/langwatch/src/server/app-layer/traces/__tests__/coding-agent-transcript.derivation.unit.test.ts +331 -0
- package/langwatch/src/server/app-layer/traces/__tests__/trace-io-extraction.service.unit.test.ts +20 -0
- package/langwatch/src/server/app-layer/traces/canonicalisation/__tests__/structuredIO.test.ts +22 -1
- package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/__tests__/claudeCode.unit.test.ts +217 -0
- package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/__tests__/codex.unit.test.ts +133 -0
- package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/__tests__/vercel.unit.test.ts +79 -0
- package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/_constants.ts +9 -0
- package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/claudeCode.ts +429 -6
- package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/codex.ts +158 -70
- package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/vercel.ts +26 -8
- package/langwatch/src/server/app-layer/traces/claude-code-span-enrichment.ts +89 -1
- package/langwatch/src/server/app-layer/traces/coding-agent-span-filter.ts +23 -1
- package/langwatch/src/server/app-layer/traces/coding-agent-transcript.derivation.ts +330 -75
- package/langwatch/src/server/app-layer/traces/repositories/__tests__/span-storage.resolver-window.unit.test.ts +108 -0
- package/langwatch/src/server/app-layer/traces/repositories/__tests__/trace-list.clickhouse.repository.integration.test.ts +31 -2
- package/langwatch/src/server/app-layer/traces/repositories/span-storage.clickhouse.repository.ts +36 -1
- package/langwatch/src/server/app-layer/traces/repositories/trace-list.clickhouse.repository.ts +7 -0
- package/langwatch/src/server/app-layer/traces/trace-io-extraction.service.ts +8 -1
- package/langwatch/src/server/app-layer/traces/trace-list.service.ts +10 -0
- package/langwatch/src/server/app-layer/tracing.ts +47 -0
- package/langwatch/src/server/app-layer/usage/usage.service.ts +0 -80
- package/langwatch/src/server/better-auth/__tests__/hooks.test.ts +72 -0
- package/langwatch/src/server/better-auth/__tests__/index.test.ts +31 -9
- package/langwatch/src/server/better-auth/__tests__/resetRecoversOauthUser.test.ts +128 -0
- package/langwatch/src/server/better-auth/__tests__/ssoGate.hook.test.ts +321 -0
- package/langwatch/src/server/better-auth/hooks.ts +46 -1
- package/langwatch/src/server/better-auth/index.ts +123 -284
- package/langwatch/src/server/clickhouse/__tests__/replicatedEngineGuard.unit.test.ts +301 -0
- package/langwatch/src/server/clickhouse/goose.ts +8 -0
- package/langwatch/src/server/clickhouse/migrations/00064_replicate_gateway_budget_scope_totals.sql +291 -0
- package/langwatch/src/server/clickhouse/migrations/00065_replicate_trace_analytics_rollup.sql +143 -0
- package/langwatch/src/server/clickhouse/migrations/00066_replicate_evaluation_analytics_rollup.sql +115 -0
- package/langwatch/src/server/datasets/__tests__/dataset-chunking.unit.test.ts +0 -0
- package/langwatch/src/server/evaluations/evaluators.generated.ts +83 -63
- package/langwatch/src/server/event-sourcing/pipeline/__tests__/staticBuilder.validations.unit.test.ts +46 -0
- package/langwatch/src/server/event-sourcing/pipeline/processManagerDefinition.ts +14 -0
- package/langwatch/src/server/event-sourcing/pipeline/staticBuilder.ts +8 -0
- package/langwatch/src/server/event-sourcing/pipelines/automations/subscribers/__tests__/graphTriggerActivity.groupKey.unit.test.ts +55 -0
- package/langwatch/src/server/event-sourcing/pipelines/automations/subscribers/graphTriggerActivity.subscriber.ts +23 -0
- package/langwatch/src/server/event-sourcing/pipelines/blob-maintenance/process-manager/blobCleanup.process.ts +6 -4
- package/langwatch/src/server/event-sourcing/pipelines/coding-agent-processing/schemas/constants.ts +6 -4
- package/langwatch/src/server/event-sourcing/pipelines/evaluation-processing/pipeline.ts +9 -1
- package/langwatch/src/server/event-sourcing/pipelines/log-processing/__tests__/logCommandCoalescing.unit.test.ts +174 -0
- package/langwatch/src/server/event-sourcing/pipelines/log-processing/pipeline.ts +7 -0
- package/langwatch/src/server/event-sourcing/pipelines/log-processing/schemas/constants.ts +19 -0
- package/langwatch/src/server/event-sourcing/pipelines/metric-processing/__tests__/metricCommandCoalescing.unit.test.ts +137 -0
- package/langwatch/src/server/event-sourcing/pipelines/metric-processing/pipeline.ts +7 -0
- package/langwatch/src/server/event-sourcing/pipelines/metric-processing/schemas/constants.ts +19 -0
- package/langwatch/src/server/event-sourcing/pipelines/trace-processing/__tests__/aiSdkStructuredOutput.integration.test.ts +199 -0
- package/langwatch/src/server/event-sourcing/pipelines/trace-processing/pipeline.ts +9 -1
- package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/__tests__/spanStorageGroupKey.unit.test.ts +98 -0
- package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/__tests__/traceSummaryClaudeCodeLift.unit.test.ts +187 -1
- package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/spanStorage.mapProjection.ts +10 -1
- package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/spanStorageGroupKey.ts +63 -0
- package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/traceSummary.foldProjection.ts +85 -18
- package/langwatch/src/server/event-sourcing/pipelines/trace-processing/reactors/__tests__/projectMetadata.groupKey.unit.test.ts +140 -0
- package/langwatch/src/server/event-sourcing/pipelines/trace-processing/reactors/projectMetadata.reactor.ts +23 -0
- package/langwatch/src/server/event-sourcing/projections/__tests__/projectionRouter.mapReactorCollapse.unit.test.ts +260 -0
- package/langwatch/src/server/event-sourcing/projections/foldProjection.types.ts +6 -3
- package/langwatch/src/server/event-sourcing/projections/global/__tests__/billingMeterDispatch.groupKey.unit.test.ts +139 -0
- package/langwatch/src/server/event-sourcing/projections/global/billingMeterDispatch.reactor.ts +27 -1
- package/langwatch/src/server/event-sourcing/projections/projectionRouter.ts +58 -41
- package/langwatch/src/server/event-sourcing/queues/groupQueue/__tests__/blobSweeper.integration.test.ts +149 -0
- package/langwatch/src/server/event-sourcing/queues/groupQueue/__tests__/groupQueue.decodeDrop.integration.test.ts +12 -1
- package/langwatch/src/server/event-sourcing/queues/groupQueue/__tests__/groupQueue.integration.test.ts +45 -0
- package/langwatch/src/server/event-sourcing/queues/groupQueue/blobSweeper.ts +130 -22
- package/langwatch/src/server/event-sourcing/queues/groupQueue/scripts.ts +46 -0
- package/langwatch/src/server/event-sourcing/replay/__tests__/traceAnalyticsRollupReplay.integration.test.ts +356 -0
- package/langwatch/src/server/event-sourcing/replay/replayService.ts +7 -0
- package/langwatch/src/server/event-sourcing/services/queues/__tests__/queueManager.commandGroupKey.test.ts +114 -2
- package/langwatch/src/server/event-sourcing/services/queues/queueManager.ts +13 -9
- package/langwatch/src/server/experiments-v3/execution/__tests__/buildTargetMetadata.unit.test.ts +93 -0
- package/langwatch/src/server/experiments-v3/execution/__tests__/orchestratorStorageDispatch.unit.test.ts +57 -0
- package/langwatch/src/server/experiments-v3/execution/__tests__/resultMapper.test.ts +180 -13
- package/langwatch/src/server/experiments-v3/execution/orchestrator.ts +40 -8
- package/langwatch/src/server/experiments-v3/execution/resultMapper.ts +81 -22
- package/langwatch/src/server/experiments-v3/execution/types.ts +8 -0
- package/langwatch/src/server/export/scenario-runs/__tests__/csv-serializer.unit.test.ts +732 -0
- package/langwatch/src/server/export/scenario-runs/__tests__/scenario-run-export.service.unit.test.ts +303 -0
- package/langwatch/src/server/export/scenario-runs/csv-serializer.ts +383 -0
- package/langwatch/src/server/export/scenario-runs/errors.ts +44 -0
- package/langwatch/src/server/export/scenario-runs/scenario-run-export.service.ts +200 -0
- package/langwatch/src/server/export/scenario-runs/types.ts +64 -0
- package/langwatch/src/server/featureFlag/frontendFeatureFlags.ts +4 -0
- package/langwatch/src/server/featureFlag/registry.ts +7 -0
- package/langwatch/src/server/gateway/virtualKey.service.ts +2 -2
- package/langwatch/src/server/license-enforcement/__tests__/constants.unit.test.ts +2 -10
- package/langwatch/src/server/license-enforcement/__tests__/license-enforcement.repository.integration.test.ts +17 -194
- package/langwatch/src/server/license-enforcement/__tests__/license-enforcement.repository.unit.test.ts +3 -301
- package/langwatch/src/server/license-enforcement/__tests__/license-enforcement.service.unit.test.ts +51 -137
- package/langwatch/src/server/license-enforcement/__tests__/license-limit-guard.unit.test.ts +46 -13
- package/langwatch/src/server/license-enforcement/__tests__/usage-stats.service.unit.test.ts +1 -3
- package/langwatch/src/server/license-enforcement/constants.ts +0 -26
- package/langwatch/src/server/license-enforcement/index.ts +0 -5
- package/langwatch/src/server/license-enforcement/license-enforcement.repository.ts +4 -227
- package/langwatch/src/server/license-enforcement/license-enforcement.service.ts +0 -52
- package/langwatch/src/server/license-enforcement/types.ts +8 -17
- package/langwatch/src/server/license-enforcement/usage-stats.service.ts +0 -32
- package/langwatch/src/server/modelProviders/__tests__/governanceSignup.providerScope.integration.test.ts +1 -1
- package/langwatch/src/server/rbac/__tests__/apiKeyCeilingStaleness.unit.test.ts +5 -0
- package/langwatch/src/server/rbac/__tests__/role-binding-resolver.ceiling.unit.test.ts +108 -3
- package/langwatch/src/server/rbac/role-binding-resolver.ts +147 -1
- package/langwatch/src/server/role/__tests__/role-service-rolebinding.unit.test.ts +2 -0
- package/langwatch/src/server/role/role.service.ts +15 -1
- package/langwatch/src/server/role-bindings/__tests__/role-binding.service.tenant.unit.test.ts +2 -0
- package/langwatch/src/server/role-bindings/personal-team-scope.ts +105 -0
- package/langwatch/src/server/role-bindings/role-binding.service.ts +10 -2
- package/langwatch/src/server/routes/__tests__/github-langy-install.integration.test.ts +1 -1
- package/langwatch/src/server/routes/auth.ts +6 -1
- package/langwatch/src/server/routes/github-langy.ts +1 -1
- package/langwatch/src/server/scenarios/__tests__/scenario-archive.integration.test.ts +11 -15
- package/langwatch/src/server/scenarios/scenario-run-category.ts +48 -0
- package/langwatch/src/server/stored-objects/__tests__/coerce-content-to-array.unit.test.ts +0 -0
- package/langwatch/src/server/stored-objects/__tests__/scenario-events-ingest.integration.test.ts +2 -6
- package/langwatch/src/server/teams/team.service.ts +14 -1
- package/langwatch/src/server/tracer/types.ts +3 -0
- package/langwatch/src/server/traces/__tests__/trace-service-claude-enrichment.unit.test.ts +85 -0
- package/langwatch/src/server/traces/mappers/__tests__/trace-summary.mapper.test.ts +106 -0
- package/langwatch/src/server/traces/mappers/trace-summary.mapper.ts +59 -0
- package/langwatch/src/server/traces/projection/catalog.ts +3 -0
- package/langwatch/src/server/traces/trace.service.ts +21 -1
- package/langwatch/src/server/workers/__tests__/livenessThread.unit.test.ts +133 -0
- package/langwatch/src/server/workers/startWorkers.ts +250 -29
- package/langwatch/src/utils/__tests__/api.unit.test.ts +15 -15
- package/langwatch/src/utils/constants.ts +1 -0
- package/langwatch/src/utils/lambdaFetch.ts +0 -0
- package/langwatch/test-setup.ts +9 -0
- package/mcp-server/dist/chunk-FMQIE5DL.js +2328 -0
- package/mcp-server/dist/create-mcp-server.js +1 -1
- package/mcp-server/dist/discover-evaluator-schema-HYPFWGNN.js +2191 -0
- package/mcp-server/dist/http-server-UBX7YFXE.js +24466 -0
- package/mcp-server/dist/index.js +49 -33
- package/package.json +1 -1
- package/packages/server/dist/cli.cjs +1 -1
- package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-BeOD83jA.js +0 -2
- package/langwatch/dist/client/assets/AddDatasetRecordDrawer-jHTYLVuB.js +0 -6
- package/langwatch/dist/client/assets/AddOrEditAnnotationScore-DW5VXwj8.js +0 -2
- package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-6ycw-4n0.js +0 -2
- package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-DKQT3n1Q.js +0 -3
- package/langwatch/dist/client/assets/AddParticipants-7HKlJHjI.js +0 -2
- package/langwatch/dist/client/assets/AgentHistoryDrawer-B1kjJyfj.js +0 -2
- package/langwatch/dist/client/assets/AgentHttpEditorDrawer-Dkex2eS8.js +0 -5
- package/langwatch/dist/client/assets/AgentListDrawer-B-ab-fJ_.js +0 -2
- package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-CBUwY7Q0.js +0 -2
- package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-DZr-iX29.js +0 -2
- package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-C1AYXbvP.js +0 -2
- package/langwatch/dist/client/assets/AiGatewayLayout-BFUOyL-l.js +0 -2
- package/langwatch/dist/client/assets/AnnotationsTable-CnwGxhJg.js +0 -2
- package/langwatch/dist/client/assets/AreaChart-BZjKjRMD.js +0 -2
- package/langwatch/dist/client/assets/AutomationDrawer-BTtX7UXo.js +0 -112
- package/langwatch/dist/client/assets/BatchEvaluationSummary-CFBL50E9.js +0 -2
- package/langwatch/dist/client/assets/BudgetEditDrawer-DhNs7V2e.js +0 -2
- package/langwatch/dist/client/assets/CartesianChart-CgGSWzzH.js +0 -54
- package/langwatch/dist/client/assets/CascadeArchiveDialog-BOcl2osO.js +0 -2
- package/langwatch/dist/client/assets/ChartTooltip-BKs8as3o.js +0 -4
- package/langwatch/dist/client/assets/ChatWindow-B-UHoZDM.js +0 -5
- package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-jdmrD4H5.js +0 -9
- package/langwatch/dist/client/assets/CodexCodingDefaultsAsk-CKLyE8Ty.js +0 -2
- package/langwatch/dist/client/assets/ColorfulBlockIcons-Ctm_Gy50.js +0 -6
- package/langwatch/dist/client/assets/ColumnTypeIcon-Bh1MI0_N.js +0 -2
- package/langwatch/dist/client/assets/ConfirmDialog-CbyD4lof.js +0 -2
- package/langwatch/dist/client/assets/ContactSalesBlock-3LFiXNMY.js +0 -2
- package/langwatch/dist/client/assets/Conversation-C27uRW0p.js +0 -2
- package/langwatch/dist/client/assets/CopyInput-BJ8UDgiW.js +0 -2
- package/langwatch/dist/client/assets/CopyableInputWithPrefix-DhfQEE7R.js +0 -2
- package/langwatch/dist/client/assets/CreateProjectDrawer-f6ESIihF.js +0 -2
- package/langwatch/dist/client/assets/CreateTeamDrawer-CsScDzr3.js +0 -2
- package/langwatch/dist/client/assets/CustomGraph-DOp8hQmM.js +0 -2
- package/langwatch/dist/client/assets/DashboardLayout-BhHe0vIT.js +0 -96
- package/langwatch/dist/client/assets/DashboardNameDrawer-WriiQpWZ.js +0 -2
- package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-BWcEQSs7.js +0 -2
- package/langwatch/dist/client/assets/DatasetEditorTable-BLbB_Sn-.js +0 -2
- package/langwatch/dist/client/assets/DatasetPickerList-CDIBTAQW.js +0 -2
- package/langwatch/dist/client/assets/DatasetPreviewTable-UuBrd6hv.js +0 -2
- package/langwatch/dist/client/assets/DatasetSelector-DJI4ZOko.js +0 -2
- package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-DfGbPivl.js +0 -2
- package/langwatch/dist/client/assets/DeleteConfirmationDialog-w7WZ7lHP.js +0 -2
- package/langwatch/dist/client/assets/DocsLinks-vsvIA7dY.js +0 -2
- package/langwatch/dist/client/assets/DynamicZodForm-lW0sHL84.js +0 -2
- package/langwatch/dist/client/assets/EditAutomationFilterDrawer-UZGlf7Jf.js +0 -3
- package/langwatch/dist/client/assets/EditModelProviderDrawer-FxE8Cjfj.js +0 -4
- package/langwatch/dist/client/assets/EditProjectDrawer-DvGgMwQg.js +0 -2
- package/langwatch/dist/client/assets/EmojiPickerModal-DOTbYgFl.js +0 -3
- package/langwatch/dist/client/assets/EnterpriseLockedSurface-CM8Sj7hf.js +0 -2
- package/langwatch/dist/client/assets/ErrorBarContext-Bpz3-JDH.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-Bnv6z6m_.js +0 -107
- package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-DPt4B9Ey.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorEditorDrawer-C1OQ89no.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorEditorShared-Dlnmyfw9.js +0 -43
- package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-BFqreRNY.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorListDrawer-B5GkvEER.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorMappingsSection-uZ95zEz_.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorSelection-CLClnlPT.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorSelectionBox-VWh5DBap.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-BTrBItgE.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-0T-zwQQZ.js +0 -2
- package/langwatch/dist/client/assets/ExecutionState-BPNxLkdI.js +0 -2
- package/langwatch/dist/client/assets/FeatureFlagsDrawer-CpSauosT.js +0 -2
- package/langwatch/dist/client/assets/FieldInfoTooltip-BlO6fteF.js +0 -2
- package/langwatch/dist/client/assets/FieldsFilters-B46wbf2n.js +0 -2
- package/langwatch/dist/client/assets/FilterDisplay-BzhnJIar.js +0 -2
- package/langwatch/dist/client/assets/FilterSidebar-CbZF27X2.js +0 -2
- package/langwatch/dist/client/assets/FormatMoney-vCZvmGG1.js +0 -2
- package/langwatch/dist/client/assets/FoundryDrawer-DskBXiS5.js +0 -2
- package/langwatch/dist/client/assets/FullLogo-Db9M_uOO.js +0 -2
- package/langwatch/dist/client/assets/GovernanceLayout-DiDbO74a.js +0 -2
- package/langwatch/dist/client/assets/GraphsLayout-BCvqg3RK.js +0 -2
- package/langwatch/dist/client/assets/GroupBindingInputRow-DQP7aETW.js +0 -2
- package/langwatch/dist/client/assets/GuardrailsDrawer-CHV6LBxp.js +0 -91
- package/langwatch/dist/client/assets/History-hXXVv0A2.js +0 -17
- package/langwatch/dist/client/assets/HorizontalFormControl-lYiaIlzD.js +0 -2
- package/langwatch/dist/client/assets/HoverableBigText-CIhevUVt.js +0 -2
- package/langwatch/dist/client/assets/InstallCliCard-CJKSPLJ_.js +0 -2
- package/langwatch/dist/client/assets/IntegratePaneShell-BpcA5j4P.js +0 -8
- package/langwatch/dist/client/assets/InviteMemberDrawer-DiuPqGoS.js +0 -2
- package/langwatch/dist/client/assets/IsolatedErrorBoundary-CZ4MnYEN.js +0 -2
- package/langwatch/dist/client/assets/LLMModelCostDrawer-D1G0lU1N.js +0 -2
- package/langwatch/dist/client/assets/LangyContextTarget-CIlp_Zew.js +0 -2
- package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-Cd0jbm0t.js +0 -2
- package/langwatch/dist/client/assets/Legend-DY68SncN.js +0 -6
- package/langwatch/dist/client/assets/Line-B2wakHWw.js +0 -2
- package/langwatch/dist/client/assets/LineChart-Bb84FSVR.js +0 -2
- package/langwatch/dist/client/assets/ListTable-8idtTXBY.js +0 -2
- package/langwatch/dist/client/assets/LoadingScreen-DQ62wqSN.js +0 -2
- package/langwatch/dist/client/assets/Markdown-C9extmbX.js +0 -35
- package/langwatch/dist/client/assets/MenuLink-CVzOs3K8.js +0 -2
- package/langwatch/dist/client/assets/MessageCard--GCYkR2M.js +0 -2
- package/langwatch/dist/client/assets/MetadataTag-CSCPlbDN.js +0 -5
- package/langwatch/dist/client/assets/ModelProviderCustomModelInput-DUwvNeux.js +0 -2
- package/langwatch/dist/client/assets/ModelProviderScreen-BVBKstQm.js +0 -2
- package/langwatch/dist/client/assets/ModelSelector-4R-dc-Ny.js +0 -2
- package/langwatch/dist/client/assets/MyLayout-DCMYTSgX.js +0 -2
- package/langwatch/dist/client/assets/NavigationFooter-1VNOUoV6.js +0 -2
- package/langwatch/dist/client/assets/NewWorkflowForm-CsYSc1Vr.js +0 -2
- package/langwatch/dist/client/assets/NoDataInfoBlock-C8x5bzL0.js +0 -2
- package/langwatch/dist/client/assets/OnboardingContainer-e4kVlnyx.js +0 -2
- package/langwatch/dist/client/assets/OnlineEvaluationDrawer-D2jYsSON.js +0 -2
- package/langwatch/dist/client/assets/OpsPageShell-Ch1rtwuD.js +0 -2
- package/langwatch/dist/client/assets/OttlEditor-baChQv3o.js +0 -3
- package/langwatch/dist/client/assets/OverflownText-CY4Y__oL.js +0 -2
- package/langwatch/dist/client/assets/ProjectAvatar-DtI9dT1f.js +0 -43
- package/langwatch/dist/client/assets/ProjectLangyLayout-Cl7GB9zi.js +0 -82
- package/langwatch/dist/client/assets/PromptEditorDrawer-BLIu4fKV.js +0 -2
- package/langwatch/dist/client/assets/PromptListDrawer-BHC9jUMJ.js +0 -2
- package/langwatch/dist/client/assets/PropertySectionTitle-Da2IdhM3.js +0 -37
- package/langwatch/dist/client/assets/ProviderModelSelector-Cg5Lbc1U.js +0 -2
- package/langwatch/dist/client/assets/ProviderScopeChips-D7HJW6Ht.js +0 -2
- package/langwatch/dist/client/assets/PushToCopiesDialog-B_hvn6aW.js +0 -2
- package/langwatch/dist/client/assets/ReferenceDot-DbjBc6Dh.js +0 -2
- package/langwatch/dist/client/assets/RenderInputOutput-BntIB-Ae.js +0 -261
- package/langwatch/dist/client/assets/ScenarioFormDrawer-BORe6ffA.js +0 -2
- package/langwatch/dist/client/assets/ScenarioInputMappingSection-DVpK_-Qh.js +0 -2
- package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-MJhw77cs.js +0 -3
- package/langwatch/dist/client/assets/ScopeChipPicker-B3xHf0Ii.js +0 -2
- package/langwatch/dist/client/assets/SearchInput-C7YbWRUQ.js +0 -2
- package/langwatch/dist/client/assets/SectionNavigationLayout-CIP_2Nxf.js +0 -2
- package/langwatch/dist/client/assets/SelectDatasetDrawer-D_nCx9JT.js +0 -2
- package/langwatch/dist/client/assets/SelectionActionBar-fxhOYCmO.js +0 -2
- package/langwatch/dist/client/assets/SeriesFilterDrawer-zoWjjTxC.js +0 -2
- package/langwatch/dist/client/assets/SettingsLayout-sixsNIX_.js +0 -2
- package/langwatch/dist/client/assets/SetupWithAgentButton-Bhxb1yOj.js +0 -4
- package/langwatch/dist/client/assets/ShikiCommandBox-CN1W-H2m.js +0 -5
- package/langwatch/dist/client/assets/SpanDetails-DavcMtlr.js +0 -3
- package/langwatch/dist/client/assets/SubscriptionPage-gPKGn08f.js +0 -2
- package/langwatch/dist/client/assets/SuiteFormDrawer-C_5urLUY.js +0 -2
- package/langwatch/dist/client/assets/TabButton-Cp8UA45p.js +0 -3
- package/langwatch/dist/client/assets/TableCell-Cbtwk2YR.js +0 -2
- package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-B0xHR5hC.js +0 -2
- package/langwatch/dist/client/assets/TeamForm-DvN0gccP.js +0 -2
- package/langwatch/dist/client/assets/TeamUserRoleField-DD6lt16j.js +0 -2
- package/langwatch/dist/client/assets/TraceDetails-DZtIKcmo.js +0 -9
- package/langwatch/dist/client/assets/TraceDetailsDrawer-DKgyPTw5.js +0 -2
- package/langwatch/dist/client/assets/TraceIdPeek-7T88rBev.js +0 -2
- package/langwatch/dist/client/assets/TracesMapping-CYIUxk62.js +0 -2
- package/langwatch/dist/client/assets/UpgradeModalContent-eXy8pG4-.js +0 -2
- package/langwatch/dist/client/assets/UploadCSVDrawer-BTttuVHZ.js +0 -3
- package/langwatch/dist/client/assets/VariablesSection-hjZ5pmeK.js +0 -2
- package/langwatch/dist/client/assets/VersionBadge-BPxGh4w7.js +0 -2
- package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-B9EYtw_g.js +0 -1161
- package/langwatch/dist/client/assets/ViewAutomationDrawer-H_lJU8lG.js +0 -2
- package/langwatch/dist/client/assets/VirtualKeySecretReveal-5GeVsP9d.js +0 -54
- package/langwatch/dist/client/assets/WelcomeLayout-CDTLOa4d.js +0 -2
- package/langwatch/dist/client/assets/WithFeatureFlagGuard-OePuXWRG.js +0 -2
- package/langwatch/dist/client/assets/WithPermissionGuard-Cr6Aljmy.js +0 -2
- package/langwatch/dist/client/assets/WorkflowCard-SFB2TN6O.js +0 -2
- package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-C9JwDruB.js +0 -2
- package/langwatch/dist/client/assets/_...path_-Cgdgmf5W.js +0 -2
- package/langwatch/dist/client/assets/_Uint8Array-DZ50H-2q.js +0 -2
- package/langwatch/dist/client/assets/__...path__-CwRP2Csi.js +0 -22
- package/langwatch/dist/client/assets/_baseAssignValue-BqKt0w0a.js +0 -2
- package/langwatch/dist/client/assets/_baseClone-DCKy3Vq2.js +0 -2
- package/langwatch/dist/client/assets/_baseEach-BGeacxUS.js +0 -2
- package/langwatch/dist/client/assets/_baseFor-BQgMStOx.js +0 -2
- package/langwatch/dist/client/assets/_experiment_-UwR3aJGK.js +0 -2
- package/langwatch/dist/client/assets/_id_-7nn1sxUS.js +0 -2
- package/langwatch/dist/client/assets/_id_-BGN_cxTM.js +0 -2
- package/langwatch/dist/client/assets/_id_-C39KWPCF.js +0 -2
- package/langwatch/dist/client/assets/_id_-CLpZ89Xl.js +0 -2
- package/langwatch/dist/client/assets/_id_-CYndCW2V.js +0 -2
- package/langwatch/dist/client/assets/_id_-CfWpUbg4.js +0 -2
- package/langwatch/dist/client/assets/_id_-npXkLrUc.js +0 -2
- package/langwatch/dist/client/assets/_project_-B7G8spwK.js +0 -8
- package/langwatch/dist/client/assets/_runId_-BSik_ZD4.js +0 -7
- package/langwatch/dist/client/assets/_shell-BGaZUKLi.js +0 -2
- package/langwatch/dist/client/assets/_slug_-BN6BJfW8.js +0 -17
- package/langwatch/dist/client/assets/_slug_-C7DGk6aN.js +0 -2
- package/langwatch/dist/client/assets/_slug_-DOlOZ10W.js +0 -2
- package/langwatch/dist/client/assets/_team_-B9rXOt0D.js +0 -2
- package/langwatch/dist/client/assets/_workflow_-BJIdrL-L.js +0 -25
- package/langwatch/dist/client/assets/_workflow_-BKcndaRn.js +0 -3
- package/langwatch/dist/client/assets/accept-CSdmIcux.js +0 -2
- package/langwatch/dist/client/assets/activity-QICCt22J.js +0 -1
- package/langwatch/dist/client/assets/agents--fK5G7M5.js +0 -2
- package/langwatch/dist/client/assets/alerts-QICCt22J.js +0 -1
- package/langwatch/dist/client/assets/all-yOqzcthm.js +0 -2
- package/langwatch/dist/client/assets/analytics-CjMLTwIY.js +0 -2
- package/langwatch/dist/client/assets/annotation-scores-sPTr7fKF.js +0 -2
- package/langwatch/dist/client/assets/annotations-Ye3ttmrc.js +0 -2
- package/langwatch/dist/client/assets/anomaly-rules-DwSc-85q.js +0 -2
- package/langwatch/dist/client/assets/api-keys-CKyHUAXs.js +0 -4
- package/langwatch/dist/client/assets/asaplangy-6A4CIIRR.js +0 -5
- package/langwatch/dist/client/assets/audit-log-DQ9_D13G.js +0 -2
- package/langwatch/dist/client/assets/auth-CHp-bSLm.js +0 -2
- package/langwatch/dist/client/assets/authentication-CktawfTg.js +0 -2
- package/langwatch/dist/client/assets/authorize-BSFPddoX.js +0 -2
- package/langwatch/dist/client/assets/authorize-YWRIgnuS.js +0 -2
- package/langwatch/dist/client/assets/automations-CI-QD_zf.js +0 -2
- package/langwatch/dist/client/assets/automations-QICCt22J.js +0 -1
- package/langwatch/dist/client/assets/billing-plans-DUVLJ_Sk.js +0 -2
- package/langwatch/dist/client/assets/blank-CqHTkVM2.js +0 -2
- package/langwatch/dist/client/assets/blobs-B_lHV3eu.js +0 -2
- package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3-CQSMftlX.js +0 -133
- package/langwatch/dist/client/assets/budgets-D0yk2zkk.js +0 -3
- package/langwatch/dist/client/assets/bug-reports-D48JQaYJ.js +0 -2
- package/langwatch/dist/client/assets/cache-rules-BLbEe56I.js +0 -2
- package/langwatch/dist/client/assets/choose-CR8H5_AF.js +0 -2
- package/langwatch/dist/client/assets/chunk-EX3LRPZG-CULySKMF.js +0 -232
- package/langwatch/dist/client/assets/chunk-FWX5IMBZ-vsHlz4qh.js +0 -3
- package/langwatch/dist/client/assets/chunk-PUDLZKDR-ByJfzd90.js +0 -157
- package/langwatch/dist/client/assets/chunk-RYQCIY6F-DW5yDiZP.js +0 -2
- package/langwatch/dist/client/assets/chunk-V7JOEXUC-rGVlZXkP.js +0 -207
- package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-DjpCOWYp.js +0 -2
- package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-DjpCOWYp.js +0 -2
- package/langwatch/dist/client/assets/codeAgentConfig-DlJOMg8p.js +0 -7
- package/langwatch/dist/client/assets/codingDefaultSync-C3S2VHmn.js +0 -2
- package/langwatch/dist/client/assets/configure-BPQgl6jf.js +0 -4
- package/langwatch/dist/client/assets/constants-Bb5Vi_Bd.js +0 -2
- package/langwatch/dist/client/assets/custom-D79e_fnJ.js +0 -12
- package/langwatch/dist/client/assets/custom_evaluator-DgcItmbH.js +0 -31
- package/langwatch/dist/client/assets/dagre-BqI7WPId.js +0 -2
- package/langwatch/dist/client/assets/dagre-VKFMJZFB-BJj7ndf9.js +0 -5
- package/langwatch/dist/client/assets/data-privacy-BuolZ3DI.js +0 -2
- package/langwatch/dist/client/assets/data-retention-yWQxxUQF.js +0 -2
- package/langwatch/dist/client/assets/datasets-u_OgZHiv.js +0 -2
- package/langwatch/dist/client/assets/debounce-BJsF8wQY.js +0 -2
- package/langwatch/dist/client/assets/defaultModelState-DY_b79Yj.js +0 -2
- package/langwatch/dist/client/assets/dejaview-DSjI4vi2.js +0 -2
- package/langwatch/dist/client/assets/departments-C3oaBPyA.js +0 -2
- package/langwatch/dist/client/assets/devices-O_ZVZdxA.js +0 -2
- package/langwatch/dist/client/assets/dist-Dd3SzC15.js +0 -6
- package/langwatch/dist/client/assets/drawerFromUrl-DaNSDEzf.js +0 -2
- package/langwatch/dist/client/assets/edit-CswmqyLU.js +0 -62
- package/langwatch/dist/client/assets/email-suppressions-B8AuxWio.js +0 -2
- package/langwatch/dist/client/assets/erDiagram-Q63AITRT-DIiR5G9i.js +0 -86
- package/langwatch/dist/client/assets/error-nKFTkytv.js +0 -2
- package/langwatch/dist/client/assets/errors-e711UMq7.js +0 -2
- package/langwatch/dist/client/assets/evaluations-Cg9PywKJ.js +0 -2
- package/langwatch/dist/client/assets/evaluations-xuA_g6-G.js +0 -2
- package/langwatch/dist/client/assets/evaluators-6oHFfk5m.js +0 -146
- package/langwatch/dist/client/assets/evaluators-CBPI9nP9.js +0 -2
- package/langwatch/dist/client/assets/experiments-DHsdWtPG.js +0 -1
- package/langwatch/dist/client/assets/feature-flags-e-cVnxOK.js +0 -2
- package/langwatch/dist/client/assets/fetchSSE-5rVPow_l.js +0 -3
- package/langwatch/dist/client/assets/fieldset-BNLAUiqD.js +0 -2
- package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-DlrfK-aL.js +0 -1
- package/langwatch/dist/client/assets/forgot-password-B_FXHTn9.js +0 -2
- package/langwatch/dist/client/assets/formatMoney-DRwvOSzZ.js +0 -2
- package/langwatch/dist/client/assets/formatTargetOutput-CkKef3lk.js +0 -2
- package/langwatch/dist/client/assets/foundry-U39hnXil.js +0 -477
- package/langwatch/dist/client/assets/gateway-DZnsUBnP.js +0 -2
- package/langwatch/dist/client/assets/getEvaluator-irVFciCL.js +0 -2
- package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-BFtcAGI_.js +0 -2
- package/langwatch/dist/client/assets/governance-BBQIXSQ_.js +0 -2
- package/langwatch/dist/client/assets/graphlib-Bg9XziCe.js +0 -2
- package/langwatch/dist/client/assets/grid-DVy6ELOp.js +0 -2
- package/langwatch/dist/client/assets/groups-DYnJ4U2W.js +0 -2
- package/langwatch/dist/client/assets/guardrails-DdKPd-Zs.js +0 -2
- package/langwatch/dist/client/assets/handled-error-CI7XXA3n.js +0 -2
- package/langwatch/dist/client/assets/http-DSF_1QKT.js +0 -7
- package/langwatch/dist/client/assets/identifierUtils-B50FmQLB.js +0 -2
- package/langwatch/dist/client/assets/immer-CFru3D02.js +0 -14
- package/langwatch/dist/client/assets/index-CPtTUYLD.js +0 -68
- package/langwatch/dist/client/assets/ingestion-source-detail-BLfzu5Yv.js +0 -19
- package/langwatch/dist/client/assets/ingestion-sources-BcwE_tRu.js +0 -12
- package/langwatch/dist/client/assets/integrations-D220c59Q.js +0 -2
- package/langwatch/dist/client/assets/isArrayLikeObject-DUy1V36n.js +0 -2
- package/langwatch/dist/client/assets/isSymbol-COuSxi_J.js +0 -2
- package/langwatch/dist/client/assets/langyHomeSuggestions-6NtCcdnH.js +0 -2
- package/langwatch/dist/client/assets/license-Be6bs3wD.js +0 -2
- package/langwatch/dist/client/assets/licenseStatusUtils-YSS0xL-G.js +0 -2
- package/langwatch/dist/client/assets/lu-DlSq9Be4.js +0 -2
- package/langwatch/dist/client/assets/map-7tkBBrDN.js +0 -2
- package/langwatch/dist/client/assets/mappingValidation-C-AT88B0.js +0 -2
- package/langwatch/dist/client/assets/me-BHRwGQAJ.js +0 -7
- package/langwatch/dist/client/assets/me-DyaTjlbw.js +0 -2
- package/langwatch/dist/client/assets/members-Dn5oJBlv.js +0 -2
- package/langwatch/dist/client/assets/mermaid.core-krP_t-L5.js +0 -12
- package/langwatch/dist/client/assets/messages-CN1bd906.js +0 -2
- package/langwatch/dist/client/assets/metrics-Do8QhcIC.js +0 -2
- package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-DBef2D4I.js +0 -97
- package/langwatch/dist/client/assets/model-costs-D6eiVgIz.js +0 -2
- package/langwatch/dist/client/assets/model-providers-CiSkvGtd.js +0 -2
- package/langwatch/dist/client/assets/modelProviderHelpers-P2Cogc-H.js +0 -2
- package/langwatch/dist/client/assets/my-queue-D1aRcnMh.js +0 -2
- package/langwatch/dist/client/assets/normalizeComparison-BY-r_dYf.js +0 -2
- package/langwatch/dist/client/assets/not-found-BiyummjJ.js +0 -2
- package/langwatch/dist/client/assets/now-flOUcolU.js +0 -2
- package/langwatch/dist/client/assets/onboarding-D3dMDvS6.js +0 -2
- package/langwatch/dist/client/assets/online-evaluations-Dk2ygUi2.js +0 -2
- package/langwatch/dist/client/assets/ops-Djcw5_lX.js +0 -2
- package/langwatch/dist/client/assets/organizations-F6Q6gYJ3.js +0 -2
- package/langwatch/dist/client/assets/pages-BXwixFEM.js +0 -2
- package/langwatch/dist/client/assets/persistence-DZOtzFnQ.js +0 -2
- package/langwatch/dist/client/assets/personalProject-DMRX2-SI.js +0 -2
- package/langwatch/dist/client/assets/plans-C_VYB2VX.js +0 -2
- package/langwatch/dist/client/assets/preconditionFieldUtils-B7QfymK4.js +0 -2
- package/langwatch/dist/client/assets/product-D0RNZ3Ls.js +0 -2
- package/langwatch/dist/client/assets/project-ZTQzA2gY.js +0 -2
- package/langwatch/dist/client/assets/projections-DocSauqq.js +0 -2
- package/langwatch/dist/client/assets/projects-ClyGKBO9.js +0 -2
- package/langwatch/dist/client/assets/promptHandle-Cen_6YRW.js +0 -2
- package/langwatch/dist/client/assets/prompts-CLb2R5Fd.js +0 -8
- package/langwatch/dist/client/assets/radio-group-CWz2nJi3.js +0 -2
- package/langwatch/dist/client/assets/registry-B64xvGV5.js +0 -2
- package/langwatch/dist/client/assets/reports-C-XbHSdJ.js +0 -2
- package/langwatch/dist/client/assets/request-C3Wgq2B3.js +0 -2
- package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-9g84jNsR.js +0 -85
- package/langwatch/dist/client/assets/reset-password-ohopJtIH.js +0 -2
- package/langwatch/dist/client/assets/role-bindings-BQ31P1EO.js +0 -2
- package/langwatch/dist/client/assets/roles-CQDx2TP6.js +0 -2
- package/langwatch/dist/client/assets/routing-policies-uvNo9gfx.js +0 -5
- package/langwatch/dist/client/assets/scenarios-CpA_eExG.js +0 -2
- package/langwatch/dist/client/assets/scheduler-CgzNzJjP.js +0 -2
- package/langwatch/dist/client/assets/schedules-QICCt22J.js +0 -1
- package/langwatch/dist/client/assets/scim-BivWilDe.js +0 -2
- package/langwatch/dist/client/assets/secrets-Dp2ang1r.js +0 -2
- package/langwatch/dist/client/assets/segment-group-DQ4SkpwM.js +0 -2
- package/langwatch/dist/client/assets/segmented-control-BNxU6DEN.js +0 -2
- package/langwatch/dist/client/assets/select-D17PWjH9.js +0 -2
- package/langwatch/dist/client/assets/send-Dd5105kW.js +0 -2
- package/langwatch/dist/client/assets/sequenceView-FFm7w152.js +0 -5
- package/langwatch/dist/client/assets/seriesOptions-CDRg_FIS.js +0 -1015
- package/langwatch/dist/client/assets/settings-aFAaBCpo.js +0 -2
- package/langwatch/dist/client/assets/setup-BqCpBMpq.js +0 -2
- package/langwatch/dist/client/assets/shikiAdapter-CbWAxLvq.js +0 -3
- package/langwatch/dist/client/assets/showSuiteRunError-B2iiQdeh.js +0 -2
- package/langwatch/dist/client/assets/signin-C6AzSXTw.js +0 -2
- package/langwatch/dist/client/assets/signup-Co9SguQP.js +0 -2
- package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-CDfCuyr-.js +0 -2
- package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-mNUL4OCz.js +0 -2
- package/langwatch/dist/client/assets/subscription-BYrIJoC0.js +0 -3
- package/langwatch/dist/client/assets/subscriptions-CrupW2oH.js +0 -2
- package/langwatch/dist/client/assets/suggestionUI-0NFK2m-V.js +0 -106
- package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-aY42sUsR.js +0 -3
- package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-BQgl3Mwz.js +0 -9
- package/langwatch/dist/client/assets/switch-DGatWO8v.js +0 -2
- package/langwatch/dist/client/assets/switch-mtnuJtgJ.js +0 -2
- package/langwatch/dist/client/assets/tabs-U8n5D55_.js +0 -2
- package/langwatch/dist/client/assets/teams-CMzKSSEB.js +0 -2
- package/langwatch/dist/client/assets/teams-DBNLpvFi.js +0 -2
- package/langwatch/dist/client/assets/tool-catalog-DgWWHys3.js +0 -7
- package/langwatch/dist/client/assets/toolIcons-DmISNQ_S.js +0 -2
- package/langwatch/dist/client/assets/tooltip-gjZ4s2dt.js +0 -2
- package/langwatch/dist/client/assets/topic-clustering-wc06nKYO.js +0 -2
- package/langwatch/dist/client/assets/topics-DbjuJKH7.js +0 -2
- package/langwatch/dist/client/assets/traceStore-By6b3pBZ.js +0 -55
- package/langwatch/dist/client/assets/traces-DjQaBgiE.js +0 -289
- package/langwatch/dist/client/assets/tracesMapping-DpjIOyAg.js +0 -3
- package/langwatch/dist/client/assets/tracking-D4oUOPlm.js +0 -2
- package/langwatch/dist/client/assets/types-CCALFpCT.js +0 -2
- package/langwatch/dist/client/assets/types-DfJmP3wn.js +0 -2
- package/langwatch/dist/client/assets/types-X7bcC-zw.js +0 -2
- package/langwatch/dist/client/assets/usage-B3fH-bNu.js +0 -2
- package/langwatch/dist/client/assets/usage-YeRzOlEs.js +0 -2
- package/langwatch/dist/client/assets/use-generic-onboarding-flow-DZY28ya2.js +0 -2
- package/langwatch/dist/client/assets/useActivePlan-fRQ_etI2.js +0 -2
- package/langwatch/dist/client/assets/useAllPromptsForProject-DCZJ0_-p.js +0 -2
- package/langwatch/dist/client/assets/useAnnotationQueues-ByLqaEs6.js +0 -2
- package/langwatch/dist/client/assets/useAvailableEvaluators-BKFN_L8t.js +0 -2
- package/langwatch/dist/client/assets/useCompoundLicenseCheck-BqNF-zzC.js +0 -2
- package/langwatch/dist/client/assets/useCyclingVerb-DSHVFfHS.js +0 -2
- package/langwatch/dist/client/assets/useDepartmentColumn-D1DF_PiG.js +0 -2
- package/langwatch/dist/client/assets/useEvaluationsV3Store-Bc6Q5CKo.js +0 -2
- package/langwatch/dist/client/assets/useExportTraces-BqLmfd8N.js +0 -2
- package/langwatch/dist/client/assets/useFeatureFlag-Do1Ecu3l.js +0 -2
- package/langwatch/dist/client/assets/useInviteActions-DwPlKWmS.js +0 -2
- package/langwatch/dist/client/assets/useLicenseEnforcement-DOI0dcqD.js +0 -2
- package/langwatch/dist/client/assets/usePersonalContext-CggG6KVI.js +0 -2
- package/langwatch/dist/client/assets/useProjectSpanNames-jFO9A6Re.js +0 -2
- package/langwatch/dist/client/assets/useProjectsForCopy-B8F_BY79.js +0 -2
- package/langwatch/dist/client/assets/useRunViaApiTabs-Cr0_nbbp.js +0 -50
- package/langwatch/dist/client/assets/useShowLangy-kmjRxLHs.js +0 -2
- package/langwatch/dist/client/assets/useSimulationUpdateListener-BQB61L8b.js +0 -2
- package/langwatch/dist/client/assets/useTargetName-nPyk8kf-.js +0 -2
- package/langwatch/dist/client/assets/useTargetNameMap-C2bPHyhD.js +0 -2
- package/langwatch/dist/client/assets/useTraceDetailsDrawer-CL82mHNA.js +0 -2
- package/langwatch/dist/client/assets/useTraceUpdateListener-r6BQdcuk.js +0 -2
- package/langwatch/dist/client/assets/useUrlScopeFilter-DFlXMn0U.js +0 -2
- package/langwatch/dist/client/assets/useWorkflowStore-DGHQA8ai.js +0 -8
- package/langwatch/dist/client/assets/users-D5W8Qjjj.js +0 -2
- package/langwatch/dist/client/assets/users-DFyHT5UO.js +0 -2
- package/langwatch/dist/client/assets/users-rKylpyh9.js +0 -2
- package/langwatch/dist/client/assets/v3-NB4P-Pc3.js +0 -2
- package/langwatch/dist/client/assets/variables-DF2_abiB.js +0 -396
- package/langwatch/dist/client/assets/viewStore-DtvCfAUF.js +0 -2
- package/langwatch/dist/client/assets/virtual-keys-DW1kPrjW.js +0 -2
- package/langwatch/dist/client/assets/welcome-DJsfSWej.js +0 -16
- package/langwatch/dist/client/assets/wizard-D2X_QMNx.js +0 -2
- package/langwatch/dist/client/assets/workbench-fZ1KK4fN.js +0 -2
- package/langwatch/dist/client/assets/workflows-CY65pvqY.js +0 -3
- package/langwatch/dist/client/assets/wrap-DlWOPhPw.js +0 -2
- package/langwatch/src/app/api/middleware/__tests__/resource-limit-enforcement.integration.test.ts +0 -278
- package/langwatch/src/app/api/middleware/__tests__/resource-limit.unit.test.ts +0 -299
- package/langwatch/src/app/api/middleware/resource-limit.ts +0 -147
- package/langwatch/src/app/api/scenario-events/[[...route]]/scenario-set-limit.ts +0 -54
- package/langwatch/src/app/api/scenario-events/__tests__/scenario-set-limit.unit.test.ts +0 -195
- package/langwatch/src/app/api/scenario-events/scenario-set-limit.stress.test.ts +0 -216
- package/langwatch/src/components/__tests__/UpgradeModal.unit.test.tsx +0 -103
- package/langwatch/src/hooks/useCompoundLicenseCheck.ts +0 -41
- package/langwatch/src/pages/api/experiment/init.stress.test.ts +0 -130
- package/langwatch/src/server/api/routers/__tests__/project.create.planLimit.integration.test.ts +0 -370
- package/langwatch/src/server/api/routers/__tests__/team.createTeamWithMembers.planLimit.integration.test.ts +0 -251
- package/langwatch/src/server/app-layer/usage/__tests__/usage-service-checkScenarioSetLimit.unit.test.ts +0 -322
- package/langwatch/src/server/app-layer/usage/errors.ts +0 -24
- package/langwatch/src/server/auditLog.ts +0 -49
- package/langwatch/src/server/better-auth/__tests__/fallbackName.test.ts +0 -141
- package/langwatch/src/server/better-auth/__tests__/parseIssuerUrl.test.ts +0 -58
- package/langwatch/src/server/better-auth/__tests__/sso.test.ts +0 -125
- package/langwatch/src/server/better-auth/sso.ts +0 -47
- package/langwatch/src/server/event-sourcing/pipelines/trace-processing/projections/__tests__/traceSummary.coalesce.unit.test.ts +0 -33
- package/langwatch/src/server/license-enforcement/__tests__/limit-breakdown.unit.test.ts +0 -101
- package/langwatch/src/server/license-enforcement/__tests__/personal-workspaces-excluded.integration.test.ts +0 -391
- package/langwatch/src/server/license-enforcement/enforcement.middleware.ts +0 -103
- package/langwatch/src/server/license-enforcement/limit-breakdown.ts +0 -96
- package/langwatch/src/server/routes/scim.ts +0 -583
- package/langwatch/src/server/routes/webhooks.ts +0 -168
- package/langwatch/src/server/scim/__tests__/scim-token.service.unit.test.ts +0 -109
- package/langwatch/src/server/scim/__tests__/scim.costCenter.integration.test.ts +0 -170
- package/langwatch/src/server/scim/__tests__/scim.service.unit.test.ts +0 -414
- package/langwatch/src/server/scim/scim-group.service.ts +0 -464
- package/langwatch/src/server/scim/scim-role-resolver.ts +0 -47
- package/langwatch/src/server/scim/scim-role-resolver.unit.test.ts +0 -92
- package/langwatch/src/server/scim/scim-token.service.ts +0 -70
- package/langwatch/src/server/scim/scim.service.ts +0 -553
- package/langwatch/src/server/scim/scim.types.ts +0 -148
- package/mcp-server/dist/chunk-DSB77X63.js +0 -2328
- package/mcp-server/dist/discover-evaluator-schema-OFEADIJY.js +0 -2175
- package/mcp-server/dist/http-server-YVM4PRTC.js +0 -24466
|
@@ -241,25 +241,27 @@ export const evaluatorsSchema = z.object({
|
|
|
241
241
|
"The maximum number of tokens allowed for evaluation, a too high number can be costly. Entries above this amount will be skipped.",
|
|
242
242
|
)
|
|
243
243
|
.default(2048),
|
|
244
|
-
rubrics: z
|
|
245
|
-
{ description:
|
|
246
|
-
|
|
247
|
-
description:
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
244
|
+
rubrics: z
|
|
245
|
+
.array(z.object({ description: z.string() }))
|
|
246
|
+
.default([
|
|
247
|
+
{ description: "The response is incorrect, irrelevant." },
|
|
248
|
+
{
|
|
249
|
+
description:
|
|
250
|
+
"The response partially answers the question but includes significant errors, omissions, or irrelevant information.",
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
description:
|
|
254
|
+
"The response partially answers the question but includes minor errors, omissions, or irrelevant information.",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
description:
|
|
258
|
+
"The response fully answers the question and includes minor errors, omissions, or irrelevant information.",
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
description:
|
|
262
|
+
"The response fully answers the question and includes no errors, omissions, or irrelevant information.",
|
|
263
|
+
},
|
|
264
|
+
]),
|
|
263
265
|
}),
|
|
264
266
|
}),
|
|
265
267
|
"ragas/sql_query_equivalence": z.object({
|
|
@@ -876,6 +878,18 @@ export const evaluatorsSchema = z.object({
|
|
|
876
878
|
.default([]),
|
|
877
879
|
}),
|
|
878
880
|
}),
|
|
881
|
+
"langevals/query_resolution": z.object({
|
|
882
|
+
settings: z.object({
|
|
883
|
+
model: z
|
|
884
|
+
.string()
|
|
885
|
+
.describe("The model to use for evaluation")
|
|
886
|
+
.default("openai/gpt-5-mini"),
|
|
887
|
+
max_tokens: z
|
|
888
|
+
.number()
|
|
889
|
+
.describe("Max tokens allowed for evaluation")
|
|
890
|
+
.default(128000),
|
|
891
|
+
}),
|
|
892
|
+
}),
|
|
879
893
|
"langevals/select_best_compare": z.object({
|
|
880
894
|
settings: z.object({
|
|
881
895
|
model: z
|
|
@@ -916,18 +930,18 @@ export const evaluatorsSchema = z.object({
|
|
|
916
930
|
.array(z.union([z.literal("cost"), z.literal("duration")]))
|
|
917
931
|
.describe("Per-candidate metrics to inject into the judge prompt")
|
|
918
932
|
.default([]),
|
|
919
|
-
|
|
920
|
-
}),
|
|
921
|
-
"langevals/query_resolution": z.object({
|
|
922
|
-
settings: z.object({
|
|
923
|
-
model: z
|
|
924
|
-
.string()
|
|
925
|
-
.describe("The model to use for evaluation")
|
|
926
|
-
.default("openai/gpt-5-mini"),
|
|
927
|
-
max_tokens: z
|
|
933
|
+
temperature: z
|
|
928
934
|
.number()
|
|
929
|
-
.describe(
|
|
930
|
-
|
|
935
|
+
.describe(
|
|
936
|
+
"Sampling temperature for the judge call. Lower is more deterministic.",
|
|
937
|
+
)
|
|
938
|
+
.default(0.0),
|
|
939
|
+
swap_and_reconcile: z
|
|
940
|
+
.boolean()
|
|
941
|
+
.describe(
|
|
942
|
+
"Check each row twice, the second time with the candidate order reversed, and record no result for that row when the two disagree \u2014 rather than a tie, which would claim the candidates are equally good. Doubles judge-call cost per row (literature: swapping candidate order alone flips 10-30% of verdicts on contested rows).",
|
|
943
|
+
)
|
|
944
|
+
.default(true),
|
|
931
945
|
}),
|
|
932
946
|
}),
|
|
933
947
|
"langevals/sentiment": z.object({
|
|
@@ -1004,13 +1018,7 @@ export type EvaluatorDefinition<T extends EvaluatorTypes> = {
|
|
|
1004
1018
|
name: string;
|
|
1005
1019
|
description: string;
|
|
1006
1020
|
category:
|
|
1007
|
-
| "
|
|
1008
|
-
| "rag"
|
|
1009
|
-
| "safety"
|
|
1010
|
-
| "policy"
|
|
1011
|
-
| "other"
|
|
1012
|
-
| "custom"
|
|
1013
|
-
| "similarity";
|
|
1021
|
+
"quality" | "rag" | "safety" | "policy" | "other" | "custom" | "similarity";
|
|
1014
1022
|
docsUrl?: string;
|
|
1015
1023
|
isGuardrail: boolean;
|
|
1016
1024
|
requiredFields: string[];
|
|
@@ -2341,19 +2349,44 @@ better one. Superseded by Comparison, which judges two or more candidates.
|
|
|
2341
2349
|
},
|
|
2342
2350
|
},
|
|
2343
2351
|
},
|
|
2352
|
+
"langevals/query_resolution": {
|
|
2353
|
+
name: `Query Resolution`,
|
|
2354
|
+
description: `
|
|
2355
|
+
This evaluator checks if all the user queries in the conversation were resolved. Useful to detect when the bot doesn't know how to answer or can't help the user.
|
|
2356
|
+
`,
|
|
2357
|
+
category: "quality",
|
|
2358
|
+
docsUrl: "",
|
|
2359
|
+
isGuardrail: false,
|
|
2360
|
+
requiredFields: ["conversation"],
|
|
2361
|
+
optionalFields: [],
|
|
2362
|
+
settings: {
|
|
2363
|
+
model: {
|
|
2364
|
+
description: "The model to use for evaluation",
|
|
2365
|
+
default: "openai/gpt-5-mini",
|
|
2366
|
+
},
|
|
2367
|
+
max_tokens: {
|
|
2368
|
+
description: "Max tokens allowed for evaluation",
|
|
2369
|
+
default: 128000,
|
|
2370
|
+
},
|
|
2371
|
+
},
|
|
2372
|
+
envVars: [],
|
|
2373
|
+
result: {},
|
|
2374
|
+
},
|
|
2344
2375
|
"langevals/select_best_compare": {
|
|
2345
2376
|
name: `Comparison`,
|
|
2346
2377
|
description: `
|
|
2347
2378
|
Compare two or more candidate outputs and pick the best one, optionally
|
|
2348
2379
|
against a reference answer. The judge sees every candidate at once and
|
|
2349
2380
|
explains why the winner is better. Candidate order is shuffled so that a
|
|
2350
|
-
candidate's position never sways the verdict
|
|
2381
|
+
candidate's position never sways the verdict, and by default each row is
|
|
2382
|
+
checked twice — once more with the order reversed — recording no result
|
|
2383
|
+
for that row when the two checks disagree, rather than guessing.
|
|
2351
2384
|
`,
|
|
2352
2385
|
category: "quality",
|
|
2353
2386
|
docsUrl: "",
|
|
2354
2387
|
isGuardrail: false,
|
|
2355
|
-
requiredFields: [
|
|
2356
|
-
optionalFields: ["input", "golden", "row_index"],
|
|
2388
|
+
requiredFields: [],
|
|
2389
|
+
optionalFields: ["input", "golden", "candidates", "row_index"],
|
|
2357
2390
|
settings: {
|
|
2358
2391
|
model: {
|
|
2359
2392
|
description: "The model to use for evaluation",
|
|
@@ -2388,6 +2421,16 @@ candidate's position never sways the verdict.
|
|
|
2388
2421
|
description: "Per-candidate metrics to inject into the judge prompt",
|
|
2389
2422
|
default: [],
|
|
2390
2423
|
},
|
|
2424
|
+
temperature: {
|
|
2425
|
+
description:
|
|
2426
|
+
"Sampling temperature for the judge call. Lower is more deterministic.",
|
|
2427
|
+
default: 0.0,
|
|
2428
|
+
},
|
|
2429
|
+
swap_and_reconcile: {
|
|
2430
|
+
description:
|
|
2431
|
+
"Check each row twice, the second time with the candidate order reversed, and record no result for that row when the two disagree \u2014 rather than a tie, which would claim the candidates are equally good. Doubles judge-call cost per row (literature: swapping candidate order alone flips 10-30% of verdicts on contested rows).",
|
|
2432
|
+
default: true,
|
|
2433
|
+
},
|
|
2391
2434
|
},
|
|
2392
2435
|
envVars: [],
|
|
2393
2436
|
result: {
|
|
@@ -2400,29 +2443,6 @@ candidate's position never sways the verdict.
|
|
|
2400
2443
|
},
|
|
2401
2444
|
},
|
|
2402
2445
|
},
|
|
2403
|
-
"langevals/query_resolution": {
|
|
2404
|
-
name: `Query Resolution`,
|
|
2405
|
-
description: `
|
|
2406
|
-
This evaluator checks if all the user queries in the conversation were resolved. Useful to detect when the bot doesn't know how to answer or can't help the user.
|
|
2407
|
-
`,
|
|
2408
|
-
category: "quality",
|
|
2409
|
-
docsUrl: "",
|
|
2410
|
-
isGuardrail: false,
|
|
2411
|
-
requiredFields: ["conversation"],
|
|
2412
|
-
optionalFields: [],
|
|
2413
|
-
settings: {
|
|
2414
|
-
model: {
|
|
2415
|
-
description: "The model to use for evaluation",
|
|
2416
|
-
default: "openai/gpt-5-mini",
|
|
2417
|
-
},
|
|
2418
|
-
max_tokens: {
|
|
2419
|
-
description: "Max tokens allowed for evaluation",
|
|
2420
|
-
default: 128000,
|
|
2421
|
-
},
|
|
2422
|
-
},
|
|
2423
|
-
envVars: [],
|
|
2424
|
-
result: {},
|
|
2425
|
-
},
|
|
2426
2446
|
"langevals/sentiment": {
|
|
2427
2447
|
name: `Sentiment Evaluator`,
|
|
2428
2448
|
description: `
|
package/langwatch/.env.example
CHANGED
|
@@ -398,3 +398,10 @@ LANGY_INTERNAL_SECRET=
|
|
|
398
398
|
# LANGY_MIRROR_TRACE_ENDPOINT=""
|
|
399
399
|
# LANGY_MIRROR_TRACE_KEY=""
|
|
400
400
|
# LANGY_MIRROR_PROJECT_ID=""
|
|
401
|
+
|
|
402
|
+
# Instance license (self-hosted, optional). SSO (any non-email login
|
|
403
|
+
# provider) requires a genuine license: either an organization license
|
|
404
|
+
# activated in Settings > License, or this env var holding the signed
|
|
405
|
+
# license key, which is the credential-less recovery/bootstrap path
|
|
406
|
+
# (ADR-027). Checked once at startup; restart after changing it.
|
|
407
|
+
# LANGWATCH_LICENSE_KEY=
|
package/langwatch/biome.jsonc
CHANGED
|
@@ -212,6 +212,29 @@
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
|
+
{
|
|
216
|
+
// The SCIM implementation moved from src/server/scim to ee/scim so
|
|
217
|
+
// the Enterprise license covers it (#4830). Its complexity findings
|
|
218
|
+
// predate the move and were already tolerated at the old path via
|
|
219
|
+
// the repo-wide baseline; the relocation must not force a rewrite
|
|
220
|
+
// of a working provisioning flow, so the same tolerance follows the
|
|
221
|
+
// files to their licensed home. New ee/scim code still gets the
|
|
222
|
+
// rules via fresh files.
|
|
223
|
+
"includes": [
|
|
224
|
+
"ee/scim/routes.ts",
|
|
225
|
+
"ee/scim/scim-group.service.ts",
|
|
226
|
+
"ee/scim/scim.service.ts",
|
|
227
|
+
"ee/scim/webhooks.ts"
|
|
228
|
+
],
|
|
229
|
+
"linter": {
|
|
230
|
+
"rules": {
|
|
231
|
+
"complexity": {
|
|
232
|
+
"noExcessiveCognitiveComplexity": "off",
|
|
233
|
+
"noExcessiveLinesPerFunction": "off"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
215
238
|
{
|
|
216
239
|
// e2e/ and scripts/dogfood/ are throwaway operator scripts — browser
|
|
217
240
|
// QA walkthroughs and seed/demo tooling — not product code. They are
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{t as n}from"./react-BUD3sqOU.js";import{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{Mt as l,mn as u,n as d,tr as f}from"./ProjectAvatar-B0tbfKzY.js";import{n as p}from"./toaster-BsYkODqs.js";import{n as ee,t as m}from"./field-BadoNaN5.js";import{n as h}from"./personalProject-C9vU_vdl.js";import{l as te,t as ne,u as g}from"./errors-mlatPkMI.js";import{t as _}from"./spacer-C38e7o6r.js";import{i as v,r as y}from"./tag-BN5IoWjW.js";import{tt as b}from"./immer-DImI3Uq2.js";import{n as x}from"./api-l6Cnm0vQ.js";import{s as re}from"./index.esm-Cpy5fWo1.js";import{Mr as ie,Vt as S,W as C}from"./index-8SbDirJv.js";import{t as w}from"./check-CcrJKf5P.js";import{t as T}from"./plus-10dP8Fmk.js";import{t as E}from"./slugify-BfBxP6u_.js";import{n as D,t as O}from"./AddOrEditAnnotationScore-zxFsPi_K.js";var k=t({AddAnnotationQueueDrawer:()=>M}),A=e(n()),j=o(),M=({open:e=!0,onClose:t,onOverlayClick:n,queueId:o})=>{let{project:k,organization:M}=S(),N=x.annotation.createOrUpdateQueue.useMutation(),P=x.annotation.getQueueBySlugOrId.useQuery({queueId:o??``,projectId:k?.id??``},{enabled:!!k&&!!o&&!!e}),ae=()=>{n?(t?.(),n()):L()},F=x.useContext(),I=x.annotationScore.getAllActive.useQuery({projectId:k?.id??``},{enabled:!!k&&!!e}),{closeDrawer:L}=C(),R=()=>{L(),t?.()},z=x.organization.getOrganizationWithMembersAndTheirTeams.useQuery({organizationId:M?.id??``},{enabled:!!M&&!!e}),B=re({defaultValues:{name:P.data?.name??``,description:P.data?.description??``}}),{register:V,handleSubmit:H,formState:{errors:U},reset:W,watch:G}=B,[K,q]=(0,A.useState)(P.data?.members.map(e=>({id:e.user.id,name:e.user.name}))??[]),[J,Y]=(0,A.useState)(P.data?.AnnotationQueueScores.map(e=>({id:e.annotationScore.id,name:e.annotationScore.name}))??[]);(0,A.useEffect)(()=>{P.data&&(q(P.data.members.map(e=>({id:e.user.id,name:e.user.name}))),Y(P.data.AnnotationQueueScores.map(e=>({id:e.annotationScore.id,name:e.annotationScore.name}))),W({name:P.data.name,description:P.data.description??``}))},[P.data,W]);let oe=e=>{if(K.length===0||J.length===0){p.create({title:`Error`,description:`Please select at least one participant and score type`,type:`error`});return}N.mutate({name:e.name,description:e.description??``,userIds:K.map(e=>e.id),projectId:k?.id??``,scoreTypeIds:J.map(e=>e.id),queueId:o},{onSuccess:e=>{F.annotation.getOptimizedAnnotationQueues.invalidate(),F.annotation.getQueueBySlugOrId.invalidate(),p.create({title:`Annotation Queue ${o?`Updated`:`Created`}`,description:`Successfully ${o?`updated`:`created`} ${e.name} annotation queue`,type:`success`,meta:{closable:!0}}),ae(),W()},onError:e=>{g({error:e,form:B,hasFormErrorSlot:!0})||ne({error:e,fallbackTitle:o?`Couldn't update annotation queue`:`Couldn't create annotation queue`})}})},X=f(),Z=f(),Q=f(),$=E((G(`name`)||``).replace(`_`,`-`),{lower:!0,strict:!0}),se=(e,t)=>{q(n=>n.some(t=>t.id===e)?n.filter(t=>t.id!==e):[...n,{id:e,name:t}])},ce=(e,t)=>{Y(n=>n.some(t=>t.id===e)?n.filter(t=>t.id!==e):[...n,{id:e,name:t}])};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(h.Root,{open:!!e,placement:`end`,size:`lg`,onOpenChange:({open:e})=>{e||R()},children:(0,j.jsxs)(h.Content,{bg:`bg`,children:[(0,j.jsxs)(h.Header,{children:[(0,j.jsx)(a,{children:(0,j.jsx)(h.CloseTrigger,{onClick:()=>R()})}),(0,j.jsx)(a,{children:(0,j.jsx)(s,{paddingTop:5,fontSize:`2xl`,children:`Create Annotation Queue`})})]}),(0,j.jsx)(h.Body,{children:(0,j.jsx)(`form`,{onSubmit:H(oe),children:(0,j.jsxs)(c,{align:`start`,children:[(0,j.jsx)(te,{form:B}),(0,j.jsx)(D,{label:`Participants`,helper:`Select the participants for this annotation queue`,children:(0,j.jsxs)(l.Root,{open:Z.open,onOpenChange:({open:e})=>Z.setOpen(e),positioning:{placement:`bottom-start`},children:[(0,j.jsx)(l.Trigger,{asChild:!0,children:(0,j.jsxs)(i,{variant:`outline`,width:`full`,justifyContent:`space-between`,fontWeight:`normal`,color:K.length===0?`fg.subtle`:`fg`,paddingX:3,children:[K.length===0?`Add Participants`:(0,j.jsx)(a,{gap:1,flexWrap:`wrap`,flex:1,children:K.map(e=>(0,j.jsx)(v,{size:`sm`,children:(0,j.jsx)(y,{children:e.name})},e.id))}),(0,j.jsx)(u,{size:16})]})}),(0,j.jsx)(l.Content,{width:`300px`,children:(0,j.jsx)(l.Body,{children:(0,j.jsx)(c,{align:`start`,gap:1,children:z.data?.members.map(e=>{let t=K.some(t=>t.id===e.user.id);return(0,j.jsxs)(i,{variant:`ghost`,width:`full`,justifyContent:`flex-start`,padding:1,height:`auto`,fontWeight:`normal`,"aria-pressed":t,onClick:()=>se(e.user.id,e.user.name),children:[(0,j.jsx)(w,{size:16,color:t?`green`:`transparent`}),(0,j.jsx)(d,{size:`2xs`,name:e.user.name??``}),(0,j.jsx)(s,{fontSize:`sm`,children:e.user.name})]},e.user.id)})})})})]})}),(0,j.jsxs)(D,{label:`Name Annotation Queue`,helper:`Give it a name to identify this annotation queue`,invalid:!!U.name,children:[(0,j.jsx)(ie,{...V(`name`),required:!0}),$&&(0,j.jsxs)(ee,{children:[`slug: `,$]}),(0,j.jsx)(m,{children:U.name?.message})]}),(0,j.jsxs)(D,{label:`Description`,helper:`Provide a description of the annotation`,invalid:!!U.description,children:[(0,j.jsx)(b,{...V(`description`),required:!0}),(0,j.jsx)(m,{children:U.description?.message})]}),(0,j.jsx)(D,{label:`Score Type`,helper:`Select the score type for this annotation queue`,children:(0,j.jsxs)(l.Root,{open:Q.open,onOpenChange:({open:e})=>Q.setOpen(e),positioning:{placement:`bottom-start`},children:[(0,j.jsx)(l.Trigger,{asChild:!0,children:(0,j.jsxs)(i,{variant:`outline`,width:`full`,justifyContent:`space-between`,fontWeight:`normal`,color:J.length===0?`fg.subtle`:`fg`,paddingX:3,children:[J.length===0?`Add Score Type`:(0,j.jsx)(a,{gap:1,flexWrap:`wrap`,flex:1,children:J.map(e=>(0,j.jsx)(v,{size:`sm`,children:(0,j.jsx)(y,{children:e.name})},e.id))}),(0,j.jsx)(u,{size:16})]})}),(0,j.jsx)(l.Content,{width:`300px`,children:(0,j.jsxs)(l.Body,{padding:0,children:[(0,j.jsx)(r,{maxH:`250px`,overflowY:`auto`,padding:2,children:(0,j.jsx)(c,{align:`start`,gap:1,children:I.data?.map(e=>{let t=J.some(t=>t.id===e.id);return(0,j.jsxs)(i,{variant:`ghost`,width:`full`,justifyContent:`flex-start`,padding:1,height:`auto`,fontWeight:`normal`,"aria-pressed":t,onClick:()=>ce(e.id,e.name),children:[(0,j.jsx)(w,{size:16,color:t?`green`:`transparent`}),(0,j.jsx)(s,{fontSize:`sm`,children:e.name})]},e.id)})})}),(0,j.jsx)(r,{padding:2,borderTop:`1px solid`,borderColor:`border.muted`,children:(0,j.jsxs)(i,{width:`100%`,colorPalette:`blue`,onClick:()=>{Q.onClose(),X.onOpen()},variant:`outline`,size:`sm`,children:[(0,j.jsx)(T,{}),` Add New`]})})]})})]})}),(0,j.jsxs)(a,{width:`full`,children:[(0,j.jsx)(_,{}),(0,j.jsx)(i,{colorPalette:`orange`,type:`submit`,minWidth:`fit-content`,loading:N.isLoading,children:`Save`})]})]})})})]})}),(0,j.jsx)(h.Root,{open:X.open,placement:`end`,size:`lg`,onOpenChange:({open:e})=>X.setOpen(e),children:(0,j.jsxs)(h.Content,{bg:`bg`,children:[(0,j.jsxs)(h.Header,{children:[(0,j.jsx)(a,{children:(0,j.jsx)(h.CloseTrigger,{})}),(0,j.jsx)(a,{children:(0,j.jsx)(s,{paddingTop:5,fontSize:`2xl`,children:`Add Score Metric`})})]}),(0,j.jsx)(h.Body,{children:(0,j.jsx)(O,{onClose:X.onClose})})]})})]})};export{k as n,M as t};
|
|
2
|
+
//# sourceMappingURL=AddAnnotationQueueDrawer-DKvtbwGG.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
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{tr as l}from"./ProjectAvatar-B0tbfKzY.js";import{t as u}from"./badge-Cpc3eA-C.js";import{n as d}from"./toaster-BsYkODqs.js";import{t as f}from"./grid-MxZhegzw.js";import{a as p,n as m,r as h}from"./field-BadoNaN5.js";import{n as g}from"./IsolatedErrorBoundary-QK1gsCee.js";import{n as _}from"./personalProject-C9vU_vdl.js";import{t as v}from"./grid-item-CKAuKzga.js";import{n as y,r as b,t as x}from"./native-select-DL2k8x0o.js";import{t as S}from"./spacer-C38e7o6r.js";import{n as C}from"./api-l6Cnm0vQ.js";import{f as w}from"./trpcError-CFsR-0nB.js";import{s as T}from"./index.esm-Cpy5fWo1.js";import{Ln as E,Pr as D,Vt as O,W as k,t as A}from"./index-8SbDirJv.js";import{t as j}from"./arrow-right-B4BUj4mB.js";import{t as M}from"./edit-2-B0IA_tY5.js";import{t as N}from"./AddOrEditDatasetDrawer-BHJmgYGv.js";import{t as P}from"./index.module-CJLn6vye.js";import{n as F}from"./dist-C4xeXVRv.js";import{i as I,o as L,t as R}from"./tracesMapping-CJhNJ9Ej.js";import{t as z}from"./TracesMapping-BPXT_-h4.js";import{t as B}from"./DatasetPreviewTable-Ck22Wy4h.js";import{t as V}from"./DatasetSelector-BxeSHSDD.js";var H=e(t()),U=w(`useLocalStorageSelectedDataSetId`),W=()=>{let{project:e}=O(),t=C.useContext(),[n,r]=E(`selectedDatasetId`,``),i=()=>{r(``)};return{selectedDataSetId:n,setSelectedDataSetId:(0,H.useCallback)(async n=>{if(n===``){i();return}try{await t.dataset.getById.fetch({projectId:e?.id??``,datasetId:n})?r(n):(U.warn({datasetId:n},`Tried to set selected dataset to local storage, but it does not exist`),i())}catch(e){U.error({error:e},`Error fetching dataset`),i()}},[r,t]),clear:i}},G=o(),K={thread_id:{mapping:e=>e.thread_id},traces:{mapping:e=>e.traces}},q=e=>{let t=e.reduce((e,t)=>{let n=t.metadata?.thread_id??`no_thread`;return e[n]||(e[n]=[]),e[n].push(t),e},{});return Object.entries(t).map(([e,t])=>({thread_id:e,traces:t}))},J=(e,t)=>Object.fromEntries(Object.entries(t).map(([t,{source:n,selectedFields:r}])=>{let i=(n&&n in K?K[n]:void 0)?.mapping(e);return n===`traces`&&r&&r.length>0&&(i=(e.traces??[]).map(e=>{let t={};for(let n of r){let r=L[n];r&&(t[n]=r.mapping(e,``,``,{}))}return t})),[t,typeof i!=`string`&&typeof i!=`number`?JSON.stringify(i):i]})),Y=({titles:e,traces:t,threadMapping:n,targetFields:i,setDatasetEntries:o,setThreadMapping:l,dsl:u,task:d})=>{let p=n??{mapping:{}},[m,h]=(0,H.useState)({mapping:{}}),g=(0,H.useCallback)(e=>{h(t=>{let n=e(t);return l?.(n),n})},[l]),_=m.mapping,S=(0,H.useMemo)(()=>new Date().getTime(),[]),w=H.useRef(!1),{project:T}=O(),E=(0,H.useMemo)(()=>Object.values(_).some(e=>R.includes(e.source)),[_]),D=C.traces.getFormattedSpansDigest.useQuery({projectId:T?.id??``,traceIds:t.map(e=>e.trace_id)},{enabled:!!T?.id&&E&&t.length>0,refetchOnWindowFocus:!1,staleTime:300*1e3});(0,H.useEffect)(()=>{let e={mapping:Object.fromEntries(i.map(e=>[e,m.mapping[e]??p.mapping[e]??{source:e===`thread_id`?`thread_id`:``,selectedFields:[`input`,`output`]}])??[])},t=new Set(Object.keys(m.mapping)),n=new Set(i),r=t.size!==n.size||!Array.from(n).every(e=>t.has(e));(!w.current||r||JSON.stringify(m)!==JSON.stringify(e))&&(h(e),l?.(e),w.current=!0)},[JSON.stringify(i),JSON.stringify(p)]),(0,H.useEffect)(()=>{let e=0,n=[],r=q(t),i=Object.entries(_).filter(([,e])=>R.includes(e.source)).map(([e,t])=>({col:e,source:t.source}));for(let t of r){let r=J(t,_);for(let{col:e,source:n}of i)n===`formatted_traces`&&D.data&&(r[e]=t.traces.map(e=>D.data[e.trace_id]??``).filter(Boolean).join(`
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
`));n.push({id:`${S}-${e}`,selected:!0,...r}),e++}o?.(n)},[_,o,t,D.data,S]);let k=!!u;return(0,G.jsx)(c,{align:`start`,width:`full`,gap:3,children:(0,G.jsxs)(f,{width:`full`,templateColumns:k?`1fr auto 1fr auto 1fr`:`1fr auto 1fr`,alignItems:`center`,gap:2,children:[e?.map((t,n)=>(0,G.jsx)(v,{colSpan:n===e.length-1?1:2,paddingBottom:2,children:(0,G.jsx)(s,{fontWeight:`semibold`,children:t})},t)),Object.entries(_).map(([e,{source:t,selectedFields:n}],i)=>{let o=`inputs.${e}`,l=u?.targetEdges?.filter(t=>t.targetHandle===`inputs.${e}`).map(e=>`${e.source}.${e.sourceHandle}`)[0];return(0,G.jsxs)(H.Fragment,{children:[k&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(v,{children:(0,G.jsxs)(b,{width:`full`,children:[(0,G.jsxs)(x,{value:l??``,onChange:t=>{let[n,r,a]=t.target.value.split(`.`);u.setTargetEdges?.([...u.targetEdges?.filter(e=>e.targetHandle!==o)??[],{id:`${Date.now()}-${i}`,source:n??``,target:u.targetId,sourceHandle:`${r}.${a}`,targetHandle:`inputs.${e}`,type:`default`}])},children:[(0,G.jsx)(`option`,{value:``}),Object.entries(u.sourceOptions).map(([e,{label:t,fields:n}])=>{let r=n.map(t=>(0,G.jsx)(`option`,{value:`${e}.outputs.${t}`,children:t},t));return r.length===0?null:Object.keys(u.sourceOptions).length===1?r:(0,G.jsx)(`optgroup`,{label:t,children:r},e)})]}),(0,G.jsx)(y,{})]})}),(0,G.jsx)(v,{children:(0,G.jsx)(j,{style:{flexShrink:0}})})]}),(0,G.jsx)(v,{children:(0,G.jsxs)(c,{align:`start`,width:`full`,gap:2,children:[(0,G.jsxs)(b,{width:`full`,children:[(0,G.jsxs)(x,{onChange:t=>{g(n=>({...n,mapping:{...n.mapping,[e]:{source:t.target.value,selectedFields:n.mapping[e]?.selectedFields??[]}}}))},value:t,children:[(0,G.jsx)(`option`,{value:``}),[...R,...Object.keys(K)].map(e=>(0,G.jsx)(`option`,{value:e,children:I[e]??e},e))]}),(0,G.jsx)(y,{})]}),t===`traces`&&(0,G.jsxs)(a,{align:`start`,width:`full`,children:[(0,G.jsx)(r,{width:`16px`,minWidth:`16px`,height:`24px`,border:`2px solid`,borderRadius:`0 0 0 6px`,borderColor:`border.emphasized`,borderTop:0,borderRight:0,marginLeft:`12px`}),(0,G.jsx)(F,{isMulti:!0,options:Object.keys(L).map(e=>({label:e,value:e})),value:(n??[]).map(e=>({label:e,value:e})),onChange:t=>{g(n=>({...n,mapping:{...n.mapping,[e]:{source:n.mapping[e]?.source??``,selectedFields:t.map(e=>e.value)}}}))},placeholder:`Select trace fields...`,closeMenuOnSelect:!1,hideSelectedOptions:!1,chakraStyles:{container:e=>({...e,width:`100%`,minWidth:`150px`})}})]})]})}),(0,G.jsx)(v,{children:(0,G.jsx)(j,{style:{flexShrink:0}})}),(0,G.jsx)(v,{children:(0,G.jsx)(s,{flexShrink:0,whiteSpace:`nowrap`,children:e})})]},i)})]})})};function X({traces:e,columnTypes:t,rowData:o,onEditColumns:l,onRowDataChange:d,paragraph:f,selectedDataset:_,setDatasetTriggerMapping:v,editorPortalRef:y}){let[b,x]=(0,H.useState)(!1),[,w]=(0,H.useState)(),{project:T}=O(),E=(0,H.useMemo)(()=>o.map(e=>({...e,isSelected:!!e.selected})),[o]),k=(0,H.useMemo)(()=>{let t=e.map(e=>e.metadata?.thread_id).filter(e=>!!e);return Array.from(new Set(t))},[e]),A=C.traces.getTracesWithSpansByThreadIds.useQuery({projectId:T?.id??``,threadIds:k},{enabled:!!T&&b&&k.length>0,refetchOnWindowFocus:!1}),j=(0,H.useMemo)(()=>b&&A.data?A.data:e,[b,A.data,e]),N=C.useContext(),F=C.dataset.updateMapping.useMutation(),I=(0,H.useCallback)(e=>{F.mutate({projectId:T?.id??``,datasetId:_.id,mapping:{mapping:e.mapping,expansions:Array.from(e.expansions)}},{onSuccess:()=>{N.dataset.getAll.invalidate()}})},[_.id,T?.id,N.dataset.getAll,F]),L=(0,H.useCallback)(e=>{F.mutate({projectId:T?.id??``,datasetId:_.id,threadMapping:{mapping:e.mapping}},{onSuccess:()=>{N.dataset.getAll.invalidate()}})},[_.id,T?.id,N.dataset.getAll,F]),R=P(e=>{w(e),L(e)},400);(0,H.useEffect)(()=>{w(void 0),R.cancel()},[_.id,R]);let V=(0,H.useMemo)(()=>_.mapping?.threadMapping,[_.mapping]);return(0,G.jsx)(p,{width:`full`,paddingY:4,children:(0,G.jsxs)(a,{width:`full`,gap:`64px`,align:`start`,children:[(0,G.jsxs)(c,{align:`start`,maxWidth:`50%`,gap:4,children:[(0,G.jsx)(a,{width:`full`,align:`center`,justify:`space-between`,children:(0,G.jsx)(h,{margin:0,children:`Mapping`})}),(0,G.jsxs)(a,{bg:`gray.100`,_dark:{bg:`gray.800`},borderRadius:`md`,padding:`3px`,gap:0,children:[(0,G.jsx)(r,{as:`button`,onClick:e=>{e.preventDefault(),x(!1)},bg:b?`transparent`:`white`,_dark:{bg:b?`transparent`:`gray.700`},color:b?`fg.muted`:`fg`,fontWeight:b?`normal`:`medium`,borderRadius:`sm`,px:3,py:1,fontSize:`sm`,cursor:`pointer`,boxShadow:b?`none`:`xs`,transition:`all 0.15s`,children:`Current Trace`}),(0,G.jsx)(r,{as:`button`,onClick:e=>{e.preventDefault(),x(!0)},bg:b?`white`:`transparent`,_dark:{bg:b?`gray.700`:`transparent`},color:b?`fg`:`fg.muted`,fontWeight:b?`medium`:`normal`,borderRadius:`sm`,px:3,py:1,fontSize:`sm`,cursor:`pointer`,boxShadow:b?`xs`:`none`,transition:`all 0.15s`,children:(0,G.jsxs)(a,{gap:1,children:[(0,G.jsx)(s,{children:`Thread`}),b&&(0,G.jsx)(G.Fragment,{children:k.length===0?(0,G.jsx)(u,{colorPalette:`gray`,size:`sm`,children:`No threads found`}):A.isLoading||A.isFetching?(0,G.jsx)(n,{size:`xs`}):A.isError?(0,G.jsx)(u,{colorPalette:`red`,size:`sm`,children:`Error`}):A.data?(0,G.jsxs)(u,{colorPalette:`blue`,size:`sm`,children:[A.data.length,` traces`]}):null})]})})]}),(0,G.jsx)(m,{margin:0,fontSize:`13px`,marginBottom:2,children:b?`Groups traces by thread and maps to dataset columns`:`Maps each trace individually to dataset columns`}),b?(0,G.jsx)(Y,{traces:j,threadMapping:V,targetFields:t.map(({name:e})=>e),setDatasetEntries:d,setThreadMapping:R}):(0,G.jsx)(z,{traceMapping:_.mapping?.traceMapping??_.mapping,traces:j,targetFields:t.map(({name:e})=>e),setDatasetEntries:d,setTraceMapping:e=>{v?.(e),I(e)}})]}),(0,G.jsxs)(c,{align:`start`,width:`full`,height:`full`,children:[(0,G.jsxs)(a,{width:`full`,align:`end`,children:[(0,G.jsxs)(c,{align:`start`,children:[(0,G.jsx)(h,{margin:0,children:`Preview`}),(0,G.jsx)(m,{margin:0,fontSize:`13px`,children:f||`Those are the rows that are going to be added, double click a cell to edit it`})]}),(0,G.jsx)(S,{}),(0,G.jsxs)(i,{size:`sm`,colorPalette:`blue`,variant:`outline`,onClick:l,children:[(0,G.jsx)(M,{height:16}),` Edit Columns`]})]}),(0,G.jsx)(r,{width:`full`,display:`block`,paddingTop:2,children:(0,G.jsx)(g,{fallback:(0,G.jsx)(D,{width:`full`,height:`full`,children:`Error rendering the dataset, please refresh the page`}),onError:e=>{console.error(e)},children:(0,G.jsx)(B,{rows:E,columns:_.columnTypes??[],maxColumns:50,maxHeight:`400px`,isSelectable:!0,onToggleRow:(e,t)=>{d(o.map((n,r)=>r===e?{...n,selected:t}:n))},onToggleAll:e=>{d(o.map(t=>({...t,selected:e})))},onCellEdit:(e,t,n)=>{d(o.map((r,i)=>i===e?{...r,[t]:n}:r))},editorPortalRef:y})})})]})]})})}var Z=w(`AddDatasetRecordDrawer`);function Q(e){let t=C.useContext(),{project:n}=O(),r=C.datasetRecord.create.useMutation(),o=l(),{closeDrawer:u}=k(),{selectedDataSetId:f,setSelectedDataSetId:p}=W(),{handleSubmit:m,reset:h,watch:g,formState:{errors:v},setValue:y}=T({defaultValues:{datasetId:f}}),b=g(`datasetId`),x=C.dataset.getAll.useQuery({projectId:n?.id??``},{enabled:!!n,refetchOnWindowFocus:!1}),S=x.data?.find(e=>e.id===b),w=(0,H.useMemo)(()=>[...Array.isArray(e.selectedTraceIds)?e.selectedTraceIds:[e.selectedTraceIds],e?.traceId??``].filter(Boolean),[e.selectedTraceIds,e.traceId]),E=C.traces.getTracesWithSpans.useQuery({projectId:n?.id??``,traceIds:w},{enabled:!!n,refetchOnWindowFocus:!1}),D=({datasetId:e})=>{x.refetch().then(()=>{setTimeout(()=>{y(`datasetId`,e)},100)}).catch(e=>{Z.error({error:e})})},j=()=>{u(),h()},[M,P]=(0,H.useState)([]),F=M.filter(e=>e.selected),I=S?.columnTypes,L=async e=>{if(!S||!n)return;let i=F.map(e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>e!==`selected`).map(([e,t])=>{let n=I?.find(t=>t.name===e),r=t;if(n?.type!==`string`)try{r=JSON.parse(t)}catch{}return[e,r]})));await r.mutateAsync({projectId:n.id??``,datasetId:b,entries:i},{onSuccess:()=>{t.dataset.getAll.invalidate(),t.datasetRecord.getAll.invalidate(),u(),d.create({title:`Succesfully added to dataset`,description:(0,G.jsx)(A,{colorPalette:`white`,textDecoration:`underline`,href:`/${n?.slug}/datasets/${b}`,isExternal:!1,children:`View the dataset`}),type:`success`,meta:{closable:!0}})},onError:()=>{d.create({title:`Failed to add to the dataset`,description:`Please check if the rows were not already inserted in the dataset`,type:`error`,meta:{closable:!0}})}}),await p(e.datasetId)},[R,z]=(0,H.useState)([]);(0,H.useEffect)(()=>{R&&P(R)},[R]);let B=(0,H.useRef)(null),U=(0,H.useRef)(null),[K,q]=(0,H.useState)(!1);return(0,H.useEffect)(()=>{B.current&&q((B.current.scrollTop??0)>=(B.current.scrollHeight??0)-(B.current.clientHeight??0))},[R]),(0,G.jsxs)(_.Root,{open:!0,placement:`end`,size:`xl`,onOpenChange:({open:e})=>{e||j()},onEscapeKeyDown:e=>{U.current?.querySelector(`[data-floating-cell-editor]`)&&e.preventDefault()},preventScroll:!0,children:[(0,G.jsxs)(_.Content,{bg:`bg`,maxWidth:`1400px`,overflow:`auto`,ref:B,onScroll:()=>q((B.current?.scrollTop??0)>=(B.current?.scrollHeight??0)-(B.current?.clientHeight??0)),children:[(0,G.jsxs)(_.Header,{children:[(0,G.jsx)(a,{children:(0,G.jsx)(_.CloseTrigger,{})}),(0,G.jsx)(a,{children:(0,G.jsx)(s,{paddingTop:5,fontSize:`3xl`,children:`Add to Dataset`})})]}),(0,G.jsx)(_.Body,{overflow:`visible`,paddingX:0,ref:U,children:(0,G.jsxs)(`form`,{onSubmit:m(L),children:[(0,G.jsxs)(c,{paddingX:6,children:[(0,G.jsx)(V,{datasets:x.data,localStorageDatasetId:b,errors:v,setValue:y,onCreateNew:o.onOpen}),S&&(0,G.jsx)(X,{traces:E.data??[],columnTypes:S.columnTypes,rowData:R,selectedDataset:S,onEditColumns:o.onOpen,onRowDataChange:z,editorPortalRef:U})]}),(0,G.jsx)(a,{width:`full`,justifyContent:`flex-end`,position:`sticky`,bottom:0,paddingBottom:4,background:`bg.panel`,transition:`box-shadow 0.3s ease-in-out`,boxShadow:K?`none`:`0 -2px 5px rgba(0, 0, 0, 0.1)`,paddingX:6,children:(0,G.jsxs)(i,{type:`submit`,colorPalette:`blue`,marginTop:6,marginBottom:4,loading:r.isLoading,disabled:!S||!E.data||F.length===0,children:[`Add`,` `,S&&E.data?`${F.length} ${F.length==1?`row`:`rows`}`:``,` `,`to dataset`]})})]})})]}),(0,G.jsx)(N,{datasetToSave:S?{datasetId:b,name:S?.name??``,datasetRecords:void 0,columnTypes:S?.columnTypes??[]}:void 0,open:o.open,onClose:o.onClose,onSuccess:D})]})}export{Q as AddDatasetRecordDrawerV2};
|
|
6
|
+
//# sourceMappingURL=AddDatasetRecordDrawer-D1vOO9OS.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{dn as n,i as r,n as 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{At as c,jt as l}from"./ProjectAvatar-B0tbfKzY.js";import{n as u}from"./toaster-BsYkODqs.js";import{D as d}from"./Markdown-Cip8Rj5C.js";import{a as f,n as p,r as m,t as h}from"./field-BadoNaN5.js";import{t as g}from"./icon-button-Wlb_dGXL.js";import{l as _,t as v,u as y}from"./errors-mlatPkMI.js";import{n as b,r as x,t as S}from"./native-select-DL2k8x0o.js";import{t as C}from"./spacer-C38e7o6r.js";import{tt as w}from"./immer-DImI3Uq2.js";import{n as T}from"./api-l6Cnm0vQ.js";import{s as E}from"./index.esm-Cpy5fWo1.js";import{Mr as D,Vt as O,zn as k}from"./index-8SbDirJv.js";import{t as A}from"./plus-10dP8Fmk.js";import{t as j}from"./x-ePIIvo_k.js";var M=e(t()),N=k(),P=a();function F({label:e,helper:t,invalid:r,children:i,align:a,minWidth:o,...c}){return(0,P.jsx)(f,{paddingY:2,invalid:r,...c,children:(0,P.jsxs)(s,{width:`full`,align:a,gap:t?2:1,children:[(0,P.jsxs)(s,{align:`start`,gap:1,width:`full`,minWidth:o,children:[(0,P.jsx)(m,{margin:0,children:e}),t&&(0,P.jsx)(p,{margin:0,fontSize:`13px`,children:t})]}),(0,P.jsx)(C,{}),(0,P.jsx)(C,{}),(0,P.jsx)(n,{children:i})]})})}var I=({onClose:e,annotationScoreId:t})=>{let{project:a}=O(),m=T.annotationScore.upsert.useMutation(),k=T.annotationScore.getById.useQuery({projectId:a?.id??``,scoreId:t??``},{enabled:!!t&&!!a?.id}),I=T.useContext(),L=E({disabled:!!(t&&k.isLoading),defaultValues:{name:``,dataType:`boolean`,description:``,category:[,,,,,].fill(``),categoryExplanation:[,,,,,].fill(``)}}),{register:R,handleSubmit:z,watch:B,formState:{errors:V},reset:H}=L;(0,M.useEffect)(()=>{if(k.data)switch(H({name:k.data.name,dataType:k.data.dataType??`boolean`,description:k.data.description??``,category:[],categoryExplanation:[]}),K(``),J([]),k.data.options&&Array.isArray(k.data.options)&&W(k.data.options.filter(e=>typeof e==`object`&&!!e&&`value`in e).map(e=>e.value)),k.data.dataType){case N.AnnotationScoreDataType.OPTION:K(k.data.defaultValue?.value);break;case N.AnnotationScoreDataType.CHECKBOX:J(k.data.defaultValue?.options);break}},[k.data?.id,k.data?.updatedAt]);let[U,W]=(0,M.useState)([``]),[G,K]=(0,M.useState)(``),[q,J]=(0,M.useState)([]),Y=n=>{if(U.length===0||U.every(e=>!e.trim())){u.create({title:t?`Error updating annotation score`:`Error creating annotation score`,description:`Please add at least one option`,type:`error`,meta:{closable:!0}});return}let r=U.filter(e=>e.trim()!==``),i=r.map(e=>e.toLowerCase());if(i.length!==new Set(i).size){u.create({title:t?`Error updating annotation score`:`Error creating annotation score`,description:`Duplicate options are not allowed (case-insensitive)`,type:`error`,meta:{closable:!0}});return}m.mutate({annotationScoreId:t,name:n.name,dataType:n.dataType,description:n.description,category:n.category,categoryExplanation:n.categoryExplanation,projectId:a?.id??``,options:n.options,radioCheckboxOptions:r,defaultRadioOption:G,defaultCheckboxOption:q},{onSuccess:n=>{u.create({title:t?`Annotation Score Updated`:`Annotation Score Created`,description:`Successfully ${t?`updated`:`created`} ${n.name} annotation score`,type:`success`,meta:{closable:!0}}),e(),H(),I.annotationScore.getAllActive.invalidate(),I.annotationScore.getAll.invalidate(),I.annotationScore.getById.invalidate()},onError:e=>{y({error:e,form:L,hasFormErrorSlot:!0})||v({error:e,fallbackTitle:t?`Couldn't save annotation score`:`Couldn't create annotation score`})}})},X=B(`dataType`);return(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(`form`,{onSubmit:z(Y),children:(0,P.jsxs)(s,{gap:2,align:`start`,children:[(0,P.jsx)(_,{form:L}),(0,P.jsxs)(F,{label:`Name`,helper:`Give it a name that makes it easy to identify this score metric`,invalid:!!V.name,children:[(0,P.jsx)(D,{...R(`name`),required:!0}),(0,P.jsx)(h,{children:V.name?.message})]}),(0,P.jsxs)(F,{label:`Description`,helper:`Provide a description of the score metric`,invalid:!!V.description,children:[(0,P.jsx)(w,{...R(`description`),required:!0,autoresize:!0,maxHeight:`6lh`}),(0,P.jsx)(h,{children:V.description?.message})]}),(0,P.jsxs)(F,{label:`Score Type`,helper:X===`OPTION`?`Single selection from multiple options`:X===`CHECKBOX`?`Allow multiple selections with checkboxes`:`Select the score type for the score metric`,invalid:!!V.dataType,children:[(0,P.jsx)(i,{width:`full`,children:(0,P.jsx)(s,{align:`start`,width:`full`,gap:0,children:(0,P.jsxs)(x,{children:[(0,P.jsxs)(S,{...R(`dataType`),children:[(0,P.jsx)(`option`,{value:N.AnnotationScoreDataType.OPTION,children:`Multiple choice`}),(0,P.jsx)(`option`,{value:N.AnnotationScoreDataType.CHECKBOX,children:`Checkboxes`})]}),(0,P.jsx)(b,{})]})})}),(0,P.jsx)(h,{children:V.dataType?.message}),X===`OPTION`&&(0,P.jsx)(f,{mt:4,children:(0,P.jsxs)(s,{align:`start`,width:`full`,gap:2,children:[(0,P.jsx)(l,{verticalAlign:`start`,width:`full`,defaultValue:G,value:G,children:(0,P.jsx)(s,{align:`start`,width:`full`,gap:2,children:U.map((e,t)=>(0,P.jsxs)(i,{gap:2,width:`full`,children:[(0,P.jsx)(c,{value:e,onChange:e=>{K(e.target.value)},onClick:()=>{G===e&&setTimeout(()=>{K(``)},100)}}),(0,P.jsx)(D,{placeholder:`value`,value:e,onChange:n=>{G===e&&K(``);let r=[...U];r[t]=n.target.value,W(r)}}),(0,P.jsx)(g,{"aria-label":`Remove option`,colorPalette:`gray`,onClick:()=>{W(U.filter((e,n)=>n!==t))},disabled:U.length===1,children:(0,P.jsx)(j,{})})]},t))})}),(0,P.jsxs)(r,{onClick:()=>W([...U,``]),size:`sm`,colorPalette:`orange`,children:[(0,P.jsx)(A,{}),`Add Option`]}),G!==``&&(0,P.jsx)(p,{children:(0,P.jsxs)(i,{children:[(0,P.jsx)(j,{size:16,cursor:`pointer`,onClick:()=>K(``)}),`Default Option: `,(0,P.jsxs)(o,{children:[G,` `]})]})})]})}),X===`CHECKBOX`&&(0,P.jsx)(f,{mt:4,children:(0,P.jsxs)(s,{align:`start`,width:`full`,children:[U.map((e,t)=>(0,P.jsxs)(i,{width:`full`,children:[(0,P.jsx)(n,{onClick:t=>{q.includes(e)?setTimeout(()=>{J(q.filter(t=>t!==e))},100):e.trim()!==``&&J([...q,e])},children:(0,P.jsx)(d,{value:e,checked:(q||[]).includes(e),disabled:!e.trim()})}),(0,P.jsx)(D,{placeholder:`value`,value:e,onChange:e=>{let n=[...U];n[t]=e.target.value,W(n)}}),(0,P.jsx)(g,{"aria-label":`Remove option`,colorPalette:`gray`,onClick:()=>{W(U.filter((e,n)=>n!==t))},disabled:U.length===1,children:(0,P.jsx)(j,{})})]},t)),(0,P.jsxs)(r,{onClick:()=>W([...U,``]),size:`sm`,colorPalette:`orange`,children:[(0,P.jsx)(A,{}),`Add Option`]}),(q||[]).length>0&&(0,P.jsx)(p,{children:(0,P.jsxs)(i,{children:[(0,P.jsx)(j,{size:16,cursor:`pointer`,onClick:()=>J([])}),`Default Options:`,` `,(0,P.jsx)(o,{children:q.join(`, `)})]})})]})})]}),(0,P.jsxs)(i,{width:`full`,children:[(0,P.jsx)(C,{}),(0,P.jsx)(r,{colorPalette:`orange`,type:`submit`,minWidth:`fit-content`,loading:m.isLoading,children:t?`Update Score Metric`:`Add Score Metric`})]})]})})})};export{F as n,I as t};
|
|
2
|
+
//# sourceMappingURL=AddOrEditAnnotationScore-zxFsPi_K.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./portal-Sdfvrza9.js";import{t}from"./jsx-runtime-CFwixLRt.js";import{n}from"./v-stack-hkuSkmCA.js";import{n as r}from"./personalProject-C9vU_vdl.js";import{W as i}from"./index-8SbDirJv.js";import{t as a}from"./AddOrEditAnnotationScore-zxFsPi_K.js";var o=t(),s=({onClose:t,annotationScoreId:s})=>{let{closeDrawer:c}=i(),l=()=>{t?t():c()};return(0,o.jsx)(r.Root,{open:!0,placement:`end`,size:`lg`,onOpenChange:({open:e})=>{e||l()},onInteractOutside:l,children:(0,o.jsxs)(r.Content,{bg:`bg`,children:[(0,o.jsxs)(r.Header,{children:[(0,o.jsx)(e,{children:(0,o.jsx)(r.CloseTrigger,{})}),(0,o.jsx)(e,{children:(0,o.jsx)(n,{paddingTop:5,fontSize:`2xl`,children:s?`Edit Score Metric`:`Add Score Metric`})})]}),(0,o.jsx)(r.Body,{children:(0,o.jsx)(a,{onClose:l,annotationScoreId:s})})]})})};export{s as AddOrEditAnnotationScoreDrawer};
|
|
2
|
+
//# sourceMappingURL=AddOrEditAnnotationScoreDrawer-soYSKpT_.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{t as n}from"./react-BUD3sqOU.js";import{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{pn as ee}from"./ProjectAvatar-B0tbfKzY.js";import{n as u,o as d}from"./toaster-BsYkODqs.js";import{n as f,t as p}from"./field-BadoNaN5.js";import{i as m,n as h,r as g,t as _}from"./alert-CPsXih3K.js";import{t as te}from"./icon-button-Wlb_dGXL.js";import{n as v}from"./personalProject-C9vU_vdl.js";import{n as y,y as b}from"./fetchSSE-CnJPAkno.js";import{d as x,i as S,t as C}from"./errors-mlatPkMI.js";import{n as ne,r as re,t as w}from"./native-select-DL2k8x0o.js";import{n as T}from"./api-l6Cnm0vQ.js";import{o as ie,s as E}from"./index.esm-Cpy5fWo1.js";import{Mr as D,Vt as O,W as k}from"./index-8SbDirJv.js";import{t as A}from"./prop-types-DeUPn3oD.js";import{t as j}from"./trash-2-Bq5tW_xF.js";import{t as M}from"./zod-BDLLToBM.js";import{t as N}from"./index.module-CJLn6vye.js";import{t as P}from"./HorizontalFormControl-CpxShF8O.js";var F=e(n()),I=e(A());function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function R(e,t){if(e==null)return{};var n=z(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function z(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var B=(0,F.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=R(e,[`color`,`size`]);return F.createElement(`svg`,L({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),F.createElement(`path`,{d:`M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24`}),F.createElement(`line`,{x1:`1`,y1:`1`,x2:`23`,y2:`23`}))});B.propTypes={color:I.default.string,size:I.default.oneOfType([I.default.string,I.default.number])},B.displayName=`EyeOff`;function V(e){return Object.entries(e).reduce((e,[t,n])=>(n.forEach((n,r)=>{e[r]=e[r]??{id:y()},e[r][t]=n}),e),[])}function H(e){return e.reduce((e,t)=>(Object.entries(t).forEach(([t,n])=>{t===`id`||t===`selected`||(e[t]=e[t]??[],e[t].push(n))}),e),{})}var U={string:`str`,boolean:`bool`,number:`float`,date:`str`,json:`dict`,list:`list`,spans:`dict`,rag_contexts:`dict`,chat_messages:`chat_messages`,annotations:`dict`,evaluations:`dict`,image:`image`},W=e=>U[e];function G(e){return e.map(e=>({identifier:e.name,type:U[e.type]}))}function K(e){return e.datasetId?{id:e.datasetId,name:e.name}:{name:e.name,inline:{records:H(e.datasetRecords),columnTypes:e.columnTypes}}}var q=e=>{let t=e.columnTypes??[],n=e.datasetRecords.map(n=>{let r={id:n.id};return t.forEach(t=>{let i=e.id?n.entry?.[t.name]:n[t.name];r[t.name]=typeof i==`object`?JSON.stringify(i):i}),r});return{name:e.name,datasetRecords:n,columnTypes:e.columnTypes}},J=(e,{trainSize:t,testSize:n})=>{let r=e.length,i=t<1||n<1,a=i?Math.floor(r*t):t,o=i?Math.ceil(r*n):n;return{train:e.slice(0,a),test:e.slice(a,a+o)}},ae=(e,t,n)=>{let r={};t.forEach(e=>{let t=n.find(t=>t.name===e.name);t&&(r[e.name]=t.name)});let i=t.filter(e=>!(e.name in r)),a=n.filter(e=>!Object.values(r).includes(e.name));for(let e=0;e<Math.min(i.length,a.length);e++){let t=i[e],n=a[e];t&&n&&(r[t.name]=n.name)}return e.map(e=>{let t={...e.id?{id:e.id}:{}};for(let[n,i]of Object.entries(e))if(n!==`id`&&n in r){let e=r[n];e&&(t[e]=i)}return t})},Y=o();function X(e){let{value:t,label:n,...r}=e;return(0,Y.jsx)(i,{variant:`ghost`,"data-variant":`ghost`,size:`sm`,cursor:`pointer`,onClick:e=>{if(t){if(e.stopPropagation(),!navigator.clipboard){u.create({title:`Your browser does not support clipboard access, please copy the prompt ID manually`,type:`error`,duration:2e3,meta:{closable:!0}});return}(async()=>{await navigator.clipboard.writeText(t),u.create({title:`${n} copied to your clipboard`,type:`success`,duration:2e3,meta:{closable:!0}})})()}},...r,children:(0,Y.jsx)(d,{width:14,height:14})})}function Z({children:e,...t}){return(0,Y.jsxs)(m,{status:`warning`,size:`sm`,...t,children:[(0,Y.jsx)(g,{}),(0,Y.jsx)(_,{children:(0,Y.jsx)(h,{children:e})})]})}function oe(e){return(0,Y.jsx)(Z,{...e,children:`Warning: this will break external references to this dataset. Please update your references to the new slug after saving.`})}function se({conflictsWith:e,...t}){return(0,Y.jsxs)(Z,{...t,children:[`A dataset named "`,e,`" already uses this slug. Please choose a different name.`]})}function ce({displaySlug:e,slugWillChange:t,dbSlug:n,slugInfo:i,...o}){let s=(0,F.useCallback)(()=>i?.hasConflict&&i.conflictsWith?(0,Y.jsx)(se,{conflictsWith:i.conflictsWith}):!i?.hasConflict&&t?(0,Y.jsx)(oe,{}):null,[i,t]);return e?(0,Y.jsx)(r,{...o,children:(0,Y.jsx)(f,{children:(0,Y.jsxs)(l,{align:`start`,children:[(0,Y.jsxs)(a,{children:[(0,Y.jsxs)(c,{className:`slug-text`,fontSize:`2xs`,color:`fg.muted`,textAlign:`left`,transition:`opacity 0.2s`,minWidth:0,children:[`slug:`,` `,t?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(c,{as:`span`,textDecoration:`line-through`,children:n}),` -> `,(0,Y.jsxs)(`b`,{children:[` `,e]})]}):e]}),!t&&e&&(0,Y.jsx)(X,{value:e,label:`Dataset slug`})]}),s()]})})}):null}var le=500,ue=1e3,de=!0,fe=!0;function pe({name:e,datasetId:t}){let[n,r]=(0,F.useState)(null),{project:i}=O(),a=i?.id,{data:o}=T.dataset.getById.useQuery({projectId:a??``,datasetId:t??``},{enabled:!!t&&!!a}),s=o?.slug,c=T.dataset.validateDatasetName.useQuery({projectId:a??``,proposedName:e,excludeDatasetId:t},{enabled:!1}),l=N(()=>{e&&e.trim()!==``&&a&&c.refetch().then(e=>{e.data&&r({slug:e.data.slug,hasConflict:!e.data.available,conflictsWith:e.data.conflictsWith})})},le,{leading:de,trailing:fe,maxWait:ue});return(0,F.useEffect)(()=>(e&&e.trim()!==``?l():(r(null),l.cancel()),()=>{l.cancel()}),[e,l]),{slugInfo:n,displaySlug:t&&s&&n?.slug===void 0?s:n?.slug,slugWillChange:!!t&&!!s&&!!n?.slug&&s!==n.slug,dbSlug:s,resetSlugInfo:()=>r(null)}}var me=t({AddOrEditDatasetDrawer:()=>Q,tryToConvertRowsToAppropriateType:()=>$});function Q(e){let{project:t}=O(),n=T.dataset.upsert.useMutation(),{closeDrawer:r}=k(),o=e.onClose??r,c=e.open??!0,d=[{name:`trace_id`,type:`string`},{name:`timestamp`,type:`date`},{name:`input`,type:`string`},{name:`output`,type:`string`},{name:`contexts`,type:`list`},{name:`total_cost`,type:`number`},{name:`comments`,type:`string`}],{register:f,handleSubmit:m,watch:h,formState:{errors:g},reset:_,setError:y,control:A}=E({defaultValues:{name:e.datasetToSave?.name??``,columnTypes:e.datasetToSave?.columnTypes??d},resolver:async(e,t,n)=>{let r=await M(b)(e,t,n);(!e.name||e.name.trim()===``)&&(r.errors.name={type:`required`,message:`Name is required`});let i=new Set;for(let t of e.columnTypes){if(t.name.trim()===``){r.errors.columnTypes={type:`required`,message:`Column name cannot be empty`};break}i.has(t.name)&&(r.errors.columnTypes={type:`required`,message:`Cannot have multiple columns with the same name: \`${t.name}\``}),i.add(t.name)}return r}}),{fields:N,append:I,remove:L}=ie({control:A,name:`columnTypes`}),{slugInfo:R,displaySlug:z,slugWillChange:V,dbSlug:H,resetSlugInfo:U}=pe({name:h(`name`),datasetId:e.datasetToSave?.datasetId});(0,F.useEffect)(()=>{let t;return e.datasetToSave?t=setTimeout(()=>{_({name:e.datasetToSave.name??``,columnTypes:e.datasetToSave.columnTypes})},0):_({name:``,columnTypes:d}),U(),()=>{t&&clearTimeout(t)}},[!!e.open]);let W=T.useContext(),G=r=>{n.mutate({projectId:t?.id??``,datasetId:e.datasetToSave?.datasetId,name:r.name,columnTypes:r.columnTypes,...e.datasetToSave?.datasetRecords?{datasetRecords:$(ae(e.datasetToSave.datasetRecords,e.datasetToSave.columnTypes,r.columnTypes),r.columnTypes)}:{}},{onSuccess:t=>{e.onSuccess({datasetId:t.id,name:t.name,columnTypes:t.columnTypes}),u.create({title:e.datasetToSave?.datasetId?`Dataset Updated`:e.datasetToSave?`Dataset Saved`:`Dataset Created`,description:e.datasetToSave?.datasetId?`Successfully updated ${t.name} dataset`:`Successfully created ${t.name} dataset`,type:`success`,meta:{closable:!0}}),_(),o(),W.dataset.getAll.invalidate()},onError:t=>{if(x(t)?.code===`dataset_name_taken`){y(`name`,{type:`server`,message:S({error:t})},{shouldFocus:!0});return}C({error:t,fallbackTitle:e.datasetToSave?.datasetId?`Couldn't update the dataset`:`Couldn't create the dataset`})}})};return(0,Y.jsx)(v.Root,{open:c,onOpenChange:({open:e})=>!e&&o(),size:`xl`,children:(0,Y.jsxs)(v.Content,{bg:`bg`,children:[(0,Y.jsx)(v.CloseTrigger,{}),(0,Y.jsx)(v.Header,{children:(0,Y.jsx)(a,{children:(0,Y.jsx)(s,{children:e.datasetToSave?.datasetId||e.localOnly?`Edit Dataset`:e.datasetToSave?`Save Dataset`:`New Dataset`})})}),(0,Y.jsx)(v.Body,{children:(0,Y.jsxs)(`form`,{onSubmit:m(t=>{if(e.localOnly){e.onSuccess({datasetId:e.datasetToSave?.datasetId??``,name:t.name,columnTypes:t.columnTypes}),_(),o();return}G(t)}),children:[(0,Y.jsxs)(P,{label:`Name`,helper:`Give it a name that identifies what this group of examples is
|
|
2
|
+
going to focus on`,invalid:!!g.name||(R?.hasConflict??!1),children:[(0,Y.jsx)(D,{...f(`name`)}),(0,Y.jsx)(ce,{marginLeft:1,marginTop:1,displaySlug:z,slugWillChange:V,dbSlug:H,slugInfo:R}),(0,Y.jsx)(p,{children:g.name?.message})]}),(0,Y.jsx)(P,{label:`Columns`,helper:`Which columns should be present in the dataset`,invalid:!!g.columnTypes,children:(0,Y.jsx)(l,{align:`start`,children:(0,Y.jsxs)(l,{align:`start`,width:`full`,children:[N.map((t,n)=>{let r=h(`columnTypes.${n}.name`),o=e.columnVisibility?.hiddenColumns.has(r);return(0,Y.jsxs)(a,{width:`full`,gap:2,children:[(0,Y.jsx)(D,{...f(`columnTypes.${n}.name`,{required:`Column name cannot be empty`}),placeholder:`Column name`}),(0,Y.jsxs)(re,{children:[(0,Y.jsxs)(w,{...f(`columnTypes.${n}.type`),children:[(0,Y.jsx)(`option`,{value:`string`,children:`string`}),(0,Y.jsx)(`option`,{value:`number`,children:`number`}),(0,Y.jsx)(`option`,{value:`boolean`,children:`boolean`}),(0,Y.jsx)(`option`,{value:`date`,children:`date`}),(0,Y.jsx)(`option`,{value:`list`,children:`list`}),(0,Y.jsx)(`option`,{value:`json`,children:`json`}),(0,Y.jsx)(`option`,{value:`image`,children:`image (URL)`}),(0,Y.jsx)(`option`,{value:`chat_messages`,children:`json chat messages (OpenAI format)`}),(0,Y.jsx)(`option`,{value:`spans`,children:`json spans`})]}),(0,Y.jsx)(ne,{})]}),e.columnVisibility&&(0,Y.jsx)(te,{size:`sm`,variant:`ghost`,onClick:()=>e.columnVisibility?.onToggleVisibility(r),color:o?`fg.subtle`:`fg.muted`,"aria-label":o?`Show column`:`Hide column`,title:o?`Show column`:`Hide column`,children:o?(0,Y.jsx)(B,{size:16}):(0,Y.jsx)(ee,{size:16})}),!e.isColumnsLocked&&(0,Y.jsx)(i,{type:`button`,size:`sm`,"aria-label":`Remove column`,onClick:()=>L(n),children:(0,Y.jsx)(j,{size:32})})]},t.id)}),(0,Y.jsx)(p,{children:g.columnTypes?.message}),!e.isColumnsLocked&&(0,Y.jsx)(i,{type:`button`,onClick:()=>I({name:``,type:`string`}),children:`Add Column`})]})})}),(0,Y.jsx)(i,{colorPalette:`blue`,type:`submit`,minWidth:`fit-content`,loading:n.isLoading,children:e.localOnly?`Apply`:e.datasetToSave?`Save`:`Create Dataset`})]})})]})})}var $=(e,t)=>{let n=Object.fromEntries(t.map(e=>[e.name,e.type]));return e.map(e=>{let t={...e};for(let[r,i]of Object.entries(e)){let e=n[r];if(e===`number`)i?isNaN(i)||(t[r]=parseFloat(i)):t[r]=null;else if(e===`boolean`)[`true`,`1`,`yes`,`y`,`on`,`ok`].includes(`${i??``}`.toLowerCase())?t[r]=!0:[`false`,`0`,`null`,`undefined`,`nan`,`inf`,`no`,`n`,`off`].includes(`${i??``}`.toLowerCase())&&(t[r]=!1);else if(e===`date`){let e=new Date(i);e.toString()!==`Invalid Date`&&(t[r]=e.toISOString().split(`T`)[0])}else if(e===`image`)t[r]=i;else if(e!==`string`)try{t[r]=JSON.parse(i)}catch{}}return t})};export{W as a,K as c,H as d,X as i,J as l,me as n,G as o,$ as r,q as s,Q as t,V as u};
|
|
3
|
+
//# sourceMappingURL=AddOrEditDatasetDrawer-BHJmgYGv.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{dn as e,i as t,n}from"./portal-Sdfvrza9.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{n as i,t as a}from"./v-stack-hkuSkmCA.js";import{$ as o,Xn as s,gn as c,n as l}from"./ProjectAvatar-B0tbfKzY.js";import{p as u,t as d}from"./select-BvA110t-.js";import{t as f}from"./badge-Cpc3eA-C.js";import{t as p}from"./spacer-C38e7o6r.js";import{n as m}from"./api-l6Cnm0vQ.js";import{Vt as h}from"./index-8SbDirJv.js";import{t as g}from"./plus-10dP8Fmk.js";import{t as _}from"./users-C1KVK1by.js";var v=r(),y=({annotators:r,setAnnotators:y,queueDrawerOpen:b,sendToQueue:x,isLoading:S,isTrigger:C=!1})=>{let{organization:w,project:T}=h(),E=m.annotation.getQueues.useQuery({projectId:T?.id??``},{enabled:!!T}),D=r.map(e=>e.id),O=m.organization.getOrganizationWithMembersAndTheirTeams.useQuery({organizationId:w?.id??``},{enabled:!!w}).data?.members.map(e=>({label:e.user.name??``,value:`user-${e.user.id}`,image:e.user.image??null})),k=E.data?.map(e=>({label:e.name??``,value:`queue-${e.id}`,image:null})),A=[...O??[],...k??[]],j=u({items:A.map(e=>({label:e.label,value:e.value,image:e.image}))}),M=j.items.filter(e=>!r.some(t=>t.id===e.value));return(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(a,{width:`full`,align:`start`,children:[(0,v.jsx)(i,{children:`Send to:`}),(0,v.jsxs)(d.Root,{collection:j,multiple:!0,value:D,onValueChange:e=>{y(A.filter(t=>e.value.includes(t.value)).map(e=>({id:e.value,name:e.label})))},children:[(0,v.jsx)(d.Trigger,{width:`full`,children:(0,v.jsx)(d.ValueText,{placeholder:`Add Participants`,children:t=>(0,v.jsx)(n,{flexWrap:`wrap`,gap:1,paddingY:2,children:t.map(t=>(0,v.jsxs)(f,{paddingY:1,paddingX:2,borderRadius:`full`,background:`bg.muted`,children:[t.value.startsWith(`user-`)?(0,v.jsx)(o,{size:`2xs`,color:`white`,background:c(`colors`,t.label).color,name:t.label,image:t.image}):(0,v.jsx)(e,{padding:1,children:(0,v.jsx)(_,{size:18})}),t.label,(0,v.jsx)(s,{size:`2xs`,color:`fg.muted`,onClick:e=>{e.stopPropagation(),y(r.filter(e=>e.id!==t.value))}})]},t.value))})})}),(0,v.jsxs)(d.Content,{maxHeight:`300px`,portalled:!1,children:[(0,v.jsx)(e,{maxH:`250px`,overflowY:`auto`,css:{"&::-webkit-scrollbar":{display:`none`},msOverflowStyle:`none`,scrollbarWidth:`none`},children:M.map(t=>(0,v.jsx)(d.Item,{item:t,children:(0,v.jsx)(a,{align:`start`,children:(0,v.jsxs)(n,{children:[t.value.startsWith(`user-`)?(0,v.jsx)(l,{size:`2xs`,name:t.label,image:t.image}):(0,v.jsx)(e,{padding:1,children:(0,v.jsx)(_,{size:18})}),(0,v.jsx)(i,{children:t.label})]})})},t.value))}),M.length==0&&(0,v.jsx)(i,{padding:3,textAlign:`center`,children:`No options`}),(0,v.jsx)(e,{p:2,position:`sticky`,bottom:0,bg:`bg.panel`,borderTop:`1px solid`,borderColor:`border.muted`,children:(0,v.jsxs)(t,{width:`100%`,colorPalette:`blue`,onClick:b?.onOpen,variant:`outline`,size:`sm`,children:[(0,v.jsx)(g,{}),` Add New Queue`]})})]})]}),(0,v.jsx)(p,{}),(0,v.jsxs)(n,{width:`full`,hidden:C,children:[(0,v.jsx)(p,{}),(0,v.jsx)(t,{colorPalette:`orange`,disabled:r.length==0,size:`sm`,onClick:x,loading:S,children:`Send`})]})]})})};export{y as t};
|
|
2
|
+
//# sourceMappingURL=AddParticipants-z6X3xaWh.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,dn as t,n}from"./portal-Sdfvrza9.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{n as i,t as a}from"./v-stack-hkuSkmCA.js";import{o}from"./toaster-BsYkODqs.js";import{G as s}from"./Markdown-Cip8Rj5C.js";import{n as c}from"./personalProject-C9vU_vdl.js";import{n as l}from"./api-l6Cnm0vQ.js";import{t as u}from"./square-pen-BeEJLs7r.js";import{t as d}from"./arrow-up-BNJSVMQt.js";import{t as f}from"./refresh-cw-CjWtrqB1.js";import{D as p,Vn as m,Vt as h,W as g,yr as _}from"./index-8SbDirJv.js";var v=r(),y={"agents.create":{label:`Created`,icon:_},"agents.update":{label:`Updated`,icon:u},"agents.delete":{label:`Deleted`,icon:s},"agents.cascadeArchive":{label:`Archived`,icon:s},"agents.copy":{label:`Replicated`,icon:o},"agents.pushToCopies":{label:`Pushed to replicas`,icon:d},"agents.syncFromSource":{label:`Synced from source`,icon:f}};function b(e){return y[e]??{label:e,icon:m}}function x({agentId:r,agentName:o}){let{closeDrawer:s}=g(),{project:u}=h(),{data:d,isLoading:f,isError:m}=l.agents.getHistory.useQuery({agentId:r,projectId:u?.id??``},{enabled:!!u?.id&&!!r});return(0,v.jsx)(c.Root,{open:!0,placement:`end`,size:`md`,onOpenChange:s,children:(0,v.jsxs)(c.Content,{bg:`bg`,children:[(0,v.jsxs)(c.Header,{children:[(0,v.jsx)(i,{fontWeight:`semibold`,fontSize:`lg`,children:`${o} history`}),(0,v.jsx)(c.CloseTrigger,{})]}),(0,v.jsxs)(c.Body,{children:[f&&(0,v.jsx)(n,{justify:`center`,paddingY:8,children:(0,v.jsx)(e,{})}),m&&(0,v.jsx)(i,{role:`alert`,color:`red.fg`,textAlign:`center`,paddingY:8,children:`Failed to load history.`}),!f&&!m&&(!d||d.length===0)&&(0,v.jsx)(i,{color:`fg.muted`,textAlign:`center`,paddingY:8,children:`No history recorded yet.`}),d&&d.length>0&&(0,v.jsx)(a,{gap:0,align:`stretch`,children:d.map((e,r)=>{let{label:o,icon:s}=b(e.action),c=r===d.length-1;return(0,v.jsxs)(n,{align:`start`,gap:3,children:[(0,v.jsxs)(a,{gap:0,align:`center`,flexShrink:0,width:`24px`,children:[(0,v.jsx)(t,{bg:`blue.subtle`,borderRadius:`full`,padding:1,mt:`2px`,children:(0,v.jsx)(s,{size:12,color:`var(--chakra-colors-blue-fg)`})}),!c&&(0,v.jsx)(t,{width:`1px`,flex:1,minHeight:`24px`,bg:`border.muted`})]}),(0,v.jsxs)(a,{align:`start`,gap:0,paddingBottom:4,flex:1,children:[(0,v.jsx)(i,{fontWeight:`medium`,fontSize:`sm`,children:o}),(0,v.jsxs)(i,{color:`fg.muted`,fontSize:`xs`,children:[e.user?.name??e.user?.email??`Unknown user`,` `,`· `,p(new Date(e.createdAt).getTime())]})]})]},e.id)})})]})]})})}export{x as AgentHistoryDrawer};
|
|
2
|
+
//# sourceMappingURL=AgentHistoryDrawer-kb5K4X01.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
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 ee}from"./heading-C0sACr0w.js";import{n as s,t as c}from"./v-stack-hkuSkmCA.js";import{a as l,r as u}from"./field-BadoNaN5.js";import{n as d}from"./personalProject-C9vU_vdl.js";import{t as te}from"./errors-mlatPkMI.js";import{i as ne,o as f,r as re,t as p}from"./tabs-B6CQXTUQ.js";import{n as m}from"./api-l6Cnm0vQ.js";import"./variables-Dox25KUK.js";import{r as ie}from"./lu-BSZWBZXU.js";import{G as ae,I as oe,Mr as se,Vt as ce,W as le,z as ue}from"./index-8SbDirJv.js";import{t as de}from"./VariablesSection-DW_-pHw8.js";import{r as fe,t as pe}from"./ScenarioInputMappingSection-BewVLFCZ.js";import{t as me}from"./resolve-field-mappings-DAhmwDXD.js";import{a as he,c as ge,i as _e,o as ve,r as ye,s as be,t as xe}from"./http-C64lOZI7.js";var h=e(t()),g=o(),_=`https://api.example.com/agent/chat`,v=`POST`,y=`{
|
|
2
|
+
"thread_id": "{{threadId}}",
|
|
3
|
+
"messages": {{messages}}
|
|
4
|
+
}`,b=`$.choices[0].message.content`,x=[{identifier:`threadId`,type:`str`},{identifier:`input`,type:`str`},{identifier:`messages`,type:`chat_messages`}],Se=new Set(x.map(e=>e.identifier));function Ce(e){return e}function we(e,t,n,r,i,a,o){return{name:`HTTP`,description:`HTTP API endpoint`,url:e,method:t,bodyTemplate:n,outputPath:r,headers:i.length>0?i:void 0,auth:a?.type===`none`?void 0:a,scenarioMappings:Object.keys(o).length>0?o:void 0}}function Te(e){let{project:t}=ce(),{closeDrawer:o,canGoBack:Te,goBack:Ee}=le(),S=oe(),De=ae(),Oe=ue(`agentHttpEditor`),C=m.useContext(),w=e.onClose??o,ke=e.onSave??Oe?.onSave??S.onSave,T=e.agentId??De.agentId??S.agentId,E=e.open!==!1&&e.open!==void 0,D=e.availableSources??S.availableSources,O=e.inputMappings??S.inputMappings,Ae=ue(`agentHttpEditor`),je=e.onInputMappingsChange??Ae?.onInputMappingsChange,[k,Me]=(0,h.useState)(O??{});(0,h.useEffect)(()=>{O&&Me(O)},[O]);let Ne=(0,h.useCallback)((e,t)=>{Me(n=>{let r={...n};return t?r[e]=t:delete r[e],r}),je?.(e,t)},[je]),A=D&&D.length>0,[j,Pe]=(0,h.useState)(``),[M,N]=(0,h.useState)(_),[P,F]=(0,h.useState)(v),[I,L]=(0,h.useState)(y),[R,z]=(0,h.useState)(b),[B,V]=(0,h.useState)([]),[H,U]=(0,h.useState)({type:`none`}),[Fe,W]=(0,h.useState)(!1),[Ie,Le]=(0,h.useState)([]),[G,K]=(0,h.useState)({}),[Re,ze]=(0,h.useState)(A?`variables`:`body`),q=(0,h.useMemo)(()=>[...x,...Ie],[Ie]),Be=(0,h.useCallback)(e=>{Le(e.filter(e=>!Se.has(e.identifier))),W(!0)},[]),J=(0,h.useMemo)(()=>q.some(e=>k[e.identifier]),[q,k]),Ve=(0,h.useMemo)(()=>!A||J?new Set:new Set(q.map(e=>e.identifier)),[A,q,J]),Y=m.agents.getById.useQuery({id:T??``,projectId:t?.id??``},{enabled:!!T&&!!t?.id&&E}),X=(0,h.useRef)(!1),He=(0,h.useRef)(void 0);(0,h.useEffect)(()=>{if(He.current!==T&&(X.current=!1,He.current=T),!X.current)if(Y.data){let e=Ce(Y.data.config);Pe(Y.data.name??``),N(e.url||_),F(e.method??v),L(e.bodyTemplate||y),z(e.outputPath||b),V(e.headers??[]),U(e.auth??{type:`none`});let t=e.scenarioMappings??{};K(Object.keys(t).length>0?t:me({inputs:x})),W(!1),X.current=!0}else!T&&E&&(Pe(``),N(_),F(v),L(y),z(b),V([]),U({type:`none`}),K(me({inputs:x})),W(!1),X.current=!0)},[Y.data,T,E]),(0,h.useEffect)(()=>{E||(X.current=!1)},[E]);let Z=m.agents.create.useMutation({onSuccess:e=>{C.agents.getAll.invalidate({projectId:t?.id??``}),ke?.(e),w()},onError:e=>te({error:e,fallbackTitle:`Couldn't create agent`})}),Ue=m.agents.update.useMutation({onSuccess:e=>{C.agents.getAll.invalidate({projectId:t?.id??``}),C.agents.getById.invalidate({id:e.id,projectId:t?.id??``}),ke?.(e),w()},onError:e=>te({error:e,fallbackTitle:`Couldn't save agent`})}),We=Z.isPending||Ue.isPending,Q=(j?.trim().length??0)>0&&(M?.trim().length??0)>0&&fe({mappings:G}),Ge=(0,h.useCallback)(()=>{if(!t?.id||!Q)return;let e=we(M,P,I,R,B,H,G);T?Ue.mutate({id:T,projectId:t.id,name:j.trim(),config:e}):Z.mutate({projectId:t.id,name:j.trim(),type:`http`,config:e})},[t?.id,T,j,M,P,I,R,B,H,G,Q,Z,Ue]),Ke=(0,h.useCallback)((e,t)=>{K(n=>{if(!t){let t={...n};return delete t[e],t}return{...n,[e]:t}}),W(!0)},[]),$=()=>W(!0),qe=()=>{Fe&&!window.confirm(`You have unsaved changes. Are you sure you want to close?`)||w()},{handleTest:Je}=xe({url:M,method:P,headers:B,auth:H,outputPath:R});return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(d.Root,{open:E,onOpenChange:({open:e})=>!e&&qe(),size:`lg`,closeOnInteractOutside:!1,modal:!1,preventScroll:!1,children:(0,g.jsxs)(d.Content,{bg:`bg`,children:[(0,g.jsx)(d.CloseTrigger,{}),(0,g.jsx)(d.Header,{children:(0,g.jsxs)(a,{gap:2,children:[Te&&(0,g.jsx)(i,{variant:`ghost`,size:`sm`,onClick:Ee,padding:1,minWidth:`auto`,"data-testid":`back-button`,children:(0,g.jsx)(ie,{size:20})}),(0,g.jsx)(ee,{children:T?`Edit HTTP Agent`:`New HTTP Agent`})]})}),(0,g.jsx)(d.Body,{display:`flex`,flexDirection:`column`,overflow:`hidden`,padding:0,children:T&&Y.isLoading?(0,g.jsx)(a,{justify:`center`,paddingY:8,children:(0,g.jsx)(n,{size:`md`})}):(0,g.jsxs)(c,{gap:4,align:`stretch`,flex:1,overflow:`hidden`,children:[(0,g.jsx)(r,{paddingX:6,paddingTop:4,children:(0,g.jsxs)(l,{required:!0,children:[(0,g.jsx)(u,{children:`Agent Name`}),(0,g.jsx)(se,{value:j,onChange:e=>{Pe(e.target.value),$()},placeholder:`Enter agent name`,"data-testid":`agent-name-input`})]})}),(0,g.jsx)(r,{paddingX:6,children:(0,g.jsxs)(a,{gap:2,children:[(0,g.jsx)(he,{value:P,onChange:e=>{F(e),$()}}),(0,g.jsx)(se,{value:M,onChange:e=>{N(e.target.value),$()},placeholder:`https://api.example.com/agent/chat`,flex:1,"data-testid":`url-input`})]})}),(0,g.jsxs)(ne,{value:Re,onValueChange:e=>ze(e.value),flex:1,display:`flex`,flexDirection:`column`,overflow:`hidden`,colorPalette:`blue`,children:[(0,g.jsxs)(re,{paddingX:6,borderBottomWidth:`1px`,borderColor:`border`,children:[(0,g.jsx)(f,{value:`body`,children:`Body`}),A&&(0,g.jsx)(f,{value:`variables`,children:`Variables`}),(0,g.jsx)(f,{value:`auth`,children:`Auth`}),(0,g.jsx)(f,{value:`headers`,children:`Headers`}),(0,g.jsx)(f,{value:`test`,children:`Test`})]}),(0,g.jsx)(p,{value:`body`,flex:1,overflowY:`auto`,paddingX:6,paddingY:4,children:(0,g.jsxs)(c,{gap:6,align:`stretch`,children:[(0,g.jsxs)(l,{children:[(0,g.jsx)(u,{children:`Request Body Template`}),(0,g.jsx)(s,{fontSize:`sm`,color:`fg.muted`,marginBottom:2,children:`JSON body with mustache variables. Variables are replaced at runtime.`}),(0,g.jsx)(be,{value:I,onChange:e=>{L(e),$()}})]}),(0,g.jsxs)(l,{children:[(0,g.jsx)(u,{children:`Output Path (JSONPath)`}),(0,g.jsx)(ye,{value:R,onChange:e=>{z(e),$()}})]}),(0,g.jsx)(pe,{inputs:q,mappings:G,onMappingChange:Ke})]})}),A&&(0,g.jsx)(p,{value:`variables`,flex:1,overflowY:`auto`,paddingX:6,paddingY:4,children:(0,g.jsxs)(c,{gap:4,align:`stretch`,children:[(0,g.jsxs)(s,{fontSize:`sm`,color:`fg.muted`,children:[`Define variables to use in your body template (e.g.,`,` `,(0,g.jsx)(s,{as:`span`,fontFamily:`mono`,bg:`bg.subtle`,paddingX:1,children:`{{input}}`}),`) and map them to your evaluation dataset. At least one variable must be mapped.`]}),(0,g.jsx)(de,{title:`Input Variables`,variables:q,onChange:Be,showMappings:!0,availableSources:D,mappings:k,onMappingChange:Ne,canAddRemove:!0,readOnly:!1,lockedVariables:Se,missingMappingIds:Ve,showMissingMappingsError:!1,optionalHighlighting:!0}),!J&&(0,g.jsx)(s,{"data-testid":`at-least-one-mapping-error`,color:`red.500`,fontSize:`sm`,children:`At least one variable must be mapped`})]})}),(0,g.jsx)(p,{value:`auth`,flex:1,overflowY:`auto`,paddingX:6,paddingY:4,children:(0,g.jsx)(ge,{value:H,onChange:e=>{U(e),$()}})}),(0,g.jsx)(p,{value:`headers`,flex:1,overflowY:`auto`,paddingX:6,paddingY:4,children:(0,g.jsx)(ve,{value:B,onChange:e=>{V(e),$()}})}),(0,g.jsx)(p,{value:`test`,flex:1,overflowY:`auto`,paddingX:6,paddingY:4,children:(0,g.jsx)(_e,{onTest:Je,url:M,method:P,headers:B,outputPath:R,bodyTemplate:I})})]})]})}),(0,g.jsx)(d.Footer,{borderTopWidth:`1px`,borderColor:`border`,children:(0,g.jsxs)(a,{gap:3,children:[(0,g.jsx)(i,{variant:`outline`,onClick:qe,children:`Cancel`}),(0,g.jsx)(i,{colorPalette:`blue`,onClick:Ge,disabled:!Q||We,loading:We,"data-testid":`save-agent-button`,children:T?`Save Changes`:`Create Agent`})]})})]})})})}export{Te as t};
|
|
5
|
+
//# sourceMappingURL=AgentHttpEditorDrawer-Cf-aA1pn.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{s as u}from"./shikiAdapter-Ctbe7cQu.js";import{An as d}from"./ProjectAvatar-B0tbfKzY.js";import{n as f}from"./toaster-BsYkODqs.js";import{G as p,I as m}from"./Markdown-Cip8Rj5C.js";import{n as h}from"./personalProject-C9vU_vdl.js";import{n as g}from"./api-l6Cnm0vQ.js";import{t as _}from"./code-MiD0yvEx.js";import{t as v}from"./globe-Bc_PfXMH.js";import{Hn as y,I as b,Qn as x,Vt as S,W as C,lt as w,nr as T,yr as E,z as D}from"./index-8SbDirJv.js";import{t as O}from"./CascadeArchiveDialog-BPqLe1Ai.js";var k=e(t()),A=o();function j(e){let{project:t}=S(),{closeDrawer:r,openDrawer:o}=C(),u=b(),d=g.useContext(),p=D(`agentList`),m=e.onClose??p?.onClose??r,_=e.onSelect??p?.onSelect??u.onSelect,v=e.onEdit??u.onEdit,y=e.onCreateNew??p?.onCreateNew??(()=>o(`agentTypeSelector`)),w=e.open!==!1&&e.open!==void 0,[T,E]=(0,k.useState)(null),j=g.agents.getAll.useQuery({projectId:t?.id??``},{enabled:!!t?.id&&w}),N=g.agents.getRelatedEntities.useQuery({id:T?.id??``,projectId:t?.id??``},{enabled:!!T&&!!t?.id}),P=g.agents.delete.useMutation({onSuccess:()=>{d.agents.getAll.invalidate({projectId:t?.id??``})}}),I=g.agents.cascadeArchive.useMutation({onSuccess:e=>{E(null),d.agents.getAll.invalidate({projectId:t?.id??``}),f.create({title:`Agent deleted`,description:e.archivedWorkflow?`Also deleted: 1 workflow`:void 0,type:`success`,meta:{closable:!0}})},onError:()=>{f.create({title:`Error deleting agent`,description:`Please try again later.`,type:`error`})}}),L=e=>{_?.(e),m()},R=e=>{if(v){v(e);return}if(e.type===`http`){o(`agentHttpEditor`,{agentId:e.id});return}if(e.type===`workflow`){o(`agentWorkflowEditor`,{agentId:e.id});return}o(`agentCodeEditor`,{agentId:e.id})},z=e=>{E(e)};return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(h.Root,{open:w,onOpenChange:({open:e})=>!e&&m(),size:`md`,modal:!1,children:(0,A.jsxs)(h.Content,{bg:`bg`,children:[(0,A.jsx)(h.CloseTrigger,{}),(0,A.jsx)(h.Header,{children:(0,A.jsxs)(a,{gap:2,justify:`space-between`,width:`full`,children:[(0,A.jsx)(s,{children:`Choose Agent`}),(0,A.jsxs)(i,{size:`sm`,colorPalette:`blue`,onClick:y,"data-testid":`new-agent-button`,children:[(0,A.jsx)(x,{size:16}),`New Agent`]})]})}),(0,A.jsx)(h.Body,{display:`flex`,flexDirection:`column`,overflow:`hidden`,padding:0,children:(0,A.jsxs)(l,{gap:4,align:`stretch`,flex:1,overflow:`hidden`,children:[(0,A.jsx)(c,{color:`fg.muted`,fontSize:`sm`,paddingX:6,paddingTop:4,children:`Select an existing agent or create a new one.`}),(0,A.jsx)(l,{gap:2,align:`stretch`,flex:1,overflowY:`auto`,paddingX:6,paddingBottom:4,children:j.isLoading?(0,A.jsx)(a,{justify:`center`,paddingY:8,children:(0,A.jsx)(n,{size:`md`})}):j.data?.length===0?(0,A.jsx)(M,{onCreateNew:y}):j.data?.map(e=>(0,A.jsx)(F,{agent:e,onClick:()=>L(e),onEdit:()=>R(e),onDelete:()=>z(e)},e.id))})]})}),(0,A.jsx)(h.Footer,{borderTopWidth:`1px`,borderColor:`border`,children:(0,A.jsx)(i,{variant:`outline`,onClick:m,children:`Cancel`})})]})}),(0,A.jsx)(O,{open:!!T,onClose:()=>E(null),onConfirm:()=>{!T||!t||(N.data?.workflow?I.mutate({id:T.id,projectId:t.id}):P.mutate({id:T.id,projectId:t.id},{onSuccess:()=>{E(null),f.create({title:`Agent deleted`,type:`success`,meta:{closable:!0}})},onError:()=>{f.create({title:`Error deleting agent`,description:`Please try again later.`,type:`error`})}}))},isLoading:I.isPending||P.isPending,isLoadingRelated:N.isLoading,entityType:`agent`,entityName:T?.name??``,relatedEntities:{workflows:N.data?.workflow?[N.data.workflow]:[]}})]})}function M({onCreateNew:e}){return(0,A.jsxs)(l,{paddingY:12,gap:4,textAlign:`center`,children:[(0,A.jsx)(r,{padding:4,borderRadius:`full`,bg:`bg.muted`,color:`fg.muted`,children:(0,A.jsx)(E,{size:32})}),(0,A.jsxs)(l,{gap:1,children:[(0,A.jsx)(c,{fontWeight:`medium`,color:`fg`,children:`No agents yet`}),(0,A.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`Create your first agent to get started`})]}),(0,A.jsxs)(i,{colorPalette:`blue`,onClick:e,"data-testid":`create-first-agent-button`,children:[(0,A.jsx)(x,{size:16}),`Create your first agent`]})]})}var N={signature:u,code:_,workflow:y,http:v},P={signature:`Prompt`,code:`Code`,workflow:`Workflow`,http:`HTTP`};function F({agent:e,onClick:t,onEdit:n,onDelete:o}){let s=N[e.type]??E,u=P[e.type]??e.type,[f,h]=(0,k.useState)(!1);return(0,A.jsx)(r,{position:`relative`,padding:4,borderRadius:`md`,border:`1px solid`,borderColor:`border`,bg:`bg.panel`,textAlign:`left`,width:`full`,_hover:{borderColor:`blue.muted`,bg:`blue.subtle`},transition:`all 0.15s`,cursor:`pointer`,onClick:t,"data-testid":`agent-card-${e.id}`,children:(0,A.jsxs)(a,{gap:3,children:[(0,A.jsxs)(r,{display:`flex`,alignItems:`center`,gap:3,flex:1,textAlign:`left`,children:[(0,A.jsx)(r,{color:`blue.fg`,children:(0,A.jsx)(s,{size:20})}),(0,A.jsxs)(l,{align:`start`,gap:0,flex:1,children:[(0,A.jsx)(c,{fontWeight:`medium`,fontSize:`sm`,children:e.name}),(0,A.jsxs)(a,{gap:2,fontSize:`xs`,color:`fg.muted`,children:[(0,A.jsx)(c,{children:u}),(0,A.jsx)(c,{children:`•`}),(0,A.jsxs)(c,{children:[`Updated`,` `,w(new Date(e.updatedAt),{addSuffix:!0})]})]})]})]}),(0,A.jsxs)(m.Root,{open:f,onOpenChange:e=>h(e.open),positioning:{placement:`bottom-end`},children:[(0,A.jsx)(m.Trigger,{asChild:!0,children:(0,A.jsx)(i,{variant:`ghost`,size:`xs`,padding:1,minWidth:`auto`,onClick:e=>{e.stopPropagation()},"data-testid":`agent-menu-${e.id}`,children:(0,A.jsx)(d,{size:16})})}),(0,A.jsxs)(m.Content,{minWidth:`160px`,children:[(0,A.jsx)(m.Item,{value:`edit`,onClick:e=>{e.stopPropagation(),h(!1),n()},children:(0,A.jsxs)(a,{gap:2,children:[(0,A.jsx)(T,{size:14}),(0,A.jsx)(c,{children:`Edit Agent`})]})}),(0,A.jsx)(r,{borderTopWidth:`1px`,borderColor:`border`,my:1}),(0,A.jsx)(m.Item,{value:`delete`,onClick:e=>{e.stopPropagation(),h(!1),o()},children:(0,A.jsxs)(a,{gap:2,color:`red.fg`,children:[(0,A.jsx)(p,{size:14}),(0,A.jsx)(c,{children:`Delete Agent`})]})})]})]})]})})}export{j as AgentListDrawer};
|
|
2
|
+
//# sourceMappingURL=AgentListDrawer-z4OL5IVm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-DAXXjFlN.js";import{dn as t,i 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{n as c}from"./personalProject-C9vU_vdl.js";import{t as l}from"./code-MiD0yvEx.js";import{t as u}from"./globe-Bc_PfXMH.js";import{r as d}from"./lu-BSZWBZXU.js";import{Hn as f,I as p,W as m}from"./index-8SbDirJv.js";var h=e({AgentTypeSelectorDrawer:()=>v}),g=i(),_=[{type:`http`,icon:u,title:`HTTP Agent`,description:`Connect to an external API endpoint to process requests`},{type:`code`,icon:l,title:`Code Agent`,description:`Write custom Python code to process inputs and generate outputs`},{type:`workflow`,icon:f,title:`Workflow Agent`,description:`Create a new workflow for custom agent logic`}];function v(e){let{closeDrawer:t,openDrawer:i,canGoBack:l,goBack:u}=m(),f=p(),h=e.onClose??t,v=e.onSelect??f.onSelect,b=e.open!==!1&&e.open!==void 0,x=e=>{switch(v?.(e),e){case`code`:i(`agentCodeEditor`);break;case`workflow`:i(`workflowSelector`);break;case`http`:i(`agentHttpEditor`);break;default:throw Error(`Unhandled agent type: ${e}`)}};return(0,g.jsx)(c.Root,{open:b,onOpenChange:({open:e})=>!e&&h(),size:`md`,modal:!1,children:(0,g.jsxs)(c.Content,{bg:`bg`,children:[(0,g.jsx)(c.CloseTrigger,{}),(0,g.jsx)(c.Header,{children:(0,g.jsxs)(r,{gap:2,children:[l&&(0,g.jsx)(n,{variant:`ghost`,size:`sm`,onClick:u,padding:1,minWidth:`auto`,"data-testid":`back-button`,children:(0,g.jsx)(d,{size:20})}),(0,g.jsx)(a,{children:`Choose Agent Type`})]})}),(0,g.jsx)(c.Body,{display:`flex`,flexDirection:`column`,overflow:`hidden`,padding:0,children:(0,g.jsxs)(s,{gap:4,align:`stretch`,flex:1,overflow:`hidden`,children:[(0,g.jsx)(o,{color:`fg.muted`,fontSize:`sm`,paddingX:6,paddingTop:4,children:`Select the type of agent you want to create.`}),(0,g.jsx)(s,{gap:3,align:`stretch`,paddingX:6,paddingBottom:4,children:_.map(e=>(0,g.jsx)(y,{...e,onClick:()=>x(e.type)},e.type))})]})}),(0,g.jsx)(c.Footer,{borderTopWidth:`1px`,borderColor:`border`,children:(0,g.jsx)(n,{variant:`outline`,onClick:h,children:`Cancel`})})]})})}function y({type:e,icon:n,title:i,description:a,onClick:c}){return(0,g.jsx)(t,{as:`button`,onClick:c,padding:4,borderRadius:`lg`,border:`1px solid`,borderColor:`border`,bg:`bg.panel`,textAlign:`left`,width:`full`,_hover:{borderColor:`blue.muted`,bg:`blue.subtle`},transition:`all 0.15s`,"data-testid":`agent-type-${e}`,cursor:`pointer`,children:(0,g.jsxs)(r,{gap:3,align:`start`,children:[(0,g.jsx)(t,{padding:1,borderRadius:`md`,bg:`blue.subtle`,color:`blue.fg`,children:(0,g.jsx)(n,{size:18})}),(0,g.jsxs)(s,{align:`start`,gap:1,flex:1,children:[(0,g.jsx)(o,{fontWeight:`500`,fontSize:`sm`,children:i}),(0,g.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:a})]})]})})}export{h as n,v as t};
|
|
2
|
+
//# sourceMappingURL=AgentTypeSelectorDrawer-Ky7GOYHj.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{a as ee}from"./toaster-BsYkODqs.js";import{a as u,r as d}from"./field-BadoNaN5.js";import{n as f}from"./personalProject-C9vU_vdl.js";import{t as p}from"./errors-mlatPkMI.js";import{n as m}from"./api-l6Cnm0vQ.js";import{r as te}from"./lu-BSZWBZXU.js";import{G as ne,Mr as h,Vt as g,W as _,t as v}from"./index-8SbDirJv.js";import{r as y,t as b}from"./ScenarioInputMappingSection-BewVLFCZ.js";import{n as x}from"./WorkflowCard-C_ClnTV_.js";import{a as S}from"./nodeUtils-DBBk3sXl.js";import{t as re}from"./resolve-field-mappings-DAhmwDXD.js";var C=e(t()),w=o();function T(e){return e}function E(e){if(!e)return{inputs:[],outputs:[]};let t=S(e.edges,e.nodes).flatMap(e=>typeof e.identifier==`string`?[{identifier:e.identifier,type:`str`}]:[]),n=e.nodes.find(e=>e.type===`end`||e.id===`end`)?.data;return{inputs:t,outputs:(Array.isArray(n?.inputs)?n.inputs:[]).flatMap(e=>typeof e.identifier==`string`?[{identifier:e.identifier,type:`str`}]:[])}}function D(e){let{project:t}=g(),{closeDrawer:o,canGoBack:S,goBack:D}=_(),O=ne(),k=m.useContext(),A=e.onClose??o,j=e.onSave,M=e.agentId??O.agentId,N=e.open!==!1&&e.open!==void 0,[P,F]=(0,C.useState)(``),[I,L]=(0,C.useState)({}),[R,z]=(0,C.useState)(void 0),[B,V]=(0,C.useState)(!1),H=(0,C.useRef)(!1),U=(0,C.useRef)(void 0),W=m.agents.getById.useQuery({id:M??``,projectId:t?.id??``},{enabled:!!M&&!!t?.id&&N}),G=(0,C.useMemo)(()=>W.data?W.data.workflowId||T(W.data.config).workflow_id:void 0,[W.data]),K=m.workflow.getById.useQuery({projectId:t?.id??``,workflowId:G??``},{enabled:!!G&&!!t?.id&&N}),{inputs:q,outputs:J}=(0,C.useMemo)(()=>E(K.data?.currentVersion?.dsl??void 0),[K.data]);(0,C.useEffect)(()=>{if(U.current!==M&&(H.current=!1,U.current=M),!H.current&&W.data){let e=T(W.data.config),t=e.scenarioMappings??{},n=Object.keys(t).length>0;if(!n&&G&&K.isLoading)return;F(W.data.name);let r=q.length>0?q:[{identifier:`input`,type:`str`}];L(n?t:re({inputs:r})),z(e.scenarioOutputField),V(!1),H.current=!0}},[W.data,q,G,K.isLoading,M]);let Y=m.agents.update.useMutation({onSuccess:e=>{k.agents.getAll.invalidate({projectId:t?.id??``}),k.agents.getById.invalidate({id:e.id,projectId:t?.id??``}),j?.(e),A()},onError:e=>p({error:e,fallbackTitle:`Couldn't save agent`})}),X=Y.isPending,Z=P.trim().length>0&&q.length>0&&J.length>0&&y({mappings:I}),ie=(0,C.useCallback)(()=>{if(!t?.id||!M||!Z||!W.data)return;let e={...T(W.data.config),name:P.trim(),scenarioMappings:Object.keys(I).length>0?I:void 0,scenarioOutputField:R};Y.mutate({id:M,projectId:t.id,name:P.trim(),config:e})},[t?.id,M,P,I,R,Z,W.data,Y]),ae=e=>{F(e),V(!0)},oe=(0,C.useCallback)((e,t)=>{L(n=>{if(!t){let t={...n};return delete t[e],t}return{...n,[e]:t}}),V(!0)},[]),se=(0,C.useCallback)(e=>{z(e),V(!0)},[]),Q=()=>{B&&!window.confirm(`You have unsaved changes. Are you sure you want to close?`)||A()},ce=q.length>0?q:[{identifier:`input`,type:`str`}],$=t&&G?`/${t.slug}/studio/${G}`:void 0;return(0,w.jsx)(f.Root,{open:N,onOpenChange:({open:e})=>!e&&Q(),size:`lg`,closeOnInteractOutside:!1,modal:!1,preventScroll:!1,children:(0,w.jsxs)(f.Content,{bg:`bg`,children:[(0,w.jsx)(f.CloseTrigger,{}),(0,w.jsx)(f.Header,{children:(0,w.jsxs)(a,{gap:2,children:[S&&(0,w.jsx)(i,{variant:`ghost`,size:`sm`,onClick:D,padding:1,minWidth:`auto`,"data-testid":`back-button`,children:(0,w.jsx)(te,{size:20})}),(0,w.jsx)(s,{children:`Edit Workflow Agent`})]})}),(0,w.jsx)(f.Body,{display:`flex`,flexDirection:`column`,overflow:`hidden`,padding:0,children:M&&(W.isLoading||K.isLoading)?(0,w.jsx)(a,{justify:`center`,paddingY:8,children:(0,w.jsx)(n,{size:`md`})}):(0,w.jsxs)(l,{gap:4,align:`stretch`,flex:1,paddingX:6,paddingY:4,overflowY:`auto`,children:[(0,w.jsxs)(u,{required:!0,children:[(0,w.jsx)(d,{children:`Agent Name`}),(0,w.jsx)(h,{value:P,onChange:e=>ae(e.target.value),placeholder:`Enter agent name`,"data-testid":`agent-name-input`})]}),K.data&&(0,w.jsxs)(u,{children:[(0,w.jsx)(d,{children:`Linked Workflow`}),$?(0,w.jsx)(v,{href:$,isExternal:!0,"data-testid":`open-workflow-editor-link`,children:(0,w.jsx)(x,{name:K.data.name,icon:K.data.icon,updatedAt:K.data.updatedAt,action:(0,w.jsx)(ee,{size:16,color:`var(--chakra-colors-fg-muted)`}),width:`300px`})}):(0,w.jsx)(x,{name:K.data.name,icon:K.data.icon,updatedAt:K.data.updatedAt,width:`300px`}),(0,w.jsx)(c,{fontSize:`xs`,color:`fg.muted`,marginTop:1,children:`Edit the workflow's nodes and logic in the studio. The mappings below control how scenario data flows into its entry inputs and which end output is returned.`})]}),q.length===0&&(0,w.jsx)(c,{fontSize:`xs`,color:`fg.error`,children:`This workflow has no entry inputs yet. Publish a version with at least one entry input before running it as a scenario target.`}),J.length===0&&(0,w.jsx)(c,{fontSize:`xs`,color:`fg.error`,children:`This workflow has no end outputs yet. Publish a version with at least one end output before running it as a scenario target.`}),(0,w.jsx)(r,{children:(0,w.jsx)(b,{inputs:ce,mappings:I,onMappingChange:oe,outputs:J,outputField:R,onOutputFieldChange:se})})]})}),(0,w.jsx)(f.Footer,{borderTopWidth:`1px`,borderColor:`border`,children:(0,w.jsxs)(a,{gap:3,children:[(0,w.jsx)(i,{variant:`outline`,onClick:Q,children:`Cancel`}),(0,w.jsx)(i,{colorPalette:`blue`,onClick:ie,disabled:!Z||X,loading:X,"data-testid":`save-agent-button`,children:`Save Changes`})]})})]})})}export{D as AgentWorkflowEditorDrawer};
|
|
2
|
+
//# sourceMappingURL=AgentWorkflowEditorDrawer-CAszeo8y.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,i as r,n as i}from"./portal-Sdfvrza9.js";import{t as a}from"./jsx-runtime-CFwixLRt.js";import{t as o}from"./heading-C0sACr0w.js";import{n as s,t as c}from"./v-stack-hkuSkmCA.js";import{a as l}from"./toaster-BsYkODqs.js";import{a as u,r as d}from"./field-BadoNaN5.js";import{n as f}from"./personalProject-C9vU_vdl.js";import{n as p}from"./api-l6Cnm0vQ.js";import"./variables-Dox25KUK.js";import{r as m}from"./lu-BSZWBZXU.js";import{G as h,I as g,Vt as _,W as v,t as y,z as b}from"./index-8SbDirJv.js";import{t as x}from"./VariablesSection-DW_-pHw8.js";import{n as S}from"./WorkflowCard-C_ClnTV_.js";import{a as C}from"./nodeUtils-DBBk3sXl.js";var w=e(t());function T(e){return e?C(e.edges,e.nodes).flatMap(e=>typeof e.identifier==`string`?[{identifier:e.identifier,type:e.type}]:[]):[]}function E({agentId:e,projectId:t,projectSlug:n,isOpen:r}){let i=p.agents.getById.useQuery({id:e??``,projectId:t??``},{enabled:!!e&&!!t&&r}),a=(0,w.useMemo)(()=>{if(!i.data)return;let e=i.data;return e.workflowId?e.workflowId:e.config.workflow_id},[i.data]),o=p.workflow.getById.useQuery({projectId:t??``,workflowId:a??``},{enabled:!!a&&!!t&&r}),s=(0,w.useMemo)(()=>T(o.data?.currentVersion?.dsl),[o.data]),c=!i.isLoading&&!!e&&!i.data||!!a&&!o.isLoading&&!o.data;return{workflowQuery:o,variablesForUI:c?[]:s.length>0?s:[{identifier:`input`,type:`str`}],editorHref:n&&a?`/${n}/studio/${a}`:void 0,isLoading:!!e&&(i.isLoading||o.isLoading),hasLookupFailed:c}}var D=a();function O(e){let{project:t}=_(),{closeDrawer:a,canGoBack:p,goBack:C}=v(),w=g(),T=h(),O=b(`agentWorkflowTargetEditor`),k=e.onClose??a,A=e.agentId??T.agentId??w.agentId,j=e.open!==!1&&e.open!==void 0,M=e.availableSources??w.availableSources,N=e.inputMappings??w.inputMappings,P=e.onInputMappingsChange??O?.onInputMappingsChange,{workflowQuery:F,variablesForUI:I,editorHref:L,isLoading:R,hasLookupFailed:z}=E({agentId:A,projectId:t?.id,projectSlug:t?.slug,isOpen:j});return(0,D.jsx)(f.Root,{open:j,onOpenChange:({open:e})=>!e&&k(),size:`lg`,closeOnInteractOutside:!1,modal:!1,preventScroll:!1,children:(0,D.jsxs)(f.Content,{bg:`bg`,children:[(0,D.jsx)(f.CloseTrigger,{}),(0,D.jsx)(f.Header,{children:(0,D.jsxs)(i,{gap:2,children:[p&&(0,D.jsx)(r,{variant:`ghost`,size:`sm`,onClick:C,padding:1,minWidth:`auto`,"data-testid":`back-button`,children:(0,D.jsx)(m,{size:20})}),(0,D.jsx)(o,{children:`Workflow Agent`})]})}),(0,D.jsx)(f.Body,{display:`flex`,flexDirection:`column`,overflow:`hidden`,padding:0,children:R?(0,D.jsx)(i,{justify:`center`,paddingY:8,children:(0,D.jsx)(n,{size:`md`})}):(0,D.jsxs)(c,{gap:4,align:`stretch`,flex:1,paddingX:6,paddingY:4,overflowY:`auto`,children:[F.data&&(0,D.jsxs)(u,{children:[(0,D.jsx)(d,{children:`Workflow`}),L?(0,D.jsx)(y,{href:L,isExternal:!0,"data-testid":`open-workflow-link`,children:(0,D.jsx)(S,{name:F.data.name,icon:F.data.icon,updatedAt:F.data.updatedAt,action:(0,D.jsx)(l,{size:16,color:`var(--chakra-colors-fg-muted)`}),width:`300px`})}):(0,D.jsx)(S,{name:F.data.name,icon:F.data.icon,updatedAt:F.data.updatedAt,width:`300px`})]}),z?(0,D.jsx)(s,{fontSize:`sm`,color:`fg.error`,"data-testid":`workflow-lookup-error`,children:`Couldn't load this workflow's agent or its linked workflow, so its real input fields aren't known. Mapping is unavailable until it loads successfully.`}):(0,D.jsx)(x,{title:`Input Variables`,variables:I,onChange:()=>{},showMappings:!0,availableSources:M,mappings:N,onMappingChange:P,canAddRemove:!1,readOnly:!1})]})}),(0,D.jsx)(f.Footer,{borderTopWidth:`1px`,borderColor:`border`,children:(0,D.jsx)(r,{onClick:k,"data-testid":`close-drawer-button`,children:`Close`})})]})})}export{O as AgentWorkflowTargetEditorDrawer};
|
|
2
|
+
//# sourceMappingURL=AgentWorkflowTargetEditorDrawer-DWrxkhIq.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./jsx-runtime-CFwixLRt.js";import{a as t,d as n}from"./toaster-BsYkODqs.js";import{Y as r,Z as i}from"./immer-DImI3Uq2.js";import{t as a}from"./brain-BX4ydSFF.js";import{t as o}from"./route-B41YftNf.js";import{Bn as s,qn as c}from"./index-8SbDirJv.js";import{t as l}from"./SectionNavigationLayout-DwPBnqYj.js";var u=n(`chart-line`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]]),d=e();function f({children:e,pageTitle:n}){return(0,d.jsx)(l,{sectionLabel:`AI Gateway`,orgScope:!0,pageTitle:n,navigationItems:[{label:`Virtual Keys`,href:`/settings/gateway/virtual-keys`,includePath:`/settings/gateway/virtual-keys`,icon:(0,d.jsx)(r,{size:14})},{label:`Model Providers`,href:`/settings/model-providers`,includePath:`/settings/model-providers`,icon:(0,d.jsx)(a,{size:14}),menuEnd:(0,d.jsx)(t,{size:12,"aria-hidden":!0}),target:`_blank`},{label:`Budgets`,href:`/settings/gateway/budgets`,includePath:`/settings/gateway/budgets`,icon:(0,d.jsx)(i,{size:14})},{label:`Cache Rules`,href:`/settings/gateway/cache-rules`,includePath:`/settings/gateway/cache-rules`,icon:(0,d.jsx)(s,{size:14})},{label:`Guardrails`,href:`/settings/gateway/guardrails`,includePath:`/settings/gateway/guardrails`,icon:(0,d.jsx)(c,{size:14})},{label:`Usage`,href:`/settings/gateway/usage`,includePath:`/settings/gateway/usage`,icon:(0,d.jsx)(u,{size:14})},{label:`Routing Policies`,href:`/settings/routing-policies`,includePath:`/settings/routing-policies`,icon:(0,d.jsx)(o,{size:14})}],children:e})}export{u as n,f as t};
|
|
2
|
+
//# sourceMappingURL=AiGatewayLayout-BqznP5T2.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{dn as n,i as r,n as i}from"./portal-Sdfvrza9.js";import{t as a}from"./jsx-runtime-CFwixLRt.js";import{t as o}from"./skeleton-0JSrjbwm.js";import{t as s}from"./heading-C0sACr0w.js";import{n as c,t as l}from"./v-stack-hkuSkmCA.js";import{At as u,jt as d,ln as f,mn as p,n as m}from"./ProjectAvatar-B0tbfKzY.js";import{t as h}from"./badge-Cpc3eA-C.js";import{t as g}from"./tooltip-CM-lMDNU.js";import{$ as _,I as v,J as y,Q as b,X as x,Y as S,Z as C}from"./Markdown-Cip8Rj5C.js";import{t as w}from"./spacer-C38e7o6r.js";import{B as T}from"./immer-DImI3Uq2.js";import{r as E}from"./next-router-CWLrMXvP.js";import{Vt as D,W as O,t as k}from"./index-8SbDirJv.js";import{t as A}from"./edit-3WDhqC-Q.js";import{t as j}from"./useAnnotationQueues-BMo2kZ_n.js";import{t as M}from"./message-circle-B_y3A1Db.js";import{t as ee}from"./more-vertical-CnKfgTmQ.js";import{t as te}from"./TraceIdPeek-DDi0ChdF.js";import{t as ne}from"./LangyContextTarget-Dxr919ue.js";import{n as re,t as ie}from"./NavigationFooter-GfOzirbT.js";import{t as N}from"./NoDataInfoBlock-Busjhz63.js";var P=e(t()),F=a(),I=({createdByUser:e,annotations:t})=>{let n=new Map;return e&&n.set(e.id,e),t.forEach(e=>{e.user&&n.set(e.user.id,e.user)}),(0,F.jsx)(i,{gap:2,children:Array.from(n.values()).map((e,t)=>(0,F.jsx)(m,{size:`2xs`,name:e.name??``,image:e.image,css:{border:`2px solid white`,"&:not(:first-of-type)":{marginLeft:`-20px`}}},e.id))})};function L(e){if(e==null)return;let t=typeof e==`number`?e:Date.parse(e);return Number.isFinite(t)&&t>0?Math.floor(t):void 0}var R=({isDone:e,noDataTitle:t,noDataDescription:a,heading:m,tableHeader:R,queueId:z,showQueueAndUser:B,groupedAnnotations:V,allAnnotationsLoading:H})=>{let U=E(),{project:W}=D(),{scoreOptions:G}=j(),{openDrawer:K}=O(),q=re(),[J,ae]=(0,P.useState)(`pending`),{assignedQueueItems:oe,queuesLoading:Y,totalCount:se}=j({selectedAnnotations:J,queueId:z,showQueueAndUser:B}),X=V?V.map(e=>({id:e.traceId,doneAt:null,createdByUser:null,createdAt:e.trace?.timestamps?.started_at?new Date(e.trace.timestamps.started_at):new Date,traceId:e.traceId,trace:e.trace,annotations:e.annotations,scoreOptions:e.scoreOptions})):(e=>e.map(e=>({id:e.id,doneAt:e.doneAt?new Date(e.doneAt):null,createdByUser:e.createdByUser?{name:e.createdByUser.name,id:e.createdByUser.id,image:e.createdByUser.image??null}:null,createdAt:e.createdAt?new Date(e.createdAt):new Date,traceId:e.traceId,trace:e.trace||void 0,annotations:e.annotations||[],scoreOptions:e.scoreOptions||void 0})))(oe||[]),ce=(e,t)=>{U.push(`/${W?.slug}/annotations/my-queue?queue-item=${e}&trace=${t}`)},le=e=>{K(`traceDetails`,{traceId:e,showMessages:!0})},ue=(t,n,r)=>{e??r?le(t):ce(n,t)},de=(0,P.useMemo)(()=>G.data?G.data.filter(e=>e.active===!0).map(e=>e.id):[],[G.data]),Z=(e,t)=>t.length>0&&e.length>0?t.map(t=>(0,F.jsx)(S,{minWidth:200,children:(0,F.jsx)(l,{divideX:`1px`,width:`full`,align:`start`,gap:2,children:e.map(e=>{let r=e.scoreOptions;return r?.[t]?.value?(0,F.jsx)(n,{children:(0,F.jsxs)(i,{gap:0,children:[Array.isArray(r[t]?.value)?(0,F.jsx)(i,{gap:1,wrap:`wrap`,children:(r[t]?.value).map((e,t)=>(0,F.jsx)(h,{children:e},t))}):(0,F.jsx)(h,{children:r[t]?.value}),r[t]?.reason&&(0,F.jsx)(g,{content:r[t]?.reason,children:(0,F.jsx)(M,{width:16,height:16})})]})},e.id):null})})},t)):t.length>0?t.map((e,t)=>(0,F.jsx)(S,{minWidth:200},t)):(0,F.jsx)(S,{minWidth:200}),fe=()=>{K(`addAnnotationQueue`,{queueId:z})},Q=()=>V?V.some(e=>e.annotations.some(e=>e.expectedOutput)):X.some(e=>e.annotations?.some(e=>e.expectedOutput)),$=()=>V?.some(e=>e.annotations.some(e=>e.comment))?!0:X.some(e=>e.annotations?.some(e=>e.comment));return Y||H?(0,F.jsxs)(l,{align:`start`,marginTop:4,width:`full`,padding:6,maxHeight:`100%`,children:[(0,F.jsxs)(i,{width:`full`,paddingBottom:4,alignItems:`flex-end`,children:[(0,F.jsx)(o,{height:`32px`,width:`200px`}),(0,F.jsx)(w,{}),(0,F.jsx)(o,{height:`32px`,width:`100px`})]}),(0,F.jsx)(n,{flex:1,width:`full`,overflowX:`auto`,children:(0,F.jsxs)(b,{variant:`line`,width:`full`,children:[(0,F.jsx)(C,{children:(0,F.jsx)(_,{children:Array.from({length:6}).map((e,t)=>(0,F.jsx)(x,{children:(0,F.jsx)(o,{height:`20px`,width:`100px`})},t))})}),(0,F.jsx)(y,{children:Array.from({length:3}).map((e,t)=>(0,F.jsx)(_,{children:Array.from({length:6}).map((e,t)=>(0,F.jsx)(S,{children:(0,F.jsx)(o,{height:`20px`,width:t===2||t===3?`200px`:`100px`})},t))},t))})]})})]}):(0,F.jsxs)(l,{align:`start`,marginTop:4,width:`full`,children:[(0,F.jsxs)(i,{width:`full`,paddingBottom:4,alignItems:`flex-end`,padding:6,children:[R||(0,F.jsx)(s,{as:`h1`,size:`lg`,children:m}),(0,F.jsx)(w,{}),!e&&(0,F.jsxs)(v.Root,{children:[(0,F.jsx)(v.Trigger,{asChild:!0,children:(0,F.jsxs)(r,{variant:`outline`,children:[`Status `,(0,F.jsx)(p,{})]})}),(0,F.jsx)(v.Content,{children:(0,F.jsx)(d,{defaultValue:`pending`,value:J,onValueChange:e=>ae(e.value??``),children:(0,F.jsxs)(l,{align:`start`,padding:3,gap:3,children:[(0,F.jsx)(u,{value:`pending`,children:`Pending`}),(0,F.jsx)(u,{value:`completed`,children:`Completed`}),(0,F.jsx)(u,{value:`all`,children:`All`})]})})})]}),z&&(0,F.jsxs)(v.Root,{children:[(0,F.jsx)(v.Trigger,{asChild:!0,children:(0,F.jsx)(r,{variant:`outline`,minWidth:0,children:(0,F.jsx)(ee,{size:16})})}),(0,F.jsx)(v.Content,{children:(0,F.jsxs)(v.Item,{value:`edit`,onClick:()=>fe(),children:[(0,F.jsx)(A,{size:16}),` Edit queue`]})})]})]}),(0,F.jsx)(i,{align:`start`,gap:6,width:`full`,children:(0,F.jsx)(n,{flex:1,overflowX:`auto`,children:!Y&&X.length==0?(0,F.jsx)(N,{title:t??`No annotations yet`,description:a??`Annotate your messages to add more context and improve your analysis.`,docsInfo:(0,F.jsxs)(c,{children:[`To get started with annotations, please visit our`,` `,(0,F.jsx)(k,{href:`https://docs.langwatch.ai/features/annotations`,isExternal:!0,color:`orange.fg`,children:`documentation`}),`.`]}),icon:(0,F.jsx)(A,{})}):(0,F.jsx)(n,{width:`full`,maxWidth:`100%`,overflowX:`auto`,children:(0,F.jsxs)(b,{variant:`line`,children:[(0,F.jsx)(C,{children:(0,F.jsxs)(_,{children:[(0,F.jsx)(x,{}),!e&&(0,F.jsx)(x,{children:`Date created`}),(0,F.jsx)(x,{children:`Input`}),(0,F.jsx)(x,{children:`Output`}),Q()&&(0,F.jsx)(x,{children:`Expected Output`}),$()&&(0,F.jsx)(x,{children:`Comments`}),G.data&&G.data&&G.data.length>0&&G.data?.filter(e=>e.active===!0).map(e=>(0,F.jsx)(x,{children:e.name},e.id)),(0,F.jsx)(x,{children:`Trace Date`})]})}),(0,F.jsx)(y,{children:Y?Array.from({length:3}).map((e,t)=>(0,F.jsx)(_,{children:Array.from({length:4}).map((e,t)=>(0,F.jsx)(S,{children:(0,F.jsx)(o,{height:`20px`})},t))},t)):X.length>0?X.map(t=>(0,F.jsx)(ne,{target:T(t.traceId),children:(0,F.jsxs)(_,{cursor:`pointer`,onClick:()=>ue(t.traceId,t.id,t.doneAt),backgroundColor:t.doneAt?`bg.subtle`:`bg.panel`,padding:2,children:[(0,F.jsx)(S,{children:(0,F.jsx)(g,{content:(0,F.jsxs)(l,{align:`start`,gap:0,children:[t.createdByUser&&(0,F.jsxs)(c,{marginBottom:2,children:[`Created by `,t.createdByUser.name]}),(0,F.jsx)(c,{children:`Comments by:`}),t.annotations.map(e=>e.user?.name).filter(e=>e!=null).filter((e,t,n)=>n.indexOf(e)===t).map(e=>(0,F.jsx)(c,{children:e},e))]}),children:(0,F.jsx)(i,{children:(0,F.jsx)(I,{createdByUser:t.createdByUser,annotations:t.annotations})})})}),!e&&(0,F.jsx)(S,{minWidth:150,children:(0,F.jsx)(c,{children:t.createdAt?`${t.createdAt.getDate()}/${t.createdAt.toLocaleDateString(`en-US`,{month:`short`})}`:`-`})}),(0,F.jsx)(S,{minWidth:350,children:(0,F.jsx)(f,{field:`input`,children:(0,F.jsx)(g,{content:t.trace?.input?.value??`<empty>`,children:(0,F.jsx)(c,{lineClamp:2,maxWidth:`350px`,textOverflow:`ellipsis`,wordBreak:`break-word`,children:t.trace?.input?.value??`<empty>`})})})}),(0,F.jsx)(S,{minWidth:350,children:(0,F.jsx)(f,{field:`output`,children:(0,F.jsx)(g,{content:t.trace?.output?.value??`<empty>`,children:(0,F.jsx)(c,{lineClamp:2,maxWidth:`350px`,textOverflow:`ellipsis`,wordBreak:`break-word`,children:t.trace?.output?.value??`<empty>`})})})}),Q()&&(0,F.jsx)(S,{minWidth:350,children:(0,F.jsx)(l,{align:`start`,gap:2,divideY:`1px`,children:t.annotations.map(e=>e.expectedOutput?(0,F.jsx)(c,{width:`full`,textAlign:`left`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,minWidth:400,paddingY:2,children:e.expectedOutput},e.id):null)})}),$()&&(0,F.jsx)(S,{minWidth:350,children:(0,F.jsx)(l,{align:`start`,gap:2,divideY:`1px`,children:t.annotations.map(e=>e.comment?(0,F.jsx)(c,{width:`full`,textAlign:`left`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,minWidth:400,paddingY:2,children:e.comment},e.id):null)})}),G.data&&G.data.length>0&&Z(t.annotations,de),(0,F.jsx)(S,{children:(0,F.jsxs)(i,{gap:1,children:[(0,F.jsx)(c,{children:new Date(t.trace?.timestamps.started_at??``).toLocaleDateString()}),(0,F.jsx)(te,{traceId:t.traceId,occurredAtMs:L(t.trace?.timestamps.started_at)})]})})]})},t.id)):(0,F.jsx)(_,{children:(0,F.jsx)(S,{colSpan:5,children:(0,F.jsx)(c,{children:`No annotations found for selected filters.`})})})})]})})})}),(0,F.jsx)(ie,{totalHits:V?V.length:se,pageOffset:q.pageOffset,pageSize:q.pageSize,nextPage:q.nextPage,prevPage:q.prevPage,changePageSize:q.changePageSize})]})};export{R as t};
|
|
2
|
+
//# sourceMappingURL=AnnotationsTable-C9n949u_.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./clsx-CjueKrWZ.js";import{$n as r,An as i,Dn as a,Et as o,F as s,Ft as c,G as l,Gt as u,H as d,Ht as f,I as p,In as m,J as h,L as g,Mn as _,N as v,Nn as y,Nt as b,Pn as x,Pt as S,Q as C,R as w,S as T,Sn as E,Un as D,V as O,Vn as ee,W as k,X as A,Xn as te,Yn as j,Zn as ne,Zt as re,at as ie,cr as M,f as N,gn as ae,h as oe,it as se,j as ce,jn as le,m as ue,mn as de,or as fe,ot as pe,p as P,pn as F,q as me,sn as I,t as he,tr as ge,un as _e,z as ve,zn as L,zt as ye}from"./CartesianChart-Ci1mTvgb.js";import{n as R,r as be,t as xe}from"./getRadiusAndStrokeWidthFromDot-D2oUP3Tn.js";var z=(e,t,n)=>o(e,`xAxis`,N(e,t),n),B=(e,t,n)=>S(e,`xAxis`,N(e,t),n),V=(e,t,n)=>o(e,`yAxis`,P(e,t),n),H=(e,t,n)=>S(e,`yAxis`,P(e,t),n),Se=L([F,z,V,B,H],(e,t,n,r,i)=>x(e,`xAxis`)?a(t,r,!1):a(n,i,!1)),U=L([c,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),W=e=>x(F(e),`xAxis`)?`yAxis`:`xAxis`,Ce=(e,t)=>W(e)===`yAxis`?P(e,t):N(e,t),we=L([F,z,V,B,H,L([U,(e,t,n)=>b(e,W(e),Ce(e,t),n)],(e,t)=>{if(!(e==null||t==null)){var n=e.stackId,r=ye(e);if(!(n==null||r==null)){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),re,Se,U,u],(e,t,n,r,i,a,o,s,c,l)=>{var u=o.chartData,d=o.dataStartIndex,f=o.dataEndIndex;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var p=c.data,m=p&&p.length>0?p:u?.slice(d,f+1);if(m!=null)return Ye({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:d,areaSettings:c,stackedData:a,displayedData:m,chartBaseValue:l,bandSize:s})}}),G=e(t()),Te=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],Ee=[`id`,`baseLine`];function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K.apply(null,arguments)}function q(e,t){if(e==null)return{};var n,r,i=De(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function De(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Oe(e){var t=e.alpha,n=e.baseLine,i=e.points,a=e.strokeWidth,o=i[0]?.x,s=i[i.length-1]?.x;if(!m(o)||!m(s))return null;var c=t*Math.abs(o-s),l=Math.max(...i.map(e=>e.y||0));return r(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.y||0),l)),r(l)?G.createElement(`rect`,{x:o<s?o:o-c,y:0,width:c,height:Math.floor(l+(a?parseInt(`${a}`,10):1))}):null}function ke(e){var t=e.alpha,n=e.baseLine,i=e.points,a=e.strokeWidth,o=i[0]?.y,s=i[i.length-1]?.y;if(!m(o)||!m(s))return null;var c=t*Math.abs(o-s),l=Math.max(...i.map(e=>e.x||0));return r(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.x||0),l)),r(l)?G.createElement(`rect`,{x:0,y:o<s?o:o-c,width:l+(a?parseInt(`${a}`,10):1),height:Math.floor(c)}):null}function Ae(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?G.createElement(ke,{alpha:t,points:r,baseLine:i,strokeWidth:a}):G.createElement(Oe,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function je(e){var t=e.animationElapsedTime,n=t===void 0?1:t,r=e.isAnimating,i=r===void 0?!1:r,a=e.isEntrance,o=a===void 0?!1:a,c=e.layout,l=e.isRange,u=e.stroke,d=e.connectNulls,f=q(e,Te),p=c===`vertical`?`vertical`:`horizontal`,m=d??!1,h=s(),g=f.id,_=f.baseLine,v=M(q(f,Ee)),y=G.createElement(I,K({},f,{id:g,baseLine:_,connectNulls:m,stroke:`none`,className:`recharts-area-area`,layout:p})),b=u!==`none`&&G.createElement(I,K({},v,{className:`recharts-area-curve`,layout:p,type:f.type,connectNulls:m,fill:`none`,stroke:u,points:f.points})),x=u!==`none`&&l&&Array.isArray(_)&&G.createElement(I,K({},v,{className:`recharts-area-curve`,layout:p,type:f.type,connectNulls:m,fill:`none`,stroke:u,points:_}));return o&&(i||n<1)?G.createElement(C,null,G.createElement(`defs`,null,G.createElement(`clipPath`,{id:h},G.createElement(Ae,{alpha:n,points:f.points??[],baseLine:_,layout:p,strokeWidth:f.strokeWidth}))),G.createElement(C,{clipPath:`url(#${h})`},y,b,x)):G.createElement(G.Fragment,null,y,b,x)}var Me=[`id`],Ne=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J.apply(null,arguments)}function Y(e,t){if(e==null)return{};var n,r,i=Pe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?X(Object(n),!0).forEach(function(t){Fe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fe(e,t,n){return(t=Ie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ie(e){var t=Le(e,`string`);return typeof t==`symbol`?t:t+``}function Le(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Q={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:O,animationInterpolateFn:(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[Z(Z({},e.next),{},{x:j(e.prev.x,e.next.x,t),y:j(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:je,xAxisId:0,yAxisId:0,zIndex:f.area};function $(e,t){return e&&e!==`none`?e:t}var Re=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:$(r,i),value:_(n,t),payload:e}]},ze=G.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:ge,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:_(o,t),hide:s,type:u,color:$(r,a),unit:c,formatter:l,graphicalItemId:d}};return G.createElement(k,{tooltipEntrySettings:f})});function Be(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=M(r);return G.createElement(be,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function Ve(e){var t=e.showLabels,n=e.children,r=e.points.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Z(Z({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return G.createElement(h,{value:t?r:void 0},n)}function He(e){var t=e.points,n=e.baseLine,r=e.needClip,i=e.clipPathId,a=e.props,o=e.animationElapsedTime,s=e.isAnimating,c=e.isEntrance,u=a.layout,d=a.type,f=a.stroke,p=a.connectNulls,m=a.isRange,h=a.shape,g=a.id,_=Y(a,Me),v=Z(Z({},fe(_)),{},{id:g,points:t,connectNulls:p,type:d,baseLine:n,layout:u,stroke:f,isRange:m,animationElapsedTime:o,isAnimating:s,isEntrance:c});return G.createElement(G.Fragment,null,t?.length>1&&G.createElement(C,{clipPath:r?`url(#clipPath-${i})`:void 0},G.createElement(l,{option:h,DefaultShape:Q.shape,shapeProps:v})),G.createElement(Be,{points:t,props:_,clipPathId:i}))}function Ue(e,t,n){return r(e)?j(r(t)?t:void 0,e,n):ne(e)||te(e)?j(r(t)?t:void 0,0,n):e}function We(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=e.previousPointsRef,a=e.previousBaselineRef,o=r.points,s=r.baseLine,c=r.isAnimationActive,l=r.animationBegin,u=r.animationDuration,d=r.animationEasing,f=r.animationMatchBy,m=r.animationInterpolateFn,h=(0,G.useMemo)(()=>({points:o,baseLine:s}),[o,s]),_=w(h,a),v=de(),y=g(r.onAnimationStart,r.onAnimationEnd),b=y.isAnimating,x=y.handleAnimationStart,S=y.handleAnimationEnd,C=_.startValue;if(v==null)return null;var T=Array.isArray(s)&&Array.isArray(C)?ve(C,s,f):Array.isArray(s)?ve(null,s,f):null;return G.createElement(p,{animationInput:h,animationIdPrefix:`recharts-area-`,items:o,previousItemsRef:i,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,onAnimationStart:x,onAnimationEnd:S,animationInterpolateFn:m,animationMatchBy:f,layout:v},(e,i,a)=>{var c=i===1?s:Array.isArray(s)?m(T,i,v):a?s:Ue(s,C,i);return _.syncStepValue(c,i),G.createElement(Ve,{showLabels:!b,points:o},r.children,G.createElement(He,{points:e,baseLine:c,needClip:t,clipPathId:n,props:r,animationElapsedTime:i,isAnimating:b||i<1,isEntrance:a}),G.createElement(A,{label:r.label}))})}function Ge(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=(0,G.useRef)(null),a=(0,G.useRef)();return G.createElement(We,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var Ke=class extends G.PureComponent{render(){var e=this.props,t=e.hide,r=e.dot,i=e.points,a=e.className,o=e.top,s=e.left,c=e.needClip,l=e.xAxisId,u=e.yAxisId,d=e.width,f=e.height,p=e.id,m=e.baseLine,h=e.zIndex;if(t)return null;var g=n(`recharts-area`,a),_=p,v=xe(r),y=v.r,b=v.strokeWidth,x=me(r),S=y*2+b,w=c?`url(#clipPath-${x?``:`dots-`}${_})`:void 0;return G.createElement(ie,{zIndex:h},G.createElement(C,{className:g},c&&G.createElement(`defs`,null,G.createElement(ue,{clipPathId:_,xAxisId:l,yAxisId:u}),!x&&G.createElement(`clipPath`,{id:`clipPath-dots-${_}`},G.createElement(`rect`,{x:s-S/2,y:o-S/2,width:d+S,height:f+S}))),G.createElement(Ge,{needClip:c,clipPathId:_,props:this.props})),G.createElement(R,{points:i,mainColor:$(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}),this.props.isRange&&Array.isArray(m)&&G.createElement(R,{points:m,mainColor:$(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}))}};function qe(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,c=e.fillOpacity,l=e.hide,u=e.isAnimationActive,d=e.legendType,f=e.stroke,p=e.xAxisId,m=e.yAxisId,h=Y(e,Ne),g=ae(),_=pe(),v=oe(p,m).needClip,y=E(),b=ee(t=>we(t,e.id,y))??{},x=b.points,S=b.isRange,C=b.baseLine,w=T();if(g!==`horizontal`&&g!==`vertical`||w==null||_!==`AreaChart`&&_!==`ComposedChart`)return null;var D=w.height,O=w.width,k=w.x,A=w.y;return!x||!x.length?null:G.createElement(Ke,J({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:C,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:D,hide:l,layout:g,isAnimationActive:u,isRange:S,legendType:d,needClip:v,points:x,stroke:f,width:O,left:k,top:A,xAxisId:p,yAxisId:m}))}var Je=(e,t,n,i,a)=>{var o=n??t;if(r(o))return o;var s=e===`horizontal`?a:i,c=s.scale.domain();if(s.type===`number`){var l=Math.max(c[0],c[1]),u=Math.min(c[0],c[1]);return o===`dataMin`?u:o===`dataMax`||l<0?l:Math.max(Math.min(c[0],c[1]),0)}return o===`dataMin`?c[0]:o===`dataMax`?c[1]:c[0]};function Ye(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,a=t.dataKey,o=e.stackedData,s=e.layout,c=e.chartBaseValue,l=e.xAxis,u=e.yAxis,d=e.displayedData,f=e.dataStartIndex,p=e.xAxisTicks,m=e.yAxisTicks,h=e.bandSize,g=o&&o.length,_=Je(s,c,r,l,u),v=s===`horizontal`,b=!1,x=d.map((e,t)=>{var r;if(g)r=o[f+t];else{var s=y(e,a);Array.isArray(s)?(r=s,b=!0):r=[_,s]}var c=r?.[1]??null,d=c==null||g&&!n&&y(e,a)==null;return v?{x:i({axis:l,ticks:p,bandSize:h,entry:e,index:t}),y:d?null:u.scale.map(c)??null,value:r,payload:e}:{x:d?null:l.scale.map(c)??null,y:i({axis:u,ticks:m,bandSize:h,entry:e,index:t}),value:r,payload:e}});return{points:x,baseLine:(g||b?x.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:t!=null&&e.y!=null?u.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:l.scale.map(t)??null,y:e.y,payload:e.payload}}):v?u.scale.map(_):l.scale.map(_))??0,isRange:b}}function Xe(e){var t=D(e,Q),n=E();return G.createElement(v,{id:t.id,type:`area`},e=>G.createElement(G.Fragment,null,G.createElement(d,{legendPayload:Re(t)}),G.createElement(ze,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),G.createElement(ce,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:le(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),G.createElement(qe,J({},t,{id:e}))))}var Ze=G.memo(Xe,_e);Ze.displayName=`Area`;var Qe=[`axis`],$e=(0,G.forwardRef)((e,t)=>G.createElement(he,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Qe,tooltipPayloadSearcher:se,categoricalChartProps:e,ref:t}));export{Ze as n,$e as t};
|
|
2
|
+
//# sourceMappingURL=AreaChart-PNFZHqkl.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./portal-Sdfvrza9.js";import{t}from"./jsx-runtime-CFwixLRt.js";import{t as n}from"./heading-C0sACr0w.js";import{t as r}from"./v-stack-hkuSkmCA.js";import{n as i,r as a,t as o}from"./card-By_Mbslh.js";import{t as s}from"./container-Cxi_AjD-.js";import{t as c}from"./LogoIcon-CyQDrYa_.js";var l=t();function u({title:t,children:u}){return(0,l.jsx)(s,{maxW:`container.md`,paddingTop:`calc(40vh - 164px)`,children:(0,l.jsxs)(a,{children:[(0,l.jsx)(i,{children:(0,l.jsxs)(e,{gap:4,children:[(0,l.jsx)(c,{width:30.69,height:42}),(0,l.jsx)(n,{size:`lg`,as:`h1`,children:t})]})}),(0,l.jsx)(o,{children:(0,l.jsx)(r,{width:`full`,maxWidth:`60ch`,align:`start`,gap:4,children:u})})]})})}export{u as t};
|
|
2
|
+
//# sourceMappingURL=AuthCard-D14g-b3Y.js.map
|